@qualtrics/ui-react 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/__shared/cjs/{index-201e8786.js → index-025620bf.js} +666 -549
- package/dist/__shared/cjs/{index-0ae99de2.js → index-41a013d2.js} +4 -4
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +4 -4
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +11 -11
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +12 -9
- package/dist/components/ColorPicker/ColorPicker.js +10 -8
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +8 -6
- package/dist/components/ColorPicker/Hue.js +3 -2
- package/dist/components/ColorPicker/Palette.js +7 -5
- package/dist/components/ColorPicker/Saturation.js +9 -8
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +3 -2
- package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
- package/dist/components/ColorPicker/utils/validateHex.js +10 -9
- package/dist/components/Combobox/Combobox.js +47 -26
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxHeader.js +1 -1
- package/dist/components/Combobox/ComboboxIcon.js +3 -2
- package/dist/components/Combobox/ComboboxInput.js +4 -4
- package/dist/components/Combobox/ComboboxList.js +2 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +5 -2
- package/dist/components/Dropdown/Dropdown.js +14 -9
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +23 -19
- package/dist/components/Dropdown/DropdownList.js +4 -4
- package/dist/components/Dropdown/DropdownOption.js +4 -3
- package/dist/components/Dropdown/DropdownSearch.js +10 -4
- package/dist/components/FilePicker/FilePicker.js +13 -6
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +12 -9
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +2 -2
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionSet.js +5 -5
- package/dist/components/LogicEditor/LogicEditor.js +1 -1
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +2 -1
- package/dist/components/Modal/Modal.js +14 -13
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +41 -30
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -7
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper.js +7 -6
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +5 -5
- package/dist/components/Pagination/PaginationPageInput.js +11 -9
- package/dist/components/Pagination/PaginationPreviousButton.js +5 -5
- package/dist/components/Popover/Popover.js +9 -7
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +4 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
- package/dist/components/Radio/Radio.js +12 -11
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +4 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav.js +2 -1
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavLink.js +1 -1
- package/dist/components/Slider/RangeSlider.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +1 -1
- package/dist/components/Switch/Switch.js +11 -11
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabList.js +6 -5
- package/dist/components/Tabs/TabPanel.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +10 -4
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/UIProvider.js +2 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +4 -4
- package/dist/components/deprecated_ColorPicker/Color.js +6 -6
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -2
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
- package/dist/components/deprecated_ColorPicker/Hue.js +3 -3
- package/dist/components/deprecated_ColorPicker/Saturation.js +5 -5
- package/dist/components/deprecated_ColorPicker/Swatch.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +8 -8
- package/dist/components/deprecated_Tabs/Tabs.js +11 -7
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +4 -2
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +8 -8
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -1
- package/dist/hooks/useControllableState/useControllableState.js +2 -1
- package/dist/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/hooks/useId/useId.js +1 -1
- package/dist/hooks/useOverlay/useOverlay.js +6 -4
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +2 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +4 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/createIconComponent.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +60 -49
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +6 -4
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +18 -10
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +7 -6
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +5 -4
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +3 -2
- package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxFlyout.js +2 -2
- package/dist/next/Combobox/ComboboxGroup.js +1 -1
- package/dist/next/Combobox/ComboboxInput.js +2 -2
- package/dist/next/Combobox/ComboboxOption.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +12 -8
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +1 -1
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +3 -2
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +2 -1
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +2 -1
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +1 -1
- package/dist/next/Drawer/Drawer.js +7 -4
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input.js +2 -2
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +5 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuItem.js +10 -8
- package/dist/next/Menu/MenuPane.js +20 -8
- package/dist/next/Menu/SubMenu.js +12 -8
- package/dist/next/Menu/useMutationObserver.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +27 -15
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +8 -2
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +4 -4
- package/dist/next/TimePicker/TimeInput.js +2 -2
- package/dist/next/TimePicker/TimePicker.js +4 -4
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +2 -1
- package/dist/next/TimePicker/utils.js +10 -9
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +298 -219
- package/dist/utils/Flyout/Flyout.js +1 -1
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Popper/Popper.js +9 -5
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +2 -1
- package/dist/utils/Translation/useTranslation.js +4 -5
- package/dist/utils/filterChildren/filterChildren.js +2 -1
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
- package/dist/utils/mergeRefs/mergeRefs.js +1 -1
- package/dist/utils/wrapEvent/wrapEvent.js +2 -2
- package/next/package.json +1 -1
- package/package.json +2 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _includesInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var classNames = require('classnames');
|
|
6
|
-
var icons_index = require('./index-
|
|
6
|
+
var icons_index = require('./index-41a013d2.js');
|
|
7
7
|
var _extends = require('@babel/runtime-corejs3/helpers/extends');
|
|
8
8
|
var reactPopper = require('react-popper');
|
|
9
9
|
var core = require('@popperjs/core');
|
|
@@ -44,9 +44,9 @@ var ReactFocusLock__default = /*#__PURE__*/_interopDefaultLegacy(ReactFocusLock)
|
|
|
44
44
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
45
45
|
var useResizeObserver__default = /*#__PURE__*/_interopDefaultLegacy(useResizeObserver$1);
|
|
46
46
|
|
|
47
|
-
var css_248z$I = ".
|
|
48
|
-
var AccordionStyles = {"accordion":"
|
|
49
|
-
var stylesheet$I=".
|
|
47
|
+
var css_248z$I = "._ZsFIN{width:100%;display:flex;flex-direction:column}._ZsFIN._9hwS9{grid-gap:20px;gap:20px}._Ws-QS{display:flex;width:100%;border:none;outline:none;background-color:transparent;color:#32363a;font-size:14px;font-weight:700;line-height:18px;text-align:left;padding:10px 16px 10px 0;cursor:pointer}._Ws-QS ._pgZve{margin-top:-3px}._5mgAV{flex:1}._WsY1B{padding:8px 16px 16px 24px;font-size:14px;line-height:20px}._4HU2e ._Ws-QS{border-radius:4px}._4HU2e ._Ws-QS:hover:not(._9lFhZ){background-color:rgba(50,54,58,.08)}._4HU2e ._Ws-QS:active:not(._9lFhZ){background-color:rgba(50,54,58,.11)}._mgVUL ._Ws-QS{font-weight:400;padding-left:12px;border-top:1px solid #eee}._mgVUL ._Ws-QS:hover:not(._9lFhZ){background-color:rgba(50,54,58,.08)}._mgVUL ._Ws-QS:active:not(._9lFhZ){background-color:rgba(50,54,58,.11)}._9hwS9 ._vdmhP{border-radius:6px;box-shadow:0 3px 4px rgba(0,0,0,.05),0 6px 10px rgba(0,0,0,.05)}._9hwS9 ._vdmhP._dL8je{box-shadow:none}._9hwS9 ._vdmhP._dL8je ._Ws-QS{border-radius:6px}._9hwS9 ._Ws-QS{border:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-weight:400;padding:22px 20px}._9hwS9 ._Ws-QS ._5mgAV{padding-left:20px}._9hwS9 ._Ws-QS:hover:not(disabled){border:1px solid #c2c2c2}._9hwS9 ._Ws-QS:active:not(._9lFhZ){border:1px solid #898989}._9hwS9 ._WsY1B{padding:24px 20px;color:#6a6d70;border:1px solid #e5e5e5;border-top:none;border-radius:0 0 6px 6px}._dL8je ._WsY1B{display:none}._9lFhZ{fill:rgba(81,85,89,.6);background-color:hsla(0,0%,100%,.6);color:rgba(50,54,58,.6);cursor:default}._Ws-QS.focus-visible,._Ws-QS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;position:relative}._Ws-QS.focus-visible:before,._Ws-QS:focus-visible:before{z-index:1}._mgVUL ._Ws-QS.focus-visible,._mgVUL ._Ws-QS:focus-visible{border-color:transparent}";
|
|
48
|
+
var AccordionStyles = {"accordion":"_ZsFIN","block-variant":"_9hwS9","header":"_Ws-QS","headerIcon":"_pgZve","title":"_5mgAV","panel":"_WsY1B","default-variant":"_4HU2e","disabled":"_9lFhZ","outlined-variant":"_mgVUL","section":"_vdmhP","closed":"_dL8je"};
|
|
49
|
+
var stylesheet$I="._ZsFIN{width:100%;display:flex;flex-direction:column}._ZsFIN._9hwS9{grid-gap:20px;gap:20px}._Ws-QS{display:flex;width:100%;border:none;outline:none;background-color:transparent;color:#32363a;font-size:14px;font-weight:700;line-height:18px;text-align:left;padding:10px 16px 10px 0;cursor:pointer}._Ws-QS ._pgZve{margin-top:-3px}._5mgAV{flex:1}._WsY1B{padding:8px 16px 16px 24px;font-size:14px;line-height:20px}._4HU2e ._Ws-QS{border-radius:4px}._4HU2e ._Ws-QS:hover:not(._9lFhZ){background-color:rgba(50,54,58,.08)}._4HU2e ._Ws-QS:active:not(._9lFhZ){background-color:rgba(50,54,58,.11)}._mgVUL ._Ws-QS{font-weight:400;padding-left:12px;border-top:1px solid #eee}._mgVUL ._Ws-QS:hover:not(._9lFhZ){background-color:rgba(50,54,58,.08)}._mgVUL ._Ws-QS:active:not(._9lFhZ){background-color:rgba(50,54,58,.11)}._9hwS9 ._vdmhP{border-radius:6px;box-shadow:0 3px 4px rgba(0,0,0,.05),0 6px 10px rgba(0,0,0,.05)}._9hwS9 ._vdmhP._dL8je{box-shadow:none}._9hwS9 ._vdmhP._dL8je ._Ws-QS{border-radius:6px}._9hwS9 ._Ws-QS{border:1px solid #e5e5e5;border-radius:6px 6px 0 0;font-weight:400;padding:22px 20px}._9hwS9 ._Ws-QS ._5mgAV{padding-left:20px}._9hwS9 ._Ws-QS:hover:not(disabled){border:1px solid #c2c2c2}._9hwS9 ._Ws-QS:active:not(._9lFhZ){border:1px solid #898989}._9hwS9 ._WsY1B{padding:24px 20px;color:#6a6d70;border:1px solid #e5e5e5;border-top:none;border-radius:0 0 6px 6px}._dL8je ._WsY1B{display:none}._9lFhZ{fill:rgba(81,85,89,.6);background-color:hsla(0,0%,100%,.6);color:rgba(50,54,58,.6);cursor:default}._Ws-QS.focus-visible,._Ws-QS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;position:relative}._Ws-QS.focus-visible:before,._Ws-QS:focus-visible:before{z-index:1}._mgVUL ._Ws-QS.focus-visible,._mgVUL ._Ws-QS:focus-visible{border-color:transparent}";
|
|
50
50
|
icons_index.styleInject(css_248z$I);
|
|
51
51
|
|
|
52
52
|
/**
|
|
@@ -85,6 +85,7 @@ function _filterChildren(children) {
|
|
|
85
85
|
|
|
86
86
|
// Returns ReactChild
|
|
87
87
|
function _findMatch(child, queries, matchesList) {
|
|
88
|
+
var _newChild, _newChild$props;
|
|
88
89
|
let newChild = child;
|
|
89
90
|
let foundMatch = false;
|
|
90
91
|
let i;
|
|
@@ -99,7 +100,7 @@ function _findMatch(child, queries, matchesList) {
|
|
|
99
100
|
break;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
|
-
if (newChild
|
|
103
|
+
if ((_newChild = newChild) !== null && _newChild !== void 0 && (_newChild$props = _newChild.props) !== null && _newChild$props !== void 0 && _newChild$props.children) {
|
|
103
104
|
const modifiedChildren = _filterChildren(newChild.props.children, queries, matchesList);
|
|
104
105
|
newChild = /*#__PURE__*/React__default["default"].cloneElement(newChild, {
|
|
105
106
|
children: modifiedChildren
|
|
@@ -118,14 +119,14 @@ function filterChildren(children, queries) {
|
|
|
118
119
|
return [_filterChildren(children, queries, matchesList), matchesList];
|
|
119
120
|
}
|
|
120
121
|
|
|
121
|
-
var css_248z$H = ".
|
|
122
|
-
var styles$C = {"flyout":"
|
|
123
|
-
var stylesheet$H=".
|
|
122
|
+
var css_248z$H = "._a-PRX{background-color:#fff;border-radius:4px;border:4px solid transparent;border-right:none;border-left:none;box-shadow:0 0 0 1px #eee,0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;max-width:500px;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._ChaVY{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;cursor:pointer;font-size:14px;color:#32363a;word-break:break-word;outline:none}._ChaVY._hdeB3,._ChaVY._xX0vd._ChaVY:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._ChaVY._m7zA6{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._ChaVY._m7zA6._hdeB3,._ChaVY._m7zA6._xX0vd._ChaVY._m7zA6:hover{background-color:#e4effa}._ChaVY:active:not(._m7zA6):not([aria-disabled=true]){background-color:#e8e9e9}._7xZh2 ._BaEad{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;font-size:12px;color:#32363a;font-weight:700;word-break:break-word}._7xZh2 ._YflWk{display:none}._7xZh2:not(:first-child) ._YflWk{display:block;margin:3.5px 0}._CRDd0{width:100%;height:40px}";
|
|
123
|
+
var styles$C = {"flyout":"_a-PRX","flyoutOption":"_ChaVY","highlighted":"_hdeB3","hoverHighlight":"_xX0vd","selected":"_m7zA6","flyoutHeader":"_7xZh2","headerContent":"_BaEad","headerDivider":"_YflWk","flyoutSpinner":"_CRDd0"};
|
|
124
|
+
var stylesheet$H="._a-PRX{background-color:#fff;border-radius:4px;border:4px solid transparent;border-right:none;border-left:none;box-shadow:0 0 0 1px #eee,0 8px 20px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);z-index:1000;max-width:500px;overflow-x:hidden;overflow-y:auto;overflow:hidden auto}._ChaVY{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;cursor:pointer;font-size:14px;color:#32363a;word-break:break-word;outline:none}._ChaVY._hdeB3,._ChaVY._xX0vd._ChaVY:hover{background-color:#efefef;box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._ChaVY._m7zA6{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._ChaVY._m7zA6._hdeB3,._ChaVY._m7zA6._xX0vd._ChaVY._m7zA6:hover{background-color:#e4effa}._ChaVY:active:not(._m7zA6):not([aria-disabled=true]){background-color:#e8e9e9}._7xZh2 ._BaEad{min-height:40px;padding:10px 12px;display:flex;flex-direction:row;align-items:center;font-size:12px;color:#32363a;font-weight:700;word-break:break-word}._7xZh2 ._YflWk{display:none}._7xZh2:not(:first-child) ._YflWk{display:block;margin:3.5px 0}._CRDd0{width:100%;height:40px}";
|
|
124
125
|
icons_index.styleInject(css_248z$H);
|
|
125
126
|
|
|
126
|
-
var css_248z$G = ".
|
|
127
|
-
var styles$B = {"spinnerContainer":"
|
|
128
|
-
var stylesheet$G=".
|
|
127
|
+
var css_248z$G = "._Zzymx{position:relative;display:inline-block}._Zzymx._xEic-{min-height:20px;min-width:20px}._Zzymx._FzKPw{min-height:25px;min-width:25px}._Zzymx._ELwIP{min-height:40px;min-width:40px}._Zzymx._Hn2jc{min-height:64px;min-width:64px}._Zzymx ._QxRR8{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._Zzymx ._QxRR8._pFlgS{visibility:hidden}._Zzymx ._QxRR8 div{position:absolute;transform:rotate(20deg)}._Zzymx ._QxRR8 div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_QxRR8 .8s linear infinite}._Zzymx ._QxRR8 div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._Zzymx ._QxRR8 div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._Zzymx ._QxRR8 div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._Zzymx ._QxRR8 div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._Zzymx ._QxRR8 div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._Zzymx ._QxRR8 div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._Zzymx ._QxRR8 div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._Zzymx ._QxRR8 div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._Zzymx ._QxRR8 div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._Zzymx ._QxRR8 div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._Zzymx ._Hn2jc div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._Zzymx ._xEic- div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._Zzymx ._FzKPw div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._Zzymx ._w-kzJ div div:nth-child(-n+9):after{background:#fff}._Zzymx ._36mld{width:100%;height:100%}._Zzymx ._36mld._ydsUc{pointer-events:none}._Zzymx ._36mld._pFlgS{opacity:0}._Zzymx ._36mld._AjoMP{opacity:.5}@keyframes _QxRR8{0%{opacity:1}to{opacity:0}}";
|
|
128
|
+
var styles$B = {"spinnerContainer":"_Zzymx","xs":"_xEic-","small":"_FzKPw","medium":"_ELwIP","large":"_Hn2jc","spinnerComponent":"_QxRR8","hide":"_pFlgS","inverted":"_w-kzJ","spinnerContent":"_36mld","disablePointerEvents":"_ydsUc","fade":"_AjoMP"};
|
|
129
|
+
var stylesheet$G="._Zzymx{position:relative;display:inline-block}._Zzymx._xEic-{min-height:20px;min-width:20px}._Zzymx._FzKPw{min-height:25px;min-width:25px}._Zzymx._ELwIP{min-height:40px;min-width:40px}._Zzymx._Hn2jc{min-height:64px;min-width:64px}._Zzymx ._QxRR8{display:inline-block;background-color:transparent;position:absolute;z-index:10;width:0;height:0;left:50%;bottom:50%;pointer-events:none}._Zzymx ._QxRR8._pFlgS{visibility:hidden}._Zzymx ._QxRR8 div{position:absolute;transform:rotate(20deg)}._Zzymx ._QxRR8 div div:nth-child(-n+9){background-color:#fff;transform-origin:0 0;animation:_QxRR8 .8s linear infinite}._Zzymx ._QxRR8 div div:nth-child(-n+9):after{content:\" \";display:block;position:absolute;top:5px;left:-1px;width:2px;height:10px;border-radius:20%;background:#000}._Zzymx ._QxRR8 div div:first-child{transform:rotate(20deg);animation-delay:-.8s}._Zzymx ._QxRR8 div div:nth-child(2){transform:rotate(60deg);animation-delay:-.7s}._Zzymx ._QxRR8 div div:nth-child(3){transform:rotate(100deg);animation-delay:-.6s}._Zzymx ._QxRR8 div div:nth-child(4){transform:rotate(140deg);animation-delay:-.5s}._Zzymx ._QxRR8 div div:nth-child(5){transform:rotate(180deg);animation-delay:-.4s}._Zzymx ._QxRR8 div div:nth-child(6){transform:rotate(220deg);animation-delay:-.3s}._Zzymx ._QxRR8 div div:nth-child(7){transform:rotate(260deg);animation-delay:-.2s}._Zzymx ._QxRR8 div div:nth-child(8){transform:rotate(300deg);animation-delay:-.1s}._Zzymx ._QxRR8 div div:nth-child(9){transform:rotate(340deg);animation-delay:0s}._Zzymx ._Hn2jc div div:nth-child(-n+9):after{top:10px;left:-2px;width:4px;height:18px}._Zzymx ._xEic- div div:nth-child(-n+9):after{top:2px;left:-1px;width:1.5px;height:6px}._Zzymx ._FzKPw div div:nth-child(-n+9):after{top:4px;left:-1px;width:2px;height:7px}._Zzymx ._w-kzJ div div:nth-child(-n+9):after{background:#fff}._Zzymx ._36mld{width:100%;height:100%}._Zzymx ._36mld._ydsUc{pointer-events:none}._Zzymx ._36mld._pFlgS{opacity:0}._Zzymx ._36mld._AjoMP{opacity:.5}@keyframes _QxRR8{0%{opacity:1}to{opacity:0}}";
|
|
129
130
|
icons_index.styleInject(css_248z$G);
|
|
130
131
|
|
|
131
132
|
/* DO NOT MODIFY - THIS IS AN AUTO-GENERATED FILE */
|
|
@@ -262,9 +263,8 @@ function containsComponentOrElement(placeholders) {
|
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
/* eslint-disable babel/no-unused-expressions */
|
|
265
|
-
const NO_LOCALIZED_TEXT_FOR_KEY = key =>
|
|
266
|
-
const NO_LOCALIZED_OR_FALLBACK_TEXT_FOR_KEY = key =>
|
|
267
|
-
Please refer to https://designsystem.qualtrics.com/localization for more information about localizing Qualtrics ui-react components`;
|
|
266
|
+
const NO_LOCALIZED_TEXT_FOR_KEY = key => "There is no localized text for KEY: ".concat(key, ". Defaulting to fallback text");
|
|
267
|
+
const NO_LOCALIZED_OR_FALLBACK_TEXT_FOR_KEY = key => "There is no localized or fallback text for KEY: ".concat(key, ". \n Please refer to https://designsystem.qualtrics.com/localization for more information about localizing Qualtrics ui-react components");
|
|
268
268
|
const USETRANSLATION_PLACEHOLDER_CONTAINS_ELEMENT = 'The useTranslation function cannot include React elements as placeholders.';
|
|
269
269
|
const HAS_ERROR_BEEN_LOGGED_FOR_KEY = new Set();
|
|
270
270
|
|
|
@@ -284,7 +284,7 @@ const useTranslation = () => {
|
|
|
284
284
|
* @returns The translated string if found; otherwise `##${translation-key}##`.
|
|
285
285
|
*/
|
|
286
286
|
const translate = React.useCallback((key, placeholders) => {
|
|
287
|
-
const translatedText = localizedText
|
|
287
|
+
const translatedText = localizedText === null || localizedText === void 0 ? void 0 : localizedText[key];
|
|
288
288
|
const fallbackText = fallbackLocalizedText[key];
|
|
289
289
|
if (!translatedText && !HAS_ERROR_BEEN_LOGGED_FOR_KEY.has(key)) {
|
|
290
290
|
HAS_ERROR_BEEN_LOGGED_FOR_KEY.add(key);
|
|
@@ -299,7 +299,7 @@ const useTranslation = () => {
|
|
|
299
299
|
const compiledMessage = insertPlaceholders(text, placeholders);
|
|
300
300
|
return compiledMessage.join('');
|
|
301
301
|
}
|
|
302
|
-
return text ||
|
|
302
|
+
return text || "##".concat(key, "##");
|
|
303
303
|
}, [localizedText]);
|
|
304
304
|
return {
|
|
305
305
|
translate
|
|
@@ -396,7 +396,7 @@ const LoadingSpinner = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
396
396
|
}),
|
|
397
397
|
"data-loadingspinner": show || undefined,
|
|
398
398
|
role: role,
|
|
399
|
-
"aria-label": ariaLabel
|
|
399
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : ariaLabelledby ? undefined : defaultAriaLabel,
|
|
400
400
|
"aria-labelledby": ariaLabelledby,
|
|
401
401
|
"aria-live": ariaLive,
|
|
402
402
|
"aria-hidden": ariaHidden
|
|
@@ -449,7 +449,7 @@ const Flyout = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
449
449
|
let content;
|
|
450
450
|
if (isLoading) {
|
|
451
451
|
content = /*#__PURE__*/React__default["default"].createElement("div", {
|
|
452
|
-
id:
|
|
452
|
+
id: "".concat(id, "-loading-spinner")
|
|
453
453
|
// eslint-disable-next-line jsx-a11y/role-has-required-aria-props
|
|
454
454
|
,
|
|
455
455
|
role: "option" // `aria-selected` is omitted because this option is not selectable
|
|
@@ -530,7 +530,7 @@ const FlyoutOption = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
530
530
|
*/
|
|
531
531
|
function getSubDataTestId(dataTestId, suffix) {
|
|
532
532
|
if (dataTestId) {
|
|
533
|
-
return
|
|
533
|
+
return "".concat(dataTestId, "-").concat(suffix);
|
|
534
534
|
}
|
|
535
535
|
return undefined;
|
|
536
536
|
}
|
|
@@ -554,7 +554,7 @@ function mergeRefs() {
|
|
|
554
554
|
try {
|
|
555
555
|
ref.current = value;
|
|
556
556
|
} catch (error) {
|
|
557
|
-
throw new Error(
|
|
557
|
+
throw new Error("Cannot assign value \"".concat(value, "\" to ref \"").concat(ref, "\": ").concat(error));
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
560
|
});
|
|
@@ -608,12 +608,13 @@ const {
|
|
|
608
608
|
isParentAnchorHidden: false
|
|
609
609
|
});
|
|
610
610
|
|
|
611
|
+
var _process$env;
|
|
611
612
|
function useMockedPopper(_, popperElement, _ref) {
|
|
612
613
|
let {
|
|
613
614
|
onFirstUpdate
|
|
614
615
|
} = _ref;
|
|
615
616
|
React.useEffect(() => {
|
|
616
|
-
onFirstUpdate
|
|
617
|
+
onFirstUpdate === null || onFirstUpdate === void 0 ? void 0 : onFirstUpdate();
|
|
617
618
|
}, [onFirstUpdate, popperElement]);
|
|
618
619
|
return {
|
|
619
620
|
styles: {
|
|
@@ -625,7 +626,7 @@ function useMockedPopper(_, popperElement, _ref) {
|
|
|
625
626
|
}
|
|
626
627
|
};
|
|
627
628
|
}
|
|
628
|
-
const usePopper = typeof process !== 'undefined' && process.env
|
|
629
|
+
const usePopper = typeof process !== 'undefined' && ((_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test' ? useMockedPopper : reactPopper.usePopper;
|
|
629
630
|
function useResizeObserver(_ref2) {
|
|
630
631
|
let {
|
|
631
632
|
element,
|
|
@@ -722,7 +723,7 @@ const Popper = _ref4 => {
|
|
|
722
723
|
onFirstUpdate
|
|
723
724
|
});
|
|
724
725
|
const handleUpdate = React.useCallback(() => {
|
|
725
|
-
update
|
|
726
|
+
update === null || update === void 0 ? void 0 : update();
|
|
726
727
|
}, [update]);
|
|
727
728
|
|
|
728
729
|
// Tell popper.js to update the positioning when the popper element changes size since it only listens for window resizing out of the box.
|
|
@@ -748,7 +749,10 @@ const Popper = _ref4 => {
|
|
|
748
749
|
* If the parent anchor is hidden via CSS opacity, Popper will not consider it to be hidden.
|
|
749
750
|
* To get around this issue, we set `data-popper-reference-hidden` to `true` for all child Popper elements if any ancestor Popper has `data-popper-reference-hidden` set to `true`.
|
|
750
751
|
*/
|
|
751
|
-
const isAnchorHidden = React.useMemo(() =>
|
|
752
|
+
const isAnchorHidden = React.useMemo(() => {
|
|
753
|
+
var _attributes$popper;
|
|
754
|
+
return isParentAnchorHidden || !!(attributes !== null && attributes !== void 0 && (_attributes$popper = attributes.popper) !== null && _attributes$popper !== void 0 && _attributes$popper['data-popper-reference-hidden']);
|
|
755
|
+
}, [isParentAnchorHidden, attributes]);
|
|
752
756
|
const context = React.useMemo(() => ({
|
|
753
757
|
isParentAnchorHidden: isAnchorHidden
|
|
754
758
|
}), [isAnchorHidden]);
|
|
@@ -778,7 +782,7 @@ const Popper = _ref4 => {
|
|
|
778
782
|
}, /*#__PURE__*/React__default["default"].createElement(Portal, {
|
|
779
783
|
portalTarget: portalTarget
|
|
780
784
|
}, open ? isFocusLocked ? /*#__PURE__*/React__default["default"].createElement(ReactFocusLock__default["default"], _extends__default["default"]({}, focusLockProps, {
|
|
781
|
-
disabled: isReady ? focusLockProps
|
|
785
|
+
disabled: isReady ? focusLockProps === null || focusLockProps === void 0 ? void 0 : focusLockProps.disabled : true // Prevents unintended page scroll when popper element is not yet positioned
|
|
782
786
|
}), popperElementWithArrow) : popperElementWithArrow : null)));
|
|
783
787
|
};
|
|
784
788
|
|
|
@@ -814,16 +818,16 @@ function wrapAround(value, min, max) {
|
|
|
814
818
|
*/
|
|
815
819
|
function wrapEvent(theirHandler, ourHandler) {
|
|
816
820
|
return event => {
|
|
817
|
-
theirHandler
|
|
821
|
+
theirHandler === null || theirHandler === void 0 ? void 0 : theirHandler(event);
|
|
818
822
|
if (!event.defaultPrevented) {
|
|
819
|
-
return ourHandler
|
|
823
|
+
return ourHandler === null || ourHandler === void 0 ? void 0 : ourHandler(event);
|
|
820
824
|
}
|
|
821
825
|
};
|
|
822
826
|
}
|
|
823
827
|
|
|
824
|
-
var css_248z$E = ".
|
|
825
|
-
var styles$A = {"tooltip":"
|
|
826
|
-
var stylesheet$E=".
|
|
828
|
+
var css_248z$E = "._-ydim{position:absolute;z-index:2000;max-width:240px;padding:8px 16px;color:#fff;text-align:center;text-decoration:none;background-color:#222;border-radius:4px;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);font-size:14px;opacity:0;pointer-events:none;overflow-wrap:break-word;border:1px solid #898989}._-ydim._Wm8-X{color:#32363a;background-color:#fff}._yulUt{opacity:1;pointer-events:all}._8U5fJ,._8U5fJ>div{position:absolute;width:8px;height:8px;background:inherit}._8U5fJ{visibility:hidden;z-index:2000}._8U5fJ>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._8U5fJ{bottom:-4px}[data-popper-placement^=top]>._8U5fJ>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._8U5fJ{left:-5px}[data-popper-placement^=right]>._8U5fJ>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._8U5fJ{top:-5px}[data-popper-placement^=bottom]>._8U5fJ>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._8U5fJ{right:-4px}[data-popper-placement^=left]>._8U5fJ>div{border-bottom-color:transparent;border-left-color:transparent}._k-mSf{position:absolute}[data-popper-placement^=top]>._k-mSf{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._k-mSf{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._k-mSf{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._k-mSf{top:0;right:-13px;width:17px;height:100%}";
|
|
829
|
+
var styles$A = {"tooltip":"_-ydim","lightTheme":"_Wm8-X","visible":"_yulUt","arrow":"_8U5fJ","offsetBackplate":"_k-mSf"};
|
|
830
|
+
var stylesheet$E="._-ydim{position:absolute;z-index:2000;max-width:240px;padding:8px 16px;color:#fff;text-align:center;text-decoration:none;background-color:#222;border-radius:4px;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);font-size:14px;opacity:0;pointer-events:none;overflow-wrap:break-word;border:1px solid #898989}._-ydim._Wm8-X{color:#32363a;background-color:#fff}._yulUt{opacity:1;pointer-events:all}._8U5fJ,._8U5fJ>div{position:absolute;width:8px;height:8px;background:inherit}._8U5fJ{visibility:hidden;z-index:2000}._8U5fJ>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._8U5fJ{bottom:-4px}[data-popper-placement^=top]>._8U5fJ>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._8U5fJ{left:-5px}[data-popper-placement^=right]>._8U5fJ>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._8U5fJ{top:-5px}[data-popper-placement^=bottom]>._8U5fJ>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._8U5fJ{right:-4px}[data-popper-placement^=left]>._8U5fJ>div{border-bottom-color:transparent;border-left-color:transparent}._k-mSf{position:absolute}[data-popper-placement^=top]>._k-mSf{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._k-mSf{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._k-mSf{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._k-mSf{top:0;right:-13px;width:17px;height:100%}";
|
|
827
831
|
icons_index.styleInject(css_248z$E);
|
|
828
832
|
|
|
829
833
|
const useSSRLayoutEffect = function () {
|
|
@@ -875,7 +879,7 @@ function useEventListener(targetOrRef, event, handler) {
|
|
|
875
879
|
return undefined;
|
|
876
880
|
}
|
|
877
881
|
const target = isEventTarget(targetOrRef) ? targetOrRef : targetOrRef.current;
|
|
878
|
-
if (target
|
|
882
|
+
if (target !== null && target !== void 0 && target.addEventListener && !isDisabled) {
|
|
879
883
|
target.addEventListener(event, listener, isCaptureEvent);
|
|
880
884
|
return () => target.removeEventListener(event, listener, isCaptureEvent);
|
|
881
885
|
}
|
|
@@ -894,10 +898,11 @@ function useClickOutside(refs, onClickOutside) {
|
|
|
894
898
|
const allRefs = React.useMemo(() => Array.isArray(refs) ? refs : [refs], [refs]);
|
|
895
899
|
const handler = event => {
|
|
896
900
|
const isInside = allRefs.some(ref => {
|
|
901
|
+
var _el$contains;
|
|
897
902
|
const {
|
|
898
903
|
current: el
|
|
899
904
|
} = ref;
|
|
900
|
-
return el
|
|
905
|
+
return el === null || el === void 0 ? void 0 : (_el$contains = el.contains) === null || _el$contains === void 0 ? void 0 : _el$contains.call(el, event.target);
|
|
901
906
|
});
|
|
902
907
|
if (!isInside) {
|
|
903
908
|
onClickOutside(event);
|
|
@@ -1001,10 +1006,11 @@ function useControllableState(initialState, onChange, externalState) {
|
|
|
1001
1006
|
replaceState(nextState);
|
|
1002
1007
|
}
|
|
1003
1008
|
if (nextState !== currentState) {
|
|
1009
|
+
var _onChangeRef$current;
|
|
1004
1010
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
1005
1011
|
args[_key - 1] = arguments[_key];
|
|
1006
1012
|
}
|
|
1007
|
-
onChangeRef.current
|
|
1013
|
+
(_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call(onChangeRef, nextState, ...args);
|
|
1008
1014
|
}
|
|
1009
1015
|
}, [onChangeRef, externalStateRef, internalStateRef]);
|
|
1010
1016
|
const actualState = externalState === undefined ? state : externalState;
|
|
@@ -1157,7 +1163,7 @@ function getPreviousIndex(index, numItems) {
|
|
|
1157
1163
|
* @returns If an external ID is passed in, the external ID. Otherwise, a randomly generated ID.
|
|
1158
1164
|
*/
|
|
1159
1165
|
function useId(defaultExternalId) {
|
|
1160
|
-
const [currentId] = React.useState(() => defaultExternalId
|
|
1166
|
+
const [currentId] = React.useState(() => defaultExternalId !== null && defaultExternalId !== void 0 ? defaultExternalId : uuid.v4());
|
|
1161
1167
|
return currentId;
|
|
1162
1168
|
}
|
|
1163
1169
|
|
|
@@ -1213,9 +1219,9 @@ function usePrevious(value) {
|
|
|
1213
1219
|
return ref.current;
|
|
1214
1220
|
}
|
|
1215
1221
|
|
|
1216
|
-
var css_248z$D = ".
|
|
1217
|
-
var classes = {"ariaLiveElement":"
|
|
1218
|
-
var stylesheet$D=".
|
|
1222
|
+
var css_248z$D = "._wDasz{position:absolute;top:-10000px;left:-10000px}";
|
|
1223
|
+
var classes = {"ariaLiveElement":"_wDasz"};
|
|
1224
|
+
var stylesheet$D="._wDasz{position:absolute;top:-10000px;left:-10000px}";
|
|
1219
1225
|
icons_index.styleInject(css_248z$D);
|
|
1220
1226
|
|
|
1221
1227
|
/**
|
|
@@ -1241,16 +1247,18 @@ function useScreenReaderAnnouncement(politeness) {
|
|
|
1241
1247
|
|
|
1242
1248
|
// Sets the politeness of `aria-live`
|
|
1243
1249
|
React.useEffect(() => {
|
|
1244
|
-
|
|
1250
|
+
var _ariaLiveElementRef$c;
|
|
1251
|
+
if (politeness !== undefined) (_ariaLiveElementRef$c = ariaLiveElementRef.current) === null || _ariaLiveElementRef$c === void 0 ? void 0 : _ariaLiveElementRef$c.setAttribute('aria-live', politeness);
|
|
1245
1252
|
}, [politeness]);
|
|
1246
1253
|
|
|
1247
1254
|
// Announces oldest message in the queue
|
|
1248
1255
|
React.useEffect(() => {
|
|
1249
1256
|
if (!isAnnouncingMessage && messageQueue.length > 0) {
|
|
1257
|
+
var _ariaLiveElementRef$c2;
|
|
1250
1258
|
setIsAnnouncingMessage(true);
|
|
1251
1259
|
const oldestMessage = messageQueue[0];
|
|
1252
1260
|
let delay;
|
|
1253
|
-
if (ariaLiveElementRef.current
|
|
1261
|
+
if (((_ariaLiveElementRef$c2 = ariaLiveElementRef.current) === null || _ariaLiveElementRef$c2 === void 0 ? void 0 : _ariaLiveElementRef$c2.textContent) === oldestMessage) {
|
|
1254
1262
|
/*
|
|
1255
1263
|
* If the message to be announced is the same as the previous message, the message needs to be reset.
|
|
1256
1264
|
* The screen reader won't read the change unless the text has changed.
|
|
@@ -1388,7 +1396,7 @@ function subscribe(query, callback) {
|
|
|
1388
1396
|
});
|
|
1389
1397
|
}
|
|
1390
1398
|
const entry = map.get(query);
|
|
1391
|
-
entry
|
|
1399
|
+
entry === null || entry === void 0 ? void 0 : entry.subscribers.add(callback);
|
|
1392
1400
|
return entry ? function unsubscribe() {
|
|
1393
1401
|
entry.subscribers.delete(callback);
|
|
1394
1402
|
if (entry.subscribers.size === 0) {
|
|
@@ -1411,7 +1419,7 @@ function getMediaQueryValue(query) {
|
|
|
1411
1419
|
}
|
|
1412
1420
|
|
|
1413
1421
|
function getMinWidthQuery(length, unit) {
|
|
1414
|
-
return
|
|
1422
|
+
return "(min-width: ".concat(length).concat(unit, ")");
|
|
1415
1423
|
}
|
|
1416
1424
|
function getInitialValues(breakpointsConfig, unit) {
|
|
1417
1425
|
const initialValues = {};
|
|
@@ -1449,6 +1457,7 @@ function useBreakpoints() {
|
|
|
1449
1457
|
}
|
|
1450
1458
|
|
|
1451
1459
|
function useResponsiveValue(values) {
|
|
1460
|
+
var _values$returnKey;
|
|
1452
1461
|
let breakpoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_BREAKPOINTS;
|
|
1453
1462
|
let unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'em';
|
|
1454
1463
|
const matches = useBreakpoints(breakpoints, unit);
|
|
@@ -1458,10 +1467,11 @@ function useResponsiveValue(values) {
|
|
|
1458
1467
|
}
|
|
1459
1468
|
return acc;
|
|
1460
1469
|
}, undefined);
|
|
1461
|
-
return values[returnKey]
|
|
1470
|
+
return (_values$returnKey = values[returnKey]) !== null && _values$returnKey !== void 0 ? _values$returnKey : null;
|
|
1462
1471
|
}
|
|
1463
1472
|
|
|
1464
1473
|
const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
1474
|
+
var _children$ref;
|
|
1465
1475
|
let {
|
|
1466
1476
|
content,
|
|
1467
1477
|
unstable_contentKey: contentKey,
|
|
@@ -1496,10 +1506,14 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
1496
1506
|
const {
|
|
1497
1507
|
isFocusVisible
|
|
1498
1508
|
} = interactions.useFocusVisible();
|
|
1499
|
-
const getIsAnchorKeyboardFocused = () =>
|
|
1509
|
+
const getIsAnchorKeyboardFocused = () => {
|
|
1510
|
+
var _anchorRef$current;
|
|
1511
|
+
return (showOnDescendantFocus ? (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.contains(document.activeElement) : document.activeElement === anchorRef.current) && isFocusVisible;
|
|
1512
|
+
};
|
|
1500
1513
|
const addAriaDescribedByToTrigger = triggeringTarget => {
|
|
1501
1514
|
if (!ariaHidden && triggeringTarget instanceof Element) {
|
|
1502
|
-
|
|
1515
|
+
var _triggeringTarget$get;
|
|
1516
|
+
const describedBy = new Set((_triggeringTarget$get = triggeringTarget.getAttribute('aria-describedby')) === null || _triggeringTarget$get === void 0 ? void 0 : _triggeringTarget$get.split(' '));
|
|
1503
1517
|
describedBy.add(flyoutContainerId);
|
|
1504
1518
|
triggeringTarget.setAttribute('aria-describedby', Array.from(describedBy).join(' '));
|
|
1505
1519
|
setTriggerElements(prev => new Set(prev).add(triggeringTarget));
|
|
@@ -1507,7 +1521,8 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
1507
1521
|
};
|
|
1508
1522
|
const removeAriaDescribedByFromAllTriggers = () => {
|
|
1509
1523
|
triggerElements.forEach(triggeringTarget => {
|
|
1510
|
-
|
|
1524
|
+
var _triggeringTarget$get2;
|
|
1525
|
+
const describedBy = new Set((_triggeringTarget$get2 = triggeringTarget.getAttribute('aria-describedby')) === null || _triggeringTarget$get2 === void 0 ? void 0 : _triggeringTarget$get2.split(' '));
|
|
1511
1526
|
describedBy.delete(flyoutContainerId);
|
|
1512
1527
|
if (describedBy.size > 0) {
|
|
1513
1528
|
triggeringTarget.setAttribute('aria-describedby', Array.from(describedBy).join(' '));
|
|
@@ -1636,7 +1651,7 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
1636
1651
|
open: isInDOM,
|
|
1637
1652
|
placement: placement,
|
|
1638
1653
|
anchor: /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
1639
|
-
ref: mergeRefs(anchorRef, children.ref
|
|
1654
|
+
ref: mergeRefs(anchorRef, (_children$ref = children.ref) !== null && _children$ref !== void 0 ? _children$ref : null)
|
|
1640
1655
|
}),
|
|
1641
1656
|
popper: /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
1642
1657
|
id: flyoutContainerId,
|
|
@@ -1689,6 +1704,7 @@ const Tooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
1689
1704
|
* Displays a tooltip containing the overflowing text if the text does not fit inside the bounds of its container.
|
|
1690
1705
|
*/
|
|
1691
1706
|
const TextOverflowTooltip = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
1707
|
+
var _textParentHTMLElemen;
|
|
1692
1708
|
let {
|
|
1693
1709
|
lightTheme = false,
|
|
1694
1710
|
delayMs = 500,
|
|
@@ -1708,7 +1724,7 @@ const TextOverflowTooltip = /*#__PURE__*/React__default["default"].forwardRef((_
|
|
|
1708
1724
|
]);
|
|
1709
1725
|
|
|
1710
1726
|
return /*#__PURE__*/React__default["default"].createElement(Tooltip, {
|
|
1711
|
-
content: textParentHTMLElementRef.current
|
|
1727
|
+
content: (_textParentHTMLElemen = textParentHTMLElementRef.current) === null || _textParentHTMLElemen === void 0 ? void 0 : _textParentHTMLElemen.textContent,
|
|
1712
1728
|
disabled: !isTextOverflowing,
|
|
1713
1729
|
lightTheme: lightTheme,
|
|
1714
1730
|
delayMs: delayMs,
|
|
@@ -1823,7 +1839,7 @@ const Accordion = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1823
1839
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1824
1840
|
ref: ref,
|
|
1825
1841
|
className: classNames__default["default"](AccordionStyles.accordion, {
|
|
1826
|
-
[AccordionStyles[
|
|
1842
|
+
[AccordionStyles["".concat(variant, "-variant")]]: variant
|
|
1827
1843
|
}),
|
|
1828
1844
|
"data-testid": dataTestId
|
|
1829
1845
|
}, /*#__PURE__*/React__default["default"].createElement(AccordionContextProvider, {
|
|
@@ -1902,17 +1918,17 @@ const AccordionHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1902
1918
|
}, [registerNode, deregisterNode]);
|
|
1903
1919
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1904
1920
|
role: headingLevel ? 'heading' : undefined,
|
|
1905
|
-
"aria-level": headingLevel
|
|
1921
|
+
"aria-level": headingLevel !== null && headingLevel !== void 0 ? headingLevel : undefined,
|
|
1906
1922
|
ref: ref
|
|
1907
1923
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
1908
1924
|
className: classes,
|
|
1909
1925
|
ref: headerRef,
|
|
1910
|
-
id:
|
|
1926
|
+
id: "accordion-header-".concat(sectionId),
|
|
1911
1927
|
onClick: handleClick,
|
|
1912
1928
|
onKeyDown: handleKeyDown,
|
|
1913
1929
|
"aria-expanded": isOpen,
|
|
1914
|
-
"aria-controls":
|
|
1915
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
1930
|
+
"aria-controls": "accordion-panel-".concat(sectionId),
|
|
1931
|
+
"data-testid": getSubDataTestId(dataTestId, "section-".concat(position, "-header")),
|
|
1916
1932
|
type: "button"
|
|
1917
1933
|
}, isOpen ? /*#__PURE__*/React__default["default"].createElement(icons_index.CaretDownIcon, {
|
|
1918
1934
|
"aria-hidden": true,
|
|
@@ -1940,10 +1956,10 @@ const AccordionPanel = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
1940
1956
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1941
1957
|
className: classNames__default["default"](className, AccordionStyles.panel),
|
|
1942
1958
|
ref: ref,
|
|
1943
|
-
id:
|
|
1959
|
+
id: "accordion-panel-".concat(sectionId),
|
|
1944
1960
|
role: "region",
|
|
1945
|
-
"aria-labelledby":
|
|
1946
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
1961
|
+
"aria-labelledby": "accordion-header-".concat(sectionId),
|
|
1962
|
+
"data-testid": getSubDataTestId(dataTestId, "section-".concat(position, "-panel"))
|
|
1947
1963
|
}, children);
|
|
1948
1964
|
});
|
|
1949
1965
|
|
|
@@ -1992,9 +2008,9 @@ function BreakpointSwitch(_ref) {
|
|
|
1992
2008
|
}, useResponsiveValue(childList));
|
|
1993
2009
|
}
|
|
1994
2010
|
|
|
1995
|
-
var css_248z$C = ".
|
|
1996
|
-
var buttonStyles = {"btn":"
|
|
1997
|
-
var stylesheet$C=".
|
|
2011
|
+
var css_248z$C = "._LIzJt{padding:0 16px;font-size:14px;line-height:14px;color:#fff;fill:#fff;background-color:#fff;border:1px solid #fff;border-radius:4px;height:36px;min-height:36px;cursor:pointer;position:relative;display:inline-flex;justify-content:center;align-items:center;text-decoration:none;overflow:hidden;transition:border .2s,background .2s,color .2s}._LIzJt._Dj1-K{padding:0 8px;height:26px;min-height:26px}._LIzJt._TUkxv{display:block;width:100%}._LIzJt._ZZGgm{cursor:not-allowed}._LIzJt:active:focus,._LIzJt:focus{outline:none}._LIzJt._eCG9H{background-color:#fff;border-color:#515559;color:#515559;fill:#515559}._LIzJt._eCG9H:hover:not(._ZZGgm){background-color:#eee}._LIzJt._eCG9H:active:not(._ZZGgm){background-color:#e5e5e5}._LIzJt._eCG9H._ZZGgm{color:rgba(81,85,89,.4);fill:rgba(81,85,89,.4);background-color:hsla(0,0%,100%,.4);border:1px solid rgba(81,85,89,.4)}._LIzJt._fvW0s{background-color:#0b6ed0;border-color:#0b6ed0;color:#fff;fill:#fff}._LIzJt._fvW0s:hover:not(._ZZGgm){background-color:#085caf;border-color:#085caf}._LIzJt._fvW0s:active:not(._ZZGgm){background-color:#0854a1;border-color:#0854a1}._LIzJt._fvW0s._ZZGgm{background-color:rgba(11,110,208,.4);border-color:transparent;fill:hsla(0,0%,100%,.4)}._LIzJt._nM422{background-color:#fff;border-color:#0b6ed0;color:#0b6ed0;fill:#0b6ed0}._LIzJt._nM422:hover:not(._ZZGgm){background-color:#eef5fc}._LIzJt._nM422:active:not(._ZZGgm){background-color:#e1edf9}._LIzJt._nM422._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:rgba(11,110,208,.4);color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._3Tl-J{background-color:#fff;border-color:#fff;color:#0b6ed0;fill:#0b6ed0}._LIzJt._3Tl-J:hover:not(._ZZGgm){background-color:#eef5fc;border-color:#eef5fc}._LIzJt._3Tl-J:active:not(._ZZGgm){background-color:#e1edf9;border-color:#e1edf9}._LIzJt._3Tl-J._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:hsla(0,0%,100%,.4);color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._WWAcG{color:#0b6ed0;fill:#0b6ed0;padding:0}._LIzJt._WWAcG:hover:not(._ZZGgm){color:#085caf}._LIzJt._WWAcG:active:not(._ZZGgm){color:#0854a1}._LIzJt._WWAcG._ZZGgm{color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._DwcyT{background-color:#fff;border-color:#b00;color:#b00;fill:#b00}._LIzJt._DwcyT:hover:not(._ZZGgm){background-color:#ffecec}._LIzJt._DwcyT:active:not(._ZZGgm){background-color:#ffdbdb}._LIzJt._DwcyT._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:rgba(187,0,0,.4);color:rgba(187,0,0,.4);fill:rgba(187,0,0,.4)}._LIzJt.focus-visible,._LIzJt:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
2012
|
+
var buttonStyles = {"btn":"_LIzJt","small":"_Dj1-K","full":"_TUkxv","disabled":"_ZZGgm","default":"_eCG9H","primary":"_fvW0s","secondary":"_nM422","tertiary":"_3Tl-J","link":"_WWAcG","danger":"_DwcyT"};
|
|
2013
|
+
var stylesheet$C="._LIzJt{padding:0 16px;font-size:14px;line-height:14px;color:#fff;fill:#fff;background-color:#fff;border:1px solid #fff;border-radius:4px;height:36px;min-height:36px;cursor:pointer;position:relative;display:inline-flex;justify-content:center;align-items:center;text-decoration:none;overflow:hidden;transition:border .2s,background .2s,color .2s}._LIzJt._Dj1-K{padding:0 8px;height:26px;min-height:26px}._LIzJt._TUkxv{display:block;width:100%}._LIzJt._ZZGgm{cursor:not-allowed}._LIzJt:active:focus,._LIzJt:focus{outline:none}._LIzJt._eCG9H{background-color:#fff;border-color:#515559;color:#515559;fill:#515559}._LIzJt._eCG9H:hover:not(._ZZGgm){background-color:#eee}._LIzJt._eCG9H:active:not(._ZZGgm){background-color:#e5e5e5}._LIzJt._eCG9H._ZZGgm{color:rgba(81,85,89,.4);fill:rgba(81,85,89,.4);background-color:hsla(0,0%,100%,.4);border:1px solid rgba(81,85,89,.4)}._LIzJt._fvW0s{background-color:#0b6ed0;border-color:#0b6ed0;color:#fff;fill:#fff}._LIzJt._fvW0s:hover:not(._ZZGgm){background-color:#085caf;border-color:#085caf}._LIzJt._fvW0s:active:not(._ZZGgm){background-color:#0854a1;border-color:#0854a1}._LIzJt._fvW0s._ZZGgm{background-color:rgba(11,110,208,.4);border-color:transparent;fill:hsla(0,0%,100%,.4)}._LIzJt._nM422{background-color:#fff;border-color:#0b6ed0;color:#0b6ed0;fill:#0b6ed0}._LIzJt._nM422:hover:not(._ZZGgm){background-color:#eef5fc}._LIzJt._nM422:active:not(._ZZGgm){background-color:#e1edf9}._LIzJt._nM422._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:rgba(11,110,208,.4);color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._3Tl-J{background-color:#fff;border-color:#fff;color:#0b6ed0;fill:#0b6ed0}._LIzJt._3Tl-J:hover:not(._ZZGgm){background-color:#eef5fc;border-color:#eef5fc}._LIzJt._3Tl-J:active:not(._ZZGgm){background-color:#e1edf9;border-color:#e1edf9}._LIzJt._3Tl-J._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:hsla(0,0%,100%,.4);color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._WWAcG{color:#0b6ed0;fill:#0b6ed0;padding:0}._LIzJt._WWAcG:hover:not(._ZZGgm){color:#085caf}._LIzJt._WWAcG:active:not(._ZZGgm){color:#0854a1}._LIzJt._WWAcG._ZZGgm{color:rgba(11,110,208,.4);fill:rgba(11,110,208,.4)}._LIzJt._DwcyT{background-color:#fff;border-color:#b00;color:#b00;fill:#b00}._LIzJt._DwcyT:hover:not(._ZZGgm){background-color:#ffecec}._LIzJt._DwcyT:active:not(._ZZGgm){background-color:#ffdbdb}._LIzJt._DwcyT._ZZGgm{background-color:hsla(0,0%,100%,.4);border-color:rgba(187,0,0,.4);color:rgba(187,0,0,.4);fill:rgba(187,0,0,.4)}._LIzJt.focus-visible,._LIzJt:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
1998
2014
|
icons_index.styleInject(css_248z$C);
|
|
1999
2015
|
|
|
2000
2016
|
function createContextValue(value) {
|
|
@@ -2051,14 +2067,14 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
2051
2067
|
// stops form submission for type="submit"
|
|
2052
2068
|
return e.preventDefault();
|
|
2053
2069
|
}
|
|
2054
|
-
onClick
|
|
2070
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
2055
2071
|
};
|
|
2056
2072
|
const keyDownHandler = disabled ? undefined : onKeyDown;
|
|
2057
2073
|
return (
|
|
2058
2074
|
/*#__PURE__*/
|
|
2059
2075
|
/* eslint-disable react/button-has-type */
|
|
2060
2076
|
React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
2061
|
-
"aria-disabled": ariaDisabled
|
|
2077
|
+
"aria-disabled": ariaDisabled !== null && ariaDisabled !== void 0 ? ariaDisabled : disabled,
|
|
2062
2078
|
type: type,
|
|
2063
2079
|
className: classes,
|
|
2064
2080
|
ref: ref,
|
|
@@ -2069,9 +2085,9 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
2069
2085
|
);
|
|
2070
2086
|
});
|
|
2071
2087
|
|
|
2072
|
-
var css_248z$B = ".
|
|
2073
|
-
var styles$z = {"buttonGroup":"
|
|
2074
|
-
var stylesheet$B=".
|
|
2088
|
+
var css_248z$B = "._0FTpb{display:inline-flex;align-items:stretch}._0FTpb._yIQKw{width:100%}._0FTpb ._W8O-m{margin:0;min-width:0}._0FTpb ._W8O-m:focus{z-index:20}._0FTpb ._W8O-m:hover{z-index:10}._0FTpb ._W8O-m._7QE03{border:none}._0FTpb ._W8O-m._yIQKw{display:inline-flex;width:auto;flex-grow:1}._0FTpb ._W8O-m:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._0FTpb ._W8O-m:first-child._7QE03{border-right:1px solid #fff}._0FTpb ._W8O-m:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._0FTpb ._W8O-m:not(:last-child):not(:first-child)._7QE03{border-left:1px solid #fff;border-right:1px solid #fff}._0FTpb ._W8O-m:last-child{margin:0;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._0FTpb ._W8O-m:last-child._7QE03{border-left:1px solid #fff}._0FTpb ._W8O-m:only-child{margin:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}";
|
|
2089
|
+
var styles$z = {"buttonGroup":"_0FTpb","full":"_yIQKw","buttonGroupElement":"_W8O-m","primary":"_7QE03"};
|
|
2090
|
+
var stylesheet$B="._0FTpb{display:inline-flex;align-items:stretch}._0FTpb._yIQKw{width:100%}._0FTpb ._W8O-m{margin:0;min-width:0}._0FTpb ._W8O-m:focus{z-index:20}._0FTpb ._W8O-m:hover{z-index:10}._0FTpb ._W8O-m._7QE03{border:none}._0FTpb ._W8O-m._yIQKw{display:inline-flex;width:auto;flex-grow:1}._0FTpb ._W8O-m:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._0FTpb ._W8O-m:first-child._7QE03{border-right:1px solid #fff}._0FTpb ._W8O-m:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._0FTpb ._W8O-m:not(:last-child):not(:first-child)._7QE03{border-left:1px solid #fff;border-right:1px solid #fff}._0FTpb ._W8O-m:last-child{margin:0;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._0FTpb ._W8O-m:last-child._7QE03{border-left:1px solid #fff}._0FTpb ._W8O-m:only-child{margin:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:4px}";
|
|
2075
2091
|
icons_index.styleInject(css_248z$B);
|
|
2076
2092
|
|
|
2077
2093
|
const ButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -2092,7 +2108,7 @@ const ButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
2092
2108
|
}), React__default["default"].Children.map(children, child => {
|
|
2093
2109
|
if (! /*#__PURE__*/React__default["default"].isValidElement(child)) {
|
|
2094
2110
|
// eslint-disable-next-line no-console
|
|
2095
|
-
console.warn(
|
|
2111
|
+
console.warn("Warning: \"".concat(child, "\" is invalid child of ButtonGroup!"));
|
|
2096
2112
|
return null;
|
|
2097
2113
|
}
|
|
2098
2114
|
const buttonElementClasses = classNames__default["default"](child.props.className, styles$z.buttonGroupElement, {
|
|
@@ -2108,9 +2124,9 @@ const ButtonGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
2108
2124
|
}));
|
|
2109
2125
|
});
|
|
2110
2126
|
|
|
2111
|
-
var css_248z$A = ".
|
|
2112
|
-
var styles$y = {"checkbox":"
|
|
2113
|
-
var stylesheet$A=".
|
|
2127
|
+
var css_248z$A = "._-mtX9{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._-mtX9,._pgnyN{cursor:pointer;height:16px;width:16px}._pgnyN{position:absolute;opacity:0;z-index:10}._pgnyN:checked~._Kfe-T>._vgVqc{fill-opacity:1}._pgnyN:checked:enabled~._Kfe-T{border-color:transparent;background-color:#0b6ed0}._pgnyN:checked:enabled~._Kfe-T>._vgVqc{fill:#fff}._pgnyN:checked:enabled:hover~._Kfe-T{background-color:#085caf}._pgnyN:not(:checked):enabled:hover~._Kfe-T{border-color:#0b6ed0}._pgnyN:disabled{cursor:not-allowed}._pgnyN:disabled~._Kfe-T{opacity:.4}._uxlBq{color:#32363a;display:flex;align-items:center;cursor:pointer}._UeTWT{cursor:auto;color:hsla(0,0%,53.7%,.4)}._qgYd3{margin-right:12px;flex-shrink:0}._Kfe-T{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0}._vgVqc{fill:#0b6ed0;fill-opacity:0}._pgnyN.focus-visible~._Kfe-T,._pgnyN:focus-visible~._Kfe-T{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
2128
|
+
var styles$y = {"checkbox":"_-mtX9","input":"_pgnyN","check":"_Kfe-T","checkIcon":"_vgVqc","label":"_uxlBq","labelDisabled":"_UeTWT","wrappedInput":"_qgYd3"};
|
|
2129
|
+
var stylesheet$A="._-mtX9{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._-mtX9,._pgnyN{cursor:pointer;height:16px;width:16px}._pgnyN{position:absolute;opacity:0;z-index:10}._pgnyN:checked~._Kfe-T>._vgVqc{fill-opacity:1}._pgnyN:checked:enabled~._Kfe-T{border-color:transparent;background-color:#0b6ed0}._pgnyN:checked:enabled~._Kfe-T>._vgVqc{fill:#fff}._pgnyN:checked:enabled:hover~._Kfe-T{background-color:#085caf}._pgnyN:not(:checked):enabled:hover~._Kfe-T{border-color:#0b6ed0}._pgnyN:disabled{cursor:not-allowed}._pgnyN:disabled~._Kfe-T{opacity:.4}._uxlBq{color:#32363a;display:flex;align-items:center;cursor:pointer}._UeTWT{cursor:auto;color:hsla(0,0%,53.7%,.4)}._qgYd3{margin-right:12px;flex-shrink:0}._Kfe-T{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0}._vgVqc{fill:#0b6ed0;fill-opacity:0}._pgnyN.focus-visible~._Kfe-T,._pgnyN:focus-visible~._Kfe-T{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
2114
2130
|
icons_index.styleInject(css_248z$A);
|
|
2115
2131
|
|
|
2116
2132
|
const Check = props => /*#__PURE__*/React__default["default"].createElement("svg", _extends__default["default"]({}, props, {
|
|
@@ -2137,7 +2153,7 @@ const useFormFieldControl = () => {
|
|
|
2137
2153
|
setHasControl
|
|
2138
2154
|
} = context;
|
|
2139
2155
|
React.useEffect(() => {
|
|
2140
|
-
setHasControl
|
|
2156
|
+
setHasControl === null || setHasControl === void 0 ? void 0 : setHasControl(true);
|
|
2141
2157
|
}, [setHasControl]);
|
|
2142
2158
|
return context;
|
|
2143
2159
|
};
|
|
@@ -2147,7 +2163,7 @@ const useFormFieldLabel = () => {
|
|
|
2147
2163
|
setHasLabel
|
|
2148
2164
|
} = context;
|
|
2149
2165
|
React.useEffect(() => {
|
|
2150
|
-
setHasLabel
|
|
2166
|
+
setHasLabel === null || setHasLabel === void 0 ? void 0 : setHasLabel(true);
|
|
2151
2167
|
}, [setHasLabel]);
|
|
2152
2168
|
return context;
|
|
2153
2169
|
};
|
|
@@ -2157,7 +2173,7 @@ const useFormFieldType = type => {
|
|
|
2157
2173
|
setFormFieldType
|
|
2158
2174
|
} = context;
|
|
2159
2175
|
React.useEffect(() => {
|
|
2160
|
-
setFormFieldType
|
|
2176
|
+
setFormFieldType === null || setFormFieldType === void 0 ? void 0 : setFormFieldType(type);
|
|
2161
2177
|
}, [setFormFieldType, type]);
|
|
2162
2178
|
return context;
|
|
2163
2179
|
};
|
|
@@ -2182,22 +2198,22 @@ const Checkbox = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
2182
2198
|
helperTextId: formFieldHelperTextId,
|
|
2183
2199
|
errorTextId: formFieldErrorTextId
|
|
2184
2200
|
} = useFormFieldContext();
|
|
2185
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
2201
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
2186
2202
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends__default["default"]({}, rest, {
|
|
2187
2203
|
ref: ref,
|
|
2188
2204
|
className: classNames__default["default"](className, styles$y.checkbox)
|
|
2189
2205
|
}), /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({}, inputProps, {
|
|
2190
|
-
name: name
|
|
2191
|
-
className: classNames__default["default"](styles$y.input, inputProps
|
|
2206
|
+
name: name !== null && name !== void 0 ? name : inputProps === null || inputProps === void 0 ? void 0 : inputProps.name,
|
|
2207
|
+
className: classNames__default["default"](styles$y.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
2192
2208
|
type: "checkbox",
|
|
2193
|
-
id: id
|
|
2194
|
-
checked: checked
|
|
2195
|
-
defaultChecked: defaultChecked
|
|
2196
|
-
disabled: disabled
|
|
2197
|
-
onChange: disabled ? undefined : onChange
|
|
2198
|
-
value: value
|
|
2199
|
-
"aria-label": externalAriaLabel
|
|
2200
|
-
"aria-labelledby": externalAriaLabelledBy
|
|
2209
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
2210
|
+
checked: checked !== null && checked !== void 0 ? checked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked,
|
|
2211
|
+
defaultChecked: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked,
|
|
2212
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
2213
|
+
onChange: disabled ? undefined : onChange !== null && onChange !== void 0 ? onChange : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange,
|
|
2214
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
2215
|
+
"aria-label": externalAriaLabel !== null && externalAriaLabel !== void 0 ? externalAriaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
2216
|
+
"aria-labelledby": externalAriaLabelledBy !== null && externalAriaLabelledBy !== void 0 ? externalAriaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
2201
2217
|
"aria-describedby": internalAriaDescribedby
|
|
2202
2218
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
2203
2219
|
className: styles$y.check
|
|
@@ -2206,9 +2222,9 @@ const Checkbox = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
2206
2222
|
})));
|
|
2207
2223
|
});
|
|
2208
2224
|
|
|
2209
|
-
var css_248z$z = ".
|
|
2210
|
-
var styles$x = {"label":"
|
|
2211
|
-
var stylesheet$z=".
|
|
2225
|
+
var css_248z$z = "._U0wcH{font-size:14px}._4Jz82{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._CWmh5{color:#0b6ed0}";
|
|
2226
|
+
var styles$x = {"label":"_U0wcH","control":"_4Jz82","focused":"_CWmh5"};
|
|
2227
|
+
var stylesheet$z="._U0wcH{font-size:14px}._4Jz82{color:#6a6d70;line-height:20px;display:inline-flex;flex-direction:column;align-items:flex-start}._CWmh5{color:#0b6ed0}";
|
|
2212
2228
|
icons_index.styleInject(css_248z$z);
|
|
2213
2229
|
|
|
2214
2230
|
const Label = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -2264,9 +2280,9 @@ const CheckboxField = /*#__PURE__*/React__default["default"].forwardRef((_ref, r
|
|
|
2264
2280
|
}), label);
|
|
2265
2281
|
});
|
|
2266
2282
|
|
|
2267
|
-
var css_248z$y = ".
|
|
2268
|
-
var styles$w = {"input":"
|
|
2269
|
-
var stylesheet$y=".
|
|
2283
|
+
var css_248z$y = "._Km-3j{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._Km-3j::-moz-placeholder{color:#515559;opacity:1}._Km-3j::placeholder{color:#515559;opacity:1}._Km-3j:hover{cursor:pointer;background-color:#f5f5f5}._Km-3j:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._Km-3j._VNKpR{border-color:#b00}._Km-3j._VNKpR:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._Km-3j:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._Km-3j:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Km-3j:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Km-3j._ohFfr{height:auto}._Km-3j._ohFfr::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._Km-3j._7YgGR{display:block;width:100%}._Km-3j._uRxtT{padding:4px 8px}input._Km-3j._uRxtT{height:26px;min-height:26px}[type=number]._Km-3j{-moz-appearance:textfield}[type=number]._Km-3j::-webkit-inner-spin-button,[type=number]._Km-3j::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._sOJjs{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._sOJjs:hover{cursor:pointer}._sOJjs._ty-4V{color:#0b6ed0}._OSjBP{margin-top:4px}";
|
|
2284
|
+
var styles$w = {"input":"_Km-3j","invalid":"_VNKpR","multiline":"_ohFfr","full":"_7YgGR","small":"_uRxtT","label":"_sOJjs","focused":"_ty-4V","wrappedInput":"_OSjBP"};
|
|
2285
|
+
var stylesheet$y="._Km-3j{display:inline-block;height:36px;min-height:36px;padding:8px 12px;line-height:20px;font-size:14px;color:#32363a;caret-color:#32363a;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._Km-3j::-moz-placeholder{color:#515559;opacity:1}._Km-3j::placeholder{color:#515559;opacity:1}._Km-3j:hover{cursor:pointer;background-color:#f5f5f5}._Km-3j:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa;cursor:text;outline:none;border-color:transparent}._Km-3j._VNKpR{border-color:#b00}._Km-3j._VNKpR:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._Km-3j:disabled{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._Km-3j:disabled::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Km-3j:disabled::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._Km-3j._ohFfr{height:auto}._Km-3j._ohFfr::-webkit-resizer{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iOCIgaGVpZ2h0PSI4IiBmaWxsPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik03IDF2M2EzIDMgMCAwMS0zIDNIMSIgc3Ryb2tlPSIjOTI5MjkyIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIvPjwvc3ZnPg==);background-size:8px 8px;background-repeat:no-repeat;background-position:50%}._Km-3j._7YgGR{display:block;width:100%}._Km-3j._uRxtT{padding:4px 8px}input._Km-3j._uRxtT{height:26px;min-height:26px}[type=number]._Km-3j{-moz-appearance:textfield}[type=number]._Km-3j::-webkit-inner-spin-button,[type=number]._Km-3j::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._sOJjs{line-height:20px;color:#6a6d70;display:flex;flex-direction:column;align-items:flex-start}._sOJjs:hover{cursor:pointer}._sOJjs._ty-4V{color:#0b6ed0}._OSjBP{margin-top:4px}";
|
|
2270
2286
|
icons_index.styleInject(css_248z$y);
|
|
2271
2287
|
|
|
2272
2288
|
const Input$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -2309,7 +2325,7 @@ const Input$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
2309
2325
|
onChange: disabled ? null : onChange,
|
|
2310
2326
|
value,
|
|
2311
2327
|
'aria-describedby': internalAriaDescribedby,
|
|
2312
|
-
readOnly: readOnly
|
|
2328
|
+
readOnly: readOnly !== null && readOnly !== void 0 ? readOnly : formFieldIsReadOnly
|
|
2313
2329
|
};
|
|
2314
2330
|
return multiline ? /*#__PURE__*/React__default["default"].createElement("textarea", _extends__default["default"]({}, commonProps, {
|
|
2315
2331
|
rows: rows
|
|
@@ -2343,11 +2359,11 @@ const InputField = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
2343
2359
|
useFormFieldType('input');
|
|
2344
2360
|
function handleFocus(e) {
|
|
2345
2361
|
setFocused(true);
|
|
2346
|
-
onFocus
|
|
2362
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
2347
2363
|
}
|
|
2348
2364
|
function handleBlur(e) {
|
|
2349
2365
|
setFocused(false);
|
|
2350
|
-
onBlur
|
|
2366
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
2351
2367
|
}
|
|
2352
2368
|
return /*#__PURE__*/React__default["default"].createElement(Label, _extends__default["default"]({
|
|
2353
2369
|
htmlFor: id,
|
|
@@ -2365,9 +2381,9 @@ const InputField = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
2365
2381
|
}, rest, inputPropsWithoutClass)));
|
|
2366
2382
|
});
|
|
2367
2383
|
|
|
2368
|
-
var css_248z$x = ".
|
|
2369
|
-
var styles$v = {"colorPicker":"
|
|
2370
|
-
var stylesheet$x=".
|
|
2384
|
+
var css_248z$x = "._5xJvG{display:flex;line-height:1.15}._5xJvG ._JZZ7-{display:flex;align-items:center;background-color:#fafafa;border:0;border-radius:4px 0 0 4px;padding:0;cursor:pointer;outline:none}._5xJvG ._JZZ7-:hover:not(._4HdT-){background-color:#f5f5f5}._5xJvG ._JZZ7-._4HdT-{cursor:not-allowed;fill:rgba(81,85,89,.4)}._5xJvG ._JZZ7-:active:not(._4HdT-){background-color:#eee}._5xJvG ._qLcLZ{width:18px;height:36px;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._5xJvG ._qLcLZ._4HdT-{border-color:#d9d9d9}._5xJvG ._fLKaU{position:relative;background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:18px 18px;background-position:0 0,9px 0,9px -9px,0 9px}._5xJvG ._jk-n1{width:18px;height:36px;border:1px solid #898989;border-width:1px 0}._5xJvG ._jk-n1._4HdT-{border-color:#d9d9d9}._5xJvG ._trXy6{height:36px;border:1px solid #898989;border-width:1px 0}._5xJvG ._trXy6._4HdT-{border-color:#d9d9d9}._5xJvG ._HSc3B{border-radius:0 4px 4px 0;width:115px;padding-left:21px}._5xJvG ._aSer0{position:absolute;top:10px;left:13px;font-size:14px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._5xJvG ._aSer0._7wKUv{color:#9d9fa1}._JZZ7-.focus-visible,._JZZ7-:focus-visible{background:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;z-index:10}._mm34r{width:264px;padding:8px;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1);line-height:1.15}._mm34r ._zaQXE{position:relative;width:246px;height:150px;border-radius:4px;border:1px solid rgba(0,0,0,.43);background:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,transparent);background-origin:border-box}._mm34r ._6hWyp{position:absolute;width:12px;height:12px;border-radius:50%;border:1px solid #fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.5);outline:none;cursor:pointer}._mm34r ._H5O6A{display:flex;justify-content:space-between;margin:12px 0}._mm34r ._H5O6A._oCEHP{margin-bottom:0}._mm34r ._D6k1R{display:flex}._mm34r ._O7bRV{width:19px;height:38px;border-radius:2px 0 0 2px;border:1px solid rgba(0,0,0,.43);border-right-width:0}._mm34r ._uQuO5{width:19px;height:38px;border-radius:0 2px 2px 0;border:1px solid rgba(0,0,0,.43);border-left-width:0}._mm34r ._p957A{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:19px 19px;background-position:0 0,9.5px 0,9.5px -9.5px,0 9.5px;border-radius:0 2px 2px 0}._mm34r ._8aPnE{width:202px;height:38px;padding:0 3px;border-radius:1px;border:1px solid rgba(0,0,0,.43);background:linear-gradient(90deg,red,red 2%,#ff0 18%,#0f0 34%,#0ff 50%,#00f 66%,#f0f 82%,red 98%,red)}._mm34r ._8aPnE._Kwu26{height:16px;margin-bottom:6px}._mm34r ._QmZxG{position:relative;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:1px;background-clip:padding-box;width:8px;height:38px;outline:none;cursor:pointer;top:-1px}._mm34r ._QmZxG._Kwu26{height:16px}._mm34r ._4G2hX{position:relative;background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:16px 16px;background-position:0 0,8px 0,8px -8px,0 8px;border-radius:1px}._mm34r ._jBHzH{width:202px;height:16px;padding:0 3px;border-radius:1px;border:1px solid rgba(0,0,0,.43);background-origin:border-box!important}._mm34r ._Zyvbr{position:relative;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:1px;background-clip:padding-box;width:8px;height:16px;outline:none;cursor:pointer;top:-1px}._mm34r ._bLmU6{display:flex;justify-content:space-between}._mm34r ._2lNd0{display:flex;flex-direction:column;align-items:center}._mm34r ._2lNd0._iL1TC{margin-left:4px}._mm34r ._SGUNI{position:absolute;top:3px;left:5px;font-size:14px;line-height:20px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._mm34r ._P1fHK{padding:3px 4px 3px 13px!important;width:78px}._mm34r ._ed80L{text-align:right;padding:3px 4px 3px 0!important;width:34px}._mm34r ._NHIgo{text-align:right;padding:3px 16px 3px 0!important;width:46px}._mm34r ._M-uNp{position:absolute;top:3px;right:4px;font-size:14px;line-height:20px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._mm34r ._8avYA{line-height:22px}._mm34r ._BbQ6O{display:flex}._mm34r ._OHJuR{display:flex;flex-wrap:wrap;margin:9px -3px -3px}._mm34r ._OHJuR._lM7uC{margin-top:0}._mm34r ._h8R1e{width:22px;height:22px;margin:3px;border-radius:4px;border:1px solid rgba(0,0,0,.43);outline:none;cursor:pointer}._KQI12{position:relative}._yy8XZ{display:none}._Y0Kpl{border:0;clip:rect(0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;position:absolute}._6hWyp.focus-visible,._6hWyp:focus-visible{box-shadow:inset 0 0 0 1px rgba(0,0,0,.5),0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fff}._h8R1e.focus-visible,._h8R1e:focus-visible,._QmZxG.focus-visible,._QmZxG:focus-visible,._Zyvbr.focus-visible,._Zyvbr:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
2385
|
+
var styles$v = {"colorPicker":"_5xJvG","colorPickerButton":"_JZZ7-","disabledButton":"_4HdT-","colorPickerButtonPreview":"_qLcLZ","alphaBackground":"_fLKaU","colorPickerButtonAlphaPreview":"_jk-n1","caretIcon":"_trXy6","colorPickerInput":"_HSc3B","colorPickerInputDecoration":"_aSer0","disabledDecoration":"_7wKUv","colorPickerFlyout":"_mm34r","saturationGrid":"_zaQXE","saturationLoop":"_6hWyp","sliderGroup":"_H5O6A","removeBottomMargin":"_oCEHP","sliderPreviewContainer":"_D6k1R","sliderPreview":"_O7bRV","sliderPreviewAlpha":"_uQuO5","sliderPreviewAlphaBackground":"_p957A","hueSliderRail":"_8aPnE","alphaEnabled":"_Kwu26","hueSliderThumb":"_QmZxG","alphaSliderRailBackground":"_4G2hX","alphaSliderRail":"_jBHzH","alphaSliderThumb":"_Zyvbr","hexInputGroup":"_bLmU6","hexInputContainer":"_2lNd0","rgbInputContainer":"_iL1TC","hexInputDecoration":"_SGUNI","hexInput":"_P1fHK","rgbInput":"_ed80L","alphaInput":"_NHIgo","alphaInputDecoration":"_M-uNp","inputLabel":"_8avYA","rgbContainer":"_BbQ6O","palette":"_OHJuR","removeUpperMargin":"_lM7uC","swatch":"_h8R1e","relativePositionContainer":"_KQI12","hidden":"_yy8XZ","hiddenLiveRegion":"_Y0Kpl"};
|
|
2386
|
+
var stylesheet$x="._5xJvG{display:flex;line-height:1.15}._5xJvG ._JZZ7-{display:flex;align-items:center;background-color:#fafafa;border:0;border-radius:4px 0 0 4px;padding:0;cursor:pointer;outline:none}._5xJvG ._JZZ7-:hover:not(._4HdT-){background-color:#f5f5f5}._5xJvG ._JZZ7-._4HdT-{cursor:not-allowed;fill:rgba(81,85,89,.4)}._5xJvG ._JZZ7-:active:not(._4HdT-){background-color:#eee}._5xJvG ._qLcLZ{width:18px;height:36px;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._5xJvG ._qLcLZ._4HdT-{border-color:#d9d9d9}._5xJvG ._fLKaU{position:relative;background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:18px 18px;background-position:0 0,9px 0,9px -9px,0 9px}._5xJvG ._jk-n1{width:18px;height:36px;border:1px solid #898989;border-width:1px 0}._5xJvG ._jk-n1._4HdT-{border-color:#d9d9d9}._5xJvG ._trXy6{height:36px;border:1px solid #898989;border-width:1px 0}._5xJvG ._trXy6._4HdT-{border-color:#d9d9d9}._5xJvG ._HSc3B{border-radius:0 4px 4px 0;width:115px;padding-left:21px}._5xJvG ._aSer0{position:absolute;top:10px;left:13px;font-size:14px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._5xJvG ._aSer0._7wKUv{color:#9d9fa1}._JZZ7-.focus-visible,._JZZ7-:focus-visible{background:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;z-index:10}._mm34r{width:264px;padding:8px;background-color:#fff;border:1px solid #eee;border-radius:4px;box-shadow:0 8px 20px rgba(0,0,0,.1);line-height:1.15}._mm34r ._zaQXE{position:relative;width:246px;height:150px;border-radius:4px;border:1px solid rgba(0,0,0,.43);background:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,transparent);background-origin:border-box}._mm34r ._6hWyp{position:absolute;width:12px;height:12px;border-radius:50%;border:1px solid #fff;box-shadow:inset 0 0 0 1px rgba(0,0,0,.5);outline:none;cursor:pointer}._mm34r ._H5O6A{display:flex;justify-content:space-between;margin:12px 0}._mm34r ._H5O6A._oCEHP{margin-bottom:0}._mm34r ._D6k1R{display:flex}._mm34r ._O7bRV{width:19px;height:38px;border-radius:2px 0 0 2px;border:1px solid rgba(0,0,0,.43);border-right-width:0}._mm34r ._uQuO5{width:19px;height:38px;border-radius:0 2px 2px 0;border:1px solid rgba(0,0,0,.43);border-left-width:0}._mm34r ._p957A{background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:19px 19px;background-position:0 0,9.5px 0,9.5px -9.5px,0 9.5px;border-radius:0 2px 2px 0}._mm34r ._8aPnE{width:202px;height:38px;padding:0 3px;border-radius:1px;border:1px solid rgba(0,0,0,.43);background:linear-gradient(90deg,red,red 2%,#ff0 18%,#0f0 34%,#0ff 50%,#00f 66%,#f0f 82%,red 98%,red)}._mm34r ._8aPnE._Kwu26{height:16px;margin-bottom:6px}._mm34r ._QmZxG{position:relative;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:1px;background-clip:padding-box;width:8px;height:38px;outline:none;cursor:pointer;top:-1px}._mm34r ._QmZxG._Kwu26{height:16px}._mm34r ._4G2hX{position:relative;background-image:linear-gradient(45deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(135deg,rgba(0,0,0,.1) 25%,transparent 0),linear-gradient(45deg,transparent 75%,rgba(0,0,0,.1) 0),linear-gradient(135deg,transparent 75%,rgba(0,0,0,.1) 0);background-color:#fff;background-size:16px 16px;background-position:0 0,8px 0,8px -8px,0 8px;border-radius:1px}._mm34r ._jBHzH{width:202px;height:16px;padding:0 3px;border-radius:1px;border:1px solid rgba(0,0,0,.43);background-origin:border-box!important}._mm34r ._Zyvbr{position:relative;background-color:#fff;border:1px solid rgba(0,0,0,.25);border-radius:1px;background-clip:padding-box;width:8px;height:16px;outline:none;cursor:pointer;top:-1px}._mm34r ._bLmU6{display:flex;justify-content:space-between}._mm34r ._2lNd0{display:flex;flex-direction:column;align-items:center}._mm34r ._2lNd0._iL1TC{margin-left:4px}._mm34r ._SGUNI{position:absolute;top:3px;left:5px;font-size:14px;line-height:20px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._mm34r ._P1fHK{padding:3px 4px 3px 13px!important;width:78px}._mm34r ._ed80L{text-align:right;padding:3px 4px 3px 0!important;width:34px}._mm34r ._NHIgo{text-align:right;padding:3px 16px 3px 0!important;width:46px}._mm34r ._M-uNp{position:absolute;top:3px;right:4px;font-size:14px;line-height:20px;color:#32363a;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}._mm34r ._8avYA{line-height:22px}._mm34r ._BbQ6O{display:flex}._mm34r ._OHJuR{display:flex;flex-wrap:wrap;margin:9px -3px -3px}._mm34r ._OHJuR._lM7uC{margin-top:0}._mm34r ._h8R1e{width:22px;height:22px;margin:3px;border-radius:4px;border:1px solid rgba(0,0,0,.43);outline:none;cursor:pointer}._KQI12{position:relative}._yy8XZ{display:none}._Y0Kpl{border:0;clip:rect(0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;width:1px;position:absolute}._6hWyp.focus-visible,._6hWyp:focus-visible{box-shadow:inset 0 0 0 1px rgba(0,0,0,.5),0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fff}._h8R1e.focus-visible,._h8R1e:focus-visible,._QmZxG.focus-visible,._QmZxG:focus-visible,._Zyvbr.focus-visible,._Zyvbr:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
2371
2387
|
icons_index.styleInject(css_248z$x);
|
|
2372
2388
|
|
|
2373
2389
|
function getMousePosition(e, containerRef) {
|
|
@@ -2401,9 +2417,10 @@ function hexToRgb(hex) {
|
|
|
2401
2417
|
}
|
|
2402
2418
|
|
|
2403
2419
|
function hexToRgbaString(color) {
|
|
2420
|
+
var _color$alpha;
|
|
2404
2421
|
const rgb = hexToRgb(color.hex);
|
|
2405
|
-
const alpha = color.alpha
|
|
2406
|
-
return
|
|
2422
|
+
const alpha = (_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100;
|
|
2423
|
+
return "rgba(".concat(rgb.r, ", ").concat(rgb.g, ", ").concat(rgb.b, ", ").concat(alpha / 100, ")");
|
|
2407
2424
|
}
|
|
2408
2425
|
|
|
2409
2426
|
function rgbToHex(_ref) {
|
|
@@ -2415,7 +2432,7 @@ function rgbToHex(_ref) {
|
|
|
2415
2432
|
const rStr = r.toString(16).padStart(2, '0');
|
|
2416
2433
|
const gStr = g.toString(16).padStart(2, '0');
|
|
2417
2434
|
const bStr = b.toString(16).padStart(2, '0');
|
|
2418
|
-
return
|
|
2435
|
+
return "#".concat(rStr).concat(gStr).concat(bStr);
|
|
2419
2436
|
}
|
|
2420
2437
|
|
|
2421
2438
|
// formula from https://www.rapidtables.com/convert/color/hsv-to-rgb.html
|
|
@@ -2557,41 +2574,42 @@ function calculateTargetId(focusedId, paletteLength, direction) {
|
|
|
2557
2574
|
}
|
|
2558
2575
|
|
|
2559
2576
|
function validateHex(currentColor, newHex, isAlphaEnabled) {
|
|
2577
|
+
var _currentColor$alpha;
|
|
2560
2578
|
// set current alpha to hex format
|
|
2561
|
-
const alpha = Math.round((currentColor.alpha
|
|
2579
|
+
const alpha = Math.round(((_currentColor$alpha = currentColor.alpha) !== null && _currentColor$alpha !== void 0 ? _currentColor$alpha : 100) / 100 * 255).toString(16).toUpperCase().padStart(2, '0');
|
|
2562
2580
|
let newAlpha = isAlphaEnabled ? alpha : '';
|
|
2563
2581
|
let validatedHex;
|
|
2564
2582
|
const hexLength = isAlphaEnabled ? 8 : 6;
|
|
2565
2583
|
const hexRegex = /^[a-fA-F0-9]+$/;
|
|
2566
2584
|
|
|
2567
2585
|
// if newHex contains invalid characters or is empty string, revert to previous color
|
|
2568
|
-
if (!hexRegex.test(newHex.slice(0, hexLength))) return
|
|
2586
|
+
if (!hexRegex.test(newHex.slice(0, hexLength))) return "".concat(currentColor.hex.substring(1)).concat(newAlpha);
|
|
2569
2587
|
|
|
2570
2588
|
// match validation pattern based on string length
|
|
2571
2589
|
switch (newHex.length) {
|
|
2572
2590
|
case 1:
|
|
2573
|
-
validatedHex =
|
|
2591
|
+
validatedHex = "".concat(newHex.repeat(6)).concat(newAlpha);
|
|
2574
2592
|
break;
|
|
2575
2593
|
case 2:
|
|
2576
|
-
validatedHex =
|
|
2594
|
+
validatedHex = "".concat(newHex.repeat(3)).concat(newAlpha);
|
|
2577
2595
|
break;
|
|
2578
2596
|
case 3:
|
|
2579
|
-
validatedHex =
|
|
2597
|
+
validatedHex = "".concat(newHex[0].repeat(2)).concat(newHex[1].repeat(2)).concat(newHex[2].repeat(2)).concat(newAlpha);
|
|
2580
2598
|
break;
|
|
2581
2599
|
case 4:
|
|
2582
2600
|
case 5:
|
|
2583
2601
|
newAlpha = isAlphaEnabled ? newHex[3].repeat(2) : '';
|
|
2584
|
-
validatedHex =
|
|
2602
|
+
validatedHex = "".concat(newHex[0].repeat(2)).concat(newHex[1].repeat(2)).concat(newHex[2].repeat(2)).concat(newAlpha);
|
|
2585
2603
|
break;
|
|
2586
2604
|
case 6:
|
|
2587
|
-
validatedHex =
|
|
2605
|
+
validatedHex = "".concat(newHex).concat(newAlpha);
|
|
2588
2606
|
break;
|
|
2589
2607
|
case 7:
|
|
2590
|
-
validatedHex =
|
|
2608
|
+
validatedHex = "".concat(newHex.substring(0, 6)).concat(newAlpha);
|
|
2591
2609
|
break;
|
|
2592
2610
|
default:
|
|
2593
2611
|
newAlpha = isAlphaEnabled ? newHex.substring(6, 8) : '';
|
|
2594
|
-
validatedHex =
|
|
2612
|
+
validatedHex = "".concat(newHex.substring(0, 6)).concat(newAlpha);
|
|
2595
2613
|
break;
|
|
2596
2614
|
}
|
|
2597
2615
|
return validatedHex.toUpperCase();
|
|
@@ -2663,7 +2681,7 @@ function Saturation$1(_ref) {
|
|
|
2663
2681
|
} = _ref;
|
|
2664
2682
|
const gridRef = React.useRef(null);
|
|
2665
2683
|
const loopRef = React.useRef(null);
|
|
2666
|
-
const saturationId =
|
|
2684
|
+
const saturationId = "".concat(containerId, "-saturation");
|
|
2667
2685
|
const {
|
|
2668
2686
|
translate
|
|
2669
2687
|
} = useTranslation();
|
|
@@ -2728,22 +2746,23 @@ function Saturation$1(_ref) {
|
|
|
2728
2746
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2729
2747
|
className: styles$v.saturationGrid,
|
|
2730
2748
|
style: {
|
|
2731
|
-
backgroundColor:
|
|
2749
|
+
backgroundColor: "".concat(hsvToHex({
|
|
2732
2750
|
h: hsv.h,
|
|
2733
2751
|
s: 1,
|
|
2734
2752
|
v: 1
|
|
2735
|
-
})
|
|
2753
|
+
}))
|
|
2736
2754
|
},
|
|
2737
2755
|
onMouseDown: e => {
|
|
2756
|
+
var _loopRef$current;
|
|
2738
2757
|
// prevent text highlighting while dragging
|
|
2739
2758
|
e.preventDefault();
|
|
2740
|
-
loopRef.current
|
|
2759
|
+
(_loopRef$current = loopRef.current) === null || _loopRef$current === void 0 ? void 0 : _loopRef$current.focus();
|
|
2741
2760
|
handleMouseDown(e);
|
|
2742
2761
|
},
|
|
2743
2762
|
"data-testid": getSubDataTestId(dataTestId, 'saturation-grid'),
|
|
2744
2763
|
ref: gridRef
|
|
2745
2764
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2746
|
-
id:
|
|
2765
|
+
id: "".concat(saturationId, "-saturation-desc"),
|
|
2747
2766
|
className: styles$v.hidden
|
|
2748
2767
|
}, saturationAriaDesc), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2749
2768
|
"aria-live": loopRef.current === document.activeElement ? 'assertive' : 'off',
|
|
@@ -2754,13 +2773,13 @@ function Saturation$1(_ref) {
|
|
|
2754
2773
|
}, valueAriaLive), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2755
2774
|
className: styles$v.saturationLoop,
|
|
2756
2775
|
style: {
|
|
2757
|
-
left:
|
|
2758
|
-
bottom:
|
|
2776
|
+
left: "calc(".concat(hsv.s * 100, "% - ").concat(hsv.s * 12, "px)"),
|
|
2777
|
+
bottom: "calc(".concat(hsv.v * 100, "% - ").concat(hsv.v * 12, "px)")
|
|
2759
2778
|
},
|
|
2760
2779
|
onKeyDown: handleKeyDown,
|
|
2761
2780
|
tabIndex: 0,
|
|
2762
2781
|
"aria-label": saturationAriaLabel,
|
|
2763
|
-
"aria-describedby":
|
|
2782
|
+
"aria-describedby": "".concat(saturationId, "-saturation-desc"),
|
|
2764
2783
|
ref: loopRef,
|
|
2765
2784
|
"data-testid": getSubDataTestId(dataTestId, 'saturation-thumb')
|
|
2766
2785
|
}));
|
|
@@ -2830,9 +2849,10 @@ function Hue$1(_ref) {
|
|
|
2830
2849
|
[styles$v.alphaEnabled]: isAlphaEnabled
|
|
2831
2850
|
}),
|
|
2832
2851
|
onMouseDown: e => {
|
|
2852
|
+
var _thumbRef$current;
|
|
2833
2853
|
// prevent text highlighting while dragging
|
|
2834
2854
|
e.preventDefault();
|
|
2835
|
-
thumbRef.current
|
|
2855
|
+
(_thumbRef$current = thumbRef.current) === null || _thumbRef$current === void 0 ? void 0 : _thumbRef$current.focus();
|
|
2836
2856
|
handleMouseDown(e);
|
|
2837
2857
|
},
|
|
2838
2858
|
"data-testid": getSubDataTestId(dataTestId, 'hue-rail'),
|
|
@@ -2843,7 +2863,7 @@ function Hue$1(_ref) {
|
|
|
2843
2863
|
[styles$v.alphaEnabled]: isAlphaEnabled
|
|
2844
2864
|
}),
|
|
2845
2865
|
style: {
|
|
2846
|
-
left:
|
|
2866
|
+
left: "calc(".concat(hue / 359 * 100, "% - 4px)")
|
|
2847
2867
|
},
|
|
2848
2868
|
onKeyDown: handleKeyDown,
|
|
2849
2869
|
"aria-label": hueAriaLabel,
|
|
@@ -2859,6 +2879,7 @@ function Hue$1(_ref) {
|
|
|
2859
2879
|
|
|
2860
2880
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
2861
2881
|
function Alpha$1(_ref) {
|
|
2882
|
+
var _color$alpha5, _color$alpha6, _color$alpha7;
|
|
2862
2883
|
let {
|
|
2863
2884
|
color,
|
|
2864
2885
|
onAlphaChange,
|
|
@@ -2883,16 +2904,17 @@ function Alpha$1(_ref) {
|
|
|
2883
2904
|
});
|
|
2884
2905
|
const handleMouseDown = useMouseDrag$1(handleChange);
|
|
2885
2906
|
function handleKeyDown(e) {
|
|
2907
|
+
var _color$alpha, _color$alpha2, _color$alpha3, _color$alpha4;
|
|
2886
2908
|
switch (e.key) {
|
|
2887
2909
|
case 'ArrowDown':
|
|
2888
2910
|
case 'ArrowLeft':
|
|
2889
2911
|
e.preventDefault(); // prevent page scroll
|
|
2890
|
-
onAlphaChange(Math.min((color.alpha
|
|
2912
|
+
onAlphaChange(Math.min(((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : MAX_ALPHA) + 1, MAX_ALPHA));
|
|
2891
2913
|
break;
|
|
2892
2914
|
case 'ArrowUp':
|
|
2893
2915
|
case 'ArrowRight':
|
|
2894
2916
|
e.preventDefault(); // prevent page scroll
|
|
2895
|
-
onAlphaChange(Math.max((color.alpha
|
|
2917
|
+
onAlphaChange(Math.max(((_color$alpha2 = color.alpha) !== null && _color$alpha2 !== void 0 ? _color$alpha2 : MAX_ALPHA) - 1, MIN_ALPHA));
|
|
2896
2918
|
break;
|
|
2897
2919
|
case 'End':
|
|
2898
2920
|
e.preventDefault(); // prevent page scroll
|
|
@@ -2904,11 +2926,11 @@ function Alpha$1(_ref) {
|
|
|
2904
2926
|
break;
|
|
2905
2927
|
case 'PageDown':
|
|
2906
2928
|
e.preventDefault(); // prevent page scroll
|
|
2907
|
-
onAlphaChange(Math.min((color.alpha
|
|
2929
|
+
onAlphaChange(Math.min(((_color$alpha3 = color.alpha) !== null && _color$alpha3 !== void 0 ? _color$alpha3 : MAX_ALPHA) + 10, MAX_ALPHA));
|
|
2908
2930
|
break;
|
|
2909
2931
|
case 'PageUp':
|
|
2910
2932
|
e.preventDefault(); // prevent page scroll
|
|
2911
|
-
onAlphaChange(Math.max((color.alpha
|
|
2933
|
+
onAlphaChange(Math.max(((_color$alpha4 = color.alpha) !== null && _color$alpha4 !== void 0 ? _color$alpha4 : MAX_ALPHA) - 10, MIN_ALPHA));
|
|
2912
2934
|
break;
|
|
2913
2935
|
default:
|
|
2914
2936
|
break;
|
|
@@ -2919,12 +2941,13 @@ function Alpha$1(_ref) {
|
|
|
2919
2941
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2920
2942
|
className: styles$v.alphaSliderRail,
|
|
2921
2943
|
style: {
|
|
2922
|
-
background:
|
|
2944
|
+
background: "linear-gradient(90deg, ".concat(color.hex, ", transparent)")
|
|
2923
2945
|
},
|
|
2924
2946
|
onMouseDown: e => {
|
|
2947
|
+
var _thumbRef$current;
|
|
2925
2948
|
// prevent text highlighting while dragging
|
|
2926
2949
|
e.preventDefault();
|
|
2927
|
-
thumbRef.current
|
|
2950
|
+
(_thumbRef$current = thumbRef.current) === null || _thumbRef$current === void 0 ? void 0 : _thumbRef$current.focus();
|
|
2928
2951
|
handleMouseDown(e);
|
|
2929
2952
|
},
|
|
2930
2953
|
"data-testid": getSubDataTestId(dataTestId, 'alpha-rail'),
|
|
@@ -2933,14 +2956,14 @@ function Alpha$1(_ref) {
|
|
|
2933
2956
|
role: "slider",
|
|
2934
2957
|
className: styles$v.alphaSliderThumb,
|
|
2935
2958
|
style: {
|
|
2936
|
-
left:
|
|
2959
|
+
left: "calc(".concat(MAX_ALPHA - ((_color$alpha5 = color.alpha) !== null && _color$alpha5 !== void 0 ? _color$alpha5 : MAX_ALPHA), "% - 4px)")
|
|
2937
2960
|
},
|
|
2938
2961
|
onKeyDown: handleKeyDown,
|
|
2939
2962
|
"aria-label": alphaAriaLabel,
|
|
2940
2963
|
"aria-valuemin": MIN_ALPHA,
|
|
2941
2964
|
"aria-valuemax": MAX_ALPHA,
|
|
2942
|
-
"aria-valuenow": color.alpha
|
|
2943
|
-
"aria-valuetext":
|
|
2965
|
+
"aria-valuenow": (_color$alpha6 = color.alpha) !== null && _color$alpha6 !== void 0 ? _color$alpha6 : MAX_ALPHA,
|
|
2966
|
+
"aria-valuetext": "".concat((_color$alpha7 = color.alpha) !== null && _color$alpha7 !== void 0 ? _color$alpha7 : MAX_ALPHA, "%"),
|
|
2944
2967
|
tabIndex: 0,
|
|
2945
2968
|
ref: thumbRef,
|
|
2946
2969
|
"data-testid": getSubDataTestId(dataTestId, 'alpha-thumb')
|
|
@@ -2948,6 +2971,7 @@ function Alpha$1(_ref) {
|
|
|
2948
2971
|
}
|
|
2949
2972
|
|
|
2950
2973
|
const Swatch$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
2974
|
+
var _color$name;
|
|
2951
2975
|
let {
|
|
2952
2976
|
color,
|
|
2953
2977
|
onColorSwatchClick,
|
|
@@ -2967,14 +2991,14 @@ const Swatch$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
2967
2991
|
type: "button",
|
|
2968
2992
|
className: styles$v.swatch,
|
|
2969
2993
|
style: {
|
|
2970
|
-
backgroundColor:
|
|
2994
|
+
backgroundColor: "".concat(color.hex)
|
|
2971
2995
|
},
|
|
2972
2996
|
onClick: handleClick,
|
|
2973
2997
|
tabIndex: cellIndex === focusedSwatchIndex ? 0 : -1,
|
|
2974
|
-
"aria-label":
|
|
2998
|
+
"aria-label": "".concat((_color$name = color.name) !== null && _color$name !== void 0 ? _color$name : '', " ").concat(color.hex),
|
|
2975
2999
|
"aria-describedby": ariaDescribedBy,
|
|
2976
3000
|
ref: ref,
|
|
2977
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
3001
|
+
"data-testid": getSubDataTestId(dataTestId, "".concat(color.hex.substring(1), "-swatch"))
|
|
2978
3002
|
}));
|
|
2979
3003
|
});
|
|
2980
3004
|
function Palette(_ref2) {
|
|
@@ -2991,7 +3015,7 @@ function Palette(_ref2) {
|
|
|
2991
3015
|
} = useTranslation();
|
|
2992
3016
|
const paletteAriaLabel = translate('palette');
|
|
2993
3017
|
const swatchAriaDesc = translate('selectColor');
|
|
2994
|
-
const swatchDescriptionId =
|
|
3018
|
+
const swatchDescriptionId = "".concat(containerId, "-swatch-desc");
|
|
2995
3019
|
const swatchRefs = React.useRef({});
|
|
2996
3020
|
|
|
2997
3021
|
// split palette into rows for grid aria role semantics
|
|
@@ -3007,8 +3031,9 @@ function Palette(_ref2) {
|
|
|
3007
3031
|
function updateFocusedSwatchIndex(e, direction) {
|
|
3008
3032
|
e.preventDefault(); // prevents scroll
|
|
3009
3033
|
setFocusedSwatchIndex(prevFocusedSwatchIndex => {
|
|
3034
|
+
var _swatchRefs$current, _swatchRefs$current$t;
|
|
3010
3035
|
const targetId = calculateTargetId(prevFocusedSwatchIndex, palette.length, direction);
|
|
3011
|
-
swatchRefs.current
|
|
3036
|
+
(_swatchRefs$current = swatchRefs.current) === null || _swatchRefs$current === void 0 ? void 0 : (_swatchRefs$current$t = _swatchRefs$current[targetId]) === null || _swatchRefs$current$t === void 0 ? void 0 : _swatchRefs$current$t.focus();
|
|
3012
3037
|
return targetId;
|
|
3013
3038
|
});
|
|
3014
3039
|
}
|
|
@@ -3080,7 +3105,7 @@ function RGBInput(_ref) {
|
|
|
3080
3105
|
containerId,
|
|
3081
3106
|
dataTestId
|
|
3082
3107
|
} = _ref;
|
|
3083
|
-
const inputId =
|
|
3108
|
+
const inputId = "".concat(containerId, "-").concat(label, "-input");
|
|
3084
3109
|
const [internalValue, setInternalValue] = React.useState(externalValue);
|
|
3085
3110
|
React.useEffect(() => {
|
|
3086
3111
|
setInternalValue(externalValue);
|
|
@@ -3098,13 +3123,14 @@ function RGBInput(_ref) {
|
|
|
3098
3123
|
onChange: e => setInternalValue(parseInt(e.target.value, 10) || 0),
|
|
3099
3124
|
onBlur: onBlur,
|
|
3100
3125
|
"aria-label": ariaLabel,
|
|
3101
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
3126
|
+
"data-testid": getSubDataTestId(dataTestId, "".concat(label, "-channel"))
|
|
3102
3127
|
}), /*#__PURE__*/React__default["default"].createElement(Label, {
|
|
3103
3128
|
htmlFor: inputId,
|
|
3104
3129
|
className: styles$v.inputLabel
|
|
3105
3130
|
}, label));
|
|
3106
3131
|
}
|
|
3107
3132
|
const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
3133
|
+
var _color$alpha;
|
|
3108
3134
|
let {
|
|
3109
3135
|
color,
|
|
3110
3136
|
onHexBlur,
|
|
@@ -3113,8 +3139,8 @@ const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
|
3113
3139
|
containerId,
|
|
3114
3140
|
dataTestId
|
|
3115
3141
|
} = _ref2;
|
|
3116
|
-
const hexInputId =
|
|
3117
|
-
const alphaInputId =
|
|
3142
|
+
const hexInputId = "".concat(containerId, "-hex-input");
|
|
3143
|
+
const alphaInputId = "".concat(containerId, "-alpha-input");
|
|
3118
3144
|
const {
|
|
3119
3145
|
translate
|
|
3120
3146
|
} = useTranslation();
|
|
@@ -3138,9 +3164,10 @@ const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
|
3138
3164
|
onHexBlur(validatedHex);
|
|
3139
3165
|
setInternalHex(validatedHex);
|
|
3140
3166
|
}
|
|
3141
|
-
const [internalAlpha, setInternalAlpha] = React.useState(color.alpha
|
|
3167
|
+
const [internalAlpha, setInternalAlpha] = React.useState((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100);
|
|
3142
3168
|
React.useEffect(() => {
|
|
3143
|
-
|
|
3169
|
+
var _color$alpha2;
|
|
3170
|
+
setInternalAlpha((_color$alpha2 = color.alpha) !== null && _color$alpha2 !== void 0 ? _color$alpha2 : 100);
|
|
3144
3171
|
}, [color.alpha, isAlphaEnabled]);
|
|
3145
3172
|
function handleAlphaBlur(e) {
|
|
3146
3173
|
const newAlpha = Math.min(Math.max(parseInt(e.target.value, 10) || 0, 0), 100);
|
|
@@ -3340,6 +3367,7 @@ const ColorPickerFlyout = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3340
3367
|
});
|
|
3341
3368
|
|
|
3342
3369
|
function ColorPicker$1(_ref) {
|
|
3370
|
+
var _color$name;
|
|
3343
3371
|
let {
|
|
3344
3372
|
color: externalColor,
|
|
3345
3373
|
onChange,
|
|
@@ -3358,16 +3386,17 @@ function ColorPicker$1(_ref) {
|
|
|
3358
3386
|
'data-testid': dataTestId
|
|
3359
3387
|
} = _ref;
|
|
3360
3388
|
const containerId = useId(id);
|
|
3361
|
-
const flyoutId =
|
|
3389
|
+
const flyoutId = "".concat(containerId, "-flyout");
|
|
3362
3390
|
const [color, setColor] = useControllableState(externalColor, onChange, externalColor);
|
|
3363
3391
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
3364
3392
|
const [hsv, setHsv] = React.useState(hexToHsv(color.hex));
|
|
3365
3393
|
const [inputHex, setInputHex] = React.useState(color.hex);
|
|
3366
3394
|
const [triggerHexUpdate, setTriggerHexUpdate] = React.useState(0);
|
|
3367
3395
|
React.useEffect(() => {
|
|
3368
|
-
|
|
3396
|
+
var _color$alpha;
|
|
3397
|
+
const alpha = isAlphaEnabled ? Math.round(((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100) / 100 * 255).toString(16).padStart(2, '0') : '';
|
|
3369
3398
|
const hex = color.hex.substring(1);
|
|
3370
|
-
setInputHex(
|
|
3399
|
+
setInputHex("".concat(hex).concat(alpha));
|
|
3371
3400
|
}, [color, isAlphaEnabled]);
|
|
3372
3401
|
const anchorRef = React.useRef(null);
|
|
3373
3402
|
const popperRef = React.useRef(null);
|
|
@@ -3376,7 +3405,7 @@ function ColorPicker$1(_ref) {
|
|
|
3376
3405
|
translate
|
|
3377
3406
|
} = useTranslation();
|
|
3378
3407
|
const anchorAriaDescription = translate('colorPickerAnchorDesc', {
|
|
3379
|
-
colorName: color.name
|
|
3408
|
+
colorName: (_color$name = color.name) !== null && _color$name !== void 0 ? _color$name : '',
|
|
3380
3409
|
colorHex: color.hex
|
|
3381
3410
|
});
|
|
3382
3411
|
const inputAriaLabel = translate('hex');
|
|
@@ -3434,7 +3463,7 @@ function ColorPicker$1(_ref) {
|
|
|
3434
3463
|
name,
|
|
3435
3464
|
...rest
|
|
3436
3465
|
} = _ref3;
|
|
3437
|
-
const hex =
|
|
3466
|
+
const hex = "#".concat(validatedHex.substring(0, 6));
|
|
3438
3467
|
if (isAlphaEnabled) {
|
|
3439
3468
|
const alpha = Math.round(parseInt(validatedHex.substring(6, 8), 16) / 255 * 100);
|
|
3440
3469
|
return {
|
|
@@ -3457,7 +3486,7 @@ function ColorPicker$1(_ref) {
|
|
|
3457
3486
|
} = _ref4;
|
|
3458
3487
|
const newColor = {
|
|
3459
3488
|
...rest,
|
|
3460
|
-
hex:
|
|
3489
|
+
hex: "#".concat(hex)
|
|
3461
3490
|
};
|
|
3462
3491
|
return newColor;
|
|
3463
3492
|
});
|
|
@@ -3560,11 +3589,11 @@ function ColorPicker$1(_ref) {
|
|
|
3560
3589
|
onClick: handleAnchorClick,
|
|
3561
3590
|
"aria-label": ariaLabel,
|
|
3562
3591
|
"aria-labelledby": ariaLabelledBy,
|
|
3563
|
-
"aria-describedby":
|
|
3592
|
+
"aria-describedby": "".concat(anchorAriaDescription, " ").concat(ariaDescribedBy),
|
|
3564
3593
|
"aria-expanded": isOpen,
|
|
3565
3594
|
"aria-controls": isOpen ? flyoutId : undefined,
|
|
3566
3595
|
"aria-haspopup": "dialog",
|
|
3567
|
-
ref: mergeRefs(anchorRef, externalButtonRef
|
|
3596
|
+
ref: mergeRefs(anchorRef, externalButtonRef !== null && externalButtonRef !== void 0 ? externalButtonRef : null),
|
|
3568
3597
|
"data-testid": getSubDataTestId(dataTestId, 'anchor-button')
|
|
3569
3598
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
3570
3599
|
className: classNames__default["default"](styles$v.colorPickerButtonPreview, {
|
|
@@ -3613,9 +3642,9 @@ function ColorPicker$1(_ref) {
|
|
|
3613
3642
|
})));
|
|
3614
3643
|
}
|
|
3615
3644
|
|
|
3616
|
-
var css_248z$w = ".
|
|
3617
|
-
var styles$u = {"combobox":"
|
|
3618
|
-
var stylesheet$w=".
|
|
3645
|
+
var css_248z$w = "._qt655{position:relative;display:inline-block}._6yCG2{padding-right:36px}._6yCG2._-yWRC{box-shadow:none!important;border:1px solid #898989!important}._A8C-V{margin-top:4px}._2sk--{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._2sk--:hover{background-color:rgba(50,54,58,.08)}._2sk--:active{background-color:rgba(50,54,58,.11)}._2sk--._jl2QZ{transform:rotate(-180deg)}._2sk--._L83pp{opacity:.4}._B-nk4{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}._L83pp{cursor:not-allowed}._L83pp:hover{background-color:transparent}";
|
|
3646
|
+
var styles$u = {"combobox":"_qt655","comboboxInput":"_6yCG2","ignoreFocusStyle":"_-yWRC","labelledInput":"_A8C-V","comboboxIcon":"_2sk--","open":"_jl2QZ","disabled":"_L83pp","comboboxEmpty":"_B-nk4"};
|
|
3647
|
+
var stylesheet$w="._qt655{position:relative;display:inline-block}._6yCG2{padding-right:36px}._6yCG2._-yWRC{box-shadow:none!important;border:1px solid #898989!important}._A8C-V{margin-top:4px}._2sk--{position:absolute;right:4px;bottom:4px;height:28px;width:28px;border-radius:4px;fill:#515559;cursor:pointer}._2sk--:hover{background-color:rgba(50,54,58,.08)}._2sk--:active{background-color:rgba(50,54,58,.11)}._2sk--._jl2QZ{transform:rotate(-180deg)}._2sk--._L83pp{opacity:.4}._B-nk4{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}._L83pp{cursor:not-allowed}._L83pp:hover{background-color:transparent}";
|
|
3619
3648
|
icons_index.styleInject(css_248z$w);
|
|
3620
3649
|
|
|
3621
3650
|
const {
|
|
@@ -3682,21 +3711,21 @@ const ComboboxInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3682
3711
|
onChange: handleInputChange,
|
|
3683
3712
|
onFocus: wrapEvent(onFocus, handleFocus),
|
|
3684
3713
|
onKeyDown: wrapEvent(onKeyDown, handleKeyDown),
|
|
3685
|
-
onMouseDown: e => onMouseDown
|
|
3714
|
+
onMouseDown: e => onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e),
|
|
3686
3715
|
onClick: e => {
|
|
3687
3716
|
if (!isOptionSelectedOnKeyboardHighlight && numberOfOptions > 0) {
|
|
3688
3717
|
setHighlightedIndex(0);
|
|
3689
3718
|
}
|
|
3690
3719
|
setIsOpen(true);
|
|
3691
|
-
onClick
|
|
3720
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
3692
3721
|
},
|
|
3693
3722
|
role: "combobox",
|
|
3694
3723
|
"aria-autocomplete": isFilteringDisabled ? 'none' : 'list',
|
|
3695
3724
|
"aria-expanded": isAriaExpanded,
|
|
3696
3725
|
"aria-controls": isAriaExpanded ? listContainerId : undefined,
|
|
3697
3726
|
"aria-activedescendant": activeDescendantId,
|
|
3698
|
-
"aria-label": ariaLabelFromProps
|
|
3699
|
-
"aria-labelledby": ariaLabelledbyFromProps
|
|
3727
|
+
"aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
|
|
3728
|
+
"aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
|
|
3700
3729
|
}));
|
|
3701
3730
|
});
|
|
3702
3731
|
|
|
@@ -3741,8 +3770,8 @@ const ComboboxList = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3741
3770
|
...style
|
|
3742
3771
|
} : style,
|
|
3743
3772
|
id: listContainerId,
|
|
3744
|
-
"aria-label": ariaLabelFromProps
|
|
3745
|
-
"aria-labelledby": ariaLabelledbyFromProps
|
|
3773
|
+
"aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
|
|
3774
|
+
"aria-labelledby": ariaLabelledbyFromProps !== null && ariaLabelledbyFromProps !== void 0 ? ariaLabelledbyFromProps : ariaLabelledby
|
|
3746
3775
|
}), children)
|
|
3747
3776
|
});
|
|
3748
3777
|
});
|
|
@@ -3774,7 +3803,7 @@ const ComboboxHeader = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
3774
3803
|
} = _ref;
|
|
3775
3804
|
return /*#__PURE__*/React__default["default"].createElement(FlyoutHeader, _extends__default["default"]({}, rest, {
|
|
3776
3805
|
title: title,
|
|
3777
|
-
onMouseDown: wrapEvent(onMouseDown, e => e
|
|
3806
|
+
onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
|
|
3778
3807
|
ref: ref
|
|
3779
3808
|
}), children);
|
|
3780
3809
|
});
|
|
@@ -3804,17 +3833,24 @@ const ComboboxIcon = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3804
3833
|
if (inputRef.current === document.activeElement) {
|
|
3805
3834
|
setIsOpen(!isOpen);
|
|
3806
3835
|
} else {
|
|
3807
|
-
|
|
3836
|
+
var _inputRef$current;
|
|
3837
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
3808
3838
|
}
|
|
3809
3839
|
}) : undefined,
|
|
3810
|
-
onMouseDown: wrapEvent(onMouseDown, e => e
|
|
3840
|
+
onMouseDown: wrapEvent(onMouseDown, e => e === null || e === void 0 ? void 0 : e.preventDefault()),
|
|
3811
3841
|
ref: mergeRefs(ref, iconRef),
|
|
3812
3842
|
"aria-hidden": "true"
|
|
3813
3843
|
}));
|
|
3814
3844
|
});
|
|
3815
3845
|
|
|
3816
|
-
const getOptionLabel = option =>
|
|
3817
|
-
|
|
3846
|
+
const getOptionLabel = option => {
|
|
3847
|
+
var _option$props;
|
|
3848
|
+
return option === null || option === void 0 ? void 0 : (_option$props = option.props) === null || _option$props === void 0 ? void 0 : _option$props.label;
|
|
3849
|
+
};
|
|
3850
|
+
const getOptionValue = option => {
|
|
3851
|
+
var _option$props2;
|
|
3852
|
+
return option === null || option === void 0 ? void 0 : (_option$props2 = option.props) === null || _option$props2 === void 0 ? void 0 : _option$props2.value;
|
|
3853
|
+
};
|
|
3818
3854
|
const doesOptionMatchFilter = (option, header, inputValue) => {
|
|
3819
3855
|
var _context, _context2;
|
|
3820
3856
|
const label = getOptionLabel(option);
|
|
@@ -3863,20 +3899,23 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3863
3899
|
// Gets the <ComboboxInput> and <ComboboxList> components from the children
|
|
3864
3900
|
React__default["default"].Children.forEach(children, child => {
|
|
3865
3901
|
if ( /*#__PURE__*/React__default["default"].isValidElement(child)) {
|
|
3866
|
-
if (child
|
|
3902
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxInput) {
|
|
3867
3903
|
comboboxInput = child;
|
|
3868
|
-
} else if (child
|
|
3904
|
+
} else if ((child === null || child === void 0 ? void 0 : child.type) === ComboboxList) {
|
|
3869
3905
|
comboboxList = child;
|
|
3870
3906
|
}
|
|
3871
3907
|
}
|
|
3872
3908
|
});
|
|
3873
3909
|
const listContainerId = useId(comboboxList.props.id);
|
|
3874
|
-
const noMatchesFoundContainerId =
|
|
3910
|
+
const noMatchesFoundContainerId = "".concat(listContainerId, "-no-matches-found");
|
|
3875
3911
|
|
|
3876
3912
|
// Extracts all ComboboxOptions
|
|
3877
|
-
const [, [allOptions]] = React.useMemo(() =>
|
|
3878
|
-
|
|
3879
|
-
|
|
3913
|
+
const [, [allOptions]] = React.useMemo(() => {
|
|
3914
|
+
var _comboboxList, _comboboxList$props;
|
|
3915
|
+
return filterChildren((_comboboxList = comboboxList) === null || _comboboxList === void 0 ? void 0 : (_comboboxList$props = _comboboxList.props) === null || _comboboxList$props === void 0 ? void 0 : _comboboxList$props.children, [{
|
|
3916
|
+
matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
|
|
3917
|
+
}]);
|
|
3918
|
+
}, [comboboxList]);
|
|
3880
3919
|
const {
|
|
3881
3920
|
defaultValue: defaultInputValue,
|
|
3882
3921
|
onChange: onInputChange,
|
|
@@ -3899,7 +3938,7 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3899
3938
|
const [selectedOptionLabel, setSelectedOptionLabel] = React.useState(() => getLabelForValue(selectedOptionValue) || externalInputValue || defaultInputValue || '');
|
|
3900
3939
|
const [inputValue, setInputValue] = useControllableState(selectedOptionLabel,
|
|
3901
3940
|
// `e &&` prevents `ComboboxInput` from calling consumer-passed `onChange` for consumer-controlled `Combobox` value updates.
|
|
3902
|
-
(_, e) => e && onInputChange
|
|
3941
|
+
(_, e) => e && (onInputChange === null || onInputChange === void 0 ? void 0 : onInputChange(e)), externalInputValue);
|
|
3903
3942
|
|
|
3904
3943
|
// listen for updates from controlled value
|
|
3905
3944
|
React.useEffect(() => {
|
|
@@ -3927,6 +3966,7 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3927
3966
|
|
|
3928
3967
|
// Gets the filtered options based on the current input value (only if isFilteringDisabled is false)
|
|
3929
3968
|
const [listChildrenFilteredOptions, [, filteredOptions]] = React.useMemo(() => {
|
|
3969
|
+
var _comboboxList2, _comboboxList2$props;
|
|
3930
3970
|
let currentHeaderTitle;
|
|
3931
3971
|
const handleSelect = option => {
|
|
3932
3972
|
const newOptionValue = getOptionValue(option);
|
|
@@ -3938,15 +3978,16 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3938
3978
|
}
|
|
3939
3979
|
});
|
|
3940
3980
|
};
|
|
3941
|
-
return filterChildren(comboboxList
|
|
3981
|
+
return filterChildren((_comboboxList2 = comboboxList) === null || _comboboxList2 === void 0 ? void 0 : (_comboboxList2$props = _comboboxList2.props) === null || _comboboxList2$props === void 0 ? void 0 : _comboboxList2$props.children, [
|
|
3942
3982
|
/*
|
|
3943
3983
|
* For each header, adds a key value pair to the headerCounts object where the key is the header title and the value is 0.
|
|
3944
3984
|
* The value will be updated in the matcher/modifier below this matcher/modifier.
|
|
3945
3985
|
*/
|
|
3946
3986
|
{
|
|
3947
|
-
matcher: child => child
|
|
3987
|
+
matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
|
|
3948
3988
|
modifier: child => {
|
|
3949
|
-
|
|
3989
|
+
var _props;
|
|
3990
|
+
currentHeaderTitle = (_props = child.props) === null || _props === void 0 ? void 0 : _props.title;
|
|
3950
3991
|
headerCounts[currentHeaderTitle] = 0;
|
|
3951
3992
|
return child;
|
|
3952
3993
|
}
|
|
@@ -3956,16 +3997,18 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3956
3997
|
* Otherwise, returns null.
|
|
3957
3998
|
*/
|
|
3958
3999
|
{
|
|
3959
|
-
matcher: child => child
|
|
4000
|
+
matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption,
|
|
3960
4001
|
modifier: (child, index) => {
|
|
3961
4002
|
if (inputValue === selectedOptionLabel || isFilteringDisabled || doesOptionMatchFilter(child, currentHeaderTitle, inputValue)) {
|
|
4003
|
+
var _props$id;
|
|
3962
4004
|
headerCounts[currentHeaderTitle] += 1;
|
|
3963
4005
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
3964
4006
|
onSelect: e => {
|
|
3965
|
-
|
|
4007
|
+
var _props2, _props2$onSelect;
|
|
4008
|
+
child === null || child === void 0 ? void 0 : (_props2 = child.props) === null || _props2 === void 0 ? void 0 : (_props2$onSelect = _props2.onSelect) === null || _props2$onSelect === void 0 ? void 0 : _props2$onSelect.call(_props2, e);
|
|
3966
4009
|
|
|
3967
4010
|
// Prevents form submission
|
|
3968
|
-
if (e
|
|
4011
|
+
if ((e === null || e === void 0 ? void 0 : e.key) === 'Enter') {
|
|
3969
4012
|
e.preventDefault();
|
|
3970
4013
|
}
|
|
3971
4014
|
if (!e.key) {
|
|
@@ -3986,7 +4029,7 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
3986
4029
|
isHighlightedOnHover: isOptionSelectedOnKeyboardHighlight,
|
|
3987
4030
|
isHighlighted: isOptionSelectedOnKeyboardHighlight ? false : index === highlightedIndex,
|
|
3988
4031
|
isSelected: isOptionSelectedOnKeyboardHighlight ? index === selectedIndex : selectedOptionValue === getOptionValue(child),
|
|
3989
|
-
id: child.props.id
|
|
4032
|
+
id: (_props$id = child.props.id) !== null && _props$id !== void 0 ? _props$id : "".concat(listContainerId, "-option-").concat(index),
|
|
3990
4033
|
ref: node => {
|
|
3991
4034
|
optionRefs.current[Number(index)] = node;
|
|
3992
4035
|
}
|
|
@@ -4000,15 +4043,19 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4000
4043
|
|
|
4001
4044
|
// Gets all filtered options, as well as headers that have at least one filtered option
|
|
4002
4045
|
const [listChildrenFilteredOptionsAndHeaders] = React.useMemo(() => filterChildren(listChildrenFilteredOptions, [{
|
|
4003
|
-
matcher: child => child
|
|
4046
|
+
matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxOption
|
|
4004
4047
|
}, {
|
|
4005
|
-
matcher: child => child
|
|
4006
|
-
modifier: child =>
|
|
4048
|
+
matcher: child => (child === null || child === void 0 ? void 0 : child.type) === ComboboxHeader,
|
|
4049
|
+
modifier: child => {
|
|
4050
|
+
var _props3;
|
|
4051
|
+
return headerCounts[(_props3 = child.props) === null || _props3 === void 0 ? void 0 : _props3.title] ? child : null;
|
|
4052
|
+
}
|
|
4007
4053
|
}]), [headerCounts, listChildrenFilteredOptions]);
|
|
4008
4054
|
const keyboardHighlightOrSelectOption = (index, e) => {
|
|
4009
4055
|
if (isOptionSelectedOnKeyboardHighlight) {
|
|
4056
|
+
var _filteredOptions$inde, _filteredOptions$inde2, _filteredOptions$inde3;
|
|
4010
4057
|
setSelectedIndex(index);
|
|
4011
|
-
filteredOptions[index]
|
|
4058
|
+
(_filteredOptions$inde = filteredOptions[index]) === null || _filteredOptions$inde === void 0 ? void 0 : (_filteredOptions$inde2 = _filteredOptions$inde.props) === null || _filteredOptions$inde2 === void 0 ? void 0 : (_filteredOptions$inde3 = _filteredOptions$inde2.onSelect) === null || _filteredOptions$inde3 === void 0 ? void 0 : _filteredOptions$inde3.call(_filteredOptions$inde2, e);
|
|
4012
4059
|
} else {
|
|
4013
4060
|
setHighlightedIndex(index);
|
|
4014
4061
|
}
|
|
@@ -4066,7 +4113,8 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4066
4113
|
case 'Enter':
|
|
4067
4114
|
if (isFlyoutOpen) {
|
|
4068
4115
|
if (!isOptionSelectedOnKeyboardHighlight && filteredOptions.length > 0 && filteredOptions[highlightedIndex] !== undefined) {
|
|
4069
|
-
|
|
4116
|
+
var _filteredOptions$high, _filteredOptions$high2, _filteredOptions$high3;
|
|
4117
|
+
(_filteredOptions$high = filteredOptions[highlightedIndex]) === null || _filteredOptions$high === void 0 ? void 0 : (_filteredOptions$high2 = _filteredOptions$high.props) === null || _filteredOptions$high2 === void 0 ? void 0 : (_filteredOptions$high3 = _filteredOptions$high2.onSelect) === null || _filteredOptions$high3 === void 0 ? void 0 : _filteredOptions$high3.call(_filteredOptions$high2, e);
|
|
4070
4118
|
}
|
|
4071
4119
|
}
|
|
4072
4120
|
setIsFlyoutOpen(false);
|
|
@@ -4127,11 +4175,12 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4127
4175
|
React.useEffect(() => {
|
|
4128
4176
|
const currentIndex = isOptionSelectedOnKeyboardHighlight ? selectedIndex : highlightedIndex;
|
|
4129
4177
|
const optionRef = optionRefs.current[currentIndex];
|
|
4130
|
-
if (isFocusVisible && isFlyoutOpen && optionRef && listRef
|
|
4178
|
+
if (isFocusVisible && isFlyoutOpen && optionRef && listRef !== null && listRef !== void 0 && listRef.current) {
|
|
4179
|
+
var _listRef$current, _listRef$current2;
|
|
4131
4180
|
if (currentIndex === 0) {
|
|
4132
4181
|
// Scrolls the first header into view if one exists
|
|
4133
4182
|
listRef.current.scrollTop = 0;
|
|
4134
|
-
} else if (listRef.current
|
|
4183
|
+
} else if (((_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollHeight) > ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.clientHeight)) {
|
|
4135
4184
|
const scrollBottom = listRef.current.clientHeight + listRef.current.scrollTop;
|
|
4136
4185
|
const elementBottom = optionRef.offsetTop + optionRef.offsetHeight;
|
|
4137
4186
|
if (elementBottom > scrollBottom) {
|
|
@@ -4171,16 +4220,18 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4171
4220
|
const activeDescendantId = React.useMemo(() => {
|
|
4172
4221
|
if (isAriaExpanded) {
|
|
4173
4222
|
if (unstable_isLoading) {
|
|
4174
|
-
return
|
|
4223
|
+
return "".concat(listContainerId, "-loading-spinner");
|
|
4175
4224
|
}
|
|
4176
4225
|
if (filteredOptions.length === 0) {
|
|
4177
4226
|
return undefined;
|
|
4178
4227
|
}
|
|
4179
4228
|
if (selectedIndex !== -1) {
|
|
4180
|
-
|
|
4229
|
+
var _filteredOptions$sele;
|
|
4230
|
+
return (_filteredOptions$sele = filteredOptions[selectedIndex]) === null || _filteredOptions$sele === void 0 ? void 0 : _filteredOptions$sele.props.id;
|
|
4181
4231
|
}
|
|
4182
4232
|
if (highlightedIndex !== -1) {
|
|
4183
|
-
|
|
4233
|
+
var _filteredOptions$high4;
|
|
4234
|
+
return (_filteredOptions$high4 = filteredOptions[highlightedIndex]) === null || _filteredOptions$high4 === void 0 ? void 0 : _filteredOptions$high4.props.id;
|
|
4184
4235
|
}
|
|
4185
4236
|
}
|
|
4186
4237
|
return undefined;
|
|
@@ -4227,14 +4278,14 @@ const Combobox = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4227
4278
|
}, translate('noMatchesFound')) : listChildrenFilteredOptionsAndHeaders)));
|
|
4228
4279
|
});
|
|
4229
4280
|
|
|
4230
|
-
var css_248z$v = ".
|
|
4231
|
-
var styles$t = {"paneContainer":"
|
|
4232
|
-
var stylesheet$v=".
|
|
4281
|
+
var css_248z$v = "._h9-EV{grid-area:configPane;position:relative;height:100%}._N2Ep9{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._g3HZB._F7UUy ._N2Ep9,._g3HZB:not(._iN5gK) ._N2Ep9{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._iN5gK ._N2Ep9{width:0}._F7UUy._iN5gK ._N2Ep9{width:30px;cursor:pointer}._ZnXVI ._N2Ep9{border-right-color:#eee}._eBakD{height:100%;position:relative;width:292px}._g3HZB ._eBakD,._iN5gK ._eBakD{width:0}._F7UUy._g3HZB ._eBakD,._F7UUy._iN5gK ._eBakD{width:30px}._DEd4g ._eBakD{transition:width .5s}._1Cv2c{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._iN5gK ._1Cv2c{visibility:hidden}._DEd4g ._1Cv2c{visibility:visible}._1Cv2c ._1pVuk{width:252px;margin-left:20px}._2lqAA{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._eev4v{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._eev4v *{font-weight:400;font-size:16px;margin:0}._f2dQ2{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._iN5gK ._f2dQ2{left:0}._F7UUy._iN5gK ._f2dQ2{left:30px}._f2dQ2 ._ZjH8m{width:4px;height:100%}._f2dQ2:hover ._ZjH8m,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._ZjH8m{background-color:#9dc5ed}._f2dQ2:hover ._nQgF2>span,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2>span{background-color:#0b6ed0;border-color:#0b6ed0}._f2dQ2:hover ._nQgF2>span>svg,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2>span>svg{fill:#fff}._f2dQ2:hover ._nQgF2:active>span,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2:active>span{background-color:#0854a1;border-color:#0854a1}._f2dQ2:hover ._nQgF2:active>span>svg,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2:active>span>svg{fill:#fff}._f2dQ2 ._nQgF2{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._f2dQ2 ._nQgF2._PiprX._PiprX._PiprX{opacity:1}._f2dQ2 ._nQgF2._aaHx0._aaHx0._aaHx0{opacity:0}._f2dQ2 ._nQgF2:active>span{background-color:#0854a1;border-color:#0854a1}._f2dQ2 ._nQgF2:active>span>svg{fill:#fff}._f2dQ2 ._nQgF2>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._f2dQ2 ._nQgF2>span>svg{fill:#515559;border-radius:50%}._f2dQ2:hover ._nQgF2,._iN5gK ._f2dQ2 ._nQgF2,._N2Ep9:hover+._f2dQ2 ._nQgF2{opacity:1}._nQgF2.focus-visible,._nQgF2:focus-visible{opacity:1;border-color:#0a3f88}";
|
|
4282
|
+
var styles$t = {"paneContainer":"_h9-EV","paneContentContainer":"_N2Ep9","unpinned":"_g3HZB","hidden":"_iN5gK","preview":"_F7UUy","openHidden":"_ZnXVI","spacer":"_eBakD","transitioning":"_DEd4g","paneContent":"_1Cv2c","paneContentInner":"_1pVuk","header":"_2lqAA","title":"_eev4v","clickableArea":"_f2dQ2","hoverBorder":"_ZjH8m","toolbarPanelExpandCollapseButton":"_nQgF2","overrideShow":"_PiprX","overrideHide":"_aaHx0"};
|
|
4283
|
+
var stylesheet$v="._h9-EV{grid-area:configPane;position:relative;height:100%}._N2Ep9{overflow:hidden;height:100%;position:absolute;background-color:#fff;top:0;transition:width .5s;width:292px;border-right:1px solid #898989;box-sizing:border-box}._g3HZB._F7UUy ._N2Ep9,._g3HZB:not(._iN5gK) ._N2Ep9{-webkit-clip-path:inset(0 -20px 0 0);clip-path:inset(0 -20px 0 0);box-shadow:0 8px 20px 0 rgba(0,0,0,.1),0 4px 6px 0 rgba(0,0,0,.05)}._iN5gK ._N2Ep9{width:0}._F7UUy._iN5gK ._N2Ep9{width:30px;cursor:pointer}._ZnXVI ._N2Ep9{border-right-color:#eee}._eBakD{height:100%;position:relative;width:292px}._g3HZB ._eBakD,._iN5gK ._eBakD{width:0}._F7UUy._g3HZB ._eBakD,._F7UUy._iN5gK ._eBakD{width:30px}._DEd4g ._eBakD{transition:width .5s}._1Cv2c{position:absolute;width:292px;height:100%;right:0;overflow:auto;padding:12px 0}._iN5gK ._1Cv2c{visibility:hidden}._DEd4g ._1Cv2c{visibility:visible}._1Cv2c ._1pVuk{width:252px;margin-left:20px}._2lqAA{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding-bottom:12px}._eev4v{flex-grow:1;padding-right:8px;line-height:20px;margin:8px 0}._eev4v *{font-weight:400;font-size:16px;margin:0}._f2dQ2{position:absolute;transition:left .5s;top:0;left:290px;width:12px;cursor:pointer;height:100%}._iN5gK ._f2dQ2{left:0}._F7UUy._iN5gK ._f2dQ2{left:30px}._f2dQ2 ._ZjH8m{width:4px;height:100%}._f2dQ2:hover ._ZjH8m,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._ZjH8m{background-color:#9dc5ed}._f2dQ2:hover ._nQgF2>span,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2>span{background-color:#0b6ed0;border-color:#0b6ed0}._f2dQ2:hover ._nQgF2>span>svg,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2>span>svg{fill:#fff}._f2dQ2:hover ._nQgF2:active>span,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2:active>span{background-color:#0854a1;border-color:#0854a1}._f2dQ2:hover ._nQgF2:active>span>svg,._F7UUy._iN5gK ._N2Ep9:hover+._f2dQ2 ._nQgF2:active>span>svg{fill:#fff}._f2dQ2 ._nQgF2{left:-16px;width:36px;height:36px;position:absolute;top:48px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10;opacity:0}._f2dQ2 ._nQgF2._PiprX._PiprX._PiprX{opacity:1}._f2dQ2 ._nQgF2._aaHx0._aaHx0._aaHx0{opacity:0}._f2dQ2 ._nQgF2:active>span{background-color:#0854a1;border-color:#0854a1}._f2dQ2 ._nQgF2:active>span>svg{fill:#fff}._f2dQ2 ._nQgF2>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._f2dQ2 ._nQgF2>span>svg{fill:#515559;border-radius:50%}._f2dQ2:hover ._nQgF2,._iN5gK ._f2dQ2 ._nQgF2,._N2Ep9:hover+._f2dQ2 ._nQgF2{opacity:1}._nQgF2.focus-visible,._nQgF2:focus-visible{opacity:1;border-color:#0a3f88}";
|
|
4233
4284
|
icons_index.styleInject(css_248z$v);
|
|
4234
4285
|
|
|
4235
|
-
var css_248z$u = ".
|
|
4236
|
-
var styles$s = {"button":"
|
|
4237
|
-
var stylesheet$u=".
|
|
4286
|
+
var css_248z$u = "._bDW87{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._bDW87:focus{outline:none}._bDW87:hover:not(._KhpH6){background-color:rgba(50,54,58,.08)}._bDW87:active:not(._KhpH6){background-color:rgba(50,54,58,.11);stroke-width:2}._bDW87._KhpH6{cursor:not-allowed;fill:rgba(81,85,89,.6)}._bDW87.focus-visible,._bDW87:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4287
|
+
var styles$s = {"button":"_bDW87","disabled":"_KhpH6"};
|
|
4288
|
+
var stylesheet$u="._bDW87{border-radius:4px;border:none;height:36px;width:36px;display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;padding:0;cursor:pointer;fill:#515559;background-color:transparent;transition:background .2s,color .2s}._bDW87:focus{outline:none}._bDW87:hover:not(._KhpH6){background-color:rgba(50,54,58,.08)}._bDW87:active:not(._KhpH6){background-color:rgba(50,54,58,.11);stroke-width:2}._bDW87._KhpH6{cursor:not-allowed;fill:rgba(81,85,89,.6)}._bDW87.focus-visible,._bDW87:focus-visible{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4238
4289
|
icons_index.styleInject(css_248z$u);
|
|
4239
4290
|
|
|
4240
4291
|
const sizePropInIconErrorMessage = 'Warning: The `Icon` prop `size` is invalid when used as a child of `IconButton`.';
|
|
@@ -4446,9 +4497,9 @@ const ConfigPane = _ref2 => {
|
|
|
4446
4497
|
})));
|
|
4447
4498
|
};
|
|
4448
4499
|
|
|
4449
|
-
var css_248z$t = ".
|
|
4450
|
-
var styles$r = {"divider":"
|
|
4451
|
-
var stylesheet$t=".
|
|
4500
|
+
var css_248z$t = "._dSRse{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
|
|
4501
|
+
var styles$r = {"divider":"_dSRse"};
|
|
4502
|
+
var stylesheet$t="._dSRse{border:none;height:1px;margin:0;flex-shrink:0;background-color:#e5e5e5}";
|
|
4452
4503
|
icons_index.styleInject(css_248z$t);
|
|
4453
4504
|
|
|
4454
4505
|
const Divider = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -4462,9 +4513,9 @@ const Divider = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
4462
4513
|
}, rest));
|
|
4463
4514
|
});
|
|
4464
4515
|
|
|
4465
|
-
var css_248z$s = ".
|
|
4466
|
-
var styles$q = {"container":"
|
|
4467
|
-
var stylesheet$s=".
|
|
4516
|
+
var css_248z$s = "._0puZb{max-width:100%;position:relative;display:inline-block}._9A1jZ{display:inline-flex;justify-content:space-between;align-items:center;background-color:#fafafa;border:1px solid #898989;border-radius:4px;height:36px;color:#515559;outline:none;cursor:pointer}._9A1jZ:hover:not([aria-disabled=true]){cursor:pointer;background-color:#f5f5f5}._9A1jZ:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa}._9A1jZ:disabled,._9A1jZ[aria-disabled=true]{color:#74777a;border-color:#e5e5e5;cursor:not-allowed}._9A1jZ._WC4c2{border-color:#b00}._9A1jZ._WC4c2:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._9A1jZ._mr7pg{min-width:120px;padding:0 4px 0 12px}._9A1jZ._OwbnT{margin-top:4px}._9A1jZ._PFuxm:not([aria-disabled=true]):not(:disabled){color:#32363a}._9A1jZ ._Boj6z{display:inline-flex;align-items:center;min-height:10px}._9A1jZ ._Boj6z._tnYB7{line-height:20px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._9A1jZ ._uoskl{height:24px;width:24px;border-radius:4px;fill:#515559;flex-shrink:0;cursor:pointer}._9A1jZ ._uoskl._DxJuo{border-color:#e5e5e5;fill:#9d9fa1;opacity:.4;cursor:not-allowed}._9A1jZ ._uoskl._i-Dpi{transform:rotate(-180deg)}._Qxr4c[aria-disabled=true]{cursor:not-allowed;color:rgba(81,85,89,.65);fill:#9d9fa1}._JbR1-{position:-webkit-sticky;position:sticky;top:0;z-index:20;padding:4px 8px 8px!important;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;background-color:#fff!important}._HHLq3{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}._uvP6B{fill:#515559}._u9puj{margin:2px 12px 2px 0}._u9puj._nhaaK>svg{border-color:#0b6ed0}._NQscp{width:100%}";
|
|
4517
|
+
var styles$q = {"container":"_0puZb","button":"_9A1jZ","invalid":"_WC4c2","hasText":"_mr7pg","labelled":"_OwbnT","selected":"_PFuxm","buttonLabel":"_Boj6z","isString":"_tnYB7","icon":"_uoskl","disabled":"_DxJuo","open":"_i-Dpi","option":"_Qxr4c","search":"_JbR1-","emptyOption":"_HHLq3","searchIcon":"_uvP6B","checkbox":"_u9puj","highlighted":"_nhaaK","searchInput":"_NQscp"};
|
|
4518
|
+
var stylesheet$s="._0puZb{max-width:100%;position:relative;display:inline-block}._9A1jZ{display:inline-flex;justify-content:space-between;align-items:center;background-color:#fafafa;border:1px solid #898989;border-radius:4px;height:36px;color:#515559;outline:none;cursor:pointer}._9A1jZ:hover:not([aria-disabled=true]){cursor:pointer;background-color:#f5f5f5}._9A1jZ:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;background-color:#fafafa}._9A1jZ:disabled,._9A1jZ[aria-disabled=true]{color:#74777a;border-color:#e5e5e5;cursor:not-allowed}._9A1jZ._WC4c2{border-color:#b00}._9A1jZ._WC4c2:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._9A1jZ._mr7pg{min-width:120px;padding:0 4px 0 12px}._9A1jZ._OwbnT{margin-top:4px}._9A1jZ._PFuxm:not([aria-disabled=true]):not(:disabled){color:#32363a}._9A1jZ ._Boj6z{display:inline-flex;align-items:center;min-height:10px}._9A1jZ ._Boj6z._tnYB7{line-height:20px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._9A1jZ ._uoskl{height:24px;width:24px;border-radius:4px;fill:#515559;flex-shrink:0;cursor:pointer}._9A1jZ ._uoskl._DxJuo{border-color:#e5e5e5;fill:#9d9fa1;opacity:.4;cursor:not-allowed}._9A1jZ ._uoskl._i-Dpi{transform:rotate(-180deg)}._Qxr4c[aria-disabled=true]{cursor:not-allowed;color:rgba(81,85,89,.65);fill:#9d9fa1}._JbR1-{position:-webkit-sticky;position:sticky;top:0;z-index:20;padding:4px 8px 8px!important;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;background-color:#fff!important}._HHLq3{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}._uvP6B{fill:#515559}._u9puj{margin:2px 12px 2px 0}._u9puj._nhaaK>svg{border-color:#0b6ed0}._NQscp{width:100%}";
|
|
4468
4519
|
icons_index.styleInject(css_248z$s);
|
|
4469
4520
|
|
|
4470
4521
|
const {
|
|
@@ -4473,6 +4524,7 @@ const {
|
|
|
4473
4524
|
} = createContextUtilities({});
|
|
4474
4525
|
|
|
4475
4526
|
const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
4527
|
+
var _ref2, _children$props$aria, _children$props, _ref3, _children$props$aria2, _children$props2, _ref4, _children$props$aria3, _children$props3, _children$props$tabIn, _children$props4, _children$props7, _children$props8;
|
|
4476
4528
|
let {
|
|
4477
4529
|
children,
|
|
4478
4530
|
className,
|
|
@@ -4519,9 +4571,9 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4519
4571
|
helperTextId: formFieldHelperTextId,
|
|
4520
4572
|
errorTextId: formFieldErrorTextId
|
|
4521
4573
|
} = useFormFieldControl();
|
|
4522
|
-
const ariaLabelledBy = children
|
|
4523
|
-
const ariaLabel = children
|
|
4524
|
-
const ariaDescribedby = concatIds(children
|
|
4574
|
+
const ariaLabelledBy = (_ref2 = (_children$props$aria = children === null || children === void 0 ? void 0 : (_children$props = children.props) === null || _children$props === void 0 ? void 0 : _children$props['aria-labelledby']) !== null && _children$props$aria !== void 0 ? _children$props$aria : externalAriaLabelledBy) !== null && _ref2 !== void 0 ? _ref2 : dropdownAriaLabelledBy ? "".concat(dropdownAriaLabelledBy, " ").concat(buttonId) : undefined;
|
|
4575
|
+
const ariaLabel = (_ref3 = (_children$props$aria2 = children === null || children === void 0 ? void 0 : (_children$props2 = children.props) === null || _children$props2 === void 0 ? void 0 : _children$props2['aria-label']) !== null && _children$props$aria2 !== void 0 ? _children$props$aria2 : externalAriaLabel) !== null && _ref3 !== void 0 ? _ref3 : dropdownAriaLabel && typeof label === 'string' ? "".concat(dropdownAriaLabel, " ").concat(label) : dropdownAriaLabel;
|
|
4576
|
+
const ariaDescribedby = concatIds((_ref4 = (_children$props$aria3 = children === null || children === void 0 ? void 0 : (_children$props3 = children.props) === null || _children$props3 === void 0 ? void 0 : _children$props3['aria-describedby']) !== null && _children$props$aria3 !== void 0 ? _children$props$aria3 : externalAriaDescribedBy) !== null && _ref4 !== void 0 ? _ref4 : dropdownAriaDescribedby, formFieldHelperTextId, formFieldErrorTextId);
|
|
4525
4577
|
React.useEffect(() => {
|
|
4526
4578
|
const selectedLabels = [];
|
|
4527
4579
|
options.forEach(option => {
|
|
@@ -4533,12 +4585,13 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4533
4585
|
setLabel(selectedLabels.length > 0 ? selectedLabels.join(', ') : defaultLabel);
|
|
4534
4586
|
}, [setLabel, options, defaultLabel]);
|
|
4535
4587
|
React.useEffect(() => {
|
|
4536
|
-
|
|
4588
|
+
var _buttonRef$current;
|
|
4589
|
+
setMinWidth(buttonRef === null || buttonRef === void 0 ? void 0 : (_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.offsetWidth);
|
|
4537
4590
|
});
|
|
4538
4591
|
const isInvalid = isInvalidProp !== undefined ? isInvalidProp : dropdownIsInvalid;
|
|
4539
4592
|
const handleClick = e => {
|
|
4540
|
-
if (disabled
|
|
4541
|
-
onClick
|
|
4593
|
+
if (disabled !== null && disabled !== void 0 ? disabled : dropdownAriaDisabled) return;
|
|
4594
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
4542
4595
|
// Needed because some browsers don't focus on click
|
|
4543
4596
|
e.currentTarget.focus();
|
|
4544
4597
|
setIsOpen(currentIsOpen => {
|
|
@@ -4547,15 +4600,15 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4547
4600
|
});
|
|
4548
4601
|
};
|
|
4549
4602
|
const handleKeyDown = e => {
|
|
4550
|
-
if (disabled
|
|
4551
|
-
onKeyDown
|
|
4603
|
+
if (disabled !== null && disabled !== void 0 ? disabled : dropdownAriaDisabled) return;
|
|
4604
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
4552
4605
|
onKeyDownButton(e);
|
|
4553
4606
|
};
|
|
4554
4607
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, children ? /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
4555
|
-
ref: mergeRefs(ref, children
|
|
4608
|
+
ref: mergeRefs(ref, children === null || children === void 0 ? void 0 : children.ref, buttonRef, dropdownButtonRef),
|
|
4556
4609
|
disabled: disabled || dropdownAriaDisabled,
|
|
4557
4610
|
'aria-disabled': dropdownAriaDisabled,
|
|
4558
|
-
tabIndex: children.props
|
|
4611
|
+
tabIndex: (_children$props$tabIn = (_children$props4 = children.props) === null || _children$props4 === void 0 ? void 0 : _children$props4.tabIndex) !== null && _children$props$tabIn !== void 0 ? _children$props$tabIn : 0,
|
|
4559
4612
|
role: 'button',
|
|
4560
4613
|
'aria-expanded': isOpen,
|
|
4561
4614
|
'aria-haspopup': 'listbox',
|
|
@@ -4565,15 +4618,17 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4565
4618
|
'aria-describedby': ariaDescribedby,
|
|
4566
4619
|
id: buttonId,
|
|
4567
4620
|
onFocus: e => {
|
|
4568
|
-
|
|
4569
|
-
onFocus
|
|
4621
|
+
var _children$props5, _children$props5$onFo;
|
|
4622
|
+
(_children$props5 = children.props) === null || _children$props5 === void 0 ? void 0 : (_children$props5$onFo = _children$props5.onFocus) === null || _children$props5$onFo === void 0 ? void 0 : _children$props5$onFo.call(_children$props5, e);
|
|
4623
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
4570
4624
|
},
|
|
4571
4625
|
onBlur: e => {
|
|
4572
|
-
|
|
4573
|
-
onBlur
|
|
4626
|
+
var _children$props6, _children$props6$onBl;
|
|
4627
|
+
(_children$props6 = children.props) === null || _children$props6 === void 0 ? void 0 : (_children$props6$onBl = _children$props6.onBlur) === null || _children$props6$onBl === void 0 ? void 0 : _children$props6$onBl.call(_children$props6, e);
|
|
4628
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
4574
4629
|
},
|
|
4575
|
-
onKeyDown: wrapEvent(children.props
|
|
4576
|
-
onClick: wrapEvent(children.props
|
|
4630
|
+
onKeyDown: wrapEvent((_children$props7 = children.props) === null || _children$props7 === void 0 ? void 0 : _children$props7.onKeyDown, handleKeyDown),
|
|
4631
|
+
onClick: wrapEvent((_children$props8 = children.props) === null || _children$props8 === void 0 ? void 0 : _children$props8.onClick, handleClick)
|
|
4577
4632
|
}) : /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
4578
4633
|
ref: mergeRefs(ref, buttonRef, dropdownButtonRef),
|
|
4579
4634
|
type: "button",
|
|
@@ -4590,14 +4645,14 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4590
4645
|
[styles$q.hasText]: !!label,
|
|
4591
4646
|
[styles$q.invalid]: isInvalid,
|
|
4592
4647
|
[styles$q.labelled]: hasFormLabel,
|
|
4593
|
-
[styles$q.selected]: externalLabel
|
|
4648
|
+
[styles$q.selected]: externalLabel !== null && externalLabel !== void 0 ? externalLabel : isOptionSelected // defaultLabel has lighter text color
|
|
4594
4649
|
}),
|
|
4595
4650
|
|
|
4596
4651
|
onFocus: onFocus,
|
|
4597
4652
|
onBlur: onBlur,
|
|
4598
4653
|
onKeyDown: handleKeyDown,
|
|
4599
4654
|
onClick: handleClick,
|
|
4600
|
-
"data-testid": dataTestId
|
|
4655
|
+
"data-testid": dataTestId !== null && dataTestId !== void 0 ? dataTestId : getSubDataTestId(contextDataTestId, 'button')
|
|
4601
4656
|
}), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
4602
4657
|
className: classNames__default["default"](styles$q.buttonLabel, {
|
|
4603
4658
|
[styles$q.isString]: typeof label === 'string'
|
|
@@ -4606,7 +4661,7 @@ const DropdownButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4606
4661
|
size: "medium",
|
|
4607
4662
|
className: classNames__default["default"](styles$q.icon, {
|
|
4608
4663
|
[styles$q.open]: isOpen,
|
|
4609
|
-
[styles$q.disabled]: disabled
|
|
4664
|
+
[styles$q.disabled]: disabled !== null && disabled !== void 0 ? disabled : dropdownAriaDisabled
|
|
4610
4665
|
}),
|
|
4611
4666
|
"aria-hidden": "true"
|
|
4612
4667
|
})));
|
|
@@ -4649,14 +4704,17 @@ function useDescendant(descendant, context, indexProp) {
|
|
|
4649
4704
|
// index on the following render and we will re-register descendants
|
|
4650
4705
|
// so that everything is up-to-date before the user interacts with a
|
|
4651
4706
|
// collection.
|
|
4652
|
-
const index = indexProp
|
|
4707
|
+
const index = indexProp !== null && indexProp !== void 0 ? indexProp : descendants.findIndex(item => item.element === descendant.element);
|
|
4653
4708
|
const previousDescendants = usePrevious(descendants);
|
|
4654
4709
|
|
|
4655
4710
|
// We also need to re-register descendants any time ANY of the other
|
|
4656
4711
|
// descendants have changed. My brain was melting when I wrote this and it
|
|
4657
4712
|
// feels a little off, but checking in render and using the result in the
|
|
4658
4713
|
// effect's dependency array works well enough.
|
|
4659
|
-
const someDescendantsHaveChanged = descendants.some((descendant, index) =>
|
|
4714
|
+
const someDescendantsHaveChanged = descendants.some((descendant, index) => {
|
|
4715
|
+
var _previousDescendants$;
|
|
4716
|
+
return descendant.element !== (previousDescendants === null || previousDescendants === void 0 ? void 0 : (_previousDescendants$ = previousDescendants[index]) === null || _previousDescendants$ === void 0 ? void 0 : _previousDescendants$.element);
|
|
4717
|
+
});
|
|
4660
4718
|
|
|
4661
4719
|
// Prevent any flashing
|
|
4662
4720
|
useSSRLayoutEffect(() => {
|
|
@@ -4811,9 +4869,9 @@ function useChildIndex(_ref2) {
|
|
|
4811
4869
|
}, ChildIndexContext);
|
|
4812
4870
|
}
|
|
4813
4871
|
|
|
4814
|
-
var css_248z$r = ".
|
|
4815
|
-
var inputClasses = {"container":"
|
|
4816
|
-
var stylesheet$r=".
|
|
4872
|
+
var css_248z$r = "._6lPJE{position:relative;display:inline-block;height:36px}._tf6zh{width:100%;height:100%;padding:8px 12px;color:#32363a;caret-color:#32363a;font-size:14px;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._tf6zh:hover{cursor:pointer;background-color:#f5f5f5}._tf6zh:focus{background-color:#fafafa;cursor:text;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;outline:none;border-color:transparent}._tf6zh:disabled,._tf6zh[aria-disabled=true]{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._tf6zh:disabled::-moz-placeholder,._tf6zh[aria-disabled=true]::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._tf6zh:disabled::placeholder,._tf6zh[aria-disabled=true]::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._tf6zh:invalid,._tf6zh[aria-invalid=true]{border-color:#b00}._tf6zh:invalid:focus,._tf6zh[aria-invalid=true]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._tf6zh[type=number]{-moz-appearance:textfield}._tf6zh[type=number]::-webkit-inner-spin-button,._tf6zh[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._tf6zh::-moz-placeholder{color:#515559;opacity:1}._tf6zh::placeholder{color:#515559;opacity:1}._Ibm3C{pointer-events:none;color:#515559;fill:#515559}._AjGKm{display:flex;flex-direction:column;align-items:center;position:absolute;top:50%;transform:translateY(-50%)}._Q50hL{color:#515559;font-size:16px}._Z3mmE{left:0;margin-left:6px}._3fpIl,._Z3mmE{pointer-events:none;color:#515559;fill:#515559;display:flex;flex-direction:column;align-items:center;position:absolute;top:50%;transform:translateY(-50%)}._3fpIl{right:0;margin-right:6px}";
|
|
4873
|
+
var inputClasses = {"container":"_6lPJE","input":"_tf6zh","addOn":"_Ibm3C","addOnVerticalCenter":"_AjGKm","addOnTextNode":"_Q50hL","leftAddOn":"_Z3mmE","rightAddOn":"_3fpIl"};
|
|
4874
|
+
var stylesheet$r="._6lPJE{position:relative;display:inline-block;height:36px}._tf6zh{width:100%;height:100%;padding:8px 12px;color:#32363a;caret-color:#32363a;font-size:14px;background-color:#fafafa;border:1px solid #898989;border-radius:4px;outline:none}._tf6zh:hover{cursor:pointer;background-color:#f5f5f5}._tf6zh:focus{background-color:#fafafa;cursor:text;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88;outline:none;border-color:transparent}._tf6zh:disabled,._tf6zh[aria-disabled=true]{background-color:#fafafa;border-color:#e5e5e5;color:#9d9fa1;-webkit-text-fill-color:#9d9fa1;cursor:not-allowed}._tf6zh:disabled::-moz-placeholder,._tf6zh[aria-disabled=true]::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._tf6zh:disabled::placeholder,._tf6zh[aria-disabled=true]::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._tf6zh:invalid,._tf6zh[aria-invalid=true]{border-color:#b00}._tf6zh:invalid:focus,._tf6zh[aria-invalid=true]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000;border-color:transparent}._tf6zh[type=number]{-moz-appearance:textfield}._tf6zh[type=number]::-webkit-inner-spin-button,._tf6zh[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._tf6zh::-moz-placeholder{color:#515559;opacity:1}._tf6zh::placeholder{color:#515559;opacity:1}._Ibm3C{pointer-events:none;color:#515559;fill:#515559}._AjGKm{display:flex;flex-direction:column;align-items:center;position:absolute;top:50%;transform:translateY(-50%)}._Q50hL{color:#515559;font-size:16px}._Z3mmE{left:0;margin-left:6px}._3fpIl,._Z3mmE{pointer-events:none;color:#515559;fill:#515559;display:flex;flex-direction:column;align-items:center;position:absolute;top:50%;transform:translateY(-50%)}._3fpIl{right:0;margin-right:6px}";
|
|
4817
4875
|
icons_index.styleInject(css_248z$r);
|
|
4818
4876
|
|
|
4819
4877
|
const getAddOnComponent = (addOn, containerClassName, containerRef) => {
|
|
@@ -4876,8 +4934,8 @@ const Input = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
4876
4934
|
onChange: onChange,
|
|
4877
4935
|
className: inputClasses.input,
|
|
4878
4936
|
style: {
|
|
4879
|
-
paddingLeft:
|
|
4880
|
-
paddingRight:
|
|
4937
|
+
paddingLeft: "".concat(addOnWidths.leftAddOnWidth + ADD_ON_HORIZONTAL_PADDING, "px"),
|
|
4938
|
+
paddingRight: "".concat(addOnWidths.rightAddOnWidth + ADD_ON_HORIZONTAL_PADDING, "px")
|
|
4881
4939
|
},
|
|
4882
4940
|
ref: ref
|
|
4883
4941
|
})), getAddOnComponent(rightAddOn, inputClasses.rightAddOn, rightAddOnRef));
|
|
@@ -4900,7 +4958,10 @@ const DropdownSearch = /*#__PURE__*/React__default["default"].forwardRef((_, ref
|
|
|
4900
4958
|
dataTestId,
|
|
4901
4959
|
listboxId
|
|
4902
4960
|
} = useDropdownContext();
|
|
4903
|
-
const handleSelect = () =>
|
|
4961
|
+
const handleSelect = () => {
|
|
4962
|
+
var _inputRef$current;
|
|
4963
|
+
return (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
4964
|
+
};
|
|
4904
4965
|
const myIndex = useChildIndex({
|
|
4905
4966
|
element: internalRef.current,
|
|
4906
4967
|
isVisible: true
|
|
@@ -4909,20 +4970,23 @@ const DropdownSearch = /*#__PURE__*/React__default["default"].forwardRef((_, ref
|
|
|
4909
4970
|
React.useEffect(() => {
|
|
4910
4971
|
// for keyboard navigation
|
|
4911
4972
|
if (isHighlighted) {
|
|
4912
|
-
|
|
4973
|
+
var _inputRef$current2;
|
|
4974
|
+
(_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : _inputRef$current2.focus();
|
|
4913
4975
|
}
|
|
4914
4976
|
}, [isHighlighted]);
|
|
4915
4977
|
React.useEffect(() => {
|
|
4916
4978
|
// for initial open with mouse
|
|
4917
4979
|
if (isHighlighted && isOpen) {
|
|
4918
|
-
|
|
4980
|
+
var _inputRef$current3;
|
|
4981
|
+
(_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : _inputRef$current3.focus();
|
|
4919
4982
|
}
|
|
4920
4983
|
// Omitted `isHighlighted` because we don't want to focus the input on mouse enter.
|
|
4921
4984
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4922
4985
|
}, [isOpen]);
|
|
4923
4986
|
React.useEffect(() => {
|
|
4924
4987
|
if (isOpen) {
|
|
4925
|
-
|
|
4988
|
+
var _internalRef$current;
|
|
4989
|
+
setSearchHeight((_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.offsetHeight);
|
|
4926
4990
|
}
|
|
4927
4991
|
}, [isOpen, setSearchHeight]);
|
|
4928
4992
|
const handleKeyDown = e => {
|
|
@@ -5003,8 +5067,8 @@ const DropdownList = /*#__PURE__*/React__default["default"].forwardRef((_ref, re
|
|
|
5003
5067
|
translate
|
|
5004
5068
|
} = useTranslation();
|
|
5005
5069
|
const noMatchesText = React.useMemo(() => isSearchable && translate('noMatchesFound'), [isSearchable, translate]);
|
|
5006
|
-
const ariaLabelledby = externalAriaLabelledBy
|
|
5007
|
-
const ariaLabel = externalAriaLabel
|
|
5070
|
+
const ariaLabelledby = externalAriaLabelledBy !== null && externalAriaLabelledBy !== void 0 ? externalAriaLabelledBy : ariaLabelledByFromContext;
|
|
5071
|
+
const ariaLabel = externalAriaLabel !== null && externalAriaLabel !== void 0 ? externalAriaLabel : ariaLabelFromContext;
|
|
5008
5072
|
const announceToScreenReader = useScreenReaderAnnouncement('assertive');
|
|
5009
5073
|
const showNoResults = React.useMemo(() => options.filter(option => option.isVisible).length === 1,
|
|
5010
5074
|
// 1 to include the search box entry
|
|
@@ -5035,14 +5099,14 @@ const DropdownList = /*#__PURE__*/React__default["default"].forwardRef((_ref, re
|
|
|
5035
5099
|
"aria-labelledby": ariaLabelledby,
|
|
5036
5100
|
hidden: !isOpen,
|
|
5037
5101
|
onKeyDown: e => {
|
|
5038
|
-
onKeyDown
|
|
5102
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
5039
5103
|
onKeyDownList(e);
|
|
5040
5104
|
},
|
|
5041
5105
|
style: {
|
|
5042
5106
|
minWidth,
|
|
5043
5107
|
...style
|
|
5044
5108
|
},
|
|
5045
|
-
"data-testid": dataTestId
|
|
5109
|
+
"data-testid": dataTestId !== null && dataTestId !== void 0 ? dataTestId : getSubDataTestId(contextDataTestId, 'flyout')
|
|
5046
5110
|
}), isSearchable && /*#__PURE__*/React__default["default"].createElement(DropdownSearch, null), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
5047
5111
|
id: listboxId,
|
|
5048
5112
|
role: "listbox",
|
|
@@ -5059,6 +5123,7 @@ const DropdownList = /*#__PURE__*/React__default["default"].forwardRef((_ref, re
|
|
|
5059
5123
|
});
|
|
5060
5124
|
|
|
5061
5125
|
const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
5126
|
+
var _ref2, _dropdownButton$props, _dropdownButton$props2, _dropdownButton$props3, _dropdownList$props$i, _dropdownList$props;
|
|
5062
5127
|
let {
|
|
5063
5128
|
className,
|
|
5064
5129
|
children,
|
|
@@ -5093,7 +5158,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5093
5158
|
const [searchHeight, setSearchHeight] = React.useState();
|
|
5094
5159
|
React__default["default"].Children.forEach(children, child => {
|
|
5095
5160
|
if ( /*#__PURE__*/React__default["default"].isValidElement(child)) {
|
|
5096
|
-
switch (child
|
|
5161
|
+
switch (child === null || child === void 0 ? void 0 : child.type) {
|
|
5097
5162
|
case DropdownButton:
|
|
5098
5163
|
dropdownButton = child;
|
|
5099
5164
|
break;
|
|
@@ -5106,9 +5171,9 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5106
5171
|
}
|
|
5107
5172
|
});
|
|
5108
5173
|
const containerId = useId(id);
|
|
5109
|
-
const buttonId = dropdownButton.props.children
|
|
5110
|
-
const dialogId = dropdownList.props
|
|
5111
|
-
const listboxId =
|
|
5174
|
+
const buttonId = (_ref2 = (_dropdownButton$props = (_dropdownButton$props2 = dropdownButton.props.children) === null || _dropdownButton$props2 === void 0 ? void 0 : (_dropdownButton$props3 = _dropdownButton$props2.props) === null || _dropdownButton$props3 === void 0 ? void 0 : _dropdownButton$props3.id) !== null && _dropdownButton$props !== void 0 ? _dropdownButton$props : dropdownButton.props.id) !== null && _ref2 !== void 0 ? _ref2 : "".concat(containerId, "-button");
|
|
5175
|
+
const dialogId = (_dropdownList$props$i = (_dropdownList$props = dropdownList.props) === null || _dropdownList$props === void 0 ? void 0 : _dropdownList$props.id) !== null && _dropdownList$props$i !== void 0 ? _dropdownList$props$i : "".concat(containerId, "-list");
|
|
5176
|
+
const listboxId = "".concat(containerId, "-listbox");
|
|
5112
5177
|
const [isOpen, setIsOpen] = useControllableState(false, onIsOpenChange, externalIsOpen);
|
|
5113
5178
|
const [value, setValue] = useControllableState(defaultValue, onChange, externalValue);
|
|
5114
5179
|
const [selectedIndex, setSelectedIndex] = React.useState(0);
|
|
@@ -5130,8 +5195,9 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5130
5195
|
let currentIndex = (highlightedIndex + 1) % options.length; // start at next index
|
|
5131
5196
|
let count = 0;
|
|
5132
5197
|
while (count < options.length) {
|
|
5198
|
+
var _option$label;
|
|
5133
5199
|
const option = options[currentIndex];
|
|
5134
|
-
if (option.label
|
|
5200
|
+
if ((_option$label = option.label) !== null && _option$label !== void 0 && _option$label.toLowerCase().startsWith(lowerCaseChar)) {
|
|
5135
5201
|
index = currentIndex;
|
|
5136
5202
|
break;
|
|
5137
5203
|
}
|
|
@@ -5144,8 +5210,9 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5144
5210
|
}
|
|
5145
5211
|
};
|
|
5146
5212
|
const selectHighlightedItem = e => {
|
|
5213
|
+
var _option$handleSelect;
|
|
5147
5214
|
const option = options[highlightedIndex];
|
|
5148
|
-
option
|
|
5215
|
+
option === null || option === void 0 ? void 0 : (_option$handleSelect = option.handleSelect) === null || _option$handleSelect === void 0 ? void 0 : _option$handleSelect.call(option, e);
|
|
5149
5216
|
};
|
|
5150
5217
|
useClickOutside([buttonRef, listRef], handleClose);
|
|
5151
5218
|
React.useEffect(() => {
|
|
@@ -5165,9 +5232,10 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5165
5232
|
return valueArray;
|
|
5166
5233
|
});
|
|
5167
5234
|
} else {
|
|
5235
|
+
var _buttonRef$current;
|
|
5168
5236
|
setValue(newValue);
|
|
5169
5237
|
handleClose();
|
|
5170
|
-
buttonRef.current
|
|
5238
|
+
(_buttonRef$current = buttonRef.current) === null || _buttonRef$current === void 0 ? void 0 : _buttonRef$current.focus();
|
|
5171
5239
|
}
|
|
5172
5240
|
}, [isMultiSelect, handleClose, setValue]);
|
|
5173
5241
|
const onKeyDownButton = e => {
|
|
@@ -5206,6 +5274,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5206
5274
|
}
|
|
5207
5275
|
};
|
|
5208
5276
|
const onKeyDownList = e => {
|
|
5277
|
+
var _buttonRef$current2, _buttonRef$current3;
|
|
5209
5278
|
let newHighlightedIndex;
|
|
5210
5279
|
if (disabled) return;
|
|
5211
5280
|
switch (e.key) {
|
|
@@ -5246,12 +5315,12 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
5246
5315
|
// close, focus button, and don't let event bubble up
|
|
5247
5316
|
e.stopPropagation();
|
|
5248
5317
|
handleClose();
|
|
5249
|
-
buttonRef.current
|
|
5318
|
+
(_buttonRef$current2 = buttonRef.current) === null || _buttonRef$current2 === void 0 ? void 0 : _buttonRef$current2.focus();
|
|
5250
5319
|
break;
|
|
5251
5320
|
case 'Tab':
|
|
5252
5321
|
// close and focus next focusable element
|
|
5253
5322
|
handleClose();
|
|
5254
|
-
buttonRef.current
|
|
5323
|
+
(_buttonRef$current3 = buttonRef.current) === null || _buttonRef$current3 === void 0 ? void 0 : _buttonRef$current3.focus();
|
|
5255
5324
|
break;
|
|
5256
5325
|
case 'PageUp':
|
|
5257
5326
|
case 'Home':
|
|
@@ -5351,9 +5420,9 @@ const DropdownHeader = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
5351
5420
|
}, commonProps), children) : /*#__PURE__*/React__default["default"].createElement("div", commonProps, children));
|
|
5352
5421
|
});
|
|
5353
5422
|
|
|
5354
|
-
var css_248z$q = ".
|
|
5355
|
-
var styles$p = {"checkbox":"
|
|
5356
|
-
var stylesheet$q=".
|
|
5423
|
+
var css_248z$q = "._FY3g9{display:inline-flex;position:relative}._FY3g9,._sv-vr{cursor:pointer;height:16px;width:16px}._sv-vr{position:absolute;opacity:0;z-index:10}._sv-vr._6UjZM~._Xv4Z3>._Vlh3K{fill-opacity:1}._sv-vr._6UjZM~._Xv4Z3{border-color:transparent;background-color:#0b6ed0}._sv-vr._6UjZM~._Xv4Z3>._Vlh3K{fill:#fff}._sv-vr._6UjZM:hover~._Xv4Z3{background-color:#085caf}._sv-vr:not(._6UjZM):hover~._Xv4Z3{border-color:#0b6ed0}._sv-vr._loRI8{cursor:not-allowed}._sv-vr._loRI8~._Xv4Z3{opacity:.4}._Xv4Z3{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0}._Vlh3K{fill:#0b6ed0;fill-opacity:0}";
|
|
5424
|
+
var styles$p = {"checkbox":"_FY3g9","input":"_sv-vr","checked":"_6UjZM","check":"_Xv4Z3","checkIcon":"_Vlh3K","disabled":"_loRI8"};
|
|
5425
|
+
var stylesheet$q="._FY3g9{display:inline-flex;position:relative}._FY3g9,._sv-vr{cursor:pointer;height:16px;width:16px}._sv-vr{position:absolute;opacity:0;z-index:10}._sv-vr._6UjZM~._Xv4Z3>._Vlh3K{fill-opacity:1}._sv-vr._6UjZM~._Xv4Z3{border-color:transparent;background-color:#0b6ed0}._sv-vr._6UjZM~._Xv4Z3>._Vlh3K{fill:#fff}._sv-vr._6UjZM:hover~._Xv4Z3{background-color:#085caf}._sv-vr:not(._6UjZM):hover~._Xv4Z3{border-color:#0b6ed0}._sv-vr._loRI8{cursor:not-allowed}._sv-vr._loRI8~._Xv4Z3{opacity:.4}._Xv4Z3{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0}._Vlh3K{fill:#0b6ed0;fill-opacity:0}";
|
|
5357
5426
|
icons_index.styleInject(css_248z$q);
|
|
5358
5427
|
|
|
5359
5428
|
// Internal only component, used with Dropdown and SelectMenu multiselects.
|
|
@@ -5416,7 +5485,7 @@ const DropdownOption = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
5416
5485
|
return isSearchFilteringDisabled || !label || !searchValue || typeof label === 'string' && _includesInstanceProperty__default["default"](_context = label.toLowerCase()).call(_context, searchValue.toLowerCase());
|
|
5417
5486
|
}, [isSearchFilteringDisabled, label, searchValue]);
|
|
5418
5487
|
React.useEffect(() => {
|
|
5419
|
-
setVisibleChildIds
|
|
5488
|
+
setVisibleChildIds === null || setVisibleChildIds === void 0 ? void 0 : setVisibleChildIds(visibleChildIds => {
|
|
5420
5489
|
const duplicateSet = new Set(visibleChildIds);
|
|
5421
5490
|
if (isVisible) {
|
|
5422
5491
|
return duplicateSet.add(value);
|
|
@@ -5443,7 +5512,8 @@ const DropdownOption = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
5443
5512
|
const isHighlighted = highlightedIndex === myIndex && myIndex !== -1;
|
|
5444
5513
|
React.useEffect(() => {
|
|
5445
5514
|
if (isHighlighted) {
|
|
5446
|
-
|
|
5515
|
+
var _listRef$current, _listRef$current2, _internalRef$current;
|
|
5516
|
+
if (isOpen && internalRef !== null && internalRef !== void 0 && internalRef.current && listRef !== null && listRef !== void 0 && listRef.current && ((_listRef$current = listRef.current) === null || _listRef$current === void 0 ? void 0 : _listRef$current.scrollHeight) > ((_listRef$current2 = listRef.current) === null || _listRef$current2 === void 0 ? void 0 : _listRef$current2.clientHeight)) {
|
|
5447
5517
|
const scrollBottom = listRef.current.clientHeight + listRef.current.scrollTop;
|
|
5448
5518
|
const elementBottom = internalRef.current.offsetTop + internalRef.current.offsetHeight;
|
|
5449
5519
|
if (elementBottom > scrollBottom) {
|
|
@@ -5452,7 +5522,7 @@ const DropdownOption = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
5452
5522
|
listRef.current.scrollTop = internalRef.current.offsetTop - (isSearchable ? searchHeight : 0);
|
|
5453
5523
|
}
|
|
5454
5524
|
}
|
|
5455
|
-
internalRef.current
|
|
5525
|
+
(_internalRef$current = internalRef.current) === null || _internalRef$current === void 0 ? void 0 : _internalRef$current.focus({
|
|
5456
5526
|
preventScroll: true
|
|
5457
5527
|
});
|
|
5458
5528
|
}
|
|
@@ -5481,9 +5551,9 @@ const DropdownOption = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
5481
5551
|
});
|
|
5482
5552
|
});
|
|
5483
5553
|
|
|
5484
|
-
var css_248z$p = ".
|
|
5485
|
-
var filePickerStyles = {"container":"
|
|
5486
|
-
var stylesheet$p=".
|
|
5554
|
+
var css_248z$p = "._zuuNz{position:relative}._zuuNz[focus-within] button{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zuuNz:focus-within button{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._mDaRv{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._GjFbw{margin-left:16px;font-size:14px;color:#32363a}._GjFbw ._VXejk{margin-right:16px}";
|
|
5555
|
+
var filePickerStyles = {"container":"_zuuNz","fileInput":"_mDaRv","fileDetails":"_GjFbw","fileName":"_VXejk"};
|
|
5556
|
+
var stylesheet$p="._zuuNz{position:relative}._zuuNz[focus-within] button{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zuuNz:focus-within button{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._mDaRv{opacity:0;position:absolute;height:36px;width:100%;left:0;z-index:-1}._GjFbw{margin-left:16px;font-size:14px;color:#32363a}._GjFbw ._VXejk{margin-right:16px}";
|
|
5487
5557
|
icons_index.styleInject(css_248z$p);
|
|
5488
5558
|
|
|
5489
5559
|
const FileDetails = _ref => {
|
|
@@ -5521,8 +5591,8 @@ const FilePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
5521
5591
|
const [filesChanged, setFilesChanged] = React.useState(false);
|
|
5522
5592
|
const [files, setFiles] = useControllableState(undefined, undefined, externalFiles);
|
|
5523
5593
|
const fileInputId = useId(externalId);
|
|
5524
|
-
const fileDetailsId =
|
|
5525
|
-
const buttonId =
|
|
5594
|
+
const fileDetailsId = "".concat(fileInputId, "-fileDetails");
|
|
5595
|
+
const buttonId = "".concat(fileInputId, "-button");
|
|
5526
5596
|
const fileInputRef = React.useRef(null);
|
|
5527
5597
|
const buttonRef = React.useRef(null);
|
|
5528
5598
|
|
|
@@ -5534,12 +5604,13 @@ const FilePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
5534
5604
|
|
|
5535
5605
|
// returns focus to input after closing system dialog
|
|
5536
5606
|
useDidUpdate(() => {
|
|
5537
|
-
|
|
5607
|
+
var _fileInputRef$current;
|
|
5608
|
+
(_fileInputRef$current = fileInputRef.current) === null || _fileInputRef$current === void 0 ? void 0 : _fileInputRef$current.focus();
|
|
5538
5609
|
}, [filesChanged]);
|
|
5539
5610
|
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
5540
5611
|
const handleChange = e => {
|
|
5541
5612
|
setFiles(e.target.files, e);
|
|
5542
|
-
onChange
|
|
5613
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
5543
5614
|
// This is needed due to CFE-508
|
|
5544
5615
|
setFilesChanged(val => !val);
|
|
5545
5616
|
};
|
|
@@ -5557,10 +5628,16 @@ const FilePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
5557
5628
|
}, /*#__PURE__*/React__default["default"].createElement(Button, {
|
|
5558
5629
|
disabled: disabled,
|
|
5559
5630
|
kind: "secondary",
|
|
5560
|
-
onClick: () =>
|
|
5631
|
+
onClick: () => {
|
|
5632
|
+
var _fileInputRef$current2;
|
|
5633
|
+
return (_fileInputRef$current2 = fileInputRef.current) === null || _fileInputRef$current2 === void 0 ? void 0 : _fileInputRef$current2.click();
|
|
5634
|
+
},
|
|
5561
5635
|
tabIndex: -1,
|
|
5562
5636
|
ref: buttonRef,
|
|
5563
|
-
onFocus: () =>
|
|
5637
|
+
onFocus: () => {
|
|
5638
|
+
var _fileInputRef$current3;
|
|
5639
|
+
return (_fileInputRef$current3 = fileInputRef.current) === null || _fileInputRef$current3 === void 0 ? void 0 : _fileInputRef$current3.focus();
|
|
5640
|
+
},
|
|
5564
5641
|
id: buttonId,
|
|
5565
5642
|
"aria-hidden": true
|
|
5566
5643
|
}, buttonLabel), /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({}, rest, {
|
|
@@ -5581,14 +5658,14 @@ const FilePicker = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref
|
|
|
5581
5658
|
}));
|
|
5582
5659
|
});
|
|
5583
5660
|
|
|
5584
|
-
var css_248z$o = ".
|
|
5585
|
-
var styles$o = {"formField":"
|
|
5586
|
-
var stylesheet$o=".
|
|
5661
|
+
var css_248z$o = "._Yd7Hx{display:flex;flex-direction:column;align-items:flex-start}._F8xit{margin-top:6px;max-width:100%}._F8xit *+*{margin-top:4px}";
|
|
5662
|
+
var styles$o = {"formField":"_Yd7Hx","captionContainer":"_F8xit"};
|
|
5663
|
+
var stylesheet$o="._Yd7Hx{display:flex;flex-direction:column;align-items:flex-start}._F8xit{margin-top:6px;max-width:100%}._F8xit *+*{margin-top:4px}";
|
|
5587
5664
|
icons_index.styleInject(css_248z$o);
|
|
5588
5665
|
|
|
5589
|
-
var css_248z$n = ".
|
|
5590
|
-
var styles$n = {"caption":"
|
|
5591
|
-
var stylesheet$n=".
|
|
5666
|
+
var css_248z$n = "._-wver{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._IioSN{color:#74777a;fill:#74777a}._ewz3v{color:#b00;fill:#b00}._4vVvE,._AABoa{margin-left:-2px;margin-right:3px}";
|
|
5667
|
+
var styles$n = {"caption":"_-wver","helperText":"_IioSN","errorText":"_ewz3v","errorIcon":"_AABoa","readOnlyIcon":"_4vVvE"};
|
|
5668
|
+
var stylesheet$n="._-wver{display:flex;align-items:center;font-size:12px;line-height:16px;min-height:16px}._IioSN{color:#74777a;fill:#74777a}._ewz3v{color:#b00;fill:#b00}._4vVvE,._AABoa{margin-left:-2px;margin-right:3px}";
|
|
5592
5669
|
icons_index.styleInject(css_248z$n);
|
|
5593
5670
|
|
|
5594
5671
|
const HelperText = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -5655,8 +5732,8 @@ const FormField = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
5655
5732
|
const [hasLabel, setHasLabel] = React.useState(false);
|
|
5656
5733
|
const [formFieldType, setFormFieldType] = React.useState('');
|
|
5657
5734
|
const containerId = useId(externalId);
|
|
5658
|
-
const helperTextId = helperText ?
|
|
5659
|
-
const errorTextId = errorText ?
|
|
5735
|
+
const helperTextId = helperText ? "".concat(containerId, "-helper-text") : undefined;
|
|
5736
|
+
const errorTextId = errorText ? "".concat(containerId, "-error-text") : undefined;
|
|
5660
5737
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
5661
5738
|
ref: mergeRefs(ref, focusRef),
|
|
5662
5739
|
className: classNames__default["default"](className, {
|
|
@@ -5687,9 +5764,9 @@ const FormField = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
5687
5764
|
}, errorText)) : null);
|
|
5688
5765
|
});
|
|
5689
5766
|
|
|
5690
|
-
var css_248z$m = ".
|
|
5691
|
-
var styles$m = {"dialog":"
|
|
5692
|
-
var stylesheet$m=".
|
|
5767
|
+
var css_248z$m = "._46s5L{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@keyframes _jNA2r{0%{transform:scale3d(.7,.7,.7);opacity:0}}._GnAV3{animation:_jNA2r both;animation-duration:.2s}@keyframes _FaBW-{to{transform:scale3d(.7,.7,.7);opacity:0}}._wEFcZ{animation:_FaBW- both;animation-duration:.2s}";
|
|
5768
|
+
var styles$m = {"dialog":"_46s5L","transitionIn":"_GnAV3","showAnimation":"_jNA2r","transitionOut":"_wEFcZ","hideAnimation":"_FaBW-"};
|
|
5769
|
+
var stylesheet$m="._46s5L{position:fixed;left:0;top:0;width:100vw;height:100vh;background-color:#fff;overflow:auto}@keyframes _jNA2r{0%{transform:scale3d(.7,.7,.7);opacity:0}}._GnAV3{animation:_jNA2r both;animation-duration:.2s}@keyframes _FaBW-{to{transform:scale3d(.7,.7,.7);opacity:0}}._wEFcZ{animation:_FaBW- both;animation-duration:.2s}";
|
|
5693
5770
|
icons_index.styleInject(css_248z$m);
|
|
5694
5771
|
|
|
5695
5772
|
const FullScreenTakeover = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -5722,14 +5799,16 @@ const FullScreenTakeover = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
5722
5799
|
React.useEffect(() => {
|
|
5723
5800
|
// If `focusedElementWhenDialogOpened` has been set, then we know that the element has been opened at least once. Without this check, the component will focus `elementRefToFocusOnClose` on page load.
|
|
5724
5801
|
if (!isInDOM && focusedElementWhenDialogOpened) {
|
|
5725
|
-
|
|
5726
|
-
elementToFocus
|
|
5802
|
+
var _elementRefToFocusOnC;
|
|
5803
|
+
const elementToFocus = (_elementRefToFocusOnC = elementRefToFocusOnClose === null || elementRefToFocusOnClose === void 0 ? void 0 : elementRefToFocusOnClose.current) !== null && _elementRefToFocusOnC !== void 0 ? _elementRefToFocusOnC : focusedElementWhenDialogOpened;
|
|
5804
|
+
elementToFocus === null || elementToFocus === void 0 ? void 0 : elementToFocus.focus();
|
|
5727
5805
|
}
|
|
5728
5806
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
5729
5807
|
}, [isInDOM, focusedElementWhenDialogOpened]);
|
|
5730
5808
|
const handleAnimationEnd = () => {
|
|
5731
5809
|
if (isOpen) {
|
|
5732
|
-
|
|
5810
|
+
var _ref2, _elementRefToFocusOnO;
|
|
5811
|
+
(_ref2 = (_elementRefToFocusOnO = elementRefToFocusOnOpen === null || elementRefToFocusOnOpen === void 0 ? void 0 : elementRefToFocusOnOpen.current) !== null && _elementRefToFocusOnO !== void 0 ? _elementRefToFocusOnO : dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _ref2 === void 0 ? void 0 : _ref2.focus();
|
|
5733
5812
|
} else {
|
|
5734
5813
|
setIsInDOM(false);
|
|
5735
5814
|
}
|
|
@@ -5772,7 +5851,7 @@ const deprecated = {
|
|
|
5772
5851
|
function deprecationWarning(type) {
|
|
5773
5852
|
if (deprecated[type]) {
|
|
5774
5853
|
// eslint-disable-next-line no-console
|
|
5775
|
-
console.warn(
|
|
5854
|
+
console.warn("\"IconTypes.".concat(type, "\" has been deprecated! Use \"IconTypes.").concat(deprecated[type], "\" instead."));
|
|
5776
5855
|
}
|
|
5777
5856
|
}
|
|
5778
5857
|
const Icon = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -5782,7 +5861,7 @@ const Icon = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
5782
5861
|
...rest
|
|
5783
5862
|
} = _ref;
|
|
5784
5863
|
// eslint-disable-next-line no-console
|
|
5785
|
-
console.warn(
|
|
5864
|
+
console.warn("<Icon> component is deprecated! Use individual icon components from the @qualtrics/ui-react/icons import path instead", type);
|
|
5786
5865
|
deprecationWarning(type);
|
|
5787
5866
|
const svgContent = componentStyles.IconData[deprecated[type] || type];
|
|
5788
5867
|
const pixels = IconSizes[size];
|
|
@@ -6270,9 +6349,9 @@ var IconTypes = {
|
|
|
6270
6349
|
WorkingFromHome: 'WorkingFromHome'
|
|
6271
6350
|
};
|
|
6272
6351
|
|
|
6273
|
-
var css_248z$l = ".
|
|
6274
|
-
var styles$l = {"container":"
|
|
6275
|
-
var stylesheet$l=".
|
|
6352
|
+
var css_248z$l = "._Zad4U{display:inline-block}._h-Q9X{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._h-Q9X::-moz-selection{background-color:rgba(11,110,208,.11)}._h-Q9X::selection{background-color:rgba(11,110,208,.11)}._h-Q9X:focus,._h-Q9X:hover{background-color:#f5f5f5}._h-Q9X:focus{border:2px solid #0a3f88;padding:3px}._h-Q9X:focus._oauQC{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
|
|
6353
|
+
var styles$l = {"container":"_Zad4U","inlineInput":"_h-Q9X","isEditing":"_oauQC"};
|
|
6354
|
+
var stylesheet$l="._Zad4U{display:inline-block}._h-Q9X{color:#085caf;cursor:pointer;font-size:14px;box-sizing:border-box;padding:4px;margin:-5px;outline:0;border:1px solid transparent;border-radius:4px;background-clip:padding-box;display:block}._h-Q9X::-moz-selection{background-color:rgba(11,110,208,.11)}._h-Q9X::selection{background-color:rgba(11,110,208,.11)}._h-Q9X:focus,._h-Q9X:hover{background-color:#f5f5f5}._h-Q9X:focus{border:2px solid #0a3f88;padding:3px}._h-Q9X:focus._oauQC{background-color:#fafafa;cursor:text;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 1px 8px hsla(0,0%,66.7%,.5)}";
|
|
6276
6355
|
icons_index.styleInject(css_248z$l);
|
|
6277
6356
|
|
|
6278
6357
|
const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -6297,19 +6376,19 @@ const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
6297
6376
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
6298
6377
|
// @ts-ignore: Property 'value' does not exist on type 'HTMLSpanElement'
|
|
6299
6378
|
e.target.value = newVal;
|
|
6300
|
-
onChange
|
|
6379
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
6301
6380
|
setLastVal(newVal);
|
|
6302
6381
|
}
|
|
6303
6382
|
});
|
|
6304
6383
|
const handleBlur = e => {
|
|
6305
6384
|
setIsEditing(false);
|
|
6306
6385
|
e.target.value = e.target.innerText;
|
|
6307
|
-
onBlur
|
|
6386
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
6308
6387
|
};
|
|
6309
6388
|
const handleFocus = e => {
|
|
6310
6389
|
setIsEditing(true);
|
|
6311
6390
|
e.target.value = e.target.innerText;
|
|
6312
|
-
onFocus
|
|
6391
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
6313
6392
|
};
|
|
6314
6393
|
const handleKeyDown = e => {
|
|
6315
6394
|
if (e.key === 'Enter') {
|
|
@@ -6320,13 +6399,13 @@ const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
6320
6399
|
e.stopPropagation(); // prevent event from closing modals or popovers
|
|
6321
6400
|
setIsEditing(false);
|
|
6322
6401
|
}
|
|
6323
|
-
onKeyDown
|
|
6402
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
6324
6403
|
};
|
|
6325
6404
|
const handleMouseDown = e => {
|
|
6326
6405
|
if (isFocused) {
|
|
6327
6406
|
setIsEditing(true);
|
|
6328
6407
|
}
|
|
6329
|
-
onMouseDown
|
|
6408
|
+
onMouseDown === null || onMouseDown === void 0 ? void 0 : onMouseDown(e);
|
|
6330
6409
|
};
|
|
6331
6410
|
const handlePaste = e => {
|
|
6332
6411
|
// Strip formatting and newlines from pasted data
|
|
@@ -6334,7 +6413,7 @@ const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
6334
6413
|
e.preventDefault(); // prevent paste and manually insert text after stripping formatting
|
|
6335
6414
|
const text = e.clipboardData.getData('text').replace(/[\n\r]/g, ' ');
|
|
6336
6415
|
const selection = window.getSelection();
|
|
6337
|
-
const range = selection
|
|
6416
|
+
const range = selection === null || selection === void 0 ? void 0 : selection.getRangeAt(0);
|
|
6338
6417
|
if (range && selection) {
|
|
6339
6418
|
range.deleteContents();
|
|
6340
6419
|
const textNode = document.createTextNode(text);
|
|
@@ -6349,13 +6428,16 @@ const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
6349
6428
|
};
|
|
6350
6429
|
useDidUpdate(() => {
|
|
6351
6430
|
if (typeof window !== 'undefined') {
|
|
6431
|
+
var _window$getSelection2;
|
|
6352
6432
|
if (isEditing && isFocused && internalRef.current) {
|
|
6353
|
-
|
|
6433
|
+
var _window$getSelection;
|
|
6434
|
+
(_window$getSelection = window.getSelection()) === null || _window$getSelection === void 0 ? void 0 : _window$getSelection.selectAllChildren(internalRef.current);
|
|
6354
6435
|
}
|
|
6355
6436
|
// Clear window selection only if it is on the InlineInput. Without this check, we would mistakenly clear the
|
|
6356
6437
|
// selection after focus moves from this component to an Input or another component that sets the window selection.
|
|
6357
|
-
else if (internalRef.current && window.getSelection()
|
|
6358
|
-
|
|
6438
|
+
else if (internalRef.current && (_window$getSelection2 = window.getSelection()) !== null && _window$getSelection2 !== void 0 && _window$getSelection2.containsNode(internalRef.current, true)) {
|
|
6439
|
+
var _window$getSelection3;
|
|
6440
|
+
(_window$getSelection3 = window.getSelection()) === null || _window$getSelection3 === void 0 ? void 0 : _window$getSelection3.removeAllRanges();
|
|
6359
6441
|
}
|
|
6360
6442
|
}
|
|
6361
6443
|
}, [isEditing, isFocused]);
|
|
@@ -6390,9 +6472,9 @@ const InlineInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
6390
6472
|
}), defaultValue));
|
|
6391
6473
|
});
|
|
6392
6474
|
|
|
6393
|
-
var css_248z$k = ".
|
|
6394
|
-
var styles$k = {"addon":"
|
|
6395
|
-
var stylesheet$k=".
|
|
6475
|
+
var css_248z$k = "._nqeU0{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._nqeU0._PtJ4X{height:26px;min-height:26px;padding:5px 8px}._lxped{display:flex;align-items:stretch}._lxped._h6tUf{width:100%}._lxped ._D3saP{margin:0;position:relative;flex-shrink:0;z-index:10}._lxped ._D3saP:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._lxped ._D3saP:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._lxped ._D3saP:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._lxped ._D3saP:last-child,._lxped ._D3saP:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._lxped ._D3saP:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._lxped ._D3saP._GPjFc{flex-shrink:1;min-width:40px;z-index:0}._lxped ._D3saP._GPjFc._h6tUf{flex-grow:1}._lxped ._D3saP:focus{z-index:20}";
|
|
6476
|
+
var styles$k = {"addon":"_nqeU0","small":"_PtJ4X","inputGroup":"_lxped","full":"_h6tUf","inputGroupElement":"_D3saP","input":"_GPjFc"};
|
|
6477
|
+
var stylesheet$k="._nqeU0{border:1px solid #898989;border-radius:4px;height:36px;min-height:36px;color:#6a6d70;fill:#6a6d70;background-color:#fafafa;font-size:14px;display:inline-flex;justify-content:center;align-items:center;line-height:1;padding:0 13px}._nqeU0._PtJ4X{height:26px;min-height:26px;padding:5px 8px}._lxped{display:flex;align-items:stretch}._lxped._h6tUf{width:100%}._lxped ._D3saP{margin:0;position:relative;flex-shrink:0;z-index:10}._lxped ._D3saP:first-child{margin:0 -1px 0 0;border-top-left-radius:4px;border-bottom-left-radius:4px;border-top-right-radius:0;border-bottom-right-radius:0}._lxped ._D3saP:not(:last-child):not(:first-child){margin:0 -1px 0 0;border-radius:0}._lxped ._D3saP:last-child{border-top-left-radius:0;border-bottom-left-radius:0}._lxped ._D3saP:last-child,._lxped ._D3saP:only-child{margin:0;border-top-right-radius:4px;border-bottom-right-radius:4px}._lxped ._D3saP:only-child{border-top-left-radius:4px;border-bottom-left-radius:4px}._lxped ._D3saP._GPjFc{flex-shrink:1;min-width:40px;z-index:0}._lxped ._D3saP._GPjFc._h6tUf{flex-grow:1}._lxped ._D3saP:focus{z-index:20}";
|
|
6396
6478
|
icons_index.styleInject(css_248z$k);
|
|
6397
6479
|
|
|
6398
6480
|
const InputGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -6437,9 +6519,9 @@ const InputGroupAddon = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
6437
6519
|
}), children);
|
|
6438
6520
|
});
|
|
6439
6521
|
|
|
6440
|
-
var css_248z$j = ".
|
|
6441
|
-
var styles$j = {"link":"
|
|
6442
|
-
var stylesheet$j=".
|
|
6522
|
+
var css_248z$j = "._ryU-6{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._ryU-6:active:focus,._ryU-6:focus{outline:none}._ryU-6:visited{color:#0854a1}._ryU-6:hover{color:#085caf}._ryU-6:active{color:#0854a1}._ryU-6.focus-visible,._ryU-6:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6523
|
+
var styles$j = {"link":"_ryU-6"};
|
|
6524
|
+
var stylesheet$j="._ryU-6{color:#0b6ed0;cursor:pointer;text-decoration:underline;text-decoration-thickness:1px;-webkit-text-decoration-skip:ink;text-decoration-skip-ink:auto;text-underline-offset:3px;border-radius:1px}._ryU-6:active:focus,._ryU-6:focus{outline:none}._ryU-6:visited{color:#0854a1}._ryU-6:hover{color:#085caf}._ryU-6:active{color:#0854a1}._ryU-6.focus-visible,._ryU-6:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6443
6525
|
icons_index.styleInject(css_248z$j);
|
|
6444
6526
|
|
|
6445
6527
|
const Link = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -6461,9 +6543,9 @@ const Link = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
6461
6543
|
}), children);
|
|
6462
6544
|
});
|
|
6463
6545
|
|
|
6464
|
-
var css_248z$i = ".
|
|
6465
|
-
var styles$i = {"set":"
|
|
6466
|
-
var stylesheet$i=".
|
|
6546
|
+
var css_248z$i = "._anGvB{width:100%}._GkeQO{display:flex;align-items:center}._ihMVI{display:flex;flex-wrap:wrap;grid-gap:4px}._ihMVI :nth-last-child(2){margin-right:42px}._Lh4xl{position:relative;padding-left:32px;padding-top:16px;display:flex}._dTAXK ._Lh4xl{padding-top:0;padding-left:16px}._dTAXK ._Lh4xl+._Lh4xl{margin-top:16px}._Cvd5Y{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._dTAXK ._Lh4xl:first-of-type ._Cvd5Y{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._dTAXK ._Cvd5Y{top:-16px;left:0}._dTAXK ._Lh4xl:not(:first-of-type):not(:last-of-type) ._Cvd5Y{border-bottom-left-radius:0}._BUIhz{margin-left:-46px}._AAChe{margin:0 2px 0 4px}._AAChe.focus-visible,._AAChe:focus-visible{outline-width:2px}._2DHUW{margin-left:4px}";
|
|
6547
|
+
var styles$i = {"set":"_anGvB","setWrapper":"_GkeQO","condition":"_ihMVI","branch":"_Lh4xl","fixedSet":"_dTAXK","connection":"_Cvd5Y","conditionControlsContainer":"_BUIhz","controls":"_AAChe","controlMenuItem":"_2DHUW"};
|
|
6548
|
+
var stylesheet$i="._anGvB{width:100%}._GkeQO{display:flex;align-items:center}._ihMVI{display:flex;flex-wrap:wrap;grid-gap:4px}._ihMVI :nth-last-child(2){margin-right:42px}._Lh4xl{position:relative;padding-left:32px;padding-top:16px;display:flex}._dTAXK ._Lh4xl{padding-top:0;padding-left:16px}._dTAXK ._Lh4xl+._Lh4xl{margin-top:16px}._Cvd5Y{position:absolute;left:16px;top:0;height:34px;width:16px;border-left:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;border-bottom-left-radius:4px}._dTAXK ._Lh4xl:first-of-type ._Cvd5Y{top:16px;border-bottom:none;border-bottom-left-radius:0;border-top:1px solid #c2c2c2;border-top-left-radius:4px}._dTAXK ._Cvd5Y{top:-16px;left:0}._dTAXK ._Lh4xl:not(:first-of-type):not(:last-of-type) ._Cvd5Y{border-bottom-left-radius:0}._BUIhz{margin-left:-46px}._AAChe{margin:0 2px 0 4px}._AAChe.focus-visible,._AAChe:focus-visible{outline-width:2px}._2DHUW{margin-left:4px}";
|
|
6467
6549
|
icons_index.styleInject(css_248z$i);
|
|
6468
6550
|
|
|
6469
6551
|
/* eslint-disable @typescript-eslint/no-use-before-define */
|
|
@@ -6494,7 +6576,8 @@ function constructValidDefaultState(_ref) {
|
|
|
6494
6576
|
return clone;
|
|
6495
6577
|
}
|
|
6496
6578
|
function fixedSetHasNoConditions(defaultValue, fixedSet) {
|
|
6497
|
-
|
|
6579
|
+
var _defaultValue$conditi;
|
|
6580
|
+
return fixedSet && defaultValue && (!(defaultValue !== null && defaultValue !== void 0 && defaultValue.conditions) || !((defaultValue === null || defaultValue === void 0 ? void 0 : (_defaultValue$conditi = defaultValue.conditions) === null || _defaultValue$conditi === void 0 ? void 0 : _defaultValue$conditi.length) >= 1));
|
|
6498
6581
|
}
|
|
6499
6582
|
function ensureFixedSetHasOneCondition(defaultValue, fixedSet) {
|
|
6500
6583
|
if (fixedSetHasNoConditions(defaultValue, fixedSet)) {
|
|
@@ -6636,9 +6719,9 @@ const ConditionContainer = function ConditionContainer(_ref) {
|
|
|
6636
6719
|
}), conditionControls);
|
|
6637
6720
|
};
|
|
6638
6721
|
|
|
6639
|
-
var css_248z$h = ".
|
|
6640
|
-
var styles$h = {"menuBtn":"
|
|
6641
|
-
var stylesheet$h=".
|
|
6722
|
+
var css_248z$h = "._60mfK._60mfK{min-width:0;max-width:100%;padding:0 4px 0 12px;white-space:nowrap;line-height:20px;font-size:14px;cursor:pointer;justify-content:space-between;text-align:left;outline:none;background-color:#fafafa;border:none;box-shadow:inset 0 0 0 1px #898989;border-radius:4px;height:36px;color:#515559;fill:#515559}._60mfK._60mfK,._60mfK._60mfK ._wGBb3{display:inline-flex;align-items:center}._60mfK._60mfK ._wGBb3{overflow:hidden;text-overflow:ellipsis}._60mfK._60mfK._naGrE{min-height:26px;height:26px}._60mfK._60mfK._ZvVGR{color:#32363a}._60mfK._60mfK:hover:not([aria-disabled=true]){background-color:#f5f5f5}._60mfK._60mfK:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._60mfK._60mfK[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._60mfK._60mfK[aria-disabled=true]>svg{fill:#515559;opacity:.4}._60mfK._60mfK[aria-disabled=true]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._60mfK._60mfK._cikaT{padding-left:0}._60mfK._60mfK._xR8IM{margin-top:4px}._60mfK._60mfK ._hmZF5{fill:#515559}._60mfK._60mfK ._hmZF5._naGrE{top:0}._60mfK._60mfK ._hmZF5._SBAGM{transform:rotate(-180deg)}._-g0t4{margin: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-x:hidden;overflow-y:auto;overflow:hidden auto}._-g0t4::-webkit-scrollbar,._-g0t4::-webkit-scrollbar-thumb{visibility:hidden;width:8px;border-radius:4px}._-g0t4::-webkit-scrollbar{background-color:rgba(0,0,0,.06)}._-g0t4::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.4)}._-g0t4:hover::-webkit-scrollbar,._-g0t4:hover::-webkit-scrollbar-thumb,._-g0t4[focus-within]::-webkit-scrollbar,._-g0t4[focus-within]::-webkit-scrollbar-thumb{visibility:visible}._-g0t4:focus-within::-webkit-scrollbar,._-g0t4:focus-within::-webkit-scrollbar-thumb,._-g0t4:hover::-webkit-scrollbar,._-g0t4:hover::-webkit-scrollbar-thumb{visibility:visible}._RsVxs{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._RsVxs[aria-disabled=true]{cursor:not-allowed;color:rgba(50,54,58,.65);fill:rgba(50,54,58,.65)}._RsVxs._DKBC6{background-color:#efefef}._RsVxs._M70bO{box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._RsVxs._ZvVGR{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._RsVxs._ZvVGR._DKBC6{background-color:#e4effa}._RsVxs._TJUMw{cursor:default}._RsVxs:active:not(._-DBWB):not(._ZvVGR):not([aria-disabled=true]):not(._TJUMw){background-color:#e8e9e9}._-DBWB{padding-right:32px}._-DBWB ._hmZF5{position:absolute;top:8px;right:3px;fill:#515559}._AYlq7{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;position:-webkit-sticky;position:sticky;top:0;z-index:20;background-color:#fff}._AAP-Y{position:absolute;top:13px;left:13px}._jHpj7._jHpj7{padding-left:32px}._xsdFo{margin:2px 12px 2px 0;flex-shrink:0}._xsdFo._rwIGj>svg{border-color:#0b6ed0}._GOSTK{display:flex;justify-self:center;margin:8px}";
|
|
6723
|
+
var styles$h = {"menuBtn":"_60mfK","menuBtnLabel":"_wGBb3","small":"_naGrE","selected":"_ZvVGR","unlabelledButton":"_cikaT","formLabelled":"_xR8IM","rightIcon":"_hmZF5","open":"_SBAGM","contentPane":"_-g0t4","menuItem":"_RsVxs","active":"_DKBC6","focus":"_M70bO","noMenuItems":"_TJUMw","subMenu":"_-DBWB","searchBox":"_AYlq7","searchBoxIcon":"_AAP-Y","searchBoxInput":"_jHpj7","checkbox":"_xsdFo","highlighted":"_rwIGj","menuSpinner":"_GOSTK"};
|
|
6724
|
+
var stylesheet$h="._60mfK._60mfK{min-width:0;max-width:100%;padding:0 4px 0 12px;white-space:nowrap;line-height:20px;font-size:14px;cursor:pointer;justify-content:space-between;text-align:left;outline:none;background-color:#fafafa;border:none;box-shadow:inset 0 0 0 1px #898989;border-radius:4px;height:36px;color:#515559;fill:#515559}._60mfK._60mfK,._60mfK._60mfK ._wGBb3{display:inline-flex;align-items:center}._60mfK._60mfK ._wGBb3{overflow:hidden;text-overflow:ellipsis}._60mfK._60mfK._naGrE{min-height:26px;height:26px}._60mfK._60mfK._ZvVGR{color:#32363a}._60mfK._60mfK:hover:not([aria-disabled=true]){background-color:#f5f5f5}._60mfK._60mfK:focus{background-color:#fafafa;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._60mfK._60mfK[aria-disabled=true]{box-shadow:inset 0 0 0 1px #e5e5e5;color:#74777a;cursor:not-allowed}._60mfK._60mfK[aria-disabled=true]>svg{fill:#515559;opacity:.4}._60mfK._60mfK[aria-disabled=true]:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._60mfK._60mfK._cikaT{padding-left:0}._60mfK._60mfK._xR8IM{margin-top:4px}._60mfK._60mfK ._hmZF5{fill:#515559}._60mfK._60mfK ._hmZF5._naGrE{top:0}._60mfK._60mfK ._hmZF5._SBAGM{transform:rotate(-180deg)}._-g0t4{margin: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-x:hidden;overflow-y:auto;overflow:hidden auto}._-g0t4::-webkit-scrollbar,._-g0t4::-webkit-scrollbar-thumb{visibility:hidden;width:8px;border-radius:4px}._-g0t4::-webkit-scrollbar{background-color:rgba(0,0,0,.06)}._-g0t4::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.4)}._-g0t4:hover::-webkit-scrollbar,._-g0t4:hover::-webkit-scrollbar-thumb,._-g0t4[focus-within]::-webkit-scrollbar,._-g0t4[focus-within]::-webkit-scrollbar-thumb{visibility:visible}._-g0t4:focus-within::-webkit-scrollbar,._-g0t4:focus-within::-webkit-scrollbar-thumb,._-g0t4:hover::-webkit-scrollbar,._-g0t4:hover::-webkit-scrollbar-thumb{visibility:visible}._RsVxs{position:relative;padding:10px 12px;min-height:40px;display:flex;flex-direction:row;align-items:center;cursor:pointer;outline:none;word-break:break-word}._RsVxs[aria-disabled=true]{cursor:not-allowed;color:rgba(50,54,58,.65);fill:rgba(50,54,58,.65)}._RsVxs._DKBC6{background-color:#efefef}._RsVxs._M70bO{box-shadow:inset 0 0 0 2px #0a3f88,inset 0 0 0 4px #fff;border-radius:6px}._RsVxs._ZvVGR{background-color:#ebf3fb;font-weight:500;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif}._RsVxs._ZvVGR._DKBC6{background-color:#e4effa}._RsVxs._TJUMw{cursor:default}._RsVxs:active:not(._-DBWB):not(._ZvVGR):not([aria-disabled=true]):not(._TJUMw){background-color:#e8e9e9}._-DBWB{padding-right:32px}._-DBWB ._hmZF5{position:absolute;top:8px;right:3px;fill:#515559}._AYlq7{padding:8px;border-bottom:1px solid #e8e8e8;border-radius:4px 4px 0 0;position:-webkit-sticky;position:sticky;top:0;z-index:20;background-color:#fff}._AAP-Y{position:absolute;top:13px;left:13px}._jHpj7._jHpj7{padding-left:32px}._xsdFo{margin:2px 12px 2px 0;flex-shrink:0}._xsdFo._rwIGj>svg{border-color:#0b6ed0}._GOSTK{display:flex;justify-self:center;margin:8px}";
|
|
6642
6725
|
icons_index.styleInject(css_248z$h);
|
|
6643
6726
|
|
|
6644
6727
|
const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -6669,7 +6752,7 @@ const MenuItem = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6669
6752
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
6670
6753
|
React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
6671
6754
|
ref: ref,
|
|
6672
|
-
role: role
|
|
6755
|
+
role: role !== null && role !== void 0 ? role : defaultRole,
|
|
6673
6756
|
tabIndex: tabIndex,
|
|
6674
6757
|
"aria-disabled": disabled,
|
|
6675
6758
|
"aria-checked": isSelectable ? isSelected : undefined,
|
|
@@ -6871,9 +6954,10 @@ const ArrowNav = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6871
6954
|
preventScroll: true
|
|
6872
6955
|
});
|
|
6873
6956
|
} else if (highlightedIndex === 0 && searchable) {
|
|
6874
|
-
searchBoxRef
|
|
6957
|
+
searchBoxRef === null || searchBoxRef === void 0 ? void 0 : searchBoxRef.current.focus();
|
|
6875
6958
|
} else {
|
|
6876
|
-
|
|
6959
|
+
var _anchorRef$current;
|
|
6960
|
+
anchorRef === null || anchorRef === void 0 ? void 0 : (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.focus();
|
|
6877
6961
|
}
|
|
6878
6962
|
}
|
|
6879
6963
|
}, [highlightedIndex, refs, searchable, allChildren.length,
|
|
@@ -6892,14 +6976,16 @@ const ArrowNav = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6892
6976
|
onHighlightedIndexChange((highlightedIndex - 1 + numChildren) % numChildren);
|
|
6893
6977
|
}
|
|
6894
6978
|
} else if (e.key === 'PageUp' || e.key === 'Home') {
|
|
6979
|
+
var _containerRef$current;
|
|
6895
6980
|
// Only call the highlighted index change handler for the current nav list (i.e. if the event bubbles up to a parent nav list, don't call the highlighted index change handler on the parent nav list)
|
|
6896
|
-
if (containerRef.current
|
|
6981
|
+
if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
|
|
6897
6982
|
e.preventDefault();
|
|
6898
6983
|
onHighlightedIndexChange(0);
|
|
6899
6984
|
}
|
|
6900
6985
|
} else if (e.key === 'PageDown' || e.key === 'End') {
|
|
6986
|
+
var _containerRef$current2;
|
|
6901
6987
|
// Only call the highlighted index change handler for the current nav list (i.e. if the event bubbles up to a parent nav list, don't call the highlighted index change handler on the parent nav list)
|
|
6902
|
-
if (containerRef.current
|
|
6988
|
+
if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(e.target)) {
|
|
6903
6989
|
e.preventDefault();
|
|
6904
6990
|
const lastIndex = numChildren - 1;
|
|
6905
6991
|
onHighlightedIndexChange(lastIndex);
|
|
@@ -6917,20 +7003,20 @@ const ArrowNav = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6917
7003
|
style: {
|
|
6918
7004
|
...style,
|
|
6919
7005
|
minWidth,
|
|
6920
|
-
maxHeight: maxHeight
|
|
7006
|
+
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight :
|
|
6921
7007
|
// This logic is located here instead of BaseMenu.js so the maxHeight will update with screen resizing (Popper has a resize listener that causes this to rerender)
|
|
6922
7008
|
Math.min(350, (isSubmenu ?
|
|
6923
7009
|
// Submenus: window height - submenu popper offset - 8px of container padding - half of anchor height (fallback to default 18px))
|
|
6924
7010
|
document.documentElement.clientHeight - SUBMENU_POPPER_OFFSET[0] :
|
|
6925
7011
|
// Menus: half of window height - menu popper offset - 8px of container padding - half of anchor height (fallback to default 18px)
|
|
6926
|
-
document.documentElement.clientHeight / 2 - FLYOUT_POPPER_OFFSET[1]) - 8 - (anchorRef
|
|
7012
|
+
document.documentElement.clientHeight / 2 - FLYOUT_POPPER_OFFSET[1]) - 8 - (anchorRef !== null && anchorRef !== void 0 && anchorRef.current ? anchorRef.current.offsetHeight / 2 : 18))
|
|
6927
7013
|
}
|
|
6928
7014
|
}, rest), searchable && /*#__PURE__*/React__default["default"].createElement(MenuSearchBox, {
|
|
6929
7015
|
"aria-controls": menuId,
|
|
6930
7016
|
value: searchTerm,
|
|
6931
7017
|
ref: searchBoxRef,
|
|
6932
7018
|
onChange: e => {
|
|
6933
|
-
setSearchTerm
|
|
7019
|
+
setSearchTerm === null || setSearchTerm === void 0 ? void 0 : setSearchTerm(e.target.value);
|
|
6934
7020
|
},
|
|
6935
7021
|
onFocus: () => onHighlightedIndexChange(0)
|
|
6936
7022
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -6945,6 +7031,7 @@ const ArrowNav = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6945
7031
|
});
|
|
6946
7032
|
|
|
6947
7033
|
const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
7034
|
+
var _externalAnchor$props, _externalAnchor$props2, _useMenuContext, _externalAnchor$props3, _externalAnchor$props4, _externalAnchor$props5, _externalAnchor$props6, _externalAnchor$props7, _externalAnchor$props8, _externalAnchor$props9, _anchorRef$current;
|
|
6948
7035
|
let {
|
|
6949
7036
|
anchor: externalAnchor,
|
|
6950
7037
|
'aria-label': externalAriaLabel,
|
|
@@ -6985,9 +7072,9 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
6985
7072
|
private_isFirstElementHighlightedOnUserActivatedOpen = true,
|
|
6986
7073
|
...rest
|
|
6987
7074
|
} = _ref;
|
|
6988
|
-
const anchorId = useId(externalAnchor
|
|
6989
|
-
const arrowNavId =
|
|
6990
|
-
const parentCloseAndFocusAnchor = useMenuContext()
|
|
7075
|
+
const anchorId = useId((_externalAnchor$props = externalAnchor === null || externalAnchor === void 0 ? void 0 : (_externalAnchor$props2 = externalAnchor.props) === null || _externalAnchor$props2 === void 0 ? void 0 : _externalAnchor$props2.id) !== null && _externalAnchor$props !== void 0 ? _externalAnchor$props : externalId);
|
|
7076
|
+
const arrowNavId = "".concat(anchorId, "-menu");
|
|
7077
|
+
const parentCloseAndFocusAnchor = (_useMenuContext = useMenuContext()) === null || _useMenuContext === void 0 ? void 0 : _useMenuContext.closeAndFocusAnchor;
|
|
6991
7078
|
const isSubmenu = Boolean(parentCloseAndFocusAnchor);
|
|
6992
7079
|
const {
|
|
6993
7080
|
translate
|
|
@@ -7006,20 +7093,23 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7006
7093
|
// Call onIsOpenChange whenever externalIsOpen changes
|
|
7007
7094
|
useDidUpdate(() => {
|
|
7008
7095
|
if (isSubmenu) {
|
|
7009
|
-
|
|
7096
|
+
var _onIsOpenChangeRef$cu;
|
|
7097
|
+
(_onIsOpenChangeRef$cu = onIsOpenChangeRef.current) === null || _onIsOpenChangeRef$cu === void 0 ? void 0 : _onIsOpenChangeRef$cu.call(onIsOpenChangeRef, externalIsOpen);
|
|
7010
7098
|
}
|
|
7011
7099
|
}, [externalIsOpen, onIsOpenChangeRef, isSubmenu]);
|
|
7012
7100
|
// Call onIsOpenChange if open on mount or on unmount
|
|
7013
7101
|
React.useEffect(() => {
|
|
7014
7102
|
if (isSubmenu) {
|
|
7015
7103
|
if (externalIsOpenRef.current) {
|
|
7016
|
-
|
|
7104
|
+
var _onIsOpenChangeRef$cu2;
|
|
7105
|
+
(_onIsOpenChangeRef$cu2 = onIsOpenChangeRef.current) === null || _onIsOpenChangeRef$cu2 === void 0 ? void 0 : _onIsOpenChangeRef$cu2.call(onIsOpenChangeRef, true);
|
|
7017
7106
|
}
|
|
7018
7107
|
return () => {
|
|
7019
7108
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7020
7109
|
if (externalIsOpenRef.current) {
|
|
7110
|
+
var _onIsOpenChangeRef$cu3;
|
|
7021
7111
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7022
|
-
onIsOpenChangeRef.current
|
|
7112
|
+
(_onIsOpenChangeRef$cu3 = onIsOpenChangeRef.current) === null || _onIsOpenChangeRef$cu3 === void 0 ? void 0 : _onIsOpenChangeRef$cu3.call(onIsOpenChangeRef, false);
|
|
7023
7113
|
}
|
|
7024
7114
|
};
|
|
7025
7115
|
}
|
|
@@ -7033,11 +7123,15 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7033
7123
|
}, [setHighlightedIndex, setIsOpen, setSearchTerm]);
|
|
7034
7124
|
const handleMultiSelectChange = item => {
|
|
7035
7125
|
let arr = selectedValue || selectedValue === 0 ? [].concat(selectedValue) : [];
|
|
7036
|
-
const i = arr.findIndex(v =>
|
|
7126
|
+
const i = arr.findIndex(v => {
|
|
7127
|
+
var _item$props;
|
|
7128
|
+
return v === (item === null || item === void 0 ? void 0 : (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.value);
|
|
7129
|
+
});
|
|
7037
7130
|
if (i !== -1) {
|
|
7038
7131
|
arr.splice(i, 1);
|
|
7039
7132
|
} else {
|
|
7040
|
-
|
|
7133
|
+
var _item$props2;
|
|
7134
|
+
arr = union(arr, item === null || item === void 0 ? void 0 : (_item$props2 = item.props) === null || _item$props2 === void 0 ? void 0 : _item$props2.value);
|
|
7041
7135
|
}
|
|
7042
7136
|
setSelectedValue(arr, getLabelFromValue(children, arr), item);
|
|
7043
7137
|
};
|
|
@@ -7050,11 +7144,12 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7050
7144
|
setSelectedValue(value, getLabelFromValue(children, value), item);
|
|
7051
7145
|
};
|
|
7052
7146
|
const handleItemSelected = item => {
|
|
7147
|
+
var _item$props3;
|
|
7053
7148
|
if (!selectable) {
|
|
7054
7149
|
closeAndFocusAnchor();
|
|
7055
7150
|
return;
|
|
7056
7151
|
}
|
|
7057
|
-
const value = item
|
|
7152
|
+
const value = item === null || item === void 0 ? void 0 : (_item$props3 = item.props) === null || _item$props3 === void 0 ? void 0 : _item$props3.value;
|
|
7058
7153
|
if (!value && value !== 0) {
|
|
7059
7154
|
// eslint-disable-next-line no-console
|
|
7060
7155
|
console.warn('<MenuItem> should have a "value" prop when used in a <SelectMenu>', item);
|
|
@@ -7120,12 +7215,12 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7120
7215
|
onSelectedValueChange: handleSubmenuOnSelectedValueChange
|
|
7121
7216
|
});
|
|
7122
7217
|
}
|
|
7123
|
-
if (child
|
|
7124
|
-
var _context;
|
|
7218
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === MenuItem) {
|
|
7219
|
+
var _context, _child$props, _child$props2;
|
|
7125
7220
|
menuItemIndex += 1;
|
|
7126
7221
|
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
7127
7222
|
isHighlighted: actualIndex === highlightedIndex,
|
|
7128
|
-
isSelected: selectable && typeof selectedValue !== 'undefined' && Array.isArray(selectedValue) ? _includesInstanceProperty__default["default"](_context = selectedValue).call(_context, child
|
|
7223
|
+
isSelected: selectable && typeof selectedValue !== 'undefined' && Array.isArray(selectedValue) ? _includesInstanceProperty__default["default"](_context = selectedValue).call(_context, child === null || child === void 0 ? void 0 : (_child$props = child.props) === null || _child$props === void 0 ? void 0 : _child$props.value) : (child === null || child === void 0 ? void 0 : (_child$props2 = child.props) === null || _child$props2 === void 0 ? void 0 : _child$props2.value) === selectedValue,
|
|
7129
7224
|
onSelect: wrapEvent(child.props.onSelect, () => {
|
|
7130
7225
|
handleItemSelected(child);
|
|
7131
7226
|
}),
|
|
@@ -7135,21 +7230,21 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7135
7230
|
}
|
|
7136
7231
|
return child;
|
|
7137
7232
|
});
|
|
7138
|
-
const anchorLabel = label
|
|
7139
|
-
const menuAnchorLabel = anchorLabel
|
|
7233
|
+
const anchorLabel = label !== null && label !== void 0 ? label : getLabelFromValue(children, selectedValue);
|
|
7234
|
+
const menuAnchorLabel = anchorLabel !== null && anchorLabel !== void 0 ? anchorLabel : defaultLabel;
|
|
7140
7235
|
const announceToScreenReader = useScreenReaderAnnouncement('assertive');
|
|
7141
|
-
const ariaLabelledBy = externalAnchor
|
|
7142
|
-
const ariaLabel = externalAnchor
|
|
7143
|
-
const ariaExpanded = externalAnchor
|
|
7236
|
+
const ariaLabelledBy = (_externalAnchor$props3 = externalAnchor === null || externalAnchor === void 0 ? void 0 : (_externalAnchor$props4 = externalAnchor.props) === null || _externalAnchor$props4 === void 0 ? void 0 : _externalAnchor$props4['aria-labelledby']) !== null && _externalAnchor$props3 !== void 0 ? _externalAnchor$props3 : externalAriaLabelledBy ? "".concat(externalAriaLabelledBy, " ").concat(anchorId) : undefined;
|
|
7237
|
+
const ariaLabel = (_externalAnchor$props5 = externalAnchor === null || externalAnchor === void 0 ? void 0 : (_externalAnchor$props6 = externalAnchor.props) === null || _externalAnchor$props6 === void 0 ? void 0 : _externalAnchor$props6['aria-label']) !== null && _externalAnchor$props5 !== void 0 ? _externalAnchor$props5 : externalAriaLabel && typeof menuAnchorLabel === 'string' ? "".concat(externalAriaLabel, " ").concat(menuAnchorLabel) : externalAriaLabel;
|
|
7238
|
+
const ariaExpanded = (externalAnchor === null || externalAnchor === void 0 ? void 0 : externalAnchor.props['aria-expanded']) !== undefined ? externalAnchor.props['aria-expanded'] : isOpen ? true : undefined;
|
|
7144
7239
|
const actualAnchor = externalAnchor !== undefined ? /*#__PURE__*/React__default["default"].cloneElement(externalAnchor, {
|
|
7145
7240
|
ref: mergeRefs(ref, anchorRef, externalAnchor.ref),
|
|
7146
|
-
tabIndex: externalAnchor.props.tabIndex
|
|
7147
|
-
role: externalAnchor.props.role
|
|
7241
|
+
tabIndex: (_externalAnchor$props7 = externalAnchor.props.tabIndex) !== null && _externalAnchor$props7 !== void 0 ? _externalAnchor$props7 : 0,
|
|
7242
|
+
role: (_externalAnchor$props8 = externalAnchor.props.role) !== null && _externalAnchor$props8 !== void 0 ? _externalAnchor$props8 : 'button',
|
|
7148
7243
|
id: anchorId,
|
|
7149
7244
|
'aria-controls': isOpen ? arrowNavId : undefined,
|
|
7150
7245
|
'aria-expanded': ariaExpanded,
|
|
7151
7246
|
'aria-haspopup': 'menu',
|
|
7152
|
-
'aria-disabled': externalAnchor.props['aria-disabled']
|
|
7247
|
+
'aria-disabled': (_externalAnchor$props9 = externalAnchor.props['aria-disabled']) !== null && _externalAnchor$props9 !== void 0 ? _externalAnchor$props9 : disabled,
|
|
7153
7248
|
'aria-labelledby': ariaLabelledBy,
|
|
7154
7249
|
'aria-label': ariaLabel,
|
|
7155
7250
|
onMouseDown: preventClickOutside,
|
|
@@ -7230,17 +7325,17 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7230
7325
|
id: arrowNavId,
|
|
7231
7326
|
role: "menu",
|
|
7232
7327
|
"aria-labelledby": anchorId,
|
|
7233
|
-
isNavItem: child => child
|
|
7328
|
+
isNavItem: child => (child === null || child === void 0 ? void 0 : child.type) === MenuItem || (child === null || child === void 0 ? void 0 : child.type) === MenuSearchBox || isType(child, menuType),
|
|
7234
7329
|
style: {
|
|
7235
7330
|
zIndex,
|
|
7236
|
-
maxWidth: maxFlyoutWidth
|
|
7237
|
-
width: maxFlyoutWidth
|
|
7331
|
+
maxWidth: maxFlyoutWidth !== null && maxFlyoutWidth !== void 0 ? maxFlyoutWidth : undefined,
|
|
7332
|
+
width: maxFlyoutWidth !== null && maxFlyoutWidth !== void 0 ? maxFlyoutWidth : undefined
|
|
7238
7333
|
},
|
|
7239
7334
|
onMouseDown: preventClickOutside,
|
|
7240
7335
|
className: classNames__default["default"](styles$h.contentPane, flyoutClassName),
|
|
7241
7336
|
highlightedIndex: highlightedIndex,
|
|
7242
7337
|
maxHeight: maxHeight,
|
|
7243
|
-
minWidth: isSubmenu ? undefined : Math.min(350, Math.max(160, anchorRef
|
|
7338
|
+
minWidth: isSubmenu ? undefined : Math.min(350, Math.max(160, anchorRef === null || anchorRef === void 0 ? void 0 : (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.offsetWidth)),
|
|
7244
7339
|
searchable: searchable,
|
|
7245
7340
|
onHighlightedIndexChange: i => setHighlightedIndex(i),
|
|
7246
7341
|
searchTerm: searchTerm,
|
|
@@ -7259,8 +7354,9 @@ const BaseMenu = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
7259
7354
|
// (not menu container) so we focus anchor before browser moves focus
|
|
7260
7355
|
closeAndFocusAnchor();
|
|
7261
7356
|
} else if (e.key === 'ArrowLeft' && isSubmenu) {
|
|
7357
|
+
var _arrowNavRef$current;
|
|
7262
7358
|
// Only update the highlighted index for the current menu (i.e. if the event bubbles up to a parent menu, don't update the highlighted index for the parent menu)
|
|
7263
|
-
if (arrowNavRef.current
|
|
7359
|
+
if ((_arrowNavRef$current = arrowNavRef.current) !== null && _arrowNavRef$current !== void 0 && _arrowNavRef$current.contains(e.target) && e.target !== searchBoxRef.current) {
|
|
7264
7360
|
setHighlightedIndex(-1);
|
|
7265
7361
|
}
|
|
7266
7362
|
}
|
|
@@ -7287,8 +7383,7 @@ function filterItems(valueToFilterBy, items) {
|
|
|
7287
7383
|
return _includesInstanceProperty__default["default"](_context3 = item.props.children.toLowerCase()).call(_context3, searchTermLowerCase);
|
|
7288
7384
|
}
|
|
7289
7385
|
// eslint-disable-next-line no-console
|
|
7290
|
-
console.warn(
|
|
7291
|
-
Ensure prop "children" is of type "string" or provide a "label" prop!`, item);
|
|
7386
|
+
console.warn("<MenuItem> not included in search results!\n Ensure prop \"children\" is of type \"string\" or provide a \"label\" prop!", item);
|
|
7292
7387
|
return false;
|
|
7293
7388
|
});
|
|
7294
7389
|
return result;
|
|
@@ -7307,11 +7402,12 @@ function getDescendent(children, value) {
|
|
|
7307
7402
|
if (value === undefined) return null;
|
|
7308
7403
|
const childArray = React__default["default"].Children.toArray(children);
|
|
7309
7404
|
for (let i = 0; i < childArray.length; i += 1) {
|
|
7405
|
+
var _child$props3, _child$props4;
|
|
7310
7406
|
const child = childArray[i];
|
|
7311
|
-
if (child
|
|
7407
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === MenuItem && (child === null || child === void 0 ? void 0 : (_child$props3 = child.props) === null || _child$props3 === void 0 ? void 0 : _child$props3.value) === value) {
|
|
7312
7408
|
return child;
|
|
7313
7409
|
}
|
|
7314
|
-
if (child
|
|
7410
|
+
if ((child === null || child === void 0 ? void 0 : child.type) !== MenuItem && child !== null && child !== void 0 && (_child$props4 = child.props) !== null && _child$props4 !== void 0 && _child$props4.children) {
|
|
7315
7411
|
const descendent = getDescendent(child.props.children, value);
|
|
7316
7412
|
if (descendent) {
|
|
7317
7413
|
return descendent;
|
|
@@ -7321,7 +7417,8 @@ function getDescendent(children, value) {
|
|
|
7321
7417
|
return null;
|
|
7322
7418
|
}
|
|
7323
7419
|
function getLabel(menuOptionNode) {
|
|
7324
|
-
|
|
7420
|
+
var _menuOptionNode$props;
|
|
7421
|
+
if ( /*#__PURE__*/React.isValidElement(menuOptionNode)) return getLabel(menuOptionNode === null || menuOptionNode === void 0 ? void 0 : (_menuOptionNode$props = menuOptionNode.props) === null || _menuOptionNode$props === void 0 ? void 0 : _menuOptionNode$props.children);
|
|
7325
7422
|
return menuOptionNode;
|
|
7326
7423
|
}
|
|
7327
7424
|
function union(arr1, arr2) {
|
|
@@ -7371,8 +7468,8 @@ const SelectMenu = /*#__PURE__*/React__default["default"].forwardRef(function Se
|
|
|
7371
7468
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
7372
7469
|
args[_key - 1] = arguments[_key];
|
|
7373
7470
|
}
|
|
7374
|
-
onSelectedValueChange
|
|
7375
|
-
onChange
|
|
7471
|
+
onSelectedValueChange === null || onSelectedValueChange === void 0 ? void 0 : onSelectedValueChange(value, ...args);
|
|
7472
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
7376
7473
|
}
|
|
7377
7474
|
}, rest));
|
|
7378
7475
|
});
|
|
@@ -7483,11 +7580,11 @@ const ConditionSet = function ConditionSet(_ref) {
|
|
|
7483
7580
|
}
|
|
7484
7581
|
}
|
|
7485
7582
|
if (fixedSet) {
|
|
7486
|
-
lastConnectionRef.current.style.height =
|
|
7487
|
-
lastConnectionRef.current.style.top =
|
|
7583
|
+
lastConnectionRef.current.style.height = "".concat(height - 38, "px");
|
|
7584
|
+
lastConnectionRef.current.style.top = "-".concat(height - 56, "px");
|
|
7488
7585
|
} else {
|
|
7489
|
-
lastConnectionRef.current.style.height =
|
|
7490
|
-
lastConnectionRef.current.style.top =
|
|
7586
|
+
lastConnectionRef.current.style.height = "".concat(height - 18, "px");
|
|
7587
|
+
lastConnectionRef.current.style.top = "-".concat(height - 52, "px");
|
|
7491
7588
|
}
|
|
7492
7589
|
}
|
|
7493
7590
|
}
|
|
@@ -7517,7 +7614,7 @@ const ConditionSet = function ConditionSet(_ref) {
|
|
|
7517
7614
|
if (fixedSet) {
|
|
7518
7615
|
indices.shift();
|
|
7519
7616
|
}
|
|
7520
|
-
return getSubDataTestId(rootDataTestId,
|
|
7617
|
+
return getSubDataTestId(rootDataTestId, "".concat(prefix, "-").concat(indices.join('-')));
|
|
7521
7618
|
}, [fixedSet, rootDataTestId]);
|
|
7522
7619
|
function renderControls(itemType, itemPosition, itemIndex, itemLevel, numberOfSetItems, itemId) {
|
|
7523
7620
|
return /*#__PURE__*/React__default["default"].createElement(Controls, {
|
|
@@ -7644,7 +7741,7 @@ const LogicEditor = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
7644
7741
|
const classes = classNames__default["default"](className, styles$i.editor);
|
|
7645
7742
|
function update(newState) {
|
|
7646
7743
|
setState(newState);
|
|
7647
|
-
onChange
|
|
7744
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newState);
|
|
7648
7745
|
}
|
|
7649
7746
|
const handleNewLogicItem = (item, position) => {
|
|
7650
7747
|
const newState = shallowCopy(state);
|
|
@@ -7713,9 +7810,9 @@ const LogicEditor = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
7713
7810
|
})));
|
|
7714
7811
|
});
|
|
7715
7812
|
|
|
7716
|
-
var css_248z$g = ".
|
|
7717
|
-
var styles$g = {"backdrop":"
|
|
7718
|
-
var stylesheet$g=".
|
|
7813
|
+
var css_248z$g = "._h5tul{position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);align-items:flex-start}._7beAG,._h5tul{display:flex;overflow:auto}._7beAG{flex-direction:column;box-shadow:0 12px 35px -8px rgba(0,0,0,.12);border-radius:8px;background-color:#fff;min-width:450px;min-height:198px;max-width:85%;max-height:85%;margin:auto;outline:none}:not(._tCWzE)._vr26K{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._vr26K{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}:not(._tCWzE)._2qTEv{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._2qTEv{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._2qTEv{max-width:700px}}:not(._tCWzE)._JNefC{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._JNefC{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._JNefC{max-width:700px}}@media screen and (min-width:1024px){:not(._tCWzE)._JNefC{max-width:1000px}}:not(._tCWzE)._JIQr-{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._JIQr-{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._JIQr-{max-width:700px}}@media screen and (min-width:1024px){:not(._tCWzE)._JIQr-{max-width:1000px}}@media screen and (min-width:1632px){:not(._tCWzE)._JIQr-{max-width:1600px;max-height:calc(100vh - 32px)}}._tCWzE{min-width:200px;width:calc(100% - 48px)}._tCWzE,._tCWzE._vr26K{max-height:calc(100vh - 80px)}._tCWzE._vr26K{max-width:480px;border-radius:8px}._tCWzE._2qTEv{max-width:700px}._tCWzE._JNefC{max-width:1000px}._tCWzE._JIQr-{max-width:1600px;max-height:calc(100vh - 32px)}._2ITiD{height:calc(100vh - 80px)}@media screen and (max-width:479px){._2ITiD{height:100vh}}@media screen and (min-width:1632px){._2ITiD{height:calc(100vh - 32px)}}._nX1A7{position:relative;display:flex;flex-direction:row;flex-shrink:0;min-height:65px;padding:20px 24px;align-items:center;font-size:18px;font-weight:400;line-height:24px;color:#32363a;border-bottom:1px solid #eee}._qHVZB{padding-right:64px}._kdxcl{position:absolute;top:14px;right:14px}._Qamfr{flex-grow:1;font-size:14px;overflow:auto;color:#32363a}._NIuoR,._Qamfr{padding:20px 24px}._NIuoR{display:flex;flex-direction:row;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:1px solid #eee}._NIuoR>*{margin:0 4px}._NIuoR>:first-child{margin-left:0}._NIuoR>:last-child{margin-right:0}@keyframes _dNAdg{0%{opacity:0}}._dNAdg{animation:_dNAdg ease-in both;animation-duration:.2s}@keyframes _iW3DP{to{opacity:0}}._iW3DP{animation:_iW3DP ease-out both;animation-duration:.2s}@keyframes _Wq-zi{0%{transform:scale3d(.7,.7,.7);opacity:0}}._Wq-zi{animation:_Wq-zi both;animation-duration:.2s}@keyframes _OsXp2{to{transform:scale3d(.7,.7,.7);opacity:0}}._OsXp2{animation:_OsXp2 both;animation-duration:.2s}";
|
|
7814
|
+
var styles$g = {"backdrop":"_h5tul","modal":"_7beAG","responsive":"_tCWzE","dialogSmall":"_vr26K","dialogMedium":"_2qTEv","dialogLarge":"_JNefC","dialogExtraLarge":"_JIQr-","growToMaxHeight":"_2ITiD","modalHeader":"_nX1A7","modalHeaderWithCloseButton":"_qHVZB","modalHeaderCloseButton":"_kdxcl","modalBody":"_Qamfr","modalFooter":"_NIuoR","fadeEnter":"_dNAdg","fadeLeave":"_iW3DP","zoomEnter":"_Wq-zi","zoomLeave":"_OsXp2"};
|
|
7815
|
+
var stylesheet$g="._h5tul{position:fixed;left:0;top:0;width:100%;height:100%;background-color:rgba(0,0,0,.3);align-items:flex-start}._7beAG,._h5tul{display:flex;overflow:auto}._7beAG{flex-direction:column;box-shadow:0 12px 35px -8px rgba(0,0,0,.12);border-radius:8px;background-color:#fff;min-width:450px;min-height:198px;max-width:85%;max-height:85%;margin:auto;outline:none}:not(._tCWzE)._vr26K{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._vr26K{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}:not(._tCWzE)._2qTEv{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._2qTEv{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._2qTEv{max-width:700px}}:not(._tCWzE)._JNefC{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._JNefC{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._JNefC{max-width:700px}}@media screen and (min-width:1024px){:not(._tCWzE)._JNefC{max-width:1000px}}:not(._tCWzE)._JIQr-{width:100vw;min-width:200px;max-width:none;max-height:100vh;border-radius:0}@media screen and (min-width:480px){:not(._tCWzE)._JIQr-{max-width:480px;max-height:calc(100vh - 80px);border-radius:8px}}@media screen and (min-width:768px){:not(._tCWzE)._JIQr-{max-width:700px}}@media screen and (min-width:1024px){:not(._tCWzE)._JIQr-{max-width:1000px}}@media screen and (min-width:1632px){:not(._tCWzE)._JIQr-{max-width:1600px;max-height:calc(100vh - 32px)}}._tCWzE{min-width:200px;width:calc(100% - 48px)}._tCWzE,._tCWzE._vr26K{max-height:calc(100vh - 80px)}._tCWzE._vr26K{max-width:480px;border-radius:8px}._tCWzE._2qTEv{max-width:700px}._tCWzE._JNefC{max-width:1000px}._tCWzE._JIQr-{max-width:1600px;max-height:calc(100vh - 32px)}._2ITiD{height:calc(100vh - 80px)}@media screen and (max-width:479px){._2ITiD{height:100vh}}@media screen and (min-width:1632px){._2ITiD{height:calc(100vh - 32px)}}._nX1A7{position:relative;display:flex;flex-direction:row;flex-shrink:0;min-height:65px;padding:20px 24px;align-items:center;font-size:18px;font-weight:400;line-height:24px;color:#32363a;border-bottom:1px solid #eee}._qHVZB{padding-right:64px}._kdxcl{position:absolute;top:14px;right:14px}._Qamfr{flex-grow:1;font-size:14px;overflow:auto;color:#32363a}._NIuoR,._Qamfr{padding:20px 24px}._NIuoR{display:flex;flex-direction:row;flex-shrink:0;align-items:center;justify-content:flex-end;border-top:1px solid #eee}._NIuoR>*{margin:0 4px}._NIuoR>:first-child{margin-left:0}._NIuoR>:last-child{margin-right:0}@keyframes _dNAdg{0%{opacity:0}}._dNAdg{animation:_dNAdg ease-in both;animation-duration:.2s}@keyframes _iW3DP{to{opacity:0}}._iW3DP{animation:_iW3DP ease-out both;animation-duration:.2s}@keyframes _Wq-zi{0%{transform:scale3d(.7,.7,.7);opacity:0}}._Wq-zi{animation:_Wq-zi both;animation-duration:.2s}@keyframes _OsXp2{to{transform:scale3d(.7,.7,.7);opacity:0}}._OsXp2{animation:_OsXp2 both;animation-duration:.2s}";
|
|
7719
7816
|
icons_index.styleInject(css_248z$g);
|
|
7720
7817
|
|
|
7721
7818
|
const {
|
|
@@ -7730,7 +7827,7 @@ const OverlayContainer = /*#__PURE__*/React__default["default"].forwardRef((_ref
|
|
|
7730
7827
|
} = _ref;
|
|
7731
7828
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
7732
7829
|
ref: ref
|
|
7733
|
-
}), children, /*#__PURE__*/React__default["default"].createElement("style", null,
|
|
7830
|
+
}), children, /*#__PURE__*/React__default["default"].createElement("style", null, "body { overflow: hidden; }"));
|
|
7734
7831
|
});
|
|
7735
7832
|
const Overlay = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref) => {
|
|
7736
7833
|
let {
|
|
@@ -7758,14 +7855,14 @@ const Overlay = /*#__PURE__*/React__default["default"].forwardRef((_ref2, ref) =
|
|
|
7758
7855
|
// Ensure that when a user clicks on the dialog and drags and lifts out on the overlay,
|
|
7759
7856
|
// the modal does not fire onDismiss.
|
|
7760
7857
|
if (e.target === mouseDownTarget.current && e.target === overlay.current) {
|
|
7761
|
-
onDismiss
|
|
7858
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(e);
|
|
7762
7859
|
}
|
|
7763
7860
|
};
|
|
7764
7861
|
const handleKeyDown = e => {
|
|
7765
7862
|
if (e.key === 'Escape') {
|
|
7766
7863
|
e.stopPropagation(); // prevent event from closing modals or popovers
|
|
7767
|
-
onDismiss
|
|
7768
|
-
onClose
|
|
7864
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss(e);
|
|
7865
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
7769
7866
|
}
|
|
7770
7867
|
};
|
|
7771
7868
|
const handleBodyKeyDown = e => {
|
|
@@ -7808,13 +7905,13 @@ const Dialog = /*#__PURE__*/React__default["default"].forwardRef((_ref3, ref) =>
|
|
|
7808
7905
|
const prefix = 'dialog';
|
|
7809
7906
|
switch (maxSize) {
|
|
7810
7907
|
case 'small':
|
|
7811
|
-
return
|
|
7908
|
+
return "".concat(prefix, "Small");
|
|
7812
7909
|
case 'medium':
|
|
7813
|
-
return
|
|
7910
|
+
return "".concat(prefix, "Medium");
|
|
7814
7911
|
case 'large':
|
|
7815
|
-
return
|
|
7912
|
+
return "".concat(prefix, "Large");
|
|
7816
7913
|
case 'xl':
|
|
7817
|
-
return
|
|
7914
|
+
return "".concat(prefix, "ExtraLarge");
|
|
7818
7915
|
default:
|
|
7819
7916
|
return '';
|
|
7820
7917
|
}
|
|
@@ -7878,21 +7975,22 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef((_ref4, ref) =>
|
|
|
7878
7975
|
// This effect should only run when the Modal is added or removed from the DOM
|
|
7879
7976
|
useDidUpdate(() => {
|
|
7880
7977
|
if (isInDOM) {
|
|
7881
|
-
if (elementRefToFocusOnOpen
|
|
7978
|
+
if (elementRefToFocusOnOpen !== null && elementRefToFocusOnOpen !== void 0 && elementRefToFocusOnOpen.current) {
|
|
7882
7979
|
elementRefToFocusOnOpen.current.focus();
|
|
7883
7980
|
} else if (typeof onClose === 'function' && closeIconButtonRef.current) {
|
|
7884
7981
|
closeIconButtonRef.current.focus();
|
|
7885
7982
|
} else {
|
|
7886
|
-
|
|
7983
|
+
var _dialogRef$current;
|
|
7984
|
+
(_dialogRef$current = dialogRef.current) === null || _dialogRef$current === void 0 ? void 0 : _dialogRef$current.focus();
|
|
7887
7985
|
}
|
|
7888
|
-
} else if (elementRefToFocusOnClose
|
|
7986
|
+
} else if (elementRefToFocusOnClose !== null && elementRefToFocusOnClose !== void 0 && elementRefToFocusOnClose.current) {
|
|
7889
7987
|
elementRefToFocusOnClose.current.focus();
|
|
7890
7988
|
} else {
|
|
7891
7989
|
/*
|
|
7892
7990
|
* This replaces the `returnFocus` prop of `react-focus-lock`.
|
|
7893
7991
|
* The logic is done in this effect instead because `elementRefToFocusOnClose.current` is not available until after the `Overlay` is unmounted.
|
|
7894
7992
|
*/
|
|
7895
|
-
elementUsedToOpenModal
|
|
7993
|
+
elementUsedToOpenModal === null || elementUsedToOpenModal === void 0 ? void 0 : elementUsedToOpenModal.focus();
|
|
7896
7994
|
}
|
|
7897
7995
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7898
7996
|
}, [isInDOM]);
|
|
@@ -7912,7 +8010,7 @@ const Modal = /*#__PURE__*/React__default["default"].forwardRef((_ref4, ref) =>
|
|
|
7912
8010
|
onDismiss: onDismiss
|
|
7913
8011
|
}, /*#__PURE__*/React__default["default"].createElement(Dialog, _extends__default["default"]({}, rest, {
|
|
7914
8012
|
onAnimationEnd: e => {
|
|
7915
|
-
externalOnAnimationEnd
|
|
8013
|
+
externalOnAnimationEnd === null || externalOnAnimationEnd === void 0 ? void 0 : externalOnAnimationEnd(e);
|
|
7916
8014
|
if (!open) setIsInDOM(false);
|
|
7917
8015
|
},
|
|
7918
8016
|
maxSize: maxSize,
|
|
@@ -7972,9 +8070,9 @@ const ModalFooter = /*#__PURE__*/React__default["default"].forwardRef((_ref7, re
|
|
|
7972
8070
|
}), children);
|
|
7973
8071
|
});
|
|
7974
8072
|
|
|
7975
|
-
var css_248z$f = ".
|
|
7976
|
-
var styles$f = {"numberStepperContainer":"
|
|
7977
|
-
var stylesheet$f=".
|
|
8073
|
+
var css_248z$f = "._ILS2Z{display:inline-flex;width:127px}._ss4RT{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._ss4RT:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._ss4RT._EFVaO{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._ss4RT._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ss4RT._-KXK0>svg{opacity:.4}._ss4RT::-webkit-inner-spin-button,._ss4RT::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._ss4RT:focus{z-index:0;border:none;border-radius:4px}._ss4RT:focus:not(._EFVaO){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-9-Fm,._ss4RT:focus:not(._-KXK0){background:#fafafa}._-9-Fm{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._-9-Fm:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._-9-Fm:active:not(._-KXK0){background:#e5e5e5}._-9-Fm._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._-9-Fm._-KXK0>svg{opacity:.4}._MUars{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._MUars:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._MUars:active:not(._-KXK0){background:#e5e5e5}._MUars._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._MUars._-KXK0>svg{opacity:.4}";
|
|
8074
|
+
var styles$f = {"numberStepperContainer":"_ILS2Z","numberStepperInput":"_ss4RT","disabled":"_-KXK0","invalid":"_EFVaO","decrementBtn":"_-9-Fm","incrementBtn":"_MUars"};
|
|
8075
|
+
var stylesheet$f="._ILS2Z{display:inline-flex;width:127px}._ss4RT{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._ss4RT:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._ss4RT._EFVaO{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._ss4RT._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ss4RT._-KXK0>svg{opacity:.4}._ss4RT::-webkit-inner-spin-button,._ss4RT::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._ss4RT:focus{z-index:0;border:none;border-radius:4px}._ss4RT:focus:not(._EFVaO){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-9-Fm,._ss4RT:focus:not(._-KXK0){background:#fafafa}._-9-Fm{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._-9-Fm:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._-9-Fm:active:not(._-KXK0){background:#e5e5e5}._-9-Fm._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._-9-Fm._-KXK0>svg{opacity:.4}._MUars{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._MUars:hover:not(._-KXK0){cursor:pointer;background:#f5f5f5}._MUars:active:not(._-KXK0){background:#e5e5e5}._MUars._-KXK0{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._MUars._-KXK0>svg{opacity:.4}";
|
|
7978
8076
|
icons_index.styleInject(css_248z$f);
|
|
7979
8077
|
|
|
7980
8078
|
const {
|
|
@@ -8029,7 +8127,7 @@ const NumberStepperInput$1 = /*#__PURE__*/React__default["default"].forwardRef((
|
|
|
8029
8127
|
* depending on the key that was pressed.
|
|
8030
8128
|
*/
|
|
8031
8129
|
const handleKeyDown = e => {
|
|
8032
|
-
onKeyDown
|
|
8130
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
8033
8131
|
if (isExternallyDisabled) return;
|
|
8034
8132
|
if (e.key === 'ArrowUp') {
|
|
8035
8133
|
// Prevents browser's default increment
|
|
@@ -8064,7 +8162,7 @@ const NumberStepperInput$1 = /*#__PURE__*/React__default["default"].forwardRef((
|
|
|
8064
8162
|
* Selects the DOM element
|
|
8065
8163
|
*/
|
|
8066
8164
|
const handleFocus = e => {
|
|
8067
|
-
onFocus
|
|
8165
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
8068
8166
|
if (isExternallyDisabled) return;
|
|
8069
8167
|
e.target.select();
|
|
8070
8168
|
};
|
|
@@ -8074,7 +8172,7 @@ const NumberStepperInput$1 = /*#__PURE__*/React__default["default"].forwardRef((
|
|
|
8074
8172
|
* Calls `handleInputBlur`
|
|
8075
8173
|
*/
|
|
8076
8174
|
const handleBlur = e => {
|
|
8077
|
-
onBlur
|
|
8175
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
8078
8176
|
if (isExternallyDisabled) return;
|
|
8079
8177
|
handleInputBlur(e);
|
|
8080
8178
|
};
|
|
@@ -8139,7 +8237,7 @@ const NumberStepperIncrement$1 = /*#__PURE__*/React__default["default"].forwardR
|
|
|
8139
8237
|
*/
|
|
8140
8238
|
const handleClick = e => {
|
|
8141
8239
|
if (!isDisabled) {
|
|
8142
|
-
onClick
|
|
8240
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
8143
8241
|
increment(true);
|
|
8144
8242
|
}
|
|
8145
8243
|
};
|
|
@@ -8192,7 +8290,7 @@ const NumberStepperDecrement$1 = /*#__PURE__*/React__default["default"].forwardR
|
|
|
8192
8290
|
*/
|
|
8193
8291
|
const handleClick = e => {
|
|
8194
8292
|
if (!isDisabled) {
|
|
8195
|
-
onClick
|
|
8293
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
8196
8294
|
decrement(true);
|
|
8197
8295
|
}
|
|
8198
8296
|
};
|
|
@@ -8363,15 +8461,16 @@ const NumberStepper$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
8363
8461
|
}
|
|
8364
8462
|
}
|
|
8365
8463
|
if (regex.test(val)) {
|
|
8464
|
+
var _val$split;
|
|
8366
8465
|
const currentIsSeparatedByComma = isSeparatedByComma(val);
|
|
8367
8466
|
const currentDecimalSeparator = currentIsSeparatedByComma ? ',' : '.';
|
|
8368
|
-
const decimalPortion = val.split(currentDecimalSeparator)
|
|
8369
|
-
if (decimalPortion
|
|
8467
|
+
const decimalPortion = (_val$split = val.split(currentDecimalSeparator)) === null || _val$split === void 0 ? void 0 : _val$split[1];
|
|
8468
|
+
if ((decimalPortion === null || decimalPortion === void 0 ? void 0 : decimalPortion.length) > 2) {
|
|
8370
8469
|
let rounded = String(roundToTwoDecimalPlaces(convertToNumber$1(val)));
|
|
8371
8470
|
|
|
8372
8471
|
// If a user types a number that rounds out to a whole number, such as '23.000' or `1.999`, the '.' is rounded away, causing the user to lose their place in the input.
|
|
8373
8472
|
if (rounded.indexOf('.') === -1) {
|
|
8374
|
-
rounded +=
|
|
8473
|
+
rounded += "".concat(currentDecimalSeparator, "00");
|
|
8375
8474
|
}
|
|
8376
8475
|
setInputValue(localizeNumber(rounded, currentIsSeparatedByComma));
|
|
8377
8476
|
} else {
|
|
@@ -8422,7 +8521,7 @@ const NumberStepper$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
8422
8521
|
} = e;
|
|
8423
8522
|
if (!componentHasFocus.current && currentTarget.contains(document.activeElement)) {
|
|
8424
8523
|
componentHasFocus.current = true;
|
|
8425
|
-
onFocus
|
|
8524
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
8426
8525
|
}
|
|
8427
8526
|
},
|
|
8428
8527
|
onBlur: e => {
|
|
@@ -8435,7 +8534,7 @@ const NumberStepper$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref,
|
|
|
8435
8534
|
// Check if the new focused element is a child of the original container
|
|
8436
8535
|
if (!currentTarget.contains(document.activeElement)) {
|
|
8437
8536
|
componentHasFocus.current = false;
|
|
8438
|
-
onBlur
|
|
8537
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
8439
8538
|
}
|
|
8440
8539
|
});
|
|
8441
8540
|
}
|
|
@@ -8451,7 +8550,7 @@ function convertToNumber$1(value) {
|
|
|
8451
8550
|
if (typeof value === 'number') {
|
|
8452
8551
|
return value;
|
|
8453
8552
|
}
|
|
8454
|
-
const num = Number(value
|
|
8553
|
+
const num = Number(value === null || value === void 0 ? void 0 : value.replace(',', '.'));
|
|
8455
8554
|
if (Number.isNaN(num)) {
|
|
8456
8555
|
return 0;
|
|
8457
8556
|
}
|
|
@@ -8484,9 +8583,9 @@ function clampMinMax$1(value, _ref2) {
|
|
|
8484
8583
|
return value;
|
|
8485
8584
|
}
|
|
8486
8585
|
|
|
8487
|
-
var css_248z$e = ".
|
|
8488
|
-
var styles$e = {"pageContainer":"
|
|
8489
|
-
var stylesheet$e=".
|
|
8586
|
+
var css_248z$e = "._tBHRX{height:100vh;width:100vw;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto auto 1fr;grid-template-areas:\"pageHeader pageHeader pageHeader\" \"sidebarNav configPane mainContent\"}._QIS0t{grid-area:pageHeader}._UVTe-{grid-area:mainContent;height:100%;overflow:auto}";
|
|
8587
|
+
var styles$e = {"pageContainer":"_tBHRX","pageHeader":"_QIS0t","mainContent":"_UVTe-"};
|
|
8588
|
+
var stylesheet$e="._tBHRX{height:100vh;width:100vw;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto auto 1fr;grid-template-areas:\"pageHeader pageHeader pageHeader\" \"sidebarNav configPane mainContent\"}._QIS0t{grid-area:pageHeader}._UVTe-{grid-area:mainContent;height:100%;overflow:auto}";
|
|
8490
8589
|
icons_index.styleInject(css_248z$e);
|
|
8491
8590
|
|
|
8492
8591
|
const PageContainer = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -8522,9 +8621,9 @@ const MainContent = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8522
8621
|
}));
|
|
8523
8622
|
});
|
|
8524
8623
|
|
|
8525
|
-
var css_248z$d = ".
|
|
8526
|
-
var styles$d = {"pagination":"
|
|
8527
|
-
var stylesheet$d=".
|
|
8624
|
+
var css_248z$d = "._cNhXA{display:flex;align-items:center;justify-content:center;font-size:14px;white-space:pre}._dS7rP{margin-right:8px}._5xY-E{margin-left:8px}._9Zz4n{margin:-10px -15px}._0Iz9k{width:100%;text-align:center}";
|
|
8625
|
+
var styles$d = {"pagination":"_cNhXA","previousButton":"_dS7rP","nextButton":"_5xY-E","btnIcon":"_9Zz4n","input":"_0Iz9k"};
|
|
8626
|
+
var stylesheet$d="._cNhXA{display:flex;align-items:center;justify-content:center;font-size:14px;white-space:pre}._dS7rP{margin-right:8px}._5xY-E{margin-left:8px}._9Zz4n{margin:-10px -15px}._0Iz9k{width:100%;text-align:center}";
|
|
8528
8627
|
icons_index.styleInject(css_248z$d);
|
|
8529
8628
|
|
|
8530
8629
|
const {
|
|
@@ -8563,19 +8662,19 @@ const PaginationPreviousButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8563
8662
|
*/
|
|
8564
8663
|
const decrement = () => {
|
|
8565
8664
|
const newPage = pageInputValue - 1;
|
|
8566
|
-
setPageInputValue
|
|
8567
|
-
handlePageChange
|
|
8665
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
8666
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
8568
8667
|
};
|
|
8569
8668
|
return /*#__PURE__*/React__default["default"].createElement(Button, _extends__default["default"]({}, rest, {
|
|
8570
|
-
disabled: disabled
|
|
8669
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : pageInputValue === 1,
|
|
8571
8670
|
ref: ref,
|
|
8572
8671
|
kind: "tertiary",
|
|
8573
8672
|
onClick: e => {
|
|
8574
|
-
onClick
|
|
8673
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
8575
8674
|
decrement();
|
|
8576
8675
|
},
|
|
8577
8676
|
className: classNames__default["default"](className, styles$d.previousButton),
|
|
8578
|
-
"data-testid": dataTestIdFromProps
|
|
8677
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'PreviousButton'),
|
|
8579
8678
|
"aria-label": buttonLabel
|
|
8580
8679
|
}), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronLeftIcon, {
|
|
8581
8680
|
className: styles$d.btnIcon,
|
|
@@ -8616,19 +8715,19 @@ const PaginationNextButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8616
8715
|
*/
|
|
8617
8716
|
const increment = () => {
|
|
8618
8717
|
const newPage = pageInputValue + 1;
|
|
8619
|
-
setPageInputValue
|
|
8620
|
-
handlePageChange
|
|
8718
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
8719
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
8621
8720
|
};
|
|
8622
8721
|
return /*#__PURE__*/React__default["default"].createElement(Button, _extends__default["default"]({}, rest, {
|
|
8623
|
-
disabled: disabled
|
|
8722
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : pageInputValue === numPages,
|
|
8624
8723
|
ref: ref,
|
|
8625
8724
|
kind: "tertiary",
|
|
8626
8725
|
onClick: e => {
|
|
8627
|
-
onClick
|
|
8726
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
8628
8727
|
increment();
|
|
8629
8728
|
},
|
|
8630
8729
|
className: classNames__default["default"](className, styles$d.nextButton),
|
|
8631
|
-
"data-testid": dataTestIdFromProps
|
|
8730
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'NextButton'),
|
|
8632
8731
|
"aria-label": buttonLabel
|
|
8633
8732
|
}), /*#__PURE__*/React__default["default"].createElement(icons_index.ChevronRightIcon, {
|
|
8634
8733
|
className: styles$d.btnIcon,
|
|
@@ -8674,7 +8773,8 @@ const PaginationPageInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8674
8773
|
* Computes the width of the input based on the number of characters entered
|
|
8675
8774
|
*/
|
|
8676
8775
|
const inputWidth = React.useMemo(() => {
|
|
8677
|
-
|
|
8776
|
+
var _currentPage$toString;
|
|
8777
|
+
const numDigits = (_currentPage$toString = currentPage === null || currentPage === void 0 ? void 0 : currentPage.toString().length) !== null && _currentPage$toString !== void 0 ? _currentPage$toString : 0;
|
|
8678
8778
|
const minWidth = 36;
|
|
8679
8779
|
return numDigits > 2 ? 9 * (numDigits - 2) + minWidth : minWidth;
|
|
8680
8780
|
}, [currentPage]);
|
|
@@ -8684,7 +8784,7 @@ const PaginationPageInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8684
8784
|
*/
|
|
8685
8785
|
const handleBlur = () => {
|
|
8686
8786
|
if (pageInputValue !== currentPage && currentPage !== undefined) {
|
|
8687
|
-
setPageInputValue
|
|
8787
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(currentPage);
|
|
8688
8788
|
}
|
|
8689
8789
|
};
|
|
8690
8790
|
|
|
@@ -8695,11 +8795,11 @@ const PaginationPageInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8695
8795
|
*/
|
|
8696
8796
|
const handleInputChange = newValue => {
|
|
8697
8797
|
if (newValue === '' || !Number.isInteger(Number(newValue))) {
|
|
8698
|
-
setPageInputValue
|
|
8798
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newValue);
|
|
8699
8799
|
} else {
|
|
8700
8800
|
const newPage = Math.min(Math.max(1, newValue), numPages || Number.MAX_SAFE_INTEGER);
|
|
8701
|
-
setPageInputValue
|
|
8702
|
-
handlePageChange
|
|
8801
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
8802
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
8703
8803
|
}
|
|
8704
8804
|
};
|
|
8705
8805
|
|
|
@@ -8707,7 +8807,8 @@ const PaginationPageInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8707
8807
|
* If there is a ref to the input, selects all text within the input
|
|
8708
8808
|
*/
|
|
8709
8809
|
const handleFocus = () => {
|
|
8710
|
-
|
|
8810
|
+
var _inputRef$current;
|
|
8811
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.select();
|
|
8711
8812
|
};
|
|
8712
8813
|
return /*#__PURE__*/React__default["default"].createElement(Translate, {
|
|
8713
8814
|
messageKey: "pagination",
|
|
@@ -8725,15 +8826,15 @@ const PaginationPageInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8725
8826
|
max: numPages,
|
|
8726
8827
|
value: pageInputValue,
|
|
8727
8828
|
onChange: e => {
|
|
8728
|
-
onChange
|
|
8829
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
8729
8830
|
handleInputChange(e.target.value);
|
|
8730
8831
|
},
|
|
8731
8832
|
onBlur: e => {
|
|
8732
|
-
onBlur
|
|
8833
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
8733
8834
|
handleBlur();
|
|
8734
8835
|
},
|
|
8735
8836
|
onFocus: e => {
|
|
8736
|
-
onFocus
|
|
8837
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
8737
8838
|
handleFocus();
|
|
8738
8839
|
},
|
|
8739
8840
|
style: {
|
|
@@ -8792,7 +8893,7 @@ const Pagination = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
8792
8893
|
* @param {Number} newPage - The value entered into the input
|
|
8793
8894
|
*/
|
|
8794
8895
|
const handlePageChange = React.useCallback(newPage => {
|
|
8795
|
-
onPageChange
|
|
8896
|
+
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange({
|
|
8796
8897
|
page: newPage
|
|
8797
8898
|
});
|
|
8798
8899
|
}, [onPageChange]);
|
|
@@ -8818,9 +8919,9 @@ const Pagination = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
8818
8919
|
}, children || /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(PaginationPreviousButton, null), Number(numPages) > 0 ? /*#__PURE__*/React__default["default"].createElement(PaginationPageInput, null) : null, /*#__PURE__*/React__default["default"].createElement(PaginationNextButton, null))));
|
|
8819
8920
|
});
|
|
8820
8921
|
|
|
8821
|
-
var css_248z$c = ".
|
|
8822
|
-
var styles$c = {"popover":"
|
|
8823
|
-
var stylesheet$c=".
|
|
8922
|
+
var css_248z$c = "._tG9Z6{position:absolute;z-index:1000;background-color:#fff;border-radius:4px;display:inline-block;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);border:1px solid #898989}._tG9Z6:focus{outline:none}._309Re,._309Re>div{position:absolute;width:8px;height:8px;background:inherit}._309Re{visibility:hidden;z-index:1000}._309Re>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._309Re{bottom:-4px}[data-popper-placement^=top]>._309Re>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._309Re{left:-5px}[data-popper-placement^=right]>._309Re>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._309Re{top:-5px}[data-popper-placement^=bottom]>._309Re>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._309Re{right:-4px}[data-popper-placement^=left]>._309Re>div{border-bottom-color:transparent;border-left-color:transparent}";
|
|
8923
|
+
var styles$c = {"popover":"_tG9Z6","arrow":"_309Re"};
|
|
8924
|
+
var stylesheet$c="._tG9Z6{position:absolute;z-index:1000;background-color:#fff;border-radius:4px;display:inline-block;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);border:1px solid #898989}._tG9Z6:focus{outline:none}._309Re,._309Re>div{position:absolute;width:8px;height:8px;background:inherit}._309Re{visibility:hidden;z-index:1000}._309Re>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._309Re{bottom:-4px}[data-popper-placement^=top]>._309Re>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._309Re{left:-5px}[data-popper-placement^=right]>._309Re>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._309Re{top:-5px}[data-popper-placement^=bottom]>._309Re>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._309Re{right:-4px}[data-popper-placement^=left]>._309Re>div{border-bottom-color:transparent;border-left-color:transparent}";
|
|
8824
8925
|
icons_index.styleInject(css_248z$c);
|
|
8825
8926
|
|
|
8826
8927
|
const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -8844,7 +8945,7 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
8844
8945
|
const classes = classNames__default["default"](styles$c.popover, className);
|
|
8845
8946
|
const anchorRef = React.useRef();
|
|
8846
8947
|
const popperRef = React.useRef(null);
|
|
8847
|
-
const preventClickOutside = useClickOutsidePortals(e => show && onClickOutside
|
|
8948
|
+
const preventClickOutside = useClickOutsidePortals(e => show && (onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside(e)));
|
|
8848
8949
|
const [isInDOM, setIsInDOM] = React.useState(false);
|
|
8849
8950
|
const popoverId = useId(externalId);
|
|
8850
8951
|
|
|
@@ -8861,22 +8962,23 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
8861
8962
|
* 2. A user in Safari clicks on 1 or more `Popover` anchor elements and then presses the `Escape` key. This is because buttons aren't focused on `click` or `mousedown` in Safari by default.
|
|
8862
8963
|
*/
|
|
8863
8964
|
if (!show && isInDOM) {
|
|
8965
|
+
var _anchorRef$current;
|
|
8864
8966
|
// Prevents scroll so that the page does not scroll to the anchor element if the anchor element is out of view
|
|
8865
|
-
anchorRef.current
|
|
8967
|
+
(_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.focus({
|
|
8866
8968
|
preventScroll: true
|
|
8867
8969
|
});
|
|
8868
8970
|
}
|
|
8869
8971
|
setIsInDOM(show);
|
|
8870
8972
|
}, [show, isInDOM]);
|
|
8871
8973
|
const handlePopoverContainerClick = e => {
|
|
8872
|
-
onClick
|
|
8974
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
8873
8975
|
};
|
|
8874
8976
|
const handlePopoverContainerKeyDown = e => {
|
|
8875
8977
|
if (e.key === 'Escape') {
|
|
8876
8978
|
e.stopPropagation(); // prevent event from closing modals or popovers
|
|
8877
|
-
onClose
|
|
8979
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
8878
8980
|
}
|
|
8879
|
-
onKeyDown
|
|
8981
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
8880
8982
|
};
|
|
8881
8983
|
return /*#__PURE__*/React__default["default"].createElement(Popper, {
|
|
8882
8984
|
open: show,
|
|
@@ -8889,6 +8991,7 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
8889
8991
|
'aria-expanded': show,
|
|
8890
8992
|
'aria-controls': show ? popoverId : undefined,
|
|
8891
8993
|
onMouseDown: e => {
|
|
8994
|
+
var _children$props$onMou, _children$props;
|
|
8892
8995
|
/*
|
|
8893
8996
|
* Prevents the anchor element from getting focus (only in some browsers).
|
|
8894
8997
|
* If a Popover is open and out of view, and another button is clicked, this prevents the browser from scrolling to the open Popover.
|
|
@@ -8896,9 +8999,9 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
8896
8999
|
*/
|
|
8897
9000
|
e.preventDefault();
|
|
8898
9001
|
preventClickOutside();
|
|
8899
|
-
children.props.onMouseDown
|
|
9002
|
+
(_children$props$onMou = (_children$props = children.props).onMouseDown) === null || _children$props$onMou === void 0 ? void 0 : _children$props$onMou.call(_children$props, e);
|
|
8900
9003
|
},
|
|
8901
|
-
ref: mergeRefs(anchorRef, children
|
|
9004
|
+
ref: mergeRefs(anchorRef, children === null || children === void 0 ? void 0 : children.ref)
|
|
8902
9005
|
}),
|
|
8903
9006
|
popper: /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
8904
9007
|
ref: mergeRefs(ref, popperRef),
|
|
@@ -8934,9 +9037,9 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
8934
9037
|
});
|
|
8935
9038
|
});
|
|
8936
9039
|
|
|
8937
|
-
var css_248z$b = ".
|
|
8938
|
-
var styles$b = {"loadingSpinner":"
|
|
8939
|
-
var stylesheet$b=".
|
|
9040
|
+
var css_248z$b = "._NqJ-J{display:flex;height:32px}";
|
|
9041
|
+
var styles$b = {"loadingSpinner":"_NqJ-J"};
|
|
9042
|
+
var stylesheet$b="._NqJ-J{display:flex;height:32px}";
|
|
8940
9043
|
icons_index.styleInject(css_248z$b);
|
|
8941
9044
|
|
|
8942
9045
|
const QuickSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -8972,11 +9075,11 @@ const QuickSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
8972
9075
|
if (!open) {
|
|
8973
9076
|
setIsLoading(true);
|
|
8974
9077
|
}
|
|
8975
|
-
setIsOpen
|
|
9078
|
+
setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(true);
|
|
8976
9079
|
};
|
|
8977
9080
|
const closeMenu = React.useCallback(() => {
|
|
8978
9081
|
setItems([]);
|
|
8979
|
-
internalCloseMenu
|
|
9082
|
+
internalCloseMenu === null || internalCloseMenu === void 0 ? void 0 : internalCloseMenu();
|
|
8980
9083
|
setIsLoading(true);
|
|
8981
9084
|
}, [setItems, internalCloseMenu, setIsLoading]);
|
|
8982
9085
|
const onSearchRef = useLatest(onSearch);
|
|
@@ -9006,14 +9109,14 @@ const QuickSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9006
9109
|
if (e.key === 'Enter' || e.key === 'ArrowDown') {
|
|
9007
9110
|
e.preventDefault(); // prevent scroll
|
|
9008
9111
|
openMenu();
|
|
9009
|
-
setHighlightedIndex
|
|
9112
|
+
setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(0);
|
|
9010
9113
|
if (!open) {
|
|
9011
9114
|
handleSearch(value);
|
|
9012
9115
|
}
|
|
9013
9116
|
} else if (e.key === 'ArrowUp') {
|
|
9014
9117
|
e.preventDefault(); // prevent scroll
|
|
9015
9118
|
openMenu();
|
|
9016
|
-
setHighlightedIndex
|
|
9119
|
+
setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(items.length - 1);
|
|
9017
9120
|
if (!open) {
|
|
9018
9121
|
handleSearch(value);
|
|
9019
9122
|
}
|
|
@@ -9061,6 +9164,7 @@ const QuickSearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9061
9164
|
});
|
|
9062
9165
|
|
|
9063
9166
|
const QuickSearch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
9167
|
+
var _anchorRef$current;
|
|
9064
9168
|
let {
|
|
9065
9169
|
maxHeight: externalMaxHeight,
|
|
9066
9170
|
menuProps,
|
|
@@ -9076,7 +9180,7 @@ const QuickSearch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9076
9180
|
const [items, setItems] = React.useState([]);
|
|
9077
9181
|
const maxHeight = items.length > 10 ? 500 : undefined;
|
|
9078
9182
|
const anchorRef = React.useRef(null);
|
|
9079
|
-
const anchorWidth = anchorRef
|
|
9183
|
+
const anchorWidth = anchorRef === null || anchorRef === void 0 ? void 0 : (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.clientWidth;
|
|
9080
9184
|
const {
|
|
9081
9185
|
translate
|
|
9082
9186
|
} = useTranslation();
|
|
@@ -9089,7 +9193,7 @@ const QuickSearch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9089
9193
|
portalTarget: portalTarget,
|
|
9090
9194
|
zIndex: zIndex,
|
|
9091
9195
|
anchor: /*#__PURE__*/React__default["default"].createElement(QuickSearchInput, _extends__default["default"]({}, rest, {
|
|
9092
|
-
role: role
|
|
9196
|
+
role: role !== null && role !== void 0 ? role : 'searchbox',
|
|
9093
9197
|
ref: mergeRefs(ref, anchorRef),
|
|
9094
9198
|
setIsLoading: setIsLoading,
|
|
9095
9199
|
items: items,
|
|
@@ -9106,14 +9210,14 @@ const QuickSearch = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9106
9210
|
return /*#__PURE__*/React__default["default"].createElement(MenuItem, {
|
|
9107
9211
|
key: index,
|
|
9108
9212
|
value: value,
|
|
9109
|
-
onSelect: () => onSelect
|
|
9213
|
+
onSelect: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(item)
|
|
9110
9214
|
}, label);
|
|
9111
9215
|
}));
|
|
9112
9216
|
});
|
|
9113
9217
|
|
|
9114
|
-
var css_248z$a = ".
|
|
9115
|
-
var styles$a = {"radio":"
|
|
9116
|
-
var stylesheet$a=".
|
|
9218
|
+
var css_248z$a = "._GCX7x{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._BBMH-,._GCX7x{cursor:pointer;height:16px;width:16px}._BBMH-{position:absolute;opacity:0;z-index:10}._BBMH-:checked~._Zfh1d>._n-ueu{fill-opacity:1}._BBMH-:checked:enabled~._Zfh1d{border-color:transparent;background-color:#0b6ed0}._BBMH-:checked:enabled~._Zfh1d>._n-ueu{fill:#fff}._BBMH-:checked:enabled:hover~._Zfh1d{background-color:#085caf}._BBMH-:not(:checked):enabled:hover~._Zfh1d{border-color:#0b6ed0}._BBMH-:disabled{cursor:not-allowed}._BBMH-:disabled~._Zfh1d{opacity:.4}._BBMH-:checked~._Zfh1d:after{content:\"\"}._dYvpr{color:#32363a;display:flex;align-items:center;cursor:pointer}._NVj-m{cursor:auto;color:hsla(0,0%,53.7%,.4)}._HjVM0{margin-right:12px;flex-shrink:0}._Zfh1d{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0;border-radius:50%;background-color:transparent!important;border-color:#898989!important}._n-ueu{fill:#0b6ed0;fill-opacity:0}._Zfh1d:after{position:absolute;z-index:0;background-color:#0b6ed0;border-radius:50%;height:10px;width:10px;top:2px;left:2px}._fOKka{border:none;padding:0;margin:0}._M8DXu{padding:0;margin:0 0 14px;color:#01213f}._BBMH-.focus-visible~._Zfh1d,._BBMH-:focus-visible~._Zfh1d{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9219
|
+
var styles$a = {"radio":"_GCX7x","input":"_BBMH-","check":"_Zfh1d","checkIcon":"_n-ueu","label":"_dYvpr","labelDisabled":"_NVj-m","wrappedInput":"_HjVM0","radioGroup":"_fOKka","legend":"_M8DXu"};
|
|
9220
|
+
var stylesheet$a="._GCX7x{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._BBMH-,._GCX7x{cursor:pointer;height:16px;width:16px}._BBMH-{position:absolute;opacity:0;z-index:10}._BBMH-:checked~._Zfh1d>._n-ueu{fill-opacity:1}._BBMH-:checked:enabled~._Zfh1d{border-color:transparent;background-color:#0b6ed0}._BBMH-:checked:enabled~._Zfh1d>._n-ueu{fill:#fff}._BBMH-:checked:enabled:hover~._Zfh1d{background-color:#085caf}._BBMH-:not(:checked):enabled:hover~._Zfh1d{border-color:#0b6ed0}._BBMH-:disabled{cursor:not-allowed}._BBMH-:disabled~._Zfh1d{opacity:.4}._BBMH-:checked~._Zfh1d:after{content:\"\"}._dYvpr{color:#32363a;display:flex;align-items:center;cursor:pointer}._NVj-m{cursor:auto;color:hsla(0,0%,53.7%,.4)}._HjVM0{margin-right:12px;flex-shrink:0}._Zfh1d{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0;border-radius:50%;background-color:transparent!important;border-color:#898989!important}._n-ueu{fill:#0b6ed0;fill-opacity:0}._Zfh1d:after{position:absolute;z-index:0;background-color:#0b6ed0;border-radius:50%;height:10px;width:10px;top:2px;left:2px}._fOKka{border:none;padding:0;margin:0}._M8DXu{padding:0;margin:0 0 14px;color:#01213f}._BBMH-.focus-visible~._Zfh1d,._BBMH-:focus-visible~._Zfh1d{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9117
9221
|
icons_index.styleInject(css_248z$a);
|
|
9118
9222
|
|
|
9119
9223
|
const {
|
|
@@ -9122,6 +9226,7 @@ const {
|
|
|
9122
9226
|
} = createContextUtilities({});
|
|
9123
9227
|
|
|
9124
9228
|
const Radio = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
9229
|
+
var _ref2;
|
|
9125
9230
|
let {
|
|
9126
9231
|
id,
|
|
9127
9232
|
className,
|
|
@@ -9146,25 +9251,25 @@ const Radio = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
9146
9251
|
helperTextId: formFieldHelperTextId,
|
|
9147
9252
|
errorTextId: formFieldErrorTextId
|
|
9148
9253
|
} = useFormFieldContext();
|
|
9149
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
9150
|
-
const checked = groupValue !== undefined ? value === groupValue : radioChecked
|
|
9151
|
-
const defaultChecked = groupDefaultValue !== undefined ? value === groupDefaultValue : radioDefaultChecked
|
|
9152
|
-
const onChange = radioGroupOnChange
|
|
9254
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
9255
|
+
const checked = groupValue !== undefined ? value === groupValue : radioChecked !== null && radioChecked !== void 0 ? radioChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked;
|
|
9256
|
+
const defaultChecked = groupDefaultValue !== undefined ? value === groupDefaultValue : radioDefaultChecked !== null && radioDefaultChecked !== void 0 ? radioDefaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked;
|
|
9257
|
+
const onChange = (_ref2 = radioGroupOnChange !== null && radioGroupOnChange !== void 0 ? radioGroupOnChange : radioOnChange) !== null && _ref2 !== void 0 ? _ref2 : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange;
|
|
9153
9258
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends__default["default"]({}, rest, {
|
|
9154
9259
|
ref: ref,
|
|
9155
9260
|
className: classNames__default["default"](className, styles$a.radio)
|
|
9156
9261
|
}), /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({}, inputProps, {
|
|
9157
|
-
className: classNames__default["default"](styles$a.input, inputProps
|
|
9262
|
+
className: classNames__default["default"](styles$a.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
9158
9263
|
type: "radio",
|
|
9159
|
-
id: id
|
|
9264
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
9160
9265
|
checked: checked,
|
|
9161
9266
|
defaultChecked: defaultChecked,
|
|
9162
|
-
disabled: disabled
|
|
9163
|
-
name: name
|
|
9164
|
-
value: value
|
|
9267
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
9268
|
+
name: name !== null && name !== void 0 ? name : inputProps === null || inputProps === void 0 ? void 0 : inputProps.name,
|
|
9269
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
9165
9270
|
onChange: disabled ? undefined : onChange,
|
|
9166
|
-
"aria-label": ariaLabel
|
|
9167
|
-
"aria-labelledby": ariaLabelledBy
|
|
9271
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
9272
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
9168
9273
|
"aria-describedby": internalAriaDescribedby
|
|
9169
9274
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9170
9275
|
className: styles$a.check
|
|
@@ -9225,9 +9330,9 @@ const RadioGroup = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref)
|
|
|
9225
9330
|
}, label), children));
|
|
9226
9331
|
});
|
|
9227
9332
|
|
|
9228
|
-
var css_248z$9 = ".
|
|
9229
|
-
var styles$9 = {"searchInput":"
|
|
9230
|
-
var stylesheet$9=".
|
|
9333
|
+
var css_248z$9 = "._Jbgi9{display:inline-block;position:relative}._JNIVg._JNIVg{padding-left:36px;padding-right:36px;width:100%}._JNIVg._JNIVg:disabled+._krW5u{fill-opacity:.6}._krW5u{position:absolute;top:50%;left:0;transform:translateY(-50%);margin-left:6px;fill:#515559;pointer-events:none}._krW5u._Plcgi{z-index:20}._wJ2-D{position:absolute;top:0;right:0;width:36px;height:100%;background-color:transparent;line-height:0;border:none;border-radius:4px}._wJ2-D:hover{cursor:pointer}._wJ2-D:hover>._zmD87{fill:#32363a}._wJ2-D:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zmD87{fill:#515559}";
|
|
9334
|
+
var styles$9 = {"searchInput":"_Jbgi9","searchInputInput":"_JNIVg","searchInputSearchIcon":"_krW5u","usedWithinInputGroup":"_Plcgi","searchInputClearButton":"_wJ2-D","searchInputClearButtonIcon":"_zmD87"};
|
|
9335
|
+
var stylesheet$9="._Jbgi9{display:inline-block;position:relative}._JNIVg._JNIVg{padding-left:36px;padding-right:36px;width:100%}._JNIVg._JNIVg:disabled+._krW5u{fill-opacity:.6}._krW5u{position:absolute;top:50%;left:0;transform:translateY(-50%);margin-left:6px;fill:#515559;pointer-events:none}._krW5u._Plcgi{z-index:20}._wJ2-D{position:absolute;top:0;right:0;width:36px;height:100%;background-color:transparent;line-height:0;border:none;border-radius:4px}._wJ2-D:hover{cursor:pointer}._wJ2-D:hover>._zmD87{fill:#32363a}._wJ2-D:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._zmD87{fill:#515559}";
|
|
9231
9336
|
icons_index.styleInject(css_248z$9);
|
|
9232
9337
|
|
|
9233
9338
|
const SearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
@@ -9261,7 +9366,8 @@ const SearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9261
9366
|
// Focuses the input after the input value is cleared so that screen readers see that the input doesn't have a value
|
|
9262
9367
|
React.useEffect(() => {
|
|
9263
9368
|
if (wasInputValueCleared) {
|
|
9264
|
-
|
|
9369
|
+
var _inputRef$current;
|
|
9370
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
9265
9371
|
setWasInputValueCleared(false);
|
|
9266
9372
|
}
|
|
9267
9373
|
}, [wasInputValueCleared]);
|
|
@@ -9280,7 +9386,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9280
9386
|
|
|
9281
9387
|
clearInputText();
|
|
9282
9388
|
}
|
|
9283
|
-
onKeyDown
|
|
9389
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
9284
9390
|
};
|
|
9285
9391
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9286
9392
|
className: classNames__default["default"](styles$9.searchInput, className),
|
|
@@ -9289,7 +9395,7 @@ const SearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9289
9395
|
role: "searchbox",
|
|
9290
9396
|
id: id,
|
|
9291
9397
|
className: styles$9.searchInputInput,
|
|
9292
|
-
placeholder: placeholder
|
|
9398
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : translate('searchText'),
|
|
9293
9399
|
value: inputValue,
|
|
9294
9400
|
onChange: handleInputChange,
|
|
9295
9401
|
onKeyDown: handleInputKeyDown,
|
|
@@ -9327,9 +9433,9 @@ const SearchInput = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9327
9433
|
|
|
9328
9434
|
/* eslint-disable import/prefer-default-export */
|
|
9329
9435
|
|
|
9330
|
-
var css_248z$8 = ".
|
|
9331
|
-
var styles$8 = {"sideBarNav":"
|
|
9332
|
-
var stylesheet$8=".
|
|
9436
|
+
var css_248z$8 = "._CiJpK{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._CiJpK._DsuOE{width:69px;min-width:auto;max-width:none}._gJL0p{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._kEHOq{margin-bottom:12px;background-color:transparent!important}._kEHOq:hover{background-color:rgba(11,110,208,.08)!important}._kEHOq:hover ._0UMT3{fill:#085caf}._kEHOq:hover ._Lc88m{color:#085caf}._kEHOq:active{background-color:rgba(11,110,208,.12)!important}._kEHOq:active ._0UMT3{fill:#0854a1}._kEHOq:active ._Lc88m{color:#0854a1}._kEHOq._H-fOT{background-color:rgba(11,110,208,.08)!important}._kEHOq._H-fOT ._0UMT3{fill:#0b6ed0}._kEHOq._H-fOT ._Lc88m{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._kEHOq._H-fOT:hover{background-color:rgba(11,110,208,.08)!important}._kEHOq._H-fOT:hover ._0UMT3{fill:#085caf}._kEHOq._H-fOT:hover ._Lc88m{color:#085caf}._kEHOq._H-fOT:active{background-color:rgba(11,110,208,.12)!important}._kEHOq._H-fOT:active ._0UMT3{fill:#0854a1}._kEHOq._H-fOT:active ._Lc88m{color:#0854a1}._IG59P{border-radius:6px}._IG59P ._0UMT3{display:block;fill:#515559}._cmeyb{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._G2ZLt,._NskbF{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._G2ZLt ._0UMT3,._NskbF ._0UMT3{fill:#515559}._G2ZLt ._Lc88m,._NskbF ._Lc88m{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}._kEHOq.focus-visible,._kEHOq:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9437
|
+
var styles$8 = {"sideBarNav":"_CiJpK","collapsed":"_DsuOE","navItems":"_gJL0p","sidebarNavItem":"_kEHOq","icon":"_0UMT3","label":"_Lc88m","selected":"_H-fOT","sidebarNavItemIconButton":"_IG59P","expandCollapseButtonContainer":"_cmeyb","navLink":"_G2ZLt","iconButtonWithLabel":"_NskbF"};
|
|
9438
|
+
var stylesheet$8="._CiJpK{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._CiJpK._DsuOE{width:69px;min-width:auto;max-width:none}._gJL0p{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._kEHOq{margin-bottom:12px;background-color:transparent!important}._kEHOq:hover{background-color:rgba(11,110,208,.08)!important}._kEHOq:hover ._0UMT3{fill:#085caf}._kEHOq:hover ._Lc88m{color:#085caf}._kEHOq:active{background-color:rgba(11,110,208,.12)!important}._kEHOq:active ._0UMT3{fill:#0854a1}._kEHOq:active ._Lc88m{color:#0854a1}._kEHOq._H-fOT{background-color:rgba(11,110,208,.08)!important}._kEHOq._H-fOT ._0UMT3{fill:#0b6ed0}._kEHOq._H-fOT ._Lc88m{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._kEHOq._H-fOT:hover{background-color:rgba(11,110,208,.08)!important}._kEHOq._H-fOT:hover ._0UMT3{fill:#085caf}._kEHOq._H-fOT:hover ._Lc88m{color:#085caf}._kEHOq._H-fOT:active{background-color:rgba(11,110,208,.12)!important}._kEHOq._H-fOT:active ._0UMT3{fill:#0854a1}._kEHOq._H-fOT:active ._Lc88m{color:#0854a1}._IG59P{border-radius:6px}._IG59P ._0UMT3{display:block;fill:#515559}._cmeyb{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._G2ZLt,._NskbF{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._G2ZLt ._0UMT3,._NskbF ._0UMT3{fill:#515559}._G2ZLt ._Lc88m,._NskbF ._Lc88m{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}._kEHOq.focus-visible,._kEHOq:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9333
9439
|
icons_index.styleInject(css_248z$8);
|
|
9334
9440
|
|
|
9335
9441
|
const {
|
|
@@ -9406,7 +9512,8 @@ const SidebarNav = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9406
9512
|
*/
|
|
9407
9513
|
React.useEffect(() => {
|
|
9408
9514
|
if (isExpandCollapseButtonFocused) {
|
|
9409
|
-
|
|
9515
|
+
var _expandCollapseButton;
|
|
9516
|
+
(_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
|
|
9410
9517
|
}
|
|
9411
9518
|
}, [isCollapsed, isExpandCollapseButtonFocused]);
|
|
9412
9519
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -9452,7 +9559,7 @@ const SidebarNavLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9452
9559
|
isCollapsed,
|
|
9453
9560
|
NavLink
|
|
9454
9561
|
} = useSidebarNavContext();
|
|
9455
|
-
const Icon = isCollapsed ? icon
|
|
9562
|
+
const Icon = isCollapsed ? icon !== null && icon !== void 0 ? icon : icons_index.ExcludeIcon : icon;
|
|
9456
9563
|
const link = /*#__PURE__*/React__default["default"].createElement(NavLink, {
|
|
9457
9564
|
className: isActive => classNames__default["default"](styles$8.sidebarNavItem, styles$8.navLink, {
|
|
9458
9565
|
[styles$8.noIcon]: !Icon,
|
|
@@ -9483,9 +9590,9 @@ const SidebarNavLink = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
9483
9590
|
return link;
|
|
9484
9591
|
});
|
|
9485
9592
|
|
|
9486
|
-
var css_248z$7 = ".
|
|
9487
|
-
var styles$7 = {"slider":"
|
|
9488
|
-
var stylesheet$7=".
|
|
9593
|
+
var css_248z$7 = "._fNSYs{height:auto;width:200px;padding:5px 10px}._yrqeQ{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._lNOmF{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._C83EQ,._lNOmF{position:absolute}._C83EQ{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._C83EQ:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}._C83EQ.focus-visible,._C83EQ:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9594
|
+
var styles$7 = {"slider":"_fNSYs","track":"_yrqeQ","fill":"_lNOmF","button":"_C83EQ"};
|
|
9595
|
+
var stylesheet$7="._fNSYs{height:auto;width:200px;padding:5px 10px}._yrqeQ{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._lNOmF{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._C83EQ,._lNOmF{position:absolute}._C83EQ{top:-5px;left:-10px;border:1px solid #007ac0;overflow:visible;width:18px;height:18px;padding:0;margin:0;border-radius:9px;cursor:pointer;display:inline-block;text-align:center;background:#fff;text-decoration:none;outline:none}._C83EQ:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}._C83EQ.focus-visible,._C83EQ:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9489
9596
|
icons_index.styleInject(css_248z$7);
|
|
9490
9597
|
|
|
9491
9598
|
const buttonOffset = -10;
|
|
@@ -9532,7 +9639,7 @@ const SliderButton = _ref => {
|
|
|
9532
9639
|
const anchorButton = /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
9533
9640
|
className: styles$7.button,
|
|
9534
9641
|
style: {
|
|
9535
|
-
left:
|
|
9642
|
+
left: "calc(".concat(buttonPosition, "% + ").concat(buttonOffset, "px")
|
|
9536
9643
|
},
|
|
9537
9644
|
onMouseDown: handleMouseDown,
|
|
9538
9645
|
onKeyDown: onKeyDown,
|
|
@@ -9669,7 +9776,7 @@ const Slider = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
9669
9776
|
className: styles$7.fill,
|
|
9670
9777
|
style: {
|
|
9671
9778
|
left: -1,
|
|
9672
|
-
right:
|
|
9779
|
+
right: "".concat(100 - buttonPosition, "%")
|
|
9673
9780
|
}
|
|
9674
9781
|
}), /*#__PURE__*/React__default["default"].createElement(SliderButton, {
|
|
9675
9782
|
"aria-valuemin": min,
|
|
@@ -9790,8 +9897,8 @@ const RangeSlider = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
9790
9897
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9791
9898
|
className: styles$7.fill,
|
|
9792
9899
|
style: {
|
|
9793
|
-
left:
|
|
9794
|
-
right:
|
|
9900
|
+
left: "".concat(buttonPositions[0], "%"),
|
|
9901
|
+
right: "".concat(100 - buttonPositions[1], "%")
|
|
9795
9902
|
}
|
|
9796
9903
|
}), values.map((value, index) => /*#__PURE__*/React__default["default"].createElement(SliderButton, {
|
|
9797
9904
|
key: index,
|
|
@@ -9813,9 +9920,9 @@ const RangeSlider = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
9813
9920
|
}))));
|
|
9814
9921
|
});
|
|
9815
9922
|
|
|
9816
|
-
var css_248z$6 = ".
|
|
9817
|
-
var styles$6 = {"switch":"
|
|
9818
|
-
var stylesheet$6=".
|
|
9923
|
+
var css_248z$6 = "._6ksuV{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._6ksuV._rXGZW{cursor:not-allowed}._BMiaS{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._BMiaS:disabled{cursor:not-allowed}._BMiaS:disabled~._0E-IL{opacity:.4}._BMiaS:checked~._0E-IL{background-color:#0b6ed0}._BMiaS:checked~._0E-IL:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._BMiaS:hover:not(:disabled):not(:checked)~._0E-IL{background-color:#6a6a6a}._BMiaS:hover:not(:disabled):checked~._0E-IL{background-color:#085caf}._BMiaS:hover:not(:disabled):checked~._0E-IL:before{border-color:#085caf}._0E-IL{width:32px;background-color:#898989;border-radius:34px}._0E-IL,._0E-IL:before{height:16px;transition:.2s}._0E-IL:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._m1NjK{color:#32363a;display:flex;align-items:center;cursor:pointer}._WFhwb{cursor:auto;color:hsla(0,0%,53.7%,.4)}._zNEWp{margin-right:12px;flex-shrink:0}._BMiaS.focus-visible~._0E-IL,._BMiaS:focus-visible~._0E-IL{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9924
|
+
var styles$6 = {"switch":"_6ksuV","disabled":"_rXGZW","input":"_BMiaS","slider":"_0E-IL","label":"_m1NjK","labelDisabled":"_WFhwb","wrappedInput":"_zNEWp"};
|
|
9925
|
+
var stylesheet$6="._6ksuV{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._6ksuV._rXGZW{cursor:not-allowed}._BMiaS{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._BMiaS:disabled{cursor:not-allowed}._BMiaS:disabled~._0E-IL{opacity:.4}._BMiaS:checked~._0E-IL{background-color:#0b6ed0}._BMiaS:checked~._0E-IL:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._BMiaS:hover:not(:disabled):not(:checked)~._0E-IL{background-color:#6a6a6a}._BMiaS:hover:not(:disabled):checked~._0E-IL{background-color:#085caf}._BMiaS:hover:not(:disabled):checked~._0E-IL:before{border-color:#085caf}._0E-IL{width:32px;background-color:#898989;border-radius:34px}._0E-IL,._0E-IL:before{height:16px;transition:.2s}._0E-IL:before{box-sizing:border-box;position:absolute;left:0;content:\"\";width:16px;background-color:#fff;border-radius:50%;border:1px solid #898989;z-index:0}._m1NjK{color:#32363a;display:flex;align-items:center;cursor:pointer}._WFhwb{cursor:auto;color:hsla(0,0%,53.7%,.4)}._zNEWp{margin-right:12px;flex-shrink:0}._BMiaS.focus-visible~._0E-IL,._BMiaS:focus-visible~._0E-IL{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
9819
9926
|
icons_index.styleInject(css_248z$6);
|
|
9820
9927
|
|
|
9821
9928
|
const Switch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -9838,26 +9945,26 @@ const Switch = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
9838
9945
|
helperTextId: formFieldHelperTextId,
|
|
9839
9946
|
errorTextId: formFieldErrorTextId
|
|
9840
9947
|
} = useFormFieldContext();
|
|
9841
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
9948
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
9842
9949
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends__default["default"]({}, rest, {
|
|
9843
9950
|
ref: ref,
|
|
9844
9951
|
className: classNames__default["default"](className, styles$6.switch, {
|
|
9845
9952
|
[styles$6.disabled]: disabled
|
|
9846
9953
|
})
|
|
9847
9954
|
}), /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({}, inputProps, {
|
|
9848
|
-
className: classNames__default["default"](styles$6.input, inputProps
|
|
9955
|
+
className: classNames__default["default"](styles$6.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
9849
9956
|
type: "checkbox",
|
|
9850
9957
|
role: "switch",
|
|
9851
|
-
id: id
|
|
9852
|
-
checked: checked
|
|
9853
|
-
defaultChecked: defaultChecked
|
|
9854
|
-
disabled: disabled
|
|
9855
|
-
onChange: disabled ? undefined : onChange
|
|
9856
|
-
value: value
|
|
9857
|
-
"aria-label": ariaLabel
|
|
9858
|
-
"aria-labelledby": ariaLabelledBy
|
|
9958
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
9959
|
+
checked: checked !== null && checked !== void 0 ? checked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked,
|
|
9960
|
+
defaultChecked: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked,
|
|
9961
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
9962
|
+
onChange: disabled ? undefined : onChange !== null && onChange !== void 0 ? onChange : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange,
|
|
9963
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
9964
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
9965
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
9859
9966
|
"aria-describedby": internalAriaDescribedby,
|
|
9860
|
-
tabIndex: tabIndex
|
|
9967
|
+
tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : inputProps === null || inputProps === void 0 ? void 0 : inputProps.tabIndex
|
|
9861
9968
|
})), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
9862
9969
|
className: styles$6.slider
|
|
9863
9970
|
}));
|
|
@@ -9896,9 +10003,9 @@ const SwitchField = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
9896
10003
|
}), label);
|
|
9897
10004
|
});
|
|
9898
10005
|
|
|
9899
|
-
var css_248z$5 = ".
|
|
9900
|
-
var styles$5 = {"table":"
|
|
9901
|
-
var stylesheet$5=".
|
|
10006
|
+
var css_248z$5 = "._VQYYc{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._VQYYc ._cTjiR:first-child,._VQYYc ._MTFAz:first-child{padding-left:16px}._-VfRz{font-size:12px}._cTjiR{padding:12px 8px;text-align:left;font-weight:700}._aitRC ._YlVgb{border-top:1px solid #ededed}._aitRC ._YlVgb:hover{background-color:#fafafa}._YlVgb{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._MTFAz{padding:16px 8px;word-break:break-word;text-align:left}";
|
|
10007
|
+
var styles$5 = {"table":"_VQYYc","tableCell":"_MTFAz","tableHeaderCell":"_cTjiR","tableHead":"_-VfRz","tableBody":"_aitRC","tableRow":"_YlVgb"};
|
|
10008
|
+
var stylesheet$5="._VQYYc{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._VQYYc ._cTjiR:first-child,._VQYYc ._MTFAz:first-child{padding-left:16px}._-VfRz{font-size:12px}._cTjiR{padding:12px 8px;text-align:left;font-weight:700}._aitRC ._YlVgb{border-top:1px solid #ededed}._aitRC ._YlVgb:hover{background-color:#fafafa}._YlVgb{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._MTFAz{padding:16px 8px;word-break:break-word;text-align:left}";
|
|
9902
10009
|
icons_index.styleInject(css_248z$5);
|
|
9903
10010
|
|
|
9904
10011
|
const Table = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -10030,9 +10137,9 @@ const Tabs$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =>
|
|
|
10030
10137
|
}, children));
|
|
10031
10138
|
});
|
|
10032
10139
|
|
|
10033
|
-
var css_248z$4 = ".
|
|
10034
|
-
var styles$4 = {"tablist":"
|
|
10035
|
-
var stylesheet$4=".
|
|
10140
|
+
var css_248z$4 = "._YBYEv{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._YBYEv._m0zX- ._uHVG4{flex:1 1 0px;max-width:none}._uHVG4{background:inherit;font-family:inherit;font-size:100%;line-height:1.15;margin:0;-webkit-appearance:button;-moz-appearance:button;appearance:button;text-transform:none;text-align:center;color:#6a6d70;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border:none;border-bottom:2px solid transparent;border-radius:1px;display:block;outline:none;cursor:pointer}._uHVG4:hover{color:#32363a}._uHVG4._pQ79r{border-bottom-color:#0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._HaA-r{padding-top:32px}._HaA-r._vQmhw{display:none}._uHVG4.focus-visible,._uHVG4:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
10141
|
+
var styles$4 = {"tablist":"_YBYEv","grow":"_m0zX-","tab":"_uHVG4","selected":"_pQ79r","tabpanel":"_HaA-r","inactive":"_vQmhw"};
|
|
10142
|
+
var stylesheet$4="._YBYEv{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._YBYEv._m0zX- ._uHVG4{flex:1 1 0px;max-width:none}._uHVG4{background:inherit;font-family:inherit;font-size:100%;line-height:1.15;margin:0;-webkit-appearance:button;-moz-appearance:button;appearance:button;text-transform:none;text-align:center;color:#6a6d70;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border:none;border-bottom:2px solid transparent;border-radius:1px;display:block;outline:none;cursor:pointer}._uHVG4:hover{color:#32363a}._uHVG4._pQ79r{border-bottom-color:#0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._HaA-r{padding-top:32px}._HaA-r._vQmhw{display:none}._uHVG4.focus-visible,._uHVG4:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
10036
10143
|
icons_index.styleInject(css_248z$4);
|
|
10037
10144
|
|
|
10038
10145
|
const Tab$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
@@ -10050,8 +10157,8 @@ const Tab$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
10050
10157
|
rootTestId,
|
|
10051
10158
|
isTabListFocused
|
|
10052
10159
|
} = useTabContext$1();
|
|
10053
|
-
const tabId = getSubDataTestId(rootId,
|
|
10054
|
-
const tabTestId = getSubDataTestId(rootTestId,
|
|
10160
|
+
const tabId = getSubDataTestId(rootId, "tab-".concat(value));
|
|
10161
|
+
const tabTestId = getSubDataTestId(rootTestId, "tab-".concat(value));
|
|
10055
10162
|
const isSelected = activeTab === value;
|
|
10056
10163
|
const onClick = React__default["default"].useCallback(() => {
|
|
10057
10164
|
setActiveTab(value);
|
|
@@ -10067,7 +10174,7 @@ const Tab$1 = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
10067
10174
|
[styles$4.selected]: isSelected
|
|
10068
10175
|
}),
|
|
10069
10176
|
"aria-selected": isSelected,
|
|
10070
|
-
"aria-controls":
|
|
10177
|
+
"aria-controls": "".concat(rootId, "-tabpanel-").concat(value),
|
|
10071
10178
|
"aria-label": ariaLabel,
|
|
10072
10179
|
onClick: onClick,
|
|
10073
10180
|
ref: ref,
|
|
@@ -10091,8 +10198,8 @@ const TabsList = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10091
10198
|
isTabListFocused,
|
|
10092
10199
|
setIsTabListFocused
|
|
10093
10200
|
} = useTabContext$1();
|
|
10094
|
-
const tabListId = getSubDataTestId(rootId,
|
|
10095
|
-
const tabListTestId = getSubDataTestId(rootTestId,
|
|
10201
|
+
const tabListId = getSubDataTestId(rootId, "tablist");
|
|
10202
|
+
const tabListTestId = getSubDataTestId(rootTestId, "tablist");
|
|
10096
10203
|
const tabListRef = React.useRef(null);
|
|
10097
10204
|
// We use this map of tab element to index to allow constant time index
|
|
10098
10205
|
// lookup when we handle an event from a child tab
|
|
@@ -10154,10 +10261,11 @@ const TabsList = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10154
10261
|
ref: mergeRefs(ref, tabListRef),
|
|
10155
10262
|
tabIndex: -1 // Needed to satisfy the jsx-a11y/interactive-supports-focus rule
|
|
10156
10263
|
}), React__default["default"].Children.map(children, (child, index) => {
|
|
10157
|
-
if (child
|
|
10264
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === Tab$1) {
|
|
10265
|
+
var _child$props$value;
|
|
10158
10266
|
return /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
10159
|
-
value: child.props.value
|
|
10160
|
-
ref: mergeRefs(child
|
|
10267
|
+
value: (_child$props$value = child.props.value) !== null && _child$props$value !== void 0 ? _child$props$value : index,
|
|
10268
|
+
ref: mergeRefs(child === null || child === void 0 ? void 0 : child.ref, node => {
|
|
10161
10269
|
// Store a reverse node/index map for
|
|
10162
10270
|
// constant time index lookups from event handlers
|
|
10163
10271
|
if (node) {
|
|
@@ -10183,14 +10291,14 @@ const TabPanel = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
10183
10291
|
rootId,
|
|
10184
10292
|
rootTestId
|
|
10185
10293
|
} = useTabContext$1();
|
|
10186
|
-
const tabPanelId = getSubDataTestId(rootId,
|
|
10187
|
-
const tabPanelTestId = getSubDataTestId(rootTestId,
|
|
10294
|
+
const tabPanelId = getSubDataTestId(rootId, "tabpanel-".concat(value));
|
|
10295
|
+
const tabPanelTestId = getSubDataTestId(rootTestId, "tabpanel-".concat(value));
|
|
10188
10296
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
10189
10297
|
ref: ref,
|
|
10190
10298
|
"data-testid": tabPanelTestId,
|
|
10191
10299
|
id: tabPanelId,
|
|
10192
10300
|
role: "tabpanel",
|
|
10193
|
-
"aria-labelledby":
|
|
10301
|
+
"aria-labelledby": "".concat(rootId, "-tab-").concat(value),
|
|
10194
10302
|
className: classNames__default["default"](styles$4.tabpanel, className, {
|
|
10195
10303
|
[styles$4.inactive]: value !== activeTab
|
|
10196
10304
|
})
|
|
@@ -10219,15 +10327,15 @@ const UIProvider = _ref => {
|
|
|
10219
10327
|
config = {}
|
|
10220
10328
|
} = _ref;
|
|
10221
10329
|
return /*#__PURE__*/React__default["default"].createElement(TranslationProvider, {
|
|
10222
|
-
localizedText: config
|
|
10330
|
+
localizedText: config === null || config === void 0 ? void 0 : config.localizedText
|
|
10223
10331
|
}, /*#__PURE__*/React__default["default"].createElement(PortalTargetProvider, {
|
|
10224
|
-
target: portalTarget
|
|
10332
|
+
target: portalTarget !== null && portalTarget !== void 0 ? portalTarget : null
|
|
10225
10333
|
}, children));
|
|
10226
10334
|
};
|
|
10227
10335
|
|
|
10228
|
-
var css_248z$3 = ".
|
|
10229
|
-
var styles$3 = {"colorPickerBtnColor":"
|
|
10230
|
-
var stylesheet$3=".
|
|
10336
|
+
var css_248z$3 = "._v5e6-{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._Vj6hg{margin-right:-12px;margin-left:4px}._0rF0N{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._nXRmT{margin:8px 8px 0;display:flex}._9Qm8U,._pD1Vi{margin-left:4px}._kHIiz{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._dJTaJ{margin:0 4px 4px 0}._dJTaJ:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._igKAB{margin:4px 8px 8px}._1Bfmq{position:relative;width:96px;height:96px;outline:0}._1Bfmq.focus-visible ._-Wj5R,._1Bfmq:focus-visible ._-Wj5R{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._VQsAf{background:linear-gradient(90deg,#fff,transparent)}._MZcWR,._VQsAf{position:absolute;top:0;right:0;bottom:0;left:0}._MZcWR{background:linear-gradient(0deg,#000,transparent)}._-Wj5R{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._kHcvZ{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._kHcvZ.focus-visible ._FTVt-,._kHcvZ:focus-visible ._FTVt-{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._FTVt-{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._gciko{position:relative;width:16px;height:96px}._k-XIk{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._k-XIk,._Vox9e{position:absolute}._Vox9e{top:0;right:0;bottom:0;left:0;outline:0}._Vox9e.focus-visible ._k-XIk,._Vox9e:focus-visible ._k-XIk{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._DvbNT{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._FRHtS{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._FRHtS.focus-visible,._FRHtS:focus-visible{outline:none}._FRHtS.focus-visible,._FRHtS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._E3RIk{display:flex}._E3RIk ._hveoR{position:relative;flex-shrink:0;width:26px;height:26px}._E3RIk ._CSvzS{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._E3RIk ._LJNQL{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
10337
|
+
var styles$3 = {"colorPickerBtnColor":"_v5e6-","colorPickerBtnIcon":"_Vj6hg","colorPicker":"_0rF0N","colorPickerSliderContainer":"_nXRmT","colorPickerHue":"_9Qm8U","colorPickerAlpha":"_pD1Vi","colorPickerSwatches":"_kHIiz","colorPickerSwatch":"_dJTaJ","colorPickerHex":"_igKAB","saturation":"_1Bfmq","saturationCircle":"_-Wj5R","saturationWhite":"_VQsAf","saturationBlack":"_MZcWR","hue":"_kHcvZ","hueSlider":"_FTVt-","alpha":"_gciko","alphaSlider":"_k-XIk","alphaGradient":"_Vox9e","alphaCheckerboard":"_DvbNT","swatch":"_FRHtS","hex":"_E3RIk","hexSwatch":"_hveoR","hexSwatchColor":"_CSvzS","hexInput":"_LJNQL"};
|
|
10338
|
+
var stylesheet$3="._v5e6-{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._Vj6hg{margin-right:-12px;margin-left:4px}._0rF0N{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._nXRmT{margin:8px 8px 0;display:flex}._9Qm8U,._pD1Vi{margin-left:4px}._kHIiz{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._dJTaJ{margin:0 4px 4px 0}._dJTaJ:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._igKAB{margin:4px 8px 8px}._1Bfmq{position:relative;width:96px;height:96px;outline:0}._1Bfmq.focus-visible ._-Wj5R,._1Bfmq:focus-visible ._-Wj5R{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._VQsAf{background:linear-gradient(90deg,#fff,transparent)}._MZcWR,._VQsAf{position:absolute;top:0;right:0;bottom:0;left:0}._MZcWR{background:linear-gradient(0deg,#000,transparent)}._-Wj5R{position:absolute;border:2px solid #fff;border-radius:5px;height:8px;width:8px;margin:0 0 -4px -4px;box-shadow:0 0 1px 1px rgba(0,0,0,.4),inset 0 0 1px #000}._kHcvZ{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._kHcvZ.focus-visible ._FTVt-,._kHcvZ:focus-visible ._FTVt-{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._FTVt-{width:16px;height:4px;background:#fff;border-radius:50%;position:absolute;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._gciko{position:relative;width:16px;height:96px}._k-XIk{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._k-XIk,._Vox9e{position:absolute}._Vox9e{top:0;right:0;bottom:0;left:0;outline:0}._Vox9e.focus-visible ._k-XIk,._Vox9e:focus-visible ._k-XIk{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._DvbNT{position:absolute;top:0;right:0;bottom:0;left:0;background-image:linear-gradient(45deg,#d9dadb 25%,transparent 0),linear-gradient(-45deg,#d9dadb 25%,transparent 0),linear-gradient(45deg,transparent 75%,#d9dadb 0),linear-gradient(-45deg,transparent 75%,#d9dadb 0);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}._FRHtS{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._FRHtS.focus-visible,._FRHtS:focus-visible{outline:none}._FRHtS.focus-visible,._FRHtS:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._E3RIk{display:flex}._E3RIk ._hveoR{position:relative;flex-shrink:0;width:26px;height:26px}._E3RIk ._CSvzS{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._E3RIk ._LJNQL{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
10231
10339
|
icons_index.styleInject(css_248z$3);
|
|
10232
10340
|
|
|
10233
10341
|
function useMouseDrag(handleChange) {
|
|
@@ -10324,13 +10432,13 @@ const Saturation = function Saturation(_ref) {
|
|
|
10324
10432
|
} = _ref;
|
|
10325
10433
|
const containerRef = React__default["default"].useRef(null);
|
|
10326
10434
|
const handleChange = useEventCallback(e => {
|
|
10327
|
-
onChange
|
|
10435
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(getMouseChange$2(e, hsb, containerRef.current), e);
|
|
10328
10436
|
});
|
|
10329
10437
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
10330
10438
|
function handleKeyDown(e) {
|
|
10331
10439
|
if (Object.keys(KEY_CHANGES$2).indexOf(e.key) > -1) {
|
|
10332
10440
|
const change = getKeyChange$2(e, hsb);
|
|
10333
|
-
onChange
|
|
10441
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
10334
10442
|
}
|
|
10335
10443
|
}
|
|
10336
10444
|
return (
|
|
@@ -10339,7 +10447,7 @@ const Saturation = function Saturation(_ref) {
|
|
|
10339
10447
|
React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
10340
10448
|
ref: containerRef,
|
|
10341
10449
|
style: {
|
|
10342
|
-
backgroundColor:
|
|
10450
|
+
backgroundColor: "hsl(".concat(hsb.h, ", 100%, 50%)")
|
|
10343
10451
|
},
|
|
10344
10452
|
className: classNames__default["default"](styles$3.saturation, className),
|
|
10345
10453
|
onMouseDown: handleMouseDown,
|
|
@@ -10356,8 +10464,8 @@ const Saturation = function Saturation(_ref) {
|
|
|
10356
10464
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10357
10465
|
className: styles$3.saturationCircle,
|
|
10358
10466
|
style: {
|
|
10359
|
-
bottom:
|
|
10360
|
-
left:
|
|
10467
|
+
bottom: "".concat(hsb.b * 100, "%"),
|
|
10468
|
+
left: "".concat(hsb.s * 100, "%")
|
|
10361
10469
|
}
|
|
10362
10470
|
}))))
|
|
10363
10471
|
);
|
|
@@ -10391,7 +10499,7 @@ const HexInput = function HexInput(_ref) {
|
|
|
10391
10499
|
function handleChange(e) {
|
|
10392
10500
|
setValue(e.target.value);
|
|
10393
10501
|
if (isValid(e.target.value)) {
|
|
10394
|
-
onChange
|
|
10502
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value, e);
|
|
10395
10503
|
}
|
|
10396
10504
|
}
|
|
10397
10505
|
function handleBlur() {
|
|
@@ -10430,9 +10538,9 @@ const Swatch = function Swatch(_ref) {
|
|
|
10430
10538
|
...rest
|
|
10431
10539
|
} = _ref;
|
|
10432
10540
|
function handleClick(e) {
|
|
10433
|
-
onClick
|
|
10541
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(color, e);
|
|
10434
10542
|
}
|
|
10435
|
-
const handleKeyDown = e => e.keyCode === ENTER && onClick
|
|
10543
|
+
const handleKeyDown = e => e.keyCode === ENTER && (onClick === null || onClick === void 0 ? void 0 : onClick(color, e));
|
|
10436
10544
|
return /*#__PURE__*/React__default["default"].createElement("span", _extends__default["default"]({}, rest, {
|
|
10437
10545
|
role: "button",
|
|
10438
10546
|
tabIndex: 0,
|
|
@@ -10489,13 +10597,13 @@ const Hue = function Hue(_ref) {
|
|
|
10489
10597
|
const containerRef = React__default["default"].useRef(null);
|
|
10490
10598
|
const handleChange = useEventCallback(e => {
|
|
10491
10599
|
const change = getMouseChange$1(e, hsb, containerRef.current);
|
|
10492
|
-
onChange
|
|
10600
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
10493
10601
|
});
|
|
10494
10602
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
10495
10603
|
function handleKeyDown(e) {
|
|
10496
10604
|
if (Object.keys(KEY_CHANGES$1).indexOf(e.key) > -1) {
|
|
10497
10605
|
const change = getKeyChange$1(e, hsb);
|
|
10498
|
-
onChange
|
|
10606
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
10499
10607
|
}
|
|
10500
10608
|
}
|
|
10501
10609
|
return (
|
|
@@ -10516,7 +10624,7 @@ const Hue = function Hue(_ref) {
|
|
|
10516
10624
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10517
10625
|
className: styles$3.hueSlider,
|
|
10518
10626
|
style: {
|
|
10519
|
-
bottom:
|
|
10627
|
+
bottom: "".concat(hsb.h / 360 * 100, "%")
|
|
10520
10628
|
}
|
|
10521
10629
|
}))
|
|
10522
10630
|
);
|
|
@@ -10566,13 +10674,13 @@ const Alpha = function Alpha(_ref) {
|
|
|
10566
10674
|
const containerRef = React__default["default"].useRef(null);
|
|
10567
10675
|
const handleChange = useEventCallback(e => {
|
|
10568
10676
|
const change = getMouseChange(e, hsl, alpha, containerRef.current);
|
|
10569
|
-
onChange
|
|
10677
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
10570
10678
|
});
|
|
10571
10679
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
10572
10680
|
function handleKeyDown(e) {
|
|
10573
10681
|
if (Object.keys(KEY_CHANGES).indexOf(e.key) > -1) {
|
|
10574
10682
|
const change = getKeyChange(e, hsl);
|
|
10575
|
-
onChange
|
|
10683
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
10576
10684
|
}
|
|
10577
10685
|
}
|
|
10578
10686
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -10587,7 +10695,7 @@ const Alpha = function Alpha(_ref) {
|
|
|
10587
10695
|
onTouchMove: handleChange,
|
|
10588
10696
|
onTouchStart: handleChange,
|
|
10589
10697
|
style: {
|
|
10590
|
-
background:
|
|
10698
|
+
background: "linear-gradient(to top, hsla(".concat(hsl.h, ", ").concat(hsl.s * 100, "%, ").concat(hsl.l * 100, "%, 0) 0%, hsla(").concat(hsl.h, ", ").concat(hsl.s * 100, "%, ").concat(hsl.l * 100, "%, 1) 100%)")
|
|
10591
10699
|
},
|
|
10592
10700
|
role: "slider",
|
|
10593
10701
|
"aria-valuemin": 0,
|
|
@@ -10597,7 +10705,7 @@ const Alpha = function Alpha(_ref) {
|
|
|
10597
10705
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
10598
10706
|
className: styles$3.alphaSlider,
|
|
10599
10707
|
style: {
|
|
10600
|
-
bottom:
|
|
10708
|
+
bottom: "".concat(alpha * 100, "%")
|
|
10601
10709
|
}
|
|
10602
10710
|
})));
|
|
10603
10711
|
};
|
|
@@ -10695,7 +10803,7 @@ class Color {
|
|
|
10695
10803
|
setColor(strVal) {
|
|
10696
10804
|
strVal = strVal.toLowerCase();
|
|
10697
10805
|
if (strVal.charAt(0) !== '#') {
|
|
10698
|
-
strVal =
|
|
10806
|
+
strVal = "#".concat(strVal);
|
|
10699
10807
|
}
|
|
10700
10808
|
this.value = this.stringToHSB(strVal) || {
|
|
10701
10809
|
h: 0,
|
|
@@ -10752,7 +10860,7 @@ class Color {
|
|
|
10752
10860
|
}
|
|
10753
10861
|
toHex(h, s, b, a) {
|
|
10754
10862
|
const rgb = this.toRGB(Number(h), Number(s), Number(b), Number(a));
|
|
10755
|
-
return
|
|
10863
|
+
return "#".concat((1 << 24 | parseInt(String(rgb.r), 10) << 16 | parseInt(String(rgb.g), 10) << 8 | parseInt(String(rgb.b), 10)).toString(16).substr(1));
|
|
10756
10864
|
}
|
|
10757
10865
|
toHSL(h, s, b, a) {
|
|
10758
10866
|
h = h || this.value.h;
|
|
@@ -10858,16 +10966,16 @@ class Color {
|
|
|
10858
10966
|
switch (format) {
|
|
10859
10967
|
case 'rgb':
|
|
10860
10968
|
rgb = this.toRGB();
|
|
10861
|
-
return
|
|
10969
|
+
return "rgb(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ")");
|
|
10862
10970
|
case 'rgba':
|
|
10863
10971
|
rgb = this.toRGB();
|
|
10864
|
-
return
|
|
10972
|
+
return "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(rgb.a, ")");
|
|
10865
10973
|
case 'hsl':
|
|
10866
10974
|
hsl = this.toHSL();
|
|
10867
|
-
return
|
|
10975
|
+
return "hsl(".concat(Math.round(hsl.h), ",").concat(Math.round(hsl.s * 100), "%,").concat(Math.round(hsl.l * 100), "%)");
|
|
10868
10976
|
case 'hsla':
|
|
10869
10977
|
hsl = this.toHSL();
|
|
10870
|
-
return
|
|
10978
|
+
return "hsla(".concat(Math.round(hsl.h), ",").concat(Math.round(hsl.s * 100), "%,").concat(Math.round(hsl.l * 100), "%,").concat(hsl.a, ")");
|
|
10871
10979
|
case 'hex':
|
|
10872
10980
|
return this.toHex();
|
|
10873
10981
|
default:
|
|
@@ -10898,14 +11006,14 @@ const ColorPicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
10898
11006
|
...rest
|
|
10899
11007
|
} = _ref;
|
|
10900
11008
|
const [show, setShow] = React__default["default"].useState(false);
|
|
10901
|
-
const [color, setColor] = React__default["default"].useState(new Color(externalColor
|
|
11009
|
+
const [color, setColor] = React__default["default"].useState(new Color(externalColor !== null && externalColor !== void 0 ? externalColor : defaultColor));
|
|
10902
11010
|
React.useEffect(() => {
|
|
10903
11011
|
if (externalColor) setColor(new Color(externalColor));
|
|
10904
11012
|
}, [externalColor]);
|
|
10905
11013
|
function handleChange(rawColor, e) {
|
|
10906
11014
|
const nextColor = new Color(rawColor);
|
|
10907
11015
|
setColor(nextColor);
|
|
10908
|
-
onChange
|
|
11016
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextColor.getValue(), e);
|
|
10909
11017
|
}
|
|
10910
11018
|
let alpha;
|
|
10911
11019
|
let width = 136;
|
|
@@ -10986,9 +11094,9 @@ const ColorPicker = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
10986
11094
|
|
|
10987
11095
|
/* eslint-disable camelcase */
|
|
10988
11096
|
|
|
10989
|
-
var css_248z$2 = ".
|
|
10990
|
-
var styles$2 = {"numberStepperContainer":"
|
|
10991
|
-
var stylesheet$2=".
|
|
11097
|
+
var css_248z$2 = "._GidcL{display:inline-flex}._K2MhI{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._K2MhI:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._K2MhI._zhyPg{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._K2MhI._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._K2MhI._YCfBM>svg{opacity:.4}._K2MhI::-webkit-inner-spin-button,._K2MhI::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._K2MhI:focus{z-index:0;border:none;border-radius:4px}._K2MhI:focus:not(._zhyPg){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._K2MhI:focus:not(._YCfBM),._rEFWh{background:#fafafa}._rEFWh{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._rEFWh:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._rEFWh:active:not(._YCfBM){background:#e5e5e5}._rEFWh._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._rEFWh._YCfBM>svg{opacity:.4}._Gf4NH{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._Gf4NH:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._Gf4NH:active:not(._YCfBM){background:#e5e5e5}._Gf4NH._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._Gf4NH._YCfBM>svg{opacity:.4}._2V-z2{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
11098
|
+
var styles$2 = {"numberStepperContainer":"_GidcL","numberStepperInput":"_K2MhI","disabled":"_YCfBM","invalid":"_zhyPg","decrementBtn":"_rEFWh","incrementBtn":"_Gf4NH","inputValueAlert":"_2V-z2"};
|
|
11099
|
+
var stylesheet$2="._GidcL{display:inline-flex}._K2MhI{color:#32363a;background:#fafafa;outline:none;text-align:center;padding:0 12px;min-width:55px;width:100%;font-size:14px;border:1px solid #898989;border-radius:0;-moz-appearance:textfield}._K2MhI:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._K2MhI._zhyPg{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._K2MhI._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._K2MhI._YCfBM>svg{opacity:.4}._K2MhI::-webkit-inner-spin-button,._K2MhI::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._K2MhI:focus{z-index:0;border:none;border-radius:4px}._K2MhI:focus:not(._zhyPg){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._K2MhI:focus:not(._YCfBM),._rEFWh{background:#fafafa}._rEFWh{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;fill:#515559;outline:none;border-radius:4px 0 0 4px;border:1px solid #898989;border-right-width:0}._rEFWh:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._rEFWh:active:not(._YCfBM){background:#e5e5e5}._rEFWh._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._rEFWh._YCfBM>svg{opacity:.4}._Gf4NH{padding:0;display:flex;justify-content:center;align-items:center;flex-shrink:0;width:36px;height:36px;background:#fafafa;fill:#515559;outline:none;border-radius:0 4px 4px 0;border:1px solid #898989;border-left-width:0}._Gf4NH:hover:not(._YCfBM){cursor:pointer;background:#f5f5f5}._Gf4NH:active:not(._YCfBM){background:#e5e5e5}._Gf4NH._YCfBM{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._Gf4NH._YCfBM>svg{opacity:.4}._2V-z2{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
10992
11100
|
icons_index.styleInject(css_248z$2);
|
|
10993
11101
|
|
|
10994
11102
|
const {
|
|
@@ -11043,7 +11151,7 @@ const NumberStepperInput = /*#__PURE__*/React__default["default"].forwardRef((_r
|
|
|
11043
11151
|
helperTextId: formFieldHelperTextId,
|
|
11044
11152
|
errorTextId: formFieldErrorTextId
|
|
11045
11153
|
} = useFormFieldControl();
|
|
11046
|
-
const internalAriaDescribedby = concatIds(ariaDescribedByFromProps
|
|
11154
|
+
const internalAriaDescribedby = concatIds(ariaDescribedByFromProps !== null && ariaDescribedByFromProps !== void 0 ? ariaDescribedByFromProps : ariaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
11047
11155
|
|
|
11048
11156
|
// Indicates if the `inputValue` is invalid
|
|
11049
11157
|
const isInputValueInvalid = typeof inputValue === 'number' && (inputValue > inputMax || inputValue < inputMin);
|
|
@@ -11054,7 +11162,7 @@ const NumberStepperInput = /*#__PURE__*/React__default["default"].forwardRef((_r
|
|
|
11054
11162
|
* depending on the key that was pressed.
|
|
11055
11163
|
*/
|
|
11056
11164
|
const handleKeyDown = e => {
|
|
11057
|
-
onKeyDown
|
|
11165
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
11058
11166
|
if (isExternallyDisabled) return;
|
|
11059
11167
|
if (e.key === 'ArrowUp') {
|
|
11060
11168
|
// Prevents browser's default increment
|
|
@@ -11089,7 +11197,7 @@ const NumberStepperInput = /*#__PURE__*/React__default["default"].forwardRef((_r
|
|
|
11089
11197
|
* Selects the DOM element
|
|
11090
11198
|
*/
|
|
11091
11199
|
const handleFocus = e => {
|
|
11092
|
-
onFocus
|
|
11200
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
11093
11201
|
if (isExternallyDisabled) return;
|
|
11094
11202
|
e.target.select();
|
|
11095
11203
|
};
|
|
@@ -11099,15 +11207,15 @@ const NumberStepperInput = /*#__PURE__*/React__default["default"].forwardRef((_r
|
|
|
11099
11207
|
* Calls `handleInputBlur`
|
|
11100
11208
|
*/
|
|
11101
11209
|
const handleBlur = e => {
|
|
11102
|
-
onBlur
|
|
11210
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
11103
11211
|
if (isExternallyDisabled) return;
|
|
11104
11212
|
handleInputBlur(e);
|
|
11105
11213
|
};
|
|
11106
11214
|
return /*#__PURE__*/React__default["default"].createElement("input", _extends__default["default"]({}, rest, {
|
|
11107
11215
|
// `type`, `step`, `min`, `max`, `onChange`, and `value` are purposely overwritten
|
|
11108
11216
|
ref: ref,
|
|
11109
|
-
"data-testid": dataTestIdFromProps
|
|
11110
|
-
id: idFromProps
|
|
11217
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Input'),
|
|
11218
|
+
id: idFromProps !== null && idFromProps !== void 0 ? idFromProps : inputId,
|
|
11111
11219
|
className: classNames__default["default"](className, styles$2.numberStepperInput, {
|
|
11112
11220
|
[styles$2.invalid]: isInputValueInvalid,
|
|
11113
11221
|
[styles$2.disabled]: isExternallyDisabled
|
|
@@ -11120,8 +11228,8 @@ const NumberStepperInput = /*#__PURE__*/React__default["default"].forwardRef((_r
|
|
|
11120
11228
|
"aria-valuemin": inputMin,
|
|
11121
11229
|
"aria-valuemax": inputMax,
|
|
11122
11230
|
"aria-valuenow": Number(inputValue),
|
|
11123
|
-
"aria-label": ariaLabelFromProps
|
|
11124
|
-
"aria-labelledby": ariaLabelledByFromProps
|
|
11231
|
+
"aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
|
|
11232
|
+
"aria-labelledby": ariaLabelledByFromProps !== null && ariaLabelledByFromProps !== void 0 ? ariaLabelledByFromProps : ariaLabelledBy,
|
|
11125
11233
|
"aria-describedby": internalAriaDescribedby,
|
|
11126
11234
|
"aria-invalid": isInputValueInvalid,
|
|
11127
11235
|
"aria-disabled": isExternallyDisabled,
|
|
@@ -11170,12 +11278,12 @@ const NumberStepperIncrement = /*#__PURE__*/React__default["default"].forwardRef
|
|
|
11170
11278
|
*/
|
|
11171
11279
|
const handleClick = e => {
|
|
11172
11280
|
if (!isDisabled) {
|
|
11173
|
-
onClick
|
|
11281
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
11174
11282
|
increment(true);
|
|
11175
11283
|
}
|
|
11176
11284
|
};
|
|
11177
11285
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
11178
|
-
"data-testid": dataTestIdFromProps
|
|
11286
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Increment'),
|
|
11179
11287
|
ref: ref,
|
|
11180
11288
|
type: "button",
|
|
11181
11289
|
className: classNames__default["default"](className, styles$2.incrementBtn, {
|
|
@@ -11229,12 +11337,12 @@ const NumberStepperDecrement = /*#__PURE__*/React__default["default"].forwardRef
|
|
|
11229
11337
|
*/
|
|
11230
11338
|
const handleClick = e => {
|
|
11231
11339
|
if (!isDisabled) {
|
|
11232
|
-
onClick
|
|
11340
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
11233
11341
|
decrement(true);
|
|
11234
11342
|
}
|
|
11235
11343
|
};
|
|
11236
11344
|
return /*#__PURE__*/React__default["default"].createElement("button", _extends__default["default"]({}, rest, {
|
|
11237
|
-
"data-testid": dataTestIdFromProps
|
|
11345
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Decrement'),
|
|
11238
11346
|
ref: ref,
|
|
11239
11347
|
type: "button",
|
|
11240
11348
|
className: classNames__default["default"](className, styles$2.decrementBtn, {
|
|
@@ -11435,9 +11543,9 @@ function clampMinMax(value, _ref2) {
|
|
|
11435
11543
|
|
|
11436
11544
|
/* eslint-disable camelcase */
|
|
11437
11545
|
|
|
11438
|
-
var css_248z$1 = ".
|
|
11439
|
-
var styles$1 = {"tabs":"
|
|
11440
|
-
var stylesheet$1=".
|
|
11546
|
+
var css_248z$1 = "._2RhG4{display:block}._hBCPj{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Sv870{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Sv870:hover{color:#32363a}._Sv870:focus{outline:none}._Sv870._OMkgT{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._oyqMP{padding-top:32px}._oyqMP._HdD4M{display:none}._Sv870.focus-visible,._Sv870:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
11547
|
+
var styles$1 = {"tabs":"_2RhG4","bar":"_hBCPj","tab":"_Sv870","active":"_OMkgT","panel":"_oyqMP","inactive":"_HdD4M"};
|
|
11548
|
+
var stylesheet$1="._2RhG4{display:block}._hBCPj{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Sv870{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Sv870:hover{color:#32363a}._Sv870:focus{outline:none}._Sv870._OMkgT{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._oyqMP{padding-top:32px}._oyqMP._HdD4M{display:none}._Sv870.focus-visible,._Sv870:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
11441
11549
|
icons_index.styleInject(css_248z$1);
|
|
11442
11550
|
|
|
11443
11551
|
const {
|
|
@@ -11461,8 +11569,8 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11461
11569
|
...rest
|
|
11462
11570
|
} = _ref;
|
|
11463
11571
|
const tabsId = useId(externalId);
|
|
11464
|
-
const tabIdPrefix =
|
|
11465
|
-
const tabPanelIdPrefix =
|
|
11572
|
+
const tabIdPrefix = "".concat(tabsId, "-tab-");
|
|
11573
|
+
const tabPanelIdPrefix = "".concat(tabsId, "-tab-panel-");
|
|
11466
11574
|
const tabRefs = React.useRef({});
|
|
11467
11575
|
const [tabIndexOfActiveTab, setTabIndexOfActiveTab] = React.useState(0);
|
|
11468
11576
|
const focusOnIndex = index => {
|
|
@@ -11477,7 +11585,7 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11477
11585
|
setTabIndexOfActiveTab(0);
|
|
11478
11586
|
};
|
|
11479
11587
|
const handleSelect = key => {
|
|
11480
|
-
onChange
|
|
11588
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(key);
|
|
11481
11589
|
};
|
|
11482
11590
|
const handleKeyDown = (event, tabElementKey, index) => {
|
|
11483
11591
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
@@ -11499,6 +11607,7 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11499
11607
|
const tabs = [];
|
|
11500
11608
|
React__default["default"].Children.forEach(children, (child, index) => {
|
|
11501
11609
|
if (child) {
|
|
11610
|
+
var _child$props$id;
|
|
11502
11611
|
const key = child.key || String(index);
|
|
11503
11612
|
const active = key === activeKey;
|
|
11504
11613
|
const context = {
|
|
@@ -11510,17 +11619,19 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11510
11619
|
value: context
|
|
11511
11620
|
}, /*#__PURE__*/React__default["default"].cloneElement(child, {
|
|
11512
11621
|
key,
|
|
11513
|
-
id: child.props.id
|
|
11622
|
+
id: (_child$props$id = child.props.id) !== null && _child$props$id !== void 0 ? _child$props$id : tabIdPrefix + key,
|
|
11514
11623
|
children: child.props.children,
|
|
11515
11624
|
ref: mergeRefs(child.ref, node => {
|
|
11516
11625
|
tabRefs.current[index] = node;
|
|
11517
11626
|
}),
|
|
11518
11627
|
onKeyDown: event => {
|
|
11519
|
-
|
|
11628
|
+
var _child$props$onKeyDow, _child$props;
|
|
11629
|
+
(_child$props$onKeyDow = (_child$props = child.props).onKeyDown) === null || _child$props$onKeyDow === void 0 ? void 0 : _child$props$onKeyDow.call(_child$props);
|
|
11520
11630
|
handleKeyDown(event, key, index);
|
|
11521
11631
|
},
|
|
11522
11632
|
onClick: () => {
|
|
11523
|
-
|
|
11633
|
+
var _child$props$onClick, _child$props2;
|
|
11634
|
+
(_child$props$onClick = (_child$props2 = child.props).onClick) === null || _child$props$onClick === void 0 ? void 0 : _child$props$onClick.call(_child$props2);
|
|
11524
11635
|
handleSelect(key);
|
|
11525
11636
|
},
|
|
11526
11637
|
'aria-controls': tabPanelIdPrefix + key
|
|
@@ -11533,6 +11644,7 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11533
11644
|
const panels = [];
|
|
11534
11645
|
React__default["default"].Children.forEach(children, (child, index) => {
|
|
11535
11646
|
if (child) {
|
|
11647
|
+
var _child$props$id2;
|
|
11536
11648
|
const key = child.key || String(index);
|
|
11537
11649
|
const isActive = key === activeKey;
|
|
11538
11650
|
const panelClasses = classNames__default["default"](styles$1.panel, {
|
|
@@ -11541,7 +11653,7 @@ const Tabs = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11541
11653
|
panels.push( /*#__PURE__*/React__default["default"].createElement("div", {
|
|
11542
11654
|
key: key,
|
|
11543
11655
|
role: "tabpanel",
|
|
11544
|
-
"aria-labelledby": child.props.id
|
|
11656
|
+
"aria-labelledby": (_child$props$id2 = child.props.id) !== null && _child$props$id2 !== void 0 ? _child$props$id2 : tabIdPrefix + key,
|
|
11545
11657
|
className: panelClasses,
|
|
11546
11658
|
id: tabPanelIdPrefix + key
|
|
11547
11659
|
}, isActive ? child.props.children : null));
|
|
@@ -11590,9 +11702,9 @@ const Tab = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
|
11590
11702
|
|
|
11591
11703
|
/* eslint-disable camelcase */
|
|
11592
11704
|
|
|
11593
|
-
var css_248z = ".
|
|
11594
|
-
var styles = {"toolbar":"
|
|
11595
|
-
var stylesheet=".
|
|
11705
|
+
var css_248z = "._KhOvN,._zPwEY{display:flex}._zPwEY{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._P7as0{width:69px;min-width:auto;max-width:none}._sXJS6{width:100%}._QFK81{margin-bottom:12px;background-color:transparent!important}._QFK81:hover{background-color:rgba(11,110,208,.08)!important}._QFK81:hover>svg{fill:#085caf}._QFK81:hover>span{color:#085caf}._QFK81:active{background-color:rgba(11,110,208,.12)!important}._QFK81:active>svg{fill:#0854a1}._QFK81:active>span{color:#0854a1}._QFK81._nYvQ-{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ->svg{fill:#0b6ed0}._QFK81._nYvQ->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._QFK81._nYvQ-:hover{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ-:hover>svg{fill:#085caf}._QFK81._nYvQ-:hover>span{color:#085caf}._QFK81._nYvQ-:active{background-color:rgba(11,110,208,.12)!important}._QFK81._nYvQ-:active>svg{fill:#0854a1}._QFK81._nYvQ-:active>span{color:#0854a1}._b4DZT{border-radius:6px}._b4DZT>._gfwIU{display:block;fill:#515559}._OOfjF{margin-top:auto;margin-bottom:0}._x92-d{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._x92-d:hover>._uVYKu{opacity:1}._EnHZg{width:0;border-width:0;padding:0}._DxsXO{border-radius:4px;min-width:100%;min-height:100%;outline:none}._rGBKQ{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._uVYKu{opacity:0}._L8MRF,._rGBKQ._fwCoo._fwCoo,._uVYKu:hover{opacity:1}._rGBKQ._vq1e3._vq1e3{opacity:0}._rGBKQ>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._rGBKQ>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._rGBKQ>span:hover>svg{fill:#fff}._rGBKQ>span:active{background-color:#0854a1;border-color:#0854a1}._rGBKQ>span:active>svg{fill:#fff}._rGBKQ>span>svg{fill:#515559;border-radius:50%}._DxsXO._PCFRJ{display:none!important}._QVewo{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._e-ZYn{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._BvQ8F{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._RMcXt{fill:#515559}._KUvBA{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._BvQ8F.focus-visible,._BvQ8F:focus-visible,._DxsXO.focus-visible,._DxsXO:focus-visible,._QVewo.focus-visible,._QVewo:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._rGBKQ.focus-visible,._rGBKQ:focus-visible{border-color:#0a3f88}._rGBKQ:active>span{background-color:#0854a1;border-color:#0854a1}._rGBKQ:active>span>svg{fill:#fff}._uVYKu.focus-visible,._uVYKu:focus-visible{opacity:1}";
|
|
11706
|
+
var styles = {"toolbar":"_KhOvN","toolbarNav":"_zPwEY","toolbarNavCollapsed":"_P7as0","toolbarTabs":"_sXJS6","toolbarTab":"_QFK81","selected":"_nYvQ-","toolbarTabIconButton":"_b4DZT","icon":"_gfwIU","tabsExpandCollapseButton":"_OOfjF","toolbarPanels":"_x92-d","toolbarPanelExpandCollapseButtonDefaultHidden":"_uVYKu","toolbarPanelsCollapsed":"_EnHZg","toolbarPanel":"_DxsXO","toolbarPanelExpandCollapseButton":"_rGBKQ","toolbarPanelExpandCollapseButtonDefaultShown":"_L8MRF","overrideShow":"_fwCoo","overrideHide":"_vq1e3","notSelected":"_PCFRJ","buttonWithLabel":"_QVewo","buttonWithLabelLabel":"_e-ZYn","iconButtonWithLabel":"_BvQ8F","iconButtonWithLabelIcon":"_RMcXt","iconButtonWithLabelLabel":"_KUvBA"};
|
|
11707
|
+
var stylesheet="._KhOvN,._zPwEY{display:flex}._zPwEY{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._P7as0{width:69px;min-width:auto;max-width:none}._sXJS6{width:100%}._QFK81{margin-bottom:12px;background-color:transparent!important}._QFK81:hover{background-color:rgba(11,110,208,.08)!important}._QFK81:hover>svg{fill:#085caf}._QFK81:hover>span{color:#085caf}._QFK81:active{background-color:rgba(11,110,208,.12)!important}._QFK81:active>svg{fill:#0854a1}._QFK81:active>span{color:#0854a1}._QFK81._nYvQ-{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ->svg{fill:#0b6ed0}._QFK81._nYvQ->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._QFK81._nYvQ-:hover{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ-:hover>svg{fill:#085caf}._QFK81._nYvQ-:hover>span{color:#085caf}._QFK81._nYvQ-:active{background-color:rgba(11,110,208,.12)!important}._QFK81._nYvQ-:active>svg{fill:#0854a1}._QFK81._nYvQ-:active>span{color:#0854a1}._b4DZT{border-radius:6px}._b4DZT>._gfwIU{display:block;fill:#515559}._OOfjF{margin-top:auto;margin-bottom:0}._x92-d{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._x92-d:hover>._uVYKu{opacity:1}._EnHZg{width:0;border-width:0;padding:0}._DxsXO{border-radius:4px;min-width:100%;min-height:100%;outline:none}._rGBKQ{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._uVYKu{opacity:0}._L8MRF,._rGBKQ._fwCoo._fwCoo,._uVYKu:hover{opacity:1}._rGBKQ._vq1e3._vq1e3{opacity:0}._rGBKQ>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._rGBKQ>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._rGBKQ>span:hover>svg{fill:#fff}._rGBKQ>span:active{background-color:#0854a1;border-color:#0854a1}._rGBKQ>span:active>svg{fill:#fff}._rGBKQ>span>svg{fill:#515559;border-radius:50%}._DxsXO._PCFRJ{display:none!important}._QVewo{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._e-ZYn{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._BvQ8F{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._RMcXt{fill:#515559}._KUvBA{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._BvQ8F.focus-visible,._BvQ8F:focus-visible,._DxsXO.focus-visible,._DxsXO:focus-visible,._QVewo.focus-visible,._QVewo:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._rGBKQ.focus-visible,._rGBKQ:focus-visible{border-color:#0a3f88}._rGBKQ:active>span{background-color:#0854a1;border-color:#0854a1}._rGBKQ:active>span>svg{fill:#fff}._uVYKu.focus-visible,._uVYKu:focus-visible{opacity:1}";
|
|
11596
11708
|
icons_index.styleInject(css_248z);
|
|
11597
11709
|
|
|
11598
11710
|
const {
|
|
@@ -11689,9 +11801,11 @@ const ToolbarTabs = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11689
11801
|
React.useEffect(() => {
|
|
11690
11802
|
if (isExpandCollapseButtonFocused) {
|
|
11691
11803
|
if (isCollapsed) {
|
|
11692
|
-
|
|
11804
|
+
var _expandToolbarTabsIco;
|
|
11805
|
+
(_expandToolbarTabsIco = expandToolbarTabsIconButtonRef.current) === null || _expandToolbarTabsIco === void 0 ? void 0 : _expandToolbarTabsIco.focus();
|
|
11693
11806
|
} else {
|
|
11694
|
-
|
|
11807
|
+
var _collapseToolbarTabsI;
|
|
11808
|
+
(_collapseToolbarTabsI = collapseToolbarTabsIconButtonWithLabelRef.current) === null || _collapseToolbarTabsI === void 0 ? void 0 : _collapseToolbarTabsI.focus();
|
|
11695
11809
|
}
|
|
11696
11810
|
}
|
|
11697
11811
|
}, [isCollapsed, isExpandCollapseButtonFocused]);
|
|
@@ -11704,7 +11818,8 @@ const ToolbarTabs = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11704
11818
|
const [focusedIndex, setFocusedIndex] = React.useState(selectedIndex);
|
|
11705
11819
|
const numTabs = React__default["default"].Children.count(children);
|
|
11706
11820
|
const focusTab = index => {
|
|
11707
|
-
|
|
11821
|
+
var _tabRefs$current, _tabRefs$current$inde;
|
|
11822
|
+
(_tabRefs$current = tabRefs.current) === null || _tabRefs$current === void 0 ? void 0 : (_tabRefs$current$inde = _tabRefs$current[index]) === null || _tabRefs$current$inde === void 0 ? void 0 : _tabRefs$current$inde.focus();
|
|
11708
11823
|
setFocusedIndex(index);
|
|
11709
11824
|
};
|
|
11710
11825
|
|
|
@@ -11814,7 +11929,7 @@ const ToolbarTab = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11814
11929
|
const isFocused = focusedIndex === index;
|
|
11815
11930
|
const isSelected = selectedIndex === index;
|
|
11816
11931
|
const handleSelect = () => {
|
|
11817
|
-
setSelectedIndex
|
|
11932
|
+
setSelectedIndex === null || setSelectedIndex === void 0 ? void 0 : setSelectedIndex(Number(index));
|
|
11818
11933
|
};
|
|
11819
11934
|
const handleClick = e => {
|
|
11820
11935
|
/*
|
|
@@ -11833,22 +11948,22 @@ const ToolbarTab = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11833
11948
|
case 'ArrowDown':
|
|
11834
11949
|
case 'ArrowRight':
|
|
11835
11950
|
e.preventDefault(); // Prevent page scroll
|
|
11836
|
-
focusTab
|
|
11951
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(getNextIndex(focusedIndex, numTabs));
|
|
11837
11952
|
break;
|
|
11838
11953
|
case 'ArrowUp':
|
|
11839
11954
|
case 'ArrowLeft':
|
|
11840
11955
|
e.preventDefault(); // Prevent page scroll
|
|
11841
|
-
focusTab
|
|
11956
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(getPrevIndex(focusedIndex, numTabs));
|
|
11842
11957
|
break;
|
|
11843
11958
|
case 'PageUp':
|
|
11844
11959
|
case 'Home':
|
|
11845
11960
|
e.preventDefault(); // Prevent page scroll
|
|
11846
|
-
focusTab
|
|
11961
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(0);
|
|
11847
11962
|
break;
|
|
11848
11963
|
case 'PageDown':
|
|
11849
11964
|
case 'End':
|
|
11850
11965
|
e.preventDefault(); // Prevent page scroll
|
|
11851
|
-
focusTab
|
|
11966
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(Number(numTabs) - 1);
|
|
11852
11967
|
break;
|
|
11853
11968
|
default:
|
|
11854
11969
|
}
|
|
@@ -11858,13 +11973,13 @@ const ToolbarTab = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11858
11973
|
ref,
|
|
11859
11974
|
role: 'tab',
|
|
11860
11975
|
'aria-selected': isSelected,
|
|
11861
|
-
'aria-controls': ariaControls ||
|
|
11862
|
-
id: id ||
|
|
11976
|
+
'aria-controls': ariaControls || "toolbar-".concat(toolbarId, "-panel-").concat(index),
|
|
11977
|
+
id: id || "toolbar-".concat(toolbarId, "-tab-").concat(index),
|
|
11863
11978
|
// Exsures the correct tab is focused when tabbing into the Toolbar
|
|
11864
11979
|
tabIndex: isFocused ? 0 : -1,
|
|
11865
11980
|
onClick: handleClick,
|
|
11866
11981
|
onKeyDown: handleKeyDown,
|
|
11867
|
-
'data-testid': dataTestId || getSubDataTestId(rootDataTestId,
|
|
11982
|
+
'data-testid': dataTestId || getSubDataTestId(rootDataTestId, "tab-".concat(index))
|
|
11868
11983
|
};
|
|
11869
11984
|
const iconButtonClassName = classNames__default["default"](className, styles.toolbarTab, styles.toolbarTabIconButton, {
|
|
11870
11985
|
[styles.selected]: isSelected
|
|
@@ -11967,6 +12082,7 @@ const ExpandCollapseButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
11967
12082
|
* ```
|
|
11968
12083
|
*/
|
|
11969
12084
|
const ToolbarPanels = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
12085
|
+
var _props$id, _React$Children$toArr, _React$Children$toArr2, _React$Children$toArr3;
|
|
11970
12086
|
let {
|
|
11971
12087
|
isCollapsible = true,
|
|
11972
12088
|
defaultIsCollapsed = false,
|
|
@@ -11992,7 +12108,8 @@ const ToolbarPanels = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
11992
12108
|
* This allows a screen reader user to click the expand/collapse button using their keyboard and have focus stay on the same button.
|
|
11993
12109
|
*/
|
|
11994
12110
|
if (wasExpandCollapseButtonClicked) {
|
|
11995
|
-
|
|
12111
|
+
var _expandCollapseButton;
|
|
12112
|
+
(_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
|
|
11996
12113
|
setWasExpandCollapseButtonClicked(false);
|
|
11997
12114
|
}
|
|
11998
12115
|
}, [wasExpandCollapseButtonClicked]);
|
|
@@ -12000,7 +12117,7 @@ const ToolbarPanels = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
|
|
|
12000
12117
|
setIsCollapsed(currentIsCollapsed => !currentIsCollapsed);
|
|
12001
12118
|
setWasExpandCollapseButtonClicked(true);
|
|
12002
12119
|
};
|
|
12003
|
-
const selectedTabPanelId = React__default["default"].Children.toArray(children)
|
|
12120
|
+
const selectedTabPanelId = (_props$id = (_React$Children$toArr = React__default["default"].Children.toArray(children)) === null || _React$Children$toArr === void 0 ? void 0 : (_React$Children$toArr2 = _React$Children$toArr[Number(selectedIndex)]) === null || _React$Children$toArr2 === void 0 ? void 0 : (_React$Children$toArr3 = _React$Children$toArr2.props) === null || _React$Children$toArr3 === void 0 ? void 0 : _React$Children$toArr3.id) !== null && _props$id !== void 0 ? _props$id : "toolbar-".concat(toolbarId, "-panel-").concat(selectedIndex);
|
|
12004
12121
|
return /*#__PURE__*/React__default["default"].createElement("div", _extends__default["default"]({}, rest, {
|
|
12005
12122
|
ref: mergeRefs(ref, isToolbarPanelsContainerHoveredRef),
|
|
12006
12123
|
className: classNames__default["default"](className, styles.toolbarPanels, {
|
|
@@ -12056,9 +12173,9 @@ const ToolbarPanel = _ref => {
|
|
|
12056
12173
|
[styles.notSelected]: !isSelected
|
|
12057
12174
|
}),
|
|
12058
12175
|
tabIndex: isFocusable && isContainerInTabOrder ? 0 : -1,
|
|
12059
|
-
"aria-labelledby": ariaLabelledby ||
|
|
12060
|
-
id: id ||
|
|
12061
|
-
"data-testid": dataTestId || getSubDataTestId(rootDataTestId,
|
|
12176
|
+
"aria-labelledby": ariaLabelledby || "toolbar-".concat(toolbarId, "-tab-").concat(index),
|
|
12177
|
+
id: id || "toolbar-".concat(toolbarId, "-panel-").concat(index),
|
|
12178
|
+
"data-testid": dataTestId || getSubDataTestId(rootDataTestId, "panel-".concat(index))
|
|
12062
12179
|
}), isFocusable ? children : null);
|
|
12063
12180
|
};
|
|
12064
12181
|
|