@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,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
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
2
|
import './Tooltip.css';
|
|
3
|
-
import React, { forwardRef, useRef, useMemo, useState, useEffect } from 'react';
|
|
3
|
+
import React, { forwardRef, useRef, useMemo, useState, useEffect, } from 'react';
|
|
4
4
|
import { useControlled } from '../../hooks/useControlled';
|
|
5
5
|
import { useDebounceCallback } from '../../hooks/useDebounceCallback';
|
|
6
6
|
import { useMultiRef } from '../../hooks/useMultiRef';
|
|
7
7
|
import { useThemeProps } from '../../hooks/useThemeProps';
|
|
8
8
|
import { cn } from '../../utils/classname';
|
|
9
9
|
import { Popover } from '../Popover';
|
|
10
|
-
import { TOOLTIP_DEFAULT_ARROW, TOOLTIP_DEFAULT_DELAY_ENTER, TOOLTIP_DEFAULT_DELAY_LEAVE, TOOLTIP_DEFAULT_DISABLED, TOOLTIP_DEFAULT_OFFSET, TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN, TOOLTIP_DEFAULT_SIZE, TOOLTIP_DEFAULT_TRIGGER, TOOLTIP_DEFAULT_VARIANT, } from './constants';
|
|
10
|
+
import { TOOLTIP_DEFAULT_ARROW, TOOLTIP_DEFAULT_DELAY_ENTER, TOOLTIP_DEFAULT_DELAY_LEAVE, TOOLTIP_DEFAULT_DISABLED, TOOLTIP_DEFAULT_OFFSET, TOOLTIP_DEFAULT_SHOULD_WRAP_CHILDREN, TOOLTIP_DEFAULT_SIZE, TOOLTIP_DEFAULT_TAG, TOOLTIP_DEFAULT_TRIGGER, TOOLTIP_DEFAULT_VARIANT, } from './constants';
|
|
11
11
|
export var cnTooltip = cn('Tooltip');
|
|
12
12
|
export var Tooltip = forwardRef(function (inProps, ref) {
|
|
13
13
|
var props = useThemeProps({ props: inProps, name: 'Tooltip' });
|
|
@@ -111,8 +111,7 @@ export var Tooltip = forwardRef(function (inProps, ref) {
|
|
|
111
111
|
]);
|
|
112
112
|
return (React.createElement(React.Fragment, null,
|
|
113
113
|
React.cloneElement(resolveChildren, composeChildrenProps),
|
|
114
|
-
React.createElement(Popover, __assign({ anchorRef: anchorRef }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: cnTooltip({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
115
|
-
variant: variant,
|
|
114
|
+
React.createElement(Popover, __assign({ anchorRef: anchorRef, as: TOOLTIP_DEFAULT_TAG, background: variant === 'light' ? 'main' : 'main-inverse', radius: size }, other, { ref: ref, offset: offset, placement: placement, open: openState && !disabled, onClose: handleClose, className: cnTooltip({ size: size, variant: variant }, [className]), disableInteractive: disableInteractive, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, arrow: arrow, arrowProps: {
|
|
116
115
|
size: size
|
|
117
116
|
}, disableEnforceFocus: true, disableReturnFocus: true }), label)));
|
|
118
117
|
});
|
|
@@ -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,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
|
/** Вариант типографики */
|
|
@@ -47,18 +47,30 @@ export var typographyColorVariant = [
|
|
|
47
47
|
'disabled',
|
|
48
48
|
'ghostDisabled',
|
|
49
49
|
'action',
|
|
50
|
+
'actionPressed',
|
|
50
51
|
'actionHover',
|
|
51
52
|
'actionDark',
|
|
52
53
|
'actionOn',
|
|
53
54
|
'error',
|
|
55
|
+
'errorHover',
|
|
56
|
+
'errorPressed',
|
|
54
57
|
'errorDark',
|
|
55
58
|
'warning',
|
|
59
|
+
'warningHover',
|
|
60
|
+
'warningPressed',
|
|
56
61
|
'warningDark',
|
|
57
62
|
'success',
|
|
63
|
+
'successHover',
|
|
58
64
|
'successDark',
|
|
65
|
+
'successPressed',
|
|
59
66
|
'info',
|
|
67
|
+
'infoHover',
|
|
68
|
+
'infoPressed',
|
|
60
69
|
'infoDark',
|
|
61
70
|
'primaryInverse',
|
|
71
|
+
'accentMain',
|
|
72
|
+
'accentPrimary',
|
|
73
|
+
'accentDisabled',
|
|
62
74
|
];
|
|
63
75
|
export var cnTypography = cn('Typography');
|
|
64
76
|
export var Typography = polymorphicComponentWithRef(function (inProps, ref) {
|