@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
@@ -20,7 +20,6 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((props, ref) => {
20
20
  const {
21
21
  isCollapsed
22
22
  } = useSidebarNavContext();
23
-
24
23
  if (isCollapsed) {
25
24
  const expandSidebarLabel = translate('showLabels');
26
25
  return /*#__PURE__*/React__default.createElement(Tooltip, {
@@ -37,7 +36,6 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((props, ref) => {
37
36
  className: styles.icon
38
37
  })));
39
38
  }
40
-
41
39
  return /*#__PURE__*/React__default.createElement("button", _extends({}, props, {
42
40
  type: "button",
43
41
  className: classNames(styles.sidebarNavItem, styles.expandCollapseButton, styles.iconButtonWithLabel),
@@ -9,6 +9,9 @@ import ExpandCollapseButton from './ExpandCollapseButton.js';
9
9
  import useControllableState from '../../hooks/useControllableState/useControllableState.js';
10
10
  import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
11
11
 
12
+ // react component type comes with "defaultProps" attribute which
13
+ // which causes typescript failures but all we really care about
14
+ // is the render function
12
15
  const SidebarNav = /*#__PURE__*/forwardRef((_ref, ref) => {
13
16
  let {
14
17
  isCollapsible = true,
@@ -24,16 +27,14 @@ const SidebarNav = /*#__PURE__*/forwardRef((_ref, ref) => {
24
27
  const expandCollapseButtonRef = useRef(null);
25
28
  const [isExpandCollapseButtonFocused, setIsExpandCollapseButtonFocused] = useState(false);
26
29
  const [isCollapsed, setIsCollapsed] = useControllableState(false, isCollapsible ? onIsCollapsedChange : undefined, isCollapsible && externalIsCollapsed);
30
+
27
31
  /*
28
32
  * Focuses the new expand/collapse button when the tabs expand/collapse and the old expand/collapse button was focused.
29
33
  * When the tabs expand/collapse, a different expand/collapse button is rendered, which is why the programmatic focus is needed.
30
34
  */
31
-
32
35
  useEffect(() => {
33
36
  if (isExpandCollapseButtonFocused) {
34
- var _expandCollapseButton;
35
-
36
- (_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
37
+ expandCollapseButtonRef.current?.focus();
37
38
  }
38
39
  }, [isCollapsed, isExpandCollapseButtonFocused]);
39
40
  return /*#__PURE__*/React__default.createElement("div", {
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._2uBbP{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._2uBbP._9aKWX{width:69px;min-width:auto;max-width:none}._16RWe{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._RcYaF{margin-bottom:12px;background-color:transparent!important}._RcYaF:hover{background-color:rgba(11,110,208,.08)!important}._RcYaF:hover ._1Qpkl{fill:#085caf}._RcYaF:hover ._x1HZ_{color:#085caf}._RcYaF:active{background-color:rgba(11,110,208,.12)!important}._RcYaF:active ._1Qpkl{fill:#0854a1}._RcYaF:active ._x1HZ_{color:#0854a1}._RcYaF._3vbBa{background-color:rgba(11,110,208,.08)!important}._RcYaF._3vbBa ._1Qpkl{fill:#0b6ed0}._RcYaF._3vbBa ._x1HZ_{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._RcYaF._3vbBa:hover{background-color:rgba(11,110,208,.08)!important}._RcYaF._3vbBa:hover ._1Qpkl{fill:#085caf}._RcYaF._3vbBa:hover ._x1HZ_{color:#085caf}._RcYaF._3vbBa:active{background-color:rgba(11,110,208,.12)!important}._RcYaF._3vbBa:active ._1Qpkl{fill:#0854a1}._RcYaF._3vbBa:active ._x1HZ_{color:#0854a1}._2v4nS{border-radius:6px}._2v4nS ._1Qpkl{display:block;fill:#515559}._1tCj2{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._3Asf7,._l1rhe{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._3Asf7 ._1Qpkl,._l1rhe ._1Qpkl{fill:#515559}._3Asf7 ._x1HZ_,._l1rhe ._x1HZ_{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}body.keyboard-user ._RcYaF:active:focus,body.keyboard-user ._RcYaF:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"sideBarNav":"_2uBbP","collapsed":"_9aKWX","navItems":"_16RWe","sidebarNavItem":"_RcYaF","icon":"_1Qpkl","label":"_x1HZ_","selected":"_3vbBa","sidebarNavItemIconButton":"_2v4nS","expandCollapseButtonContainer":"_1tCj2","navLink":"_3Asf7","iconButtonWithLabel":"_l1rhe"};
5
- var stylesheet="._2uBbP{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._2uBbP._9aKWX{width:69px;min-width:auto;max-width:none}._16RWe{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._RcYaF{margin-bottom:12px;background-color:transparent!important}._RcYaF:hover{background-color:rgba(11,110,208,.08)!important}._RcYaF:hover ._1Qpkl{fill:#085caf}._RcYaF:hover ._x1HZ_{color:#085caf}._RcYaF:active{background-color:rgba(11,110,208,.12)!important}._RcYaF:active ._1Qpkl{fill:#0854a1}._RcYaF:active ._x1HZ_{color:#0854a1}._RcYaF._3vbBa{background-color:rgba(11,110,208,.08)!important}._RcYaF._3vbBa ._1Qpkl{fill:#0b6ed0}._RcYaF._3vbBa ._x1HZ_{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._RcYaF._3vbBa:hover{background-color:rgba(11,110,208,.08)!important}._RcYaF._3vbBa:hover ._1Qpkl{fill:#085caf}._RcYaF._3vbBa:hover ._x1HZ_{color:#085caf}._RcYaF._3vbBa:active{background-color:rgba(11,110,208,.12)!important}._RcYaF._3vbBa:active ._1Qpkl{fill:#0854a1}._RcYaF._3vbBa:active ._x1HZ_{color:#0854a1}._2v4nS{border-radius:6px}._2v4nS ._1Qpkl{display:block;fill:#515559}._1tCj2{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._3Asf7,._l1rhe{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._3Asf7 ._1Qpkl,._l1rhe ._1Qpkl{fill:#515559}._3Asf7 ._x1HZ_,._l1rhe ._x1HZ_{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}body.keyboard-user ._RcYaF:active:focus,body.keyboard-user ._RcYaF:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._LGkaS{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._LGkaS._Bxgpn{width:69px;min-width:auto;max-width:none}._z-O8n{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._jna5Z{margin-bottom:12px;background-color:transparent!important}._jna5Z:hover{background-color:rgba(11,110,208,.08)!important}._jna5Z:hover ._fTIOX{fill:#085caf}._jna5Z:hover ._fGGNs{color:#085caf}._jna5Z:active{background-color:rgba(11,110,208,.12)!important}._jna5Z:active ._fTIOX{fill:#0854a1}._jna5Z:active ._fGGNs{color:#0854a1}._jna5Z._ZlTiD{background-color:rgba(11,110,208,.08)!important}._jna5Z._ZlTiD ._fTIOX{fill:#0b6ed0}._jna5Z._ZlTiD ._fGGNs{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._jna5Z._ZlTiD:hover{background-color:rgba(11,110,208,.08)!important}._jna5Z._ZlTiD:hover ._fTIOX{fill:#085caf}._jna5Z._ZlTiD:hover ._fGGNs{color:#085caf}._jna5Z._ZlTiD:active{background-color:rgba(11,110,208,.12)!important}._jna5Z._ZlTiD:active ._fTIOX{fill:#0854a1}._jna5Z._ZlTiD:active ._fGGNs{color:#0854a1}._FH7AR{border-radius:6px}._FH7AR ._fTIOX{display:block;fill:#515559}._MQeHp{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._44K8R,._qaPJ7{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._44K8R ._fTIOX,._qaPJ7 ._fTIOX{fill:#515559}._44K8R ._fGGNs,._qaPJ7 ._fGGNs{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}body.keyboard-user ._jna5Z:active:focus,body.keyboard-user ._jna5Z:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"sideBarNav":"_LGkaS","collapsed":"_Bxgpn","navItems":"_z-O8n","sidebarNavItem":"_jna5Z","icon":"_fTIOX","label":"_fGGNs","selected":"_ZlTiD","sidebarNavItemIconButton":"_FH7AR","expandCollapseButtonContainer":"_MQeHp","navLink":"_44K8R","iconButtonWithLabel":"_qaPJ7"};
5
+ var stylesheet="._LGkaS{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._LGkaS._Bxgpn{width:69px;min-width:auto;max-width:none}._z-O8n{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._jna5Z{margin-bottom:12px;background-color:transparent!important}._jna5Z:hover{background-color:rgba(11,110,208,.08)!important}._jna5Z:hover ._fTIOX{fill:#085caf}._jna5Z:hover ._fGGNs{color:#085caf}._jna5Z:active{background-color:rgba(11,110,208,.12)!important}._jna5Z:active ._fTIOX{fill:#0854a1}._jna5Z:active ._fGGNs{color:#0854a1}._jna5Z._ZlTiD{background-color:rgba(11,110,208,.08)!important}._jna5Z._ZlTiD ._fTIOX{fill:#0b6ed0}._jna5Z._ZlTiD ._fGGNs{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._jna5Z._ZlTiD:hover{background-color:rgba(11,110,208,.08)!important}._jna5Z._ZlTiD:hover ._fTIOX{fill:#085caf}._jna5Z._ZlTiD:hover ._fGGNs{color:#085caf}._jna5Z._ZlTiD:active{background-color:rgba(11,110,208,.12)!important}._jna5Z._ZlTiD:active ._fTIOX{fill:#0854a1}._jna5Z._ZlTiD:active ._fGGNs{color:#0854a1}._FH7AR{border-radius:6px}._FH7AR ._fTIOX{display:block;fill:#515559}._MQeHp{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._44K8R,._qaPJ7{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._44K8R ._fTIOX,._qaPJ7 ._fTIOX{fill:#515559}._44K8R ._fGGNs,._qaPJ7 ._fGGNs{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}body.keyboard-user ._jna5Z:active:focus,body.keyboard-user ._jna5Z: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 };
@@ -14,7 +14,6 @@ import Tooltip from '../Tooltip/Tooltip.js';
14
14
  // v5 (isActive: boolean) => string
15
15
  // v6 (props: { isActive: boolean }) => string
16
16
  const resolveIsActiveValue = val => typeof val === 'boolean' ? val : val.isActive;
17
-
18
17
  const SidebarNavLink = /*#__PURE__*/forwardRef((_ref, ref) => {
19
18
  let {
20
19
  icon,
@@ -26,7 +25,7 @@ const SidebarNavLink = /*#__PURE__*/forwardRef((_ref, ref) => {
26
25
  isCollapsed,
27
26
  NavLink
28
27
  } = useSidebarNavContext();
29
- const Icon = isCollapsed ? icon !== null && icon !== void 0 ? icon : ExcludeIcon : icon;
28
+ const Icon = isCollapsed ? icon ?? ExcludeIcon : icon;
30
29
  const link = /*#__PURE__*/React__default.createElement(NavLink, {
31
30
  className: isActive => classNames(styles.sidebarNavItem, styles.navLink, {
32
31
  [styles.noIcon]: !Icon,
@@ -45,7 +44,6 @@ const SidebarNavLink = /*#__PURE__*/forwardRef((_ref, ref) => {
45
44
  className: styles.label,
46
45
  "data-testid": getSubDataTestId(dataTestId, DATA_TESTID_SUFFIXES.LINK_TEXT)
47
46
  }, label));
48
-
49
47
  if (isCollapsed) {
50
48
  return /*#__PURE__*/React__default.createElement(Tooltip, {
51
49
  lightTheme: true,
@@ -55,7 +53,6 @@ const SidebarNavLink = /*#__PURE__*/forwardRef((_ref, ref) => {
55
53
  "aria-hidden": true
56
54
  }, link);
57
55
  }
58
-
59
56
  return link;
60
57
  });
61
58
 
@@ -29,23 +29,19 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
29
29
  const trackRef = useRef(null);
30
30
  const [values, setValues] = useControllableState(Array.isArray(defaultValues) && defaultValues.length === 2 ? defaultValues : [min, max], onChange, externalValues);
31
31
  const [buttonPositions, setButtonPositions] = React__default.useState(values.map(value => valueToPercent(value, max, min)));
32
-
33
32
  const updateValue = (newValue, index) => {
34
33
  let roundedValue = roundToStep(newValue, max, min, step);
35
-
36
34
  if (index === 0) {
37
35
  roundedValue = Math.min(roundedValue, values[1]);
38
36
  } else {
39
37
  roundedValue = Math.max(roundedValue, values[0]);
40
38
  }
41
-
42
39
  if (values[index] !== roundedValue) {
43
40
  const newValues = values.slice();
44
41
  newValues[index] = roundedValue;
45
42
  setValues(newValues);
46
43
  }
47
44
  };
48
-
49
45
  const updateValueFromPoint = (point, index) => {
50
46
  if (trackRef.current !== null) {
51
47
  const {
@@ -54,11 +50,9 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
54
50
  } = trackRef.current.getBoundingClientRect();
55
51
  const newPoint = Math.min(Math.max(0, point - trackStart), trackWidth);
56
52
  const newValue = pointToValue(newPoint, max, min, trackWidth);
57
-
58
53
  if (index === undefined) {
59
54
  const lowDiff = Math.abs(newValue - values[0]);
60
55
  const highDiff = Math.abs(newValue - values[1]);
61
-
62
56
  if (lowDiff < highDiff) {
63
57
  index = 0;
64
58
  } else if (lowDiff > highDiff) {
@@ -69,52 +63,43 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
69
63
  index = 1;
70
64
  }
71
65
  }
72
-
73
66
  updateValue(newValue, index);
74
67
  }
75
- }; // Update value when track is clicked
76
-
68
+ };
77
69
 
70
+ // Update value when track is clicked
78
71
  const handleTrackClick = e => {
79
72
  updateValueFromPoint(e.clientX);
80
73
  };
81
-
82
74
  const handleMouseMove = (e, index) => {
83
75
  const currentMouseX = e.clientX;
84
76
  updateValueFromPoint(currentMouseX, index);
85
77
  };
86
-
87
78
  const handleKeyDown = (e, index) => {
88
79
  let newValue;
89
-
90
80
  switch (e.key) {
91
81
  case 'ArrowRight':
92
82
  case 'ArrowUp':
93
83
  newValue = values[index] + step;
94
84
  break;
95
-
96
85
  case 'ArrowLeft':
97
86
  case 'ArrowDown':
98
87
  newValue = values[index] - step;
99
88
  break;
100
-
101
89
  case 'Home':
102
90
  newValue = min;
103
91
  break;
104
-
105
92
  case 'End':
106
93
  newValue = max;
107
94
  break;
108
-
109
95
  default:
110
96
  return;
111
97
  }
112
-
113
98
  e.preventDefault();
114
99
  updateValue(newValue, index);
115
- }; // Update button positions when values change
116
-
100
+ };
117
101
 
102
+ // Update button positions when values change
118
103
  useSSRLayoutEffect(() => {
119
104
  setButtonPositions(values.map(value => valueToPercent(value, max, min)));
120
105
  }, [max, min, values]);
@@ -128,8 +113,8 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
128
113
  }, /*#__PURE__*/React__default.createElement("span", {
129
114
  className: styles.fill,
130
115
  style: {
131
- left: "".concat(buttonPositions[0], "%"),
132
- right: "".concat(100 - buttonPositions[1], "%")
116
+ left: `${buttonPositions[0]}%`,
117
+ right: `${100 - buttonPositions[1]}%`
133
118
  }
134
119
  }), values.map((value, index) => /*#__PURE__*/React__default.createElement(SliderButton, {
135
120
  key: index,
@@ -142,7 +127,8 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
142
127
  buttonPosition: buttonPositions[index],
143
128
  onMouseMove: e => handleMouseMove(e, index),
144
129
  onKeyDown: e => handleKeyDown(e, index),
145
- value: typeof formatter === 'function' ? formatter(value) : // TODO: Add automatic localization of number
130
+ value: typeof formatter === 'function' ? formatter(value) :
131
+ // TODO: Add automatic localization of number
146
132
  value.toLocaleString(undefined, {
147
133
  minimumFractionDigits: countDecimals(step),
148
134
  maximumFractionDigits: countDecimals(step)
@@ -8,36 +8,27 @@ import useControllableState from '../../hooks/useControllableState/useControllab
8
8
  import useSSRLayoutEffect from '../../hooks/useSSRLayoutEffect/useSSRLayoutEffect.js';
9
9
 
10
10
  const clamp = (value, max, min) => Math.min(Math.max(value, min), max);
11
-
12
11
  const countDecimals = value => {
13
12
  if (value % 1 !== 0) {
14
13
  return value.toString().split('.')[1].length;
15
14
  }
16
-
17
15
  return 0;
18
16
  };
19
-
20
17
  const roundToStep = (value, max, min, step) => {
21
18
  let newValue = value;
22
19
  const mod = (value - min) % step;
23
20
  newValue += mod > step / 2 ? step - mod : -mod;
24
-
25
21
  if (value >= max) {
26
22
  newValue = max;
27
23
  }
28
-
29
24
  if (value <= min) {
30
25
  newValue = min;
31
26
  }
32
-
33
27
  newValue = clamp(newValue, max, min);
34
28
  return parseFloat(newValue.toFixed(countDecimals(step)));
35
29
  };
36
-
37
30
  const valueToPercent = (value, max, min) => (value - min) * 100 / (max - min);
38
-
39
31
  const pointToValue = (point, max, min, width) => point * (max - min) / width + min;
40
-
41
32
  const Slider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
42
33
  let {
43
34
  className,
@@ -56,15 +47,12 @@ const Slider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
56
47
  const trackRef = useRef(null);
57
48
  const [value, setValue] = useControllableState(defaultValue !== undefined ? defaultValue : min, onChange, externalValue);
58
49
  const [buttonPosition, setButtonPosition] = React__default.useState(valueToPercent(value, max, min));
59
-
60
50
  const updateValue = newValue => {
61
51
  const roundedValue = roundToStep(newValue, max, min, step);
62
-
63
52
  if (roundedValue !== value) {
64
53
  setValue(roundedValue);
65
54
  }
66
55
  };
67
-
68
56
  const updateValueFromPoint = point => {
69
57
  if (trackRef.current !== null) {
70
58
  const {
@@ -75,54 +63,47 @@ const Slider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
75
63
  const newValue = pointToValue(newPoint, max, min, trackWidth);
76
64
  updateValue(newValue);
77
65
  }
78
- }; // Update value when track is clicked
79
-
66
+ };
80
67
 
68
+ // Update value when track is clicked
81
69
  const handleTrackClick = e => {
82
70
  updateValueFromPoint(e.clientX);
83
71
  };
84
-
85
72
  const handleMouseMove = e => {
86
73
  const currentMouseX = e.clientX;
87
74
  updateValueFromPoint(currentMouseX);
88
75
  };
89
-
90
76
  const handleKeyDown = e => {
91
77
  let newValue;
92
-
93
78
  switch (e.key) {
94
79
  case 'ArrowRight':
95
80
  case 'ArrowUp':
96
81
  newValue = value + step;
97
82
  break;
98
-
99
83
  case 'ArrowLeft':
100
84
  case 'ArrowDown':
101
85
  newValue = value - step;
102
86
  break;
103
-
104
87
  case 'Home':
105
88
  newValue = min;
106
89
  break;
107
-
108
90
  case 'End':
109
91
  newValue = max;
110
92
  break;
111
-
112
93
  default:
113
94
  return;
114
95
  }
115
-
116
96
  e.preventDefault();
117
97
  updateValue(newValue);
118
98
  };
119
-
120
- const formattedValue = typeof formatter === 'function' ? formatter(value) : // TODO: Add automatic localization of number
99
+ const formattedValue = typeof formatter === 'function' ? formatter(value) :
100
+ // TODO: Add automatic localization of number
121
101
  value.toLocaleString(undefined, {
122
102
  minimumFractionDigits: countDecimals(step),
123
103
  maximumFractionDigits: countDecimals(step)
124
- }); // Update button position when value changes
104
+ });
125
105
 
106
+ // Update button position when value changes
126
107
  useSSRLayoutEffect(() => {
127
108
  setButtonPosition(valueToPercent(value, max, min));
128
109
  }, [max, min, value]);
@@ -137,7 +118,7 @@ const Slider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
137
118
  className: styles.fill,
138
119
  style: {
139
120
  left: -1,
140
- right: "".concat(100 - buttonPosition, "%")
121
+ right: `${100 - buttonPosition}%`
141
122
  }
142
123
  }), /*#__PURE__*/React__default.createElement(SliderButton, {
143
124
  "aria-valuemin": min,
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1uc10{height:auto;width:200px;padding:5px 10px}._2KFb9{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._sJpmI{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._sJpmI,._VvxbM{position:absolute}._VvxbM{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._VvxbM:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}body.keyboard-user ._VvxbM:active:focus,body.keyboard-user ._VvxbM:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"slider":"_1uc10","track":"_2KFb9","fill":"_sJpmI","button":"_VvxbM"};
5
- var stylesheet="._1uc10{height:auto;width:200px;padding:5px 10px}._2KFb9{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._sJpmI{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._sJpmI,._VvxbM{position:absolute}._VvxbM{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._VvxbM:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}body.keyboard-user ._VvxbM:active:focus,body.keyboard-user ._VvxbM:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._iG7eX{height:auto;width:200px;padding:5px 10px}._EruyG{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._GvPet{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._GvPet,._hdVHd{position:absolute}._hdVHd{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._hdVHd:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}body.keyboard-user ._hdVHd:active:focus,body.keyboard-user ._hdVHd:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"slider":"_iG7eX","track":"_EruyG","fill":"_GvPet","button":"_hdVHd"};
5
+ var stylesheet="._iG7eX{height:auto;width:200px;padding:5px 10px}._EruyG{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._GvPet{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._GvPet,._hdVHd{position:absolute}._hdVHd{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._hdVHd:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}body.keyboard-user ._hdVHd:active:focus,body.keyboard-user ._hdVHd: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 };
@@ -8,7 +8,6 @@ import useEventListener from '../../hooks/useEventListener/useEventListener.js';
8
8
  import Tooltip from '../Tooltip/Tooltip.js';
9
9
 
10
10
  const buttonOffset = -10;
11
-
12
11
  const SliderButton = _ref => {
13
12
  let {
14
13
  buttonPosition = 0,
@@ -25,27 +24,25 @@ const SliderButton = _ref => {
25
24
  } = _ref;
26
25
  const isMounted = useMounted();
27
26
  const [isDragging, setIsDragging] = useState(false);
28
-
29
27
  const handleMouseDown = e => {
30
28
  if (e.button === 0) {
31
29
  setIsDragging(true);
32
30
  }
33
31
  };
34
-
35
32
  const handleMouseUp = e => {
36
33
  if (isMounted.current && e.button === 0) {
37
34
  setIsDragging(false);
38
35
  }
39
- }; // Update value when mouse moves
40
-
36
+ };
41
37
 
38
+ // Update value when mouse moves
42
39
  const handleMouseMove = e => {
43
40
  if (isMounted.current && typeof onMouseMove === 'function') {
44
41
  onMouseMove(e);
45
42
  }
46
- }; // Add/remove mouse handlers when dragging starts/stops
47
-
43
+ };
48
44
 
45
+ // Add/remove mouse handlers when dragging starts/stops
49
46
  const options = {
50
47
  isDisabled: !isDragging
51
48
  };
@@ -54,7 +51,7 @@ const SliderButton = _ref => {
54
51
  const anchorButton = /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
55
52
  className: styles.button,
56
53
  style: {
57
- left: "calc(".concat(buttonPosition, "% + ").concat(buttonOffset, "px")
54
+ left: `calc(${buttonPosition}% + ${buttonOffset}px`
58
55
  },
59
56
  onMouseDown: handleMouseDown,
60
57
  onKeyDown: onKeyDown,
@@ -71,7 +68,8 @@ const SliderButton = _ref => {
71
68
  const [showTooltip, setShowTooltip] = useState(false);
72
69
  return /*#__PURE__*/React__default.createElement(Tooltip, {
73
70
  show: showTooltip,
74
- onShowChange: shouldShowTooltip => setShowTooltip(isDragging || shouldShowTooltip) // forces rerender of popper on button position change
71
+ onShowChange: shouldShowTooltip => setShowTooltip(isDragging || shouldShowTooltip)
72
+ // forces rerender of popper on button position change
75
73
  ,
76
74
  unstable_contentKey: String(buttonPosition),
77
75
  placement: "bottom",
@@ -26,26 +26,26 @@ const Switch = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
26
26
  helperTextId: formFieldHelperTextId,
27
27
  errorTextId: formFieldErrorTextId
28
28
  } = useFormFieldContext();
29
- const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
29
+ const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps?.['aria-describedby']);
30
30
  return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
31
31
  ref: ref,
32
32
  className: classNames(className, styles.switch, {
33
33
  [styles.disabled]: disabled
34
34
  })
35
35
  }), /*#__PURE__*/React__default.createElement("input", _extends({}, inputProps, {
36
- className: classNames(styles.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
36
+ className: classNames(styles.input, inputProps?.className),
37
37
  type: "checkbox",
38
38
  role: "switch",
39
- id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
40
- checked: checked !== null && checked !== void 0 ? checked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked,
41
- defaultChecked: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked,
42
- disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
43
- onChange: disabled ? undefined : onChange !== null && onChange !== void 0 ? onChange : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange,
44
- value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
45
- "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
46
- "aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
39
+ id: id ?? inputProps?.id,
40
+ checked: checked ?? inputProps?.checked,
41
+ defaultChecked: defaultChecked ?? inputProps?.defaultChecked,
42
+ disabled: disabled ?? inputProps?.disabled,
43
+ onChange: disabled ? undefined : onChange ?? inputProps?.onChange,
44
+ value: value ?? inputProps?.value,
45
+ "aria-label": ariaLabel ?? inputProps?.['aria-label'],
46
+ "aria-labelledby": ariaLabelledBy ?? inputProps?.['aria-labelledby'],
47
47
  "aria-describedby": internalAriaDescribedby,
48
- tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : inputProps === null || inputProps === void 0 ? void 0 : inputProps.tabIndex
48
+ tabIndex: tabIndex ?? inputProps?.tabIndex
49
49
  })), /*#__PURE__*/React__default.createElement("span", {
50
50
  className: styles.slider
51
51
  }));
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._1BxdV{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._1BxdV._1YKJk{cursor:not-allowed}._C-nV3{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._C-nV3:disabled{cursor:not-allowed}._C-nV3:disabled~._1k7Fu{opacity:.4}._C-nV3:checked~._1k7Fu{background-color:#0b6ed0}._C-nV3:checked~._1k7Fu:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._C-nV3:hover:not(:disabled):not(:checked)~._1k7Fu{background-color:#6a6a6a}._C-nV3:hover:not(:disabled):checked~._1k7Fu{background-color:#085caf}._C-nV3:hover:not(:disabled):checked~._1k7Fu:before{border-color:#085caf}._1k7Fu{width:32px;background-color:#898989;border-radius:34px}._1k7Fu,._1k7Fu:before{height:16px;transition:.2s}._1k7Fu:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._37yop{color:#32363a;display:flex;align-items:center;cursor:pointer}._22ybE{cursor:auto;color:hsla(0,0%,53.7%,.4)}._1UXGv{margin-right:12px;flex-shrink:0}body.keyboard-user ._1BxdV ._C-nV3:active:focus~._1k7Fu,body.keyboard-user ._1BxdV ._C-nV3:focus~._1k7Fu{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"switch":"_1BxdV","disabled":"_1YKJk","input":"_C-nV3","slider":"_1k7Fu","label":"_37yop","labelDisabled":"_22ybE","wrappedInput":"_1UXGv"};
5
- var stylesheet="._1BxdV{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._1BxdV._1YKJk{cursor:not-allowed}._C-nV3{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._C-nV3:disabled{cursor:not-allowed}._C-nV3:disabled~._1k7Fu{opacity:.4}._C-nV3:checked~._1k7Fu{background-color:#0b6ed0}._C-nV3:checked~._1k7Fu:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._C-nV3:hover:not(:disabled):not(:checked)~._1k7Fu{background-color:#6a6a6a}._C-nV3:hover:not(:disabled):checked~._1k7Fu{background-color:#085caf}._C-nV3:hover:not(:disabled):checked~._1k7Fu:before{border-color:#085caf}._1k7Fu{width:32px;background-color:#898989;border-radius:34px}._1k7Fu,._1k7Fu:before{height:16px;transition:.2s}._1k7Fu:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._37yop{color:#32363a;display:flex;align-items:center;cursor:pointer}._22ybE{cursor:auto;color:hsla(0,0%,53.7%,.4)}._1UXGv{margin-right:12px;flex-shrink:0}body.keyboard-user ._1BxdV ._C-nV3:active:focus~._1k7Fu,body.keyboard-user ._1BxdV ._C-nV3:focus~._1k7Fu{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._-n78T{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._-n78T._8dD5S{cursor:not-allowed}._a0S5k{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._a0S5k:disabled{cursor:not-allowed}._a0S5k:disabled~._hAzRE{opacity:.4}._a0S5k:checked~._hAzRE{background-color:#0b6ed0}._a0S5k:checked~._hAzRE:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._a0S5k:hover:not(:disabled):not(:checked)~._hAzRE{background-color:#6a6a6a}._a0S5k:hover:not(:disabled):checked~._hAzRE{background-color:#085caf}._a0S5k:hover:not(:disabled):checked~._hAzRE:before{border-color:#085caf}._hAzRE{width:32px;background-color:#898989;border-radius:34px}._hAzRE,._hAzRE:before{height:16px;transition:.2s}._hAzRE:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._z-5xx{color:#32363a;display:flex;align-items:center;cursor:pointer}._VtArn{cursor:auto;color:hsla(0,0%,53.7%,.4)}._S5732{margin-right:12px;flex-shrink:0}body.keyboard-user ._-n78T ._a0S5k:active:focus~._hAzRE,body.keyboard-user ._-n78T ._a0S5k:focus~._hAzRE{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"switch":"_-n78T","disabled":"_8dD5S","input":"_a0S5k","slider":"_hAzRE","label":"_z-5xx","labelDisabled":"_VtArn","wrappedInput":"_S5732"};
5
+ var stylesheet="._-n78T{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._-n78T._8dD5S{cursor:not-allowed}._a0S5k{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._a0S5k:disabled{cursor:not-allowed}._a0S5k:disabled~._hAzRE{opacity:.4}._a0S5k:checked~._hAzRE{background-color:#0b6ed0}._a0S5k:checked~._hAzRE:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._a0S5k:hover:not(:disabled):not(:checked)~._hAzRE{background-color:#6a6a6a}._a0S5k:hover:not(:disabled):checked~._hAzRE{background-color:#085caf}._a0S5k:hover:not(:disabled):checked~._hAzRE:before{border-color:#085caf}._hAzRE{width:32px;background-color:#898989;border-radius:34px}._hAzRE,._hAzRE:before{height:16px;transition:.2s}._hAzRE:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._z-5xx{color:#32363a;display:flex;align-items:center;cursor:pointer}._VtArn{cursor:auto;color:hsla(0,0%,53.7%,.4)}._S5732{margin-right:12px;flex-shrink:0}body.keyboard-user ._-n78T ._a0S5k:active:focus~._hAzRE,body.keyboard-user ._-n78T ._a0S5k:focus~._hAzRE{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 = "._1RfLa{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._1RfLa ._27b18:first-child,._1RfLa ._sbZ83:first-child{padding-left:16px}._2DevC{font-size:12px}._sbZ83{padding:12px 8px;text-align:left;font-weight:700}._3KZhJ ._2cjSq{border-top:1px solid #ededed}._3KZhJ ._2cjSq:hover{background-color:#fafafa}._2cjSq{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._27b18{padding:16px 8px;word-break:break-word;text-align:left}";
4
- var styles = {"table":"_1RfLa","tableCell":"_27b18","tableHeaderCell":"_sbZ83","tableHead":"_2DevC","tableBody":"_3KZhJ","tableRow":"_2cjSq"};
5
- var stylesheet="._1RfLa{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._1RfLa ._27b18:first-child,._1RfLa ._sbZ83:first-child{padding-left:16px}._2DevC{font-size:12px}._sbZ83{padding:12px 8px;text-align:left;font-weight:700}._3KZhJ ._2cjSq{border-top:1px solid #ededed}._3KZhJ ._2cjSq:hover{background-color:#fafafa}._2cjSq{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._27b18{padding:16px 8px;word-break:break-word;text-align:left}";
3
+ var css_248z = "._YVxy7{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._YVxy7 ._aZjY-:first-child,._YVxy7 ._fzWwu:first-child{padding-left:16px}._TTM6D{font-size:12px}._aZjY-{padding:12px 8px;text-align:left;font-weight:700}._gNEss ._VQeS2{border-top:1px solid #ededed}._gNEss ._VQeS2:hover{background-color:#fafafa}._VQeS2{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._fzWwu{padding:16px 8px;word-break:break-word;text-align:left}";
4
+ var styles = {"table":"_YVxy7","tableCell":"_fzWwu","tableHeaderCell":"_aZjY-","tableHead":"_TTM6D","tableBody":"_gNEss","tableRow":"_VQeS2"};
5
+ var stylesheet="._YVxy7{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._YVxy7 ._aZjY-:first-child,._YVxy7 ._fzWwu:first-child{padding-left:16px}._TTM6D{font-size:12px}._aZjY-{padding:12px 8px;text-align:left;font-weight:700}._gNEss ._VQeS2{border-top:1px solid #ededed}._gNEss ._VQeS2:hover{background-color:#fafafa}._VQeS2{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._fzWwu{padding:16px 8px;word-break:break-word;text-align:left}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -22,8 +22,8 @@ const Tab = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
22
22
  rootTestId,
23
23
  isTabListFocused
24
24
  } = useTabContext();
25
- const tabId = getSubDataTestId(rootId, "tab-".concat(value));
26
- const tabTestId = getSubDataTestId(rootTestId, "tab-".concat(value));
25
+ const tabId = getSubDataTestId(rootId, `tab-${value}`);
26
+ const tabTestId = getSubDataTestId(rootTestId, `tab-${value}`);
27
27
  const isSelected = activeTab === value;
28
28
  const onClick = React__default.useCallback(() => {
29
29
  setActiveTab(value);
@@ -39,7 +39,7 @@ const Tab = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
39
39
  [styles.selected]: isSelected
40
40
  }),
41
41
  "aria-selected": isSelected,
42
- "aria-controls": "".concat(rootId, "-tabpanel-").concat(value),
42
+ "aria-controls": `${rootId}-tabpanel-${value}`,
43
43
  "aria-label": ariaLabel,
44
44
  onClick: onClick,
45
45
  ref: ref,
@@ -6,8 +6,8 @@ const {
6
6
  Provider: TabCtxProvider,
7
7
  useContext: useTabContext
8
8
  } = createContextUtilities();
9
-
10
9
  // For now the provider props are identical to the contents of the context.
10
+
11
11
  const TabContextProvider = _ref => {
12
12
  let {
13
13
  activeTab,
@@ -24,11 +24,11 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
24
24
  isTabListFocused,
25
25
  setIsTabListFocused
26
26
  } = useTabContext();
27
- const tabListId = getSubDataTestId(rootId, "tablist");
28
- const tabListTestId = getSubDataTestId(rootTestId, "tablist");
29
- const tabListRef = useRef(null); // We use this map of tab element to index to allow constant time index
27
+ const tabListId = getSubDataTestId(rootId, `tablist`);
28
+ const tabListTestId = getSubDataTestId(rootTestId, `tablist`);
29
+ const tabListRef = useRef(null);
30
+ // We use this map of tab element to index to allow constant time index
30
31
  // lookup when we handle an event from a child tab
31
-
32
32
  const tabButtonsElementToIndexMapRef = useRef(new Map());
33
33
  const tabButtonsArrayRef = useRef([]);
34
34
  const [focusedTabElement, setFocusedTabElement] = useState();
@@ -36,10 +36,8 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
36
36
  if (focusedTabElement) {
37
37
  return tabButtonsElementToIndexMapRef.current.get(focusedTabElement);
38
38
  }
39
-
40
39
  return -1;
41
40
  }, [focusedTabElement, tabButtonsElementToIndexMapRef]);
42
-
43
41
  const focusTabAtIndex = index => {
44
42
  const tabRefsLength = tabButtonsArrayRef.current.length;
45
43
  const wrappedIndex = wrapAround(index, 0, tabRefsLength - 1);
@@ -47,16 +45,14 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
47
45
  newFocusedElement.focus();
48
46
  setFocusedTabElement(newFocusedElement);
49
47
  };
50
-
51
48
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
52
49
  id: tabListId,
53
50
  onFocus: e => {
54
51
  setIsTabListFocused(true);
55
-
56
52
  if (e.target.tagName === 'BUTTON') {
57
53
  const event = e;
58
- const role = event.target.getAttribute('role'); // Only handle focus events for immediate tab children
59
-
54
+ const role = event.target.getAttribute('role');
55
+ // Only handle focus events for immediate tab children
60
56
  if (role === 'tab' && event.target.parentElement === tabListRef.current) {
61
57
  setFocusedTabElement(event.target);
62
58
  }
@@ -90,14 +86,11 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
90
86
  "aria-labelledby": ariaLabelledBy,
91
87
  ref: mergeRefs(ref, tabListRef),
92
88
  tabIndex: -1 // Needed to satisfy the jsx-a11y/interactive-supports-focus rule
93
-
94
89
  }), React__default.Children.map(children, (child, index) => {
95
- if ((child === null || child === void 0 ? void 0 : child.type) === Tab) {
96
- var _child$props$value;
97
-
90
+ if (child?.type === Tab) {
98
91
  return /*#__PURE__*/React__default.cloneElement(child, {
99
- value: (_child$props$value = child.props.value) !== null && _child$props$value !== void 0 ? _child$props$value : index,
100
- ref: mergeRefs(child === null || child === void 0 ? void 0 : child.ref, node => {
92
+ value: child.props.value ?? index,
93
+ ref: mergeRefs(child?.ref, node => {
101
94
  // Store a reverse node/index map for
102
95
  // constant time index lookups from event handlers
103
96
  if (node) {
@@ -107,7 +100,6 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
107
100
  })
108
101
  });
109
102
  }
110
-
111
103
  return child;
112
104
  }));
113
105
  });
@@ -18,14 +18,14 @@ const TabPanel = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
18
18
  rootId,
19
19
  rootTestId
20
20
  } = useTabContext();
21
- const tabPanelId = getSubDataTestId(rootId, "tabpanel-".concat(value));
22
- const tabPanelTestId = getSubDataTestId(rootTestId, "tabpanel-".concat(value));
21
+ const tabPanelId = getSubDataTestId(rootId, `tabpanel-${value}`);
22
+ const tabPanelTestId = getSubDataTestId(rootTestId, `tabpanel-${value}`);
23
23
  return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
24
24
  ref: ref,
25
25
  "data-testid": tabPanelTestId,
26
26
  id: tabPanelId,
27
27
  role: "tabpanel",
28
- "aria-labelledby": "".concat(rootId, "-tab-").concat(value),
28
+ "aria-labelledby": `${rootId}-tab-${value}`,
29
29
  className: classNames(styles.tabpanel, className, {
30
30
  [styles.inactive]: value !== activeTab
31
31
  })
@@ -7,13 +7,11 @@ const TabPanels = _ref => {
7
7
  } = _ref;
8
8
  return /*#__PURE__*/React.createElement(React.Fragment, null, React.Children.map(children, (c, index) => {
9
9
  const child = c;
10
-
11
10
  if (child && child.type === TabPanel) {
12
11
  return /*#__PURE__*/React.cloneElement(child, {
13
12
  value: child.props.value || index
14
13
  });
15
14
  }
16
-
17
15
  return child;
18
16
  }));
19
17
  };