@dss-kit/ui-kit 0.1.8 → 0.1.9
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/builders/Box/Box.d.ts +72 -74
- package/dist/components/builders/Box/index.d.ts +2 -2
- package/dist/components/builders/Box/type.d.ts +38 -53
- package/dist/components/builders/Loader/Loader.d.ts +3 -3
- package/dist/components/builders/Loader/index.d.ts +2 -2
- package/dist/components/builders/Modal/Modal.d.ts +30 -32
- package/dist/components/builders/Modal/Modal.stories.d.ts +3 -3
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts +3 -5
- package/dist/components/builders/Modal/ModalFooter/index.d.ts +2 -2
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +12 -18
- package/dist/components/builders/Modal/ModalHeader/index.d.ts +2 -2
- package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +28 -30
- package/dist/components/builders/Modal/ModalMain/index.d.ts +3 -3
- package/dist/components/builders/Modal/index.d.ts +9 -12
- package/dist/components/builders/Ripple/Ripple.d.ts +16 -13
- package/dist/components/builders/Ripple/index.d.ts +2 -2
- package/dist/components/builders/Text/Text.d.ts +329 -476
- package/dist/components/builders/Text/Text.stories.d.ts +3 -3
- package/dist/components/builders/Text/index.d.ts +2 -2
- package/dist/components/builders/Text/utils/systemToClass.d.ts +23 -23
- package/dist/components/builders/index.d.ts +5 -5
- package/dist/components/controls/Button/Button.d.ts +76 -76
- package/dist/components/controls/Button/Button.stories.d.ts +3 -3
- package/dist/components/controls/Button/index.d.ts +3 -3
- package/dist/components/controls/Button/styles.d.ts +4 -9
- package/dist/components/controls/Button/types.d.ts +3 -14
- package/dist/components/controls/Checkbox/Checkbox.d.ts +28 -29
- package/dist/components/controls/Checkbox/Checkbox.stories.d.ts +3 -3
- package/dist/components/controls/Checkbox/index.d.ts +2 -2
- package/dist/components/controls/IconButton/IconButton.d.ts +3 -11
- package/dist/components/controls/IconButton/IconButton.stories.d.ts +3 -3
- package/dist/components/controls/IconButton/IconButton.types.d.ts +10 -33
- package/dist/components/controls/IconButton/index.d.ts +3 -3
- package/dist/components/controls/Input/Input.d.ts +38 -47
- package/dist/components/controls/Input/Input.stories.d.ts +3 -3
- package/dist/components/controls/Input/index.d.ts +2 -2
- package/dist/components/controls/Select/Select.d.ts +23 -44
- package/dist/components/controls/Select/Select.d.ts.map +1 -1
- package/dist/components/controls/Select/Select.stories.d.ts +5 -5
- package/dist/components/controls/Select/index.d.ts +2 -2
- package/dist/components/controls/Switch/Switch.d.ts +83 -89
- package/dist/components/controls/Switch/Switch.stories.d.ts +3 -3
- package/dist/components/controls/Switch/index.d.ts +3 -3
- package/dist/components/controls/index.d.ts +7 -7
- package/dist/components/index.d.ts +4 -4
- package/dist/components/shared/Avatar/Avatar.d.ts +3 -10
- package/dist/components/shared/Avatar/Avatar.stories.d.ts +6 -6
- package/dist/components/shared/Avatar/Avatar.types.d.ts +8 -21
- package/dist/components/shared/Avatar/index.d.ts +3 -3
- package/dist/components/shared/Hint/Hint.d.ts +23 -34
- package/dist/components/shared/Hint/Hint.stories.d.ts +3 -3
- package/dist/components/shared/Hint/index.d.ts +2 -2
- package/dist/components/shared/Portal/Portal.d.ts +2 -2
- package/dist/components/shared/Portal/index.d.ts +2 -2
- package/dist/components/shared/Tag/Tag.d.ts +13 -20
- package/dist/components/shared/Tag/Tag.stories.d.ts +3 -3
- package/dist/components/shared/Tag/index.d.ts +3 -3
- package/dist/components/shared/index.d.ts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.d.ts +3 -7
- package/dist/providers/ThemeProviderScoped/ThemeProviderScoped.types.d.ts +4 -4
- package/dist/providers/ThemeProviderScoped/index.d.ts +3 -3
- package/dist/providers/index.d.ts +2 -2
- package/dist/root.css +1 -886
- package/dist/types/children.types.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/tokens.types.d.ts +9 -74
- package/dist/ui-kit.cjs.js +4 -9322
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.es.js +3957 -6854
- package/dist/ui-kit.es.js.map +1 -1
- package/dist/utils/hooks/index.d.ts +3 -3
- package/dist/utils/hooks/useControlled.d.ts +2 -5
- package/dist/utils/hooks/useDropdownPosition.d.ts +5 -8
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/styles/getFontWeightClass/getFontWeightClass.d.ts +3 -7
- package/dist/utils/styles/getFontWeightClass/index.d.ts +2 -2
- package/dist/utils/styles/getSizeClass/getSizeClass.d.ts +3 -7
- package/dist/utils/styles/getSizeClass/index.d.ts +2 -2
- package/dist/utils/styles/getStyleClass/getStyleClass.d.ts +2 -11
- package/dist/utils/styles/getStyleClass/index.d.ts +2 -2
- package/dist/utils/styles/index.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { FocusEventHandler, ReactNode } from
|
|
1
|
+
import { FocusEventHandler, ReactNode } from 'react';
|
|
2
2
|
export type SelectSize = "xs" | "sm" | "md";
|
|
3
3
|
export interface SelectProps<I, V> {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
items: I[];
|
|
5
|
+
returnedValue: (item: I) => V;
|
|
6
|
+
renderItem: (item: I) => ReactNode;
|
|
7
|
+
value?: V | V[] | null;
|
|
8
|
+
onChange?: (val: V | V[] | null) => void;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
onBlur?: FocusEventHandler;
|
|
11
|
+
label?: string | ReactNode;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
prompt?: string | ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
error?: boolean;
|
|
16
|
+
errorText?: string;
|
|
17
|
+
fullWidth?: boolean;
|
|
18
|
+
showDefaultItem?: boolean;
|
|
19
|
+
emptyText?: string | ReactNode;
|
|
20
|
+
firstItem?: ReactNode;
|
|
21
|
+
lastItem?: ReactNode;
|
|
22
|
+
observer?: ReactNode;
|
|
23
|
+
size?: SelectSize;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* =============================================================================
|
|
@@ -82,26 +82,5 @@ export interface SelectProps<I, V> {
|
|
|
82
82
|
* - useDropdownPosition: вычисляет позицию dropdown относительно триггера
|
|
83
83
|
* - useControlled: управляет состоянием значения в controlled/uncontrolled режиме
|
|
84
84
|
*/
|
|
85
|
-
export declare function Select<I, V extends string | number>({
|
|
86
|
-
|
|
87
|
-
onChange,
|
|
88
|
-
multiple,
|
|
89
|
-
returnedValue,
|
|
90
|
-
renderItem,
|
|
91
|
-
placeholder,
|
|
92
|
-
items,
|
|
93
|
-
fullWidth,
|
|
94
|
-
size,
|
|
95
|
-
showDefaultItem,
|
|
96
|
-
disabled,
|
|
97
|
-
label,
|
|
98
|
-
firstItem,
|
|
99
|
-
lastItem,
|
|
100
|
-
observer,
|
|
101
|
-
emptyText,
|
|
102
|
-
onBlur,
|
|
103
|
-
prompt,
|
|
104
|
-
error,
|
|
105
|
-
errorText,
|
|
106
|
-
}: SelectProps<I, V>): import("react/jsx-runtime").JSX.Element;
|
|
107
|
-
//# sourceMappingURL=Select.d.ts.map
|
|
85
|
+
export declare function Select<I, V extends string | number>({ value, onChange, multiple, returnedValue, renderItem, placeholder, items, fullWidth, size, showDefaultItem, disabled, label, firstItem, lastItem, observer, emptyText, onBlur, prompt, error, errorText, }: SelectProps<I, V>): import("react/jsx-runtime").JSX.Element;
|
|
86
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAgBf,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,WAAW,CAAC,CAAC,EAAE,CAAC;IAC/B,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,aAAa,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC;IAC9B,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IAEnC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAE3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACnD,KAAK,EACL,QAAQ,EACR,QAAgB,EAChB,aAAa,EACb,UAAU,EACV,WAAW,EACX,KAAU,EACV,SAAS,EACT,IAAW,EACX,eAAe,EACf,QAAQ,EACR,KAAK,EACL,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,MAAM,EACN,MAAM,EACN,KAAK,EACL,SAAS,GACV,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,2CA+TnB"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { SelectProps } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SelectProps } from './Select';
|
|
3
3
|
interface SelectItem {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
id: number;
|
|
5
|
+
label: string;
|
|
6
6
|
}
|
|
7
7
|
type StorySelect = SelectProps<SelectItem, number>;
|
|
8
8
|
declare const meta: Meta<StorySelect>;
|
|
@@ -19,4 +19,4 @@ export declare const WithFirstLastItem: Story;
|
|
|
19
19
|
export declare const WithDefaultItem: Story;
|
|
20
20
|
export declare const Controlled: Story;
|
|
21
21
|
export declare const WithObserver: Story;
|
|
22
|
-
//# sourceMappingURL=Select.stories.d.ts.map
|
|
22
|
+
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Select';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,96 +1,90 @@
|
|
|
1
|
-
import { AccentType, SecondaryType, Size } from
|
|
1
|
+
import { AccentType, SecondaryType, Size } from '../../../types/tokens.types';
|
|
2
2
|
type SwitchSizes = Exclude<Size, "xs" | "xl">;
|
|
3
3
|
type ThemeType = "theme";
|
|
4
4
|
export type SwitchVariant = AccentType | SecondaryType | ThemeType;
|
|
5
5
|
export interface SwitchRef {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
6
|
+
/** Фокус на переключателе */
|
|
7
|
+
focus: () => void;
|
|
8
|
+
/** Снятие фокуса */
|
|
9
|
+
blur: () => void;
|
|
10
|
+
/** Текущее состояние переключателя */
|
|
11
|
+
checked: boolean;
|
|
12
|
+
/** Программное изменение состояния переключателя */
|
|
13
|
+
setChecked: (checked: boolean) => void;
|
|
14
|
+
/** Переключение состояния (toggle) */
|
|
15
|
+
toggle: () => void;
|
|
16
|
+
/** Проверка, находится ли переключатель в фокусе */
|
|
17
|
+
isFocused: () => boolean;
|
|
18
|
+
/** Проверка, отключен ли переключатель */
|
|
19
|
+
isDisabled: () => boolean;
|
|
20
|
+
/** Получение DOM-элемента input */
|
|
21
|
+
getInputElement: () => HTMLInputElement | null;
|
|
22
|
+
/** Программная проверка валидности (если есть validation) */
|
|
23
|
+
checkValidity: () => boolean;
|
|
24
|
+
/** Сброс к значению по умолчанию */
|
|
25
|
+
reset: () => void;
|
|
26
26
|
}
|
|
27
|
-
interface SwitchProps
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
* - число — в px
|
|
88
|
-
* @default "auto"
|
|
89
|
-
*/
|
|
90
|
-
w?: "full" | "auto" | string | number;
|
|
27
|
+
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "onChange" | "value" | "defaultValue" | "title"> {
|
|
28
|
+
/**
|
|
29
|
+
* Размер переключателя.
|
|
30
|
+
* Доступны: `sm`, `md`, `lg`.
|
|
31
|
+
* @default "md"
|
|
32
|
+
*/
|
|
33
|
+
size?: SwitchSizes;
|
|
34
|
+
/**
|
|
35
|
+
* Вариант переключателя.
|
|
36
|
+
* Доступны: `accent`, `secondary`, `theme`.
|
|
37
|
+
* @default "accent"
|
|
38
|
+
*/
|
|
39
|
+
variant?: SwitchVariant;
|
|
40
|
+
/**
|
|
41
|
+
* Заголовок переключателя.
|
|
42
|
+
*/
|
|
43
|
+
title?: string | React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Текст переключателя.
|
|
46
|
+
*/
|
|
47
|
+
text?: string | React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* Иконка переключателя.
|
|
50
|
+
*/
|
|
51
|
+
icon?: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* Отключает переключатель.
|
|
54
|
+
* При `true` блокирует клики, добавляет стиль `not-allowed` и понижает прозрачность.
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Обработчик изменения состояния переключателя.
|
|
60
|
+
*/
|
|
61
|
+
onChange?: (checked: boolean) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Контролируемое значение.
|
|
64
|
+
*/
|
|
65
|
+
checked?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Неконтролируемое значение по умолчанию.
|
|
68
|
+
*/
|
|
69
|
+
defaultValue?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Дополнительный класс для контейнера.
|
|
72
|
+
*/
|
|
73
|
+
className?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Отображать переключатель и лейблы в обратном порядке.
|
|
76
|
+
*/
|
|
77
|
+
reverse?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Ширина контейнера.
|
|
80
|
+
* - `full` — 100%
|
|
81
|
+
* - `auto` — по содержимому
|
|
82
|
+
* - строка — в px
|
|
83
|
+
* - число — в px
|
|
84
|
+
* @default "auto"
|
|
85
|
+
*/
|
|
86
|
+
w?: "full" | "auto" | string | number;
|
|
91
87
|
}
|
|
92
|
-
declare const Switch: import(
|
|
93
|
-
SwitchProps & import("react").RefAttributes<SwitchRef>
|
|
94
|
-
>;
|
|
88
|
+
declare const Switch: import('react').ForwardRefExoticComponent<SwitchProps & import('react').RefAttributes<SwitchRef>>;
|
|
95
89
|
export { Switch };
|
|
96
|
-
//# sourceMappingURL=Switch.d.ts.map
|
|
90
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Switch } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Switch } from './Switch';
|
|
3
3
|
declare const meta: Meta<typeof Switch>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Switch>;
|
|
@@ -8,4 +8,4 @@ export declare const Accent: Story;
|
|
|
8
8
|
export declare const Secondary: Story;
|
|
9
9
|
export declare const WithIcon: Story;
|
|
10
10
|
export declare const Theme: Story;
|
|
11
|
-
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
11
|
+
//# sourceMappingURL=Switch.stories.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { SwitchRef } from
|
|
2
|
-
export { Switch } from
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export type { SwitchRef } from './Switch';
|
|
2
|
+
export { Switch } from './Switch';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './Checkbox';
|
|
3
|
+
export * from './IconButton';
|
|
4
|
+
export * from './Input';
|
|
5
|
+
export * from './Select';
|
|
6
|
+
export * from './Switch';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './builders';
|
|
2
|
+
export * from './controls';
|
|
3
|
+
export * from './shared';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { IAvatarProps } from
|
|
2
|
-
export declare function Avatar({
|
|
3
|
-
|
|
4
|
-
children,
|
|
5
|
-
className,
|
|
6
|
-
color,
|
|
7
|
-
size,
|
|
8
|
-
...props
|
|
9
|
-
}: IAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
//# sourceMappingURL=Avatar.d.ts.map
|
|
1
|
+
import { IAvatarProps } from './Avatar.types.ts';
|
|
2
|
+
export declare function Avatar({ attr, children, className, color, size, ...props }: IAvatarProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { IAvatarProps } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { IAvatarProps } from './Avatar.types';
|
|
3
3
|
declare const meta: Meta<IAvatarProps>;
|
|
4
4
|
type Story = StoryObj<typeof meta>;
|
|
5
5
|
export declare const SvgIcon: Story;
|
|
6
6
|
export declare const ImgTag: Story;
|
|
7
7
|
export declare const Text: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
args: {
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
11
|
};
|
|
12
12
|
export default meta;
|
|
13
|
-
//# sourceMappingURL=Avatar.stories.d.ts.map
|
|
13
|
+
//# sourceMappingURL=Avatar.stories.d.ts.map
|
|
@@ -1,26 +1,13 @@
|
|
|
1
|
-
import { ComponentProps } from
|
|
2
|
-
import {
|
|
3
|
-
CustomType,
|
|
4
|
-
NegativeType,
|
|
5
|
-
PositiveType,
|
|
6
|
-
PrimaryType,
|
|
7
|
-
SecondaryType,
|
|
8
|
-
Size,
|
|
9
|
-
WarningType,
|
|
10
|
-
} from "../../../types/tokens.types.ts";
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { CustomType, NegativeType, PositiveType, PrimaryType, SecondaryType, Size, WarningType } from '../../../types/tokens.types.ts';
|
|
11
3
|
type AvatarAttributes = Pick<ComponentProps<"div">, "className" | "children">;
|
|
12
4
|
type AvatarRestAttributes = Omit<ComponentProps<"div">, keyof AvatarAttributes>;
|
|
13
5
|
type AvatarSize = Extract<Size, "lg" | "sm" | "md"> | CustomType;
|
|
14
|
-
type AvatarColor =
|
|
15
|
-
| PrimaryType
|
|
16
|
-
| SecondaryType
|
|
17
|
-
| NegativeType
|
|
18
|
-
| PositiveType
|
|
19
|
-
| WarningType
|
|
20
|
-
| CustomType;
|
|
6
|
+
type AvatarColor = PrimaryType | SecondaryType | NegativeType | PositiveType | WarningType | CustomType;
|
|
21
7
|
export interface IAvatarProps extends AvatarAttributes {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
size?: AvatarSize;
|
|
9
|
+
color?: AvatarColor;
|
|
10
|
+
attr?: AvatarRestAttributes;
|
|
25
11
|
}
|
|
26
|
-
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=Avatar.types.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export type * from
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Avatar';
|
|
2
|
+
export type * from './Avatar.types';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,42 +1,31 @@
|
|
|
1
|
-
import { default as React } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
NegativeType,
|
|
5
|
-
NeutralType,
|
|
6
|
-
PositiveType,
|
|
7
|
-
Size,
|
|
8
|
-
WarningType,
|
|
9
|
-
} from "../../../types/tokens.types";
|
|
10
|
-
type HintColor =
|
|
11
|
-
| WarningType
|
|
12
|
-
| NegativeType
|
|
13
|
-
| PositiveType
|
|
14
|
-
| AccentType
|
|
15
|
-
| NeutralType;
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { AccentType, NegativeType, NeutralType, PositiveType, Size, WarningType } from '../../../types/tokens.types';
|
|
3
|
+
type HintColor = WarningType | NegativeType | PositiveType | AccentType | NeutralType;
|
|
16
4
|
type HintVariant = "solid" | "soft";
|
|
17
5
|
type HintSize = Extract<Size, "md" | "sm">;
|
|
18
6
|
/**
|
|
19
7
|
* Props for the Hint component.
|
|
20
8
|
*/
|
|
21
9
|
export interface HintProps {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
10
|
+
/** Main title text */
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
/** Optional subtitle text */
|
|
13
|
+
subtitle?: React.ReactNode;
|
|
14
|
+
/** Color of the hint (status) */
|
|
15
|
+
color?: HintColor;
|
|
16
|
+
/** Visual variant */
|
|
17
|
+
variant?: HintVariant;
|
|
18
|
+
/** Size of the hint */
|
|
19
|
+
size?: HintSize;
|
|
20
|
+
/** Custom icon node (overrides default) */
|
|
21
|
+
icon?: React.ReactNode;
|
|
22
|
+
/** Disabled state */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Additional className for root */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Inline styles for root */
|
|
27
|
+
style?: React.CSSProperties;
|
|
40
28
|
}
|
|
41
29
|
export declare const Hint: React.FC<HintProps>;
|
|
42
|
-
|
|
30
|
+
export {};
|
|
31
|
+
//# sourceMappingURL=Hint.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Hint } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Hint } from './Hint';
|
|
3
3
|
declare const meta: Meta<typeof Hint>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -25,4 +25,4 @@ export declare const NeutralSolidM: Story;
|
|
|
25
25
|
export declare const NeutralSolidS: Story;
|
|
26
26
|
export declare const Disabled: Story;
|
|
27
27
|
export declare const CustomIcon: Story;
|
|
28
|
-
//# sourceMappingURL=Hint.stories.d.ts.map
|
|
28
|
+
//# sourceMappingURL=Hint.stories.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Hint';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from
|
|
1
|
+
import { FC, PropsWithChildren } from 'react';
|
|
2
2
|
export declare const Portal: FC<PropsWithChildren>;
|
|
3
|
-
//# sourceMappingURL=Portal.d.ts.map
|
|
3
|
+
//# sourceMappingURL=Portal.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Portal } from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { Portal } from './Portal';
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { MouseEvent, ReactNode } from
|
|
1
|
+
import { MouseEvent, ReactNode } from 'react';
|
|
2
2
|
export type TagVariant = "filled";
|
|
3
|
-
export type TagColor =
|
|
4
|
-
| "primary"
|
|
5
|
-
| "accent"
|
|
6
|
-
| "warning"
|
|
7
|
-
| "positive"
|
|
8
|
-
| "negative";
|
|
3
|
+
export type TagColor = "primary" | "accent" | "warning" | "positive" | "negative";
|
|
9
4
|
export type TagSize = "md" | "sm" | "lg";
|
|
10
5
|
/**
|
|
11
6
|
* Пропсы для компонента Tag.
|
|
@@ -22,15 +17,15 @@ export type TagSize = "md" | "sm" | "lg";
|
|
|
22
17
|
* @property {"md" | "sm" | "lg"} [size="md"] - Размер тега.
|
|
23
18
|
*/
|
|
24
19
|
export interface TagProps {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
color?: TagColor;
|
|
22
|
+
onClick?: (e: MouseEvent) => void;
|
|
23
|
+
onDelete?: (e: MouseEvent) => void;
|
|
24
|
+
avatar?: ReactNode;
|
|
25
|
+
icon?: ReactNode;
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
size?: TagSize;
|
|
34
29
|
}
|
|
35
30
|
/**
|
|
36
31
|
* Универсальный компонент Tag для отображения меток с опциональными аватарами, иконками и действиями удаления.
|
|
@@ -50,7 +45,5 @@ export interface TagProps {
|
|
|
50
45
|
* // С аватаром и размером
|
|
51
46
|
* <Tag label="Тег пользователя" size="lg" avatar={<img src="avatar.jpg" alt="Аватар" />} />
|
|
52
47
|
*/
|
|
53
|
-
export declare const Tag: import(
|
|
54
|
-
|
|
55
|
-
>;
|
|
56
|
-
//# sourceMappingURL=Tag.d.ts.map
|
|
48
|
+
export declare const Tag: import('react').ForwardRefExoticComponent<TagProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
49
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Tag } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Tag } from './Tag';
|
|
3
3
|
declare const meta: Meta<typeof Tag>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Tag>;
|
|
@@ -14,4 +14,4 @@ export declare const WithAvatarAndDelete: Story;
|
|
|
14
14
|
export declare const Disabled: Story;
|
|
15
15
|
export declare const Controlled: Story;
|
|
16
16
|
export declare const WithIconAndClick: Story;
|
|
17
|
-
//# sourceMappingURL=Tag.stories.d.ts.map
|
|
17
|
+
//# sourceMappingURL=Tag.stories.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { TagProps } from
|
|
2
|
-
export { Tag } from
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export type { TagProps } from './Tag';
|
|
2
|
+
export { Tag } from './Tag';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './Avatar';
|
|
2
|
+
export * from './Hint';
|
|
3
|
+
export * from './Tag';
|
|
4
|
+
export * from './Portal';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from './components';
|
|
2
|
+
export * from './providers';
|
|
3
|
+
export * from './types';
|
|
4
|
+
export * from './utils';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { IThemeProviderProps } from
|
|
2
|
-
export declare function ThemeProviderScoped({
|
|
3
|
-
|
|
4
|
-
children,
|
|
5
|
-
theme,
|
|
6
|
-
}: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
//# sourceMappingURL=ThemeProviderScoped.d.ts.map
|
|
1
|
+
import { IThemeProviderProps } from './ThemeProviderScoped.types.ts';
|
|
2
|
+
export declare function ThemeProviderScoped({ className, children, theme, }: IThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=ThemeProviderScoped.d.ts.map
|