@itcase/ui 1.8.123 → 1.8.125

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 (246) hide show
  1. package/dist/Avatar_cjs_AwXEUY8j.js +161 -0
  2. package/dist/Avatar_es_BtlaCRc5.js +157 -0
  3. package/dist/{Button_cjs_Ce97psFT.js → Button_cjs_C34BU1BK.js} +46 -34
  4. package/dist/{Button_es_CZss7cXh.js → Button_es_DnlzLBUT.js} +46 -34
  5. package/dist/ChipsGroup_cjs_DfAKN5CA.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_DBKY2UyF.js} +48 -35
  7. package/dist/DatePicker_cjs_DfbeIL2m.js +182 -0
  8. package/dist/DatePicker_es_BIJNx427.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_vHuzXW9M.js +211 -0
  12. package/dist/DropdownItem_es_DVHWWgnU.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_BVLGzj7Y.js} +170 -157
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_DkVkzTha.js} +170 -157
  17. package/dist/Image_cjs_BUM81t4Y.js +28 -0
  18. package/dist/Image_es_C-IjVkKX.js +26 -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_DwAmukik.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_B2kcstsG.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 -29
  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 -29
  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/Button/Button.appearance.d.ts +232 -232
  218. package/dist/types/components/Button/Button.d.ts +4 -4
  219. package/dist/types/components/Button/Button.interface.d.ts +5 -5
  220. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  221. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  222. package/dist/types/components/Text/Text.appearance.d.ts +58 -58
  223. package/dist/types/components/Text/Text.interface.d.ts +1 -1
  224. package/dist/utils/setViewportProperty.js +3 -3
  225. package/package.json +3 -3
  226. package/dist/Avatar_cjs_CLJnKU39.js +0 -157
  227. package/dist/Avatar_es_BgN-fbOj.js +0 -153
  228. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  229. package/dist/DatePicker_cjs_BzEtDAb8.js +0 -183
  230. package/dist/DatePicker_es_DRyCMO0I.js +0 -179
  231. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  232. package/dist/Divider_es_CCLBFIx6.js +0 -93
  233. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  234. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  235. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  236. package/dist/Group_es_DRqIIM9m.js +0 -55
  237. package/dist/Image_cjs_DRhhc66R.js +0 -29
  238. package/dist/Image_es_BpMidmve.js +0 -27
  239. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  240. package/dist/Loader_es_BUSqFrCd.js +0 -128
  241. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  242. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  243. package/dist/Text_cjs_0EINiUq4.js +0 -68
  244. package/dist/Text_es_CwV9rjFD.js +0 -64
  245. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  246. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
4
3
  var jsxRuntime = require('react/jsx-runtime');
5
4
  var React = require('react');
6
5
  var clsx = require('clsx');
@@ -20,7 +19,7 @@ require('../utils/setViewportProperty.js');
20
19
  require('../hooks.js');
21
20
  require('../hooks/useStyles/styleAttributes.js');
22
21
 
23
- var codeAppearanceDefault = {
22
+ const codeAppearanceDefault = {
24
23
  defaultPrimary: {
25
24
  inputBorderColor: 'surfaceBorderTertiary',
26
25
  inputCaretColor: 'surfaceItemPrimary',
@@ -31,7 +30,7 @@ var codeAppearanceDefault = {
31
30
  },
32
31
  };
33
32
 
34
- var codeAppearanceDisabled = {
33
+ const codeAppearanceDisabled = {
35
34
  disabledPrimary: {
36
35
  inputBorderColor: 'surfaceBorderDisabled',
37
36
  inputBorderColorHover: 'surfaceBorderDisabled',
@@ -43,7 +42,7 @@ var codeAppearanceDisabled = {
43
42
  },
44
43
  };
45
44
 
46
- var codeAppearanceError = {
45
+ const codeAppearanceError = {
47
46
  errorPrimary: {
48
47
  inputBorderColor: 'errorBorderQuaternary',
49
48
  inputBorderColorHover: 'errorBorderSecondary',
@@ -55,7 +54,7 @@ var codeAppearanceError = {
55
54
  },
56
55
  };
57
56
 
58
- var codeAppearanceRequire = {
57
+ const codeAppearanceRequire = {
59
58
  requirePrimary: {
60
59
  inputBorderColor: 'warningBorderSecondary',
61
60
  inputBorderColorHover: 'warningBorderSecondary',
@@ -67,7 +66,7 @@ var codeAppearanceRequire = {
67
66
  },
68
67
  };
69
68
 
70
- var codeAppearanceShape = {
69
+ const codeAppearanceShape = {
71
70
  circular: {
72
71
  shape: 'circular',
73
72
  },
@@ -92,7 +91,7 @@ var codeAppearanceShape = {
92
91
  },
93
92
  };
94
93
 
95
- var codeAppearanceSize = {
94
+ const codeAppearanceSize = {
96
95
  sizeL: {
97
96
  size: 'l',
98
97
  inputSize: 'l',
@@ -105,7 +104,7 @@ var codeAppearanceSize = {
105
104
  },
106
105
  };
107
106
 
108
- var codeAppearanceStyle = {
107
+ const codeAppearanceStyle = {
109
108
  full: {
110
109
  inputBorderColor: 'none',
111
110
  },
@@ -121,7 +120,7 @@ var codeAppearanceStyle = {
121
120
  },
122
121
  };
123
122
 
124
- var codeAppearanceSuccess = {
123
+ const codeAppearanceSuccess = {
125
124
  successPrimary: {
126
125
  inputBorderColor: 'successBorderSecondary',
127
126
  inputBorderColorHover: 'successBorderSecondary',
@@ -133,37 +132,46 @@ var codeAppearanceSuccess = {
133
132
  },
134
133
  };
135
134
 
136
- var codeAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, codeAppearanceDisabled), codeAppearanceShape), codeAppearanceRequire), codeAppearanceSize), codeAppearanceDefault), codeAppearanceStyle), codeAppearanceError), codeAppearanceSuccess);
135
+ const codeAppearance = {
136
+ ...codeAppearanceDisabled,
137
+ ...codeAppearanceShape,
138
+ ...codeAppearanceRequire,
139
+ ...codeAppearanceSize,
140
+ ...codeAppearanceDefault,
141
+ ...codeAppearanceStyle,
142
+ ...codeAppearanceError,
143
+ ...codeAppearanceSuccess,
144
+ };
137
145
 
138
- var codeConfig = {
146
+ const codeConfig = {
139
147
  appearance: codeAppearance,
140
- setAppearance: function (appearanceConfig) {
148
+ setAppearance: (appearanceConfig) => {
141
149
  codeConfig.appearance = appearanceConfig;
142
150
  },
143
151
  };
144
152
  function Code(props) {
145
- 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;
146
- var _d = React.useState(initialValue), otp = _d[0], setOtp = _d[1];
147
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, codeConfig, isDisabled);
148
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
149
- 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;
153
+ const { className, appearance, initialValue = '', isDisabled, inputAutoFocus, inputCount = 6, inputPlaceholder, inputType = 'number', separatorComponent, before, after, isSkeleton, onBlur, onChange, onFocus, } = props;
154
+ const [otp, setOtp] = React.useState(initialValue);
155
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, codeConfig, isDisabled);
156
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
157
+ const { inputBorderColorClass, inputBorderColorHoverClass, inputBorderFocusColorClass, inputBorderWidthClass, inputCaretColorClass, inputFillClass, inputFillHoverClass, inputPlaceholderTextColorClass, inputSizeClass, inputTextColorClass, inputTextSizeClass, inputTextWeightClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
150
158
  // NOTE: too many dependencies for "useCallback" and possible too many checks
151
- var renderInput = function (otpInputProps, index) {
152
- return (jsxRuntime.jsx("input", tslib_es6.__assign({}, otpInputProps, { className: clsx('code__input', inputCaretColorClass && "caret-color_".concat(inputCaretColorClass), inputFillClass && "fill_".concat(inputFillClass), inputFillHoverClass && "fill_hover_".concat(inputFillHoverClass), inputPlaceholderTextColorClass &&
153
- "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 &&
154
- "border-color_hover_".concat(inputBorderColorHoverClass), inputBorderFocusColorClass &&
155
- "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) {
159
+ const renderInput = (otpInputProps, index) => {
160
+ return (jsxRuntime.jsx("input", { ...otpInputProps, className: clsx('code__input', inputCaretColorClass && `caret-color_${inputCaretColorClass}`, inputFillClass && `fill_${inputFillClass}`, inputFillHoverClass && `fill_hover_${inputFillHoverClass}`, inputPlaceholderTextColorClass &&
161
+ `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 &&
162
+ `border-color_hover_${inputBorderColorHoverClass}`, inputBorderFocusColorClass &&
163
+ `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) => {
156
164
  onBlur && onBlur(event);
157
165
  otpInputProps.onBlur(event);
158
- }, onFocus: function (event) {
166
+ }, onFocus: (event) => {
159
167
  onFocus && onFocus(event);
160
168
  otpInputProps.onFocus(event);
161
- } })));
169
+ } }));
162
170
  };
163
- React.useEffect(function () {
171
+ React.useEffect(() => {
164
172
  onChange && onChange(otp);
165
173
  }, [otp]);
166
- return (jsxRuntime.jsxs("div", { className: clsx(className, 'code', widthClass, sizeClass && "code_size_".concat(sizeClass)), children: [before, jsxRuntime.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] }));
174
+ return (jsxRuntime.jsxs("div", { className: clsx(className, 'code', widthClass, sizeClass && `code_size_${sizeClass}`), children: [before, jsxRuntime.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] }));
167
175
  }
168
176
 
169
177
  exports.Code = Code;
@@ -6,9 +6,8 @@ var clsx = require('clsx');
6
6
  var Cookies = require('js-cookie');
7
7
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
8
8
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
9
- var Button = require('../../Button_cjs_Ce97psFT.js');
10
- var Text = require('../../Text_cjs_0EINiUq4.js');
11
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
9
+ var Button = require('../../Button_cjs_C34BU1BK.js');
10
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
12
11
  require('lodash/camelCase');
13
12
  require('lodash/castArray');
14
13
  require('lodash/upperFirst');
@@ -21,16 +20,16 @@ require('react-responsive');
21
20
  require('../utils/setViewportProperty.js');
22
21
  require('../hooks.js');
23
22
  require('../hooks/useStyles/styleAttributes.js');
24
- require('../../Icon_cjs_Cz6IyOkb.js');
23
+ require('../../Icon_cjs_BVLGzj7Y.js');
25
24
  require('react-inlinesvg');
26
25
  require('../hoc/urlWithAssetPrefix.js');
27
26
  require('../context/UrlAssetPrefix.js');
28
27
  require('../hooks/useStyles/useStyles.js');
29
28
  require('lodash/maxBy');
30
- require('../../Link_cjs_C5UsZUiF.js');
31
- require('../../Loader_cjs_D3lnxPlI.js');
29
+ require('../../Link_cjs_qKXVfU8e.js');
30
+ require('../../Loader_cjs_DIDsIq3J.js');
32
31
 
33
- var cookiesWarningAppearanceDefault = {
32
+ const cookiesWarningAppearanceDefault = {
34
33
  defaultPrimary: {
35
34
  fill: 'accentPrimary',
36
35
  fillHover: 'accentHover',
@@ -42,41 +41,42 @@ var cookiesWarningAppearanceDefault = {
42
41
  },
43
42
  };
44
43
 
45
- var cookiesWarningAppearance = tslib_es6.__assign({}, cookiesWarningAppearanceDefault);
44
+ const cookiesWarningAppearance = {
45
+ ...cookiesWarningAppearanceDefault,
46
+ };
46
47
 
47
- var cookiesWarningConfig = {
48
+ const cookiesWarningConfig = {
48
49
  appearance: cookiesWarningAppearance,
49
- setAppearance: function (appearanceConfig) {
50
+ setAppearance: (appearanceConfig) => {
50
51
  cookiesWarningConfig.appearance = appearanceConfig;
51
52
  },
52
53
  };
53
54
  function CookiesWarning(props) {
54
- var className = props.className, appearance = props.appearance, message = props.message, _a = props.isHideOnScroll, isHideOnScroll = _a === void 0 ? false : _a;
55
- var cookiesWarningRef = React.useRef(null);
56
- var isOpen = React.useMemo(function () { return Cookies.get('cookies-warning') !== 'close'; }, []);
57
- var closeCookiesWarning = React.useCallback(function () {
58
- var _a;
59
- (_a = cookiesWarningRef.current) === null || _a === void 0 ? void 0 : _a.classList.add('cookies-warning_state_hidden');
55
+ const { className, appearance, message, isHideOnScroll = false } = props;
56
+ const cookiesWarningRef = React.useRef(null);
57
+ const isOpen = React.useMemo(() => Cookies.get('cookies-warning') !== 'close', []);
58
+ const closeCookiesWarning = React.useCallback(() => {
59
+ cookiesWarningRef.current?.classList.add('cookies-warning_state_hidden');
60
60
  Cookies.set('cookies-warning', 'close');
61
61
  }, []);
62
- React.useEffect(function () {
62
+ React.useEffect(() => {
63
63
  if (isHideOnScroll) {
64
64
  window.addEventListener('scroll', closeCookiesWarning, true);
65
65
  }
66
- return function () {
66
+ return () => {
67
67
  window.removeEventListener('scroll', closeCookiesWarning, true);
68
68
  };
69
69
  }, []);
70
- React.useEffect(function () {
70
+ React.useEffect(() => {
71
71
  // isHideOnScroll &&
72
72
  if (!isOpen) {
73
73
  window.removeEventListener('scroll', closeCookiesWarning, true);
74
74
  }
75
75
  }, [isOpen]);
76
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, cookiesWarningConfig);
77
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
78
- 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;
79
- return (isOpen && (jsxRuntime.jsx("div", { className: clsx('cookies-warning', className, fillClass && "fill_".concat(fillClass), elevationClass && "elevation_".concat(elevationClass)), ref: cookiesWarningRef, children: jsxRuntime.jsxs("div", { className: "cookies-warning__inner", children: [jsxRuntime.jsx(Text.Text, { size: messageTextSize, textColor: messageTextColor, children: message }), jsxRuntime.jsx(Button.Button, { appearance: buttonAppearance, width: buttonWidth, size: buttonSize, fill: buttonFill, fillHover: buttonFillHover, labelTextColor: buttonLabelTextColor, labelTextSize: buttonLabelSize, shape: buttonShape, onClick: closeCookiesWarning, children: buttonLabel })] }) })));
76
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, cookiesWarningConfig);
77
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
78
+ const { fillClass, messageTextColor, messageTextSize, buttonAppearance, buttonFill, buttonFillHover, buttonLabel, buttonLabelSize, buttonLabelTextColor, buttonShape, buttonSize, buttonWidth, elevationClass, } = propsGenerator;
79
+ return (isOpen && (jsxRuntime.jsx("div", { className: clsx('cookies-warning', className, fillClass && `fill_${fillClass}`, elevationClass && `elevation_${elevationClass}`), ref: cookiesWarningRef, children: jsxRuntime.jsxs("div", { className: "cookies-warning__inner", children: [jsxRuntime.jsx(Text.Text, { size: messageTextSize, textColor: messageTextColor, children: message }), jsxRuntime.jsx(Button.Button, { appearance: buttonAppearance, width: buttonWidth, size: buttonSize, fill: buttonFill, fillHover: buttonFillHover, labelTextColor: buttonLabelTextColor, labelTextSize: buttonLabelSize, shape: buttonShape, onClick: closeCookiesWarning, children: buttonLabel })] }) })));
80
80
  }
81
81
 
82
82
  exports.CookiesWarning = CookiesWarning;
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
4
3
  var jsxRuntime = require('react/jsx-runtime');
5
4
  var React = require('react');
6
5
  var clsx = require('clsx');
7
6
  var reactDadata = require('react-dadata');
8
- var Input = require('../../Input_cjs_DRPK_RHK.js');
7
+ var Input = require('../../Input_cjs_DDi5JVAV.js');
9
8
  require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
10
9
  require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
11
10
  require('lodash/camelCase');
@@ -22,15 +21,21 @@ require('../hooks.js');
22
21
  require('../hooks/useStyles/styleAttributes.js');
23
22
 
24
23
  function Dadata(props) {
25
- var delay = props.delay, input = props.input, inputProps = props.inputProps, meta = props.meta, token = props.token, setValue = props.setValue;
26
- var dadataInputProps = React.useMemo(function () {
27
- return tslib_es6.__assign(tslib_es6.__assign({}, inputProps), { className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
24
+ const { delay, input, inputProps, meta, token, setValue } = props;
25
+ const dadataInputProps = React.useMemo(() => {
26
+ return {
27
+ ...inputProps,
28
+ className: clsx('react-dadata__input', meta.active && 'input_state_focus', meta.error &&
28
29
  meta.touched &&
29
- "input_state_".concat(meta.error.key || 'error')),
30
+ `input_state_${meta.error.key || 'error'}`),
30
31
  // https://www.npmjs.com/package/react-dadata
31
32
  // "Свойство value игнорируется."
32
33
  // value: input.value,
33
- inputValue: input.value, onBlur: input.onBlur, onChange: input.onChange, onFocus: input.onFocus });
34
+ inputValue: input.value,
35
+ onBlur: input.onBlur,
36
+ onChange: input.onChange,
37
+ onFocus: input.onFocus,
38
+ };
34
39
  }, [
35
40
  inputProps,
36
41
  meta.active,
@@ -44,8 +49,8 @@ function Dadata(props) {
44
49
  return (jsxRuntime.jsx(reactDadata.PartySuggestions, { minChars: 3, customInput: DadataCustomInput, delay: delay || 750, inputProps: dadataInputProps, token: token, onChange: setValue }));
45
50
  }
46
51
  function DadataCustomInput(props) {
47
- var inputValue = props.inputValue, otherProps = tslib_es6.__rest(props, ["inputValue"]);
48
- return jsxRuntime.jsx(Input.Input, tslib_es6.__assign({}, otherProps, { value: inputValue }));
52
+ const { inputValue, ...otherProps } = props;
53
+ return jsxRuntime.jsx(Input.Input, { ...otherProps, value: inputValue });
49
54
  }
50
55
 
51
56
  exports.Dadata = Dadata;
@@ -4,11 +4,10 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var clsx = require('clsx');
6
6
  var common = require('@itcase/common');
7
- var DatePicker = require('../../DatePicker_cjs_BzEtDAb8.js');
7
+ var DatePicker = require('../../DatePicker_cjs_DfbeIL2m.js');
8
8
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
9
9
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
- var ChipsGroup = require('../../ChipsGroup_cjs_C8L3ZeD_.js');
11
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
10
+ var ChipsGroup = require('../../ChipsGroup_cjs_DfAKN5CA.js');
12
11
  require('date-fns/locale');
13
12
  require('react-datepicker');
14
13
  require('../hooks/useStyles/useStyles.js');
@@ -23,20 +22,20 @@ require('react-responsive');
23
22
  require('../utils/setViewportProperty.js');
24
23
  require('../hooks.js');
25
24
  require('../hooks/useStyles/styleAttributes.js');
26
- require('../../Button_cjs_Ce97psFT.js');
27
- require('../../Icon_cjs_Cz6IyOkb.js');
25
+ require('../../Button_cjs_C34BU1BK.js');
26
+ require('../../Icon_cjs_BVLGzj7Y.js');
28
27
  require('react-inlinesvg');
29
28
  require('../hoc/urlWithAssetPrefix.js');
30
29
  require('../context/UrlAssetPrefix.js');
31
- require('../../Link_cjs_C5UsZUiF.js');
32
- require('../../Text_cjs_0EINiUq4.js');
33
- require('../../Loader_cjs_D3lnxPlI.js');
34
- require('../../Input_cjs_DRPK_RHK.js');
35
- require('../../Label_cjs_DMoaOoHi.js');
30
+ require('../../Link_cjs_qKXVfU8e.js');
31
+ require('../../Text_cjs_BDTjOTVB.js');
32
+ require('../../Loader_cjs_DIDsIq3J.js');
33
+ require('../../Input_cjs_DDi5JVAV.js');
34
+ require('../../Label_cjs_DwAmukik.js');
36
35
  require('@itcase/icons/default');
37
36
  require('lodash/castArray');
38
37
 
39
- var datePeriodAppearanceSize = {
38
+ const datePeriodAppearanceSize = {
40
39
  sizeL: {
41
40
  size: 'm',
42
41
  chipsAppearanceSize: 'sizeL',
@@ -53,7 +52,7 @@ var datePeriodAppearanceSize = {
53
52
  },
54
53
  };
55
54
 
56
- var datePeriodAppearanceSurface = {
55
+ const datePeriodAppearanceSurface = {
57
56
  surfacePrimary: {
58
57
  fill: 'surfacePrimary',
59
58
  chipsAppearance: 'surfacePrimary ghost',
@@ -72,27 +71,30 @@ var datePeriodAppearanceSurface = {
72
71
  },
73
72
  };
74
73
 
75
- var datePeriodAppearance = tslib_es6.__assign(tslib_es6.__assign({}, datePeriodAppearanceSurface), datePeriodAppearanceSize);
74
+ const datePeriodAppearance = {
75
+ ...datePeriodAppearanceSurface,
76
+ ...datePeriodAppearanceSize,
77
+ };
76
78
 
77
- var datePeriodConfig = {
79
+ const datePeriodConfig = {
78
80
  appearance: datePeriodAppearance,
79
- setAppearance: function (appearanceConfig) {
81
+ setAppearance: (appearanceConfig) => {
80
82
  datePeriodConfig.appearance = appearanceConfig;
81
83
  },
82
84
  };
83
85
  function DatePeriod(props) {
84
- var appearance = props.appearance, className = props.className, _a = props.datePeriodIntervalsList, datePeriodIntervalsList = _a === void 0 ? Object.values(common.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;
85
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
86
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
87
- 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;
88
- var onClickPeriodChips = React.useCallback(function (selectedPeriodItem) {
89
- var dateStartIso = selectedPeriodItem.dateIntervalsList[0];
90
- var dateEndIso = selectedPeriodItem.dateIntervalsList[1];
86
+ const { appearance, className, datePeriodIntervalsList = Object.values(common.DATE_PERIOD_INTERVALS), datePeriodValueEnd, datePeriodValueStart, monthsShown, selectsRange = true, isDisabled, isSkeleton, onChangeDatePeriod, onKeyDown, } = props;
87
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, datePeriodConfig, isDisabled);
88
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
89
+ const { fillClass, chipsAppearance, chipsAppearanceSize, chipsShape, datePickerAppearance, datePickerAppearanceSize, datePickerInputAppearance, datePickerInputFillHover, datePickerInputSize, datePickerInputTextSize, shapeClass, sizeClass, } = propsGenerator;
90
+ const onClickPeriodChips = React.useCallback((selectedPeriodItem) => {
91
+ const dateStartIso = selectedPeriodItem.dateIntervalsList[0];
92
+ const dateEndIso = selectedPeriodItem.dateIntervalsList[1];
91
93
  onChangeDatePeriod(new Date(dateStartIso), new Date(dateEndIso));
92
94
  }, [onChangeDatePeriod]);
93
- var checkIsChipsActive = React.useCallback(function (targetPeriodItem) {
94
- var dateStartIso = targetPeriodItem.dateIntervalsList[0];
95
- var dateEndIso = targetPeriodItem.dateIntervalsList[1];
95
+ const checkIsChipsActive = React.useCallback((targetPeriodItem) => {
96
+ const dateStartIso = targetPeriodItem.dateIntervalsList[0];
97
+ const dateEndIso = targetPeriodItem.dateIntervalsList[1];
96
98
  return (dateStartIso === datePeriodValueStart &&
97
99
  dateEndIso === datePeriodValueEnd);
98
100
  }, [datePeriodValueEnd, datePeriodValueStart]);
@@ -110,18 +112,18 @@ function DatePeriod(props) {
110
112
  // },
111
113
  // [onChangeDatePeriod],
112
114
  // )
113
- return (jsxRuntime.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: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map(function (datePeriodItem) { return (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: "".concat(chipsAppearance, " ").concat(chipsAppearanceSize), label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: function () { return onClickPeriodChips(datePeriodItem); } }, datePeriodItem.value)); }), jsxRuntime.jsx(DatePicker.DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
114
- appearance: "".concat(datePickerAppearance, " ").concat(datePickerAppearanceSize),
115
+ return (jsxRuntime.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: jsxRuntime.jsxs(ChipsGroup.ChipsGroup, { direction: "horizontal", children: [datePeriodIntervalsList.map((datePeriodItem) => (jsxRuntime.jsx(ChipsGroup.Chips, { appearance: `${chipsAppearance} ${chipsAppearanceSize}`, label: datePeriodItem.label, shape: chipsShape, isActive: checkIsChipsActive(datePeriodItem), onClick: () => onClickPeriodChips(datePeriodItem) }, datePeriodItem.value))), jsxRuntime.jsx(DatePicker.DatePickerInput, { className: "date-period__datepicker", datePickerProps: {
116
+ appearance: `${datePickerAppearance} ${datePickerAppearanceSize}`,
115
117
  dateFormat: 'dd/MM/yyyy',
116
118
  monthsShown: monthsShown,
117
- selectsRange: true,
119
+ selectsRange: selectsRange,
118
120
  showWeekNumbers: true,
119
121
  isClearable: false,
120
122
  isStartDefaultNull: true,
121
123
  onKeyDown: onKeyDown,
122
124
  }, endValue: datePeriodValueEnd, inputProps: {
123
- appearance: "".concat(datePickerInputAppearance, " ghost"),
124
- className: "date-period__datepicker-input date-period__datepicker-input_size_".concat(datePickerInputSize),
125
+ appearance: `${datePickerInputAppearance} ghost`,
126
+ className: `date-period__datepicker-input date-period__datepicker-input_size_${datePickerInputSize}`,
125
127
  fillHover: datePickerInputFillHover,
126
128
  textSize: datePickerInputTextSize,
127
129
  placeholder: 'Выбрать период',
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var DatePicker = require('../../DatePicker_cjs_BzEtDAb8.js');
4
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
3
+ var DatePicker = require('../../DatePicker_cjs_DfbeIL2m.js');
5
4
  require('react/jsx-runtime');
6
5
  require('react');
7
6
  require('clsx');
@@ -23,16 +22,16 @@ require('../hooks.js');
23
22
  require('../hooks/useStyles/styleAttributes.js');
24
23
  require('../hooks/useStyles/useStyles.js');
25
24
  require('lodash/maxBy');
26
- require('../../Button_cjs_Ce97psFT.js');
27
- require('../../Icon_cjs_Cz6IyOkb.js');
25
+ require('../../Button_cjs_C34BU1BK.js');
26
+ require('../../Icon_cjs_BVLGzj7Y.js');
28
27
  require('react-inlinesvg');
29
28
  require('../hoc/urlWithAssetPrefix.js');
30
29
  require('../context/UrlAssetPrefix.js');
31
- require('../../Link_cjs_C5UsZUiF.js');
32
- require('../../Text_cjs_0EINiUq4.js');
33
- require('../../Loader_cjs_D3lnxPlI.js');
34
- require('../../Input_cjs_DRPK_RHK.js');
35
- require('../../Label_cjs_DMoaOoHi.js');
30
+ require('../../Link_cjs_qKXVfU8e.js');
31
+ require('../../Text_cjs_BDTjOTVB.js');
32
+ require('../../Loader_cjs_DIDsIq3J.js');
33
+ require('../../Input_cjs_DDi5JVAV.js');
34
+ require('../../Label_cjs_DwAmukik.js');
36
35
  require('@itcase/icons/default');
37
36
 
38
37
 
@@ -1,10 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var Divider = require('../../Divider_cjs_DUYtmwn2.js');
3
+ var Divider = require('../../Divider_cjs_DrmV2ezS.js');
4
4
  require('react/jsx-runtime');
5
5
  require('clsx');
6
6
  require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
7
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
8
7
  require('react');
9
8
  require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
9
  require('lodash/camelCase');
@@ -4,7 +4,6 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var clsx = require('clsx');
5
5
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
6
6
  var useStyles = require('../hooks/useStyles/useStyles.js');
7
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
8
7
  require('react');
9
8
  require('lodash/camelCase');
10
9
  require('lodash/castArray');
@@ -21,12 +20,12 @@ require('../hooks/useStyles/styleAttributes.js');
21
20
  require('lodash/maxBy');
22
21
 
23
22
  function Dot(props) {
24
- var className = props.className, children = props.children;
25
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
26
- var fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass;
23
+ const { className, children } = props;
24
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
25
+ const { fillClass, borderColorClass, borderTypeClass, shapeClass, sizeClass, } = propsGenerator;
27
26
  // @ts-expect-error
28
- var styles = useStyles.useStyles(props).styles;
29
- return (jsxRuntime.jsx("div", { className: clsx(className, 'dot', borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), fillClass && "fill_".concat(fillClass), shapeClass && "dot_shape_".concat(shapeClass), sizeClass && "dot_size_".concat(sizeClass)), style: styles, children: children }));
27
+ const { styles } = useStyles.useStyles(props);
28
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'dot', borderColorClass && `border-color_${borderColorClass}`, borderTypeClass && `border_type_${borderTypeClass}`, fillClass && `fill_${fillClass}`, shapeClass && `dot_shape_${shapeClass}`, sizeClass && `dot_size_${sizeClass}`), style: styles, children: children }));
30
29
  }
31
30
 
32
31
  exports.Dot = Dot;
@@ -4,12 +4,11 @@ var jsxRuntime = require('react/jsx-runtime');
4
4
  var React = require('react');
5
5
  var clsx = require('clsx');
6
6
  var ReactDrawer = require('react-modern-drawer');
7
- var Divider = require('../../Divider_cjs_DUYtmwn2.js');
8
- var Icon = require('../../Icon_cjs_Cz6IyOkb.js');
9
- var Text = require('../../Text_cjs_0EINiUq4.js');
7
+ var Divider = require('../../Divider_cjs_DrmV2ezS.js');
8
+ var Icon = require('../../Icon_cjs_BVLGzj7Y.js');
9
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
10
10
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
11
11
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
12
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
13
12
  var _default = require('@itcase/icons/default');
14
13
  require('../hooks/useStyles/useStyles.js');
15
14
  require('lodash/camelCase');
@@ -27,10 +26,10 @@ require('../hooks/useStyles/styleAttributes.js');
27
26
  require('react-inlinesvg');
28
27
  require('../hoc/urlWithAssetPrefix.js');
29
28
  require('../context/UrlAssetPrefix.js');
30
- require('../../Link_cjs_C5UsZUiF.js');
29
+ require('../../Link_cjs_qKXVfU8e.js');
31
30
  require('lodash/castArray');
32
31
 
33
- var drawerAppearanceSize = {
32
+ const drawerAppearanceSize = {
34
33
  sizeH3: {
35
34
  titleTextSize: 'h3',
36
35
  descTextSize: 's',
@@ -39,7 +38,7 @@ var drawerAppearanceSize = {
39
38
  },
40
39
  };
41
40
 
42
- var drawerAppearanceSurface = {
41
+ const drawerAppearanceSurface = {
43
42
  surfacePrimary: {
44
43
  fill: 'surfacePrimary',
45
44
  fillHover: 'surfacePrimaryHover',
@@ -67,36 +66,39 @@ var drawerAppearanceSurface = {
67
66
  },
68
67
  };
69
68
 
70
- var drawerAppearance = tslib_es6.__assign(tslib_es6.__assign({}, drawerAppearanceSize), drawerAppearanceSurface);
69
+ const drawerAppearance = {
70
+ ...drawerAppearanceSize,
71
+ ...drawerAppearanceSurface,
72
+ };
71
73
 
72
- var drawerConfig = {
74
+ const drawerConfig = {
73
75
  appearance: drawerAppearance,
74
- setAppearance: function (appearanceConfig) {
76
+ setAppearance: (appearanceConfig) => {
75
77
  drawerConfig.appearance = appearanceConfig;
76
78
  },
77
79
  };
78
80
  function Drawer(props) {
79
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, type = props.type, appearance = props.appearance, title = props.title, desc = props.desc, enableOverlay = props.enableOverlay, stickyButton = props.stickyButton, before = props.before, after = props.after, close = props.close, isOpen = props.isOpen, isOpenModal = props.isOpenModal, onClickClose = props.onClickClose, onClose = props.onClose, children = props.children;
80
- var _isOpen = isOpen !== null && isOpen !== void 0 ? isOpen : isOpenModal;
81
- var isOpenPrevRef = React.useRef(Boolean(_isOpen));
82
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, drawerConfig);
83
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
84
- var direction = propsGenerator.direction, size = propsGenerator.size, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, descTextColor = propsGenerator.descTextColor, descTextSize = propsGenerator.descTextSize, divider = propsGenerator.divider, dividerSize = propsGenerator.dividerSize, zeroPadding = propsGenerator.zeroPadding, closeIcon = propsGenerator.closeIcon, closeIconFill = propsGenerator.closeIconFill, closeIconFillIcon = propsGenerator.closeIconFillIcon, closeIconFillSize = propsGenerator.closeIconFillSize, closeIconShape = propsGenerator.closeIconShape, closeIconSize = propsGenerator.closeIconSize, closeIconSrc = propsGenerator.closeIconSrc;
85
- React.useEffect(function () {
86
- var isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
81
+ const { dataTestId, dataTour, className, type, appearance, title, desc, enableOverlay, stickyButton, before, after, close, isOpen, isOpenModal, onClickClose, onClose, children, } = props;
82
+ const _isOpen = isOpen ?? isOpenModal;
83
+ const isOpenPrevRef = React.useRef(Boolean(_isOpen));
84
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, drawerConfig);
85
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
86
+ const { direction, size, titleTextColor, titleTextSize, descTextColor, descTextSize, divider, dividerSize, zeroPadding, closeIcon, closeIconFill, closeIconFillIcon, closeIconFillSize, closeIconShape, closeIconSize, closeIconSrc, } = propsGenerator;
87
+ React.useEffect(() => {
88
+ const isFromOpenToClose = isOpenPrevRef.current === true && !_isOpen;
87
89
  if (isFromOpenToClose && onClose) {
88
90
  onClose();
89
91
  }
90
92
  isOpenPrevRef.current = Boolean(_isOpen);
91
- var isNeedShowWarning = process.env.NODE_ENV === 'development' &&
93
+ const isNeedShowWarning = process.env.NODE_ENV === 'development' &&
92
94
  typeof isOpenModal !== 'undefined';
93
95
  if (isNeedShowWarning) {
94
96
  console.warn('@itcase/ui Drawer warning: "isOpenModal" is deprecated, use "isOpen" instead.');
95
97
  }
96
98
  }, [_isOpen, onClose]);
97
- return (jsxRuntime.jsxs(ReactDrawer, { dataTour: dataTour, className: clsx('drawer', type && "drawer_type_".concat(type), className, dataTour && "dataTour-".concat(dataTour), stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
99
+ return (jsxRuntime.jsxs(ReactDrawer, { dataTour: dataTour, className: clsx('drawer', type && `drawer_type_${type}`, className, dataTour && `dataTour-${dataTour}`, stickyButton && 'drawer_sticky-button', zeroPadding && 'drawer_reset-padding'), direction: direction || 'right', size: size || 600,
98
100
  // Drawer set prefix "EZDrawer" for any id
99
- customIdSuffix: dataTestId ? "_".concat(dataTestId) : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsxRuntime.jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx("div", { className: "drawer__close", children: jsxRuntime.jsx(Icon.Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxRuntime.jsxs("div", { className: "drawer__header", children: [jsxRuntime.jsx(Icon.Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsxRuntime.jsx(Text.Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
101
+ customIdSuffix: dataTestId ? `_${dataTestId}` : undefined, enableOverlay: enableOverlay, lockBackgroundScroll: false, overlayClassName: "drawer__overlay", open: _isOpen, onClose: onClickClose, children: [before && jsxRuntime.jsx("div", { className: "drawer__before", children: before }), !close && (closeIcon || closeIconSrc) && (jsxRuntime.jsx("div", { className: "drawer__close", children: jsxRuntime.jsx(Icon.Icon, { className: "cursor_type_pointer", fill: closeIconFill, fillSize: closeIconFillSize, iconFill: closeIconFillIcon, iconSize: closeIconSize, imageSrc: closeIconSrc, shape: closeIconShape, SvgImage: closeIcon, onClick: onClickClose }) })), (title || desc) && (jsxRuntime.jsxs("div", { className: "drawer__header", children: [jsxRuntime.jsx(Icon.Title, { className: "drawer__header-title", size: titleTextSize, textColor: titleTextColor, children: title }), jsxRuntime.jsx(Text.Text, { className: "drawer__header-desc", size: descTextSize, textColor: descTextColor, children: desc })] })), divider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", size: dividerSize, fill: "surfaceTertiary" })), children && jsxRuntime.jsx("div", { className: "drawer__wrapper", children: children }), after && jsxRuntime.jsx("div", { className: "drawer__after", children: after })] }));
100
102
  }
101
103
 
102
104
  exports.Drawer = Drawer;