skillgrid 0.0.21 → 0.0.22-dev-31782-avatar.1141064

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 (51) hide show
  1. package/dist/components/Avatar/Avatar.type.d.ts +5 -2
  2. package/dist/components/Avatar/lib/get-avatar-border-radius-by-size-and-shape.d.ts +5 -0
  3. package/dist/components/Button/Button.d.ts +2 -3
  4. package/dist/components/Checkbox/Checkbox.d.ts +18 -0
  5. package/dist/components/Checkbox/Checkbox.type.d.ts +90 -0
  6. package/dist/components/Checkbox/assets/CheckIcon.d.ts +16 -0
  7. package/dist/components/Checkbox/assets/LineIcon.d.ts +16 -0
  8. package/dist/components/Checkbox/index.d.ts +2 -0
  9. package/dist/components/Helper/Helper.d.ts +7 -0
  10. package/dist/components/Helper/Helper.type.d.ts +17 -0
  11. package/dist/components/Helper/index.d.ts +2 -0
  12. package/dist/components/InputBase/Input.d.ts +9 -0
  13. package/dist/components/InputBase/Input.type.d.ts +138 -0
  14. package/dist/components/InputBase/InputBase.d.ts +6 -0
  15. package/dist/components/InputBase/InputBase.type.d.ts +110 -0
  16. package/dist/components/InputBase/assets/GripIcon.d.ts +8 -0
  17. package/dist/components/InputBase/assets/SearchIcon.d.ts +17 -0
  18. package/dist/components/InputBase/assets/XIcon.d.ts +18 -0
  19. package/dist/components/InputBase/assets/index.d.ts +3 -0
  20. package/dist/components/InputBase/index.d.ts +3 -0
  21. package/dist/components/InputBase/lib/constants.d.ts +4 -0
  22. package/dist/components/InputBase/lib/index.d.ts +4 -0
  23. package/dist/components/InputBase/lib/useGripResize.d.ts +11 -0
  24. package/dist/components/InputBase/lib/useInputSync.d.ts +11 -0
  25. package/dist/components/InputBase/lib/useTextareaResize.d.ts +9 -0
  26. package/dist/components/List/List.d.ts +5 -0
  27. package/dist/components/List/List.type.d.ts +34 -0
  28. package/dist/components/List/ListItem/ListItem.d.ts +9 -0
  29. package/dist/components/List/index.d.ts +2 -0
  30. package/dist/components/TextArea/TextArea.d.ts +6 -0
  31. package/dist/components/TextArea/TextArea.type.d.ts +66 -0
  32. package/dist/components/TextArea/index.d.ts +2 -0
  33. package/dist/components/TextArea/lib/constants.d.ts +65 -0
  34. package/dist/components/TextArea/lib/getters.d.ts +38 -0
  35. package/dist/components/TextArea/lib/index.d.ts +2 -0
  36. package/dist/components/TextInput/TextInput.d.ts +6 -0
  37. package/dist/components/TextInput/TextInput.type.d.ts +72 -0
  38. package/dist/components/TextInput/index.d.ts +2 -0
  39. package/dist/components/TextInput/lib/constants.d.ts +9 -0
  40. package/dist/components/TextInput/lib/getters.d.ts +38 -0
  41. package/dist/components/TextInput/lib/index.d.ts +2 -0
  42. package/dist/components/Typography/Typography.constants.d.ts +2 -0
  43. package/dist/components/Typography/Typography.d.ts +21 -0
  44. package/dist/components/Typography/Typography.type.d.ts +68 -0
  45. package/dist/components/Typography/index.d.ts +1 -0
  46. package/dist/index.cjs.js +11 -11
  47. package/dist/index.css +1 -1
  48. package/dist/index.d.ts +2 -0
  49. package/dist/index.es.js +1208 -886
  50. package/dist/utils/other.d.ts +8 -0
  51. package/package.json +3 -2
@@ -0,0 +1,2 @@
1
+ export { List } from './List';
2
+ export type { ListProps } from './List.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>>;
@@ -0,0 +1,72 @@
1
+ import { InputHTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * Размеры для компонента TextInput
4
+ */
5
+ export type TextInputSize = 'small' | 'medium' | 'large';
6
+ /**
7
+ * Пропсы для компонента TextInput
8
+ */
9
+ export interface TextInputProps {
10
+ /** Значение поля */
11
+ value?: string | null;
12
+ /** Обработчик изменения значения */
13
+ onChange?: (value: string | null) => void;
14
+ /** Плейсхолдер для поля */
15
+ placeholder?: string;
16
+ /** Тип элемента input */
17
+ type?: InputHTMLAttributes<HTMLInputElement>['type'];
18
+ /** Максимальная длина */
19
+ maxLength?: number;
20
+ /** Минимальная длина */
21
+ minLength?: number;
22
+ /** Показывать ли метку (по умолчанию: true) */
23
+ showLabel?: boolean;
24
+ /** Автозаполнение */
25
+ autoComplete?: string;
26
+ /** Автофокус */
27
+ autoFocus?: boolean;
28
+ /** Размер компонента */
29
+ size?: TextInputSize;
30
+ /** Состояние ошибки */
31
+ error?: boolean;
32
+ /** Отключенное состояние */
33
+ disabled?: boolean;
34
+ /** Состояние загрузки */
35
+ loading?: boolean;
36
+ /** Вспомогательный текст под полем */
37
+ helper?: string;
38
+ /** Префикс (иконка слева) */
39
+ prefix?: ReactNode;
40
+ /** Суффикс (иконка справа) */
41
+ suffix?: ReactNode;
42
+ /** Показывать ли кнопку очистки */
43
+ clearable?: boolean;
44
+ /** ID компонента */
45
+ id?: string;
46
+ /** Обработчик фокуса */
47
+ onFocus?: () => void;
48
+ /** Обработчик потери фокуса */
49
+ onBlur?: () => void;
50
+ /** Дополнительные CSS классы */
51
+ className?: string;
52
+ /** Включить обрезку текста с многоточием */
53
+ truncate?: boolean;
54
+ /** Подсказка внутри поля ввода (максимум 30 символов) */
55
+ hint?: string;
56
+ /** Показывать ли подсказку (по умолчанию: false) */
57
+ showHint?: boolean;
58
+ /** Показывать подсказку когда значение пустое (по умолчанию: false) */
59
+ showHintOnEmpty?: boolean;
60
+ /** Стили для обертки */
61
+ wrapperProps?: React.HTMLAttributes<HTMLDivElement>;
62
+ /** Стили для метки */
63
+ labelProps?: React.HTMLAttributes<HTMLLabelElement>;
64
+ /** Стили для вспомогательного текста */
65
+ helperProps?: React.HTMLAttributes<HTMLDivElement>;
66
+ /** Стили для префикса */
67
+ prefixStyles?: React.CSSProperties;
68
+ /** Стили для суффикса */
69
+ suffixStyles?: React.CSSProperties;
70
+ /** Дополнительные пропсы для элемента input */
71
+ inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'placeholder' | 'type' | 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'size'>;
72
+ }
@@ -0,0 +1,2 @@
1
+ export { TextInput } from './TextInput';
2
+ export type { TextInputProps, TextInputSize } from './TextInput.type';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Константы для размеров TextInput
3
+ */
4
+ export declare const SIZES: {
5
+ readonly SMALL: "small";
6
+ readonly MEDIUM: "medium";
7
+ readonly LARGE: "large";
8
+ };
9
+ export type TextInputSize = (typeof SIZES)[keyof typeof SIZES];
@@ -0,0 +1,38 @@
1
+ import { TextInputSize } from './constants';
2
+ /**
3
+ * Интерфейс для стилей размеров
4
+ */
5
+ export interface SizeStyles {
6
+ wrapperStyles: React.CSSProperties;
7
+ floatingLabelStyles: React.CSSProperties;
8
+ prefixStyles: React.CSSProperties;
9
+ suffixStyles: React.CSSProperties;
10
+ }
11
+ /**
12
+ * Получает отступы в зависимости от размера и состояния
13
+ */
14
+ export declare const getPadding: (size: TextInputSize, showFloatingLabel: boolean, hasValue: boolean, hasPrefix: boolean) => string;
15
+ /**
16
+ * Получает высоту в зависимости от размера
17
+ */
18
+ export declare const getHeight: (size: TextInputSize) => string;
19
+ /**
20
+ * Получает отступы префикса и суффикса
21
+ */
22
+ export declare const getPrefixSuffixSpacing: (size: TextInputSize) => number;
23
+ /**
24
+ * Получает стили для большого размера
25
+ */
26
+ export declare const getLargeSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
27
+ /**
28
+ * Получает стили для среднего размера
29
+ */
30
+ export declare const getMediumSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
31
+ /**
32
+ * Получает стили для малого размера
33
+ */
34
+ export declare const getSmallSizeStyles: (height: string, padding: string, spacing: number) => SizeStyles;
35
+ /**
36
+ * Основная функция для получения стилей размеров
37
+ */
38
+ export declare const getSizeStyles: (size: TextInputSize, showFloatingLabel: boolean, hasValue: boolean, hasPrefix: boolean) => SizeStyles;
@@ -0,0 +1,2 @@
1
+ export * from './constants';
2
+ export * from './getters';
@@ -0,0 +1,2 @@
1
+ import { TypographySize } from './Typography.type';
2
+ export declare const TYPOGRAPHY_HEADING_BY_SIZE: Record<TypographySize, 'h1' | 'h2' | 'h3' | 'h4' | 'h5'>;
@@ -0,0 +1,21 @@
1
+ import { TypographyTitleProps, TypographyTextProps } from './Typography.type';
2
+ import * as React from 'react';
3
+ /**
4
+ * Object containing typography components.
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * import { Typography } from './Typography';
9
+ *
10
+ * <Typography.Title size={1}>Heading</Typography.Title>
11
+ * <Typography.Subtitle size={2}>Subheading</Typography.Subtitle>
12
+ * <Typography.Label size={3}>Label</Typography.Label>
13
+ * <Typography.Paragraph size={4}>Paragraph</Typography.Paragraph>
14
+ * ```
15
+ */
16
+ export declare const Typography: {
17
+ Title: React.ForwardRefExoticComponent<TypographyTitleProps & React.RefAttributes<HTMLHeadingElement | null>>;
18
+ Subtitle: React.ForwardRefExoticComponent<TypographyTitleProps & React.RefAttributes<HTMLHeadingElement | null>>;
19
+ Label: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLSpanElement | HTMLDivElement | HTMLLabelElement | HTMLParagraphElement | null>>;
20
+ Paragraph: React.ForwardRefExoticComponent<TypographyTextProps & React.RefAttributes<HTMLSpanElement | HTMLDivElement | HTMLLabelElement | HTMLParagraphElement | null>>;
21
+ };
@@ -0,0 +1,68 @@
1
+ export type TypographyStyle = 'primary' | 'secondary' | 'tertiary' | 'accent' | 'accent-secondary' | 'positive' | 'positive-secondary' | 'negative' | 'negative-secondary' | 'warning' | 'warning-secondary' | 'special' | 'special-secondary' | 'contrast' | 'contrast-secondary';
2
+ export type TypographySize = 1 | 2 | 3 | 4 | 5;
3
+ export type TypographyTitleFontWeight = 'semibold';
4
+ export type TypographyTitleVariant = 'title' | 'subtitle';
5
+ export type TypographyTextFontWeight = 'regular' | 'medium';
6
+ export type TypographyTextVariant = 'paragraph' | 'label';
7
+ export interface TypographyBaseProps {
8
+ /**
9
+ * Children content
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Typography style
14
+ * @default 'primary'
15
+ */
16
+ typographyStyle?: TypographyStyle;
17
+ /**
18
+ * Additional CSS class
19
+ */
20
+ className?: string;
21
+ /**
22
+ * Typography size
23
+ * @default 3
24
+ */
25
+ size?: TypographySize;
26
+ /**
27
+ * Test ID for testing
28
+ */
29
+ 'data-testid'?: string;
30
+ /**
31
+ * Disable typography
32
+ * @default false
33
+ */
34
+ disabled?: boolean;
35
+ }
36
+ export interface TypographyTitleProps extends TypographyBaseProps, React.HTMLAttributes<HTMLHeadingElement> {
37
+ /**
38
+ * Typography variant by design system
39
+ * @default 'title'
40
+ */
41
+ variant?: TypographyTitleVariant;
42
+ /**
43
+ * Typography HTML tag
44
+ */
45
+ as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
46
+ /**
47
+ * Typography font weight
48
+ * @default 'semibold'
49
+ */
50
+ fontWeight?: TypographyTitleFontWeight;
51
+ }
52
+ export interface TypographyTextProps extends TypographyBaseProps, React.HTMLAttributes<HTMLParagraphElement | HTMLSpanElement | HTMLLabelElement | HTMLDivElement> {
53
+ /**
54
+ * Typography variant by design system
55
+ * @default 'label'
56
+ */
57
+ variant?: TypographyTextVariant;
58
+ /**
59
+ * Typography HTML tag
60
+ * @default 'p'
61
+ */
62
+ as?: 'p' | 'span' | 'label' | 'div';
63
+ /**
64
+ * Typography font weight
65
+ * @default 'regular'
66
+ */
67
+ fontWeight?: TypographyTextFontWeight;
68
+ }
@@ -0,0 +1 @@
1
+ export { Typography } from './Typography';