@salesforce/design-system-react 11.0.0-rc.0 → 11.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/cjs/components/alert/index.cjs +1 -1
- package/dist/cjs/components/alert/index.cjs.map +1 -1
- package/dist/cjs/components/builder-header/nav-link.cjs.map +1 -1
- package/dist/cjs/components/button/check-props.cjs +1 -1
- package/dist/cjs/components/button/check-props.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs +1 -1
- package/dist/cjs/components/button/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/index.cjs +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-indicators.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs +1 -1
- package/dist/cjs/components/checkbox/check-props.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/custom-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs +1 -1
- package/dist/cjs/components/color-picker/private/hsv-color.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch-option.cjs.map +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs +1 -1
- package/dist/cjs/components/color-picker/private/swatch.cjs.map +1 -1
- package/dist/cjs/components/combobox/combobox.cjs +1 -1
- package/dist/cjs/components/combobox/combobox.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs +1 -1
- package/dist/cjs/components/date-picker/date-picker.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/calendar.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs +1 -1
- package/dist/cjs/components/date-picker/private/day.cjs.map +1 -1
- package/dist/cjs/components/files/file.cjs +1 -8
- package/dist/cjs/components/files/file.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs +1 -1
- package/dist/cjs/components/files/private/file-actions.cjs.map +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs +1 -1
- package/dist/cjs/components/files/private/file-figure.cjs.map +1 -1
- package/dist/cjs/components/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/icon/check-props.cjs +1 -1
- package/dist/cjs/components/icon/check-props.cjs.map +1 -1
- package/dist/cjs/components/icon/index.cjs +1 -1
- package/dist/cjs/components/icon/index.cjs.map +1 -1
- package/dist/cjs/components/input/check-props.cjs +1 -1
- package/dist/cjs/components/input/check-props.cjs.map +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/menu-dropdown.cjs.map +1 -1
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/pill/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/progress-indicator/private/step.cjs.map +1 -1
- package/dist/cjs/components/radio/index.cjs +1 -1
- package/dist/cjs/components/radio/index.cjs.map +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs +1 -1
- package/dist/cjs/components/simple-data-table/index.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs +1 -1
- package/dist/cjs/components/simple-data-table/interactive-element.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/cell-context.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs +2 -0
- package/dist/cjs/components/simple-data-table/private/corner-style.cjs.map +1 -0
- package/dist/cjs/components/simple-data-table/private/head.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/head.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/header-cell.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/link.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/split-view/private/list-item-with-content.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs +1 -1
- package/dist/cjs/components/tabs/private/tab.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +1 -1
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -1
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +1 -3
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs +1 -1
- package/dist/cjs/components/utilities/dialog/portal.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/index.cjs +1 -26
- package/dist/cjs/components/utilities/menu-list/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs +1 -1
- package/dist/cjs/components/utilities/utility-icon/index.cjs.map +1 -1
- package/dist/cjs/utilities/color.cjs +1 -1
- package/dist/cjs/utilities/color.cjs.map +1 -1
- package/dist/cjs/utilities/dom-element-focus.cjs.map +1 -1
- package/dist/cjs/utilities/execution-environment.cjs.map +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs +1 -1
- package/dist/cjs/utilities/get-aria-props.cjs.map +1 -1
- package/dist/cjs/utilities/get-data-props.cjs +1 -1
- package/dist/cjs/utilities/get-data-props.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigable-dialog.cjs.map +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs +1 -1
- package/dist/cjs/utilities/keyboard-navigate.cjs.map +1 -1
- package/dist/cjs/utilities/product-tokens/icon-backgrounds.cjs.map +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs +1 -1
- package/dist/cjs/utilities/warning/children-as-trigger.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs +1 -1
- package/dist/cjs/utilities/warning/deprecated-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs +1 -1
- package/dist/cjs/utilities/warning/has-children-without-display-name-of.cjs.map +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/if-one-then-both-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs +1 -1
- package/dist/cjs/utilities/warning/is-trigger-tabbable.cjs.map +1 -1
- package/dist/cjs/utilities/warning/low-priority-warning.cjs.map +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/one-of-required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs +1 -1
- package/dist/cjs/utilities/warning/only-one-of-properties.cjs.map +1 -1
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs +1 -1
- package/dist/cjs/utilities/warning/render-function-return-contents-lack-display-name.cjs.map +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs +1 -1
- package/dist/cjs/utilities/warning/required-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs +1 -1
- package/dist/cjs/utilities/warning/sunset-property.cjs.map +1 -1
- package/dist/cjs/utilities/warning/warned-registry.cjs +2 -0
- package/dist/cjs/utilities/warning/warned-registry.cjs.map +1 -0
- package/dist/es/components/alert/index.js +4 -5
- package/dist/es/components/alert/index.js.map +1 -1
- package/dist/es/components/builder-header/nav-link.js.map +1 -1
- package/dist/es/components/button/check-props.js +1 -1
- package/dist/es/components/button/check-props.js.map +1 -1
- package/dist/es/components/button/index.js +50 -50
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/check-props.js +1 -1
- package/dist/es/components/button-stateful/check-props.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +3 -2
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +155 -129
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-indicators.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-item.js +1 -1
- package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +1 -1
- package/dist/es/components/checkbox/check-props.js.map +1 -1
- package/dist/es/components/checkbox/index.js +102 -100
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +150 -151
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/custom-color.js.map +1 -1
- package/dist/es/components/color-picker/private/hsv-color.js +16 -20
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch-option.js +2 -2
- package/dist/es/components/color-picker/private/swatch-option.js.map +1 -1
- package/dist/es/components/color-picker/private/swatch.js +1 -1
- package/dist/es/components/color-picker/private/swatch.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +565 -580
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js +6 -19
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +3 -3
- package/dist/es/components/combobox/private/menu.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +101 -102
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/private/calendar.js.map +1 -1
- package/dist/es/components/date-picker/private/day.js +1 -1
- package/dist/es/components/date-picker/private/day.js.map +1 -1
- package/dist/es/components/files/file.js +5 -6
- package/dist/es/components/files/file.js.map +1 -1
- package/dist/es/components/files/private/file-actions.js +2 -2
- package/dist/es/components/files/private/file-actions.js.map +1 -1
- package/dist/es/components/files/private/file-figure.js +1 -1
- package/dist/es/components/files/private/file-figure.js.map +1 -1
- package/dist/es/components/filter/filter.js +5 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/icon/check-props.js +9 -7
- package/dist/es/components/icon/check-props.js.map +1 -1
- package/dist/es/components/icon/index.js +13 -10
- package/dist/es/components/icon/index.js.map +1 -1
- package/dist/es/components/input/check-props.js +14 -13
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +202 -207
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +1 -2
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/pill/index.js.map +1 -1
- package/dist/es/components/pill-container/index.js +10 -6
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +181 -177
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/progress-indicator/private/step.js.map +1 -1
- package/dist/es/components/radio/index.js +1 -1
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/simple-data-table/cell.js +8 -5
- package/dist/es/components/simple-data-table/cell.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +97 -91
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/interactive-element.js +31 -28
- package/dist/es/components/simple-data-table/interactive-element.js.map +1 -1
- package/dist/es/components/simple-data-table/private/cell-context.js.map +1 -1
- package/dist/es/components/simple-data-table/private/corner-style.js +9 -0
- package/dist/es/components/simple-data-table/private/corner-style.js.map +1 -0
- package/dist/es/components/simple-data-table/private/head.js +65 -42
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +2 -1
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/link.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +96 -60
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/simple-data-table/row-actions.js +4 -1
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/split-view/private/list-item-with-content.js.map +1 -1
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/private/tab.js +1 -1
- package/dist/es/components/tabs/private/tab.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +1 -1
- package/dist/es/components/textarea/check-props.js.map +1 -1
- package/dist/es/components/textarea/index.js +4 -2
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/index.js +107 -88
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js +14 -19
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/utilities/dialog/index.js +2 -1
- package/dist/es/components/utilities/dialog/index.js.map +1 -1
- package/dist/es/components/utilities/dialog/portal.js +5 -3
- package/dist/es/components/utilities/dialog/portal.js.map +1 -1
- package/dist/es/components/utilities/menu-list/index.js +6 -6
- package/dist/es/components/utilities/menu-list/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +42 -18
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/utilities/utility-icon/index.js +32 -52
- package/dist/es/components/utilities/utility-icon/index.js.map +1 -1
- package/dist/es/utilities/color.js +1 -1
- package/dist/es/utilities/color.js.map +1 -1
- package/dist/es/utilities/dom-element-focus.js.map +1 -1
- package/dist/es/utilities/execution-environment.js.map +1 -1
- package/dist/es/utilities/get-aria-props.js +1 -1
- package/dist/es/utilities/get-aria-props.js.map +1 -1
- package/dist/es/utilities/get-data-props.js +1 -1
- package/dist/es/utilities/get-data-props.js.map +1 -1
- package/dist/es/utilities/keyboard-navigable-dialog.js +7 -7
- package/dist/es/utilities/keyboard-navigable-dialog.js.map +1 -1
- package/dist/es/utilities/keyboard-navigate.js +1 -1
- package/dist/es/utilities/keyboard-navigate.js.map +1 -1
- package/dist/es/utilities/product-tokens/icon-backgrounds.js.map +1 -1
- package/dist/es/utilities/warning/children-as-trigger.js +8 -7
- package/dist/es/utilities/warning/children-as-trigger.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property-value.js +11 -10
- package/dist/es/utilities/warning/deprecated-property-value.js.map +1 -1
- package/dist/es/utilities/warning/deprecated-property.js +8 -7
- package/dist/es/utilities/warning/deprecated-property.js.map +1 -1
- package/dist/es/utilities/warning/has-children-without-display-name-of.js +11 -10
- package/dist/es/utilities/warning/has-children-without-display-name-of.js.map +1 -1
- package/dist/es/utilities/warning/if-one-then-both-required-property.js +10 -9
- package/dist/es/utilities/warning/if-one-then-both-required-property.js.map +1 -1
- package/dist/es/utilities/warning/is-trigger-tabbable.js +9 -8
- package/dist/es/utilities/warning/is-trigger-tabbable.js.map +1 -1
- package/dist/es/utilities/warning/low-priority-warning.js.map +1 -1
- package/dist/es/utilities/warning/one-of-required-property.js +11 -10
- package/dist/es/utilities/warning/one-of-required-property.js.map +1 -1
- package/dist/es/utilities/warning/only-one-of-properties.js +9 -8
- package/dist/es/utilities/warning/only-one-of-properties.js.map +1 -1
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js +14 -13
- package/dist/es/utilities/warning/render-function-return-contents-lack-display-name.js.map +1 -1
- package/dist/es/utilities/warning/required-property.js +8 -7
- package/dist/es/utilities/warning/required-property.js.map +1 -1
- package/dist/es/utilities/warning/sunset-property.js +8 -7
- package/dist/es/utilities/warning/sunset-property.js.map +1 -1
- package/dist/es/utilities/warning/warned-registry.js +10 -0
- package/dist/es/utilities/warning/warned-registry.js.map +1 -0
- package/dist/types/components/builder-header/nav-link.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +14 -4
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +5 -2
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +7 -1
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +4 -1
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +1 -1
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/files/file.d.ts +5 -0
- package/dist/types/components/files/file.d.ts.map +1 -1
- package/dist/types/components/icon/index.d.ts +7 -1
- package/dist/types/components/icon/index.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +9 -6
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +9 -3
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/pill/index.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +9 -2
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/index.d.ts +3 -3
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts +8 -1
- package/dist/types/components/simple-data-table/interactive-element.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +10 -2
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +2 -2
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/split-view/private/list-item-with-content.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +9 -6
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/utilities/dialog/portal.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts +2 -2
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +14 -1
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/utilities/truncate/index.d.ts.map +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts +1 -1
- package/dist/types/components/utilities/utility-icon/index.d.ts.map +1 -1
- package/dist/types/types/common.d.ts.map +1 -1
- package/dist/types/types/components.d.ts.map +1 -1
- package/package.json +2 -3
- package/dist/cjs/icons/action/index.cjs +0 -2
- package/dist/cjs/icons/action/index.cjs.map +0 -1
- package/dist/cjs/icons/custom/index.cjs +0 -2
- package/dist/cjs/icons/custom/index.cjs.map +0 -1
- package/dist/cjs/icons/doctype/index.cjs +0 -2
- package/dist/cjs/icons/doctype/index.cjs.map +0 -1
- package/dist/cjs/icons/standard/index.cjs +0 -2
- package/dist/cjs/icons/standard/index.cjs.map +0 -1
- package/dist/cjs/icons/utility/index.cjs +0 -2
- package/dist/cjs/icons/utility/index.cjs.map +0 -1
- package/dist/es/icons/action/index.js +0 -6
- package/dist/es/icons/action/index.js.map +0 -1
- package/dist/es/icons/custom/index.js +0 -6
- package/dist/es/icons/custom/index.js.map +0 -1
- package/dist/es/icons/doctype/index.js +0 -6
- package/dist/es/icons/doctype/index.js.map +0 -1
- package/dist/es/icons/standard/index.js +0 -6
- package/dist/es/icons/standard/index.js.map +0 -1
- package/dist/es/icons/utility/index.js +0 -6
- package/dist/es/icons/utility/index.js.map +0 -1
- package/dist/types/icons/action/index.d.ts +0 -3
- package/dist/types/icons/action/index.d.ts.map +0 -1
- package/dist/types/icons/custom/index.d.ts +0 -3
- package/dist/types/icons/custom/index.d.ts.map +0 -1
- package/dist/types/icons/doctype/index.d.ts +0 -3
- package/dist/types/icons/doctype/index.d.ts.map +0 -1
- package/dist/types/icons/standard/index.d.ts +0 -3
- package/dist/types/icons/standard/index.d.ts.map +0 -1
- package/dist/types/icons/utility/index.d.ts +0 -3
- package/dist/types/icons/utility/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, { getOptionLabel } from './private/menu';\nimport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxActionOption,\n\tComboboxDeselectOption,\n\tComboboxMenuRenderMenuItemData,\n\tComboboxOptionIcon,\n} from './types';\nimport Label from '../forms/private/label';\nimport Popover, { type PopoverProps } from '../popover';\nimport type { InputProps } from '../input';\nimport type { TooltipProps } from '../tooltip';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport generateId from '../../utilities/generate-id';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\nimport { useControllableState, useLatestRef } from '../../utilities/hooks';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\t/**\n\t * Fires after the menu has closed (uncontrolled), or when a controlled\n\t * `isOpen` changes to `false`. `event` is the event of the close request,\n\t * when there was one.\n\t */\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\t/** Fires after the menu has opened and rendered, controlled or not. */\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\t/**\n\t * Fires when the user asks to close the menu (Escape, blur, selecting an\n\t * option, the popover buttons). With a controlled `isOpen`, set it to\n\t * `false` to close.\n\t */\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\t/**\n\t * Fires when the user asks to open the menu (typing, clicking the input,\n\t * Down, Enter) while it is closed. With a controlled `isOpen`, set it to\n\t * `true` to open.\n\t */\n\tonRequestOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/**\n\t * Fires with the requested selection when an option is chosen. `selection`\n\t * is controlled, so update it to accept the change.\n\t */\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ComboboxOptionIcon;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\n/**\n * Argument passed to `renderMenuItem`\n */\nexport interface ComboboxRenderMenuItemData extends ComboboxMenuRenderMenuItemData {\n\t/** The combobox's assistive text */\n\tassistiveText: ComboboxAssistiveText;\n}\n\n/**\n * Component accepted by the deprecated `onRenderMenuItem` and `menuItem` props\n */\ntype ComboboxLegacyMenuItem = React.ComponentType<{\n\tassistiveText?: ComboboxAssistiveText;\n\tselected: boolean;\n\t/** Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}>;\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/**\n\t * Initial open state when `isOpen` is not set. Ignored when `isOpen` is\n\t * set.\n\t */\n\tdefaultIsOpen?: boolean;\n\t/** Disables the input and keeps the menu closed. Applies to every variant. */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/**\n\t * An `Input` element whose props are passed to the combobox's input. They win over the\n\t * combobox's own, except `onChange`, which is called with `(event, { value })` alongside\n\t * the combobox's handler.\n\t */\n\tinput?: ReactElement<Partial<InputProps>>;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/**\n\t * Whether the menu is open. Leave unset to let the combobox open and close\n\t * itself (start state from `defaultIsOpen`). When set, the combobox only\n\t * reports open and close requests through `events.onRequestOpen` and\n\t * `events.onRequestClose`; update `isOpen` to act on them.\n\t */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/**\n\t * @deprecated Use `renderMenuItem`, which is called as a function with\n\t * `{ assistiveText, isSelected, option }`.\n\t */\n\tonRenderMenuItem?: ComboboxLegacyMenuItem;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/**\n\t * Selected options. Controlled: `events.onSelect` and\n\t * `events.onRequestRemoveSelectedOption` report the requested selection;\n\t * update `selection` to accept it.\n\t */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** @deprecated Use `disabled`, which now disables the input in every variant. */\n\tsingleInputDisabled?: boolean;\n\t/**\n\t * A `Tooltip` element shown on disabled menu items. Its props win over the combobox's\n\t * defaults; an option's `tooltipContent` wins over its `content`.\n\t */\n\ttooltipMenuItemDisabled?: ReactElement<Partial<TooltipProps>>;\n\t/**\n\t * Text in the input. Controlled: update it from `events.onChange`.\n\t * (`defaultValue` was removed in v11.)\n\t */\n\tvalue?: string;\n\t/**\n\t * Renders each option's content in place of the default label and icon.\n\t * Receives `{ assistiveText, isSelected, option }`.\n\t */\n\trenderMenuItem?: (data: ComboboxRenderMenuItemData) => ReactNode;\n\t/** @deprecated Use `renderMenuItem` instead. */\n\tmenuItem?: ComboboxLegacyMenuItem;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/**\n\t\t\t * Listbox variants. Defaults to `base`. `inline-listbox` with\n\t\t\t * `multiple` is deprecated (SLDS deprecated the inline listbox):\n\t\t\t * use `base` with `multiple`, which lists the selections after the input.\n\t\t\t */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/**\n\t\t\t * A `Popover` element rendered as the dialog. Its props win over the combobox's\n\t\t\t * defaults, except `body`, which the combobox wraps, and `children`, which the\n\t\t\t * combobox replaces with its input.\n\t\t\t */\n\t\t\tpopover: ReactElement<Partial<PopoverProps>>;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultIsOpen,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp,\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\trenderMenuItem: renderMenuItemProp,\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\t// Handlers read the latest `events`, so a new `events` object each render doesn't rebuild them\n\tconst eventsRef = useLatestRef<ComboboxEvents>(eventsProp ?? {});\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useRef(generateId());\n\tconst generatedErrorId = useRef(generateId());\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<\n\t\tComboboxOption | undefined\n\t>(selection?.[0]);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\t// `isOpen` is ephemeral UI state: controlled when the prop is set,\n\t// otherwise internal and seeded by `defaultIsOpen`.\n\tconst [isOpen, setIsOpen, isOpenControlled] = useControllableState(\n\t\tisOpenProp,\n\t\tdefaultIsOpen ?? false\n\t);\n\t// Latest `isOpen` for close requests made from timers and for swallowing a\n\t// duplicate request within one event.\n\tconst isOpenRef = useRef(isOpen);\n\tuseEffect(() => {\n\t\tisOpenRef.current = isOpen;\n\t}, [isOpen]);\n\t// Event of the latest close request, reported by `events.onClose`.\n\tconst closeEventRef = useRef<React.SyntheticEvent | undefined>(undefined);\n\t// Reset the highlighted option whenever the menu closes, however it closed.\n\tconst [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\tif (prevIsOpen !== isOpen) {\n\t\tsetPrevIsOpen(isOpen);\n\t\tif (!isOpen) {\n\t\t\tsetActiveOption(undefined);\n\t\t\tsetActiveOptionIndex(-1);\n\t\t}\n\t}\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\t// `singleInputDisabled` is the deprecated name for `disabled`.\n\tconst isInputDisabled = !!(disabled || singleInputDisabled);\n\tconst getIsOpen = useCallback(() => !!isOpen, [isOpen]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId.current);\n\t}, [ariaDescribedby, errorText]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\t// Every internal close path (Escape, blur, selecting an option, the popover\n\t// buttons, a click outside) goes through `requestClose`. It reports the\n\t// request through `events.onRequestClose` and closes only when `isOpen` is\n\t// uncontrolled; a controlled `isOpen` closes when the parent updates it.\n\tconst requestClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tif (isOpenRef.current) {\n\t\t\t\tif (!isOpenControlled) {\n\t\t\t\t\t// Swallow a second request in the same event (for example\n\t\t\t\t\t// Escape handled by both the input and the popover).\n\t\t\t\t\tisOpenRef.current = false;\n\t\t\t\t}\n\t\t\t\tcloseEventRef.current = event;\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (eventsRef.current.onRequestClose) {\n\t\t\t\t\teventsRef.current.onRequestClose(event as React.SyntheticEvent, {});\n\t\t\t\t}\n\n\t\t\t\tsetIsOpen(false);\n\t\t\t}\n\t\t},\n\t\t[isOpenControlled, variant, popover, eventsRef, setIsOpen]\n\t);\n\n\t// Called by the menu `Dialog` (or `Popover`) once it has rendered, so\n\t// `events.onOpen` fires on a real open whether `isOpen` is controlled or not.\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tcurrentOpenDropdown = { handleClose: requestClose };\n\n\t\t\tif (eventsRef.current.onOpen) {\n\t\t\t\teventsRef.current.onOpen(event, data || {});\n\t\t\t}\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tconst opts = getOptions();\n\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[requestClose, eventsRef, variant, getOptions, selection]\n\t);\n\n\t// Every internal open path (typing, clicking the input, Down, Enter) goes\n\t// through `requestOpen`. It reports the request through\n\t// `events.onRequestOpen` and opens only when `isOpen` is uncontrolled.\n\tconst requestOpen = useCallback(\n\t\t(event?: React.SyntheticEvent) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tif (eventsRef.current.onRequestOpen) {\n\t\t\t\t\teventsRef.current.onRequestOpen(event, {});\n\t\t\t\t}\n\t\t\t\tsetIsOpen(true);\n\t\t\t}\n\t\t},\n\t\t[isOpen, eventsRef, setIsOpen]\n\t);\n\n\tconst requestOpenMenu = useCallback(\n\t\t(event?: React.SyntheticEvent) => {\n\t\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\t\tif (\n\t\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\t\tmultiple ||\n\t\t\t\tvariant === 'readonly'\n\t\t\t) {\n\t\t\t\trequestOpen(event);\n\t\t\t}\n\t\t},\n\t\t[multiple, selection.length, variant, requestOpen]\n\t);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\trequestClose(event as unknown as React.SyntheticEvent, {\n\t\t\t\ttrigger: 'cancel',\n\t\t\t});\n\t\t},\n\t\t[requestClose]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\teventsRef.current.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: value ?? '',\n\t\t\t\t});\n\t\t\t\trequestClose(event);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (eventsRef.current.onSelect) {\n\t\t\t\teventsRef.current.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\trequestClose(event);\n\t\t},\n\t\t[\n\t\t\tisSelected,\n\t\t\tmultiple,\n\t\t\tdeselectId,\n\t\t\tselection,\n\t\t\teventsRef,\n\t\t\trequestClose,\n\t\t\tvalue,\n\t\t]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\trequestClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (eventsRef.current.onBlur) {\n\t\t\t\teventsRef.current.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, requestClose, eventsRef]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu(event);\n\t\t\tif (eventsRef.current.onChange) {\n\t\t\t\teventsRef.current.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, eventsRef]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (eventsRef.current.onFocus) {\n\t\t\t\teventsRef.current.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[eventsRef]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\trequestOpen(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trequestClose(event, { trigger: 'cancel' });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption!,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\teventsRef.current.onSubmit\n\t\t\t) {\n\t\t\t\teventsRef.current.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpen,\n\t\t\trequestOpen,\n\t\t\trequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\teventsRef,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\trequestOpen(event);\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[requestOpen, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: requestClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\trequestClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOption(option);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (eventsRef.current.onRequestRemoveSelectedOption) {\n\t\t\t\teventsRef.current.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, eventsRef]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// `events.onClose` fires when the menu really closes: after an\n\t// uncontrolled close, or when the parent sets a controlled `isOpen` to\n\t// `false`. It does not fire for a close request a controlled parent ignores.\n\tconst wasOpenRef = useRef(isOpen);\n\tuseEffect(() => {\n\t\tif (wasOpenRef.current !== isOpen) {\n\t\t\twasOpenRef.current = isOpen;\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === requestClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\t\t\t\tif (eventsRef.current.onClose) {\n\t\t\t\t\teventsRef.current.onClose(closeEventRef.current, {});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcloseEventRef.current = undefined;\n\t});\n\n\t// Handle options change - maintain active highlight\n\tuseEffect(() => {\n\t\tconst opts = getOptions();\n\t\tif (activeOption) {\n\t\t\tconst index = findIndex(opts, (item) => isEqual(item, activeOption));\n\t\t\tif (index !== -1) {\n\t\t\t\tsetActiveOptionIndex(index);\n\t\t\t} else {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [options, getOptions, activeOption]);\n\n\t// Handle selection change - keep the active selected option and its roving\n\t// tabindex in sync with `selection`. Besides seeding the initial active\n\t// pill, this clamps the active index when `selection` shrinks. Without the\n\t// clamp, a controlled parent removing a pill through any path other than\n\t// the built-in remove handler could leave the active index pointing past\n\t// the end of `selection`, so no pill receives tabindex=0 and the selected-\n\t// pill listbox becomes unreachable by keyboard (WCAG 2.1.1 / 2.4.3).\n\tuseEffect(() => {\n\t\tif (selection.length === 0) {\n\t\t\tif (activeSelectedOption !== undefined) {\n\t\t\t\tsetActiveSelectedOption(undefined);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!activeSelectedOption || !selection[activeSelectedOptionIndex]) {\n\t\t\tconst clampedIndex =\n\t\t\t\tactiveSelectedOptionIndex >= selection.length\n\t\t\t\t\t? selection.length - 1\n\t\t\t\t\t: activeSelectedOptionIndex;\n\t\t\tsetActiveSelectedOption(selection[clampedIndex]);\n\t\t\tsetActiveSelectedOptionIndex(clampedIndex);\n\t\t}\n\t}, [selection, activeSelectedOption, activeSelectedOptionIndex]);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === requestClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [requestClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst getCustomPopoverProps = useCallback(\n\t\t(body: ReactNode) => {\n\t\t\tconst popoverBody = (\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t\t</div>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst popoverFooter = (\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\trequestClose(e, { trigger: 'cancel' });\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\trequestClose(e);\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\t\talign: 'bottom',\n\t\t\t\tbody: popoverBody,\n\t\t\t\tclassNameDialog: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tclassNameFooter: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\t// The combobox owns the popover's open state; `events.onClose` is\n\t\t\t\t// fired by the combobox itself when `isOpen` turns `false`.\n\t\t\t\tonRequestClose: (\n\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\tdata?: { trigger?: string }\n\t\t\t\t) => {\n\t\t\t\t\trequestClose(event, { trigger: data?.trigger });\n\t\t\t\t},\n\t\t\t};\n\n\t\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t\tRecord<string, unknown> | undefined;\n\t\t\tconst popoverProps = assign(\n\t\t\t\tdefaultPopoverProps,\n\t\t\t\tpopoverPropsFromProp || {}\n\t\t\t);\n\t\t\tpopoverProps.body = popoverBody;\n\n\t\t\tdelete popoverProps.children;\n\t\t\treturn popoverProps;\n\t\t},\n\t\t[\n\t\t\tgetId,\n\t\t\tassistiveText.popoverLabel,\n\t\t\tlabels.cancelButton,\n\t\t\tlabels.doneButton,\n\t\t\trequestClose,\n\t\t\tisOpen,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\t// The listbox only renders while open and enabled (see `getDialog`), so the\n\t// input must not report it as expanded or point `aria-controls` at it\n\t// otherwise.\n\tconst getIsListboxRendered = useCallback(\n\t\t() => !isInputDisabled && getIsOpen(),\n\t\t[isInputDisabled, getIsOpen]\n\t);\n\tconst getListboxControlsId = () =>\n\t\tgetIsListboxRendered() ? `${getId()}-listbox` : undefined;\n\n\t// ARIA 1.2 combobox role and state for the input. `popupId` is the id of the\n\t// rendered popup, or `undefined` while it isn't rendered.\n\tconst getComboboxAriaProps = (\n\t\tpopup: 'listbox' | 'dialog',\n\t\tpopupId: string | undefined\n\t) => ({\n\t\t'aria-controls': popupId,\n\t\t'aria-expanded': !!popupId,\n\t\t'aria-haspopup': popup,\n\t\trole: 'combobox',\n\t});\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (getIsListboxRendered()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tgetIsListboxRendered,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\t// `onRenderMenuItem` and `menuItem` are deprecated: they take a component instead of a function\n\tconst LegacyMenuItem = onRenderMenuItem || menuItem;\n\tlet renderMenuItem:\n\t\t((data: ComboboxMenuRenderMenuItemData) => ReactNode) | undefined;\n\tif (renderMenuItemProp) {\n\t\trenderMenuItem = (data) => renderMenuItemProp({ ...data, assistiveText });\n\t} else if (LegacyMenuItem) {\n\t\trenderMenuItem = ({ isSelected, option }) => (\n\t\t\t<LegacyMenuItem\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tselected={isSelected}\n\t\t\t\toption={option}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\trenderMenuItem={renderMenuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\trenderMenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// The `input` element's props are spread last so they win, except `onChange`: `Input`'s\n\t// is `(event, data)` and InnerInput's is native, so call it alongside the combobox's own.\n\tconst { onChange: inputOnChange, ...userDefinedInputProps } = (input?.props ??\n\t\t{}) as Partial<InputProps> & Record<string, unknown>;\n\tconst withInputOnChange =\n\t\t(handler: (event: React.ChangeEvent<HTMLInputElement>) => void) =>\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tinputOnChange?.(event, { value: event.target.value });\n\t\t\thandler(event);\n\t\t};\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\tonChange={withInputOnChange(handleInputChange)}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\tonChange={withInputOnChange(handleInputChange)}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? getOptionLabel(selection[0])\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={withInputOnChange((event) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t{ body?: ReactNode } | undefined;\n\t\tconst popoverProps = getCustomPopoverProps(popoverPropsFromProp?.body);\n\t\t// Popover renders its dialog as `${id}-popover`, and `popover` props may\n\t\t// override the id.\n\t\tconst popoverControlsId = getIsOpen()\n\t\t\t? `${(popoverProps.id as string | undefined) ?? getId()}-popover`\n\t\t\t: undefined;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from getCustomPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\t{...getComboboxAriaProps('dialog', popoverControlsId)}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\t\t\tonChange={withInputOnChange(handleInputChange)}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: getOptionLabel(selection[0]) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={withInputOnChange((event) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = getOptionLabel(activeOption);\n\t\tconst selectedOptionLabel = getOptionLabel(selection[0]);\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={withInputOnChange((event) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Combobox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDA,IAAI,GACE,KAAkB,OAAO,WAAa,KA8GtC,KAAc,OAAO,YAAY,GAMjC,MAAmB,MACxB,MAAe,GAEV,MACL,GACA,OACoB;CACpB,IAAI,EAAK,MAAM;CACf,MAAM,EAAK;CACX,OAAO,EAAK;CACZ,UAAU,EAAK;CACf;EACC,KAAc;AAChB,IAiKM,KAAwD;CAC7D,OAAO;CACP,kBAAkB;CAClB,sBAAsB;CACtB,cAAc;CACd,4BAA4B;CAC5B,YAAY;CACZ,sBAAsB;AACvB,GAEM,KAA0C;CAC/C,gBAAgB;CAChB,OAAO;CACP,cAAc;CACd,YAAY;CACZ,yBAAyB;CACzB,gBAAgB;CAChB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;CACjB,4BAA4B;CAC5B,gBAAgB;AACjB,GAIM,MAAqC,OAAU;CACpD,IAAM,EACL,eAAe,KAAoB,CAAC,GACpC,oBAAoB,IACpB,cACA,wBACA,mBACA,4BACA,mBACA,cACA,oBACA,cACA,QAAQ,IACR,2BACA,iBACA,qBACA,oBACA,wBACA,IAAI,IACJ,qBAAiB,UACjB,WACA,UAAU,IACV,QAAQ,IACR,QAAQ,KAAa,CAAC,GACtB,2BACA,kBACA,mBAAe,YACf,aACA,sBACA,cAAU,CAAC,GACX,qBAAiB,CAAC,GAClB,0BAAsB,CAAC,GACvB,YACA,0BACA,cAAW,IACX,eAAY,CAAC,GACb,oBAAoB,IACpB,0BAAsB,IACtB,6BACA,UACA,aAAU,QACV,gBAAgB,IAChB,iBACG,IAGE,IAAgB,GAAO,CAAC,GAAG,IAAsB,EAAiB,GAClE,IAAS,GAAO,CAAC,GAAG,IAAe,EAAU,GAE7C,IAAY,GAA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Af,UAAA,CACC,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,CACD;;EACD,CAAA,CACD;CAEL,CAAA,IAAA;AAEF;AAEA,GAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"combobox.js","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseId,\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseMemo,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, { getOptionLabel } from './private/menu';\nimport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxActionOption,\n\tComboboxDeselectOption,\n\tComboboxMenuRenderMenuItemData,\n\tComboboxOptionIcon,\n} from './types';\nimport Label from '../forms/private/label';\nimport Popover, { type PopoverProps } from '../popover';\nimport type { InputProps } from '../input';\nimport type { TooltipProps } from '../tooltip';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\nimport { useControllableState, useLatestRef } from '../../utilities/hooks';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\t/**\n\t * Fires after the menu has closed (uncontrolled), or when a controlled\n\t * `isOpen` changes to `false`. `event` is the event of the close request,\n\t * when there was one.\n\t */\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\t/** Fires after the menu has opened and rendered, controlled or not. */\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\t/**\n\t * Fires when the user asks to close the menu (Escape, blur, selecting an\n\t * option, the popover buttons). With a controlled `isOpen`, set it to\n\t * `false` to close.\n\t */\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\t/**\n\t * Fires when the user asks to open the menu (typing, clicking the input,\n\t * Down, Enter) while it is closed. With a controlled `isOpen`, set it to\n\t * `true` to open.\n\t */\n\tonRequestOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/**\n\t * Fires with the requested selection when an option is chosen. `selection`\n\t * is controlled, so update it to accept the change.\n\t */\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ComboboxOptionIcon;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\n/**\n * Argument passed to `renderMenuItem`\n */\nexport interface ComboboxRenderMenuItemData extends ComboboxMenuRenderMenuItemData {\n\t/** The combobox's assistive text */\n\tassistiveText: ComboboxAssistiveText;\n}\n\n/**\n * Component accepted by the deprecated `onRenderMenuItem` and `menuItem` props\n */\ntype ComboboxLegacyMenuItem = React.ComponentType<{\n\tassistiveText?: ComboboxAssistiveText;\n\tselected: boolean;\n\t/** Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}>;\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/**\n\t * Initial open state when `isOpen` is not set. Ignored when `isOpen` is\n\t * set.\n\t */\n\tdefaultIsOpen?: boolean;\n\t/** Disables the input and keeps the menu closed. Applies to every variant. */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/**\n\t * An `Input` element whose props are passed to the combobox's input. They win over the\n\t * combobox's own, except `onChange`, which is called with `(event, { value })` alongside\n\t * the combobox's handler.\n\t */\n\tinput?: ReactElement<Partial<InputProps>>;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/**\n\t * Whether the menu is open. Leave unset to let the combobox open and close\n\t * itself (start state from `defaultIsOpen`). When set, the combobox only\n\t * reports open and close requests through `events.onRequestOpen` and\n\t * `events.onRequestClose`; update `isOpen` to act on them.\n\t */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/**\n\t * @deprecated Use `renderMenuItem`, which is called as a function with\n\t * `{ assistiveText, isSelected, option }`.\n\t */\n\tonRenderMenuItem?: ComboboxLegacyMenuItem;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/**\n\t * Selected options. Controlled: `events.onSelect` and\n\t * `events.onRequestRemoveSelectedOption` report the requested selection;\n\t * update `selection` to accept it.\n\t */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** @deprecated Use `disabled`, which now disables the input in every variant. */\n\tsingleInputDisabled?: boolean;\n\t/**\n\t * A `Tooltip` element shown on disabled menu items. Its props win over the combobox's\n\t * defaults; an option's `tooltipContent` wins over its `content`.\n\t */\n\ttooltipMenuItemDisabled?: ReactElement<Partial<TooltipProps>>;\n\t/**\n\t * Text in the input. Controlled: update it from `events.onChange`.\n\t * (`defaultValue` was removed in v11.)\n\t */\n\tvalue?: string;\n\t/**\n\t * Renders each option's content in place of the default label and icon.\n\t * Receives `{ assistiveText, isSelected, option }`.\n\t */\n\trenderMenuItem?: (data: ComboboxRenderMenuItemData) => ReactNode;\n\t/** @deprecated Use `renderMenuItem` instead. */\n\tmenuItem?: ComboboxLegacyMenuItem;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/**\n\t\t\t * Listbox variants. Defaults to `base`. `inline-listbox` with\n\t\t\t * `multiple` is deprecated (SLDS deprecated the inline listbox):\n\t\t\t * use `base` with `multiple`, which lists the selections after the input.\n\t\t\t */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/**\n\t\t\t * A `Popover` element rendered as the dialog. Its props win over the combobox's\n\t\t\t * defaults, except `body`, which the combobox wraps, and `children`, which the\n\t\t\t * combobox replaces with its input.\n\t\t\t */\n\t\t\tpopover: ReactElement<Partial<PopoverProps>>;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultIsOpen,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp,\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\trenderMenuItem: renderMenuItemProp,\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\t// Handlers read the latest `events`, so a new `events` object each render doesn't rebuild them\n\tconst eventsRef = useLatestRef<ComboboxEvents>(eventsProp ?? {});\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useId();\n\tconst generatedErrorId = useId();\n\tconst getId = useCallback(() => idProp || generatedId, [idProp, generatedId]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\t// Keep the active pill, and so its roving tabindex, inside `selection`. When\n\t// a controlled parent shrinks `selection` through any path other than the\n\t// built-in remove handler, an index past the end would leave no pill with\n\t// tabindex=0 and the selected-pill listbox unreachable by keyboard (WCAG\n\t// 2.1.1 / 2.4.3). An emptied selection starts again from the first pill.\n\tconst maxSelectedOptionIndex = Math.max(selection.length - 1, 0);\n\tif (activeSelectedOptionIndex > maxSelectedOptionIndex) {\n\t\tsetActiveSelectedOptionIndex(maxSelectedOptionIndex);\n\t}\n\tconst activeSelectedOption = selection[activeSelectedOptionIndex];\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\t// `isOpen` is ephemeral UI state: controlled when the prop is set,\n\t// otherwise internal and seeded by `defaultIsOpen`.\n\tconst [isOpen, setIsOpen, isOpenControlled] = useControllableState(\n\t\tisOpenProp,\n\t\tdefaultIsOpen ?? false\n\t);\n\t// Latest `isOpen` for close requests made from timers and for swallowing a\n\t// duplicate request within one event.\n\tconst isOpenRef = useRef(isOpen);\n\tuseEffect(() => {\n\t\tisOpenRef.current = isOpen;\n\t}, [isOpen]);\n\t// Event of the latest close request, reported by `events.onClose`.\n\tconst closeEventRef = useRef<React.SyntheticEvent | undefined>(undefined);\n\t// Reset the highlighted option whenever the menu closes, however it closed.\n\tconst [prevIsOpen, setPrevIsOpen] = useState(isOpen);\n\tif (prevIsOpen !== isOpen) {\n\t\tsetPrevIsOpen(isOpen);\n\t\tif (!isOpen) {\n\t\t\tsetActiveOption(undefined);\n\t\t\tsetActiveOptionIndex(-1);\n\t\t}\n\t}\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\t// `singleInputDisabled` is the deprecated name for `disabled`.\n\tconst isInputDisabled = !!(disabled || singleInputDisabled);\n\tconst getIsOpen = useCallback(() => !!isOpen, [isOpen]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId);\n\t}, [ariaDescribedby, errorText, generatedErrorId]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\t// When the options change, keep the highlight on the same option, or clear\n\t// it if that option is gone. Only sets state when the index is out of date,\n\t// so it settles after one extra render.\n\tif (activeOption) {\n\t\tconst index = findIndex(getOptions(), (item) =>\n\t\t\tisEqual(item, activeOption)\n\t\t);\n\t\tif (index === -1) {\n\t\t\tsetActiveOption(undefined);\n\t\t\tsetActiveOptionIndex(-1);\n\t\t} else if (index !== activeOptionIndex) {\n\t\t\tsetActiveOptionIndex(index);\n\t\t}\n\t}\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\t// Every internal close path (Escape, blur, selecting an option, the popover\n\t// buttons, a click outside) goes through `requestClose`. It reports the\n\t// request through `events.onRequestClose` and closes only when `isOpen` is\n\t// uncontrolled; a controlled `isOpen` closes when the parent updates it.\n\tconst requestClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tif (isOpenRef.current) {\n\t\t\t\tif (!isOpenControlled) {\n\t\t\t\t\t// Swallow a second request in the same event (for example\n\t\t\t\t\t// Escape handled by both the input and the popover).\n\t\t\t\t\tisOpenRef.current = false;\n\t\t\t\t}\n\t\t\t\tcloseEventRef.current = event;\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (eventsRef.current.onRequestClose) {\n\t\t\t\t\teventsRef.current.onRequestClose(event as React.SyntheticEvent, {});\n\t\t\t\t}\n\n\t\t\t\tsetIsOpen(false);\n\t\t\t}\n\t\t},\n\t\t[isOpenControlled, variant, popover, eventsRef, setIsOpen]\n\t);\n\n\t// Called by the menu `Dialog` (or `Popover`) once it has rendered, so\n\t// `events.onOpen` fires on a real open whether `isOpen` is controlled or not.\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tcurrentOpenDropdown = { handleClose: requestClose };\n\n\t\t\tif (eventsRef.current.onOpen) {\n\t\t\t\teventsRef.current.onOpen(event, data || {});\n\t\t\t}\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tconst opts = getOptions();\n\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[requestClose, eventsRef, variant, getOptions, selection]\n\t);\n\n\t// Every internal open path (typing, clicking the input, Down, Enter) goes\n\t// through `requestOpen`. It reports the request through\n\t// `events.onRequestOpen` and opens only when `isOpen` is uncontrolled.\n\tconst requestOpen = useCallback(\n\t\t(event?: React.SyntheticEvent) => {\n\t\t\tif (!isOpen) {\n\t\t\t\tif (eventsRef.current.onRequestOpen) {\n\t\t\t\t\teventsRef.current.onRequestOpen(event, {});\n\t\t\t\t}\n\t\t\t\tsetIsOpen(true);\n\t\t\t}\n\t\t},\n\t\t[isOpen, eventsRef, setIsOpen]\n\t);\n\n\tconst requestOpenMenu = useCallback(\n\t\t(event?: React.SyntheticEvent) => {\n\t\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\t\tif (\n\t\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\t\tmultiple ||\n\t\t\t\tvariant === 'readonly'\n\t\t\t) {\n\t\t\t\trequestOpen(event);\n\t\t\t}\n\t\t},\n\t\t[multiple, selection.length, variant, requestOpen]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\teventsRef.current.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: value ?? '',\n\t\t\t\t});\n\t\t\t\trequestClose(event);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (eventsRef.current.onSelect) {\n\t\t\t\teventsRef.current.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\trequestClose(event);\n\t\t},\n\t\t[\n\t\t\tisSelected,\n\t\t\tmultiple,\n\t\t\tdeselectId,\n\t\t\tselection,\n\t\t\teventsRef,\n\t\t\trequestClose,\n\t\t\tvalue,\n\t\t]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\trequestClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (eventsRef.current.onBlur) {\n\t\t\t\teventsRef.current.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, requestClose, eventsRef]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu(event);\n\t\t\tif (eventsRef.current.onChange) {\n\t\t\t\teventsRef.current.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, eventsRef]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (eventsRef.current.onFocus) {\n\t\t\t\teventsRef.current.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[eventsRef]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpen) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\trequestOpen(event);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\trequestClose(event, { trigger: 'cancel' });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (activeOption && getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\teventsRef.current.onSubmit\n\t\t\t) {\n\t\t\t\teventsRef.current.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpen,\n\t\t\trequestOpen,\n\t\t\trequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\teventsRef,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\trequestOpen(event);\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[requestOpen, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: requestClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\trequestClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (eventsRef.current.onRequestRemoveSelectedOption) {\n\t\t\t\teventsRef.current.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, eventsRef]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// `events.onClose` fires when the menu really closes: after an\n\t// uncontrolled close, or when the parent sets a controlled `isOpen` to\n\t// `false`. It does not fire for a close request a controlled parent ignores.\n\tconst wasOpenRef = useRef(isOpen);\n\tuseEffect(() => {\n\t\tif (wasOpenRef.current !== isOpen) {\n\t\t\twasOpenRef.current = isOpen;\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === requestClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\t\t\t\tif (eventsRef.current.onClose) {\n\t\t\t\t\teventsRef.current.onClose(closeEventRef.current, {});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcloseEventRef.current = undefined;\n\t});\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === requestClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [requestClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst customPopoverProps = useMemo(() => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\tRecord<string, unknown> | undefined;\n\t\tconst popoverBody = (\n\t\t\t<div>\n\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t</div>\n\t\t\t\t{popoverPropsFromProp?.body as ReactNode}\n\t\t\t</div>\n\t\t);\n\n\t\tconst popoverFooter = (\n\t\t\t<div>\n\t\t\t\t<Button\n\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\trequestClose(e, { trigger: 'cancel' });\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\trequestClose(e);\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\n\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\talign: 'bottom',\n\t\t\tbody: popoverBody,\n\t\t\tclassNameDialog: 'slds-popover_full-width',\n\t\t\tfooter: popoverFooter,\n\t\t\tclassNameFooter: 'slds-popover__footer_form',\n\t\t\thasNoNubbin: true,\n\t\t\tid: getId(),\n\t\t\tisOpen,\n\t\t\thasNoTriggerStyles: true,\n\t\t\tonOpen: handleOpen,\n\t\t\t// The combobox owns the popover's open state; `events.onClose` is\n\t\t\t// fired by the combobox itself when `isOpen` turns `false`.\n\t\t\tonRequestClose: (\n\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\tdata?: { trigger?: string }\n\t\t\t) => {\n\t\t\t\trequestClose(event, { trigger: data?.trigger });\n\t\t\t},\n\t\t};\n\n\t\tconst popoverProps: Record<string, unknown> = {\n\t\t\t...defaultPopoverProps,\n\t\t\t...popoverPropsFromProp,\n\t\t\tbody: popoverBody,\n\t\t};\n\n\t\tdelete popoverProps.children;\n\t\treturn popoverProps;\n\t}, [\n\t\tgetId,\n\t\tassistiveText.popoverLabel,\n\t\tlabels.cancelButton,\n\t\tlabels.doneButton,\n\t\trequestClose,\n\t\tisOpen,\n\t\thandleOpen,\n\t\tpopover,\n\t]);\n\n\t// The listbox only renders while open and enabled (see `getDialog`), so the\n\t// input must not report it as expanded or point `aria-controls` at it\n\t// otherwise.\n\tconst getIsListboxRendered = useCallback(\n\t\t() => !isInputDisabled && getIsOpen(),\n\t\t[isInputDisabled, getIsOpen]\n\t);\n\tconst getListboxControlsId = () =>\n\t\tgetIsListboxRendered() ? `${getId()}-listbox` : undefined;\n\n\t// ARIA 1.2 combobox role and state for the input. `popupId` is the id of the\n\t// rendered popup, or `undefined` while it isn't rendered.\n\tconst getComboboxAriaProps = (\n\t\tpopup: 'listbox' | 'dialog',\n\t\tpopupId: string | undefined\n\t) => ({\n\t\t'aria-controls': popupId,\n\t\t'aria-expanded': !!popupId,\n\t\t'aria-haspopup': popup,\n\t\trole: 'combobox',\n\t});\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (getIsListboxRendered()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tgetIsListboxRendered,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\t// `onRenderMenuItem` and `menuItem` are deprecated: they take a component instead of a function\n\tconst LegacyMenuItem = onRenderMenuItem || menuItem;\n\tlet renderMenuItem:\n\t\t((data: ComboboxMenuRenderMenuItemData) => ReactNode) | undefined;\n\tif (renderMenuItemProp) {\n\t\trenderMenuItem = (data) => renderMenuItemProp({ ...data, assistiveText });\n\t} else if (LegacyMenuItem) {\n\t\trenderMenuItem = ({ isSelected, option }) => (\n\t\t\t<LegacyMenuItem\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tselected={isSelected}\n\t\t\t\toption={option}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\trenderMenuItem={renderMenuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\trenderMenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// The `input` element's props are spread last so they win, except `onChange`: `Input`'s\n\t// is `(event, data)` and InnerInput's is native, so call it alongside the combobox's own.\n\tconst { onChange: inputOnChange, ...userDefinedInputProps } = (input?.props ??\n\t\t{}) as Partial<InputProps> & Record<string, unknown>;\n\tconst handleInnerInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tinputOnChange?.(event, { value: event.target.value });\n\t\t\thandleInputChange(event);\n\t\t},\n\t\t[inputOnChange, handleInputChange]\n\t);\n\t// The single-selection variants ignore typing once an option is selected\n\tconst handleInnerInputChangeWhileUnselected = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\tinputOnChange?.(event, { value: event.target.value });\n\t\t\tif (!selection.length) {\n\t\t\t\thandleInputChange(event);\n\t\t\t}\n\t\t},\n\t\t[inputOnChange, handleInputChange, selection.length]\n\t);\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\tonChange={handleInnerInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\tonChange={handleInnerInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? getOptionLabel(selection[0])\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={handleInnerInputChangeWhileUnselected}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? getOptionLabel(activeOption) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverProps = customPopoverProps;\n\t\t// Popover renders its dialog as `${id}-popover`, and `popover` props may\n\t\t// override the id.\n\t\tconst popoverId = (popover?.props as { id?: string } | undefined)?.id;\n\t\tconst popoverControlsId = getIsOpen()\n\t\t\t? `${popoverId ?? getId()}-popover`\n\t\t\t: undefined;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from customPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\t{...getComboboxAriaProps('dialog', popoverControlsId)}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpen(event)}\n\t\t\t\t\t\t\t\tonChange={handleInnerInputChange}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: getOptionLabel(selection[0]) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={handleInnerInputChangeWhileUnselected}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = getOptionLabel(activeOption);\n\t\tconst selectedOptionLabel = getOptionLabel(selection[0]);\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t{...getComboboxAriaProps('listbox', getListboxControlsId())}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={isInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => requestOpenMenu(event)}\n\t\t\t\t\t\t\tonChange={handleInnerInputChangeWhileUnselected}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Combobox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,IAAI,GACE,KAAkB,OAAO,WAAa,KA8GtC,KAAc,OAAO,YAAY,GAMjC,MAAmB,MACxB,MAAe,GAEV,MACL,GACA,OACoB;CACpB,IAAI,EAAK,MAAM;CACf,MAAM,EAAK;CACX,OAAO,EAAK;CACZ,UAAU,EAAK;CACf;EACC,KAAc;AAChB,IAiKM,KAAwD;CAC7D,OAAO;CACP,kBAAkB;CAClB,sBAAsB;CACtB,cAA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AC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,CACD;;EACD,CAAA,CACD;CAEL,CAAA,IAAA;AAEF;AAEA,GAAS,cAAc"}
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import e from "../utilities/UNSAFE_direction/private/language-direction.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
4
|
-
import { forwardRef as r, useRef as i } from "react";
|
|
5
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import t from "./combobox.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
4
|
//#region components/combobox/index.tsx
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
s.current?.handleClickOutside && s.current.handleClickOutside(e);
|
|
11
|
-
}, {
|
|
12
|
-
enabled: !0,
|
|
13
|
-
ignoreClass: "ignore-react-onclickoutside"
|
|
14
|
-
}), /* @__PURE__ */ a("div", {
|
|
15
|
-
ref: o,
|
|
16
|
-
children: /* @__PURE__ */ a(n, { ...e })
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
o.displayName = "ComboboxWithClickOutside";
|
|
20
|
-
var s = e(o);
|
|
5
|
+
var r = (e) => /* @__PURE__ */ n("div", { children: /* @__PURE__ */ n(t, { ...e }) });
|
|
6
|
+
r.displayName = "ComboboxWithClickOutside";
|
|
7
|
+
var i = e(r);
|
|
21
8
|
//#endregion
|
|
22
|
-
export {
|
|
9
|
+
export { i as default };
|
|
23
10
|
|
|
24
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport type React from 'react';\nimport LanguageDirection from '../utilities/UNSAFE_direction/private/language-direction';\nimport Combobox, { type ComboboxProps } from './combobox';\n\nexport type {\n\tComboboxProps,\n\tComboboxActionItem,\n\tComboboxAssistiveText,\n\tComboboxLabels,\n\tComboboxEvents,\n\tComboboxRenderMenuItemData,\n} from './combobox';\nexport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxSeparatorOption,\n\tComboboxActionOption,\n\tComboboxActionOptionFields,\n\tComboboxDeselectOption,\n\tComboboxOptionIcon,\n\tComboboxOptionLabelRenderer,\n\tComboboxMenuRenderMenuItemData,\n} from './types';\n\n/**\n * Keeps the wrapping `div` that the v11 rewrite renders around Combobox. The\n * menu closes through the input's blur handler, and the popover variant through\n * Popover's own click-outside.\n */\nconst ComboboxWrapper = (props: ComboboxProps) => (\n\t<div>\n\t\t<Combobox {...props} />\n\t</div>\n);\n\nComboboxWrapper.displayName = 'ComboboxWithClickOutside';\n\n// Wrap with LanguageDirection for RTL support\nexport default LanguageDirection(\n\tComboboxWrapper\n) as unknown as React.FC<ComboboxProps>;\n"],"mappings":";;;;AAgCA,IAAM,KAAmB,MACxB,kBAAC,OAAD,EAAA,UACC,kBAAC,GAAD,EAAU,GAAI,EAAQ,CAAA,EAClB,CAAA;AAGN,EAAgB,cAAc;AAG9B,IAAA,IAAe,EACd,CACD"}
|
|
@@ -9,12 +9,12 @@ var c = (e, t) => {
|
|
|
9
9
|
if (!e || e.length === 0 || !t || t.length === 0) return e;
|
|
10
10
|
let r = e.toLowerCase().indexOf(t.toLowerCase());
|
|
11
11
|
return r > -1 ? /* @__PURE__ */ o(n.Fragment, { children: [
|
|
12
|
-
e.
|
|
12
|
+
e.slice(0, r),
|
|
13
13
|
/* @__PURE__ */ a("span", {
|
|
14
14
|
className: "slds-text-title_bold",
|
|
15
|
-
children: `${e.
|
|
15
|
+
children: `${e.slice(r, r + t.length)}`
|
|
16
16
|
}, "bold"),
|
|
17
|
-
e.
|
|
17
|
+
e.slice(r + t.length)
|
|
18
18
|
] }) : e;
|
|
19
19
|
}, l = (e, t) => e == null || typeof e == "string" ? e : e(t), u = (e) => e.props.size == null ? n.cloneElement(e, { size: "small" }) : e, d = (e) => typeof e?.label == "string" ? e.label : void 0, f = ({ activeOption: d, activeOptionIndex: f = -1, assistiveText: p = {}, classNameMenuSubHeader: m, classNameMenu: h, inheritWidthOf: g, inputId: _, inputValue: v = "", isSelected: y, itemVisibleLength: b, labels: x, hasMenuSpinner: S, maxWidth: C, menuPosition: w, menuRef: T, renderMenuItem: E, onSelect: D, options: O, selection: k, tooltipMenuItemDisabled: A, variant: j = "icon-title-subtitle" }) => {
|
|
20
20
|
let M = g === "menu" ? "inherit" : void 0;
|