@qualtrics/ui-react 2.19.0 → 2.20.0

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.
Files changed (263) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/__shared/cjs/{index-bf07471d.js → index-579c4690.js} +10 -7
  3. package/dist/__shared/cjs/{index-4e4cc354.js → index-90d4069b.js} +999 -1875
  4. package/dist/components/Accordion/Accordion.js +1 -5
  5. package/dist/components/Accordion/Accordion2.js +3 -3
  6. package/dist/components/Accordion/AccordionHeader.js +8 -10
  7. package/dist/components/Accordion/AccordionPanel.js +3 -3
  8. package/dist/components/BreakpointSwitch/Breakpoint.js +0 -2
  9. package/dist/components/BreakpointSwitch/BreakpointSwitch.js +0 -3
  10. package/dist/components/Button/Button.js +3 -3
  11. package/dist/components/Button/Button2.js +2 -7
  12. package/dist/components/ButtonGroup/ButtonGroup.js +1 -2
  13. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  14. package/dist/components/Checkbox/Checkbox.js +11 -11
  15. package/dist/components/Checkbox/Checkbox2.js +3 -3
  16. package/dist/components/Checkbox/VisualCheckbox.js +1 -1
  17. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  18. package/dist/components/ColorPicker/Alpha.js +9 -30
  19. package/dist/components/ColorPicker/ColorPicker.js +33 -42
  20. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  21. package/dist/components/ColorPicker/ColorPickerFlyout.js +2 -1
  22. package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +20 -23
  23. package/dist/components/ColorPicker/Hue.js +2 -19
  24. package/dist/components/ColorPicker/Palette.js +7 -27
  25. package/dist/components/ColorPicker/Saturation.js +8 -29
  26. package/dist/components/ColorPicker/utils/calculateTargetId.js +10 -20
  27. package/dist/components/ColorPicker/utils/getMousePosition.js +4 -3
  28. package/dist/components/ColorPicker/utils/hexToHsv.js +0 -5
  29. package/dist/components/ColorPicker/utils/hexToRgbaString.js +2 -4
  30. package/dist/components/ColorPicker/utils/hsvToHex.js +0 -3
  31. package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
  32. package/dist/components/ColorPicker/utils/validateHex.js +12 -19
  33. package/dist/components/Combobox/Combobox.js +57 -127
  34. package/dist/components/Combobox/Combobox2.js +3 -3
  35. package/dist/components/Combobox/ComboboxHeader.js +1 -1
  36. package/dist/components/Combobox/ComboboxIcon.js +2 -4
  37. package/dist/components/Combobox/ComboboxInput.js +4 -5
  38. package/dist/components/Combobox/ComboboxList.js +2 -2
  39. package/dist/components/ConfigPane/ConfigPane.js +0 -7
  40. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  41. package/dist/components/Divider/Divider2.js +3 -3
  42. package/dist/components/Dropdown/ChildIndexContext/index.js +0 -1
  43. package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +34 -30
  44. package/dist/components/Dropdown/Dropdown.js +17 -68
  45. package/dist/components/Dropdown/Dropdown2.js +3 -3
  46. package/dist/components/Dropdown/DropdownButton.js +23 -33
  47. package/dist/components/Dropdown/DropdownHeader.js +2 -1
  48. package/dist/components/Dropdown/DropdownList.js +8 -7
  49. package/dist/components/Dropdown/DropdownOption.js +3 -10
  50. package/dist/components/Dropdown/DropdownSearch.js +6 -24
  51. package/dist/components/FilePicker/FilePicker.js +15 -26
  52. package/dist/components/FilePicker/FilePicker2.js +3 -3
  53. package/dist/components/FormField/Caption.js +3 -3
  54. package/dist/components/FormField/FormField.js +2 -2
  55. package/dist/components/FormField/FormField2.js +3 -3
  56. package/dist/components/FormField/FormFieldContext.js +3 -6
  57. package/dist/components/FormField/ReadOnlyText.js +2 -1
  58. package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -11
  59. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  60. package/dist/components/Icon/Icon.js +3 -6
  61. package/dist/components/Icon/IconTypes.js +1 -0
  62. package/dist/components/IconButton/IconButton.js +1 -6
  63. package/dist/components/IconButton/IconButton2.js +3 -3
  64. package/dist/components/InlineInput/InlineInput.js +16 -33
  65. package/dist/components/InlineInput/InlineInput2.js +3 -3
  66. package/dist/components/Input/Input.js +3 -2
  67. package/dist/components/Input/Input2.js +3 -3
  68. package/dist/components/Input/InputField.js +2 -5
  69. package/dist/components/InputGroup/InputGroup2.js +3 -3
  70. package/dist/components/InputGroup/InputGroupProvider.js +0 -2
  71. package/dist/components/Label/Label2.js +3 -3
  72. package/dist/components/Link/Link2.js +3 -3
  73. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
  74. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  75. package/dist/components/LogicEditor/ConditionContainer.js +0 -2
  76. package/dist/components/LogicEditor/ConditionSet.js +8 -25
  77. package/dist/components/LogicEditor/Controls.js +2 -2
  78. package/dist/components/LogicEditor/LogicEditor.js +3 -12
  79. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  80. package/dist/components/LogicEditor/utils.js +9 -34
  81. package/dist/components/Modal/Modal.js +22 -35
  82. package/dist/components/Modal/Modal2.js +3 -3
  83. package/dist/components/NewMenu/BaseMenu.js +43 -108
  84. package/dist/components/NewMenu/NewMenu.js +3 -3
  85. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -3
  86. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +20 -32
  87. package/dist/components/NewMenu/parts/MenuItem.js +2 -3
  88. package/dist/components/NewMenu/parts/MenuSearchBox.js +2 -1
  89. package/dist/components/NumberStepper/NumberStepper.js +29 -44
  90. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  91. package/dist/components/NumberStepper/NumberStepperDecrement.js +6 -5
  92. package/dist/components/NumberStepper/NumberStepperIncrement.js +6 -5
  93. package/dist/components/NumberStepper/NumberStepperInput.js +10 -12
  94. package/dist/components/PageLayout/PageLayout.js +3 -3
  95. package/dist/components/Pagination/Pagination.js +10 -6
  96. package/dist/components/Pagination/Pagination2.js +3 -3
  97. package/dist/components/Pagination/PaginationNextButton.js +8 -8
  98. package/dist/components/Pagination/PaginationPageInput.js +17 -22
  99. package/dist/components/Pagination/PaginationPreviousButton.js +8 -8
  100. package/dist/components/Popover/Popover.js +9 -18
  101. package/dist/components/Popover/Popover2.js +3 -3
  102. package/dist/components/QuickSearch/QuickSearch.js +3 -5
  103. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  104. package/dist/components/QuickSearch/QuickSearchInput.js +6 -23
  105. package/dist/components/Radio/Radio.js +11 -13
  106. package/dist/components/Radio/Radio2.js +3 -3
  107. package/dist/components/SearchInput/SearchInput.js +5 -11
  108. package/dist/components/SearchInput/SearchInput2.js +3 -3
  109. package/dist/components/SidebarNav/ExpandCollapseButton.js +0 -2
  110. package/dist/components/SidebarNav/SidebarNav.js +5 -4
  111. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  112. package/dist/components/SidebarNav/SidebarNavLink.js +1 -4
  113. package/dist/components/Slider/RangeSlider.js +8 -22
  114. package/dist/components/Slider/Slider.js +7 -26
  115. package/dist/components/Slider/Slider2.js +3 -3
  116. package/dist/components/Slider/SliderButton.js +7 -9
  117. package/dist/components/Switch/Switch.js +11 -11
  118. package/dist/components/Switch/Switch2.js +3 -3
  119. package/dist/components/Table/Table2.js +3 -3
  120. package/dist/components/Tabs/Tab.js +3 -3
  121. package/dist/components/Tabs/TabContextProvider.js +1 -1
  122. package/dist/components/Tabs/TabList.js +9 -17
  123. package/dist/components/Tabs/TabPanel.js +3 -3
  124. package/dist/components/Tabs/TabPanels.js +0 -2
  125. package/dist/components/Tabs/Tabs2.js +3 -3
  126. package/dist/components/Tooltip/Tooltip.js +13 -42
  127. package/dist/components/Tooltip/Tooltip2.js +3 -3
  128. package/dist/components/UIProvider/PortalTargetContext.js +0 -1
  129. package/dist/components/UIProvider/UIProvider.js +2 -2
  130. package/dist/components/deprecated_ColorPicker/Alpha.js +4 -11
  131. package/dist/components/deprecated_ColorPicker/Color.js +9 -66
  132. package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -8
  133. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  134. package/dist/components/deprecated_ColorPicker/HexInput.js +1 -7
  135. package/dist/components/deprecated_ColorPicker/Hue.js +3 -10
  136. package/dist/components/deprecated_ColorPicker/Saturation.js +7 -14
  137. package/dist/components/deprecated_ColorPicker/Swatch.js +2 -6
  138. package/dist/components/deprecated_ColorPicker/useMouseDrag.js +0 -3
  139. package/dist/components/deprecated_NumberStepper/NumberStepper.js +14 -20
  140. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  141. package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +7 -6
  142. package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +7 -6
  143. package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +16 -17
  144. package/dist/components/deprecated_Tabs/Tabs.js +9 -25
  145. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  146. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  147. package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
  148. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +3 -17
  149. package/dist/components/deprecated_Toolbar/ToolbarTab.js +10 -26
  150. package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -18
  151. package/dist/hooks/useBreakpoints/useBreakpoints.js +3 -4
  152. package/dist/hooks/useClickOutside/useClickOutside.js +2 -7
  153. package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -6
  154. package/dist/hooks/useControllableState/useControllableState.js +5 -10
  155. package/dist/hooks/useDidUpdate/useDidUpdate.js +2 -4
  156. package/dist/hooks/useEventCallback/useEventCallback.js +2 -1
  157. package/dist/hooks/useEventListener/useEventListener.js +1 -4
  158. package/dist/hooks/useFocusSequence/useFocusSequence.js +10 -17
  159. package/dist/hooks/useId/useId.js +1 -2
  160. package/dist/hooks/useIsFocused/useIsFocused.js +0 -1
  161. package/dist/hooks/useIsHovered/useIsHovered.js +0 -1
  162. package/dist/hooks/useIsTruncated/useIsTruncated.js +4 -3
  163. package/dist/hooks/useLatest/useLatest.js +0 -1
  164. package/dist/hooks/useMounted/useMounted.js +0 -1
  165. package/dist/hooks/useMouseDrag/useMouseDrag.js +0 -4
  166. package/dist/hooks/useOverlay/useOverlay.js +4 -10
  167. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  168. package/dist/hooks/usePrevious/usePrevious.js +0 -1
  169. package/dist/hooks/useResponsiveValue/useResponsiveValue.js +1 -4
  170. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +11 -16
  171. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  172. package/dist/icons/Icon.js +3 -3
  173. package/dist/icons/components/HeadsetIcon.js +6 -0
  174. package/dist/icons/components/PauseCircleIcon.js +1 -1
  175. package/dist/icons/createIconComponent.js +2 -3
  176. package/dist/icons/index.d.ts +2 -0
  177. package/dist/icons/index.es.js +1 -0
  178. package/dist/icons/index.js +2 -1
  179. package/dist/index.d.ts +4 -3
  180. package/dist/index.es.js +4 -3
  181. package/dist/index.js +6 -5
  182. package/dist/next/AdvancedTable/AdvancedTable.js +82 -188
  183. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  184. package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -14
  185. package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +0 -1
  186. package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +11 -41
  187. package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +8 -14
  188. package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -6
  189. package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -4
  190. package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +0 -1
  191. package/dist/next/AdvancedTable/AdvancedTableTypes.js +1 -3
  192. package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +8 -13
  193. package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
  194. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -20
  195. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  196. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
  197. package/dist/next/Combobox/Combobox2.js +3 -3
  198. package/dist/next/Combobox/ComboboxFlyout.js +3 -3
  199. package/dist/next/Combobox/ComboboxGroup.js +1 -1
  200. package/dist/next/Combobox/ComboboxInput.js +7 -20
  201. package/dist/next/Combobox/ComboboxOption.js +5 -6
  202. package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +4 -5
  203. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +37 -54
  204. package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +4 -5
  205. package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +5 -3
  206. package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +10 -10
  207. package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +1 -6
  208. package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +6 -6
  209. package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +4 -6
  210. package/dist/next/Drawer/Drawer.js +5 -16
  211. package/dist/next/Drawer/Drawer2.js +3 -3
  212. package/dist/next/FilterAnchor/FilterAnchor.js +7 -5
  213. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  214. package/dist/next/Input/Input.js +5 -8
  215. package/dist/next/Input/Input2.js +3 -3
  216. package/dist/next/Menu/Menu.js +10 -23
  217. package/dist/next/Menu/Menu2.js +3 -3
  218. package/dist/next/Menu/MenuButton.js +13 -6
  219. package/dist/next/Menu/MenuContext.js +0 -2
  220. package/dist/next/Menu/MenuItem.js +11 -15
  221. package/dist/next/Menu/MenuPane.js +11 -25
  222. package/dist/next/Menu/MenuSearch.js +15 -22
  223. package/dist/next/Menu/SubMenu.js +10 -27
  224. package/dist/next/Menu/usePaneSearch.js +2 -1
  225. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +12 -19
  226. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  227. package/dist/next/SplitButton/SplitButton.js +6 -12
  228. package/dist/next/SplitButton/SplitButton2.js +3 -3
  229. package/dist/next/Stack/Stack.js +0 -3
  230. package/dist/next/TimePicker/TimeDropdown.js +4 -5
  231. package/dist/next/TimePicker/TimeInput.js +4 -5
  232. package/dist/next/TimePicker/TimePicker.js +12 -30
  233. package/dist/next/TimePicker/TimePicker2.js +3 -3
  234. package/dist/next/TimePicker/TimePickerIcon.js +1 -3
  235. package/dist/next/TimePicker/utils.js +12 -52
  236. package/dist/next/ToggleButton/ToggleButton.js +0 -5
  237. package/dist/next/ToggleButton/ToggleButtonGroup.js +2 -1
  238. package/dist/next/ToggleButton/styles.js +3 -3
  239. package/dist/next/index.d.ts +5 -4
  240. package/dist/next/index.js +389 -754
  241. package/dist/utils/Flyout/Flyout.js +4 -5
  242. package/dist/utils/Flyout/Flyout2.js +3 -3
  243. package/dist/utils/Popper/Popper.js +18 -25
  244. package/dist/utils/Portal/Portal.js +2 -1
  245. package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +4 -4
  246. package/dist/utils/Translation/Translate.js +0 -4
  247. package/dist/utils/Translation/TranslationProvider.js +0 -1
  248. package/dist/utils/Translation/containsComponentOrElement.js +1 -5
  249. package/dist/utils/Translation/insertPlaceholders.js +0 -1
  250. package/dist/utils/Translation/useTranslation.js +7 -14
  251. package/dist/utils/concatIds/concatIds.js +0 -1
  252. package/dist/utils/constants.js +2 -2
  253. package/dist/utils/createContextUtilities/createContextUtilities.js +0 -4
  254. package/dist/utils/filterChildren/filterChildren.js +8 -17
  255. package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -2
  256. package/dist/utils/keyboardUser/keyboardUser.js +0 -1
  257. package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -12
  258. package/dist/utils/mergeRefs/mergeRefs.js +1 -2
  259. package/dist/utils/wrapAround/wrapAround.js +1 -2
  260. package/dist/utils/wrapEvent/wrapEvent.js +2 -4
  261. package/icons/package.json +2 -1
  262. package/next/package.json +5 -1
  263. package/package.json +9 -4
@@ -18,31 +18,20 @@ import useControllableState from '../../hooks/useControllableState/useControllab
18
18
  import useClickOutside from '../../hooks/useClickOutside/useClickOutside.js';
19
19
  import wrapEvent from '../../utils/wrapEvent/wrapEvent.js';
20
20
 
21
- const getOptionLabel = option => {
22
- var _option$props;
23
-
24
- return option === null || option === void 0 ? void 0 : (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label;
25
- };
26
-
27
- const getOptionValue = option => {
28
- var _option$props2;
29
-
30
- return option === null || option === void 0 ? void 0 : (_option$props2 = option.props) === null || _option$props2 === void 0 ? void 0 : _option$props2.value;
31
- };
32
-
21
+ const getOptionLabel = option => option?.props?.label;
22
+ const getOptionValue = option => option?.props?.value;
33
23
  const doesOptionMatchFilter = (option, header, inputValue) => {
34
24
  var _context, _context2;
25
+ const label = getOptionLabel(option);
35
26
 
36
- const label = getOptionLabel(option); // Filtering is turned off if the input value is empty or not a string, so the given option will be included in the filtered list, thus returns true
37
-
27
+ // Filtering is turned off if the input value is empty or not a string, so the given option will be included in the filtered list, thus returns true
38
28
  if (typeof inputValue !== 'string' || !inputValue) {
39
29
  return true;
40
- } // Returns true if the given option's label or the given header includes the input value (the label and header must be strings in order to do the comparison)
41
-
30
+ }
42
31
 
32
+ // Returns true if the given option's label or the given header includes the input value (the label and header must be strings in order to do the comparison)
43
33
  return typeof label === 'string' && _includesInstanceProperty(_context = label.toLowerCase()).call(_context, inputValue.toLowerCase()) || typeof header === 'string' && _includesInstanceProperty(_context2 = header.toLowerCase()).call(_context2, inputValue.toLowerCase());
44
34
  };
45
-
46
35
  const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
47
36
  let {
48
37
  children,
@@ -69,27 +58,25 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
69
58
  const isOptionSelectedOnKeyboardHighlight = unstable_isOptionSelectedOnKeyboardHighlight;
70
59
  const isFilteringDisabled = isOptionSelectedOnKeyboardHighlight || externalIsFilteringDisabled;
71
60
  let comboboxInput = /*#__PURE__*/React__default.createElement(ComboboxInput, null);
72
- let comboboxList = /*#__PURE__*/React__default.createElement(ComboboxList, null); // Gets the <ComboboxInput> and <ComboboxList> components from the children
61
+ let comboboxList = /*#__PURE__*/React__default.createElement(ComboboxList, null);
73
62
 
63
+ // Gets the <ComboboxInput> and <ComboboxList> components from the children
74
64
  React__default.Children.forEach(children, child => {
75
65
  if ( /*#__PURE__*/React__default.isValidElement(child)) {
76
- if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxInput) {
66
+ if (child?.type === ComboboxInput) {
77
67
  comboboxInput = child;
78
- } else if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxList) {
68
+ } else if (child?.type === ComboboxList) {
79
69
  comboboxList = child;
80
70
  }
81
71
  }
82
72
  });
83
73
  const listContainerId = useId(comboboxList.props.id);
84
- const noMatchesFoundContainerId = "".concat(listContainerId, "-no-matches-found"); // Extracts all ComboboxOptions
74
+ const noMatchesFoundContainerId = `${listContainerId}-no-matches-found`;
85
75
 
86
- const [, [allOptions]] = useMemo(() => {
87
- var _comboboxList, _comboboxList$props;
88
-
89
- return filterChildren((_comboboxList = comboboxList) === null || _comboboxList === void 0 ? void 0 : (_comboboxList$props = _comboboxList.props) === null || _comboboxList$props === void 0 ? void 0 : _comboboxList$props.children, [{
90
- matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
91
- }]);
92
- }, [comboboxList]);
76
+ // Extracts all ComboboxOptions
77
+ const [, [allOptions]] = useMemo(() => filterChildren(comboboxList?.props?.children, [{
78
+ matcher: child => child?.type === ComboboxOption
79
+ }]), [comboboxList]);
93
80
  const {
94
81
  defaultValue: defaultInputValue,
95
82
  onChange: onInputChange,
@@ -100,45 +87,48 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
100
87
  const inputRef = useRef(null);
101
88
  const iconRef = useRef(null);
102
89
  const [isFlyoutOpen, setIsFlyoutOpen] = useControllableState(false, onIsOpenChange, externalIsOpen);
103
- const [isKeyboardUser, setIsKeyboardUser] = useState(false); // Highlighted index is only used when isOptionSelectedOnKeyboardHighlight is set to false
90
+ const [isKeyboardUser, setIsKeyboardUser] = useState(false);
104
91
 
105
- const [highlightedIndex, setHighlightedIndex] = useState(-1); // This option value is the "computer readable" value. The option value is not used to set the input value.
92
+ // Highlighted index is only used when isOptionSelectedOnKeyboardHighlight is set to false
93
+ const [highlightedIndex, setHighlightedIndex] = useState(-1);
106
94
 
95
+ // This option value is the "computer readable" value. The option value is not used to set the input value.
107
96
  const [selectedOptionValue, setSelectedOptionValue] = useControllableState(defaultSelectedOptionValue, onChange, externalSelectedOptionValue);
108
- const getLabelForValue = useCallback(value => getOptionLabel(allOptions.find(option => getOptionValue(option) === value)), [allOptions]); // The option label is the "human readable" value. The option label is used to set the input value.
97
+ const getLabelForValue = useCallback(value => getOptionLabel(allOptions.find(option => getOptionValue(option) === value)), [allOptions]);
109
98
 
99
+ // The option label is the "human readable" value. The option label is used to set the input value.
110
100
  const [selectedOptionLabel, setSelectedOptionLabel] = useState(() => getLabelForValue(selectedOptionValue) || externalInputValue || defaultInputValue || '');
111
- const [inputValue, setInputValue] = useControllableState(selectedOptionLabel, // `e &&` prevents `ComboboxInput` from calling consumer-passed `onChange` for consumer-controlled `Combobox` value updates.
112
- (_, e) => e && (onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(e)), externalInputValue); // listen for updates from controlled value
101
+ const [inputValue, setInputValue] = useControllableState(selectedOptionLabel,
102
+ // `e &&` prevents `ComboboxInput` from calling consumer-passed `onChange` for consumer-controlled `Combobox` value updates.
103
+ (_, e) => e && onInputChange?.(e), externalInputValue);
113
104
 
105
+ // listen for updates from controlled value
114
106
  useEffect(() => {
115
107
  if (selectedOptionValue) {
116
108
  setInputValue(getLabelForValue(selectedOptionValue), null);
117
109
  }
118
- }, [selectedOptionValue, setInputValue, getLabelForValue]); // Selected index is only used when isOptionSelectedOnKeyboardHighlight is set to true
110
+ }, [selectedOptionValue, setInputValue, getLabelForValue]);
119
111
 
112
+ // Selected index is only used when isOptionSelectedOnKeyboardHighlight is set to true
120
113
  const [selectedIndex, setSelectedIndex] = useState(() => {
121
114
  if (isOptionSelectedOnKeyboardHighlight) {
122
115
  for (let i = 0; i < allOptions.length; i += 1) {
123
116
  const option = allOptions[i];
124
-
125
117
  if (getOptionValue(option) === selectedOptionValue) {
126
118
  return i;
127
119
  }
128
120
  }
129
121
  }
130
-
131
122
  return -1;
132
123
  });
133
- useClickOutside([listRef, inputRef, iconRef], () => isFlyoutOpen && setIsFlyoutOpen(false)); // The number of options that match the filter for each header
124
+ useClickOutside([listRef, inputRef, iconRef], () => isFlyoutOpen && setIsFlyoutOpen(false));
134
125
 
135
- const headerCounts = {}; // Gets the filtered options based on the current input value (only if isFilteringDisabled is false)
126
+ // The number of options that match the filter for each header
127
+ const headerCounts = {};
136
128
 
129
+ // Gets the filtered options based on the current input value (only if isFilteringDisabled is false)
137
130
  const [listChildrenFilteredOptions, [, filteredOptions]] = useMemo(() => {
138
- var _comboboxList2, _comboboxList2$props;
139
-
140
131
  let currentHeaderTitle;
141
-
142
132
  const handleSelect = option => {
143
133
  const newOptionValue = getOptionValue(option);
144
134
  const newInputValue = getOptionLabel(option);
@@ -149,18 +139,15 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
149
139
  }
150
140
  });
151
141
  };
152
-
153
- return filterChildren((_comboboxList2 = comboboxList) === null || _comboboxList2 === void 0 ? void 0 : (_comboboxList2$props = _comboboxList2.props) === null || _comboboxList2$props === void 0 ? void 0 : _comboboxList2$props.children, [
142
+ return filterChildren(comboboxList?.props?.children, [
154
143
  /*
155
144
  * For each header, adds a key value pair to the headerCounts object where the key is the header title and the value is 0.
156
145
  * The value will be updated in the matcher/modifier below this matcher/modifier.
157
146
  */
158
147
  {
159
- matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
148
+ matcher: child => child?.type === ComboboxHeader,
160
149
  modifier: child => {
161
- var _props;
162
-
163
- currentHeaderTitle = (_props = child.props) === null || _props === void 0 ? void 0 : _props.title;
150
+ currentHeaderTitle = child.props?.title;
164
151
  headerCounts[currentHeaderTitle] = 0;
165
152
  return child;
166
153
  }
@@ -170,119 +157,95 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
170
157
  * Otherwise, returns null.
171
158
  */
172
159
  {
173
- matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption,
160
+ matcher: child => child?.type === ComboboxOption,
174
161
  modifier: (child, index) => {
175
162
  if (inputValue === selectedOptionLabel || isFilteringDisabled || doesOptionMatchFilter(child, currentHeaderTitle, inputValue)) {
176
- var _props$id;
177
-
178
163
  headerCounts[currentHeaderTitle] += 1;
179
164
  return /*#__PURE__*/cloneElement(child, {
180
165
  onSelect: e => {
181
- var _props2, _props2$onSelect;
166
+ child?.props?.onSelect?.(e);
182
167
 
183
- child === null || child === void 0 ? void 0 : (_props2 = child.props) === null || _props2 === void 0 ? void 0 : (_props2$onSelect = _props2.onSelect) === null || _props2$onSelect === void 0 ? void 0 : _props2$onSelect.call(_props2, e); // Prevents form submission
184
-
185
- if ((e === null || e === void 0 ? void 0 : e.key) === 'Enter') {
168
+ // Prevents form submission
169
+ if (e?.key === 'Enter') {
186
170
  e.preventDefault();
187
171
  }
188
-
189
172
  if (!e.key) {
190
173
  setIsFlyoutOpen(false);
191
174
  }
192
-
193
175
  handleSelect(child);
194
176
  },
195
177
  onMouseEnter: wrapEvent(child.props.onMouseEnter, () => {
196
178
  if (!isOptionSelectedOnKeyboardHighlight) {
197
179
  setHighlightedIndex(index);
198
180
  }
199
-
200
181
  setIsKeyboardUser(false);
201
182
  }),
202
183
  onMouseLeave: wrapEvent(child.props.onMouseLeave, () => {
203
184
  if (!isOptionSelectedOnKeyboardHighlight) {
204
185
  setHighlightedIndex(-1);
205
186
  }
206
-
207
187
  setIsKeyboardUser(false);
208
188
  }),
209
189
  isHighlightedOnHover: isOptionSelectedOnKeyboardHighlight,
210
190
  isHighlighted: isOptionSelectedOnKeyboardHighlight ? false : index === highlightedIndex,
211
191
  isSelected: isOptionSelectedOnKeyboardHighlight ? index === selectedIndex : selectedOptionValue === getOptionValue(child),
212
- id: (_props$id = child.props.id) !== null && _props$id !== void 0 ? _props$id : "".concat(listContainerId, "-option-").concat(index),
192
+ id: child.props.id ?? `${listContainerId}-option-${index}`,
213
193
  ref: node => {
214
194
  optionRefs.current[Number(index)] = node;
215
195
  }
216
196
  });
217
197
  }
218
-
219
198
  return null;
220
199
  }
221
200
  }]);
222
201
  }, [comboboxList, headerCounts, highlightedIndex, inputValue, isFilteringDisabled, selectedOptionLabel, selectedOptionValue, setInputValue, setIsFlyoutOpen, setSelectedOptionValue, isOptionSelectedOnKeyboardHighlight, selectedIndex, listContainerId]);
223
- const isAriaExpanded = useMemo(() => isFlyoutOpen && (unstable_isLoading || filteredOptions.length > 0), [isFlyoutOpen, filteredOptions, unstable_isLoading]); // Gets all filtered options, as well as headers that have at least one filtered option
202
+ const isAriaExpanded = useMemo(() => isFlyoutOpen && (unstable_isLoading || filteredOptions.length > 0), [isFlyoutOpen, filteredOptions, unstable_isLoading]);
224
203
 
204
+ // Gets all filtered options, as well as headers that have at least one filtered option
225
205
  const [listChildrenFilteredOptionsAndHeaders] = useMemo(() => filterChildren(listChildrenFilteredOptions, [{
226
- matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
206
+ matcher: child => child?.type === ComboboxOption
227
207
  }, {
228
- matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
229
- modifier: child => {
230
- var _props3;
231
-
232
- return headerCounts[(_props3 = child.props) === null || _props3 === void 0 ? void 0 : _props3.title] ? child : null;
233
- }
208
+ matcher: child => child?.type === ComboboxHeader,
209
+ modifier: child => headerCounts[child.props?.title] ? child : null
234
210
  }]), [headerCounts, listChildrenFilteredOptions]);
235
-
236
211
  const keyboardHighlightOrSelectOption = (index, e) => {
237
212
  setIsKeyboardUser(true);
238
-
239
213
  if (isOptionSelectedOnKeyboardHighlight) {
240
- var _filteredOptions$inde, _filteredOptions$inde2, _filteredOptions$inde3;
241
-
242
214
  setSelectedIndex(index);
243
- (_filteredOptions$inde = filteredOptions[index]) === null || _filteredOptions$inde === void 0 ? void 0 : (_filteredOptions$inde2 = _filteredOptions$inde.props) === null || _filteredOptions$inde2 === void 0 ? void 0 : (_filteredOptions$inde3 = _filteredOptions$inde2.onSelect) === null || _filteredOptions$inde3 === void 0 ? void 0 : _filteredOptions$inde3.call(_filteredOptions$inde2, e);
215
+ filteredOptions[index]?.props?.onSelect?.(e);
244
216
  } else {
245
217
  setHighlightedIndex(index);
246
218
  }
247
219
  };
248
-
249
220
  const handleFocus = () => {
250
221
  if (!isFlyoutOpen) {
251
222
  setIsFlyoutOpen(true);
252
223
  }
253
224
  };
254
-
255
225
  const handleBlur = () => {
256
226
  if (isFlyoutOpen) {
257
227
  setIsFlyoutOpen(false);
258
228
  }
259
-
260
229
  if (!inputValue) {
261
230
  if (selectedOptionValue !== '') {
262
231
  setSelectedOptionValue('');
263
232
  }
264
-
265
233
  return;
266
234
  }
267
-
268
235
  if (selectedOptionLabel !== inputValue) {
269
236
  // Updates the selected option value and selected index based on the input value
270
237
  if (unstable_autoSelect) {
271
238
  for (let i = 0; i < allOptions.length; i += 1) {
272
239
  const option = allOptions[i];
273
-
274
240
  if (getOptionLabel(option) === inputValue) {
275
241
  setSelectedOptionValue(getOptionValue(option));
276
-
277
242
  if (isOptionSelectedOnKeyboardHighlight) {
278
243
  setSelectedIndex(i);
279
244
  }
280
-
281
245
  return;
282
246
  }
283
247
  }
284
248
  }
285
-
286
249
  if (unstable_freeForm) {
287
250
  setSelectedOptionValue(null);
288
251
  } else {
@@ -294,32 +257,24 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
294
257
  }
295
258
  }
296
259
  };
297
-
298
260
  const handleInputChange = e => {
299
261
  e.persist();
300
262
  setInputValue(e.target.value, e);
301
-
302
263
  if (!isOptionSelectedOnKeyboardHighlight) {
303
264
  setHighlightedIndex(-1);
304
265
  }
305
266
  };
306
-
307
267
  const handleKeyDown = e => {
308
268
  const currentIndex = isOptionSelectedOnKeyboardHighlight ? selectedIndex : highlightedIndex;
309
-
310
269
  switch (e.key) {
311
270
  case 'Enter':
312
271
  if (isFlyoutOpen) {
313
272
  if (!isOptionSelectedOnKeyboardHighlight && filteredOptions.length > 0 && filteredOptions[highlightedIndex] !== undefined) {
314
- var _filteredOptions$high, _filteredOptions$high2, _filteredOptions$high3;
315
-
316
- (_filteredOptions$high = filteredOptions[highlightedIndex]) === null || _filteredOptions$high === void 0 ? void 0 : (_filteredOptions$high2 = _filteredOptions$high.props) === null || _filteredOptions$high2 === void 0 ? void 0 : (_filteredOptions$high3 = _filteredOptions$high2.onSelect) === null || _filteredOptions$high3 === void 0 ? void 0 : _filteredOptions$high3.call(_filteredOptions$high2, e);
273
+ filteredOptions[highlightedIndex]?.props?.onSelect?.(e);
317
274
  }
318
275
  }
319
-
320
276
  setIsFlyoutOpen(false);
321
277
  break;
322
-
323
278
  case 'ArrowDown':
324
279
  e.preventDefault(); // Prevents cursor movement inside of input
325
280
 
@@ -330,10 +285,8 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
330
285
  } else if (currentIndex >= filteredOptions.length && filteredOptions.length > 0) {
331
286
  keyboardHighlightOrSelectOption(filteredOptions.length - 1, e);
332
287
  }
333
-
334
288
  setIsFlyoutOpen(true);
335
289
  break;
336
-
337
290
  case 'ArrowUp':
338
291
  e.preventDefault(); // Prevents cursor movement inside of input
339
292
 
@@ -342,62 +295,49 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
342
295
  } else if (currentIndex >= filteredOptions.length || currentIndex === -1 && filteredOptions.length > 0) {
343
296
  keyboardHighlightOrSelectOption(filteredOptions.length - 1, e);
344
297
  }
345
-
346
298
  setIsFlyoutOpen(true);
347
299
  break;
348
-
349
300
  case 'PageUp':
350
301
  e.preventDefault(); // Prevents page scroll
351
302
 
352
303
  if (filteredOptions.length > 0) {
353
304
  keyboardHighlightOrSelectOption(0, e);
354
305
  }
355
-
356
306
  setIsFlyoutOpen(true);
357
307
  break;
358
-
359
308
  case 'PageDown':
360
309
  e.preventDefault(); // Prevents page scroll
361
310
 
362
311
  if (filteredOptions.length > 0) {
363
312
  keyboardHighlightOrSelectOption(filteredOptions.length - 1, e);
364
313
  }
365
-
366
314
  setIsFlyoutOpen(true);
367
315
  break;
368
-
369
316
  case 'Escape':
370
317
  e.preventDefault();
371
-
372
318
  if (isFlyoutOpen) {
373
319
  e.stopPropagation(); // prevent event from closing modals or popovers
374
320
  }
375
321
 
376
322
  setIsFlyoutOpen(false);
377
323
  break;
378
-
379
324
  default:
380
325
  return false;
381
326
  }
382
-
383
327
  return false;
384
- }; // Scrolls to the highlighted option if the highlighted option is out of view
385
-
328
+ };
386
329
 
330
+ // Scrolls to the highlighted option if the highlighted option is out of view
387
331
  useEffect(() => {
388
332
  const currentIndex = isOptionSelectedOnKeyboardHighlight ? selectedIndex : highlightedIndex;
389
333
  const optionRef = optionRefs.current[currentIndex];
390
-
391
- if (isKeyboardUser && isFlyoutOpen && optionRef && listRef !== null && listRef !== void 0 && listRef.current) {
392
- var _listRef$current, _listRef$current2;
393
-
334
+ if (isKeyboardUser && isFlyoutOpen && optionRef && listRef?.current) {
394
335
  if (currentIndex === 0) {
395
336
  // Scrolls the first header into view if one exists
396
337
  listRef.current.scrollTop = 0;
397
- } else if (((_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollHeight) > ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.clientHeight)) {
338
+ } else if (listRef.current?.scrollHeight > listRef.current?.clientHeight) {
398
339
  const scrollBottom = listRef.current.clientHeight + listRef.current.scrollTop;
399
340
  const elementBottom = optionRef.offsetTop + optionRef.offsetHeight;
400
-
401
341
  if (elementBottom > scrollBottom) {
402
342
  listRef.current.scrollTop = elementBottom - listRef.current.clientHeight;
403
343
  } else if (optionRef.offsetTop < listRef.current.scrollTop) {
@@ -405,24 +345,21 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
405
345
  }
406
346
  }
407
347
  }
408
- }, [isKeyboardUser, highlightedIndex, selectedIndex, isOptionSelectedOnKeyboardHighlight, isFlyoutOpen]); // Updates the selected option label and selected option index based on the new selected option value
348
+ }, [isKeyboardUser, highlightedIndex, selectedIndex, isOptionSelectedOnKeyboardHighlight, isFlyoutOpen]);
409
349
 
350
+ // Updates the selected option label and selected option index based on the new selected option value
410
351
  useEffect(() => {
411
352
  if (isOptionSelectedOnKeyboardHighlight) {
412
353
  setSelectedIndex(-1);
413
354
  }
414
-
415
355
  if (selectedOptionValue === '') {
416
356
  setSelectedOptionLabel('');
417
357
  return;
418
358
  }
419
-
420
359
  for (let i = 0; i < allOptions.length; i += 1) {
421
360
  const option = allOptions[i];
422
-
423
361
  if (getOptionValue(option) === selectedOptionValue) {
424
362
  setSelectedOptionLabel(getOptionLabel(option));
425
-
426
363
  if (isOptionSelectedOnKeyboardHighlight) {
427
364
  setSelectedIndex(i);
428
365
  return;
@@ -438,26 +375,18 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
438
375
  const activeDescendantId = useMemo(() => {
439
376
  if (isAriaExpanded) {
440
377
  if (unstable_isLoading) {
441
- return "".concat(listContainerId, "-loading-spinner");
378
+ return `${listContainerId}-loading-spinner`;
442
379
  }
443
-
444
380
  if (filteredOptions.length === 0) {
445
381
  return undefined;
446
382
  }
447
-
448
383
  if (selectedIndex !== -1) {
449
- var _filteredOptions$sele;
450
-
451
- return (_filteredOptions$sele = filteredOptions[selectedIndex]) === null || _filteredOptions$sele === void 0 ? void 0 : _filteredOptions$sele.props.id;
384
+ return filteredOptions[selectedIndex]?.props.id;
452
385
  }
453
-
454
386
  if (highlightedIndex !== -1) {
455
- var _filteredOptions$high4;
456
-
457
- return (_filteredOptions$high4 = filteredOptions[highlightedIndex]) === null || _filteredOptions$high4 === void 0 ? void 0 : _filteredOptions$high4.props.id;
387
+ return filteredOptions[highlightedIndex]?.props.id;
458
388
  }
459
389
  }
460
-
461
390
  return undefined;
462
391
  }, [isAriaExpanded, selectedIndex, highlightedIndex, unstable_isOptionSelectedOnKeyboardHighlight, filteredOptions, unstable_isLoading, listContainerId]);
463
392
  return /*#__PURE__*/React__default.createElement(ComboboxContextProvider, {
@@ -493,7 +422,8 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
493
422
  ref: ref
494
423
  }), comboboxInput, /*#__PURE__*/React__default.createElement(ComboboxIcon, null), /*#__PURE__*/React__default.cloneElement(comboboxList, {}, filteredOptions.length === 0 ? /*#__PURE__*/React__default.createElement("div", {
495
424
  className: styles.comboboxEmpty,
496
- id: noMatchesFoundContainerId // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
425
+ id: noMatchesFoundContainerId
426
+ // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
497
427
  ,
498
428
  role: "option" // `aria-selected` is omitted because this option is not selectable
499
429
  ,
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1VIIl{position:relative;display:inline-block}._F9j_Z{padding-right:36px}._F9j_Z._1cEPU{box-shadow:none!important;border:1px solid #898989!important}._1sC_C{margin-top:4px}._2yM7K{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._2yM7K:hover{background-color:rgba(50,54,58,.08)}._2yM7K:active{background-color:rgba(50,54,58,.11)}._2yM7K._1I6-4{transform:rotate(-180deg)}._2yM7K._3tZZQ{opacity:.4}._1APRj{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._3tZZQ{cursor:not-allowed}._3tZZQ:hover{background-color:transparent}";
4
- var styles = {"combobox":"_1VIIl","comboboxInput":"_F9j_Z","ignoreFocusStyle":"_1cEPU","labelledInput":"_1sC_C","comboboxIcon":"_2yM7K","open":"_1I6-4","disabled":"_3tZZQ","comboboxEmpty":"_1APRj"};
5
- var stylesheet="._1VIIl{position:relative;display:inline-block}._F9j_Z{padding-right:36px}._F9j_Z._1cEPU{box-shadow:none!important;border:1px solid #898989!important}._1sC_C{margin-top:4px}._2yM7K{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._2yM7K:hover{background-color:rgba(50,54,58,.08)}._2yM7K:active{background-color:rgba(50,54,58,.11)}._2yM7K._1I6-4{transform:rotate(-180deg)}._2yM7K._3tZZQ{opacity:.4}._1APRj{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._3tZZQ{cursor:not-allowed}._3tZZQ:hover{background-color:transparent}";
3
+ var css_248z = "._jIMrn{position:relative;display:inline-block}._jnX2d{padding-right:36px}._jnX2d._FFYKv{box-shadow:none!important;border:1px solid #898989!important}._xcjKu{margin-top:4px}._cq-ku{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._cq-ku:hover{background-color:rgba(50,54,58,.08)}._cq-ku:active{background-color:rgba(50,54,58,.11)}._cq-ku._LgoGY{transform:rotate(-180deg)}._cq-ku._RuVcJ{opacity:.4}._M6wiF{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._RuVcJ{cursor:not-allowed}._RuVcJ:hover{background-color:transparent}";
4
+ var styles = {"combobox":"_jIMrn","comboboxInput":"_jnX2d","ignoreFocusStyle":"_FFYKv","labelledInput":"_xcjKu","comboboxIcon":"_cq-ku","open":"_LgoGY","disabled":"_RuVcJ","comboboxEmpty":"_M6wiF"};
5
+ var stylesheet="._jIMrn{position:relative;display:inline-block}._jnX2d{padding-right:36px}._jnX2d._FFYKv{box-shadow:none!important;border:1px solid #898989!important}._xcjKu{margin-top:4px}._cq-ku{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._cq-ku:hover{background-color:rgba(50,54,58,.08)}._cq-ku:active{background-color:rgba(50,54,58,.11)}._cq-ku._LgoGY{transform:rotate(-180deg)}._cq-ku._RuVcJ{opacity:.4}._M6wiF{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}._RuVcJ{cursor:not-allowed}._RuVcJ:hover{background-color:transparent}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -13,7 +13,7 @@ const ComboboxHeader = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
13
13
  } = _ref;
14
14
  return /*#__PURE__*/React__default.createElement(FlyoutHeader, _extends({}, rest, {
15
15
  title: title,
16
- onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
16
+ onMouseDown: wrapEvent(onMouseDown, e => e?.preventDefault()),
17
17
  ref: ref
18
18
  }), children);
19
19
  });
@@ -34,12 +34,10 @@ const ComboboxIcon = /*#__PURE__*/forwardRef((_ref, ref) => {
34
34
  if (inputRef.current === document.activeElement) {
35
35
  setIsOpen(!isOpen);
36
36
  } else {
37
- var _inputRef$current;
38
-
39
- (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
37
+ inputRef.current?.focus();
40
38
  }
41
39
  }) : undefined,
42
- onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
40
+ onMouseDown: wrapEvent(onMouseDown, e => e?.preventDefault()),
43
41
  ref: mergeRefs(ref, iconRef),
44
42
  "aria-hidden": "true"
45
43
  }));
@@ -69,22 +69,21 @@ const ComboboxInput = /*#__PURE__*/forwardRef((_ref, ref) => {
69
69
  onChange: handleInputChange,
70
70
  onFocus: wrapEvent(onFocus, handleFocus),
71
71
  onKeyDown: wrapEvent(onKeyDown, handleKeyDown),
72
- onMouseDown: e => onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e),
72
+ onMouseDown: e => onMouseDown?.(e),
73
73
  onClick: e => {
74
74
  if (!isOptionSelectedOnKeyboardHighlight && numberOfOptions > 0) {
75
75
  setHighlightedIndex(0);
76
76
  }
77
-
78
77
  setIsOpen(true);
79
- onClick === null || onClick === void 0 ? void 0 : onClick(e);
78
+ onClick?.(e);
80
79
  },
81
80
  role: "combobox",
82
81
  "aria-autocomplete": isFilteringDisabled ? 'none' : 'list',
83
82
  "aria-expanded": isAriaExpanded,
84
83
  "aria-controls": isAriaExpanded ? listContainerId : undefined,
85
84
  "aria-activedescendant": activeDescendantId,
86
- "aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
87
- "aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
85
+ "aria-label": ariaLabelFromProps ?? ariaLabel,
86
+ "aria-labelledby": ariaLabelledbyFromProps ?? ariaLabelledby
88
87
  }));
89
88
  });
90
89
 
@@ -48,8 +48,8 @@ const ComboboxList = /*#__PURE__*/forwardRef((_ref, ref) => {
48
48
  ...style
49
49
  } : style,
50
50
  id: listContainerId,
51
- "aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
52
- "aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
51
+ "aria-label": ariaLabelFromProps ?? ariaLabel,
52
+ "aria-labelledby": ariaLabelledbyFromProps ?? ariaLabelledby
53
53
  }), children)
54
54
  });
55
55
  });
@@ -37,13 +37,11 @@ const ExpandCollapseButton = _ref => {
37
37
  const hidePanelLabel = translate('configPane.hidePanel');
38
38
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
39
39
  const [isHiddenByEscape, setIsHiddenByEscape] = useState(false);
40
-
41
40
  const handleKeyDown = event => {
42
41
  if (event.key === 'Escape' && isOpen) {
43
42
  setIsHiddenByEscape(true);
44
43
  }
45
44
  };
46
-
47
45
  useEffect(() => {
48
46
  setIsHiddenByEscape(false);
49
47
  }, [isContainerHovered]);
@@ -76,7 +74,6 @@ const ExpandCollapseButton = _ref => {
76
74
  "aria-hidden": "true"
77
75
  }))));
78
76
  };
79
-
80
77
  const ConfigPane = _ref2 => {
81
78
  let {
82
79
  id,
@@ -106,9 +103,7 @@ const ConfigPane = _ref2 => {
106
103
  } = useTranslation();
107
104
  const pinPanelLabel = translate('configPane.pinPanel');
108
105
  const unpinPanelLabel = translate('configPane.unpinPanel');
109
-
110
106
  const toggleOpen = () => setIsOpen(currentIsOpen => !currentIsOpen);
111
-
112
107
  const [isContainerHoveredRef, isContainerHovered] = useIsHovered();
113
108
  return /*#__PURE__*/React__default.createElement("div", {
114
109
  className: classNames(styles.paneContainer, {
@@ -155,13 +150,11 @@ const ConfigPane = _ref2 => {
155
150
  "data-testid": getSubDataTestId(dataTestId, DATA_TESTID_SUFFIXES.BODY)
156
151
  }, children)))), !hideOpenButton &&
157
152
  /*#__PURE__*/
158
-
159
153
  /*
160
154
  the following element is clickable but doesn't need an accessible role since it is
161
155
  purely a visual convenience for opening the panel. Keyboard users can use the
162
156
  expand/collapse button to achieve the same functionality
163
157
  */
164
-
165
158
  /* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
166
159
  React__default.createElement("div", {
167
160
  className: styles.clickableArea,
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._2bG2f{grid-area:configPane;position:relative;height:100%}._2SvhW{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._2fGqx._2XTOz ._2SvhW,._2fGqx:not(._12PM9) ._2SvhW{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._12PM9 ._2SvhW{width:0}._2XTOz._12PM9 ._2SvhW{width:30px;cursor:pointer}._YRH-6 ._2SvhW{border-right-color:#eee}._1PzxX{height:100%;position:relative;width:292px}._2fGqx ._1PzxX,._12PM9 ._1PzxX{width:0}._2XTOz._2fGqx ._1PzxX,._2XTOz._12PM9 ._1PzxX{width:30px}._9dIHu ._1PzxX{transition:width .5s}._2ROuz{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._12PM9 ._2ROuz{visibility:hidden}._9dIHu ._2ROuz{visibility:visible}._2ROuz ._aLumU{width:252px;margin-left:20px}._my72o{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._84x8A{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._84x8A *{font-weight:400;font-size:16px;margin:0}._3glDp{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._12PM9 ._3glDp{left:0}._2XTOz._12PM9 ._3glDp{left:30px}._3glDp ._1jGkL{width:4px;height:100%}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._1jGkL,._3glDp:hover ._1jGkL{background-color:#9dc5ed}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1>span,._3glDp:hover ._2MIW1>span{background-color:#0b6ed0;border-color:#0b6ed0}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1>span>svg,._3glDp:hover ._2MIW1>span>svg{fill:#fff}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1:active>span,._3glDp:hover ._2MIW1:active>span{background-color:#0854a1;border-color:#0854a1}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1:active>span>svg,._3glDp:hover ._2MIW1:active>span>svg{fill:#fff}._3glDp ._2MIW1{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._3glDp ._2MIW1._3A6y3._3A6y3._3A6y3{opacity:1}._3glDp ._2MIW1._3ROya._3ROya._3ROya{opacity:0}._3glDp ._2MIW1:active>span{background-color:#0854a1;border-color:#0854a1}._3glDp ._2MIW1:active>span>svg{fill:#fff}._3glDp ._2MIW1>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._3glDp ._2MIW1>span>svg{fill:#515559;border-radius:50%}._2SvhW:hover+._3glDp ._2MIW1,._3glDp:hover ._2MIW1,._12PM9 ._3glDp ._2MIW1{opacity:1}body.keyboard-user ._2MIW1:focus{opacity:1;border-color:#0a3f88}";
4
- var styles = {"paneContainer":"_2bG2f","paneContentContainer":"_2SvhW","unpinned":"_2fGqx","hidden":"_12PM9","preview":"_2XTOz","openHidden":"_YRH-6","spacer":"_1PzxX","transitioning":"_9dIHu","paneContent":"_2ROuz","paneContentInner":"_aLumU","header":"_my72o","title":"_84x8A","clickableArea":"_3glDp","hoverBorder":"_1jGkL","toolbarPanelExpandCollapseButton":"_2MIW1","overrideShow":"_3A6y3","overrideHide":"_3ROya"};
5
- var stylesheet="._2bG2f{grid-area:configPane;position:relative;height:100%}._2SvhW{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._2fGqx._2XTOz ._2SvhW,._2fGqx:not(._12PM9) ._2SvhW{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._12PM9 ._2SvhW{width:0}._2XTOz._12PM9 ._2SvhW{width:30px;cursor:pointer}._YRH-6 ._2SvhW{border-right-color:#eee}._1PzxX{height:100%;position:relative;width:292px}._2fGqx ._1PzxX,._12PM9 ._1PzxX{width:0}._2XTOz._2fGqx ._1PzxX,._2XTOz._12PM9 ._1PzxX{width:30px}._9dIHu ._1PzxX{transition:width .5s}._2ROuz{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._12PM9 ._2ROuz{visibility:hidden}._9dIHu ._2ROuz{visibility:visible}._2ROuz ._aLumU{width:252px;margin-left:20px}._my72o{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._84x8A{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._84x8A *{font-weight:400;font-size:16px;margin:0}._3glDp{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._12PM9 ._3glDp{left:0}._2XTOz._12PM9 ._3glDp{left:30px}._3glDp ._1jGkL{width:4px;height:100%}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._1jGkL,._3glDp:hover ._1jGkL{background-color:#9dc5ed}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1>span,._3glDp:hover ._2MIW1>span{background-color:#0b6ed0;border-color:#0b6ed0}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1>span>svg,._3glDp:hover ._2MIW1>span>svg{fill:#fff}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1:active>span,._3glDp:hover ._2MIW1:active>span{background-color:#0854a1;border-color:#0854a1}._2XTOz._12PM9 ._2SvhW:hover+._3glDp ._2MIW1:active>span>svg,._3glDp:hover ._2MIW1:active>span>svg{fill:#fff}._3glDp ._2MIW1{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._3glDp ._2MIW1._3A6y3._3A6y3._3A6y3{opacity:1}._3glDp ._2MIW1._3ROya._3ROya._3ROya{opacity:0}._3glDp ._2MIW1:active>span{background-color:#0854a1;border-color:#0854a1}._3glDp ._2MIW1:active>span>svg{fill:#fff}._3glDp ._2MIW1>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._3glDp ._2MIW1>span>svg{fill:#515559;border-radius:50%}._2SvhW:hover+._3glDp ._2MIW1,._3glDp:hover ._2MIW1,._12PM9 ._3glDp ._2MIW1{opacity:1}body.keyboard-user ._2MIW1:focus{opacity:1;border-color:#0a3f88}";
3
+ var css_248z = "._-YDxO{grid-area:configPane;position:relative;height:100%}._u7-Ap{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._MU-T1._ouJLF ._u7-Ap,._MU-T1:not(._CNWuo) ._u7-Ap{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._CNWuo ._u7-Ap{width:0}._ouJLF._CNWuo ._u7-Ap{width:30px;cursor:pointer}._Ouz7v ._u7-Ap{border-right-color:#eee}._vXgFp{height:100%;position:relative;width:292px}._CNWuo ._vXgFp,._MU-T1 ._vXgFp{width:0}._ouJLF._CNWuo ._vXgFp,._ouJLF._MU-T1 ._vXgFp{width:30px}._2QOjB ._vXgFp{transition:width .5s}._DB2wF{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._CNWuo ._DB2wF{visibility:hidden}._2QOjB ._DB2wF{visibility:visible}._DB2wF ._IQE1j{width:252px;margin-left:20px}._gFIzf{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._aUv3W{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._aUv3W *{font-weight:400;font-size:16px;margin:0}._r-ox-{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._CNWuo ._r-ox-{left:0}._ouJLF._CNWuo ._r-ox-{left:30px}._r-ox- ._qzu66{width:4px;height:100%}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._qzu66,._r-ox-:hover ._qzu66{background-color:#9dc5ed}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq>span,._r-ox-:hover ._ejULq>span{background-color:#0b6ed0;border-color:#0b6ed0}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq>span>svg,._r-ox-:hover ._ejULq>span>svg{fill:#fff}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq:active>span,._r-ox-:hover ._ejULq:active>span{background-color:#0854a1;border-color:#0854a1}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq:active>span>svg,._r-ox-:hover ._ejULq:active>span>svg{fill:#fff}._r-ox- ._ejULq{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._r-ox- ._ejULq._jftaK._jftaK._jftaK{opacity:1}._r-ox- ._ejULq._5GZPd._5GZPd._5GZPd{opacity:0}._r-ox- ._ejULq:active>span{background-color:#0854a1;border-color:#0854a1}._r-ox- ._ejULq:active>span>svg{fill:#fff}._r-ox- ._ejULq>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._r-ox- ._ejULq>span>svg{fill:#515559;border-radius:50%}._CNWuo ._r-ox- ._ejULq,._r-ox-:hover ._ejULq,._u7-Ap:hover+._r-ox- ._ejULq{opacity:1}body.keyboard-user ._ejULq:focus{opacity:1;border-color:#0a3f88}";
4
+ var styles = {"paneContainer":"_-YDxO","paneContentContainer":"_u7-Ap","unpinned":"_MU-T1","hidden":"_CNWuo","preview":"_ouJLF","openHidden":"_Ouz7v","spacer":"_vXgFp","transitioning":"_2QOjB","paneContent":"_DB2wF","paneContentInner":"_IQE1j","header":"_gFIzf","title":"_aUv3W","clickableArea":"_r-ox-","hoverBorder":"_qzu66","toolbarPanelExpandCollapseButton":"_ejULq","overrideShow":"_jftaK","overrideHide":"_5GZPd"};
5
+ var stylesheet="._-YDxO{grid-area:configPane;position:relative;height:100%}._u7-Ap{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._MU-T1._ouJLF ._u7-Ap,._MU-T1:not(._CNWuo) ._u7-Ap{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._CNWuo ._u7-Ap{width:0}._ouJLF._CNWuo ._u7-Ap{width:30px;cursor:pointer}._Ouz7v ._u7-Ap{border-right-color:#eee}._vXgFp{height:100%;position:relative;width:292px}._CNWuo ._vXgFp,._MU-T1 ._vXgFp{width:0}._ouJLF._CNWuo ._vXgFp,._ouJLF._MU-T1 ._vXgFp{width:30px}._2QOjB ._vXgFp{transition:width .5s}._DB2wF{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._CNWuo ._DB2wF{visibility:hidden}._2QOjB ._DB2wF{visibility:visible}._DB2wF ._IQE1j{width:252px;margin-left:20px}._gFIzf{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._aUv3W{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._aUv3W *{font-weight:400;font-size:16px;margin:0}._r-ox-{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._CNWuo ._r-ox-{left:0}._ouJLF._CNWuo ._r-ox-{left:30px}._r-ox- ._qzu66{width:4px;height:100%}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._qzu66,._r-ox-:hover ._qzu66{background-color:#9dc5ed}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq>span,._r-ox-:hover ._ejULq>span{background-color:#0b6ed0;border-color:#0b6ed0}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq>span>svg,._r-ox-:hover ._ejULq>span>svg{fill:#fff}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq:active>span,._r-ox-:hover ._ejULq:active>span{background-color:#0854a1;border-color:#0854a1}._ouJLF._CNWuo ._u7-Ap:hover+._r-ox- ._ejULq:active>span>svg,._r-ox-:hover ._ejULq:active>span>svg{fill:#fff}._r-ox- ._ejULq{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._r-ox- ._ejULq._jftaK._jftaK._jftaK{opacity:1}._r-ox- ._ejULq._5GZPd._5GZPd._5GZPd{opacity:0}._r-ox- ._ejULq:active>span{background-color:#0854a1;border-color:#0854a1}._r-ox- ._ejULq:active>span>svg{fill:#fff}._r-ox- ._ejULq>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._r-ox- ._ejULq>span>svg{fill:#515559;border-radius:50%}._CNWuo ._r-ox- ._ejULq,._r-ox-:hover ._ejULq,._u7-Ap:hover+._r-ox- ._ejULq{opacity:1}body.keyboard-user ._ejULq:focus{opacity:1;border-color:#0a3f88}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };