@qualtrics/ui-react 2.24.2 → 2.25.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 +10 -0
- package/dist/__shared/cjs/{index-8f52588d.js → index-5b3b3406.js} +3 -3
- package/dist/__shared/cjs/{index-b7a35c2e.js → index-610a1e02.js} +133 -133
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.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/Combobox2.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/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/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- 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/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/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/useOverlay/useOverlay.js +1 -1
- package/dist/hooks/useOverlay/useOverlay2.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.d.ts +9 -7
- package/dist/index.es.js +2 -1
- package/dist/index.js +4 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +6 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +4 -1
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +5 -2
- package/dist/next/Menu/MenuItem.js +19 -4
- package/dist/next/Menu/MenuPane.js +48 -32
- package/dist/next/Menu/SubMenu.js +49 -21
- package/dist/next/Menu/useCSSVariable.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +20 -15
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +114 -0
- package/dist/next/Select/Select2.js +8 -0
- package/dist/next/Select/SelectButton.js +46 -0
- package/dist/next/Select/SelectContext.js +16 -0
- package/dist/next/Select/SelectItem.js +46 -0
- package/dist/next/Select/SelectPane.js +43 -0
- package/dist/next/Select/SelectedItems.js +45 -0
- package/dist/next/Select/SubSelect.js +90 -0
- package/dist/next/Select/constants.js +13 -0
- package/dist/next/Select/index.js +5 -0
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +54 -6
- package/dist/next/index.es.js +6 -0
- package/dist/next/index.js +680 -255
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/next/package.json +1 -1
- package/package.json +3 -2
package/dist/next/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var classNames = require('classnames');
|
|
|
8
8
|
var reactDnd = require('react-dnd');
|
|
9
9
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
|
10
10
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
11
|
-
var index = require('../__shared/cjs/index-
|
|
12
|
-
var icons_index = require('../__shared/cjs/index-
|
|
11
|
+
var index = require('../__shared/cjs/index-610a1e02.js');
|
|
12
|
+
var icons_index = require('../__shared/cjs/index-5b3b3406.js');
|
|
13
13
|
var libphonenumberJs = require('libphonenumber-js');
|
|
14
14
|
var InputMask = require('react-input-mask');
|
|
15
15
|
var reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
@@ -30,10 +30,10 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
30
30
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
31
31
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
32
32
|
|
|
33
|
-
var css_248z$
|
|
34
|
-
var styles$
|
|
35
|
-
var stylesheet$
|
|
36
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
33
|
+
var css_248z$b = "._XLrxO{overflow:auto;position:relative;max-width:100%;max-height:100%}._B10Xi,._XLrxO{background-color:#fff}._B10Xi{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._6Lrkh{margin-bottom:4px}._tUuUA{position:-webkit-sticky;position:sticky;top:0;z-index:100}._RJZ5K{display:flex}._RJZ5K:focus{outline:none}._RJZ5K.focus-visible ._emEqO:after,._RJZ5K:focus-visible ._emEqO: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}._RJZ5K.focus-visible ._emEqO:last-of-type:after,._RJZ5K:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RJZ5K.focus-visible ._emEqO:first-of-type:after,._RJZ5K:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RJZ5K.focus-visible ._emEqO._MIMNv:after,._RJZ5K:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:1px}._BZpvE{padding-right:3px}._RgYrf{display:flex}._RgYrf._UVZyy ._emEqO,._RgYrf._UVZyy ._IDnsP{cursor:pointer}._RgYrf._dr-n4 ._emEqO,._RgYrf._dr-n4 ._IDnsP{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._RgYrf._dr-n4 ._emEqO._MIMNv,._RgYrf._dr-n4 ._IDnsP._MIMNv{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._RgYrf._dr-n4 ._emEqO._MIMNv ._IDnsP,._RgYrf._dr-n4 ._emEqO._MIMNv ._IK1gY,._RgYrf._dr-n4 ._emEqO._MIMNv ._Z1s-8,._RgYrf._dr-n4 ._IDnsP._MIMNv ._IDnsP,._RgYrf._dr-n4 ._IDnsP._MIMNv ._IK1gY,._RgYrf._dr-n4 ._IDnsP._MIMNv ._Z1s-8{background-color:rgba(11,110,208,.08)}._RgYrf._UVZyy:hover:not(._dr-n4) ._emEqO,._RgYrf._UVZyy:hover:not(._dr-n4) ._IDnsP{background-color:#f9f9f9}._RgYrf._UVZyy:active:not(._dr-n4)[\\:not-has\\(._IK1gY\\:active\\)] ._emEqO,._RgYrf._UVZyy:active:not(._dr-n4)[\\:not-has\\(._IK1gY\\:active\\)] ._IDnsP{background-color:#f3f3f3}._RgYrf._UVZyy:active:not(._dr-n4):not(._RgYrf._UVZyy:active:not(._dr-n4):has(._IK1gY:active)) ._emEqO,._RgYrf._UVZyy:active:not(._dr-n4):not(._RgYrf._UVZyy:active:not(._dr-n4):has(._IK1gY:active)) ._IDnsP{background-color:#f3f3f3}._RgYrf:focus{outline:none}._RgYrf.focus-visible ._emEqO:after,._RgYrf:focus-visible ._emEqO: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}._RgYrf.focus-visible ._emEqO:last-of-type:after,._RgYrf:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf.focus-visible ._emEqO:first-of-type:after,._RgYrf:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf.focus-visible ._emEqO._MIMNv:after,._RgYrf:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:0}._RgYrf:last-of-type:focus{outline:none}._RgYrf:last-of-type.focus-visible ._emEqO:after,._RgYrf:last-of-type:focus-visible ._emEqO: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}._RgYrf:last-of-type.focus-visible ._emEqO:last-of-type:after,._RgYrf:last-of-type:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf:last-of-type.focus-visible ._emEqO:first-of-type:after,._RgYrf:last-of-type:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf:last-of-type.focus-visible ._emEqO._MIMNv:after,._RgYrf:last-of-type:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:1px}._RgYrf:last-of-type ._Z1s-8:focus{outline:none}._RgYrf:last-of-type ._Z1s-8._-Wbvz.focus-visible:after,._RgYrf:last-of-type ._Z1s-8._-Wbvz:focus-visible:after,._RgYrf:last-of-type ._Z1s-8.focus-visible:after,._RgYrf:last-of-type ._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._RgYrf:first-of-type:focus{outline:none}._RgYrf:first-of-type.focus-visible ._emEqO:after,._RgYrf:first-of-type:focus-visible ._emEqO: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}._RgYrf:first-of-type.focus-visible ._emEqO:last-of-type:after,._RgYrf:first-of-type:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf:first-of-type.focus-visible ._emEqO:first-of-type:after,._RgYrf:first-of-type:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf:first-of-type.focus-visible ._emEqO._MIMNv:after,._RgYrf:first-of-type:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:0}._RgYrf:first-of-type ._Z1s-8:focus{outline:none}._RgYrf:first-of-type ._Z1s-8._-Wbvz.focus-visible:after,._RgYrf:first-of-type ._Z1s-8._-Wbvz:focus-visible:after,._RgYrf:first-of-type ._Z1s-8.focus-visible:after,._RgYrf:first-of-type ._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-rIFE{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}._-rIFE._sHukS{flex-grow:1}._-rIFE._YCbKv{cursor:pointer}._-rIFE._YCbKv:hover:not(._6XuZm){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-rIFE._YCbKv:active:not(._6XuZm){background-color:#f3f3f3}._-rIFE._btc1W:not(._6XuZm){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-rIFE._6XuZm{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-rIFE ._BGfCg{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-rIFE ._BGfCg._I-1M9{left:-1px}._-rIFE ._BGfCg._1DzLK{right:0}._-rIFE ._kbhqO{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-rIFE ._kbhqO._I-1M9{left:-2px}._-rIFE ._kbhqO._1DzLK{right:-1px}._-rIFE:first-of-type ._I-1M9._BGfCg{left:0;width:2px;border-left:1px solid #fff}._-rIFE:first-of-type ._I-1M9._kbhqO{left:0}._-rIFE:last-of-type ._1DzLK._BGfCg{right:0;width:2px;border-right:1px solid #fff}._-rIFE:last-of-type ._1DzLK._kbhqO{right:0}._-rIFE ._jcoB8{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-rIFE ._jcoB8 ._NJaGa{position:absolute;width:2px;right:2px;top:0;bottom:0}._-rIFE ._jcoB8 ._NJaGa._TDlFD{background-color:#0a6ed1}._-rIFE ._jcoB8:hover ._NJaGa:not(._TDlFD){background-color:#d9d9d9}._-rIFE ._hmV2T{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._-rIFE ._hmV2T._szN8q{flex-direction:row-reverse;justify-content:flex-start}._-rIFE ._hmV2T._szN8q ._TDaC6{margin:1px 7px 1px 1px}._-rIFE ._hmV2T ._LRDDY{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-rIFE ._hmV2T ._TDaC6{margin:1px 1px 1px 7px;flex-shrink:0}._-rIFE ._iJXYL{margin-left:6px;margin-right:4px;flex-shrink:0}._-rIFE ._4NBuh{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-rIFE:focus{outline:none}._-rIFE._-Wbvz.focus-visible:after,._-rIFE._-Wbvz:focus-visible:after,._-rIFE.focus-visible:after,._-rIFE:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-6p7E{margin-right:6px}._MIMNv{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._MIMNv[focus-within]{z-index:30}._MIMNv:focus-within{z-index:30}._Z1s-8{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}._Z1s-8 ._zkwgB{width:100%;padding:12px 12px 11px;overflow:hidden}._Z1s-8._6XuZm{background-color:#efefef;border-bottom-color:#dfdfe1}._Z1s-8._sHukS{flex-grow:1}._Z1s-8:focus{outline:none}._Z1s-8._-Wbvz.focus-visible:after,._Z1s-8._-Wbvz:focus-visible:after,._Z1s-8.focus-visible:after,._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._IDnsP{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._IDnsP._4uXbD{border-bottom-color:#d9d9d9;background-color:#fff}._IK1gY{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}._IK1gY._4uXbD{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._IK1gY:focus input~span,._IK1gY:hover input~span{border-color:#0b6ed0}._IK1gY ._loWEJ{position:relative;display:inline-flex}._IK1gY ._loWEJ ._RZzpO{margin:0!important}._IK1gY ._loWEJ ._3kyKA{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._iet0L{justify-content:flex-start}._2HYkh{justify-content:center;text-align:center}._szN8q{justify-content:flex-end;text-align:right}._Jg5-k{display:none}._5TH-E{opacity:0;height:0;width:0;overflow:hidden}._5TH-E,._a1dhE{position:absolute}._a1dhE{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._iCIyt{width:246px}";
|
|
34
|
+
var styles$b = {"advancedTable":"_XLrxO","advancedTablePaginationContainer":"_B10Xi","advancedTablePagination":"_6Lrkh","advancedTableColumnHeadersRowGroup":"_tUuUA","advancedTableColumnHeaders":"_RJZ5K","advancedTableRowChild":"_emEqO","pinnedContainer":"_MIMNv","advancedTableRowGroup":"_BZpvE","advancedTableRow":"_RgYrf","hasRowAction":"_UVZyy","advancedTableExpandRowSpacer":"_IDnsP","isSelected":"_dr-n4","advancedTableCheckbox":"_IK1gY","advancedTableCell":"_Z1s-8","showFocusRing":"_-Wbvz","advancedTableColumnHeader":"_-rIFE","fillRemainingSpace":"_sHukS","isSortable":"_YCbKv","isDragging":"_6XuZm","isSorted":"_btc1W","dropTargetLine":"_BGfCg","dropTargetLeft":"_I-1M9","dropTargetRight":"_1DzLK","dropTargetMarker":"_kbhqO","resizeHandle":"_jcoB8","resizeLine":"_NJaGa","isResizing":"_TDlFD","advancedTableColumnHeaderLabel":"_hmV2T","rightAligned":"_szN8q","sortIcon":"_TDaC6","advancedTableColumnHeaderLabelText":"_LRDDY","advancedTableColumnHeaderMenu":"_iJXYL","advancedTableColumnHeaderMenuHiddenAnchor":"_4NBuh","advancedTableColumnHeaderMenuItemIcon":"_-6p7E","advancedTableCellContainer":"_zkwgB","header":"_4uXbD","checkboxContainer":"_loWEJ","checkbox":"_RZzpO","mixed":"_3kyKA","leftAligned":"_iet0L","centerAligned":"_2HYkh","hiddenDescription":"_Jg5-k","hiddenLiveRegion":"_5TH-E","dragPreview":"_a1dhE","rowActionMenuPane":"_iCIyt"};
|
|
35
|
+
var stylesheet$b="._XLrxO{overflow:auto;position:relative;max-width:100%;max-height:100%}._B10Xi,._XLrxO{background-color:#fff}._B10Xi{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._6Lrkh{margin-bottom:4px}._tUuUA{position:-webkit-sticky;position:sticky;top:0;z-index:100}._RJZ5K{display:flex}._RJZ5K:focus{outline:none}._RJZ5K.focus-visible ._emEqO:after,._RJZ5K:focus-visible ._emEqO: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}._RJZ5K.focus-visible ._emEqO:last-of-type:after,._RJZ5K:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RJZ5K.focus-visible ._emEqO:first-of-type:after,._RJZ5K:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RJZ5K.focus-visible ._emEqO._MIMNv:after,._RJZ5K:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:1px}._BZpvE{padding-right:3px}._RgYrf{display:flex}._RgYrf._UVZyy ._emEqO,._RgYrf._UVZyy ._IDnsP{cursor:pointer}._RgYrf._dr-n4 ._emEqO,._RgYrf._dr-n4 ._IDnsP{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._RgYrf._dr-n4 ._emEqO._MIMNv,._RgYrf._dr-n4 ._IDnsP._MIMNv{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._RgYrf._dr-n4 ._emEqO._MIMNv ._IDnsP,._RgYrf._dr-n4 ._emEqO._MIMNv ._IK1gY,._RgYrf._dr-n4 ._emEqO._MIMNv ._Z1s-8,._RgYrf._dr-n4 ._IDnsP._MIMNv ._IDnsP,._RgYrf._dr-n4 ._IDnsP._MIMNv ._IK1gY,._RgYrf._dr-n4 ._IDnsP._MIMNv ._Z1s-8{background-color:rgba(11,110,208,.08)}._RgYrf._UVZyy:hover:not(._dr-n4) ._emEqO,._RgYrf._UVZyy:hover:not(._dr-n4) ._IDnsP{background-color:#f9f9f9}._RgYrf._UVZyy:active:not(._dr-n4)[\\:not-has\\(._IK1gY\\:active\\)] ._emEqO,._RgYrf._UVZyy:active:not(._dr-n4)[\\:not-has\\(._IK1gY\\:active\\)] ._IDnsP{background-color:#f3f3f3}._RgYrf._UVZyy:active:not(._dr-n4):not(._RgYrf._UVZyy:active:not(._dr-n4):has(._IK1gY:active)) ._emEqO,._RgYrf._UVZyy:active:not(._dr-n4):not(._RgYrf._UVZyy:active:not(._dr-n4):has(._IK1gY:active)) ._IDnsP{background-color:#f3f3f3}._RgYrf:focus{outline:none}._RgYrf.focus-visible ._emEqO:after,._RgYrf:focus-visible ._emEqO: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}._RgYrf.focus-visible ._emEqO:last-of-type:after,._RgYrf:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf.focus-visible ._emEqO:first-of-type:after,._RgYrf:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf.focus-visible ._emEqO._MIMNv:after,._RgYrf:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:0}._RgYrf:last-of-type:focus{outline:none}._RgYrf:last-of-type.focus-visible ._emEqO:after,._RgYrf:last-of-type:focus-visible ._emEqO: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}._RgYrf:last-of-type.focus-visible ._emEqO:last-of-type:after,._RgYrf:last-of-type:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf:last-of-type.focus-visible ._emEqO:first-of-type:after,._RgYrf:last-of-type:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf:last-of-type.focus-visible ._emEqO._MIMNv:after,._RgYrf:last-of-type:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:1px}._RgYrf:last-of-type ._Z1s-8:focus{outline:none}._RgYrf:last-of-type ._Z1s-8._-Wbvz.focus-visible:after,._RgYrf:last-of-type ._Z1s-8._-Wbvz:focus-visible:after,._RgYrf:last-of-type ._Z1s-8.focus-visible:after,._RgYrf:last-of-type ._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._RgYrf:first-of-type:focus{outline:none}._RgYrf:first-of-type.focus-visible ._emEqO:after,._RgYrf:first-of-type:focus-visible ._emEqO: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}._RgYrf:first-of-type.focus-visible ._emEqO:last-of-type:after,._RgYrf:first-of-type:focus-visible ._emEqO:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._RgYrf:first-of-type.focus-visible ._emEqO:first-of-type:after,._RgYrf:first-of-type:focus-visible ._emEqO:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._RgYrf:first-of-type.focus-visible ._emEqO._MIMNv:after,._RgYrf:first-of-type:focus-visible ._emEqO._MIMNv:after{right:-3px;bottom:0}._RgYrf:first-of-type ._Z1s-8:focus{outline:none}._RgYrf:first-of-type ._Z1s-8._-Wbvz.focus-visible:after,._RgYrf:first-of-type ._Z1s-8._-Wbvz:focus-visible:after,._RgYrf:first-of-type ._Z1s-8.focus-visible:after,._RgYrf:first-of-type ._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-rIFE{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}._-rIFE._sHukS{flex-grow:1}._-rIFE._YCbKv{cursor:pointer}._-rIFE._YCbKv:hover:not(._6XuZm){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-rIFE._YCbKv:active:not(._6XuZm){background-color:#f3f3f3}._-rIFE._btc1W:not(._6XuZm){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-rIFE._6XuZm{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-rIFE ._BGfCg{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-rIFE ._BGfCg._I-1M9{left:-1px}._-rIFE ._BGfCg._1DzLK{right:0}._-rIFE ._kbhqO{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-rIFE ._kbhqO._I-1M9{left:-2px}._-rIFE ._kbhqO._1DzLK{right:-1px}._-rIFE:first-of-type ._I-1M9._BGfCg{left:0;width:2px;border-left:1px solid #fff}._-rIFE:first-of-type ._I-1M9._kbhqO{left:0}._-rIFE:last-of-type ._1DzLK._BGfCg{right:0;width:2px;border-right:1px solid #fff}._-rIFE:last-of-type ._1DzLK._kbhqO{right:0}._-rIFE ._jcoB8{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-rIFE ._jcoB8 ._NJaGa{position:absolute;width:2px;right:2px;top:0;bottom:0}._-rIFE ._jcoB8 ._NJaGa._TDlFD{background-color:#0a6ed1}._-rIFE ._jcoB8:hover ._NJaGa:not(._TDlFD){background-color:#d9d9d9}._-rIFE ._hmV2T{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._-rIFE ._hmV2T._szN8q{flex-direction:row-reverse;justify-content:flex-start}._-rIFE ._hmV2T._szN8q ._TDaC6{margin:1px 7px 1px 1px}._-rIFE ._hmV2T ._LRDDY{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-rIFE ._hmV2T ._TDaC6{margin:1px 1px 1px 7px;flex-shrink:0}._-rIFE ._iJXYL{margin-left:6px;margin-right:4px;flex-shrink:0}._-rIFE ._4NBuh{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-rIFE:focus{outline:none}._-rIFE._-Wbvz.focus-visible:after,._-rIFE._-Wbvz:focus-visible:after,._-rIFE.focus-visible:after,._-rIFE:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-6p7E{margin-right:6px}._MIMNv{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._MIMNv[focus-within]{z-index:30}._MIMNv:focus-within{z-index:30}._Z1s-8{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}._Z1s-8 ._zkwgB{width:100%;padding:12px 12px 11px;overflow:hidden}._Z1s-8._6XuZm{background-color:#efefef;border-bottom-color:#dfdfe1}._Z1s-8._sHukS{flex-grow:1}._Z1s-8:focus{outline:none}._Z1s-8._-Wbvz.focus-visible:after,._Z1s-8._-Wbvz:focus-visible:after,._Z1s-8.focus-visible:after,._Z1s-8:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._IDnsP{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._IDnsP._4uXbD{border-bottom-color:#d9d9d9;background-color:#fff}._IK1gY{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}._IK1gY._4uXbD{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._IK1gY:focus input~span,._IK1gY:hover input~span{border-color:#0b6ed0}._IK1gY ._loWEJ{position:relative;display:inline-flex}._IK1gY ._loWEJ ._RZzpO{margin:0!important}._IK1gY ._loWEJ ._3kyKA{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._iet0L{justify-content:flex-start}._2HYkh{justify-content:center;text-align:center}._szN8q{justify-content:flex-end;text-align:right}._Jg5-k{display:none}._5TH-E{opacity:0;height:0;width:0;overflow:hidden}._5TH-E,._a1dhE{position:absolute}._a1dhE{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._iCIyt{width:246px}";
|
|
36
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$b);}
|
|
37
37
|
|
|
38
38
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
39
39
|
// Also Alignment, etc can be defined directly and have AdvancedTableColumnConfig use them instead of the reverse like now.
|
|
@@ -93,7 +93,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
93
93
|
"date-testid": menuItemDataTestId
|
|
94
94
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
95
95
|
size: "small",
|
|
96
|
-
className: styles$
|
|
96
|
+
className: styles$b.advancedTableColumnHeaderMenuItemIcon,
|
|
97
97
|
"aria-hidden": "true"
|
|
98
98
|
}), label);
|
|
99
99
|
};
|
|
@@ -145,7 +145,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
145
145
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Ascending))
|
|
146
146
|
}, /*#__PURE__*/React__default["default"].createElement(AscendingIconComponent, {
|
|
147
147
|
size: "small",
|
|
148
|
-
className: styles$
|
|
148
|
+
className: styles$b.advancedTableColumnHeaderMenuItemIcon,
|
|
149
149
|
"aria-hidden": "true"
|
|
150
150
|
}), ascendingLabel), /*#__PURE__*/React__default["default"].createElement(index.MenuItem, {
|
|
151
151
|
key: descendingValue,
|
|
@@ -154,7 +154,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
154
154
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Descending))
|
|
155
155
|
}, /*#__PURE__*/React__default["default"].createElement(DescendingIconComponent, {
|
|
156
156
|
size: "small",
|
|
157
|
-
className: styles$
|
|
157
|
+
className: styles$b.advancedTableColumnHeaderMenuItemIcon,
|
|
158
158
|
"aria-hidden": "true"
|
|
159
159
|
}), descendingLabel)];
|
|
160
160
|
}), (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default["default"].createElement(index.Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
@@ -403,7 +403,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
403
403
|
const selectedSortIcon = isSorted ? /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
404
404
|
"aria-hidden": "true",
|
|
405
405
|
focusable: "false",
|
|
406
|
-
className: styles$
|
|
406
|
+
className: styles$b.sortIcon,
|
|
407
407
|
width: "10",
|
|
408
408
|
height: "10",
|
|
409
409
|
viewBox: "0 0 10 10",
|
|
@@ -576,28 +576,28 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
576
576
|
onFocus: onFocus,
|
|
577
577
|
onClick: isSortable ? handleClick : undefined,
|
|
578
578
|
tabIndex: isFocused ? 0 : -1,
|
|
579
|
-
className: classNames__default["default"](styles$
|
|
580
|
-
[styles$
|
|
579
|
+
className: classNames__default["default"](styles$b.advancedTableColumnHeader, {
|
|
580
|
+
[styles$b.advancedTableRowChild]: !isPinned,
|
|
581
581
|
// if nested inside of pinned container, not a direct row child
|
|
582
|
-
[styles$
|
|
583
|
-
[styles$
|
|
584
|
-
[styles$
|
|
585
|
-
[styles$
|
|
586
|
-
[styles$
|
|
582
|
+
[styles$b.isSortable]: isSortable,
|
|
583
|
+
[styles$b.isSorted]: isSorted,
|
|
584
|
+
[styles$b.showFocusRing]: isHiddenMenuOpen,
|
|
585
|
+
[styles$b.isDragging]: isDragging,
|
|
586
|
+
[styles$b.fillRemainingSpace]: width === undefined
|
|
587
587
|
}),
|
|
588
588
|
style: {
|
|
589
589
|
width: computedWidth
|
|
590
590
|
},
|
|
591
591
|
ref: index.mergeRefs(columnHeaderRef, dragRef, dropRef, ref)
|
|
592
592
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
593
|
-
className: classNames__default["default"](styles$
|
|
594
|
-
[styles$
|
|
595
|
-
[styles$
|
|
596
|
-
[styles$
|
|
593
|
+
className: classNames__default["default"](styles$b.advancedTableColumnHeaderLabel, {
|
|
594
|
+
[styles$b.leftAligned]: alignment === 'left',
|
|
595
|
+
[styles$b.centerAligned]: alignment === 'center',
|
|
596
|
+
[styles$b.rightAligned]: alignment === 'right'
|
|
597
597
|
}),
|
|
598
598
|
ref: labelContainerRef
|
|
599
599
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
600
|
-
className: styles$
|
|
600
|
+
className: styles$b.advancedTableColumnHeaderLabelText,
|
|
601
601
|
style: {
|
|
602
602
|
WebkitLineClamp: headerMaxLines
|
|
603
603
|
},
|
|
@@ -608,7 +608,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
608
608
|
anchor: /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
609
609
|
tabIndex: -1,
|
|
610
610
|
"aria-hidden": "true",
|
|
611
|
-
className: styles$
|
|
611
|
+
className: styles$b.advancedTableColumnHeaderMenu
|
|
612
612
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, null))
|
|
613
613
|
})), /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaderMenu, _extends__default["default"]({}, commonMenuProps, {
|
|
614
614
|
isOpen: isHiddenMenuOpen,
|
|
@@ -622,31 +622,31 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
622
622
|
var _columnHeaderRef$curr5;
|
|
623
623
|
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
624
624
|
},
|
|
625
|
-
className: styles$
|
|
625
|
+
className: styles$b.advancedTableColumnHeaderMenuHiddenAnchor
|
|
626
626
|
})
|
|
627
627
|
}))), dropTargetSide && !isRowActionMenuColumn && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
628
|
-
className: classNames__default["default"](styles$
|
|
629
|
-
[styles$
|
|
630
|
-
[styles$
|
|
628
|
+
className: classNames__default["default"](styles$b.dropTargetLine, {
|
|
629
|
+
[styles$b.dropTargetLeft]: dropTargetSide === 'left',
|
|
630
|
+
[styles$b.dropTargetRight]: dropTargetSide === 'right'
|
|
631
631
|
}),
|
|
632
632
|
style: {
|
|
633
633
|
height: tableHeight
|
|
634
634
|
}
|
|
635
635
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
636
|
-
className: classNames__default["default"](styles$
|
|
637
|
-
[styles$
|
|
638
|
-
[styles$
|
|
636
|
+
className: classNames__default["default"](styles$b.dropTargetMarker, {
|
|
637
|
+
[styles$b.dropTargetLeft]: dropTargetSide === 'left',
|
|
638
|
+
[styles$b.dropTargetRight]: dropTargetSide === 'right'
|
|
639
639
|
})
|
|
640
640
|
})), onWidthChange && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
641
641
|
"aria-hidden": true,
|
|
642
|
-
className: styles$
|
|
642
|
+
className: styles$b.resizeHandle,
|
|
643
643
|
style: {
|
|
644
644
|
height: tableHeight
|
|
645
645
|
},
|
|
646
646
|
onMouseDown: handleMouseDown
|
|
647
647
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
648
|
-
className: classNames__default["default"](styles$
|
|
649
|
-
[styles$
|
|
648
|
+
className: classNames__default["default"](styles$b.resizeLine, {
|
|
649
|
+
[styles$b.isResizing]: isResizing
|
|
650
650
|
})
|
|
651
651
|
}))));
|
|
652
652
|
});
|
|
@@ -719,19 +719,19 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
719
719
|
onFocus: handleFocus,
|
|
720
720
|
onBlur: handleBlur,
|
|
721
721
|
tabIndex: isFocused && !isEditing ? 0 : -1,
|
|
722
|
-
className: classNames__default["default"](className, styles$
|
|
723
|
-
[styles$
|
|
724
|
-
[styles$
|
|
725
|
-
[styles$
|
|
726
|
-
[styles$
|
|
727
|
-
[styles$
|
|
722
|
+
className: classNames__default["default"](className, styles$b.advancedTableCell, {
|
|
723
|
+
[styles$b.leftAligned]: alignment === Alignments.Left,
|
|
724
|
+
[styles$b.centerAligned]: alignment === Alignments.Center,
|
|
725
|
+
[styles$b.rightAligned]: alignment === Alignments.Right,
|
|
726
|
+
[styles$b.isDragging]: isDragging,
|
|
727
|
+
[styles$b.fillRemainingSpace]: width === undefined
|
|
728
728
|
}),
|
|
729
729
|
style: {
|
|
730
730
|
width: computedWidth
|
|
731
731
|
},
|
|
732
732
|
ref: index.mergeRefs(ref, cellRef)
|
|
733
733
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
734
|
-
className: styles$
|
|
734
|
+
className: styles$b.advancedTableCellContainer
|
|
735
735
|
}, typeof renderCellContent === 'function' ? renderCellContent({
|
|
736
736
|
value,
|
|
737
737
|
setValue,
|
|
@@ -766,9 +766,9 @@ const AdvancedTableRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
766
766
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
767
767
|
onFocus: isFocusable ? onFocus : undefined,
|
|
768
768
|
onClick: hasOnRowSelect ? onClick : undefined,
|
|
769
|
-
className: classNames__default["default"](styles$
|
|
770
|
-
[styles$
|
|
771
|
-
[styles$
|
|
769
|
+
className: classNames__default["default"](styles$b.advancedTableRow, {
|
|
770
|
+
[styles$b.hasRowAction]: hasOnRowSelect,
|
|
771
|
+
[styles$b.isSelected]: hasOnRowSelect && isSelected
|
|
772
772
|
}),
|
|
773
773
|
ref: isFocusable ? ref : undefined
|
|
774
774
|
}), children);
|
|
@@ -788,7 +788,7 @@ const AdvancedTableColumnHeaders = /*#__PURE__*/React.forwardRef((_ref, ref) =>
|
|
|
788
788
|
tabIndex: isFocusable ? isFocused ? 0 : -1 : undefined,
|
|
789
789
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
790
790
|
onFocus: isFocusable ? onFocus : undefined,
|
|
791
|
-
className: styles$
|
|
791
|
+
className: styles$b.advancedTableColumnHeaders,
|
|
792
792
|
ref: ref
|
|
793
793
|
}), children);
|
|
794
794
|
});
|
|
@@ -799,7 +799,9 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
799
799
|
state,
|
|
800
800
|
onClick,
|
|
801
801
|
variant = 'cell',
|
|
802
|
-
isRowFocused
|
|
802
|
+
isRowFocused,
|
|
803
|
+
className,
|
|
804
|
+
isDisabled
|
|
803
805
|
} = _ref;
|
|
804
806
|
const {
|
|
805
807
|
translate
|
|
@@ -820,17 +822,18 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
820
822
|
}, [isRowFocused, announceToScreenReader, label]);
|
|
821
823
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
822
824
|
onClick: onClick,
|
|
823
|
-
className: classNames__default["default"](styles$
|
|
824
|
-
[styles$
|
|
825
|
+
className: classNames__default["default"](styles$b.advancedTableCheckbox, className, {
|
|
826
|
+
[styles$b.header]: variant === 'header'
|
|
825
827
|
}),
|
|
826
828
|
role: "presentation"
|
|
827
829
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
828
|
-
className: styles$
|
|
830
|
+
className: styles$b.checkboxContainer
|
|
829
831
|
}, /*#__PURE__*/React__default["default"].createElement(index.VisualCheckbox, {
|
|
830
|
-
className: styles$
|
|
831
|
-
checked: state === 'true'
|
|
832
|
+
className: styles$b.checkbox,
|
|
833
|
+
checked: state === 'true',
|
|
834
|
+
disabled: isDisabled
|
|
832
835
|
}), state === 'mixed' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
833
|
-
className: styles$
|
|
836
|
+
className: styles$b.mixed
|
|
834
837
|
})));
|
|
835
838
|
};
|
|
836
839
|
|
|
@@ -843,7 +846,7 @@ const AdvancedTableHiddenDescription = _ref => {
|
|
|
843
846
|
translate
|
|
844
847
|
} = index.useTranslation();
|
|
845
848
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
846
|
-
className: styles$
|
|
849
|
+
className: styles$b.hiddenDescription,
|
|
847
850
|
id: id
|
|
848
851
|
}, translate(messageKey));
|
|
849
852
|
};
|
|
@@ -866,7 +869,7 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
866
869
|
const top = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.y) || 0;
|
|
867
870
|
const left = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.x) || 0;
|
|
868
871
|
return /*#__PURE__*/React__default["default"].createElement(index.Portal, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
869
|
-
className: styles$
|
|
872
|
+
className: styles$b.dragPreview,
|
|
870
873
|
style: {
|
|
871
874
|
height,
|
|
872
875
|
width,
|
|
@@ -895,9 +898,9 @@ const AdvancedTablePagination = _ref => {
|
|
|
895
898
|
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange(page);
|
|
896
899
|
};
|
|
897
900
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
898
|
-
className: styles$
|
|
901
|
+
className: styles$b.advancedTablePaginationContainer
|
|
899
902
|
}, /*#__PURE__*/React__default["default"].createElement(index.Pagination, {
|
|
900
|
-
className: styles$
|
|
903
|
+
className: styles$b.advancedTablePagination,
|
|
901
904
|
"aria-label": ariaLabel,
|
|
902
905
|
numPages: Math.max(Math.ceil(rows.length / rowsPerPage), 1),
|
|
903
906
|
currentPage: currentPage,
|
|
@@ -1042,7 +1045,7 @@ const AdvancedTable = _ref => {
|
|
|
1042
1045
|
}
|
|
1043
1046
|
}
|
|
1044
1047
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1045
|
-
className: styles$
|
|
1048
|
+
className: styles$b.rowActionMenuPane
|
|
1046
1049
|
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1047
1050
|
var _actionGroup$actions;
|
|
1048
1051
|
const row = rows[rowIndex];
|
|
@@ -1449,8 +1452,8 @@ const AdvancedTable = _ref => {
|
|
|
1449
1452
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
1450
1453
|
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1451
1454
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1452
|
-
className: classNames__default["default"](styles$
|
|
1453
|
-
[styles$
|
|
1455
|
+
className: classNames__default["default"](styles$b.advancedTableExpandRowSpacer, {
|
|
1456
|
+
[styles$b.header]: inHeader
|
|
1454
1457
|
}),
|
|
1455
1458
|
style: {
|
|
1456
1459
|
width
|
|
@@ -1497,7 +1500,7 @@ const AdvancedTable = _ref => {
|
|
|
1497
1500
|
backend: reactDndHtml5Backend.HTML5Backend,
|
|
1498
1501
|
context: index.canUseDOM() ? window : undefined
|
|
1499
1502
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1500
|
-
className: styles$
|
|
1503
|
+
className: styles$b.advancedTable,
|
|
1501
1504
|
ref: tableRef
|
|
1502
1505
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1503
1506
|
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
@@ -1522,7 +1525,7 @@ const AdvancedTable = _ref => {
|
|
|
1522
1525
|
messageKey: "advancedTable.rowCheckboxDescription"
|
|
1523
1526
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1524
1527
|
role: "rowgroup",
|
|
1525
|
-
className: classNames__default["default"](styles$
|
|
1528
|
+
className: classNames__default["default"](styles$b.advancedTableColumnHeadersRowGroup, styles$b.advancedTableRowGroup)
|
|
1526
1529
|
}, /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaders, {
|
|
1527
1530
|
"aria-rowindex": hasExpandableRows ? undefined : 1,
|
|
1528
1531
|
"aria-level": hasExpandableRows ? 1 : undefined // aria-level is one-indexed
|
|
@@ -1538,7 +1541,7 @@ const AdvancedTable = _ref => {
|
|
|
1538
1541
|
ref: createRef(headerRowIndex, -1)
|
|
1539
1542
|
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1540
1543
|
role: "presentation",
|
|
1541
|
-
className: classNames__default["default"](styles$
|
|
1544
|
+
className: classNames__default["default"](styles$b.pinnedContainer, styles$b.advancedTableRowChild),
|
|
1542
1545
|
ref: createPinnedContainerRef(headerRowIndex)
|
|
1543
1546
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1544
1547
|
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
@@ -1553,7 +1556,7 @@ const AdvancedTable = _ref => {
|
|
|
1553
1556
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1554
1557
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1555
1558
|
role: "rowgroup",
|
|
1556
|
-
className: styles$
|
|
1559
|
+
className: styles$b.advancedTableRowGroup
|
|
1557
1560
|
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
1558
1561
|
const {
|
|
1559
1562
|
id: rowId,
|
|
@@ -1603,7 +1606,7 @@ const AdvancedTable = _ref => {
|
|
|
1603
1606
|
"aria-setsize": hasExpandableRows ? depthSize : undefined,
|
|
1604
1607
|
"aria-posinset": hasExpandableRows ? depthIndex + 1 : undefined // aria-posinset is one-indexed
|
|
1605
1608
|
}), hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1606
|
-
className: classNames__default["default"](styles$
|
|
1609
|
+
className: classNames__default["default"](styles$b.pinnedContainer, styles$b.advancedTableRowChild),
|
|
1607
1610
|
ref: createPinnedContainerRef(paginatedRowIndex)
|
|
1608
1611
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1609
1612
|
state: getCheckboxStateForRow(row),
|
|
@@ -1626,7 +1629,7 @@ const AdvancedTable = _ref => {
|
|
|
1626
1629
|
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
1627
1630
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth, rowPropReference);
|
|
1628
1631
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1629
|
-
className: styles$
|
|
1632
|
+
className: styles$b.advancedTableRowChild,
|
|
1630
1633
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1631
1634
|
,
|
|
1632
1635
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
@@ -1819,10 +1822,10 @@ function mapExternalRowToInternalRows(row, depthSize, depthIndex, parentId) {
|
|
|
1819
1822
|
|
|
1820
1823
|
/* eslint-disable import/prefer-default-export */
|
|
1821
1824
|
|
|
1822
|
-
var css_248z$
|
|
1823
|
-
var styles$
|
|
1824
|
-
var stylesheet$
|
|
1825
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
1825
|
+
var css_248z$a = "._9eges{display:inline-block;width:36px;transition:width .25s ease-out}._Pv368{width:100%}._mBNFa>input{padding-right:0!important}._tnxZ0>svg{fill:#515559}";
|
|
1826
|
+
var styles$a = {"collapsibleSearchInput":"_9eges","searchInput":"_Pv368","searchInputCollapsed":"_mBNFa","iconButton":"_tnxZ0"};
|
|
1827
|
+
var stylesheet$a="._9eges{display:inline-block;width:36px;transition:width .25s ease-out}._Pv368{width:100%}._mBNFa>input{padding-right:0!important}._tnxZ0>svg{fill:#515559}";
|
|
1828
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$a);}
|
|
1826
1829
|
|
|
1827
1830
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1828
1831
|
let {
|
|
@@ -1835,7 +1838,7 @@ const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, re
|
|
|
1835
1838
|
} = index.useTranslation();
|
|
1836
1839
|
const label = translate('collapsibleSearchInput.openSearchField');
|
|
1837
1840
|
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, _extends__default["default"]({}, rest, {
|
|
1838
|
-
className: styles$
|
|
1841
|
+
className: styles$a.iconButton,
|
|
1839
1842
|
"aria-label": label,
|
|
1840
1843
|
tooltipContent: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
|
|
1841
1844
|
tooltipPlacement: tooltipPlacement,
|
|
@@ -1936,7 +1939,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1936
1939
|
onFocus: handleContainerFocus,
|
|
1937
1940
|
onBlur: handleContainerBlur,
|
|
1938
1941
|
onTransitionEnd: handleContainerTransitionEnd,
|
|
1939
|
-
className: styles$
|
|
1942
|
+
className: styles$a.collapsibleSearchInput,
|
|
1940
1943
|
style: {
|
|
1941
1944
|
width: externalIsExpanded ? widthWhenExpanded : undefined
|
|
1942
1945
|
},
|
|
@@ -1950,8 +1953,8 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1950
1953
|
"aria-label": searchInputAriaLabel,
|
|
1951
1954
|
"aria-labelledby": searchInputAriaLabelledBy,
|
|
1952
1955
|
"aria-describedby": searchInputAriaDescribedBy,
|
|
1953
|
-
className: classNames__default["default"](styles$
|
|
1954
|
-
[styles$
|
|
1956
|
+
className: classNames__default["default"](styles$a.searchInput, {
|
|
1957
|
+
[styles$a.searchInputCollapsed]: internalExpandedState !== expandedStates.EXPANDED
|
|
1955
1958
|
}),
|
|
1956
1959
|
"data-testid": index.getSubDataTestId(dataTestId, 'SearchInput'),
|
|
1957
1960
|
ref: searchInputRef
|
|
@@ -1962,10 +1965,10 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1962
1965
|
}));
|
|
1963
1966
|
});
|
|
1964
1967
|
|
|
1965
|
-
var css_248z$
|
|
1966
|
-
var styles$
|
|
1967
|
-
var stylesheet$
|
|
1968
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
1968
|
+
var css_248z$9 = "._HPfzi input{padding-left:76px!important}._66Idh input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._66Idh input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._66Idh input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._dQNnM{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._dQNnM,._dQNnM._66Idh:hover{background-color:transparent!important}._dQNnM:hover{background-color:rgba(50,54,58,.08)!important}._dQNnM:active{background-color:rgba(50,54,58,.11)!important}._dQNnM svg{top:2px!important}._HVMkk{position:relative}._glnNQ{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1969
|
+
var styles$9 = {"input":"_HPfzi","disabled":"_66Idh","dropdown":"_dQNnM","container":"_HVMkk","countryCode":"_glnNQ"};
|
|
1970
|
+
var stylesheet$9="._HPfzi input{padding-left:76px!important}._66Idh input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._66Idh input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._66Idh input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._dQNnM{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._dQNnM,._dQNnM._66Idh:hover{background-color:transparent!important}._dQNnM:hover{background-color:rgba(50,54,58,.08)!important}._dQNnM:active{background-color:rgba(50,54,58,.11)!important}._dQNnM svg{top:2px!important}._HVMkk{position:relative}._glnNQ{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
1971
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$9);}
|
|
1969
1972
|
|
|
1970
1973
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1971
1974
|
let {
|
|
@@ -2025,21 +2028,21 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2025
2028
|
}
|
|
2026
2029
|
onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2027
2030
|
};
|
|
2028
|
-
const inputClassNames = classNames__default["default"](styles$
|
|
2029
|
-
[styles$
|
|
2031
|
+
const inputClassNames = classNames__default["default"](styles$9.input, {
|
|
2032
|
+
[styles$9.disabled]: isDisabled
|
|
2030
2033
|
});
|
|
2031
2034
|
const dropdownLabel = React.useMemo(() => countryCode ? "+".concat(libphonenumberJs.getCountryCallingCode(countryCode)) : undefined, [countryCode]);
|
|
2032
2035
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2033
|
-
className: styles$
|
|
2036
|
+
className: styles$9.container,
|
|
2034
2037
|
"data-testid": dataTestId
|
|
2035
2038
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2036
|
-
className: styles$
|
|
2039
|
+
className: styles$9.countryCode
|
|
2037
2040
|
}, dropdownLabel), /*#__PURE__*/React__default["default"].createElement(index.SelectMenu, {
|
|
2038
2041
|
label: " ",
|
|
2039
2042
|
defaultValue: countryCode,
|
|
2040
2043
|
onChange: value => setCountryCode(value),
|
|
2041
|
-
className: classNames__default["default"](styles$
|
|
2042
|
-
[styles$
|
|
2044
|
+
className: classNames__default["default"](styles$9.dropdown, {
|
|
2045
|
+
[styles$9.disabled]: isDisabled
|
|
2043
2046
|
}),
|
|
2044
2047
|
searchable: true,
|
|
2045
2048
|
disabled: isDisabled,
|
|
@@ -2684,10 +2687,10 @@ function Combobox(_ref) {
|
|
|
2684
2687
|
}, children);
|
|
2685
2688
|
}
|
|
2686
2689
|
|
|
2687
|
-
var css_248z$
|
|
2688
|
-
var styles$
|
|
2689
|
-
var stylesheet$
|
|
2690
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
2690
|
+
var css_248z$8 = "._cp947 :after{background-color:#515559!important}._ujjjX>input:focus{box-shadow:none!important;border:1px solid #898989!important}._dqRZX{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}._dqRZX ._fiiAS ._Hx3Ix{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}._dqRZX ._fiiAS:first-child ._brnAc{display:none}._dqRZX ._AbT11{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._dqRZX ._AbT11:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._dqRZX ._AbT11:hover._cbqy2{background-color:#e4effa}._dqRZX ._AbT11._cbqy2{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._dqRZX ._AbT11:active:not(._cbqy2){background-color:#e8e9e9}";
|
|
2691
|
+
var styles$8 = {"loadingSpinner":"_cp947","ignoreFocusStyle":"_ujjjX","flyout":"_dqRZX","group":"_fiiAS","header":"_Hx3Ix","divider":"_brnAc","option":"_AbT11","selected":"_cbqy2"};
|
|
2692
|
+
var stylesheet$8="._cp947 :after{background-color:#515559!important}._ujjjX>input:focus{box-shadow:none!important;border:1px solid #898989!important}._dqRZX{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}._dqRZX ._fiiAS ._Hx3Ix{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}._dqRZX ._fiiAS:first-child ._brnAc{display:none}._dqRZX ._AbT11{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._dqRZX ._AbT11:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._dqRZX ._AbT11:hover._cbqy2{background-color:#e4effa}._dqRZX ._AbT11._cbqy2{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._dqRZX ._AbT11:active:not(._cbqy2){background-color:#e8e9e9}";
|
|
2693
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$8);}
|
|
2691
2694
|
|
|
2692
2695
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2693
2696
|
let {
|
|
@@ -2791,7 +2794,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2791
2794
|
return /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
2792
2795
|
role: "combobox",
|
|
2793
2796
|
className: classNames__default["default"](className, {
|
|
2794
|
-
[styles$
|
|
2797
|
+
[styles$8.ignoreFocusStyle]: hoveredOption || activeDescendantElement
|
|
2795
2798
|
}),
|
|
2796
2799
|
style: style,
|
|
2797
2800
|
id: id,
|
|
@@ -2804,7 +2807,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2804
2807
|
},
|
|
2805
2808
|
leftAddOn: leftAddOn,
|
|
2806
2809
|
rightAddOn: isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
2807
|
-
className: styles$
|
|
2810
|
+
className: styles$8.loadingSpinner,
|
|
2808
2811
|
size: "xs",
|
|
2809
2812
|
show: isLoading,
|
|
2810
2813
|
"aria-hidden": true
|
|
@@ -2861,7 +2864,7 @@ const ComboboxFlyout = _ref => {
|
|
|
2861
2864
|
popper: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2862
2865
|
role: "listbox",
|
|
2863
2866
|
id: flyoutId,
|
|
2864
|
-
className: styles$
|
|
2867
|
+
className: styles$8.flyout,
|
|
2865
2868
|
style: flyoutDimensions,
|
|
2866
2869
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
2867
2870
|
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
@@ -2913,16 +2916,16 @@ function ComboboxGroup(_ref) {
|
|
|
2913
2916
|
}, children);
|
|
2914
2917
|
return hasFilteredOptions ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2915
2918
|
role: "group",
|
|
2916
|
-
className: styles$
|
|
2919
|
+
className: styles$8.group,
|
|
2917
2920
|
"aria-labelledby": headerElementId,
|
|
2918
2921
|
"aria-describedby": ariaDescribedBy,
|
|
2919
2922
|
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
2920
2923
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
2921
|
-
className: styles$
|
|
2924
|
+
className: styles$8.divider
|
|
2922
2925
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2923
2926
|
"aria-hidden": "true",
|
|
2924
2927
|
id: headerElementId,
|
|
2925
|
-
className: styles$
|
|
2928
|
+
className: styles$8.header
|
|
2926
2929
|
}, 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
|
|
2927
2930
|
;
|
|
2928
2931
|
}
|
|
@@ -2974,8 +2977,8 @@ function ComboboxOption(_ref) {
|
|
|
2974
2977
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2975
2978
|
role: "option",
|
|
2976
2979
|
id: containerId,
|
|
2977
|
-
className: classNames__default["default"](styles$
|
|
2978
|
-
[styles$
|
|
2980
|
+
className: classNames__default["default"](styles$8.option, {
|
|
2981
|
+
[styles$8.selected]: isOptionSelected
|
|
2979
2982
|
}),
|
|
2980
2983
|
onClick: () => {
|
|
2981
2984
|
setCommittedInputValue(label);
|
|
@@ -2992,10 +2995,10 @@ function ComboboxOption(_ref) {
|
|
|
2992
2995
|
}, label);
|
|
2993
2996
|
}
|
|
2994
2997
|
|
|
2995
|
-
var css_248z$
|
|
2996
|
-
var styles$
|
|
2997
|
-
var stylesheet$
|
|
2998
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
2998
|
+
var css_248z$7 = "._Rx-nX{display:flex}._Lj2Kf{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Lj2Kf._wfCKt{background-color:#fff}._Lj2Kf._t6cU0,._Lj2Kf._wfCKt._fIYt0.focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._fIYt0:focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._l-E8K:not(._Lj2Kf._wfCKt._WnhfG){background-color:#0b6ed0}._Lj2Kf._t6cU0._aqQ3G._fIYt0,._Lj2Kf._t6cU0._aqQ3G._WnhfG,._Lj2Kf._t6cU0._WnhfG._l-E8K{opacity:.4}._fH7iP{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._fH7iP:focus{z-index:1}._akwM4{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}._akwM4 svg{margin-left:1px}._akwM4._wfCKt{background-color:#0b6ed0;border-color:transparent}._akwM4._wfCKt svg{fill:#fff!important}._akwM4._wfCKt:not(._IFhBg):hover{background-color:#085caf!important}._akwM4._wfCKt:not(._IFhBg):active{background-color:#0854a1!important}._akwM4._wfCKt._IFhBg{opacity:.4}._akwM4._wfCKt._IFhBg svg{background-color:transparent}._akwM4._t6cU0{border-color:#0b6ed0;background-color:#fff}._akwM4._t6cU0 svg{fill:#0b6ed0!important}._akwM4._t6cU0:not(._IFhBg):hover{background-color:#eef5fc!important}._akwM4._t6cU0:not(._IFhBg):active{background-color:#e1edf9!important}._akwM4._t6cU0._IFhBg{opacity:.4}._akwM4._t6cU0._IFhBg svg{background-color:transparent}._xmOTE{width:260px}";
|
|
2999
|
+
var styles$7 = {"container":"_Rx-nX","divider":"_Lj2Kf","primary":"_wfCKt","mainButtonFocus":"_fIYt0","mainButtonDisabled":"_aqQ3G","dropdownButtonFocus":"_l-E8K","dropdownButtonDisabled":"_WnhfG","secondary":"_t6cU0","mainButton":"_fH7iP","dropdownButton":"_akwM4","disabled":"_IFhBg","dropdownOption":"_xmOTE"};
|
|
3000
|
+
var stylesheet$7="._Rx-nX{display:flex}._Lj2Kf{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Lj2Kf._wfCKt{background-color:#fff}._Lj2Kf._t6cU0,._Lj2Kf._wfCKt._fIYt0.focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._fIYt0:focus-visible:not(._aqQ3G),._Lj2Kf._wfCKt._l-E8K:not(._Lj2Kf._wfCKt._WnhfG){background-color:#0b6ed0}._Lj2Kf._t6cU0._aqQ3G._fIYt0,._Lj2Kf._t6cU0._aqQ3G._WnhfG,._Lj2Kf._t6cU0._WnhfG._l-E8K{opacity:.4}._fH7iP{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._fH7iP:focus{z-index:1}._akwM4{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}._akwM4 svg{margin-left:1px}._akwM4._wfCKt{background-color:#0b6ed0;border-color:transparent}._akwM4._wfCKt svg{fill:#fff!important}._akwM4._wfCKt:not(._IFhBg):hover{background-color:#085caf!important}._akwM4._wfCKt:not(._IFhBg):active{background-color:#0854a1!important}._akwM4._wfCKt._IFhBg{opacity:.4}._akwM4._wfCKt._IFhBg svg{background-color:transparent}._akwM4._t6cU0{border-color:#0b6ed0;background-color:#fff}._akwM4._t6cU0 svg{fill:#0b6ed0!important}._akwM4._t6cU0:not(._IFhBg):hover{background-color:#eef5fc!important}._akwM4._t6cU0:not(._IFhBg):active{background-color:#e1edf9!important}._akwM4._t6cU0._IFhBg{opacity:.4}._akwM4._t6cU0._IFhBg svg{background-color:transparent}._xmOTE{width:260px}";
|
|
3001
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$7);}
|
|
2999
3002
|
|
|
3000
3003
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3001
3004
|
let {
|
|
@@ -3028,14 +3031,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3028
3031
|
});
|
|
3029
3032
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3030
3033
|
"data-testid": dataTestId,
|
|
3031
|
-
className: classNames__default["default"](styles$
|
|
3034
|
+
className: classNames__default["default"](styles$7.container, className),
|
|
3032
3035
|
ref: ref
|
|
3033
3036
|
}, /*#__PURE__*/React__default["default"].createElement(index.Button, {
|
|
3034
3037
|
kind: kind,
|
|
3035
3038
|
"data-testid": index.getSubDataTestId(dataTestId, 'button'),
|
|
3036
|
-
className: classNames__default["default"](styles$
|
|
3037
|
-
[styles$
|
|
3038
|
-
[styles$
|
|
3039
|
+
className: classNames__default["default"](styles$7.mainButton, {
|
|
3040
|
+
[styles$7.disabled]: isButtonDisabled,
|
|
3041
|
+
[styles$7.primary]: kind === 'primary'
|
|
3039
3042
|
}),
|
|
3040
3043
|
onClick: onClick,
|
|
3041
3044
|
disabled: isButtonDisabled,
|
|
@@ -3046,13 +3049,13 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3046
3049
|
onFocus: () => setMainButtonHasFocus(true),
|
|
3047
3050
|
onBlur: () => setMainButtonHasFocus(false)
|
|
3048
3051
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3049
|
-
className: classNames__default["default"](styles$
|
|
3050
|
-
[styles$
|
|
3051
|
-
[styles$
|
|
3052
|
-
[styles$
|
|
3053
|
-
[styles$
|
|
3054
|
-
[styles$
|
|
3055
|
-
[styles$
|
|
3052
|
+
className: classNames__default["default"](styles$7.divider, {
|
|
3053
|
+
[styles$7.primary]: kind === 'primary',
|
|
3054
|
+
[styles$7.secondary]: kind === 'secondary',
|
|
3055
|
+
[styles$7.mainButtonFocus]: mainButtonHasFocus,
|
|
3056
|
+
[styles$7.dropdownButtonFocus]: dropdownButtonHasFocus,
|
|
3057
|
+
[styles$7.mainButtonDisabled]: isButtonDisabled,
|
|
3058
|
+
[styles$7.dropdownButtonDisabled]: isDropdownDisabled
|
|
3056
3059
|
})
|
|
3057
3060
|
}), /*#__PURE__*/React__default["default"].createElement(index.Dropdown, {
|
|
3058
3061
|
"data-testid": index.getSubDataTestId(dataTestId, 'dropdown'),
|
|
@@ -3064,10 +3067,10 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3064
3067
|
// `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
3065
3068
|
, {
|
|
3066
3069
|
label: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null),
|
|
3067
|
-
className: classNames__default["default"](styles$
|
|
3068
|
-
[styles$
|
|
3069
|
-
[styles$
|
|
3070
|
-
[styles$
|
|
3070
|
+
className: classNames__default["default"](styles$7.dropdownButton, {
|
|
3071
|
+
[styles$7.disabled]: isDropdownDisabled,
|
|
3072
|
+
[styles$7.primary]: kind === 'primary',
|
|
3073
|
+
[styles$7.secondary]: kind === 'secondary'
|
|
3071
3074
|
}),
|
|
3072
3075
|
ref: dropdownButtonRef,
|
|
3073
3076
|
tabIndex: -1,
|
|
@@ -3089,15 +3092,15 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3089
3092
|
label: "",
|
|
3090
3093
|
disabled: isDisabled,
|
|
3091
3094
|
onSelect: onClick,
|
|
3092
|
-
className: styles$
|
|
3095
|
+
className: styles$7.dropdownOption,
|
|
3093
3096
|
ref: ref
|
|
3094
3097
|
}, children);
|
|
3095
3098
|
});
|
|
3096
3099
|
|
|
3097
|
-
var css_248z$
|
|
3098
|
-
var styles$
|
|
3099
|
-
var stylesheet$
|
|
3100
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
3100
|
+
var css_248z$6 = "._m5ztD{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}._m5ztD:hover:not(._aZl-s){background-color:rgba(50,54,58,.08)}._m5ztD:hover:not(._aZl-s)._fwwx7{border-color:#085caf;background-color:rgba(11,110,208,.04)}._m5ztD:hover:not(._aZl-s)._fwwx7 ._748kD{color:#32363a}._m5ztD:hover:not(._aZl-s)._fwwx7 ._Sr5--{fill:#32363a}._m5ztD:hover:not(._aZl-s)._fwwx7 ._GwLBi{fill:#085caf}._m5ztD:hover:not(._aZl-s)._fwwx7 ._whzW2{background-color:rgba(11,110,208,.11)}._m5ztD:hover:not(._aZl-s)._fwwx7 ._whzW2 ._a-qvX{color:#085caf}._m5ztD:active:not(._aZl-s){background-color:#e8e9e9}._m5ztD:active:not(._aZl-s)._fwwx7{background-color:rgba(11,110,208,.11);border-color:#0854a1}._m5ztD:active:not(._aZl-s)._fwwx7 ._GwLBi{fill:#0854a1}._m5ztD:active:not(._aZl-s)._fwwx7 ._whzW2{background-color:rgba(11,110,208,.11)}._m5ztD:active:not(._aZl-s)._fwwx7 ._whzW2 ._a-qvX{color:#0854a1}._m5ztD._aZl-s{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._m5ztD._fwwx7{border-color:#0b6ed0}._Sr5--{fill:#515559;margin-right:4px}._748kD{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._748kD+._whzW2{margin-left:6px}._748kD._aZl-s{color:#74777a}._whzW2{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}._a-qvX{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._GwLBi{fill:#515559}._GwLBi._aZl-s,._GwLBi._aZl-s._fwwx7{fill:rgba(116,119,122,.4)}._GwLBi._fwwx7{fill:#0b6ed0}._GwLBi._ilHGO{transform:rotate(-180deg)}._m5ztD.focus-visible,._m5ztD:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3101
|
+
var styles$6 = {"button":"_m5ztD","disabled":"_aZl-s","selected":"_fwwx7","label":"_748kD","lockIcon":"_Sr5--","chevronIcon":"_GwLBi","selectedFiltersContainer":"_whzW2","selectedFilters":"_a-qvX","open":"_ilHGO"};
|
|
3102
|
+
var stylesheet$6="._m5ztD{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}._m5ztD:hover:not(._aZl-s){background-color:rgba(50,54,58,.08)}._m5ztD:hover:not(._aZl-s)._fwwx7{border-color:#085caf;background-color:rgba(11,110,208,.04)}._m5ztD:hover:not(._aZl-s)._fwwx7 ._748kD{color:#32363a}._m5ztD:hover:not(._aZl-s)._fwwx7 ._Sr5--{fill:#32363a}._m5ztD:hover:not(._aZl-s)._fwwx7 ._GwLBi{fill:#085caf}._m5ztD:hover:not(._aZl-s)._fwwx7 ._whzW2{background-color:rgba(11,110,208,.11)}._m5ztD:hover:not(._aZl-s)._fwwx7 ._whzW2 ._a-qvX{color:#085caf}._m5ztD:active:not(._aZl-s){background-color:#e8e9e9}._m5ztD:active:not(._aZl-s)._fwwx7{background-color:rgba(11,110,208,.11);border-color:#0854a1}._m5ztD:active:not(._aZl-s)._fwwx7 ._GwLBi{fill:#0854a1}._m5ztD:active:not(._aZl-s)._fwwx7 ._whzW2{background-color:rgba(11,110,208,.11)}._m5ztD:active:not(._aZl-s)._fwwx7 ._whzW2 ._a-qvX{color:#0854a1}._m5ztD._aZl-s{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._m5ztD._fwwx7{border-color:#0b6ed0}._Sr5--{fill:#515559;margin-right:4px}._748kD{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._748kD+._whzW2{margin-left:6px}._748kD._aZl-s{color:#74777a}._whzW2{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}._a-qvX{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._GwLBi{fill:#515559}._GwLBi._aZl-s,._GwLBi._aZl-s._fwwx7{fill:rgba(116,119,122,.4)}._GwLBi._fwwx7{fill:#0b6ed0}._GwLBi._ilHGO{transform:rotate(-180deg)}._m5ztD.focus-visible,._m5ztD:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3103
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$6);}
|
|
3101
3104
|
|
|
3102
3105
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3103
3106
|
let {
|
|
@@ -3122,9 +3125,9 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3122
3125
|
} = index.useTranslation();
|
|
3123
3126
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
3124
3127
|
type: "button",
|
|
3125
|
-
className: classNames__default["default"](className, styles$
|
|
3126
|
-
[styles$
|
|
3127
|
-
[styles$
|
|
3128
|
+
className: classNames__default["default"](className, styles$6.button, {
|
|
3129
|
+
[styles$6.disabled]: isDisabled,
|
|
3130
|
+
[styles$6.selected]: !!selectedFilters
|
|
3128
3131
|
}),
|
|
3129
3132
|
onClick: e => {
|
|
3130
3133
|
if (isDisabled) {
|
|
@@ -3150,7 +3153,7 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3150
3153
|
}), isLocked && /*#__PURE__*/React__default["default"].createElement(icons_index.LockIcon, {
|
|
3151
3154
|
size: "small",
|
|
3152
3155
|
id: lockIconElementId,
|
|
3153
|
-
className: styles$
|
|
3156
|
+
className: styles$6.lockIcon
|
|
3154
3157
|
// @ts-ignore - 'locked' is not in the current list of translations
|
|
3155
3158
|
,
|
|
3156
3159
|
"aria-label": translate('locked')
|
|
@@ -3158,26 +3161,26 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3158
3161
|
lightTheme: true
|
|
3159
3162
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3160
3163
|
id: labelElementId,
|
|
3161
|
-
className: classNames__default["default"](styles$
|
|
3162
|
-
[styles$
|
|
3164
|
+
className: classNames__default["default"](styles$6.label, {
|
|
3165
|
+
[styles$6.disabled]: isDisabled
|
|
3163
3166
|
})
|
|
3164
3167
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3165
3168
|
show: true,
|
|
3166
3169
|
size: "xs",
|
|
3167
3170
|
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3168
3171
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3169
|
-
className: styles$
|
|
3172
|
+
className: styles$6.selectedFiltersContainer
|
|
3170
3173
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3171
3174
|
lightTheme: true
|
|
3172
3175
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3173
3176
|
id: selectedFiltersElementId,
|
|
3174
|
-
className: styles$
|
|
3177
|
+
className: styles$6.selectedFilters
|
|
3175
3178
|
}, selectedFilters))), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3176
3179
|
size: "medium",
|
|
3177
|
-
className: classNames__default["default"](styles$
|
|
3178
|
-
[styles$
|
|
3179
|
-
[styles$
|
|
3180
|
-
[styles$
|
|
3180
|
+
className: classNames__default["default"](styles$6.chevronIcon, {
|
|
3181
|
+
[styles$6.disabled]: isDisabled,
|
|
3182
|
+
[styles$6.selected]: !!selectedFilters,
|
|
3183
|
+
[styles$6.open]: isOpen
|
|
3181
3184
|
}),
|
|
3182
3185
|
"aria-hidden": true
|
|
3183
3186
|
}));
|
|
@@ -3233,6 +3236,7 @@ const Menu = _ref => {
|
|
|
3233
3236
|
}
|
|
3234
3237
|
const [open, setOpen] = index.useControllableState(isOpen, onIsOpenChange, isOpen);
|
|
3235
3238
|
const [maskHeight, setMaskHeight] = React.useState(null);
|
|
3239
|
+
const [maskWidth, setMaskWidth] = React.useState(null);
|
|
3236
3240
|
const [submenus, setSubmenus] = React.useState(new Set());
|
|
3237
3241
|
const triggerRef = React.useRef(null);
|
|
3238
3242
|
const registerSubmenu = (submenuId, submenuIsOpen) => {
|
|
@@ -3259,7 +3263,9 @@ const Menu = _ref => {
|
|
|
3259
3263
|
open,
|
|
3260
3264
|
triggerRef,
|
|
3261
3265
|
searchBarConfigs,
|
|
3262
|
-
setSearchBarConfigs
|
|
3266
|
+
setSearchBarConfigs,
|
|
3267
|
+
maskWidth,
|
|
3268
|
+
setMaskWidth
|
|
3263
3269
|
}
|
|
3264
3270
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Root, {
|
|
3265
3271
|
open: open,
|
|
@@ -3299,20 +3305,20 @@ class PointerEvent extends Event {
|
|
|
3299
3305
|
}
|
|
3300
3306
|
}
|
|
3301
3307
|
|
|
3302
|
-
var css_248z$
|
|
3303
|
-
var styles$
|
|
3304
|
-
var stylesheet$
|
|
3305
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
3308
|
+
var css_248z$5 = "._OOjwY{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._OOjwY>._MJORL{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._OOjwY>._MJORL:hover:not([aria-disabled=true]){background-color:#f5f5f5}._OOjwY>._MJORL.focus-visible,._OOjwY>._MJORL:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._OOjwY>._MJORL+._9F5ii{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._OOjwY>._MJORL[data-state=open]+._9F5ii{transform:rotate(-180deg) translateY(50%)}._OOjwY>._MJORL[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._OOjwY>._MJORL[aria-disabled=true]+._9F5ii{fill:#515559;opacity:.4}._eyhD7>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;max-width:350px;min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._eyhD7>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._beR38{margin:0;padding:4px 0;background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;overflow:auto;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:350px}._beR38._OGYj7{margin-left:30px;opacity:0}._beR38._fEwts{margin-left:-30px}._36S-T{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._36S-T._qorZv{cursor:unset}._36S-T ._VwLua{fill:#32363a;margin-right:4px}._36S-T:focus,._36S-T:hover:not(._36S-T._qorZv){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._36S-T[aria-disabled=true]{cursor:not-allowed;opacity:.65}._36S-T._rREbu{padding-right:32px}._36S-T._rREbu ._9F5ii{position:absolute;height:100%;right:3px;fill:#515559}._36S-T._7Kqdd{pointer-events:none}._YbkmX{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._YbkmX._owA61{padding-top:49px}._3YM-n{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._ldYt-{position:absolute;background-color:#fff;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;overflow:hidden;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._ldYt-._fEwts{opacity:0}._ldYt-._fEwts>._Cbvl2{margin-left:-30px}._ldYt-._OGYj7{opacity:0}._ldYt-._OGYj7>._Cbvl2{margin-left:30px}._ldYt->._Cbvl2{transition:margin-left .35s;width:100%}._ldYt-._7Kqdd{pointer-events:none}body.keyboard-user ._36S-T:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3309
|
+
var styles$5 = {"buttonContainer":"_OOjwY","button":"_MJORL","rightIcon":"_9F5ii","maskContainer":"_eyhD7","flyout":"_beR38","animatedRight":"_OGYj7","animatedLeft":"_fEwts","menuItem":"_36S-T","noItems":"_qorZv","backIcon":"_VwLua","subMenu":"_rREbu","unresponsive":"_7Kqdd","stickyBox":"_YbkmX","isSearchable":"_owA61","searchBoxesContainer":"_3YM-n","searchBox":"_ldYt-","searchInput":"_Cbvl2"};
|
|
3310
|
+
var stylesheet$5="._OOjwY{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._OOjwY>._MJORL{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559;background-color:#fafafa;overflow:hidden;text-overflow:ellipsis}._OOjwY>._MJORL:hover:not([aria-disabled=true]){background-color:#f5f5f5}._OOjwY>._MJORL.focus-visible,._OOjwY>._MJORL:focus-visible{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._OOjwY>._MJORL+._9F5ii{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._OOjwY>._MJORL[data-state=open]+._9F5ii{transform:rotate(-180deg) translateY(50%)}._OOjwY>._MJORL[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._OOjwY>._MJORL[aria-disabled=true]+._9F5ii{fill:#515559;opacity:.4}._eyhD7>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;max-width:350px;min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:var(--mask-z-index)!important;width:var(--mask-width);height:var(--mask-height);transition:height .35s,width .35s}._eyhD7>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._beR38{margin:0;padding:4px 0;background:#fff;transition:margin-left .35s,opacity .35s,height .35s,width .35s;opacity:1;overflow:auto;max-width:350px;width:-webkit-max-content;width:-moz-max-content;width:max-content;min-width:200px;max-height:350px}._beR38._OGYj7{margin-left:30px;opacity:0}._beR38._fEwts{margin-left:-30px}._36S-T{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word;font-size:14px;color:#32363a;width:100%}._36S-T._qorZv{cursor:unset}._36S-T ._VwLua{fill:#32363a;margin-right:4px}._36S-T:focus,._36S-T:hover:not(._36S-T._qorZv){background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._36S-T[aria-disabled=true]{cursor:not-allowed;opacity:.65}._36S-T._rREbu{padding-right:32px}._36S-T._rREbu ._9F5ii{position:absolute;height:100%;right:3px;fill:#515559}._36S-T._7Kqdd{pointer-events:none}._YbkmX{position:-webkit-sticky;position:sticky;top:0;background-color:#fff;border-bottom:1px solid #e8e8e8}._YbkmX._owA61{padding-top:49px}._3YM-n{pointer-events:none;position:fixed;left:0;top:0;transition:width .35s;min-width:200px;width:var(--mask-width);max-width:350px}._ldYt-{position:absolute;background-color:#fff;padding:8px;border-radius:4px 4px 0 0;pointer-events:auto;overflow:hidden;opacity:1;width:100%;transition:opacity .35s,margin-left .35s}._ldYt-._fEwts{opacity:0}._ldYt-._fEwts>._Cbvl2{margin-left:-30px}._ldYt-._OGYj7{opacity:0}._ldYt-._OGYj7>._Cbvl2{margin-left:30px}._ldYt->._Cbvl2{transition:margin-left .35s;width:100%}._ldYt-._7Kqdd{pointer-events:none}body.keyboard-user ._36S-T:hover:not(:focus){background-color:#fff;box-shadow:none}";
|
|
3311
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$5);}
|
|
3306
3312
|
|
|
3307
3313
|
/* eslint-disable import/prefer-default-export */
|
|
3308
|
-
const DATA_TESTID_SUFFIXES = {
|
|
3314
|
+
const DATA_TESTID_SUFFIXES$1 = {
|
|
3309
3315
|
MENU_PANE: 'menupane',
|
|
3310
3316
|
MENU_ITEM: 'menuitem',
|
|
3311
3317
|
MENU_BUTTON: 'menubutton',
|
|
3312
3318
|
MENU_SEARCH: 'menusearch',
|
|
3313
3319
|
MENU_BACK: 'menuback'
|
|
3314
3320
|
};
|
|
3315
|
-
const KEYS = {
|
|
3321
|
+
const KEYS$1 = {
|
|
3316
3322
|
OPEN_SUBMENU: ['ArrowRight', 'Enter', ' '],
|
|
3317
3323
|
CLOSE_SUBMENU: ['ArrowLeft'],
|
|
3318
3324
|
NAVIGATE_UP: ['ArrowUp'],
|
|
@@ -3322,6 +3328,30 @@ const KEYS = {
|
|
|
3322
3328
|
IGNORED_BY_SEARCH_INPUT: ['Tab']
|
|
3323
3329
|
};
|
|
3324
3330
|
|
|
3331
|
+
/* eslint-disable import/prefer-default-export */
|
|
3332
|
+
const DATA_TESTID_SUFFIXES = {
|
|
3333
|
+
SELECT_PANE: 'selectpane',
|
|
3334
|
+
SELECT_ITEM: 'selectitem',
|
|
3335
|
+
SELECT_BUTTON: 'selectbutton',
|
|
3336
|
+
SELECT_SEARCH: 'selectsearch',
|
|
3337
|
+
SELECT_BACK: 'selectback'
|
|
3338
|
+
};
|
|
3339
|
+
const KEYS = {
|
|
3340
|
+
CHECK_PARENT: [' ']
|
|
3341
|
+
};
|
|
3342
|
+
|
|
3343
|
+
const {
|
|
3344
|
+
Provider: SelectContextProvider,
|
|
3345
|
+
useContext
|
|
3346
|
+
} = index.createContextUtilities(null);
|
|
3347
|
+
function useSelectContext(isOptional) {
|
|
3348
|
+
const context = useContext();
|
|
3349
|
+
if (!isOptional && !context) {
|
|
3350
|
+
throw Error('useContext must be called inside a provider or be initialized with a default value');
|
|
3351
|
+
}
|
|
3352
|
+
return context;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3325
3355
|
const AsChildWrapper = _ref => {
|
|
3326
3356
|
let {
|
|
3327
3357
|
asChild,
|
|
@@ -3334,7 +3364,7 @@ const AsChildWrapper = _ref => {
|
|
|
3334
3364
|
content: tooltipContent,
|
|
3335
3365
|
delayMs: 250
|
|
3336
3366
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3337
|
-
className: styles$
|
|
3367
|
+
className: styles$5.buttonContainer
|
|
3338
3368
|
}, children));
|
|
3339
3369
|
};
|
|
3340
3370
|
const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref) => {
|
|
@@ -3350,6 +3380,7 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
3350
3380
|
triggerRef
|
|
3351
3381
|
} = useMenuContext();
|
|
3352
3382
|
const isTruncated = index.useIsTruncated(triggerRef);
|
|
3383
|
+
const withinSelect = useSelectContext(true) !== null;
|
|
3353
3384
|
return /*#__PURE__*/React__default["default"].createElement(AsChildWrapper, {
|
|
3354
3385
|
asChild: asChild,
|
|
3355
3386
|
tooltipContent: children,
|
|
@@ -3357,13 +3388,13 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
3357
3388
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Trigger, _extends__default["default"]({}, rest, {
|
|
3358
3389
|
"aria-disabled": isDisabled,
|
|
3359
3390
|
className: classNames__default["default"](className, {
|
|
3360
|
-
[styles$
|
|
3391
|
+
[styles$5.button]: !asChild
|
|
3361
3392
|
}),
|
|
3362
3393
|
asChild: asChild,
|
|
3363
3394
|
ref: index.mergeRefs(triggerRef, ref),
|
|
3364
|
-
"data-testid": index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_BUTTON)
|
|
3395
|
+
"data-testid": index.getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_BUTTON : DATA_TESTID_SUFFIXES$1.MENU_BUTTON)
|
|
3365
3396
|
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3366
|
-
className: styles$
|
|
3397
|
+
className: styles$5.rightIcon,
|
|
3367
3398
|
"aria-hidden": "true"
|
|
3368
3399
|
}));
|
|
3369
3400
|
});
|
|
@@ -3379,10 +3410,10 @@ const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3379
3410
|
searchPlaceholder
|
|
3380
3411
|
} = _ref;
|
|
3381
3412
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3382
|
-
className: classNames__default["default"](styles$
|
|
3383
|
-
[styles$
|
|
3384
|
-
[styles$
|
|
3385
|
-
[styles$
|
|
3413
|
+
className: classNames__default["default"](styles$5.searchBox, {
|
|
3414
|
+
[styles$5.unresponsive]: !isInteractive,
|
|
3415
|
+
[styles$5.animatedLeft]: animatedLeft,
|
|
3416
|
+
[styles$5.animatedRight]: animatedRight
|
|
3386
3417
|
}),
|
|
3387
3418
|
ref: ref
|
|
3388
3419
|
}, /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
@@ -3392,7 +3423,7 @@ const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3392
3423
|
onChange: e => setSearchValue(e.target.value),
|
|
3393
3424
|
placeholder: searchPlaceholder,
|
|
3394
3425
|
leftAddOn: /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null),
|
|
3395
|
-
className: styles$
|
|
3426
|
+
className: styles$5.searchInput
|
|
3396
3427
|
}));
|
|
3397
3428
|
});
|
|
3398
3429
|
|
|
@@ -3401,8 +3432,9 @@ const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3401
3432
|
// returns values that are necessary for use within pane
|
|
3402
3433
|
function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, menuParentDataTestId, id, flyoutRef) {
|
|
3403
3434
|
var _searchRef$current$qu, _searchRef$current;
|
|
3404
|
-
let
|
|
3405
|
-
let
|
|
3435
|
+
let withinSelect = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : undefined;
|
|
3436
|
+
let backButtonRef = arguments.length > 10 && arguments[10] !== undefined ? arguments[10] : undefined;
|
|
3437
|
+
let closeSubmenu = arguments.length > 11 && arguments[11] !== undefined ? arguments[11] : undefined;
|
|
3406
3438
|
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
3407
3439
|
const [zeroSearchResults, setZeroSearchResults] = React.useState();
|
|
3408
3440
|
const {
|
|
@@ -3424,7 +3456,7 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3424
3456
|
);
|
|
3425
3457
|
};
|
|
3426
3458
|
index.useEventListener(flyoutRef, 'keydown', e => {
|
|
3427
|
-
if (KEYS.NAVIGATE_UP.includes(e.key) && e.target === getFirstNonNullItem() || KEYS.NAVIGATE_DOWN.includes(e.key) && e.target === getLastNonNullItem()) {
|
|
3459
|
+
if (KEYS$1.NAVIGATE_UP.includes(e.key) && e.target === getFirstNonNullItem() || KEYS$1.NAVIGATE_DOWN.includes(e.key) && e.target === getLastNonNullItem()) {
|
|
3428
3460
|
searchInput === null || searchInput === void 0 ? void 0 : searchInput.focus();
|
|
3429
3461
|
}
|
|
3430
3462
|
}, {
|
|
@@ -3435,24 +3467,24 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3435
3467
|
index.useEventListener(searchInput, 'keydown', e => {
|
|
3436
3468
|
var _e$target;
|
|
3437
3469
|
lastestKeyPressedInSearchInput.current = e.key;
|
|
3438
|
-
if ([...KEYS.NAVIGATE_DOWN, ...KEYS.NAVIGATE_TOP].includes(e.key)) {
|
|
3470
|
+
if ([...KEYS$1.NAVIGATE_DOWN, ...KEYS$1.NAVIGATE_TOP].includes(e.key)) {
|
|
3439
3471
|
var _getFirstNonNullItem;
|
|
3440
3472
|
// prevent scrolling
|
|
3441
3473
|
e.preventDefault();
|
|
3442
3474
|
(_getFirstNonNullItem = getFirstNonNullItem()) === null || _getFirstNonNullItem === void 0 ? void 0 : _getFirstNonNullItem.focus();
|
|
3443
|
-
} else if ([...KEYS.NAVIGATE_UP, ...KEYS.NAVIIGATE_BOTTOM].includes(e.key)) {
|
|
3475
|
+
} else if ([...KEYS$1.NAVIGATE_UP, ...KEYS$1.NAVIIGATE_BOTTOM].includes(e.key)) {
|
|
3444
3476
|
var _getLastNonNullItem;
|
|
3445
3477
|
// prevent scrolling
|
|
3446
3478
|
e.preventDefault();
|
|
3447
3479
|
(_getLastNonNullItem = getLastNonNullItem()) === null || _getLastNonNullItem === void 0 ? void 0 : _getLastNonNullItem.focus();
|
|
3448
|
-
} else if (KEYS.CLOSE_SUBMENU.includes(e.key) && ((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3480
|
+
} else if (KEYS$1.CLOSE_SUBMENU.includes(e.key) && ((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3449
3481
|
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3450
|
-
} else if (KEYS.IGNORED_BY_SEARCH_INPUT.includes(e.key)) {
|
|
3482
|
+
} else if (KEYS$1.IGNORED_BY_SEARCH_INPUT.includes(e.key)) {
|
|
3451
3483
|
e.preventDefault();
|
|
3452
3484
|
}
|
|
3453
3485
|
});
|
|
3454
3486
|
index.useEventListener(searchInput, 'blur', () => {
|
|
3455
|
-
const refocus = ![...KEYS.NAVIGATE_DOWN, ...KEYS.NAVIGATE_UP, ...KEYS.NAVIGATE_TOP, ...KEYS.NAVIIGATE_BOTTOM].includes(lastestKeyPressedInSearchInput.current) && !animatedLeft && !animatedRight && searchInput;
|
|
3487
|
+
const refocus = ![...KEYS$1.NAVIGATE_DOWN, ...KEYS$1.NAVIGATE_UP, ...KEYS$1.NAVIGATE_TOP, ...KEYS$1.NAVIIGATE_BOTTOM].includes(lastestKeyPressedInSearchInput.current) && !animatedLeft && !animatedRight && searchInput;
|
|
3456
3488
|
lastestKeyPressedInSearchInput.current = undefined;
|
|
3457
3489
|
if (refocus) {
|
|
3458
3490
|
searchInput.focus();
|
|
@@ -3468,7 +3500,7 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3468
3500
|
}) && e.preventDefault(), [searchBarConfigs]);
|
|
3469
3501
|
React.useEffect(() => {
|
|
3470
3502
|
if (!isSearchable) {
|
|
3471
|
-
return
|
|
3503
|
+
return;
|
|
3472
3504
|
}
|
|
3473
3505
|
setSearchBarConfigs(configs => {
|
|
3474
3506
|
const configsClone = [...configs];
|
|
@@ -3477,7 +3509,7 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3477
3509
|
isInteractive: !animatedLeft && !animatedRight,
|
|
3478
3510
|
animatedLeft,
|
|
3479
3511
|
animatedRight,
|
|
3480
|
-
dataTestId: menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH),
|
|
3512
|
+
dataTestId: menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_SEARCH : DATA_TESTID_SUFFIXES$1.MENU_SEARCH),
|
|
3481
3513
|
setSearchValue,
|
|
3482
3514
|
ref: searchRef,
|
|
3483
3515
|
id,
|
|
@@ -3491,18 +3523,21 @@ function usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, i
|
|
|
3491
3523
|
}
|
|
3492
3524
|
return configsClone;
|
|
3493
3525
|
});
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
},
|
|
3526
|
+
}, [isSearchable, searchPlaceholder, setSearchBarConfigs, internalSearchValue, animatedLeft, animatedRight, menuParentDataTestId, setSearchValue, searchRef, id, withinSelect]);
|
|
3527
|
+
React.useEffect(() => () => setSearchBarConfigs(configs => {
|
|
3528
|
+
const configIndex = configs.findIndex(config => config.id === id);
|
|
3529
|
+
if (configIndex === -1) {
|
|
3530
|
+
return configs;
|
|
3531
|
+
}
|
|
3532
|
+
const configsClone = [...configs];
|
|
3533
|
+
configsClone.splice(configIndex, 1);
|
|
3534
|
+
return configsClone;
|
|
3535
|
+
}),
|
|
3536
|
+
// Omitted dependencies because we only want this to run on unmount
|
|
3537
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3538
|
+
[]);
|
|
3504
3539
|
const noSearchResultsNode = zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3505
|
-
className: classNames__default["default"](styles$
|
|
3540
|
+
className: classNames__default["default"](styles$5.menuItem, styles$5.noItems),
|
|
3506
3541
|
"aria-live": "assertive"
|
|
3507
3542
|
}, noMatchesText);
|
|
3508
3543
|
return {
|
|
@@ -3526,10 +3561,10 @@ const useMutationObserver = (target, options, onMutate) => React.useEffect(() =>
|
|
|
3526
3561
|
return () => observer.disconnect();
|
|
3527
3562
|
}, [target, options, onMutate]);
|
|
3528
3563
|
|
|
3529
|
-
var css_248z$
|
|
3530
|
-
var styles$
|
|
3531
|
-
var stylesheet$
|
|
3532
|
-
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$
|
|
3564
|
+
var css_248z$4 = "._lYQJ9{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._M796L{visibility:hidden}";
|
|
3565
|
+
var styles$4 = {"overlay":"_lYQJ9","hidden":"_M796L"};
|
|
3566
|
+
var stylesheet$4="._lYQJ9{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._M796L{visibility:hidden}";
|
|
3567
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$4);}
|
|
3533
3568
|
|
|
3534
3569
|
/**
|
|
3535
3570
|
* Adds an overlay to an area that obscures visibility and disables background elements.
|
|
@@ -3557,10 +3592,10 @@ const useOverlay = _ref => {
|
|
|
3557
3592
|
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
3558
3593
|
const overlay = document.createElement('div');
|
|
3559
3594
|
overlay.id = overlayId;
|
|
3560
|
-
overlay.classList.add(styles$
|
|
3595
|
+
overlay.classList.add(styles$4.overlay);
|
|
3561
3596
|
if (onClick) overlay.addEventListener('click', onClick);
|
|
3562
3597
|
if (dataTestId) overlay.dataset.testid = dataTestId;
|
|
3563
|
-
if (!isVisible) overlay.classList.add(styles$
|
|
3598
|
+
if (!isVisible) overlay.classList.add(styles$4.hidden);
|
|
3564
3599
|
if (zIndex || zIndex === 0) overlay.style.zIndex = zIndex.toString();
|
|
3565
3600
|
if (opacity || opacity === 0) overlay.style.opacity = opacity.toString();
|
|
3566
3601
|
containerNode.appendChild(overlay);
|
|
@@ -3569,7 +3604,7 @@ const useOverlay = _ref => {
|
|
|
3569
3604
|
containerNode.style.position = 'static';
|
|
3570
3605
|
containerNode.removeChild(overlay);
|
|
3571
3606
|
};
|
|
3572
|
-
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex]);
|
|
3607
|
+
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex, opacity]);
|
|
3573
3608
|
React.useEffect(() => {
|
|
3574
3609
|
var _containerRef$current2;
|
|
3575
3610
|
const containerNode = (_containerRef$current2 = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : document.body;
|
|
@@ -3578,12 +3613,12 @@ const useOverlay = _ref => {
|
|
|
3578
3613
|
Array.from(containerNode.children).forEach(child => {
|
|
3579
3614
|
if (!ignoreIds.includes(child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3580
3615
|
});
|
|
3581
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$
|
|
3616
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$4.hidden);
|
|
3582
3617
|
} else {
|
|
3583
3618
|
Array.from(containerNode.children).forEach(child => {
|
|
3584
3619
|
child.removeAttribute('inert');
|
|
3585
3620
|
});
|
|
3586
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$
|
|
3621
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$4.hidden);
|
|
3587
3622
|
}
|
|
3588
3623
|
return () => {
|
|
3589
3624
|
Array.from(containerNode.children).forEach(child => {
|
|
@@ -3597,11 +3632,171 @@ const useCSSVariable = function (name, value) {
|
|
|
3597
3632
|
let dependencies = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
3598
3633
|
React.useEffect(() => {
|
|
3599
3634
|
document.documentElement.style.setProperty(name, value !== null && value !== void 0 ? value : null);
|
|
3600
|
-
}, [value, ...dependencies]);
|
|
3635
|
+
}, [value, name, ...dependencies]);
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3638
|
+
const SubSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3639
|
+
let {
|
|
3640
|
+
label,
|
|
3641
|
+
onIsOpenChange,
|
|
3642
|
+
children,
|
|
3643
|
+
isDisabled,
|
|
3644
|
+
...rest
|
|
3645
|
+
} = _ref;
|
|
3646
|
+
const paneId = index.useId();
|
|
3647
|
+
const selectContext = useSelectContext();
|
|
3648
|
+
const {
|
|
3649
|
+
selectedValues,
|
|
3650
|
+
GetSelectItemsFrom,
|
|
3651
|
+
setSelectedValues
|
|
3652
|
+
} = selectContext;
|
|
3653
|
+
const allSelectItemChildren = React.useMemo(() => {
|
|
3654
|
+
var _GetSelectItemsFrom;
|
|
3655
|
+
return (_GetSelectItemsFrom = GetSelectItemsFrom === null || GetSelectItemsFrom === void 0 ? void 0 : GetSelectItemsFrom(children)) !== null && _GetSelectItemsFrom !== void 0 ? _GetSelectItemsFrom : [];
|
|
3656
|
+
}, [children, GetSelectItemsFrom]);
|
|
3657
|
+
const checkedState = React.useMemo(() => {
|
|
3658
|
+
const selectedChildCount = allSelectItemChildren.filter(_ref2 => {
|
|
3659
|
+
let [value] = _ref2;
|
|
3660
|
+
return Array.isArray(selectedValues) ? selectedValues.includes(value) : selectedValues === value;
|
|
3661
|
+
}).length;
|
|
3662
|
+
const childCount = allSelectItemChildren.length;
|
|
3663
|
+
let result = 'mixed';
|
|
3664
|
+
if (selectedChildCount === childCount) {
|
|
3665
|
+
result = 'true';
|
|
3666
|
+
} else if (selectedChildCount === 0) {
|
|
3667
|
+
result = 'false';
|
|
3668
|
+
}
|
|
3669
|
+
return result;
|
|
3670
|
+
}, [allSelectItemChildren, selectedValues]);
|
|
3671
|
+
const onTriggerCheckboxSelect = e => {
|
|
3672
|
+
if (isDisabled) {
|
|
3673
|
+
return;
|
|
3674
|
+
}
|
|
3675
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
3676
|
+
setSelectedValues === null || setSelectedValues === void 0 ? void 0 : setSelectedValues(previouslySelectedValues => {
|
|
3677
|
+
// exclude duplicates
|
|
3678
|
+
const prevSet = new Set(previouslySelectedValues);
|
|
3679
|
+
if (checkedState === 'true') {
|
|
3680
|
+
allSelectItemChildren.forEach(_ref3 => {
|
|
3681
|
+
let [value] = _ref3;
|
|
3682
|
+
return prevSet.delete(value);
|
|
3683
|
+
});
|
|
3684
|
+
} else {
|
|
3685
|
+
allSelectItemChildren.forEach(_ref4 => {
|
|
3686
|
+
let [value] = _ref4;
|
|
3687
|
+
return prevSet.add(value);
|
|
3688
|
+
});
|
|
3689
|
+
}
|
|
3690
|
+
return Array.from(prevSet);
|
|
3691
|
+
});
|
|
3692
|
+
};
|
|
3693
|
+
const subSelectPaneProps = {
|
|
3694
|
+
role: 'group',
|
|
3695
|
+
id: paneId
|
|
3696
|
+
};
|
|
3697
|
+
const subSelectTriggerProps = {
|
|
3698
|
+
role: 'treeitem',
|
|
3699
|
+
'aria-haspopup': undefined,
|
|
3700
|
+
'aria-owns': paneId
|
|
3701
|
+
};
|
|
3702
|
+
const sharedSubMenuProps = {
|
|
3703
|
+
...rest,
|
|
3704
|
+
isDisabled,
|
|
3705
|
+
onIsOpenChange,
|
|
3706
|
+
label,
|
|
3707
|
+
ref
|
|
3708
|
+
};
|
|
3709
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectContextProvider, {
|
|
3710
|
+
value: {
|
|
3711
|
+
...selectContext,
|
|
3712
|
+
subSelectTriggerProps,
|
|
3713
|
+
subSelectPaneProps,
|
|
3714
|
+
triggerCheckedState: checkedState,
|
|
3715
|
+
onTriggerCheckboxSelect
|
|
3716
|
+
}
|
|
3717
|
+
}, /*#__PURE__*/React__default["default"].createElement(SubMenu$1, sharedSubMenuProps, children));
|
|
3718
|
+
});
|
|
3719
|
+
|
|
3720
|
+
var css_248z$3 = "._xxuYT{box-shadow:inset 0 0 0 1px #b00!important}._pk2uK{width:unset!important;min-height:unset!important;padding:0!important;margin-right:7px}._m1vLs{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
3721
|
+
var styles$3 = {"isInvalid":"_xxuYT","checkbox":"_pk2uK","selectedItem":"_m1vLs"};
|
|
3722
|
+
var stylesheet$3="._xxuYT{box-shadow:inset 0 0 0 1px #b00!important}._pk2uK{width:unset!important;min-height:unset!important;padding:0!important;margin-right:7px}._m1vLs{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
3723
|
+
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$3);}
|
|
3724
|
+
|
|
3725
|
+
const SelectItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3726
|
+
let {
|
|
3727
|
+
isDisabled,
|
|
3728
|
+
label,
|
|
3729
|
+
value,
|
|
3730
|
+
children,
|
|
3731
|
+
className,
|
|
3732
|
+
...rest
|
|
3733
|
+
} = _ref;
|
|
3734
|
+
const {
|
|
3735
|
+
multiselect,
|
|
3736
|
+
selectedSelectItems,
|
|
3737
|
+
onItemSelect
|
|
3738
|
+
} = useSelectContext();
|
|
3739
|
+
const isSelected = selectedSelectItems.has(value);
|
|
3740
|
+
const sharedMenuItemProps = {
|
|
3741
|
+
ref,
|
|
3742
|
+
label,
|
|
3743
|
+
isDisabled
|
|
3744
|
+
};
|
|
3745
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem$1, _extends__default["default"]({}, rest, sharedMenuItemProps, {
|
|
3746
|
+
className: classNames__default["default"](className, {
|
|
3747
|
+
[styles$3.selectedItem]: isSelected
|
|
3748
|
+
}),
|
|
3749
|
+
asChild: true,
|
|
3750
|
+
onSelect: () => onItemSelect === null || onItemSelect === void 0 ? void 0 : onItemSelect(value, !isSelected)
|
|
3751
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3752
|
+
"aria-selected": isSelected,
|
|
3753
|
+
role: "treeitem"
|
|
3754
|
+
}, multiselect ? /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
3755
|
+
state: isSelected ? 'true' : 'false',
|
|
3756
|
+
className: styles$3.checkbox,
|
|
3757
|
+
isDisabled: isDisabled
|
|
3758
|
+
}) : null, children !== null && children !== void 0 ? children : label));
|
|
3759
|
+
});
|
|
3760
|
+
|
|
3761
|
+
const SelectedItems = () => {
|
|
3762
|
+
const selectContext = useSelectContext();
|
|
3763
|
+
const {
|
|
3764
|
+
selectedSelectItems,
|
|
3765
|
+
enabledSelectItems
|
|
3766
|
+
} = selectContext;
|
|
3767
|
+
const [displayedItems, setDisplayedItems] = React.useState(selectedSelectItems);
|
|
3768
|
+
const [open, setOpen] = React.useState(false);
|
|
3769
|
+
const {
|
|
3770
|
+
translate
|
|
3771
|
+
} = index.useTranslation();
|
|
3772
|
+
React.useEffect(() => {
|
|
3773
|
+
if (open) {
|
|
3774
|
+
setDisplayedItems(selectedSelectItems);
|
|
3775
|
+
}
|
|
3776
|
+
// Display items should only update on open
|
|
3777
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3778
|
+
}, [open]);
|
|
3779
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectContextProvider, {
|
|
3780
|
+
value: {
|
|
3781
|
+
...selectContext,
|
|
3782
|
+
isSelectedItems: true
|
|
3783
|
+
}
|
|
3784
|
+
}, /*#__PURE__*/React__default["default"].createElement(SubSelect, {
|
|
3785
|
+
onIsOpenChange: setOpen,
|
|
3786
|
+
label: translate('selectedItems')
|
|
3787
|
+
}, Array.from(displayedItems, _ref => {
|
|
3788
|
+
let [value, label] = _ref;
|
|
3789
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectItem, {
|
|
3790
|
+
label: label,
|
|
3791
|
+
key: value,
|
|
3792
|
+
value: value,
|
|
3793
|
+
isDisabled: !enabledSelectItems.has(value)
|
|
3794
|
+
});
|
|
3795
|
+
})));
|
|
3601
3796
|
};
|
|
3602
3797
|
|
|
3603
3798
|
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3604
|
-
var _flyoutRef$current$pa, _flyoutRef$
|
|
3799
|
+
var _flyoutRef$current$pa, _flyoutRef$current3, _flyoutRef$current4;
|
|
3605
3800
|
let {
|
|
3606
3801
|
placement,
|
|
3607
3802
|
children,
|
|
@@ -3617,6 +3812,12 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3617
3812
|
const [items, setItems] = React.useState([]);
|
|
3618
3813
|
const flyoutRef = React.useRef(null);
|
|
3619
3814
|
const stickyBoxRef = React.useRef(null);
|
|
3815
|
+
const selectContext = useSelectContext(true);
|
|
3816
|
+
const withinSelect = selectContext !== null;
|
|
3817
|
+
const {
|
|
3818
|
+
multiselect,
|
|
3819
|
+
showSelectedItemsPane
|
|
3820
|
+
} = selectContext !== null && selectContext !== void 0 ? selectContext : {};
|
|
3620
3821
|
const portalTarget = index.usePortalTarget();
|
|
3621
3822
|
const [side, align] = React.useMemo(() => {
|
|
3622
3823
|
var _placement$split, _placement$split2;
|
|
@@ -3629,7 +3830,9 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3629
3830
|
maskHeight,
|
|
3630
3831
|
open,
|
|
3631
3832
|
triggerRef,
|
|
3632
|
-
searchBarConfigs
|
|
3833
|
+
searchBarConfigs,
|
|
3834
|
+
setMaskWidth,
|
|
3835
|
+
maskWidth
|
|
3633
3836
|
} = useMenuContext();
|
|
3634
3837
|
const thisPanesDepth = 1;
|
|
3635
3838
|
const maskContainerId = 'maskContainer';
|
|
@@ -3639,29 +3842,28 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3639
3842
|
opacity: 0
|
|
3640
3843
|
});
|
|
3641
3844
|
const animatedLeft = React.useMemo(() => openPaneDepth > thisPanesDepth, [openPaneDepth]);
|
|
3642
|
-
const dataTestId = index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_PANE);
|
|
3845
|
+
const dataTestId = index.getSubDataTestId(rootDataTestId, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE);
|
|
3643
3846
|
const {
|
|
3644
3847
|
internalSearchValue,
|
|
3645
3848
|
noSearchResultsNode,
|
|
3646
3849
|
onInteractOutside
|
|
3647
|
-
} = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, false, dataTestId, index.useId(), flyoutRef);
|
|
3648
|
-
|
|
3649
|
-
// In order to preseve the css animation for vertical resizing, we cannot set the height of this pane to `auto`. It must be a pixel value.
|
|
3650
|
-
// We cache the pixel value here, to use it later if the user returns to this pane from a submenu.
|
|
3651
|
-
const initialHeightOfThisPane = React.useRef(null);
|
|
3652
|
-
index.useDidUpdate(() => {
|
|
3850
|
+
} = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, false, dataTestId, index.useId(), flyoutRef, withinSelect);
|
|
3851
|
+
React.useEffect(() => {
|
|
3653
3852
|
if (openPaneDepth === thisPanesDepth) {
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
}
|
|
3853
|
+
window.requestAnimationFrame(() => {
|
|
3854
|
+
var _flyoutRef$current, _flyoutRef$current2;
|
|
3855
|
+
if ((_flyoutRef$current = flyoutRef.current) !== null && _flyoutRef$current !== void 0 && _flyoutRef$current.clientHeight) {
|
|
3856
|
+
setMaskHeight(flyoutRef.current.clientHeight);
|
|
3857
|
+
}
|
|
3858
|
+
if ((_flyoutRef$current2 = flyoutRef.current) !== null && _flyoutRef$current2 !== void 0 && _flyoutRef$current2.clientWidth) {
|
|
3859
|
+
setMaskWidth(flyoutRef.current.clientWidth);
|
|
3860
|
+
}
|
|
3861
|
+
});
|
|
3862
|
+
} else if (openPaneDepth === 0) {
|
|
3863
|
+
setMaskHeight('auto');
|
|
3864
|
+
setMaskWidth('auto');
|
|
3663
3865
|
}
|
|
3664
|
-
}, [openPaneDepth]);
|
|
3866
|
+
}, [openPaneDepth, internalSearchValue, setMaskHeight, setMaskWidth]);
|
|
3665
3867
|
const defaultSide = React.useMemo(() => {
|
|
3666
3868
|
var _triggerRef$current;
|
|
3667
3869
|
const rect = triggerRef === null || triggerRef === void 0 || (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getBoundingClientRect();
|
|
@@ -3686,9 +3888,12 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3686
3888
|
return 'top';
|
|
3687
3889
|
}
|
|
3688
3890
|
return 'bottom';
|
|
3689
|
-
},
|
|
3891
|
+
},
|
|
3892
|
+
// including `open` because the trigger location may change between openings
|
|
3893
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3894
|
+
[open, triggerRef]);
|
|
3690
3895
|
const [transform, setTransform] = React.useState('');
|
|
3691
|
-
const target = (_flyoutRef$current$pa = (_flyoutRef$
|
|
3896
|
+
const target = (_flyoutRef$current$pa = (_flyoutRef$current3 = flyoutRef.current) === null || _flyoutRef$current3 === void 0 ? void 0 : _flyoutRef$current3.parentNode) !== null && _flyoutRef$current$pa !== void 0 ? _flyoutRef$current$pa : undefined;
|
|
3692
3897
|
useMutationObserver(target, {
|
|
3693
3898
|
attributes: true,
|
|
3694
3899
|
attributeFilter: ['style']
|
|
@@ -3696,7 +3901,12 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3696
3901
|
var _style$transform, _style;
|
|
3697
3902
|
return setTransform((_style$transform = target === null || target === void 0 || (_style = target.style) === null || _style === void 0 ? void 0 : _style.transform) !== null && _style$transform !== void 0 ? _style$transform : '');
|
|
3698
3903
|
});
|
|
3904
|
+
|
|
3905
|
+
// We use the top-level Radix container as a mask. Radix does not expose this container to consumers, except through CSS.
|
|
3906
|
+
// This hook is dynamically updating the style of that container using a CSS variable.
|
|
3699
3907
|
useCSSVariable('--mask-z-index', String(zIndex), [open]);
|
|
3908
|
+
useCSSVariable('--mask-width', "".concat(maskWidth, "px"));
|
|
3909
|
+
useCSSVariable('--mask-height', "".concat(maskHeight, "px"));
|
|
3700
3910
|
return /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3701
3911
|
items: items,
|
|
3702
3912
|
setItems: setItems,
|
|
@@ -3712,7 +3922,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3712
3922
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Portal, {
|
|
3713
3923
|
container: portalTarget || undefined
|
|
3714
3924
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3715
|
-
className: styles$
|
|
3925
|
+
className: styles$5.maskContainer,
|
|
3716
3926
|
id: maskContainerId
|
|
3717
3927
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Content, _extends__default["default"]({}, rest, {
|
|
3718
3928
|
onCloseAutoFocus: () => {
|
|
@@ -3726,25 +3936,24 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3726
3936
|
ref: index.mergeRefs(ref, flyoutRef),
|
|
3727
3937
|
"data-testid": dataTestId,
|
|
3728
3938
|
className: classNames__default["default"](className, {
|
|
3729
|
-
[styles$
|
|
3730
|
-
}, styles$
|
|
3939
|
+
[styles$5.animatedLeft]: animatedLeft
|
|
3940
|
+
}, styles$5.flyout),
|
|
3731
3941
|
onInteractOutside: onInteractOutside,
|
|
3732
|
-
style:
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
className: classNames__default["default"](styles$4.stickyBox, styles$4.isSearchable),
|
|
3942
|
+
style: style
|
|
3943
|
+
}), (isSearchable || multiselect && showSelectedItemsPane) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3944
|
+
className: classNames__default["default"](styles$5.stickyBox, {
|
|
3945
|
+
[styles$5.isSearchable]: isSearchable
|
|
3946
|
+
}),
|
|
3738
3947
|
ref: stickyBoxRef,
|
|
3739
3948
|
style: {
|
|
3740
3949
|
zIndex
|
|
3741
3950
|
}
|
|
3742
|
-
}), noSearchResultsNode, children), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3743
|
-
className: styles$
|
|
3951
|
+
}, showSelectedItemsPane && multiselect && /*#__PURE__*/React__default["default"].createElement(SelectedItems, null)), noSearchResultsNode, children), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3952
|
+
className: styles$5.searchBoxesContainer,
|
|
3744
3953
|
style: {
|
|
3745
3954
|
transform,
|
|
3746
3955
|
zIndex: zIndex + openPaneDepth,
|
|
3747
|
-
width: (_flyoutRef$
|
|
3956
|
+
width: (_flyoutRef$current4 = flyoutRef.current) === null || _flyoutRef$current4 === void 0 ? void 0 : _flyoutRef$current4.clientWidth
|
|
3748
3957
|
}
|
|
3749
3958
|
}, searchBarConfigs.length ? searchBarConfigs.map(_ref2 => {
|
|
3750
3959
|
let {
|
|
@@ -3767,6 +3976,9 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3767
3976
|
label,
|
|
3768
3977
|
...rest
|
|
3769
3978
|
} = _ref;
|
|
3979
|
+
const selectContext = useSelectContext(true);
|
|
3980
|
+
const withinSelect = selectContext !== null;
|
|
3981
|
+
const multiselect = selectContext === null || selectContext === void 0 ? void 0 : selectContext.multiselect;
|
|
3770
3982
|
const itemRef = React.useRef(null);
|
|
3771
3983
|
const {
|
|
3772
3984
|
dataTestId: menuParentDataTestId,
|
|
@@ -3783,7 +3995,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3783
3995
|
} = interactions.useFocusVisible({
|
|
3784
3996
|
isTextInput: true
|
|
3785
3997
|
});
|
|
3786
|
-
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));
|
|
3998
|
+
const dataTestId = index.getSubDataTestId(menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_ITEM : DATA_TESTID_SUFFIXES$1.MENU_ITEM), String(index$1));
|
|
3787
3999
|
const isVisible = React.useMemo(() => {
|
|
3788
4000
|
const searchMatcher = label !== null && label !== void 0 ? label : typeof children === 'string' ? children : undefined;
|
|
3789
4001
|
return isSearchFilteringDisabled || !searchValue || (searchMatcher === null || searchMatcher === void 0 ? void 0 : searchMatcher.toLowerCase().includes(searchValue.toLowerCase()));
|
|
@@ -3803,8 +4015,8 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3803
4015
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
3804
4016
|
asChild: asChild,
|
|
3805
4017
|
"aria-disabled": isDisabled,
|
|
3806
|
-
className: classNames__default["default"](className, styles$
|
|
3807
|
-
[styles$
|
|
4018
|
+
className: classNames__default["default"](className, styles$5.menuItem, {
|
|
4019
|
+
[styles$5.unresponsive]: !isInteractive
|
|
3808
4020
|
}),
|
|
3809
4021
|
"data-testid": dataTestId,
|
|
3810
4022
|
ref: index.mergeRefs(ref, itemRef),
|
|
@@ -3813,7 +4025,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3813
4025
|
e.preventDefault();
|
|
3814
4026
|
return;
|
|
3815
4027
|
}
|
|
3816
|
-
if (KEYS.CLOSE_SUBMENU.includes(e.key)) {
|
|
4028
|
+
if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
3817
4029
|
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3818
4030
|
}
|
|
3819
4031
|
},
|
|
@@ -3821,9 +4033,19 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3821
4033
|
// stop radix from closing the menu on selection of disabled item
|
|
3822
4034
|
// other pointer and keyboard events still work, even when disabled
|
|
3823
4035
|
,
|
|
3824
|
-
onSelect: e =>
|
|
4036
|
+
onSelect: e => {
|
|
4037
|
+
if (isDisabled) {
|
|
4038
|
+
e.preventDefault();
|
|
4039
|
+
return;
|
|
4040
|
+
}
|
|
4041
|
+
if (multiselect) {
|
|
4042
|
+
e.preventDefault();
|
|
4043
|
+
}
|
|
4044
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect();
|
|
4045
|
+
}
|
|
3825
4046
|
}), (!children || typeof children === 'string') && label ? label : children) : null;
|
|
3826
4047
|
});
|
|
4048
|
+
var MenuItem$1 = MenuItem;
|
|
3827
4049
|
|
|
3828
4050
|
const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3829
4051
|
let {
|
|
@@ -3839,6 +4061,16 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3839
4061
|
onIsOpenChange,
|
|
3840
4062
|
...rest
|
|
3841
4063
|
} = _ref;
|
|
4064
|
+
const selectContext = useSelectContext(true);
|
|
4065
|
+
const withinSelect = selectContext !== null;
|
|
4066
|
+
const {
|
|
4067
|
+
subSelectTriggerProps,
|
|
4068
|
+
multiselect,
|
|
4069
|
+
subSelectPaneProps,
|
|
4070
|
+
isSelectedItems,
|
|
4071
|
+
triggerCheckedState = 'false',
|
|
4072
|
+
onTriggerCheckboxSelect
|
|
4073
|
+
} = selectContext !== null && selectContext !== void 0 ? selectContext : {};
|
|
3842
4074
|
const [items, setItems] = React.useState([]);
|
|
3843
4075
|
const internalId = index.useId();
|
|
3844
4076
|
const triggerRef = React.useRef(null);
|
|
@@ -3857,7 +4089,8 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3857
4089
|
const {
|
|
3858
4090
|
openPaneDepth: totalOpenPaneDepth,
|
|
3859
4091
|
registerSubmenu,
|
|
3860
|
-
setMaskHeight
|
|
4092
|
+
setMaskHeight,
|
|
4093
|
+
setMaskWidth
|
|
3861
4094
|
} = useMenuContext();
|
|
3862
4095
|
const {
|
|
3863
4096
|
isFocusVisible
|
|
@@ -3868,7 +4101,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3868
4101
|
const [isFrameAfterPaneAddedToDOM, setIsFrameAfterPaneAddedToDOM] = React.useState(false);
|
|
3869
4102
|
const [isTransitioningFromRight, setIsTransitioningFromRight] = React.useState(false);
|
|
3870
4103
|
const animatedLeft = React.useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth, thisPanesDepth]);
|
|
3871
|
-
const animatedRight = React.useMemo(() => thisPanesDepth > totalOpenPaneDepth || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth]);
|
|
4104
|
+
const animatedRight = React.useMemo(() => thisPanesDepth > totalOpenPaneDepth || thisPanesDepth === totalOpenPaneDepth && !isPaneInDOM || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM, thisPanesDepth, isPaneInDOM]);
|
|
3872
4105
|
const paneDataTestId = index.getSubDataTestId(paneContainingTriggerDataTestId, String(triggerIndex));
|
|
3873
4106
|
const closeThisSubmenu = e => {
|
|
3874
4107
|
// prevent closing the entire menu, and Radix keyboard navigation
|
|
@@ -3879,9 +4112,9 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3879
4112
|
internalSearchValue,
|
|
3880
4113
|
noSearchResultsNode,
|
|
3881
4114
|
onInteractOutside
|
|
3882
|
-
} = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, paneDataTestId, internalId, flyoutRef, backButtonRef, closeThisSubmenu);
|
|
3883
|
-
const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_BACK);
|
|
3884
|
-
const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
|
|
4115
|
+
} = usePaneSearch(isSearchable, externalSearchValue, onSearchValueChange, items, animatedLeft, animatedRight, paneDataTestId, internalId, flyoutRef, withinSelect, backButtonRef, closeThisSubmenu);
|
|
4116
|
+
const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_BACK : DATA_TESTID_SUFFIXES$1.MENU_BACK);
|
|
4117
|
+
const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(withinSelect ? DATA_TESTID_SUFFIXES.SELECT_PANE : DATA_TESTID_SUFFIXES$1.MENU_PANE, withinSelect ? DATA_TESTID_SUFFIXES.SELECT_ITEM : DATA_TESTID_SUFFIXES$1.MENU_ITEM);
|
|
3885
4118
|
const triggerIsVisible = React.useMemo(() => isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && label.toLowerCase().includes(paneContainingTriggerSearchValue.toLowerCase()), [paneContainingTriggerSearchValue, label, isSearchFilteringDisabledForPaneContainingTrigger]);
|
|
3886
4119
|
index.useDidUpdate(() => {
|
|
3887
4120
|
if (isPaneInDOM) {
|
|
@@ -3898,9 +4131,9 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3898
4131
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3899
4132
|
React.useEffect(() => () => registerSubmenu(internalId, false), []);
|
|
3900
4133
|
index.useDidUpdate(() => {
|
|
3901
|
-
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
3902
|
-
|
|
3903
|
-
|
|
4134
|
+
if (thisPanesDepth === totalOpenPaneDepth && flyoutRef.current) {
|
|
4135
|
+
setMaskHeight(flyoutRef.current.clientHeight);
|
|
4136
|
+
setMaskWidth(flyoutRef.current.clientWidth);
|
|
3904
4137
|
}
|
|
3905
4138
|
},
|
|
3906
4139
|
// ignoring other dependencies because this should only run when the children change
|
|
@@ -3908,13 +4141,15 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3908
4141
|
index.useDidUpdate(() => {
|
|
3909
4142
|
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
3910
4143
|
window.requestAnimationFrame(() => {
|
|
3911
|
-
|
|
3912
|
-
|
|
4144
|
+
if (flyoutRef.current) {
|
|
4145
|
+
setMaskHeight(flyoutRef.current.clientHeight);
|
|
4146
|
+
setMaskWidth(flyoutRef.current.clientWidth);
|
|
4147
|
+
}
|
|
3913
4148
|
});
|
|
3914
4149
|
}
|
|
3915
4150
|
}, [totalOpenPaneDepth, internalSearchValue]);
|
|
3916
4151
|
const handlePaneTransitionEnd = () => {
|
|
3917
|
-
var _flyoutRef$
|
|
4152
|
+
var _flyoutRef$current;
|
|
3918
4153
|
if (animatedLeft) {
|
|
3919
4154
|
return;
|
|
3920
4155
|
}
|
|
@@ -3928,7 +4163,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3928
4163
|
}
|
|
3929
4164
|
|
|
3930
4165
|
// if the newly closed submenu doesn't place the focus on its trigger due to mouse events
|
|
3931
|
-
if (!((_flyoutRef$
|
|
4166
|
+
if (!((_flyoutRef$current = flyoutRef.current) !== null && _flyoutRef$current !== void 0 && _flyoutRef$current.contains(document.activeElement)) && isFocusVisible) {
|
|
3932
4167
|
if (triggerRef.current && paneContainingTriggerIsInteractive) {
|
|
3933
4168
|
triggerRef.current.focus();
|
|
3934
4169
|
} else if (backButtonRef.current) {
|
|
@@ -3939,9 +4174,10 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3939
4174
|
};
|
|
3940
4175
|
return triggerIsVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, {
|
|
3941
4176
|
open: isPaneInDOM
|
|
3942
|
-
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, {
|
|
3943
|
-
className: classNames__default["default"](styles$
|
|
3944
|
-
[styles$
|
|
4177
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, _extends__default["default"]({
|
|
4178
|
+
className: classNames__default["default"](styles$5.menuItem, styles$5.subMenu, {
|
|
4179
|
+
[styles$5.unresponsive]: !paneContainingTriggerIsInteractive,
|
|
4180
|
+
[styles$3.selectedItem]: triggerCheckedState === 'true' && !isSelectedItems
|
|
3945
4181
|
}),
|
|
3946
4182
|
"data-testid": triggerDataTestId,
|
|
3947
4183
|
"aria-disabled": isDisabled,
|
|
@@ -3952,14 +4188,23 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3952
4188
|
e.preventDefault();
|
|
3953
4189
|
return;
|
|
3954
4190
|
}
|
|
3955
|
-
if (!
|
|
4191
|
+
if (multiselect && !isSelectedItems && KEYS.CHECK_PARENT.includes(e.key)) {
|
|
4192
|
+
onTriggerCheckboxSelect === null || onTriggerCheckboxSelect === void 0 ? void 0 : onTriggerCheckboxSelect();
|
|
4193
|
+
return;
|
|
4194
|
+
}
|
|
4195
|
+
if (!isDisabled && KEYS$1.OPEN_SUBMENU.includes(e.key)) {
|
|
3956
4196
|
setIsPaneInDOM(true);
|
|
3957
|
-
} else if (KEYS.CLOSE_SUBMENU.includes(e.key)) {
|
|
4197
|
+
} else if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
3958
4198
|
closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 ? void 0 : closeSubmenuContainingTrigger(e);
|
|
3959
4199
|
}
|
|
3960
4200
|
}
|
|
3961
|
-
},
|
|
3962
|
-
|
|
4201
|
+
}, subSelectTriggerProps), multiselect && !isSelectedItems ? /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
4202
|
+
state: triggerCheckedState,
|
|
4203
|
+
className: styles$3.checkbox,
|
|
4204
|
+
onClick: onTriggerCheckboxSelect,
|
|
4205
|
+
isDisabled: isDisabled
|
|
4206
|
+
}) : null, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
4207
|
+
className: styles$5.rightIcon
|
|
3963
4208
|
})), /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3964
4209
|
items: items,
|
|
3965
4210
|
setItems: setItems,
|
|
@@ -3978,44 +4223,45 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3978
4223
|
"data-testid": paneDataTestId,
|
|
3979
4224
|
ref: index.mergeRefs(ref, flyoutRef),
|
|
3980
4225
|
onInteractOutside: onInteractOutside,
|
|
3981
|
-
className: classNames__default["default"](className, styles$
|
|
3982
|
-
[styles$
|
|
3983
|
-
[styles$
|
|
4226
|
+
className: classNames__default["default"](className, styles$5.flyout, {
|
|
4227
|
+
[styles$5.animatedRight]: animatedRight,
|
|
4228
|
+
[styles$5.animatedLeft]: animatedLeft
|
|
3984
4229
|
}),
|
|
3985
4230
|
onTransitionEnd: handlePaneTransitionEnd,
|
|
3986
4231
|
style: {
|
|
3987
4232
|
...style,
|
|
3988
4233
|
zIndex
|
|
3989
4234
|
}
|
|
3990
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3991
|
-
className: classNames__default["default"](styles$
|
|
3992
|
-
[styles$
|
|
4235
|
+
}, subSelectPaneProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4236
|
+
className: classNames__default["default"](styles$5.stickyBox, {
|
|
4237
|
+
[styles$5.isSearchable]: isSearchable
|
|
3993
4238
|
}),
|
|
3994
4239
|
ref: stickyBoxRef,
|
|
3995
4240
|
style: {
|
|
3996
4241
|
zIndex
|
|
3997
4242
|
}
|
|
3998
4243
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
3999
|
-
className: classNames__default["default"](styles$
|
|
4000
|
-
[styles$
|
|
4244
|
+
className: classNames__default["default"](styles$5.menuItem, {
|
|
4245
|
+
[styles$5.unresponsive]: isTransitioningFromRight || animatedLeft || animatedRight
|
|
4001
4246
|
}),
|
|
4002
4247
|
"data-testid": backButtonDataTestId,
|
|
4003
4248
|
onSelect: closeThisSubmenu,
|
|
4004
4249
|
ref: backButtonRef,
|
|
4005
4250
|
onKeyDown: e => {
|
|
4006
|
-
if (KEYS.CLOSE_SUBMENU.includes(e.key)) {
|
|
4251
|
+
if (KEYS$1.CLOSE_SUBMENU.includes(e.key)) {
|
|
4007
4252
|
closeThisSubmenu(e);
|
|
4008
4253
|
}
|
|
4009
4254
|
}
|
|
4010
4255
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ArrowLeftIcon, {
|
|
4011
4256
|
size: "small",
|
|
4012
|
-
className: styles$
|
|
4257
|
+
className: styles$5.backIcon
|
|
4013
4258
|
}), label)), noSearchResultsNode, children))) : null;
|
|
4014
4259
|
});
|
|
4260
|
+
var SubMenu$1 = SubMenu;
|
|
4015
4261
|
|
|
4016
|
-
var css_248z$2 = ".
|
|
4017
|
-
var styles$2 = {"drawer":"
|
|
4018
|
-
var stylesheet$2=".
|
|
4262
|
+
var css_248z$2 = "._Qteuj{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._-ET4f{visibility:hidden}._8egja{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._CMPTJ{padding-top:8px}._c64Qn{margin-left:12px}";
|
|
4263
|
+
var styles$2 = {"drawer":"_Qteuj","hidden":"_-ET4f","header":"_8egja","title":"_CMPTJ","closeButton":"_c64Qn"};
|
|
4264
|
+
var stylesheet$2="._Qteuj{position:absolute;top:0;height:100%;overflow:auto;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._-ET4f{visibility:hidden}._8egja{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._CMPTJ{padding-top:8px}._c64Qn{margin-left:12px}";
|
|
4019
4265
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$2);}
|
|
4020
4266
|
|
|
4021
4267
|
const Drawer = _ref => {
|
|
@@ -4130,9 +4376,9 @@ const Drawer = _ref => {
|
|
|
4130
4376
|
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
4131
4377
|
};
|
|
4132
4378
|
|
|
4133
|
-
var css_248z$1 = ".
|
|
4134
|
-
var styles$1 = {"container":"
|
|
4135
|
-
var stylesheet$1=".
|
|
4379
|
+
var css_248z$1 = "._tj3Tz{display:inline-block;position:relative}._P0pTZ{width:120px}._P0pTZ ._XPm26._yLNq9{transform:rotate(-180deg)}._P0pTZ ._XPm26._Idv3I{fill:#9d9fa1;opacity:.4}._jULQ9>input:focus{box-shadow:none!important;border:1px solid #898989!important}._LsyFE{width:120px}._LsyFE ._mQutK._iZ18k{background-color:#efefef;border-radius:6px}._XPm26{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._XPm26._yLNq9{transform:rotate(-180deg)}";
|
|
4380
|
+
var styles$1 = {"container":"_tj3Tz","input":"_P0pTZ","icon":"_XPm26","open":"_yLNq9","disabled":"_Idv3I","ignoreFocusStyle":"_jULQ9","flyout":"_LsyFE","option":"_mQutK","exactMatch":"_iZ18k"};
|
|
4381
|
+
var stylesheet$1="._tj3Tz{display:inline-block;position:relative}._P0pTZ{width:120px}._P0pTZ ._XPm26._yLNq9{transform:rotate(-180deg)}._P0pTZ ._XPm26._Idv3I{fill:#9d9fa1;opacity:.4}._jULQ9>input:focus{box-shadow:none!important;border:1px solid #898989!important}._LsyFE{width:120px}._LsyFE ._mQutK._iZ18k{background-color:#efefef;border-radius:6px}._XPm26{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._XPm26._yLNq9{transform:rotate(-180deg)}";
|
|
4136
4382
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z$1);}
|
|
4137
4383
|
|
|
4138
4384
|
const TimeDropdown = _ref => {
|
|
@@ -4706,9 +4952,9 @@ const {
|
|
|
4706
4952
|
Provider: ToggleButtonGroupContextProvider
|
|
4707
4953
|
} = index.createContextUtilities(null);
|
|
4708
4954
|
|
|
4709
|
-
var css_248z = ".
|
|
4710
|
-
var styles = {"default":"
|
|
4711
|
-
var stylesheet=".
|
|
4955
|
+
var css_248z = "._SnG6G{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._rs9TA{background-color:rgba(50,54,58,.08)}._mBMUt{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._GZn0Z{color:rgba(81,85,89,.4);cursor:not-allowed}._ARYwQ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5If1u{color:#085caf;border-color:#085caf}._5If1u,._VuxSy{background:rgba(11,110,208,.11)}._VuxSy{color:#0854a1;border-color:#0854a1}._-SYON{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8{position:relative;display:inline-grid}._74zS8 svg{fill:currentColor}._74zS8 ._8FfBe{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._74zS8 ._8FfBe+._5Y8EE{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._74zS8 ._8FfBe+._5Y8EE._D-3ES{padding:5px;max-width:36px;min-width:36px}._74zS8 ._8FfBe+._5Y8EE._xfWAi{padding:0 16px}._74zS8 ._8FfBe+._5Y8EE._H1iXr{padding:0 16px 0 12px}._74zS8 ._8FfBe:hover+._5Y8EE{background-color:rgba(50,54,58,.08)}._74zS8 ._8FfBe:disabled+._5Y8EE{color:rgba(81,85,89,.4);cursor:not-allowed}._74zS8 ._8FfBe:active+._5Y8EE,._74zS8 ._8FfBe:focus:active+._5Y8EE{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._74zS8 ._8FfBe:checked+._5Y8EE{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._74zS8 ._8FfBe:checked:hover+._5Y8EE{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._74zS8 ._8FfBe:checked:disabled+._5Y8EE{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8 ._8FfBe:checked:active+._5Y8EE,._74zS8 ._8FfBe:checked:focus:active+._5Y8EE{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._4jKRF{display:inline-flex;position:relative}._4jKRF:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._4jKRF>*{flex-shrink:0;flex-grow:0}._XowPj{border:none;margin:0;padding:0}._XowPj legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._74zS8 ._8FfBe.focus-visible+._5Y8EE,._74zS8 ._8FfBe:focus-visible+._5Y8EE{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4956
|
+
var styles = {"default":"_SnG6G","hovered":"_rs9TA","pressed":"_mBMUt","disabled":"_GZn0Z","selectedDefault":"_ARYwQ","selectedHovered":"_5If1u","selectedPressed":"_VuxSy","selectedDisabled":"_-SYON","toggleContainer":"_74zS8","toggleInput":"_8FfBe","toggleButton":"_5Y8EE","iconOnly":"_D-3ES","text":"_xfWAi","iconText":"_H1iXr","toggleButtonGroup":"_4jKRF","toggleButtonGroupFieldset":"_XowPj"};
|
|
4957
|
+
var stylesheet="._SnG6G{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._rs9TA{background-color:rgba(50,54,58,.08)}._mBMUt{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._GZn0Z{color:rgba(81,85,89,.4);cursor:not-allowed}._ARYwQ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5If1u{color:#085caf;border-color:#085caf}._5If1u,._VuxSy{background:rgba(11,110,208,.11)}._VuxSy{color:#0854a1;border-color:#0854a1}._-SYON{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8{position:relative;display:inline-grid}._74zS8 svg{fill:currentColor}._74zS8 ._8FfBe{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._74zS8 ._8FfBe+._5Y8EE{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._74zS8 ._8FfBe+._5Y8EE._D-3ES{padding:5px;max-width:36px;min-width:36px}._74zS8 ._8FfBe+._5Y8EE._xfWAi{padding:0 16px}._74zS8 ._8FfBe+._5Y8EE._H1iXr{padding:0 16px 0 12px}._74zS8 ._8FfBe:hover+._5Y8EE{background-color:rgba(50,54,58,.08)}._74zS8 ._8FfBe:disabled+._5Y8EE{color:rgba(81,85,89,.4);cursor:not-allowed}._74zS8 ._8FfBe:active+._5Y8EE,._74zS8 ._8FfBe:focus:active+._5Y8EE{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._74zS8 ._8FfBe:checked+._5Y8EE{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._74zS8 ._8FfBe:checked:hover+._5Y8EE{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._74zS8 ._8FfBe:checked:disabled+._5Y8EE{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._74zS8 ._8FfBe:checked:active+._5Y8EE,._74zS8 ._8FfBe:checked:focus:active+._5Y8EE{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._4jKRF{display:inline-flex;position:relative}._4jKRF:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._4jKRF>*{flex-shrink:0;flex-grow:0}._XowPj{border:none;margin:0;padding:0}._XowPj legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._74zS8 ._8FfBe.focus-visible+._5Y8EE,._74zS8 ._8FfBe:focus-visible+._5Y8EE{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4712
4958
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){icons_index.styleInject(css_248z);}
|
|
4713
4959
|
|
|
4714
4960
|
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -4942,6 +5188,180 @@ const VStack = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React_
|
|
|
4942
5188
|
direction: "vertical"
|
|
4943
5189
|
})));
|
|
4944
5190
|
|
|
5191
|
+
const SelectPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5192
|
+
let {
|
|
5193
|
+
children,
|
|
5194
|
+
isSearchable,
|
|
5195
|
+
placement,
|
|
5196
|
+
showSelectedItemsPane = false,
|
|
5197
|
+
searchValue,
|
|
5198
|
+
onSearchValueChange,
|
|
5199
|
+
isSearchFilteringDisabled,
|
|
5200
|
+
zIndex,
|
|
5201
|
+
...rest
|
|
5202
|
+
} = _ref;
|
|
5203
|
+
const selectContext = useSelectContext();
|
|
5204
|
+
const {
|
|
5205
|
+
multiselect
|
|
5206
|
+
} = selectContext;
|
|
5207
|
+
const sharedMenuProps = {
|
|
5208
|
+
placement,
|
|
5209
|
+
isSearchable,
|
|
5210
|
+
searchValue,
|
|
5211
|
+
onSearchValueChange,
|
|
5212
|
+
isSearchFilteringDisabled,
|
|
5213
|
+
zIndex,
|
|
5214
|
+
ref
|
|
5215
|
+
};
|
|
5216
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectContextProvider, {
|
|
5217
|
+
value: {
|
|
5218
|
+
...selectContext,
|
|
5219
|
+
showSelectedItemsPane
|
|
5220
|
+
}
|
|
5221
|
+
}, /*#__PURE__*/React__default["default"].createElement(MenuPane, _extends__default["default"]({}, rest, sharedMenuProps, {
|
|
5222
|
+
"aria-multiselectable": Boolean(multiselect),
|
|
5223
|
+
role: "tree"
|
|
5224
|
+
}), children));
|
|
5225
|
+
});
|
|
5226
|
+
|
|
5227
|
+
const GetSelectItemsFrom = function (startingChildren) {
|
|
5228
|
+
let filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
5229
|
+
const current = [];
|
|
5230
|
+
if (!startingChildren) {
|
|
5231
|
+
return current;
|
|
5232
|
+
}
|
|
5233
|
+
const childrenArray = Array.isArray(startingChildren) ? startingChildren : [startingChildren];
|
|
5234
|
+
childrenArray.forEach(child => {
|
|
5235
|
+
if (filter && !filter(child.props)) {
|
|
5236
|
+
return;
|
|
5237
|
+
}
|
|
5238
|
+
if (child.type === SelectItem) {
|
|
5239
|
+
const {
|
|
5240
|
+
label,
|
|
5241
|
+
value: childValue
|
|
5242
|
+
} = child.props;
|
|
5243
|
+
current.push([childValue, label]);
|
|
5244
|
+
} else if (child.type === SubSelect) {
|
|
5245
|
+
current.push(...GetSelectItemsFrom(child.props.children, filter));
|
|
5246
|
+
}
|
|
5247
|
+
});
|
|
5248
|
+
return current;
|
|
5249
|
+
};
|
|
5250
|
+
const Select = _ref => {
|
|
5251
|
+
let {
|
|
5252
|
+
multiselect,
|
|
5253
|
+
children,
|
|
5254
|
+
isDisabled,
|
|
5255
|
+
onChange,
|
|
5256
|
+
isOpen,
|
|
5257
|
+
onIsOpenChange,
|
|
5258
|
+
value,
|
|
5259
|
+
isInvalid,
|
|
5260
|
+
'data-testid': dataTestId
|
|
5261
|
+
} = _ref;
|
|
5262
|
+
const [selectedValues, setSelectedValues] = index.useControllableState(value, onChange, value);
|
|
5263
|
+
const selectPaneChildren = React.useMemo(() => {
|
|
5264
|
+
var _children$find;
|
|
5265
|
+
return Array.isArray(children) ? (_children$find = children.find(child => child.type === SelectPane)) === null || _children$find === void 0 ? void 0 : _children$find.props.children : null;
|
|
5266
|
+
}, [children]);
|
|
5267
|
+
const selectedSelectItems = React.useMemo(() => {
|
|
5268
|
+
if (Array.isArray(selectedValues)) {
|
|
5269
|
+
return new Map(GetSelectItemsFrom(selectPaneChildren, _ref2 => {
|
|
5270
|
+
let {
|
|
5271
|
+
value: _value
|
|
5272
|
+
} = _ref2;
|
|
5273
|
+
return !_value || selectedValues.includes(_value);
|
|
5274
|
+
}));
|
|
5275
|
+
}
|
|
5276
|
+
return new Map(GetSelectItemsFrom(selectPaneChildren, _ref3 => {
|
|
5277
|
+
let {
|
|
5278
|
+
value: _value
|
|
5279
|
+
} = _ref3;
|
|
5280
|
+
return !_value || selectedValues === _value;
|
|
5281
|
+
}));
|
|
5282
|
+
}, [selectedValues, selectPaneChildren]);
|
|
5283
|
+
const enabledSelectItems = React.useMemo(() => new Map(GetSelectItemsFrom(selectPaneChildren, _ref4 => {
|
|
5284
|
+
let {
|
|
5285
|
+
isDisabled: _isDisabled
|
|
5286
|
+
} = _ref4;
|
|
5287
|
+
return !_isDisabled;
|
|
5288
|
+
})), [selectPaneChildren]);
|
|
5289
|
+
const onItemSelect = React.useCallback((_value, isSelected) => {
|
|
5290
|
+
setSelectedValues(currentSelectedValues => {
|
|
5291
|
+
if (multiselect) {
|
|
5292
|
+
if (Array.isArray(currentSelectedValues)) {
|
|
5293
|
+
const clone = new Set(currentSelectedValues);
|
|
5294
|
+
if (isSelected) {
|
|
5295
|
+
clone.add(_value);
|
|
5296
|
+
} else {
|
|
5297
|
+
clone.delete(_value);
|
|
5298
|
+
}
|
|
5299
|
+
return Array.from(clone);
|
|
5300
|
+
}
|
|
5301
|
+
if (isSelected) {
|
|
5302
|
+
return [_value];
|
|
5303
|
+
}
|
|
5304
|
+
} else if (isSelected) {
|
|
5305
|
+
return _value;
|
|
5306
|
+
}
|
|
5307
|
+
return currentSelectedValues;
|
|
5308
|
+
});
|
|
5309
|
+
}, [setSelectedValues, multiselect]);
|
|
5310
|
+
const sharedMenuProps = {
|
|
5311
|
+
isDisabled,
|
|
5312
|
+
isOpen,
|
|
5313
|
+
onIsOpenChange,
|
|
5314
|
+
'data-testid': dataTestId
|
|
5315
|
+
};
|
|
5316
|
+
return /*#__PURE__*/React__default["default"].createElement(SelectContextProvider, {
|
|
5317
|
+
value: {
|
|
5318
|
+
multiselect,
|
|
5319
|
+
onItemSelect,
|
|
5320
|
+
selectedValues,
|
|
5321
|
+
selectedSelectItems,
|
|
5322
|
+
GetSelectItemsFrom,
|
|
5323
|
+
isInvalid,
|
|
5324
|
+
setSelectedValues,
|
|
5325
|
+
enabledSelectItems
|
|
5326
|
+
}
|
|
5327
|
+
}, /*#__PURE__*/React__default["default"].createElement(Menu, sharedMenuProps, children));
|
|
5328
|
+
};
|
|
5329
|
+
|
|
5330
|
+
const SelectButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5331
|
+
let {
|
|
5332
|
+
children,
|
|
5333
|
+
asChild,
|
|
5334
|
+
placeholder: externalPlaceholder,
|
|
5335
|
+
...rest
|
|
5336
|
+
} = _ref;
|
|
5337
|
+
const {
|
|
5338
|
+
selectedSelectItems,
|
|
5339
|
+
isInvalid,
|
|
5340
|
+
multiselect
|
|
5341
|
+
} = useSelectContext();
|
|
5342
|
+
const {
|
|
5343
|
+
translate
|
|
5344
|
+
} = index.useTranslation();
|
|
5345
|
+
const placeholder = externalPlaceholder !== null && externalPlaceholder !== void 0 ? externalPlaceholder : multiselect ? translate('selectOneOrMore') : translate('selectOne');
|
|
5346
|
+
const selectedItemsString = React.useMemo(() => Array.from(selectedSelectItems)
|
|
5347
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5348
|
+
.map(_ref2 => {
|
|
5349
|
+
let [value, label] = _ref2;
|
|
5350
|
+
return label;
|
|
5351
|
+
}).join(', '), [selectedSelectItems]);
|
|
5352
|
+
const sharedMenuButtonProps = {
|
|
5353
|
+
ref,
|
|
5354
|
+
asChild
|
|
5355
|
+
};
|
|
5356
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuButton, _extends__default["default"]({}, rest, sharedMenuButtonProps, {
|
|
5357
|
+
"aria-haspopup": "tree",
|
|
5358
|
+
role: "combobox",
|
|
5359
|
+
className: classNames__default["default"]({
|
|
5360
|
+
[styles$3.isInvalid]: isInvalid
|
|
5361
|
+
})
|
|
5362
|
+
}), children !== null && children !== void 0 ? children : selectedSelectItems !== null && selectedSelectItems !== void 0 && selectedSelectItems.size ? selectedItemsString : placeholder);
|
|
5363
|
+
});
|
|
5364
|
+
|
|
4945
5365
|
/* eslint-disable camelcase */
|
|
4946
5366
|
|
|
4947
5367
|
exports.Input = index.Input$1;
|
|
@@ -4957,13 +5377,18 @@ exports.FilterAnchor = FilterAnchor;
|
|
|
4957
5377
|
exports.HStack = HStack;
|
|
4958
5378
|
exports.Menu = Menu;
|
|
4959
5379
|
exports.MenuButton = MenuButton;
|
|
4960
|
-
exports.MenuItem = MenuItem;
|
|
5380
|
+
exports.MenuItem = MenuItem$1;
|
|
4961
5381
|
exports.MenuPane = MenuPane;
|
|
4962
5382
|
exports.PhoneNumberInput = PhoneNumberInput;
|
|
5383
|
+
exports.Select = Select;
|
|
5384
|
+
exports.SelectButton = SelectButton;
|
|
5385
|
+
exports.SelectItem = SelectItem;
|
|
5386
|
+
exports.SelectPane = SelectPane;
|
|
4963
5387
|
exports.SplitButton = SplitButton;
|
|
4964
5388
|
exports.SplitButtonOption = SplitButtonOption;
|
|
4965
5389
|
exports.StackItem = StackItem;
|
|
4966
|
-
exports.SubMenu = SubMenu;
|
|
5390
|
+
exports.SubMenu = SubMenu$1;
|
|
5391
|
+
exports.SubSelect = SubSelect;
|
|
4967
5392
|
exports.TimePicker = TimePicker;
|
|
4968
5393
|
exports.ToggleButton = ToggleButton;
|
|
4969
5394
|
exports.ToggleButtonGroup = ToggleButtonGroup;
|