@itcase/ui 1.8.51 → 1.8.53
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/{DatePicker_cjs_CKmX_JOf.js → DatePicker_cjs_Dm4jEz9i.js} +1 -1
- package/dist/{DatePicker_es_BRH4AHbV.js → DatePicker_es_DOS_Wd3d.js} +1 -1
- package/dist/{Label_cjs_DNAubjXm.js → Label_cjs_DtPQ3nBp.js} +36 -4
- package/dist/{Label_es_DnV8akSC.js → Label_es_Bdm6UXMY.js} +36 -4
- package/dist/cjs/components/Cell.js +1 -1
- package/dist/cjs/components/DatePeriod.js +2 -2
- package/dist/cjs/components/DatePicker.js +2 -2
- package/dist/cjs/components/Label.js +1 -1
- package/dist/components/Cell.js +1 -1
- package/dist/components/DatePeriod.js +2 -2
- package/dist/components/DatePicker.js +2 -2
- package/dist/components/Label.js +1 -1
- package/dist/css/styles/fill/fill_gradient.css +12 -0
- package/dist/types/components/Label/appearance/labelGradient.d.ts +6 -4
- package/dist/types/components/Label/appearance/labelShape.d.ts +22 -0
- package/package.json +3 -3
- package/dist/css/styles/fill-gradient/fill-gradient.css +0 -20
|
@@ -12,7 +12,7 @@ var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
|
|
|
12
12
|
var Button = require('./Button_cjs_C8P5a38-.js');
|
|
13
13
|
var Icon = require('./Icon_cjs_CKWWo53f.js');
|
|
14
14
|
var Input = require('./Input_cjs_BGLd0EQu.js');
|
|
15
|
-
var Label = require('./
|
|
15
|
+
var Label = require('./Label_cjs_DtPQ3nBp.js');
|
|
16
16
|
var Text = require('./Text_cjs_C-Ux7Tz5.js');
|
|
17
17
|
var _default = require('@itcase/icons/default');
|
|
18
18
|
|
|
@@ -10,7 +10,7 @@ import { useStyles } from './hooks/useStyles/useStyles.js';
|
|
|
10
10
|
import { B as Button } from './Button_es_CwtOu3lT.js';
|
|
11
11
|
import { I as Icon } from './Icon_es_B7IMj2rG.js';
|
|
12
12
|
import { I as Input } from './Input_es_D2mNCqiH.js';
|
|
13
|
-
import { L as Label } from './
|
|
13
|
+
import { L as Label } from './Label_es_Bdm6UXMY.js';
|
|
14
14
|
import { T as Text } from './Text_es_BdFAdf7M.js';
|
|
15
15
|
import { icons14 } from '@itcase/icons/default';
|
|
16
16
|
|
|
@@ -82,6 +82,16 @@ var labelAppearanceError = {
|
|
|
82
82
|
},
|
|
83
83
|
};
|
|
84
84
|
|
|
85
|
+
var labelAppearanceGradient = {
|
|
86
|
+
gradientPrimary: {
|
|
87
|
+
fill: 'gradientPrimaryDiagonal',
|
|
88
|
+
labelTextColor: 'surfaceTextInverse',
|
|
89
|
+
borderColor: 'surfaceBorderPrimary',
|
|
90
|
+
iconAfterFillIcon: 'surfaceItemInverse',
|
|
91
|
+
iconBeforeFillIcon: 'surfaceItemInverse',
|
|
92
|
+
},
|
|
93
|
+
};
|
|
94
|
+
|
|
85
95
|
var labelAppearanceInfo = {
|
|
86
96
|
infoMutedPrimary: {
|
|
87
97
|
fill: 'infoMuted',
|
|
@@ -140,6 +150,28 @@ var labelAppearanceSecondary = {
|
|
|
140
150
|
},
|
|
141
151
|
};
|
|
142
152
|
|
|
153
|
+
var labelAppearanceShape = {
|
|
154
|
+
rounded: {
|
|
155
|
+
shape: 'rounded',
|
|
156
|
+
},
|
|
157
|
+
roundedS: {
|
|
158
|
+
shape: 'rounded',
|
|
159
|
+
shapeStrength: '0_5m',
|
|
160
|
+
},
|
|
161
|
+
roundedM: {
|
|
162
|
+
shape: 'rounded',
|
|
163
|
+
shapeStrength: '1m',
|
|
164
|
+
},
|
|
165
|
+
roundedL: {
|
|
166
|
+
shape: 'rounded',
|
|
167
|
+
shapeStrength: '1_5m',
|
|
168
|
+
},
|
|
169
|
+
roundedXL: {
|
|
170
|
+
shape: 'rounded',
|
|
171
|
+
shapeStrength: '2m',
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
143
175
|
var labelAppearanceSize = {
|
|
144
176
|
sizeXXL: {
|
|
145
177
|
size: 'xxl',
|
|
@@ -276,7 +308,7 @@ var labelAppearanceWarning = {
|
|
|
276
308
|
},
|
|
277
309
|
};
|
|
278
310
|
|
|
279
|
-
var labelAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, labelAppearanceDisable), labelAppearanceSize), labelAppearanceStyle), labelAppearanceAccent), labelAppearanceDanger), labelAppearanceError), labelAppearanceInfo), labelAppearancePrimary), labelAppearanceSecondary), labelAppearanceSuccess), labelAppearanceSurface), labelAppearanceWarning);
|
|
311
|
+
var labelAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, labelAppearanceDisable), labelAppearanceShape), labelAppearanceSize), labelAppearanceStyle), labelAppearanceGradient), labelAppearanceAccent), labelAppearanceDanger), labelAppearanceError), labelAppearanceInfo), labelAppearancePrimary), labelAppearanceSecondary), labelAppearanceSuccess), labelAppearanceSurface), labelAppearanceWarning);
|
|
280
312
|
|
|
281
313
|
var labelConfig = {
|
|
282
314
|
appearance: labelAppearance,
|
|
@@ -285,7 +317,7 @@ var labelConfig = {
|
|
|
285
317
|
},
|
|
286
318
|
};
|
|
287
319
|
function Label(props) {
|
|
288
|
-
var className = props.className, type = props.type, appearance = props.appearance, label = props.label, cursor = props.cursor, dataTour = props.dataTour,
|
|
320
|
+
var className = props.className, type = props.type, appearance = props.appearance, label = props.label, cursor = props.cursor, dataTour = props.dataTour, showTooltip = props.showTooltip, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
|
|
289
321
|
var tooltipRef = React.useRef(null);
|
|
290
322
|
var onMouseEnterLabel = React.useCallback(function () {
|
|
291
323
|
var _a;
|
|
@@ -297,10 +329,10 @@ function Label(props) {
|
|
|
297
329
|
}, []);
|
|
298
330
|
var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, labelConfig);
|
|
299
331
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
300
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
332
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
301
333
|
// @ts-expect-error
|
|
302
334
|
var labelStyles = useStyles.useStyles(props).styles;
|
|
303
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "label_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "'word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass),
|
|
335
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "label_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "'word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), type && "label_type_".concat(type), isSkeleton && "label_skeleton", onClick && (cursor || 'cursor_type_pointer')), "data-tour": dataTour, style: labelStyles, onClick: onClick, onMouseEnter: onMouseEnterLabel, onMouseLeave: onMouseLeaveLabel, children: [before, (iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_before'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), jsxRuntime.jsxs("div", { className: "label__inner", children: [typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "label__text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsxRuntime.jsx("div", { className: "label__text", children: label })), children, showTooltip && (jsxRuntime.jsx(Icon.Tooltip, { className: "label__tooltip", appearance: tooltipAppearance, alignment: tooltipAlignment, title: tooltipTitle, titleSize: tooltipTitleSize, text: tooltipText, textSize: tooltipTextSize, arrowPosition: tooltipArrowPosition, ref: tooltipRef, children: tooltipContent }))] }), (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('label__icon_after'), fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), after] }));
|
|
304
336
|
}
|
|
305
337
|
|
|
306
338
|
exports.Label = Label;
|
|
@@ -80,6 +80,16 @@ var labelAppearanceError = {
|
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
var labelAppearanceGradient = {
|
|
84
|
+
gradientPrimary: {
|
|
85
|
+
fill: 'gradientPrimaryDiagonal',
|
|
86
|
+
labelTextColor: 'surfaceTextInverse',
|
|
87
|
+
borderColor: 'surfaceBorderPrimary',
|
|
88
|
+
iconAfterFillIcon: 'surfaceItemInverse',
|
|
89
|
+
iconBeforeFillIcon: 'surfaceItemInverse',
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
|
|
83
93
|
var labelAppearanceInfo = {
|
|
84
94
|
infoMutedPrimary: {
|
|
85
95
|
fill: 'infoMuted',
|
|
@@ -138,6 +148,28 @@ var labelAppearanceSecondary = {
|
|
|
138
148
|
},
|
|
139
149
|
};
|
|
140
150
|
|
|
151
|
+
var labelAppearanceShape = {
|
|
152
|
+
rounded: {
|
|
153
|
+
shape: 'rounded',
|
|
154
|
+
},
|
|
155
|
+
roundedS: {
|
|
156
|
+
shape: 'rounded',
|
|
157
|
+
shapeStrength: '0_5m',
|
|
158
|
+
},
|
|
159
|
+
roundedM: {
|
|
160
|
+
shape: 'rounded',
|
|
161
|
+
shapeStrength: '1m',
|
|
162
|
+
},
|
|
163
|
+
roundedL: {
|
|
164
|
+
shape: 'rounded',
|
|
165
|
+
shapeStrength: '1_5m',
|
|
166
|
+
},
|
|
167
|
+
roundedXL: {
|
|
168
|
+
shape: 'rounded',
|
|
169
|
+
shapeStrength: '2m',
|
|
170
|
+
},
|
|
171
|
+
};
|
|
172
|
+
|
|
141
173
|
var labelAppearanceSize = {
|
|
142
174
|
sizeXXL: {
|
|
143
175
|
size: 'xxl',
|
|
@@ -274,7 +306,7 @@ var labelAppearanceWarning = {
|
|
|
274
306
|
},
|
|
275
307
|
};
|
|
276
308
|
|
|
277
|
-
var labelAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, labelAppearanceDisable), labelAppearanceSize), labelAppearanceStyle), labelAppearanceAccent), labelAppearanceDanger), labelAppearanceError), labelAppearanceInfo), labelAppearancePrimary), labelAppearanceSecondary), labelAppearanceSuccess), labelAppearanceSurface), labelAppearanceWarning);
|
|
309
|
+
var labelAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, labelAppearanceDisable), labelAppearanceShape), labelAppearanceSize), labelAppearanceStyle), labelAppearanceGradient), labelAppearanceAccent), labelAppearanceDanger), labelAppearanceError), labelAppearanceInfo), labelAppearancePrimary), labelAppearanceSecondary), labelAppearanceSuccess), labelAppearanceSurface), labelAppearanceWarning);
|
|
278
310
|
|
|
279
311
|
var labelConfig = {
|
|
280
312
|
appearance: labelAppearance,
|
|
@@ -283,7 +315,7 @@ var labelConfig = {
|
|
|
283
315
|
},
|
|
284
316
|
};
|
|
285
317
|
function Label(props) {
|
|
286
|
-
var className = props.className, type = props.type, appearance = props.appearance, label = props.label, cursor = props.cursor, dataTour = props.dataTour,
|
|
318
|
+
var className = props.className, type = props.type, appearance = props.appearance, label = props.label, cursor = props.cursor, dataTour = props.dataTour, showTooltip = props.showTooltip, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
|
|
287
319
|
var tooltipRef = useRef(null);
|
|
288
320
|
var onMouseEnterLabel = useCallback(function () {
|
|
289
321
|
var _a;
|
|
@@ -295,10 +327,10 @@ function Label(props) {
|
|
|
295
327
|
}, []);
|
|
296
328
|
var appearanceConfig = useAppearanceConfig(appearance, labelConfig);
|
|
297
329
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
298
|
-
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
330
|
+
var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, tooltipAlignment = propsGenerator.tooltipAlignment, tooltipAppearance = propsGenerator.tooltipAppearance, tooltipArrowPosition = propsGenerator.tooltipArrowPosition, tooltipContent = propsGenerator.tooltipContent, tooltipText = propsGenerator.tooltipText, tooltipTextSize = propsGenerator.tooltipTextSize, tooltipTitle = propsGenerator.tooltipTitle, tooltipTitleSize = propsGenerator.tooltipTitleSize, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
|
|
299
331
|
// @ts-expect-error
|
|
300
332
|
var labelStyles = useStyles(props).styles;
|
|
301
|
-
return (jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "label_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "'word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass),
|
|
333
|
+
return (jsxs("div", { className: clsx(className, 'label', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "label_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "label_size_".concat(sizeClass), wrapClass && "'word-wrap_".concat(wrapClass), widthClass && "label_width_".concat(widthClass), alignDirectionClass && "".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), type && "label_type_".concat(type), isSkeleton && "label_skeleton", onClick && (cursor || 'cursor_type_pointer')), "data-tour": dataTour, style: labelStyles, onClick: onClick, onMouseEnter: onMouseEnterLabel, onMouseLeave: onMouseLeaveLabel, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('label__icon_before'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), jsxs("div", { className: "label__inner", children: [typeof label === 'string' ? (jsx(Text, { className: "label__text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, textWeight: labelTextWeight, textWrap: labelTextWrap, children: label })) : (jsx("div", { className: "label__text", children: label })), children, showTooltip && (jsx(Tooltip, { className: "label__tooltip", appearance: tooltipAppearance, alignment: tooltipAlignment, title: tooltipTitle, titleSize: tooltipTitleSize, text: tooltipText, textSize: tooltipTextSize, arrowPosition: tooltipArrowPosition, ref: tooltipRef, children: tooltipContent }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('label__icon_after'), fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), after] }));
|
|
302
334
|
}
|
|
303
335
|
|
|
304
336
|
export { Label as L, labelAppearance as a, labelConfig as l };
|
|
@@ -6,7 +6,7 @@ var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceCon
|
|
|
6
6
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
7
7
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
8
8
|
var Icon = require('../../Icon_cjs_CKWWo53f.js');
|
|
9
|
-
var Label = require('../../
|
|
9
|
+
var Label = require('../../Label_cjs_DtPQ3nBp.js');
|
|
10
10
|
var Text = require('../../Text_cjs_C-Ux7Tz5.js');
|
|
11
11
|
var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
12
12
|
require('react');
|
|
@@ -4,7 +4,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var common = require('@itcase/common');
|
|
7
|
-
var DatePicker = require('../../
|
|
7
|
+
var DatePicker = require('../../DatePicker_cjs_Dm4jEz9i.js');
|
|
8
8
|
var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var ChipsGroup = require('../../ChipsGroup_cjs_CVCYLe2C.js');
|
|
@@ -31,7 +31,7 @@ require('../../Link_cjs_BqT6eVl6.js');
|
|
|
31
31
|
require('../../Text_cjs_C-Ux7Tz5.js');
|
|
32
32
|
require('../../Loader_cjs_D_n5PrK5.js');
|
|
33
33
|
require('../../Input_cjs_BGLd0EQu.js');
|
|
34
|
-
require('../../
|
|
34
|
+
require('../../Label_cjs_DtPQ3nBp.js');
|
|
35
35
|
require('@itcase/icons/default');
|
|
36
36
|
require('lodash/castArray');
|
|
37
37
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var DatePicker = require('../../
|
|
3
|
+
var DatePicker = require('../../DatePicker_cjs_Dm4jEz9i.js');
|
|
4
4
|
require('../../tslib.es6_cjs_CCZ3TN_7.js');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
@@ -31,7 +31,7 @@ require('../../Link_cjs_BqT6eVl6.js');
|
|
|
31
31
|
require('../../Text_cjs_C-Ux7Tz5.js');
|
|
32
32
|
require('../../Loader_cjs_D_n5PrK5.js');
|
|
33
33
|
require('../../Input_cjs_BGLd0EQu.js');
|
|
34
|
-
require('../../
|
|
34
|
+
require('../../Label_cjs_DtPQ3nBp.js');
|
|
35
35
|
require('@itcase/icons/default');
|
|
36
36
|
|
|
37
37
|
|
package/dist/components/Cell.js
CHANGED
|
@@ -4,7 +4,7 @@ import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceC
|
|
|
4
4
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
5
5
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
6
6
|
import { I as Icon } from '../Icon_es_B7IMj2rG.js';
|
|
7
|
-
import { L as Label } from '../
|
|
7
|
+
import { L as Label } from '../Label_es_Bdm6UXMY.js';
|
|
8
8
|
import { T as Text } from '../Text_es_BdFAdf7M.js';
|
|
9
9
|
import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
|
|
10
10
|
import 'react';
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useCallback } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { DATE_PERIOD_INTERVALS } from '@itcase/common';
|
|
5
|
-
import { D as DatePickerInput } from '../
|
|
5
|
+
import { D as DatePickerInput } from '../DatePicker_es_DOS_Wd3d.js';
|
|
6
6
|
import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_BrX6_qHH.js';
|
|
@@ -29,7 +29,7 @@ import '../Link_es_BnUIX0QT.js';
|
|
|
29
29
|
import '../Text_es_BdFAdf7M.js';
|
|
30
30
|
import '../Loader_es_DXVVV9LE.js';
|
|
31
31
|
import '../Input_es_D2mNCqiH.js';
|
|
32
|
-
import '../
|
|
32
|
+
import '../Label_es_Bdm6UXMY.js';
|
|
33
33
|
import '@itcase/icons/default';
|
|
34
34
|
import 'lodash/castArray';
|
|
35
35
|
|
|
@@ -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_DOS_Wd3d.js';
|
|
2
2
|
import '../tslib.es6_es_Bwu1Cn-t.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
@@ -29,5 +29,5 @@ import '../Link_es_BnUIX0QT.js';
|
|
|
29
29
|
import '../Text_es_BdFAdf7M.js';
|
|
30
30
|
import '../Loader_es_DXVVV9LE.js';
|
|
31
31
|
import '../Input_es_D2mNCqiH.js';
|
|
32
|
-
import '../
|
|
32
|
+
import '../Label_es_Bdm6UXMY.js';
|
|
33
33
|
import '@itcase/icons/default';
|
package/dist/components/Label.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
.fill_gradient {
|
|
2
|
+
@each $type in primary, secondary, tertiary, quaternary {
|
|
3
|
+
&-$(type) {
|
|
4
|
+
@each $direction, $degree in (top, right, diagonal, bottom, left),
|
|
5
|
+
(0deg, 90deg, 135deg, 180deg, 270deg) {
|
|
6
|
+
&-$(direction) {
|
|
7
|
+
background: linear-gradient($(degree), var(--color-gradient-$(type)));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
declare const
|
|
2
|
-
|
|
1
|
+
declare const labelAppearanceGradient: {
|
|
2
|
+
gradientPrimary: {
|
|
3
3
|
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
4
|
labelTextColor: string;
|
|
5
|
+
borderColor: string;
|
|
6
|
+
iconAfterFillIcon: string;
|
|
7
|
+
iconBeforeFillIcon: string;
|
|
6
8
|
};
|
|
7
9
|
};
|
|
8
|
-
export {
|
|
10
|
+
export { labelAppearanceGradient };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const labelAppearanceShape: {
|
|
2
|
+
rounded: {
|
|
3
|
+
shape: string;
|
|
4
|
+
};
|
|
5
|
+
roundedS: {
|
|
6
|
+
shape: string;
|
|
7
|
+
shapeStrength: string;
|
|
8
|
+
};
|
|
9
|
+
roundedM: {
|
|
10
|
+
shape: string;
|
|
11
|
+
shapeStrength: string;
|
|
12
|
+
};
|
|
13
|
+
roundedL: {
|
|
14
|
+
shape: string;
|
|
15
|
+
shapeStrength: string;
|
|
16
|
+
};
|
|
17
|
+
roundedXL: {
|
|
18
|
+
shape: string;
|
|
19
|
+
shapeStrength: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export { labelAppearanceShape };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.53",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
"@itcase/common": "^1.2.28",
|
|
105
105
|
"@itcase/icons": "^1.2.16",
|
|
106
106
|
"@itcase/storybook-config": "^1.1.37",
|
|
107
|
-
"@itcase/tokens-am": "^1.1.
|
|
108
|
-
"@itcase/tokens-baikal": "^1.1.
|
|
107
|
+
"@itcase/tokens-am": "^1.1.19",
|
|
108
|
+
"@itcase/tokens-baikal": "^1.1.17",
|
|
109
109
|
"@itcase/tokens-palette": "^1.1.11",
|
|
110
110
|
"@storybook/addon-vitest": "^9.0.17",
|
|
111
111
|
"clsx": "^2.1.1",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
.fill-gradient {
|
|
2
|
-
@each $type in accent, primary, secondary, tertiary, surface, success, error {
|
|
3
|
-
&_$(type) {
|
|
4
|
-
@each $color in primary, secondary, tertiary, quaternary, quinary, senary,
|
|
5
|
-
accent, disabled, hover {
|
|
6
|
-
&-$(color) {
|
|
7
|
-
@each $direction in left, top, right, bottom {
|
|
8
|
-
&-$(direction) {
|
|
9
|
-
background: linear-gradient(
|
|
10
|
-
to $(direction),
|
|
11
|
-
var(--color-$(type)-gradient-$(color)-start) 0%,
|
|
12
|
-
var(--color-$(type)-gradient-$(color)-end) 100%
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|