@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
|
@@ -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 = "._9ZV2j{display:inline-flex}._zmRfj{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}._zmRfj:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._zmRfj._0vELT{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._zmRfj._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._zmRfj._wOW1Z>svg{opacity:.4}._zmRfj::-webkit-inner-spin-button,._zmRfj::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._zmRfj:focus{z-index:0;border:none;border-radius:4px}._zmRfj:focus:not(._0vELT){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-U-8i,._zmRfj:focus:not(._wOW1Z){background:#fafafa}._-U-8i{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}._-U-8i:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._-U-8i:active:not(._wOW1Z){background:#e5e5e5}._-U-8i._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._-U-8i._wOW1Z>svg{opacity:.4}._WAoyx{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}._WAoyx:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._WAoyx:active:not(._wOW1Z){background:#e5e5e5}._WAoyx._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._WAoyx._wOW1Z>svg{opacity:.4}._TzW-C{position:absolute;top:0;left:0;width:0;height:0;margin:0;overflow:hidden}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_9ZV2j","numberStepperInput":"_zmRfj","disabled":"_wOW1Z","invalid":"_0vELT","decrementBtn":"_-U-8i","incrementBtn":"_WAoyx","inputValueAlert":"_TzW-C"};
|
|
5
|
+
var stylesheet="._9ZV2j{display:inline-flex}._zmRfj{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}._zmRfj:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._zmRfj._0vELT{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._zmRfj._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._zmRfj._wOW1Z>svg{opacity:.4}._zmRfj::-webkit-inner-spin-button,._zmRfj::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._zmRfj:focus{z-index:0;border:none;border-radius:4px}._zmRfj:focus:not(._0vELT){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._-U-8i,._zmRfj:focus:not(._wOW1Z){background:#fafafa}._-U-8i{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}._-U-8i:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._-U-8i:active:not(._wOW1Z){background:#e5e5e5}._-U-8i._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._-U-8i._wOW1Z>svg{opacity:.4}._WAoyx{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}._WAoyx:hover:not(._wOW1Z){cursor:pointer;background:#f5f5f5}._WAoyx:active:not(._wOW1Z){background:#e5e5e5}._WAoyx._wOW1Z{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._WAoyx._wOW1Z>svg{opacity:.4}._TzW-C{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, {
|
|
@@ -55,7 +55,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
55
55
|
helperTextId: formFieldHelperTextId,
|
|
56
56
|
errorTextId: formFieldErrorTextId
|
|
57
57
|
} = useFormFieldControl();
|
|
58
|
-
const internalAriaDescribedby = concatIds(ariaDescribedByFromProps
|
|
58
|
+
const internalAriaDescribedby = concatIds(ariaDescribedByFromProps !== null && ariaDescribedByFromProps !== void 0 ? ariaDescribedByFromProps : ariaDescribedBy, formFieldHelperTextId, formFieldErrorTextId);
|
|
59
59
|
|
|
60
60
|
// Indicates if the `inputValue` is invalid
|
|
61
61
|
const isInputValueInvalid = typeof inputValue === 'number' && (inputValue > inputMax || inputValue < inputMin);
|
|
@@ -66,7 +66,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
66
66
|
* depending on the key that was pressed.
|
|
67
67
|
*/
|
|
68
68
|
const handleKeyDown = e => {
|
|
69
|
-
onKeyDown
|
|
69
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
70
70
|
if (isExternallyDisabled) return;
|
|
71
71
|
if (e.key === 'ArrowUp') {
|
|
72
72
|
// Prevents browser's default increment
|
|
@@ -101,7 +101,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
101
101
|
* Selects the DOM element
|
|
102
102
|
*/
|
|
103
103
|
const handleFocus = e => {
|
|
104
|
-
onFocus
|
|
104
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
105
105
|
if (isExternallyDisabled) return;
|
|
106
106
|
e.target.select();
|
|
107
107
|
};
|
|
@@ -111,15 +111,15 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
111
111
|
* Calls `handleInputBlur`
|
|
112
112
|
*/
|
|
113
113
|
const handleBlur = e => {
|
|
114
|
-
onBlur
|
|
114
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
115
115
|
if (isExternallyDisabled) return;
|
|
116
116
|
handleInputBlur(e);
|
|
117
117
|
};
|
|
118
118
|
return /*#__PURE__*/React__default.createElement("input", _extends({}, rest, {
|
|
119
119
|
// `type`, `step`, `min`, `max`, `onChange`, and `value` are purposely overwritten
|
|
120
120
|
ref: ref,
|
|
121
|
-
"data-testid": dataTestIdFromProps
|
|
122
|
-
id: idFromProps
|
|
121
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'Input'),
|
|
122
|
+
id: idFromProps !== null && idFromProps !== void 0 ? idFromProps : inputId,
|
|
123
123
|
className: classNames(className, styles.numberStepperInput, {
|
|
124
124
|
[styles.invalid]: isInputValueInvalid,
|
|
125
125
|
[styles.disabled]: isExternallyDisabled
|
|
@@ -132,8 +132,8 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
132
132
|
"aria-valuemin": inputMin,
|
|
133
133
|
"aria-valuemax": inputMax,
|
|
134
134
|
"aria-valuenow": Number(inputValue),
|
|
135
|
-
"aria-label": ariaLabelFromProps
|
|
136
|
-
"aria-labelledby": ariaLabelledByFromProps
|
|
135
|
+
"aria-label": ariaLabelFromProps !== null && ariaLabelFromProps !== void 0 ? ariaLabelFromProps : ariaLabel,
|
|
136
|
+
"aria-labelledby": ariaLabelledByFromProps !== null && ariaLabelledByFromProps !== void 0 ? ariaLabelledByFromProps : ariaLabelledBy,
|
|
137
137
|
"aria-describedby": internalAriaDescribedby,
|
|
138
138
|
"aria-invalid": isInputValueInvalid,
|
|
139
139
|
"aria-disabled": isExternallyDisabled,
|
|
@@ -25,8 +25,8 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
25
25
|
...rest
|
|
26
26
|
} = _ref;
|
|
27
27
|
const tabsId = useId(externalId);
|
|
28
|
-
const tabIdPrefix =
|
|
29
|
-
const tabPanelIdPrefix =
|
|
28
|
+
const tabIdPrefix = "".concat(tabsId, "-tab-");
|
|
29
|
+
const tabPanelIdPrefix = "".concat(tabsId, "-tab-panel-");
|
|
30
30
|
const tabRefs = useRef({});
|
|
31
31
|
const [tabIndexOfActiveTab, setTabIndexOfActiveTab] = useState(0);
|
|
32
32
|
const focusOnIndex = index => {
|
|
@@ -41,7 +41,7 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
41
41
|
setTabIndexOfActiveTab(0);
|
|
42
42
|
};
|
|
43
43
|
const handleSelect = key => {
|
|
44
|
-
onChange
|
|
44
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(key);
|
|
45
45
|
};
|
|
46
46
|
const handleKeyDown = (event, tabElementKey, index) => {
|
|
47
47
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
@@ -63,6 +63,7 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
63
63
|
const tabs = [];
|
|
64
64
|
React__default.Children.forEach(children, (child, index) => {
|
|
65
65
|
if (child) {
|
|
66
|
+
var _child$props$id;
|
|
66
67
|
const key = child.key || String(index);
|
|
67
68
|
const active = key === activeKey;
|
|
68
69
|
const context = {
|
|
@@ -74,17 +75,19 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
74
75
|
value: context
|
|
75
76
|
}, /*#__PURE__*/React__default.cloneElement(child, {
|
|
76
77
|
key,
|
|
77
|
-
id: child.props.id
|
|
78
|
+
id: (_child$props$id = child.props.id) !== null && _child$props$id !== void 0 ? _child$props$id : tabIdPrefix + key,
|
|
78
79
|
children: child.props.children,
|
|
79
80
|
ref: mergeRefs(child.ref, node => {
|
|
80
81
|
tabRefs.current[index] = node;
|
|
81
82
|
}),
|
|
82
83
|
onKeyDown: event => {
|
|
83
|
-
|
|
84
|
+
var _child$props$onKeyDow, _child$props;
|
|
85
|
+
(_child$props$onKeyDow = (_child$props = child.props).onKeyDown) === null || _child$props$onKeyDow === void 0 ? void 0 : _child$props$onKeyDow.call(_child$props);
|
|
84
86
|
handleKeyDown(event, key, index);
|
|
85
87
|
},
|
|
86
88
|
onClick: () => {
|
|
87
|
-
|
|
89
|
+
var _child$props$onClick, _child$props2;
|
|
90
|
+
(_child$props$onClick = (_child$props2 = child.props).onClick) === null || _child$props$onClick === void 0 ? void 0 : _child$props$onClick.call(_child$props2);
|
|
88
91
|
handleSelect(key);
|
|
89
92
|
},
|
|
90
93
|
'aria-controls': tabPanelIdPrefix + key
|
|
@@ -97,6 +100,7 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
97
100
|
const panels = [];
|
|
98
101
|
React__default.Children.forEach(children, (child, index) => {
|
|
99
102
|
if (child) {
|
|
103
|
+
var _child$props$id2;
|
|
100
104
|
const key = child.key || String(index);
|
|
101
105
|
const isActive = key === activeKey;
|
|
102
106
|
const panelClasses = classNames(styles.panel, {
|
|
@@ -105,7 +109,7 @@ const Tabs = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
105
109
|
panels.push( /*#__PURE__*/React__default.createElement("div", {
|
|
106
110
|
key: key,
|
|
107
111
|
role: "tabpanel",
|
|
108
|
-
"aria-labelledby": child.props.id
|
|
112
|
+
"aria-labelledby": (_child$props$id2 = child.props.id) !== null && _child$props$id2 !== void 0 ? _child$props$id2 : tabIdPrefix + key,
|
|
109
113
|
className: panelClasses,
|
|
110
114
|
id: tabPanelIdPrefix + key
|
|
111
115
|
}, isActive ? child.props.children : null));
|
|
@@ -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 = {"tabs":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._5NQH4{display:block}._7s7DQ{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._zWBmM{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._zWBmM:hover{color:#32363a}._zWBmM:focus{outline:none}._zWBmM._8HiqX{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._qCmXi{padding-top:32px}._qCmXi._zD5HH{display:none}._zWBmM.focus-visible,._zWBmM:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_5NQH4","bar":"_7s7DQ","tab":"_zWBmM","active":"_8HiqX","panel":"_qCmXi","inactive":"_zD5HH"};
|
|
5
|
+
var stylesheet="._5NQH4{display:block}._7s7DQ{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._zWBmM{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._zWBmM:hover{color:#32363a}._zWBmM:focus{outline:none}._zWBmM._8HiqX{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._qCmXi{padding-top:32px}._qCmXi._zD5HH{display:none}._zWBmM.focus-visible,._zWBmM: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 };
|
|
@@ -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 = {"toolbar":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._2M2-Z,._fhBa6{display:flex}._fhBa6{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._M5Blq{width:69px;min-width:auto;max-width:none}._GZcnC{width:100%}._xzxnS{margin-bottom:12px;background-color:transparent!important}._xzxnS:hover{background-color:rgba(11,110,208,.08)!important}._xzxnS:hover>svg{fill:#085caf}._xzxnS:hover>span{color:#085caf}._xzxnS:active{background-color:rgba(11,110,208,.12)!important}._xzxnS:active>svg{fill:#0854a1}._xzxnS:active>span{color:#0854a1}._xzxnS._XRkZ5{background-color:rgba(11,110,208,.08)!important}._xzxnS._XRkZ5>svg{fill:#0b6ed0}._xzxnS._XRkZ5>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._xzxnS._XRkZ5:hover{background-color:rgba(11,110,208,.08)!important}._xzxnS._XRkZ5:hover>svg{fill:#085caf}._xzxnS._XRkZ5:hover>span{color:#085caf}._xzxnS._XRkZ5:active{background-color:rgba(11,110,208,.12)!important}._xzxnS._XRkZ5:active>svg{fill:#0854a1}._xzxnS._XRkZ5:active>span{color:#0854a1}._ycTUl{border-radius:6px}._ycTUl>._S2C-L{display:block;fill:#515559}._Po3be{margin-top:auto;margin-bottom:0}._V7S7U{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._V7S7U:hover>._yNDcG{opacity:1}._h-eoD{width:0;border-width:0;padding:0}._hjkFc{border-radius:4px;min-width:100%;min-height:100%;outline:none}._jhr52{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._yNDcG{opacity:0}._jhr52._e4SoM._e4SoM,._O-XVZ,._yNDcG:hover{opacity:1}._jhr52._FSQLb._FSQLb{opacity:0}._jhr52>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._jhr52>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._jhr52>span:hover>svg{fill:#fff}._jhr52>span:active{background-color:#0854a1;border-color:#0854a1}._jhr52>span:active>svg{fill:#fff}._jhr52>span>svg{fill:#515559;border-radius:50%}._hjkFc._Hylg1{display:none!important}._npS-x{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._M-F9c{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._h8Fxu{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._cq2dr{fill:#515559}._XXIse{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._h8Fxu.focus-visible,._h8Fxu:focus-visible,._hjkFc.focus-visible,._hjkFc:focus-visible,._npS-x.focus-visible,._npS-x:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._jhr52.focus-visible,._jhr52:focus-visible{border-color:#0a3f88}._jhr52:active>span{background-color:#0854a1;border-color:#0854a1}._jhr52:active>span>svg{fill:#fff}._yNDcG.focus-visible,._yNDcG:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_2M2-Z","toolbarNav":"_fhBa6","toolbarNavCollapsed":"_M5Blq","toolbarTabs":"_GZcnC","toolbarTab":"_xzxnS","selected":"_XRkZ5","toolbarTabIconButton":"_ycTUl","icon":"_S2C-L","tabsExpandCollapseButton":"_Po3be","toolbarPanels":"_V7S7U","toolbarPanelExpandCollapseButtonDefaultHidden":"_yNDcG","toolbarPanelsCollapsed":"_h-eoD","toolbarPanel":"_hjkFc","toolbarPanelExpandCollapseButton":"_jhr52","toolbarPanelExpandCollapseButtonDefaultShown":"_O-XVZ","overrideShow":"_e4SoM","overrideHide":"_FSQLb","notSelected":"_Hylg1","buttonWithLabel":"_npS-x","buttonWithLabelLabel":"_M-F9c","iconButtonWithLabel":"_h8Fxu","iconButtonWithLabelIcon":"_cq2dr","iconButtonWithLabelLabel":"_XXIse"};
|
|
5
|
+
var stylesheet="._2M2-Z,._fhBa6{display:flex}._fhBa6{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._M5Blq{width:69px;min-width:auto;max-width:none}._GZcnC{width:100%}._xzxnS{margin-bottom:12px;background-color:transparent!important}._xzxnS:hover{background-color:rgba(11,110,208,.08)!important}._xzxnS:hover>svg{fill:#085caf}._xzxnS:hover>span{color:#085caf}._xzxnS:active{background-color:rgba(11,110,208,.12)!important}._xzxnS:active>svg{fill:#0854a1}._xzxnS:active>span{color:#0854a1}._xzxnS._XRkZ5{background-color:rgba(11,110,208,.08)!important}._xzxnS._XRkZ5>svg{fill:#0b6ed0}._xzxnS._XRkZ5>span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._xzxnS._XRkZ5:hover{background-color:rgba(11,110,208,.08)!important}._xzxnS._XRkZ5:hover>svg{fill:#085caf}._xzxnS._XRkZ5:hover>span{color:#085caf}._xzxnS._XRkZ5:active{background-color:rgba(11,110,208,.12)!important}._xzxnS._XRkZ5:active>svg{fill:#0854a1}._xzxnS._XRkZ5:active>span{color:#0854a1}._ycTUl{border-radius:6px}._ycTUl>._S2C-L{display:block;fill:#515559}._Po3be{margin-top:auto;margin-bottom:0}._V7S7U{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._V7S7U:hover>._yNDcG{opacity:1}._h-eoD{width:0;border-width:0;padding:0}._hjkFc{border-radius:4px;min-width:100%;min-height:100%;outline:none}._jhr52{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._yNDcG{opacity:0}._jhr52._e4SoM._e4SoM,._O-XVZ,._yNDcG:hover{opacity:1}._jhr52._FSQLb._FSQLb{opacity:0}._jhr52>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._jhr52>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._jhr52>span:hover>svg{fill:#fff}._jhr52>span:active{background-color:#0854a1;border-color:#0854a1}._jhr52>span:active>svg{fill:#fff}._jhr52>span>svg{fill:#515559;border-radius:50%}._hjkFc._Hylg1{display:none!important}._npS-x{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._M-F9c{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._h8Fxu{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._cq2dr{fill:#515559}._XXIse{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._h8Fxu.focus-visible,._h8Fxu:focus-visible,._hjkFc.focus-visible,._hjkFc:focus-visible,._npS-x.focus-visible,._npS-x:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._jhr52.focus-visible,._jhr52:focus-visible{border-color:#0a3f88}._jhr52:active>span{background-color:#0854a1;border-color:#0854a1}._jhr52:active>span>svg{fill:#fff}._yNDcG.focus-visible,._yNDcG:focus-visible{opacity:1}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -37,9 +37,9 @@ const ToolbarPanel = _ref => {
|
|
|
37
37
|
[styles.notSelected]: !isSelected
|
|
38
38
|
}),
|
|
39
39
|
tabIndex: isFocusable && isContainerInTabOrder ? 0 : -1,
|
|
40
|
-
"aria-labelledby": ariaLabelledby ||
|
|
41
|
-
id: id ||
|
|
42
|
-
"data-testid": dataTestId || getSubDataTestId(rootDataTestId,
|
|
40
|
+
"aria-labelledby": ariaLabelledby || "toolbar-".concat(toolbarId, "-tab-").concat(index),
|
|
41
|
+
id: id || "toolbar-".concat(toolbarId, "-panel-").concat(index),
|
|
42
|
+
"data-testid": dataTestId || getSubDataTestId(rootDataTestId, "panel-".concat(index))
|
|
43
43
|
}), isFocusable ? children : null);
|
|
44
44
|
};
|
|
45
45
|
|
|
@@ -75,6 +75,7 @@ const ExpandCollapseButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
77
77
|
const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
78
|
+
var _props$id, _React$Children$toArr;
|
|
78
79
|
let {
|
|
79
80
|
isCollapsible = true,
|
|
80
81
|
defaultIsCollapsed = false,
|
|
@@ -100,7 +101,8 @@ const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
100
101
|
* This allows a screen reader user to click the expand/collapse button using their keyboard and have focus stay on the same button.
|
|
101
102
|
*/
|
|
102
103
|
if (wasExpandCollapseButtonClicked) {
|
|
103
|
-
|
|
104
|
+
var _expandCollapseButton;
|
|
105
|
+
(_expandCollapseButton = expandCollapseButtonRef.current) === null || _expandCollapseButton === void 0 ? void 0 : _expandCollapseButton.focus();
|
|
104
106
|
setWasExpandCollapseButtonClicked(false);
|
|
105
107
|
}
|
|
106
108
|
}, [wasExpandCollapseButtonClicked]);
|
|
@@ -108,7 +110,7 @@ const ToolbarPanels = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
108
110
|
setIsCollapsed(currentIsCollapsed => !currentIsCollapsed);
|
|
109
111
|
setWasExpandCollapseButtonClicked(true);
|
|
110
112
|
};
|
|
111
|
-
const selectedTabPanelId = React__default.Children.toArray(children)
|
|
113
|
+
const selectedTabPanelId = (_props$id = (_React$Children$toArr = React__default.Children.toArray(children)) === null || _React$Children$toArr === void 0 || (_React$Children$toArr = _React$Children$toArr[Number(selectedIndex)]) === null || _React$Children$toArr === void 0 || (_React$Children$toArr = _React$Children$toArr.props) === null || _React$Children$toArr === void 0 ? void 0 : _React$Children$toArr.id) !== null && _props$id !== void 0 ? _props$id : "toolbar-".concat(toolbarId, "-panel-").concat(selectedIndex);
|
|
112
114
|
return /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
113
115
|
ref: mergeRefs(ref, isToolbarPanelsContainerHoveredRef),
|
|
114
116
|
className: classNames(className, styles.toolbarPanels, {
|
|
@@ -43,7 +43,7 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
43
43
|
const isFocused = focusedIndex === index;
|
|
44
44
|
const isSelected = selectedIndex === index;
|
|
45
45
|
const handleSelect = () => {
|
|
46
|
-
setSelectedIndex
|
|
46
|
+
setSelectedIndex === null || setSelectedIndex === void 0 ? void 0 : setSelectedIndex(Number(index));
|
|
47
47
|
};
|
|
48
48
|
const handleClick = e => {
|
|
49
49
|
/*
|
|
@@ -62,22 +62,22 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
62
62
|
case 'ArrowDown':
|
|
63
63
|
case 'ArrowRight':
|
|
64
64
|
e.preventDefault(); // Prevent page scroll
|
|
65
|
-
focusTab
|
|
65
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(getNextIndex(focusedIndex, numTabs));
|
|
66
66
|
break;
|
|
67
67
|
case 'ArrowUp':
|
|
68
68
|
case 'ArrowLeft':
|
|
69
69
|
e.preventDefault(); // Prevent page scroll
|
|
70
|
-
focusTab
|
|
70
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(getPrevIndex(focusedIndex, numTabs));
|
|
71
71
|
break;
|
|
72
72
|
case 'PageUp':
|
|
73
73
|
case 'Home':
|
|
74
74
|
e.preventDefault(); // Prevent page scroll
|
|
75
|
-
focusTab
|
|
75
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(0);
|
|
76
76
|
break;
|
|
77
77
|
case 'PageDown':
|
|
78
78
|
case 'End':
|
|
79
79
|
e.preventDefault(); // Prevent page scroll
|
|
80
|
-
focusTab
|
|
80
|
+
focusTab === null || focusTab === void 0 ? void 0 : focusTab(Number(numTabs) - 1);
|
|
81
81
|
break;
|
|
82
82
|
default:
|
|
83
83
|
}
|
|
@@ -87,13 +87,13 @@ const ToolbarTab = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
87
87
|
ref,
|
|
88
88
|
role: 'tab',
|
|
89
89
|
'aria-selected': isSelected,
|
|
90
|
-
'aria-controls': ariaControls ||
|
|
91
|
-
id: id ||
|
|
90
|
+
'aria-controls': ariaControls || "toolbar-".concat(toolbarId, "-panel-").concat(index),
|
|
91
|
+
id: id || "toolbar-".concat(toolbarId, "-tab-").concat(index),
|
|
92
92
|
// Exsures the correct tab is focused when tabbing into the Toolbar
|
|
93
93
|
tabIndex: isFocused ? 0 : -1,
|
|
94
94
|
onClick: handleClick,
|
|
95
95
|
onKeyDown: handleKeyDown,
|
|
96
|
-
'data-testid': dataTestId || getSubDataTestId(rootDataTestId,
|
|
96
|
+
'data-testid': dataTestId || getSubDataTestId(rootDataTestId, "tab-".concat(index))
|
|
97
97
|
};
|
|
98
98
|
const iconButtonClassName = classNames(className, styles.toolbarTab, styles.toolbarTabIconButton, {
|
|
99
99
|
[styles.selected]: isSelected
|
|
@@ -51,9 +51,11 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
51
51
|
useEffect(() => {
|
|
52
52
|
if (isExpandCollapseButtonFocused) {
|
|
53
53
|
if (isCollapsed) {
|
|
54
|
-
|
|
54
|
+
var _expandToolbarTabsIco;
|
|
55
|
+
(_expandToolbarTabsIco = expandToolbarTabsIconButtonRef.current) === null || _expandToolbarTabsIco === void 0 ? void 0 : _expandToolbarTabsIco.focus();
|
|
55
56
|
} else {
|
|
56
|
-
|
|
57
|
+
var _collapseToolbarTabsI;
|
|
58
|
+
(_collapseToolbarTabsI = collapseToolbarTabsIconButtonWithLabelRef.current) === null || _collapseToolbarTabsI === void 0 ? void 0 : _collapseToolbarTabsI.focus();
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
61
|
}, [isCollapsed, isExpandCollapseButtonFocused]);
|
|
@@ -66,7 +68,8 @@ const ToolbarTabs = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
66
68
|
const [focusedIndex, setFocusedIndex] = useState(selectedIndex);
|
|
67
69
|
const numTabs = React__default.Children.count(children);
|
|
68
70
|
const focusTab = index => {
|
|
69
|
-
|
|
71
|
+
var _tabRefs$current;
|
|
72
|
+
(_tabRefs$current = tabRefs.current) === null || _tabRefs$current === void 0 || (_tabRefs$current = _tabRefs$current[index]) === null || _tabRefs$current === void 0 ? void 0 : _tabRefs$current.focus();
|
|
70
73
|
setFocusedIndex(index);
|
|
71
74
|
};
|
|
72
75
|
|
|
@@ -6,7 +6,7 @@ import { getMediaQueryValue, subscribe } from '../../utils/mediaQueryManager/med
|
|
|
6
6
|
import useLatest from '../useLatest/useLatest.js';
|
|
7
7
|
|
|
8
8
|
function getMinWidthQuery(length, unit) {
|
|
9
|
-
return
|
|
9
|
+
return "(min-width: ".concat(length).concat(unit, ")");
|
|
10
10
|
}
|
|
11
11
|
function getInitialValues(breakpointsConfig, unit) {
|
|
12
12
|
const initialValues = {};
|
|
@@ -13,10 +13,11 @@ function useClickOutside(refs, onClickOutside) {
|
|
|
13
13
|
const allRefs = useMemo(() => Array.isArray(refs) ? refs : [refs], [refs]);
|
|
14
14
|
const handler = event => {
|
|
15
15
|
const isInside = allRefs.some(ref => {
|
|
16
|
+
var _el$contains;
|
|
16
17
|
const {
|
|
17
18
|
current: el
|
|
18
19
|
} = ref;
|
|
19
|
-
return el
|
|
20
|
+
return el === null || el === void 0 || (_el$contains = el.contains) === null || _el$contains === void 0 ? void 0 : _el$contains.call(el, event.target);
|
|
20
21
|
});
|
|
21
22
|
if (!isInside) {
|
|
22
23
|
onClickOutside(event);
|
|
@@ -54,10 +54,11 @@ function useControllableState(initialState, onChange, externalState) {
|
|
|
54
54
|
replaceState(nextState);
|
|
55
55
|
}
|
|
56
56
|
if (nextState !== currentState) {
|
|
57
|
+
var _onChangeRef$current;
|
|
57
58
|
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
58
59
|
args[_key - 1] = arguments[_key];
|
|
59
60
|
}
|
|
60
|
-
onChangeRef.current
|
|
61
|
+
(_onChangeRef$current = onChangeRef.current) === null || _onChangeRef$current === void 0 ? void 0 : _onChangeRef$current.call(onChangeRef, nextState, ...args);
|
|
61
62
|
}
|
|
62
63
|
}, [onChangeRef, externalStateRef, internalStateRef]);
|
|
63
64
|
const actualState = externalState === undefined ? state : externalState;
|
|
@@ -29,7 +29,7 @@ function useEventListener(targetOrRef, event, handler) {
|
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
31
31
|
const target = isEventTarget(targetOrRef) ? targetOrRef : targetOrRef.current;
|
|
32
|
-
if (target
|
|
32
|
+
if (target !== null && target !== void 0 && target.addEventListener && !isDisabled) {
|
|
33
33
|
target.addEventListener(event, listener, isCaptureEvent);
|
|
34
34
|
return () => target.removeEventListener(event, listener, isCaptureEvent);
|
|
35
35
|
}
|
|
@@ -7,7 +7,7 @@ import { v4 } from 'uuid';
|
|
|
7
7
|
* @returns If an external ID is passed in, the external ID. Otherwise, a randomly generated ID.
|
|
8
8
|
*/
|
|
9
9
|
function useId(defaultExternalId) {
|
|
10
|
-
const [currentId] = useState(() => defaultExternalId
|
|
10
|
+
const [currentId] = useState(() => defaultExternalId !== null && defaultExternalId !== void 0 ? defaultExternalId : v4());
|
|
11
11
|
return currentId;
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
2
1
|
import { useEffect } from 'react';
|
|
3
2
|
import '../useId/index.js';
|
|
4
3
|
import styles from './useOverlay2.js';
|
|
@@ -26,7 +25,8 @@ const useOverlay = _ref => {
|
|
|
26
25
|
} = _ref;
|
|
27
26
|
const overlayId = useId();
|
|
28
27
|
useEffect(() => {
|
|
29
|
-
|
|
28
|
+
var _containerRef$current;
|
|
29
|
+
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
30
30
|
const overlay = document.createElement('div');
|
|
31
31
|
overlay.id = overlayId;
|
|
32
32
|
overlay.classList.add(styles.overlay);
|
|
@@ -43,18 +43,19 @@ const useOverlay = _ref => {
|
|
|
43
43
|
};
|
|
44
44
|
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex]);
|
|
45
45
|
useEffect(() => {
|
|
46
|
-
|
|
46
|
+
var _containerRef$current2;
|
|
47
|
+
const containerNode = (_containerRef$current2 = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : document.body;
|
|
47
48
|
const overlayNode = document.getElementById(overlayId);
|
|
48
49
|
if (isVisible) {
|
|
49
50
|
Array.from(containerNode.children).forEach(child => {
|
|
50
|
-
if (!
|
|
51
|
+
if (!ignoreIds.includes(child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
51
52
|
});
|
|
52
|
-
overlayNode
|
|
53
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles.hidden);
|
|
53
54
|
} else {
|
|
54
55
|
Array.from(containerNode.children).forEach(child => {
|
|
55
56
|
child.removeAttribute('inert');
|
|
56
57
|
});
|
|
57
|
-
overlayNode
|
|
58
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles.hidden);
|
|
58
59
|
}
|
|
59
60
|
return () => {
|
|
60
61
|
Array.from(containerNode.children).forEach(child => {
|
|
@@ -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 = {"overlay":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._sepgy{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._4CRt2{visibility:hidden}";
|
|
4
|
+
var styles = {"overlay":"_sepgy","hidden":"_4CRt2"};
|
|
5
|
+
var stylesheet="._sepgy{background-color:#000;opacity:.5;width:100%;height:100%;position:absolute;top:0;left:0;right:0;bottom:0;display:grid;align-items:left;justify-items:left;place-items:left;overflow-y:auto}._4CRt2{visibility:hidden}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -3,6 +3,7 @@ import { DEFAULT_BREAKPOINTS } from '../../utils/constants.js';
|
|
|
3
3
|
import useBreakpoints from '../useBreakpoints/useBreakpoints.js';
|
|
4
4
|
|
|
5
5
|
function useResponsiveValue(values) {
|
|
6
|
+
var _values$returnKey;
|
|
6
7
|
let breakpoints = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_BREAKPOINTS;
|
|
7
8
|
let unit = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'em';
|
|
8
9
|
const matches = useBreakpoints(breakpoints, unit);
|
|
@@ -12,7 +13,7 @@ function useResponsiveValue(values) {
|
|
|
12
13
|
}
|
|
13
14
|
return acc;
|
|
14
15
|
}, undefined);
|
|
15
|
-
return values[returnKey]
|
|
16
|
+
return (_values$returnKey = values[returnKey]) !== null && _values$returnKey !== void 0 ? _values$returnKey : null;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export { useResponsiveValue as default };
|
|
@@ -24,16 +24,18 @@ function useScreenReaderAnnouncement(politeness) {
|
|
|
24
24
|
|
|
25
25
|
// Sets the politeness of `aria-live`
|
|
26
26
|
useEffect(() => {
|
|
27
|
-
|
|
27
|
+
var _ariaLiveElementRef$c;
|
|
28
|
+
if (politeness !== undefined) (_ariaLiveElementRef$c = ariaLiveElementRef.current) === null || _ariaLiveElementRef$c === void 0 ? void 0 : _ariaLiveElementRef$c.setAttribute('aria-live', politeness);
|
|
28
29
|
}, [politeness]);
|
|
29
30
|
|
|
30
31
|
// Announces oldest message in the queue
|
|
31
32
|
useEffect(() => {
|
|
32
33
|
if (!isAnnouncingMessage && messageQueue.length > 0) {
|
|
34
|
+
var _ariaLiveElementRef$c2;
|
|
33
35
|
setIsAnnouncingMessage(true);
|
|
34
36
|
const oldestMessage = messageQueue[0];
|
|
35
37
|
let delay;
|
|
36
|
-
if (ariaLiveElementRef.current
|
|
38
|
+
if (((_ariaLiveElementRef$c2 = ariaLiveElementRef.current) === null || _ariaLiveElementRef$c2 === void 0 ? void 0 : _ariaLiveElementRef$c2.textContent) === oldestMessage) {
|
|
37
39
|
/*
|
|
38
40
|
* If the message to be announced is the same as the previous message, the message needs to be reset.
|
|
39
41
|
* The screen reader won't read the change unless the text has changed.
|
|
@@ -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 classes = {"ariaLiveElement":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._1iMHi{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_1iMHi"};
|
|
5
|
+
var stylesheet="._1iMHi{position:absolute;top:-10000px;left:-10000px}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { classes as default, stylesheet };
|
package/dist/icons/Icon.js
CHANGED
|
@@ -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 = {"icon":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._gRgru{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_gRgru"};
|
|
5
|
+
var stylesheet="._gRgru{flex-shrink:0}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
package/dist/icons/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icons_index = require('../__shared/cjs/index-
|
|
5
|
+
var icons_index = require('../__shared/cjs/index-75d9309a.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|