@qualtrics/ui-react 2.21.0 → 2.22.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 +12 -0
- package/dist/__shared/cjs/{index-201e8786.js → index-025620bf.js} +666 -549
- package/dist/__shared/cjs/{index-0ae99de2.js → index-41a013d2.js} +4 -4
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +4 -4
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +11 -11
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +12 -9
- package/dist/components/ColorPicker/ColorPicker.js +10 -8
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +8 -6
- package/dist/components/ColorPicker/Hue.js +3 -2
- package/dist/components/ColorPicker/Palette.js +7 -5
- package/dist/components/ColorPicker/Saturation.js +9 -8
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +3 -2
- package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
- package/dist/components/ColorPicker/utils/validateHex.js +10 -9
- package/dist/components/Combobox/Combobox.js +47 -26
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxHeader.js +1 -1
- package/dist/components/Combobox/ComboboxIcon.js +3 -2
- package/dist/components/Combobox/ComboboxInput.js +4 -4
- package/dist/components/Combobox/ComboboxList.js +2 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +5 -2
- package/dist/components/Dropdown/Dropdown.js +14 -9
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +23 -19
- package/dist/components/Dropdown/DropdownList.js +4 -4
- package/dist/components/Dropdown/DropdownOption.js +4 -3
- package/dist/components/Dropdown/DropdownSearch.js +10 -4
- package/dist/components/FilePicker/FilePicker.js +13 -6
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +12 -9
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +1 -1
- 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/LoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionSet.js +5 -5
- package/dist/components/LogicEditor/LogicEditor.js +1 -1
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +2 -1
- package/dist/components/Modal/Modal.js +14 -13
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +41 -30
- 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 +10 -7
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper.js +7 -6
- 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 +5 -5
- package/dist/components/Pagination/PaginationPageInput.js +11 -9
- package/dist/components/Pagination/PaginationPreviousButton.js +5 -5
- package/dist/components/Popover/Popover.js +9 -7
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +4 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
- package/dist/components/Radio/Radio.js +12 -11
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +4 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav.js +2 -1
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavLink.js +1 -1
- package/dist/components/Slider/RangeSlider.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +1 -1
- package/dist/components/Switch/Switch.js +11 -11
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabList.js +6 -5
- package/dist/components/Tabs/TabPanel.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +10 -4
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/UIProvider.js +2 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +4 -4
- package/dist/components/deprecated_ColorPicker/Color.js +6 -6
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -2
- 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 +3 -3
- package/dist/components/deprecated_ColorPicker/Saturation.js +5 -5
- package/dist/components/deprecated_ColorPicker/Swatch.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +8 -8
- package/dist/components/deprecated_Tabs/Tabs.js +11 -7
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +4 -2
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +8 -8
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -1
- package/dist/hooks/useControllableState/useControllableState.js +2 -1
- package/dist/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/hooks/useId/useId.js +1 -1
- package/dist/hooks/useOverlay/useOverlay.js +6 -4
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +2 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +4 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/createIconComponent.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +60 -49
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +6 -4
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +18 -10
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +7 -6
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +5 -4
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +3 -2
- package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxFlyout.js +2 -2
- package/dist/next/Combobox/ComboboxGroup.js +1 -1
- package/dist/next/Combobox/ComboboxInput.js +2 -2
- package/dist/next/Combobox/ComboboxOption.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +12 -8
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +1 -1
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +3 -2
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +2 -1
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +2 -1
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +1 -1
- package/dist/next/Drawer/Drawer.js +7 -4
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input.js +2 -2
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +5 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuItem.js +10 -8
- package/dist/next/Menu/MenuPane.js +20 -8
- package/dist/next/Menu/SubMenu.js +12 -8
- package/dist/next/Menu/useMutationObserver.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +27 -15
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +8 -2
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +4 -4
- package/dist/next/TimePicker/TimeInput.js +2 -2
- package/dist/next/TimePicker/TimePicker.js +4 -4
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +2 -1
- package/dist/next/TimePicker/utils.js +10 -9
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +298 -219
- package/dist/utils/Flyout/Flyout.js +1 -1
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Popper/Popper.js +9 -5
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +2 -1
- package/dist/utils/Translation/useTranslation.js +4 -5
- package/dist/utils/filterChildren/filterChildren.js +2 -1
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
- package/dist/utils/mergeRefs/mergeRefs.js +1 -1
- package/dist/utils/wrapEvent/wrapEvent.js +2 -2
- package/next/package.json +1 -1
- package/package.json +2 -2
package/dist/next/index.js
CHANGED
|
@@ -9,8 +9,8 @@ var classNames = require('classnames');
|
|
|
9
9
|
var reactDnd = require('react-dnd');
|
|
10
10
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
|
11
11
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
12
|
-
var index = require('../__shared/cjs/index-
|
|
13
|
-
var icons_index = require('../__shared/cjs/index-
|
|
12
|
+
var index = require('../__shared/cjs/index-025620bf.js');
|
|
13
|
+
var icons_index = require('../__shared/cjs/index-41a013d2.js');
|
|
14
14
|
var libphonenumberJs = require('libphonenumber-js');
|
|
15
15
|
var InputMask = require('react-input-mask');
|
|
16
16
|
var reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
@@ -32,9 +32,9 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
32
32
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
33
33
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
34
34
|
|
|
35
|
-
var css_248z$a = ".
|
|
36
|
-
var styles$a = {"advancedTable":"
|
|
37
|
-
var stylesheet$a=".
|
|
35
|
+
var css_248z$a = "._brNXC{overflow:auto;position:relative;max-width:100%;max-height:100%}._brNXC,._HSu7R{background-color:#fff}._HSu7R{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._9wlNT{margin-bottom:4px}._AT1Ij{position:-webkit-sticky;position:sticky;top:0;z-index:100}._3wgpr{display:flex}._3wgpr:focus{outline:none}._3wgpr.focus-visible ._EvxeW:after,._3wgpr:focus-visible ._EvxeW: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}._3wgpr.focus-visible ._EvxeW:last-of-type:after,._3wgpr:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._3wgpr.focus-visible ._EvxeW:first-of-type:after,._3wgpr:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._3wgpr.focus-visible ._EvxeW._JUVa-:after,._3wgpr:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:1px}._uR2-c{padding-right:3px}._SYZHd{display:flex}._SYZHd._qNkCq ._EvxeW,._SYZHd._qNkCq ._JFrgK{cursor:pointer}._SYZHd._To13F ._EvxeW,._SYZHd._To13F ._JFrgK{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._SYZHd._To13F ._EvxeW._JUVa-,._SYZHd._To13F ._JFrgK._JUVa-{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._SYZHd._To13F ._EvxeW._JUVa- ._JFrgK,._SYZHd._To13F ._EvxeW._JUVa- ._mMBOw,._SYZHd._To13F ._EvxeW._JUVa- ._qwY8i,._SYZHd._To13F ._JFrgK._JUVa- ._JFrgK,._SYZHd._To13F ._JFrgK._JUVa- ._mMBOw,._SYZHd._To13F ._JFrgK._JUVa- ._qwY8i{background-color:rgba(11,110,208,.08)}._SYZHd._qNkCq:hover:not(._To13F):not(._9W80x) ._EvxeW,._SYZHd._qNkCq:hover:not(._To13F):not(._9W80x) ._JFrgK{background-color:#f9f9f9}._SYZHd._qNkCq:active:not(._To13F):not(._9W80x) ._EvxeW,._SYZHd._qNkCq:active:not(._To13F):not(._9W80x) ._JFrgK{background-color:#f3f3f3}._SYZHd:focus{outline:none}._SYZHd.focus-visible ._EvxeW:after,._SYZHd:focus-visible ._EvxeW: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}._SYZHd.focus-visible ._EvxeW:last-of-type:after,._SYZHd:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd.focus-visible ._EvxeW:first-of-type:after,._SYZHd:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd.focus-visible ._EvxeW._JUVa-:after,._SYZHd:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:0}._SYZHd:last-of-type:focus{outline:none}._SYZHd:last-of-type.focus-visible ._EvxeW:after,._SYZHd:last-of-type:focus-visible ._EvxeW: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}._SYZHd:last-of-type.focus-visible ._EvxeW:last-of-type:after,._SYZHd:last-of-type:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd:last-of-type.focus-visible ._EvxeW:first-of-type:after,._SYZHd:last-of-type:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd:last-of-type.focus-visible ._EvxeW._JUVa-:after,._SYZHd:last-of-type:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:1px}._SYZHd:last-of-type ._mMBOw:focus{outline:none}._SYZHd:last-of-type ._mMBOw._Ml-JU.focus-visible:after,._SYZHd:last-of-type ._mMBOw._Ml-JU:focus-visible:after,._SYZHd:last-of-type ._mMBOw.focus-visible:after,._SYZHd:last-of-type ._mMBOw: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}._SYZHd:first-of-type:focus{outline:none}._SYZHd:first-of-type.focus-visible ._EvxeW:after,._SYZHd:first-of-type:focus-visible ._EvxeW: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}._SYZHd:first-of-type.focus-visible ._EvxeW:last-of-type:after,._SYZHd:first-of-type:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd:first-of-type.focus-visible ._EvxeW:first-of-type:after,._SYZHd:first-of-type:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd:first-of-type.focus-visible ._EvxeW._JUVa-:after,._SYZHd:first-of-type:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:0}._SYZHd:first-of-type ._mMBOw:focus{outline:none}._SYZHd:first-of-type ._mMBOw._Ml-JU.focus-visible:after,._SYZHd:first-of-type ._mMBOw._Ml-JU:focus-visible:after,._SYZHd:first-of-type ._mMBOw.focus-visible:after,._SYZHd:first-of-type ._mMBOw: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}._dFK8f{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}._dFK8f._qpvZQ{flex-grow:1}._dFK8f._L6ikB{cursor:pointer}._dFK8f._L6ikB:hover:not(._nzGZd){background-color:#f9f9f9;border-bottom-color:#6a6d70}._dFK8f._L6ikB:active:not(._nzGZd){background-color:#f3f3f3}._dFK8f._IWaBN:not(._nzGZd){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._dFK8f._nzGZd{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._dFK8f ._7JIow{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._dFK8f ._7JIow._oky5Z{left:-1px}._dFK8f ._7JIow._6HDZV{right:0}._dFK8f ._BwYWV{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._dFK8f ._BwYWV._oky5Z{left:-2px}._dFK8f ._BwYWV._6HDZV{right:-1px}._dFK8f:first-of-type ._oky5Z._7JIow{left:0;width:2px;border-left:1px solid #fff}._dFK8f:first-of-type ._oky5Z._BwYWV{left:0}._dFK8f:last-of-type ._6HDZV._7JIow{right:0;width:2px;border-right:1px solid #fff}._dFK8f:last-of-type ._6HDZV._BwYWV{right:0}._dFK8f ._VzLYl{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._dFK8f ._VzLYl ._xVM2J{position:absolute;width:2px;right:2px;top:0;bottom:0}._dFK8f ._VzLYl ._xVM2J._yux-4{background-color:#0a6ed1}._dFK8f ._VzLYl:hover ._xVM2J:not(._yux-4){background-color:#d9d9d9}._dFK8f ._W6Djm{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._dFK8f ._W6Djm._k4K5H{flex-direction:row-reverse;justify-content:flex-start}._dFK8f ._W6Djm._k4K5H ._xMBLi{margin:1px 7px 1px 1px}._dFK8f ._W6Djm ._KnjlU{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._dFK8f ._W6Djm ._xMBLi{margin:1px 1px 1px 7px;flex-shrink:0}._dFK8f ._gk9iN{margin-left:6px;margin-right:4px;flex-shrink:0}._dFK8f ._sqHXr{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._dFK8f:focus{outline:none}._dFK8f._Ml-JU.focus-visible:after,._dFK8f._Ml-JU:focus-visible:after,._dFK8f.focus-visible:after,._dFK8f: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}._pGMry{margin-right:6px}._JUVa-{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._JUVa-[focus-within]{z-index:30}._JUVa-:focus-within{z-index:30}._mMBOw{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}._mMBOw ._pSAIH{width:100%;padding:12px 12px 11px;overflow:hidden}._mMBOw._nzGZd{background-color:#efefef;border-bottom-color:#dfdfe1}._mMBOw._qpvZQ{flex-grow:1}._mMBOw:focus{outline:none}._mMBOw._Ml-JU.focus-visible:after,._mMBOw._Ml-JU:focus-visible:after,._mMBOw.focus-visible:after,._mMBOw: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}._JFrgK{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._JFrgK._3aAi6{border-bottom-color:#d9d9d9;background-color:#fff}._qwY8i{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}._qwY8i._3aAi6{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._qwY8i:focus input~span,._qwY8i:hover input~span{border-color:#0b6ed0}._qwY8i ._01rf7{position:relative;display:inline-flex}._qwY8i ._01rf7 ._ISuSh{margin:0!important}._qwY8i ._01rf7 ._wXh-j{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._i01WR{justify-content:flex-start}._RpSiy{justify-content:center;text-align:center}._k4K5H{justify-content:flex-end;text-align:right}._ISavx{display:none}._HgH0q{opacity:0;height:0;width:0;overflow:hidden}._HgH0q,._oHbFw{position:absolute}._oHbFw{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._mizXj{width:246px}";
|
|
36
|
+
var styles$a = {"advancedTable":"_brNXC","advancedTablePaginationContainer":"_HSu7R","advancedTablePagination":"_9wlNT","advancedTableColumnHeadersRowGroup":"_AT1Ij","advancedTableColumnHeaders":"_3wgpr","advancedTableRowChild":"_EvxeW","pinnedContainer":"_JUVa-","advancedTableRowGroup":"_uR2-c","advancedTableRow":"_SYZHd","hasRowAction":"_qNkCq","advancedTableExpandRowSpacer":"_JFrgK","isSelected":"_To13F","advancedTableCheckbox":"_qwY8i","advancedTableCell":"_mMBOw","isCheckboxHovered":"_9W80x","showFocusRing":"_Ml-JU","advancedTableColumnHeader":"_dFK8f","fillRemainingSpace":"_qpvZQ","isSortable":"_L6ikB","isDragging":"_nzGZd","isSorted":"_IWaBN","dropTargetLine":"_7JIow","dropTargetLeft":"_oky5Z","dropTargetRight":"_6HDZV","dropTargetMarker":"_BwYWV","resizeHandle":"_VzLYl","resizeLine":"_xVM2J","isResizing":"_yux-4","advancedTableColumnHeaderLabel":"_W6Djm","rightAligned":"_k4K5H","sortIcon":"_xMBLi","advancedTableColumnHeaderLabelText":"_KnjlU","advancedTableColumnHeaderMenu":"_gk9iN","advancedTableColumnHeaderMenuHiddenAnchor":"_sqHXr","advancedTableColumnHeaderMenuItemIcon":"_pGMry","advancedTableCellContainer":"_pSAIH","header":"_3aAi6","checkboxContainer":"_01rf7","checkbox":"_ISuSh","mixed":"_wXh-j","leftAligned":"_i01WR","centerAligned":"_RpSiy","hiddenDescription":"_ISavx","hiddenLiveRegion":"_HgH0q","dragPreview":"_oHbFw","rowActionMenuPane":"_mizXj"};
|
|
37
|
+
var stylesheet$a="._brNXC{overflow:auto;position:relative;max-width:100%;max-height:100%}._brNXC,._HSu7R{background-color:#fff}._HSu7R{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._9wlNT{margin-bottom:4px}._AT1Ij{position:-webkit-sticky;position:sticky;top:0;z-index:100}._3wgpr{display:flex}._3wgpr:focus{outline:none}._3wgpr.focus-visible ._EvxeW:after,._3wgpr:focus-visible ._EvxeW: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}._3wgpr.focus-visible ._EvxeW:last-of-type:after,._3wgpr:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._3wgpr.focus-visible ._EvxeW:first-of-type:after,._3wgpr:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._3wgpr.focus-visible ._EvxeW._JUVa-:after,._3wgpr:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:1px}._uR2-c{padding-right:3px}._SYZHd{display:flex}._SYZHd._qNkCq ._EvxeW,._SYZHd._qNkCq ._JFrgK{cursor:pointer}._SYZHd._To13F ._EvxeW,._SYZHd._To13F ._JFrgK{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._SYZHd._To13F ._EvxeW._JUVa-,._SYZHd._To13F ._JFrgK._JUVa-{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._SYZHd._To13F ._EvxeW._JUVa- ._JFrgK,._SYZHd._To13F ._EvxeW._JUVa- ._mMBOw,._SYZHd._To13F ._EvxeW._JUVa- ._qwY8i,._SYZHd._To13F ._JFrgK._JUVa- ._JFrgK,._SYZHd._To13F ._JFrgK._JUVa- ._mMBOw,._SYZHd._To13F ._JFrgK._JUVa- ._qwY8i{background-color:rgba(11,110,208,.08)}._SYZHd._qNkCq:hover:not(._To13F):not(._9W80x) ._EvxeW,._SYZHd._qNkCq:hover:not(._To13F):not(._9W80x) ._JFrgK{background-color:#f9f9f9}._SYZHd._qNkCq:active:not(._To13F):not(._9W80x) ._EvxeW,._SYZHd._qNkCq:active:not(._To13F):not(._9W80x) ._JFrgK{background-color:#f3f3f3}._SYZHd:focus{outline:none}._SYZHd.focus-visible ._EvxeW:after,._SYZHd:focus-visible ._EvxeW: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}._SYZHd.focus-visible ._EvxeW:last-of-type:after,._SYZHd:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd.focus-visible ._EvxeW:first-of-type:after,._SYZHd:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd.focus-visible ._EvxeW._JUVa-:after,._SYZHd:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:0}._SYZHd:last-of-type:focus{outline:none}._SYZHd:last-of-type.focus-visible ._EvxeW:after,._SYZHd:last-of-type:focus-visible ._EvxeW: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}._SYZHd:last-of-type.focus-visible ._EvxeW:last-of-type:after,._SYZHd:last-of-type:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd:last-of-type.focus-visible ._EvxeW:first-of-type:after,._SYZHd:last-of-type:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd:last-of-type.focus-visible ._EvxeW._JUVa-:after,._SYZHd:last-of-type:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:1px}._SYZHd:last-of-type ._mMBOw:focus{outline:none}._SYZHd:last-of-type ._mMBOw._Ml-JU.focus-visible:after,._SYZHd:last-of-type ._mMBOw._Ml-JU:focus-visible:after,._SYZHd:last-of-type ._mMBOw.focus-visible:after,._SYZHd:last-of-type ._mMBOw: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}._SYZHd:first-of-type:focus{outline:none}._SYZHd:first-of-type.focus-visible ._EvxeW:after,._SYZHd:first-of-type:focus-visible ._EvxeW: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}._SYZHd:first-of-type.focus-visible ._EvxeW:last-of-type:after,._SYZHd:first-of-type:focus-visible ._EvxeW:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._SYZHd:first-of-type.focus-visible ._EvxeW:first-of-type:after,._SYZHd:first-of-type:focus-visible ._EvxeW:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._SYZHd:first-of-type.focus-visible ._EvxeW._JUVa-:after,._SYZHd:first-of-type:focus-visible ._EvxeW._JUVa-:after{right:-3px;bottom:0}._SYZHd:first-of-type ._mMBOw:focus{outline:none}._SYZHd:first-of-type ._mMBOw._Ml-JU.focus-visible:after,._SYZHd:first-of-type ._mMBOw._Ml-JU:focus-visible:after,._SYZHd:first-of-type ._mMBOw.focus-visible:after,._SYZHd:first-of-type ._mMBOw: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}._dFK8f{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}._dFK8f._qpvZQ{flex-grow:1}._dFK8f._L6ikB{cursor:pointer}._dFK8f._L6ikB:hover:not(._nzGZd){background-color:#f9f9f9;border-bottom-color:#6a6d70}._dFK8f._L6ikB:active:not(._nzGZd){background-color:#f3f3f3}._dFK8f._IWaBN:not(._nzGZd){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._dFK8f._nzGZd{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._dFK8f ._7JIow{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._dFK8f ._7JIow._oky5Z{left:-1px}._dFK8f ._7JIow._6HDZV{right:0}._dFK8f ._BwYWV{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._dFK8f ._BwYWV._oky5Z{left:-2px}._dFK8f ._BwYWV._6HDZV{right:-1px}._dFK8f:first-of-type ._oky5Z._7JIow{left:0;width:2px;border-left:1px solid #fff}._dFK8f:first-of-type ._oky5Z._BwYWV{left:0}._dFK8f:last-of-type ._6HDZV._7JIow{right:0;width:2px;border-right:1px solid #fff}._dFK8f:last-of-type ._6HDZV._BwYWV{right:0}._dFK8f ._VzLYl{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._dFK8f ._VzLYl ._xVM2J{position:absolute;width:2px;right:2px;top:0;bottom:0}._dFK8f ._VzLYl ._xVM2J._yux-4{background-color:#0a6ed1}._dFK8f ._VzLYl:hover ._xVM2J:not(._yux-4){background-color:#d9d9d9}._dFK8f ._W6Djm{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._dFK8f ._W6Djm._k4K5H{flex-direction:row-reverse;justify-content:flex-start}._dFK8f ._W6Djm._k4K5H ._xMBLi{margin:1px 7px 1px 1px}._dFK8f ._W6Djm ._KnjlU{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._dFK8f ._W6Djm ._xMBLi{margin:1px 1px 1px 7px;flex-shrink:0}._dFK8f ._gk9iN{margin-left:6px;margin-right:4px;flex-shrink:0}._dFK8f ._sqHXr{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._dFK8f:focus{outline:none}._dFK8f._Ml-JU.focus-visible:after,._dFK8f._Ml-JU:focus-visible:after,._dFK8f.focus-visible:after,._dFK8f: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}._pGMry{margin-right:6px}._JUVa-{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._JUVa-[focus-within]{z-index:30}._JUVa-:focus-within{z-index:30}._mMBOw{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}._mMBOw ._pSAIH{width:100%;padding:12px 12px 11px;overflow:hidden}._mMBOw._nzGZd{background-color:#efefef;border-bottom-color:#dfdfe1}._mMBOw._qpvZQ{flex-grow:1}._mMBOw:focus{outline:none}._mMBOw._Ml-JU.focus-visible:after,._mMBOw._Ml-JU:focus-visible:after,._mMBOw.focus-visible:after,._mMBOw: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}._JFrgK{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._JFrgK._3aAi6{border-bottom-color:#d9d9d9;background-color:#fff}._qwY8i{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}._qwY8i._3aAi6{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._qwY8i:focus input~span,._qwY8i:hover input~span{border-color:#0b6ed0}._qwY8i ._01rf7{position:relative;display:inline-flex}._qwY8i ._01rf7 ._ISuSh{margin:0!important}._qwY8i ._01rf7 ._wXh-j{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._i01WR{justify-content:flex-start}._RpSiy{justify-content:center;text-align:center}._k4K5H{justify-content:flex-end;text-align:right}._ISavx{display:none}._HgH0q{opacity:0;height:0;width:0;overflow:hidden}._HgH0q,._oHbFw{position:absolute}._oHbFw{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._mizXj{width:246px}";
|
|
38
38
|
icons_index.styleInject(css_248z$a);
|
|
39
39
|
|
|
40
40
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
@@ -86,10 +86,11 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
86
86
|
role: "menuitem" // Enables having an action menu item inside of a SelectMenu
|
|
87
87
|
,
|
|
88
88
|
onSelect: e => {
|
|
89
|
+
var _columnHeaderRef$curr;
|
|
89
90
|
e.preventDefault(); // prevents SelectMenu value from changing
|
|
90
91
|
setIsOpen(false);
|
|
91
|
-
columnHeaderRef.current
|
|
92
|
-
onSelect
|
|
92
|
+
(_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0 ? void 0 : _columnHeaderRef$curr.focus();
|
|
93
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
93
94
|
},
|
|
94
95
|
"date-testid": menuItemDataTestId
|
|
95
96
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
@@ -120,7 +121,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
120
121
|
},
|
|
121
122
|
isOpen: isOpen,
|
|
122
123
|
onIsOpenChange: setIsOpen
|
|
123
|
-
}, rest), sortOptions
|
|
124
|
+
}, rest), sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.map((_ref3, index$1) => {
|
|
124
125
|
let {
|
|
125
126
|
ascendingLabel,
|
|
126
127
|
ascendingIcon,
|
|
@@ -143,7 +144,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
143
144
|
key: ascendingValue,
|
|
144
145
|
value: ascendingValue,
|
|
145
146
|
label: ascendingLabel,
|
|
146
|
-
"data-testid": index.getSubDataTestId(dataTestId,
|
|
147
|
+
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Ascending))
|
|
147
148
|
}, /*#__PURE__*/React__default["default"].createElement(AscendingIconComponent, {
|
|
148
149
|
size: "small",
|
|
149
150
|
className: styles$a.advancedTableColumnHeaderMenuItemIcon,
|
|
@@ -152,13 +153,13 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
152
153
|
key: descendingValue,
|
|
153
154
|
value: descendingValue,
|
|
154
155
|
label: descendingLabel,
|
|
155
|
-
"data-testid": index.getSubDataTestId(dataTestId,
|
|
156
|
+
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Descending))
|
|
156
157
|
}, /*#__PURE__*/React__default["default"].createElement(DescendingIconComponent, {
|
|
157
158
|
size: "small",
|
|
158
159
|
className: styles$a.advancedTableColumnHeaderMenuItemIcon,
|
|
159
160
|
"aria-hidden": "true"
|
|
160
161
|
}), descendingLabel)];
|
|
161
|
-
}), sortOptions
|
|
162
|
+
}), (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default["default"].createElement(index.Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
162
163
|
onSelect: onMoveLeft,
|
|
163
164
|
Icon: icons_index.ArrowLeftIcon,
|
|
164
165
|
label: translate('advancedTable.moveColumnLeft'),
|
|
@@ -220,6 +221,7 @@ const useDragAndDrop = _ref => {
|
|
|
220
221
|
}, dropRef] = reactDnd.useDrop(() => ({
|
|
221
222
|
accept: tableId,
|
|
222
223
|
hover: (item, monitor) => {
|
|
224
|
+
var _monitor$getClientOff, _columnHeaderRef$curr;
|
|
223
225
|
const {
|
|
224
226
|
id: dragSourceId,
|
|
225
227
|
columnIndex: dragSourceColumnIndex,
|
|
@@ -232,11 +234,11 @@ const useDragAndDrop = _ref => {
|
|
|
232
234
|
}
|
|
233
235
|
|
|
234
236
|
// Calculate which column line is closest
|
|
235
|
-
const dropX = monitor.getClientOffset()
|
|
237
|
+
const dropX = (_monitor$getClientOff = monitor.getClientOffset()) === null || _monitor$getClientOff === void 0 ? void 0 : _monitor$getClientOff.x;
|
|
236
238
|
const {
|
|
237
239
|
x,
|
|
238
240
|
width
|
|
239
|
-
} = columnHeaderRef.current
|
|
241
|
+
} = (_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0 ? void 0 : _columnHeaderRef$curr.getBoundingClientRect();
|
|
240
242
|
const diffLeft = Math.abs(dropX - x) || 0;
|
|
241
243
|
const diffRight = Math.abs(dropX - (x + width)) || 0;
|
|
242
244
|
if (diffLeft < diffRight) {
|
|
@@ -337,7 +339,7 @@ const useDragAndDrop = _ref => {
|
|
|
337
339
|
function useComputedWidth() {
|
|
338
340
|
let widthBuffer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
339
341
|
let defaultWidth = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 200;
|
|
340
|
-
return React.useMemo(() => typeof defaultWidth === 'number' ?
|
|
342
|
+
return React.useMemo(() => typeof defaultWidth === 'number' ? "".concat(defaultWidth + widthBuffer, "px") : "calc(".concat(widthBuffer, "px + ").concat(defaultWidth, ")"), [widthBuffer, defaultWidth]);
|
|
341
343
|
}
|
|
342
344
|
|
|
343
345
|
const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -379,8 +381,8 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
379
381
|
const [ellipsisShown, setEllipsisShown] = React.useState();
|
|
380
382
|
const columnHeaderRef = React.useRef(null);
|
|
381
383
|
const labelContainerRef = React.useRef(null);
|
|
382
|
-
const isSortable = Boolean(sortOptions
|
|
383
|
-
const isSorted = isSortable && selectedSortOption.columnId === id && selectedSortOption.index >= 0 && selectedSortOption.index < sortOptions
|
|
384
|
+
const isSortable = Boolean(sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length);
|
|
385
|
+
const isSorted = isSortable && selectedSortOption.columnId === id && selectedSortOption.index >= 0 && selectedSortOption.index < (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (selectedSortOption.direction === 'ascending' || selectedSortOption.direction === 'descending');
|
|
384
386
|
const selectedSortIndex = isSorted ? selectedSortOption.index : -1;
|
|
385
387
|
const arrowUpSvgContent = /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
386
388
|
fillRule: "evenodd",
|
|
@@ -444,19 +446,22 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
444
446
|
setIsHiddenMenuOpen(true);
|
|
445
447
|
setHiddenMenuHighlightedIndex(0);
|
|
446
448
|
} else if (onWidthChange && e.key === 'ArrowRight' && e.shiftKey) {
|
|
449
|
+
var _columnHeaderRef$curr;
|
|
447
450
|
e.preventDefault(); // prevent scroll
|
|
448
|
-
const newWidth = columnHeaderRef.current
|
|
451
|
+
const newWidth = ((_columnHeaderRef$curr = columnHeaderRef.current) === null || _columnHeaderRef$curr === void 0 ? void 0 : _columnHeaderRef$curr.getBoundingClientRect().width) + 10;
|
|
449
452
|
onWidthChange(newWidth);
|
|
450
453
|
} else if (onWidthChange && e.key === 'ArrowLeft' && e.shiftKey) {
|
|
454
|
+
var _columnHeaderRef$curr2;
|
|
451
455
|
e.preventDefault(); // prevent scroll
|
|
452
|
-
const newWidth = Math.max(80, columnHeaderRef.current
|
|
456
|
+
const newWidth = Math.max(80, ((_columnHeaderRef$curr2 = columnHeaderRef.current) === null || _columnHeaderRef$curr2 === void 0 ? void 0 : _columnHeaderRef$curr2.getBoundingClientRect().width) - 10);
|
|
453
457
|
onWidthChange(newWidth);
|
|
454
458
|
} else {
|
|
455
|
-
onKeyDown
|
|
459
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
456
460
|
}
|
|
457
461
|
};
|
|
458
462
|
const handleClick = e => {
|
|
459
|
-
|
|
463
|
+
var _labelContainerRef$cu;
|
|
464
|
+
if (e.target === e.currentTarget || (_labelContainerRef$cu = labelContainerRef.current) !== null && _labelContainerRef$cu !== void 0 && _labelContainerRef$cu.contains(e.target)) {
|
|
460
465
|
const newIndex = isSorted ? selectedSortIndex : 0;
|
|
461
466
|
const newDirection = isSorted && selectedSortOption.direction === 'ascending' ? 'descending' : 'ascending';
|
|
462
467
|
setSelectedSortOption({
|
|
@@ -521,10 +526,11 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
521
526
|
}
|
|
522
527
|
};
|
|
523
528
|
const handleMouseMove = e => {
|
|
529
|
+
var _columnHeaderRef$curr3;
|
|
524
530
|
const mouseX = e.clientX;
|
|
525
|
-
const headerX = columnHeaderRef.current
|
|
531
|
+
const headerX = (_columnHeaderRef$curr3 = columnHeaderRef.current) === null || _columnHeaderRef$curr3 === void 0 ? void 0 : _columnHeaderRef$curr3.getBoundingClientRect().x;
|
|
526
532
|
const newWidth = Math.max(80, mouseX - headerX);
|
|
527
|
-
onWidthChange
|
|
533
|
+
onWidthChange === null || onWidthChange === void 0 ? void 0 : onWidthChange(newWidth);
|
|
528
534
|
};
|
|
529
535
|
const handleMouseUp = e => {
|
|
530
536
|
if (e.button === 0) {
|
|
@@ -544,7 +550,10 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
544
550
|
onIsPinnedChange: disableUserPinnableColumns ? undefined : handleIsPinnedChange,
|
|
545
551
|
onMoveLeft: disableUserReorderableColumns || isPinned && columnIndex === 0 || !isPinned && columnIndex === minUnpinnedColumnIndex ? undefined : handleMoveLeft,
|
|
546
552
|
onMoveRight: disableUserReorderableColumns || isPinned && columnIndex === minUnpinnedColumnIndex - 1 || !isPinned && columnIndex === maxUnpinnedColumnIndex ? undefined : handleMoveRight,
|
|
547
|
-
onFocus: () =>
|
|
553
|
+
onFocus: () => {
|
|
554
|
+
var _columnHeaderRef$curr4;
|
|
555
|
+
return (_columnHeaderRef$curr4 = columnHeaderRef.current) === null || _columnHeaderRef$curr4 === void 0 ? void 0 : _columnHeaderRef$curr4.focus();
|
|
556
|
+
},
|
|
548
557
|
columnId: id,
|
|
549
558
|
columnHeaderRef,
|
|
550
559
|
'data-testid': dataTestId
|
|
@@ -612,7 +621,8 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
612
621
|
tabIndex: -1,
|
|
613
622
|
"aria-hidden": "true",
|
|
614
623
|
onFocus: () => {
|
|
615
|
-
|
|
624
|
+
var _columnHeaderRef$curr5;
|
|
625
|
+
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
616
626
|
},
|
|
617
627
|
className: styles$a.advancedTableColumnHeaderMenuHiddenAnchor
|
|
618
628
|
})
|
|
@@ -676,14 +686,15 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
676
686
|
} : undefined;
|
|
677
687
|
const handleKeyDown = e => {
|
|
678
688
|
if (e.target === e.currentTarget && e.key === 'Enter' && isInteractive) {
|
|
679
|
-
|
|
689
|
+
var _focusableElementRef$;
|
|
690
|
+
(_focusableElementRef$ = focusableElementRef.current) === null || _focusableElementRef$ === void 0 ? void 0 : _focusableElementRef$.focus();
|
|
680
691
|
e.preventDefault(); // Prevent click event from occurring on the focusable element
|
|
681
692
|
}
|
|
682
693
|
|
|
683
|
-
onKeyDown
|
|
694
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
684
695
|
};
|
|
685
696
|
const handleFocus = e => {
|
|
686
|
-
onFocus
|
|
697
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
687
698
|
if (isInteractive) {
|
|
688
699
|
if (e.target !== e.currentTarget) {
|
|
689
700
|
setIsEditing(true);
|
|
@@ -698,7 +709,8 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
698
709
|
}
|
|
699
710
|
} : undefined;
|
|
700
711
|
const focusCell = () => {
|
|
701
|
-
|
|
712
|
+
var _cellRef$current;
|
|
713
|
+
(_cellRef$current = cellRef.current) === null || _cellRef$current === void 0 ? void 0 : _cellRef$current.focus();
|
|
702
714
|
};
|
|
703
715
|
const computedWidth = useComputedWidth(widthBuffer, width);
|
|
704
716
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
@@ -849,6 +861,7 @@ const AdvancedTableHiddenDescription = _ref => {
|
|
|
849
861
|
};
|
|
850
862
|
|
|
851
863
|
const AdvancedTableDragPreview = _ref => {
|
|
864
|
+
var _columnHeaderRefs$ite, _columnHeaderRefs$ite2, _tableRef$current, _tableRef$current$get;
|
|
852
865
|
let {
|
|
853
866
|
tableRef,
|
|
854
867
|
columnHeaderRefs
|
|
@@ -860,10 +873,10 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
860
873
|
item: monitor.getItem(),
|
|
861
874
|
currentOffset: monitor.getSourceClientOffset()
|
|
862
875
|
}));
|
|
863
|
-
const width = columnHeaderRefs
|
|
864
|
-
const height = tableRef.current
|
|
865
|
-
const top = currentOffset
|
|
866
|
-
const left = currentOffset
|
|
876
|
+
const width = columnHeaderRefs === null || columnHeaderRefs === void 0 ? void 0 : (_columnHeaderRefs$ite = columnHeaderRefs[item === null || item === void 0 ? void 0 : item.columnIndex]) === null || _columnHeaderRefs$ite === void 0 ? void 0 : (_columnHeaderRefs$ite2 = _columnHeaderRefs$ite.getBoundingClientRect()) === null || _columnHeaderRefs$ite2 === void 0 ? void 0 : _columnHeaderRefs$ite2.width;
|
|
877
|
+
const height = (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : (_tableRef$current$get = _tableRef$current.getBoundingClientRect()) === null || _tableRef$current$get === void 0 ? void 0 : _tableRef$current$get.height;
|
|
878
|
+
const top = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.y) || 0;
|
|
879
|
+
const left = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.x) || 0;
|
|
867
880
|
return /*#__PURE__*/React__default["default"].createElement(index.Portal, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
868
881
|
className: styles$a.dragPreview,
|
|
869
882
|
style: {
|
|
@@ -891,7 +904,7 @@ const AdvancedTablePagination = _ref => {
|
|
|
891
904
|
page
|
|
892
905
|
} = _ref2;
|
|
893
906
|
setCurrentPage(page);
|
|
894
|
-
onPageChange
|
|
907
|
+
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page);
|
|
895
908
|
};
|
|
896
909
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
897
910
|
className: styles$a.advancedTablePaginationContainer
|
|
@@ -946,6 +959,7 @@ const AdvancedTableRowExpandButton = _ref => {
|
|
|
946
959
|
};
|
|
947
960
|
|
|
948
961
|
const AdvancedTable = _ref => {
|
|
962
|
+
var _ref5;
|
|
949
963
|
let {
|
|
950
964
|
columnConfigs: externalColumnConfigs,
|
|
951
965
|
rows: rowsPropExternal,
|
|
@@ -987,7 +1001,7 @@ const AdvancedTable = _ref => {
|
|
|
987
1001
|
// This handles an edge case where no rows are passed in
|
|
988
1002
|
// and the internal row transforms cause infinite state updates using a standard default assignment
|
|
989
1003
|
const stableDefaultArray = React.useMemo(() => [], []);
|
|
990
|
-
const rowsProp = rowsPropExternal
|
|
1004
|
+
const rowsProp = rowsPropExternal !== null && rowsPropExternal !== void 0 ? rowsPropExternal : stableDefaultArray;
|
|
991
1005
|
const [rows, setRows] = React.useState();
|
|
992
1006
|
const rowActionsColumnConfigId = index.useId();
|
|
993
1007
|
let rowActionsColumnConfig;
|
|
@@ -996,7 +1010,7 @@ const AdvancedTable = _ref => {
|
|
|
996
1010
|
[externalColumnConfigs, rows] // columnConfigs has an implicit dependency on rows because it is initially computed using rows data
|
|
997
1011
|
);
|
|
998
1012
|
|
|
999
|
-
const [currentPage, setCurrentPage] = React.useState(initialPage
|
|
1013
|
+
const [currentPage, setCurrentPage] = React.useState(initialPage !== null && initialPage !== void 0 ? initialPage : 1);
|
|
1000
1014
|
const [tableHeight, setTableHeight] = React.useState();
|
|
1001
1015
|
const getPaginatedRowIndex = React.useCallback(universalRowIndex => rowsPerPage ? universalRowIndex + rowsPerPage * (currentPage - 1) : universalRowIndex, [rowsPerPage, currentPage]);
|
|
1002
1016
|
const paginatedRows = React.useMemo(() => {
|
|
@@ -1038,13 +1052,14 @@ const AdvancedTable = _ref => {
|
|
|
1038
1052
|
}
|
|
1039
1053
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1040
1054
|
className: styles$a.rowActionMenuPane
|
|
1041
|
-
}, !rows ? [] : rowActions
|
|
1055
|
+
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1056
|
+
var _actionGroup$actions;
|
|
1042
1057
|
const row = rows[rowIndex];
|
|
1043
|
-
const actions = !row ? [] : actionGroup.actions
|
|
1058
|
+
const actions = !row ? [] : (_actionGroup$actions = actionGroup.actions) === null || _actionGroup$actions === void 0 ? void 0 : _actionGroup$actions.map((action, actionIndex) => /*#__PURE__*/React__default["default"].createElement(index.DropdownOption
|
|
1044
1059
|
// React Docs: "We don't recommend using indexes for keys if the order of items may change." These will not change; the alternative is to require an id from the consumer.
|
|
1045
1060
|
// eslint-disable-next-line react/no-array-index-key
|
|
1046
1061
|
, {
|
|
1047
|
-
key:
|
|
1062
|
+
key: "".concat(groupIndex, "-").concat(actionIndex),
|
|
1048
1063
|
disabled: typeof action.isDisabled === 'function' ? action.isDisabled(row && row.rowPropReference) : action.isDisabled,
|
|
1049
1064
|
onSelect: () => action.action(row && row.rowPropReference),
|
|
1050
1065
|
value: "",
|
|
@@ -1084,9 +1099,9 @@ const AdvancedTable = _ref => {
|
|
|
1084
1099
|
const minColumnIndex = hasFocusableRows ? -1 : 0; // When entire rows are focusable, they get an index of -1 so that the columns can be zero-indexed
|
|
1085
1100
|
const maxColumnIndex = columnConfigs.length - 1;
|
|
1086
1101
|
const tableId = index.useId(externalTableId);
|
|
1087
|
-
const arrowKeyDescriptionId =
|
|
1088
|
-
const rowActionDescriptionId =
|
|
1089
|
-
const rowCheckboxDescriptionId =
|
|
1102
|
+
const arrowKeyDescriptionId = "".concat(tableId, "-arrowKeyDescription");
|
|
1103
|
+
const rowActionDescriptionId = "".concat(tableId, "-rowActionDescription");
|
|
1104
|
+
const rowCheckboxDescriptionId = "".concat(tableId, "-rowCheckboxDescription");
|
|
1090
1105
|
useResizeObserver__default["default"](tableRef, entry => {
|
|
1091
1106
|
setTableHeight(entry.contentRect.height);
|
|
1092
1107
|
});
|
|
@@ -1100,11 +1115,11 @@ const AdvancedTable = _ref => {
|
|
|
1100
1115
|
index.useDidUpdate(() => {
|
|
1101
1116
|
setInternalColumnOrder(columnConfigsOrder);
|
|
1102
1117
|
}, [JSON.stringify(columnConfigsOrder)]);
|
|
1103
|
-
const columnOrder = externalColumnOrder
|
|
1118
|
+
const columnOrder = externalColumnOrder !== null && externalColumnOrder !== void 0 ? externalColumnOrder : internalColumnOrder;
|
|
1104
1119
|
const setColumnOrder = index.useEventCallback(value => {
|
|
1105
1120
|
const newColumnOrder = typeof value === 'function' ? value(columnOrder) : value;
|
|
1106
1121
|
setInternalColumnOrder(newColumnOrder);
|
|
1107
|
-
onColumnOrderChange
|
|
1122
|
+
onColumnOrderChange === null || onColumnOrderChange === void 0 ? void 0 : onColumnOrderChange(newColumnOrder);
|
|
1108
1123
|
});
|
|
1109
1124
|
const {
|
|
1110
1125
|
pinnedColumnConfigs,
|
|
@@ -1211,7 +1226,7 @@ const AdvancedTable = _ref => {
|
|
|
1211
1226
|
return ids;
|
|
1212
1227
|
}, [rowsProp]);
|
|
1213
1228
|
const totalRowsCountWithExpansion = React.useMemo(() => getAllRowIds().length, [getAllRowIds]);
|
|
1214
|
-
const hasExpandableRows = React.useMemo(() => rows
|
|
1229
|
+
const hasExpandableRows = React.useMemo(() => rows === null || rows === void 0 ? void 0 : rows.some(_ref3 => {
|
|
1215
1230
|
let {
|
|
1216
1231
|
hasChildRows
|
|
1217
1232
|
} = _ref3;
|
|
@@ -1230,10 +1245,10 @@ const AdvancedTable = _ref => {
|
|
|
1230
1245
|
} else if (expand !== false) {
|
|
1231
1246
|
rowPropReference.isExpanded = true;
|
|
1232
1247
|
}
|
|
1233
|
-
onRowsChange
|
|
1248
|
+
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange([...rowsProp]);
|
|
1234
1249
|
};
|
|
1235
1250
|
const getLastToggledRowIndex = () => {
|
|
1236
|
-
const index = rows
|
|
1251
|
+
const index = rows === null || rows === void 0 ? void 0 : rows.findIndex(_ref4 => {
|
|
1237
1252
|
let {
|
|
1238
1253
|
id
|
|
1239
1254
|
} = _ref4;
|
|
@@ -1259,10 +1274,11 @@ const AdvancedTable = _ref => {
|
|
|
1259
1274
|
}
|
|
1260
1275
|
};
|
|
1261
1276
|
const multiUpdateCheckedRowIds = (startIndex, endIndex) => {
|
|
1277
|
+
var _rows$endIndex;
|
|
1262
1278
|
if (!rows || startIndex === headerRowIndex || endIndex === headerRowIndex) {
|
|
1263
1279
|
return;
|
|
1264
1280
|
}
|
|
1265
|
-
const endRowId = rows
|
|
1281
|
+
const endRowId = rows === null || rows === void 0 ? void 0 : (_rows$endIndex = rows[endIndex]) === null || _rows$endIndex === void 0 ? void 0 : _rows$endIndex.id;
|
|
1266
1282
|
const isEndIndexChecked = checkedRowIdsSet.has(endRowId);
|
|
1267
1283
|
let newCheckedRowIds = [...checkedRowIds];
|
|
1268
1284
|
const increment = startIndex < endIndex ? 1 : -1;
|
|
@@ -1330,8 +1346,8 @@ const AdvancedTable = _ref => {
|
|
|
1330
1346
|
let newFocusedRowIndex;
|
|
1331
1347
|
const currentRow = rows[rowIndex];
|
|
1332
1348
|
const rowOrFirstColumnIsFocused = focusedColumnIndex <= 0;
|
|
1333
|
-
const rowCanExpand = currentRow
|
|
1334
|
-
const rowCanCollapse = currentRow
|
|
1349
|
+
const rowCanExpand = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && !(currentRow !== null && currentRow !== void 0 && currentRow.isExpanded);
|
|
1350
|
+
const rowCanCollapse = (currentRow === null || currentRow === void 0 ? void 0 : currentRow.hasChildRows) && (currentRow === null || currentRow === void 0 ? void 0 : currentRow.isExpanded);
|
|
1335
1351
|
switch (e.key) {
|
|
1336
1352
|
case 'ArrowUp':
|
|
1337
1353
|
e.preventDefault(); // prevent scroll
|
|
@@ -1402,6 +1418,7 @@ const AdvancedTable = _ref => {
|
|
|
1402
1418
|
}
|
|
1403
1419
|
};
|
|
1404
1420
|
const getColumnHeaderProps = (columnConfig, columnIndex, isPinned) => {
|
|
1421
|
+
var _columnWidths$id;
|
|
1405
1422
|
const rowIndex = headerRowIndex;
|
|
1406
1423
|
const {
|
|
1407
1424
|
id,
|
|
@@ -1414,9 +1431,9 @@ const AdvancedTable = _ref => {
|
|
|
1414
1431
|
return {
|
|
1415
1432
|
id,
|
|
1416
1433
|
isRowActionMenuColumn,
|
|
1417
|
-
'data-testid': dataTestId && id ?
|
|
1434
|
+
'data-testid': dataTestId && id ? "".concat(dataTestId, "-").concat(id) : undefined,
|
|
1418
1435
|
label: headerLabel,
|
|
1419
|
-
width: columnWidths[id]
|
|
1436
|
+
width: (_columnWidths$id = columnWidths[id]) !== null && _columnWidths$id !== void 0 ? _columnWidths$id : width,
|
|
1420
1437
|
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[0] : undefined,
|
|
1421
1438
|
onWidthChange: disableUserResizableColumns || isRowActionMenuColumn ? undefined : newWidth => {
|
|
1422
1439
|
setColumnWidths(currentColumnWidths => {
|
|
@@ -1426,8 +1443,9 @@ const AdvancedTable = _ref => {
|
|
|
1426
1443
|
} else if (currentColumnWidths[colId]) {
|
|
1427
1444
|
map[colId] = currentColumnWidths[colId];
|
|
1428
1445
|
} else {
|
|
1429
|
-
|
|
1430
|
-
|
|
1446
|
+
var _cellRefs$current, _cellRefs$current$hea;
|
|
1447
|
+
const colRef = (_cellRefs$current = cellRefs.current) === null || _cellRefs$current === void 0 ? void 0 : (_cellRefs$current$hea = _cellRefs$current[headerRowIndex]) === null || _cellRefs$current$hea === void 0 ? void 0 : _cellRefs$current$hea[index];
|
|
1448
|
+
map[colId] = colRef === null || colRef === void 0 ? void 0 : colRef.getBoundingClientRect().width;
|
|
1431
1449
|
}
|
|
1432
1450
|
return map;
|
|
1433
1451
|
}, {});
|
|
@@ -1463,7 +1481,7 @@ const AdvancedTable = _ref => {
|
|
|
1463
1481
|
};
|
|
1464
1482
|
};
|
|
1465
1483
|
const getAdvancedTableRowExpandButton = (rowId, isExpanded, rowIndex) => /*#__PURE__*/React__default["default"].createElement(AdvancedTableRowExpandButton, {
|
|
1466
|
-
"data-testid": dataTestId && rowId ?
|
|
1484
|
+
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId, "-expand-button") : undefined,
|
|
1467
1485
|
isRowExpanded: !!isExpanded,
|
|
1468
1486
|
onClick: e => {
|
|
1469
1487
|
e.stopPropagation(); // prevent onRowSelect
|
|
@@ -1484,6 +1502,7 @@ const AdvancedTable = _ref => {
|
|
|
1484
1502
|
}, children);
|
|
1485
1503
|
};
|
|
1486
1504
|
const getCellProps = (columnConfig, columnIndex, data, rowIndex, rowId, depth) => {
|
|
1505
|
+
var _columnWidths$columnI;
|
|
1487
1506
|
const {
|
|
1488
1507
|
id: columnId,
|
|
1489
1508
|
width,
|
|
@@ -1497,18 +1516,18 @@ const AdvancedTable = _ref => {
|
|
|
1497
1516
|
setValue: newValue => {
|
|
1498
1517
|
const newRows = [...rowsProp];
|
|
1499
1518
|
newRows[rowIndex].data[columnId] = newValue;
|
|
1500
|
-
onRowsChange
|
|
1519
|
+
onRowsChange === null || onRowsChange === void 0 ? void 0 : onRowsChange(newRows);
|
|
1501
1520
|
},
|
|
1502
1521
|
renderCellContent,
|
|
1503
1522
|
isCellContentInteractive,
|
|
1504
|
-
width: columnWidths[columnId]
|
|
1523
|
+
width: (_columnWidths$columnI = columnWidths[columnId]) !== null && _columnWidths$columnI !== void 0 ? _columnWidths$columnI : width,
|
|
1505
1524
|
widthBuffer: columnIndex === 0 && maxRowDepth > 0 ? columnWidthBuffers[depth] : undefined,
|
|
1506
1525
|
alignment,
|
|
1507
1526
|
rowId,
|
|
1508
1527
|
columnId,
|
|
1509
1528
|
rowIndex,
|
|
1510
1529
|
columnIndex,
|
|
1511
|
-
'data-testid': dataTestId && rowId && columnId ?
|
|
1530
|
+
'data-testid': dataTestId && rowId && columnId ? "".concat(dataTestId, "-cell-").concat(rowId, "-").concat(columnId) : undefined,
|
|
1512
1531
|
isFocused: rowIndex === focusedRowIndex && columnIndex === focusedColumnIndex,
|
|
1513
1532
|
onFocus: onCellFocus(rowIndex, columnIndex),
|
|
1514
1533
|
onKeyDown: onKeyDown(rowIndex),
|
|
@@ -1568,16 +1587,16 @@ const AdvancedTable = _ref => {
|
|
|
1568
1587
|
onClick: handleColumnHeaderCheckboxToggle,
|
|
1569
1588
|
onFocus: onRowFocus(headerRowIndex, minColumnIndex),
|
|
1570
1589
|
variant: "header"
|
|
1571
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
1590
|
+
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, pinnedColumnConfigs.map((columnConfigs, i) => {
|
|
1572
1591
|
const props = getColumnHeaderProps(columnConfigs, i, true);
|
|
1573
1592
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1574
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
1593
|
+
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth, "px"), true) : undefined, unpinnedColumnConfigs.map((columnConfigs, i) => {
|
|
1575
1594
|
const props = getColumnHeaderProps(columnConfigs, i + pinnedColumnConfigs.length, false);
|
|
1576
1595
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1577
1596
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1578
1597
|
role: "rowgroup",
|
|
1579
1598
|
className: styles$a.advancedTableRowGroup
|
|
1580
|
-
}, (paginatedRows
|
|
1599
|
+
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
1581
1600
|
const {
|
|
1582
1601
|
id: rowId,
|
|
1583
1602
|
data,
|
|
@@ -1594,7 +1613,7 @@ const AdvancedTable = _ref => {
|
|
|
1594
1613
|
const onSelect = e => {
|
|
1595
1614
|
e.preventDefault(); // stops event from triggering on new target when focus is changed during onSelect
|
|
1596
1615
|
if (hasOnRowSelect) {
|
|
1597
|
-
onRowSelect
|
|
1616
|
+
onRowSelect === null || onRowSelect === void 0 ? void 0 : onRowSelect(row.rowPropReference);
|
|
1598
1617
|
setSelectedRowId(rowId);
|
|
1599
1618
|
}
|
|
1600
1619
|
};
|
|
@@ -1609,7 +1628,7 @@ const AdvancedTable = _ref => {
|
|
|
1609
1628
|
"aria-rowindex": hasExpandableRows ? undefined : paginatedRowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1610
1629
|
,
|
|
1611
1630
|
|
|
1612
|
-
"data-testid": dataTestId && rowId ?
|
|
1631
|
+
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId) : undefined,
|
|
1613
1632
|
hasOnRowSelect: hasOnRowSelect,
|
|
1614
1633
|
isFocusable: hasFocusableRows,
|
|
1615
1634
|
isFocused: paginatedRowIndex === focusedRowIndex && minColumnIndex === focusedColumnIndex,
|
|
@@ -1618,7 +1637,7 @@ const AdvancedTable = _ref => {
|
|
|
1618
1637
|
onKeyDown: onRowKeyDown,
|
|
1619
1638
|
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex),
|
|
1620
1639
|
onClick: e => onSelect(e),
|
|
1621
|
-
key:
|
|
1640
|
+
key: "".concat(rowId).concat(depth).concat(parentId),
|
|
1622
1641
|
ref: createRef(paginatedRowIndex, minColumnIndex),
|
|
1623
1642
|
"aria-level": hasExpandableRows ? depth + 1 : undefined // aria-level is one-indexed
|
|
1624
1643
|
,
|
|
@@ -1642,14 +1661,14 @@ const AdvancedTable = _ref => {
|
|
|
1642
1661
|
onMouseEnter: () => setIsCheckboxHovered(true),
|
|
1643
1662
|
onMouseLeave: () => setIsCheckboxHovered(false),
|
|
1644
1663
|
onFocus: onRowFocus(paginatedRowIndex, minColumnIndex)
|
|
1645
|
-
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
1664
|
+
}), hasExpandableRows && pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, pinnedColumnConfigs.map((c, i) => {
|
|
1646
1665
|
const props = getCellProps(c, i, data, paginatedRowIndex, rowId, depth);
|
|
1647
1666
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1648
1667
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1649
1668
|
,
|
|
1650
1669
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
1651
1670
|
}));
|
|
1652
|
-
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer(
|
|
1671
|
+
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
1653
1672
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
1654
1673
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1655
1674
|
className: styles$a.advancedTableRowChild,
|
|
@@ -1670,26 +1689,27 @@ const AdvancedTable = _ref => {
|
|
|
1670
1689
|
};
|
|
1671
1690
|
|
|
1672
1691
|
// TODO: move hook to separate file
|
|
1673
|
-
function useSortedRows(
|
|
1692
|
+
function useSortedRows(_ref6) {
|
|
1674
1693
|
let {
|
|
1675
1694
|
columnConfigs,
|
|
1676
1695
|
onRowsChange,
|
|
1677
1696
|
selectedSortOption,
|
|
1678
1697
|
setCurrentPage
|
|
1679
|
-
} =
|
|
1698
|
+
} = _ref6;
|
|
1680
1699
|
const columnConfigsRef = index.useLatest(columnConfigs);
|
|
1681
1700
|
const onRowsChangeRef = index.useLatest(onRowsChange);
|
|
1682
1701
|
index.useDidUpdate(() => {
|
|
1702
|
+
var _columnConfigsRef$cur, _columnConfigsRef$cur2, _columnConfigsRef$cur3;
|
|
1683
1703
|
const {
|
|
1684
1704
|
columnId,
|
|
1685
1705
|
index
|
|
1686
1706
|
} = selectedSortOption;
|
|
1687
|
-
const sort = columnConfigsRef.current.find(
|
|
1707
|
+
const sort = (_columnConfigsRef$cur = columnConfigsRef.current.find(_ref7 => {
|
|
1688
1708
|
let {
|
|
1689
1709
|
id
|
|
1690
|
-
} =
|
|
1710
|
+
} = _ref7;
|
|
1691
1711
|
return id === columnId;
|
|
1692
|
-
})
|
|
1712
|
+
})) === null || _columnConfigsRef$cur === void 0 ? void 0 : (_columnConfigsRef$cur2 = _columnConfigsRef$cur.sortOptions) === null || _columnConfigsRef$cur2 === void 0 ? void 0 : (_columnConfigsRef$cur3 = _columnConfigsRef$cur2[index]) === null || _columnConfigsRef$cur3 === void 0 ? void 0 : _columnConfigsRef$cur3.sort;
|
|
1693
1713
|
if (typeof sort === 'function' && onRowsChangeRef.current) {
|
|
1694
1714
|
onRowsChangeRef.current(sort(selectedSortOption));
|
|
1695
1715
|
setCurrentPage(1);
|
|
@@ -1698,7 +1718,7 @@ function useSortedRows(_ref5) {
|
|
|
1698
1718
|
}
|
|
1699
1719
|
|
|
1700
1720
|
// TODO: move hook to separate file
|
|
1701
|
-
function useFocusState(
|
|
1721
|
+
function useFocusState(_ref8) {
|
|
1702
1722
|
let {
|
|
1703
1723
|
headerRowIndex,
|
|
1704
1724
|
maxRowIndex,
|
|
@@ -1708,7 +1728,7 @@ function useFocusState(_ref7) {
|
|
|
1708
1728
|
pinnedUnpinnedColumnOrder,
|
|
1709
1729
|
tableRef,
|
|
1710
1730
|
currentPage
|
|
1711
|
-
} =
|
|
1731
|
+
} = _ref8;
|
|
1712
1732
|
const cellRefs = React.useRef({});
|
|
1713
1733
|
const pinnedContainersRef = React.useRef({});
|
|
1714
1734
|
const [focusedRowIndex, setFocusedRowIndex] = React.useState(headerRowIndex);
|
|
@@ -1734,11 +1754,12 @@ function useFocusState(_ref7) {
|
|
|
1734
1754
|
return newIndex;
|
|
1735
1755
|
};
|
|
1736
1756
|
const focusCell = index.useEventCallback(cell => {
|
|
1757
|
+
var _tableRef$current, _cellRefs$current2, _cellRefs$current2$he;
|
|
1737
1758
|
// Manually scroll cells/rows into view if needed
|
|
1738
|
-
const tablePos = tableRef.current
|
|
1739
|
-
const header = cellRefs.current
|
|
1740
|
-
const headerPos = header
|
|
1741
|
-
let cellPos = cell
|
|
1759
|
+
const tablePos = (_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.getBoundingClientRect();
|
|
1760
|
+
const header = (_cellRefs$current2 = cellRefs.current) === null || _cellRefs$current2 === void 0 ? void 0 : (_cellRefs$current2$he = _cellRefs$current2[headerRowIndex]) === null || _cellRefs$current2$he === void 0 ? void 0 : _cellRefs$current2$he[-1];
|
|
1761
|
+
const headerPos = header === null || header === void 0 ? void 0 : header.getBoundingClientRect();
|
|
1762
|
+
let cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
1742
1763
|
|
|
1743
1764
|
// Vertical scroll
|
|
1744
1765
|
if (cell !== header && !header.contains(cell)) {
|
|
@@ -1759,6 +1780,7 @@ function useFocusState(_ref7) {
|
|
|
1759
1780
|
if (minColumnIndex === -1 && focusedColumnIndex === minColumnIndex) {
|
|
1760
1781
|
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
1761
1782
|
} else {
|
|
1783
|
+
var _pinnedContainersRef$;
|
|
1762
1784
|
if (cellPos.left < tablePos.left) {
|
|
1763
1785
|
// Scroll right if cell out of view to the left of the table
|
|
1764
1786
|
tableRef.current.scrollLeft -= tablePos.left - cellPos.left;
|
|
@@ -1766,23 +1788,24 @@ function useFocusState(_ref7) {
|
|
|
1766
1788
|
// Scroll left if cell out of view to the right of the table
|
|
1767
1789
|
tableRef.current.scrollLeft += cellPos.right - tablePos.right;
|
|
1768
1790
|
}
|
|
1769
|
-
const pinnedContainer = pinnedContainersRef.current
|
|
1770
|
-
const pinnedContainerPos = pinnedContainer
|
|
1771
|
-
cellPos = cell
|
|
1791
|
+
const pinnedContainer = (_pinnedContainersRef$ = pinnedContainersRef.current) === null || _pinnedContainersRef$ === void 0 ? void 0 : _pinnedContainersRef$[focusedRowIndex];
|
|
1792
|
+
const pinnedContainerPos = pinnedContainer === null || pinnedContainer === void 0 ? void 0 : pinnedContainer.getBoundingClientRect();
|
|
1793
|
+
cellPos = cell === null || cell === void 0 ? void 0 : cell.getBoundingClientRect();
|
|
1772
1794
|
|
|
1773
1795
|
// Scroll right if cell covered by pinned columns
|
|
1774
1796
|
if (pinnedContainer && cellPos.left < pinnedContainerPos.left + pinnedContainerPos.width && !pinnedContainer.contains(cell)) {
|
|
1775
1797
|
tableRef.current.scrollLeft -= pinnedContainerPos.left + pinnedContainerPos.width - cellPos.left;
|
|
1776
1798
|
}
|
|
1777
1799
|
}
|
|
1778
|
-
cell
|
|
1800
|
+
cell === null || cell === void 0 ? void 0 : cell.focus();
|
|
1779
1801
|
});
|
|
1780
1802
|
|
|
1781
1803
|
// Focus header cell when the focused column id changes. Used when pinning/unpinning columns since a new DOM element is created.
|
|
1782
1804
|
index.useDidUpdate(() => {
|
|
1783
1805
|
if (focusedColumnId) {
|
|
1806
|
+
var _cellRefs$current3, _cellRefs$current3$fo;
|
|
1784
1807
|
const columnIndex = pinnedUnpinnedColumnOrder.indexOf(focusedColumnId);
|
|
1785
|
-
focusCell(cellRefs.current
|
|
1808
|
+
focusCell((_cellRefs$current3 = cellRefs.current) === null || _cellRefs$current3 === void 0 ? void 0 : (_cellRefs$current3$fo = _cellRefs$current3[focusedRowIndex]) === null || _cellRefs$current3$fo === void 0 ? void 0 : _cellRefs$current3$fo[columnIndex]);
|
|
1786
1809
|
setFocusedColumnIndex(columnIndex);
|
|
1787
1810
|
setFocusedColumnId(undefined);
|
|
1788
1811
|
}
|
|
@@ -1790,7 +1813,8 @@ function useFocusState(_ref7) {
|
|
|
1790
1813
|
|
|
1791
1814
|
// Focus cell when the focused indices change
|
|
1792
1815
|
index.useDidUpdate(() => {
|
|
1793
|
-
|
|
1816
|
+
var _cellRefs$current4, _cellRefs$current4$fo;
|
|
1817
|
+
const newFocusedCell = (_cellRefs$current4 = cellRefs.current) === null || _cellRefs$current4 === void 0 ? void 0 : (_cellRefs$current4$fo = _cellRefs$current4[focusedRowIndex]) === null || _cellRefs$current4$fo === void 0 ? void 0 : _cellRefs$current4$fo[focusedColumnIndex];
|
|
1794
1818
|
|
|
1795
1819
|
/* Prevent cells from stealing focus from their children when they
|
|
1796
1820
|
* receive focus, but still allow focus to move from a cell to a row.
|
|
@@ -1817,9 +1841,9 @@ function useFocusState(_ref7) {
|
|
|
1817
1841
|
|
|
1818
1842
|
/* eslint-disable import/prefer-default-export */
|
|
1819
1843
|
|
|
1820
|
-
var css_248z$9 = ".
|
|
1821
|
-
var styles$9 = {"collapsibleSearchInput":"
|
|
1822
|
-
var stylesheet$9=".
|
|
1844
|
+
var css_248z$9 = "._jakeN{display:inline-block;width:36px;transition:width .25s ease-out}._eTa5V{width:100%}._4oLH9>input{padding-right:0!important}._P3iQS>svg{fill:#515559}";
|
|
1845
|
+
var styles$9 = {"collapsibleSearchInput":"_jakeN","searchInput":"_eTa5V","searchInputCollapsed":"_4oLH9","iconButton":"_P3iQS"};
|
|
1846
|
+
var stylesheet$9="._jakeN{display:inline-block;width:36px;transition:width .25s ease-out}._eTa5V{width:100%}._4oLH9>input{padding-right:0!important}._P3iQS>svg{fill:#515559}";
|
|
1823
1847
|
icons_index.styleInject(css_248z$9);
|
|
1824
1848
|
|
|
1825
1849
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -1835,7 +1859,7 @@ const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, re
|
|
|
1835
1859
|
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, _extends__default["default"]({}, rest, {
|
|
1836
1860
|
className: styles$9.iconButton,
|
|
1837
1861
|
"aria-label": label,
|
|
1838
|
-
tooltipContent: tooltipContent
|
|
1862
|
+
tooltipContent: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
|
|
1839
1863
|
tooltipPlacement: tooltipPlacement,
|
|
1840
1864
|
ref: ref
|
|
1841
1865
|
}), /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null));
|
|
@@ -1896,7 +1920,8 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1896
1920
|
});
|
|
1897
1921
|
};
|
|
1898
1922
|
const handleIconButtonClick = () => {
|
|
1899
|
-
|
|
1923
|
+
var _iconButtonRef$curren;
|
|
1924
|
+
(_iconButtonRef$curren = iconButtonRef.current) === null || _iconButtonRef$curren === void 0 ? void 0 : _iconButtonRef$curren.focus();
|
|
1900
1925
|
setExternalIsExpanded(true);
|
|
1901
1926
|
};
|
|
1902
1927
|
index.useDidUpdate(() => {
|
|
@@ -1911,10 +1936,11 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1911
1936
|
});
|
|
1912
1937
|
}, [externalIsExpanded]);
|
|
1913
1938
|
React.useEffect(() => {
|
|
1939
|
+
var _searchInputRef$curre, _iconButtonRef$curren2;
|
|
1914
1940
|
if (isComponentFocused) {
|
|
1915
1941
|
switch (internalExpandedState) {
|
|
1916
1942
|
case expandedStates.EXPANDING:
|
|
1917
|
-
searchInputRef.current
|
|
1943
|
+
(_searchInputRef$curre = searchInputRef.current) === null || _searchInputRef$curre === void 0 ? void 0 : _searchInputRef$curre.focus();
|
|
1918
1944
|
break;
|
|
1919
1945
|
case expandedStates.COLLAPSED:
|
|
1920
1946
|
/*
|
|
@@ -1922,7 +1948,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1922
1948
|
* This will show the focus ring on the icon button and allow the tooltip to appear.
|
|
1923
1949
|
*/
|
|
1924
1950
|
|
|
1925
|
-
iconButtonRef.current
|
|
1951
|
+
(_iconButtonRef$curren2 = iconButtonRef.current) === null || _iconButtonRef$curren2 === void 0 ? void 0 : _iconButtonRef$curren2.focus();
|
|
1926
1952
|
break;
|
|
1927
1953
|
default:
|
|
1928
1954
|
}
|
|
@@ -1958,9 +1984,9 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1958
1984
|
}));
|
|
1959
1985
|
});
|
|
1960
1986
|
|
|
1961
|
-
var css_248z$8 = ".
|
|
1962
|
-
var styles$8 = {"input":"
|
|
1963
|
-
var stylesheet$8=".
|
|
1987
|
+
var css_248z$8 = "._YIYhi input{padding-left:76px!important}._8-lxx input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._8-lxx input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._8-lxx input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Sijhl{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._Sijhl,._Sijhl._8-lxx:hover{background-color:transparent!important}._Sijhl:hover{background-color:rgba(50,54,58,.08)!important}._Sijhl:active{background-color:rgba(50,54,58,.11)!important}._Sijhl svg{top:2px!important}._SAdmy{position:relative}._Aoh3n{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1988
|
+
var styles$8 = {"input":"_YIYhi","disabled":"_8-lxx","dropdown":"_Sijhl","container":"_SAdmy","countryCode":"_Aoh3n"};
|
|
1989
|
+
var stylesheet$8="._YIYhi input{padding-left:76px!important}._8-lxx input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._8-lxx input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._8-lxx input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Sijhl{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._Sijhl,._Sijhl._8-lxx:hover{background-color:transparent!important}._Sijhl:hover{background-color:rgba(50,54,58,.08)!important}._Sijhl:active{background-color:rgba(50,54,58,.11)!important}._Sijhl svg{top:2px!important}._SAdmy{position:relative}._Aoh3n{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1964
1990
|
icons_index.styleInject(css_248z$8);
|
|
1965
1991
|
|
|
1966
1992
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -1986,9 +2012,10 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1986
2012
|
translate
|
|
1987
2013
|
} = index.useTranslation();
|
|
1988
2014
|
const getMinMaxLength = React.useCallback(() => {
|
|
2015
|
+
var _metadata$numberingPl;
|
|
1989
2016
|
const metadata = new libphonenumberJs.Metadata();
|
|
1990
2017
|
metadata.selectNumberingPlan(countryCode);
|
|
1991
|
-
const possibleLengths = metadata
|
|
2018
|
+
const possibleLengths = metadata === null || metadata === void 0 ? void 0 : (_metadata$numberingPl = metadata.numberingPlan) === null || _metadata$numberingPl === void 0 ? void 0 : _metadata$numberingPl.possibleLengths();
|
|
1992
2019
|
return possibleLengths ? [Math.min(...possibleLengths), Math.max(...possibleLengths)] : [0, genericMaxNumberLength];
|
|
1993
2020
|
}, [countryCode]);
|
|
1994
2021
|
const shouldUseMask = Number(libphonenumberJs.getCountryCallingCode(countryCode)) === 1;
|
|
@@ -2002,7 +2029,7 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2002
2029
|
React.useEffect(() => {
|
|
2003
2030
|
updateMask();
|
|
2004
2031
|
}, [countryCode, updateMask]);
|
|
2005
|
-
const removeNonNumericCharacters = value => value
|
|
2032
|
+
const removeNonNumericCharacters = value => value === null || value === void 0 ? void 0 : value.replace(/\D/g, '');
|
|
2006
2033
|
const handleInputChange = a => {
|
|
2007
2034
|
// remove all non-numeric characters
|
|
2008
2035
|
const value = removeNonNumericCharacters(a.target.value);
|
|
@@ -2018,12 +2045,12 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2018
2045
|
} catch (e) {
|
|
2019
2046
|
// `parsePhoneNumber` throws an error if the inputs are invalid.
|
|
2020
2047
|
}
|
|
2021
|
-
onChange
|
|
2048
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2022
2049
|
};
|
|
2023
2050
|
const inputClassNames = classNames__default["default"](styles$8.input, {
|
|
2024
2051
|
[styles$8.disabled]: isDisabled
|
|
2025
2052
|
});
|
|
2026
|
-
const dropdownLabel = React.useMemo(() => countryCode ?
|
|
2053
|
+
const dropdownLabel = React.useMemo(() => countryCode ? "+".concat(libphonenumberJs.getCountryCallingCode(countryCode)) : undefined, [countryCode]);
|
|
2027
2054
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2028
2055
|
className: styles$8.container,
|
|
2029
2056
|
"data-testid": dataTestId
|
|
@@ -2040,14 +2067,14 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2040
2067
|
disabled: isDisabled,
|
|
2041
2068
|
"aria-label": buttonAriaLabel,
|
|
2042
2069
|
"aria-labelledby": buttonAriaLabelledBy
|
|
2043
|
-
}, (countryCodes
|
|
2070
|
+
}, (countryCodes !== null && countryCodes !== void 0 ? countryCodes : libphonenumberJs.getCountries()).map(individualCountryCode => {
|
|
2044
2071
|
if (!libphonenumberJs.isSupportedCountry(individualCountryCode)) {
|
|
2045
2072
|
return null;
|
|
2046
2073
|
}
|
|
2047
2074
|
return /*#__PURE__*/React__default["default"].createElement(index.MenuItem, {
|
|
2048
2075
|
key: individualCountryCode,
|
|
2049
2076
|
value: individualCountryCode
|
|
2050
|
-
},
|
|
2077
|
+
}, "".concat(translate(individualCountryCode), " +").concat(libphonenumberJs.getCountryCallingCode(individualCountryCode)));
|
|
2051
2078
|
})), /*#__PURE__*/React__default["default"].createElement(InputMask__default["default"], {
|
|
2052
2079
|
value: isDisabled ? removeNonNumericCharacters(initialValue) : undefined,
|
|
2053
2080
|
type: "tel",
|
|
@@ -2102,7 +2129,7 @@ function deleteOption(option, options, hookFunctionName) {
|
|
|
2102
2129
|
const indexOfNodeToDelete = options.findIndex(n => n === option);
|
|
2103
2130
|
if (indexOfNodeToDelete === -1) {
|
|
2104
2131
|
// eslint-disable-next-line no-console
|
|
2105
|
-
console.error(
|
|
2132
|
+
console.error("[".concat(hookFunctionName, "] Attempt to delete node failed. This node does not exist in the list of registered nodes."));
|
|
2106
2133
|
} else {
|
|
2107
2134
|
options.splice(indexOfNodeToDelete, 1);
|
|
2108
2135
|
}
|
|
@@ -2125,7 +2152,7 @@ function useComboboxFilteredGroup() {
|
|
|
2125
2152
|
// NOTE: This function and its dependencies *must* not change during re-renders because it will cause ComboboxOptions to deregister and reregister, thus causing unexpected behavior
|
|
2126
2153
|
if (!option) {
|
|
2127
2154
|
// eslint-disable-next-line no-console
|
|
2128
|
-
console.warn(
|
|
2155
|
+
console.warn("[".concat(useComboboxFilteredGroup.name, "] registerOption called without any parameters! Pass in \"option\" as parameter."));
|
|
2129
2156
|
return;
|
|
2130
2157
|
}
|
|
2131
2158
|
insertOption(option, filteredOptionsRef.current);
|
|
@@ -2192,7 +2219,8 @@ isDisabled) {
|
|
|
2192
2219
|
* @param descendantElement - The element to be marked as the active descendant element.
|
|
2193
2220
|
*/
|
|
2194
2221
|
const focusDescendant = React.useCallback((descendantElement, index) => {
|
|
2195
|
-
|
|
2222
|
+
var _inputRef$current;
|
|
2223
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.setAttribute('aria-activedescendant', descendantElement.id);
|
|
2196
2224
|
setActiveDescendant({
|
|
2197
2225
|
element: descendantElement,
|
|
2198
2226
|
index
|
|
@@ -2223,7 +2251,7 @@ isDisabled) {
|
|
|
2223
2251
|
// NOTE: This function and its dependencies *must* not change during re-renders because it will cause ComboboxOptions to deregister and reregister, thus causing unexpected behavior
|
|
2224
2252
|
if (!option) {
|
|
2225
2253
|
// eslint-disable-next-line no-console
|
|
2226
|
-
console.error(
|
|
2254
|
+
console.error("[".concat(useComboboxFocusSequence.name, "] registerOption called without any parameters! Pass in a 'ComboboxOption' via the \"option\" parameter."));
|
|
2227
2255
|
} else {
|
|
2228
2256
|
insertOption(option, filteredOptionsRef.current);
|
|
2229
2257
|
}
|
|
@@ -2237,10 +2265,11 @@ isDisabled) {
|
|
|
2237
2265
|
// NOTE: This function and its dependencies *must* not change during re-renders because it will cause ComboboxOptions to deregister and reregister, thus causing unexpected behavior
|
|
2238
2266
|
if (!option) {
|
|
2239
2267
|
// eslint-disable-next-line no-console
|
|
2240
|
-
console.error(
|
|
2268
|
+
console.error("[".concat(useComboboxFocusSequence.name, "] deregisterOption called without any parameters! Pass in a 'ComboboxOption' via the \"option\" parameter."));
|
|
2241
2269
|
} else {
|
|
2270
|
+
var _activeDescendantRef$;
|
|
2242
2271
|
deleteOption(option, filteredOptionsRef.current, useComboboxFocusSequence.name);
|
|
2243
|
-
if (option === activeDescendantRef.current
|
|
2272
|
+
if (option === ((_activeDescendantRef$ = activeDescendantRef.current) === null || _activeDescendantRef$ === void 0 ? void 0 : _activeDescendantRef$.element)) {
|
|
2244
2273
|
setActiveDescendant(undefined);
|
|
2245
2274
|
}
|
|
2246
2275
|
if (filteredOptionsRef.current.length === 0) {
|
|
@@ -2282,7 +2311,8 @@ isDisabled) {
|
|
|
2282
2311
|
if (!isOpen) {
|
|
2283
2312
|
openFlyoutAndFocus(focusNext.name);
|
|
2284
2313
|
} else {
|
|
2285
|
-
|
|
2314
|
+
var _activeDescendantRef$2;
|
|
2315
|
+
const currentFocusedNodeIndex = (_activeDescendantRef$2 = activeDescendantRef.current) === null || _activeDescendantRef$2 === void 0 ? void 0 : _activeDescendantRef$2.index;
|
|
2286
2316
|
if (currentFocusedNodeIndex === filteredOptionsRef.current.length - 1) {
|
|
2287
2317
|
focusInput();
|
|
2288
2318
|
} else if (currentFocusedNodeIndex === undefined) {
|
|
@@ -2303,7 +2333,8 @@ isDisabled) {
|
|
|
2303
2333
|
if (!isOpen) {
|
|
2304
2334
|
openFlyoutAndFocus(focusPrevious.name);
|
|
2305
2335
|
} else {
|
|
2306
|
-
|
|
2336
|
+
var _activeDescendantRef$3;
|
|
2337
|
+
const currentFocusedNodeIndex = (_activeDescendantRef$3 = activeDescendantRef.current) === null || _activeDescendantRef$3 === void 0 ? void 0 : _activeDescendantRef$3.index;
|
|
2307
2338
|
if (currentFocusedNodeIndex === 0) {
|
|
2308
2339
|
focusInput();
|
|
2309
2340
|
} else if (currentFocusedNodeIndex === undefined) {
|
|
@@ -2390,13 +2421,13 @@ isDisabled) {
|
|
|
2390
2421
|
focusLast,
|
|
2391
2422
|
focusNext,
|
|
2392
2423
|
focusPrevious,
|
|
2393
|
-
activeDescendantElement: activeDescendant
|
|
2424
|
+
activeDescendantElement: activeDescendant === null || activeDescendant === void 0 ? void 0 : activeDescendant.element,
|
|
2394
2425
|
filteredOptionsRef
|
|
2395
2426
|
};
|
|
2396
2427
|
}
|
|
2397
2428
|
function logNoOptionsToFocusError(functionName) {
|
|
2398
2429
|
// eslint-disable-next-line no-console
|
|
2399
|
-
console.error(
|
|
2430
|
+
console.error("[".concat(useComboboxFocusSequence.name, "] Invalid call to '").concat(functionName, "'. There are no registered nodes to focus."));
|
|
2400
2431
|
}
|
|
2401
2432
|
|
|
2402
2433
|
/**
|
|
@@ -2483,7 +2514,7 @@ function useComboboxLoadingState(isLoading, isComponentFocused, activeDescendant
|
|
|
2483
2514
|
*/
|
|
2484
2515
|
function useComboboxValue(initialInputValue, externalInputValue, externalOnChange) {
|
|
2485
2516
|
// This is the `value` of the `input` element (what is displayed to the user)
|
|
2486
|
-
const [rawInputValue, setRawInputValue] = React.useState(externalInputValue
|
|
2517
|
+
const [rawInputValue, setRawInputValue] = React.useState(externalInputValue !== null && externalInputValue !== void 0 ? externalInputValue : initialInputValue);
|
|
2487
2518
|
|
|
2488
2519
|
// The `value` of the `input` element will become this value by the time the `input` element is blurred
|
|
2489
2520
|
const [committedInputValue, setCommittedInputValue_DO_NOT_USE // A setter is created below so that the raw input value is also updated
|
|
@@ -2519,9 +2550,10 @@ function getFlyoutDimensions(anchorDimensions) {
|
|
|
2519
2550
|
* @returns A CSS style object containing styles to properly size the flyout.
|
|
2520
2551
|
*/
|
|
2521
2552
|
function useListboxFlyoutDimensions(anchorElement) {
|
|
2553
|
+
var _anchorElement$offset, _anchorElement$offset2;
|
|
2522
2554
|
const [anchorDimensions, setAnchorDimensions] = React.useState({
|
|
2523
|
-
width: anchorElement
|
|
2524
|
-
height: anchorElement
|
|
2555
|
+
width: (_anchorElement$offset = anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.offsetWidth) !== null && _anchorElement$offset !== void 0 ? _anchorElement$offset : 0,
|
|
2556
|
+
height: (_anchorElement$offset2 = anchorElement === null || anchorElement === void 0 ? void 0 : anchorElement.offsetHeight) !== null && _anchorElement$offset2 !== void 0 ? _anchorElement$offset2 : 18
|
|
2525
2557
|
});
|
|
2526
2558
|
const [flyoutDimensions, setFlyoutDimensions] = React.useState(getFlyoutDimensions(anchorDimensions));
|
|
2527
2559
|
|
|
@@ -2559,8 +2591,9 @@ function useSelectedOptionScroll(isOpen, activeDescendantElement, optionsRef, fl
|
|
|
2559
2591
|
// Scrolls to the selected option if the selected option is out of view
|
|
2560
2592
|
React.useEffect(() => {
|
|
2561
2593
|
if (isOpen && activeDescendantElement && flyoutRef.current) {
|
|
2594
|
+
var _optionsRef$current;
|
|
2562
2595
|
const flyoutContainerElement = flyoutRef.current;
|
|
2563
|
-
if (activeDescendantElement === optionsRef.current
|
|
2596
|
+
if (activeDescendantElement === ((_optionsRef$current = optionsRef.current) === null || _optionsRef$current === void 0 ? void 0 : _optionsRef$current[0])) {
|
|
2564
2597
|
// Scrolls the first header into view if one exists
|
|
2565
2598
|
flyoutContainerElement.scrollTop = 0;
|
|
2566
2599
|
} else if (flyoutContainerElement.scrollHeight > flyoutContainerElement.clientHeight) {
|
|
@@ -2587,7 +2620,8 @@ function useShouldRenderGroupHeader(filteredOptionsRef, committedInputValue) {
|
|
|
2587
2620
|
|
|
2588
2621
|
// Should render the header if the group includes at least one filtered option
|
|
2589
2622
|
React.useEffect(() => {
|
|
2590
|
-
|
|
2623
|
+
var _filteredOptionsRef$c;
|
|
2624
|
+
if (((_filteredOptionsRef$c = filteredOptionsRef.current) === null || _filteredOptionsRef$c === void 0 ? void 0 : _filteredOptionsRef$c.length) === 0) {
|
|
2591
2625
|
setShouldRenderHeader(false);
|
|
2592
2626
|
} else {
|
|
2593
2627
|
setShouldRenderHeader(true);
|
|
@@ -2672,9 +2706,9 @@ function Combobox(_ref) {
|
|
|
2672
2706
|
}, children);
|
|
2673
2707
|
}
|
|
2674
2708
|
|
|
2675
|
-
var css_248z$7 = ".
|
|
2676
|
-
var styles$7 = {"loadingSpinner":"
|
|
2677
|
-
var stylesheet$7=".
|
|
2709
|
+
var css_248z$7 = "._xq0A3 :after{background-color:#515559!important}._5aqVK>input:focus{box-shadow:none!important;border:1px solid #898989!important}._N4RtS{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}._N4RtS ._-TygD ._WCjrf{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}._N4RtS ._-TygD:first-child ._kr1f5{display:none}._N4RtS ._eSWAu{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._N4RtS ._eSWAu:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._N4RtS ._eSWAu:hover._PQ7bi{background-color:#e4effa}._N4RtS ._eSWAu._PQ7bi{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._N4RtS ._eSWAu:active:not(._PQ7bi){background-color:#e8e9e9}";
|
|
2710
|
+
var styles$7 = {"loadingSpinner":"_xq0A3","ignoreFocusStyle":"_5aqVK","flyout":"_N4RtS","group":"_-TygD","header":"_WCjrf","divider":"_kr1f5","option":"_eSWAu","selected":"_PQ7bi"};
|
|
2711
|
+
var stylesheet$7="._xq0A3 :after{background-color:#515559!important}._5aqVK>input:focus{box-shadow:none!important;border:1px solid #898989!important}._N4RtS{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}._N4RtS ._-TygD ._WCjrf{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}._N4RtS ._-TygD:first-child ._kr1f5{display:none}._N4RtS ._eSWAu{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._N4RtS ._eSWAu:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._N4RtS ._eSWAu:hover._PQ7bi{background-color:#e4effa}._N4RtS ._eSWAu._PQ7bi{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._N4RtS ._eSWAu:active:not(._PQ7bi){background-color:#e8e9e9}";
|
|
2678
2712
|
icons_index.styleInject(css_248z$7);
|
|
2679
2713
|
|
|
2680
2714
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -2806,8 +2840,8 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2806
2840
|
onBlur: () => {
|
|
2807
2841
|
commitCurrentRawInputValueAndCloseFlyout();
|
|
2808
2842
|
},
|
|
2809
|
-
"aria-label": ariaLabel
|
|
2810
|
-
"aria-labelledby": ariaLabelledBy
|
|
2843
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
2844
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
2811
2845
|
"aria-describedby": ariaDescribedBy,
|
|
2812
2846
|
"data-testid": index.getSubDataTestId(rootDataTestId, 'input'),
|
|
2813
2847
|
"aria-expanded": isOpen,
|
|
@@ -2851,8 +2885,8 @@ const ComboboxFlyout = _ref => {
|
|
|
2851
2885
|
id: flyoutId,
|
|
2852
2886
|
className: styles$7.flyout,
|
|
2853
2887
|
style: flyoutDimensions,
|
|
2854
|
-
"aria-label": ariaLabel
|
|
2855
|
-
"aria-labelledby": ariaLabelledBy
|
|
2888
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
2889
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
2856
2890
|
"aria-describedby": ariaDescribedBy,
|
|
2857
2891
|
"data-testid": index.getSubDataTestId(rootDataTestId, 'flyout'),
|
|
2858
2892
|
ref: flyoutRef
|
|
@@ -2904,7 +2938,7 @@ function ComboboxGroup(_ref) {
|
|
|
2904
2938
|
className: styles$7.group,
|
|
2905
2939
|
"aria-labelledby": headerElementId,
|
|
2906
2940
|
"aria-describedby": ariaDescribedBy,
|
|
2907
|
-
"data-testid": index.getSubDataTestId(rootDataTestId,
|
|
2941
|
+
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
2908
2942
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
2909
2943
|
className: styles$7.divider
|
|
2910
2944
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -2975,14 +3009,14 @@ function ComboboxOption(_ref) {
|
|
|
2975
3009
|
onMouseDown: e => e.preventDefault() // Prevents the input from getting blurred
|
|
2976
3010
|
,
|
|
2977
3011
|
"aria-selected": isOptionSelected,
|
|
2978
|
-
"data-testid": index.getSubDataTestId(rootDataTestId,
|
|
3012
|
+
"data-testid": index.getSubDataTestId(rootDataTestId, "option-".concat(label)),
|
|
2979
3013
|
ref: containerElementRef
|
|
2980
3014
|
}, label);
|
|
2981
3015
|
}
|
|
2982
3016
|
|
|
2983
|
-
var css_248z$6 = ".
|
|
2984
|
-
var styles$6 = {"container":"
|
|
2985
|
-
var stylesheet$6=".
|
|
3017
|
+
var css_248z$6 = "._B6seV{display:flex}._pqoB0{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._pqoB0._UBkiu{background-color:#fff}._pqoB0._3U-X7,._pqoB0._UBkiu._0hH1c:not(._pqoB0._UBkiu._MbRy5),._pqoB0._UBkiu._4gcxR.focus-visible:not(._4ZzAQ),._pqoB0._UBkiu._4gcxR:focus-visible:not(._4ZzAQ){background-color:#0b6ed0}._pqoB0._3U-X7._4ZzAQ._4gcxR,._pqoB0._3U-X7._4ZzAQ._MbRy5,._pqoB0._3U-X7._MbRy5._0hH1c{opacity:.4}._7rzyU{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._7rzyU:focus{z-index:1}._Mn5Se{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}._Mn5Se svg{margin-left:1px}._Mn5Se._UBkiu{background-color:#0b6ed0;border-color:transparent}._Mn5Se._UBkiu svg{fill:#fff!important}._Mn5Se._UBkiu:not(._HDAla):hover{background-color:#085caf!important}._Mn5Se._UBkiu:not(._HDAla):active{background-color:#0854a1!important}._Mn5Se._UBkiu._HDAla{opacity:.4}._Mn5Se._UBkiu._HDAla svg{background-color:transparent}._Mn5Se._3U-X7{border-color:#0b6ed0;background-color:#fff}._Mn5Se._3U-X7 svg{fill:#0b6ed0!important}._Mn5Se._3U-X7:not(._HDAla):hover{background-color:#eef5fc!important}._Mn5Se._3U-X7:not(._HDAla):active{background-color:#e1edf9!important}._Mn5Se._3U-X7._HDAla{opacity:.4}._Mn5Se._3U-X7._HDAla svg{background-color:transparent}._ehPYJ{width:260px}";
|
|
3018
|
+
var styles$6 = {"container":"_B6seV","divider":"_pqoB0","primary":"_UBkiu","mainButtonFocus":"_4gcxR","mainButtonDisabled":"_4ZzAQ","dropdownButtonFocus":"_0hH1c","dropdownButtonDisabled":"_MbRy5","secondary":"_3U-X7","mainButton":"_7rzyU","dropdownButton":"_Mn5Se","disabled":"_HDAla","dropdownOption":"_ehPYJ"};
|
|
3019
|
+
var stylesheet$6="._B6seV{display:flex}._pqoB0{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._pqoB0._UBkiu{background-color:#fff}._pqoB0._3U-X7,._pqoB0._UBkiu._0hH1c:not(._pqoB0._UBkiu._MbRy5),._pqoB0._UBkiu._4gcxR.focus-visible:not(._4ZzAQ),._pqoB0._UBkiu._4gcxR:focus-visible:not(._4ZzAQ){background-color:#0b6ed0}._pqoB0._3U-X7._4ZzAQ._4gcxR,._pqoB0._3U-X7._4ZzAQ._MbRy5,._pqoB0._3U-X7._MbRy5._0hH1c{opacity:.4}._7rzyU{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._7rzyU:focus{z-index:1}._Mn5Se{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}._Mn5Se svg{margin-left:1px}._Mn5Se._UBkiu{background-color:#0b6ed0;border-color:transparent}._Mn5Se._UBkiu svg{fill:#fff!important}._Mn5Se._UBkiu:not(._HDAla):hover{background-color:#085caf!important}._Mn5Se._UBkiu:not(._HDAla):active{background-color:#0854a1!important}._Mn5Se._UBkiu._HDAla{opacity:.4}._Mn5Se._UBkiu._HDAla svg{background-color:transparent}._Mn5Se._3U-X7{border-color:#0b6ed0;background-color:#fff}._Mn5Se._3U-X7 svg{fill:#0b6ed0!important}._Mn5Se._3U-X7:not(._HDAla):hover{background-color:#eef5fc!important}._Mn5Se._3U-X7:not(._HDAla):active{background-color:#e1edf9!important}._Mn5Se._3U-X7._HDAla{opacity:.4}._Mn5Se._3U-X7._HDAla svg{background-color:transparent}._ehPYJ{width:260px}";
|
|
2986
3020
|
icons_index.styleInject(css_248z$6);
|
|
2987
3021
|
|
|
2988
3022
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3006,8 +3040,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3006
3040
|
const [mainButtonHasFocus, setMainButtonHasFocus] = React.useState(false);
|
|
3007
3041
|
|
|
3008
3042
|
// Keyboard navigation cannot be implemented using `onKeyDown` on the `button`s because keyboard events are disabled if the buttons are disabled. The consumer must be able to access either button, even if the other is disabled.
|
|
3009
|
-
index.useEventListener(mainButtonRef, 'keydown', e =>
|
|
3010
|
-
|
|
3043
|
+
index.useEventListener(mainButtonRef, 'keydown', e => {
|
|
3044
|
+
var _dropdownButtonRef$cu;
|
|
3045
|
+
return e.key === 'ArrowRight' && ((_dropdownButtonRef$cu = dropdownButtonRef.current) === null || _dropdownButtonRef$cu === void 0 ? void 0 : _dropdownButtonRef$cu.focus());
|
|
3046
|
+
});
|
|
3047
|
+
index.useEventListener(dropdownButtonRef, 'keydown', e => {
|
|
3048
|
+
var _mainButtonRef$curren;
|
|
3049
|
+
return e.key === 'ArrowLeft' && ((_mainButtonRef$curren = mainButtonRef.current) === null || _mainButtonRef$curren === void 0 ? void 0 : _mainButtonRef$curren.focus());
|
|
3050
|
+
});
|
|
3011
3051
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3012
3052
|
"data-testid": dataTestId,
|
|
3013
3053
|
className: classNames__default["default"](styles$6.container, className),
|
|
@@ -3076,9 +3116,9 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3076
3116
|
}, children);
|
|
3077
3117
|
});
|
|
3078
3118
|
|
|
3079
|
-
var css_248z$5 = ".
|
|
3080
|
-
var styles$5 = {"button":"
|
|
3081
|
-
var stylesheet$5=".
|
|
3119
|
+
var css_248z$5 = "._hd5Op{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}._hd5Op:hover:not(._bwYzJ){background-color:rgba(50,54,58,.08)}._hd5Op:hover:not(._bwYzJ)._pbRsW{border-color:#085caf;background-color:rgba(11,110,208,.04)}._hd5Op:hover:not(._bwYzJ)._pbRsW ._6K2iq{color:#32363a}._hd5Op:hover:not(._bwYzJ)._pbRsW ._ymGAJ{fill:#32363a}._hd5Op:hover:not(._bwYzJ)._pbRsW ._rrUXQ{fill:#085caf}._hd5Op:hover:not(._bwYzJ)._pbRsW ._cf46Y{background-color:rgba(11,110,208,.11)}._hd5Op:hover:not(._bwYzJ)._pbRsW ._cf46Y ._0oWI8{color:#085caf}._hd5Op:active:not(._bwYzJ){background-color:#e8e9e9}._hd5Op:active:not(._bwYzJ)._pbRsW{background-color:rgba(11,110,208,.11);border-color:#0854a1}._hd5Op:active:not(._bwYzJ)._pbRsW ._rrUXQ{fill:#0854a1}._hd5Op:active:not(._bwYzJ)._pbRsW ._cf46Y{background-color:rgba(11,110,208,.11)}._hd5Op:active:not(._bwYzJ)._pbRsW ._cf46Y ._0oWI8{color:#0854a1}._hd5Op._bwYzJ{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._hd5Op._pbRsW{border-color:#0b6ed0}._ymGAJ{fill:#515559;margin-right:4px}._6K2iq{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._6K2iq+._cf46Y{margin-left:6px}._6K2iq._bwYzJ{color:#74777a}._cf46Y{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}._0oWI8{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._rrUXQ{fill:#515559}._rrUXQ._bwYzJ,._rrUXQ._bwYzJ._pbRsW{fill:rgba(116,119,122,.4)}._rrUXQ._pbRsW{fill:#0b6ed0}._rrUXQ._rcyO1{transform:rotate(-180deg)}._hd5Op.focus-visible,._hd5Op:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3120
|
+
var styles$5 = {"button":"_hd5Op","disabled":"_bwYzJ","selected":"_pbRsW","label":"_6K2iq","lockIcon":"_ymGAJ","chevronIcon":"_rrUXQ","selectedFiltersContainer":"_cf46Y","selectedFilters":"_0oWI8","open":"_rcyO1"};
|
|
3121
|
+
var stylesheet$5="._hd5Op{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}._hd5Op:hover:not(._bwYzJ){background-color:rgba(50,54,58,.08)}._hd5Op:hover:not(._bwYzJ)._pbRsW{border-color:#085caf;background-color:rgba(11,110,208,.04)}._hd5Op:hover:not(._bwYzJ)._pbRsW ._6K2iq{color:#32363a}._hd5Op:hover:not(._bwYzJ)._pbRsW ._ymGAJ{fill:#32363a}._hd5Op:hover:not(._bwYzJ)._pbRsW ._rrUXQ{fill:#085caf}._hd5Op:hover:not(._bwYzJ)._pbRsW ._cf46Y{background-color:rgba(11,110,208,.11)}._hd5Op:hover:not(._bwYzJ)._pbRsW ._cf46Y ._0oWI8{color:#085caf}._hd5Op:active:not(._bwYzJ){background-color:#e8e9e9}._hd5Op:active:not(._bwYzJ)._pbRsW{background-color:rgba(11,110,208,.11);border-color:#0854a1}._hd5Op:active:not(._bwYzJ)._pbRsW ._rrUXQ{fill:#0854a1}._hd5Op:active:not(._bwYzJ)._pbRsW ._cf46Y{background-color:rgba(11,110,208,.11)}._hd5Op:active:not(._bwYzJ)._pbRsW ._cf46Y ._0oWI8{color:#0854a1}._hd5Op._bwYzJ{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._hd5Op._pbRsW{border-color:#0b6ed0}._ymGAJ{fill:#515559;margin-right:4px}._6K2iq{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._6K2iq+._cf46Y{margin-left:6px}._6K2iq._bwYzJ{color:#74777a}._cf46Y{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}._0oWI8{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._rrUXQ{fill:#515559}._rrUXQ._bwYzJ,._rrUXQ._bwYzJ._pbRsW{fill:rgba(116,119,122,.4)}._rrUXQ._pbRsW{fill:#0b6ed0}._rrUXQ._rcyO1{transform:rotate(-180deg)}._hd5Op.focus-visible,._hd5Op:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3082
3122
|
icons_index.styleInject(css_248z$5);
|
|
3083
3123
|
|
|
3084
3124
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -3112,14 +3152,14 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3112
3152
|
if (isDisabled) {
|
|
3113
3153
|
e.stopPropagation(); // Prevents "click" events from occurring on parent elements
|
|
3114
3154
|
} else {
|
|
3115
|
-
onClick
|
|
3155
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
3116
3156
|
}
|
|
3117
3157
|
},
|
|
3118
3158
|
onKeyDown: e => {
|
|
3119
3159
|
if (isDisabled) {
|
|
3120
3160
|
e.stopPropagation(); // Prevents "keydown" events from occurring on parent elements
|
|
3121
3161
|
} else {
|
|
3122
|
-
onKeyDown
|
|
3162
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
3123
3163
|
}
|
|
3124
3164
|
},
|
|
3125
3165
|
disabled: undefined // This component uses aria-disabled instead of disabled
|
|
@@ -3146,7 +3186,7 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3146
3186
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3147
3187
|
show: true,
|
|
3148
3188
|
size: "xs",
|
|
3149
|
-
"aria-label": loadingSpinnerAriaLabel
|
|
3189
|
+
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3150
3190
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3151
3191
|
className: styles$5.selectedFiltersContainer
|
|
3152
3192
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
@@ -3200,6 +3240,7 @@ const usePaneContext = childItemRef => {
|
|
|
3200
3240
|
|
|
3201
3241
|
/* eslint-disable max-classes-per-file */
|
|
3202
3242
|
const Menu = _ref => {
|
|
3243
|
+
var _process$env;
|
|
3203
3244
|
let {
|
|
3204
3245
|
'data-testid': dataTestId,
|
|
3205
3246
|
isOpen,
|
|
@@ -3207,9 +3248,10 @@ const Menu = _ref => {
|
|
|
3207
3248
|
isDisabled,
|
|
3208
3249
|
children
|
|
3209
3250
|
} = _ref;
|
|
3210
|
-
if (typeof process !== 'undefined' && process.env
|
|
3211
|
-
|
|
3212
|
-
window.
|
|
3251
|
+
if (typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test' && window) {
|
|
3252
|
+
var _window$ResizeObserve, _window$PointerEvent;
|
|
3253
|
+
window.ResizeObserver = (_window$ResizeObserve = window.ResizeObserver) !== null && _window$ResizeObserve !== void 0 ? _window$ResizeObserve : ResizeObserver;
|
|
3254
|
+
window.PointerEvent = (_window$PointerEvent = window.PointerEvent) !== null && _window$PointerEvent !== void 0 ? _window$PointerEvent : PointerEvent;
|
|
3213
3255
|
}
|
|
3214
3256
|
const [open, setOpen] = index.useControllableState(isOpen, onIsOpenChange, isOpen);
|
|
3215
3257
|
const [maskHeight, setMaskHeight] = React.useState(null);
|
|
@@ -3279,9 +3321,9 @@ class PointerEvent extends Event {
|
|
|
3279
3321
|
}
|
|
3280
3322
|
}
|
|
3281
3323
|
|
|
3282
|
-
var css_248z$4 = ".
|
|
3283
|
-
var styles$4 = {"buttonContainer":"
|
|
3284
|
-
var stylesheet$4=".
|
|
3324
|
+
var css_248z$4 = "._Ub19k{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._Ub19k>._4Ha8W{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}._Ub19k>._4Ha8W:hover:not([aria-disabled=true]){background-color:#f5f5f5}._Ub19k>._4Ha8W.focus-visible,._Ub19k>._4Ha8W:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._Ub19k>._4Ha8W+._JyDqK{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._Ub19k>._4Ha8W[data-state=open]+._JyDqK{transform:rotate(-180deg) translateY(50%)}._Ub19k>._4Ha8W[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._Ub19k>._4Ha8W[aria-disabled=true]+._JyDqK{fill:#515559;opacity:.4}._rWG1C>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;width:var(--radix-dropdown-menu-trigger-width);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:1!important}._rWG1C>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._FgUgU{margin:0;padding:4px 0;background:#fff;transition:.35s;opacity:1;overflow:auto;width:var(--radix-dropdown-menu-trigger-width);min-width:200px;max-height:350px}._FgUgU._1V3KV{margin-left:30px;opacity:0}._FgUgU._3jwFU{margin-left:-30px}._6Eaw4{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._6Eaw4._96pWW{cursor:unset}._6Eaw4 ._EF6gu{fill:#32363a;margin-right:4px}._6Eaw4:focus,._6Eaw4:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._6Eaw4[aria-disabled=true]{cursor:not-allowed;opacity:.65}._6Eaw4._l5dhb{padding-right:32px}._6Eaw4._l5dhb ._JyDqK{position:absolute;height:100%;right:3px;fill:#515559}._6Eaw4._6Ukt4{pointer-events:none}._60fcN{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;z-index:1;border-bottom:1px solid #e8e8e8}._60fcN._UyKRl{padding-top:49px}._ebned{z-index:1;pointer-events:none;position:fixed;left:0;top:0}._L6fLA{position:absolute;background-color:#fff;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;overflow:hidden;opacity:1;transition:opacity .35s}._L6fLA._3jwFU{opacity:0}._L6fLA._3jwFU>._4vs8I{margin-left:-30px}._L6fLA._1V3KV{opacity:0}._L6fLA._1V3KV>._4vs8I{margin-left:30px}._L6fLA>._4vs8I{transition:margin-left .35s;width:100%}._L6fLA._6Ukt4{pointer-events:none}body.keyboard-user ._6Eaw4:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3325
|
+
var styles$4 = {"buttonContainer":"_Ub19k","button":"_4Ha8W","rightIcon":"_JyDqK","maskContainer":"_rWG1C","flyout":"_FgUgU","animatedRight":"_1V3KV","animatedLeft":"_3jwFU","menuItem":"_6Eaw4","noItems":"_96pWW","backIcon":"_EF6gu","subMenu":"_l5dhb","unresponsive":"_6Ukt4","stickyBox":"_60fcN","isSearchable":"_UyKRl","searchBoxesContainer":"_ebned","searchBox":"_L6fLA","searchInput":"_4vs8I"};
|
|
3326
|
+
var stylesheet$4="._Ub19k{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._Ub19k>._4Ha8W{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}._Ub19k>._4Ha8W:hover:not([aria-disabled=true]){background-color:#f5f5f5}._Ub19k>._4Ha8W.focus-visible,._Ub19k>._4Ha8W:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._Ub19k>._4Ha8W+._JyDqK{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._Ub19k>._4Ha8W[data-state=open]+._JyDqK{transform:rotate(-180deg) translateY(50%)}._Ub19k>._4Ha8W[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._Ub19k>._4Ha8W[aria-disabled=true]+._JyDqK{fill:#515559;opacity:.4}._rWG1C>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;width:var(--radix-dropdown-menu-trigger-width);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:1!important}._rWG1C>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._FgUgU{margin:0;padding:4px 0;background:#fff;transition:.35s;opacity:1;overflow:auto;width:var(--radix-dropdown-menu-trigger-width);min-width:200px;max-height:350px}._FgUgU._1V3KV{margin-left:30px;opacity:0}._FgUgU._3jwFU{margin-left:-30px}._6Eaw4{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._6Eaw4._96pWW{cursor:unset}._6Eaw4 ._EF6gu{fill:#32363a;margin-right:4px}._6Eaw4:focus,._6Eaw4:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._6Eaw4[aria-disabled=true]{cursor:not-allowed;opacity:.65}._6Eaw4._l5dhb{padding-right:32px}._6Eaw4._l5dhb ._JyDqK{position:absolute;height:100%;right:3px;fill:#515559}._6Eaw4._6Ukt4{pointer-events:none}._60fcN{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;z-index:1;border-bottom:1px solid #e8e8e8}._60fcN._UyKRl{padding-top:49px}._ebned{z-index:1;pointer-events:none;position:fixed;left:0;top:0}._L6fLA{position:absolute;background-color:#fff;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;overflow:hidden;opacity:1;transition:opacity .35s}._L6fLA._3jwFU{opacity:0}._L6fLA._3jwFU>._4vs8I{margin-left:-30px}._L6fLA._1V3KV{opacity:0}._L6fLA._1V3KV>._4vs8I{margin-left:30px}._L6fLA>._4vs8I{transition:margin-left .35s;width:100%}._L6fLA._6Ukt4{pointer-events:none}body.keyboard-user ._6Eaw4:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3285
3327
|
icons_index.styleInject(css_248z$4);
|
|
3286
3328
|
|
|
3287
3329
|
/* eslint-disable import/prefer-default-export */
|
|
@@ -3371,6 +3413,7 @@ const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3371
3413
|
// creates a searchBarConfig, which maps to an instance of `MenuSearch`
|
|
3372
3414
|
// returns values that are necessary for use within pane
|
|
3373
3415
|
function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, menuParentDataTestId, id, flyoutRef) {
|
|
3416
|
+
var _searchRef$current$qu, _searchRef$current;
|
|
3374
3417
|
let backButtonRef = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : undefined;
|
|
3375
3418
|
let closeSubmenu = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : undefined;
|
|
3376
3419
|
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
@@ -3380,49 +3423,60 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3380
3423
|
} = index.useTranslation();
|
|
3381
3424
|
const noMatchesText = translate('menu.noItemsToDisplay');
|
|
3382
3425
|
const searchPlaceholder = translate('searchText');
|
|
3383
|
-
React.useEffect(() => setZeroSearchResults(items
|
|
3426
|
+
React.useEffect(() => setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0), [items, internalSearchValue]);
|
|
3384
3427
|
const {
|
|
3385
3428
|
isFocusVisible
|
|
3386
3429
|
} = interactions.useFocusVisible({
|
|
3387
3430
|
isTextInput: true
|
|
3388
3431
|
});
|
|
3389
3432
|
const searchRef = React.useRef(null);
|
|
3390
|
-
const searchInput = searchRef.current
|
|
3391
|
-
const getFirstNonNullItem = () =>
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3433
|
+
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;
|
|
3434
|
+
const getFirstNonNullItem = () => {
|
|
3435
|
+
var _backButtonRef$curren, _items$find;
|
|
3436
|
+
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;
|
|
3437
|
+
};
|
|
3438
|
+
const getLastNonNullItem = () => {
|
|
3439
|
+
var _findLast$element$cur, _findLast;
|
|
3440
|
+
return (// our tsconfig does not target a recent enough version to use `Array.prototype.findLast`
|
|
3441
|
+
(_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
|
|
3442
|
+
);
|
|
3443
|
+
};
|
|
3395
3444
|
index.useEventListener(flyoutRef, 'keydown', e => {
|
|
3396
3445
|
var _context, _context2;
|
|
3397
3446
|
if (_includesInstanceProperty__default["default"](_context = KEYS.NAVIGATE_UP).call(_context, e.key) && e.target === getFirstNonNullItem() || _includesInstanceProperty__default["default"](_context2 = KEYS.NAVIGATE_DOWN).call(_context2, e.key) && e.target === getLastNonNullItem()) {
|
|
3398
|
-
searchInput
|
|
3447
|
+
searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus();
|
|
3399
3448
|
}
|
|
3400
3449
|
}, {
|
|
3401
3450
|
additionalDependencies: [flyoutRef.current],
|
|
3402
3451
|
isDisabled: !isSearchable
|
|
3403
3452
|
});
|
|
3404
3453
|
index.useEventListener(searchInput, 'keydown', e => {
|
|
3405
|
-
var _context3, _context4, _context5, _context6;
|
|
3454
|
+
var _context3, _context4, _context5, _e$target, _context6;
|
|
3406
3455
|
if (_includesInstanceProperty__default["default"](_context3 = [...KEYS.NAVIGATE_DOWN, ...KEYS.NAVIGATE_TOP]).call(_context3, e.key)) {
|
|
3456
|
+
var _getFirstNonNullItem;
|
|
3407
3457
|
// prevent scrolling
|
|
3408
3458
|
e.preventDefault();
|
|
3409
|
-
getFirstNonNullItem()
|
|
3459
|
+
(_getFirstNonNullItem = getFirstNonNullItem()) === null || _getFirstNonNullItem === void 0 ? void 0 : _getFirstNonNullItem.focus();
|
|
3410
3460
|
} else if (_includesInstanceProperty__default["default"](_context4 = [...KEYS.NAVIGATE_UP, ...KEYS.NAVIIGATE_BOTTOM]).call(_context4, e.key)) {
|
|
3461
|
+
var _getLastNonNullItem;
|
|
3411
3462
|
// prevent scrolling
|
|
3412
3463
|
e.preventDefault();
|
|
3413
|
-
getLastNonNullItem()
|
|
3414
|
-
} else if (_includesInstanceProperty__default["default"](_context5 = KEYS.CLOSE_SUBMENU).call(_context5, e.key) && e.target
|
|
3415
|
-
closeSubmenu
|
|
3464
|
+
(_getLastNonNullItem = getLastNonNullItem()) === null || _getLastNonNullItem === void 0 ? void 0 : _getLastNonNullItem.focus();
|
|
3465
|
+
} else if (_includesInstanceProperty__default["default"](_context5 = KEYS.CLOSE_SUBMENU).call(_context5, e.key) && ((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3466
|
+
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3416
3467
|
} else if (_includesInstanceProperty__default["default"](_context6 = KEYS.IGNORED_BY_SEARCH_INPUT).call(_context6, e.key)) {
|
|
3417
3468
|
e.preventDefault();
|
|
3418
3469
|
}
|
|
3419
3470
|
});
|
|
3420
|
-
index.useEventListener(searchInput, 'blur', () => !isFocusVisible && !animatedLeft && !animatedRight && searchInput
|
|
3471
|
+
index.useEventListener(searchInput, 'blur', () => !isFocusVisible && !animatedLeft && !animatedRight && (searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus()));
|
|
3421
3472
|
const {
|
|
3422
3473
|
searchBarConfigs,
|
|
3423
3474
|
setSearchBarConfigs
|
|
3424
3475
|
} = useMenuContext();
|
|
3425
|
-
const onInteractOutside = React.useCallback(e => searchBarConfigs.some(config =>
|
|
3476
|
+
const onInteractOutside = React.useCallback(e => searchBarConfigs.some(config => {
|
|
3477
|
+
var _config$ref$current;
|
|
3478
|
+
return (_config$ref$current = config.ref.current) === null || _config$ref$current === void 0 ? void 0 : _config$ref$current.contains(e.target);
|
|
3479
|
+
}) && e.preventDefault(), [searchBarConfigs]);
|
|
3426
3480
|
React.useEffect(() => {
|
|
3427
3481
|
if (!isSearchable) {
|
|
3428
3482
|
return undefined;
|
|
@@ -3434,7 +3488,7 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3434
3488
|
isInteractive: !animatedLeft && !animatedRight,
|
|
3435
3489
|
animatedLeft,
|
|
3436
3490
|
animatedRight,
|
|
3437
|
-
dataTestId: menuParentDataTestId
|
|
3491
|
+
dataTestId: menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH),
|
|
3438
3492
|
setSearchValue,
|
|
3439
3493
|
ref: searchRef,
|
|
3440
3494
|
id,
|
|
@@ -3477,15 +3531,15 @@ const useMutationObserver = (target, options, onMutate) => React.useEffect(() =>
|
|
|
3477
3531
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3478
3532
|
args[_key] = arguments[_key];
|
|
3479
3533
|
}
|
|
3480
|
-
onMutate
|
|
3534
|
+
onMutate === null || onMutate === void 0 ? void 0 : onMutate(...args);
|
|
3481
3535
|
});
|
|
3482
3536
|
observer.observe(target, options);
|
|
3483
3537
|
return () => observer.disconnect();
|
|
3484
3538
|
}, [target, options, onMutate]);
|
|
3485
3539
|
|
|
3486
|
-
var css_248z$3 = ".
|
|
3487
|
-
var styles$3 = {"overlay":"
|
|
3488
|
-
var stylesheet$3=".
|
|
3540
|
+
var css_248z$3 = "._kc36j{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}._dUHYG{visibility:hidden}";
|
|
3541
|
+
var styles$3 = {"overlay":"_kc36j","hidden":"_dUHYG"};
|
|
3542
|
+
var stylesheet$3="._kc36j{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}._dUHYG{visibility:hidden}";
|
|
3489
3543
|
icons_index.styleInject(css_248z$3);
|
|
3490
3544
|
|
|
3491
3545
|
/**
|
|
@@ -3510,7 +3564,8 @@ const useOverlay = _ref => {
|
|
|
3510
3564
|
} = _ref;
|
|
3511
3565
|
const overlayId = index.useId();
|
|
3512
3566
|
React.useEffect(() => {
|
|
3513
|
-
|
|
3567
|
+
var _containerRef$current;
|
|
3568
|
+
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
3514
3569
|
const overlay = document.createElement('div');
|
|
3515
3570
|
overlay.id = overlayId;
|
|
3516
3571
|
overlay.classList.add(styles$3.overlay);
|
|
@@ -3527,18 +3582,19 @@ const useOverlay = _ref => {
|
|
|
3527
3582
|
};
|
|
3528
3583
|
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex]);
|
|
3529
3584
|
React.useEffect(() => {
|
|
3530
|
-
|
|
3585
|
+
var _containerRef$current2;
|
|
3586
|
+
const containerNode = (_containerRef$current2 = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : document.body;
|
|
3531
3587
|
const overlayNode = document.getElementById(overlayId);
|
|
3532
3588
|
if (isVisible) {
|
|
3533
3589
|
Array.from(containerNode.children).forEach(child => {
|
|
3534
3590
|
if (!_includesInstanceProperty__default["default"](ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3535
3591
|
});
|
|
3536
|
-
overlayNode
|
|
3592
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$3.hidden);
|
|
3537
3593
|
} else {
|
|
3538
3594
|
Array.from(containerNode.children).forEach(child => {
|
|
3539
3595
|
child.removeAttribute('inert');
|
|
3540
3596
|
});
|
|
3541
|
-
overlayNode
|
|
3597
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$3.hidden);
|
|
3542
3598
|
}
|
|
3543
3599
|
return () => {
|
|
3544
3600
|
Array.from(containerNode.children).forEach(child => {
|
|
@@ -3549,6 +3605,7 @@ const useOverlay = _ref => {
|
|
|
3549
3605
|
};
|
|
3550
3606
|
|
|
3551
3607
|
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3608
|
+
var _flyoutRef$current$pa, _flyoutRef$current2, _flyoutRef$current3;
|
|
3552
3609
|
let {
|
|
3553
3610
|
placement,
|
|
3554
3611
|
children,
|
|
@@ -3564,7 +3621,10 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3564
3621
|
const flyoutRef = React.useRef(null);
|
|
3565
3622
|
const stickyBoxRef = React.useRef(null);
|
|
3566
3623
|
const portalTarget = index.usePortalTarget();
|
|
3567
|
-
const [side, align] = React.useMemo(() =>
|
|
3624
|
+
const [side, align] = React.useMemo(() => {
|
|
3625
|
+
var _placement$split, _placement$split2;
|
|
3626
|
+
return (_placement$split = placement === null || placement === void 0 ? void 0 : (_placement$split2 = placement.split) === null || _placement$split2 === void 0 ? void 0 : _placement$split2.call(placement, '-')) !== null && _placement$split !== void 0 ? _placement$split : [];
|
|
3627
|
+
}, [placement]);
|
|
3568
3628
|
const {
|
|
3569
3629
|
dataTestId: rootDataTestId,
|
|
3570
3630
|
openPaneDepth,
|
|
@@ -3596,7 +3656,8 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3596
3656
|
if (openPaneDepth === thisPanesDepth) {
|
|
3597
3657
|
if (initialHeightOfThisPane.current === null) {
|
|
3598
3658
|
window.requestAnimationFrame(() => {
|
|
3599
|
-
|
|
3659
|
+
var _flyoutRef$current$cl, _flyoutRef$current;
|
|
3660
|
+
initialHeightOfThisPane.current = (_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null;
|
|
3600
3661
|
setMaskHeight(initialHeightOfThisPane.current);
|
|
3601
3662
|
});
|
|
3602
3663
|
} else {
|
|
@@ -3605,7 +3666,8 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3605
3666
|
}
|
|
3606
3667
|
}, [openPaneDepth]);
|
|
3607
3668
|
const defaultSide = React.useMemo(() => {
|
|
3608
|
-
|
|
3669
|
+
var _triggerRef$current;
|
|
3670
|
+
const rect = triggerRef === null || triggerRef === void 0 ? void 0 : (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getBoundingClientRect();
|
|
3609
3671
|
if (!rect) {
|
|
3610
3672
|
return 'bottom';
|
|
3611
3673
|
}
|
|
@@ -3629,11 +3691,14 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3629
3691
|
return 'bottom';
|
|
3630
3692
|
}, [open, triggerRef]);
|
|
3631
3693
|
const [transform, setTransform] = React.useState('');
|
|
3632
|
-
const target = flyoutRef.current
|
|
3694
|
+
const target = (_flyoutRef$current$pa = (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.parentNode) !== null && _flyoutRef$current$pa !== void 0 ? _flyoutRef$current$pa : undefined;
|
|
3633
3695
|
useMutationObserver(target, {
|
|
3634
3696
|
attributes: true,
|
|
3635
3697
|
attributeFilter: ['style']
|
|
3636
|
-
}, () =>
|
|
3698
|
+
}, () => {
|
|
3699
|
+
var _style$transform, _style;
|
|
3700
|
+
return setTransform((_style$transform = target === null || target === void 0 ? void 0 : (_style = target.style) === null || _style === void 0 ? void 0 : _style.transform) !== null && _style$transform !== void 0 ? _style$transform : '');
|
|
3701
|
+
});
|
|
3637
3702
|
return /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3638
3703
|
items: items,
|
|
3639
3704
|
setItems: setItems,
|
|
@@ -3651,7 +3716,10 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3651
3716
|
className: styles$4.maskContainer,
|
|
3652
3717
|
id: maskContainerId
|
|
3653
3718
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Content, _extends__default["default"]({}, rest, {
|
|
3654
|
-
onCloseAutoFocus: () =>
|
|
3719
|
+
onCloseAutoFocus: () => {
|
|
3720
|
+
var _triggerRef$current2;
|
|
3721
|
+
return triggerRef === null || triggerRef === void 0 ? void 0 : (_triggerRef$current2 = triggerRef.current) === null || _triggerRef$current2 === void 0 ? void 0 : _triggerRef$current2.focus();
|
|
3722
|
+
},
|
|
3655
3723
|
sideOffset: 6,
|
|
3656
3724
|
loop: !isSearchable,
|
|
3657
3725
|
side: side || defaultSide,
|
|
@@ -3664,7 +3732,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3664
3732
|
onInteractOutside: onInteractOutside,
|
|
3665
3733
|
style: {
|
|
3666
3734
|
...style,
|
|
3667
|
-
height: internalSearchValue && openPaneDepth === thisPanesDepth ? undefined : maskHeight
|
|
3735
|
+
height: internalSearchValue && openPaneDepth === thisPanesDepth ? undefined : maskHeight !== null && maskHeight !== void 0 ? maskHeight : undefined
|
|
3668
3736
|
}
|
|
3669
3737
|
}), isSearchable && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3670
3738
|
className: classNames__default["default"](styles$4.stickyBox, styles$4.isSearchable),
|
|
@@ -3673,7 +3741,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3673
3741
|
className: styles$4.searchBoxesContainer,
|
|
3674
3742
|
style: {
|
|
3675
3743
|
transform,
|
|
3676
|
-
width: flyoutRef.current
|
|
3744
|
+
width: (_flyoutRef$current3 = flyoutRef.current) === null || _flyoutRef$current3 === void 0 ? void 0 : _flyoutRef$current3.clientWidth
|
|
3677
3745
|
}
|
|
3678
3746
|
}, searchBarConfigs.length ? searchBarConfigs.map(_ref2 => {
|
|
3679
3747
|
let {
|
|
@@ -3712,14 +3780,16 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3712
3780
|
} = interactions.useFocusVisible({
|
|
3713
3781
|
isTextInput: true
|
|
3714
3782
|
});
|
|
3715
|
-
const dataTestId = index.getSubDataTestId(menuParentDataTestId
|
|
3783
|
+
const dataTestId = index.getSubDataTestId(menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM), String(index$1));
|
|
3716
3784
|
const isVisible = React.useMemo(() => {
|
|
3717
|
-
|
|
3718
|
-
|
|
3785
|
+
var _context;
|
|
3786
|
+
const searchMatcher = label !== null && label !== void 0 ? label : typeof children === 'string' ? children : undefined;
|
|
3787
|
+
return isSearchFilteringDisabled || !searchValue || (searchMatcher === null || searchMatcher === void 0 ? void 0 : _includesInstanceProperty__default["default"](_context = searchMatcher.toLowerCase()).call(_context, searchValue.toLowerCase()));
|
|
3719
3788
|
}, [children, searchValue, label, isSearchFilteringDisabled]);
|
|
3720
3789
|
const handleFocus = () => {
|
|
3721
3790
|
if (itemRef.current && flyoutRef.current && isFocusVisible) {
|
|
3722
|
-
|
|
3791
|
+
var _stickyBoxRef$current, _stickyBoxRef$current2;
|
|
3792
|
+
const stickyBoxHeight = (_stickyBoxRef$current = (_stickyBoxRef$current2 = stickyBoxRef.current) === null || _stickyBoxRef$current2 === void 0 ? void 0 : _stickyBoxRef$current2.clientHeight) !== null && _stickyBoxRef$current !== void 0 ? _stickyBoxRef$current : 0;
|
|
3723
3793
|
|
|
3724
3794
|
// if the top of the focused menu item is beneath the sticky box
|
|
3725
3795
|
if (itemRef.current.offsetTop < flyoutRef.current.scrollTop + stickyBoxHeight) {
|
|
@@ -3737,20 +3807,20 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3737
3807
|
"data-testid": dataTestId,
|
|
3738
3808
|
ref: index.mergeRefs(ref, itemRef),
|
|
3739
3809
|
onKeyDown: e => {
|
|
3740
|
-
var
|
|
3810
|
+
var _context2;
|
|
3741
3811
|
if (!isInteractive) {
|
|
3742
3812
|
e.preventDefault();
|
|
3743
3813
|
return;
|
|
3744
3814
|
}
|
|
3745
|
-
if (_includesInstanceProperty__default["default"](
|
|
3746
|
-
closeSubmenu
|
|
3815
|
+
if (_includesInstanceProperty__default["default"](_context2 = KEYS.CLOSE_SUBMENU).call(_context2, e.key)) {
|
|
3816
|
+
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3747
3817
|
}
|
|
3748
3818
|
},
|
|
3749
3819
|
onFocus: handleFocus
|
|
3750
3820
|
// stop radix from closing the menu on selection of disabled item
|
|
3751
3821
|
// other pointer and keyboard events still work, even when disabled
|
|
3752
3822
|
,
|
|
3753
|
-
onSelect: e => isDisabled ? e.preventDefault() : onSelect
|
|
3823
|
+
onSelect: e => isDisabled ? e.preventDefault() : onSelect === null || onSelect === void 0 ? void 0 : onSelect()
|
|
3754
3824
|
}), (!children || typeof children === 'string') && label ? label : children) : null;
|
|
3755
3825
|
});
|
|
3756
3826
|
|
|
@@ -3807,8 +3877,8 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3807
3877
|
noSearchResultsNode,
|
|
3808
3878
|
onInteractOutside
|
|
3809
3879
|
} = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, paneDataTestId, internalId, flyoutRef, backButtonRef, closeThisSubmenu);
|
|
3810
|
-
const backButtonDataTestId = paneDataTestId
|
|
3811
|
-
const triggerDataTestId = paneDataTestId
|
|
3880
|
+
const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_BACK);
|
|
3881
|
+
const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
|
|
3812
3882
|
const triggerIsVisible = React.useMemo(() => {
|
|
3813
3883
|
var _context;
|
|
3814
3884
|
return isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, paneContainingTriggerSearchValue.toLowerCase());
|
|
@@ -3821,7 +3891,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3821
3891
|
window.requestAnimationFrame(() => setIsFrameAfterPaneAddedToDOM(false));
|
|
3822
3892
|
}
|
|
3823
3893
|
registerSubmenu(internalId, isPaneInDOM);
|
|
3824
|
-
onIsOpenChange
|
|
3894
|
+
onIsOpenChange === null || onIsOpenChange === void 0 ? void 0 : onIsOpenChange(isPaneInDOM);
|
|
3825
3895
|
}, [isPaneInDOM]);
|
|
3826
3896
|
|
|
3827
3897
|
// Omitted dependencies because this should only run on unmount
|
|
@@ -3829,7 +3899,8 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3829
3899
|
React.useEffect(() => () => registerSubmenu(internalId, false), []);
|
|
3830
3900
|
index.useDidUpdate(() => {
|
|
3831
3901
|
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
3832
|
-
|
|
3902
|
+
var _flyoutRef$current$cl, _flyoutRef$current;
|
|
3903
|
+
setMaskHeight((_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null);
|
|
3833
3904
|
}
|
|
3834
3905
|
},
|
|
3835
3906
|
// ignoring other dependencies because this should only run when the children change
|
|
@@ -3837,24 +3908,27 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3837
3908
|
index.useDidUpdate(() => {
|
|
3838
3909
|
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
3839
3910
|
window.requestAnimationFrame(() => {
|
|
3840
|
-
|
|
3911
|
+
var _flyoutRef$current$cl2, _flyoutRef$current2;
|
|
3912
|
+
setMaskHeight((_flyoutRef$current$cl2 = (_flyoutRef$current2 = flyoutRef.current) === null || _flyoutRef$current2 === void 0 ? void 0 : _flyoutRef$current2.clientHeight) !== null && _flyoutRef$current$cl2 !== void 0 ? _flyoutRef$current$cl2 : null);
|
|
3841
3913
|
});
|
|
3842
3914
|
}
|
|
3843
3915
|
}, [totalOpenPaneDepth, internalSearchValue]);
|
|
3844
3916
|
const handlePaneTransitionEnd = () => {
|
|
3917
|
+
var _flyoutRef$current3;
|
|
3845
3918
|
if (animatedLeft) {
|
|
3846
3919
|
return;
|
|
3847
3920
|
}
|
|
3848
3921
|
if (animatedRight) {
|
|
3849
3922
|
setIsPaneInDOM(false);
|
|
3850
3923
|
if (isFocusVisible) {
|
|
3851
|
-
|
|
3924
|
+
var _triggerRef$current;
|
|
3925
|
+
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
|
|
3852
3926
|
}
|
|
3853
3927
|
return;
|
|
3854
3928
|
}
|
|
3855
3929
|
|
|
3856
3930
|
// if the newly closed submenu doesn't place the focus on its trigger due to mouse events
|
|
3857
|
-
if (!flyoutRef.current
|
|
3931
|
+
if (!((_flyoutRef$current3 = flyoutRef.current) !== null && _flyoutRef$current3 !== void 0 && _flyoutRef$current3.contains(document.activeElement)) && isFocusVisible) {
|
|
3858
3932
|
if (triggerRef.current && paneContainingTriggerIsInteractive) {
|
|
3859
3933
|
triggerRef.current.focus();
|
|
3860
3934
|
} else if (backButtonRef.current) {
|
|
@@ -3882,7 +3956,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3882
3956
|
if (!isDisabled && _includesInstanceProperty__default["default"](_context2 = KEYS.OPEN_SUBMENU).call(_context2, e.key)) {
|
|
3883
3957
|
setIsPaneInDOM(true);
|
|
3884
3958
|
} else if (_includesInstanceProperty__default["default"](_context3 = KEYS.CLOSE_SUBMENU).call(_context3, e.key)) {
|
|
3885
|
-
closeSubmenuContainingTrigger
|
|
3959
|
+
closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 ? void 0 : closeSubmenuContainingTrigger(e);
|
|
3886
3960
|
}
|
|
3887
3961
|
}
|
|
3888
3962
|
}, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
@@ -3937,12 +4011,13 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3937
4011
|
}), label)), noSearchResultsNode, children))) : null;
|
|
3938
4012
|
});
|
|
3939
4013
|
|
|
3940
|
-
var css_248z$2 = ".
|
|
3941
|
-
var styles$2 = {"drawer":"
|
|
3942
|
-
var stylesheet$2=".
|
|
4014
|
+
var css_248z$2 = "._a3VHe{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}._SCuPd{visibility:hidden}._sFqQi{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._8UPIu{padding-top:8px}._LCjYN{margin-left:12px}";
|
|
4015
|
+
var styles$2 = {"drawer":"_a3VHe","hidden":"_SCuPd","header":"_sFqQi","title":"_8UPIu","closeButton":"_LCjYN"};
|
|
4016
|
+
var stylesheet$2="._a3VHe{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}._SCuPd{visibility:hidden}._sFqQi{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._8UPIu{padding-top:8px}._LCjYN{margin-left:12px}";
|
|
3943
4017
|
icons_index.styleInject(css_248z$2);
|
|
3944
4018
|
|
|
3945
4019
|
const Drawer = _ref => {
|
|
4020
|
+
var _containerRef$current;
|
|
3946
4021
|
let {
|
|
3947
4022
|
id,
|
|
3948
4023
|
isOpen: externalIsOpen,
|
|
@@ -3994,13 +4069,15 @@ const Drawer = _ref => {
|
|
|
3994
4069
|
setIsHidden(false);
|
|
3995
4070
|
setElementUsedToOpenModal(document.activeElement);
|
|
3996
4071
|
} else {
|
|
4072
|
+
var _elementRefToFocusOnC;
|
|
3997
4073
|
setIsClosing(true);
|
|
3998
|
-
if (elementRefToFocusOnClose !== undefined) elementRefToFocusOnClose
|
|
4074
|
+
if (elementRefToFocusOnClose !== undefined) elementRefToFocusOnClose === null || elementRefToFocusOnClose === void 0 ? void 0 : (_elementRefToFocusOnC = elementRefToFocusOnClose.current) === null || _elementRefToFocusOnC === void 0 ? void 0 : _elementRefToFocusOnC.focus();else elementUsedToOpenModal === null || elementUsedToOpenModal === void 0 ? void 0 : elementUsedToOpenModal.focus();
|
|
3999
4075
|
}
|
|
4000
4076
|
}, [elementRefToFocusOnClose, isOpen]);
|
|
4001
4077
|
React.useEffect(() => {
|
|
4002
4078
|
if (isOpen && !isHidden) {
|
|
4003
|
-
|
|
4079
|
+
var _closeButtonRef$curre;
|
|
4080
|
+
(_closeButtonRef$curre = closeButtonRef.current) === null || _closeButtonRef$curre === void 0 ? void 0 : _closeButtonRef$curre.focus();
|
|
4004
4081
|
}
|
|
4005
4082
|
}, [isOpen, isHidden]);
|
|
4006
4083
|
const handleTransitionEnd = () => {
|
|
@@ -4019,7 +4096,7 @@ const Drawer = _ref => {
|
|
|
4019
4096
|
}),
|
|
4020
4097
|
style: {
|
|
4021
4098
|
width,
|
|
4022
|
-
left:
|
|
4099
|
+
left: "".concat(isHidden || isClosing ? "-".concat(width) : '0'),
|
|
4023
4100
|
zIndex
|
|
4024
4101
|
},
|
|
4025
4102
|
onKeyDown: handleKeyDown,
|
|
@@ -4044,12 +4121,12 @@ const Drawer = _ref => {
|
|
|
4044
4121
|
"aria-label": closeButtonAriaLabel
|
|
4045
4122
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.CloseIcon, null))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4046
4123
|
"data-testid": index.getSubDataTestId(dataTestId, 'body')
|
|
4047
|
-
}, children))), containerRef
|
|
4124
|
+
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
4048
4125
|
};
|
|
4049
4126
|
|
|
4050
|
-
var css_248z$1 = ".
|
|
4051
|
-
var styles$1 = {"container":"
|
|
4052
|
-
var stylesheet$1=".
|
|
4127
|
+
var css_248z$1 = "._Li157{display:inline-block;position:relative}._qGkcS{width:120px}._qGkcS ._gv4Jw._9W5cr{transform:rotate(-180deg)}._qGkcS ._gv4Jw._g5S4T{fill:#9d9fa1;opacity:.4}._txezi>input:focus{box-shadow:none!important;border:1px solid #898989!important}._FjddE{width:120px}._FjddE ._Yf4jJ._QMeNI{background-color:#efefef;border-radius:6px}._gv4Jw{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._gv4Jw._9W5cr{transform:rotate(-180deg)}";
|
|
4128
|
+
var styles$1 = {"container":"_Li157","input":"_qGkcS","icon":"_gv4Jw","open":"_9W5cr","disabled":"_g5S4T","ignoreFocusStyle":"_txezi","flyout":"_FjddE","option":"_Yf4jJ","exactMatch":"_QMeNI"};
|
|
4129
|
+
var stylesheet$1="._Li157{display:inline-block;position:relative}._qGkcS{width:120px}._qGkcS ._gv4Jw._9W5cr{transform:rotate(-180deg)}._qGkcS ._gv4Jw._g5S4T{fill:#9d9fa1;opacity:.4}._txezi>input:focus{box-shadow:none!important;border:1px solid #898989!important}._FjddE{width:120px}._FjddE ._Yf4jJ._QMeNI{background-color:#efefef;border-radius:6px}._gv4Jw{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._gv4Jw._9W5cr{transform:rotate(-180deg)}";
|
|
4053
4130
|
icons_index.styleInject(css_248z$1);
|
|
4054
4131
|
|
|
4055
4132
|
const TimeDropdown = _ref => {
|
|
@@ -4089,14 +4166,14 @@ const TimeDropdown = _ref => {
|
|
|
4089
4166
|
"aria-label": ariaLabel,
|
|
4090
4167
|
"aria-labelledby": ariaLabelledBy,
|
|
4091
4168
|
"aria-describedby": ariaDescribedBy,
|
|
4092
|
-
"data-testid": dataTestId &&
|
|
4169
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-dropdown"),
|
|
4093
4170
|
className: styles$1.flyout,
|
|
4094
4171
|
onMouseOver: () => setIsOptionHovered(true),
|
|
4095
4172
|
onMouseLeave: () => setIsOptionHovered(false)
|
|
4096
4173
|
}, items.map((item, index$1) => /*#__PURE__*/React__default["default"].createElement(index.FlyoutOption, {
|
|
4097
4174
|
id: item.id,
|
|
4098
4175
|
isHighlightedOnHover: true,
|
|
4099
|
-
isHighlighted: scrolledToItem
|
|
4176
|
+
isHighlighted: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.isFocused),
|
|
4100
4177
|
key: item.label,
|
|
4101
4178
|
ref: node => {
|
|
4102
4179
|
if (node) {
|
|
@@ -4105,9 +4182,9 @@ const TimeDropdown = _ref => {
|
|
|
4105
4182
|
}
|
|
4106
4183
|
},
|
|
4107
4184
|
onClick: () => onClick(index$1),
|
|
4108
|
-
"data-testid": dataTestId &&
|
|
4185
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-option-").concat(index$1),
|
|
4109
4186
|
className: classNames__default["default"](styles$1.option, {
|
|
4110
|
-
[styles$1.exactMatch]: scrolledToItem
|
|
4187
|
+
[styles$1.exactMatch]: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && scrolledToItem.isExactMatch && !isOptionHovered
|
|
4111
4188
|
})
|
|
4112
4189
|
}, item.label))),
|
|
4113
4190
|
anchorNode: inputRef.current,
|
|
@@ -4131,7 +4208,7 @@ const formatUtcDate = (utcDate, is24HourClock) => {
|
|
|
4131
4208
|
const dateWithoutLeadingZeros = format(utcDate);
|
|
4132
4209
|
let dateWithLeadingZeros = dateWithoutLeadingZeros;
|
|
4133
4210
|
if (dateWithLeadingZeros.split(':')[0].length === 1) {
|
|
4134
|
-
dateWithLeadingZeros =
|
|
4211
|
+
dateWithLeadingZeros = "0".concat(dateWithLeadingZeros);
|
|
4135
4212
|
}
|
|
4136
4213
|
return dateWithLeadingZeros.toLowerCase();
|
|
4137
4214
|
};
|
|
@@ -4160,17 +4237,18 @@ const generateTimes = (step, is24HourClock) => {
|
|
|
4160
4237
|
return {
|
|
4161
4238
|
label: labelWithLeadingZeros,
|
|
4162
4239
|
value: i * step,
|
|
4163
|
-
id:
|
|
4240
|
+
id: "time-option-".concat(i)
|
|
4164
4241
|
};
|
|
4165
4242
|
});
|
|
4166
4243
|
};
|
|
4167
4244
|
function getTimeStringCorrector(str, is24HourClock) {
|
|
4245
|
+
var _letterString;
|
|
4168
4246
|
let [numberString, letterString] = str.replace(':', '').split(' ');
|
|
4169
|
-
letterString = letterString
|
|
4247
|
+
letterString = (_letterString = letterString) === null || _letterString === void 0 ? void 0 : _letterString.toLowerCase();
|
|
4170
4248
|
let selectionModifier = 0;
|
|
4171
4249
|
const getTimeString = () => {
|
|
4172
|
-
const finalNumberString =
|
|
4173
|
-
return is24HourClock ? finalNumberString :
|
|
4250
|
+
const finalNumberString = "".concat(numberString.slice(0, 2), ":").concat(numberString.slice(2, 4));
|
|
4251
|
+
return is24HourClock ? finalNumberString : "".concat(finalNumberString, " ").concat(letterString);
|
|
4174
4252
|
};
|
|
4175
4253
|
const getSelectionModifier = () => selectionModifier;
|
|
4176
4254
|
const replaceDashes = () => {
|
|
@@ -4185,18 +4263,18 @@ function getTimeStringCorrector(str, is24HourClock) {
|
|
|
4185
4263
|
}
|
|
4186
4264
|
};
|
|
4187
4265
|
const shiftMinutesRight = () => {
|
|
4188
|
-
numberString =
|
|
4266
|
+
numberString = "".concat(numberString.slice(0, 2), "0").concat(numberString[2]);
|
|
4189
4267
|
selectionModifier += 1;
|
|
4190
4268
|
};
|
|
4191
4269
|
const prependCharacter = character => {
|
|
4192
|
-
numberString =
|
|
4270
|
+
numberString = "".concat(character).concat(numberString);
|
|
4193
4271
|
selectionModifier += 1;
|
|
4194
4272
|
};
|
|
4195
4273
|
const setHoursTo12 = () => {
|
|
4196
|
-
numberString =
|
|
4274
|
+
numberString = "12".concat(numberString.slice(2));
|
|
4197
4275
|
};
|
|
4198
4276
|
const clearSecondHoursDigit = () => {
|
|
4199
|
-
numberString =
|
|
4277
|
+
numberString = "".concat(numberString.slice(0, 1), "0").concat(numberString.slice(2));
|
|
4200
4278
|
};
|
|
4201
4279
|
const hoursAre00 = () => numberString[0] === '0' && numberString[1] === '0';
|
|
4202
4280
|
const firstHourGreaterThan1 = () => {
|
|
@@ -4347,7 +4425,7 @@ const TimeInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4347
4425
|
correctedTime,
|
|
4348
4426
|
selectionModifier
|
|
4349
4427
|
} = correctTime(next.value, is24HourClock, false);
|
|
4350
|
-
const newSelection = next
|
|
4428
|
+
const newSelection = next === null || next === void 0 ? void 0 : next.selection;
|
|
4351
4429
|
if (newSelection) {
|
|
4352
4430
|
const validTimeLength = mask.length;
|
|
4353
4431
|
newSelection.start = shouldMoveSelectionToEnd ? validTimeLength : newSelection.start;
|
|
@@ -4379,7 +4457,7 @@ const TimeInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4379
4457
|
"aria-labelledby": ariaLabelledBy,
|
|
4380
4458
|
"aria-describedby": ariaDescribedBy,
|
|
4381
4459
|
"aria-activedescendant": ariaActiveDescendant,
|
|
4382
|
-
"data-testid": dataTestId &&
|
|
4460
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-input")
|
|
4383
4461
|
}));
|
|
4384
4462
|
});
|
|
4385
4463
|
|
|
@@ -4400,8 +4478,9 @@ const TimePickerIcon = _ref => {
|
|
|
4400
4478
|
})
|
|
4401
4479
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
4402
4480
|
onClick: !isDisabled ? () => {
|
|
4481
|
+
var _inputRef$current;
|
|
4403
4482
|
setIsFlyoutOpen(i => !i);
|
|
4404
|
-
inputRef.current
|
|
4483
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
4405
4484
|
} : undefined,
|
|
4406
4485
|
onMouseDown: e => e.preventDefault(),
|
|
4407
4486
|
ref: iconRef
|
|
@@ -4431,8 +4510,8 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
4431
4510
|
'aria-describedby': ariaDescribedBy
|
|
4432
4511
|
} = _ref;
|
|
4433
4512
|
const timePickerId = index.useId(externalId);
|
|
4434
|
-
const inputId =
|
|
4435
|
-
const dropdownId =
|
|
4513
|
+
const inputId = "".concat(timePickerId, "-input");
|
|
4514
|
+
const dropdownId = "".concat(timePickerId, "-dropdown");
|
|
4436
4515
|
const [isOptionHovered, setIsOptionHovered] = React.useState(false);
|
|
4437
4516
|
const [timeObject, setTimeObject] = index.useControllableState(DEFAULT_TIME, externalOnChange, externalValue);
|
|
4438
4517
|
const defaultTimeString = convertTimeObjectToTimeString(timeObject, is24HourClock);
|
|
@@ -4561,7 +4640,7 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
4561
4640
|
break;
|
|
4562
4641
|
case 'Enter':
|
|
4563
4642
|
e.preventDefault();
|
|
4564
|
-
if (scrolledToItem
|
|
4643
|
+
if (scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused) {
|
|
4565
4644
|
// "focus" is on the listbox
|
|
4566
4645
|
handleSelectTime(scrolledToItem.index);
|
|
4567
4646
|
} else {
|
|
@@ -4584,7 +4663,7 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
4584
4663
|
}, /*#__PURE__*/React__default["default"].createElement(TimeInput, {
|
|
4585
4664
|
id: inputId,
|
|
4586
4665
|
dataTestId: dataTestId,
|
|
4587
|
-
ariaActiveDescendant: isFlyoutOpen && scrolledToItem
|
|
4666
|
+
ariaActiveDescendant: isFlyoutOpen && scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused ? dropdownItems[scrolledToItem.index].id : undefined,
|
|
4588
4667
|
ariaControls: dropdownId,
|
|
4589
4668
|
ariaExpanded: isFlyoutOpen,
|
|
4590
4669
|
onChange: handleType,
|
|
@@ -4628,9 +4707,9 @@ const {
|
|
|
4628
4707
|
Provider: ToggleButtonGroupContextProvider
|
|
4629
4708
|
} = index.createContextUtilities(null);
|
|
4630
4709
|
|
|
4631
|
-
var css_248z = ".
|
|
4632
|
-
var styles = {"default":"
|
|
4633
|
-
var stylesheet=".
|
|
4710
|
+
var css_248z = "._4-P5E{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._pO5r1{background-color:rgba(50,54,58,.08)}._7tsZZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._z7lDi{color:rgba(81,85,89,.4);cursor:not-allowed}._g3YQh{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._W12WF{color:#085caf;border-color:#085caf}._UESvM,._W12WF{background:rgba(11,110,208,.11)}._UESvM{color:#0854a1;border-color:#0854a1}._xNNgy{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._f4qzl{position:relative;display:inline-grid}._f4qzl svg{fill:currentColor}._f4qzl ._bRI3y{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._f4qzl ._bRI3y+._gM0BN{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}._f4qzl ._bRI3y+._gM0BN._gMX7j{padding:5px;max-width:36px;min-width:36px}._f4qzl ._bRI3y+._gM0BN._XCTsZ{padding:0 16px}._f4qzl ._bRI3y+._gM0BN._6Mk4Q{padding:0 16px 0 12px}._f4qzl ._bRI3y:hover+._gM0BN{background-color:rgba(50,54,58,.08)}._f4qzl ._bRI3y:disabled+._gM0BN{color:rgba(81,85,89,.4);cursor:not-allowed}._f4qzl ._bRI3y:active+._gM0BN,._f4qzl ._bRI3y:focus:active+._gM0BN{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._f4qzl ._bRI3y:checked+._gM0BN{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._f4qzl ._bRI3y:checked:hover+._gM0BN{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._f4qzl ._bRI3y:checked:disabled+._gM0BN{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._f4qzl ._bRI3y:checked:active+._gM0BN,._f4qzl ._bRI3y:checked:focus:active+._gM0BN{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._QvJdy{display:inline-flex;position:relative}._QvJdy:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._QvJdy>*{flex-shrink:0;flex-grow:0}._2gpoS{border:none;margin:0;padding:0}._2gpoS legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._f4qzl ._bRI3y.focus-visible+._gM0BN,._f4qzl ._bRI3y:focus-visible+._gM0BN{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4711
|
+
var styles = {"default":"_4-P5E","hovered":"_pO5r1","pressed":"_7tsZZ","disabled":"_z7lDi","selectedDefault":"_g3YQh","selectedHovered":"_W12WF","selectedPressed":"_UESvM","selectedDisabled":"_xNNgy","toggleContainer":"_f4qzl","toggleInput":"_bRI3y","toggleButton":"_gM0BN","iconOnly":"_gMX7j","text":"_XCTsZ","iconText":"_6Mk4Q","toggleButtonGroup":"_QvJdy","toggleButtonGroupFieldset":"_2gpoS"};
|
|
4712
|
+
var stylesheet="._4-P5E{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._pO5r1{background-color:rgba(50,54,58,.08)}._7tsZZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._z7lDi{color:rgba(81,85,89,.4);cursor:not-allowed}._g3YQh{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._W12WF{color:#085caf;border-color:#085caf}._UESvM,._W12WF{background:rgba(11,110,208,.11)}._UESvM{color:#0854a1;border-color:#0854a1}._xNNgy{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._f4qzl{position:relative;display:inline-grid}._f4qzl svg{fill:currentColor}._f4qzl ._bRI3y{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._f4qzl ._bRI3y+._gM0BN{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}._f4qzl ._bRI3y+._gM0BN._gMX7j{padding:5px;max-width:36px;min-width:36px}._f4qzl ._bRI3y+._gM0BN._XCTsZ{padding:0 16px}._f4qzl ._bRI3y+._gM0BN._6Mk4Q{padding:0 16px 0 12px}._f4qzl ._bRI3y:hover+._gM0BN{background-color:rgba(50,54,58,.08)}._f4qzl ._bRI3y:disabled+._gM0BN{color:rgba(81,85,89,.4);cursor:not-allowed}._f4qzl ._bRI3y:active+._gM0BN,._f4qzl ._bRI3y:focus:active+._gM0BN{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._f4qzl ._bRI3y:checked+._gM0BN{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._f4qzl ._bRI3y:checked:hover+._gM0BN{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._f4qzl ._bRI3y:checked:disabled+._gM0BN{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._f4qzl ._bRI3y:checked:active+._gM0BN,._f4qzl ._bRI3y:checked:focus:active+._gM0BN{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._QvJdy{display:inline-flex;position:relative}._QvJdy:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._QvJdy>*{flex-shrink:0;flex-grow:0}._2gpoS{border:none;margin:0;padding:0}._2gpoS legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._f4qzl ._bRI3y.focus-visible+._gM0BN,._f4qzl ._bRI3y:focus-visible+._gM0BN{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4634
4713
|
icons_index.styleInject(css_248z);
|
|
4635
4714
|
|
|
4636
4715
|
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|