@scbt-ecom/ui 0.26.1 → 0.27.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.
@@ -1,15 +1,13 @@
1
1
  import { Control, FieldValues, Path, UseControllerProps } from 'react-hook-form';
2
- import { TFieldContainerConfig } from '../../ui';
3
2
  import { AutocompleteBaseProps } from '../../uncontrolled';
4
3
  import { SelectClasses } from '../../uncontrolled/select/Select';
5
4
  export type AutocompleteControlProps<TFieldValues extends FieldValues, T, TName extends Path<TFieldValues> = Path<TFieldValues>> = UseControllerProps<TFieldValues, TName> & Omit<AutocompleteBaseProps<T>, 'classes'> & {
6
5
  control: Control<TFieldValues>;
7
6
  helperText?: string;
8
- size?: TFieldContainerConfig['size'];
9
7
  classes?: SelectClasses & {
10
8
  container?: string;
11
9
  message?: string;
12
10
  };
13
11
  };
14
- export declare const InnerComponent: <TFieldValues extends FieldValues, T>({ control, name, defaultValue, disabled, helperText, rules, shouldUnregister, size, classes, ...props }: AutocompleteControlProps<TFieldValues, T>) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const InnerComponent: <TFieldValues extends FieldValues, T>({ control, name, defaultValue, disabled, helperText, rules, shouldUnregister, classes, ...props }: AutocompleteControlProps<TFieldValues, T>) => import("react/jsx-runtime").JSX.Element;
15
13
  export declare const AutocompleteControl: typeof InnerComponent;
@@ -1,6 +1,5 @@
1
1
  import { Control, FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
2
2
  import { Calendar, MaskInputProps } from '../../..';
3
- import { TFieldContainerConfig } from '../../ui';
4
3
  type CalendarProps = React.ComponentPropsWithoutRef<typeof Calendar>;
5
4
  type DayPickerControlClasses = MaskInputProps['classes'] & {
6
5
  message?: string;
@@ -22,11 +21,7 @@ export type DayPickerControlProps<TFieldValues extends FieldValues = FieldValues
22
21
  * Дополнительные стили компонента
23
22
  */
24
23
  classes?: DayPickerControlClasses;
25
- /**
26
- * Размер контейнера для поля
27
- */
28
- size?: TFieldContainerConfig['size'];
29
24
  };
30
- declare const InnerComponent: <T extends FieldValues = FieldValues>({ control, name, disabled, rules, shouldUnregister, defaultValue, inputProps, helperText, classes, size, ...props }: DayPickerControlProps<T>) => import("react/jsx-runtime").JSX.Element;
25
+ declare const InnerComponent: <T extends FieldValues = FieldValues>({ control, name, disabled, rules, shouldUnregister, defaultValue, inputProps, helperText, classes, ...props }: DayPickerControlProps<T>) => import("react/jsx-runtime").JSX.Element;
31
26
  export declare const DayPickerControl: typeof InnerComponent;
32
27
  export {};
@@ -1,6 +1,6 @@
1
1
  export type { TextareaControlProps } from './textarea';
2
2
  export declare const Controlled: {
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
+ InputControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, helperText, classes, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('..').InputBaseProps, "classes"> & {
4
4
  control: import('react-hook-form').Control<TFieldValues>;
5
5
  helperText?: string;
6
6
  classes?: {
@@ -10,9 +10,8 @@ export declare const Controlled: {
10
10
  } & {
11
11
  message?: string;
12
12
  };
13
- size?: import('../ui').TFieldContainerConfig["size"];
14
13
  }) => import("react/jsx-runtime").JSX.Element;
15
- MaskInputControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, classes, helperText, size, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('..').MaskInputProps, "classes"> & {
14
+ MaskInputControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, classes, helperText, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('..').MaskInputProps, "classes"> & {
16
15
  control: import('react-hook-form').Control<TFieldValues>;
17
16
  classes?: {
18
17
  container?: string;
@@ -22,9 +21,8 @@ export declare const Controlled: {
22
21
  message?: string;
23
22
  };
24
23
  helperText?: string;
25
- size?: import('../ui').TFieldContainerConfig["size"];
26
24
  }) => import("react/jsx-runtime").JSX.Element;
27
- DayPickerControl: <T extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, disabled, rules, shouldUnregister, defaultValue, inputProps, helperText, classes, size, ...props }: import('./dayPickerControl/dayPickerControl').DayPickerControlProps<T>) => import("react/jsx-runtime").JSX.Element;
25
+ DayPickerControl: <T extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, name, disabled, rules, shouldUnregister, defaultValue, inputProps, helperText, classes, ...props }: import('./dayPickerControl/dayPickerControl').DayPickerControlProps<T>) => import("react/jsx-runtime").JSX.Element;
28
26
  CheckboxControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, classes, className, name, rules, shouldUnregister, defaultValue, disabled, children, helperText, ...props }: import('react-hook-form').UseControllerProps<TFieldValues, import('react-hook-form').Path<TFieldValues>> & Omit<import('..').CheckboxBaseProps, "classes"> & {
29
27
  control: import('react-hook-form').Control<TFieldValues>;
30
28
  children: React.ReactElement | string;
@@ -38,7 +36,7 @@ export declare const Controlled: {
38
36
  };
39
37
  helperText?: string;
40
38
  }) => import("react/jsx-runtime").JSX.Element;
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"> & {
39
+ SelectControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ control, classes, name, rules, shouldUnregister, disabled, defaultValue, returnValue, options, helperText, ...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"> & {
42
40
  label: string;
43
41
  isMulti?: boolean | undefined;
44
42
  invalid?: boolean;
@@ -50,6 +48,7 @@ export declare const Controlled: {
50
48
  onInputChange?: (value: string) => void;
51
49
  inputValue?: string;
52
50
  attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
51
+ virtual?: boolean;
53
52
  filterDisabled?: boolean;
54
53
  externalHandlers?: import('../uncontrolled/select/Select').ExternalHandlers;
55
54
  } & {
@@ -65,7 +64,6 @@ export declare const Controlled: {
65
64
  message?: string;
66
65
  };
67
66
  helperText?: string;
68
- size?: import('../ui').TFieldContainerConfig["size"];
69
67
  returnValue?: (option: import('..').SelectItemOption) => string;
70
68
  }) => import("react/jsx-runtime").JSX.Element;
71
69
  SwitchControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ classes, className, control, name, rules, defaultValue, disabled, shouldUnregister, children, helperText, tooltip, popoverProps, ...props }: import('./switch/SwitchControl').SwitchControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -87,7 +85,7 @@ export declare const Controlled: {
87
85
  helperText?: string;
88
86
  }) => import("react/jsx-runtime").JSX.Element;
89
87
  ComboboxControl: <T extends import('react-hook-form').FieldValues, ValueType>({ options, control, defaultValue, isClearable, label, disabled, placeholder, helperText, noOptionsMessage, size, classes, isMulti, isSearchable, customChange, ...props }: import('./combobox').IComboboxControlProps<T, ValueType>) => import("react/jsx-runtime").JSX.Element;
90
- AutocompleteControl: <TFieldValues extends import('react-hook-form').FieldValues, T>({ control, name, defaultValue, disabled, helperText, rules, shouldUnregister, size, classes, ...props }: import('./autocomplete').AutocompleteControlProps<TFieldValues, T>) => import("react/jsx-runtime").JSX.Element;
88
+ AutocompleteControl: <TFieldValues extends import('react-hook-form').FieldValues, T>({ control, name, defaultValue, disabled, helperText, rules, shouldUnregister, classes, ...props }: import('./autocomplete').AutocompleteControlProps<TFieldValues, T>) => import("react/jsx-runtime").JSX.Element;
91
89
  DadataFio: <TFieldValues extends import('react-hook-form').FieldValues>({ formatter, dadataBaseUrl, ...props }: Omit<import('./autocomplete').AutocompleteControlProps<TFieldValues, import('./dadata/types').IDadataCacheOption<unknown>>, "query" | "formatter"> & {
92
90
  dadataBaseUrl: string;
93
91
  formatter?: (item: import('./dadata/types').IDadataCacheOption<unknown>) => import('..').SelectItemOption;
@@ -108,5 +106,5 @@ export declare const Controlled: {
108
106
  dadataBaseUrl: string;
109
107
  formatter?: (item: import('./dadata/types').IDadataOrganizationOption) => import('..').SelectItemOption;
110
108
  }) => 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;
109
+ TextareaControl: <TFieldValues extends import('react-hook-form').FieldValues = import('react-hook-form').FieldValues>({ classes, control, name, rules, disabled, defaultValue, shouldUnregister, helperText, ...props }: import('./textarea').TextareaControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
112
110
  };
@@ -1,6 +1,5 @@
1
1
  import { Control, FieldValues, Path, UseControllerProps } from 'react-hook-form';
2
2
  import { InputBaseProps } from '../../uncontrolled';
3
- import { TFieldContainerConfig } from '../../ui';
4
3
  type InputControlClasses = InputBaseProps['classes'] & {
5
4
  message?: string;
6
5
  };
@@ -17,11 +16,7 @@ type InputControlProps<TFieldValues extends FieldValues = FieldValues, TName ext
17
16
  * Дополнительные стили компонента
18
17
  */
19
18
  classes?: InputControlClasses;
20
- /**
21
- * Размер контейнера для поля
22
- */
23
- size?: TFieldContainerConfig['size'];
24
19
  };
25
- declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, helperText, classes, size, ...props }: InputControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
20
+ declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, helperText, classes, ...props }: InputControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
26
21
  export declare const InputControl: typeof InnerComponent;
27
22
  export {};
@@ -1,6 +1,5 @@
1
1
  import { Control, FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
2
2
  import { MaskInputProps } from '../../uncontrolled';
3
- import { TFieldContainerConfig } from '../../ui';
4
3
  type MaskInputClasses = MaskInputProps['classes'] & {
5
4
  message?: string;
6
5
  };
@@ -17,11 +16,7 @@ type MaskInputControlProps<TFieldValues extends FieldValues = FieldValues, TName
17
16
  * Дополнительный текст
18
17
  */
19
18
  helperText?: string;
20
- /**
21
- * Размер контейнера для поля
22
- */
23
- size?: TFieldContainerConfig['size'];
24
19
  };
25
- declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, classes, helperText, size, ...props }: MaskInputControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
20
+ declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, name, defaultValue, disabled, rules, shouldUnregister, classes, helperText, ...props }: MaskInputControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
26
21
  export declare const MaskInputControl: typeof InnerComponent;
27
22
  export {};
@@ -1,6 +1,5 @@
1
1
  import { Control, FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
2
2
  import { SelectBaseProps, SelectItemOption } from '../../..';
3
- import { TFieldContainerConfig } from '../../ui';
4
3
  type SelectControlClasses = SelectBaseProps<boolean>['classes'] & {
5
4
  container?: string;
6
5
  message?: string;
@@ -18,15 +17,11 @@ type SelectControlProps<TFieldValues extends FieldValues = FieldValues, TName ex
18
17
  * Дополнительный текст
19
18
  */
20
19
  helperText?: string;
21
- /**
22
- * Размер контейнера для поля
23
- */
24
- size?: TFieldContainerConfig['size'];
25
20
  /**
26
21
  * Функция для управления возвращаемым значением
27
22
  */
28
23
  returnValue?: (option: SelectItemOption) => string;
29
24
  };
30
- declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, classes, name, rules, shouldUnregister, disabled, defaultValue, returnValue, options, helperText, size, ...props }: SelectControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
25
+ declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ control, classes, name, rules, shouldUnregister, disabled, defaultValue, returnValue, options, helperText, ...props }: SelectControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
31
26
  export declare const SelectControl: typeof InnerComponent;
32
27
  export {};
@@ -1,6 +1,5 @@
1
1
  import { Control, FieldPath, FieldValues, UseControllerProps } from 'react-hook-form';
2
2
  import { TextareaBaseProps } from '../../..';
3
- import { TFieldContainerConfig } from '../../ui';
4
3
  type TextareaControlClasses = TextareaBaseProps['classes'] & {
5
4
  message?: string;
6
5
  };
@@ -17,11 +16,7 @@ export type TextareaControlProps<TFieldValues extends FieldValues = FieldValues,
17
16
  * Дополнительный текст
18
17
  */
19
18
  helperText?: string;
20
- /**
21
- * Размер контейнера для поля
22
- */
23
- size?: TFieldContainerConfig['size'];
24
19
  };
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;
20
+ declare const InnerComponent: <TFieldValues extends FieldValues = FieldValues>({ classes, control, name, rules, disabled, defaultValue, shouldUnregister, helperText, ...props }: TextareaControlProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
26
21
  export declare const TextareaControl: typeof InnerComponent;
27
22
  export {};
@@ -44,6 +44,7 @@ export declare const Uncontrolled: {
44
44
  onInputChange?: (value: string) => void;
45
45
  inputValue?: string;
46
46
  attachmentProps?: import('../../../types').DeepPartial<import('../ui').IFieldAttachmentProps>;
47
+ virtual?: boolean;
47
48
  filterDisabled?: boolean;
48
49
  externalHandlers?: import('./select/Select').ExternalHandlers;
49
50
  } & import('react').RefAttributes<HTMLElement>>;
@@ -15,7 +15,7 @@ export type ExternalHandlers = {
15
15
  onFocus?: (event: React.FocusEvent<HTMLElement>) => void;
16
16
  onInputChange?: (value: string) => void;
17
17
  };
18
- export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectItemOption, Multi, 'li'>, 'multiple' | 'onChange' | 'by' | 'virtual' | 'className'> & {
18
+ export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectItemOption, Multi, 'li'>, 'multiple' | 'onChange' | 'by' | 'className' | 'virtual'> & {
19
19
  /**
20
20
  * Отображаемый лейбл
21
21
  */
@@ -61,7 +61,11 @@ export type SelectBaseProps<Multi extends boolean> = Omit<ComboboxProps<SelectIt
61
61
  */
62
62
  attachmentProps?: DeepPartial<FieldAttachmentProps>;
63
63
  /**
64
- * Свойство для выключении фильтрации по поиску
64
+ * Включение виртуализации списка
65
+ */
66
+ virtual?: boolean;
67
+ /**
68
+ * Свойство для выключения фильтрации по поиску
65
69
  */
66
70
  filterDisabled?: boolean;
67
71
  /**
@@ -115,7 +119,11 @@ export declare const SelectBase: import('react').ForwardRefExoticComponent<Omit<
115
119
  */
116
120
  attachmentProps?: DeepPartial<FieldAttachmentProps>;
117
121
  /**
118
- * Свойство для выключении фильтрации по поиску
122
+ * Включение виртуализации списка
123
+ */
124
+ virtual?: boolean;
125
+ /**
126
+ * Свойство для выключения фильтрации по поиску
119
127
  */
120
128
  filterDisabled?: boolean;
121
129
  /**
@@ -12,5 +12,11 @@ export type SelectItemProps = Omit<ComboboxOptionProps, 'className' | 'value'> &
12
12
  displayValue?: (option: SelectItemOption) => string;
13
13
  motionProps?: React.ComponentPropsWithoutRef<typeof motion.li>;
14
14
  };
15
- export declare const SelectItem: ({ option, classes, displayValue, isMulti, motionProps, ...props }: SelectItemProps) => import("react/jsx-runtime").JSX.Element;
15
+ export declare const SelectItem: import('react').ForwardRefExoticComponent<Omit<ComboboxOptionProps, "value" | "className"> & {
16
+ option: SelectItemOption;
17
+ isMulti?: boolean;
18
+ classes?: SelectItemClasses;
19
+ displayValue?: (option: SelectItemOption) => string;
20
+ motionProps?: React.ComponentPropsWithoutRef<typeof motion.li>;
21
+ } & import('react').RefAttributes<HTMLLIElement>>;
16
22
  export {};