@qualtrics/ui-react 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/__shared/cjs/{index-201e8786.js → index-025620bf.js} +666 -549
- package/dist/__shared/cjs/{index-0ae99de2.js → index-41a013d2.js} +4 -4
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionHeader.js +4 -4
- package/dist/components/Accordion/AccordionPanel.js +3 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +2 -2
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox.js +11 -11
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/VisualCheckbox2.js +3 -3
- package/dist/components/ColorPicker/Alpha.js +12 -9
- package/dist/components/ColorPicker/ColorPicker.js +10 -8
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +8 -6
- package/dist/components/ColorPicker/Hue.js +3 -2
- package/dist/components/ColorPicker/Palette.js +7 -5
- package/dist/components/ColorPicker/Saturation.js +9 -8
- package/dist/components/ColorPicker/utils/hexToRgbaString.js +3 -2
- package/dist/components/ColorPicker/utils/rgbToHex.js +1 -1
- package/dist/components/ColorPicker/utils/validateHex.js +10 -9
- package/dist/components/Combobox/Combobox.js +47 -26
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxHeader.js +1 -1
- package/dist/components/Combobox/ComboboxIcon.js +3 -2
- package/dist/components/Combobox/ComboboxInput.js +4 -4
- package/dist/components/Combobox/ComboboxList.js +2 -2
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +5 -2
- package/dist/components/Dropdown/Dropdown.js +14 -9
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +23 -19
- package/dist/components/Dropdown/DropdownList.js +4 -4
- package/dist/components/Dropdown/DropdownOption.js +4 -3
- package/dist/components/Dropdown/DropdownSearch.js +10 -4
- package/dist/components/FilePicker/FilePicker.js +13 -6
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +5 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +2 -2
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +12 -9
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +2 -2
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionSet.js +5 -5
- package/dist/components/LogicEditor/LogicEditor.js +1 -1
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/utils.js +2 -1
- package/dist/components/Modal/Modal.js +14 -13
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +41 -30
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +2 -2
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -7
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper.js +7 -6
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperDecrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperIncrement.js +1 -1
- package/dist/components/NumberStepper/NumberStepperInput.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationNextButton.js +5 -5
- package/dist/components/Pagination/PaginationPageInput.js +11 -9
- package/dist/components/Pagination/PaginationPreviousButton.js +5 -5
- package/dist/components/Popover/Popover.js +9 -7
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +4 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +4 -4
- package/dist/components/Radio/Radio.js +12 -11
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput.js +4 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav.js +2 -1
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavLink.js +1 -1
- package/dist/components/Slider/RangeSlider.js +2 -2
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +1 -1
- package/dist/components/Switch/Switch.js +11 -11
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tab.js +3 -3
- package/dist/components/Tabs/TabList.js +6 -5
- package/dist/components/Tabs/TabPanel.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +10 -4
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/UIProvider.js +2 -2
- package/dist/components/deprecated_ColorPicker/Alpha.js +4 -4
- package/dist/components/deprecated_ColorPicker/Color.js +6 -6
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +2 -2
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +1 -1
- package/dist/components/deprecated_ColorPicker/Hue.js +3 -3
- package/dist/components/deprecated_ColorPicker/Saturation.js +5 -5
- package/dist/components/deprecated_ColorPicker/Swatch.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +2 -2
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +8 -8
- package/dist/components/deprecated_Tabs/Tabs.js +11 -7
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +4 -2
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +8 -8
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +6 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +1 -1
- package/dist/hooks/useClickOutside/useClickOutside.js +2 -1
- package/dist/hooks/useControllableState/useControllableState.js +2 -1
- package/dist/hooks/useEventListener/useEventListener.js +1 -1
- package/dist/hooks/useId/useId.js +1 -1
- package/dist/hooks/useOverlay/useOverlay.js +6 -4
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useResponsiveValue/useResponsiveValue.js +2 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +4 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/createIconComponent.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +14 -7
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +60 -49
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +6 -4
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +18 -10
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +7 -6
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +5 -4
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +1 -1
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +3 -2
- package/dist/next/AdvancedTable/useComputedWidth.js +1 -1
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +5 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +1 -1
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxFlyout.js +2 -2
- package/dist/next/Combobox/ComboboxGroup.js +1 -1
- package/dist/next/Combobox/ComboboxInput.js +2 -2
- package/dist/next/Combobox/ComboboxOption.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFilteredGroup/useComboboxFilteredGroup.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +12 -8
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +1 -1
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +3 -2
- package/dist/next/Combobox/hooks/useSelectedOptionScroll/useSelectedOptionScroll.js +2 -1
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +2 -1
- package/dist/next/Combobox/utils/nodeRegistration/nodeRegistration.js +1 -1
- package/dist/next/Drawer/Drawer.js +7 -4
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Input/Input.js +2 -2
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu.js +5 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuItem.js +10 -8
- package/dist/next/Menu/MenuPane.js +20 -8
- package/dist/next/Menu/SubMenu.js +12 -8
- package/dist/next/Menu/useMutationObserver.js +1 -1
- package/dist/next/Menu/usePaneSearch.js +27 -15
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +7 -6
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/SplitButton/SplitButton.js +8 -2
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +4 -4
- package/dist/next/TimePicker/TimeInput.js +2 -2
- package/dist/next/TimePicker/TimePicker.js +4 -4
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +2 -1
- package/dist/next/TimePicker/utils.js +10 -9
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +298 -219
- package/dist/utils/Flyout/Flyout.js +1 -1
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Popper/Popper.js +9 -5
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +2 -1
- package/dist/utils/Translation/useTranslation.js +4 -5
- package/dist/utils/filterChildren/filterChildren.js +2 -1
- package/dist/utils/getSubDataTestId/getSubDataTestId.js +1 -1
- package/dist/utils/mediaQueryManager/mediaQueryManager.js +1 -1
- package/dist/utils/mergeRefs/mergeRefs.js +1 -1
- package/dist/utils/wrapEvent/wrapEvent.js +2 -2
- package/next/package.json +1 -1
- package/package.json +2 -2
|
@@ -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 = "._2RhG4{display:block}._hBCPj{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Sv870{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Sv870:hover{color:#32363a}._Sv870:focus{outline:none}._Sv870._OMkgT{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._oyqMP{padding-top:32px}._oyqMP._HdD4M{display:none}._Sv870.focus-visible,._Sv870:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"tabs":"_2RhG4","bar":"_hBCPj","tab":"_Sv870","active":"_OMkgT","panel":"_oyqMP","inactive":"_HdD4M"};
|
|
5
|
+
var stylesheet="._2RhG4{display:block}._hBCPj{display:flex;justify-content:left;border-bottom:1px solid #e5e5e5;height:52px}._Sv870{color:#6a6d70;cursor:pointer;height:52px;padding:16px 12px;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;border-bottom:1px solid transparent;border-radius:1px}._Sv870:hover{color:#32363a}._Sv870:focus{outline:none}._Sv870._OMkgT{margin-bottom:-1px;border-bottom:2px solid #0b6ed0;color:#32363a;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._oyqMP{padding-top:32px}._oyqMP._HdD4M{display:none}._Sv870.focus-visible,._Sv870:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
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 = "._KhOvN,._zPwEY{display:flex}._zPwEY{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._P7as0{width:69px;min-width:auto;max-width:none}._sXJS6{width:100%}._QFK81{margin-bottom:12px;background-color:transparent!important}._QFK81:hover{background-color:rgba(11,110,208,.08)!important}._QFK81:hover>svg{fill:#085caf}._QFK81:hover>span{color:#085caf}._QFK81:active{background-color:rgba(11,110,208,.12)!important}._QFK81:active>svg{fill:#0854a1}._QFK81:active>span{color:#0854a1}._QFK81._nYvQ-{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ->svg{fill:#0b6ed0}._QFK81._nYvQ->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._QFK81._nYvQ-:hover{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ-:hover>svg{fill:#085caf}._QFK81._nYvQ-:hover>span{color:#085caf}._QFK81._nYvQ-:active{background-color:rgba(11,110,208,.12)!important}._QFK81._nYvQ-:active>svg{fill:#0854a1}._QFK81._nYvQ-:active>span{color:#0854a1}._b4DZT{border-radius:6px}._b4DZT>._gfwIU{display:block;fill:#515559}._OOfjF{margin-top:auto;margin-bottom:0}._x92-d{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._x92-d:hover>._uVYKu{opacity:1}._EnHZg{width:0;border-width:0;padding:0}._DxsXO{border-radius:4px;min-width:100%;min-height:100%;outline:none}._rGBKQ{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._uVYKu{opacity:0}._L8MRF,._rGBKQ._fwCoo._fwCoo,._uVYKu:hover{opacity:1}._rGBKQ._vq1e3._vq1e3{opacity:0}._rGBKQ>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._rGBKQ>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._rGBKQ>span:hover>svg{fill:#fff}._rGBKQ>span:active{background-color:#0854a1;border-color:#0854a1}._rGBKQ>span:active>svg{fill:#fff}._rGBKQ>span>svg{fill:#515559;border-radius:50%}._DxsXO._PCFRJ{display:none!important}._QVewo{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._e-ZYn{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._BvQ8F{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._RMcXt{fill:#515559}._KUvBA{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._BvQ8F.focus-visible,._BvQ8F:focus-visible,._DxsXO.focus-visible,._DxsXO:focus-visible,._QVewo.focus-visible,._QVewo:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._rGBKQ.focus-visible,._rGBKQ:focus-visible{border-color:#0a3f88}._rGBKQ:active>span{background-color:#0854a1;border-color:#0854a1}._rGBKQ:active>span>svg{fill:#fff}._uVYKu.focus-visible,._uVYKu:focus-visible{opacity:1}";
|
|
4
|
+
var styles = {"toolbar":"_KhOvN","toolbarNav":"_zPwEY","toolbarNavCollapsed":"_P7as0","toolbarTabs":"_sXJS6","toolbarTab":"_QFK81","selected":"_nYvQ-","toolbarTabIconButton":"_b4DZT","icon":"_gfwIU","tabsExpandCollapseButton":"_OOfjF","toolbarPanels":"_x92-d","toolbarPanelExpandCollapseButtonDefaultHidden":"_uVYKu","toolbarPanelsCollapsed":"_EnHZg","toolbarPanel":"_DxsXO","toolbarPanelExpandCollapseButton":"_rGBKQ","toolbarPanelExpandCollapseButtonDefaultShown":"_L8MRF","overrideShow":"_fwCoo","overrideHide":"_vq1e3","notSelected":"_PCFRJ","buttonWithLabel":"_QVewo","buttonWithLabelLabel":"_e-ZYn","iconButtonWithLabel":"_BvQ8F","iconButtonWithLabelIcon":"_RMcXt","iconButtonWithLabelLabel":"_KUvBA"};
|
|
5
|
+
var stylesheet="._KhOvN,._zPwEY{display:flex}._zPwEY{flex-direction:column;align-items:center;min-width:165px;max-width:240px;padding:12px 16px 16px;border-right:1px solid #898989;background-color:#fff}._P7as0{width:69px;min-width:auto;max-width:none}._sXJS6{width:100%}._QFK81{margin-bottom:12px;background-color:transparent!important}._QFK81:hover{background-color:rgba(11,110,208,.08)!important}._QFK81:hover>svg{fill:#085caf}._QFK81:hover>span{color:#085caf}._QFK81:active{background-color:rgba(11,110,208,.12)!important}._QFK81:active>svg{fill:#0854a1}._QFK81:active>span{color:#0854a1}._QFK81._nYvQ-{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ->svg{fill:#0b6ed0}._QFK81._nYvQ->span{color:#0b6ed0;font-family:\"72Duplex\",\"72\",\"Helvetica Neue\",Helvetica,Arial,sans-serif;font-weight:500}._QFK81._nYvQ-:hover{background-color:rgba(11,110,208,.08)!important}._QFK81._nYvQ-:hover>svg{fill:#085caf}._QFK81._nYvQ-:hover>span{color:#085caf}._QFK81._nYvQ-:active{background-color:rgba(11,110,208,.12)!important}._QFK81._nYvQ-:active>svg{fill:#0854a1}._QFK81._nYvQ-:active>span{color:#0854a1}._b4DZT{border-radius:6px}._b4DZT>._gfwIU{display:block;fill:#515559}._OOfjF{margin-top:auto;margin-bottom:0}._x92-d{position:relative;width:295px;background-color:#fff;padding:2px 1px 2px 2px;border-right:1px solid #898989}._x92-d:hover>._uVYKu{opacity:1}._EnHZg{width:0;border-width:0;padding:0}._DxsXO{border-radius:4px;min-width:100%;min-height:100%;outline:none}._rGBKQ{width:36px;height:36px;position:absolute;top:48px;right:-18px;display:flex;justify-content:center;align-items:center;padding:0;background-color:transparent;border:2px solid transparent;border-radius:6px;outline:none;cursor:pointer;z-index:10}._uVYKu{opacity:0}._L8MRF,._rGBKQ._fwCoo._fwCoo,._uVYKu:hover{opacity:1}._rGBKQ._vq1e3._vq1e3{opacity:0}._rGBKQ>span{width:24px;height:24px;display:flex;justify-content:center;align-items:center;background-color:#fff;border:1px solid #898989;border-radius:50%}._rGBKQ>span:hover{background-color:#0b6ed0;border-color:#0b6ed0}._rGBKQ>span:hover>svg{fill:#fff}._rGBKQ>span:active{background-color:#0854a1;border-color:#0854a1}._rGBKQ>span:active>svg{fill:#fff}._rGBKQ>span>svg{fill:#515559;border-radius:50%}._DxsXO._PCFRJ{display:none!important}._QVewo{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 7px}._e-ZYn{font-size:14px;color:#515559;justify-self:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._BvQ8F{width:100%;height:36px;display:flex;align-items:center;border:1px solid transparent;border-radius:4px;outline:none;cursor:pointer;padding:0 5px}._RMcXt{fill:#515559}._KUvBA{font-size:14px;color:#515559;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-left:5px}._BvQ8F.focus-visible,._BvQ8F:focus-visible,._DxsXO.focus-visible,._DxsXO:focus-visible,._QVewo.focus-visible,._QVewo:focus-visible{box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._rGBKQ.focus-visible,._rGBKQ:focus-visible{border-color:#0a3f88}._rGBKQ:active>span{background-color:#0854a1;border-color:#0854a1}._rGBKQ:active>span>svg{fill:#fff}._uVYKu.focus-visible,._uVYKu:focus-visible{opacity:1}";
|
|
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, _React$Children$toArr2, _React$Children$toArr3;
|
|
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 ? void 0 : (_React$Children$toArr2 = _React$Children$toArr[Number(selectedIndex)]) === null || _React$Children$toArr2 === void 0 ? void 0 : (_React$Children$toArr3 = _React$Children$toArr2.props) === null || _React$Children$toArr3 === void 0 ? void 0 : _React$Children$toArr3.id) !== null && _props$id !== void 0 ? _props$id : "toolbar-".concat(toolbarId, "-panel-").concat(selectedIndex);
|
|
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, _tabRefs$current$inde;
|
|
72
|
+
(_tabRefs$current = tabRefs.current) === null || _tabRefs$current === void 0 ? void 0 : (_tabRefs$current$inde = _tabRefs$current[index]) === null || _tabRefs$current$inde === void 0 ? void 0 : _tabRefs$current$inde.focus();
|
|
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 ? 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
|
|
|
@@ -26,7 +26,8 @@ const useOverlay = _ref => {
|
|
|
26
26
|
} = _ref;
|
|
27
27
|
const overlayId = useId();
|
|
28
28
|
useEffect(() => {
|
|
29
|
-
|
|
29
|
+
var _containerRef$current;
|
|
30
|
+
const containerNode = (_containerRef$current = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current !== void 0 ? _containerRef$current : document.body;
|
|
30
31
|
const overlay = document.createElement('div');
|
|
31
32
|
overlay.id = overlayId;
|
|
32
33
|
overlay.classList.add(styles.overlay);
|
|
@@ -43,18 +44,19 @@ const useOverlay = _ref => {
|
|
|
43
44
|
};
|
|
44
45
|
}, [containerRef, overlayId, isVisible, onClick, dataTestId, zIndex]);
|
|
45
46
|
useEffect(() => {
|
|
46
|
-
|
|
47
|
+
var _containerRef$current2;
|
|
48
|
+
const containerNode = (_containerRef$current2 = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) !== null && _containerRef$current2 !== void 0 ? _containerRef$current2 : document.body;
|
|
47
49
|
const overlayNode = document.getElementById(overlayId);
|
|
48
50
|
if (isVisible) {
|
|
49
51
|
Array.from(containerNode.children).forEach(child => {
|
|
50
52
|
if (!_includesInstanceProperty(ignoreIds).call(ignoreIds, child.id) && child.id !== overlayId) child.setAttribute('inert', '');
|
|
51
53
|
});
|
|
52
|
-
overlayNode
|
|
54
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.remove(styles.hidden);
|
|
53
55
|
} else {
|
|
54
56
|
Array.from(containerNode.children).forEach(child => {
|
|
55
57
|
child.removeAttribute('inert');
|
|
56
58
|
});
|
|
57
|
-
overlayNode
|
|
59
|
+
overlayNode === null || overlayNode === void 0 ? void 0 : overlayNode.classList.add(styles.hidden);
|
|
58
60
|
}
|
|
59
61
|
return () => {
|
|
60
62
|
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 = "._kc36j{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}._dUHYG{visibility:hidden}";
|
|
4
|
+
var styles = {"overlay":"_kc36j","hidden":"_dUHYG"};
|
|
5
|
+
var stylesheet="._kc36j{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}._dUHYG{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 = "._wDasz{position:absolute;top:-10000px;left:-10000px}";
|
|
4
|
+
var classes = {"ariaLiveElement":"_wDasz"};
|
|
5
|
+
var stylesheet="._wDasz{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 = "._VZWmz{flex-shrink:0}";
|
|
4
|
+
var styles = {"icon":"_VZWmz"};
|
|
5
|
+
var stylesheet="._VZWmz{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-41a013d2.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
package/dist/index.d.ts
CHANGED
|
@@ -59,14 +59,21 @@ declare interface BaseNavLinkProps {
|
|
|
59
59
|
'data-testid'?: string;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
export declare function Breakpoint({ size, children, }:
|
|
63
|
-
|
|
62
|
+
export declare function Breakpoint({ size, children, }: BreakpointProps): null;
|
|
63
|
+
|
|
64
|
+
export declare interface BreakpointProps {
|
|
65
|
+
/** The content to display when the breakpoint threshold is met. */
|
|
64
66
|
children: React.ReactNode;
|
|
65
|
-
|
|
67
|
+
/** The breakpoint size threshold to use. */
|
|
68
|
+
size: DefaultBreakpoints;
|
|
69
|
+
}
|
|
66
70
|
|
|
67
|
-
export declare function BreakpointSwitch({ children, }:
|
|
71
|
+
export declare function BreakpointSwitch({ children, }: BreakpointSwitchProps): ReactElement;
|
|
72
|
+
|
|
73
|
+
export declare interface BreakpointSwitchProps {
|
|
74
|
+
/** List of `Breakpoint` components */
|
|
68
75
|
children: React_2.ReactNode;
|
|
69
|
-
}
|
|
76
|
+
}
|
|
70
77
|
|
|
71
78
|
export declare const Button: React_2.ForwardRefExoticComponent<ButtonProps & React_2.RefAttributes<HTMLButtonElement>>;
|
|
72
79
|
|
|
@@ -314,7 +321,7 @@ export declare const DEFAULT_BREAKPOINTS: {
|
|
|
314
321
|
xl: number;
|
|
315
322
|
};
|
|
316
323
|
|
|
317
|
-
declare type
|
|
324
|
+
export declare type DefaultBreakpoints = keyof typeof DEFAULT_BREAKPOINTS;
|
|
318
325
|
|
|
319
326
|
export declare interface deprecated_ColorHsb {
|
|
320
327
|
h: number;
|
|
@@ -2001,7 +2008,7 @@ export declare interface UIProviderProps {
|
|
|
2001
2008
|
children?: ReactNode;
|
|
2002
2009
|
}
|
|
2003
2010
|
|
|
2004
|
-
export declare function useBreakpoints<T extends Record<string, number> | undefined = undefined>(breakpoints?: T, unit?: 'em' | 'px'): T extends Record<string, number> ? Record<keyof T, boolean> : Record<
|
|
2011
|
+
export declare function useBreakpoints<T extends Record<string, number> | undefined = undefined>(breakpoints?: T, unit?: 'em' | 'px'): T extends Record<string, number> ? Record<keyof T, boolean> : Record<DefaultBreakpoints, boolean>;
|
|
2005
2012
|
|
|
2006
2013
|
export declare function useResponsiveValue<V, C = typeof DEFAULT_BREAKPOINTS>(values: {
|
|
2007
2014
|
[K in keyof V]: K extends keyof C ? V[K] : never;
|
package/dist/index.es.js
CHANGED
|
@@ -100,6 +100,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
100
100
|
|
|
101
101
|
/* eslint-disable camelcase */
|
|
102
102
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
103
|
-
const version = '2.
|
|
103
|
+
const version = '2.22.0';
|
|
104
104
|
|
|
105
105
|
export { version };
|
package/dist/index.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./__shared/cjs/index-
|
|
5
|
+
var index = require('./__shared/cjs/index-025620bf.js');
|
|
6
6
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
|
9
|
-
require('./__shared/cjs/index-
|
|
9
|
+
require('./__shared/cjs/index-41a013d2.js');
|
|
10
10
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
11
11
|
require('react-popper');
|
|
12
12
|
require('@popperjs/core');
|
|
@@ -20,7 +20,7 @@ require('throttle-debounce');
|
|
|
20
20
|
|
|
21
21
|
/* eslint-disable camelcase */
|
|
22
22
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
23
|
-
const version = '2.
|
|
23
|
+
const version = '2.22.0';
|
|
24
24
|
|
|
25
25
|
exports.Accordion = index.Accordion;
|
|
26
26
|
exports.AccordionHeader = index.AccordionHeader;
|