@qualtrics/ui-react 2.19.1 → 2.21.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 (99) hide show
  1. package/CHANGELOG.md +21 -20
  2. package/dist/__shared/cjs/{index-4a5425cc.js → index-0ae99de2.js} +3 -3
  3. package/dist/__shared/cjs/{index-384184bd.js → index-201e8786.js} +193 -263
  4. package/dist/components/Accordion/Accordion2.js +3 -3
  5. package/dist/components/Accordion/AccordionHeader.js +4 -2
  6. package/dist/components/Button/Button.js +3 -3
  7. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  8. package/dist/components/Checkbox/Checkbox2.js +3 -3
  9. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  10. package/dist/components/ColorPicker/Alpha.js +0 -7
  11. package/dist/components/ColorPicker/ColorPicker.js +5 -1
  12. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  13. package/dist/components/ColorPicker/ColorPickerFlyout.js +9 -4
  14. package/dist/components/ColorPicker/Hue.js +0 -7
  15. package/dist/components/ColorPicker/Palette.js +6 -4
  16. package/dist/components/ColorPicker/Saturation.js +0 -9
  17. package/dist/components/Combobox/Combobox.js +8 -6
  18. package/dist/components/Combobox/Combobox2.js +3 -3
  19. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  20. package/dist/components/Divider/Divider2.js +3 -3
  21. package/dist/components/Dropdown/Dropdown.js +0 -5
  22. package/dist/components/Dropdown/Dropdown2.js +3 -3
  23. package/dist/components/Dropdown/DropdownOption.js +2 -5
  24. package/dist/components/Dropdown/DropdownSearch.js +2 -5
  25. package/dist/components/FilePicker/FilePicker.js +0 -7
  26. package/dist/components/FilePicker/FilePicker2.js +3 -3
  27. package/dist/components/FormField/Caption.js +3 -3
  28. package/dist/components/FormField/FormField2.js +3 -3
  29. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  30. package/dist/components/IconButton/IconButton2.js +3 -3
  31. package/dist/components/InlineInput/InlineInput2.js +3 -3
  32. package/dist/components/Input/Input2.js +3 -3
  33. package/dist/components/InputGroup/InputGroup2.js +3 -3
  34. package/dist/components/Label/Label2.js +3 -3
  35. package/dist/components/Link/Link2.js +3 -3
  36. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  37. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  38. package/dist/components/Modal/Modal2.js +3 -3
  39. package/dist/components/NewMenu/NewMenu.js +3 -3
  40. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +9 -8
  41. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  42. package/dist/components/PageLayout/PageLayout.js +3 -3
  43. package/dist/components/Pagination/Pagination2.js +3 -3
  44. package/dist/components/Popover/Popover2.js +3 -3
  45. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  46. package/dist/components/Radio/Radio2.js +3 -3
  47. package/dist/components/SearchInput/SearchInput2.js +3 -3
  48. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  49. package/dist/components/Slider/Slider2.js +3 -3
  50. package/dist/components/Switch/Switch2.js +3 -3
  51. package/dist/components/Table/Table2.js +3 -3
  52. package/dist/components/Tabs/Tabs2.js +3 -3
  53. package/dist/components/Tooltip/Tooltip.js +7 -5
  54. package/dist/components/Tooltip/Tooltip2.js +3 -3
  55. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  56. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  57. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  58. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  59. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +0 -27
  60. package/dist/hooks/useEventListener/useEventListener.js +3 -0
  61. package/dist/hooks/useOverlay/useOverlay.js +5 -2
  62. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  63. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  64. package/dist/icons/Icon.js +3 -3
  65. package/dist/icons/index.js +1 -1
  66. package/dist/index.d.ts +5 -3
  67. package/dist/index.es.js +1 -7
  68. package/dist/index.js +4 -7
  69. package/dist/next/AdvancedTable/AdvancedTable.js +33 -45
  70. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  71. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +1 -2
  72. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  73. package/dist/next/Combobox/Combobox2.js +3 -3
  74. package/dist/next/Drawer/Drawer2.js +3 -3
  75. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  76. package/dist/next/Input/Input2.js +3 -3
  77. package/dist/next/Menu/Menu.js +6 -2
  78. package/dist/next/Menu/Menu2.js +3 -3
  79. package/dist/next/Menu/MenuButton.js +13 -6
  80. package/dist/next/Menu/MenuItem.js +10 -4
  81. package/dist/next/Menu/MenuPane.js +55 -37
  82. package/dist/next/Menu/MenuSearch.js +16 -71
  83. package/dist/next/Menu/SubMenu.js +54 -41
  84. package/dist/next/Menu/constants.js +5 -1
  85. package/dist/next/Menu/useMutationObserver.js +17 -0
  86. package/dist/next/Menu/usePaneSearch.js +97 -7
  87. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  88. package/dist/next/SplitButton/SplitButton2.js +3 -3
  89. package/dist/next/TimePicker/TimePicker2.js +3 -3
  90. package/dist/next/ToggleButton/styles.js +3 -3
  91. package/dist/next/index.d.ts +6 -4
  92. package/dist/next/index.js +387 -290
  93. package/dist/utils/Flyout/Flyout2.js +3 -3
  94. package/dist/utils/index.js +0 -1
  95. package/icons/package.json +1 -0
  96. package/next/package.json +2 -1
  97. package/package.json +3 -3
  98. package/dist/utils/keyboardUser/index.js +0 -1
  99. package/dist/utils/keyboardUser/keyboardUser.js +0 -30
@@ -3,18 +3,17 @@ import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/ins
3
3
  import React__default, { useState, useRef, useMemo, useEffect } from 'react';
4
4
  import { Sub, SubTrigger, SubContent, Item } from '@radix-ui/react-dropdown-menu';
5
5
  import classNames from 'classnames';
6
+ import { useFocusVisible } from '@react-aria/interactions';
6
7
  import styles from './Menu2.js';
7
8
  import '../../icons/index.es.js';
8
9
  import { usePaneContext, useMenuContext, PaneContextProvider } from './MenuContext.js';
9
10
  import '../../utils/index.js';
10
11
  import { DATA_TESTID_SUFFIXES, KEYS } from './constants.js';
11
- import MenuSearch from './MenuSearch.js';
12
12
  import '../../hooks/index.js';
13
13
  import usePaneSearch from './usePaneSearch.js';
14
14
  import useId from '../../hooks/useId/useId.js';
15
15
  import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
16
16
  import { useDidUpdate } from '../../hooks/useDidUpdate/useDidUpdate.js';
17
- import { getIsKeyboardUser } from '../../utils/keyboardUser/keyboardUser.js';
18
17
  import ChevronRightIcon from '../../icons/components/ChevronRightIcon.js';
19
18
  import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
20
19
  import ArrowLeftIcon from '../../icons/components/ArrowLeftIcon.js';
@@ -30,19 +29,14 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
30
29
  isSearchFilteringDisabled: isSearchFilteringDisabledForChildren = false,
31
30
  className,
32
31
  style,
32
+ onIsOpenChange,
33
33
  ...rest
34
34
  } = _ref;
35
35
  const [items, setItems] = useState([]);
36
- const {
37
- internalSearchValue,
38
- setSearchValue,
39
- zeroSearchResults,
40
- noMatchesText
41
- } = usePaneSearch(externalSearchValue, onSearchValueChange, items);
42
36
  const internalId = useId();
43
37
  const triggerRef = useRef(null);
44
38
  const flyoutRef = useRef(null);
45
- const searchItemRef = useRef(null);
39
+ const stickyBoxRef = useRef(null);
46
40
  const backButtonRef = useRef(null);
47
41
  const {
48
42
  dataTestId: paneContainingTriggerDataTestId,
@@ -57,17 +51,32 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
57
51
  registerSubmenu,
58
52
  setMaskHeight
59
53
  } = useMenuContext();
54
+ const {
55
+ isFocusVisible
56
+ } = useFocusVisible();
60
57
  const thisPanesDepth = useRef(totalOpenPaneDepth + 1).current;
58
+ const [isPaneInDOM, setIsPaneInDOM] = useState(false);
59
+ const [isFrameAfterPaneAddedToDOM, setIsFrameAfterPaneAddedToDOM] = useState(false);
60
+ const [isTransitioningFromRight, setIsTransitioningFromRight] = useState(false);
61
+ const animatedLeft = useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth, thisPanesDepth]);
62
+ const animatedRight = useMemo(() => thisPanesDepth > totalOpenPaneDepth || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth]);
61
63
  const paneDataTestId = getSubDataTestId(paneContainingTriggerDataTestId, String(triggerIndex));
64
+ const closeThisSubmenu = e => {
65
+ // prevent closing the entire menu, and Radix keyboard navigation
66
+ e.preventDefault();
67
+ registerSubmenu(internalId, false);
68
+ };
69
+ const {
70
+ internalSearchValue,
71
+ noSearchResultsNode,
72
+ onInteractOutside
73
+ } = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, paneDataTestId, internalId, flyoutRef, backButtonRef, closeThisSubmenu);
62
74
  const backButtonDataTestId = paneDataTestId?.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_BACK);
63
75
  const triggerDataTestId = paneDataTestId?.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
64
76
  const triggerIsVisible = useMemo(() => {
65
77
  var _context;
66
78
  return isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && _includesInstanceProperty(_context = label.toLowerCase()).call(_context, paneContainingTriggerSearchValue.toLowerCase());
67
79
  }, [paneContainingTriggerSearchValue, label, isSearchFilteringDisabledForPaneContainingTrigger]);
68
- const [isPaneInDOM, setIsPaneInDOM] = useState(false);
69
- const [isFrameAfterPaneAddedToDOM, setIsFrameAfterPaneAddedToDOM] = useState(false);
70
- const [isTransitioningFromRight, setIsTransitioningFromRight] = useState(false);
71
80
  useDidUpdate(() => {
72
81
  if (isPaneInDOM) {
73
82
  setIsTransitioningFromRight(true);
@@ -76,13 +85,19 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
76
85
  window.requestAnimationFrame(() => setIsFrameAfterPaneAddedToDOM(false));
77
86
  }
78
87
  registerSubmenu(internalId, isPaneInDOM);
88
+ onIsOpenChange?.(isPaneInDOM);
79
89
  }, [isPaneInDOM]);
90
+
91
+ // Omitted dependencies because this should only run on unmount
92
+ // eslint-disable-next-line react-hooks/exhaustive-deps
80
93
  useEffect(() => () => registerSubmenu(internalId, false), []);
81
- const closeThisSubmenu = e => {
82
- // prevent closing the entire menu, and Radix keyboard navigation
83
- e.preventDefault();
84
- registerSubmenu(internalId, false);
85
- };
94
+ useDidUpdate(() => {
95
+ if (thisPanesDepth === totalOpenPaneDepth) {
96
+ setMaskHeight(flyoutRef.current?.clientHeight ?? null);
97
+ }
98
+ },
99
+ // ignoring other dependencies because this should only run when the children change
100
+ [children]);
86
101
  useDidUpdate(() => {
87
102
  if (thisPanesDepth === totalOpenPaneDepth) {
88
103
  window.requestAnimationFrame(() => {
@@ -90,28 +105,27 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
90
105
  });
91
106
  }
92
107
  }, [totalOpenPaneDepth, internalSearchValue]);
93
- const animatedLeft = useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth]);
94
- const animatedRight = useMemo(() => thisPanesDepth > totalOpenPaneDepth || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM]);
95
108
  const handlePaneTransitionEnd = () => {
96
109
  if (animatedLeft) {
97
110
  return;
98
111
  }
99
112
  if (animatedRight) {
100
113
  setIsPaneInDOM(false);
101
- if (getIsKeyboardUser()) {
114
+ if (isFocusVisible) {
102
115
  triggerRef.current?.focus();
103
116
  }
104
- } else {
105
- // if the newly closed submenu doesn't place the focus on its trigger
106
- if (!flyoutRef.current?.contains(document.activeElement) && getIsKeyboardUser()) {
107
- if (searchItemRef.current) {
108
- searchItemRef.current.focus();
109
- } else if (backButtonRef.current) {
110
- backButtonRef.current.focus();
111
- }
117
+ return;
118
+ }
119
+
120
+ // if the newly closed submenu doesn't place the focus on its trigger due to mouse events
121
+ if (!flyoutRef.current?.contains(document.activeElement) && isFocusVisible) {
122
+ if (triggerRef.current && paneContainingTriggerIsInteractive) {
123
+ triggerRef.current.focus();
124
+ } else if (backButtonRef.current) {
125
+ backButtonRef.current.focus();
112
126
  }
113
- setIsTransitioningFromRight(false);
114
127
  }
128
+ setIsTransitioningFromRight(false);
115
129
  };
116
130
  return triggerIsVisible ? /*#__PURE__*/React__default.createElement(Sub, {
117
131
  open: isPaneInDOM
@@ -146,13 +160,15 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
146
160
  isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
147
161
  isInteractive: !isTransitioningFromRight && !animatedLeft && !animatedRight,
148
162
  closeSubmenu: closeThisSubmenu,
149
- flyoutRef
163
+ flyoutRef,
164
+ stickyBoxRef
150
165
  }
151
166
  }, /*#__PURE__*/React__default.createElement(SubContent, _extends({}, rest, {
152
- loop: true,
167
+ loop: !isSearchable,
153
168
  "data-testid": paneDataTestId,
154
169
  ref: mergeRefs(ref, flyoutRef),
155
- className: classNames(className, styles.flyout, styles.containsStickyBox, {
170
+ onInteractOutside: onInteractOutside,
171
+ className: classNames(className, styles.flyout, {
156
172
  [styles.animatedRight]: animatedRight,
157
173
  [styles.animatedLeft]: animatedLeft
158
174
  }),
@@ -162,11 +178,11 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
162
178
  zIndex: thisPanesDepth
163
179
  }
164
180
  }), /*#__PURE__*/React__default.createElement("div", {
165
- className: styles.stickyBox
166
- }, isSearchable && /*#__PURE__*/React__default.createElement(MenuSearch, {
167
- setSearchValue: setSearchValue,
168
- ref: searchItemRef
169
- }), /*#__PURE__*/React__default.createElement(Item, {
181
+ className: classNames(styles.stickyBox, {
182
+ [styles.isSearchable]: isSearchable
183
+ }),
184
+ ref: stickyBoxRef
185
+ }, /*#__PURE__*/React__default.createElement(Item, {
170
186
  className: classNames(styles.menuItem, {
171
187
  [styles.unresponsive]: isTransitioningFromRight || animatedLeft || animatedRight
172
188
  }),
@@ -182,10 +198,7 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
182
198
  }, /*#__PURE__*/React__default.createElement(ArrowLeftIcon, {
183
199
  size: "small",
184
200
  className: styles.backIcon
185
- }), label)), zeroSearchResults && /*#__PURE__*/React__default.createElement("div", {
186
- className: classNames(styles.menuItem, styles.noItems),
187
- "aria-live": "assertive"
188
- }, noMatchesText), children))) : null;
201
+ }), label)), noSearchResultsNode, children))) : null;
189
202
  });
190
203
 
191
204
  export { SubMenu as default };
@@ -9,7 +9,11 @@ const DATA_TESTID_SUFFIXES = {
9
9
  const KEYS = {
10
10
  OPEN_SUBMENU: ['ArrowRight', 'Enter', ' '],
11
11
  CLOSE_SUBMENU: ['ArrowLeft'],
12
- IGNORED_BY_SEARCH_INPUT: ['Escape', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End']
12
+ NAVIGATE_UP: ['ArrowUp'],
13
+ NAVIGATE_DOWN: ['ArrowDown'],
14
+ NAVIGATE_TOP: ['Home'],
15
+ NAVIIGATE_BOTTOM: ['End'],
16
+ IGNORED_BY_SEARCH_INPUT: ['Tab']
13
17
  };
14
18
 
15
19
  export { DATA_TESTID_SUFFIXES, KEYS };
@@ -0,0 +1,17 @@
1
+ import { useEffect } from 'react';
2
+
3
+ const useMutationObserver = (target, options, onMutate) => useEffect(() => {
4
+ if (!target) {
5
+ return undefined;
6
+ }
7
+ const observer = new MutationObserver(function () {
8
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9
+ args[_key] = arguments[_key];
10
+ }
11
+ onMutate?.(...args);
12
+ });
13
+ observer.observe(target, options);
14
+ return () => observer.disconnect();
15
+ }, [target, options, onMutate]);
16
+
17
+ export { useMutationObserver as default };
@@ -1,25 +1,115 @@
1
- import { useState, useEffect } from 'react';
1
+ import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
2
+ import React__default, { useState, useEffect, useRef, useCallback } from 'react';
3
+ import classNames from 'classnames';
4
+ import { useFocusVisible } from '@react-aria/interactions';
2
5
  import '../../hooks/index.js';
3
6
  import '../../utils/index.js';
7
+ import { useMenuContext } from './MenuContext.js';
8
+ import { KEYS, DATA_TESTID_SUFFIXES } from './constants.js';
9
+ import styles from './Menu2.js';
4
10
  import useControllableState from '../../hooks/useControllableState/useControllableState.js';
5
11
  import useTranslation from '../../utils/Translation/useTranslation.js';
12
+ import useEventListener from '../../hooks/useEventListener/useEventListener.js';
6
13
 
7
14
  // abstracts the logic required for searching by both `MenuPane` and `SubMenu`
8
- function usePaneSearch(externalSearchValue, onSearchValueChange, items) {
15
+ // creates a searchBarConfig, which maps to an instance of `MenuSearch`
16
+ // returns values that are necessary for use within pane
17
+ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, menuParentDataTestId, id, flyoutRef) {
18
+ let backButtonRef = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : undefined;
19
+ let closeSubmenu = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : undefined;
9
20
  const [internalSearchValue, setSearchValue] = useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
10
21
  const [zeroSearchResults, setZeroSearchResults] = useState();
11
22
  const {
12
23
  translate
13
24
  } = useTranslation();
14
25
  const noMatchesText = translate('menu.noItemsToDisplay');
26
+ const searchPlaceholder = translate('searchText');
27
+ useEffect(() => setZeroSearchResults(items?.filter(item => item.element.current).length === 0), [items, internalSearchValue]);
28
+ const {
29
+ isFocusVisible
30
+ } = useFocusVisible({
31
+ isTextInput: true
32
+ });
33
+ const searchRef = useRef(null);
34
+ const searchInput = searchRef.current?.querySelector('input') ?? null;
35
+ const getFirstNonNullItem = () => backButtonRef?.current ?? items.find(item => item.element.current)?.element.current;
36
+ const getLastNonNullItem = () =>
37
+ // our tsconfig does not target a recent enough version to use `Array.prototype.findLast`
38
+ items.findLast(item => item.element.current)?.element.current ?? backButtonRef?.current;
39
+ useEventListener(flyoutRef, 'keydown', e => {
40
+ var _context, _context2;
41
+ if (_includesInstanceProperty(_context = KEYS.NAVIGATE_UP).call(_context, e.key) && e.target === getFirstNonNullItem() || _includesInstanceProperty(_context2 = KEYS.NAVIGATE_DOWN).call(_context2, e.key) && e.target === getLastNonNullItem()) {
42
+ searchInput?.focus();
43
+ }
44
+ }, {
45
+ additionalDependencies: [flyoutRef.current],
46
+ isDisabled: !isSearchable
47
+ });
48
+ useEventListener(searchInput, 'keydown', e => {
49
+ var _context3, _context4, _context5, _context6;
50
+ if (_includesInstanceProperty(_context3 = [...KEYS.NAVIGATE_DOWN, ...KEYS.NAVIGATE_TOP]).call(_context3, e.key)) {
51
+ // prevent scrolling
52
+ e.preventDefault();
53
+ getFirstNonNullItem()?.focus();
54
+ } else if (_includesInstanceProperty(_context4 = [...KEYS.NAVIGATE_UP, ...KEYS.NAVIIGATE_BOTTOM]).call(_context4, e.key)) {
55
+ // prevent scrolling
56
+ e.preventDefault();
57
+ getLastNonNullItem()?.focus();
58
+ } else if (_includesInstanceProperty(_context5 = KEYS.CLOSE_SUBMENU).call(_context5, e.key) && e.target?.selectionStart === 0) {
59
+ closeSubmenu?.(e);
60
+ } else if (_includesInstanceProperty(_context6 = KEYS.IGNORED_BY_SEARCH_INPUT).call(_context6, e.key)) {
61
+ e.preventDefault();
62
+ }
63
+ });
64
+ useEventListener(searchInput, 'blur', () => !isFocusVisible && !animatedLeft && !animatedRight && searchInput?.focus());
65
+ const {
66
+ searchBarConfigs,
67
+ setSearchBarConfigs
68
+ } = useMenuContext();
69
+ const onInteractOutside = useCallback(e => searchBarConfigs.some(config => config.ref.current?.contains(e.target)) && e.preventDefault(), [searchBarConfigs]);
15
70
  useEffect(() => {
16
- setZeroSearchResults(items?.filter(item => item.element.current).length === 0);
17
- }, [items, internalSearchValue]);
71
+ if (!isSearchable) {
72
+ return undefined;
73
+ }
74
+ setSearchBarConfigs(configs => {
75
+ const configsClone = [...configs];
76
+ const updatedConfig = {
77
+ searchValue: internalSearchValue,
78
+ isInteractive: !animatedLeft && !animatedRight,
79
+ animatedLeft,
80
+ animatedRight,
81
+ dataTestId: menuParentDataTestId?.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH),
82
+ setSearchValue,
83
+ ref: searchRef,
84
+ id,
85
+ searchPlaceholder
86
+ };
87
+ const configIndex = configs.findIndex(config => config.id === id);
88
+ if (configIndex === -1) {
89
+ configsClone.push(updatedConfig);
90
+ } else {
91
+ configsClone[configIndex] = updatedConfig;
92
+ }
93
+ return configsClone;
94
+ });
95
+ return () => setSearchBarConfigs(configs => {
96
+ const configIndex = configs.findIndex(config => config.id === id);
97
+ if (configIndex === -1) {
98
+ return configs;
99
+ }
100
+ const configsClone = [...configs];
101
+ configsClone.splice(configIndex, 1);
102
+ return configsClone;
103
+ });
104
+ }, [isSearchable, searchPlaceholder, setSearchBarConfigs, internalSearchValue, animatedLeft, animatedRight, menuParentDataTestId, setSearchValue, searchRef, id]);
105
+ const noSearchResultsNode = zeroSearchResults && /*#__PURE__*/React__default.createElement("div", {
106
+ className: classNames(styles.menuItem, styles.noItems),
107
+ "aria-live": "assertive"
108
+ }, noMatchesText);
18
109
  return {
19
110
  internalSearchValue,
20
- setSearchValue,
21
- zeroSearchResults,
22
- noMatchesText
111
+ noSearchResultsNode,
112
+ onInteractOutside
23
113
  };
24
114
  }
25
115
 
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._ftIEg input{padding-left:76px!important}._xPSHb input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._xPSHb input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._xPSHb input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._S3MtE{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._S3MtE,._S3MtE._xPSHb:hover{background-color:transparent!important}._S3MtE:hover{background-color:rgba(50,54,58,.08)!important}._S3MtE:active{background-color:rgba(50,54,58,.11)!important}._S3MtE svg{top:2px!important}._zPLts{position:relative}._Lv6NS{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
- var styles = {"input":"_ftIEg","disabled":"_xPSHb","dropdown":"_S3MtE","container":"_zPLts","countryCode":"_Lv6NS"};
5
- var stylesheet="._ftIEg input{padding-left:76px!important}._xPSHb input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._xPSHb input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._xPSHb input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._S3MtE{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._S3MtE,._S3MtE._xPSHb:hover{background-color:transparent!important}._S3MtE:hover{background-color:rgba(50,54,58,.08)!important}._S3MtE:active{background-color:rgba(50,54,58,.11)!important}._S3MtE svg{top:2px!important}._zPLts{position:relative}._Lv6NS{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
3
+ var css_248z = "._u34bj input{padding-left:76px!important}._-wpOY input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._-wpOY input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._-wpOY input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._-Tx0t{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._-Tx0t,._-Tx0t._-wpOY:hover{background-color:transparent!important}._-Tx0t:hover{background-color:rgba(50,54,58,.08)!important}._-Tx0t:active{background-color:rgba(50,54,58,.11)!important}._-Tx0t svg{top:2px!important}._NX2Nw{position:relative}._8HkYQ{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
+ var styles = {"input":"_u34bj","disabled":"_-wpOY","dropdown":"_-Tx0t","container":"_NX2Nw","countryCode":"_8HkYQ"};
5
+ var stylesheet="._u34bj input{padding-left:76px!important}._-wpOY input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._-wpOY input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._-wpOY input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._-Tx0t{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._-Tx0t,._-Tx0t._-wpOY:hover{background-color:transparent!important}._-Tx0t:hover{background-color:rgba(50,54,58,.08)!important}._-Tx0t:active{background-color:rgba(50,54,58,.11)!important}._-Tx0t svg{top:2px!important}._NX2Nw{position:relative}._8HkYQ{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
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 = "._A2M2P{display:flex}._852aR{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._852aR._GTVJ2{background-color:#fff}._852aR._0j0cF,._852aR._GTVJ2._cqq5X:not(._852aR._GTVJ2._TT3cu),body.keyboard-user ._852aR._GTVJ2._Dxhld:not(._QDQOk){background-color:#0b6ed0}._852aR._0j0cF._QDQOk._Dxhld,._852aR._0j0cF._QDQOk._TT3cu,._852aR._0j0cF._TT3cu._cqq5X{opacity:.4}._il-WD{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._il-WD:focus{z-index:1}._PDkaA{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._PDkaA svg{margin-left:1px}._PDkaA._GTVJ2{background-color:#0b6ed0;border-color:transparent}._PDkaA._GTVJ2 svg{fill:#fff!important}._PDkaA._GTVJ2:not(._ZArO2):hover{background-color:#085caf!important}._PDkaA._GTVJ2:not(._ZArO2):active{background-color:#0854a1!important}._PDkaA._GTVJ2._ZArO2{opacity:.4}._PDkaA._GTVJ2._ZArO2 svg{background-color:transparent}._PDkaA._0j0cF{border-color:#0b6ed0;background-color:#fff}._PDkaA._0j0cF svg{fill:#0b6ed0!important}._PDkaA._0j0cF:not(._ZArO2):hover{background-color:#eef5fc!important}._PDkaA._0j0cF:not(._ZArO2):active{background-color:#e1edf9!important}._PDkaA._0j0cF._ZArO2{opacity:.4}._PDkaA._0j0cF._ZArO2 svg{background-color:transparent}._jRrOX{width:260px}";
4
- var styles = {"container":"_A2M2P","divider":"_852aR","primary":"_GTVJ2","mainButtonFocus":"_Dxhld","mainButtonDisabled":"_QDQOk","dropdownButtonFocus":"_cqq5X","dropdownButtonDisabled":"_TT3cu","secondary":"_0j0cF","mainButton":"_il-WD","dropdownButton":"_PDkaA","disabled":"_ZArO2","dropdownOption":"_jRrOX"};
5
- var stylesheet="._A2M2P{display:flex}._852aR{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._852aR._GTVJ2{background-color:#fff}._852aR._0j0cF,._852aR._GTVJ2._cqq5X:not(._852aR._GTVJ2._TT3cu),body.keyboard-user ._852aR._GTVJ2._Dxhld:not(._QDQOk){background-color:#0b6ed0}._852aR._0j0cF._QDQOk._Dxhld,._852aR._0j0cF._QDQOk._TT3cu,._852aR._0j0cF._TT3cu._cqq5X{opacity:.4}._il-WD{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._il-WD:focus{z-index:1}._PDkaA{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._PDkaA svg{margin-left:1px}._PDkaA._GTVJ2{background-color:#0b6ed0;border-color:transparent}._PDkaA._GTVJ2 svg{fill:#fff!important}._PDkaA._GTVJ2:not(._ZArO2):hover{background-color:#085caf!important}._PDkaA._GTVJ2:not(._ZArO2):active{background-color:#0854a1!important}._PDkaA._GTVJ2._ZArO2{opacity:.4}._PDkaA._GTVJ2._ZArO2 svg{background-color:transparent}._PDkaA._0j0cF{border-color:#0b6ed0;background-color:#fff}._PDkaA._0j0cF svg{fill:#0b6ed0!important}._PDkaA._0j0cF:not(._ZArO2):hover{background-color:#eef5fc!important}._PDkaA._0j0cF:not(._ZArO2):active{background-color:#e1edf9!important}._PDkaA._0j0cF._ZArO2{opacity:.4}._PDkaA._0j0cF._ZArO2 svg{background-color:transparent}._jRrOX{width:260px}";
3
+ var css_248z = "._NmeBb{display:flex}._I-Enc{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._I-Enc._iGxXp{background-color:#fff}._I-Enc._iGxXp._fNSh2.focus-visible:not(._ntuew),._I-Enc._iGxXp._fNSh2:focus-visible:not(._ntuew),._I-Enc._iGxXp._o2UHQ:not(._I-Enc._iGxXp._21iUU),._I-Enc._wKzVZ{background-color:#0b6ed0}._I-Enc._wKzVZ._21iUU._o2UHQ,._I-Enc._wKzVZ._ntuew._21iUU,._I-Enc._wKzVZ._ntuew._fNSh2{opacity:.4}._HBerZ{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._HBerZ:focus{z-index:1}._OZZIq{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._OZZIq svg{margin-left:1px}._OZZIq._iGxXp{background-color:#0b6ed0;border-color:transparent}._OZZIq._iGxXp svg{fill:#fff!important}._OZZIq._iGxXp:not(._cYVes):hover{background-color:#085caf!important}._OZZIq._iGxXp:not(._cYVes):active{background-color:#0854a1!important}._OZZIq._iGxXp._cYVes{opacity:.4}._OZZIq._iGxXp._cYVes svg{background-color:transparent}._OZZIq._wKzVZ{border-color:#0b6ed0;background-color:#fff}._OZZIq._wKzVZ svg{fill:#0b6ed0!important}._OZZIq._wKzVZ:not(._cYVes):hover{background-color:#eef5fc!important}._OZZIq._wKzVZ:not(._cYVes):active{background-color:#e1edf9!important}._OZZIq._wKzVZ._cYVes{opacity:.4}._OZZIq._wKzVZ._cYVes svg{background-color:transparent}._5QWht{width:260px}";
4
+ var styles = {"container":"_NmeBb","divider":"_I-Enc","primary":"_iGxXp","mainButtonFocus":"_fNSh2","mainButtonDisabled":"_ntuew","dropdownButtonFocus":"_o2UHQ","dropdownButtonDisabled":"_21iUU","secondary":"_wKzVZ","mainButton":"_HBerZ","dropdownButton":"_OZZIq","disabled":"_cYVes","dropdownOption":"_5QWht"};
5
+ var stylesheet="._NmeBb{display:flex}._I-Enc{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._I-Enc._iGxXp{background-color:#fff}._I-Enc._iGxXp._fNSh2.focus-visible:not(._ntuew),._I-Enc._iGxXp._fNSh2:focus-visible:not(._ntuew),._I-Enc._iGxXp._o2UHQ:not(._I-Enc._iGxXp._21iUU),._I-Enc._wKzVZ{background-color:#0b6ed0}._I-Enc._wKzVZ._21iUU._o2UHQ,._I-Enc._wKzVZ._ntuew._21iUU,._I-Enc._wKzVZ._ntuew._fNSh2{opacity:.4}._HBerZ{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._HBerZ:focus{z-index:1}._OZZIq{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._OZZIq svg{margin-left:1px}._OZZIq._iGxXp{background-color:#0b6ed0;border-color:transparent}._OZZIq._iGxXp svg{fill:#fff!important}._OZZIq._iGxXp:not(._cYVes):hover{background-color:#085caf!important}._OZZIq._iGxXp:not(._cYVes):active{background-color:#0854a1!important}._OZZIq._iGxXp._cYVes{opacity:.4}._OZZIq._iGxXp._cYVes svg{background-color:transparent}._OZZIq._wKzVZ{border-color:#0b6ed0;background-color:#fff}._OZZIq._wKzVZ svg{fill:#0b6ed0!important}._OZZIq._wKzVZ:not(._cYVes):hover{background-color:#eef5fc!important}._OZZIq._wKzVZ:not(._cYVes):active{background-color:#e1edf9!important}._OZZIq._wKzVZ._cYVes{opacity:.4}._OZZIq._wKzVZ._cYVes svg{background-color:transparent}._5QWht{width:260px}";
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 = "._7lOdN{display:inline-block;position:relative}._dLogP{width:120px}._dLogP ._SvLXS._sB9s6{transform:rotate(-180deg)}._dLogP ._SvLXS._93Jl7{fill:#9d9fa1;opacity:.4}._oy5-J>input:focus{box-shadow:none!important;border:1px solid #898989!important}._HKxEu{width:120px}._HKxEu ._IjBc3._ttgJu{background-color:#efefef;border-radius:6px}._SvLXS{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._SvLXS._sB9s6{transform:rotate(-180deg)}";
4
- var styles = {"container":"_7lOdN","input":"_dLogP","icon":"_SvLXS","open":"_sB9s6","disabled":"_93Jl7","ignoreFocusStyle":"_oy5-J","flyout":"_HKxEu","option":"_IjBc3","exactMatch":"_ttgJu"};
5
- var stylesheet="._7lOdN{display:inline-block;position:relative}._dLogP{width:120px}._dLogP ._SvLXS._sB9s6{transform:rotate(-180deg)}._dLogP ._SvLXS._93Jl7{fill:#9d9fa1;opacity:.4}._oy5-J>input:focus{box-shadow:none!important;border:1px solid #898989!important}._HKxEu{width:120px}._HKxEu ._IjBc3._ttgJu{background-color:#efefef;border-radius:6px}._SvLXS{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._SvLXS._sB9s6{transform:rotate(-180deg)}";
3
+ var css_248z = "._HhWjR{display:inline-block;position:relative}._sItyq{width:120px}._sItyq ._HybLy._0wq1a{transform:rotate(-180deg)}._sItyq ._HybLy._MxBz9{fill:#9d9fa1;opacity:.4}._441Gw>input:focus{box-shadow:none!important;border:1px solid #898989!important}._YpFV8{width:120px}._YpFV8 ._DJO7p._aJeLD{background-color:#efefef;border-radius:6px}._HybLy{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._HybLy._0wq1a{transform:rotate(-180deg)}";
4
+ var styles = {"container":"_HhWjR","input":"_sItyq","icon":"_HybLy","open":"_0wq1a","disabled":"_MxBz9","ignoreFocusStyle":"_441Gw","flyout":"_YpFV8","option":"_DJO7p","exactMatch":"_aJeLD"};
5
+ var stylesheet="._HhWjR{display:inline-block;position:relative}._sItyq{width:120px}._sItyq ._HybLy._0wq1a{transform:rotate(-180deg)}._sItyq ._HybLy._MxBz9{fill:#9d9fa1;opacity:.4}._441Gw>input:focus{box-shadow:none!important;border:1px solid #898989!important}._YpFV8{width:120px}._YpFV8 ._DJO7p._aJeLD{background-color:#efefef;border-radius:6px}._HybLy{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._HybLy._0wq1a{transform:rotate(-180deg)}";
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 = "._dQ2H3{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._UHCUT{background-color:rgba(50,54,58,.08)}._IxOqH{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._ViMDu{color:rgba(81,85,89,.4);cursor:not-allowed}._XfgD-{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._sjPfz{color:#085caf;border-color:#085caf}._sBKSB,._sjPfz{background:rgba(11,110,208,.11)}._sBKSB{color:#0854a1;border-color:#0854a1}._6-jnb{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._MqILq{position:relative;display:inline-grid}._MqILq svg{fill:currentColor}._MqILq ._SZYjR{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._MqILq ._SZYjR+._-GaoZ{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._MqILq ._SZYjR+._-GaoZ._hPlTe{padding:5px;max-width:36px;min-width:36px}._MqILq ._SZYjR+._-GaoZ._Ikzts{padding:0 16px}._MqILq ._SZYjR+._-GaoZ._6-26f{padding:0 16px 0 12px}._MqILq ._SZYjR:hover+._-GaoZ{background-color:rgba(50,54,58,.08)}._MqILq ._SZYjR:disabled+._-GaoZ{color:rgba(81,85,89,.4);cursor:not-allowed}._MqILq ._SZYjR:active+._-GaoZ,._MqILq ._SZYjR:focus:active+._-GaoZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._MqILq ._SZYjR:checked+._-GaoZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._MqILq ._SZYjR:checked:hover+._-GaoZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._MqILq ._SZYjR:checked:disabled+._-GaoZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._MqILq ._SZYjR:checked:active+._-GaoZ,._MqILq ._SZYjR:checked:focus:active+._-GaoZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._RRJux{display:inline-flex;position:relative}._RRJux:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._RRJux>*{flex-shrink:0;flex-grow:0}._VbbII{border:none;margin:0;padding:0}._VbbII legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}body.keyboard-user ._MqILq ._SZYjR:active:focus+._-GaoZ,body.keyboard-user ._MqILq ._SZYjR:focus+._-GaoZ{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
- var styles = {"default":"_dQ2H3","hovered":"_UHCUT","pressed":"_IxOqH","disabled":"_ViMDu","selectedDefault":"_XfgD-","selectedHovered":"_sjPfz","selectedPressed":"_sBKSB","selectedDisabled":"_6-jnb","toggleContainer":"_MqILq","toggleInput":"_SZYjR","toggleButton":"_-GaoZ","iconOnly":"_hPlTe","text":"_Ikzts","iconText":"_6-26f","toggleButtonGroup":"_RRJux","toggleButtonGroupFieldset":"_VbbII"};
5
- var stylesheet="._dQ2H3{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._UHCUT{background-color:rgba(50,54,58,.08)}._IxOqH{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._ViMDu{color:rgba(81,85,89,.4);cursor:not-allowed}._XfgD-{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._sjPfz{color:#085caf;border-color:#085caf}._sBKSB,._sjPfz{background:rgba(11,110,208,.11)}._sBKSB{color:#0854a1;border-color:#0854a1}._6-jnb{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._MqILq{position:relative;display:inline-grid}._MqILq svg{fill:currentColor}._MqILq ._SZYjR{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._MqILq ._SZYjR+._-GaoZ{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._MqILq ._SZYjR+._-GaoZ._hPlTe{padding:5px;max-width:36px;min-width:36px}._MqILq ._SZYjR+._-GaoZ._Ikzts{padding:0 16px}._MqILq ._SZYjR+._-GaoZ._6-26f{padding:0 16px 0 12px}._MqILq ._SZYjR:hover+._-GaoZ{background-color:rgba(50,54,58,.08)}._MqILq ._SZYjR:disabled+._-GaoZ{color:rgba(81,85,89,.4);cursor:not-allowed}._MqILq ._SZYjR:active+._-GaoZ,._MqILq ._SZYjR:focus:active+._-GaoZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._MqILq ._SZYjR:checked+._-GaoZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._MqILq ._SZYjR:checked:hover+._-GaoZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._MqILq ._SZYjR:checked:disabled+._-GaoZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._MqILq ._SZYjR:checked:active+._-GaoZ,._MqILq ._SZYjR:checked:focus:active+._-GaoZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._RRJux{display:inline-flex;position:relative}._RRJux:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._RRJux>*{flex-shrink:0;flex-grow:0}._VbbII{border:none;margin:0;padding:0}._VbbII legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}body.keyboard-user ._MqILq ._SZYjR:active:focus+._-GaoZ,body.keyboard-user ._MqILq ._SZYjR:focus+._-GaoZ{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
3
+ var css_248z = "._ya96d{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._xzvja{background-color:rgba(50,54,58,.08)}._tLW0s{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._EeQGX{color:rgba(81,85,89,.4);cursor:not-allowed}._8WUNr{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._HOvAe{color:#085caf;border-color:#085caf}._672ty,._HOvAe{background:rgba(11,110,208,.11)}._672ty{color:#0854a1;border-color:#0854a1}._vMjAP{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._UKJ9Q{position:relative;display:inline-grid}._UKJ9Q svg{fill:currentColor}._UKJ9Q ._5N4wo{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._UKJ9Q ._5N4wo+._wE2Ld{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._UKJ9Q ._5N4wo+._wE2Ld._gAgzU{padding:5px;max-width:36px;min-width:36px}._UKJ9Q ._5N4wo+._wE2Ld._cTtDz{padding:0 16px}._UKJ9Q ._5N4wo+._wE2Ld._7qhIS{padding:0 16px 0 12px}._UKJ9Q ._5N4wo:hover+._wE2Ld{background-color:rgba(50,54,58,.08)}._UKJ9Q ._5N4wo:disabled+._wE2Ld{color:rgba(81,85,89,.4);cursor:not-allowed}._UKJ9Q ._5N4wo:active+._wE2Ld,._UKJ9Q ._5N4wo:focus:active+._wE2Ld{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._UKJ9Q ._5N4wo:checked+._wE2Ld{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._UKJ9Q ._5N4wo:checked:hover+._wE2Ld{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._UKJ9Q ._5N4wo:checked:disabled+._wE2Ld{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._UKJ9Q ._5N4wo:checked:active+._wE2Ld,._UKJ9Q ._5N4wo:checked:focus:active+._wE2Ld{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._0bnrO{display:inline-flex;position:relative}._0bnrO:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._0bnrO>*{flex-shrink:0;flex-grow:0}._Dc5B1{border:none;margin:0;padding:0}._Dc5B1 legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._UKJ9Q ._5N4wo.focus-visible+._wE2Ld,._UKJ9Q ._5N4wo:focus-visible+._wE2Ld{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
4
+ var styles = {"default":"_ya96d","hovered":"_xzvja","pressed":"_tLW0s","disabled":"_EeQGX","selectedDefault":"_8WUNr","selectedHovered":"_HOvAe","selectedPressed":"_672ty","selectedDisabled":"_vMjAP","toggleContainer":"_UKJ9Q","toggleInput":"_5N4wo","toggleButton":"_wE2Ld","iconOnly":"_gAgzU","text":"_cTtDz","iconText":"_7qhIS","toggleButtonGroup":"_0bnrO","toggleButtonGroupFieldset":"_Dc5B1"};
5
+ var stylesheet="._ya96d{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._xzvja{background-color:rgba(50,54,58,.08)}._tLW0s{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._EeQGX{color:rgba(81,85,89,.4);cursor:not-allowed}._8WUNr{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._HOvAe{color:#085caf;border-color:#085caf}._672ty,._HOvAe{background:rgba(11,110,208,.11)}._672ty{color:#0854a1;border-color:#0854a1}._vMjAP{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._UKJ9Q{position:relative;display:inline-grid}._UKJ9Q svg{fill:currentColor}._UKJ9Q ._5N4wo{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._UKJ9Q ._5N4wo+._wE2Ld{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._UKJ9Q ._5N4wo+._wE2Ld._gAgzU{padding:5px;max-width:36px;min-width:36px}._UKJ9Q ._5N4wo+._wE2Ld._cTtDz{padding:0 16px}._UKJ9Q ._5N4wo+._wE2Ld._7qhIS{padding:0 16px 0 12px}._UKJ9Q ._5N4wo:hover+._wE2Ld{background-color:rgba(50,54,58,.08)}._UKJ9Q ._5N4wo:disabled+._wE2Ld{color:rgba(81,85,89,.4);cursor:not-allowed}._UKJ9Q ._5N4wo:active+._wE2Ld,._UKJ9Q ._5N4wo:focus:active+._wE2Ld{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._UKJ9Q ._5N4wo:checked+._wE2Ld{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._UKJ9Q ._5N4wo:checked:hover+._wE2Ld{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._UKJ9Q ._5N4wo:checked:disabled+._wE2Ld{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._UKJ9Q ._5N4wo:checked:active+._wE2Ld,._UKJ9Q ._5N4wo:checked:focus:active+._wE2Ld{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._0bnrO{display:inline-flex;position:relative}._0bnrO:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._0bnrO>*{flex-shrink:0;flex-grow:0}._Dc5B1{border:none;margin:0;padding:0}._Dc5B1 legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._UKJ9Q ._5N4wo.focus-visible+._wE2Ld,._UKJ9Q ._5N4wo:focus-visible+._wE2Ld{z-index:20;outline:none;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 };
@@ -13,6 +13,7 @@ import { MouseEvent as MouseEvent_2 } from 'react';
13
13
  import { MouseEventHandler } from 'react';
14
14
  import { MutableRefObject } from 'react';
15
15
  import { default as React_2 } from 'react';
16
+ import { ReactElement } from 'react';
16
17
  import { ReactNode } from 'react';
17
18
 
18
19
  export declare const AdvancedTable: React_2.FunctionComponent<AdvancedTableProps>;
@@ -170,7 +171,7 @@ export declare interface CollapsibleSearchInputProps {
170
171
  'data-testid'?: string;
171
172
  }
172
173
 
173
- export declare function Combobox({ initialValue, value, onChange, isDisabled, isInvalid, isRequired, isLoading, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps): React_2.JSX.Element;
174
+ export declare function Combobox({ initialValue, value, onChange, isDisabled, isInvalid, isRequired, isLoading, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'data-testid': dataTestId, children, }: ComboboxProps): ReactElement;
174
175
 
175
176
  export declare const ComboboxFlyout: FunctionComponent<ComboboxFlyoutProps>;
176
177
 
@@ -181,7 +182,7 @@ export declare interface ComboboxFlyoutProps {
181
182
  children?: ReactNode;
182
183
  }
183
184
 
184
- export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps): React_2.JSX.Element;
185
+ export declare function ComboboxGroup({ label, 'aria-describedby': ariaDescribedBy, children, }: ComboboxGroupProps): ReactElement;
185
186
 
186
187
  export declare interface ComboboxGroupProps {
187
188
  label: string;
@@ -202,7 +203,7 @@ export declare interface ComboboxInputProps {
202
203
  'aria-describedby'?: string;
203
204
  }
204
205
 
205
- export declare function ComboboxOption({ label }: ComboboxOptionProps): React_2.JSX.Element | null;
206
+ export declare function ComboboxOption({ label, }: ComboboxOptionProps): ReactElement | null;
206
207
 
207
208
  export declare interface ComboboxOptionProps {
208
209
  label: string;
@@ -294,7 +295,7 @@ export declare interface InputProps extends InputHTMLAttributes<HTMLInputElement
294
295
  style?: CSSProperties;
295
296
  }
296
297
 
297
- export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) => React_2.JSX.Element;
298
+ export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) => ReactElement;
298
299
 
299
300
  export declare const MenuButton: React_2.ForwardRefExoticComponent<MenuButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
300
301
 
@@ -404,6 +405,7 @@ export declare interface SubMenuProps extends Omit<AllHTMLAttributes<HTMLDivElem
404
405
  searchValue?: string;
405
406
  onSearchValueChange?: (newValue: string) => void;
406
407
  isSearchFilteringDisabled?: boolean;
408
+ onIsOpenChange?: (isOpen: boolean) => void;
407
409
  }
408
410
 
409
411
  declare interface Time {