@itcase/ui 1.3.36 → 1.4.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/dist/cjs/components/Tab.js +61 -63
- package/dist/components/Tab.js +61 -63
- package/dist/css/components/Avatar/Avatar.css +4 -0
- package/dist/css/components/Avatar/Avatar.tokens.css +2 -0
- package/dist/css/components/Checkbox/Checkbox.css +4 -0
- package/dist/css/components/Checkbox/Checkbox.tokens.css +1 -1
- package/dist/css/components/Choice/Choice.css +13 -2
- package/dist/css/components/Choice/Choice.tokens.css +4 -3
- package/dist/css/components/DatePicker/DatePicker.css +51 -0
- package/dist/css/components/DatePicker/DatePicker.tokens.css +15 -7
- package/dist/css/components/Divider/Divider.css +19 -6
- package/dist/css/components/Divider/Divider.tokens.css +12 -11
- package/dist/css/components/Dot/Dot.css +10 -0
- package/dist/css/components/Drawer/Drawer.css +4 -0
- package/dist/css/components/Drawer/Drawer.tokens.css +4 -0
- package/dist/css/components/Dropdown/Dropdown.css +37 -0
- package/dist/css/components/Dropdown/Dropdown.tokens.css +6 -0
- package/dist/css/components/Icon/Icon.css +5 -0
- package/dist/css/components/Icon/Icon.tokens.css +1 -0
- package/dist/css/components/Input/Input.css +29 -0
- package/dist/css/components/InputPassword/InputPassword.css +23 -0
- package/dist/css/components/Label/Label.css +19 -0
- package/dist/css/components/Label/Label.tokens.css +3 -3
- package/dist/css/components/Logo/Logo.tokens.css +17 -2
- package/dist/css/components/MenuItem/MenuItem.tokens.css +4 -4
- package/dist/css/components/Modal/Modal.css +3 -0
- package/dist/css/components/Modal/Modal.tokens.css +3 -0
- package/dist/css/components/Pagination/Pagination.css +25 -0
- package/dist/css/components/Search/Search.css +16 -0
- package/dist/css/components/Search/Search.tokens.css +6 -3
- package/dist/css/components/Segmented/Segmented.css +6 -0
- package/dist/css/components/Segmented/Segmented.tokens.css +2 -0
- package/dist/css/components/Select/Select.css +22 -20
- package/dist/css/components/Select/Select.tokens.css +12 -12
- package/dist/css/components/Select/css/__control/select__control_fill.css +4 -2
- package/dist/css/components/Select/css/__menu/select__menu-list-item_size.css +1 -1
- package/dist/css/components/Tab/Tab.css +28 -0
- package/dist/css/components/Textarea/Textarea.css +7 -0
- package/dist/stories/Overview.mdx +5 -5
- package/dist/stories/Playground.mdx +4 -4
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-CCZ3TN_7.js');
|
|
3
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var clsx = require('clsx');
|
|
@@ -9,7 +10,6 @@ var Badge = require('../../Badge-BX4N91_C.js');
|
|
|
9
10
|
var Divider = require('../../Divider-ImOOytuN.js');
|
|
10
11
|
var Link = require('../../Link-B38Hn4G2.js');
|
|
11
12
|
var Text = require('../../Text-C49zj3jO.js');
|
|
12
|
-
require('../../tslib.es6-CCZ3TN_7.js');
|
|
13
13
|
require('lodash/camelCase');
|
|
14
14
|
require('lodash/castArray');
|
|
15
15
|
require('lodash/upperFirst');
|
|
@@ -25,134 +25,132 @@ require('../../Tooltip-DpBQQoNo.js');
|
|
|
25
25
|
require('../../Title-BWWyRwLY.js');
|
|
26
26
|
|
|
27
27
|
var tabAppearance = {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
accent: {
|
|
29
|
+
fill: 'accentPrimary',
|
|
30
|
+
fillHover: 'accentPrimaryHover',
|
|
31
|
+
labelColor: 'accentTextPrimary',
|
|
32
|
+
labelColorActive: 'accentTextPrimary',
|
|
31
33
|
dividerFillDisabled: 'accentDisabled',
|
|
32
|
-
dividerFillHover: 'surfaceTertiary',
|
|
33
|
-
fill: 'surfacePrimary',
|
|
34
34
|
fillDisabled: 'surfaceDisabled',
|
|
35
|
-
fillHover: 'surfaceTertiary',
|
|
36
|
-
labelColor: 'surfaceTextPrimary',
|
|
37
|
-
labelColorActive: 'surfaceTextAccent',
|
|
38
35
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
36
|
+
dividerFill: 'surfaceTertiary',
|
|
37
|
+
dividerFillActive: 'surfacePrimary',
|
|
38
|
+
dividerFillHover: 'surfaceTertiary',
|
|
39
39
|
},
|
|
40
|
-
|
|
40
|
+
primary: {
|
|
41
|
+
fill: 'primaryPrimary',
|
|
42
|
+
fillHover: 'primaryPrimaryHover',
|
|
43
|
+
labelColor: 'primaryTextPrimary',
|
|
44
|
+
labelColorActive: 'primaryTextPrimary',
|
|
45
|
+
dividerFillDisabled: 'accentDisabled',
|
|
46
|
+
fillDisabled: 'surfaceDisabled',
|
|
47
|
+
labelColorDisabled: 'surfaceTextDisabled',
|
|
41
48
|
dividerFill: 'surfaceTertiary',
|
|
42
49
|
dividerFillActive: 'accentPrimary',
|
|
50
|
+
dividerFillHover: 'surfaceTertiary',
|
|
51
|
+
},
|
|
52
|
+
secondary: {
|
|
53
|
+
fill: 'secondaryPrimary',
|
|
54
|
+
fillHover: 'secondaryPrimaryHover',
|
|
55
|
+
labelColor: 'secondaryTextPrimary',
|
|
56
|
+
labelColorActive: 'secondaryTextPrimary',
|
|
43
57
|
dividerFillDisabled: 'accentDisabled',
|
|
58
|
+
fillDisabled: 'surfaceDisabled',
|
|
59
|
+
labelColorDisabled: 'surfaceTextDisabled',
|
|
60
|
+
dividerFill: 'surfaceTertiary',
|
|
61
|
+
dividerFillActive: 'accentPrimary',
|
|
44
62
|
dividerFillHover: 'surfaceTertiary',
|
|
63
|
+
},
|
|
64
|
+
surfacePrimary: {
|
|
45
65
|
fill: 'surfacePrimary',
|
|
46
|
-
fillDisabled: 'surfaceDisabled',
|
|
47
66
|
fillHover: 'surfacePrimaryHover',
|
|
48
67
|
labelColor: 'surfaceTextPrimary',
|
|
49
68
|
labelColorActive: 'surfaceTextAccent',
|
|
69
|
+
dividerFillDisabled: 'accentDisabled',
|
|
70
|
+
fillDisabled: 'surfaceDisabled',
|
|
50
71
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
51
|
-
},
|
|
52
|
-
surfaceSecondary: {
|
|
53
72
|
dividerFill: 'surfaceTertiary',
|
|
54
73
|
dividerFillActive: 'accentPrimary',
|
|
55
|
-
dividerFillDisabled: 'accentDisabled',
|
|
56
74
|
dividerFillHover: 'surfaceTertiary',
|
|
75
|
+
},
|
|
76
|
+
surfaceSecondary: {
|
|
57
77
|
fill: 'surfaceSecondary',
|
|
58
|
-
fillDisabled: 'surfaceDisabled',
|
|
59
78
|
fillHover: 'surfaceSecondaryHover',
|
|
60
79
|
labelColor: 'surfaceTextPrimary',
|
|
61
80
|
labelColorActive: 'surfaceTextAccent',
|
|
81
|
+
dividerFillDisabled: 'accentDisabled',
|
|
82
|
+
fillDisabled: 'surfaceDisabled',
|
|
62
83
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
63
|
-
},
|
|
64
|
-
surfaceTertiary: {
|
|
65
84
|
dividerFill: 'surfaceTertiary',
|
|
66
85
|
dividerFillActive: 'accentPrimary',
|
|
67
|
-
dividerFillDisabled: 'accentDisabled',
|
|
68
86
|
dividerFillHover: 'surfaceTertiary',
|
|
87
|
+
},
|
|
88
|
+
surfaceTertiary: {
|
|
69
89
|
fill: 'surfaceTertiary',
|
|
70
|
-
fillDisabled: 'surfaceDisabled',
|
|
71
90
|
fillHover: 'surfaceTertiaryHover',
|
|
72
91
|
labelColor: 'surfaceTextPrimary',
|
|
73
92
|
labelColorActive: 'surfaceTextAccent',
|
|
93
|
+
dividerFillDisabled: 'accentDisabled',
|
|
94
|
+
fillDisabled: 'surfaceDisabled',
|
|
74
95
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
75
|
-
},
|
|
76
|
-
surfaceQuaternary: {
|
|
77
96
|
dividerFill: 'surfaceTertiary',
|
|
78
97
|
dividerFillActive: 'accentPrimary',
|
|
79
|
-
dividerFillDisabled: 'accentDisabled',
|
|
80
98
|
dividerFillHover: 'surfaceTertiary',
|
|
99
|
+
},
|
|
100
|
+
surfaceQuaternary: {
|
|
81
101
|
fill: 'surfaceQuaternary',
|
|
82
|
-
fillDisabled: 'surfaceDisabled',
|
|
83
102
|
fillHover: 'surfaceTertiaryHover',
|
|
84
103
|
labelColor: 'surfaceTextInverse',
|
|
85
104
|
labelColorActive: 'surfaceTextInverse',
|
|
86
|
-
labelColorDisabled: 'surfaceTextDisabled',
|
|
87
|
-
},
|
|
88
|
-
accent: {
|
|
89
|
-
dividerFill: 'surfaceTertiary',
|
|
90
|
-
dividerFillActive: 'surfacePrimary',
|
|
91
105
|
dividerFillDisabled: 'accentDisabled',
|
|
92
|
-
dividerFillHover: 'surfaceTertiary',
|
|
93
|
-
fill: 'accentPrimary',
|
|
94
106
|
fillDisabled: 'surfaceDisabled',
|
|
95
|
-
fillHover: 'accentPrimaryHover',
|
|
96
|
-
labelColor: 'accentTextPrimary',
|
|
97
|
-
labelColorActive: 'accentTextPrimary',
|
|
98
107
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
99
|
-
},
|
|
100
|
-
primary: {
|
|
101
108
|
dividerFill: 'surfaceTertiary',
|
|
102
109
|
dividerFillActive: 'accentPrimary',
|
|
103
|
-
dividerFillDisabled: 'accentDisabled',
|
|
104
110
|
dividerFillHover: 'surfaceTertiary',
|
|
105
|
-
|
|
111
|
+
},
|
|
112
|
+
any: {
|
|
113
|
+
fill: 'surfacePrimary',
|
|
114
|
+
fillHover: 'surfaceTertiary',
|
|
115
|
+
labelColor: 'surfaceTextPrimary',
|
|
116
|
+
labelColorActive: 'surfaceTextAccent',
|
|
117
|
+
dividerFillDisabled: 'accentDisabled',
|
|
106
118
|
fillDisabled: 'surfaceDisabled',
|
|
107
|
-
fillHover: 'primaryPrimaryHover',
|
|
108
|
-
labelColor: 'primaryTextPrimary',
|
|
109
|
-
labelColorActive: 'primaryTextPrimary',
|
|
110
119
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
111
|
-
},
|
|
112
|
-
secondary: {
|
|
113
120
|
dividerFill: 'surfaceTertiary',
|
|
114
121
|
dividerFillActive: 'accentPrimary',
|
|
115
|
-
dividerFillDisabled: 'accentDisabled',
|
|
116
122
|
dividerFillHover: 'surfaceTertiary',
|
|
117
|
-
fill: 'secondaryPrimary',
|
|
118
|
-
fillDisabled: 'surfaceDisabled',
|
|
119
|
-
fillHover: 'secondaryPrimaryHover',
|
|
120
|
-
labelColor: 'secondaryTextPrimary',
|
|
121
|
-
labelColorActive: 'secondaryTextPrimary',
|
|
122
|
-
labelColorDisabled: 'surfaceTextDisabled',
|
|
123
123
|
},
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
var tabConfig = {
|
|
127
127
|
appearance: tabAppearance,
|
|
128
|
-
setAppearance: function (
|
|
129
|
-
tabConfig.appearance =
|
|
128
|
+
setAppearance: function (appearanceConfig) {
|
|
129
|
+
tabConfig.appearance = appearanceConfig;
|
|
130
130
|
},
|
|
131
131
|
};
|
|
132
132
|
function Tab(props) {
|
|
133
|
-
var
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, badgeValue = props.badgeValue, dataTour = props.dataTour, href = props.href, link = props.link, rel = props.rel, reset = props.reset, target = props.target, before = props.before, after = props.after, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
134
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
135
|
+
var _a;
|
|
136
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultAppearance), (_a = tabConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
137
|
+
}, {});
|
|
136
138
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
137
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass,
|
|
139
|
+
var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelColor = propsGenerator.labelColor, labelColorActive = propsGenerator.labelColorActive, labelTextAlign = propsGenerator.labelTextAlign, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextGradient = propsGenerator.labelTextGradient, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, dividerFillDisabled = propsGenerator.dividerFillDisabled, fillDisabledClass = propsGenerator.fillDisabledClass, labelColorDisabled = propsGenerator.labelColorDisabled, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, typeClass = propsGenerator.typeClass, widthClass = propsGenerator.widthClass;
|
|
138
140
|
// @ts-expect-error
|
|
139
141
|
var tab = useStyles.useStyles(props).styles;
|
|
140
142
|
return (jsxRuntime.jsx("div", { className: clsx('tab', isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', isHover && 'tab_state_hover', !isDisabled
|
|
141
143
|
? fillClass && "fill_".concat(fillClass)
|
|
142
|
-
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxRuntime.jsx(Link.Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxRuntime.jsxs(React.Fragment, { children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tab__wrapper", children: [
|
|
143
|
-
? labelColorDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorDisabled)
|
|
144
|
-
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsxRuntime.jsx(Badge.Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), shape: badgeShape, size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsxRuntime.jsx(Divider.Divider, { width: "fill", fill: isDisabled
|
|
145
|
-
? dividerFillDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillDisabled)
|
|
146
|
-
: dividerFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFill), fillHover: isHover && (dividerFillHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillHover)), direction: dividerDirection, fillActive: isActive && (dividerFillActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillActive)), fillActiveHover: dividerFillActiveHover, size: dividerSize })] })), after] }) }) }));
|
|
144
|
+
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsxRuntime.jsx(Link.Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxRuntime.jsxs(React.Fragment, { children: [before, children || (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsxs("div", { className: "tab__wrapper", children: [label && (jsxRuntime.jsx(Text.Text, { className: "tab__label", textAlign: labelTextAlign, textColor: isDisabled ? labelColorDisabled : labelColor, textColorActive: isActive && labelColorActive, textColorGradient: labelTextGradient, textColorHover: labelTextColorHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, size: labelTextSize, children: label })), badgeValue && (jsxRuntime.jsx(Badge.Badge, { appearance: badgeAppearance, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, size: badgeSize, value: badgeValue }))] }), jsxRuntime.jsx(Divider.Divider, { width: "fill", direction: dividerDirection, fill: isDisabled ? dividerFillDisabled : dividerFill, fillActive: isActive && dividerFillActive, fillActiveHover: dividerFillActiveHover, fillHover: isHover && dividerFillHover, size: dividerSize })] })), after] }) }) }));
|
|
147
145
|
}
|
|
148
146
|
|
|
149
147
|
function TabGroup(props) {
|
|
150
|
-
var id = props.id,
|
|
148
|
+
var id = props.id, className = props.className, children = props.children, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set;
|
|
151
149
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
|
|
152
|
-
var
|
|
150
|
+
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
153
151
|
// @ts-expect-error
|
|
154
152
|
var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
155
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-tour": dataTour,
|
|
153
|
+
return (jsxRuntime.jsx("div", { id: id, className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsx("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
156
154
|
}
|
|
157
155
|
|
|
158
156
|
exports.Tab = Tab;
|
package/dist/components/Tab.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _ as __assign } from '../tslib.es6-5FtW-kfi.js';
|
|
1
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
3
|
import React from 'react';
|
|
3
4
|
import clsx from 'clsx';
|
|
@@ -7,7 +8,6 @@ import { B as Badge } from '../Badge-CGHosmYx.js';
|
|
|
7
8
|
import { D as Divider } from '../Divider-BQcBkzt1.js';
|
|
8
9
|
import { a as Link } from '../Link-BhJ5BdyS.js';
|
|
9
10
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
10
|
-
import '../tslib.es6-5FtW-kfi.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
12
12
|
import 'lodash/castArray';
|
|
13
13
|
import 'lodash/upperFirst';
|
|
@@ -23,134 +23,132 @@ import '../Tooltip-BYgzNVYI.js';
|
|
|
23
23
|
import '../Title-Dck3eHNM.js';
|
|
24
24
|
|
|
25
25
|
var tabAppearance = {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
accent: {
|
|
27
|
+
fill: 'accentPrimary',
|
|
28
|
+
fillHover: 'accentPrimaryHover',
|
|
29
|
+
labelColor: 'accentTextPrimary',
|
|
30
|
+
labelColorActive: 'accentTextPrimary',
|
|
29
31
|
dividerFillDisabled: 'accentDisabled',
|
|
30
|
-
dividerFillHover: 'surfaceTertiary',
|
|
31
|
-
fill: 'surfacePrimary',
|
|
32
32
|
fillDisabled: 'surfaceDisabled',
|
|
33
|
-
fillHover: 'surfaceTertiary',
|
|
34
|
-
labelColor: 'surfaceTextPrimary',
|
|
35
|
-
labelColorActive: 'surfaceTextAccent',
|
|
36
33
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
34
|
+
dividerFill: 'surfaceTertiary',
|
|
35
|
+
dividerFillActive: 'surfacePrimary',
|
|
36
|
+
dividerFillHover: 'surfaceTertiary',
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
primary: {
|
|
39
|
+
fill: 'primaryPrimary',
|
|
40
|
+
fillHover: 'primaryPrimaryHover',
|
|
41
|
+
labelColor: 'primaryTextPrimary',
|
|
42
|
+
labelColorActive: 'primaryTextPrimary',
|
|
43
|
+
dividerFillDisabled: 'accentDisabled',
|
|
44
|
+
fillDisabled: 'surfaceDisabled',
|
|
45
|
+
labelColorDisabled: 'surfaceTextDisabled',
|
|
39
46
|
dividerFill: 'surfaceTertiary',
|
|
40
47
|
dividerFillActive: 'accentPrimary',
|
|
48
|
+
dividerFillHover: 'surfaceTertiary',
|
|
49
|
+
},
|
|
50
|
+
secondary: {
|
|
51
|
+
fill: 'secondaryPrimary',
|
|
52
|
+
fillHover: 'secondaryPrimaryHover',
|
|
53
|
+
labelColor: 'secondaryTextPrimary',
|
|
54
|
+
labelColorActive: 'secondaryTextPrimary',
|
|
41
55
|
dividerFillDisabled: 'accentDisabled',
|
|
56
|
+
fillDisabled: 'surfaceDisabled',
|
|
57
|
+
labelColorDisabled: 'surfaceTextDisabled',
|
|
58
|
+
dividerFill: 'surfaceTertiary',
|
|
59
|
+
dividerFillActive: 'accentPrimary',
|
|
42
60
|
dividerFillHover: 'surfaceTertiary',
|
|
61
|
+
},
|
|
62
|
+
surfacePrimary: {
|
|
43
63
|
fill: 'surfacePrimary',
|
|
44
|
-
fillDisabled: 'surfaceDisabled',
|
|
45
64
|
fillHover: 'surfacePrimaryHover',
|
|
46
65
|
labelColor: 'surfaceTextPrimary',
|
|
47
66
|
labelColorActive: 'surfaceTextAccent',
|
|
67
|
+
dividerFillDisabled: 'accentDisabled',
|
|
68
|
+
fillDisabled: 'surfaceDisabled',
|
|
48
69
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
49
|
-
},
|
|
50
|
-
surfaceSecondary: {
|
|
51
70
|
dividerFill: 'surfaceTertiary',
|
|
52
71
|
dividerFillActive: 'accentPrimary',
|
|
53
|
-
dividerFillDisabled: 'accentDisabled',
|
|
54
72
|
dividerFillHover: 'surfaceTertiary',
|
|
73
|
+
},
|
|
74
|
+
surfaceSecondary: {
|
|
55
75
|
fill: 'surfaceSecondary',
|
|
56
|
-
fillDisabled: 'surfaceDisabled',
|
|
57
76
|
fillHover: 'surfaceSecondaryHover',
|
|
58
77
|
labelColor: 'surfaceTextPrimary',
|
|
59
78
|
labelColorActive: 'surfaceTextAccent',
|
|
79
|
+
dividerFillDisabled: 'accentDisabled',
|
|
80
|
+
fillDisabled: 'surfaceDisabled',
|
|
60
81
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
61
|
-
},
|
|
62
|
-
surfaceTertiary: {
|
|
63
82
|
dividerFill: 'surfaceTertiary',
|
|
64
83
|
dividerFillActive: 'accentPrimary',
|
|
65
|
-
dividerFillDisabled: 'accentDisabled',
|
|
66
84
|
dividerFillHover: 'surfaceTertiary',
|
|
85
|
+
},
|
|
86
|
+
surfaceTertiary: {
|
|
67
87
|
fill: 'surfaceTertiary',
|
|
68
|
-
fillDisabled: 'surfaceDisabled',
|
|
69
88
|
fillHover: 'surfaceTertiaryHover',
|
|
70
89
|
labelColor: 'surfaceTextPrimary',
|
|
71
90
|
labelColorActive: 'surfaceTextAccent',
|
|
91
|
+
dividerFillDisabled: 'accentDisabled',
|
|
92
|
+
fillDisabled: 'surfaceDisabled',
|
|
72
93
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
73
|
-
},
|
|
74
|
-
surfaceQuaternary: {
|
|
75
94
|
dividerFill: 'surfaceTertiary',
|
|
76
95
|
dividerFillActive: 'accentPrimary',
|
|
77
|
-
dividerFillDisabled: 'accentDisabled',
|
|
78
96
|
dividerFillHover: 'surfaceTertiary',
|
|
97
|
+
},
|
|
98
|
+
surfaceQuaternary: {
|
|
79
99
|
fill: 'surfaceQuaternary',
|
|
80
|
-
fillDisabled: 'surfaceDisabled',
|
|
81
100
|
fillHover: 'surfaceTertiaryHover',
|
|
82
101
|
labelColor: 'surfaceTextInverse',
|
|
83
102
|
labelColorActive: 'surfaceTextInverse',
|
|
84
|
-
labelColorDisabled: 'surfaceTextDisabled',
|
|
85
|
-
},
|
|
86
|
-
accent: {
|
|
87
|
-
dividerFill: 'surfaceTertiary',
|
|
88
|
-
dividerFillActive: 'surfacePrimary',
|
|
89
103
|
dividerFillDisabled: 'accentDisabled',
|
|
90
|
-
dividerFillHover: 'surfaceTertiary',
|
|
91
|
-
fill: 'accentPrimary',
|
|
92
104
|
fillDisabled: 'surfaceDisabled',
|
|
93
|
-
fillHover: 'accentPrimaryHover',
|
|
94
|
-
labelColor: 'accentTextPrimary',
|
|
95
|
-
labelColorActive: 'accentTextPrimary',
|
|
96
105
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
97
|
-
},
|
|
98
|
-
primary: {
|
|
99
106
|
dividerFill: 'surfaceTertiary',
|
|
100
107
|
dividerFillActive: 'accentPrimary',
|
|
101
|
-
dividerFillDisabled: 'accentDisabled',
|
|
102
108
|
dividerFillHover: 'surfaceTertiary',
|
|
103
|
-
|
|
109
|
+
},
|
|
110
|
+
any: {
|
|
111
|
+
fill: 'surfacePrimary',
|
|
112
|
+
fillHover: 'surfaceTertiary',
|
|
113
|
+
labelColor: 'surfaceTextPrimary',
|
|
114
|
+
labelColorActive: 'surfaceTextAccent',
|
|
115
|
+
dividerFillDisabled: 'accentDisabled',
|
|
104
116
|
fillDisabled: 'surfaceDisabled',
|
|
105
|
-
fillHover: 'primaryPrimaryHover',
|
|
106
|
-
labelColor: 'primaryTextPrimary',
|
|
107
|
-
labelColorActive: 'primaryTextPrimary',
|
|
108
117
|
labelColorDisabled: 'surfaceTextDisabled',
|
|
109
|
-
},
|
|
110
|
-
secondary: {
|
|
111
118
|
dividerFill: 'surfaceTertiary',
|
|
112
119
|
dividerFillActive: 'accentPrimary',
|
|
113
|
-
dividerFillDisabled: 'accentDisabled',
|
|
114
120
|
dividerFillHover: 'surfaceTertiary',
|
|
115
|
-
fill: 'secondaryPrimary',
|
|
116
|
-
fillDisabled: 'surfaceDisabled',
|
|
117
|
-
fillHover: 'secondaryPrimaryHover',
|
|
118
|
-
labelColor: 'secondaryTextPrimary',
|
|
119
|
-
labelColorActive: 'secondaryTextPrimary',
|
|
120
|
-
labelColorDisabled: 'surfaceTextDisabled',
|
|
121
121
|
},
|
|
122
122
|
};
|
|
123
123
|
|
|
124
124
|
var tabConfig = {
|
|
125
125
|
appearance: tabAppearance,
|
|
126
|
-
setAppearance: function (
|
|
127
|
-
tabConfig.appearance =
|
|
126
|
+
setAppearance: function (appearanceConfig) {
|
|
127
|
+
tabConfig.appearance = appearanceConfig;
|
|
128
128
|
},
|
|
129
129
|
};
|
|
130
130
|
function Tab(props) {
|
|
131
|
-
var
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, badgeValue = props.badgeValue, dataTour = props.dataTour, href = props.href, link = props.link, rel = props.rel, reset = props.reset, target = props.target, before = props.before, after = props.after, _a = props.isActive, isActive = _a === void 0 ? false : _a, _b = props.isDisabled, isDisabled = _b === void 0 ? false : _b, _c = props.isHover, isHover = _c === void 0 ? false : _c, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
132
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
133
|
+
var _a;
|
|
134
|
+
return (__assign(__assign({}, resultAppearance), (_a = tabConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
135
|
+
}, {});
|
|
134
136
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
135
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass,
|
|
137
|
+
var justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelColor = propsGenerator.labelColor, labelColorActive = propsGenerator.labelColorActive, labelTextAlign = propsGenerator.labelTextAlign, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextGradient = propsGenerator.labelTextGradient, labelTextSize = propsGenerator.labelTextSize, labelTextStyle = propsGenerator.labelTextStyle, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, dividerFillDisabled = propsGenerator.dividerFillDisabled, fillDisabledClass = propsGenerator.fillDisabledClass, labelColorDisabled = propsGenerator.labelColorDisabled, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerFillActive = propsGenerator.dividerFillActive, dividerFillActiveHover = propsGenerator.dividerFillActiveHover, dividerFillHover = propsGenerator.dividerFillHover, dividerSize = propsGenerator.dividerSize, linkFill = propsGenerator.linkFill, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, typeClass = propsGenerator.typeClass, widthClass = propsGenerator.widthClass;
|
|
136
138
|
// @ts-expect-error
|
|
137
139
|
var tab = useStyles(props).styles;
|
|
138
140
|
return (jsx("div", { className: clsx('tab', isActive && 'tab_state_active', isDisabled && 'tab_state_disabled', isHover && 'tab_state_hover', !isDisabled
|
|
139
141
|
? fillClass && "fill_".concat(fillClass)
|
|
140
|
-
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsx(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxs(React.Fragment, { children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [
|
|
141
|
-
? labelColorDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorDisabled)
|
|
142
|
-
: labelColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColor), textColorActive: isActive && (labelColorActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.labelColorActive)), children: label || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.label) })), (badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue)) && (jsx(Badge, { appearance: badgeAppearance || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeAppearance), shape: badgeShape, size: badgeSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeSize), textColor: badgeTextColor || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextColor), textSize: badgeTextSize || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeTextSize), value: badgeValue || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.badgeValue) }))] }), jsx(Divider, { width: "fill", fill: isDisabled
|
|
143
|
-
? dividerFillDisabled || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillDisabled)
|
|
144
|
-
: dividerFill || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFill), fillHover: isHover && (dividerFillHover || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillHover)), direction: dividerDirection, fillActive: isActive && (dividerFillActive || (appearanceConfig === null || appearanceConfig === void 0 ? void 0 : appearanceConfig.dividerFillActive)), fillActiveHover: dividerFillActiveHover, size: dividerSize })] })), after] }) }) }));
|
|
142
|
+
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, className, sizeClass && "tab_size_".concat(sizeClass), fillActiveClass && "fill_active_".concat(fillActiveClass), fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "tab_shape_".concat(shapeClass), typeClass && "tab_type_".concat(typeClass), widthClass && "width_".concat(widthClass), reset && 'tab-reset', set && "tab_set_".concat(set), justifyContentClass && "tab_justify-content_".concat(justifyContentClass), onClick && 'cursor_type_pointer'), "data-tour": dataTour, style: tab, onClick: onClick, onMouseEnter: onMouseEnter, children: jsx(Link, { className: clsx('tab__link', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), fill: linkFill, href: link || href, rel: rel, target: target, children: jsxs(React.Fragment, { children: [before, children || (jsxs(React.Fragment, { children: [jsxs("div", { className: "tab__wrapper", children: [label && (jsx(Text, { className: "tab__label", textAlign: labelTextAlign, textColor: isDisabled ? labelColorDisabled : labelColor, textColorActive: isActive && labelColorActive, textColorGradient: labelTextGradient, textColorHover: labelTextColorHover, textStyle: labelTextStyle, textWeight: labelTextWeight, textWrap: labelTextWrap, size: labelTextSize, children: label })), badgeValue && (jsx(Badge, { appearance: badgeAppearance, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, size: badgeSize, value: badgeValue }))] }), jsx(Divider, { width: "fill", direction: dividerDirection, fill: isDisabled ? dividerFillDisabled : dividerFill, fillActive: isActive && dividerFillActive, fillActiveHover: dividerFillActiveHover, fillHover: isHover && dividerFillHover, size: dividerSize })] })), after] }) }) }));
|
|
145
143
|
}
|
|
146
144
|
|
|
147
145
|
function TabGroup(props) {
|
|
148
|
-
var id = props.id,
|
|
146
|
+
var id = props.id, className = props.className, children = props.children, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, set = props.set;
|
|
149
147
|
var propsGenerator = useDevicePropsGenerator(props);
|
|
150
|
-
var
|
|
148
|
+
var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, contentAlignClass = propsGenerator.contentAlignClass, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
151
149
|
// @ts-expect-error
|
|
152
150
|
var _a = useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
|
|
153
|
-
return (jsx("div", { className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-tour": dataTour,
|
|
151
|
+
return (jsx("div", { id: id, className: clsx(className, 'tab-group', 'group', widthClass && "width_".concat(widthClass), contentAlignClass && "group_content-align_".concat(contentAlignClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), set && "group_set_".concat(set), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsx("div", { className: "tab-group__wrapper", style: groupWrapperStyles, children: children })) : (children) }));
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
export { Tab, TabGroup, tabAppearance, tabConfig };
|
|
@@ -116,9 +116,20 @@
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
:root {
|
|
119
|
-
--choice-item-
|
|
119
|
+
--choice-item-size-xs-padding: 1px 8px;
|
|
120
|
+
--choice-item-size-s-padding: 5px 10px;
|
|
121
|
+
--choice-item-size-m-padding: 7px 12px;
|
|
122
|
+
--choice-item-size-l-padding: 9px 15px;
|
|
123
|
+
--choice-item-size-xl-padding: 13px 20px;
|
|
124
|
+
--choice-item-size-xxl-padding: 17px 25px;
|
|
125
|
+
--choice-item-size-tiny-padding: 1px 8px;
|
|
126
|
+
--choice-item-size-compact-padding: 5px 10px;
|
|
127
|
+
--choice-item-size-normal-padding: 7px 12px;
|
|
128
|
+
--choice-item-size-large-padding: 9px 15px;
|
|
120
129
|
|
|
130
|
+
--choice-item-background-hover: var(--color-surface-secondary);
|
|
121
131
|
--choice-item-background-active: var(--color-surface-active);
|
|
122
|
-
|
|
123
132
|
--choice-border-color: var(--color-surface-border-tertiary);
|
|
133
|
+
|
|
134
|
+
--choice-item-icon-padding: 0;
|
|
124
135
|
}
|
|
@@ -10,8 +10,9 @@
|
|
|
10
10
|
--choice-item-size-normal-padding: 7px 12px;
|
|
11
11
|
--choice-item-size-large-padding: 9px 15px;
|
|
12
12
|
|
|
13
|
-
--choice-item-background-hover: var(--color-surface-
|
|
14
|
-
--choice-item-background-active: var(--color-surface-
|
|
13
|
+
--choice-item-background-hover: var(--color-surface-secondary);
|
|
14
|
+
--choice-item-background-active: var(--color-surface-active);
|
|
15
|
+
--choice-border-color: var(--color-surface-border-tertiary);
|
|
15
16
|
|
|
16
|
-
--choice-item-icon-padding:
|
|
17
|
+
--choice-item-icon-padding: 0;
|
|
17
18
|
}
|
|
@@ -1226,3 +1226,54 @@ h2.react-datepicker__current-month {
|
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
}
|
|
1229
|
+
:root {
|
|
1230
|
+
--input-container-padding: 9px 15px;
|
|
1231
|
+
|
|
1232
|
+
--date-picker-input-min-width: 220px;
|
|
1233
|
+
--date-picker-day-border-radius: 8px;
|
|
1234
|
+
|
|
1235
|
+
--date-picker-day-width: 35px;
|
|
1236
|
+
--date-picker-day-height: 35px;
|
|
1237
|
+
|
|
1238
|
+
--date-picker-name-size: 16px;
|
|
1239
|
+
|
|
1240
|
+
--date-picker-name-weight: 400;
|
|
1241
|
+
--date-picker-selected-weight: 400;
|
|
1242
|
+
|
|
1243
|
+
--date-picker-input-border-radius: 6px;
|
|
1244
|
+
|
|
1245
|
+
--date-picker-background: var(--color-surface-primary, #fff);
|
|
1246
|
+
--date-picker-padding: 24px 12px;
|
|
1247
|
+
--date-picker-box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.2);
|
|
1248
|
+
--date-picker-border-radius: 12px;
|
|
1249
|
+
--date-picker-border: 1px solid var(--color-surface-tertiary);
|
|
1250
|
+
|
|
1251
|
+
--date-picker-day-padding: 8px 0;
|
|
1252
|
+
--date-picker-day-hover-background: var(--color-accent-tertiary);
|
|
1253
|
+
--date-picker-day-hover-text-color: var(--color-surface-text-secondary);
|
|
1254
|
+
|
|
1255
|
+
--date-picker-day-range-background: var(--color-accent-tertiary);
|
|
1256
|
+
--date-picker-day-range-text-color: var(--color-accent-text-secondary);
|
|
1257
|
+
--date-picker-day-range-border-radius: 0;
|
|
1258
|
+
--date-picker-day-range-start-border-radius: 12px 0 0 12px;
|
|
1259
|
+
--date-picker-day-range-end-border-radius: 0 12px 12px 0;
|
|
1260
|
+
|
|
1261
|
+
--date-picker-day-today-background: var(--color-surface-secondary);
|
|
1262
|
+
--date-picker-day-today-border-radius: 12px;
|
|
1263
|
+
--date-picker-day-today-text-color: var(--color-surface-text-primary);
|
|
1264
|
+
|
|
1265
|
+
--date-picker-day-weekend-background: var(--color-surface-primary);
|
|
1266
|
+
--date-picker-day-weekend-text-color: var(--color-secondary-text-secondary);
|
|
1267
|
+
--date-picker-day-weekend-outside-text-color: var(
|
|
1268
|
+
--color-secondary-text-disabled
|
|
1269
|
+
);
|
|
1270
|
+
|
|
1271
|
+
--date-picker-day-selected-background: var(--color-accent-primary);
|
|
1272
|
+
--date-picker-day-selected-background-hover: var(
|
|
1273
|
+
--color-accent-primary-hover
|
|
1274
|
+
);
|
|
1275
|
+
--date-picker-day-selected-text-color: var(--color-accent-text-primary);
|
|
1276
|
+
|
|
1277
|
+
--date-picker-day-outside-background: var(--color-surface-primary);
|
|
1278
|
+
--date-picker-day-outside-text-color: var(--color-surface-text-quaternary);
|
|
1279
|
+
}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--input-container-padding: 9px 15px;
|
|
3
3
|
|
|
4
|
-
--date-picker-
|
|
4
|
+
--date-picker-input-min-width: 220px;
|
|
5
|
+
--date-picker-day-border-radius: 8px;
|
|
6
|
+
|
|
7
|
+
--date-picker-day-width: 35px;
|
|
8
|
+
--date-picker-day-height: 35px;
|
|
9
|
+
|
|
10
|
+
--date-picker-name-size: 16px;
|
|
11
|
+
|
|
5
12
|
--date-picker-name-weight: 400;
|
|
6
13
|
--date-picker-selected-weight: 400;
|
|
7
14
|
|
|
8
15
|
--date-picker-input-border-radius: 6px;
|
|
9
16
|
|
|
10
|
-
--date-picker-background: var(--color-surface-primary);
|
|
17
|
+
--date-picker-background: var(--color-surface-primary, #fff);
|
|
11
18
|
--date-picker-padding: 24px 12px;
|
|
12
19
|
--date-picker-box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.2);
|
|
13
20
|
--date-picker-border-radius: 12px;
|
|
14
21
|
--date-picker-border: 1px solid var(--color-surface-tertiary);
|
|
15
22
|
|
|
16
|
-
--date-picker-day-width: 40px;
|
|
17
|
-
--date-picker-day-height: 40px;
|
|
18
23
|
--date-picker-day-padding: 8px 0;
|
|
19
|
-
--date-picker-day-border-radius: 6px;
|
|
20
24
|
--date-picker-day-hover-background: var(--color-accent-tertiary);
|
|
21
25
|
--date-picker-day-hover-text-color: var(--color-surface-text-secondary);
|
|
22
26
|
|
|
@@ -32,10 +36,14 @@
|
|
|
32
36
|
|
|
33
37
|
--date-picker-day-weekend-background: var(--color-surface-primary);
|
|
34
38
|
--date-picker-day-weekend-text-color: var(--color-secondary-text-secondary);
|
|
35
|
-
--date-picker-day-weekend-outside-text-color: var(
|
|
39
|
+
--date-picker-day-weekend-outside-text-color: var(
|
|
40
|
+
--color-secondary-text-disabled
|
|
41
|
+
);
|
|
36
42
|
|
|
37
43
|
--date-picker-day-selected-background: var(--color-accent-primary);
|
|
38
|
-
--date-picker-day-selected-background-hover: var(
|
|
44
|
+
--date-picker-day-selected-background-hover: var(
|
|
45
|
+
--color-accent-primary-hover
|
|
46
|
+
);
|
|
39
47
|
--date-picker-day-selected-text-color: var(--color-accent-text-primary);
|
|
40
48
|
|
|
41
49
|
--date-picker-day-outside-background: var(--color-surface-primary);
|