@itcase/ui 1.8.73 → 1.8.75

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/{DatePicker_cjs_C5Scs-GL.js → DatePicker_cjs_DPe3TnXs.js} +1 -1
  2. package/dist/{DatePicker_es_Cn7l4eD0.js → DatePicker_es_DIFs7Wgs.js} +1 -1
  3. package/dist/{Input_cjs_BGLd0EQu.js → Input_cjs_DSpBwtPv.js} +28 -3
  4. package/dist/{Input_es_D2mNCqiH.js → Input_es_3C_YhQFo.js} +28 -3
  5. package/dist/cjs/components/Chips.js +1 -1
  6. package/dist/cjs/components/Choice.js +30 -5
  7. package/dist/cjs/components/Code.js +28 -3
  8. package/dist/cjs/components/Dadata.js +1 -1
  9. package/dist/cjs/components/DatePeriod.js +3 -3
  10. package/dist/cjs/components/DatePicker.js +2 -2
  11. package/dist/cjs/components/Drawer/stories/__mock__.js +10 -0
  12. package/dist/cjs/components/Drawer.js +2 -2
  13. package/dist/cjs/components/Input.js +1 -1
  14. package/dist/cjs/components/Radio.js +33 -8
  15. package/dist/cjs/components/Textarea.js +28 -3
  16. package/dist/components/Chips.js +1 -1
  17. package/dist/components/Choice.js +30 -5
  18. package/dist/components/Code.js +28 -3
  19. package/dist/components/Dadata.js +1 -1
  20. package/dist/components/DatePeriod.js +3 -3
  21. package/dist/components/DatePicker.js +2 -2
  22. package/dist/components/Drawer/stories/__mock__.js +8 -0
  23. package/dist/components/Drawer.js +2 -2
  24. package/dist/components/Input.js +1 -1
  25. package/dist/components/Radio.js +33 -8
  26. package/dist/components/Textarea.js +28 -3
  27. package/dist/css/components/Code/Code.css +13 -21
  28. package/dist/css/components/Input/Input.css +0 -4
  29. package/dist/css/components/Textarea/Textarea.css +0 -4
  30. package/dist/types/components/Chips/appearance/chipsShape.d.ts +2 -2
  31. package/dist/types/components/Choice/appearance/choiceShape.d.ts +25 -0
  32. package/dist/types/components/Code/appearance/codeShape.d.ts +25 -0
  33. package/dist/types/components/Input/appearance/inputShape.d.ts +25 -0
  34. package/dist/types/components/Radio/Radio.appearance.d.ts +22 -0
  35. package/dist/types/components/Radio/appearance/radioShape.d.ts +25 -0
  36. package/dist/types/components/Textarea/appearance/textareaShape.d.ts +25 -0
  37. package/package.json +4 -4
  38. package/dist/{ChipsGroup_cjs_p5BbbozF.js → ChipsGroup_cjs_BLUYSr4v.js} +4 -4
  39. package/dist/{ChipsGroup_es_CSRBUuRU.js → ChipsGroup_es_DSwPxBuZ.js} +4 -4
@@ -63,6 +63,31 @@ var codeAppearanceRequire = {
63
63
  },
64
64
  };
65
65
 
66
+ var codeAppearanceShape = {
67
+ circular: {
68
+ shape: 'circular',
69
+ },
70
+ rounded: {
71
+ shape: 'rounded',
72
+ },
73
+ roundedS: {
74
+ shape: 'rounded',
75
+ shapeStrength: '0_5m',
76
+ },
77
+ roundedM: {
78
+ shape: 'rounded',
79
+ shapeStrength: '1m',
80
+ },
81
+ roundedL: {
82
+ shape: 'rounded',
83
+ shapeStrength: '1_5m',
84
+ },
85
+ roundedXL: {
86
+ shape: 'rounded',
87
+ shapeStrength: '2m',
88
+ },
89
+ };
90
+
66
91
  var codeAppearanceSize = {
67
92
  sizeL: {
68
93
  size: 'l',
@@ -104,7 +129,7 @@ var codeAppearanceSuccess = {
104
129
  },
105
130
  };
106
131
 
107
- var codeAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, codeAppearanceDisabled), codeAppearanceRequire), codeAppearanceSize), codeAppearanceDefault), codeAppearanceStyle), codeAppearanceError), codeAppearanceSuccess);
132
+ var codeAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, codeAppearanceDisabled), codeAppearanceShape), codeAppearanceRequire), codeAppearanceSize), codeAppearanceDefault), codeAppearanceStyle), codeAppearanceError), codeAppearanceSuccess);
108
133
 
109
134
  var codeConfig = {
110
135
  appearance: codeAppearance,
@@ -117,11 +142,11 @@ function Code(props) {
117
142
  var _c = useState(''), otp = _c[0], setOtp = _c[1];
118
143
  var appearanceConfig = useAppearanceConfig(appearance, codeConfig);
119
144
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
120
- var inputBorderColorClass = propsGenerator.inputBorderColorClass, inputBorderColorHoverClass = propsGenerator.inputBorderColorHoverClass, inputBorderFocusColorClass = propsGenerator.inputBorderFocusColorClass, inputBorderWidthClass = propsGenerator.inputBorderWidthClass, inputCaretColorClass = propsGenerator.inputCaretColorClass, inputFillClass = propsGenerator.inputFillClass, inputFillHoverClass = propsGenerator.inputFillHoverClass, inputPlaceholderTextColorClass = propsGenerator.inputPlaceholderTextColorClass, inputShapeClass = propsGenerator.inputShapeClass, inputSizeClass = propsGenerator.inputSizeClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
145
+ var inputBorderColorClass = propsGenerator.inputBorderColorClass, inputBorderColorHoverClass = propsGenerator.inputBorderColorHoverClass, inputBorderFocusColorClass = propsGenerator.inputBorderFocusColorClass, inputBorderWidthClass = propsGenerator.inputBorderWidthClass, inputCaretColorClass = propsGenerator.inputCaretColorClass, inputFillClass = propsGenerator.inputFillClass, inputFillHoverClass = propsGenerator.inputFillHoverClass, inputPlaceholderTextColorClass = propsGenerator.inputPlaceholderTextColorClass, inputSizeClass = propsGenerator.inputSizeClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
121
146
  // NOTE: too many dependencies for "useCallback" and possible too many checks
122
147
  var renderInput = function (otpInputProps, index) {
123
148
  return (jsx("input", __assign({}, otpInputProps, { className: clsx('code__input', inputCaretColorClass && "caret-color_".concat(inputCaretColorClass), inputFillClass && "fill_".concat(inputFillClass), inputFillHoverClass && "fill_hover_".concat(inputFillHoverClass), inputPlaceholderTextColorClass &&
124
- "placeholder-text-color_".concat(inputPlaceholderTextColorClass), inputShapeClass && "code__input_shape_".concat(inputShapeClass), inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputBorderWidthClass && "border-width_".concat(inputBorderWidthClass), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), inputBorderColorHoverClass &&
149
+ "placeholder-text-color_".concat(inputPlaceholderTextColorClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputBorderWidthClass && "border-width_".concat(inputBorderWidthClass), inputBorderColorClass && "border-color_".concat(inputBorderColorClass), inputBorderColorHoverClass &&
125
150
  "border-color_hover_".concat(inputBorderColorHoverClass), inputBorderFocusColorClass &&
126
151
  "border-color_focus_".concat(inputBorderFocusColorClass), inputSizeClass && "code__input_size_".concat(inputSizeClass), widthClass && "width_".concat(widthClass), isSkeleton && "code__input_skeleton"), name: "code-".concat(index), autoComplete: "one-time-code", placeholder: inputPlaceholder, onBlur: function (event) {
127
152
  onBlur && onBlur(event);
@@ -3,7 +3,7 @@ import { jsx } from 'react/jsx-runtime';
3
3
  import { useMemo } from 'react';
4
4
  import clsx from 'clsx';
5
5
  import { PartySuggestions } from 'react-dadata';
6
- import { I as Input } from '../Input_es_D2mNCqiH.js';
6
+ import { I as Input } from '../Input_es_3C_YhQFo.js';
7
7
  import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
8
8
  import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
9
9
  import 'lodash/camelCase';
@@ -2,10 +2,10 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useCallback } from 'react';
3
3
  import clsx from 'clsx';
4
4
  import { DATE_PERIOD_INTERVALS } from '@itcase/common';
5
- import { D as DatePickerInput } from '../DatePicker_es_Cn7l4eD0.js';
5
+ import { D as DatePickerInput } from '../DatePicker_es_DIFs7Wgs.js';
6
6
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
7
7
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
- import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_CSRBUuRU.js';
8
+ import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_DSwPxBuZ.js';
9
9
  import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
10
10
  import 'date-fns/locale';
11
11
  import 'react-datepicker';
@@ -28,7 +28,7 @@ import '../context/UrlAssetPrefix.js';
28
28
  import '../Link_es_BnUIX0QT.js';
29
29
  import '../Text_es_BvmOR4nv.js';
30
30
  import '../Loader_es_DhNCKZ8Y.js';
31
- import '../Input_es_D2mNCqiH.js';
31
+ import '../Input_es_3C_YhQFo.js';
32
32
  import '../Label_es_DnTcY7ih.js';
33
33
  import '@itcase/icons/default';
34
34
  import 'lodash/castArray';
@@ -1,4 +1,4 @@
1
- export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_Cn7l4eD0.js';
1
+ export { D as DatePickerInput, a as datePickerAppearance, d as datePickerConfig } from '../DatePicker_es_DIFs7Wgs.js';
2
2
  import '../tslib.es6_es_Bwu1Cn-t.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -28,6 +28,6 @@ import '../context/UrlAssetPrefix.js';
28
28
  import '../Link_es_BnUIX0QT.js';
29
29
  import '../Text_es_BvmOR4nv.js';
30
30
  import '../Loader_es_DhNCKZ8Y.js';
31
- import '../Input_es_D2mNCqiH.js';
31
+ import '../Input_es_3C_YhQFo.js';
32
32
  import '../Label_es_DnTcY7ih.js';
33
33
  import '@itcase/icons/default';
@@ -0,0 +1,8 @@
1
+ const DrawerMock = {
2
+ appearance: 'surfacePrimary',
3
+ isOpenModal: true,
4
+ title: 'Title 123',
5
+ desc: 'Text 123'
6
+ };
7
+
8
+ export { DrawerMock };
@@ -70,7 +70,7 @@ function Drawer(props) {
70
70
  var prevIsOpenModalRef = useRef(null);
71
71
  var appearanceConfig = useAppearanceConfig(appearance, drawerConfig);
72
72
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
73
- var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
73
+ var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
74
74
  useEffect(function () {
75
75
  if (onClose && prevIsOpenModalRef.current === true && !isOpenModal) {
76
76
  onClose();
@@ -79,7 +79,7 @@ function Drawer(props) {
79
79
  }, [isOpenModal, onClose]);
80
80
  return (jsxs(ReactDrawer, { className: clsx('drawer', type && "drawer_type_".concat(type), className, dataTour && "dataTour-".concat(dataTour), stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
81
81
  // Drawer set prefix "EZDrawer" for any id
82
- customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, onClose: onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
82
+ customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, dataTour: dataTour, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: isOpenModal, onClose: onClickClose, children: [before && jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsx("div", { className: "drawer__close", children: jsx(Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon }) })), (title || desc) && (jsxs("div", { className: "drawer__header", children: [jsx(Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsx(Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && jsx(Divider, { width: "fill", fill: "surfaceTertiary" }), children && jsx("div", { className: "drawer__wrapper", children: children }), after && jsx("div", { className: "drawer__after", children: after })] }));
83
83
  }
84
84
 
85
85
  export { Drawer, drawerAppearance, drawerConfig };
@@ -1,4 +1,4 @@
1
- export { I as Input, a as inputAppearance, i as inputConfig } from '../Input_es_D2mNCqiH.js';
1
+ export { I as Input, a as inputAppearance, i as inputConfig } from '../Input_es_3C_YhQFo.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'clsx';
@@ -67,6 +67,31 @@ var radioAppearanceRequire = {
67
67
  },
68
68
  };
69
69
 
70
+ var radioAppearanceShape = {
71
+ circular: {
72
+ shape: 'circular',
73
+ },
74
+ rounded: {
75
+ shape: 'rounded',
76
+ },
77
+ roundedS: {
78
+ shape: 'rounded',
79
+ shapeStrength: '0_5m',
80
+ },
81
+ roundedM: {
82
+ shape: 'rounded',
83
+ shapeStrength: '1m',
84
+ },
85
+ roundedL: {
86
+ shape: 'rounded',
87
+ shapeStrength: '1_5m',
88
+ },
89
+ roundedXL: {
90
+ shape: 'rounded',
91
+ shapeStrength: '2m',
92
+ },
93
+ };
94
+
70
95
  var radioAppearanceSize = {
71
96
  sizeM: {
72
97
  size: 'm',
@@ -111,7 +136,7 @@ var radioAppearanceSuccess = {
111
136
  },
112
137
  };
113
138
 
114
- var radioAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, radioAppearanceDefault), radioAppearanceError), radioAppearanceSuccess), radioAppearanceRequire), radioAppearanceDisabled), radioAppearanceSize), radioAppearanceStyle);
139
+ var radioAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, radioAppearanceDefault), radioAppearanceError), radioAppearanceSuccess), radioAppearanceRequire), radioAppearanceDisabled), radioAppearanceSize), radioAppearanceShape), radioAppearanceStyle);
115
140
 
116
141
  var radioConfig = {
117
142
  appearance: radioAppearance,
@@ -120,23 +145,23 @@ var radioConfig = {
120
145
  },
121
146
  };
122
147
  function Radio(props) {
123
- var id = props.id, className = props.className, appearance = props.appearance, label = props.label, desc = props.desc, isDisabled = props.isDisabled, checked = props.checked, _a = props.tag, Tag = _a === void 0 ? 'label' : _a, isSkeleton = props.isSkeleton, onChange = props.onChange;
148
+ var id = props.id, className = props.className, appearance = props.appearance, label = props.label, desc = props.desc, isDisabled = props.isDisabled, checked = props.checked, _a = props.tag, Tag = _a === void 0 ? 'label' : _a, isActive = props.isActive, isSkeleton = props.isSkeleton, onChange = props.onChange;
124
149
  var appearanceConfig = useAppearanceConfig(appearance, radioConfig);
125
150
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
126
- var fillCheckmarkClass = propsGenerator.fillCheckmarkClass, fillClass = propsGenerator.fillClass, fillRadioActiveClass = propsGenerator.fillRadioActiveClass, fillRadioActiveHoverClass = propsGenerator.fillRadioActiveHoverClass, fillRadioClass = propsGenerator.fillRadioClass, fillRadioHoverClass = propsGenerator.fillRadioHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, descTextWeight = propsGenerator.descTextWeight, borderColorClass = propsGenerator.borderColorClass, borderColorRadioActiveClass = propsGenerator.borderColorRadioActiveClass, borderColorRadioActiveHoverClass = propsGenerator.borderColorRadioActiveHoverClass, borderColorRadioClass = propsGenerator.borderColorRadioClass, borderColorRadioHoverClass = propsGenerator.borderColorRadioHoverClass, _b = propsGenerator.shapeClass, shapeClass = _b === void 0 ? 'circular' : _b, sizeClass = propsGenerator.sizeClass;
127
- return (jsxs(Tag, { className: clsx(className, 'radio', fillClass && "fill_".concat(fillClass), borderColorClass && "border-color_".concat(borderColorClass), isSkeleton && 'radio_skeleton', sizeClass && "radio_size_".concat(sizeClass)), htmlFor: id, children: [jsxs("div", { className: "radio__item", children: [jsx("input", { id: id, className: "radio__input", type: "radio", disabled: isDisabled && 'disabled', checked: checked, onChange: onChange }), jsx("div", { className: clsx('radio__state', !checked
151
+ var fillCheckmarkClass = propsGenerator.fillCheckmarkClass, fillClass = propsGenerator.fillClass, fillRadioActiveClass = propsGenerator.fillRadioActiveClass, fillRadioActiveHoverClass = propsGenerator.fillRadioActiveHoverClass, fillRadioClass = propsGenerator.fillRadioClass, fillRadioHoverClass = propsGenerator.fillRadioHoverClass, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, descTextWeight = propsGenerator.descTextWeight, borderColorClass = propsGenerator.borderColorClass, borderColorRadioActiveClass = propsGenerator.borderColorRadioActiveClass, borderColorRadioActiveHoverClass = propsGenerator.borderColorRadioActiveHoverClass, borderColorRadioClass = propsGenerator.borderColorRadioClass, borderColorRadioHoverClass = propsGenerator.borderColorRadioHoverClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass;
152
+ return (jsxs(Tag, { className: clsx(className, 'radio', fillClass && "fill_".concat(fillClass), borderColorClass && "border-color_".concat(borderColorClass), isSkeleton && 'radio_skeleton', sizeClass && "radio_size_".concat(sizeClass)), htmlFor: id, children: [jsxs("div", { className: "radio__item", children: [jsx("input", { id: id, className: "radio__input", type: "radio", disabled: isDisabled && 'disabled', checked: checked, onChange: onChange }), jsx("div", { className: clsx('radio__state', !checked || !isActive
128
153
  ? fillRadioClass && "fill_".concat(fillRadioClass)
129
- : fillRadioActiveClass && "fill_active_".concat(fillRadioActiveClass), !checked
154
+ : fillRadioActiveClass && "fill_active_".concat(fillRadioActiveClass), !checked || !isActive
130
155
  ? fillRadioHoverClass && "fill_hover_".concat(fillRadioHoverClass)
131
156
  : fillRadioActiveHoverClass &&
132
- "fill_active_hover_".concat(fillRadioActiveHoverClass), !checked
157
+ "fill_active_hover_".concat(fillRadioActiveHoverClass), !checked || !isActive
133
158
  ? borderColorRadioClass && "border-color_".concat(borderColorRadioClass)
134
159
  : borderColorRadioActiveClass &&
135
- "border-color_active_".concat(borderColorRadioActiveClass), !checked
160
+ "border-color_active_".concat(borderColorRadioActiveClass), !checked || !isActive
136
161
  ? borderColorRadioHoverClass &&
137
162
  "border-color_hover_".concat(borderColorRadioHoverClass)
138
163
  : borderColorRadioActiveHoverClass &&
139
- "border-color_active_hover_".concat(borderColorRadioActiveHoverClass), shapeClass && "shape_".concat(shapeClass)), children: "\u00A0" }), jsx("div", { className: clsx('radio__state-checkmark', checked && fillCheckmarkClass && "fill_".concat(fillCheckmarkClass)), children: "\u00A0" })] }), label && (jsx(Text, { className: "radio__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "radio__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] }));
164
+ "border-color_active_hover_".concat(borderColorRadioActiveHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), children: "\u00A0" }), jsx("div", { className: clsx('radio__state-checkmark', checked && fillCheckmarkClass && "fill_".concat(fillCheckmarkClass)), children: "\u00A0" })] }), label && (jsx(Text, { className: "radio__label", size: labelTextSize, textColor: labelTextColor, textWeight: labelTextWeight, children: label })), desc && (jsx(Text, { className: "radio__desc", size: descTextSize, textColor: descTextColor, textWeight: descTextWeight, children: desc }))] }));
140
165
  }
141
166
 
142
167
  export { Radio, radioAppearance, radioConfig };
@@ -110,6 +110,31 @@ var textareaAppearanceRequire = {
110
110
  },
111
111
  };
112
112
 
113
+ var textareaAppearanceShape = {
114
+ circular: {
115
+ shape: 'circular',
116
+ },
117
+ rounded: {
118
+ shape: 'rounded',
119
+ },
120
+ roundedS: {
121
+ shape: 'rounded',
122
+ shapeStrength: '0_5m',
123
+ },
124
+ roundedM: {
125
+ shape: 'rounded',
126
+ shapeStrength: '1m',
127
+ },
128
+ roundedL: {
129
+ shape: 'rounded',
130
+ shapeStrength: '1_5m',
131
+ },
132
+ roundedXL: {
133
+ shape: 'rounded',
134
+ shapeStrength: '2m',
135
+ },
136
+ };
137
+
113
138
  var textareaAppearanceSize = {
114
139
  sizeXXL: {
115
140
  size: 'xxl',
@@ -175,7 +200,7 @@ var textareaAppearanceSuccess = {
175
200
  },
176
201
  };
177
202
 
178
- var textareaAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, textareaAppearanceDefault), textareaAppearanceError), textareaAppearanceSuccess), textareaAppearanceRequire), textareaAppearanceDisabled), textareaAppearanceSize), textareaAppearanceStyle);
203
+ var textareaAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, textareaAppearanceDefault), textareaAppearanceShape), textareaAppearanceError), textareaAppearanceSuccess), textareaAppearanceRequire), textareaAppearanceDisabled), textareaAppearanceSize), textareaAppearanceStyle);
179
204
 
180
205
  var textareaConfig = {
181
206
  appearance: textareaAppearance,
@@ -187,8 +212,8 @@ function Textarea(props) {
187
212
  var id = props.id, className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, placeholder = props.placeholder, value = props.value, onBlur = props.onBlur, onChange = props.onChange, onKeyDown = props.onKeyDown;
188
213
  var appearanceConfig = useAppearanceConfig(appearance, textareaConfig);
189
214
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
190
- var fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderHoverClass = propsGenerator.borderHoverClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
191
- return (jsx("div", { className: clsx('textarea', className, sizeClass && "textarea_size_".concat(sizeClass), shapeClass && "textarea_shape_".concat(shapeClass)), children: jsx("textarea", { id: id, className: clsx('textarea__input', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), fillClass && "fill_".concat(fillClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderHoverClass && "border-color_hover_".concat(borderHoverClass), placeholderTextColorClass &&
215
+ var fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderHoverClass = propsGenerator.borderHoverClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
216
+ return (jsx("div", { className: clsx('textarea', className, sizeClass && "textarea_size_".concat(sizeClass)), children: jsx("textarea", { id: id, className: clsx('textarea__input', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), fillClass && "fill_".concat(fillClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderHoverClass && "border-color_hover_".concat(borderHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), placeholderTextColorClass &&
192
217
  "placeholder-text-color_".concat(placeholderTextColorClass), textSizeClass && "text_size_".concat(textSizeClass), textColorClass && "text-color_".concat(textColorClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass)), disabled: isDisabled && 'disabled', placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onKeyDown: onKeyDown }) }));
193
218
  }
194
219
 
@@ -5,15 +5,11 @@
5
5
  justify-content: space-between;
6
6
  }
7
7
  }
8
- .code {
9
- &_size {
10
- @each $size in xxl, xl, l, m, s, xs, xxs {
11
- &_$(size) {
12
- ^^&__wrapper {
13
- gap: var(--code-size-$(size)-gap);
14
- }
15
- }
16
- }
8
+ .code__input {
9
+ border: none;
10
+ outline: none;
11
+ &:focus {
12
+ outline: none;
17
13
  }
18
14
  }
19
15
  .code__input {
@@ -36,18 +32,14 @@
36
32
  appearance: textfield;
37
33
  }
38
34
  }
39
- .code__input {
40
- border: none;
41
- outline: none;
42
- &:focus {
43
- outline: none;
44
- }
45
- &_shape {
46
- &_rounded {
47
- border-radius: var(--code-input-shape-rounded);
48
- }
49
- &_circular {
50
- border-radius: 50%;
35
+ .code {
36
+ &_size {
37
+ @each $size in xxl, xl, l, m, s, xs, xxs {
38
+ &_$(size) {
39
+ ^^&__wrapper {
40
+ gap: var(--code-size-$(size)-gap);
41
+ }
42
+ }
51
43
  }
52
44
  }
53
45
  }
@@ -22,10 +22,6 @@
22
22
  }
23
23
  .input {
24
24
  &_shape {
25
- &_rounded {
26
- border-radius: var(--input-shape-rounded);
27
- position: relative;
28
- }
29
25
  &_underline {
30
26
  border-left: none !important;
31
27
  border-top: none !important;
@@ -22,10 +22,6 @@
22
22
  .textarea {
23
23
  &_shape {
24
24
  &^&__input {
25
- &_rounded {
26
- border-radius: var(--textarea-shape-rounded);
27
- position: relative;
28
- }
29
25
  &_underline {
30
26
  border-left: none !important;
31
27
  border-top: none !important;
@@ -5,7 +5,7 @@ declare const chipsAppearanceShape: {
5
5
  rounded: {
6
6
  shape: string;
7
7
  };
8
- roundedL: {
8
+ roundedS: {
9
9
  shape: string;
10
10
  shapeStrength: string;
11
11
  };
@@ -13,7 +13,7 @@ declare const chipsAppearanceShape: {
13
13
  shape: string;
14
14
  shapeStrength: string;
15
15
  };
16
- roundedS: {
16
+ roundedL: {
17
17
  shape: string;
18
18
  shapeStrength: string;
19
19
  };
@@ -0,0 +1,25 @@
1
+ declare const choiceAppearanceShape: {
2
+ circular: {
3
+ shape: string;
4
+ };
5
+ rounded: {
6
+ shape: string;
7
+ };
8
+ roundedS: {
9
+ shape: string;
10
+ shapeStrength: string;
11
+ };
12
+ roundedM: {
13
+ shape: string;
14
+ shapeStrength: string;
15
+ };
16
+ roundedL: {
17
+ shape: string;
18
+ shapeStrength: string;
19
+ };
20
+ roundedXL: {
21
+ shape: string;
22
+ shapeStrength: string;
23
+ };
24
+ };
25
+ export { choiceAppearanceShape };
@@ -0,0 +1,25 @@
1
+ declare const codeAppearanceShape: {
2
+ circular: {
3
+ shape: string;
4
+ };
5
+ rounded: {
6
+ shape: string;
7
+ };
8
+ roundedS: {
9
+ shape: string;
10
+ shapeStrength: string;
11
+ };
12
+ roundedM: {
13
+ shape: string;
14
+ shapeStrength: string;
15
+ };
16
+ roundedL: {
17
+ shape: string;
18
+ shapeStrength: string;
19
+ };
20
+ roundedXL: {
21
+ shape: string;
22
+ shapeStrength: string;
23
+ };
24
+ };
25
+ export { codeAppearanceShape };
@@ -0,0 +1,25 @@
1
+ declare const inputAppearanceShape: {
2
+ circular: {
3
+ shape: string;
4
+ };
5
+ rounded: {
6
+ shape: string;
7
+ };
8
+ roundedS: {
9
+ shape: string;
10
+ shapeStrength: string;
11
+ };
12
+ roundedM: {
13
+ shape: string;
14
+ shapeStrength: string;
15
+ };
16
+ roundedL: {
17
+ shape: string;
18
+ shapeStrength: string;
19
+ };
20
+ roundedXL: {
21
+ shape: string;
22
+ shapeStrength: string;
23
+ };
24
+ };
25
+ export { inputAppearanceShape };
@@ -10,6 +10,28 @@ export declare const radioAppearance: {
10
10
  fill: string;
11
11
  borderColor: string;
12
12
  };
13
+ circular: {
14
+ shape: string;
15
+ };
16
+ rounded: {
17
+ shape: string;
18
+ };
19
+ roundedS: {
20
+ shape: string;
21
+ shapeStrength: string;
22
+ };
23
+ roundedM: {
24
+ shape: string;
25
+ shapeStrength: string;
26
+ };
27
+ roundedL: {
28
+ shape: string;
29
+ shapeStrength: string;
30
+ };
31
+ roundedXL: {
32
+ shape: string;
33
+ shapeStrength: string;
34
+ };
13
35
  sizeM: {
14
36
  size: string;
15
37
  labelTextSize: string;
@@ -0,0 +1,25 @@
1
+ declare const radioAppearanceShape: {
2
+ circular: {
3
+ shape: string;
4
+ };
5
+ rounded: {
6
+ shape: string;
7
+ };
8
+ roundedS: {
9
+ shape: string;
10
+ shapeStrength: string;
11
+ };
12
+ roundedM: {
13
+ shape: string;
14
+ shapeStrength: string;
15
+ };
16
+ roundedL: {
17
+ shape: string;
18
+ shapeStrength: string;
19
+ };
20
+ roundedXL: {
21
+ shape: string;
22
+ shapeStrength: string;
23
+ };
24
+ };
25
+ export { radioAppearanceShape };
@@ -0,0 +1,25 @@
1
+ declare const textareaAppearanceShape: {
2
+ circular: {
3
+ shape: string;
4
+ };
5
+ rounded: {
6
+ shape: string;
7
+ };
8
+ roundedS: {
9
+ shape: string;
10
+ shapeStrength: string;
11
+ };
12
+ roundedM: {
13
+ shape: string;
14
+ shapeStrength: string;
15
+ };
16
+ roundedL: {
17
+ shape: string;
18
+ shapeStrength: string;
19
+ };
20
+ roundedXL: {
21
+ shape: string;
22
+ shapeStrength: string;
23
+ };
24
+ };
25
+ export { textareaAppearanceShape };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.8.73",
3
+ "version": "1.8.75",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -103,7 +103,7 @@
103
103
  "@emotion/is-prop-valid": "^1.3.1",
104
104
  "@itcase/common": "^1.2.28",
105
105
  "@itcase/icons": "^1.2.16",
106
- "@itcase/storybook-config": "^1.1.64",
106
+ "@itcase/storybook-config": "^1.1.66",
107
107
  "@itcase/tokens-am": "^1.1.19",
108
108
  "@itcase/tokens-baikal": "^1.1.17",
109
109
  "@itcase/tokens-palette": "^1.1.11",
@@ -169,12 +169,12 @@
169
169
  "babel-plugin-react-docgen": "^4.2.1",
170
170
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
171
171
  "conventional-changelog-conventionalcommits": "^9.1.0",
172
- "eslint": "9.31.0",
172
+ "eslint": "9.32.0",
173
173
  "husky": "^9.1.7",
174
174
  "lint-staged": "^16.1.2",
175
175
  "prettier": "^3.6.2",
176
176
  "react-docgen-typescript": "^2.4.0",
177
- "rollup": "^4.45.1",
177
+ "rollup": "^4.46.0",
178
178
  "rollup-plugin-copy": "^3.5.0",
179
179
  "rollup-plugin-dts": "^6.2.1",
180
180
  "rollup-plugin-peer-deps-external": "^2.2.4",
@@ -134,17 +134,17 @@ var chipsAppearanceShape = {
134
134
  rounded: {
135
135
  shape: 'rounded',
136
136
  },
137
- roundedL: {
137
+ roundedS: {
138
138
  shape: 'rounded',
139
- shapeStrength: '1_5m',
139
+ shapeStrength: '0_5m',
140
140
  },
141
141
  roundedM: {
142
142
  shape: 'rounded',
143
143
  shapeStrength: '1m',
144
144
  },
145
- roundedS: {
145
+ roundedL: {
146
146
  shape: 'rounded',
147
- shapeStrength: '0_5m',
147
+ shapeStrength: '1_5m',
148
148
  },
149
149
  roundedXL: {
150
150
  shape: 'rounded',
@@ -132,17 +132,17 @@ var chipsAppearanceShape = {
132
132
  rounded: {
133
133
  shape: 'rounded',
134
134
  },
135
- roundedL: {
135
+ roundedS: {
136
136
  shape: 'rounded',
137
- shapeStrength: '1_5m',
137
+ shapeStrength: '0_5m',
138
138
  },
139
139
  roundedM: {
140
140
  shape: 'rounded',
141
141
  shapeStrength: '1m',
142
142
  },
143
- roundedS: {
143
+ roundedL: {
144
144
  shape: 'rounded',
145
- shapeStrength: '0_5m',
145
+ shapeStrength: '1_5m',
146
146
  },
147
147
  roundedXL: {
148
148
  shape: 'rounded',