@salesforce/design-system-react 11.0.0-alpha.7 → 11.0.0-alpha.9
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/dist/cjs/components/accordion/index.cjs +1 -1
- package/dist/cjs/components/accordion/index.cjs.map +1 -1
- package/dist/cjs/components/alert/container.cjs +1 -1
- package/dist/cjs/components/alert/container.cjs.map +1 -1
- package/dist/cjs/components/avatar/index.cjs +1 -1
- package/dist/cjs/components/avatar/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/check-props.cjs +2 -0
- package/dist/cjs/components/button-stateful/check-props.cjs.map +1 -0
- package/dist/cjs/components/button-stateful/component.cjs +2 -0
- package/dist/cjs/components/button-stateful/component.cjs.map +1 -0
- 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/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/check-props.cjs +1 -1
- package/dist/cjs/components/color-picker/check-props.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/color-picker-tabs.cjs +2 -0
- package/dist/cjs/components/color-picker/private/color-picker-tabs.cjs.map +1 -0
- 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/combobox/check-props.cjs +1 -1
- package/dist/cjs/components/combobox/check-props.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/date-picker/check-props.cjs +1 -1
- package/dist/cjs/components/date-picker/check-props.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/index.cjs.map +1 -1
- package/dist/cjs/components/date-picker/private/calendar-wrapper.cjs.map +1 -1
- package/dist/cjs/components/expandable-section/index.cjs +1 -1
- package/dist/cjs/components/expandable-section/index.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/input-icon/index.cjs +1 -1
- package/dist/cjs/components/icon/input-icon/index.cjs.map +1 -1
- package/dist/cjs/components/index.cjs +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 +1 -1
- package/dist/cjs/components/input/index.cjs.map +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs +1 -1
- package/dist/cjs/components/input/private/inner-input.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/index.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/check-props.cjs +2 -0
- package/dist/cjs/components/modal/check-props.cjs.map +1 -0
- package/dist/cjs/components/modal/component.cjs +2 -0
- package/dist/cjs/components/modal/component.cjs.map +1 -0
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/popover/component.cjs +2 -0
- package/dist/cjs/components/popover/component.cjs.map +1 -0
- package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
- package/dist/cjs/components/popover/edit-dialog.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/radio/check-props.cjs +1 -1
- package/dist/cjs/components/radio/check-props.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-button-group/index.cjs.map +1 -1
- package/dist/cjs/components/radio-button-group/radio.cjs.map +1 -1
- package/dist/cjs/components/radio-group/check-props.cjs +2 -0
- package/dist/cjs/components/radio-group/check-props.cjs.map +1 -0
- package/dist/cjs/components/radio-group/component.cjs +2 -0
- package/dist/cjs/components/radio-group/component.cjs.map +1 -0
- package/dist/cjs/components/radio-group/index.cjs +1 -1
- package/dist/cjs/components/radio-group/index.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs +1 -1
- package/dist/cjs/components/setup-assistant/step.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs +1 -1
- package/dist/cjs/components/simple-data-table/check-props.cjs.map +1 -1
- package/dist/cjs/components/simple-data-table/column.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/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/row.cjs +1 -1
- package/dist/cjs/components/simple-data-table/private/row.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +1 -1
- package/dist/cjs/components/slider/check-props.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/check-props.cjs +2 -0
- package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
- package/dist/cjs/components/spinner/component.cjs +2 -0
- package/dist/cjs/components/spinner/component.cjs.map +1 -0
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/index.cjs +1 -1
- package/dist/cjs/components/split-view/index.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox-check-props.cjs +1 -1
- package/dist/cjs/components/split-view/listbox-check-props.cjs.map +1 -1
- package/dist/cjs/components/split-view/listbox.cjs +1 -1
- package/dist/cjs/components/split-view/listbox.cjs.map +1 -1
- package/dist/cjs/components/tabs/check-props.cjs +2 -0
- package/dist/cjs/components/tabs/check-props.cjs.map +1 -0
- package/dist/cjs/components/tabs/component.cjs +2 -0
- package/dist/cjs/components/tabs/component.cjs.map +1 -0
- package/dist/cjs/components/tabs/index.cjs +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/tabs/panel.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/container.cjs +1 -1
- package/dist/cjs/components/toast/container.cjs.map +1 -1
- package/dist/cjs/components/tooltip/index.cjs +2 -2
- package/dist/cjs/components/tooltip/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/private/branch.cjs +1 -1
- package/dist/cjs/components/tree/private/branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs +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/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/check-props.cjs +2 -0
- package/dist/cjs/components/vertical-navigation/check-props.cjs.map +1 -0
- package/dist/cjs/components/vertical-navigation/component.cjs +2 -0
- package/dist/cjs/components/vertical-navigation/component.cjs.map +1 -0
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs +1 -1
- package/dist/cjs/components/welcome-mat/info-badge.cjs.map +1 -1
- package/dist/cjs/utilities/hooks/index.cjs +1 -1
- package/dist/cjs/utilities/hooks/use-controllable-state.cjs +2 -0
- package/dist/cjs/utilities/hooks/use-controllable-state.cjs.map +1 -0
- package/dist/cjs/utilities/warning/required-property.cjs +2 -0
- package/dist/cjs/utilities/warning/required-property.cjs.map +1 -0
- package/dist/es/components/accordion/index.js +10 -8
- package/dist/es/components/accordion/index.js.map +1 -1
- package/dist/es/components/alert/container.js +1 -1
- package/dist/es/components/alert/container.js.map +1 -1
- package/dist/es/components/avatar/index.js +2 -1
- package/dist/es/components/avatar/index.js.map +1 -1
- package/dist/es/components/button-stateful/check-props.js +14 -0
- package/dist/es/components/button-stateful/check-props.js.map +1 -0
- package/dist/es/components/button-stateful/component.js +20 -0
- package/dist/es/components/button-stateful/component.js.map +1 -0
- package/dist/es/components/button-stateful/index.js +102 -94
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +112 -130
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/checkbox/check-props.js +14 -8
- package/dist/es/components/checkbox/check-props.js.map +1 -1
- package/dist/es/components/checkbox/index.js +40 -33
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/check-props.js +16 -11
- package/dist/es/components/color-picker/check-props.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +185 -169
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/color-picker/private/color-picker-tabs.js +17 -0
- package/dist/es/components/color-picker/private/color-picker-tabs.js.map +1 -0
- package/dist/es/components/color-picker/private/hsv-color.js +1 -0
- package/dist/es/components/color-picker/private/hsv-color.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +15 -14
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +401 -401
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/index.js +4 -4
- package/dist/es/components/date-picker/check-props.js +15 -9
- package/dist/es/components/date-picker/check-props.js.map +1 -1
- package/dist/es/components/date-picker/date-picker.js +144 -138
- package/dist/es/components/date-picker/date-picker.js.map +1 -1
- package/dist/es/components/date-picker/index.js.map +1 -1
- package/dist/es/components/date-picker/private/calendar-wrapper.js.map +1 -1
- package/dist/es/components/expandable-section/index.js +32 -26
- package/dist/es/components/expandable-section/index.js.map +1 -1
- package/dist/es/components/filter/filter.js +1 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/icon/input-icon/index.js +7 -2
- package/dist/es/components/icon/input-icon/index.js.map +1 -1
- package/dist/es/components/index.js +3 -3
- package/dist/es/components/input/check-props.js +19 -17
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/index.js +153 -156
- package/dist/es/components/input/index.js.map +1 -1
- package/dist/es/components/input/private/inner-input.js +18 -18
- package/dist/es/components/input/private/inner-input.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js +7 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +294 -269
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/check-props.js +22 -0
- package/dist/es/components/modal/check-props.js.map +1 -0
- package/dist/es/components/modal/component.js +35 -0
- package/dist/es/components/modal/component.js.map +1 -0
- package/dist/es/components/modal/index.js +118 -104
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/popover/component.js +59 -0
- package/dist/es/components/popover/component.js.map +1 -0
- package/dist/es/components/popover/edit-dialog.js +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +241 -193
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/radio/check-props.js +8 -8
- package/dist/es/components/radio/check-props.js.map +1 -1
- package/dist/es/components/radio/index.js +15 -13
- package/dist/es/components/radio/index.js.map +1 -1
- package/dist/es/components/radio-button-group/index.js.map +1 -1
- package/dist/es/components/radio-button-group/radio.js.map +1 -1
- package/dist/es/components/radio-group/check-props.js +14 -0
- package/dist/es/components/radio-group/check-props.js.map +1 -0
- package/dist/es/components/radio-group/component.js +21 -0
- package/dist/es/components/radio-group/component.js.map +1 -0
- package/dist/es/components/radio-group/index.js +62 -38
- package/dist/es/components/radio-group/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js +5 -4
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +7 -6
- package/dist/es/components/simple-data-table/check-props.js.map +1 -1
- package/dist/es/components/simple-data-table/column.js.map +1 -1
- package/dist/es/components/simple-data-table/index.js +67 -49
- package/dist/es/components/simple-data-table/index.js.map +1 -1
- package/dist/es/components/simple-data-table/private/head.js +1 -1
- package/dist/es/components/simple-data-table/private/head.js.map +1 -1
- package/dist/es/components/simple-data-table/private/header-cell.js +50 -52
- package/dist/es/components/simple-data-table/private/header-cell.js.map +1 -1
- package/dist/es/components/simple-data-table/private/row.js +43 -57
- package/dist/es/components/simple-data-table/private/row.js.map +1 -1
- package/dist/es/components/slider/check-props.js +14 -12
- package/dist/es/components/slider/check-props.js.map +1 -1
- package/dist/es/components/slider/index.js +71 -62
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/spinner/check-props.js +13 -0
- package/dist/es/components/spinner/check-props.js.map +1 -0
- package/dist/es/components/spinner/component.js +17 -0
- package/dist/es/components/spinner/component.js.map +1 -0
- package/dist/es/components/spinner/index.js +43 -29
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/split-view/index.js +23 -22
- package/dist/es/components/split-view/index.js.map +1 -1
- package/dist/es/components/split-view/listbox-check-props.js +10 -2
- package/dist/es/components/split-view/listbox-check-props.js.map +1 -1
- package/dist/es/components/split-view/listbox.js +67 -50
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/tabs/check-props.js +15 -0
- package/dist/es/components/tabs/check-props.js.map +1 -0
- package/dist/es/components/tabs/component.js +28 -0
- package/dist/es/components/tabs/component.js.map +1 -0
- package/dist/es/components/tabs/index.js +84 -69
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/tabs/panel.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 +3 -2
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/container.js +1 -1
- package/dist/es/components/toast/container.js.map +1 -1
- package/dist/es/components/tooltip/index.js +120 -109
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +14 -9
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/private/branch.js +38 -35
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js +6 -8
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js +9 -10
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js +128 -93
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/vertical-navigation/check-props.js +13 -0
- package/dist/es/components/vertical-navigation/check-props.js.map +1 -0
- package/dist/es/components/vertical-navigation/component.js +27 -0
- package/dist/es/components/vertical-navigation/component.js.map +1 -0
- package/dist/es/components/vertical-navigation/index.js +28 -26
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js +51 -50
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/es/components/welcome-mat/info-badge.js +14 -4
- package/dist/es/components/welcome-mat/info-badge.js.map +1 -1
- package/dist/es/utilities/hooks/index.js +2 -1
- package/dist/es/utilities/hooks/use-controllable-state.js +20 -0
- package/dist/es/utilities/hooks/use-controllable-state.js.map +1 -0
- package/dist/es/utilities/warning/required-property.js +15 -0
- package/dist/es/utilities/warning/required-property.js.map +1 -0
- package/dist/types/components/accordion/index.d.ts.map +1 -1
- package/dist/types/components/avatar/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/check-props.d.ts +3 -0
- package/dist/types/components/button-stateful/check-props.d.ts.map +1 -0
- package/dist/types/components/button-stateful/index.d.ts +34 -6
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +26 -7
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/checkbox/check-props.d.ts +1 -0
- package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +38 -9
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/check-props.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +50 -11
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/index.d.ts +2 -2
- package/dist/types/components/color-picker/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts +14 -0
- package/dist/types/components/color-picker/private/color-picker-tabs.d.ts.map +1 -0
- package/dist/types/components/color-picker/private/hsv-color.d.ts.map +1 -1
- package/dist/types/components/color-picker/types.d.ts +9 -5
- package/dist/types/components/color-picker/types.d.ts.map +1 -1
- package/dist/types/components/combobox/check-props.d.ts.map +1 -1
- package/dist/types/components/combobox/combobox.d.ts +41 -6
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/date-picker/check-props.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +52 -17
- package/dist/types/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/types/components/date-picker/index.d.ts +1 -1
- package/dist/types/components/date-picker/index.d.ts.map +1 -1
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts +3 -1
- package/dist/types/components/date-picker/private/calendar-wrapper.d.ts.map +1 -1
- package/dist/types/components/expandable-section/index.d.ts +15 -3
- package/dist/types/components/expandable-section/index.d.ts.map +1 -1
- package/dist/types/components/icon/input-icon/index.d.ts.map +1 -1
- package/dist/types/components/input/check-props.d.ts.map +1 -1
- package/dist/types/components/input/index.d.ts +10 -4
- package/dist/types/components/input/index.d.ts.map +1 -1
- package/dist/types/components/input/private/inner-input.d.ts +2 -4
- package/dist/types/components/input/private/inner-input.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +78 -15
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/check-props.d.ts +3 -0
- package/dist/types/components/modal/check-props.d.ts.map +1 -0
- package/dist/types/components/modal/index.d.ts +21 -13
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/popover/index.d.ts +1 -1
- package/dist/types/components/popover/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +54 -17
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/radio/check-props.d.ts.map +1 -1
- package/dist/types/components/radio/index.d.ts +42 -9
- package/dist/types/components/radio/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/index.d.ts +20 -10
- package/dist/types/components/radio-button-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-button-group/radio.d.ts +7 -2
- package/dist/types/components/radio-button-group/radio.d.ts.map +1 -1
- package/dist/types/components/radio-group/check-props.d.ts +3 -0
- package/dist/types/components/radio-group/check-props.d.ts.map +1 -0
- package/dist/types/components/radio-group/index.d.ts +51 -8
- package/dist/types/components/radio-group/index.d.ts.map +1 -1
- package/dist/types/components/radio-group/radio.d.ts +7 -2
- package/dist/types/components/radio-group/radio.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +10 -2
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/check-props.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/column.d.ts +4 -1
- package/dist/types/components/simple-data-table/column.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/index.d.ts +10 -2
- package/dist/types/components/simple-data-table/index.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/header-cell.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/private/row.d.ts +4 -2
- package/dist/types/components/simple-data-table/private/row.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/types.d.ts +40 -13
- package/dist/types/components/simple-data-table/types.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +32 -17
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/spinner/check-props.d.ts +3 -0
- package/dist/types/components/spinner/check-props.d.ts.map +1 -0
- package/dist/types/components/spinner/index.d.ts +18 -9
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/split-view/index.d.ts +12 -3
- package/dist/types/components/split-view/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox-check-props.d.ts +1 -0
- package/dist/types/components/split-view/listbox-check-props.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts +41 -10
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/tabs/check-props.d.ts +3 -0
- package/dist/types/components/tabs/check-props.d.ts.map +1 -0
- package/dist/types/components/tabs/index.d.ts +46 -12
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/tabs/panel.d.ts +4 -0
- package/dist/types/components/tabs/panel.d.ts.map +1 -1
- package/dist/types/components/textarea/check-props.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +14 -6
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/container.d.ts +1 -1
- package/dist/types/components/tooltip/index.d.ts +49 -3
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts +1 -0
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/private/branch.d.ts +6 -1
- package/dist/types/components/tree/private/branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/item.d.ts +3 -1
- package/dist/types/components/tree/private/item.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-branch.d.ts +3 -1
- package/dist/types/components/tree/private/render-branch.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +41 -10
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/tree/types.d.ts +23 -4
- package/dist/types/components/tree/types.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/check-props.d.ts +1 -0
- package/dist/types/components/vertical-navigation/check-props.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +16 -11
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +5 -6
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/info-badge.d.ts.map +1 -1
- package/dist/types/types/components.d.ts +0 -2
- package/dist/types/types/components.d.ts.map +1 -1
- package/dist/types/utilities/hooks/index.d.ts +1 -0
- package/dist/types/utilities/hooks/index.d.ts.map +1 -1
- package/dist/types/utilities/hooks/use-controllable-state.d.ts +23 -0
- package/dist/types/utilities/hooks/use-controllable-state.d.ts.map +1 -0
- package/dist/types/utilities/warning/required-property.d.ts +3 -0
- package/dist/types/utilities/warning/required-property.d.ts.map +1 -0
- package/package.json +1 -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';\nimport isFunction from 'lodash.isfunction';\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, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n\ttype MenuRenderMenuItemData,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\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';\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\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\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\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?: ReactNode;\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 MenuRenderMenuItemData {\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/** Default input value for uncontrolled usage */\n\tdefaultValue?: string;\n\t/** Whether component is disabled */\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/** Custom input component */\n\tinput?: ReactElement;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/** Whether the dropdown is open (controlled) */\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/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Input value (controlled) */\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/** Listbox variants. Defaults to `base`. */\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/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\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\nconst defaultEvents: ComboboxEvents = {};\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\tdefaultValue,\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\tconst events = assign({}, defaultEvents, 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\tconst [isOpenState, setIsOpenState] = useState(\n\t\ttypeof isOpenProp === 'boolean' ? isOpenProp : false\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\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\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\tconst handleClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t\tsetIsOpenState(false);\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 (events.onClose) {\n\t\t\t\t\tevents.onClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, variant, popover, events]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tisFunction(currentOpenDropdown.handleClose)\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\t\tsetIsOpenState(true);\n\n\t\t\t\tif (events.onOpen) {\n\t\t\t\t\tevents.onOpen(event, data || {});\n\t\t\t\t}\n\n\t\t\t\tif (variant === 'readonly') {\n\t\t\t\t\tconst opts = getOptions();\n\t\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleClose, events, variant, getOptions, selection]\n\t);\n\n\tconst handleRequestClose = useCallback(\n\t\t(event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\t\tif (events.onRequestClose) {\n\t\t\t\tevents.onRequestClose(event, data);\n\t\t\t}\n\t\t\tif (getIsOpen()) {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t}\n\t\t},\n\t\t[events, getIsOpen, handleClose]\n\t);\n\n\tconst openDialog = useCallback(() => {\n\t\tif (events.onRequestOpen) {\n\t\t\tevents.onRequestOpen();\n\t\t} else {\n\t\t\tsetIsOpenState(true);\n\t\t}\n\t}, [events]);\n\n\tconst requestOpenMenu = useCallback(() => {\n\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\tif (\n\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\tmultiple ||\n\t\t\tvariant === 'readonly'\n\t\t) {\n\t\t\topenDialog();\n\t\t}\n\t}, [multiple, selection.length, variant, openDialog]);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t\t},\n\t\t[handleRequestClose]\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\tevents.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: inputRef.current?.value ?? '',\n\t\t\t\t});\n\t\t\t\thandleClose();\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 (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\thandleClose();\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, handleClose]\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\thandleClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, handleClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu();\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\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 (!isOpenState) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\topenDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandleRequestClose(event, {});\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\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.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\tisOpenState,\n\t\t\topenDialog,\n\t\t\thandleRequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\tevents,\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\topenDialog();\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[openDialog, 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\tkeyCode: event.keyCode,\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: handleClose 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\thandleClose,\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 (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.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, events]\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// Sync controlled isOpen prop\n\tuseEffect(() => {\n\t\tif (typeof isOpenProp === 'boolean') {\n\t\t\tsetIsOpenState(isOpenProp);\n\t\t\tif (!isOpenProp) {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [isOpenProp]);\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 === handleClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [handleClose]);\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\thandleClose(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={\n\t\t\t\t\t\t\thandleClose as unknown as (\n\t\t\t\t\t\t\t\tevent: React.MouseEvent<HTMLButtonElement>\n\t\t\t\t\t\t\t) => void\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\tclassName: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tfooterClassName: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen: isOpenState,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonRequestClose: handleClose,\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\thandleClose,\n\t\t\tisOpenState,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\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\tonClose: handleClose,\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\tdisabled,\n\t\t\tgetIsOpen,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleClose,\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: ((data: MenuRenderMenuItemData) => 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// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\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\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\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={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || 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\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\tdefaultValue={defaultValue}\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\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={() => openDialog()}\n\t\t\t\t\t\tonChange={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\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || 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? (selection[0].label as string)\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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={singleInputDisabled}\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={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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? (activeOption?.label as string) || 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\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\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\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\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\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={() => openDialog()}\n\t\t\t\t\t\t\t\tonChange={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\trole=\"textbox\"\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: (selection[0]?.label as string) || '';\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\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={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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 = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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={singleInputDisabled}\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={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAI,GACE,KAAkB,OAAO,WAAa,KAuFtC,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,IAmIM,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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IAAD,EAEwB,0BACvB,CAAA,IACE;GACH,KAAkB,GAAgB,IAAI,GAAW,KAAK,SAAS;EAC5D;;CAGN,OAAO,KACN,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACC,kBAAC,IAAD;GAEE;GAED,SAAS,EAAM;GACf,OAAO,EAAO;GACJ;EACV,CAAA,GACD,kBAAC,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
|
+
{"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, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n\ttype MenuRenderMenuItemData,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\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 } 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?: ReactNode;\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 MenuRenderMenuItemData {\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/** Whether component is disabled */\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/** Custom input component */\n\tinput?: ReactElement;\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/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\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/** Listbox variants. Defaults to `base`. */\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/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\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\nconst defaultEvents: ComboboxEvents = {};\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\tconst events = assign({}, defaultEvents, 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\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 (events.onRequestClose) {\n\t\t\t\t\tevents.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, events, 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 (events.onOpen) {\n\t\t\t\tevents.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, events, 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 (events.onRequestOpen) {\n\t\t\t\t\tevents.onRequestOpen(event, {});\n\t\t\t\t}\n\t\t\t\tsetIsOpen(true);\n\t\t\t}\n\t\t},\n\t\t[isOpen, events, 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\tevents.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 (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\trequestClose(event);\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, requestClose, value]\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 (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, requestClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu(event);\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\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\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.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\tevents,\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\tkeyCode: event.keyCode,\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 (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.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, events]\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 (events.onClose) {\n\t\t\t\t\tevents.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\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\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\tdisabled,\n\t\t\tgetIsOpen,\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: ((data: MenuRenderMenuItemData) => 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// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\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\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\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={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\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || 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\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\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={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\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || 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? (selection[0].label as string)\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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={singleInputDisabled}\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={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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? (activeOption?.label as string) || 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\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\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\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\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\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={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\trole=\"textbox\"\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: (selection[0]?.label as string) || '';\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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\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={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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 = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\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\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\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\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\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={singleInputDisabled}\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={(event: React.ChangeEvent<HTMLInputElement>) => {\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\trole=\"textbox\"\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,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,IAkJM,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,GAEM,KAAgC,CAAC,GAIjC,MAAqC,OAAU;CACpD,IAAM,EACL,eAAe,KAAoB,CAAC,GACpC,oBAAoB,IACpB,cACA,wBACA,mBACA,4BACA,mBACA,cACA,oBACA,cACA,QAAQ,KAAa,CAAC,GACtB,2BACA,iBACA,qBACA,oBACA,wBACA,IAAI,IACJ,qBAAiB,UACjB,WACA,UAAU,IACV,QAAQ,IACR,QAAQ,KAAa,CAAC,GACtB,2BACA,kBACA,mBAAe,YACf,aACA,sBACA,aAAU,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,GAC7C,IAAS,GAAO,CAAC,GAAG,IAAe,EAAU,GAG7C,KA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SAFE_direction/private/language-direction.js";
|
|
2
|
-
import t from "
|
|
3
|
-
import n from "
|
|
2
|
+
import t from "../../utilities/hooks/use-click-outside.js";
|
|
3
|
+
import n from "./combobox.js";
|
|
4
4
|
import { forwardRef as r, useRef as i } from "react";
|
|
5
5
|
import { jsx as a } from "react/jsx-runtime";
|
|
6
6
|
//#region components/combobox/index.tsx
|
|
7
7
|
var o = r((e, r) => {
|
|
8
8
|
let o = i(null), s = i(null);
|
|
9
|
-
return
|
|
9
|
+
return t(o, (e) => {
|
|
10
10
|
s.current?.handleClickOutside && s.current.handleClickOutside(e);
|
|
11
11
|
}, {
|
|
12
12
|
enabled: !0,
|
|
13
13
|
ignoreClass: "ignore-react-onclickoutside"
|
|
14
14
|
}), /* @__PURE__ */ a("div", {
|
|
15
15
|
ref: o,
|
|
16
|
-
children: /* @__PURE__ */ a(
|
|
16
|
+
children: /* @__PURE__ */ a(n, { ...e })
|
|
17
17
|
});
|
|
18
18
|
});
|
|
19
19
|
o.displayName = "ComboboxWithClickOutside";
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import e from "../../utilities/
|
|
2
|
-
import t from "../../utilities/
|
|
1
|
+
import e from "../../utilities/warning/sunset-property.js";
|
|
2
|
+
import t from "../../utilities/get-component-doc.js";
|
|
3
|
+
import n from "../../utilities/warning/deprecated-property.js";
|
|
4
|
+
import r from "../../utilities/warning/required-property.js";
|
|
5
|
+
import i from "warning";
|
|
3
6
|
//#region components/date-picker/check-props.js
|
|
4
|
-
var
|
|
5
|
-
process.env.NODE_ENV !== "production"
|
|
6
|
-
let
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
var a = function() {};
|
|
8
|
+
if (process.env.NODE_ENV !== "production") {
|
|
9
|
+
let o = !1;
|
|
10
|
+
a = function(a, s, c) {
|
|
11
|
+
let l = t(c);
|
|
12
|
+
o ||= (i(s.value !== void 0, `[Design System React] \`value\` is required by ${a}. DatePicker is controlled: pass a \`Date\` (or \`null\` for no date) and update it in \`onChange\`. A missing \`value\` is treated as \`null\`.`), s.value === void 0), r(a, s.onChange !== void 0 || !!s.disabled, "onChange", `DatePicker is controlled: without \`onChange\`, picking a date does nothing. Update \`value\` from \`data.date\` in \`onChange\`, or set \`disabled\`. ${l("onChange")}`), e(a, s.formattedValue, "formattedValue", "DatePicker is controlled: pass `value` (a `Date`, or `null`) and update it in `onChange`. The input text is derived from `value` with `formatter`."), n(a, s.children, "children", "input", `Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${l("input")}`), n(a, s.onFocus, "onFocus", void 0, `Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${l("input")}`), n(a, s.onBlur, "onBlur", void 0, `Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${l("input")}`), n(a, s.abbrWeekDayLabels, "abbrWeekDayLabels", "abbreviatedWeekDayLabels", `Prop name has changed. ${l("labels")}`), n(a, s.onDateChange, "onDateChange", "onChange", `Please see prop description for \`onChange\`. Parameters have changed. The callback receives an event and a data object of the shape: \`{date: [Date object], formattedDate: [string], timezoneOffset: [number]}\` ${l("onChange")}`), n(a, s.onKeyDown, "onKeyDown", void 0, `Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${l("input")}`), n(a, s.onFocus, "required", void 0, `Please see children prop description and add your own \`Input\` as a child of Datepicker. ${l("children")}`), n(a, s.strValue, "strValue", "value", l("value")), n(a, s.isInline, "isInline", "menuPosition=\"relative\"", l("menuPosition"));
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var o = a;
|
|
10
16
|
//#endregion
|
|
11
|
-
export {
|
|
17
|
+
export { o as default };
|
|
12
18
|
|
|
13
19
|
//# sourceMappingURL=check-props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/date-picker/check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n/* eslint-disable max-len */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.children,\n\t\t\t'children',\n\t\t\t'input',\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onFocus,\n\t\t\t'onFocus',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onBlur,\n\t\t\t'onBlur',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.abbrWeekDayLabels,\n\t\t\t'abbrWeekDayLabels',\n\t\t\t'abbreviatedWeekDayLabels',\n\t\t\t`Prop name has changed. ${createDocUrl('labels')}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onDateChange,\n\t\t\t'onDateChange',\n\t\t\t'onChange',\n\t\t\t`Please see prop description for \\`onChange\\`. Parameters have changed. The callback receives an event and a data object of the shape: \\`{date: [Date object], formattedDate: [string], timezoneOffset: [number]}\\` ${createDocUrl(\n\t\t\t\t'onChange'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onKeyDown,\n\t\t\t'onKeyDown',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onFocus,\n\t\t\t'required',\n\t\t\tundefined,\n\t\t\t`Please see children prop description and add your own \\`Input\\` as a child of Datepicker. ${createDocUrl(\n\t\t\t\t'children'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.strValue,\n\t\t\t'strValue',\n\t\t\t'
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/date-picker/check-props.js"],"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/* eslint-disable import/no-mutable-exports */\n/* eslint-disable max-len */\n\nimport warning from 'warning';\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport requiredProperty from '../../utilities/warning/required-property';\nimport sunsetProperty from '../../utilities/warning/sunset-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tlet hasWarnedMissingValue = false;\n\n\tcheckProps = function checkPropsFunction(COMPONENT, props, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\tif (!hasWarnedMissingValue) {\n\t\t\twarning(\n\t\t\t\tprops.value !== undefined,\n\t\t\t\t`[Design System React] \\`value\\` is required by ${COMPONENT}. DatePicker is controlled: pass a \\`Date\\` (or \\`null\\` for no date) and update it in \\`onChange\\`. A missing \\`value\\` is treated as \\`null\\`.`\n\t\t\t);\n\t\t\thasWarnedMissingValue = props.value === undefined;\n\t\t}\n\n\t\trequiredProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onChange !== undefined || !!props.disabled,\n\t\t\t'onChange',\n\t\t\t`DatePicker is controlled: without \\`onChange\\`, picking a date does nothing. Update \\`value\\` from \\`data.date\\` in \\`onChange\\`, or set \\`disabled\\`. ${createDocUrl(\n\t\t\t\t'onChange'\n\t\t\t)}`\n\t\t);\n\n\t\tsunsetProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.formattedValue,\n\t\t\t'formattedValue',\n\t\t\t'DatePicker is controlled: pass `value` (a `Date`, or `null`) and update it in `onChange`. The input text is derived from `value` with `formatter`.'\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.children,\n\t\t\t'children',\n\t\t\t'input',\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onFocus,\n\t\t\t'onFocus',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onBlur,\n\t\t\t'onBlur',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.abbrWeekDayLabels,\n\t\t\t'abbrWeekDayLabels',\n\t\t\t'abbreviatedWeekDayLabels',\n\t\t\t`Prop name has changed. ${createDocUrl('labels')}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onDateChange,\n\t\t\t'onDateChange',\n\t\t\t'onChange',\n\t\t\t`Please see prop description for \\`onChange\\`. Parameters have changed. The callback receives an event and a data object of the shape: \\`{date: [Date object], formattedDate: [string], timezoneOffset: [number]}\\` ${createDocUrl(\n\t\t\t\t'onChange'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onKeyDown,\n\t\t\t'onKeyDown',\n\t\t\tundefined,\n\t\t\t`Please see \\`input\\` prop description and add your own \\`Input\\`. Props will be shallow merged. ${createDocUrl(\n\t\t\t\t'input'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.onFocus,\n\t\t\t'required',\n\t\t\tundefined,\n\t\t\t`Please see children prop description and add your own \\`Input\\` as a child of Datepicker. ${createDocUrl(\n\t\t\t\t'children'\n\t\t\t)}`\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.strValue,\n\t\t\t'strValue',\n\t\t\t'value',\n\t\t\tcreateDocUrl('value')\n\t\t);\n\n\t\tdeprecatedProperty(\n\t\t\tCOMPONENT,\n\t\t\tprops.isInline,\n\t\t\t'isInline',\n\t\t\t'menuPosition=\"relative\"',\n\t\t\tcreateDocUrl('menuPosition')\n\t\t);\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;;;;AAYA,IAAI,IAAa,WAA8B,CAAC;AAEhD,IAAA,QAAA,IAAA,aAA6B,cAAc;CAC1C,IAAI,IAAwB;CAE5B,IAAa,SAA4B,GAAW,GAAO,GAAS;EACnE,IAAM,IAAe,EAAkB,CAAO;EAsG9C,AApGA,AAKC,OAJA,EACC,EAAM,UAAU,KAAA,GAChB,kDAAkD,EAAU,iJAC7D,GACwB,EAAM,UAAU,KAAA,IAGzC,EACC,GACA,EAAM,aAAa,KAAA,KAAa,CAAC,CAAC,EAAM,UACxC,YACA,0JAA0J,EACzJ,UACD,GACD,GAEA,EACC,GACA,EAAM,gBACN,kBACA,oJACD,GAEA,EACC,GACA,EAAM,UACN,YACA,SACA,mGAAmG,EAClG,OACD,GACD,GAEA,EACC,GACA,EAAM,SACN,WACA,KAAA,GACA,mGAAmG,EAClG,OACD,GACD,GAEA,EACC,GACA,EAAM,QACN,UACA,KAAA,GACA,mGAAmG,EAClG,OACD,GACD,GAEA,EACC,GACA,EAAM,mBACN,qBACA,4BACA,0BAA0B,EAAa,QAAQ,GAChD,GAEA,EACC,GACA,EAAM,cACN,gBACA,YACA,sNAAsN,EACrN,UACD,GACD,GAEA,EACC,GACA,EAAM,WACN,aACA,KAAA,GACA,mGAAmG,EAClG,OACD,GACD,GAEA,EACC,GACA,EAAM,SACN,YACA,KAAA,GACA,6FAA6F,EAC5F,UACD,GACD,GAEA,EACC,GACA,EAAM,UACN,YACA,SACA,EAAa,OAAO,CACrB,GAEA,EACC,GACA,EAAM,UACN,YACA,6BACA,EAAa,cAAc,CAC5B;CACD;AACD;AAEA,IAAA,IAAe"}
|