@salutejs/sdds-cs 0.228.0-canary.1702.12763507639.0 → 0.228.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -50,6 +50,7 @@ import { CellTextbox } from '@salutejs/plasma-new-hope/styled-components';
50
50
  import { CellTextboxLabel } from '@salutejs/plasma-new-hope/styled-components';
51
51
  import { CellTextboxSubtitle } from '@salutejs/plasma-new-hope/styled-components';
52
52
  import { CellTextboxTitle } from '@salutejs/plasma-new-hope/styled-components';
53
+ import { ChangeEvent } from 'react';
53
54
  import { ChangeInstanceCallback } from '@salutejs/plasma-new-hope/types/components/DatePicker/RangeDate/RangeDate.types';
54
55
  import { CheckboxProps as CheckboxProps_2 } from '@salutejs/plasma-new-hope/types/components/Checkbox/Checkbox.types';
55
56
  import { ChipGroupProps } from '@salutejs/plasma-new-hope/types/components/ChipGroup/ChipGroup.types';
@@ -109,7 +110,6 @@ import { FC } from 'react';
109
110
  import { FileProcessHandler } from '@salutejs/plasma-new-hope/types/components/Dropzone/Dropzone.types';
110
111
  import { Filter } from '@salutejs/plasma-new-hope/types/engines/types';
111
112
  import { FlowProps } from '@salutejs/plasma-new-hope/styled-components';
112
- import { FocusEvent as FocusEvent_2 } from 'react';
113
113
  import { FormTypeNumber } from '@salutejs/plasma-new-hope/types/types/FormType';
114
114
  import { FormTypeString } from '@salutejs/plasma-new-hope/types/types/FormType';
115
115
  import { ForwardRefExoticComponent } from 'react';
@@ -1394,10 +1394,10 @@ secondTextfieldContentLeft?: ReactElement<any, string | JSXElementConstructor<an
1394
1394
  secondTextfieldContentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1395
1395
  firstTextfieldTextAfter?: string | undefined;
1396
1396
  secondTextfieldTextAfter?: string | undefined;
1397
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1398
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1399
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1400
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1397
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1398
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1399
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1400
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1401
1401
  firstTextfieldTextBefore?: string | undefined;
1402
1402
  secondTextfieldTextBefore?: string | undefined;
1403
1403
  dividerVariant?: "none" | "dash" | "icon" | undefined;
@@ -1405,7 +1405,6 @@ dividerIcon?: ReactNode;
1405
1405
  } & DatePickerCalendarProps & Omit<DatePickerPopoverProps, "placement"> & {
1406
1406
  placement?: DatePickerRangePlacement | DatePickerRangePlacement[] | undefined;
1407
1407
  isDoubleCalendar?: boolean | undefined;
1408
- closeAfterDateSelect?: boolean | undefined;
1409
1408
  } & HTMLAttributes<HTMLDivElement> & RefAttributes<RangeInputRefs>>;
1410
1409
 
1411
1410
  export { DatePickerRangePlacement }
@@ -2428,6 +2427,7 @@ value?: number | undefined;
2428
2427
  min?: number | undefined;
2429
2428
  max?: number | undefined;
2430
2429
  step?: number | undefined;
2430
+ precision?: number | undefined;
2431
2431
  isLoading?: boolean | undefined;
2432
2432
  loader?: ReactNode;
2433
2433
  size?: string | undefined;
@@ -2453,6 +2453,7 @@ value?: number | undefined;
2453
2453
  min?: number | undefined;
2454
2454
  max?: number | undefined;
2455
2455
  step?: number | undefined;
2456
+ precision?: number | undefined;
2456
2457
  isLoading?: boolean | undefined;
2457
2458
  loader?: ReactNode;
2458
2459
  size?: string | undefined;
@@ -2621,10 +2622,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2621
2622
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2622
2623
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2623
2624
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2624
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2625
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2626
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2627
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2625
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2626
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2627
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2628
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2628
2629
  } & {
2629
2630
  firstTextfieldTextBefore: string;
2630
2631
  secondTextfieldTextBefore: string;
@@ -2660,10 +2661,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2660
2661
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2661
2662
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2662
2663
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2663
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2664
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2665
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2666
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2664
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2665
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2666
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2667
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2667
2668
  } & {
2668
2669
  dividerVariant?: "dash" | undefined;
2669
2670
  dividerIcon?: undefined;
@@ -2699,10 +2700,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2699
2700
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2700
2701
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2701
2702
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2702
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2703
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2704
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2705
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2703
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2704
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2705
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2706
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2706
2707
  } & {
2707
2708
  dividerIcon?: ReactNode;
2708
2709
  dividerVariant?: "icon" | undefined;
@@ -87,10 +87,10 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
87
87
  secondTextfieldContentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
88
88
  firstTextfieldTextAfter?: string | undefined;
89
89
  secondTextfieldTextAfter?: string | undefined;
90
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
91
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
92
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
93
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
90
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
91
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
92
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
93
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
94
94
  firstTextfieldTextBefore?: string | undefined;
95
95
  secondTextfieldTextBefore?: string | undefined;
96
96
  dividerVariant?: "none" | "dash" | "icon" | undefined;
@@ -98,5 +98,4 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
98
98
  } & import("@salutejs/plasma-new-hope/types/components/DatePicker/DatePickerBase.types").DatePickerCalendarProps & Omit<import("@salutejs/plasma-new-hope/types/components/DatePicker/SingleDate/SingleDate.types").DatePickerPopoverProps, "placement"> & {
99
99
  placement?: import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement | import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement[] | undefined;
100
100
  isDoubleCalendar?: boolean | undefined;
101
- closeAfterDateSelect?: boolean | undefined;
102
101
  } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<import("@salutejs/plasma-new-hope/styled-components").RangeInputRefs>>;
@@ -24,6 +24,7 @@ export declare const NumberInput: import("react").FunctionComponent<import("@sal
24
24
  min?: number | undefined;
25
25
  max?: number | undefined;
26
26
  step?: number | undefined;
27
+ precision?: number | undefined;
27
28
  isLoading?: boolean | undefined;
28
29
  loader?: import("react").ReactNode;
29
30
  size?: string | undefined;
@@ -49,6 +50,7 @@ export declare const NumberInput: import("react").FunctionComponent<import("@sal
49
50
  min?: number | undefined;
50
51
  max?: number | undefined;
51
52
  step?: number | undefined;
53
+ precision?: number | undefined;
52
54
  isLoading?: boolean | undefined;
53
55
  loader?: import("react").ReactNode;
54
56
  size?: string | undefined;
@@ -45,10 +45,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
45
45
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
46
46
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
47
47
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
48
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
49
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
50
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
51
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
48
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
49
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
50
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
51
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
52
52
  } & {
53
53
  firstTextfieldTextBefore: string;
54
54
  secondTextfieldTextBefore: string;
@@ -84,10 +84,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
84
84
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
85
85
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
86
86
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
87
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
88
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
89
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
90
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
87
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
88
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
89
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
90
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
91
91
  } & {
92
92
  dividerVariant?: "dash" | undefined;
93
93
  dividerIcon?: undefined;
@@ -123,10 +123,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
123
123
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
124
124
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
125
125
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
126
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
127
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
128
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
129
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
126
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
127
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
128
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
129
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
130
130
  } & {
131
131
  dividerIcon?: import("react").ReactNode;
132
132
  dividerVariant?: "icon" | undefined;
@@ -2,7 +2,7 @@ import React, { ComponentProps, useRef, useState } from 'react';
2
2
  import type { StoryObj, Meta } from '@storybook/react';
3
3
  import { action } from '@storybook/addon-actions';
4
4
  import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
5
- import { IconPlasma, IconCalendarOutline } from '@salutejs/plasma-icons';
5
+ import { IconPlasma, IconDisclosureDown, IconCalendarOutline } from '@salutejs/plasma-icons';
6
6
 
7
7
  import { IconButton } from '../IconButton/IconButton';
8
8
 
@@ -186,6 +186,7 @@ const StoryRange = ({
186
186
  const rangeRef = useRef(null);
187
187
 
188
188
  const [isOpen, setIsOpen] = useState(false);
189
+ const [firstDate, setFirstDate] = useState<string | Date>('');
189
190
 
190
191
  const iconSize = 's';
191
192
  const showDividerIcon = dividerVariant === 'icon';
@@ -232,6 +233,12 @@ const StoryRange = ({
232
233
  onChangeSecondValue={(e, currentValue) => {
233
234
  onChangeSecondValue(e, currentValue);
234
235
  }}
236
+ onCommitFirstDate={(currentValue) => {
237
+ setFirstDate(currentValue);
238
+ }}
239
+ onCommitSecondDate={(currentValue) => {
240
+ firstDate && currentValue && setIsOpen(false);
241
+ }}
235
242
  {...dividerIconProps}
236
243
  {...rest}
237
244
  />
@@ -260,7 +267,6 @@ export const Range: StoryObj<StoryPropsRange> = {
260
267
  view: 'default',
261
268
  lang: 'ru',
262
269
  format: 'DD.MM.YYYY',
263
- closeAfterDateSelect: true,
264
270
  isDoubleCalendar: false,
265
271
  dividerVariant: 'dash',
266
272
  min: new Date(2024, 1, 1),
@@ -2,7 +2,7 @@ import React, { ComponentProps, useRef, useState } from 'react';
2
2
  import type { StoryObj, Meta } from '@storybook/react';
3
3
  import { action } from '@storybook/addon-actions';
4
4
  import { IconPlaceholder, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
5
- import { IconPlasma, IconCalendarOutline } from '@salutejs/plasma-icons';
5
+ import { IconPlasma, IconDisclosureDown, IconCalendarOutline } from '@salutejs/plasma-icons';
6
6
 
7
7
  import { IconButton } from '../IconButton/IconButton';
8
8
 
@@ -186,6 +186,7 @@ const StoryRange = ({
186
186
  const rangeRef = useRef(null);
187
187
 
188
188
  const [isOpen, setIsOpen] = useState(false);
189
+ const [firstDate, setFirstDate] = useState<string | Date>('');
189
190
 
190
191
  const iconSize = 's';
191
192
  const showDividerIcon = dividerVariant === 'icon';
@@ -232,6 +233,12 @@ const StoryRange = ({
232
233
  onChangeSecondValue={(e, currentValue) => {
233
234
  onChangeSecondValue(e, currentValue);
234
235
  }}
236
+ onCommitFirstDate={(currentValue) => {
237
+ setFirstDate(currentValue);
238
+ }}
239
+ onCommitSecondDate={(currentValue) => {
240
+ firstDate && currentValue && setIsOpen(false);
241
+ }}
235
242
  {...dividerIconProps}
236
243
  {...rest}
237
244
  />
@@ -260,7 +267,6 @@ export const Range: StoryObj<StoryPropsRange> = {
260
267
  view: 'default',
261
268
  lang: 'ru',
262
269
  format: 'DD.MM.YYYY',
263
- closeAfterDateSelect: true,
264
270
  isDoubleCalendar: false,
265
271
  dividerVariant: 'dash',
266
272
  min: new Date(2024, 1, 1),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/sdds-cs",
3
- "version": "0.228.0-canary.1702.12763507639.0",
3
+ "version": "0.228.0-dev.0",
4
4
  "description": "Salute Design System / React UI kit for SDDS CS web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "directory": "packages/sdds-cs"
53
53
  },
54
54
  "dependencies": {
55
- "@salutejs/plasma-new-hope": "0.239.0-canary.1702.12763507639.0",
55
+ "@salutejs/plasma-new-hope": "0.239.0-dev.0",
56
56
  "@salutejs/sdds-themes": "0.31.0"
57
57
  },
58
58
  "peerDependencies": {
@@ -144,5 +144,5 @@
144
144
  "Anton Vinogradov"
145
145
  ],
146
146
  "sideEffects": false,
147
- "gitHead": "4dfa771a4d2b642c4b972bf130fa97ec90ebefbd"
147
+ "gitHead": "4efac87175d043cba365570bcd31fa9faf900301"
148
148
  }