Select / MultiSelect icon support, menuItemVariant and showSearchIcon toggle (WEB-1075, WEB-1076, WEB-1118)
Version: 0.6.0 · Type: ✨ Feature
Problem
Figma's Select design system updated the multi-select and search specs; the code hadn't caught up:
- Chips lacked hover (gray fill) and selected/active (darker fill + border) visual states; menu items lacked
Checkboxand left-alignedCheckmarkstyle variants;MultiSelectcouldn't switch its dropdown item visual style - The leading search icon on searchable triggers couldn't be turned off
- The
checkboxvariant was a pure visualspan, not backed by the sharedCheckboxcomponent
Changed Files
packages/design/src/components/Select/styles.tspackages/design/src/components/Select/SearchableOptionItem.tsxpackages/design/src/components/Select/MultiSelect.tsxpackages/design/src/components/Select/Select.tsxpackages/design/src/components/Select/index.tspackages/design/src/components/Select/SelectDesignSpec.mdpackages/design/src/components/Input/styles.tspackages/design/src/components/Select/__tests__/MultiSelect.test.tsxpackages/design/src/components/Select/__tests__/Select.test.tsxpackages/design-site/docs/components/select.mdx
Changes
- Chip states —
MULTI_SELECT_CHIP_CLASSgains hover (Grays-Gray-1fill +Separators-Emphasizedborder) and selected/active/focus-visible (Grays-Gray-2fill +Labels-Primaryborder) states SearchableOptionItemgains avariantprop —'checkmark-right' | 'checkmark' | 'checkbox', default'checkmark-right'for backward compatibility; thecheckboxvariant is driven directly byselected/disabled- New
iconprop — optional leading icon (matches Figma's Show Icon) MultiSelectgains amenuItemVariantprop —'checkmark-right'(default) |'checkbox', forwarded toSearchableOptionItem- New exported
SelectItemVarianttype Selectgains ashowSearchIconprop (defaulttrue) controlling whether the searchable trigger shows a leading search iconSearchableOptionItem'scheckboxvariant now renders the sharedCheckboxcomponent instead of a hand-rolled visualspanInputborder gains a hover state (hover:border-(--Labels-Primary))- Select item default text color confirmed as
text-(--Labels-Primary); synced the design spec doc, style comments, and unit test assertions - Docs site
select.mdx(English + Chinese) updated with a Menu Item Variants demo and amenuItemVariantProps entry
Token Alignment
| State | Property | Token |
|---|---|---|
| Chip Hover | Background | Grays-Gray-1 (#EBEBEB) |
| Chip Hover | Border | Separators-Emphasized (#CCCCCC) |
| Chip Selected | Background | Grays-Gray-2 (#D6D6D6) |
| Chip Selected | Border | Labels-Primary (#000000) |
| Checkbox Unselected | Border | Separators-Default |
| Checkbox Selected | Fill | Labels-Primary (#000000) |
| Checkbox Disabled Unselected | Border + BG | Separators-Emphasized + Grays-Gray-1 |
| Checkbox Disabled Selected | Fill | Grays-Gray-2 (#D6D6D6) |