@qualtrics/ui-react 2.24.2 → 2.26.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 (162) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/__shared/cjs/{index-8f52588d.js → index-ae6df097.js} +3 -3
  3. package/dist/__shared/cjs/{index-b7a35c2e.js → index-dc6f69ac.js} +262 -256
  4. package/dist/components/Accordion/Accordion2.js +3 -3
  5. package/dist/components/Button/Button.js +3 -3
  6. package/dist/components/Button/Button2.js +1 -1
  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 +1 -1
  11. package/dist/components/ColorPicker/ColorPicker2.js +3 -3
  12. package/dist/components/ColorPicker/Hue.js +1 -1
  13. package/dist/components/ColorPicker/Palette.js +1 -1
  14. package/dist/components/ColorPicker/Saturation.js +1 -1
  15. package/dist/components/Combobox/Combobox.js +3 -3
  16. package/dist/components/Combobox/Combobox2.js +3 -3
  17. package/dist/components/Combobox/ComboboxIcon.js +1 -1
  18. package/dist/components/Combobox/ComboboxInput.js +1 -1
  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 +4 -4
  22. package/dist/components/Dropdown/Dropdown2.js +3 -3
  23. package/dist/components/Dropdown/DropdownButton.js +6 -6
  24. package/dist/components/Dropdown/DropdownList.js +1 -1
  25. package/dist/components/Dropdown/DropdownOption.js +2 -2
  26. package/dist/components/Dropdown/DropdownSearch.js +2 -2
  27. package/dist/components/FilePicker/FilePicker.js +2 -2
  28. package/dist/components/FilePicker/FilePicker2.js +3 -3
  29. package/dist/components/FormField/Caption.js +3 -3
  30. package/dist/components/FormField/FormField2.js +3 -3
  31. package/dist/components/FormField/FormFieldContext.js +3 -3
  32. package/dist/components/FullScreenTakeover/FullScreenTakeover.js +2 -2
  33. package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
  34. package/dist/components/IconButton/IconButton2.js +3 -3
  35. package/dist/components/InlineInput/InlineInput.js +7 -7
  36. package/dist/components/InlineInput/InlineInput2.js +3 -3
  37. package/dist/components/Input/Input2.js +3 -3
  38. package/dist/components/Input/InputField.js +2 -2
  39. package/dist/components/InputGroup/InputGroup2.js +3 -3
  40. package/dist/components/Label/Label2.js +3 -3
  41. package/dist/components/Link/Link2.js +3 -3
  42. package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
  43. package/dist/components/LogicEditor/LogicEditor.js +1 -1
  44. package/dist/components/LogicEditor/LogicEditor2.js +3 -3
  45. package/dist/components/Modal/Modal.js +6 -6
  46. package/dist/components/Modal/Modal2.js +3 -3
  47. package/dist/components/NewMenu/BaseMenu.js +3 -3
  48. package/dist/components/NewMenu/NewMenu.js +3 -3
  49. package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
  50. package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +3 -3
  51. package/dist/components/NumberStepper/NumberStepper.js +2 -2
  52. package/dist/components/NumberStepper/NumberStepper2.js +3 -3
  53. package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
  54. package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
  55. package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
  56. package/dist/components/PageLayout/PageLayout.js +3 -3
  57. package/dist/components/Pagination/Pagination.js +1 -1
  58. package/dist/components/Pagination/Pagination2.js +3 -3
  59. package/dist/components/Pagination/PaginationNextButton.js +3 -3
  60. package/dist/components/Pagination/PaginationPageInput.js +8 -8
  61. package/dist/components/Pagination/PaginationPreviousButton.js +3 -3
  62. package/dist/components/Popover/Popover.js +5 -5
  63. package/dist/components/Popover/Popover2.js +3 -3
  64. package/dist/components/QuickSearch/QuickSearch2.js +3 -3
  65. package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
  66. package/dist/components/Radio/Radio2.js +3 -3
  67. package/dist/components/SearchInput/SearchInput.js +2 -2
  68. package/dist/components/SearchInput/SearchInput2.js +3 -3
  69. package/dist/components/SidebarNav/SidebarNav.js +1 -1
  70. package/dist/components/SidebarNav/SidebarNav2.js +3 -3
  71. package/dist/components/Slider/Slider2.js +3 -3
  72. package/dist/components/Switch/Switch2.js +3 -3
  73. package/dist/components/Table/Table2.js +3 -3
  74. package/dist/components/Tabs/Tabs2.js +3 -3
  75. package/dist/components/Tooltip/Tooltip2.js +3 -3
  76. package/dist/components/deprecated_ColorPicker/Alpha.js +2 -2
  77. package/dist/components/deprecated_ColorPicker/ColorPicker.js +1 -1
  78. package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
  79. package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
  80. package/dist/components/deprecated_ColorPicker/Hue.js +2 -2
  81. package/dist/components/deprecated_ColorPicker/Saturation.js +2 -2
  82. package/dist/components/deprecated_ColorPicker/Swatch.js +1 -1
  83. package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
  84. package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +1 -1
  85. package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +1 -1
  86. package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +3 -3
  87. package/dist/components/deprecated_Tabs/Tabs.js +3 -3
  88. package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
  89. package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
  90. package/dist/components/deprecated_Toolbar/ToolbarPanels.js +1 -1
  91. package/dist/components/deprecated_Toolbar/ToolbarTab.js +5 -5
  92. package/dist/components/deprecated_Toolbar/ToolbarTabs.js +3 -3
  93. package/dist/hooks/useControllableState/useControllableState.js +1 -1
  94. package/dist/hooks/useOverlay/useOverlay.js +3 -3
  95. package/dist/hooks/useOverlay/useOverlay2.js +3 -3
  96. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +1 -1
  97. package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
  98. package/dist/icons/Icon.js +3 -3
  99. package/dist/icons/index.js +1 -1
  100. package/dist/index.d.ts +15 -7
  101. package/dist/index.es.js +2 -1
  102. package/dist/index.js +4 -3
  103. package/dist/next/AdvancedTable/AdvancedTable.js +8 -6
  104. package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
  105. package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -4
  106. package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +6 -3
  107. package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +3 -3
  108. package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +2 -2
  109. package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
  110. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +3 -3
  111. package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
  112. package/dist/next/Combobox/Combobox.js +2 -0
  113. package/dist/next/Combobox/Combobox2.js +3 -3
  114. package/dist/next/Combobox/ComboboxInput.js +2 -0
  115. package/dist/next/Combobox/ComboboxOption.js +2 -0
  116. package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +1 -1
  117. package/dist/next/Drawer/Drawer.js +2 -2
  118. package/dist/next/Drawer/Drawer2.js +3 -3
  119. package/dist/next/FilterAnchor/FilterAnchor.js +2 -2
  120. package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
  121. package/dist/next/Input/Input2.js +3 -3
  122. package/dist/next/Menu/{useCSSVariable.js → Hooks/useCSSVariable.js} +1 -1
  123. package/dist/next/Menu/Hooks/useFocusVirtualBoundary.js +41 -0
  124. package/dist/next/Menu/Hooks/useIsVirtualized.js +8 -0
  125. package/dist/next/Menu/Hooks/useMaskDimensions.js +59 -0
  126. package/dist/next/Menu/{useMutationObserver.js → Hooks/useMutationObserver.js} +1 -1
  127. package/dist/next/Menu/{usePaneSearch.js → Hooks/usePaneSearch.js} +76 -34
  128. package/dist/next/Menu/Menu.js +22 -24
  129. package/dist/next/Menu/Menu2.js +3 -3
  130. package/dist/next/Menu/MenuButton.js +5 -2
  131. package/dist/next/Menu/MenuContext.js +5 -1
  132. package/dist/next/Menu/MenuItem.js +38 -16
  133. package/dist/next/Menu/MenuPane.js +90 -55
  134. package/dist/next/Menu/PaneChildren.js +47 -0
  135. package/dist/next/Menu/SubMenu.js +95 -49
  136. package/dist/next/PhoneNumberInput/PhoneNumberInput.js +1 -1
  137. package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
  138. package/dist/next/Select/Select.js +118 -0
  139. package/dist/next/Select/Select2.js +8 -0
  140. package/dist/next/Select/SelectButton.js +46 -0
  141. package/dist/next/Select/SelectContext.js +16 -0
  142. package/dist/next/Select/SelectItem.js +46 -0
  143. package/dist/next/Select/SelectPane.js +43 -0
  144. package/dist/next/Select/SelectedItems.js +45 -0
  145. package/dist/next/Select/SubSelect.js +90 -0
  146. package/dist/next/Select/constants.js +13 -0
  147. package/dist/next/Select/index.js +5 -0
  148. package/dist/next/SplitButton/SplitButton2.js +3 -3
  149. package/dist/next/TimePicker/TimePicker2.js +3 -3
  150. package/dist/next/TimePicker/TimePickerIcon.js +1 -1
  151. package/dist/next/ToggleButton/styles.js +3 -3
  152. package/dist/next/index.d.ts +68 -6
  153. package/dist/next/index.es.js +6 -0
  154. package/dist/next/index.js +1009 -372
  155. package/dist/translations-en.js +7 -1
  156. package/dist/utils/Flyout/Flyout2.js +3 -3
  157. package/dist/utils/Popper/Popper.js +2 -2
  158. package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
  159. package/dist/utils/wrapEvent/wrapEvent.js +1 -1
  160. package/icons/package.json +2 -0
  161. package/next/package.json +3 -1
  162. package/package.json +6 -3
@@ -1,25 +1,33 @@
1
1
  import _extends from '@babel/runtime-corejs3/helpers/extends';
2
2
  import React__default, { useState, useRef, useMemo } from 'react';
3
3
  import { Portal, Content } from '@radix-ui/react-dropdown-menu';
4
+ import { useFocusVisible } from '@react-aria/interactions';
4
5
  import classNames from 'classnames';
5
6
  import styles from './Menu2.js';
6
7
  import { usePortalTarget } from '../../components/UIProvider/PortalTargetContext.js';
7
8
  import { useMenuContext, PaneContextProvider } from './MenuContext.js';
8
9
  import '../../utils/index.js';
9
- import { DATA_TESTID_SUFFIXES } from './constants.js';
10
+ import { DATA_TESTID_SUFFIXES as DATA_TESTID_SUFFIXES$1 } from './constants.js';
11
+ import { DATA_TESTID_SUFFIXES } from '../Select/constants.js';
10
12
  import MenuSearch from './MenuSearch.js';
11
- import usePaneSearch from './usePaneSearch.js';
13
+ import usePaneSearch from './Hooks/usePaneSearch.js';
12
14
  import '../../hooks/index.js';
13
- import useMutationObserver from './useMutationObserver.js';
15
+ import useMutationObserver from './Hooks/useMutationObserver.js';
14
16
  import useOverlay from '../../hooks/useOverlay/useOverlay.js';
15
- import useCSSVariable from './useCSSVariable.js';
16
- import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
17
+ import useCSSVariable from './Hooks/useCSSVariable.js';
18
+ import useSelectContext from '../Select/SelectContext.js';
19
+ import SelectedItems from '../Select/SelectedItems.js';
20
+ import PaneChildren from './PaneChildren.js';
21
+ import useFocusVirtualBoundary from './Hooks/useFocusVirtualBoundary.js';
22
+ import useIsVirtualized from './Hooks/useIsVirtualized.js';
23
+ import useMaskDimensions from './Hooks/useMaskDimensions.js';
17
24
  import useId from '../../hooks/useId/useId.js';
25
+ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
18
26
  import { useDidUpdate } from '../../hooks/useDidUpdate/useDidUpdate.js';
19
27
  import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
20
28
 
21
29
  const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
22
- var _flyoutRef$current$pa, _flyoutRef$current2, _flyoutRef$current3;
30
+ var _flyoutRef$current$pa, _flyoutRef$current, _flyoutRef$current2;
23
31
  let {
24
32
  placement,
25
33
  children,
@@ -28,67 +36,77 @@ const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
28
36
  onSearchValueChange,
29
37
  isSearchFilteringDisabled = false,
30
38
  className,
31
- style,
32
39
  zIndex = 1000,
33
40
  ...rest
34
41
  } = _ref;
35
42
  const [items, setItems] = useState([]);
36
43
  const flyoutRef = useRef(null);
37
44
  const stickyBoxRef = useRef(null);
45
+ const selectContext = useSelectContext(true);
46
+ const withinSelect = selectContext !== null;
47
+ const {
48
+ multiselect,
49
+ showSelectedItemsPane
50
+ } = selectContext !== null && selectContext !== void 0 ? selectContext : {};
38
51
  const portalTarget = usePortalTarget();
39
52
  const [side, align] = useMemo(() => {
40
53
  var _placement$split, _placement$split2;
41
54
  return (_placement$split = placement === null || placement === void 0 || (_placement$split2 = placement.split) === null || _placement$split2 === void 0 ? void 0 : _placement$split2.call(placement, '-')) !== null && _placement$split !== void 0 ? _placement$split : [];
42
55
  }, [placement]);
56
+ const thisPanesDepth = 1;
57
+ const paneMaxHeight = 350;
58
+ const paneBottomPadding = 4;
59
+ const maskContainerId = useId();
60
+ const [transform, setTransform] = useState('');
61
+ const target = (_flyoutRef$current$pa = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.parentNode) !== null && _flyoutRef$current$pa !== void 0 ? _flyoutRef$current$pa : undefined;
43
62
  const {
44
63
  dataTestId: rootDataTestId,
45
64
  openPaneDepth,
46
- setMaskHeight,
47
65
  maskHeight,
48
66
  open,
49
67
  triggerRef,
50
- searchBarConfigs
68
+ searchBarConfigs,
69
+ maskWidth,
70
+ isVirtualizationDisabled
51
71
  } = useMenuContext();
52
- const thisPanesDepth = 1;
53
- const maskContainerId = 'maskContainer';
54
- useOverlay({
55
- isVisible: open,
56
- ignoreIds: [maskContainerId],
57
- opacity: 0
58
- });
72
+ const isVirtualized = useIsVirtualized(children, isVirtualizationDisabled);
59
73
  const animatedLeft = useMemo(() => openPaneDepth > thisPanesDepth, [openPaneDepth]);
60
- const dataTestId = getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_PANE);
74
+ const dataTestId = getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE);
61
75
  const {
62
- internalSearchValue,
63
76
  noSearchResultsNode,
64
- onInteractOutside
65
- } = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, false, dataTestId, useId(), flyoutRef);
66
-
67
- // In order to preseve the css animation for vertical resizing, we cannot set the height of this pane to `auto`. It must be a pixel value.
68
- // We cache the pixel value here, to use it later if the user returns to this pane from a submenu.
69
- const initialHeightOfThisPane = useRef(null);
77
+ onInteractOutside,
78
+ filteredChildren
79
+ } = usePaneSearch({
80
+ isSearchable,
81
+ externalSearchValue,
82
+ onSearchValueChange,
83
+ items,
84
+ animatedLeft,
85
+ animatedRight: false,
86
+ menuParentDataTestId: dataTestId,
87
+ id: useId(),
88
+ flyoutRef,
89
+ children,
90
+ isSearchFilteringDisabled,
91
+ isVirtualized
92
+ });
93
+ const focusVirtualBoundary = useFocusVirtualBoundary(items);
94
+ const {
95
+ isFocusVisible
96
+ } = useFocusVisible();
97
+ const maskIsReady = useMaskDimensions(flyoutRef.current, animatedLeft, thisPanesDepth, children);
70
98
  useDidUpdate(() => {
71
- if (openPaneDepth === thisPanesDepth) {
72
- if (initialHeightOfThisPane.current === null) {
73
- window.requestAnimationFrame(() => {
74
- var _flyoutRef$current$cl, _flyoutRef$current;
75
- initialHeightOfThisPane.current = (_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null;
76
- setMaskHeight(initialHeightOfThisPane.current);
77
- });
78
- } else {
79
- setMaskHeight(initialHeightOfThisPane.current);
80
- }
99
+ if (maskIsReady && isFocusVisible) {
100
+ items[0].element.current.focus();
81
101
  }
82
- }, [openPaneDepth]);
102
+ }, [maskIsReady]);
83
103
  const defaultSide = useMemo(() => {
84
104
  var _triggerRef$current;
85
105
  const rect = triggerRef === null || triggerRef === void 0 || (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getBoundingClientRect();
86
106
  if (!rect) {
87
107
  return 'bottom';
88
108
  }
89
-
90
- // hard coded in Menu.less
91
- let maxHeight = 350;
109
+ let maxHeight = paneMaxHeight;
92
110
  if (flyoutRef.current) {
93
111
  const computedString = window.getComputedStyle(flyoutRef.current).maxHeight.slice(0, -2);
94
112
  if (computedString !== '' && !Number.isNaN(+computedString)) {
@@ -104,9 +122,23 @@ const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
104
122
  return 'top';
105
123
  }
106
124
  return 'bottom';
107
- }, [open, triggerRef]);
108
- const [transform, setTransform] = useState('');
109
- const target = (_flyoutRef$current$pa = (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.parentNode) !== null && _flyoutRef$current$pa !== void 0 ? _flyoutRef$current$pa : undefined;
125
+ },
126
+ // including `open` because the trigger location may change between openings
127
+ // eslint-disable-next-line react-hooks/exhaustive-deps
128
+ [open, triggerRef]);
129
+
130
+ // We use the top-level Radix container as a mask. Radix does not expose this container to consumers, except through CSS.
131
+ // These hooks dynamically update the style of that container using CSS variables.
132
+ useCSSVariable('--mask-z-index', String(zIndex), [open]);
133
+ useCSSVariable('--mask-width', "".concat(maskWidth, "px"));
134
+ useCSSVariable('--mask-height', "".concat(maskHeight, "px"));
135
+ useCSSVariable('--flyout-max-height', "".concat(paneMaxHeight, "px"));
136
+ useCSSVariable('--flyout-bottom-padding', "".concat(paneBottomPadding, "px"));
137
+ useOverlay({
138
+ isVisible: open,
139
+ ignoreIds: [maskContainerId],
140
+ opacity: 0
141
+ });
110
142
  useMutationObserver(target, {
111
143
  attributes: true,
112
144
  attributeFilter: ['style']
@@ -114,24 +146,29 @@ const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
114
146
  var _style$transform, _style;
115
147
  return setTransform((_style$transform = target === null || target === void 0 || (_style = target.style) === null || _style === void 0 ? void 0 : _style.transform) !== null && _style$transform !== void 0 ? _style$transform : '');
116
148
  });
117
- useCSSVariable('--mask-z-index', String(zIndex), [open]);
118
149
  return /*#__PURE__*/React__default.createElement(PaneContextProvider, {
119
150
  items: items,
120
151
  setItems: setItems,
121
152
  value: {
122
153
  dataTestId,
123
- searchValue: internalSearchValue,
124
- isSearchFilteringDisabled,
125
154
  isInteractive: !animatedLeft,
126
155
  flyoutRef,
127
156
  stickyBoxRef,
128
- zIndex
157
+ zIndex,
158
+ focusVirtualBoundary,
159
+ isVirtualized,
160
+ maskIsReady
129
161
  }
130
162
  }, /*#__PURE__*/React__default.createElement(Portal, {
131
163
  container: portalTarget || undefined
132
164
  }, /*#__PURE__*/React__default.createElement("div", {
133
165
  className: styles.maskContainer,
134
- id: maskContainerId
166
+ id: maskContainerId,
167
+ style: {
168
+ // virtuoso and radix both do funny things with window.requestAnimationFrame that cause unpredictable resizing.
169
+ // this causes jitters. We need to wait until it's done resizing.
170
+ opacity: maskIsReady ? 1 : 0
171
+ }
135
172
  }, /*#__PURE__*/React__default.createElement(Content, _extends({}, rest, {
136
173
  onCloseAutoFocus: () => {
137
174
  var _triggerRef$current2;
@@ -146,23 +183,21 @@ const MenuPane = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
146
183
  className: classNames(className, {
147
184
  [styles.animatedLeft]: animatedLeft
148
185
  }, styles.flyout),
149
- onInteractOutside: onInteractOutside,
150
- style: {
151
- ...style,
152
- height: internalSearchValue && openPaneDepth === thisPanesDepth ? undefined : maskHeight !== null && maskHeight !== void 0 ? maskHeight : undefined
153
- }
154
- }), isSearchable && /*#__PURE__*/React__default.createElement("div", {
155
- className: classNames(styles.stickyBox, styles.isSearchable),
186
+ onInteractOutside: onInteractOutside
187
+ }), (isSearchable || multiselect && showSelectedItemsPane) && /*#__PURE__*/React__default.createElement("div", {
188
+ className: classNames(styles.stickyBox, {
189
+ [styles.isSearchable]: isSearchable
190
+ }),
156
191
  ref: stickyBoxRef,
157
192
  style: {
158
193
  zIndex
159
194
  }
160
- }), noSearchResultsNode, children), /*#__PURE__*/React__default.createElement("div", {
195
+ }, showSelectedItemsPane && multiselect && /*#__PURE__*/React__default.createElement(SelectedItems, null)), noSearchResultsNode, /*#__PURE__*/React__default.createElement(PaneChildren, null, filteredChildren)), /*#__PURE__*/React__default.createElement("div", {
161
196
  className: styles.searchBoxesContainer,
162
197
  style: {
163
198
  transform,
164
199
  zIndex: zIndex + openPaneDepth,
165
- width: (_flyoutRef$current3 = flyoutRef.current) === null || _flyoutRef$current3 === void 0 ? void 0 : _flyoutRef$current3.clientWidth
200
+ width: (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.clientWidth
166
201
  }
167
202
  }, searchBarConfigs.length ? searchBarConfigs.map(_ref2 => {
168
203
  let {
@@ -0,0 +1,47 @@
1
+ import React__default, { useRef } from 'react';
2
+ import { Virtuoso } from 'react-virtuoso';
3
+ import { useMenuContext, usePaneContext, ItemContextProvider } from './MenuContext.js';
4
+ import styles from './Menu2.js';
5
+ import useSelectContext from '../Select/SelectContext.js';
6
+
7
+ const PaneChildren = _ref => {
8
+ var _useSelectContext, _containerRef$current, _containerRef$current2;
9
+ let {
10
+ children
11
+ } = _ref;
12
+ const {
13
+ virtuoso
14
+ } = useMenuContext();
15
+ const {
16
+ multiselect,
17
+ showSelectedItemsPane
18
+ } = (_useSelectContext = useSelectContext(true)) !== null && _useSelectContext !== void 0 ? _useSelectContext : {};
19
+ const {
20
+ closeSubmenu: containedWithinSubpane,
21
+ isVirtualized
22
+ } = usePaneContext();
23
+ const containerRef = useRef(null);
24
+ return /*#__PURE__*/React__default.createElement("div", {
25
+ ref: containerRef,
26
+ className: styles.scrollContainer,
27
+ style: {
28
+ maxHeight: "calc(var(--flyout-max-height) -\n ".concat((_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 ? void 0 : _containerRef$current.offsetTop, "px -\n var(--flyout-bottom-padding))")
29
+ }
30
+ }, isVirtualized ? /*#__PURE__*/React__default.createElement(Virtuoso, {
31
+ ref: virtuoso,
32
+ increaseViewportBy: 250,
33
+ customScrollParent: (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : undefined,
34
+ data: Array.isArray(children) ? children : [children],
35
+ itemContent: (index, child) => ! /*#__PURE__*/React__default.isValidElement(child) ? null : /*#__PURE__*/React__default.createElement(ItemContextProvider, {
36
+ value: {
37
+ virtualIndex: index + (multiselect && showSelectedItemsPane && !containedWithinSubpane ? 1 : 0)
38
+ }
39
+ }, child)
40
+ }) : /*#__PURE__*/React__default.createElement(ItemContextProvider, {
41
+ value: {
42
+ virtualIndex: undefined
43
+ }
44
+ }, children));
45
+ };
46
+
47
+ export { PaneChildren as default };
@@ -5,11 +5,19 @@ import classNames from 'classnames';
5
5
  import { useFocusVisible } from '@react-aria/interactions';
6
6
  import styles from './Menu2.js';
7
7
  import '../../icons/index.es.js';
8
- import { usePaneContext, useMenuContext, PaneContextProvider } from './MenuContext.js';
8
+ import { useItemContext, usePaneContext, useMenuContext, PaneContextProvider } from './MenuContext.js';
9
9
  import '../../utils/index.js';
10
- import { DATA_TESTID_SUFFIXES, KEYS } from './constants.js';
10
+ import { DATA_TESTID_SUFFIXES as DATA_TESTID_SUFFIXES$1, KEYS as KEYS$1 } from './constants.js';
11
+ import { DATA_TESTID_SUFFIXES, KEYS } from '../Select/constants.js';
11
12
  import '../../hooks/index.js';
12
- import usePaneSearch from './usePaneSearch.js';
13
+ import usePaneSearch from './Hooks/usePaneSearch.js';
14
+ import useSelectContext from '../Select/SelectContext.js';
15
+ import AdvancedTableCheckbox from '../AdvancedTable/AdvancedTableCheckbox.js';
16
+ import styles$1 from '../Select/Select2.js';
17
+ import PaneChildren from './PaneChildren.js';
18
+ import useFocusVirtualBoundary from './Hooks/useFocusVirtualBoundary.js';
19
+ import useIsVirtualized from './Hooks/useIsVirtualized.js';
20
+ import useMaskDimensions from './Hooks/useMaskDimensions.js';
13
21
  import useId from '../../hooks/useId/useId.js';
14
22
  import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
15
23
  import { useDidUpdate } from '../../hooks/useDidUpdate/useDidUpdate.js';
@@ -31,6 +39,19 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
31
39
  onIsOpenChange,
32
40
  ...rest
33
41
  } = _ref;
42
+ const selectContext = useSelectContext(true);
43
+ const withinSelect = selectContext !== null;
44
+ const {
45
+ subSelectTriggerProps,
46
+ multiselect,
47
+ subSelectPaneProps,
48
+ isSelectedItems,
49
+ triggerCheckedState = 'false',
50
+ onTriggerCheckboxSelect
51
+ } = selectContext !== null && selectContext !== void 0 ? selectContext : {};
52
+ const {
53
+ virtualIndex
54
+ } = useItemContext();
34
55
  const [items, setItems] = useState([]);
35
56
  const internalId = useId();
36
57
  const triggerRef = useRef(null);
@@ -39,17 +60,18 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
39
60
  const backButtonRef = useRef(null);
40
61
  const {
41
62
  dataTestId: paneContainingTriggerDataTestId,
42
- childIndex: triggerIndex,
43
- searchValue: paneContainingTriggerSearchValue,
44
- isSearchFilteringDisabled: isSearchFilteringDisabledForPaneContainingTrigger,
63
+ childIndex,
45
64
  isInteractive: paneContainingTriggerIsInteractive,
46
65
  closeSubmenu: closeSubmenuContainingTrigger,
47
- zIndex: paneContainingTriggerZIndex
66
+ zIndex: paneContainingTriggerZIndex,
67
+ focusVirtualBoundary: focusVirtualBoundaryWithinPaneContainingTrigger,
68
+ isVirtualized: paneContainingTriggerIsVirtualized
48
69
  } = usePaneContext(triggerRef);
70
+ const triggerIndex = useMemo(() => virtualIndex !== null && virtualIndex !== void 0 ? virtualIndex : childIndex, [childIndex, virtualIndex]);
49
71
  const {
50
72
  openPaneDepth: totalOpenPaneDepth,
51
73
  registerSubmenu,
52
- setMaskHeight
74
+ isVirtualizationDisabled
53
75
  } = useMenuContext();
54
76
  const {
55
77
  isFocusVisible
@@ -60,21 +82,37 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
60
82
  const [isFrameAfterPaneAddedToDOM, setIsFrameAfterPaneAddedToDOM] = useState(false);
61
83
  const [isTransitioningFromRight, setIsTransitioningFromRight] = useState(false);
62
84
  const animatedLeft = useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth, thisPanesDepth]);
63
- const animatedRight = useMemo(() => thisPanesDepth > totalOpenPaneDepth || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth]);
85
+ const animatedRight = useMemo(() => thisPanesDepth > totalOpenPaneDepth || thisPanesDepth === totalOpenPaneDepth && !isPaneInDOM || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth, isPaneInDOM]);
64
86
  const paneDataTestId = getSubDataTestId(paneContainingTriggerDataTestId, String(triggerIndex));
65
87
  const closeThisSubmenu = e => {
66
88
  // prevent closing the entire menu, and Radix keyboard navigation
67
89
  e.preventDefault();
68
90
  registerSubmenu(internalId, false);
69
91
  };
92
+ const isVirtualized = useIsVirtualized(children, isVirtualizationDisabled);
70
93
  const {
71
- internalSearchValue,
72
94
  noSearchResultsNode,
73
- onInteractOutside
74
- } = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, paneDataTestId, internalId, flyoutRef, backButtonRef, closeThisSubmenu);
75
- const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_BACK);
76
- const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
77
- const triggerIsVisible = useMemo(() => isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && label.toLowerCase().includes(paneContainingTriggerSearchValue.toLowerCase()), [paneContainingTriggerSearchValue, label, isSearchFilteringDisabledForPaneContainingTrigger]);
95
+ onInteractOutside,
96
+ filteredChildren
97
+ } = usePaneSearch({
98
+ isSearchable,
99
+ externalSearchValue,
100
+ onSearchValueChange,
101
+ items,
102
+ animatedLeft,
103
+ animatedRight,
104
+ menuParentDataTestId: paneDataTestId,
105
+ id: internalId,
106
+ flyoutRef,
107
+ children,
108
+ isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
109
+ backButtonRef,
110
+ closeSubmenu: closeThisSubmenu,
111
+ isVirtualized
112
+ });
113
+ const focusVirtualBoundaryInPane = useFocusVirtualBoundary(items, backButtonRef);
114
+ const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_BACK : DATA_TESTID_SUFFIXES$1.MENU_BACK);
115
+ const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_ITEM : DATA_TESTID_SUFFIXES$1.MENU_ITEM);
78
116
  useDidUpdate(() => {
79
117
  if (isPaneInDOM) {
80
118
  setIsTransitioningFromRight(true);
@@ -83,30 +121,15 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
83
121
  window.requestAnimationFrame(() => setIsFrameAfterPaneAddedToDOM(false));
84
122
  }
85
123
  registerSubmenu(internalId, isPaneInDOM);
86
- onIsOpenChange === null || onIsOpenChange === void 0 ? void 0 : onIsOpenChange(isPaneInDOM);
124
+ onIsOpenChange === null || onIsOpenChange === void 0 || onIsOpenChange(isPaneInDOM);
87
125
  }, [isPaneInDOM]);
88
126
 
89
127
  // Omitted dependencies because this should only run on unmount
90
128
  // eslint-disable-next-line react-hooks/exhaustive-deps
91
129
  useEffect(() => () => registerSubmenu(internalId, false), []);
92
- useDidUpdate(() => {
93
- if (thisPanesDepth === totalOpenPaneDepth) {
94
- var _flyoutRef$current$cl, _flyoutRef$current;
95
- setMaskHeight((_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null);
96
- }
97
- },
98
- // ignoring other dependencies because this should only run when the children change
99
- [children]);
100
- useDidUpdate(() => {
101
- if (thisPanesDepth === totalOpenPaneDepth) {
102
- window.requestAnimationFrame(() => {
103
- var _flyoutRef$current$cl2, _flyoutRef$current2;
104
- setMaskHeight((_flyoutRef$current$cl2 = (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.clientHeight) !== null && _flyoutRef$current$cl2 !== void 0 ? _flyoutRef$current$cl2 : null);
105
- });
106
- }
107
- }, [totalOpenPaneDepth, internalSearchValue]);
130
+ useMaskDimensions(flyoutRef.current, animatedLeft, thisPanesDepth, children);
108
131
  const handlePaneTransitionEnd = () => {
109
- var _flyoutRef$current3;
132
+ var _flyoutRef$current;
110
133
  if (animatedLeft) {
111
134
  return;
112
135
  }
@@ -114,13 +137,13 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
114
137
  setIsPaneInDOM(false);
115
138
  if (isFocusVisible) {
116
139
  var _triggerRef$current;
117
- (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
140
+ (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
118
141
  }
119
142
  return;
120
143
  }
121
144
 
122
145
  // if the newly closed submenu doesn't place the focus on its trigger due to mouse events
123
- if (!((_flyoutRef$current3 = flyoutRef.current) !== null && _flyoutRef$current3 !== void 0 && _flyoutRef$current3.contains(document.activeElement)) && isFocusVisible) {
146
+ if (!((_flyoutRef$current = flyoutRef.current) !== null && _flyoutRef$current !== void 0 && _flyoutRef$current.contains(document.activeElement)) && isFocusVisible) {
124
147
  if (triggerRef.current && paneContainingTriggerIsInteractive) {
125
148
  triggerRef.current.focus();
126
149
  } else if (backButtonRef.current) {
@@ -129,11 +152,12 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
129
152
  }
130
153
  setIsTransitioningFromRight(false);
131
154
  };
132
- return triggerIsVisible ? /*#__PURE__*/React__default.createElement(Sub, {
155
+ return /*#__PURE__*/React__default.createElement(Sub, {
133
156
  open: isPaneInDOM
134
- }, /*#__PURE__*/React__default.createElement(SubTrigger, {
157
+ }, /*#__PURE__*/React__default.createElement(SubTrigger, _extends({
135
158
  className: classNames(styles.menuItem, styles.subMenu, {
136
- [styles.unresponsive]: !paneContainingTriggerIsInteractive
159
+ [styles.unresponsive]: !paneContainingTriggerIsInteractive,
160
+ [styles$1.selectedItem]: triggerCheckedState === 'true' && !isSelectedItems
137
161
  }),
138
162
  "data-testid": triggerDataTestId,
139
163
  "aria-disabled": isDisabled,
@@ -144,26 +168,41 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
144
168
  e.preventDefault();
145
169
  return;
146
170
  }
147
- if (!isDisabled && KEYS.OPEN_SUBMENU.includes(e.key)) {
171
+ if (multiselect && !isSelectedItems && KEYS.CHECK_PARENT.includes(e.key)) {
172
+ onTriggerCheckboxSelect === null || onTriggerCheckboxSelect === void 0 || onTriggerCheckboxSelect();
173
+ return;
174
+ }
175
+ if (!isDisabled && KEYS$1.OPEN_SUBMENU.includes(e.key)) {
148
176
  setIsPaneInDOM(true);
149
- } else if (KEYS.CLOSE_SUBMENU.includes(e.key)) {
150
- closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 ? void 0 : closeSubmenuContainingTrigger(e);
177
+ } else if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
178
+ closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 || closeSubmenuContainingTrigger(e);
179
+ } else if (paneContainingTriggerIsVirtualized && KEYS$1.NAVIGATE_TOP.includes(e.key)) {
180
+ e.preventDefault();
181
+ focusVirtualBoundaryWithinPaneContainingTrigger('top');
182
+ } else if (paneContainingTriggerIsVirtualized && KEYS$1.NAVIIGATE_BOTTOM.includes(e.key)) {
183
+ e.preventDefault();
184
+ focusVirtualBoundaryWithinPaneContainingTrigger('bottom');
151
185
  }
152
186
  }
153
- }, label, /*#__PURE__*/React__default.createElement(ChevronRightIcon, {
187
+ }, subSelectTriggerProps), multiselect && !isSelectedItems ? /*#__PURE__*/React__default.createElement(AdvancedTableCheckbox, {
188
+ state: triggerCheckedState,
189
+ className: styles$1.checkbox,
190
+ onClick: onTriggerCheckboxSelect,
191
+ isDisabled: isDisabled
192
+ }) : null, label, /*#__PURE__*/React__default.createElement(ChevronRightIcon, {
154
193
  className: styles.rightIcon
155
194
  })), /*#__PURE__*/React__default.createElement(PaneContextProvider, {
156
195
  items: items,
157
196
  setItems: setItems,
158
197
  value: {
159
198
  dataTestId: paneDataTestId,
160
- searchValue: internalSearchValue,
161
- isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
162
199
  isInteractive: !isTransitioningFromRight && !animatedLeft && !animatedRight,
163
200
  closeSubmenu: closeThisSubmenu,
164
201
  flyoutRef,
165
202
  stickyBoxRef,
166
- zIndex
203
+ zIndex,
204
+ focusVirtualBoundary: focusVirtualBoundaryInPane,
205
+ isVirtualized
167
206
  }
168
207
  }, /*#__PURE__*/React__default.createElement(SubContent, _extends({}, rest, {
169
208
  loop: !isSearchable,
@@ -179,7 +218,7 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
179
218
  ...style,
180
219
  zIndex
181
220
  }
182
- }), /*#__PURE__*/React__default.createElement("div", {
221
+ }, subSelectPaneProps), /*#__PURE__*/React__default.createElement("div", {
183
222
  className: classNames(styles.stickyBox, {
184
223
  [styles.isSearchable]: isSearchable
185
224
  }),
@@ -195,14 +234,21 @@ const SubMenu = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
195
234
  onSelect: closeThisSubmenu,
196
235
  ref: backButtonRef,
197
236
  onKeyDown: e => {
198
- if (KEYS.CLOSE_SUBMENU.includes(e.key)) {
237
+ if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
199
238
  closeThisSubmenu(e);
239
+ } else if (isVirtualized && KEYS$1.NAVIGATE_TOP.includes(e.key)) {
240
+ e.preventDefault();
241
+ focusVirtualBoundaryInPane('top');
242
+ } else if (isVirtualized && KEYS$1.NAVIIGATE_BOTTOM.includes(e.key)) {
243
+ e.preventDefault();
244
+ focusVirtualBoundaryInPane('bottom');
200
245
  }
201
246
  }
202
247
  }, /*#__PURE__*/React__default.createElement(ArrowLeftIcon, {
203
248
  size: "small",
204
249
  className: styles.backIcon
205
- }), label)), noSearchResultsNode, children))) : null;
250
+ }), label)), noSearchResultsNode, /*#__PURE__*/React__default.createElement(PaneChildren, null, filteredChildren))));
206
251
  });
252
+ var SubMenu$1 = SubMenu;
207
253
 
208
- export { SubMenu as default };
254
+ export { SubMenu$1 as default };
@@ -67,7 +67,7 @@ const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
67
67
  } catch (e) {
68
68
  // `parsePhoneNumber` throws an error if the inputs are invalid.
69
69
  }
70
- onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
70
+ onChange === null || onChange === void 0 || onChange(internationalNumber, isValidLength, countryCode, value);
71
71
  };
72
72
  const inputClassNames = classNames(styles.input, {
73
73
  [styles.disabled]: isDisabled
@@ -1,8 +1,8 @@
1
1
  import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
2
2
 
3
- var css_248z = "._quDfU input{padding-left:76px!important}._lJTFd input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._lJTFd input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._lJTFd input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Ya3G0{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._Ya3G0,._Ya3G0._lJTFd:hover{background-color:transparent!important}._Ya3G0:hover{background-color:rgba(50,54,58,.08)!important}._Ya3G0:active{background-color:rgba(50,54,58,.11)!important}._Ya3G0 svg{top:2px!important}._ms8O4{position:relative}._T-JMO{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
- var styles = {"input":"_quDfU","disabled":"_lJTFd","dropdown":"_Ya3G0","container":"_ms8O4","countryCode":"_T-JMO"};
5
- var stylesheet="._quDfU input{padding-left:76px!important}._lJTFd input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._lJTFd input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._lJTFd input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Ya3G0{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._Ya3G0,._Ya3G0._lJTFd:hover{background-color:transparent!important}._Ya3G0:hover{background-color:rgba(50,54,58,.08)!important}._Ya3G0:active{background-color:rgba(50,54,58,.11)!important}._Ya3G0 svg{top:2px!important}._ms8O4{position:relative}._T-JMO{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
3
+ var css_248z = "._Yam-8 input{padding-left:76px!important}._2PHbV input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._2PHbV input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._2PHbV input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._LSADJ{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._LSADJ,._LSADJ._2PHbV:hover{background-color:transparent!important}._LSADJ:hover{background-color:rgba(50,54,58,.08)!important}._LSADJ:active{background-color:rgba(50,54,58,.11)!important}._LSADJ svg{top:2px!important}._tJt-2{position:relative}._cCDs1{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
4
+ var styles = {"input":"_Yam-8","disabled":"_2PHbV","dropdown":"_LSADJ","container":"_tJt-2","countryCode":"_cCDs1"};
5
+ var stylesheet="._Yam-8 input{padding-left:76px!important}._2PHbV input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._2PHbV input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._2PHbV input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._LSADJ{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._LSADJ,._LSADJ._2PHbV:hover{background-color:transparent!important}._LSADJ:hover{background-color:rgba(50,54,58,.08)!important}._LSADJ:active{background-color:rgba(50,54,58,.11)!important}._LSADJ svg{top:2px!important}._tJt-2{position:relative}._cCDs1{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
6
6
  if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
7
7
 
8
8
  export { styles as default, stylesheet };