@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
|
@@ -90,9 +90,10 @@ const ArrowNav = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
90
90
|
preventScroll: true
|
|
91
91
|
});
|
|
92
92
|
} else if (highlightedIndex === 0 && searchable) {
|
|
93
|
-
searchBoxRef
|
|
93
|
+
searchBoxRef === null || searchBoxRef === void 0 ? void 0 : searchBoxRef.current.focus();
|
|
94
94
|
} else {
|
|
95
|
-
|
|
95
|
+
var _anchorRef$current;
|
|
96
|
+
anchorRef === null || anchorRef === void 0 || (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.focus();
|
|
96
97
|
}
|
|
97
98
|
}
|
|
98
99
|
}, [highlightedIndex, refs, searchable, allChildren.length,
|
|
@@ -111,14 +112,16 @@ const ArrowNav = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
111
112
|
onHighlightedIndexChange((highlightedIndex - 1 + numChildren) % numChildren);
|
|
112
113
|
}
|
|
113
114
|
} else if (e.key === 'PageUp' || e.key === 'Home') {
|
|
115
|
+
var _containerRef$current;
|
|
114
116
|
// Only call the highlighted index change handler for the current nav list (i.e. if the event bubbles up to a parent nav list, don't call the highlighted index change handler on the parent nav list)
|
|
115
|
-
if (containerRef.current
|
|
117
|
+
if ((_containerRef$current = containerRef.current) !== null && _containerRef$current !== void 0 && _containerRef$current.contains(e.target)) {
|
|
116
118
|
e.preventDefault();
|
|
117
119
|
onHighlightedIndexChange(0);
|
|
118
120
|
}
|
|
119
121
|
} else if (e.key === 'PageDown' || e.key === 'End') {
|
|
122
|
+
var _containerRef$current2;
|
|
120
123
|
// Only call the highlighted index change handler for the current nav list (i.e. if the event bubbles up to a parent nav list, don't call the highlighted index change handler on the parent nav list)
|
|
121
|
-
if (containerRef.current
|
|
124
|
+
if ((_containerRef$current2 = containerRef.current) !== null && _containerRef$current2 !== void 0 && _containerRef$current2.contains(e.target)) {
|
|
122
125
|
e.preventDefault();
|
|
123
126
|
const lastIndex = numChildren - 1;
|
|
124
127
|
onHighlightedIndexChange(lastIndex);
|
|
@@ -136,20 +139,20 @@ const ArrowNav = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
136
139
|
style: {
|
|
137
140
|
...style,
|
|
138
141
|
minWidth,
|
|
139
|
-
maxHeight: maxHeight
|
|
142
|
+
maxHeight: maxHeight !== null && maxHeight !== void 0 ? maxHeight :
|
|
140
143
|
// This logic is located here instead of BaseMenu.js so the maxHeight will update with screen resizing (Popper has a resize listener that causes this to rerender)
|
|
141
144
|
Math.min(350, (isSubmenu ?
|
|
142
145
|
// Submenus: window height - submenu popper offset - 8px of container padding - half of anchor height (fallback to default 18px))
|
|
143
146
|
document.documentElement.clientHeight - SUBMENU_POPPER_OFFSET[0] :
|
|
144
147
|
// Menus: half of window height - menu popper offset - 8px of container padding - half of anchor height (fallback to default 18px)
|
|
145
|
-
document.documentElement.clientHeight / 2 - FLYOUT_POPPER_OFFSET[1]) - 8 - (anchorRef
|
|
148
|
+
document.documentElement.clientHeight / 2 - FLYOUT_POPPER_OFFSET[1]) - 8 - (anchorRef !== null && anchorRef !== void 0 && anchorRef.current ? anchorRef.current.offsetHeight / 2 : 18))
|
|
146
149
|
}
|
|
147
150
|
}, rest), searchable && /*#__PURE__*/React__default.createElement(MenuSearchBox, {
|
|
148
151
|
"aria-controls": menuId,
|
|
149
152
|
value: searchTerm,
|
|
150
153
|
ref: searchBoxRef,
|
|
151
154
|
onChange: e => {
|
|
152
|
-
setSearchTerm
|
|
155
|
+
setSearchTerm === null || setSearchTerm === void 0 ? void 0 : setSearchTerm(e.target.value);
|
|
153
156
|
},
|
|
154
157
|
onFocus: () => onHighlightedIndexChange(0)
|
|
155
158
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -34,7 +34,7 @@ const MenuItem = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
34
34
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
35
35
|
React__default.createElement("div", _extends({}, rest, {
|
|
36
36
|
ref: ref,
|
|
37
|
-
role: role
|
|
37
|
+
role: role !== null && role !== void 0 ? role : defaultRole,
|
|
38
38
|
tabIndex: tabIndex,
|
|
39
39
|
"aria-disabled": disabled,
|
|
40
40
|
"aria-checked": isSelectable ? isSelected : undefined,
|
|
@@ -159,15 +159,16 @@ const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
if (regex.test(val)) {
|
|
162
|
+
var _val$split;
|
|
162
163
|
const currentIsSeparatedByComma = isSeparatedByComma(val);
|
|
163
164
|
const currentDecimalSeparator = currentIsSeparatedByComma ? ',' : '.';
|
|
164
|
-
const decimalPortion = val.split(currentDecimalSeparator)
|
|
165
|
-
if (decimalPortion
|
|
165
|
+
const decimalPortion = (_val$split = val.split(currentDecimalSeparator)) === null || _val$split === void 0 ? void 0 : _val$split[1];
|
|
166
|
+
if ((decimalPortion === null || decimalPortion === void 0 ? void 0 : decimalPortion.length) > 2) {
|
|
166
167
|
let rounded = String(roundToTwoDecimalPlaces(convertToNumber(val)));
|
|
167
168
|
|
|
168
169
|
// If a user types a number that rounds out to a whole number, such as '23.000' or `1.999`, the '.' is rounded away, causing the user to lose their place in the input.
|
|
169
170
|
if (rounded.indexOf('.') === -1) {
|
|
170
|
-
rounded +=
|
|
171
|
+
rounded += "".concat(currentDecimalSeparator, "00");
|
|
171
172
|
}
|
|
172
173
|
setInputValue(localizeNumber(rounded, currentIsSeparatedByComma));
|
|
173
174
|
} else {
|
|
@@ -218,7 +219,7 @@ const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
218
219
|
} = e;
|
|
219
220
|
if (!componentHasFocus.current && currentTarget.contains(document.activeElement)) {
|
|
220
221
|
componentHasFocus.current = true;
|
|
221
|
-
onFocus
|
|
222
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
222
223
|
}
|
|
223
224
|
},
|
|
224
225
|
onBlur: e => {
|
|
@@ -231,7 +232,7 @@ const NumberStepper = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
231
232
|
// Check if the new focused element is a child of the original container
|
|
232
233
|
if (!currentTarget.contains(document.activeElement)) {
|
|
233
234
|
componentHasFocus.current = false;
|
|
234
|
-
onBlur
|
|
235
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
235
236
|
}
|
|
236
237
|
});
|
|
237
238
|
}
|
|
@@ -247,7 +248,7 @@ function convertToNumber(value) {
|
|
|
247
248
|
if (typeof value === 'number') {
|
|
248
249
|
return value;
|
|
249
250
|
}
|
|
250
|
-
const num = Number(value
|
|
251
|
+
const num = Number(value === null || value === void 0 ? void 0 : value.replace(',', '.'));
|
|
251
252
|
if (Number.isNaN(num)) {
|
|
252
253
|
return 0;
|
|
253
254
|
}
|
|
@@ -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 = "._1Kscx{display:inline-flex;width:127px}._xdR6R{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}._xdR6R:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._xdR6R._XmAhN{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._xdR6R._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._xdR6R._DRb6j>svg{opacity:.4}._xdR6R::-webkit-inner-spin-button,._xdR6R::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._xdR6R:focus{z-index:0;border:none;border-radius:4px}._xdR6R:focus:not(._XmAhN){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._xDIyd,._xdR6R:focus:not(._DRb6j){background:#fafafa}._xDIyd{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}._xDIyd:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._xDIyd:active:not(._DRb6j){background:#e5e5e5}._xDIyd._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._xDIyd._DRb6j>svg{opacity:.4}._ox4nz{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}._ox4nz:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._ox4nz:active:not(._DRb6j){background:#e5e5e5}._ox4nz._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ox4nz._DRb6j>svg{opacity:.4}";
|
|
4
|
+
var styles = {"numberStepperContainer":"_1Kscx","numberStepperInput":"_xdR6R","disabled":"_DRb6j","invalid":"_XmAhN","decrementBtn":"_xDIyd","incrementBtn":"_ox4nz"};
|
|
5
|
+
var stylesheet="._1Kscx{display:inline-flex;width:127px}._xdR6R{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}._xdR6R:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._xdR6R._XmAhN{box-shadow:0 0 0 2px #fff,0 0 0 4px #900000}._xdR6R._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._xdR6R._DRb6j>svg{opacity:.4}._xdR6R::-webkit-inner-spin-button,._xdR6R::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._xdR6R:focus{z-index:0;border:none;border-radius:4px}._xdR6R:focus:not(._XmAhN){box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}._xDIyd,._xdR6R:focus:not(._DRb6j){background:#fafafa}._xDIyd{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}._xDIyd:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._xDIyd:active:not(._DRb6j){background:#e5e5e5}._xDIyd._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._xDIyd._DRb6j>svg{opacity:.4}._ox4nz{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}._ox4nz:hover:not(._DRb6j){cursor:pointer;background:#f5f5f5}._ox4nz:active:not(._DRb6j){background:#e5e5e5}._ox4nz._DRb6j{cursor:not-allowed;fill:#74777a;color:#74777a;border-color:#e5e5e5}._ox4nz._DRb6j>svg{opacity:.4}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -55,7 +55,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
55
55
|
* depending on the key that was pressed.
|
|
56
56
|
*/
|
|
57
57
|
const handleKeyDown = e => {
|
|
58
|
-
onKeyDown
|
|
58
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
59
59
|
if (isExternallyDisabled) return;
|
|
60
60
|
if (e.key === 'ArrowUp') {
|
|
61
61
|
// Prevents browser's default increment
|
|
@@ -90,7 +90,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
90
90
|
* Selects the DOM element
|
|
91
91
|
*/
|
|
92
92
|
const handleFocus = e => {
|
|
93
|
-
onFocus
|
|
93
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
94
94
|
if (isExternallyDisabled) return;
|
|
95
95
|
e.target.select();
|
|
96
96
|
};
|
|
@@ -100,7 +100,7 @@ const NumberStepperInput = /*#__PURE__*/React__default.forwardRef((_ref, ref) =>
|
|
|
100
100
|
* Calls `handleInputBlur`
|
|
101
101
|
*/
|
|
102
102
|
const handleBlur = e => {
|
|
103
|
-
onBlur
|
|
103
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
104
104
|
if (isExternallyDisabled) return;
|
|
105
105
|
handleInputBlur(e);
|
|
106
106
|
};
|
|
@@ -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 = {"pageContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._IluYS{height:100vh;width:100vw;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto auto 1fr;grid-template-areas:\"pageHeader pageHeader pageHeader\" \"sidebarNav configPane mainContent\"}._rEEgu{grid-area:pageHeader}._vGxAT{grid-area:mainContent;height:100%;overflow:auto}";
|
|
4
|
+
var styles = {"pageContainer":"_IluYS","pageHeader":"_rEEgu","mainContent":"_vGxAT"};
|
|
5
|
+
var stylesheet="._IluYS{height:100vh;width:100vw;display:grid;grid-template-rows:auto 1fr;grid-template-columns:auto auto 1fr;grid-template-areas:\"pageHeader pageHeader pageHeader\" \"sidebarNav configPane mainContent\"}._rEEgu{grid-area:pageHeader}._vGxAT{grid-area:mainContent;height:100%;overflow:auto}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -58,7 +58,7 @@ const Pagination = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
58
58
|
* @param {Number} newPage - The value entered into the input
|
|
59
59
|
*/
|
|
60
60
|
const handlePageChange = useCallback(newPage => {
|
|
61
|
-
onPageChange
|
|
61
|
+
onPageChange === null || onPageChange === void 0 ? void 0 : onPageChange({
|
|
62
62
|
page: newPage
|
|
63
63
|
});
|
|
64
64
|
}, [onPageChange]);
|
|
@@ -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 = {"pagination":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._ZFLqw{display:flex;align-items:center;justify-content:center;font-size:14px;white-space:pre}._H-pNk{margin-right:8px}._ZOOVD{margin-left:8px}._Xtphj{margin:-10px -15px}._xbWQ3{width:100%;text-align:center}";
|
|
4
|
+
var styles = {"pagination":"_ZFLqw","previousButton":"_H-pNk","nextButton":"_ZOOVD","btnIcon":"_Xtphj","input":"_xbWQ3"};
|
|
5
|
+
var stylesheet="._ZFLqw{display:flex;align-items:center;justify-content:center;font-size:14px;white-space:pre}._H-pNk{margin-right:8px}._ZOOVD{margin-left:8px}._Xtphj{margin:-10px -15px}._xbWQ3{width:100%;text-align:center}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -43,19 +43,19 @@ const PaginationNextButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
43
43
|
*/
|
|
44
44
|
const increment = () => {
|
|
45
45
|
const newPage = pageInputValue + 1;
|
|
46
|
-
setPageInputValue
|
|
47
|
-
handlePageChange
|
|
46
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
47
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
48
48
|
};
|
|
49
49
|
return /*#__PURE__*/React__default.createElement(Button, _extends({}, rest, {
|
|
50
|
-
disabled: disabled
|
|
50
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : pageInputValue === numPages,
|
|
51
51
|
ref: ref,
|
|
52
52
|
kind: "tertiary",
|
|
53
53
|
onClick: e => {
|
|
54
|
-
onClick
|
|
54
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
55
55
|
increment();
|
|
56
56
|
},
|
|
57
57
|
className: classNames(className, styles.nextButton),
|
|
58
|
-
"data-testid": dataTestIdFromProps
|
|
58
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'NextButton'),
|
|
59
59
|
"aria-label": buttonLabel
|
|
60
60
|
}), /*#__PURE__*/React__default.createElement(ChevronRightIcon, {
|
|
61
61
|
className: styles.btnIcon,
|
|
@@ -47,7 +47,8 @@ const PaginationPageInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
47
47
|
* Computes the width of the input based on the number of characters entered
|
|
48
48
|
*/
|
|
49
49
|
const inputWidth = useMemo(() => {
|
|
50
|
-
|
|
50
|
+
var _currentPage$toString;
|
|
51
|
+
const numDigits = (_currentPage$toString = currentPage === null || currentPage === void 0 ? void 0 : currentPage.toString().length) !== null && _currentPage$toString !== void 0 ? _currentPage$toString : 0;
|
|
51
52
|
const minWidth = 36;
|
|
52
53
|
return numDigits > 2 ? 9 * (numDigits - 2) + minWidth : minWidth;
|
|
53
54
|
}, [currentPage]);
|
|
@@ -57,7 +58,7 @@ const PaginationPageInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
57
58
|
*/
|
|
58
59
|
const handleBlur = () => {
|
|
59
60
|
if (pageInputValue !== currentPage && currentPage !== undefined) {
|
|
60
|
-
setPageInputValue
|
|
61
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(currentPage);
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
|
|
@@ -68,11 +69,11 @@ const PaginationPageInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
68
69
|
*/
|
|
69
70
|
const handleInputChange = newValue => {
|
|
70
71
|
if (newValue === '' || !Number.isInteger(Number(newValue))) {
|
|
71
|
-
setPageInputValue
|
|
72
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newValue);
|
|
72
73
|
} else {
|
|
73
74
|
const newPage = Math.min(Math.max(1, newValue), numPages || Number.MAX_SAFE_INTEGER);
|
|
74
|
-
setPageInputValue
|
|
75
|
-
handlePageChange
|
|
75
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
76
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
76
77
|
}
|
|
77
78
|
};
|
|
78
79
|
|
|
@@ -80,7 +81,8 @@ const PaginationPageInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
80
81
|
* If there is a ref to the input, selects all text within the input
|
|
81
82
|
*/
|
|
82
83
|
const handleFocus = () => {
|
|
83
|
-
|
|
84
|
+
var _inputRef$current;
|
|
85
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.select();
|
|
84
86
|
};
|
|
85
87
|
return /*#__PURE__*/React__default.createElement(Translate, {
|
|
86
88
|
messageKey: "pagination",
|
|
@@ -98,15 +100,15 @@ const PaginationPageInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
98
100
|
max: numPages,
|
|
99
101
|
value: pageInputValue,
|
|
100
102
|
onChange: e => {
|
|
101
|
-
onChange
|
|
103
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(e);
|
|
102
104
|
handleInputChange(e.target.value);
|
|
103
105
|
},
|
|
104
106
|
onBlur: e => {
|
|
105
|
-
onBlur
|
|
107
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
|
|
106
108
|
handleBlur();
|
|
107
109
|
},
|
|
108
110
|
onFocus: e => {
|
|
109
|
-
onFocus
|
|
111
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
110
112
|
handleFocus();
|
|
111
113
|
},
|
|
112
114
|
style: {
|
|
@@ -42,19 +42,19 @@ const PaginationPreviousButton = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
42
42
|
*/
|
|
43
43
|
const decrement = () => {
|
|
44
44
|
const newPage = pageInputValue - 1;
|
|
45
|
-
setPageInputValue
|
|
46
|
-
handlePageChange
|
|
45
|
+
setPageInputValue === null || setPageInputValue === void 0 ? void 0 : setPageInputValue(newPage);
|
|
46
|
+
handlePageChange === null || handlePageChange === void 0 ? void 0 : handlePageChange(newPage);
|
|
47
47
|
};
|
|
48
48
|
return /*#__PURE__*/React__default.createElement(Button, _extends({}, rest, {
|
|
49
|
-
disabled: disabled
|
|
49
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : pageInputValue === 1,
|
|
50
50
|
ref: ref,
|
|
51
51
|
kind: "tertiary",
|
|
52
52
|
onClick: e => {
|
|
53
|
-
onClick
|
|
53
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
54
54
|
decrement();
|
|
55
55
|
},
|
|
56
56
|
className: classNames(className, styles.previousButton),
|
|
57
|
-
"data-testid": dataTestIdFromProps
|
|
57
|
+
"data-testid": dataTestIdFromProps !== null && dataTestIdFromProps !== void 0 ? dataTestIdFromProps : getSubDataTestId(dataTestId, 'PreviousButton'),
|
|
58
58
|
"aria-label": buttonLabel
|
|
59
59
|
}), /*#__PURE__*/React__default.createElement(ChevronLeftIcon, {
|
|
60
60
|
className: styles.btnIcon,
|
|
@@ -30,7 +30,7 @@ const Popover = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
30
30
|
const classes = classNames(styles.popover, className);
|
|
31
31
|
const anchorRef = useRef();
|
|
32
32
|
const popperRef = useRef(null);
|
|
33
|
-
const preventClickOutside = useClickOutsidePortals(e => show && onClickOutside
|
|
33
|
+
const preventClickOutside = useClickOutsidePortals(e => show && (onClickOutside === null || onClickOutside === void 0 ? void 0 : onClickOutside(e)));
|
|
34
34
|
const [isInDOM, setIsInDOM] = useState(false);
|
|
35
35
|
const popoverId = useId(externalId);
|
|
36
36
|
|
|
@@ -47,22 +47,23 @@ const Popover = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
47
47
|
* 2. A user in Safari clicks on 1 or more `Popover` anchor elements and then presses the `Escape` key. This is because buttons aren't focused on `click` or `mousedown` in Safari by default.
|
|
48
48
|
*/
|
|
49
49
|
if (!show && isInDOM) {
|
|
50
|
+
var _anchorRef$current;
|
|
50
51
|
// Prevents scroll so that the page does not scroll to the anchor element if the anchor element is out of view
|
|
51
|
-
anchorRef.current
|
|
52
|
+
(_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.focus({
|
|
52
53
|
preventScroll: true
|
|
53
54
|
});
|
|
54
55
|
}
|
|
55
56
|
setIsInDOM(show);
|
|
56
57
|
}, [show, isInDOM]);
|
|
57
58
|
const handlePopoverContainerClick = e => {
|
|
58
|
-
onClick
|
|
59
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
59
60
|
};
|
|
60
61
|
const handlePopoverContainerKeyDown = e => {
|
|
61
62
|
if (e.key === 'Escape') {
|
|
62
63
|
e.stopPropagation(); // prevent event from closing modals or popovers
|
|
63
|
-
onClose
|
|
64
|
+
onClose === null || onClose === void 0 ? void 0 : onClose(e);
|
|
64
65
|
}
|
|
65
|
-
onKeyDown
|
|
66
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
66
67
|
};
|
|
67
68
|
return /*#__PURE__*/React__default.createElement(Popper, {
|
|
68
69
|
open: show,
|
|
@@ -75,6 +76,7 @@ const Popover = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
75
76
|
'aria-expanded': show,
|
|
76
77
|
'aria-controls': show ? popoverId : undefined,
|
|
77
78
|
onMouseDown: e => {
|
|
79
|
+
var _children$props$onMou, _children$props;
|
|
78
80
|
/*
|
|
79
81
|
* Prevents the anchor element from getting focus (only in some browsers).
|
|
80
82
|
* If a Popover is open and out of view, and another button is clicked, this prevents the browser from scrolling to the open Popover.
|
|
@@ -82,9 +84,9 @@ const Popover = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
82
84
|
*/
|
|
83
85
|
e.preventDefault();
|
|
84
86
|
preventClickOutside();
|
|
85
|
-
children.props.onMouseDown
|
|
87
|
+
(_children$props$onMou = (_children$props = children.props).onMouseDown) === null || _children$props$onMou === void 0 ? void 0 : _children$props$onMou.call(_children$props, e);
|
|
86
88
|
},
|
|
87
|
-
ref: mergeRefs(anchorRef, children
|
|
89
|
+
ref: mergeRefs(anchorRef, children === null || children === void 0 ? void 0 : children.ref)
|
|
88
90
|
}),
|
|
89
91
|
popper: /*#__PURE__*/React__default.createElement("div", _extends({}, rest, {
|
|
90
92
|
ref: mergeRefs(ref, popperRef),
|
|
@@ -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 = {"popover":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._ti2on{position:absolute;z-index:1000;background-color:#fff;border-radius:4px;display:inline-block;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);border:1px solid #898989}._ti2on:focus{outline:none}._hIfkA,._hIfkA>div{position:absolute;width:8px;height:8px;background:inherit}._hIfkA{visibility:hidden;z-index:1000}._hIfkA>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._hIfkA{bottom:-4px}[data-popper-placement^=top]>._hIfkA>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._hIfkA{left:-5px}[data-popper-placement^=right]>._hIfkA>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._hIfkA{top:-5px}[data-popper-placement^=bottom]>._hIfkA>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._hIfkA{right:-4px}[data-popper-placement^=left]>._hIfkA>div{border-bottom-color:transparent;border-left-color:transparent}";
|
|
4
|
+
var styles = {"popover":"_ti2on","arrow":"_hIfkA"};
|
|
5
|
+
var stylesheet="._ti2on{position:absolute;z-index:1000;background-color:#fff;border-radius:4px;display:inline-block;box-shadow:0 3px 4px 0 rgba(0,0,0,.05),0 6px 10px 0 rgba(0,0,0,.05);border:1px solid #898989}._ti2on:focus{outline:none}._hIfkA,._hIfkA>div{position:absolute;width:8px;height:8px;background:inherit}._hIfkA{visibility:hidden;z-index:1000}._hIfkA>div{visibility:visible;border:1px solid #898989;transform:rotate(45deg)}[data-popper-placement^=top]>._hIfkA{bottom:-4px}[data-popper-placement^=top]>._hIfkA>div{border-top-color:transparent;border-left-color:transparent}[data-popper-placement^=right]>._hIfkA{left:-5px}[data-popper-placement^=right]>._hIfkA>div{border-top-color:transparent;border-right-color:transparent}[data-popper-placement^=bottom]>._hIfkA{top:-5px}[data-popper-placement^=bottom]>._hIfkA>div{border-bottom-color:transparent;border-right-color:transparent}[data-popper-placement^=left]>._hIfkA{right:-4px}[data-popper-placement^=left]>._hIfkA>div{border-bottom-color:transparent;border-left-color:transparent}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -12,6 +12,7 @@ import LoadingSpinner from '../LoadingSpinner/LoadingSpinner.js';
|
|
|
12
12
|
import MenuItem from '../NewMenu/parts/MenuItem.js';
|
|
13
13
|
|
|
14
14
|
const QuickSearch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
|
+
var _anchorRef$current;
|
|
15
16
|
let {
|
|
16
17
|
maxHeight: externalMaxHeight,
|
|
17
18
|
menuProps,
|
|
@@ -27,7 +28,7 @@ const QuickSearch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
27
28
|
const [items, setItems] = useState([]);
|
|
28
29
|
const maxHeight = items.length > 10 ? 500 : undefined;
|
|
29
30
|
const anchorRef = useRef(null);
|
|
30
|
-
const anchorWidth = anchorRef
|
|
31
|
+
const anchorWidth = anchorRef === null || anchorRef === void 0 || (_anchorRef$current = anchorRef.current) === null || _anchorRef$current === void 0 ? void 0 : _anchorRef$current.clientWidth;
|
|
31
32
|
const {
|
|
32
33
|
translate
|
|
33
34
|
} = useTranslation();
|
|
@@ -40,7 +41,7 @@ const QuickSearch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
40
41
|
portalTarget: portalTarget,
|
|
41
42
|
zIndex: zIndex,
|
|
42
43
|
anchor: /*#__PURE__*/React__default.createElement(QuickSearchInput, _extends({}, rest, {
|
|
43
|
-
role: role
|
|
44
|
+
role: role !== null && role !== void 0 ? role : 'searchbox',
|
|
44
45
|
ref: mergeRefs(ref, anchorRef),
|
|
45
46
|
setIsLoading: setIsLoading,
|
|
46
47
|
items: items,
|
|
@@ -57,7 +58,7 @@ const QuickSearch = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
57
58
|
return /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
58
59
|
key: index,
|
|
59
60
|
value: value,
|
|
60
|
-
onSelect: () => onSelect
|
|
61
|
+
onSelect: () => onSelect === null || onSelect === void 0 ? void 0 : onSelect(item)
|
|
61
62
|
}, label);
|
|
62
63
|
}));
|
|
63
64
|
});
|
|
@@ -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 = {"loadingSpinner":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._zL-re{display:flex;height:32px}";
|
|
4
|
+
var styles = {"loadingSpinner":"_zL-re"};
|
|
5
|
+
var stylesheet="._zL-re{display:flex;height:32px}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -44,11 +44,11 @@ const QuickSearchInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
44
44
|
if (!open) {
|
|
45
45
|
setIsLoading(true);
|
|
46
46
|
}
|
|
47
|
-
setIsOpen
|
|
47
|
+
setIsOpen === null || setIsOpen === void 0 ? void 0 : setIsOpen(true);
|
|
48
48
|
};
|
|
49
49
|
const closeMenu = useCallback(() => {
|
|
50
50
|
setItems([]);
|
|
51
|
-
internalCloseMenu
|
|
51
|
+
internalCloseMenu === null || internalCloseMenu === void 0 ? void 0 : internalCloseMenu();
|
|
52
52
|
setIsLoading(true);
|
|
53
53
|
}, [setItems, internalCloseMenu, setIsLoading]);
|
|
54
54
|
const onSearchRef = useLatest(onSearch);
|
|
@@ -78,14 +78,14 @@ const QuickSearchInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
78
78
|
if (e.key === 'Enter' || e.key === 'ArrowDown') {
|
|
79
79
|
e.preventDefault(); // prevent scroll
|
|
80
80
|
openMenu();
|
|
81
|
-
setHighlightedIndex
|
|
81
|
+
setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(0);
|
|
82
82
|
if (!open) {
|
|
83
83
|
handleSearch(value);
|
|
84
84
|
}
|
|
85
85
|
} else if (e.key === 'ArrowUp') {
|
|
86
86
|
e.preventDefault(); // prevent scroll
|
|
87
87
|
openMenu();
|
|
88
|
-
setHighlightedIndex
|
|
88
|
+
setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(items.length - 1);
|
|
89
89
|
if (!open) {
|
|
90
90
|
handleSearch(value);
|
|
91
91
|
}
|
|
@@ -8,6 +8,7 @@ import '../../utils/index.js';
|
|
|
8
8
|
import concatIds from '../../utils/concatIds/concatIds.js';
|
|
9
9
|
|
|
10
10
|
const Radio = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
11
|
+
var _ref2;
|
|
11
12
|
let {
|
|
12
13
|
id,
|
|
13
14
|
className,
|
|
@@ -32,25 +33,25 @@ const Radio = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
32
33
|
helperTextId: formFieldHelperTextId,
|
|
33
34
|
errorTextId: formFieldErrorTextId
|
|
34
35
|
} = useFormFieldContext();
|
|
35
|
-
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps
|
|
36
|
-
const checked = groupValue !== undefined ? value === groupValue : radioChecked
|
|
37
|
-
const defaultChecked = groupDefaultValue !== undefined ? value === groupDefaultValue : radioDefaultChecked
|
|
38
|
-
const onChange = radioGroupOnChange
|
|
36
|
+
const internalAriaDescribedby = concatIds(externalAriaDescribedBy, formFieldHelperTextId, formFieldErrorTextId, inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-describedby']);
|
|
37
|
+
const checked = groupValue !== undefined ? value === groupValue : radioChecked !== null && radioChecked !== void 0 ? radioChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.checked;
|
|
38
|
+
const defaultChecked = groupDefaultValue !== undefined ? value === groupDefaultValue : radioDefaultChecked !== null && radioDefaultChecked !== void 0 ? radioDefaultChecked : inputProps === null || inputProps === void 0 ? void 0 : inputProps.defaultChecked;
|
|
39
|
+
const onChange = (_ref2 = radioGroupOnChange !== null && radioGroupOnChange !== void 0 ? radioGroupOnChange : radioOnChange) !== null && _ref2 !== void 0 ? _ref2 : inputProps === null || inputProps === void 0 ? void 0 : inputProps.onChange;
|
|
39
40
|
return /*#__PURE__*/React__default.createElement("span", _extends({}, rest, {
|
|
40
41
|
ref: ref,
|
|
41
42
|
className: classNames(className, styles.radio)
|
|
42
43
|
}), /*#__PURE__*/React__default.createElement("input", _extends({}, inputProps, {
|
|
43
|
-
className: classNames(styles.input, inputProps
|
|
44
|
+
className: classNames(styles.input, inputProps === null || inputProps === void 0 ? void 0 : inputProps.className),
|
|
44
45
|
type: "radio",
|
|
45
|
-
id: id
|
|
46
|
+
id: id !== null && id !== void 0 ? id : inputProps === null || inputProps === void 0 ? void 0 : inputProps.id,
|
|
46
47
|
checked: checked,
|
|
47
48
|
defaultChecked: defaultChecked,
|
|
48
|
-
disabled: disabled
|
|
49
|
-
name: name
|
|
50
|
-
value: value
|
|
49
|
+
disabled: disabled !== null && disabled !== void 0 ? disabled : inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled,
|
|
50
|
+
name: name !== null && name !== void 0 ? name : inputProps === null || inputProps === void 0 ? void 0 : inputProps.name,
|
|
51
|
+
value: value !== null && value !== void 0 ? value : inputProps === null || inputProps === void 0 ? void 0 : inputProps.value,
|
|
51
52
|
onChange: disabled ? undefined : onChange,
|
|
52
|
-
"aria-label": ariaLabel
|
|
53
|
-
"aria-labelledby": ariaLabelledBy
|
|
53
|
+
"aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-label'],
|
|
54
|
+
"aria-labelledby": ariaLabelledBy !== null && ariaLabelledBy !== void 0 ? ariaLabelledBy : inputProps === null || inputProps === void 0 ? void 0 : inputProps['aria-labelledby'],
|
|
54
55
|
"aria-describedby": internalAriaDescribedby
|
|
55
56
|
})), /*#__PURE__*/React__default.createElement("span", {
|
|
56
57
|
className: styles.check
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"radio":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._nAppc{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._nAppc,._ZJD1h{cursor:pointer;height:16px;width:16px}._ZJD1h{position:absolute;opacity:0;z-index:10}._ZJD1h:checked~._f90ej>._p16VW{fill-opacity:1}._ZJD1h:checked:enabled~._f90ej{border-color:transparent;background-color:#0b6ed0}._ZJD1h:checked:enabled~._f90ej>._p16VW{fill:#fff}._ZJD1h:checked:enabled:hover~._f90ej{background-color:#085caf}._ZJD1h:not(:checked):enabled:hover~._f90ej{border-color:#0b6ed0}._ZJD1h:disabled{cursor:not-allowed}._ZJD1h:disabled~._f90ej{opacity:.4}._ZJD1h:checked~._f90ej:after{content:\"\"}._E6tZo{color:#32363a;display:flex;align-items:center;cursor:pointer}._PWMen{cursor:auto;color:hsla(0,0%,53.7%,.4)}._l1MPV{margin-right:12px;flex-shrink:0}._f90ej{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0;border-radius:50%;background-color:transparent!important;border-color:#898989!important}._p16VW{fill:#0b6ed0;fill-opacity:0}._f90ej:after{position:absolute;z-index:0;background-color:#0b6ed0;border-radius:50%;height:10px;width:10px;top:2px;left:2px}._WHodw{border:none;padding:0;margin:0}._bgbJ7{padding:0;margin:0 0 14px;color:#01213f}._ZJD1h.focus-visible~._f90ej,._ZJD1h:focus-visible~._f90ej{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"radio":"_nAppc","input":"_ZJD1h","check":"_f90ej","checkIcon":"_p16VW","label":"_E6tZo","labelDisabled":"_PWMen","wrappedInput":"_l1MPV","radioGroup":"_WHodw","legend":"_bgbJ7"};
|
|
5
|
+
var stylesheet="._nAppc{display:inline-flex;position:relative;margin-top:6px;margin-bottom:6px}._nAppc,._ZJD1h{cursor:pointer;height:16px;width:16px}._ZJD1h{position:absolute;opacity:0;z-index:10}._ZJD1h:checked~._f90ej>._p16VW{fill-opacity:1}._ZJD1h:checked:enabled~._f90ej{border-color:transparent;background-color:#0b6ed0}._ZJD1h:checked:enabled~._f90ej>._p16VW{fill:#fff}._ZJD1h:checked:enabled:hover~._f90ej{background-color:#085caf}._ZJD1h:not(:checked):enabled:hover~._f90ej{border-color:#0b6ed0}._ZJD1h:disabled{cursor:not-allowed}._ZJD1h:disabled~._f90ej{opacity:.4}._ZJD1h:checked~._f90ej:after{content:\"\"}._E6tZo{color:#32363a;display:flex;align-items:center;cursor:pointer}._PWMen{cursor:auto;color:hsla(0,0%,53.7%,.4)}._l1MPV{margin-right:12px;flex-shrink:0}._f90ej{display:flex;align-items:center;justify-content:center;position:absolute;top:0;left:0;height:16px;width:16px;background-color:#fff;border-radius:4px;border:1px solid #898989;z-index:0;border-radius:50%;background-color:transparent!important;border-color:#898989!important}._p16VW{fill:#0b6ed0;fill-opacity:0}._f90ej:after{position:absolute;z-index:0;background-color:#0b6ed0;border-radius:50%;height:10px;width:10px;top:2px;left:2px}._WHodw{border:none;padding:0;margin:0}._bgbJ7{padding:0;margin:0 0 14px;color:#01213f}._ZJD1h.focus-visible~._f90ej,._ZJD1h:focus-visible~._f90ej{border-color:#0b6ed0;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
6
|
styleInject(css_248z);
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -44,7 +44,8 @@ const SearchInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
44
44
|
// Focuses the input after the input value is cleared so that screen readers see that the input doesn't have a value
|
|
45
45
|
useEffect(() => {
|
|
46
46
|
if (wasInputValueCleared) {
|
|
47
|
-
|
|
47
|
+
var _inputRef$current;
|
|
48
|
+
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();
|
|
48
49
|
setWasInputValueCleared(false);
|
|
49
50
|
}
|
|
50
51
|
}, [wasInputValueCleared]);
|
|
@@ -63,7 +64,7 @@ const SearchInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
63
64
|
|
|
64
65
|
clearInputText();
|
|
65
66
|
}
|
|
66
|
-
onKeyDown
|
|
67
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
67
68
|
};
|
|
68
69
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
69
70
|
className: classNames(styles.searchInput, className),
|
|
@@ -72,7 +73,7 @@ const SearchInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
72
73
|
role: "searchbox",
|
|
73
74
|
id: id,
|
|
74
75
|
className: styles.searchInputInput,
|
|
75
|
-
placeholder: placeholder
|
|
76
|
+
placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : translate('searchText'),
|
|
76
77
|
value: inputValue,
|
|
77
78
|
onChange: handleInputChange,
|
|
78
79
|
onKeyDown: handleInputKeyDown,
|