@qualtrics/ui-react 2.11.0 → 2.12.1
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 +28 -0
- package/dist/__shared/cjs/index-1a8585e7.js +13058 -0
- package/dist/__shared/cjs/{index-30148ada.js → index-def941fc.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/Combobox/ComboboxInput.js +3 -1
- package/dist/next/Combobox/ComboboxOption.js +1 -0
- 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 +807 -163
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/keyboardUser/keyboardUser.js +1 -1
- package/package.json +2 -2
- 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-1a8585e7.js');
|
|
13
|
+
var icons_index = require('../__shared/cjs/index-def941fc.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 = "._3FnxA{overflow:auto;position:relative;max-width:100%;max-height:100%}._3FnxA,._3iV94{background-color:#fff}._3iV94{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._Tuvof{margin-bottom:4px}._3reRH{position:-webkit-sticky;position:sticky;top:0;z-index:100}._29xlT{display:flex}._29xlT:focus{outline:none}body.keyboard-user ._29xlT:focus ._dChxk: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 ._29xlT:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._29xlT:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._29xlT:focus ._dChxk._2nyGo:after{right:-3px;bottom:1px}._E0mQ7{padding-right:3px}._3N1VN{display:flex}._3N1VN._H42Or ._3vCGx,._3N1VN._H42Or ._dChxk{cursor:pointer}._3N1VN._2D1ZK ._3vCGx,._3N1VN._2D1ZK ._dChxk{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._3N1VN._2D1ZK ._3vCGx._2nyGo,._3N1VN._2D1ZK ._dChxk._2nyGo{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._3N1VN._2D1ZK ._3vCGx._2nyGo ._1jnTT,._3N1VN._2D1ZK ._3vCGx._2nyGo ._2tmrZ,._3N1VN._2D1ZK ._3vCGx._2nyGo ._3vCGx,._3N1VN._2D1ZK ._dChxk._2nyGo ._1jnTT,._3N1VN._2D1ZK ._dChxk._2nyGo ._2tmrZ,._3N1VN._2D1ZK ._dChxk._2nyGo ._3vCGx{background-color:rgba(11,110,208,.08)}._3N1VN._H42Or:hover:not(._2D1ZK):not(._3W3zq) ._3vCGx,._3N1VN._H42Or:hover:not(._2D1ZK):not(._3W3zq) ._dChxk{background-color:#f9f9f9}._3N1VN._H42Or:active:not(._2D1ZK):not(._3W3zq) ._3vCGx,._3N1VN._H42Or:active:not(._2D1ZK):not(._3W3zq) ._dChxk{background-color:#f3f3f3}._3N1VN:focus{outline:none}body.keyboard-user ._3N1VN:focus ._dChxk: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 ._3N1VN:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:focus ._dChxk._2nyGo:after{right:-3px;bottom:0}._3N1VN:last-of-type:focus{outline:none}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk: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 ._3N1VN:last-of-type:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk._2nyGo:after{right:-3px;bottom:1px}._3N1VN:last-of-type ._1jnTT:focus{outline:none}body.keyboard-user ._3N1VN:last-of-type ._1jnTT._2vceI:after,body.keyboard-user ._3N1VN:last-of-type ._1jnTT: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}._3N1VN:first-of-type:focus{outline:none}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk: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 ._3N1VN:first-of-type:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk._2nyGo:after{right:-3px;bottom:0}._3N1VN:first-of-type ._1jnTT:focus{outline:none}body.keyboard-user ._3N1VN:first-of-type ._1jnTT._2vceI:after,body.keyboard-user ._3N1VN:first-of-type ._1jnTT: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}._1tQ-o{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}._1tQ-o._1BXwA{flex-grow:1}._1tQ-o._3UfWE{cursor:pointer}._1tQ-o._3UfWE:hover:not(._2qdpz){background-color:#f9f9f9;border-bottom-color:#6a6d70}._1tQ-o._3UfWE:active:not(._2qdpz){background-color:#f3f3f3}._1tQ-o._1NkKx:not(._2qdpz){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._1tQ-o._2qdpz{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._1tQ-o ._3bxXk{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._1tQ-o ._3bxXk._drOfN{left:-1px}._1tQ-o ._3bxXk._dAwXY{right:0}._1tQ-o ._HyfCD{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._1tQ-o ._HyfCD._drOfN{left:-2px}._1tQ-o ._HyfCD._dAwXY{right:-1px}._1tQ-o:first-of-type ._drOfN._3bxXk{left:0;width:2px;border-left:1px solid #fff}._1tQ-o:first-of-type ._drOfN._HyfCD{left:0}._1tQ-o:last-of-type ._dAwXY._3bxXk{right:0;width:2px;border-right:1px solid #fff}._1tQ-o:last-of-type ._dAwXY._HyfCD{right:0}._1tQ-o ._jbTSI{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._1tQ-o ._jbTSI ._PkK-_{position:absolute;width:2px;right:2px;top:0;bottom:0}._1tQ-o ._jbTSI ._PkK-_._3jsia{background-color:#0a6ed1}._1tQ-o ._jbTSI:hover ._PkK-_:not(._3jsia){background-color:#d9d9d9}._1tQ-o ._2e5wh{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._1tQ-o ._2e5wh._2zM18{flex-direction:row-reverse;justify-content:flex-start}._1tQ-o ._2e5wh._2zM18 ._2n6AL{margin:1px 7px 1px 1px}._1tQ-o ._2e5wh ._23Ez_{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._1tQ-o ._2e5wh ._2n6AL{margin:1px 1px 1px 7px;flex-shrink:0}._1tQ-o ._JHV8c{margin-left:6px;margin-right:4px;flex-shrink:0}._1tQ-o ._OssIJ{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._1tQ-o:focus{outline:none}body.keyboard-user ._1tQ-o._2vceI:after,body.keyboard-user ._1tQ-o: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}._81g4F{margin-right:6px}._2nyGo{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._2nyGo[focus-within]{z-index:30}._2nyGo:focus-within{z-index:30}._1jnTT{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}._1jnTT ._3Pym_{width:100%;padding:12px 12px 11px;overflow:hidden}._1jnTT._2qdpz{background-color:#efefef;border-bottom-color:#dfdfe1}._1jnTT._1BXwA{flex-grow:1}._1jnTT:focus{outline:none}body.keyboard-user ._1jnTT._2vceI:after,body.keyboard-user ._1jnTT: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}._3vCGx{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3vCGx._2daSV{border-bottom-color:#d9d9d9;background-color:#fff}._2tmrZ{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}._2tmrZ._2daSV{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._2tmrZ:focus input~span,._2tmrZ:hover input~span{border-color:#0b6ed0}._2tmrZ ._3j6jR{position:relative;display:inline-flex}._2tmrZ ._3j6jR ._18ZSE{margin:0!important}._2tmrZ ._3j6jR ._3gwqB{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._es34y{justify-content:flex-start}._70oTD{justify-content:center;text-align:center}._2zM18{justify-content:flex-end;text-align:right}._nm7XH{display:none}._1Sq5I{opacity:0;height:0;width:0;overflow:hidden}._1Sq5I,._kmvKx{position:absolute}._kmvKx{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._1LPdT{width:246px}";
|
|
35
|
+
var styles$9 = {"advancedTable":"_3FnxA","advancedTablePaginationContainer":"_3iV94","advancedTablePagination":"_Tuvof","advancedTableColumnHeadersRowGroup":"_3reRH","advancedTableColumnHeaders":"_29xlT","advancedTableRowChild":"_dChxk","pinnedContainer":"_2nyGo","advancedTableRowGroup":"_E0mQ7","advancedTableRow":"_3N1VN","hasRowAction":"_H42Or","advancedTableExpandRowSpacer":"_3vCGx","isSelected":"_2D1ZK","advancedTableCheckbox":"_2tmrZ","advancedTableCell":"_1jnTT","isCheckboxHovered":"_3W3zq","showFocusRing":"_2vceI","advancedTableColumnHeader":"_1tQ-o","fillRemainingSpace":"_1BXwA","isSortable":"_3UfWE","isDragging":"_2qdpz","isSorted":"_1NkKx","dropTargetLine":"_3bxXk","dropTargetLeft":"_drOfN","dropTargetRight":"_dAwXY","dropTargetMarker":"_HyfCD","resizeHandle":"_jbTSI","resizeLine":"_PkK-_","isResizing":"_3jsia","advancedTableColumnHeaderLabel":"_2e5wh","rightAligned":"_2zM18","sortIcon":"_2n6AL","advancedTableColumnHeaderLabelText":"_23Ez_","advancedTableColumnHeaderMenu":"_JHV8c","advancedTableColumnHeaderMenuHiddenAnchor":"_OssIJ","advancedTableColumnHeaderMenuItemIcon":"_81g4F","advancedTableCellContainer":"_3Pym_","header":"_2daSV","checkboxContainer":"_3j6jR","checkbox":"_18ZSE","mixed":"_3gwqB","leftAligned":"_es34y","centerAligned":"_70oTD","hiddenDescription":"_nm7XH","hiddenLiveRegion":"_1Sq5I","dragPreview":"_kmvKx","rowActionMenuPane":"_1LPdT"};
|
|
36
|
+
var stylesheet$9="._3FnxA{overflow:auto;position:relative;max-width:100%;max-height:100%}._3FnxA,._3iV94{background-color:#fff}._3iV94{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._Tuvof{margin-bottom:4px}._3reRH{position:-webkit-sticky;position:sticky;top:0;z-index:100}._29xlT{display:flex}._29xlT:focus{outline:none}body.keyboard-user ._29xlT:focus ._dChxk: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 ._29xlT:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._29xlT:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._29xlT:focus ._dChxk._2nyGo:after{right:-3px;bottom:1px}._E0mQ7{padding-right:3px}._3N1VN{display:flex}._3N1VN._H42Or ._3vCGx,._3N1VN._H42Or ._dChxk{cursor:pointer}._3N1VN._2D1ZK ._3vCGx,._3N1VN._2D1ZK ._dChxk{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._3N1VN._2D1ZK ._3vCGx._2nyGo,._3N1VN._2D1ZK ._dChxk._2nyGo{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._3N1VN._2D1ZK ._3vCGx._2nyGo ._1jnTT,._3N1VN._2D1ZK ._3vCGx._2nyGo ._2tmrZ,._3N1VN._2D1ZK ._3vCGx._2nyGo ._3vCGx,._3N1VN._2D1ZK ._dChxk._2nyGo ._1jnTT,._3N1VN._2D1ZK ._dChxk._2nyGo ._2tmrZ,._3N1VN._2D1ZK ._dChxk._2nyGo ._3vCGx{background-color:rgba(11,110,208,.08)}._3N1VN._H42Or:hover:not(._2D1ZK):not(._3W3zq) ._3vCGx,._3N1VN._H42Or:hover:not(._2D1ZK):not(._3W3zq) ._dChxk{background-color:#f9f9f9}._3N1VN._H42Or:active:not(._2D1ZK):not(._3W3zq) ._3vCGx,._3N1VN._H42Or:active:not(._2D1ZK):not(._3W3zq) ._dChxk{background-color:#f3f3f3}._3N1VN:focus{outline:none}body.keyboard-user ._3N1VN:focus ._dChxk: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 ._3N1VN:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:focus ._dChxk._2nyGo:after{right:-3px;bottom:0}._3N1VN:last-of-type:focus{outline:none}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk: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 ._3N1VN:last-of-type:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:last-of-type:focus ._dChxk._2nyGo:after{right:-3px;bottom:1px}._3N1VN:last-of-type ._1jnTT:focus{outline:none}body.keyboard-user ._3N1VN:last-of-type ._1jnTT._2vceI:after,body.keyboard-user ._3N1VN:last-of-type ._1jnTT: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}._3N1VN:first-of-type:focus{outline:none}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk: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 ._3N1VN:first-of-type:focus ._dChxk:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}body.keyboard-user ._3N1VN:first-of-type:focus ._dChxk._2nyGo:after{right:-3px;bottom:0}._3N1VN:first-of-type ._1jnTT:focus{outline:none}body.keyboard-user ._3N1VN:first-of-type ._1jnTT._2vceI:after,body.keyboard-user ._3N1VN:first-of-type ._1jnTT: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}._1tQ-o{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}._1tQ-o._1BXwA{flex-grow:1}._1tQ-o._3UfWE{cursor:pointer}._1tQ-o._3UfWE:hover:not(._2qdpz){background-color:#f9f9f9;border-bottom-color:#6a6d70}._1tQ-o._3UfWE:active:not(._2qdpz){background-color:#f3f3f3}._1tQ-o._1NkKx:not(._2qdpz){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._1tQ-o._2qdpz{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._1tQ-o ._3bxXk{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._1tQ-o ._3bxXk._drOfN{left:-1px}._1tQ-o ._3bxXk._dAwXY{right:0}._1tQ-o ._HyfCD{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._1tQ-o ._HyfCD._drOfN{left:-2px}._1tQ-o ._HyfCD._dAwXY{right:-1px}._1tQ-o:first-of-type ._drOfN._3bxXk{left:0;width:2px;border-left:1px solid #fff}._1tQ-o:first-of-type ._drOfN._HyfCD{left:0}._1tQ-o:last-of-type ._dAwXY._3bxXk{right:0;width:2px;border-right:1px solid #fff}._1tQ-o:last-of-type ._dAwXY._HyfCD{right:0}._1tQ-o ._jbTSI{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._1tQ-o ._jbTSI ._PkK-_{position:absolute;width:2px;right:2px;top:0;bottom:0}._1tQ-o ._jbTSI ._PkK-_._3jsia{background-color:#0a6ed1}._1tQ-o ._jbTSI:hover ._PkK-_:not(._3jsia){background-color:#d9d9d9}._1tQ-o ._2e5wh{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 0 13px 12px}._1tQ-o ._2e5wh._2zM18{flex-direction:row-reverse;justify-content:flex-start}._1tQ-o ._2e5wh._2zM18 ._2n6AL{margin:1px 7px 1px 1px}._1tQ-o ._2e5wh ._23Ez_{text-overflow:ellipsis;overflow:hidden;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._1tQ-o ._2e5wh ._2n6AL{margin:1px 1px 1px 7px;flex-shrink:0}._1tQ-o ._JHV8c{margin-left:6px;margin-right:4px;flex-shrink:0}._1tQ-o ._OssIJ{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._1tQ-o:focus{outline:none}body.keyboard-user ._1tQ-o._2vceI:after,body.keyboard-user ._1tQ-o: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}._81g4F{margin-right:6px}._2nyGo{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._2nyGo[focus-within]{z-index:30}._2nyGo:focus-within{z-index:30}._1jnTT{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}._1jnTT ._3Pym_{width:100%;padding:12px 12px 11px;overflow:hidden}._1jnTT._2qdpz{background-color:#efefef;border-bottom-color:#dfdfe1}._1jnTT._1BXwA{flex-grow:1}._1jnTT:focus{outline:none}body.keyboard-user ._1jnTT._2vceI:after,body.keyboard-user ._1jnTT: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}._3vCGx{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0}._3vCGx._2daSV{border-bottom-color:#d9d9d9;background-color:#fff}._2tmrZ{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}._2tmrZ._2daSV{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._2tmrZ:focus input~span,._2tmrZ:hover input~span{border-color:#0b6ed0}._2tmrZ ._3j6jR{position:relative;display:inline-flex}._2tmrZ ._3j6jR ._18ZSE{margin:0!important}._2tmrZ ._3j6jR ._3gwqB{position:absolute;top:3px;left:3px;height:10px;width:10px;border-radius:2px;background-color:#0b6ed0}._es34y{justify-content:flex-start}._70oTD{justify-content:center;text-align:center}._2zM18{justify-content:flex-end;text-align:right}._nm7XH{display:none}._1Sq5I{opacity:0;height:0;width:0;overflow:hidden}._1Sq5I,._kmvKx{position:absolute}._kmvKx{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._1LPdT{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 = "._2wXCf{display:inline-block;width:36px;transition:width .25s ease-out}._1HWX0{width:100%}._4zwDG>input{padding-right:0!important}._OEQAy>svg{fill:#515559}";
|
|
1989
|
+
var styles$8 = {"collapsibleSearchInput":"_2wXCf","searchInput":"_1HWX0","searchInputCollapsed":"_4zwDG","iconButton":"_OEQAy"};
|
|
1990
|
+
var stylesheet$8="._2wXCf{display:inline-block;width:36px;transition:width .25s ease-out}._1HWX0{width:100%}._4zwDG>input{padding-right:0!important}._OEQAy>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 = "._2aswD input{padding-left:76px!important}._14jmt input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._14jmt input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._14jmt input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1Ugdz{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1Ugdz,._1Ugdz._14jmt:hover{background-color:transparent!important}._1Ugdz:hover{background-color:rgba(50,54,58,.08)!important}._1Ugdz:active{background-color:rgba(50,54,58,.11)!important}._1Ugdz svg{top:2px!important}._3fZu6{position:relative}._1AJWb{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":"_2aswD","disabled":"_14jmt","dropdown":"_1Ugdz","container":"_3fZu6","countryCode":"_1AJWb"};
|
|
2146
|
+
var stylesheet$7="._2aswD input{padding-left:76px!important}._14jmt input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._14jmt input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._14jmt input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._1Ugdz{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._1Ugdz,._1Ugdz._14jmt:hover{background-color:transparent!important}._1Ugdz:hover{background-color:rgba(50,54,58,.08)!important}._1Ugdz:active{background-color:rgba(50,54,58,.11)!important}._1Ugdz svg{top:2px!important}._3fZu6{position:relative}._1AJWb{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 = "._KB6l7 :after{background-color:#515559!important}._35u-M>input:focus{box-shadow:none!important;border:1px solid #898989!important}._KGA2g{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}._KGA2g ._3gmco ._qbnXm{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}._KGA2g ._3gmco:first-child ._3l0Ez{display:none}._KGA2g ._2uWyK{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._KGA2g ._2uWyK:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._KGA2g ._2uWyK:hover._2coqW{background-color:#e4effa}._KGA2g ._2uWyK._2coqW{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._KGA2g ._2uWyK:active:not(._2coqW){background-color:#e8e9e9}";
|
|
2890
|
+
var styles$6 = {"loadingSpinner":"_KB6l7","ignoreFocusStyle":"_35u-M","flyout":"_KGA2g","group":"_3gmco","header":"_qbnXm","divider":"_3l0Ez","option":"_2uWyK","selected":"_2coqW"};
|
|
2891
|
+
var stylesheet$6="._KB6l7 :after{background-color:#515559!important}._35u-M>input:focus{box-shadow:none!important;border:1px solid #898989!important}._KGA2g{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}._KGA2g ._3gmco ._qbnXm{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}._KGA2g ._3gmco:first-child ._3l0Ez{display:none}._KGA2g ._2uWyK{display:flex;align-items:center;min-height:40px;padding:10px 12px;font-size:14px;color:#32363a;word-break:break-word;outline:none;cursor:pointer}._KGA2g ._2uWyK:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._KGA2g ._2uWyK:hover._2coqW{background-color:#e4effa}._KGA2g ._2uWyK._2coqW{background-color:#ebf3fb;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._KGA2g ._2uWyK:active:not(._2coqW){background-color:#e8e9e9}";
|
|
2892
|
+
icons_index.styleInject(css_248z$6);
|
|
2891
2893
|
|
|
2892
2894
|
const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
2893
2895
|
let {
|
|
@@ -2923,7 +2925,8 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2923
2925
|
rootAriaLabel,
|
|
2924
2926
|
rootAriaLabelledBy,
|
|
2925
2927
|
flyoutId,
|
|
2926
|
-
hoveredOption
|
|
2928
|
+
hoveredOption,
|
|
2929
|
+
setHoveredOption
|
|
2927
2930
|
} = useComboboxContext();
|
|
2928
2931
|
/*
|
|
2929
2932
|
* Creates a variation of selection follows focus.
|
|
@@ -2945,6 +2948,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
2945
2948
|
const commitCurrentRawInputValueAndCloseFlyout = () => {
|
|
2946
2949
|
setCommittedInputValue(rawInputValue);
|
|
2947
2950
|
setIsOpen(false);
|
|
2951
|
+
setHoveredOption(null);
|
|
2948
2952
|
};
|
|
2949
2953
|
|
|
2950
2954
|
const handleKeyDown = e => {
|
|
@@ -3002,7 +3006,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3002
3006
|
return /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
3003
3007
|
role: "combobox",
|
|
3004
3008
|
className: classNames__default["default"](className, {
|
|
3005
|
-
[styles$
|
|
3009
|
+
[styles$6.ignoreFocusStyle]: hoveredOption || activeDescendantElement
|
|
3006
3010
|
}),
|
|
3007
3011
|
style: style,
|
|
3008
3012
|
id: id,
|
|
@@ -3015,7 +3019,7 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3015
3019
|
},
|
|
3016
3020
|
leftAddOn: leftAddOn,
|
|
3017
3021
|
rightAddOn: isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3018
|
-
className: styles$
|
|
3022
|
+
className: styles$6.loadingSpinner,
|
|
3019
3023
|
size: "xs",
|
|
3020
3024
|
show: isLoading,
|
|
3021
3025
|
"aria-hidden": true
|
|
@@ -3072,7 +3076,7 @@ const ComboboxFlyout = _ref => {
|
|
|
3072
3076
|
popper: /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3073
3077
|
role: "listbox",
|
|
3074
3078
|
id: flyoutId,
|
|
3075
|
-
className: styles$
|
|
3079
|
+
className: styles$6.flyout,
|
|
3076
3080
|
style: flyoutDimensions,
|
|
3077
3081
|
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : rootAriaLabel,
|
|
3078
3082
|
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : rootAriaLabelledBy,
|
|
@@ -3124,16 +3128,16 @@ function ComboboxGroup(_ref) {
|
|
|
3124
3128
|
}, children);
|
|
3125
3129
|
return hasFilteredOptions ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3126
3130
|
role: "group",
|
|
3127
|
-
className: styles$
|
|
3131
|
+
className: styles$6.group,
|
|
3128
3132
|
"aria-labelledby": headerElementId,
|
|
3129
3133
|
"aria-describedby": ariaDescribedBy,
|
|
3130
3134
|
"data-testid": index.getSubDataTestId(rootDataTestId, "group-".concat(label))
|
|
3131
3135
|
}, /*#__PURE__*/React__default["default"].createElement(index.Divider, {
|
|
3132
|
-
className: styles$
|
|
3136
|
+
className: styles$6.divider
|
|
3133
3137
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3134
3138
|
"aria-hidden": "true",
|
|
3135
3139
|
id: headerElementId,
|
|
3136
|
-
className: styles$
|
|
3140
|
+
className: styles$6.header
|
|
3137
3141
|
}, 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
3142
|
;
|
|
3139
3143
|
}
|
|
@@ -3186,12 +3190,13 @@ function ComboboxOption(_ref) {
|
|
|
3186
3190
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3187
3191
|
role: "option",
|
|
3188
3192
|
id: containerId,
|
|
3189
|
-
className: classNames__default["default"](styles$
|
|
3190
|
-
[styles$
|
|
3193
|
+
className: classNames__default["default"](styles$6.option, {
|
|
3194
|
+
[styles$6.selected]: isOptionSelected
|
|
3191
3195
|
}),
|
|
3192
3196
|
onClick: () => {
|
|
3193
3197
|
setCommittedInputValue(label);
|
|
3194
3198
|
setIsOpen(false);
|
|
3199
|
+
setHoveredOption(null);
|
|
3195
3200
|
},
|
|
3196
3201
|
onMouseOver: () => setHoveredOption(containerElementRef.current),
|
|
3197
3202
|
onMouseLeave: () => setHoveredOption(null),
|
|
@@ -3203,10 +3208,10 @@ function ComboboxOption(_ref) {
|
|
|
3203
3208
|
}, label);
|
|
3204
3209
|
}
|
|
3205
3210
|
|
|
3206
|
-
var css_248z$
|
|
3207
|
-
var styles$
|
|
3208
|
-
var stylesheet$
|
|
3209
|
-
icons_index.styleInject(css_248z$
|
|
3211
|
+
var css_248z$5 = "._2Pk9s{display:flex}._1FR23{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1FR23._At1bB{background-color:#fff}._1FR23._At1bB._4vg2R:not(._1FR23._At1bB._1EOjT),._1FR23._ZeDRX,body.keyboard-user ._1FR23._At1bB._2xou9:not(._2sd35){background-color:#0b6ed0}._1FR23._ZeDRX._1EOjT._4vg2R,._1FR23._ZeDRX._2sd35._1EOjT,._1FR23._ZeDRX._2sd35._2xou9{opacity:.4}._6CkU2{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._6CkU2:focus{z-index:1}._RIfPS{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}._RIfPS svg{margin-left:1px}._RIfPS._At1bB{background-color:#0b6ed0;border-color:transparent}._RIfPS._At1bB svg{fill:#fff!important}._RIfPS._At1bB:not(._2thkM):hover{background-color:#085caf!important}._RIfPS._At1bB:not(._2thkM):active{background-color:#0854a1!important}._RIfPS._At1bB._2thkM{opacity:.4}._RIfPS._At1bB._2thkM svg{background-color:transparent}._RIfPS._ZeDRX{border-color:#0b6ed0;background-color:#fff}._RIfPS._ZeDRX svg{fill:#0b6ed0!important}._RIfPS._ZeDRX:not(._2thkM):hover{background-color:#eef5fc!important}._RIfPS._ZeDRX:not(._2thkM):active{background-color:#e1edf9!important}._RIfPS._ZeDRX._2thkM{opacity:.4}._RIfPS._ZeDRX._2thkM svg{background-color:transparent}._1MLjQ{width:260px}";
|
|
3212
|
+
var styles$5 = {"container":"_2Pk9s","divider":"_1FR23","primary":"_At1bB","mainButtonFocus":"_2xou9","mainButtonDisabled":"_2sd35","dropdownButtonFocus":"_4vg2R","dropdownButtonDisabled":"_1EOjT","secondary":"_ZeDRX","mainButton":"_6CkU2","dropdownButton":"_RIfPS","disabled":"_2thkM","dropdownOption":"_1MLjQ"};
|
|
3213
|
+
var stylesheet$5="._2Pk9s{display:flex}._1FR23{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._1FR23._At1bB{background-color:#fff}._1FR23._At1bB._4vg2R:not(._1FR23._At1bB._1EOjT),._1FR23._ZeDRX,body.keyboard-user ._1FR23._At1bB._2xou9:not(._2sd35){background-color:#0b6ed0}._1FR23._ZeDRX._1EOjT._4vg2R,._1FR23._ZeDRX._2sd35._1EOjT,._1FR23._ZeDRX._2sd35._2xou9{opacity:.4}._6CkU2{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._6CkU2:focus{z-index:1}._RIfPS{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}._RIfPS svg{margin-left:1px}._RIfPS._At1bB{background-color:#0b6ed0;border-color:transparent}._RIfPS._At1bB svg{fill:#fff!important}._RIfPS._At1bB:not(._2thkM):hover{background-color:#085caf!important}._RIfPS._At1bB:not(._2thkM):active{background-color:#0854a1!important}._RIfPS._At1bB._2thkM{opacity:.4}._RIfPS._At1bB._2thkM svg{background-color:transparent}._RIfPS._ZeDRX{border-color:#0b6ed0;background-color:#fff}._RIfPS._ZeDRX svg{fill:#0b6ed0!important}._RIfPS._ZeDRX:not(._2thkM):hover{background-color:#eef5fc!important}._RIfPS._ZeDRX:not(._2thkM):active{background-color:#e1edf9!important}._RIfPS._ZeDRX._2thkM{opacity:.4}._RIfPS._ZeDRX._2thkM svg{background-color:transparent}._1MLjQ{width:260px}";
|
|
3214
|
+
icons_index.styleInject(css_248z$5);
|
|
3210
3215
|
|
|
3211
3216
|
const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3212
3217
|
let {
|
|
@@ -3240,14 +3245,14 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3240
3245
|
});
|
|
3241
3246
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3242
3247
|
"data-testid": dataTestId,
|
|
3243
|
-
className: classNames__default["default"](styles$
|
|
3248
|
+
className: classNames__default["default"](styles$5.container, className),
|
|
3244
3249
|
ref: ref
|
|
3245
3250
|
}, /*#__PURE__*/React__default["default"].createElement(index.Button, {
|
|
3246
3251
|
kind: kind,
|
|
3247
3252
|
"data-testid": index.getSubDataTestId(dataTestId, 'button'),
|
|
3248
|
-
className: classNames__default["default"](styles$
|
|
3249
|
-
[styles$
|
|
3250
|
-
[styles$
|
|
3253
|
+
className: classNames__default["default"](styles$5.mainButton, {
|
|
3254
|
+
[styles$5.disabled]: isButtonDisabled,
|
|
3255
|
+
[styles$5.primary]: kind === 'primary'
|
|
3251
3256
|
}),
|
|
3252
3257
|
onClick: onClick,
|
|
3253
3258
|
disabled: isButtonDisabled,
|
|
@@ -3258,13 +3263,13 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3258
3263
|
onFocus: () => setMainButtonHasFocus(true),
|
|
3259
3264
|
onBlur: () => setMainButtonHasFocus(false)
|
|
3260
3265
|
}, 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$
|
|
3266
|
+
className: classNames__default["default"](styles$5.divider, {
|
|
3267
|
+
[styles$5.primary]: kind === 'primary',
|
|
3268
|
+
[styles$5.secondary]: kind === 'secondary',
|
|
3269
|
+
[styles$5.mainButtonFocus]: mainButtonHasFocus,
|
|
3270
|
+
[styles$5.dropdownButtonFocus]: dropdownButtonHasFocus,
|
|
3271
|
+
[styles$5.mainButtonDisabled]: isButtonDisabled,
|
|
3272
|
+
[styles$5.dropdownButtonDisabled]: isDropdownDisabled
|
|
3268
3273
|
})
|
|
3269
3274
|
}), /*#__PURE__*/React__default["default"].createElement(index.Dropdown, {
|
|
3270
3275
|
"data-testid": index.getSubDataTestId(dataTestId, 'dropdown'),
|
|
@@ -3275,10 +3280,10 @@ const SplitButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3275
3280
|
}, /*#__PURE__*/React__default["default"].createElement(index.DropdownButton // `label` of type `string` adds Dropdown's `isString` class, which causes a css bug in Safari
|
|
3276
3281
|
, {
|
|
3277
3282
|
label: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null),
|
|
3278
|
-
className: classNames__default["default"](styles$
|
|
3279
|
-
[styles$
|
|
3280
|
-
[styles$
|
|
3281
|
-
[styles$
|
|
3283
|
+
className: classNames__default["default"](styles$5.dropdownButton, {
|
|
3284
|
+
[styles$5.disabled]: isDropdownDisabled,
|
|
3285
|
+
[styles$5.primary]: kind === 'primary',
|
|
3286
|
+
[styles$5.secondary]: kind === 'secondary'
|
|
3282
3287
|
}),
|
|
3283
3288
|
ref: dropdownButtonRef,
|
|
3284
3289
|
tabIndex: -1,
|
|
@@ -3300,15 +3305,15 @@ const SplitButtonOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3300
3305
|
label: "",
|
|
3301
3306
|
disabled: isDisabled,
|
|
3302
3307
|
onSelect: onClick,
|
|
3303
|
-
className: styles$
|
|
3308
|
+
className: styles$5.dropdownOption,
|
|
3304
3309
|
ref: ref
|
|
3305
3310
|
}, children);
|
|
3306
3311
|
});
|
|
3307
3312
|
|
|
3308
|
-
var css_248z$
|
|
3309
|
-
var styles$
|
|
3310
|
-
var stylesheet$
|
|
3311
|
-
icons_index.styleInject(css_248z$
|
|
3313
|
+
var css_248z$4 = "._3RTL4{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}._3RTL4:hover:not(._b-Rmw){background-color:rgba(50,54,58,.08)}._3RTL4:hover:not(._b-Rmw)._qNOi1{border-color:#085caf;background-color:rgba(11,110,208,.04)}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._13eAv{color:#32363a}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._2zkXW{fill:#32363a}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._3cTfE{fill:#085caf}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._wqRII{background-color:rgba(11,110,208,.11)}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._wqRII ._1zy5C{color:#085caf}._3RTL4:active:not(._b-Rmw){background-color:#e8e9e9}._3RTL4:active:not(._b-Rmw)._qNOi1{background-color:rgba(11,110,208,.11);border-color:#0854a1}._3RTL4:active:not(._b-Rmw)._qNOi1 ._3cTfE{fill:#0854a1}._3RTL4:active:not(._b-Rmw)._qNOi1 ._wqRII{background-color:rgba(11,110,208,.11)}._3RTL4:active:not(._b-Rmw)._qNOi1 ._wqRII ._1zy5C{color:#0854a1}._3RTL4._b-Rmw{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._3RTL4._qNOi1{border-color:#0b6ed0}._2zkXW{fill:#515559;margin-right:4px}._13eAv{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._13eAv+._wqRII{margin-left:6px}._13eAv._b-Rmw{color:#74777a}._wqRII{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}._1zy5C{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._3cTfE{fill:#515559}._3cTfE._b-Rmw,._3cTfE._b-Rmw._qNOi1{fill:rgba(116,119,122,.4)}._3cTfE._qNOi1{fill:#0b6ed0}._3cTfE._1lkP9{transform:rotate(-180deg)}body.keyboard-user ._3RTL4:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3314
|
+
var styles$4 = {"button":"_3RTL4","disabled":"_b-Rmw","selected":"_qNOi1","label":"_13eAv","lockIcon":"_2zkXW","chevronIcon":"_3cTfE","selectedFiltersContainer":"_wqRII","selectedFilters":"_1zy5C","open":"_1lkP9"};
|
|
3315
|
+
var stylesheet$4="._3RTL4{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}._3RTL4:hover:not(._b-Rmw){background-color:rgba(50,54,58,.08)}._3RTL4:hover:not(._b-Rmw)._qNOi1{border-color:#085caf;background-color:rgba(11,110,208,.04)}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._13eAv{color:#32363a}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._2zkXW{fill:#32363a}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._3cTfE{fill:#085caf}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._wqRII{background-color:rgba(11,110,208,.11)}._3RTL4:hover:not(._b-Rmw)._qNOi1 ._wqRII ._1zy5C{color:#085caf}._3RTL4:active:not(._b-Rmw){background-color:#e8e9e9}._3RTL4:active:not(._b-Rmw)._qNOi1{background-color:rgba(11,110,208,.11);border-color:#0854a1}._3RTL4:active:not(._b-Rmw)._qNOi1 ._3cTfE{fill:#0854a1}._3RTL4:active:not(._b-Rmw)._qNOi1 ._wqRII{background-color:rgba(11,110,208,.11)}._3RTL4:active:not(._b-Rmw)._qNOi1 ._wqRII ._1zy5C{color:#0854a1}._3RTL4._b-Rmw{background-color:#fafafa;border-color:#e5e5e5;cursor:not-allowed}._3RTL4._qNOi1{border-color:#0b6ed0}._2zkXW{fill:#515559;margin-right:4px}._13eAv{max-width:180px;margin-right:3px;color:#515559;fill:#515559;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._13eAv+._wqRII{margin-left:6px}._13eAv._b-Rmw{color:#74777a}._wqRII{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}._1zy5C{color:#0b6ed0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._3cTfE{fill:#515559}._3cTfE._b-Rmw,._3cTfE._b-Rmw._qNOi1{fill:rgba(116,119,122,.4)}._3cTfE._qNOi1{fill:#0b6ed0}._3cTfE._1lkP9{transform:rotate(-180deg)}body.keyboard-user ._3RTL4:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
3316
|
+
icons_index.styleInject(css_248z$4);
|
|
3312
3317
|
|
|
3313
3318
|
const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
3314
3319
|
let {
|
|
@@ -3333,9 +3338,9 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3333
3338
|
} = index.useTranslation();
|
|
3334
3339
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
3335
3340
|
type: "button",
|
|
3336
|
-
className: classNames__default["default"](className, styles$
|
|
3337
|
-
[styles$
|
|
3338
|
-
[styles$
|
|
3341
|
+
className: classNames__default["default"](className, styles$4.button, {
|
|
3342
|
+
[styles$4.disabled]: isDisabled,
|
|
3343
|
+
[styles$4.selected]: !!selectedFilters
|
|
3339
3344
|
}),
|
|
3340
3345
|
onClick: e => {
|
|
3341
3346
|
if (isDisabled) {
|
|
@@ -3360,33 +3365,33 @@ const FilterAnchor = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3360
3365
|
}), isLocked && /*#__PURE__*/React__default["default"].createElement(icons_index.LockIcon, {
|
|
3361
3366
|
size: "small",
|
|
3362
3367
|
id: lockIconElementId,
|
|
3363
|
-
className: styles$
|
|
3368
|
+
className: styles$4.lockIcon // @ts-ignore - 'locked' is not in the current list of translations
|
|
3364
3369
|
,
|
|
3365
3370
|
"aria-label": translate('locked')
|
|
3366
3371
|
}), label && /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3367
3372
|
lightTheme: true
|
|
3368
3373
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3369
3374
|
id: labelElementId,
|
|
3370
|
-
className: classNames__default["default"](styles$
|
|
3371
|
-
[styles$
|
|
3375
|
+
className: classNames__default["default"](styles$4.label, {
|
|
3376
|
+
[styles$4.disabled]: isDisabled
|
|
3372
3377
|
})
|
|
3373
3378
|
}, label)), isLoading ? /*#__PURE__*/React__default["default"].createElement(index.LoadingSpinner, {
|
|
3374
3379
|
show: true,
|
|
3375
3380
|
size: "xs",
|
|
3376
3381
|
"aria-label": loadingSpinnerAriaLabel !== null && loadingSpinnerAriaLabel !== void 0 ? loadingSpinnerAriaLabel : translate('loading')
|
|
3377
3382
|
}) : selectedFilters && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3378
|
-
className: styles$
|
|
3383
|
+
className: styles$4.selectedFiltersContainer
|
|
3379
3384
|
}, /*#__PURE__*/React__default["default"].createElement(index.TextOverflowTooltip, {
|
|
3380
3385
|
lightTheme: true
|
|
3381
3386
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
3382
3387
|
id: selectedFiltersElementId,
|
|
3383
|
-
className: styles$
|
|
3388
|
+
className: styles$4.selectedFilters
|
|
3384
3389
|
}, selectedFilters))), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3385
3390
|
size: "medium",
|
|
3386
|
-
className: classNames__default["default"](styles$
|
|
3387
|
-
[styles$
|
|
3388
|
-
[styles$
|
|
3389
|
-
[styles$
|
|
3391
|
+
className: classNames__default["default"](styles$4.chevronIcon, {
|
|
3392
|
+
[styles$4.disabled]: isDisabled,
|
|
3393
|
+
[styles$4.selected]: !!selectedFilters,
|
|
3394
|
+
[styles$4.open]: isOpen
|
|
3390
3395
|
}),
|
|
3391
3396
|
"aria-hidden": true
|
|
3392
3397
|
}));
|
|
@@ -3491,10 +3496,10 @@ class PointerEvent extends Event {
|
|
|
3491
3496
|
|
|
3492
3497
|
}
|
|
3493
3498
|
|
|
3494
|
-
var css_248z$
|
|
3495
|
-
var styles$
|
|
3496
|
-
var stylesheet$
|
|
3497
|
-
icons_index.styleInject(css_248z$
|
|
3499
|
+
var css_248z$3 = "._BoSB0{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._1R82z{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}._1R82z:hover:not([aria-disabled=true]){background-color:#f5f5f5}._1R82z:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1R82z+._2jkwK{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._1R82z[data-state=open]+._2jkwK{transform:rotate(-180deg) translateY(50%)}._1R82z[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._1R82z[aria-disabled=true]+._2jkwK{fill:#515559;opacity:.4}._pcbNc{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}._3jPek{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._3jPek[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3jPek[aria-disabled=true]{cursor:not-allowed;opacity:.65}._3jPek._rOj6c{padding-right:32px}._3jPek._rOj6c ._2jkwK{position:absolute;top:8px;right:3px;fill:#515559}._1j_qY{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._bG76V{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}";
|
|
3500
|
+
var styles$3 = {"buttonContainer":"_BoSB0","button":"_1R82z","rightIcon":"_2jkwK","flyout":"_pcbNc","menuItem":"_3jPek","subMenu":"_rOj6c","searchBox":"_1j_qY","emptyOption":"_bG76V"};
|
|
3501
|
+
var stylesheet$3="._BoSB0{position:relative;display:inline-flex;height:36px;background-color:#fafafa;min-width:0;cursor:pointer;border-radius:4px}._1R82z{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}._1R82z:hover:not([aria-disabled=true]){background-color:#f5f5f5}._1R82z:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._1R82z+._2jkwK{fill:#515559;position:absolute;pointer-events:none;right:4px;top:50%;transform:translateY(-50%)}._1R82z[data-state=open]+._2jkwK{transform:rotate(-180deg) translateY(50%)}._1R82z[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._1R82z[aria-disabled=true]+._2jkwK{fill:#515559;opacity:.4}._pcbNc{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}._3jPek{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._3jPek[data-highlighted]{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._3jPek[aria-disabled=true]{cursor:not-allowed;opacity:.65}._3jPek._rOj6c{padding-right:32px}._3jPek._rOj6c ._2jkwK{position:absolute;top:8px;right:3px;fill:#515559}._1j_qY{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;margin-top:-4px}._bG76V{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}";
|
|
3502
|
+
icons_index.styleInject(css_248z$3);
|
|
3498
3503
|
|
|
3499
3504
|
/* eslint-disable import/prefer-default-export */
|
|
3500
3505
|
const DATA_TESTID_SUFFIXES = {
|
|
@@ -3516,18 +3521,18 @@ const MenuButton = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
3516
3521
|
} = useMenuContext();
|
|
3517
3522
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3518
3523
|
className: classNames__default["default"]({
|
|
3519
|
-
[styles$
|
|
3524
|
+
[styles$3.buttonContainer]: !asChild
|
|
3520
3525
|
})
|
|
3521
3526
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Trigger, _extends__default["default"]({}, rest, {
|
|
3522
3527
|
"aria-disabled": isDisabled,
|
|
3523
3528
|
className: classNames__default["default"]({
|
|
3524
|
-
[styles$
|
|
3529
|
+
[styles$3.button]: !asChild
|
|
3525
3530
|
}),
|
|
3526
3531
|
asChild: asChild,
|
|
3527
3532
|
ref: ref,
|
|
3528
3533
|
"data-testid": index.getSubDataTestId(rootDataTestId, DATA_TESTID_SUFFIXES.MENU_BUTTON)
|
|
3529
3534
|
}), children), !asChild && /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
3530
|
-
className: styles$
|
|
3535
|
+
className: styles$3.rightIcon,
|
|
3531
3536
|
"aria-hidden": "true"
|
|
3532
3537
|
}));
|
|
3533
3538
|
});
|
|
@@ -3570,7 +3575,7 @@ const MenuSearch = _ref => {
|
|
|
3570
3575
|
isCaptureEvent: true
|
|
3571
3576
|
});
|
|
3572
3577
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, {
|
|
3573
|
-
className: styles$
|
|
3578
|
+
className: styles$3.searchBox // prevents dropdown from closing
|
|
3574
3579
|
,
|
|
3575
3580
|
onSelect: e => e.preventDefault(),
|
|
3576
3581
|
onFocus: () => {
|
|
@@ -3613,7 +3618,7 @@ const MenuSearch = _ref => {
|
|
|
3613
3618
|
leftAddOn: /*#__PURE__*/React__default["default"].createElement(icons_index.SearchIcon, null),
|
|
3614
3619
|
ref: inputRef
|
|
3615
3620
|
})), zeroSearchResults && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3616
|
-
className: styles$
|
|
3621
|
+
className: styles$3.emptyOption // eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
3617
3622
|
,
|
|
3618
3623
|
role: "option" // `aria-selected` is omitted because this option is not selectable
|
|
3619
3624
|
,
|
|
@@ -3660,7 +3665,7 @@ const MenuPane = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3660
3665
|
loop: true,
|
|
3661
3666
|
side: side || 'bottom',
|
|
3662
3667
|
align: align || 'start',
|
|
3663
|
-
className: styles$
|
|
3668
|
+
className: styles$3.flyout,
|
|
3664
3669
|
ref: index.mergeRefs(ref, paneRef),
|
|
3665
3670
|
"data-testid": dataTestId
|
|
3666
3671
|
}), isSearchable && /*#__PURE__*/React__default["default"].createElement(MenuSearch, {
|
|
@@ -3697,7 +3702,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
3697
3702
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Item, _extends__default["default"]({}, rest, {
|
|
3698
3703
|
asChild: asChild,
|
|
3699
3704
|
"aria-disabled": isDisabled,
|
|
3700
|
-
className: classNames__default["default"](className, styles$
|
|
3705
|
+
className: classNames__default["default"](className, styles$3.menuItem),
|
|
3701
3706
|
"data-testid": dataTestId,
|
|
3702
3707
|
ref: index.mergeRefs(ref, itemRef) // stop radix from closing the menu on selection of disabled item
|
|
3703
3708
|
// other pointer and keyboard events still work, even when disabled
|
|
@@ -3735,13 +3740,13 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3735
3740
|
return isSearchFilteringDisabledForTrigger || !triggerMenuParentSearchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, triggerMenuParentSearchValue.toLowerCase());
|
|
3736
3741
|
}, [triggerMenuParentSearchValue, label, isSearchFilteringDisabledForTrigger]);
|
|
3737
3742
|
return isVisible ? /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.Sub, null, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubTrigger, {
|
|
3738
|
-
className: classNames__default["default"](styles$
|
|
3743
|
+
className: classNames__default["default"](styles$3.menuItem, styles$3.subMenu),
|
|
3739
3744
|
"data-testid": triggerDataTestId,
|
|
3740
3745
|
"aria-disabled": isDisabled,
|
|
3741
3746
|
disabled: isDisabled,
|
|
3742
3747
|
ref: itemRef
|
|
3743
3748
|
}, label, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
3744
|
-
className: styles$
|
|
3749
|
+
className: styles$3.rightIcon
|
|
3745
3750
|
})), /*#__PURE__*/React__default["default"].createElement(PaneContextProvider, {
|
|
3746
3751
|
items: items,
|
|
3747
3752
|
setItems: setItems,
|
|
@@ -3751,7 +3756,7 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3751
3756
|
isSearchFilteringDisabled: isSearchFilteringDisabledForChildren
|
|
3752
3757
|
}
|
|
3753
3758
|
}, /*#__PURE__*/React__default["default"].createElement(reactDropdownMenu.SubContent, _extends__default["default"]({}, rest, {
|
|
3754
|
-
className: styles$
|
|
3759
|
+
className: styles$3.flyout,
|
|
3755
3760
|
loop: true,
|
|
3756
3761
|
"data-testid": paneDataTestId,
|
|
3757
3762
|
ref: index.mergeRefs(ref, paneRef)
|
|
@@ -3762,10 +3767,10 @@ const SubMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
3762
3767
|
}), children))) : null;
|
|
3763
3768
|
});
|
|
3764
3769
|
|
|
3765
|
-
var css_248z$
|
|
3766
|
-
var styles$
|
|
3767
|
-
var stylesheet$
|
|
3768
|
-
icons_index.styleInject(css_248z$
|
|
3770
|
+
var css_248z$2 = "._2afju{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}._3EnKV{visibility:hidden}";
|
|
3771
|
+
var styles$2 = {"overlay":"_2afju","hidden":"_3EnKV"};
|
|
3772
|
+
var stylesheet$2="._2afju{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}._3EnKV{visibility:hidden}";
|
|
3773
|
+
icons_index.styleInject(css_248z$2);
|
|
3769
3774
|
|
|
3770
3775
|
/**
|
|
3771
3776
|
* Adds an overlay to an area that obscures visibility and disables background elements.
|
|
@@ -3792,10 +3797,10 @@ const useOverlay = _ref => {
|
|
|
3792
3797
|
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
3793
3798
|
const overlay = document.createElement('div');
|
|
3794
3799
|
overlay.id = overlayId;
|
|
3795
|
-
overlay.classList.add(styles$
|
|
3800
|
+
overlay.classList.add(styles$2.overlay);
|
|
3796
3801
|
if (onClick) overlay.addEventListener('click', onClick);
|
|
3797
3802
|
if (dataTestId) overlay.dataset.testid = dataTestId;
|
|
3798
|
-
if (!isVisible) overlay.classList.add(styles$
|
|
3803
|
+
if (!isVisible) overlay.classList.add(styles$2.hidden);
|
|
3799
3804
|
if (zIndex) overlay.style.zIndex = zIndex.toString();
|
|
3800
3805
|
containerNode.appendChild(overlay);
|
|
3801
3806
|
containerNode.style.position = 'relative';
|
|
@@ -3814,12 +3819,12 @@ const useOverlay = _ref => {
|
|
|
3814
3819
|
Array.from(containerNode.children).forEach(child => {
|
|
3815
3820
|
if (!_includesInstanceProperty__default["default"](ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
3816
3821
|
});
|
|
3817
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$
|
|
3822
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles$2.hidden);
|
|
3818
3823
|
} else {
|
|
3819
3824
|
Array.from(containerNode.children).forEach(child => {
|
|
3820
3825
|
child.removeAttribute('inert');
|
|
3821
3826
|
});
|
|
3822
|
-
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$
|
|
3827
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles$2.hidden);
|
|
3823
3828
|
}
|
|
3824
3829
|
|
|
3825
3830
|
return () => {
|
|
@@ -3830,10 +3835,10 @@ const useOverlay = _ref => {
|
|
|
3830
3835
|
}, [containerRef, isVisible, ignoreIds, overlayId]);
|
|
3831
3836
|
};
|
|
3832
3837
|
|
|
3833
|
-
var css_248z = ".
|
|
3834
|
-
var styles = {"drawer":"
|
|
3835
|
-
var stylesheet=".
|
|
3836
|
-
icons_index.styleInject(css_248z);
|
|
3838
|
+
var css_248z$1 = "._2eB5t{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}._Stz82{visibility:hidden}._2La6_{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._36NN7{padding-top:8px}._23CR4{margin-left:12px}";
|
|
3839
|
+
var styles$1 = {"drawer":"_2eB5t","hidden":"_Stz82","header":"_2La6_","title":"_36NN7","closeButton":"_23CR4"};
|
|
3840
|
+
var stylesheet$1="._2eB5t{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}._Stz82{visibility:hidden}._2La6_{display:flex;justify-content:space-between;align-items:start;line-height:20px;font-size:16px;padding-bottom:12px}._36NN7{padding-top:8px}._23CR4{margin-left:12px}";
|
|
3841
|
+
icons_index.styleInject(css_248z$1);
|
|
3837
3842
|
|
|
3838
3843
|
const Drawer = _ref => {
|
|
3839
3844
|
var _containerRef$current;
|
|
@@ -3917,9 +3922,9 @@ const Drawer = _ref => {
|
|
|
3917
3922
|
|
|
3918
3923
|
return domReady ? /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React__default["default"].createElement("aside", {
|
|
3919
3924
|
id: drawerId,
|
|
3920
|
-
className: classNames__default["default"](styles.drawer, {
|
|
3921
|
-
[styles.hidden]: isHidden,
|
|
3922
|
-
[styles.closing]: isClosing
|
|
3925
|
+
className: classNames__default["default"](styles$1.drawer, {
|
|
3926
|
+
[styles$1.hidden]: isHidden,
|
|
3927
|
+
[styles$1.closing]: isClosing
|
|
3923
3928
|
}),
|
|
3924
3929
|
style: {
|
|
3925
3930
|
width,
|
|
@@ -3936,12 +3941,12 @@ const Drawer = _ref => {
|
|
|
3936
3941
|
}, /*#__PURE__*/React__default["default"].createElement(index.PortalTargetProvider, {
|
|
3937
3942
|
target: drawerRef.current
|
|
3938
3943
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3939
|
-
className: styles.header
|
|
3944
|
+
className: styles$1.header
|
|
3940
3945
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3941
|
-
className: styles.title,
|
|
3946
|
+
className: styles$1.title,
|
|
3942
3947
|
"data-testid": index.getSubDataTestId(dataTestId, 'title')
|
|
3943
3948
|
}, title), /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
3944
|
-
className: styles.closeButton,
|
|
3949
|
+
className: styles$1.closeButton,
|
|
3945
3950
|
onClick: close,
|
|
3946
3951
|
ref: closeButtonRef,
|
|
3947
3952
|
"data-testid": index.getSubDataTestId(dataTestId, 'close-button'),
|
|
@@ -3951,6 +3956,644 @@ const Drawer = _ref => {
|
|
|
3951
3956
|
}, children))), (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body) : null;
|
|
3952
3957
|
};
|
|
3953
3958
|
|
|
3959
|
+
var css_248z = "._1GejC{display:inline-block;position:relative}._3Dr_r{width:120px}._3Dr_r ._2XocA._1jj-a{transform:rotate(-180deg)}._3Dr_r ._2XocA._1Mz35{fill:#9d9fa1;opacity:.4}._1_Dli>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2BBzB{width:120px}._2BBzB ._2d0wd._2e9oo{background-color:#efefef;border-radius:6px}._2XocA{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._2XocA._1jj-a{transform:rotate(-180deg)}";
|
|
3960
|
+
var styles = {"container":"_1GejC","input":"_3Dr_r","icon":"_2XocA","open":"_1jj-a","disabled":"_1Mz35","ignoreFocusStyle":"_1_Dli","flyout":"_2BBzB","option":"_2d0wd","exactMatch":"_2e9oo"};
|
|
3961
|
+
var stylesheet="._1GejC{display:inline-block;position:relative}._3Dr_r{width:120px}._3Dr_r ._2XocA._1jj-a{transform:rotate(-180deg)}._3Dr_r ._2XocA._1Mz35{fill:#9d9fa1;opacity:.4}._1_Dli>input:focus{box-shadow:none!important;border:1px solid #898989!important}._2BBzB{width:120px}._2BBzB ._2d0wd._2e9oo{background-color:#efefef;border-radius:6px}._2XocA{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._2XocA._1jj-a{transform:rotate(-180deg)}";
|
|
3962
|
+
icons_index.styleInject(css_248z);
|
|
3963
|
+
|
|
3964
|
+
const TimeDropdown = _ref => {
|
|
3965
|
+
let {
|
|
3966
|
+
onClick,
|
|
3967
|
+
scrolledToItem,
|
|
3968
|
+
inputRef,
|
|
3969
|
+
dropdownRef,
|
|
3970
|
+
items,
|
|
3971
|
+
id,
|
|
3972
|
+
dataTestId,
|
|
3973
|
+
ariaLabel,
|
|
3974
|
+
ariaLabelledBy,
|
|
3975
|
+
ariaDescribedBy,
|
|
3976
|
+
setIsOptionHovered,
|
|
3977
|
+
isOptionHovered
|
|
3978
|
+
} = _ref;
|
|
3979
|
+
const scrollRef = React.useRef(Array(items.length));
|
|
3980
|
+
const [refsInitialized, setRefsInitialized] = React.useState(false);
|
|
3981
|
+
React.useEffect(() => {
|
|
3982
|
+
const nodes = scrollRef.current;
|
|
3983
|
+
|
|
3984
|
+
if (scrolledToItem && nodes[scrolledToItem.index]) {
|
|
3985
|
+
nodes[scrolledToItem.index].scrollIntoView();
|
|
3986
|
+
}
|
|
3987
|
+
}, [scrolledToItem, refsInitialized]);
|
|
3988
|
+
return /*#__PURE__*/React__default["default"].createElement(index.Popper, {
|
|
3989
|
+
open: true,
|
|
3990
|
+
isFocusLocked: true,
|
|
3991
|
+
focusLockProps: {
|
|
3992
|
+
returnFocus: true
|
|
3993
|
+
},
|
|
3994
|
+
placement: "bottom",
|
|
3995
|
+
popper: /*#__PURE__*/React__default["default"].createElement(index.Flyout, {
|
|
3996
|
+
anchorRef: inputRef,
|
|
3997
|
+
ref: dropdownRef,
|
|
3998
|
+
id: id,
|
|
3999
|
+
"aria-label": ariaLabel,
|
|
4000
|
+
"aria-labelledby": ariaLabelledBy,
|
|
4001
|
+
"aria-describedby": ariaDescribedBy,
|
|
4002
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-dropdown"),
|
|
4003
|
+
className: styles.flyout,
|
|
4004
|
+
onMouseOver: () => setIsOptionHovered(true),
|
|
4005
|
+
onMouseLeave: () => setIsOptionHovered(false)
|
|
4006
|
+
}, items.map((item, index$1) => /*#__PURE__*/React__default["default"].createElement(index.FlyoutOption, {
|
|
4007
|
+
id: item.id,
|
|
4008
|
+
isHighlightedOnHover: true,
|
|
4009
|
+
isHighlighted: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.isFocused),
|
|
4010
|
+
key: item.label,
|
|
4011
|
+
ref: node => {
|
|
4012
|
+
if (node) {
|
|
4013
|
+
scrollRef.current[index$1] = node;
|
|
4014
|
+
setRefsInitialized(true);
|
|
4015
|
+
}
|
|
4016
|
+
},
|
|
4017
|
+
onClick: () => onClick(index$1),
|
|
4018
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-option-").concat(index$1),
|
|
4019
|
+
className: classNames__default["default"](styles.option, {
|
|
4020
|
+
[styles.exactMatch]: (scrolledToItem === null || scrolledToItem === void 0 ? void 0 : scrolledToItem.index) === index$1 && scrolledToItem.isExactMatch && !isOptionHovered
|
|
4021
|
+
})
|
|
4022
|
+
}, item.label))),
|
|
4023
|
+
anchorNode: inputRef.current,
|
|
4024
|
+
modifiers: [{
|
|
4025
|
+
name: 'offset',
|
|
4026
|
+
options: {
|
|
4027
|
+
offset: [0, 5]
|
|
4028
|
+
}
|
|
4029
|
+
}]
|
|
4030
|
+
});
|
|
4031
|
+
};
|
|
4032
|
+
|
|
4033
|
+
const formatUtcDate = (utcDate, is24HourClock) => {
|
|
4034
|
+
const {
|
|
4035
|
+
format
|
|
4036
|
+
} = Intl.DateTimeFormat(undefined, {
|
|
4037
|
+
timeStyle: 'short',
|
|
4038
|
+
timeZone: 'UTC',
|
|
4039
|
+
hourCycle: is24HourClock ? 'h23' : 'h12'
|
|
4040
|
+
});
|
|
4041
|
+
const dateWithoutLeadingZeros = format(utcDate);
|
|
4042
|
+
let dateWithLeadingZeros = dateWithoutLeadingZeros;
|
|
4043
|
+
|
|
4044
|
+
if (dateWithLeadingZeros.split(':')[0].length === 1) {
|
|
4045
|
+
dateWithLeadingZeros = "0".concat(dateWithLeadingZeros);
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
return dateWithLeadingZeros.toLowerCase();
|
|
4049
|
+
};
|
|
4050
|
+
const convertTimeObjectToTimeString = (time, is24HourClock) => {
|
|
4051
|
+
const date = Date.UTC(2000, 0, 0, time.hour, time.minute);
|
|
4052
|
+
return formatUtcDate(date, is24HourClock);
|
|
4053
|
+
};
|
|
4054
|
+
const convertTimeStringToTimeObject = completeTimeString => {
|
|
4055
|
+
const [hourPart, minutePart, amPmPart] = completeTimeString.split(/:| /);
|
|
4056
|
+
let hour = +hourPart;
|
|
4057
|
+
const minute = +minutePart;
|
|
4058
|
+
|
|
4059
|
+
if (amPmPart === 'am' && hour === 12) {
|
|
4060
|
+
hour = 0;
|
|
4061
|
+
} else if (amPmPart === 'pm' && hour < 12) {
|
|
4062
|
+
hour += 12;
|
|
4063
|
+
}
|
|
4064
|
+
|
|
4065
|
+
return {
|
|
4066
|
+
hour,
|
|
4067
|
+
minute
|
|
4068
|
+
};
|
|
4069
|
+
};
|
|
4070
|
+
const generateTimes = (step, is24HourClock) => {
|
|
4071
|
+
const secondsInDay = 60 * 60 * 24;
|
|
4072
|
+
return Array.from(Array(secondsInDay / step)).map((_, i) => {
|
|
4073
|
+
const labelWithLeadingZeros = formatUtcDate(Date.UTC(2000, 0, 1, 0, 0, i * step, 0), is24HourClock);
|
|
4074
|
+
return {
|
|
4075
|
+
label: labelWithLeadingZeros,
|
|
4076
|
+
value: i * step,
|
|
4077
|
+
id: "time-option-".concat(i)
|
|
4078
|
+
};
|
|
4079
|
+
});
|
|
4080
|
+
};
|
|
4081
|
+
|
|
4082
|
+
function getTimeStringCorrector(str, is24HourClock) {
|
|
4083
|
+
var _letterString;
|
|
4084
|
+
|
|
4085
|
+
let [numberString, letterString] = str.replace(':', '').split(' ');
|
|
4086
|
+
letterString = (_letterString = letterString) === null || _letterString === void 0 ? void 0 : _letterString.toLowerCase();
|
|
4087
|
+
let selectionModifier = 0;
|
|
4088
|
+
|
|
4089
|
+
const getTimeString = () => {
|
|
4090
|
+
const finalNumberString = "".concat(numberString.slice(0, 2), ":").concat(numberString.slice(2, 4));
|
|
4091
|
+
return is24HourClock ? finalNumberString : "".concat(finalNumberString, " ").concat(letterString);
|
|
4092
|
+
};
|
|
4093
|
+
|
|
4094
|
+
const getSelectionModifier = () => selectionModifier;
|
|
4095
|
+
|
|
4096
|
+
const replaceDashes = () => {
|
|
4097
|
+
numberString = numberString.replace(/-/g, '0');
|
|
4098
|
+
|
|
4099
|
+
if (letterString) {
|
|
4100
|
+
if (letterString[0] === '-' || letterString[0] === 'a') {
|
|
4101
|
+
// Arbitrarily choose AM if user hasn't typed 'a' or 'p'
|
|
4102
|
+
letterString = 'am';
|
|
4103
|
+
} else {
|
|
4104
|
+
letterString = 'pm';
|
|
4105
|
+
}
|
|
4106
|
+
}
|
|
4107
|
+
};
|
|
4108
|
+
|
|
4109
|
+
const shiftMinutesRight = () => {
|
|
4110
|
+
numberString = "".concat(numberString.slice(0, 2), "0").concat(numberString[2]);
|
|
4111
|
+
selectionModifier += 1;
|
|
4112
|
+
};
|
|
4113
|
+
|
|
4114
|
+
const prependCharacter = character => {
|
|
4115
|
+
numberString = "".concat(character).concat(numberString);
|
|
4116
|
+
selectionModifier += 1;
|
|
4117
|
+
};
|
|
4118
|
+
|
|
4119
|
+
const setHoursTo12 = () => {
|
|
4120
|
+
numberString = "12".concat(numberString.slice(2));
|
|
4121
|
+
};
|
|
4122
|
+
|
|
4123
|
+
const clearSecondHoursDigit = () => {
|
|
4124
|
+
numberString = "".concat(numberString.slice(0, 1), "0").concat(numberString.slice(2));
|
|
4125
|
+
};
|
|
4126
|
+
|
|
4127
|
+
const hoursAre00 = () => numberString[0] === '0' && numberString[1] === '0';
|
|
4128
|
+
|
|
4129
|
+
const firstHourGreaterThan1 = () => {
|
|
4130
|
+
var _context;
|
|
4131
|
+
|
|
4132
|
+
return !_includesInstanceProperty__default["default"](_context = '01-').call(_context, numberString[0]);
|
|
4133
|
+
};
|
|
4134
|
+
|
|
4135
|
+
const firstHourGreaterThan2 = () => {
|
|
4136
|
+
var _context2;
|
|
4137
|
+
|
|
4138
|
+
return !_includesInstanceProperty__default["default"](_context2 = '012-').call(_context2, numberString[0]);
|
|
4139
|
+
};
|
|
4140
|
+
|
|
4141
|
+
const hoursGreaterThan12 = () => {
|
|
4142
|
+
var _context3;
|
|
4143
|
+
|
|
4144
|
+
return numberString[0] === '1' && !_includesInstanceProperty__default["default"](_context3 = '012-').call(_context3, numberString[1]);
|
|
4145
|
+
};
|
|
4146
|
+
|
|
4147
|
+
const hoursGreaterThan23 = () => {
|
|
4148
|
+
var _context4;
|
|
4149
|
+
|
|
4150
|
+
return numberString[0] === '2' && !_includesInstanceProperty__default["default"](_context4 = '0123-').call(_context4, numberString[1]);
|
|
4151
|
+
};
|
|
4152
|
+
|
|
4153
|
+
const firstMinuteGreaterThan5 = () => numberString[2] !== '-' && +numberString[2] > 5;
|
|
4154
|
+
|
|
4155
|
+
const hasTypedMinutes = () => numberString[2] !== '-' && numberString[3] !== '-';
|
|
4156
|
+
|
|
4157
|
+
return {
|
|
4158
|
+
getTimeString,
|
|
4159
|
+
getSelectionModifier,
|
|
4160
|
+
replaceDashes,
|
|
4161
|
+
setHoursTo12,
|
|
4162
|
+
clearSecondHoursDigit,
|
|
4163
|
+
shiftMinutesRight,
|
|
4164
|
+
prependCharacter,
|
|
4165
|
+
hoursAre00,
|
|
4166
|
+
firstHourGreaterThan1,
|
|
4167
|
+
firstHourGreaterThan2,
|
|
4168
|
+
hoursGreaterThan12,
|
|
4169
|
+
hoursGreaterThan23,
|
|
4170
|
+
firstMinuteGreaterThan5,
|
|
4171
|
+
hasTypedMinutes
|
|
4172
|
+
};
|
|
4173
|
+
}
|
|
4174
|
+
|
|
4175
|
+
const correct12HourTime = (time, mustCompleteTime) => {
|
|
4176
|
+
const timeStringCorrector = getTimeStringCorrector(time, false);
|
|
4177
|
+
|
|
4178
|
+
if (mustCompleteTime) {
|
|
4179
|
+
timeStringCorrector.replaceDashes();
|
|
4180
|
+
}
|
|
4181
|
+
|
|
4182
|
+
if (timeStringCorrector.firstHourGreaterThan1()) {
|
|
4183
|
+
timeStringCorrector.prependCharacter('0');
|
|
4184
|
+
}
|
|
4185
|
+
|
|
4186
|
+
if (timeStringCorrector.hoursGreaterThan12()) {
|
|
4187
|
+
if (timeStringCorrector.hasTypedMinutes()) {
|
|
4188
|
+
// User likely just edited the first digit and that made the
|
|
4189
|
+
// second digit invalid, e.g., changed '08:' to '18:'. They
|
|
4190
|
+
// probably are about to fix up the second digit. We'll set it to 0
|
|
4191
|
+
timeStringCorrector.clearSecondHoursDigit();
|
|
4192
|
+
} else {
|
|
4193
|
+
// Assume the user forgot a leading 0
|
|
4194
|
+
// Example: we are changing '13:--' to '01:3-'
|
|
4195
|
+
timeStringCorrector.prependCharacter('0');
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
|
|
4199
|
+
if (timeStringCorrector.hoursAre00()) {
|
|
4200
|
+
timeStringCorrector.setHoursTo12();
|
|
4201
|
+
}
|
|
4202
|
+
|
|
4203
|
+
if (timeStringCorrector.firstMinuteGreaterThan5()) {
|
|
4204
|
+
// Assume the user forgot a 0
|
|
4205
|
+
// Example: we are changing 12:6- to 12:06
|
|
4206
|
+
timeStringCorrector.shiftMinutesRight();
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
return {
|
|
4210
|
+
correctedTime: timeStringCorrector.getTimeString(),
|
|
4211
|
+
selectionModifier: timeStringCorrector.getSelectionModifier()
|
|
4212
|
+
};
|
|
4213
|
+
};
|
|
4214
|
+
|
|
4215
|
+
const correct24HourTime = (time, mustCompleteTime) => {
|
|
4216
|
+
const timeStringCorrector = getTimeStringCorrector(time, true);
|
|
4217
|
+
|
|
4218
|
+
if (mustCompleteTime) {
|
|
4219
|
+
timeStringCorrector.replaceDashes();
|
|
4220
|
+
}
|
|
4221
|
+
|
|
4222
|
+
if (timeStringCorrector.hoursGreaterThan23()) {
|
|
4223
|
+
// User likely just edited the first digit and that made the second
|
|
4224
|
+
// digit invalid, e.g., changed '15:' to '25:'. They probably
|
|
4225
|
+
// are about to fix up the second digit. We'll set it to 0
|
|
4226
|
+
if (timeStringCorrector.hasTypedMinutes()) {
|
|
4227
|
+
timeStringCorrector.clearSecondHoursDigit();
|
|
4228
|
+
} else {
|
|
4229
|
+
// Assume the user forgot a leading 0
|
|
4230
|
+
// Example: we are changing '25:--' to '02:5-'
|
|
4231
|
+
timeStringCorrector.prependCharacter('0');
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
|
|
4235
|
+
if (timeStringCorrector.firstHourGreaterThan2()) {
|
|
4236
|
+
// Assume the user forgot a leading 0
|
|
4237
|
+
// Example: we are changing '3-:--' to '03:--'
|
|
4238
|
+
timeStringCorrector.prependCharacter('0');
|
|
4239
|
+
}
|
|
4240
|
+
|
|
4241
|
+
if (timeStringCorrector.firstMinuteGreaterThan5()) {
|
|
4242
|
+
// Assume the user forgot a 0
|
|
4243
|
+
// Example: we are changing 12:6- to 12:06
|
|
4244
|
+
timeStringCorrector.shiftMinutesRight();
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
return {
|
|
4248
|
+
correctedTime: timeStringCorrector.getTimeString(),
|
|
4249
|
+
selectionModifier: timeStringCorrector.getSelectionModifier()
|
|
4250
|
+
};
|
|
4251
|
+
}; // We will follow the same process to correct the time regardless
|
|
4252
|
+
// of what specific character changed.
|
|
4253
|
+
// This simplifies logic for when multiple chars are pasted in
|
|
4254
|
+
// and for when the input has to be shifted due to invalid entries.
|
|
4255
|
+
|
|
4256
|
+
|
|
4257
|
+
const correctTime = (time, is24HourClock, mustCompleteTime) => is24HourClock ? correct24HourTime(time, mustCompleteTime) : correct12HourTime(time, mustCompleteTime);
|
|
4258
|
+
|
|
4259
|
+
const TimeInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4260
|
+
let {
|
|
4261
|
+
onChange,
|
|
4262
|
+
ariaExpanded,
|
|
4263
|
+
userInput,
|
|
4264
|
+
handleKeyDown,
|
|
4265
|
+
setIsFlyoutOpen,
|
|
4266
|
+
setShouldMoveSelectionToEnd,
|
|
4267
|
+
shouldMoveSelectionToEnd,
|
|
4268
|
+
isInvalid,
|
|
4269
|
+
isDisabled,
|
|
4270
|
+
is24HourClock,
|
|
4271
|
+
id,
|
|
4272
|
+
dataTestId,
|
|
4273
|
+
ariaControls,
|
|
4274
|
+
ariaActiveDescendant,
|
|
4275
|
+
ariaLabel,
|
|
4276
|
+
ariaLabelledBy,
|
|
4277
|
+
ariaDescribedBy,
|
|
4278
|
+
isOptionHovered
|
|
4279
|
+
} = _ref;
|
|
4280
|
+
const mask24 = '99:99';
|
|
4281
|
+
const mask12 = '99:99 am';
|
|
4282
|
+
const mask = is24HourClock ? mask24 : mask12;
|
|
4283
|
+
return /*#__PURE__*/React__default["default"].createElement(InputMask__default["default"], {
|
|
4284
|
+
value: userInput,
|
|
4285
|
+
onChange: e => onChange(e.target.value),
|
|
4286
|
+
disabled: isDisabled,
|
|
4287
|
+
alwaysShowMask: true,
|
|
4288
|
+
formatChars: {
|
|
4289
|
+
'9': '[0-9]',
|
|
4290
|
+
a: '[AaPp]',
|
|
4291
|
+
m: '[Mm]'
|
|
4292
|
+
},
|
|
4293
|
+
maskChar: "-",
|
|
4294
|
+
mask: mask,
|
|
4295
|
+
beforeMaskedValueChange: next => {
|
|
4296
|
+
const {
|
|
4297
|
+
correctedTime,
|
|
4298
|
+
selectionModifier
|
|
4299
|
+
} = correctTime(next.value, is24HourClock, false);
|
|
4300
|
+
const newSelection = next === null || next === void 0 ? void 0 : next.selection;
|
|
4301
|
+
|
|
4302
|
+
if (newSelection) {
|
|
4303
|
+
const validTimeLength = mask.length;
|
|
4304
|
+
newSelection.start = shouldMoveSelectionToEnd ? validTimeLength : newSelection.start;
|
|
4305
|
+
newSelection.end = shouldMoveSelectionToEnd ? validTimeLength : newSelection.end;
|
|
4306
|
+
newSelection.start = Math.min(newSelection.start + selectionModifier, validTimeLength);
|
|
4307
|
+
newSelection.end = Math.min(newSelection.end + selectionModifier, validTimeLength);
|
|
4308
|
+
}
|
|
4309
|
+
|
|
4310
|
+
setShouldMoveSelectionToEnd(false);
|
|
4311
|
+
return { ...next,
|
|
4312
|
+
value: correctedTime,
|
|
4313
|
+
selection: newSelection
|
|
4314
|
+
};
|
|
4315
|
+
}
|
|
4316
|
+
}, () => /*#__PURE__*/React__default["default"].createElement(index.Input$1, {
|
|
4317
|
+
id: id,
|
|
4318
|
+
disabled: isDisabled,
|
|
4319
|
+
role: "combobox",
|
|
4320
|
+
"aria-expanded": ariaExpanded,
|
|
4321
|
+
"aria-controls": ariaControls,
|
|
4322
|
+
ref: ref,
|
|
4323
|
+
className: classNames__default["default"](styles.input, {
|
|
4324
|
+
[styles.ignoreFocusStyle]: !!ariaActiveDescendant || isOptionHovered
|
|
4325
|
+
}),
|
|
4326
|
+
"aria-invalid": isInvalid,
|
|
4327
|
+
onKeyDown: handleKeyDown,
|
|
4328
|
+
onClick: () => setIsFlyoutOpen(true),
|
|
4329
|
+
"aria-label": ariaLabel,
|
|
4330
|
+
"aria-labelledby": ariaLabelledBy,
|
|
4331
|
+
"aria-describedby": ariaDescribedBy,
|
|
4332
|
+
"aria-activedescendant": ariaActiveDescendant,
|
|
4333
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-input")
|
|
4334
|
+
}));
|
|
4335
|
+
});
|
|
4336
|
+
|
|
4337
|
+
const TimePickerIcon = _ref => {
|
|
4338
|
+
let {
|
|
4339
|
+
isOpen,
|
|
4340
|
+
isDisabled,
|
|
4341
|
+
setIsFlyoutOpen,
|
|
4342
|
+
iconRef,
|
|
4343
|
+
inputRef
|
|
4344
|
+
} = _ref;
|
|
4345
|
+
return /*#__PURE__*/React__default["default"].createElement(index.IconButton, {
|
|
4346
|
+
"aria-hidden": "true",
|
|
4347
|
+
tabIndex: -1,
|
|
4348
|
+
disabled: isDisabled,
|
|
4349
|
+
className: classNames__default["default"](styles.icon, {
|
|
4350
|
+
[styles.open]: isOpen
|
|
4351
|
+
})
|
|
4352
|
+
}, /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronDownIcon, {
|
|
4353
|
+
onClick: !isDisabled ? () => {
|
|
4354
|
+
var _inputRef$current;
|
|
4355
|
+
|
|
4356
|
+
setIsFlyoutOpen(i => !i);
|
|
4357
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
4358
|
+
} : undefined,
|
|
4359
|
+
onMouseDown: e => e.preventDefault(),
|
|
4360
|
+
ref: iconRef
|
|
4361
|
+
}));
|
|
4362
|
+
};
|
|
4363
|
+
|
|
4364
|
+
const DEFAULT_TIME = (() => {
|
|
4365
|
+
const now = new Date();
|
|
4366
|
+
const hour = now.getHours();
|
|
4367
|
+
const minute = now.getMinutes();
|
|
4368
|
+
return {
|
|
4369
|
+
hour,
|
|
4370
|
+
minute
|
|
4371
|
+
};
|
|
4372
|
+
})();
|
|
4373
|
+
|
|
4374
|
+
const TimePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
4375
|
+
let {
|
|
4376
|
+
value: externalValue,
|
|
4377
|
+
onChange: externalOnChange,
|
|
4378
|
+
is24HourClock = false,
|
|
4379
|
+
isDisabled = false,
|
|
4380
|
+
isInvalid = false,
|
|
4381
|
+
id: externalId,
|
|
4382
|
+
'data-testid': dataTestId,
|
|
4383
|
+
'aria-label': ariaLabel,
|
|
4384
|
+
'aria-labelledby': ariaLabelledBy,
|
|
4385
|
+
'aria-describedby': ariaDescribedBy
|
|
4386
|
+
} = _ref;
|
|
4387
|
+
const timePickerId = index.useId(externalId);
|
|
4388
|
+
const inputId = "".concat(timePickerId, "-input");
|
|
4389
|
+
const dropdownId = "".concat(timePickerId, "-dropdown");
|
|
4390
|
+
const [isOptionHovered, setIsOptionHovered] = React.useState(false);
|
|
4391
|
+
const [timeObject, setTimeObject] = index.useControllableState(DEFAULT_TIME, externalOnChange, externalValue);
|
|
4392
|
+
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.
|
|
4393
|
+
|
|
4394
|
+
const [timeString, setTimeString] = React.useState(defaultTimeString);
|
|
4395
|
+
const [isTimeStringDirty, setIsTimeStringDirty] = React.useState(false);
|
|
4396
|
+
const step = 60 * 30;
|
|
4397
|
+
const dropdownItems = React.useMemo(() => generateTimes(step, is24HourClock), [is24HourClock, step]);
|
|
4398
|
+
const getScrolledToItemFromTimeString = React.useCallback(typedTime => {
|
|
4399
|
+
const {
|
|
4400
|
+
correctedTime
|
|
4401
|
+
} = correctTime(typedTime, is24HourClock, true);
|
|
4402
|
+
const correctedTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
4403
|
+
const correctedTimeValue = correctedTimeObject.hour * 60 * 60 + correctedTimeObject.minute * 60;
|
|
4404
|
+
let minDistance = correctedTimeValue - dropdownItems[0].value; // Substring search up to first empty spot
|
|
4405
|
+
|
|
4406
|
+
for (let i = 1; i < dropdownItems.length; i += 1) {
|
|
4407
|
+
const distance = correctedTimeValue - dropdownItems[i].value;
|
|
4408
|
+
|
|
4409
|
+
if (distance > minDistance || distance < 0) {
|
|
4410
|
+
return {
|
|
4411
|
+
index: i - 1,
|
|
4412
|
+
isFocused: false,
|
|
4413
|
+
isExactMatch: minDistance === 0
|
|
4414
|
+
};
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
minDistance = distance;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
return {
|
|
4421
|
+
index: dropdownItems.length - 1,
|
|
4422
|
+
isFocused: false,
|
|
4423
|
+
isExactMatch: minDistance === 0
|
|
4424
|
+
};
|
|
4425
|
+
}, [is24HourClock, dropdownItems]);
|
|
4426
|
+
const [scrolledToItem, setScrolledToItem] = React.useState(() => getScrolledToItemFromTimeString(timeString));
|
|
4427
|
+
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.
|
|
4428
|
+
|
|
4429
|
+
React.useEffect(() => {
|
|
4430
|
+
const newTimeString = convertTimeObjectToTimeString(timeObject, is24HourClock);
|
|
4431
|
+
setTimeString(newTimeString);
|
|
4432
|
+
setIsTimeStringDirty(false);
|
|
4433
|
+
setShouldMoveSelectionToEnd(true);
|
|
4434
|
+
setScrolledToItem(getScrolledToItemFromTimeString(newTimeString));
|
|
4435
|
+
}, [timeObject, is24HourClock, getScrolledToItemFromTimeString]);
|
|
4436
|
+
const [isFlyoutOpen, setIsFlyoutOpen] = React.useState(false); // Sets the actual time object and updates the flyout and focus state
|
|
4437
|
+
|
|
4438
|
+
const commitTimeString = function () {
|
|
4439
|
+
let newTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : timeString;
|
|
4440
|
+
const {
|
|
4441
|
+
correctedTime
|
|
4442
|
+
} = correctTime(newTime, is24HourClock, true);
|
|
4443
|
+
const newTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
4444
|
+
setTimeObject(newTimeObject);
|
|
4445
|
+
setIsFlyoutOpen(false);
|
|
4446
|
+
};
|
|
4447
|
+
|
|
4448
|
+
const inputRef = React.useRef(null);
|
|
4449
|
+
const dropdownRef = React.useRef(null);
|
|
4450
|
+
const iconRef = React.useRef(null);
|
|
4451
|
+
index.useClickOutside([inputRef, dropdownRef, iconRef], () => isTimeStringDirty ? commitTimeString() : setIsFlyoutOpen(false));
|
|
4452
|
+
|
|
4453
|
+
const focusNext = () => {
|
|
4454
|
+
setScrolledToItem(f => {
|
|
4455
|
+
if (!f.isFocused) {
|
|
4456
|
+
// Focus just moved from input to listbox.
|
|
4457
|
+
// Move to item that was highlighted based on user input
|
|
4458
|
+
return {
|
|
4459
|
+
index: f.index,
|
|
4460
|
+
isFocused: true,
|
|
4461
|
+
isExactMatch: false
|
|
4462
|
+
};
|
|
4463
|
+
}
|
|
4464
|
+
|
|
4465
|
+
if (f.index === dropdownItems.length - 1) {
|
|
4466
|
+
return f;
|
|
4467
|
+
}
|
|
4468
|
+
|
|
4469
|
+
return {
|
|
4470
|
+
index: f.index + 1,
|
|
4471
|
+
isFocused: true,
|
|
4472
|
+
isExactMatch: false
|
|
4473
|
+
};
|
|
4474
|
+
});
|
|
4475
|
+
};
|
|
4476
|
+
|
|
4477
|
+
const focusPrevious = () => {
|
|
4478
|
+
setScrolledToItem(f => {
|
|
4479
|
+
if (!f.isFocused) {
|
|
4480
|
+
// Focus just moved from input to listbox
|
|
4481
|
+
// Move to last item on arrowUp.
|
|
4482
|
+
return {
|
|
4483
|
+
index: dropdownItems.length - 1,
|
|
4484
|
+
isFocused: true,
|
|
4485
|
+
isExactMatch: false
|
|
4486
|
+
};
|
|
4487
|
+
}
|
|
4488
|
+
|
|
4489
|
+
if (f.index === 0) {
|
|
4490
|
+
return f;
|
|
4491
|
+
}
|
|
4492
|
+
|
|
4493
|
+
return {
|
|
4494
|
+
index: f.index - 1,
|
|
4495
|
+
isFocused: true,
|
|
4496
|
+
isExactMatch: false
|
|
4497
|
+
};
|
|
4498
|
+
});
|
|
4499
|
+
};
|
|
4500
|
+
|
|
4501
|
+
const handleType = typedTime => {
|
|
4502
|
+
setIsFlyoutOpen(true);
|
|
4503
|
+
setTimeString(typedTime);
|
|
4504
|
+
setIsTimeStringDirty(true);
|
|
4505
|
+
setScrolledToItem(getScrolledToItemFromTimeString(typedTime));
|
|
4506
|
+
};
|
|
4507
|
+
|
|
4508
|
+
const handleSelectTime = selectedIndex => {
|
|
4509
|
+
const timeLabel = dropdownItems[selectedIndex].label;
|
|
4510
|
+
setIsOptionHovered(false);
|
|
4511
|
+
commitTimeString(timeLabel);
|
|
4512
|
+
};
|
|
4513
|
+
|
|
4514
|
+
const handleKeyDown = e => {
|
|
4515
|
+
switch (e.key) {
|
|
4516
|
+
case 'ArrowUp':
|
|
4517
|
+
e.preventDefault();
|
|
4518
|
+
setIsFlyoutOpen(true);
|
|
4519
|
+
focusPrevious();
|
|
4520
|
+
break;
|
|
4521
|
+
|
|
4522
|
+
case 'ArrowDown':
|
|
4523
|
+
e.preventDefault();
|
|
4524
|
+
setIsFlyoutOpen(true);
|
|
4525
|
+
focusNext();
|
|
4526
|
+
break;
|
|
4527
|
+
|
|
4528
|
+
case 'Enter':
|
|
4529
|
+
e.preventDefault();
|
|
4530
|
+
|
|
4531
|
+
if (scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused) {
|
|
4532
|
+
// "focus" is on the listbox
|
|
4533
|
+
handleSelectTime(scrolledToItem.index);
|
|
4534
|
+
} else {
|
|
4535
|
+
// "focus" is on the input
|
|
4536
|
+
commitTimeString();
|
|
4537
|
+
}
|
|
4538
|
+
|
|
4539
|
+
break;
|
|
4540
|
+
|
|
4541
|
+
case 'Escape':
|
|
4542
|
+
case 'Tab':
|
|
4543
|
+
// use whatever time is closest to what's in the input
|
|
4544
|
+
commitTimeString();
|
|
4545
|
+
break;
|
|
4546
|
+
|
|
4547
|
+
default:
|
|
4548
|
+
break;
|
|
4549
|
+
}
|
|
4550
|
+
};
|
|
4551
|
+
|
|
4552
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
4553
|
+
id: timePickerId,
|
|
4554
|
+
className: styles.container
|
|
4555
|
+
}, /*#__PURE__*/React__default["default"].createElement(TimeInput, {
|
|
4556
|
+
id: inputId,
|
|
4557
|
+
dataTestId: dataTestId,
|
|
4558
|
+
ariaActiveDescendant: isFlyoutOpen && scrolledToItem !== null && scrolledToItem !== void 0 && scrolledToItem.isFocused ? dropdownItems[scrolledToItem.index].id : undefined,
|
|
4559
|
+
ariaControls: dropdownId,
|
|
4560
|
+
ariaExpanded: isFlyoutOpen,
|
|
4561
|
+
onChange: handleType,
|
|
4562
|
+
userInput: timeString,
|
|
4563
|
+
handleKeyDown: handleKeyDown,
|
|
4564
|
+
setIsFlyoutOpen: setIsFlyoutOpen,
|
|
4565
|
+
isDisabled: isDisabled,
|
|
4566
|
+
is24HourClock: is24HourClock,
|
|
4567
|
+
isInvalid: isInvalid,
|
|
4568
|
+
ariaLabel: ariaLabel,
|
|
4569
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
4570
|
+
ariaDescribedBy: ariaDescribedBy,
|
|
4571
|
+
isOptionHovered: isOptionHovered,
|
|
4572
|
+
setShouldMoveSelectionToEnd: setShouldMoveSelectionToEnd,
|
|
4573
|
+
shouldMoveSelectionToEnd: shouldMoveSelectionToEnd,
|
|
4574
|
+
ref: index.mergeRefs(ref, inputRef)
|
|
4575
|
+
}), /*#__PURE__*/React__default["default"].createElement(TimePickerIcon, {
|
|
4576
|
+
isOpen: isFlyoutOpen,
|
|
4577
|
+
isDisabled: isDisabled,
|
|
4578
|
+
setIsFlyoutOpen: setIsFlyoutOpen,
|
|
4579
|
+
iconRef: iconRef,
|
|
4580
|
+
inputRef: inputRef
|
|
4581
|
+
}), isFlyoutOpen && /*#__PURE__*/React__default["default"].createElement(TimeDropdown, {
|
|
4582
|
+
id: dropdownId,
|
|
4583
|
+
inputRef: inputRef,
|
|
4584
|
+
dropdownRef: dropdownRef,
|
|
4585
|
+
onClick: handleSelectTime,
|
|
4586
|
+
scrolledToItem: scrolledToItem,
|
|
4587
|
+
items: dropdownItems,
|
|
4588
|
+
dataTestId: dataTestId,
|
|
4589
|
+
ariaLabel: ariaLabel,
|
|
4590
|
+
ariaLabelledBy: ariaLabelledBy,
|
|
4591
|
+
ariaDescribedBy: ariaDescribedBy,
|
|
4592
|
+
setIsOptionHovered: setIsOptionHovered,
|
|
4593
|
+
isOptionHovered: isOptionHovered
|
|
4594
|
+
}));
|
|
4595
|
+
});
|
|
4596
|
+
|
|
3954
4597
|
/* eslint-disable camelcase */
|
|
3955
4598
|
|
|
3956
4599
|
exports.Input = index.Input$1;
|
|
@@ -3971,3 +4614,4 @@ exports.PhoneNumberInput = PhoneNumberInput;
|
|
|
3971
4614
|
exports.SplitButton = SplitButton;
|
|
3972
4615
|
exports.SplitButtonOption = SplitButtonOption;
|
|
3973
4616
|
exports.SubMenu = SubMenu;
|
|
4617
|
+
exports.TimePicker = TimePicker;
|