skillgrid 0.0.53 → 0.0.55
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/Container/Container.d.ts +26 -0
- package/dist/components/Container/Container.type.d.ts +2 -0
- package/dist/components/Container/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +12 -0
- package/dist/components/Divider/Divider.types.d.ts +41 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/lib/constants.d.ts +7 -0
- package/dist/components/Divider/lib/get-spacing-props.d.ts +14 -0
- package/dist/components/Divider/lib/get-spacing-props.test.d.ts +1 -0
- package/dist/components/Drop/Drop.type.d.ts +12 -0
- package/dist/components/TextArea/TextArea.type.d.ts +3 -1
- package/dist/components/TextInput/TextInput.type.d.ts +3 -1
- package/dist/index.cjs.js +10 -10
- package/dist/index.css +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +2207 -2161
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Адаптивный контейнер для содержимого страницы.
|
|
3
|
+
*
|
|
4
|
+
* Занимает 100% ширины экрана и автоматически применяет отступы, скругления
|
|
5
|
+
* в зависимости от ширины viewport. Контентная область ограничивается до 1416px
|
|
6
|
+
* на больших экранах (XL/XXL) через динамические padding.
|
|
7
|
+
*
|
|
8
|
+
* Принимает все стандартные HTML-атрибуты div (className, style, onClick и т.д.)
|
|
9
|
+
*
|
|
10
|
+
* @component
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // Базовое использование
|
|
14
|
+
* <Container>
|
|
15
|
+
* <div>Контент</div>
|
|
16
|
+
* </Container>
|
|
17
|
+
*
|
|
18
|
+
* // С кастомными стилями
|
|
19
|
+
* <Container className="my-section" style={{ backgroundColor: '#f0f0f0' }}>
|
|
20
|
+
* <Content />
|
|
21
|
+
* </Container>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare const Container: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
25
|
+
ref?: ((instance: HTMLDivElement | null) => void | import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import('react').DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import('react').RefObject<HTMLDivElement> | null | undefined;
|
|
26
|
+
}, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { DividerProps } from './Divider.types';
|
|
3
|
+
/**
|
|
4
|
+
* Компонент разделителя для визуального разделения контента.
|
|
5
|
+
*
|
|
6
|
+
* @component
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <Divider layout="horizontal" margin={[16, 8]} />
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare const Divider: FC<DividerProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { DIVIDER_SPACING_VALUES } from './lib/constants';
|
|
3
|
+
type DividerSpacingKey = keyof typeof DIVIDER_SPACING_VALUES;
|
|
4
|
+
export type DividerSize = number | string;
|
|
5
|
+
type DividerMargin = [] | [DividerSpacingKey] | [DividerSpacingKey, DividerSpacingKey] | [DividerSpacingKey, DividerSpacingKey, DividerSpacingKey] | [DividerSpacingKey, DividerSpacingKey, DividerSpacingKey, DividerSpacingKey];
|
|
6
|
+
export interface DividerProps {
|
|
7
|
+
/**
|
|
8
|
+
* Ориентация разделителя.
|
|
9
|
+
* @default horizontal
|
|
10
|
+
*/
|
|
11
|
+
layout?: 'vertical' | 'horizontal';
|
|
12
|
+
/**
|
|
13
|
+
* Внешние отступы вокруг разделителя (аналог CSS-свойства margin).
|
|
14
|
+
* Поддерживаются массивы из 1–4 значений с ключами: 0, 8, 12, 16, 24.
|
|
15
|
+
*/
|
|
16
|
+
margin?: DividerMargin;
|
|
17
|
+
/**
|
|
18
|
+
* Длина разделителя по основной оси.
|
|
19
|
+
* Для horizontal — ширина, для vertical — высота.
|
|
20
|
+
* @default 100%
|
|
21
|
+
*/
|
|
22
|
+
length?: DividerSize;
|
|
23
|
+
/**
|
|
24
|
+
* Толщина линии разделителя.
|
|
25
|
+
* @default 1px
|
|
26
|
+
*/
|
|
27
|
+
thickness?: DividerSize;
|
|
28
|
+
/**
|
|
29
|
+
* Дополнительный CSS-класс для элемента разделителя.
|
|
30
|
+
*/
|
|
31
|
+
className?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Inline-стили для элемента разделителя.
|
|
34
|
+
*/
|
|
35
|
+
style?: CSSProperties;
|
|
36
|
+
/**
|
|
37
|
+
* Test ID для автотестов.
|
|
38
|
+
*/
|
|
39
|
+
'data-testid'?: string;
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DividerProps, DividerSize } from '../Divider.types';
|
|
2
|
+
/**
|
|
3
|
+
* Преобразует числовое или строковое значение в корректное CSS-значение длины.
|
|
4
|
+
* @param value Число (будет преобразовано в строку с суффиксом `px`)
|
|
5
|
+
* или строка с уже валидным CSS-значением (%, px, rem и т.п.).
|
|
6
|
+
* @returns Строка с CSS-значением длины или undefined, если value не передано.
|
|
7
|
+
*/
|
|
8
|
+
export declare const transformToSize: (value?: DividerSize) => string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Преобразует массив отступов в строку CSS.
|
|
11
|
+
* @param margin - Массив значений отступов [0, 8, 12, 16, 24]
|
|
12
|
+
* @returns Строка для CSS-свойства margin
|
|
13
|
+
*/
|
|
14
|
+
export declare const getMarginProps: (margin?: DividerProps["margin"]) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -30,6 +30,13 @@ export interface DropCommonProps {
|
|
|
30
30
|
* @default 'left-start'
|
|
31
31
|
*/
|
|
32
32
|
position?: PositionDrop;
|
|
33
|
+
/**
|
|
34
|
+
* Поведение по высоте дропа
|
|
35
|
+
* * auto - высота дропа подстраивается под контент
|
|
36
|
+
* * fixed - фиксированная высота дропа с возможностью скролла
|
|
37
|
+
* @default 'fixed'
|
|
38
|
+
*/
|
|
39
|
+
heightBehavior?: 'auto' | 'fixed';
|
|
33
40
|
/**
|
|
34
41
|
* Контент футера
|
|
35
42
|
*/
|
|
@@ -71,6 +78,11 @@ export interface DropCommonProps {
|
|
|
71
78
|
* @default: { padding: 24, paddingType: 'all' }
|
|
72
79
|
*/
|
|
73
80
|
footerPadding?: ButtonsContainerPadding;
|
|
81
|
+
/**
|
|
82
|
+
* Отступ между toggle-ом и выпадающим меню (drop) в пикселях
|
|
83
|
+
* @default 8
|
|
84
|
+
*/
|
|
85
|
+
dropToggleOffset?: number;
|
|
74
86
|
/**
|
|
75
87
|
* Дополнительные классы для:
|
|
76
88
|
* @wrapper для обертки
|
|
@@ -66,5 +66,7 @@ export interface TextAreaProps {
|
|
|
66
66
|
/** Стили для вспомогательного текста */
|
|
67
67
|
helperProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
68
68
|
/** Дополнительные пропсы для элемента textarea */
|
|
69
|
-
textareaProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'placeholder' | 'maxLength' | 'minLength' | 'autoFocus' | 'rows' | 'disabled'
|
|
69
|
+
textareaProps?: Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'value' | 'onChange' | 'placeholder' | 'maxLength' | 'minLength' | 'autoFocus' | 'rows' | 'disabled'> & {
|
|
70
|
+
[key: `data-${string}`]: unknown;
|
|
71
|
+
};
|
|
70
72
|
}
|
|
@@ -72,5 +72,7 @@ export interface TextInputProps {
|
|
|
72
72
|
/** Стили для суффикса */
|
|
73
73
|
suffixStyles?: React.CSSProperties;
|
|
74
74
|
/** Дополнительные пропсы для элемента input */
|
|
75
|
-
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'placeholder' | 'type' | 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'size'
|
|
75
|
+
inputProps?: Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'placeholder' | 'type' | 'maxLength' | 'minLength' | 'autoComplete' | 'autoFocus' | 'size'> & {
|
|
76
|
+
[key: `data-${string}`]: unknown;
|
|
77
|
+
};
|
|
76
78
|
}
|