@qualtrics/ui-react 2.21.0 → 2.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (207) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/__shared/cjs/{index-0ae99de2.js → index-75d9309a.js} +4 -4
  3. package/dist/__shared/cjs/{index-201e8786.js → index-a8c1a789.js} +678 -568
  4. package/dist/components/Accordion/Accordion.js +2 -3
  5. package/dist/components/Accordion/Accordion2.js +3 -3
  6. package/dist/components/Accordion/AccordionHeader.js +5 -4
  7. package/dist/components/Accordion/AccordionPanel.js +3 -3
  8. package/dist/components/Accordion/AccordionSection.js +1 -2
  9. package/dist/components/Button/Button.js +3 -3
  10. package/dist/components/Button/Button2.js +2 -2
  11. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  12. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  13. package/dist/components/Checkbox/Checkbox.js +11 -11
  14. package/dist/components/Checkbox/Checkbox2.js +3 -3
  15. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  16. package/dist/components/ColorPicker/Alpha.js +12 -9
  17. package/dist/components/ColorPicker/ColorPicker.js +10 -8
  18. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  19. package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +8 -6
  20. package/dist/components/ColorPicker/Hue.js +3 -2
  21. package/dist/components/ColorPicker/Palette.js +7 -5
  22. package/dist/components/ColorPicker/Saturation.js +9 -8
  23. package/dist/components/ColorPicker/utils/hexToRgbaString.js +3 -2
  24. package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
  25. package/dist/components/ColorPicker/utils/validateHex.js +10 -9
  26. package/dist/components/Combobox/Combobox.js +48 -29
  27. package/dist/components/Combobox/Combobox2.js +3 -3
  28. package/dist/components/Combobox/ComboboxHeader.js +1 -1
  29. package/dist/components/Combobox/ComboboxIcon.js +3 -2
  30. package/dist/components/Combobox/ComboboxInput.js +4 -4
  31. package/dist/components/Combobox/ComboboxList.js +2 -2
  32. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  33. package/dist/components/Divider/Divider2.js +3 -3
  34. package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +5 -2
  35. package/dist/components/Dropdown/Dropdown.js +14 -9
  36. package/dist/components/Dropdown/Dropdown2.js +3 -3
  37. package/dist/components/Dropdown/DropdownButton.js +23 -19
  38. package/dist/components/Dropdown/DropdownList.js +4 -4
  39. package/dist/components/Dropdown/DropdownOption.js +6 -9
  40. package/dist/components/Dropdown/DropdownSearch.js +12 -6
  41. package/dist/components/FilePicker/FilePicker.js +13 -6
  42. package/dist/components/FilePicker/FilePicker2.js +3 -3
  43. package/dist/components/FormField/Caption.js +3 -3
  44. package/dist/components/FormField/FormField.js +2 -2
  45. package/dist/components/FormField/FormField2.js +3 -3
  46. package/dist/components/FormField/FormFieldContext.js +3 -3
  47. package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -3
  48. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  49. package/dist/components/Icon/Icon.js +2 -2
  50. package/dist/components/IconButton/IconButton2.js +3 -3
  51. package/dist/components/InlineInput/InlineInput.js +12 -9
  52. package/dist/components/InlineInput/InlineInput2.js +3 -3
  53. package/dist/components/Input/Input.js +1 -1
  54. package/dist/components/Input/Input2.js +3 -3
  55. package/dist/components/Input/InputField.js +2 -2
  56. package/dist/components/InputGroup/InputGroup2.js +3 -3
  57. package/dist/components/Label/Label2.js +3 -3
  58. package/dist/components/Link/Link2.js +3 -3
  59. package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
  60. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  61. package/dist/components/LogicEditor/ConditionSet.js +5 -5
  62. package/dist/components/LogicEditor/LogicEditor.js +1 -1
  63. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  64. package/dist/components/LogicEditor/utils.js +2 -1
  65. package/dist/components/Modal/Modal.js +14 -13
  66. package/dist/components/Modal/Modal2.js +3 -3
  67. package/dist/components/NewMenu/BaseMenu.js +44 -36
  68. package/dist/components/NewMenu/NewMenu.js +3 -3
  69. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
  70. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -7
  71. package/dist/components/NewMenu/parts/MenuItem.js +1 -1
  72. package/dist/components/NumberStepper/NumberStepper.js +7 -6
  73. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  74. package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
  75. package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
  76. package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
  77. package/dist/components/PageLayout/PageLayout.js +3 -3
  78. package/dist/components/Pagination/Pagination.js +1 -1
  79. package/dist/components/Pagination/Pagination2.js +3 -3
  80. package/dist/components/Pagination/PaginationNextButton.js +5 -5
  81. package/dist/components/Pagination/PaginationPageInput.js +11 -9
  82. package/dist/components/Pagination/PaginationPreviousButton.js +5 -5
  83. package/dist/components/Popover/Popover.js +9 -7
  84. package/dist/components/Popover/Popover2.js +3 -3
  85. package/dist/components/QuickSearch/QuickSearch.js +4 -3
  86. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  87. package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
  88. package/dist/components/Radio/Radio.js +12 -11
  89. package/dist/components/Radio/Radio2.js +3 -3
  90. package/dist/components/SearchInput/SearchInput.js +4 -3
  91. package/dist/components/SearchInput/SearchInput2.js +3 -3
  92. package/dist/components/SidebarNav/SidebarNav.js +2 -1
  93. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  94. package/dist/components/SidebarNav/SidebarNavLink.js +1 -1
  95. package/dist/components/Slider/RangeSlider.js +2 -2
  96. package/dist/components/Slider/Slider.js +1 -1
  97. package/dist/components/Slider/Slider2.js +3 -3
  98. package/dist/components/Slider/SliderButton.js +1 -1
  99. package/dist/components/Switch/Switch.js +11 -11
  100. package/dist/components/Switch/Switch2.js +3 -3
  101. package/dist/components/Table/Table2.js +3 -3
  102. package/dist/components/Tabs/Tab.js +3 -3
  103. package/dist/components/Tabs/TabList.js +6 -5
  104. package/dist/components/Tabs/TabPanel.js +3 -3
  105. package/dist/components/Tabs/Tabs2.js +3 -3
  106. package/dist/components/Tooltip/Tooltip.js +10 -4
  107. package/dist/components/Tooltip/Tooltip2.js +3 -3
  108. package/dist/components/UIProvider/UIProvider.js +2 -2
  109. package/dist/components/deprecated_ColorPicker/Alpha.js +4 -4
  110. package/dist/components/deprecated_ColorPicker/Color.js +6 -6
  111. package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -2
  112. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  113. package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
  114. package/dist/components/deprecated_ColorPicker/Hue.js +3 -3
  115. package/dist/components/deprecated_ColorPicker/Saturation.js +5 -5
  116. package/dist/components/deprecated_ColorPicker/Swatch.js +2 -2
  117. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  118. package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +2 -2
  119. package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +2 -2
  120. package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +8 -8
  121. package/dist/components/deprecated_Tabs/Tabs.js +11 -7
  122. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  123. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  124. package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
  125. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +4 -2
  126. package/dist/components/deprecated_Toolbar/ToolbarTab.js +8 -8
  127. package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -3
  128. package/dist/hooks/useBreakpoints/useBreakpoints.js +1 -1
  129. package/dist/hooks/useClickOutside/useClickOutside.js +2 -1
  130. package/dist/hooks/useControllableState/useControllableState.js +2 -1
  131. package/dist/hooks/useEventListener/useEventListener.js +1 -1
  132. package/dist/hooks/useId/useId.js +1 -1
  133. package/dist/hooks/useOverlay/useOverlay.js +7 -6
  134. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  135. package/dist/hooks/useResponsiveValue/useResponsiveValue.js +2 -1
  136. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +4 -2
  137. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  138. package/dist/icons/Icon.js +3 -3
  139. package/dist/icons/createIconComponent.js +1 -1
  140. package/dist/icons/index.js +1 -1
  141. package/dist/index.d.ts +14 -7
  142. package/dist/index.es.js +1 -1
  143. package/dist/index.js +3 -4
  144. package/dist/next/AdvancedTable/AdvancedTable.js +62 -52
  145. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  146. package/dist/next/AdvancedTable/AdvancedTableCell.js +6 -4
  147. package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +18 -10
  148. package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +7 -6
  149. package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +5 -4
  150. package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
  151. package/dist/next/AdvancedTable/AdvancedTableTypes.js +6 -6
  152. package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +3 -2
  153. package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
  154. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -3
  155. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  156. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
  157. package/dist/next/Combobox/Combobox2.js +3 -3
  158. package/dist/next/Combobox/ComboboxFlyout.js +2 -2
  159. package/dist/next/Combobox/ComboboxGroup.js +1 -1
  160. package/dist/next/Combobox/ComboboxInput.js +2 -2
  161. package/dist/next/Combobox/ComboboxOption.js +1 -1
  162. package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +1 -1
  163. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +12 -8
  164. package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +1 -1
  165. package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +3 -2
  166. package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +2 -1
  167. package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +2 -1
  168. package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +1 -1
  169. package/dist/next/Drawer/Drawer.js +7 -4
  170. package/dist/next/Drawer/Drawer2.js +3 -3
  171. package/dist/next/FilterAnchor/FilterAnchor.js +3 -3
  172. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  173. package/dist/next/Input/Input.js +2 -2
  174. package/dist/next/Input/Input2.js +3 -3
  175. package/dist/next/Menu/Menu.js +5 -3
  176. package/dist/next/Menu/Menu2.js +3 -3
  177. package/dist/next/Menu/MenuItem.js +8 -9
  178. package/dist/next/Menu/MenuPane.js +20 -8
  179. package/dist/next/Menu/SubMenu.js +16 -18
  180. package/dist/next/Menu/useMutationObserver.js +1 -1
  181. package/dist/next/Menu/usePaneSearch.js +31 -21
  182. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +7 -6
  183. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  184. package/dist/next/SplitButton/SplitButton.js +8 -2
  185. package/dist/next/SplitButton/SplitButton2.js +3 -3
  186. package/dist/next/TimePicker/TimeDropdown.js +4 -4
  187. package/dist/next/TimePicker/TimeInput.js +2 -2
  188. package/dist/next/TimePicker/TimePicker.js +4 -4
  189. package/dist/next/TimePicker/TimePicker2.js +3 -3
  190. package/dist/next/TimePicker/TimePickerIcon.js +2 -1
  191. package/dist/next/TimePicker/utils.js +14 -27
  192. package/dist/next/ToggleButton/styles.js +3 -3
  193. package/dist/next/index.d.ts +1 -1
  194. package/dist/next/index.js +317 -260
  195. package/dist/utils/Flyout/Flyout.js +1 -1
  196. package/dist/utils/Flyout/Flyout2.js +3 -3
  197. package/dist/utils/Popper/Popper.js +9 -5
  198. package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +2 -1
  199. package/dist/utils/Translation/containsComponentOrElement.js +1 -3
  200. package/dist/utils/Translation/useTranslation.js +4 -5
  201. package/dist/utils/filterChildren/filterChildren.js +2 -1
  202. package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -1
  203. package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
  204. package/dist/utils/mergeRefs/mergeRefs.js +1 -1
  205. package/dist/utils/wrapEvent/wrapEvent.js +2 -2
  206. package/next/package.json +1 -1
  207. package/package.json +2 -2
@@ -9,6 +9,7 @@ import useTranslation from '../../utils/Translation/useTranslation.js';
9
9
  import calculateTargetId from './utils/calculateTargetId.js';
10
10
 
11
11
  const Swatch = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
12
+ var _color$name;
12
13
  let {
13
14
  color,
14
15
  onColorSwatchClick,
@@ -28,14 +29,14 @@ const Swatch = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
28
29
  type: "button",
29
30
  className: styles.swatch,
30
31
  style: {
31
- backgroundColor: `${color.hex}`
32
+ backgroundColor: "".concat(color.hex)
32
33
  },
33
34
  onClick: handleClick,
34
35
  tabIndex: cellIndex === focusedSwatchIndex ? 0 : -1,
35
- "aria-label": `${color.name ?? ''} ${color.hex}`,
36
+ "aria-label": "".concat((_color$name = color.name) !== null && _color$name !== void 0 ? _color$name : '', " ").concat(color.hex),
36
37
  "aria-describedby": ariaDescribedBy,
37
38
  ref: ref,
38
- "data-testid": getSubDataTestId(dataTestId, `${color.hex.substring(1)}-swatch`)
39
+ "data-testid": getSubDataTestId(dataTestId, "".concat(color.hex.substring(1), "-swatch"))
39
40
  }));
40
41
  });
41
42
  function Palette(_ref2) {
@@ -52,7 +53,7 @@ function Palette(_ref2) {
52
53
  } = useTranslation();
53
54
  const paletteAriaLabel = translate('palette');
54
55
  const swatchAriaDesc = translate('selectColor');
55
- const swatchDescriptionId = `${containerId}-swatch-desc`;
56
+ const swatchDescriptionId = "".concat(containerId, "-swatch-desc");
56
57
  const swatchRefs = useRef({});
57
58
 
58
59
  // split palette into rows for grid aria role semantics
@@ -68,8 +69,9 @@ function Palette(_ref2) {
68
69
  function updateFocusedSwatchIndex(e, direction) {
69
70
  e.preventDefault(); // prevents scroll
70
71
  setFocusedSwatchIndex(prevFocusedSwatchIndex => {
72
+ var _swatchRefs$current;
71
73
  const targetId = calculateTargetId(prevFocusedSwatchIndex, palette.length, direction);
72
- swatchRefs.current?.[targetId]?.focus();
74
+ (_swatchRefs$current = swatchRefs.current) === null || _swatchRefs$current === void 0 || (_swatchRefs$current = _swatchRefs$current[targetId]) === null || _swatchRefs$current === void 0 ? void 0 : _swatchRefs$current.focus();
73
75
  return targetId;
74
76
  });
75
77
  }
@@ -22,7 +22,7 @@ function Saturation(_ref) {
22
22
  } = _ref;
23
23
  const gridRef = useRef(null);
24
24
  const loopRef = useRef(null);
25
- const saturationId = `${containerId}-saturation`;
25
+ const saturationId = "".concat(containerId, "-saturation");
26
26
  const {
27
27
  translate
28
28
  } = useTranslation();
@@ -87,22 +87,23 @@ function Saturation(_ref) {
87
87
  return /*#__PURE__*/React__default.createElement("div", {
88
88
  className: styles.saturationGrid,
89
89
  style: {
90
- backgroundColor: `${hsvToHex({
90
+ backgroundColor: "".concat(hsvToHex({
91
91
  h: hsv.h,
92
92
  s: 1,
93
93
  v: 1
94
- })}`
94
+ }))
95
95
  },
96
96
  onMouseDown: e => {
97
+ var _loopRef$current;
97
98
  // prevent text highlighting while dragging
98
99
  e.preventDefault();
99
- loopRef.current?.focus();
100
+ (_loopRef$current = loopRef.current) === null || _loopRef$current === void 0 ? void 0 : _loopRef$current.focus();
100
101
  handleMouseDown(e);
101
102
  },
102
103
  "data-testid": getSubDataTestId(dataTestId, 'saturation-grid'),
103
104
  ref: gridRef
104
105
  }, /*#__PURE__*/React__default.createElement("div", {
105
- id: `${saturationId}-saturation-desc`,
106
+ id: "".concat(saturationId, "-saturation-desc"),
106
107
  className: styles.hidden
107
108
  }, saturationAriaDesc), /*#__PURE__*/React__default.createElement("div", {
108
109
  "aria-live": loopRef.current === document.activeElement ? 'assertive' : 'off',
@@ -113,13 +114,13 @@ function Saturation(_ref) {
113
114
  }, valueAriaLive), /*#__PURE__*/React__default.createElement("div", {
114
115
  className: styles.saturationLoop,
115
116
  style: {
116
- left: `calc(${hsv.s * 100}% - ${hsv.s * 12}px)`,
117
- bottom: `calc(${hsv.v * 100}% - ${hsv.v * 12}px)`
117
+ left: "calc(".concat(hsv.s * 100, "% - ").concat(hsv.s * 12, "px)"),
118
+ bottom: "calc(".concat(hsv.v * 100, "% - ").concat(hsv.v * 12, "px)")
118
119
  },
119
120
  onKeyDown: handleKeyDown,
120
121
  tabIndex: 0,
121
122
  "aria-label": saturationAriaLabel,
122
- "aria-describedby": `${saturationId}-saturation-desc`,
123
+ "aria-describedby": "".concat(saturationId, "-saturation-desc"),
123
124
  ref: loopRef,
124
125
  "data-testid": getSubDataTestId(dataTestId, 'saturation-thumb')
125
126
  }));
@@ -1,9 +1,10 @@
1
1
  import hexToRgb from './hexToRgb.js';
2
2
 
3
3
  function hexToRgbaString(color) {
4
+ var _color$alpha;
4
5
  const rgb = hexToRgb(color.hex);
5
- const alpha = color.alpha ?? 100;
6
- return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha / 100})`;
6
+ const alpha = (_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100;
7
+ return "rgba(".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b, ", ").concat(alpha / 100, ")");
7
8
  }
8
9
 
9
10
  export { hexToRgbaString as default };
@@ -7,7 +7,7 @@ function rgbToHex(_ref) {
7
7
  const rStr = r.toString(16).padStart(2, '0');
8
8
  const gStr = g.toString(16).padStart(2, '0');
9
9
  const bStr = b.toString(16).padStart(2, '0');
10
- return `#${rStr}${gStr}${bStr}`;
10
+ return "#".concat(rStr).concat(gStr).concat(bStr);
11
11
  }
12
12
 
13
13
  export { rgbToHex as default };
@@ -1,39 +1,40 @@
1
1
  function validateHex(currentColor, newHex, isAlphaEnabled) {
2
+ var _currentColor$alpha;
2
3
  // set current alpha to hex format
3
- const alpha = Math.round((currentColor.alpha ?? 100) / 100 * 255).toString(16).toUpperCase().padStart(2, '0');
4
+ const alpha = Math.round(((_currentColor$alpha = currentColor.alpha) !== null && _currentColor$alpha !== void 0 ? _currentColor$alpha : 100) / 100 * 255).toString(16).toUpperCase().padStart(2, '0');
4
5
  let newAlpha = isAlphaEnabled ? alpha : '';
5
6
  let validatedHex;
6
7
  const hexLength = isAlphaEnabled ? 8 : 6;
7
8
  const hexRegex = /^[a-fA-F0-9]+$/;
8
9
 
9
10
  // if newHex contains invalid characters or is empty string, revert to previous color
10
- if (!hexRegex.test(newHex.slice(0, hexLength))) return `${currentColor.hex.substring(1)}${newAlpha}`;
11
+ if (!hexRegex.test(newHex.slice(0, hexLength))) return "".concat(currentColor.hex.substring(1)).concat(newAlpha);
11
12
 
12
13
  // match validation pattern based on string length
13
14
  switch (newHex.length) {
14
15
  case 1:
15
- validatedHex = `${newHex.repeat(6)}${newAlpha}`;
16
+ validatedHex = "".concat(newHex.repeat(6)).concat(newAlpha);
16
17
  break;
17
18
  case 2:
18
- validatedHex = `${newHex.repeat(3)}${newAlpha}`;
19
+ validatedHex = "".concat(newHex.repeat(3)).concat(newAlpha);
19
20
  break;
20
21
  case 3:
21
- validatedHex = `${newHex[0].repeat(2)}${newHex[1].repeat(2)}${newHex[2].repeat(2)}${newAlpha}`;
22
+ validatedHex = "".concat(newHex[0].repeat(2)).concat(newHex[1].repeat(2)).concat(newHex[2].repeat(2)).concat(newAlpha);
22
23
  break;
23
24
  case 4:
24
25
  case 5:
25
26
  newAlpha = isAlphaEnabled ? newHex[3].repeat(2) : '';
26
- validatedHex = `${newHex[0].repeat(2)}${newHex[1].repeat(2)}${newHex[2].repeat(2)}${newAlpha}`;
27
+ validatedHex = "".concat(newHex[0].repeat(2)).concat(newHex[1].repeat(2)).concat(newHex[2].repeat(2)).concat(newAlpha);
27
28
  break;
28
29
  case 6:
29
- validatedHex = `${newHex}${newAlpha}`;
30
+ validatedHex = "".concat(newHex).concat(newAlpha);
30
31
  break;
31
32
  case 7:
32
- validatedHex = `${newHex.substring(0, 6)}${newAlpha}`;
33
+ validatedHex = "".concat(newHex.substring(0, 6)).concat(newAlpha);
33
34
  break;
34
35
  default:
35
36
  newAlpha = isAlphaEnabled ? newHex.substring(6, 8) : '';
36
- validatedHex = `${newHex.substring(0, 6)}${newAlpha}`;
37
+ validatedHex = "".concat(newHex.substring(0, 6)).concat(newAlpha);
37
38
  break;
38
39
  }
39
40
  return validatedHex.toUpperCase();
@@ -1,5 +1,4 @@
1
1
  import _extends from '@babel/runtime-corejs3/helpers/extends';
2
- import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
3
2
  import React__default, { forwardRef, useMemo, useRef, useState, useCallback, useEffect, cloneElement } from 'react';
4
3
  import classNames from 'classnames';
5
4
  import { useFocusVisible } from '@react-aria/interactions';
@@ -19,10 +18,15 @@ import useControllableState from '../../hooks/useControllableState/useControllab
19
18
  import useClickOutside from '../../hooks/useClickOutside/useClickOutside.js';
20
19
  import wrapEvent from '../../utils/wrapEvent/wrapEvent.js';
21
20
 
22
- const getOptionLabel = option => option?.props?.label;
23
- const getOptionValue = option => option?.props?.value;
21
+ const getOptionLabel = option => {
22
+ var _option$props;
23
+ return option === null || option === void 0 || (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label;
24
+ };
25
+ const getOptionValue = option => {
26
+ var _option$props2;
27
+ return option === null || option === void 0 || (_option$props2 = option.props) === null || _option$props2 === void 0 ? void 0 : _option$props2.value;
28
+ };
24
29
  const doesOptionMatchFilter = (option, header, inputValue) => {
25
- var _context, _context2;
26
30
  const label = getOptionLabel(option);
27
31
 
28
32
  // 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
@@ -31,7 +35,7 @@ const doesOptionMatchFilter = (option, header, inputValue) => {
31
35
  }
32
36
 
33
37
  // 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)
34
- return typeof label === 'string' && _includesInstanceProperty(_context = label.toLowerCase()).call(_context, inputValue.toLowerCase()) || typeof header === 'string' && _includesInstanceProperty(_context2 = header.toLowerCase()).call(_context2, inputValue.toLowerCase());
38
+ return typeof label === 'string' && label.toLowerCase().includes(inputValue.toLowerCase()) || typeof header === 'string' && header.toLowerCase().includes(inputValue.toLowerCase());
35
39
  };
36
40
  const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
37
41
  let {
@@ -69,20 +73,23 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
69
73
  // Gets the <ComboboxInput> and <ComboboxList> components from the children
70
74
  React__default.Children.forEach(children, child => {
71
75
  if ( /*#__PURE__*/React__default.isValidElement(child)) {
72
- if (child?.type === ComboboxInput) {
76
+ if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxInput) {
73
77
  comboboxInput = child;
74
- } else if (child?.type === ComboboxList) {
78
+ } else if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxList) {
75
79
  comboboxList = child;
76
80
  }
77
81
  }
78
82
  });
79
83
  const listContainerId = useId(comboboxList.props.id);
80
- const noMatchesFoundContainerId = `${listContainerId}-no-matches-found`;
84
+ const noMatchesFoundContainerId = "".concat(listContainerId, "-no-matches-found");
81
85
 
82
86
  // Extracts all ComboboxOptions
83
- const [, [allOptions]] = useMemo(() => filterChildren(comboboxList?.props?.children, [{
84
- matcher: child => child?.type === ComboboxOption
85
- }]), [comboboxList]);
87
+ const [, [allOptions]] = useMemo(() => {
88
+ var _comboboxList;
89
+ return filterChildren((_comboboxList = comboboxList) === null || _comboboxList === void 0 || (_comboboxList = _comboboxList.props) === null || _comboboxList === void 0 ? void 0 : _comboboxList.children, [{
90
+ matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
91
+ }]);
92
+ }, [comboboxList]);
86
93
  const {
87
94
  defaultValue: defaultInputValue,
88
95
  onChange: onInputChange,
@@ -105,7 +112,7 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
105
112
  const [selectedOptionLabel, setSelectedOptionLabel] = useState(() => getLabelForValue(selectedOptionValue) || externalInputValue || defaultInputValue || '');
106
113
  const [inputValue, setInputValue] = useControllableState(selectedOptionLabel,
107
114
  // `e &&` prevents `ComboboxInput` from calling consumer-passed `onChange` for consumer-controlled `Combobox` value updates.
108
- (_, e) => e && onInputChange?.(e), externalInputValue);
115
+ (_, e) => e && (onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(e)), externalInputValue);
109
116
 
110
117
  // listen for updates from controlled value
111
118
  useEffect(() => {
@@ -133,6 +140,7 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
133
140
 
134
141
  // Gets the filtered options based on the current input value (only if isFilteringDisabled is false)
135
142
  const [listChildrenFilteredOptions, [, filteredOptions]] = useMemo(() => {
143
+ var _comboboxList2;
136
144
  let currentHeaderTitle;
137
145
  const handleSelect = option => {
138
146
  const newOptionValue = getOptionValue(option);
@@ -144,15 +152,16 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
144
152
  }
145
153
  });
146
154
  };
147
- return filterChildren(comboboxList?.props?.children, [
155
+ return filterChildren((_comboboxList2 = comboboxList) === null || _comboboxList2 === void 0 || (_comboboxList2 = _comboboxList2.props) === null || _comboboxList2 === void 0 ? void 0 : _comboboxList2.children, [
148
156
  /*
149
157
  * For each header, adds a key value pair to the headerCounts object where the key is the header title and the value is 0.
150
158
  * The value will be updated in the matcher/modifier below this matcher/modifier.
151
159
  */
152
160
  {
153
- matcher: child => child?.type === ComboboxHeader,
161
+ matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
154
162
  modifier: child => {
155
- currentHeaderTitle = child.props?.title;
163
+ var _props;
164
+ currentHeaderTitle = (_props = child.props) === null || _props === void 0 ? void 0 : _props.title;
156
165
  headerCounts[currentHeaderTitle] = 0;
157
166
  return child;
158
167
  }
@@ -162,16 +171,18 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
162
171
  * Otherwise, returns null.
163
172
  */
164
173
  {
165
- matcher: child => child?.type === ComboboxOption,
174
+ matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption,
166
175
  modifier: (child, index) => {
167
176
  if (inputValue === selectedOptionLabel || isFilteringDisabled || doesOptionMatchFilter(child, currentHeaderTitle, inputValue)) {
177
+ var _props$id;
168
178
  headerCounts[currentHeaderTitle] += 1;
169
179
  return /*#__PURE__*/cloneElement(child, {
170
180
  onSelect: e => {
171
- child?.props?.onSelect?.(e);
181
+ var _props2, _props2$onSelect;
182
+ child === null || child === void 0 || (_props2 = child.props) === null || _props2 === void 0 || (_props2$onSelect = _props2.onSelect) === null || _props2$onSelect === void 0 ? void 0 : _props2$onSelect.call(_props2, e);
172
183
 
173
184
  // Prevents form submission
174
- if (e?.key === 'Enter') {
185
+ if ((e === null || e === void 0 ? void 0 : e.key) === 'Enter') {
175
186
  e.preventDefault();
176
187
  }
177
188
  if (!e.key) {
@@ -192,7 +203,7 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
192
203
  isHighlightedOnHover: isOptionSelectedOnKeyboardHighlight,
193
204
  isHighlighted: isOptionSelectedOnKeyboardHighlight ? false : index === highlightedIndex,
194
205
  isSelected: isOptionSelectedOnKeyboardHighlight ? index === selectedIndex : selectedOptionValue === getOptionValue(child),
195
- id: child.props.id ?? `${listContainerId}-option-${index}`,
206
+ id: (_props$id = child.props.id) !== null && _props$id !== void 0 ? _props$id : "".concat(listContainerId, "-option-").concat(index),
196
207
  ref: node => {
197
208
  optionRefs.current[Number(index)] = node;
198
209
  }
@@ -206,15 +217,19 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
206
217
 
207
218
  // Gets all filtered options, as well as headers that have at least one filtered option
208
219
  const [listChildrenFilteredOptionsAndHeaders] = useMemo(() => filterChildren(listChildrenFilteredOptions, [{
209
- matcher: child => child?.type === ComboboxOption
220
+ matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
210
221
  }, {
211
- matcher: child => child?.type === ComboboxHeader,
212
- modifier: child => headerCounts[child.props?.title] ? child : null
222
+ matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
223
+ modifier: child => {
224
+ var _props3;
225
+ return headerCounts[(_props3 = child.props) === null || _props3 === void 0 ? void 0 : _props3.title] ? child : null;
226
+ }
213
227
  }]), [headerCounts, listChildrenFilteredOptions]);
214
228
  const keyboardHighlightOrSelectOption = (index, e) => {
215
229
  if (isOptionSelectedOnKeyboardHighlight) {
230
+ var _filteredOptions$inde, _filteredOptions$inde2;
216
231
  setSelectedIndex(index);
217
- filteredOptions[index]?.props?.onSelect?.(e);
232
+ (_filteredOptions$inde = filteredOptions[index]) === null || _filteredOptions$inde === void 0 || (_filteredOptions$inde = _filteredOptions$inde.props) === null || _filteredOptions$inde === void 0 || (_filteredOptions$inde2 = _filteredOptions$inde.onSelect) === null || _filteredOptions$inde2 === void 0 ? void 0 : _filteredOptions$inde2.call(_filteredOptions$inde, e);
218
233
  } else {
219
234
  setHighlightedIndex(index);
220
235
  }
@@ -272,7 +287,8 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
272
287
  case 'Enter':
273
288
  if (isFlyoutOpen) {
274
289
  if (!isOptionSelectedOnKeyboardHighlight && filteredOptions.length > 0 && filteredOptions[highlightedIndex] !== undefined) {
275
- filteredOptions[highlightedIndex]?.props?.onSelect?.(e);
290
+ var _filteredOptions$high, _filteredOptions$high2;
291
+ (_filteredOptions$high = filteredOptions[highlightedIndex]) === null || _filteredOptions$high === void 0 || (_filteredOptions$high = _filteredOptions$high.props) === null || _filteredOptions$high === void 0 || (_filteredOptions$high2 = _filteredOptions$high.onSelect) === null || _filteredOptions$high2 === void 0 ? void 0 : _filteredOptions$high2.call(_filteredOptions$high, e);
276
292
  }
277
293
  }
278
294
  setIsFlyoutOpen(false);
@@ -333,11 +349,12 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
333
349
  useEffect(() => {
334
350
  const currentIndex = isOptionSelectedOnKeyboardHighlight ? selectedIndex : highlightedIndex;
335
351
  const optionRef = optionRefs.current[currentIndex];
336
- if (isFocusVisible && isFlyoutOpen && optionRef && listRef?.current) {
352
+ if (isFocusVisible && isFlyoutOpen && optionRef && listRef !== null && listRef !== void 0 && listRef.current) {
353
+ var _listRef$current, _listRef$current2;
337
354
  if (currentIndex === 0) {
338
355
  // Scrolls the first header into view if one exists
339
356
  listRef.current.scrollTop = 0;
340
- } else if (listRef.current?.scrollHeight > listRef.current?.clientHeight) {
357
+ } 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)) {
341
358
  const scrollBottom = listRef.current.clientHeight + listRef.current.scrollTop;
342
359
  const elementBottom = optionRef.offsetTop + optionRef.offsetHeight;
343
360
  if (elementBottom > scrollBottom) {
@@ -377,16 +394,18 @@ const Combobox = /*#__PURE__*/forwardRef((_ref, ref) => {
377
394
  const activeDescendantId = useMemo(() => {
378
395
  if (isAriaExpanded) {
379
396
  if (unstable_isLoading) {
380
- return `${listContainerId}-loading-spinner`;
397
+ return "".concat(listContainerId, "-loading-spinner");
381
398
  }
382
399
  if (filteredOptions.length === 0) {
383
400
  return undefined;
384
401
  }
385
402
  if (selectedIndex !== -1) {
386
- return filteredOptions[selectedIndex]?.props.id;
403
+ var _filteredOptions$sele;
404
+ return (_filteredOptions$sele = filteredOptions[selectedIndex]) === null || _filteredOptions$sele === void 0 ? void 0 : _filteredOptions$sele.props.id;
387
405
  }
388
406
  if (highlightedIndex !== -1) {
389
- return filteredOptions[highlightedIndex]?.props.id;
407
+ var _filteredOptions$high3;
408
+ return (_filteredOptions$high3 = filteredOptions[highlightedIndex]) === null || _filteredOptions$high3 === void 0 ? void 0 : _filteredOptions$high3.props.id;
390
409
  }
391
410
  }
392
411
  return undefined;
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._tJ35a{position:relative;display:inline-block}._ziKOn{padding-right:36px}._ziKOn._rJb-f{box-shadow:none!important;border:1px solid #898989!important}._CuXIj{margin-top:4px}._s76e0{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._s76e0:hover{background-color:rgba(50,54,58,.08)}._s76e0:active{background-color:rgba(50,54,58,.11)}._s76e0._USuOw{transform:rotate(-180deg)}._s76e0._PDmsy{opacity:.4}._l4O6R{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}._PDmsy{cursor:not-allowed}._PDmsy:hover{background-color:transparent}";
4
- var styles = {"combobox":"_tJ35a","comboboxInput":"_ziKOn","ignoreFocusStyle":"_rJb-f","labelledInput":"_CuXIj","comboboxIcon":"_s76e0","open":"_USuOw","disabled":"_PDmsy","comboboxEmpty":"_l4O6R"};
5
- var stylesheet="._tJ35a{position:relative;display:inline-block}._ziKOn{padding-right:36px}._ziKOn._rJb-f{box-shadow:none!important;border:1px solid #898989!important}._CuXIj{margin-top:4px}._s76e0{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._s76e0:hover{background-color:rgba(50,54,58,.08)}._s76e0:active{background-color:rgba(50,54,58,.11)}._s76e0._USuOw{transform:rotate(-180deg)}._s76e0._PDmsy{opacity:.4}._l4O6R{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}._PDmsy{cursor:not-allowed}._PDmsy:hover{background-color:transparent}";
3
+ var css_248z = "._bZwvn{position:relative;display:inline-block}._k929v{padding-right:36px}._k929v._gsTix{box-shadow:none!important;border:1px solid #898989!important}._mUgkG{margin-top:4px}._gK0pz{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._gK0pz:hover{background-color:rgba(50,54,58,.08)}._gK0pz:active{background-color:rgba(50,54,58,.11)}._gK0pz._RbR6m{transform:rotate(-180deg)}._gK0pz._2vyAm{opacity:.4}._asLvc{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}._2vyAm{cursor:not-allowed}._2vyAm:hover{background-color:transparent}";
4
+ var styles = {"combobox":"_bZwvn","comboboxInput":"_k929v","ignoreFocusStyle":"_gsTix","labelledInput":"_mUgkG","comboboxIcon":"_gK0pz","open":"_RbR6m","disabled":"_2vyAm","comboboxEmpty":"_asLvc"};
5
+ var stylesheet="._bZwvn{position:relative;display:inline-block}._k929v{padding-right:36px}._k929v._gsTix{box-shadow:none!important;border:1px solid #898989!important}._mUgkG{margin-top:4px}._gK0pz{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._gK0pz:hover{background-color:rgba(50,54,58,.08)}._gK0pz:active{background-color:rgba(50,54,58,.11)}._gK0pz._RbR6m{transform:rotate(-180deg)}._gK0pz._2vyAm{opacity:.4}._asLvc{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}._2vyAm{cursor:not-allowed}._2vyAm: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?.preventDefault()),
16
+ onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
17
17
  ref: ref
18
18
  }), children);
19
19
  });
@@ -34,10 +34,11 @@ const ComboboxIcon = /*#__PURE__*/forwardRef((_ref, ref) => {
34
34
  if (inputRef.current === document.activeElement) {
35
35
  setIsOpen(!isOpen);
36
36
  } else {
37
- inputRef.current?.focus();
37
+ var _inputRef$current;
38
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
38
39
  }
39
40
  }) : undefined,
40
- onMouseDown: wrapEvent(onMouseDown, e => e?.preventDefault()),
41
+ onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
41
42
  ref: mergeRefs(ref, iconRef),
42
43
  "aria-hidden": "true"
43
44
  }));
@@ -69,21 +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?.(e),
72
+ onMouseDown: e => onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e),
73
73
  onClick: e => {
74
74
  if (!isOptionSelectedOnKeyboardHighlight && numberOfOptions > 0) {
75
75
  setHighlightedIndex(0);
76
76
  }
77
77
  setIsOpen(true);
78
- onClick?.(e);
78
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
79
79
  },
80
80
  role: "combobox",
81
81
  "aria-autocomplete": isFilteringDisabled ? 'none' : 'list',
82
82
  "aria-expanded": isAriaExpanded,
83
83
  "aria-controls": isAriaExpanded ? listContainerId : undefined,
84
84
  "aria-activedescendant": activeDescendantId,
85
- "aria-label": ariaLabelFromProps ?? ariaLabel,
86
- "aria-labelledby": ariaLabelledbyFromProps ?? ariaLabelledby
85
+ "aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
86
+ "aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
87
87
  }));
88
88
  });
89
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 ?? ariaLabel,
52
- "aria-labelledby": ariaLabelledbyFromProps ?? ariaLabelledby
51
+ "aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
52
+ "aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
53
53
  }), children)
54
54
  });
55
55
  });
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._hrRPh{grid-area:configPane;position:relative;height:100%}._WJn4X{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}._-G6pY._y1EB- ._WJn4X,._-G6pY:not(._HeTXq) ._WJn4X{-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)}._HeTXq ._WJn4X{width:0}._y1EB-._HeTXq ._WJn4X{width:30px;cursor:pointer}._yL-96 ._WJn4X{border-right-color:#eee}._hvicM{height:100%;position:relative;width:292px}._-G6pY ._hvicM,._HeTXq ._hvicM{width:0}._y1EB-._-G6pY ._hvicM,._y1EB-._HeTXq ._hvicM{width:30px}._Y1-bq ._hvicM{transition:width .5s}._9Fxcd{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._HeTXq ._9Fxcd{visibility:hidden}._Y1-bq ._9Fxcd{visibility:visible}._9Fxcd ._ACaF2{width:252px;margin-left:20px}._XTRrv{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._-6dwa{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._-6dwa *{font-weight:400;font-size:16px;margin:0}._KxMb1{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._HeTXq ._KxMb1{left:0}._y1EB-._HeTXq ._KxMb1{left:30px}._KxMb1 ._PEcd-{width:4px;height:100%}._KxMb1:hover ._PEcd-,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._PEcd-{background-color:#9dc5ed}._KxMb1:hover ._Z6aNM>span,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM>span{background-color:#0b6ed0;border-color:#0b6ed0}._KxMb1:hover ._Z6aNM>span>svg,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM>span>svg{fill:#fff}._KxMb1:hover ._Z6aNM:active>span,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM:active>span{background-color:#0854a1;border-color:#0854a1}._KxMb1:hover ._Z6aNM:active>span>svg,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM:active>span>svg{fill:#fff}._KxMb1 ._Z6aNM{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}._KxMb1 ._Z6aNM._fW5Ff._fW5Ff._fW5Ff{opacity:1}._KxMb1 ._Z6aNM._AkcIZ._AkcIZ._AkcIZ{opacity:0}._KxMb1 ._Z6aNM:active>span{background-color:#0854a1;border-color:#0854a1}._KxMb1 ._Z6aNM:active>span>svg{fill:#fff}._KxMb1 ._Z6aNM>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._KxMb1 ._Z6aNM>span>svg{fill:#515559;border-radius:50%}._HeTXq ._KxMb1 ._Z6aNM,._KxMb1:hover ._Z6aNM,._WJn4X:hover+._KxMb1 ._Z6aNM{opacity:1}._Z6aNM.focus-visible,._Z6aNM:focus-visible{opacity:1;border-color:#0a3f88}";
4
- var styles = {"paneContainer":"_hrRPh","paneContentContainer":"_WJn4X","unpinned":"_-G6pY","hidden":"_HeTXq","preview":"_y1EB-","openHidden":"_yL-96","spacer":"_hvicM","transitioning":"_Y1-bq","paneContent":"_9Fxcd","paneContentInner":"_ACaF2","header":"_XTRrv","title":"_-6dwa","clickableArea":"_KxMb1","hoverBorder":"_PEcd-","toolbarPanelExpandCollapseButton":"_Z6aNM","overrideShow":"_fW5Ff","overrideHide":"_AkcIZ"};
5
- var stylesheet="._hrRPh{grid-area:configPane;position:relative;height:100%}._WJn4X{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}._-G6pY._y1EB- ._WJn4X,._-G6pY:not(._HeTXq) ._WJn4X{-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)}._HeTXq ._WJn4X{width:0}._y1EB-._HeTXq ._WJn4X{width:30px;cursor:pointer}._yL-96 ._WJn4X{border-right-color:#eee}._hvicM{height:100%;position:relative;width:292px}._-G6pY ._hvicM,._HeTXq ._hvicM{width:0}._y1EB-._-G6pY ._hvicM,._y1EB-._HeTXq ._hvicM{width:30px}._Y1-bq ._hvicM{transition:width .5s}._9Fxcd{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._HeTXq ._9Fxcd{visibility:hidden}._Y1-bq ._9Fxcd{visibility:visible}._9Fxcd ._ACaF2{width:252px;margin-left:20px}._XTRrv{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._-6dwa{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._-6dwa *{font-weight:400;font-size:16px;margin:0}._KxMb1{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._HeTXq ._KxMb1{left:0}._y1EB-._HeTXq ._KxMb1{left:30px}._KxMb1 ._PEcd-{width:4px;height:100%}._KxMb1:hover ._PEcd-,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._PEcd-{background-color:#9dc5ed}._KxMb1:hover ._Z6aNM>span,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM>span{background-color:#0b6ed0;border-color:#0b6ed0}._KxMb1:hover ._Z6aNM>span>svg,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM>span>svg{fill:#fff}._KxMb1:hover ._Z6aNM:active>span,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM:active>span{background-color:#0854a1;border-color:#0854a1}._KxMb1:hover ._Z6aNM:active>span>svg,._y1EB-._HeTXq ._WJn4X:hover+._KxMb1 ._Z6aNM:active>span>svg{fill:#fff}._KxMb1 ._Z6aNM{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}._KxMb1 ._Z6aNM._fW5Ff._fW5Ff._fW5Ff{opacity:1}._KxMb1 ._Z6aNM._AkcIZ._AkcIZ._AkcIZ{opacity:0}._KxMb1 ._Z6aNM:active>span{background-color:#0854a1;border-color:#0854a1}._KxMb1 ._Z6aNM:active>span>svg{fill:#fff}._KxMb1 ._Z6aNM>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._KxMb1 ._Z6aNM>span>svg{fill:#515559;border-radius:50%}._HeTXq ._KxMb1 ._Z6aNM,._KxMb1:hover ._Z6aNM,._WJn4X:hover+._KxMb1 ._Z6aNM{opacity:1}._Z6aNM.focus-visible,._Z6aNM:focus-visible{opacity:1;border-color:#0a3f88}";
3
+ var css_248z = "._MGeCe{grid-area:configPane;position:relative;height:100%}._0Vjhf{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}._zTeq7._lNdSi ._0Vjhf,._zTeq7:not(._Ff6Pj) ._0Vjhf{-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)}._Ff6Pj ._0Vjhf{width:0}._lNdSi._Ff6Pj ._0Vjhf{width:30px;cursor:pointer}._5DHlo ._0Vjhf{border-right-color:#eee}._332zD{height:100%;position:relative;width:292px}._Ff6Pj ._332zD,._zTeq7 ._332zD{width:0}._lNdSi._Ff6Pj ._332zD,._lNdSi._zTeq7 ._332zD{width:30px}._yd1-W ._332zD{transition:width .5s}._y5FDR{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._Ff6Pj ._y5FDR{visibility:hidden}._yd1-W ._y5FDR{visibility:visible}._y5FDR ._oKgCZ{width:252px;margin-left:20px}._Xs90L{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._RqQ33{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._RqQ33 *{font-weight:400;font-size:16px;margin:0}._Zi0i9{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._Ff6Pj ._Zi0i9{left:0}._lNdSi._Ff6Pj ._Zi0i9{left:30px}._Zi0i9 ._WCnLT{width:4px;height:100%}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._WCnLT,._Zi0i9:hover ._WCnLT{background-color:#9dc5ed}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P>span,._Zi0i9:hover ._szc-P>span{background-color:#0b6ed0;border-color:#0b6ed0}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P>span>svg,._Zi0i9:hover ._szc-P>span>svg{fill:#fff}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P:active>span,._Zi0i9:hover ._szc-P:active>span{background-color:#0854a1;border-color:#0854a1}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P:active>span>svg,._Zi0i9:hover ._szc-P:active>span>svg{fill:#fff}._Zi0i9 ._szc-P{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}._Zi0i9 ._szc-P._dQnqp._dQnqp._dQnqp{opacity:1}._Zi0i9 ._szc-P._E-H1p._E-H1p._E-H1p{opacity:0}._Zi0i9 ._szc-P:active>span{background-color:#0854a1;border-color:#0854a1}._Zi0i9 ._szc-P:active>span>svg{fill:#fff}._Zi0i9 ._szc-P>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._Zi0i9 ._szc-P>span>svg{fill:#515559;border-radius:50%}._0Vjhf:hover+._Zi0i9 ._szc-P,._Ff6Pj ._Zi0i9 ._szc-P,._Zi0i9:hover ._szc-P{opacity:1}._szc-P.focus-visible,._szc-P:focus-visible{opacity:1;border-color:#0a3f88}";
4
+ var styles = {"paneContainer":"_MGeCe","paneContentContainer":"_0Vjhf","unpinned":"_zTeq7","hidden":"_Ff6Pj","preview":"_lNdSi","openHidden":"_5DHlo","spacer":"_332zD","transitioning":"_yd1-W","paneContent":"_y5FDR","paneContentInner":"_oKgCZ","header":"_Xs90L","title":"_RqQ33","clickableArea":"_Zi0i9","hoverBorder":"_WCnLT","toolbarPanelExpandCollapseButton":"_szc-P","overrideShow":"_dQnqp","overrideHide":"_E-H1p"};
5
+ var stylesheet="._MGeCe{grid-area:configPane;position:relative;height:100%}._0Vjhf{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}._zTeq7._lNdSi ._0Vjhf,._zTeq7:not(._Ff6Pj) ._0Vjhf{-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)}._Ff6Pj ._0Vjhf{width:0}._lNdSi._Ff6Pj ._0Vjhf{width:30px;cursor:pointer}._5DHlo ._0Vjhf{border-right-color:#eee}._332zD{height:100%;position:relative;width:292px}._Ff6Pj ._332zD,._zTeq7 ._332zD{width:0}._lNdSi._Ff6Pj ._332zD,._lNdSi._zTeq7 ._332zD{width:30px}._yd1-W ._332zD{transition:width .5s}._y5FDR{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._Ff6Pj ._y5FDR{visibility:hidden}._yd1-W ._y5FDR{visibility:visible}._y5FDR ._oKgCZ{width:252px;margin-left:20px}._Xs90L{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._RqQ33{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._RqQ33 *{font-weight:400;font-size:16px;margin:0}._Zi0i9{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._Ff6Pj ._Zi0i9{left:0}._lNdSi._Ff6Pj ._Zi0i9{left:30px}._Zi0i9 ._WCnLT{width:4px;height:100%}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._WCnLT,._Zi0i9:hover ._WCnLT{background-color:#9dc5ed}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P>span,._Zi0i9:hover ._szc-P>span{background-color:#0b6ed0;border-color:#0b6ed0}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P>span>svg,._Zi0i9:hover ._szc-P>span>svg{fill:#fff}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P:active>span,._Zi0i9:hover ._szc-P:active>span{background-color:#0854a1;border-color:#0854a1}._lNdSi._Ff6Pj ._0Vjhf:hover+._Zi0i9 ._szc-P:active>span>svg,._Zi0i9:hover ._szc-P:active>span>svg{fill:#fff}._Zi0i9 ._szc-P{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}._Zi0i9 ._szc-P._dQnqp._dQnqp._dQnqp{opacity:1}._Zi0i9 ._szc-P._E-H1p._E-H1p._E-H1p{opacity:0}._Zi0i9 ._szc-P:active>span{background-color:#0854a1;border-color:#0854a1}._Zi0i9 ._szc-P:active>span>svg{fill:#fff}._Zi0i9 ._szc-P>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._Zi0i9 ._szc-P>span>svg{fill:#515559;border-radius:50%}._0Vjhf:hover+._Zi0i9 ._szc-P,._Ff6Pj ._Zi0i9 ._szc-P,._Zi0i9:hover ._szc-P{opacity:1}._szc-P.focus-visible,._szc-P:focus-visible{opacity:1;border-color:#0a3f88}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._-x7N4{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
4
- var styles = {"divider":"_-x7N4"};
5
- var stylesheet="._-x7N4{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
3
+ var css_248z = "._BS07a{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
4
+ var styles = {"divider":"_BS07a"};
5
+ var stylesheet="._BS07a{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -40,14 +40,17 @@ function useDescendant(descendant, context, indexProp) {
40
40
  // index on the following render and we will re-register descendants
41
41
  // so that everything is up-to-date before the user interacts with a
42
42
  // collection.
43
- const index = indexProp ?? descendants.findIndex(item => item.element === descendant.element);
43
+ const index = indexProp !== null && indexProp !== void 0 ? indexProp : descendants.findIndex(item => item.element === descendant.element);
44
44
  const previousDescendants = usePrevious(descendants);
45
45
 
46
46
  // We also need to re-register descendants any time ANY of the other
47
47
  // descendants have changed. My brain was melting when I wrote this and it
48
48
  // feels a little off, but checking in render and using the result in the
49
49
  // effect's dependency array works well enough.
50
- const someDescendantsHaveChanged = descendants.some((descendant, index) => descendant.element !== previousDescendants?.[index]?.element);
50
+ const someDescendantsHaveChanged = descendants.some((descendant, index) => {
51
+ var _previousDescendants$;
52
+ return descendant.element !== (previousDescendants === null || previousDescendants === void 0 || (_previousDescendants$ = previousDescendants[index]) === null || _previousDescendants$ === void 0 ? void 0 : _previousDescendants$.element);
53
+ });
51
54
 
52
55
  // Prevent any flashing
53
56
  useSSRLayoutEffect(() => {
@@ -13,6 +13,7 @@ import { useDidUpdate } from '../../hooks/useDidUpdate/useDidUpdate.js';
13
13
  import useClickOutside from '../../hooks/useClickOutside/useClickOutside.js';
14
14
 
15
15
  const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
16
+ var _ref2, _dropdownButton$props, _dropdownButton$props2, _dropdownList$props$i, _dropdownList$props;
16
17
  let {
17
18
  className,
18
19
  children,
@@ -47,7 +48,7 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
47
48
  const [searchHeight, setSearchHeight] = useState();
48
49
  React__default.Children.forEach(children, child => {
49
50
  if ( /*#__PURE__*/React__default.isValidElement(child)) {
50
- switch (child?.type) {
51
+ switch (child === null || child === void 0 ? void 0 : child.type) {
51
52
  case DropdownButton:
52
53
  dropdownButton = child;
53
54
  break;
@@ -60,9 +61,9 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
60
61
  }
61
62
  });
62
63
  const containerId = useId(id);
63
- const buttonId = dropdownButton.props.children?.props?.id ?? dropdownButton.props.id ?? `${containerId}-button`;
64
- const dialogId = dropdownList.props?.id ?? `${containerId}-list`;
65
- const listboxId = `${containerId}-listbox`;
64
+ const buttonId = (_ref2 = (_dropdownButton$props = (_dropdownButton$props2 = dropdownButton.props.children) === null || _dropdownButton$props2 === void 0 || (_dropdownButton$props2 = _dropdownButton$props2.props) === null || _dropdownButton$props2 === void 0 ? void 0 : _dropdownButton$props2.id) !== null && _dropdownButton$props !== void 0 ? _dropdownButton$props : dropdownButton.props.id) !== null && _ref2 !== void 0 ? _ref2 : "".concat(containerId, "-button");
65
+ const dialogId = (_dropdownList$props$i = (_dropdownList$props = dropdownList.props) === null || _dropdownList$props === void 0 ? void 0 : _dropdownList$props.id) !== null && _dropdownList$props$i !== void 0 ? _dropdownList$props$i : "".concat(containerId, "-list");
66
+ const listboxId = "".concat(containerId, "-listbox");
66
67
  const [isOpen, setIsOpen] = useControllableState(false, onIsOpenChange, externalIsOpen);
67
68
  const [value, setValue] = useControllableState(defaultValue, onChange, externalValue);
68
69
  const [selectedIndex, setSelectedIndex] = useState(0);
@@ -84,8 +85,9 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
84
85
  let currentIndex = (highlightedIndex + 1) % options.length; // start at next index
85
86
  let count = 0;
86
87
  while (count < options.length) {
88
+ var _option$label;
87
89
  const option = options[currentIndex];
88
- if (option.label?.toLowerCase().startsWith(lowerCaseChar)) {
90
+ if ((_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().startsWith(lowerCaseChar)) {
89
91
  index = currentIndex;
90
92
  break;
91
93
  }
@@ -98,8 +100,9 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
98
100
  }
99
101
  };
100
102
  const selectHighlightedItem = e => {
103
+ var _option$handleSelect;
101
104
  const option = options[highlightedIndex];
102
- option?.handleSelect?.(e);
105
+ option === null || option === void 0 || (_option$handleSelect = option.handleSelect) === null || _option$handleSelect === void 0 ? void 0 : _option$handleSelect.call(option, e);
103
106
  };
104
107
  useClickOutside([buttonRef, listRef], handleClose);
105
108
  useEffect(() => {
@@ -119,9 +122,10 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
119
122
  return valueArray;
120
123
  });
121
124
  } else {
125
+ var _buttonRef$current;
122
126
  setValue(newValue);
123
127
  handleClose();
124
- buttonRef.current?.focus();
128
+ (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
125
129
  }
126
130
  }, [isMultiSelect, handleClose, setValue]);
127
131
  const onKeyDownButton = e => {
@@ -160,6 +164,7 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
160
164
  }
161
165
  };
162
166
  const onKeyDownList = e => {
167
+ var _buttonRef$current2, _buttonRef$current3;
163
168
  let newHighlightedIndex;
164
169
  if (disabled) return;
165
170
  switch (e.key) {
@@ -200,12 +205,12 @@ const Dropdown = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
200
205
  // close, focus button, and don't let event bubble up
201
206
  e.stopPropagation();
202
207
  handleClose();
203
- buttonRef.current?.focus();
208
+ (_buttonRef$current2 = buttonRef.current) === null || _buttonRef$current2 === void 0 ? void 0 : _buttonRef$current2.focus();
204
209
  break;
205
210
  case 'Tab':
206
211
  // close and focus next focusable element
207
212
  handleClose();
208
- buttonRef.current?.focus();
213
+ (_buttonRef$current3 = buttonRef.current) === null || _buttonRef$current3 === void 0 ? void 0 : _buttonRef$current3.focus();
209
214
  break;
210
215
  case 'PageUp':
211
216
  case 'Home':