@qualtrics/ui-react 2.16.0 → 2.18.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 +40 -0
- package/dist/__shared/cjs/{index-74e60b70.js → index-00992312.js} +203 -157
- package/dist/__shared/cjs/{index-8f2648af.js → index-615ed9b2.js} +11 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button.js +6 -54
- package/dist/components/Button/Button2.js +54 -6
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/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/FilePicker.js +2 -2
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/IconTypes.js +2 -0
- 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/LoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionSet.js +4 -5
- package/dist/components/LogicEditor/Controls.js +19 -4
- package/dist/components/LogicEditor/LogicEditor.js +9 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +20 -1
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +9 -7
- 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/Pagination/PaginationNextButton.js +1 -1
- package/dist/components/Pagination/PaginationPreviousButton.js +1 -1
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +8 -6
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +1 -1
- 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/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/RecordIcon.js +6 -0
- package/dist/icons/components/StopRecordingIcon.js +6 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.es.js +2 -0
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +2 -2
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -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 +29 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +7 -4
- package/dist/next/Menu/MenuContext.js +2 -2
- package/dist/next/Menu/MenuItem.js +36 -5
- package/dist/next/Menu/MenuPane.js +111 -21
- package/dist/next/Menu/MenuSearch.js +29 -35
- package/dist/next/Menu/SubMenu.js +165 -31
- package/dist/next/Menu/constants.js +8 -2
- package/dist/next/Menu/index.js +5 -5
- package/dist/next/Menu/usePaneSearch.js +25 -0
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +1 -1
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/ToggleButton.js +79 -0
- package/dist/next/ToggleButton/ToggleButtonGroup.js +39 -0
- package/dist/next/ToggleButton/ToggleButtonGroupContext.js +9 -0
- package/dist/next/ToggleButton/index.js +2 -0
- package/dist/next/ToggleButton/styles.js +8 -0
- package/dist/next/index.d.ts +28 -0
- package/dist/next/index.es.js +8 -5
- package/dist/next/index.js +651 -250
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/icons/package.json +2 -2
- package/next/package.json +2 -2
- package/package.json +4 -4
package/dist/next/index.js
CHANGED
|
@@ -9,8 +9,8 @@ var classNames = require('classnames');
|
|
|
9
9
|
var reactDnd = require('react-dnd');
|
|
10
10
|
var reactDndHtml5Backend = require('react-dnd-html5-backend');
|
|
11
11
|
var useResizeObserver = require('@react-hook/resize-observer');
|
|
12
|
-
var index = require('../__shared/cjs/index-
|
|
13
|
-
var icons_index = require('../__shared/cjs/index-
|
|
12
|
+
var index = require('../__shared/cjs/index-00992312.js');
|
|
13
|
+
var icons_index = require('../__shared/cjs/index-615ed9b2.js');
|
|
14
14
|
var libphonenumberJs = require('libphonenumber-js');
|
|
15
15
|
var InputMask = require('react-input-mask');
|
|
16
16
|
var reactDropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
@@ -31,10 +31,10 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
31
31
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
32
32
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
33
33
|
|
|
34
|
-
var css_248z$
|
|
35
|
-
var styles$
|
|
36
|
-
var stylesheet$
|
|
37
|
-
icons_index.styleInject(css_248z$
|
|
34
|
+
var css_248z$a = "._2hjYI{overflow:auto;position:relative;max-width:100%;max-height:100%}._2hjYI,._2nVCO{background-color:#fff}._2nVCO{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._2wEaI{margin-bottom:4px}._mCKOi{position:-webkit-sticky;position:sticky;top:0;z-index:100}._1sc7C{display:flex}._1sc7C:focus{outline:none}body.keyboard-user ._1sc7C:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._1sc7C:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._1sc7C:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._1sc7C:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:1px}._1_U_u{padding-right:3px}._2PJLo{display:flex}._2PJLo._1CjOA ._2nKH6,._2PJLo._1CjOA ._3DWTT{cursor:pointer}._2PJLo._3xcI9 ._2nKH6,._2PJLo._3xcI9 ._3DWTT{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._2PJLo._3xcI9 ._2nKH6._3Wtd0,._2PJLo._3xcI9 ._3DWTT._3Wtd0{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._1SAyX,._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._3DWTT,._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._YOqDU,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._1SAyX,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._3DWTT,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._YOqDU{background-color:rgba(11,110,208,.08)}._2PJLo._1CjOA:hover:not(._3xcI9):not(._3cYVW) ._2nKH6,._2PJLo._1CjOA:hover:not(._3xcI9):not(._3cYVW) ._3DWTT{background-color:#f9f9f9}._2PJLo._1CjOA:active:not(._3xcI9):not(._3cYVW) ._2nKH6,._2PJLo._1CjOA:active:not(._3xcI9):not(._3cYVW) ._3DWTT{background-color:#f3f3f3}._2PJLo:focus{outline:none}body.keyboard-user ._2PJLo:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:0}._2PJLo:last-of-type:focus{outline:none}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:1px}._2PJLo:last-of-type ._1SAyX:focus{outline:none}body.keyboard-user ._2PJLo:last-of-type ._1SAyX._3MkDs:after,body.keyboard-user ._2PJLo:last-of-type ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2PJLo:first-of-type:focus{outline:none}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:0}._2PJLo:first-of-type ._1SAyX:focus{outline:none}body.keyboard-user ._2PJLo:first-of-type ._1SAyX._3MkDs:after,body.keyboard-user ._2PJLo:first-of-type ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._3HAdC{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}._3HAdC._1qs0l{flex-grow:1}._3HAdC._3M9Q9{cursor:pointer}._3HAdC._3M9Q9:hover:not(._32BLy){background-color:#f9f9f9;border-bottom-color:#6a6d70}._3HAdC._3M9Q9:active:not(._32BLy){background-color:#f3f3f3}._3HAdC._3N_ay:not(._32BLy){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._3HAdC._32BLy{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._3HAdC ._26asv{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._3HAdC ._26asv._2WJqs{left:-1px}._3HAdC ._26asv._1G5Nk{right:0}._3HAdC ._32aUZ{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._3HAdC ._32aUZ._2WJqs{left:-2px}._3HAdC ._32aUZ._1G5Nk{right:-1px}._3HAdC:first-of-type ._2WJqs._26asv{left:0;width:2px;border-left:1px solid #fff}._3HAdC:first-of-type ._2WJqs._32aUZ{left:0}._3HAdC:last-of-type ._1G5Nk._26asv{right:0;width:2px;border-right:1px solid #fff}._3HAdC:last-of-type ._1G5Nk._32aUZ{right:0}._3HAdC ._1qrzW{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._3HAdC ._1qrzW ._3LmU2{position:absolute;width:2px;right:2px;top:0;bottom:0}._3HAdC ._1qrzW ._3LmU2._P-ju5{background-color:#0a6ed1}._3HAdC ._1qrzW:hover ._3LmU2:not(._P-ju5){background-color:#d9d9d9}._3HAdC ._1-OWW{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._3HAdC ._1-OWW._1j82l{flex-direction:row-reverse;justify-content:flex-start}._3HAdC ._1-OWW._1j82l ._nx26L{margin:1px 7px 1px 1px}._3HAdC ._1-OWW ._3NLfo{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._3HAdC ._1-OWW ._nx26L{margin:1px 1px 1px 7px;flex-shrink:0}._3HAdC ._21IQP{margin-left:6px;margin-right:4px;flex-shrink:0}._3HAdC ._3HxzE{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._3HAdC:focus{outline:none}body.keyboard-user ._3HAdC._3MkDs:after,body.keyboard-user ._3HAdC:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._rE43H{margin-right:6px}._3Wtd0{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._3Wtd0[focus-within]{z-index:30}._3Wtd0:focus-within{z-index:30}._1SAyX{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}._1SAyX ._3U90L{width:100%;padding:12px 12px 11px;overflow:hidden}._1SAyX._32BLy{background-color:#efefef;border-bottom-color:#dfdfe1}._1SAyX._1qs0l{flex-grow:1}._1SAyX:focus{outline:none}body.keyboard-user ._1SAyX._3MkDs:after,body.keyboard-user ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._3DWTT{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3DWTT._5sepp{border-bottom-color:#d9d9d9;background-color:#fff}._YOqDU{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}._YOqDU._5sepp{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._YOqDU:focus input~span,._YOqDU:hover input~span{border-color:#0b6ed0}._YOqDU ._2VEYk{position:relative;display:inline-flex}._YOqDU ._2VEYk ._6TysS{margin:0!important}._YOqDU ._2VEYk ._3TyOJ{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._3YCZc{justify-content:flex-start}._LUPmo{justify-content:center;text-align:center}._1j82l{justify-content:flex-end;text-align:right}._UdrIy{display:none}._1gprc{opacity:0;height:0;width:0;overflow:hidden}._1gprc,._2kOx3{position:absolute}._2kOx3{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._2pcnA{width:246px}";
|
|
35
|
+
var styles$a = {"advancedTable":"_2hjYI","advancedTablePaginationContainer":"_2nVCO","advancedTablePagination":"_2wEaI","advancedTableColumnHeadersRowGroup":"_mCKOi","advancedTableColumnHeaders":"_1sc7C","advancedTableRowChild":"_2nKH6","pinnedContainer":"_3Wtd0","advancedTableRowGroup":"_1_U_u","advancedTableRow":"_2PJLo","hasRowAction":"_1CjOA","advancedTableExpandRowSpacer":"_3DWTT","isSelected":"_3xcI9","advancedTableCheckbox":"_YOqDU","advancedTableCell":"_1SAyX","isCheckboxHovered":"_3cYVW","showFocusRing":"_3MkDs","advancedTableColumnHeader":"_3HAdC","fillRemainingSpace":"_1qs0l","isSortable":"_3M9Q9","isDragging":"_32BLy","isSorted":"_3N_ay","dropTargetLine":"_26asv","dropTargetLeft":"_2WJqs","dropTargetRight":"_1G5Nk","dropTargetMarker":"_32aUZ","resizeHandle":"_1qrzW","resizeLine":"_3LmU2","isResizing":"_P-ju5","advancedTableColumnHeaderLabel":"_1-OWW","rightAligned":"_1j82l","sortIcon":"_nx26L","advancedTableColumnHeaderLabelText":"_3NLfo","advancedTableColumnHeaderMenu":"_21IQP","advancedTableColumnHeaderMenuHiddenAnchor":"_3HxzE","advancedTableColumnHeaderMenuItemIcon":"_rE43H","advancedTableCellContainer":"_3U90L","header":"_5sepp","checkboxContainer":"_2VEYk","checkbox":"_6TysS","mixed":"_3TyOJ","leftAligned":"_3YCZc","centerAligned":"_LUPmo","hiddenDescription":"_UdrIy","hiddenLiveRegion":"_1gprc","dragPreview":"_2kOx3","rowActionMenuPane":"_2pcnA"};
|
|
36
|
+
var stylesheet$a="._2hjYI{overflow:auto;position:relative;max-width:100%;max-height:100%}._2hjYI,._2nVCO{background-color:#fff}._2nVCO{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._2wEaI{margin-bottom:4px}._mCKOi{position:-webkit-sticky;position:sticky;top:0;z-index:100}._1sc7C{display:flex}._1sc7C:focus{outline:none}body.keyboard-user ._1sc7C:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._1sc7C:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._1sc7C:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._1sc7C:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:1px}._1_U_u{padding-right:3px}._2PJLo{display:flex}._2PJLo._1CjOA ._2nKH6,._2PJLo._1CjOA ._3DWTT{cursor:pointer}._2PJLo._3xcI9 ._2nKH6,._2PJLo._3xcI9 ._3DWTT{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._2PJLo._3xcI9 ._2nKH6._3Wtd0,._2PJLo._3xcI9 ._3DWTT._3Wtd0{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._1SAyX,._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._3DWTT,._2PJLo._3xcI9 ._2nKH6._3Wtd0 ._YOqDU,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._1SAyX,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._3DWTT,._2PJLo._3xcI9 ._3DWTT._3Wtd0 ._YOqDU{background-color:rgba(11,110,208,.08)}._2PJLo._1CjOA:hover:not(._3xcI9):not(._3cYVW) ._2nKH6,._2PJLo._1CjOA:hover:not(._3xcI9):not(._3cYVW) ._3DWTT{background-color:#f9f9f9}._2PJLo._1CjOA:active:not(._3xcI9):not(._3cYVW) ._2nKH6,._2PJLo._1CjOA:active:not(._3xcI9):not(._3cYVW) ._3DWTT{background-color:#f3f3f3}._2PJLo:focus{outline:none}body.keyboard-user ._2PJLo:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:0}._2PJLo:last-of-type:focus{outline:none}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:last-of-type:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:1px}._2PJLo:last-of-type ._1SAyX:focus{outline:none}body.keyboard-user ._2PJLo:last-of-type ._1SAyX._3MkDs:after,body.keyboard-user ._2PJLo:last-of-type ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2PJLo:first-of-type:focus{outline:none}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._2PJLo:first-of-type:focus ._2nKH6._3Wtd0:after{right:-3px;bottom:0}._2PJLo:first-of-type ._1SAyX:focus{outline:none}body.keyboard-user ._2PJLo:first-of-type ._1SAyX._3MkDs:after,body.keyboard-user ._2PJLo:first-of-type ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._3HAdC{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}._3HAdC._1qs0l{flex-grow:1}._3HAdC._3M9Q9{cursor:pointer}._3HAdC._3M9Q9:hover:not(._32BLy){background-color:#f9f9f9;border-bottom-color:#6a6d70}._3HAdC._3M9Q9:active:not(._32BLy){background-color:#f3f3f3}._3HAdC._3N_ay:not(._32BLy){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._3HAdC._32BLy{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._3HAdC ._26asv{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._3HAdC ._26asv._2WJqs{left:-1px}._3HAdC ._26asv._1G5Nk{right:0}._3HAdC ._32aUZ{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._3HAdC ._32aUZ._2WJqs{left:-2px}._3HAdC ._32aUZ._1G5Nk{right:-1px}._3HAdC:first-of-type ._2WJqs._26asv{left:0;width:2px;border-left:1px solid #fff}._3HAdC:first-of-type ._2WJqs._32aUZ{left:0}._3HAdC:last-of-type ._1G5Nk._26asv{right:0;width:2px;border-right:1px solid #fff}._3HAdC:last-of-type ._1G5Nk._32aUZ{right:0}._3HAdC ._1qrzW{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._3HAdC ._1qrzW ._3LmU2{position:absolute;width:2px;right:2px;top:0;bottom:0}._3HAdC ._1qrzW ._3LmU2._P-ju5{background-color:#0a6ed1}._3HAdC ._1qrzW:hover ._3LmU2:not(._P-ju5){background-color:#d9d9d9}._3HAdC ._1-OWW{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._3HAdC ._1-OWW._1j82l{flex-direction:row-reverse;justify-content:flex-start}._3HAdC ._1-OWW._1j82l ._nx26L{margin:1px 7px 1px 1px}._3HAdC ._1-OWW ._3NLfo{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._3HAdC ._1-OWW ._nx26L{margin:1px 1px 1px 7px;flex-shrink:0}._3HAdC ._21IQP{margin-left:6px;margin-right:4px;flex-shrink:0}._3HAdC ._3HxzE{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._3HAdC:focus{outline:none}body.keyboard-user ._3HAdC._3MkDs:after,body.keyboard-user ._3HAdC:focus:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._rE43H{margin-right:6px}._3Wtd0{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._3Wtd0[focus-within]{z-index:30}._3Wtd0:focus-within{z-index:30}._1SAyX{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}._1SAyX ._3U90L{width:100%;padding:12px 12px 11px;overflow:hidden}._1SAyX._32BLy{background-color:#efefef;border-bottom-color:#dfdfe1}._1SAyX._1qs0l{flex-grow:1}._1SAyX:focus{outline:none}body.keyboard-user ._1SAyX._3MkDs:after,body.keyboard-user ._1SAyX:focus:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._3DWTT{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3DWTT._5sepp{border-bottom-color:#d9d9d9;background-color:#fff}._YOqDU{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}._YOqDU._5sepp{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._YOqDU:focus input~span,._YOqDU:hover input~span{border-color:#0b6ed0}._YOqDU ._2VEYk{position:relative;display:inline-flex}._YOqDU ._2VEYk ._6TysS{margin:0!important}._YOqDU ._2VEYk ._3TyOJ{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._3YCZc{justify-content:flex-start}._LUPmo{justify-content:center;text-align:center}._1j82l{justify-content:flex-end;text-align:right}._UdrIy{display:none}._1gprc{opacity:0;height:0;width:0;overflow:hidden}._1gprc,._2kOx3{position:absolute}._2kOx3{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._2pcnA{width:246px}";
|
|
37
|
+
icons_index.styleInject(css_248z$a);
|
|
38
38
|
|
|
39
39
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
40
40
|
// Also Alignment, etc can be defined directly and have AdvancedTableColumnConfig use them instead of the reverse like now.
|
|
@@ -99,7 +99,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
99
99
|
"date-testid": menuItemDataTestId
|
|
100
100
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
101
101
|
size: "small",
|
|
102
|
-
className: styles$
|
|
102
|
+
className: styles$a.advancedTableColumnHeaderMenuItemIcon,
|
|
103
103
|
"aria-hidden": "true"
|
|
104
104
|
}), label);
|
|
105
105
|
};
|
|
@@ -153,7 +153,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
153
153
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Ascending))
|
|
154
154
|
}, /*#__PURE__*/React__default["default"].createElement(AscendingIconComponent, {
|
|
155
155
|
size: "small",
|
|
156
|
-
className: styles$
|
|
156
|
+
className: styles$a.advancedTableColumnHeaderMenuItemIcon,
|
|
157
157
|
"aria-hidden": "true"
|
|
158
158
|
}), ascendingLabel), /*#__PURE__*/React__default["default"].createElement(index.MenuItem, {
|
|
159
159
|
key: descendingValue,
|
|
@@ -162,7 +162,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
162
162
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Descending))
|
|
163
163
|
}, /*#__PURE__*/React__default["default"].createElement(DescendingIconComponent, {
|
|
164
164
|
size: "small",
|
|
165
|
-
className: styles$
|
|
165
|
+
className: styles$a.advancedTableColumnHeaderMenuItemIcon,
|
|
166
166
|
"aria-hidden": "true"
|
|
167
167
|
}), descendingLabel)];
|
|
168
168
|
}), (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default["default"].createElement(index.Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
@@ -415,7 +415,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
415
415
|
const selectedSortIcon = isSorted ? /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
416
416
|
"aria-hidden": "true",
|
|
417
417
|
focusable: "false",
|
|
418
|
-
className: styles$
|
|
418
|
+
className: styles$a.sortIcon,
|
|
419
419
|
width: "10",
|
|
420
420
|
height: "10",
|
|
421
421
|
viewBox: "0 0 10 10",
|
|
@@ -609,28 +609,28 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
609
609
|
onFocus: onFocus,
|
|
610
610
|
onClick: isSortable ? handleClick : undefined,
|
|
611
611
|
tabIndex: isFocused ? 0 : -1,
|
|
612
|
-
className: classNames__default["default"](styles$
|
|
613
|
-
[styles$
|
|
612
|
+
className: classNames__default["default"](styles$a.advancedTableColumnHeader, {
|
|
613
|
+
[styles$a.advancedTableRowChild]: !isPinned,
|
|
614
614
|
// if nested inside of pinned container, not a direct row child
|
|
615
|
-
[styles$
|
|
616
|
-
[styles$
|
|
617
|
-
[styles$
|
|
618
|
-
[styles$
|
|
619
|
-
[styles$
|
|
615
|
+
[styles$a.isSortable]: isSortable,
|
|
616
|
+
[styles$a.isSorted]: isSorted,
|
|
617
|
+
[styles$a.showFocusRing]: isHiddenMenuOpen,
|
|
618
|
+
[styles$a.isDragging]: isDragging,
|
|
619
|
+
[styles$a.fillRemainingSpace]: width === undefined
|
|
620
620
|
}),
|
|
621
621
|
style: {
|
|
622
622
|
width: computedWidth
|
|
623
623
|
},
|
|
624
624
|
ref: index.mergeRefs(columnHeaderRef, dragRef, dropRef, ref)
|
|
625
625
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
626
|
-
className: classNames__default["default"](styles$
|
|
627
|
-
[styles$
|
|
628
|
-
[styles$
|
|
629
|
-
[styles$
|
|
626
|
+
className: classNames__default["default"](styles$a.advancedTableColumnHeaderLabel, {
|
|
627
|
+
[styles$a.leftAligned]: alignment === 'left',
|
|
628
|
+
[styles$a.centerAligned]: alignment === 'center',
|
|
629
|
+
[styles$a.rightAligned]: alignment === 'right'
|
|
630
630
|
}),
|
|
631
631
|
ref: labelContainerRef
|
|
632
632
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
633
|
-
className: styles$
|
|
633
|
+
className: styles$a.advancedTableColumnHeaderLabelText,
|
|
634
634
|
style: {
|
|
635
635
|
WebkitLineClamp: headerMaxLines
|
|
636
636
|
},
|
|
@@ -641,7 +641,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
641
641
|
anchor: /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
642
642
|
tabIndex: -1,
|
|
643
643
|
"aria-hidden": "true",
|
|
644
|
-
className: styles$
|
|
644
|
+
className: styles$a.advancedTableColumnHeaderMenu
|
|
645
645
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, null))
|
|
646
646
|
})), /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaderMenu, _extends__default["default"]({}, commonMenuProps, {
|
|
647
647
|
isOpen: isHiddenMenuOpen,
|
|
@@ -656,31 +656,31 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
656
656
|
|
|
657
657
|
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
658
658
|
},
|
|
659
|
-
className: styles$
|
|
659
|
+
className: styles$a.advancedTableColumnHeaderMenuHiddenAnchor
|
|
660
660
|
})
|
|
661
661
|
}))), dropTargetSide && !isRowActionMenuColumn && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
662
|
-
className: classNames__default["default"](styles$
|
|
663
|
-
[styles$
|
|
664
|
-
[styles$
|
|
662
|
+
className: classNames__default["default"](styles$a.dropTargetLine, {
|
|
663
|
+
[styles$a.dropTargetLeft]: dropTargetSide === 'left',
|
|
664
|
+
[styles$a.dropTargetRight]: dropTargetSide === 'right'
|
|
665
665
|
}),
|
|
666
666
|
style: {
|
|
667
667
|
height: tableHeight
|
|
668
668
|
}
|
|
669
669
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
670
|
-
className: classNames__default["default"](styles$
|
|
671
|
-
[styles$
|
|
672
|
-
[styles$
|
|
670
|
+
className: classNames__default["default"](styles$a.dropTargetMarker, {
|
|
671
|
+
[styles$a.dropTargetLeft]: dropTargetSide === 'left',
|
|
672
|
+
[styles$a.dropTargetRight]: dropTargetSide === 'right'
|
|
673
673
|
})
|
|
674
674
|
})), onWidthChange && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
675
675
|
"aria-hidden": true,
|
|
676
|
-
className: styles$
|
|
676
|
+
className: styles$a.resizeHandle,
|
|
677
677
|
style: {
|
|
678
678
|
height: tableHeight
|
|
679
679
|
},
|
|
680
680
|
onMouseDown: handleMouseDown
|
|
681
681
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
682
|
-
className: classNames__default["default"](styles$
|
|
683
|
-
[styles$
|
|
682
|
+
className: classNames__default["default"](styles$a.resizeLine, {
|
|
683
|
+
[styles$a.isResizing]: isResizing
|
|
684
684
|
})
|
|
685
685
|
}))));
|
|
686
686
|
});
|
|
@@ -761,19 +761,19 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
761
761
|
onFocus: handleFocus,
|
|
762
762
|
onBlur: handleBlur,
|
|
763
763
|
tabIndex: isFocused && !isEditing ? 0 : -1,
|
|
764
|
-
className: classNames__default["default"](className, styles$
|
|
765
|
-
[styles$
|
|
766
|
-
[styles$
|
|
767
|
-
[styles$
|
|
768
|
-
[styles$
|
|
769
|
-
[styles$
|
|
764
|
+
className: classNames__default["default"](className, styles$a.advancedTableCell, {
|
|
765
|
+
[styles$a.leftAligned]: alignment === Alignments.Left,
|
|
766
|
+
[styles$a.centerAligned]: alignment === Alignments.Center,
|
|
767
|
+
[styles$a.rightAligned]: alignment === Alignments.Right,
|
|
768
|
+
[styles$a.isDragging]: isDragging,
|
|
769
|
+
[styles$a.fillRemainingSpace]: width === undefined
|
|
770
770
|
}),
|
|
771
771
|
style: {
|
|
772
772
|
width: computedWidth
|
|
773
773
|
},
|
|
774
774
|
ref: index.mergeRefs(ref, cellRef)
|
|
775
775
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
776
|
-
className: styles$
|
|
776
|
+
className: styles$a.advancedTableCellContainer
|
|
777
777
|
}, typeof renderCellContent === 'function' ? renderCellContent({
|
|
778
778
|
value,
|
|
779
779
|
setValue,
|
|
@@ -809,10 +809,10 @@ const AdvancedTableRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
809
809
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
810
810
|
onFocus: isFocusable ? onFocus : undefined,
|
|
811
811
|
onClick: hasOnRowSelect ? onClick : undefined,
|
|
812
|
-
className: classNames__default["default"](styles$
|
|
813
|
-
[styles$
|
|
814
|
-
[styles$
|
|
815
|
-
[styles$
|
|
812
|
+
className: classNames__default["default"](styles$a.advancedTableRow, {
|
|
813
|
+
[styles$a.hasRowAction]: hasOnRowSelect,
|
|
814
|
+
[styles$a.isSelected]: hasOnRowSelect && isSelected,
|
|
815
|
+
[styles$a.isCheckboxHovered]: isCheckboxHovered
|
|
816
816
|
}),
|
|
817
817
|
ref: isFocusable ? ref : undefined
|
|
818
818
|
}), children);
|
|
@@ -832,7 +832,7 @@ const AdvancedTableColumnHeaders = /*#__PURE__*/React.forwardRef((_ref, ref) =>
|
|
|
832
832
|
tabIndex: isFocusable ? isFocused ? 0 : -1 : undefined,
|
|
833
833
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
834
834
|
onFocus: isFocusable ? onFocus : undefined,
|
|
835
|
-
className: styles$
|
|
835
|
+
className: styles$a.advancedTableColumnHeaders,
|
|
836
836
|
ref: ref
|
|
837
837
|
}), children);
|
|
838
838
|
});
|
|
@@ -861,17 +861,17 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
861
861
|
onClick: onClick,
|
|
862
862
|
onMouseEnter: onMouseEnter,
|
|
863
863
|
onMouseLeave: onMouseLeave,
|
|
864
|
-
className: classNames__default["default"](styles$
|
|
865
|
-
[styles$
|
|
864
|
+
className: classNames__default["default"](styles$a.advancedTableCheckbox, {
|
|
865
|
+
[styles$a.header]: variant === 'header'
|
|
866
866
|
}),
|
|
867
867
|
"aria-live": isRowFocused ? 'polite' : undefined,
|
|
868
868
|
"aria-relevant": "text"
|
|
869
869
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
870
|
-
className: styles$
|
|
870
|
+
className: styles$a.hiddenLiveRegion
|
|
871
871
|
}, labels[state]), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
872
|
-
className: styles$
|
|
872
|
+
className: styles$a.checkboxContainer
|
|
873
873
|
}, /*#__PURE__*/React__default["default"].createElement(index.Checkbox, {
|
|
874
|
-
className: styles$
|
|
874
|
+
className: styles$a.checkbox,
|
|
875
875
|
"aria-hidden": true,
|
|
876
876
|
checked: state === 'true',
|
|
877
877
|
onChange: () => {
|
|
@@ -883,7 +883,7 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
883
883
|
onFocus
|
|
884
884
|
}
|
|
885
885
|
}), state === 'mixed' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
886
|
-
className: styles$
|
|
886
|
+
className: styles$a.mixed
|
|
887
887
|
})));
|
|
888
888
|
};
|
|
889
889
|
|
|
@@ -896,7 +896,7 @@ const AdvancedTableHiddenDescription = _ref => {
|
|
|
896
896
|
translate
|
|
897
897
|
} = index.useTranslation();
|
|
898
898
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
899
|
-
className: styles$
|
|
899
|
+
className: styles$a.hiddenDescription,
|
|
900
900
|
id: id
|
|
901
901
|
}, translate(messageKey));
|
|
902
902
|
};
|
|
@@ -920,7 +920,7 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
920
920
|
const top = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.y) || 0;
|
|
921
921
|
const left = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.x) || 0;
|
|
922
922
|
return /*#__PURE__*/React__default["default"].createElement(index.Portal, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
923
|
-
className: styles$
|
|
923
|
+
className: styles$a.dragPreview,
|
|
924
924
|
style: {
|
|
925
925
|
height,
|
|
926
926
|
width,
|
|
@@ -952,9 +952,9 @@ const AdvancedTablePagination = _ref => {
|
|
|
952
952
|
};
|
|
953
953
|
|
|
954
954
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
955
|
-
className: styles$
|
|
955
|
+
className: styles$a.advancedTablePaginationContainer
|
|
956
956
|
}, /*#__PURE__*/React__default["default"].createElement(index.Pagination, {
|
|
957
|
-
className: styles$
|
|
957
|
+
className: styles$a.advancedTablePagination,
|
|
958
958
|
"aria-label": ariaLabel,
|
|
959
959
|
numPages: Math.max(Math.ceil(rows.length / rowsPerPage), 1),
|
|
960
960
|
currentPage: currentPage,
|
|
@@ -1098,7 +1098,7 @@ const AdvancedTable = _ref => {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1101
|
-
className: styles$
|
|
1101
|
+
className: styles$a.rowActionMenuPane
|
|
1102
1102
|
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1103
1103
|
var _actionGroup$actions;
|
|
1104
1104
|
|
|
@@ -1625,8 +1625,8 @@ const AdvancedTable = _ref => {
|
|
|
1625
1625
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
1626
1626
|
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1627
1627
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1628
|
-
className: classNames__default["default"](styles$
|
|
1629
|
-
[styles$
|
|
1628
|
+
className: classNames__default["default"](styles$a.advancedTableExpandRowSpacer, {
|
|
1629
|
+
[styles$a.header]: inHeader
|
|
1630
1630
|
}),
|
|
1631
1631
|
style: {
|
|
1632
1632
|
width
|
|
@@ -1674,7 +1674,7 @@ const AdvancedTable = _ref => {
|
|
|
1674
1674
|
return /*#__PURE__*/React__default["default"].createElement(reactDnd.DndProvider, {
|
|
1675
1675
|
backend: reactDndHtml5Backend.HTML5Backend
|
|
1676
1676
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1677
|
-
className: styles$
|
|
1677
|
+
className: styles$a.advancedTable,
|
|
1678
1678
|
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
1679
1679
|
"aria-multiselectable": hasExpandableRows && hasCheckboxColumn ? true : undefined,
|
|
1680
1680
|
"aria-rowcount": rows ? rows.length + 1 : 0,
|
|
@@ -1698,7 +1698,7 @@ const AdvancedTable = _ref => {
|
|
|
1698
1698
|
messageKey: "advancedTable.rowCheckboxDescription"
|
|
1699
1699
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1700
1700
|
role: "rowgroup",
|
|
1701
|
-
className: classNames__default["default"](styles$
|
|
1701
|
+
className: classNames__default["default"](styles$a.advancedTableColumnHeadersRowGroup, styles$a.advancedTableRowGroup)
|
|
1702
1702
|
}, /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaders, {
|
|
1703
1703
|
"aria-rowindex": hasExpandableRows ? undefined : 1,
|
|
1704
1704
|
"aria-level": hasExpandableRows ? 1 : undefined // aria-level is one-indexed
|
|
@@ -1713,7 +1713,7 @@ const AdvancedTable = _ref => {
|
|
|
1713
1713
|
ref: createRef(headerRowIndex, -1)
|
|
1714
1714
|
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1715
1715
|
role: "presentation",
|
|
1716
|
-
className: classNames__default["default"](styles$
|
|
1716
|
+
className: classNames__default["default"](styles$a.pinnedContainer, styles$a.advancedTableRowChild),
|
|
1717
1717
|
ref: createPinnedContainerRef(headerRowIndex)
|
|
1718
1718
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1719
1719
|
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
@@ -1729,7 +1729,7 @@ const AdvancedTable = _ref => {
|
|
|
1729
1729
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1730
1730
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1731
1731
|
role: "rowgroup",
|
|
1732
|
-
className: styles$
|
|
1732
|
+
className: styles$a.advancedTableRowGroup
|
|
1733
1733
|
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
1734
1734
|
const {
|
|
1735
1735
|
id: rowId,
|
|
@@ -1783,7 +1783,7 @@ const AdvancedTable = _ref => {
|
|
|
1783
1783
|
"aria-posinset": hasExpandableRows ? depthIndex + 1 : undefined // aria-posinset is one-indexed
|
|
1784
1784
|
|
|
1785
1785
|
}), hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1786
|
-
className: classNames__default["default"](styles$
|
|
1786
|
+
className: classNames__default["default"](styles$a.pinnedContainer, styles$a.advancedTableRowChild),
|
|
1787
1787
|
ref: createPinnedContainerRef(paginatedRowIndex)
|
|
1788
1788
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1789
1789
|
state: getCheckboxStateForRow(row),
|
|
@@ -1811,7 +1811,7 @@ const AdvancedTable = _ref => {
|
|
|
1811
1811
|
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
1812
1812
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
1813
1813
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1814
|
-
className: styles$
|
|
1814
|
+
className: styles$a.advancedTableRowChild,
|
|
1815
1815
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1816
1816
|
,
|
|
1817
1817
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
@@ -1993,10 +1993,10 @@ function useFocusState(_ref8) {
|
|
|
1993
1993
|
|
|
1994
1994
|
/* eslint-disable import/prefer-default-export */
|
|
1995
1995
|
|
|
1996
|
-
var css_248z$
|
|
1997
|
-
var styles$
|
|
1998
|
-
var stylesheet$
|
|
1999
|
-
icons_index.styleInject(css_248z$
|
|
1996
|
+
var css_248z$9 = "._3fl6H{display:inline-block;width:36px;transition:width .25s ease-out}._9j8Sr{width:100%}._2jEwz>input{padding-right:0!important}._3_kex>svg{fill:#515559}";
|
|
1997
|
+
var styles$9 = {"collapsibleSearchInput":"_3fl6H","searchInput":"_9j8Sr","searchInputCollapsed":"_2jEwz","iconButton":"_3_kex"};
|
|
1998
|
+
var stylesheet$9="._3fl6H{display:inline-block;width:36px;transition:width .25s ease-out}._9j8Sr{width:100%}._2jEwz>input{padding-right:0!important}._3_kex>svg{fill:#515559}";
|
|
1999
|
+
icons_index.styleInject(css_248z$9);
|
|
2000
2000
|
|
|
2001
2001
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2002
2002
|
let {
|
|
@@ -2009,7 +2009,7 @@ const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, re
|
|
|
2009
2009
|
} = index.useTranslation();
|
|
2010
2010
|
const label = translate('collapsibleSearchInput.openSearchField');
|
|
2011
2011
|
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, _extends__default["default"]({}, rest, {
|
|
2012
|
-
className: styles$
|
|
2012
|
+
className: styles$9.iconButton,
|
|
2013
2013
|
"aria-label": label,
|
|
2014
2014
|
tooltipContent: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
|
|
2015
2015
|
tooltipPlacement: tooltipPlacement,
|
|
@@ -2123,7 +2123,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2123
2123
|
onFocus: handleContainerFocus,
|
|
2124
2124
|
onBlur: handleContainerBlur,
|
|
2125
2125
|
onTransitionEnd: handleContainerTransitionEnd,
|
|
2126
|
-
className: styles$
|
|
2126
|
+
className: styles$9.collapsibleSearchInput,
|
|
2127
2127
|
style: {
|
|
2128
2128
|
width: externalIsExpanded ? widthWhenExpanded : undefined
|
|
2129
2129
|
},
|
|
@@ -2137,8 +2137,8 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2137
2137
|
"aria-label": searchInputAriaLabel,
|
|
2138
2138
|
"aria-labelledby": searchInputAriaLabelledBy,
|
|
2139
2139
|
"aria-describedby": searchInputAriaDescribedBy,
|
|
2140
|
-
className: classNames__default["default"](styles$
|
|
2141
|
-
[styles$
|
|
2140
|
+
className: classNames__default["default"](styles$9.searchInput, {
|
|
2141
|
+
[styles$9.searchInputCollapsed]: internalExpandedState !== expandedStates.EXPANDED
|
|
2142
2142
|
}),
|
|
2143
2143
|
"data-testid": index.getSubDataTestId(dataTestId, 'SearchInput'),
|
|
2144
2144
|
ref: searchInputRef
|
|
@@ -2149,10 +2149,10 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2149
2149
|
}));
|
|
2150
2150
|
});
|
|
2151
2151
|
|
|
2152
|
-
var css_248z$
|
|
2153
|
-
var styles$
|
|
2154
|
-
var stylesheet$
|
|
2155
|
-
icons_index.styleInject(css_248z$
|
|
2152
|
+
var css_248z$8 = "._kNu6_ input{padding-left:76px!important}._3gbyC input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3gbyC input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3gbyC input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3b6vP{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._3b6vP,._3b6vP._3gbyC:hover{background-color:transparent!important}._3b6vP:hover{background-color:rgba(50,54,58,.08)!important}._3b6vP:active{background-color:rgba(50,54,58,.11)!important}._3b6vP svg{top:2px!important}._2drG7{position:relative}._1x_bk{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2153
|
+
var styles$8 = {"input":"_kNu6_","disabled":"_3gbyC","dropdown":"_3b6vP","container":"_2drG7","countryCode":"_1x_bk"};
|
|
2154
|
+
var stylesheet$8="._kNu6_ input{padding-left:76px!important}._3gbyC input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._3gbyC input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3gbyC input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._3b6vP{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._3b6vP,._3b6vP._3gbyC:hover{background-color:transparent!important}._3b6vP:hover{background-color:rgba(50,54,58,.08)!important}._3b6vP:active{background-color:rgba(50,54,58,.11)!important}._3b6vP svg{top:2px!important}._2drG7{position:relative}._1x_bk{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2155
|
+
icons_index.styleInject(css_248z$8);
|
|
2156
2156
|
|
|
2157
2157
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2158
2158
|
let {
|
|
@@ -2218,21 +2218,21 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2218
2218
|
onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2219
2219
|
};
|
|
2220
2220
|
|
|
2221
|
-
const inputClassNames = classNames__default["default"](styles$
|
|
2222
|
-
[styles$
|
|
2221
|
+
const inputClassNames = classNames__default["default"](styles$8.input, {
|
|
2222
|
+
[styles$8.disabled]: isDisabled
|
|
2223
2223
|
});
|
|
2224
2224
|
const dropdownLabel = React.useMemo(() => countryCode ? "+".concat(libphonenumberJs.getCountryCallingCode(countryCode)) : undefined, [countryCode]);
|
|
2225
2225
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2226
|
-
className: styles$
|
|
2226
|
+
className: styles$8.container,
|
|
2227
2227
|
"data-testid": dataTestId
|
|
2228
2228
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2229
|
-
className: styles$
|
|
2229
|
+
className: styles$8.countryCode
|
|
2230
2230
|
}, dropdownLabel), /*#__PURE__*/React__default["default"].createElement(index.SelectMenu, {
|
|
2231
2231
|
label: " ",
|
|
2232
2232
|
defaultValue: countryCode,
|
|
2233
2233
|
onChange: value => setCountryCode(value),
|
|
2234
|
-
className: classNames__default["default"](styles$
|
|
2235
|
-
[styles$
|
|
2234
|
+
className: classNames__default["default"](styles$8.dropdown, {
|
|
2235
|
+
[styles$8.disabled]: isDisabled
|
|
2236
2236
|
}),
|
|
2237
2237
|
searchable: true,
|
|
2238
2238
|
disabled: isDisabled,
|
|
@@ -2894,10 +2894,10 @@ function Combobox(_ref) {
|
|
|
2894
2894
|
}, children);
|
|
2895
2895
|
}
|
|
2896
2896
|
|
|
2897
|
-
var css_248z$
|
|
2898
|
-
var styles$
|
|
2899
|
-
var stylesheet$
|
|
2900
|
-
icons_index.styleInject(css_248z$
|
|
2897
|
+
var css_248z$7 = "._2zb9Y :after{background-color:#515559!important}._2IA56>input:focus{box-shadow:none!important;border:1px solid #898989!important}._3SWYe{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}._3SWYe ._3WqmM ._RXIKL{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}._3SWYe ._3WqmM:first-child ._1BAK1{display:none}._3SWYe ._1v19M{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._3SWYe ._1v19M:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3SWYe ._1v19M:hover._1_WF2{background-color:#e4effa}._3SWYe ._1v19M._1_WF2{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3SWYe ._1v19M:active:not(._1_WF2){background-color:#e8e9e9}";
|
|
2898
|
+
var styles$7 = {"loadingSpinner":"_2zb9Y","ignoreFocusStyle":"_2IA56","flyout":"_3SWYe","group":"_3WqmM","header":"_RXIKL","divider":"_1BAK1","option":"_1v19M","selected":"_1_WF2"};
|
|
2899
|
+
var stylesheet$7="._2zb9Y :after{background-color:#515559!important}._2IA56>input:focus{box-shadow:none!important;border:1px solid #898989!important}._3SWYe{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}._3SWYe ._3WqmM ._RXIKL{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}._3SWYe ._3WqmM:first-child ._1BAK1{display:none}._3SWYe ._1v19M{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._3SWYe ._1v19M:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3SWYe ._1v19M:hover._1_WF2{background-color:#e4effa}._3SWYe ._1v19M._1_WF2{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3SWYe ._1v19M:active:not(._1_WF2){background-color:#e8e9e9}";
|
|
2900
|
+
icons_index.styleInject(css_248z$7);
|
|
2901
2901
|
|
|
2902
2902
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2903
2903
|
let {
|
|
@@ -3014,7 +3014,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3014
3014
|
return /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
3015
3015
|
role: "combobox",
|
|
3016
3016
|
className: classNames__default["default"](className, {
|
|
3017
|
-
[styles$
|
|
3017
|
+
[styles$7.ignoreFocusStyle]: hoveredOption || activeDescendantElement
|
|
3018
3018
|
}),
|
|
3019
3019
|
style: style,
|
|
3020
3020
|
id: id,
|
|
@@ -3027,7 +3027,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3027
3027
|
},
|
|
3028
3028
|
leftAddOn: leftAddOn,
|
|
3029
3029
|
rightAddOn: isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3030
|
-
className: styles$
|
|
3030
|
+
className: styles$7.loadingSpinner,
|
|
3031
3031
|
size: "xs",
|
|
3032
3032
|
show: isLoading,
|
|
3033
3033
|
"aria-hidden": true
|
|
@@ -3084,7 +3084,7 @@ const ComboboxFlyout = _ref => {
|
|
|
3084
3084
|
popper: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3085
3085
|
role: "listbox",
|
|
3086
3086
|
id: flyoutId,
|
|
3087
|
-
className: styles$
|
|
3087
|
+
className: styles$7.flyout,
|
|
3088
3088
|
style: flyoutDimensions,
|
|
3089
3089
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
3090
3090
|
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
@@ -3136,16 +3136,16 @@ function ComboboxGroup(_ref) {
|
|
|
3136
3136
|
}, children);
|
|
3137
3137
|
return hasFilteredOptions ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3138
3138
|
role: "group",
|
|
3139
|
-
className: styles$
|
|
3139
|
+
className: styles$7.group,
|
|
3140
3140
|
"aria-labelledby": headerElementId,
|
|
3141
3141
|
"aria-describedby": ariaDescribedBy,
|
|
3142
3142
|
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
3143
3143
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
3144
|
-
className: styles$
|
|
3144
|
+
className: styles$7.divider
|
|
3145
3145
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3146
3146
|
"aria-hidden": "true",
|
|
3147
3147
|
id: headerElementId,
|
|
3148
|
-
className: styles$
|
|
3148
|
+
className: styles$7.header
|
|
3149
3149
|
}, 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
|
|
3150
3150
|
;
|
|
3151
3151
|
}
|
|
@@ -3198,8 +3198,8 @@ function ComboboxOption(_ref) {
|
|
|
3198
3198
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3199
3199
|
role: "option",
|
|
3200
3200
|
id: containerId,
|
|
3201
|
-
className: classNames__default["default"](styles$
|
|
3202
|
-
[styles$
|
|
3201
|
+
className: classNames__default["default"](styles$7.option, {
|
|
3202
|
+
[styles$7.selected]: isOptionSelected
|
|
3203
3203
|
}),
|
|
3204
3204
|
onClick: () => {
|
|
3205
3205
|
setCommittedInputValue(label);
|
|
@@ -3216,10 +3216,10 @@ function ComboboxOption(_ref) {
|
|
|
3216
3216
|
}, label);
|
|
3217
3217
|
}
|
|
3218
3218
|
|
|
3219
|
-
var css_248z$
|
|
3220
|
-
var styles$
|
|
3221
|
-
var stylesheet$
|
|
3222
|
-
icons_index.styleInject(css_248z$
|
|
3219
|
+
var css_248z$6 = "._1M_49{display:flex}._Jxwjj{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Jxwjj._3zBXt{background-color:#fff}._Jxwjj._3LuEh,._Jxwjj._3zBXt._2zzNe:not(._Jxwjj._3zBXt._1brLq),body.keyboard-user ._Jxwjj._3zBXt._39458:not(._1M3QF){background-color:#0b6ed0}._Jxwjj._3LuEh._1brLq._2zzNe,._Jxwjj._3LuEh._1M3QF._1brLq,._Jxwjj._3LuEh._1M3QF._39458{opacity:.4}._3VMBW{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._3VMBW:focus{z-index:1}._3WrqK{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}._3WrqK svg{margin-left:1px}._3WrqK._3zBXt{background-color:#0b6ed0;border-color:transparent}._3WrqK._3zBXt svg{fill:#fff!important}._3WrqK._3zBXt:not(._3BOLL):hover{background-color:#085caf!important}._3WrqK._3zBXt:not(._3BOLL):active{background-color:#0854a1!important}._3WrqK._3zBXt._3BOLL{opacity:.4}._3WrqK._3zBXt._3BOLL svg{background-color:transparent}._3WrqK._3LuEh{border-color:#0b6ed0;background-color:#fff}._3WrqK._3LuEh svg{fill:#0b6ed0!important}._3WrqK._3LuEh:not(._3BOLL):hover{background-color:#eef5fc!important}._3WrqK._3LuEh:not(._3BOLL):active{background-color:#e1edf9!important}._3WrqK._3LuEh._3BOLL{opacity:.4}._3WrqK._3LuEh._3BOLL svg{background-color:transparent}._2coMa{width:260px}";
|
|
3220
|
+
var styles$6 = {"container":"_1M_49","divider":"_Jxwjj","primary":"_3zBXt","mainButtonFocus":"_39458","mainButtonDisabled":"_1M3QF","dropdownButtonFocus":"_2zzNe","dropdownButtonDisabled":"_1brLq","secondary":"_3LuEh","mainButton":"_3VMBW","dropdownButton":"_3WrqK","disabled":"_3BOLL","dropdownOption":"_2coMa"};
|
|
3221
|
+
var stylesheet$6="._1M_49{display:flex}._Jxwjj{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._Jxwjj._3zBXt{background-color:#fff}._Jxwjj._3LuEh,._Jxwjj._3zBXt._2zzNe:not(._Jxwjj._3zBXt._1brLq),body.keyboard-user ._Jxwjj._3zBXt._39458:not(._1M3QF){background-color:#0b6ed0}._Jxwjj._3LuEh._1brLq._2zzNe,._Jxwjj._3LuEh._1M3QF._1brLq,._Jxwjj._3LuEh._1M3QF._39458{opacity:.4}._3VMBW{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._3VMBW:focus{z-index:1}._3WrqK{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}._3WrqK svg{margin-left:1px}._3WrqK._3zBXt{background-color:#0b6ed0;border-color:transparent}._3WrqK._3zBXt svg{fill:#fff!important}._3WrqK._3zBXt:not(._3BOLL):hover{background-color:#085caf!important}._3WrqK._3zBXt:not(._3BOLL):active{background-color:#0854a1!important}._3WrqK._3zBXt._3BOLL{opacity:.4}._3WrqK._3zBXt._3BOLL svg{background-color:transparent}._3WrqK._3LuEh{border-color:#0b6ed0;background-color:#fff}._3WrqK._3LuEh svg{fill:#0b6ed0!important}._3WrqK._3LuEh:not(._3BOLL):hover{background-color:#eef5fc!important}._3WrqK._3LuEh:not(._3BOLL):active{background-color:#e1edf9!important}._3WrqK._3LuEh._3BOLL{opacity:.4}._3WrqK._3LuEh._3BOLL svg{background-color:transparent}._2coMa{width:260px}";
|
|
3222
|
+
icons_index.styleInject(css_248z$6);
|
|
3223
3223
|
|
|
3224
3224
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3225
3225
|
let {
|
|
@@ -3253,14 +3253,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3253
3253
|
});
|
|
3254
3254
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3255
3255
|
"data-testid": dataTestId,
|
|
3256
|
-
className: classNames__default["default"](styles$
|
|
3256
|
+
className: classNames__default["default"](styles$6.container, className),
|
|
3257
3257
|
ref: ref
|
|
3258
3258
|
}, /*#__PURE__*/React__default["default"].createElement(index.Button, {
|
|
3259
3259
|
kind: kind,
|
|
3260
3260
|
"data-testid": index.getSubDataTestId(dataTestId, 'button'),
|
|
3261
|
-
className: classNames__default["default"](styles$
|
|
3262
|
-
[styles$
|
|
3263
|
-
[styles$
|
|
3261
|
+
className: classNames__default["default"](styles$6.mainButton, {
|
|
3262
|
+
[styles$6.disabled]: isButtonDisabled,
|
|
3263
|
+
[styles$6.primary]: kind === 'primary'
|
|
3264
3264
|
}),
|
|
3265
3265
|
onClick: onClick,
|
|
3266
3266
|
disabled: isButtonDisabled,
|
|
@@ -3271,13 +3271,13 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3271
3271
|
onFocus: () => setMainButtonHasFocus(true),
|
|
3272
3272
|
onBlur: () => setMainButtonHasFocus(false)
|
|
3273
3273
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3274
|
-
className: classNames__default["default"](styles$
|
|
3275
|
-
[styles$
|
|
3276
|
-
[styles$
|
|
3277
|
-
[styles$
|
|
3278
|
-
[styles$
|
|
3279
|
-
[styles$
|
|
3280
|
-
[styles$
|
|
3274
|
+
className: classNames__default["default"](styles$6.divider, {
|
|
3275
|
+
[styles$6.primary]: kind === 'primary',
|
|
3276
|
+
[styles$6.secondary]: kind === 'secondary',
|
|
3277
|
+
[styles$6.mainButtonFocus]: mainButtonHasFocus,
|
|
3278
|
+
[styles$6.dropdownButtonFocus]: dropdownButtonHasFocus,
|
|
3279
|
+
[styles$6.mainButtonDisabled]: isButtonDisabled,
|
|
3280
|
+
[styles$6.dropdownButtonDisabled]: isDropdownDisabled
|
|
3281
3281
|
})
|
|
3282
3282
|
}), /*#__PURE__*/React__default["default"].createElement(index.Dropdown, {
|
|
3283
3283
|
"data-testid": index.getSubDataTestId(dataTestId, 'dropdown'),
|
|
@@ -3288,10 +3288,10 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3288
3288
|
}, /*#__PURE__*/React__default["default"].createElement(index.DropdownButton // `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
3289
3289
|
, {
|
|
3290
3290
|
label: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null),
|
|
3291
|
-
className: classNames__default["default"](styles$
|
|
3292
|
-
[styles$
|
|
3293
|
-
[styles$
|
|
3294
|
-
[styles$
|
|
3291
|
+
className: classNames__default["default"](styles$6.dropdownButton, {
|
|
3292
|
+
[styles$6.disabled]: isDropdownDisabled,
|
|
3293
|
+
[styles$6.primary]: kind === 'primary',
|
|
3294
|
+
[styles$6.secondary]: kind === 'secondary'
|
|
3295
3295
|
}),
|
|
3296
3296
|
ref: dropdownButtonRef,
|
|
3297
3297
|
tabIndex: -1,
|
|
@@ -3313,15 +3313,15 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3313
3313
|
label: "",
|
|
3314
3314
|
disabled: isDisabled,
|
|
3315
3315
|
onSelect: onClick,
|
|
3316
|
-
className: styles$
|
|
3316
|
+
className: styles$6.dropdownOption,
|
|
3317
3317
|
ref: ref
|
|
3318
3318
|
}, children);
|
|
3319
3319
|
});
|
|
3320
3320
|
|
|
3321
|
-
var css_248z$
|
|
3322
|
-
var styles$
|
|
3323
|
-
var stylesheet$
|
|
3324
|
-
icons_index.styleInject(css_248z$
|
|
3321
|
+
var css_248z$5 = "._ZDiXd{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}._ZDiXd:hover:not(._BddvJ){background-color:rgba(50,54,58,.08)}._ZDiXd:hover:not(._BddvJ)._99tcn{border-color:#085caf;background-color:rgba(11,110,208,.04)}._ZDiXd:hover:not(._BddvJ)._99tcn ._2-k7i{color:#32363a}._ZDiXd:hover:not(._BddvJ)._99tcn ._3CNg0{fill:#32363a}._ZDiXd:hover:not(._BddvJ)._99tcn ._2tDhr{fill:#085caf}._ZDiXd:hover:not(._BddvJ)._99tcn ._3wnCM{background-color:rgba(11,110,208,.11)}._ZDiXd:hover:not(._BddvJ)._99tcn ._3wnCM ._3SYgR{color:#085caf}._ZDiXd:active:not(._BddvJ){background-color:#e8e9e9}._ZDiXd:active:not(._BddvJ)._99tcn{background-color:rgba(11,110,208,.11);border-color:#0854a1}._ZDiXd:active:not(._BddvJ)._99tcn ._2tDhr{fill:#0854a1}._ZDiXd:active:not(._BddvJ)._99tcn ._3wnCM{background-color:rgba(11,110,208,.11)}._ZDiXd:active:not(._BddvJ)._99tcn ._3wnCM ._3SYgR{color:#0854a1}._ZDiXd._BddvJ{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._ZDiXd._99tcn{border-color:#0b6ed0}._3CNg0{fill:#515559;margin-right:4px}._2-k7i{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._2-k7i+._3wnCM{margin-left:6px}._2-k7i._BddvJ{color:#74777a}._3wnCM{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}._3SYgR{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._2tDhr{fill:#515559}._2tDhr._BddvJ,._2tDhr._BddvJ._99tcn{fill:rgba(116,119,122,.4)}._2tDhr._99tcn{fill:#0b6ed0}._2tDhr._3kl42{transform:rotate(-180deg)}body.keyboard-user ._ZDiXd:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3322
|
+
var styles$5 = {"button":"_ZDiXd","disabled":"_BddvJ","selected":"_99tcn","label":"_2-k7i","lockIcon":"_3CNg0","chevronIcon":"_2tDhr","selectedFiltersContainer":"_3wnCM","selectedFilters":"_3SYgR","open":"_3kl42"};
|
|
3323
|
+
var stylesheet$5="._ZDiXd{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}._ZDiXd:hover:not(._BddvJ){background-color:rgba(50,54,58,.08)}._ZDiXd:hover:not(._BddvJ)._99tcn{border-color:#085caf;background-color:rgba(11,110,208,.04)}._ZDiXd:hover:not(._BddvJ)._99tcn ._2-k7i{color:#32363a}._ZDiXd:hover:not(._BddvJ)._99tcn ._3CNg0{fill:#32363a}._ZDiXd:hover:not(._BddvJ)._99tcn ._2tDhr{fill:#085caf}._ZDiXd:hover:not(._BddvJ)._99tcn ._3wnCM{background-color:rgba(11,110,208,.11)}._ZDiXd:hover:not(._BddvJ)._99tcn ._3wnCM ._3SYgR{color:#085caf}._ZDiXd:active:not(._BddvJ){background-color:#e8e9e9}._ZDiXd:active:not(._BddvJ)._99tcn{background-color:rgba(11,110,208,.11);border-color:#0854a1}._ZDiXd:active:not(._BddvJ)._99tcn ._2tDhr{fill:#0854a1}._ZDiXd:active:not(._BddvJ)._99tcn ._3wnCM{background-color:rgba(11,110,208,.11)}._ZDiXd:active:not(._BddvJ)._99tcn ._3wnCM ._3SYgR{color:#0854a1}._ZDiXd._BddvJ{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._ZDiXd._99tcn{border-color:#0b6ed0}._3CNg0{fill:#515559;margin-right:4px}._2-k7i{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._2-k7i+._3wnCM{margin-left:6px}._2-k7i._BddvJ{color:#74777a}._3wnCM{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}._3SYgR{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._2tDhr{fill:#515559}._2tDhr._BddvJ,._2tDhr._BddvJ._99tcn{fill:rgba(116,119,122,.4)}._2tDhr._99tcn{fill:#0b6ed0}._2tDhr._3kl42{transform:rotate(-180deg)}body.keyboard-user ._ZDiXd:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3324
|
+
icons_index.styleInject(css_248z$5);
|
|
3325
3325
|
|
|
3326
3326
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3327
3327
|
let {
|
|
@@ -3346,9 +3346,9 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3346
3346
|
} = index.useTranslation();
|
|
3347
3347
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
3348
3348
|
type: "button",
|
|
3349
|
-
className: classNames__default["default"](className, styles$
|
|
3350
|
-
[styles$
|
|
3351
|
-
[styles$
|
|
3349
|
+
className: classNames__default["default"](className, styles$5.button, {
|
|
3350
|
+
[styles$5.disabled]: isDisabled,
|
|
3351
|
+
[styles$5.selected]: !!selectedFilters
|
|
3352
3352
|
}),
|
|
3353
3353
|
onClick: e => {
|
|
3354
3354
|
if (isDisabled) {
|
|
@@ -3373,33 +3373,33 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3373
3373
|
}), isLocked && /*#__PURE__*/React__default["default"].createElement(icons_index.LockIcon, {
|
|
3374
3374
|
size: "small",
|
|
3375
3375
|
id: lockIconElementId,
|
|
3376
|
-
className: styles$
|
|
3376
|
+
className: styles$5.lockIcon // @ts-ignore - 'locked' is not in the current list of translations
|
|
3377
3377
|
,
|
|
3378
3378
|
"aria-label": translate('locked')
|
|
3379
3379
|
}), label && /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3380
3380
|
lightTheme: true
|
|
3381
3381
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3382
3382
|
id: labelElementId,
|
|
3383
|
-
className: classNames__default["default"](styles$
|
|
3384
|
-
[styles$
|
|
3383
|
+
className: classNames__default["default"](styles$5.label, {
|
|
3384
|
+
[styles$5.disabled]: isDisabled
|
|
3385
3385
|
})
|
|
3386
3386
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3387
3387
|
show: true,
|
|
3388
3388
|
size: "xs",
|
|
3389
3389
|
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3390
3390
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3391
|
-
className: styles$
|
|
3391
|
+
className: styles$5.selectedFiltersContainer
|
|
3392
3392
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3393
3393
|
lightTheme: true
|
|
3394
3394
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3395
3395
|
id: selectedFiltersElementId,
|
|
3396
|
-
className: styles$
|
|
3396
|
+
className: styles$5.selectedFilters
|
|
3397
3397
|
}, selectedFilters))), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3398
3398
|
size: "medium",
|
|
3399
|
-
className: classNames__default["default"](styles$
|
|
3400
|
-
[styles$
|
|
3401
|
-
[styles$
|
|
3402
|
-
[styles$
|
|
3399
|
+
className: classNames__default["default"](styles$5.chevronIcon, {
|
|
3400
|
+
[styles$5.disabled]: isDisabled,
|
|
3401
|
+
[styles$5.selected]: !!selectedFilters,
|
|
3402
|
+
[styles$5.open]: isOpen
|
|
3403
3403
|
}),
|
|
3404
3404
|
"aria-hidden": true
|
|
3405
3405
|
}));
|
|
@@ -3408,11 +3408,11 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3408
3408
|
const {
|
|
3409
3409
|
useContext: useMenuContext,
|
|
3410
3410
|
Provider: MenuContextProvider
|
|
3411
|
-
} = index.createContextUtilities(
|
|
3411
|
+
} = index.createContextUtilities();
|
|
3412
3412
|
const {
|
|
3413
3413
|
useContext: intermediaryUseMenuContext,
|
|
3414
3414
|
Provider: IntermediaryMenuContextProvider
|
|
3415
|
-
} = index.createContextUtilities(
|
|
3415
|
+
} = index.createContextUtilities();
|
|
3416
3416
|
|
|
3417
3417
|
const PaneContextProvider = _ref => {
|
|
3418
3418
|
let {
|
|
@@ -3441,6 +3441,7 @@ const usePaneContext = childItemRef => {
|
|
|
3441
3441
|
};
|
|
3442
3442
|
|
|
3443
3443
|
/* eslint-disable max-classes-per-file */
|
|
3444
|
+
|
|
3444
3445
|
const Menu = _ref => {
|
|
3445
3446
|
var _process$env;
|
|
3446
3447
|
|
|
@@ -3460,10 +3461,35 @@ const Menu = _ref => {
|
|
|
3460
3461
|
}
|
|
3461
3462
|
|
|
3462
3463
|
const [open, setOpen] = index.useControllableState(isOpen, onIsOpenChange, isOpen);
|
|
3464
|
+
const [maskHeight, setMaskHeight] = React.useState(null);
|
|
3465
|
+
const [submenus, setSubmenus] = React.useState(new Set());
|
|
3466
|
+
const triggerRef = React.useRef(null);
|
|
3467
|
+
|
|
3468
|
+
const registerSubmenu = (submenuId, submenuIsOpen) => {
|
|
3469
|
+
setSubmenus(subs => {
|
|
3470
|
+
const clone = new Set(subs);
|
|
3471
|
+
|
|
3472
|
+
if (submenuIsOpen) {
|
|
3473
|
+
clone.add(submenuId);
|
|
3474
|
+
} else {
|
|
3475
|
+
clone.delete(submenuId);
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
return clone;
|
|
3479
|
+
});
|
|
3480
|
+
};
|
|
3481
|
+
|
|
3482
|
+
const openPaneDepth = React.useMemo(() => open ? submenus.size + 1 : 0, [submenus, open]);
|
|
3463
3483
|
return /*#__PURE__*/React__default["default"].createElement(MenuContextProvider, {
|
|
3464
3484
|
value: {
|
|
3465
3485
|
dataTestId,
|
|
3466
|
-
isDisabled
|
|
3486
|
+
isDisabled,
|
|
3487
|
+
openPaneDepth,
|
|
3488
|
+
registerSubmenu,
|
|
3489
|
+
maskHeight,
|
|
3490
|
+
setMaskHeight,
|
|
3491
|
+
open,
|
|
3492
|
+
triggerRef
|
|
3467
3493
|
}
|
|
3468
3494
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Root, {
|
|
3469
3495
|
open: open,
|
|
@@ -3504,75 +3530,78 @@ class PointerEvent extends Event {
|
|
|
3504
3530
|
|
|
3505
3531
|
}
|
|
3506
3532
|
|
|
3507
|
-
var css_248z$
|
|
3508
|
-
var styles$
|
|
3509
|
-
var stylesheet$
|
|
3510
|
-
icons_index.styleInject(css_248z$
|
|
3533
|
+
var css_248z$4 = "._7Wh65{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._7Wh65>._ThTtS{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}._7Wh65>._ThTtS:hover:not([aria-disabled=true]){background-color:#f5f5f5}._7Wh65>._ThTtS:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._7Wh65>._ThTtS+._3t4Ia{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._7Wh65>._ThTtS[data-state=open]+._3t4Ia{transform:rotate(-180deg) translateY(50%)}._7Wh65>._ThTtS[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._7Wh65>._ThTtS[aria-disabled=true]+._3t4Ia{fill:#515559;opacity:.4}._34uG6>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;width:var(--radix-dropdown-menu-trigger-width);min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:1!important}._34uG6>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._1HfOQ{margin:0;padding:4px 0;background:#fff;transition:.35s;opacity:1;overflow:scroll;width:var(--radix-dropdown-menu-trigger-width);min-width:200px;max-height:350px}._1HfOQ._3i-OI{padding-top:0}._1HfOQ._2cJ34{margin-left:30px;opacity:0;pointer-events:none}._1HfOQ._2kD_5{margin-left:-30px;pointer-events:none}._3a_F6{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%}._3a_F6._2BVPf{cursor:unset}._3a_F6 ._3yLji{fill:#32363a;margin-right:4px}._3a_F6[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3a_F6[aria-disabled=true]{cursor:not-allowed;opacity:.65}._3a_F6._3mk0r{padding-right:32px}._3a_F6._3mk0r ._3t4Ia{position:absolute;height:100%;right:3px;fill:#515559}._3a_F6._2392Y{pointer-events:none}._1k1vD{position:-webkit-sticky;position:sticky;top:0;padding-top:4px;background-color:#fff;z-index:1;border-bottom:1px solid #e8e8e8}._1k1vD>._3g6Wm{padding:4px 8px 8px;border-radius:4px 4px 0 0}._1k1vD>._3g6Wm>._1XXHu{width:100%}._1k1vD>._3g6Wm._2392Y{pointer-events:none}";
|
|
3534
|
+
var styles$4 = {"buttonContainer":"_7Wh65","button":"_ThTtS","rightIcon":"_3t4Ia","maskContainer":"_34uG6","flyout":"_1HfOQ","containsStickyBox":"_3i-OI","animatedRight":"_2cJ34","animatedLeft":"_2kD_5","menuItem":"_3a_F6","noItems":"_2BVPf","backIcon":"_3yLji","subMenu":"_3mk0r","unresponsive":"_2392Y","stickyBox":"_1k1vD","searchBox":"_3g6Wm","searchInput":"_1XXHu"};
|
|
3535
|
+
var stylesheet$4="._7Wh65{position:relative;display:inline-flex;height:36px;min-width:60px;cursor:pointer}._7Wh65>._ThTtS{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}._7Wh65>._ThTtS:hover:not([aria-disabled=true]){background-color:#f5f5f5}._7Wh65>._ThTtS:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._7Wh65>._ThTtS+._3t4Ia{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._7Wh65>._ThTtS[data-state=open]+._3t4Ia{transform:rotate(-180deg) translateY(50%)}._7Wh65>._ThTtS[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._7Wh65>._ThTtS[aria-disabled=true]+._3t4Ia{fill:#515559;opacity:.4}._34uG6>[data-radix-popper-content-wrapper]{overflow:hidden;background-color:#fff;width:var(--radix-dropdown-menu-trigger-width);min-width:200px!important;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);border-radius:4px;z-index:1!important}._34uG6>[data-radix-popper-content-wrapper] [data-radix-popper-content-wrapper]{transform:translateZ(0)!important}._1HfOQ{margin:0;padding:4px 0;background:#fff;transition:.35s;opacity:1;overflow:scroll;width:var(--radix-dropdown-menu-trigger-width);min-width:200px;max-height:350px}._1HfOQ._3i-OI{padding-top:0}._1HfOQ._2cJ34{margin-left:30px;opacity:0;pointer-events:none}._1HfOQ._2kD_5{margin-left:-30px;pointer-events:none}._3a_F6{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%}._3a_F6._2BVPf{cursor:unset}._3a_F6 ._3yLji{fill:#32363a;margin-right:4px}._3a_F6[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3a_F6[aria-disabled=true]{cursor:not-allowed;opacity:.65}._3a_F6._3mk0r{padding-right:32px}._3a_F6._3mk0r ._3t4Ia{position:absolute;height:100%;right:3px;fill:#515559}._3a_F6._2392Y{pointer-events:none}._1k1vD{position:-webkit-sticky;position:sticky;top:0;padding-top:4px;background-color:#fff;z-index:1;border-bottom:1px solid #e8e8e8}._1k1vD>._3g6Wm{padding:4px 8px 8px;border-radius:4px 4px 0 0}._1k1vD>._3g6Wm>._1XXHu{width:100%}._1k1vD>._3g6Wm._2392Y{pointer-events:none}";
|
|
3536
|
+
icons_index.styleInject(css_248z$4);
|
|
3511
3537
|
|
|
3512
3538
|
/* eslint-disable import/prefer-default-export */
|
|
3513
3539
|
const DATA_TESTID_SUFFIXES = {
|
|
3514
3540
|
MENU_PANE: 'menupane',
|
|
3515
3541
|
MENU_ITEM: 'menuitem',
|
|
3516
3542
|
MENU_BUTTON: 'menubutton',
|
|
3517
|
-
MENU_SEARCH: 'menusearch'
|
|
3543
|
+
MENU_SEARCH: 'menusearch',
|
|
3544
|
+
MENU_BACK: 'menuback'
|
|
3545
|
+
};
|
|
3546
|
+
const KEYS = {
|
|
3547
|
+
OPEN_SUBMENU: ['ArrowRight', 'Enter', ' '],
|
|
3548
|
+
CLOSE_SUBMENU: ['ArrowLeft'],
|
|
3549
|
+
IGNORED_BY_SEARCH_INPUT: ['Escape', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End']
|
|
3518
3550
|
};
|
|
3519
3551
|
|
|
3520
3552
|
const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3521
3553
|
let {
|
|
3522
3554
|
asChild,
|
|
3523
3555
|
children,
|
|
3556
|
+
className,
|
|
3524
3557
|
...rest
|
|
3525
3558
|
} = _ref;
|
|
3526
3559
|
const {
|
|
3527
3560
|
dataTestId: rootDataTestId,
|
|
3528
|
-
isDisabled
|
|
3561
|
+
isDisabled,
|
|
3562
|
+
triggerRef
|
|
3529
3563
|
} = useMenuContext();
|
|
3530
3564
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3531
3565
|
className: classNames__default["default"]({
|
|
3532
|
-
[styles$
|
|
3566
|
+
[styles$4.buttonContainer]: !asChild
|
|
3533
3567
|
})
|
|
3534
3568
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Trigger, _extends__default["default"]({}, rest, {
|
|
3535
3569
|
"aria-disabled": isDisabled,
|
|
3536
|
-
className: classNames__default["default"]({
|
|
3537
|
-
[styles$
|
|
3570
|
+
className: classNames__default["default"](className, {
|
|
3571
|
+
[styles$4.button]: !asChild
|
|
3538
3572
|
}),
|
|
3539
3573
|
asChild: asChild,
|
|
3540
|
-
ref: ref,
|
|
3574
|
+
ref: index.mergeRefs(triggerRef, ref),
|
|
3541
3575
|
"data-testid": index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_BUTTON)
|
|
3542
3576
|
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3543
|
-
className: styles$
|
|
3577
|
+
className: styles$4.rightIcon,
|
|
3544
3578
|
"aria-hidden": "true"
|
|
3545
3579
|
}));
|
|
3546
3580
|
});
|
|
3547
3581
|
|
|
3548
|
-
const MenuSearch = _ref => {
|
|
3582
|
+
const MenuSearch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3549
3583
|
let {
|
|
3550
|
-
setSearchValue
|
|
3551
|
-
items,
|
|
3552
|
-
paneRef
|
|
3584
|
+
setSearchValue
|
|
3553
3585
|
} = _ref;
|
|
3554
3586
|
const itemRef = React.useRef(null);
|
|
3555
3587
|
const inputRef = React.useRef(null);
|
|
3556
3588
|
const {
|
|
3557
3589
|
translate
|
|
3558
3590
|
} = index.useTranslation();
|
|
3559
|
-
const noMatchesText = translate('menu.noItemsToDisplay');
|
|
3560
3591
|
const searchText = translate('searchText');
|
|
3561
3592
|
const {
|
|
3562
3593
|
dataTestId: menuParentDataTestId,
|
|
3563
|
-
searchValue = ''
|
|
3594
|
+
searchValue = '',
|
|
3595
|
+
isInteractive,
|
|
3596
|
+
closeSubmenu,
|
|
3597
|
+
flyoutRef
|
|
3564
3598
|
} = usePaneContext();
|
|
3565
|
-
const dataTestId = menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH);
|
|
3566
|
-
|
|
3567
|
-
const [zeroSearchResults, setZeroSearchResults] = React.useState();
|
|
3568
|
-
React.useEffect(() => {
|
|
3569
|
-
setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0);
|
|
3570
|
-
}, [items, searchValue]);
|
|
3599
|
+
const dataTestId = menuParentDataTestId === null || menuParentDataTestId === void 0 ? void 0 : menuParentDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_SEARCH);
|
|
3571
3600
|
React.useEffect(() => () => setSearchValue(''), [setSearchValue]);
|
|
3572
|
-
const [previouslyFocusedElement, setPreviouslyFocusedElement] = React.useState(); //
|
|
3601
|
+
const [previouslyFocusedElement, setPreviouslyFocusedElement] = React.useState(); // hack to keep focus on search input on mouse leave
|
|
3573
3602
|
|
|
3574
|
-
index.useEventListener(
|
|
3575
|
-
if (e.target === e.currentTarget && previouslyFocusedElement === itemRef.current) {
|
|
3603
|
+
index.useEventListener(flyoutRef, 'focus', e => {
|
|
3604
|
+
if (e.target === e.currentTarget && previouslyFocusedElement === itemRef.current && isInteractive) {
|
|
3576
3605
|
var _inputRef$current;
|
|
3577
3606
|
|
|
3578
3607
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
@@ -3583,7 +3612,9 @@ const MenuSearch = _ref => {
|
|
|
3583
3612
|
isCaptureEvent: true
|
|
3584
3613
|
});
|
|
3585
3614
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
3586
|
-
className: styles$
|
|
3615
|
+
className: classNames__default["default"](styles$4.searchBox, {
|
|
3616
|
+
[styles$4.unresponsive]: !isInteractive
|
|
3617
|
+
}) // prevents dropdown from closing
|
|
3587
3618
|
,
|
|
3588
3619
|
onSelect: e => e.preventDefault(),
|
|
3589
3620
|
onFocus: () => {
|
|
@@ -3592,7 +3623,7 @@ const MenuSearch = _ref => {
|
|
|
3592
3623
|
return (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
3593
3624
|
},
|
|
3594
3625
|
role: undefined,
|
|
3595
|
-
ref: itemRef
|
|
3626
|
+
ref: index.mergeRefs(itemRef, ref)
|
|
3596
3627
|
}, /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
3597
3628
|
"data-testid": dataTestId,
|
|
3598
3629
|
role: "searchbox",
|
|
@@ -3600,18 +3631,18 @@ const MenuSearch = _ref => {
|
|
|
3600
3631
|
onChange: e => setSearchValue(e.target.value),
|
|
3601
3632
|
placeholder: searchText,
|
|
3602
3633
|
onKeyDown: e => {
|
|
3603
|
-
var _e$target;
|
|
3634
|
+
var _e$target, _context, _context2;
|
|
3604
3635
|
|
|
3605
3636
|
// stop propagation to prevent typeAhead
|
|
3606
|
-
e.stopPropagation();
|
|
3607
|
-
const keysToForward = ['Escape', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', 'Home', 'End']; // allow caret movement through text entry, but close searchable submenu if on the very left
|
|
3637
|
+
e.stopPropagation(); // allow caret movement through text entry, but close searchable submenu if on the very left
|
|
3608
3638
|
|
|
3609
|
-
if (((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0) {
|
|
3610
|
-
|
|
3639
|
+
if (((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.selectionStart) === 0 && _includesInstanceProperty__default["default"](_context = KEYS.CLOSE_SUBMENU).call(_context, e.key)) {
|
|
3640
|
+
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3641
|
+
return;
|
|
3611
3642
|
} // forward keypress directly to `Item` to let Radix handle keyboard navigation
|
|
3612
3643
|
|
|
3613
3644
|
|
|
3614
|
-
if (_includesInstanceProperty__default["default"](
|
|
3645
|
+
if (_includesInstanceProperty__default["default"](_context2 = KEYS.IGNORED_BY_SEARCH_INPUT).call(_context2, e.key)) {
|
|
3615
3646
|
var _itemRef$current;
|
|
3616
3647
|
|
|
3617
3648
|
// `view` types are incompatible
|
|
@@ -3624,15 +3655,28 @@ const MenuSearch = _ref => {
|
|
|
3624
3655
|
}
|
|
3625
3656
|
},
|
|
3626
3657
|
leftAddOn: /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null),
|
|
3627
|
-
ref: inputRef
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3658
|
+
ref: inputRef,
|
|
3659
|
+
className: styles$4.searchInput
|
|
3660
|
+
})));
|
|
3661
|
+
});
|
|
3662
|
+
|
|
3663
|
+
function usePaneSearch(externalSearchValue, onSearchValueChange, items) {
|
|
3664
|
+
const [internalSearchValue, setSearchValue] = index.useControllableState(externalSearchValue, onSearchValueChange, externalSearchValue);
|
|
3665
|
+
const [zeroSearchResults, setZeroSearchResults] = React.useState();
|
|
3666
|
+
const {
|
|
3667
|
+
translate
|
|
3668
|
+
} = index.useTranslation();
|
|
3669
|
+
const noMatchesText = translate('menu.noItemsToDisplay');
|
|
3670
|
+
React.useEffect(() => {
|
|
3671
|
+
setZeroSearchResults((items === null || items === void 0 ? void 0 : items.filter(item => item.element.current).length) === 0);
|
|
3672
|
+
}, [items, internalSearchValue]);
|
|
3673
|
+
return {
|
|
3674
|
+
internalSearchValue,
|
|
3675
|
+
setSearchValue,
|
|
3676
|
+
zeroSearchResults,
|
|
3677
|
+
noMatchesText
|
|
3678
|
+
};
|
|
3679
|
+
}
|
|
3636
3680
|
|
|
3637
3681
|
const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
3638
3682
|
let {
|
|
@@ -3642,45 +3686,130 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3642
3686
|
searchValue: externalSearchValue,
|
|
3643
3687
|
onSearchValueChange,
|
|
3644
3688
|
isSearchFilteringDisabled = false,
|
|
3689
|
+
className,
|
|
3690
|
+
style,
|
|
3645
3691
|
...rest
|
|
3646
3692
|
} = _ref;
|
|
3647
|
-
const [
|
|
3693
|
+
const [items, setItems] = React.useState([]);
|
|
3694
|
+
const flyoutRef = React.useRef(null);
|
|
3695
|
+
const {
|
|
3696
|
+
internalSearchValue,
|
|
3697
|
+
setSearchValue,
|
|
3698
|
+
zeroSearchResults,
|
|
3699
|
+
noMatchesText
|
|
3700
|
+
} = usePaneSearch(externalSearchValue, onSearchValueChange, items);
|
|
3648
3701
|
const portalTarget = index.usePortalTarget();
|
|
3649
3702
|
const [side, align] = React.useMemo(() => {
|
|
3650
3703
|
var _placement$split, _placement$split2;
|
|
3651
3704
|
|
|
3652
3705
|
return (_placement$split = placement === null || placement === void 0 ? void 0 : (_placement$split2 = placement.split) === null || _placement$split2 === void 0 ? void 0 : _placement$split2.call(placement, '-')) !== null && _placement$split !== void 0 ? _placement$split : [];
|
|
3653
3706
|
}, [placement]);
|
|
3654
|
-
const [items, setItems] = React.useState([]);
|
|
3655
3707
|
const {
|
|
3656
|
-
dataTestId: rootDataTestId
|
|
3657
|
-
|
|
3708
|
+
dataTestId: rootDataTestId,
|
|
3709
|
+
openPaneDepth,
|
|
3710
|
+
setMaskHeight,
|
|
3711
|
+
maskHeight,
|
|
3712
|
+
open,
|
|
3713
|
+
triggerRef
|
|
3714
|
+
} = useMenuContext(); // 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.
|
|
3715
|
+
// We cache the pixel value here, to use it later if the user returns to this pane from a submenu.
|
|
3716
|
+
|
|
3717
|
+
const initialHeightOfThisPane = React.useRef(null);
|
|
3718
|
+
index.useDidUpdate(() => {
|
|
3719
|
+
if (openPaneDepth === 1) {
|
|
3720
|
+
if (initialHeightOfThisPane.current === null) {
|
|
3721
|
+
window.requestAnimationFrame(() => {
|
|
3722
|
+
var _flyoutRef$current$cl, _flyoutRef$current;
|
|
3723
|
+
|
|
3724
|
+
initialHeightOfThisPane.current = (_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null;
|
|
3725
|
+
setMaskHeight(initialHeightOfThisPane.current);
|
|
3726
|
+
});
|
|
3727
|
+
} else {
|
|
3728
|
+
setMaskHeight(initialHeightOfThisPane.current);
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
}, [openPaneDepth]);
|
|
3658
3732
|
const dataTestId = index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_PANE);
|
|
3659
|
-
const
|
|
3733
|
+
const animatedLeft = React.useMemo(() => openPaneDepth > 1, [openPaneDepth]);
|
|
3734
|
+
index.useEventListener(flyoutRef, 'keydown', e => {
|
|
3735
|
+
var _context;
|
|
3736
|
+
|
|
3737
|
+
return _includesInstanceProperty__default["default"](_context = Object.values(KEYS).flat()).call(_context, e.key) && index.setIsKeyboardUser(true);
|
|
3738
|
+
}, {
|
|
3739
|
+
additionalDependencies: [openPaneDepth]
|
|
3740
|
+
});
|
|
3741
|
+
index.useEventListener(flyoutRef, 'pointerenter', () => index.setIsKeyboardUser(false), {
|
|
3742
|
+
additionalDependencies: [openPaneDepth]
|
|
3743
|
+
});
|
|
3744
|
+
const defaultSide = React.useMemo(() => {
|
|
3745
|
+
var _triggerRef$current;
|
|
3746
|
+
|
|
3747
|
+
const rect = triggerRef === null || triggerRef === void 0 ? void 0 : (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.getBoundingClientRect();
|
|
3748
|
+
|
|
3749
|
+
if (!rect) {
|
|
3750
|
+
return 'bottom';
|
|
3751
|
+
} // hard coded in Menu.less
|
|
3752
|
+
|
|
3753
|
+
|
|
3754
|
+
let maxHeight = 350;
|
|
3755
|
+
|
|
3756
|
+
if (flyoutRef.current) {
|
|
3757
|
+
const computedString = window.getComputedStyle(flyoutRef.current).maxHeight.slice(0, -2);
|
|
3758
|
+
|
|
3759
|
+
if (computedString !== '' && !Number.isNaN(+computedString)) {
|
|
3760
|
+
maxHeight = +computedString;
|
|
3761
|
+
}
|
|
3762
|
+
}
|
|
3763
|
+
|
|
3764
|
+
const distanceToBottom = window.innerHeight - rect.bottom;
|
|
3765
|
+
const distanceToTop = rect.top;
|
|
3766
|
+
|
|
3767
|
+
if (distanceToBottom > maxHeight) {
|
|
3768
|
+
return 'bottom';
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
if (distanceToTop > maxHeight) {
|
|
3772
|
+
return 'top';
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
return 'bottom';
|
|
3776
|
+
}, [open, triggerRef]);
|
|
3660
3777
|
return /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3661
3778
|
items: items,
|
|
3662
3779
|
setItems: setItems,
|
|
3663
3780
|
value: {
|
|
3664
3781
|
dataTestId,
|
|
3665
3782
|
searchValue: internalSearchValue,
|
|
3666
|
-
|
|
3667
|
-
|
|
3783
|
+
isSearchFilteringDisabled,
|
|
3784
|
+
isInteractive: !animatedLeft,
|
|
3785
|
+
flyoutRef
|
|
3668
3786
|
}
|
|
3669
3787
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Portal, {
|
|
3670
3788
|
container: portalTarget || undefined
|
|
3789
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3790
|
+
className: styles$4.maskContainer
|
|
3671
3791
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Content, _extends__default["default"]({}, rest, {
|
|
3672
3792
|
sideOffset: 6,
|
|
3673
3793
|
loop: true,
|
|
3674
|
-
side: side ||
|
|
3794
|
+
side: side || defaultSide,
|
|
3675
3795
|
align: align || 'start',
|
|
3676
|
-
|
|
3677
|
-
|
|
3678
|
-
"
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3796
|
+
ref: index.mergeRefs(ref, flyoutRef),
|
|
3797
|
+
"data-testid": dataTestId,
|
|
3798
|
+
className: classNames__default["default"](className, {
|
|
3799
|
+
[styles$4.animatedLeft]: animatedLeft,
|
|
3800
|
+
[styles$4.containsStickyBox]: isSearchable
|
|
3801
|
+
}, styles$4.flyout),
|
|
3802
|
+
style: { ...style,
|
|
3803
|
+
height: internalSearchValue && openPaneDepth === 1 ? undefined : maskHeight !== null && maskHeight !== void 0 ? maskHeight : undefined
|
|
3804
|
+
}
|
|
3805
|
+
}), isSearchable && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3806
|
+
className: styles$4.stickyBox
|
|
3807
|
+
}, /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
3808
|
+
setSearchValue: setSearchValue
|
|
3809
|
+
})), zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3810
|
+
className: classNames__default["default"](styles$4.menuItem, styles$4.noItems),
|
|
3811
|
+
"aria-live": "assertive"
|
|
3812
|
+
}, noMatchesText), children))));
|
|
3684
3813
|
});
|
|
3685
3814
|
|
|
3686
3815
|
const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -3698,7 +3827,10 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3698
3827
|
dataTestId: menuParentDataTestId,
|
|
3699
3828
|
childIndex: index$1,
|
|
3700
3829
|
searchValue,
|
|
3701
|
-
isSearchFilteringDisabled
|
|
3830
|
+
isSearchFilteringDisabled,
|
|
3831
|
+
isInteractive,
|
|
3832
|
+
closeSubmenu,
|
|
3833
|
+
flyoutRef
|
|
3702
3834
|
} = usePaneContext(itemRef);
|
|
3703
3835
|
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));
|
|
3704
3836
|
const isVisible = React.useMemo(() => {
|
|
@@ -3707,12 +3839,39 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3707
3839
|
const searchMatcher = label !== null && label !== void 0 ? label : typeof children === 'string' ? children : undefined;
|
|
3708
3840
|
return isSearchFilteringDisabled || !searchValue || (searchMatcher === null || searchMatcher === void 0 ? void 0 : _includesInstanceProperty__default["default"](_context = searchMatcher.toLowerCase()).call(_context, searchValue.toLowerCase()));
|
|
3709
3841
|
}, [children, searchValue, label, isSearchFilteringDisabled]);
|
|
3842
|
+
|
|
3843
|
+
const handleFocus = () => {
|
|
3844
|
+
if (itemRef.current && flyoutRef.current && index.getIsKeyboardUser()) {
|
|
3845
|
+
const stickyBoxHeight = 93; // if the top of the focused menu item is beneath the sticky box
|
|
3846
|
+
|
|
3847
|
+
if (itemRef.current.offsetTop < flyoutRef.current.scrollTop + stickyBoxHeight) {
|
|
3848
|
+
// scroll down a little
|
|
3849
|
+
flyoutRef.current.scrollTop = itemRef.current.offsetTop - stickyBoxHeight;
|
|
3850
|
+
}
|
|
3851
|
+
}
|
|
3852
|
+
};
|
|
3853
|
+
|
|
3710
3854
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
3711
3855
|
asChild: asChild,
|
|
3712
3856
|
"aria-disabled": isDisabled,
|
|
3713
|
-
className: classNames__default["default"](className, styles$
|
|
3857
|
+
className: classNames__default["default"](className, styles$4.menuItem, {
|
|
3858
|
+
[styles$4.unresponsive]: !isInteractive
|
|
3859
|
+
}),
|
|
3714
3860
|
"data-testid": dataTestId,
|
|
3715
|
-
ref: index.mergeRefs(ref, itemRef)
|
|
3861
|
+
ref: index.mergeRefs(ref, itemRef),
|
|
3862
|
+
onKeyDown: e => {
|
|
3863
|
+
var _context2;
|
|
3864
|
+
|
|
3865
|
+
if (!isInteractive) {
|
|
3866
|
+
e.preventDefault();
|
|
3867
|
+
return;
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
if (_includesInstanceProperty__default["default"](_context2 = KEYS.CLOSE_SUBMENU).call(_context2, e.key)) {
|
|
3871
|
+
closeSubmenu === null || closeSubmenu === void 0 ? void 0 : closeSubmenu(e);
|
|
3872
|
+
}
|
|
3873
|
+
},
|
|
3874
|
+
onFocus: handleFocus // stop radix from closing the menu on selection of disabled item
|
|
3716
3875
|
// other pointer and keyboard events still work, even when disabled
|
|
3717
3876
|
,
|
|
3718
3877
|
onSelect: e => isDisabled ? e.preventDefault() : onSelect === null || onSelect === void 0 ? void 0 : onSelect()
|
|
@@ -3728,57 +3887,187 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3728
3887
|
searchValue: externalSearchValue,
|
|
3729
3888
|
onSearchValueChange,
|
|
3730
3889
|
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren = false,
|
|
3890
|
+
className,
|
|
3891
|
+
style,
|
|
3731
3892
|
...rest
|
|
3732
3893
|
} = _ref;
|
|
3733
|
-
const
|
|
3734
|
-
const paneRef = React.useRef(null);
|
|
3894
|
+
const [items, setItems] = React.useState([]);
|
|
3735
3895
|
const {
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
} =
|
|
3741
|
-
const
|
|
3742
|
-
const
|
|
3896
|
+
internalSearchValue,
|
|
3897
|
+
setSearchValue,
|
|
3898
|
+
zeroSearchResults,
|
|
3899
|
+
noMatchesText
|
|
3900
|
+
} = usePaneSearch(externalSearchValue, onSearchValueChange, items);
|
|
3901
|
+
const internalId = index.useId();
|
|
3902
|
+
const triggerRef = React.useRef(null);
|
|
3903
|
+
const flyoutRef = React.useRef(null);
|
|
3904
|
+
const searchItemRef = React.useRef(null);
|
|
3905
|
+
const backButtonRef = React.useRef(null);
|
|
3906
|
+
const {
|
|
3907
|
+
dataTestId: paneContainingTriggerDataTestId,
|
|
3908
|
+
childIndex: triggerIndex,
|
|
3909
|
+
searchValue: paneContainingTriggerSearchValue,
|
|
3910
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForPaneContainingTrigger,
|
|
3911
|
+
isInteractive: paneContainingTriggerIsInteractive,
|
|
3912
|
+
closeSubmenu: closeSubmenuContainingTrigger
|
|
3913
|
+
} = usePaneContext(triggerRef);
|
|
3914
|
+
const {
|
|
3915
|
+
openPaneDepth: totalOpenPaneDepth,
|
|
3916
|
+
registerSubmenu,
|
|
3917
|
+
setMaskHeight
|
|
3918
|
+
} = useMenuContext();
|
|
3919
|
+
const thisPanesDepth = React.useRef(totalOpenPaneDepth + 1).current;
|
|
3920
|
+
const paneDataTestId = index.getSubDataTestId(paneContainingTriggerDataTestId, String(triggerIndex));
|
|
3921
|
+
const backButtonDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_BACK);
|
|
3743
3922
|
const triggerDataTestId = paneDataTestId === null || paneDataTestId === void 0 ? void 0 : paneDataTestId.replace(DATA_TESTID_SUFFIXES.MENU_PANE, DATA_TESTID_SUFFIXES.MENU_ITEM);
|
|
3744
|
-
const
|
|
3745
|
-
const isVisible = React.useMemo(() => {
|
|
3923
|
+
const triggerIsVisible = React.useMemo(() => {
|
|
3746
3924
|
var _context;
|
|
3747
3925
|
|
|
3748
|
-
return
|
|
3749
|
-
}, [
|
|
3750
|
-
|
|
3751
|
-
|
|
3926
|
+
return isSearchFilteringDisabledForPaneContainingTrigger || !paneContainingTriggerSearchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, paneContainingTriggerSearchValue.toLowerCase());
|
|
3927
|
+
}, [paneContainingTriggerSearchValue, label, isSearchFilteringDisabledForPaneContainingTrigger]);
|
|
3928
|
+
const [isPaneInDOM, setIsPaneInDOM] = React.useState(false);
|
|
3929
|
+
const [isFrameAfterPaneAddedToDOM, setIsFrameAfterPaneAddedToDOM] = React.useState(false);
|
|
3930
|
+
const [isTransitioningFromRight, setIsTransitioningFromRight] = React.useState(false);
|
|
3931
|
+
index.useDidUpdate(() => {
|
|
3932
|
+
if (isPaneInDOM) {
|
|
3933
|
+
setIsTransitioningFromRight(true); // trigger css transition
|
|
3934
|
+
|
|
3935
|
+
setIsFrameAfterPaneAddedToDOM(true);
|
|
3936
|
+
window.requestAnimationFrame(() => setIsFrameAfterPaneAddedToDOM(false));
|
|
3937
|
+
}
|
|
3938
|
+
|
|
3939
|
+
registerSubmenu(internalId, isPaneInDOM);
|
|
3940
|
+
}, [isPaneInDOM]);
|
|
3941
|
+
React.useEffect(() => () => registerSubmenu(internalId, false), []);
|
|
3942
|
+
|
|
3943
|
+
const closeThisSubmenu = e => {
|
|
3944
|
+
// prevent closing the entire menu, and Radix keyboard navigation
|
|
3945
|
+
e.preventDefault();
|
|
3946
|
+
registerSubmenu(internalId, false);
|
|
3947
|
+
};
|
|
3948
|
+
|
|
3949
|
+
index.useDidUpdate(() => {
|
|
3950
|
+
if (thisPanesDepth === totalOpenPaneDepth) {
|
|
3951
|
+
window.requestAnimationFrame(() => {
|
|
3952
|
+
var _flyoutRef$current$cl, _flyoutRef$current;
|
|
3953
|
+
|
|
3954
|
+
setMaskHeight((_flyoutRef$current$cl = (_flyoutRef$current = flyoutRef.current) === null || _flyoutRef$current === void 0 ? void 0 : _flyoutRef$current.clientHeight) !== null && _flyoutRef$current$cl !== void 0 ? _flyoutRef$current$cl : null);
|
|
3955
|
+
});
|
|
3956
|
+
}
|
|
3957
|
+
}, [totalOpenPaneDepth, internalSearchValue]);
|
|
3958
|
+
const animatedLeft = React.useMemo(() => thisPanesDepth < totalOpenPaneDepth, [totalOpenPaneDepth]);
|
|
3959
|
+
const animatedRight = React.useMemo(() => thisPanesDepth > totalOpenPaneDepth || isFrameAfterPaneAddedToDOM, [totalOpenPaneDepth, isFrameAfterPaneAddedToDOM]);
|
|
3960
|
+
|
|
3961
|
+
const handlePaneTransitionEnd = () => {
|
|
3962
|
+
if (animatedLeft) {
|
|
3963
|
+
return;
|
|
3964
|
+
}
|
|
3965
|
+
|
|
3966
|
+
if (animatedRight) {
|
|
3967
|
+
setIsPaneInDOM(false);
|
|
3968
|
+
|
|
3969
|
+
if (index.getIsKeyboardUser()) {
|
|
3970
|
+
var _triggerRef$current;
|
|
3971
|
+
|
|
3972
|
+
(_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
|
|
3973
|
+
}
|
|
3974
|
+
} else {
|
|
3975
|
+
var _flyoutRef$current2;
|
|
3976
|
+
|
|
3977
|
+
// if the newly closed submenu doesn't place the focus on its trigger
|
|
3978
|
+
if (!((_flyoutRef$current2 = flyoutRef.current) !== null && _flyoutRef$current2 !== void 0 && _flyoutRef$current2.contains(document.activeElement)) && index.getIsKeyboardUser()) {
|
|
3979
|
+
if (searchItemRef.current) {
|
|
3980
|
+
searchItemRef.current.focus();
|
|
3981
|
+
} else if (backButtonRef.current) {
|
|
3982
|
+
backButtonRef.current.focus();
|
|
3983
|
+
}
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
setIsTransitioningFromRight(false);
|
|
3987
|
+
}
|
|
3988
|
+
};
|
|
3989
|
+
|
|
3990
|
+
return triggerIsVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, {
|
|
3991
|
+
open: isPaneInDOM
|
|
3992
|
+
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, {
|
|
3993
|
+
className: classNames__default["default"](styles$4.menuItem, styles$4.subMenu, {
|
|
3994
|
+
[styles$4.unresponsive]: !paneContainingTriggerIsInteractive
|
|
3995
|
+
}),
|
|
3752
3996
|
"data-testid": triggerDataTestId,
|
|
3753
3997
|
"aria-disabled": isDisabled,
|
|
3754
|
-
|
|
3755
|
-
|
|
3998
|
+
ref: triggerRef,
|
|
3999
|
+
onClick: () => !isDisabled && setIsPaneInDOM(true),
|
|
4000
|
+
onKeyDown: e => {
|
|
4001
|
+
var _context2, _context3;
|
|
4002
|
+
|
|
4003
|
+
if (!paneContainingTriggerIsInteractive) {
|
|
4004
|
+
e.preventDefault();
|
|
4005
|
+
return;
|
|
4006
|
+
}
|
|
4007
|
+
|
|
4008
|
+
if (!isDisabled && _includesInstanceProperty__default["default"](_context2 = KEYS.OPEN_SUBMENU).call(_context2, e.key)) {
|
|
4009
|
+
setIsPaneInDOM(true);
|
|
4010
|
+
} else if (_includesInstanceProperty__default["default"](_context3 = KEYS.CLOSE_SUBMENU).call(_context3, e.key)) {
|
|
4011
|
+
closeSubmenuContainingTrigger === null || closeSubmenuContainingTrigger === void 0 ? void 0 : closeSubmenuContainingTrigger(e);
|
|
4012
|
+
}
|
|
4013
|
+
}
|
|
3756
4014
|
}, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
3757
|
-
className: styles$
|
|
4015
|
+
className: styles$4.rightIcon
|
|
3758
4016
|
})), /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3759
4017
|
items: items,
|
|
3760
4018
|
setItems: setItems,
|
|
3761
4019
|
value: {
|
|
3762
4020
|
dataTestId: paneDataTestId,
|
|
3763
4021
|
searchValue: internalSearchValue,
|
|
3764
|
-
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren
|
|
4022
|
+
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren,
|
|
4023
|
+
isInteractive: !isTransitioningFromRight && !animatedLeft && !animatedRight,
|
|
4024
|
+
closeSubmenu: closeThisSubmenu,
|
|
4025
|
+
flyoutRef
|
|
3765
4026
|
}
|
|
3766
4027
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubContent, _extends__default["default"]({}, rest, {
|
|
3767
|
-
className: styles$3.flyout,
|
|
3768
4028
|
loop: true,
|
|
3769
4029
|
"data-testid": paneDataTestId,
|
|
3770
|
-
ref: index.mergeRefs(ref,
|
|
3771
|
-
|
|
4030
|
+
ref: index.mergeRefs(ref, flyoutRef),
|
|
4031
|
+
className: classNames__default["default"](className, styles$4.flyout, styles$4.containsStickyBox, {
|
|
4032
|
+
[styles$4.animatedRight]: animatedRight,
|
|
4033
|
+
[styles$4.animatedLeft]: animatedLeft
|
|
4034
|
+
}),
|
|
4035
|
+
onTransitionEnd: handlePaneTransitionEnd,
|
|
4036
|
+
style: { ...style,
|
|
4037
|
+
zIndex: thisPanesDepth
|
|
4038
|
+
}
|
|
4039
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4040
|
+
className: styles$4.stickyBox
|
|
4041
|
+
}, isSearchable && /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
3772
4042
|
setSearchValue: setSearchValue,
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
4043
|
+
ref: searchItemRef
|
|
4044
|
+
}), /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
4045
|
+
className: classNames__default["default"](styles$4.menuItem, {
|
|
4046
|
+
[styles$4.unresponsive]: isTransitioningFromRight || animatedLeft || animatedRight
|
|
4047
|
+
}),
|
|
4048
|
+
"data-testid": backButtonDataTestId,
|
|
4049
|
+
onSelect: closeThisSubmenu,
|
|
4050
|
+
ref: backButtonRef,
|
|
4051
|
+
onKeyDown: e => {
|
|
4052
|
+
var _context4;
|
|
4053
|
+
|
|
4054
|
+
if (_includesInstanceProperty__default["default"](_context4 = KEYS.CLOSE_SUBMENU).call(_context4, e.key)) {
|
|
4055
|
+
closeThisSubmenu(e);
|
|
4056
|
+
}
|
|
4057
|
+
}
|
|
4058
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ArrowLeftIcon, {
|
|
4059
|
+
size: "small",
|
|
4060
|
+
className: styles$4.backIcon
|
|
4061
|
+
}), label)), zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4062
|
+
className: classNames__default["default"](styles$4.menuItem, styles$4.noItems),
|
|
4063
|
+
"aria-live": "assertive"
|
|
4064
|
+
}, noMatchesText), children))) : null;
|
|
3776
4065
|
});
|
|
3777
4066
|
|
|
3778
|
-
var css_248z$
|
|
3779
|
-
var styles$
|
|
3780
|
-
var stylesheet$
|
|
3781
|
-
icons_index.styleInject(css_248z$
|
|
4067
|
+
var css_248z$3 = "._1RFYd{background-color:rgba(0,0,0,.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}._30YWr{visibility:hidden}";
|
|
4068
|
+
var styles$3 = {"overlay":"_1RFYd","hidden":"_30YWr"};
|
|
4069
|
+
var stylesheet$3="._1RFYd{background-color:rgba(0,0,0,.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}._30YWr{visibility:hidden}";
|
|
4070
|
+
icons_index.styleInject(css_248z$3);
|
|
3782
4071
|
|
|
3783
4072
|
/**
|
|
3784
4073
|
* Adds an overlay to an area that obscures visibility and disables background elements.
|
|
@@ -3805,10 +4094,10 @@ const useOverlay = _ref => {
|
|
|
3805
4094
|
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
3806
4095
|
const overlay = document.createElement('div');
|
|
3807
4096
|
overlay.id = overlayId;
|
|
3808
|
-
overlay.classList.add(styles$
|
|
4097
|
+
overlay.classList.add(styles$3.overlay);
|
|
3809
4098
|
if (onClick) overlay.addEventListener('click', onClick);
|
|
3810
4099
|
if (dataTestId) overlay.dataset.testid = dataTestId;
|
|
3811
|
-
if (!isVisible) overlay.classList.add(styles$
|
|
4100
|
+
if (!isVisible) overlay.classList.add(styles$3.hidden);
|
|
3812
4101
|
if (zIndex) overlay.style.zIndex = zIndex.toString();
|
|
3813
4102
|
containerNode.appendChild(overlay);
|
|
3814
4103
|
containerNode.style.position = 'relative';
|
|
@@ -3827,12 +4116,12 @@ const useOverlay = _ref => {
|
|
|
3827
4116
|
Array.from(containerNode.children).forEach(child => {
|
|
3828
4117
|
if (!_includesInstanceProperty__default["default"](ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3829
4118
|
});
|
|
3830
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$
|
|
4119
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$3.hidden);
|
|
3831
4120
|
} else {
|
|
3832
4121
|
Array.from(containerNode.children).forEach(child => {
|
|
3833
4122
|
child.removeAttribute('inert');
|
|
3834
4123
|
});
|
|
3835
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$
|
|
4124
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$3.hidden);
|
|
3836
4125
|
}
|
|
3837
4126
|
|
|
3838
4127
|
return () => {
|
|
@@ -3843,10 +4132,10 @@ const useOverlay = _ref => {
|
|
|
3843
4132
|
}, [containerRef, isVisible, ignoreIds, overlayId]);
|
|
3844
4133
|
};
|
|
3845
4134
|
|
|
3846
|
-
var css_248z$
|
|
3847
|
-
var styles$
|
|
3848
|
-
var stylesheet$
|
|
3849
|
-
icons_index.styleInject(css_248z$
|
|
4135
|
+
var css_248z$2 = "._1WNuf{position:absolute;top:0;height:100%;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._1yTAE{visibility:hidden}._2OcWO{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._3haSl{padding-top:8px}._3NLtp{margin-left:12px}";
|
|
4136
|
+
var styles$2 = {"drawer":"_1WNuf","hidden":"_1yTAE","header":"_2OcWO","title":"_3haSl","closeButton":"_3NLtp"};
|
|
4137
|
+
var stylesheet$2="._1WNuf{position:absolute;top:0;height:100%;color:#32363a;background-color:#fff;border-right:1px solid #eee;z-index:1000;padding:12px 20px 20px;transition:left .5s}._1yTAE{visibility:hidden}._2OcWO{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._3haSl{padding-top:8px}._3NLtp{margin-left:12px}";
|
|
4138
|
+
icons_index.styleInject(css_248z$2);
|
|
3850
4139
|
|
|
3851
4140
|
const Drawer = _ref => {
|
|
3852
4141
|
var _containerRef$current;
|
|
@@ -3930,9 +4219,9 @@ const Drawer = _ref => {
|
|
|
3930
4219
|
|
|
3931
4220
|
return domReady ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default["default"].createElement("aside", {
|
|
3932
4221
|
id: drawerId,
|
|
3933
|
-
className: classNames__default["default"](styles$
|
|
3934
|
-
[styles$
|
|
3935
|
-
[styles$
|
|
4222
|
+
className: classNames__default["default"](styles$2.drawer, {
|
|
4223
|
+
[styles$2.hidden]: isHidden,
|
|
4224
|
+
[styles$2.closing]: isClosing
|
|
3936
4225
|
}),
|
|
3937
4226
|
style: {
|
|
3938
4227
|
width,
|
|
@@ -3949,12 +4238,12 @@ const Drawer = _ref => {
|
|
|
3949
4238
|
}, /*#__PURE__*/React__default["default"].createElement(index.PortalTargetProvider, {
|
|
3950
4239
|
target: drawerRef.current
|
|
3951
4240
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3952
|
-
className: styles$
|
|
4241
|
+
className: styles$2.header
|
|
3953
4242
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3954
|
-
className: styles$
|
|
4243
|
+
className: styles$2.title,
|
|
3955
4244
|
"data-testid": index.getSubDataTestId(dataTestId, 'title')
|
|
3956
4245
|
}, title), /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
3957
|
-
className: styles$
|
|
4246
|
+
className: styles$2.closeButton,
|
|
3958
4247
|
onClick: close,
|
|
3959
4248
|
ref: closeButtonRef,
|
|
3960
4249
|
"data-testid": index.getSubDataTestId(dataTestId, 'close-button'),
|
|
@@ -3964,10 +4253,10 @@ const Drawer = _ref => {
|
|
|
3964
4253
|
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
3965
4254
|
};
|
|
3966
4255
|
|
|
3967
|
-
var css_248z = ".
|
|
3968
|
-
var styles = {"container":"
|
|
3969
|
-
var stylesheet=".
|
|
3970
|
-
icons_index.styleInject(css_248z);
|
|
4256
|
+
var css_248z$1 = "._3VS3B{display:inline-block;position:relative}._gFB4N{width:120px}._gFB4N ._PhuOD.__w9jd{transform:rotate(-180deg)}._gFB4N ._PhuOD._Od72K{fill:#9d9fa1;opacity:.4}._2gN7p>input:focus{box-shadow:none!important;border:1px solid #898989!important}._3OCEc{width:120px}._3OCEc ._1CKaG._2CLav{background-color:#efefef;border-radius:6px}._PhuOD{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._PhuOD.__w9jd{transform:rotate(-180deg)}";
|
|
4257
|
+
var styles$1 = {"container":"_3VS3B","input":"_gFB4N","icon":"_PhuOD","open":"__w9jd","disabled":"_Od72K","ignoreFocusStyle":"_2gN7p","flyout":"_3OCEc","option":"_1CKaG","exactMatch":"_2CLav"};
|
|
4258
|
+
var stylesheet$1="._3VS3B{display:inline-block;position:relative}._gFB4N{width:120px}._gFB4N ._PhuOD.__w9jd{transform:rotate(-180deg)}._gFB4N ._PhuOD._Od72K{fill:#9d9fa1;opacity:.4}._2gN7p>input:focus{box-shadow:none!important;border:1px solid #898989!important}._3OCEc{width:120px}._3OCEc ._1CKaG._2CLav{background-color:#efefef;border-radius:6px}._PhuOD{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._PhuOD.__w9jd{transform:rotate(-180deg)}";
|
|
4259
|
+
icons_index.styleInject(css_248z$1);
|
|
3971
4260
|
|
|
3972
4261
|
const TimeDropdown = _ref => {
|
|
3973
4262
|
let {
|
|
@@ -4008,7 +4297,7 @@ const TimeDropdown = _ref => {
|
|
|
4008
4297
|
"aria-labelledby": ariaLabelledBy,
|
|
4009
4298
|
"aria-describedby": ariaDescribedBy,
|
|
4010
4299
|
"data-testid": dataTestId && "".concat(dataTestId, "-dropdown"),
|
|
4011
|
-
className: styles.flyout,
|
|
4300
|
+
className: styles$1.flyout,
|
|
4012
4301
|
onMouseOver: () => setIsOptionHovered(true),
|
|
4013
4302
|
onMouseLeave: () => setIsOptionHovered(false)
|
|
4014
4303
|
}, items.map((item, index$1) => /*#__PURE__*/React__default["default"].createElement(index.FlyoutOption, {
|
|
@@ -4024,8 +4313,8 @@ const TimeDropdown = _ref => {
|
|
|
4024
4313
|
},
|
|
4025
4314
|
onClick: () => onClick(index$1),
|
|
4026
4315
|
"data-testid": dataTestId && "".concat(dataTestId, "-option-").concat(index$1),
|
|
4027
|
-
className: classNames__default["default"](styles.option, {
|
|
4028
|
-
[styles.exactMatch]: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && scrolledToItem.isExactMatch && !isOptionHovered
|
|
4316
|
+
className: classNames__default["default"](styles$1.option, {
|
|
4317
|
+
[styles$1.exactMatch]: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && scrolledToItem.isExactMatch && !isOptionHovered
|
|
4029
4318
|
})
|
|
4030
4319
|
}, item.label))),
|
|
4031
4320
|
anchorNode: inputRef.current,
|
|
@@ -4328,8 +4617,8 @@ const TimeInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4328
4617
|
"aria-expanded": ariaExpanded,
|
|
4329
4618
|
"aria-controls": ariaControls,
|
|
4330
4619
|
ref: ref,
|
|
4331
|
-
className: classNames__default["default"](styles.input, {
|
|
4332
|
-
[styles.ignoreFocusStyle]: !!ariaActiveDescendant || isOptionHovered
|
|
4620
|
+
className: classNames__default["default"](styles$1.input, {
|
|
4621
|
+
[styles$1.ignoreFocusStyle]: !!ariaActiveDescendant || isOptionHovered
|
|
4333
4622
|
}),
|
|
4334
4623
|
"aria-invalid": isInvalid,
|
|
4335
4624
|
onKeyDown: handleKeyDown,
|
|
@@ -4354,8 +4643,8 @@ const TimePickerIcon = _ref => {
|
|
|
4354
4643
|
"aria-hidden": "true",
|
|
4355
4644
|
tabIndex: -1,
|
|
4356
4645
|
disabled: isDisabled,
|
|
4357
|
-
className: classNames__default["default"](styles.icon, {
|
|
4358
|
-
[styles.open]: isOpen
|
|
4646
|
+
className: classNames__default["default"](styles$1.icon, {
|
|
4647
|
+
[styles$1.open]: isOpen
|
|
4359
4648
|
})
|
|
4360
4649
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
4361
4650
|
onClick: !isDisabled ? () => {
|
|
@@ -4559,7 +4848,7 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
4559
4848
|
|
|
4560
4849
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4561
4850
|
id: timePickerId,
|
|
4562
|
-
className: styles.container
|
|
4851
|
+
className: styles$1.container
|
|
4563
4852
|
}, /*#__PURE__*/React__default["default"].createElement(TimeInput, {
|
|
4564
4853
|
id: inputId,
|
|
4565
4854
|
dataTestId: dataTestId,
|
|
@@ -4602,6 +4891,116 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
4602
4891
|
}));
|
|
4603
4892
|
});
|
|
4604
4893
|
|
|
4894
|
+
const {
|
|
4895
|
+
useContext: useToggleButtonGroupContext,
|
|
4896
|
+
Provider: ToggleButtonGroupContextProvider
|
|
4897
|
+
} = index.createContextUtilities(null);
|
|
4898
|
+
|
|
4899
|
+
var css_248z = "._Eqzfa{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._2fL3L{background-color:rgba(50,54,58,.08)}._2Dta6{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._MStoc{color:rgba(81,85,89,.4);cursor:not-allowed}._1R4ME{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._2YQ34{color:#085caf;border-color:#085caf}._2YQ34,._ZZWjS{background:rgba(11,110,208,.11)}._ZZWjS{color:#0854a1;border-color:#0854a1}._1fVCN{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._3-FZM{position:relative;display:inline-grid}._3-FZM svg{fill:currentColor}._3-FZM ._N98cl{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._3-FZM ._N98cl+._Vgj9i{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}._3-FZM ._N98cl+._Vgj9i._OPgZ-{padding:5px;max-width:36px;min-width:36px}._3-FZM ._N98cl+._Vgj9i._3ujgP{padding:0 16px}._3-FZM ._N98cl+._Vgj9i._3BEun{padding:0 16px 0 12px}._3-FZM ._N98cl:hover+._Vgj9i{background-color:rgba(50,54,58,.08)}._3-FZM ._N98cl:disabled+._Vgj9i{color:rgba(81,85,89,.4);cursor:not-allowed}._3-FZM ._N98cl:active+._Vgj9i,._3-FZM ._N98cl:focus:active+._Vgj9i{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._3-FZM ._N98cl:checked+._Vgj9i{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._3-FZM ._N98cl:checked:hover+._Vgj9i{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._3-FZM ._N98cl:checked:disabled+._Vgj9i{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._3-FZM ._N98cl:checked:active+._Vgj9i,._3-FZM ._N98cl:checked:focus:active+._Vgj9i{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._3nsSq{display:inline-flex;position:relative}._3nsSq:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._3nsSq>*{flex-shrink:0;flex-grow:0}._38Xb2{border:none;margin:0;padding:0}._38Xb2 legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}body.keyboard-user ._3-FZM ._N98cl:active:focus+._Vgj9i,body.keyboard-user ._3-FZM ._N98cl:focus+._Vgj9i{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4900
|
+
var styles = {"default":"_Eqzfa","hovered":"_2fL3L","pressed":"_2Dta6","disabled":"_MStoc","selectedDefault":"_1R4ME","selectedHovered":"_2YQ34","selectedPressed":"_ZZWjS","selectedDisabled":"_1fVCN","toggleContainer":"_3-FZM","toggleInput":"_N98cl","toggleButton":"_Vgj9i","iconOnly":"_OPgZ-","text":"_3ujgP","iconText":"_3BEun","toggleButtonGroup":"_3nsSq","toggleButtonGroupFieldset":"_38Xb2"};
|
|
4901
|
+
var stylesheet="._Eqzfa{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._2fL3L{background-color:rgba(50,54,58,.08)}._2Dta6{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._MStoc{color:rgba(81,85,89,.4);cursor:not-allowed}._1R4ME{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._2YQ34{color:#085caf;border-color:#085caf}._2YQ34,._ZZWjS{background:rgba(11,110,208,.11)}._ZZWjS{color:#0854a1;border-color:#0854a1}._1fVCN{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._3-FZM{position:relative;display:inline-grid}._3-FZM svg{fill:currentColor}._3-FZM ._N98cl{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._3-FZM ._N98cl+._Vgj9i{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}._3-FZM ._N98cl+._Vgj9i._OPgZ-{padding:5px;max-width:36px;min-width:36px}._3-FZM ._N98cl+._Vgj9i._3ujgP{padding:0 16px}._3-FZM ._N98cl+._Vgj9i._3BEun{padding:0 16px 0 12px}._3-FZM ._N98cl:hover+._Vgj9i{background-color:rgba(50,54,58,.08)}._3-FZM ._N98cl:disabled+._Vgj9i{color:rgba(81,85,89,.4);cursor:not-allowed}._3-FZM ._N98cl:active+._Vgj9i,._3-FZM ._N98cl:focus:active+._Vgj9i{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._3-FZM ._N98cl:checked+._Vgj9i{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._3-FZM ._N98cl:checked:hover+._Vgj9i{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._3-FZM ._N98cl:checked:disabled+._Vgj9i{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._3-FZM ._N98cl:checked:active+._Vgj9i,._3-FZM ._N98cl:checked:focus:active+._Vgj9i{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._3nsSq{display:inline-flex;position:relative}._3nsSq:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._3nsSq>*{flex-shrink:0;flex-grow:0}._38Xb2{border:none;margin:0;padding:0}._38Xb2 legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}body.keyboard-user ._3-FZM ._N98cl:active:focus+._Vgj9i,body.keyboard-user ._3-FZM ._N98cl:focus+._Vgj9i{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4902
|
+
icons_index.styleInject(css_248z);
|
|
4903
|
+
|
|
4904
|
+
const ToggleButtonGroup = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4905
|
+
let {
|
|
4906
|
+
children,
|
|
4907
|
+
value,
|
|
4908
|
+
onChange,
|
|
4909
|
+
name,
|
|
4910
|
+
label,
|
|
4911
|
+
isDisabled,
|
|
4912
|
+
'aria-label': ariaLabel,
|
|
4913
|
+
'aria-labelledby': ariaLabelledby
|
|
4914
|
+
} = _ref;
|
|
4915
|
+
const backupName = index.useId();
|
|
4916
|
+
return /*#__PURE__*/React__default["default"].createElement(ToggleButtonGroupContextProvider, {
|
|
4917
|
+
value: {
|
|
4918
|
+
value,
|
|
4919
|
+
onChange,
|
|
4920
|
+
name: name || backupName,
|
|
4921
|
+
isDisabled
|
|
4922
|
+
}
|
|
4923
|
+
}, /*#__PURE__*/React__default["default"].createElement("fieldset", {
|
|
4924
|
+
className: styles.toggleButtonGroupFieldset,
|
|
4925
|
+
disabled: isDisabled // eslint-disable-next-line jsx-a11y/no-noninteractive-element-to-interactive-role
|
|
4926
|
+
,
|
|
4927
|
+
role: "radiogroup",
|
|
4928
|
+
"aria-label": ariaLabel,
|
|
4929
|
+
"aria-labelledby": ariaLabelledby,
|
|
4930
|
+
ref: ref
|
|
4931
|
+
}, label && /*#__PURE__*/React__default["default"].createElement("legend", null, label), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4932
|
+
className: styles.toggleButtonGroup
|
|
4933
|
+
}, children)));
|
|
4934
|
+
});
|
|
4935
|
+
|
|
4936
|
+
const ToggleButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
4937
|
+
let {
|
|
4938
|
+
children,
|
|
4939
|
+
isActivated,
|
|
4940
|
+
onChange,
|
|
4941
|
+
value,
|
|
4942
|
+
isDisabled,
|
|
4943
|
+
kind = 'icon-text',
|
|
4944
|
+
'aria-label': ariaLabel,
|
|
4945
|
+
'aria-labelledby': ariaLabelledby,
|
|
4946
|
+
name: inputName,
|
|
4947
|
+
dataTestId
|
|
4948
|
+
} = _ref;
|
|
4949
|
+
const id = index.useId();
|
|
4950
|
+
const groupContext = useToggleButtonGroupContext();
|
|
4951
|
+
const inGroup = groupContext !== null;
|
|
4952
|
+
let checked = isActivated;
|
|
4953
|
+
let disabled = isDisabled;
|
|
4954
|
+
let name = inputName;
|
|
4955
|
+
|
|
4956
|
+
let handleChange = () => {
|
|
4957
|
+
if (onChange) {
|
|
4958
|
+
onChange(checked);
|
|
4959
|
+
}
|
|
4960
|
+
};
|
|
4961
|
+
|
|
4962
|
+
if (inGroup) {
|
|
4963
|
+
checked = value === groupContext.value;
|
|
4964
|
+
disabled = groupContext.isDisabled || isDisabled;
|
|
4965
|
+
name = groupContext.name;
|
|
4966
|
+
|
|
4967
|
+
handleChange = () => {
|
|
4968
|
+
if (onChange) {
|
|
4969
|
+
onChange(checked);
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4972
|
+
groupContext.onChange(value);
|
|
4973
|
+
};
|
|
4974
|
+
}
|
|
4975
|
+
|
|
4976
|
+
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4977
|
+
ref: ref,
|
|
4978
|
+
className: styles.toggleContainer
|
|
4979
|
+
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
4980
|
+
type: inGroup ? 'radio' : 'checkbox',
|
|
4981
|
+
name: name,
|
|
4982
|
+
checked: checked,
|
|
4983
|
+
onChange: handleChange,
|
|
4984
|
+
id: id,
|
|
4985
|
+
disabled: disabled,
|
|
4986
|
+
value: value,
|
|
4987
|
+
className: styles.toggleInput,
|
|
4988
|
+
"data-testid": index.getSubDataTestId(dataTestId, 'input'),
|
|
4989
|
+
role: inGroup ? undefined : 'button',
|
|
4990
|
+
"aria-pressed": inGroup ? undefined : checked,
|
|
4991
|
+
"aria-label": ariaLabel,
|
|
4992
|
+
"aria-labelledby": ariaLabelledby
|
|
4993
|
+
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
|
4994
|
+
htmlFor: id,
|
|
4995
|
+
className: classNames__default["default"]([index.buttonStyles.btn, styles.toggleButton], {
|
|
4996
|
+
[styles.iconOnly]: kind === 'icon',
|
|
4997
|
+
[styles.textOnly]: kind === 'text',
|
|
4998
|
+
[styles.iconText]: kind === 'icon-text'
|
|
4999
|
+
}),
|
|
5000
|
+
"data-testid": index.getSubDataTestId(dataTestId, 'label')
|
|
5001
|
+
}, children));
|
|
5002
|
+
});
|
|
5003
|
+
|
|
4605
5004
|
/* eslint-disable camelcase */
|
|
4606
5005
|
|
|
4607
5006
|
exports.Input = index.Input$1;
|
|
@@ -4623,3 +5022,5 @@ exports.SplitButton = SplitButton;
|
|
|
4623
5022
|
exports.SplitButtonOption = SplitButtonOption;
|
|
4624
5023
|
exports.SubMenu = SubMenu;
|
|
4625
5024
|
exports.TimePicker = TimePicker;
|
|
5025
|
+
exports.ToggleButton = ToggleButton;
|
|
5026
|
+
exports.ToggleButtonGroup = ToggleButtonGroup;
|