@itcase/ui 1.8.34 → 1.8.35

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.
Files changed (39) hide show
  1. package/dist/{ChipsGroup_cjs_DdWjvr_S.js → ChipsGroup_cjs_j3QOma3U.js} +49 -17
  2. package/dist/{ChipsGroup_es_CXS0aeon.js → ChipsGroup_es_DF1fhn97.js} +49 -17
  3. package/dist/{DatePicker_cjs_C-VbK2J4.js → DatePicker_cjs_Bx5_lZNT.js} +23 -27
  4. package/dist/{DatePicker_es_CIEHQyHC.js → DatePicker_es_A1FcasHs.js} +24 -28
  5. package/dist/{DropdownItem_cjs_D-zoX7Ik.js → DropdownItem_cjs_tH2DBClp.js} +4 -2
  6. package/dist/{DropdownItem_es_BMnIhUSe.js → DropdownItem_es_BeVv-pDA.js} +4 -2
  7. package/dist/{Label_cjs_BWbVsB-u.js → Label_cjs_CP4b6Mg2.js} +10 -82
  8. package/dist/{Label_es_ouC2i_iI.js → Label_es_DFSiy5sL.js} +10 -82
  9. package/dist/cjs/components/Cell.js +1 -1
  10. package/dist/cjs/components/Chips.js +1 -1
  11. package/dist/cjs/components/DatePeriod.js +6 -4
  12. package/dist/cjs/components/DatePicker.js +2 -2
  13. package/dist/cjs/components/Dropdown.js +1 -1
  14. package/dist/cjs/components/Label.js +1 -1
  15. package/dist/cjs/components/Pagination.js +1 -1
  16. package/dist/components/Cell.js +1 -1
  17. package/dist/components/Chips.js +1 -1
  18. package/dist/components/DatePeriod.js +6 -4
  19. package/dist/components/DatePicker.js +2 -2
  20. package/dist/components/Dropdown.js +1 -1
  21. package/dist/components/Label.js +1 -1
  22. package/dist/components/Pagination.js +1 -1
  23. package/dist/css/components/Dropdown/Dropdown.css +7 -14
  24. package/dist/css/styles/shape-strength/shape-strength.css +4 -9
  25. package/dist/types/components/Chips/appearance/chipsSize.d.ts +34 -0
  26. package/dist/types/components/Chips/appearance/chipsStyle.d.ts +7 -9
  27. package/dist/types/components/Label/appearance/labelAccent.d.ts +0 -8
  28. package/dist/types/components/Label/appearance/labelDanger.d.ts +0 -12
  29. package/dist/types/components/Label/appearance/labelDisable.d.ts +0 -2
  30. package/dist/types/components/Label/appearance/labelError.d.ts +0 -8
  31. package/dist/types/components/Label/appearance/labelInfo.d.ts +0 -5
  32. package/dist/types/components/Label/appearance/labelPrimary.d.ts +0 -10
  33. package/dist/types/components/Label/appearance/labelSecondary.d.ts +0 -10
  34. package/dist/types/components/Label/appearance/labelSize.d.ts +6 -0
  35. package/dist/types/components/Label/appearance/labelStyle.d.ts +4 -4
  36. package/dist/types/components/Label/appearance/labelSuccess.d.ts +0 -8
  37. package/dist/types/components/Label/appearance/labelSurface.d.ts +0 -6
  38. package/dist/types/components/Label/appearance/labelWarning.d.ts +0 -9
  39. package/package.json +1 -1
@@ -28,12 +28,12 @@ var chipsAppearanceDanger = {};
28
28
 
29
29
  var chipsAppearanceDisabled = {
30
30
  disabled: {
31
- fill: 'disabledPrimary',
32
- fillActive: 'disabledPrimary',
33
- fillHover: 'disabledPrimary',
34
- labelTextColor: 'disabledTextPrimary',
35
- labelTextHoverColor: 'disabledTextPrimary',
36
- borderColor: 'disabledBorderPrimary',
31
+ fill: 'surfaceDisabled',
32
+ fillActive: 'surfaceDisabled',
33
+ fillHover: 'surfaceDisabled',
34
+ labelTextColor: 'surfaceTextDisabled',
35
+ labelTextHoverColor: 'surfaceTextDisabled',
36
+ borderColor: 'surfaceBorderDisabled',
37
37
  },
38
38
  };
39
39
 
@@ -59,29 +59,61 @@ var chipsAppearanceSecondary = {
59
59
  };
60
60
 
61
61
  var chipsAppearanceSize = {
62
+ sizeXXL: {
63
+ size: 'xxl',
64
+ labelTextSize: 'xl',
65
+ iconAfterSize: 24,
66
+ iconBeforeSize: 24,
67
+ },
68
+ sizeXL: {
69
+ size: 'xl',
70
+ labelTextSize: 'm',
71
+ iconAfterSize: 20,
72
+ iconBeforeSize: 20,
73
+ },
62
74
  sizeL: {
63
75
  size: 'l',
64
76
  labelTextSize: 'm',
77
+ iconAfterSize: 16,
78
+ iconBeforeSize: 16,
65
79
  },
66
80
  sizeM: {
67
81
  size: 'm',
68
82
  labelTextSize: 's',
83
+ iconAfterSize: 16,
84
+ iconBeforeSize: 16,
85
+ },
86
+ sizeS: {
87
+ size: 's',
88
+ labelTextSize: 's',
89
+ iconAfterSize: 16,
90
+ iconBeforeSize: 16,
91
+ },
92
+ sizeXS: {
93
+ size: 'xs',
94
+ labelTextSize: 'xs',
95
+ iconAfterSize: 14,
96
+ iconBeforeSize: 14,
97
+ },
98
+ sizeXXS: {
99
+ size: 'xxs',
100
+ labelTextSize: 'xxs',
101
+ iconAfterSize: 12,
102
+ iconBeforeSize: 12,
69
103
  },
70
104
  };
71
105
 
72
106
  var chipsAppearanceStyle = {
73
- full: {
74
- borderColor: null,
75
- },
76
- ghost: {
77
- fill: null,
78
- borderColor: null,
107
+ solid: {
108
+ borderColor: 'none',
79
109
  },
80
110
  outlined: {
81
- fill: null,
111
+ fill: 'none',
82
112
  },
83
- solid: {
84
- borderColor: null,
113
+ full: {},
114
+ ghost: {
115
+ fill: 'none',
116
+ borderColor: 'none',
85
117
  },
86
118
  };
87
119
 
@@ -146,11 +178,11 @@ function Chips(props) {
146
178
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
147
179
  var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, 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, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
148
180
  var chipsStyles = useStyles.useStyles(props).styles;
149
- return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
181
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'chips', !isActive
150
182
  ? fillClass && "fill_".concat(fillClass)
151
183
  : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
152
184
  ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
153
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
185
+ : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isActive && 'chips_state_active', isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Tooltip.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsxRuntime.jsx(Tooltip.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
154
186
  }
155
187
 
156
188
  function ChipsGroup(props) {
@@ -26,12 +26,12 @@ var chipsAppearanceDanger = {};
26
26
 
27
27
  var chipsAppearanceDisabled = {
28
28
  disabled: {
29
- fill: 'disabledPrimary',
30
- fillActive: 'disabledPrimary',
31
- fillHover: 'disabledPrimary',
32
- labelTextColor: 'disabledTextPrimary',
33
- labelTextHoverColor: 'disabledTextPrimary',
34
- borderColor: 'disabledBorderPrimary',
29
+ fill: 'surfaceDisabled',
30
+ fillActive: 'surfaceDisabled',
31
+ fillHover: 'surfaceDisabled',
32
+ labelTextColor: 'surfaceTextDisabled',
33
+ labelTextHoverColor: 'surfaceTextDisabled',
34
+ borderColor: 'surfaceBorderDisabled',
35
35
  },
36
36
  };
37
37
 
@@ -57,29 +57,61 @@ var chipsAppearanceSecondary = {
57
57
  };
58
58
 
59
59
  var chipsAppearanceSize = {
60
+ sizeXXL: {
61
+ size: 'xxl',
62
+ labelTextSize: 'xl',
63
+ iconAfterSize: 24,
64
+ iconBeforeSize: 24,
65
+ },
66
+ sizeXL: {
67
+ size: 'xl',
68
+ labelTextSize: 'm',
69
+ iconAfterSize: 20,
70
+ iconBeforeSize: 20,
71
+ },
60
72
  sizeL: {
61
73
  size: 'l',
62
74
  labelTextSize: 'm',
75
+ iconAfterSize: 16,
76
+ iconBeforeSize: 16,
63
77
  },
64
78
  sizeM: {
65
79
  size: 'm',
66
80
  labelTextSize: 's',
81
+ iconAfterSize: 16,
82
+ iconBeforeSize: 16,
83
+ },
84
+ sizeS: {
85
+ size: 's',
86
+ labelTextSize: 's',
87
+ iconAfterSize: 16,
88
+ iconBeforeSize: 16,
89
+ },
90
+ sizeXS: {
91
+ size: 'xs',
92
+ labelTextSize: 'xs',
93
+ iconAfterSize: 14,
94
+ iconBeforeSize: 14,
95
+ },
96
+ sizeXXS: {
97
+ size: 'xxs',
98
+ labelTextSize: 'xxs',
99
+ iconAfterSize: 12,
100
+ iconBeforeSize: 12,
67
101
  },
68
102
  };
69
103
 
70
104
  var chipsAppearanceStyle = {
71
- full: {
72
- borderColor: null,
73
- },
74
- ghost: {
75
- fill: null,
76
- borderColor: null,
105
+ solid: {
106
+ borderColor: 'none',
77
107
  },
78
108
  outlined: {
79
- fill: null,
109
+ fill: 'none',
80
110
  },
81
- solid: {
82
- borderColor: null,
111
+ full: {},
112
+ ghost: {
113
+ fill: 'none',
114
+ borderColor: 'none',
83
115
  },
84
116
  };
85
117
 
@@ -144,11 +176,11 @@ function Chips(props) {
144
176
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
145
177
  var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, 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, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
146
178
  var chipsStyles = useStyles(props).styles;
147
- return (jsx("div", { className: clsx(className, 'chips', isActive && 'chips_state_active', !isActive
179
+ return (jsx("div", { className: clsx(className, 'chips', !isActive
148
180
  ? fillClass && "fill_".concat(fillClass)
149
181
  : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
150
182
  ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
151
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
183
+ : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "chips_shape_".concat(shapeClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isActive && 'chips_state_active', isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer'), "data-testid": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), typeof label === 'string' ? (jsx(Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter })), badgeValue && (jsx(Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
152
184
  }
153
185
 
154
186
  function ChipsGroup(props) {
@@ -11,7 +11,7 @@ var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
11
11
  var Button = require('./Button_cjs_CW6ENTbm.js');
12
12
  var Tooltip = require('./Tooltip_cjs_DinScDnC.js');
13
13
  var Input = require('./Input_cjs_arr_wxD2.js');
14
- var Label = require('./Label_cjs_BWbVsB-u.js');
14
+ var Label = require('./Label_cjs_CP4b6Mg2.js');
15
15
  var Text = require('./Text_cjs_C9fOm0nd.js');
16
16
  var _default = require('@itcase/icons/default');
17
17
 
@@ -99,34 +99,36 @@ function DatePickerInput(props) {
99
99
  }, {});
100
100
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(datePickerProps, appearanceConfig);
101
101
  var daySize = propsGenerator.daySize, dayTextColor = propsGenerator.dayTextColor, dayTextShape = propsGenerator.dayTextShape, dayTextSize = propsGenerator.dayTextSize, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconLeft = propsGenerator.iconLeft, iconRight = propsGenerator.iconRight, iconShape = propsGenerator.iconShape, monthTextColor = propsGenerator.monthTextColor, monthTextSize = propsGenerator.monthTextSize, monthTextWeight = propsGenerator.monthTextWeight, popper = propsGenerator.popper, popperPlacement = propsGenerator.popperPlacement, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, yearTextColor = propsGenerator.yearTextColor, yearTextSize = propsGenerator.yearTextSize, yearTextWeight = propsGenerator.yearTextWeight, isClearable = propsGenerator.isClearable;
102
- var start = React.useMemo(function () {
102
+ var _d = React.useMemo(function () {
103
+ var startDate;
103
104
  if (value) {
104
105
  if (typeof value === 'string') {
105
- return new Date(value);
106
+ startDate = new Date(value);
107
+ }
108
+ else {
109
+ startDate = value;
106
110
  }
107
- return value;
108
111
  }
109
- if (datePickerProps.isStartDefaultNull) {
110
- return undefined;
112
+ else {
113
+ startDate = undefined;
111
114
  }
112
- return new Date();
113
- }, [value, datePickerProps.isStartDefaultNull]);
114
- var end = React.useMemo(function () {
115
- if (!endValue) {
116
- return undefined;
115
+ var endDate;
116
+ if (endValue) {
117
+ if (typeof endValue === 'string') {
118
+ endDate = new Date(endValue);
119
+ }
120
+ else {
121
+ endDate = endValue;
122
+ }
117
123
  }
118
- if (typeof endValue === 'string') {
119
- return new Date(endValue);
124
+ else {
125
+ endDate = undefined;
120
126
  }
121
- return endValue;
122
- }, [endValue]);
123
- var _d = React.useState(start), startDate = _d[0], setStartDate = _d[1];
124
- var _e = React.useState(end), endDate = _e[0], setEndDate = _e[1];
127
+ return [startDate, endDate];
128
+ }, [value, endValue]), startDate = _d[0], endDate = _d[1];
125
129
  var handleChange = React.useCallback(function (_a) {
126
130
  var newStartDate = _a[0], newEndDate = _a[1];
127
- onChange && onChange(newStartDate, newEndDate);
128
- setStartDate(newStartDate);
129
- setEndDate(newEndDate);
131
+ onChange(newStartDate, newEndDate);
130
132
  }, [onChange]);
131
133
  var renderDayContents = React.useCallback(function (day, date) {
132
134
  return (jsxRuntime.jsx(Button.Button, { className: "react-datepicker__day-button", size: daySize, label: date.getDate().toString(), labelTextColor: dayTextColor, labelTextSize: dayTextSize, shape: dayTextShape }));
@@ -149,14 +151,8 @@ function DatePickerInput(props) {
149
151
  yearTextSize,
150
152
  yearTextWeight,
151
153
  ]);
152
- React.useEffect(function () {
153
- setStartDate(start);
154
- }, [start]);
155
- React.useEffect(function () {
156
- setEndDate(end);
157
- }, [end]);
158
154
  var datePickerStyles = useStyles.useStyles(props).styles;
159
- return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, tslib_es6.__assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? endDate : undefined, locale: locale.ru, popperPlacement: popperPlacement, popperClassName: popper && "react-datepicker-popper-".concat(popper), ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
155
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsxRuntime.jsx(DatePicker, tslib_es6.__assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsxRuntime.jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? endDate : undefined, locale: locale.ru, popperClassName: popper && "react-datepicker-popper-".concat(popper), popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
160
156
  // Important for use custom clear button
161
157
  isClearable: false })) }));
162
158
  }
@@ -1,6 +1,6 @@
1
1
  import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
- import React, { useMemo, useCallback, useRef, useState, useEffect } from 'react';
3
+ import React, { useMemo, useCallback, useRef } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { ru } from 'date-fns/locale';
6
6
  import DatePicker from 'react-datepicker';
@@ -9,7 +9,7 @@ import { useStyles } from './hooks/useStyles/useStyles.js';
9
9
  import { B as Button } from './Button_es_DTUagqgU.js';
10
10
  import { I as Icon } from './Tooltip_es_B0nm9irO.js';
11
11
  import { I as Input } from './Input_es_BW6cZThr.js';
12
- import { L as Label } from './Label_es_ouC2i_iI.js';
12
+ import { L as Label } from './Label_es_DFSiy5sL.js';
13
13
  import { T as Text } from './Text_es_BfLRfj-5.js';
14
14
  import { icons14 } from '@itcase/icons/default';
15
15
 
@@ -97,34 +97,36 @@ function DatePickerInput(props) {
97
97
  }, {});
98
98
  var propsGenerator = useDevicePropsGenerator(datePickerProps, appearanceConfig);
99
99
  var daySize = propsGenerator.daySize, dayTextColor = propsGenerator.dayTextColor, dayTextShape = propsGenerator.dayTextShape, dayTextSize = propsGenerator.dayTextSize, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconLeft = propsGenerator.iconLeft, iconRight = propsGenerator.iconRight, iconShape = propsGenerator.iconShape, monthTextColor = propsGenerator.monthTextColor, monthTextSize = propsGenerator.monthTextSize, monthTextWeight = propsGenerator.monthTextWeight, popper = propsGenerator.popper, popperPlacement = propsGenerator.popperPlacement, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass, yearTextColor = propsGenerator.yearTextColor, yearTextSize = propsGenerator.yearTextSize, yearTextWeight = propsGenerator.yearTextWeight, isClearable = propsGenerator.isClearable;
100
- var start = useMemo(function () {
100
+ var _d = useMemo(function () {
101
+ var startDate;
101
102
  if (value) {
102
103
  if (typeof value === 'string') {
103
- return new Date(value);
104
+ startDate = new Date(value);
105
+ }
106
+ else {
107
+ startDate = value;
104
108
  }
105
- return value;
106
109
  }
107
- if (datePickerProps.isStartDefaultNull) {
108
- return undefined;
110
+ else {
111
+ startDate = undefined;
109
112
  }
110
- return new Date();
111
- }, [value, datePickerProps.isStartDefaultNull]);
112
- var end = useMemo(function () {
113
- if (!endValue) {
114
- return undefined;
113
+ var endDate;
114
+ if (endValue) {
115
+ if (typeof endValue === 'string') {
116
+ endDate = new Date(endValue);
117
+ }
118
+ else {
119
+ endDate = endValue;
120
+ }
115
121
  }
116
- if (typeof endValue === 'string') {
117
- return new Date(endValue);
122
+ else {
123
+ endDate = undefined;
118
124
  }
119
- return endValue;
120
- }, [endValue]);
121
- var _d = useState(start), startDate = _d[0], setStartDate = _d[1];
122
- var _e = useState(end), endDate = _e[0], setEndDate = _e[1];
125
+ return [startDate, endDate];
126
+ }, [value, endValue]), startDate = _d[0], endDate = _d[1];
123
127
  var handleChange = useCallback(function (_a) {
124
128
  var newStartDate = _a[0], newEndDate = _a[1];
125
- onChange && onChange(newStartDate, newEndDate);
126
- setStartDate(newStartDate);
127
- setEndDate(newEndDate);
129
+ onChange(newStartDate, newEndDate);
128
130
  }, [onChange]);
129
131
  var renderDayContents = useCallback(function (day, date) {
130
132
  return (jsx(Button, { className: "react-datepicker__day-button", size: daySize, label: date.getDate().toString(), labelTextColor: dayTextColor, labelTextSize: dayTextSize, shape: dayTextShape }));
@@ -147,14 +149,8 @@ function DatePickerInput(props) {
147
149
  yearTextSize,
148
150
  yearTextWeight,
149
151
  ]);
150
- useEffect(function () {
151
- setStartDate(start);
152
- }, [start]);
153
- useEffect(function () {
154
- setEndDate(end);
155
- }, [end]);
156
152
  var datePickerStyles = useStyles(props).styles;
157
- return (jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsx(DatePicker, __assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? endDate : undefined, locale: ru, popperPlacement: popperPlacement, popperClassName: popper && "react-datepicker-popper-".concat(popper), ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
153
+ return (jsx("div", { className: clsx(className, 'datepicker', monthsShown && 'datepicker_multiple-months', customTimeInput && 'datepicker_button', sizeClass && "datepicker_size_".concat(sizeClass), widthClass && "datepicker_width_".concat(widthClass)), style: datePickerStyles, children: jsx(DatePicker, __assign({ minDate: disablePastDays ? new Date() : undefined, customInput: jsx(DatePickerCustomInput, { datepickerRef: datepickerRef, inputProps: inputProps, isClearable: isClearable }), endDate: selectsRange ? endDate : undefined, locale: ru, popperClassName: popper && "react-datepicker-popper-".concat(popper), popperPlacement: popperPlacement, ref: datepickerRef, renderCustomHeader: renderCustomHeader, renderDayContents: renderDayContents, selected: startDate, startDate: startDate, onChange: selectsRange ? handleChange : onChange }, datePickerProps, {
158
154
  // Important for use custom clear button
159
155
  isClearable: false })) }));
160
156
  }
@@ -58,9 +58,11 @@ function Dropdown(props) {
58
58
  // eslint-disable-next-line react-hooks/exhaustive-deps
59
59
  }, []);
60
60
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
61
- var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
61
+ var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass;
62
62
  var styles = useStyles.useStyles(props).styles;
63
- return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxRuntime.jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
63
+ return (jsxRuntime.jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
64
+ ? "shape-strength_".concat(shapeStrengthClass)
65
+ : shapeClass === 'rounded' && 'shape-strength_default', elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxRuntime.jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
64
66
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
65
67
  onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsxRuntime.jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })), after] }));
66
68
  }
@@ -56,9 +56,11 @@ function Dropdown(props) {
56
56
  // eslint-disable-next-line react-hooks/exhaustive-deps
57
57
  }, []);
58
58
  var propsGenerator = useDevicePropsGenerator(props);
59
- var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass;
59
+ var alignmentClass = propsGenerator.alignmentClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, elevationClass = propsGenerator.elevationClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass;
60
60
  var styles = useStyles(props).styles;
61
- return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "dropdown_shape_".concat(shapeClass), elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
61
+ return (jsxs("div", { className: clsx(className, 'dropdown', alignmentClass && "alignment_".concat(alignmentClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
62
+ ? "shape-strength_".concat(shapeStrengthClass)
63
+ : shapeClass === 'rounded' && 'shape-strength_default', elevationClass && "elevation_".concat(elevationClass), isOpen ? 'dropdown_state_open' : 'dropdown_state_close', animationState.className), ref: dropdownRef, style: styles, children: [before, (children || dropdownList) && (jsxs("div", { className: clsx('dropdown__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)),
62
64
  // Add "onAnimationEnd" only for wrapper for ignore dropdown button
63
65
  onAnimationEnd: onAnimationEnd, children: [dropdownList === null || dropdownList === void 0 ? void 0 : dropdownList.map(function (item) { return (jsx(DropdownItem, { appearance: appearance, label: item.label, badgeValue: item.badgeValue, iconAfter: item.iconAfter, iconBefore: item.iconBefore, iconSrc: item.icon, isActive: item.isActive }, item.key)); }), children] })), after] }));
64
66
  }