@salesforce/design-system-react 11.0.0-alpha.5 → 11.0.0-alpha.6
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/avatar/index.cjs +1 -1
- package/dist/cjs/components/avatar/index.cjs.map +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs +1 -1
- package/dist/cjs/components/breadcrumb/index.cjs.map +1 -1
- package/dist/cjs/components/button/index.cjs +1 -1
- package/dist/cjs/components/button/index.cjs.map +1 -1
- package/dist/cjs/components/button-stateful/index.cjs +1 -1
- package/dist/cjs/components/button-stateful/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/index.cjs +1 -1
- package/dist/cjs/components/carousel/index.cjs.map +1 -1
- package/dist/cjs/components/carousel/private/carousel-item.cjs.map +1 -1
- package/dist/cjs/components/checkbox/index.cjs +1 -1
- package/dist/cjs/components/checkbox/index.cjs.map +1 -1
- package/dist/cjs/components/color-picker/color-picker.cjs.map +1 -1
- package/dist/cjs/components/combobox/add-subheadings.cjs +1 -1
- package/dist/cjs/components/combobox/add-subheadings.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/filter.cjs +1 -1
- package/dist/cjs/components/combobox/filter.cjs.map +1 -1
- package/dist/cjs/components/combobox/index.cjs.map +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs +1 -1
- package/dist/cjs/components/combobox/private/menu.cjs.map +1 -1
- package/dist/cjs/components/date-picker/check-props.cjs +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/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/search.cjs +1 -1
- package/dist/cjs/components/input/search.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/button-trigger.cjs.map +1 -1
- package/dist/cjs/components/menu-dropdown/check-props.cjs +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/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/pill-container/check-props.cjs +2 -0
- package/dist/cjs/components/pill-container/check-props.cjs.map +1 -0
- package/dist/cjs/components/pill-container/component.cjs +2 -0
- package/dist/cjs/components/pill-container/component.cjs.map +1 -0
- package/dist/cjs/components/pill-container/index.cjs +1 -1
- package/dist/cjs/components/pill-container/index.cjs.map +1 -1
- package/dist/cjs/components/popover/index.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/setup-assistant/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/row-actions.cjs +1 -1
- package/dist/cjs/components/simple-data-table/row-actions.cjs.map +1 -1
- 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/check-props.cjs +2 -0
- package/dist/cjs/components/split-view/check-props.cjs.map +1 -0
- package/dist/cjs/components/split-view/component.cjs +2 -0
- package/dist/cjs/components/split-view/component.cjs.map +1 -0
- package/dist/cjs/components/split-view/header.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.cjs.map +1 -1
- package/dist/cjs/components/tabs/index.cjs +1 -1
- package/dist/cjs/components/tabs/index.cjs.map +1 -1
- package/dist/cjs/components/textarea/check-props.cjs +2 -0
- package/dist/cjs/components/textarea/check-props.cjs.map +1 -0
- package/dist/cjs/components/textarea/component.cjs +2 -0
- package/dist/cjs/components/textarea/component.cjs.map +1 -0
- package/dist/cjs/components/textarea/index.cjs +1 -1
- package/dist/cjs/components/textarea/index.cjs.map +1 -1
- package/dist/cjs/components/toast/index.cjs +1 -1
- package/dist/cjs/components/toast/index.cjs.map +1 -1
- package/dist/cjs/components/tooltip/check-props.cjs +1 -1
- package/dist/cjs/components/tooltip/check-props.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.map +1 -1
- package/dist/cjs/components/tree/private/item.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-branch.cjs.map +1 -1
- package/dist/cjs/components/tree/private/render-initial-branch.cjs +1 -1
- package/dist/cjs/components/tree/private/render-initial-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/utilities/menu-list/index.cjs.map +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs +1 -1
- package/dist/cjs/components/utilities/menu-list/item.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/private/item.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/cjs/utilities/constants.cjs +1 -1
- package/dist/cjs/utilities/constants.cjs.map +1 -1
- package/dist/es/components/avatar/index.js +1 -1
- package/dist/es/components/avatar/index.js.map +1 -1
- package/dist/es/components/breadcrumb/index.js +1 -1
- package/dist/es/components/breadcrumb/index.js.map +1 -1
- package/dist/es/components/button/index.js +1 -1
- package/dist/es/components/button/index.js.map +1 -1
- package/dist/es/components/button-stateful/index.js +1 -1
- package/dist/es/components/button-stateful/index.js.map +1 -1
- package/dist/es/components/carousel/index.js +8 -12
- package/dist/es/components/carousel/index.js.map +1 -1
- package/dist/es/components/carousel/private/carousel-item.js.map +1 -1
- package/dist/es/components/checkbox/index.js +17 -17
- package/dist/es/components/checkbox/index.js.map +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/add-subheadings.js +2 -1
- package/dist/es/components/combobox/add-subheadings.js.map +1 -1
- package/dist/es/components/combobox/check-props.js +15 -5
- package/dist/es/components/combobox/check-props.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +193 -186
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/combobox/filter.js +1 -1
- package/dist/es/components/combobox/filter.js.map +1 -1
- package/dist/es/components/combobox/index.js.map +1 -1
- package/dist/es/components/combobox/private/menu.js +2 -0
- package/dist/es/components/combobox/private/menu.js.map +1 -1
- package/dist/es/components/date-picker/check-props.js +4 -4
- package/dist/es/components/date-picker/date-picker.js +149 -142
- 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/index.js +41 -43
- package/dist/es/components/input/check-props.js +17 -18
- package/dist/es/components/input/check-props.js.map +1 -1
- package/dist/es/components/input/search.js +1 -1
- package/dist/es/components/input/search.js.map +1 -1
- package/dist/es/components/menu-dropdown/button-trigger.js.map +1 -1
- package/dist/es/components/menu-dropdown/check-props.js +6 -6
- package/dist/es/components/menu-dropdown/index.js.map +1 -1
- package/dist/es/components/menu-dropdown/menu-dropdown.js +247 -250
- package/dist/es/components/menu-dropdown/menu-dropdown.js.map +1 -1
- package/dist/es/components/modal/index.js +104 -132
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/pill-container/check-props.js +13 -0
- package/dist/es/components/pill-container/check-props.js.map +1 -0
- package/dist/es/components/pill-container/component.js +31 -0
- package/dist/es/components/pill-container/component.js.map +1 -0
- package/dist/es/components/pill-container/index.js +65 -56
- package/dist/es/components/pill-container/index.js.map +1 -1
- package/dist/es/components/popover/index.js.map +1 -1
- package/dist/es/components/popover/popover.js +63 -62
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/setup-assistant/index.js.map +1 -1
- package/dist/es/components/setup-assistant/step.js +1 -1
- package/dist/es/components/setup-assistant/step.js.map +1 -1
- package/dist/es/components/simple-data-table/check-props.js +4 -4
- package/dist/es/components/simple-data-table/row-actions.js +2 -2
- package/dist/es/components/simple-data-table/row-actions.js.map +1 -1
- package/dist/es/components/spinner/index.js +1 -1
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/split-view/check-props.js +13 -0
- package/dist/es/components/split-view/check-props.js.map +1 -0
- package/dist/es/components/split-view/component.js +46 -0
- package/dist/es/components/split-view/component.js.map +1 -0
- package/dist/es/components/split-view/header.js.map +1 -1
- package/dist/es/components/split-view/index.js +40 -34
- package/dist/es/components/split-view/index.js.map +1 -1
- package/dist/es/components/split-view/listbox.js.map +1 -1
- package/dist/es/components/tabs/index.js +64 -64
- package/dist/es/components/tabs/index.js.map +1 -1
- package/dist/es/components/textarea/check-props.js +17 -0
- package/dist/es/components/textarea/check-props.js.map +1 -0
- package/dist/es/components/textarea/component.js +27 -0
- package/dist/es/components/textarea/component.js.map +1 -0
- package/dist/es/components/textarea/index.js +50 -46
- package/dist/es/components/textarea/index.js.map +1 -1
- package/dist/es/components/toast/index.js +18 -12
- package/dist/es/components/toast/index.js.map +1 -1
- package/dist/es/components/tooltip/check-props.js +9 -23
- package/dist/es/components/tooltip/check-props.js.map +1 -1
- package/dist/es/components/tooltip/index.js +70 -70
- package/dist/es/components/tooltip/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +6 -6
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/private/branch.js.map +1 -1
- package/dist/es/components/tree/private/item.js.map +1 -1
- package/dist/es/components/tree/private/render-branch.js.map +1 -1
- package/dist/es/components/tree/private/render-initial-branch.js +5 -2
- package/dist/es/components/tree/private/render-initial-branch.js.map +1 -1
- package/dist/es/components/tree/tree.js +60 -35
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/utilities/menu-list/index.js.map +1 -1
- package/dist/es/components/utilities/menu-list/item.js +1 -1
- package/dist/es/components/utilities/menu-list/item.js.map +1 -1
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/vertical-navigation/private/item.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/es/utilities/constants.js +2 -2
- package/dist/es/utilities/constants.js.map +1 -1
- package/dist/types/components/avatar/index.d.ts +1 -1
- package/dist/types/components/avatar/index.d.ts.map +1 -1
- package/dist/types/components/breadcrumb/index.d.ts +1 -1
- package/dist/types/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/types/components/button/check-props.d.ts.map +1 -1
- package/dist/types/components/button/index.d.ts +1 -1
- package/dist/types/components/button/index.d.ts.map +1 -1
- package/dist/types/components/button-stateful/index.d.ts +1 -1
- package/dist/types/components/button-stateful/index.d.ts.map +1 -1
- package/dist/types/components/carousel/index.d.ts +34 -7
- package/dist/types/components/carousel/index.d.ts.map +1 -1
- package/dist/types/components/carousel/private/carousel-item.d.ts +3 -3
- package/dist/types/components/carousel/private/carousel-item.d.ts.map +1 -1
- package/dist/types/components/checkbox/check-props.d.ts.map +1 -1
- package/dist/types/components/checkbox/index.d.ts +1 -6
- package/dist/types/components/checkbox/index.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts +25 -7
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/color-picker/index.d.ts +1 -1
- package/dist/types/components/color-picker/index.d.ts.map +1 -1
- package/dist/types/components/combobox/add-subheadings.d.ts +1 -1
- package/dist/types/components/combobox/add-subheadings.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 +57 -24
- package/dist/types/components/combobox/combobox.d.ts.map +1 -1
- package/dist/types/components/combobox/filter.d.ts.map +1 -1
- package/dist/types/components/combobox/index.d.ts +2 -2
- package/dist/types/components/combobox/index.d.ts.map +1 -1
- package/dist/types/components/combobox/private/menu.d.ts +65 -4
- package/dist/types/components/combobox/private/menu.d.ts.map +1 -1
- package/dist/types/components/date-picker/date-picker.d.ts +52 -6
- 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/index.d.ts +0 -4
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/input/check-props.d.ts.map +1 -1
- package/dist/types/components/input/search.d.ts +1 -1
- package/dist/types/components/input/search.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts +1 -1
- package/dist/types/components/menu-dropdown/button-trigger.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/index.d.ts +2 -2
- package/dist/types/components/menu-dropdown/index.d.ts.map +1 -1
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts +95 -24
- package/dist/types/components/menu-dropdown/menu-dropdown.d.ts.map +1 -1
- package/dist/types/components/modal/index.d.ts +26 -3
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/pill-container/check-props.d.ts.map +1 -0
- package/dist/types/components/pill-container/index.d.ts +24 -3
- package/dist/types/components/pill-container/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 +41 -12
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/index.d.ts +7 -3
- package/dist/types/components/setup-assistant/index.d.ts.map +1 -1
- package/dist/types/components/setup-assistant/step.d.ts +7 -1
- package/dist/types/components/setup-assistant/step.d.ts.map +1 -1
- package/dist/types/components/simple-data-table/row-actions.d.ts.map +1 -1
- package/dist/types/components/spinner/index.d.ts +1 -1
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/split-view/check-props.d.ts.map +1 -0
- package/dist/types/components/split-view/header.d.ts +3 -3
- package/dist/types/components/split-view/header.d.ts.map +1 -1
- package/dist/types/components/split-view/index.d.ts +25 -3
- package/dist/types/components/split-view/index.d.ts.map +1 -1
- package/dist/types/components/split-view/listbox.d.ts +27 -24
- package/dist/types/components/split-view/listbox.d.ts.map +1 -1
- package/dist/types/components/tabs/index.d.ts +16 -3
- package/dist/types/components/tabs/index.d.ts.map +1 -1
- package/dist/types/components/textarea/index.d.ts +2 -2
- package/dist/types/components/textarea/index.d.ts.map +1 -1
- package/dist/types/components/toast/index.d.ts +17 -2
- package/dist/types/components/toast/index.d.ts.map +1 -1
- package/dist/types/components/tooltip/check-props.d.ts.map +1 -1
- package/dist/types/components/tooltip/index.d.ts +1 -5
- package/dist/types/components/tooltip/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/index.d.ts +1 -1
- package/dist/types/components/tree/index.d.ts.map +1 -1
- package/dist/types/components/tree/private/branch.d.ts +2 -4
- package/dist/types/components/tree/private/branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/item.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-branch.d.ts.map +1 -1
- package/dist/types/components/tree/private/render-initial-branch.d.ts +2 -3
- package/dist/types/components/tree/private/render-initial-branch.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +27 -6
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/tree/types.d.ts +55 -8
- package/dist/types/components/tree/types.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts +1 -1
- package/dist/types/components/utilities/menu-list/index.d.ts.map +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts +1 -1
- package/dist/types/components/utilities/menu-list/item.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +7 -3
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/private/item.d.ts +1 -1
- package/dist/types/components/vertical-navigation/private/item.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +62 -13
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/dist/types/utilities/constants.d.ts +0 -1
- package/dist/types/utilities/constants.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/components/forms/input/inline-check-props.cjs +0 -2
- package/dist/cjs/components/forms/input/inline-check-props.cjs.map +0 -1
- package/dist/cjs/components/forms/input/inline.cjs +0 -2
- package/dist/cjs/components/forms/input/inline.cjs.map +0 -1
- package/dist/cjs/components/modal/check-props.cjs +0 -2
- package/dist/cjs/components/modal/check-props.cjs.map +0 -1
- package/dist/cjs/components/modal/component.cjs +0 -2
- package/dist/cjs/components/modal/component.cjs.map +0 -1
- package/dist/cjs/components/modal/trigger.cjs +0 -2
- package/dist/cjs/components/modal/trigger.cjs.map +0 -1
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs +0 -2
- package/dist/cjs/utilities/warning/deprecated-property-value.cjs.map +0 -1
- package/dist/es/components/forms/input/inline-check-props.js +0 -11
- package/dist/es/components/forms/input/inline-check-props.js.map +0 -1
- package/dist/es/components/forms/input/inline.js +0 -95
- package/dist/es/components/forms/input/inline.js.map +0 -1
- package/dist/es/components/modal/check-props.js +0 -13
- package/dist/es/components/modal/check-props.js.map +0 -1
- package/dist/es/components/modal/component.js +0 -35
- package/dist/es/components/modal/component.js.map +0 -1
- package/dist/es/components/modal/trigger.js +0 -22
- package/dist/es/components/modal/trigger.js.map +0 -1
- package/dist/es/utilities/warning/deprecated-property-value.js +0 -18
- package/dist/es/utilities/warning/deprecated-property-value.js.map +0 -1
- package/dist/types/components/avatar/check-props.d.ts.map +0 -1
- package/dist/types/components/breadcrumb/check-props.d.ts.map +0 -1
- package/dist/types/components/button-stateful/check-props.d.ts +0 -3
- package/dist/types/components/button-stateful/check-props.d.ts.map +0 -1
- package/dist/types/components/forms/checkbox/index.d.ts +0 -4
- package/dist/types/components/forms/checkbox/index.d.ts.map +0 -1
- package/dist/types/components/forms/checkbox.d.ts +0 -2
- package/dist/types/components/forms/input/inline-check-props.d.ts +0 -3
- package/dist/types/components/forms/input/inline-check-props.d.ts.map +0 -1
- package/dist/types/components/forms/input/inline.d.ts +0 -88
- package/dist/types/components/forms/input/inline.d.ts.map +0 -1
- package/dist/types/components/modal/check-props.d.ts +0 -3
- package/dist/types/components/modal/check-props.d.ts.map +0 -1
- package/dist/types/components/modal/trigger.d.ts +0 -14
- package/dist/types/components/modal/trigger.d.ts.map +0 -1
- package/dist/types/components/spinner/check-props.d.ts +0 -3
- package/dist/types/components/spinner/check-props.d.ts.map +0 -1
- package/dist/types/components/tabs/pane.d.ts +0 -3
- package/dist/types/components/tabs/pane.d.ts.map +0 -1
- package/dist/types/utilities/warning/deprecated-event-parameter.d.ts +0 -3
- package/dist/types/utilities/warning/deprecated-event-parameter.d.ts.map +0 -1
- /package/dist/types/components/{avatar → pill-container}/check-props.d.ts +0 -0
- /package/dist/types/components/{breadcrumb → split-view}/check-props.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.cjs","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, { type ComboboxOption } 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?: (event: React.ChangeEvent<HTMLInputElement>, data: { value: string }) => void;\n\tonClose?: (event: React.SyntheticEvent | undefined, data: Record<string, unknown>) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\tonOpen?: (event: React.SyntheticEvent | undefined, data: Record<string, unknown>) => void;\n\tonRequestClose?: (event: React.SyntheticEvent, data: Record<string, unknown>) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (event: React.SyntheticEvent, data: { selection: ComboboxOption[] }) => void;\n\tonSelect?: (event: React.SyntheticEvent, data: { selection: ComboboxOption[] }) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\nexport interface ComboboxProps {\n\t/** Assistive text for accessibility */\n\tassistiveText?: ComboboxAssistiveText;\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/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\toption: ComboboxOption;\n\t}>;\n\t/** Menu options */\n\toptions?: ComboboxOption[];\n\t/** Options to add items */\n\toptionsAddItem?: Array<{ id?: string; icon?: ReactNode; label?: string | ((searchTerm: string) => ReactNode) }>;\n\t/** Options for search entity */\n\toptionsSearchEntity?: Array<{ id?: string; icon?: ReactNode; label?: string | ((searchTerm: string) => ReactNode) }>;\n\t/** Popover component for popover variant */\n\tpopover?: ReactElement;\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/** Combobox variant */\n\tvariant?: 'base' | 'inline-listbox' | 'popover' | 'readonly';\n\t/** @deprecated Use menuItem instead */\n\tmenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\toption: ComboboxOption;\n\t}>;\n}\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\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>(undefined);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<ComboboxOption | undefined>(\n\t\tselection?.[0]\n\t);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\tconst [isOpenState, setIsOpenState] = useState(typeof isOpenProp === 'boolean' ? isOpenProp : false);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(COMBOBOX, props as unknown as Record<string, unknown>, componentDoc);\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((entity) => ({\n\t\t\t...entity,\n\t\t\ttype: 'header' as const,\n\t\t\tid: entity.id || '',\n\t\t}));\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((entity) => ({\n\t\t\t...entity,\n\t\t\ttype: 'footer' as const,\n\t\t\tid: entity.id || '',\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}, [deselectId, labels.deselectOption, optionsSearchEntity, optionsAddItem, hasDeselect, options]);\n\n\tconst isSelected = useCallback(({ selection: sel, option }: { selection: ComboboxOption[]; option: ComboboxOption }) => {\n\t\treturn !!find(sel, option);\n\t}, []);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(({\n\t\tactiveOptionIndex: currentIndex,\n\t\toffset,\n\t\toptions: opts,\n\t}: {\n\t\tactiveOptionIndex: number;\n\t\toffset: number;\n\t\toptions: ComboboxOption[];\n\t}) => {\n\t\tconst nextIndex = currentIndex + offset;\n\t\tconst skipIndex =\n\t\t\topts.length > nextIndex &&\n\t\t\tnextIndex >= 0 &&\n\t\t\topts[nextIndex].type === 'separator';\n\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t}, []);\n\n\t// ===== Event Handlers =====\n\n\tconst handleClose = useCallback((event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\tconst isOpen = getIsOpen();\n\n\t\tif (isOpen) {\n\t\t\tif (currentOpenDropdown && currentOpenDropdown.handleClose === handleClose) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\n\t\t\tsetActiveOption(undefined);\n\t\t\tsetActiveOptionIndex(-1);\n\t\t\tsetIsOpenState(false);\n\n\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\tconst popoverProps = popover?.props as { onClose?: (event: unknown, data: { trigger: string }) => void } | undefined;\n\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (events.onClose) {\n\t\t\t\tevents.onClose(event, {});\n\t\t\t}\n\t\t}\n\t}, [getIsOpen, variant, popover, events]);\n\n\tconst handleOpen = useCallback((event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\tconst isOpen = getIsOpen();\n\n\t\tif (!isOpen) {\n\t\t\tif (currentOpenDropdown && isFunction(currentOpenDropdown.handleClose)) {\n\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t}\n\t\t} else {\n\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\tsetIsOpenState(true);\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}, [getIsOpen, handleClose, events, variant, getOptions, selection]);\n\n\tconst handleRequestClose = useCallback((event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\tif (events.onRequestClose) {\n\t\t\tevents.onRequestClose(event, data);\n\t\t}\n\t\tif (getIsOpen()) {\n\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t}\n\t}, [events, getIsOpen, handleClose]);\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 &&\n\t\t\tselection.length === 0 &&\n\t\t\tvariant === '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((event: MouseEvent | TouchEvent) => {\n\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t}, [handleRequestClose]);\n\n\tconst handleSelect = useCallback((event: React.SyntheticEvent, { selection: sel, option }: { selection: ComboboxOption[]; option: ComboboxOption }) => {\n\t\tlet newSelection: ComboboxOption[];\n\t\tconst selected = isSelected({ selection: sel, option });\n\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\tif (deselectWasClicked) {\n\t\t\tnewSelection = [];\n\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\tnewSelection = [option];\n\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\tnewSelection = [...selection, option];\n\t\t} else {\n\t\t\tnewSelection = reject(selection, option);\n\t\t}\n\n\t\tif (events.onSelect) {\n\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t}\n\n\t\thandleClose();\n\t}, [isSelected, multiple, deselectId, selection, events, handleClose]);\n\n\tconst handleInputBlur = useCallback((event: React.FocusEvent) => {\n\t\tsetTimeout(() => {\n\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\tif (\n\t\t\t\tactiveElement &&\n\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t) {\n\t\t\t\tif (inputRef.current) {\n\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t}\n\t\t\t} else if (!popover) {\n\t\t\t\thandleClose(event);\n\t\t\t}\n\t\t}, 200);\n\n\t\tif (events.onBlur) {\n\t\t\tevents.onBlur(event);\n\t\t}\n\t}, [getId, popover, handleClose, events]);\n\n\tconst handleInputChange = useCallback((event: React.ChangeEvent<HTMLInputElement>) => {\n\t\trequestOpenMenu();\n\t\tif (events.onChange) {\n\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t}\n\t}, [requestOpenMenu, events]);\n\n\tconst handleInputFocus = useCallback((event: React.FocusEvent) => {\n\t\tif (events.onFocus) {\n\t\t\tevents.onFocus(event, {});\n\t\t}\n\t}, [events]);\n\n\tconst handleInputSubmit = useCallback((event: React.KeyboardEvent) => {\n\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\tif (!isOpenState) {\n\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\topenDialog();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\thandleRequestClose(event, {});\n\t\t\t}\n\t\t}\n\n\t\tif (activeOption?.disabled) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (\n\t\t\tactiveOption &&\n\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t) {\n\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\treturn;\n\t\t}\n\n\t\tif (getIsActiveOption()) {\n\t\t\thandleSelect(event, {\n\t\t\t\toption: activeOption!,\n\t\t\t\tselection,\n\t\t\t});\n\t\t} else if (\n\t\t\t!predefinedOptionsOnly &&\n\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\tevents.onSubmit\n\t\t) {\n\t\t\tevents.onSubmit(event, {\n\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t});\n\t\t}\n\t}, [activeOption, activeOptionIndex, isOpenState, openDialog, handleRequestClose, getIsActiveOption, handleSelect, selection, predefinedOptionsOnly, events]);\n\n\tconst handleNavigateListboxMenu = useCallback((event: React.KeyboardEvent, { direction }: { direction: 'next' | 'previous' }) => {\n\t\tconst offsets = { next: 1, previous: -1 };\n\t\tconst opts = getOptions();\n\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\tactiveOptionIndex,\n\t\t\toffset: offsets[direction],\n\t\t\toptions: opts,\n\t\t});\n\n\t\tif (getIsOpen() && menuRef.current) {\n\t\t\tmenuItemSelectScroll({\n\t\t\t\tcontainer: menuRef.current,\n\t\t\t\tfocusedIndex: newIndex,\n\t\t\t});\n\t\t}\n\n\t\tsetActiveOption(opts[newIndex]);\n\t\tsetActiveOptionIndex(newIndex);\n\t}, [getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]);\n\n\tconst handleNavigateSelectedListbox = useCallback((event: React.SyntheticEvent, { direction }: { direction: 'next' | 'previous' }) => {\n\t\tconst offsets = { next: 1, previous: -1 };\n\t\tconst isLastOptionAndRightIsPressed =\n\t\t\tactiveSelectedOptionIndex + 1 === selection.length && direction === 'next';\n\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\tsetListboxHasFocus(true);\n\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\tsetListboxHasFocus(true);\n\t\t} else {\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: selection,\n\t\t\t});\n\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, [activeSelectedOptionIndex, selection, getNewActiveOptionIndex]);\n\n\tconst handleKeyDownDown = useCallback((event: React.KeyboardEvent) => {\n\t\tif (!event.shiftKey) {\n\t\t\topenDialog();\n\t\t}\n\n\t\tif (variant !== 'popover') {\n\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t}\n\t}, [openDialog, variant, handleNavigateListboxMenu]);\n\n\tconst handleKeyDownUp = useCallback((event: React.KeyboardEvent) => {\n\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t}\n\t}, [getIsOpen, handleNavigateListboxMenu]);\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((event: React.KeyboardEvent) => {\n\t\tconst opts = getOptions();\n\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\tkey: event.key,\n\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\tkeyCode: event.keyCode,\n\t\t\toptions: opts,\n\t\t});\n\n\t\tif (newActiveOptionIndex !== undefined) {\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: newActiveOptionIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t}\n\t}, [getOptions, getIsOpen]);\n\n\tconst handleKeyDown = useCallback((event: React.KeyboardEvent) => {\n\t\tconst callbacks: Record<number | string, { callback: (e: React.KeyboardEvent) => void; stopPropagation?: boolean } | undefined> = {\n\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t[KEYS.ESCAPE]: { callback: handleClose as (e: React.KeyboardEvent) => void },\n\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t};\n\n\t\tif (variant === 'readonly') {\n\t\t\tif (selection.length > 2) {\n\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t} else {\n\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t}\n\t\t\tcallbacks.other = {\n\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\tstopPropagation: false,\n\t\t\t};\n\t\t}\n\n\t\tconst stopPropagation = getIsOpen();\n\n\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t}, [handleKeyDownDown, handleInputSubmit, handleClose, handleKeyDownUp, variant, selection.length, handleKeyDownTab, handleKeyDownOther, getIsOpen]);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback((event: React.FocusEvent, { option, index }: { option: ComboboxOption; index: number }) => {\n\t\tif (!listboxHasFocus) {\n\t\t\tsetActiveSelectedOption(option);\n\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, [listboxHasFocus]);\n\n\tconst handleRemoveSelectedOption = useCallback((event: React.SyntheticEvent, { option, index }: { option: ComboboxOption; index?: number }) => {\n\t\tevent.preventDefault();\n\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\tconst lastPillWasRemoved = index !== undefined && index + 1 === selection.length;\n\n\t\tif (\n\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\tinputRef.current\n\t\t) {\n\t\t\tinputRef.current.focus();\n\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\tsetListboxHasFocus(true);\n\t\t} else if (index !== undefined) {\n\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\n\t\tif (events.onRequestRemoveSelectedOption) {\n\t\t\tevents.onRequestRemoveSelectedOption(event, {\n\t\t\t\tselection: reject(selection, option),\n\t\t\t});\n\t\t}\n\t}, [selection, variant, multiple, events]);\n\n\tconst handleRequestFocusSelectedListbox = useCallback((event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\tif (ref) {\n\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t}\n\t}, []);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback((component: HTMLInputElement | null) => {\n\t\tinputRef.current = component;\n\t\tif (!inputRendered) {\n\t\t\tsetInputRendered(true);\n\t\t}\n\t\tif (inputRefCallback) {\n\t\t\tinputRefCallback(component);\n\t\t}\n\t}, [inputRendered, inputRefCallback]);\n\n\tconst setSelectedListboxRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tselectedListboxRef.current = ref;\n\t\tif (selectedListboxRefCallback) {\n\t\t\tselectedListboxRefCallback(ref);\n\t\t}\n\t}, [selectedListboxRefCallback]);\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 (currentOpenDropdown && currentOpenDropdown.handleClose === handleClose) {\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((body: ReactNode) => {\n\t\tconst popoverBody = (\n\t\t\t<div>\n\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t</div>\n\t\t\t\t{body}\n\t\t\t</div>\n\t\t);\n\n\t\tconst popoverFooter = (\n\t\t\t<div>\n\t\t\t\t<Button\n\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\thandleClose(e, { trigger: 'cancel' });\n\t\t\t\t\t}}\n\t\t\t\t/>\n\t\t\t\t<Button\n\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\tonClick={handleClose as unknown as (event: React.MouseEvent<HTMLButtonElement>) => void}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\n\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\talign: 'bottom',\n\t\t\tbody: popoverBody,\n\t\t\tclassName: 'slds-popover_full-width',\n\t\t\tfooter: popoverFooter,\n\t\t\tfooterClassName: 'slds-popover__footer_form',\n\t\t\thasNoNubbin: true,\n\t\t\tid: getId(),\n\t\t\tisOpen: isOpenState,\n\t\t\thasNoTriggerStyles: true,\n\t\t\tonOpen: handleOpen,\n\t\t\tonClose: handleClose,\n\t\t\tonRequestClose: handleClose,\n\t\t};\n\n\t\tconst popoverPropsFromProp = popover?.props as Record<string, unknown> | undefined;\n\t\tconst popoverProps = assign(\n\t\t\tdefaultPopoverProps,\n\t\t\tpopoverPropsFromProp || {}\n\t\t);\n\t\tpopoverProps.body = popoverBody;\n\n\t\tdelete popoverProps.children;\n\t\treturn popoverProps;\n\t}, [getId, assistiveText.popoverLabel, labels.cancelButton, labels.doneButton, handleClose, isOpenState, handleOpen, popover]);\n\n\tconst getDialog = useCallback(({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\tconst position = menuPosition;\n\n\t\tif (!disabled && getIsOpen()) {\n\t\t\tconst dialogProps = {\n\t\t\t\talign: 'bottom left' as const,\n\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\thasStaticAlignment,\n\t\t\t\tinheritWidthOf,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t},\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\tposition,\n\t\t\t\tcontainerProps: {\n\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\trole: 'listbox',\n\t\t\t\t},\n\t\t\t};\n\t\t\treturn (\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t<Dialog {...(dialogProps as any)}>\n\t\t\t\t\t{menuRenderer}\n\t\t\t\t</Dialog>\n\t\t\t);\n\t\t}\n\t\treturn null;\n\t}, [menuPosition, disabled, getIsOpen, iconSettingsContext, hasStaticAlignment, inheritWidthOf, handleClose, handleOpen, getTargetElement, getId]);\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={handleSelect as (event: React.MouseEvent, data: { option: ComboboxOption; selection?: ComboboxOption[] }) => void}\n\t\t\t\tonRenderMenuItem={onRenderMenuItem || menuItem}\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}, [variant, assistiveText, activeOption, activeOptionIndex, classNameMenu, classNameMenuSubHeader, inheritWidthOf, getId, value, isSelected, menuItemVisibleLength, labels.noOptionsFound, hasMenuSpinner, menuPosition, setMenuRefCallback, menuMaxWidth, getOptions, handleSelect, onRenderMenuItem, menuItem, selection, tooltipMenuItemDisabled]);\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={assistiveText as unknown as { removePill?: string; selectedListboxLabel?: string; [key: string]: unknown }}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (event: React.FocusEvent, data: { index: number; option: SelectedListBoxOption }) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (event: unknown, data: { ref: HTMLElement | null }) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (event: React.MouseEvent | React.KeyboardEvent | React.SyntheticEvent, data: { index?: number; option: SelectedListBoxOption }) => 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={assistiveText as unknown as { removePill?: string; selectedListboxLabel?: string; [key: string]: unknown }}\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 (event: React.FocusEvent, data: { index: number; option: SelectedListBoxOption }) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (event: unknown, data: { ref: HTMLElement | null }) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (event: React.MouseEvent | React.KeyboardEvent | React.SyntheticEvent, data: { index?: number; option: SelectedListBoxOption }) => 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 } as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue =\n\t\t\tselection[0]?.label\n\t\t\t\t? selection[0].label as string\n\t\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) ||\n\t\t\t\t\t\t\t\t!!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 { 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<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={\n\t\t\t\t\t\t\t\t\tgetIsOpen() ? `${getId()}-popover` : undefined\n\t\t\t\t\t\t\t\t}\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 `${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={assistiveText as unknown as { removePill?: string; selectedListboxLabel?: string; [key: string]: unknown }}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (event: React.FocusEvent, data: { index: number; option: SelectedListBoxOption }) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (event: unknown, data: { ref: HTMLElement | null }) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (event: React.SyntheticEvent, data: { direction: 'next' | 'previous' }) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (event: React.MouseEvent | React.KeyboardEvent | React.SyntheticEvent, data: { index?: number; option: SelectedListBoxOption }) => 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\n\t\t\tclassName={classNames('slds-form-element', classNameContainer)}\n\t\t>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={assistiveText as unknown as { label?: string; [key: string]: unknown }}\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\n\t\t\t\t? variantRenderer()\n\t\t\t\t: 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={assistiveText as unknown as { label?: string; [key: string]: unknown }}\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\n"],"mappings":"4wCA8CA,IAAI,EACE,GAAkB,OAAO,SAAa,IAsItC,GAAwD,CAC7D,MAAO,GACP,iBAAkB,UAClB,qBAAsB,qBACtB,aAAc,GACd,2BAA4B,yBAC5B,WAAY,wCACZ,qB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,QAAD,CACgB,gBACf,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,sBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0DACb,SAAA,EACG,CAAA,GAEL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kDACb,SAAA,EACG,CAAA,CACD,GACD,CAAA,CACD,CAEL,CAAA,EAAA,EAEF,EAEA,GAAS,YAAc,EAAA"}
|
|
1
|
+
{"version":3,"file":"combobox.cjs","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} 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\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/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\t/** Custom renderers only receive selectable rows */\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\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/** @deprecated Use menuItem instead */\n\tmenuItem?: React.ComponentType<{\n\t\tassistiveText?: ComboboxAssistiveText;\n\t\tselected: boolean;\n\t\t/** Custom renderers only receive selectable rows */\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\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\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\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\tonRenderMenuItem={onRenderMenuItem || menuItem}\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\tonRenderMenuItem,\n\t\tmenuItem,\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":"4wCAmDA,IAAI,EACE,GAAkB,OAAO,SAAa,IAuFtC,GAAc,OAAO,YAAY,EAMjC,GAAmB,GACxB,MAAe,EAEV,IACL,EACA,KACoB,CACpB,GAAI,EAAK,IAAM,GACf,KAAM,EAAK,KACX,MAAO,EAAK,MACZ,SAAU,EAAK,SACf,QACC,IAAc,CAChB,GAmHM,GAAwD,CAC7D,MAAO,GACP,iBAAkB,UAClB,qBAAsB,qBACtB,aAAc,GACd,2BAA4B,yBAC5B,WAAY,wCACZ,qBAAsB,mBACvB,EAEM,GAA0C,CAC/C,eAAgB,OAChB,MAAO,GACP,aAAc,SACd,WAAY,OACZ,wBAAyB,GACzB,eAAgB,oBAChB,YAAa,GACb,oBAAqB,mBACrB,gBAAiB,SACjB,2BAA4B,2BAC5B,eAAgB,EACjB,EAEM,GAAgC,CAAC,EAIjC,GAAqC,GAAU,CACpD,GAAM,CACL,cAAe,GAAoB,CAAC,EACpC,mBAAoB,GACpB,YACA,sBACA,iBACA,0BACA,eACA,YACA,kBACA,YACA,OAAQ,GAAa,CAAC,EACtB,yBACA,eACA,mBACA,kBACA,sBACA,GAAI,GACJ,kBAAiB,SACjB,SACA,SAAU,GACV,OAAQ,EACR,OAAQ,GAAa,CAAC,EACtB,yBACA,gBACA,gBAAe,WACf,WACA,oBACA,UAAU,CAAC,EACX,kBAAiB,CAAC,EAClB,uBAA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GAAe,MAElD,GAA8D,CACnE,KAAM,CACL,SAAU,GACV,OAAQ,EACT,EACA,iBAAkB,CACjB,SAAU,GACV,OAAQ,EACT,EACA,QAAS,CACR,SAAU,GACV,OAAQ,EACT,EACA,SAAU,CACT,SAAU,GACV,OAAQ,EACT,CACD,EAEM,GAAmB,EAAW,WAAa,SAC3C,GAAkB,GAAW,EAAQ,GAAG,IAExC,IACL,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,WAAA,EAAW,EAAA,QAAA,CAAW,oBAAqB,EAAkB,EAAlE,SAAA,CACE,GAAiB,MACjB,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAKD,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,EAED,IAAyB,IACzB,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEwB,wBACvB,CAAA,EACE,KACH,GAAkB,GAAgB,EAAI,GAAW,KAAK,SAAS,CAC5D,IAGN,OAAO,IACN,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,GAAA,QAAD,CAEE,gBAED,QAAS,EAAM,EACf,MAAO,EAAO,MACJ,UACV,CAAA,GACD,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BACd,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,sBAAf,SAAA,EACC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,0DACb,SAAA,EACG,CAAA,GAEL,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kDACb,SAAA,EACG,CAAA,CACD,GACD,CAAA,CACD,CAEL,CAAA,EAAA,EAEF,EAEA,GAAS,YAAc,EAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("lodash.escaperegexp");t=e.__toESM(t,1);var n=({inputValue:e,limit:n=10,options:r,selection:i})=>{let a=new RegExp((0,t.default)(e),`ig`);return r.filter(t=>{let n=t.label
|
|
1
|
+
const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("lodash.escaperegexp");t=e.__toESM(t,1);var n=({inputValue:e,limit:n=10,options:r,selection:i})=>{let a=new RegExp((0,t.default)(e),`ig`);return r.filter(t=>{let n=typeof t.label==`string`&&t.label.match(a),r=t.subTitle?t.subTitle.match(a):!1,o=t.type===`separator`,s=!i.some(e=>e.id===t.id);return(!e||o||n||r)&&s}).splice(0,n)};exports.default=n;
|
|
2
2
|
//# sourceMappingURL=filter.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.cjs","names":[],"sources":["../../../../components/combobox/filter.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 */\nimport escapeRegExp from 'lodash.escaperegexp';\n\n/**\n * SLDS recommends auto-complete/search inputs menus have a limit of 10 items.\n */\nconst filter = ({ inputValue, limit = 10, options, selection }) => {\n\tconst inputValueRegExp = new RegExp(escapeRegExp(inputValue), 'ig');\n\treturn options\n\t\t.filter((option) => {\n\t\t\tconst searchTermFoundInLabel
|
|
1
|
+
{"version":3,"file":"filter.cjs","names":[],"sources":["../../../../components/combobox/filter.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 */\nimport escapeRegExp from 'lodash.escaperegexp';\n\n/**\n * SLDS recommends auto-complete/search inputs menus have a limit of 10 items.\n */\nconst filter = ({ inputValue, limit = 10, options, selection }) => {\n\tconst inputValueRegExp = new RegExp(escapeRegExp(inputValue), 'ig');\n\treturn options\n\t\t.filter((option) => {\n\t\t\t// Separators may pass a label render function; only strings are searched.\n\t\t\tconst searchTermFoundInLabel =\n\t\t\t\ttypeof option.label === 'string'\n\t\t\t\t\t? option.label.match(inputValueRegExp)\n\t\t\t\t\t: false;\n\t\t\tconst searchTermFoundInSubtitle = option.subTitle\n\t\t\t\t? option.subTitle.match(inputValueRegExp)\n\t\t\t\t: false;\n\t\t\tconst isSeparator = option.type === 'separator';\n\t\t\tconst notAlreadySelected = !selection.some((sel) => sel.id === option.id);\n\n\t\t\treturn (\n\t\t\t\t(!inputValue ||\n\t\t\t\t\tisSeparator ||\n\t\t\t\t\tsearchTermFoundInLabel ||\n\t\t\t\t\tsearchTermFoundInSubtitle) &&\n\t\t\t\tnotAlreadySelected\n\t\t\t);\n\t\t})\n\t\t.splice(0, limit);\n};\nexport default filter;\n"],"mappings":"8GAOA,IAAM,GAAU,CAAE,aAAY,QAAQ,GAAI,UAAS,eAAgB,CAClE,IAAM,EAAmB,IAAI,QAAA,EAAO,EAAA,QAAA,CAAa,CAAU,EAAG,IAAI,EAClE,OAAO,EACL,OAAQ,GAAW,CAEnB,IAAM,EACL,OAAO,EAAO,OAAU,UACrB,EAAO,MAAM,MAAM,CAAgB,EAEjC,EAA4B,EAAO,SACtC,EAAO,SAAS,MAAM,CAAgB,EACtC,GACG,EAAc,EAAO,OAAS,YAC9B,EAAqB,CAAC,EAAU,KAAM,GAAQ,EAAI,KAAO,EAAO,EAAE,EAExE,OACE,CAAC,GACD,GACA,GACA,IACD,CAEF,CAAC,CAAC,CACD,OAAO,EAAG,CAAK,CAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useRef, forwardRef, type ForwardedRef } from 'react';\nimport LanguageDirection from '../utilities/UNSAFE_direction/private/language-direction';\nimport Combobox, { type ComboboxProps } from './combobox';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\nexport type {
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../../../components/combobox/index.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, { useRef, forwardRef, type ForwardedRef } from 'react';\nimport LanguageDirection from '../utilities/UNSAFE_direction/private/language-direction';\nimport Combobox, { type ComboboxProps } from './combobox';\nimport { useClickOutside } from '../../utilities/hooks/use-click-outside';\n\nexport type {\n\tComboboxProps,\n\tComboboxActionItem,\n\tComboboxAssistiveText,\n\tComboboxLabels,\n\tComboboxEvents,\n} from './combobox';\nexport type {\n\tComboboxOption,\n\tComboboxItemOption,\n\tComboboxSeparatorOption,\n\tComboboxActionOption,\n\tComboboxDeselectOption,\n} from './private/menu';\n\n/**\n * Combobox wrapper that handles click outside detection\n * Replaces react-onclickoutside HOC for React 19 compatibility\n */\nconst ComboboxWithClickOutside = forwardRef<HTMLDivElement, ComboboxProps>(\n\t(props, ref: ForwardedRef<HTMLDivElement>) => {\n\t\tconst containerRef = useRef<HTMLDivElement>(null);\n\t\tconst comboboxRef = useRef<{\n\t\t\thandleClickOutside?: (event: MouseEvent | TouchEvent) => void;\n\t\t}>(null);\n\n\t\t// Use our custom hook to detect clicks outside\n\t\tuseClickOutside(\n\t\t\tcontainerRef,\n\t\t\t(event) => {\n\t\t\t\t// The Combobox component handles click outside via handleRequestClose\n\t\t\t\t// This is triggered when clicking outside the combobox container\n\t\t\t\tif (comboboxRef.current?.handleClickOutside) {\n\t\t\t\t\tcomboboxRef.current.handleClickOutside(event);\n\t\t\t\t}\n\t\t\t},\n\t\t\t{\n\t\t\t\tenabled: true,\n\t\t\t\tignoreClass: 'ignore-react-onclickoutside',\n\t\t\t}\n\t\t);\n\n\t\treturn (\n\t\t\t<div ref={containerRef}>\n\t\t\t\t<Combobox {...props} />\n\t\t\t</div>\n\t\t);\n\t}\n);\n\nComboboxWithClickOutside.displayName = 'ComboboxWithClickOutside';\n\n// Wrap with LanguageDirection for RTL support\nexport default LanguageDirection(\n\tComboboxWithClickOutside\n) as unknown as React.FC<ComboboxProps>;\n"],"mappings":"iYA2BA,IAAM,GAAA,EAA2B,EAAA,WAAA,EAC/B,EAAO,IAAsC,CAC7C,IAAM,GAAA,EAAe,EAAA,OAAA,CAAuB,IAAI,EAC1C,GAAA,EAAc,EAAA,OAAA,CAEjB,IAAI,EAkBP,OAfA,EAAA,QACC,EACC,GAAU,CAGN,EAAY,SAAS,oBACxB,EAAY,QAAQ,mBAAmB,CAAK,CAE9C,EACA,CACC,QAAS,GACT,YAAa,6BACd,CACD,GAGC,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,IAAK,EACT,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CAAU,GAAI,CAAQ,CAAA,CAClB,CAAA,CAEP,CACD,EAEA,EAAyB,YAAc,2BAGvC,IAAA,EAAe,EAAA,QACd,CACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../icon/index.cjs"),n=require("../../spinner/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("dequal");var s=(e,t)=>{if(!e||e.length===0||!t||t.length===0)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n>-1?(0,a.jsxs)(r.default.Fragment,{children:[e.substr(0,n),(0,a.jsx)(`span`,{className:`slds-text-title_bold`,children:`${e.substr(n,t.length)}`},`bold`),e.substr(n+t.length)]}):e},c=(e,t)=>e==null||typeof e==`string`?e:e(t),l=e=>!r.default.isValidElement(e)||e.props.size!=null?e:r.default.cloneElement(e,{size:`small`}),u=({activeOption:e,activeOptionIndex:u=-1,assistiveText:d={},classNameMenuSubHeader:f,classNameMenu:p,inheritWidthOf:m,inputId:h,inputValue:g=``,isSelected:_,itemVisibleLength:v,labels:y,hasMenuSpinner:b,maxWidth:x,menuPosition:S,menuRef:C,onRenderMenuItem:w,onSelect:T,options:E,selection:D,tooltipMenuItemDisabled:O,variant:k=`icon-title-subtitle`})=>{let A=m===`menu`?`inherit`:void 0;A=m===`menu`&&x?x:A;let j=E.map((n,p)=>{let m=p===u&&e&&(0,o.dequal)(n.id,e.id),v=_({selection:D,option:n})&&n.type!==`header`&&n.type!==`footer`;if(n.type===`separator`)return n.label?(0,a.jsx)(`li`,{className:`slds-dropdown__header slds-truncate`,title:typeof n.label==`string`?n.label:void 0,role:`separator`,children:(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-header`,f),children:typeof n.label==`string`?n.label:n.label?.(g)})},`menu-separator-${n.id}`):(0,a.jsx)(`li`,{className:`slds-has-divider_top-space`,role:`separator`},`menu-separator-${n.id}`);if(n.type===`header`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{onClick:n.disabled?void 0:e=>{T(e,{option:n})},"aria-selected":m,id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-header-${n.id}}`);if(n.type===`footer`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{"aria-selected":m,onClick:n.disabled?void 0:e=>{T(e,{option:n})},id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-footer-${n.id}}`);let y={},b=`${h}-listbox-option-help-${n.id}`;n.disabled&&O&&m&&(y[`aria-describedby`]=b),n.disabled&&(y[`aria-disabled`]=!0,y.style={cursor:`default`});let x=typeof n.label==`string`?n.label:void 0,S={"icon-title-subtitle":(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-subtitle-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_has-meta`,{"slds-has-focus":m}),onClick:n.disabled?void 0:e=>{T(e,{option:n})},role:`option`},n.icon&&!w?(0,a.jsx)(`span`,{className:`slds-media__figure`,children:l(n.icon)}):null,w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:`slds-media__body`,children:[(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-text`,`slds-listbox__option-text_entity`,{"slds-disabled-text":n.disabled}),title:x,children:s(x,g)}),(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-meta slds-listbox__option-meta_entity`,{"slds-disabled-text":n.disabled}),title:n.subTitle,children:s(n.subTitle,g)})]})),checkbox:(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-checkbox-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,` slds-listbox__option_plain slds-media_small slds-media_center`,{"slds-has-focus":m,"slds-is-selected":v}),onClick:n.disabled?void 0:e=>{T(e,{selection:D,option:n})},role:`option`},(0,a.jsx)(`span`,{className:`slds-media__figure`,children:(0,a.jsx)(t.default,{className:`slds-listbox__icon-selected`,category:`utility`,name:`check`,size:`x-small`})}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-disabled-text":n.disabled}),title:x,children:[v?(0,a.jsx)(`span`,{className:`slds-assistive-text`,children:d.optionSelectedInMenu}):null,` `,n.type===`deselect`?(0,a.jsx)(`em`,{children:x}):x]})}))},C;if(n.disabled&&O){let{content:e,...t}=O.props,i={align:`top`,content:n.tooltipContent||e,id:b,position:`absolute`,silenceTriggerTabbableWarning:!0,triggerStyle:{width:`100%`},...t};m&&(i.isOpen=!0),C=r.default.cloneElement(O,i,S[k])}else C=S[k];return(0,a.jsx)(`li`,{className:`slds-listbox__item`,role:`presentation`,children:C},`menu-option-${n.id}`)});return(0,a.jsxs)(`ul`,{className:(0,i.default)(`slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid`,{"slds-dropdown_length-with-icon-5":v===5,"slds-dropdown_length-with-icon-7":v===7,"slds-dropdown_length-with-icon-10":v===10},p),ref:C,role:`presentation`,style:{width:m===`menu`?`auto`:void 0,maxWidth:A,position:S===`relative`?void 0:`relative`},children:[j.length?j:(0,a.jsx)(`li`,{className:`slds-listbox__item slds-listbox__status`,role:`status`,"aria-live":`polite`,children:(0,a.jsx)(`span`,{className:`slds-m-left_x-large slds-p-vertical_medium`,children:y.noOptionsFound})}),b&&(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsx)(`div`,{className:`slds-align_absolute-center slds-p-top_medium`,children:(0,a.jsx)(n.default,{assistiveText:{label:d.loadingMenuItems},hasContainer:!1,isInline:!0,size:`x-small`})})})]})};u.displayName=`Menu`,exports.default=u;
|
|
1
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../icon/index.cjs"),n=require("../../spinner/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("classnames");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("dequal");var s=(e,t)=>{if(!e||e.length===0||!t||t.length===0)return e;let n=e.toLowerCase().indexOf(t.toLowerCase());return n>-1?(0,a.jsxs)(r.default.Fragment,{children:[e.substr(0,n),(0,a.jsx)(`span`,{className:`slds-text-title_bold`,children:`${e.substr(n,t.length)}`},`bold`),e.substr(n+t.length)]}):e},c=(e,t)=>e==null||typeof e==`string`?e:e(t),l=e=>!r.default.isValidElement(e)||e.props.size!=null?e:r.default.cloneElement(e,{size:`small`}),u=({activeOption:e,activeOptionIndex:u=-1,assistiveText:d={},classNameMenuSubHeader:f,classNameMenu:p,inheritWidthOf:m,inputId:h,inputValue:g=``,isSelected:_,itemVisibleLength:v,labels:y,hasMenuSpinner:b,maxWidth:x,menuPosition:S,menuRef:C,onRenderMenuItem:w,onSelect:T,options:E,selection:D,tooltipMenuItemDisabled:O,variant:k=`icon-title-subtitle`})=>{let A=m===`menu`?`inherit`:void 0;A=m===`menu`&&x?x:A;let j=E.map((n,p)=>{let m=p===u&&e&&(0,o.dequal)(n.id,e.id),v=_({selection:D,option:n})&&n.type!==`header`&&n.type!==`footer`;if(n.type===`separator`)return n.label?(0,a.jsx)(`li`,{className:`slds-dropdown__header slds-truncate`,title:typeof n.label==`string`?n.label:void 0,role:`separator`,children:(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-header`,f),children:typeof n.label==`string`?n.label:n.label?.(g)})},`menu-separator-${n.id}`):(0,a.jsx)(`li`,{className:`slds-has-divider_top-space`,role:`separator`},`menu-separator-${n.id}`);if(n.type===`header`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{onClick:n.disabled?void 0:e=>{T(e,{option:n})},"aria-selected":m,"aria-disabled":n.disabled||void 0,id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-header-${n.id}}`);if(n.type===`footer`)return(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsxs)(`div`,{"aria-selected":m,"aria-disabled":n.disabled||void 0,onClick:n.disabled?void 0:e=>{T(e,{option:n})},id:`${h}-listbox-option-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_term`,{"slds-has-focus":m}),role:`option`,children:[(0,a.jsx)(`span`,{className:`slds-media__figure slds-listbox__option-icon`,children:l(n.icon)}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:c(n.label,g)})]})},`menu-footer-${n.id}}`);let y={},b=`${h}-listbox-option-help-${n.id}`;n.disabled&&O&&m&&(y[`aria-describedby`]=b),n.disabled&&(y[`aria-disabled`]=!0,y.style={cursor:`default`});let x=typeof n.label==`string`?n.label:void 0,S={"icon-title-subtitle":(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-subtitle-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,`slds-listbox__option_entity slds-listbox__option_has-meta`,{"slds-has-focus":m}),onClick:n.disabled?void 0:e=>{T(e,{option:n})},role:`option`},n.icon&&!w?(0,a.jsx)(`span`,{className:`slds-media__figure`,children:l(n.icon)}):null,w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:`slds-media__body`,children:[(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-text`,`slds-listbox__option-text_entity`,{"slds-disabled-text":n.disabled}),title:x,children:s(x,g)}),(0,a.jsx)(`span`,{className:(0,i.default)(`slds-listbox__option-meta slds-listbox__option-meta_entity`,{"slds-disabled-text":n.disabled}),title:n.subTitle,children:s(n.subTitle,g)})]})),checkbox:(0,r.createElement)(`span`,{"aria-selected":m,...y,id:`${h}-listbox-option-${n.id}`,key:`menu-checkbox-${n.id}`,className:(0,i.default)(`slds-media slds-listbox__option`,` slds-listbox__option_plain slds-media_small slds-media_center`,{"slds-has-focus":m,"slds-is-selected":v}),onClick:n.disabled?void 0:e=>{T(e,{selection:D,option:n})},role:`option`},(0,a.jsx)(`span`,{className:`slds-media__figure`,children:(0,a.jsx)(t.default,{className:`slds-listbox__icon-selected`,category:`utility`,name:`check`,size:`x-small`})}),(0,a.jsx)(`span`,{className:`slds-media__body`,children:w?(0,a.jsx)(w,{assistiveText:d,selected:v,option:n}):(0,a.jsxs)(`span`,{className:(0,i.default)(`slds-truncate`,{"slds-disabled-text":n.disabled}),title:x,children:[v?(0,a.jsx)(`span`,{className:`slds-assistive-text`,children:d.optionSelectedInMenu}):null,` `,n.type===`deselect`?(0,a.jsx)(`em`,{children:x}):x]})}))},C;if(n.disabled&&O){let{content:e,...t}=O.props,i={align:`top`,content:n.tooltipContent||e,id:b,position:`absolute`,silenceTriggerTabbableWarning:!0,triggerStyle:{width:`100%`},...t};m&&(i.isOpen=!0),C=r.default.cloneElement(O,i,S[k])}else C=S[k];return(0,a.jsx)(`li`,{className:`slds-listbox__item`,role:`presentation`,children:C},`menu-option-${n.id}`)});return(0,a.jsxs)(`ul`,{className:(0,i.default)(`slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid`,{"slds-dropdown_length-with-icon-5":v===5,"slds-dropdown_length-with-icon-7":v===7,"slds-dropdown_length-with-icon-10":v===10},p),ref:C,role:`presentation`,style:{width:m===`menu`?`auto`:void 0,maxWidth:A,position:S===`relative`?void 0:`relative`},children:[j.length?j:(0,a.jsx)(`li`,{className:`slds-listbox__item slds-listbox__status`,role:`status`,"aria-live":`polite`,children:(0,a.jsx)(`span`,{className:`slds-m-left_x-large slds-p-vertical_medium`,children:y.noOptionsFound})}),b&&(0,a.jsx)(`li`,{role:`presentation`,className:`slds-listbox__item`,children:(0,a.jsx)(`div`,{className:`slds-align_absolute-center slds-p-top_medium`,children:(0,a.jsx)(n.default,{assistiveText:{label:d.loadingMenuItems},hasContainer:!1,isInline:!0,size:`x-small`})})})]})};u.displayName=`Menu`,exports.default=u;
|
|
2
2
|
//# sourceMappingURL=menu.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.cjs","names":[],"sources":["../../../../../components/combobox/private/menu.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, { type ReactNode, type ReactElement, type CSSProperties } from 'react';\nimport { dequal as isEqual } from 'dequal';\nimport classNames from 'classnames';\n\nimport Icon from '../../icon';\nimport Spinner from '../../spinner';\n\nexport interface ComboboxOption {\n\tid: string;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tsubTitle?: string;\n\ttitle?: string;\n\ttype?: 'separator' | 'header' | 'footer' | 'deselect' | string;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\ttooltipContent?: ReactNode;\n\tvalue?: string;\n\tonClick?: (event: React.MouseEvent) => void;\n}\n\nexport interface MenuAssistiveText {\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n}\n\nexport interface MenuLabels {\n\tnoOptionsFound: ReactNode | string;\n}\n\nexport interface MenuProps {\n\t/** Active descendant in menu */\n\tactiveOption?: ComboboxOption;\n\t/** Index of active descendant in menu */\n\tactiveOptionIndex?: number;\n\t/** Assistive text for accessibility */\n\tassistiveText?: MenuAssistiveText;\n\t/** CSS classes to be added to menu sub header span tag */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** Sets the dialog width */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Id used for assistive technology */\n\tinputId?: string;\n\t/** Input value for bolding matches */\n\tinputValue?: string;\n\t/** Function to check if option is selected */\n\tisSelected: (params: { selection: ComboboxOption[]; option: ComboboxOption }) => boolean;\n\t/** Determines the height of the menu */\n\titemVisibleLength?: 5 | 7 | 10 | null;\n\t/** Text labels */\n\tlabels: MenuLabels;\n\t/** Adds loading spinner below the options */\n\thasMenuSpinner?: boolean;\n\t/** Sets a maximum width for menu */\n\tmaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Ref for menu element */\n\tmenuRef?: React.RefCallback<HTMLUListElement> | React.RefObject<HTMLUListElement>;\n\t/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: MenuAssistiveText;\n\t\tselected: boolean;\n\t\toption: ComboboxOption;\n\t}>;\n\t/** Callback when option is selected */\n\tonSelect: (event: React.MouseEvent, data: { option: ComboboxOption; selection?: ComboboxOption[] }) => void;\n\t/** Menu options */\n\toptions: ComboboxOption[];\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Menu variant */\n\tvariant?: 'icon-title-subtitle' | 'checkbox';\n}\n\nconst setBold = (label: string | undefined, searchTerm: string): ReactNode => {\n\tif (!label || label.length === 0 || !searchTerm || searchTerm.length === 0) {\n\t\treturn label;\n\t}\n\tconst position = label.toLowerCase().indexOf(searchTerm.toLowerCase());\n\tif (position > -1) {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t{label.substr(0, position)}\n\t\t\t\t<span key=\"bold\" className=\"slds-text-title_bold\">{`${label.substr(\n\t\t\t\t\tposition,\n\t\t\t\t\tsearchTerm.length\n\t\t\t\t)}`}</span>\n\t\t\t\t{label.substr(position + searchTerm.length)}\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\treturn label;\n};\n\nconst renderLabel = (labelProp: string | ((searchTerm: string) => ReactNode) | undefined, searchTerm: string): ReactNode => {\n\tif (labelProp == null || typeof labelProp === 'string') {\n\t\treturn labelProp;\n\t}\n\treturn labelProp(searchTerm);\n};\n\n// Entity icons in a combobox listbox option render at \"small\" per SLDS. `Icon`\n// defaults to \"medium\", so an option icon passed without an explicit size shows\n// oversized in the menu (SLDS 2 no longer shrinks it via CSS the way SLDS 1\n// did). Clone the icon to enforce \"small\" unless the consumer set a size\n// themselves. Leaves non-<Icon> nodes untouched.\nconst sizeOptionIcon = (icon: ReactNode): ReactNode => {\n\tif (!React.isValidElement(icon)) {\n\t\treturn icon;\n\t}\n\tconst iconProps = icon.props as { size?: unknown };\n\tif (iconProps.size != null) {\n\t\treturn icon;\n\t}\n\treturn React.cloneElement(icon, { size: 'small' } as Record<string, unknown>);\n};\n\nconst Menu: React.FC<MenuProps> = ({\n\tactiveOption,\n\tactiveOptionIndex = -1,\n\tassistiveText = {},\n\tclassNameMenuSubHeader,\n\tclassNameMenu,\n\tinheritWidthOf,\n\tinputId,\n\tinputValue = '',\n\tisSelected,\n\titemVisibleLength,\n\tlabels,\n\thasMenuSpinner,\n\tmaxWidth,\n\tmenuPosition,\n\tmenuRef,\n\tonRenderMenuItem: MenuItem,\n\tonSelect,\n\toptions,\n\tselection,\n\ttooltipMenuItemDisabled,\n\tvariant = 'icon-title-subtitle',\n}) => {\n\tlet menuMaxWidth: string | undefined = inheritWidthOf === 'menu' ? 'inherit' : undefined;\n\tmenuMaxWidth = inheritWidthOf === 'menu' && maxWidth ? maxWidth : menuMaxWidth;\n\n\tconst menuOptions = options.map((optionData, index) => {\n\t\tconst active =\n\t\t\tindex === activeOptionIndex &&\n\t\t\tactiveOption &&\n\t\t\tisEqual(optionData.id, activeOption.id);\n\t\tconst selected =\n\t\t\tisSelected({\n\t\t\t\tselection,\n\t\t\t\toption: optionData,\n\t\t\t}) &&\n\t\t\toptionData.type !== 'header' &&\n\t\t\toptionData.type !== 'footer';\n\n\t\tif (optionData.type === 'separator') {\n\t\t\treturn optionData.label ? (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-dropdown__header slds-truncate\"\n\t\t\t\t\ttitle={typeof optionData.label === 'string' ? optionData.label : undefined}\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-listbox__option-header',\n\t\t\t\t\t\t\tclassNameMenuSubHeader\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof optionData.label === 'string' ? optionData.label : optionData.label?.(inputValue)}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-has-divider_top-space\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'header') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-header-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'footer') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-footer-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tconst disabledProps: {\n\t\t\t'aria-describedby'?: string;\n\t\t\t'aria-disabled'?: boolean;\n\t\t\tstyle?: CSSProperties;\n\t\t} = {};\n\t\tconst tooltipId = `${inputId}-listbox-option-help-${optionData.id}`;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled && active) {\n\t\t\tdisabledProps['aria-describedby'] = tooltipId;\n\t\t}\n\t\tif (optionData.disabled) {\n\t\t\tdisabledProps['aria-disabled'] = true;\n\t\t\tdisabledProps.style = { cursor: 'default' };\n\t\t}\n\n\t\tconst labelString = typeof optionData.label === 'string' ? optionData.label : undefined;\n\n\t\tconst menuItem: Record<string, ReactNode> = {\n\t\t\t'icon-title-subtitle': (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-subtitle-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_has-meta',\n\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t{optionData.icon && !MenuItem ? (\n\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text',\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(labelString, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-meta slds-listbox__option-meta_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={optionData.subTitle}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(optionData.subTitle, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t),\n\t\t\tcheckbox: (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-checkbox-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t' slds-listbox__option_plain slds-media_small slds-media_center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-has-focus': active,\n\t\t\t\t\t\t\t'slds-is-selected': selected,\n\t\t\t\t\t\t}\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, {\n\t\t\t\t\t\t\t\t\t\tselection,\n\t\t\t\t\t\t\t\t\t\toption: optionData,\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"slds-listbox__icon-selected\"\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t\t\t\t\t\t'slds-disabled-text': optionData.disabled,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{selected ? (\n\t\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t\t\t\t{assistiveText.optionSelectedInMenu}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}{' '}\n\t\t\t\t\t\t\t\t{optionData.type === 'deselect' ? (\n\t\t\t\t\t\t\t\t\t<em>{labelString}</em>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tlabelString\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t),\n\t\t};\n\n\t\tlet item: ReactNode;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled) {\n\t\t\tconst tooltipPropsFromElement = tooltipMenuItemDisabled.props as { content?: ReactNode; [key: string]: unknown };\n\t\t\tconst { content, ...userDefinedTooltipProps } = tooltipPropsFromElement;\n\t\t\tconst tooltipProps: Record<string, unknown> = {\n\t\t\t\talign: 'top',\n\t\t\t\tcontent: optionData.tooltipContent || content,\n\t\t\t\tid: tooltipId,\n\t\t\t\tposition: 'absolute',\n\t\t\t\tsilenceTriggerTabbableWarning: true,\n\t\t\t\ttriggerStyle: { width: '100%' },\n\t\t\t\t...userDefinedTooltipProps,\n\t\t\t};\n\t\t\tif (active) {\n\t\t\t\ttooltipProps.isOpen = true;\n\t\t\t}\n\t\t\titem = React.cloneElement(\n\t\t\t\ttooltipMenuItemDisabled,\n\t\t\t\ttooltipProps,\n\t\t\t\tmenuItem[variant]\n\t\t\t);\n\t\t} else {\n\t\t\titem = menuItem[variant];\n\t\t}\n\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\tkey={`menu-option-${optionData.id}`}\n\t\t\t\trole=\"presentation\"\n\t\t\t>\n\t\t\t\t{item}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_length-with-icon-5': itemVisibleLength === 5,\n\t\t\t\t\t'slds-dropdown_length-with-icon-7': itemVisibleLength === 7,\n\t\t\t\t\t'slds-dropdown_length-with-icon-10': itemVisibleLength === 10,\n\t\t\t\t},\n\t\t\t\tclassNameMenu\n\t\t\t)}\n\t\t\tref={menuRef}\n\t\t\trole=\"presentation\"\n\t\t\tstyle={{\n\t\t\t\twidth: inheritWidthOf === 'menu' ? 'auto' : undefined,\n\t\t\t\tmaxWidth: menuMaxWidth,\n\t\t\t\tposition: menuPosition !== 'relative' ? 'relative' : undefined,\n\t\t\t}}\n\t\t>\n\t\t\t{menuOptions.length ? (\n\t\t\t\tmenuOptions\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-listbox__item slds-listbox__status\"\n\t\t\t\t\trole=\"status\"\n\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-m-left_x-large slds-p-vertical_medium\">\n\t\t\t\t\t\t{labels.noOptionsFound}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t\t{hasMenuSpinner && (\n\t\t\t\t<li role=\"presentation\" className=\"slds-listbox__item\">\n\t\t\t\t\t<div className=\"slds-align_absolute-center slds-p-top_medium\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: assistiveText.loadingMenuItems }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t</ul>\n\t);\n};\n\nMenu.displayName = 'Menu';\n\nexport default Menu;\n\n"],"mappings":"8QAiFA,IAAM,GAAW,EAA2B,IAAkC,CAC7E,GAAI,CAAC,GAAS,EAAM,SAAW,GAAK,CAAC,GAAc,EAAW,SAAW,EACxE,OAAO,EAER,IAAM,EAAW,EAAM,YAAY,CAAC,CAAC,QAAQ,EAAW,YAAY,CAAC,EAarE,OAZI,EAAW,IAEb,EAAA,EAAA,KAAA,CAAC,EAAA,QAAM,SAAP,CAAA,SAAA,CACE,EAAM,OAAO,EAAG,CAAQ,GACzB,EAAA,EAAA,IAAA,CAAC,OAAD,CAAiB,UAAU,uBAAwB,SAAA,GAAG,EAAM,OAC3D,EACA,EAAW,MACZ,GAAU,EAHA,MAGA,EACT,EAAM,OAAO,EAAW,EAAW,MAAM,CAC3B,CAAA,CAAA,EAGX,CACR,EAEM,GAAe,EAAqE,IACrF,GAAa,MAAQ,OAAO,GAAc,SACtC,EAED,EAAU,CAAU,EAQtB,EAAkB,GACnB,CAAC,EAAA,QAAM,eAAe,CAAI,GAGZ,EAAK,MACT,MAAQ,KACd,EAED,EAAA,QAAM,aAAa,EAAM,CAAE,KAAM,OAAQ,CAA4B,EAGvE,GAA6B,CAClC,eACA,oBAAoB,GACpB,gBAAgB,CAAC,EACjB,yBACA,gBACA,iBACA,UACA,aAAa,GACb,aACA,oBACA,SACA,iBACA,WACA,eACA,UACA,iBAAkB,EAClB,WACA,UACA,YACA,0BACA,UAAU,yBACL,CACL,IAAI,EAAmC,IAAmB,OAAS,UAAY,IAAA,GAC/E,E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AO,cACH,CAAA,CACH,CAAA,EAEJ,IACA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,KAAK,eAAe,UAAU,qBACjC,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,+CACd,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,MAAO,EAAc,gBAAiB,EACvD,aAAc,GACd,SAAA,GACA,KAAK,SACL,CAAA,CACG,CAAA,CACF,CAAA,CAEF,GAEN,EAEA,EAAK,YAAc"}
|
|
1
|
+
{"version":3,"file":"menu.cjs","names":[],"sources":["../../../../../components/combobox/private/menu.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\ttype ReactNode,\n\ttype ReactElement,\n\ttype CSSProperties,\n} from 'react';\nimport { dequal as isEqual } from 'dequal';\nimport classNames from 'classnames';\n\nimport Icon from '../../icon';\nimport Spinner from '../../spinner';\n\ntype ComboboxOptionLabelRenderer = (searchTerm: string) => ReactNode;\n\n/**\n * A selectable option. Group items under a `subheadings` entry from\n * `comboboxAddSubheadings` with `category`.\n */\nexport interface ComboboxItemOption {\n\t/** Structural rows set `type`; selectable items leave it unset. */\n\ttype?: undefined;\n\tid: string;\n\t/** Matches the `id` of a subheading passed to `comboboxAddSubheadings` */\n\tcategory?: string;\n\tlabel?: string;\n\tsubTitle?: string;\n\ttitle?: string;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\ttooltipContent?: ReactNode;\n\tvalue?: string;\n\tonClick?: never;\n}\n\n/** A non-interactive group label. Without a `label` it renders as a divider. */\nexport interface ComboboxSeparatorOption {\n\ttype: 'separator';\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n\tonClick?: never;\n}\n\ninterface ComboboxActionOptionFields {\n\tid: string;\n\tlabel?: string | ComboboxOptionLabelRenderer;\n\ticon?: ReactNode;\n\tdisabled?: boolean;\n\t/** @deprecated Only called on Enter, for `type: 'header' | 'footer'` rows\n\t * passed directly in `options`. Use `optionsSearchEntity`/`optionsAddItem`\n\t * with `events.onSelectActionItem` instead. */\n\tonClick?: (event: React.MouseEvent) => void;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ttooltipContent?: never;\n\tvalue?: never;\n}\n\n/**\n * An action row above (`header`) or below (`footer`) the options. Usually\n * created from `optionsSearchEntity` and `optionsAddItem`.\n */\nexport type ComboboxActionOption =\n\t| (ComboboxActionOptionFields & { type: 'header' })\n\t| (ComboboxActionOptionFields & { type: 'footer' });\n\n/** The \"clear selection\" row added by `hasDeselect`. */\nexport interface ComboboxDeselectOption {\n\ttype: 'deselect';\n\tid: string;\n\tlabel?: string;\n\tvalue?: string;\n\tcategory?: never;\n\tsubTitle?: never;\n\ttitle?: never;\n\ticon?: never;\n\tdisabled?: never;\n\ttooltipContent?: never;\n\tonClick?: never;\n}\n\nexport type ComboboxOption =\n\t| ComboboxItemOption\n\t| ComboboxSeparatorOption\n\t| ComboboxActionOption\n\t| ComboboxDeselectOption;\n\nexport interface MenuAssistiveText {\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n}\n\nexport interface MenuLabels {\n\tnoOptionsFound: ReactNode | string;\n}\n\nexport interface MenuProps {\n\t/** Active descendant in menu */\n\tactiveOption?: ComboboxOption;\n\t/** Index of active descendant in menu */\n\tactiveOptionIndex?: number;\n\t/** Assistive text for accessibility */\n\tassistiveText?: MenuAssistiveText;\n\t/** CSS classes to be added to menu sub header span tag */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** Sets the dialog width */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Id used for assistive technology */\n\tinputId?: string;\n\t/** Input value for bolding matches */\n\tinputValue?: string;\n\t/** Function to check if option is selected */\n\tisSelected: (params: {\n\t\tselection: ComboboxOption[];\n\t\toption: ComboboxOption;\n\t}) => boolean;\n\t/** Determines the height of the menu */\n\titemVisibleLength?: 5 | 7 | 10 | null;\n\t/** Text labels */\n\tlabels: MenuLabels;\n\t/** Adds loading spinner below the options */\n\thasMenuSpinner?: boolean;\n\t/** Sets a maximum width for menu */\n\tmaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Ref for menu element */\n\tmenuRef?:\n\t\tReact.RefCallback<HTMLUListElement> | React.RefObject<HTMLUListElement>;\n\t/** Custom menu item renderer */\n\tonRenderMenuItem?: React.ComponentType<{\n\t\tassistiveText?: MenuAssistiveText;\n\t\tselected: boolean;\n\t\toption: ComboboxItemOption | ComboboxDeselectOption;\n\t}>;\n\t/** Callback when option is selected */\n\tonSelect: (\n\t\tevent: React.MouseEvent,\n\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t) => void;\n\t/** Menu options */\n\toptions: ComboboxOption[];\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Menu variant */\n\tvariant?: 'icon-title-subtitle' | 'checkbox';\n}\n\nconst setBold = (label: string | undefined, searchTerm: string): ReactNode => {\n\tif (!label || label.length === 0 || !searchTerm || searchTerm.length === 0) {\n\t\treturn label;\n\t}\n\tconst position = label.toLowerCase().indexOf(searchTerm.toLowerCase());\n\tif (position > -1) {\n\t\treturn (\n\t\t\t<React.Fragment>\n\t\t\t\t{label.substr(0, position)}\n\t\t\t\t<span key=\"bold\" className=\"slds-text-title_bold\">{`${label.substr(\n\t\t\t\t\tposition,\n\t\t\t\t\tsearchTerm.length\n\t\t\t\t)}`}</span>\n\t\t\t\t{label.substr(position + searchTerm.length)}\n\t\t\t</React.Fragment>\n\t\t);\n\t}\n\treturn label;\n};\n\nconst renderLabel = (\n\tlabelProp: string | ((searchTerm: string) => ReactNode) | undefined,\n\tsearchTerm: string\n): ReactNode => {\n\tif (labelProp == null || typeof labelProp === 'string') {\n\t\treturn labelProp;\n\t}\n\treturn labelProp(searchTerm);\n};\n\n// Entity icons in a combobox listbox option render at \"small\" per SLDS. `Icon`\n// defaults to \"medium\", so an option icon passed without an explicit size shows\n// oversized in the menu (SLDS 2 no longer shrinks it via CSS the way SLDS 1\n// did). Clone the icon to enforce \"small\" unless the consumer set a size\n// themselves. Leaves non-<Icon> nodes untouched.\nconst sizeOptionIcon = (icon: ReactNode): ReactNode => {\n\tif (!React.isValidElement(icon)) {\n\t\treturn icon;\n\t}\n\tconst iconProps = icon.props as { size?: unknown };\n\tif (iconProps.size != null) {\n\t\treturn icon;\n\t}\n\treturn React.cloneElement(icon, { size: 'small' } as Record<string, unknown>);\n};\n\nconst Menu: React.FC<MenuProps> = ({\n\tactiveOption,\n\tactiveOptionIndex = -1,\n\tassistiveText = {},\n\tclassNameMenuSubHeader,\n\tclassNameMenu,\n\tinheritWidthOf,\n\tinputId,\n\tinputValue = '',\n\tisSelected,\n\titemVisibleLength,\n\tlabels,\n\thasMenuSpinner,\n\tmaxWidth,\n\tmenuPosition,\n\tmenuRef,\n\tonRenderMenuItem: MenuItem,\n\tonSelect,\n\toptions,\n\tselection,\n\ttooltipMenuItemDisabled,\n\tvariant = 'icon-title-subtitle',\n}) => {\n\tlet menuMaxWidth: string | undefined =\n\t\tinheritWidthOf === 'menu' ? 'inherit' : undefined;\n\tmenuMaxWidth =\n\t\tinheritWidthOf === 'menu' && maxWidth ? maxWidth : menuMaxWidth;\n\n\tconst menuOptions = options.map((optionData, index) => {\n\t\tconst active =\n\t\t\tindex === activeOptionIndex &&\n\t\t\tactiveOption &&\n\t\t\tisEqual(optionData.id, activeOption.id);\n\t\tconst selected =\n\t\t\tisSelected({\n\t\t\t\tselection,\n\t\t\t\toption: optionData,\n\t\t\t}) &&\n\t\t\toptionData.type !== 'header' &&\n\t\t\toptionData.type !== 'footer';\n\n\t\tif (optionData.type === 'separator') {\n\t\t\treturn optionData.label ? (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-dropdown__header slds-truncate\"\n\t\t\t\t\ttitle={\n\t\t\t\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined\n\t\t\t\t\t}\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-listbox__option-header',\n\t\t\t\t\t\t\tclassNameMenuSubHeader\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t{typeof optionData.label === 'string'\n\t\t\t\t\t\t\t? optionData.label\n\t\t\t\t\t\t\t: optionData.label?.(inputValue)}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-has-divider_top-space\"\n\t\t\t\t\trole=\"separator\"\n\t\t\t\t\tkey={`menu-separator-${optionData.id}`}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'header') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-header-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tif (optionData.type === 'footer') {\n\t\t\treturn (\n\t\t\t\t<li\n\t\t\t\t\tkey={`menu-footer-${optionData.id}}`}\n\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-selected={active}\n\t\t\t\t\t\taria-disabled={optionData.disabled || undefined}\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_term',\n\t\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"option\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"slds-media__figure slds-listbox__option-icon\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t{renderLabel(optionData.label, inputValue)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t);\n\t\t}\n\n\t\tconst disabledProps: {\n\t\t\t'aria-describedby'?: string;\n\t\t\t'aria-disabled'?: boolean;\n\t\t\tstyle?: CSSProperties;\n\t\t} = {};\n\t\tconst tooltipId = `${inputId}-listbox-option-help-${optionData.id}`;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled && active) {\n\t\t\tdisabledProps['aria-describedby'] = tooltipId;\n\t\t}\n\t\tif (optionData.disabled) {\n\t\t\tdisabledProps['aria-disabled'] = true;\n\t\t\tdisabledProps.style = { cursor: 'default' };\n\t\t}\n\n\t\tconst labelString =\n\t\t\ttypeof optionData.label === 'string' ? optionData.label : undefined;\n\n\t\tconst menuItem: Record<string, ReactNode> = {\n\t\t\t'icon-title-subtitle': (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-subtitle-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t'slds-listbox__option_entity slds-listbox__option_has-meta',\n\t\t\t\t\t\t{ 'slds-has-focus': active }\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, { option: optionData });\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t{optionData.icon && !MenuItem ? (\n\t\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t\t{sizeOptionIcon(optionData.icon)}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : null}\n\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text',\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-text_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(labelString, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\t\t'slds-listbox__option-meta slds-listbox__option-meta_entity',\n\t\t\t\t\t\t\t\t\t{ 'slds-disabled-text': optionData.disabled }\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\ttitle={optionData.subTitle}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{setBold(optionData.subTitle, inputValue)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</span>\n\t\t\t),\n\t\t\tcheckbox: (\n\t\t\t\t<span\n\t\t\t\t\taria-selected={active}\n\t\t\t\t\t{...disabledProps}\n\t\t\t\t\tid={`${inputId}-listbox-option-${optionData.id}`}\n\t\t\t\t\tkey={`menu-checkbox-${optionData.id}`}\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-media slds-listbox__option',\n\t\t\t\t\t\t' slds-listbox__option_plain slds-media_small slds-media_center',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-has-focus': active,\n\t\t\t\t\t\t\t'slds-is-selected': selected,\n\t\t\t\t\t\t}\n\t\t\t\t\t)}\n\t\t\t\t\tonClick={\n\t\t\t\t\t\toptionData.disabled\n\t\t\t\t\t\t\t? undefined\n\t\t\t\t\t\t\t: (event) => {\n\t\t\t\t\t\t\t\t\tonSelect(event, {\n\t\t\t\t\t\t\t\t\t\tselection,\n\t\t\t\t\t\t\t\t\t\toption: optionData,\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}\n\t\t\t\t\trole=\"option\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-media__figure\">\n\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\tclassName=\"slds-listbox__icon-selected\"\n\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\tname=\"check\"\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</span>\n\t\t\t\t\t<span className=\"slds-media__body\">\n\t\t\t\t\t\t{MenuItem ? (\n\t\t\t\t\t\t\t<MenuItem\n\t\t\t\t\t\t\t\tassistiveText={assistiveText}\n\t\t\t\t\t\t\t\tselected={selected}\n\t\t\t\t\t\t\t\toption={optionData}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={classNames('slds-truncate', {\n\t\t\t\t\t\t\t\t\t'slds-disabled-text': optionData.disabled,\n\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\ttitle={labelString}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{selected ? (\n\t\t\t\t\t\t\t\t\t<span className=\"slds-assistive-text\">\n\t\t\t\t\t\t\t\t\t\t{assistiveText.optionSelectedInMenu}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t) : null}{' '}\n\t\t\t\t\t\t\t\t{optionData.type === 'deselect' ? (\n\t\t\t\t\t\t\t\t\t<em>{labelString}</em>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tlabelString\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t</span>\n\t\t\t),\n\t\t};\n\n\t\tlet item: ReactNode;\n\t\tif (optionData.disabled && tooltipMenuItemDisabled) {\n\t\t\tconst tooltipPropsFromElement = tooltipMenuItemDisabled.props as {\n\t\t\t\tcontent?: ReactNode;\n\t\t\t\t[key: string]: unknown;\n\t\t\t};\n\t\t\tconst { content, ...userDefinedTooltipProps } = tooltipPropsFromElement;\n\t\t\tconst tooltipProps: Record<string, unknown> = {\n\t\t\t\talign: 'top',\n\t\t\t\tcontent: optionData.tooltipContent || content,\n\t\t\t\tid: tooltipId,\n\t\t\t\tposition: 'absolute',\n\t\t\t\tsilenceTriggerTabbableWarning: true,\n\t\t\t\ttriggerStyle: { width: '100%' },\n\t\t\t\t...userDefinedTooltipProps,\n\t\t\t};\n\t\t\tif (active) {\n\t\t\t\ttooltipProps.isOpen = true;\n\t\t\t}\n\t\t\titem = React.cloneElement(\n\t\t\t\ttooltipMenuItemDisabled,\n\t\t\t\ttooltipProps,\n\t\t\t\tmenuItem[variant]\n\t\t\t);\n\t\t} else {\n\t\t\titem = menuItem[variant];\n\t\t}\n\n\t\treturn (\n\t\t\t<li\n\t\t\t\tclassName=\"slds-listbox__item\"\n\t\t\t\tkey={`menu-option-${optionData.id}`}\n\t\t\t\trole=\"presentation\"\n\t\t\t>\n\t\t\t\t{item}\n\t\t\t</li>\n\t\t);\n\t});\n\n\treturn (\n\t\t<ul\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-listbox slds-listbox_vertical slds-dropdown slds-dropdown_fluid',\n\t\t\t\t{\n\t\t\t\t\t'slds-dropdown_length-with-icon-5': itemVisibleLength === 5,\n\t\t\t\t\t'slds-dropdown_length-with-icon-7': itemVisibleLength === 7,\n\t\t\t\t\t'slds-dropdown_length-with-icon-10': itemVisibleLength === 10,\n\t\t\t\t},\n\t\t\t\tclassNameMenu\n\t\t\t)}\n\t\t\tref={menuRef}\n\t\t\trole=\"presentation\"\n\t\t\tstyle={{\n\t\t\t\twidth: inheritWidthOf === 'menu' ? 'auto' : undefined,\n\t\t\t\tmaxWidth: menuMaxWidth,\n\t\t\t\tposition: menuPosition !== 'relative' ? 'relative' : undefined,\n\t\t\t}}\n\t\t>\n\t\t\t{menuOptions.length ? (\n\t\t\t\tmenuOptions\n\t\t\t) : (\n\t\t\t\t<li\n\t\t\t\t\tclassName=\"slds-listbox__item slds-listbox__status\"\n\t\t\t\t\trole=\"status\"\n\t\t\t\t\taria-live=\"polite\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-m-left_x-large slds-p-vertical_medium\">\n\t\t\t\t\t\t{labels.noOptionsFound}\n\t\t\t\t\t</span>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t\t{hasMenuSpinner && (\n\t\t\t\t<li role=\"presentation\" className=\"slds-listbox__item\">\n\t\t\t\t\t<div className=\"slds-align_absolute-center slds-p-top_medium\">\n\t\t\t\t\t\t<Spinner\n\t\t\t\t\t\t\tassistiveText={{ label: assistiveText.loadingMenuItems }}\n\t\t\t\t\t\t\thasContainer={false}\n\t\t\t\t\t\t\tisInline\n\t\t\t\t\t\t\tsize=\"x-small\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</li>\n\t\t\t)}\n\t\t</ul>\n\t);\n};\n\nMenu.displayName = 'Menu';\n\nexport default Menu;\n"],"mappings":"8QAiKA,IAAM,GAAW,EAA2B,IAAkC,CAC7E,GAAI,CAAC,GAAS,EAAM,SAAW,GAAK,CAAC,GAAc,EAAW,SAAW,EACxE,OAAO,EAER,IAAM,EAAW,EAAM,YAAY,CAAC,CAAC,QAAQ,EAAW,YAAY,CAAC,EAarE,OAZI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,gBAAkB,EACtC,GAAI,EACJ,SAAU,WACV,8BAA+B,GAC/B,aAAc,CAAE,MAAO,MAAO,EAC9B,GAAG,CACJ,EACI,IACH,EAAa,OAAS,IAEvB,EAAO,EAAA,QAAM,aACZ,EACA,EACA,EAAS,EACV,CACD,KACC,GAAO,EAAS,GAGjB,OACC,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,UAAU,qBAEV,KAAK,eAEJ,SAAA,CACE,EAJE,eAAe,EAAW,IAI5B,CAEN,CAAC,EAED,OACC,EAAA,EAAA,KAAA,CAAC,KAAD,CACC,WAAA,EAAW,EAAA,QAAA,CACV,uEACA,CACC,mCAAoC,IAAsB,EAC1D,mCAAoC,IAAsB,EAC1D,oCAAqC,IAAsB,EAC5D,EACA,CACD,EACA,IAAK,EACL,KAAK,eACL,MAAO,CACN,MAAO,IAAmB,OAAS,OAAS,IAAA,GAC5C,SAAU,EACV,SAAU,IAAiB,WAA0B,IAAA,GAAb,UACzC,EAhBD,SAAA,CAkBE,EAAY,OACZ,GAEA,EAAA,EAAA,IAAA,CAAC,KAAD,CACC,UAAU,0CACV,KAAK,SACL,YAAU,SAEV,UAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,6CACd,SAAA,EAAO,cACH,CAAA,CACH,CAAA,EAEJ,IACA,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,KAAK,eAAe,UAAU,qBACjC,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,+CACd,UAAA,EAAA,EAAA,IAAA,CAAC,EAAA,QAAD,CACC,cAAe,CAAE,MAAO,EAAc,gBAAiB,EACvD,aAAc,GACd,SAAA,GACA,KAAK,SACL,CAAA,CACG,CAAA,CACF,CAAA,CAEF,GAEN,EAEA,EAAK,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../../utilities/
|
|
1
|
+
const e=require("../../utilities/get-component-doc.cjs"),t=require("../../utilities/warning/deprecated-property.cjs");var n=function(){};process.env.NODE_ENV!==`production`&&(n=function(n,r,i){let a=e.default(i);t.default(n,r.children,`children`,`input`,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onFocus,`onFocus`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onBlur,`onBlur`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.abbrWeekDayLabels,`abbrWeekDayLabels`,`abbreviatedWeekDayLabels`,`Prop name has changed. ${a(`labels`)}`),t.default(n,r.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]}\` ${a(`onChange`)}`),t.default(n,r.onKeyDown,`onKeyDown`,void 0,`Please see \`input\` prop description and add your own \`Input\`. Props will be shallow merged. ${a(`input`)}`),t.default(n,r.onFocus,`required`,void 0,`Please see children prop description and add your own \`Input\` as a child of Datepicker. ${a(`children`)}`),t.default(n,r.strValue,`strValue`,`formattedValue`,a(`formattedValue`)),t.default(n,r.isInline,`isInline`,`menuPosition="relative"`,a(`menuPosition`))});var r=n;exports.default=r;
|
|
2
2
|
//# sourceMappingURL=check-props.cjs.map
|