@qualtrics/ui-react 2.75.0 → 2.77.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 +18 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +54 -0
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +28 -0
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +605 -0
- package/dist/__node_modules/@radix-ui/react-compose-refs/dist/index.js +45 -0
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +108 -0
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +21 -0
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +223 -0
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +350 -0
- package/dist/__node_modules/@radix-ui/react-focus-guards/dist/index.js +35 -0
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +248 -0
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +15 -0
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +911 -0
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +325 -0
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +25 -0
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +141 -0
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +34 -0
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +216 -0
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +127 -0
- package/dist/__node_modules/@radix-ui/react-use-callback-ref/dist/index.js +18 -0
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +141 -0
- package/dist/__node_modules/@radix-ui/react-use-effect-event/dist/index.js +32 -0
- package/dist/__node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +23 -0
- package/dist/__node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +48 -0
- package/dist/__node_modules/aria-hidden/dist/es2015/index.js +169 -0
- package/dist/__node_modules/detect-node-es/esm/node.js +4 -0
- package/dist/__node_modules/get-nonce/dist/es2015/index.js +15 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/SideEffect.js +169 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/handleScroll.js +110 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/index.js +1 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/__node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/component.js +57 -0
- package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
- package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/index.js +3 -0
- package/dist/__node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
- package/dist/__node_modules/react-style-singleton/dist/es2015/component.js +19 -0
- package/dist/__node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
- package/dist/__node_modules/react-style-singleton/dist/es2015/index.js +3 -0
- package/dist/__node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
- package/dist/__node_modules/tslib/tslib.es6.js +403 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/createRef.js +25 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/index.js +8 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/mergeRef.js +21 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/refToCallback.js +50 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/transformRef.js +17 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
- package/dist/__node_modules/use-callback-ref/dist/es2015/useTransformRef.js +21 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/config.js +8 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/env.js +8 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/exports.js +21 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/hoc.js +18 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/hook.js +44 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/index.js +6 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/medium.js +81 -0
- package/dist/__node_modules/use-sidecar/dist/es2015/renderProp.js +38 -0
- package/dist/__shared/cjs/{index-98bc748b.js → index-58d973dc.js} +3 -3
- package/dist/__shared/cjs/{index-9f6415a6.js → index-fd8ffec5.js} +409 -372
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +3 -2
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup.js +3 -2
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker.js +7 -8
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox.js +9 -8
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxList.js +5 -6
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +10 -9
- package/dist/components/Dropdown/DropdownList.js +6 -7
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input2.js +3 -3
- 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/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionSet.js +2 -2
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal.js +4 -2
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/BaseMenu.js +31 -25
- package/dist/components/NewMenu/Menu/Menu.js +1 -0
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +3 -1
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +10 -4
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Popover/Popover.js +8 -14
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/TabList.js +3 -2
- package/dist/components/Tabs/TabPanels.js +2 -1
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +6 -12
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +5 -6
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/usePrevious/usePrevious.js +1 -1
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +2 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/index.js +1 -1
- package/dist/index.d.ts +18 -17
- package/dist/index.es.js +1 -1
- package/dist/index.js +4 -5
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxFlyout.js +6 -6
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +1 -1
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +1 -1
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/usePaneSearch.js +1 -1
- package/dist/next/Menu/Menu.js +5 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +1 -1
- package/dist/next/Menu/MenuItem.js +2 -2
- package/dist/next/Menu/MenuPane.js +14 -7
- package/dist/next/Menu/SubMenu.js +8 -6
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +90 -41
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +4 -2
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimeDropdown.js +5 -6
- package/dist/next/TimePicker/TimeInput.js +104 -37
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/index.d.ts +19 -13
- package/dist/next/index.js +5617 -330
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +2 -1
- package/dist/utils/Popper/Popper.js +149 -115
- package/dist/utils/Portal/Portal.js +3 -2
- package/dist/utils/Text/Text.js +3 -2
- package/dist/utils/filterChildren/filterChildren.js +3 -2
- package/dist/utils/index.js +1 -0
- package/icons/package.json +3 -4
- package/next/package.json +4 -5
- package/package.json +15 -16
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React__default, { forwardRef, useState,
|
|
1
|
+
import React__default, { forwardRef, useState, useRef, useCallback, useMemo, useEffect } from 'react';
|
|
2
2
|
import { Metadata, getCountryCallingCode, parsePhoneNumber, getCountries, isSupportedCountry } from 'libphonenumber-js';
|
|
3
|
-
import
|
|
3
|
+
import { IMask, useIMask } from 'react-imask';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import '../../components/NewMenu/index.js';
|
|
6
6
|
import '../Input/index.js';
|
|
@@ -10,7 +10,9 @@ import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
|
10
10
|
import SelectMenu from '../../components/NewMenu/SelectMenu/SelectMenu.js';
|
|
11
11
|
import MenuItem from '../../components/NewMenu/parts/MenuItem.js';
|
|
12
12
|
import Input from '../Input/Input.js';
|
|
13
|
+
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
13
14
|
|
|
15
|
+
const removeNonNumericCharacters = value => (value === null || value === void 0 ? void 0 : value.replace(/\D/g, '')) || '';
|
|
14
16
|
const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
15
17
|
let {
|
|
16
18
|
initialCountryCode = 'US',
|
|
@@ -27,7 +29,8 @@ const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
27
29
|
inputId
|
|
28
30
|
} = _ref;
|
|
29
31
|
const [countryCode, setCountryCode] = useState(initialCountryCode);
|
|
30
|
-
const
|
|
32
|
+
const unmaskedValueOnCountryChangeRef = useRef(null);
|
|
33
|
+
|
|
31
34
|
// As of the day of writing the longest number format is 15 numbers long. This is 5 places longer to be safe.
|
|
32
35
|
const genericMaxNumberLength = 20;
|
|
33
36
|
const {
|
|
@@ -41,35 +44,88 @@ const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
41
44
|
return possibleLengths ? [Math.min(...possibleLengths), Math.max(...possibleLengths)] : [0, genericMaxNumberLength];
|
|
42
45
|
}, [countryCode]);
|
|
43
46
|
const shouldUseMask = Number(getCountryCallingCode(countryCode)) === 1;
|
|
44
|
-
const
|
|
47
|
+
const maskPattern = useMemo(() => {
|
|
45
48
|
if (shouldUseMask) {
|
|
46
|
-
|
|
47
|
-
} else {
|
|
48
|
-
setMask('9'.repeat(limitToValidLength ? getMinMaxLength()[1] : genericMaxNumberLength));
|
|
49
|
+
return '(000) 000-0000';
|
|
49
50
|
}
|
|
51
|
+
return '0'.repeat(limitToValidLength ? getMinMaxLength()[1] : genericMaxNumberLength);
|
|
50
52
|
}, [shouldUseMask, getMinMaxLength, limitToValidLength]);
|
|
53
|
+
|
|
54
|
+
/** Placeholder pattern shown when empty (imask 7.6+ may not show it until focus without this). */
|
|
55
|
+
const emptyDisplayValue = shouldUseMask ? '(___) ___-____' : '';
|
|
56
|
+
const initialNumeric = initialValue ? removeNonNumericCharacters(initialValue) : '';
|
|
57
|
+
const maskedInitialValue = useMemo(() => {
|
|
58
|
+
if (!shouldUseMask || !initialNumeric) return undefined;
|
|
59
|
+
return IMask.pipe(initialNumeric, {
|
|
60
|
+
mask: maskPattern
|
|
61
|
+
});
|
|
62
|
+
}, [shouldUseMask, initialNumeric, maskPattern]);
|
|
63
|
+
const {
|
|
64
|
+
ref: imaskRef,
|
|
65
|
+
maskRef
|
|
66
|
+
} = useIMask({
|
|
67
|
+
mask: maskPattern,
|
|
68
|
+
lazy: !shouldUseMask,
|
|
69
|
+
placeholderChar: shouldUseMask ? '_' : ''
|
|
70
|
+
}, {
|
|
71
|
+
defaultUnmaskedValue: initialNumeric || undefined,
|
|
72
|
+
defaultValue: shouldUseMask && !initialNumeric ? emptyDisplayValue : undefined,
|
|
73
|
+
onAccept: !isDisabled ? () => {
|
|
74
|
+
var _maskRef$current$unma, _maskRef$current;
|
|
75
|
+
const unmaskedValue = (_maskRef$current$unma = (_maskRef$current = maskRef.current) === null || _maskRef$current === void 0 ? void 0 : _maskRef$current.unmaskedValue) !== null && _maskRef$current$unma !== void 0 ? _maskRef$current$unma : '';
|
|
76
|
+
if (!unmaskedValue) {
|
|
77
|
+
onChange === null || onChange === void 0 || onChange(null, false, countryCode, '');
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
let internationalNumber = null;
|
|
81
|
+
let isValidLength = false;
|
|
82
|
+
try {
|
|
83
|
+
const phoneNumber = parsePhoneNumber(unmaskedValue, countryCode);
|
|
84
|
+
internationalNumber = phoneNumber.number;
|
|
85
|
+
isValidLength = phoneNumber.isPossible();
|
|
86
|
+
} catch (_) {
|
|
87
|
+
// `parsePhoneNumber` throws an error if the inputs are invalid.
|
|
88
|
+
}
|
|
89
|
+
onChange === null || onChange === void 0 || onChange(internationalNumber, isValidLength, countryCode, unmaskedValue);
|
|
90
|
+
} : undefined
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// Sync initialValue to mask when prop is set/updated (mask may not exist on first run)
|
|
51
94
|
useEffect(() => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
95
|
+
if (!maskRef.current || !initialNumeric) return;
|
|
96
|
+
maskRef.current.unmaskedValue = initialNumeric;
|
|
97
|
+
maskRef.current.updateValue();
|
|
98
|
+
}, [initialNumeric, maskRef]);
|
|
99
|
+
|
|
100
|
+
// When empty and using mask, ensure placeholder is visible on mount (imask 7.6+)
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!shouldUseMask || initialNumeric) return undefined;
|
|
103
|
+
const id = requestAnimationFrame(() => {
|
|
104
|
+
if (!maskRef.current) return;
|
|
105
|
+
if (maskRef.current.unmaskedValue) return;
|
|
106
|
+
maskRef.current.value = emptyDisplayValue;
|
|
107
|
+
maskRef.current.updateValue();
|
|
108
|
+
});
|
|
109
|
+
return () => cancelAnimationFrame(id);
|
|
110
|
+
}, [shouldUseMask, initialNumeric, emptyDisplayValue, maskRef]);
|
|
111
|
+
|
|
112
|
+
// Preserve unmasked digits when country code changes (mask pattern changes)
|
|
113
|
+
useEffect(() => {
|
|
114
|
+
const pending = unmaskedValueOnCountryChangeRef.current;
|
|
115
|
+
if (pending == null || !maskRef.current) return;
|
|
116
|
+
unmaskedValueOnCountryChangeRef.current = null;
|
|
117
|
+
maskRef.current.unmaskedValue = pending;
|
|
118
|
+
maskRef.current.updateValue();
|
|
119
|
+
}, [countryCode, maskRef]);
|
|
120
|
+
const handleCountryChange = useCallback(value => {
|
|
121
|
+
var _maskRef$current$unma2, _maskRef$current2;
|
|
122
|
+
const unmasked = (_maskRef$current$unma2 = (_maskRef$current2 = maskRef.current) === null || _maskRef$current2 === void 0 || (_maskRef$current2 = _maskRef$current2.unmaskedValue) === null || _maskRef$current2 === void 0 ? void 0 : _maskRef$current2.replace(/\D/g, '')) !== null && _maskRef$current$unma2 !== void 0 ? _maskRef$current$unma2 : '';
|
|
123
|
+
if (unmasked) {
|
|
124
|
+
unmaskedValueOnCountryChangeRef.current = unmasked;
|
|
70
125
|
}
|
|
71
|
-
|
|
72
|
-
|
|
126
|
+
const code = Array.isArray(value) ? value[0] : value;
|
|
127
|
+
setCountryCode(code);
|
|
128
|
+
}, [maskRef]);
|
|
73
129
|
const inputClassNames = classNames(styles.input, {
|
|
74
130
|
[styles.disabled]: isDisabled
|
|
75
131
|
});
|
|
@@ -82,7 +138,7 @@ const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
82
138
|
}, dropdownLabel), /*#__PURE__*/React__default.createElement(SelectMenu, {
|
|
83
139
|
label: " ",
|
|
84
140
|
defaultValue: countryCode,
|
|
85
|
-
onChange:
|
|
141
|
+
onChange: handleCountryChange,
|
|
86
142
|
className: classNames(styles.dropdown, {
|
|
87
143
|
[styles.disabled]: isDisabled
|
|
88
144
|
}),
|
|
@@ -98,25 +154,18 @@ const PhoneNumberInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
98
154
|
key: individualCountryCode,
|
|
99
155
|
value: individualCountryCode
|
|
100
156
|
}, "".concat(translate(individualCountryCode), " +").concat(getCountryCallingCode(individualCountryCode)));
|
|
101
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// hide formatting if not using mask
|
|
106
|
-
,
|
|
107
|
-
maskChar: shouldUseMask ? '_' : '',
|
|
108
|
-
mask: mask,
|
|
109
|
-
onChange: !isDisabled ? handleInputChange : undefined
|
|
110
|
-
}, () => /*#__PURE__*/React__default.createElement(Input, {
|
|
111
|
-
ref: ref,
|
|
157
|
+
})), /*#__PURE__*/React__default.createElement(Input, {
|
|
158
|
+
ref: mergeRefs(ref, imaskRef),
|
|
159
|
+
defaultValue: shouldUseMask && !initialNumeric ? emptyDisplayValue : undefined,
|
|
160
|
+
placeholder: shouldUseMask ? maskedInitialValue !== null && maskedInitialValue !== void 0 ? maskedInitialValue : emptyDisplayValue : undefined,
|
|
112
161
|
id: inputId,
|
|
113
162
|
className: inputClassNames,
|
|
114
163
|
type: "tel",
|
|
115
164
|
autoComplete: "tel-national",
|
|
116
165
|
"aria-label": inputAriaLabel,
|
|
117
166
|
"aria-labelledby": inputAriaLabelledBy,
|
|
118
|
-
|
|
119
|
-
}))
|
|
167
|
+
readOnly: isDisabled
|
|
168
|
+
}));
|
|
120
169
|
});
|
|
121
170
|
PhoneNumberInput.displayName = 'PhoneNumberInput';
|
|
122
171
|
|
|
@@ -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 = {"input":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._BFP4- input{padding-left:76px!important}._YhjEn input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._YhjEn input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._YhjEn input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._kFxil{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._kFxil,._kFxil._YhjEn:hover{background-color:transparent!important}._kFxil:hover{background-color:rgba(50,54,58,.08)!important}._kFxil:active{background-color:rgba(50,54,58,.11)!important}._kFxil svg{top:2px!important}._-J-xr{position:relative}._zP1RM{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
4
|
+
var styles = {"input":"_BFP4-","disabled":"_YhjEn","dropdown":"_kFxil","container":"_-J-xr","countryCode":"_zP1RM"};
|
|
5
|
+
var stylesheet="._BFP4- input{padding-left:76px!important}._YhjEn input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._YhjEn input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._YhjEn input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._kFxil{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._kFxil,._kFxil._YhjEn:hover{background-color:transparent!important}._kFxil:hover{background-color:rgba(50,54,58,.08)!important}._kFxil:active{background-color:rgba(50,54,58,.11)!important}._kFxil svg{top:2px!important}._-J-xr{position:relative}._zP1RM{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -44,7 +44,8 @@ const Select = _ref => {
|
|
|
44
44
|
value,
|
|
45
45
|
isInvalid,
|
|
46
46
|
'data-testid': dataTestId,
|
|
47
|
-
isVirtualizationDisabled
|
|
47
|
+
isVirtualizationDisabled,
|
|
48
|
+
elementRefToFocusOnClose
|
|
48
49
|
} = _ref;
|
|
49
50
|
const [selectedValues, setSelectedValues] = useControllableState(value, onChange, value);
|
|
50
51
|
const selectPaneChildren = useMemo(() => {
|
|
@@ -99,7 +100,8 @@ const Select = _ref => {
|
|
|
99
100
|
isOpen,
|
|
100
101
|
onIsOpenChange,
|
|
101
102
|
'data-testid': dataTestId,
|
|
102
|
-
isVirtualizationDisabled
|
|
103
|
+
isVirtualizationDisabled,
|
|
104
|
+
elementRefToFocusOnClose
|
|
103
105
|
};
|
|
104
106
|
return /*#__PURE__*/React__default.createElement(SelectContextProvider, {
|
|
105
107
|
value: {
|
|
@@ -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 = {"isInvalid":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._0I6MN{box-shadow:inset 0 0 0 1px #b00!important}._MF1lO{margin-right:7px}._vDUSR{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
4
|
+
var styles = {"isInvalid":"_0I6MN","checkbox":"_MF1lO","selectedItem":"_vDUSR"};
|
|
5
|
+
var stylesheet="._0I6MN{box-shadow:inset 0 0 0 1px #b00!important}._MF1lO{margin-right:7px}._vDUSR{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = {"container":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._Y2NCJ{display:flex}._jNGMC{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._jNGMC._OwfXY{background-color:#fff}._jNGMC._OwfXY._-Ic0P:not(._jNGMC._OwfXY._sWj7m),._jNGMC._OwfXY._n5cWn.focus-visible:not(._Uc1e8),._jNGMC._OwfXY._n5cWn:focus-visible:not(._Uc1e8),._jNGMC._vm8ty{background-color:#0b6ed0}._jNGMC._vm8ty._sWj7m._-Ic0P,._jNGMC._vm8ty._Uc1e8._n5cWn,._jNGMC._vm8ty._Uc1e8._sWj7m{opacity:.4}._T1Vjy{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._T1Vjy:focus{z-index:1}._zwuln{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._zwuln svg{margin-left:1px}._zwuln._OwfXY{background-color:#0b6ed0;border-color:transparent}._zwuln._OwfXY svg{fill:#fff!important}._zwuln._OwfXY:not(._L9Bou):hover{background-color:#085caf!important}._zwuln._OwfXY:not(._L9Bou):active{background-color:#0854a1!important}._zwuln._OwfXY._L9Bou{opacity:.4}._zwuln._OwfXY._L9Bou svg{background-color:transparent}._zwuln._vm8ty{border-color:#0b6ed0;background-color:#fff}._zwuln._vm8ty svg{fill:#0b6ed0!important}._zwuln._vm8ty:not(._L9Bou):hover{background-color:#eef5fc!important}._zwuln._vm8ty:not(._L9Bou):active{background-color:#e1edf9!important}._zwuln._vm8ty._L9Bou{opacity:.4}._zwuln._vm8ty._L9Bou svg{background-color:transparent}._Gs-9F{width:260px}";
|
|
4
|
+
var styles = {"container":"_Y2NCJ","divider":"_jNGMC","primary":"_OwfXY","mainButtonFocus":"_n5cWn","mainButtonDisabled":"_Uc1e8","dropdownButtonFocus":"_-Ic0P","dropdownButtonDisabled":"_sWj7m","secondary":"_vm8ty","mainButton":"_T1Vjy","dropdownButton":"_zwuln","disabled":"_L9Bou","dropdownOption":"_Gs-9F"};
|
|
5
|
+
var stylesheet="._Y2NCJ{display:flex}._jNGMC{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._jNGMC._OwfXY{background-color:#fff}._jNGMC._OwfXY._-Ic0P:not(._jNGMC._OwfXY._sWj7m),._jNGMC._OwfXY._n5cWn.focus-visible:not(._Uc1e8),._jNGMC._OwfXY._n5cWn:focus-visible:not(._Uc1e8),._jNGMC._vm8ty{background-color:#0b6ed0}._jNGMC._vm8ty._sWj7m._-Ic0P,._jNGMC._vm8ty._Uc1e8._n5cWn,._jNGMC._vm8ty._Uc1e8._sWj7m{opacity:.4}._T1Vjy{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._T1Vjy:focus{z-index:1}._zwuln{border-radius:0 4px 4px 0;transition:border .2s,background .2s,color .2s;border-left:none;min-width:35px!important;padding:0!important;justify-content:center!important}._zwuln svg{margin-left:1px}._zwuln._OwfXY{background-color:#0b6ed0;border-color:transparent}._zwuln._OwfXY svg{fill:#fff!important}._zwuln._OwfXY:not(._L9Bou):hover{background-color:#085caf!important}._zwuln._OwfXY:not(._L9Bou):active{background-color:#0854a1!important}._zwuln._OwfXY._L9Bou{opacity:.4}._zwuln._OwfXY._L9Bou svg{background-color:transparent}._zwuln._vm8ty{border-color:#0b6ed0;background-color:#fff}._zwuln._vm8ty svg{fill:#0b6ed0!important}._zwuln._vm8ty:not(._L9Bou):hover{background-color:#eef5fc!important}._zwuln._vm8ty:not(._L9Bou):active{background-color:#e1edf9!important}._zwuln._vm8ty._L9Bou{opacity:.4}._zwuln._vm8ty._L9Bou svg{background-color:transparent}._Gs-9F{width:260px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -5,6 +5,7 @@ import styles from './TimePicker2.js';
|
|
|
5
5
|
import Popper from '../../utils/Popper/Popper.js';
|
|
6
6
|
import { Flyout } from '../../utils/Flyout/Flyout.js';
|
|
7
7
|
import { FlyoutOption } from '../../utils/Flyout/FlyoutOption.js';
|
|
8
|
+
import { offset } from '@floating-ui/react-dom';
|
|
8
9
|
|
|
9
10
|
const TimeDropdown = _ref => {
|
|
10
11
|
let {
|
|
@@ -71,12 +72,10 @@ const TimeDropdown = _ref => {
|
|
|
71
72
|
})
|
|
72
73
|
}, item.label))),
|
|
73
74
|
anchorNode: inputRef.current,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
}]
|
|
75
|
+
middleware: [offset({
|
|
76
|
+
crossAxis: 0,
|
|
77
|
+
mainAxis: 5
|
|
78
|
+
})]
|
|
80
79
|
});
|
|
81
80
|
};
|
|
82
81
|
TimeDropdown.displayName = 'TimeDropdown';
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import React__default, { forwardRef } from 'react';
|
|
2
|
-
import
|
|
1
|
+
import React__default, { forwardRef, useRef, useMemo, useCallback, useEffect } from 'react';
|
|
2
|
+
import { IMask, useIMask } from 'react-imask';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import '../Input/index.js';
|
|
5
5
|
import styles from './TimePicker2.js';
|
|
6
6
|
import { correctTime } from './utils.js';
|
|
7
|
+
import '../../utils/index.js';
|
|
7
8
|
import Input from '../Input/Input.js';
|
|
9
|
+
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
8
10
|
|
|
9
11
|
const TimeInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
10
12
|
let {
|
|
@@ -27,60 +29,125 @@ const TimeInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
27
29
|
ariaDescribedBy,
|
|
28
30
|
isOptionHovered
|
|
29
31
|
} = _ref;
|
|
30
|
-
const mask24 = '
|
|
31
|
-
const mask12 = '
|
|
32
|
+
const mask24 = '00:00';
|
|
33
|
+
const mask12 = '00:00 `am';
|
|
32
34
|
const mask = is24HourClock ? mask24 : mask12;
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
newSelection.start = shouldMoveSelectionToEnd ? validTimeLength : newSelection.start;
|
|
54
|
-
newSelection.end = shouldMoveSelectionToEnd ? validTimeLength : newSelection.end;
|
|
55
|
-
newSelection.start = Math.min(newSelection.start + selectionModifier, validTimeLength);
|
|
56
|
-
newSelection.end = Math.min(newSelection.end + selectionModifier, validTimeLength);
|
|
35
|
+
const inputRef = useRef(null);
|
|
36
|
+
const lastProgrammaticValue = useRef('');
|
|
37
|
+
|
|
38
|
+
/** Placeholder pattern shown when empty (imask 7.6+ may not show it until focus without this). */
|
|
39
|
+
const emptyDisplayValue = mask;
|
|
40
|
+
const maskedUserInput = useMemo(() => {
|
|
41
|
+
if (!userInput) return undefined;
|
|
42
|
+
return IMask.pipe(userInput, {
|
|
43
|
+
mask,
|
|
44
|
+
lazy: false,
|
|
45
|
+
placeholderChar: '-',
|
|
46
|
+
blocks: {
|
|
47
|
+
am: {
|
|
48
|
+
mask: 'am',
|
|
49
|
+
placeholderChar: '-',
|
|
50
|
+
definitions: {
|
|
51
|
+
a: /[AaPp]/,
|
|
52
|
+
m: /[Mm]/
|
|
53
|
+
}
|
|
54
|
+
}
|
|
57
55
|
}
|
|
56
|
+
});
|
|
57
|
+
}, [userInput, mask]);
|
|
58
|
+
const handleAccept = useCallback((value, maskRef) => {
|
|
59
|
+
if (isDisabled || value === lastProgrammaticValue.current) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
const {
|
|
63
|
+
correctedTime
|
|
64
|
+
} = correctTime(value, is24HourClock, false);
|
|
65
|
+
if (correctedTime !== value) {
|
|
66
|
+
// Update the mask value with the corrected time
|
|
67
|
+
// eslint-disable-next-line no-param-reassign
|
|
68
|
+
maskRef.value = correctedTime;
|
|
69
|
+
}
|
|
70
|
+
onChange(correctedTime);
|
|
71
|
+
setShouldMoveSelectionToEnd(false);
|
|
72
|
+
}, [is24HourClock, isDisabled, onChange, setShouldMoveSelectionToEnd]);
|
|
73
|
+
const {
|
|
74
|
+
ref: imaskRef,
|
|
75
|
+
maskRef
|
|
76
|
+
} = useIMask({
|
|
77
|
+
mask,
|
|
78
|
+
lazy: false,
|
|
79
|
+
placeholderChar: '-',
|
|
80
|
+
blocks: {
|
|
81
|
+
am: {
|
|
82
|
+
mask: 'am',
|
|
83
|
+
placeholderChar: '-',
|
|
84
|
+
definitions: {
|
|
85
|
+
a: /[AaPp]/,
|
|
86
|
+
m: /[Mm]/
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}, {
|
|
91
|
+
defaultValue: userInput ? undefined : emptyDisplayValue,
|
|
92
|
+
onAccept: handleAccept
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
// Sync userInput value with the input (e.g. when parent sets time from dropdown)
|
|
96
|
+
useEffect(() => {
|
|
97
|
+
if (!maskRef.current) return;
|
|
98
|
+
const valueToShow = userInput || emptyDisplayValue;
|
|
99
|
+
if (maskRef.current.value !== valueToShow) {
|
|
100
|
+
lastProgrammaticValue.current = userInput;
|
|
101
|
+
maskRef.current.value = valueToShow;
|
|
102
|
+
maskRef.current.updateValue();
|
|
103
|
+
}
|
|
104
|
+
}, [userInput, emptyDisplayValue, maskRef]);
|
|
105
|
+
// When empty, ensure placeholder is visible on mount (imask 7.6+)
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
if (userInput) return undefined;
|
|
108
|
+
const frameId = requestAnimationFrame(() => {
|
|
109
|
+
if (maskRef.current) {
|
|
110
|
+
maskRef.current.value = emptyDisplayValue;
|
|
111
|
+
maskRef.current.updateValue();
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
return () => cancelAnimationFrame(frameId);
|
|
115
|
+
}, [userInput, emptyDisplayValue, maskRef]);
|
|
116
|
+
|
|
117
|
+
// Handle selection position
|
|
118
|
+
useEffect(() => {
|
|
119
|
+
if (shouldMoveSelectionToEnd && inputRef.current) {
|
|
120
|
+
const validTimeLength = mask.length;
|
|
121
|
+
inputRef.current.setSelectionRange(validTimeLength, validTimeLength);
|
|
58
122
|
setShouldMoveSelectionToEnd(false);
|
|
59
|
-
return {
|
|
60
|
-
...next,
|
|
61
|
-
value: correctedTime,
|
|
62
|
-
selection: newSelection
|
|
63
|
-
};
|
|
64
123
|
}
|
|
65
|
-
},
|
|
124
|
+
}, [shouldMoveSelectionToEnd, setShouldMoveSelectionToEnd, mask.length]);
|
|
125
|
+
return /*#__PURE__*/React__default.createElement(Input, {
|
|
66
126
|
id: id,
|
|
67
127
|
disabled: isDisabled,
|
|
68
128
|
role: "combobox",
|
|
69
129
|
"aria-expanded": ariaExpanded,
|
|
70
130
|
"aria-controls": ariaControls,
|
|
71
|
-
ref: ref,
|
|
131
|
+
ref: mergeRefs(ref, inputRef, imaskRef),
|
|
72
132
|
className: classNames(styles.input, {
|
|
73
133
|
[styles.ignoreFocusStyle]: !!ariaActiveDescendant || isOptionHovered
|
|
74
134
|
}),
|
|
75
135
|
"aria-invalid": isInvalid,
|
|
136
|
+
defaultValue: userInput || emptyDisplayValue,
|
|
137
|
+
placeholder: maskedUserInput !== null && maskedUserInput !== void 0 ? maskedUserInput : emptyDisplayValue,
|
|
76
138
|
onKeyDown: handleKeyDown,
|
|
77
|
-
onClick: () =>
|
|
139
|
+
onClick: () => {
|
|
140
|
+
if (isDisabled) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
setIsFlyoutOpen(true);
|
|
144
|
+
},
|
|
78
145
|
"aria-label": ariaLabel,
|
|
79
146
|
"aria-labelledby": ariaLabelledBy,
|
|
80
147
|
"aria-describedby": ariaDescribedBy,
|
|
81
148
|
"aria-activedescendant": ariaActiveDescendant,
|
|
82
149
|
"data-testid": dataTestId && "".concat(dataTestId, "-input")
|
|
83
|
-
})
|
|
150
|
+
});
|
|
84
151
|
});
|
|
85
152
|
TimeInput.displayName = 'TimeInput';
|
|
86
153
|
|
|
@@ -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 = {"timePickerContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._z43iz{display:inline-block;position:relative}._z43iz ._rGt5N{width:120px}._z43iz ._rGt5N ._h6WTz._D-cw0{transform:rotate(-180deg)}._z43iz ._rGt5N ._h6WTz._c9zfP{fill:#9d9fa1;opacity:.4}._z43iz ._jWqGn>input:focus{box-shadow:none!important;border:1px solid #898989!important}._z43iz ._h6WTz{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._z43iz ._h6WTz._D-cw0{transform:rotate(-180deg)}._JnBMM{width:120px}._JnBMM ._3jE54._0qWdi{background-color:#efefef;border-radius:6px}";
|
|
4
|
+
var styles = {"timePickerContainer":"_z43iz","input":"_rGt5N","icon":"_h6WTz","open":"_D-cw0","disabled":"_c9zfP","ignoreFocusStyle":"_jWqGn","timePickerFlyout":"_JnBMM","option":"_3jE54","exactMatch":"_0qWdi"};
|
|
5
|
+
var stylesheet="._z43iz{display:inline-block;position:relative}._z43iz ._rGt5N{width:120px}._z43iz ._rGt5N ._h6WTz._D-cw0{transform:rotate(-180deg)}._z43iz ._rGt5N ._h6WTz._c9zfP{fill:#9d9fa1;opacity:.4}._z43iz ._jWqGn>input:focus{box-shadow:none!important;border:1px solid #898989!important}._z43iz ._h6WTz{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._z43iz ._h6WTz._D-cw0{transform:rotate(-180deg)}._JnBMM{width:120px}._JnBMM ._3jE54._0qWdi{background-color:#efefef;border-radius:6px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){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 = {"default":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._ayBR3{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._Xv0tG{background-color:rgba(50,54,58,.08)}._j9ZJv{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._JIA4y{color:rgba(81,85,89,.4);cursor:not-allowed}._zJqRg{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._wcPTu{color:#085caf;border-color:#085caf}._8CJg6,._wcPTu{background:rgba(11,110,208,.11)}._8CJg6{color:#0854a1;border-color:#0854a1}._-67Jq{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._5-WxD{position:relative;display:inline-grid}._5-WxD svg{fill:currentColor}._5-WxD ._MmWIy{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._5-WxD ._MmWIy+._1XOid{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._5-WxD ._MmWIy+._1XOid._KVene{padding:5px;max-width:36px;min-width:36px}._5-WxD ._MmWIy+._1XOid._DF8xH{padding:0 16px}._5-WxD ._MmWIy+._1XOid._O7CXY{padding:0 16px 0 12px}._5-WxD ._MmWIy:hover+._1XOid{background-color:rgba(50,54,58,.08)}._5-WxD ._MmWIy:disabled+._1XOid{color:rgba(81,85,89,.4);cursor:not-allowed}._5-WxD ._MmWIy:active+._1XOid,._5-WxD ._MmWIy:focus:active+._1XOid{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._5-WxD ._MmWIy:checked+._1XOid{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5-WxD ._MmWIy:checked:hover+._1XOid{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._5-WxD ._MmWIy:checked:disabled+._1XOid{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._5-WxD ._MmWIy:checked:active+._1XOid,._5-WxD ._MmWIy:checked:focus:active+._1XOid{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._lHF2u{display:inline-flex;position:relative}._lHF2u:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._lHF2u>*{flex-shrink:0;flex-grow:0}._h9wjo{border:none;margin:0;padding:0}._h9wjo legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._5-WxD ._MmWIy.focus-visible,._5-WxD ._MmWIy:focus-visible{outline:none}._5-WxD ._MmWIy.focus-visible+._1XOid,._5-WxD ._MmWIy:focus-visible+._1XOid{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"default":"_ayBR3","hovered":"_Xv0tG","pressed":"_j9ZJv","disabled":"_JIA4y","selectedDefault":"_zJqRg","selectedHovered":"_wcPTu","selectedPressed":"_8CJg6","selectedDisabled":"_-67Jq","toggleContainer":"_5-WxD","toggleInput":"_MmWIy","toggleButton":"_1XOid","iconOnly":"_KVene","text":"_DF8xH","iconText":"_O7CXY","toggleButtonGroup":"_lHF2u","toggleButtonGroupFieldset":"_h9wjo"};
|
|
5
|
+
var stylesheet="._ayBR3{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._Xv0tG{background-color:rgba(50,54,58,.08)}._j9ZJv{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._JIA4y{color:rgba(81,85,89,.4);cursor:not-allowed}._zJqRg{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._wcPTu{color:#085caf;border-color:#085caf}._8CJg6,._wcPTu{background:rgba(11,110,208,.11)}._8CJg6{color:#0854a1;border-color:#0854a1}._-67Jq{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._5-WxD{position:relative;display:inline-grid}._5-WxD svg{fill:currentColor}._5-WxD ._MmWIy{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._5-WxD ._MmWIy+._1XOid{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._5-WxD ._MmWIy+._1XOid._KVene{padding:5px;max-width:36px;min-width:36px}._5-WxD ._MmWIy+._1XOid._DF8xH{padding:0 16px}._5-WxD ._MmWIy+._1XOid._O7CXY{padding:0 16px 0 12px}._5-WxD ._MmWIy:hover+._1XOid{background-color:rgba(50,54,58,.08)}._5-WxD ._MmWIy:disabled+._1XOid{color:rgba(81,85,89,.4);cursor:not-allowed}._5-WxD ._MmWIy:active+._1XOid,._5-WxD ._MmWIy:focus:active+._1XOid{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._5-WxD ._MmWIy:checked+._1XOid{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._5-WxD ._MmWIy:checked:hover+._1XOid{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._5-WxD ._MmWIy:checked:disabled+._1XOid{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._5-WxD ._MmWIy:checked:active+._1XOid,._5-WxD ._MmWIy:checked:focus:active+._1XOid{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._lHF2u{display:inline-flex;position:relative}._lHF2u:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._lHF2u>*{flex-shrink:0;flex-grow:0}._h9wjo{border:none;margin:0;padding:0}._h9wjo legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._5-WxD ._MmWIy.focus-visible,._5-WxD ._MmWIy:focus-visible{outline:none}._5-WxD ._MmWIy.focus-visible+._1XOid,._5-WxD ._MmWIy:focus-visible+._1XOid{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|