@itcase/ui 1.8.122 → 1.8.123

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 (65) hide show
  1. package/dist/{Avatar_cjs_kuE0Rueg.js → Avatar_cjs_CLJnKU39.js} +1 -1
  2. package/dist/{Avatar_es_lx7s4Vla.js → Avatar_es_BgN-fbOj.js} +1 -1
  3. package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_Ce97psFT.js} +3 -3
  4. package/dist/{Button_es_CtH5EKJd.js → Button_es_CZss7cXh.js} +3 -3
  5. package/dist/{DatePicker_cjs_DsIAoi01.js → DatePicker_cjs_BzEtDAb8.js} +2 -2
  6. package/dist/{DatePicker_es_BP5BrEr-.js → DatePicker_es_DRyCMO0I.js} +2 -2
  7. package/dist/{Image_cjs_B6YlGx8G.js → Image_cjs_DRhhc66R.js} +2 -1
  8. package/dist/{Image_es_BvYo_cHH.js → Image_es_BpMidmve.js} +2 -1
  9. package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DRPK_RHK.js} +3 -3
  10. package/dist/{Input_es_CiDHjDqJ.js → Input_es_Cv5nEb_n.js} +3 -3
  11. package/dist/cjs/components/Avatar.js +2 -2
  12. package/dist/cjs/components/AvatarStack.js +2 -2
  13. package/dist/cjs/components/Button.js +1 -1
  14. package/dist/cjs/components/CookiesWarning.js +1 -1
  15. package/dist/cjs/components/Dadata.js +1 -1
  16. package/dist/cjs/components/DatePeriod.js +6 -6
  17. package/dist/cjs/components/DatePicker.js +3 -3
  18. package/dist/cjs/components/Grid.js +3 -3
  19. package/dist/cjs/components/Image.js +1 -1
  20. package/dist/cjs/components/Input.js +1 -1
  21. package/dist/cjs/components/InputPassword.js +88 -66
  22. package/dist/cjs/components/Response.js +58 -51
  23. package/dist/cjs/components/Segmented.js +5 -5
  24. package/dist/cjs/components/Tab.js +29 -45
  25. package/dist/components/Avatar.js +2 -2
  26. package/dist/components/AvatarStack.js +2 -2
  27. package/dist/components/Button.js +1 -1
  28. package/dist/components/CookiesWarning.js +1 -1
  29. package/dist/components/Dadata.js +1 -1
  30. package/dist/components/DatePeriod.js +6 -6
  31. package/dist/components/DatePicker.js +3 -3
  32. package/dist/components/Grid.js +3 -3
  33. package/dist/components/Image.js +1 -1
  34. package/dist/components/Input.js +1 -1
  35. package/dist/components/InputPassword.js +88 -66
  36. package/dist/components/Response.js +58 -51
  37. package/dist/components/Segmented.js +5 -5
  38. package/dist/components/Tab.js +29 -45
  39. package/dist/css/components/Checkmark/Checkmark.css +2 -0
  40. package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
  41. package/dist/css/components/Input/Input.css +0 -8
  42. package/dist/css/components/InputPassword/InputPassword.css +34 -43
  43. package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
  44. package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
  45. package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
  46. package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
  47. package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
  48. package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
  49. package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
  50. package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
  51. package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
  52. package/dist/types/components/Response/Response.constant.d.ts +32 -35
  53. package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
  54. package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
  55. package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
  56. package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
  57. package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
  58. package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
  59. package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
  60. package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
  61. package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
  62. package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
  63. package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
  64. package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
  65. package/package.json +13 -13
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
4
+ var _default = require('@itcase/icons/default');
4
5
  var jsxRuntime = require('react/jsx-runtime');
5
6
  var React = require('react');
6
7
  var clsx = require('clsx');
@@ -35,8 +36,10 @@ var inputPasswordAppearanceDefault = {
35
36
  textColor: 'surfaceTextPrimary',
36
37
  textColorDisabled: 'surfaceTextDisabled',
37
38
  caret: 'secondaryItemSecondary',
38
- iconBeforeFill: 'surfaceItemQuaternary',
39
- iconClearFill: 'surfaceItemPrimary',
39
+ iconFill: 'surfaceItemQuaternary',
40
+ iconRevealableHide: _default.icons24.View.HideValue,
41
+ iconRevealableShow: _default.icons24.View.ShowValue,
42
+ placeholderTextColor: 'surfaceTextQuaternary',
40
43
  },
41
44
  defaultSecondary: {
42
45
  fill: 'surfacePrimary',
@@ -45,8 +48,9 @@ var inputPasswordAppearanceDefault = {
45
48
  textColor: 'surfaceTextPrimary',
46
49
  textColorDisabled: 'surfaceTextDisabled',
47
50
  caret: 'secondaryItemSecondary',
48
- iconBeforeFill: 'surfaceItemQuaternary',
49
- iconClearFill: 'surfaceItemPrimary',
51
+ iconFill: 'surfaceItemQuaternary',
52
+ iconRevealableHide: _default.icons24.View.HideValue,
53
+ iconRevealableShow: _default.icons24.View.ShowValue,
50
54
  placeholderTextColor: 'surfaceTextQuaternary',
51
55
  },
52
56
  };
@@ -57,16 +61,18 @@ var inputPasswordAppearanceDisabled = {
57
61
  borderColor: 'errorBorderQuaternary',
58
62
  borderHover: 'errorBorderQuaternary',
59
63
  textColor: 'surfaceTextQuaternary',
60
- iconBeforeFill: 'errorItemQuaternary',
61
- iconClearFill: 'errorItemPrimary',
64
+ iconFill: 'surfaceItemQuaternary',
65
+ iconRevealableHide: _default.icons24.View.HideValue,
66
+ iconRevealableShow: _default.icons24.View.ShowValue,
62
67
  placeholderTextColor: 'surfaceTextQuaternary',
63
68
  },
64
69
  disabledSecondary: {
65
70
  fill: 'surfaceSecondary',
66
71
  borderColor: 'surfaceBorderTertiary',
67
72
  borderHover: 'surfaceBorderQuaternary',
68
- iconBeforeFill: 'surfaceItemQuaternary',
69
- iconClearFill: 'surfaceItemPrimary',
73
+ iconFill: 'surfaceItemQuaternary',
74
+ iconRevealableHide: _default.icons24.View.HideValue,
75
+ iconRevealableShow: _default.icons24.View.ShowValue,
70
76
  placeholderTextColor: 'surfaceTextSecondary',
71
77
  },
72
78
  };
@@ -77,16 +83,18 @@ var inputPasswordAppearanceError = {
77
83
  borderColor: 'errorBorderQuaternary',
78
84
  borderHover: 'errorBorderQuaternary',
79
85
  textColor: 'surfaceTextPrimary',
80
- iconBeforeFill: 'errorItemQuaternary',
81
- iconClearFill: 'errorItemPrimary',
86
+ iconFill: 'surfaceItemQuaternary',
87
+ iconRevealableHide: _default.icons24.View.HideValue,
88
+ iconRevealableShow: _default.icons24.View.ShowValue,
82
89
  placeholderTextColor: 'surfaceTextQuaternary',
83
90
  },
84
91
  errorSecondary: {
85
92
  fill: 'errorSecondary',
86
93
  borderColor: 'errorBorderTertiary',
87
94
  borderHover: 'errorBorderQuaternary',
88
- iconBeforeFill: 'errorItemQuaternary',
89
- iconClearFill: 'errorItemPrimary',
95
+ iconFill: 'surfaceItemQuaternary',
96
+ iconRevealableHide: _default.icons24.View.HideValue,
97
+ iconRevealableShow: _default.icons24.View.ShowValue,
90
98
  placeholderTextColor: 'errorTextSecondary',
91
99
  },
92
100
  };
@@ -97,92 +105,105 @@ var inputPasswordAppearanceRequire = {
97
105
  borderColor: 'warningBorderQuaternary',
98
106
  borderHover: 'warningBorderQuaternary',
99
107
  textColor: 'surfaceTextPrimary',
100
- iconBeforeFill: 'warningItemQuaternary',
101
- iconClearFill: 'warningItemPrimary',
108
+ iconFill: 'surfaceItemQuaternary',
109
+ iconRevealableHide: _default.icons24.View.HideValue,
110
+ iconRevealableShow: _default.icons24.View.ShowValue,
102
111
  placeholderTextColor: 'surfaceTextQuaternary',
103
112
  },
104
113
  requireSecondary: {
105
114
  fill: 'surfaceSecondary',
106
115
  borderColor: 'surfaceBorderTertiary',
107
116
  borderHover: 'surfaceBorderQuaternary',
108
- iconBeforeFill: 'surfaceItemQuaternary',
109
- iconClearFill: 'surfaceItemPrimary',
117
+ iconFill: 'surfaceItemQuaternary',
118
+ iconRevealableHide: _default.icons24.View.HideValue,
119
+ iconRevealableShow: _default.icons24.View.ShowValue,
110
120
  placeholderTextColor: 'surfaceTextSecondary',
111
121
  },
112
122
  };
113
123
 
124
+ var inputPasswordAppearanceShape = {
125
+ circular: {
126
+ shape: 'circular',
127
+ },
128
+ rounded: {
129
+ shape: 'rounded',
130
+ },
131
+ roundedXL: {
132
+ shape: 'rounded',
133
+ shapeStrength: '2m',
134
+ },
135
+ roundedL: {
136
+ shape: 'rounded',
137
+ shapeStrength: '1_5m',
138
+ },
139
+ roundedM: {
140
+ shape: 'rounded',
141
+ shapeStrength: '1m',
142
+ },
143
+ roundedS: {
144
+ shape: 'rounded',
145
+ shapeStrength: '0_5m',
146
+ },
147
+ };
148
+
114
149
  var inputPasswordAppearanceSize = {
115
150
  sizeXXL: {
116
151
  size: 'xxl',
117
152
  textSize: 'l',
118
- iconAfterFillSize: '24',
119
- iconAfterSize: '24',
120
- iconBeforeFillSize: '24',
121
- iconBeforeSize: '24',
153
+ iconFillSize: '24',
154
+ iconSize: '24',
122
155
  },
123
156
  sizeXL: {
124
157
  size: 'xl',
125
158
  textSize: 's',
126
- iconAfterFillSize: '24',
127
- iconAfterSize: '24',
128
- iconBeforeFillSize: '24',
129
- iconBeforeSize: '24',
159
+ iconFillSize: '24',
160
+ iconSize: '24',
130
161
  },
131
162
  sizeL: {
132
163
  size: 'l',
133
164
  textSize: 's',
134
- iconAfterFillSize: '24',
135
- iconAfterSize: '24',
136
- iconBeforeFillSize: '24',
137
- iconBeforeSize: '24',
165
+ iconFillSize: '24',
166
+ iconSize: '24',
138
167
  },
139
168
  sizeM: {
140
169
  size: 'm',
141
170
  textSize: 'm',
142
- iconAfterFillSize: '24',
143
- iconAfterSize: '24',
144
- iconBeforeFillSize: '24',
145
- iconBeforeSize: '24',
171
+ iconFillSize: '24',
172
+ iconSize: '24',
146
173
  },
147
174
  sizeS: {
148
175
  size: 's',
149
176
  textSize: 's',
150
- iconAfterFillSize: '24',
151
- iconAfterSize: '24',
152
- iconBeforeFillSize: '24',
153
- iconBeforeSize: '24',
177
+ iconFillSize: '24',
178
+ iconSize: '24',
154
179
  },
155
180
  sizeXS: {
156
181
  size: 'xs',
157
182
  textSize: 's',
158
- iconAfterFillSize: '24',
159
- iconAfterSize: '24',
160
- iconBeforeFillSize: '24',
161
- iconBeforeSize: '24',
183
+ iconFillSize: '24',
184
+ iconSize: '24',
162
185
  },
163
186
  sizeXXS: {
164
187
  size: 'xxs',
165
188
  textSize: 's',
166
- iconAfterFillSize: '24',
167
- iconAfterSize: '24',
168
- iconBeforeFillSize: '24',
169
- iconBeforeSize: '24',
189
+ iconFillSize: '24',
190
+ iconSize: '24',
170
191
  },
171
192
  };
172
193
 
173
194
  var inputPasswordAppearanceStyle = {
174
- full: {
175
- borderColor: '0',
176
- },
177
- ghost: {
178
- fill: 'none',
179
- borderColor: '0',
195
+ solid: {
196
+ borderColor: 'none',
180
197
  },
181
198
  outlined: {
182
199
  fill: 'none',
183
200
  },
184
- solid: {
185
- borderColor: '0',
201
+ full: {
202
+ borderColor: 'none',
203
+ },
204
+ ghost: {
205
+ fill: 'none',
206
+ borderColor: 'none',
186
207
  },
187
208
  };
188
209
 
@@ -192,21 +213,23 @@ var inputPasswordAppearanceSuccess = {
192
213
  borderColor: 'successBorderQuaternary',
193
214
  borderHover: 'successBorderQuaternary',
194
215
  textColor: 'surfaceTextPrimary',
195
- iconBeforeFill: 'successItemQuaternary',
196
- iconClearFill: 'successItemPrimary',
216
+ iconFill: 'surfaceItemQuaternary',
217
+ iconRevealableHide: _default.icons24.View.HideValue,
218
+ iconRevealableShow: _default.icons24.View.ShowValue,
197
219
  placeholderTextColor: 'surfaceTextQuaternary',
198
220
  },
199
221
  successSecondary: {
200
222
  fill: 'surfaceSecondary',
201
223
  borderColor: 'surfaceBorderTertiary',
202
224
  borderHover: 'surfaceBorderQuaternary',
203
- iconBeforeFill: 'surfaceItemQuaternary',
204
- iconClearFill: 'surfaceItemPrimary',
225
+ iconFill: 'surfaceItemQuaternary',
226
+ iconRevealableHide: _default.icons24.View.HideValue,
227
+ iconRevealableShow: _default.icons24.View.ShowValue,
205
228
  placeholderTextColor: 'surfaceTextSecondary',
206
229
  },
207
230
  };
208
231
 
209
- var inputPasswordAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, inputPasswordAppearanceSize), inputPasswordAppearanceDisabled), inputPasswordAppearanceRequire), inputPasswordAppearanceStyle), inputPasswordAppearanceError), inputPasswordAppearanceDefault), inputPasswordAppearanceSuccess);
232
+ var inputPasswordAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, inputPasswordAppearanceSize), inputPasswordAppearanceDisabled), inputPasswordAppearanceRequire), inputPasswordAppearanceStyle), inputPasswordAppearanceError), inputPasswordAppearanceDefault), inputPasswordAppearanceSuccess), inputPasswordAppearanceShape);
210
233
 
211
234
  var inputPasswordConfig = {
212
235
  appearance: inputPasswordAppearance,
@@ -215,22 +238,21 @@ var inputPasswordConfig = {
215
238
  },
216
239
  };
217
240
  function InputPassword(props) {
218
- var id = props.id, className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, iconFill = props.iconFill, iconFillHover = props.iconFillHover, iconRevealableHide = props.iconRevealableHide, iconRevealableShow = props.iconRevealableShow, iconShape = props.iconShape, iconSize = props.iconSize, imageRevealableHide = props.imageRevealableHide, imageRevealableShow = props.imageRevealableShow, placeholder = props.placeholder,
219
- // state,
220
- value = props.value, isRevealable = props.isRevealable, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
241
+ var id = props.id, appearance = props.appearance, className = props.className, placeholder = props.placeholder, value = props.value, isDisabled = props.isDisabled, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
221
242
  var _a = React.useState(false), isRevealed = _a[0], setIsRevealed = _a[1];
222
243
  var inputType = React.useMemo(function () {
223
244
  return isRevealed ? 'text' : 'password';
224
245
  }, [isRevealed]);
225
- var revealeHandler = React.useCallback(function (e) {
226
- e.preventDefault();
246
+ var onClickIconReveal = React.useCallback(function (event) {
247
+ event.preventDefault();
227
248
  setIsRevealed(function (prev) { return !prev; });
228
- }, [setIsRevealed]);
249
+ }, []);
229
250
  var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, inputPasswordConfig, isDisabled);
230
251
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
231
- var fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, _b = propsGenerator.sizeClass, sizeClass = _b === void 0 ? 'm' : _b, widthClass = propsGenerator.widthClass;
232
- return (jsxRuntime.jsxs("div", { className: "input-password", children: [jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), fillClass && "fill_".concat(fillClass), shapeClass && "input-password__input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), borderWidthClass && "border-width_".concat(borderWidthClass), sizeClass && "input-password__input_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), placeholderTextColorClass &&
233
- "placeholder-text-color_".concat(placeholderTextColorClass), textColorClass && "text-color_".concat(textColorClass)), type: inputType, disabled: isDisabled, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }), isRevealable && (jsxRuntime.jsx(Icon.Icon, { className: "input-password__icon", size: iconSize, iconFill: iconFill, iconFillHover: iconFillHover, imageSrc: isRevealed ? imageRevealableHide : imageRevealableShow, shape: iconShape, SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow, onClick: revealeHandler }))] }));
252
+ var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, caretClass = propsGenerator.caretClass, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconRevealableHide = propsGenerator.iconRevealableHide, iconRevealableShow = propsGenerator.iconRevealableShow, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, imageRevealableHide = propsGenerator.imageRevealableHide, imageRevealableShow = propsGenerator.imageRevealableShow, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
253
+ return (jsxRuntime.jsxs("div", { className: "input-password", children: [jsxRuntime.jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass &&
254
+ "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), caretClass && "caret-color_".concat(caretClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), placeholderTextColorClass &&
255
+ "placeholder-text-color_".concat(placeholderTextColorClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), sizeClass && "input-password__input_size_".concat(sizeClass), textColorClass && "text-color_".concat(textColorClass), textColorClass && "text-color_".concat(textColorClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass)), type: inputType, disabled: isDisabled, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }), jsxRuntime.jsx(Icon.Icon, { className: "input-password__icon", size: iconSize, iconFill: iconFill, iconFillHover: iconFillHover, imageSrc: isRevealed ? imageRevealableHide : imageRevealableShow, shape: iconShape, SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow, onClick: onClickIconReveal })] }));
234
256
  }
235
257
 
236
258
  exports.InputPassword = InputPassword;
@@ -9,7 +9,7 @@ var urlWithAssetPrefix = require('../hoc/urlWithAssetPrefix.js');
9
9
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
10
10
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
11
11
  var useStyles = require('../hooks/useStyles/useStyles.js');
12
- var Button = require('../../Button_cjs_i0Dn1pkl.js');
12
+ var Button = require('../../Button_cjs_Ce97psFT.js');
13
13
  var Group = require('../../Group_cjs_CsJ6ICKK.js');
14
14
  var Text = require('../../Text_cjs_0EINiUq4.js');
15
15
  require('@itcase/common');
@@ -38,6 +38,7 @@ var responseAppearanceConfirm = {
38
38
  titleTextSize: 'xxl',
39
39
  labelTextColor: 'surfaceTextPrimary',
40
40
  descTextSize: 'm',
41
+ imageSrc: index.responseIcon.Confirm,
41
42
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
42
43
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
43
44
  svgFill: 'surfaceTertiary',
@@ -52,6 +53,7 @@ var responseAppearanceDanger = {
52
53
  titleTextSize: 'xxl',
53
54
  labelTextColor: 'surfaceTextPrimary',
54
55
  descTextSize: 'm',
56
+ imageSrc: index.responseIcon.Danger,
55
57
  primaryButtonAppearance: 'dangerPrimary sizeXXL solid',
56
58
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
57
59
  svgFill: 'dangerPrimary',
@@ -66,6 +68,7 @@ var responseAppearanceEmpty = {
66
68
  titleTextSize: 'xxl',
67
69
  labelTextColor: 'surfaceTextPrimary',
68
70
  descTextSize: 'm',
71
+ imageSrc: index.responseIcon.Empty,
69
72
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
70
73
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
71
74
  svgFill: 'surfaceTertiary',
@@ -80,6 +83,7 @@ var responseAppearanceError = {
80
83
  titleTextSize: 'xxl',
81
84
  labelTextColor: 'surfaceTextPrimary',
82
85
  descTextSize: 'm',
86
+ imageSrc: index.responseIcon.Error,
83
87
  primaryButtonAppearance: 'errorPrimary sizeXXL solid',
84
88
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
85
89
  svgFill: 'errorPrimary',
@@ -94,6 +98,7 @@ var responseAppearanceFail = {
94
98
  titleTextSize: 'xxl',
95
99
  labelTextColor: 'surfaceTextPrimary',
96
100
  descTextSize: 'm',
101
+ imageSrc: index.responseIcon.Fail,
97
102
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
98
103
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
99
104
  svgFill: 'surfaceTertiary',
@@ -108,6 +113,7 @@ var responseAppearanceNothingFound = {
108
113
  titleTextSize: 'xxl',
109
114
  labelTextColor: 'surfaceTextPrimary',
110
115
  descTextSize: 'm',
116
+ imageSrc: index.responseIcon.NothingFound,
111
117
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
112
118
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
113
119
  svgFill: 'surfaceTertiary',
@@ -122,6 +128,7 @@ var responseAppearanceRefresh = {
122
128
  titleTextSize: 'xxl',
123
129
  labelTextColor: 'surfaceTextPrimary',
124
130
  descTextSize: 'm',
131
+ imageSrc: index.responseIcon.Refresh,
125
132
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
126
133
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
127
134
  svgFill: 'surfaceTertiary',
@@ -150,6 +157,7 @@ var responseAppearanceSuccess = {
150
157
  titleTextSize: 'xxl',
151
158
  labelTextColor: 'surfaceTextPrimary',
152
159
  descTextSize: 'm',
160
+ imageSrc: index.responseIcon.Success,
153
161
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
154
162
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
155
163
  svgFill: 'accentPrimary',
@@ -164,6 +172,7 @@ var responseAppearanceUnableLoadData = {
164
172
  titleTextSize: 'xxl',
165
173
  labelTextColor: 'surfaceTextPrimary',
166
174
  descTextSize: 'm',
175
+ imageSrc: index.responseIcon.UnableLoadData,
167
176
  primaryButtonAppearance: 'accentPrimary sizeXXL solid',
168
177
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
169
178
  svgFill: 'surfaceTertiary',
@@ -178,6 +187,7 @@ var responseAppearanceWarning = {
178
187
  titleTextSize: 'xxl',
179
188
  labelTextColor: 'surfaceTextPrimary',
180
189
  descTextSize: 'm',
190
+ imageSrc: index.responseIcon.Warning,
181
191
  primaryButtonAppearance: 'warningPrimary sizeXXL solid',
182
192
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid',
183
193
  svgFill: 'warningPrimary',
@@ -234,81 +244,78 @@ var Response = urlWithAssetPrefix.urlWithAssetPrefix(function Response(props) {
234
244
  });
235
245
 
236
246
  var RESPONSE_MESSAGES = {
247
+ empty: {
248
+ appearance: 'refresh ghost',
249
+ title: ' Список пуст',
250
+ desc: 'Нет данных по заданным параметрам',
251
+ code: '500',
252
+ imageSrc: index.responseIcon.Empty,
253
+ primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
254
+ primaryButtonLabel: 'ОК',
255
+ },
237
256
  error: {
238
- imageSrc: index.responseIcon.Error,
239
257
  appearance: 'error ghost',
240
258
  title: 'Ошибка',
241
- code: '500',
242
259
  desc: 'Возникла проблема с обработкой вашего запроса. Повторите попытку позже или обратитесь в поддержку по электронной почте: support@example.com',
243
- primaryButtonLabel: 'ОК',
260
+ code: '500',
261
+ imageSrc: index.responseIcon.Error,
244
262
  primaryButtonAppearance: 'errorPrimary sizeXXL solid rounded',
245
- secondaryButtonLabel: 'Отмена',
263
+ primaryButtonLabel: 'ОК',
246
264
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
247
- },
248
- errorRequest: {
249
- imageSrc: index.responseIcon.UnableLoadData,
250
- appearance: 'refresh ghost',
251
- title: 'Доступ ограничен',
252
- code: '403',
253
- desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
254
- primaryButtonLabel: 'Повторить',
255
- primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
256
265
  secondaryButtonLabel: 'Отмена',
257
- secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
258
266
  },
259
- timeout: {
260
- imageSrc: index.responseIcon.UnableLoadData,
261
- appearance: 'unableLoadData ghost',
262
- title: 'Ошибка соединения',
263
- code: '503',
264
- desc: 'Не удалось подключиться.Проверьте интернет-соединение и повторите попытку',
265
- primaryButtonLabel: 'Обновить',
266
- primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
267
+ warning: {
268
+ appearance: 'warning ghost',
269
+ title: 'Внимание',
270
+ imageSrc: index.responseIcon.Warning,
271
+ primaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
272
+ primaryButtonLabel: 'Повторить',
273
+ secondaryButtonAppearance: 'warningPrimary sizeXXL solid rounded',
267
274
  secondaryButtonLabel: 'Отмена',
268
- secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
269
275
  },
270
- unableLoadData: {
271
- imageSrc: index.responseIcon.Error,
272
- appearance: 'unableLoadData ghost',
273
- title: 'Ошибка загрузки',
276
+ success: {
277
+ appearance: 'refresh ghost',
278
+ title: 'Готово',
279
+ desc: 'Успешно выполнено',
274
280
  code: '500',
275
- desc: 'Данные не загружены, проверьте подключение к интернету или повторите попытку',
276
- primaryButtonLabel: 'Повторить',
277
- primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
278
- secondaryButtonLabel: 'Отмена',
281
+ imageSrc: index.responseIcon.Success,
282
+ primaryButtonAppearance: 'successPrimary sizeXXL solid rounded',
283
+ primaryButtonLabel: 'ОК',
279
284
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
285
+ secondaryButtonLabel: 'Закрыть',
280
286
  },
281
287
  nothingFound: {
282
- imageSrc: index.responseIcon.NothingFound,
283
288
  appearance: 'refresh ghost',
284
289
  title: 'Ничего не найдено',
285
- code: '500',
286
290
  desc: 'Нет данных по заданным параметрам',
287
- primaryButtonLabel: 'Повторить',
291
+ code: '500',
292
+ imageSrc: index.responseIcon.NothingFound,
288
293
  primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
289
- secondaryButtonLabel: 'Отмена',
294
+ primaryButtonLabel: 'Сбросить',
290
295
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
296
+ secondaryButtonLabel: 'Отмена',
291
297
  },
292
- empty: {
293
- imageSrc: index.responseIcon.Empty,
294
- appearance: 'refresh ghost',
295
- title: 'Ничего не найдено',
296
- code: '500',
297
- desc: 'Нет данных по заданным параметрам',
298
- primaryButtonLabel: 'Сбросить',
298
+ errorNetwork: {
299
+ appearance: 'unableLoadData ghost',
300
+ title: 'Ошибка соединения',
301
+ desc: 'Не удалось подключиться.Проверьте интернет-соединение и повторите попытку',
302
+ code: '503',
303
+ imageSrc: index.responseIcon.UnableLoadData,
299
304
  primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
300
- secondaryButtonLabel: 'Отмена',
305
+ primaryButtonLabel: 'Обновить',
301
306
  secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
307
+ secondaryButtonLabel: 'Отмена',
302
308
  },
303
- success: {
304
- imageSrc: index.responseIcon.Success,
309
+ errorRequest: {
305
310
  appearance: 'refresh ghost',
306
- title: 'Готово',
307
- code: '500',
308
- desc: 'Успешно выполнено',
309
- primaryButtonLabel: 'ОК',
311
+ title: 'Доступ ограничен',
312
+ desc: 'Для выяснения причин и восстановления доступа обратитесь, пожалуйста, в техническую поддержку по электронной почте: support@example.com',
313
+ code: '403',
314
+ imageSrc: index.responseIcon.UnableLoadData,
310
315
  primaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
311
- secondaryButtonLabel: 'Закрыть',
316
+ primaryButtonLabel: 'Повторить',
317
+ secondaryButtonAppearance: 'surfaceSecondary sizeXXL solid rounded',
318
+ secondaryButtonLabel: 'Отмена',
312
319
  },
313
320
  };
314
321
 
@@ -213,7 +213,7 @@ var segmentedConfig = {
213
213
  },
214
214
  };
215
215
  var Segmented = function (props) {
216
- var className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, segments = props.segments, isDisabled = props.isDisabled, setActiveSegment = props.setActiveSegment, isSkeleton = props.isSkeleton, onChange = props.onChange;
216
+ var appearance = props.appearance, className = props.className, name = props.name, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, segments = props.segments, isDisabled = props.isDisabled, isSkeleton = props.isSkeleton, setActiveSegment = props.setActiveSegment, onChange = props.onChange;
217
217
  var controlRef = React.useRef(null);
218
218
  var segmentsRefs = React.useMemo(function () {
219
219
  return new Map(segments.map(function (item) { return [item.value, React.createRef()]; }));
@@ -237,7 +237,7 @@ var Segmented = function (props) {
237
237
  }, [activeSegment, segmentsRefs]);
238
238
  var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, segmentedConfig, isDisabled);
239
239
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
240
- var 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, labelTextWrap = propsGenerator.labelTextWrap, iconFillDisabled = propsGenerator.iconFillDisabled, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
240
+ var 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, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconFillDisabled = propsGenerator.iconFillDisabled, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
241
241
  return (jsxRuntime.jsx("div", { className: clsx(className, 'segmented', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "segmented_skeleton"), ref: controlRef, children: jsxRuntime.jsx("div", { className: "segmented__wrapper", children: jsxRuntime.jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) {
242
242
  var isActive = String(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) === String(item.value);
243
243
  return (jsxRuntime.jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && "segmented__item_size_".concat(sizeClass), isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
@@ -247,11 +247,11 @@ var Segmented = function (props) {
247
247
  : fillActiveHoverClass &&
248
248
  "fill_active_hover_".concat(fillActiveHoverClass), isActive &&
249
249
  fillActiveClass &&
250
- "fill_active_".concat(fillActiveClass)), ref: segmentsRefs.get(item.value), onClick: function () { return !isDisabled && onChangeValue(item); }, children: jsxRuntime.jsxs("div", { className: clsx('segmented__item-label', sizeClass && "segmented_size_".concat(sizeClass)), children: [item.iconBefore || item.iconBeforeActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive
250
+ "fill_active_".concat(fillActiveClass)), ref: segmentsRefs.get(item.value), onClick: function () { return !isDisabled && onChangeValue(item); }, children: jsxRuntime.jsxs("div", { className: clsx('segmented__item-label', sizeClass && "segmented_size_".concat(sizeClass)), children: [item.iconBefore || item.iconBeforeActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
251
251
  ? item.iconBeforeActive || item.iconBefore
252
- : item.iconBefore, isActive: isActive })) : null, item.label && (jsxRuntime.jsx(Text.Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWrap: labelTextWrap, isActive: isActive, children: item.label })), item.icon || item.iconActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive })) : null, item.iconAfter || item.iconAfterActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive
252
+ : item.iconBefore, isActive: isActive, isDisabled: isDisabled })) : null, item.label && (jsxRuntime.jsx(Text.Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWrap: labelTextWrap, isActive: isActive, children: item.label })), item.icon || item.iconActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive, isDisabled: isDisabled })) : null, item.iconAfter || item.iconAfterActive ? (jsxRuntime.jsx(Icon.Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
253
253
  ? item.iconAfterActive || item.iconAfter
254
- : item.iconAfter, isActive: isActive })) : null] }) }, "".concat(name, "-").concat(item.value)));
254
+ : item.iconAfter, isActive: isActive, isDisabled: isDisabled })) : null] }) }, "".concat(name, "-").concat(item.value)));
255
255
  }), jsxRuntime.jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass)) })] }) }) }));
256
256
  };
257
257