@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
@@ -25,29 +25,24 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
25
25
  ...rest
26
26
  } = _ref;
27
27
  const tabsId = useId(externalId);
28
- const tabIdPrefix = "".concat(tabsId, "-tab-");
29
- const tabPanelIdPrefix = "".concat(tabsId, "-tab-panel-");
28
+ const tabIdPrefix = `${tabsId}-tab-`;
29
+ const tabPanelIdPrefix = `${tabsId}-tab-panel-`;
30
30
  const tabRefs = useRef({});
31
31
  const [tabIndexOfActiveTab, setTabIndexOfActiveTab] = useState(0);
32
-
33
32
  const focusOnIndex = index => {
34
33
  const tabRefsLength = Object.keys(tabRefs.current).length;
35
34
  const wrappedIndex = wrapAround(index, 0, tabRefsLength - 1);
36
35
  tabRefs.current[wrappedIndex].focus();
37
36
  };
38
-
39
37
  const handleTablistFocus = () => {
40
38
  setTabIndexOfActiveTab(-1);
41
39
  };
42
-
43
40
  const handleTablistBlur = () => {
44
41
  setTabIndexOfActiveTab(0);
45
42
  };
46
-
47
43
  const handleSelect = key => {
48
- onChange === null || onChange === void 0 ? void 0 : onChange(key);
44
+ onChange?.(key);
49
45
  };
50
-
51
46
  const handleKeyDown = (event, tabElementKey, index) => {
52
47
  if (event.key === 'Enter' || event.key === ' ') {
53
48
  handleSelect(tabElementKey);
@@ -62,15 +57,12 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
62
57
  event.preventDefault();
63
58
  tabRefs.current[Object.keys(tabRefs.current).length - 1].focus();
64
59
  }
65
- }; // Chose not to use `React.Children.toArray(..)` because it prefixes the keys (see https://reactjs.org/docs/react-api.html#reactchildrentoarray)
66
-
67
-
60
+ };
61
+ // Chose not to use `React.Children.toArray(..)` because it prefixes the keys (see https://reactjs.org/docs/react-api.html#reactchildrentoarray)
68
62
  function getTabs() {
69
63
  const tabs = [];
70
64
  React__default.Children.forEach(children, (child, index) => {
71
65
  if (child) {
72
- var _child$props$id;
73
-
74
66
  const key = child.key || String(index);
75
67
  const active = key === activeKey;
76
68
  const context = {
@@ -82,21 +74,17 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
82
74
  value: context
83
75
  }, /*#__PURE__*/React__default.cloneElement(child, {
84
76
  key,
85
- id: (_child$props$id = child.props.id) !== null && _child$props$id !== void 0 ? _child$props$id : tabIdPrefix + key,
77
+ id: child.props.id ?? tabIdPrefix + key,
86
78
  children: child.props.children,
87
79
  ref: mergeRefs(child.ref, node => {
88
80
  tabRefs.current[index] = node;
89
81
  }),
90
82
  onKeyDown: event => {
91
- var _child$props$onKeyDow, _child$props;
92
-
93
- (_child$props$onKeyDow = (_child$props = child.props).onKeyDown) === null || _child$props$onKeyDow === void 0 ? void 0 : _child$props$onKeyDow.call(_child$props);
83
+ child.props.onKeyDown?.();
94
84
  handleKeyDown(event, key, index);
95
85
  },
96
86
  onClick: () => {
97
- var _child$props$onClick, _child$props2;
98
-
99
- (_child$props$onClick = (_child$props2 = child.props).onClick) === null || _child$props$onClick === void 0 ? void 0 : _child$props$onClick.call(_child$props2);
87
+ child.props.onClick?.();
100
88
  handleSelect(key);
101
89
  },
102
90
  'aria-controls': tabPanelIdPrefix + key
@@ -105,13 +93,10 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
105
93
  });
106
94
  return tabs;
107
95
  }
108
-
109
96
  function getPanels() {
110
97
  const panels = [];
111
98
  React__default.Children.forEach(children, (child, index) => {
112
99
  if (child) {
113
- var _child$props$id2;
114
-
115
100
  const key = child.key || String(index);
116
101
  const isActive = key === activeKey;
117
102
  const panelClasses = classNames(styles.panel, {
@@ -120,7 +105,7 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
120
105
  panels.push( /*#__PURE__*/React__default.createElement("div", {
121
106
  key: key,
122
107
  role: "tabpanel",
123
- "aria-labelledby": (_child$props$id2 = child.props.id) !== null && _child$props$id2 !== void 0 ? _child$props$id2 : tabIdPrefix + key,
108
+ "aria-labelledby": child.props.id ?? tabIdPrefix + key,
124
109
  className: panelClasses,
125
110
  id: tabPanelIdPrefix + key
126
111
  }, isActive ? child.props.children : null));
@@ -128,7 +113,6 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
128
113
  });
129
114
  return panels;
130
115
  }
131
-
132
116
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
133
117
  ref: ref,
134
118
  className: classNames(className, styles.tabs)
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._2YjLN{display:block}._3rx5W{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._15CXk{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._15CXk:hover{color:#32363a}._15CXk:focus{outline:none}._15CXk._2vzOF{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._3RnbA{padding-top:32px}._3RnbA._2ONJQ{display:none}body.keyboard-user ._15CXk:active:focus,body.keyboard-user ._15CXk:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"tabs":"_2YjLN","bar":"_3rx5W","tab":"_15CXk","active":"_2vzOF","panel":"_3RnbA","inactive":"_2ONJQ"};
5
- var stylesheet="._2YjLN{display:block}._3rx5W{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._15CXk{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._15CXk:hover{color:#32363a}._15CXk:focus{outline:none}._15CXk._2vzOF{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._3RnbA{padding-top:32px}._3RnbA._2ONJQ{display:none}body.keyboard-user ._15CXk:active:focus,body.keyboard-user ._15CXk:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._BmzdT{display:block}._14-Jf{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Ihnf8{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Ihnf8:hover{color:#32363a}._Ihnf8:focus{outline:none}._Ihnf8._zVsp3{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._0aVvy{padding-top:32px}._0aVvy._SDNuX{display:none}body.keyboard-user ._Ihnf8:active:focus,body.keyboard-user ._Ihnf8:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"tabs":"_BmzdT","bar":"_14-Jf","tab":"_Ihnf8","active":"_zVsp3","panel":"_0aVvy","inactive":"_SDNuX"};
5
+ var stylesheet="._BmzdT{display:block}._14-Jf{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Ihnf8{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Ihnf8:hover{color:#32363a}._Ihnf8:focus{outline:none}._Ihnf8._zVsp3{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._0aVvy{padding-top:32px}._0aVvy._SDNuX{display:none}body.keyboard-user ._Ihnf8:active:focus,body.keyboard-user ._Ihnf8:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #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 = "._3CETv,._3Y6u2{display:flex}._3Y6u2{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._7Lfpc{width:69px;min-width:auto;max-width:none}._Qw5d1{width:100%}.__di9b{margin-bottom:12px;background-color:transparent!important}.__di9b:hover{background-color:rgba(11,110,208,.08)!important}.__di9b:hover>svg{fill:#085caf}.__di9b:hover>span{color:#085caf}.__di9b:active{background-color:rgba(11,110,208,.12)!important}.__di9b:active>svg{fill:#0854a1}.__di9b:active>span{color:#0854a1}.__di9b._3Ukd4{background-color:rgba(11,110,208,.08)!important}.__di9b._3Ukd4>svg{fill:#0b6ed0}.__di9b._3Ukd4>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}.__di9b._3Ukd4:hover{background-color:rgba(11,110,208,.08)!important}.__di9b._3Ukd4:hover>svg{fill:#085caf}.__di9b._3Ukd4:hover>span{color:#085caf}.__di9b._3Ukd4:active{background-color:rgba(11,110,208,.12)!important}.__di9b._3Ukd4:active>svg{fill:#0854a1}.__di9b._3Ukd4:active>span{color:#0854a1}._2iNVG{border-radius:6px}._2iNVG>._1xo4Z{display:block;fill:#515559}._VGlw7{margin-top:auto;margin-bottom:0}._1N56g{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._1N56g:hover>._g7cf4{opacity:1}._b1RWZ{width:0;border-width:0;padding:0}._cWhZI{border-radius:4px;min-width:100%;min-height:100%;outline:none}._tKzrI{width:36px;height:36px;position:absolute;top:48px;right:-18px;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}._g7cf4{opacity:0}._1VZ4R,._g7cf4:hover,._tKzrI._1WOdG._1WOdG{opacity:1}._tKzrI._wTE01._wTE01{opacity:0}._tKzrI>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._tKzrI>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._tKzrI>span:hover>svg{fill:#fff}._tKzrI>span:active{background-color:#0854a1;border-color:#0854a1}._tKzrI>span:active>svg{fill:#fff}._tKzrI>span>svg{fill:#515559;border-radius:50%}._cWhZI._g_27A{display:none!important}._3wSXH{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._18749{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._1BE3S{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._Rcsvn{fill:#515559}._1PgHi{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1BE3S:active:focus,body.keyboard-user ._1BE3S:focus,body.keyboard-user ._3wSXH:active:focus,body.keyboard-user ._3wSXH:focus,body.keyboard-user ._cWhZI:active:focus,body.keyboard-user ._cWhZI:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._tKzrI:focus{border-color:#0a3f88}body.keyboard-user ._tKzrI:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._tKzrI:active>span>svg{fill:#fff}body.keyboard-user ._g7cf4:focus{opacity:1}";
4
- var styles = {"toolbar":"_3CETv","toolbarNav":"_3Y6u2","toolbarNavCollapsed":"_7Lfpc","toolbarTabs":"_Qw5d1","toolbarTab":"__di9b","selected":"_3Ukd4","toolbarTabIconButton":"_2iNVG","icon":"_1xo4Z","tabsExpandCollapseButton":"_VGlw7","toolbarPanels":"_1N56g","toolbarPanelExpandCollapseButtonDefaultHidden":"_g7cf4","toolbarPanelsCollapsed":"_b1RWZ","toolbarPanel":"_cWhZI","toolbarPanelExpandCollapseButton":"_tKzrI","toolbarPanelExpandCollapseButtonDefaultShown":"_1VZ4R","overrideShow":"_1WOdG","overrideHide":"_wTE01","notSelected":"_g_27A","buttonWithLabel":"_3wSXH","buttonWithLabelLabel":"_18749","iconButtonWithLabel":"_1BE3S","iconButtonWithLabelIcon":"_Rcsvn","iconButtonWithLabelLabel":"_1PgHi"};
5
- var stylesheet="._3CETv,._3Y6u2{display:flex}._3Y6u2{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._7Lfpc{width:69px;min-width:auto;max-width:none}._Qw5d1{width:100%}.__di9b{margin-bottom:12px;background-color:transparent!important}.__di9b:hover{background-color:rgba(11,110,208,.08)!important}.__di9b:hover>svg{fill:#085caf}.__di9b:hover>span{color:#085caf}.__di9b:active{background-color:rgba(11,110,208,.12)!important}.__di9b:active>svg{fill:#0854a1}.__di9b:active>span{color:#0854a1}.__di9b._3Ukd4{background-color:rgba(11,110,208,.08)!important}.__di9b._3Ukd4>svg{fill:#0b6ed0}.__di9b._3Ukd4>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}.__di9b._3Ukd4:hover{background-color:rgba(11,110,208,.08)!important}.__di9b._3Ukd4:hover>svg{fill:#085caf}.__di9b._3Ukd4:hover>span{color:#085caf}.__di9b._3Ukd4:active{background-color:rgba(11,110,208,.12)!important}.__di9b._3Ukd4:active>svg{fill:#0854a1}.__di9b._3Ukd4:active>span{color:#0854a1}._2iNVG{border-radius:6px}._2iNVG>._1xo4Z{display:block;fill:#515559}._VGlw7{margin-top:auto;margin-bottom:0}._1N56g{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._1N56g:hover>._g7cf4{opacity:1}._b1RWZ{width:0;border-width:0;padding:0}._cWhZI{border-radius:4px;min-width:100%;min-height:100%;outline:none}._tKzrI{width:36px;height:36px;position:absolute;top:48px;right:-18px;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}._g7cf4{opacity:0}._1VZ4R,._g7cf4:hover,._tKzrI._1WOdG._1WOdG{opacity:1}._tKzrI._wTE01._wTE01{opacity:0}._tKzrI>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._tKzrI>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._tKzrI>span:hover>svg{fill:#fff}._tKzrI>span:active{background-color:#0854a1;border-color:#0854a1}._tKzrI>span:active>svg{fill:#fff}._tKzrI>span>svg{fill:#515559;border-radius:50%}._cWhZI._g_27A{display:none!important}._3wSXH{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._18749{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._1BE3S{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._Rcsvn{fill:#515559}._1PgHi{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._1BE3S:active:focus,body.keyboard-user ._1BE3S:focus,body.keyboard-user ._3wSXH:active:focus,body.keyboard-user ._3wSXH:focus,body.keyboard-user ._cWhZI:active:focus,body.keyboard-user ._cWhZI:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._tKzrI:focus{border-color:#0a3f88}body.keyboard-user ._tKzrI:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._tKzrI:active>span>svg{fill:#fff}body.keyboard-user ._g7cf4:focus{opacity:1}";
3
+ var css_248z = "._HLMC9,._PzRDt{display:flex}._HLMC9{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._bBdAx{width:69px;min-width:auto;max-width:none}._6dxNm{width:100%}._AKbaj{margin-bottom:12px;background-color:transparent!important}._AKbaj:hover{background-color:rgba(11,110,208,.08)!important}._AKbaj:hover>svg{fill:#085caf}._AKbaj:hover>span{color:#085caf}._AKbaj:active{background-color:rgba(11,110,208,.12)!important}._AKbaj:active>svg{fill:#0854a1}._AKbaj:active>span{color:#0854a1}._AKbaj._I3nMr{background-color:rgba(11,110,208,.08)!important}._AKbaj._I3nMr>svg{fill:#0b6ed0}._AKbaj._I3nMr>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._AKbaj._I3nMr:hover{background-color:rgba(11,110,208,.08)!important}._AKbaj._I3nMr:hover>svg{fill:#085caf}._AKbaj._I3nMr:hover>span{color:#085caf}._AKbaj._I3nMr:active{background-color:rgba(11,110,208,.12)!important}._AKbaj._I3nMr:active>svg{fill:#0854a1}._AKbaj._I3nMr:active>span{color:#0854a1}._rgbMe{border-radius:6px}._rgbMe>._fnmHF{display:block;fill:#515559}._UU6yL{margin-top:auto;margin-bottom:0}._smfSc{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._smfSc:hover>._3hN7y{opacity:1}._8JlQY{width:0;border-width:0;padding:0}._pU59G{border-radius:4px;min-width:100%;min-height:100%;outline:none}._UGa30{width:36px;height:36px;position:absolute;top:48px;right:-18px;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}._3hN7y{opacity:0}._3hN7y:hover,._k-jtM,._UGa30._4j5M7._4j5M7{opacity:1}._UGa30._8G8p5._8G8p5{opacity:0}._UGa30>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._UGa30>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._UGa30>span:hover>svg{fill:#fff}._UGa30>span:active{background-color:#0854a1;border-color:#0854a1}._UGa30>span:active>svg{fill:#fff}._UGa30>span>svg{fill:#515559;border-radius:50%}._pU59G._yHe4d{display:none!important}._KGIN5{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._8VSG8{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._CFdUx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._Si-fq{fill:#515559}._H-Eui{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._CFdUx:active:focus,body.keyboard-user ._CFdUx:focus,body.keyboard-user ._KGIN5:active:focus,body.keyboard-user ._KGIN5:focus,body.keyboard-user ._pU59G:active:focus,body.keyboard-user ._pU59G:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._UGa30:focus{border-color:#0a3f88}body.keyboard-user ._UGa30:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._UGa30:active>span>svg{fill:#fff}body.keyboard-user ._3hN7y:focus{opacity:1}";
4
+ var styles = {"toolbar":"_PzRDt","toolbarNav":"_HLMC9","toolbarNavCollapsed":"_bBdAx","toolbarTabs":"_6dxNm","toolbarTab":"_AKbaj","selected":"_I3nMr","toolbarTabIconButton":"_rgbMe","icon":"_fnmHF","tabsExpandCollapseButton":"_UU6yL","toolbarPanels":"_smfSc","toolbarPanelExpandCollapseButtonDefaultHidden":"_3hN7y","toolbarPanelsCollapsed":"_8JlQY","toolbarPanel":"_pU59G","toolbarPanelExpandCollapseButton":"_UGa30","toolbarPanelExpandCollapseButtonDefaultShown":"_k-jtM","overrideShow":"_4j5M7","overrideHide":"_8G8p5","notSelected":"_yHe4d","buttonWithLabel":"_KGIN5","buttonWithLabelLabel":"_8VSG8","iconButtonWithLabel":"_CFdUx","iconButtonWithLabelIcon":"_Si-fq","iconButtonWithLabelLabel":"_H-Eui"};
5
+ var stylesheet="._HLMC9,._PzRDt{display:flex}._HLMC9{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._bBdAx{width:69px;min-width:auto;max-width:none}._6dxNm{width:100%}._AKbaj{margin-bottom:12px;background-color:transparent!important}._AKbaj:hover{background-color:rgba(11,110,208,.08)!important}._AKbaj:hover>svg{fill:#085caf}._AKbaj:hover>span{color:#085caf}._AKbaj:active{background-color:rgba(11,110,208,.12)!important}._AKbaj:active>svg{fill:#0854a1}._AKbaj:active>span{color:#0854a1}._AKbaj._I3nMr{background-color:rgba(11,110,208,.08)!important}._AKbaj._I3nMr>svg{fill:#0b6ed0}._AKbaj._I3nMr>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._AKbaj._I3nMr:hover{background-color:rgba(11,110,208,.08)!important}._AKbaj._I3nMr:hover>svg{fill:#085caf}._AKbaj._I3nMr:hover>span{color:#085caf}._AKbaj._I3nMr:active{background-color:rgba(11,110,208,.12)!important}._AKbaj._I3nMr:active>svg{fill:#0854a1}._AKbaj._I3nMr:active>span{color:#0854a1}._rgbMe{border-radius:6px}._rgbMe>._fnmHF{display:block;fill:#515559}._UU6yL{margin-top:auto;margin-bottom:0}._smfSc{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._smfSc:hover>._3hN7y{opacity:1}._8JlQY{width:0;border-width:0;padding:0}._pU59G{border-radius:4px;min-width:100%;min-height:100%;outline:none}._UGa30{width:36px;height:36px;position:absolute;top:48px;right:-18px;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}._3hN7y{opacity:0}._3hN7y:hover,._k-jtM,._UGa30._4j5M7._4j5M7{opacity:1}._UGa30._8G8p5._8G8p5{opacity:0}._UGa30>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._UGa30>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._UGa30>span:hover>svg{fill:#fff}._UGa30>span:active{background-color:#0854a1;border-color:#0854a1}._UGa30>span:active>svg{fill:#fff}._UGa30>span>svg{fill:#515559;border-radius:50%}._pU59G._yHe4d{display:none!important}._KGIN5{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._8VSG8{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._CFdUx{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._Si-fq{fill:#515559}._H-Eui{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}body.keyboard-user ._CFdUx:active:focus,body.keyboard-user ._CFdUx:focus,body.keyboard-user ._KGIN5:active:focus,body.keyboard-user ._KGIN5:focus,body.keyboard-user ._pU59G:active:focus,body.keyboard-user ._pU59G:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}body.keyboard-user ._UGa30:focus{border-color:#0a3f88}body.keyboard-user ._UGa30:active>span{background-color:#0854a1;border-color:#0854a1}body.keyboard-user ._UGa30:active>span>svg{fill:#fff}body.keyboard-user ._3hN7y:focus{opacity:1}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -37,9 +37,9 @@ const ToolbarPanel = _ref => {
37
37
  [styles.notSelected]: !isSelected
38
38
  }),
39
39
  tabIndex: isFocusable && isContainerInTabOrder ? 0 : -1,
40
- "aria-labelledby": ariaLabelledby || "toolbar-".concat(toolbarId, "-tab-").concat(index),
41
- id: id || "toolbar-".concat(toolbarId, "-panel-").concat(index),
42
- "data-testid": dataTestId || getSubDataTestId(rootDataTestId, "panel-".concat(index))
40
+ "aria-labelledby": ariaLabelledby || `toolbar-${toolbarId}-tab-${index}`,
41
+ id: id || `toolbar-${toolbarId}-panel-${index}`,
42
+ "data-testid": dataTestId || getSubDataTestId(rootDataTestId, `panel-${index}`)
43
43
  }), isFocusable ? children : null);
44
44
  };
45
45
 
@@ -33,13 +33,11 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((_ref, ref) => {
33
33
  const hidePanelLabel = translate('hidePanel');
34
34
  const [isTooltipVisible, setIsTooltipVisible] = useState(false);
35
35
  const [isHiddenByEscape, setIsHiddenByEscape] = useState(false);
36
-
37
36
  const handleKeyDown = event => {
38
37
  if (event.key === 'Escape' && !isCollapsed) {
39
38
  setIsHiddenByEscape(true);
40
39
  }
41
40
  };
42
-
43
41
  useEffect(() => {
44
42
  setIsHiddenByEscape(false);
45
43
  }, [isContainerHovered]);
@@ -71,7 +69,6 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((_ref, ref) => {
71
69
  "aria-hidden": "true"
72
70
  }))));
73
71
  });
74
-
75
72
  /**
76
73
  * @deprecated Instead, use:
77
74
  * ```
@@ -79,8 +76,6 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((_ref, ref) => {
79
76
  * ```
80
77
  */
81
78
  const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
82
- var _props$id, _React$Children$toArr, _React$Children$toArr2, _React$Children$toArr3;
83
-
84
79
  let {
85
80
  isCollapsible = true,
86
81
  defaultIsCollapsed = false,
@@ -108,9 +103,7 @@ const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
108
103
  * Since the button is re-rendered, if there is keyboard focus, we need to programmatically re-focus the button because React doesn't know that it's the same button.
109
104
  */
110
105
  if (isExpandCollapseButtonKeyboardFocused) {
111
- var _expandCollapseButton;
112
-
113
- (_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
106
+ expandCollapseButtonRef.current?.focus();
114
107
  }
115
108
  }, [isCollapsed, isExpandCollapseButtonKeyboardFocused]);
116
109
  useEffect(() => {
@@ -120,33 +113,26 @@ const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
120
113
  * This allows a screen reader user to click the expand/collapse button using their keyboard and have focus stay on the same button.
121
114
  */
122
115
  if (wasExpandCollapseButtonClicked) {
123
- var _expandCollapseButton2;
124
-
125
- (_expandCollapseButton2 = expandCollapseButtonRef.current) === null || _expandCollapseButton2 === void 0 ? void 0 : _expandCollapseButton2.focus();
116
+ expandCollapseButtonRef.current?.focus();
126
117
  setWasExpandCollapseButtonClicked(false);
127
118
  }
128
119
  }, [wasExpandCollapseButtonClicked]);
129
-
130
120
  const onExpandCollapseButtonMouseDown = () => {
131
121
  setIsExpandCollapseButtonKeyboardFocused(false);
132
122
  };
133
-
134
123
  const onExpandCollapseButtonClick = () => {
135
124
  setIsCollapsed(currentIsCollapsed => !currentIsCollapsed);
136
125
  setWasExpandCollapseButtonClicked(true);
137
126
  };
138
-
139
127
  const onExpandCollapseButtonFocus = () => {
140
128
  if (getIsKeyboardUser()) {
141
129
  setIsExpandCollapseButtonKeyboardFocused(true);
142
130
  }
143
131
  };
144
-
145
132
  const onExpandCollapseButtonBlur = () => {
146
133
  setIsExpandCollapseButtonKeyboardFocused(false);
147
134
  };
148
-
149
- const selectedTabPanelId = (_props$id = (_React$Children$toArr = React__default.Children.toArray(children)) === null || _React$Children$toArr === void 0 ? void 0 : (_React$Children$toArr2 = _React$Children$toArr[Number(selectedIndex)]) === null || _React$Children$toArr2 === void 0 ? void 0 : (_React$Children$toArr3 = _React$Children$toArr2.props) === null || _React$Children$toArr3 === void 0 ? void 0 : _React$Children$toArr3.id) !== null && _props$id !== void 0 ? _props$id : "toolbar-".concat(toolbarId, "-panel-").concat(selectedIndex);
135
+ const selectedTabPanelId = React__default.Children.toArray(children)?.[Number(selectedIndex)]?.props?.id ?? `toolbar-${toolbarId}-panel-${selectedIndex}`;
150
136
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
151
137
  ref: mergeRefs(ref, isToolbarPanelsContainerHoveredRef),
152
138
  className: classNames(className, styles.toolbarPanels, {
@@ -12,9 +12,7 @@ import IconButton from '../IconButton/IconButton.js';
12
12
  import ExcludeIcon from '../../icons/components/ExcludeIcon.js';
13
13
 
14
14
  const getPrevIndex = (currentIndex, numItems) => (currentIndex - 1 + numItems) % numItems;
15
-
16
15
  const getNextIndex = (currentIndex, numItems) => (currentIndex + 1) % numItems;
17
-
18
16
  /**
19
17
  * @deprecated Instead, use:
20
18
  * ```
@@ -44,11 +42,9 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
44
42
  } = useToolbarContext();
45
43
  const isFocused = focusedIndex === index;
46
44
  const isSelected = selectedIndex === index;
47
-
48
45
  const handleSelect = () => {
49
- setSelectedIndex === null || setSelectedIndex === void 0 ? void 0 : setSelectedIndex(Number(index));
46
+ setSelectedIndex?.(Number(index));
50
47
  };
51
-
52
48
  const handleClick = e => {
53
49
  /*
54
50
  * In some browsers, clicking on a button does not focus the button.
@@ -58,56 +54,46 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
58
54
  e.currentTarget.focus();
59
55
  handleSelect();
60
56
  };
61
-
62
57
  const handleKeyDown = e => {
63
58
  switch (e.key) {
64
59
  case 'Enter':
65
60
  handleSelect();
66
61
  break;
67
-
68
62
  case 'ArrowDown':
69
63
  case 'ArrowRight':
70
64
  e.preventDefault(); // Prevent page scroll
71
-
72
- focusTab === null || focusTab === void 0 ? void 0 : focusTab(getNextIndex(focusedIndex, numTabs));
65
+ focusTab?.(getNextIndex(focusedIndex, numTabs));
73
66
  break;
74
-
75
67
  case 'ArrowUp':
76
68
  case 'ArrowLeft':
77
69
  e.preventDefault(); // Prevent page scroll
78
-
79
- focusTab === null || focusTab === void 0 ? void 0 : focusTab(getPrevIndex(focusedIndex, numTabs));
70
+ focusTab?.(getPrevIndex(focusedIndex, numTabs));
80
71
  break;
81
-
82
72
  case 'PageUp':
83
73
  case 'Home':
84
74
  e.preventDefault(); // Prevent page scroll
85
-
86
- focusTab === null || focusTab === void 0 ? void 0 : focusTab(0);
75
+ focusTab?.(0);
87
76
  break;
88
-
89
77
  case 'PageDown':
90
78
  case 'End':
91
79
  e.preventDefault(); // Prevent page scroll
92
-
93
- focusTab === null || focusTab === void 0 ? void 0 : focusTab(Number(numTabs) - 1);
80
+ focusTab?.(Number(numTabs) - 1);
94
81
  break;
95
-
96
82
  default:
97
83
  }
98
84
  };
99
-
100
- const commonProps = { ...rest,
85
+ const commonProps = {
86
+ ...rest,
101
87
  ref,
102
88
  role: 'tab',
103
89
  'aria-selected': isSelected,
104
- 'aria-controls': ariaControls || "toolbar-".concat(toolbarId, "-panel-").concat(index),
105
- id: id || "toolbar-".concat(toolbarId, "-tab-").concat(index),
90
+ 'aria-controls': ariaControls || `toolbar-${toolbarId}-panel-${index}`,
91
+ id: id || `toolbar-${toolbarId}-tab-${index}`,
106
92
  // Exsures the correct tab is focused when tabbing into the Toolbar
107
93
  tabIndex: isFocused ? 0 : -1,
108
94
  onClick: handleClick,
109
95
  onKeyDown: handleKeyDown,
110
- 'data-testid': dataTestId || getSubDataTestId(rootDataTestId, "tab-".concat(index))
96
+ 'data-testid': dataTestId || getSubDataTestId(rootDataTestId, `tab-${index}`)
111
97
  };
112
98
  const iconButtonClassName = classNames(className, styles.toolbarTab, styles.toolbarTabIconButton, {
113
99
  [styles.selected]: isSelected
@@ -122,7 +108,6 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
122
108
  [styles.selected]: isSelected
123
109
  });
124
110
  let tabComponent;
125
-
126
111
  if (isCollapsed) {
127
112
  tabComponent = /*#__PURE__*/React__default.createElement(IconButton, _extends({}, commonProps, {
128
113
  className: iconButtonClassName,
@@ -150,7 +135,6 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
150
135
  className: styles.buttonWithLabelLabel
151
136
  }, label));
152
137
  }
153
-
154
138
  return tabComponent;
155
139
  });
156
140
 
@@ -43,21 +43,17 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
43
43
  const collapseToolbarTabsIconButtonWithLabelRef = useRef(null);
44
44
  const [isExpandCollapseButtonFocused, setIsExpandCollapseButtonFocused] = useState(false);
45
45
  const [isCollapsed, setIsCollapsed] = useControllableState(isCollapsible && defaultIsCollapsed, isCollapsible ? onIsCollapsedChange : undefined, isCollapsible && externalIsCollapsed);
46
+
46
47
  /*
47
48
  * Focuses the new expand/collapse button when the tabs expand/collapse and the old expand/collapse button was focused.
48
49
  * When the tabs expand/collapse, a different expand/collapse button is rendered, which is why the programmatic focus is needed.
49
50
  */
50
-
51
51
  useEffect(() => {
52
52
  if (isExpandCollapseButtonFocused) {
53
53
  if (isCollapsed) {
54
- var _expandToolbarTabsIco;
55
-
56
- (_expandToolbarTabsIco = expandToolbarTabsIconButtonRef.current) === null || _expandToolbarTabsIco === void 0 ? void 0 : _expandToolbarTabsIco.focus();
54
+ expandToolbarTabsIconButtonRef.current?.focus();
57
55
  } else {
58
- var _collapseToolbarTabsI;
59
-
60
- (_collapseToolbarTabsI = collapseToolbarTabsIconButtonWithLabelRef.current) === null || _collapseToolbarTabsI === void 0 ? void 0 : _collapseToolbarTabsI.focus();
56
+ collapseToolbarTabsIconButtonWithLabelRef.current?.focus();
61
57
  }
62
58
  }
63
59
  }, [isCollapsed, isExpandCollapseButtonFocused]);
@@ -69,26 +65,20 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
69
65
  } = useToolbarContext();
70
66
  const [focusedIndex, setFocusedIndex] = useState(selectedIndex);
71
67
  const numTabs = React__default.Children.count(children);
72
-
73
68
  const focusTab = index => {
74
- var _tabRefs$current, _tabRefs$current$inde;
75
-
76
- (_tabRefs$current = tabRefs.current) === null || _tabRefs$current === void 0 ? void 0 : (_tabRefs$current$inde = _tabRefs$current[index]) === null || _tabRefs$current$inde === void 0 ? void 0 : _tabRefs$current$inde.focus();
69
+ tabRefs.current?.[index]?.focus();
77
70
  setFocusedIndex(index);
78
71
  };
72
+
79
73
  /*
80
74
  * Sets the focused index back to the currently selected tab.
81
75
  * This makes sure that when the user tabs back into the tablist, the focus is set on the currently selected tab.
82
76
  */
83
-
84
-
85
77
  const handleTabListBlur = () => {
86
78
  setFocusedIndex(selectedIndex);
87
79
  };
88
-
89
80
  let expandCollapseButton;
90
81
  const expandCollapseButtonDataTestIdSuffix = 'tabs-expand-collapse-button';
91
-
92
82
  if (isCollapsible) {
93
83
  if (isCollapsed) {
94
84
  const expandToolbarTabsLabel = translate('showLabels');
@@ -116,14 +106,12 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
116
106
  onFocus: () => setIsExpandCollapseButtonFocused(true),
117
107
  onBlur: () => setIsExpandCollapseButtonFocused(false),
118
108
  ref: collapseToolbarTabsIconButtonWithLabelRef
119
- /* eslint-disable-next-line react/jsx-boolean-value */
120
- ,
109
+ /* eslint-disable-next-line react/jsx-boolean-value */,
121
110
  "aria-pressed": true,
122
111
  "data-testid": getSubDataTestId(rootDataTestId, expandCollapseButtonDataTestIdSuffix)
123
112
  });
124
113
  }
125
114
  }
126
-
127
115
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
128
116
  className: classNames(className, styles.toolbarNav, {
129
117
  [styles.toolbarNavCollapsed]: isCollapsed
@@ -6,9 +6,8 @@ import { getMediaQueryValue, subscribe } from '../../utils/mediaQueryManager/med
6
6
  import useLatest from '../useLatest/useLatest.js';
7
7
 
8
8
  function getMinWidthQuery(length, unit) {
9
- return "(min-width: ".concat(length).concat(unit, ")");
9
+ return `(min-width: ${length}${unit})`;
10
10
  }
11
-
12
11
  function getInitialValues(breakpointsConfig, unit) {
13
12
  const initialValues = {};
14
13
  Object.entries(breakpointsConfig).forEach(_ref => {
@@ -18,7 +17,6 @@ function getInitialValues(breakpointsConfig, unit) {
18
17
  });
19
18
  return initialValues;
20
19
  }
21
-
22
20
  function useBreakpoints() {
23
21
  let breakpoints = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DEFAULT_BREAKPOINTS;
24
22
  let unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'em';
@@ -31,7 +29,8 @@ function useBreakpoints() {
31
29
  let [breakpointName, breakpointValue] = _ref2;
32
30
  const query = getMinWidthQuery(breakpointValue, unitRef.current);
33
31
  const unsubscribe = subscribe(query, event => {
34
- setMatches(prevValue => ({ ...prevValue,
32
+ setMatches(prevValue => ({
33
+ ...prevValue,
35
34
  [breakpointName]: event.matches
36
35
  }));
37
36
  });
@@ -3,30 +3,25 @@ import '../useEventListener/index.js';
3
3
  import useEventListener from '../useEventListener/useEventListener.js';
4
4
 
5
5
  /* eslint-disable babel/no-unused-expressions */
6
+
6
7
  /**
7
8
  * Listens for a `mousedown` or `touchstart` event that exists outside of the given ref element(s).
8
9
  * @param refs - The ref elements to ignore events on.
9
10
  * @param onClickOutside - An observer that is called when an outside click or touch occurs.
10
11
  */
11
-
12
12
  function useClickOutside(refs, onClickOutside) {
13
13
  const allRefs = useMemo(() => Array.isArray(refs) ? refs : [refs], [refs]);
14
-
15
14
  const handler = event => {
16
15
  const isInside = allRefs.some(ref => {
17
- var _el$contains;
18
-
19
16
  const {
20
17
  current: el
21
18
  } = ref;
22
- return el === null || el === void 0 ? void 0 : (_el$contains = el.contains) === null || _el$contains === void 0 ? void 0 : _el$contains.call(el, event.target);
19
+ return el?.contains?.(event.target);
23
20
  });
24
-
25
21
  if (!isInside) {
26
22
  onClickOutside(event);
27
23
  }
28
24
  };
29
-
30
25
  useEventListener(document, 'mousedown', handler);
31
26
  useEventListener(document, 'touchstart', handler);
32
27
  }
@@ -3,28 +3,25 @@ import '../useEventListener/index.js';
3
3
  import useEventListener from '../useEventListener/useEventListener.js';
4
4
 
5
5
  /* eslint-disable consistent-return */
6
+
6
7
  /**
7
8
  * Listens for `click` event. The returned function is used to ignore the given `click` event.
8
9
  * @param onClickOutside - An observer that is called when an outside click occurs.
9
10
  * @param options.disabled - Indicates if the hook is disabled (i.e. won't call the observer)
10
11
  * @returns A function that, when called, ignores the current outside click if one exists.
11
12
  */
12
-
13
13
  function useClickOutsidePortals(onClickOutside) {
14
14
  let {
15
15
  disabled = false
16
16
  } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17
17
  const wasClickedInside = useRef(false);
18
-
19
18
  const handleClick = e => {
20
19
  if (!wasClickedInside.current) {
21
20
  onClickOutside(e);
22
- } // should reset clicked state after each click
23
-
24
-
21
+ }
22
+ // should reset clicked state after each click
25
23
  wasClickedInside.current = false;
26
24
  };
27
-
28
25
  useEventListener(document, 'mouseup', handleClick, {
29
26
  isDisabled: disabled
30
27
  });
@@ -5,6 +5,7 @@ import useLatest from '../useLatest/useLatest.js';
5
5
  /* eslint-disable @typescript-eslint/no-use-before-define */
6
6
  const BECAME_CONTROLLED_WARNING = 'WARNING: A component is changing from being uncontrolled to controlled. Components should not switch from being uncontrolled to controlled (or vice versa). Decide between using a controlled or uncontrolled component for the lifetime of the component. More info: https://fb.me/react-controlled-components';
7
7
  const BECAME_UNCONTROLLED_WARNING = 'WARNING: A component is changing from being controlled to uncontrolled. Components should not switch from being controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled component for the lifetime of the component. More info: https://fb.me/react-controlled-components';
8
+
8
9
  /**
9
10
  * An abstraction on top of useState that allows for state to either be controlled internally or externally.
10
11
  * @param initialState - The state to begin with.
@@ -12,24 +13,24 @@ const BECAME_UNCONTROLLED_WARNING = 'WARNING: A component is changing from being
12
13
  * @param externalState - State used to override the internal state.
13
14
  * @returns An array where the first item is the current state and the second item is the state updater.
14
15
  */
15
-
16
16
  function useControllableState(initialState, onChange, externalState) {
17
17
  const [state, replaceState] = useState(initialState);
18
18
  const onChangeRef = useLatest(onChange);
19
19
  const externalStateRef = useLatest(externalState);
20
20
  const internalStateRef = useLatest(state);
21
21
  useControlledTransitionWarning(externalState);
22
+
22
23
  /**
23
24
  * The following useEffect is necessary in order to make transitions
24
25
  * from using external state, to using internal state seamless and
25
26
  * follows the behavior of React's native controllable input component
26
27
  */
27
-
28
28
  useEffect(() => {
29
29
  if (externalState !== undefined) {
30
30
  replaceState(externalState);
31
31
  }
32
32
  }, [externalState]);
33
+
33
34
  /**
34
35
  * TODO: replace the effect above with this effect
35
36
  *
@@ -49,30 +50,24 @@ function useControllableState(initialState, onChange, externalState) {
49
50
  const setState = useCallback(function (input) {
50
51
  const currentState = externalStateRef.current !== undefined ? externalStateRef.current : internalStateRef.current;
51
52
  const nextState = typeof input === 'function' ? input(currentState) : input;
52
-
53
53
  if (externalStateRef.current === undefined) {
54
54
  replaceState(nextState);
55
55
  }
56
-
57
56
  if (nextState !== currentState) {
58
- var _onChangeRef$current;
59
-
60
57
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
61
58
  args[_key - 1] = arguments[_key];
62
59
  }
63
-
64
- (_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call(onChangeRef, nextState, ...args);
60
+ onChangeRef.current?.(nextState, ...args);
65
61
  }
66
62
  }, [onChangeRef, externalStateRef, internalStateRef]);
67
63
  const actualState = externalState === undefined ? state : externalState;
68
64
  return [actualState, setState];
69
65
  }
66
+
70
67
  /**
71
68
  * Logs a warning if the state switches from controlled to uncontrolled (or vice versa)
72
69
  * @param externalState - The state being controlled externally.
73
70
  */
74
-
75
-
76
71
  function useControlledTransitionWarning(externalState) {
77
72
  const isControlled = externalState !== undefined;
78
73
  const isControlledRef = useRef(isControlled);
@@ -9,24 +9,22 @@ const useDidUpdateBase = (useEffectFunction, func, deps) => {
9
9
  isFirstRenderRef.current = false;
10
10
  return undefined;
11
11
  }
12
-
13
12
  return func();
14
13
  }, deps);
15
14
  };
15
+
16
16
  /**
17
17
  * Wrapper around useEffect that runs on dependency updates only, not on initial render.
18
18
  * @param func - The effect function to run when dependencies have been updated.
19
19
  * @param deps - The list of dependencies to watch for changes.
20
20
  */
21
-
22
-
23
21
  const useDidUpdate = (func, deps) => useDidUpdateBase(useEffect, func, deps);
22
+
24
23
  /**
25
24
  * Wrapper around useSSRLayoutEffect that runs on dependency updates only, not on initial render.
26
25
  * @param func - The effect function to run when dependencies have been updated.
27
26
  * @param deps - The list of dependencies to watch for changes.
28
27
  */
29
-
30
28
  const useEnhancedDidUpdate = (func, deps) => useDidUpdateBase(useSSRLayoutEffect, func, deps);
31
29
 
32
30
  export { useDidUpdate, useEnhancedDidUpdate };
@@ -13,7 +13,8 @@ function useEventCallback(fn) {
13
13
  useSSRLayoutEffect(() => {
14
14
  fnRef.current = fn;
15
15
  });
16
- return useCallback(event => // eslint-disable-next-line @typescript-eslint/ban-ts-comment
16
+ return useCallback(event =>
17
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
17
18
  // @ts-ignore: Left side of comma operator is unused and has no side effects. See https://stackoverflow.com/questions/11541134/javascript-syntax-0-fnargs
18
19
  (0, fnRef.current)(event), []);
19
20
  }