@qualtrics/ui-react 2.74.0 → 2.76.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-be619849.js → index-87207072.js} +422 -371
- package/dist/__shared/cjs/{index-97d7b02b.js → index-b569963c.js} +3 -3
- 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/AdvancedTable.js +2 -0
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +3 -1
- 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/ComboboxGroup.js +1 -1
- 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 +2 -2
- 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 +4 -3
- 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/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 +27 -20
- package/dist/next/index.js +5605 -325
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +2 -1
- package/dist/utils/Popper/Popper.js +162 -114
- 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 +17 -18
- package/dist/__shared/cjs/index-55082bc8.js +0 -13425
|
@@ -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
|
-
|
|
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) {
|
|
105
|
+
maskRef.current.value = emptyDisplayValue;
|
|
106
|
+
maskRef.current.updateValue();
|
|
107
|
+
}
|
|
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 = "._Bfc8B input{padding-left:76px!important}._P8Ywj input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._P8Ywj input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._P8Ywj input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._XSsK2{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._XSsK2,._XSsK2._P8Ywj:hover{background-color:transparent!important}._XSsK2:hover{background-color:rgba(50,54,58,.08)!important}._XSsK2:active{background-color:rgba(50,54,58,.11)!important}._XSsK2 svg{top:2px!important}._uJELN{position:relative}._LPMGS{position:absolute;top:18px;left:12px;line-height:0;font-size:14px;color:#32363a;z-index:101;pointer-events:none}";
|
|
4
|
+
var styles = {"input":"_Bfc8B","disabled":"_P8Ywj","dropdown":"_XSsK2","container":"_uJELN","countryCode":"_LPMGS"};
|
|
5
|
+
var stylesheet="._Bfc8B input{padding-left:76px!important}._P8Ywj input{background-color:#e5e5e5!important;color:#9d9fa1!important;cursor:not-allowed!important;-webkit-text-fill-color:#9d9fa1}._P8Ywj input::-moz-placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._P8Ywj input::placeholder{color:#aaabad;-webkit-text-fill-color:#aaabad}._XSsK2{position:absolute!important;left:4px;right:4px;bottom:4px;z-index:100;width:67px;height:28px!important;border-radius:4px}._XSsK2,._XSsK2._P8Ywj:hover{background-color:transparent!important}._XSsK2:hover{background-color:rgba(50,54,58,.08)!important}._XSsK2:active{background-color:rgba(50,54,58,.11)!important}._XSsK2 svg{top:2px!important}._uJELN{position:relative}._LPMGS{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 };
|
|
@@ -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 = "._4C7rr{box-shadow:inset 0 0 0 1px #b00!important}._81Szk{margin-right:7px}._ka7N6{background-color:rgba(11,110,208,.08);font-weight:500}";
|
|
4
|
+
var styles = {"isInvalid":"_4C7rr","checkbox":"_81Szk","selectedItem":"_ka7N6"};
|
|
5
|
+
var stylesheet="._4C7rr{box-shadow:inset 0 0 0 1px #b00!important}._81Szk{margin-right:7px}._ka7N6{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 = "._XjXeB{display:flex}._4gmqM{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._4gmqM._fw6cx{background-color:#fff}._4gmqM._fw6cx._GYXWn.focus-visible:not(._3tgKo),._4gmqM._fw6cx._GYXWn:focus-visible:not(._3tgKo),._4gmqM._fw6cx._pFhRY:not(._4gmqM._fw6cx._K0UOF),._4gmqM._HZOS6{background-color:#0b6ed0}._4gmqM._HZOS6._3tgKo._GYXWn,._4gmqM._HZOS6._3tgKo._K0UOF,._4gmqM._HZOS6._K0UOF._pFhRY{opacity:.4}._9pxWG{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._9pxWG:focus{z-index:1}._wGkki{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}._wGkki svg{margin-left:1px}._wGkki._fw6cx{background-color:#0b6ed0;border-color:transparent}._wGkki._fw6cx svg{fill:#fff!important}._wGkki._fw6cx:not(._Wslv4):hover{background-color:#085caf!important}._wGkki._fw6cx:not(._Wslv4):active{background-color:#0854a1!important}._wGkki._fw6cx._Wslv4{opacity:.4}._wGkki._fw6cx._Wslv4 svg{background-color:transparent}._wGkki._HZOS6{border-color:#0b6ed0;background-color:#fff}._wGkki._HZOS6 svg{fill:#0b6ed0!important}._wGkki._HZOS6:not(._Wslv4):hover{background-color:#eef5fc!important}._wGkki._HZOS6:not(._Wslv4):active{background-color:#e1edf9!important}._wGkki._HZOS6._Wslv4{opacity:.4}._wGkki._HZOS6._Wslv4 svg{background-color:transparent}._egzsf{width:260px}";
|
|
4
|
+
var styles = {"container":"_XjXeB","divider":"_4gmqM","primary":"_fw6cx","mainButtonFocus":"_GYXWn","mainButtonDisabled":"_3tgKo","dropdownButtonFocus":"_pFhRY","dropdownButtonDisabled":"_K0UOF","secondary":"_HZOS6","mainButton":"_9pxWG","dropdownButton":"_wGkki","disabled":"_Wslv4","dropdownOption":"_egzsf"};
|
|
5
|
+
var stylesheet="._XjXeB{display:flex}._4gmqM{z-index:2;width:1px;margin-left:-1px;margin-right:-1px}._4gmqM._fw6cx{background-color:#fff}._4gmqM._fw6cx._GYXWn.focus-visible:not(._3tgKo),._4gmqM._fw6cx._GYXWn:focus-visible:not(._3tgKo),._4gmqM._fw6cx._pFhRY:not(._4gmqM._fw6cx._K0UOF),._4gmqM._HZOS6{background-color:#0b6ed0}._4gmqM._HZOS6._3tgKo._GYXWn,._4gmqM._HZOS6._3tgKo._K0UOF,._4gmqM._HZOS6._K0UOF._pFhRY{opacity:.4}._9pxWG{border-radius:4px 0 0 4px;border-right:none;padding-right:17px}._9pxWG:focus{z-index:1}._wGkki{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}._wGkki svg{margin-left:1px}._wGkki._fw6cx{background-color:#0b6ed0;border-color:transparent}._wGkki._fw6cx svg{fill:#fff!important}._wGkki._fw6cx:not(._Wslv4):hover{background-color:#085caf!important}._wGkki._fw6cx:not(._Wslv4):active{background-color:#0854a1!important}._wGkki._fw6cx._Wslv4{opacity:.4}._wGkki._fw6cx._Wslv4 svg{background-color:transparent}._wGkki._HZOS6{border-color:#0b6ed0;background-color:#fff}._wGkki._HZOS6 svg{fill:#0b6ed0!important}._wGkki._HZOS6:not(._Wslv4):hover{background-color:#eef5fc!important}._wGkki._HZOS6:not(._Wslv4):active{background-color:#e1edf9!important}._wGkki._HZOS6._Wslv4{opacity:.4}._wGkki._HZOS6._Wslv4 svg{background-color:transparent}._egzsf{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 = "._lJFIH{display:inline-block;position:relative}._lJFIH ._5lUQe{width:120px}._lJFIH ._5lUQe ._kOw51._n5bjS{transform:rotate(-180deg)}._lJFIH ._5lUQe ._kOw51._SzzkN{fill:#9d9fa1;opacity:.4}._lJFIH ._SEYzj>input:focus{box-shadow:none!important;border:1px solid #898989!important}._lJFIH ._kOw51{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._lJFIH ._kOw51._n5bjS{transform:rotate(-180deg)}._ZQQPq{width:120px}._ZQQPq ._lq9Is._77B39{background-color:#efefef;border-radius:6px}";
|
|
4
|
+
var styles = {"timePickerContainer":"_lJFIH","input":"_5lUQe","icon":"_kOw51","open":"_n5bjS","disabled":"_SzzkN","ignoreFocusStyle":"_SEYzj","timePickerFlyout":"_ZQQPq","option":"_lq9Is","exactMatch":"_77B39"};
|
|
5
|
+
var stylesheet="._lJFIH{display:inline-block;position:relative}._lJFIH ._5lUQe{width:120px}._lJFIH ._5lUQe ._kOw51._n5bjS{transform:rotate(-180deg)}._lJFIH ._5lUQe ._kOw51._SzzkN{fill:#9d9fa1;opacity:.4}._lJFIH ._SEYzj>input:focus{box-shadow:none!important;border:1px solid #898989!important}._lJFIH ._kOw51{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._lJFIH ._kOw51._n5bjS{transform:rotate(-180deg)}._ZQQPq{width:120px}._ZQQPq ._lq9Is._77B39{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 = "._ABC0Q{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._6xS03{background-color:rgba(50,54,58,.08)}._zuT1o{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._7fVrw{color:rgba(81,85,89,.4);cursor:not-allowed}._b-sr3{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._Ga7-u{color:#085caf;border-color:#085caf}._Ga7-u,._oECPd{background:rgba(11,110,208,.11)}._oECPd{color:#0854a1;border-color:#0854a1}._iNPgC{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._LHcvu{position:relative;display:inline-grid}._LHcvu svg{fill:currentColor}._LHcvu ._RksCU{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._LHcvu ._RksCU+._I0ObZ{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}._LHcvu ._RksCU+._I0ObZ._XDsyD{padding:5px;max-width:36px;min-width:36px}._LHcvu ._RksCU+._I0ObZ._q-YNj{padding:0 16px}._LHcvu ._RksCU+._I0ObZ._A-LxD{padding:0 16px 0 12px}._LHcvu ._RksCU:hover+._I0ObZ{background-color:rgba(50,54,58,.08)}._LHcvu ._RksCU:disabled+._I0ObZ{color:rgba(81,85,89,.4);cursor:not-allowed}._LHcvu ._RksCU:active+._I0ObZ,._LHcvu ._RksCU:focus:active+._I0ObZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._LHcvu ._RksCU:checked+._I0ObZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._LHcvu ._RksCU:checked:hover+._I0ObZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._LHcvu ._RksCU:checked:disabled+._I0ObZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._LHcvu ._RksCU:checked:active+._I0ObZ,._LHcvu ._RksCU:checked:focus:active+._I0ObZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._sDG1N{display:inline-flex;position:relative}._sDG1N:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._sDG1N>*{flex-shrink:0;flex-grow:0}._cfX4-{border:none;margin:0;padding:0}._cfX4- legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._LHcvu ._RksCU.focus-visible,._LHcvu ._RksCU:focus-visible{outline:none}._LHcvu ._RksCU.focus-visible+._I0ObZ,._LHcvu ._RksCU:focus-visible+._I0ObZ{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"default":"_ABC0Q","hovered":"_6xS03","pressed":"_zuT1o","disabled":"_7fVrw","selectedDefault":"_b-sr3","selectedHovered":"_Ga7-u","selectedPressed":"_oECPd","selectedDisabled":"_iNPgC","toggleContainer":"_LHcvu","toggleInput":"_RksCU","toggleButton":"_I0ObZ","iconOnly":"_XDsyD","text":"_q-YNj","iconText":"_A-LxD","toggleButtonGroup":"_sDG1N","toggleButtonGroupFieldset":"_cfX4-"};
|
|
5
|
+
var stylesheet="._ABC0Q{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._6xS03{background-color:rgba(50,54,58,.08)}._zuT1o{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._7fVrw{color:rgba(81,85,89,.4);cursor:not-allowed}._b-sr3{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._Ga7-u{color:#085caf;border-color:#085caf}._Ga7-u,._oECPd{background:rgba(11,110,208,.11)}._oECPd{color:#0854a1;border-color:#0854a1}._iNPgC{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._LHcvu{position:relative;display:inline-grid}._LHcvu svg{fill:currentColor}._LHcvu ._RksCU{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._LHcvu ._RksCU+._I0ObZ{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}._LHcvu ._RksCU+._I0ObZ._XDsyD{padding:5px;max-width:36px;min-width:36px}._LHcvu ._RksCU+._I0ObZ._q-YNj{padding:0 16px}._LHcvu ._RksCU+._I0ObZ._A-LxD{padding:0 16px 0 12px}._LHcvu ._RksCU:hover+._I0ObZ{background-color:rgba(50,54,58,.08)}._LHcvu ._RksCU:disabled+._I0ObZ{color:rgba(81,85,89,.4);cursor:not-allowed}._LHcvu ._RksCU:active+._I0ObZ,._LHcvu ._RksCU:focus:active+._I0ObZ{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._LHcvu ._RksCU:checked+._I0ObZ{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._LHcvu ._RksCU:checked:hover+._I0ObZ{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._LHcvu ._RksCU:checked:disabled+._I0ObZ{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._LHcvu ._RksCU:checked:active+._I0ObZ,._LHcvu ._RksCU:checked:focus:active+._I0ObZ{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._sDG1N{display:inline-flex;position:relative}._sDG1N:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._sDG1N>*{flex-shrink:0;flex-grow:0}._cfX4-{border:none;margin:0;padding:0}._cfX4- legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._LHcvu ._RksCU.focus-visible,._LHcvu ._RksCU:focus-visible{outline:none}._LHcvu ._RksCU.focus-visible+._I0ObZ,._LHcvu ._RksCU:focus-visible+._I0ObZ{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 };
|