@qualtrics/ui-react 2.9.0 → 2.11.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 (85) hide show
  1. package/CHANGELOG.md +35 -1
  2. package/dist/__shared/cjs/{index-3e5149c9.js → index-30148ada.js} +3 -3
  3. package/dist/__shared/cjs/{index-38a79098.js → index-bb7befc3.js} +81 -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 +0 -2
  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 +2 -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/NumberStepper/NumberStepper2.js +3 -3
  35. package/dist/components/PageLayout/PageLayout.js +3 -3
  36. package/dist/components/Pagination/Pagination2.js +3 -3
  37. package/dist/components/Popover/Popover.js +5 -0
  38. package/dist/components/Popover/Popover2.js +3 -3
  39. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  40. package/dist/components/Radio/Radio2.js +3 -3
  41. package/dist/components/SearchInput/SearchInput2.js +3 -3
  42. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  43. package/dist/components/Slider/Slider2.js +3 -3
  44. package/dist/components/Switch/Switch2.js +3 -3
  45. package/dist/components/Table/Table2.js +3 -3
  46. package/dist/components/Tabs/Tabs2.js +3 -3
  47. package/dist/components/Tooltip/Tooltip.js +5 -0
  48. package/dist/components/Tooltip/Tooltip2.js +3 -3
  49. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  50. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  51. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  52. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  53. package/dist/hooks/useOverlay/index.js +1 -0
  54. package/dist/hooks/useOverlay/useOverlay.js +70 -0
  55. package/dist/hooks/useOverlay/useOverlay2.js +8 -0
  56. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  57. package/dist/icons/Icon.js +3 -3
  58. package/dist/icons/index.js +1 -1
  59. package/dist/index.es.js +1 -1
  60. package/dist/index.js +262 -150
  61. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  62. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  63. package/dist/next/Combobox/Combobox2.js +3 -3
  64. package/dist/next/Drawer/Drawer.js +138 -0
  65. package/dist/next/Drawer/Drawer2.js +8 -0
  66. package/dist/next/Drawer/index.js +1 -0
  67. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  68. package/dist/next/Input/Input2.js +3 -3
  69. package/dist/next/Menu/Menu.js +71 -0
  70. package/dist/next/Menu/Menu2.js +8 -0
  71. package/dist/next/Menu/MenuButton.js +41 -0
  72. package/dist/next/Menu/MenuContext.js +41 -0
  73. package/dist/next/Menu/MenuItem.js +49 -0
  74. package/dist/next/Menu/MenuPane.js +64 -0
  75. package/dist/next/Menu/MenuSearch.js +105 -0
  76. package/dist/next/Menu/SubMenu.js +74 -0
  77. package/dist/next/Menu/constants.js +9 -0
  78. package/dist/next/Menu/index.js +5 -0
  79. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  80. package/dist/next/SplitButton/SplitButton2.js +3 -3
  81. package/dist/next/index.d.ts +71 -0
  82. package/dist/next/index.es.js +8 -1
  83. package/dist/next/index.js +697 -133
  84. package/dist/utils/Flyout/Flyout2.js +3 -3
  85. package/package.json +11 -10
@@ -0,0 +1,64 @@
1
+ import _extends from '@babel/runtime-corejs3/helpers/extends';
2
+ import React__default, { useMemo, useState, useRef } from 'react';
3
+ import { Portal, Content } from '@radix-ui/react-dropdown-menu';
4
+ import styles from './Menu2.js';
5
+ import { usePortalTarget } from '../../components/UIProvider/PortalTargetContext.js';
6
+ import { useMenuContext, PaneContextProvider } from './MenuContext.js';
7
+ import '../../utils/index.js';
8
+ import { DATA_TESTID_SUFFIXES } from './constants.js';
9
+ import { MenuSearch } from './MenuSearch.js';
10
+ import '../../hooks/index.js';
11
+ import useControllableState from '../../hooks/useControllableState/useControllableState.js';
12
+ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
13
+ import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
14
+
15
+ const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
16
+ let {
17
+ placement,
18
+ children,
19
+ isSearchable,
20
+ searchValue: externalSearchValue,
21
+ onSearchValueChange,
22
+ isSearchFilteringDisabled = false,
23
+ ...rest
24
+ } = _ref;
25
+ const [internalSearchValue, setSearchValue] = useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
26
+ const portalTarget = usePortalTarget();
27
+ const [side, align] = useMemo(() => {
28
+ var _placement$split, _placement$split2;
29
+
30
+ return (_placement$split = placement === null || placement === void 0 ? void 0 : (_placement$split2 = placement.split) === null || _placement$split2 === void 0 ? void 0 : _placement$split2.call(placement, '-')) !== null && _placement$split !== void 0 ? _placement$split : [];
31
+ }, [placement]);
32
+ const [items, setItems] = useState([]);
33
+ const {
34
+ dataTestId: rootDataTestId
35
+ } = useMenuContext();
36
+ const dataTestId = getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_PANE);
37
+ const paneRef = useRef(null);
38
+ return /*#__PURE__*/React__default.createElement(PaneContextProvider, {
39
+ items: items,
40
+ setItems: setItems,
41
+ value: {
42
+ dataTestId,
43
+ searchValue: internalSearchValue,
44
+ paneRef,
45
+ isSearchFilteringDisabled
46
+ }
47
+ }, /*#__PURE__*/React__default.createElement(Portal, {
48
+ container: portalTarget || undefined
49
+ }, /*#__PURE__*/React__default.createElement(Content, _extends({}, rest, {
50
+ sideOffset: 6,
51
+ loop: true,
52
+ side: side || 'bottom',
53
+ align: align || 'start',
54
+ className: styles.flyout,
55
+ ref: mergeRefs(ref, paneRef),
56
+ "data-testid": dataTestId
57
+ }), isSearchable && /*#__PURE__*/React__default.createElement(MenuSearch, {
58
+ setSearchValue: setSearchValue,
59
+ items: items,
60
+ paneRef: paneRef
61
+ }), children)));
62
+ });
63
+
64
+ export { MenuPane, MenuPane as default };
@@ -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 = "._3RxeH input{padding-left:76px!important}._3hI4d input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3hI4d input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3hI4d input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3Ay6l{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._3Ay6l,._3Ay6l._3hI4d:hover{background-color:transparent!important}._3Ay6l:hover{background-color:rgba(50,54,58,.08)!important}._3Ay6l:active{background-color:rgba(50,54,58,.11)!important}._3Ay6l svg{top:2px!important}._c5dJN{position:relative}._JB4D2{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
- var styles = {"input":"_3RxeH","disabled":"_3hI4d","dropdown":"_3Ay6l","container":"_c5dJN","countryCode":"_JB4D2"};
5
- var stylesheet="._3RxeH input{padding-left:76px!important}._3hI4d input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3hI4d input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3hI4d input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3Ay6l{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._3Ay6l,._3Ay6l._3hI4d:hover{background-color:transparent!important}._3Ay6l:hover{background-color:rgba(50,54,58,.08)!important}._3Ay6l:active{background-color:rgba(50,54,58,.11)!important}._3Ay6l svg{top:2px!important}._c5dJN{position:relative}._JB4D2{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
3
+ var css_248z = "._6tLyR input{padding-left:76px!important}._3pFBN input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3pFBN input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3pFBN input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1J5W9{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1J5W9,._1J5W9._3pFBN:hover{background-color:transparent!important}._1J5W9:hover{background-color:rgba(50,54,58,.08)!important}._1J5W9:active{background-color:rgba(50,54,58,.11)!important}._1J5W9 svg{top:2px!important}._1pFPS{position:relative}._2j9Fg{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
+ var styles = {"input":"_6tLyR","disabled":"_3pFBN","dropdown":"_1J5W9","container":"_1pFPS","countryCode":"_2j9Fg"};
5
+ var stylesheet="._6tLyR input{padding-left:76px!important}._3pFBN input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3pFBN input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3pFBN input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1J5W9{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1J5W9,._1J5W9._3pFBN:hover{background-color:transparent!important}._1J5W9:hover{background-color:rgba(50,54,58,.08)!important}._1J5W9:active{background-color:rgba(50,54,58,.11)!important}._1J5W9 svg{top:2px!important}._1pFPS{position:relative}._2j9Fg{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 = "._bVxT2{display:flex}._28Qzd{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._28Qzd._2giZK{background-color:#fff}._28Qzd._2giZK._36HjH:not(._28Qzd._2giZK._1oExY),._28Qzd._3XNz7,body.keyboard-user ._28Qzd._2giZK._25s2E:not(._1CRGF){background-color:#0b6ed0}._28Qzd._3XNz7._1CRGF._1oExY,._28Qzd._3XNz7._1CRGF._25s2E,._28Qzd._3XNz7._1oExY._36HjH{opacity:.4}._uFgDl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._uFgDl:focus{z-index:1}._1Hp0V{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}._1Hp0V svg{margin-left:1px}._1Hp0V._2giZK{background-color:#0b6ed0;border-color:transparent}._1Hp0V._2giZK svg{fill:#fff!important}._1Hp0V._2giZK:not(._3Da_1):hover{background-color:#085caf!important}._1Hp0V._2giZK:not(._3Da_1):active{background-color:#0854a1!important}._1Hp0V._2giZK._3Da_1{opacity:.4}._1Hp0V._2giZK._3Da_1 svg{background-color:transparent}._1Hp0V._3XNz7{border-color:#0b6ed0;background-color:#fff}._1Hp0V._3XNz7 svg{fill:#0b6ed0!important}._1Hp0V._3XNz7:not(._3Da_1):hover{background-color:#eef5fc!important}._1Hp0V._3XNz7:not(._3Da_1):active{background-color:#e1edf9!important}._1Hp0V._3XNz7._3Da_1{opacity:.4}._1Hp0V._3XNz7._3Da_1 svg{background-color:transparent}._2671W{width:260px}";
4
- var styles = {"container":"_bVxT2","divider":"_28Qzd","primary":"_2giZK","mainButtonFocus":"_25s2E","mainButtonDisabled":"_1CRGF","dropdownButtonFocus":"_36HjH","dropdownButtonDisabled":"_1oExY","secondary":"_3XNz7","mainButton":"_uFgDl","dropdownButton":"_1Hp0V","disabled":"_3Da_1","dropdownOption":"_2671W"};
5
- var stylesheet="._bVxT2{display:flex}._28Qzd{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._28Qzd._2giZK{background-color:#fff}._28Qzd._2giZK._36HjH:not(._28Qzd._2giZK._1oExY),._28Qzd._3XNz7,body.keyboard-user ._28Qzd._2giZK._25s2E:not(._1CRGF){background-color:#0b6ed0}._28Qzd._3XNz7._1CRGF._1oExY,._28Qzd._3XNz7._1CRGF._25s2E,._28Qzd._3XNz7._1oExY._36HjH{opacity:.4}._uFgDl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._uFgDl:focus{z-index:1}._1Hp0V{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}._1Hp0V svg{margin-left:1px}._1Hp0V._2giZK{background-color:#0b6ed0;border-color:transparent}._1Hp0V._2giZK svg{fill:#fff!important}._1Hp0V._2giZK:not(._3Da_1):hover{background-color:#085caf!important}._1Hp0V._2giZK:not(._3Da_1):active{background-color:#0854a1!important}._1Hp0V._2giZK._3Da_1{opacity:.4}._1Hp0V._2giZK._3Da_1 svg{background-color:transparent}._1Hp0V._3XNz7{border-color:#0b6ed0;background-color:#fff}._1Hp0V._3XNz7 svg{fill:#0b6ed0!important}._1Hp0V._3XNz7:not(._3Da_1):hover{background-color:#eef5fc!important}._1Hp0V._3XNz7:not(._3Da_1):active{background-color:#e1edf9!important}._1Hp0V._3XNz7._3Da_1{opacity:.4}._1Hp0V._3XNz7._3Da_1 svg{background-color:transparent}._2671W{width:260px}";
3
+ var css_248z = "._YktnG{display:flex}._gbOd2{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._gbOd2._3AQxg{background-color:#fff}._gbOd2._1OuIL,._gbOd2._3AQxg._2SRG9:not(._gbOd2._3AQxg._1aMJH),body.keyboard-user ._gbOd2._3AQxg._1txGG:not(._2e7Ah){background-color:#0b6ed0}._gbOd2._1OuIL._1aMJH._2SRG9,._gbOd2._1OuIL._2e7Ah._1aMJH,._gbOd2._1OuIL._2e7Ah._1txGG{opacity:.4}._3ICIq{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._3ICIq:focus{z-index:1}._3GLZs{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}._3GLZs svg{margin-left:1px}._3GLZs._3AQxg{background-color:#0b6ed0;border-color:transparent}._3GLZs._3AQxg svg{fill:#fff!important}._3GLZs._3AQxg:not(._tI76w):hover{background-color:#085caf!important}._3GLZs._3AQxg:not(._tI76w):active{background-color:#0854a1!important}._3GLZs._3AQxg._tI76w{opacity:.4}._3GLZs._3AQxg._tI76w svg{background-color:transparent}._3GLZs._1OuIL{border-color:#0b6ed0;background-color:#fff}._3GLZs._1OuIL svg{fill:#0b6ed0!important}._3GLZs._1OuIL:not(._tI76w):hover{background-color:#eef5fc!important}._3GLZs._1OuIL:not(._tI76w):active{background-color:#e1edf9!important}._3GLZs._1OuIL._tI76w{opacity:.4}._3GLZs._1OuIL._tI76w svg{background-color:transparent}._1cBQB{width:260px}";
4
+ var styles = {"container":"_YktnG","divider":"_gbOd2","primary":"_3AQxg","mainButtonFocus":"_1txGG","mainButtonDisabled":"_2e7Ah","dropdownButtonFocus":"_2SRG9","dropdownButtonDisabled":"_1aMJH","secondary":"_1OuIL","mainButton":"_3ICIq","dropdownButton":"_3GLZs","disabled":"_tI76w","dropdownOption":"_1cBQB"};
5
+ var stylesheet="._YktnG{display:flex}._gbOd2{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._gbOd2._3AQxg{background-color:#fff}._gbOd2._1OuIL,._gbOd2._3AQxg._2SRG9:not(._gbOd2._3AQxg._1aMJH),body.keyboard-user ._gbOd2._3AQxg._1txGG:not(._2e7Ah){background-color:#0b6ed0}._gbOd2._1OuIL._1aMJH._2SRG9,._gbOd2._1OuIL._2e7Ah._1aMJH,._gbOd2._1OuIL._2e7Ah._1txGG{opacity:.4}._3ICIq{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._3ICIq:focus{z-index:1}._3GLZs{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}._3GLZs svg{margin-left:1px}._3GLZs._3AQxg{background-color:#0b6ed0;border-color:transparent}._3GLZs._3AQxg svg{fill:#fff!important}._3GLZs._3AQxg:not(._tI76w):hover{background-color:#085caf!important}._3GLZs._3AQxg:not(._tI76w):active{background-color:#0854a1!important}._3GLZs._3AQxg._tI76w{opacity:.4}._3GLZs._3AQxg._tI76w svg{background-color:transparent}._3GLZs._1OuIL{border-color:#0b6ed0;background-color:#fff}._3GLZs._1OuIL svg{fill:#0b6ed0!important}._3GLZs._1OuIL:not(._tI76w):hover{background-color:#eef5fc!important}._3GLZs._1OuIL:not(._tI76w):active{background-color:#e1edf9!important}._3GLZs._1OuIL._tI76w{opacity:.4}._3GLZs._1OuIL._tI76w svg{background-color:transparent}._1cBQB{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';
@@ -10,6 +11,7 @@ import type { InputHTMLAttributes } from 'react';
10
11
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
11
12
  import { MouseEvent as MouseEvent_2 } from 'react';
12
13
  import { MouseEventHandler } from 'react';
14
+ import { MutableRefObject } from 'react';
13
15
  import { default as React_2 } from 'react';
14
16
  import { ReactNode } from 'react';
15
17
 
@@ -199,6 +201,24 @@ export declare interface ComboboxProps {
199
201
  children: ReactNode;
200
202
  }
201
203
 
204
+ export declare const Drawer: ({ id, isOpen: externalIsOpen, onIsOpenChange, title, width, zIndex, elementRefToFocusOnClose, containerRef, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestId, children, }: DrawerProps) => React_2.ReactPortal | null;
205
+
206
+ export declare interface DrawerProps {
207
+ id?: string;
208
+ isOpen: boolean;
209
+ onIsOpenChange: (newIsOpen: boolean) => void;
210
+ title: ReactNode;
211
+ width?: CSSProperties['width'];
212
+ zIndex?: CSSProperties['zIndex'];
213
+ elementRefToFocusOnClose?: MutableRefObject<HTMLElement | null>;
214
+ containerRef?: MutableRefObject<HTMLElement | null>;
215
+ 'aria-label'?: string;
216
+ 'aria-labelledby'?: string;
217
+ 'aria-describedby'?: string;
218
+ 'data-testid'?: string;
219
+ children: ReactNode;
220
+ }
221
+
202
222
  export declare const FilterAnchor: React_2.ForwardRefExoticComponent<FilterAnchorProps & React_2.RefAttributes<HTMLButtonElement>>;
203
223
 
204
224
  export declare interface FilterAnchorProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'type' | 'disabled' | 'aria-disabled'> {
@@ -228,6 +248,45 @@ export declare interface InputProps extends InputHTMLAttributes<HTMLInputElement
228
248
  style?: CSSProperties;
229
249
  }
230
250
 
251
+ export declare const Menu: ({ "data-testid": dataTestId, isOpen, onIsOpenChange, isDisabled, children, }: MenuProps) => JSX.Element;
252
+
253
+ export declare const MenuButton: React_2.ForwardRefExoticComponent<MenuButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
254
+
255
+ export declare interface MenuButtonProps extends Omit<AllHTMLAttributes<HTMLButtonElement>, 'type'> {
256
+ asChild?: boolean;
257
+ children: React_2.ReactNode;
258
+ }
259
+
260
+ export declare const MenuItem: React_2.ForwardRefExoticComponent<MenuItemProps & React_2.RefAttributes<HTMLDivElement>>;
261
+
262
+ export declare interface MenuItemProps extends AllHTMLAttributes<HTMLDivElement> {
263
+ isDisabled?: boolean;
264
+ asChild?: boolean;
265
+ children?: React_2.ReactNode;
266
+ className?: string;
267
+ onSelect?: () => void;
268
+ label?: string;
269
+ }
270
+
271
+ export declare const MenuPane: React_2.ForwardRefExoticComponent<MenuPaneProps & React_2.RefAttributes<HTMLDivElement>>;
272
+
273
+ export declare interface MenuPaneProps extends AllHTMLAttributes<HTMLDivElement> {
274
+ placement?: ComputedPlacement;
275
+ children: React_2.ReactNode;
276
+ isSearchable?: boolean;
277
+ searchValue?: string;
278
+ onSearchValueChange?: (newValue: string) => void;
279
+ isSearchFilteringDisabled?: boolean;
280
+ }
281
+
282
+ export declare interface MenuProps {
283
+ 'data-testid'?: string;
284
+ isOpen?: boolean;
285
+ onIsOpenChange?: (shouldOpen: boolean) => void;
286
+ isDisabled?: boolean;
287
+ children: React_2.ReactNode;
288
+ }
289
+
231
290
  export declare const PhoneNumberInput: React_2.ForwardRefExoticComponent<PhoneNumberInputProps & React_2.RefAttributes<HTMLInputElement>>;
232
291
 
233
292
  export declare interface PhoneNumberInputProps {
@@ -270,4 +329,16 @@ export declare interface SplitButtonProps {
270
329
  children?: React_2.ReactNode;
271
330
  }
272
331
 
332
+ export declare const SubMenu: React_2.ForwardRefExoticComponent<SubMenuProps & React_2.RefAttributes<HTMLDivElement>>;
333
+
334
+ export declare interface SubMenuProps extends Omit<AllHTMLAttributes<HTMLDivElement>, 'label'> {
335
+ children?: React_2.ReactNode;
336
+ label?: React_2.ReactNode;
337
+ isDisabled?: boolean;
338
+ isSearchable?: boolean;
339
+ searchValue?: string;
340
+ onSearchValueChange?: (newValue: string) => void;
341
+ isSearchFilteringDisabled?: boolean;
342
+ }
343
+
273
344
  export { }
@@ -5,6 +5,8 @@ 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';
9
+ import './Drawer/index.js';
8
10
  export { AdvancedTable } from './AdvancedTable/AdvancedTable.js';
9
11
  export { default as CollapsibleSearchInput } from './CollapsibleSearchInput/CollapsibleSearchInput.js';
10
12
  export { default as Input } from './Input/Input.js';
@@ -17,6 +19,11 @@ export { default as ComboboxOption } from './Combobox/ComboboxOption.js';
17
19
  export { default as SplitButton } from './SplitButton/SplitButton.js';
18
20
  export { default as SplitButtonOption } from './SplitButton/SplitButtonOption.js';
19
21
  export { default as FilterAnchor } from './FilterAnchor/FilterAnchor.js';
22
+ export { Menu } from './Menu/Menu.js';
23
+ export { MenuButton } from './Menu/MenuButton.js';
24
+ export { MenuPane } from './Menu/MenuPane.js';
25
+ export { MenuItem } from './Menu/MenuItem.js';
26
+ export { SubMenu } from './Menu/SubMenu.js';
27
+ export { default as Drawer } from './Drawer/Drawer.js';
20
28
 
21
29
  /* eslint-disable camelcase */
22
- // export * from './Menu';