@scbt-ecom/ui 0.25.0 → 0.26.1
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/shared/ui/calendar/model/utils.d.ts +1 -0
- package/dist/shared/ui/formElements/controlled/index.d.ts +3 -1
- package/dist/shared/ui/formElements/controlled/textarea/TextareaControl.d.ts +27 -0
- package/dist/shared/ui/formElements/controlled/textarea/index.d.ts +1 -0
- package/dist/shared/ui/formElements/uncontrolled/index.d.ts +13 -2
- package/dist/shared/ui/formElements/uncontrolled/select/Select.d.ts +2 -2
- package/dist/shared/ui/formElements/uncontrolled/textarea/Textarea.d.ts +45 -0
- package/dist/shared/ui/formElements/uncontrolled/textarea/index.d.ts +1 -0
- package/dist/ui.js +3713 -3575
- package/dist/ui.js.map +1 -1
- package/dist/utils-tailwind.css +4 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export type { TextareaControlProps } from './textarea';
|
|
1
2
|
export declare const Controlled: {
|
|
2
3
|
InputControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, helperText, classes, size, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('..').InputBaseProps, "classes"> & {
|
|
3
4
|
control: import('react-hook-form').Control<TFieldValues>;
|
|
@@ -39,7 +40,7 @@ export declare const Controlled: {
|
|
|
39
40
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
40
41
|
SelectControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, classes, name, rules, shouldUnregister, disabled, defaultValue, returnValue, options, helperText, size, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('@headlessui/react').ComboboxProps<import('..').SelectItemOption, boolean, "li">, "onChange" | "className" | "multiple" | "by" | "virtual"> & {
|
|
41
42
|
label: string;
|
|
42
|
-
isMulti
|
|
43
|
+
isMulti?: boolean | undefined;
|
|
43
44
|
invalid?: boolean;
|
|
44
45
|
isSearchable?: boolean;
|
|
45
46
|
options: import('..').SelectItemOption[];
|
|
@@ -107,4 +108,5 @@ export declare const Controlled: {
|
|
|
107
108
|
dadataBaseUrl: string;
|
|
108
109
|
formatter?: (item: import('./dadata/types').IDadataOrganizationOption) => import('..').SelectItemOption;
|
|
109
110
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
111
|
+
TextareaControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ classes, control, name, rules, disabled, defaultValue, shouldUnregister, helperText, size, ...props }: import('./textarea').TextareaControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
110
112
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Control, FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
|
|
2
|
+
import { TextareaBaseProps } from '../../..';
|
|
3
|
+
import { TFieldContainerConfig } from '../../ui';
|
|
4
|
+
type TextareaControlClasses = TextareaBaseProps['classes'] & {
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
export type TextareaControlProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = UseControllerProps<TFieldValues, TName> & Omit<TextareaBaseProps, 'classes'> & {
|
|
8
|
+
/**
|
|
9
|
+
* Контрол объект для управления полем
|
|
10
|
+
*/
|
|
11
|
+
control: Control<TFieldValues>;
|
|
12
|
+
/**
|
|
13
|
+
* Дополнительные стили компонента
|
|
14
|
+
*/
|
|
15
|
+
classes?: TextareaControlClasses;
|
|
16
|
+
/**
|
|
17
|
+
* Дополнительный текст
|
|
18
|
+
*/
|
|
19
|
+
helperText?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Размер контейнера для поля
|
|
22
|
+
*/
|
|
23
|
+
size?: TFieldContainerConfig['size'];
|
|
24
|
+
};
|
|
25
|
+
declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ classes, control, name, rules, disabled, defaultValue, shouldUnregister, helperText, size, ...props }: TextareaControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const TextareaControl: typeof InnerComponent;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextareaControl, type TextareaControlProps } from './TextareaControl';
|
|
@@ -5,6 +5,7 @@ export type { CheckboxBaseProps, CheckedState } from './checkbox';
|
|
|
5
5
|
export type { SwitchBaseProps } from './switch';
|
|
6
6
|
export type { AutocompleteBaseProps } from './autocomplete';
|
|
7
7
|
export type { RadioGroupBaseProps, RadioOption } from './radio';
|
|
8
|
+
export type { TextareaBaseProps } from './textarea';
|
|
8
9
|
export declare const Uncontrolled: {
|
|
9
10
|
InputBase: import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size" | "placeholder"> & {
|
|
10
11
|
classes?: {
|
|
@@ -17,7 +18,6 @@ export declare const Uncontrolled: {
|
|
|
17
18
|
attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
|
|
18
19
|
renderValues?: () => React.JSX.Element | null;
|
|
19
20
|
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
20
|
-
AutocompleteBase: <TData>({ formatter, query, value, returnValue, onChange, ...props }: import('./autocomplete').AutocompleteBaseProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
MaskInput: import('react').ForwardRefExoticComponent<Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "size" | "placeholder"> & {
|
|
22
22
|
classes?: {
|
|
23
23
|
container?: string;
|
|
@@ -34,7 +34,7 @@ export declare const Uncontrolled: {
|
|
|
34
34
|
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
35
35
|
SelectBase: import('react').ForwardRefExoticComponent<Omit<import('@headlessui/react').ComboboxProps<import('./select').SelectItemOption, boolean, "li">, "onChange" | "className" | "multiple" | "by" | "virtual"> & {
|
|
36
36
|
label: string;
|
|
37
|
-
isMulti
|
|
37
|
+
isMulti?: boolean | undefined;
|
|
38
38
|
invalid?: boolean;
|
|
39
39
|
isSearchable?: boolean;
|
|
40
40
|
options: import('./select').SelectItemOption[];
|
|
@@ -59,6 +59,7 @@ export declare const Uncontrolled: {
|
|
|
59
59
|
value?: string;
|
|
60
60
|
onChange?: (value: string) => void;
|
|
61
61
|
} & import('react').RefAttributes<HTMLInputElement>>;
|
|
62
|
+
AutocompleteBase: <TData>({ formatter, query, value, returnValue, onChange, ...props }: import('./autocomplete').AutocompleteBaseProps<TData>) => import("react/jsx-runtime").JSX.Element;
|
|
62
63
|
SwitchBase: import('react').ForwardRefExoticComponent<import('@radix-ui/react-switch').SwitchProps & {
|
|
63
64
|
classes?: {
|
|
64
65
|
root?: string;
|
|
@@ -79,4 +80,14 @@ export declare const Uncontrolled: {
|
|
|
79
80
|
};
|
|
80
81
|
invalid?: boolean;
|
|
81
82
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
83
|
+
TextareaBase: import('react').ForwardRefExoticComponent<Omit<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "className"> & {
|
|
84
|
+
classes?: {
|
|
85
|
+
container?: string;
|
|
86
|
+
textarea?: string;
|
|
87
|
+
label?: string;
|
|
88
|
+
};
|
|
89
|
+
label: string;
|
|
90
|
+
invalid?: boolean;
|
|
91
|
+
attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
|
|
92
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
82
93
|
};
|
|
@@ -23,7 +23,7 @@ export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectIt
|
|
|
23
23
|
/**
|
|
24
24
|
* Поддержка множественного выбора
|
|
25
25
|
*/
|
|
26
|
-
isMulti
|
|
26
|
+
isMulti?: Multi;
|
|
27
27
|
/**
|
|
28
28
|
* Пометить поле как не валидное
|
|
29
29
|
*/
|
|
@@ -77,7 +77,7 @@ export declare const SelectBase: import('react').ForwardRefExoticComponent<Omit<
|
|
|
77
77
|
/**
|
|
78
78
|
* Поддержка множественного выбора
|
|
79
79
|
*/
|
|
80
|
-
isMulti
|
|
80
|
+
isMulti?: boolean | undefined;
|
|
81
81
|
/**
|
|
82
82
|
* Пометить поле как не валидное
|
|
83
83
|
*/
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FieldAttachment } from '../../ui';
|
|
2
|
+
import { DeepPartial } from '../../../../types';
|
|
3
|
+
type TextareaBaseClasses = {
|
|
4
|
+
container?: string;
|
|
5
|
+
textarea?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
};
|
|
8
|
+
type FieldAttachmentProps = React.ComponentPropsWithoutRef<typeof FieldAttachment>;
|
|
9
|
+
export type TextareaBaseProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'size' | 'className'> & {
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительные стили внутренних компонентов
|
|
12
|
+
*/
|
|
13
|
+
classes?: TextareaBaseClasses;
|
|
14
|
+
/**
|
|
15
|
+
* Отображаемый placeholder
|
|
16
|
+
*/
|
|
17
|
+
label: string;
|
|
18
|
+
/**
|
|
19
|
+
* Отображение не валидного поля
|
|
20
|
+
*/
|
|
21
|
+
invalid?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Свойства дополнительной иконки
|
|
24
|
+
*/
|
|
25
|
+
attachmentProps?: DeepPartial<FieldAttachmentProps>;
|
|
26
|
+
};
|
|
27
|
+
export declare const TextareaBase: import('react').ForwardRefExoticComponent<Omit<import('react').TextareaHTMLAttributes<HTMLTextAreaElement>, "size" | "className"> & {
|
|
28
|
+
/**
|
|
29
|
+
* Дополнительные стили внутренних компонентов
|
|
30
|
+
*/
|
|
31
|
+
classes?: TextareaBaseClasses;
|
|
32
|
+
/**
|
|
33
|
+
* Отображаемый placeholder
|
|
34
|
+
*/
|
|
35
|
+
label: string;
|
|
36
|
+
/**
|
|
37
|
+
* Отображение не валидного поля
|
|
38
|
+
*/
|
|
39
|
+
invalid?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Свойства дополнительной иконки
|
|
42
|
+
*/
|
|
43
|
+
attachmentProps?: DeepPartial<FieldAttachmentProps>;
|
|
44
|
+
} & import('react').RefAttributes<HTMLTextAreaElement>>;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextareaBase, type TextareaBaseProps } from './Textarea';
|