@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
@@ -1,11 +1,10 @@
1
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { icons24 } from '@itcase/icons/default';
3
2
  import { jsxs, jsx } from 'react/jsx-runtime';
4
3
  import { useState, useMemo, useCallback } from 'react';
5
4
  import clsx from 'clsx';
6
5
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
7
6
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
- import { I as Icon } from '../Icon_es_BrwLifge.js';
7
+ import { I as Icon } from '../Icon_es_D5eiycFI.js';
9
8
  import 'lodash/camelCase';
10
9
  import 'lodash/castArray';
11
10
  import 'lodash/upperFirst';
@@ -23,10 +22,10 @@ import '../hoc/urlWithAssetPrefix.js';
23
22
  import '../context/UrlAssetPrefix.js';
24
23
  import '../hooks/useStyles/useStyles.js';
25
24
  import 'lodash/maxBy';
26
- import '../Link_es_XiqbdwLp.js';
27
- import '../Text_es_CwV9rjFD.js';
25
+ import '../Link_es_P2b6ya7P.js';
26
+ import '../Text_es_CnymlElo.js';
28
27
 
29
- var inputPasswordAppearanceDefault = {
28
+ const inputPasswordAppearanceDefault = {
30
29
  defaultPrimary: {
31
30
  fill: 'surfaceSecondary',
32
31
  borderColor: 'surfaceBorderTertiary',
@@ -53,7 +52,7 @@ var inputPasswordAppearanceDefault = {
53
52
  },
54
53
  };
55
54
 
56
- var inputPasswordAppearanceDisabled = {
55
+ const inputPasswordAppearanceDisabled = {
57
56
  disabledPrimary: {
58
57
  fill: 'surfaceFillDisabled',
59
58
  borderColor: 'errorBorderQuaternary',
@@ -75,7 +74,7 @@ var inputPasswordAppearanceDisabled = {
75
74
  },
76
75
  };
77
76
 
78
- var inputPasswordAppearanceError = {
77
+ const inputPasswordAppearanceError = {
79
78
  errorPrimary: {
80
79
  fill: 'errorTertiary',
81
80
  borderColor: 'errorBorderQuaternary',
@@ -97,7 +96,7 @@ var inputPasswordAppearanceError = {
97
96
  },
98
97
  };
99
98
 
100
- var inputPasswordAppearanceRequire = {
99
+ const inputPasswordAppearanceRequire = {
101
100
  requirePrimary: {
102
101
  fill: 'warningTertiary',
103
102
  borderColor: 'warningBorderQuaternary',
@@ -119,7 +118,7 @@ var inputPasswordAppearanceRequire = {
119
118
  },
120
119
  };
121
120
 
122
- var inputPasswordAppearanceShape = {
121
+ const inputPasswordAppearanceShape = {
123
122
  circular: {
124
123
  shape: 'circular',
125
124
  },
@@ -144,7 +143,7 @@ var inputPasswordAppearanceShape = {
144
143
  },
145
144
  };
146
145
 
147
- var inputPasswordAppearanceSize = {
146
+ const inputPasswordAppearanceSize = {
148
147
  sizeXXL: {
149
148
  size: 'xxl',
150
149
  textSize: 'l',
@@ -189,7 +188,7 @@ var inputPasswordAppearanceSize = {
189
188
  },
190
189
  };
191
190
 
192
- var inputPasswordAppearanceStyle = {
191
+ const inputPasswordAppearanceStyle = {
193
192
  solid: {
194
193
  borderColor: 'none',
195
194
  },
@@ -205,7 +204,7 @@ var inputPasswordAppearanceStyle = {
205
204
  },
206
205
  };
207
206
 
208
- var inputPasswordAppearanceSuccess = {
207
+ const inputPasswordAppearanceSuccess = {
209
208
  successPrimary: {
210
209
  fill: 'successTertiary',
211
210
  borderColor: 'successBorderQuaternary',
@@ -227,30 +226,39 @@ var inputPasswordAppearanceSuccess = {
227
226
  },
228
227
  };
229
228
 
230
- var inputPasswordAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, inputPasswordAppearanceSize), inputPasswordAppearanceDisabled), inputPasswordAppearanceRequire), inputPasswordAppearanceStyle), inputPasswordAppearanceError), inputPasswordAppearanceDefault), inputPasswordAppearanceSuccess), inputPasswordAppearanceShape);
229
+ const inputPasswordAppearance = {
230
+ ...inputPasswordAppearanceSize,
231
+ ...inputPasswordAppearanceDisabled,
232
+ ...inputPasswordAppearanceRequire,
233
+ ...inputPasswordAppearanceStyle,
234
+ ...inputPasswordAppearanceError,
235
+ ...inputPasswordAppearanceDefault,
236
+ ...inputPasswordAppearanceSuccess,
237
+ ...inputPasswordAppearanceShape,
238
+ };
231
239
 
232
- var inputPasswordConfig = {
240
+ const inputPasswordConfig = {
233
241
  appearance: inputPasswordAppearance,
234
- setAppearance: function (appearanceConfig) {
242
+ setAppearance: (appearanceConfig) => {
235
243
  inputPasswordConfig.appearance = appearanceConfig;
236
244
  },
237
245
  };
238
246
  function InputPassword(props) {
239
- var id = props.id, appearance = props.appearance, className = props.className, placeholder = props.placeholder, value = props.value, isDisabled = props.isDisabled, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
240
- var _a = useState(false), isRevealed = _a[0], setIsRevealed = _a[1];
241
- var inputType = useMemo(function () {
247
+ const { id, appearance, className, placeholder, value, isDisabled, onBlur, onChange, onFocus, onKeyDown, } = props;
248
+ const [isRevealed, setIsRevealed] = useState(false);
249
+ const inputType = useMemo(() => {
242
250
  return isRevealed ? 'text' : 'password';
243
251
  }, [isRevealed]);
244
- var onClickIconReveal = useCallback(function (event) {
252
+ const onClickIconReveal = useCallback((event) => {
245
253
  event.preventDefault();
246
- setIsRevealed(function (prev) { return !prev; });
254
+ setIsRevealed((prev) => !prev);
247
255
  }, []);
248
- var appearanceConfig = useAppearanceConfig(appearance, inputPasswordConfig, isDisabled);
249
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
250
- var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderWidthClass = propsGenerator.borderWidthClass, textColorClass = propsGenerator.textColorClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, caretClass = propsGenerator.caretClass, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconRevealableHide = propsGenerator.iconRevealableHide, iconRevealableShow = propsGenerator.iconRevealableShow, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, imageRevealableHide = propsGenerator.imageRevealableHide, imageRevealableShow = propsGenerator.imageRevealableShow, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
251
- return (jsxs("div", { className: "input-password", children: [jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass &&
252
- "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), caretClass && "caret-color_".concat(caretClass), fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), placeholderTextColorClass &&
253
- "placeholder-text-color_".concat(placeholderTextColorClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), sizeClass && "input-password__input_size_".concat(sizeClass), textColorClass && "text-color_".concat(textColorClass), textColorClass && "text-color_".concat(textColorClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass)), type: inputType, disabled: isDisabled, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }), jsx(Icon, { className: "input-password__icon", size: iconSize, iconFill: iconFill, iconFillHover: iconFillHover, imageSrc: isRevealed ? imageRevealableHide : imageRevealableShow, shape: iconShape, SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow, onClick: onClickIconReveal })] }));
256
+ const appearanceConfig = useAppearanceConfig(appearance, inputPasswordConfig, isDisabled);
257
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
258
+ const { fillClass, fillHoverClass, borderColorClass, borderColorHoverClass, borderWidthClass, textColorClass, textSizeClass, textWeightClass, caretClass, iconFill, iconFillHover, iconRevealableHide, iconRevealableShow, iconShape, iconSize, imageRevealableHide, imageRevealableShow, placeholderTextColorClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
259
+ return (jsxs("div", { className: "input-password", children: [jsx("input", { id: String(id), className: clsx(className, 'input-password__input', (textSizeClass || textColorClass || textWeightClass) && 'text', borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass &&
260
+ `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, caretClass && `caret-color_${caretClass}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, placeholderTextColorClass &&
261
+ `placeholder-text-color_${placeholderTextColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `input-password__input_size_${sizeClass}`, textColorClass && `text-color_${textColorClass}`, textColorClass && `text-color_${textColorClass}`, textSizeClass && `text_size_${textSizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, widthClass && `width_${widthClass}`), type: inputType, disabled: isDisabled, placeholder: placeholder, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }), jsx(Icon, { className: "input-password__icon", size: iconSize, iconFill: iconFill, iconFillHover: iconFillHover, imageSrc: isRevealed ? imageRevealableHide : imageRevealableShow, shape: iconShape, SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow, onClick: onClickIconReveal })] }));
254
262
  }
255
263
 
256
264
  export { InputPassword, inputPasswordAppearance, inputPasswordConfig };
@@ -1,9 +1,8 @@
1
- export { L as Label, a as labelAppearance, l as labelConfig } from '../Label_es_SULlg9bL.js';
1
+ export { L as Label, a as labelAppearance, l as labelConfig } from '../Label_es_DCqpSw_F.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'react';
4
4
  import 'clsx';
5
5
  import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
6
- import '../tslib.es6_es_Bwu1Cn-t.js';
7
6
  import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
7
  import 'lodash/camelCase';
9
8
  import 'lodash/castArray';
@@ -19,9 +18,9 @@ import '../hooks.js';
19
18
  import '../hooks/useStyles/styleAttributes.js';
20
19
  import '../hooks/useStyles/useStyles.js';
21
20
  import 'lodash/maxBy';
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
- import '../Link_es_XiqbdwLp.js';
27
- import '../Text_es_CwV9rjFD.js';
25
+ import '../Link_es_P2b6ya7P.js';
26
+ import '../Text_es_CnymlElo.js';
@@ -1,5 +1,4 @@
1
- export { L as Link, a as LinkWrapper, b as linkAppearance, l as linkConfig } from '../Link_es_XiqbdwLp.js';
2
- import '../tslib.es6_es_Bwu1Cn-t.js';
1
+ export { L as Link, a as LinkWrapper, b as linkAppearance, l as linkConfig } from '../Link_es_P2b6ya7P.js';
3
2
  import 'react/jsx-runtime';
4
3
  import 'react';
5
4
  import 'clsx';
@@ -3,8 +3,7 @@ import clsx from 'clsx';
3
3
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
4
4
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
5
5
  import { useStyles } from '../hooks/useStyles/useStyles.js';
6
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
7
- import { L as Link } from '../Link_es_XiqbdwLp.js';
6
+ import { L as Link } from '../Link_es_P2b6ya7P.js';
8
7
  import 'react';
9
8
  import 'lodash/camelCase';
10
9
  import 'lodash/castArray';
@@ -20,7 +19,7 @@ import '../hooks.js';
20
19
  import '../hooks/useStyles/styleAttributes.js';
21
20
  import 'lodash/maxBy';
22
21
 
23
- var listAppearanceAccent = {
22
+ const listAppearanceAccent = {
24
23
  accent: {
25
24
  fill: 'accentPrimary',
26
25
  fillHover: 'accentPrimaryHover',
@@ -41,14 +40,14 @@ var listAppearanceAccent = {
41
40
  },
42
41
  };
43
42
 
44
- var listAppearanceDanger = {
43
+ const listAppearanceDanger = {
45
44
  danger: {
46
45
  fill: 'dangerPrimary',
47
46
  fillHover: 'dangerPrimaryHover',
48
47
  },
49
48
  };
50
49
 
51
- var listAppearanceError = {
50
+ const listAppearanceError = {
52
51
  error: {
53
52
  fill: 'errorPrimary',
54
53
  fillHover: 'errorPrimaryHover',
@@ -59,7 +58,7 @@ var listAppearanceError = {
59
58
  },
60
59
  };
61
60
 
62
- var listAppearanceInfo = {
61
+ const listAppearanceInfo = {
63
62
  info: {
64
63
  fill: 'accentPrimary',
65
64
  fillHover: 'accentPrimaryHover',
@@ -80,7 +79,7 @@ var listAppearanceInfo = {
80
79
  },
81
80
  };
82
81
 
83
- var listAppearancePrimary = {
82
+ const listAppearancePrimary = {
84
83
  primary: {
85
84
  fill: 'primaryPrimary',
86
85
  fillHover: 'primaryPrimaryHover',
@@ -88,7 +87,7 @@ var listAppearancePrimary = {
88
87
  },
89
88
  };
90
89
 
91
- var listAppearanceSecondary = {
90
+ const listAppearanceSecondary = {
92
91
  secondary: {
93
92
  fill: 'secondaryPrimary',
94
93
  fillHover: 'secondaryPrimaryHover',
@@ -96,7 +95,7 @@ var listAppearanceSecondary = {
96
95
  },
97
96
  };
98
97
 
99
- var listAppearanceSize = {
98
+ const listAppearanceSize = {
100
99
  sizeXXL: {
101
100
  size: 'xxl',
102
101
  labelTextSize: 'xxl',
@@ -155,7 +154,7 @@ var listAppearanceSize = {
155
154
  },
156
155
  };
157
156
 
158
- var listAppearanceStyle = {
157
+ const listAppearanceStyle = {
159
158
  full: {
160
159
  borderColor: '0',
161
160
  },
@@ -171,7 +170,7 @@ var listAppearanceStyle = {
171
170
  },
172
171
  };
173
172
 
174
- var listAppearanceSuccess = {
173
+ const listAppearanceSuccess = {
175
174
  success: {
176
175
  fill: 'successPrimary',
177
176
  fillHover: 'successPrimaryHover',
@@ -182,7 +181,7 @@ var listAppearanceSuccess = {
182
181
  },
183
182
  };
184
183
 
185
- var listAppearanceSurface = {
184
+ const listAppearanceSurface = {
186
185
  surfacePrimary: {
187
186
  fill: 'surfacePrimary',
188
187
  fillHover: 'surfacePrimaryHover',
@@ -207,7 +206,7 @@ var listAppearanceSurface = {
207
206
  },
208
207
  };
209
208
 
210
- var listAppearanceWarning = {
209
+ const listAppearanceWarning = {
211
210
  warning: {
212
211
  fill: 'warningPrimary',
213
212
  fillHover: 'warningPrimaryHover',
@@ -218,31 +217,43 @@ var listAppearanceWarning = {
218
217
  },
219
218
  };
220
219
 
221
- var listAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, listAppearanceSize), listAppearanceStyle), listAppearanceAccent), listAppearanceDanger), listAppearanceError), listAppearanceInfo), listAppearancePrimary), listAppearanceSecondary), listAppearanceSuccess), listAppearanceSurface), listAppearanceWarning);
220
+ const listAppearance = {
221
+ ...listAppearanceSize,
222
+ ...listAppearanceStyle,
223
+ ...listAppearanceAccent,
224
+ ...listAppearanceDanger,
225
+ ...listAppearanceError,
226
+ ...listAppearanceInfo,
227
+ ...listAppearancePrimary,
228
+ ...listAppearanceSecondary,
229
+ ...listAppearanceSuccess,
230
+ ...listAppearanceSurface,
231
+ ...listAppearanceWarning,
232
+ };
222
233
 
223
- var listConfig = {
234
+ const listConfig = {
224
235
  appearance: listAppearance};
225
236
  function List(props) {
226
- var className = props.className, type = props.type, appearance = props.appearance, style = props.style, children = props.children;
227
- var appearanceConfig = useAppearanceConfig(appearance, listConfig);
228
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
229
- var directionClass = propsGenerator.directionClass, bulletFillClass = propsGenerator.bulletFillClass, bulletSizeClass = propsGenerator.bulletSizeClass, bulletTextColorClass = propsGenerator.bulletTextColorClass, sizeClass = propsGenerator.sizeClass;
237
+ const { className, type, appearance, style, children } = props;
238
+ const appearanceConfig = useAppearanceConfig(appearance, listConfig);
239
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
240
+ const { directionClass, bulletFillClass, bulletSizeClass, bulletTextColorClass, sizeClass, } = propsGenerator;
230
241
  // @ts-expect-error
231
- var ulStyles = useStyles(props).styles;
232
- return (jsx("ul", { className: clsx(className, 'list', bulletSizeClass && "list_bullet-size_".concat(bulletSizeClass), bulletFillClass && "list_bullet-fill_".concat(bulletFillClass), bulletTextColorClass &&
233
- "list_bullet-text-color_".concat(bulletTextColorClass), directionClass && "list_direction_".concat(directionClass), sizeClass && "list_size_".concat(sizeClass), style && "list_style_".concat(style), type && "list_type_".concat(type)), style: ulStyles, children: children }));
242
+ const { styles: ulStyles } = useStyles(props);
243
+ return (jsx("ul", { className: clsx(className, 'list', bulletSizeClass && `list_bullet-size_${bulletSizeClass}`, bulletFillClass && `list_bullet-fill_${bulletFillClass}`, bulletTextColorClass &&
244
+ `list_bullet-text-color_${bulletTextColorClass}`, directionClass && `list_direction_${directionClass}`, sizeClass && `list_size_${sizeClass}`, style && `list_style_${style}`, type && `list_type_${type}`), style: ulStyles, children: children }));
234
245
  }
235
246
 
236
247
  function ListItem(props) {
237
- var className = props.className, text = props.text, href = props.href, link = props.link, before = props.before, after = props.after, children = props.children;
238
- var propsGenerator = useDevicePropsGenerator(props);
239
- var fillClass = propsGenerator.fillClass, textColorClass = propsGenerator.textColorClass, textStyleClass = propsGenerator.textStyleClass, textWeightClass = propsGenerator.textWeightClass;
248
+ const { className, text, href, link, before, after, children } = props;
249
+ const propsGenerator = useDevicePropsGenerator(props);
250
+ const { fillClass, textColorClass, textStyleClass, textWeightClass } = propsGenerator;
240
251
  // @ts-expect-error
241
- var _a = useStyles(props), linkStyles = _a.link, liStyles = _a.styles;
252
+ const { link: linkStyles, styles: liStyles } = useStyles(props);
242
253
  if (link) {
243
- return (jsx("li", { className: clsx(className, 'list__item', 'list__item_type_link', textStyleClass && "text text-style_".concat(textStyleClass), textWeightClass && "text text-weight_".concat(textWeightClass), textColorClass && "text-color_".concat(textColorClass), fillClass && "fill_".concat(fillClass)), style: liStyles, children: jsx(Link, { className: clsx('list__item-link'), href: link || href, style: linkStyles, children: children || text }) }));
254
+ return (jsx("li", { className: clsx(className, 'list__item', 'list__item_type_link', textStyleClass && `text text-style_${textStyleClass}`, textWeightClass && `text text-weight_${textWeightClass}`, textColorClass && `text-color_${textColorClass}`, fillClass && `fill_${fillClass}`), style: liStyles, children: jsx(Link, { className: clsx('list__item-link'), href: link || href, style: linkStyles, children: children || text }) }));
244
255
  }
245
- return (jsxs("li", { className: clsx(className, 'list__item', textStyleClass && "text text-style_".concat(textStyleClass), textWeightClass && "text text-weight_".concat(textWeightClass), textColorClass && "text-color_".concat(textColorClass), fillClass && "fill_".concat(fillClass)), style: liStyles, children: [before, children || text, after] }));
256
+ return (jsxs("li", { className: clsx(className, 'list__item', textStyleClass && `text text-style_${textStyleClass}`, textWeightClass && `text text-weight_${textWeightClass}`, textColorClass && `text-color_${textColorClass}`, fillClass && `fill_${fillClass}`), style: liStyles, children: [before, children || text, after] }));
246
257
  }
247
258
 
248
259
  export { List, ListItem };
@@ -1,8 +1,7 @@
1
- export { L as Loader, a as loaderAppearance, l as loaderConfig } from '../Loader_es_BUSqFrCd.js';
1
+ export { L as Loader, a as loaderAppearance, l as loaderConfig } from '../Loader_es_CmSggwbR.js';
2
2
  import 'react/jsx-runtime';
3
3
  import 'clsx';
4
4
  import '../hooks/useAppearanceConfig/useAppearanceConfig.js';
5
- import '../tslib.es6_es_Bwu1Cn-t.js';
6
5
  import 'react';
7
6
  import '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
7
  import 'lodash/camelCase';
@@ -19,4 +18,4 @@ import '../hooks.js';
19
18
  import '../hooks/useStyles/styleAttributes.js';
20
19
  import '../hooks/useStyles/useStyles.js';
21
20
  import 'lodash/maxBy';
22
- import '../Text_es_CwV9rjFD.js';
21
+ import '../Text_es_CnymlElo.js';
@@ -4,8 +4,7 @@ import { urlWithAssetPrefix } from '../hoc/urlWithAssetPrefix.js';
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 { a as LinkWrapper } from '../Link_es_XiqbdwLp.js';
8
- import '../tslib.es6_es_Bwu1Cn-t.js';
7
+ import { a as LinkWrapper } from '../Link_es_P2b6ya7P.js';
9
8
  import 'react';
10
9
  import '@itcase/common';
11
10
  import '../context/UrlAssetPrefix.js';
@@ -22,19 +21,19 @@ import '../hooks.js';
22
21
  import '../hooks/useStyles/styleAttributes.js';
23
22
  import 'lodash/maxBy';
24
23
 
25
- var logoConfig = {
24
+ const logoConfig = {
26
25
  appearance: undefined,
27
- setAppearance: function (appearanceConfig) {
26
+ setAppearance: (appearanceConfig) => {
28
27
  logoConfig.appearance = appearanceConfig;
29
28
  },
30
29
  };
31
- var Logo = urlWithAssetPrefix(function Logo(props) {
32
- var className = props.className, appearance = props.appearance, href = props.href, link = props.link;
33
- var appearanceConfig = useAppearanceConfig(appearance, logoConfig);
34
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
35
- var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, alignItemsClass = propsGenerator.alignItemsClass, src = propsGenerator.src, title = propsGenerator.title, alt = propsGenerator.alt, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
36
- var logo = useStyles(props).styles;
37
- return (jsx("div", { className: clsx(className, 'logo', alignClass && "align_".concat(alignClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignItemsClass && "logo_align-items_".concat(alignItemsClass), sizeClass && "logo_size_".concat(sizeClass), widthClass && "width_".concat(widthClass)), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title }) })) : (jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title })) }));
30
+ const Logo = urlWithAssetPrefix(function Logo(props) {
31
+ const { className, appearance, href, link } = props;
32
+ const appearanceConfig = useAppearanceConfig(appearance, logoConfig);
33
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
34
+ const { alignClass, alignDirectionClass, alignItemsClass, src, title, alt, sizeClass, widthClass, } = propsGenerator;
35
+ const { styles: logo } = useStyles(props);
36
+ return (jsx("div", { className: clsx(className, 'logo', alignClass && `align_${alignClass}`, alignDirectionClass && `align_${alignDirectionClass}`, alignItemsClass && `logo_align-items_${alignItemsClass}`, sizeClass && `logo_size_${sizeClass}`, widthClass && `width_${widthClass}`), style: logo, children: link || href ? (jsx(LinkWrapper, { className: "logo__link", href: link || href, children: jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title }) })) : (jsx("img", { className: "logo__image", src: src, title: title || alt, alt: alt || title })) }));
38
37
  });
39
38
 
40
39
  export { Logo, logoConfig };
@@ -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, T as Tooltip } from '../Icon_es_BrwLifge.js';
8
- import { L as Link } from '../Link_es_XiqbdwLp.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, T as Tooltip } from '../Icon_es_D5eiycFI.js';
8
+ import { L as Link } from '../Link_es_P2b6ya7P.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';
@@ -25,7 +24,7 @@ import 'react-inlinesvg';
25
24
  import '../hoc/urlWithAssetPrefix.js';
26
25
  import '../context/UrlAssetPrefix.js';
27
26
 
28
- var menuItemAppearanceAccent = {
27
+ const menuItemAppearanceAccent = {
29
28
  accentMutedPrimary: {
30
29
  fill: 'accentTertiary',
31
30
  fillHover: 'accentTertiaryHover',
@@ -52,7 +51,7 @@ var menuItemAppearanceAccent = {
52
51
  },
53
52
  };
54
53
 
55
- var menuItemAppearanceError = {
54
+ const menuItemAppearanceError = {
56
55
  errorMutedPrimary: {
57
56
  fill: 'errorDisabled',
58
57
  labelTextColor: 'errorTextQuaternary',
@@ -71,7 +70,7 @@ var menuItemAppearanceError = {
71
70
  },
72
71
  };
73
72
 
74
- var menuItemAppearanceSize = {
73
+ const menuItemAppearanceSize = {
75
74
  sizeXXL: {
76
75
  size: 'xxl',
77
76
  labelTextSize: 'l',
@@ -116,7 +115,7 @@ var menuItemAppearanceSize = {
116
115
  },
117
116
  };
118
117
 
119
- var menuItemAppearanceStyle = {
118
+ const menuItemAppearanceStyle = {
120
119
  solid: {
121
120
  borderColor: 'none',
122
121
  },
@@ -130,7 +129,7 @@ var menuItemAppearanceStyle = {
130
129
  },
131
130
  };
132
131
 
133
- var menuItemAppearanceSurface = {
132
+ const menuItemAppearanceSurface = {
134
133
  surfaceMutedPrimary: {
135
134
  fill: 'surfaceSecondary',
136
135
  fillActive: 'surfacePrimary',
@@ -174,43 +173,47 @@ var menuItemAppearanceSurface = {
174
173
  },
175
174
  };
176
175
 
177
- var menuItemAppearance = __assign(__assign(__assign(__assign(__assign({}, menuItemAppearanceSize), menuItemAppearanceStyle), menuItemAppearanceAccent), menuItemAppearanceError), menuItemAppearanceSurface);
176
+ const menuItemAppearance = {
177
+ ...menuItemAppearanceSize,
178
+ ...menuItemAppearanceStyle,
179
+ ...menuItemAppearanceAccent,
180
+ ...menuItemAppearanceError,
181
+ ...menuItemAppearanceSurface,
182
+ };
178
183
 
179
- var menuItemConfig = {
184
+ const menuItemConfig = {
180
185
  appearance: menuItemAppearance,
181
- setAppearance: function (appearanceConfig) {
186
+ setAppearance: (appearanceConfig) => {
182
187
  menuItemConfig.appearance = appearanceConfig;
183
188
  },
184
189
  };
185
190
  function MenuItem(props) {
186
- var className = props.className, appearance = props.appearance, label = props.label, isDisabled = props.isDisabled, href = props.href, link = props.link, LinkComponent = props.LinkComponent, rel = props.rel, showTooltip = props.showTooltip, target = props.target, tooltipAppearance = props.tooltipAppearance, underline = props.underline, before = props.before, after = props.after, isActive = props.isActive, onClick = props.onClick, children = props.children;
187
- var tooltipRef = useRef(null);
188
- var onMouseEnter = useCallback(function () {
189
- var _a;
191
+ const { className, appearance, label, isDisabled, href, link, LinkComponent, rel, showTooltip, target, tooltipAppearance, underline, before, after, isActive, onClick, children, } = props;
192
+ const tooltipRef = useRef(null);
193
+ const onMouseEnter = useCallback(() => {
190
194
  if (showTooltip) {
191
- (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.openTooltip();
195
+ tooltipRef.current?.openTooltip();
192
196
  }
193
197
  }, [showTooltip]);
194
- var onMouseLeave = useCallback(function () {
195
- var _a;
198
+ const onMouseLeave = useCallback(() => {
196
199
  if (showTooltip) {
197
- (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.closeTooltip();
200
+ tooltipRef.current?.closeTooltip();
198
201
  }
199
202
  }, [showTooltip]);
200
- var appearanceConfig = useAppearanceConfig(appearance, menuItemConfig, isDisabled);
201
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
202
- var directionClass = propsGenerator.directionClass, justifyContentClass = propsGenerator.justifyContentClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelStyle = propsGenerator.labelStyle, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextColorDisabled = propsGenerator.labelTextColorDisabled, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelWeight = propsGenerator.labelWeight, labelWrap = propsGenerator.labelWrap, borderColorClass = propsGenerator.borderColorClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBadgeAppearance = propsGenerator.iconBadgeAppearance, iconBadgeShape = propsGenerator.iconBadgeShape, iconBadgeSize = propsGenerator.iconBadgeSize, iconBadgeTextColor = propsGenerator.iconBadgeTextColor, iconBadgeTextSize = propsGenerator.iconBadgeTextSize, iconBadgeValue = propsGenerator.iconBadgeValue, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, tooltipFill = propsGenerator.tooltipFill, tooltipShapeStrength = propsGenerator.tooltipShapeStrength, tooltipText = propsGenerator.tooltipText, tooltipTextColor = propsGenerator.tooltipTextColor, tooltipTitleTextColor = propsGenerator.tooltipTitleTextColor, typeClass = propsGenerator.typeClass, widthClass = propsGenerator.widthClass, isSkeleton = propsGenerator.isSkeleton;
203
+ const appearanceConfig = useAppearanceConfig(appearance, menuItemConfig, isDisabled);
204
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
205
+ const { directionClass, justifyContentClass, alignClass, alignDirectionClass, fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, labelStyle, labelTextActiveColor, labelTextActiveHoverColor, labelTextColor, labelTextColorDisabled, labelTextHoverColor, labelTextSize, labelWeight, labelWrap, borderColorClass, iconAfter, iconAfterFill, iconAfterFillIcon, iconAfterFillSize, iconAfterShape, iconAfterSize, iconAfterSrc, iconBadgeAppearance, iconBadgeShape, iconBadgeSize, iconBadgeTextColor, iconBadgeTextSize, iconBadgeValue, iconBefore, iconBeforeFill, iconBeforeFillIcon, iconBeforeFillSize, iconBeforeShape, iconBeforeSize, iconBeforeSrc, shapeClass, shapeStrengthClass, sizeClass, tooltipFill, tooltipShapeStrength, tooltipText, tooltipTextColor, tooltipTitleTextColor, typeClass, widthClass, isSkeleton, } = propsGenerator;
203
206
  // @ts-expect-error
204
- var menuItem = useStyles(props).styles;
205
- return (jsxs("div", { className: clsx('menu-item', isActive && 'menu-item_state_active', isDisabled && "menu-item_state_disabled", directionClass && "menu-item_direction_".concat(directionClass), className, (iconBefore || iconBeforeSrc || iconAfter || iconAfterSrc) &&
206
- 'menu-item_label-icon', sizeClass && "menu-item_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), !isActive
207
- ? fillClass && "fill_".concat(fillClass)
208
- : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
209
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
210
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass
211
- ? "shape-strength_".concat(shapeStrengthClass)
212
- : shapeClass === 'rounded' && 'shape-strength_default', typeClass && "menu-item_type_".concat(typeClass), widthClass && "width_".concat(widthClass), justifyContentClass &&
213
- "menu-item_justify-content_".concat(justifyContentClass), isSkeleton && "menu-item_skeleton"), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxs(Link, { className: clsx('menu-item__wrapper', alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass)), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsx(Text, { className: "menu-item__label", size: labelTextSize, isDisabled: isDisabled, textColorDisabled: labelTextColorDisabled, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, children: label })), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsx(Tooltip, { className: "menu-item__tooltip", ref: tooltipRef, appearance: tooltipAppearance, minWidth: "auto", fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, text: tooltipText, textColor: tooltipTextColor, centering: "vertical", shapeStrength: tooltipShapeStrength }))] }));
207
+ const { styles: menuItem } = useStyles(props);
208
+ return (jsxs("div", { className: clsx('menu-item', isActive && 'menu-item_state_active', isDisabled && `menu-item_state_disabled`, directionClass && `menu-item_direction_${directionClass}`, className, (iconBefore || iconBeforeSrc || iconAfter || iconAfterSrc) &&
209
+ 'menu-item_label-icon', sizeClass && `menu-item_size_${sizeClass}`, borderColorClass && `border-color_${borderColorClass}`, !isActive
210
+ ? fillClass && `fill_${fillClass}`
211
+ : fillActiveClass && `fill_active_${fillActiveClass}`, !isActive
212
+ ? fillHoverClass && `fill_hover_${fillHoverClass}`
213
+ : fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass
214
+ ? `shape-strength_${shapeStrengthClass}`
215
+ : shapeClass === 'rounded' && 'shape-strength_default', typeClass && `menu-item_type_${typeClass}`, widthClass && `width_${widthClass}`, justifyContentClass &&
216
+ `menu-item_justify-content_${justifyContentClass}`, isSkeleton && `menu-item_skeleton`), style: menuItem, onClick: onClick, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: [jsxs(Link, { className: clsx('menu-item__wrapper', alignDirectionClass && `align_${alignDirectionClass}`, alignClass && `align_${alignClass}`), href: link || href, LinkComponent: LinkComponent, rel: rel, target: target, underline: underline, children: [before, children || (jsxs(React.Fragment, { children: [(iconBefore || iconBeforeSrc) && (jsx(Icon, { className: clsx('menu-item__icon_before', iconBadgeValue && 'menu-item__icon_before-badge'), fill: iconBeforeFill, fillSize: iconBeforeFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: 'menu-item__icon_before_badge', badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconBeforeFillIcon, iconSize: iconBeforeSize, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore })), label && (jsx(Text, { className: "menu-item__label", size: labelTextSize, isDisabled: isDisabled, textColorDisabled: labelTextColorDisabled, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textStyle: labelStyle, textWeight: labelWeight, textWrap: labelWrap, isActive: isActive, children: label })), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: clsx('menu-item__icon_after', iconBadgeValue && 'menu-item__icon_after-badge'), fill: iconAfterFill, fillSize: iconAfterFillSize, badgeAppearance: iconBadgeAppearance, badgeClass: "menu-item__icon_after_badge", badgeShape: iconBadgeShape, badgeSize: iconBadgeSize, badgeTextColor: iconBadgeTextColor, badgeTextSize: iconBadgeTextSize, badgeValue: iconBadgeValue, iconFill: iconAfterFillIcon, iconSize: iconAfterSize, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter }))] })), after] }), showTooltip && (jsx(Tooltip, { className: "menu-item__tooltip", ref: tooltipRef, appearance: tooltipAppearance, minWidth: "auto", fill: tooltipFill, left: "100%", zIndex: "100", titleTextColor: tooltipTitleTextColor, text: tooltipText, textColor: tooltipTextColor, centering: "vertical", shapeStrength: tooltipShapeStrength }))] }));
214
217
  }
215
218
 
216
219
  export { MenuItem, menuItemAppearance, menuItemConfig };