@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
|
@@ -37,9 +37,9 @@ function styleInject(css, ref) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var css_248z = ".
|
|
41
|
-
var styles = {"icon":"
|
|
42
|
-
var stylesheet=".
|
|
40
|
+
var css_248z = "._VZWmz{flex-shrink:0}";
|
|
41
|
+
var styles = {"icon":"_VZWmz"};
|
|
42
|
+
var stylesheet="._VZWmz{flex-shrink:0}";
|
|
43
43
|
styleInject(css_248z);
|
|
44
44
|
|
|
45
45
|
const IconSizes = {
|
|
@@ -73,7 +73,7 @@ const createIconComponent = (type, svgContent) => {
|
|
|
73
73
|
}));
|
|
74
74
|
});
|
|
75
75
|
|
|
76
|
-
Icon.displayName =
|
|
76
|
+
Icon.displayName = "".concat(type, "Icon");
|
|
77
77
|
return Icon;
|
|
78
78
|
};
|
|
79
79
|
|
|
@@ -78,7 +78,7 @@ const Accordion = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
78
78
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
79
79
|
ref: ref,
|
|
80
80
|
className: classNames(AccordionStyles.accordion, {
|
|
81
|
-
[AccordionStyles[
|
|
81
|
+
[AccordionStyles["".concat(variant, "-variant")]]: variant
|
|
82
82
|
}),
|
|
83
83
|
"data-testid": dataTestId
|
|
84
84
|
}, /*#__PURE__*/React__default.createElement(AccordionContextProvider, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var AccordionStyles = {"accordion":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
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"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { AccordionStyles as default, stylesheet };
|
|
@@ -45,17 +45,17 @@ const AccordionHeader = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
45
45
|
}, [registerNode, deregisterNode]);
|
|
46
46
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
47
47
|
role: headingLevel ? 'heading' : undefined,
|
|
48
|
-
"aria-level": headingLevel
|
|
48
|
+
"aria-level": headingLevel !== null && headingLevel !== void 0 ? headingLevel : undefined,
|
|
49
49
|
ref: ref
|
|
50
50
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
51
51
|
className: classes,
|
|
52
52
|
ref: headerRef,
|
|
53
|
-
id:
|
|
53
|
+
id: "accordion-header-".concat(sectionId),
|
|
54
54
|
onClick: handleClick,
|
|
55
55
|
onKeyDown: handleKeyDown,
|
|
56
56
|
"aria-expanded": isOpen,
|
|
57
|
-
"aria-controls":
|
|
58
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
57
|
+
"aria-controls": "accordion-panel-".concat(sectionId),
|
|
58
|
+
"data-testid": getSubDataTestId(dataTestId, "section-".concat(position, "-header")),
|
|
59
59
|
type: "button"
|
|
60
60
|
}, isOpen ? /*#__PURE__*/React__default.createElement(CaretDownIcon, {
|
|
61
61
|
"aria-hidden": true,
|
|
@@ -20,10 +20,10 @@ const AccordionPanel = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
20
20
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
21
21
|
className: classNames(className, AccordionStyles.panel),
|
|
22
22
|
ref: ref,
|
|
23
|
-
id:
|
|
23
|
+
id: "accordion-panel-".concat(sectionId),
|
|
24
24
|
role: "region",
|
|
25
|
-
"aria-labelledby":
|
|
26
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
25
|
+
"aria-labelledby": "accordion-header-".concat(sectionId),
|
|
26
|
+
"data-testid": getSubDataTestId(dataTestId, "section-".concat(position, "-panel"))
|
|
27
27
|
}, children);
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var buttonStyles = {"btn":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var buttonStyles = {"btn":"_LIzJt","small":"_Dj1-K","full":"_TUkxv","disabled":"_ZZGgm","default":"_eCG9H","primary":"_fvW0s","secondary":"_nM422","tertiary":"_3Tl-J","link":"_WWAcG","danger":"_DwcyT"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { buttonStyles as default, stylesheet };
|
|
@@ -30,14 +30,14 @@ const Button = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
30
30
|
// stops form submission for type="submit"
|
|
31
31
|
return e.preventDefault();
|
|
32
32
|
}
|
|
33
|
-
onClick
|
|
33
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
34
34
|
};
|
|
35
35
|
const keyDownHandler = disabled ? undefined : onKeyDown;
|
|
36
36
|
return (
|
|
37
37
|
/*#__PURE__*/
|
|
38
38
|
/* eslint-disable react/button-has-type */
|
|
39
39
|
React__default.createElement("button", _extends({}, rest, {
|
|
40
|
-
"aria-disabled": ariaDisabled
|
|
40
|
+
"aria-disabled": ariaDisabled !== null && ariaDisabled !== void 0 ? ariaDisabled : disabled,
|
|
41
41
|
type: type,
|
|
42
42
|
className: classes,
|
|
43
43
|
ref: ref,
|
|
@@ -21,7 +21,7 @@ const ButtonGroup = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
21
21
|
}), React__default.Children.map(children, child => {
|
|
22
22
|
if (! /*#__PURE__*/React__default.isValidElement(child)) {
|
|
23
23
|
// eslint-disable-next-line no-console
|
|
24
|
-
console.warn(
|
|
24
|
+
console.warn("Warning: \"".concat(child, "\" is invalid child of ButtonGroup!"));
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
27
|
const buttonElementClasses = classNames(child.props.className, styles.buttonGroupElement, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"buttonGroup":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"buttonGroup":"_0FTpb","full":"_yIQKw","buttonGroupElement":"_W8O-m","primary":"_7QE03"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -27,22 +27,22 @@ const Checkbox = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
27
27
|
helperTextId: formFieldHelperTextId,
|
|
28
28
|
errorTextId: formFieldErrorTextId
|
|
29
29
|
} = useFormFieldContext();
|
|
30
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
30
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
31
31
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
|
32
32
|
ref: ref,
|
|
33
33
|
className: classNames(className, styles.checkbox)
|
|
34
34
|
}), /*#__PURE__*/React__default.createElement("input", _extends({}, inputProps, {
|
|
35
|
-
name: name
|
|
36
|
-
className: classNames(styles.input, inputProps
|
|
35
|
+
name: name !== null && name !== void 0 ? name : inputProps === null || inputProps === void 0 ? void 0 : inputProps.name,
|
|
36
|
+
className: classNames(styles.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
37
37
|
type: "checkbox",
|
|
38
|
-
id: id
|
|
39
|
-
checked: checked
|
|
40
|
-
defaultChecked: defaultChecked
|
|
41
|
-
disabled: disabled
|
|
42
|
-
onChange: disabled ? undefined : onChange
|
|
43
|
-
value: value
|
|
44
|
-
"aria-label": externalAriaLabel
|
|
45
|
-
"aria-labelledby": externalAriaLabelledBy
|
|
38
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
39
|
+
checked: checked !== null && checked !== void 0 ? checked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked,
|
|
40
|
+
defaultChecked: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked,
|
|
41
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
42
|
+
onChange: disabled ? undefined : onChange !== null && onChange !== void 0 ? onChange : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange,
|
|
43
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
44
|
+
"aria-label": externalAriaLabel !== null && externalAriaLabel !== void 0 ? externalAriaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
45
|
+
"aria-labelledby": externalAriaLabelledBy !== null && externalAriaLabelledBy !== void 0 ? externalAriaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
46
46
|
"aria-describedby": internalAriaDescribedby
|
|
47
47
|
})), /*#__PURE__*/React__default.createElement("span", {
|
|
48
48
|
className: styles.check
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"checkbox":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._-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}";
|
|
4
|
+
var styles = {"checkbox":"_-mtX9","input":"_pgnyN","check":"_Kfe-T","checkIcon":"_vgVqc","label":"_uxlBq","labelDisabled":"_UeTWT","wrappedInput":"_qgYd3"};
|
|
5
|
+
var stylesheet="._-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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"checkbox":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"checkbox":"_FY3g9","input":"_sv-vr","checked":"_6UjZM","check":"_Xv4Z3","checkIcon":"_Vlh3K","disabled":"_loRI8"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -12,6 +12,7 @@ import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
|
12
12
|
|
|
13
13
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
14
14
|
function Alpha(_ref) {
|
|
15
|
+
var _color$alpha5, _color$alpha6, _color$alpha7;
|
|
15
16
|
let {
|
|
16
17
|
color,
|
|
17
18
|
onAlphaChange,
|
|
@@ -36,16 +37,17 @@ function Alpha(_ref) {
|
|
|
36
37
|
});
|
|
37
38
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
38
39
|
function handleKeyDown(e) {
|
|
40
|
+
var _color$alpha, _color$alpha2, _color$alpha3, _color$alpha4;
|
|
39
41
|
switch (e.key) {
|
|
40
42
|
case 'ArrowDown':
|
|
41
43
|
case 'ArrowLeft':
|
|
42
44
|
e.preventDefault(); // prevent page scroll
|
|
43
|
-
onAlphaChange(Math.min((color.alpha
|
|
45
|
+
onAlphaChange(Math.min(((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : MAX_ALPHA) + 1, MAX_ALPHA));
|
|
44
46
|
break;
|
|
45
47
|
case 'ArrowUp':
|
|
46
48
|
case 'ArrowRight':
|
|
47
49
|
e.preventDefault(); // prevent page scroll
|
|
48
|
-
onAlphaChange(Math.max((color.alpha
|
|
50
|
+
onAlphaChange(Math.max(((_color$alpha2 = color.alpha) !== null && _color$alpha2 !== void 0 ? _color$alpha2 : MAX_ALPHA) - 1, MIN_ALPHA));
|
|
49
51
|
break;
|
|
50
52
|
case 'End':
|
|
51
53
|
e.preventDefault(); // prevent page scroll
|
|
@@ -57,11 +59,11 @@ function Alpha(_ref) {
|
|
|
57
59
|
break;
|
|
58
60
|
case 'PageDown':
|
|
59
61
|
e.preventDefault(); // prevent page scroll
|
|
60
|
-
onAlphaChange(Math.min((color.alpha
|
|
62
|
+
onAlphaChange(Math.min(((_color$alpha3 = color.alpha) !== null && _color$alpha3 !== void 0 ? _color$alpha3 : MAX_ALPHA) + 10, MAX_ALPHA));
|
|
61
63
|
break;
|
|
62
64
|
case 'PageUp':
|
|
63
65
|
e.preventDefault(); // prevent page scroll
|
|
64
|
-
onAlphaChange(Math.max((color.alpha
|
|
66
|
+
onAlphaChange(Math.max(((_color$alpha4 = color.alpha) !== null && _color$alpha4 !== void 0 ? _color$alpha4 : MAX_ALPHA) - 10, MIN_ALPHA));
|
|
65
67
|
break;
|
|
66
68
|
default:
|
|
67
69
|
break;
|
|
@@ -72,12 +74,13 @@ function Alpha(_ref) {
|
|
|
72
74
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
73
75
|
className: styles.alphaSliderRail,
|
|
74
76
|
style: {
|
|
75
|
-
background:
|
|
77
|
+
background: "linear-gradient(90deg, ".concat(color.hex, ", transparent)")
|
|
76
78
|
},
|
|
77
79
|
onMouseDown: e => {
|
|
80
|
+
var _thumbRef$current;
|
|
78
81
|
// prevent text highlighting while dragging
|
|
79
82
|
e.preventDefault();
|
|
80
|
-
thumbRef.current
|
|
83
|
+
(_thumbRef$current = thumbRef.current) === null || _thumbRef$current === void 0 ? void 0 : _thumbRef$current.focus();
|
|
81
84
|
handleMouseDown(e);
|
|
82
85
|
},
|
|
83
86
|
"data-testid": getSubDataTestId(dataTestId, 'alpha-rail'),
|
|
@@ -86,14 +89,14 @@ function Alpha(_ref) {
|
|
|
86
89
|
role: "slider",
|
|
87
90
|
className: styles.alphaSliderThumb,
|
|
88
91
|
style: {
|
|
89
|
-
left:
|
|
92
|
+
left: "calc(".concat(MAX_ALPHA - ((_color$alpha5 = color.alpha) !== null && _color$alpha5 !== void 0 ? _color$alpha5 : MAX_ALPHA), "% - 4px)")
|
|
90
93
|
},
|
|
91
94
|
onKeyDown: handleKeyDown,
|
|
92
95
|
"aria-label": alphaAriaLabel,
|
|
93
96
|
"aria-valuemin": MIN_ALPHA,
|
|
94
97
|
"aria-valuemax": MAX_ALPHA,
|
|
95
|
-
"aria-valuenow": color.alpha
|
|
96
|
-
"aria-valuetext":
|
|
98
|
+
"aria-valuenow": (_color$alpha6 = color.alpha) !== null && _color$alpha6 !== void 0 ? _color$alpha6 : MAX_ALPHA,
|
|
99
|
+
"aria-valuetext": "".concat((_color$alpha7 = color.alpha) !== null && _color$alpha7 !== void 0 ? _color$alpha7 : MAX_ALPHA, "%"),
|
|
97
100
|
tabIndex: 0,
|
|
98
101
|
ref: thumbRef,
|
|
99
102
|
"data-testid": getSubDataTestId(dataTestId, 'alpha-thumb')
|
|
@@ -28,6 +28,7 @@ import CaretDownIcon from '../../icons/components/CaretDownIcon.js';
|
|
|
28
28
|
import Input from '../Input/Input.js';
|
|
29
29
|
|
|
30
30
|
function ColorPicker(_ref) {
|
|
31
|
+
var _color$name;
|
|
31
32
|
let {
|
|
32
33
|
color: externalColor,
|
|
33
34
|
onChange,
|
|
@@ -46,16 +47,17 @@ function ColorPicker(_ref) {
|
|
|
46
47
|
'data-testid': dataTestId
|
|
47
48
|
} = _ref;
|
|
48
49
|
const containerId = useId(id);
|
|
49
|
-
const flyoutId =
|
|
50
|
+
const flyoutId = "".concat(containerId, "-flyout");
|
|
50
51
|
const [color, setColor] = useControllableState(externalColor, onChange, externalColor);
|
|
51
52
|
const [isOpen, setIsOpen] = useState(false);
|
|
52
53
|
const [hsv, setHsv] = useState(hexToHsv(color.hex));
|
|
53
54
|
const [inputHex, setInputHex] = useState(color.hex);
|
|
54
55
|
const [triggerHexUpdate, setTriggerHexUpdate] = useState(0);
|
|
55
56
|
useEffect(() => {
|
|
56
|
-
|
|
57
|
+
var _color$alpha;
|
|
58
|
+
const alpha = isAlphaEnabled ? Math.round(((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100) / 100 * 255).toString(16).padStart(2, '0') : '';
|
|
57
59
|
const hex = color.hex.substring(1);
|
|
58
|
-
setInputHex(
|
|
60
|
+
setInputHex("".concat(hex).concat(alpha));
|
|
59
61
|
}, [color, isAlphaEnabled]);
|
|
60
62
|
const anchorRef = useRef(null);
|
|
61
63
|
const popperRef = useRef(null);
|
|
@@ -64,7 +66,7 @@ function ColorPicker(_ref) {
|
|
|
64
66
|
translate
|
|
65
67
|
} = useTranslation();
|
|
66
68
|
const anchorAriaDescription = translate('colorPickerAnchorDesc', {
|
|
67
|
-
colorName: color.name
|
|
69
|
+
colorName: (_color$name = color.name) !== null && _color$name !== void 0 ? _color$name : '',
|
|
68
70
|
colorHex: color.hex
|
|
69
71
|
});
|
|
70
72
|
const inputAriaLabel = translate('hex');
|
|
@@ -122,7 +124,7 @@ function ColorPicker(_ref) {
|
|
|
122
124
|
name,
|
|
123
125
|
...rest
|
|
124
126
|
} = _ref3;
|
|
125
|
-
const hex =
|
|
127
|
+
const hex = "#".concat(validatedHex.substring(0, 6));
|
|
126
128
|
if (isAlphaEnabled) {
|
|
127
129
|
const alpha = Math.round(parseInt(validatedHex.substring(6, 8), 16) / 255 * 100);
|
|
128
130
|
return {
|
|
@@ -145,7 +147,7 @@ function ColorPicker(_ref) {
|
|
|
145
147
|
} = _ref4;
|
|
146
148
|
const newColor = {
|
|
147
149
|
...rest,
|
|
148
|
-
hex:
|
|
150
|
+
hex: "#".concat(hex)
|
|
149
151
|
};
|
|
150
152
|
return newColor;
|
|
151
153
|
});
|
|
@@ -248,11 +250,11 @@ function ColorPicker(_ref) {
|
|
|
248
250
|
onClick: handleAnchorClick,
|
|
249
251
|
"aria-label": ariaLabel,
|
|
250
252
|
"aria-labelledby": ariaLabelledBy,
|
|
251
|
-
"aria-describedby":
|
|
253
|
+
"aria-describedby": "".concat(anchorAriaDescription, " ").concat(ariaDescribedBy),
|
|
252
254
|
"aria-expanded": isOpen,
|
|
253
255
|
"aria-controls": isOpen ? flyoutId : undefined,
|
|
254
256
|
"aria-haspopup": "dialog",
|
|
255
|
-
ref: mergeRefs(anchorRef, externalButtonRef
|
|
257
|
+
ref: mergeRefs(anchorRef, externalButtonRef !== null && externalButtonRef !== void 0 ? externalButtonRef : null),
|
|
256
258
|
"data-testid": getSubDataTestId(dataTestId, 'anchor-button')
|
|
257
259
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
258
260
|
className: classNames(styles.colorPickerButtonPreview, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"colorPicker":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"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"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -23,7 +23,7 @@ function RGBInput(_ref) {
|
|
|
23
23
|
containerId,
|
|
24
24
|
dataTestId
|
|
25
25
|
} = _ref;
|
|
26
|
-
const inputId =
|
|
26
|
+
const inputId = "".concat(containerId, "-").concat(label, "-input");
|
|
27
27
|
const [internalValue, setInternalValue] = useState(externalValue);
|
|
28
28
|
useEffect(() => {
|
|
29
29
|
setInternalValue(externalValue);
|
|
@@ -41,13 +41,14 @@ function RGBInput(_ref) {
|
|
|
41
41
|
onChange: e => setInternalValue(parseInt(e.target.value, 10) || 0),
|
|
42
42
|
onBlur: onBlur,
|
|
43
43
|
"aria-label": ariaLabel,
|
|
44
|
-
"data-testid": getSubDataTestId(dataTestId,
|
|
44
|
+
"data-testid": getSubDataTestId(dataTestId, "".concat(label, "-channel"))
|
|
45
45
|
}), /*#__PURE__*/React__default.createElement(Label, {
|
|
46
46
|
htmlFor: inputId,
|
|
47
47
|
className: styles.inputLabel
|
|
48
48
|
}, label));
|
|
49
49
|
}
|
|
50
50
|
const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
51
|
+
var _color$alpha;
|
|
51
52
|
let {
|
|
52
53
|
color,
|
|
53
54
|
onHexBlur,
|
|
@@ -56,8 +57,8 @@ const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
|
56
57
|
containerId,
|
|
57
58
|
dataTestId
|
|
58
59
|
} = _ref2;
|
|
59
|
-
const hexInputId =
|
|
60
|
-
const alphaInputId =
|
|
60
|
+
const hexInputId = "".concat(containerId, "-hex-input");
|
|
61
|
+
const alphaInputId = "".concat(containerId, "-alpha-input");
|
|
61
62
|
const {
|
|
62
63
|
translate
|
|
63
64
|
} = useTranslation();
|
|
@@ -81,9 +82,10 @@ const ColorPickerFlyoutInputs = function HexInputGroup(_ref2) {
|
|
|
81
82
|
onHexBlur(validatedHex);
|
|
82
83
|
setInternalHex(validatedHex);
|
|
83
84
|
}
|
|
84
|
-
const [internalAlpha, setInternalAlpha] = useState(color.alpha
|
|
85
|
+
const [internalAlpha, setInternalAlpha] = useState((_color$alpha = color.alpha) !== null && _color$alpha !== void 0 ? _color$alpha : 100);
|
|
85
86
|
useEffect(() => {
|
|
86
|
-
|
|
87
|
+
var _color$alpha2;
|
|
88
|
+
setInternalAlpha((_color$alpha2 = color.alpha) !== null && _color$alpha2 !== void 0 ? _color$alpha2 : 100);
|
|
87
89
|
}, [color.alpha, isAlphaEnabled]);
|
|
88
90
|
function handleAlphaBlur(e) {
|
|
89
91
|
const newAlpha = Math.min(Math.max(parseInt(e.target.value, 10) || 0, 0), 100);
|
|
@@ -76,9 +76,10 @@ function Hue(_ref) {
|
|
|
76
76
|
[styles.alphaEnabled]: isAlphaEnabled
|
|
77
77
|
}),
|
|
78
78
|
onMouseDown: e => {
|
|
79
|
+
var _thumbRef$current;
|
|
79
80
|
// prevent text highlighting while dragging
|
|
80
81
|
e.preventDefault();
|
|
81
|
-
thumbRef.current
|
|
82
|
+
(_thumbRef$current = thumbRef.current) === null || _thumbRef$current === void 0 ? void 0 : _thumbRef$current.focus();
|
|
82
83
|
handleMouseDown(e);
|
|
83
84
|
},
|
|
84
85
|
"data-testid": getSubDataTestId(dataTestId, 'hue-rail'),
|
|
@@ -89,7 +90,7 @@ function Hue(_ref) {
|
|
|
89
90
|
[styles.alphaEnabled]: isAlphaEnabled
|
|
90
91
|
}),
|
|
91
92
|
style: {
|
|
92
|
-
left:
|
|
93
|
+
left: "calc(".concat(hue / 359 * 100, "% - 4px)")
|
|
93
94
|
},
|
|
94
95
|
onKeyDown: handleKeyDown,
|
|
95
96
|
"aria-label": hueAriaLabel,
|