@ozen-ui/kit 0.21.0 → 0.23.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/__inner__/cjs/components/Button/Button.css +14 -12
- package/__inner__/cjs/components/List/components/ListItem/ListItem.css +8 -1
- package/__inner__/cjs/components/List/components/ListItem/ListItem.d.ts +4 -0
- package/__inner__/cjs/components/List/components/ListItem/ListItem.js +4 -3
- package/__inner__/cjs/components/List/components/ListItemButton/ListItemButton.css +8 -1
- package/__inner__/cjs/components/List/components/ListItemButton/ListItemButton.d.ts +4 -0
- package/__inner__/cjs/components/List/components/ListItemButton/ListItemButton.js +4 -2
- package/__inner__/cjs/components/List/components/ListItemText/ListItemText.css +1 -0
- package/__inner__/cjs/components/List/constants.d.ts +2 -0
- package/__inner__/cjs/components/List/constants.js +3 -1
- package/__inner__/cjs/components/ThemeProvider/_control/Theme_control_ozenDefault.css +16 -0
- package/__inner__/cjs/components/ThemeProvider/_spacing/Theme_spacing_ozenDefault.css +13 -0
- package/__inner__/cjs/components/ThemeProvider/themes/helper.d.ts +2 -0
- package/__inner__/cjs/components/ThemeProvider/themes/helper.js +30 -1
- package/__inner__/cjs/components/ThemeProvider/themes/themeBBusinessDefault.d.ts +2 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeBBusinessDefault.js +4 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDark.d.ts +2 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDark.js +4 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDefault.d.ts +2 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeOzenDefault.js +4 -0
- package/__inner__/cjs/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/cjs/hooks/useThemeVars/useThemeVars.d.ts +1 -1
- package/__inner__/esm/components/Button/Button.css +14 -12
- package/__inner__/esm/components/List/components/ListItem/ListItem.css +8 -1
- package/__inner__/esm/components/List/components/ListItem/ListItem.d.ts +4 -0
- package/__inner__/esm/components/List/components/ListItem/ListItem.js +4 -3
- package/__inner__/esm/components/List/components/ListItemButton/ListItemButton.css +8 -1
- package/__inner__/esm/components/List/components/ListItemButton/ListItemButton.d.ts +4 -0
- package/__inner__/esm/components/List/components/ListItemButton/ListItemButton.js +4 -2
- package/__inner__/esm/components/List/components/ListItemText/ListItemText.css +1 -0
- package/__inner__/esm/components/List/constants.d.ts +2 -0
- package/__inner__/esm/components/List/constants.js +2 -0
- package/__inner__/esm/components/ThemeProvider/_control/Theme_control_ozenDefault.css +16 -0
- package/__inner__/esm/components/ThemeProvider/_spacing/Theme_spacing_ozenDefault.css +13 -0
- package/__inner__/esm/components/ThemeProvider/themes/helper.d.ts +2 -0
- package/__inner__/esm/components/ThemeProvider/themes/helper.js +29 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeBBusinessDefault.d.ts +2 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeBBusinessDefault.js +4 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDark.d.ts +2 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDark.js +4 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDefault.d.ts +2 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeOzenDefault.js +4 -0
- package/__inner__/esm/components/ThemeProvider/types.d.ts +2 -0
- package/__inner__/esm/hooks/useThemeVars/useThemeVars.d.ts +1 -1
- package/package.json +1 -1
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
padding: 0 var(--button-padding-x);
|
|
15
15
|
background-color: var(--button-bg-color);
|
|
16
16
|
border-radius: var(--border-radius-xs);
|
|
17
|
-
transition:
|
|
18
|
-
|
|
17
|
+
transition:
|
|
18
|
+
background-color var(--transition-default),
|
|
19
|
+
border-color var(--transition-default),
|
|
20
|
+
box-shadow var(--transition-default),
|
|
19
21
|
opacity var(--transition-default);
|
|
20
22
|
-webkit-tap-highlight-color: unset;
|
|
21
23
|
position: relative;
|
|
22
24
|
}
|
|
23
25
|
.Button_size_2xs {
|
|
24
|
-
--button-height:
|
|
26
|
+
--button-height: var(--control-height-2xs);
|
|
27
|
+
--button-padding-x: var(--control-padding-xs);
|
|
25
28
|
--button-min-width: 56px;
|
|
26
|
-
--button-padding-x: 12px;
|
|
27
29
|
|
|
28
30
|
font: var(--typography-text-2xs-font);
|
|
29
31
|
|
|
@@ -32,9 +34,9 @@
|
|
|
32
34
|
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
33
35
|
}
|
|
34
36
|
.Button_size_xs {
|
|
35
|
-
--button-height:
|
|
37
|
+
--button-height: var(--control-height-xs);
|
|
38
|
+
--button-padding-x: var(--control-padding-xs);
|
|
36
39
|
--button-min-width: 64px;
|
|
37
|
-
--button-padding-x: 12px;
|
|
38
40
|
|
|
39
41
|
font: var(--typography-text-xs-font);
|
|
40
42
|
|
|
@@ -43,9 +45,9 @@
|
|
|
43
45
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
44
46
|
}
|
|
45
47
|
.Button_size_s {
|
|
46
|
-
--button-height:
|
|
48
|
+
--button-height: var(--control-height-s);
|
|
49
|
+
--button-padding-x: var(--control-padding-s);
|
|
47
50
|
--button-min-width: 72px;
|
|
48
|
-
--button-padding-x: 16px;
|
|
49
51
|
|
|
50
52
|
font: var(--typography-text-s-font);
|
|
51
53
|
|
|
@@ -54,9 +56,9 @@
|
|
|
54
56
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
55
57
|
}
|
|
56
58
|
.Button_size_m {
|
|
57
|
-
--button-height:
|
|
59
|
+
--button-height: var(--control-height-m);
|
|
60
|
+
--button-padding-x: var(--control-padding-m);
|
|
58
61
|
--button-min-width: 80px;
|
|
59
|
-
--button-padding-x: 20px;
|
|
60
62
|
|
|
61
63
|
font: var(--typography-text-m-font);
|
|
62
64
|
|
|
@@ -65,9 +67,9 @@
|
|
|
65
67
|
text-transform: var(--typography-text-m-text_transform, none);
|
|
66
68
|
}
|
|
67
69
|
.Button_size_l {
|
|
68
|
-
--button-height:
|
|
70
|
+
--button-height: var(--control-height-l);
|
|
71
|
+
--button-padding-x: var(--control-padding-l);
|
|
69
72
|
--button-min-width: 88px;
|
|
70
|
-
--button-padding-x: 24px;
|
|
71
73
|
|
|
72
74
|
font: var(--typography-text-l-font);
|
|
73
75
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.ListItem {
|
|
2
2
|
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
3
|
min-block-size: var(--list-item-min-height);
|
|
5
4
|
padding: var(--list-item-padding);
|
|
6
5
|
border-radius: var(--list-item-border-radius);
|
|
@@ -10,6 +9,14 @@
|
|
|
10
9
|
margin: 0 var(--list-gutter);
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
.ListItem_align_start {
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ListItem_align_center {
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
.ListItem_disableGutters {
|
|
14
21
|
padding: 0;
|
|
15
22
|
}
|
|
@@ -3,11 +3,15 @@ import type { ReactNode, ElementType } from 'react';
|
|
|
3
3
|
import { type PolymorphicComponentPropsWithoutRef } from '../../../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import { LIST_ITEM_DEFAULT_TAG } from '../../constants';
|
|
5
5
|
export declare const cnListItem: import("@bem-react/classname").ClassNameFormatter;
|
|
6
|
+
export declare const listItemAlignVariant: readonly ["start", "center"];
|
|
7
|
+
export type ListItemAlignVariant = (typeof listItemAlignVariant)[number];
|
|
6
8
|
export type ListItemBaseProps = {
|
|
7
9
|
/** Содержимое компонента */
|
|
8
10
|
children: ReactNode;
|
|
9
11
|
/** Если {true} убирает отступы вокруг корневого элемента */
|
|
10
12
|
disableGutters?: boolean;
|
|
13
|
+
/** Расположение контента по вертикали (свойство flex-контейнера align-items) */
|
|
14
|
+
align?: ListItemAlignVariant;
|
|
11
15
|
};
|
|
12
16
|
export type ListItemProps<As extends ElementType = typeof LIST_ITEM_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ListItemBaseProps, As>;
|
|
13
17
|
export declare const ListItem: import("../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ListItemBaseProps, "li">;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListItem = exports.cnListItem = void 0;
|
|
3
|
+
exports.ListItem = exports.listItemAlignVariant = exports.cnListItem = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
require("./ListItem.css");
|
|
6
6
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
@@ -9,9 +9,10 @@ var classname_1 = require("../../../../utils/classname");
|
|
|
9
9
|
var polymorphicComponentWithRef_1 = require("../../../../utils/polymorphicComponentWithRef");
|
|
10
10
|
var constants_1 = require("../../constants");
|
|
11
11
|
exports.cnListItem = (0, classname_1.cn)('ListItem');
|
|
12
|
+
exports.listItemAlignVariant = ['start', 'center'];
|
|
12
13
|
exports.ListItem = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
|
|
13
14
|
var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'ListItem' });
|
|
14
|
-
var _a = props.as, Tag = _a === void 0 ? constants_1.LIST_ITEM_DEFAULT_TAG : _a, children = props.children, className = props.className, disableGutters = props.disableGutters, other = tslib_1.__rest(props, ["as", "children", "className", "disableGutters"]);
|
|
15
|
-
return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnListItem)({ disableGutters: disableGutters }, [className]) }, other, { ref: ref }), children));
|
|
15
|
+
var _a = props.as, Tag = _a === void 0 ? constants_1.LIST_ITEM_DEFAULT_TAG : _a, _b = props.align, align = _b === void 0 ? constants_1.LIST_ITEM_DEFAULT_ALIGN : _b, children = props.children, className = props.className, disableGutters = props.disableGutters, other = tslib_1.__rest(props, ["as", "align", "children", "className", "disableGutters"]);
|
|
16
|
+
return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnListItem)({ align: align, disableGutters: disableGutters }, [className]) }, other, { ref: ref }), children));
|
|
16
17
|
});
|
|
17
18
|
exports.ListItem.displayName = 'ListItem';
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
transition: background-color var(--transition-default);
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-shrink: 0;
|
|
12
|
-
align-items: center;
|
|
13
12
|
box-sizing: border-box;
|
|
14
13
|
outline: none;
|
|
15
14
|
text-decoration: none;
|
|
@@ -36,6 +35,14 @@
|
|
|
36
35
|
box-shadow: none;
|
|
37
36
|
}
|
|
38
37
|
|
|
38
|
+
.ListItemButton_align_start {
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ListItemButton_align_center {
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
.ListItemButton_disabled {
|
|
40
47
|
pointer-events: none;
|
|
41
48
|
color: var(--list-item-bg-color-disabled);
|
|
@@ -3,6 +3,8 @@ import type { ReactNode, ElementType } from 'react';
|
|
|
3
3
|
import { type PolymorphicComponentPropsWithoutRef } from '../../../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import { LIST_ITEM_BUTTON_DEFAULT_TAG } from '../../constants';
|
|
5
5
|
export declare const cnListItemButton: import("@bem-react/classname").ClassNameFormatter;
|
|
6
|
+
export declare const listItemButtonAlignVariant: readonly ["start", "center"];
|
|
7
|
+
export type ListItemButtonAlignVariant = (typeof listItemButtonAlignVariant)[number];
|
|
6
8
|
export type ListItemButtonBaseProps = {
|
|
7
9
|
/** Содержимое компонента */
|
|
8
10
|
children?: ReactNode;
|
|
@@ -10,6 +12,8 @@ export type ListItemButtonBaseProps = {
|
|
|
10
12
|
disabled?: boolean;
|
|
11
13
|
/** Если {true} отображает элемент списка как выбранный */
|
|
12
14
|
selected?: boolean;
|
|
15
|
+
/** Расположение контента по вертикали (свойство flex-контейнера align-items) */
|
|
16
|
+
align?: ListItemButtonAlignVariant;
|
|
13
17
|
/** Идентификатор компонента для тестов */
|
|
14
18
|
'data-testid'?: string;
|
|
15
19
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ListItemButton = exports.cnListItemButton = void 0;
|
|
3
|
+
exports.ListItemButton = exports.listItemButtonAlignVariant = exports.cnListItemButton = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
require("./ListItemButton.css");
|
|
6
6
|
var react_1 = tslib_1.__importStar(require("react"));
|
|
@@ -10,9 +10,10 @@ var isKey_1 = require("../../../../utils/isKey");
|
|
|
10
10
|
var polymorphicComponentWithRef_1 = require("../../../../utils/polymorphicComponentWithRef");
|
|
11
11
|
var constants_1 = require("../../constants");
|
|
12
12
|
exports.cnListItemButton = (0, classname_1.cn)('ListItemButton');
|
|
13
|
+
exports.listItemButtonAlignVariant = ['start', 'center'];
|
|
13
14
|
exports.ListItemButton = (0, polymorphicComponentWithRef_1.polymorphicComponentWithRef)(function (inProps, ref) {
|
|
14
15
|
var props = (0, useThemeProps_1.useThemeProps)({ props: inProps, name: 'ListItemButton' });
|
|
15
|
-
var _a = props.as, Tag = _a === void 0 ? constants_1.LIST_ITEM_BUTTON_DEFAULT_TAG : _a, children = props.children, disabled = props.disabled, className = props.className, onClick = props.onClick, tabIndexProp = props.tabIndex, onKeyDownProp = props.onKeyDown, selected = props.selected, other = tslib_1.__rest(props, ["as", "children", "disabled", "className", "onClick", "tabIndex", "onKeyDown", "selected"]);
|
|
16
|
+
var _a = props.as, Tag = _a === void 0 ? constants_1.LIST_ITEM_BUTTON_DEFAULT_TAG : _a, _b = props.align, align = _b === void 0 ? constants_1.LIST_ITEM_BUTTON_DEFAULT_ALIGN : _b, children = props.children, disabled = props.disabled, className = props.className, onClick = props.onClick, tabIndexProp = props.tabIndex, onKeyDownProp = props.onKeyDown, selected = props.selected, other = tslib_1.__rest(props, ["as", "align", "children", "disabled", "className", "onClick", "tabIndex", "onKeyDown", "selected"]);
|
|
16
17
|
var tabIndex = (0, react_1.useMemo)(function () { return (!disabled ? 0 : -1); }, [disabled]);
|
|
17
18
|
var handleClick = function (event) {
|
|
18
19
|
if (!disabled)
|
|
@@ -43,6 +44,7 @@ exports.ListItemButton = (0, polymorphicComponentWithRef_1.polymorphicComponentW
|
|
|
43
44
|
return commonAdditionalProps;
|
|
44
45
|
}, [Tag, handleKeyDown]);
|
|
45
46
|
return (react_1.default.createElement(Tag, tslib_1.__assign({ className: (0, exports.cnListItemButton)({
|
|
47
|
+
align: align,
|
|
46
48
|
disabled: disabled,
|
|
47
49
|
selected: selected,
|
|
48
50
|
}, [className]), onClick: handleClick, tabIndex: tabIndexProp || tabIndex }, additionalTagProps, other, { ref: ref }), children));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const LIST_DEFAULT_SIZE = "m";
|
|
2
2
|
export declare const LIST_DEFAULT_TAG = "ul";
|
|
3
3
|
export declare const LIST_ITEM_DEFAULT_TAG = "li";
|
|
4
|
+
export declare const LIST_ITEM_DEFAULT_ALIGN = "center";
|
|
4
5
|
export declare const LIST_ITEM_BUTTON_DEFAULT_TAG = "div";
|
|
6
|
+
export declare const LIST_ITEM_BUTTON_DEFAULT_ALIGN = "center";
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LIST_ITEM_BUTTON_DEFAULT_TAG = exports.LIST_ITEM_DEFAULT_TAG = exports.LIST_DEFAULT_TAG = exports.LIST_DEFAULT_SIZE = void 0;
|
|
3
|
+
exports.LIST_ITEM_BUTTON_DEFAULT_ALIGN = exports.LIST_ITEM_BUTTON_DEFAULT_TAG = exports.LIST_ITEM_DEFAULT_ALIGN = exports.LIST_ITEM_DEFAULT_TAG = exports.LIST_DEFAULT_TAG = exports.LIST_DEFAULT_SIZE = void 0;
|
|
4
4
|
exports.LIST_DEFAULT_SIZE = 'm';
|
|
5
5
|
exports.LIST_DEFAULT_TAG = 'ul';
|
|
6
6
|
exports.LIST_ITEM_DEFAULT_TAG = 'li';
|
|
7
|
+
exports.LIST_ITEM_DEFAULT_ALIGN = 'center';
|
|
7
8
|
exports.LIST_ITEM_BUTTON_DEFAULT_TAG = 'div';
|
|
9
|
+
exports.LIST_ITEM_BUTTON_DEFAULT_ALIGN = 'center';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.Theme_control_ozenDefault {
|
|
2
|
+
--control-padding-4xs: 2px;
|
|
3
|
+
--control-padding-3xs: 4px;
|
|
4
|
+
--control-padding-2xs: 8px;
|
|
5
|
+
--control-padding-xs: 12px;
|
|
6
|
+
--control-padding-s: 16px;
|
|
7
|
+
--control-padding-m: 20px;
|
|
8
|
+
--control-padding-l: 24px;
|
|
9
|
+
--control-height-4xs: 16px;
|
|
10
|
+
--control-height-3xs: 24px;
|
|
11
|
+
--control-height-2xs: 32px;
|
|
12
|
+
--control-height-xs: 40px;
|
|
13
|
+
--control-height-s: 48px;
|
|
14
|
+
--control-height-m: 56px;
|
|
15
|
+
--control-height-l: 64px;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.Theme_spacing_ozenDefault {
|
|
2
|
+
--spacing-4xs: 2px;
|
|
3
|
+
--spacing-3xs: 4px;
|
|
4
|
+
--spacing-2xs: 8px;
|
|
5
|
+
--spacing-xs: 12px;
|
|
6
|
+
--spacing-s: 16px;
|
|
7
|
+
--spacing-m: 24px;
|
|
8
|
+
--spacing-l: 32px;
|
|
9
|
+
--spacing-xl: 40px;
|
|
10
|
+
--spacing-2xl: 48px;
|
|
11
|
+
--spacing-3xl: 56px;
|
|
12
|
+
--spacing-4xl: 64px;
|
|
13
|
+
}
|
|
@@ -5,5 +5,7 @@ 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 spacing: readonly ["--spacing-4xs", "--spacing-3xs", "--spacing-2xs", "--spacing-xs", "--spacing-s", "--spacing-m", "--spacing-l", "--spacing-xl", "--spacing-2xl", "--spacing-3xl", "--spacing-4xl"];
|
|
9
|
+
export declare const control: readonly ["--control-padding-4xs", "--control-padding-3xs", "--control-padding-2xs", "--control-padding-xs", "--control-padding-s", "--control-padding-m", "--control-padding-l", "--control-height-4xs", "--control-height-3xs", "--control-height-2xs", "--control-height-xs", "--control-height-s", "--control-height-m", "--control-height-l"];
|
|
8
10
|
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
11
|
export declare const transition: readonly ["--transition-default", "--transition-slow"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.transition = exports.typography = exports.space = exports.zIndex = exports.breakpoint = exports.shadow = exports.borderWidth = exports.borderRadius = exports.color = void 0;
|
|
3
|
+
exports.transition = exports.typography = exports.control = exports.spacing = exports.space = exports.zIndex = exports.breakpoint = exports.shadow = exports.borderWidth = exports.borderRadius = exports.color = void 0;
|
|
4
4
|
exports.color = [
|
|
5
5
|
'--color-content-primary',
|
|
6
6
|
'--color-content-secondary',
|
|
@@ -192,6 +192,35 @@ exports.space = [
|
|
|
192
192
|
'--space-s',
|
|
193
193
|
'--space-xs',
|
|
194
194
|
];
|
|
195
|
+
exports.spacing = [
|
|
196
|
+
'--spacing-4xs',
|
|
197
|
+
'--spacing-3xs',
|
|
198
|
+
'--spacing-2xs',
|
|
199
|
+
'--spacing-xs',
|
|
200
|
+
'--spacing-s',
|
|
201
|
+
'--spacing-m',
|
|
202
|
+
'--spacing-l',
|
|
203
|
+
'--spacing-xl',
|
|
204
|
+
'--spacing-2xl',
|
|
205
|
+
'--spacing-3xl',
|
|
206
|
+
'--spacing-4xl',
|
|
207
|
+
];
|
|
208
|
+
exports.control = [
|
|
209
|
+
'--control-padding-4xs',
|
|
210
|
+
'--control-padding-3xs',
|
|
211
|
+
'--control-padding-2xs',
|
|
212
|
+
'--control-padding-xs',
|
|
213
|
+
'--control-padding-s',
|
|
214
|
+
'--control-padding-m',
|
|
215
|
+
'--control-padding-l',
|
|
216
|
+
'--control-height-4xs',
|
|
217
|
+
'--control-height-3xs',
|
|
218
|
+
'--control-height-2xs',
|
|
219
|
+
'--control-height-xs',
|
|
220
|
+
'--control-height-s',
|
|
221
|
+
'--control-height-m',
|
|
222
|
+
'--control-height-l',
|
|
223
|
+
];
|
|
195
224
|
exports.typography = [
|
|
196
225
|
'--typography-text-xl_1-font',
|
|
197
226
|
'--typography-text-4xl_1-font',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_bBusinessDefault.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -6,6 +6,8 @@ require("../_color/Theme_color_bBusinessDefault.css");
|
|
|
6
6
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
7
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
8
8
|
require("../_space/Theme_space_ozenDefault.css");
|
|
9
|
+
require("../_spacing/Theme_spacing_ozenDefault.css");
|
|
10
|
+
require("../_control/Theme_control_ozenDefault.css");
|
|
9
11
|
require("../_shadow/Theme_shadow_ozenDefault.css");
|
|
10
12
|
require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
11
13
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
@@ -15,6 +17,8 @@ exports.themeBBusinessDefault = {
|
|
|
15
17
|
tokens: {
|
|
16
18
|
color: 'bBusinessDefault',
|
|
17
19
|
space: 'ozenDefault',
|
|
20
|
+
spacing: 'ozenDefault',
|
|
21
|
+
control: 'ozenDefault',
|
|
18
22
|
typography: 'ozenDefault',
|
|
19
23
|
borderRadius: 'ozenDefault',
|
|
20
24
|
borderWidth: 'ozenDefault',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_ozenDark.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -6,6 +6,8 @@ require("../_color/Theme_color_ozenDark.css");
|
|
|
6
6
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
7
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
8
8
|
require("../_space/Theme_space_ozenDefault.css");
|
|
9
|
+
require("../_spacing/Theme_spacing_ozenDefault.css");
|
|
10
|
+
require("../_control/Theme_control_ozenDefault.css");
|
|
9
11
|
require("../_shadow/Theme_shadow_ozenDefault.css");
|
|
10
12
|
require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
11
13
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
@@ -15,6 +17,8 @@ exports.themeOzenDark = {
|
|
|
15
17
|
tokens: {
|
|
16
18
|
color: 'ozenDark',
|
|
17
19
|
space: 'ozenDefault',
|
|
20
|
+
spacing: 'ozenDefault',
|
|
21
|
+
control: 'ozenDefault',
|
|
18
22
|
typography: 'ozenDefault',
|
|
19
23
|
borderRadius: 'ozenDefault',
|
|
20
24
|
borderWidth: 'ozenDefault',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_ozenDefault.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -6,6 +6,8 @@ require("../_color/Theme_color_ozenDefault.css");
|
|
|
6
6
|
require("../_typography/Theme_typography_ozenDefault.css");
|
|
7
7
|
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
8
8
|
require("../_space/Theme_space_ozenDefault.css");
|
|
9
|
+
require("../_spacing/Theme_spacing_ozenDefault.css");
|
|
10
|
+
require("../_control/Theme_control_ozenDefault.css");
|
|
9
11
|
require("../_shadow/Theme_shadow_ozenDefault.css");
|
|
10
12
|
require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
11
13
|
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
@@ -15,6 +17,8 @@ exports.themeOzenDefault = {
|
|
|
15
17
|
tokens: {
|
|
16
18
|
color: 'ozenDefault',
|
|
17
19
|
space: 'ozenDefault',
|
|
20
|
+
spacing: 'ozenDefault',
|
|
21
|
+
control: 'ozenDefault',
|
|
18
22
|
typography: 'ozenDefault',
|
|
19
23
|
borderRadius: 'ozenDefault',
|
|
20
24
|
borderWidth: 'ozenDefault',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { themeHelper } from '../../components/ThemeProvider';
|
|
2
|
-
type VariablesVariant = 'color' | 'breakpoint' | 'zIndex' | 'space' | 'borderRadius' | 'borderWidth' | 'shadow' | 'typography' | 'transition';
|
|
2
|
+
type VariablesVariant = 'color' | 'breakpoint' | 'zIndex' | 'space' | 'spacing' | 'control' | 'borderRadius' | 'borderWidth' | 'shadow' | 'typography' | 'transition';
|
|
3
3
|
export type ThemeVariables = {
|
|
4
4
|
[P in VariablesVariant]: {
|
|
5
5
|
[key in (typeof themeHelper)[P][number]]: string;
|
|
@@ -14,16 +14,18 @@
|
|
|
14
14
|
padding: 0 var(--button-padding-x);
|
|
15
15
|
background-color: var(--button-bg-color);
|
|
16
16
|
border-radius: var(--border-radius-xs);
|
|
17
|
-
transition:
|
|
18
|
-
|
|
17
|
+
transition:
|
|
18
|
+
background-color var(--transition-default),
|
|
19
|
+
border-color var(--transition-default),
|
|
20
|
+
box-shadow var(--transition-default),
|
|
19
21
|
opacity var(--transition-default);
|
|
20
22
|
-webkit-tap-highlight-color: unset;
|
|
21
23
|
position: relative;
|
|
22
24
|
}
|
|
23
25
|
.Button_size_2xs {
|
|
24
|
-
--button-height:
|
|
26
|
+
--button-height: var(--control-height-2xs);
|
|
27
|
+
--button-padding-x: var(--control-padding-xs);
|
|
25
28
|
--button-min-width: 56px;
|
|
26
|
-
--button-padding-x: 12px;
|
|
27
29
|
|
|
28
30
|
font: var(--typography-text-2xs-font);
|
|
29
31
|
|
|
@@ -32,9 +34,9 @@
|
|
|
32
34
|
text-transform: var(--typography-text-2xs-text_transform, none);
|
|
33
35
|
}
|
|
34
36
|
.Button_size_xs {
|
|
35
|
-
--button-height:
|
|
37
|
+
--button-height: var(--control-height-xs);
|
|
38
|
+
--button-padding-x: var(--control-padding-xs);
|
|
36
39
|
--button-min-width: 64px;
|
|
37
|
-
--button-padding-x: 12px;
|
|
38
40
|
|
|
39
41
|
font: var(--typography-text-xs-font);
|
|
40
42
|
|
|
@@ -43,9 +45,9 @@
|
|
|
43
45
|
text-transform: var(--typography-text-xs-text_transform, none);
|
|
44
46
|
}
|
|
45
47
|
.Button_size_s {
|
|
46
|
-
--button-height:
|
|
48
|
+
--button-height: var(--control-height-s);
|
|
49
|
+
--button-padding-x: var(--control-padding-s);
|
|
47
50
|
--button-min-width: 72px;
|
|
48
|
-
--button-padding-x: 16px;
|
|
49
51
|
|
|
50
52
|
font: var(--typography-text-s-font);
|
|
51
53
|
|
|
@@ -54,9 +56,9 @@
|
|
|
54
56
|
text-transform: var(--typography-text-s-text_transform, none);
|
|
55
57
|
}
|
|
56
58
|
.Button_size_m {
|
|
57
|
-
--button-height:
|
|
59
|
+
--button-height: var(--control-height-m);
|
|
60
|
+
--button-padding-x: var(--control-padding-m);
|
|
58
61
|
--button-min-width: 80px;
|
|
59
|
-
--button-padding-x: 20px;
|
|
60
62
|
|
|
61
63
|
font: var(--typography-text-m-font);
|
|
62
64
|
|
|
@@ -65,9 +67,9 @@
|
|
|
65
67
|
text-transform: var(--typography-text-m-text_transform, none);
|
|
66
68
|
}
|
|
67
69
|
.Button_size_l {
|
|
68
|
-
--button-height:
|
|
70
|
+
--button-height: var(--control-height-l);
|
|
71
|
+
--button-padding-x: var(--control-padding-l);
|
|
69
72
|
--button-min-width: 88px;
|
|
70
|
-
--button-padding-x: 24px;
|
|
71
73
|
|
|
72
74
|
font: var(--typography-text-l-font);
|
|
73
75
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
.ListItem {
|
|
2
2
|
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
3
|
min-block-size: var(--list-item-min-height);
|
|
5
4
|
padding: var(--list-item-padding);
|
|
6
5
|
border-radius: var(--list-item-border-radius);
|
|
@@ -10,6 +9,14 @@
|
|
|
10
9
|
margin: 0 var(--list-gutter);
|
|
11
10
|
}
|
|
12
11
|
|
|
12
|
+
.ListItem_align_start {
|
|
13
|
+
align-items: flex-start;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.ListItem_align_center {
|
|
17
|
+
align-items: center;
|
|
18
|
+
}
|
|
19
|
+
|
|
13
20
|
.ListItem_disableGutters {
|
|
14
21
|
padding: 0;
|
|
15
22
|
}
|
|
@@ -3,11 +3,15 @@ import type { ReactNode, ElementType } from 'react';
|
|
|
3
3
|
import { type PolymorphicComponentPropsWithoutRef } from '../../../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import { LIST_ITEM_DEFAULT_TAG } from '../../constants';
|
|
5
5
|
export declare const cnListItem: import("@bem-react/classname").ClassNameFormatter;
|
|
6
|
+
export declare const listItemAlignVariant: readonly ["start", "center"];
|
|
7
|
+
export type ListItemAlignVariant = (typeof listItemAlignVariant)[number];
|
|
6
8
|
export type ListItemBaseProps = {
|
|
7
9
|
/** Содержимое компонента */
|
|
8
10
|
children: ReactNode;
|
|
9
11
|
/** Если {true} убирает отступы вокруг корневого элемента */
|
|
10
12
|
disableGutters?: boolean;
|
|
13
|
+
/** Расположение контента по вертикали (свойство flex-контейнера align-items) */
|
|
14
|
+
align?: ListItemAlignVariant;
|
|
11
15
|
};
|
|
12
16
|
export type ListItemProps<As extends ElementType = typeof LIST_ITEM_DEFAULT_TAG> = PolymorphicComponentPropsWithoutRef<ListItemBaseProps, As>;
|
|
13
17
|
export declare const ListItem: import("../../../../utils/polymorphicComponentWithRef").PolymorphicComponentWithRef<ListItemBaseProps, "li">;
|
|
@@ -4,11 +4,12 @@ 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 { LIST_ITEM_DEFAULT_TAG } from '../../constants';
|
|
7
|
+
import { LIST_ITEM_DEFAULT_ALIGN, LIST_ITEM_DEFAULT_TAG, } from '../../constants';
|
|
8
8
|
export var cnListItem = cn('ListItem');
|
|
9
|
+
export var listItemAlignVariant = ['start', 'center'];
|
|
9
10
|
export var ListItem = polymorphicComponentWithRef(function (inProps, ref) {
|
|
10
11
|
var props = useThemeProps({ props: inProps, name: 'ListItem' });
|
|
11
|
-
var _a = props.as, Tag = _a === void 0 ? LIST_ITEM_DEFAULT_TAG : _a, children = props.children, className = props.className, disableGutters = props.disableGutters, other = __rest(props, ["as", "children", "className", "disableGutters"]);
|
|
12
|
-
return (React.createElement(Tag, __assign({ className: cnListItem({ disableGutters: disableGutters }, [className]) }, other, { ref: ref }), children));
|
|
12
|
+
var _a = props.as, Tag = _a === void 0 ? LIST_ITEM_DEFAULT_TAG : _a, _b = props.align, align = _b === void 0 ? LIST_ITEM_DEFAULT_ALIGN : _b, children = props.children, className = props.className, disableGutters = props.disableGutters, other = __rest(props, ["as", "align", "children", "className", "disableGutters"]);
|
|
13
|
+
return (React.createElement(Tag, __assign({ className: cnListItem({ align: align, disableGutters: disableGutters }, [className]) }, other, { ref: ref }), children));
|
|
13
14
|
});
|
|
14
15
|
ListItem.displayName = 'ListItem';
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
transition: background-color var(--transition-default);
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-shrink: 0;
|
|
12
|
-
align-items: center;
|
|
13
12
|
box-sizing: border-box;
|
|
14
13
|
outline: none;
|
|
15
14
|
text-decoration: none;
|
|
@@ -36,6 +35,14 @@
|
|
|
36
35
|
box-shadow: none;
|
|
37
36
|
}
|
|
38
37
|
|
|
38
|
+
.ListItemButton_align_start {
|
|
39
|
+
align-items: flex-start;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ListItemButton_align_center {
|
|
43
|
+
align-items: center;
|
|
44
|
+
}
|
|
45
|
+
|
|
39
46
|
.ListItemButton_disabled {
|
|
40
47
|
pointer-events: none;
|
|
41
48
|
color: var(--list-item-bg-color-disabled);
|
|
@@ -3,6 +3,8 @@ import type { ReactNode, ElementType } from 'react';
|
|
|
3
3
|
import { type PolymorphicComponentPropsWithoutRef } from '../../../../utils/polymorphicComponentWithRef';
|
|
4
4
|
import { LIST_ITEM_BUTTON_DEFAULT_TAG } from '../../constants';
|
|
5
5
|
export declare const cnListItemButton: import("@bem-react/classname").ClassNameFormatter;
|
|
6
|
+
export declare const listItemButtonAlignVariant: readonly ["start", "center"];
|
|
7
|
+
export type ListItemButtonAlignVariant = (typeof listItemButtonAlignVariant)[number];
|
|
6
8
|
export type ListItemButtonBaseProps = {
|
|
7
9
|
/** Содержимое компонента */
|
|
8
10
|
children?: ReactNode;
|
|
@@ -10,6 +12,8 @@ export type ListItemButtonBaseProps = {
|
|
|
10
12
|
disabled?: boolean;
|
|
11
13
|
/** Если {true} отображает элемент списка как выбранный */
|
|
12
14
|
selected?: boolean;
|
|
15
|
+
/** Расположение контента по вертикали (свойство flex-контейнера align-items) */
|
|
16
|
+
align?: ListItemButtonAlignVariant;
|
|
13
17
|
/** Идентификатор компонента для тестов */
|
|
14
18
|
'data-testid'?: string;
|
|
15
19
|
};
|
|
@@ -5,11 +5,12 @@ import { useThemeProps } from '../../../../hooks/useThemeProps';
|
|
|
5
5
|
import { cn } from '../../../../utils/classname';
|
|
6
6
|
import { isKey } from '../../../../utils/isKey';
|
|
7
7
|
import { polymorphicComponentWithRef, } from '../../../../utils/polymorphicComponentWithRef';
|
|
8
|
-
import { LIST_ITEM_BUTTON_DEFAULT_TAG } from '../../constants';
|
|
8
|
+
import { LIST_ITEM_BUTTON_DEFAULT_ALIGN, LIST_ITEM_BUTTON_DEFAULT_TAG, } from '../../constants';
|
|
9
9
|
export var cnListItemButton = cn('ListItemButton');
|
|
10
|
+
export var listItemButtonAlignVariant = ['start', 'center'];
|
|
10
11
|
export var ListItemButton = polymorphicComponentWithRef(function (inProps, ref) {
|
|
11
12
|
var props = useThemeProps({ props: inProps, name: 'ListItemButton' });
|
|
12
|
-
var _a = props.as, Tag = _a === void 0 ? LIST_ITEM_BUTTON_DEFAULT_TAG : _a, children = props.children, disabled = props.disabled, className = props.className, onClick = props.onClick, tabIndexProp = props.tabIndex, onKeyDownProp = props.onKeyDown, selected = props.selected, other = __rest(props, ["as", "children", "disabled", "className", "onClick", "tabIndex", "onKeyDown", "selected"]);
|
|
13
|
+
var _a = props.as, Tag = _a === void 0 ? LIST_ITEM_BUTTON_DEFAULT_TAG : _a, _b = props.align, align = _b === void 0 ? LIST_ITEM_BUTTON_DEFAULT_ALIGN : _b, children = props.children, disabled = props.disabled, className = props.className, onClick = props.onClick, tabIndexProp = props.tabIndex, onKeyDownProp = props.onKeyDown, selected = props.selected, other = __rest(props, ["as", "align", "children", "disabled", "className", "onClick", "tabIndex", "onKeyDown", "selected"]);
|
|
13
14
|
var tabIndex = useMemo(function () { return (!disabled ? 0 : -1); }, [disabled]);
|
|
14
15
|
var handleClick = function (event) {
|
|
15
16
|
if (!disabled)
|
|
@@ -40,6 +41,7 @@ export var ListItemButton = polymorphicComponentWithRef(function (inProps, ref)
|
|
|
40
41
|
return commonAdditionalProps;
|
|
41
42
|
}, [Tag, handleKeyDown]);
|
|
42
43
|
return (React.createElement(Tag, __assign({ className: cnListItemButton({
|
|
44
|
+
align: align,
|
|
43
45
|
disabled: disabled,
|
|
44
46
|
selected: selected,
|
|
45
47
|
}, [className]), onClick: handleClick, tabIndex: tabIndexProp || tabIndex }, additionalTagProps, other, { ref: ref }), children));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const LIST_DEFAULT_SIZE = "m";
|
|
2
2
|
export declare const LIST_DEFAULT_TAG = "ul";
|
|
3
3
|
export declare const LIST_ITEM_DEFAULT_TAG = "li";
|
|
4
|
+
export declare const LIST_ITEM_DEFAULT_ALIGN = "center";
|
|
4
5
|
export declare const LIST_ITEM_BUTTON_DEFAULT_TAG = "div";
|
|
6
|
+
export declare const LIST_ITEM_BUTTON_DEFAULT_ALIGN = "center";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export var LIST_DEFAULT_SIZE = 'm';
|
|
2
2
|
export var LIST_DEFAULT_TAG = 'ul';
|
|
3
3
|
export var LIST_ITEM_DEFAULT_TAG = 'li';
|
|
4
|
+
export var LIST_ITEM_DEFAULT_ALIGN = 'center';
|
|
4
5
|
export var LIST_ITEM_BUTTON_DEFAULT_TAG = 'div';
|
|
6
|
+
export var LIST_ITEM_BUTTON_DEFAULT_ALIGN = 'center';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.Theme_control_ozenDefault {
|
|
2
|
+
--control-padding-4xs: 2px;
|
|
3
|
+
--control-padding-3xs: 4px;
|
|
4
|
+
--control-padding-2xs: 8px;
|
|
5
|
+
--control-padding-xs: 12px;
|
|
6
|
+
--control-padding-s: 16px;
|
|
7
|
+
--control-padding-m: 20px;
|
|
8
|
+
--control-padding-l: 24px;
|
|
9
|
+
--control-height-4xs: 16px;
|
|
10
|
+
--control-height-3xs: 24px;
|
|
11
|
+
--control-height-2xs: 32px;
|
|
12
|
+
--control-height-xs: 40px;
|
|
13
|
+
--control-height-s: 48px;
|
|
14
|
+
--control-height-m: 56px;
|
|
15
|
+
--control-height-l: 64px;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.Theme_spacing_ozenDefault {
|
|
2
|
+
--spacing-4xs: 2px;
|
|
3
|
+
--spacing-3xs: 4px;
|
|
4
|
+
--spacing-2xs: 8px;
|
|
5
|
+
--spacing-xs: 12px;
|
|
6
|
+
--spacing-s: 16px;
|
|
7
|
+
--spacing-m: 24px;
|
|
8
|
+
--spacing-l: 32px;
|
|
9
|
+
--spacing-xl: 40px;
|
|
10
|
+
--spacing-2xl: 48px;
|
|
11
|
+
--spacing-3xl: 56px;
|
|
12
|
+
--spacing-4xl: 64px;
|
|
13
|
+
}
|
|
@@ -5,5 +5,7 @@ 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 spacing: readonly ["--spacing-4xs", "--spacing-3xs", "--spacing-2xs", "--spacing-xs", "--spacing-s", "--spacing-m", "--spacing-l", "--spacing-xl", "--spacing-2xl", "--spacing-3xl", "--spacing-4xl"];
|
|
9
|
+
export declare const control: readonly ["--control-padding-4xs", "--control-padding-3xs", "--control-padding-2xs", "--control-padding-xs", "--control-padding-s", "--control-padding-m", "--control-padding-l", "--control-height-4xs", "--control-height-3xs", "--control-height-2xs", "--control-height-xs", "--control-height-s", "--control-height-m", "--control-height-l"];
|
|
8
10
|
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
11
|
export declare const transition: readonly ["--transition-default", "--transition-slow"];
|
|
@@ -189,6 +189,35 @@ export var space = [
|
|
|
189
189
|
'--space-s',
|
|
190
190
|
'--space-xs',
|
|
191
191
|
];
|
|
192
|
+
export var spacing = [
|
|
193
|
+
'--spacing-4xs',
|
|
194
|
+
'--spacing-3xs',
|
|
195
|
+
'--spacing-2xs',
|
|
196
|
+
'--spacing-xs',
|
|
197
|
+
'--spacing-s',
|
|
198
|
+
'--spacing-m',
|
|
199
|
+
'--spacing-l',
|
|
200
|
+
'--spacing-xl',
|
|
201
|
+
'--spacing-2xl',
|
|
202
|
+
'--spacing-3xl',
|
|
203
|
+
'--spacing-4xl',
|
|
204
|
+
];
|
|
205
|
+
export var control = [
|
|
206
|
+
'--control-padding-4xs',
|
|
207
|
+
'--control-padding-3xs',
|
|
208
|
+
'--control-padding-2xs',
|
|
209
|
+
'--control-padding-xs',
|
|
210
|
+
'--control-padding-s',
|
|
211
|
+
'--control-padding-m',
|
|
212
|
+
'--control-padding-l',
|
|
213
|
+
'--control-height-4xs',
|
|
214
|
+
'--control-height-3xs',
|
|
215
|
+
'--control-height-2xs',
|
|
216
|
+
'--control-height-xs',
|
|
217
|
+
'--control-height-s',
|
|
218
|
+
'--control-height-m',
|
|
219
|
+
'--control-height-l',
|
|
220
|
+
];
|
|
192
221
|
export var typography = [
|
|
193
222
|
'--typography-text-xl_1-font',
|
|
194
223
|
'--typography-text-4xl_1-font',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_bBusinessDefault.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -3,6 +3,8 @@ import '../_color/Theme_color_bBusinessDefault.css';
|
|
|
3
3
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
4
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
5
5
|
import '../_space/Theme_space_ozenDefault.css';
|
|
6
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
7
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
6
8
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
7
9
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
8
10
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -12,6 +14,8 @@ export var themeBBusinessDefault = {
|
|
|
12
14
|
tokens: {
|
|
13
15
|
color: 'bBusinessDefault',
|
|
14
16
|
space: 'ozenDefault',
|
|
17
|
+
spacing: 'ozenDefault',
|
|
18
|
+
control: 'ozenDefault',
|
|
15
19
|
typography: 'ozenDefault',
|
|
16
20
|
borderRadius: 'ozenDefault',
|
|
17
21
|
borderWidth: 'ozenDefault',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_ozenDark.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -3,6 +3,8 @@ import '../_color/Theme_color_ozenDark.css';
|
|
|
3
3
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
4
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
5
5
|
import '../_space/Theme_space_ozenDefault.css';
|
|
6
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
7
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
6
8
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
7
9
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
8
10
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -12,6 +14,8 @@ export var themeOzenDark = {
|
|
|
12
14
|
tokens: {
|
|
13
15
|
color: 'ozenDark',
|
|
14
16
|
space: 'ozenDefault',
|
|
17
|
+
spacing: 'ozenDefault',
|
|
18
|
+
control: 'ozenDefault',
|
|
15
19
|
typography: 'ozenDefault',
|
|
16
20
|
borderRadius: 'ozenDefault',
|
|
17
21
|
borderWidth: 'ozenDefault',
|
|
@@ -4,6 +4,8 @@ import '../_color/Theme_color_ozenDefault.css';
|
|
|
4
4
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
5
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
6
|
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
7
9
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
8
10
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
9
11
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -3,6 +3,8 @@ import '../_color/Theme_color_ozenDefault.css';
|
|
|
3
3
|
import '../_typography/Theme_typography_ozenDefault.css';
|
|
4
4
|
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
5
5
|
import '../_space/Theme_space_ozenDefault.css';
|
|
6
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
7
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
6
8
|
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
7
9
|
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
8
10
|
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
@@ -12,6 +14,8 @@ export var themeOzenDefault = {
|
|
|
12
14
|
tokens: {
|
|
13
15
|
color: 'ozenDefault',
|
|
14
16
|
space: 'ozenDefault',
|
|
17
|
+
spacing: 'ozenDefault',
|
|
18
|
+
control: 'ozenDefault',
|
|
15
19
|
typography: 'ozenDefault',
|
|
16
20
|
borderRadius: 'ozenDefault',
|
|
17
21
|
borderWidth: 'ozenDefault',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { themeHelper } from '../../components/ThemeProvider';
|
|
2
|
-
type VariablesVariant = 'color' | 'breakpoint' | 'zIndex' | 'space' | 'borderRadius' | 'borderWidth' | 'shadow' | 'typography' | 'transition';
|
|
2
|
+
type VariablesVariant = 'color' | 'breakpoint' | 'zIndex' | 'space' | 'spacing' | 'control' | 'borderRadius' | 'borderWidth' | 'shadow' | 'typography' | 'transition';
|
|
3
3
|
export type ThemeVariables = {
|
|
4
4
|
[P in VariablesVariant]: {
|
|
5
5
|
[key in (typeof themeHelper)[P][number]]: string;
|