@qualtrics/ui-react 2.21.0 → 2.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/__shared/cjs/{index-0ae99de2.js → index-75d9309a.js} +4 -4
- package/dist/__shared/cjs/{index-201e8786.js → index-a8c1a789.js} +678 -568
- package/dist/components/Accordion/Accordion.js +2 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +5 -4
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/Accordion/AccordionSection.js +1 -2
- 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 +48 -29
- 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 +6 -9
- package/dist/components/Dropdown/DropdownSearch.js +12 -6
- 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 +44 -36
- 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 +7 -6
- 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 -4
- package/dist/next/AdvancedTable/AdvancedTable.js +62 -52
- 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/AdvancedTableTypes.js +6 -6
- 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 +8 -9
- package/dist/next/Menu/MenuPane.js +20 -8
- package/dist/next/Menu/SubMenu.js +16 -18
- package/dist/next/Menu/useMutationObserver.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +31 -21
- 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 +14 -27
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +317 -260
- 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/containsComponentOrElement.js +1 -3
- 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
|
@@ -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 = {"searchInput":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._T-2qa{display:inline-block;position:relative}._gbn53._gbn53{padding-left:36px;padding-right:36px;width:100%}._gbn53._gbn53:disabled+._zFkOa{fill-opacity:.6}._zFkOa{position:absolute;top:50%;left:0;transform:translateY(-50%);margin-left:6px;fill:#515559;pointer-events:none}._zFkOa._dMORJ{z-index:20}._7zbkP{position:absolute;top:0;right:0;width:36px;height:100%;background-color:transparent;line-height:0;border:none;border-radius:4px}._7zbkP:hover{cursor:pointer}._7zbkP:hover>._v158J{fill:#32363a}._7zbkP:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._v158J{fill:#515559}";
|
|
4
|
+
var styles = {"searchInput":"_T-2qa","searchInputInput":"_gbn53","searchInputSearchIcon":"_zFkOa","usedWithinInputGroup":"_dMORJ","searchInputClearButton":"_7zbkP","searchInputClearButtonIcon":"_v158J"};
|
|
5
|
+
var stylesheet="._T-2qa{display:inline-block;position:relative}._gbn53._gbn53{padding-left:36px;padding-right:36px;width:100%}._gbn53._gbn53:disabled+._zFkOa{fill-opacity:.6}._zFkOa{position:absolute;top:50%;left:0;transform:translateY(-50%);margin-left:6px;fill:#515559;pointer-events:none}._zFkOa._dMORJ{z-index:20}._7zbkP{position:absolute;top:0;right:0;width:36px;height:100%;background-color:transparent;line-height:0;border:none;border-radius:4px}._7zbkP:hover{cursor:pointer}._7zbkP:hover>._v158J{fill:#32363a}._7zbkP:focus{outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._v158J{fill:#515559}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -34,7 +34,8 @@ const SidebarNav = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
34
34
|
*/
|
|
35
35
|
useEffect(() => {
|
|
36
36
|
if (isExpandCollapseButtonFocused) {
|
|
37
|
-
|
|
37
|
+
var _expandCollapseButton;
|
|
38
|
+
(_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
|
|
38
39
|
}
|
|
39
40
|
}, [isCollapsed, isExpandCollapseButtonFocused]);
|
|
40
41
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -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 = {"sideBarNav":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._0yLIR{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._0yLIR._3MOZB{width:69px;min-width:auto;max-width:none}._FXJiW{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._ao5at{margin-bottom:12px;background-color:transparent!important}._ao5at:hover{background-color:rgba(11,110,208,.08)!important}._ao5at:hover ._2okHE{fill:#085caf}._ao5at:hover ._Ct9-y{color:#085caf}._ao5at:active{background-color:rgba(11,110,208,.12)!important}._ao5at:active ._2okHE{fill:#0854a1}._ao5at:active ._Ct9-y{color:#0854a1}._ao5at._05Ze3{background-color:rgba(11,110,208,.08)!important}._ao5at._05Ze3 ._2okHE{fill:#0b6ed0}._ao5at._05Ze3 ._Ct9-y{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._ao5at._05Ze3:hover{background-color:rgba(11,110,208,.08)!important}._ao5at._05Ze3:hover ._2okHE{fill:#085caf}._ao5at._05Ze3:hover ._Ct9-y{color:#085caf}._ao5at._05Ze3:active{background-color:rgba(11,110,208,.12)!important}._ao5at._05Ze3:active ._2okHE{fill:#0854a1}._ao5at._05Ze3:active ._Ct9-y{color:#0854a1}._2Ynby{border-radius:6px}._2Ynby ._2okHE{display:block;fill:#515559}._dOt2a{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._Cp-0t,._k6-lt{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._Cp-0t ._2okHE,._k6-lt ._2okHE{fill:#515559}._Cp-0t ._Ct9-y,._k6-lt ._Ct9-y{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}._ao5at.focus-visible,._ao5at:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"sideBarNav":"_0yLIR","collapsed":"_3MOZB","navItems":"_FXJiW","sidebarNavItem":"_ao5at","icon":"_2okHE","label":"_Ct9-y","selected":"_05Ze3","sidebarNavItemIconButton":"_2Ynby","expandCollapseButtonContainer":"_dOt2a","navLink":"_Cp-0t","iconButtonWithLabel":"_k6-lt"};
|
|
5
|
+
var stylesheet="._0yLIR{grid-area:sidebarNav;height:100%;display:flex;flex-direction:column;align-items:center;min-width:165px;max-width:240px;background-color:#fff;border-right:1px solid #eee;overflow:hidden}._0yLIR._3MOZB{width:69px;min-width:auto;max-width:none}._FXJiW{margin:12px 0 28px;width:100%;overflow:auto;padding:4px 16px 0}._ao5at{margin-bottom:12px;background-color:transparent!important}._ao5at:hover{background-color:rgba(11,110,208,.08)!important}._ao5at:hover ._2okHE{fill:#085caf}._ao5at:hover ._Ct9-y{color:#085caf}._ao5at:active{background-color:rgba(11,110,208,.12)!important}._ao5at:active ._2okHE{fill:#0854a1}._ao5at:active ._Ct9-y{color:#0854a1}._ao5at._05Ze3{background-color:rgba(11,110,208,.08)!important}._ao5at._05Ze3 ._2okHE{fill:#0b6ed0}._ao5at._05Ze3 ._Ct9-y{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._ao5at._05Ze3:hover{background-color:rgba(11,110,208,.08)!important}._ao5at._05Ze3:hover ._2okHE{fill:#085caf}._ao5at._05Ze3:hover ._Ct9-y{color:#085caf}._ao5at._05Ze3:active{background-color:rgba(11,110,208,.12)!important}._ao5at._05Ze3:active ._2okHE{fill:#0854a1}._ao5at._05Ze3:active ._Ct9-y{color:#0854a1}._2Ynby{border-radius:6px}._2Ynby ._2okHE{display:block;fill:#515559}._dOt2a{width:100%;padding:0 16px;margin-top:auto;margin-bottom:0}._Cp-0t,._k6-lt{width:100%;display:flex;align-items:start;border:1px solid transparent;border-radius:6px;outline:none;cursor:pointer;padding:5px 11px 5px 5px;text-decoration:none}._Cp-0t ._2okHE,._k6-lt ._2okHE{fill:#515559}._Cp-0t ._Ct9-y,._k6-lt ._Ct9-y{font-size:14px;line-height:19px;color:#515559;overflow:hidden;overflow-wrap:break-word;margin:2.5px 0 2.5px 6px}._ao5at.focus-visible,._ao5at: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 };
|
|
@@ -25,7 +25,7 @@ const SidebarNavLink = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
25
25
|
isCollapsed,
|
|
26
26
|
NavLink
|
|
27
27
|
} = useSidebarNavContext();
|
|
28
|
-
const Icon = isCollapsed ? icon
|
|
28
|
+
const Icon = isCollapsed ? icon !== null && icon !== void 0 ? icon : ExcludeIcon : icon;
|
|
29
29
|
const link = /*#__PURE__*/React__default.createElement(NavLink, {
|
|
30
30
|
className: isActive => classNames(styles.sidebarNavItem, styles.navLink, {
|
|
31
31
|
[styles.noIcon]: !Icon,
|
|
@@ -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 = "._Khqzg{height:auto;width:200px;padding:5px 10px}._oT52q{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._URu9p{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._ug4QF,._URu9p{position:absolute}._ug4QF{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}._ug4QF:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}._ug4QF.focus-visible,._ug4QF:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"slider":"_Khqzg","track":"_oT52q","fill":"_URu9p","button":"_ug4QF"};
|
|
5
|
+
var stylesheet="._Khqzg{height:auto;width:200px;padding:5px 10px}._oT52q{position:relative;height:10px;border:1px solid #898989;border-radius:5px;background:#fafafa}._URu9p{top:-1px;bottom:-1px;background-color:#007ac0;border:1px solid #007ac0;border-radius:5px}._ug4QF,._URu9p{position:absolute}._ug4QF{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}._ug4QF:before{content:\"\";position:absolute;top:4px;left:4px;background:#007ac0;width:8px;height:8px;border-radius:10px}._ug4QF.focus-visible,._ug4QF: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 = "._dYedK{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._dYedK._Fv-5n{cursor:not-allowed}._v2AU-{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._v2AU-:disabled{cursor:not-allowed}._v2AU-:disabled~._bzEeN{opacity:.4}._v2AU-:checked~._bzEeN{background-color:#0b6ed0}._v2AU-:checked~._bzEeN:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._v2AU-:hover:not(:disabled):not(:checked)~._bzEeN{background-color:#6a6a6a}._v2AU-:hover:not(:disabled):checked~._bzEeN{background-color:#085caf}._v2AU-:hover:not(:disabled):checked~._bzEeN:before{border-color:#085caf}._bzEeN{width:32px;background-color:#898989;border-radius:34px}._bzEeN,._bzEeN:before{height:16px;transition:.2s}._bzEeN: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}._QU3iD{color:#32363a;display:flex;align-items:center;cursor:pointer}._t8FrM{cursor:auto;color:hsla(0,0%,53.7%,.4)}._lN4TM{margin-right:12px;flex-shrink:0}._v2AU-.focus-visible~._bzEeN,._v2AU-:focus-visible~._bzEeN{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"switch":"_dYedK","disabled":"_Fv-5n","input":"_v2AU-","slider":"_bzEeN","label":"_QU3iD","labelDisabled":"_t8FrM","wrappedInput":"_lN4TM"};
|
|
5
|
+
var stylesheet="._dYedK{cursor:pointer;display:inline-flex;position:relative;align-items:center;margin-top:6px;margin-bottom:6px}._dYedK._Fv-5n{cursor:not-allowed}._v2AU-{cursor:pointer;position:absolute;top:0;opacity:0;height:16px;width:32px;border-radius:34px;z-index:10}._v2AU-:disabled{cursor:not-allowed}._v2AU-:disabled~._bzEeN{opacity:.4}._v2AU-:checked~._bzEeN{background-color:#0b6ed0}._v2AU-:checked~._bzEeN:before{transform:translateX(16px);background-color:#fff;border-color:#0b6ed0}._v2AU-:hover:not(:disabled):not(:checked)~._bzEeN{background-color:#6a6a6a}._v2AU-:hover:not(:disabled):checked~._bzEeN{background-color:#085caf}._v2AU-:hover:not(:disabled):checked~._bzEeN:before{border-color:#085caf}._bzEeN{width:32px;background-color:#898989;border-radius:34px}._bzEeN,._bzEeN:before{height:16px;transition:.2s}._bzEeN: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}._QU3iD{color:#32363a;display:flex;align-items:center;cursor:pointer}._t8FrM{cursor:auto;color:hsla(0,0%,53.7%,.4)}._lN4TM{margin-right:12px;flex-shrink:0}._v2AU-.focus-visible~._bzEeN,._v2AU-:focus-visible~._bzEeN{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 = "._3HsX6{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._3HsX6 ._7KNzo:first-child,._3HsX6 ._S3ru4:first-child{padding-left:16px}._uCTpq{font-size:12px}._7KNzo{padding:12px 8px;text-align:left;font-weight:700}._YbkQp ._XVqN-{border-top:1px solid #ededed}._YbkQp ._XVqN-:hover{background-color:#fafafa}._XVqN-{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._S3ru4{padding:16px 8px;word-break:break-word;text-align:left}";
|
|
4
|
+
var styles = {"table":"_3HsX6","tableCell":"_S3ru4","tableHeaderCell":"_7KNzo","tableHead":"_uCTpq","tableBody":"_YbkQp","tableRow":"_XVqN-"};
|
|
5
|
+
var stylesheet="._3HsX6{font-size:14px;color:#32363a;width:100%;max-width:100%;border-collapse:collapse;background-color:#fff;border:none}._3HsX6 ._7KNzo:first-child,._3HsX6 ._S3ru4:first-child{padding-left:16px}._uCTpq{font-size:12px}._7KNzo{padding:12px 8px;text-align:left;font-weight:700}._YbkQp ._XVqN-{border-top:1px solid #ededed}._YbkQp ._XVqN-:hover{background-color:#fafafa}._XVqN-{transition:background-color 125ms ease-in;border-bottom:1px solid #ededed}._S3ru4{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 = "._Uj-Q8{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Uj-Q8._MzjyU ._2-JBy{flex:1 1 0px;max-width:none}._2-JBy{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}._2-JBy:hover{color:#32363a}._2-JBy._sVrwB{border-bottom-color:#0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._UX8ht{padding-top:32px}._UX8ht._Wn0Qf{display:none}._2-JBy.focus-visible,._2-JBy:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tablist":"_Uj-Q8","grow":"_MzjyU","tab":"_2-JBy","selected":"_sVrwB","tabpanel":"_UX8ht","inactive":"_Wn0Qf"};
|
|
5
|
+
var stylesheet="._Uj-Q8{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Uj-Q8._MzjyU ._2-JBy{flex:1 1 0px;max-width:none}._2-JBy{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}._2-JBy:hover{color:#32363a}._2-JBy._sVrwB{border-bottom-color:#0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._UX8ht{padding-top:32px}._UX8ht._Wn0Qf{display:none}._2-JBy.focus-visible,._2-JBy: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 = "._a-i94{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}._a-i94._GIrch{color:#32363a;background-color:#fff}._xkgll{opacity:1;pointer-events:all}._MhnYC,._MhnYC>div{position:absolute;width:8px;height:8px;background:inherit}._MhnYC{visibility:hidden;z-index:2000}._MhnYC>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._MhnYC{bottom:-4px}[data-popper-placement^=top]>._MhnYC>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._MhnYC{left:-5px}[data-popper-placement^=right]>._MhnYC>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._MhnYC{top:-5px}[data-popper-placement^=bottom]>._MhnYC>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._MhnYC{right:-4px}[data-popper-placement^=left]>._MhnYC>div{border-bottom-color:transparent;border-left-color:transparent}._u6Iwd{position:absolute}[data-popper-placement^=top]>._u6Iwd{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._u6Iwd{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._u6Iwd{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._u6Iwd{top:0;right:-13px;width:17px;height:100%}";
|
|
4
|
+
var styles = {"tooltip":"_a-i94","lightTheme":"_GIrch","visible":"_xkgll","arrow":"_MhnYC","offsetBackplate":"_u6Iwd"};
|
|
5
|
+
var stylesheet="._a-i94{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}._a-i94._GIrch{color:#32363a;background-color:#fff}._xkgll{opacity:1;pointer-events:all}._MhnYC,._MhnYC>div{position:absolute;width:8px;height:8px;background:inherit}._MhnYC{visibility:hidden;z-index:2000}._MhnYC>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._MhnYC{bottom:-4px}[data-popper-placement^=top]>._MhnYC>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._MhnYC{left:-5px}[data-popper-placement^=right]>._MhnYC>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._MhnYC{top:-5px}[data-popper-placement^=bottom]>._MhnYC>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._MhnYC{right:-4px}[data-popper-placement^=left]>._MhnYC>div{border-bottom-color:transparent;border-left-color:transparent}._u6Iwd{position:absolute}[data-popper-placement^=top]>._u6Iwd{bottom:-13px;left:0;width:100%;height:17px}[data-popper-placement^=right]>._u6Iwd{top:0;left:-13px;width:17px;height:100%}[data-popper-placement^=bottom]>._u6Iwd{top:-13px;left:0;width:100%;height:17px}[data-popper-placement^=left]>._u6Iwd{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 = "._QZsWN{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._dpFGP{margin-right:-12px;margin-left:4px}._5dpir{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._rw1Xp{margin:8px 8px 0;display:flex}._8iId6,._n0DAr{margin-left:4px}._rChN9{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._TcA5O{margin:0 4px 4px 0}._TcA5O:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._QLdhQ{margin:4px 8px 8px}._bdlXv{position:relative;width:96px;height:96px;outline:0}._bdlXv.focus-visible ._YIc06,._bdlXv:focus-visible ._YIc06{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._wdJ-b{background:linear-gradient(90deg,#fff,transparent)}._lu0Wn,._wdJ-b{position:absolute;top:0;right:0;bottom:0;left:0}._lu0Wn{background:linear-gradient(0deg,#000,transparent)}._YIc06{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}._phSFD{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._phSFD.focus-visible ._0vdqQ,._phSFD:focus-visible ._0vdqQ{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._0vdqQ{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)}._5iJOi{position:relative;width:16px;height:96px}._e-vCj{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._e-vCj,._lDJIB{position:absolute}._lDJIB{top:0;right:0;bottom:0;left:0;outline:0}._lDJIB.focus-visible ._e-vCj,._lDJIB:focus-visible ._e-vCj{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._vMQc-{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}._nbQdB{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._nbQdB.focus-visible,._nbQdB:focus-visible{outline:none}._nbQdB.focus-visible,._nbQdB:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-FH-k{display:flex}._-FH-k ._Vi-aR{position:relative;flex-shrink:0;width:26px;height:26px}._-FH-k ._vHkBE{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._-FH-k ._KbnaR{flex-basis:100%;min-width:0;border-top-left-radius:0;border-bottom-left-radius:0}";
|
|
4
|
+
var styles = {"colorPickerBtnColor":"_QZsWN","colorPickerBtnIcon":"_dpFGP","colorPicker":"_5dpir","colorPickerSliderContainer":"_rw1Xp","colorPickerHue":"_n0DAr","colorPickerAlpha":"_8iId6","colorPickerSwatches":"_rChN9","colorPickerSwatch":"_TcA5O","colorPickerHex":"_QLdhQ","saturation":"_bdlXv","saturationCircle":"_YIc06","saturationWhite":"_wdJ-b","saturationBlack":"_lu0Wn","hue":"_phSFD","hueSlider":"_0vdqQ","alpha":"_5iJOi","alphaSlider":"_e-vCj","alphaGradient":"_lDJIB","alphaCheckerboard":"_vMQc-","swatch":"_nbQdB","hex":"_-FH-k","hexSwatch":"_Vi-aR","hexSwatchColor":"_vHkBE","hexInput":"_KbnaR"};
|
|
5
|
+
var stylesheet="._QZsWN{margin-left:-6px;height:16px;width:16px;border-radius:2px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._dpFGP{margin-right:-12px;margin-left:4px}._5dpir{background-color:#fff;border-radius:4px;box-shadow:0 4px 24px -4px rgba(0,0,0,.5);width:156px}._rw1Xp{margin:8px 8px 0;display:flex}._8iId6,._n0DAr{margin-left:4px}._rChN9{margin:8px 4px 0 8px;display:flex;flex-wrap:wrap}._TcA5O{margin:0 4px 4px 0}._TcA5O:hover{width:18px;height:18px;margin:-1px 3px 3px -1px}._QLdhQ{margin:4px 8px 8px}._bdlXv{position:relative;width:96px;height:96px;outline:0}._bdlXv.focus-visible ._YIc06,._bdlXv:focus-visible ._YIc06{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._wdJ-b{background:linear-gradient(90deg,#fff,transparent)}._lu0Wn,._wdJ-b{position:absolute;top:0;right:0;bottom:0;left:0}._lu0Wn{background:linear-gradient(0deg,#000,transparent)}._YIc06{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}._phSFD{position:relative;background:linear-gradient(0deg,red,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red);width:16px;height:96px;outline:0}._phSFD.focus-visible ._0vdqQ,._phSFD:focus-visible ._0vdqQ{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._0vdqQ{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)}._5iJOi{position:relative;width:16px;height:96px}._e-vCj{width:16px;height:4px;background:#fff;border-radius:50%;box-shadow:0 0 4px 1px rgba(0,0,0,.4);transform:translateY(2px)}._e-vCj,._lDJIB{position:absolute}._lDJIB{top:0;right:0;bottom:0;left:0;outline:0}._lDJIB.focus-visible ._e-vCj,._lDJIB:focus-visible ._e-vCj{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._vMQc-{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}._nbQdB{border-radius:2px;height:16px;width:16px;cursor:pointer;box-shadow:inset 0 0 0 1px rgba(0,0,0,.15)}._nbQdB.focus-visible,._nbQdB:focus-visible{outline:none}._nbQdB.focus-visible,._nbQdB:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-FH-k{display:flex}._-FH-k ._Vi-aR{position:relative;flex-shrink:0;width:26px;height:26px}._-FH-k ._vHkBE{position:absolute;top:0;right:0;bottom:0;left:0;border-top-left-radius:4px;border-bottom-left-radius:4px;border:1px solid #c6c6c6}._-FH-k ._KbnaR{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
|
);
|