@qualtrics/ui-react 2.8.0 → 2.10.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 (84) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/dist/__shared/cjs/{index-763e59c2.js → index-0ef0b03a.js} +3 -3
  3. package/dist/__shared/cjs/{index-ce267a89.js → index-74ef768b.js} +71 -194
  4. package/dist/components/Accordion/Accordion2.js +3 -3
  5. package/dist/components/Button/Button2.js +3 -3
  6. package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
  7. package/dist/components/Checkbox/Checkbox2.js +3 -3
  8. package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
  9. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  10. package/dist/components/Combobox/Combobox.js +21 -43
  11. package/dist/components/Combobox/Combobox2.js +3 -3
  12. package/dist/components/Combobox/ComboboxInput.js +3 -3
  13. package/dist/components/ConfigPane/ConfigPane2.js +3 -3
  14. package/dist/components/Divider/Divider2.js +3 -3
  15. package/dist/components/Dropdown/Dropdown2.js +3 -3
  16. package/dist/components/FilePicker/FilePicker2.js +3 -3
  17. package/dist/components/FormField/Caption.js +3 -3
  18. package/dist/components/FormField/FormField2.js +3 -3
  19. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  20. package/dist/components/IconButton/IconButton2.js +3 -3
  21. package/dist/components/InlineInput/InlineInput.js +7 -3
  22. package/dist/components/InlineInput/InlineInput2.js +3 -3
  23. package/dist/components/Input/Input2.js +3 -3
  24. package/dist/components/InputGroup/InputGroup2.js +3 -3
  25. package/dist/components/Label/Label2.js +3 -3
  26. package/dist/components/Link/Link2.js +3 -3
  27. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  28. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  29. package/dist/components/Modal/Modal.js +2 -1
  30. package/dist/components/Modal/Modal2.js +3 -3
  31. package/dist/components/NewMenu/BaseMenu.js +3 -3
  32. package/dist/components/NewMenu/NewMenu.js +3 -3
  33. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +7 -2
  34. package/dist/components/NewMenu/parts/MenuItem.js +3 -1
  35. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  36. package/dist/components/PageLayout/PageLayout.js +3 -3
  37. package/dist/components/Pagination/Pagination2.js +3 -3
  38. package/dist/components/Popover/Popover.js +6 -1
  39. package/dist/components/Popover/Popover2.js +3 -3
  40. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  41. package/dist/components/Radio/Radio2.js +3 -3
  42. package/dist/components/SearchInput/SearchInput2.js +3 -3
  43. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  44. package/dist/components/Slider/Slider2.js +3 -3
  45. package/dist/components/Switch/Switch2.js +3 -3
  46. package/dist/components/Table/Table2.js +3 -3
  47. package/dist/components/Tabs/Tabs2.js +3 -3
  48. package/dist/components/Tooltip/Tooltip.js +5 -0
  49. package/dist/components/Tooltip/Tooltip2.js +3 -3
  50. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  51. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  52. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  53. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  54. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  55. package/dist/icons/Icon.js +3 -3
  56. package/dist/icons/index.js +1 -1
  57. package/dist/index.es.js +1 -1
  58. package/dist/index.js +265 -138
  59. package/dist/next/AdvancedTable/AdvancedTable.js +5 -3
  60. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  61. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  62. package/dist/next/Combobox/Combobox.js +4 -1
  63. package/dist/next/Combobox/Combobox2.js +3 -3
  64. package/dist/next/Combobox/ComboboxInput.js +6 -2
  65. package/dist/next/Combobox/ComboboxOption.js +4 -1
  66. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  67. package/dist/next/Input/Input2.js +3 -3
  68. package/dist/next/Menu/Menu.js +71 -0
  69. package/dist/next/Menu/Menu2.js +8 -0
  70. package/dist/next/Menu/MenuButton.js +41 -0
  71. package/dist/next/Menu/MenuContext.js +41 -0
  72. package/dist/next/Menu/MenuItem.js +49 -0
  73. package/dist/next/Menu/MenuPane.js +64 -0
  74. package/dist/next/Menu/MenuSearch.js +105 -0
  75. package/dist/next/Menu/SubMenu.js +74 -0
  76. package/dist/next/Menu/constants.js +9 -0
  77. package/dist/next/Menu/index.js +5 -0
  78. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  79. package/dist/next/SplitButton/SplitButton2.js +3 -3
  80. package/dist/next/index.d.ts +53 -0
  81. package/dist/next/index.es.js +6 -1
  82. package/dist/next/index.js +523 -138
  83. package/dist/utils/Flyout/Flyout2.js +3 -3
  84. package/package.json +1 -1
@@ -0,0 +1,105 @@
1
+ import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
2
+ import React__default, { useRef, useState, useEffect } from 'react';
3
+ import { Item } from '@radix-ui/react-dropdown-menu';
4
+ import styles from './Menu2.js';
5
+ import '../Input/index.js';
6
+ import '../../icons/index.es.js';
7
+ import '../../utils/index.js';
8
+ import { usePaneContext } from './MenuContext.js';
9
+ import { DATA_TESTID_SUFFIXES } from './constants.js';
10
+ import '../../hooks/index.js';
11
+ import useTranslation from '../../utils/Translation/useTranslation.js';
12
+ import useEventListener from '../../hooks/useEventListener/useEventListener.js';
13
+ import Input from '../Input/Input.js';
14
+ import SearchIcon from '../../icons/components/SearchIcon.js';
15
+
16
+ const MenuSearch = _ref => {
17
+ let {
18
+ setSearchValue,
19
+ items,
20
+ paneRef
21
+ } = _ref;
22
+ const itemRef = useRef(null);
23
+ const inputRef = useRef(null);
24
+ const {
25
+ translate
26
+ } = useTranslation();
27
+ const noMatchesText = translate('menu.noItemsToDisplay');
28
+ const searchText = translate('searchText');
29
+ const {
30
+ dataTestId: menuParentDataTestId,
31
+ searchValue = ''
32
+ } = usePaneContext();
33
+ const dataTestId = menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH); // not using `useMemo` to force an extra render after items have updated https://stackoverflow.com/a/56029184
34
+
35
+ const [zeroSearchResults, setZeroSearchResults] = useState();
36
+ useEffect(() => {
37
+ setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0);
38
+ }, [items, searchValue]);
39
+ useEffect(() => () => setSearchValue(''), [setSearchValue]);
40
+ const [previouslyFocusedElement, setPreviouslyFocusedElement] = useState(); // a backdoor hack to keep focus on search input on mouse leave
41
+
42
+ useEventListener(paneRef, 'focus', e => {
43
+ if (e.target === e.currentTarget && previouslyFocusedElement === itemRef.current) {
44
+ var _inputRef$current;
45
+
46
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
47
+ }
48
+
49
+ setPreviouslyFocusedElement(e.target);
50
+ }, {
51
+ isCaptureEvent: true
52
+ });
53
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Item, {
54
+ className: styles.searchBox // prevents dropdown from closing
55
+ ,
56
+ onSelect: e => e.preventDefault(),
57
+ onFocus: () => {
58
+ var _inputRef$current2;
59
+
60
+ return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
61
+ },
62
+ role: undefined,
63
+ ref: itemRef
64
+ }, /*#__PURE__*/React__default.createElement(Input, {
65
+ "data-testid": dataTestId,
66
+ role: "searchbox",
67
+ value: searchValue,
68
+ onChange: e => setSearchValue(e.target.value),
69
+ placeholder: searchText,
70
+ onKeyDown: e => {
71
+ var _e$target;
72
+
73
+ // stop propagation to prevent typeAhead
74
+ e.stopPropagation();
75
+ const keysToForward = ['Escape', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End']; // allow caret movement through text entry, but close searchable submenu if on the very left
76
+
77
+ if (((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
78
+ keysToForward.push('ArrowLeft');
79
+ } // forward keypress directly to `Item` to let Radix handle keyboard navigation
80
+
81
+
82
+ if (_includesInstanceProperty(keysToForward).call(keysToForward, e.key)) {
83
+ var _itemRef$current;
84
+
85
+ // `view` types are incompatible
86
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
87
+ const {
88
+ view,
89
+ ...eventClone
90
+ } = e;
91
+ itemRef === null || itemRef === void 0 ? void 0 : (_itemRef$current = itemRef.current) === null || _itemRef$current === void 0 ? void 0 : _itemRef$current.dispatchEvent(new KeyboardEvent('keydown', eventClone));
92
+ }
93
+ },
94
+ leftAddOn: /*#__PURE__*/React__default.createElement(SearchIcon, null),
95
+ ref: inputRef
96
+ })), zeroSearchResults && /*#__PURE__*/React__default.createElement("div", {
97
+ className: styles.emptyOption // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
98
+ ,
99
+ role: "option" // `aria-selected` is omitted because this option is not selectable
100
+ ,
101
+ "aria-live": "assertive"
102
+ }, noMatchesText));
103
+ };
104
+
105
+ export { MenuSearch, MenuSearch as default };
@@ -0,0 +1,74 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/extends';
2
+ import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
3
+ import React__default, { useRef, useState, useMemo } from 'react';
4
+ import { Sub, SubTrigger, SubContent } from '@radix-ui/react-dropdown-menu';
5
+ import classNames from 'classnames';
6
+ import styles from './Menu2.js';
7
+ import '../../icons/index.es.js';
8
+ import { usePaneContext, PaneContextProvider } from './MenuContext.js';
9
+ import '../../utils/index.js';
10
+ import { DATA_TESTID_SUFFIXES } from './constants.js';
11
+ import { MenuSearch } from './MenuSearch.js';
12
+ import '../../hooks/index.js';
13
+ import useControllableState from '../../hooks/useControllableState/useControllableState.js';
14
+ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
15
+ import ChevronRightIcon from '../../icons/components/ChevronRightIcon.js';
16
+ import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
17
+
18
+ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
19
+ let {
20
+ children,
21
+ label,
22
+ isDisabled,
23
+ isSearchable,
24
+ searchValue: externalSearchValue,
25
+ onSearchValueChange,
26
+ isSearchFilteringDisabled: isSearchFilteringDisabledForChildren = false,
27
+ ...rest
28
+ } = _ref;
29
+ const itemRef = useRef(null);
30
+ const paneRef = useRef(null);
31
+ const {
32
+ dataTestId: menuParentDataTestId,
33
+ childIndex: index,
34
+ searchValue: triggerMenuParentSearchValue,
35
+ isSearchFilteringDisabled: isSearchFilteringDisabledForTrigger
36
+ } = usePaneContext(itemRef);
37
+ const [internalSearchValue, setSearchValue] = useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
38
+ const paneDataTestId = getSubDataTestId(menuParentDataTestId, String(index));
39
+ const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
40
+ const [items, setItems] = useState([]);
41
+ const isVisible = useMemo(() => {
42
+ var _context;
43
+
44
+ return isSearchFilteringDisabledForTrigger || !triggerMenuParentSearchValue || typeof label === 'string' && _includesInstanceProperty(_context = label.toLowerCase()).call(_context, triggerMenuParentSearchValue.toLowerCase());
45
+ }, [triggerMenuParentSearchValue, label, isSearchFilteringDisabledForTrigger]);
46
+ return isVisible ? /*#__PURE__*/React__default.createElement(Sub, null, /*#__PURE__*/React__default.createElement(SubTrigger, {
47
+ className: classNames(styles.menuItem, styles.subMenu),
48
+ "data-testid": triggerDataTestId,
49
+ "aria-disabled": isDisabled,
50
+ disabled: isDisabled,
51
+ ref: itemRef
52
+ }, label, /*#__PURE__*/React__default.createElement(ChevronRightIcon, {
53
+ className: styles.rightIcon
54
+ })), /*#__PURE__*/React__default.createElement(PaneContextProvider, {
55
+ items: items,
56
+ setItems: setItems,
57
+ value: {
58
+ dataTestId: paneDataTestId,
59
+ searchValue: internalSearchValue,
60
+ isSearchFilteringDisabled: isSearchFilteringDisabledForChildren
61
+ }
62
+ }, /*#__PURE__*/React__default.createElement(SubContent, _extends({}, rest, {
63
+ className: styles.flyout,
64
+ loop: true,
65
+ "data-testid": paneDataTestId,
66
+ ref: mergeRefs(ref, paneRef)
67
+ }), isSearchable && /*#__PURE__*/React__default.createElement(MenuSearch, {
68
+ setSearchValue: setSearchValue,
69
+ items: items,
70
+ paneRef: paneRef
71
+ }), children))) : null;
72
+ });
73
+
74
+ export { SubMenu, SubMenu as default };
@@ -0,0 +1,9 @@
1
+ /* eslint-disable import/prefer-default-export */
2
+ const DATA_TESTID_SUFFIXES = {
3
+ MENU_PANE: 'menupane',
4
+ MENU_ITEM: 'menuitem',
5
+ MENU_BUTTON: 'menubutton',
6
+ MENU_SEARCH: 'menusearch'
7
+ };
8
+
9
+ export { DATA_TESTID_SUFFIXES };
@@ -0,0 +1,5 @@
1
+ export { Menu } from './Menu.js';
2
+ export { MenuButton } from './MenuButton.js';
3
+ export { MenuPane } from './MenuPane.js';
4
+ export { MenuItem } from './MenuItem.js';
5
+ export { SubMenu } from './SubMenu.js';
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._3hMLK input{padding-left:76px!important}._3E2Gf input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3E2Gf input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3E2Gf input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._McJxP{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._McJxP,._McJxP._3E2Gf:hover{background-color:transparent!important}._McJxP:hover{background-color:rgba(50,54,58,.08)!important}._McJxP:active{background-color:rgba(50,54,58,.11)!important}._McJxP svg{top:2px!important}._39qWE{position:relative}._3VRK-{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
- var styles = {"input":"_3hMLK","disabled":"_3E2Gf","dropdown":"_McJxP","container":"_39qWE","countryCode":"_3VRK-"};
5
- var stylesheet="._3hMLK input{padding-left:76px!important}._3E2Gf input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3E2Gf input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3E2Gf input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._McJxP{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._McJxP,._McJxP._3E2Gf:hover{background-color:transparent!important}._McJxP:hover{background-color:rgba(50,54,58,.08)!important}._McJxP:active{background-color:rgba(50,54,58,.11)!important}._McJxP svg{top:2px!important}._39qWE{position:relative}._3VRK-{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
3
+ var css_248z = "._OdFaS input{padding-left:76px!important}._W1VkX input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._W1VkX input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._W1VkX input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._38MMe{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._38MMe,._38MMe._W1VkX:hover{background-color:transparent!important}._38MMe:hover{background-color:rgba(50,54,58,.08)!important}._38MMe:active{background-color:rgba(50,54,58,.11)!important}._38MMe svg{top:2px!important}._1_MSL{position:relative}._tcSMK{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
+ var styles = {"input":"_OdFaS","disabled":"_W1VkX","dropdown":"_38MMe","container":"_1_MSL","countryCode":"_tcSMK"};
5
+ var stylesheet="._OdFaS input{padding-left:76px!important}._W1VkX input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._W1VkX input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._W1VkX input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._38MMe{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._38MMe,._38MMe._W1VkX:hover{background-color:transparent!important}._38MMe:hover{background-color:rgba(50,54,58,.08)!important}._38MMe:active{background-color:rgba(50,54,58,.11)!important}._38MMe svg{top:2px!important}._1_MSL{position:relative}._tcSMK{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 = "._1Gs2d{display:flex}._SVQG1{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._SVQG1._3lQhu{background-color:#fff}._SVQG1._2z_0d,._SVQG1._3lQhu._2-5SR:not(._SVQG1._3lQhu._1ztdO),body.keyboard-user ._SVQG1._3lQhu._1Z4hR:not(._4fwMD){background-color:#0b6ed0}._SVQG1._2z_0d._1ztdO._2-5SR,._SVQG1._2z_0d._4fwMD._1Z4hR,._SVQG1._2z_0d._4fwMD._1ztdO{opacity:.4}._2P6z2{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._2P6z2:focus{z-index:1}._nwK51{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}._nwK51 svg{margin-left:1px}._nwK51._3lQhu{background-color:#0b6ed0;border-color:transparent}._nwK51._3lQhu svg{fill:#fff!important}._nwK51._3lQhu:not(._NaMzr):hover{background-color:#085caf!important}._nwK51._3lQhu:not(._NaMzr):active{background-color:#0854a1!important}._nwK51._3lQhu._NaMzr{opacity:.4}._nwK51._3lQhu._NaMzr svg{background-color:transparent}._nwK51._2z_0d{border-color:#0b6ed0;background-color:#fff}._nwK51._2z_0d svg{fill:#0b6ed0!important}._nwK51._2z_0d:not(._NaMzr):hover{background-color:#eef5fc!important}._nwK51._2z_0d:not(._NaMzr):active{background-color:#e1edf9!important}._nwK51._2z_0d._NaMzr{opacity:.4}._nwK51._2z_0d._NaMzr svg{background-color:transparent}._p4fSu{width:260px}";
4
- var styles = {"container":"_1Gs2d","divider":"_SVQG1","primary":"_3lQhu","mainButtonFocus":"_1Z4hR","mainButtonDisabled":"_4fwMD","dropdownButtonFocus":"_2-5SR","dropdownButtonDisabled":"_1ztdO","secondary":"_2z_0d","mainButton":"_2P6z2","dropdownButton":"_nwK51","disabled":"_NaMzr","dropdownOption":"_p4fSu"};
5
- var stylesheet="._1Gs2d{display:flex}._SVQG1{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._SVQG1._3lQhu{background-color:#fff}._SVQG1._2z_0d,._SVQG1._3lQhu._2-5SR:not(._SVQG1._3lQhu._1ztdO),body.keyboard-user ._SVQG1._3lQhu._1Z4hR:not(._4fwMD){background-color:#0b6ed0}._SVQG1._2z_0d._1ztdO._2-5SR,._SVQG1._2z_0d._4fwMD._1Z4hR,._SVQG1._2z_0d._4fwMD._1ztdO{opacity:.4}._2P6z2{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._2P6z2:focus{z-index:1}._nwK51{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}._nwK51 svg{margin-left:1px}._nwK51._3lQhu{background-color:#0b6ed0;border-color:transparent}._nwK51._3lQhu svg{fill:#fff!important}._nwK51._3lQhu:not(._NaMzr):hover{background-color:#085caf!important}._nwK51._3lQhu:not(._NaMzr):active{background-color:#0854a1!important}._nwK51._3lQhu._NaMzr{opacity:.4}._nwK51._3lQhu._NaMzr svg{background-color:transparent}._nwK51._2z_0d{border-color:#0b6ed0;background-color:#fff}._nwK51._2z_0d svg{fill:#0b6ed0!important}._nwK51._2z_0d:not(._NaMzr):hover{background-color:#eef5fc!important}._nwK51._2z_0d:not(._NaMzr):active{background-color:#e1edf9!important}._nwK51._2z_0d._NaMzr{opacity:.4}._nwK51._2z_0d._NaMzr svg{background-color:transparent}._p4fSu{width:260px}";
3
+ var css_248z = "._2udwO{display:flex}._1C5AH{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1C5AH._2495F{background-color:#fff}._1C5AH._2495F._3hltw:not(._1C5AH._2495F._3qKAB),._1C5AH._PEaC8,body.keyboard-user ._1C5AH._2495F._3dOBx:not(._plw8F){background-color:#0b6ed0}._1C5AH._PEaC8._3qKAB._3hltw,._1C5AH._PEaC8._plw8F._3dOBx,._1C5AH._PEaC8._plw8F._3qKAB{opacity:.4}._1HrYl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1HrYl:focus{z-index:1}._1uPLq{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}._1uPLq svg{margin-left:1px}._1uPLq._2495F{background-color:#0b6ed0;border-color:transparent}._1uPLq._2495F svg{fill:#fff!important}._1uPLq._2495F:not(._19Qwi):hover{background-color:#085caf!important}._1uPLq._2495F:not(._19Qwi):active{background-color:#0854a1!important}._1uPLq._2495F._19Qwi{opacity:.4}._1uPLq._2495F._19Qwi svg{background-color:transparent}._1uPLq._PEaC8{border-color:#0b6ed0;background-color:#fff}._1uPLq._PEaC8 svg{fill:#0b6ed0!important}._1uPLq._PEaC8:not(._19Qwi):hover{background-color:#eef5fc!important}._1uPLq._PEaC8:not(._19Qwi):active{background-color:#e1edf9!important}._1uPLq._PEaC8._19Qwi{opacity:.4}._1uPLq._PEaC8._19Qwi svg{background-color:transparent}._3V2sW{width:260px}";
4
+ var styles = {"container":"_2udwO","divider":"_1C5AH","primary":"_2495F","mainButtonFocus":"_3dOBx","mainButtonDisabled":"_plw8F","dropdownButtonFocus":"_3hltw","dropdownButtonDisabled":"_3qKAB","secondary":"_PEaC8","mainButton":"_1HrYl","dropdownButton":"_1uPLq","disabled":"_19Qwi","dropdownOption":"_3V2sW"};
5
+ var stylesheet="._2udwO{display:flex}._1C5AH{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1C5AH._2495F{background-color:#fff}._1C5AH._2495F._3hltw:not(._1C5AH._2495F._3qKAB),._1C5AH._PEaC8,body.keyboard-user ._1C5AH._2495F._3dOBx:not(._plw8F){background-color:#0b6ed0}._1C5AH._PEaC8._3qKAB._3hltw,._1C5AH._PEaC8._plw8F._3dOBx,._1C5AH._PEaC8._plw8F._3qKAB{opacity:.4}._1HrYl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1HrYl:focus{z-index:1}._1uPLq{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}._1uPLq svg{margin-left:1px}._1uPLq._2495F{background-color:#0b6ed0;border-color:transparent}._1uPLq._2495F svg{fill:#fff!important}._1uPLq._2495F:not(._19Qwi):hover{background-color:#085caf!important}._1uPLq._2495F:not(._19Qwi):active{background-color:#0854a1!important}._1uPLq._2495F._19Qwi{opacity:.4}._1uPLq._2495F._19Qwi svg{background-color:transparent}._1uPLq._PEaC8{border-color:#0b6ed0;background-color:#fff}._1uPLq._PEaC8 svg{fill:#0b6ed0!important}._1uPLq._PEaC8:not(._19Qwi):hover{background-color:#eef5fc!important}._1uPLq._PEaC8:not(._19Qwi):active{background-color:#e1edf9!important}._1uPLq._PEaC8._19Qwi{opacity:.4}._1uPLq._PEaC8._19Qwi svg{background-color:transparent}._3V2sW{width:260px}";
6
6
  styleInject(css_248z);
7
7
 
8
8
  export { styles as default, stylesheet };
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { AllHTMLAttributes } from 'react';
4
4
  import type { ChangeEvent } from 'react';
5
+ import type { ComputedPlacement } from '@popperjs/core';
5
6
  import { CountryCode } from 'libphonenumber-js';
6
7
  import { CSSProperties } from 'react';
7
8
  import { E164Number } from 'libphonenumber-js';
@@ -121,6 +122,7 @@ export declare interface AdvancedTableRow {
121
122
  data: Record<string, string | number>;
122
123
  childRows?: AdvancedTableRow[];
123
124
  isExpanded?: boolean;
125
+ unsafe_rowProps?: Record<string, any>;
124
126
  }
125
127
 
126
128
  export declare interface AdvancedTableSelectedSortOption {
@@ -227,6 +229,45 @@ export declare interface InputProps extends InputHTMLAttributes<HTMLInputElement
227
229
  style?: CSSProperties;
228
230
  }
229
231
 
232
+ export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) => JSX.Element;
233
+
234
+ export declare const MenuButton: React_2.ForwardRefExoticComponent<MenuButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
235
+
236
+ export declare interface MenuButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'type'> {
237
+ asChild?: boolean;
238
+ children: React_2.ReactNode;
239
+ }
240
+
241
+ export declare const MenuItem: React_2.ForwardRefExoticComponent<MenuItemProps & React_2.RefAttributes<HTMLDivElement>>;
242
+
243
+ export declare interface MenuItemProps extends AllHTMLAttributes<HTMLDivElement> {
244
+ isDisabled?: boolean;
245
+ asChild?: boolean;
246
+ children?: React_2.ReactNode;
247
+ className?: string;
248
+ onSelect?: () => void;
249
+ label?: string;
250
+ }
251
+
252
+ export declare const MenuPane: React_2.ForwardRefExoticComponent<MenuPaneProps & React_2.RefAttributes<HTMLDivElement>>;
253
+
254
+ export declare interface MenuPaneProps extends AllHTMLAttributes<HTMLDivElement> {
255
+ placement?: ComputedPlacement;
256
+ children: React_2.ReactNode;
257
+ isSearchable?: boolean;
258
+ searchValue?: string;
259
+ onSearchValueChange?: (newValue: string) => void;
260
+ isSearchFilteringDisabled?: boolean;
261
+ }
262
+
263
+ export declare interface MenuProps {
264
+ 'data-testid'?: string;
265
+ isOpen?: boolean;
266
+ onIsOpenChange?: (shouldOpen: boolean) => void;
267
+ isDisabled?: boolean;
268
+ children: React_2.ReactNode;
269
+ }
270
+
230
271
  export declare const PhoneNumberInput: React_2.ForwardRefExoticComponent<PhoneNumberInputProps & React_2.RefAttributes<HTMLInputElement>>;
231
272
 
232
273
  export declare interface PhoneNumberInputProps {
@@ -269,4 +310,16 @@ export declare interface SplitButtonProps {
269
310
  children?: React_2.ReactNode;
270
311
  }
271
312
 
313
+ export declare const SubMenu: React_2.ForwardRefExoticComponent<SubMenuProps & React_2.RefAttributes<HTMLDivElement>>;
314
+
315
+ export declare interface SubMenuProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'label'> {
316
+ children?: React_2.ReactNode;
317
+ label?: React_2.ReactNode;
318
+ isDisabled?: boolean;
319
+ isSearchable?: boolean;
320
+ searchValue?: string;
321
+ onSearchValueChange?: (newValue: string) => void;
322
+ isSearchFilteringDisabled?: boolean;
323
+ }
324
+
272
325
  export { }
@@ -5,6 +5,7 @@ import './PhoneNumberInput/index.js';
5
5
  import './Combobox/index.js';
6
6
  import './SplitButton/index.js';
7
7
  import './FilterAnchor/index.js';
8
+ import './Menu/index.js';
8
9
  export { AdvancedTable } from './AdvancedTable/AdvancedTable.js';
9
10
  export { default as CollapsibleSearchInput } from './CollapsibleSearchInput/CollapsibleSearchInput.js';
10
11
  export { default as Input } from './Input/Input.js';
@@ -17,6 +18,10 @@ export { default as ComboboxOption } from './Combobox/ComboboxOption.js';
17
18
  export { default as SplitButton } from './SplitButton/SplitButton.js';
18
19
  export { default as SplitButtonOption } from './SplitButton/SplitButtonOption.js';
19
20
  export { default as FilterAnchor } from './FilterAnchor/FilterAnchor.js';
21
+ export { Menu } from './Menu/Menu.js';
22
+ export { MenuButton } from './Menu/MenuButton.js';
23
+ export { MenuPane } from './Menu/MenuPane.js';
24
+ export { MenuItem } from './Menu/MenuItem.js';
25
+ export { SubMenu } from './Menu/SubMenu.js';
20
26
 
21
27
  /* eslint-disable camelcase */
22
- // export * from './Menu';