@itcase/ui 1.8.29 → 1.8.30
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/{ChipsGroup_cjs_Cm_pVx8z.js → ChipsGroup_cjs_DN9BoTKe.js} +1 -3
- package/dist/{ChipsGroup_es_CLpRB95W.js → ChipsGroup_es_D9aK8Roh.js} +1 -3
- package/dist/{DatePicker_cjs_0y_2FcnF.js → DatePicker_cjs_B_OWDm9X.js} +0 -3
- package/dist/{DatePicker_es_bY1aXemt.js → DatePicker_es_BCbmUdl0.js} +0 -3
- package/dist/cjs/components/Accordion.js +28 -12
- package/dist/cjs/components/Chips.js +1 -1
- package/dist/cjs/components/DatePeriod.js +11 -11
- package/dist/cjs/components/DatePicker.js +1 -1
- package/dist/components/Accordion.js +28 -12
- package/dist/components/Chips.js +1 -1
- package/dist/components/DatePeriod.js +11 -11
- package/dist/components/DatePicker.js +1 -1
- package/dist/css/components/Accordion/Accordion.css +27 -7
- package/dist/css/components/Badge/Badge.css +1 -1
- package/dist/types/components/Accordion/appearance/accordionSize.d.ts +7 -0
- package/dist/types/components/Accordion/appearance/accordionSurface.d.ts +11 -2
- package/dist/types/components/DatePeriod/appearance/datePeriodSize.d.ts +4 -2
- package/dist/types/components/DatePeriod/appearance/datePeriodSurface.d.ts +0 -2
- package/dist/types/components/DatePicker/DatePicker.appearance.d.ts +0 -2
- package/dist/types/components/DatePicker/appearance/datePickerSurface.d.ts +0 -2
- package/package.json +1 -1
|
@@ -150,9 +150,7 @@ function Chips(props) {
|
|
|
150
150
|
? fillClass && "fill_".concat(fillClass)
|
|
151
151
|
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
152
152
|
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
153
|
-
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: isActive &&
|
|
154
|
-
? labelTextHoverColor
|
|
155
|
-
: labelTextActiveHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
153
|
+
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
156
154
|
}
|
|
157
155
|
|
|
158
156
|
function ChipsGroup(props) {
|
|
@@ -148,9 +148,7 @@ function Chips(props) {
|
|
|
148
148
|
? fillClass && "fill_".concat(fillClass)
|
|
149
149
|
: fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
|
|
150
150
|
? fillHoverClass && "fill_hover_".concat(fillHoverClass)
|
|
151
|
-
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: isActive &&
|
|
152
|
-
? labelTextHoverColor
|
|
153
|
-
: labelTextActiveHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
151
|
+
: fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
|
|
154
152
|
}
|
|
155
153
|
|
|
156
154
|
function ChipsGroup(props) {
|
|
@@ -72,9 +72,6 @@ var datePickerAppearanceSurface = {
|
|
|
72
72
|
iconFillHover: 'surfaceSecondary',
|
|
73
73
|
iconItemFill: 'surfaceItemPrimary',
|
|
74
74
|
iconShape: 'circular',
|
|
75
|
-
iconItemFill: 'surfaceItemPrimary',
|
|
76
|
-
iconLeft: _default.icon14.ChevronLeft,
|
|
77
|
-
iconRight: _default.icon14.ChevronRight,
|
|
78
75
|
monthTextColor: 'surfaceTextPrimary',
|
|
79
76
|
monthTextWeight: 400,
|
|
80
77
|
placeholderTextColor: 'surfaceTextPrimary',
|
|
@@ -70,9 +70,6 @@ var datePickerAppearanceSurface = {
|
|
|
70
70
|
iconFillHover: 'surfaceSecondary',
|
|
71
71
|
iconItemFill: 'surfaceItemPrimary',
|
|
72
72
|
iconShape: 'circular',
|
|
73
|
-
iconItemFill: 'surfaceItemPrimary',
|
|
74
|
-
iconLeft: icon14.ChevronLeft,
|
|
75
|
-
iconRight: icon14.ChevronRight,
|
|
76
73
|
monthTextColor: 'surfaceTextPrimary',
|
|
77
74
|
monthTextWeight: 400,
|
|
78
75
|
placeholderTextColor: 'surfaceTextPrimary',
|
|
@@ -7,8 +7,8 @@ var clsx = require('clsx');
|
|
|
7
7
|
var castArray = require('lodash/castArray');
|
|
8
8
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
9
9
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
10
|
-
var Divider = require('../../Divider_cjs_BmCJj3TN.js');
|
|
11
10
|
var Tooltip = require('../../Tooltip_cjs_pBGCcXLZ.js');
|
|
11
|
+
var Divider = require('../../Divider_cjs_BmCJj3TN.js');
|
|
12
12
|
var Text = require('../../Text_cjs_C9fOm0nd.js');
|
|
13
13
|
var _default = require('@itcase/icons/default');
|
|
14
14
|
require('lodash/camelCase');
|
|
@@ -28,42 +28,49 @@ require('../../Link_cjs_DbRGq2Yk.js');
|
|
|
28
28
|
var accordionAppearanceSize = {
|
|
29
29
|
sizeXXL: {
|
|
30
30
|
size: 'xxl',
|
|
31
|
-
titleTextSize: '
|
|
31
|
+
titleTextSize: 'h3',
|
|
32
|
+
badgeAppearanceSize: 'sizeXS',
|
|
32
33
|
contentTextSize: 'xxl',
|
|
33
34
|
icon: _default.icon16.ChevronDown,
|
|
34
35
|
},
|
|
35
36
|
sizeXL: {
|
|
36
37
|
size: 'xl',
|
|
37
|
-
titleTextSize: '
|
|
38
|
+
titleTextSize: 'h3',
|
|
39
|
+
badgeAppearanceSize: 'sizeXS',
|
|
38
40
|
contentTextSize: 'l',
|
|
39
41
|
icon: _default.icon16.ChevronDown,
|
|
40
42
|
},
|
|
41
43
|
sizeL: {
|
|
42
44
|
size: 'l',
|
|
43
|
-
titleTextSize: '
|
|
45
|
+
titleTextSize: 'h4',
|
|
46
|
+
badgeAppearanceSize: 'sizeXS',
|
|
44
47
|
icon: _default.icon16.ChevronDown,
|
|
45
48
|
},
|
|
46
49
|
sizeM: {
|
|
47
50
|
size: 'm',
|
|
48
|
-
titleTextSize: '
|
|
51
|
+
titleTextSize: 'h5',
|
|
52
|
+
badgeAppearanceSize: 'sizeXS',
|
|
49
53
|
contentTextSize: 'm',
|
|
50
54
|
icon: _default.icon16.ChevronDown,
|
|
51
55
|
},
|
|
52
56
|
sizeS: {
|
|
53
57
|
size: 's',
|
|
54
|
-
titleTextSize: '
|
|
58
|
+
titleTextSize: 'h6',
|
|
59
|
+
badgeAppearanceSize: 'sizeXS',
|
|
55
60
|
contentTextSize: 's',
|
|
56
61
|
icon: _default.icon16.ChevronDown,
|
|
57
62
|
},
|
|
58
63
|
sizeXS: {
|
|
59
64
|
size: 'xs',
|
|
60
|
-
titleTextSize: '
|
|
65
|
+
titleTextSize: 'h6',
|
|
66
|
+
badgeAppearanceSize: 'sizeXS',
|
|
61
67
|
contentTextSize: 'xs',
|
|
62
68
|
icon: _default.icon16.ChevronDown,
|
|
63
69
|
},
|
|
64
70
|
sizeXXS: {
|
|
65
71
|
size: 'xxs',
|
|
66
|
-
titleTextSize: '
|
|
72
|
+
titleTextSize: 'h6',
|
|
73
|
+
badgeAppearanceSize: 'sizeXS',
|
|
67
74
|
contentTextSize: 'xs',
|
|
68
75
|
icon: _default.icon16.ChevronDown,
|
|
69
76
|
},
|
|
@@ -89,24 +96,33 @@ var accordionAppearanceSurface = {
|
|
|
89
96
|
fillHover: 'surfacePrimaryHover',
|
|
90
97
|
titleTextColor: 'surfaceTextPrimary',
|
|
91
98
|
labelTextColor: 'surfaceTextPrimary',
|
|
99
|
+
badgeAppearance: 'accentPrimary solid',
|
|
100
|
+
badgeShape: 'circular',
|
|
92
101
|
iconFillIcon: 'surfaceItemPrimary',
|
|
93
102
|
},
|
|
94
103
|
surfaceSecondary: {
|
|
95
104
|
fill: 'surfaceSecondary',
|
|
96
105
|
fillHover: 'surfaceSecondaryHover',
|
|
97
106
|
labelTextColor: 'surfaceTextPrimary',
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
badgeAppearance: 'accentPrimary solid',
|
|
108
|
+
badgeShape: 'circular',
|
|
109
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
100
110
|
},
|
|
101
111
|
surfaceTertiary: {
|
|
102
112
|
fill: 'surfaceTertiary',
|
|
103
113
|
fillHover: 'surfaceTertiaryHover',
|
|
104
114
|
labelTextColor: 'surfaceTextPrimary',
|
|
115
|
+
badgeAppearance: 'accentPrimary solid',
|
|
116
|
+
badgeShape: 'circular',
|
|
117
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
105
118
|
},
|
|
106
119
|
surfaceQuaternary: {
|
|
107
120
|
fill: 'surfaceQuaternary',
|
|
108
121
|
fillHover: 'surfaceQuaternaryHover',
|
|
109
122
|
labelTextColor: 'surfaceTextPrimary',
|
|
123
|
+
badgeAppearance: 'accentPrimary solid',
|
|
124
|
+
badgeShape: 'circular',
|
|
125
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
110
126
|
},
|
|
111
127
|
};
|
|
112
128
|
|
|
@@ -135,10 +151,10 @@ function AccordionItem(props) {
|
|
|
135
151
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = accordionItemConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
136
152
|
}, {});
|
|
137
153
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
138
|
-
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight,
|
|
154
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight, titleWidthClass = propsGenerator.titleWidthClass, borderColorClass = propsGenerator.borderColorClass, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, contentTextColor = propsGenerator.contentTextColor, contentTextSize = propsGenerator.contentTextSize, contentTextWeight = propsGenerator.contentTextWeight, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, shapeClass = propsGenerator.shapeClass, showDivider = propsGenerator.showDivider, sizeClass = propsGenerator.sizeClass, zeroGap = propsGenerator.zeroGap, zeroPadding = propsGenerator.zeroPadding;
|
|
139
155
|
// @ts-expect-error
|
|
140
156
|
var styles = useStyles.useStyles(props).styles;
|
|
141
|
-
return (jsxRuntime.jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), shapeClass && "accordion-item_shape_".concat(shapeClass), sizeClass && "accordion-item_size_".concat(sizeClass), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxRuntime.jsxs("div", { className: clsx('accordion-item__header', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [jsxRuntime.jsx(Text.Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), titleWidthClass && "width_".concat(titleWidthClass), onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), (icon || iconSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))
|
|
157
|
+
return (jsxRuntime.jsxs("div", { className: clsx('accordion-item', className, zeroPadding && 'accordion-item_zero-padding', zeroGap && 'accordion-item_zero-gap', borderColorClass && "border-color_".concat(borderColorClass), shapeClass && "accordion-item_shape_".concat(shapeClass), sizeClass && "accordion-item_size_".concat(sizeClass), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxRuntime.jsxs("div", { className: clsx('accordion-item__header', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [jsxRuntime.jsx(Text.Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), titleWidthClass && "width_".concat(titleWidthClass), onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), jsxRuntime.jsxs("div", { className: "accordion-item__action", children: [badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "accordion-item__badge", appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))] }), showDivider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", direction: dividerDirection, size: dividerSize, fill: dividerFill || 'surfaceTertiary' }))] }), beforeContent, isExpanded && (jsxRuntime.jsxs("div", { className: clsx('accordion-item__content'), children: [content && (jsxRuntime.jsx("div", { className: clsx('accordion-item__content-inner', fillClass && "fill_".concat(fillClass)), children: jsxRuntime.jsx(Text.Text, { size: contentTextSize, textColor: contentTextColor, textWeight: contentTextWeight, children: content }) })), children] })), afterContent] }));
|
|
142
158
|
}
|
|
143
159
|
|
|
144
160
|
function Accordion(props) {
|
|
@@ -6,9 +6,9 @@ var React = require('react');
|
|
|
6
6
|
var clsx = require('clsx');
|
|
7
7
|
var luxon = require('luxon');
|
|
8
8
|
var common = require('@itcase/common');
|
|
9
|
-
var DatePicker = require('../../
|
|
9
|
+
var DatePicker = require('../../DatePicker_cjs_B_OWDm9X.js');
|
|
10
10
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
11
|
-
var ChipsGroup = require('../../
|
|
11
|
+
var ChipsGroup = require('../../ChipsGroup_cjs_DN9BoTKe.js');
|
|
12
12
|
require('date-fns/locale');
|
|
13
13
|
require('react-datepicker');
|
|
14
14
|
require('../hooks/useStyles/useStyles.js');
|
|
@@ -36,13 +36,15 @@ require('lodash/castArray');
|
|
|
36
36
|
var datePeriodAppearanceSize = {
|
|
37
37
|
sizeL: {
|
|
38
38
|
size: 'm',
|
|
39
|
-
|
|
39
|
+
chipsAppearanceSize: 'sizeL',
|
|
40
|
+
datePickerAppearanceSize: 'sizeM',
|
|
40
41
|
datePickerInputSize: 'l',
|
|
41
42
|
datePickerInputTextSize: 'm',
|
|
42
43
|
},
|
|
43
44
|
sizeM: {
|
|
44
45
|
size: 'm',
|
|
45
|
-
|
|
46
|
+
chipsAppearanceSize: 'sizeL',
|
|
47
|
+
datePickerAppearanceSize: 'sizeM',
|
|
46
48
|
datePickerInputSize: 'm',
|
|
47
49
|
datePickerInputTextSize: 'm',
|
|
48
50
|
},
|
|
@@ -51,20 +53,18 @@ var datePeriodAppearanceSize = {
|
|
|
51
53
|
var datePeriodAppearanceSurface = {
|
|
52
54
|
surfacePrimary: {
|
|
53
55
|
fill: 'surfacePrimary',
|
|
54
|
-
chipsAppearance: 'surfacePrimary
|
|
56
|
+
chipsAppearance: 'surfacePrimary ghost',
|
|
55
57
|
chipsShape: 'rounded',
|
|
56
58
|
datePickerAppearance: 'surfacePrimary',
|
|
57
59
|
datePickerInputAppearance: 'defaultPrimary',
|
|
58
|
-
datePickerInputFillHover: 'surfaceHover',
|
|
59
60
|
shape: 'rounded',
|
|
60
61
|
},
|
|
61
62
|
surfaceSecondary: {
|
|
62
63
|
fill: 'surfaceSecondary',
|
|
63
|
-
chipsAppearance: 'surfacePrimary
|
|
64
|
+
chipsAppearance: 'surfacePrimary ghost',
|
|
64
65
|
chipsShape: 'rounded',
|
|
65
66
|
datePickerAppearance: 'surfacePrimary',
|
|
66
67
|
datePickerInputAppearance: 'defaultPrimary',
|
|
67
|
-
datePickerInputFillHover: 'surfaceHover',
|
|
68
68
|
shape: 'rounded',
|
|
69
69
|
},
|
|
70
70
|
};
|
|
@@ -84,7 +84,7 @@ function DatePeriod(props) {
|
|
|
84
84
|
return (tslib_es6.__assign(tslib_es6.__assign({}, resultConfig), (_a = datePeriodConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
85
85
|
}, {});
|
|
86
86
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
87
|
-
var _b = propsGenerator, fillClass = _b.fillClass, chipsAppearance = _b.chipsAppearance, chipsShape = _b.chipsShape, datePickerAppearance = _b.datePickerAppearance, datePickerInputAppearance = _b.datePickerInputAppearance, datePickerInputFillHover = _b.datePickerInputFillHover, datePickerInputSize = _b.datePickerInputSize, datePickerInputTextSize = _b.datePickerInputTextSize, shapeClass = _b.shapeClass, sizeClass = _b.sizeClass;
|
|
87
|
+
var _b = propsGenerator, fillClass = _b.fillClass, chipsAppearance = _b.chipsAppearance, chipsAppearanceSize = _b.chipsAppearanceSize, chipsShape = _b.chipsShape, datePickerAppearance = _b.datePickerAppearance, datePickerAppearanceSize = _b.datePickerAppearanceSize, datePickerInputAppearance = _b.datePickerInputAppearance, datePickerInputFillHover = _b.datePickerInputFillHover, datePickerInputSize = _b.datePickerInputSize, datePickerInputTextSize = _b.datePickerInputTextSize, shapeClass = _b.shapeClass, sizeClass = _b.sizeClass;
|
|
88
88
|
var onClickPeriodChips = React.useCallback(function (selectedPeriodItem) {
|
|
89
89
|
var dateStartIso = selectedPeriodItem.dateIntervalsList[0];
|
|
90
90
|
var dateEndIso = selectedPeriodItem.dateIntervalsList[1];
|
|
@@ -107,8 +107,8 @@ function DatePeriod(props) {
|
|
|
107
107
|
return (dateStartIso === datePeriodValueStart &&
|
|
108
108
|
dateEndIso === datePeriodValueEnd);
|
|
109
109
|
}, [datePeriodValueEnd, datePeriodValueStart]);
|
|
110
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: chipsAppearance, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsxRuntime.jsx(DatePicker.DatePickerInput, { datePickerProps: {
|
|
111
|
-
appearance: datePickerAppearance,
|
|
110
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: "".concat(chipsAppearance, " ").concat(chipsAppearanceSize), label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsxRuntime.jsx(DatePicker.DatePickerInput, { datePickerProps: {
|
|
111
|
+
appearance: "".concat(datePickerAppearance, " ").concat(datePickerAppearanceSize),
|
|
112
112
|
dateFormat: 'dd/MM/yyyy',
|
|
113
113
|
selectsRange: true,
|
|
114
114
|
showWeekNumbers: true,
|
|
@@ -5,8 +5,8 @@ import clsx from 'clsx';
|
|
|
5
5
|
import castArray from 'lodash/castArray';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
+
import { B as Badge, I as Icon } from '../Tooltip_es_frBCZDrO.js';
|
|
8
9
|
import { D as Divider } from '../Divider_es_kY-30pft.js';
|
|
9
|
-
import { I as Icon } from '../Tooltip_es_frBCZDrO.js';
|
|
10
10
|
import { T as Text } from '../Text_es_BfLRfj-5.js';
|
|
11
11
|
import { icon16 } from '@itcase/icons/default';
|
|
12
12
|
import 'lodash/camelCase';
|
|
@@ -26,42 +26,49 @@ import '../Link_es_DxtZLeKY.js';
|
|
|
26
26
|
var accordionAppearanceSize = {
|
|
27
27
|
sizeXXL: {
|
|
28
28
|
size: 'xxl',
|
|
29
|
-
titleTextSize: '
|
|
29
|
+
titleTextSize: 'h3',
|
|
30
|
+
badgeAppearanceSize: 'sizeXS',
|
|
30
31
|
contentTextSize: 'xxl',
|
|
31
32
|
icon: icon16.ChevronDown,
|
|
32
33
|
},
|
|
33
34
|
sizeXL: {
|
|
34
35
|
size: 'xl',
|
|
35
|
-
titleTextSize: '
|
|
36
|
+
titleTextSize: 'h3',
|
|
37
|
+
badgeAppearanceSize: 'sizeXS',
|
|
36
38
|
contentTextSize: 'l',
|
|
37
39
|
icon: icon16.ChevronDown,
|
|
38
40
|
},
|
|
39
41
|
sizeL: {
|
|
40
42
|
size: 'l',
|
|
41
|
-
titleTextSize: '
|
|
43
|
+
titleTextSize: 'h4',
|
|
44
|
+
badgeAppearanceSize: 'sizeXS',
|
|
42
45
|
icon: icon16.ChevronDown,
|
|
43
46
|
},
|
|
44
47
|
sizeM: {
|
|
45
48
|
size: 'm',
|
|
46
|
-
titleTextSize: '
|
|
49
|
+
titleTextSize: 'h5',
|
|
50
|
+
badgeAppearanceSize: 'sizeXS',
|
|
47
51
|
contentTextSize: 'm',
|
|
48
52
|
icon: icon16.ChevronDown,
|
|
49
53
|
},
|
|
50
54
|
sizeS: {
|
|
51
55
|
size: 's',
|
|
52
|
-
titleTextSize: '
|
|
56
|
+
titleTextSize: 'h6',
|
|
57
|
+
badgeAppearanceSize: 'sizeXS',
|
|
53
58
|
contentTextSize: 's',
|
|
54
59
|
icon: icon16.ChevronDown,
|
|
55
60
|
},
|
|
56
61
|
sizeXS: {
|
|
57
62
|
size: 'xs',
|
|
58
|
-
titleTextSize: '
|
|
63
|
+
titleTextSize: 'h6',
|
|
64
|
+
badgeAppearanceSize: 'sizeXS',
|
|
59
65
|
contentTextSize: 'xs',
|
|
60
66
|
icon: icon16.ChevronDown,
|
|
61
67
|
},
|
|
62
68
|
sizeXXS: {
|
|
63
69
|
size: 'xxs',
|
|
64
|
-
titleTextSize: '
|
|
70
|
+
titleTextSize: 'h6',
|
|
71
|
+
badgeAppearanceSize: 'sizeXS',
|
|
65
72
|
contentTextSize: 'xs',
|
|
66
73
|
icon: icon16.ChevronDown,
|
|
67
74
|
},
|
|
@@ -87,24 +94,33 @@ var accordionAppearanceSurface = {
|
|
|
87
94
|
fillHover: 'surfacePrimaryHover',
|
|
88
95
|
titleTextColor: 'surfaceTextPrimary',
|
|
89
96
|
labelTextColor: 'surfaceTextPrimary',
|
|
97
|
+
badgeAppearance: 'accentPrimary solid',
|
|
98
|
+
badgeShape: 'circular',
|
|
90
99
|
iconFillIcon: 'surfaceItemPrimary',
|
|
91
100
|
},
|
|
92
101
|
surfaceSecondary: {
|
|
93
102
|
fill: 'surfaceSecondary',
|
|
94
103
|
fillHover: 'surfaceSecondaryHover',
|
|
95
104
|
labelTextColor: 'surfaceTextPrimary',
|
|
96
|
-
|
|
97
|
-
|
|
105
|
+
badgeAppearance: 'accentPrimary solid',
|
|
106
|
+
badgeShape: 'circular',
|
|
107
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
98
108
|
},
|
|
99
109
|
surfaceTertiary: {
|
|
100
110
|
fill: 'surfaceTertiary',
|
|
101
111
|
fillHover: 'surfaceTertiaryHover',
|
|
102
112
|
labelTextColor: 'surfaceTextPrimary',
|
|
113
|
+
badgeAppearance: 'accentPrimary solid',
|
|
114
|
+
badgeShape: 'circular',
|
|
115
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
103
116
|
},
|
|
104
117
|
surfaceQuaternary: {
|
|
105
118
|
fill: 'surfaceQuaternary',
|
|
106
119
|
fillHover: 'surfaceQuaternaryHover',
|
|
107
120
|
labelTextColor: 'surfaceTextPrimary',
|
|
121
|
+
badgeAppearance: 'accentPrimary solid',
|
|
122
|
+
badgeShape: 'circular',
|
|
123
|
+
iconFillIcon: 'surfaceItemPrimary',
|
|
108
124
|
},
|
|
109
125
|
};
|
|
110
126
|
|
|
@@ -133,10 +149,10 @@ function AccordionItem(props) {
|
|
|
133
149
|
return (__assign(__assign({}, resultConfig), (_a = accordionItemConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
134
150
|
}, {});
|
|
135
151
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
136
|
-
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight,
|
|
152
|
+
var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight, titleWidthClass = propsGenerator.titleWidthClass, borderColorClass = propsGenerator.borderColorClass, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, contentTextColor = propsGenerator.contentTextColor, contentTextSize = propsGenerator.contentTextSize, contentTextWeight = propsGenerator.contentTextWeight, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, shapeClass = propsGenerator.shapeClass, showDivider = propsGenerator.showDivider, sizeClass = propsGenerator.sizeClass, zeroGap = propsGenerator.zeroGap, zeroPadding = propsGenerator.zeroPadding;
|
|
137
153
|
// @ts-expect-error
|
|
138
154
|
var styles = useStyles(props).styles;
|
|
139
|
-
return (jsxs("div", { className: clsx('accordion-item', className, borderColorClass && "border-color_".concat(borderColorClass), shapeClass && "accordion-item_shape_".concat(shapeClass), sizeClass && "accordion-item_size_".concat(sizeClass), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxs("div", { className: clsx('accordion-item__header', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), titleWidthClass && "width_".concat(titleWidthClass), onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), (icon || iconSrc) && (jsx(Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))
|
|
155
|
+
return (jsxs("div", { className: clsx('accordion-item', className, zeroPadding && 'accordion-item_zero-padding', zeroGap && 'accordion-item_zero-gap', borderColorClass && "border-color_".concat(borderColorClass), shapeClass && "accordion-item_shape_".concat(shapeClass), sizeClass && "accordion-item_size_".concat(sizeClass), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxs("div", { className: clsx('accordion-item__header', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [jsx(Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), titleWidthClass && "width_".concat(titleWidthClass), onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), jsxs("div", { className: "accordion-item__action", children: [badgeValue && (jsx(Badge, { className: "accordion-item__badge", appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsx(Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))] }), showDivider && (jsx(Divider, { width: "fill", direction: dividerDirection, size: dividerSize, fill: dividerFill || 'surfaceTertiary' }))] }), beforeContent, isExpanded && (jsxs("div", { className: clsx('accordion-item__content'), children: [content && (jsx("div", { className: clsx('accordion-item__content-inner', fillClass && "fill_".concat(fillClass)), children: jsx(Text, { size: contentTextSize, textColor: contentTextColor, textWeight: contentTextWeight, children: content }) })), children] })), afterContent] }));
|
|
140
156
|
}
|
|
141
157
|
|
|
142
158
|
function Accordion(props) {
|
package/dist/components/Chips.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as Chips, b as ChipsGroup, a as chipsAppearance, c as chipsConfig } from '../
|
|
1
|
+
export { C as Chips, b as ChipsGroup, a as chipsAppearance, c as chipsConfig } from '../ChipsGroup_es_D9aK8Roh.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -4,9 +4,9 @@ import { useCallback } from 'react';
|
|
|
4
4
|
import clsx from 'clsx';
|
|
5
5
|
import { DateTime } from 'luxon';
|
|
6
6
|
import { DATE_PERIOD_INTERVALS } from '@itcase/common';
|
|
7
|
-
import { D as DatePickerInput } from '../
|
|
7
|
+
import { D as DatePickerInput } from '../DatePicker_es_BCbmUdl0.js';
|
|
8
8
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
9
|
-
import { b as ChipsGroup, C as Chips } from '../
|
|
9
|
+
import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_D9aK8Roh.js';
|
|
10
10
|
import 'date-fns/locale';
|
|
11
11
|
import 'react-datepicker';
|
|
12
12
|
import '../hooks/useStyles/useStyles.js';
|
|
@@ -34,13 +34,15 @@ import 'lodash/castArray';
|
|
|
34
34
|
var datePeriodAppearanceSize = {
|
|
35
35
|
sizeL: {
|
|
36
36
|
size: 'm',
|
|
37
|
-
|
|
37
|
+
chipsAppearanceSize: 'sizeL',
|
|
38
|
+
datePickerAppearanceSize: 'sizeM',
|
|
38
39
|
datePickerInputSize: 'l',
|
|
39
40
|
datePickerInputTextSize: 'm',
|
|
40
41
|
},
|
|
41
42
|
sizeM: {
|
|
42
43
|
size: 'm',
|
|
43
|
-
|
|
44
|
+
chipsAppearanceSize: 'sizeL',
|
|
45
|
+
datePickerAppearanceSize: 'sizeM',
|
|
44
46
|
datePickerInputSize: 'm',
|
|
45
47
|
datePickerInputTextSize: 'm',
|
|
46
48
|
},
|
|
@@ -49,20 +51,18 @@ var datePeriodAppearanceSize = {
|
|
|
49
51
|
var datePeriodAppearanceSurface = {
|
|
50
52
|
surfacePrimary: {
|
|
51
53
|
fill: 'surfacePrimary',
|
|
52
|
-
chipsAppearance: 'surfacePrimary
|
|
54
|
+
chipsAppearance: 'surfacePrimary ghost',
|
|
53
55
|
chipsShape: 'rounded',
|
|
54
56
|
datePickerAppearance: 'surfacePrimary',
|
|
55
57
|
datePickerInputAppearance: 'defaultPrimary',
|
|
56
|
-
datePickerInputFillHover: 'surfaceHover',
|
|
57
58
|
shape: 'rounded',
|
|
58
59
|
},
|
|
59
60
|
surfaceSecondary: {
|
|
60
61
|
fill: 'surfaceSecondary',
|
|
61
|
-
chipsAppearance: 'surfacePrimary
|
|
62
|
+
chipsAppearance: 'surfacePrimary ghost',
|
|
62
63
|
chipsShape: 'rounded',
|
|
63
64
|
datePickerAppearance: 'surfacePrimary',
|
|
64
65
|
datePickerInputAppearance: 'defaultPrimary',
|
|
65
|
-
datePickerInputFillHover: 'surfaceHover',
|
|
66
66
|
shape: 'rounded',
|
|
67
67
|
},
|
|
68
68
|
};
|
|
@@ -82,7 +82,7 @@ function DatePeriod(props) {
|
|
|
82
82
|
return (__assign(__assign({}, resultConfig), (_a = datePeriodConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
83
83
|
}, {});
|
|
84
84
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
85
|
-
var _b = propsGenerator, fillClass = _b.fillClass, chipsAppearance = _b.chipsAppearance, chipsShape = _b.chipsShape, datePickerAppearance = _b.datePickerAppearance, datePickerInputAppearance = _b.datePickerInputAppearance, datePickerInputFillHover = _b.datePickerInputFillHover, datePickerInputSize = _b.datePickerInputSize, datePickerInputTextSize = _b.datePickerInputTextSize, shapeClass = _b.shapeClass, sizeClass = _b.sizeClass;
|
|
85
|
+
var _b = propsGenerator, fillClass = _b.fillClass, chipsAppearance = _b.chipsAppearance, chipsAppearanceSize = _b.chipsAppearanceSize, chipsShape = _b.chipsShape, datePickerAppearance = _b.datePickerAppearance, datePickerAppearanceSize = _b.datePickerAppearanceSize, datePickerInputAppearance = _b.datePickerInputAppearance, datePickerInputFillHover = _b.datePickerInputFillHover, datePickerInputSize = _b.datePickerInputSize, datePickerInputTextSize = _b.datePickerInputTextSize, shapeClass = _b.shapeClass, sizeClass = _b.sizeClass;
|
|
86
86
|
var onClickPeriodChips = useCallback(function (selectedPeriodItem) {
|
|
87
87
|
var dateStartIso = selectedPeriodItem.dateIntervalsList[0];
|
|
88
88
|
var dateEndIso = selectedPeriodItem.dateIntervalsList[1];
|
|
@@ -105,8 +105,8 @@ function DatePeriod(props) {
|
|
|
105
105
|
return (dateStartIso === datePeriodValueStart &&
|
|
106
106
|
dateEndIso === datePeriodValueEnd);
|
|
107
107
|
}, [datePeriodValueEnd, datePeriodValueStart]);
|
|
108
|
-
return (jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsx(Chips, { appearance: chipsAppearance, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsx(DatePickerInput, { datePickerProps: {
|
|
109
|
-
appearance: datePickerAppearance,
|
|
108
|
+
return (jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsx(Chips, { appearance: "".concat(chipsAppearance, " ").concat(chipsAppearanceSize), label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsx(DatePickerInput, { datePickerProps: {
|
|
109
|
+
appearance: "".concat(datePickerAppearance, " ").concat(datePickerAppearanceSize),
|
|
110
110
|
dateFormat: 'dd/MM/yyyy',
|
|
111
111
|
selectsRange: true,
|
|
112
112
|
showWeekNumbers: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../
|
|
1
|
+
export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_BCbmUdl0.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -42,6 +42,18 @@
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
+
.accordion-item {
|
|
46
|
+
&&_zero-padding {
|
|
47
|
+
^&__header {
|
|
48
|
+
padding: 0;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
&&_zero-gap {
|
|
52
|
+
^&__wrapper {
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
45
57
|
.accordion-item {
|
|
46
58
|
width: 100%;
|
|
47
59
|
display: flex;
|
|
@@ -50,14 +62,22 @@
|
|
|
50
62
|
&__header {
|
|
51
63
|
width: 100%;
|
|
52
64
|
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
^&__title {
|
|
67
|
+
position: relative;
|
|
68
|
+
}
|
|
53
69
|
}
|
|
54
|
-
&
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
70
|
+
&__action {
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 12px;
|
|
73
|
+
^&__badge {
|
|
74
|
+
position: relative;
|
|
75
|
+
}
|
|
76
|
+
^&__icon {
|
|
77
|
+
align-self: flex-start;
|
|
78
|
+
transform-origin: 50% 50%;
|
|
79
|
+
transition: all 0.6s cubic-bezier(0.19, 1, 0.22, 1);
|
|
80
|
+
}
|
|
61
81
|
}
|
|
62
82
|
&__content {
|
|
63
83
|
width: 100%;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
--badge-type-icon-size-s-max-width: 20px;
|
|
123
123
|
--badge-type-icon-size-s-max-height: 20px;
|
|
124
124
|
|
|
125
|
-
--badge-size-xs-padding: 0
|
|
125
|
+
--badge-size-xs-padding: 0;
|
|
126
126
|
--badge-size-xs-min-width: 16px;
|
|
127
127
|
--badge-size-xs-min-height: 16px;
|
|
128
128
|
--badge-size-xs-gap: 2px;
|
|
@@ -2,41 +2,48 @@ declare const accordionAppearanceSize: {
|
|
|
2
2
|
sizeXXL: {
|
|
3
3
|
size: string;
|
|
4
4
|
titleTextSize: string;
|
|
5
|
+
badgeAppearanceSize: string;
|
|
5
6
|
contentTextSize: string;
|
|
6
7
|
icon: string;
|
|
7
8
|
};
|
|
8
9
|
sizeXL: {
|
|
9
10
|
size: string;
|
|
10
11
|
titleTextSize: string;
|
|
12
|
+
badgeAppearanceSize: string;
|
|
11
13
|
contentTextSize: string;
|
|
12
14
|
icon: string;
|
|
13
15
|
};
|
|
14
16
|
sizeL: {
|
|
15
17
|
size: string;
|
|
16
18
|
titleTextSize: string;
|
|
19
|
+
badgeAppearanceSize: string;
|
|
17
20
|
icon: string;
|
|
18
21
|
};
|
|
19
22
|
sizeM: {
|
|
20
23
|
size: string;
|
|
21
24
|
titleTextSize: string;
|
|
25
|
+
badgeAppearanceSize: string;
|
|
22
26
|
contentTextSize: string;
|
|
23
27
|
icon: string;
|
|
24
28
|
};
|
|
25
29
|
sizeS: {
|
|
26
30
|
size: string;
|
|
27
31
|
titleTextSize: string;
|
|
32
|
+
badgeAppearanceSize: string;
|
|
28
33
|
contentTextSize: string;
|
|
29
34
|
icon: string;
|
|
30
35
|
};
|
|
31
36
|
sizeXS: {
|
|
32
37
|
size: string;
|
|
33
38
|
titleTextSize: string;
|
|
39
|
+
badgeAppearanceSize: string;
|
|
34
40
|
contentTextSize: string;
|
|
35
41
|
icon: string;
|
|
36
42
|
};
|
|
37
43
|
sizeXXS: {
|
|
38
44
|
size: string;
|
|
39
45
|
titleTextSize: string;
|
|
46
|
+
badgeAppearanceSize: string;
|
|
40
47
|
contentTextSize: string;
|
|
41
48
|
icon: string;
|
|
42
49
|
};
|
|
@@ -4,24 +4,33 @@ declare const accordionAppearanceSurface: {
|
|
|
4
4
|
fillHover: string;
|
|
5
5
|
titleTextColor: string;
|
|
6
6
|
labelTextColor: string;
|
|
7
|
+
badgeAppearance: string;
|
|
8
|
+
badgeShape: string;
|
|
7
9
|
iconFillIcon: string;
|
|
8
10
|
};
|
|
9
11
|
surfaceSecondary: {
|
|
10
12
|
fill: string;
|
|
11
13
|
fillHover: string;
|
|
12
14
|
labelTextColor: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
badgeAppearance: string;
|
|
16
|
+
badgeShape: string;
|
|
17
|
+
iconFillIcon: string;
|
|
15
18
|
};
|
|
16
19
|
surfaceTertiary: {
|
|
17
20
|
fill: string;
|
|
18
21
|
fillHover: string;
|
|
19
22
|
labelTextColor: string;
|
|
23
|
+
badgeAppearance: string;
|
|
24
|
+
badgeShape: string;
|
|
25
|
+
iconFillIcon: string;
|
|
20
26
|
};
|
|
21
27
|
surfaceQuaternary: {
|
|
22
28
|
fill: string;
|
|
23
29
|
fillHover: string;
|
|
24
30
|
labelTextColor: string;
|
|
31
|
+
badgeAppearance: string;
|
|
32
|
+
badgeShape: string;
|
|
33
|
+
iconFillIcon: string;
|
|
25
34
|
};
|
|
26
35
|
};
|
|
27
36
|
export { accordionAppearanceSurface };
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
declare const datePeriodAppearanceSize: {
|
|
2
2
|
sizeL: {
|
|
3
3
|
size: string;
|
|
4
|
-
|
|
4
|
+
chipsAppearanceSize: string;
|
|
5
|
+
datePickerAppearanceSize: string;
|
|
5
6
|
datePickerInputSize: string;
|
|
6
7
|
datePickerInputTextSize: string;
|
|
7
8
|
};
|
|
8
9
|
sizeM: {
|
|
9
10
|
size: string;
|
|
10
|
-
|
|
11
|
+
chipsAppearanceSize: string;
|
|
12
|
+
datePickerAppearanceSize: string;
|
|
11
13
|
datePickerInputSize: string;
|
|
12
14
|
datePickerInputTextSize: string;
|
|
13
15
|
};
|
|
@@ -5,7 +5,6 @@ declare const datePeriodAppearanceSurface: {
|
|
|
5
5
|
chipsShape: string;
|
|
6
6
|
datePickerAppearance: string;
|
|
7
7
|
datePickerInputAppearance: string;
|
|
8
|
-
datePickerInputFillHover: string;
|
|
9
8
|
shape: string;
|
|
10
9
|
};
|
|
11
10
|
surfaceSecondary: {
|
|
@@ -14,7 +13,6 @@ declare const datePeriodAppearanceSurface: {
|
|
|
14
13
|
chipsShape: string;
|
|
15
14
|
datePickerAppearance: string;
|
|
16
15
|
datePickerInputAppearance: string;
|
|
17
|
-
datePickerInputFillHover: string;
|
|
18
16
|
shape: string;
|
|
19
17
|
};
|
|
20
18
|
};
|