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