@itcase/ui 1.8.123 → 1.8.124

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 (240) hide show
  1. package/dist/Avatar_cjs_mojzcWRL.js +161 -0
  2. package/dist/Avatar_es_BFom0nAS.js +157 -0
  3. package/dist/{Button_cjs_Ce97psFT.js → Button_cjs_CZz8OjWi.js} +39 -27
  4. package/dist/{Button_es_CZss7cXh.js → Button_es_Cn3wtv3M.js} +39 -27
  5. package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
  7. package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
  8. package/dist/DatePicker_es_D1LvY5RT.js +178 -0
  9. package/dist/Divider_cjs_DrmV2ezS.js +105 -0
  10. package/dist/Divider_es_BiYozVBS.js +101 -0
  11. package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
  12. package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
  13. package/dist/Group_cjs_DmfeUcFI.js +59 -0
  14. package/dist/Group_es_BU5k8f5S.js +55 -0
  15. package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
  17. package/dist/Image_cjs_CBDMUzv_.js +29 -0
  18. package/dist/Image_es_BHec4iVN.js +27 -0
  19. package/dist/{Input_cjs_DRPK_RHK.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_Cv5nEb_n.js → Input_es_BnCXATnh.js} +27 -19
  21. package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
  23. package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
  24. package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
  25. package/dist/Loader_cjs_DIDsIq3J.js +143 -0
  26. package/dist/Loader_es_CmSggwbR.js +139 -0
  27. package/dist/Overlay_cjs_tGA2fU43.js +42 -0
  28. package/dist/Overlay_es_BS7OTFoy.js +38 -0
  29. package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
  30. package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
  31. package/dist/Text_cjs_BDTjOTVB.js +69 -0
  32. package/dist/Text_es_CnymlElo.js +65 -0
  33. package/dist/cjs/components/Accordion.js +37 -34
  34. package/dist/cjs/components/Avatar.js +5 -6
  35. package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
  36. package/dist/cjs/components/AvatarStack.js +17 -16
  37. package/dist/cjs/components/Badge.js +3 -4
  38. package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
  39. package/dist/cjs/components/Breadcrumbs.js +27 -23
  40. package/dist/cjs/components/Button.js +5 -6
  41. package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
  42. package/dist/cjs/components/Cell.js +28 -25
  43. package/dist/cjs/components/Checkbox.js +33 -26
  44. package/dist/cjs/components/Checkmark.js +28 -23
  45. package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
  46. package/dist/cjs/components/Chips.js +4 -5
  47. package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
  48. package/dist/cjs/components/Choice.js +46 -40
  49. package/dist/cjs/components/Code.js +34 -26
  50. package/dist/cjs/components/CookiesWarning.js +23 -23
  51. package/dist/cjs/components/Dadata.js +14 -9
  52. package/dist/cjs/components/DatePeriod.js +32 -30
  53. package/dist/cjs/components/DatePicker.js +8 -9
  54. package/dist/cjs/components/Divider.js +1 -2
  55. package/dist/cjs/components/Dot.js +5 -6
  56. package/dist/cjs/components/Drawer.js +23 -21
  57. package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
  58. package/dist/cjs/components/Dropdown.js +5 -6
  59. package/dist/cjs/components/Flex.js +11 -12
  60. package/dist/cjs/components/Grid.js +15 -16
  61. package/dist/cjs/components/Group.js +1 -2
  62. package/dist/cjs/components/HTMLContent.js +5 -6
  63. package/dist/cjs/components/HeroTitle.js +17 -16
  64. package/dist/cjs/components/Icon.js +3 -4
  65. package/dist/cjs/components/Image.js +1 -2
  66. package/dist/cjs/components/Input.js +1 -2
  67. package/dist/cjs/components/InputPassword.js +34 -26
  68. package/dist/cjs/components/Label.js +4 -5
  69. package/dist/cjs/components/Link.js +1 -2
  70. package/dist/cjs/components/List.js +39 -28
  71. package/dist/cjs/components/Loader.js +2 -3
  72. package/dist/cjs/components/Logo.js +10 -11
  73. package/dist/cjs/components/MenuItem.js +36 -33
  74. package/dist/cjs/components/Modal.js +40 -38
  75. package/dist/cjs/components/ModalSheetBottom.js +17 -18
  76. package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
  77. package/dist/cjs/components/Notification.js +31 -24
  78. package/dist/cjs/components/Overlay.js +1 -2
  79. package/dist/cjs/components/Pagination.js +43 -41
  80. package/dist/cjs/components/Radio.js +34 -26
  81. package/dist/cjs/components/RangeSlider.js +8 -9
  82. package/dist/cjs/components/Response/img.js +1 -1
  83. package/dist/cjs/components/Response.js +45 -34
  84. package/dist/cjs/components/SVGContent.js +6 -7
  85. package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
  86. package/dist/cjs/components/ScrollOnDrag.js +7 -8
  87. package/dist/cjs/components/ScrollToView.js +8 -9
  88. package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
  89. package/dist/cjs/components/Scrollbar.js +1 -1
  90. package/dist/cjs/components/Search.js +39 -31
  91. package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
  92. package/dist/cjs/components/Segmented.js +46 -41
  93. package/dist/cjs/components/Select.js +118 -113
  94. package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
  95. package/dist/cjs/components/Swiper.js +27 -29
  96. package/dist/cjs/components/Switch.js +33 -26
  97. package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
  98. package/dist/cjs/components/Tab.js +33 -27
  99. package/dist/cjs/components/Text.js +1 -2
  100. package/dist/cjs/components/Textarea.js +26 -18
  101. package/dist/cjs/components/Tile.js +21 -17
  102. package/dist/cjs/components/Title.js +3 -4
  103. package/dist/cjs/components/Tooltip.js +3 -4
  104. package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
  105. package/dist/cjs/components/Video.js +3 -4
  106. package/dist/cjs/components/Warning.js +26 -20
  107. package/dist/cjs/context/Notifications.js +38 -42
  108. package/dist/cjs/context/UIContext.js +19 -17
  109. package/dist/cjs/context/UrlAssetPrefix.js +3 -3
  110. package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
  111. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  112. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  113. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
  114. package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  115. package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
  116. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  117. package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
  118. package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
  119. package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
  120. package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
  121. package/dist/cjs/hooks/useStyles.js +0 -1
  122. package/dist/cjs/hooks/useViewportFix.js +5 -5
  123. package/dist/cjs/hooks.js +1 -1
  124. package/dist/cjs/utils/setViewportProperty.js +3 -3
  125. package/dist/components/Accordion.js +37 -34
  126. package/dist/components/Avatar.js +5 -6
  127. package/dist/components/AvatarStack/stories/__mock__.js +1 -1
  128. package/dist/components/AvatarStack.js +17 -16
  129. package/dist/components/Badge.js +3 -4
  130. package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
  131. package/dist/components/Breadcrumbs.js +27 -23
  132. package/dist/components/Button.js +5 -6
  133. package/dist/components/Cell/stories/__mock__.js +1 -1
  134. package/dist/components/Cell.js +28 -25
  135. package/dist/components/Checkbox.js +33 -26
  136. package/dist/components/Checkmark.js +28 -23
  137. package/dist/components/Chips/stories/__mock__.js +1 -1
  138. package/dist/components/Chips.js +4 -5
  139. package/dist/components/Choice/stories/__mock__.js +2 -2
  140. package/dist/components/Choice.js +46 -40
  141. package/dist/components/Code.js +34 -26
  142. package/dist/components/CookiesWarning.js +23 -23
  143. package/dist/components/Dadata.js +14 -9
  144. package/dist/components/DatePeriod.js +32 -30
  145. package/dist/components/DatePicker.js +8 -9
  146. package/dist/components/Divider.js +1 -2
  147. package/dist/components/Dot.js +5 -6
  148. package/dist/components/Drawer.js +23 -21
  149. package/dist/components/Dropdown/stories/__mock__.js +6 -6
  150. package/dist/components/Dropdown.js +5 -6
  151. package/dist/components/Flex.js +11 -12
  152. package/dist/components/Grid.js +15 -16
  153. package/dist/components/Group.js +1 -2
  154. package/dist/components/HTMLContent.js +5 -6
  155. package/dist/components/HeroTitle.js +17 -16
  156. package/dist/components/Icon.js +3 -4
  157. package/dist/components/Image.js +1 -2
  158. package/dist/components/Input.js +1 -2
  159. package/dist/components/InputPassword.js +34 -26
  160. package/dist/components/Label.js +4 -5
  161. package/dist/components/Link.js +1 -2
  162. package/dist/components/List.js +39 -28
  163. package/dist/components/Loader.js +2 -3
  164. package/dist/components/Logo.js +10 -11
  165. package/dist/components/MenuItem.js +36 -33
  166. package/dist/components/Modal.js +40 -38
  167. package/dist/components/ModalSheetBottom.js +17 -18
  168. package/dist/components/Notification/stories/__mock__.js +1 -1
  169. package/dist/components/Notification.js +31 -24
  170. package/dist/components/Overlay.js +1 -2
  171. package/dist/components/Pagination.js +43 -41
  172. package/dist/components/Radio.js +34 -26
  173. package/dist/components/RangeSlider.js +8 -9
  174. package/dist/components/Response/img.js +1 -1
  175. package/dist/components/Response.js +45 -34
  176. package/dist/components/SVGContent.js +6 -7
  177. package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
  178. package/dist/components/ScrollOnDrag.js +7 -8
  179. package/dist/components/ScrollToView.js +8 -9
  180. package/dist/components/Scrollbar/stories/__mock__.js +1 -1
  181. package/dist/components/Scrollbar.js +1 -1
  182. package/dist/components/Search.js +39 -31
  183. package/dist/components/Segmented/stories/__mock__.js +23 -10
  184. package/dist/components/Segmented.js +46 -41
  185. package/dist/components/Select.js +118 -113
  186. package/dist/components/Swiper/stories/__mock__.js +3 -3
  187. package/dist/components/Swiper.js +27 -29
  188. package/dist/components/Switch.js +33 -26
  189. package/dist/components/Tab/stories/__mock__.js +1 -1
  190. package/dist/components/Tab.js +33 -27
  191. package/dist/components/Text.js +1 -2
  192. package/dist/components/Textarea.js +26 -18
  193. package/dist/components/Tile.js +21 -17
  194. package/dist/components/Title.js +3 -4
  195. package/dist/components/Tooltip.js +3 -4
  196. package/dist/components/Video/stories/__mocks__.js +1 -1
  197. package/dist/components/Video.js +3 -4
  198. package/dist/components/Warning.js +26 -20
  199. package/dist/context/Notifications.js +38 -42
  200. package/dist/context/UIContext.js +19 -17
  201. package/dist/context/UrlAssetPrefix.js +3 -3
  202. package/dist/css/components/Tile/Tile.css +3 -3
  203. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  204. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  205. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  206. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  207. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  208. package/dist/hooks/useAppearanceConfig.js +0 -1
  209. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  210. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  211. package/dist/hooks/useDeviceTargetClass.js +0 -1
  212. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  213. package/dist/hooks/useStyles/useStyles.js +0 -1
  214. package/dist/hooks/useStyles.js +0 -1
  215. package/dist/hooks/useViewportFix.js +5 -5
  216. package/dist/hooks.js +1 -1
  217. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  218. package/dist/utils/setViewportProperty.js +3 -3
  219. package/package.json +3 -3
  220. package/dist/Avatar_cjs_CLJnKU39.js +0 -157
  221. package/dist/Avatar_es_BgN-fbOj.js +0 -153
  222. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  223. package/dist/DatePicker_cjs_BzEtDAb8.js +0 -183
  224. package/dist/DatePicker_es_DRyCMO0I.js +0 -179
  225. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  226. package/dist/Divider_es_CCLBFIx6.js +0 -93
  227. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  228. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  229. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  230. package/dist/Group_es_DRqIIM9m.js +0 -55
  231. package/dist/Image_cjs_DRhhc66R.js +0 -29
  232. package/dist/Image_es_BpMidmve.js +0 -27
  233. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  234. package/dist/Loader_es_BUSqFrCd.js +0 -128
  235. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  236. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  237. package/dist/Text_cjs_0EINiUq4.js +0 -68
  238. package/dist/Text_es_CwV9rjFD.js +0 -64
  239. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  240. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -4,10 +4,9 @@ import clsx from 'clsx';
4
4
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
5
5
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
6
6
  import { useStyles } from '../hooks/useStyles/useStyles.js';
7
- import { I as Icon } from '../Icon_es_BrwLifge.js';
8
- import { L as Loader } from '../Loader_es_BUSqFrCd.js';
9
- import { T as Text } from '../Text_es_CwV9rjFD.js';
10
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
7
+ import { I as Icon } from '../Icon_es_D5eiycFI.js';
8
+ import { L as Loader } from '../Loader_es_CmSggwbR.js';
9
+ import { T as Text } from '../Text_es_CnymlElo.js';
11
10
  import 'lodash/camelCase';
12
11
  import 'lodash/castArray';
13
12
  import 'lodash/upperFirst';
@@ -24,9 +23,9 @@ import 'lodash/maxBy';
24
23
  import 'react-inlinesvg';
25
24
  import '../hoc/urlWithAssetPrefix.js';
26
25
  import '../context/UrlAssetPrefix.js';
27
- import '../Link_es_XiqbdwLp.js';
26
+ import '../Link_es_P2b6ya7P.js';
28
27
 
29
- var choiceAppearanceDefault = {
28
+ const choiceAppearanceDefault = {
30
29
  defaultPrimary: {
31
30
  fill: 'surfaceSecondary',
32
31
  fillItem: 'surfaceSecondary',
@@ -45,7 +44,7 @@ var choiceAppearanceDefault = {
45
44
  },
46
45
  };
47
46
 
48
- var choiceAppearanceDisabled = {
47
+ const choiceAppearanceDisabled = {
49
48
  disabledPrimary: {
50
49
  fill: 'surfaceDisabled',
51
50
  fillItem: 'surfaceDisabled',
@@ -64,7 +63,7 @@ var choiceAppearanceDisabled = {
64
63
  },
65
64
  };
66
65
 
67
- var choiceAppearanceError = {
66
+ const choiceAppearanceError = {
68
67
  errorPrimary: {
69
68
  fill: 'errorTertiary',
70
69
  fillItem: 'errorItemTertiary',
@@ -82,7 +81,7 @@ var choiceAppearanceError = {
82
81
  },
83
82
  };
84
83
 
85
- var choiceAppearanceRequire = {
84
+ const choiceAppearanceRequire = {
86
85
  requirePrimary: {
87
86
  fill: 'warningTertiary',
88
87
  fillItem: 'warningTertiary',
@@ -100,7 +99,7 @@ var choiceAppearanceRequire = {
100
99
  },
101
100
  };
102
101
 
103
- var choiceAppearanceShape = {
102
+ const choiceAppearanceShape = {
104
103
  circular: {
105
104
  shape: 'circular',
106
105
  },
@@ -125,7 +124,7 @@ var choiceAppearanceShape = {
125
124
  },
126
125
  };
127
126
 
128
- var choiceAppearanceSize = {
127
+ const choiceAppearanceSize = {
129
128
  sizeL: {
130
129
  size: 'l',
131
130
  labelTextSize: 'm',
@@ -143,7 +142,7 @@ var choiceAppearanceSize = {
143
142
  },
144
143
  };
145
144
 
146
- var choiceAppearanceStyle = {
145
+ const choiceAppearanceStyle = {
147
146
  solid: {
148
147
  borderColor: 'none',
149
148
  },
@@ -161,7 +160,7 @@ var choiceAppearanceStyle = {
161
160
  },
162
161
  };
163
162
 
164
- var choiceAppearanceSuccess = {
163
+ const choiceAppearanceSuccess = {
165
164
  successPrimary: {
166
165
  fill: 'successTertiary',
167
166
  fillItem: 'successTertiary',
@@ -179,54 +178,61 @@ var choiceAppearanceSuccess = {
179
178
  },
180
179
  };
181
180
 
182
- var choiceAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, choiceAppearanceError), choiceAppearanceDisabled), choiceAppearanceDefault), choiceAppearanceSuccess), choiceAppearanceRequire), choiceAppearanceStyle), choiceAppearanceShape), choiceAppearanceSize);
181
+ const choiceAppearance = {
182
+ ...choiceAppearanceError,
183
+ ...choiceAppearanceDisabled,
184
+ ...choiceAppearanceDefault,
185
+ ...choiceAppearanceSuccess,
186
+ ...choiceAppearanceRequire,
187
+ ...choiceAppearanceStyle,
188
+ ...choiceAppearanceShape,
189
+ ...choiceAppearanceSize,
190
+ };
183
191
 
184
- var choiceConfig = {
192
+ const choiceConfig = {
185
193
  appearance: choiceAppearance,
186
- setAppearance: function (appearanceConfig) {
194
+ setAppearance: (appearanceConfig) => {
187
195
  choiceConfig.appearance = appearanceConfig;
188
196
  },
189
197
  };
190
198
  function Choice(props) {
191
- var id = props.id, dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, name = props.name, appearance = props.appearance, _a = props.isDisabled, isDisabled = _a === void 0 ? false : _a, _b = props.active, active = _b === void 0 ? { value: undefined } : _b, itemAfter = props.itemAfter, itemBefore = props.itemBefore, _c = props.options, options = _c === void 0 ? [] : _c, setActiveSegment = props.setActiveSegment, before = props.before, after = props.after, _d = props.isCheckbox, isCheckbox = _d === void 0 ? false : _d, _e = props.isLoading, isLoading = _e === void 0 ? false : _e, isSkeleton = props.isSkeleton;
192
- var controlRef = useRef(null);
193
- var optionsRefs = useMemo(function () {
194
- return new Map(options.map(function (item) { return [item.value, createRef()]; }));
195
- }, [options]);
196
- var onChange = useCallback(function (event, item) {
197
- var isChecked = isCheckbox ? event.target.checked : true;
199
+ const { id, dataTestId, dataTour, className, name, appearance, isDisabled = false, active = { value: undefined }, itemAfter, itemBefore, options = [], setActiveSegment, before, after, isCheckbox = false, isLoading = false, isSkeleton, } = props;
200
+ const controlRef = useRef(null);
201
+ const optionsRefs = useMemo(() => new Map(options.map((item) => [item.value, createRef()])), [options]);
202
+ const onChange = useCallback((event, item) => {
203
+ const isChecked = isCheckbox ? event.target.checked : true;
198
204
  setActiveSegment && setActiveSegment(item, isChecked);
199
205
  }, [isCheckbox, setActiveSegment]);
200
- var appearanceConfig = useAppearanceConfig(appearance, choiceConfig, isDisabled);
201
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
202
- var size = propsGenerator.size, fillClass = propsGenerator.fillClass, fillItemActiveClass = propsGenerator.fillItemActiveClass, fillItemActiveDisabledClass = propsGenerator.fillItemActiveDisabledClass, fillItemActiveHoverClass = propsGenerator.fillItemActiveHoverClass, fillItemClass = propsGenerator.fillItemClass, fillItemDisabledClass = propsGenerator.fillItemDisabledClass, fillItemHoverClass = propsGenerator.fillItemHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextColor = propsGenerator.labelTextColor, labelTextSize = propsGenerator.labelTextSize, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, iconAfterFillDisabled = propsGenerator.iconAfterFillDisabled, iconBeforeFillDisabled = propsGenerator.iconBeforeFillDisabled, iconFillDisabled = propsGenerator.iconFillDisabled, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillActive = propsGenerator.iconAfterFillActive, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillActive = propsGenerator.iconBeforeFillActive, iconBeforeSize = propsGenerator.iconBeforeSize, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, wrapClass = propsGenerator.wrapClass;
203
- var styles = useStyles(props).styles;
204
- return (jsxs("div", { id: id, className: clsx(className, 'choice', size && "choice_size_".concat(size), fillClass && "fill_".concat(fillClass), wrapClass && "choice_wrap_".concat(wrapClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), isSkeleton && "choice_skeleton"), ref: controlRef, "data-test-id": dataTestId && "".concat(dataTestId, "Choice"), "data-tour": dataTour, style: styles, children: [before && jsx("div", { className: "choice__before", children: before }), isLoading ? (jsx(Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent" })) : (jsx(React.Fragment, { children: options.map(function (item) {
205
- var isActive = typeof active === 'object'
206
+ const appearanceConfig = useAppearanceConfig(appearance, choiceConfig, isDisabled);
207
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
208
+ const { size, fillClass, fillItemActiveClass, fillItemActiveDisabledClass, fillItemActiveHoverClass, fillItemClass, fillItemDisabledClass, fillItemHoverClass, labelTextActiveColor, labelTextColor, labelTextSize, labelTextWeight, labelTextWrap, iconAfterFillDisabled, iconBeforeFillDisabled, iconFillDisabled, borderColorClass, borderTypeClass, borderWidthClass, iconAfterFill, iconAfterFillActive, iconAfterSize, iconBeforeFill, iconBeforeFillActive, iconBeforeSize, iconFill, iconFillActive, iconSize, shapeClass, shapeStrengthClass, wrapClass, } = propsGenerator;
209
+ const { styles } = useStyles(props);
210
+ return (jsxs("div", { id: id, className: clsx(className, 'choice', size && `choice_size_${size}`, fillClass && `fill_${fillClass}`, wrapClass && `choice_wrap_${wrapClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, isSkeleton && `choice_skeleton`), ref: controlRef, "data-test-id": dataTestId && `${dataTestId}Choice`, "data-tour": dataTour, style: styles, children: [before && jsx("div", { className: "choice__before", children: before }), isLoading ? (jsx(Loader, { width: "fill", height: "fill", fill: "surfacePrimary", itemFill: "surfaceItemAccent" })) : (jsx(React.Fragment, { children: options.map((item) => {
211
+ const isActive = typeof active === 'object'
206
212
  ? String(item.value) === String(active.value)
207
213
  : String(item.value) === String(active);
208
- return (jsxs("div", { className: clsx('choice__item', size && "choice__item_size_".concat(size), (item.icon || item.iconActive) && 'choice__item_icon', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), !isActive && !isDisabled
209
- ? fillItemClass && "fill_".concat(fillItemClass)
214
+ return (jsxs("div", { className: clsx('choice__item', size && `choice__item_size_${size}`, (item.icon || item.iconActive) && 'choice__item_icon', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, !isActive && !isDisabled
215
+ ? fillItemClass && `fill_${fillItemClass}`
210
216
  : fillItemDisabledClass &&
211
- "fill_disabled_".concat(fillItemDisabledClass), !isActive && !isDisabled
212
- ? fillItemHoverClass && "fill_hover_".concat(fillItemHoverClass)
217
+ `fill_disabled_${fillItemDisabledClass}`, !isActive && !isDisabled
218
+ ? fillItemHoverClass && `fill_hover_${fillItemHoverClass}`
213
219
  : fillItemActiveHoverClass &&
214
- "fill_active_hover_".concat(fillItemActiveHoverClass), isActive
220
+ `fill_active_hover_${fillItemActiveHoverClass}`, isActive
215
221
  ? !isDisabled
216
222
  ? fillItemActiveClass &&
217
- "fill_active_".concat(fillItemActiveClass)
223
+ `fill_active_${fillItemActiveClass}`
218
224
  : fillItemActiveDisabledClass &&
219
- "fill_active_disabled_".concat(fillItemActiveDisabledClass)
225
+ `fill_active_disabled_${fillItemActiveDisabledClass}`
220
226
  : !isDisabled
221
- ? fillItemClass && "fill_".concat(fillItemClass)
227
+ ? fillItemClass && `fill_${fillItemClass}`
222
228
  : fillItemDisabledClass &&
223
- "fill_disabled_".concat(fillItemDisabledClass), !isActive && isDisabled && 'choice__item_state_disabled', isActive &&
229
+ `fill_disabled_${fillItemDisabledClass}`, !isActive && isDisabled && 'choice__item_state_disabled', isActive &&
224
230
  isDisabled &&
225
- 'choice__item_active_state_disabled', isActive && 'choice__item_active'), ref: optionsRefs.get(item.value), children: [jsx("input", { id: "".concat(name, "-").concat(item.value), className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, disabled: isDisabled, checked: isActive, value: item.value, onChange: function (event) { return onChange(event, item); } }), jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: "".concat(name, "-").concat(item.value), children: [itemBefore, (item.iconBefore || item.iconBeforeActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: iconBeforeFillDisabled, isDisabled: isDisabled, iconFill: iconBeforeFill, iconFillActive: iconBeforeFillActive, iconSize: iconBeforeSize, SvgImage: isActive
231
+ 'choice__item_active_state_disabled', isActive && 'choice__item_active'), ref: optionsRefs.get(item.value), children: [jsx("input", { id: `${name}-${item.value}`, className: "choice__item-radio", type: isCheckbox ? 'checkbox' : 'radio', name: name, disabled: isDisabled, checked: isActive, value: item.value, onChange: (event) => onChange(event, item) }), jsxs("label", { className: clsx('choice__item-label', isDisabled && 'choice__item-label_state_disabled'), htmlFor: `${name}-${item.value}`, children: [itemBefore, (item.iconBefore || item.iconBeforeActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: iconBeforeFillDisabled, isDisabled: isDisabled, iconFill: iconBeforeFill, iconFillActive: iconBeforeFillActive, iconSize: iconBeforeSize, SvgImage: isActive
226
232
  ? item.iconBeforeActive || item.iconBefore
227
233
  : item.iconBefore, isActive: isActive })), item.label && (jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: item.label })), (item.icon || item.iconActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: iconFillDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive })), (item.iconAfter || item.iconAfterActive) && (jsx(Icon, { className: "choice__item-icon", iconFillDisabled: iconAfterFillDisabled, iconFill: iconAfterFill, iconFillActive: iconAfterFillActive, iconSize: iconAfterSize, SvgImage: isActive
228
234
  ? item.iconAfterActive || item.iconAfter
229
- : item.iconAfter, isActive: isActive })), itemAfter] })] }, "".concat(name, "-").concat(item.value)));
235
+ : item.iconAfter, isActive: isActive })), itemAfter] })] }, `${name}-${item.value}`));
230
236
  }) })), after && jsx("div", { className: "choice__after", children: after })] }));
231
237
  }
232
238
 
@@ -1,4 +1,3 @@
1
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { jsxs, jsx } from 'react/jsx-runtime';
3
2
  import { useState, useEffect } from 'react';
4
3
  import clsx from 'clsx';
@@ -18,7 +17,7 @@ import '../utils/setViewportProperty.js';
18
17
  import '../hooks.js';
19
18
  import '../hooks/useStyles/styleAttributes.js';
20
19
 
21
- var codeAppearanceDefault = {
20
+ const codeAppearanceDefault = {
22
21
  defaultPrimary: {
23
22
  inputBorderColor: 'surfaceBorderTertiary',
24
23
  inputCaretColor: 'surfaceItemPrimary',
@@ -29,7 +28,7 @@ var codeAppearanceDefault = {
29
28
  },
30
29
  };
31
30
 
32
- var codeAppearanceDisabled = {
31
+ const codeAppearanceDisabled = {
33
32
  disabledPrimary: {
34
33
  inputBorderColor: 'surfaceBorderDisabled',
35
34
  inputBorderColorHover: 'surfaceBorderDisabled',
@@ -41,7 +40,7 @@ var codeAppearanceDisabled = {
41
40
  },
42
41
  };
43
42
 
44
- var codeAppearanceError = {
43
+ const codeAppearanceError = {
45
44
  errorPrimary: {
46
45
  inputBorderColor: 'errorBorderQuaternary',
47
46
  inputBorderColorHover: 'errorBorderSecondary',
@@ -53,7 +52,7 @@ var codeAppearanceError = {
53
52
  },
54
53
  };
55
54
 
56
- var codeAppearanceRequire = {
55
+ const codeAppearanceRequire = {
57
56
  requirePrimary: {
58
57
  inputBorderColor: 'warningBorderSecondary',
59
58
  inputBorderColorHover: 'warningBorderSecondary',
@@ -65,7 +64,7 @@ var codeAppearanceRequire = {
65
64
  },
66
65
  };
67
66
 
68
- var codeAppearanceShape = {
67
+ const codeAppearanceShape = {
69
68
  circular: {
70
69
  shape: 'circular',
71
70
  },
@@ -90,7 +89,7 @@ var codeAppearanceShape = {
90
89
  },
91
90
  };
92
91
 
93
- var codeAppearanceSize = {
92
+ const codeAppearanceSize = {
94
93
  sizeL: {
95
94
  size: 'l',
96
95
  inputSize: 'l',
@@ -103,7 +102,7 @@ var codeAppearanceSize = {
103
102
  },
104
103
  };
105
104
 
106
- var codeAppearanceStyle = {
105
+ const codeAppearanceStyle = {
107
106
  full: {
108
107
  inputBorderColor: 'none',
109
108
  },
@@ -119,7 +118,7 @@ var codeAppearanceStyle = {
119
118
  },
120
119
  };
121
120
 
122
- var codeAppearanceSuccess = {
121
+ const codeAppearanceSuccess = {
123
122
  successPrimary: {
124
123
  inputBorderColor: 'successBorderSecondary',
125
124
  inputBorderColorHover: 'successBorderSecondary',
@@ -131,37 +130,46 @@ var codeAppearanceSuccess = {
131
130
  },
132
131
  };
133
132
 
134
- var codeAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, codeAppearanceDisabled), codeAppearanceShape), codeAppearanceRequire), codeAppearanceSize), codeAppearanceDefault), codeAppearanceStyle), codeAppearanceError), codeAppearanceSuccess);
133
+ const codeAppearance = {
134
+ ...codeAppearanceDisabled,
135
+ ...codeAppearanceShape,
136
+ ...codeAppearanceRequire,
137
+ ...codeAppearanceSize,
138
+ ...codeAppearanceDefault,
139
+ ...codeAppearanceStyle,
140
+ ...codeAppearanceError,
141
+ ...codeAppearanceSuccess,
142
+ };
135
143
 
136
- var codeConfig = {
144
+ const codeConfig = {
137
145
  appearance: codeAppearance,
138
- setAppearance: function (appearanceConfig) {
146
+ setAppearance: (appearanceConfig) => {
139
147
  codeConfig.appearance = appearanceConfig;
140
148
  },
141
149
  };
142
150
  function Code(props) {
143
- var className = props.className, appearance = props.appearance, _a = props.initialValue, initialValue = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, inputAutoFocus = props.inputAutoFocus, _b = props.inputCount, inputCount = _b === void 0 ? 6 : _b, inputPlaceholder = props.inputPlaceholder, _c = props.inputType, inputType = _c === void 0 ? 'number' : _c, separatorComponent = props.separatorComponent, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus;
144
- var _d = useState(initialValue), otp = _d[0], setOtp = _d[1];
145
- var appearanceConfig = useAppearanceConfig(appearance, codeConfig, isDisabled);
146
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
147
- 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;
151
+ const { className, appearance, initialValue = '', isDisabled, inputAutoFocus, inputCount = 6, inputPlaceholder, inputType = 'number', separatorComponent, before, after, isSkeleton, onBlur, onChange, onFocus, } = props;
152
+ const [otp, setOtp] = useState(initialValue);
153
+ const appearanceConfig = useAppearanceConfig(appearance, codeConfig, isDisabled);
154
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
155
+ const { inputBorderColorClass, inputBorderColorHoverClass, inputBorderFocusColorClass, inputBorderWidthClass, inputCaretColorClass, inputFillClass, inputFillHoverClass, inputPlaceholderTextColorClass, inputSizeClass, inputTextColorClass, inputTextSizeClass, inputTextWeightClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
148
156
  // NOTE: too many dependencies for "useCallback" and possible too many checks
149
- var renderInput = function (otpInputProps, index) {
150
- return (jsx("input", __assign({}, otpInputProps, { className: clsx('code__input', inputCaretColorClass && "caret-color_".concat(inputCaretColorClass), inputFillClass && "fill_".concat(inputFillClass), inputFillHoverClass && "fill_hover_".concat(inputFillHoverClass), inputPlaceholderTextColorClass &&
151
- "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 &&
152
- "border-color_hover_".concat(inputBorderColorHoverClass), inputBorderFocusColorClass &&
153
- "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) {
157
+ const renderInput = (otpInputProps, index) => {
158
+ return (jsx("input", { ...otpInputProps, className: clsx('code__input', inputCaretColorClass && `caret-color_${inputCaretColorClass}`, inputFillClass && `fill_${inputFillClass}`, inputFillHoverClass && `fill_hover_${inputFillHoverClass}`, inputPlaceholderTextColorClass &&
159
+ `placeholder-text-color_${inputPlaceholderTextColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, inputTextSizeClass && `text_size_${inputTextSizeClass}`, inputTextColorClass && `text-color_${inputTextColorClass}`, inputTextWeightClass && `text-weight_${inputTextWeightClass}`, inputBorderWidthClass && `border-width_${inputBorderWidthClass}`, inputBorderColorClass && `border-color_${inputBorderColorClass}`, inputBorderColorHoverClass &&
160
+ `border-color_hover_${inputBorderColorHoverClass}`, inputBorderFocusColorClass &&
161
+ `border-color_focus_${inputBorderFocusColorClass}`, inputSizeClass && `code__input_size_${inputSizeClass}`, widthClass && `width_${widthClass}`, isSkeleton && `code__input_skeleton`), name: `code-${index}`, autoComplete: "one-time-code", placeholder: inputPlaceholder, onBlur: (event) => {
154
162
  onBlur && onBlur(event);
155
163
  otpInputProps.onBlur(event);
156
- }, onFocus: function (event) {
164
+ }, onFocus: (event) => {
157
165
  onFocus && onFocus(event);
158
166
  otpInputProps.onFocus(event);
159
- } })));
167
+ } }));
160
168
  };
161
- useEffect(function () {
169
+ useEffect(() => {
162
170
  onChange && onChange(otp);
163
171
  }, [otp]);
164
- return (jsxs("div", { className: clsx(className, 'code', widthClass, sizeClass && "code_size_".concat(sizeClass)), children: [before, jsx(OtpInput, { containerStyle: clsx(className, 'code__wrapper'), inputType: inputType, numInputs: inputCount, placeholder: inputPlaceholder, renderInput: renderInput, renderSeparator: separatorComponent || null, shouldAutoFocus: inputAutoFocus, value: otp, onChange: setOtp }), after] }));
172
+ return (jsxs("div", { className: clsx(className, 'code', widthClass, sizeClass && `code_size_${sizeClass}`), children: [before, jsx(OtpInput, { containerStyle: clsx(className, 'code__wrapper'), inputType: inputType, numInputs: inputCount, placeholder: inputPlaceholder, renderInput: renderInput, renderSeparator: separatorComponent || null, shouldAutoFocus: inputAutoFocus, value: otp, onChange: setOtp }), after] }));
165
173
  }
166
174
 
167
175
  export { Code, codeAppearance, codeConfig };
@@ -4,9 +4,8 @@ import clsx from 'clsx';
4
4
  import Cookies from 'js-cookie';
5
5
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
6
6
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
7
- import { B as Button } from '../Button_es_CZss7cXh.js';
8
- import { T as Text } from '../Text_es_CwV9rjFD.js';
9
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
7
+ import { B as Button } from '../Button_es_Cn3wtv3M.js';
8
+ import { T as Text } from '../Text_es_CnymlElo.js';
10
9
  import 'lodash/camelCase';
11
10
  import 'lodash/castArray';
12
11
  import 'lodash/upperFirst';
@@ -19,16 +18,16 @@ import 'react-responsive';
19
18
  import '../utils/setViewportProperty.js';
20
19
  import '../hooks.js';
21
20
  import '../hooks/useStyles/styleAttributes.js';
22
- import '../Icon_es_BrwLifge.js';
21
+ import '../Icon_es_D5eiycFI.js';
23
22
  import 'react-inlinesvg';
24
23
  import '../hoc/urlWithAssetPrefix.js';
25
24
  import '../context/UrlAssetPrefix.js';
26
25
  import '../hooks/useStyles/useStyles.js';
27
26
  import 'lodash/maxBy';
28
- import '../Link_es_XiqbdwLp.js';
29
- import '../Loader_es_BUSqFrCd.js';
27
+ import '../Link_es_P2b6ya7P.js';
28
+ import '../Loader_es_CmSggwbR.js';
30
29
 
31
- var cookiesWarningAppearanceDefault = {
30
+ const cookiesWarningAppearanceDefault = {
32
31
  defaultPrimary: {
33
32
  fill: 'accentPrimary',
34
33
  fillHover: 'accentHover',
@@ -40,41 +39,42 @@ var cookiesWarningAppearanceDefault = {
40
39
  },
41
40
  };
42
41
 
43
- var cookiesWarningAppearance = __assign({}, cookiesWarningAppearanceDefault);
42
+ const cookiesWarningAppearance = {
43
+ ...cookiesWarningAppearanceDefault,
44
+ };
44
45
 
45
- var cookiesWarningConfig = {
46
+ const cookiesWarningConfig = {
46
47
  appearance: cookiesWarningAppearance,
47
- setAppearance: function (appearanceConfig) {
48
+ setAppearance: (appearanceConfig) => {
48
49
  cookiesWarningConfig.appearance = appearanceConfig;
49
50
  },
50
51
  };
51
52
  function CookiesWarning(props) {
52
- var className = props.className, appearance = props.appearance, message = props.message, _a = props.isHideOnScroll, isHideOnScroll = _a === void 0 ? false : _a;
53
- var cookiesWarningRef = useRef(null);
54
- var isOpen = useMemo(function () { return Cookies.get('cookies-warning') !== 'close'; }, []);
55
- var closeCookiesWarning = useCallback(function () {
56
- var _a;
57
- (_a = cookiesWarningRef.current) === null || _a === void 0 ? void 0 : _a.classList.add('cookies-warning_state_hidden');
53
+ const { className, appearance, message, isHideOnScroll = false } = props;
54
+ const cookiesWarningRef = useRef(null);
55
+ const isOpen = useMemo(() => Cookies.get('cookies-warning') !== 'close', []);
56
+ const closeCookiesWarning = useCallback(() => {
57
+ cookiesWarningRef.current?.classList.add('cookies-warning_state_hidden');
58
58
  Cookies.set('cookies-warning', 'close');
59
59
  }, []);
60
- useEffect(function () {
60
+ useEffect(() => {
61
61
  if (isHideOnScroll) {
62
62
  window.addEventListener('scroll', closeCookiesWarning, true);
63
63
  }
64
- return function () {
64
+ return () => {
65
65
  window.removeEventListener('scroll', closeCookiesWarning, true);
66
66
  };
67
67
  }, []);
68
- useEffect(function () {
68
+ useEffect(() => {
69
69
  // isHideOnScroll &&
70
70
  if (!isOpen) {
71
71
  window.removeEventListener('scroll', closeCookiesWarning, true);
72
72
  }
73
73
  }, [isOpen]);
74
- var appearanceConfig = useAppearanceConfig(appearance, cookiesWarningConfig);
75
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
76
- var fillClass = propsGenerator.fillClass, messageTextColor = propsGenerator.messageTextColor, messageTextSize = propsGenerator.messageTextSize, buttonAppearance = propsGenerator.buttonAppearance, buttonFill = propsGenerator.buttonFill, buttonFillHover = propsGenerator.buttonFillHover, buttonLabel = propsGenerator.buttonLabel, buttonLabelSize = propsGenerator.buttonLabelSize, buttonLabelTextColor = propsGenerator.buttonLabelTextColor, buttonShape = propsGenerator.buttonShape, buttonSize = propsGenerator.buttonSize, buttonWidth = propsGenerator.buttonWidth, elevationClass = propsGenerator.elevationClass;
77
- return (isOpen && (jsx("div", { className: clsx('cookies-warning', className, fillClass && "fill_".concat(fillClass), elevationClass && "elevation_".concat(elevationClass)), ref: cookiesWarningRef, children: jsxs("div", { className: "cookies-warning__inner", children: [jsx(Text, { size: messageTextSize, textColor: messageTextColor, children: message }), jsx(Button, { appearance: buttonAppearance, width: buttonWidth, size: buttonSize, fill: buttonFill, fillHover: buttonFillHover, labelTextColor: buttonLabelTextColor, labelTextSize: buttonLabelSize, shape: buttonShape, onClick: closeCookiesWarning, children: buttonLabel })] }) })));
74
+ const appearanceConfig = useAppearanceConfig(appearance, cookiesWarningConfig);
75
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
76
+ const { fillClass, messageTextColor, messageTextSize, buttonAppearance, buttonFill, buttonFillHover, buttonLabel, buttonLabelSize, buttonLabelTextColor, buttonShape, buttonSize, buttonWidth, elevationClass, } = propsGenerator;
77
+ return (isOpen && (jsx("div", { className: clsx('cookies-warning', className, fillClass && `fill_${fillClass}`, elevationClass && `elevation_${elevationClass}`), ref: cookiesWarningRef, children: jsxs("div", { className: "cookies-warning__inner", children: [jsx(Text, { size: messageTextSize, textColor: messageTextColor, children: message }), jsx(Button, { appearance: buttonAppearance, width: buttonWidth, size: buttonSize, fill: buttonFill, fillHover: buttonFillHover, labelTextColor: buttonLabelTextColor, labelTextSize: buttonLabelSize, shape: buttonShape, onClick: closeCookiesWarning, children: buttonLabel })] }) })));
78
78
  }
79
79
 
80
80
  export { CookiesWarning, cookiesWarningAppearance, cookiesWarningConfig };
@@ -1,9 +1,8 @@
1
- import { _ as __assign, b as __rest } from '../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { jsx } from 'react/jsx-runtime';
3
2
  import { useMemo } from 'react';
4
3
  import clsx from 'clsx';
5
4
  import { PartySuggestions } from 'react-dadata';
6
- import { I as Input } from '../Input_es_Cv5nEb_n.js';
5
+ import { I as Input } from '../Input_es_BnCXATnh.js';
7
6
  import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
8
7
  import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
9
8
  import 'lodash/camelCase';
@@ -20,15 +19,21 @@ import '../hooks.js';
20
19
  import '../hooks/useStyles/styleAttributes.js';
21
20
 
22
21
  function Dadata(props) {
23
- var delay = props.delay, input = props.input, inputProps = props.inputProps, meta = props.meta, token = props.token, setValue = props.setValue;
24
- var dadataInputProps = useMemo(function () {
25
- return __assign(__assign({}, inputProps), { className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
22
+ const { delay, input, inputProps, meta, token, setValue } = props;
23
+ const dadataInputProps = useMemo(() => {
24
+ return {
25
+ ...inputProps,
26
+ className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
26
27
  meta.touched &&
27
- "input_state_".concat(meta.error.key || 'error')),
28
+ `input_state_${meta.error.key || 'error'}`),
28
29
  // https://www.npmjs.com/package/react-dadata
29
30
  // "Свойство value игнорируется."
30
31
  // value: input.value,
31
- inputValue: input.value, onBlur: input.onBlur, onChange: input.onChange, onFocus: input.onFocus });
32
+ inputValue: input.value,
33
+ onBlur: input.onBlur,
34
+ onChange: input.onChange,
35
+ onFocus: input.onFocus,
36
+ };
32
37
  }, [
33
38
  inputProps,
34
39
  meta.active,
@@ -42,8 +47,8 @@ function Dadata(props) {
42
47
  return (jsx(PartySuggestions, { minChars: 3, customInput: DadataCustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
43
48
  }
44
49
  function DadataCustomInput(props) {
45
- var inputValue = props.inputValue, otherProps = __rest(props, ["inputValue"]);
46
- return jsx(Input, __assign({}, otherProps, { value: inputValue }));
50
+ const { inputValue, ...otherProps } = props;
51
+ return jsx(Input, { ...otherProps, value: inputValue });
47
52
  }
48
53
 
49
54
  export { Dadata };
@@ -2,11 +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_DRyCMO0I.js';
5
+ import { D as DatePickerInput } from '../DatePicker_es_D1LvY5RT.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_ayPPUwQ7.js';
9
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
8
+ import { b as ChipsGroup, C as Chips } from '../ChipsGroup_es_BVQ7_n0k.js';
10
9
  import 'date-fns/locale';
11
10
  import 'react-datepicker';
12
11
  import '../hooks/useStyles/useStyles.js';
@@ -21,20 +20,20 @@ import 'react-responsive';
21
20
  import '../utils/setViewportProperty.js';
22
21
  import '../hooks.js';
23
22
  import '../hooks/useStyles/styleAttributes.js';
24
- import '../Button_es_CZss7cXh.js';
25
- import '../Icon_es_BrwLifge.js';
23
+ import '../Button_es_Cn3wtv3M.js';
24
+ import '../Icon_es_D5eiycFI.js';
26
25
  import 'react-inlinesvg';
27
26
  import '../hoc/urlWithAssetPrefix.js';
28
27
  import '../context/UrlAssetPrefix.js';
29
- import '../Link_es_XiqbdwLp.js';
30
- import '../Text_es_CwV9rjFD.js';
31
- import '../Loader_es_BUSqFrCd.js';
32
- import '../Input_es_Cv5nEb_n.js';
33
- import '../Label_es_SULlg9bL.js';
28
+ import '../Link_es_P2b6ya7P.js';
29
+ import '../Text_es_CnymlElo.js';
30
+ import '../Loader_es_CmSggwbR.js';
31
+ import '../Input_es_BnCXATnh.js';
32
+ import '../Label_es_DCqpSw_F.js';
34
33
  import '@itcase/icons/default';
35
34
  import 'lodash/castArray';
36
35
 
37
- var datePeriodAppearanceSize = {
36
+ const datePeriodAppearanceSize = {
38
37
  sizeL: {
39
38
  size: 'm',
40
39
  chipsAppearanceSize: 'sizeL',
@@ -51,7 +50,7 @@ var datePeriodAppearanceSize = {
51
50
  },
52
51
  };
53
52
 
54
- var datePeriodAppearanceSurface = {
53
+ const datePeriodAppearanceSurface = {
55
54
  surfacePrimary: {
56
55
  fill: 'surfacePrimary',
57
56
  chipsAppearance: 'surfacePrimary ghost',
@@ -70,27 +69,30 @@ var datePeriodAppearanceSurface = {
70
69
  },
71
70
  };
72
71
 
73
- var datePeriodAppearance = __assign(__assign({}, datePeriodAppearanceSurface), datePeriodAppearanceSize);
72
+ const datePeriodAppearance = {
73
+ ...datePeriodAppearanceSurface,
74
+ ...datePeriodAppearanceSize,
75
+ };
74
76
 
75
- var datePeriodConfig = {
77
+ const datePeriodConfig = {
76
78
  appearance: datePeriodAppearance,
77
- setAppearance: function (appearanceConfig) {
79
+ setAppearance: (appearanceConfig) => {
78
80
  datePeriodConfig.appearance = appearanceConfig;
79
81
  },
80
82
  };
81
83
  function DatePeriod(props) {
82
- var appearance = props.appearance, className = props.className, _a = props.datePeriodIntervalsList, datePeriodIntervalsList = _a === void 0 ? Object.values(DATE_PERIOD_INTERVALS) : _a, datePeriodValueEnd = props.datePeriodValueEnd, datePeriodValueStart = props.datePeriodValueStart, monthsShown = props.monthsShown, isDisabled = props.isDisabled, isSkeleton = props.isSkeleton, onChangeDatePeriod = props.onChangeDatePeriod, onKeyDown = props.onKeyDown;
83
- var appearanceConfig = useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
84
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
85
- var _b = propsGenerator, fillClass = _b.fillClass, chipsAppearance = _b.chipsAppearance, chipsAppearanceSize = _b.chipsAppearanceSize, chipsShape = _b.chipsShape, datePickerAppearance = _b.datePickerAppearance, datePickerAppearanceSize = _b.datePickerAppearanceSize, datePickerInputAppearance = _b.datePickerInputAppearance, datePickerInputFillHover = _b.datePickerInputFillHover, datePickerInputSize = _b.datePickerInputSize, datePickerInputTextSize = _b.datePickerInputTextSize, shapeClass = _b.shapeClass, sizeClass = _b.sizeClass;
86
- var onClickPeriodChips = useCallback(function (selectedPeriodItem) {
87
- var dateStartIso = selectedPeriodItem.dateIntervalsList[0];
88
- var dateEndIso = selectedPeriodItem.dateIntervalsList[1];
84
+ const { appearance, className, datePeriodIntervalsList = Object.values(DATE_PERIOD_INTERVALS), datePeriodValueEnd, datePeriodValueStart, monthsShown, selectsRange = true, isDisabled, isSkeleton, onChangeDatePeriod, onKeyDown, } = props;
85
+ const appearanceConfig = useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
86
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
87
+ const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, sizeClass, } = propsGenerator;
88
+ const onClickPeriodChips = useCallback((selectedPeriodItem) => {
89
+ const dateStartIso = selectedPeriodItem.dateIntervalsList[0];
90
+ const dateEndIso = selectedPeriodItem.dateIntervalsList[1];
89
91
  onChangeDatePeriod(new Date(dateStartIso), new Date(dateEndIso));
90
92
  }, [onChangeDatePeriod]);
91
- var checkIsChipsActive = useCallback(function (targetPeriodItem) {
92
- var dateStartIso = targetPeriodItem.dateIntervalsList[0];
93
- var dateEndIso = targetPeriodItem.dateIntervalsList[1];
93
+ const checkIsChipsActive = useCallback((targetPeriodItem) => {
94
+ const dateStartIso = targetPeriodItem.dateIntervalsList[0];
95
+ const dateEndIso = targetPeriodItem.dateIntervalsList[1];
94
96
  return (dateStartIso === datePeriodValueStart &&
95
97
  dateEndIso === datePeriodValueEnd);
96
98
  }, [datePeriodValueEnd, datePeriodValueStart]);
@@ -108,18 +110,18 @@ function DatePeriod(props) {
108
110
  // },
109
111
  // [onChangeDatePeriod],
110
112
  // )
111
- return (jsx("div", { className: clsx(className, 'date-period', shapeClass && "date-period_shape_".concat(shapeClass), sizeClass && "date-period_size_".concat(sizeClass), isSkeleton && "date-period_skeleton", fillClass && "fill_".concat(fillClass), 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsx(Chips, { appearance: "".concat(chipsAppearance, " ").concat(chipsAppearanceSize), label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsx(DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
112
- appearance: "".concat(datePickerAppearance, " ").concat(datePickerAppearanceSize),
113
+ return (jsx("div", { className: clsx(className, 'date-period', shapeClass && `date-period_shape_${shapeClass}`, sizeClass && `date-period_size_${sizeClass}`, isSkeleton && `date-period_skeleton`, fillClass && `fill_${fillClass}`, 'cursor_type_pointer'), children: jsxs(ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsx(Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsx(DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
114
+ appearance: `${datePickerAppearance} ${datePickerAppearanceSize}`,
113
115
  dateFormat: 'dd/MM/yyyy',
114
116
  monthsShown: monthsShown,
115
- selectsRange: true,
117
+ selectsRange: selectsRange,
116
118
  showWeekNumbers: true,
117
119
  isClearable: false,
118
120
  isStartDefaultNull: true,
119
121
  onKeyDown: onKeyDown,
120
122
  }, endValue: datePeriodValueEnd, inputProps: {
121
- appearance: "".concat(datePickerInputAppearance, " ghost"),
122
- className: "date-period__datepicker-input date-period__datepicker-input_size_".concat(datePickerInputSize),
123
+ appearance: `${datePickerInputAppearance} ghost`,
124
+ className: `date-period__datepicker-input date-period__datepicker-input_size_${datePickerInputSize}`,
123
125
  fillHover: datePickerInputFillHover,
124
126
  textSize: datePickerInputTextSize,
125
127
  placeholder: 'Выбрать период',