@salesforce/design-system-react 11.0.0-alpha.7 → 11.0.0-alpha.8
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/color-picker/color-picker.cjs +1 -1
- package/dist/cjs/components/color-picker/color-picker.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/filter/filter.cjs +1 -1
- package/dist/cjs/components/filter/filter.cjs.map +1 -1
- package/dist/cjs/components/modal/check-props.cjs +2 -0
- package/dist/cjs/components/modal/check-props.cjs.map +1 -0
- package/dist/cjs/components/modal/component.cjs +2 -0
- package/dist/cjs/components/modal/component.cjs.map +1 -0
- package/dist/cjs/components/modal/index.cjs +1 -1
- package/dist/cjs/components/modal/index.cjs.map +1 -1
- package/dist/cjs/components/popover/component.cjs +2 -0
- package/dist/cjs/components/popover/component.cjs.map +1 -0
- package/dist/cjs/components/popover/edit-dialog.cjs +1 -1
- package/dist/cjs/components/popover/edit-dialog.cjs.map +1 -1
- package/dist/cjs/components/popover/popover.cjs +1 -1
- package/dist/cjs/components/popover/popover.cjs.map +1 -1
- package/dist/cjs/components/slider/check-props.cjs +1 -1
- package/dist/cjs/components/slider/check-props.cjs.map +1 -1
- package/dist/cjs/components/slider/index.cjs +1 -1
- package/dist/cjs/components/slider/index.cjs.map +1 -1
- package/dist/cjs/components/spinner/check-props.cjs +2 -0
- package/dist/cjs/components/spinner/check-props.cjs.map +1 -0
- package/dist/cjs/components/spinner/component.cjs +2 -0
- package/dist/cjs/components/spinner/component.cjs.map +1 -0
- package/dist/cjs/components/spinner/index.cjs +1 -1
- package/dist/cjs/components/spinner/index.cjs.map +1 -1
- package/dist/cjs/components/tree/check-props.cjs +1 -1
- package/dist/cjs/components/tree/check-props.cjs.map +1 -1
- package/dist/cjs/components/tree/tree.cjs +1 -1
- package/dist/cjs/components/tree/tree.cjs.map +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs +1 -1
- package/dist/cjs/components/vertical-navigation/index.cjs.map +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs +1 -1
- package/dist/cjs/components/welcome-mat/index.cjs.map +1 -1
- package/dist/es/components/color-picker/color-picker.js +1 -1
- package/dist/es/components/color-picker/color-picker.js.map +1 -1
- package/dist/es/components/combobox/combobox.js +2 -2
- package/dist/es/components/combobox/combobox.js.map +1 -1
- package/dist/es/components/filter/filter.js +1 -1
- package/dist/es/components/filter/filter.js.map +1 -1
- package/dist/es/components/modal/check-props.js +22 -0
- package/dist/es/components/modal/check-props.js.map +1 -0
- package/dist/es/components/modal/component.js +35 -0
- package/dist/es/components/modal/component.js.map +1 -0
- package/dist/es/components/modal/index.js +118 -104
- package/dist/es/components/modal/index.js.map +1 -1
- package/dist/es/components/popover/component.js +59 -0
- package/dist/es/components/popover/component.js.map +1 -0
- package/dist/es/components/popover/edit-dialog.js +1 -1
- package/dist/es/components/popover/edit-dialog.js.map +1 -1
- package/dist/es/components/popover/popover.js +235 -191
- package/dist/es/components/popover/popover.js.map +1 -1
- package/dist/es/components/slider/check-props.js +1 -1
- package/dist/es/components/slider/check-props.js.map +1 -1
- package/dist/es/components/slider/index.js +63 -60
- package/dist/es/components/slider/index.js.map +1 -1
- package/dist/es/components/spinner/check-props.js +13 -0
- package/dist/es/components/spinner/check-props.js.map +1 -0
- package/dist/es/components/spinner/component.js +17 -0
- package/dist/es/components/spinner/component.js.map +1 -0
- package/dist/es/components/spinner/index.js +43 -29
- package/dist/es/components/spinner/index.js.map +1 -1
- package/dist/es/components/tree/check-props.js +1 -1
- package/dist/es/components/tree/check-props.js.map +1 -1
- package/dist/es/components/tree/tree.js +79 -73
- package/dist/es/components/tree/tree.js.map +1 -1
- package/dist/es/components/vertical-navigation/index.js +17 -16
- package/dist/es/components/vertical-navigation/index.js.map +1 -1
- package/dist/es/components/welcome-mat/index.js +51 -50
- package/dist/es/components/welcome-mat/index.js.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/modal/check-props.d.ts +3 -0
- package/dist/types/components/modal/check-props.d.ts.map +1 -0
- package/dist/types/components/modal/index.d.ts +21 -13
- package/dist/types/components/modal/index.d.ts.map +1 -1
- package/dist/types/components/popover/popover.d.ts +24 -14
- package/dist/types/components/popover/popover.d.ts.map +1 -1
- package/dist/types/components/slider/check-props.d.ts.map +1 -1
- package/dist/types/components/slider/index.d.ts +9 -7
- package/dist/types/components/slider/index.d.ts.map +1 -1
- package/dist/types/components/spinner/check-props.d.ts +3 -0
- package/dist/types/components/spinner/check-props.d.ts.map +1 -0
- package/dist/types/components/spinner/index.d.ts +18 -9
- package/dist/types/components/spinner/index.d.ts.map +1 -1
- package/dist/types/components/tree/check-props.d.ts.map +1 -1
- package/dist/types/components/tree/tree.d.ts +8 -4
- package/dist/types/components/tree/tree.d.ts.map +1 -1
- package/dist/types/components/vertical-navigation/index.d.ts +7 -7
- package/dist/types/components/vertical-navigation/index.d.ts.map +1 -1
- package/dist/types/components/welcome-mat/index.d.ts +5 -6
- package/dist/types/components/welcome-mat/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.js","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\nimport isFunction from 'lodash.isfunction';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n\ttype MenuRenderMenuItemData,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport generateId from '../../utilities/generate-id';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ReactNode;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\n/**\n * Argument passed to `renderMenuItem`\n */\nexport interface ComboboxRenderMenuItemData extends MenuRenderMenuItemData {\n\t/** The combobox's assistive text */\n\tassistiveText: ComboboxAssistiveText;\n}\n\n/**\n * Component accepted by the deprecated `onRenderMenuItem` and `menuItem` props\n */\ntype ComboboxLegacyMenuItem = React.ComponentType<{\n\tassistiveText?: ComboboxAssistiveText;\n\tselected: boolean;\n\t/** Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}>;\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** Default input value for uncontrolled usage */\n\tdefaultValue?: string;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/** Whether the dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/**\n\t * @deprecated Use `renderMenuItem`, which is called as a function with\n\t * `{ assistiveText, isSelected, option }`.\n\t */\n\tonRenderMenuItem?: ComboboxLegacyMenuItem;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Input value (controlled) */\n\tvalue?: string;\n\t/**\n\t * Renders each option's content in place of the default label and icon.\n\t * Receives `{ assistiveText, isSelected, option }`.\n\t */\n\trenderMenuItem?: (data: ComboboxRenderMenuItemData) => ReactNode;\n\t/** @deprecated Use `renderMenuItem` instead. */\n\tmenuItem?: ComboboxLegacyMenuItem;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/** Listbox variants. Defaults to `base`. */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\nconst defaultEvents: ComboboxEvents = {};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultValue,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp = {},\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\trenderMenuItem: renderMenuItemProp,\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\tconst events = assign({}, defaultEvents, eventsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useRef(generateId());\n\tconst generatedErrorId = useRef(generateId());\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<\n\t\tComboboxOption | undefined\n\t>(selection?.[0]);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\tconst [isOpenState, setIsOpenState] = useState(\n\t\ttypeof isOpenProp === 'boolean' ? isOpenProp : false\n\t);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId.current);\n\t}, [ariaDescribedby, errorText]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t\tsetIsOpenState(false);\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (events.onClose) {\n\t\t\t\t\tevents.onClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, variant, popover, events]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tisFunction(currentOpenDropdown.handleClose)\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\t\tsetIsOpenState(true);\n\n\t\t\t\tif (events.onOpen) {\n\t\t\t\t\tevents.onOpen(event, data || {});\n\t\t\t\t}\n\n\t\t\t\tif (variant === 'readonly') {\n\t\t\t\t\tconst opts = getOptions();\n\t\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleClose, events, variant, getOptions, selection]\n\t);\n\n\tconst handleRequestClose = useCallback(\n\t\t(event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\t\tif (events.onRequestClose) {\n\t\t\t\tevents.onRequestClose(event, data);\n\t\t\t}\n\t\t\tif (getIsOpen()) {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t}\n\t\t},\n\t\t[events, getIsOpen, handleClose]\n\t);\n\n\tconst openDialog = useCallback(() => {\n\t\tif (events.onRequestOpen) {\n\t\t\tevents.onRequestOpen();\n\t\t} else {\n\t\t\tsetIsOpenState(true);\n\t\t}\n\t}, [events]);\n\n\tconst requestOpenMenu = useCallback(() => {\n\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\tif (\n\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\tmultiple ||\n\t\t\tvariant === 'readonly'\n\t\t) {\n\t\t\topenDialog();\n\t\t}\n\t}, [multiple, selection.length, variant, openDialog]);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\tevents.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: inputRef.current?.value ?? '',\n\t\t\t\t});\n\t\t\t\thandleClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\thandleClose();\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, handleClose]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\thandleClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, handleClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu();\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpenState) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\topenDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandleRequestClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption!,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpenState,\n\t\t\topenDialog,\n\t\t\thandleRequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\tevents,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\topenDialog();\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[openDialog, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: handleClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\thandleClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOption(option);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, events]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// Sync controlled isOpen prop\n\tuseEffect(() => {\n\t\tif (typeof isOpenProp === 'boolean') {\n\t\t\tsetIsOpenState(isOpenProp);\n\t\t\tif (!isOpenProp) {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [isOpenProp]);\n\n\t// Handle options change - maintain active highlight\n\tuseEffect(() => {\n\t\tconst opts = getOptions();\n\t\tif (activeOption) {\n\t\t\tconst index = findIndex(opts, (item) => isEqual(item, activeOption));\n\t\t\tif (index !== -1) {\n\t\t\t\tsetActiveOptionIndex(index);\n\t\t\t} else {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [options, getOptions, activeOption]);\n\n\t// Handle selection change - keep the active selected option and its roving\n\t// tabindex in sync with `selection`. Besides seeding the initial active\n\t// pill, this clamps the active index when `selection` shrinks. Without the\n\t// clamp, a controlled parent removing a pill through any path other than\n\t// the built-in remove handler could leave the active index pointing past\n\t// the end of `selection`, so no pill receives tabindex=0 and the selected-\n\t// pill listbox becomes unreachable by keyboard (WCAG 2.1.1 / 2.4.3).\n\tuseEffect(() => {\n\t\tif (selection.length === 0) {\n\t\t\tif (activeSelectedOption !== undefined) {\n\t\t\t\tsetActiveSelectedOption(undefined);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!activeSelectedOption || !selection[activeSelectedOptionIndex]) {\n\t\t\tconst clampedIndex =\n\t\t\t\tactiveSelectedOptionIndex >= selection.length\n\t\t\t\t\t? selection.length - 1\n\t\t\t\t\t: activeSelectedOptionIndex;\n\t\t\tsetActiveSelectedOption(selection[clampedIndex]);\n\t\t\tsetActiveSelectedOptionIndex(clampedIndex);\n\t\t}\n\t}, [selection, activeSelectedOption, activeSelectedOptionIndex]);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [handleClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst getCustomPopoverProps = useCallback(\n\t\t(body: ReactNode) => {\n\t\t\tconst popoverBody = (\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t\t</div>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst popoverFooter = (\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\thandleClose(e, { trigger: 'cancel' });\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\thandleClose as unknown as (\n\t\t\t\t\t\t\t\tevent: React.MouseEvent<HTMLButtonElement>\n\t\t\t\t\t\t\t) => void\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\t\talign: 'bottom',\n\t\t\t\tbody: popoverBody,\n\t\t\t\tclassName: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tfooterClassName: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen: isOpenState,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonRequestClose: handleClose,\n\t\t\t};\n\n\t\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t\tRecord<string, unknown> | undefined;\n\t\t\tconst popoverProps = assign(\n\t\t\t\tdefaultPopoverProps,\n\t\t\t\tpopoverPropsFromProp || {}\n\t\t\t);\n\t\t\tpopoverProps.body = popoverBody;\n\n\t\t\tdelete popoverProps.children;\n\t\t\treturn popoverProps;\n\t\t},\n\t\t[\n\t\t\tgetId,\n\t\t\tassistiveText.popoverLabel,\n\t\t\tlabels.cancelButton,\n\t\t\tlabels.doneButton,\n\t\t\thandleClose,\n\t\t\tisOpenState,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonClose: handleClose,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tdisabled,\n\t\t\tgetIsOpen,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleClose,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\t// `onRenderMenuItem` and `menuItem` are deprecated: they take a component instead of a function\n\tconst LegacyMenuItem = onRenderMenuItem || menuItem;\n\tlet renderMenuItem: ((data: MenuRenderMenuItemData) => ReactNode) | undefined;\n\tif (renderMenuItemProp) {\n\t\trenderMenuItem = (data) => renderMenuItemProp({ ...data, assistiveText });\n\t} else if (LegacyMenuItem) {\n\t\trenderMenuItem = ({ isSelected, option }) => (\n\t\t\t<LegacyMenuItem\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tselected={isSelected}\n\t\t\t\toption={option}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\trenderMenuItem={renderMenuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\trenderMenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? (selection[0].label as string)\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t{ body?: ReactNode } | undefined;\n\t\tconst popoverProps = getCustomPopoverProps(popoverPropsFromProp?.body);\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from getCustomPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: (selection[0]?.label as string) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Combobox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAI,GACE,KAAkB,OAAO,WAAa,KAuFtC,KAAc,OAAO,YAAY,GAMjC,MAAmB,MACxB,MAAe,GAEV,MACL,GACA,OACoB;CACpB,IAAI,EAAK,MAAM;CACf,MAAM,EAAK;CACX,OAAO,EAAK;CACZ,UAAU,EAAK;CACf;EACC,KAAc;AAChB,IAmIM,KAAwD;CAC7D,OAAO;CACP,kBAAkB;CAClB,sBAAsB;CACtB,cAAc;CACd,4BAA4B;CAC5B,YAAY;CACZ,sBAAsB;AACvB,GAEM,KAA0C;CAC/C,gBAAgB;CAChB,OAAO;CACP,cAAc;CACd,YAAY;CACZ,yBAAyB;CACzB,gBAAgB;CAChB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;CACjB,4BAA4B;CAC5B,gBAAgB;AACjB,GAEM,KAAgC,CAAC,GAIjC,MAAqC,OAAU;CACpD,IAAM,EACL,eAAe,KAAoB,CAAC,GACpC,oBAAoB,IACpB,cACA,wBACA,mBACA,4BACA,iBACA,cACA,oBACA,cACA,QAAQ,KAAa,CAAC,GACtB,2BACA,iBACA,qBACA,oBACA,wBACA,IAAI,IACJ,qBAAiB,UACjB,WACA,UAAU,IACV,QAAQ,GACR,QAAQ,KAAa,CAAC,GACtB,2BACA,kBACA,mBAAe,YACf,aACA,sBACA,cAAU,CAAC,GACX,qBAAiB,CAAC,GAClB,0BAAsB,CAAC,GACvB,YACA,0BACA,cAAW,IACX,eAAY,CAAC,GACb,oBAAoB,IACpB,0BAAsB,IACtB,6BACA,UACA,aAAU,QACV,gBAAgB,IAChB,iBACG,IAGE,IAAgB,GAAO,CAAC,GAAG,IAAsB,EAAiB,GAClE,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c,GAAW,EAAE,CAAC;MACxC,KACA,kBAAC,OAAD;OAAK,IAAI,EAAW;OAAG,WAAU;OAC/B,UAAA;MACG,CAAA;KAEF;;GACD,CAAA;EACD,CAAA;CAEP,GAIM,KAAmB,EAAO,SAAS,GAAe,OAElD,KAA8D;EACnE,MAAM;GACL,UAAU;GACV,QAAQ;EACT;EACA,kBAAkB;GACjB,UAAU;GACV,QAAQ;EACT;EACA,SAAS;GACR,UAAU;GACV,QAAQ;EACT;EACA,UAAU;GACT,UAAU;GACV,QAAQ;EACT;CACD,GAEM,KAAmB,IAAW,aAAa,UAC3C,KAAkB,GAAW,EAAQ,GAAG,KAExC,KACL,kBAAC,OAAD;EAAK,WAAW,EAAW,qBAAqB,EAAkB;EAAlE,UAAA;GACE,KAAiB,OACjB,kBAAC,IAAD;IAEE;IAKD,SAAS,EAAM;IACf,OAAO,EAAO;IACJ;GACV,CAAA;GAED,MAAyB,KACzB,kBAAC,IAAD,EAEwB,0BACvB,CAAA,IACE;GACH,KAAkB,GAAgB,IAAI,GAAW,KAAK,SAAS;EAC5D;;CAGN,OAAO,KACN,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACC,kBAAC,IAAD;GAEE;GAED,SAAS,EAAM;GACf,OAAO,EAAO;GACJ;EACV,CAAA,GACD,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACC,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,GAEL,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,CACD;;EACD,CAAA,CACD;CAEL,CAAA,IAAA;AAEF;AAEA,GAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"combobox.js","names":[],"sources":["../../../../components/combobox/combobox.tsx"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n\nimport React, {\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\tuseEffect,\n\tuseContext,\n\ttype ReactNode,\n\ttype ReactElement,\n} from 'react';\n\nimport assign from 'lodash.assign';\nimport find from 'lodash.find';\nimport reject from 'lodash.reject';\nimport { dequal as isEqual } from 'dequal';\nimport findIndex from 'lodash.findindex';\nimport isFunction from 'lodash.isfunction';\n\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Dialog from '../utilities/dialog';\nimport InnerInput from '../input/private/inner-input';\nimport InputIcon from '../icon/input-icon';\nimport Menu, {\n\ttype ComboboxOption,\n\ttype ComboboxItemOption,\n\ttype ComboboxActionOption,\n\ttype ComboboxDeselectOption,\n\ttype MenuRenderMenuItemData,\n} from './private/menu';\nimport Label from '../forms/private/label';\nimport Popover from '../popover';\nimport SelectedListBox from '../pill-container/private/selected-listbox';\n\nimport FieldLevelHelpTooltip from '../tooltip/private/field-level-help-tooltip';\nimport KEYS from '../../utilities/key-code';\nimport KeyBuffer from '../../utilities/key-buffer';\nimport keyLetterMenuItemSelect from '../../utilities/key-letter-menu-item-select';\nimport mapKeyEventCallbacks from '../../utilities/key-callbacks';\nimport menuItemSelectScroll from '../../utilities/menu-item-select-scroll';\n\nimport checkProps from './check-props';\n\nimport { COMBOBOX } from '../../utilities/constants';\nimport type { SelectedListBoxOption } from '../pill-container/private/selected-listbox';\nimport generateId from '../../utilities/generate-id';\nimport componentDoc from './component.json';\nimport { IconSettingsContext } from '../icon-settings';\n\nlet currentOpenDropdown: { handleClose: () => void } | undefined;\nconst documentDefined = typeof document !== 'undefined';\n\n// ===== Types =====\n\nexport interface ComboboxAssistiveText {\n\tlabel?: string;\n\tloadingMenuItems?: string;\n\toptionSelectedInMenu?: string;\n\tpopoverLabel?: string;\n\tremoveSingleSelectedOption?: string;\n\tremovePill?: string;\n\tselectedListboxLabel?: string;\n}\n\nexport interface ComboboxLabels {\n\tdeselectOption?: string;\n\tlabel?: ReactNode | string;\n\tcancelButton?: string;\n\tdoneButton?: string;\n\tmultipleOptionsSelected?: string;\n\tnoOptionsFound?: ReactNode | string;\n\tplaceholder?: string;\n\tplaceholderReadOnly?: string;\n\tremovePillTitle?: string;\n\toptionDisabledTooltipLabel?: string;\n\tinputIconTitle?: string;\n}\n\nexport interface ComboboxEvents {\n\tonBlur?: (event: React.FocusEvent) => void;\n\tonChange?: (\n\t\tevent: React.ChangeEvent<HTMLInputElement>,\n\t\tdata: { value: string }\n\t) => void;\n\tonClose?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonFocus?: (event: React.FocusEvent, data: Record<string, unknown>) => void;\n\tonOpen?: (\n\t\tevent: React.SyntheticEvent | undefined,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestClose?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: Record<string, unknown>\n\t) => void;\n\tonRequestOpen?: () => void;\n\tonRequestRemoveSelectedOption?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\tonSelect?: (\n\t\tevent: React.SyntheticEvent,\n\t\tdata: { selection: ComboboxOption[] }\n\t) => void;\n\t/** Fires when an `optionsSearchEntity` or `optionsAddItem` row is chosen by\n\t * click or Enter. `value` is the current input text. */\n\tonSelectActionItem?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem; value: string }\n\t) => void;\n\tonSubmit?: (event: React.KeyboardEvent, data: { value: string }) => void;\n}\n\n/**\n * An action row in the menu: `optionsSearchEntity` items render above the\n * options, `optionsAddItem` items below them. Choosing one (click or Enter)\n * calls `events.onSelectActionItem` and closes the menu. Action rows are\n * commands, not records, so they never fire `onSelect` or enter the selection.\n */\nexport interface ComboboxActionItem {\n\tid?: string;\n\ticon?: ReactNode;\n\tlabel?: string | ((searchTerm: string) => ReactNode);\n\tdisabled?: boolean;\n\t/** @deprecated Use `events.onSelectActionItem`. If both are set, both are\n\t * called, this one first. */\n\tonClick?: (\n\t\tevent: React.MouseEvent | React.KeyboardEvent,\n\t\tdata: { option: ComboboxActionItem }\n\t) => void;\n}\n\n// A menu row built from a `ComboboxActionItem`. The original item is stored\n// under a module-private symbol, so consumer data in `options` (which may come\n// from untyped JS and carry arbitrary keys) can't impersonate one.\nconst ACTION_ITEM = Symbol('actionItem');\n\ntype ActionItemRow = ComboboxActionOption & {\n\t[ACTION_ITEM]: ComboboxActionItem;\n};\n\nconst isActionItemRow = (option: ComboboxOption): option is ActionItemRow =>\n\tACTION_ITEM in option;\n\nconst toActionItemRow = (\n\titem: ComboboxActionItem,\n\ttype: ActionItemRow['type']\n): ActionItemRow => ({\n\tid: item.id || '',\n\ticon: item.icon,\n\tlabel: item.label,\n\tdisabled: item.disabled,\n\ttype,\n\t[ACTION_ITEM]: item,\n});\n\n/**\n * Argument passed to `renderMenuItem`\n */\nexport interface ComboboxRenderMenuItemData extends MenuRenderMenuItemData {\n\t/** The combobox's assistive text */\n\tassistiveText: ComboboxAssistiveText;\n}\n\n/**\n * Component accepted by the deprecated `onRenderMenuItem` and `menuItem` props\n */\ntype ComboboxLegacyMenuItem = React.ComponentType<{\n\tassistiveText?: ComboboxAssistiveText;\n\tselected: boolean;\n\t/** Custom renderers only receive selectable rows */\n\toption: ComboboxItemOption | ComboboxDeselectOption;\n}>;\n\ninterface ComboboxBaseProps {\n\t/** aria-describedby attribute */\n\t'aria-describedby'?: string;\n\t/** CSS classes for combobox container */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for top level container */\n\tclassNameContainer?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for dropdown menu */\n\tclassNameMenu?: string | string[] | Record<string, boolean>;\n\t/** CSS classes for menu sub header */\n\tclassNameMenuSubHeader?: string | string[] | Record<string, boolean>;\n\t/** Default input value for uncontrolled usage */\n\tdefaultValue?: string;\n\t/** Whether component is disabled */\n\tdisabled?: boolean;\n\t/** Entity combobox for grouped comboboxes */\n\tentityCombobox?: ReactNode;\n\t/** Error text to display */\n\terrorText?: string;\n\t/** Event callbacks */\n\tevents?: ComboboxEvents;\n\t/** Field level help tooltip */\n\tfieldLevelHelpTooltip?: ReactNode;\n\t/** Whether to show deselect option */\n\thasDeselect?: boolean;\n\t/** Whether to show input spinner */\n\thasInputSpinner?: boolean;\n\t/** Whether to show menu spinner */\n\thasMenuSpinner?: boolean;\n\t/** Whether to use static alignment */\n\thasStaticAlignment?: boolean;\n\t/** HTML id */\n\tid?: string;\n\t/** Sets dialog width inheritance */\n\tinheritWidthOf?: 'target' | 'menu' | 'none';\n\t/** Custom input component */\n\tinput?: ReactElement;\n\t/** Callback to get input ref */\n\tinputRef?: (ref: HTMLInputElement | null) => void;\n\t/** Whether the dropdown is open (controlled) */\n\tisOpen?: boolean;\n\t/** Text labels */\n\tlabels?: ComboboxLabels;\n\t/** Menu item visible length */\n\tmenuItemVisibleLength?: 5 | 7 | 10;\n\t/** Menu max width */\n\tmenuMaxWidth?: string;\n\t/** Menu position */\n\tmenuPosition?: 'absolute' | 'overflowBoundaryElement' | 'relative';\n\t/** Whether multiple selection is allowed */\n\tmultiple?: boolean;\n\t/**\n\t * @deprecated Use `renderMenuItem`, which is called as a function with\n\t * `{ assistiveText, isSelected, option }`.\n\t */\n\tonRenderMenuItem?: ComboboxLegacyMenuItem;\n\t/** Action items shown below the options, such as \"New Account\" */\n\toptionsAddItem?: ComboboxActionItem[];\n\t/** Action items shown above the options, such as \"Search in Accounts\" */\n\toptionsSearchEntity?: ComboboxActionItem[];\n\t/** Whether only predefined options are allowed */\n\tpredefinedOptionsOnly?: boolean;\n\t/** Whether field is required */\n\trequired?: boolean;\n\t/** Selected options */\n\tselection: ComboboxOption[];\n\t/** Callback to get selected listbox ref */\n\tselectedListboxRef?: (ref: HTMLUListElement | null) => void;\n\t/** Whether single input is disabled */\n\tsingleInputDisabled?: boolean;\n\t/** Tooltip for disabled menu items */\n\ttooltipMenuItemDisabled?: ReactElement;\n\t/** Input value (controlled) */\n\tvalue?: string;\n\t/**\n\t * Renders each option's content in place of the default label and icon.\n\t * Receives `{ assistiveText, isSelected, option }`.\n\t */\n\trenderMenuItem?: (data: ComboboxRenderMenuItemData) => ReactNode;\n\t/** @deprecated Use `renderMenuItem` instead. */\n\tmenuItem?: ComboboxLegacyMenuItem;\n}\n\n/**\n * `variant` decides where the menu content comes from: `options` for the\n * listbox variants, or a custom `popover` dialog.\n */\nexport type ComboboxVariantProps =\n\t| {\n\t\t\t/** Listbox variants. Defaults to `base`. */\n\t\t\tvariant?: 'base' | 'inline-listbox' | 'readonly';\n\t\t\t/** Assistive text for accessibility */\n\t\t\tassistiveText?: ComboboxAssistiveText;\n\t\t\t/** Menu options */\n\t\t\toptions: ComboboxOption[];\n\t\t\tpopover?: never;\n\t }\n\t| {\n\t\t\t/** Custom dialog content instead of a listbox */\n\t\t\tvariant: 'popover';\n\t\t\t/** Assistive text for accessibility. `popoverLabel` labels the dialog. */\n\t\t\tassistiveText: ComboboxAssistiveText & { popoverLabel: string };\n\t\t\toptions?: never;\n\t\t\t/** Popover component rendered as the dialog */\n\t\t\tpopover: ReactElement;\n\t };\n\nexport type ComboboxProps = ComboboxBaseProps & ComboboxVariantProps;\n\n// ===== Default Props =====\n\nconst defaultAssistiveText: Required<ComboboxAssistiveText> = {\n\tlabel: '',\n\tloadingMenuItems: 'Loading',\n\toptionSelectedInMenu: 'Current Selection:',\n\tpopoverLabel: '',\n\tremoveSingleSelectedOption: 'Remove selected option',\n\tremovePill: ', Press delete or backspace to remove',\n\tselectedListboxLabel: 'Selected Options:',\n};\n\nconst defaultLabels: Required<ComboboxLabels> = {\n\tdeselectOption: 'None',\n\tlabel: '',\n\tcancelButton: 'Cancel',\n\tdoneButton: 'Done',\n\tmultipleOptionsSelected: '',\n\tnoOptionsFound: 'No matches found.',\n\tplaceholder: '',\n\tplaceholderReadOnly: 'Select an Option',\n\tremovePillTitle: 'Remove',\n\toptionDisabledTooltipLabel: 'This option is disabled.',\n\tinputIconTitle: '',\n};\n\nconst defaultEvents: ComboboxEvents = {};\n\n// ===== Component =====\n\nconst Combobox: React.FC<ComboboxProps> = (props) => {\n\tconst {\n\t\tassistiveText: assistiveTextProp = {},\n\t\t'aria-describedby': ariaDescribedby,\n\t\tclassName,\n\t\tclassNameContainer,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tdefaultValue,\n\t\tdisabled,\n\t\tentityCombobox,\n\t\terrorText,\n\t\tevents: eventsProp = {},\n\t\tfieldLevelHelpTooltip,\n\t\thasDeselect,\n\t\thasInputSpinner,\n\t\thasMenuSpinner,\n\t\thasStaticAlignment,\n\t\tid: idProp,\n\t\tinheritWidthOf = 'target',\n\t\tinput,\n\t\tinputRef: inputRefCallback,\n\t\tisOpen: isOpenProp,\n\t\tlabels: labelsProp = {},\n\t\tmenuItemVisibleLength,\n\t\tmenuMaxWidth,\n\t\tmenuPosition = 'absolute',\n\t\tmultiple,\n\t\tonRenderMenuItem,\n\t\toptions = [],\n\t\toptionsAddItem = [],\n\t\toptionsSearchEntity = [],\n\t\tpopover,\n\t\tpredefinedOptionsOnly,\n\t\trequired = false,\n\t\tselection = [],\n\t\tselectedListboxRef: selectedListboxRefCallback,\n\t\tsingleInputDisabled = false,\n\t\ttooltipMenuItemDisabled,\n\t\tvalue,\n\t\tvariant = 'base',\n\t\trenderMenuItem: renderMenuItemProp,\n\t\tmenuItem,\n\t} = props;\n\n\t// Merge with defaults\n\tconst assistiveText = assign({}, defaultAssistiveText, assistiveTextProp);\n\tconst labels = assign({}, defaultLabels, labelsProp);\n\tconst events = assign({}, defaultEvents, eventsProp);\n\n\t// Context\n\tconst iconSettingsContext = useContext(IconSettingsContext);\n\n\t// Refs\n\tconst inputRef = useRef<HTMLInputElement | null>(null);\n\tconst menuRef = useRef<HTMLUListElement | null>(null);\n\tconst selectedListboxRef = useRef<HTMLUListElement | null>(null);\n\tconst activeSelectedOptionRef = useRef<HTMLElement | null>(null);\n\tconst buttonRef = useRef<HTMLButtonElement | null>(null);\n\tconst menuKeyBuffer = useRef(new KeyBuffer());\n\n\t// Generated IDs\n\tconst generatedId = useRef(generateId());\n\tconst generatedErrorId = useRef(generateId());\n\tconst getId = useCallback(() => idProp || generatedId.current, [idProp]);\n\tconst deselectId = `${getId()}-deselect`;\n\n\t// State\n\tconst [activeOption, setActiveOption] = useState<ComboboxOption | undefined>(\n\t\tundefined\n\t);\n\tconst [activeOptionIndex, setActiveOptionIndex] = useState(-1);\n\tconst [activeSelectedOption, setActiveSelectedOption] = useState<\n\t\tComboboxOption | undefined\n\t>(selection?.[0]);\n\tconst [activeSelectedOptionIndex, setActiveSelectedOptionIndex] = useState(0);\n\tconst [listboxHasFocus, setListboxHasFocus] = useState(false);\n\tconst [isOpenState, setIsOpenState] = useState(\n\t\ttypeof isOpenProp === 'boolean' ? isOpenProp : false\n\t);\n\tconst [inputRendered, setInputRendered] = useState(false);\n\n\t// Check props on mount\n\tuseEffect(() => {\n\t\tcheckProps(\n\t\t\tCOMBOBOX,\n\t\t\tprops as unknown as Record<string, unknown>,\n\t\t\tcomponentDoc\n\t\t);\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, []);\n\n\t// Derived state\n\tconst getIsOpen = useCallback(() => {\n\t\treturn !!(typeof isOpenProp === 'boolean' ? isOpenProp : isOpenState);\n\t}, [isOpenProp, isOpenState]);\n\n\tconst getIsActiveOption = useCallback(() => {\n\t\treturn activeOption && activeOptionIndex !== -1;\n\t}, [activeOption, activeOptionIndex]);\n\n\tconst getErrorId = useCallback(() => {\n\t\treturn ariaDescribedby || (errorText && generatedErrorId.current);\n\t}, [ariaDescribedby, errorText]);\n\n\t// Build options list\n\tconst getOptions = useCallback(() => {\n\t\tconst deselectOption: ComboboxOption = {\n\t\t\tid: deselectId,\n\t\t\tlabel: labels.deselectOption,\n\t\t\tvalue: '',\n\t\t\ttype: 'deselect',\n\t\t};\n\n\t\tconst localOptionsSearchEntity = optionsSearchEntity.map((item) =>\n\t\t\ttoActionItemRow(item, 'header')\n\t\t);\n\n\t\tconst localOptionsAddItem = optionsAddItem.map((item) =>\n\t\t\ttoActionItemRow(item, 'footer')\n\t\t);\n\n\t\treturn [\n\t\t\t...(localOptionsSearchEntity.length > 0 ? localOptionsSearchEntity : []),\n\t\t\t...(hasDeselect ? [deselectOption] : []),\n\t\t\t...(options && options.length > 0 ? options : []),\n\t\t\t...(localOptionsAddItem.length > 0 ? localOptionsAddItem : []),\n\t\t];\n\t}, [\n\t\tdeselectId,\n\t\tlabels.deselectOption,\n\t\toptionsSearchEntity,\n\t\toptionsAddItem,\n\t\thasDeselect,\n\t\toptions,\n\t]);\n\n\tconst isSelected = useCallback(\n\t\t({\n\t\t\tselection: sel,\n\t\t\toption,\n\t\t}: {\n\t\t\tselection: ComboboxOption[];\n\t\t\toption: ComboboxOption;\n\t\t}) => {\n\t\t\treturn !!find(sel, option);\n\t\t},\n\t\t[]\n\t);\n\n\t// Get new active option index (for navigation)\n\tconst getNewActiveOptionIndex = useCallback(\n\t\t({\n\t\t\tactiveOptionIndex: currentIndex,\n\t\t\toffset,\n\t\t\toptions: opts,\n\t\t}: {\n\t\t\tactiveOptionIndex: number;\n\t\t\toffset: number;\n\t\t\toptions: ComboboxOption[];\n\t\t}) => {\n\t\t\tconst nextIndex = currentIndex + offset;\n\t\t\tconst skipIndex =\n\t\t\t\topts.length > nextIndex &&\n\t\t\t\tnextIndex >= 0 &&\n\t\t\t\topts[nextIndex].type === 'separator';\n\t\t\tconst newIndex = skipIndex ? nextIndex + offset : nextIndex;\n\t\t\tconst hasNewIndex = opts.length > nextIndex && nextIndex >= 0;\n\t\t\treturn hasNewIndex ? newIndex : currentIndex;\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Event Handlers =====\n\n\tconst handleClose = useCallback(\n\t\t(event?: React.SyntheticEvent, { trigger }: { trigger?: string } = {}) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t\tsetIsOpenState(false);\n\n\t\t\t\tif (variant === 'popover' && trigger === 'cancel') {\n\t\t\t\t\tconst popoverProps = popover?.props as\n\t\t\t\t\t\t| { onClose?: (event: unknown, data: { trigger: string }) => void }\n\t\t\t\t\t\t| undefined;\n\t\t\t\t\tif (popoverProps?.onClose) {\n\t\t\t\t\t\tpopoverProps.onClose(event, { trigger });\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (events.onClose) {\n\t\t\t\t\tevents.onClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, variant, popover, events]\n\t);\n\n\tconst handleOpen = useCallback(\n\t\t(event?: React.SyntheticEvent, data?: Record<string, unknown>) => {\n\t\t\tconst isOpen = getIsOpen();\n\n\t\t\tif (!isOpen) {\n\t\t\t\tif (\n\t\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\t\tisFunction(currentOpenDropdown.handleClose)\n\t\t\t\t) {\n\t\t\t\t\tcurrentOpenDropdown.handleClose();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentOpenDropdown = { handleClose };\n\n\t\t\t\tsetIsOpenState(true);\n\n\t\t\t\tif (events.onOpen) {\n\t\t\t\t\tevents.onOpen(event, data || {});\n\t\t\t\t}\n\n\t\t\t\tif (variant === 'readonly') {\n\t\t\t\t\tconst opts = getOptions();\n\t\t\t\t\tconst idx = findIndex(opts, (item) => isEqual(item, selection[0]));\n\n\t\t\t\t\tsetActiveOptionIndex(idx);\n\t\t\t\t\tsetActiveOption(selection[0]);\n\n\t\t\t\t\tif (menuRef.current !== null) {\n\t\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\t\tfocusedIndex: idx,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleClose, events, variant, getOptions, selection]\n\t);\n\n\tconst handleRequestClose = useCallback(\n\t\t(event: React.SyntheticEvent, data: Record<string, unknown>) => {\n\t\t\tif (events.onRequestClose) {\n\t\t\t\tevents.onRequestClose(event, data);\n\t\t\t}\n\t\t\tif (getIsOpen()) {\n\t\t\t\thandleClose(event, { trigger: 'cancel' });\n\t\t\t}\n\t\t},\n\t\t[events, getIsOpen, handleClose]\n\t);\n\n\tconst openDialog = useCallback(() => {\n\t\tif (events.onRequestOpen) {\n\t\t\tevents.onRequestOpen();\n\t\t} else {\n\t\t\tsetIsOpenState(true);\n\t\t}\n\t}, [events]);\n\n\tconst requestOpenMenu = useCallback(() => {\n\t\tconst isInlineSingleSelectionAndIsNotSelected =\n\t\t\t!multiple && selection.length === 0 && variant === 'inline-listbox';\n\n\t\tif (\n\t\t\tisInlineSingleSelectionAndIsNotSelected ||\n\t\t\tmultiple ||\n\t\t\tvariant === 'readonly'\n\t\t) {\n\t\t\topenDialog();\n\t\t}\n\t}, [multiple, selection.length, variant, openDialog]);\n\n\tconst handleClickOutside = useCallback(\n\t\t(event: MouseEvent | TouchEvent) => {\n\t\t\thandleRequestClose(event as unknown as React.SyntheticEvent, {});\n\t\t},\n\t\t[handleRequestClose]\n\t);\n\n\tconst handleSelect = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{\n\t\t\t\tselection: sel,\n\t\t\t\toption,\n\t\t\t}: { selection: ComboboxOption[]; option: ComboboxOption }\n\t\t) => {\n\t\t\tif (isActionItemRow(option)) {\n\t\t\t\tconst actionItem = option[ACTION_ITEM];\n\t\t\t\tconst actionEvent = event as React.MouseEvent | React.KeyboardEvent;\n\t\t\t\tactionItem.onClick?.(actionEvent, { option: actionItem });\n\t\t\t\tevents.onSelectActionItem?.(actionEvent, {\n\t\t\t\t\toption: actionItem,\n\t\t\t\t\tvalue: inputRef.current?.value ?? '',\n\t\t\t\t});\n\t\t\t\thandleClose();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet newSelection: ComboboxOption[];\n\t\t\tconst selected = isSelected({ selection: sel, option });\n\t\t\tconst singleSelectAndSelectedWasNotClicked = !multiple && !selected;\n\t\t\tconst multiSelectAndSelectedWasNotClicked = multiple && !selected;\n\t\t\tconst deselectWasClicked = option.id === deselectId;\n\n\t\t\tif (deselectWasClicked) {\n\t\t\t\tnewSelection = [];\n\t\t\t} else if (singleSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [option];\n\t\t\t} else if (multiSelectAndSelectedWasNotClicked) {\n\t\t\t\tnewSelection = [...selection, option];\n\t\t\t} else {\n\t\t\t\tnewSelection = reject(selection, option);\n\t\t\t}\n\n\t\t\tif (events.onSelect) {\n\t\t\t\tevents.onSelect(event, { selection: newSelection });\n\t\t\t}\n\n\t\t\thandleClose();\n\t\t},\n\t\t[isSelected, multiple, deselectId, selection, events, handleClose]\n\t);\n\n\tconst handleInputBlur = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tconst activeElement = documentDefined ? document.activeElement : null;\n\t\t\t\tif (\n\t\t\t\t\tactiveElement &&\n\t\t\t\t\tactiveElement.tagName === 'DIV' &&\n\t\t\t\t\tactiveElement.id === `${getId()}-listbox`\n\t\t\t\t) {\n\t\t\t\t\tif (inputRef.current) {\n\t\t\t\t\t\tinputRef.current.focus();\n\t\t\t\t\t}\n\t\t\t\t} else if (!popover) {\n\t\t\t\t\thandleClose(event);\n\t\t\t\t}\n\t\t\t}, 200);\n\n\t\t\tif (events.onBlur) {\n\t\t\t\tevents.onBlur(event);\n\t\t\t}\n\t\t},\n\t\t[getId, popover, handleClose, events]\n\t);\n\n\tconst handleInputChange = useCallback(\n\t\t(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\trequestOpenMenu();\n\t\t\tif (events.onChange) {\n\t\t\t\tevents.onChange(event, { value: event.target.value });\n\t\t\t}\n\t\t},\n\t\t[requestOpenMenu, events]\n\t);\n\n\tconst handleInputFocus = useCallback(\n\t\t(event: React.FocusEvent) => {\n\t\t\tif (events.onFocus) {\n\t\t\t\tevents.onFocus(event, {});\n\t\t\t}\n\t\t},\n\t\t[events]\n\t);\n\n\tconst handleInputSubmit = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (activeOption === undefined && activeOptionIndex === -1) {\n\t\t\t\tif (!isOpenState) {\n\t\t\t\t\tif (!event.shiftKey) {\n\t\t\t\t\t\topenDialog();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\thandleRequestClose(event, {});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (activeOption?.disabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Legacy: `type: 'header' | 'footer'` rows passed directly in `options`\n\t\t\t// keep their pre-v11 Enter behavior of calling `option.onClick`.\n\t\t\tif (\n\t\t\t\tactiveOption &&\n\t\t\t\t!isActionItemRow(activeOption) &&\n\t\t\t\t(activeOption.type === 'header' || activeOption.type === 'footer')\n\t\t\t) {\n\t\t\t\tactiveOption.onClick?.(event as unknown as React.MouseEvent);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (getIsActiveOption()) {\n\t\t\t\thandleSelect(event, {\n\t\t\t\t\toption: activeOption!,\n\t\t\t\t\tselection,\n\t\t\t\t});\n\t\t\t} else if (\n\t\t\t\t!predefinedOptionsOnly &&\n\t\t\t\t(event.target as HTMLInputElement).value !== '' &&\n\t\t\t\tevents.onSubmit\n\t\t\t) {\n\t\t\t\tevents.onSubmit(event, {\n\t\t\t\t\tvalue: (event.target as HTMLInputElement).value,\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[\n\t\t\tactiveOption,\n\t\t\tactiveOptionIndex,\n\t\t\tisOpenState,\n\t\t\topenDialog,\n\t\t\thandleRequestClose,\n\t\t\tgetIsActiveOption,\n\t\t\thandleSelect,\n\t\t\tselection,\n\t\t\tpredefinedOptionsOnly,\n\t\t\tevents,\n\t\t]\n\t);\n\n\tconst handleNavigateListboxMenu = useCallback(\n\t\t(\n\t\t\tevent: React.KeyboardEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst opts = getOptions();\n\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\tactiveOptionIndex,\n\t\t\t\toffset: offsets[direction],\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\tfocusedIndex: newIndex,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tsetActiveOption(opts[newIndex]);\n\t\t\tsetActiveOptionIndex(newIndex);\n\t\t},\n\t\t[getOptions, getNewActiveOptionIndex, activeOptionIndex, getIsOpen]\n\t);\n\n\tconst handleNavigateSelectedListbox = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ direction }: { direction: 'next' | 'previous' }\n\t\t) => {\n\t\t\tconst offsets = { next: 1, previous: -1 };\n\t\t\tconst isLastOptionAndRightIsPressed =\n\t\t\t\tactiveSelectedOptionIndex + 1 === selection.length &&\n\t\t\t\tdirection === 'next';\n\t\t\tconst isFirstOptionAndLeftIsPressed =\n\t\t\t\tactiveSelectedOptionIndex === 0 && direction === 'previous';\n\n\t\t\tif (isLastOptionAndRightIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[0]);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (isFirstOptionAndLeftIsPressed) {\n\t\t\t\tsetActiveSelectedOption(selection[selection.length - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(selection.length - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else {\n\t\t\t\tconst newIndex = getNewActiveOptionIndex({\n\t\t\t\t\tactiveOptionIndex: activeSelectedOptionIndex,\n\t\t\t\t\toffset: offsets[direction],\n\t\t\t\t\toptions: selection,\n\t\t\t\t});\n\t\t\t\tsetActiveSelectedOption(selection[newIndex]);\n\t\t\t\tsetActiveSelectedOptionIndex(newIndex);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[activeSelectedOptionIndex, selection, getNewActiveOptionIndex]\n\t);\n\n\tconst handleKeyDownDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey) {\n\t\t\t\topenDialog();\n\t\t\t}\n\n\t\t\tif (variant !== 'popover') {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'next' });\n\t\t\t}\n\t\t},\n\t\t[openDialog, variant, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownUp = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tif (!event.shiftKey && getIsOpen()) {\n\t\t\t\thandleNavigateListboxMenu(event, { direction: 'previous' });\n\t\t\t}\n\t\t},\n\t\t[getIsOpen, handleNavigateListboxMenu]\n\t);\n\n\tconst handleKeyDownTab = useCallback(() => {\n\t\tif (selectedListboxRef.current) {\n\t\t\tsetListboxHasFocus(true);\n\t\t}\n\t}, []);\n\n\tconst handleKeyDownOther = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst opts = getOptions();\n\t\t\tconst newActiveOptionIndex = keyLetterMenuItemSelect({\n\t\t\t\tkey: event.key,\n\t\t\t\tkeyBuffer: menuKeyBuffer.current,\n\t\t\t\tkeyCode: event.keyCode,\n\t\t\t\toptions: opts,\n\t\t\t});\n\n\t\t\tif (newActiveOptionIndex !== undefined) {\n\t\t\t\tif (getIsOpen() && menuRef.current) {\n\t\t\t\t\tmenuItemSelectScroll({\n\t\t\t\t\t\tcontainer: menuRef.current,\n\t\t\t\t\t\tfocusedIndex: newActiveOptionIndex,\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\tsetActiveOption(opts[newActiveOptionIndex]);\n\t\t\t\tsetActiveOptionIndex(newActiveOptionIndex);\n\t\t\t}\n\t\t},\n\t\t[getOptions, getIsOpen]\n\t);\n\n\tconst handleKeyDown = useCallback(\n\t\t(event: React.KeyboardEvent) => {\n\t\t\tconst callbacks: Record<\n\t\t\t\tnumber | string,\n\t\t\t\t| {\n\t\t\t\t\t\tcallback: (e: React.KeyboardEvent) => void;\n\t\t\t\t\t\tstopPropagation?: boolean;\n\t\t\t\t }\n\t\t\t\t| undefined\n\t\t\t> = {\n\t\t\t\t[KEYS.DOWN]: { callback: handleKeyDownDown },\n\t\t\t\t[KEYS.ENTER]: { callback: handleInputSubmit },\n\t\t\t\t[KEYS.ESCAPE]: {\n\t\t\t\t\tcallback: handleClose as (e: React.KeyboardEvent) => void,\n\t\t\t\t},\n\t\t\t\t[KEYS.UP]: { callback: handleKeyDownUp },\n\t\t\t};\n\n\t\t\tif (variant === 'readonly') {\n\t\t\t\tif (selection.length > 2) {\n\t\t\t\t\tcallbacks[KEYS.TAB] = { callback: handleKeyDownTab };\n\t\t\t\t} else {\n\t\t\t\t\tcallbacks[KEYS.TAB] = undefined;\n\t\t\t\t}\n\t\t\t\tcallbacks.other = {\n\t\t\t\t\tcallback: handleKeyDownOther,\n\t\t\t\t\tstopPropagation: false,\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tconst stopPropagation = getIsOpen();\n\n\t\t\tmapKeyEventCallbacks(event, { callbacks, stopPropagation });\n\t\t},\n\t\t[\n\t\t\thandleKeyDownDown,\n\t\t\thandleInputSubmit,\n\t\t\thandleClose,\n\t\t\thandleKeyDownUp,\n\t\t\tvariant,\n\t\t\tselection.length,\n\t\t\thandleKeyDownTab,\n\t\t\thandleKeyDownOther,\n\t\t\tgetIsOpen,\n\t\t]\n\t);\n\n\tconst handleBlurPill = useCallback(() => {\n\t\tsetListboxHasFocus(false);\n\t}, []);\n\n\tconst handlePillFocus = useCallback(\n\t\t(\n\t\t\tevent: React.FocusEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index: number }\n\t\t) => {\n\t\t\tif (!listboxHasFocus) {\n\t\t\t\tsetActiveSelectedOption(option);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\t\t},\n\t\t[listboxHasFocus]\n\t);\n\n\tconst handleRemoveSelectedOption = useCallback(\n\t\t(\n\t\t\tevent: React.SyntheticEvent,\n\t\t\t{ option, index }: { option: ComboboxOption; index?: number }\n\t\t) => {\n\t\t\tevent.preventDefault();\n\t\t\tconst onlyOnePillAndInputExists = selection.length === 1;\n\t\t\tconst isReadOnlyAndTwoPillsExists =\n\t\t\t\tselection.length === 2 && variant === 'readonly' && multiple;\n\t\t\tconst lastPillWasRemoved =\n\t\t\t\tindex !== undefined && index + 1 === selection.length;\n\n\t\t\tif (\n\t\t\t\t(onlyOnePillAndInputExists || isReadOnlyAndTwoPillsExists) &&\n\t\t\t\tinputRef.current\n\t\t\t) {\n\t\t\t\tinputRef.current.focus();\n\t\t\t} else if (lastPillWasRemoved && index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index - 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index - 1);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t} else if (index !== undefined) {\n\t\t\t\tsetActiveSelectedOption(selection[index + 1]);\n\t\t\t\tsetActiveSelectedOptionIndex(index);\n\t\t\t\tsetListboxHasFocus(true);\n\t\t\t}\n\n\t\t\tif (events.onRequestRemoveSelectedOption) {\n\t\t\t\tevents.onRequestRemoveSelectedOption(event, {\n\t\t\t\t\tselection: reject(selection, option),\n\t\t\t\t});\n\t\t\t}\n\t\t},\n\t\t[selection, variant, multiple, events]\n\t);\n\n\tconst handleRequestFocusSelectedListbox = useCallback(\n\t\t(event: React.SyntheticEvent, { ref }: { ref: HTMLElement | null }) => {\n\t\t\tif (ref) {\n\t\t\t\tactiveSelectedOptionRef.current = ref;\n\t\t\t\tactiveSelectedOptionRef.current.focus();\n\t\t\t}\n\t\t},\n\t\t[]\n\t);\n\n\t// ===== Refs =====\n\n\tconst setInputRefCallback = useCallback(\n\t\t(component: HTMLInputElement | null) => {\n\t\t\tinputRef.current = component;\n\t\t\tif (!inputRendered) {\n\t\t\t\tsetInputRendered(true);\n\t\t\t}\n\t\t\tif (inputRefCallback) {\n\t\t\t\tinputRefCallback(component);\n\t\t\t}\n\t\t},\n\t\t[inputRendered, inputRefCallback]\n\t);\n\n\tconst setSelectedListboxRefCallback = useCallback(\n\t\t(ref: HTMLUListElement | null) => {\n\t\t\tselectedListboxRef.current = ref;\n\t\t\tif (selectedListboxRefCallback) {\n\t\t\t\tselectedListboxRefCallback(ref);\n\t\t\t}\n\t\t},\n\t\t[selectedListboxRefCallback]\n\t);\n\n\tconst setMenuRefCallback = useCallback((ref: HTMLUListElement | null) => {\n\t\tmenuRef.current = ref;\n\t}, []);\n\n\tconst getTargetElement = useCallback(() => inputRef.current, []);\n\n\t// ===== Effects =====\n\n\t// Sync controlled isOpen prop\n\tuseEffect(() => {\n\t\tif (typeof isOpenProp === 'boolean') {\n\t\t\tsetIsOpenState(isOpenProp);\n\t\t\tif (!isOpenProp) {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [isOpenProp]);\n\n\t// Handle options change - maintain active highlight\n\tuseEffect(() => {\n\t\tconst opts = getOptions();\n\t\tif (activeOption) {\n\t\t\tconst index = findIndex(opts, (item) => isEqual(item, activeOption));\n\t\t\tif (index !== -1) {\n\t\t\t\tsetActiveOptionIndex(index);\n\t\t\t} else {\n\t\t\t\tsetActiveOption(undefined);\n\t\t\t\tsetActiveOptionIndex(-1);\n\t\t\t}\n\t\t}\n\t}, [options, getOptions, activeOption]);\n\n\t// Handle selection change - keep the active selected option and its roving\n\t// tabindex in sync with `selection`. Besides seeding the initial active\n\t// pill, this clamps the active index when `selection` shrinks. Without the\n\t// clamp, a controlled parent removing a pill through any path other than\n\t// the built-in remove handler could leave the active index pointing past\n\t// the end of `selection`, so no pill receives tabindex=0 and the selected-\n\t// pill listbox becomes unreachable by keyboard (WCAG 2.1.1 / 2.4.3).\n\tuseEffect(() => {\n\t\tif (selection.length === 0) {\n\t\t\tif (activeSelectedOption !== undefined) {\n\t\t\t\tsetActiveSelectedOption(undefined);\n\t\t\t\tsetActiveSelectedOptionIndex(0);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (!activeSelectedOption || !selection[activeSelectedOptionIndex]) {\n\t\t\tconst clampedIndex =\n\t\t\t\tactiveSelectedOptionIndex >= selection.length\n\t\t\t\t\t? selection.length - 1\n\t\t\t\t\t: activeSelectedOptionIndex;\n\t\t\tsetActiveSelectedOption(selection[clampedIndex]);\n\t\t\tsetActiveSelectedOptionIndex(clampedIndex);\n\t\t}\n\t}, [selection, activeSelectedOption, activeSelectedOptionIndex]);\n\n\t// Cleanup on unmount\n\tuseEffect(() => {\n\t\treturn () => {\n\t\t\tif (\n\t\t\t\tcurrentOpenDropdown &&\n\t\t\t\tcurrentOpenDropdown.handleClose === handleClose\n\t\t\t) {\n\t\t\t\tcurrentOpenDropdown = undefined;\n\t\t\t}\n\t\t};\n\t}, [handleClose]);\n\n\t// ===== Render Helpers =====\n\n\tconst getCustomPopoverProps = useCallback(\n\t\t(body: ReactNode) => {\n\t\t\tconst popoverBody = (\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"slds-assistive-text\" id={`${getId()}-label`}>\n\t\t\t\t\t\t{assistiveText.popoverLabel}\n\t\t\t\t\t</div>\n\t\t\t\t\t{body}\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst popoverFooter = (\n\t\t\t\t<div>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.cancelButton}\n\t\t\t\t\t\tonClick={(e: React.MouseEvent) => {\n\t\t\t\t\t\t\thandleClose(e, { trigger: 'cancel' });\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t\t<Button\n\t\t\t\t\t\tlabel={labels.doneButton}\n\t\t\t\t\t\tvariant=\"brand\"\n\t\t\t\t\t\tonClick={\n\t\t\t\t\t\t\thandleClose as unknown as (\n\t\t\t\t\t\t\t\tevent: React.MouseEvent<HTMLButtonElement>\n\t\t\t\t\t\t\t) => void\n\t\t\t\t\t\t}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t);\n\n\t\t\tconst defaultPopoverProps: Record<string, unknown> = {\n\t\t\t\tariaLabelledby: `${getId()}-label`,\n\t\t\t\talign: 'bottom',\n\t\t\t\tbody: popoverBody,\n\t\t\t\tclassNameDialog: 'slds-popover_full-width',\n\t\t\t\tfooter: popoverFooter,\n\t\t\t\tclassNameFooter: 'slds-popover__footer_form',\n\t\t\t\thasNoNubbin: true,\n\t\t\t\tid: getId(),\n\t\t\t\tisOpen: isOpenState,\n\t\t\t\thasNoTriggerStyles: true,\n\t\t\t\tonOpen: handleOpen,\n\t\t\t\tonClose: handleClose,\n\t\t\t\tonRequestClose: handleClose,\n\t\t\t};\n\n\t\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t\tRecord<string, unknown> | undefined;\n\t\t\tconst popoverProps = assign(\n\t\t\t\tdefaultPopoverProps,\n\t\t\t\tpopoverPropsFromProp || {}\n\t\t\t);\n\t\t\tpopoverProps.body = popoverBody;\n\n\t\t\tdelete popoverProps.children;\n\t\t\treturn popoverProps;\n\t\t},\n\t\t[\n\t\t\tgetId,\n\t\t\tassistiveText.popoverLabel,\n\t\t\tlabels.cancelButton,\n\t\t\tlabels.doneButton,\n\t\t\thandleClose,\n\t\t\tisOpenState,\n\t\t\thandleOpen,\n\t\t\tpopover,\n\t\t]\n\t);\n\n\tconst getDialog = useCallback(\n\t\t({ menuRenderer }: { menuRenderer: ReactNode }) => {\n\t\t\tconst position = menuPosition;\n\n\t\t\tif (!disabled && getIsOpen()) {\n\t\t\t\tconst dialogProps = {\n\t\t\t\t\talign: 'bottom left' as const,\n\t\t\t\t\tcontext: iconSettingsContext,\n\t\t\t\t\thasStaticAlignment,\n\t\t\t\t\tinheritWidthOf,\n\t\t\t\t\tonClose: handleClose,\n\t\t\t\t\tonMouseDown: (event: React.MouseEvent) => {\n\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t},\n\t\t\t\t\tonOpen: handleOpen,\n\t\t\t\t\tonRequestTargetElement: getTargetElement,\n\t\t\t\t\tposition,\n\t\t\t\t\tcontainerProps: {\n\t\t\t\t\t\tid: `${getId()}-listbox`,\n\t\t\t\t\t\trole: 'listbox',\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t\treturn (\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\t<Dialog {...(dialogProps as any)}>{menuRenderer}</Dialog>\n\t\t\t\t);\n\t\t\t}\n\t\t\treturn null;\n\t\t},\n\t\t[\n\t\t\tmenuPosition,\n\t\t\tdisabled,\n\t\t\tgetIsOpen,\n\t\t\ticonSettingsContext,\n\t\t\thasStaticAlignment,\n\t\t\tinheritWidthOf,\n\t\t\thandleClose,\n\t\t\thandleOpen,\n\t\t\tgetTargetElement,\n\t\t\tgetId,\n\t\t]\n\t);\n\n\t// `onRenderMenuItem` and `menuItem` are deprecated: they take a component instead of a function\n\tconst LegacyMenuItem = onRenderMenuItem || menuItem;\n\tlet renderMenuItem: ((data: MenuRenderMenuItemData) => ReactNode) | undefined;\n\tif (renderMenuItemProp) {\n\t\trenderMenuItem = (data) => renderMenuItemProp({ ...data, assistiveText });\n\t} else if (LegacyMenuItem) {\n\t\trenderMenuItem = ({ isSelected, option }) => (\n\t\t\t<LegacyMenuItem\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tselected={isSelected}\n\t\t\t\toption={option}\n\t\t\t/>\n\t\t);\n\t}\n\n\tconst renderMenu = useCallback(() => {\n\t\tconst menuVariant: Record<string, 'icon-title-subtitle' | 'checkbox'> = {\n\t\t\tbase: 'icon-title-subtitle',\n\t\t\t'inline-listbox': 'icon-title-subtitle',\n\t\t\treadonly: 'checkbox',\n\t\t};\n\n\t\tconst readonlyItemVisibleLength = variant === 'readonly' ? 5 : null;\n\n\t\treturn (\n\t\t\t<Menu\n\t\t\t\tassistiveText={assistiveText}\n\t\t\t\tactiveOption={activeOption}\n\t\t\t\tactiveOptionIndex={activeOptionIndex}\n\t\t\t\tclassNameMenu={classNameMenu}\n\t\t\t\tclassNameMenuSubHeader={classNameMenuSubHeader}\n\t\t\t\tinheritWidthOf={inheritWidthOf}\n\t\t\t\tinputId={getId()}\n\t\t\t\tinputValue={value}\n\t\t\t\tisSelected={isSelected}\n\t\t\t\titemVisibleLength={menuItemVisibleLength || readonlyItemVisibleLength}\n\t\t\t\tlabels={{ noOptionsFound: labels.noOptionsFound || '' }}\n\t\t\t\thasMenuSpinner={hasMenuSpinner}\n\t\t\t\tmenuPosition={menuPosition}\n\t\t\t\tmenuRef={setMenuRefCallback}\n\t\t\t\tmaxWidth={menuMaxWidth}\n\t\t\t\toptions={getOptions()}\n\t\t\t\tonSelect={\n\t\t\t\t\thandleSelect as (\n\t\t\t\t\t\tevent: React.MouseEvent,\n\t\t\t\t\t\tdata: { option: ComboboxOption; selection?: ComboboxOption[] }\n\t\t\t\t\t) => void\n\t\t\t\t}\n\t\t\t\trenderMenuItem={renderMenuItem}\n\t\t\t\tselection={selection}\n\t\t\t\ttooltipMenuItemDisabled={tooltipMenuItemDisabled}\n\t\t\t\tvariant={menuVariant[variant]}\n\t\t\t/>\n\t\t);\n\t}, [\n\t\tvariant,\n\t\tassistiveText,\n\t\tactiveOption,\n\t\tactiveOptionIndex,\n\t\tclassNameMenu,\n\t\tclassNameMenuSubHeader,\n\t\tinheritWidthOf,\n\t\tgetId,\n\t\tvalue,\n\t\tisSelected,\n\t\tmenuItemVisibleLength,\n\t\tlabels.noOptionsFound,\n\t\thasMenuSpinner,\n\t\tmenuPosition,\n\t\tsetMenuRefCallback,\n\t\tmenuMaxWidth,\n\t\tgetOptions,\n\t\thandleSelect,\n\t\trenderMenuItem,\n\t\tselection,\n\t\ttooltipMenuItemDisabled,\n\t]);\n\n\t// User defined props from input\n\tconst userDefinedInputProps = input?.props || {};\n\n\t// ===== Sub-renders =====\n\n\tconst renderBase = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\taria-owns={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<SelectedListBox\n\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tevents={{\n\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t) => void,\n\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t) => void,\n\t\t\t\t}}\n\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\tlabels={labels}\n\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\tmultiselectable={multiple}\n\t\t\t/>\n\t\t\t{errorText && (\n\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{errorText}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n\n\tconst renderInlineMultiple = () => (\n\t\t<div className=\"slds-form-element__control\">\n\t\t\t<div\n\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{selection.length ? (\n\t\t\t\t\t<SelectedListBox\n\t\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\t\tassistiveText={\n\t\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontainerRole=\"listbox\"\n\t\t\t\t\t\tcontainerAriaOrientation=\"horizontal\"\n\t\t\t\t\t\tlistboxRole=\"group\"\n\t\t\t\t\t\tlistboxAriaOrientation={null}\n\t\t\t\t\t\tevents={{\n\t\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t\t) => void,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\t\tlabels={labels}\n\t\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t\t/>\n\t\t\t\t) : null}\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t>\n\t\t\t\t\t<InnerInput\n\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\tname=\"search\"\n\t\t\t\t\t\t\t\ttitle={labels.inputIconTitle}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t}\n\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\treadOnly={!!(predefinedOptionsOnly && activeOption)}\n\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t: value\n\t\t\t\t\t\t}\n\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t/>\n\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\tconst renderInlineSingle = () => {\n\t\tconst selectedIcon = selection[0]?.icon;\n\t\tconst iconLeft =\n\t\t\tselectedIcon && React.isValidElement(selectedIcon)\n\t\t\t\t? React.cloneElement(selectedIcon, {\n\t\t\t\t\t\tcontainerClassName: 'slds-combobox__input-entity-icon',\n\t\t\t\t\t} as Record<string, unknown>)\n\t\t\t\t: null;\n\n\t\tconst inputValue = selection[0]?.label\n\t\t\t? (selection[0].label as string)\n\t\t\t: value;\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames('slds-combobox_container', {\n\t\t\t\t\t\t'slds-has-inline-listbox': selection.length,\n\t\t\t\t\t})}\n\t\t\t\t>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\thasSpinner={hasInputSpinner}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\tselection.length ? (\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tassistiveText={{\n\t\t\t\t\t\t\t\t\t\t\ticon: assistiveText.removeSingleSelectedOption,\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tbuttonRef={(component: HTMLButtonElement | null) => {\n\t\t\t\t\t\t\t\t\t\t\tbuttonRef.current = component;\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\ticonPosition=\"right\"\n\t\t\t\t\t\t\t\t\t\tname=\"close\"\n\t\t\t\t\t\t\t\t\t\tonClick={(event: React.MouseEvent) => {\n\t\t\t\t\t\t\t\t\t\t\thandleRemoveSelectedOption(event, {\n\t\t\t\t\t\t\t\t\t\t\t\toption: selection[0],\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"search\" />\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ticonLeft={iconLeft}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\treadOnly={\n\t\t\t\t\t\t\t\t!!(predefinedOptionsOnly && activeOption) || !!selection.length\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tpredefinedOptionsOnly\n\t\t\t\t\t\t\t\t\t? (activeOption?.label as string) || value\n\t\t\t\t\t\t\t\t\t: inputValue\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderPopover = () => {\n\t\tconst popoverPropsFromProp = popover?.props as\n\t\t\t{ body?: ReactNode } | undefined;\n\t\tconst popoverProps = getCustomPopoverProps(popoverPropsFromProp?.body);\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"dialog\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* @ts-expect-error - popoverProps contains body from getCustomPopoverProps */}\n\t\t\t\t\t\t<Popover {...popoverProps}>\n\t\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\t\taria-autocomplete=\"none\"\n\t\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-popover` : undefined}\n\t\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t\t<InputIcon\n\t\t\t\t\t\t\t\t\t\tcategory=\"utility\"\n\t\t\t\t\t\t\t\t\t\tname=\"down\"\n\t\t\t\t\t\t\t\t\t\tvariant=\"combobox\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\t\tonClick={() => openDialog()}\n\t\t\t\t\t\t\t\tonChange={handleInputChange}\n\t\t\t\t\t\t\t\tplaceholder={labels.placeholder}\n\t\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Popover>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlyMultiple = () => {\n\t\tconst displayValue =\n\t\t\tselection.length > 1\n\t\t\t\t? labels.multipleOptionsSelected ||\n\t\t\t\t\t`${selection.length} options selected`\n\t\t\t\t: (selection[0]?.label as string) || '';\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={displayValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<SelectedListBox\n\t\t\t\t\tactiveOption={activeSelectedOption as SelectedListBoxOption}\n\t\t\t\t\tactiveOptionIndex={activeSelectedOptionIndex}\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tremovePill?: string;\n\t\t\t\t\t\t\tselectedListboxLabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tevents={{\n\t\t\t\t\t\tonBlurPill: handleBlurPill,\n\t\t\t\t\t\tonPillFocus: handlePillFocus as (\n\t\t\t\t\t\t\tevent: React.FocusEvent,\n\t\t\t\t\t\t\tdata: { index: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocus: handleRequestFocusSelectedListbox as (\n\t\t\t\t\t\t\tevent: unknown,\n\t\t\t\t\t\t\tdata: { ref: HTMLElement | null }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnNextPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestFocusOnPreviousPill: handleNavigateSelectedListbox as (\n\t\t\t\t\t\t\tevent: React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { direction: 'next' | 'previous' }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t\tonRequestRemove: handleRemoveSelectedOption as (\n\t\t\t\t\t\t\tevent:\n\t\t\t\t\t\t\t\tReact.MouseEvent | React.KeyboardEvent | React.SyntheticEvent,\n\t\t\t\t\t\t\tdata: { index?: number; option: SelectedListBoxOption }\n\t\t\t\t\t\t) => void,\n\t\t\t\t\t}}\n\t\t\t\t\tid={`${getId()}-selected-listbox`}\n\t\t\t\t\tlabels={labels}\n\t\t\t\t\tselectedListboxRef={setSelectedListboxRefCallback}\n\t\t\t\t\tselection={selection as SelectedListBoxOption[]}\n\t\t\t\t\tlistboxHasFocus={listboxHasFocus}\n\t\t\t\t\tvariant={variant}\n\t\t\t\t\trenderAtSelectionLength={2}\n\t\t\t\t\tmultiselectable={multiple}\n\t\t\t\t/>\n\t\t\t\t{errorText && (\n\t\t\t\t\t<div className=\"slds-has-error\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tid={getErrorId()}\n\t\t\t\t\t\t\tclassName=\"slds-form-element__help slds-has-error\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconst renderReadOnlySingle = () => {\n\t\tconst activeOptionLabel = activeOption?.label as string | undefined;\n\t\tconst selectedOptionLabel = selection[0]?.label as string | undefined;\n\t\tlet inputValue = activeOptionLabel || selectedOptionLabel || '';\n\n\t\tif (selection[0]?.value === '') {\n\t\t\tinputValue = '';\n\t\t}\n\n\t\treturn (\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox_container\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t'slds-combobox',\n\t\t\t\t\t\t\t'slds-dropdown-trigger',\n\t\t\t\t\t\t\t'slds-dropdown-trigger_click',\n\t\t\t\t\t\t\t'ignore-react-onclickoutside',\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t'slds-is-open': getIsOpen(),\n\t\t\t\t\t\t\t\t'slds-has-error': errorText,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tclassName\n\t\t\t\t\t\t)}\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\taria-expanded={getIsOpen()}\n\t\t\t\t\t\taria-haspopup=\"listbox\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<InnerInput\n\t\t\t\t\t\t\tdefaultValue={defaultValue}\n\t\t\t\t\t\t\taria-autocomplete=\"list\"\n\t\t\t\t\t\t\taria-controls={getIsOpen() ? `${getId()}-listbox` : undefined}\n\t\t\t\t\t\t\taria-activedescendant={\n\t\t\t\t\t\t\t\tactiveOption\n\t\t\t\t\t\t\t\t\t? `${getId()}-listbox-option-${activeOption.id}`\n\t\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\taria-describedby={getErrorId()}\n\t\t\t\t\t\t\tautoComplete=\"off\"\n\t\t\t\t\t\t\tclassName=\"slds-combobox__input\"\n\t\t\t\t\t\t\tcontainerProps={{\n\t\t\t\t\t\t\t\tclassName: 'slds-combobox__form-element',\n\t\t\t\t\t\t\t\trole: 'none',\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tdisabled={singleInputDisabled}\n\t\t\t\t\t\t\ticonRight={\n\t\t\t\t\t\t\t\t<InputIcon category=\"utility\" name=\"down\" variant=\"combobox\" />\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tid={getId()}\n\t\t\t\t\t\t\tonFocus={handleInputFocus}\n\t\t\t\t\t\t\tonBlur={handleInputBlur}\n\t\t\t\t\t\t\tonKeyDown={handleKeyDown}\n\t\t\t\t\t\t\tinputRef={setInputRefCallback}\n\t\t\t\t\t\t\tonClick={() => requestOpenMenu()}\n\t\t\t\t\t\t\tonChange={(event: React.ChangeEvent<HTMLInputElement>) => {\n\t\t\t\t\t\t\t\tif (!selection.length) {\n\t\t\t\t\t\t\t\t\thandleInputChange(event);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tplaceholder={labels.placeholderReadOnly}\n\t\t\t\t\t\t\treadOnly\n\t\t\t\t\t\t\trequired={required}\n\t\t\t\t\t\t\trole=\"textbox\"\n\t\t\t\t\t\t\tvalue={inputValue}\n\t\t\t\t\t\t\t{...userDefinedInputProps}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{getDialog({ menuRenderer: renderMenu() })}\n\t\t\t\t\t\t{errorText && (\n\t\t\t\t\t\t\t<div id={getErrorId()} className=\"slds-form-element__help\">\n\t\t\t\t\t\t\t\t{errorText}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t};\n\n\t// ===== Main Render =====\n\n\tconst hasRenderedLabel = labels.label || assistiveText?.label;\n\n\tconst subRenders: Record<string, Record<string, () => ReactNode>> = {\n\t\tbase: {\n\t\t\tmultiple: renderBase,\n\t\t\tsingle: renderBase,\n\t\t},\n\t\t'inline-listbox': {\n\t\t\tmultiple: renderInlineMultiple,\n\t\t\tsingle: renderInlineSingle,\n\t\t},\n\t\tpopover: {\n\t\t\tmultiple: renderPopover,\n\t\t\tsingle: renderPopover,\n\t\t},\n\t\treadonly: {\n\t\t\tmultiple: renderReadOnlyMultiple,\n\t\t\tsingle: renderReadOnlySingle,\n\t\t},\n\t};\n\n\tconst multipleOrSingle = multiple ? 'multiple' : 'single';\n\tconst variantRenderer = subRenders[variant]?.[multipleOrSingle];\n\n\tconst mainCombobox = (\n\t\t<div className={classNames('slds-form-element', classNameContainer)}>\n\t\t\t{entityCombobox ? null : (\n\t\t\t\t<Label\n\t\t\t\t\tassistiveText={\n\t\t\t\t\t\tassistiveText as unknown as {\n\t\t\t\t\t\t\tlabel?: string;\n\t\t\t\t\t\t\t[key: string]: unknown;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\thtmlFor={getId()}\n\t\t\t\t\tlabel={labels.label}\n\t\t\t\t\trequired={required}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{fieldLevelHelpTooltip && hasRenderedLabel ? (\n\t\t\t\t<FieldLevelHelpTooltip\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t\tfieldLevelHelpTooltip={fieldLevelHelpTooltip as any}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{variantRenderer ? variantRenderer() : subRenders.base.multiple()}\n\t\t</div>\n\t);\n\n\treturn entityCombobox ? (\n\t\t<div className=\"slds-form-element\">\n\t\t\t<Label\n\t\t\t\tassistiveText={\n\t\t\t\t\tassistiveText as unknown as { label?: string; [key: string]: unknown }\n\t\t\t\t}\n\t\t\t\thtmlFor={getId()}\n\t\t\t\tlabel={labels.label}\n\t\t\t\trequired={required}\n\t\t\t/>\n\t\t\t<div className=\"slds-form-element__control\">\n\t\t\t\t<div className=\"slds-combobox-group\">\n\t\t\t\t\t<div className=\"slds-combobox_object-switcher slds-combobox-addon_start\">\n\t\t\t\t\t\t{entityCombobox}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"slds-combobox_container slds-combobox-addon_end\">\n\t\t\t\t\t\t{mainCombobox}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t) : (\n\t\tmainCombobox\n\t);\n};\n\nCombobox.displayName = COMBOBOX;\n\nexport default Combobox;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,IAAI,GACE,KAAkB,OAAO,WAAa,KAuFtC,KAAc,OAAO,YAAY,GAMjC,MAAmB,MACxB,MAAe,GAEV,MACL,GACA,OACoB;CACpB,IAAI,EAAK,MAAM;CACf,MAAM,EAAK;CACX,OAAO,EAAK;CACZ,UAAU,EAAK;CACf;EACC,KAAc;AAChB,IAmIM,KAAwD;CAC7D,OAAO;CACP,kBAAkB;CAClB,sBAAsB;CACtB,cAAc;CACd,4BAA4B;CAC5B,YAAY;CACZ,sBAAsB;AACvB,GAEM,KAA0C;CAC/C,gBAAgB;CAChB,OAAO;CACP,cAAc;CACd,YAAY;CACZ,yBAAyB;CACzB,gBAAgB;CAChB,aAAa;CACb,qBAAqB;CACrB,iBAAiB;CACjB,4BAA4B;CAC5B,gBAAgB;AACjB,GAEM,KAAgC,CAAC,GAIjC,MAAqC,OAAU;CACpD,IAAM,EACL,eAAe,KAAoB,CAAC,GACpC,oBAAoB,IACpB,cACA,wBACA,mBACA,4BACA,iBACA,cACA,oBACA,cACA,QAAQ,KAAa,CAAC,GACtB,2BACA,iBACA,qBACA,oBACA,wBACA,IAAI,IACJ,qBAAiB,UACjB,WACA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A,GAEL,kBAAC,OAAD;KAAK,WAAU;KACb,UAAA;IACG,CAAA,CACD;;EACD,CAAA,CACD;CAEL,CAAA,IAAA;AAEF;AAEA,GAAS,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.js","names":[],"sources":["../../../../components/filter/filter.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, { useState, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Popover from '../popover';\n\nimport { FILTER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\n\nimport {\n\tFilterAssistiveText,\n\tFilterChangeHandler,\n\tFilterRemoveHandler,\n} from './types';\n\nexport interface FilterProps {\n\t/** Aligns the popover with the respective side of the trigger */\n\talign?: 'left' | 'right';\n\t/** Assistive text for accessibility */\n\tassistiveText?: FilterAssistiveText;\n\t/** Contents of popover - dropdowns and inputs that set filter criteria */\n\tchildren?: React.ReactNode;\n\t/** Custom CSS classes for slds-filters__item node */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Applies error state styling */\n\tisError?: boolean;\n\t/** Unique ID for keyboard navigation and ARIA support */\n\tid?: string;\n\t/** If true, the filter will not display an editing popover when clicked */\n\tisLocked?: boolean;\n\t/** Applies new filter styling */\n\tisNew?: boolean;\n\t/** If true, the filter will not include a remove button */\n\tisPermanent?: boolean;\n\t/** Callback when Done within the Popover is clicked */\n\tonChange?: FilterChangeHandler;\n\t/** Callback when \"Remove Filter\" button is clicked */\n\tonRemove?: FilterRemoveHandler;\n\t/** Callback when Filter is clicked */\n\tonClick?: () => void;\n\t/** Custom Popover component with overridable props */\n\tpopover?: React.ReactElement;\n\t/** The filter predicate (e.g., \"is PURPLE\") */\n\tpredicate?: React.ReactNode;\n\t/** The filter property (e.g., \"Hair Color\") */\n\tproperty?: React.ReactNode;\n}\n\nconst defaultAssistiveText: FilterAssistiveText = {\n\teditFilter: 'Edit filter:',\n\teditFilterHeading: 'Choose filter criteria',\n};\n\n/**\n * A Filter is a popover with custom trigger. It can be used by Panel Filtering.\n * Menus within a Filter Popover will need to not have \"portal mounts\" and be inline.\n */\nconst Filter: React.FC<FilterProps> = ({\n\talign = 'left',\n\tassistiveText: assistiveTextProp,\n\tchildren,\n\tclassName,\n\tisError = false,\n\tid: idProp,\n\tisLocked = false,\n\tisNew = false,\n\tisPermanent = false,\n\tonChange,\n\tonRemove,\n\tonClick,\n\tpopover,\n\tpredicate = 'New Filter',\n\tproperty,\n}) => {\n\t// Generate stable ID\n\tconst generatedId = useMemo(() => generateId(), []);\n\tconst id = idProp || generatedId;\n\n\t// Popover state - use popover's isOpen if provided\n\tconst [popoverIsOpen, setPopoverIsOpen] = useState(\n\t\t(popover?.props as { isOpen?: boolean } | undefined)?.isOpen ?? false\n\t);\n\n\t// Merge assistive text with defaults\n\tconst assistiveText = useMemo<FilterAssistiveText>(\n\t\t() => ({\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveTextProp,\n\t\t\tremoveFilter:\n\t\t\t\tassistiveTextProp?.removeFilter ||\n\t\t\t\t`Remove Filter: ${property} ${predicate}`,\n\t\t}),\n\t\t[assistiveTextProp, property, predicate]\n\t);\n\n\t// Handle filter click\n\tconst handleFilterClick = useCallback(() => {\n\t\tsetPopoverIsOpen(true);\n\t\tonClick?.();\n\t}, [onClick]);\n\n\t// Handle popover close\n\tconst handleClose = useCallback(() => {\n\t\tsetPopoverIsOpen(false);\n\t}, []);\n\n\t// Handle change (Done button clicked)\n\tconst handleChange = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetPopoverIsOpen(false);\n\t\t\tonChange?.(event, { id });\n\t\t},\n\t\t[onChange, id]\n\t);\n\n\t// Handle remove\n\tconst handleRemove = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonRemove?.(event, { id });\n\t\t},\n\t\t[onRemove, id]\n\t);\n\n\t// Build popover body\n\tconst popoverBody = (\n\t\t<div>\n\t\t\t<h4 className=\"slds-assistive-text\" id={`${id}-popover-heading`}>\n\t\t\t\t{assistiveText.editFilterHeading}\n\t\t\t</h4>\n\t\t\t{children}\n\t\t\t<div className=\"slds-m-top_small slds-text-align_right\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\tlabel=\"Done\"\n\t\t\t\t\tonClick={handleChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\t// Build popover props\n\tconst popoverProps = {\n\t\tariaLabelledby: `${id}-popover-heading`,\n\t\talign,\n\t\tbody: popoverBody,\n\t\theading: '',\n\t\tid,\n\t\tisOpen: popoverIsOpen,\n\t\toffset: align === 'right' ? '0px -35px' : undefined,\n\t\tonClose: handleClose,\n\t\tonRequestClose: handleClose,\n\t\tposition: 'overflowBoundaryElement' as const,\n\t\
|
|
1
|
+
{"version":3,"file":"filter.js","names":[],"sources":["../../../../components/filter/filter.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, { useState, useCallback, useMemo } from 'react';\nimport classNames from 'classnames';\n\nimport Button from '../button';\nimport Popover from '../popover';\n\nimport { FILTER } from '../../utilities/constants';\nimport generateId from '../../utilities/generate-id';\n\nimport {\n\tFilterAssistiveText,\n\tFilterChangeHandler,\n\tFilterRemoveHandler,\n} from './types';\n\nexport interface FilterProps {\n\t/** Aligns the popover with the respective side of the trigger */\n\talign?: 'left' | 'right';\n\t/** Assistive text for accessibility */\n\tassistiveText?: FilterAssistiveText;\n\t/** Contents of popover - dropdowns and inputs that set filter criteria */\n\tchildren?: React.ReactNode;\n\t/** Custom CSS classes for slds-filters__item node */\n\tclassName?: string | string[] | Record<string, boolean>;\n\t/** Applies error state styling */\n\tisError?: boolean;\n\t/** Unique ID for keyboard navigation and ARIA support */\n\tid?: string;\n\t/** If true, the filter will not display an editing popover when clicked */\n\tisLocked?: boolean;\n\t/** Applies new filter styling */\n\tisNew?: boolean;\n\t/** If true, the filter will not include a remove button */\n\tisPermanent?: boolean;\n\t/** Callback when Done within the Popover is clicked */\n\tonChange?: FilterChangeHandler;\n\t/** Callback when \"Remove Filter\" button is clicked */\n\tonRemove?: FilterRemoveHandler;\n\t/** Callback when Filter is clicked */\n\tonClick?: () => void;\n\t/** Custom Popover component with overridable props */\n\tpopover?: React.ReactElement;\n\t/** The filter predicate (e.g., \"is PURPLE\") */\n\tpredicate?: React.ReactNode;\n\t/** The filter property (e.g., \"Hair Color\") */\n\tproperty?: React.ReactNode;\n}\n\nconst defaultAssistiveText: FilterAssistiveText = {\n\teditFilter: 'Edit filter:',\n\teditFilterHeading: 'Choose filter criteria',\n};\n\n/**\n * A Filter is a popover with custom trigger. It can be used by Panel Filtering.\n * Menus within a Filter Popover will need to not have \"portal mounts\" and be inline.\n */\nconst Filter: React.FC<FilterProps> = ({\n\talign = 'left',\n\tassistiveText: assistiveTextProp,\n\tchildren,\n\tclassName,\n\tisError = false,\n\tid: idProp,\n\tisLocked = false,\n\tisNew = false,\n\tisPermanent = false,\n\tonChange,\n\tonRemove,\n\tonClick,\n\tpopover,\n\tpredicate = 'New Filter',\n\tproperty,\n}) => {\n\t// Generate stable ID\n\tconst generatedId = useMemo(() => generateId(), []);\n\tconst id = idProp || generatedId;\n\n\t// Popover state - use popover's isOpen if provided\n\tconst [popoverIsOpen, setPopoverIsOpen] = useState(\n\t\t(popover?.props as { isOpen?: boolean } | undefined)?.isOpen ?? false\n\t);\n\n\t// Merge assistive text with defaults\n\tconst assistiveText = useMemo<FilterAssistiveText>(\n\t\t() => ({\n\t\t\t...defaultAssistiveText,\n\t\t\t...assistiveTextProp,\n\t\t\tremoveFilter:\n\t\t\t\tassistiveTextProp?.removeFilter ||\n\t\t\t\t`Remove Filter: ${property} ${predicate}`,\n\t\t}),\n\t\t[assistiveTextProp, property, predicate]\n\t);\n\n\t// Handle filter click\n\tconst handleFilterClick = useCallback(() => {\n\t\tsetPopoverIsOpen(true);\n\t\tonClick?.();\n\t}, [onClick]);\n\n\t// Handle popover close\n\tconst handleClose = useCallback(() => {\n\t\tsetPopoverIsOpen(false);\n\t}, []);\n\n\t// Handle change (Done button clicked)\n\tconst handleChange = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetPopoverIsOpen(false);\n\t\t\tonChange?.(event, { id });\n\t\t},\n\t\t[onChange, id]\n\t);\n\n\t// Handle remove\n\tconst handleRemove = useCallback(\n\t\t(event: React.MouseEvent<HTMLButtonElement>) => {\n\t\t\tonRemove?.(event, { id });\n\t\t},\n\t\t[onRemove, id]\n\t);\n\n\t// Build popover body\n\tconst popoverBody = (\n\t\t<div>\n\t\t\t<h4 className=\"slds-assistive-text\" id={`${id}-popover-heading`}>\n\t\t\t\t{assistiveText.editFilterHeading}\n\t\t\t</h4>\n\t\t\t{children}\n\t\t\t<div className=\"slds-m-top_small slds-text-align_right\">\n\t\t\t\t<Button\n\t\t\t\t\tclassName=\"slds-col_bump-left\"\n\t\t\t\t\tlabel=\"Done\"\n\t\t\t\t\tonClick={handleChange}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t</div>\n\t);\n\n\t// Build popover props\n\tconst popoverProps = {\n\t\tariaLabelledby: `${id}-popover-heading`,\n\t\talign,\n\t\tbody: popoverBody,\n\t\theading: '',\n\t\tid,\n\t\tisOpen: popoverIsOpen,\n\t\toffset: align === 'right' ? '0px -35px' : undefined,\n\t\tonClose: handleClose,\n\t\tonRequestClose: handleClose,\n\t\tposition: 'overflowBoundaryElement' as const,\n\t\tclassName: 'slds-grow',\n\t\t// Merge with custom popover props if provided\n\t\t...(popover?.props || {}),\n\t\t// Remove children from merged props\n\t\tchildren: undefined,\n\t};\n\n\t// Trigger button content\n\tconst triggerContent = (\n\t\t<>\n\t\t\t<span className=\"slds-assistive-text\">{assistiveText.editFilter}</span>\n\t\t\t{property ? (\n\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t) : null}\n\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t</>\n\t);\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\t'slds-filters__item',\n\t\t\t\t'slds-grid',\n\t\t\t\t'slds-grid_vertical-align-center',\n\t\t\t\t{\n\t\t\t\t\t'slds-is-locked': isLocked,\n\t\t\t\t\t'slds-is-new': isNew,\n\t\t\t\t\t'slds-has-error': isError,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t{!isLocked && (children || popover) ? (\n\t\t\t\t// @ts-expect-error - Popover props are complex with overrides\n\t\t\t\t<Popover {...popoverProps} silenceDeprecatedPropertyWarning>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\t\tonClick={handleFilterClick}\n\t\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{triggerContent}\n\t\t\t\t\t</button>\n\t\t\t\t</Popover>\n\t\t\t) : (\n\t\t\t\t<button\n\t\t\t\t\taria-describedby={isError ? `${id}-error` : undefined}\n\t\t\t\t\tclassName=\"slds-button_reset slds-grow slds-has-blur-focus\"\n\t\t\t\t\tdisabled\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t>\n\t\t\t\t\t<span className=\"slds-show slds-text-body_small\">{property}</span>\n\t\t\t\t\t<span className=\"slds-show\">{predicate}</span>\n\t\t\t\t</button>\n\t\t\t)}\n\t\t\t{!isPermanent && !isLocked && (\n\t\t\t\t<Button\n\t\t\t\t\tassistiveText={{ icon: assistiveText.removeFilter }}\n\t\t\t\t\thint\n\t\t\t\t\ticonCategory=\"utility\"\n\t\t\t\t\ticonName=\"delete\"\n\t\t\t\t\ticonSize=\"small\"\n\t\t\t\t\ticonVariant=\"bare\"\n\t\t\t\t\tonClick={handleRemove}\n\t\t\t\t\ttitle={assistiveText.removeFilter}\n\t\t\t\t\tvariant=\"icon\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n\nFilter.displayName = FILTER;\n\nexport default Filter;\n"],"mappings":";;;;;;;;AAmDA,IAAM,IAA4C;CACjD,YAAY;CACZ,mBAAmB;AACpB,GAMM,KAAiC,EACtC,WAAQ,QACR,eAAe,GACf,aACA,cACA,aAAU,IACV,IAAI,GACJ,cAAW,IACX,WAAQ,IACR,iBAAc,IACd,aACA,aACA,YACA,YACA,eAAY,cACZ,kBACK;CAEL,IAAM,IAAc,QAAc,EAAW,GAAG,CAAC,CAAC,GAC5C,IAAK,KAAU,GAGf,CAAC,GAAe,KAAoB,EACxC,GAAS,OAA4C,UAAU,EACjE,GAGM,IAAgB,SACd;EACN,GAAG;EACH,GAAG;EACH,cACC,GAAmB,gBACnB,kBAAkB,EAAS,GAAG;CAChC,IACA;EAAC;EAAmB;EAAU;CAAS,CACxC,GAGM,IAAoB,QAAkB;EAE3C,AADA,EAAiB,EAAI,GACrB,IAAU;CACX,GAAG,CAAC,CAAO,CAAC,GAGN,IAAc,QAAkB;EACrC,EAAiB,EAAK;CACvB,GAAG,CAAC,CAAC,GAGC,IAAe,GACnB,MAA+C;EAE/C,AADA,EAAiB,EAAK,GACtB,IAAW,GAAO,EAAE,MAAG,CAAC;CACzB,GACA,CAAC,GAAU,CAAE,CACd,GAGM,IAAe,GACnB,MAA+C;EAC/C,IAAW,GAAO,EAAE,MAAG,CAAC;CACzB,GACA,CAAC,GAAU,CAAE,CACd,GAGM,IACL,kBAAC,OAAD,EAAA,UAAA;EACC,kBAAC,MAAD;GAAI,WAAU;GAAsB,IAAI,GAAG,EAAG;GAC5C,UAAA,EAAc;EACZ,CAAA;EACH;EACD,kBAAC,OAAD;GAAK,WAAU;GACd,UAAA,kBAAC,GAAD;IACC,WA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;GACZ,SAAS;GACT,OAAO,EAAc;GACrB,SAAQ;EACR,CAAA,CAEE;;AAEP;AAEA,EAAO,cAAc"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import e from "../../utilities/get-component-doc.js";
|
|
2
|
+
import t from "../../utilities/warning/deprecated-property.js";
|
|
3
|
+
//#region components/modal/check-props.js
|
|
4
|
+
var n = [
|
|
5
|
+
["containerClassName", "classNameContainer"],
|
|
6
|
+
["contentClassName", "classNameContent"],
|
|
7
|
+
["contentStyle", "styleContent"],
|
|
8
|
+
["footerClassName", "classNameFooter"],
|
|
9
|
+
["headerClassName", "classNameHeader"],
|
|
10
|
+
["portalClassName", "classNamePortal"]
|
|
11
|
+
], r = function() {};
|
|
12
|
+
process.env.NODE_ENV !== "production" && (r = function(r, i = {}, a) {
|
|
13
|
+
let o = e(a);
|
|
14
|
+
n.forEach(([e, n]) => {
|
|
15
|
+
t(r, i[e], e, n, o(n));
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
var i = r;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as default };
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=check-props.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-props.js","names":[],"sources":["../../../../components/modal/check-props.js"],"sourcesContent":["/* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */\n/* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */\n/* eslint-disable import/no-mutable-exports */\n\nimport deprecatedProperty from '../../utilities/warning/deprecated-property';\nimport getComponentDocFn from '../../utilities/get-component-doc';\n\nconst renamedProps = [\n\t['containerClassName', 'classNameContainer'],\n\t['contentClassName', 'classNameContent'],\n\t['contentStyle', 'styleContent'],\n\t['footerClassName', 'classNameFooter'],\n\t['headerClassName', 'classNameHeader'],\n\t['portalClassName', 'classNamePortal'],\n];\n\nlet checkProps = function checkPropsFunction() {};\n\nif (process.env.NODE_ENV !== 'production') {\n\tcheckProps = function checkPropsFunction(COMPONENT, props = {}, jsonDoc) {\n\t\tconst createDocUrl = getComponentDocFn(jsonDoc);\n\n\t\trenamedProps.forEach(([oldProp, newProp]) => {\n\t\t\tdeprecatedProperty(\n\t\t\t\tCOMPONENT,\n\t\t\t\tprops[oldProp],\n\t\t\t\toldProp,\n\t\t\t\tnewProp,\n\t\t\t\tcreateDocUrl(newProp)\n\t\t\t);\n\t\t});\n\t};\n}\n\nexport default checkProps;\n"],"mappings":";;;AAOA,IAAM,IAAe;CACpB,CAAC,sBAAsB,oBAAoB;CAC3C,CAAC,oBAAoB,kBAAkB;CACvC,CAAC,gBAAgB,cAAc;CAC/B,CAAC,mBAAmB,iBAAiB;CACrC,CAAC,mBAAmB,iBAAiB;CACrC,CAAC,mBAAmB,iBAAiB;AACtC,GAEI,IAAa,WAA8B,CAAC;AAEhD,QAAA,IAAA,aAA6B,iBAC5B,IAAa,SAA4B,GAAW,IAAQ,CAAC,GAAG,GAAS;CACxE,IAAM,IAAe,EAAkB,CAAO;CAE9C,EAAa,SAAS,CAAC,GAAS,OAAa;EAC5C,EACC,GACA,EAAM,IACN,GACA,GACA,EAAa,CAAO,CACrB;CACD,CAAC;AACF;AAGD,IAAA,IAAe"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
//#region components/modal/component.json
|
|
2
|
+
var e = "modal", t = "prod", n = "Modal", r = {
|
|
3
|
+
component: e,
|
|
4
|
+
status: t,
|
|
5
|
+
"display-name": "Modals and Prompts",
|
|
6
|
+
classKey: n,
|
|
7
|
+
"SLDS-component-path": "/components/modals",
|
|
8
|
+
"site-stories": [
|
|
9
|
+
{
|
|
10
|
+
heading: "Default",
|
|
11
|
+
path: "/__examples__/menu-contents.jsx"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
heading: "With header and footer",
|
|
15
|
+
path: "/__examples__/header-footer.jsx"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
heading: "With Tagline",
|
|
19
|
+
path: "/__examples__/taglines.jsx"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
heading: "Prompt",
|
|
23
|
+
path: "/__examples__/prompt.jsx"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
heading: "Various sizes",
|
|
27
|
+
path: "/__examples__/sizes.jsx"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"url-slug": "modals"
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
33
|
+
export { n as classKey, e as component, r as default, t as status };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","names":[],"sources":["../../../../components/modal/component.json"],"sourcesContent":["{\n\t\"component\": \"modal\",\n\t\"status\": \"prod\",\n\t\"display-name\": \"Modals and Prompts\",\n\t\"classKey\": \"Modal\",\n\t\"SLDS-component-path\": \"/components/modals\",\n\t\"site-stories\": [\n\t\t{\n\t\t\t\"heading\": \"Default\",\n\t\t\t\"path\": \"/__examples__/menu-contents.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"With header and footer\",\n\t\t\t\"path\": \"/__examples__/header-footer.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"With Tagline\",\n\t\t\t\"path\": \"/__examples__/taglines.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Prompt\",\n\t\t\t\"path\": \"/__examples__/prompt.jsx\"\n\t\t},\n\t\t{\n\t\t\t\"heading\": \"Various sizes\",\n\t\t\t\"path\": \"/__examples__/sizes.jsx\"\n\t\t}\n\t],\n\t\"url-slug\": \"modals\"\n}\n"],"mappings":""}
|