@itcase/ui 1.8.55 → 1.8.56
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/Response.js +1 -1
- package/dist/cjs/components/Segmented.js +28 -3
- package/dist/components/Response.js +1 -1
- package/dist/components/Segmented.js +28 -3
- package/dist/css/components/Response/Response.css +6 -1
- package/dist/css/components/Segmented/Segmented.css +0 -12
- package/dist/types/components/Segmented/appearance/segmentedShape.d.ts +25 -0
- package/package.json +1 -1
|
@@ -181,7 +181,7 @@ var Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props) {
|
|
|
181
181
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
182
182
|
// @ts-expect-error
|
|
183
183
|
var _a = useStyles.useStyles(props), responseStyles = _a.styles, wrapperStyles = _a.wrapper;
|
|
184
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "response_skeleton"), "data-testid": dataTestId, "data-tour": dataTour, style: responseStyles, children: [before, jsxRuntime.jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [jsxRuntime.jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent }), jsxRuntime.jsxs("div", { className: "response__wrapper-inner", children: [title && (jsxRuntime.jsx(Text.Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
184
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "response_skeleton"), "data-testid": dataTestId, "data-tour": dataTour, style: responseStyles, children: [before, jsxRuntime.jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [ImageComponent && (jsxRuntime.jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent })), jsxRuntime.jsxs("div", { className: "response__wrapper-inner", children: [title && (jsxRuntime.jsx(Text.Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsxRuntime.jsx(Text.Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
185
185
|
primaryButton ||
|
|
186
186
|
secondaryButtonLabel ||
|
|
187
187
|
secondaryButton ||
|
|
@@ -97,6 +97,31 @@ var segmentedAppearanceError = {
|
|
|
97
97
|
},
|
|
98
98
|
};
|
|
99
99
|
|
|
100
|
+
var segmentedAppearanceShape = {
|
|
101
|
+
circular: {
|
|
102
|
+
shape: 'circular',
|
|
103
|
+
},
|
|
104
|
+
rounded: {
|
|
105
|
+
shape: 'rounded',
|
|
106
|
+
},
|
|
107
|
+
roundedL: {
|
|
108
|
+
shape: 'rounded',
|
|
109
|
+
shapeStrength: '1_5m',
|
|
110
|
+
},
|
|
111
|
+
roundedM: {
|
|
112
|
+
shape: 'rounded',
|
|
113
|
+
shapeStrength: '1m',
|
|
114
|
+
},
|
|
115
|
+
roundedS: {
|
|
116
|
+
shape: 'rounded',
|
|
117
|
+
shapeStrength: '0_5m',
|
|
118
|
+
},
|
|
119
|
+
roundedXL: {
|
|
120
|
+
shape: 'rounded',
|
|
121
|
+
shapeStrength: '2m',
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
100
125
|
var segmentedAppearanceSize = {
|
|
101
126
|
sizeL: {
|
|
102
127
|
size: 'l',
|
|
@@ -177,7 +202,7 @@ var segmentedAppearanceWarning = {
|
|
|
177
202
|
},
|
|
178
203
|
};
|
|
179
204
|
|
|
180
|
-
var segmentedAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, segmentedAppearanceDisabled), segmentedAppearanceSize), segmentedAppearanceStyle), segmentedAppearanceError), segmentedAppearanceSuccess), segmentedAppearanceDefault), segmentedAppearanceWarning);
|
|
205
|
+
var segmentedAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, segmentedAppearanceDisabled), segmentedAppearanceSize), segmentedAppearanceShape), segmentedAppearanceStyle), segmentedAppearanceError), segmentedAppearanceSuccess), segmentedAppearanceDefault), segmentedAppearanceWarning);
|
|
181
206
|
|
|
182
207
|
var segmentedConfig = {
|
|
183
208
|
appearance: segmentedAppearance,
|
|
@@ -210,8 +235,8 @@ var Segmented = React.forwardRef(function (props) {
|
|
|
210
235
|
}, [activeSegment, segmentsRefs]);
|
|
211
236
|
var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, segmentedConfig);
|
|
212
237
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
213
|
-
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
214
|
-
return (jsxRuntime.jsx("div", { className: clsx(className, 'segmented', shapeClass && "
|
|
238
|
+
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
239
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, 'segmented', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "segmented_skeleton"), ref: controlRef, children: jsxRuntime.jsx("div", { className: "segmented__wrapper", children: jsxRuntime.jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) {
|
|
215
240
|
var isActive = String(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) === String(item.value);
|
|
216
241
|
return (jsxRuntime.jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && "segmented__item_size_".concat(sizeClass), isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
|
|
217
242
|
isDisabled &&
|
|
@@ -179,7 +179,7 @@ var Response = urlWithAssetPrefix(function Response(props) {
|
|
|
179
179
|
}, [imageSrc, svgSrc, SvgImage, width, height, svgFillClass]);
|
|
180
180
|
// @ts-expect-error
|
|
181
181
|
var _a = useStyles(props), responseStyles = _a.styles, wrapperStyles = _a.wrapper;
|
|
182
|
-
return (jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "response_skeleton"), "data-testid": dataTestId, "data-tour": dataTour, style: responseStyles, children: [before, jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent }), jsxs("div", { className: "response__wrapper-inner", children: [title && (jsx(Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsx(Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
182
|
+
return (jsxs("div", { className: clsx(className, 'response', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "response_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "response_skeleton"), "data-testid": dataTestId, "data-tour": dataTour, style: responseStyles, children: [before, jsxs("div", { className: "response__wrapper", style: wrapperStyles, children: [ImageComponent && (jsx("div", { className: clsx('response__image', svgFillClass && "svg_fill_".concat(svgFillClass), svgPathFillClass && "svg_path_fill_".concat(svgPathFillClass)), children: ImageComponent })), jsxs("div", { className: "response__wrapper-inner", children: [title && (jsx(Text, { className: "response__title", size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, children: title })), desc && (jsx(Text, { className: "response__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] })] }), (primaryButtonLabel ||
|
|
183
183
|
primaryButton ||
|
|
184
184
|
secondaryButtonLabel ||
|
|
185
185
|
secondaryButton ||
|
|
@@ -95,6 +95,31 @@ var segmentedAppearanceError = {
|
|
|
95
95
|
},
|
|
96
96
|
};
|
|
97
97
|
|
|
98
|
+
var segmentedAppearanceShape = {
|
|
99
|
+
circular: {
|
|
100
|
+
shape: 'circular',
|
|
101
|
+
},
|
|
102
|
+
rounded: {
|
|
103
|
+
shape: 'rounded',
|
|
104
|
+
},
|
|
105
|
+
roundedL: {
|
|
106
|
+
shape: 'rounded',
|
|
107
|
+
shapeStrength: '1_5m',
|
|
108
|
+
},
|
|
109
|
+
roundedM: {
|
|
110
|
+
shape: 'rounded',
|
|
111
|
+
shapeStrength: '1m',
|
|
112
|
+
},
|
|
113
|
+
roundedS: {
|
|
114
|
+
shape: 'rounded',
|
|
115
|
+
shapeStrength: '0_5m',
|
|
116
|
+
},
|
|
117
|
+
roundedXL: {
|
|
118
|
+
shape: 'rounded',
|
|
119
|
+
shapeStrength: '2m',
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
98
123
|
var segmentedAppearanceSize = {
|
|
99
124
|
sizeL: {
|
|
100
125
|
size: 'l',
|
|
@@ -175,7 +200,7 @@ var segmentedAppearanceWarning = {
|
|
|
175
200
|
},
|
|
176
201
|
};
|
|
177
202
|
|
|
178
|
-
var segmentedAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, segmentedAppearanceDisabled), segmentedAppearanceSize), segmentedAppearanceStyle), segmentedAppearanceError), segmentedAppearanceSuccess), segmentedAppearanceDefault), segmentedAppearanceWarning);
|
|
203
|
+
var segmentedAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, segmentedAppearanceDisabled), segmentedAppearanceSize), segmentedAppearanceShape), segmentedAppearanceStyle), segmentedAppearanceError), segmentedAppearanceSuccess), segmentedAppearanceDefault), segmentedAppearanceWarning);
|
|
179
204
|
|
|
180
205
|
var segmentedConfig = {
|
|
181
206
|
appearance: segmentedAppearance,
|
|
@@ -208,8 +233,8 @@ var Segmented = React.forwardRef(function (props) {
|
|
|
208
233
|
}, [activeSegment, segmentsRefs]);
|
|
209
234
|
var appearanceConfig = useAppearanceConfig(appearance, segmentedConfig);
|
|
210
235
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
211
|
-
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
212
|
-
return (jsx("div", { className: clsx(className, 'segmented', shapeClass && "
|
|
236
|
+
var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFillDisabled = propsGenerator.iconFillDisabled, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
237
|
+
return (jsx("div", { className: clsx(className, 'segmented', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "segmented_skeleton"), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) {
|
|
213
238
|
var isActive = String(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) === String(item.value);
|
|
214
239
|
return (jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && "segmented__item_size_".concat(sizeClass), isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
|
|
215
240
|
isDisabled &&
|
|
@@ -12,13 +12,18 @@
|
|
|
12
12
|
align-items: center;
|
|
13
13
|
gap: 3m;
|
|
14
14
|
&-inner {
|
|
15
|
-
flex-direction: column;
|
|
16
15
|
width: 100%;
|
|
17
16
|
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
18
|
align-items: center;
|
|
19
|
+
gap: 8px;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
&__title {
|
|
23
|
+
text-align: center;
|
|
24
|
+
}
|
|
21
25
|
&__desc {
|
|
26
|
+
text-align: center;
|
|
22
27
|
display: flex;
|
|
23
28
|
gap: 1m;
|
|
24
29
|
}
|
|
@@ -73,16 +73,6 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
|
-
.segmented {
|
|
77
|
-
&_shape {
|
|
78
|
-
&_rounded {
|
|
79
|
-
border-radius: var(--segmented-shape-rounded);
|
|
80
|
-
}
|
|
81
|
-
&_circular {
|
|
82
|
-
border-radius: 50%;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
76
|
.segmented {
|
|
87
77
|
&_size {
|
|
88
78
|
@each $size in normal, compact, xxl, xl, l, m, s, xs, xxs {
|
|
@@ -201,6 +191,4 @@
|
|
|
201
191
|
--segmented-item-size-s-min-height: 28px;
|
|
202
192
|
--segmented-item-size-xs-min-height: 20px;
|
|
203
193
|
--segmented-item-size-xxs-min-height: 16px;
|
|
204
|
-
|
|
205
|
-
--segmented-shape-rounded: 8px;
|
|
206
194
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const segmentedAppearanceShape: {
|
|
2
|
+
circular: {
|
|
3
|
+
shape: string;
|
|
4
|
+
};
|
|
5
|
+
rounded: {
|
|
6
|
+
shape: string;
|
|
7
|
+
};
|
|
8
|
+
roundedL: {
|
|
9
|
+
shape: string;
|
|
10
|
+
shapeStrength: string;
|
|
11
|
+
};
|
|
12
|
+
roundedM: {
|
|
13
|
+
shape: string;
|
|
14
|
+
shapeStrength: string;
|
|
15
|
+
};
|
|
16
|
+
roundedS: {
|
|
17
|
+
shape: string;
|
|
18
|
+
shapeStrength: string;
|
|
19
|
+
};
|
|
20
|
+
roundedXL: {
|
|
21
|
+
shape: string;
|
|
22
|
+
shapeStrength: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export { segmentedAppearanceShape };
|