@salutejs/sdds-serv 0.224.0-canary.1702.12763507639.0 → 0.224.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';
@@ -1499,10 +1499,10 @@ secondTextfieldContentLeft?: ReactElement<any, string | JSXElementConstructor<an
1499
1499
  secondTextfieldContentRight?: ReactElement<any, string | JSXElementConstructor<any>> | undefined;
1500
1500
  firstTextfieldTextAfter?: string | undefined;
1501
1501
  secondTextfieldTextAfter?: string | undefined;
1502
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1503
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1504
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1505
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
1502
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1503
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1504
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1505
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
1506
1506
  firstTextfieldTextBefore?: string | undefined;
1507
1507
  secondTextfieldTextBefore?: string | undefined;
1508
1508
  dividerVariant?: "none" | "dash" | "icon" | undefined;
@@ -1510,7 +1510,6 @@ dividerIcon?: ReactNode;
1510
1510
  } & DatePickerCalendarProps & Omit<DatePickerPopoverProps, "placement"> & {
1511
1511
  placement?: DatePickerRangePlacement | DatePickerRangePlacement[] | undefined;
1512
1512
  isDoubleCalendar?: boolean | undefined;
1513
- closeAfterDateSelect?: boolean | undefined;
1514
1513
  } & HTMLAttributes<HTMLDivElement> & RefAttributes<RangeInputRefs>>;
1515
1514
 
1516
1515
  export { DatePickerRangePlacement }
@@ -2697,6 +2696,7 @@ value?: number | undefined;
2697
2696
  min?: number | undefined;
2698
2697
  max?: number | undefined;
2699
2698
  step?: number | undefined;
2699
+ precision?: number | undefined;
2700
2700
  isLoading?: boolean | undefined;
2701
2701
  loader?: ReactNode;
2702
2702
  size?: string | undefined;
@@ -2722,6 +2722,7 @@ value?: number | undefined;
2722
2722
  min?: number | undefined;
2723
2723
  max?: number | undefined;
2724
2724
  step?: number | undefined;
2725
+ precision?: number | undefined;
2725
2726
  isLoading?: boolean | undefined;
2726
2727
  loader?: ReactNode;
2727
2728
  size?: string | undefined;
@@ -2911,10 +2912,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2911
2912
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2912
2913
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2913
2914
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2914
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2915
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2916
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2917
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2915
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2916
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2917
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2918
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2918
2919
  } & {
2919
2920
  firstTextfieldTextBefore: string;
2920
2921
  secondTextfieldTextBefore: string;
@@ -2950,10 +2951,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2950
2951
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2951
2952
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2952
2953
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2953
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2954
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2955
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2956
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2954
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2955
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2956
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2957
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2957
2958
  } & {
2958
2959
  dividerVariant?: "dash" | undefined;
2959
2960
  dividerIcon?: undefined;
@@ -2989,10 +2990,10 @@ onChangeFirstValue?: BaseCallbackChangeInstance | undefined;
2989
2990
  onChangeSecondValue?: BaseCallbackChangeInstance | undefined;
2990
2991
  onSearchFirstValue?: BaseCallbackKeyboardInstance | undefined;
2991
2992
  onSearchSecondValue?: BaseCallbackKeyboardInstance | undefined;
2992
- onFocusFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2993
- onFocusSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2994
- onBlurFirstTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2995
- onBlurSecondTextfield?: ((event: FocusEvent_2<HTMLInputElement, Element>) => void) | undefined;
2993
+ onFocusFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2994
+ onFocusSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2995
+ onBlurFirstTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2996
+ onBlurSecondTextfield?: ((event: ChangeEvent<HTMLInputElement>) => void) | undefined;
2996
2997
  } & {
2997
2998
  dividerIcon?: ReactNode;
2998
2999
  dividerVariant?: "icon" | undefined;
@@ -93,10 +93,10 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
93
93
  secondTextfieldContentRight?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
94
94
  firstTextfieldTextAfter?: string | undefined;
95
95
  secondTextfieldTextAfter?: string | undefined;
96
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
97
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
98
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
99
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
96
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
97
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
98
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
99
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
100
100
  firstTextfieldTextBefore?: string | undefined;
101
101
  secondTextfieldTextBefore?: string | undefined;
102
102
  dividerVariant?: "none" | "dash" | "icon" | undefined;
@@ -104,5 +104,4 @@ export declare const DatePickerRange: import("react").FunctionComponent<import("
104
104
  } & 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"> & {
105
105
  placement?: import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement | import("@salutejs/plasma-new-hope/styled-components").DatePickerRangePlacement[] | undefined;
106
106
  isDoubleCalendar?: boolean | undefined;
107
- closeAfterDateSelect?: boolean | undefined;
108
107
  } & import("react").HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<import("@salutejs/plasma-new-hope/styled-components").RangeInputRefs>>;
@@ -33,6 +33,7 @@ export declare const NumberInput: import("react").FunctionComponent<import("@sal
33
33
  min?: number | undefined;
34
34
  max?: number | undefined;
35
35
  step?: number | undefined;
36
+ precision?: number | undefined;
36
37
  isLoading?: boolean | undefined;
37
38
  loader?: import("react").ReactNode;
38
39
  size?: string | undefined;
@@ -58,6 +59,7 @@ export declare const NumberInput: import("react").FunctionComponent<import("@sal
58
59
  min?: number | undefined;
59
60
  max?: number | undefined;
60
61
  step?: number | undefined;
62
+ precision?: number | undefined;
61
63
  isLoading?: boolean | undefined;
62
64
  loader?: import("react").ReactNode;
63
65
  size?: string | undefined;
@@ -48,10 +48,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
48
48
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
49
49
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
50
50
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
51
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
52
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
53
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
54
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
51
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
52
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
53
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
54
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
55
55
  } & {
56
56
  firstTextfieldTextBefore: string;
57
57
  secondTextfieldTextBefore: string;
@@ -87,10 +87,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
87
87
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
88
88
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
89
89
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | 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
  } & {
95
95
  dividerVariant?: "dash" | undefined;
96
96
  dividerIcon?: undefined;
@@ -126,10 +126,10 @@ export declare const Range: import("react").FunctionComponent<import("@salutejs/
126
126
  onChangeSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackChangeInstance | undefined;
127
127
  onSearchFirstValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
128
128
  onSearchSecondValue?: import("@salutejs/plasma-new-hope/types/components/Range/Range.types").BaseCallbackKeyboardInstance | undefined;
129
- onFocusFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
130
- onFocusSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
131
- onBlurFirstTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
132
- onBlurSecondTextfield?: ((event: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
129
+ onFocusFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
130
+ onFocusSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
131
+ onBlurFirstTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
132
+ onBlurSecondTextfield?: ((event: import("react").ChangeEvent<HTMLInputElement>) => void) | undefined;
133
133
  } & {
134
134
  dividerIcon?: import("react").ReactNode;
135
135
  dividerVariant?: "icon" | undefined;
@@ -185,6 +185,7 @@ const StoryRange = ({
185
185
  const rangeRef = useRef(null);
186
186
 
187
187
  const [isOpen, setIsOpen] = useState(false);
188
+ const [firstDate, setFirstDate] = useState<string | Date>('');
188
189
 
189
190
  const iconSize = size === 'xs' ? 'xs' : 's';
190
191
  const showDividerIcon = dividerVariant === 'icon';
@@ -231,6 +232,12 @@ const StoryRange = ({
231
232
  onChangeSecondValue={(e, currentValue) => {
232
233
  onChangeSecondValue(e, currentValue);
233
234
  }}
235
+ onCommitFirstDate={(currentValue) => {
236
+ setFirstDate(currentValue);
237
+ }}
238
+ onCommitSecondDate={(currentValue) => {
239
+ firstDate && currentValue && setIsOpen(false);
240
+ }}
234
241
  {...dividerIconProps}
235
242
  {...rest}
236
243
  />
@@ -258,7 +265,6 @@ export const Range: StoryObj<StoryPropsRange> = {
258
265
  size: 'l',
259
266
  view: 'default',
260
267
  isDoubleCalendar: false,
261
- closeAfterDateSelect: true,
262
268
  dividerVariant: 'dash',
263
269
  min: new Date(2024, 1, 1),
264
270
  max: new Date(2024, 12, 29),
@@ -95,6 +95,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
95
95
  segmentation: 'default',
96
96
  min: 0,
97
97
  max: 9,
98
+ precision: 2,
98
99
  step: 1,
99
100
  width: 188,
100
101
  isManualInput: false,
@@ -185,6 +185,7 @@ const StoryRange = ({
185
185
  const rangeRef = useRef(null);
186
186
 
187
187
  const [isOpen, setIsOpen] = useState(false);
188
+ const [firstDate, setFirstDate] = useState<string | Date>('');
188
189
 
189
190
  const iconSize = size === 'xs' ? 'xs' : 's';
190
191
  const showDividerIcon = dividerVariant === 'icon';
@@ -231,6 +232,12 @@ const StoryRange = ({
231
232
  onChangeSecondValue={(e, currentValue) => {
232
233
  onChangeSecondValue(e, currentValue);
233
234
  }}
235
+ onCommitFirstDate={(currentValue) => {
236
+ setFirstDate(currentValue);
237
+ }}
238
+ onCommitSecondDate={(currentValue) => {
239
+ firstDate && currentValue && setIsOpen(false);
240
+ }}
234
241
  {...dividerIconProps}
235
242
  {...rest}
236
243
  />
@@ -258,7 +265,6 @@ export const Range: StoryObj<StoryPropsRange> = {
258
265
  size: 'l',
259
266
  view: 'default',
260
267
  isDoubleCalendar: false,
261
- closeAfterDateSelect: true,
262
268
  dividerVariant: 'dash',
263
269
  min: new Date(2024, 1, 1),
264
270
  max: new Date(2024, 12, 29),
@@ -95,6 +95,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
95
95
  segmentation: 'default',
96
96
  min: 0,
97
97
  max: 9,
98
+ precision: 2,
98
99
  step: 1,
99
100
  width: 188,
100
101
  isManualInput: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salutejs/sdds-serv",
3
- "version": "0.224.0-canary.1702.12763507639.0",
3
+ "version": "0.224.0-dev.0",
4
4
  "description": "Salute Design System / React UI kit for SDDS SERV web applications",
5
5
  "author": "Salute Frontend Team <salute.developers@gmail.com>",
6
6
  "license": "MIT",
@@ -48,7 +48,7 @@
48
48
  "directory": "packages/sdds-serv"
49
49
  },
50
50
  "dependencies": {
51
- "@salutejs/plasma-new-hope": "0.239.0-canary.1702.12763507639.0",
51
+ "@salutejs/plasma-new-hope": "0.239.0-dev.0",
52
52
  "@salutejs/sdds-themes": "0.31.0"
53
53
  },
54
54
  "peerDependencies": {
@@ -153,5 +153,5 @@
153
153
  "sideEffects": [
154
154
  "*.css"
155
155
  ],
156
- "gitHead": "4dfa771a4d2b642c4b972bf130fa97ec90ebefbd"
156
+ "gitHead": "4efac87175d043cba365570bcd31fa9faf900301"
157
157
  }