skillgrid 0.0.52 → 0.0.54

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.
@@ -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,2 @@
1
+ import { ComponentPropsWithRef } from 'react';
2
+ export type ContainerProps = ComponentPropsWithRef<'div'>;
@@ -0,0 +1,2 @@
1
+ export { Container } from './Container';
2
+ export type { ContainerProps } from './Container.type';
@@ -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,2 @@
1
+ export { Divider } from './Divider';
2
+ export type { DividerProps } from './Divider.types';
@@ -0,0 +1,7 @@
1
+ export declare const DIVIDER_SPACING_VALUES: {
2
+ readonly 0: "0px";
3
+ readonly 8: "8px";
4
+ readonly 12: "12px";
5
+ readonly 16: "16px";
6
+ readonly 24: "24px";
7
+ };
@@ -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;
@@ -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
  }