@dss-kit/ui-kit 0.1.7 → 0.1.8
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 +74 -72
- package/dist/components/builders/Box/index.d.ts +2 -2
- package/dist/components/builders/Box/type.d.ts +58 -0
- package/dist/components/builders/Box/type.d.ts.map +1 -0
- 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 +32 -30
- package/dist/components/builders/Modal/Modal.stories.d.ts +3 -3
- package/dist/components/builders/Modal/ModalFooter/ModalFooter.d.ts +5 -3
- package/dist/components/builders/Modal/ModalFooter/index.d.ts +2 -2
- package/dist/components/builders/Modal/ModalHeader/ModalHeader.d.ts +18 -12
- package/dist/components/builders/Modal/ModalHeader/index.d.ts +2 -2
- package/dist/components/builders/Modal/ModalMain/ModalMain.d.ts +30 -28
- package/dist/components/builders/Modal/ModalMain/index.d.ts +3 -3
- package/dist/components/builders/Modal/index.d.ts +12 -9
- package/dist/components/builders/Ripple/Ripple.d.ts +13 -16
- package/dist/components/builders/Ripple/index.d.ts +2 -2
- package/dist/components/builders/Text/Text.d.ts +476 -329
- 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 +9 -4
- package/dist/components/controls/Button/types.d.ts +14 -3
- package/dist/components/controls/Checkbox/Checkbox.d.ts +29 -18
- package/dist/components/controls/Checkbox/Checkbox.d.ts.map +1 -1
- 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 +11 -3
- package/dist/components/controls/IconButton/IconButton.stories.d.ts +3 -3
- package/dist/components/controls/IconButton/IconButton.types.d.ts +33 -10
- package/dist/components/controls/IconButton/index.d.ts +3 -3
- package/dist/components/controls/Input/Input.d.ts +47 -38
- 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 +44 -22
- 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 +89 -83
- 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 +10 -3
- package/dist/components/shared/Avatar/Avatar.stories.d.ts +6 -6
- package/dist/components/shared/Avatar/Avatar.types.d.ts +21 -8
- package/dist/components/shared/Avatar/index.d.ts +3 -3
- package/dist/components/shared/Hint/Hint.d.ts +34 -23
- 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 +20 -13
- 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 +7 -3
- 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 +886 -1
- package/dist/types/children.types.d.ts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/tokens.types.d.ts +74 -9
- package/dist/ui-kit.cjs.js +9323 -5
- package/dist/ui-kit.cjs.js.map +1 -1
- package/dist/ui-kit.css +1 -1
- package/dist/ui-kit.es.js +7912 -5918
- 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 +5 -2
- package/dist/utils/hooks/useDropdownPosition.d.ts +8 -5
- package/dist/utils/index.d.ts +3 -3
- package/dist/utils/styles/getFontWeightClass/getFontWeightClass.d.ts +7 -3
- package/dist/utils/styles/getFontWeightClass/index.d.ts +2 -2
- package/dist/utils/styles/getSizeClass/getSizeClass.d.ts +7 -3
- package/dist/utils/styles/getSizeClass/index.d.ts +2 -2
- package/dist/utils/styles/getStyleClass/getStyleClass.d.ts +11 -2
- 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,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps } from
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Тип для описания отступов и размеров
|
|
4
4
|
*/
|
|
@@ -7,79 +7,80 @@ type Spacing = number | string;
|
|
|
7
7
|
* Интерфейс для всех свойств стилизации Box компонента
|
|
8
8
|
*/
|
|
9
9
|
type BoxSpacers = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
10
|
+
/** Высота элемента. Может быть числом, строкой, "auto", "full" (100%) или "screen" (100vh) */
|
|
11
|
+
h?: number | string | "auto" | "full" | "screen";
|
|
12
|
+
/** Ширина элемента. Может быть числом, строкой, "auto", "full" (100%) или "screen" (100vw) */
|
|
13
|
+
w?: number | string | "auto" | "full" | "screen";
|
|
14
|
+
/** Внешний отступ со всех сторон */
|
|
15
|
+
m?: Spacing;
|
|
16
|
+
/** Внешний отступ по горизонтали (слева и справа) */
|
|
17
|
+
mx?: Spacing;
|
|
18
|
+
/** Внешний отступ по вертикали (сверху и снизу) */
|
|
19
|
+
my?: Spacing;
|
|
20
|
+
/** Внешний отступ сверху */
|
|
21
|
+
mt?: Spacing;
|
|
22
|
+
/** Внешний отступ справа */
|
|
23
|
+
mr?: Spacing;
|
|
24
|
+
/** Внешний отступ снизу */
|
|
25
|
+
mb?: Spacing;
|
|
26
|
+
/** Внешний отступ слева */
|
|
27
|
+
ml?: Spacing;
|
|
28
|
+
/** Внутренний отступ со всех сторон */
|
|
29
|
+
p?: Spacing;
|
|
30
|
+
/** Внутренний отступ по горизонтали (слева и справа) */
|
|
31
|
+
px?: Spacing;
|
|
32
|
+
/** Внутренний отступ по вертикали (сверху и снизу) */
|
|
33
|
+
py?: Spacing;
|
|
34
|
+
/** Внутренний отступ сверху */
|
|
35
|
+
pt?: Spacing;
|
|
36
|
+
/** Внутренний отступ справа */
|
|
37
|
+
pr?: Spacing;
|
|
38
|
+
/** Внутренний отступ снизу */
|
|
39
|
+
pb?: Spacing;
|
|
40
|
+
/** Внутренний отступ слева */
|
|
41
|
+
pl?: Spacing;
|
|
42
|
+
gap?: Spacing;
|
|
43
|
+
/** Расстояние между колонками в flex-контейнере */
|
|
44
|
+
xGap?: Spacing;
|
|
45
|
+
/** Расстояние между строками в flex-контейнере */
|
|
46
|
+
yGap?: Spacing;
|
|
47
|
+
/** Если true, flex-direction будет row, иначе column */
|
|
48
|
+
row?: boolean;
|
|
49
|
+
/** Значение flex свойства. true эквивалентно 1 */
|
|
50
|
+
flex?: true | number | string;
|
|
51
|
+
/** Абсолютное позиционирование на весь контейнер */
|
|
52
|
+
absoluteFill?: boolean;
|
|
53
|
+
/** Центрирование по горизонтали и вертикали */
|
|
54
|
+
center?: boolean;
|
|
55
|
+
justifyContent?: React.CSSProperties["justifyContent"];
|
|
56
|
+
alignItems?: React.CSSProperties["alignItems"];
|
|
57
|
+
alignSelf?: React.CSSProperties["alignSelf"];
|
|
58
|
+
borderWidth?: Spacing;
|
|
59
|
+
borderBottomWidth?: Spacing;
|
|
60
|
+
borderColor?: string;
|
|
61
|
+
borderRadius?: Spacing;
|
|
62
|
+
zIndex?: number;
|
|
63
|
+
overflow?: React.CSSProperties["overflow"];
|
|
64
|
+
minWidth?: Spacing;
|
|
65
|
+
minHeight?: Spacing;
|
|
66
|
+
maxWidth?: Spacing;
|
|
67
|
+
maxHeight?: Spacing;
|
|
68
|
+
flexWrap?: React.CSSProperties["flexWrap"];
|
|
69
|
+
flexGrow?: number;
|
|
70
|
+
flexShrink?: number;
|
|
71
|
+
flexBasis?: Spacing;
|
|
72
|
+
backgroundColor?: string;
|
|
73
|
+
relative?: boolean;
|
|
74
|
+
absolute?: boolean;
|
|
75
|
+
display?: React.CSSProperties["display"];
|
|
76
76
|
};
|
|
77
77
|
/**
|
|
78
78
|
* Пропсы для компонента Box
|
|
79
79
|
* Наследует все BoxSpacers свойства и стандартные HTML div атрибуты
|
|
80
80
|
*/
|
|
81
|
-
export interface BoxProps
|
|
82
|
-
|
|
81
|
+
export interface BoxProps
|
|
82
|
+
extends BoxSpacers,
|
|
83
|
+
Omit<ComponentProps<"div">, keyof BoxSpacers> {}
|
|
83
84
|
/**
|
|
84
85
|
* Универсальный Box (display="flex") компонент для создания flex-контейнеров с удобными пропсами для стилизации.
|
|
85
86
|
*
|
|
@@ -109,6 +110,7 @@ export interface BoxProps extends BoxSpacers, Omit<ComponentProps<"div">, keyof
|
|
|
109
110
|
* </Box>
|
|
110
111
|
* ```
|
|
111
112
|
*/
|
|
112
|
-
export declare const Box: import(
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
export declare const Box: import("react").ForwardRefExoticComponent<
|
|
114
|
+
Omit<BoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>
|
|
115
|
+
>;
|
|
116
|
+
//# sourceMappingURL=Box.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from "./Box";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare const colorTokens: {
|
|
2
|
+
readonly fill: {
|
|
3
|
+
readonly accent: readonly ["primary", "secondary", "hover", "inverse"];
|
|
4
|
+
readonly positive: readonly ["primary", "secondary", "hover", "inverse"];
|
|
5
|
+
readonly negative: readonly ["primary", "secondary", "hover", "inverse"];
|
|
6
|
+
readonly warning: readonly ["primary", "secondary", "hover", "inverse"];
|
|
7
|
+
readonly neutral: readonly ["primary", "secondary", "hover", "inverse"];
|
|
8
|
+
};
|
|
9
|
+
readonly "fill-bg": {
|
|
10
|
+
readonly bg: readonly [
|
|
11
|
+
"primary",
|
|
12
|
+
"primary-inverse",
|
|
13
|
+
"secondary",
|
|
14
|
+
"secondary-inverse",
|
|
15
|
+
"tertiary",
|
|
16
|
+
"tertiary-inverse",
|
|
17
|
+
"tint",
|
|
18
|
+
"tint-low",
|
|
19
|
+
"elevation-primary",
|
|
20
|
+
"elevation-secondary",
|
|
21
|
+
"elevation-tertiary",
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
readonly border: {
|
|
25
|
+
readonly accent: readonly ["primary", "secondary", "hover", "inverse"];
|
|
26
|
+
readonly positive: readonly ["primary", "secondary", "hover", "inverse"];
|
|
27
|
+
readonly negative: readonly ["primary", "secondary", "hover", "inverse"];
|
|
28
|
+
readonly warning: readonly ["primary", "secondary", "hover", "inverse"];
|
|
29
|
+
readonly neutral: readonly ["primary", "secondary", "hover", "inverse"];
|
|
30
|
+
};
|
|
31
|
+
readonly text: {
|
|
32
|
+
readonly primary: readonly [];
|
|
33
|
+
readonly secondary: readonly [];
|
|
34
|
+
readonly tertiary: readonly [];
|
|
35
|
+
readonly inverse: readonly [];
|
|
36
|
+
readonly positive: readonly [];
|
|
37
|
+
readonly negative: readonly [];
|
|
38
|
+
readonly warning: readonly [];
|
|
39
|
+
};
|
|
40
|
+
readonly icon: {
|
|
41
|
+
readonly primary: readonly [];
|
|
42
|
+
readonly secondary: readonly [];
|
|
43
|
+
readonly tertiary: readonly [];
|
|
44
|
+
readonly inverse: readonly [];
|
|
45
|
+
readonly positive: readonly [];
|
|
46
|
+
readonly negative: readonly [];
|
|
47
|
+
readonly warning: readonly [];
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
type TokenMap = typeof colorTokens;
|
|
51
|
+
export type TokenForRole<R extends keyof TokenMap> = {
|
|
52
|
+
[P in keyof TokenMap[R]]: TokenMap[R][P] extends readonly string[]
|
|
53
|
+
? TokenMap[R][P] extends []
|
|
54
|
+
? `${Extract<P, string>}`
|
|
55
|
+
: `${Extract<P, string>}-${TokenMap[R][P][number]}`
|
|
56
|
+
: never;
|
|
57
|
+
}[keyof TokenMap[R]];
|
|
58
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/components/builders/Box/type.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDP,CAAC;AAEX,KAAK,QAAQ,GAAG,OAAO,WAAW,CAAC;AAEnC,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,QAAQ,IAAI;KAClD,CAAC,IAAI,MAAM,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,SAAS,MAAM,EAAE,GAC9D,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,GACvB,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,GACvB,GAAG,OAAO,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,GACnD,KAAK;CACV,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { default as React } from
|
|
1
|
+
import { default as React } from "react";
|
|
2
2
|
interface LoaderProps {
|
|
3
|
-
|
|
3
|
+
color?: string;
|
|
4
4
|
}
|
|
5
5
|
declare const Loader: React.FC<LoaderProps>;
|
|
6
6
|
export default Loader;
|
|
7
|
-
//# sourceMappingURL=Loader.d.ts.map
|
|
7
|
+
//# sourceMappingURL=Loader.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from "./Loader";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren } from
|
|
2
|
-
import { Size } from
|
|
1
|
+
import { default as React, PropsWithChildren } from "react";
|
|
2
|
+
import { Size } from "../../../types/tokens.types";
|
|
3
3
|
export interface ModalProps extends PropsWithChildren {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
4
|
+
/** Показывать ли модальное окно */
|
|
5
|
+
isOpen?: boolean;
|
|
6
|
+
/** Callback при закрытии модального окна */
|
|
7
|
+
/** @default undefined */
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
/** Размер модального окна */
|
|
10
|
+
/** @default "md" */
|
|
11
|
+
size?: Exclude<Size, "xl" | "xs">;
|
|
12
|
+
/** Закрывать ли при клике на backdrop */
|
|
13
|
+
/** @default true */
|
|
14
|
+
closeOnBackdropClick?: boolean;
|
|
15
|
+
/** Закрывать ли при нажатии ESC */
|
|
16
|
+
/** @default true */
|
|
17
|
+
closeOnEsc?: boolean;
|
|
18
|
+
/** Кастомный класс для overlay */
|
|
19
|
+
/** @default undefined */
|
|
20
|
+
overlayClassName?: string;
|
|
21
|
+
/** Кастомный класс для модального окна */
|
|
22
|
+
/** @default undefined */
|
|
23
|
+
modalClassName?: string;
|
|
24
|
+
/** Отключать прокрутку body при открытии */
|
|
25
|
+
/** @default false */
|
|
26
|
+
disableBodyScroll?: boolean;
|
|
27
|
+
/** Показывать ли кнопку закрытия c абсолютным позиционированием внутри модального окна */
|
|
28
|
+
/** @default false */
|
|
29
|
+
showAbsoluteCloseButton?: boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const Modal: React.ForwardRefExoticComponent<
|
|
31
|
+
declare const Modal: React.ForwardRefExoticComponent<
|
|
32
|
+
ModalProps & React.RefAttributes<HTMLDivElement>
|
|
33
|
+
>;
|
|
32
34
|
export { Modal };
|
|
33
|
-
//# sourceMappingURL=Modal.d.ts.map
|
|
35
|
+
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { Modal } from
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Modal } from "./index";
|
|
3
3
|
declare const meta: Meta<typeof Modal>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Modal>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithVirtualize: Story;
|
|
8
8
|
export declare const WithReactPortal: Story;
|
|
9
|
-
//# sourceMappingURL=Modal.stories.d.ts.map
|
|
9
|
+
//# sourceMappingURL=Modal.stories.d.ts.map
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { BoxProps } from
|
|
2
|
-
declare const ModalFooter: import(
|
|
1
|
+
import { BoxProps } from "../../Box";
|
|
2
|
+
declare const ModalFooter: import("react").ForwardRefExoticComponent<
|
|
3
|
+
Omit<BoxProps, "ref"> & import("react").RefAttributes<HTMLDivElement>
|
|
4
|
+
>;
|
|
3
5
|
export { ModalFooter };
|
|
4
|
-
//# sourceMappingURL=ModalFooter.d.ts.map
|
|
6
|
+
//# sourceMappingURL=ModalFooter.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ModalFooter } from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { ModalFooter } from "./ModalFooter";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { BoxProps } from
|
|
2
|
-
interface ModalHeaderProps
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { BoxProps } from "../../Box";
|
|
2
|
+
interface ModalHeaderProps
|
|
3
|
+
extends Pick<
|
|
4
|
+
BoxProps,
|
|
5
|
+
"p" | "px" | "py" | "pt" | "pb" | "row" | "justifyContent" | "w"
|
|
6
|
+
> {
|
|
7
|
+
/** @default undefined */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** @default undefined */
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
/** @default undefined */
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
/** @default undefined */
|
|
14
|
+
showCloseButton?: boolean;
|
|
11
15
|
}
|
|
12
|
-
declare const ModalHeader: import(
|
|
16
|
+
declare const ModalHeader: import("react").ForwardRefExoticComponent<
|
|
17
|
+
ModalHeaderProps & import("react").RefAttributes<HTMLDivElement>
|
|
18
|
+
>;
|
|
13
19
|
export { ModalHeader };
|
|
14
|
-
//# sourceMappingURL=ModalHeader.d.ts.map
|
|
20
|
+
//# sourceMappingURL=ModalHeader.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ModalHeader } from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { ModalHeader } from "./ModalHeader";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { ScrollToOptions } from
|
|
2
|
-
import { PropsWithChildren } from
|
|
1
|
+
import { ScrollToOptions } from "@tanstack/react-virtual";
|
|
2
|
+
import { PropsWithChildren } from "react";
|
|
3
3
|
interface ModalMainRef {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
4
|
+
/** Скролл к началу списка */
|
|
5
|
+
scrollToTop: () => void;
|
|
6
|
+
/** Скролл к концу списка */
|
|
7
|
+
scrollToBottom: () => void;
|
|
8
|
+
/** Скролл к элементу по индексу */
|
|
9
|
+
scrollToIndex: (index: number, options?: ScrollToOptions) => void;
|
|
10
|
+
/** Скролл к определенной позиции в пикселях */
|
|
11
|
+
scrollToOffset: (offset: number, options?: ScrollToOptions) => void;
|
|
12
|
+
/** Скролл на определенное количество пикселей относительно текущей позиции */
|
|
13
|
+
scrollBy: (delta: number) => void;
|
|
14
|
+
/** Получить DOM элемент */
|
|
15
|
+
getElement: () => HTMLDivElement | null;
|
|
16
|
+
/** Получить текущую позицию скролла */
|
|
17
|
+
getScrollOffset: () => number;
|
|
18
|
+
/** Получить общую высоту контента */
|
|
19
|
+
getTotalSize: () => number;
|
|
20
20
|
}
|
|
21
21
|
interface ModalMainProps extends PropsWithChildren {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
/** Если true, flex-direction будет row, иначе column */
|
|
23
|
+
row?: boolean;
|
|
24
|
+
/** Кастомный класс */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** Примерная высота элемента для виртуализации */
|
|
27
|
+
estimatedItemHeight?: number;
|
|
28
|
+
/** Включить виртуализацию для больших списков */
|
|
29
|
+
virtualize?: boolean;
|
|
30
30
|
}
|
|
31
|
-
declare const ModalMain: import(
|
|
31
|
+
declare const ModalMain: import("react").ForwardRefExoticComponent<
|
|
32
|
+
ModalMainProps & import("react").RefAttributes<ModalMainRef>
|
|
33
|
+
>;
|
|
32
34
|
export { ModalMain };
|
|
33
35
|
export type { ModalMainRef };
|
|
34
|
-
//# sourceMappingURL=ModalMain.d.ts.map
|
|
36
|
+
//# sourceMappingURL=ModalMain.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { ModalMain } from
|
|
2
|
-
export type { ModalMainRef } from
|
|
3
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export { ModalMain } from "./ModalMain";
|
|
2
|
+
export type { ModalMainRef } from "./ModalMain";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { ModalProps } from
|
|
2
|
-
import { ModalHeader } from
|
|
3
|
-
import { ModalFooter } from
|
|
4
|
-
import { ModalMain } from
|
|
5
|
-
interface ModalCompoundComponent
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { ModalProps } from "./Modal";
|
|
2
|
+
import { ModalHeader } from "./ModalHeader";
|
|
3
|
+
import { ModalFooter } from "./ModalFooter";
|
|
4
|
+
import { ModalMain } from "./ModalMain";
|
|
5
|
+
interface ModalCompoundComponent
|
|
6
|
+
extends React.ForwardRefExoticComponent<
|
|
7
|
+
ModalProps & React.RefAttributes<HTMLDivElement>
|
|
8
|
+
> {
|
|
9
|
+
Header: typeof ModalHeader;
|
|
10
|
+
Main: typeof ModalMain;
|
|
11
|
+
Footer: typeof ModalFooter;
|
|
9
12
|
}
|
|
10
13
|
declare const ModalWithSubComponents: ModalCompoundComponent;
|
|
11
14
|
export { ModalWithSubComponents as Modal };
|
|
12
15
|
export type { ModalCompoundComponent as ModalProps };
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,18 +3,14 @@
|
|
|
3
3
|
* Позволяет программно запускать эффект ripple.
|
|
4
4
|
*/
|
|
5
5
|
type RippleHandle = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
center?: boolean;
|
|
15
|
-
x?: number;
|
|
16
|
-
y?: number;
|
|
17
|
-
}) => void;
|
|
6
|
+
/**
|
|
7
|
+
* Запускает эффект ripple.
|
|
8
|
+
* @param opts - Опции для запуска.
|
|
9
|
+
* @param opts.center - Если true, эффект запускается из центра элемента (по умолчанию true).
|
|
10
|
+
* @param opts.x - Координата X для центра ripple (игнорируется, если center=true).
|
|
11
|
+
* @param opts.y - Координата Y для центра ripple (игнорируется, если center=true).
|
|
12
|
+
*/
|
|
13
|
+
trigger: (opts?: { center?: boolean; x?: number; y?: number }) => void;
|
|
18
14
|
};
|
|
19
15
|
/**
|
|
20
16
|
* Компонент Ripple для создания эффекта "волны" на интерактивных элементах.
|
|
@@ -29,11 +25,12 @@ type RippleHandle = {
|
|
|
29
25
|
* @param ref - Ref для доступа к методу trigger.
|
|
30
26
|
* @returns JSX.Element - Overlay с ripple-элементами.
|
|
31
27
|
*/
|
|
32
|
-
export declare const Ripple: import(
|
|
28
|
+
export declare const Ripple: import("react").ForwardRefExoticComponent<
|
|
29
|
+
{
|
|
33
30
|
color?: string;
|
|
34
31
|
duration?: number;
|
|
35
32
|
radius?: number | "auto";
|
|
36
33
|
className?: string;
|
|
37
|
-
} & import(
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=Ripple.d.ts.map
|
|
34
|
+
} & import("react").RefAttributes<RippleHandle>
|
|
35
|
+
>;
|
|
36
|
+
//# sourceMappingURL=Ripple.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
//# sourceMappingURL=index.d.ts.map
|
|
1
|
+
export * from "./Ripple";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|