@gravity-ui/date-components 2.4.0 → 2.6.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/dist/cjs/components/Calendar/Calendar.js +1 -0
- package/dist/cjs/components/CalendarView/CalendarView.js +1 -0
- package/dist/cjs/components/DateField/DateField.js +5 -3
- package/dist/cjs/components/DateField/hooks/useBaseDateFieldState.d.ts +2 -0
- package/dist/cjs/components/DateField/hooks/useBaseDateFieldState.js +1 -0
- package/dist/cjs/components/DateField/hooks/useDateFieldState.js +1 -1
- package/dist/cjs/components/DateField/utils.d.ts +1 -2
- package/dist/cjs/components/DateField/utils.js +6 -17
- package/dist/cjs/components/DatePicker/DatePicker.d.ts +5 -2
- package/dist/cjs/components/DatePicker/DatePicker.js +5 -3
- package/dist/cjs/components/DatePicker/MobileCalendar.js +1 -0
- package/dist/cjs/components/DatePicker/hooks/datePickerStateFactory.d.ts +7 -3
- package/dist/cjs/components/DatePicker/hooks/datePickerStateFactory.js +7 -6
- package/dist/cjs/components/DatePicker/hooks/useDatePickerProps.js +33 -6
- package/dist/cjs/components/HiddenInput/HiddenInput.d.ts +14 -0
- package/dist/cjs/components/HiddenInput/HiddenInput.js +37 -0
- package/dist/cjs/components/RangeCalendar/RangeCalendar.js +1 -0
- package/dist/cjs/components/RangeDateField/RangeDateField.js +6 -1
- package/dist/cjs/components/RangeDatePicker/RangeDatePicker.js +5 -1
- package/dist/cjs/components/RelativeDateField/RelativeDateField.js +5 -4
- package/dist/cjs/components/RelativeDateField/hooks/useRelativeDateFieldState.js +2 -8
- package/dist/cjs/components/RelativeDatePicker/RelativeDatePicker.js +6 -3
- package/dist/cjs/components/RelativeRangeDatePicker/RelativeRangeDatePicker.d.ts +2 -2
- package/dist/cjs/components/RelativeRangeDatePicker/RelativeRangeDatePicker.js +15 -2
- package/dist/cjs/components/RelativeRangeDatePicker/components/PickerDialog/PickerDialog.js +1 -0
- package/dist/cjs/components/RelativeRangeDatePicker/components/Presets/Presets.js +1 -0
- package/dist/cjs/components/RelativeRangeDatePicker/components/Presets/PresetsDoc.js +1 -0
- package/dist/cjs/components/RelativeRangeDatePicker/components/Zones/Zones.js +1 -0
- package/dist/cjs/components/types/datePicker.d.ts +8 -0
- package/dist/cjs/components/types/inputs.d.ts +5 -0
- package/dist/cjs/components/utils/mergeProps.js +3 -3
- package/dist/cjs/components/utils/validation/datePicker.js +2 -2
- package/dist/esm/components/Calendar/Calendar.js +1 -0
- package/dist/esm/components/CalendarView/CalendarView.js +1 -0
- package/dist/esm/components/DateField/DateField.js +5 -3
- package/dist/esm/components/DateField/hooks/useBaseDateFieldState.d.ts +2 -0
- package/dist/esm/components/DateField/hooks/useBaseDateFieldState.js +1 -0
- package/dist/esm/components/DateField/hooks/useDateFieldState.js +1 -1
- package/dist/esm/components/DateField/utils.d.ts +1 -2
- package/dist/esm/components/DateField/utils.js +5 -15
- package/dist/esm/components/DatePicker/DatePicker.d.ts +5 -2
- package/dist/esm/components/DatePicker/DatePicker.js +5 -3
- package/dist/esm/components/DatePicker/MobileCalendar.js +1 -0
- package/dist/esm/components/DatePicker/hooks/datePickerStateFactory.d.ts +7 -3
- package/dist/esm/components/DatePicker/hooks/datePickerStateFactory.js +7 -6
- package/dist/esm/components/DatePicker/hooks/useDatePickerProps.js +33 -6
- package/dist/esm/components/HiddenInput/HiddenInput.d.ts +14 -0
- package/dist/esm/components/HiddenInput/HiddenInput.js +31 -0
- package/dist/esm/components/RangeCalendar/RangeCalendar.js +1 -0
- package/dist/esm/components/RangeDateField/RangeDateField.js +7 -2
- package/dist/esm/components/RangeDatePicker/RangeDatePicker.js +5 -1
- package/dist/esm/components/RelativeDateField/RelativeDateField.js +5 -4
- package/dist/esm/components/RelativeDateField/hooks/useRelativeDateFieldState.js +3 -11
- package/dist/esm/components/RelativeDatePicker/RelativeDatePicker.js +6 -3
- package/dist/esm/components/RelativeRangeDatePicker/RelativeRangeDatePicker.d.ts +2 -2
- package/dist/esm/components/RelativeRangeDatePicker/RelativeRangeDatePicker.js +15 -2
- package/dist/esm/components/RelativeRangeDatePicker/components/PickerDialog/PickerDialog.js +1 -0
- package/dist/esm/components/RelativeRangeDatePicker/components/Presets/Presets.js +1 -0
- package/dist/esm/components/RelativeRangeDatePicker/components/Presets/PresetsDoc.js +1 -0
- package/dist/esm/components/RelativeRangeDatePicker/components/Zones/Zones.js +1 -0
- package/dist/esm/components/types/datePicker.d.ts +8 -0
- package/dist/esm/components/types/inputs.d.ts +5 -0
- package/dist/esm/components/utils/mergeProps.js +3 -3
- package/dist/esm/components/utils/validation/datePicker.js +2 -2
- package/package.json +26 -19
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { dateTimeParse,
|
|
3
|
-
// @ts-expect-error added in new version of date-utils
|
|
4
|
-
isLikeRelative, isValid, } from '@gravity-ui/date-utils';
|
|
2
|
+
import { dateTimeParse, isLikeRelative, isValid } from '@gravity-ui/date-utils';
|
|
5
3
|
import { useControlledState } from '@gravity-ui/uikit';
|
|
6
4
|
export function useRelativeDateFieldState(props) {
|
|
7
5
|
var _a;
|
|
@@ -15,7 +13,7 @@ export function useRelativeDateFieldState(props) {
|
|
|
15
13
|
return;
|
|
16
14
|
}
|
|
17
15
|
setText(t);
|
|
18
|
-
if (
|
|
16
|
+
if (isLikeRelative(t)) {
|
|
19
17
|
const date = dateTimeParse(t);
|
|
20
18
|
if (date && isValid(date)) {
|
|
21
19
|
setValue(t);
|
|
@@ -34,7 +32,7 @@ export function useRelativeDateFieldState(props) {
|
|
|
34
32
|
return null;
|
|
35
33
|
}
|
|
36
34
|
return (_a = dateTimeParse(value, { timeZone: props.timeZone, roundUp: props.roundUp })) !== null && _a !== void 0 ? _a : null;
|
|
37
|
-
}, [value, props.timeZone]);
|
|
35
|
+
}, [value, props.timeZone, props.roundUp]);
|
|
38
36
|
const [lastCorrectDate, setLastCorrectDate] = React.useState(parsedDate);
|
|
39
37
|
if (parsedDate && parsedDate !== lastCorrectDate) {
|
|
40
38
|
setLastCorrectDate(parsedDate);
|
|
@@ -57,9 +55,3 @@ export function useRelativeDateFieldState(props) {
|
|
|
57
55
|
readOnly: props.readOnly,
|
|
58
56
|
};
|
|
59
57
|
}
|
|
60
|
-
function isLikeRelativeDate(text) {
|
|
61
|
-
if (typeof isLikeRelative === 'function') {
|
|
62
|
-
return isLikeRelative(text);
|
|
63
|
-
}
|
|
64
|
-
return /^now/i.test(text);
|
|
65
|
-
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { Calendar as CalendarIcon, Clock as ClockIcon, Function as FunctionIcon, } from '@gravity-ui/icons';
|
|
@@ -7,11 +8,13 @@ import { Calendar } from '../Calendar';
|
|
|
7
8
|
import { DateField } from '../DateField';
|
|
8
9
|
import { MobileCalendar } from '../DatePicker/MobileCalendar';
|
|
9
10
|
import { StubButton } from '../DatePicker/StubButton';
|
|
11
|
+
import { HiddenInput } from '../HiddenInput/HiddenInput';
|
|
10
12
|
import { useRelativeDatePickerProps } from './hooks/useRelativeDatePickerProps';
|
|
11
13
|
import { useRelativeDatePickerState } from './hooks/useRelativeDatePickerState';
|
|
12
14
|
import './RelativeDatePicker.css';
|
|
13
15
|
const b = block('relative-date-picker');
|
|
14
16
|
export function RelativeDatePicker(props) {
|
|
17
|
+
var _a;
|
|
15
18
|
const state = useRelativeDatePickerState(props);
|
|
16
19
|
const { groupProps, fieldProps, modeSwitcherProps, calendarButtonProps, popupProps, calendarProps, timeInputProps, } = useRelativeDatePickerProps(state, props);
|
|
17
20
|
const anchorRef = React.useRef(null);
|
|
@@ -23,9 +26,9 @@ export function RelativeDatePicker(props) {
|
|
|
23
26
|
readOnly: props.readOnly,
|
|
24
27
|
placeholderValue: props.placeholderValue,
|
|
25
28
|
timeZone: props.timeZone,
|
|
26
|
-
} })), _jsx(TextInput, Object.assign({}, fieldProps, { controlProps: Object.assign(Object.assign({}, fieldProps.controlProps), { disabled: isMobile && state.mode === 'absolute', className: b('input', { mobile: isMobile && state.mode === 'absolute' }) }), hasClear: props.hasClear && !(isMobile && state.mode === 'absolute'), startContent: _jsx(Button, Object.assign({}, modeSwitcherProps, { children: _jsx(Icon, { data: FunctionIcon }) })), endContent: _jsxs(React.Fragment, { children: [!isMobile && !isOnlyTime && (_jsx(Button, Object.assign({}, calendarButtonProps, { children: _jsx(Icon, { data: CalendarIcon }) }))), !isMobile && isOnlyTime && (_jsx(StubButton, { size: calendarButtonProps.size, icon: ClockIcon })), isMobile && state.mode === 'absolute' && (_jsx(StubButton, { size: calendarButtonProps.size, icon: isOnlyTime ? ClockIcon : CalendarIcon }))] }) })), _jsx(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
} })), _jsx(TextInput, Object.assign({}, fieldProps, { controlProps: Object.assign(Object.assign({}, fieldProps.controlProps), { disabled: isMobile && state.mode === 'absolute', className: b('input', { mobile: isMobile && state.mode === 'absolute' }) }), hasClear: props.hasClear && !(isMobile && state.mode === 'absolute'), startContent: _jsx(Button, Object.assign({}, modeSwitcherProps, { children: _jsx(Icon, { data: FunctionIcon }) })), endContent: _jsxs(React.Fragment, { children: [!isMobile && !isOnlyTime && (_jsx(Button, Object.assign({}, calendarButtonProps, { children: _jsx(Icon, { data: CalendarIcon }) }))), !isMobile && isOnlyTime && (_jsx(StubButton, { size: calendarButtonProps.size, icon: ClockIcon })), isMobile && state.mode === 'absolute' && (_jsx(StubButton, { size: calendarButtonProps.size, icon: isOnlyTime ? ClockIcon : CalendarIcon }))] }) })), _jsx(HiddenInput, { name: props.name, value: (_a = state.value) === null || _a === void 0 ? void 0 : _a.type, disabled: state.disabled, form: props.form }), _jsx(HiddenInput, { name: props.name, value: state.value, toStringValue: (value) => getNativeValue(value), onReset: (value) => {
|
|
30
|
+
state.setValue(value);
|
|
31
|
+
}, disabled: state.disabled, form: props.form }), !isMobile && !isOnlyTime && (_jsx(Popup, Object.assign({}, popupProps, { anchorRef: anchorRef, children: _jsxs("div", { className: b('popup-content'), children: [typeof props.children === 'function' ? (props.children(calendarProps)) : (_jsx(Calendar, Object.assign({}, calendarProps))), state.datePickerState.hasTime && (_jsx("div", { className: b('time-field-wrapper'), children: _jsx(DateField, Object.assign({}, timeInputProps)) }))] }) })))] })));
|
|
29
32
|
}
|
|
30
33
|
function getNativeValue(value) {
|
|
31
34
|
if (!value) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DateTime } from '@gravity-ui/date-utils';
|
|
2
2
|
import type { Value } from '../RelativeDatePicker';
|
|
3
|
-
import type { DomProps, FocusableProps, InputBase, RangeValue, StyleProps, TextInputProps, Validation } from '../types';
|
|
3
|
+
import type { DomProps, FocusableProps, InputBase, InputDOMProps, RangeValue, StyleProps, TextInputProps, Validation } from '../types';
|
|
4
4
|
import type { Preset } from './components/Presets/defaultPresets';
|
|
5
5
|
import type { PresetTab } from './components/Presets/utils';
|
|
6
6
|
import type { RelativeRangeDatePickerStateOptions } from './hooks/useRelativeRangeDatePickerState';
|
|
7
7
|
import './RelativeRangeDatePicker.css';
|
|
8
|
-
export interface RelativeRangeDatePickerProps extends RelativeRangeDatePickerStateOptions, DomProps, InputBase, TextInputProps, Validation, FocusableProps, StyleProps {
|
|
8
|
+
export interface RelativeRangeDatePickerProps extends RelativeRangeDatePickerStateOptions, DomProps, InputBase, InputDOMProps, TextInputProps, Validation, FocusableProps, StyleProps {
|
|
9
9
|
/** Format of the date when rendered in the input. [Available formats](https://day.js.org/docs/en/display/format) */
|
|
10
10
|
format?: string;
|
|
11
11
|
/** A placeholder date that controls the default values of each segment when the user first interacts with them. Defaults to today's date at midnight. */
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import { Calendar as CalendarIcon } from '@gravity-ui/icons';
|
|
4
5
|
import { Button, Icon, TextInput, useFocusWithin, useMobile } from '@gravity-ui/uikit';
|
|
5
6
|
import { block } from '../../utils/cn';
|
|
7
|
+
import { HiddenInput } from '../HiddenInput/HiddenInput';
|
|
6
8
|
import { getButtonSizeForInput } from '../utils/getButtonSizeForInput';
|
|
7
9
|
import { PickerDialog } from './components/PickerDialog/PickerDialog';
|
|
8
10
|
import { useRelativeRangeDatePickerState } from './hooks/useRelativeRangeDatePickerState';
|
|
@@ -49,7 +51,7 @@ export function RelativeRangeDatePicker(props) {
|
|
|
49
51
|
}), [alwaysShowAsAbsolute, format, getRangeTitle, presetTabs, state.timeZone, state.value]);
|
|
50
52
|
const validationState = props.validationState || (state.isInvalid ? 'invalid' : undefined);
|
|
51
53
|
const errorMessage = (_a = props.errorMessage) !== null && _a !== void 0 ? _a : state.errors.join('\n');
|
|
52
|
-
return (_jsxs("div", Object.assign({ ref: anchorRef }, focusWithinProps, { className: b(null, props.className), style: props.style, children: [_jsx(TextInput, { autoFocus: props.autoFocus, controlRef: inputRef, value: text, placeholder: props.placeholder, onUpdate: (v) => {
|
|
54
|
+
return (_jsxs("div", Object.assign({ ref: anchorRef }, focusWithinProps, { className: b(null, props.className), style: props.style, children: [_jsx(TextInput, { id: props.id, autoFocus: props.autoFocus, controlRef: inputRef, value: text, placeholder: props.placeholder, onUpdate: (v) => {
|
|
53
55
|
if (!props.readOnly && !v) {
|
|
54
56
|
state.setValue(null, 'default');
|
|
55
57
|
}
|
|
@@ -84,7 +86,18 @@ export function RelativeRangeDatePicker(props) {
|
|
|
84
86
|
}), onClick: () => {
|
|
85
87
|
setIsActive(true);
|
|
86
88
|
setOpen(true);
|
|
87
|
-
} })) : null, _jsx(
|
|
89
|
+
} })) : null, _jsx(HiddenInput, { name: props.name, form: props.form, value: state.value, toStringValue: (v) => { var _a, _b; return (_b = (_a = v === null || v === void 0 ? void 0 : v.start) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : ''; }, disabled: props.disabled }), _jsx(HiddenInput, { name: props.name, form: props.form, value: state.value, toStringValue: (v) => { var _a; return getNativeValue((_a = v === null || v === void 0 ? void 0 : v.start) !== null && _a !== void 0 ? _a : null); }, disabled: props.disabled }), _jsx(HiddenInput, { name: props.name, form: props.form, value: state.value, toStringValue: (v) => { var _a, _b; return (_b = (_a = v === null || v === void 0 ? void 0 : v.end) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : ''; }, disabled: props.disabled }), _jsx(HiddenInput, { name: props.name, form: props.form, value: state.value, toStringValue: (v) => { var _a; return getNativeValue((_a = v === null || v === void 0 ? void 0 : v.end) !== null && _a !== void 0 ? _a : null); }, disabled: props.disabled }), _jsx(HiddenInput, { name: props.name, form: props.form, onReset: (v) => {
|
|
90
|
+
state.setValue(v.value, v.timeZone);
|
|
91
|
+
}, value: { value: state.value, timeZone: state.timeZone }, toStringValue: (v) => v.timeZone, disabled: props.disabled }), _jsx(PickerDialog, { state: state, props: props, open: open, onClose: () => {
|
|
88
92
|
setOpen(false);
|
|
89
93
|
}, anchorRef: anchorRef, isMobile: isMobile, className: props.className })] })));
|
|
90
94
|
}
|
|
95
|
+
function getNativeValue(value) {
|
|
96
|
+
if (!value) {
|
|
97
|
+
return '';
|
|
98
|
+
}
|
|
99
|
+
if (value.type === 'relative') {
|
|
100
|
+
return value.value;
|
|
101
|
+
}
|
|
102
|
+
return value.value.toISOString();
|
|
103
|
+
}
|
|
@@ -17,3 +17,11 @@ export interface DateFieldBase<T = DateTime> extends ValueBase<T | null>, InputB
|
|
|
17
17
|
*/
|
|
18
18
|
timeZone?: string;
|
|
19
19
|
}
|
|
20
|
+
export interface PopupTriggerProps<Args extends unknown[] = []> {
|
|
21
|
+
/** Whether the popup is open (controlled). */
|
|
22
|
+
open?: boolean;
|
|
23
|
+
/** Whether the popup is open by default (uncontrolled). */
|
|
24
|
+
defaultOpen?: boolean;
|
|
25
|
+
/** Handler that is called when the popup's open state changes. */
|
|
26
|
+
onOpenChange?: (open: boolean, ...args: Args) => void;
|
|
27
|
+
}
|
|
@@ -29,6 +29,11 @@ export interface InputDOMProps {
|
|
|
29
29
|
* The name of the input element, used when submitting an HTML form.
|
|
30
30
|
*/
|
|
31
31
|
name?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The id of a <form> in the same document. If this attribute is not set,
|
|
34
|
+
* the <input> is associated with its ancestor <form> element, if any.
|
|
35
|
+
*/
|
|
36
|
+
form?: string;
|
|
32
37
|
}
|
|
33
38
|
export interface InputBase {
|
|
34
39
|
/**
|
|
@@ -34,9 +34,9 @@ export function mergeProps(...args) {
|
|
|
34
34
|
}
|
|
35
35
|
function chain(...fns) {
|
|
36
36
|
return (...args) => {
|
|
37
|
-
for (const
|
|
38
|
-
if (typeof
|
|
39
|
-
|
|
37
|
+
for (const fn of fns) {
|
|
38
|
+
if (typeof fn === 'function') {
|
|
39
|
+
fn(...args);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
@@ -6,13 +6,13 @@ export function getValidationResult(value, minValue, maxValue, isDateUnavailable
|
|
|
6
6
|
const isInvalid = rangeOverflow || rangeUnderflow || isUnavailable;
|
|
7
7
|
const errors = [];
|
|
8
8
|
if (isInvalid) {
|
|
9
|
-
if (rangeUnderflow) {
|
|
9
|
+
if (rangeUnderflow && minValue) {
|
|
10
10
|
errors.push(i18n('Value must be {minValue} or later.', {
|
|
11
11
|
minValue: minValue.timeZone(timeZone).format(),
|
|
12
12
|
value: valueTitle,
|
|
13
13
|
}));
|
|
14
14
|
}
|
|
15
|
-
if (rangeOverflow) {
|
|
15
|
+
if (rangeOverflow && maxValue) {
|
|
16
16
|
errors.push(i18n('Value must be {maxValue} or earlier.', {
|
|
17
17
|
maxValue: maxValue.timeZone(timeZone).format(),
|
|
18
18
|
value: valueTitle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/date-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@bem-react/classname": "^1.6.0",
|
|
49
|
-
"@gravity-ui/date-utils": "^2.
|
|
49
|
+
"@gravity-ui/date-utils": "^2.5.3",
|
|
50
50
|
"@gravity-ui/icons": "^2.2.0",
|
|
51
51
|
"tslib": "^2.6.2"
|
|
52
52
|
},
|
|
@@ -60,24 +60,28 @@
|
|
|
60
60
|
"@gravity-ui/prettier-config": "^1.1.0",
|
|
61
61
|
"@gravity-ui/stylelint-config": "^4.0.1",
|
|
62
62
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
63
|
-
"@gravity-ui/uikit": "^6.
|
|
64
|
-
"@storybook/addon-a11y": "^8.
|
|
65
|
-
"@storybook/addon-essentials": "^8.
|
|
66
|
-
"@storybook/addon-
|
|
63
|
+
"@gravity-ui/uikit": "^6.15.0",
|
|
64
|
+
"@storybook/addon-a11y": "^8.1.10",
|
|
65
|
+
"@storybook/addon-essentials": "^8.1.10",
|
|
66
|
+
"@storybook/addon-storysource": "8.1.10",
|
|
67
|
+
"@storybook/addon-viewport": "^8.1.10",
|
|
67
68
|
"@storybook/addon-webpack5-compiler-babel": "^3.0.3",
|
|
68
|
-
"@storybook/blocks": "^8.
|
|
69
|
-
"@storybook/manager-api": "^8.
|
|
69
|
+
"@storybook/blocks": "^8.1.10",
|
|
70
|
+
"@storybook/manager-api": "^8.1.10",
|
|
70
71
|
"@storybook/preset-scss": "^1.0.3",
|
|
71
|
-
"@storybook/react": "^8.
|
|
72
|
-
"@storybook/react-webpack5": "^8.
|
|
73
|
-
"@storybook/theming": "^8.
|
|
74
|
-
"@
|
|
75
|
-
"@testing-library/
|
|
72
|
+
"@storybook/react": "^8.1.10",
|
|
73
|
+
"@storybook/react-webpack5": "^8.1.10",
|
|
74
|
+
"@storybook/theming": "^8.1.10",
|
|
75
|
+
"@storybook/types": "^8.1.10",
|
|
76
|
+
"@testing-library/dom": "^10.1.0",
|
|
77
|
+
"@testing-library/jest-dom": "^6.4.6",
|
|
78
|
+
"@testing-library/react": "^16.0.0",
|
|
76
79
|
"@testing-library/user-event": "^14.5.2",
|
|
77
80
|
"@types/jest": "^29.5.12",
|
|
78
81
|
"@types/react": "^18.3.2",
|
|
79
82
|
"@types/react-dom": "^18.3.0",
|
|
80
83
|
"eslint": "^8.57.0",
|
|
84
|
+
"eslint-plugin-react-compiler": "^0.0.0-experimental-c8b3f72-20240517",
|
|
81
85
|
"eslint-plugin-testing-library": "^6.2.2",
|
|
82
86
|
"gulp": "^5.0.0",
|
|
83
87
|
"gulp-cli": "^3.0.0",
|
|
@@ -85,8 +89,8 @@
|
|
|
85
89
|
"gulp-replace": "^1.1.4",
|
|
86
90
|
"gulp-typescript": "^5.0.1",
|
|
87
91
|
"husky": "^9.0.11",
|
|
88
|
-
"jest": "^29.
|
|
89
|
-
"jest-environment-jsdom": "^29.
|
|
92
|
+
"jest": "^29.7.0",
|
|
93
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
90
94
|
"jest-transform-css": "^6.0.1",
|
|
91
95
|
"nano-staged": "^0.8.0",
|
|
92
96
|
"npm-run-all": "^4.1.5",
|
|
@@ -95,17 +99,20 @@
|
|
|
95
99
|
"react-dom": "^18.3.1",
|
|
96
100
|
"rimraf": "^5.0.7",
|
|
97
101
|
"sass": "^1.77.1",
|
|
98
|
-
"storybook": "^8.
|
|
102
|
+
"storybook": "^8.1.10",
|
|
99
103
|
"stylelint": "^15.11.0",
|
|
100
104
|
"stylelint-use-logical": "^2.1.2",
|
|
101
|
-
"ts-jest": "^29.1.
|
|
105
|
+
"ts-jest": "^29.1.5",
|
|
102
106
|
"ts-node": "^10.9.2",
|
|
103
107
|
"typescript": "^5.4.5"
|
|
104
108
|
},
|
|
105
109
|
"peerDependencies": {
|
|
106
110
|
"@gravity-ui/uikit": "^6.0.0",
|
|
107
|
-
"react": "
|
|
108
|
-
"react-dom": "
|
|
111
|
+
"react": ">=17.0.0",
|
|
112
|
+
"react-dom": ">=17.0.0"
|
|
113
|
+
},
|
|
114
|
+
"overrides": {
|
|
115
|
+
"nwsapi": "2.2.2"
|
|
109
116
|
},
|
|
110
117
|
"nano-staged": {
|
|
111
118
|
"*.{scss}": [
|