@skbkontur/react-ui 6.1.4-eef21.0 → 6.1.4-ff219.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/components/Autocomplete/Autocomplete.js +3 -2
- package/components/Autocomplete/Autocomplete.js.map +1 -1
- package/components/FxInput/FxInput.js +2 -2
- package/components/FxInput/FxInput.js.map +1 -1
- package/components/Group/Group.js +2 -3
- package/components/Group/Group.js.map +1 -1
- package/components/Input/Input.d.ts +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/MaskedInput/MaskedInput.d.ts +2 -0
- package/components/MaskedInput/MaskedInput.js +6 -0
- package/components/MaskedInput/MaskedInput.js.map +1 -1
- package/components/MaskedInputV2/MaskedInputV2.d.ts +57 -0
- package/components/MaskedInputV2/MaskedInputV2.helpers.d.ts +9 -0
- package/components/MaskedInputV2/MaskedInputV2.helpers.js +17 -0
- package/components/MaskedInputV2/MaskedInputV2.helpers.js.map +1 -0
- package/components/MaskedInputV2/MaskedInputV2.js +234 -0
- package/components/MaskedInputV2/MaskedInputV2.js.map +1 -0
- package/components/MaskedInputV2/MaskedInputV2.styles.d.ts +7 -0
- package/components/MaskedInputV2/MaskedInputV2.styles.js +19 -0
- package/components/MaskedInputV2/MaskedInputV2.styles.js.map +1 -0
- package/components/MaskedInputV2/index.d.ts +1 -0
- package/components/MaskedInputV2/index.js +2 -0
- package/components/MaskedInputV2/index.js.map +1 -0
- package/components/MaskedInputV2/internal/MaskOverlay.d.ts +19 -0
- package/components/MaskedInputV2/internal/MaskOverlay.js +54 -0
- package/components/MaskedInputV2/internal/MaskOverlay.js.map +1 -0
- package/components/MaskedInputV2/internal/MaskedCore.d.ts +8 -0
- package/components/MaskedInputV2/internal/MaskedCore.js +101 -0
- package/components/MaskedInputV2/internal/MaskedCore.js.map +1 -0
- package/components/MaskedInputV2/internal/MaskedCore.types.d.ts +30 -0
- package/components/MaskedInputV2/internal/MaskedCore.types.js +2 -0
- package/components/MaskedInputV2/internal/MaskedCore.types.js.map +1 -0
- package/components/MaskedInputV2/internal/MaskedInternal.styles.d.ts +15 -0
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js +34 -0
- package/components/MaskedInputV2/internal/MaskedInternal.styles.js.map +1 -0
- package/components/MaskedInputV2/internal/buildSlotMap.d.ts +11 -0
- package/components/MaskedInputV2/internal/buildSlotMap.js +37 -0
- package/components/MaskedInputV2/internal/buildSlotMap.js.map +1 -0
- package/components/MaskedInputV2/internal/extractRaw.d.ts +10 -0
- package/components/MaskedInputV2/internal/extractRaw.js +16 -0
- package/components/MaskedInputV2/internal/extractRaw.js.map +1 -0
- package/components/MaskedInputV2/internal/findNearestRawLeft.d.ts +10 -0
- package/components/MaskedInputV2/internal/findNearestRawLeft.js +18 -0
- package/components/MaskedInputV2/internal/findNearestRawLeft.js.map +1 -0
- package/components/MaskedInputV2/internal/helpers.d.ts +5 -0
- package/components/MaskedInputV2/internal/helpers.js +6 -0
- package/components/MaskedInputV2/internal/helpers.js.map +1 -0
- package/components/MaskedInputV2/internal/maskedCoreClipboard.d.ts +25 -0
- package/components/MaskedInputV2/internal/maskedCoreClipboard.js +30 -0
- package/components/MaskedInputV2/internal/maskedCoreClipboard.js.map +1 -0
- package/components/MaskedInputV2/internal/maskedCoreDeletion.d.ts +28 -0
- package/components/MaskedInputV2/internal/maskedCoreDeletion.js +70 -0
- package/components/MaskedInputV2/internal/maskedCoreDeletion.js.map +1 -0
- package/components/MaskedInputV2/internal/maskedCoreInputChange.d.ts +35 -0
- package/components/MaskedInputV2/internal/maskedCoreInputChange.js +31 -0
- package/components/MaskedInputV2/internal/maskedCoreInputChange.js.map +1 -0
- package/components/MaskedInputV2/internal/maskedCoreNavigation.d.ts +13 -0
- package/components/MaskedInputV2/internal/maskedCoreNavigation.js +79 -0
- package/components/MaskedInputV2/internal/maskedCoreNavigation.js.map +1 -0
- package/components/MaskedInputV2/internal/stripMaskChars.d.ts +11 -0
- package/components/MaskedInputV2/internal/stripMaskChars.js +20 -0
- package/components/MaskedInputV2/internal/stripMaskChars.js.map +1 -0
- package/components/MaskedInputV2/internal/types.d.ts +74 -0
- package/components/MaskedInputV2/internal/types.js +2 -0
- package/components/MaskedInputV2/internal/types.js.map +1 -0
- package/components/MaskedInputV2/internal/useMaskEngine.d.ts +42 -0
- package/components/MaskedInputV2/internal/useMaskEngine.js +82 -0
- package/components/MaskedInputV2/internal/useMaskEngine.js.map +1 -0
- package/components/MaskedInputV2/internal/useMaskedCoreHandlers.d.ts +28 -0
- package/components/MaskedInputV2/internal/useMaskedCoreHandlers.js +190 -0
- package/components/MaskedInputV2/internal/useMaskedCoreHandlers.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.d.ts +16 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.js +59 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-input-mask-element.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.d.ts +20 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.js +106 -0
- package/components/MaskedInputV2/react-imask/imask/controls/html-mask-element.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input-history.d.ts +17 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input-history.js +49 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input-history.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input.d.ts +95 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input.js +420 -0
- package/components/MaskedInputV2/react-imask/imask/controls/input.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/controls/mask-element.d.ts +30 -0
- package/components/MaskedInputV2/react-imask/imask/controls/mask-element.js +59 -0
- package/components/MaskedInputV2/react-imask/imask/controls/mask-element.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/action-details.d.ts +30 -0
- package/components/MaskedInputV2/react-imask/imask/core/action-details.js +100 -0
- package/components/MaskedInputV2/react-imask/imask/core/action-details.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/change-details.d.ts +20 -0
- package/components/MaskedInputV2/react-imask/imask/core/change-details.js +46 -0
- package/components/MaskedInputV2/react-imask/imask/core/change-details.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.d.ts +21 -0
- package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.js +52 -0
- package/components/MaskedInputV2/react-imask/imask/core/continuous-tail-details.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/holder.d.ts +34 -0
- package/components/MaskedInputV2/react-imask/imask/core/holder.js +38 -0
- package/components/MaskedInputV2/react-imask/imask/core/holder.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/tail-details.d.ts +20 -0
- package/components/MaskedInputV2/react-imask/imask/core/tail-details.js +2 -0
- package/components/MaskedInputV2/react-imask/imask/core/tail-details.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/core/utils.d.ts +24 -0
- package/components/MaskedInputV2/react-imask/imask/core/utils.js +100 -0
- package/components/MaskedInputV2/react-imask/imask/core/utils.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/imask.d.ts +5 -0
- package/components/MaskedInputV2/react-imask/imask/imask.js +7 -0
- package/components/MaskedInputV2/react-imask/imask/imask.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/index.d.ts +17 -0
- package/components/MaskedInputV2/react-imask/imask/index.js +16 -0
- package/components/MaskedInputV2/react-imask/imask/index.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/base.d.ts +114 -0
- package/components/MaskedInputV2/react-imask/imask/masked/base.js +411 -0
- package/components/MaskedInputV2/react-imask/imask/masked/base.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/factory.d.ts +62 -0
- package/components/MaskedInputV2/react-imask/imask/masked/factory.js +96 -0
- package/components/MaskedInputV2/react-imask/imask/masked/factory.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/pattern.d.ts +101 -0
- package/components/MaskedInputV2/react-imask/imask/masked/pattern.js +543 -0
- package/components/MaskedInputV2/react-imask/imask/masked/pattern.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.d.ts +30 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.js +2 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/block.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.d.ts +21 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.js +180 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/chunk-tail-details.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.d.ts +31 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.js +163 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/cursor.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.d.ts +42 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.js +158 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/fixed-definition.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.d.ts +56 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.js +185 -0
- package/components/MaskedInputV2/react-imask/imask/masked/patterns/input-definition.js.map +1 -0
- package/components/MaskedInputV2/react-imask/imask/masked/regexp.d.ts +17 -0
- package/components/MaskedInputV2/react-imask/imask/masked/regexp.js +36 -0
- package/components/MaskedInputV2/react-imask/imask/masked/regexp.js.map +1 -0
- package/components/MaskedInputV2/react-imask/index.d.ts +3 -0
- package/components/MaskedInputV2/react-imask/index.js +4 -0
- package/components/MaskedInputV2/react-imask/index.js.map +1 -0
- package/components/MaskedInputV2/react-imask/input.d.ts +8 -0
- package/components/MaskedInputV2/react-imask/input.js +35 -0
- package/components/MaskedInputV2/react-imask/input.js.map +1 -0
- package/components/MaskedInputV2/react-imask/mixin.d.ts +31 -0
- package/components/MaskedInputV2/react-imask/mixin.js +246 -0
- package/components/MaskedInputV2/react-imask/mixin.js.map +1 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.js +2 -2
- package/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/internal/FeaturedMaskedInput/FeaturedMaskedInput.d.ts +4 -0
- package/internal/FeaturedMaskedInput/FeaturedMaskedInput.js +24 -0
- package/internal/FeaturedMaskedInput/FeaturedMaskedInput.js.map +1 -0
- package/internal/themes/BasicTheme.d.ts +0 -34
- package/internal/themes/BasicTheme.js +0 -96
- package/internal/themes/BasicTheme.js.map +1 -1
- package/lib/events/keyboard/KeyboardEventCodes.d.ts +2 -0
- package/lib/events/keyboard/KeyboardEventCodes.js +2 -0
- package/lib/events/keyboard/KeyboardEventCodes.js.map +1 -1
- package/lib/events/keyboard/KeyboardMapKeys.js +2 -0
- package/lib/events/keyboard/KeyboardMapKeys.js.map +1 -1
- package/lib/events/keyboard/identifiers.d.ts +2 -0
- package/lib/events/keyboard/identifiers.js +6 -0
- package/lib/events/keyboard/identifiers.js.map +1 -1
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.d.ts +2 -0
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js +1 -0
- package/lib/featureFlagsContext/ReactUIFeatureFlagsContext.js.map +1 -1
- package/lib/utils.d.ts +0 -2
- package/lib/utils.js +0 -1
- package/lib/utils.js.map +1 -1
- package/package.json +4 -5
- package/components/TimePicker/TimeClockIcon.d.ts +0 -3
- package/components/TimePicker/TimeClockIcon.js +0 -11
- package/components/TimePicker/TimeClockIcon.js.map +0 -1
- package/components/TimePicker/TimeFragmentsView.d.ts +0 -15
- package/components/TimePicker/TimeFragmentsView.js +0 -72
- package/components/TimePicker/TimeFragmentsView.js.map +0 -1
- package/components/TimePicker/TimeFragmentsView.styles.d.ts +0 -12
- package/components/TimePicker/TimeFragmentsView.styles.js +0 -43
- package/components/TimePicker/TimeFragmentsView.styles.js.map +0 -1
- package/components/TimePicker/TimeInput.d.ts +0 -22
- package/components/TimePicker/TimeInput.js +0 -103
- package/components/TimePicker/TimeInput.js.map +0 -1
- package/components/TimePicker/TimePicker.d.ts +0 -77
- package/components/TimePicker/TimePicker.js +0 -508
- package/components/TimePicker/TimePicker.js.map +0 -1
- package/components/TimePicker/TimePicker.styles.d.ts +0 -14
- package/components/TimePicker/TimePicker.styles.js +0 -45
- package/components/TimePicker/TimePicker.styles.js.map +0 -1
- package/components/TimePicker/TimePickerItems.d.ts +0 -17
- package/components/TimePicker/TimePickerItems.js +0 -80
- package/components/TimePicker/TimePickerItems.js.map +0 -1
- package/components/TimePicker/TimePickerMobilePopup.d.ts +0 -38
- package/components/TimePicker/TimePickerMobilePopup.js +0 -21
- package/components/TimePicker/TimePickerMobilePopup.js.map +0 -1
- package/components/TimePicker/TimePickerPopup.d.ts +0 -20
- package/components/TimePicker/TimePickerPopup.js +0 -18
- package/components/TimePicker/TimePickerPopup.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.constants.d.ts +0 -22
- package/components/TimePicker/helpers/TimePicker.constants.js +0 -31
- package/components/TimePicker/helpers/TimePicker.constants.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.editing.d.ts +0 -23
- package/components/TimePicker/helpers/TimePicker.editing.js +0 -101
- package/components/TimePicker/helpers/TimePicker.editing.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.layout.d.ts +0 -6
- package/components/TimePicker/helpers/TimePicker.layout.js +0 -49
- package/components/TimePicker/helpers/TimePicker.layout.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.selection.d.ts +0 -5
- package/components/TimePicker/helpers/TimePicker.selection.js +0 -23
- package/components/TimePicker/helpers/TimePicker.selection.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.shared.d.ts +0 -47
- package/components/TimePicker/helpers/TimePicker.shared.js +0 -70
- package/components/TimePicker/helpers/TimePicker.shared.js.map +0 -1
- package/components/TimePicker/helpers/TimePicker.value.d.ts +0 -30
- package/components/TimePicker/helpers/TimePicker.value.js +0 -96
- package/components/TimePicker/helpers/TimePicker.value.js.map +0 -1
- package/components/TimePicker/helpers/scrollSelectedItemIntoView.d.ts +0 -4
- package/components/TimePicker/helpers/scrollSelectedItemIntoView.js +0 -24
- package/components/TimePicker/helpers/scrollSelectedItemIntoView.js.map +0 -1
- package/components/TimePicker/helpers/validateTimePicker.d.ts +0 -8
- package/components/TimePicker/helpers/validateTimePicker.js +0 -16
- package/components/TimePicker/helpers/validateTimePicker.js.map +0 -1
- package/components/TimePicker/hooks/useTimePickerDropdown.d.ts +0 -17
- package/components/TimePicker/hooks/useTimePickerDropdown.js +0 -62
- package/components/TimePicker/hooks/useTimePickerDropdown.js.map +0 -1
- package/components/TimePicker/hooks/useTimePickerSelection.d.ts +0 -18
- package/components/TimePicker/hooks/useTimePickerSelection.js +0 -66
- package/components/TimePicker/hooks/useTimePickerSelection.js.map +0 -1
- package/components/TimePicker/hooks/useTimePickerValue.d.ts +0 -18
- package/components/TimePicker/hooks/useTimePickerValue.js +0 -59
- package/components/TimePicker/hooks/useTimePickerValue.js.map +0 -1
- package/components/TimePicker/index.d.ts +0 -2
- package/components/TimePicker/index.js +0 -2
- package/components/TimePicker/index.js.map +0 -1
- package/internal/NativeTimeInput/NativeTimeInput.d.ts +0 -16
- package/internal/NativeTimeInput/NativeTimeInput.js +0 -25
- package/internal/NativeTimeInput/NativeTimeInput.js.map +0 -1
- package/internal/NativeTimeInput/NativeTimeInput.styles.d.ts +0 -3
- package/internal/NativeTimeInput/NativeTimeInput.styles.js +0 -15
- package/internal/NativeTimeInput/NativeTimeInput.styles.js.map +0 -1
- package/internal/NativeTimeInput/NativeTimeInput.utils.d.ts +0 -7
- package/internal/NativeTimeInput/NativeTimeInput.utils.js +0 -28
- package/internal/NativeTimeInput/NativeTimeInput.utils.js.map +0 -1
- package/internal/NativeTimeInput/index.d.ts +0 -1
- package/internal/NativeTimeInput/index.js +0 -2
- package/internal/NativeTimeInput/index.js.map +0 -1
- package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.d.ts +0 -2
- package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.js +0 -20
- package/internal/icons2022/TimeClockIcon/TimeClockIcon16Light.js.map +0 -1
- package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.d.ts +0 -2
- package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.js +0 -20
- package/internal/icons2022/TimeClockIcon/TimeClockIcon20Light.js.map +0 -1
- package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.d.ts +0 -2
- package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.js +0 -20
- package/internal/icons2022/TimeClockIcon/TimeClockIcon24Regular.js.map +0 -1
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import React, { useContext, useEffect, useImperativeHandle, useRef } from 'react';
|
|
24
|
-
import { InputLikeText } from '../../internal/InputLikeText/index.js';
|
|
25
|
-
import { forwardRefAndName } from '../../lib/forwardRefAndName.js';
|
|
26
|
-
import { useEmotion, useStyles } from '../../lib/renderEnvironment/index.js';
|
|
27
|
-
import { ThemeContext } from '../../lib/theming/ThemeContext.js';
|
|
28
|
-
import { getTimePickerInputMinWidth, getTimePickerSuffixMargin } from './helpers/TimePicker.layout.js';
|
|
29
|
-
import { getTimeSegments } from './helpers/TimePicker.shared.js';
|
|
30
|
-
import { TimeClockIcon } from './TimeClockIcon.js';
|
|
31
|
-
import { TimeFragmentsView } from './TimeFragmentsView.js';
|
|
32
|
-
import { getStyles } from './TimePicker.styles.js';
|
|
33
|
-
export var TimeInput = forwardRefAndName('TimeInput', function (props, ref) {
|
|
34
|
-
var _a;
|
|
35
|
-
var _b = props.hasDropdown, hasDropdown = _b === void 0 ? false : _b, _c = props.size, size = _c === void 0 ? 'small' : _c, disabled = props.disabled, autoFocus = props.autoFocus, suffix = props.suffix, style = props.style, width = props.width, corners = props.corners, rightIcon = props.rightIcon, format = props.format, value = props.value, onSelectSegment = props.onSelectSegment, rest = __rest(props, ["hasDropdown", "size", "disabled", "autoFocus", "suffix", "style", "width", "corners", "rightIcon", "format", "value", "onSelectSegment"]);
|
|
36
|
-
var theme = useContext(ThemeContext);
|
|
37
|
-
var cx = useEmotion().cx;
|
|
38
|
-
var styles = useStyles(getStyles);
|
|
39
|
-
var inputLikeTextRef = useRef(null);
|
|
40
|
-
var fragmentsViewRef = useRef(null);
|
|
41
|
-
useImperativeHandle(ref, function () { return ({
|
|
42
|
-
focus: function () { var _a; return (_a = inputLikeTextRef.current) === null || _a === void 0 ? void 0 : _a.focus(); },
|
|
43
|
-
blur: function () { var _a; return (_a = inputLikeTextRef.current) === null || _a === void 0 ? void 0 : _a.blur(); },
|
|
44
|
-
blink: function () { var _a; return (_a = inputLikeTextRef.current) === null || _a === void 0 ? void 0 : _a.blink(); },
|
|
45
|
-
getNode: function () { var _a, _b; return (_b = (_a = inputLikeTextRef.current) === null || _a === void 0 ? void 0 : _a.getNode()) !== null && _b !== void 0 ? _b : null; },
|
|
46
|
-
isFragment: function (el) { var _a, _b; return (_b = (_a = fragmentsViewRef.current) === null || _a === void 0 ? void 0 : _a.isFragment(el)) !== null && _b !== void 0 ? _b : false; },
|
|
47
|
-
getSegment: function (el) { var _a, _b; return (_b = (_a = fragmentsViewRef.current) === null || _a === void 0 ? void 0 : _a.getSegment(el)) !== null && _b !== void 0 ? _b : null; },
|
|
48
|
-
selectAll: function () {
|
|
49
|
-
var _a, _b, _c;
|
|
50
|
-
var rootNode = (_b = (_a = fragmentsViewRef.current) === null || _a === void 0 ? void 0 : _a.getRootNode()) !== null && _b !== void 0 ? _b : null;
|
|
51
|
-
if (!rootNode) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
(_c = inputLikeTextRef.current) === null || _c === void 0 ? void 0 : _c.selectInnerNode(rootNode, 0, rootNode.childNodes.length);
|
|
55
|
-
},
|
|
56
|
-
isAllSelected: function () {
|
|
57
|
-
var _a, _b, _c, _d, _e;
|
|
58
|
-
var rootNode = (_b = (_a = fragmentsViewRef.current) === null || _a === void 0 ? void 0 : _a.getRootNode()) !== null && _b !== void 0 ? _b : null;
|
|
59
|
-
if (!rootNode) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
var selection = (_d = (_c = rootNode.ownerDocument.defaultView) === null || _c === void 0 ? void 0 : _c.getSelection()) !== null && _d !== void 0 ? _d : null;
|
|
63
|
-
if (!selection || selection.rangeCount === 0 || selection.isCollapsed) {
|
|
64
|
-
return false;
|
|
65
|
-
}
|
|
66
|
-
var range = selection.getRangeAt(0);
|
|
67
|
-
var text = (_e = rootNode.textContent) !== null && _e !== void 0 ? _e : '';
|
|
68
|
-
return (range.toString() === text && rootNode.contains(range.startContainer) && rootNode.contains(range.endContainer));
|
|
69
|
-
},
|
|
70
|
-
selectSegment: function (segment) {
|
|
71
|
-
var _a, _b, _c;
|
|
72
|
-
var rootNode = (_b = (_a = fragmentsViewRef.current) === null || _a === void 0 ? void 0 : _a.getRootNode()) !== null && _b !== void 0 ? _b : null;
|
|
73
|
-
if (!rootNode) {
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
var segmentIndex = getTimeSegments(format).indexOf(segment);
|
|
77
|
-
var start = segmentIndex < 0 ? 0 : segmentIndex * 2;
|
|
78
|
-
var end = start + 1;
|
|
79
|
-
(_c = inputLikeTextRef.current) === null || _c === void 0 ? void 0 : _c.selectInnerNode(rootNode, start, end);
|
|
80
|
-
},
|
|
81
|
-
}); }, [format]);
|
|
82
|
-
useEffect(function () {
|
|
83
|
-
if (!autoFocus || disabled) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
var timer = setTimeout(function () {
|
|
87
|
-
var _a;
|
|
88
|
-
(_a = inputLikeTextRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
89
|
-
}, 0);
|
|
90
|
-
return function () {
|
|
91
|
-
clearTimeout(timer);
|
|
92
|
-
};
|
|
93
|
-
}, []);
|
|
94
|
-
var resolvedRightIcon = rightIcon === undefined ? (React.createElement("span", { className: cx(styles.rightIcon(), styles.rightIconDefault(theme), (_a = {},
|
|
95
|
-
_a[styles.rightIconInteractive()] = hasDropdown && !disabled,
|
|
96
|
-
_a)) },
|
|
97
|
-
React.createElement(TimeClockIcon, { size: size }))) : (rightIcon);
|
|
98
|
-
var suffixMarginLeft = getTimePickerSuffixMargin(size, theme);
|
|
99
|
-
var inputMinWidth = getTimePickerInputMinWidth(size, format, resolvedRightIcon !== null, theme);
|
|
100
|
-
return (React.createElement(InputLikeText, __assign({ ref: inputLikeTextRef }, rest, { takeContentWidth: true, disabled: disabled, size: size, inputMode: 'numeric', width: width !== null && width !== void 0 ? width : 'auto', suffix: suffix && React.createElement("span", { style: { marginLeft: suffixMarginLeft } }, suffix), style: __assign(__assign(__assign({}, style), { minWidth: inputMinWidth }), corners), rightIcon: resolvedRightIcon, value: value }),
|
|
101
|
-
React.createElement(TimeFragmentsView, { ref: fragmentsViewRef, format: format, size: size, value: value, onSelectSegment: onSelectSegment })));
|
|
102
|
-
});
|
|
103
|
-
//# sourceMappingURL=TimeInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.js","sourceRoot":"","sources":["TimeInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAEjE,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AACvG,OAAO,EAAE,eAAe,EAAqC,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AA8BnD,MAAM,CAAC,IAAM,SAAS,GAAG,iBAAiB,CAA+B,WAAW,EAAE,UAAC,KAAK,EAAE,GAAG;;IAE7F,IAAA,KAaE,KAAK,YAbY,EAAnB,WAAW,mBAAG,KAAK,KAAA,EACnB,KAYE,KAAK,KAZO,EAAd,IAAI,mBAAG,OAAO,KAAA,EACd,QAAQ,GAWN,KAAK,SAXC,EACR,SAAS,GAUP,KAAK,UAVE,EACT,MAAM,GASJ,KAAK,OATD,E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AE,KAAK,CAAC,CAAC;IAElG,OAAO,CACL,oBAAC,aAAa,aACZ,GAAG,EAAE,gBAAgB,IACjB,IAAI,IACR,gBAAgB,QAChB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,EACtB,MAAM,EAAE,MAAM,IAAI,8BAAM,KAAK,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAG,MAAM,CAAQ,EAChF,KAAK,iCAAO,KAAK,KAAE,QAAQ,EAAE,aAAa,KAAK,OAAO,GACtD,SAAS,EAAE,iBAAiB,EAC5B,KAAK,EAAE,KAAK;QAEZ,oBAAC,iBAAiB,IAChB,GAAG,EAAE,gBAAgB,EACrB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,eAAe,EAAE,eAAe,GAChC,CACY,CACjB,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["import React, { useContext, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport { InputLikeText } from '../../internal/InputLikeText/index.js';\nimport { forwardRefAndName } from '../../lib/forwardRefAndName.js';\nimport { useEmotion, useStyles } from '../../lib/renderEnvironment/index.js';\nimport { ThemeContext } from '../../lib/theming/ThemeContext.js';\nimport type { InputProps } from '../Input/index.js';\nimport { getTimePickerInputMinWidth, getTimePickerSuffixMargin } from './helpers/TimePicker.layout.js';\nimport { getTimeSegments, type TimeFormat, type TimeSegment } from './helpers/TimePicker.shared.js';\nimport { TimeClockIcon } from './TimeClockIcon.js';\nimport type { TimeFragmentsViewRef } from './TimeFragmentsView.js';\nimport { TimeFragmentsView } from './TimeFragmentsView.js';\nimport { getStyles } from './TimePicker.styles.js';\n\nexport interface TimeInputRef {\n focus(): void;\n\n blur(): void;\n\n blink(): void;\n\n isFragment(el: HTMLElement | EventTarget | null): boolean;\n\n isAllSelected(): boolean;\n\n getSegment(el: HTMLElement | EventTarget | null): TimeSegment | null;\n\n selectSegment(segment: TimeSegment): void;\n\n selectAll(): void;\n\n getNode(): HTMLElement | null;\n}\n\nexport interface TimeInputProps extends Omit<InputProps, 'type' | 'value' | 'onValueChange' | 'inputMode'> {\n hasDropdown?: boolean;\n format: TimeFormat;\n value: string;\n 'aria-placeholder'?: string;\n onSelectSegment?(segment: TimeSegment, event: React.MouseEvent<HTMLSpanElement>): void;\n}\n\nexport const TimeInput = forwardRefAndName<TimeInputRef, TimeInputProps>('TimeInput', (props, ref) => {\n const {\n hasDropdown = false,\n size = 'small',\n disabled,\n autoFocus,\n suffix,\n style,\n width,\n corners,\n rightIcon,\n format,\n value,\n onSelectSegment,\n ...rest\n } = props;\n\n const theme = useContext(ThemeContext);\n\n const { cx } = useEmotion();\n\n const styles = useStyles(getStyles);\n\n const inputLikeTextRef = useRef<InputLikeText>(null);\n const fragmentsViewRef = useRef<TimeFragmentsViewRef>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n focus: () => inputLikeTextRef.current?.focus(),\n blur: () => inputLikeTextRef.current?.blur(),\n blink: () => inputLikeTextRef.current?.blink(),\n getNode: () => inputLikeTextRef.current?.getNode() ?? null,\n isFragment: (el) => fragmentsViewRef.current?.isFragment(el) ?? false,\n getSegment: (el) => fragmentsViewRef.current?.getSegment(el) ?? null,\n selectAll: () => {\n const rootNode = fragmentsViewRef.current?.getRootNode() ?? null;\n\n if (!rootNode) {\n return;\n }\n\n inputLikeTextRef.current?.selectInnerNode(rootNode, 0, rootNode.childNodes.length);\n },\n\n isAllSelected: () => {\n const rootNode = fragmentsViewRef.current?.getRootNode() ?? null;\n\n if (!rootNode) {\n return false;\n }\n\n const selection = rootNode.ownerDocument.defaultView?.getSelection() ?? null;\n\n if (!selection || selection.rangeCount === 0 || selection.isCollapsed) {\n return false;\n }\n\n const range = selection.getRangeAt(0);\n const text = rootNode.textContent ?? '';\n\n return (\n range.toString() === text && rootNode.contains(range.startContainer) && rootNode.contains(range.endContainer)\n );\n },\n\n selectSegment: (segment) => {\n const rootNode = fragmentsViewRef.current?.getRootNode() ?? null;\n\n if (!rootNode) {\n return;\n }\n\n const segmentIndex = getTimeSegments(format).indexOf(segment);\n const start = segmentIndex < 0 ? 0 : segmentIndex * 2;\n const end = start + 1;\n\n inputLikeTextRef.current?.selectInnerNode(rootNode, start, end);\n },\n }),\n [format],\n );\n\n useEffect(() => {\n if (!autoFocus || disabled) {\n return;\n }\n\n const timer = setTimeout(() => {\n inputLikeTextRef.current?.focus();\n }, 0);\n\n return () => {\n clearTimeout(timer);\n };\n }, []);\n\n const resolvedRightIcon =\n rightIcon === undefined ? (\n <span\n className={cx(styles.rightIcon(), styles.rightIconDefault(theme), {\n [styles.rightIconInteractive()]: hasDropdown && !disabled,\n })}\n >\n <TimeClockIcon size={size} />\n </span>\n ) : (\n rightIcon\n );\n const suffixMarginLeft = getTimePickerSuffixMargin(size, theme);\n const inputMinWidth = getTimePickerInputMinWidth(size, format, resolvedRightIcon !== null, theme);\n\n return (\n <InputLikeText\n ref={inputLikeTextRef}\n {...rest}\n takeContentWidth\n disabled={disabled}\n size={size}\n inputMode={'numeric'}\n width={width ?? 'auto'}\n suffix={suffix && <span style={{ marginLeft: suffixMarginLeft }}>{suffix}</span>}\n style={{ ...style, minWidth: inputMinWidth, ...corners }}\n rightIcon={resolvedRightIcon}\n value={value}\n >\n <TimeFragmentsView\n ref={fragmentsViewRef}\n format={format}\n size={size}\n value={value}\n onSelectSegment={onSelectSegment}\n />\n </InputLikeText>\n );\n});\n"]}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import type { AriaAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { CommonProps } from '../../internal/CommonWrapper/index.js';
|
|
4
|
-
import type { SizeProp } from '../../lib/types/props.js';
|
|
5
|
-
import type { TimeFormat, TimeItem } from './helpers/TimePicker.shared.js';
|
|
6
|
-
export interface TimePickerProps extends CommonProps, Pick<AriaAttributes, 'aria-describedby' | 'aria-label'>, Pick<HTMLAttributes<HTMLElement>, 'id'> {
|
|
7
|
-
/** Устанавливает формат времени @default HH:mm */
|
|
8
|
-
format?: TimeFormat;
|
|
9
|
-
/** Определяет массив объектов с элементами в формате TimeItem. */
|
|
10
|
-
items?: TimeItem[];
|
|
11
|
-
/** Задает нижнюю границу времени. Элементы за границей становятся заблокированными. */
|
|
12
|
-
minTime?: string;
|
|
13
|
-
/** Задает верхнюю границу времени. Элементы за границей становятся заблокированными. */
|
|
14
|
-
maxTime?: string;
|
|
15
|
-
/** Значение поля @param value. */
|
|
16
|
-
value?: string;
|
|
17
|
-
/** Устанавливает фокус на поле ввода после окончания загрузки страницы @default false */
|
|
18
|
-
autoFocus?: boolean;
|
|
19
|
-
/** Делает компонент заблокированным. */
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
/** Переводит контрол в состояние валидации ошибки. */
|
|
22
|
-
error?: boolean;
|
|
23
|
-
/** Переводит контрол в состояние валидации предупреждения. */
|
|
24
|
-
warning?: boolean;
|
|
25
|
-
/** Включает нативный системный выбор времени на мобильных устройствах. */
|
|
26
|
-
useMobileNativeTimePicker?: boolean;
|
|
27
|
-
/** Расположение выпадающего меню. */
|
|
28
|
-
menuPos?: 'top' | 'bottom';
|
|
29
|
-
/** Выравнивание выпадающего меню. */
|
|
30
|
-
menuAlign?: 'left' | 'right';
|
|
31
|
-
/** Ширина выпадающего меню. По умолчанию — минимальная ширина поля ввода, расширяется по контенту. */
|
|
32
|
-
menuWidth?: string | number;
|
|
33
|
-
/** Задает ширину поля. */
|
|
34
|
-
width?: string | number;
|
|
35
|
-
/** Переопределяет иконку или скрывает, если передать `null`. */
|
|
36
|
-
rightIcon?: React.ReactNode | (() => React.ReactNode);
|
|
37
|
-
/** Устанавливает суффикс после значения и перед иконкой. */
|
|
38
|
-
suffix?: ReactNode;
|
|
39
|
-
/** Размер поля ввода и выпадающего меню. */
|
|
40
|
-
size?: SizeProp;
|
|
41
|
-
/** Устанавливает радиус скруглений углов.
|
|
42
|
-
* @ignore */
|
|
43
|
-
corners?: Partial<Pick<React.CSSProperties, 'borderTopRightRadius' | 'borderBottomRightRadius' | 'borderBottomLeftRadius' | 'borderTopLeftRadius'>>;
|
|
44
|
-
/** Задает функцию, которая вызывается при нажатии на контрол. */
|
|
45
|
-
onClick?(event: React.MouseEvent<HTMLElement>): void;
|
|
46
|
-
/**
|
|
47
|
-
* Событие изменения значения `value` в поле.
|
|
48
|
-
* Во процессе ввода значение частично нормализуется по сегментам, например `1` => `01`.
|
|
49
|
-
* При потере фокуса возвращает полностью нормализованное значение в формате `HH:mm[:ss]`.
|
|
50
|
-
*/
|
|
51
|
-
onValueChange?(value: string): void;
|
|
52
|
-
/** Событие потери фокуса. */
|
|
53
|
-
onBlur?(event: React.FocusEvent<HTMLElement>): void;
|
|
54
|
-
/** Событие получения фокуса. */
|
|
55
|
-
onFocus?(event: React.FocusEvent<HTMLElement>): void;
|
|
56
|
-
/** Событие нажатия клавиши. */
|
|
57
|
-
onKeyDown?(event: React.KeyboardEvent<HTMLElement>): void;
|
|
58
|
-
/** Событие вставки из буфера. */
|
|
59
|
-
onPaste?(event: React.ClipboardEvent<HTMLElement>): void;
|
|
60
|
-
}
|
|
61
|
-
export interface TimePickerRef {
|
|
62
|
-
/** Устанавливает фокус на поле ввода. */
|
|
63
|
-
focus(): void;
|
|
64
|
-
/** Снимает фокус с поля ввода. */
|
|
65
|
-
blur(): void;
|
|
66
|
-
/** Закрывает выпадающее меню. */
|
|
67
|
-
close(): void;
|
|
68
|
-
/** Запускает анимацию blink у поля ввода времени. */
|
|
69
|
-
blink(): void;
|
|
70
|
-
/** Возвращает корневой DOM-узел компонента. */
|
|
71
|
-
getRootNode(): HTMLElement | null;
|
|
72
|
-
}
|
|
73
|
-
export type TimePicker = TimePickerRef;
|
|
74
|
-
/** Поле с временем помогает вводить время с клавиатуры или выбирать его с помощью мыши. */
|
|
75
|
-
export declare const TimePicker: import("../../lib/forwardRefAndName.js").ReactUIComponentWithRef<TimePickerRef, TimePickerProps> & Record<never, never> & {
|
|
76
|
-
validate: (value: import("../../typings/utility-types.js").Nullable<string>, options?: import("./helpers/validateTimePicker.js").TimePickerValidationOptions) => boolean;
|
|
77
|
-
};
|