Select menu item indicator moves to the right with a leading icon (WEB-1174)
Version: 0.6.5 ยท Type: ๐ Bug Fix
Problemโ
Per the Figma spec (Select Menu/Select Menu Item), when a menu item has a leading icon (Show Icon=True), the selection indicator must move to the right so the icon can take the left slot: [icon][text][indicator].
The checkbox variant already implemented this flip, but the internal checkmark (left) variant kept the checkmark on the left even when an icon was present โ inconsistent with Figma. The design-site also had no case demonstrating the rule.
Figma ruleโ
| Style | Show Icon | Layout | Indicator |
|---|---|---|---|
| Checkmark | False | [Check][Content] | left |
| Checkmark | True | [icon][Content][Check] | right |
| Checkbox | False | [Checkbox][Content] | left |
| Checkbox | True | [icon][Content][Checkbox] | right |
| Checkmark Right | any | [Content][Check] | right |
Changed Filesโ
packages/design/src/components/Select/SearchableOptionItem.tsxpackages/design/src/components/Select/styles.tspackages/design/src/components/Select/__tests__/MultiSelect.test.tsxpackages/design/src/components/Select/__tests__/SearchableOptionItem.test.tsxpackages/design-site/docs/components/select.mdx
Changesโ
- Generalized the "icon โ indicator on the right" logic in
SearchableOptionItemto cover both thecheckmarkandcheckboxvariants (previously checkbox-only). - Confirmed the right-side indicator supports two forms โ checkmark (
checkmark-right) and checkbox (checkbox) โ both reachable viaMultiSelect.menuItemVariantwith leading icons. - Added an "Indicator Position with Icons" case to the docs demonstrating both right-side forms (checkmark + checkbox with icons) plus the left-side checkbox for contrast.