skillgrid 0.0.21-dev-36347-gornyi.1125678 → 0.0.21-dev-39472-brand-colors.1146058

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.
Files changed (55) hide show
  1. package/README.md +151 -1
  2. package/dist/components/Button/Button.d.ts +2 -3
  3. package/dist/components/Checkbox/Checkbox.d.ts +18 -0
  4. package/dist/components/Checkbox/Checkbox.type.d.ts +90 -0
  5. package/dist/components/Checkbox/assets/CheckIcon.d.ts +16 -0
  6. package/dist/components/Checkbox/assets/LineIcon.d.ts +16 -0
  7. package/dist/components/Checkbox/index.d.ts +2 -0
  8. package/dist/components/Helper/Helper.d.ts +7 -0
  9. package/dist/components/Helper/Helper.type.d.ts +17 -0
  10. package/dist/components/Helper/index.d.ts +2 -0
  11. package/dist/components/InputBase/Input.d.ts +9 -0
  12. package/dist/components/InputBase/Input.type.d.ts +138 -0
  13. package/dist/components/InputBase/InputBase.d.ts +6 -0
  14. package/dist/components/InputBase/InputBase.type.d.ts +110 -0
  15. package/dist/components/InputBase/assets/GripIcon.d.ts +8 -0
  16. package/dist/components/InputBase/assets/SearchIcon.d.ts +17 -0
  17. package/dist/components/InputBase/assets/XIcon.d.ts +18 -0
  18. package/dist/components/InputBase/assets/index.d.ts +3 -0
  19. package/dist/components/InputBase/index.d.ts +3 -0
  20. package/dist/components/InputBase/lib/constants.d.ts +4 -0
  21. package/dist/components/InputBase/lib/index.d.ts +4 -0
  22. package/dist/components/InputBase/lib/useGripResize.d.ts +11 -0
  23. package/dist/components/InputBase/lib/useInputSync.d.ts +11 -0
  24. package/dist/components/InputBase/lib/useTextareaResize.d.ts +9 -0
  25. package/dist/components/List/List.d.ts +5 -0
  26. package/dist/components/List/List.type.d.ts +34 -0
  27. package/dist/components/List/ListItem/ListItem.d.ts +9 -0
  28. package/dist/components/List/index.d.ts +2 -0
  29. package/dist/components/Radio/Radio.d.ts +21 -0
  30. package/dist/components/Radio/Radio.type.d.ts +87 -0
  31. package/dist/components/Radio/RadioGroup/RadioGroup.d.ts +21 -0
  32. package/dist/components/Radio/RadioGroup/RadioGroup.type.d.ts +19 -0
  33. package/dist/components/Radio/index.d.ts +4 -0
  34. package/dist/components/TextArea/TextArea.d.ts +6 -0
  35. package/dist/components/TextArea/TextArea.type.d.ts +66 -0
  36. package/dist/components/TextArea/index.d.ts +2 -0
  37. package/dist/components/TextArea/lib/constants.d.ts +65 -0
  38. package/dist/components/TextArea/lib/getters.d.ts +38 -0
  39. package/dist/components/TextArea/lib/index.d.ts +2 -0
  40. package/dist/components/TextInput/TextInput.d.ts +6 -0
  41. package/dist/components/TextInput/TextInput.type.d.ts +72 -0
  42. package/dist/components/TextInput/index.d.ts +2 -0
  43. package/dist/components/TextInput/lib/constants.d.ts +9 -0
  44. package/dist/components/TextInput/lib/getters.d.ts +38 -0
  45. package/dist/components/TextInput/lib/index.d.ts +2 -0
  46. package/dist/components/Typography/Typography.constants.d.ts +2 -0
  47. package/dist/components/Typography/Typography.d.ts +21 -0
  48. package/dist/components/Typography/Typography.type.d.ts +68 -0
  49. package/dist/components/Typography/index.d.ts +1 -0
  50. package/dist/index.cjs.js +11 -11
  51. package/dist/index.css +1 -1
  52. package/dist/index.d.ts +5 -0
  53. package/dist/index.es.js +2134 -917
  54. package/dist/utils/other.d.ts +8 -0
  55. package/package.json +5 -2
@@ -0,0 +1,110 @@
1
+ import { ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes } from 'react';
2
+ /**
3
+ * Размеры для компонента InputBase
4
+ */
5
+ export type InputBaseSize = 'small' | 'medium' | 'large';
6
+ /**
7
+ * Типы компонентов для InputBase
8
+ */
9
+ export type InputBaseComponent = 'input' | 'textarea';
10
+ /**
11
+ * Базовые пропсы для компонента InputBase
12
+ */
13
+ export interface InputBaseProps {
14
+ /** Тип компонента (input или textarea) */
15
+ component?: InputBaseComponent;
16
+ /** Размер компонента */
17
+ size?: InputBaseSize;
18
+ /** Содержимое компонента (устаревший способ) */
19
+ children?: ReactNode;
20
+ /** Дополнительные CSS классы */
21
+ className?: string;
22
+ /** Состояние ошибки */
23
+ error?: boolean;
24
+ /** Плейсхолдер для поля */
25
+ placeholder?: string;
26
+ /** Отключенное состояние */
27
+ disabled?: boolean;
28
+ /** Состояние загрузки */
29
+ loading?: boolean;
30
+ /** Показывать ли метку (по умолчанию: true) */
31
+ showLabel?: boolean;
32
+ /** CSS классы для плавающей метки */
33
+ labelClassName?: string;
34
+ /** Вспомогательный текст под полем */
35
+ helper?: string;
36
+ /** Префикс (иконка слева) */
37
+ prefix?: ReactNode;
38
+ /** Суффикс (иконка справа) */
39
+ suffix?: ReactNode;
40
+ /** ID компонента */
41
+ id?: string;
42
+ /** Обработчик фокуса */
43
+ onFocus?: () => void;
44
+ /** Обработчик потери фокуса */
45
+ onBlur?: () => void;
46
+ /** Обработчик изменения значения */
47
+ onChange?: (value: string) => void;
48
+ /** Текущее значение */
49
+ value?: string;
50
+ /** Стили для обертки */
51
+ wrapperProps?: HTMLAttributes<HTMLDivElement>;
52
+ /** Стили для метки */
53
+ labelProps?: HTMLAttributes<HTMLLabelElement>;
54
+ /** Стили для вспомогательного текста */
55
+ helperProps?: HTMLAttributes<HTMLDivElement>;
56
+ /** Дополнительные стили для обертки (высота, отступы) */
57
+ wrapperStyles?: React.CSSProperties;
58
+ /** Дополнительные стили для плавающей метки */
59
+ floatingLabelStyles?: React.CSSProperties;
60
+ /** Дополнительные стили для префикса */
61
+ prefixStyles?: React.CSSProperties;
62
+ /** Дополнительные стили для суффикса */
63
+ suffixStyles?: React.CSSProperties;
64
+ /** Стили для textarea элемента */
65
+ textareaStyles?: React.CSSProperties;
66
+ /** Показывать ли счетчик символов */
67
+ showLimit?: boolean;
68
+ /** Максимальная длина */
69
+ maxLength?: number;
70
+ /** Пропсы для встроенного input/textarea */
71
+ inputProps?: InputHTMLAttributes<HTMLInputElement> | TextareaHTMLAttributes<HTMLTextAreaElement>;
72
+ /** Подсказка внутри поля ввода */
73
+ hint?: string;
74
+ /** Показывать ли подсказку */
75
+ showHint?: boolean;
76
+ /** Показывать подсказку когда значение пустое */
77
+ showHintOnEmpty?: boolean;
78
+ /** Включить обрезку текста с многоточием */
79
+ truncate?: boolean;
80
+ /** Состояние ошибки для accessibility */
81
+ 'aria-invalid'?: boolean;
82
+ /** ID элемента с сообщением об ошибке для accessibility */
83
+ 'aria-errormessage'?: string;
84
+ /** Тип изменения размера для textarea */
85
+ resize?: 'fill' | 'hug' | 'fixed';
86
+ /** Показывать ли grip для изменения размера */
87
+ showGrip?: boolean;
88
+ }
89
+ /**
90
+ * Пропсы для встроенного input элемента
91
+ */
92
+ export interface InputBaseInputProps extends InputHTMLAttributes<HTMLInputElement> {
93
+ /** Состояние ошибки */
94
+ error?: boolean;
95
+ /** Отключенное состояние */
96
+ disabled?: boolean;
97
+ /** Состояние загрузки */
98
+ loading?: boolean;
99
+ }
100
+ /**
101
+ * Пропсы для встроенного textarea элемента
102
+ */
103
+ export interface InputBaseTextareaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
104
+ /** Состояние ошибки */
105
+ error?: boolean;
106
+ /** Отключенное состояние */
107
+ disabled?: boolean;
108
+ /** Состояние загрузки */
109
+ loading?: boolean;
110
+ }
@@ -0,0 +1,8 @@
1
+ interface GripIconProps {
2
+ width?: number;
3
+ height?: number;
4
+ className?: string;
5
+ color?: string;
6
+ }
7
+ export declare const GripIcon: React.FC<GripIconProps>;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface SearchIconProps {
2
+ /** Дополнительные CSS классы */
3
+ className?: string;
4
+ /** Инлайн стили */
5
+ style?: React.CSSProperties;
6
+ /** Размер иконки */
7
+ size?: 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
8
+ /** Цвет иконки */
9
+ color?: string;
10
+ /** Дополнительные пропсы */
11
+ [key: string]: unknown;
12
+ }
13
+ /**
14
+ * Компонент иконки поиска
15
+ * Принимает className и style для кастомизации
16
+ */
17
+ export declare const SearchIcon: React.FC<SearchIconProps>;
@@ -0,0 +1,18 @@
1
+ export interface XIconProps {
2
+ /** Дополнительные CSS классы */
3
+ className?: string;
4
+ /** Инлайн стили */
5
+ style?: React.CSSProperties;
6
+ /** Размер иконки */
7
+ size?: 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
8
+ /** Цвет иконки */
9
+ color?: string;
10
+ /** Обработчик клика */
11
+ onClick?: () => void;
12
+ /** Дополнительные пропсы */
13
+ [key: string]: unknown;
14
+ }
15
+ /**
16
+ * Компонент иконки X
17
+ */
18
+ export declare const XIcon: React.FC<XIconProps>;
@@ -0,0 +1,3 @@
1
+ export { GripIcon } from './GripIcon';
2
+ export { SearchIcon } from './SearchIcon';
3
+ export { XIcon } from './XIcon';
@@ -0,0 +1,3 @@
1
+ export { InputBase } from './InputBase';
2
+ export type { InputBaseProps, InputBaseComponent, InputBaseSize } from './InputBase.type';
3
+ export { SearchIcon, XIcon, GripIcon } from './assets';
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Максимальная длина hint текста
3
+ */
4
+ export declare const MAX_HINT_LENGTH = 30;
@@ -0,0 +1,4 @@
1
+ export { useInputSync } from './useInputSync';
2
+ export { useTextareaResize } from './useTextareaResize';
3
+ export { useGripResize } from './useGripResize';
4
+ export { MAX_HINT_LENGTH } from './constants';
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Хук для обработки resize через grip
3
+ * @param showGrip - показывать ли grip
4
+ * @param disabled - отключен ли компонент
5
+ * @param loading - состояние загрузки
6
+ * @param resize - режим изменения размера
7
+ * @returns обработчик mousedown для grip
8
+ */
9
+ export declare const useGripResize: (showGrip: boolean | undefined, disabled: boolean | undefined, loading: boolean | undefined, resize: string | undefined) => {
10
+ handleGripMouseDown: (e: React.MouseEvent) => void;
11
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Хук для синхронизации состояния HTML элемента с внешним состоянием
3
+ * @param value - внешнее значение
4
+ * @param component - тип компонента ('input' | 'textarea')
5
+ * @returns refs для input и textarea элементов
6
+ */
7
+ export declare const useInputSync: (value: string, component: "input" | "textarea") => {
8
+ textareaRef: import('react').RefObject<HTMLTextAreaElement>;
9
+ inputRef: import('react').RefObject<HTMLInputElement>;
10
+ currentRef: import('react').RefObject<HTMLInputElement> | import('react').RefObject<HTMLTextAreaElement>;
11
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Хук для автоматического изменения размера textarea
3
+ * @param value - значение textarea
4
+ * @param resize - режим изменения размера
5
+ * @param textareaRef - ref для textarea элемента
6
+ */
7
+ export declare const useTextareaResize: (value: string, resize: string | undefined, textareaRef: React.RefObject<HTMLTextAreaElement>) => {
8
+ resizeTextArea: () => void;
9
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ import { ListProps } from './List.type';
3
+ export declare const List: React.ForwardRefExoticComponent<ListProps & React.RefAttributes<HTMLOListElement | HTMLUListElement>> & {
4
+ Item: React.FC<import('./ListItem/ListItem').ListItemProps>;
5
+ };
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Базовые пропсы для списка (используются и для `<ul>`, и для `<ol>`).
3
+ */
4
+ interface BaseListProps {
5
+ /** Дополнительный CSS-класс для списка */
6
+ className?: string;
7
+ /** Дочерние элементы списка (`<List.Item>` или `<li>`) */
8
+ children: React.ReactNode;
9
+ /** Размер списка, влияет на отступы и размер шрифта */
10
+ size?: 'sm' | 'md' | 'lg' | 'xl';
11
+ /** Атрибут для тестирования */
12
+ 'data-testid'?: string;
13
+ }
14
+ /**
15
+ * Пропсы для маркированного списка (`<ul>`).
16
+ * Атрибут `start` запрещён.
17
+ */
18
+ interface UnorderedListProps extends BaseListProps {
19
+ /** Тип списка — маркированный (по умолчанию) */
20
+ variant?: 'unordered';
21
+ /** Невозможен для `<ul>` */
22
+ start?: never;
23
+ }
24
+ /**
25
+ * Пропсы для нумерованного списка (`<ol>`).
26
+ */
27
+ interface OrderedListProps extends BaseListProps {
28
+ /** Тип списка — нумерованный */
29
+ variant: 'ordered';
30
+ /** Начальный номер для `<ol>` */
31
+ start?: number;
32
+ }
33
+ export type ListProps = UnorderedListProps | OrderedListProps;
34
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface ListItemProps {
2
+ /** Дополнительный CSS-класс для списка */
3
+ className?: string;
4
+ /** Дочерние элементы */
5
+ children: React.ReactNode;
6
+ /** Атрибут для тестирования */
7
+ 'data-testid'?: string;
8
+ }
9
+ export declare const ListItem: React.FC<ListItemProps>;
@@ -0,0 +1,2 @@
1
+ export { List } from './List';
2
+ export type { ListProps } from './List.type';
@@ -0,0 +1,21 @@
1
+ import { RadioProps } from './Radio.type';
2
+ export declare const RADIO_CONTAINER_TEST_PREFIX = "radio-container-";
3
+ export declare const RADIO_LABEL_TEST_PREFIX = "radio-label";
4
+ /**
5
+ * Radio компонент для user interactions
6
+ *
7
+ * @component
8
+ * @example
9
+ * ```tsx
10
+ * <Radio
11
+ * name="radio-name"
12
+ * checked={checked}
13
+ * value={"radio-value"}
14
+ * onChange={setValue}
15
+ * size="medium"
16
+ * >
17
+ * Элемент radio
18
+ * </Radio>
19
+ * ```
20
+ */
21
+ export declare const Radio: <T>(props: RadioProps<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
@@ -0,0 +1,87 @@
1
+ export type TValue = string | number;
2
+ export interface Option<T> {
3
+ /**
4
+ * Значение вариант
5
+ */
6
+ value: T;
7
+ /**
8
+ * Лейбл вариант
9
+ */
10
+ label?: React.ReactNode;
11
+ /**
12
+ * Активность компонента
13
+ * @default false
14
+ */
15
+ disabled?: boolean;
16
+ }
17
+ export interface RadioProps<T> {
18
+ /**
19
+ * Значение, которое представляет radio
20
+ */
21
+ value: T;
22
+ /**
23
+ * Уникальное имя для компонента
24
+ */
25
+ name: string;
26
+ /**
27
+ * Выбрано ли значение
28
+ * - true - отмеченный
29
+ * - false - не отмеченный
30
+ * @default false
31
+ */
32
+ checked?: boolean;
33
+ /**
34
+ * Размер radio
35
+ * @default 'medium'
36
+ */
37
+ size?: 'small' | 'medium' | 'large';
38
+ /**
39
+ * Вложенный компонент справа
40
+ */
41
+ label?: React.ReactNode;
42
+ /**
43
+ * Загрузка (компонент становится неактивным)
44
+ * @default false
45
+ */
46
+ loading?: boolean;
47
+ /**
48
+ * Сообщение об ошибке
49
+ */
50
+ error?: string;
51
+ /**
52
+ * Активность компонента
53
+ * @default false
54
+ */
55
+ disabled?: boolean;
56
+ /**
57
+ * Дополнительные CSS классы для контейнера
58
+ */
59
+ containerClassName?: string;
60
+ /**
61
+ * Дополнительные CSS классы для radio
62
+ */
63
+ className?: string;
64
+ /**
65
+ * Делает кликабельным все простарнство компонента или только radio
66
+ * @default all
67
+ */
68
+ clickable?: 'all' | 'control';
69
+ /**
70
+ * Tab index для навигации
71
+ */
72
+ tabIndex?: number;
73
+ /**
74
+ * Формат отображения
75
+ */
76
+ mode?: 'card' | 'default';
77
+ /**
78
+ * Обработчик изменения состояния
79
+ * @param value - Выбранное значение
80
+ * @param e - ChangeEvent<HTMLInputElement>, ивент нажатия на инпут
81
+ */
82
+ onChange?: (value: T, e?: React.ChangeEvent<HTMLInputElement>) => void;
83
+ /**
84
+ * Идентификатор для тестирования
85
+ */
86
+ ['data-testid']?: string;
87
+ }
@@ -0,0 +1,21 @@
1
+ import { RadioGroupProps } from './RadioGroup.type';
2
+ /**
3
+ * RadioGroup компонент для группировки Radio
4
+ *
5
+ * @component
6
+ * @example
7
+ * ```tsx
8
+ * <RadioGroup
9
+ * {...args}
10
+ * layout='horizontal'
11
+ * options={[
12
+ * { label: 'Test 1', value: 'Test 1' },
13
+ * { label: 'Test 2', value: 'Test 2', disabled: true },
14
+ * { label: 'Test 3', value: 4 },
15
+ * ]}
16
+ * value={value}
17
+ * onChange={setValue}
18
+ * />
19
+ * ```
20
+ */
21
+ export declare const RadioGroup: <T>(props: RadioGroupProps<T> & React.RefAttributes<HTMLInputElement>) => React.ReactElement | null;
@@ -0,0 +1,19 @@
1
+ import { Option, RadioProps } from '../Radio.type';
2
+ export interface RadioGroupProps<T> extends Omit<RadioProps<T>, 'value' | 'label' | 'checked'> {
3
+ /**
4
+ * Список radio кнопок
5
+ */
6
+ options: Array<Option<T>>;
7
+ /**
8
+ * Значение, которое представляет radio
9
+ */
10
+ value?: T;
11
+ /**
12
+ * Направление списка радио элементов
13
+ */
14
+ layout?: 'vertical' | 'horizontal';
15
+ /**
16
+ * Список radio кнопок
17
+ */
18
+ radioClassName?: RadioProps<T>['className'];
19
+ }
@@ -0,0 +1,4 @@
1
+ export { Radio } from './Radio';
2
+ export * from './Radio.type';
3
+ export { RadioGroup } from './RadioGroup/RadioGroup';
4
+ export * from './RadioGroup/RadioGroup.type';
@@ -0,0 +1,6 @@
1
+ import { TextAreaProps } from './TextArea.type';
2
+ /**
3
+ * Компонент многострочного текстового поля
4
+ * Восстановленная версия с полной логикой стилей
5
+ */
6
+ export declare const TextArea: import('react').ForwardRefExoticComponent<TextAreaProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,66 @@
1
+ import { TextareaHTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * Размеры для компонента TextArea
4
+ */
5
+ export type TextAreaSize = 'small' | 'medium';
6
+ /**
7
+ * Пропсы для компонента TextArea
8
+ */
9
+ export interface TextAreaProps {
10
+ /** Значение поля */
11
+ value?: string | null;
12
+ /** Обработчик изменения значения */
13
+ onChange?: (value: string | null) => void;
14
+ /** Плейсхолдер для поля */
15
+ placeholder?: string;
16
+ /** Максимальная длина */
17
+ maxLength?: number;
18
+ /** Минимальная длина */
19
+ minLength?: number;
20
+ /** Показывать ли лейбл (по умолчанию true) */
21
+ showLabel?: boolean;
22
+ /** Автофокус */
23
+ autoFocus?: boolean;
24
+ /** Размер компонента */
25
+ size?: TextAreaSize;
26
+ /** Состояние ошибки */
27
+ error?: boolean;
28
+ /** Отключенное состояние */
29
+ disabled?: boolean;
30
+ /** Состояние загрузки */
31
+ loading?: boolean;
32
+ /** Вспомогательный текст под полем */
33
+ helper?: string;
34
+ /** Суффикс (правая иконка) */
35
+ suffix?: ReactNode;
36
+ /** Показывать ли кнопку очистки */
37
+ clearable?: boolean;
38
+ /** ID компонента */
39
+ id?: string;
40
+ /** Обработчик фокуса */
41
+ onFocus?: () => void;
42
+ /** Обработчик потери фокуса */
43
+ onBlur?: () => void;
44
+ /** Дополнительные CSS классы */
45
+ className?: string;
46
+ /** Количество строк для textarea */
47
+ rows?: number;
48
+ /** Максимальное количество строк */
49
+ maxRows?: number;
50
+ /** Показывать ли индикатор изменения размера */
51
+ showGrip?: boolean;
52
+ /** Показывать ли счетчик символов */
53
+ showLimit?: boolean;
54
+ /** Минимальная высота компонента */
55
+ minHeight?: number;
56
+ /** Тип изменения размера */
57
+ resize?: 'fill' | 'hug' | 'fixed';
58
+ /** Стили для обертки */
59
+ wrapperProps?: React.HTMLAttributes<HTMLDivElement>;
60
+ /** Стили для лейбла */
61
+ labelProps?: React.HTMLAttributes<HTMLLabelElement>;
62
+ /** Стили для вспомогательного текста */
63
+ helperProps?: React.HTMLAttributes<HTMLDivElement>;
64
+ /** Дополнительные пропсы для элемента textarea */
65
+ textareaProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'placeholder' | 'maxLength' | 'minLength' | 'autoFocus' | 'rows' | 'disabled'>;
66
+ }
@@ -0,0 +1,2 @@
1
+ export { TextArea } from './TextArea';
2
+ export type { TextAreaProps, TextAreaSize } from './TextArea.type';
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Константы для размеров TextArea
3
+ */
4
+ export declare const SIZES: {
5
+ readonly SMALL: "small";
6
+ readonly MEDIUM: "medium";
7
+ };
8
+ /**
9
+ * Константы для позиций
10
+ */
11
+ export declare const POSITIONS: {
12
+ readonly SMALL: "12px";
13
+ readonly MEDIUM: "16px";
14
+ };
15
+ /**
16
+ * Константы для размеров иконок
17
+ */
18
+ export declare const ICON_SIZES: {
19
+ readonly SMALL: "xs";
20
+ readonly MEDIUM: "sm";
21
+ };
22
+ /**
23
+ * Константы для resize режимов
24
+ */
25
+ export declare const RESIZE_MODES: {
26
+ readonly NONE: "none";
27
+ readonly HUG: "hug";
28
+ readonly FILL: "fill";
29
+ readonly FIXED: "fixed";
30
+ };
31
+ /**
32
+ * Константы для высот wrapper
33
+ */
34
+ export declare const WRAPPER_HEIGHTS: {
35
+ readonly SMALL: "112px";
36
+ readonly MEDIUM: "56px";
37
+ };
38
+ /**
39
+ * Константы для высот textarea
40
+ */
41
+ export declare const TEXTAREA_HEIGHTS: {
42
+ readonly SMALL: "48px";
43
+ readonly MEDIUM: "22px";
44
+ };
45
+ /**
46
+ * Константы для padding
47
+ */
48
+ export declare const PADDING: {
49
+ readonly SMALL: "12px 12px 12px 12px";
50
+ readonly MEDIUM: "16px 16px 16px 16px";
51
+ readonly MEDIUM_WITH_PREFIX: "12px 16px 12px 16px";
52
+ readonly MEDIUM_FLOATING_LABEL: "8px 16px 8px 16px";
53
+ };
54
+ /**
55
+ * Константы для minHeight значений
56
+ */
57
+ export declare const MIN_HEIGHTS: {
58
+ readonly SMALL: 48;
59
+ readonly MEDIUM: 56;
60
+ readonly LARGE: 112;
61
+ };
62
+ export type TextAreaSize = (typeof SIZES)[keyof typeof SIZES];
63
+ export type TextAreaPosition = (typeof POSITIONS)[keyof typeof POSITIONS];
64
+ export type TextAreaIconSize = (typeof ICON_SIZES)[keyof typeof ICON_SIZES];
65
+ export type TextAreaResizeMode = (typeof RESIZE_MODES)[keyof typeof RESIZE_MODES];
@@ -0,0 +1,38 @@
1
+ import { TextAreaSize, TextAreaResizeMode } from './constants';
2
+ /**
3
+ * Интерфейс для стилей размеров TextArea
4
+ */
5
+ export interface TextAreaSizeStyles {
6
+ wrapperStyles: React.CSSProperties;
7
+ floatingLabelStyles: React.CSSProperties;
8
+ suffixStyles: React.CSSProperties;
9
+ textareaStyles: React.CSSProperties;
10
+ }
11
+ /**
12
+ * Получает высоту wrapper в зависимости от размера и minHeight
13
+ */
14
+ export declare const getWrapperHeight: (size: TextAreaSize, minHeight?: number) => string;
15
+ /**
16
+ * Получает высоту textarea в зависимости от размера и minHeight
17
+ */
18
+ export declare const getTextareaHeight: (size: TextAreaSize, minHeight?: number) => string;
19
+ /**
20
+ * Получает padding в зависимости от размера, minHeight и состояния плавающего лейбла
21
+ */
22
+ export declare const getPadding: (size: TextAreaSize, minHeight?: number, shouldShowFloatingLabel?: boolean) => string;
23
+ /**
24
+ * Получает размер для InputBase в зависимости от размера TextArea и minHeight
25
+ */
26
+ export declare const getInputBaseSize: (size: TextAreaSize, minHeight?: number) => "small" | "medium";
27
+ /**
28
+ * Получает размер иконки в зависимости от размера TextArea
29
+ */
30
+ export declare const getIconSize: (size: TextAreaSize) => "xs" | "sm";
31
+ /**
32
+ * Получает позицию суффикса в зависимости от размера
33
+ */
34
+ export declare const getSuffixPosition: (size: TextAreaSize) => string;
35
+ /**
36
+ * Основная функция для получения стилей размеров TextArea
37
+ */
38
+ export declare const getSizeStyles: (size: TextAreaSize, minHeight?: number, shouldShowFloatingLabel?: boolean, resize?: TextAreaResizeMode) => TextAreaSizeStyles;
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './getters';
@@ -0,0 +1,6 @@
1
+ import { TextInputProps } from './TextInput.type';
2
+ /**
3
+ * Компонент текстового поля ввода
4
+ * Построен на основе InputBase с дополнительной логикой для текстового ввода
5
+ */
6
+ export declare const TextInput: import('react').ForwardRefExoticComponent<TextInputProps & import('react').RefAttributes<HTMLInputElement>>;