@qualtrics/ui-react 2.11.0 → 2.12.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 +20 -0
- package/dist/__shared/cjs/index-7ead0dbd.js +13058 -0
- package/dist/__shared/cjs/{index-30148ada.js → index-f6bbacab.js} +3 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Button/Button2.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +0 -1
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +5 -9
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +83 -8442
- 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/Menu2.js +3 -3
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +78 -0
- package/dist/next/TimePicker/TimeInput.js +87 -0
- package/dist/next/TimePicker/TimePicker.js +247 -0
- package/dist/next/TimePicker/TimePicker2.js +8 -0
- package/dist/next/TimePicker/TimePickerIcon.js +36 -0
- package/dist/next/TimePicker/index.js +1 -0
- package/dist/next/TimePicker/utils.js +229 -0
- package/dist/next/index.d.ts +20 -0
- package/dist/next/index.es.js +2 -0
- package/dist/next/index.js +803 -162
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/package.json +1 -1
- package/dist/__shared/cjs/index-bb7befc3.js +0 -4656
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-7ead0dbd.js');
|
|
13
|
+
var icons_index = require('../__shared/cjs/index-f6bbacab.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');
|
|
@@ -19,6 +19,8 @@ require('react-popper');
|
|
|
19
19
|
require('@popperjs/core');
|
|
20
20
|
require('react-focus-lock');
|
|
21
21
|
require('uuid');
|
|
22
|
+
require('@qualtrics/component-styles');
|
|
23
|
+
require('throttle-debounce');
|
|
22
24
|
|
|
23
25
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
24
26
|
|
|
@@ -29,10 +31,10 @@ var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
|
29
31
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver);
|
|
30
32
|
var InputMask__default = /*#__PURE__*/_interopDefaultLegacy(InputMask);
|
|
31
33
|
|
|
32
|
-
var css_248z$
|
|
33
|
-
var styles$
|
|
34
|
-
var stylesheet$
|
|
35
|
-
icons_index.styleInject(css_248z$
|
|
34
|
+
var css_248z$9 = "._2c6A3{overflow:auto;position:relative;max-width:100%;max-height:100%}._2c6A3,._Lk5Et{background-color:#fff}._Lk5Et{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._3lAd5{margin-bottom:4px}._13Tnw{position:-webkit-sticky;position:sticky;top:0;z-index:100}._3hP-w{display:flex}._3hP-w:focus{outline:none}body.keyboard-user ._3hP-w:focus ._3OFbm: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 ._3hP-w:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3hP-w:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3hP-w:focus ._3OFbm._3EdTh:after{right:-3px;bottom:1px}._1ztdw{padding-right:3px}._Dtr_U{display:flex}._Dtr_U._wWwRO ._3OFbm,._Dtr_U._wWwRO ._3vaML{cursor:pointer}._Dtr_U._17BG7 ._3OFbm,._Dtr_U._17BG7 ._3vaML{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._Dtr_U._17BG7 ._3OFbm._3EdTh,._Dtr_U._17BG7 ._3vaML._3EdTh{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._Dtr_U._17BG7 ._3OFbm._3EdTh ._1Dwby,._Dtr_U._17BG7 ._3OFbm._3EdTh ._3vaML,._Dtr_U._17BG7 ._3OFbm._3EdTh ._23iUt,._Dtr_U._17BG7 ._3vaML._3EdTh ._1Dwby,._Dtr_U._17BG7 ._3vaML._3EdTh ._3vaML,._Dtr_U._17BG7 ._3vaML._3EdTh ._23iUt{background-color:rgba(11,110,208,.08)}._Dtr_U._wWwRO:hover:not(._17BG7):not(._35xi5) ._3OFbm,._Dtr_U._wWwRO:hover:not(._17BG7):not(._35xi5) ._3vaML{background-color:#f9f9f9}._Dtr_U._wWwRO:active:not(._17BG7):not(._35xi5) ._3OFbm,._Dtr_U._wWwRO:active:not(._17BG7):not(._35xi5) ._3vaML{background-color:#f3f3f3}._Dtr_U:focus{outline:none}body.keyboard-user ._Dtr_U:focus ._3OFbm: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 ._Dtr_U:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:focus ._3OFbm._3EdTh:after{right:-3px;bottom:0}._Dtr_U:last-of-type:focus{outline:none}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm: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 ._Dtr_U:last-of-type:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm._3EdTh:after{right:-3px;bottom:1px}._Dtr_U:last-of-type ._23iUt:focus{outline:none}body.keyboard-user ._Dtr_U:last-of-type ._23iUt._2usSi:after,body.keyboard-user ._Dtr_U:last-of-type ._23iUt: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}._Dtr_U:first-of-type:focus{outline:none}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm: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 ._Dtr_U:first-of-type:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm._3EdTh:after{right:-3px;bottom:0}._Dtr_U:first-of-type ._23iUt:focus{outline:none}body.keyboard-user ._Dtr_U:first-of-type ._23iUt._2usSi:after,body.keyboard-user ._Dtr_U:first-of-type ._23iUt: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}.__O4Th{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}.__O4Th._3EoTY{flex-grow:1}.__O4Th._XLnBi{cursor:pointer}.__O4Th._XLnBi:hover:not(._18iVz){background-color:#f9f9f9;border-bottom-color:#6a6d70}.__O4Th._XLnBi:active:not(._18iVz){background-color:#f3f3f3}.__O4Th._1QMdi:not(._18iVz){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}.__O4Th._18iVz{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}.__O4Th ._2kq6v{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}.__O4Th ._2kq6v._2xLVg{left:-1px}.__O4Th ._2kq6v._3Jo7-{right:0}.__O4Th ._WWSDl{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}.__O4Th ._WWSDl._2xLVg{left:-2px}.__O4Th ._WWSDl._3Jo7-{right:-1px}.__O4Th:first-of-type ._2xLVg._2kq6v{left:0;width:2px;border-left:1px solid #fff}.__O4Th:first-of-type ._2xLVg._WWSDl{left:0}.__O4Th:last-of-type ._3Jo7-._2kq6v{right:0;width:2px;border-right:1px solid #fff}.__O4Th:last-of-type ._3Jo7-._WWSDl{right:0}.__O4Th ._1X90e{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}.__O4Th ._1X90e ._3A4zS{position:absolute;width:2px;right:2px;top:0;bottom:0}.__O4Th ._1X90e ._3A4zS._2vpYL{background-color:#0a6ed1}.__O4Th ._1X90e:hover ._3A4zS:not(._2vpYL){background-color:#d9d9d9}.__O4Th ._fNmrb{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}.__O4Th ._fNmrb._1KV0r{flex-direction:row-reverse;justify-content:flex-start}.__O4Th ._fNmrb._1KV0r ._1dgE5{margin:1px 7px 1px 1px}.__O4Th ._fNmrb ._25Dkp{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}.__O4Th ._fNmrb ._1dgE5{margin:1px 1px 1px 7px;flex-shrink:0}.__O4Th ._sBwLR{margin-left:6px;margin-right:4px;flex-shrink:0}.__O4Th ._mIW1p{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}.__O4Th:focus{outline:none}body.keyboard-user .__O4Th._2usSi:after,body.keyboard-user .__O4Th: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}._1weuJ{margin-right:6px}._3EdTh{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._3EdTh[focus-within]{z-index:30}._3EdTh:focus-within{z-index:30}._23iUt{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}._23iUt ._3Uebx{width:100%;padding:12px 12px 11px;overflow:hidden}._23iUt._18iVz{background-color:#efefef;border-bottom-color:#dfdfe1}._23iUt._3EoTY{flex-grow:1}._23iUt:focus{outline:none}body.keyboard-user ._23iUt._2usSi:after,body.keyboard-user ._23iUt: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}._3vaML{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3vaML._3wM9x{border-bottom-color:#d9d9d9;background-color:#fff}._1Dwby{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}._1Dwby._3wM9x{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._1Dwby:focus input~span,._1Dwby:hover input~span{border-color:#0b6ed0}._1Dwby ._3mygU{position:relative;display:inline-flex}._1Dwby ._3mygU ._2A_6J{margin:0!important}._1Dwby ._3mygU ._24mgK{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1rww8{justify-content:flex-start}._1qZmD{justify-content:center;text-align:center}._1KV0r{justify-content:flex-end;text-align:right}._1O1j0{display:none}._2PubX{opacity:0;height:0;width:0;overflow:hidden}._2PubX,._24woB{position:absolute}._24woB{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._1X__t{width:246px}";
|
|
35
|
+
var styles$9 = {"advancedTable":"_2c6A3","advancedTablePaginationContainer":"_Lk5Et","advancedTablePagination":"_3lAd5","advancedTableColumnHeadersRowGroup":"_13Tnw","advancedTableColumnHeaders":"_3hP-w","advancedTableRowChild":"_3OFbm","pinnedContainer":"_3EdTh","advancedTableRowGroup":"_1ztdw","advancedTableRow":"_Dtr_U","hasRowAction":"_wWwRO","advancedTableExpandRowSpacer":"_3vaML","isSelected":"_17BG7","advancedTableCheckbox":"_1Dwby","advancedTableCell":"_23iUt","isCheckboxHovered":"_35xi5","showFocusRing":"_2usSi","advancedTableColumnHeader":"__O4Th","fillRemainingSpace":"_3EoTY","isSortable":"_XLnBi","isDragging":"_18iVz","isSorted":"_1QMdi","dropTargetLine":"_2kq6v","dropTargetLeft":"_2xLVg","dropTargetRight":"_3Jo7-","dropTargetMarker":"_WWSDl","resizeHandle":"_1X90e","resizeLine":"_3A4zS","isResizing":"_2vpYL","advancedTableColumnHeaderLabel":"_fNmrb","rightAligned":"_1KV0r","sortIcon":"_1dgE5","advancedTableColumnHeaderLabelText":"_25Dkp","advancedTableColumnHeaderMenu":"_sBwLR","advancedTableColumnHeaderMenuHiddenAnchor":"_mIW1p","advancedTableColumnHeaderMenuItemIcon":"_1weuJ","advancedTableCellContainer":"_3Uebx","header":"_3wM9x","checkboxContainer":"_3mygU","checkbox":"_2A_6J","mixed":"_24mgK","leftAligned":"_1rww8","centerAligned":"_1qZmD","hiddenDescription":"_1O1j0","hiddenLiveRegion":"_2PubX","dragPreview":"_24woB","rowActionMenuPane":"_1X__t"};
|
|
36
|
+
var stylesheet$9="._2c6A3{overflow:auto;position:relative;max-width:100%;max-height:100%}._2c6A3,._Lk5Et{background-color:#fff}._Lk5Et{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._3lAd5{margin-bottom:4px}._13Tnw{position:-webkit-sticky;position:sticky;top:0;z-index:100}._3hP-w{display:flex}._3hP-w:focus{outline:none}body.keyboard-user ._3hP-w:focus ._3OFbm: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 ._3hP-w:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3hP-w:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3hP-w:focus ._3OFbm._3EdTh:after{right:-3px;bottom:1px}._1ztdw{padding-right:3px}._Dtr_U{display:flex}._Dtr_U._wWwRO ._3OFbm,._Dtr_U._wWwRO ._3vaML{cursor:pointer}._Dtr_U._17BG7 ._3OFbm,._Dtr_U._17BG7 ._3vaML{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._Dtr_U._17BG7 ._3OFbm._3EdTh,._Dtr_U._17BG7 ._3vaML._3EdTh{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._Dtr_U._17BG7 ._3OFbm._3EdTh ._1Dwby,._Dtr_U._17BG7 ._3OFbm._3EdTh ._3vaML,._Dtr_U._17BG7 ._3OFbm._3EdTh ._23iUt,._Dtr_U._17BG7 ._3vaML._3EdTh ._1Dwby,._Dtr_U._17BG7 ._3vaML._3EdTh ._3vaML,._Dtr_U._17BG7 ._3vaML._3EdTh ._23iUt{background-color:rgba(11,110,208,.08)}._Dtr_U._wWwRO:hover:not(._17BG7):not(._35xi5) ._3OFbm,._Dtr_U._wWwRO:hover:not(._17BG7):not(._35xi5) ._3vaML{background-color:#f9f9f9}._Dtr_U._wWwRO:active:not(._17BG7):not(._35xi5) ._3OFbm,._Dtr_U._wWwRO:active:not(._17BG7):not(._35xi5) ._3vaML{background-color:#f3f3f3}._Dtr_U:focus{outline:none}body.keyboard-user ._Dtr_U:focus ._3OFbm: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 ._Dtr_U:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:focus ._3OFbm._3EdTh:after{right:-3px;bottom:0}._Dtr_U:last-of-type:focus{outline:none}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm: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 ._Dtr_U:last-of-type:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:last-of-type:focus ._3OFbm._3EdTh:after{right:-3px;bottom:1px}._Dtr_U:last-of-type ._23iUt:focus{outline:none}body.keyboard-user ._Dtr_U:last-of-type ._23iUt._2usSi:after,body.keyboard-user ._Dtr_U:last-of-type ._23iUt: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}._Dtr_U:first-of-type:focus{outline:none}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm: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 ._Dtr_U:first-of-type:focus ._3OFbm:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._Dtr_U:first-of-type:focus ._3OFbm._3EdTh:after{right:-3px;bottom:0}._Dtr_U:first-of-type ._23iUt:focus{outline:none}body.keyboard-user ._Dtr_U:first-of-type ._23iUt._2usSi:after,body.keyboard-user ._Dtr_U:first-of-type ._23iUt: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}.__O4Th{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}.__O4Th._3EoTY{flex-grow:1}.__O4Th._XLnBi{cursor:pointer}.__O4Th._XLnBi:hover:not(._18iVz){background-color:#f9f9f9;border-bottom-color:#6a6d70}.__O4Th._XLnBi:active:not(._18iVz){background-color:#f3f3f3}.__O4Th._1QMdi:not(._18iVz){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}.__O4Th._18iVz{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}.__O4Th ._2kq6v{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}.__O4Th ._2kq6v._2xLVg{left:-1px}.__O4Th ._2kq6v._3Jo7-{right:0}.__O4Th ._WWSDl{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}.__O4Th ._WWSDl._2xLVg{left:-2px}.__O4Th ._WWSDl._3Jo7-{right:-1px}.__O4Th:first-of-type ._2xLVg._2kq6v{left:0;width:2px;border-left:1px solid #fff}.__O4Th:first-of-type ._2xLVg._WWSDl{left:0}.__O4Th:last-of-type ._3Jo7-._2kq6v{right:0;width:2px;border-right:1px solid #fff}.__O4Th:last-of-type ._3Jo7-._WWSDl{right:0}.__O4Th ._1X90e{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}.__O4Th ._1X90e ._3A4zS{position:absolute;width:2px;right:2px;top:0;bottom:0}.__O4Th ._1X90e ._3A4zS._2vpYL{background-color:#0a6ed1}.__O4Th ._1X90e:hover ._3A4zS:not(._2vpYL){background-color:#d9d9d9}.__O4Th ._fNmrb{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}.__O4Th ._fNmrb._1KV0r{flex-direction:row-reverse;justify-content:flex-start}.__O4Th ._fNmrb._1KV0r ._1dgE5{margin:1px 7px 1px 1px}.__O4Th ._fNmrb ._25Dkp{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}.__O4Th ._fNmrb ._1dgE5{margin:1px 1px 1px 7px;flex-shrink:0}.__O4Th ._sBwLR{margin-left:6px;margin-right:4px;flex-shrink:0}.__O4Th ._mIW1p{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}.__O4Th:focus{outline:none}body.keyboard-user .__O4Th._2usSi:after,body.keyboard-user .__O4Th: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}._1weuJ{margin-right:6px}._3EdTh{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._3EdTh[focus-within]{z-index:30}._3EdTh:focus-within{z-index:30}._23iUt{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}._23iUt ._3Uebx{width:100%;padding:12px 12px 11px;overflow:hidden}._23iUt._18iVz{background-color:#efefef;border-bottom-color:#dfdfe1}._23iUt._3EoTY{flex-grow:1}._23iUt:focus{outline:none}body.keyboard-user ._23iUt._2usSi:after,body.keyboard-user ._23iUt: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}._3vaML{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3vaML._3wM9x{border-bottom-color:#d9d9d9;background-color:#fff}._1Dwby{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}._1Dwby._3wM9x{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._1Dwby:focus input~span,._1Dwby:hover input~span{border-color:#0b6ed0}._1Dwby ._3mygU{position:relative;display:inline-flex}._1Dwby ._3mygU ._2A_6J{margin:0!important}._1Dwby ._3mygU ._24mgK{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._1rww8{justify-content:flex-start}._1qZmD{justify-content:center;text-align:center}._1KV0r{justify-content:flex-end;text-align:right}._1O1j0{display:none}._2PubX{opacity:0;height:0;width:0;overflow:hidden}._2PubX,._24woB{position:absolute}._24woB{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._1X__t{width:246px}";
|
|
37
|
+
icons_index.styleInject(css_248z$9);
|
|
36
38
|
|
|
37
39
|
// TODO: Move the imported types into this file to avoid a ciruclar dependency warning.
|
|
38
40
|
// Also Alignment, etc can be defined directly and have AdvancedTableColumnConfig use them instead of the reverse like now.
|
|
@@ -97,7 +99,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
97
99
|
"date-testid": menuItemDataTestId
|
|
98
100
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
99
101
|
size: "small",
|
|
100
|
-
className: styles$
|
|
102
|
+
className: styles$9.advancedTableColumnHeaderMenuItemIcon,
|
|
101
103
|
"aria-hidden": "true"
|
|
102
104
|
}), label);
|
|
103
105
|
};
|
|
@@ -151,7 +153,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
151
153
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Ascending))
|
|
152
154
|
}, /*#__PURE__*/React__default["default"].createElement(AscendingIconComponent, {
|
|
153
155
|
size: "small",
|
|
154
|
-
className: styles$
|
|
156
|
+
className: styles$9.advancedTableColumnHeaderMenuItemIcon,
|
|
155
157
|
"aria-hidden": "true"
|
|
156
158
|
}), ascendingLabel), /*#__PURE__*/React__default["default"].createElement(index.MenuItem, {
|
|
157
159
|
key: descendingValue,
|
|
@@ -160,7 +162,7 @@ const AdvancedTableColumnHeaderMenu = _ref => {
|
|
|
160
162
|
"data-testid": index.getSubDataTestId(dataTestId, "ColumnHeaderMenu-Sort-".concat(index$1, "-").concat(SortDirections.Descending))
|
|
161
163
|
}, /*#__PURE__*/React__default["default"].createElement(DescendingIconComponent, {
|
|
162
164
|
size: "small",
|
|
163
|
-
className: styles$
|
|
165
|
+
className: styles$9.advancedTableColumnHeaderMenuItemIcon,
|
|
164
166
|
"aria-hidden": "true"
|
|
165
167
|
}), descendingLabel)];
|
|
166
168
|
}), (sortOptions === null || sortOptions === void 0 ? void 0 : sortOptions.length) && (onIsPinnedChange || onMoveLeft || onMoveRight) && /*#__PURE__*/React__default["default"].createElement(index.Divider, null), pinItem, onMoveLeft && getActionMenuItem({
|
|
@@ -413,7 +415,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
413
415
|
const selectedSortIcon = isSorted ? /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
414
416
|
"aria-hidden": "true",
|
|
415
417
|
focusable: "false",
|
|
416
|
-
className: styles$
|
|
418
|
+
className: styles$9.sortIcon,
|
|
417
419
|
width: "10",
|
|
418
420
|
height: "10",
|
|
419
421
|
viewBox: "0 0 10 10",
|
|
@@ -607,28 +609,28 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
607
609
|
onFocus: onFocus,
|
|
608
610
|
onClick: isSortable ? handleClick : undefined,
|
|
609
611
|
tabIndex: isFocused ? 0 : -1,
|
|
610
|
-
className: classNames__default["default"](styles$
|
|
611
|
-
[styles$
|
|
612
|
+
className: classNames__default["default"](styles$9.advancedTableColumnHeader, {
|
|
613
|
+
[styles$9.advancedTableRowChild]: !isPinned,
|
|
612
614
|
// if nested inside of pinned container, not a direct row child
|
|
613
|
-
[styles$
|
|
614
|
-
[styles$
|
|
615
|
-
[styles$
|
|
616
|
-
[styles$
|
|
617
|
-
[styles$
|
|
615
|
+
[styles$9.isSortable]: isSortable,
|
|
616
|
+
[styles$9.isSorted]: isSorted,
|
|
617
|
+
[styles$9.showFocusRing]: isHiddenMenuOpen,
|
|
618
|
+
[styles$9.isDragging]: isDragging,
|
|
619
|
+
[styles$9.fillRemainingSpace]: width === undefined
|
|
618
620
|
}),
|
|
619
621
|
style: {
|
|
620
622
|
width: computedWidth
|
|
621
623
|
},
|
|
622
624
|
ref: index.mergeRefs(columnHeaderRef, dragRef, dropRef, ref)
|
|
623
625
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
624
|
-
className: classNames__default["default"](styles$
|
|
625
|
-
[styles$
|
|
626
|
-
[styles$
|
|
627
|
-
[styles$
|
|
626
|
+
className: classNames__default["default"](styles$9.advancedTableColumnHeaderLabel, {
|
|
627
|
+
[styles$9.leftAligned]: alignment === 'left',
|
|
628
|
+
[styles$9.centerAligned]: alignment === 'center',
|
|
629
|
+
[styles$9.rightAligned]: alignment === 'right'
|
|
628
630
|
}),
|
|
629
631
|
ref: labelContainerRef
|
|
630
632
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
631
|
-
className: styles$
|
|
633
|
+
className: styles$9.advancedTableColumnHeaderLabelText,
|
|
632
634
|
style: {
|
|
633
635
|
WebkitLineClamp: headerMaxLines
|
|
634
636
|
},
|
|
@@ -639,7 +641,7 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
639
641
|
anchor: /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
640
642
|
tabIndex: -1,
|
|
641
643
|
"aria-hidden": "true",
|
|
642
|
-
className: styles$
|
|
644
|
+
className: styles$9.advancedTableColumnHeaderMenu
|
|
643
645
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, null))
|
|
644
646
|
})), /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaderMenu, _extends__default["default"]({}, commonMenuProps, {
|
|
645
647
|
isOpen: isHiddenMenuOpen,
|
|
@@ -654,31 +656,31 @@ const AdvancedTableColumnHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
654
656
|
|
|
655
657
|
(_columnHeaderRef$curr5 = columnHeaderRef.current) === null || _columnHeaderRef$curr5 === void 0 ? void 0 : _columnHeaderRef$curr5.focus();
|
|
656
658
|
},
|
|
657
|
-
className: styles$
|
|
659
|
+
className: styles$9.advancedTableColumnHeaderMenuHiddenAnchor
|
|
658
660
|
})
|
|
659
661
|
}))), dropTargetSide && !isRowActionMenuColumn && /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
660
|
-
className: classNames__default["default"](styles$
|
|
661
|
-
[styles$
|
|
662
|
-
[styles$
|
|
662
|
+
className: classNames__default["default"](styles$9.dropTargetLine, {
|
|
663
|
+
[styles$9.dropTargetLeft]: dropTargetSide === 'left',
|
|
664
|
+
[styles$9.dropTargetRight]: dropTargetSide === 'right'
|
|
663
665
|
}),
|
|
664
666
|
style: {
|
|
665
667
|
height: tableHeight
|
|
666
668
|
}
|
|
667
669
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
668
|
-
className: classNames__default["default"](styles$
|
|
669
|
-
[styles$
|
|
670
|
-
[styles$
|
|
670
|
+
className: classNames__default["default"](styles$9.dropTargetMarker, {
|
|
671
|
+
[styles$9.dropTargetLeft]: dropTargetSide === 'left',
|
|
672
|
+
[styles$9.dropTargetRight]: dropTargetSide === 'right'
|
|
671
673
|
})
|
|
672
674
|
})), onWidthChange && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
673
675
|
"aria-hidden": true,
|
|
674
|
-
className: styles$
|
|
676
|
+
className: styles$9.resizeHandle,
|
|
675
677
|
style: {
|
|
676
678
|
height: tableHeight
|
|
677
679
|
},
|
|
678
680
|
onMouseDown: handleMouseDown
|
|
679
681
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
680
|
-
className: classNames__default["default"](styles$
|
|
681
|
-
[styles$
|
|
682
|
+
className: classNames__default["default"](styles$9.resizeLine, {
|
|
683
|
+
[styles$9.isResizing]: isResizing
|
|
682
684
|
})
|
|
683
685
|
}))));
|
|
684
686
|
});
|
|
@@ -759,19 +761,19 @@ const AdvancedTableCell = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
759
761
|
onFocus: handleFocus,
|
|
760
762
|
onBlur: handleBlur,
|
|
761
763
|
tabIndex: isFocused && !isEditing ? 0 : -1,
|
|
762
|
-
className: classNames__default["default"](className, styles$
|
|
763
|
-
[styles$
|
|
764
|
-
[styles$
|
|
765
|
-
[styles$
|
|
766
|
-
[styles$
|
|
767
|
-
[styles$
|
|
764
|
+
className: classNames__default["default"](className, styles$9.advancedTableCell, {
|
|
765
|
+
[styles$9.leftAligned]: alignment === Alignments.Left,
|
|
766
|
+
[styles$9.centerAligned]: alignment === Alignments.Center,
|
|
767
|
+
[styles$9.rightAligned]: alignment === Alignments.Right,
|
|
768
|
+
[styles$9.isDragging]: isDragging,
|
|
769
|
+
[styles$9.fillRemainingSpace]: width === undefined
|
|
768
770
|
}),
|
|
769
771
|
style: {
|
|
770
772
|
width: computedWidth
|
|
771
773
|
},
|
|
772
774
|
ref: index.mergeRefs(ref, cellRef)
|
|
773
775
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
774
|
-
className: styles$
|
|
776
|
+
className: styles$9.advancedTableCellContainer
|
|
775
777
|
}, typeof renderCellContent === 'function' ? renderCellContent({
|
|
776
778
|
value,
|
|
777
779
|
setValue,
|
|
@@ -807,10 +809,10 @@ const AdvancedTableRow = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
807
809
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
808
810
|
onFocus: isFocusable ? onFocus : undefined,
|
|
809
811
|
onClick: hasOnRowSelect ? onClick : undefined,
|
|
810
|
-
className: classNames__default["default"](styles$
|
|
811
|
-
[styles$
|
|
812
|
-
[styles$
|
|
813
|
-
[styles$
|
|
812
|
+
className: classNames__default["default"](styles$9.advancedTableRow, {
|
|
813
|
+
[styles$9.hasRowAction]: hasOnRowSelect,
|
|
814
|
+
[styles$9.isSelected]: hasOnRowSelect && isSelected,
|
|
815
|
+
[styles$9.isCheckboxHovered]: isCheckboxHovered
|
|
814
816
|
}),
|
|
815
817
|
ref: isFocusable ? ref : undefined
|
|
816
818
|
}), children);
|
|
@@ -830,7 +832,7 @@ const AdvancedTableColumnHeaders = /*#__PURE__*/React.forwardRef((_ref, ref) =>
|
|
|
830
832
|
tabIndex: isFocusable ? isFocused ? 0 : -1 : undefined,
|
|
831
833
|
onKeyDown: isFocusable ? onKeyDown : undefined,
|
|
832
834
|
onFocus: isFocusable ? onFocus : undefined,
|
|
833
|
-
className: styles$
|
|
835
|
+
className: styles$9.advancedTableColumnHeaders,
|
|
834
836
|
ref: ref
|
|
835
837
|
}), children);
|
|
836
838
|
});
|
|
@@ -859,17 +861,17 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
859
861
|
onClick: onClick,
|
|
860
862
|
onMouseEnter: onMouseEnter,
|
|
861
863
|
onMouseLeave: onMouseLeave,
|
|
862
|
-
className: classNames__default["default"](styles$
|
|
863
|
-
[styles$
|
|
864
|
+
className: classNames__default["default"](styles$9.advancedTableCheckbox, {
|
|
865
|
+
[styles$9.header]: variant === 'header'
|
|
864
866
|
}),
|
|
865
867
|
"aria-live": isRowFocused ? 'polite' : undefined,
|
|
866
868
|
"aria-relevant": "text"
|
|
867
869
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
868
|
-
className: styles$
|
|
870
|
+
className: styles$9.hiddenLiveRegion
|
|
869
871
|
}, labels[state]), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
870
|
-
className: styles$
|
|
872
|
+
className: styles$9.checkboxContainer
|
|
871
873
|
}, /*#__PURE__*/React__default["default"].createElement(index.Checkbox, {
|
|
872
|
-
className: styles$
|
|
874
|
+
className: styles$9.checkbox,
|
|
873
875
|
"aria-hidden": true,
|
|
874
876
|
checked: state === 'true',
|
|
875
877
|
onChange: () => {
|
|
@@ -881,7 +883,7 @@ const AdvancedTableCheckbox = _ref => {
|
|
|
881
883
|
onFocus
|
|
882
884
|
}
|
|
883
885
|
}), state === 'mixed' && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
884
|
-
className: styles$
|
|
886
|
+
className: styles$9.mixed
|
|
885
887
|
})));
|
|
886
888
|
};
|
|
887
889
|
|
|
@@ -894,7 +896,7 @@ const AdvancedTableHiddenDescription = _ref => {
|
|
|
894
896
|
translate
|
|
895
897
|
} = index.useTranslation();
|
|
896
898
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
897
|
-
className: styles$
|
|
899
|
+
className: styles$9.hiddenDescription,
|
|
898
900
|
id: id
|
|
899
901
|
}, translate(messageKey));
|
|
900
902
|
};
|
|
@@ -918,7 +920,7 @@ const AdvancedTableDragPreview = _ref => {
|
|
|
918
920
|
const top = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.y) || 0;
|
|
919
921
|
const left = (currentOffset === null || currentOffset === void 0 ? void 0 : currentOffset.x) || 0;
|
|
920
922
|
return /*#__PURE__*/React__default["default"].createElement(index.Portal, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
921
|
-
className: styles$
|
|
923
|
+
className: styles$9.dragPreview,
|
|
922
924
|
style: {
|
|
923
925
|
height,
|
|
924
926
|
width,
|
|
@@ -950,9 +952,9 @@ const AdvancedTablePagination = _ref => {
|
|
|
950
952
|
};
|
|
951
953
|
|
|
952
954
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
953
|
-
className: styles$
|
|
955
|
+
className: styles$9.advancedTablePaginationContainer
|
|
954
956
|
}, /*#__PURE__*/React__default["default"].createElement(index.Pagination, {
|
|
955
|
-
className: styles$
|
|
957
|
+
className: styles$9.advancedTablePagination,
|
|
956
958
|
"aria-label": ariaLabel,
|
|
957
959
|
numPages: Math.max(Math.ceil(rows.length / rowsPerPage), 1),
|
|
958
960
|
currentPage: currentPage,
|
|
@@ -1088,7 +1090,7 @@ const AdvancedTable = _ref => {
|
|
|
1088
1090
|
}
|
|
1089
1091
|
}
|
|
1090
1092
|
}, /*#__PURE__*/React__default["default"].createElement(icons_index.EllipsisHorizontalIcon, null))), /*#__PURE__*/React__default["default"].createElement(index.DropdownList, {
|
|
1091
|
-
className: styles$
|
|
1093
|
+
className: styles$9.rowActionMenuPane
|
|
1092
1094
|
}, !rows ? [] : rowActions === null || rowActions === void 0 ? void 0 : rowActions.map((actionGroup, groupIndex) => {
|
|
1093
1095
|
var _actionGroup$actions;
|
|
1094
1096
|
|
|
@@ -1615,8 +1617,8 @@ const AdvancedTable = _ref => {
|
|
|
1615
1617
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
1616
1618
|
let children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
|
|
1617
1619
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1618
|
-
className: classNames__default["default"](styles$
|
|
1619
|
-
[styles$
|
|
1620
|
+
className: classNames__default["default"](styles$9.advancedTableExpandRowSpacer, {
|
|
1621
|
+
[styles$9.header]: inHeader
|
|
1620
1622
|
}),
|
|
1621
1623
|
style: {
|
|
1622
1624
|
width
|
|
@@ -1664,7 +1666,7 @@ const AdvancedTable = _ref => {
|
|
|
1664
1666
|
return /*#__PURE__*/React__default["default"].createElement(reactDnd.DndProvider, {
|
|
1665
1667
|
backend: reactDndHtml5Backend.HTML5Backend
|
|
1666
1668
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1667
|
-
className: styles$
|
|
1669
|
+
className: styles$9.advancedTable,
|
|
1668
1670
|
role: hasExpandableRows ? 'treegrid' : 'grid',
|
|
1669
1671
|
"aria-multiselectable": hasExpandableRows && hasCheckboxColumn ? true : undefined,
|
|
1670
1672
|
"aria-rowcount": rows ? rows.length + 1 : 0,
|
|
@@ -1688,7 +1690,7 @@ const AdvancedTable = _ref => {
|
|
|
1688
1690
|
messageKey: "advancedTable.rowCheckboxDescription"
|
|
1689
1691
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1690
1692
|
role: "rowgroup",
|
|
1691
|
-
className: classNames__default["default"](styles$
|
|
1693
|
+
className: classNames__default["default"](styles$9.advancedTableColumnHeadersRowGroup, styles$9.advancedTableRowGroup)
|
|
1692
1694
|
}, /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeaders, {
|
|
1693
1695
|
"aria-rowindex": hasExpandableRows ? undefined : 1,
|
|
1694
1696
|
"aria-level": hasExpandableRows ? 1 : undefined // aria-level is one-indexed
|
|
@@ -1703,7 +1705,7 @@ const AdvancedTable = _ref => {
|
|
|
1703
1705
|
ref: createRef(headerRowIndex, -1)
|
|
1704
1706
|
}, hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1705
1707
|
role: "presentation",
|
|
1706
|
-
className: classNames__default["default"](styles$
|
|
1708
|
+
className: classNames__default["default"](styles$9.pinnedContainer, styles$9.advancedTableRowChild),
|
|
1707
1709
|
ref: createPinnedContainerRef(headerRowIndex)
|
|
1708
1710
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1709
1711
|
state: checkedRowIds.length === totalRowsCountWithExpansion ? 'true' : checkedRowIds.length === 0 ? 'false' : 'mixed',
|
|
@@ -1719,7 +1721,7 @@ const AdvancedTable = _ref => {
|
|
|
1719
1721
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableColumnHeader, props);
|
|
1720
1722
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1721
1723
|
role: "rowgroup",
|
|
1722
|
-
className: styles$
|
|
1724
|
+
className: styles$9.advancedTableRowGroup
|
|
1723
1725
|
}, ((_ref5 = paginatedRows !== null && paginatedRows !== void 0 ? paginatedRows : rows) !== null && _ref5 !== void 0 ? _ref5 : []).map((row, rowIndex) => {
|
|
1724
1726
|
const {
|
|
1725
1727
|
id: rowId,
|
|
@@ -1773,7 +1775,7 @@ const AdvancedTable = _ref => {
|
|
|
1773
1775
|
"aria-posinset": hasExpandableRows ? depthIndex + 1 : undefined // aria-posinset is one-indexed
|
|
1774
1776
|
|
|
1775
1777
|
}), hasCheckboxColumn || pinnedColumnConfigs.length ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1776
|
-
className: classNames__default["default"](styles$
|
|
1778
|
+
className: classNames__default["default"](styles$9.pinnedContainer, styles$9.advancedTableRowChild),
|
|
1777
1779
|
ref: createPinnedContainerRef(paginatedRowIndex)
|
|
1778
1780
|
}, hasCheckboxColumn && /*#__PURE__*/React__default["default"].createElement(AdvancedTableCheckbox, {
|
|
1779
1781
|
state: getCheckboxStateForRow(row),
|
|
@@ -1801,7 +1803,7 @@ const AdvancedTable = _ref => {
|
|
|
1801
1803
|
})) : undefined, hasExpandableRows && !pinnedColumnConfigs.length ? getExpandableRowsSpacer("".concat(widthBufferWidth * (depth + 1), "px"), false, hasChildRows ? getAdvancedTableRowExpandButton(rowId, isExpanded, rowIndex) : undefined) : undefined, unpinnedColumnConfigs.map((c, i) => {
|
|
1802
1804
|
const props = getCellProps(c, i + pinnedColumnConfigs.length, data, paginatedRowIndex, rowId, depth);
|
|
1803
1805
|
return /*#__PURE__*/React__default["default"].createElement(AdvancedTableCell, _extends__default["default"]({}, props, {
|
|
1804
|
-
className: styles$
|
|
1806
|
+
className: styles$9.advancedTableRowChild,
|
|
1805
1807
|
"aria-rowindex": hasExpandableRows ? undefined : rowIndex + 2 // aria-rowindex is one-indexed + the column headers row is the first row in the table
|
|
1806
1808
|
,
|
|
1807
1809
|
"aria-colindex": i + 1 // aria-colindex is one-indexed
|
|
@@ -1983,10 +1985,10 @@ function useFocusState(_ref8) {
|
|
|
1983
1985
|
|
|
1984
1986
|
/* eslint-disable import/prefer-default-export */
|
|
1985
1987
|
|
|
1986
|
-
var css_248z$
|
|
1987
|
-
var styles$
|
|
1988
|
-
var stylesheet$
|
|
1989
|
-
icons_index.styleInject(css_248z$
|
|
1988
|
+
var css_248z$8 = "._1kkdr{display:inline-block;width:36px;transition:width .25s ease-out}._38HPw{width:100%}._sTJoM>input{padding-right:0!important}._-iIbd>svg{fill:#515559}";
|
|
1989
|
+
var styles$8 = {"collapsibleSearchInput":"_1kkdr","searchInput":"_38HPw","searchInputCollapsed":"_sTJoM","iconButton":"_-iIbd"};
|
|
1990
|
+
var stylesheet$8="._1kkdr{display:inline-block;width:36px;transition:width .25s ease-out}._38HPw{width:100%}._sTJoM>input{padding-right:0!important}._-iIbd>svg{fill:#515559}";
|
|
1991
|
+
icons_index.styleInject(css_248z$8);
|
|
1990
1992
|
|
|
1991
1993
|
const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
1992
1994
|
let {
|
|
@@ -1999,7 +2001,7 @@ const CollapsibleSearchInputIconButton = /*#__PURE__*/React.forwardRef((_ref, re
|
|
|
1999
2001
|
} = index.useTranslation();
|
|
2000
2002
|
const label = translate('collapsibleSearchInput.openSearchField');
|
|
2001
2003
|
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, _extends__default["default"]({}, rest, {
|
|
2002
|
-
className: styles$
|
|
2004
|
+
className: styles$8.iconButton,
|
|
2003
2005
|
"aria-label": label,
|
|
2004
2006
|
tooltipContent: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
|
|
2005
2007
|
tooltipPlacement: tooltipPlacement,
|
|
@@ -2113,7 +2115,7 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2113
2115
|
onFocus: handleContainerFocus,
|
|
2114
2116
|
onBlur: handleContainerBlur,
|
|
2115
2117
|
onTransitionEnd: handleContainerTransitionEnd,
|
|
2116
|
-
className: styles$
|
|
2118
|
+
className: styles$8.collapsibleSearchInput,
|
|
2117
2119
|
style: {
|
|
2118
2120
|
width: externalIsExpanded ? widthWhenExpanded : undefined
|
|
2119
2121
|
},
|
|
@@ -2127,8 +2129,8 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2127
2129
|
"aria-label": searchInputAriaLabel,
|
|
2128
2130
|
"aria-labelledby": searchInputAriaLabelledBy,
|
|
2129
2131
|
"aria-describedby": searchInputAriaDescribedBy,
|
|
2130
|
-
className: classNames__default["default"](styles$
|
|
2131
|
-
[styles$
|
|
2132
|
+
className: classNames__default["default"](styles$8.searchInput, {
|
|
2133
|
+
[styles$8.searchInputCollapsed]: internalExpandedState !== expandedStates.EXPANDED
|
|
2132
2134
|
}),
|
|
2133
2135
|
"data-testid": index.getSubDataTestId(dataTestId, 'SearchInput'),
|
|
2134
2136
|
ref: searchInputRef
|
|
@@ -2139,10 +2141,10 @@ const CollapsibleSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2139
2141
|
}));
|
|
2140
2142
|
});
|
|
2141
2143
|
|
|
2142
|
-
var css_248z$
|
|
2143
|
-
var styles$
|
|
2144
|
-
var stylesheet$
|
|
2145
|
-
icons_index.styleInject(css_248z$
|
|
2144
|
+
var css_248z$7 = "._1_bQa input{padding-left:76px!important}._2ZiXo input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._2ZiXo input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._2ZiXo input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1sMxQ{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1sMxQ,._1sMxQ._2ZiXo:hover{background-color:transparent!important}._1sMxQ:hover{background-color:rgba(50,54,58,.08)!important}._1sMxQ:active{background-color:rgba(50,54,58,.11)!important}._1sMxQ svg{top:2px!important}._2g0hB{position:relative}._vsOe5{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2145
|
+
var styles$7 = {"input":"_1_bQa","disabled":"_2ZiXo","dropdown":"_1sMxQ","container":"_2g0hB","countryCode":"_vsOe5"};
|
|
2146
|
+
var stylesheet$7="._1_bQa input{padding-left:76px!important}._2ZiXo input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._2ZiXo input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._2ZiXo input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1sMxQ{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1sMxQ,._1sMxQ._2ZiXo:hover{background-color:transparent!important}._1sMxQ:hover{background-color:rgba(50,54,58,.08)!important}._1sMxQ:active{background-color:rgba(50,54,58,.11)!important}._1sMxQ svg{top:2px!important}._2g0hB{position:relative}._vsOe5{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
2147
|
+
icons_index.styleInject(css_248z$7);
|
|
2146
2148
|
|
|
2147
2149
|
const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2148
2150
|
let {
|
|
@@ -2208,21 +2210,21 @@ const PhoneNumberInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2208
2210
|
onChange === null || onChange === void 0 ? void 0 : onChange(internationalNumber, isValidLength, countryCode, value);
|
|
2209
2211
|
};
|
|
2210
2212
|
|
|
2211
|
-
const inputClassNames = classNames__default["default"](styles$
|
|
2212
|
-
[styles$
|
|
2213
|
+
const inputClassNames = classNames__default["default"](styles$7.input, {
|
|
2214
|
+
[styles$7.disabled]: isDisabled
|
|
2213
2215
|
});
|
|
2214
2216
|
const dropdownLabel = React.useMemo(() => countryCode ? "+".concat(libphonenumberJs.getCountryCallingCode(countryCode)) : undefined, [countryCode]);
|
|
2215
2217
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2216
|
-
className: styles$
|
|
2218
|
+
className: styles$7.container,
|
|
2217
2219
|
"data-testid": dataTestId
|
|
2218
2220
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2219
|
-
className: styles$
|
|
2221
|
+
className: styles$7.countryCode
|
|
2220
2222
|
}, dropdownLabel), /*#__PURE__*/React__default["default"].createElement(index.SelectMenu, {
|
|
2221
2223
|
label: " ",
|
|
2222
2224
|
defaultValue: countryCode,
|
|
2223
2225
|
onChange: value => setCountryCode(value),
|
|
2224
|
-
className: classNames__default["default"](styles$
|
|
2225
|
-
[styles$
|
|
2226
|
+
className: classNames__default["default"](styles$7.dropdown, {
|
|
2227
|
+
[styles$7.disabled]: isDisabled
|
|
2226
2228
|
}),
|
|
2227
2229
|
searchable: true,
|
|
2228
2230
|
disabled: isDisabled,
|
|
@@ -2884,10 +2886,10 @@ function Combobox(_ref) {
|
|
|
2884
2886
|
}, children);
|
|
2885
2887
|
}
|
|
2886
2888
|
|
|
2887
|
-
var css_248z$
|
|
2888
|
-
var styles$
|
|
2889
|
-
var stylesheet$
|
|
2890
|
-
icons_index.styleInject(css_248z$
|
|
2889
|
+
var css_248z$6 = "._3jEhG :after{background-color:#515559!important}._xinPb>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2qy91{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}._2qy91 ._K2ysO ._3tVTv{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}._2qy91 ._K2ysO:first-child ._1PaSV{display:none}._2qy91 ._1xh27{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._2qy91 ._1xh27:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._2qy91 ._1xh27:hover._LG4yS{background-color:#e4effa}._2qy91 ._1xh27._LG4yS{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._2qy91 ._1xh27:active:not(._LG4yS){background-color:#e8e9e9}";
|
|
2890
|
+
var styles$6 = {"loadingSpinner":"_3jEhG","ignoreFocusStyle":"_xinPb","flyout":"_2qy91","group":"_K2ysO","header":"_3tVTv","divider":"_1PaSV","option":"_1xh27","selected":"_LG4yS"};
|
|
2891
|
+
var stylesheet$6="._3jEhG :after{background-color:#515559!important}._xinPb>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2qy91{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}._2qy91 ._K2ysO ._3tVTv{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}._2qy91 ._K2ysO:first-child ._1PaSV{display:none}._2qy91 ._1xh27{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._2qy91 ._1xh27:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._2qy91 ._1xh27:hover._LG4yS{background-color:#e4effa}._2qy91 ._1xh27._LG4yS{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._2qy91 ._1xh27:active:not(._LG4yS){background-color:#e8e9e9}";
|
|
2892
|
+
icons_index.styleInject(css_248z$6);
|
|
2891
2893
|
|
|
2892
2894
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2893
2895
|
let {
|
|
@@ -3002,7 +3004,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3002
3004
|
return /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
3003
3005
|
role: "combobox",
|
|
3004
3006
|
className: classNames__default["default"](className, {
|
|
3005
|
-
[styles$
|
|
3007
|
+
[styles$6.ignoreFocusStyle]: hoveredOption || activeDescendantElement
|
|
3006
3008
|
}),
|
|
3007
3009
|
style: style,
|
|
3008
3010
|
id: id,
|
|
@@ -3015,7 +3017,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3015
3017
|
},
|
|
3016
3018
|
leftAddOn: leftAddOn,
|
|
3017
3019
|
rightAddOn: isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3018
|
-
className: styles$
|
|
3020
|
+
className: styles$6.loadingSpinner,
|
|
3019
3021
|
size: "xs",
|
|
3020
3022
|
show: isLoading,
|
|
3021
3023
|
"aria-hidden": true
|
|
@@ -3072,7 +3074,7 @@ const ComboboxFlyout = _ref => {
|
|
|
3072
3074
|
popper: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3073
3075
|
role: "listbox",
|
|
3074
3076
|
id: flyoutId,
|
|
3075
|
-
className: styles$
|
|
3077
|
+
className: styles$6.flyout,
|
|
3076
3078
|
style: flyoutDimensions,
|
|
3077
3079
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
3078
3080
|
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
@@ -3124,16 +3126,16 @@ function ComboboxGroup(_ref) {
|
|
|
3124
3126
|
}, children);
|
|
3125
3127
|
return hasFilteredOptions ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3126
3128
|
role: "group",
|
|
3127
|
-
className: styles$
|
|
3129
|
+
className: styles$6.group,
|
|
3128
3130
|
"aria-labelledby": headerElementId,
|
|
3129
3131
|
"aria-describedby": ariaDescribedBy,
|
|
3130
3132
|
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
3131
3133
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
3132
|
-
className: styles$
|
|
3134
|
+
className: styles$6.divider
|
|
3133
3135
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3134
3136
|
"aria-hidden": "true",
|
|
3135
3137
|
id: headerElementId,
|
|
3136
|
-
className: styles$
|
|
3138
|
+
className: styles$6.header
|
|
3137
3139
|
}, 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
|
|
3138
3140
|
;
|
|
3139
3141
|
}
|
|
@@ -3186,8 +3188,8 @@ function ComboboxOption(_ref) {
|
|
|
3186
3188
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3187
3189
|
role: "option",
|
|
3188
3190
|
id: containerId,
|
|
3189
|
-
className: classNames__default["default"](styles$
|
|
3190
|
-
[styles$
|
|
3191
|
+
className: classNames__default["default"](styles$6.option, {
|
|
3192
|
+
[styles$6.selected]: isOptionSelected
|
|
3191
3193
|
}),
|
|
3192
3194
|
onClick: () => {
|
|
3193
3195
|
setCommittedInputValue(label);
|
|
@@ -3203,10 +3205,10 @@ function ComboboxOption(_ref) {
|
|
|
3203
3205
|
}, label);
|
|
3204
3206
|
}
|
|
3205
3207
|
|
|
3206
|
-
var css_248z$
|
|
3207
|
-
var styles$
|
|
3208
|
-
var stylesheet$
|
|
3209
|
-
icons_index.styleInject(css_248z$
|
|
3208
|
+
var css_248z$5 = "._3ADXS{display:flex}._3QOLl{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._3QOLl._2I5DZ{background-color:#fff}._3QOLl._2CMWo,._3QOLl._2I5DZ._1hDj8:not(._3QOLl._2I5DZ._3BuKO),body.keyboard-user ._3QOLl._2I5DZ._21RrF:not(._2eeRF){background-color:#0b6ed0}._3QOLl._2CMWo._2eeRF._3BuKO,._3QOLl._2CMWo._2eeRF._21RrF,._3QOLl._2CMWo._3BuKO._1hDj8{opacity:.4}._1xD2x{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1xD2x:focus{z-index:1}._2l949{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}._2l949 svg{margin-left:1px}._2l949._2I5DZ{background-color:#0b6ed0;border-color:transparent}._2l949._2I5DZ svg{fill:#fff!important}._2l949._2I5DZ:not(._19DW0):hover{background-color:#085caf!important}._2l949._2I5DZ:not(._19DW0):active{background-color:#0854a1!important}._2l949._2I5DZ._19DW0{opacity:.4}._2l949._2I5DZ._19DW0 svg{background-color:transparent}._2l949._2CMWo{border-color:#0b6ed0;background-color:#fff}._2l949._2CMWo svg{fill:#0b6ed0!important}._2l949._2CMWo:not(._19DW0):hover{background-color:#eef5fc!important}._2l949._2CMWo:not(._19DW0):active{background-color:#e1edf9!important}._2l949._2CMWo._19DW0{opacity:.4}._2l949._2CMWo._19DW0 svg{background-color:transparent}._3K67s{width:260px}";
|
|
3209
|
+
var styles$5 = {"container":"_3ADXS","divider":"_3QOLl","primary":"_2I5DZ","mainButtonFocus":"_21RrF","mainButtonDisabled":"_2eeRF","dropdownButtonFocus":"_1hDj8","dropdownButtonDisabled":"_3BuKO","secondary":"_2CMWo","mainButton":"_1xD2x","dropdownButton":"_2l949","disabled":"_19DW0","dropdownOption":"_3K67s"};
|
|
3210
|
+
var stylesheet$5="._3ADXS{display:flex}._3QOLl{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._3QOLl._2I5DZ{background-color:#fff}._3QOLl._2CMWo,._3QOLl._2I5DZ._1hDj8:not(._3QOLl._2I5DZ._3BuKO),body.keyboard-user ._3QOLl._2I5DZ._21RrF:not(._2eeRF){background-color:#0b6ed0}._3QOLl._2CMWo._2eeRF._3BuKO,._3QOLl._2CMWo._2eeRF._21RrF,._3QOLl._2CMWo._3BuKO._1hDj8{opacity:.4}._1xD2x{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._1xD2x:focus{z-index:1}._2l949{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}._2l949 svg{margin-left:1px}._2l949._2I5DZ{background-color:#0b6ed0;border-color:transparent}._2l949._2I5DZ svg{fill:#fff!important}._2l949._2I5DZ:not(._19DW0):hover{background-color:#085caf!important}._2l949._2I5DZ:not(._19DW0):active{background-color:#0854a1!important}._2l949._2I5DZ._19DW0{opacity:.4}._2l949._2I5DZ._19DW0 svg{background-color:transparent}._2l949._2CMWo{border-color:#0b6ed0;background-color:#fff}._2l949._2CMWo svg{fill:#0b6ed0!important}._2l949._2CMWo:not(._19DW0):hover{background-color:#eef5fc!important}._2l949._2CMWo:not(._19DW0):active{background-color:#e1edf9!important}._2l949._2CMWo._19DW0{opacity:.4}._2l949._2CMWo._19DW0 svg{background-color:transparent}._3K67s{width:260px}";
|
|
3211
|
+
icons_index.styleInject(css_248z$5);
|
|
3210
3212
|
|
|
3211
3213
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3212
3214
|
let {
|
|
@@ -3240,14 +3242,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3240
3242
|
});
|
|
3241
3243
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3242
3244
|
"data-testid": dataTestId,
|
|
3243
|
-
className: classNames__default["default"](styles$
|
|
3245
|
+
className: classNames__default["default"](styles$5.container, className),
|
|
3244
3246
|
ref: ref
|
|
3245
3247
|
}, /*#__PURE__*/React__default["default"].createElement(index.Button, {
|
|
3246
3248
|
kind: kind,
|
|
3247
3249
|
"data-testid": index.getSubDataTestId(dataTestId, 'button'),
|
|
3248
|
-
className: classNames__default["default"](styles$
|
|
3249
|
-
[styles$
|
|
3250
|
-
[styles$
|
|
3250
|
+
className: classNames__default["default"](styles$5.mainButton, {
|
|
3251
|
+
[styles$5.disabled]: isButtonDisabled,
|
|
3252
|
+
[styles$5.primary]: kind === 'primary'
|
|
3251
3253
|
}),
|
|
3252
3254
|
onClick: onClick,
|
|
3253
3255
|
disabled: isButtonDisabled,
|
|
@@ -3258,13 +3260,13 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3258
3260
|
onFocus: () => setMainButtonHasFocus(true),
|
|
3259
3261
|
onBlur: () => setMainButtonHasFocus(false)
|
|
3260
3262
|
}, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3261
|
-
className: classNames__default["default"](styles$
|
|
3262
|
-
[styles$
|
|
3263
|
-
[styles$
|
|
3264
|
-
[styles$
|
|
3265
|
-
[styles$
|
|
3266
|
-
[styles$
|
|
3267
|
-
[styles$
|
|
3263
|
+
className: classNames__default["default"](styles$5.divider, {
|
|
3264
|
+
[styles$5.primary]: kind === 'primary',
|
|
3265
|
+
[styles$5.secondary]: kind === 'secondary',
|
|
3266
|
+
[styles$5.mainButtonFocus]: mainButtonHasFocus,
|
|
3267
|
+
[styles$5.dropdownButtonFocus]: dropdownButtonHasFocus,
|
|
3268
|
+
[styles$5.mainButtonDisabled]: isButtonDisabled,
|
|
3269
|
+
[styles$5.dropdownButtonDisabled]: isDropdownDisabled
|
|
3268
3270
|
})
|
|
3269
3271
|
}), /*#__PURE__*/React__default["default"].createElement(index.Dropdown, {
|
|
3270
3272
|
"data-testid": index.getSubDataTestId(dataTestId, 'dropdown'),
|
|
@@ -3275,10 +3277,10 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3275
3277
|
}, /*#__PURE__*/React__default["default"].createElement(index.DropdownButton // `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
3276
3278
|
, {
|
|
3277
3279
|
label: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null),
|
|
3278
|
-
className: classNames__default["default"](styles$
|
|
3279
|
-
[styles$
|
|
3280
|
-
[styles$
|
|
3281
|
-
[styles$
|
|
3280
|
+
className: classNames__default["default"](styles$5.dropdownButton, {
|
|
3281
|
+
[styles$5.disabled]: isDropdownDisabled,
|
|
3282
|
+
[styles$5.primary]: kind === 'primary',
|
|
3283
|
+
[styles$5.secondary]: kind === 'secondary'
|
|
3282
3284
|
}),
|
|
3283
3285
|
ref: dropdownButtonRef,
|
|
3284
3286
|
tabIndex: -1,
|
|
@@ -3300,15 +3302,15 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3300
3302
|
label: "",
|
|
3301
3303
|
disabled: isDisabled,
|
|
3302
3304
|
onSelect: onClick,
|
|
3303
|
-
className: styles$
|
|
3305
|
+
className: styles$5.dropdownOption,
|
|
3304
3306
|
ref: ref
|
|
3305
3307
|
}, children);
|
|
3306
3308
|
});
|
|
3307
3309
|
|
|
3308
|
-
var css_248z$
|
|
3309
|
-
var styles$
|
|
3310
|
-
var stylesheet$
|
|
3311
|
-
icons_index.styleInject(css_248z$
|
|
3310
|
+
var css_248z$4 = "._jImFQ{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}._jImFQ:hover:not(._3Qgc3){background-color:rgba(50,54,58,.08)}._jImFQ:hover:not(._3Qgc3)._2daNR{border-color:#085caf;background-color:rgba(11,110,208,.04)}._jImFQ:hover:not(._3Qgc3)._2daNR ._28Iwx{color:#32363a}._jImFQ:hover:not(._3Qgc3)._2daNR ._37QG9{fill:#32363a}._jImFQ:hover:not(._3Qgc3)._2daNR ._3TB2q{fill:#085caf}._jImFQ:hover:not(._3Qgc3)._2daNR ._232_j{background-color:rgba(11,110,208,.11)}._jImFQ:hover:not(._3Qgc3)._2daNR ._232_j ._27FKP{color:#085caf}._jImFQ:active:not(._3Qgc3){background-color:#e8e9e9}._jImFQ:active:not(._3Qgc3)._2daNR{background-color:rgba(11,110,208,.11);border-color:#0854a1}._jImFQ:active:not(._3Qgc3)._2daNR ._3TB2q{fill:#0854a1}._jImFQ:active:not(._3Qgc3)._2daNR ._232_j{background-color:rgba(11,110,208,.11)}._jImFQ:active:not(._3Qgc3)._2daNR ._232_j ._27FKP{color:#0854a1}._jImFQ._3Qgc3{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._jImFQ._2daNR{border-color:#0b6ed0}._37QG9{fill:#515559;margin-right:4px}._28Iwx{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._28Iwx+._232_j{margin-left:6px}._28Iwx._3Qgc3{color:#74777a}._232_j{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}._27FKP{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._3TB2q{fill:#515559}._3TB2q._3Qgc3,._3TB2q._3Qgc3._2daNR{fill:rgba(116,119,122,.4)}._3TB2q._2daNR{fill:#0b6ed0}._3TB2q._d7Yff{transform:rotate(-180deg)}body.keyboard-user ._jImFQ:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3311
|
+
var styles$4 = {"button":"_jImFQ","disabled":"_3Qgc3","selected":"_2daNR","label":"_28Iwx","lockIcon":"_37QG9","chevronIcon":"_3TB2q","selectedFiltersContainer":"_232_j","selectedFilters":"_27FKP","open":"_d7Yff"};
|
|
3312
|
+
var stylesheet$4="._jImFQ{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}._jImFQ:hover:not(._3Qgc3){background-color:rgba(50,54,58,.08)}._jImFQ:hover:not(._3Qgc3)._2daNR{border-color:#085caf;background-color:rgba(11,110,208,.04)}._jImFQ:hover:not(._3Qgc3)._2daNR ._28Iwx{color:#32363a}._jImFQ:hover:not(._3Qgc3)._2daNR ._37QG9{fill:#32363a}._jImFQ:hover:not(._3Qgc3)._2daNR ._3TB2q{fill:#085caf}._jImFQ:hover:not(._3Qgc3)._2daNR ._232_j{background-color:rgba(11,110,208,.11)}._jImFQ:hover:not(._3Qgc3)._2daNR ._232_j ._27FKP{color:#085caf}._jImFQ:active:not(._3Qgc3){background-color:#e8e9e9}._jImFQ:active:not(._3Qgc3)._2daNR{background-color:rgba(11,110,208,.11);border-color:#0854a1}._jImFQ:active:not(._3Qgc3)._2daNR ._3TB2q{fill:#0854a1}._jImFQ:active:not(._3Qgc3)._2daNR ._232_j{background-color:rgba(11,110,208,.11)}._jImFQ:active:not(._3Qgc3)._2daNR ._232_j ._27FKP{color:#0854a1}._jImFQ._3Qgc3{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._jImFQ._2daNR{border-color:#0b6ed0}._37QG9{fill:#515559;margin-right:4px}._28Iwx{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._28Iwx+._232_j{margin-left:6px}._28Iwx._3Qgc3{color:#74777a}._232_j{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}._27FKP{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._3TB2q{fill:#515559}._3TB2q._3Qgc3,._3TB2q._3Qgc3._2daNR{fill:rgba(116,119,122,.4)}._3TB2q._2daNR{fill:#0b6ed0}._3TB2q._d7Yff{transform:rotate(-180deg)}body.keyboard-user ._jImFQ:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3313
|
+
icons_index.styleInject(css_248z$4);
|
|
3312
3314
|
|
|
3313
3315
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3314
3316
|
let {
|
|
@@ -3333,9 +3335,9 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3333
3335
|
} = index.useTranslation();
|
|
3334
3336
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
3335
3337
|
type: "button",
|
|
3336
|
-
className: classNames__default["default"](className, styles$
|
|
3337
|
-
[styles$
|
|
3338
|
-
[styles$
|
|
3338
|
+
className: classNames__default["default"](className, styles$4.button, {
|
|
3339
|
+
[styles$4.disabled]: isDisabled,
|
|
3340
|
+
[styles$4.selected]: !!selectedFilters
|
|
3339
3341
|
}),
|
|
3340
3342
|
onClick: e => {
|
|
3341
3343
|
if (isDisabled) {
|
|
@@ -3360,33 +3362,33 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3360
3362
|
}), isLocked && /*#__PURE__*/React__default["default"].createElement(icons_index.LockIcon, {
|
|
3361
3363
|
size: "small",
|
|
3362
3364
|
id: lockIconElementId,
|
|
3363
|
-
className: styles$
|
|
3365
|
+
className: styles$4.lockIcon // @ts-ignore - 'locked' is not in the current list of translations
|
|
3364
3366
|
,
|
|
3365
3367
|
"aria-label": translate('locked')
|
|
3366
3368
|
}), label && /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3367
3369
|
lightTheme: true
|
|
3368
3370
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3369
3371
|
id: labelElementId,
|
|
3370
|
-
className: classNames__default["default"](styles$
|
|
3371
|
-
[styles$
|
|
3372
|
+
className: classNames__default["default"](styles$4.label, {
|
|
3373
|
+
[styles$4.disabled]: isDisabled
|
|
3372
3374
|
})
|
|
3373
3375
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3374
3376
|
show: true,
|
|
3375
3377
|
size: "xs",
|
|
3376
3378
|
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3377
3379
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3378
|
-
className: styles$
|
|
3380
|
+
className: styles$4.selectedFiltersContainer
|
|
3379
3381
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3380
3382
|
lightTheme: true
|
|
3381
3383
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3382
3384
|
id: selectedFiltersElementId,
|
|
3383
|
-
className: styles$
|
|
3385
|
+
className: styles$4.selectedFilters
|
|
3384
3386
|
}, selectedFilters))), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3385
3387
|
size: "medium",
|
|
3386
|
-
className: classNames__default["default"](styles$
|
|
3387
|
-
[styles$
|
|
3388
|
-
[styles$
|
|
3389
|
-
[styles$
|
|
3388
|
+
className: classNames__default["default"](styles$4.chevronIcon, {
|
|
3389
|
+
[styles$4.disabled]: isDisabled,
|
|
3390
|
+
[styles$4.selected]: !!selectedFilters,
|
|
3391
|
+
[styles$4.open]: isOpen
|
|
3390
3392
|
}),
|
|
3391
3393
|
"aria-hidden": true
|
|
3392
3394
|
}));
|
|
@@ -3491,10 +3493,10 @@ class PointerEvent extends Event {
|
|
|
3491
3493
|
|
|
3492
3494
|
}
|
|
3493
3495
|
|
|
3494
|
-
var css_248z$
|
|
3495
|
-
var styles$
|
|
3496
|
-
var stylesheet$
|
|
3497
|
-
icons_index.styleInject(css_248z$
|
|
3496
|
+
var css_248z$3 = "._3gqIB{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._1JqnF{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559}._1JqnF:hover:not([aria-disabled=true]){background-color:#f5f5f5}._1JqnF:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1JqnF+._3fP5f{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._1JqnF[data-state=open]+._3fP5f{transform:rotate(-180deg) translateY(50%)}._1JqnF[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._1JqnF[aria-disabled=true]+._3fP5f{fill:#515559;opacity:.4}._1tmmV{margin:0;padding:4px 0;font-size:14px;color:#32363a;fill:#32363a;list-style:none;min-width:160px;max-width:350px;min-height:10px;max-height:99%;background:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow:scroll}._30qN7{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._30qN7[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._30qN7[aria-disabled=true]{cursor:not-allowed;opacity:.65}._30qN7._3bm5o{padding-right:32px}._30qN7._3bm5o ._3fP5f{position:absolute;top:8px;right:3px;fill:#515559}._2Oigy{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._36ini{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}";
|
|
3497
|
+
var styles$3 = {"buttonContainer":"_3gqIB","button":"_1JqnF","rightIcon":"_3fP5f","flyout":"_1tmmV","menuItem":"_30qN7","subMenu":"_3bm5o","searchBox":"_2Oigy","emptyOption":"_36ini"};
|
|
3498
|
+
var stylesheet$3="._3gqIB{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._1JqnF{cursor:unset;width:100%;height:100%;padding:0 28px 0 12px;border-radius:4px;white-space:nowrap;line-height:20px;font-size:14px;text-align:left;outline:none;background-color:transparent;border:none;box-shadow:inset 0 0 0 1px #898989;color:#515559}._1JqnF:hover:not([aria-disabled=true]){background-color:#f5f5f5}._1JqnF:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1JqnF+._3fP5f{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._1JqnF[data-state=open]+._3fP5f{transform:rotate(-180deg) translateY(50%)}._1JqnF[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._1JqnF[aria-disabled=true]+._3fP5f{fill:#515559;opacity:.4}._1tmmV{margin:0;padding:4px 0;font-size:14px;color:#32363a;fill:#32363a;list-style:none;min-width:160px;max-width:350px;min-height:10px;max-height:99%;background:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;overflow:scroll}._30qN7{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._30qN7[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._30qN7[aria-disabled=true]{cursor:not-allowed;opacity:.65}._30qN7._3bm5o{padding-right:32px}._30qN7._3bm5o ._3fP5f{position:absolute;top:8px;right:3px;fill:#515559}._2Oigy{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._36ini{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;background-color:#fff;font-size:14px;color:#32363a;word-break:break-word}";
|
|
3499
|
+
icons_index.styleInject(css_248z$3);
|
|
3498
3500
|
|
|
3499
3501
|
/* eslint-disable import/prefer-default-export */
|
|
3500
3502
|
const DATA_TESTID_SUFFIXES = {
|
|
@@ -3516,18 +3518,18 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3516
3518
|
} = useMenuContext();
|
|
3517
3519
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3518
3520
|
className: classNames__default["default"]({
|
|
3519
|
-
[styles$
|
|
3521
|
+
[styles$3.buttonContainer]: !asChild
|
|
3520
3522
|
})
|
|
3521
3523
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Trigger, _extends__default["default"]({}, rest, {
|
|
3522
3524
|
"aria-disabled": isDisabled,
|
|
3523
3525
|
className: classNames__default["default"]({
|
|
3524
|
-
[styles$
|
|
3526
|
+
[styles$3.button]: !asChild
|
|
3525
3527
|
}),
|
|
3526
3528
|
asChild: asChild,
|
|
3527
3529
|
ref: ref,
|
|
3528
3530
|
"data-testid": index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_BUTTON)
|
|
3529
3531
|
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3530
|
-
className: styles$
|
|
3532
|
+
className: styles$3.rightIcon,
|
|
3531
3533
|
"aria-hidden": "true"
|
|
3532
3534
|
}));
|
|
3533
3535
|
});
|
|
@@ -3570,7 +3572,7 @@ const MenuSearch = _ref => {
|
|
|
3570
3572
|
isCaptureEvent: true
|
|
3571
3573
|
});
|
|
3572
3574
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
3573
|
-
className: styles$
|
|
3575
|
+
className: styles$3.searchBox // prevents dropdown from closing
|
|
3574
3576
|
,
|
|
3575
3577
|
onSelect: e => e.preventDefault(),
|
|
3576
3578
|
onFocus: () => {
|
|
@@ -3613,7 +3615,7 @@ const MenuSearch = _ref => {
|
|
|
3613
3615
|
leftAddOn: /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null),
|
|
3614
3616
|
ref: inputRef
|
|
3615
3617
|
})), zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3616
|
-
className: styles$
|
|
3618
|
+
className: styles$3.emptyOption // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
3617
3619
|
,
|
|
3618
3620
|
role: "option" // `aria-selected` is omitted because this option is not selectable
|
|
3619
3621
|
,
|
|
@@ -3660,7 +3662,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3660
3662
|
loop: true,
|
|
3661
3663
|
side: side || 'bottom',
|
|
3662
3664
|
align: align || 'start',
|
|
3663
|
-
className: styles$
|
|
3665
|
+
className: styles$3.flyout,
|
|
3664
3666
|
ref: index.mergeRefs(ref, paneRef),
|
|
3665
3667
|
"data-testid": dataTestId
|
|
3666
3668
|
}), isSearchable && /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
@@ -3697,7 +3699,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3697
3699
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
3698
3700
|
asChild: asChild,
|
|
3699
3701
|
"aria-disabled": isDisabled,
|
|
3700
|
-
className: classNames__default["default"](className, styles$
|
|
3702
|
+
className: classNames__default["default"](className, styles$3.menuItem),
|
|
3701
3703
|
"data-testid": dataTestId,
|
|
3702
3704
|
ref: index.mergeRefs(ref, itemRef) // stop radix from closing the menu on selection of disabled item
|
|
3703
3705
|
// other pointer and keyboard events still work, even when disabled
|
|
@@ -3735,13 +3737,13 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3735
3737
|
return isSearchFilteringDisabledForTrigger || !triggerMenuParentSearchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, triggerMenuParentSearchValue.toLowerCase());
|
|
3736
3738
|
}, [triggerMenuParentSearchValue, label, isSearchFilteringDisabledForTrigger]);
|
|
3737
3739
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, {
|
|
3738
|
-
className: classNames__default["default"](styles$
|
|
3740
|
+
className: classNames__default["default"](styles$3.menuItem, styles$3.subMenu),
|
|
3739
3741
|
"data-testid": triggerDataTestId,
|
|
3740
3742
|
"aria-disabled": isDisabled,
|
|
3741
3743
|
disabled: isDisabled,
|
|
3742
3744
|
ref: itemRef
|
|
3743
3745
|
}, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
3744
|
-
className: styles$
|
|
3746
|
+
className: styles$3.rightIcon
|
|
3745
3747
|
})), /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3746
3748
|
items: items,
|
|
3747
3749
|
setItems: setItems,
|
|
@@ -3751,7 +3753,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3751
3753
|
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren
|
|
3752
3754
|
}
|
|
3753
3755
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubContent, _extends__default["default"]({}, rest, {
|
|
3754
|
-
className: styles$
|
|
3756
|
+
className: styles$3.flyout,
|
|
3755
3757
|
loop: true,
|
|
3756
3758
|
"data-testid": paneDataTestId,
|
|
3757
3759
|
ref: index.mergeRefs(ref, paneRef)
|
|
@@ -3762,10 +3764,10 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3762
3764
|
}), children))) : null;
|
|
3763
3765
|
});
|
|
3764
3766
|
|
|
3765
|
-
var css_248z$
|
|
3766
|
-
var styles$
|
|
3767
|
-
var stylesheet$
|
|
3768
|
-
icons_index.styleInject(css_248z$
|
|
3767
|
+
var css_248z$2 = "._2RGPK{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}._Ii2Ia{visibility:hidden}";
|
|
3768
|
+
var styles$2 = {"overlay":"_2RGPK","hidden":"_Ii2Ia"};
|
|
3769
|
+
var stylesheet$2="._2RGPK{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}._Ii2Ia{visibility:hidden}";
|
|
3770
|
+
icons_index.styleInject(css_248z$2);
|
|
3769
3771
|
|
|
3770
3772
|
/**
|
|
3771
3773
|
* Adds an overlay to an area that obscures visibility and disables background elements.
|
|
@@ -3792,10 +3794,10 @@ const useOverlay = _ref => {
|
|
|
3792
3794
|
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
3793
3795
|
const overlay = document.createElement('div');
|
|
3794
3796
|
overlay.id = overlayId;
|
|
3795
|
-
overlay.classList.add(styles$
|
|
3797
|
+
overlay.classList.add(styles$2.overlay);
|
|
3796
3798
|
if (onClick) overlay.addEventListener('click', onClick);
|
|
3797
3799
|
if (dataTestId) overlay.dataset.testid = dataTestId;
|
|
3798
|
-
if (!isVisible) overlay.classList.add(styles$
|
|
3800
|
+
if (!isVisible) overlay.classList.add(styles$2.hidden);
|
|
3799
3801
|
if (zIndex) overlay.style.zIndex = zIndex.toString();
|
|
3800
3802
|
containerNode.appendChild(overlay);
|
|
3801
3803
|
containerNode.style.position = 'relative';
|
|
@@ -3814,12 +3816,12 @@ const useOverlay = _ref => {
|
|
|
3814
3816
|
Array.from(containerNode.children).forEach(child => {
|
|
3815
3817
|
if (!_includesInstanceProperty__default["default"](ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3816
3818
|
});
|
|
3817
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$
|
|
3819
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$2.hidden);
|
|
3818
3820
|
} else {
|
|
3819
3821
|
Array.from(containerNode.children).forEach(child => {
|
|
3820
3822
|
child.removeAttribute('inert');
|
|
3821
3823
|
});
|
|
3822
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$
|
|
3824
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$2.hidden);
|
|
3823
3825
|
}
|
|
3824
3826
|
|
|
3825
3827
|
return () => {
|
|
@@ -3830,10 +3832,10 @@ const useOverlay = _ref => {
|
|
|
3830
3832
|
}, [containerRef, isVisible, ignoreIds, overlayId]);
|
|
3831
3833
|
};
|
|
3832
3834
|
|
|
3833
|
-
var css_248z = ".
|
|
3834
|
-
var styles = {"drawer":"
|
|
3835
|
-
var stylesheet=".
|
|
3836
|
-
icons_index.styleInject(css_248z);
|
|
3835
|
+
var css_248z$1 = "._31yns{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}._1FR2f{visibility:hidden}._2rXPJ{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._1MPjW{padding-top:8px}._2TTHt{margin-left:12px}";
|
|
3836
|
+
var styles$1 = {"drawer":"_31yns","hidden":"_1FR2f","header":"_2rXPJ","title":"_1MPjW","closeButton":"_2TTHt"};
|
|
3837
|
+
var stylesheet$1="._31yns{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}._1FR2f{visibility:hidden}._2rXPJ{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._1MPjW{padding-top:8px}._2TTHt{margin-left:12px}";
|
|
3838
|
+
icons_index.styleInject(css_248z$1);
|
|
3837
3839
|
|
|
3838
3840
|
const Drawer = _ref => {
|
|
3839
3841
|
var _containerRef$current;
|
|
@@ -3917,9 +3919,9 @@ const Drawer = _ref => {
|
|
|
3917
3919
|
|
|
3918
3920
|
return domReady ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default["default"].createElement("aside", {
|
|
3919
3921
|
id: drawerId,
|
|
3920
|
-
className: classNames__default["default"](styles.drawer, {
|
|
3921
|
-
[styles.hidden]: isHidden,
|
|
3922
|
-
[styles.closing]: isClosing
|
|
3922
|
+
className: classNames__default["default"](styles$1.drawer, {
|
|
3923
|
+
[styles$1.hidden]: isHidden,
|
|
3924
|
+
[styles$1.closing]: isClosing
|
|
3923
3925
|
}),
|
|
3924
3926
|
style: {
|
|
3925
3927
|
width,
|
|
@@ -3936,12 +3938,12 @@ const Drawer = _ref => {
|
|
|
3936
3938
|
}, /*#__PURE__*/React__default["default"].createElement(index.PortalTargetProvider, {
|
|
3937
3939
|
target: drawerRef.current
|
|
3938
3940
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3939
|
-
className: styles.header
|
|
3941
|
+
className: styles$1.header
|
|
3940
3942
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3941
|
-
className: styles.title,
|
|
3943
|
+
className: styles$1.title,
|
|
3942
3944
|
"data-testid": index.getSubDataTestId(dataTestId, 'title')
|
|
3943
3945
|
}, title), /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
3944
|
-
className: styles.closeButton,
|
|
3946
|
+
className: styles$1.closeButton,
|
|
3945
3947
|
onClick: close,
|
|
3946
3948
|
ref: closeButtonRef,
|
|
3947
3949
|
"data-testid": index.getSubDataTestId(dataTestId, 'close-button'),
|
|
@@ -3951,6 +3953,644 @@ const Drawer = _ref => {
|
|
|
3951
3953
|
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
3952
3954
|
};
|
|
3953
3955
|
|
|
3956
|
+
var css_248z = "._1Tq-q{display:inline-block;position:relative}._26CI4{width:120px}._26CI4 ._3l9Yr._2Z-J-{transform:rotate(-180deg)}._26CI4 ._3l9Yr._UElrG{fill:#9d9fa1;opacity:.4}._2QJ4e>input:focus{box-shadow:none!important;border:1px solid #898989!important}._8MthS{width:120px}._8MthS ._1Ba-A._1ZrVK{background-color:#efefef;border-radius:6px}._3l9Yr{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._3l9Yr._2Z-J-{transform:rotate(-180deg)}";
|
|
3957
|
+
var styles = {"container":"_1Tq-q","input":"_26CI4","icon":"_3l9Yr","open":"_2Z-J-","disabled":"_UElrG","ignoreFocusStyle":"_2QJ4e","flyout":"_8MthS","option":"_1Ba-A","exactMatch":"_1ZrVK"};
|
|
3958
|
+
var stylesheet="._1Tq-q{display:inline-block;position:relative}._26CI4{width:120px}._26CI4 ._3l9Yr._2Z-J-{transform:rotate(-180deg)}._26CI4 ._3l9Yr._UElrG{fill:#9d9fa1;opacity:.4}._2QJ4e>input:focus{box-shadow:none!important;border:1px solid #898989!important}._8MthS{width:120px}._8MthS ._1Ba-A._1ZrVK{background-color:#efefef;border-radius:6px}._3l9Yr{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._3l9Yr._2Z-J-{transform:rotate(-180deg)}";
|
|
3959
|
+
icons_index.styleInject(css_248z);
|
|
3960
|
+
|
|
3961
|
+
const TimeDropdown = _ref => {
|
|
3962
|
+
let {
|
|
3963
|
+
onClick,
|
|
3964
|
+
scrolledToItem,
|
|
3965
|
+
inputRef,
|
|
3966
|
+
dropdownRef,
|
|
3967
|
+
items,
|
|
3968
|
+
id,
|
|
3969
|
+
dataTestId,
|
|
3970
|
+
ariaLabel,
|
|
3971
|
+
ariaLabelledBy,
|
|
3972
|
+
ariaDescribedBy,
|
|
3973
|
+
setIsOptionHovered,
|
|
3974
|
+
isOptionHovered
|
|
3975
|
+
} = _ref;
|
|
3976
|
+
const scrollRef = React.useRef(Array(items.length));
|
|
3977
|
+
const [refsInitialized, setRefsInitialized] = React.useState(false);
|
|
3978
|
+
React.useEffect(() => {
|
|
3979
|
+
const nodes = scrollRef.current;
|
|
3980
|
+
|
|
3981
|
+
if (scrolledToItem && nodes[scrolledToItem.index]) {
|
|
3982
|
+
nodes[scrolledToItem.index].scrollIntoView();
|
|
3983
|
+
}
|
|
3984
|
+
}, [scrolledToItem, refsInitialized]);
|
|
3985
|
+
return /*#__PURE__*/React__default["default"].createElement(index.Popper, {
|
|
3986
|
+
open: true,
|
|
3987
|
+
isFocusLocked: true,
|
|
3988
|
+
focusLockProps: {
|
|
3989
|
+
returnFocus: true
|
|
3990
|
+
},
|
|
3991
|
+
placement: "bottom",
|
|
3992
|
+
popper: /*#__PURE__*/React__default["default"].createElement(index.Flyout, {
|
|
3993
|
+
anchorRef: inputRef,
|
|
3994
|
+
ref: dropdownRef,
|
|
3995
|
+
id: id,
|
|
3996
|
+
"aria-label": ariaLabel,
|
|
3997
|
+
"aria-labelledby": ariaLabelledBy,
|
|
3998
|
+
"aria-describedby": ariaDescribedBy,
|
|
3999
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-dropdown"),
|
|
4000
|
+
className: styles.flyout,
|
|
4001
|
+
onMouseOver: () => setIsOptionHovered(true),
|
|
4002
|
+
onMouseLeave: () => setIsOptionHovered(false)
|
|
4003
|
+
}, items.map((item, index$1) => /*#__PURE__*/React__default["default"].createElement(index.FlyoutOption, {
|
|
4004
|
+
id: item.id,
|
|
4005
|
+
isHighlightedOnHover: true,
|
|
4006
|
+
isHighlighted: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.isFocused),
|
|
4007
|
+
key: item.label,
|
|
4008
|
+
ref: node => {
|
|
4009
|
+
if (node) {
|
|
4010
|
+
scrollRef.current[index$1] = node;
|
|
4011
|
+
setRefsInitialized(true);
|
|
4012
|
+
}
|
|
4013
|
+
},
|
|
4014
|
+
onClick: () => onClick(index$1),
|
|
4015
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-option-").concat(index$1),
|
|
4016
|
+
className: classNames__default["default"](styles.option, {
|
|
4017
|
+
[styles.exactMatch]: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && scrolledToItem.isExactMatch && !isOptionHovered
|
|
4018
|
+
})
|
|
4019
|
+
}, item.label))),
|
|
4020
|
+
anchorNode: inputRef.current,
|
|
4021
|
+
modifiers: [{
|
|
4022
|
+
name: 'offset',
|
|
4023
|
+
options: {
|
|
4024
|
+
offset: [0, 5]
|
|
4025
|
+
}
|
|
4026
|
+
}]
|
|
4027
|
+
});
|
|
4028
|
+
};
|
|
4029
|
+
|
|
4030
|
+
const formatUtcDate = (utcDate, is24HourClock) => {
|
|
4031
|
+
const {
|
|
4032
|
+
format
|
|
4033
|
+
} = Intl.DateTimeFormat(undefined, {
|
|
4034
|
+
timeStyle: 'short',
|
|
4035
|
+
timeZone: 'UTC',
|
|
4036
|
+
hourCycle: is24HourClock ? 'h23' : 'h12'
|
|
4037
|
+
});
|
|
4038
|
+
const dateWithoutLeadingZeros = format(utcDate);
|
|
4039
|
+
let dateWithLeadingZeros = dateWithoutLeadingZeros;
|
|
4040
|
+
|
|
4041
|
+
if (dateWithLeadingZeros.split(':')[0].length === 1) {
|
|
4042
|
+
dateWithLeadingZeros = "0".concat(dateWithLeadingZeros);
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
return dateWithLeadingZeros.toLowerCase();
|
|
4046
|
+
};
|
|
4047
|
+
const convertTimeObjectToTimeString = (time, is24HourClock) => {
|
|
4048
|
+
const date = Date.UTC(2000, 0, 0, time.hour, time.minute);
|
|
4049
|
+
return formatUtcDate(date, is24HourClock);
|
|
4050
|
+
};
|
|
4051
|
+
const convertTimeStringToTimeObject = completeTimeString => {
|
|
4052
|
+
const [hourPart, minutePart, amPmPart] = completeTimeString.split(/:| /);
|
|
4053
|
+
let hour = +hourPart;
|
|
4054
|
+
const minute = +minutePart;
|
|
4055
|
+
|
|
4056
|
+
if (amPmPart === 'am' && hour === 12) {
|
|
4057
|
+
hour = 0;
|
|
4058
|
+
} else if (amPmPart === 'pm' && hour < 12) {
|
|
4059
|
+
hour += 12;
|
|
4060
|
+
}
|
|
4061
|
+
|
|
4062
|
+
return {
|
|
4063
|
+
hour,
|
|
4064
|
+
minute
|
|
4065
|
+
};
|
|
4066
|
+
};
|
|
4067
|
+
const generateTimes = (step, is24HourClock) => {
|
|
4068
|
+
const secondsInDay = 60 * 60 * 24;
|
|
4069
|
+
return Array.from(Array(secondsInDay / step)).map((_, i) => {
|
|
4070
|
+
const labelWithLeadingZeros = formatUtcDate(Date.UTC(2000, 0, 1, 0, 0, i * step, 0), is24HourClock);
|
|
4071
|
+
return {
|
|
4072
|
+
label: labelWithLeadingZeros,
|
|
4073
|
+
value: i * step,
|
|
4074
|
+
id: "time-option-".concat(i)
|
|
4075
|
+
};
|
|
4076
|
+
});
|
|
4077
|
+
};
|
|
4078
|
+
|
|
4079
|
+
function getTimeStringCorrector(str, is24HourClock) {
|
|
4080
|
+
var _letterString;
|
|
4081
|
+
|
|
4082
|
+
let [numberString, letterString] = str.replace(':', '').split(' ');
|
|
4083
|
+
letterString = (_letterString = letterString) === null || _letterString === void 0 ? void 0 : _letterString.toLowerCase();
|
|
4084
|
+
let selectionModifier = 0;
|
|
4085
|
+
|
|
4086
|
+
const getTimeString = () => {
|
|
4087
|
+
const finalNumberString = "".concat(numberString.slice(0, 2), ":").concat(numberString.slice(2, 4));
|
|
4088
|
+
return is24HourClock ? finalNumberString : "".concat(finalNumberString, " ").concat(letterString);
|
|
4089
|
+
};
|
|
4090
|
+
|
|
4091
|
+
const getSelectionModifier = () => selectionModifier;
|
|
4092
|
+
|
|
4093
|
+
const replaceDashes = () => {
|
|
4094
|
+
numberString = numberString.replace(/-/g, '0');
|
|
4095
|
+
|
|
4096
|
+
if (letterString) {
|
|
4097
|
+
if (letterString[0] === '-' || letterString[0] === 'a') {
|
|
4098
|
+
// Arbitrarily choose AM if user hasn't typed 'a' or 'p'
|
|
4099
|
+
letterString = 'am';
|
|
4100
|
+
} else {
|
|
4101
|
+
letterString = 'pm';
|
|
4102
|
+
}
|
|
4103
|
+
}
|
|
4104
|
+
};
|
|
4105
|
+
|
|
4106
|
+
const shiftMinutesRight = () => {
|
|
4107
|
+
numberString = "".concat(numberString.slice(0, 2), "0").concat(numberString[2]);
|
|
4108
|
+
selectionModifier += 1;
|
|
4109
|
+
};
|
|
4110
|
+
|
|
4111
|
+
const prependCharacter = character => {
|
|
4112
|
+
numberString = "".concat(character).concat(numberString);
|
|
4113
|
+
selectionModifier += 1;
|
|
4114
|
+
};
|
|
4115
|
+
|
|
4116
|
+
const setHoursTo12 = () => {
|
|
4117
|
+
numberString = "12".concat(numberString.slice(2));
|
|
4118
|
+
};
|
|
4119
|
+
|
|
4120
|
+
const clearSecondHoursDigit = () => {
|
|
4121
|
+
numberString = "".concat(numberString.slice(0, 1), "0").concat(numberString.slice(2));
|
|
4122
|
+
};
|
|
4123
|
+
|
|
4124
|
+
const hoursAre00 = () => numberString[0] === '0' && numberString[1] === '0';
|
|
4125
|
+
|
|
4126
|
+
const firstHourGreaterThan1 = () => {
|
|
4127
|
+
var _context;
|
|
4128
|
+
|
|
4129
|
+
return !_includesInstanceProperty__default["default"](_context = '01-').call(_context, numberString[0]);
|
|
4130
|
+
};
|
|
4131
|
+
|
|
4132
|
+
const firstHourGreaterThan2 = () => {
|
|
4133
|
+
var _context2;
|
|
4134
|
+
|
|
4135
|
+
return !_includesInstanceProperty__default["default"](_context2 = '012-').call(_context2, numberString[0]);
|
|
4136
|
+
};
|
|
4137
|
+
|
|
4138
|
+
const hoursGreaterThan12 = () => {
|
|
4139
|
+
var _context3;
|
|
4140
|
+
|
|
4141
|
+
return numberString[0] === '1' && !_includesInstanceProperty__default["default"](_context3 = '012-').call(_context3, numberString[1]);
|
|
4142
|
+
};
|
|
4143
|
+
|
|
4144
|
+
const hoursGreaterThan23 = () => {
|
|
4145
|
+
var _context4;
|
|
4146
|
+
|
|
4147
|
+
return numberString[0] === '2' && !_includesInstanceProperty__default["default"](_context4 = '0123-').call(_context4, numberString[1]);
|
|
4148
|
+
};
|
|
4149
|
+
|
|
4150
|
+
const firstMinuteGreaterThan5 = () => numberString[2] !== '-' && +numberString[2] > 5;
|
|
4151
|
+
|
|
4152
|
+
const hasTypedMinutes = () => numberString[2] !== '-' && numberString[3] !== '-';
|
|
4153
|
+
|
|
4154
|
+
return {
|
|
4155
|
+
getTimeString,
|
|
4156
|
+
getSelectionModifier,
|
|
4157
|
+
replaceDashes,
|
|
4158
|
+
setHoursTo12,
|
|
4159
|
+
clearSecondHoursDigit,
|
|
4160
|
+
shiftMinutesRight,
|
|
4161
|
+
prependCharacter,
|
|
4162
|
+
hoursAre00,
|
|
4163
|
+
firstHourGreaterThan1,
|
|
4164
|
+
firstHourGreaterThan2,
|
|
4165
|
+
hoursGreaterThan12,
|
|
4166
|
+
hoursGreaterThan23,
|
|
4167
|
+
firstMinuteGreaterThan5,
|
|
4168
|
+
hasTypedMinutes
|
|
4169
|
+
};
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4172
|
+
const correct12HourTime = (time, mustCompleteTime) => {
|
|
4173
|
+
const timeStringCorrector = getTimeStringCorrector(time, false);
|
|
4174
|
+
|
|
4175
|
+
if (mustCompleteTime) {
|
|
4176
|
+
timeStringCorrector.replaceDashes();
|
|
4177
|
+
}
|
|
4178
|
+
|
|
4179
|
+
if (timeStringCorrector.firstHourGreaterThan1()) {
|
|
4180
|
+
timeStringCorrector.prependCharacter('0');
|
|
4181
|
+
}
|
|
4182
|
+
|
|
4183
|
+
if (timeStringCorrector.hoursGreaterThan12()) {
|
|
4184
|
+
if (timeStringCorrector.hasTypedMinutes()) {
|
|
4185
|
+
// User likely just edited the first digit and that made the
|
|
4186
|
+
// second digit invalid, e.g., changed '08:' to '18:'. They
|
|
4187
|
+
// probably are about to fix up the second digit. We'll set it to 0
|
|
4188
|
+
timeStringCorrector.clearSecondHoursDigit();
|
|
4189
|
+
} else {
|
|
4190
|
+
// Assume the user forgot a leading 0
|
|
4191
|
+
// Example: we are changing '13:--' to '01:3-'
|
|
4192
|
+
timeStringCorrector.prependCharacter('0');
|
|
4193
|
+
}
|
|
4194
|
+
}
|
|
4195
|
+
|
|
4196
|
+
if (timeStringCorrector.hoursAre00()) {
|
|
4197
|
+
timeStringCorrector.setHoursTo12();
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4200
|
+
if (timeStringCorrector.firstMinuteGreaterThan5()) {
|
|
4201
|
+
// Assume the user forgot a 0
|
|
4202
|
+
// Example: we are changing 12:6- to 12:06
|
|
4203
|
+
timeStringCorrector.shiftMinutesRight();
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4206
|
+
return {
|
|
4207
|
+
correctedTime: timeStringCorrector.getTimeString(),
|
|
4208
|
+
selectionModifier: timeStringCorrector.getSelectionModifier()
|
|
4209
|
+
};
|
|
4210
|
+
};
|
|
4211
|
+
|
|
4212
|
+
const correct24HourTime = (time, mustCompleteTime) => {
|
|
4213
|
+
const timeStringCorrector = getTimeStringCorrector(time, true);
|
|
4214
|
+
|
|
4215
|
+
if (mustCompleteTime) {
|
|
4216
|
+
timeStringCorrector.replaceDashes();
|
|
4217
|
+
}
|
|
4218
|
+
|
|
4219
|
+
if (timeStringCorrector.hoursGreaterThan23()) {
|
|
4220
|
+
// User likely just edited the first digit and that made the second
|
|
4221
|
+
// digit invalid, e.g., changed '15:' to '25:'. They probably
|
|
4222
|
+
// are about to fix up the second digit. We'll set it to 0
|
|
4223
|
+
if (timeStringCorrector.hasTypedMinutes()) {
|
|
4224
|
+
timeStringCorrector.clearSecondHoursDigit();
|
|
4225
|
+
} else {
|
|
4226
|
+
// Assume the user forgot a leading 0
|
|
4227
|
+
// Example: we are changing '25:--' to '02:5-'
|
|
4228
|
+
timeStringCorrector.prependCharacter('0');
|
|
4229
|
+
}
|
|
4230
|
+
}
|
|
4231
|
+
|
|
4232
|
+
if (timeStringCorrector.firstHourGreaterThan2()) {
|
|
4233
|
+
// Assume the user forgot a leading 0
|
|
4234
|
+
// Example: we are changing '3-:--' to '03:--'
|
|
4235
|
+
timeStringCorrector.prependCharacter('0');
|
|
4236
|
+
}
|
|
4237
|
+
|
|
4238
|
+
if (timeStringCorrector.firstMinuteGreaterThan5()) {
|
|
4239
|
+
// Assume the user forgot a 0
|
|
4240
|
+
// Example: we are changing 12:6- to 12:06
|
|
4241
|
+
timeStringCorrector.shiftMinutesRight();
|
|
4242
|
+
}
|
|
4243
|
+
|
|
4244
|
+
return {
|
|
4245
|
+
correctedTime: timeStringCorrector.getTimeString(),
|
|
4246
|
+
selectionModifier: timeStringCorrector.getSelectionModifier()
|
|
4247
|
+
};
|
|
4248
|
+
}; // We will follow the same process to correct the time regardless
|
|
4249
|
+
// of what specific character changed.
|
|
4250
|
+
// This simplifies logic for when multiple chars are pasted in
|
|
4251
|
+
// and for when the input has to be shifted due to invalid entries.
|
|
4252
|
+
|
|
4253
|
+
|
|
4254
|
+
const correctTime = (time, is24HourClock, mustCompleteTime) => is24HourClock ? correct24HourTime(time, mustCompleteTime) : correct12HourTime(time, mustCompleteTime);
|
|
4255
|
+
|
|
4256
|
+
const TimeInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4257
|
+
let {
|
|
4258
|
+
onChange,
|
|
4259
|
+
ariaExpanded,
|
|
4260
|
+
userInput,
|
|
4261
|
+
handleKeyDown,
|
|
4262
|
+
setIsFlyoutOpen,
|
|
4263
|
+
setShouldMoveSelectionToEnd,
|
|
4264
|
+
shouldMoveSelectionToEnd,
|
|
4265
|
+
isInvalid,
|
|
4266
|
+
isDisabled,
|
|
4267
|
+
is24HourClock,
|
|
4268
|
+
id,
|
|
4269
|
+
dataTestId,
|
|
4270
|
+
ariaControls,
|
|
4271
|
+
ariaActiveDescendant,
|
|
4272
|
+
ariaLabel,
|
|
4273
|
+
ariaLabelledBy,
|
|
4274
|
+
ariaDescribedBy,
|
|
4275
|
+
isOptionHovered
|
|
4276
|
+
} = _ref;
|
|
4277
|
+
const mask24 = '99:99';
|
|
4278
|
+
const mask12 = '99:99 am';
|
|
4279
|
+
const mask = is24HourClock ? mask24 : mask12;
|
|
4280
|
+
return /*#__PURE__*/React__default["default"].createElement(InputMask__default["default"], {
|
|
4281
|
+
value: userInput,
|
|
4282
|
+
onChange: e => onChange(e.target.value),
|
|
4283
|
+
disabled: isDisabled,
|
|
4284
|
+
alwaysShowMask: true,
|
|
4285
|
+
formatChars: {
|
|
4286
|
+
'9': '[0-9]',
|
|
4287
|
+
a: '[AaPp]',
|
|
4288
|
+
m: '[Mm]'
|
|
4289
|
+
},
|
|
4290
|
+
maskChar: "-",
|
|
4291
|
+
mask: mask,
|
|
4292
|
+
beforeMaskedValueChange: next => {
|
|
4293
|
+
const {
|
|
4294
|
+
correctedTime,
|
|
4295
|
+
selectionModifier
|
|
4296
|
+
} = correctTime(next.value, is24HourClock, false);
|
|
4297
|
+
const newSelection = next === null || next === void 0 ? void 0 : next.selection;
|
|
4298
|
+
|
|
4299
|
+
if (newSelection) {
|
|
4300
|
+
const validTimeLength = mask.length;
|
|
4301
|
+
newSelection.start = shouldMoveSelectionToEnd ? validTimeLength : newSelection.start;
|
|
4302
|
+
newSelection.end = shouldMoveSelectionToEnd ? validTimeLength : newSelection.end;
|
|
4303
|
+
newSelection.start = Math.min(newSelection.start + selectionModifier, validTimeLength);
|
|
4304
|
+
newSelection.end = Math.min(newSelection.end + selectionModifier, validTimeLength);
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
setShouldMoveSelectionToEnd(false);
|
|
4308
|
+
return { ...next,
|
|
4309
|
+
value: correctedTime,
|
|
4310
|
+
selection: newSelection
|
|
4311
|
+
};
|
|
4312
|
+
}
|
|
4313
|
+
}, () => /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
4314
|
+
id: id,
|
|
4315
|
+
disabled: isDisabled,
|
|
4316
|
+
role: "combobox",
|
|
4317
|
+
"aria-expanded": ariaExpanded,
|
|
4318
|
+
"aria-controls": ariaControls,
|
|
4319
|
+
ref: ref,
|
|
4320
|
+
className: classNames__default["default"](styles.input, {
|
|
4321
|
+
[styles.ignoreFocusStyle]: !!ariaActiveDescendant || isOptionHovered
|
|
4322
|
+
}),
|
|
4323
|
+
"aria-invalid": isInvalid,
|
|
4324
|
+
onKeyDown: handleKeyDown,
|
|
4325
|
+
onClick: () => setIsFlyoutOpen(true),
|
|
4326
|
+
"aria-label": ariaLabel,
|
|
4327
|
+
"aria-labelledby": ariaLabelledBy,
|
|
4328
|
+
"aria-describedby": ariaDescribedBy,
|
|
4329
|
+
"aria-activedescendant": ariaActiveDescendant,
|
|
4330
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-input")
|
|
4331
|
+
}));
|
|
4332
|
+
});
|
|
4333
|
+
|
|
4334
|
+
const TimePickerIcon = _ref => {
|
|
4335
|
+
let {
|
|
4336
|
+
isOpen,
|
|
4337
|
+
isDisabled,
|
|
4338
|
+
setIsFlyoutOpen,
|
|
4339
|
+
iconRef,
|
|
4340
|
+
inputRef
|
|
4341
|
+
} = _ref;
|
|
4342
|
+
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
4343
|
+
"aria-hidden": "true",
|
|
4344
|
+
tabIndex: -1,
|
|
4345
|
+
disabled: isDisabled,
|
|
4346
|
+
className: classNames__default["default"](styles.icon, {
|
|
4347
|
+
[styles.open]: isOpen
|
|
4348
|
+
})
|
|
4349
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
4350
|
+
onClick: !isDisabled ? () => {
|
|
4351
|
+
var _inputRef$current;
|
|
4352
|
+
|
|
4353
|
+
setIsFlyoutOpen(i => !i);
|
|
4354
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
4355
|
+
} : undefined,
|
|
4356
|
+
onMouseDown: e => e.preventDefault(),
|
|
4357
|
+
ref: iconRef
|
|
4358
|
+
}));
|
|
4359
|
+
};
|
|
4360
|
+
|
|
4361
|
+
const DEFAULT_TIME = (() => {
|
|
4362
|
+
const now = new Date();
|
|
4363
|
+
const hour = now.getHours();
|
|
4364
|
+
const minute = now.getMinutes();
|
|
4365
|
+
return {
|
|
4366
|
+
hour,
|
|
4367
|
+
minute
|
|
4368
|
+
};
|
|
4369
|
+
})();
|
|
4370
|
+
|
|
4371
|
+
const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
4372
|
+
let {
|
|
4373
|
+
value: externalValue,
|
|
4374
|
+
onChange: externalOnChange,
|
|
4375
|
+
is24HourClock = false,
|
|
4376
|
+
isDisabled = false,
|
|
4377
|
+
isInvalid = false,
|
|
4378
|
+
id: externalId,
|
|
4379
|
+
'data-testid': dataTestId,
|
|
4380
|
+
'aria-label': ariaLabel,
|
|
4381
|
+
'aria-labelledby': ariaLabelledBy,
|
|
4382
|
+
'aria-describedby': ariaDescribedBy
|
|
4383
|
+
} = _ref;
|
|
4384
|
+
const timePickerId = index.useId(externalId);
|
|
4385
|
+
const inputId = "".concat(timePickerId, "-input");
|
|
4386
|
+
const dropdownId = "".concat(timePickerId, "-dropdown");
|
|
4387
|
+
const [isOptionHovered, setIsOptionHovered] = React.useState(false);
|
|
4388
|
+
const [timeObject, setTimeObject] = index.useControllableState(DEFAULT_TIME, externalOnChange, externalValue);
|
|
4389
|
+
const defaultTimeString = convertTimeObjectToTimeString(timeObject, is24HourClock); // timeString needs its own state instead of always being derived from timeObject, since typing doesn't "commit" a new time.
|
|
4390
|
+
|
|
4391
|
+
const [timeString, setTimeString] = React.useState(defaultTimeString);
|
|
4392
|
+
const [isTimeStringDirty, setIsTimeStringDirty] = React.useState(false);
|
|
4393
|
+
const step = 60 * 30;
|
|
4394
|
+
const dropdownItems = React.useMemo(() => generateTimes(step, is24HourClock), [is24HourClock, step]);
|
|
4395
|
+
const getScrolledToItemFromTimeString = React.useCallback(typedTime => {
|
|
4396
|
+
const {
|
|
4397
|
+
correctedTime
|
|
4398
|
+
} = correctTime(typedTime, is24HourClock, true);
|
|
4399
|
+
const correctedTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
4400
|
+
const correctedTimeValue = correctedTimeObject.hour * 60 * 60 + correctedTimeObject.minute * 60;
|
|
4401
|
+
let minDistance = correctedTimeValue - dropdownItems[0].value; // Substring search up to first empty spot
|
|
4402
|
+
|
|
4403
|
+
for (let i = 1; i < dropdownItems.length; i += 1) {
|
|
4404
|
+
const distance = correctedTimeValue - dropdownItems[i].value;
|
|
4405
|
+
|
|
4406
|
+
if (distance > minDistance || distance < 0) {
|
|
4407
|
+
return {
|
|
4408
|
+
index: i - 1,
|
|
4409
|
+
isFocused: false,
|
|
4410
|
+
isExactMatch: minDistance === 0
|
|
4411
|
+
};
|
|
4412
|
+
}
|
|
4413
|
+
|
|
4414
|
+
minDistance = distance;
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
return {
|
|
4418
|
+
index: dropdownItems.length - 1,
|
|
4419
|
+
isFocused: false,
|
|
4420
|
+
isExactMatch: minDistance === 0
|
|
4421
|
+
};
|
|
4422
|
+
}, [is24HourClock, dropdownItems]);
|
|
4423
|
+
const [scrolledToItem, setScrolledToItem] = React.useState(() => getScrolledToItemFromTimeString(timeString));
|
|
4424
|
+
const [shouldMoveSelectionToEnd, setShouldMoveSelectionToEnd] = React.useState(true); // timeObject may be controlled and may change at any time, so we need to update timeString and the focused item whenever it changes.
|
|
4425
|
+
|
|
4426
|
+
React.useEffect(() => {
|
|
4427
|
+
const newTimeString = convertTimeObjectToTimeString(timeObject, is24HourClock);
|
|
4428
|
+
setTimeString(newTimeString);
|
|
4429
|
+
setIsTimeStringDirty(false);
|
|
4430
|
+
setShouldMoveSelectionToEnd(true);
|
|
4431
|
+
setScrolledToItem(getScrolledToItemFromTimeString(newTimeString));
|
|
4432
|
+
}, [timeObject, is24HourClock, getScrolledToItemFromTimeString]);
|
|
4433
|
+
const [isFlyoutOpen, setIsFlyoutOpen] = React.useState(false); // Sets the actual time object and updates the flyout and focus state
|
|
4434
|
+
|
|
4435
|
+
const commitTimeString = function () {
|
|
4436
|
+
let newTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : timeString;
|
|
4437
|
+
const {
|
|
4438
|
+
correctedTime
|
|
4439
|
+
} = correctTime(newTime, is24HourClock, true);
|
|
4440
|
+
const newTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
4441
|
+
setTimeObject(newTimeObject);
|
|
4442
|
+
setIsFlyoutOpen(false);
|
|
4443
|
+
};
|
|
4444
|
+
|
|
4445
|
+
const inputRef = React.useRef(null);
|
|
4446
|
+
const dropdownRef = React.useRef(null);
|
|
4447
|
+
const iconRef = React.useRef(null);
|
|
4448
|
+
index.useClickOutside([inputRef, dropdownRef, iconRef], () => isTimeStringDirty ? commitTimeString() : setIsFlyoutOpen(false));
|
|
4449
|
+
|
|
4450
|
+
const focusNext = () => {
|
|
4451
|
+
setScrolledToItem(f => {
|
|
4452
|
+
if (!f.isFocused) {
|
|
4453
|
+
// Focus just moved from input to listbox.
|
|
4454
|
+
// Move to item that was highlighted based on user input
|
|
4455
|
+
return {
|
|
4456
|
+
index: f.index,
|
|
4457
|
+
isFocused: true,
|
|
4458
|
+
isExactMatch: false
|
|
4459
|
+
};
|
|
4460
|
+
}
|
|
4461
|
+
|
|
4462
|
+
if (f.index === dropdownItems.length - 1) {
|
|
4463
|
+
return f;
|
|
4464
|
+
}
|
|
4465
|
+
|
|
4466
|
+
return {
|
|
4467
|
+
index: f.index + 1,
|
|
4468
|
+
isFocused: true,
|
|
4469
|
+
isExactMatch: false
|
|
4470
|
+
};
|
|
4471
|
+
});
|
|
4472
|
+
};
|
|
4473
|
+
|
|
4474
|
+
const focusPrevious = () => {
|
|
4475
|
+
setScrolledToItem(f => {
|
|
4476
|
+
if (!f.isFocused) {
|
|
4477
|
+
// Focus just moved from input to listbox
|
|
4478
|
+
// Move to last item on arrowUp.
|
|
4479
|
+
return {
|
|
4480
|
+
index: dropdownItems.length - 1,
|
|
4481
|
+
isFocused: true,
|
|
4482
|
+
isExactMatch: false
|
|
4483
|
+
};
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
if (f.index === 0) {
|
|
4487
|
+
return f;
|
|
4488
|
+
}
|
|
4489
|
+
|
|
4490
|
+
return {
|
|
4491
|
+
index: f.index - 1,
|
|
4492
|
+
isFocused: true,
|
|
4493
|
+
isExactMatch: false
|
|
4494
|
+
};
|
|
4495
|
+
});
|
|
4496
|
+
};
|
|
4497
|
+
|
|
4498
|
+
const handleType = typedTime => {
|
|
4499
|
+
setIsFlyoutOpen(true);
|
|
4500
|
+
setTimeString(typedTime);
|
|
4501
|
+
setIsTimeStringDirty(true);
|
|
4502
|
+
setScrolledToItem(getScrolledToItemFromTimeString(typedTime));
|
|
4503
|
+
};
|
|
4504
|
+
|
|
4505
|
+
const handleSelectTime = selectedIndex => {
|
|
4506
|
+
const timeLabel = dropdownItems[selectedIndex].label;
|
|
4507
|
+
setIsOptionHovered(false);
|
|
4508
|
+
commitTimeString(timeLabel);
|
|
4509
|
+
};
|
|
4510
|
+
|
|
4511
|
+
const handleKeyDown = e => {
|
|
4512
|
+
switch (e.key) {
|
|
4513
|
+
case 'ArrowUp':
|
|
4514
|
+
e.preventDefault();
|
|
4515
|
+
setIsFlyoutOpen(true);
|
|
4516
|
+
focusPrevious();
|
|
4517
|
+
break;
|
|
4518
|
+
|
|
4519
|
+
case 'ArrowDown':
|
|
4520
|
+
e.preventDefault();
|
|
4521
|
+
setIsFlyoutOpen(true);
|
|
4522
|
+
focusNext();
|
|
4523
|
+
break;
|
|
4524
|
+
|
|
4525
|
+
case 'Enter':
|
|
4526
|
+
e.preventDefault();
|
|
4527
|
+
|
|
4528
|
+
if (scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused) {
|
|
4529
|
+
// "focus" is on the listbox
|
|
4530
|
+
handleSelectTime(scrolledToItem.index);
|
|
4531
|
+
} else {
|
|
4532
|
+
// "focus" is on the input
|
|
4533
|
+
commitTimeString();
|
|
4534
|
+
}
|
|
4535
|
+
|
|
4536
|
+
break;
|
|
4537
|
+
|
|
4538
|
+
case 'Escape':
|
|
4539
|
+
case 'Tab':
|
|
4540
|
+
// use whatever time is closest to what's in the input
|
|
4541
|
+
commitTimeString();
|
|
4542
|
+
break;
|
|
4543
|
+
|
|
4544
|
+
default:
|
|
4545
|
+
break;
|
|
4546
|
+
}
|
|
4547
|
+
};
|
|
4548
|
+
|
|
4549
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4550
|
+
id: timePickerId,
|
|
4551
|
+
className: styles.container
|
|
4552
|
+
}, /*#__PURE__*/React__default["default"].createElement(TimeInput, {
|
|
4553
|
+
id: inputId,
|
|
4554
|
+
dataTestId: dataTestId,
|
|
4555
|
+
ariaActiveDescendant: isFlyoutOpen && scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused ? dropdownItems[scrolledToItem.index].id : undefined,
|
|
4556
|
+
ariaControls: dropdownId,
|
|
4557
|
+
ariaExpanded: isFlyoutOpen,
|
|
4558
|
+
onChange: handleType,
|
|
4559
|
+
userInput: timeString,
|
|
4560
|
+
handleKeyDown: handleKeyDown,
|
|
4561
|
+
setIsFlyoutOpen: setIsFlyoutOpen,
|
|
4562
|
+
isDisabled: isDisabled,
|
|
4563
|
+
is24HourClock: is24HourClock,
|
|
4564
|
+
isInvalid: isInvalid,
|
|
4565
|
+
ariaLabel: ariaLabel,
|
|
4566
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
4567
|
+
ariaDescribedBy: ariaDescribedBy,
|
|
4568
|
+
isOptionHovered: isOptionHovered,
|
|
4569
|
+
setShouldMoveSelectionToEnd: setShouldMoveSelectionToEnd,
|
|
4570
|
+
shouldMoveSelectionToEnd: shouldMoveSelectionToEnd,
|
|
4571
|
+
ref: index.mergeRefs(ref, inputRef)
|
|
4572
|
+
}), /*#__PURE__*/React__default["default"].createElement(TimePickerIcon, {
|
|
4573
|
+
isOpen: isFlyoutOpen,
|
|
4574
|
+
isDisabled: isDisabled,
|
|
4575
|
+
setIsFlyoutOpen: setIsFlyoutOpen,
|
|
4576
|
+
iconRef: iconRef,
|
|
4577
|
+
inputRef: inputRef
|
|
4578
|
+
}), isFlyoutOpen && /*#__PURE__*/React__default["default"].createElement(TimeDropdown, {
|
|
4579
|
+
id: dropdownId,
|
|
4580
|
+
inputRef: inputRef,
|
|
4581
|
+
dropdownRef: dropdownRef,
|
|
4582
|
+
onClick: handleSelectTime,
|
|
4583
|
+
scrolledToItem: scrolledToItem,
|
|
4584
|
+
items: dropdownItems,
|
|
4585
|
+
dataTestId: dataTestId,
|
|
4586
|
+
ariaLabel: ariaLabel,
|
|
4587
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
4588
|
+
ariaDescribedBy: ariaDescribedBy,
|
|
4589
|
+
setIsOptionHovered: setIsOptionHovered,
|
|
4590
|
+
isOptionHovered: isOptionHovered
|
|
4591
|
+
}));
|
|
4592
|
+
});
|
|
4593
|
+
|
|
3954
4594
|
/* eslint-disable camelcase */
|
|
3955
4595
|
|
|
3956
4596
|
exports.Input = index.Input$1;
|
|
@@ -3971,3 +4611,4 @@ exports.PhoneNumberInput = PhoneNumberInput;
|
|
|
3971
4611
|
exports.SplitButton = SplitButton;
|
|
3972
4612
|
exports.SplitButtonOption = SplitButtonOption;
|
|
3973
4613
|
exports.SubMenu = SubMenu;
|
|
4614
|
+
exports.TimePicker = TimePicker;
|