@itcase/ui 1.3.32 → 1.3.33
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/{Button-DZ3z7f-A.js → Button-BtAUGGPc.js} +5 -5
- package/dist/{Button-D1m2MxZA.js → Button-HKkjJ38v.js} +5 -5
- package/dist/Group-Chtnas-J.js +40 -0
- package/dist/Group-DiMnEfge.js +36 -0
- package/dist/cjs/components/Accordion.js +12 -16
- package/dist/cjs/components/Button.js +1 -1
- package/dist/cjs/components/Cell.js +8 -4
- package/dist/cjs/components/CookiesWarning.js +2 -2
- package/dist/cjs/components/DatePicker.js +1 -1
- package/dist/cjs/components/Group.js +1 -1
- package/dist/cjs/components/Panel.js +1 -1
- package/dist/cjs/components/Response.js +2 -2
- package/dist/cjs/components/Select.js +1 -1
- package/dist/cjs/components/Tab.js +61 -63
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -0
- package/dist/components/Accordion.js +12 -16
- package/dist/components/Button.js +1 -1
- package/dist/components/Cell.js +8 -4
- package/dist/components/CookiesWarning.js +2 -2
- package/dist/components/DatePicker.js +1 -1
- package/dist/components/Group.js +1 -1
- package/dist/components/Panel.js +1 -1
- package/dist/components/Response.js +2 -2
- package/dist/components/Select.js +1 -1
- package/dist/components/Tab.js +61 -63
- package/dist/css/components/Accordion/Accordion.css +5 -8
- package/dist/css/components/Accordion/Accordion.tokens.css +2 -1
- 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/Chips/Chips.css +50 -36
- package/dist/css/components/Chips/Chips.tokens.css +35 -7
- 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 +35 -8
- package/dist/css/components/Select/Select.tokens.css +12 -17
- 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/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -0
- package/package.json +2 -2
- package/dist/Group-BKJmVwPZ.js +0 -34
- package/dist/Group-Bkz3RO18.js +0 -38
- package/dist/css/styles/column-gap/column-gap.css +0 -7
- package/dist/css/styles/row-gap/row-gap.css +0 -7
|
@@ -36,25 +36,27 @@ var accordionItemConfig = {
|
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
function AccordionItem(props) {
|
|
39
|
-
var id = props.id, children = props.children,
|
|
39
|
+
var id = props.id, className = props.className, appearance = props.appearance, children = props.children, title = props.title, titleTextColor = props.titleTextColor, titleTextSize = props.titleTextSize, titleTextWeight = props.titleTextWeight, afterContent = props.afterContent, beforeContent = props.beforeContent, content = props.content, contentTextColor = props.contentTextColor, contentTextSize = props.contentTextSize, contentTextWeight = props.contentTextWeight, dividerDirection = props.dividerDirection, dividerFill = props.dividerFill, dividerSize = props.dividerSize, icon = props.icon, _a = props.iconFill, iconFill = _a === void 0 ? 'surfaceItemAccent' : _a, showDivider = props.showDivider, size = props.size, isExpanded = props.isExpanded, onClick = props.onClick;
|
|
40
40
|
var onClickTitle = useCallback(function () {
|
|
41
41
|
// "!isExpanded" - is next state of expanded
|
|
42
42
|
var thisItemData = {
|
|
43
43
|
id: id,
|
|
44
|
-
isExpanded: !isExpanded,
|
|
45
|
-
content: content,
|
|
46
44
|
title: title,
|
|
45
|
+
content: content,
|
|
46
|
+
isExpanded: !isExpanded,
|
|
47
47
|
};
|
|
48
48
|
onClick && onClick(thisItemData);
|
|
49
49
|
}, [id, title, content, isExpanded, onClick]);
|
|
50
50
|
// @ts-expect-error
|
|
51
|
-
var appearanceConfig = accordionItemConfig.appearance &&
|
|
51
|
+
var appearanceConfig = accordionItemConfig.appearance &&
|
|
52
|
+
accordionItemConfig.appearance[appearance];
|
|
52
53
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
53
|
-
var
|
|
54
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, contentBorderColorClass = propsGenerator.contentBorderColorClass, contentFillClass = propsGenerator.contentFillClass, contentFillHoverClass = propsGenerator.contentFillHoverClass, shapeClass = propsGenerator.shapeClass;
|
|
54
55
|
// @ts-expect-error
|
|
55
56
|
var styles = useStyles(props).styles;
|
|
56
|
-
return (jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "accordion-item_shape_".concat(shapeClass), size && "accordion-item_size_".concat(size), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), 'cursor_type_pointer'),
|
|
57
|
-
(
|
|
57
|
+
return (jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "accordion-item_shape_".concat(shapeClass), size && "accordion-item_size_".concat(size), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), 'cursor_type_pointer'), textColor: titleTextColor, textWeight: titleTextWeight, size: titleTextSize, onClick: onClickTitle, children: title }), jsx("div", { className: clsx('accordion-item__icon', 'cursor_type_pointer'), onClick: onClickTitle, children: icon || (jsx(Icon, { iconFill: iconFill, size: "16", SvgImage: icon16.ChevronDown })) }), beforeContent && beforeContent, showDivider && (jsx(Divider, { width: "fill", direction: dividerDirection, fill: dividerFill || 'surfaceTertiary', size: dividerSize })), isExpanded && (jsx("div", { className: clsx('accordion-item__content', contentBorderColorClass &&
|
|
58
|
+
"border-color_".concat(contentBorderColorClass), contentFillClass && "fill_".concat(contentFillClass), contentFillHoverClass && "fill_hover_".concat(contentFillHoverClass)), children: children ||
|
|
59
|
+
(content && (jsx(Text, { textColor: contentTextColor, textWeight: contentTextWeight, size: contentTextSize, children: content }))) })), afterContent && afterContent] }));
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
var accordionConfig = {
|
|
@@ -64,7 +66,7 @@ var accordionConfig = {
|
|
|
64
66
|
},
|
|
65
67
|
};
|
|
66
68
|
function Accordion(props) {
|
|
67
|
-
var
|
|
69
|
+
var className = props.className, appearance = props.appearance, _a = props.initial, initial = _a === void 0 ? [] : _a, children = props.children, items = props.items, isMultiple = props.isMultiple, onClickItem = props.onClickItem;
|
|
68
70
|
var _b = useState(function () { return castArray(initial); }), expandedItems = _b[0], setExpandedItems = _b[1];
|
|
69
71
|
var onClickAccordionItem = useCallback(function (targetItem) {
|
|
70
72
|
setExpandedItems(function (prevState) {
|
|
@@ -92,7 +94,7 @@ function Accordion(props) {
|
|
|
92
94
|
}, [isMultiple, onClickItem]);
|
|
93
95
|
var accordionItemsList = useMemo(function () {
|
|
94
96
|
if (items) {
|
|
95
|
-
return items.map(function (item, i) { return (jsx(AccordionItem, {
|
|
97
|
+
return items.map(function (item, i) { return (jsx(AccordionItem, { id: item.id, title: item.title, content: item.content, isExpanded: expandedItems.includes(item.id), onClick: onClickAccordionItem }, "accordionItem_".concat(item.id || i + 1))); });
|
|
96
98
|
}
|
|
97
99
|
if (children) {
|
|
98
100
|
// @ts-ignore
|
|
@@ -110,15 +112,9 @@ function Accordion(props) {
|
|
|
110
112
|
}
|
|
111
113
|
return [];
|
|
112
114
|
}, [children, items, expandedItems, onClickAccordionItem]);
|
|
113
|
-
// @ts-expect-error
|
|
114
115
|
var appearanceConfig = accordionConfig.appearance && accordionConfig.appearance[appearance];
|
|
115
116
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
116
|
-
var
|
|
117
|
-
/*
|
|
118
|
-
* paddingHorizontalWrapper="16px"
|
|
119
|
-
* paddingHorizontal - styles (horizontal will be parsed to left/right)
|
|
120
|
-
* wrapper - target
|
|
121
|
-
*/
|
|
117
|
+
var directionClass = propsGenerator.directionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, shapeClass = propsGenerator.shapeClass, widthClass = propsGenerator.widthClass;
|
|
122
118
|
// @ts-expect-error
|
|
123
119
|
var _c = useStyles(props), accordionStyles = _c.styles, accordionWrapperStyles = _c.wrapper;
|
|
124
120
|
return (jsx("div", { className: clsx(className, 'accordion', borderColorClass && "border-color_".concat(borderColorClass), directionClass && "accordion_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), shapeClass && "accordion_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass)), style: accordionStyles, children: jsx("div", { className: "accordion__wrapper", style: accordionWrapperStyles, children: accordionItemsList }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-
|
|
1
|
+
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-BtAUGGPc.js';
|
|
2
2
|
import '../tslib.es6-5FtW-kfi.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
package/dist/components/Cell.js
CHANGED
|
@@ -32,15 +32,15 @@ var cellConfig = {
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
function Cell(props) {
|
|
35
|
-
var
|
|
35
|
+
var className = props.className, appearance = props.appearance, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize,
|
|
36
36
|
// titleLabelTextSize,
|
|
37
37
|
titleTag = props.titleTag, titleTextColor = props.titleTextColor,
|
|
38
38
|
// titleTextSize,
|
|
39
|
-
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
39
|
+
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, mode = props.mode, reverse = props.reverse, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
40
40
|
// valueLabelTextSize,
|
|
41
41
|
valueTag = props.valueTag, valueTextAlign = props.valueTextAlign, valueTextColor = props.valueTextColor,
|
|
42
42
|
// valueTextSize,
|
|
43
|
-
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
43
|
+
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, before = props.before, after = props.after, isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
44
44
|
// @ts-expect-error
|
|
45
45
|
var appearanceConfig = cellConfig.appearance && cellConfig.appearance[appearance];
|
|
46
46
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
@@ -54,7 +54,11 @@ function Cell(props) {
|
|
|
54
54
|
/* eslint-enable perfectionist/sort-objects */
|
|
55
55
|
// @ts-expect-error
|
|
56
56
|
var _b = useStyles(props), dataStyles = _b.data, cellStyles = _b.styles;
|
|
57
|
-
return (jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
57
|
+
return (jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
58
|
+
bgFillDisabledClass &&
|
|
59
|
+
"fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !(cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles.width) && "width_".concat(widthClass), zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap', reverse && 'cell_reverse'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsx("div", { className: "cell__before", children: before }), jsxs("div", { className: clsx('cell__wrapper', directionClass && "cell__wrapper_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), isActive && fillActiveClass && "fill_active_".concat(fillActiveClass), isDisabled &&
|
|
60
|
+
fillDisabledClass &&
|
|
61
|
+
"fill_disabled_".concat(fillDisabledClass), shapeClass && "cell__wrapper_shape_".concat(shapeClass), isEqual && 'cell__wrapper-equal'), children: [title && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__title", textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, size: titleTextSize, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsx(Icon, { className: "cell__icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), showTitleLabel && (jsx(Label, { appearance: titleLabelAppearance, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape, size: titleLabelSize }))] })), value && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__value", textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, size: valueTextSize, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsx(Icon, { className: "cell__icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), showValueLabel && (jsx(Label, { appearance: valueLabelAppearance, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape, size: valueLabelSize }))] }))] }), after && jsx("div", { className: "cell__after", children: after })] }));
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
export { Cell, cellAppearance, cellConfig };
|
|
@@ -3,8 +3,8 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { B as Button } from '../Button-
|
|
7
|
-
import { G as Group } from '../Group-
|
|
6
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
7
|
+
import { G as Group } from '../Group-DiMnEfge.js';
|
|
8
8
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
9
9
|
import '../tslib.es6-5FtW-kfi.js';
|
|
10
10
|
import 'lodash/camelCase';
|
|
@@ -6,7 +6,7 @@ import { ru } from 'date-fns/locale';
|
|
|
6
6
|
import DatePicker from 'react-datepicker';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from '../Button-
|
|
9
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
10
10
|
import { I as Icon } from '../Icon-htF_V35Y.js';
|
|
11
11
|
import { I as Input } from '../Input-COFdaiTe.js';
|
|
12
12
|
import { L as Label } from '../Label-Dpeq55TV.js';
|
package/dist/components/Group.js
CHANGED
package/dist/components/Panel.js
CHANGED
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
|
-
import { G as Group } from '../Group-
|
|
6
|
+
import { G as Group } from '../Group-DiMnEfge.js';
|
|
7
7
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
8
8
|
import '../tslib.es6-5FtW-kfi.js';
|
|
9
9
|
import 'lodash/camelCase';
|
|
@@ -5,8 +5,8 @@ import clsx from 'clsx';
|
|
|
5
5
|
import SVG from 'react-inlinesvg';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { B as Button } from '../Button-
|
|
9
|
-
import { G as Group } from '../Group-
|
|
8
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
9
|
+
import { G as Group } from '../Group-DiMnEfge.js';
|
|
10
10
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
12
12
|
import 'lodash/castArray';
|
|
@@ -8,7 +8,7 @@ import CreatableSelect from 'react-select/creatable';
|
|
|
8
8
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
9
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
10
10
|
import { B as Badge } from '../Badge-CGHosmYx.js';
|
|
11
|
-
import { G as Group } from '../Group-
|
|
11
|
+
import { G as Group } from '../Group-DiMnEfge.js';
|
|
12
12
|
import { D as Divider } from '../Divider-BQcBkzt1.js';
|
|
13
13
|
import 'react-inlinesvg';
|
|
14
14
|
import '../hooks/useStyles/useStyles.js';
|
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 };
|
|
@@ -46,16 +46,12 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
.accordion-item {
|
|
49
|
-
min-width: 170px;
|
|
50
49
|
display: flex;
|
|
51
50
|
flex-flow: row wrap;
|
|
52
51
|
align-items: center;
|
|
53
52
|
gap: 14px;
|
|
54
53
|
&__title {
|
|
55
54
|
flex: 1;
|
|
56
|
-
&.text {
|
|
57
|
-
padding: var(--accordion-item-padding, 0);
|
|
58
|
-
}
|
|
59
55
|
}
|
|
60
56
|
&__icon {
|
|
61
57
|
align-self: flex-start;
|
|
@@ -75,9 +71,9 @@
|
|
|
75
71
|
}
|
|
76
72
|
.accordion-item {
|
|
77
73
|
&_size {
|
|
78
|
-
@each $size in
|
|
74
|
+
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
79
75
|
&_$(size) {
|
|
80
|
-
padding: var(--accordion-item
|
|
76
|
+
padding: var(--accordion-item-$(size)-padding);
|
|
81
77
|
}
|
|
82
78
|
}
|
|
83
79
|
}
|
|
@@ -90,6 +86,7 @@
|
|
|
90
86
|
}
|
|
91
87
|
}
|
|
92
88
|
:root {
|
|
93
|
-
--accordion-item-
|
|
94
|
-
--accordion-item-
|
|
89
|
+
--accordion-item-shape-rounded: 12px;
|
|
90
|
+
--accordion-item-xs-padding: 10px 8px;
|
|
91
|
+
--accordion-item-l-padding: 14px 12px;
|
|
95
92
|
}
|
|
@@ -1,44 +1,20 @@
|
|
|
1
1
|
.chips {
|
|
2
2
|
display: inline-flex;
|
|
3
|
-
&__label {
|
|
4
|
-
white-space: var(--chips-label-white-space, nowrap);
|
|
5
|
-
}
|
|
6
3
|
&__inner {
|
|
7
4
|
display: flex;
|
|
8
5
|
align-items: center;
|
|
9
|
-
gap: 4px;
|
|
10
6
|
}
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
.chips {
|
|
14
|
-
|
|
15
|
-
&
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
&_s {
|
|
24
|
-
padding: var(--chips-size-s-padding, 2px 6px);
|
|
25
|
-
@mixin text-s;
|
|
26
|
-
}
|
|
27
|
-
&_m {
|
|
28
|
-
padding: var(--chips-size-m-padding, 2px 6px);
|
|
29
|
-
@mixin text-m;
|
|
30
|
-
}
|
|
31
|
-
&_l {
|
|
32
|
-
padding: var(--chips-size-l-padding, 2px 6px);
|
|
33
|
-
@mixin text-l;
|
|
34
|
-
}
|
|
35
|
-
&_xl {
|
|
36
|
-
padding: var(--chips-size-xl-padding, 2px 6px);
|
|
37
|
-
@mixin text-l;
|
|
38
|
-
}
|
|
39
|
-
&_xxl {
|
|
40
|
-
padding: var(--chips-size-xxl-padding, 6px 12px);
|
|
41
|
-
@mixin text-xxl;
|
|
10
|
+
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
11
|
+
&_size_$(size) {
|
|
12
|
+
^&__inner {
|
|
13
|
+
min-width: var(--chips-$(size)-min-width);
|
|
14
|
+
min-height: var(--chips-$(size)-min-height);
|
|
15
|
+
padding: var(--chips-$(size)-padding);
|
|
16
|
+
gap: var(--chips-$(size)-gap);
|
|
17
|
+
}
|
|
42
18
|
}
|
|
43
19
|
}
|
|
44
20
|
}
|
|
@@ -47,14 +23,52 @@
|
|
|
47
23
|
&_shape {
|
|
48
24
|
&_rounded {
|
|
49
25
|
border-radius: var(--chips-shape-rounded-default, 6px);
|
|
50
|
-
@each $size in
|
|
51
|
-
|
|
52
|
-
border-radius: var(--chips
|
|
26
|
+
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
27
|
+
&^^&_size_$(size) {
|
|
28
|
+
border-radius: var(--chips-$(size)-shape-rounded, 6px);
|
|
53
29
|
}
|
|
54
30
|
}
|
|
55
31
|
}
|
|
56
32
|
&_circular {
|
|
57
|
-
border-radius:
|
|
33
|
+
border-radius: 20px;
|
|
58
34
|
}
|
|
59
35
|
}
|
|
60
36
|
}
|
|
37
|
+
|
|
38
|
+
:root {
|
|
39
|
+
/* Size XXL */
|
|
40
|
+
--chips-xxl-gap: 0.5m;
|
|
41
|
+
--chips-xxl-padding: 2m 2m;
|
|
42
|
+
--chips-xxl-min-width: 48px;
|
|
43
|
+
--chips-xxl-min-height: 48px;
|
|
44
|
+
/* Size XL */
|
|
45
|
+
--chips-xl-gap: 0.5m;
|
|
46
|
+
--chips-xl-padding: 1m 1m;
|
|
47
|
+
--chips-xl-min-width: 40px;
|
|
48
|
+
--chips-xl-min-height: 40px;
|
|
49
|
+
/* Size L */
|
|
50
|
+
--chips-l-gap: 0.5m;
|
|
51
|
+
--chips-l-padding: 0.5m 0.5m;
|
|
52
|
+
--chips-l-min-width: 32px;
|
|
53
|
+
--chips-l-min-height: 32px;
|
|
54
|
+
/* Size M */
|
|
55
|
+
--chips-m-gap: 0.5m;
|
|
56
|
+
--chips-m-padding: 0.75m 1.25m;
|
|
57
|
+
--chips-m-min-width: 28px;
|
|
58
|
+
--chips-m-min-height: 28px;
|
|
59
|
+
/* Size S */
|
|
60
|
+
--chips-s-gap: 0.5m;
|
|
61
|
+
--chips-s-padding: 0.25m 0.5m;
|
|
62
|
+
--chips-s-min-width: 24px;
|
|
63
|
+
--chips-s-min-height: 24px;
|
|
64
|
+
/* Size XS */
|
|
65
|
+
--chips-xs-gap: 0.5m;
|
|
66
|
+
--chips-xs-padding: 0.5m 0.5m;
|
|
67
|
+
--chips-xs-min-width: 20px;
|
|
68
|
+
--chips-xs-min-height: 20px;
|
|
69
|
+
/* Size XXS */
|
|
70
|
+
--chips-xxs-gap: 0.5m;
|
|
71
|
+
--chips-xxs-padding: 0.25m 0.25m;
|
|
72
|
+
--chips-xxs-min-width: 16px;
|
|
73
|
+
--chips-xxs-min-height: 16px;
|
|
74
|
+
}
|