@tk-kit/design-system 0.2.15 → 0.2.17
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/components/form/date-range-picker/date-range-picker.d.ts +6 -1
- package/dist/components/form/dropdown/dropdown.d.ts +6 -1
- package/dist/components/form/input-field/index.d.ts +1 -1
- package/dist/components/form/input-field/input-field.d.ts +6 -0
- package/dist/components/form/textarea-field/textarea-field.d.ts +5 -0
- package/dist/index.cjs +13 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2835 -2814
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DateRange } from 'react-day-picker';
|
|
2
|
+
import { ErrorMessageLines } from '../input-field';
|
|
2
3
|
export interface DateRangePickerProps {
|
|
3
4
|
mode?: 'range' | 'single';
|
|
4
5
|
value?: DateRange | Date;
|
|
@@ -17,9 +18,13 @@ export interface DateRangePickerProps {
|
|
|
17
18
|
mobileTitle?: string;
|
|
18
19
|
mobileBtnLabel?: string;
|
|
19
20
|
errorMessage?: string;
|
|
21
|
+
/** Максимум строк текста ошибки: 1 (по умолчанию) – 5 или 'none' — без ограничения */
|
|
22
|
+
errorMessageLines?: ErrorMessageLines;
|
|
23
|
+
/** @deprecated Используйте errorMessageLines={2} */
|
|
24
|
+
errorMessageMultiline?: boolean;
|
|
20
25
|
errorPlaceholder?: string;
|
|
21
26
|
state?: 'default' | 'error';
|
|
22
27
|
disablePastDates?: boolean;
|
|
23
28
|
forceBottom?: boolean;
|
|
24
29
|
}
|
|
25
|
-
export declare function DateRangePicker({ mode, value, onChange, onChangeSingle, onRangeChange, placeholder, disabled, className, id, errorMessage, state, withCalendarIcon, disablePastDates, mobileTitle, mobileBtnLabel, forceBottom, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function DateRangePicker({ mode, value, onChange, onChangeSingle, onRangeChange, placeholder, disabled, className, id, errorMessage, errorMessageLines, errorMessageMultiline, state, withCalendarIcon, disablePastDates, mobileTitle, mobileBtnLabel, forceBottom, }: DateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorMessageLines } from '../input-field';
|
|
1
2
|
type Option = {
|
|
2
3
|
label: string;
|
|
3
4
|
value: string;
|
|
@@ -9,6 +10,10 @@ type DropdownProps<T extends string | string[]> = {
|
|
|
9
10
|
placeholder?: string;
|
|
10
11
|
label?: string;
|
|
11
12
|
errorMessage?: string;
|
|
13
|
+
/** Максимум строк текста ошибки: 1 (по умолчанию) – 5 или 'none' — без ограничения */
|
|
14
|
+
errorMessageLines?: ErrorMessageLines;
|
|
15
|
+
/** @deprecated Используйте errorMessageLines={2} */
|
|
16
|
+
errorMessageMultiline?: boolean;
|
|
12
17
|
errorPlaceholder?: string;
|
|
13
18
|
errorDescription?: string;
|
|
14
19
|
state?: 'default' | 'error';
|
|
@@ -20,5 +25,5 @@ type DropdownProps<T extends string | string[]> = {
|
|
|
20
25
|
isMulti?: boolean;
|
|
21
26
|
withSearch?: boolean;
|
|
22
27
|
};
|
|
23
|
-
export declare function Dropdown<T extends string | string[]>({ options, value, onChange, placeholder, label, errorMessage, errorDescription, state, variant, disabled, className, variantSpecial, displayMode, isMulti, withSearch, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function Dropdown<T extends string | string[]>({ options, value, onChange, placeholder, label, errorMessage, errorMessageLines, errorMessageMultiline, errorDescription, state, variant, disabled, className, variantSpecial, displayMode, isMulti, withSearch, }: DropdownProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
24
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InputField, type InputFieldProps } from './input-field';
|
|
1
|
+
export { InputField, errorMessageLinesClass, type InputFieldProps, type ErrorMessageLines, } from './input-field';
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { Input } from '../../base/input';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
export type ErrorMessageLines = 1 | 2 | 3 | 4 | 5 | 'none';
|
|
4
|
+
export declare const errorMessageLinesClass: Record<ErrorMessageLines, string>;
|
|
3
5
|
export type InputFieldProps = React.ComponentProps<typeof Input> & {
|
|
4
6
|
label?: string;
|
|
5
7
|
errorMessage?: string;
|
|
6
8
|
variantSpecial?: string;
|
|
7
9
|
hideClearButton?: boolean;
|
|
8
10
|
showErrorMessage?: boolean;
|
|
11
|
+
/** Максимум строк текста ошибки: 1 (по умолчанию) – 5 или 'none' — без ограничения */
|
|
12
|
+
errorMessageLines?: ErrorMessageLines;
|
|
13
|
+
/** @deprecated Используйте errorMessageLines={2} */
|
|
14
|
+
errorMessageMultiline?: boolean;
|
|
9
15
|
};
|
|
10
16
|
export declare const InputField: React.ForwardRefExoticComponent<Omit<InputFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Textarea } from '../../base/textarea';
|
|
2
|
+
import { ErrorMessageLines } from '../input-field';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
export type TextareaFieldProps = React.ComponentProps<typeof Textarea> & {
|
|
4
5
|
label?: string;
|
|
@@ -6,5 +7,9 @@ export type TextareaFieldProps = React.ComponentProps<typeof Textarea> & {
|
|
|
6
7
|
variantSpecial?: string;
|
|
7
8
|
hideClearButton?: boolean;
|
|
8
9
|
showErrorMessage?: boolean;
|
|
10
|
+
/** Максимум строк текста ошибки: 1 (по умолчанию) – 5 или 'none' — без ограничения */
|
|
11
|
+
errorMessageLines?: ErrorMessageLines;
|
|
12
|
+
/** @deprecated Используйте errorMessageLines={2} */
|
|
13
|
+
errorMessageMultiline?: boolean;
|
|
9
14
|
};
|
|
10
15
|
export declare const TextareaField: React.ForwardRefExoticComponent<Omit<TextareaFieldProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
|