@qualtrics/ui-react 2.25.0 → 2.27.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.
- package/CHANGELOG.md +32 -0
- package/dist/__shared/cjs/{index-610a1e02.js → index-88aa3bce.js} +267 -256
- package/dist/__shared/cjs/{index-5b3b3406.js → index-e6893573.js} +23 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +1 -1
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/Hue.js +1 -1
- package/dist/components/ColorPicker/Palette.js +1 -1
- package/dist/components/ColorPicker/Saturation.js +1 -1
- package/dist/components/Combobox/Combobox.js +3 -3
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxIcon.js +1 -1
- package/dist/components/Combobox/ComboboxInput.js +1 -1
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown.js +4 -4
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +6 -6
- package/dist/components/Dropdown/DropdownList.js +1 -1
- package/dist/components/Dropdown/DropdownOption.js +2 -2
- package/dist/components/Dropdown/DropdownSearch.js +2 -2
- package/dist/components/FilePicker/FilePicker.js +2 -2
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +2 -2
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/IconTypes.js +5 -0
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +7 -7
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +2 -2
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor.js +1 -1
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal.js +6 -6
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +3 -3
- package/dist/components/NumberStepper/NumberStepper.js +2 -2
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +3 -3
- package/dist/components/Pagination/PaginationPageInput.js +8 -8
- package/dist/components/Pagination/PaginationPreviousButton.js +3 -3
- package/dist/components/Popover/Popover.js +5 -5
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +2 -2
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav.js +1 -1
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/Alpha.js +2 -2
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +1 -1
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
- package/dist/components/deprecated_ColorPicker/Hue.js +2 -2
- package/dist/components/deprecated_ColorPicker/Saturation.js +2 -2
- package/dist/components/deprecated_ColorPicker/Swatch.js +1 -1
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +1 -1
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +1 -1
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +1 -1
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +5 -5
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +3 -3
- package/dist/hooks/useControllableState/useControllableState.js +1 -1
- package/dist/hooks/useOverlay/useOverlay.js +2 -2
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +1 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/AIChatbotIcon.js +6 -0
- package/dist/icons/components/LinesIcon.js +6 -0
- package/dist/icons/components/RobotConversationalIcon.js +6 -0
- package/dist/icons/components/ScatterPlotIcon.js +6 -0
- package/dist/icons/components/UnmoderatedUserTestingIcon.js +6 -0
- package/dist/icons/index.d.ts +10 -0
- package/dist/icons/index.es.js +5 -0
- package/dist/icons/index.js +6 -1
- package/dist/index.d.ts +11 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +36 -8
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +4 -4
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +2 -2
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollectionGrid/CollectionGrid.js +34 -0
- package/dist/next/CollectionGrid/CollectionGridItem.js +18 -0
- package/dist/next/CollectionGrid/index.js +2 -0
- package/dist/next/Combobox/Combobox.js +2 -0
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxInput.js +2 -0
- package/dist/next/Combobox/ComboboxOption.js +2 -0
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +1 -1
- package/dist/next/Drawer/Drawer.js +2 -2
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +2 -2
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LayoutGrid/LayoutGrid.js +38 -0
- package/dist/next/LayoutGrid/LayoutGridItem.js +23 -0
- package/dist/next/LayoutGrid/index.js +2 -0
- package/dist/next/Menu/Hooks/useFocusVirtualBoundary.js +41 -0
- package/dist/next/Menu/Hooks/useIsVirtualized.js +8 -0
- package/dist/next/Menu/Hooks/useMaskDimensions.js +59 -0
- package/dist/next/Menu/{useMutationObserver.js → Hooks/useMutationObserver.js} +1 -1
- package/dist/next/Menu/{usePaneSearch.js → Hooks/usePaneSearch.js} +61 -24
- package/dist/next/Menu/Menu.js +19 -24
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuContext.js +5 -1
- package/dist/next/Menu/MenuItem.js +21 -14
- package/dist/next/Menu/MenuPane.js +73 -54
- package/dist/next/Menu/PaneChildren.js +47 -0
- package/dist/next/Menu/SubMenu.js +57 -39
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +10 -6
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/Select/SubSelect.js +2 -2
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/Stack/Stack.js +1 -18
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +1 -1
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +57 -3
- package/dist/next/index.es.js +6 -0
- package/dist/next/index.js +614 -268
- package/dist/translations-en.js +7 -1
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +30 -0
- package/dist/utils/GridChildrenWrapper/index.js +1 -0
- package/dist/utils/Popper/Popper.js +2 -2
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
- package/dist/utils/wrapEvent/wrapEvent.js +1 -1
- package/icons/package.json +3 -1
- package/next/package.json +4 -2
- package/package.json +5 -3
- /package/dist/next/Menu/{useCSSVariable.js → Hooks/useCSSVariable.js} +0 -0
package/dist/next/index.js
CHANGED
|
@@ -8,12 +8,14 @@ var classNames = require('classnames');
|
|
|
8
8
|
var reactDnd = require('react-dnd');
|
|
9
9
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
|
10
10
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
11
|
-
var index = require('../__shared/cjs/index-
|
|
12
|
-
var icons_index = require('../__shared/cjs/index-
|
|
11
|
+
var index = require('../__shared/cjs/index-88aa3bce.js');
|
|
12
|
+
var icons_index = require('../__shared/cjs/index-e6893573.js');
|
|
13
13
|
var libphonenumberJs = require('libphonenumber-js');
|
|
14
14
|
var InputMask = require('react-input-mask');
|
|
15
15
|
var reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
16
|
+
var resizeObserver = require('@juggle/resize-observer');
|
|
16
17
|
var interactions = require('@react-aria/interactions');
|
|
18
|
+
var reactVirtuoso = require('react-virtuoso');
|
|
17
19
|
var ReactDOM = require('react-dom');
|
|
18
20
|
require('react-popper');
|
|
19
21
|
require('@popperjs/core');
|
|
@@ -30,9 +32,9 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
30
32
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
31
33
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
32
34
|
|
|
33
|
-
var css_248z$b = ".
|
|
34
|
-
var styles$b = {"advancedTable":"
|
|
35
|
-
var stylesheet$b=".
|
|
35
|
+
var css_248z$b = "._DN7Bl{overflow:auto;position:relative;max-width:100%;max-height:100%}._DN7Bl,._U3b4z{background-color:#fff}._U3b4z{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._NrGNP{margin-bottom:4px}._rP1GH{position:-webkit-sticky;position:sticky;top:0;z-index:100}._HL4EO{display:flex}._HL4EO:focus{outline:none}._HL4EO.focus-visible ._ExIaf:after,._HL4EO:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._HL4EO.focus-visible ._ExIaf:last-of-type:after,._HL4EO:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._HL4EO.focus-visible ._ExIaf:first-of-type:after,._HL4EO:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._HL4EO.focus-visible ._ExIaf._9U8mx:after,._HL4EO:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:1px}._vU7wY{padding-right:3px}._Jnqa5{display:flex}._Jnqa5._l9Ogu ._EERTn,._Jnqa5._l9Ogu ._ExIaf{cursor:pointer}._Jnqa5._sW-HY ._EERTn,._Jnqa5._sW-HY ._ExIaf{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._Jnqa5._sW-HY ._EERTn._9U8mx,._Jnqa5._sW-HY ._ExIaf._9U8mx{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._Jnqa5._sW-HY ._EERTn._9U8mx ._EERTn,._Jnqa5._sW-HY ._EERTn._9U8mx ._Exiq3,._Jnqa5._sW-HY ._EERTn._9U8mx ._TDT90,._Jnqa5._sW-HY ._ExIaf._9U8mx ._EERTn,._Jnqa5._sW-HY ._ExIaf._9U8mx ._Exiq3,._Jnqa5._sW-HY ._ExIaf._9U8mx ._TDT90{background-color:rgba(11,110,208,.08)}._Jnqa5._l9Ogu:hover:not(._sW-HY) ._EERTn,._Jnqa5._l9Ogu:hover:not(._sW-HY) ._ExIaf{background-color:#f9f9f9}._Jnqa5._l9Ogu:active:not(._sW-HY)[\\:not-has\\(._Exiq3\\:active\\)] ._EERTn,._Jnqa5._l9Ogu:active:not(._sW-HY)[\\:not-has\\(._Exiq3\\:active\\)] ._ExIaf{background-color:#f3f3f3}._Jnqa5._l9Ogu:active:not(._sW-HY):not(._Jnqa5._l9Ogu:active:not(._sW-HY):has(._Exiq3:active)) ._EERTn,._Jnqa5._l9Ogu:active:not(._sW-HY):not(._Jnqa5._l9Ogu:active:not(._sW-HY):has(._Exiq3:active)) ._ExIaf{background-color:#f3f3f3}._Jnqa5:focus{outline:none}._Jnqa5.focus-visible ._ExIaf:after,._Jnqa5:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:0}._Jnqa5:last-of-type:focus{outline:none}._Jnqa5:last-of-type.focus-visible ._ExIaf:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5:last-of-type.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5:last-of-type.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5:last-of-type.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:last-of-type:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:1px}._Jnqa5:last-of-type ._TDT90:focus{outline:none}._Jnqa5:last-of-type ._TDT90._7vjr-.focus-visible:after,._Jnqa5:last-of-type ._TDT90._7vjr-:focus-visible:after,._Jnqa5:last-of-type ._TDT90.focus-visible:after,._Jnqa5:last-of-type ._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._Jnqa5:first-of-type:focus{outline:none}._Jnqa5:first-of-type.focus-visible ._ExIaf:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5:first-of-type.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5:first-of-type.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5:first-of-type.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:first-of-type:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:0}._Jnqa5:first-of-type ._TDT90:focus{outline:none}._Jnqa5:first-of-type ._TDT90._7vjr-.focus-visible:after,._Jnqa5:first-of-type ._TDT90._7vjr-:focus-visible:after,._Jnqa5:first-of-type ._TDT90.focus-visible:after,._Jnqa5:first-of-type ._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-JXYa{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._-JXYa._kEOjw{flex-grow:1}._-JXYa._eUB-g{cursor:pointer}._-JXYa._eUB-g:hover:not(._8uGpl){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-JXYa._eUB-g:active:not(._8uGpl){background-color:#f3f3f3}._-JXYa._j0TAb:not(._8uGpl){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-JXYa._8uGpl{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-JXYa ._lLNWn{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-JXYa ._lLNWn._6Ji5o{left:-1px}._-JXYa ._lLNWn._4Loc2{right:0}._-JXYa ._nua8L{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-JXYa ._nua8L._6Ji5o{left:-2px}._-JXYa ._nua8L._4Loc2{right:-1px}._-JXYa:first-of-type ._6Ji5o._lLNWn{left:0;width:2px;border-left:1px solid #fff}._-JXYa:first-of-type ._6Ji5o._nua8L{left:0}._-JXYa:last-of-type ._4Loc2._lLNWn{right:0;width:2px;border-right:1px solid #fff}._-JXYa:last-of-type ._4Loc2._nua8L{right:0}._-JXYa ._NnFl2{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-JXYa ._NnFl2 ._-iEpH{position:absolute;width:2px;right:2px;top:0;bottom:0}._-JXYa ._NnFl2 ._-iEpH._w5mNv{background-color:#0a6ed1}._-JXYa ._NnFl2:hover ._-iEpH:not(._w5mNv){background-color:#d9d9d9}._-JXYa ._1t6tN{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._-JXYa ._1t6tN._3bimP{flex-direction:row-reverse;justify-content:flex-start}._-JXYa ._1t6tN._3bimP ._xYKOg{margin:1px 7px 1px 1px}._-JXYa ._1t6tN ._WliAN{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-JXYa ._1t6tN ._xYKOg{margin:1px 1px 1px 7px;flex-shrink:0}._-JXYa ._oOT4E{margin-left:6px;margin-right:4px;flex-shrink:0}._-JXYa ._ka275{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-JXYa:focus{outline:none}._-JXYa._7vjr-.focus-visible:after,._-JXYa._7vjr-:focus-visible:after,._-JXYa.focus-visible:after,._-JXYa:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._D6yz1{margin-right:6px}._9U8mx{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._9U8mx[focus-within]{z-index:30}._9U8mx:focus-within{z-index:30}._TDT90{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._TDT90 ._6H-jN{width:100%;padding:12px 12px 11px;overflow:hidden}._TDT90._8uGpl{background-color:#efefef;border-bottom-color:#dfdfe1}._TDT90._kEOjw{flex-grow:1}._TDT90:focus{outline:none}._TDT90._7vjr-.focus-visible:after,._TDT90._7vjr-:focus-visible:after,._TDT90.focus-visible:after,._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._EERTn{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._EERTn._4UwQj{border-bottom-color:#d9d9d9;background-color:#fff}._Exiq3{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._Exiq3._4UwQj{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._Exiq3:focus input~span,._Exiq3:hover input~span{border-color:#0b6ed0}._Exiq3 ._yZ9e0{position:relative;display:inline-flex}._Exiq3 ._yZ9e0 ._rlX9w{margin:0!important}._Exiq3 ._yZ9e0 ._GfJUb{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1uf60{justify-content:flex-start}._RZnHu{justify-content:center;text-align:center}._3bimP{justify-content:flex-end;text-align:right}._W2DVP{display:none}._Z-E2S{opacity:0;height:0;width:0;overflow:hidden}._m6Yl4,._Z-E2S{position:absolute}._m6Yl4{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._eks70{max-width:250px;min-width:150px!important}";
|
|
36
|
+
var styles$b = {"advancedTable":"_DN7Bl","advancedTablePaginationContainer":"_U3b4z","advancedTablePagination":"_NrGNP","advancedTableColumnHeadersRowGroup":"_rP1GH","advancedTableColumnHeaders":"_HL4EO","advancedTableRowChild":"_ExIaf","pinnedContainer":"_9U8mx","advancedTableRowGroup":"_vU7wY","advancedTableRow":"_Jnqa5","hasRowAction":"_l9Ogu","advancedTableExpandRowSpacer":"_EERTn","isSelected":"_sW-HY","advancedTableCheckbox":"_Exiq3","advancedTableCell":"_TDT90","showFocusRing":"_7vjr-","advancedTableColumnHeader":"_-JXYa","fillRemainingSpace":"_kEOjw","isSortable":"_eUB-g","isDragging":"_8uGpl","isSorted":"_j0TAb","dropTargetLine":"_lLNWn","dropTargetLeft":"_6Ji5o","dropTargetRight":"_4Loc2","dropTargetMarker":"_nua8L","resizeHandle":"_NnFl2","resizeLine":"_-iEpH","isResizing":"_w5mNv","advancedTableColumnHeaderLabel":"_1t6tN","rightAligned":"_3bimP","sortIcon":"_xYKOg","advancedTableColumnHeaderLabelText":"_WliAN","advancedTableColumnHeaderMenu":"_oOT4E","advancedTableColumnHeaderMenuHiddenAnchor":"_ka275","advancedTableColumnHeaderMenuItemIcon":"_D6yz1","advancedTableCellContainer":"_6H-jN","header":"_4UwQj","checkboxContainer":"_yZ9e0","checkbox":"_rlX9w","mixed":"_GfJUb","leftAligned":"_1uf60","centerAligned":"_RZnHu","hiddenDescription":"_W2DVP","hiddenLiveRegion":"_Z-E2S","dragPreview":"_m6Yl4","rowActionMenuPane":"_eks70"};
|
|
37
|
+
var stylesheet$b="._DN7Bl{overflow:auto;position:relative;max-width:100%;max-height:100%}._DN7Bl,._U3b4z{background-color:#fff}._U3b4z{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._NrGNP{margin-bottom:4px}._rP1GH{position:-webkit-sticky;position:sticky;top:0;z-index:100}._HL4EO{display:flex}._HL4EO:focus{outline:none}._HL4EO.focus-visible ._ExIaf:after,._HL4EO:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._HL4EO.focus-visible ._ExIaf:last-of-type:after,._HL4EO:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._HL4EO.focus-visible ._ExIaf:first-of-type:after,._HL4EO:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._HL4EO.focus-visible ._ExIaf._9U8mx:after,._HL4EO:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:1px}._vU7wY{padding-right:3px}._Jnqa5{display:flex}._Jnqa5._l9Ogu ._EERTn,._Jnqa5._l9Ogu ._ExIaf{cursor:pointer}._Jnqa5._sW-HY ._EERTn,._Jnqa5._sW-HY ._ExIaf{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._Jnqa5._sW-HY ._EERTn._9U8mx,._Jnqa5._sW-HY ._ExIaf._9U8mx{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._Jnqa5._sW-HY ._EERTn._9U8mx ._EERTn,._Jnqa5._sW-HY ._EERTn._9U8mx ._Exiq3,._Jnqa5._sW-HY ._EERTn._9U8mx ._TDT90,._Jnqa5._sW-HY ._ExIaf._9U8mx ._EERTn,._Jnqa5._sW-HY ._ExIaf._9U8mx ._Exiq3,._Jnqa5._sW-HY ._ExIaf._9U8mx ._TDT90{background-color:rgba(11,110,208,.08)}._Jnqa5._l9Ogu:hover:not(._sW-HY) ._EERTn,._Jnqa5._l9Ogu:hover:not(._sW-HY) ._ExIaf{background-color:#f9f9f9}._Jnqa5._l9Ogu:active:not(._sW-HY)[\\:not-has\\(._Exiq3\\:active\\)] ._EERTn,._Jnqa5._l9Ogu:active:not(._sW-HY)[\\:not-has\\(._Exiq3\\:active\\)] ._ExIaf{background-color:#f3f3f3}._Jnqa5._l9Ogu:active:not(._sW-HY):not(._Jnqa5._l9Ogu:active:not(._sW-HY):has(._Exiq3:active)) ._EERTn,._Jnqa5._l9Ogu:active:not(._sW-HY):not(._Jnqa5._l9Ogu:active:not(._sW-HY):has(._Exiq3:active)) ._ExIaf{background-color:#f3f3f3}._Jnqa5:focus{outline:none}._Jnqa5.focus-visible ._ExIaf:after,._Jnqa5:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:0}._Jnqa5:last-of-type:focus{outline:none}._Jnqa5:last-of-type.focus-visible ._ExIaf:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5:last-of-type.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5:last-of-type.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:last-of-type:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5:last-of-type.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:last-of-type:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:1px}._Jnqa5:last-of-type ._TDT90:focus{outline:none}._Jnqa5:last-of-type ._TDT90._7vjr-.focus-visible:after,._Jnqa5:last-of-type ._TDT90._7vjr-:focus-visible:after,._Jnqa5:last-of-type ._TDT90.focus-visible:after,._Jnqa5:last-of-type ._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._Jnqa5:first-of-type:focus{outline:none}._Jnqa5:first-of-type.focus-visible ._ExIaf:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._Jnqa5:first-of-type.focus-visible ._ExIaf:last-of-type:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._Jnqa5:first-of-type.focus-visible ._ExIaf:first-of-type:after,._Jnqa5:first-of-type:focus-visible ._ExIaf:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._Jnqa5:first-of-type.focus-visible ._ExIaf._9U8mx:after,._Jnqa5:first-of-type:focus-visible ._ExIaf._9U8mx:after{right:-3px;bottom:0}._Jnqa5:first-of-type ._TDT90:focus{outline:none}._Jnqa5:first-of-type ._TDT90._7vjr-.focus-visible:after,._Jnqa5:first-of-type ._TDT90._7vjr-:focus-visible:after,._Jnqa5:first-of-type ._TDT90.focus-visible:after,._Jnqa5:first-of-type ._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-JXYa{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._-JXYa._kEOjw{flex-grow:1}._-JXYa._eUB-g{cursor:pointer}._-JXYa._eUB-g:hover:not(._8uGpl){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-JXYa._eUB-g:active:not(._8uGpl){background-color:#f3f3f3}._-JXYa._j0TAb:not(._8uGpl){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-JXYa._8uGpl{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-JXYa ._lLNWn{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-JXYa ._lLNWn._6Ji5o{left:-1px}._-JXYa ._lLNWn._4Loc2{right:0}._-JXYa ._nua8L{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-JXYa ._nua8L._6Ji5o{left:-2px}._-JXYa ._nua8L._4Loc2{right:-1px}._-JXYa:first-of-type ._6Ji5o._lLNWn{left:0;width:2px;border-left:1px solid #fff}._-JXYa:first-of-type ._6Ji5o._nua8L{left:0}._-JXYa:last-of-type ._4Loc2._lLNWn{right:0;width:2px;border-right:1px solid #fff}._-JXYa:last-of-type ._4Loc2._nua8L{right:0}._-JXYa ._NnFl2{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-JXYa ._NnFl2 ._-iEpH{position:absolute;width:2px;right:2px;top:0;bottom:0}._-JXYa ._NnFl2 ._-iEpH._w5mNv{background-color:#0a6ed1}._-JXYa ._NnFl2:hover ._-iEpH:not(._w5mNv){background-color:#d9d9d9}._-JXYa ._1t6tN{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._-JXYa ._1t6tN._3bimP{flex-direction:row-reverse;justify-content:flex-start}._-JXYa ._1t6tN._3bimP ._xYKOg{margin:1px 7px 1px 1px}._-JXYa ._1t6tN ._WliAN{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-JXYa ._1t6tN ._xYKOg{margin:1px 1px 1px 7px;flex-shrink:0}._-JXYa ._oOT4E{margin-left:6px;margin-right:4px;flex-shrink:0}._-JXYa ._ka275{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-JXYa:focus{outline:none}._-JXYa._7vjr-.focus-visible:after,._-JXYa._7vjr-:focus-visible:after,._-JXYa.focus-visible:after,._-JXYa:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._D6yz1{margin-right:6px}._9U8mx{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._9U8mx[focus-within]{z-index:30}._9U8mx:focus-within{z-index:30}._TDT90{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._TDT90 ._6H-jN{width:100%;padding:12px 12px 11px;overflow:hidden}._TDT90._8uGpl{background-color:#efefef;border-bottom-color:#dfdfe1}._TDT90._kEOjw{flex-grow:1}._TDT90:focus{outline:none}._TDT90._7vjr-.focus-visible:after,._TDT90._7vjr-:focus-visible:after,._TDT90.focus-visible:after,._TDT90:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._EERTn{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._EERTn._4UwQj{border-bottom-color:#d9d9d9;background-color:#fff}._Exiq3{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._Exiq3._4UwQj{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._Exiq3:focus input~span,._Exiq3:hover input~span{border-color:#0b6ed0}._Exiq3 ._yZ9e0{position:relative;display:inline-flex}._Exiq3 ._yZ9e0 ._rlX9w{margin:0!important}._Exiq3 ._yZ9e0 ._GfJUb{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1uf60{justify-content:flex-start}._RZnHu{justify-content:center;text-align:center}._3bimP{justify-content:flex-end;text-align:right}._W2DVP{display:none}._Z-E2S{opacity:0;height:0;width:0;overflow:hidden}._m6Yl4,._Z-E2S{position:absolute}._m6Yl4{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._eks70{max-width:250px;min-width:150px!important}";
|
|
36
38
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$b);}
|
|
37
39
|
|
|
38
40
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
@@ -87,8 +89,8 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
87
89
|
var _columnHeaderRef$curr;
|
|
88
90
|
e.preventDefault(); // prevents SelectMenu value from changing
|
|
89
91
|
setIsOpen(false);
|
|
90
|
-
(_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0
|
|
91
|
-
onSelect === null || onSelect === void 0
|
|
92
|
+
(_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0 || _columnHeaderRef$curr.focus();
|
|
93
|
+
onSelect === null || onSelect === void 0 || onSelect();
|
|
92
94
|
},
|
|
93
95
|
"date-testid": menuItemDataTestId
|
|
94
96
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -454,7 +456,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
454
456
|
const newWidth = Math.max(80, ((_columnHeaderRef$curr2 = columnHeaderRef.current) === null || _columnHeaderRef$curr2 === void 0 ? void 0 : _columnHeaderRef$curr2.getBoundingClientRect().width) - 10);
|
|
455
457
|
onWidthChange(newWidth);
|
|
456
458
|
} else {
|
|
457
|
-
onKeyDown === null || onKeyDown === void 0
|
|
459
|
+
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
|
|
458
460
|
}
|
|
459
461
|
};
|
|
460
462
|
const handleClick = e => {
|
|
@@ -528,7 +530,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
528
530
|
const mouseX = e.clientX;
|
|
529
531
|
const headerX = (_columnHeaderRef$curr3 = columnHeaderRef.current) === null || _columnHeaderRef$curr3 === void 0 ? void 0 : _columnHeaderRef$curr3.getBoundingClientRect().x;
|
|
530
532
|
const newWidth = Math.max(80, mouseX - headerX);
|
|
531
|
-
onWidthChange === null || onWidthChange === void 0
|
|
533
|
+
onWidthChange === null || onWidthChange === void 0 || onWidthChange(newWidth);
|
|
532
534
|
};
|
|
533
535
|
const handleMouseUp = e => {
|
|
534
536
|
if (e.button === 0) {
|
|
@@ -620,7 +622,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
620
622
|
"aria-hidden": "true",
|
|
621
623
|
onFocus: () => {
|
|
622
624
|
var _columnHeaderRef$curr5;
|
|
623
|
-
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0
|
|
625
|
+
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 || _columnHeaderRef$curr5.focus();
|
|
624
626
|
},
|
|
625
627
|
className: styles$b.advancedTableColumnHeaderMenuHiddenAnchor
|
|
626
628
|
})
|
|
@@ -685,14 +687,14 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
685
687
|
const handleKeyDown = e => {
|
|
686
688
|
if (e.target === e.currentTarget && e.key === 'Enter' && isInteractive) {
|
|
687
689
|
var _focusableElementRef$;
|
|
688
|
-
(_focusableElementRef$ = focusableElementRef.current) === null || _focusableElementRef$ === void 0
|
|
690
|
+
(_focusableElementRef$ = focusableElementRef.current) === null || _focusableElementRef$ === void 0 || _focusableElementRef$.focus();
|
|
689
691
|
e.preventDefault(); // Prevent click event from occurring on the focusable element
|
|
690
692
|
}
|
|
691
693
|
|
|
692
|
-
onKeyDown === null || onKeyDown === void 0
|
|
694
|
+
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
|
|
693
695
|
};
|
|
694
696
|
const handleFocus = e => {
|
|
695
|
-
onFocus === null || onFocus === void 0
|
|
697
|
+
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
696
698
|
if (isInteractive) {
|
|
697
699
|
if (e.target !== e.currentTarget) {
|
|
698
700
|
setIsEditing(true);
|
|
@@ -708,7 +710,7 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
708
710
|
} : undefined;
|
|
709
711
|
const focusCell = () => {
|
|
710
712
|
var _cellRef$current;
|
|
711
|
-
(_cellRef$current = cellRef.current) === null || _cellRef$current === void 0
|
|
713
|
+
(_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 || _cellRef$current.focus();
|
|
712
714
|
};
|
|
713
715
|
const computedWidth = useComputedWidth(widthBuffer, width);
|
|
714
716
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
@@ -895,7 +897,7 @@ const AdvancedTablePagination = _ref => {
|
|
|
895
897
|
page
|
|
896
898
|
} = _ref2;
|
|
897
899
|
setCurrentPage(page);
|
|
898
|
-
onPageChange === null || onPageChange === void 0
|
|
900
|
+
onPageChange === null || onPageChange === void 0 || onPageChange(page);
|
|
899
901
|
};
|
|
900
902
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
901
903
|
className: styles$b.advancedTablePaginationContainer
|
|
@@ -981,6 +983,7 @@ const AdvancedTable = _ref => {
|
|
|
981
983
|
'data-testid': dataTestId,
|
|
982
984
|
rowActions,
|
|
983
985
|
rowActionsButtonAriaLabel,
|
|
986
|
+
rowActionsPlacement = 'bottom-end',
|
|
984
987
|
headerMaxLines
|
|
985
988
|
} = _ref;
|
|
986
989
|
// This handles an edge case where no rows are passed in
|
|
@@ -1014,6 +1017,7 @@ const AdvancedTable = _ref => {
|
|
|
1014
1017
|
const endingRowIndex = startingRowIndex + rowsPerPage;
|
|
1015
1018
|
return rows.slice(startingRowIndex, endingRowIndex);
|
|
1016
1019
|
}, [rows, rowsPerPage, currentPage]);
|
|
1020
|
+
const paginatedRowIds = React.useMemo(() => paginatedRows === null || paginatedRows === void 0 ? void 0 : paginatedRows.map(row => row.id), [paginatedRows]);
|
|
1017
1021
|
React.useEffect(() => {
|
|
1018
1022
|
if (rows && rowsPerPage) {
|
|
1019
1023
|
const pageCount = Math.ceil(rows.length / rowsPerPage);
|
|
@@ -1045,7 +1049,8 @@ const AdvancedTable = _ref => {
|
|
|
1045
1049
|
}
|
|
1046
1050
|
}
|
|
1047
1051
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1048
|
-
className: styles$b.rowActionMenuPane
|
|
1052
|
+
className: styles$b.rowActionMenuPane,
|
|
1053
|
+
placement: rowActionsPlacement
|
|
1049
1054
|
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1050
1055
|
var _actionGroup$actions;
|
|
1051
1056
|
const row = rows[rowIndex];
|
|
@@ -1113,7 +1118,7 @@ const AdvancedTable = _ref => {
|
|
|
1113
1118
|
const setColumnOrder = index.useEventCallback(value => {
|
|
1114
1119
|
const newColumnOrder = typeof value === 'function' ? value(columnOrder) : value;
|
|
1115
1120
|
setInternalColumnOrder(newColumnOrder);
|
|
1116
|
-
onColumnOrderChange === null || onColumnOrderChange === void 0
|
|
1121
|
+
onColumnOrderChange === null || onColumnOrderChange === void 0 || onColumnOrderChange(newColumnOrder);
|
|
1117
1122
|
});
|
|
1118
1123
|
const {
|
|
1119
1124
|
pinnedColumnConfigs,
|
|
@@ -1205,7 +1210,7 @@ const AdvancedTable = _ref => {
|
|
|
1205
1210
|
} else if (expand !== false) {
|
|
1206
1211
|
rowPropReference.isExpanded = true;
|
|
1207
1212
|
}
|
|
1208
|
-
onRowsChange === null || onRowsChange === void 0
|
|
1213
|
+
onRowsChange === null || onRowsChange === void 0 || onRowsChange([...rowsProp]);
|
|
1209
1214
|
};
|
|
1210
1215
|
const getLastToggledRowIndex = () => {
|
|
1211
1216
|
const index = rows === null || rows === void 0 ? void 0 : rows.findIndex(_ref4 => {
|
|
@@ -1225,9 +1230,34 @@ const AdvancedTable = _ref => {
|
|
|
1225
1230
|
}
|
|
1226
1231
|
return 'false';
|
|
1227
1232
|
};
|
|
1233
|
+
const columnHeaderCheckboxState = React.useMemo(() => {
|
|
1234
|
+
if (paginatedRowIds) {
|
|
1235
|
+
const checkedPaginatedRowIds = paginatedRowIds.filter(rowId => checkedRowIds.includes(rowId));
|
|
1236
|
+
if (paginatedRowIds.length === checkedPaginatedRowIds.length) {
|
|
1237
|
+
return 'true';
|
|
1238
|
+
}
|
|
1239
|
+
if (checkedPaginatedRowIds.length) {
|
|
1240
|
+
return 'mixed';
|
|
1241
|
+
}
|
|
1242
|
+
return 'false';
|
|
1243
|
+
}
|
|
1244
|
+
if (checkedRowIds.length === totalRowsCountWithExpansion) {
|
|
1245
|
+
return 'true';
|
|
1246
|
+
}
|
|
1247
|
+
if (checkedRowIds.length) {
|
|
1248
|
+
return 'mixed';
|
|
1249
|
+
}
|
|
1250
|
+
return 'false';
|
|
1251
|
+
}, [checkedRowIds, paginatedRowIds, totalRowsCountWithExpansion]);
|
|
1228
1252
|
const handleColumnHeaderCheckboxToggle = () => {
|
|
1229
1253
|
setLastToggledRowId('');
|
|
1230
|
-
if (
|
|
1254
|
+
if (paginatedRowIds) {
|
|
1255
|
+
if (paginatedRowIds !== null && paginatedRowIds !== void 0 && paginatedRowIds.every(rowId => checkedRowIds.includes(rowId))) {
|
|
1256
|
+
setCheckedRowIds(checkedRowIds.filter(checkedRowId => !paginatedRowIds.includes(checkedRowId)));
|
|
1257
|
+
} else {
|
|
1258
|
+
setCheckedRowIds([...checkedRowIds, ...paginatedRowIds]);
|
|
1259
|
+
}
|
|
1260
|
+
} else if (checkedRowIds.length === totalRowsCountWithExpansion) {
|
|
1231
1261
|
setCheckedRowIds([]);
|
|
1232
1262
|
} else {
|
|
1233
1263
|
setCheckedRowIds(getAllRowIds());
|
|
@@ -1476,7 +1506,7 @@ const AdvancedTable = _ref => {
|
|
|
1476
1506
|
setValue: newValue => {
|
|
1477
1507
|
const newRows = [...rowsProp];
|
|
1478
1508
|
rowPropReference.data[columnId] = newValue;
|
|
1479
|
-
onRowsChange === null || onRowsChange === void 0
|
|
1509
|
+
onRowsChange === null || onRowsChange === void 0 || onRowsChange(newRows);
|
|
1480
1510
|
},
|
|
1481
1511
|
renderCellContent,
|
|
1482
1512
|
isCellContentInteractive,
|
|
@@ -1544,7 +1574,7 @@ const AdvancedTable = _ref => {
|
|
|
1544
1574
|
className: classNames__default["default"](styles$b.pinnedContainer, styles$b.advancedTableRowChild),
|
|
1545
1575
|
ref: createPinnedContainerRef(headerRowIndex)
|
|
1546
1576
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1547
|
-
state:
|
|
1577
|
+
state: columnHeaderCheckboxState,
|
|
1548
1578
|
isRowFocused: headerRowIndex === focusedRowIndex,
|
|
1549
1579
|
onClick: handleColumnHeaderCheckboxToggle,
|
|
1550
1580
|
variant: "header"
|
|
@@ -1574,7 +1604,7 @@ const AdvancedTable = _ref => {
|
|
|
1574
1604
|
const onSelect = e => {
|
|
1575
1605
|
e.preventDefault(); // stops event from triggering on new target when focus is changed during onSelect
|
|
1576
1606
|
if (hasOnRowSelect) {
|
|
1577
|
-
onRowSelect === null || onRowSelect === void 0
|
|
1607
|
+
onRowSelect === null || onRowSelect === void 0 || onRowSelect(row.rowPropReference);
|
|
1578
1608
|
setSelectedRowId(rowId);
|
|
1579
1609
|
}
|
|
1580
1610
|
};
|
|
@@ -1755,7 +1785,7 @@ function useFocusState(_ref8) {
|
|
|
1755
1785
|
tableRef.current.scrollLeft -= pinnedContainerPos.left + pinnedContainerPos.width - cellPos.left;
|
|
1756
1786
|
}
|
|
1757
1787
|
}
|
|
1758
|
-
cell === null || cell === void 0
|
|
1788
|
+
cell === null || cell === void 0 || cell.focus();
|
|
1759
1789
|
});
|
|
1760
1790
|
|
|
1761
1791
|
// Focus header cell when the focused column id changes. Used when pinning/unpinning columns since a new DOM element is created.
|
|
@@ -1822,9 +1852,9 @@ function mapExternalRowToInternalRows(row, depthSize, depthIndex, parentId) {
|
|
|
1822
1852
|
|
|
1823
1853
|
/* eslint-disable import/prefer-default-export */
|
|
1824
1854
|
|
|
1825
|
-
var css_248z$a = ".
|
|
1826
|
-
var styles$a = {"collapsibleSearchInput":"
|
|
1827
|
-
var stylesheet$a=".
|
|
1855
|
+
var css_248z$a = "._7Lh0W{display:inline-block;width:36px;transition:width .25s ease-out}._qNwxS{width:100%}._-aZVt>input{padding-right:0!important}._cVk5R>svg{fill:#515559}";
|
|
1856
|
+
var styles$a = {"collapsibleSearchInput":"_7Lh0W","searchInput":"_qNwxS","searchInputCollapsed":"_-aZVt","iconButton":"_cVk5R"};
|
|
1857
|
+
var stylesheet$a="._7Lh0W{display:inline-block;width:36px;transition:width .25s ease-out}._qNwxS{width:100%}._-aZVt>input{padding-right:0!important}._cVk5R>svg{fill:#515559}";
|
|
1828
1858
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$a);}
|
|
1829
1859
|
|
|
1830
1860
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -1902,7 +1932,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1902
1932
|
};
|
|
1903
1933
|
const handleIconButtonClick = () => {
|
|
1904
1934
|
var _iconButtonRef$curren;
|
|
1905
|
-
(_iconButtonRef$curren = iconButtonRef.current) === null || _iconButtonRef$curren === void 0
|
|
1935
|
+
(_iconButtonRef$curren = iconButtonRef.current) === null || _iconButtonRef$curren === void 0 || _iconButtonRef$curren.focus();
|
|
1906
1936
|
setExternalIsExpanded(true);
|
|
1907
1937
|
};
|
|
1908
1938
|
index.useDidUpdate(() => {
|
|
@@ -1921,7 +1951,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1921
1951
|
if (isComponentFocused) {
|
|
1922
1952
|
switch (internalExpandedState) {
|
|
1923
1953
|
case expandedStates.EXPANDING:
|
|
1924
|
-
(_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0
|
|
1954
|
+
(_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 || _searchInputRef$curre.focus();
|
|
1925
1955
|
break;
|
|
1926
1956
|
case expandedStates.COLLAPSED:
|
|
1927
1957
|
/*
|
|
@@ -1929,7 +1959,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1929
1959
|
* This will show the focus ring on the icon button and allow the tooltip to appear.
|
|
1930
1960
|
*/
|
|
1931
1961
|
|
|
1932
|
-
(_iconButtonRef$curren2 = iconButtonRef.current) === null || _iconButtonRef$curren2 === void 0
|
|
1962
|
+
(_iconButtonRef$curren2 = iconButtonRef.current) === null || _iconButtonRef$curren2 === void 0 || _iconButtonRef$curren2.focus();
|
|
1933
1963
|
break;
|
|
1934
1964
|
default:
|
|
1935
1965
|
}
|
|
@@ -1965,9 +1995,9 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1965
1995
|
}));
|
|
1966
1996
|
});
|
|
1967
1997
|
|
|
1968
|
-
var css_248z$9 = ".
|
|
1969
|
-
var styles$9 = {"input":"
|
|
1970
|
-
var stylesheet$9=".
|
|
1998
|
+
var css_248z$9 = "._mtXPp input{padding-left:76px!important}._yiooe input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._yiooe input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._yiooe input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1l3kl{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1l3kl,._1l3kl._yiooe:hover{background-color:transparent!important}._1l3kl:hover{background-color:rgba(50,54,58,.08)!important}._1l3kl:active{background-color:rgba(50,54,58,.11)!important}._1l3kl svg{top:2px!important}._L1AsW{position:relative}._2nJEm{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1999
|
+
var styles$9 = {"input":"_mtXPp","disabled":"_yiooe","dropdown":"_1l3kl","container":"_L1AsW","countryCode":"_2nJEm"};
|
|
2000
|
+
var stylesheet$9="._mtXPp input{padding-left:76px!important}._yiooe input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._yiooe input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._yiooe input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1l3kl{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1l3kl,._1l3kl._yiooe:hover{background-color:transparent!important}._1l3kl:hover{background-color:rgba(50,54,58,.08)!important}._1l3kl:active{background-color:rgba(50,54,58,.11)!important}._1l3kl svg{top:2px!important}._L1AsW{position:relative}._2nJEm{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1971
2001
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$9);}
|
|
1972
2002
|
|
|
1973
2003
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -2026,7 +2056,7 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2026
2056
|
} catch (e) {
|
|
2027
2057
|
// `parsePhoneNumber` throws an error if the inputs are invalid.
|
|
2028
2058
|
}
|
|
2029
|
-
onChange === null || onChange === void 0
|
|
2059
|
+
onChange === null || onChange === void 0 || onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2030
2060
|
};
|
|
2031
2061
|
const inputClassNames = classNames__default["default"](styles$9.input, {
|
|
2032
2062
|
[styles$9.disabled]: isDisabled
|
|
@@ -2201,7 +2231,7 @@ isDisabled) {
|
|
|
2201
2231
|
*/
|
|
2202
2232
|
const focusDescendant = React.useCallback((descendantElement, index) => {
|
|
2203
2233
|
var _inputRef$current;
|
|
2204
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0
|
|
2234
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.setAttribute('aria-activedescendant', descendantElement.id);
|
|
2205
2235
|
setActiveDescendant({
|
|
2206
2236
|
element: descendantElement,
|
|
2207
2237
|
index
|
|
@@ -2620,6 +2650,7 @@ function Combobox(_ref) {
|
|
|
2620
2650
|
initialValue = '',
|
|
2621
2651
|
value,
|
|
2622
2652
|
onChange,
|
|
2653
|
+
onSubmit,
|
|
2623
2654
|
isDisabled,
|
|
2624
2655
|
isInvalid,
|
|
2625
2656
|
isRequired,
|
|
@@ -2673,6 +2704,7 @@ function Combobox(_ref) {
|
|
|
2673
2704
|
setRawInputValue,
|
|
2674
2705
|
committedInputValue,
|
|
2675
2706
|
setCommittedInputValue,
|
|
2707
|
+
onSubmit,
|
|
2676
2708
|
registerOption,
|
|
2677
2709
|
deregisterOption,
|
|
2678
2710
|
focusInput,
|
|
@@ -2687,9 +2719,9 @@ function Combobox(_ref) {
|
|
|
2687
2719
|
}, children);
|
|
2688
2720
|
}
|
|
2689
2721
|
|
|
2690
|
-
var css_248z$8 = ".
|
|
2691
|
-
var styles$8 = {"loadingSpinner":"
|
|
2692
|
-
var stylesheet$8=".
|
|
2722
|
+
var css_248z$8 = "._4gfur :after{background-color:#515559!important}._rGM0q>input:focus{box-shadow:none!important;border:1px solid #898989!important}._Mxgkz{max-width:500px;padding:4px 0;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._Mxgkz ._3XEgb ._zqTLp{display:flex;align-items:center;min-height:40px;padding:10px 12px;color:#32363a;font-size:12px;line-height:16px;font-weight:700;word-break:break-word}._Mxgkz ._3XEgb:first-child ._r8tFZ{display:none}._Mxgkz ._79cr2{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._Mxgkz ._79cr2:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._Mxgkz ._79cr2:hover._Mvxou{background-color:#e4effa}._Mxgkz ._79cr2._Mvxou{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._Mxgkz ._79cr2:active:not(._Mvxou){background-color:#e8e9e9}";
|
|
2723
|
+
var styles$8 = {"loadingSpinner":"_4gfur","ignoreFocusStyle":"_rGM0q","flyout":"_Mxgkz","group":"_3XEgb","header":"_zqTLp","divider":"_r8tFZ","option":"_79cr2","selected":"_Mvxou"};
|
|
2724
|
+
var stylesheet$8="._4gfur :after{background-color:#515559!important}._rGM0q>input:focus{box-shadow:none!important;border:1px solid #898989!important}._Mxgkz{max-width:500px;padding:4px 0;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._Mxgkz ._3XEgb ._zqTLp{display:flex;align-items:center;min-height:40px;padding:10px 12px;color:#32363a;font-size:12px;line-height:16px;font-weight:700;word-break:break-word}._Mxgkz ._3XEgb:first-child ._r8tFZ{display:none}._Mxgkz ._79cr2{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._Mxgkz ._79cr2:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._Mxgkz ._79cr2:hover._Mvxou{background-color:#e4effa}._Mxgkz ._79cr2._Mvxou{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._Mxgkz ._79cr2:active:not(._Mvxou){background-color:#e8e9e9}";
|
|
2693
2725
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$8);}
|
|
2694
2726
|
|
|
2695
2727
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -2719,6 +2751,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2719
2751
|
setRawInputValue,
|
|
2720
2752
|
committedInputValue,
|
|
2721
2753
|
setCommittedInputValue,
|
|
2754
|
+
onSubmit,
|
|
2722
2755
|
activeDescendantElement,
|
|
2723
2756
|
isDisabled,
|
|
2724
2757
|
isRequired,
|
|
@@ -2787,6 +2820,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2787
2820
|
case 'Enter':
|
|
2788
2821
|
e.preventDefault(); // Prevents form submission
|
|
2789
2822
|
commitCurrentRawInputValueAndCloseFlyout();
|
|
2823
|
+
onSubmit === null || onSubmit === void 0 || onSubmit(rawInputValue);
|
|
2790
2824
|
break;
|
|
2791
2825
|
default:
|
|
2792
2826
|
}
|
|
@@ -2944,6 +2978,7 @@ function ComboboxOption(_ref) {
|
|
|
2944
2978
|
activeDescendantElement,
|
|
2945
2979
|
committedInputValue,
|
|
2946
2980
|
setCommittedInputValue,
|
|
2981
|
+
onSubmit,
|
|
2947
2982
|
rootDataTestId,
|
|
2948
2983
|
setHoveredOption
|
|
2949
2984
|
} = useComboboxContext();
|
|
@@ -2982,6 +3017,7 @@ function ComboboxOption(_ref) {
|
|
|
2982
3017
|
}),
|
|
2983
3018
|
onClick: () => {
|
|
2984
3019
|
setCommittedInputValue(label);
|
|
3020
|
+
onSubmit === null || onSubmit === void 0 || onSubmit(label);
|
|
2985
3021
|
setIsOpen(false);
|
|
2986
3022
|
setHoveredOption(null);
|
|
2987
3023
|
},
|
|
@@ -2995,9 +3031,9 @@ function ComboboxOption(_ref) {
|
|
|
2995
3031
|
}, label);
|
|
2996
3032
|
}
|
|
2997
3033
|
|
|
2998
|
-
var css_248z$7 = ".
|
|
2999
|
-
var styles$7 = {"container":"
|
|
3000
|
-
var stylesheet$7=".
|
|
3034
|
+
var css_248z$7 = "._iGbIg{display:flex}._R3C6c{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._R3C6c._Tll-X{background-color:#fff}._R3C6c._Tll-X._5vbJh:not(._R3C6c._Tll-X._vDA5M),._R3C6c._Tll-X._NDixR.focus-visible:not(._ZLeuB),._R3C6c._Tll-X._NDixR:focus-visible:not(._ZLeuB),._R3C6c._xX1Cd{background-color:#0b6ed0}._R3C6c._xX1Cd._vDA5M._5vbJh,._R3C6c._xX1Cd._ZLeuB._NDixR,._R3C6c._xX1Cd._ZLeuB._vDA5M{opacity:.4}._VwBky{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._VwBky:focus{z-index:1}._i-e52{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}._i-e52 svg{margin-left:1px}._i-e52._Tll-X{background-color:#0b6ed0;border-color:transparent}._i-e52._Tll-X svg{fill:#fff!important}._i-e52._Tll-X:not(._z5zPQ):hover{background-color:#085caf!important}._i-e52._Tll-X:not(._z5zPQ):active{background-color:#0854a1!important}._i-e52._Tll-X._z5zPQ{opacity:.4}._i-e52._Tll-X._z5zPQ svg{background-color:transparent}._i-e52._xX1Cd{border-color:#0b6ed0;background-color:#fff}._i-e52._xX1Cd svg{fill:#0b6ed0!important}._i-e52._xX1Cd:not(._z5zPQ):hover{background-color:#eef5fc!important}._i-e52._xX1Cd:not(._z5zPQ):active{background-color:#e1edf9!important}._i-e52._xX1Cd._z5zPQ{opacity:.4}._i-e52._xX1Cd._z5zPQ svg{background-color:transparent}._I1D4u{width:260px}";
|
|
3035
|
+
var styles$7 = {"container":"_iGbIg","divider":"_R3C6c","primary":"_Tll-X","mainButtonFocus":"_NDixR","mainButtonDisabled":"_ZLeuB","dropdownButtonFocus":"_5vbJh","dropdownButtonDisabled":"_vDA5M","secondary":"_xX1Cd","mainButton":"_VwBky","dropdownButton":"_i-e52","disabled":"_z5zPQ","dropdownOption":"_I1D4u"};
|
|
3036
|
+
var stylesheet$7="._iGbIg{display:flex}._R3C6c{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._R3C6c._Tll-X{background-color:#fff}._R3C6c._Tll-X._5vbJh:not(._R3C6c._Tll-X._vDA5M),._R3C6c._Tll-X._NDixR.focus-visible:not(._ZLeuB),._R3C6c._Tll-X._NDixR:focus-visible:not(._ZLeuB),._R3C6c._xX1Cd{background-color:#0b6ed0}._R3C6c._xX1Cd._vDA5M._5vbJh,._R3C6c._xX1Cd._ZLeuB._NDixR,._R3C6c._xX1Cd._ZLeuB._vDA5M{opacity:.4}._VwBky{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._VwBky:focus{z-index:1}._i-e52{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}._i-e52 svg{margin-left:1px}._i-e52._Tll-X{background-color:#0b6ed0;border-color:transparent}._i-e52._Tll-X svg{fill:#fff!important}._i-e52._Tll-X:not(._z5zPQ):hover{background-color:#085caf!important}._i-e52._Tll-X:not(._z5zPQ):active{background-color:#0854a1!important}._i-e52._Tll-X._z5zPQ{opacity:.4}._i-e52._Tll-X._z5zPQ svg{background-color:transparent}._i-e52._xX1Cd{border-color:#0b6ed0;background-color:#fff}._i-e52._xX1Cd svg{fill:#0b6ed0!important}._i-e52._xX1Cd:not(._z5zPQ):hover{background-color:#eef5fc!important}._i-e52._xX1Cd:not(._z5zPQ):active{background-color:#e1edf9!important}._i-e52._xX1Cd._z5zPQ{opacity:.4}._i-e52._xX1Cd._z5zPQ svg{background-color:transparent}._I1D4u{width:260px}";
|
|
3001
3037
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$7);}
|
|
3002
3038
|
|
|
3003
3039
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3097,9 +3133,9 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3097
3133
|
}, children);
|
|
3098
3134
|
});
|
|
3099
3135
|
|
|
3100
|
-
var css_248z$6 = ".
|
|
3101
|
-
var styles$6 = {"button":"
|
|
3102
|
-
var stylesheet$6=".
|
|
3136
|
+
var css_248z$6 = "._8TlXx{display:flex;justify-content:space-between;align-items:center;max-width:100%;min-width:76px;height:36px;padding:0 6px 0 12px;outline:none;font-size:14px;background-color:#fff;border:1px solid #898989;border-radius:20px;cursor:pointer}._8TlXx:hover:not(._4Oi5J){background-color:rgba(50,54,58,.08)}._8TlXx:hover:not(._4Oi5J)._aspbU{border-color:#085caf;background-color:rgba(11,110,208,.04)}._8TlXx:hover:not(._4Oi5J)._aspbU ._1-el8{color:#32363a}._8TlXx:hover:not(._4Oi5J)._aspbU ._CC0Zp{fill:#32363a}._8TlXx:hover:not(._4Oi5J)._aspbU ._rYzDe{fill:#085caf}._8TlXx:hover:not(._4Oi5J)._aspbU ._Re9ut{background-color:rgba(11,110,208,.11)}._8TlXx:hover:not(._4Oi5J)._aspbU ._Re9ut ._1eWJ1{color:#085caf}._8TlXx:active:not(._4Oi5J){background-color:#e8e9e9}._8TlXx:active:not(._4Oi5J)._aspbU{background-color:rgba(11,110,208,.11);border-color:#0854a1}._8TlXx:active:not(._4Oi5J)._aspbU ._rYzDe{fill:#0854a1}._8TlXx:active:not(._4Oi5J)._aspbU ._Re9ut{background-color:rgba(11,110,208,.11)}._8TlXx:active:not(._4Oi5J)._aspbU ._Re9ut ._1eWJ1{color:#0854a1}._8TlXx._4Oi5J{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._8TlXx._aspbU{border-color:#0b6ed0}._CC0Zp{fill:#515559;margin-right:4px}._1-el8{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._1-el8+._Re9ut{margin-left:6px}._1-el8._4Oi5J{color:#74777a}._Re9ut{display:flex;justify-content:center;align-items:center;max-width:350px;flex:1;min-width:0;height:24px;margin-right:3px;padding:0 10px;background-color:#ebf3fb;border-radius:20px}._1eWJ1{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._rYzDe{fill:#515559}._rYzDe._4Oi5J,._rYzDe._4Oi5J._aspbU{fill:rgba(116,119,122,.4)}._rYzDe._aspbU{fill:#0b6ed0}._rYzDe._VNa7g{transform:rotate(-180deg)}._8TlXx.focus-visible,._8TlXx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3137
|
+
var styles$6 = {"button":"_8TlXx","disabled":"_4Oi5J","selected":"_aspbU","label":"_1-el8","lockIcon":"_CC0Zp","chevronIcon":"_rYzDe","selectedFiltersContainer":"_Re9ut","selectedFilters":"_1eWJ1","open":"_VNa7g"};
|
|
3138
|
+
var stylesheet$6="._8TlXx{display:flex;justify-content:space-between;align-items:center;max-width:100%;min-width:76px;height:36px;padding:0 6px 0 12px;outline:none;font-size:14px;background-color:#fff;border:1px solid #898989;border-radius:20px;cursor:pointer}._8TlXx:hover:not(._4Oi5J){background-color:rgba(50,54,58,.08)}._8TlXx:hover:not(._4Oi5J)._aspbU{border-color:#085caf;background-color:rgba(11,110,208,.04)}._8TlXx:hover:not(._4Oi5J)._aspbU ._1-el8{color:#32363a}._8TlXx:hover:not(._4Oi5J)._aspbU ._CC0Zp{fill:#32363a}._8TlXx:hover:not(._4Oi5J)._aspbU ._rYzDe{fill:#085caf}._8TlXx:hover:not(._4Oi5J)._aspbU ._Re9ut{background-color:rgba(11,110,208,.11)}._8TlXx:hover:not(._4Oi5J)._aspbU ._Re9ut ._1eWJ1{color:#085caf}._8TlXx:active:not(._4Oi5J){background-color:#e8e9e9}._8TlXx:active:not(._4Oi5J)._aspbU{background-color:rgba(11,110,208,.11);border-color:#0854a1}._8TlXx:active:not(._4Oi5J)._aspbU ._rYzDe{fill:#0854a1}._8TlXx:active:not(._4Oi5J)._aspbU ._Re9ut{background-color:rgba(11,110,208,.11)}._8TlXx:active:not(._4Oi5J)._aspbU ._Re9ut ._1eWJ1{color:#0854a1}._8TlXx._4Oi5J{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._8TlXx._aspbU{border-color:#0b6ed0}._CC0Zp{fill:#515559;margin-right:4px}._1-el8{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._1-el8+._Re9ut{margin-left:6px}._1-el8._4Oi5J{color:#74777a}._Re9ut{display:flex;justify-content:center;align-items:center;max-width:350px;flex:1;min-width:0;height:24px;margin-right:3px;padding:0 10px;background-color:#ebf3fb;border-radius:20px}._1eWJ1{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._rYzDe{fill:#515559}._rYzDe._4Oi5J,._rYzDe._4Oi5J._aspbU{fill:rgba(116,119,122,.4)}._rYzDe._aspbU{fill:#0b6ed0}._rYzDe._VNa7g{transform:rotate(-180deg)}._8TlXx.focus-visible,._8TlXx:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3103
3139
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$6);}
|
|
3104
3140
|
|
|
3105
3141
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3133,14 +3169,14 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3133
3169
|
if (isDisabled) {
|
|
3134
3170
|
e.stopPropagation(); // Prevents "click" events from occurring on parent elements
|
|
3135
3171
|
} else {
|
|
3136
|
-
onClick === null || onClick === void 0
|
|
3172
|
+
onClick === null || onClick === void 0 || onClick(e);
|
|
3137
3173
|
}
|
|
3138
3174
|
},
|
|
3139
3175
|
onKeyDown: e => {
|
|
3140
3176
|
if (isDisabled) {
|
|
3141
3177
|
e.stopPropagation(); // Prevents "keydown" events from occurring on parent elements
|
|
3142
3178
|
} else {
|
|
3143
|
-
onKeyDown === null || onKeyDown === void 0
|
|
3179
|
+
onKeyDown === null || onKeyDown === void 0 || onKeyDown(e);
|
|
3144
3180
|
}
|
|
3145
3181
|
},
|
|
3146
3182
|
disabled: undefined // This component uses aria-disabled instead of disabled
|
|
@@ -3190,6 +3226,10 @@ const {
|
|
|
3190
3226
|
useContext: useMenuContext,
|
|
3191
3227
|
Provider: MenuContextProvider
|
|
3192
3228
|
} = index.createContextUtilities();
|
|
3229
|
+
const {
|
|
3230
|
+
useContext: useItemContext,
|
|
3231
|
+
Provider: ItemContextProvider
|
|
3232
|
+
} = index.createContextUtilities({});
|
|
3193
3233
|
const {
|
|
3194
3234
|
useContext: intermediaryUseMenuContext,
|
|
3195
3235
|
Provider: IntermediaryMenuContextProvider
|
|
@@ -3227,14 +3267,16 @@ const Menu = _ref => {
|
|
|
3227
3267
|
isOpen,
|
|
3228
3268
|
onIsOpenChange,
|
|
3229
3269
|
isDisabled,
|
|
3230
|
-
children
|
|
3270
|
+
children,
|
|
3271
|
+
isVirtualizationDisabled
|
|
3231
3272
|
} = _ref;
|
|
3232
3273
|
if (typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test' && window) {
|
|
3233
3274
|
var _window$ResizeObserve, _window$PointerEvent;
|
|
3234
|
-
window.ResizeObserver = (_window$ResizeObserve = window.ResizeObserver) !== null && _window$ResizeObserve !== void 0 ? _window$ResizeObserve : ResizeObserver;
|
|
3275
|
+
window.ResizeObserver = (_window$ResizeObserve = window.ResizeObserver) !== null && _window$ResizeObserve !== void 0 ? _window$ResizeObserve : resizeObserver.ResizeObserver;
|
|
3235
3276
|
window.PointerEvent = (_window$PointerEvent = window.PointerEvent) !== null && _window$PointerEvent !== void 0 ? _window$PointerEvent : PointerEvent;
|
|
3236
3277
|
}
|
|
3237
3278
|
const [open, setOpen] = index.useControllableState(isOpen, onIsOpenChange, isOpen);
|
|
3279
|
+
const virtuoso = React.useRef(null);
|
|
3238
3280
|
const [maskHeight, setMaskHeight] = React.useState(null);
|
|
3239
3281
|
const [maskWidth, setMaskWidth] = React.useState(null);
|
|
3240
3282
|
const [submenus, setSubmenus] = React.useState(new Set());
|
|
@@ -3250,6 +3292,16 @@ const Menu = _ref => {
|
|
|
3250
3292
|
return clone;
|
|
3251
3293
|
});
|
|
3252
3294
|
};
|
|
3295
|
+
|
|
3296
|
+
// Virtuoso and Radix-Dropdown have conflicting ResizeObserver behavior
|
|
3297
|
+
// according to the author of the error, this is not a problem https://stackoverflow.com/a/50387233/9487902
|
|
3298
|
+
// the virtuoso library author recommends this approach for conflicting libraries https://virtuoso.dev/react-beautiful-dnd/
|
|
3299
|
+
index.useEventListener(window, 'error', e => {
|
|
3300
|
+
if (e.message === 'ResizeObserver loop completed with undelivered notifications.' || e.message === 'ResizeObserver loop limit exceeded') {
|
|
3301
|
+
e.stopImmediatePropagation();
|
|
3302
|
+
e.preventDefault();
|
|
3303
|
+
}
|
|
3304
|
+
});
|
|
3253
3305
|
const openPaneDepth = React.useMemo(() => open ? submenus.size + 1 : 0, [submenus, open]);
|
|
3254
3306
|
const [searchBarConfigs, setSearchBarConfigs] = React.useState([]);
|
|
3255
3307
|
return /*#__PURE__*/React__default["default"].createElement(MenuContextProvider, {
|
|
@@ -3265,7 +3317,9 @@ const Menu = _ref => {
|
|
|
3265
3317
|
searchBarConfigs,
|
|
3266
3318
|
setSearchBarConfigs,
|
|
3267
3319
|
maskWidth,
|
|
3268
|
-
setMaskWidth
|
|
3320
|
+
setMaskWidth,
|
|
3321
|
+
virtuoso,
|
|
3322
|
+
isVirtualizationDisabled
|
|
3269
3323
|
}
|
|
3270
3324
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Root, {
|
|
3271
3325
|
open: open,
|
|
@@ -3274,27 +3328,6 @@ const Menu = _ref => {
|
|
|
3274
3328
|
}, children));
|
|
3275
3329
|
};
|
|
3276
3330
|
|
|
3277
|
-
// https://github.com/radix-ui/primitives/issues/420#issuecomment-771615182
|
|
3278
|
-
class ResizeObserver {
|
|
3279
|
-
constructor(cb) {
|
|
3280
|
-
this.cb = cb;
|
|
3281
|
-
}
|
|
3282
|
-
observe() {
|
|
3283
|
-
this.cb([{
|
|
3284
|
-
borderBoxSize: {
|
|
3285
|
-
inlineSize: 0,
|
|
3286
|
-
blockSize: 0
|
|
3287
|
-
}
|
|
3288
|
-
}]);
|
|
3289
|
-
}
|
|
3290
|
-
|
|
3291
|
-
// eslint-disable-next-line class-methods-use-this
|
|
3292
|
-
unobserve() {}
|
|
3293
|
-
|
|
3294
|
-
// eslint-disable-next-line class-methods-use-this
|
|
3295
|
-
disconnect() {}
|
|
3296
|
-
}
|
|
3297
|
-
|
|
3298
3331
|
// https://github.com/radix-ui/primitives/issues/1220#issuecomment-1087465026
|
|
3299
3332
|
class PointerEvent extends Event {
|
|
3300
3333
|
constructor(type, props) {
|
|
@@ -3305,9 +3338,9 @@ class PointerEvent extends Event {
|
|
|
3305
3338
|
}
|
|
3306
3339
|
}
|
|
3307
3340
|
|
|
3308
|
-
var css_248z$5 = ".
|
|
3309
|
-
var styles$5 = {"buttonContainer":"
|
|
3310
|
-
var stylesheet$5=".
|
|
3341
|
+
var css_248z$5 = "._qPO2N{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._qPO2N>._LMM7F{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._qPO2N>._LMM7F:hover:not([aria-disabled=true]){background-color:#f5f5f5}._qPO2N>._LMM7F.focus-visible,._qPO2N>._LMM7F:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._qPO2N>._LMM7F+._CybpI{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._qPO2N>._LMM7F[data-state=open]+._CybpI{transform:rotate(-180deg) translateY(50%)}._qPO2N>._LMM7F[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._qPO2N>._LMM7F[aria-disabled=true]+._CybpI{fill:#515559;opacity:.4}._80Rak>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;max-width:350px;min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._80Rak>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._xuYn0{margin:0;padding-bottom:var(--flyout-bottom-padding);background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:var(--flyout-max-height)}._xuYn0 ._D3UnL{height:100%;overflow-y:scroll}._xuYn0._FSLAc{margin-left:30px;opacity:0}._xuYn0._gJcSW{margin-left:-30px}._RNpnr{position:relative;padding:10px 12px;display:flex;flex-direction:row;min-height:40px;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._RNpnr._pwzGH{cursor:unset}._RNpnr ._-eVgs{fill:#32363a;margin-right:4px}._RNpnr:focus,._RNpnr:hover:not(._RNpnr._pwzGH){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._RNpnr[aria-disabled=true]{cursor:not-allowed;opacity:.65}._RNpnr._-UxmZ{padding-right:32px}._RNpnr._-UxmZ ._CybpI{position:absolute;height:100%;right:3px;fill:#515559}._RNpnr._3kpmb{pointer-events:none}._dIe12{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._dIe12._1NM5g{padding-top:52px}._dHI1G{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._BbWig{position:absolute;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._BbWig._gJcSW{opacity:0}._BbWig._gJcSW>._iVw9p{margin-left:-30px}._BbWig._FSLAc{opacity:0}._BbWig._FSLAc>._iVw9p{margin-left:30px}._BbWig>._iVw9p{transition:margin-left .35s;width:100%}._BbWig._3kpmb{pointer-events:none}body.keyboard-user ._RNpnr:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3342
|
+
var styles$5 = {"buttonContainer":"_qPO2N","button":"_LMM7F","rightIcon":"_CybpI","maskContainer":"_80Rak","flyout":"_xuYn0","scrollContainer":"_D3UnL","animatedRight":"_FSLAc","animatedLeft":"_gJcSW","menuItem":"_RNpnr","noItems":"_pwzGH","backIcon":"_-eVgs","subMenu":"_-UxmZ","unresponsive":"_3kpmb","stickyBox":"_dIe12","isSearchable":"_1NM5g","searchBoxesContainer":"_dHI1G","searchBox":"_BbWig","searchInput":"_iVw9p"};
|
|
3343
|
+
var stylesheet$5="._qPO2N{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._qPO2N>._LMM7F{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._qPO2N>._LMM7F:hover:not([aria-disabled=true]){background-color:#f5f5f5}._qPO2N>._LMM7F.focus-visible,._qPO2N>._LMM7F:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._qPO2N>._LMM7F+._CybpI{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._qPO2N>._LMM7F[data-state=open]+._CybpI{transform:rotate(-180deg) translateY(50%)}._qPO2N>._LMM7F[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._qPO2N>._LMM7F[aria-disabled=true]+._CybpI{fill:#515559;opacity:.4}._80Rak>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;max-width:350px;min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._80Rak>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._xuYn0{margin:0;padding-bottom:var(--flyout-bottom-padding);background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:var(--flyout-max-height)}._xuYn0 ._D3UnL{height:100%;overflow-y:scroll}._xuYn0._FSLAc{margin-left:30px;opacity:0}._xuYn0._gJcSW{margin-left:-30px}._RNpnr{position:relative;padding:10px 12px;display:flex;flex-direction:row;min-height:40px;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._RNpnr._pwzGH{cursor:unset}._RNpnr ._-eVgs{fill:#32363a;margin-right:4px}._RNpnr:focus,._RNpnr:hover:not(._RNpnr._pwzGH){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._RNpnr[aria-disabled=true]{cursor:not-allowed;opacity:.65}._RNpnr._-UxmZ{padding-right:32px}._RNpnr._-UxmZ ._CybpI{position:absolute;height:100%;right:3px;fill:#515559}._RNpnr._3kpmb{pointer-events:none}._dIe12{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._dIe12._1NM5g{padding-top:52px}._dHI1G{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._BbWig{position:absolute;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._BbWig._gJcSW{opacity:0}._BbWig._gJcSW>._iVw9p{margin-left:-30px}._BbWig._FSLAc{opacity:0}._BbWig._FSLAc>._iVw9p{margin-left:30px}._BbWig>._iVw9p{transition:margin-left .35s;width:100%}._BbWig._3kpmb{pointer-events:none}body.keyboard-user ._RNpnr:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3311
3344
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$5);}
|
|
3312
3345
|
|
|
3313
3346
|
/* eslint-disable import/prefer-default-export */
|
|
@@ -3427,14 +3460,63 @@ const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3427
3460
|
}));
|
|
3428
3461
|
});
|
|
3429
3462
|
|
|
3463
|
+
/*
|
|
3464
|
+
this hook returns a method that
|
|
3465
|
+
1. Scrolls to the top or bottom boundary of a virtual list
|
|
3466
|
+
2. waits until the `visibleChildren` prop has updated completely
|
|
3467
|
+
3. Uses `visibleChildren`'s ref to focus.
|
|
3468
|
+
*/
|
|
3469
|
+
const useFocusVirtualBoundary = function (visibleChildren) {
|
|
3470
|
+
let backButtonRef = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
3471
|
+
const [scrollComplete, setScrollComplete] = React.useState(null);
|
|
3472
|
+
const {
|
|
3473
|
+
virtuoso
|
|
3474
|
+
} = useMenuContext();
|
|
3475
|
+
index.useDidUpdate(() => {
|
|
3476
|
+
window.requestAnimationFrame(() => {
|
|
3477
|
+
if (scrollComplete && visibleChildren[visibleChildren.length - 1].element.current) {
|
|
3478
|
+
if (scrollComplete === 'top' && backButtonRef !== null && backButtonRef !== void 0 && backButtonRef.current) {
|
|
3479
|
+
backButtonRef === null || backButtonRef === void 0 || backButtonRef.current.focus();
|
|
3480
|
+
} else {
|
|
3481
|
+
var _visibleChildren;
|
|
3482
|
+
(_visibleChildren = visibleChildren[scrollComplete === 'bottom' ? visibleChildren.length - 1 : 0]) === null || _visibleChildren === void 0 || (_visibleChildren = _visibleChildren.element) === null || _visibleChildren === void 0 || (_visibleChildren = _visibleChildren.current) === null || _visibleChildren === void 0 || _visibleChildren.focus();
|
|
3483
|
+
}
|
|
3484
|
+
setScrollComplete(null);
|
|
3485
|
+
}
|
|
3486
|
+
});
|
|
3487
|
+
}, [visibleChildren, scrollComplete]);
|
|
3488
|
+
return topOrBottom => {
|
|
3489
|
+
var _virtuoso$current;
|
|
3490
|
+
(_virtuoso$current = virtuoso.current) === null || _virtuoso$current === void 0 || _virtuoso$current.scrollToIndex({
|
|
3491
|
+
index: topOrBottom === 'top' ? 0 : 'LAST',
|
|
3492
|
+
behavior: 'auto'
|
|
3493
|
+
});
|
|
3494
|
+
setScrollComplete(topOrBottom);
|
|
3495
|
+
};
|
|
3496
|
+
};
|
|
3497
|
+
|
|
3430
3498
|
// abstracts the logic required for searching by both `MenuPane` and `SubMenu`
|
|
3431
3499
|
// creates a searchBarConfig, which maps to an instance of `MenuSearch`
|
|
3432
3500
|
// returns values that are necessary for use within pane
|
|
3433
|
-
function usePaneSearch(
|
|
3501
|
+
function usePaneSearch(_ref) {
|
|
3434
3502
|
var _searchRef$current$qu, _searchRef$current;
|
|
3435
|
-
let
|
|
3436
|
-
|
|
3437
|
-
|
|
3503
|
+
let {
|
|
3504
|
+
isSearchable,
|
|
3505
|
+
externalSearchValue,
|
|
3506
|
+
onSearchValueChange,
|
|
3507
|
+
items,
|
|
3508
|
+
animatedLeft,
|
|
3509
|
+
animatedRight,
|
|
3510
|
+
menuParentDataTestId,
|
|
3511
|
+
id,
|
|
3512
|
+
flyoutRef,
|
|
3513
|
+
children,
|
|
3514
|
+
isSearchFilteringDisabled,
|
|
3515
|
+
backButtonRef,
|
|
3516
|
+
closeSubmenu,
|
|
3517
|
+
isVirtualized
|
|
3518
|
+
} = _ref;
|
|
3519
|
+
const withinSelect = useSelectContext(true) !== null;
|
|
3438
3520
|
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
3439
3521
|
const [zeroSearchResults, setZeroSearchResults] = React.useState();
|
|
3440
3522
|
const {
|
|
@@ -3442,22 +3524,34 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3442
3524
|
} = index.useTranslation();
|
|
3443
3525
|
const noMatchesText = translate('menu.noItemsToDisplay');
|
|
3444
3526
|
const searchPlaceholder = translate('searchText');
|
|
3527
|
+
const filteredChildren = React.useMemo(() => (Array.isArray(children) ? children : [children]).filter(_ref2 => {
|
|
3528
|
+
var _props$label, _searchMatcher$toLowe;
|
|
3529
|
+
let {
|
|
3530
|
+
props
|
|
3531
|
+
} = _ref2;
|
|
3532
|
+
if (!props || !internalSearchValue || isSearchFilteringDisabled) {
|
|
3533
|
+
return true;
|
|
3534
|
+
}
|
|
3535
|
+
const searchMatcher = (_props$label = props.label) !== null && _props$label !== void 0 ? _props$label : typeof props.children === 'string' ? props.children : undefined;
|
|
3536
|
+
return searchMatcher === null || searchMatcher === void 0 || (_searchMatcher$toLowe = searchMatcher.toLowerCase) === null || _searchMatcher$toLowe === void 0 ? void 0 : _searchMatcher$toLowe.call(searchMatcher).includes(internalSearchValue.toLowerCase());
|
|
3537
|
+
}), [internalSearchValue, children, isSearchFilteringDisabled]);
|
|
3538
|
+
const focusVirtualBoundary = useFocusVirtualBoundary(items, backButtonRef);
|
|
3445
3539
|
React.useEffect(() => setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0), [items, internalSearchValue]);
|
|
3446
3540
|
const searchRef = React.useRef(null);
|
|
3447
3541
|
const searchInput = (_searchRef$current$qu = (_searchRef$current = searchRef.current) === null || _searchRef$current === void 0 ? void 0 : _searchRef$current.querySelector('input')) !== null && _searchRef$current$qu !== void 0 ? _searchRef$current$qu : null;
|
|
3448
|
-
const
|
|
3542
|
+
const getFirstVisibleItem = () => {
|
|
3449
3543
|
var _backButtonRef$curren, _items$find;
|
|
3450
3544
|
return (_backButtonRef$curren = backButtonRef === null || backButtonRef === void 0 ? void 0 : backButtonRef.current) !== null && _backButtonRef$curren !== void 0 ? _backButtonRef$curren : (_items$find = items.find(item => item.element.current)) === null || _items$find === void 0 ? void 0 : _items$find.element.current;
|
|
3451
3545
|
};
|
|
3452
|
-
const
|
|
3546
|
+
const getLastVisibleItem = () => {
|
|
3453
3547
|
var _findLast$element$cur, _findLast;
|
|
3454
3548
|
return (// our tsconfig does not target a recent enough version to use `Array.prototype.findLast`
|
|
3455
3549
|
(_findLast$element$cur = (_findLast = items.findLast(item => item.element.current)) === null || _findLast === void 0 ? void 0 : _findLast.element.current) !== null && _findLast$element$cur !== void 0 ? _findLast$element$cur : backButtonRef === null || backButtonRef === void 0 ? void 0 : backButtonRef.current
|
|
3456
3550
|
);
|
|
3457
3551
|
};
|
|
3458
3552
|
index.useEventListener(flyoutRef, 'keydown', e => {
|
|
3459
|
-
if (KEYS$1.NAVIGATE_UP.includes(e.key) && e.target ===
|
|
3460
|
-
searchInput === null || searchInput === void 0
|
|
3553
|
+
if (KEYS$1.NAVIGATE_UP.includes(e.key) && e.target === getFirstVisibleItem() || KEYS$1.NAVIGATE_DOWN.includes(e.key) && e.target === getLastVisibleItem()) {
|
|
3554
|
+
searchInput === null || searchInput === void 0 || searchInput.focus();
|
|
3461
3555
|
}
|
|
3462
3556
|
}, {
|
|
3463
3557
|
additionalDependencies: [flyoutRef.current],
|
|
@@ -3468,17 +3562,25 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3468
3562
|
var _e$target;
|
|
3469
3563
|
lastestKeyPressedInSearchInput.current = e.key;
|
|
3470
3564
|
if ([...KEYS$1.NAVIGATE_DOWN, ...KEYS$1.NAVIGATE_TOP].includes(e.key)) {
|
|
3471
|
-
var _getFirstNonNullItem;
|
|
3472
3565
|
// prevent scrolling
|
|
3473
3566
|
e.preventDefault();
|
|
3474
|
-
|
|
3567
|
+
if (isVirtualized) {
|
|
3568
|
+
focusVirtualBoundary('top');
|
|
3569
|
+
} else {
|
|
3570
|
+
var _getFirstVisibleItem;
|
|
3571
|
+
(_getFirstVisibleItem = getFirstVisibleItem()) === null || _getFirstVisibleItem === void 0 || _getFirstVisibleItem.focus();
|
|
3572
|
+
}
|
|
3475
3573
|
} else if ([...KEYS$1.NAVIGATE_UP, ...KEYS$1.NAVIIGATE_BOTTOM].includes(e.key)) {
|
|
3476
|
-
var _getLastNonNullItem;
|
|
3477
3574
|
// prevent scrolling
|
|
3478
3575
|
e.preventDefault();
|
|
3479
|
-
|
|
3576
|
+
if (isVirtualized) {
|
|
3577
|
+
focusVirtualBoundary('bottom');
|
|
3578
|
+
} else {
|
|
3579
|
+
var _getLastVisibleItem;
|
|
3580
|
+
(_getLastVisibleItem = getLastVisibleItem()) === null || _getLastVisibleItem === void 0 || _getLastVisibleItem.focus();
|
|
3581
|
+
}
|
|
3480
3582
|
} else if (KEYS$1.CLOSE_SUBMENU.includes(e.key) && ((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3481
|
-
closeSubmenu === null || closeSubmenu === void 0
|
|
3583
|
+
closeSubmenu === null || closeSubmenu === void 0 || closeSubmenu(e);
|
|
3482
3584
|
} else if (KEYS$1.IGNORED_BY_SEARCH_INPUT.includes(e.key)) {
|
|
3483
3585
|
e.preventDefault();
|
|
3484
3586
|
}
|
|
@@ -3543,7 +3645,8 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3543
3645
|
return {
|
|
3544
3646
|
internalSearchValue,
|
|
3545
3647
|
noSearchResultsNode,
|
|
3546
|
-
onInteractOutside
|
|
3648
|
+
onInteractOutside,
|
|
3649
|
+
filteredChildren
|
|
3547
3650
|
};
|
|
3548
3651
|
}
|
|
3549
3652
|
|
|
@@ -3555,15 +3658,15 @@ const useMutationObserver = (target, options, onMutate) => React.useEffect(() =>
|
|
|
3555
3658
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3556
3659
|
args[_key] = arguments[_key];
|
|
3557
3660
|
}
|
|
3558
|
-
onMutate === null || onMutate === void 0
|
|
3661
|
+
onMutate === null || onMutate === void 0 || onMutate(...args);
|
|
3559
3662
|
});
|
|
3560
3663
|
observer.observe(target, options);
|
|
3561
3664
|
return () => observer.disconnect();
|
|
3562
3665
|
}, [target, options, onMutate]);
|
|
3563
3666
|
|
|
3564
|
-
var css_248z$4 = ".
|
|
3565
|
-
var styles$4 = {"overlay":"
|
|
3566
|
-
var stylesheet$4=".
|
|
3667
|
+
var css_248z$4 = "._Z8duO{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._Zzbgz{visibility:hidden}";
|
|
3668
|
+
var styles$4 = {"overlay":"_Z8duO","hidden":"_Zzbgz"};
|
|
3669
|
+
var stylesheet$4="._Z8duO{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._Zzbgz{visibility:hidden}";
|
|
3567
3670
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$4);}
|
|
3568
3671
|
|
|
3569
3672
|
/**
|
|
@@ -3613,12 +3716,12 @@ const useOverlay = _ref => {
|
|
|
3613
3716
|
Array.from(containerNode.children).forEach(child => {
|
|
3614
3717
|
if (!ignoreIds.includes(child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3615
3718
|
});
|
|
3616
|
-
overlayNode === null || overlayNode === void 0
|
|
3719
|
+
overlayNode === null || overlayNode === void 0 || overlayNode.classList.remove(styles$4.hidden);
|
|
3617
3720
|
} else {
|
|
3618
3721
|
Array.from(containerNode.children).forEach(child => {
|
|
3619
3722
|
child.removeAttribute('inert');
|
|
3620
3723
|
});
|
|
3621
|
-
overlayNode === null || overlayNode === void 0
|
|
3724
|
+
overlayNode === null || overlayNode === void 0 || overlayNode.classList.add(styles$4.hidden);
|
|
3622
3725
|
}
|
|
3623
3726
|
return () => {
|
|
3624
3727
|
Array.from(containerNode.children).forEach(child => {
|
|
@@ -3672,8 +3775,8 @@ const SubSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3672
3775
|
if (isDisabled) {
|
|
3673
3776
|
return;
|
|
3674
3777
|
}
|
|
3675
|
-
e === null || e === void 0
|
|
3676
|
-
setSelectedValues === null || setSelectedValues === void 0
|
|
3778
|
+
e === null || e === void 0 || e.stopPropagation();
|
|
3779
|
+
setSelectedValues === null || setSelectedValues === void 0 || setSelectedValues(previouslySelectedValues => {
|
|
3677
3780
|
// exclude duplicates
|
|
3678
3781
|
const prevSet = new Set(previouslySelectedValues);
|
|
3679
3782
|
if (checkedState === 'true') {
|
|
@@ -3717,9 +3820,9 @@ const SubSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3717
3820
|
}, /*#__PURE__*/React__default["default"].createElement(SubMenu$1, sharedSubMenuProps, children));
|
|
3718
3821
|
});
|
|
3719
3822
|
|
|
3720
|
-
var css_248z$3 = ".
|
|
3721
|
-
var styles$3 = {"isInvalid":"
|
|
3722
|
-
var stylesheet$3=".
|
|
3823
|
+
var css_248z$3 = "._9lxAF{box-shadow:inset 0 0 0 1px #b00!important}._DuAgx{width:unset!important;min-height:unset!important;padding:0!important;margin-right:7px}._05qyc{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
3824
|
+
var styles$3 = {"isInvalid":"_9lxAF","checkbox":"_DuAgx","selectedItem":"_05qyc"};
|
|
3825
|
+
var stylesheet$3="._9lxAF{box-shadow:inset 0 0 0 1px #b00!important}._DuAgx{width:unset!important;min-height:unset!important;padding:0!important;margin-right:7px}._05qyc{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
3723
3826
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$3);}
|
|
3724
3827
|
|
|
3725
3828
|
const SelectItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -3795,8 +3898,105 @@ const SelectedItems = () => {
|
|
|
3795
3898
|
})));
|
|
3796
3899
|
};
|
|
3797
3900
|
|
|
3901
|
+
const PaneChildren = _ref => {
|
|
3902
|
+
var _useSelectContext, _containerRef$current, _containerRef$current2;
|
|
3903
|
+
let {
|
|
3904
|
+
children
|
|
3905
|
+
} = _ref;
|
|
3906
|
+
const {
|
|
3907
|
+
virtuoso
|
|
3908
|
+
} = useMenuContext();
|
|
3909
|
+
const {
|
|
3910
|
+
multiselect,
|
|
3911
|
+
showSelectedItemsPane
|
|
3912
|
+
} = (_useSelectContext = useSelectContext(true)) !== null && _useSelectContext !== void 0 ? _useSelectContext : {};
|
|
3913
|
+
const {
|
|
3914
|
+
closeSubmenu: containedWithinSubpane,
|
|
3915
|
+
isVirtualized
|
|
3916
|
+
} = usePaneContext();
|
|
3917
|
+
const containerRef = React.useRef(null);
|
|
3918
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3919
|
+
ref: containerRef,
|
|
3920
|
+
className: styles$5.scrollContainer,
|
|
3921
|
+
style: {
|
|
3922
|
+
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))")
|
|
3923
|
+
}
|
|
3924
|
+
}, isVirtualized ? /*#__PURE__*/React__default["default"].createElement(reactVirtuoso.Virtuoso, {
|
|
3925
|
+
ref: virtuoso,
|
|
3926
|
+
increaseViewportBy: 250,
|
|
3927
|
+
customScrollParent: (_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : undefined,
|
|
3928
|
+
data: Array.isArray(children) ? children : [children],
|
|
3929
|
+
itemContent: (index, child) => ! /*#__PURE__*/React__default["default"].isValidElement(child) ? null : /*#__PURE__*/React__default["default"].createElement(ItemContextProvider, {
|
|
3930
|
+
value: {
|
|
3931
|
+
virtualIndex: index + (multiselect && showSelectedItemsPane && !containedWithinSubpane ? 1 : 0)
|
|
3932
|
+
}
|
|
3933
|
+
}, child)
|
|
3934
|
+
}) : /*#__PURE__*/React__default["default"].createElement(ItemContextProvider, {
|
|
3935
|
+
value: {
|
|
3936
|
+
virtualIndex: undefined
|
|
3937
|
+
}
|
|
3938
|
+
}, children));
|
|
3939
|
+
};
|
|
3940
|
+
|
|
3941
|
+
const useIsVirtualized = function (children) {
|
|
3942
|
+
let isVirtualizationDisabled = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
3943
|
+
return React.useMemo(() => !isVirtualizationDisabled && React__default["default"].Children.count(children) >= 25, [children, isVirtualizationDisabled]);
|
|
3944
|
+
};
|
|
3945
|
+
|
|
3946
|
+
const useMaskDimensions = (target, animatedLeft, paneDepth, children) => {
|
|
3947
|
+
var _process$env;
|
|
3948
|
+
const {
|
|
3949
|
+
setMaskHeight,
|
|
3950
|
+
maskHeight,
|
|
3951
|
+
setMaskWidth,
|
|
3952
|
+
openPaneDepth,
|
|
3953
|
+
open
|
|
3954
|
+
} = useMenuContext();
|
|
3955
|
+
const updateMaskDimensions = () => {
|
|
3956
|
+
if (target) {
|
|
3957
|
+
setMaskHeight(target.clientHeight);
|
|
3958
|
+
setMaskWidth(target.clientWidth);
|
|
3959
|
+
}
|
|
3960
|
+
};
|
|
3961
|
+
const auto = 'auto';
|
|
3962
|
+
|
|
3963
|
+
// resets dimensions on menu close, so that the top-level pane reopens immediately, rather than animating
|
|
3964
|
+
React.useEffect(() => {
|
|
3965
|
+
if (!open) {
|
|
3966
|
+
setMaskHeight(auto);
|
|
3967
|
+
setMaskWidth(auto);
|
|
3968
|
+
}
|
|
3969
|
+
}, [open, setMaskHeight, setMaskWidth]);
|
|
3970
|
+
|
|
3971
|
+
// handles async children adjustments by consumer
|
|
3972
|
+
index.useDidUpdate(() => {
|
|
3973
|
+
if (paneDepth === openPaneDepth) {
|
|
3974
|
+
updateMaskDimensions();
|
|
3975
|
+
}
|
|
3976
|
+
},
|
|
3977
|
+
// ignoring other dependencies because this should only run when the children change
|
|
3978
|
+
[children]);
|
|
3979
|
+
|
|
3980
|
+
// handles returning to this pane by traversing backwards
|
|
3981
|
+
index.useDidUpdate(() => {
|
|
3982
|
+
if (!animatedLeft) {
|
|
3983
|
+
updateMaskDimensions();
|
|
3984
|
+
}
|
|
3985
|
+
}, [animatedLeft]);
|
|
3986
|
+
|
|
3987
|
+
// handles dynamic resizing by both radix and virtuoso
|
|
3988
|
+
useResizeObserver__default["default"](target, () => {
|
|
3989
|
+
if (openPaneDepth === paneDepth) {
|
|
3990
|
+
updateMaskDimensions();
|
|
3991
|
+
}
|
|
3992
|
+
});
|
|
3993
|
+
|
|
3994
|
+
// determines if the mask is ready
|
|
3995
|
+
return maskHeight !== auto || typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test';
|
|
3996
|
+
};
|
|
3997
|
+
|
|
3798
3998
|
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3799
|
-
var _flyoutRef$current$pa, _flyoutRef$
|
|
3999
|
+
var _flyoutRef$current$pa, _flyoutRef$current, _flyoutRef$current2;
|
|
3800
4000
|
let {
|
|
3801
4001
|
placement,
|
|
3802
4002
|
children,
|
|
@@ -3805,7 +4005,6 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3805
4005
|
onSearchValueChange,
|
|
3806
4006
|
isSearchFilteringDisabled = false,
|
|
3807
4007
|
className,
|
|
3808
|
-
style,
|
|
3809
4008
|
zIndex = 1000,
|
|
3810
4009
|
...rest
|
|
3811
4010
|
} = _ref;
|
|
@@ -3823,56 +4022,60 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3823
4022
|
var _placement$split, _placement$split2;
|
|
3824
4023
|
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 : [];
|
|
3825
4024
|
}, [placement]);
|
|
4025
|
+
const thisPanesDepth = 1;
|
|
4026
|
+
const paneMaxHeight = 350;
|
|
4027
|
+
const paneBottomPadding = 4;
|
|
4028
|
+
const maskContainerId = index.useId();
|
|
4029
|
+
const [transform, setTransform] = React.useState('');
|
|
4030
|
+
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;
|
|
3826
4031
|
const {
|
|
3827
4032
|
dataTestId: rootDataTestId,
|
|
3828
4033
|
openPaneDepth,
|
|
3829
|
-
setMaskHeight,
|
|
3830
4034
|
maskHeight,
|
|
3831
4035
|
open,
|
|
3832
4036
|
triggerRef,
|
|
3833
4037
|
searchBarConfigs,
|
|
3834
|
-
|
|
3835
|
-
|
|
4038
|
+
maskWidth,
|
|
4039
|
+
isVirtualizationDisabled
|
|
3836
4040
|
} = useMenuContext();
|
|
3837
|
-
const
|
|
3838
|
-
const maskContainerId = 'maskContainer';
|
|
3839
|
-
useOverlay({
|
|
3840
|
-
isVisible: open,
|
|
3841
|
-
ignoreIds: [maskContainerId],
|
|
3842
|
-
opacity: 0
|
|
3843
|
-
});
|
|
4041
|
+
const isVirtualized = useIsVirtualized(children, isVirtualizationDisabled);
|
|
3844
4042
|
const animatedLeft = React.useMemo(() => openPaneDepth > thisPanesDepth, [openPaneDepth]);
|
|
3845
4043
|
const dataTestId = index.getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE);
|
|
3846
4044
|
const {
|
|
3847
|
-
internalSearchValue,
|
|
3848
4045
|
noSearchResultsNode,
|
|
3849
|
-
onInteractOutside
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
4046
|
+
onInteractOutside,
|
|
4047
|
+
filteredChildren
|
|
4048
|
+
} = usePaneSearch({
|
|
4049
|
+
isSearchable,
|
|
4050
|
+
externalSearchValue,
|
|
4051
|
+
onSearchValueChange,
|
|
4052
|
+
items,
|
|
4053
|
+
animatedLeft,
|
|
4054
|
+
animatedRight: false,
|
|
4055
|
+
menuParentDataTestId: dataTestId,
|
|
4056
|
+
id: index.useId(),
|
|
4057
|
+
flyoutRef,
|
|
4058
|
+
children,
|
|
4059
|
+
isSearchFilteringDisabled,
|
|
4060
|
+
isVirtualized
|
|
4061
|
+
});
|
|
4062
|
+
const focusVirtualBoundary = useFocusVirtualBoundary(items);
|
|
4063
|
+
const {
|
|
4064
|
+
isFocusVisible
|
|
4065
|
+
} = interactions.useFocusVisible();
|
|
4066
|
+
const maskIsReady = useMaskDimensions(flyoutRef.current, animatedLeft, thisPanesDepth, children);
|
|
4067
|
+
index.useDidUpdate(() => {
|
|
4068
|
+
if (maskIsReady && isFocusVisible) {
|
|
4069
|
+
items[0].element.current.focus();
|
|
3865
4070
|
}
|
|
3866
|
-
}, [
|
|
4071
|
+
}, [maskIsReady]);
|
|
3867
4072
|
const defaultSide = React.useMemo(() => {
|
|
3868
4073
|
var _triggerRef$current;
|
|
3869
4074
|
const rect = triggerRef === null || triggerRef === void 0 || (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getBoundingClientRect();
|
|
3870
4075
|
if (!rect) {
|
|
3871
4076
|
return 'bottom';
|
|
3872
4077
|
}
|
|
3873
|
-
|
|
3874
|
-
// hard coded in Menu.less
|
|
3875
|
-
let maxHeight = 350;
|
|
4078
|
+
let maxHeight = paneMaxHeight;
|
|
3876
4079
|
if (flyoutRef.current) {
|
|
3877
4080
|
const computedString = window.getComputedStyle(flyoutRef.current).maxHeight.slice(0, -2);
|
|
3878
4081
|
if (computedString !== '' && !Number.isNaN(+computedString)) {
|
|
@@ -3892,8 +4095,19 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3892
4095
|
// including `open` because the trigger location may change between openings
|
|
3893
4096
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3894
4097
|
[open, triggerRef]);
|
|
3895
|
-
|
|
3896
|
-
|
|
4098
|
+
|
|
4099
|
+
// We use the top-level Radix container as a mask. Radix does not expose this container to consumers, except through CSS.
|
|
4100
|
+
// These hooks dynamically update the style of that container using CSS variables.
|
|
4101
|
+
useCSSVariable('--mask-z-index', String(zIndex), [open]);
|
|
4102
|
+
useCSSVariable('--mask-width', "".concat(maskWidth, "px"));
|
|
4103
|
+
useCSSVariable('--mask-height', "".concat(maskHeight, "px"));
|
|
4104
|
+
useCSSVariable('--flyout-max-height', "".concat(paneMaxHeight, "px"));
|
|
4105
|
+
useCSSVariable('--flyout-bottom-padding', "".concat(paneBottomPadding, "px"));
|
|
4106
|
+
useOverlay({
|
|
4107
|
+
isVisible: open,
|
|
4108
|
+
ignoreIds: [maskContainerId],
|
|
4109
|
+
opacity: 0
|
|
4110
|
+
});
|
|
3897
4111
|
useMutationObserver(target, {
|
|
3898
4112
|
attributes: true,
|
|
3899
4113
|
attributeFilter: ['style']
|
|
@@ -3901,29 +4115,29 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3901
4115
|
var _style$transform, _style;
|
|
3902
4116
|
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 : '');
|
|
3903
4117
|
});
|
|
3904
|
-
|
|
3905
|
-
// We use the top-level Radix container as a mask. Radix does not expose this container to consumers, except through CSS.
|
|
3906
|
-
// This hook is dynamically updating the style of that container using a CSS variable.
|
|
3907
|
-
useCSSVariable('--mask-z-index', String(zIndex), [open]);
|
|
3908
|
-
useCSSVariable('--mask-width', "".concat(maskWidth, "px"));
|
|
3909
|
-
useCSSVariable('--mask-height', "".concat(maskHeight, "px"));
|
|
3910
4118
|
return /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3911
4119
|
items: items,
|
|
3912
4120
|
setItems: setItems,
|
|
3913
4121
|
value: {
|
|
3914
4122
|
dataTestId,
|
|
3915
|
-
searchValue: internalSearchValue,
|
|
3916
|
-
isSearchFilteringDisabled,
|
|
3917
4123
|
isInteractive: !animatedLeft,
|
|
3918
4124
|
flyoutRef,
|
|
3919
4125
|
stickyBoxRef,
|
|
3920
|
-
zIndex
|
|
4126
|
+
zIndex,
|
|
4127
|
+
focusVirtualBoundary,
|
|
4128
|
+
isVirtualized,
|
|
4129
|
+
maskIsReady
|
|
3921
4130
|
}
|
|
3922
4131
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Portal, {
|
|
3923
4132
|
container: portalTarget || undefined
|
|
3924
4133
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3925
4134
|
className: styles$5.maskContainer,
|
|
3926
|
-
id: maskContainerId
|
|
4135
|
+
id: maskContainerId,
|
|
4136
|
+
style: {
|
|
4137
|
+
// virtuoso and radix both do funny things with window.requestAnimationFrame that cause unpredictable resizing.
|
|
4138
|
+
// this causes jitters. We need to wait until it's done resizing.
|
|
4139
|
+
opacity: maskIsReady ? 1 : 0
|
|
4140
|
+
}
|
|
3927
4141
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Content, _extends__default["default"]({}, rest, {
|
|
3928
4142
|
onCloseAutoFocus: () => {
|
|
3929
4143
|
var _triggerRef$current2;
|
|
@@ -3938,8 +4152,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3938
4152
|
className: classNames__default["default"](className, {
|
|
3939
4153
|
[styles$5.animatedLeft]: animatedLeft
|
|
3940
4154
|
}, styles$5.flyout),
|
|
3941
|
-
onInteractOutside: onInteractOutside
|
|
3942
|
-
style: style
|
|
4155
|
+
onInteractOutside: onInteractOutside
|
|
3943
4156
|
}), (isSearchable || multiselect && showSelectedItemsPane) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3944
4157
|
className: classNames__default["default"](styles$5.stickyBox, {
|
|
3945
4158
|
[styles$5.isSearchable]: isSearchable
|
|
@@ -3948,12 +4161,12 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3948
4161
|
style: {
|
|
3949
4162
|
zIndex
|
|
3950
4163
|
}
|
|
3951
|
-
}, showSelectedItemsPane && multiselect && /*#__PURE__*/React__default["default"].createElement(SelectedItems, null)), noSearchResultsNode,
|
|
4164
|
+
}, showSelectedItemsPane && multiselect && /*#__PURE__*/React__default["default"].createElement(SelectedItems, null)), noSearchResultsNode, /*#__PURE__*/React__default["default"].createElement(PaneChildren, null, filteredChildren)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3952
4165
|
className: styles$5.searchBoxesContainer,
|
|
3953
4166
|
style: {
|
|
3954
4167
|
transform,
|
|
3955
4168
|
zIndex: zIndex + openPaneDepth,
|
|
3956
|
-
width: (_flyoutRef$
|
|
4169
|
+
width: (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.clientWidth
|
|
3957
4170
|
}
|
|
3958
4171
|
}, searchBarConfigs.length ? searchBarConfigs.map(_ref2 => {
|
|
3959
4172
|
let {
|
|
@@ -3982,24 +4195,25 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3982
4195
|
const itemRef = React.useRef(null);
|
|
3983
4196
|
const {
|
|
3984
4197
|
dataTestId: menuParentDataTestId,
|
|
3985
|
-
childIndex
|
|
3986
|
-
searchValue,
|
|
3987
|
-
isSearchFilteringDisabled,
|
|
4198
|
+
childIndex,
|
|
3988
4199
|
isInteractive,
|
|
3989
4200
|
closeSubmenu,
|
|
3990
4201
|
flyoutRef,
|
|
3991
|
-
stickyBoxRef
|
|
4202
|
+
stickyBoxRef,
|
|
4203
|
+
focusVirtualBoundary,
|
|
4204
|
+
isVirtualized: paneIsVirtualized,
|
|
4205
|
+
maskIsReady
|
|
3992
4206
|
} = usePaneContext(itemRef);
|
|
4207
|
+
const {
|
|
4208
|
+
virtualIndex
|
|
4209
|
+
} = useItemContext();
|
|
4210
|
+
const index$1 = React.useMemo(() => virtualIndex !== null && virtualIndex !== void 0 ? virtualIndex : childIndex, [childIndex, virtualIndex]);
|
|
3993
4211
|
const {
|
|
3994
4212
|
isFocusVisible
|
|
3995
4213
|
} = interactions.useFocusVisible({
|
|
3996
4214
|
isTextInput: true
|
|
3997
4215
|
});
|
|
3998
4216
|
const dataTestId = index.getSubDataTestId(menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.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), String(index$1));
|
|
3999
|
-
const isVisible = React.useMemo(() => {
|
|
4000
|
-
const searchMatcher = label !== null && label !== void 0 ? label : typeof children === 'string' ? children : undefined;
|
|
4001
|
-
return isSearchFilteringDisabled || !searchValue || (searchMatcher === null || searchMatcher === void 0 ? void 0 : searchMatcher.toLowerCase().includes(searchValue.toLowerCase()));
|
|
4002
|
-
}, [children, searchValue, label, isSearchFilteringDisabled]);
|
|
4003
4217
|
const handleFocus = () => {
|
|
4004
4218
|
if (itemRef.current && flyoutRef.current && isFocusVisible) {
|
|
4005
4219
|
var _stickyBoxRef$current, _stickyBoxRef$current2;
|
|
@@ -4012,7 +4226,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
4012
4226
|
}
|
|
4013
4227
|
}
|
|
4014
4228
|
};
|
|
4015
|
-
return
|
|
4229
|
+
return /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
4016
4230
|
asChild: asChild,
|
|
4017
4231
|
"aria-disabled": isDisabled,
|
|
4018
4232
|
className: classNames__default["default"](className, styles$5.menuItem, {
|
|
@@ -4026,7 +4240,13 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
4026
4240
|
return;
|
|
4027
4241
|
}
|
|
4028
4242
|
if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
4029
|
-
closeSubmenu === null || closeSubmenu === void 0
|
|
4243
|
+
closeSubmenu === null || closeSubmenu === void 0 || closeSubmenu(e);
|
|
4244
|
+
} else if (paneIsVirtualized && KEYS$1.NAVIGATE_TOP.includes(e.key)) {
|
|
4245
|
+
e.preventDefault();
|
|
4246
|
+
focusVirtualBoundary('top');
|
|
4247
|
+
} else if (paneIsVirtualized && KEYS$1.NAVIIGATE_BOTTOM.includes(e.key)) {
|
|
4248
|
+
e.preventDefault();
|
|
4249
|
+
focusVirtualBoundary('bottom');
|
|
4030
4250
|
}
|
|
4031
4251
|
},
|
|
4032
4252
|
onFocus: handleFocus
|
|
@@ -4034,16 +4254,16 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
4034
4254
|
// other pointer and keyboard events still work, even when disabled
|
|
4035
4255
|
,
|
|
4036
4256
|
onSelect: e => {
|
|
4037
|
-
if (isDisabled) {
|
|
4257
|
+
if (isDisabled || maskIsReady === false) {
|
|
4038
4258
|
e.preventDefault();
|
|
4039
4259
|
return;
|
|
4040
4260
|
}
|
|
4041
4261
|
if (multiselect) {
|
|
4042
4262
|
e.preventDefault();
|
|
4043
4263
|
}
|
|
4044
|
-
onSelect === null || onSelect === void 0
|
|
4264
|
+
onSelect === null || onSelect === void 0 || onSelect();
|
|
4045
4265
|
}
|
|
4046
|
-
}), (!children || typeof children === 'string') && label ? label : children)
|
|
4266
|
+
}), (!children || typeof children === 'string') && label ? label : children);
|
|
4047
4267
|
});
|
|
4048
4268
|
var MenuItem$1 = MenuItem;
|
|
4049
4269
|
|
|
@@ -4071,6 +4291,9 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4071
4291
|
triggerCheckedState = 'false',
|
|
4072
4292
|
onTriggerCheckboxSelect
|
|
4073
4293
|
} = selectContext !== null && selectContext !== void 0 ? selectContext : {};
|
|
4294
|
+
const {
|
|
4295
|
+
virtualIndex
|
|
4296
|
+
} = useItemContext();
|
|
4074
4297
|
const [items, setItems] = React.useState([]);
|
|
4075
4298
|
const internalId = index.useId();
|
|
4076
4299
|
const triggerRef = React.useRef(null);
|
|
@@ -4079,18 +4302,18 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4079
4302
|
const backButtonRef = React.useRef(null);
|
|
4080
4303
|
const {
|
|
4081
4304
|
dataTestId: paneContainingTriggerDataTestId,
|
|
4082
|
-
childIndex
|
|
4083
|
-
searchValue: paneContainingTriggerSearchValue,
|
|
4084
|
-
isSearchFilteringDisabled: isSearchFilteringDisabledForPaneContainingTrigger,
|
|
4305
|
+
childIndex,
|
|
4085
4306
|
isInteractive: paneContainingTriggerIsInteractive,
|
|
4086
4307
|
closeSubmenu: closeSubmenuContainingTrigger,
|
|
4087
|
-
zIndex: paneContainingTriggerZIndex
|
|
4308
|
+
zIndex: paneContainingTriggerZIndex,
|
|
4309
|
+
focusVirtualBoundary: focusVirtualBoundaryWithinPaneContainingTrigger,
|
|
4310
|
+
isVirtualized: paneContainingTriggerIsVirtualized
|
|
4088
4311
|
} = usePaneContext(triggerRef);
|
|
4312
|
+
const triggerIndex = React.useMemo(() => virtualIndex !== null && virtualIndex !== void 0 ? virtualIndex : childIndex, [childIndex, virtualIndex]);
|
|
4089
4313
|
const {
|
|
4090
4314
|
openPaneDepth: totalOpenPaneDepth,
|
|
4091
4315
|
registerSubmenu,
|
|
4092
|
-
|
|
4093
|
-
setMaskWidth
|
|
4316
|
+
isVirtualizationDisabled
|
|
4094
4317
|
} = useMenuContext();
|
|
4095
4318
|
const {
|
|
4096
4319
|
isFocusVisible
|
|
@@ -4108,14 +4331,30 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4108
4331
|
e.preventDefault();
|
|
4109
4332
|
registerSubmenu(internalId, false);
|
|
4110
4333
|
};
|
|
4334
|
+
const isVirtualized = useIsVirtualized(children, isVirtualizationDisabled);
|
|
4111
4335
|
const {
|
|
4112
|
-
internalSearchValue,
|
|
4113
4336
|
noSearchResultsNode,
|
|
4114
|
-
onInteractOutside
|
|
4115
|
-
|
|
4337
|
+
onInteractOutside,
|
|
4338
|
+
filteredChildren
|
|
4339
|
+
} = usePaneSearch({
|
|
4340
|
+
isSearchable,
|
|
4341
|
+
externalSearchValue,
|
|
4342
|
+
onSearchValueChange,
|
|
4343
|
+
items,
|
|
4344
|
+
animatedLeft,
|
|
4345
|
+
animatedRight,
|
|
4346
|
+
menuParentDataTestId: paneDataTestId,
|
|
4347
|
+
id: internalId,
|
|
4348
|
+
flyoutRef,
|
|
4349
|
+
children,
|
|
4350
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
|
|
4351
|
+
backButtonRef,
|
|
4352
|
+
closeSubmenu: closeThisSubmenu,
|
|
4353
|
+
isVirtualized
|
|
4354
|
+
});
|
|
4355
|
+
const focusVirtualBoundaryInPane = useFocusVirtualBoundary(items, backButtonRef);
|
|
4116
4356
|
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);
|
|
4117
4357
|
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);
|
|
4118
|
-
const triggerIsVisible = React.useMemo(() => isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && label.toLowerCase().includes(paneContainingTriggerSearchValue.toLowerCase()), [paneContainingTriggerSearchValue, label, isSearchFilteringDisabledForPaneContainingTrigger]);
|
|
4119
4358
|
index.useDidUpdate(() => {
|
|
4120
4359
|
if (isPaneInDOM) {
|
|
4121
4360
|
setIsTransitioningFromRight(true);
|
|
@@ -4124,30 +4363,13 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4124
4363
|
window.requestAnimationFrame(() => setIsFrameAfterPaneAddedToDOM(false));
|
|
4125
4364
|
}
|
|
4126
4365
|
registerSubmenu(internalId, isPaneInDOM);
|
|
4127
|
-
onIsOpenChange === null || onIsOpenChange === void 0
|
|
4366
|
+
onIsOpenChange === null || onIsOpenChange === void 0 || onIsOpenChange(isPaneInDOM);
|
|
4128
4367
|
}, [isPaneInDOM]);
|
|
4129
4368
|
|
|
4130
4369
|
// Omitted dependencies because this should only run on unmount
|
|
4131
4370
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4132
4371
|
React.useEffect(() => () => registerSubmenu(internalId, false), []);
|
|
4133
|
-
|
|
4134
|
-
if (thisPanesDepth === totalOpenPaneDepth && flyoutRef.current) {
|
|
4135
|
-
setMaskHeight(flyoutRef.current.clientHeight);
|
|
4136
|
-
setMaskWidth(flyoutRef.current.clientWidth);
|
|
4137
|
-
}
|
|
4138
|
-
},
|
|
4139
|
-
// ignoring other dependencies because this should only run when the children change
|
|
4140
|
-
[children]);
|
|
4141
|
-
index.useDidUpdate(() => {
|
|
4142
|
-
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
4143
|
-
window.requestAnimationFrame(() => {
|
|
4144
|
-
if (flyoutRef.current) {
|
|
4145
|
-
setMaskHeight(flyoutRef.current.clientHeight);
|
|
4146
|
-
setMaskWidth(flyoutRef.current.clientWidth);
|
|
4147
|
-
}
|
|
4148
|
-
});
|
|
4149
|
-
}
|
|
4150
|
-
}, [totalOpenPaneDepth, internalSearchValue]);
|
|
4372
|
+
useMaskDimensions(flyoutRef.current, animatedLeft, thisPanesDepth, children);
|
|
4151
4373
|
const handlePaneTransitionEnd = () => {
|
|
4152
4374
|
var _flyoutRef$current;
|
|
4153
4375
|
if (animatedLeft) {
|
|
@@ -4157,7 +4379,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4157
4379
|
setIsPaneInDOM(false);
|
|
4158
4380
|
if (isFocusVisible) {
|
|
4159
4381
|
var _triggerRef$current;
|
|
4160
|
-
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0
|
|
4382
|
+
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 || _triggerRef$current.focus();
|
|
4161
4383
|
}
|
|
4162
4384
|
return;
|
|
4163
4385
|
}
|
|
@@ -4172,7 +4394,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4172
4394
|
}
|
|
4173
4395
|
setIsTransitioningFromRight(false);
|
|
4174
4396
|
};
|
|
4175
|
-
return
|
|
4397
|
+
return /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, {
|
|
4176
4398
|
open: isPaneInDOM
|
|
4177
4399
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, _extends__default["default"]({
|
|
4178
4400
|
className: classNames__default["default"](styles$5.menuItem, styles$5.subMenu, {
|
|
@@ -4189,13 +4411,19 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4189
4411
|
return;
|
|
4190
4412
|
}
|
|
4191
4413
|
if (multiselect && !isSelectedItems && KEYS.CHECK_PARENT.includes(e.key)) {
|
|
4192
|
-
onTriggerCheckboxSelect === null || onTriggerCheckboxSelect === void 0
|
|
4414
|
+
onTriggerCheckboxSelect === null || onTriggerCheckboxSelect === void 0 || onTriggerCheckboxSelect();
|
|
4193
4415
|
return;
|
|
4194
4416
|
}
|
|
4195
4417
|
if (!isDisabled && KEYS$1.OPEN_SUBMENU.includes(e.key)) {
|
|
4196
4418
|
setIsPaneInDOM(true);
|
|
4197
4419
|
} else if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
4198
|
-
closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0
|
|
4420
|
+
closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 || closeSubmenuContainingTrigger(e);
|
|
4421
|
+
} else if (paneContainingTriggerIsVirtualized && KEYS$1.NAVIGATE_TOP.includes(e.key)) {
|
|
4422
|
+
e.preventDefault();
|
|
4423
|
+
focusVirtualBoundaryWithinPaneContainingTrigger('top');
|
|
4424
|
+
} else if (paneContainingTriggerIsVirtualized && KEYS$1.NAVIIGATE_BOTTOM.includes(e.key)) {
|
|
4425
|
+
e.preventDefault();
|
|
4426
|
+
focusVirtualBoundaryWithinPaneContainingTrigger('bottom');
|
|
4199
4427
|
}
|
|
4200
4428
|
}
|
|
4201
4429
|
}, subSelectTriggerProps), multiselect && !isSelectedItems ? /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
@@ -4210,13 +4438,13 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4210
4438
|
setItems: setItems,
|
|
4211
4439
|
value: {
|
|
4212
4440
|
dataTestId: paneDataTestId,
|
|
4213
|
-
searchValue: internalSearchValue,
|
|
4214
|
-
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
|
|
4215
4441
|
isInteractive: !isTransitioningFromRight && !animatedLeft && !animatedRight,
|
|
4216
4442
|
closeSubmenu: closeThisSubmenu,
|
|
4217
4443
|
flyoutRef,
|
|
4218
4444
|
stickyBoxRef,
|
|
4219
|
-
zIndex
|
|
4445
|
+
zIndex,
|
|
4446
|
+
focusVirtualBoundary: focusVirtualBoundaryInPane,
|
|
4447
|
+
isVirtualized
|
|
4220
4448
|
}
|
|
4221
4449
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubContent, _extends__default["default"]({}, rest, {
|
|
4222
4450
|
loop: !isSearchable,
|
|
@@ -4250,18 +4478,24 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4250
4478
|
onKeyDown: e => {
|
|
4251
4479
|
if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
4252
4480
|
closeThisSubmenu(e);
|
|
4481
|
+
} else if (isVirtualized && KEYS$1.NAVIGATE_TOP.includes(e.key)) {
|
|
4482
|
+
e.preventDefault();
|
|
4483
|
+
focusVirtualBoundaryInPane('top');
|
|
4484
|
+
} else if (isVirtualized && KEYS$1.NAVIIGATE_BOTTOM.includes(e.key)) {
|
|
4485
|
+
e.preventDefault();
|
|
4486
|
+
focusVirtualBoundaryInPane('bottom');
|
|
4253
4487
|
}
|
|
4254
4488
|
}
|
|
4255
4489
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ArrowLeftIcon, {
|
|
4256
4490
|
size: "small",
|
|
4257
4491
|
className: styles$5.backIcon
|
|
4258
|
-
}), label)), noSearchResultsNode,
|
|
4492
|
+
}), label)), noSearchResultsNode, /*#__PURE__*/React__default["default"].createElement(PaneChildren, null, filteredChildren))));
|
|
4259
4493
|
});
|
|
4260
4494
|
var SubMenu$1 = SubMenu;
|
|
4261
4495
|
|
|
4262
|
-
var css_248z$2 = ".
|
|
4263
|
-
var styles$2 = {"drawer":"
|
|
4264
|
-
var stylesheet$2=".
|
|
4496
|
+
var css_248z$2 = "._4ilZc{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._4QDJ5{visibility:hidden}._PV--s{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._gM59q{padding-top:8px}._PE8-R{margin-left:12px}";
|
|
4497
|
+
var styles$2 = {"drawer":"_4ilZc","hidden":"_4QDJ5","header":"_PV--s","title":"_gM59q","closeButton":"_PE8-R"};
|
|
4498
|
+
var stylesheet$2="._4ilZc{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._4QDJ5{visibility:hidden}._PV--s{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._gM59q{padding-top:8px}._PE8-R{margin-left:12px}";
|
|
4265
4499
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$2);}
|
|
4266
4500
|
|
|
4267
4501
|
const Drawer = _ref => {
|
|
@@ -4323,13 +4557,13 @@ const Drawer = _ref => {
|
|
|
4323
4557
|
} else {
|
|
4324
4558
|
var _elementRefToFocusOnC;
|
|
4325
4559
|
setIsClosing(true);
|
|
4326
|
-
if (elementRefToFocusOnClose !== undefined) elementRefToFocusOnClose === null || elementRefToFocusOnClose === void 0 || (_elementRefToFocusOnC = elementRefToFocusOnClose.current) === null || _elementRefToFocusOnC === void 0
|
|
4560
|
+
if (elementRefToFocusOnClose !== undefined) elementRefToFocusOnClose === null || elementRefToFocusOnClose === void 0 || (_elementRefToFocusOnC = elementRefToFocusOnClose.current) === null || _elementRefToFocusOnC === void 0 || _elementRefToFocusOnC.focus();else elementUsedToOpenModal === null || elementUsedToOpenModal === void 0 || elementUsedToOpenModal.focus();
|
|
4327
4561
|
}
|
|
4328
4562
|
}, [elementRefToFocusOnClose, isOpen]);
|
|
4329
4563
|
React.useEffect(() => {
|
|
4330
4564
|
if (isOpen && !isHidden) {
|
|
4331
4565
|
var _closeButtonRef$curre;
|
|
4332
|
-
(_closeButtonRef$curre = closeButtonRef.current) === null || _closeButtonRef$curre === void 0
|
|
4566
|
+
(_closeButtonRef$curre = closeButtonRef.current) === null || _closeButtonRef$curre === void 0 || _closeButtonRef$curre.focus();
|
|
4333
4567
|
}
|
|
4334
4568
|
}, [isOpen, isHidden]);
|
|
4335
4569
|
const handleTransitionEnd = () => {
|
|
@@ -4376,9 +4610,9 @@ const Drawer = _ref => {
|
|
|
4376
4610
|
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
4377
4611
|
};
|
|
4378
4612
|
|
|
4379
|
-
var css_248z$1 = ".
|
|
4380
|
-
var styles$1 = {"container":"
|
|
4381
|
-
var stylesheet$1=".
|
|
4613
|
+
var css_248z$1 = "._XZEa4{display:inline-block;position:relative}._swgrH{width:120px}._swgrH ._HleDR._sBSli{transform:rotate(-180deg)}._swgrH ._HleDR._SwxQE{fill:#9d9fa1;opacity:.4}._ja7Ma>input:focus{box-shadow:none!important;border:1px solid #898989!important}._wUI-U{width:120px}._wUI-U ._qt1F-._trZdw{background-color:#efefef;border-radius:6px}._HleDR{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._HleDR._sBSli{transform:rotate(-180deg)}";
|
|
4614
|
+
var styles$1 = {"container":"_XZEa4","input":"_swgrH","icon":"_HleDR","open":"_sBSli","disabled":"_SwxQE","ignoreFocusStyle":"_ja7Ma","flyout":"_wUI-U","option":"_qt1F-","exactMatch":"_trZdw"};
|
|
4615
|
+
var stylesheet$1="._XZEa4{display:inline-block;position:relative}._swgrH{width:120px}._swgrH ._HleDR._sBSli{transform:rotate(-180deg)}._swgrH ._HleDR._SwxQE{fill:#9d9fa1;opacity:.4}._ja7Ma>input:focus{box-shadow:none!important;border:1px solid #898989!important}._wUI-U{width:120px}._wUI-U ._qt1F-._trZdw{background-color:#efefef;border-radius:6px}._HleDR{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._HleDR._sBSli{transform:rotate(-180deg)}";
|
|
4382
4616
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$1);}
|
|
4383
4617
|
|
|
4384
4618
|
const TimeDropdown = _ref => {
|
|
@@ -4720,7 +4954,7 @@ const TimePickerIcon = _ref => {
|
|
|
4720
4954
|
onClick: !isDisabled ? () => {
|
|
4721
4955
|
var _inputRef$current;
|
|
4722
4956
|
setIsFlyoutOpen(i => !i);
|
|
4723
|
-
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0
|
|
4957
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
4724
4958
|
} : undefined,
|
|
4725
4959
|
onMouseDown: e => e.preventDefault(),
|
|
4726
4960
|
ref: iconRef
|
|
@@ -4952,9 +5186,9 @@ const {
|
|
|
4952
5186
|
Provider: ToggleButtonGroupContextProvider
|
|
4953
5187
|
} = index.createContextUtilities(null);
|
|
4954
5188
|
|
|
4955
|
-
var css_248z = ".
|
|
4956
|
-
var styles = {"default":"
|
|
4957
|
-
var stylesheet=".
|
|
5189
|
+
var css_248z = "._wLXVP{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._t1sGQ{background-color:rgba(50,54,58,.08)}._fmi-x{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._x-xdc{color:rgba(81,85,89,.4);cursor:not-allowed}._bUWve{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._pYs-j{color:#085caf;border-color:#085caf}._puWbh,._pYs-j{background:rgba(11,110,208,.11)}._puWbh{color:#0854a1;border-color:#0854a1}._-cRCV{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._emtvG{position:relative;display:inline-grid}._emtvG svg{fill:currentColor}._emtvG ._crG-p{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._emtvG ._crG-p+._bVpoF{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._emtvG ._crG-p+._bVpoF._brD49{padding:5px;max-width:36px;min-width:36px}._emtvG ._crG-p+._bVpoF._dG7c5{padding:0 16px}._emtvG ._crG-p+._bVpoF._7hq3B{padding:0 16px 0 12px}._emtvG ._crG-p:hover+._bVpoF{background-color:rgba(50,54,58,.08)}._emtvG ._crG-p:disabled+._bVpoF{color:rgba(81,85,89,.4);cursor:not-allowed}._emtvG ._crG-p:active+._bVpoF,._emtvG ._crG-p:focus:active+._bVpoF{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._emtvG ._crG-p:checked+._bVpoF{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._emtvG ._crG-p:checked:hover+._bVpoF{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._emtvG ._crG-p:checked:disabled+._bVpoF{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._emtvG ._crG-p:checked:active+._bVpoF,._emtvG ._crG-p:checked:focus:active+._bVpoF{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._bmbMD{display:inline-flex;position:relative}._bmbMD:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._bmbMD>*{flex-shrink:0;flex-grow:0}._nfgYX{border:none;margin:0;padding:0}._nfgYX legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._emtvG ._crG-p.focus-visible+._bVpoF,._emtvG ._crG-p:focus-visible+._bVpoF{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
5190
|
+
var styles = {"default":"_wLXVP","hovered":"_t1sGQ","pressed":"_fmi-x","disabled":"_x-xdc","selectedDefault":"_bUWve","selectedHovered":"_pYs-j","selectedPressed":"_puWbh","selectedDisabled":"_-cRCV","toggleContainer":"_emtvG","toggleInput":"_crG-p","toggleButton":"_bVpoF","iconOnly":"_brD49","text":"_dG7c5","iconText":"_7hq3B","toggleButtonGroup":"_bmbMD","toggleButtonGroupFieldset":"_nfgYX"};
|
|
5191
|
+
var stylesheet="._wLXVP{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._t1sGQ{background-color:rgba(50,54,58,.08)}._fmi-x{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._x-xdc{color:rgba(81,85,89,.4);cursor:not-allowed}._bUWve{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._pYs-j{color:#085caf;border-color:#085caf}._puWbh,._pYs-j{background:rgba(11,110,208,.11)}._puWbh{color:#0854a1;border-color:#0854a1}._-cRCV{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._emtvG{position:relative;display:inline-grid}._emtvG svg{fill:currentColor}._emtvG ._crG-p{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._emtvG ._crG-p+._bVpoF{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._emtvG ._crG-p+._bVpoF._brD49{padding:5px;max-width:36px;min-width:36px}._emtvG ._crG-p+._bVpoF._dG7c5{padding:0 16px}._emtvG ._crG-p+._bVpoF._7hq3B{padding:0 16px 0 12px}._emtvG ._crG-p:hover+._bVpoF{background-color:rgba(50,54,58,.08)}._emtvG ._crG-p:disabled+._bVpoF{color:rgba(81,85,89,.4);cursor:not-allowed}._emtvG ._crG-p:active+._bVpoF,._emtvG ._crG-p:focus:active+._bVpoF{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._emtvG ._crG-p:checked+._bVpoF{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._emtvG ._crG-p:checked:hover+._bVpoF{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._emtvG ._crG-p:checked:disabled+._bVpoF{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._emtvG ._crG-p:checked:active+._bVpoF,._emtvG ._crG-p:checked:focus:active+._bVpoF{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._bmbMD{display:inline-flex;position:relative}._bmbMD:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._bmbMD>*{flex-shrink:0;flex-grow:0}._nfgYX{border:none;margin:0;padding:0}._nfgYX legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._emtvG ._crG-p.focus-visible+._bVpoF,._emtvG ._crG-p:focus-visible+._bVpoF{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4958
5192
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z);}
|
|
4959
5193
|
|
|
4960
5194
|
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -5053,46 +5287,6 @@ const ToggleButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, re
|
|
|
5053
5287
|
}, children));
|
|
5054
5288
|
});
|
|
5055
5289
|
|
|
5056
|
-
const HStack = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement(Stack, _extends__default["default"]({
|
|
5057
|
-
ref: ref
|
|
5058
|
-
}, props, {
|
|
5059
|
-
direction: "horizontal"
|
|
5060
|
-
})));
|
|
5061
|
-
|
|
5062
|
-
// Explicitly listed props to prevent arbitrary prop spreading
|
|
5063
|
-
const StackItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5064
|
-
let {
|
|
5065
|
-
width,
|
|
5066
|
-
minWidth,
|
|
5067
|
-
maxWidth,
|
|
5068
|
-
height,
|
|
5069
|
-
minHeight,
|
|
5070
|
-
maxHeight,
|
|
5071
|
-
fillSpace,
|
|
5072
|
-
'aria-label': ariaLabel,
|
|
5073
|
-
'aria-labelledby': ariaLabelledBy,
|
|
5074
|
-
'aria-describedby': ariaDescribedBy,
|
|
5075
|
-
'data-testid': dataTestId,
|
|
5076
|
-
children
|
|
5077
|
-
} = _ref;
|
|
5078
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5079
|
-
ref: ref,
|
|
5080
|
-
style: {
|
|
5081
|
-
width,
|
|
5082
|
-
minWidth,
|
|
5083
|
-
maxWidth,
|
|
5084
|
-
height,
|
|
5085
|
-
minHeight,
|
|
5086
|
-
maxHeight,
|
|
5087
|
-
flex: fillSpace ? '1 1 0%' : 'none'
|
|
5088
|
-
},
|
|
5089
|
-
"aria-label": ariaLabel,
|
|
5090
|
-
"aria-labelledby": ariaLabelledBy,
|
|
5091
|
-
"aria-describedby": ariaDescribedBy,
|
|
5092
|
-
"data-testid": dataTestId
|
|
5093
|
-
}, children);
|
|
5094
|
-
});
|
|
5095
|
-
|
|
5096
5290
|
const convertAlignment = alignment => {
|
|
5097
5291
|
const alignmentMap = {
|
|
5098
5292
|
top: 'flex-start',
|
|
@@ -5134,20 +5328,6 @@ const Stack = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5134
5328
|
'aria-describedby': ariaDescribedBy,
|
|
5135
5329
|
'data-testid': dataTestId
|
|
5136
5330
|
} = _ref;
|
|
5137
|
-
const checkIsStackItem = child => {
|
|
5138
|
-
if (!(child.type && (child.type === StackItem || child.type === HStack || child.type === VStack))) {
|
|
5139
|
-
throw new Error('Stack received an invalid child. Only StackItems are valid children of Stacks.');
|
|
5140
|
-
}
|
|
5141
|
-
};
|
|
5142
|
-
React.useEffect(() => {
|
|
5143
|
-
if (Array.isArray(children)) {
|
|
5144
|
-
children.forEach(child => {
|
|
5145
|
-
checkIsStackItem(child);
|
|
5146
|
-
});
|
|
5147
|
-
} else if (children) {
|
|
5148
|
-
checkIsStackItem(children);
|
|
5149
|
-
}
|
|
5150
|
-
}, [children]);
|
|
5151
5331
|
const alignment = direction === 'horizontal' ? alignChildrenY : alignChildrenX;
|
|
5152
5332
|
const justification = direction === 'horizontal' ? alignChildrenX : alignChildrenY;
|
|
5153
5333
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -5188,6 +5368,46 @@ const VStack = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React_
|
|
|
5188
5368
|
direction: "vertical"
|
|
5189
5369
|
})));
|
|
5190
5370
|
|
|
5371
|
+
const HStack = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React__default["default"].createElement(Stack, _extends__default["default"]({
|
|
5372
|
+
ref: ref
|
|
5373
|
+
}, props, {
|
|
5374
|
+
direction: "horizontal"
|
|
5375
|
+
})));
|
|
5376
|
+
|
|
5377
|
+
// Explicitly listed props to prevent arbitrary prop spreading
|
|
5378
|
+
const StackItem = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
5379
|
+
let {
|
|
5380
|
+
width,
|
|
5381
|
+
minWidth,
|
|
5382
|
+
maxWidth,
|
|
5383
|
+
height,
|
|
5384
|
+
minHeight,
|
|
5385
|
+
maxHeight,
|
|
5386
|
+
fillSpace,
|
|
5387
|
+
'aria-label': ariaLabel,
|
|
5388
|
+
'aria-labelledby': ariaLabelledBy,
|
|
5389
|
+
'aria-describedby': ariaDescribedBy,
|
|
5390
|
+
'data-testid': dataTestId,
|
|
5391
|
+
children
|
|
5392
|
+
} = _ref;
|
|
5393
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5394
|
+
ref: ref,
|
|
5395
|
+
style: {
|
|
5396
|
+
width,
|
|
5397
|
+
minWidth,
|
|
5398
|
+
maxWidth,
|
|
5399
|
+
height,
|
|
5400
|
+
minHeight,
|
|
5401
|
+
maxHeight,
|
|
5402
|
+
flex: fillSpace ? '1 1 0%' : 'none'
|
|
5403
|
+
},
|
|
5404
|
+
"aria-label": ariaLabel,
|
|
5405
|
+
"aria-labelledby": ariaLabelledBy,
|
|
5406
|
+
"aria-describedby": ariaDescribedBy,
|
|
5407
|
+
"data-testid": dataTestId
|
|
5408
|
+
}, children);
|
|
5409
|
+
});
|
|
5410
|
+
|
|
5191
5411
|
const SelectPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5192
5412
|
let {
|
|
5193
5413
|
children,
|
|
@@ -5238,9 +5458,11 @@ const GetSelectItemsFrom = function (startingChildren) {
|
|
|
5238
5458
|
if (child.type === SelectItem) {
|
|
5239
5459
|
const {
|
|
5240
5460
|
label,
|
|
5241
|
-
value: childValue
|
|
5461
|
+
value: childValue,
|
|
5462
|
+
children: childChildren
|
|
5242
5463
|
} = child.props;
|
|
5243
|
-
|
|
5464
|
+
const safeLabel = label !== null && label !== void 0 ? label : ['string', 'number'].includes(typeof childChildren) ? childChildren : undefined;
|
|
5465
|
+
current.push([childValue, safeLabel]);
|
|
5244
5466
|
} else if (child.type === SubSelect) {
|
|
5245
5467
|
current.push(...GetSelectItemsFrom(child.props.children, filter));
|
|
5246
5468
|
}
|
|
@@ -5257,7 +5479,8 @@ const Select = _ref => {
|
|
|
5257
5479
|
onIsOpenChange,
|
|
5258
5480
|
value,
|
|
5259
5481
|
isInvalid,
|
|
5260
|
-
'data-testid': dataTestId
|
|
5482
|
+
'data-testid': dataTestId,
|
|
5483
|
+
isVirtualizationDisabled
|
|
5261
5484
|
} = _ref;
|
|
5262
5485
|
const [selectedValues, setSelectedValues] = index.useControllableState(value, onChange, value);
|
|
5263
5486
|
const selectPaneChildren = React.useMemo(() => {
|
|
@@ -5270,14 +5493,14 @@ const Select = _ref => {
|
|
|
5270
5493
|
let {
|
|
5271
5494
|
value: _value
|
|
5272
5495
|
} = _ref2;
|
|
5273
|
-
return
|
|
5496
|
+
return _value == null || selectedValues.includes(_value);
|
|
5274
5497
|
}));
|
|
5275
5498
|
}
|
|
5276
5499
|
return new Map(GetSelectItemsFrom(selectPaneChildren, _ref3 => {
|
|
5277
5500
|
let {
|
|
5278
5501
|
value: _value
|
|
5279
5502
|
} = _ref3;
|
|
5280
|
-
return
|
|
5503
|
+
return _value == null || selectedValues === _value;
|
|
5281
5504
|
}));
|
|
5282
5505
|
}, [selectedValues, selectPaneChildren]);
|
|
5283
5506
|
const enabledSelectItems = React.useMemo(() => new Map(GetSelectItemsFrom(selectPaneChildren, _ref4 => {
|
|
@@ -5311,7 +5534,8 @@ const Select = _ref => {
|
|
|
5311
5534
|
isDisabled,
|
|
5312
5535
|
isOpen,
|
|
5313
5536
|
onIsOpenChange,
|
|
5314
|
-
'data-testid': dataTestId
|
|
5537
|
+
'data-testid': dataTestId,
|
|
5538
|
+
isVirtualizationDisabled
|
|
5315
5539
|
};
|
|
5316
5540
|
return /*#__PURE__*/React__default["default"].createElement(SelectContextProvider, {
|
|
5317
5541
|
value: {
|
|
@@ -5362,11 +5586,131 @@ const SelectButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, re
|
|
|
5362
5586
|
}), children !== null && children !== void 0 ? children : selectedSelectItems !== null && selectedSelectItems !== void 0 && selectedSelectItems.size ? selectedItemsString : placeholder);
|
|
5363
5587
|
});
|
|
5364
5588
|
|
|
5589
|
+
const GridChildrenWrapper = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5590
|
+
let {
|
|
5591
|
+
asChild,
|
|
5592
|
+
style,
|
|
5593
|
+
'data-testid': dataTestId,
|
|
5594
|
+
children
|
|
5595
|
+
} = _ref;
|
|
5596
|
+
if (asChild && /*#__PURE__*/React.isValidElement(children)) {
|
|
5597
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
5598
|
+
style: {
|
|
5599
|
+
...children.props.style,
|
|
5600
|
+
...style
|
|
5601
|
+
},
|
|
5602
|
+
ref: index.mergeRefs(children.ref, ref)
|
|
5603
|
+
});
|
|
5604
|
+
}
|
|
5605
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5606
|
+
ref: ref,
|
|
5607
|
+
"data-testid": dataTestId,
|
|
5608
|
+
style: {
|
|
5609
|
+
...style
|
|
5610
|
+
}
|
|
5611
|
+
}, children);
|
|
5612
|
+
});
|
|
5613
|
+
|
|
5614
|
+
const convertGridTemplateRowsOrColumns = rowsOrColumns => rowsOrColumns && rowsOrColumns.join(' ');
|
|
5615
|
+
const convertGridTemplateAreas = areas => areas.map(row => "\"".concat(row.join(' '), "\"")).join(' ');
|
|
5616
|
+
const LayoutGrid = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5617
|
+
let {
|
|
5618
|
+
columnGap,
|
|
5619
|
+
rowGap,
|
|
5620
|
+
gap,
|
|
5621
|
+
rowHeights,
|
|
5622
|
+
columnWidths,
|
|
5623
|
+
areas,
|
|
5624
|
+
area,
|
|
5625
|
+
asChild = false,
|
|
5626
|
+
'data-testid': dataTestId,
|
|
5627
|
+
children
|
|
5628
|
+
} = _ref;
|
|
5629
|
+
const calculatedStyle = {
|
|
5630
|
+
display: 'grid',
|
|
5631
|
+
columnGap,
|
|
5632
|
+
rowGap,
|
|
5633
|
+
gridGap: gap,
|
|
5634
|
+
gridTemplateRows: convertGridTemplateRowsOrColumns(rowHeights),
|
|
5635
|
+
gridTemplateColumns: convertGridTemplateRowsOrColumns(columnWidths),
|
|
5636
|
+
gridTemplateAreas: convertGridTemplateAreas(areas),
|
|
5637
|
+
gridArea: area
|
|
5638
|
+
};
|
|
5639
|
+
return /*#__PURE__*/React__default["default"].createElement(GridChildrenWrapper, {
|
|
5640
|
+
asChild: asChild,
|
|
5641
|
+
style: calculatedStyle,
|
|
5642
|
+
"data-testid": dataTestId,
|
|
5643
|
+
ref: ref
|
|
5644
|
+
}, children);
|
|
5645
|
+
});
|
|
5646
|
+
|
|
5647
|
+
const LayoutGridItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5648
|
+
let {
|
|
5649
|
+
area,
|
|
5650
|
+
asChild = false,
|
|
5651
|
+
'data-testid': dataTestId,
|
|
5652
|
+
children
|
|
5653
|
+
} = _ref;
|
|
5654
|
+
const calculatedStyle = {
|
|
5655
|
+
gridArea: area
|
|
5656
|
+
};
|
|
5657
|
+
return /*#__PURE__*/React__default["default"].createElement(GridChildrenWrapper, {
|
|
5658
|
+
asChild: asChild,
|
|
5659
|
+
style: calculatedStyle,
|
|
5660
|
+
"data-testid": dataTestId,
|
|
5661
|
+
ref: ref
|
|
5662
|
+
}, children);
|
|
5663
|
+
});
|
|
5664
|
+
|
|
5665
|
+
const CollectionGrid = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5666
|
+
let {
|
|
5667
|
+
minColumnWidth = '0px',
|
|
5668
|
+
maxColumnWidth = '1fr',
|
|
5669
|
+
numColumns = 'auto-fit',
|
|
5670
|
+
columnGap,
|
|
5671
|
+
rowGap,
|
|
5672
|
+
gap,
|
|
5673
|
+
rowHeight,
|
|
5674
|
+
asChild = false,
|
|
5675
|
+
'data-testid': dataTestId,
|
|
5676
|
+
children
|
|
5677
|
+
} = _ref;
|
|
5678
|
+
const calculatedStyle = {
|
|
5679
|
+
display: 'grid',
|
|
5680
|
+
gridTemplateColumns: "repeat(".concat(numColumns, ", minmax(").concat(minColumnWidth, ", ").concat(maxColumnWidth, "))"),
|
|
5681
|
+
columnGap,
|
|
5682
|
+
rowGap,
|
|
5683
|
+
gridGap: gap,
|
|
5684
|
+
gridAutoRows: rowHeight
|
|
5685
|
+
};
|
|
5686
|
+
return /*#__PURE__*/React__default["default"].createElement(GridChildrenWrapper, {
|
|
5687
|
+
asChild: asChild,
|
|
5688
|
+
style: calculatedStyle,
|
|
5689
|
+
"data-testid": dataTestId,
|
|
5690
|
+
ref: ref
|
|
5691
|
+
}, children);
|
|
5692
|
+
});
|
|
5693
|
+
|
|
5694
|
+
const CollectionGridItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5695
|
+
let {
|
|
5696
|
+
asChild = false,
|
|
5697
|
+
'data-testid': dataTestId,
|
|
5698
|
+
children
|
|
5699
|
+
} = _ref;
|
|
5700
|
+
return /*#__PURE__*/React__default["default"].createElement(GridChildrenWrapper, {
|
|
5701
|
+
asChild: asChild,
|
|
5702
|
+
"data-testid": dataTestId,
|
|
5703
|
+
ref: ref
|
|
5704
|
+
}, children);
|
|
5705
|
+
});
|
|
5706
|
+
|
|
5365
5707
|
/* eslint-disable camelcase */
|
|
5366
5708
|
|
|
5367
5709
|
exports.Input = index.Input$1;
|
|
5368
5710
|
exports.AdvancedTable = AdvancedTable;
|
|
5369
5711
|
exports.CollapsibleSearchInput = CollapsibleSearchInput;
|
|
5712
|
+
exports.CollectionGrid = CollectionGrid;
|
|
5713
|
+
exports.CollectionGridItem = CollectionGridItem;
|
|
5370
5714
|
exports.Combobox = Combobox;
|
|
5371
5715
|
exports.ComboboxFlyout = ComboboxFlyout;
|
|
5372
5716
|
exports.ComboboxGroup = ComboboxGroup;
|
|
@@ -5375,6 +5719,8 @@ exports.ComboboxOption = ComboboxOption;
|
|
|
5375
5719
|
exports.Drawer = Drawer;
|
|
5376
5720
|
exports.FilterAnchor = FilterAnchor;
|
|
5377
5721
|
exports.HStack = HStack;
|
|
5722
|
+
exports.LayoutGrid = LayoutGrid;
|
|
5723
|
+
exports.LayoutGridItem = LayoutGridItem;
|
|
5378
5724
|
exports.Menu = Menu;
|
|
5379
5725
|
exports.MenuButton = MenuButton;
|
|
5380
5726
|
exports.MenuItem = MenuItem$1;
|