@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
|
@@ -113,8 +113,8 @@ const RangeSlider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
113
113
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
114
114
|
className: styles.fill,
|
|
115
115
|
style: {
|
|
116
|
-
left:
|
|
117
|
-
right:
|
|
116
|
+
left: "".concat(buttonPositions[0], "%"),
|
|
117
|
+
right: "".concat(100 - buttonPositions[1], "%")
|
|
118
118
|
}
|
|
119
119
|
}), values.map((value, index) => /*#__PURE__*/React__default.createElement(SliderButton, {
|
|
120
120
|
key: index,
|
|
@@ -118,7 +118,7 @@ const Slider = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
118
118
|
className: styles.fill,
|
|
119
119
|
style: {
|
|
120
120
|
left: -1,
|
|
121
|
-
right:
|
|
121
|
+
right: "".concat(100 - buttonPosition, "%")
|
|
122
122
|
}
|
|
123
123
|
}), /*#__PURE__*/React__default.createElement(SliderButton, {
|
|
124
124
|
"aria-valuemin": min,
|
|
@@ -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 = {"slider":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"slider":"_fNSYs","track":"_yrqeQ","fill":"_lNOmF","button":"_C83EQ"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -51,7 +51,7 @@ const SliderButton = _ref => {
|
|
|
51
51
|
const anchorButton = /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
52
52
|
className: styles.button,
|
|
53
53
|
style: {
|
|
54
|
-
left:
|
|
54
|
+
left: "calc(".concat(buttonPosition, "% + ").concat(buttonOffset, "px")
|
|
55
55
|
},
|
|
56
56
|
onMouseDown: handleMouseDown,
|
|
57
57
|
onKeyDown: onKeyDown,
|
|
@@ -26,26 +26,26 @@ const Switch = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
26
26
|
helperTextId: formFieldHelperTextId,
|
|
27
27
|
errorTextId: formFieldErrorTextId
|
|
28
28
|
} = useFormFieldContext();
|
|
29
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
29
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
30
30
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
|
31
31
|
ref: ref,
|
|
32
32
|
className: classNames(className, styles.switch, {
|
|
33
33
|
[styles.disabled]: disabled
|
|
34
34
|
})
|
|
35
35
|
}), /*#__PURE__*/React__default.createElement("input", _extends({}, inputProps, {
|
|
36
|
-
className: classNames(styles.input, inputProps
|
|
36
|
+
className: classNames(styles.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
37
37
|
type: "checkbox",
|
|
38
38
|
role: "switch",
|
|
39
|
-
id: id
|
|
40
|
-
checked: checked
|
|
41
|
-
defaultChecked: defaultChecked
|
|
42
|
-
disabled: disabled
|
|
43
|
-
onChange: disabled ? undefined : onChange
|
|
44
|
-
value: value
|
|
45
|
-
"aria-label": ariaLabel
|
|
46
|
-
"aria-labelledby": ariaLabelledBy
|
|
39
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
40
|
+
checked: checked !== null && checked !== void 0 ? checked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked,
|
|
41
|
+
defaultChecked: defaultChecked !== null && defaultChecked !== void 0 ? defaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked,
|
|
42
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
43
|
+
onChange: disabled ? undefined : onChange !== null && onChange !== void 0 ? onChange : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange,
|
|
44
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
45
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
46
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
47
47
|
"aria-describedby": internalAriaDescribedby,
|
|
48
|
-
tabIndex: tabIndex
|
|
48
|
+
tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : inputProps === null || inputProps === void 0 ? void 0 : inputProps.tabIndex
|
|
49
49
|
})), /*#__PURE__*/React__default.createElement("span", {
|
|
50
50
|
className: styles.slider
|
|
51
51
|
}));
|
|
@@ -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 = {"switch":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"switch":"_6ksuV","disabled":"_rXGZW","input":"_BMiaS","slider":"_0E-IL","label":"_m1NjK","labelDisabled":"_WFhwb","wrappedInput":"_zNEWp"};
|
|
5
|
+
var stylesheet="._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}";
|
|
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 = {"table":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"table":"_VQYYc","tableCell":"_MTFAz","tableHeaderCell":"_cTjiR","tableHead":"_-VfRz","tableBody":"_aitRC","tableRow":"_YlVgb"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -22,8 +22,8 @@ const Tab = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
22
22
|
rootTestId,
|
|
23
23
|
isTabListFocused
|
|
24
24
|
} = useTabContext();
|
|
25
|
-
const tabId = getSubDataTestId(rootId,
|
|
26
|
-
const tabTestId = getSubDataTestId(rootTestId,
|
|
25
|
+
const tabId = getSubDataTestId(rootId, "tab-".concat(value));
|
|
26
|
+
const tabTestId = getSubDataTestId(rootTestId, "tab-".concat(value));
|
|
27
27
|
const isSelected = activeTab === value;
|
|
28
28
|
const onClick = React__default.useCallback(() => {
|
|
29
29
|
setActiveTab(value);
|
|
@@ -39,7 +39,7 @@ const Tab = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
39
39
|
[styles.selected]: isSelected
|
|
40
40
|
}),
|
|
41
41
|
"aria-selected": isSelected,
|
|
42
|
-
"aria-controls":
|
|
42
|
+
"aria-controls": "".concat(rootId, "-tabpanel-").concat(value),
|
|
43
43
|
"aria-label": ariaLabel,
|
|
44
44
|
onClick: onClick,
|
|
45
45
|
ref: ref,
|
|
@@ -24,8 +24,8 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
24
24
|
isTabListFocused,
|
|
25
25
|
setIsTabListFocused
|
|
26
26
|
} = useTabContext();
|
|
27
|
-
const tabListId = getSubDataTestId(rootId,
|
|
28
|
-
const tabListTestId = getSubDataTestId(rootTestId,
|
|
27
|
+
const tabListId = getSubDataTestId(rootId, "tablist");
|
|
28
|
+
const tabListTestId = getSubDataTestId(rootTestId, "tablist");
|
|
29
29
|
const tabListRef = useRef(null);
|
|
30
30
|
// We use this map of tab element to index to allow constant time index
|
|
31
31
|
// lookup when we handle an event from a child tab
|
|
@@ -87,10 +87,11 @@ const TabsList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
87
87
|
ref: mergeRefs(ref, tabListRef),
|
|
88
88
|
tabIndex: -1 // Needed to satisfy the jsx-a11y/interactive-supports-focus rule
|
|
89
89
|
}), React__default.Children.map(children, (child, index) => {
|
|
90
|
-
if (child
|
|
90
|
+
if ((child === null || child === void 0 ? void 0 : child.type) === Tab) {
|
|
91
|
+
var _child$props$value;
|
|
91
92
|
return /*#__PURE__*/React__default.cloneElement(child, {
|
|
92
|
-
value: child.props.value
|
|
93
|
-
ref: mergeRefs(child
|
|
93
|
+
value: (_child$props$value = child.props.value) !== null && _child$props$value !== void 0 ? _child$props$value : index,
|
|
94
|
+
ref: mergeRefs(child === null || child === void 0 ? void 0 : child.ref, node => {
|
|
94
95
|
// Store a reverse node/index map for
|
|
95
96
|
// constant time index lookups from event handlers
|
|
96
97
|
if (node) {
|
|
@@ -18,14 +18,14 @@ const TabPanel = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
18
18
|
rootId,
|
|
19
19
|
rootTestId
|
|
20
20
|
} = useTabContext();
|
|
21
|
-
const tabPanelId = getSubDataTestId(rootId,
|
|
22
|
-
const tabPanelTestId = getSubDataTestId(rootTestId,
|
|
21
|
+
const tabPanelId = getSubDataTestId(rootId, "tabpanel-".concat(value));
|
|
22
|
+
const tabPanelTestId = getSubDataTestId(rootTestId, "tabpanel-".concat(value));
|
|
23
23
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
24
24
|
ref: ref,
|
|
25
25
|
"data-testid": tabPanelTestId,
|
|
26
26
|
id: tabPanelId,
|
|
27
27
|
role: "tabpanel",
|
|
28
|
-
"aria-labelledby":
|
|
28
|
+
"aria-labelledby": "".concat(rootId, "-tab-").concat(value),
|
|
29
29
|
className: classNames(styles.tabpanel, className, {
|
|
30
30
|
[styles.inactive]: value !== activeTab
|
|
31
31
|
})
|
|
@@ -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 = {"tablist":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"tablist":"_YBYEv","grow":"_m0zX-","tab":"_uHVG4","selected":"_pQ79r","tabpanel":"_HaA-r","inactive":"_vQmhw"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -14,6 +14,7 @@ import Popper from '../../utils/Popper/Popper.js';
|
|
|
14
14
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
15
15
|
|
|
16
16
|
const Tooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
17
|
+
var _children$ref;
|
|
17
18
|
let {
|
|
18
19
|
content,
|
|
19
20
|
unstable_contentKey: contentKey,
|
|
@@ -48,10 +49,14 @@ const Tooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
48
49
|
const {
|
|
49
50
|
isFocusVisible
|
|
50
51
|
} = useFocusVisible();
|
|
51
|
-
const getIsAnchorKeyboardFocused = () =>
|
|
52
|
+
const getIsAnchorKeyboardFocused = () => {
|
|
53
|
+
var _anchorRef$current;
|
|
54
|
+
return (showOnDescendantFocus ? (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.contains(document.activeElement) : document.activeElement === anchorRef.current) && isFocusVisible;
|
|
55
|
+
};
|
|
52
56
|
const addAriaDescribedByToTrigger = triggeringTarget => {
|
|
53
57
|
if (!ariaHidden && triggeringTarget instanceof Element) {
|
|
54
|
-
|
|
58
|
+
var _triggeringTarget$get;
|
|
59
|
+
const describedBy = new Set((_triggeringTarget$get = triggeringTarget.getAttribute('aria-describedby')) === null || _triggeringTarget$get === void 0 ? void 0 : _triggeringTarget$get.split(' '));
|
|
55
60
|
describedBy.add(flyoutContainerId);
|
|
56
61
|
triggeringTarget.setAttribute('aria-describedby', Array.from(describedBy).join(' '));
|
|
57
62
|
setTriggerElements(prev => new Set(prev).add(triggeringTarget));
|
|
@@ -59,7 +64,8 @@ const Tooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
59
64
|
};
|
|
60
65
|
const removeAriaDescribedByFromAllTriggers = () => {
|
|
61
66
|
triggerElements.forEach(triggeringTarget => {
|
|
62
|
-
|
|
67
|
+
var _triggeringTarget$get2;
|
|
68
|
+
const describedBy = new Set((_triggeringTarget$get2 = triggeringTarget.getAttribute('aria-describedby')) === null || _triggeringTarget$get2 === void 0 ? void 0 : _triggeringTarget$get2.split(' '));
|
|
63
69
|
describedBy.delete(flyoutContainerId);
|
|
64
70
|
if (describedBy.size > 0) {
|
|
65
71
|
triggeringTarget.setAttribute('aria-describedby', Array.from(describedBy).join(' '));
|
|
@@ -188,7 +194,7 @@ const Tooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
188
194
|
open: isInDOM,
|
|
189
195
|
placement: placement,
|
|
190
196
|
anchor: /*#__PURE__*/React__default.cloneElement(children, {
|
|
191
|
-
ref: mergeRefs(anchorRef, children.ref
|
|
197
|
+
ref: mergeRefs(anchorRef, (_children$ref = children.ref) !== null && _children$ref !== void 0 ? _children$ref : null)
|
|
192
198
|
}),
|
|
193
199
|
popper: /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
194
200
|
id: flyoutContainerId,
|
|
@@ -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 = {"tooltip":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._-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%}";
|
|
4
|
+
var styles = {"tooltip":"_-ydim","lightTheme":"_Wm8-X","visible":"_yulUt","arrow":"_8U5fJ","offsetBackplate":"_k-mSf"};
|
|
5
|
+
var stylesheet="._-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%}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -10,9 +10,9 @@ const UIProvider = _ref => {
|
|
|
10
10
|
config = {}
|
|
11
11
|
} = _ref;
|
|
12
12
|
return /*#__PURE__*/React__default.createElement(TranslationProvider, {
|
|
13
|
-
localizedText: config
|
|
13
|
+
localizedText: config === null || config === void 0 ? void 0 : config.localizedText
|
|
14
14
|
}, /*#__PURE__*/React__default.createElement(PortalTargetProvider, {
|
|
15
|
-
target: portalTarget
|
|
15
|
+
target: portalTarget !== null && portalTarget !== void 0 ? portalTarget : null
|
|
16
16
|
}, children));
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -51,13 +51,13 @@ const Alpha = function Alpha(_ref) {
|
|
|
51
51
|
const containerRef = React__default.useRef(null);
|
|
52
52
|
const handleChange = useEventCallback(e => {
|
|
53
53
|
const change = getMouseChange(e, hsl, alpha, containerRef.current);
|
|
54
|
-
onChange
|
|
54
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
55
55
|
});
|
|
56
56
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
57
57
|
function handleKeyDown(e) {
|
|
58
58
|
if (Object.keys(KEY_CHANGES).indexOf(e.key) > -1) {
|
|
59
59
|
const change = getKeyChange(e, hsl);
|
|
60
|
-
onChange
|
|
60
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -72,7 +72,7 @@ const Alpha = function Alpha(_ref) {
|
|
|
72
72
|
onTouchMove: handleChange,
|
|
73
73
|
onTouchStart: handleChange,
|
|
74
74
|
style: {
|
|
75
|
-
background:
|
|
75
|
+
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%)")
|
|
76
76
|
},
|
|
77
77
|
role: "slider",
|
|
78
78
|
"aria-valuemin": 0,
|
|
@@ -82,7 +82,7 @@ const Alpha = function Alpha(_ref) {
|
|
|
82
82
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
83
83
|
className: styles.alphaSlider,
|
|
84
84
|
style: {
|
|
85
|
-
bottom:
|
|
85
|
+
bottom: "".concat(alpha * 100, "%")
|
|
86
86
|
}
|
|
87
87
|
})));
|
|
88
88
|
};
|
|
@@ -91,7 +91,7 @@ class Color {
|
|
|
91
91
|
setColor(strVal) {
|
|
92
92
|
strVal = strVal.toLowerCase();
|
|
93
93
|
if (strVal.charAt(0) !== '#') {
|
|
94
|
-
strVal =
|
|
94
|
+
strVal = "#".concat(strVal);
|
|
95
95
|
}
|
|
96
96
|
this.value = this.stringToHSB(strVal) || {
|
|
97
97
|
h: 0,
|
|
@@ -148,7 +148,7 @@ class Color {
|
|
|
148
148
|
}
|
|
149
149
|
toHex(h, s, b, a) {
|
|
150
150
|
const rgb = this.toRGB(Number(h), Number(s), Number(b), Number(a));
|
|
151
|
-
return
|
|
151
|
+
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));
|
|
152
152
|
}
|
|
153
153
|
toHSL(h, s, b, a) {
|
|
154
154
|
h = h || this.value.h;
|
|
@@ -254,16 +254,16 @@ class Color {
|
|
|
254
254
|
switch (format) {
|
|
255
255
|
case 'rgb':
|
|
256
256
|
rgb = this.toRGB();
|
|
257
|
-
return
|
|
257
|
+
return "rgb(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ")");
|
|
258
258
|
case 'rgba':
|
|
259
259
|
rgb = this.toRGB();
|
|
260
|
-
return
|
|
260
|
+
return "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(rgb.a, ")");
|
|
261
261
|
case 'hsl':
|
|
262
262
|
hsl = this.toHSL();
|
|
263
|
-
return
|
|
263
|
+
return "hsl(".concat(Math.round(hsl.h), ",").concat(Math.round(hsl.s * 100), "%,").concat(Math.round(hsl.l * 100), "%)");
|
|
264
264
|
case 'hsla':
|
|
265
265
|
hsl = this.toHSL();
|
|
266
|
-
return
|
|
266
|
+
return "hsla(".concat(Math.round(hsl.h), ",").concat(Math.round(hsl.s * 100), "%,").concat(Math.round(hsl.l * 100), "%,").concat(hsl.a, ")");
|
|
267
267
|
case 'hex':
|
|
268
268
|
return this.toHex();
|
|
269
269
|
default:
|
|
@@ -39,14 +39,14 @@ const ColorPicker = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
39
39
|
...rest
|
|
40
40
|
} = _ref;
|
|
41
41
|
const [show, setShow] = React__default.useState(false);
|
|
42
|
-
const [color, setColor] = React__default.useState(new Color(externalColor
|
|
42
|
+
const [color, setColor] = React__default.useState(new Color(externalColor !== null && externalColor !== void 0 ? externalColor : defaultColor));
|
|
43
43
|
useEffect(() => {
|
|
44
44
|
if (externalColor) setColor(new Color(externalColor));
|
|
45
45
|
}, [externalColor]);
|
|
46
46
|
function handleChange(rawColor, e) {
|
|
47
47
|
const nextColor = new Color(rawColor);
|
|
48
48
|
setColor(nextColor);
|
|
49
|
-
onChange
|
|
49
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(nextColor.getValue(), e);
|
|
50
50
|
}
|
|
51
51
|
let alpha;
|
|
52
52
|
let width = 136;
|
|
@@ -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 = {"colorPickerBtnColor":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"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"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -33,7 +33,7 @@ const HexInput = function HexInput(_ref) {
|
|
|
33
33
|
function handleChange(e) {
|
|
34
34
|
setValue(e.target.value);
|
|
35
35
|
if (isValid(e.target.value)) {
|
|
36
|
-
onChange
|
|
36
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e.target.value, e);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
function handleBlur() {
|
|
@@ -51,13 +51,13 @@ const Hue = function Hue(_ref) {
|
|
|
51
51
|
const containerRef = React__default.useRef(null);
|
|
52
52
|
const handleChange = useEventCallback(e => {
|
|
53
53
|
const change = getMouseChange(e, hsb, containerRef.current);
|
|
54
|
-
onChange
|
|
54
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
55
55
|
});
|
|
56
56
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
57
57
|
function handleKeyDown(e) {
|
|
58
58
|
if (Object.keys(KEY_CHANGES).indexOf(e.key) > -1) {
|
|
59
59
|
const change = getKeyChange(e, hsb);
|
|
60
|
-
onChange
|
|
60
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
return (
|
|
@@ -78,7 +78,7 @@ const Hue = function Hue(_ref) {
|
|
|
78
78
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
79
79
|
className: styles.hueSlider,
|
|
80
80
|
style: {
|
|
81
|
-
bottom:
|
|
81
|
+
bottom: "".concat(hsb.h / 360 * 100, "%")
|
|
82
82
|
}
|
|
83
83
|
}))
|
|
84
84
|
);
|
|
@@ -78,13 +78,13 @@ const Saturation = function Saturation(_ref) {
|
|
|
78
78
|
} = _ref;
|
|
79
79
|
const containerRef = React__default.useRef(null);
|
|
80
80
|
const handleChange = useEventCallback(e => {
|
|
81
|
-
onChange
|
|
81
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(getMouseChange(e, hsb, containerRef.current), e);
|
|
82
82
|
});
|
|
83
83
|
const handleMouseDown = useMouseDrag(handleChange);
|
|
84
84
|
function handleKeyDown(e) {
|
|
85
85
|
if (Object.keys(KEY_CHANGES).indexOf(e.key) > -1) {
|
|
86
86
|
const change = getKeyChange(e, hsb);
|
|
87
|
-
onChange
|
|
87
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(change, e);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
return (
|
|
@@ -93,7 +93,7 @@ const Saturation = function Saturation(_ref) {
|
|
|
93
93
|
React__default.createElement("div", _extends({}, rest, {
|
|
94
94
|
ref: containerRef,
|
|
95
95
|
style: {
|
|
96
|
-
backgroundColor:
|
|
96
|
+
backgroundColor: "hsl(".concat(hsb.h, ", 100%, 50%)")
|
|
97
97
|
},
|
|
98
98
|
className: classNames(styles.saturation, className),
|
|
99
99
|
onMouseDown: handleMouseDown,
|
|
@@ -110,8 +110,8 @@ const Saturation = function Saturation(_ref) {
|
|
|
110
110
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
111
111
|
className: styles.saturationCircle,
|
|
112
112
|
style: {
|
|
113
|
-
bottom:
|
|
114
|
-
left:
|
|
113
|
+
bottom: "".concat(hsb.b * 100, "%"),
|
|
114
|
+
left: "".concat(hsb.s * 100, "%")
|
|
115
115
|
}
|
|
116
116
|
}))))
|
|
117
117
|
);
|
|
@@ -12,9 +12,9 @@ const Swatch = function Swatch(_ref) {
|
|
|
12
12
|
...rest
|
|
13
13
|
} = _ref;
|
|
14
14
|
function handleClick(e) {
|
|
15
|
-
onClick
|
|
15
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(color, e);
|
|
16
16
|
}
|
|
17
|
-
const handleKeyDown = e => e.keyCode === ENTER && onClick
|
|
17
|
+
const handleKeyDown = e => e.keyCode === ENTER && (onClick === null || onClick === void 0 ? void 0 : onClick(color, e));
|
|
18
18
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
|
19
19
|
role: "button",
|
|
20
20
|
tabIndex: 0,
|
|
@@ -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 = {"numberStepperContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._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}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_GidcL","numberStepperInput":"_K2MhI","disabled":"_YCfBM","invalid":"_zhyPg","decrementBtn":"_rEFWh","incrementBtn":"_Gf4NH","inputValueAlert":"_2V-z2"};
|
|
5
|
+
var stylesheet="._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}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -47,12 +47,12 @@ const NumberStepperDecrement = /*#__PURE__*/React__default.forwardRef((_ref, ref
|
|
|
47
47
|
*/
|
|
48
48
|
const handleClick = e => {
|
|
49
49
|
if (!isDisabled) {
|
|
50
|
-
onClick
|
|
50
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
51
51
|
decrement(true);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
return /*#__PURE__*/React__default.createElement("button", _extends({}, rest, {
|
|
55
|
-
"data-testid": dataTestIdFromProps
|
|
55
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Decrement'),
|
|
56
56
|
ref: ref,
|
|
57
57
|
type: "button",
|
|
58
58
|
className: classNames(className, styles.decrementBtn, {
|
|
@@ -47,12 +47,12 @@ const NumberStepperIncrement = /*#__PURE__*/React__default.forwardRef((_ref, ref
|
|
|
47
47
|
*/
|
|
48
48
|
const handleClick = e => {
|
|
49
49
|
if (!isDisabled) {
|
|
50
|
-
onClick
|
|
50
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
51
51
|
increment(true);
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
return /*#__PURE__*/React__default.createElement("button", _extends({}, rest, {
|
|
55
|
-
"data-testid": dataTestIdFromProps
|
|
55
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Increment'),
|
|
56
56
|
ref: ref,
|
|
57
57
|
type: "button",
|
|
58
58
|
className: classNames(className, styles.incrementBtn, {
|