@ozen-ui/kit 0.5.0 → 0.7.0
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/Paper/package.json +5 -0
- package/__inner__/cjs/components/Alert/Alert.css +0 -5
- package/__inner__/cjs/components/Alert/Alert.js +3 -2
- package/__inner__/cjs/components/Breadcrumbs/Breadcrumbs.css +4 -0
- package/__inner__/cjs/components/Card/Card.css +9 -21
- package/__inner__/cjs/components/Card/Card.d.ts +3 -4
- package/__inner__/cjs/components/Card/Card.js +11 -1
- package/__inner__/cjs/components/Dialog/Dialog.css +0 -2
- package/__inner__/cjs/components/Dialog/Dialog.d.ts +21 -1
- package/__inner__/cjs/components/Drawer/Drawer.css +0 -1
- package/__inner__/cjs/components/Drawer/Drawer.d.ts +23 -1
- package/__inner__/cjs/components/Menu/components/MenuItem/MenuItem.js +3 -2
- package/__inner__/cjs/components/Modal/Modal.css +4 -3
- package/__inner__/cjs/components/Modal/Modal.d.ts +58 -5
- package/__inner__/cjs/components/Modal/Modal.js +2 -1
- package/__inner__/cjs/components/Paper/Paper.css +44 -0
- package/__inner__/cjs/components/Paper/Paper.d.ts +19 -0
- package/__inner__/cjs/components/Paper/Paper.js +25 -0
- package/__inner__/cjs/components/Paper/index.d.ts +1 -0
- package/__inner__/cjs/components/Paper/index.js +4 -0
- package/__inner__/cjs/components/Popover/Popover.css +1 -11
- package/__inner__/cjs/components/Popover/Popover.d.ts +2 -3
- package/__inner__/cjs/components/Popover/Popover.js +4 -3
- package/__inner__/cjs/components/Popover/components/PopoverArrow.js +2 -2
- package/__inner__/cjs/components/Popover/components/types.d.ts +0 -3
- package/__inner__/cjs/components/Popover/components/types.js +1 -2
- package/__inner__/cjs/components/Popover/constants.d.ts +1 -0
- package/__inner__/cjs/components/Popover/constants.js +3 -1
- package/__inner__/cjs/components/Popover/types.d.ts +8 -4
- package/__inner__/cjs/components/Portal/Portal.d.ts +8 -8
- package/__inner__/cjs/components/Portal/Portal.js +7 -6
- package/__inner__/cjs/components/Snackbar/SnackbarProvider.d.ts +4 -1
- package/__inner__/cjs/components/Snackbar/components/Snackbar/Snackbar.d.ts +6 -1
- package/__inner__/cjs/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDark.css +107 -82
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDefault.css +117 -92
- package/__inner__/cjs/components/ThemeProvider/_typography/Theme_typography_ozenDefault.css +5 -5
- package/__inner__/cjs/components/ThemeProvider/themes/helper.d.ts +2 -2
- package/__inner__/cjs/components/ThemeProvider/themes/helper.js +32 -7
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/cjs/components/Tooltip/Tooltip.css +11 -16
- package/__inner__/cjs/components/Tooltip/Tooltip.js +1 -2
- package/__inner__/cjs/components/Tooltip/constants.d.ts +1 -0
- package/__inner__/cjs/components/Tooltip/constants.js +3 -1
- package/__inner__/cjs/components/Tooltip/types.d.ts +3 -2
- package/__inner__/cjs/components/Typography/Typography.css +36 -0
- package/__inner__/cjs/components/Typography/Typography.d.ts +1 -1
- package/__inner__/cjs/components/Typography/Typography.js +12 -0
- package/__inner__/esm/components/Alert/Alert.css +0 -5
- package/__inner__/esm/components/Alert/Alert.js +3 -2
- package/__inner__/esm/components/Breadcrumbs/Breadcrumbs.css +4 -0
- package/__inner__/esm/components/Card/Card.css +9 -21
- package/__inner__/esm/components/Card/Card.d.ts +3 -4
- package/__inner__/esm/components/Card/Card.js +11 -1
- package/__inner__/esm/components/Dialog/Dialog.css +0 -2
- package/__inner__/esm/components/Dialog/Dialog.d.ts +21 -1
- package/__inner__/esm/components/Drawer/Drawer.css +0 -1
- package/__inner__/esm/components/Drawer/Drawer.d.ts +23 -1
- package/__inner__/esm/components/Menu/components/MenuItem/MenuItem.js +3 -2
- package/__inner__/esm/components/Modal/Modal.css +4 -3
- package/__inner__/esm/components/Modal/Modal.d.ts +58 -5
- package/__inner__/esm/components/Modal/Modal.js +2 -1
- package/__inner__/esm/components/Paper/Paper.css +44 -0
- package/__inner__/esm/components/Paper/Paper.d.ts +19 -0
- package/__inner__/esm/components/Paper/Paper.js +22 -0
- package/__inner__/esm/components/Paper/index.d.ts +1 -0
- package/__inner__/esm/components/Paper/index.js +1 -0
- package/__inner__/esm/components/Popover/Popover.css +1 -11
- package/__inner__/esm/components/Popover/Popover.d.ts +2 -3
- package/__inner__/esm/components/Popover/Popover.js +6 -5
- package/__inner__/esm/components/Popover/components/PopoverArrow.js +2 -2
- package/__inner__/esm/components/Popover/components/types.d.ts +0 -3
- package/__inner__/esm/components/Popover/components/types.js +0 -1
- package/__inner__/esm/components/Popover/constants.d.ts +1 -0
- package/__inner__/esm/components/Popover/constants.js +2 -0
- package/__inner__/esm/components/Popover/types.d.ts +8 -4
- package/__inner__/esm/components/Portal/Portal.d.ts +8 -8
- package/__inner__/esm/components/Portal/Portal.js +7 -6
- package/__inner__/esm/components/Snackbar/SnackbarProvider.d.ts +4 -1
- package/__inner__/esm/components/Snackbar/components/Snackbar/Snackbar.d.ts +6 -1
- package/__inner__/esm/components/ThemeProvider/ThemeProvider.d.ts +2 -1
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDark.css +107 -82
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDefault.css +117 -92
- package/__inner__/esm/components/ThemeProvider/_typography/Theme_typography_ozenDefault.css +5 -5
- package/__inner__/esm/components/ThemeProvider/themes/helper.d.ts +2 -2
- package/__inner__/esm/components/ThemeProvider/themes/helper.js +32 -7
- package/__inner__/esm/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/esm/components/Tooltip/Tooltip.css +11 -16
- package/__inner__/esm/components/Tooltip/Tooltip.js +3 -4
- package/__inner__/esm/components/Tooltip/constants.d.ts +1 -0
- package/__inner__/esm/components/Tooltip/constants.js +2 -0
- package/__inner__/esm/components/Tooltip/types.d.ts +3 -2
- package/__inner__/esm/components/Typography/Typography.css +36 -0
- package/__inner__/esm/components/Typography/Typography.d.ts +1 -1
- package/__inner__/esm/components/Typography/Typography.js +12 -0
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const color: readonly ["--color-content-primary", "--color-content-secondary", "--color-content-tertiary", "--color-content-disabled", "--color-content-ghost-disabled", "--color-content-action", "--color-content-action-hover", "--color-content-action-pressed", "--color-content-action-dark", "--color-content-action-on", "--color-content-error", "--color-content-error-hover", "--color-content-error-pressed", "--color-content-error-dark", "--color-content-warning", "--color-content-warning-hover", "--color-content-warning-pressed", "--color-content-warning-dark", "--color-content-success", "--color-content-success-hover", "--color-content-success-pressed", "--color-content-success-dark", "--color-content-info", "--color-content-info-hover", "--color-content-info-pressed", "--color-content-info-dark", "--color-content-primary-inverse", "--color-background-main", "--color-background-main-hover", "--color-background-main-pressed", "--color-background-primary", "--color-background-primary-hover", "--color-background-primary-pressed", "--color-background-secondary", "--color-background-secondary-hover", "--color-background-secondary-pressed", "--color-background-tertiary", "--color-background-tertiary-hover", "--color-background-tertiary-pressed", "--color-background-disabled", "--color-background-action", "--color-background-action-hover", "--color-background-action-pressed", "--color-background-action-active-disabled", "--color-background-action-light", "--color-background-action-light-hover", "--color-background-action-light-pressed", "--color-background-error", "--color-background-error-hover", "--color-background-error-pressed", "--color-background-error-light", "--color-background-error-light-hover", "--color-background-error-light-pressed", "--color-background-warning", "--color-background-warning-hover", "--color-background-warning-pressed", "--color-background-warning-light", "--color-background-warning-light-hover", "--color-background-warning-light-pressed", "--color-background-success", "--color-background-success-hover", "--color-background-success-pressed", "--color-background-success-light", "--color-background-success-light-hover", "--color-background-success-light-pressed", "--color-background-info", "--color-background-info-hover", "--color-background-info-pressed", "--color-background-info-light", "--color-background-info-light-hover", "--color-background-info-light-pressed", "--color-background-main-inverse", "--color-background-overlay", "--color-background-ghost", "--color-background-ghost-hover", "--color-background-ghost-pressed", "--color-background-ghost-disabled", "--color-border-main", "--color-border-main-hover", "--color-border-main-pressed", "--color-border-secondary", "--color-border-secondary-hover", "--color-border-secondary-pressed", "--color-border-disabled", "--color-border-ghost-disabled", "--color-border-focused", "--color-border-action", "--color-border-action-hover", "--color-border-action-pressed", "--color-border-error", "--color-border-warning", "--color-border-success", "--color-border-info", "--color-border-main-on", "--color-
|
|
1
|
+
export declare const color: readonly ["--color-content-primary", "--color-content-secondary", "--color-additional-h3", "--color-content-tertiary", "--color-content-disabled", "--color-content-ghost-disabled", "--color-content-action", "--color-content-action-hover", "--color-content-action-pressed", "--color-content-action-dark", "--color-content-action-on", "--color-content-error", "--color-content-error-hover", "--color-content-error-pressed", "--color-content-error-dark", "--color-content-warning", "--color-content-warning-hover", "--color-content-warning-pressed", "--color-content-warning-dark", "--color-content-success", "--color-content-success-hover", "--color-content-success-pressed", "--color-content-success-dark", "--color-content-info", "--color-content-info-hover", "--color-content-info-pressed", "--color-content-info-dark", "--color-content-primary-inverse", "--color-content-accent-main", "--color-accent-main", "--color-content-accent-primary", "--color-accent-primary", "--color-content-accent-disabled", "--color-background-main", "--color-background-main-hover", "--color-background-main-pressed", "--color-background-primary", "--color-background-primary-hover", "--color-background-primary-pressed", "--color-background-secondary", "--color-background-secondary-hover", "--color-background-secondary-pressed", "--color-background-tertiary", "--color-background-tertiary-hover", "--color-background-tertiary-pressed", "--color-background-disabled", "--color-background-action", "--color-background-action-hover", "--color-background-action-pressed", "--color-background-action-active-disabled", "--color-background-action-light", "--color-background-action-light-hover", "--color-background-action-light-pressed", "--color-background-error", "--color-background-error-hover", "--color-background-error-pressed", "--color-background-error-light", "--color-background-error-light-hover", "--color-background-error-light-pressed", "--color-background-warning", "--color-background-warning-hover", "--color-background-warning-pressed", "--color-background-warning-light", "--color-background-warning-light-hover", "--color-background-warning-light-pressed", "--color-background-success", "--color-background-success-hover", "--color-background-success-pressed", "--color-background-success-light", "--color-background-success-light-hover", "--color-background-success-light-pressed", "--color-background-info", "--color-background-info-hover", "--color-background-info-pressed", "--color-background-info-light", "--color-background-info-light-hover", "--color-background-info-light-pressed", "--color-background-main-inverse", "--color-background-overlay", "--color-background-ghost", "--color-background-ghost-hover", "--color-background-ghost-pressed", "--color-background-ghost-disabled", "--color-background-accent-action-light-hover", "--color-background-accent-action-light-pressed", "--color-background-accent-error-light-hover", "--color-background-accent-error-light-pressed", "--color-background-accent-warning-light-hover", "--color-background-accent-warning-light-pressed", "--color-background-accent-success-light-hover", "--color-background-accent-success-light-pressed", "--color-background-accent-info-light-hover", "--color-background-accent-info-light-pressed", "--color-border-main", "--color-border-main-hover", "--color-border-main-pressed", "--color-border-secondary", "--color-border-secondary-hover", "--color-border-secondary-pressed", "--color-border-disabled", "--color-border-ghost-disabled", "--color-border-focused", "--color-border-action", "--color-border-action-hover", "--color-border-action-pressed", "--color-border-error", "--color-border-warning", "--color-border-success", "--color-border-info", "--color-border-main-on", "--color-border-accent-main", "--color-border-accent-disabled", "--color-border-accent-focused", "--color-accent-main-hover", "--color-accent-main-pressed", "--color-accent-primary-hover", "--color-accent-primary-pressed", "--color-accent-secondary", "--color-accent-secondary-hover", "--color-accent-secondary-pressed", "--color-accent-tertiary", "--color-accent-tertiary-hover", "--color-accent-tertiary-pressed", "--color-accent-disabled", "--color-accent-main-inverse", "--color-additional-a1", "--color-additional-a2", "--color-additional-a3", "--color-additional-b1", "--color-additional-b2", "--color-additional-b3", "--color-additional-c1", "--color-additional-c2", "--color-additional-c3", "--color-additional-d1", "--color-additional-d2", "--color-additional-d3", "--color-additional-e1", "--color-additional-e2", "--color-additional-e3", "--color-additional-f1", "--color-additional-f2", "--color-additional-f3", "--color-additional-g1", "--color-additional-g2", "--color-additional-g3", "--color-additional-h1", "--color-additional-h2"];
|
|
2
2
|
export declare const borderRadius: readonly ["--border-radius-l", "--border-radius-xl", "--border-radius-m", "--border-radius-s", "--border-radius-xs", "--border-radius-2xs"];
|
|
3
3
|
export declare const borderWidth: readonly ["--border-width-s", "--border-width-m"];
|
|
4
4
|
export declare const shadow: readonly ["--shadow-l", "--shadow-m", "--shadow-s"];
|
|
5
5
|
export declare const breakpoint: readonly ["--breakpoint-xs", "--breakpoint-s", "--breakpoint-m", "--breakpoint-l"];
|
|
6
6
|
export declare const zIndex: readonly ["--z-index-default", "--z-index-absolute", "--z-index-header", "--z-index-sidebar", "--z-index-modal", "--z-index-popover", "--z-index-snackbar", "--z-index-chat"];
|
|
7
7
|
export declare const space: readonly ["--space-8xl", "--space-7xl", "--space-6xl", "--space-5xl", "--space-4xl", "--space-3xl", "--space-2xl", "--space-xl", "--space-l", "--space-m", "--space-s", "--space-xs"];
|
|
8
|
-
export declare const typography: readonly ["--typography-text-
|
|
8
|
+
export declare const typography: readonly ["--typography-text-xl_1-font", "--typography-text-4xl_1-font", "--typography-text-3xl_1-font", "--typography-text-2xl_1-font", "--typography-heading-4xl-font", "--typography-text-4xl-font", "--typography-heading-3xl-font", "--typography-text-3xl-font", "--typography-heading-2xl-font", "--typography-text-2xl-font", "--typography-heading-xl-font", "--typography-text-xl-font", "--typography-text-l-font", "--typography-text-l_1-font", "--typography-text-m-font", "--typography-text-m_1-font", "--typography-text-s-font", "--typography-text-s_1-font", "--typography-text-xs-font", "--typography-text-xs_1-font", "--typography-text-2xs-font", "--typography-text-2xs_1-font", "--typography-text-3xs-font", "--typography-caption-3xs-font", "--typography-caption-3xs-text_transform", "--typography-caption-3xs-letter_spacing", "--typography-text-3xs_1-font", "--typography-caption-3xs_1-font", "--typography-caption-3xs_1-text_transform", "--typography-caption-3xs_1-letter_spacing"];
|
|
9
9
|
export declare const transition: readonly ["--transition-default", "--transition-slow"];
|
|
@@ -4,6 +4,7 @@ exports.transition = exports.typography = exports.space = exports.zIndex = expor
|
|
|
4
4
|
exports.color = [
|
|
5
5
|
'--color-content-primary',
|
|
6
6
|
'--color-content-secondary',
|
|
7
|
+
'--color-additional-h3',
|
|
7
8
|
'--color-content-tertiary',
|
|
8
9
|
'--color-content-disabled',
|
|
9
10
|
'--color-content-ghost-disabled',
|
|
@@ -29,6 +30,11 @@ exports.color = [
|
|
|
29
30
|
'--color-content-info-pressed',
|
|
30
31
|
'--color-content-info-dark',
|
|
31
32
|
'--color-content-primary-inverse',
|
|
33
|
+
'--color-content-accent-main',
|
|
34
|
+
'--color-accent-main',
|
|
35
|
+
'--color-content-accent-primary',
|
|
36
|
+
'--color-accent-primary',
|
|
37
|
+
'--color-content-accent-disabled',
|
|
32
38
|
'--color-background-main',
|
|
33
39
|
'--color-background-main-hover',
|
|
34
40
|
'--color-background-main-pressed',
|
|
@@ -79,6 +85,16 @@ exports.color = [
|
|
|
79
85
|
'--color-background-ghost-hover',
|
|
80
86
|
'--color-background-ghost-pressed',
|
|
81
87
|
'--color-background-ghost-disabled',
|
|
88
|
+
'--color-background-accent-action-light-hover',
|
|
89
|
+
'--color-background-accent-action-light-pressed',
|
|
90
|
+
'--color-background-accent-error-light-hover',
|
|
91
|
+
'--color-background-accent-error-light-pressed',
|
|
92
|
+
'--color-background-accent-warning-light-hover',
|
|
93
|
+
'--color-background-accent-warning-light-pressed',
|
|
94
|
+
'--color-background-accent-success-light-hover',
|
|
95
|
+
'--color-background-accent-success-light-pressed',
|
|
96
|
+
'--color-background-accent-info-light-hover',
|
|
97
|
+
'--color-background-accent-info-light-pressed',
|
|
82
98
|
'--color-border-main',
|
|
83
99
|
'--color-border-main-hover',
|
|
84
100
|
'--color-border-main-pressed',
|
|
@@ -96,6 +112,21 @@ exports.color = [
|
|
|
96
112
|
'--color-border-success',
|
|
97
113
|
'--color-border-info',
|
|
98
114
|
'--color-border-main-on',
|
|
115
|
+
'--color-border-accent-main',
|
|
116
|
+
'--color-border-accent-disabled',
|
|
117
|
+
'--color-border-accent-focused',
|
|
118
|
+
'--color-accent-main-hover',
|
|
119
|
+
'--color-accent-main-pressed',
|
|
120
|
+
'--color-accent-primary-hover',
|
|
121
|
+
'--color-accent-primary-pressed',
|
|
122
|
+
'--color-accent-secondary',
|
|
123
|
+
'--color-accent-secondary-hover',
|
|
124
|
+
'--color-accent-secondary-pressed',
|
|
125
|
+
'--color-accent-tertiary',
|
|
126
|
+
'--color-accent-tertiary-hover',
|
|
127
|
+
'--color-accent-tertiary-pressed',
|
|
128
|
+
'--color-accent-disabled',
|
|
129
|
+
'--color-accent-main-inverse',
|
|
99
130
|
'--color-additional-a1',
|
|
100
131
|
'--color-additional-a2',
|
|
101
132
|
'--color-additional-a3',
|
|
@@ -119,12 +150,6 @@ exports.color = [
|
|
|
119
150
|
'--color-additional-g3',
|
|
120
151
|
'--color-additional-h1',
|
|
121
152
|
'--color-additional-h2',
|
|
122
|
-
'--color-additional-h3',
|
|
123
|
-
'--color-gradient-gr1',
|
|
124
|
-
'--color-gradient-gr2',
|
|
125
|
-
'--color-gradient-gr3',
|
|
126
|
-
'--color-gradient-gr4',
|
|
127
|
-
'--color-gradient-gr5',
|
|
128
153
|
];
|
|
129
154
|
exports.borderRadius = [
|
|
130
155
|
'--border-radius-l',
|
|
@@ -167,10 +192,10 @@ exports.space = [
|
|
|
167
192
|
'--space-xs',
|
|
168
193
|
];
|
|
169
194
|
exports.typography = [
|
|
195
|
+
'--typography-text-xl_1-font',
|
|
170
196
|
'--typography-text-4xl_1-font',
|
|
171
197
|
'--typography-text-3xl_1-font',
|
|
172
198
|
'--typography-text-2xl_1-font',
|
|
173
|
-
'--typography-text-xl_1-font',
|
|
174
199
|
'--typography-heading-4xl-font',
|
|
175
200
|
'--typography-text-4xl-font',
|
|
176
201
|
'--typography-heading-3xl-font',
|
|
@@ -27,6 +27,7 @@ import type { LoaderProps } from '../Loader';
|
|
|
27
27
|
import type { MenuProps, MenuItemProps, MenuListProps } from '../Menu';
|
|
28
28
|
import type { ModalProps } from '../Modal';
|
|
29
29
|
import type { PaginationProps } from '../Pagination';
|
|
30
|
+
import type { PaperProps } from '../Paper';
|
|
30
31
|
import type { PopoverProps } from '../Popover';
|
|
31
32
|
import type { PortalProps } from '../Portal';
|
|
32
33
|
import type { RadioProps } from '../Radio';
|
|
@@ -91,6 +92,7 @@ export type Theme = {
|
|
|
91
92
|
MenuList?: Partial<MenuListProps>;
|
|
92
93
|
Modal?: Partial<ModalProps>;
|
|
93
94
|
Pagination?: Partial<PaginationProps>;
|
|
95
|
+
Paper?: Partial<PaperProps>;
|
|
94
96
|
Popover?: Partial<PopoverProps>;
|
|
95
97
|
Portal?: Partial<PortalProps>;
|
|
96
98
|
Radio?: Partial<RadioProps>;
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
/* stylelint-disable */
|
|
2
|
-
.
|
|
2
|
+
.Tooltip {
|
|
3
3
|
max-inline-size: 300px;
|
|
4
|
-
box-shadow: var(--shadow-m);
|
|
5
4
|
}
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
color: var(--color-content-primary-inverse);
|
|
9
|
-
}
|
|
10
|
-
.Popover.Tooltip_variant_light {
|
|
11
|
-
background: var(--color-background-main);
|
|
12
|
-
color: var(--color-content-primary);
|
|
13
|
-
}
|
|
14
|
-
.Popover.Tooltip_size_xs {
|
|
15
|
-
padding: 8px 12px;
|
|
5
|
+
.Tooltip_size_xs {
|
|
6
|
+
padding: var(--space-s) var(--space-m);
|
|
16
7
|
|
|
17
8
|
font: var(--typography-text-xs-font);
|
|
18
9
|
|
|
19
10
|
letter-spacing: var(--typography-text-xs-letter_spacing, 0);
|
|
20
11
|
|
|
21
12
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
22
|
-
border-radius: var(--border-radius-s);
|
|
23
13
|
}
|
|
24
|
-
.
|
|
25
|
-
padding:
|
|
14
|
+
.Tooltip_size_s {
|
|
15
|
+
padding: var(--space-m) var(--space-l);
|
|
26
16
|
|
|
27
17
|
font: var(--typography-text-s-font);
|
|
28
18
|
|
|
29
19
|
letter-spacing: var(--typography-text-s-letter_spacing, 0);
|
|
30
20
|
|
|
31
21
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
32
|
-
|
|
22
|
+
}
|
|
23
|
+
.Tooltip_variant_light {
|
|
24
|
+
color: var(--color-content-primary);
|
|
25
|
+
}
|
|
26
|
+
.Tooltip_variant_dark {
|
|
27
|
+
color: var(--color-content-primary-inverse);
|
|
33
28
|
}
|
|
@@ -114,8 +114,7 @@ exports.Tooltip = (0, react_1.forwardRef)(function (inProps, ref) {
|
|
|
114
114
|
]);
|
|
115
115
|
return (react_1["default"].createElement(react_1["default"].Fragment, null,
|
|
116
116
|
react_1["default"].cloneElement(resolveChildren, composeChildrenProps),
|
|
117
|
-
react_1["default"].createElement(Popover_1.Popover, tslib_1.__assign({ anchorRef: anchorRef }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: (0, exports.cnTooltip)({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
118
|
-
variant: variant,
|
|
117
|
+
react_1["default"].createElement(Popover_1.Popover, tslib_1.__assign({ anchorRef: anchorRef, as: constants_1.TOOLTIP_DEFAULT_TAG, background: variant === 'light' ? 'main' : 'main-inverse', radius: size }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: (0, exports.cnTooltip)({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
119
118
|
size: size
|
|
120
119
|
}, disableEnforceFocus: true, disableReturnFocus: true }), label)));
|
|
121
120
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const TOOLTIP_DEFAULT_TAG: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<import("../Paper").PaperBaseProps, "div">;
|
|
1
2
|
export declare const TOOLTIP_DEFAULT_TRIGGER = "hover";
|
|
2
3
|
export declare const TOOLTIP_DEFAULT_SIZE = "s";
|
|
3
4
|
export declare const TOOLTIP_DEFAULT_VARIANT = "dark";
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
|
-
exports.TOOLTIP_DEFAULT_DISABLED = exports.TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN = exports.TOOLTIP_DEFAULT_ARROW = exports.TOOLTIP_DEFAULT_DELAY_LEAVE = exports.TOOLTIP_DEFAULT_DELAY_ENTER = exports.TOOLTIP_DEFAULT_OFFSET = exports.TOOLTIP_DEFAULT_VARIANT = exports.TOOLTIP_DEFAULT_SIZE = exports.TOOLTIP_DEFAULT_TRIGGER = void 0;
|
|
3
|
+
exports.TOOLTIP_DEFAULT_DISABLED = exports.TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN = exports.TOOLTIP_DEFAULT_ARROW = exports.TOOLTIP_DEFAULT_DELAY_LEAVE = exports.TOOLTIP_DEFAULT_DELAY_ENTER = exports.TOOLTIP_DEFAULT_OFFSET = exports.TOOLTIP_DEFAULT_VARIANT = exports.TOOLTIP_DEFAULT_SIZE = exports.TOOLTIP_DEFAULT_TRIGGER = exports.TOOLTIP_DEFAULT_TAG = void 0;
|
|
4
|
+
var Paper_1 = require("../Paper");
|
|
5
|
+
exports.TOOLTIP_DEFAULT_TAG = Paper_1.Paper;
|
|
4
6
|
exports.TOOLTIP_DEFAULT_TRIGGER = 'hover';
|
|
5
7
|
exports.TOOLTIP_DEFAULT_SIZE = 's';
|
|
6
8
|
exports.TOOLTIP_DEFAULT_VARIANT = 'dark';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Ref, ReactNode, ReactElement, ComponentPropsWithRef } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { PopoverBaseProps } from '../Popover';
|
|
3
|
+
import { TOOLTIP_DEFAULT_TAG } from './constants';
|
|
3
4
|
export declare const tooltipSizeVariant: readonly ["xs", "s"];
|
|
4
5
|
export type TooltipSizeVariant = (typeof tooltipSizeVariant)[number];
|
|
5
6
|
export declare const tooltipVariant: readonly ["light", "dark"];
|
|
@@ -39,4 +40,4 @@ export type TooltipProps = {
|
|
|
39
40
|
'data-testid'?: string;
|
|
40
41
|
/** Дополнительные CSS-классы */
|
|
41
42
|
className?: string;
|
|
42
|
-
} & Pick<
|
|
43
|
+
} & Pick<PopoverBaseProps, 'offset' | 'placement' | 'arrow' | 'anchorRef' | 'ignoreClickOutsideRefs' | 'disableInteractive' | 'onEnter' | 'onEntered' | 'onExit' | 'onExited' | 'setUpdate'> & ComponentPropsWithRef<typeof TOOLTIP_DEFAULT_TAG>;
|
|
@@ -56,33 +56,69 @@
|
|
|
56
56
|
.Typography_color_actionDark {
|
|
57
57
|
color: var(--color-content-action-dark);
|
|
58
58
|
}
|
|
59
|
+
.Typography_color_actionPressed {
|
|
60
|
+
color: var(--color-content-action-pressed);
|
|
61
|
+
}
|
|
59
62
|
.Typography_color_actionOn {
|
|
60
63
|
color: var(--color-content-action-on);
|
|
61
64
|
}
|
|
62
65
|
.Typography_color_error {
|
|
63
66
|
color: var(--color-content-error);
|
|
64
67
|
}
|
|
68
|
+
.Typography_color_errorHover {
|
|
69
|
+
color: var(--color-content-error-hover);
|
|
70
|
+
}
|
|
71
|
+
.Typography_color_errorPressed {
|
|
72
|
+
color: var(--color-content-error-pressed);
|
|
73
|
+
}
|
|
65
74
|
.Typography_color_errorDark {
|
|
66
75
|
color: var(--color-content-error-dark);
|
|
67
76
|
}
|
|
68
77
|
.Typography_color_warning {
|
|
69
78
|
color: var(--color-content-warning);
|
|
70
79
|
}
|
|
80
|
+
.Typography_color_warningHover {
|
|
81
|
+
color: var(--color-content-warning-hover);
|
|
82
|
+
}
|
|
83
|
+
.Typography_color_warningPressed {
|
|
84
|
+
color: var(--color-content-warning-pressed);
|
|
85
|
+
}
|
|
71
86
|
.Typography_color_warningDark {
|
|
72
87
|
color: var(--color-content-warning-dark);
|
|
73
88
|
}
|
|
74
89
|
.Typography_color_success {
|
|
75
90
|
color: var(--color-content-success);
|
|
76
91
|
}
|
|
92
|
+
.Typography_color_successHover {
|
|
93
|
+
color: var(--color-content-success-hover);
|
|
94
|
+
}
|
|
95
|
+
.Typography_color_successPressed {
|
|
96
|
+
color: var(--color-content-success-pressed);
|
|
97
|
+
}
|
|
77
98
|
.Typography_color_successDark {
|
|
78
99
|
color: var(--color-content-success-dark);
|
|
79
100
|
}
|
|
80
101
|
.Typography_color_info {
|
|
81
102
|
color: var(--color-content-info);
|
|
82
103
|
}
|
|
104
|
+
.Typography_color_infoHover {
|
|
105
|
+
color: var(--color-content-info-hover);
|
|
106
|
+
}
|
|
107
|
+
.Typography_color_infoPressed {
|
|
108
|
+
color: var(--color-content-info-pressed);
|
|
109
|
+
}
|
|
83
110
|
.Typography_color_infoDark {
|
|
84
111
|
color: var(--color-content-info-dark);
|
|
85
112
|
}
|
|
113
|
+
.Typography_color_accentMain {
|
|
114
|
+
color: var(--color-content-accent-main);
|
|
115
|
+
}
|
|
116
|
+
.Typography_color_accentPrimary {
|
|
117
|
+
color: var(--color-content-accent-primary);
|
|
118
|
+
}
|
|
119
|
+
.Typography_color_accentDisabled {
|
|
120
|
+
color: var(--color-content-accent-disabled);
|
|
121
|
+
}
|
|
86
122
|
.Typography_variant_heading-4xl {
|
|
87
123
|
font: var(--typography-heading-4xl-font);
|
|
88
124
|
letter-spacing: var(--typography-heading-4xl-letter_spacing, 0);
|
|
@@ -7,7 +7,7 @@ export declare const typographyDisplayVariant: readonly ["block", "inline", "inl
|
|
|
7
7
|
export type TypographyDisplayVariant = (typeof typographyDisplayVariant)[number];
|
|
8
8
|
export declare const typographyAlignVariant: readonly ["left", "center", "right"];
|
|
9
9
|
export type TypographyAlignVariant = (typeof typographyAlignVariant)[number];
|
|
10
|
-
export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionHover", "actionDark", "actionOn", "error", "errorDark", "warning", "warningDark", "success", "successDark", "info", "infoDark", "primaryInverse"];
|
|
10
|
+
export declare const typographyColorVariant: readonly ["primary", "secondary", "tertiary", "disabled", "ghostDisabled", "action", "actionPressed", "actionHover", "actionDark", "actionOn", "error", "errorHover", "errorPressed", "errorDark", "warning", "warningHover", "warningPressed", "warningDark", "success", "successHover", "successDark", "successPressed", "info", "infoHover", "infoPressed", "infoDark", "primaryInverse", "accentMain", "accentPrimary", "accentDisabled"];
|
|
11
11
|
export type TypographyColorVariant = (typeof typographyColorVariant)[number];
|
|
12
12
|
export type TypographyBaseProps = {
|
|
13
13
|
/** Вариант типографики */
|
|
@@ -50,18 +50,30 @@ exports.typographyColorVariant = [
|
|
|
50
50
|
'disabled',
|
|
51
51
|
'ghostDisabled',
|
|
52
52
|
'action',
|
|
53
|
+
'actionPressed',
|
|
53
54
|
'actionHover',
|
|
54
55
|
'actionDark',
|
|
55
56
|
'actionOn',
|
|
56
57
|
'error',
|
|
58
|
+
'errorHover',
|
|
59
|
+
'errorPressed',
|
|
57
60
|
'errorDark',
|
|
58
61
|
'warning',
|
|
62
|
+
'warningHover',
|
|
63
|
+
'warningPressed',
|
|
59
64
|
'warningDark',
|
|
60
65
|
'success',
|
|
66
|
+
'successHover',
|
|
61
67
|
'successDark',
|
|
68
|
+
'successPressed',
|
|
62
69
|
'info',
|
|
70
|
+
'infoHover',
|
|
71
|
+
'infoPressed',
|
|
63
72
|
'infoDark',
|
|
64
73
|
'primaryInverse',
|
|
74
|
+
'accentMain',
|
|
75
|
+
'accentPrimary',
|
|
76
|
+
'accentDisabled',
|
|
65
77
|
];
|
|
66
78
|
exports.cnTypography = (0, classname_1.cn)('Typography');
|
|
67
79
|
exports.Typography = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* stylelint-disable */
|
|
2
2
|
.Alert {
|
|
3
3
|
position: relative;
|
|
4
|
-
border-radius: var(--border-radius-xs);
|
|
5
4
|
display: flex;
|
|
6
5
|
-moz-column-gap: var(--space-s);
|
|
7
6
|
column-gap: var(--space-s);
|
|
@@ -11,8 +10,6 @@
|
|
|
11
10
|
box-sizing: border-box;
|
|
12
11
|
border-inline-start: 4px solid var(--alert-border-color);
|
|
13
12
|
padding: 16px;
|
|
14
|
-
box-shadow: var(--shadow-m);
|
|
15
|
-
background-color: var(--alert-background-color);
|
|
16
13
|
|
|
17
14
|
font: var(--typography-text-xs-font);
|
|
18
15
|
|
|
@@ -21,14 +18,12 @@
|
|
|
21
18
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
22
19
|
}
|
|
23
20
|
.Alert_color_light {
|
|
24
|
-
--alert-background-color: var(--color-background-main);
|
|
25
21
|
--alert-title-text-color: var(--color-content-primary);
|
|
26
22
|
--alert-body-text-color: var(--color-content-secondary);
|
|
27
23
|
--alert-icon-color: var(--color-content-primary);
|
|
28
24
|
--alert-close-button-color: var(--color-background-main-inverse);
|
|
29
25
|
}
|
|
30
26
|
.Alert_color_dark {
|
|
31
|
-
--alert-background-color: var(--color-background-main-inverse);
|
|
32
27
|
--alert-title-text-color: var(--color-content-primary-inverse);
|
|
33
28
|
--alert-body-text-color: var(--color-content-tertiary);
|
|
34
29
|
--alert-icon-color: var(--color-content-primary-inverse);
|
|
@@ -5,6 +5,7 @@ import { CloseIcon, InfoCircleFilledIcon, CheckCircleFilledIcon, WarningTriangle
|
|
|
5
5
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
6
6
|
import { cn } from '../../utils/classname';
|
|
7
7
|
import { IconButton } from '../IconButton';
|
|
8
|
+
import { Paper } from '../Paper';
|
|
8
9
|
import { ALERT_DEFAULT_STATUS, ALERT_DEFAULT_SHOW_ICON, ALERT_DEFAULT_COLOR, } from './constants';
|
|
9
10
|
export var cnAlert = cn('Alert');
|
|
10
11
|
export var alertStatusVariant = [
|
|
@@ -40,9 +41,9 @@ export var Alert = forwardRef(function (inProps, ref) {
|
|
|
40
41
|
}
|
|
41
42
|
return React.cloneElement(actionProp, actionProps);
|
|
42
43
|
}, [actionProp]);
|
|
43
|
-
return (React.createElement(
|
|
44
|
+
return (React.createElement(Paper, __assign({ role: "alert", radius: "xs", shadow: "m", background: color === 'light' ? 'main' : 'main-inverse', className: cnAlert({ status: status, hasCloseButton: !!onClose, color: color }, [
|
|
44
45
|
className,
|
|
45
|
-
])
|
|
46
|
+
]) }, otherProps, { ref: ref }),
|
|
46
47
|
showIcon && (React.createElement("div", { className: cnAlert('Icon') }, matchStatusToIcon[status])),
|
|
47
48
|
React.createElement("div", { className: cnAlert('Content') },
|
|
48
49
|
React.createElement("div", { className: cnAlert('Title') }, title),
|
|
@@ -1,26 +1,21 @@
|
|
|
1
1
|
.Card {
|
|
2
2
|
position: relative;
|
|
3
|
-
background-color: var(--card-background-color);
|
|
4
3
|
padding: var(--card-padding);
|
|
5
4
|
cursor: var(--card-cursor-style);
|
|
6
|
-
border-radius: var(--card-border-radius);
|
|
7
5
|
transition: var(--transition-default);
|
|
8
6
|
box-sizing: border-box;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
.Card_size_s {
|
|
12
10
|
--card-padding: var(--space-l);
|
|
13
|
-
--card-border-radius: var(--border-radius-xs);
|
|
14
11
|
}
|
|
15
12
|
|
|
16
13
|
.Card_size_m {
|
|
17
14
|
--card-padding: var(--space-xl);
|
|
18
|
-
--card-border-radius: var(--border-radius-m);
|
|
19
15
|
}
|
|
20
16
|
|
|
21
17
|
.Card_size_l {
|
|
22
18
|
--card-padding: var(--space-2xl);
|
|
23
|
-
--card-border-radius: var(--border-radius-l);
|
|
24
19
|
}
|
|
25
20
|
|
|
26
21
|
.Card_interactive {
|
|
@@ -32,8 +27,9 @@
|
|
|
32
27
|
position: absolute;
|
|
33
28
|
inset: 0;
|
|
34
29
|
pointer-events: none;
|
|
35
|
-
border: var(--card-border-width) var(--card-border-style)
|
|
36
|
-
|
|
30
|
+
border: var(--card-border-width) var(--card-border-style)
|
|
31
|
+
var(--card-border-color);
|
|
32
|
+
border-radius: var(--paper-border-radius);
|
|
37
33
|
transition: var(--transition-default);
|
|
38
34
|
}
|
|
39
35
|
|
|
@@ -61,14 +57,6 @@
|
|
|
61
57
|
--card-border-style: dashed;
|
|
62
58
|
}
|
|
63
59
|
|
|
64
|
-
.Card_backgroundColor_standard {
|
|
65
|
-
--card-background-color: var(--color-background-main);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.Card_backgroundColor_selected {
|
|
69
|
-
--card-background-color: var(--color-background-action-light);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
60
|
.Card_interactive.Card_borderColor_standard:hover {
|
|
73
61
|
--card-border-color: var(--color-border-secondary-hover);
|
|
74
62
|
}
|
|
@@ -85,12 +73,6 @@
|
|
|
85
73
|
--card-border-color: var(--color-border-action-pressed);
|
|
86
74
|
}
|
|
87
75
|
|
|
88
|
-
.Card_disabled {
|
|
89
|
-
--card-background-color: var(--color-background-disabled);
|
|
90
|
-
--card-border-color: var(--color-border-disabled);
|
|
91
|
-
pointer-events: none;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
76
|
.Card:focus {
|
|
95
77
|
outline: 0;
|
|
96
78
|
box-shadow: var(--shadow-outline-focused);
|
|
@@ -99,3 +81,9 @@
|
|
|
99
81
|
.Card:focus:not(:focus-visible) {
|
|
100
82
|
box-shadow: none;
|
|
101
83
|
}
|
|
84
|
+
|
|
85
|
+
.Card[aria-disabled='true'] {
|
|
86
|
+
--card-border-color: var(--color-border-disabled);
|
|
87
|
+
background-color: var(--color-background-disabled);
|
|
88
|
+
pointer-events: none;
|
|
89
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import './Card.css';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
|
-
import type
|
|
4
|
-
import { type PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
|
|
2
|
+
import type { ReactNode, ElementType } from 'react';
|
|
3
|
+
import { type PolymorphicComponentPropsWithRef } from '../../utils/polymorphicComponentWithRef';
|
|
5
4
|
export declare const cnCard: import("@bem-react/classname").ClassNameFormatter;
|
|
6
5
|
export declare const cardSizeVariant: readonly ["s", "m", "l"];
|
|
7
6
|
export declare const cardBorderWidthVariant: readonly ["none", "s", "m"];
|
|
@@ -34,5 +33,5 @@ export type CardBaseProps = {
|
|
|
34
33
|
className?: string;
|
|
35
34
|
'data-testid'?: string;
|
|
36
35
|
};
|
|
37
|
-
export type CardProps<As extends ElementType = 'div'> =
|
|
36
|
+
export type CardProps<As extends ElementType = 'div'> = PolymorphicComponentPropsWithRef<CardBaseProps, As>;
|
|
38
37
|
export declare const Card: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<CardBaseProps, "div">;
|
|
@@ -4,18 +4,28 @@ import React from 'react';
|
|
|
4
4
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
5
5
|
import { cn } from '../../utils/classname';
|
|
6
6
|
import { polymorphicComponentWithRef, } from '../../utils/polymorphicComponentWithRef';
|
|
7
|
+
import { Paper, } from '../Paper';
|
|
7
8
|
export var cnCard = cn('Card');
|
|
8
9
|
export var cardSizeVariant = ['s', 'm', 'l'];
|
|
9
10
|
export var cardBorderWidthVariant = ['none', 's', 'm'];
|
|
10
11
|
export var cardBorderVariant = ['solid', 'dashed'];
|
|
11
12
|
export var cardBorderColorVariant = ['standard', 'selected'];
|
|
12
13
|
export var cardBackgroundColorVariant = ['standard', 'selected'];
|
|
14
|
+
var matchBorderRadiusPaperToCard = {
|
|
15
|
+
s: 'xs',
|
|
16
|
+
m: 's',
|
|
17
|
+
l: 'l'
|
|
18
|
+
};
|
|
19
|
+
var matchBackgroundColorPaperToCard = {
|
|
20
|
+
selected: 'action-light',
|
|
21
|
+
standard: 'main'
|
|
22
|
+
};
|
|
13
23
|
export var Card = polymorphicComponentWithRef(function (inProps, ref) {
|
|
14
24
|
var props = useThemeProps({ props: inProps, name: 'Card' });
|
|
15
25
|
var _a = props.size, size = _a === void 0 ? 'm' : _a, _b = props.disabled, disabled = _b === void 0 ? false : _b, _c = props.interactive, interactive = _c === void 0 ? false : _c, _d = props.borderWidth, borderWidth = _d === void 0 ? 's' : _d, _e = props.borderVariant, borderVariant = _e === void 0 ? 'solid' : _e, _f = props.borderColor, borderColor = _f === void 0 ? 'standard' : _f, _g = props.backgroundColor, backgroundColor = _g === void 0 ? 'standard' : _g, _h = props.as, Tag = _h === void 0 ? 'div' : _h, className = props.className, children = props.children, other = __rest(props, ["size", "disabled", "interactive", "borderWidth", "borderVariant", "borderColor", "backgroundColor", "as", "className", "children"]);
|
|
16
26
|
var shouldBeInteractive = !disabled && interactive;
|
|
17
27
|
var shouldShowBorder = borderWidth !== 'none';
|
|
18
|
-
return (React.createElement(
|
|
28
|
+
return (React.createElement(Paper, __assign({ as: Tag, radius: matchBorderRadiusPaperToCard[size], background: matchBackgroundColorPaperToCard[backgroundColor] }, other, { ref: ref, "aria-disabled": disabled }, (shouldBeInteractive && { tabIndex: 0 }), { className: cnCard(__assign({ size: size, disabled: disabled, interactive: shouldBeInteractive, backgroundColor: backgroundColor, borderWidth: borderWidth }, (shouldShowBorder && {
|
|
19
29
|
borderVariant: borderVariant,
|
|
20
30
|
borderColor: borderColor
|
|
21
31
|
})), [className]) }), children));
|
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
max-inline-size: var(--modal-width);
|
|
14
14
|
/* stylelint-disable-next-line plugin/use-logical-units */
|
|
15
15
|
max-block-size: calc(100vh - 64px);
|
|
16
|
-
border-radius: var(--border-radius-m);
|
|
17
|
-
box-shadow: var(--shadow-l);
|
|
18
16
|
}
|
|
19
17
|
.Dialog-InnerContainer {
|
|
20
18
|
display: flex;
|
|
@@ -28,4 +28,24 @@ export type DialogProps = {
|
|
|
28
28
|
/** Кастомный класс контейнера диалогового окна */
|
|
29
29
|
className?: string;
|
|
30
30
|
} & Omit<ModalProps, 'open' | 'onClose' | 'children' | 'className'>;
|
|
31
|
-
export declare const Dialog: React.ForwardRefExoticComponent<
|
|
31
|
+
export declare const Dialog: React.ForwardRefExoticComponent<{
|
|
32
|
+
/** Признак по которому компонент будет представлен */
|
|
33
|
+
open: boolean;
|
|
34
|
+
/** Содержимое диалогового окна */
|
|
35
|
+
children: React.ReactNode;
|
|
36
|
+
/** Устанавливает размер типографики и отступов в диалоговом окне */
|
|
37
|
+
size?: "s" | "l" | undefined;
|
|
38
|
+
/** Вариант диалогового окна */
|
|
39
|
+
variant?: "small" | "medium" | "large" | "fullsize" | undefined;
|
|
40
|
+
/** Функция обратного вызова которая будет вызвана когда компонент запрашивает
|
|
41
|
+
* закрытие (нажатие на клавишу {ESC}, клик по подложке Backdrop) */
|
|
42
|
+
onClose?: (() => void) | undefined;
|
|
43
|
+
/** Свойства кнопки закрытия диалогового окна */
|
|
44
|
+
closeButtonProps?: (Omit<IconButtonProps<"button">, "icon"> & {
|
|
45
|
+
'data-testid'?: string | undefined;
|
|
46
|
+
}) | undefined;
|
|
47
|
+
/** Признак по которому кнопка закрытия диалогового окна будет скрыта */
|
|
48
|
+
hideCloseButton?: boolean | undefined;
|
|
49
|
+
/** Кастомный класс контейнера диалогового окна */
|
|
50
|
+
className?: string | undefined;
|
|
51
|
+
} & Omit<ModalProps, "className" | "children" | "open" | "onClose"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -32,4 +32,26 @@ export type DrawerProps = {
|
|
|
32
32
|
/** Кастомный класс контейнера шторки */
|
|
33
33
|
className?: string;
|
|
34
34
|
} & Omit<ModalProps, 'open' | 'onClose' | 'children' | 'className'>;
|
|
35
|
-
export declare const Drawer: React.ForwardRefExoticComponent<
|
|
35
|
+
export declare const Drawer: React.ForwardRefExoticComponent<{
|
|
36
|
+
/** Признак по которому компонент будет представлен */
|
|
37
|
+
open?: boolean | undefined;
|
|
38
|
+
/** Вариант представления шторки */
|
|
39
|
+
variant?: "medium" | "large" | "little" | undefined;
|
|
40
|
+
/** Устанавливает размер типографики и отступов в шторке */
|
|
41
|
+
size?: "s" | "l" | undefined;
|
|
42
|
+
/** Функция обратного вызова которая будет вызвана когда компонент запрашивает
|
|
43
|
+
* закрытие (нажатие на клавишу {ESC}, клик по подложке Backdrop) */
|
|
44
|
+
onClose?: (() => void) | undefined;
|
|
45
|
+
/** Содержимое шторки */
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
/** Расположение шторки */
|
|
48
|
+
placement?: "left" | "right" | undefined;
|
|
49
|
+
/** Признак по которому кнопка закрытия шторки будет скрыта */
|
|
50
|
+
hideCloseButton?: boolean | undefined;
|
|
51
|
+
/** Свойства кнопки закрытия шторки */
|
|
52
|
+
closeButtonProps?: (Omit<IconButtonProps<"button">, "icon"> & {
|
|
53
|
+
'data-testid'?: string | undefined;
|
|
54
|
+
}) | undefined;
|
|
55
|
+
/** Кастомный класс контейнера шторки */
|
|
56
|
+
className?: string | undefined;
|
|
57
|
+
} & Omit<ModalProps, "className" | "children" | "open" | "onClose"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,10 +5,11 @@ import { useThemeProps } from '../../../../hooks/useThemeProps';
|
|
|
5
5
|
import { cn } from '../../../../utils/classname';
|
|
6
6
|
import { polymorphicComponentWithRef, } from '../../../../utils/polymorphicComponentWithRef';
|
|
7
7
|
import { cnListItemButton, ListItemButton, } from '../../../List';
|
|
8
|
+
import { LIST_ITEM_BUTTON_DEFAULT_TAG } from '../../../List/constants';
|
|
8
9
|
export var cnMenuItem = cn('MenuItem');
|
|
9
10
|
export var MenuItem = polymorphicComponentWithRef(function (inProps, ref) {
|
|
10
11
|
var props = useThemeProps({ props: inProps, name: 'MenuItem' });
|
|
11
|
-
var children = props.children, selected = props.selected, value = props.value, label = props.label, _a = props.autoFocus, autoFocus = _a === void 0 ? false : _a, className = props.className, other = __rest(props, ["children", "selected", "value", "label", "autoFocus", "className"]);
|
|
12
|
+
var children = props.children, selected = props.selected, value = props.value, label = props.label, _a = props.autoFocus, autoFocus = _a === void 0 ? false : _a, className = props.className, _b = props.as, Tag = _b === void 0 ? LIST_ITEM_BUTTON_DEFAULT_TAG : _b, other = __rest(props, ["children", "selected", "value", "label", "autoFocus", "className", "as"]);
|
|
12
13
|
var innerRef = useRef(null);
|
|
13
14
|
useEffect(function () {
|
|
14
15
|
var _a;
|
|
@@ -16,6 +17,6 @@ export var MenuItem = polymorphicComponentWithRef(function (inProps, ref) {
|
|
|
16
17
|
(_a = innerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
17
18
|
}
|
|
18
19
|
}, [autoFocus]);
|
|
19
|
-
return (React.createElement(ListItemButton, __assign({ role: "menuitem" }, other, { ref: useMultiRef([ref, innerRef]), className: cnListItemButton({ selected: selected }, [className, cnMenuItem()]), "data-value": value, "data-label": label }), children));
|
|
20
|
+
return (React.createElement(ListItemButton, __assign({ role: "menuitem", as: Tag }, other, { ref: useMultiRef([ref, innerRef]), className: cnListItemButton({ selected: selected }, [className, cnMenuItem()]), "data-value": value, "data-label": label }), children));
|
|
20
21
|
});
|
|
21
22
|
MenuItem.displayName = 'MenuItem';
|