@itcase/ui 1.3.34 → 1.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Button-DZ3z7f-A.js → Button-BtAUGGPc.js} +5 -5
- package/dist/{Button-D1m2MxZA.js → Button-HKkjJ38v.js} +5 -5
- package/dist/cjs/components/Button.js +1 -1
- package/dist/cjs/components/Cell.js +8 -4
- package/dist/cjs/components/CookiesWarning.js +1 -1
- package/dist/cjs/components/DatePicker.js +1 -1
- package/dist/cjs/components/Response.js +1 -1
- package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -0
- package/dist/components/Button.js +1 -1
- package/dist/components/Cell.js +8 -4
- package/dist/components/CookiesWarning.js +1 -1
- package/dist/components/DatePicker.js +1 -1
- package/dist/components/Response.js +1 -1
- package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +1 -0
- package/dist/stories/Overview.mdx +5 -5
- package/dist/stories/Playground.mdx +4 -4
- package/dist/stories/Size.mdx +26 -6
- package/package.json +1 -1
|
@@ -245,16 +245,16 @@ var buttonAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__a
|
|
|
245
245
|
var buttonConfig = {
|
|
246
246
|
appearance: buttonAppearance,
|
|
247
247
|
setAppearance: function (appearanceConfig) {
|
|
248
|
-
|
|
248
|
+
this.appearance = appearanceConfig;
|
|
249
249
|
},
|
|
250
250
|
};
|
|
251
251
|
var Button = React.forwardRef(function Button(props, ref) {
|
|
252
|
-
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, icon = props.icon, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, iconSrc = props.iconSrc, link = props.link, _b = props.loadertype, loadertype = _b === void 0 ? 'simple' : _b,
|
|
253
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (
|
|
252
|
+
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, icon = props.icon, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, iconSrc = props.iconSrc, link = props.link, _b = props.loadertype, loadertype = _b === void 0 ? 'simple' : _b, loading = props.loading, rel = props.rel, target = props.target, before = props.before, after = props.after, isDisabled = props.isDisabled, _c = props.isLoading, isLoading = _c === void 0 ? false : _c, onClick = props.onClick, onMouseDown = props.onMouseDown;
|
|
253
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
254
254
|
var _a;
|
|
255
|
-
return (__assign(__assign({},
|
|
255
|
+
return (__assign(__assign({}, resultAppearance), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
256
256
|
}, {});
|
|
257
|
-
if (loading) {
|
|
257
|
+
if (loading !== undefined) {
|
|
258
258
|
console.warn('DEPRECATED: prop Loading is deprecated, use isLoading');
|
|
259
259
|
}
|
|
260
260
|
var _isLoading = isLoading !== null && isLoading !== void 0 ? isLoading : loading;
|
|
@@ -247,16 +247,16 @@ var buttonAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(
|
|
|
247
247
|
var buttonConfig = {
|
|
248
248
|
appearance: buttonAppearance,
|
|
249
249
|
setAppearance: function (appearanceConfig) {
|
|
250
|
-
|
|
250
|
+
this.appearance = appearanceConfig;
|
|
251
251
|
},
|
|
252
252
|
};
|
|
253
253
|
var Button = React.forwardRef(function Button(props, ref) {
|
|
254
|
-
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, icon = props.icon, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, iconSrc = props.iconSrc, link = props.link, _b = props.loadertype, loadertype = _b === void 0 ? 'simple' : _b,
|
|
255
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (
|
|
254
|
+
var className = props.className, appearance = props.appearance, children = props.children, label = props.label, Badge = props.Badge, dataTestId = props.dataTestId, dataTour = props.dataTour, href = props.href, _a = props.htmlType, htmlType = _a === void 0 ? 'button' : _a, icon = props.icon, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, iconSrc = props.iconSrc, link = props.link, _b = props.loadertype, loadertype = _b === void 0 ? 'simple' : _b, loading = props.loading, rel = props.rel, target = props.target, before = props.before, after = props.after, isDisabled = props.isDisabled, _c = props.isLoading, isLoading = _c === void 0 ? false : _c, onClick = props.onClick, onMouseDown = props.onMouseDown;
|
|
255
|
+
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultAppearance, appearance) {
|
|
256
256
|
var _a;
|
|
257
|
-
return (tslib_es6.__assign(tslib_es6.__assign({},
|
|
257
|
+
return (tslib_es6.__assign(tslib_es6.__assign({}, resultAppearance), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
|
|
258
258
|
}, {});
|
|
259
|
-
if (loading) {
|
|
259
|
+
if (loading !== undefined) {
|
|
260
260
|
console.warn('DEPRECATED: prop Loading is deprecated, use isLoading');
|
|
261
261
|
}
|
|
262
262
|
var _isLoading = isLoading !== null && isLoading !== void 0 ? isLoading : loading;
|
|
@@ -34,15 +34,15 @@ var cellConfig = {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
function Cell(props) {
|
|
37
|
-
var
|
|
37
|
+
var className = props.className, appearance = props.appearance, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize,
|
|
38
38
|
// titleLabelTextSize,
|
|
39
39
|
titleTag = props.titleTag, titleTextColor = props.titleTextColor,
|
|
40
40
|
// titleTextSize,
|
|
41
|
-
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
41
|
+
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, mode = props.mode, reverse = props.reverse, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
42
42
|
// valueLabelTextSize,
|
|
43
43
|
valueTag = props.valueTag, valueTextAlign = props.valueTextAlign, valueTextColor = props.valueTextColor,
|
|
44
44
|
// valueTextSize,
|
|
45
|
-
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
45
|
+
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, before = props.before, after = props.after, isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
46
46
|
// @ts-expect-error
|
|
47
47
|
var appearanceConfig = cellConfig.appearance && cellConfig.appearance[appearance];
|
|
48
48
|
var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
|
|
@@ -56,7 +56,11 @@ function Cell(props) {
|
|
|
56
56
|
/* eslint-enable perfectionist/sort-objects */
|
|
57
57
|
// @ts-expect-error
|
|
58
58
|
var _b = useStyles.useStyles(props), dataStyles = _b.data, cellStyles = _b.styles;
|
|
59
|
-
return (jsxRuntime.jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
59
|
+
return (jsxRuntime.jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
60
|
+
bgFillDisabledClass &&
|
|
61
|
+
"fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !(cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles.width) && "width_".concat(widthClass), zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap', reverse && 'cell_reverse'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsxRuntime.jsx("div", { className: "cell__before", children: before }), jsxRuntime.jsxs("div", { className: clsx('cell__wrapper', directionClass && "cell__wrapper_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), isActive && fillActiveClass && "fill_active_".concat(fillActiveClass), isDisabled &&
|
|
62
|
+
fillDisabledClass &&
|
|
63
|
+
"fill_disabled_".concat(fillDisabledClass), shapeClass && "cell__wrapper_shape_".concat(shapeClass), isEqual && 'cell__wrapper-equal'), children: [title && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__title", textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, size: titleTextSize, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), showTitleLabel && (jsxRuntime.jsx(Label.Label, { appearance: titleLabelAppearance, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape, size: titleLabelSize }))] })), value && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__value", textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, size: valueTextSize, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), showValueLabel && (jsxRuntime.jsx(Label.Label, { appearance: valueLabelAppearance, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape, size: valueLabelSize }))] }))] }), after && jsxRuntime.jsx("div", { className: "cell__after", children: after })] }));
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
exports.Cell = Cell;
|
|
@@ -5,7 +5,7 @@ var React = require('react');
|
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var Cookies = require('js-cookie');
|
|
7
7
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
8
|
-
var Button = require('../../Button-
|
|
8
|
+
var Button = require('../../Button-HKkjJ38v.js');
|
|
9
9
|
var Group = require('../../Group-Chtnas-J.js');
|
|
10
10
|
var Text = require('../../Text-C49zj3jO.js');
|
|
11
11
|
require('../../tslib.es6-CCZ3TN_7.js');
|
|
@@ -8,7 +8,7 @@ var locale = require('date-fns/locale');
|
|
|
8
8
|
var DatePicker = require('react-datepicker');
|
|
9
9
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
10
10
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
11
|
-
var Button = require('../../Button-
|
|
11
|
+
var Button = require('../../Button-HKkjJ38v.js');
|
|
12
12
|
var Icon = require('../../Icon-GVGrUu_Z.js');
|
|
13
13
|
var Input = require('../../Input-Dwvk-poq.js');
|
|
14
14
|
var Label = require('../../Label-XTFwl1aq.js');
|
|
@@ -7,7 +7,7 @@ var clsx = require('clsx');
|
|
|
7
7
|
var SVG = require('react-inlinesvg');
|
|
8
8
|
var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
|
|
9
9
|
var useStyles = require('../hooks/useStyles/useStyles.js');
|
|
10
|
-
var Button = require('../../Button-
|
|
10
|
+
var Button = require('../../Button-HKkjJ38v.js');
|
|
11
11
|
var Group = require('../../Group-Chtnas-J.js');
|
|
12
12
|
var Text = require('../../Text-C49zj3jO.js');
|
|
13
13
|
require('lodash/camelCase');
|
|
@@ -113,6 +113,7 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
|
|
|
113
113
|
},
|
|
114
114
|
};
|
|
115
115
|
return new Proxy(propsGenerator, generatorProxyHandler);
|
|
116
|
+
// TODO: componentProps(react) and appearanceConfig(not memoized) is always new. maybe better check Object.values?
|
|
116
117
|
}, [componentProps, appearanceConfig, deviceCurrentMainType]);
|
|
117
118
|
return devicePropsGenerator;
|
|
118
119
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-
|
|
1
|
+
export { B as Button, a as buttonAppearance, b as buttonConfig } from '../Button-BtAUGGPc.js';
|
|
2
2
|
import '../tslib.es6-5FtW-kfi.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
package/dist/components/Cell.js
CHANGED
|
@@ -32,15 +32,15 @@ var cellConfig = {
|
|
|
32
32
|
},
|
|
33
33
|
};
|
|
34
34
|
function Cell(props) {
|
|
35
|
-
var
|
|
35
|
+
var className = props.className, appearance = props.appearance, title = props.title, titleIcon = props.titleIcon, titleIconFill = props.titleIconFill, titleIconFillHover = props.titleIconFillHover, titleIconFillSize = props.titleIconFillSize, titleIconItemFill = props.titleIconItemFill, titleIconShape = props.titleIconShape, titleIconSrc = props.titleIconSrc, titleLabel = props.titleLabel, titleLabelAppearance = props.titleLabelAppearance, titleLabelShape = props.titleLabelShape, titleLabelSize = props.titleLabelSize,
|
|
36
36
|
// titleLabelTextSize,
|
|
37
37
|
titleTag = props.titleTag, titleTextColor = props.titleTextColor,
|
|
38
38
|
// titleTextSize,
|
|
39
|
-
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
39
|
+
titleTextTruncate = props.titleTextTruncate, titleTextWeight = props.titleTextWeight, titleTextWrap = props.titleTextWrap, mode = props.mode, reverse = props.reverse, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, value = props.value, valueIcon = props.valueIcon, valueIconFill = props.valueIconFill, valueIconFillHover = props.valueIconFillHover, valueIconFillSize = props.valueIconFillSize, valueIconItemFill = props.valueIconItemFill, valueIconShape = props.valueIconShape, valueIconSrc = props.valueIconSrc, valueLabel = props.valueLabel, valueLabelAppearance = props.valueLabelAppearance, valueLabelShape = props.valueLabelShape, valueLabelSize = props.valueLabelSize,
|
|
40
40
|
// valueLabelTextSize,
|
|
41
41
|
valueTag = props.valueTag, valueTextAlign = props.valueTextAlign, valueTextColor = props.valueTextColor,
|
|
42
42
|
// valueTextSize,
|
|
43
|
-
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
43
|
+
valueTextTruncate = props.valueTextTruncate, valueTextWeight = props.valueTextWeight, valueTextWrap = props.valueTextWrap, zeroGap = props.zeroGap, zeroPadding = props.zeroPadding, before = props.before, after = props.after, isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, set = props.set, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
44
44
|
// @ts-expect-error
|
|
45
45
|
var appearanceConfig = cellConfig.appearance && cellConfig.appearance[appearance];
|
|
46
46
|
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
@@ -54,7 +54,11 @@ function Cell(props) {
|
|
|
54
54
|
/* eslint-enable perfectionist/sort-objects */
|
|
55
55
|
// @ts-expect-error
|
|
56
56
|
var _b = useStyles(props), dataStyles = _b.data, cellStyles = _b.styles;
|
|
57
|
-
return (jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
57
|
+
return (jsxs("div", { className: clsx(className, 'cell', mode && "cell_mode_".concat(mode), size && "cell_size_".concat(size), set && "cell_set_".concat(set), bgFillClass && "fill_".concat(bgFillClass), bgFillHoverClass && "fill_hover_".concat(bgFillHoverClass), isActive && bgFillActiveClass && "fill_active_".concat(bgFillActiveClass), isDisabled &&
|
|
58
|
+
bgFillDisabledClass &&
|
|
59
|
+
"fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !(cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles.width) && "width_".concat(widthClass), zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap', reverse && 'cell_reverse'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsx("div", { className: "cell__before", children: before }), jsxs("div", { className: clsx('cell__wrapper', directionClass && "cell__wrapper_direction_".concat(directionClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), isActive && fillActiveClass && "fill_active_".concat(fillActiveClass), isDisabled &&
|
|
60
|
+
fillDisabledClass &&
|
|
61
|
+
"fill_disabled_".concat(fillDisabledClass), shapeClass && "cell__wrapper_shape_".concat(shapeClass), isEqual && 'cell__wrapper-equal'), children: [title && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__title", textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, size: titleTextSize, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsx(Icon, { className: "cell__icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), showTitleLabel && (jsx(Label, { appearance: titleLabelAppearance, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape, size: titleLabelSize }))] })), value && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__value", textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, size: valueTextSize, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsx(Icon, { className: "cell__icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), showValueLabel && (jsx(Label, { appearance: valueLabelAppearance, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape, size: valueLabelSize }))] }))] }), after && jsx("div", { className: "cell__after", children: after })] }));
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
export { Cell, cellAppearance, cellConfig };
|
|
@@ -3,7 +3,7 @@ import { useRef, useMemo, useCallback, useEffect } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import Cookies from 'js-cookie';
|
|
5
5
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
import { B as Button } from '../Button-
|
|
6
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
7
7
|
import { G as Group } from '../Group-DiMnEfge.js';
|
|
8
8
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
9
9
|
import '../tslib.es6-5FtW-kfi.js';
|
|
@@ -6,7 +6,7 @@ import { ru } from 'date-fns/locale';
|
|
|
6
6
|
import DatePicker from 'react-datepicker';
|
|
7
7
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
8
8
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
9
|
-
import { B as Button } from '../Button-
|
|
9
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
10
10
|
import { I as Icon } from '../Icon-htF_V35Y.js';
|
|
11
11
|
import { I as Input } from '../Input-COFdaiTe.js';
|
|
12
12
|
import { L as Label } from '../Label-Dpeq55TV.js';
|
|
@@ -5,7 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import SVG from 'react-inlinesvg';
|
|
6
6
|
import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
7
7
|
import { useStyles } from '../hooks/useStyles/useStyles.js';
|
|
8
|
-
import { B as Button } from '../Button-
|
|
8
|
+
import { B as Button } from '../Button-BtAUGGPc.js';
|
|
9
9
|
import { G as Group } from '../Group-DiMnEfge.js';
|
|
10
10
|
import { T as Text } from '../Text-C6NSmetx.js';
|
|
11
11
|
import 'lodash/camelCase';
|
|
@@ -111,6 +111,7 @@ function useDevicePropsGenerator(componentProps, appearanceConfig) {
|
|
|
111
111
|
},
|
|
112
112
|
};
|
|
113
113
|
return new Proxy(propsGenerator, generatorProxyHandler);
|
|
114
|
+
// TODO: componentProps(react) and appearanceConfig(not memoized) is always new. maybe better check Object.values?
|
|
114
115
|
}, [componentProps, appearanceConfig, deviceCurrentMainType]);
|
|
115
116
|
return devicePropsGenerator;
|
|
116
117
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as TitleStories from '../stories/Title.stories.tsx'
|
|
4
4
|
|
|
5
|
-
<Meta title="Atoms /
|
|
5
|
+
<Meta title="Atoms / Title / Overview" />
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Title
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`Title` отображает заголовки.
|
|
10
10
|
|
|
11
|
-
<Story of={
|
|
11
|
+
<Story of={TitleStories.SizeH3} />
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Canvas, Controls, Meta } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as TitleStories from '../stories/Title.stories.tsx'
|
|
4
4
|
|
|
5
|
-
<Meta title="Atoms /
|
|
5
|
+
<Meta title="Atoms / Title / Playground" />
|
|
6
6
|
|
|
7
7
|
# Playground
|
|
8
8
|
|
|
9
|
-
<Canvas sourceState="shown" of={
|
|
10
|
-
<Controls of={
|
|
9
|
+
<Canvas sourceState="shown" of={TitleStories.SizeH4} />
|
|
10
|
+
<Controls of={TitleStories.SizeH4} />
|
package/dist/stories/Size.mdx
CHANGED
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
import { Canvas, Meta } from '@storybook/blocks'
|
|
2
2
|
|
|
3
|
-
import * as
|
|
3
|
+
import * as SizeStories from '../stories/Size.stories.tsx'
|
|
4
4
|
|
|
5
|
-
<Meta title="Atoms /
|
|
5
|
+
<Meta title="Atoms / Tab / Size" />
|
|
6
6
|
|
|
7
7
|
# Size
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## XXS
|
|
10
10
|
|
|
11
|
-
<Canvas sourceState="shown" of={
|
|
11
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXXS} />
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## XS
|
|
14
14
|
|
|
15
|
-
<Canvas sourceState="shown" of={
|
|
15
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXS} />
|
|
16
|
+
|
|
17
|
+
## S
|
|
18
|
+
|
|
19
|
+
<Canvas sourceState="shown" of={SizeStories.SizeS} />
|
|
20
|
+
|
|
21
|
+
## M
|
|
22
|
+
|
|
23
|
+
<Canvas sourceState="shown" of={SizeStories.SizeM} />
|
|
24
|
+
|
|
25
|
+
## L
|
|
26
|
+
|
|
27
|
+
<Canvas sourceState="shown" of={SizeStories.SizeL} />
|
|
28
|
+
|
|
29
|
+
## XL
|
|
30
|
+
|
|
31
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXL} />
|
|
32
|
+
|
|
33
|
+
## XXL
|
|
34
|
+
|
|
35
|
+
<Canvas sourceState="shown" of={SizeStories.SizeXXL} />
|