@qualtrics/ui-react 2.8.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -0
- package/dist/__shared/cjs/{index-763e59c2.js → index-0ef0b03a.js} +3 -3
- package/dist/__shared/cjs/{index-ce267a89.js → index-74ef768b.js} +71 -194
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button2.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox.js +21 -43
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxInput.js +3 -3
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +7 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal.js +2 -1
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +7 -2
- package/dist/components/NewMenu/parts/MenuItem.js +3 -1
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Popover/Popover.js +6 -1
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +5 -0
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +265 -138
- package/dist/next/AdvancedTable/AdvancedTable.js +5 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox.js +4 -1
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxInput.js +6 -2
- package/dist/next/Combobox/ComboboxOption.js +4 -1
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +71 -0
- package/dist/next/Menu/Menu2.js +8 -0
- package/dist/next/Menu/MenuButton.js +41 -0
- package/dist/next/Menu/MenuContext.js +41 -0
- package/dist/next/Menu/MenuItem.js +49 -0
- package/dist/next/Menu/MenuPane.js +64 -0
- package/dist/next/Menu/MenuSearch.js +105 -0
- package/dist/next/Menu/SubMenu.js +74 -0
- package/dist/next/Menu/constants.js +9 -0
- package/dist/next/Menu/index.js +5 -0
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/index.d.ts +53 -0
- package/dist/next/index.es.js +6 -1
- package/dist/next/index.js +523 -138
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/package.json +1 -1
package/dist/next/index.js
CHANGED
|
@@ -9,11 +9,11 @@ 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-74ef768b.js');
|
|
13
|
+
var icons_index = require('../__shared/cjs/index-0ef0b03a.js');
|
|
14
14
|
var libphonenumberJs = require('libphonenumber-js');
|
|
15
15
|
var InputMask = require('react-input-mask');
|
|
16
|
-
require('
|
|
16
|
+
var reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
17
17
|
require('react-popper');
|
|
18
18
|
require('@popperjs/core');
|
|
19
19
|
require('react-focus-lock');
|
|
@@ -29,10 +29,10 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
29
29
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
30
30
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
31
31
|
|
|
32
|
-
var css_248z$
|
|
33
|
-
var styles$
|
|
34
|
-
var stylesheet$
|
|
35
|
-
icons_index.styleInject(css_248z$
|
|
32
|
+
var css_248z$6 = "._21wHW{overflow:auto;position:relative;max-width:100%;max-height:100%}._2rdPj,._21wHW{background-color:#fff}._2rdPj{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._1nMAj{margin-bottom:4px}._2O50c{position:-webkit-sticky;position:sticky;top:0;z-index:100}._1O-SM{display:flex}._1O-SM:focus{outline:none}body.keyboard-user ._1O-SM:focus ._2F-wI: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}body.keyboard-user ._1O-SM:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._1O-SM:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._1O-SM:focus ._2F-wI._2w22E:after{right:-3px;bottom:1px}._lcW23{padding-right:3px}._J4DRO{display:flex}._J4DRO._2hPON ._2F-wI,._J4DRO._2hPON ._13KvU{cursor:pointer}._J4DRO._37SrH ._2F-wI,._J4DRO._37SrH ._13KvU{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._J4DRO._37SrH ._2F-wI._2w22E,._J4DRO._37SrH ._13KvU._2w22E{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._J4DRO._37SrH ._2F-wI._2w22E ._2C4Fr,._J4DRO._37SrH ._2F-wI._2w22E ._13KvU,._J4DRO._37SrH ._2F-wI._2w22E ._oRO8C,._J4DRO._37SrH ._13KvU._2w22E ._2C4Fr,._J4DRO._37SrH ._13KvU._2w22E ._13KvU,._J4DRO._37SrH ._13KvU._2w22E ._oRO8C{background-color:rgba(11,110,208,.08)}._J4DRO._2hPON:hover:not(._37SrH):not(._1DRoh) ._2F-wI,._J4DRO._2hPON:hover:not(._37SrH):not(._1DRoh) ._13KvU{background-color:#f9f9f9}._J4DRO._2hPON:active:not(._37SrH):not(._1DRoh) ._2F-wI,._J4DRO._2hPON:active:not(._37SrH):not(._1DRoh) ._13KvU{background-color:#f3f3f3}._J4DRO:focus{outline:none}body.keyboard-user ._J4DRO:focus ._2F-wI: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}body.keyboard-user ._J4DRO:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:focus ._2F-wI._2w22E:after{right:-3px;bottom:0}._J4DRO:last-of-type:focus{outline:none}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI: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}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI._2w22E:after{right:-3px;bottom:1px}._J4DRO:last-of-type ._oRO8C:focus{outline:none}body.keyboard-user ._J4DRO:last-of-type ._oRO8C._VgOr9:after,body.keyboard-user ._J4DRO:last-of-type ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._J4DRO:first-of-type:focus{outline:none}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI: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}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI._2w22E:after{right:-3px;bottom:0}._J4DRO:first-of-type ._oRO8C:focus{outline:none}body.keyboard-user ._J4DRO:first-of-type ._oRO8C._VgOr9:after,body.keyboard-user ._J4DRO:first-of-type ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._1dMAB{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}._1dMAB._3JhjN{flex-grow:1}._1dMAB._21REk{cursor:pointer}._1dMAB._21REk:hover:not(._1sa6n){background-color:#f9f9f9;border-bottom-color:#6a6d70}._1dMAB._21REk:active:not(._1sa6n){background-color:#f3f3f3}._1dMAB._3FV6e:not(._1sa6n){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._1dMAB._1sa6n{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._1dMAB ._yCtiz{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._1dMAB ._yCtiz._27efd{left:-1px}._1dMAB ._yCtiz._1HxLI{right:0}._1dMAB ._1a3qv{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._1dMAB ._1a3qv._27efd{left:-2px}._1dMAB ._1a3qv._1HxLI{right:-1px}._1dMAB:first-of-type ._27efd._yCtiz{left:0;width:2px;border-left:1px solid #fff}._1dMAB:first-of-type ._27efd._1a3qv{left:0}._1dMAB:last-of-type ._1HxLI._yCtiz{right:0;width:2px;border-right:1px solid #fff}._1dMAB:last-of-type ._1HxLI._1a3qv{right:0}._1dMAB ._2og_y{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._1dMAB ._2og_y ._1nT4K{position:absolute;width:2px;right:2px;top:0;bottom:0}._1dMAB ._2og_y ._1nT4K._31UTx{background-color:#0a6ed1}._1dMAB ._2og_y:hover ._1nT4K:not(._31UTx){background-color:#d9d9d9}._1dMAB ._3S4SY{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._1dMAB ._3S4SY._1jQSF{flex-direction:row-reverse;justify-content:flex-start}._1dMAB ._3S4SY._1jQSF ._7amXC{margin:1px 7px 1px 1px}._1dMAB ._3S4SY ._1obf7{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._1dMAB ._3S4SY ._7amXC{margin:1px 1px 1px 7px;flex-shrink:0}._1dMAB ._ZQzjq{margin-left:6px;margin-right:4px;flex-shrink:0}._1dMAB ._iIztX{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._1dMAB:focus{outline:none}body.keyboard-user ._1dMAB._VgOr9:after,body.keyboard-user ._1dMAB:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2Gdhv{margin-right:6px}._2w22E{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._2w22E[focus-within]{z-index:30}._2w22E:focus-within{z-index:30}._oRO8C{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}._oRO8C ._2IyYF{width:100%;padding:12px 12px 11px;overflow:hidden}._oRO8C._1sa6n{background-color:#efefef;border-bottom-color:#dfdfe1}._oRO8C._3JhjN{flex-grow:1}._oRO8C:focus{outline:none}body.keyboard-user ._oRO8C._VgOr9:after,body.keyboard-user ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._13KvU{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._13KvU._1eWET{border-bottom-color:#d9d9d9;background-color:#fff}._2C4Fr{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}._2C4Fr._1eWET{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._2C4Fr:focus input~span,._2C4Fr:hover input~span{border-color:#0b6ed0}._2C4Fr ._3rofU{position:relative;display:inline-flex}._2C4Fr ._3rofU ._3w9VN{margin:0!important}._2C4Fr ._3rofU ._RvInM{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1bcY5{justify-content:flex-start}._2tQQy{justify-content:center;text-align:center}._1jQSF{justify-content:flex-end;text-align:right}._3eWUZ{display:none}._qG_R7{opacity:0;height:0;width:0;overflow:hidden}._25jra,._qG_R7{position:absolute}._25jra{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._Mf3y8{width:246px}";
|
|
33
|
+
var styles$6 = {"advancedTable":"_21wHW","advancedTablePaginationContainer":"_2rdPj","advancedTablePagination":"_1nMAj","advancedTableColumnHeadersRowGroup":"_2O50c","advancedTableColumnHeaders":"_1O-SM","advancedTableRowChild":"_2F-wI","pinnedContainer":"_2w22E","advancedTableRowGroup":"_lcW23","advancedTableRow":"_J4DRO","hasRowAction":"_2hPON","advancedTableExpandRowSpacer":"_13KvU","isSelected":"_37SrH","advancedTableCheckbox":"_2C4Fr","advancedTableCell":"_oRO8C","isCheckboxHovered":"_1DRoh","showFocusRing":"_VgOr9","advancedTableColumnHeader":"_1dMAB","fillRemainingSpace":"_3JhjN","isSortable":"_21REk","isDragging":"_1sa6n","isSorted":"_3FV6e","dropTargetLine":"_yCtiz","dropTargetLeft":"_27efd","dropTargetRight":"_1HxLI","dropTargetMarker":"_1a3qv","resizeHandle":"_2og_y","resizeLine":"_1nT4K","isResizing":"_31UTx","advancedTableColumnHeaderLabel":"_3S4SY","rightAligned":"_1jQSF","sortIcon":"_7amXC","advancedTableColumnHeaderLabelText":"_1obf7","advancedTableColumnHeaderMenu":"_ZQzjq","advancedTableColumnHeaderMenuHiddenAnchor":"_iIztX","advancedTableColumnHeaderMenuItemIcon":"_2Gdhv","advancedTableCellContainer":"_2IyYF","header":"_1eWET","checkboxContainer":"_3rofU","checkbox":"_3w9VN","mixed":"_RvInM","leftAligned":"_1bcY5","centerAligned":"_2tQQy","hiddenDescription":"_3eWUZ","hiddenLiveRegion":"_qG_R7","dragPreview":"_25jra","rowActionMenuPane":"_Mf3y8"};
|
|
34
|
+
var stylesheet$6="._21wHW{overflow:auto;position:relative;max-width:100%;max-height:100%}._2rdPj,._21wHW{background-color:#fff}._2rdPj{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._1nMAj{margin-bottom:4px}._2O50c{position:-webkit-sticky;position:sticky;top:0;z-index:100}._1O-SM{display:flex}._1O-SM:focus{outline:none}body.keyboard-user ._1O-SM:focus ._2F-wI: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}body.keyboard-user ._1O-SM:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._1O-SM:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._1O-SM:focus ._2F-wI._2w22E:after{right:-3px;bottom:1px}._lcW23{padding-right:3px}._J4DRO{display:flex}._J4DRO._2hPON ._2F-wI,._J4DRO._2hPON ._13KvU{cursor:pointer}._J4DRO._37SrH ._2F-wI,._J4DRO._37SrH ._13KvU{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._J4DRO._37SrH ._2F-wI._2w22E,._J4DRO._37SrH ._13KvU._2w22E{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._J4DRO._37SrH ._2F-wI._2w22E ._2C4Fr,._J4DRO._37SrH ._2F-wI._2w22E ._13KvU,._J4DRO._37SrH ._2F-wI._2w22E ._oRO8C,._J4DRO._37SrH ._13KvU._2w22E ._2C4Fr,._J4DRO._37SrH ._13KvU._2w22E ._13KvU,._J4DRO._37SrH ._13KvU._2w22E ._oRO8C{background-color:rgba(11,110,208,.08)}._J4DRO._2hPON:hover:not(._37SrH):not(._1DRoh) ._2F-wI,._J4DRO._2hPON:hover:not(._37SrH):not(._1DRoh) ._13KvU{background-color:#f9f9f9}._J4DRO._2hPON:active:not(._37SrH):not(._1DRoh) ._2F-wI,._J4DRO._2hPON:active:not(._37SrH):not(._1DRoh) ._13KvU{background-color:#f3f3f3}._J4DRO:focus{outline:none}body.keyboard-user ._J4DRO:focus ._2F-wI: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}body.keyboard-user ._J4DRO:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:focus ._2F-wI._2w22E:after{right:-3px;bottom:0}._J4DRO:last-of-type:focus{outline:none}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI: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}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:last-of-type:focus ._2F-wI._2w22E:after{right:-3px;bottom:1px}._J4DRO:last-of-type ._oRO8C:focus{outline:none}body.keyboard-user ._J4DRO:last-of-type ._oRO8C._VgOr9:after,body.keyboard-user ._J4DRO:last-of-type ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._J4DRO:first-of-type:focus{outline:none}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI: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}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._J4DRO:first-of-type:focus ._2F-wI._2w22E:after{right:-3px;bottom:0}._J4DRO:first-of-type ._oRO8C:focus{outline:none}body.keyboard-user ._J4DRO:first-of-type ._oRO8C._VgOr9:after,body.keyboard-user ._J4DRO:first-of-type ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._1dMAB{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}._1dMAB._3JhjN{flex-grow:1}._1dMAB._21REk{cursor:pointer}._1dMAB._21REk:hover:not(._1sa6n){background-color:#f9f9f9;border-bottom-color:#6a6d70}._1dMAB._21REk:active:not(._1sa6n){background-color:#f3f3f3}._1dMAB._3FV6e:not(._1sa6n){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._1dMAB._1sa6n{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._1dMAB ._yCtiz{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._1dMAB ._yCtiz._27efd{left:-1px}._1dMAB ._yCtiz._1HxLI{right:0}._1dMAB ._1a3qv{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._1dMAB ._1a3qv._27efd{left:-2px}._1dMAB ._1a3qv._1HxLI{right:-1px}._1dMAB:first-of-type ._27efd._yCtiz{left:0;width:2px;border-left:1px solid #fff}._1dMAB:first-of-type ._27efd._1a3qv{left:0}._1dMAB:last-of-type ._1HxLI._yCtiz{right:0;width:2px;border-right:1px solid #fff}._1dMAB:last-of-type ._1HxLI._1a3qv{right:0}._1dMAB ._2og_y{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._1dMAB ._2og_y ._1nT4K{position:absolute;width:2px;right:2px;top:0;bottom:0}._1dMAB ._2og_y ._1nT4K._31UTx{background-color:#0a6ed1}._1dMAB ._2og_y:hover ._1nT4K:not(._31UTx){background-color:#d9d9d9}._1dMAB ._3S4SY{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._1dMAB ._3S4SY._1jQSF{flex-direction:row-reverse;justify-content:flex-start}._1dMAB ._3S4SY._1jQSF ._7amXC{margin:1px 7px 1px 1px}._1dMAB ._3S4SY ._1obf7{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._1dMAB ._3S4SY ._7amXC{margin:1px 1px 1px 7px;flex-shrink:0}._1dMAB ._ZQzjq{margin-left:6px;margin-right:4px;flex-shrink:0}._1dMAB ._iIztX{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._1dMAB:focus{outline:none}body.keyboard-user ._1dMAB._VgOr9:after,body.keyboard-user ._1dMAB:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2Gdhv{margin-right:6px}._2w22E{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._2w22E[focus-within]{z-index:30}._2w22E:focus-within{z-index:30}._oRO8C{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}._oRO8C ._2IyYF{width:100%;padding:12px 12px 11px;overflow:hidden}._oRO8C._1sa6n{background-color:#efefef;border-bottom-color:#dfdfe1}._oRO8C._3JhjN{flex-grow:1}._oRO8C:focus{outline:none}body.keyboard-user ._oRO8C._VgOr9:after,body.keyboard-user ._oRO8C:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._13KvU{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._13KvU._1eWET{border-bottom-color:#d9d9d9;background-color:#fff}._2C4Fr{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}._2C4Fr._1eWET{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._2C4Fr:focus input~span,._2C4Fr:hover input~span{border-color:#0b6ed0}._2C4Fr ._3rofU{position:relative;display:inline-flex}._2C4Fr ._3rofU ._3w9VN{margin:0!important}._2C4Fr ._3rofU ._RvInM{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1bcY5{justify-content:flex-start}._2tQQy{justify-content:center;text-align:center}._1jQSF{justify-content:flex-end;text-align:right}._3eWUZ{display:none}._qG_R7{opacity:0;height:0;width:0;overflow:hidden}._25jra,._qG_R7{position:absolute}._25jra{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._Mf3y8{width:246px}";
|
|
35
|
+
icons_index.styleInject(css_248z$6);
|
|
36
36
|
|
|
37
37
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
38
38
|
// Also Alignment, etc can be defined directly and have AdvancedTableColumnConfig use them instead of the reverse like now.
|
|
@@ -97,7 +97,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
97
97
|
"date-testid": menuItemDataTestId
|
|
98
98
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
99
99
|
size: "small",
|
|
100
|
-
className: styles$
|
|
100
|
+
className: styles$6.advancedTableColumnHeaderMenuItemIcon,
|
|
101
101
|
"aria-hidden": "true"
|
|
102
102
|
}), label);
|
|
103
103
|
};
|
|
@@ -151,7 +151,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
151
151
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Ascending))
|
|
152
152
|
}, /*#__PURE__*/React__default["default"].createElement(AscendingIconComponent, {
|
|
153
153
|
size: "small",
|
|
154
|
-
className: styles$
|
|
154
|
+
className: styles$6.advancedTableColumnHeaderMenuItemIcon,
|
|
155
155
|
"aria-hidden": "true"
|
|
156
156
|
}), ascendingLabel), /*#__PURE__*/React__default["default"].createElement(index.MenuItem, {
|
|
157
157
|
key: descendingValue,
|
|
@@ -160,7 +160,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
160
160
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Descending))
|
|
161
161
|
}, /*#__PURE__*/React__default["default"].createElement(DescendingIconComponent, {
|
|
162
162
|
size: "small",
|
|
163
|
-
className: styles$
|
|
163
|
+
className: styles$6.advancedTableColumnHeaderMenuItemIcon,
|
|
164
164
|
"aria-hidden": "true"
|
|
165
165
|
}), descendingLabel)];
|
|
166
166
|
}), (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default["default"].createElement(index.Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
@@ -413,7 +413,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
413
413
|
const selectedSortIcon = isSorted ? /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
414
414
|
"aria-hidden": "true",
|
|
415
415
|
focusable: "false",
|
|
416
|
-
className: styles$
|
|
416
|
+
className: styles$6.sortIcon,
|
|
417
417
|
width: "10",
|
|
418
418
|
height: "10",
|
|
419
419
|
viewBox: "0 0 10 10",
|
|
@@ -607,28 +607,28 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
607
607
|
onFocus: onFocus,
|
|
608
608
|
onClick: isSortable ? handleClick : undefined,
|
|
609
609
|
tabIndex: isFocused ? 0 : -1,
|
|
610
|
-
className: classNames__default["default"](styles$
|
|
611
|
-
[styles$
|
|
610
|
+
className: classNames__default["default"](styles$6.advancedTableColumnHeader, {
|
|
611
|
+
[styles$6.advancedTableRowChild]: !isPinned,
|
|
612
612
|
// if nested inside of pinned container, not a direct row child
|
|
613
|
-
[styles$
|
|
614
|
-
[styles$
|
|
615
|
-
[styles$
|
|
616
|
-
[styles$
|
|
617
|
-
[styles$
|
|
613
|
+
[styles$6.isSortable]: isSortable,
|
|
614
|
+
[styles$6.isSorted]: isSorted,
|
|
615
|
+
[styles$6.showFocusRing]: isHiddenMenuOpen,
|
|
616
|
+
[styles$6.isDragging]: isDragging,
|
|
617
|
+
[styles$6.fillRemainingSpace]: width === undefined
|
|
618
618
|
}),
|
|
619
619
|
style: {
|
|
620
620
|
width: computedWidth
|
|
621
621
|
},
|
|
622
622
|
ref: index.mergeRefs(columnHeaderRef, dragRef, dropRef, ref)
|
|
623
623
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
624
|
-
className: classNames__default["default"](styles$
|
|
625
|
-
[styles$
|
|
626
|
-
[styles$
|
|
627
|
-
[styles$
|
|
624
|
+
className: classNames__default["default"](styles$6.advancedTableColumnHeaderLabel, {
|
|
625
|
+
[styles$6.leftAligned]: alignment === 'left',
|
|
626
|
+
[styles$6.centerAligned]: alignment === 'center',
|
|
627
|
+
[styles$6.rightAligned]: alignment === 'right'
|
|
628
628
|
}),
|
|
629
629
|
ref: labelContainerRef
|
|
630
630
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
631
|
-
className: styles$
|
|
631
|
+
className: styles$6.advancedTableColumnHeaderLabelText,
|
|
632
632
|
style: {
|
|
633
633
|
WebkitLineClamp: headerMaxLines
|
|
634
634
|
},
|
|
@@ -639,7 +639,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
639
639
|
anchor: /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
640
640
|
tabIndex: -1,
|
|
641
641
|
"aria-hidden": "true",
|
|
642
|
-
className: styles$
|
|
642
|
+
className: styles$6.advancedTableColumnHeaderMenu
|
|
643
643
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, null))
|
|
644
644
|
})), /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaderMenu, _extends__default["default"]({}, commonMenuProps, {
|
|
645
645
|
isOpen: isHiddenMenuOpen,
|
|
@@ -654,31 +654,31 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
654
654
|
|
|
655
655
|
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
656
656
|
},
|
|
657
|
-
className: styles$
|
|
657
|
+
className: styles$6.advancedTableColumnHeaderMenuHiddenAnchor
|
|
658
658
|
})
|
|
659
659
|
}))), dropTargetSide && !isRowActionMenuColumn && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
660
|
-
className: classNames__default["default"](styles$
|
|
661
|
-
[styles$
|
|
662
|
-
[styles$
|
|
660
|
+
className: classNames__default["default"](styles$6.dropTargetLine, {
|
|
661
|
+
[styles$6.dropTargetLeft]: dropTargetSide === 'left',
|
|
662
|
+
[styles$6.dropTargetRight]: dropTargetSide === 'right'
|
|
663
663
|
}),
|
|
664
664
|
style: {
|
|
665
665
|
height: tableHeight
|
|
666
666
|
}
|
|
667
667
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
668
|
-
className: classNames__default["default"](styles$
|
|
669
|
-
[styles$
|
|
670
|
-
[styles$
|
|
668
|
+
className: classNames__default["default"](styles$6.dropTargetMarker, {
|
|
669
|
+
[styles$6.dropTargetLeft]: dropTargetSide === 'left',
|
|
670
|
+
[styles$6.dropTargetRight]: dropTargetSide === 'right'
|
|
671
671
|
})
|
|
672
672
|
})), onWidthChange && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
673
673
|
"aria-hidden": true,
|
|
674
|
-
className: styles$
|
|
674
|
+
className: styles$6.resizeHandle,
|
|
675
675
|
style: {
|
|
676
676
|
height: tableHeight
|
|
677
677
|
},
|
|
678
678
|
onMouseDown: handleMouseDown
|
|
679
679
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
680
|
-
className: classNames__default["default"](styles$
|
|
681
|
-
[styles$
|
|
680
|
+
className: classNames__default["default"](styles$6.resizeLine, {
|
|
681
|
+
[styles$6.isResizing]: isResizing
|
|
682
682
|
})
|
|
683
683
|
}))));
|
|
684
684
|
});
|
|
@@ -759,19 +759,19 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
759
759
|
onFocus: handleFocus,
|
|
760
760
|
onBlur: handleBlur,
|
|
761
761
|
tabIndex: isFocused && !isEditing ? 0 : -1,
|
|
762
|
-
className: classNames__default["default"](className, styles$
|
|
763
|
-
[styles$
|
|
764
|
-
[styles$
|
|
765
|
-
[styles$
|
|
766
|
-
[styles$
|
|
767
|
-
[styles$
|
|
762
|
+
className: classNames__default["default"](className, styles$6.advancedTableCell, {
|
|
763
|
+
[styles$6.leftAligned]: alignment === Alignments.Left,
|
|
764
|
+
[styles$6.centerAligned]: alignment === Alignments.Center,
|
|
765
|
+
[styles$6.rightAligned]: alignment === Alignments.Right,
|
|
766
|
+
[styles$6.isDragging]: isDragging,
|
|
767
|
+
[styles$6.fillRemainingSpace]: width === undefined
|
|
768
768
|
}),
|
|
769
769
|
style: {
|
|
770
770
|
width: computedWidth
|
|
771
771
|
},
|
|
772
772
|
ref: index.mergeRefs(ref, cellRef)
|
|
773
773
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
774
|
-
className: styles$
|
|
774
|
+
className: styles$6.advancedTableCellContainer
|
|
775
775
|
}, typeof renderCellContent === 'function' ? renderCellContent({
|
|
776
776
|
value,
|
|
777
777
|
setValue,
|
|
@@ -807,10 +807,10 @@ const AdvancedTableRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
807
807
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
808
808
|
onFocus: isFocusable ? onFocus : undefined,
|
|
809
809
|
onClick: hasOnRowSelect ? onClick : undefined,
|
|
810
|
-
className: classNames__default["default"](styles$
|
|
811
|
-
[styles$
|
|
812
|
-
[styles$
|
|
813
|
-
[styles$
|
|
810
|
+
className: classNames__default["default"](styles$6.advancedTableRow, {
|
|
811
|
+
[styles$6.hasRowAction]: hasOnRowSelect,
|
|
812
|
+
[styles$6.isSelected]: hasOnRowSelect && isSelected,
|
|
813
|
+
[styles$6.isCheckboxHovered]: isCheckboxHovered
|
|
814
814
|
}),
|
|
815
815
|
ref: isFocusable ? ref : undefined
|
|
816
816
|
}), children);
|
|
@@ -830,7 +830,7 @@ const AdvancedTableColumnHeaders = /*#__PURE__*/React.forwardRef((_ref, ref) =>
|
|
|
830
830
|
tabIndex: isFocusable ? isFocused ? 0 : -1 : undefined,
|
|
831
831
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
832
832
|
onFocus: isFocusable ? onFocus : undefined,
|
|
833
|
-
className: styles$
|
|
833
|
+
className: styles$6.advancedTableColumnHeaders,
|
|
834
834
|
ref: ref
|
|
835
835
|
}), children);
|
|
836
836
|
});
|
|
@@ -859,17 +859,17 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
859
859
|
onClick: onClick,
|
|
860
860
|
onMouseEnter: onMouseEnter,
|
|
861
861
|
onMouseLeave: onMouseLeave,
|
|
862
|
-
className: classNames__default["default"](styles$
|
|
863
|
-
[styles$
|
|
862
|
+
className: classNames__default["default"](styles$6.advancedTableCheckbox, {
|
|
863
|
+
[styles$6.header]: variant === 'header'
|
|
864
864
|
}),
|
|
865
865
|
"aria-live": isRowFocused ? 'polite' : undefined,
|
|
866
866
|
"aria-relevant": "text"
|
|
867
867
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
868
|
-
className: styles$
|
|
868
|
+
className: styles$6.hiddenLiveRegion
|
|
869
869
|
}, labels[state]), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
870
|
-
className: styles$
|
|
870
|
+
className: styles$6.checkboxContainer
|
|
871
871
|
}, /*#__PURE__*/React__default["default"].createElement(index.Checkbox, {
|
|
872
|
-
className: styles$
|
|
872
|
+
className: styles$6.checkbox,
|
|
873
873
|
"aria-hidden": true,
|
|
874
874
|
checked: state === 'true',
|
|
875
875
|
onChange: () => {
|
|
@@ -881,7 +881,7 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
881
881
|
onFocus
|
|
882
882
|
}
|
|
883
883
|
}), state === 'mixed' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
884
|
-
className: styles$
|
|
884
|
+
className: styles$6.mixed
|
|
885
885
|
})));
|
|
886
886
|
};
|
|
887
887
|
|
|
@@ -894,7 +894,7 @@ const AdvancedTableHiddenDescription = _ref => {
|
|
|
894
894
|
translate
|
|
895
895
|
} = index.useTranslation();
|
|
896
896
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
897
|
-
className: styles$
|
|
897
|
+
className: styles$6.hiddenDescription,
|
|
898
898
|
id: id
|
|
899
899
|
}, translate(messageKey));
|
|
900
900
|
};
|
|
@@ -918,7 +918,7 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
918
918
|
const top = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.y) || 0;
|
|
919
919
|
const left = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.x) || 0;
|
|
920
920
|
return /*#__PURE__*/React__default["default"].createElement(index.Portal, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
921
|
-
className: styles$
|
|
921
|
+
className: styles$6.dragPreview,
|
|
922
922
|
style: {
|
|
923
923
|
height,
|
|
924
924
|
width,
|
|
@@ -950,9 +950,9 @@ const AdvancedTablePagination = _ref => {
|
|
|
950
950
|
};
|
|
951
951
|
|
|
952
952
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
953
|
-
className: styles$
|
|
953
|
+
className: styles$6.advancedTablePaginationContainer
|
|
954
954
|
}, /*#__PURE__*/React__default["default"].createElement(index.Pagination, {
|
|
955
|
-
className: styles$
|
|
955
|
+
className: styles$6.advancedTablePagination,
|
|
956
956
|
"aria-label": ariaLabel,
|
|
957
957
|
numPages: Math.max(Math.ceil(rows.length / rowsPerPage), 1),
|
|
958
958
|
currentPage: currentPage,
|
|
@@ -1088,7 +1088,7 @@ const AdvancedTable = _ref => {
|
|
|
1088
1088
|
}
|
|
1089
1089
|
}
|
|
1090
1090
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1091
|
-
className: styles$
|
|
1091
|
+
className: styles$6.rowActionMenuPane
|
|
1092
1092
|
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1093
1093
|
var _actionGroup$actions;
|
|
1094
1094
|
|
|
@@ -1214,6 +1214,7 @@ const AdvancedTable = _ref => {
|
|
|
1214
1214
|
depthSize,
|
|
1215
1215
|
depthIndex,
|
|
1216
1216
|
isExpanded: row.isExpanded,
|
|
1217
|
+
rowProps: row.unsafe_rowProps,
|
|
1217
1218
|
rowPropReference: row
|
|
1218
1219
|
});
|
|
1219
1220
|
|
|
@@ -1614,8 +1615,8 @@ const AdvancedTable = _ref => {
|
|
|
1614
1615
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
1615
1616
|
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1616
1617
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1617
|
-
className: classNames__default["default"](styles$
|
|
1618
|
-
[styles$
|
|
1618
|
+
className: classNames__default["default"](styles$6.advancedTableExpandRowSpacer, {
|
|
1619
|
+
[styles$6.header]: inHeader
|
|
1619
1620
|
}),
|
|
1620
1621
|
style: {
|
|
1621
1622
|
width
|
|
@@ -1663,7 +1664,7 @@ const AdvancedTable = _ref => {
|
|
|
1663
1664
|
return /*#__PURE__*/React__default["default"].createElement(reactDnd.DndProvider, {
|
|
1664
1665
|
backend: reactDndHtml5Backend.HTML5Backend
|
|
1665
1666
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1666
|
-
className: styles$
|
|
1667
|
+
className: styles$6.advancedTable,
|
|
1667
1668
|
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
1668
1669
|
"aria-multiselectable": hasExpandableRows && hasCheckboxColumn ? true : undefined,
|
|
1669
1670
|
"aria-rowcount": rows ? rows.length + 1 : 0,
|
|
@@ -1687,7 +1688,7 @@ const AdvancedTable = _ref => {
|
|
|
1687
1688
|
messageKey: "advancedTable.rowCheckboxDescription"
|
|
1688
1689
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1689
1690
|
role: "rowgroup",
|
|
1690
|
-
className: classNames__default["default"](styles$
|
|
1691
|
+
className: classNames__default["default"](styles$6.advancedTableColumnHeadersRowGroup, styles$6.advancedTableRowGroup)
|
|
1691
1692
|
}, /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaders, {
|
|
1692
1693
|
"aria-rowindex": hasExpandableRows ? undefined : 1,
|
|
1693
1694
|
"aria-level": hasExpandableRows ? 1 : undefined // aria-level is one-indexed
|
|
@@ -1702,7 +1703,7 @@ const AdvancedTable = _ref => {
|
|
|
1702
1703
|
ref: createRef(headerRowIndex, -1)
|
|
1703
1704
|
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1704
1705
|
role: "presentation",
|
|
1705
|
-
className: classNames__default["default"](styles$
|
|
1706
|
+
className: classNames__default["default"](styles$6.pinnedContainer, styles$6.advancedTableRowChild),
|
|
1706
1707
|
ref: createPinnedContainerRef(headerRowIndex)
|
|
1707
1708
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1708
1709
|
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
@@ -1718,7 +1719,7 @@ const AdvancedTable = _ref => {
|
|
|
1718
1719
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1719
1720
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1720
1721
|
role: "rowgroup",
|
|
1721
|
-
className: styles$
|
|
1722
|
+
className: styles$6.advancedTableRowGroup
|
|
1722
1723
|
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
1723
1724
|
const {
|
|
1724
1725
|
id: rowId,
|
|
@@ -1728,7 +1729,8 @@ const AdvancedTable = _ref => {
|
|
|
1728
1729
|
depthSize,
|
|
1729
1730
|
depthIndex,
|
|
1730
1731
|
rowPropReference,
|
|
1731
|
-
parentId
|
|
1732
|
+
parentId,
|
|
1733
|
+
rowProps
|
|
1732
1734
|
} = row;
|
|
1733
1735
|
const hasChildRows = rowPropReference.childRows && rowPropReference.childRows.length > 0;
|
|
1734
1736
|
const paginatedRowIndex = getPaginatedRowIndex(rowIndex);
|
|
@@ -1751,7 +1753,7 @@ const AdvancedTable = _ref => {
|
|
|
1751
1753
|
}
|
|
1752
1754
|
};
|
|
1753
1755
|
|
|
1754
|
-
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableRow, {
|
|
1756
|
+
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableRow, _extends__default["default"]({}, rowProps, {
|
|
1755
1757
|
"aria-rowindex": hasExpandableRows ? undefined : paginatedRowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1756
1758
|
,
|
|
1757
1759
|
"data-testid": dataTestId && rowId ? "".concat(dataTestId, "-row-").concat(rowId) : undefined,
|
|
@@ -1770,8 +1772,8 @@ const AdvancedTable = _ref => {
|
|
|
1770
1772
|
"aria-setsize": hasExpandableRows ? depthSize : undefined,
|
|
1771
1773
|
"aria-posinset": hasExpandableRows ? depthIndex + 1 : undefined // aria-posinset is one-indexed
|
|
1772
1774
|
|
|
1773
|
-
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1774
|
-
className: classNames__default["default"](styles$
|
|
1775
|
+
}), hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1776
|
+
className: classNames__default["default"](styles$6.pinnedContainer, styles$6.advancedTableRowChild),
|
|
1775
1777
|
ref: createPinnedContainerRef(paginatedRowIndex)
|
|
1776
1778
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1777
1779
|
state: getCheckboxStateForRow(row),
|
|
@@ -1799,7 +1801,7 @@ const AdvancedTable = _ref => {
|
|
|
1799
1801
|
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
1800
1802
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
1801
1803
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1802
|
-
className: styles$
|
|
1804
|
+
className: styles$6.advancedTableRowChild,
|
|
1803
1805
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1804
1806
|
,
|
|
1805
1807
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
@@ -1981,10 +1983,10 @@ function useFocusState(_ref8) {
|
|
|
1981
1983
|
|
|
1982
1984
|
/* eslint-disable import/prefer-default-export */
|
|
1983
1985
|
|
|
1984
|
-
var css_248z$
|
|
1985
|
-
var styles$
|
|
1986
|
-
var stylesheet$
|
|
1987
|
-
icons_index.styleInject(css_248z$
|
|
1986
|
+
var css_248z$5 = "._20Zmx{display:inline-block;width:36px;transition:width .25s ease-out}._3uZPr{width:100%}._PGCFw>input{padding-right:0!important}._2i_3o>svg{fill:#515559}";
|
|
1987
|
+
var styles$5 = {"collapsibleSearchInput":"_20Zmx","searchInput":"_3uZPr","searchInputCollapsed":"_PGCFw","iconButton":"_2i_3o"};
|
|
1988
|
+
var stylesheet$5="._20Zmx{display:inline-block;width:36px;transition:width .25s ease-out}._3uZPr{width:100%}._PGCFw>input{padding-right:0!important}._2i_3o>svg{fill:#515559}";
|
|
1989
|
+
icons_index.styleInject(css_248z$5);
|
|
1988
1990
|
|
|
1989
1991
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1990
1992
|
let {
|
|
@@ -1997,7 +1999,7 @@ const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, re
|
|
|
1997
1999
|
} = index.useTranslation();
|
|
1998
2000
|
const label = translate('collapsibleSearchInput.openSearchField');
|
|
1999
2001
|
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, _extends__default["default"]({}, rest, {
|
|
2000
|
-
className: styles$
|
|
2002
|
+
className: styles$5.iconButton,
|
|
2001
2003
|
"aria-label": label,
|
|
2002
2004
|
tooltipContent: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
|
|
2003
2005
|
tooltipPlacement: tooltipPlacement,
|
|
@@ -2111,7 +2113,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2111
2113
|
onFocus: handleContainerFocus,
|
|
2112
2114
|
onBlur: handleContainerBlur,
|
|
2113
2115
|
onTransitionEnd: handleContainerTransitionEnd,
|
|
2114
|
-
className: styles$
|
|
2116
|
+
className: styles$5.collapsibleSearchInput,
|
|
2115
2117
|
style: {
|
|
2116
2118
|
width: externalIsExpanded ? widthWhenExpanded : undefined
|
|
2117
2119
|
},
|
|
@@ -2125,8 +2127,8 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2125
2127
|
"aria-label": searchInputAriaLabel,
|
|
2126
2128
|
"aria-labelledby": searchInputAriaLabelledBy,
|
|
2127
2129
|
"aria-describedby": searchInputAriaDescribedBy,
|
|
2128
|
-
className: classNames__default["default"](styles$
|
|
2129
|
-
[styles$
|
|
2130
|
+
className: classNames__default["default"](styles$5.searchInput, {
|
|
2131
|
+
[styles$5.searchInputCollapsed]: internalExpandedState !== expandedStates.EXPANDED
|
|
2130
2132
|
}),
|
|
2131
2133
|
"data-testid": index.getSubDataTestId(dataTestId, 'SearchInput'),
|
|
2132
2134
|
ref: searchInputRef
|
|
@@ -2137,10 +2139,10 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2137
2139
|
}));
|
|
2138
2140
|
});
|
|
2139
2141
|
|
|
2140
|
-
var css_248z$
|
|
2141
|
-
var styles$
|
|
2142
|
-
var stylesheet$
|
|
2143
|
-
icons_index.styleInject(css_248z$
|
|
2142
|
+
var css_248z$4 = "._OdFaS input{padding-left:76px!important}._W1VkX input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._W1VkX input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._W1VkX input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._38MMe{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._38MMe,._38MMe._W1VkX:hover{background-color:transparent!important}._38MMe:hover{background-color:rgba(50,54,58,.08)!important}._38MMe:active{background-color:rgba(50,54,58,.11)!important}._38MMe svg{top:2px!important}._1_MSL{position:relative}._tcSMK{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2143
|
+
var styles$4 = {"input":"_OdFaS","disabled":"_W1VkX","dropdown":"_38MMe","container":"_1_MSL","countryCode":"_tcSMK"};
|
|
2144
|
+
var stylesheet$4="._OdFaS input{padding-left:76px!important}._W1VkX input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._W1VkX input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._W1VkX input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._38MMe{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._38MMe,._38MMe._W1VkX:hover{background-color:transparent!important}._38MMe:hover{background-color:rgba(50,54,58,.08)!important}._38MMe:active{background-color:rgba(50,54,58,.11)!important}._38MMe svg{top:2px!important}._1_MSL{position:relative}._tcSMK{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2145
|
+
icons_index.styleInject(css_248z$4);
|
|
2144
2146
|
|
|
2145
2147
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2146
2148
|
let {
|
|
@@ -2206,21 +2208,21 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2206
2208
|
onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2207
2209
|
};
|
|
2208
2210
|
|
|
2209
|
-
const inputClassNames = classNames__default["default"](styles$
|
|
2210
|
-
[styles$
|
|
2211
|
+
const inputClassNames = classNames__default["default"](styles$4.input, {
|
|
2212
|
+
[styles$4.disabled]: isDisabled
|
|
2211
2213
|
});
|
|
2212
2214
|
const dropdownLabel = React.useMemo(() => countryCode ? "+".concat(libphonenumberJs.getCountryCallingCode(countryCode)) : undefined, [countryCode]);
|
|
2213
2215
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2214
|
-
className: styles$
|
|
2216
|
+
className: styles$4.container,
|
|
2215
2217
|
"data-testid": dataTestId
|
|
2216
2218
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2217
|
-
className: styles$
|
|
2219
|
+
className: styles$4.countryCode
|
|
2218
2220
|
}, dropdownLabel), /*#__PURE__*/React__default["default"].createElement(index.SelectMenu, {
|
|
2219
2221
|
label: " ",
|
|
2220
2222
|
defaultValue: countryCode,
|
|
2221
2223
|
onChange: value => setCountryCode(value),
|
|
2222
|
-
className: classNames__default["default"](styles$
|
|
2223
|
-
[styles$
|
|
2224
|
+
className: classNames__default["default"](styles$4.dropdown, {
|
|
2225
|
+
[styles$4.disabled]: isDisabled
|
|
2224
2226
|
}),
|
|
2225
2227
|
searchable: true,
|
|
2226
2228
|
disabled: isDisabled,
|
|
@@ -2828,6 +2830,7 @@ function Combobox(_ref) {
|
|
|
2828
2830
|
const flyoutRef = React.useRef(null);
|
|
2829
2831
|
const flyoutId = index.useId();
|
|
2830
2832
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
2833
|
+
const [hoveredOption, setHoveredOption] = React.useState(null);
|
|
2831
2834
|
const [inputFocusRef, isComponentFocused] = index.useIsFocused();
|
|
2832
2835
|
const {
|
|
2833
2836
|
rawInputValue,
|
|
@@ -2874,15 +2877,17 @@ function Combobox(_ref) {
|
|
|
2874
2877
|
focusLast,
|
|
2875
2878
|
focusNext,
|
|
2876
2879
|
focusPrevious,
|
|
2877
|
-
activeDescendantElement
|
|
2880
|
+
activeDescendantElement,
|
|
2881
|
+
hoveredOption,
|
|
2882
|
+
setHoveredOption
|
|
2878
2883
|
}
|
|
2879
2884
|
}, children);
|
|
2880
2885
|
}
|
|
2881
2886
|
|
|
2882
|
-
var css_248z$
|
|
2883
|
-
var styles$
|
|
2884
|
-
var stylesheet$
|
|
2885
|
-
icons_index.styleInject(css_248z$
|
|
2887
|
+
var css_248z$3 = "._2DwWc :after{background-color:#515559!important}._Tb0uT>input:focus{box-shadow:none!important;border:1px solid #898989!important}._1ZJtd{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}._1ZJtd ._RrsRB ._2vbkV{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}._1ZJtd ._RrsRB:first-child ._1Pvl3{display:none}._1ZJtd ._2vY2K{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._1ZJtd ._2vY2K:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._1ZJtd ._2vY2K:hover._1PuMA{background-color:#e4effa}._1ZJtd ._2vY2K._1PuMA{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._1ZJtd ._2vY2K:active:not(._1PuMA){background-color:#e8e9e9}";
|
|
2888
|
+
var styles$3 = {"loadingSpinner":"_2DwWc","ignoreFocusStyle":"_Tb0uT","flyout":"_1ZJtd","group":"_RrsRB","header":"_2vbkV","divider":"_1Pvl3","option":"_2vY2K","selected":"_1PuMA"};
|
|
2889
|
+
var stylesheet$3="._2DwWc :after{background-color:#515559!important}._Tb0uT>input:focus{box-shadow:none!important;border:1px solid #898989!important}._1ZJtd{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}._1ZJtd ._RrsRB ._2vbkV{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}._1ZJtd ._RrsRB:first-child ._1Pvl3{display:none}._1ZJtd ._2vY2K{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._1ZJtd ._2vY2K:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._1ZJtd ._2vY2K:hover._1PuMA{background-color:#e4effa}._1ZJtd ._2vY2K._1PuMA{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._1ZJtd ._2vY2K:active:not(._1PuMA){background-color:#e8e9e9}";
|
|
2890
|
+
icons_index.styleInject(css_248z$3);
|
|
2886
2891
|
|
|
2887
2892
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2888
2893
|
let {
|
|
@@ -2917,7 +2922,8 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2917
2922
|
isInvalid,
|
|
2918
2923
|
rootAriaLabel,
|
|
2919
2924
|
rootAriaLabelledBy,
|
|
2920
|
-
flyoutId
|
|
2925
|
+
flyoutId,
|
|
2926
|
+
hoveredOption
|
|
2921
2927
|
} = useComboboxContext();
|
|
2922
2928
|
/*
|
|
2923
2929
|
* Creates a variation of selection follows focus.
|
|
@@ -2995,7 +3001,9 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2995
3001
|
|
|
2996
3002
|
return /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
2997
3003
|
role: "combobox",
|
|
2998
|
-
className: className,
|
|
3004
|
+
className: classNames__default["default"](className, {
|
|
3005
|
+
[styles$3.ignoreFocusStyle]: hoveredOption || activeDescendantElement
|
|
3006
|
+
}),
|
|
2999
3007
|
style: style,
|
|
3000
3008
|
id: id,
|
|
3001
3009
|
placeholder: placeholder,
|
|
@@ -3007,7 +3015,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3007
3015
|
},
|
|
3008
3016
|
leftAddOn: leftAddOn,
|
|
3009
3017
|
rightAddOn: isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3010
|
-
className: styles$
|
|
3018
|
+
className: styles$3.loadingSpinner,
|
|
3011
3019
|
size: "xs",
|
|
3012
3020
|
show: isLoading,
|
|
3013
3021
|
"aria-hidden": true
|
|
@@ -3064,7 +3072,7 @@ const ComboboxFlyout = _ref => {
|
|
|
3064
3072
|
popper: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3065
3073
|
role: "listbox",
|
|
3066
3074
|
id: flyoutId,
|
|
3067
|
-
className: styles$
|
|
3075
|
+
className: styles$3.flyout,
|
|
3068
3076
|
style: flyoutDimensions,
|
|
3069
3077
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
3070
3078
|
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
@@ -3116,16 +3124,16 @@ function ComboboxGroup(_ref) {
|
|
|
3116
3124
|
}, children);
|
|
3117
3125
|
return hasFilteredOptions ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3118
3126
|
role: "group",
|
|
3119
|
-
className: styles$
|
|
3127
|
+
className: styles$3.group,
|
|
3120
3128
|
"aria-labelledby": headerElementId,
|
|
3121
3129
|
"aria-describedby": ariaDescribedBy,
|
|
3122
3130
|
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
3123
3131
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
3124
|
-
className: styles$
|
|
3132
|
+
className: styles$3.divider
|
|
3125
3133
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3126
3134
|
"aria-hidden": "true",
|
|
3127
3135
|
id: headerElementId,
|
|
3128
|
-
className: styles$
|
|
3136
|
+
className: styles$3.header
|
|
3129
3137
|
}, label), childrenWithContext) : childrenWithContext // Even if the group currently has no filtered children, the children (i.e. options) still need the context so that they can register themselves later on if the input value changes
|
|
3130
3138
|
;
|
|
3131
3139
|
}
|
|
@@ -3144,7 +3152,8 @@ function ComboboxOption(_ref) {
|
|
|
3144
3152
|
activeDescendantElement,
|
|
3145
3153
|
committedInputValue,
|
|
3146
3154
|
setCommittedInputValue,
|
|
3147
|
-
rootDataTestId
|
|
3155
|
+
rootDataTestId,
|
|
3156
|
+
setHoveredOption
|
|
3148
3157
|
} = useComboboxContext();
|
|
3149
3158
|
const {
|
|
3150
3159
|
registerOption: registerGroupOption,
|
|
@@ -3177,13 +3186,15 @@ function ComboboxOption(_ref) {
|
|
|
3177
3186
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3178
3187
|
role: "option",
|
|
3179
3188
|
id: containerId,
|
|
3180
|
-
className: classNames__default["default"](styles$
|
|
3181
|
-
[styles$
|
|
3189
|
+
className: classNames__default["default"](styles$3.option, {
|
|
3190
|
+
[styles$3.selected]: isOptionSelected
|
|
3182
3191
|
}),
|
|
3183
3192
|
onClick: () => {
|
|
3184
3193
|
setCommittedInputValue(label);
|
|
3185
3194
|
setIsOpen(false);
|
|
3186
3195
|
},
|
|
3196
|
+
onMouseOver: () => setHoveredOption(containerElementRef.current),
|
|
3197
|
+
onMouseLeave: () => setHoveredOption(null),
|
|
3187
3198
|
onMouseDown: e => e.preventDefault() // Prevents the input from getting blurred
|
|
3188
3199
|
,
|
|
3189
3200
|
"aria-selected": isOptionSelected,
|
|
@@ -3192,10 +3203,10 @@ function ComboboxOption(_ref) {
|
|
|
3192
3203
|
}, label);
|
|
3193
3204
|
}
|
|
3194
3205
|
|
|
3195
|
-
var css_248z$
|
|
3196
|
-
var styles$
|
|
3197
|
-
var stylesheet$
|
|
3198
|
-
icons_index.styleInject(css_248z$
|
|
3206
|
+
var css_248z$2 = "._2udwO{display:flex}._1C5AH{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1C5AH._2495F{background-color:#fff}._1C5AH._2495F._3hltw:not(._1C5AH._2495F._3qKAB),._1C5AH._PEaC8,body.keyboard-user ._1C5AH._2495F._3dOBx:not(._plw8F){background-color:#0b6ed0}._1C5AH._PEaC8._3qKAB._3hltw,._1C5AH._PEaC8._plw8F._3dOBx,._1C5AH._PEaC8._plw8F._3qKAB{opacity:.4}._1HrYl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1HrYl:focus{z-index:1}._1uPLq{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._1uPLq svg{margin-left:1px}._1uPLq._2495F{background-color:#0b6ed0;border-color:transparent}._1uPLq._2495F svg{fill:#fff!important}._1uPLq._2495F:not(._19Qwi):hover{background-color:#085caf!important}._1uPLq._2495F:not(._19Qwi):active{background-color:#0854a1!important}._1uPLq._2495F._19Qwi{opacity:.4}._1uPLq._2495F._19Qwi svg{background-color:transparent}._1uPLq._PEaC8{border-color:#0b6ed0;background-color:#fff}._1uPLq._PEaC8 svg{fill:#0b6ed0!important}._1uPLq._PEaC8:not(._19Qwi):hover{background-color:#eef5fc!important}._1uPLq._PEaC8:not(._19Qwi):active{background-color:#e1edf9!important}._1uPLq._PEaC8._19Qwi{opacity:.4}._1uPLq._PEaC8._19Qwi svg{background-color:transparent}._3V2sW{width:260px}";
|
|
3207
|
+
var styles$2 = {"container":"_2udwO","divider":"_1C5AH","primary":"_2495F","mainButtonFocus":"_3dOBx","mainButtonDisabled":"_plw8F","dropdownButtonFocus":"_3hltw","dropdownButtonDisabled":"_3qKAB","secondary":"_PEaC8","mainButton":"_1HrYl","dropdownButton":"_1uPLq","disabled":"_19Qwi","dropdownOption":"_3V2sW"};
|
|
3208
|
+
var stylesheet$2="._2udwO{display:flex}._1C5AH{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1C5AH._2495F{background-color:#fff}._1C5AH._2495F._3hltw:not(._1C5AH._2495F._3qKAB),._1C5AH._PEaC8,body.keyboard-user ._1C5AH._2495F._3dOBx:not(._plw8F){background-color:#0b6ed0}._1C5AH._PEaC8._3qKAB._3hltw,._1C5AH._PEaC8._plw8F._3dOBx,._1C5AH._PEaC8._plw8F._3qKAB{opacity:.4}._1HrYl{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1HrYl:focus{z-index:1}._1uPLq{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._1uPLq svg{margin-left:1px}._1uPLq._2495F{background-color:#0b6ed0;border-color:transparent}._1uPLq._2495F svg{fill:#fff!important}._1uPLq._2495F:not(._19Qwi):hover{background-color:#085caf!important}._1uPLq._2495F:not(._19Qwi):active{background-color:#0854a1!important}._1uPLq._2495F._19Qwi{opacity:.4}._1uPLq._2495F._19Qwi svg{background-color:transparent}._1uPLq._PEaC8{border-color:#0b6ed0;background-color:#fff}._1uPLq._PEaC8 svg{fill:#0b6ed0!important}._1uPLq._PEaC8:not(._19Qwi):hover{background-color:#eef5fc!important}._1uPLq._PEaC8:not(._19Qwi):active{background-color:#e1edf9!important}._1uPLq._PEaC8._19Qwi{opacity:.4}._1uPLq._PEaC8._19Qwi svg{background-color:transparent}._3V2sW{width:260px}";
|
|
3209
|
+
icons_index.styleInject(css_248z$2);
|
|
3199
3210
|
|
|
3200
3211
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3201
3212
|
let {
|
|
@@ -3229,14 +3240,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3229
3240
|
});
|
|
3230
3241
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3231
3242
|
"data-testid": dataTestId,
|
|
3232
|
-
className: classNames__default["default"](styles$
|
|
3243
|
+
className: classNames__default["default"](styles$2.container, className),
|
|
3233
3244
|
ref: ref
|
|
3234
3245
|
}, /*#__PURE__*/React__default["default"].createElement(index.Button, {
|
|
3235
3246
|
kind: kind,
|
|
3236
3247
|
"data-testid": index.getSubDataTestId(dataTestId, 'button'),
|
|
3237
|
-
className: classNames__default["default"](styles$
|
|
3238
|
-
[styles$
|
|
3239
|
-
[styles$
|
|
3248
|
+
className: classNames__default["default"](styles$2.mainButton, {
|
|
3249
|
+
[styles$2.disabled]: isButtonDisabled,
|
|
3250
|
+
[styles$2.primary]: kind === 'primary'
|
|
3240
3251
|
}),
|
|
3241
3252
|
onClick: onClick,
|
|
3242
3253
|
disabled: isButtonDisabled,
|
|
@@ -3247,13 +3258,13 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3247
3258
|
onFocus: () => setMainButtonHasFocus(true),
|
|
3248
3259
|
onBlur: () => setMainButtonHasFocus(false)
|
|
3249
3260
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3250
|
-
className: classNames__default["default"](styles$
|
|
3251
|
-
[styles$
|
|
3252
|
-
[styles$
|
|
3253
|
-
[styles$
|
|
3254
|
-
[styles$
|
|
3255
|
-
[styles$
|
|
3256
|
-
[styles$
|
|
3261
|
+
className: classNames__default["default"](styles$2.divider, {
|
|
3262
|
+
[styles$2.primary]: kind === 'primary',
|
|
3263
|
+
[styles$2.secondary]: kind === 'secondary',
|
|
3264
|
+
[styles$2.mainButtonFocus]: mainButtonHasFocus,
|
|
3265
|
+
[styles$2.dropdownButtonFocus]: dropdownButtonHasFocus,
|
|
3266
|
+
[styles$2.mainButtonDisabled]: isButtonDisabled,
|
|
3267
|
+
[styles$2.dropdownButtonDisabled]: isDropdownDisabled
|
|
3257
3268
|
})
|
|
3258
3269
|
}), /*#__PURE__*/React__default["default"].createElement(index.Dropdown, {
|
|
3259
3270
|
"data-testid": index.getSubDataTestId(dataTestId, 'dropdown'),
|
|
@@ -3264,10 +3275,10 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3264
3275
|
}, /*#__PURE__*/React__default["default"].createElement(index.DropdownButton // `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
3265
3276
|
, {
|
|
3266
3277
|
label: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null),
|
|
3267
|
-
className: classNames__default["default"](styles$
|
|
3268
|
-
[styles$
|
|
3269
|
-
[styles$
|
|
3270
|
-
[styles$
|
|
3278
|
+
className: classNames__default["default"](styles$2.dropdownButton, {
|
|
3279
|
+
[styles$2.disabled]: isDropdownDisabled,
|
|
3280
|
+
[styles$2.primary]: kind === 'primary',
|
|
3281
|
+
[styles$2.secondary]: kind === 'secondary'
|
|
3271
3282
|
}),
|
|
3272
3283
|
ref: dropdownButtonRef,
|
|
3273
3284
|
tabIndex: -1,
|
|
@@ -3289,15 +3300,15 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3289
3300
|
label: "",
|
|
3290
3301
|
disabled: isDisabled,
|
|
3291
3302
|
onSelect: onClick,
|
|
3292
|
-
className: styles$
|
|
3303
|
+
className: styles$2.dropdownOption,
|
|
3293
3304
|
ref: ref
|
|
3294
3305
|
}, children);
|
|
3295
3306
|
});
|
|
3296
3307
|
|
|
3297
|
-
var css_248z = ".
|
|
3298
|
-
var styles = {"button":"
|
|
3299
|
-
var stylesheet=".
|
|
3300
|
-
icons_index.styleInject(css_248z);
|
|
3308
|
+
var css_248z$1 = "._iWUoq{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}._iWUoq:hover:not(._dhb8L){background-color:rgba(50,54,58,.08)}._iWUoq:hover:not(._dhb8L)._3kcgi{border-color:#085caf;background-color:rgba(11,110,208,.04)}._iWUoq:hover:not(._dhb8L)._3kcgi ._1T604{color:#32363a}._iWUoq:hover:not(._dhb8L)._3kcgi ._1WFV2{fill:#32363a}._iWUoq:hover:not(._dhb8L)._3kcgi ._QnSTu{fill:#085caf}._iWUoq:hover:not(._dhb8L)._3kcgi ._12fhk{background-color:rgba(11,110,208,.11)}._iWUoq:hover:not(._dhb8L)._3kcgi ._12fhk ._2c06i{color:#085caf}._iWUoq:active:not(._dhb8L){background-color:#e8e9e9}._iWUoq:active:not(._dhb8L)._3kcgi{background-color:rgba(11,110,208,.11);border-color:#0854a1}._iWUoq:active:not(._dhb8L)._3kcgi ._QnSTu{fill:#0854a1}._iWUoq:active:not(._dhb8L)._3kcgi ._12fhk{background-color:rgba(11,110,208,.11)}._iWUoq:active:not(._dhb8L)._3kcgi ._12fhk ._2c06i{color:#0854a1}._iWUoq._dhb8L{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._iWUoq._3kcgi{border-color:#0b6ed0}._1WFV2{fill:#515559;margin-right:4px}._1T604{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._1T604+._12fhk{margin-left:6px}._1T604._dhb8L{color:#74777a}._12fhk{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}._2c06i{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._QnSTu{fill:#515559}._QnSTu._dhb8L,._QnSTu._dhb8L._3kcgi{fill:rgba(116,119,122,.4)}._QnSTu._3kcgi{fill:#0b6ed0}._QnSTu._XKkLS{transform:rotate(-180deg)}body.keyboard-user ._iWUoq:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3309
|
+
var styles$1 = {"button":"_iWUoq","disabled":"_dhb8L","selected":"_3kcgi","label":"_1T604","lockIcon":"_1WFV2","chevronIcon":"_QnSTu","selectedFiltersContainer":"_12fhk","selectedFilters":"_2c06i","open":"_XKkLS"};
|
|
3310
|
+
var stylesheet$1="._iWUoq{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}._iWUoq:hover:not(._dhb8L){background-color:rgba(50,54,58,.08)}._iWUoq:hover:not(._dhb8L)._3kcgi{border-color:#085caf;background-color:rgba(11,110,208,.04)}._iWUoq:hover:not(._dhb8L)._3kcgi ._1T604{color:#32363a}._iWUoq:hover:not(._dhb8L)._3kcgi ._1WFV2{fill:#32363a}._iWUoq:hover:not(._dhb8L)._3kcgi ._QnSTu{fill:#085caf}._iWUoq:hover:not(._dhb8L)._3kcgi ._12fhk{background-color:rgba(11,110,208,.11)}._iWUoq:hover:not(._dhb8L)._3kcgi ._12fhk ._2c06i{color:#085caf}._iWUoq:active:not(._dhb8L){background-color:#e8e9e9}._iWUoq:active:not(._dhb8L)._3kcgi{background-color:rgba(11,110,208,.11);border-color:#0854a1}._iWUoq:active:not(._dhb8L)._3kcgi ._QnSTu{fill:#0854a1}._iWUoq:active:not(._dhb8L)._3kcgi ._12fhk{background-color:rgba(11,110,208,.11)}._iWUoq:active:not(._dhb8L)._3kcgi ._12fhk ._2c06i{color:#0854a1}._iWUoq._dhb8L{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._iWUoq._3kcgi{border-color:#0b6ed0}._1WFV2{fill:#515559;margin-right:4px}._1T604{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._1T604+._12fhk{margin-left:6px}._1T604._dhb8L{color:#74777a}._12fhk{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}._2c06i{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._QnSTu{fill:#515559}._QnSTu._dhb8L,._QnSTu._dhb8L._3kcgi{fill:rgba(116,119,122,.4)}._QnSTu._3kcgi{fill:#0b6ed0}._QnSTu._XKkLS{transform:rotate(-180deg)}body.keyboard-user ._iWUoq:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3311
|
+
icons_index.styleInject(css_248z$1);
|
|
3301
3312
|
|
|
3302
3313
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3303
3314
|
let {
|
|
@@ -3322,9 +3333,9 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3322
3333
|
} = index.useTranslation();
|
|
3323
3334
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
3324
3335
|
type: "button",
|
|
3325
|
-
className: classNames__default["default"](className, styles.button, {
|
|
3326
|
-
[styles.disabled]: isDisabled,
|
|
3327
|
-
[styles.selected]: !!selectedFilters
|
|
3336
|
+
className: classNames__default["default"](className, styles$1.button, {
|
|
3337
|
+
[styles$1.disabled]: isDisabled,
|
|
3338
|
+
[styles$1.selected]: !!selectedFilters
|
|
3328
3339
|
}),
|
|
3329
3340
|
onClick: e => {
|
|
3330
3341
|
if (isDisabled) {
|
|
@@ -3349,40 +3360,409 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3349
3360
|
}), isLocked && /*#__PURE__*/React__default["default"].createElement(icons_index.LockIcon, {
|
|
3350
3361
|
size: "small",
|
|
3351
3362
|
id: lockIconElementId,
|
|
3352
|
-
className: styles.lockIcon // @ts-ignore - 'locked' is not in the current list of translations
|
|
3363
|
+
className: styles$1.lockIcon // @ts-ignore - 'locked' is not in the current list of translations
|
|
3353
3364
|
,
|
|
3354
3365
|
"aria-label": translate('locked')
|
|
3355
3366
|
}), label && /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3356
3367
|
lightTheme: true
|
|
3357
3368
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3358
3369
|
id: labelElementId,
|
|
3359
|
-
className: classNames__default["default"](styles.label, {
|
|
3360
|
-
[styles.disabled]: isDisabled
|
|
3370
|
+
className: classNames__default["default"](styles$1.label, {
|
|
3371
|
+
[styles$1.disabled]: isDisabled
|
|
3361
3372
|
})
|
|
3362
3373
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3363
3374
|
show: true,
|
|
3364
3375
|
size: "xs",
|
|
3365
3376
|
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3366
3377
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3367
|
-
className: styles.selectedFiltersContainer
|
|
3378
|
+
className: styles$1.selectedFiltersContainer
|
|
3368
3379
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3369
3380
|
lightTheme: true
|
|
3370
3381
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3371
3382
|
id: selectedFiltersElementId,
|
|
3372
|
-
className: styles.selectedFilters
|
|
3383
|
+
className: styles$1.selectedFilters
|
|
3373
3384
|
}, selectedFilters))), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3374
3385
|
size: "medium",
|
|
3375
|
-
className: classNames__default["default"](styles.chevronIcon, {
|
|
3376
|
-
[styles.disabled]: isDisabled,
|
|
3377
|
-
[styles.selected]: !!selectedFilters,
|
|
3378
|
-
[styles.open]: isOpen
|
|
3386
|
+
className: classNames__default["default"](styles$1.chevronIcon, {
|
|
3387
|
+
[styles$1.disabled]: isDisabled,
|
|
3388
|
+
[styles$1.selected]: !!selectedFilters,
|
|
3389
|
+
[styles$1.open]: isOpen
|
|
3379
3390
|
}),
|
|
3380
3391
|
"aria-hidden": true
|
|
3381
3392
|
}));
|
|
3382
3393
|
});
|
|
3383
3394
|
|
|
3395
|
+
const {
|
|
3396
|
+
useContext: useMenuContext,
|
|
3397
|
+
Provider: MenuContextProvider
|
|
3398
|
+
} = index.createContextUtilities({});
|
|
3399
|
+
const {
|
|
3400
|
+
useContext: intermediaryUseMenuContext,
|
|
3401
|
+
Provider: IntermediaryMenuContextProvider
|
|
3402
|
+
} = index.createContextUtilities({});
|
|
3403
|
+
|
|
3404
|
+
const PaneContextProvider = _ref => {
|
|
3405
|
+
let {
|
|
3406
|
+
items,
|
|
3407
|
+
setItems,
|
|
3408
|
+
value,
|
|
3409
|
+
children
|
|
3410
|
+
} = _ref;
|
|
3411
|
+
return /*#__PURE__*/React__default["default"].createElement(index.ChildIndexProvider, {
|
|
3412
|
+
items: items,
|
|
3413
|
+
setItems: setItems
|
|
3414
|
+
}, /*#__PURE__*/React__default["default"].createElement(IntermediaryMenuContextProvider, {
|
|
3415
|
+
value: value
|
|
3416
|
+
}, children));
|
|
3417
|
+
};
|
|
3418
|
+
|
|
3419
|
+
const usePaneContext = childItemRef => {
|
|
3420
|
+
const coreContext = intermediaryUseMenuContext();
|
|
3421
|
+
const childIndex = index.useChildIndex({
|
|
3422
|
+
element: childItemRef
|
|
3423
|
+
});
|
|
3424
|
+
return {
|
|
3425
|
+
childIndex,
|
|
3426
|
+
...coreContext
|
|
3427
|
+
};
|
|
3428
|
+
};
|
|
3429
|
+
|
|
3430
|
+
/* eslint-disable max-classes-per-file */
|
|
3431
|
+
const Menu = _ref => {
|
|
3432
|
+
var _process$env;
|
|
3433
|
+
|
|
3434
|
+
let {
|
|
3435
|
+
'data-testid': dataTestId,
|
|
3436
|
+
isOpen,
|
|
3437
|
+
onIsOpenChange,
|
|
3438
|
+
isDisabled,
|
|
3439
|
+
children
|
|
3440
|
+
} = _ref;
|
|
3441
|
+
|
|
3442
|
+
if (typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test' && window) {
|
|
3443
|
+
var _window$ResizeObserve, _window$PointerEvent;
|
|
3444
|
+
|
|
3445
|
+
window.ResizeObserver = (_window$ResizeObserve = window.ResizeObserver) !== null && _window$ResizeObserve !== void 0 ? _window$ResizeObserve : ResizeObserver;
|
|
3446
|
+
window.PointerEvent = (_window$PointerEvent = window.PointerEvent) !== null && _window$PointerEvent !== void 0 ? _window$PointerEvent : PointerEvent;
|
|
3447
|
+
}
|
|
3448
|
+
|
|
3449
|
+
const [open, setOpen] = index.useControllableState(isOpen, onIsOpenChange, isOpen);
|
|
3450
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuContextProvider, {
|
|
3451
|
+
value: {
|
|
3452
|
+
dataTestId,
|
|
3453
|
+
isDisabled
|
|
3454
|
+
}
|
|
3455
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Root, {
|
|
3456
|
+
open: open,
|
|
3457
|
+
onOpenChange: shouldOpen => setOpen(!isDisabled && shouldOpen)
|
|
3458
|
+
}, children));
|
|
3459
|
+
};
|
|
3460
|
+
|
|
3461
|
+
class ResizeObserver {
|
|
3462
|
+
constructor(cb) {
|
|
3463
|
+
this.cb = cb;
|
|
3464
|
+
}
|
|
3465
|
+
|
|
3466
|
+
observe() {
|
|
3467
|
+
this.cb([{
|
|
3468
|
+
borderBoxSize: {
|
|
3469
|
+
inlineSize: 0,
|
|
3470
|
+
blockSize: 0
|
|
3471
|
+
}
|
|
3472
|
+
}]);
|
|
3473
|
+
} // eslint-disable-next-line class-methods-use-this
|
|
3474
|
+
|
|
3475
|
+
|
|
3476
|
+
unobserve() {} // eslint-disable-next-line class-methods-use-this
|
|
3477
|
+
|
|
3478
|
+
|
|
3479
|
+
disconnect() {}
|
|
3480
|
+
|
|
3481
|
+
} // https://github.com/radix-ui/primitives/issues/1220#issuecomment-1087465026
|
|
3482
|
+
|
|
3483
|
+
|
|
3484
|
+
class PointerEvent extends Event {
|
|
3485
|
+
constructor(type, props) {
|
|
3486
|
+
super(type, props);
|
|
3487
|
+
this.button = props.button || 0;
|
|
3488
|
+
this.ctrlKey = props.ctrlKey || false;
|
|
3489
|
+
this.pointerType = props.pointerType || 'mouse';
|
|
3490
|
+
}
|
|
3491
|
+
|
|
3492
|
+
}
|
|
3493
|
+
|
|
3494
|
+
var css_248z = "._1VKky{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._2270H{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;background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559}._2270H:hover:not([aria-disabled=true]){background-color:#f5f5f5}._2270H:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2270H+._3zQNq{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._2270H[data-state=open]+._3zQNq{transform:rotate(-180deg) translateY(50%)}._2270H[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._2270H[aria-disabled=true]+._3zQNq{fill:#515559;opacity:.4}._1IFp9{margin:0;padding:4px 0;font-size:14px;color:#32363a;fill:#32363a;list-style:none;min-width:160px;max-width:350px;min-height:10px;max-height:99%;background:#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:scroll}._23Nw5{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._23Nw5[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._23Nw5[aria-disabled=true]{cursor:not-allowed;opacity:.65}._23Nw5._1xqsx{padding-right:32px}._23Nw5._1xqsx ._3zQNq{position:absolute;top:8px;right:3px;fill:#515559}._2aSK3{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._19awZ{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}";
|
|
3495
|
+
var styles = {"buttonContainer":"_1VKky","button":"_2270H","rightIcon":"_3zQNq","flyout":"_1IFp9","menuItem":"_23Nw5","subMenu":"_1xqsx","searchBox":"_2aSK3","emptyOption":"_19awZ"};
|
|
3496
|
+
var stylesheet="._1VKky{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._2270H{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;background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559}._2270H:hover:not([aria-disabled=true]){background-color:#f5f5f5}._2270H:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._2270H+._3zQNq{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._2270H[data-state=open]+._3zQNq{transform:rotate(-180deg) translateY(50%)}._2270H[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._2270H[aria-disabled=true]+._3zQNq{fill:#515559;opacity:.4}._1IFp9{margin:0;padding:4px 0;font-size:14px;color:#32363a;fill:#32363a;list-style:none;min-width:160px;max-width:350px;min-height:10px;max-height:99%;background:#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:scroll}._23Nw5{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._23Nw5[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._23Nw5[aria-disabled=true]{cursor:not-allowed;opacity:.65}._23Nw5._1xqsx{padding-right:32px}._23Nw5._1xqsx ._3zQNq{position:absolute;top:8px;right:3px;fill:#515559}._2aSK3{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._19awZ{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}";
|
|
3497
|
+
icons_index.styleInject(css_248z);
|
|
3498
|
+
|
|
3499
|
+
/* eslint-disable import/prefer-default-export */
|
|
3500
|
+
const DATA_TESTID_SUFFIXES = {
|
|
3501
|
+
MENU_PANE: 'menupane',
|
|
3502
|
+
MENU_ITEM: 'menuitem',
|
|
3503
|
+
MENU_BUTTON: 'menubutton',
|
|
3504
|
+
MENU_SEARCH: 'menusearch'
|
|
3505
|
+
};
|
|
3506
|
+
|
|
3507
|
+
const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3508
|
+
let {
|
|
3509
|
+
asChild,
|
|
3510
|
+
children,
|
|
3511
|
+
...rest
|
|
3512
|
+
} = _ref;
|
|
3513
|
+
const {
|
|
3514
|
+
dataTestId: rootDataTestId,
|
|
3515
|
+
isDisabled
|
|
3516
|
+
} = useMenuContext();
|
|
3517
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3518
|
+
className: classNames__default["default"]({
|
|
3519
|
+
[styles.buttonContainer]: !asChild
|
|
3520
|
+
})
|
|
3521
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Trigger, _extends__default["default"]({}, rest, {
|
|
3522
|
+
"aria-disabled": isDisabled,
|
|
3523
|
+
className: classNames__default["default"]({
|
|
3524
|
+
[styles.button]: !asChild
|
|
3525
|
+
}),
|
|
3526
|
+
asChild: asChild,
|
|
3527
|
+
ref: ref,
|
|
3528
|
+
"data-testid": index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_BUTTON)
|
|
3529
|
+
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3530
|
+
className: styles.rightIcon,
|
|
3531
|
+
"aria-hidden": "true"
|
|
3532
|
+
}));
|
|
3533
|
+
});
|
|
3534
|
+
|
|
3535
|
+
const MenuSearch = _ref => {
|
|
3536
|
+
let {
|
|
3537
|
+
setSearchValue,
|
|
3538
|
+
items,
|
|
3539
|
+
paneRef
|
|
3540
|
+
} = _ref;
|
|
3541
|
+
const itemRef = React.useRef(null);
|
|
3542
|
+
const inputRef = React.useRef(null);
|
|
3543
|
+
const {
|
|
3544
|
+
translate
|
|
3545
|
+
} = index.useTranslation();
|
|
3546
|
+
const noMatchesText = translate('menu.noItemsToDisplay');
|
|
3547
|
+
const searchText = translate('searchText');
|
|
3548
|
+
const {
|
|
3549
|
+
dataTestId: menuParentDataTestId,
|
|
3550
|
+
searchValue = ''
|
|
3551
|
+
} = usePaneContext();
|
|
3552
|
+
const dataTestId = menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH); // not using `useMemo` to force an extra render after items have updated https://stackoverflow.com/a/56029184
|
|
3553
|
+
|
|
3554
|
+
const [zeroSearchResults, setZeroSearchResults] = React.useState();
|
|
3555
|
+
React.useEffect(() => {
|
|
3556
|
+
setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0);
|
|
3557
|
+
}, [items, searchValue]);
|
|
3558
|
+
React.useEffect(() => () => setSearchValue(''), [setSearchValue]);
|
|
3559
|
+
const [previouslyFocusedElement, setPreviouslyFocusedElement] = React.useState(); // a backdoor hack to keep focus on search input on mouse leave
|
|
3560
|
+
|
|
3561
|
+
index.useEventListener(paneRef, 'focus', e => {
|
|
3562
|
+
if (e.target === e.currentTarget && previouslyFocusedElement === itemRef.current) {
|
|
3563
|
+
var _inputRef$current;
|
|
3564
|
+
|
|
3565
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
3566
|
+
}
|
|
3567
|
+
|
|
3568
|
+
setPreviouslyFocusedElement(e.target);
|
|
3569
|
+
}, {
|
|
3570
|
+
isCaptureEvent: true
|
|
3571
|
+
});
|
|
3572
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
3573
|
+
className: styles.searchBox // prevents dropdown from closing
|
|
3574
|
+
,
|
|
3575
|
+
onSelect: e => e.preventDefault(),
|
|
3576
|
+
onFocus: () => {
|
|
3577
|
+
var _inputRef$current2;
|
|
3578
|
+
|
|
3579
|
+
return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
3580
|
+
},
|
|
3581
|
+
role: undefined,
|
|
3582
|
+
ref: itemRef
|
|
3583
|
+
}, /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
3584
|
+
"data-testid": dataTestId,
|
|
3585
|
+
role: "searchbox",
|
|
3586
|
+
value: searchValue,
|
|
3587
|
+
onChange: e => setSearchValue(e.target.value),
|
|
3588
|
+
placeholder: searchText,
|
|
3589
|
+
onKeyDown: e => {
|
|
3590
|
+
var _e$target;
|
|
3591
|
+
|
|
3592
|
+
// stop propagation to prevent typeAhead
|
|
3593
|
+
e.stopPropagation();
|
|
3594
|
+
const keysToForward = ['Escape', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End']; // allow caret movement through text entry, but close searchable submenu if on the very left
|
|
3595
|
+
|
|
3596
|
+
if (((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3597
|
+
keysToForward.push('ArrowLeft');
|
|
3598
|
+
} // forward keypress directly to `Item` to let Radix handle keyboard navigation
|
|
3599
|
+
|
|
3600
|
+
|
|
3601
|
+
if (_includesInstanceProperty__default["default"](keysToForward).call(keysToForward, e.key)) {
|
|
3602
|
+
var _itemRef$current;
|
|
3603
|
+
|
|
3604
|
+
// `view` types are incompatible
|
|
3605
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3606
|
+
const {
|
|
3607
|
+
view,
|
|
3608
|
+
...eventClone
|
|
3609
|
+
} = e;
|
|
3610
|
+
itemRef === null || itemRef === void 0 ? void 0 : (_itemRef$current = itemRef.current) === null || _itemRef$current === void 0 ? void 0 : _itemRef$current.dispatchEvent(new KeyboardEvent('keydown', eventClone));
|
|
3611
|
+
}
|
|
3612
|
+
},
|
|
3613
|
+
leftAddOn: /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null),
|
|
3614
|
+
ref: inputRef
|
|
3615
|
+
})), zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3616
|
+
className: styles.emptyOption // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
3617
|
+
,
|
|
3618
|
+
role: "option" // `aria-selected` is omitted because this option is not selectable
|
|
3619
|
+
,
|
|
3620
|
+
"aria-live": "assertive"
|
|
3621
|
+
}, noMatchesText));
|
|
3622
|
+
};
|
|
3623
|
+
|
|
3624
|
+
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3625
|
+
let {
|
|
3626
|
+
placement,
|
|
3627
|
+
children,
|
|
3628
|
+
isSearchable,
|
|
3629
|
+
searchValue: externalSearchValue,
|
|
3630
|
+
onSearchValueChange,
|
|
3631
|
+
isSearchFilteringDisabled = false,
|
|
3632
|
+
...rest
|
|
3633
|
+
} = _ref;
|
|
3634
|
+
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
3635
|
+
const portalTarget = index.usePortalTarget();
|
|
3636
|
+
const [side, align] = React.useMemo(() => {
|
|
3637
|
+
var _placement$split, _placement$split2;
|
|
3638
|
+
|
|
3639
|
+
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 : [];
|
|
3640
|
+
}, [placement]);
|
|
3641
|
+
const [items, setItems] = React.useState([]);
|
|
3642
|
+
const {
|
|
3643
|
+
dataTestId: rootDataTestId
|
|
3644
|
+
} = useMenuContext();
|
|
3645
|
+
const dataTestId = index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_PANE);
|
|
3646
|
+
const paneRef = React.useRef(null);
|
|
3647
|
+
return /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3648
|
+
items: items,
|
|
3649
|
+
setItems: setItems,
|
|
3650
|
+
value: {
|
|
3651
|
+
dataTestId,
|
|
3652
|
+
searchValue: internalSearchValue,
|
|
3653
|
+
paneRef,
|
|
3654
|
+
isSearchFilteringDisabled
|
|
3655
|
+
}
|
|
3656
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Portal, {
|
|
3657
|
+
container: portalTarget || undefined
|
|
3658
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Content, _extends__default["default"]({}, rest, {
|
|
3659
|
+
sideOffset: 6,
|
|
3660
|
+
loop: true,
|
|
3661
|
+
side: side || 'bottom',
|
|
3662
|
+
align: align || 'start',
|
|
3663
|
+
className: styles.flyout,
|
|
3664
|
+
ref: index.mergeRefs(ref, paneRef),
|
|
3665
|
+
"data-testid": dataTestId
|
|
3666
|
+
}), isSearchable && /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
3667
|
+
setSearchValue: setSearchValue,
|
|
3668
|
+
items: items,
|
|
3669
|
+
paneRef: paneRef
|
|
3670
|
+
}), children)));
|
|
3671
|
+
});
|
|
3672
|
+
|
|
3673
|
+
const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3674
|
+
let {
|
|
3675
|
+
isDisabled,
|
|
3676
|
+
asChild,
|
|
3677
|
+
children,
|
|
3678
|
+
className,
|
|
3679
|
+
onSelect,
|
|
3680
|
+
label,
|
|
3681
|
+
...rest
|
|
3682
|
+
} = _ref;
|
|
3683
|
+
const itemRef = React.useRef(null);
|
|
3684
|
+
const {
|
|
3685
|
+
dataTestId: menuParentDataTestId,
|
|
3686
|
+
childIndex: index$1,
|
|
3687
|
+
searchValue,
|
|
3688
|
+
isSearchFilteringDisabled
|
|
3689
|
+
} = usePaneContext(itemRef);
|
|
3690
|
+
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));
|
|
3691
|
+
const isVisible = React.useMemo(() => {
|
|
3692
|
+
var _context;
|
|
3693
|
+
|
|
3694
|
+
const searchMatcher = label !== null && label !== void 0 ? label : typeof children === 'string' ? children : undefined;
|
|
3695
|
+
return isSearchFilteringDisabled || !searchValue || (searchMatcher === null || searchMatcher === void 0 ? void 0 : _includesInstanceProperty__default["default"](_context = searchMatcher.toLowerCase()).call(_context, searchValue.toLowerCase()));
|
|
3696
|
+
}, [children, searchValue, label, isSearchFilteringDisabled]);
|
|
3697
|
+
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
3698
|
+
asChild: asChild,
|
|
3699
|
+
"aria-disabled": isDisabled,
|
|
3700
|
+
className: classNames__default["default"](className, styles.menuItem),
|
|
3701
|
+
"data-testid": dataTestId,
|
|
3702
|
+
ref: index.mergeRefs(ref, itemRef) // stop radix from closing the menu on selection of disabled item
|
|
3703
|
+
// other pointer and keyboard events still work, even when disabled
|
|
3704
|
+
,
|
|
3705
|
+
onSelect: e => isDisabled ? e.preventDefault() : onSelect === null || onSelect === void 0 ? void 0 : onSelect()
|
|
3706
|
+
}), (!children || typeof children === 'string') && label ? label : children) : null;
|
|
3707
|
+
});
|
|
3708
|
+
|
|
3709
|
+
const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3710
|
+
let {
|
|
3711
|
+
children,
|
|
3712
|
+
label,
|
|
3713
|
+
isDisabled,
|
|
3714
|
+
isSearchable,
|
|
3715
|
+
searchValue: externalSearchValue,
|
|
3716
|
+
onSearchValueChange,
|
|
3717
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren = false,
|
|
3718
|
+
...rest
|
|
3719
|
+
} = _ref;
|
|
3720
|
+
const itemRef = React.useRef(null);
|
|
3721
|
+
const paneRef = React.useRef(null);
|
|
3722
|
+
const {
|
|
3723
|
+
dataTestId: menuParentDataTestId,
|
|
3724
|
+
childIndex: index$1,
|
|
3725
|
+
searchValue: triggerMenuParentSearchValue,
|
|
3726
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForTrigger
|
|
3727
|
+
} = usePaneContext(itemRef);
|
|
3728
|
+
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
3729
|
+
const paneDataTestId = index.getSubDataTestId(menuParentDataTestId, String(index$1));
|
|
3730
|
+
const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
|
|
3731
|
+
const [items, setItems] = React.useState([]);
|
|
3732
|
+
const isVisible = React.useMemo(() => {
|
|
3733
|
+
var _context;
|
|
3734
|
+
|
|
3735
|
+
return isSearchFilteringDisabledForTrigger || !triggerMenuParentSearchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, triggerMenuParentSearchValue.toLowerCase());
|
|
3736
|
+
}, [triggerMenuParentSearchValue, label, isSearchFilteringDisabledForTrigger]);
|
|
3737
|
+
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, {
|
|
3738
|
+
className: classNames__default["default"](styles.menuItem, styles.subMenu),
|
|
3739
|
+
"data-testid": triggerDataTestId,
|
|
3740
|
+
"aria-disabled": isDisabled,
|
|
3741
|
+
disabled: isDisabled,
|
|
3742
|
+
ref: itemRef
|
|
3743
|
+
}, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
3744
|
+
className: styles.rightIcon
|
|
3745
|
+
})), /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3746
|
+
items: items,
|
|
3747
|
+
setItems: setItems,
|
|
3748
|
+
value: {
|
|
3749
|
+
dataTestId: paneDataTestId,
|
|
3750
|
+
searchValue: internalSearchValue,
|
|
3751
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren
|
|
3752
|
+
}
|
|
3753
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubContent, _extends__default["default"]({}, rest, {
|
|
3754
|
+
className: styles.flyout,
|
|
3755
|
+
loop: true,
|
|
3756
|
+
"data-testid": paneDataTestId,
|
|
3757
|
+
ref: index.mergeRefs(ref, paneRef)
|
|
3758
|
+
}), isSearchable && /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
3759
|
+
setSearchValue: setSearchValue,
|
|
3760
|
+
items: items,
|
|
3761
|
+
paneRef: paneRef
|
|
3762
|
+
}), children))) : null;
|
|
3763
|
+
});
|
|
3764
|
+
|
|
3384
3765
|
/* eslint-disable camelcase */
|
|
3385
|
-
// export * from './Menu';
|
|
3386
3766
|
|
|
3387
3767
|
exports.Input = index.Input$1;
|
|
3388
3768
|
exports.AdvancedTable = AdvancedTable;
|
|
@@ -3393,6 +3773,11 @@ exports.ComboboxGroup = ComboboxGroup;
|
|
|
3393
3773
|
exports.ComboboxInput = ComboboxInput;
|
|
3394
3774
|
exports.ComboboxOption = ComboboxOption;
|
|
3395
3775
|
exports.FilterAnchor = FilterAnchor;
|
|
3776
|
+
exports.Menu = Menu;
|
|
3777
|
+
exports.MenuButton = MenuButton;
|
|
3778
|
+
exports.MenuItem = MenuItem;
|
|
3779
|
+
exports.MenuPane = MenuPane;
|
|
3396
3780
|
exports.PhoneNumberInput = PhoneNumberInput;
|
|
3397
3781
|
exports.SplitButton = SplitButton;
|
|
3398
3782
|
exports.SplitButtonOption = SplitButtonOption;
|
|
3783
|
+
exports.SubMenu = SubMenu;
|