@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.
@@ -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
- buttonConfig.appearance = appearanceConfig;
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, _c = props.loading, loading = _c === void 0 ? false : _c, rel = props.rel, target = props.target, before = props.before, after = props.after, isDisabled = props.isDisabled, isLoading = props.isLoading, onClick = props.onClick, onMouseDown = props.onMouseDown;
253
- var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultApperance, appearance) {
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({}, resultApperance), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
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
- buttonConfig.appearance = appearanceConfig;
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, _c = props.loading, loading = _c === void 0 ? false : _c, rel = props.rel, target = props.target, before = props.before, after = props.after, isDisabled = props.isDisabled, isLoading = props.isLoading, onClick = props.onClick, onMouseDown = props.onMouseDown;
255
- var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultApperance, appearance) {
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({}, resultApperance), (_a = buttonConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearance]));
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;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var Button = require('../../Button-D1m2MxZA.js');
3
+ var Button = require('../../Button-HKkjJ38v.js');
4
4
  require('../../tslib.es6-CCZ3TN_7.js');
5
5
  require('react/jsx-runtime');
6
6
  require('react');
@@ -34,15 +34,15 @@ var cellConfig = {
34
34
  },
35
35
  };
36
36
  function Cell(props) {
37
- var isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, after = props.after, appearance = props.appearance, before = props.before, className = props.className, mode = props.mode, reverse = props.reverse, set = props.set, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, 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,
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 && bgFillDisabledClass && "fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !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 && fillDisabledClass && "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", size: titleTextSize, tag: titleTag, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, 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, { labelTextSize: titleLabelTextSize, appearance: titleLabelAppearance, label: titleLabel, shape: titleLabelShape, size: titleLabelSize }))] })), value && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__value", size: valueTextSize, tag: valueTag, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, 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, { labelTextSize: valueLabelTextSize, appearance: valueLabelAppearance, label: valueLabel, shape: valueLabelShape, size: valueLabelSize }))] }))] }), after && jsxRuntime.jsx("div", { className: "cell__after", children: after })] }));
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-D1m2MxZA.js');
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-D1m2MxZA.js');
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-D1m2MxZA.js');
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-DZ3z7f-A.js';
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';
@@ -32,15 +32,15 @@ var cellConfig = {
32
32
  },
33
33
  };
34
34
  function Cell(props) {
35
- var isActive = props.isActive, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, isEqual = props.isEqual, after = props.after, appearance = props.appearance, before = props.before, className = props.className, mode = props.mode, reverse = props.reverse, set = props.set, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, size = props.size, 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,
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 && bgFillDisabledClass && "fill_disabled_".concat(bgFillDisabledClass), bgShapeClass && "cell_shape_".concat(bgShapeClass), widthClass && !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 && fillDisabledClass && "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", size: titleTextSize, tag: titleTag, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, 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, { labelTextSize: titleLabelTextSize, appearance: titleLabelAppearance, label: titleLabel, shape: titleLabelShape, size: titleLabelSize }))] })), value && (jsxs("div", { className: "cell__data", style: dataStyles, children: [jsx(Text, { className: "cell__value", size: valueTextSize, tag: valueTag, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, 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, { labelTextSize: valueLabelTextSize, appearance: valueLabelAppearance, label: valueLabel, shape: valueLabelShape, size: valueLabelSize }))] }))] }), after && jsx("div", { className: "cell__after", children: after })] }));
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-DZ3z7f-A.js';
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-DZ3z7f-A.js';
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-DZ3z7f-A.js';
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 TooltipStories from '../stories/Tooltip.stories.tsx'
3
+ import * as TitleStories from '../stories/Title.stories.tsx'
4
4
 
5
- <Meta title="Atoms / Tooltip / Overview" />
5
+ <Meta title="Atoms / Title / Overview" />
6
6
 
7
- # Tooltip
7
+ # Title
8
8
 
9
- `Tooltip` - это небольшой фрагмент контекстной информации, который появляется, когда пользователи наводят курсор мыши на элемент пользовательского интерфейса.
9
+ `Title` отображает заголовки.
10
10
 
11
- <Story of={TooltipStories.surfacePrimary} />
11
+ <Story of={TitleStories.SizeH3} />
@@ -1,10 +1,10 @@
1
1
  import { Canvas, Controls, Meta } from '@storybook/blocks'
2
2
 
3
- import * as TooltipStories from '../stories/Tooltip.stories.tsx'
3
+ import * as TitleStories from '../stories/Title.stories.tsx'
4
4
 
5
- <Meta title="Atoms / Tooltip / Playground" />
5
+ <Meta title="Atoms / Title / Playground" />
6
6
 
7
7
  # Playground
8
8
 
9
- <Canvas sourceState="shown" of={TooltipStories.surfacePrimary} />
10
- <Controls of={TooltipStories.surfacePrimary} />
9
+ <Canvas sourceState="shown" of={TitleStories.SizeH4} />
10
+ <Controls of={TitleStories.SizeH4} />
@@ -1,15 +1,35 @@
1
1
  import { Canvas, Meta } from '@storybook/blocks'
2
2
 
3
- import * as SwitchStories from '../stories/Switch.stories.tsx'
3
+ import * as SizeStories from '../stories/Size.stories.tsx'
4
4
 
5
- <Meta title="Atoms / Switch / Size" />
5
+ <Meta title="Atoms / Tab / Size" />
6
6
 
7
7
  # Size
8
8
 
9
- ## Normal
9
+ ## XXS
10
10
 
11
- <Canvas sourceState="shown" of={SwitchStories.Normal} />
11
+ <Canvas sourceState="shown" of={SizeStories.SizeXXS} />
12
12
 
13
- ## Compact
13
+ ## XS
14
14
 
15
- <Canvas sourceState="shown" of={SwitchStories.Compact} />
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} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.3.34",
3
+ "version": "1.3.36",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",