@ozen-ui/kit 0.37.2 → 0.39.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/ButtonBase/package.json +5 -0
- package/ButtonNext/package.json +5 -0
- package/IconButtonNext/package.json +5 -0
- package/README.md +2 -2
- package/__inner__/cjs/components/Accordion/Accordion.css +18 -17
- package/__inner__/cjs/components/Alert/Alert.css +4 -4
- package/__inner__/cjs/components/Breadcrumbs/Breadcrumbs.css +0 -4
- package/__inner__/cjs/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
- package/__inner__/cjs/components/Button/Button.d.ts +3 -0
- package/__inner__/cjs/components/Button/Button.js +8 -3
- package/__inner__/cjs/components/ButtonBase/ButtonBase.css +10 -0
- package/__inner__/cjs/components/ButtonBase/ButtonBase.d.ts +20 -0
- package/__inner__/cjs/components/ButtonBase/ButtonBase.js +30 -0
- package/__inner__/cjs/components/ButtonBase/constants.d.ts +1 -0
- package/__inner__/cjs/components/ButtonBase/constants.js +4 -0
- package/__inner__/cjs/components/ButtonBase/index.d.ts +1 -0
- package/__inner__/cjs/components/ButtonBase/index.js +4 -0
- package/__inner__/cjs/components/ButtonNext/Button.css +333 -0
- package/__inner__/cjs/components/ButtonNext/Button.d.ts +51 -0
- package/__inner__/cjs/components/ButtonNext/Button.js +60 -0
- package/__inner__/cjs/components/ButtonNext/constants.d.ts +4 -0
- package/__inner__/cjs/components/ButtonNext/constants.js +7 -0
- package/__inner__/cjs/components/ButtonNext/index.d.ts +1 -0
- package/__inner__/cjs/components/ButtonNext/index.js +4 -0
- package/__inner__/cjs/components/Card/Card.css +3 -3
- package/__inner__/cjs/components/Chip/Chip.css +10 -9
- package/__inner__/cjs/components/ChipNext/Chip.css +8 -8
- package/__inner__/cjs/components/Container/Container.css +30 -30
- package/__inner__/cjs/components/DataList/DataList.css +3 -3
- package/__inner__/cjs/components/Drawer/Drawer.css +2 -2
- package/__inner__/cjs/components/FieldControl/FieldControl.css +5 -5
- package/__inner__/cjs/components/File/File.css +2 -2
- package/__inner__/cjs/components/FilePicker/FilePicker.css +5 -5
- package/__inner__/cjs/components/FormControlLabel/FormControlLabel.css +5 -5
- package/__inner__/cjs/components/FormGroup/FormGroup.css +2 -2
- package/__inner__/cjs/components/FormTitle/FormTitle.css +5 -5
- package/__inner__/cjs/components/IconButton/IconButton.d.ts +3 -0
- package/__inner__/cjs/components/IconButton/IconButton.js +7 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.css +348 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.d.ts +41 -0
- package/__inner__/cjs/components/IconButtonNext/IconButton.js +70 -0
- package/__inner__/cjs/components/IconButtonNext/constants.d.ts +4 -0
- package/__inner__/cjs/components/IconButtonNext/constants.js +7 -0
- package/__inner__/cjs/components/IconButtonNext/index.d.ts +1 -0
- package/__inner__/cjs/components/IconButtonNext/index.js +4 -0
- package/__inner__/cjs/components/List/List.css +5 -5
- package/__inner__/cjs/components/Modal/Modal.css +1 -1
- package/__inner__/cjs/components/SectionMessage/SectionMessage.css +5 -5
- package/__inner__/cjs/components/Segment/components/SegmentItem.css +5 -3
- package/__inner__/cjs/components/Slider/Slider.css +1 -1
- package/__inner__/cjs/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
- package/__inner__/cjs/components/Tabs/components/Tab/Tab.css +1 -1
- package/__inner__/cjs/components/Tag/Tag.css +1 -1
- package/__inner__/cjs/components/Textarea/Textarea.css +1 -1
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +4 -0
- package/__inner__/cjs/components/Tooltip/Tooltip.css +2 -2
- package/__inner__/cjs/components/Typography/Typography.css +26 -26
- package/__inner__/esm/components/Accordion/Accordion.css +18 -17
- package/__inner__/esm/components/Alert/Alert.css +4 -4
- package/__inner__/esm/components/Breadcrumbs/Breadcrumbs.css +0 -4
- package/__inner__/esm/components/Breadcrumbs/components/BreadcrumbItem.js +2 -2
- package/__inner__/esm/components/Button/Button.d.ts +3 -0
- package/__inner__/esm/components/Button/Button.js +8 -3
- package/__inner__/esm/components/ButtonBase/ButtonBase.css +10 -0
- package/__inner__/esm/components/ButtonBase/ButtonBase.d.ts +20 -0
- package/__inner__/esm/components/ButtonBase/ButtonBase.js +27 -0
- package/__inner__/esm/components/ButtonBase/constants.d.ts +1 -0
- package/__inner__/esm/components/ButtonBase/constants.js +1 -0
- package/__inner__/esm/components/ButtonBase/index.d.ts +1 -0
- package/__inner__/esm/components/ButtonBase/index.js +1 -0
- package/__inner__/esm/components/ButtonNext/Button.css +333 -0
- package/__inner__/esm/components/ButtonNext/Button.d.ts +51 -0
- package/__inner__/esm/components/ButtonNext/Button.js +57 -0
- package/__inner__/esm/components/ButtonNext/constants.d.ts +4 -0
- package/__inner__/esm/components/ButtonNext/constants.js +4 -0
- package/__inner__/esm/components/ButtonNext/index.d.ts +1 -0
- package/__inner__/esm/components/ButtonNext/index.js +1 -0
- package/__inner__/esm/components/Card/Card.css +3 -3
- package/__inner__/esm/components/Chip/Chip.css +10 -9
- package/__inner__/esm/components/ChipNext/Chip.css +8 -8
- package/__inner__/esm/components/Container/Container.css +30 -30
- package/__inner__/esm/components/DataList/DataList.css +3 -3
- package/__inner__/esm/components/Drawer/Drawer.css +2 -2
- package/__inner__/esm/components/FieldControl/FieldControl.css +5 -5
- package/__inner__/esm/components/File/File.css +2 -2
- package/__inner__/esm/components/FilePicker/FilePicker.css +5 -5
- package/__inner__/esm/components/FormControlLabel/FormControlLabel.css +5 -5
- package/__inner__/esm/components/FormGroup/FormGroup.css +2 -2
- package/__inner__/esm/components/FormTitle/FormTitle.css +5 -5
- package/__inner__/esm/components/IconButton/IconButton.d.ts +3 -0
- package/__inner__/esm/components/IconButton/IconButton.js +7 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.css +348 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.d.ts +41 -0
- package/__inner__/esm/components/IconButtonNext/IconButton.js +67 -0
- package/__inner__/esm/components/IconButtonNext/constants.d.ts +4 -0
- package/__inner__/esm/components/IconButtonNext/constants.js +4 -0
- package/__inner__/esm/components/IconButtonNext/index.d.ts +1 -0
- package/__inner__/esm/components/IconButtonNext/index.js +1 -0
- package/__inner__/esm/components/List/List.css +5 -5
- package/__inner__/esm/components/Modal/Modal.css +1 -1
- package/__inner__/esm/components/SectionMessage/SectionMessage.css +5 -5
- package/__inner__/esm/components/Segment/components/SegmentItem.css +5 -3
- package/__inner__/esm/components/Slider/Slider.css +1 -1
- package/__inner__/esm/components/Snackbar/components/Snackbar/Snackbar.css +2 -2
- package/__inner__/esm/components/Tabs/components/Tab/Tab.css +1 -1
- package/__inner__/esm/components/Tag/Tag.css +1 -1
- package/__inner__/esm/components/Textarea/Textarea.css +1 -1
- package/__inner__/esm/components/ThemeProvider/types.d.ts +4 -0
- package/__inner__/esm/components/Tooltip/Tooltip.css +2 -2
- package/__inner__/esm/components/Typography/Typography.css +26 -26
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -21,9 +21,9 @@ pnpm add @ozen-ui/kit
|
|
|
21
21
|
|
|
22
22
|
Разделы для знакомства с библиотекой:
|
|
23
23
|
|
|
24
|
-
- [Быстрый старт](https://ozen-ui.netlify.app/?path=/docs/
|
|
24
|
+
- [Быстрый старт](https://ozen-ui.netlify.app/?path=/docs/for-users-getting-started--docs)
|
|
25
25
|
- [Дизайн-токены](https://ozen-ui.netlify.app/?path=/docs/foundations-design-tokens--docs)
|
|
26
|
-
- [Обзор компонентов](https://ozen-ui.netlify.app/?path=/docs/
|
|
26
|
+
- [Обзор компонентов](https://ozen-ui.netlify.app/?path=/docs/introduction-overview--docs)
|
|
27
27
|
|
|
28
28
|
## О нас
|
|
29
29
|
|
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
}
|
|
12
12
|
.Accordion_size_s {
|
|
13
|
-
--accordion-summary-padding: var(--
|
|
14
|
-
--accordion-details-padding: var(--
|
|
15
|
-
|
|
13
|
+
--accordion-summary-padding: var(--spacing-s);
|
|
14
|
+
--accordion-details-padding: var(--spacing-xs) var(--spacing-s)
|
|
15
|
+
var(--spacing-s);
|
|
16
|
+
--accordion-column-gap: var(--spacing-xs);
|
|
16
17
|
}
|
|
17
18
|
.Accordion_size_s .AccordionSummary {
|
|
18
19
|
font: var(--typography-text-s_1-font);
|
|
@@ -20,9 +21,9 @@
|
|
|
20
21
|
text-transform: var(--typography-text-s_1-text_transform, none);
|
|
21
22
|
}
|
|
22
23
|
.Accordion_size_m {
|
|
23
|
-
--accordion-column-gap: var(--
|
|
24
|
-
--accordion-summary-padding: var(--
|
|
25
|
-
--accordion-details-padding: var(--
|
|
24
|
+
--accordion-column-gap: var(--spacing-xs);
|
|
25
|
+
--accordion-summary-padding: var(--spacing-s);
|
|
26
|
+
--accordion-details-padding: var(--spacing-s);
|
|
26
27
|
}
|
|
27
28
|
.Accordion_size_m .AccordionSummary {
|
|
28
29
|
font: var(--typography-text-m_1-font);
|
|
@@ -30,10 +31,10 @@
|
|
|
30
31
|
text-transform: var(--typography-text-m_1-text_transform, none);
|
|
31
32
|
}
|
|
32
33
|
.Accordion_size_l {
|
|
33
|
-
--accordion-column-gap: var(--
|
|
34
|
-
--accordion-summary-padding: var(--
|
|
35
|
-
--accordion-details-padding: var(--
|
|
36
|
-
var(--
|
|
34
|
+
--accordion-column-gap: var(--spacing-s);
|
|
35
|
+
--accordion-summary-padding: var(--spacing-m);
|
|
36
|
+
--accordion-details-padding: var(--spacing-s) var(--spacing-m)
|
|
37
|
+
var(--spacing-m);
|
|
37
38
|
}
|
|
38
39
|
.Accordion_size_l .AccordionSummary {
|
|
39
40
|
font: var(--typography-text-l_1-font);
|
|
@@ -41,10 +42,10 @@
|
|
|
41
42
|
text-transform: var(--typography-text-l_1-text_transform, none);
|
|
42
43
|
}
|
|
43
44
|
.Accordion_size_xl {
|
|
44
|
-
--accordion-column-gap: var(--
|
|
45
|
-
--accordion-summary-padding: var(--
|
|
46
|
-
--accordion-details-padding: var(--
|
|
47
|
-
var(--
|
|
45
|
+
--accordion-column-gap: var(--spacing-m);
|
|
46
|
+
--accordion-summary-padding: var(--spacing-l);
|
|
47
|
+
--accordion-details-padding: var(--spacing-s) var(--spacing-l)
|
|
48
|
+
var(--spacing-l);
|
|
48
49
|
}
|
|
49
50
|
.Accordion_size_xl .AccordionSummary {
|
|
50
51
|
font: var(--typography-text-xl_1-font);
|
|
@@ -53,13 +54,13 @@
|
|
|
53
54
|
}
|
|
54
55
|
.Accordion_compressed.Accordion_size_s,
|
|
55
56
|
.Accordion_compressed.Accordion_size_m {
|
|
56
|
-
--accordion-summary-padding: var(--
|
|
57
|
+
--accordion-summary-padding: var(--spacing-2xs) var(--spacing-s);
|
|
57
58
|
}
|
|
58
59
|
.Accordion_compressed.Accordion_size_l {
|
|
59
|
-
--accordion-summary-padding: var(--
|
|
60
|
+
--accordion-summary-padding: var(--spacing-xs) var(--spacing-s);
|
|
60
61
|
}
|
|
61
62
|
.Accordion_compressed.Accordion_size_xl {
|
|
62
|
-
--accordion-summary-padding: var(--
|
|
63
|
+
--accordion-summary-padding: var(--spacing-s) var(--spacing-l);
|
|
63
64
|
}
|
|
64
65
|
.Accordion_variant_corner-primary {
|
|
65
66
|
--accordion-background-color: var(--color-background-main);
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
.Alert {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: flex;
|
|
5
|
-
-moz-column-gap: var(--
|
|
6
|
-
column-gap: var(--
|
|
5
|
+
-moz-column-gap: var(--spacing-2xs);
|
|
6
|
+
column-gap: var(--spacing-2xs);
|
|
7
7
|
align-items: flex-start;
|
|
8
8
|
inline-size: 100%;
|
|
9
9
|
overflow: auto;
|
|
@@ -65,11 +65,11 @@
|
|
|
65
65
|
text-transform: var(--typography-text-s_1-text_transform, none);
|
|
66
66
|
}
|
|
67
67
|
.Alert-Body {
|
|
68
|
-
margin-block-start: var(--
|
|
68
|
+
margin-block-start: var(--spacing-3xs);
|
|
69
69
|
color: var(--alert-body-text-color);
|
|
70
70
|
}
|
|
71
71
|
.Alert-Action {
|
|
72
|
-
margin-block-start: var(--
|
|
72
|
+
margin-block-start: var(--spacing-2xs);
|
|
73
73
|
}
|
|
74
74
|
.IconButton.Alert-CloseButton {
|
|
75
75
|
color: var(--alert-close-button-color);
|
|
@@ -5,13 +5,13 @@ var tslib_1 = require("tslib");
|
|
|
5
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
var classname_1 = require("../../../utils/classname");
|
|
7
7
|
var polymorphicComponentWithRef_1 = require("../../../utils/polymorphicComponentWithRef");
|
|
8
|
-
var
|
|
8
|
+
var ButtonNext_1 = require("../../ButtonNext");
|
|
9
9
|
var BreadcrumbsContext_1 = require("../BreadcrumbsContext");
|
|
10
10
|
var constants_1 = require("../constants");
|
|
11
11
|
exports.cnBreadcrumbItem = (0, classname_1.cn)('BreadcrumbItem');
|
|
12
12
|
exports.BreadcrumbItem = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (_a, ref) {
|
|
13
13
|
var _b = _a.as, as = _b === void 0 ? constants_1.BREADCRUMB_ITEM_DEFAULT_TAG : _b, disabled = _a.disabled, IconLeftProp = _a.iconLeft, IconRightProp = _a.iconRight, children = _a.children, className = _a.className, other = tslib_1.__rest(_a, ["as", "disabled", "iconLeft", "iconRight", "children", "className"]);
|
|
14
14
|
var size = (0, BreadcrumbsContext_1.useBreadcrumbsContext)().size;
|
|
15
|
-
return (react_1.default.createElement(
|
|
15
|
+
return (react_1.default.createElement(ButtonNext_1.Button, tslib_1.__assign({}, other, { className: (0, exports.cnBreadcrumbItem)({}, [className]), as: as, variant: "function", color: "tertiary", disabled: disabled, size: size, iconLeft: IconLeftProp, iconRight: IconRightProp, ref: ref }), children));
|
|
16
16
|
});
|
|
17
17
|
exports.BreadcrumbItem.displayName = 'BreadcrumbItem';
|
|
@@ -47,5 +47,8 @@ type ButtonBaseProps = {
|
|
|
47
47
|
};
|
|
48
48
|
export type ButtonProps<As extends ElementType = typeof BUTTON_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ButtonBaseProps, As>;
|
|
49
49
|
export declare const cnButton: import("@bem-react/classname").ClassNameFormatter;
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Компонент устарел. Для замены используйте компонент ButtonNext
|
|
52
|
+
*/
|
|
50
53
|
export declare const Button: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ButtonBaseProps, "button">;
|
|
51
54
|
export {};
|
|
@@ -4,6 +4,7 @@ exports.Button = exports.cnButton = exports.buttonColorVariant = exports.buttonV
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
require("./Button.css");
|
|
6
6
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
+
var logger_1 = require("@ozen-ui/logger");
|
|
7
8
|
var react_transition_group_1 = require("react-transition-group");
|
|
8
9
|
var useThemeProps_1 = require("../../hooks/useThemeProps");
|
|
9
10
|
var classname_1 = require("../../utils/classname");
|
|
@@ -25,13 +26,17 @@ exports.buttonColorVariant = [
|
|
|
25
26
|
'error',
|
|
26
27
|
];
|
|
27
28
|
exports.cnButton = (0, classname_1.cn)('Button');
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated Компонент устарел. Для замены используйте компонент ButtonNext
|
|
31
|
+
*/
|
|
30
32
|
exports.Button = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
|
|
31
33
|
var props = (0, useThemeProps_1.useThemeProps)({
|
|
32
34
|
props: inProps,
|
|
33
35
|
name: 'Button',
|
|
34
36
|
});
|
|
37
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
38
|
+
(0, logger_1.deprecate)('Компонент «Button» устарел. Для замены используйте компонент «ButtonNext».');
|
|
39
|
+
}
|
|
35
40
|
var _a = props.as, Tag = _a === void 0 ? constants_1.BUTTON_DEFAULT_TAG : _a, _b = props.variant, variant = _b === void 0 ? constants_1.BUTTON_DEFAULT_VARIANT : _b, _c = props.color, color = _c === void 0 ? constants_1.BUTTON_DEFAULT_COLOR : _c, _d = props.size, size = _d === void 0 ? constants_1.BUTTON_DEFAULT_SIZE : _d, iconLeft = props.iconLeft, iconRight = props.iconRight, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, fullWidth = props.fullWidth, labelProps = props.labelProps, onClick = props.onClick, other = tslib_1.__rest(props, ["as", "variant", "color", "size", "iconLeft", "iconRight", "loading", "children", "disabled", "className", "fullWidth", "labelProps", "onClick"]);
|
|
36
41
|
var iconSize = (0, getIconSizeToFormElement_1.getIconSizeToFormElement)(size);
|
|
37
42
|
var handleClick = function (event) {
|
|
@@ -62,6 +67,6 @@ exports.Button = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(
|
|
|
62
67
|
loading: loading,
|
|
63
68
|
color: color,
|
|
64
69
|
fullWidth: fullWidth,
|
|
65
|
-
}, [className]) }, other, { ref: ref }), childContent));
|
|
70
|
+
}, [className]) }, (isInteractionPrevented && { tabIndex: -1 }), other, { ref: ref }), childContent));
|
|
66
71
|
});
|
|
67
72
|
exports.Button.displayName = 'Button';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './ButtonBase.css';
|
|
2
|
+
import type { ReactNode, ElementType } from 'react';
|
|
3
|
+
import type { PolymorphicComponentPropsWithoutRef } from '../../utils/polymorphicComponentWithRef';
|
|
4
|
+
import { BUTTON_BASE_DEFAULT_TAG } from './constants';
|
|
5
|
+
type ButtonBaseBaseProps = {
|
|
6
|
+
/** Содержимое кнопки */
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/** Если {true} делает кнопку заблокированной */
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
/** Если {true} переводит кнопку в состояние загрузки */
|
|
11
|
+
loading?: boolean;
|
|
12
|
+
/** Дополнительные CSS-классы */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Если {true} делает кнопку не стилизованной */
|
|
15
|
+
unstyled?: boolean;
|
|
16
|
+
};
|
|
17
|
+
export type ButtonBaseProps<As extends ElementType = typeof BUTTON_BASE_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ButtonBaseBaseProps, As>;
|
|
18
|
+
export declare const cnButtonBase: import("@bem-react/classname").ClassNameFormatter;
|
|
19
|
+
export declare const ButtonBase: import("../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ButtonBaseBaseProps, "button">;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ButtonBase = exports.cnButtonBase = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
require("./ButtonBase.css");
|
|
6
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
+
var useThemeProps_1 = require("../../hooks/useThemeProps");
|
|
8
|
+
var classname_1 = require("../../utils/classname");
|
|
9
|
+
var polymorphicComponentWithRef_1 = require("../../utils/polymorphicComponentWithRef");
|
|
10
|
+
var constants_1 = require("./constants");
|
|
11
|
+
exports.cnButtonBase = (0, classname_1.cn)('ButtonBase');
|
|
12
|
+
exports.ButtonBase = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
|
|
13
|
+
var props = (0, useThemeProps_1.useThemeProps)({
|
|
14
|
+
props: inProps,
|
|
15
|
+
name: 'Button',
|
|
16
|
+
});
|
|
17
|
+
var _a = props.as, Tag = _a === void 0 ? constants_1.BUTTON_BASE_DEFAULT_TAG : _a, loading = props.loading, children = props.children, disabled = props.disabled, className = props.className, onClick = props.onClick, unstyled = props.unstyled, other = tslib_1.__rest(props, ["as", "loading", "children", "disabled", "className", "onClick", "unstyled"]);
|
|
18
|
+
var handleClick = function (event) {
|
|
19
|
+
if (onClick && !disabled && !loading) {
|
|
20
|
+
onClick(event);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var isInteractionPrevented = disabled || loading;
|
|
24
|
+
return (react_1.default.createElement(Tag, tslib_1.__assign({ disabled: isInteractionPrevented, onClick: handleClick, type: "button", className: (0, exports.cnButtonBase)({
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
loading: loading,
|
|
27
|
+
unstyled: unstyled,
|
|
28
|
+
}, [className]) }, (isInteractionPrevented && { tabIndex: -1 }), other, { ref: ref }), children));
|
|
29
|
+
});
|
|
30
|
+
exports.ButtonBase.displayName = 'ButtonBase';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BUTTON_BASE_DEFAULT_TAG = "button";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ButtonBase';
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/* stylelint-disable */
|
|
2
|
+
.ButtonNext {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
flex-wrap: nowrap;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
border: none;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
color: var(--button-font-color);
|
|
12
|
+
block-size: var(--button-height);
|
|
13
|
+
min-inline-size: var(--button-min-width);
|
|
14
|
+
padding: 0 var(--button-padding-x);
|
|
15
|
+
background-color: var(--button-bg-color);
|
|
16
|
+
border-radius: var(--border-radius-xs);
|
|
17
|
+
transition:
|
|
18
|
+
background-color var(--transition-default),
|
|
19
|
+
border-color var(--transition-default),
|
|
20
|
+
box-shadow var(--transition-default),
|
|
21
|
+
opacity var(--transition-default);
|
|
22
|
+
-webkit-tap-highlight-color: unset;
|
|
23
|
+
position: relative;
|
|
24
|
+
}
|
|
25
|
+
.ButtonNext > svg {
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
}
|
|
28
|
+
.ButtonNext_size_2xs {
|
|
29
|
+
--button-height: var(--control-height-2xs);
|
|
30
|
+
--button-padding-x: var(--control-padding-xs);
|
|
31
|
+
--button-min-width: 56px;
|
|
32
|
+
|
|
33
|
+
font: var(--typography-text-2xs-font);
|
|
34
|
+
|
|
35
|
+
letter-spacing: var(--typography-text-2xs-letter_spacing, 0);
|
|
36
|
+
|
|
37
|
+
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
38
|
+
}
|
|
39
|
+
.ButtonNext_size_xs {
|
|
40
|
+
--button-height: var(--control-height-xs);
|
|
41
|
+
--button-padding-x: var(--control-padding-xs);
|
|
42
|
+
--button-min-width: 64px;
|
|
43
|
+
|
|
44
|
+
font: var(--typography-text-xs-font);
|
|
45
|
+
|
|
46
|
+
letter-spacing: var(--typography-text-xs-letter_spacing, 0);
|
|
47
|
+
|
|
48
|
+
text-transform: var(--typography-text-xs-text_transform, none);
|
|
49
|
+
}
|
|
50
|
+
.ButtonNext_size_s {
|
|
51
|
+
--button-height: var(--control-height-s);
|
|
52
|
+
--button-padding-x: var(--control-padding-s);
|
|
53
|
+
--button-min-width: 72px;
|
|
54
|
+
|
|
55
|
+
font: var(--typography-text-s-font);
|
|
56
|
+
|
|
57
|
+
letter-spacing: var(--typography-text-s-letter_spacing, 0);
|
|
58
|
+
|
|
59
|
+
text-transform: var(--typography-text-s-text_transform, none);
|
|
60
|
+
}
|
|
61
|
+
.ButtonNext_size_m {
|
|
62
|
+
--button-height: var(--control-height-m);
|
|
63
|
+
--button-padding-x: var(--control-padding-m);
|
|
64
|
+
--button-min-width: 80px;
|
|
65
|
+
|
|
66
|
+
font: var(--typography-text-m-font);
|
|
67
|
+
|
|
68
|
+
letter-spacing: var(--typography-text-m-letter_spacing, 0);
|
|
69
|
+
|
|
70
|
+
text-transform: var(--typography-text-m-text_transform, none);
|
|
71
|
+
}
|
|
72
|
+
.ButtonNext_size_l {
|
|
73
|
+
--button-height: var(--control-height-l);
|
|
74
|
+
--button-padding-x: var(--control-padding-l);
|
|
75
|
+
--button-min-width: 88px;
|
|
76
|
+
|
|
77
|
+
font: var(--typography-text-l-font);
|
|
78
|
+
|
|
79
|
+
letter-spacing: var(--typography-text-l-letter_spacing, 0);
|
|
80
|
+
|
|
81
|
+
text-transform: var(--typography-text-l-text_transform, none);
|
|
82
|
+
}
|
|
83
|
+
.ButtonNext_variant_contained.ButtonNext_color_primary {
|
|
84
|
+
--button-bg-color: var(--color-background-action);
|
|
85
|
+
--button-bg-color-hover: var(--color-background-action-hover);
|
|
86
|
+
--button-bg-color-active: var(--color-background-action-pressed);
|
|
87
|
+
--button-bg-color-focus: var(--color-background-action);
|
|
88
|
+
--button-font-color: var(--color-content-action-on);
|
|
89
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
90
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
91
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
92
|
+
}
|
|
93
|
+
.ButtonNext_variant_contained.ButtonNext_color_secondary {
|
|
94
|
+
--button-bg-color: var(--color-background-action-secondary);
|
|
95
|
+
--button-bg-color-hover: var(--color-background-action-secondary-hover);
|
|
96
|
+
--button-bg-color-active: var(--color-background-action-secondary-pressed);
|
|
97
|
+
--button-bg-color-focus: var(--color-background-action-secondary);
|
|
98
|
+
--button-font-color: var(--color-content-action-on);
|
|
99
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
100
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
101
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
102
|
+
}
|
|
103
|
+
.ButtonNext_variant_contained.ButtonNext_color_tertiary {
|
|
104
|
+
--button-bg-color: var(--color-background-tertiary);
|
|
105
|
+
--button-bg-color-hover: var(--color-background-tertiary-hover);
|
|
106
|
+
--button-bg-color-active: var(--color-background-tertiary-pressed);
|
|
107
|
+
--button-bg-color-focus: var(--color-background-tertiary);
|
|
108
|
+
--button-font-color: var(--color-content-primary);
|
|
109
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
110
|
+
--button-font-color-active: var(--color-content-primary);
|
|
111
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
112
|
+
}
|
|
113
|
+
.ButtonNext_variant_contained.ButtonNext_color_error {
|
|
114
|
+
--button-bg-color: var(--color-background-error);
|
|
115
|
+
--button-bg-color-hover: var(--color-background-error-hover);
|
|
116
|
+
--button-bg-color-active: var(--color-background-error-pressed);
|
|
117
|
+
--button-bg-color-focus: var(--color-background-error);
|
|
118
|
+
--button-font-color: var(--color-content-action-on);
|
|
119
|
+
--button-font-color-hover: var(--color-content-action-on);
|
|
120
|
+
--button-font-color-active: var(--color-content-action-on);
|
|
121
|
+
--button-font-color-focus: var(--color-content-action-on);
|
|
122
|
+
}
|
|
123
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_primary {
|
|
124
|
+
--button-bg-color: var(--color-background-action-light);
|
|
125
|
+
--button-bg-color-hover: var(--color-background-action-light-hover);
|
|
126
|
+
--button-bg-color-active: var(--color-background-action-light-pressed);
|
|
127
|
+
--button-bg-color-focus: unset;
|
|
128
|
+
--button-font-color: var(--color-content-action);
|
|
129
|
+
--button-font-color-hover: var(--color-content-action);
|
|
130
|
+
--button-font-color-active: var(--color-content-action);
|
|
131
|
+
--button-font-color-focus: var(--color-content-action);
|
|
132
|
+
}
|
|
133
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_secondary {
|
|
134
|
+
--button-bg-color: var(--color-background-secondary);
|
|
135
|
+
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
136
|
+
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
137
|
+
--button-bg-color-focus: unset;
|
|
138
|
+
--button-font-color: var(--color-content-primary);
|
|
139
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
140
|
+
--button-font-color-active: var(--color-content-primary);
|
|
141
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
142
|
+
}
|
|
143
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_tertiary {
|
|
144
|
+
--button-bg-color: var(--color-background-primary);
|
|
145
|
+
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
146
|
+
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
147
|
+
--button-bg-color-focus: unset;
|
|
148
|
+
--button-font-color: var(--color-content-secondary);
|
|
149
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
150
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
151
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
152
|
+
}
|
|
153
|
+
.ButtonNext_variant_contained-additional.ButtonNext_color_error {
|
|
154
|
+
--button-bg-color: var(--color-background-error-light);
|
|
155
|
+
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
156
|
+
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
157
|
+
--button-bg-color-focus: unset;
|
|
158
|
+
--button-font-color: var(--color-content-error);
|
|
159
|
+
--button-font-color-hover: var(--color-content-error);
|
|
160
|
+
--button-font-color-active: var(--color-content-error);
|
|
161
|
+
--button-font-color-focus: var(--color-content-error);
|
|
162
|
+
}
|
|
163
|
+
.ButtonNext_variant_ghost.ButtonNext_color_primary {
|
|
164
|
+
--button-bg-color: unset;
|
|
165
|
+
--button-bg-color-hover: var(--color-background-success-light-hover);
|
|
166
|
+
--button-bg-color-active: var(--color-background-success-light-pressed);
|
|
167
|
+
--button-bg-color-focus: unset;
|
|
168
|
+
--button-font-color: var(--color-content-action);
|
|
169
|
+
--button-font-color-hover: var(--color-content-action);
|
|
170
|
+
--button-font-color-active: var(--color-content-action);
|
|
171
|
+
--button-font-color-focus: var(--color-content-action);
|
|
172
|
+
}
|
|
173
|
+
.ButtonNext_variant_ghost.ButtonNext_color_secondary {
|
|
174
|
+
--button-bg-color: unset;
|
|
175
|
+
--button-bg-color-hover: var(--color-background-secondary-hover);
|
|
176
|
+
--button-bg-color-active: var(--color-background-secondary-pressed);
|
|
177
|
+
--button-bg-color-focus: unset;
|
|
178
|
+
--button-font-color: var(--color-content-primary);
|
|
179
|
+
--button-font-color-hover: var(--color-content-primary);
|
|
180
|
+
--button-font-color-active: var(--color-content-primary);
|
|
181
|
+
--button-font-color-focus: var(--color-content-primary);
|
|
182
|
+
}
|
|
183
|
+
.ButtonNext_variant_ghost.ButtonNext_color_tertiary {
|
|
184
|
+
--button-bg-color: unset;
|
|
185
|
+
--button-bg-color-hover: var(--color-background-primary-hover);
|
|
186
|
+
--button-bg-color-active: var(--color-background-primary-pressed);
|
|
187
|
+
--button-bg-color-focus: unset;
|
|
188
|
+
--button-font-color: var(--color-content-secondary);
|
|
189
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
190
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
191
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
192
|
+
}
|
|
193
|
+
.ButtonNext_variant_ghost.ButtonNext_color_error {
|
|
194
|
+
--button-bg-color: unset;
|
|
195
|
+
--button-bg-color-hover: var(--color-background-error-light-hover);
|
|
196
|
+
--button-bg-color-active: var(--color-background-error-light-pressed);
|
|
197
|
+
--button-bg-color-focus: unset;
|
|
198
|
+
--button-font-color: var(--color-content-error);
|
|
199
|
+
--button-font-color-hover: var(--color-content-error);
|
|
200
|
+
--button-font-color-active: var(--color-content-error);
|
|
201
|
+
--button-font-color-focus: var(--color-content-error);
|
|
202
|
+
}
|
|
203
|
+
.ButtonNext_variant_function {
|
|
204
|
+
--button-height: auto;
|
|
205
|
+
--button-min-width: auto;
|
|
206
|
+
--button-padding-x: 0;
|
|
207
|
+
}
|
|
208
|
+
.ButtonNext_variant_function.ButtonNext_color_primary,
|
|
209
|
+
.ButtonNext_variant_function.ButtonNext_color_secondary,
|
|
210
|
+
.ButtonNext_variant_function.ButtonNext_color_tertiary,
|
|
211
|
+
.ButtonNext_variant_function.ButtonNext_color_error {
|
|
212
|
+
--button-bg-color: unset;
|
|
213
|
+
--button-bg-color-hover: unset;
|
|
214
|
+
--button-bg-color-active: unset;
|
|
215
|
+
--button-bg-color-focus: unset;
|
|
216
|
+
}
|
|
217
|
+
.ButtonNext_variant_function.ButtonNext_color_primary {
|
|
218
|
+
--button-font-color: var(--color-content-action);
|
|
219
|
+
--button-font-color-hover: var(--color-background-action-hover);
|
|
220
|
+
--button-font-color-active: var(--color-background-action-pressed);
|
|
221
|
+
--button-font-color-focus: var(--color-background-action-pressed);
|
|
222
|
+
}
|
|
223
|
+
.ButtonNext_variant_function.ButtonNext_color_secondary {
|
|
224
|
+
--button-font-color: var(--color-content-action-secondary);
|
|
225
|
+
--button-font-color-hover: var(--color-content-action-secondary-hover);
|
|
226
|
+
--button-font-color-active: var(--color-content-action-secondary-pressed);
|
|
227
|
+
--button-font-color-focus: var(--color-content-action-secondary-pressed);
|
|
228
|
+
}
|
|
229
|
+
.ButtonNext_variant_function.ButtonNext_color_tertiary {
|
|
230
|
+
--button-font-color: var(--color-content-secondary);
|
|
231
|
+
--button-font-color-hover: var(--color-content-secondary);
|
|
232
|
+
--button-font-color-active: var(--color-content-secondary);
|
|
233
|
+
--button-font-color-focus: var(--color-content-secondary);
|
|
234
|
+
}
|
|
235
|
+
.ButtonNext_variant_function.ButtonNext_color_error {
|
|
236
|
+
--button-font-color: var(--color-content-error);
|
|
237
|
+
--button-font-color-hover: var(--color-content-error-hover);
|
|
238
|
+
--button-font-color-active: var(--color-content-error-pressed);
|
|
239
|
+
--button-font-color-focus: var(--color-content-error-pressed);
|
|
240
|
+
}
|
|
241
|
+
.ButtonNext_variant_contained.ButtonNext_disabled,
|
|
242
|
+
.ButtonNext_variant_contained.ButtonNext_loading,
|
|
243
|
+
.ButtonNext_variant_contained-additional.ButtonNext_disabled,
|
|
244
|
+
.ButtonNext_variant_contained-additional.ButtonNext_loading,
|
|
245
|
+
.ButtonNext_variant_ghost.ButtonNext_disabled,
|
|
246
|
+
.ButtonNext_variant_ghost.ButtonNext_loading,
|
|
247
|
+
.ButtonNext_variant_function.ButtonNext_disabled,
|
|
248
|
+
.ButtonNext_variant_function.ButtonNext_loading {
|
|
249
|
+
--button-font-color: var(--color-content-disabled);
|
|
250
|
+
}
|
|
251
|
+
.ButtonNext_variant_contained.ButtonNext_disabled,
|
|
252
|
+
.ButtonNext_variant_contained.ButtonNext_loading,
|
|
253
|
+
.ButtonNext_variant_contained-additional.ButtonNext_disabled,
|
|
254
|
+
.ButtonNext_variant_contained-additional.ButtonNext_loading {
|
|
255
|
+
--button-bg-color: var(--color-background-disabled);
|
|
256
|
+
--button-bg-color-hover: var(--color-background-disabled);
|
|
257
|
+
--button-bg-color-active: var(--color-background-disabled);
|
|
258
|
+
}
|
|
259
|
+
.ButtonNext_variant_ghost.ButtonNext_disabled,
|
|
260
|
+
.ButtonNext_variant_ghost.ButtonNext_loading,
|
|
261
|
+
.ButtonNext_variant_function.ButtonNext_disabled,
|
|
262
|
+
.ButtonNext_variant_function.ButtonNext_loading {
|
|
263
|
+
--button-bg-color: unset;
|
|
264
|
+
--button-bg-color-hover: unset;
|
|
265
|
+
--button-bg-color-active: unset;
|
|
266
|
+
}
|
|
267
|
+
.ButtonNext:focus:not(:focus-visible, :active, :hover) {
|
|
268
|
+
box-shadow: none;
|
|
269
|
+
color: var(--button-font-color);
|
|
270
|
+
}
|
|
271
|
+
.ButtonNext:focus:not(:focus-visible) {
|
|
272
|
+
box-shadow: none;
|
|
273
|
+
}
|
|
274
|
+
.ButtonNext:focus {
|
|
275
|
+
outline: 0;
|
|
276
|
+
box-shadow: var(--shadow-outline-focused);
|
|
277
|
+
background-color: var(--button-bg-color-focus);
|
|
278
|
+
color: var(--button-font-color-focus);
|
|
279
|
+
}
|
|
280
|
+
.ButtonNext:hover {
|
|
281
|
+
background-color: var(--button-bg-color-hover);
|
|
282
|
+
color: var(--button-font-color-hover);
|
|
283
|
+
}
|
|
284
|
+
.ButtonNext:active {
|
|
285
|
+
background-color: var(--button-bg-color-active);
|
|
286
|
+
color: var(--button-font-color-active);
|
|
287
|
+
}
|
|
288
|
+
.ButtonNext_fullWidth {
|
|
289
|
+
inline-size: 100%;
|
|
290
|
+
}
|
|
291
|
+
.ButtonNext_disabled,
|
|
292
|
+
.ButtonNext_loading {
|
|
293
|
+
pointer-events: none;
|
|
294
|
+
cursor: auto;
|
|
295
|
+
}
|
|
296
|
+
.ButtonNext_loading .ButtonNext-Content {
|
|
297
|
+
visibility: hidden;
|
|
298
|
+
}
|
|
299
|
+
.ButtonNext-Content {
|
|
300
|
+
flex-grow: 1;
|
|
301
|
+
flex-shrink: 1;
|
|
302
|
+
display: flex;
|
|
303
|
+
text-align: center;
|
|
304
|
+
place-content: center;
|
|
305
|
+
align-items: center;
|
|
306
|
+
min-inline-size: 0;
|
|
307
|
+
gap: var(--spacing-2xs);
|
|
308
|
+
}
|
|
309
|
+
.ButtonNext-Label {
|
|
310
|
+
overflow: hidden;
|
|
311
|
+
text-overflow: ellipsis;
|
|
312
|
+
white-space: nowrap;
|
|
313
|
+
}
|
|
314
|
+
.ButtonNext-Loader {
|
|
315
|
+
position: absolute;
|
|
316
|
+
}
|
|
317
|
+
.ButtonNext-Loader_animation-enter {
|
|
318
|
+
opacity: 0;
|
|
319
|
+
}
|
|
320
|
+
.ButtonNext-Loader_animation-enter-active {
|
|
321
|
+
opacity: 1;
|
|
322
|
+
transition: opacity var(--transition-default);
|
|
323
|
+
}
|
|
324
|
+
.ButtonNext-Loader_animation-exit {
|
|
325
|
+
opacity: 1;
|
|
326
|
+
}
|
|
327
|
+
.ButtonNext-Loader_animation-exit-active {
|
|
328
|
+
opacity: 0;
|
|
329
|
+
transition: opacity var(--transition-default);
|
|
330
|
+
}
|
|
331
|
+
.ButtonNext .Loader {
|
|
332
|
+
color: var(--color-content-disabled);
|
|
333
|
+
}
|