@itcase/ui 1.8.122 → 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 (266) 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_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
  4. package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
  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_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_CiDHjDqJ.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 +114 -84
  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 +102 -84
  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 +47 -42
  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 +59 -69
  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 +114 -84
  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 +102 -84
  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 +47 -42
  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 +59 -69
  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/Checkmark/Checkmark.css +2 -0
  203. package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
  204. package/dist/css/components/Input/Input.css +0 -8
  205. package/dist/css/components/InputPassword/InputPassword.css +34 -43
  206. package/dist/css/components/Tile/Tile.css +3 -3
  207. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  208. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  209. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  210. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  211. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  212. package/dist/hooks/useAppearanceConfig.js +0 -1
  213. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  214. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  215. package/dist/hooks/useDeviceTargetClass.js +0 -1
  216. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  217. package/dist/hooks/useStyles/useStyles.js +0 -1
  218. package/dist/hooks/useStyles.js +0 -1
  219. package/dist/hooks/useViewportFix.js +5 -5
  220. package/dist/hooks.js +1 -1
  221. package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
  222. package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
  223. package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
  224. package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
  225. package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
  226. package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
  227. package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
  228. package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
  229. package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
  230. package/dist/types/components/Response/Response.constant.d.ts +32 -35
  231. package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
  232. package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
  233. package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
  234. package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
  235. package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
  236. package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
  237. package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
  238. package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
  239. package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
  240. package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
  241. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  242. package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
  243. package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
  244. package/dist/utils/setViewportProperty.js +3 -3
  245. package/package.json +14 -14
  246. package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
  247. package/dist/Avatar_es_lx7s4Vla.js +0 -153
  248. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  249. package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
  250. package/dist/DatePicker_es_BP5BrEr-.js +0 -179
  251. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  252. package/dist/Divider_es_CCLBFIx6.js +0 -93
  253. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  254. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  255. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  256. package/dist/Group_es_DRqIIM9m.js +0 -55
  257. package/dist/Image_cjs_B6YlGx8G.js +0 -28
  258. package/dist/Image_es_BvYo_cHH.js +0 -26
  259. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  260. package/dist/Loader_es_BUSqFrCd.js +0 -128
  261. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  262. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  263. package/dist/Text_cjs_0EINiUq4.js +0 -68
  264. package/dist/Text_es_CwV9rjFD.js +0 -64
  265. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  266. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -1,4 +1,3 @@
1
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { icons16, icons24 } from '@itcase/icons/default';
3
2
  import { jsxs, jsx } from 'react/jsx-runtime';
4
3
  import React, { useCallback } from 'react';
@@ -6,9 +5,9 @@ import clsx from 'clsx';
6
5
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
7
6
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
8
7
  import { useStyles } from '../hooks/useStyles/useStyles.js';
9
- import { I as Icon } from '../Icon_es_BrwLifge.js';
10
- import { T as Text } from '../Text_es_CwV9rjFD.js';
11
- import { S as Scrollbar } from '../Scrollbar_es_CThJeCLF.js';
8
+ import { I as Icon } from '../Icon_es_D5eiycFI.js';
9
+ import { T as Text } from '../Text_es_CnymlElo.js';
10
+ import { S as Scrollbar } from '../Scrollbar_es_CcMgNvGi.js';
12
11
  import 'lodash/camelCase';
13
12
  import 'lodash/castArray';
14
13
  import 'lodash/upperFirst';
@@ -25,10 +24,10 @@ import 'lodash/maxBy';
25
24
  import 'react-inlinesvg';
26
25
  import '../hoc/urlWithAssetPrefix.js';
27
26
  import '../context/UrlAssetPrefix.js';
28
- import '../Link_es_XiqbdwLp.js';
27
+ import '../Link_es_P2b6ya7P.js';
29
28
  import 'react-scrollbars-custom';
30
29
 
31
- var searchAppearanceDefault = {
30
+ const searchAppearanceDefault = {
32
31
  defaultPrimary: {
33
32
  fill: 'surfaceSecondary',
34
33
  borderColor: 'surfaceBorderQuaternary',
@@ -51,7 +50,7 @@ var searchAppearanceDefault = {
51
50
  },
52
51
  };
53
52
 
54
- var searchAppearanceDisabled = {
53
+ const searchAppearanceDisabled = {
55
54
  disabledPrimary: {
56
55
  fill: 'surfaceDisabled',
57
56
  borderColor: 'surfaceBorderDisabled',
@@ -64,7 +63,7 @@ var searchAppearanceDisabled = {
64
63
  },
65
64
  };
66
65
 
67
- var searchAppearanceError = {
66
+ const searchAppearanceError = {
68
67
  errorPrimary: {
69
68
  fill: 'errorTertiary',
70
69
  borderColor: 'errorBorderQuaternary',
@@ -77,7 +76,7 @@ var searchAppearanceError = {
77
76
  },
78
77
  };
79
78
 
80
- var searchAppearanceRequire = {
79
+ const searchAppearanceRequire = {
81
80
  requirePrimary: {
82
81
  fill: 'warningTertiary',
83
82
  borderColor: 'warningBorderSecondary',
@@ -90,7 +89,7 @@ var searchAppearanceRequire = {
90
89
  },
91
90
  };
92
91
 
93
- var searchAppearanceShape = {
92
+ const searchAppearanceShape = {
94
93
  circular: {
95
94
  shape: 'circular',
96
95
  },
@@ -115,7 +114,7 @@ var searchAppearanceShape = {
115
114
  },
116
115
  };
117
116
 
118
- var searchAppearanceSize = {
117
+ const searchAppearanceSize = {
119
118
  sizeXXL: {
120
119
  size: 'xxl',
121
120
  iconBefore: icons24.Security.Search,
@@ -160,7 +159,7 @@ var searchAppearanceSize = {
160
159
  },
161
160
  };
162
161
 
163
- var searchAppearanceStyle = {
162
+ const searchAppearanceStyle = {
164
163
  solid: {
165
164
  borderColor: 'none',
166
165
  borderColorHover: 'none',
@@ -177,7 +176,7 @@ var searchAppearanceStyle = {
177
176
  },
178
177
  };
179
178
 
180
- var searchAppearanceSuccess = {
179
+ const searchAppearanceSuccess = {
181
180
  successPrimary: {
182
181
  fill: 'successTertiary',
183
182
  borderColor: 'accentBorderQuaternary',
@@ -190,46 +189,55 @@ var searchAppearanceSuccess = {
190
189
  },
191
190
  };
192
191
 
193
- var searchAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, searchAppearanceSize), searchAppearanceStyle), searchAppearanceDefault), searchAppearanceError), searchAppearanceSuccess), searchAppearanceRequire), searchAppearanceDisabled), searchAppearanceShape);
192
+ const searchAppearance = {
193
+ ...searchAppearanceSize,
194
+ ...searchAppearanceStyle,
195
+ ...searchAppearanceDefault,
196
+ ...searchAppearanceError,
197
+ ...searchAppearanceSuccess,
198
+ ...searchAppearanceRequire,
199
+ ...searchAppearanceDisabled,
200
+ ...searchAppearanceShape,
201
+ };
194
202
 
195
- var searchInputConfig = {
203
+ const searchInputConfig = {
196
204
  appearance: searchAppearance,
197
- setAppearance: function (appearanceConfig) {
205
+ setAppearance: (appearanceConfig) => {
198
206
  searchInputConfig.appearance = appearanceConfig;
199
207
  },
200
208
  };
201
- var SearchInput = React.forwardRef(function SearchInput(props, ref) {
202
- var dataTour = props.dataTour, className = props.className, appearance = props.appearance, placeholder = props.placeholder, value = props.value, before = props.before, after = props.after, isActive = props.isActive, isSkeleton = props.isSkeleton, isDisabled = props.isDisabled, onChange = props.onChange, onClickClean = props.onClickClean, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
203
- var onChangeSearchInput = useCallback(function (event) {
209
+ const SearchInput = React.forwardRef(function SearchInput(props, ref) {
210
+ const { dataTour, className, appearance, placeholder, value, before, after, isActive, isSkeleton, isDisabled, onChange, onClickClean, onFocus, onKeyDown, } = props;
211
+ const onChangeSearchInput = useCallback((event) => {
204
212
  onChange && onChange(event.target.value);
205
213
  }, [onChange]);
206
- var onClickClearIcon = useCallback(function (event) {
214
+ const onClickClearIcon = useCallback((event) => {
207
215
  event.stopPropagation();
208
216
  onChange && onChange('');
209
217
  if (onClickClean) {
210
218
  onClickClean();
211
219
  }
212
220
  }, [onChange, onClickClean]);
213
- var appearanceConfig = useAppearanceConfig(appearance, searchInputConfig, isDisabled);
214
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
215
- var size = propsGenerator.size, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconAfter = propsGenerator.iconAfter, iconAfterFill = propsGenerator.iconAfterFill, iconAfterSize = propsGenerator.iconAfterSize, iconAfterSrc = propsGenerator.iconAfterSrc, iconBefore = propsGenerator.iconBefore, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeSize = propsGenerator.iconBeforeSize, iconBeforeSrc = propsGenerator.iconBeforeSrc, iconClear = propsGenerator.iconClear, iconClearFill = propsGenerator.iconClearFill, iconClearSize = propsGenerator.iconClearSize, iconClearSrc = propsGenerator.iconClearSrc, inputFillClass = propsGenerator.inputFillClass, inputTextColorClass = propsGenerator.inputTextColorClass, inputTextSizeClass = propsGenerator.inputTextSizeClass, inputTextStyleClass = propsGenerator.inputTextStyleClass, inputTextWeightClass = propsGenerator.inputTextWeightClass, placeholderTextColor = propsGenerator.placeholderTextColor, placeholderTextSize = propsGenerator.placeholderTextSize, placeholderTextStyle = propsGenerator.placeholderTextStyle, placeholderTextWeight = propsGenerator.placeholderTextWeight, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, widthClass = propsGenerator.widthClass;
216
- var searchInputStyles = useStyles(props).styles;
217
- return (jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "width_".concat(widthClass), borderColorClass && "border-color_".concat(borderColorClass), borderColorHoverClass && "border-color_hover_".concat(borderColorHoverClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), size && "search-input_size_".concat(size), isSkeleton && "search-input_skeleton"), style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && "fill_".concat(inputFillClass)), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
221
+ const appearanceConfig = useAppearanceConfig(appearance, searchInputConfig, isDisabled);
222
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
223
+ const { size, fillClass, borderColorClass, borderColorHoverClass, borderTypeClass, borderWidthClass, iconAfter, iconAfterFill, iconAfterSize, iconAfterSrc, iconBefore, iconBeforeFill, iconBeforeSize, iconBeforeSrc, iconClear, iconClearFill, iconClearSize, iconClearSrc, inputFillClass, inputTextColorClass, inputTextSizeClass, inputTextStyleClass, inputTextWeightClass, placeholderTextColor, placeholderTextSize, placeholderTextStyle, placeholderTextWeight, shapeClass, shapeStrengthClass, widthClass, } = propsGenerator;
224
+ const { styles: searchInputStyles } = useStyles(props);
225
+ return (jsxs("label", { dataTour: dataTour, className: clsx(className, 'search-input', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`, widthClass && `width_${widthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, size && `search-input_size_${size}`, isSkeleton && `search-input_skeleton`), style: searchInputStyles, children: [before, (iconBefore || iconBeforeSrc) && (jsx(Icon, { className: "search-input__icon-before", size: iconBeforeSize, iconFill: iconBeforeFill, imageSrc: iconBeforeSrc, SvgImage: iconBefore })), jsxs("div", { className: clsx('search-input__wrapper', inputFillClass && `fill_${inputFillClass}`), children: [jsx("input", { className: clsx('search-input__value', (inputTextSizeClass ||
218
226
  inputTextWeightClass ||
219
227
  inputTextColorClass ||
220
228
  inputTextStyleClass) &&
221
- 'text', inputTextSizeClass && "text_size_".concat(inputTextSizeClass), inputTextWeightClass && "text-weight_".concat(inputTextWeightClass), inputTextColorClass && "text-color_".concat(inputTextColorClass), inputTextStyleClass && "text-style_".concat(inputTextStyleClass)), type: "text", ref: ref, required: true, value: value || '', onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && "fill_".concat(iconClearFill)), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
229
+ 'text', inputTextSizeClass && `text_size_${inputTextSizeClass}`, inputTextWeightClass && `text-weight_${inputTextWeightClass}`, inputTextColorClass && `text-color_${inputTextColorClass}`, inputTextStyleClass && `text-style_${inputTextStyleClass}`), type: "text", ref: ref, required: true, value: value || '', onChange: onChangeSearchInput, onFocus: onFocus, onKeyDown: onKeyDown }), jsx("div", { className: "search-input__placeholder", children: jsx(Text, { className: clsx('search-input__placeholder-value'), size: placeholderTextSize, textColor: placeholderTextColor, textStyle: placeholderTextStyle, textWeight: placeholderTextWeight, children: placeholder }) }), value && (jsx(Icon, { className: clsx('search-input__clear', 'cursor_type_pointer', isActive && `fill_${iconClearFill}`), size: iconClearSize, iconFill: iconClearFill, imageSrc: iconClearSrc, SvgImage: iconClear, onClick: onClickClearIcon }))] }), (iconAfter || iconAfterSrc) && (jsx(Icon, { className: "search-input__icon-after", size: iconAfterSize, iconFill: iconAfterFill, imageSrc: iconAfterSrc, SvgImage: iconAfter })), after] }));
222
230
  });
223
231
  // @ts-expect-error
224
232
  SearchInput.DEFAULT_REF_STATE = {
225
233
  input: null,
226
234
  };
227
235
 
228
- var SearchResult = React.forwardRef(function SearchResult(props) {
229
- var className = props.className, scrollHeight = props.scrollHeight, before = props.before, after = props.after, children = props.children;
230
- var propsGenerator = useDevicePropsGenerator(props);
231
- var fillClass = propsGenerator.fillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass;
232
- return (jsx("div", { className: clsx(className, 'search-result', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass)), children: jsxs("div", { className: "search-result__wrapper", children: [before, React.Children.toArray(children).filter(Boolean).length && (jsx(Scrollbar, { scrollHeight: scrollHeight ? "".concat(scrollHeight, "px") : '300px', children: children })), after] }) }));
236
+ const SearchResult = React.forwardRef(function SearchResult(props) {
237
+ const { className, scrollHeight, before, after, children } = props;
238
+ const propsGenerator = useDevicePropsGenerator(props);
239
+ const { fillClass, shapeClass, shapeStrengthClass } = propsGenerator;
240
+ return (jsx("div", { className: clsx(className, 'search-result', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`), children: jsxs("div", { className: "search-result__wrapper", children: [before, React.Children.toArray(children).filter(Boolean).length && (jsx(Scrollbar, { scrollHeight: scrollHeight ? `${scrollHeight}px` : '300px', children: children })), after] }) }));
233
241
  });
234
242
 
235
243
  export { SearchInput, SearchResult, searchAppearance, searchInputConfig };
@@ -1,7 +1,6 @@
1
- import { _ as __assign } from '../../../tslib.es6_es_Bwu1Cn-t.js';
2
1
  import { icons24, icons20, icons16, icons14 } from '@itcase/icons/default';
3
2
 
4
- var segmentedMock = {
3
+ const segmentedMock = {
5
4
  activeSegment: {
6
5
  value: 1,
7
6
  },
@@ -32,17 +31,31 @@ var segmentedMock = {
32
31
  },
33
32
  ],
34
33
  };
35
- var segmentedLabelMock = segmentedMock === null || segmentedMock === void 0 ? void 0 : segmentedMock.segments.map(function (segment) { return ({
34
+ const segmentedLabelMock = segmentedMock?.segments.map((segment) => ({
36
35
  label: segment.label,
37
36
  value: segment.value,
38
- }); });
39
- var segmentedIconMock = segmentedMock === null || segmentedMock === void 0 ? void 0 : segmentedMock.segments.map(function (segment) { return ({
37
+ }));
38
+ const segmentedIconMock = segmentedMock?.segments
39
+ .map((segment) => ({
40
40
  iconBefore: segment.iconBefore,
41
- }); }).slice(3);
42
- var segmentedMockSize = {
43
- 14: segmentedMock.segments.map(function (segment) { return (__assign(__assign({}, segment), { iconAfter: icons14.Placeholder.Default, iconBefore: icons14.Placeholder.Default })); }),
44
- 16: segmentedMock.segments.map(function (segment) { return (__assign(__assign({}, segment), { iconAfter: icons16.Placeholder.Default, iconBefore: icons16.Placeholder.Default })); }),
45
- 20: segmentedMock.segments.map(function (segment) { return (__assign(__assign({}, segment), { iconAfter: icons20.Placeholder.Default, iconBefore: icons20.Placeholder.Default })); }),
41
+ }))
42
+ .slice(3);
43
+ const segmentedMockSize = {
44
+ 14: segmentedMock.segments.map((segment) => ({
45
+ ...segment,
46
+ iconAfter: icons14.Placeholder.Default,
47
+ iconBefore: icons14.Placeholder.Default,
48
+ })),
49
+ 16: segmentedMock.segments.map((segment) => ({
50
+ ...segment,
51
+ iconAfter: icons16.Placeholder.Default,
52
+ iconBefore: icons16.Placeholder.Default,
53
+ })),
54
+ 20: segmentedMock.segments.map((segment) => ({
55
+ ...segment,
56
+ iconAfter: icons20.Placeholder.Default,
57
+ iconBefore: icons20.Placeholder.Default,
58
+ })),
46
59
  };
47
60
 
48
61
  export { segmentedIconMock, segmentedLabelMock, segmentedMock, segmentedMockSize };
@@ -1,11 +1,10 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useRef, useMemo, createRef, useCallback, useEffect } from 'react';
3
3
  import clsx from 'clsx';
4
- import { I as Icon } from '../Icon_es_BrwLifge.js';
4
+ import { I as Icon } from '../Icon_es_D5eiycFI.js';
5
5
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
6
6
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
7
- import { T as Text } from '../Text_es_CwV9rjFD.js';
8
- import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
7
+ import { T as Text } from '../Text_es_CnymlElo.js';
9
8
  import 'react-inlinesvg';
10
9
  import '../hoc/urlWithAssetPrefix.js';
11
10
  import '@itcase/common';
@@ -22,10 +21,10 @@ import 'react-responsive';
22
21
  import '../utils/setViewportProperty.js';
23
22
  import '../hooks.js';
24
23
  import '../hooks/useStyles/styleAttributes.js';
25
- import '../Link_es_XiqbdwLp.js';
24
+ import '../Link_es_P2b6ya7P.js';
26
25
  import 'lodash/castArray';
27
26
 
28
- var segmentedAppearanceDefault = {
27
+ const segmentedAppearanceDefault = {
29
28
  defaultPrimary: {
30
29
  fill: 'surfacePrimary',
31
30
  fillActive: 'accentPrimary',
@@ -62,7 +61,7 @@ var segmentedAppearanceDefault = {
62
61
  },
63
62
  };
64
63
 
65
- var segmentedAppearanceDisabled = {
64
+ const segmentedAppearanceDisabled = {
66
65
  disabledPrimary: {
67
66
  fill: 'surfaceDisabled',
68
67
  fillActive: 'surfaceItemTertiary',
@@ -78,7 +77,7 @@ var segmentedAppearanceDisabled = {
78
77
  },
79
78
  };
80
79
 
81
- var segmentedAppearanceError = {
80
+ const segmentedAppearanceError = {
82
81
  errorPrimary: {
83
82
  fill: 'errorTertiary',
84
83
  fillActive: 'errorPrimary',
@@ -96,7 +95,7 @@ var segmentedAppearanceError = {
96
95
  },
97
96
  };
98
97
 
99
- var segmentedAppearanceShape = {
98
+ const segmentedAppearanceShape = {
100
99
  circular: {
101
100
  shape: 'circular',
102
101
  },
@@ -121,7 +120,7 @@ var segmentedAppearanceShape = {
121
120
  },
122
121
  };
123
122
 
124
- var segmentedAppearanceSize = {
123
+ const segmentedAppearanceSize = {
125
124
  sizeL: {
126
125
  size: 'l',
127
126
  labelTextSize: 'm',
@@ -149,7 +148,7 @@ var segmentedAppearanceSize = {
149
148
  },
150
149
  };
151
150
 
152
- var segmentedAppearanceStyle = {
151
+ const segmentedAppearanceStyle = {
153
152
  solid: {
154
153
  borderColor: 'none',
155
154
  },
@@ -165,7 +164,7 @@ var segmentedAppearanceStyle = {
165
164
  },
166
165
  };
167
166
 
168
- var segmentedAppearanceSuccess = {
167
+ const segmentedAppearanceSuccess = {
169
168
  successPrimary: {
170
169
  fill: 'successTertiary',
171
170
  fillActive: 'successItemSecondary',
@@ -183,7 +182,7 @@ var segmentedAppearanceSuccess = {
183
182
  },
184
183
  };
185
184
 
186
- var segmentedAppearanceWarning = {
185
+ const segmentedAppearanceWarning = {
187
186
  warningPrimary: {
188
187
  fill: 'warningTertiary',
189
188
  fillActive: 'accentPrimary',
@@ -202,55 +201,61 @@ var segmentedAppearanceWarning = {
202
201
  },
203
202
  };
204
203
 
205
- var segmentedAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, segmentedAppearanceDisabled), segmentedAppearanceSize), segmentedAppearanceShape), segmentedAppearanceStyle), segmentedAppearanceError), segmentedAppearanceSuccess), segmentedAppearanceDefault), segmentedAppearanceWarning);
204
+ const segmentedAppearance = {
205
+ ...segmentedAppearanceDisabled,
206
+ ...segmentedAppearanceSize,
207
+ ...segmentedAppearanceShape,
208
+ ...segmentedAppearanceStyle,
209
+ ...segmentedAppearanceError,
210
+ ...segmentedAppearanceSuccess,
211
+ ...segmentedAppearanceDefault,
212
+ ...segmentedAppearanceWarning,
213
+ };
206
214
 
207
- var segmentedConfig = {
215
+ const segmentedConfig = {
208
216
  appearance: segmentedAppearance,
209
- setAppearance: function (appearanceConfig) {
217
+ setAppearance: (appearanceConfig) => {
210
218
  segmentedConfig.appearance = appearanceConfig;
211
219
  },
212
220
  };
213
- var Segmented = function (props) {
214
- var className = props.className, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, _a = props.activeSegment, activeSegment = _a === void 0 ? {} : _a, segments = props.segments, isDisabled = props.isDisabled, setActiveSegment = props.setActiveSegment, isSkeleton = props.isSkeleton, onChange = props.onChange;
215
- var controlRef = useRef(null);
216
- var segmentsRefs = useMemo(function () {
217
- return new Map(segments.map(function (item) { return [item.value, createRef()]; }));
218
- }, [segments]);
219
- var onChangeValue = useCallback(function (item) {
221
+ const Segmented = (props) => {
222
+ const { appearance, className, name, activeSegment = {}, segments, isDisabled, isSkeleton, setActiveSegment, onChange, } = props;
223
+ const controlRef = useRef(null);
224
+ const segmentsRefs = useMemo(() => new Map(segments.map((item) => [item.value, createRef()])), [segments]);
225
+ const onChangeValue = useCallback((item) => {
220
226
  onChange && onChange(item.value, name);
221
227
  setActiveSegment && setActiveSegment(item);
222
228
  }, [name, onChange, setActiveSegment]);
223
- useEffect(function () {
224
- var _a, _b;
225
- var offsetWidth = 0;
226
- var offsetLeft = 0;
227
- var activeSegmentRef = segmentsRefs.get(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value);
228
- if (activeSegmentRef === null || activeSegmentRef === void 0 ? void 0 : activeSegmentRef.current) {
229
+ useEffect(() => {
230
+ let offsetWidth = 0;
231
+ let offsetLeft = 0;
232
+ const activeSegmentRef = segmentsRefs.get(activeSegment?.value);
233
+ if (activeSegmentRef?.current) {
229
234
  offsetWidth = activeSegmentRef.current.offsetWidth;
230
235
  offsetLeft = activeSegmentRef.current.offsetLeft;
231
236
  }
232
- (_a = controlRef.current) === null || _a === void 0 ? void 0 : _a.style.setProperty('--segmented-active-width', "".concat(offsetWidth, "px"));
237
+ controlRef.current?.style.setProperty('--segmented-active-width', `${offsetWidth}px`);
233
238
  // controlRef.current.style.setProperty('--segmented-active-x-pos', `${offsetLeft - 2}px`)
234
- (_b = controlRef.current) === null || _b === void 0 ? void 0 : _b.style.setProperty('--segmented-active-x-pos', "".concat(offsetLeft, "px"));
239
+ controlRef.current?.style.setProperty('--segmented-active-x-pos', `${offsetLeft}px`);
235
240
  }, [activeSegment, segmentsRefs]);
236
- var appearanceConfig = useAppearanceConfig(appearance, segmentedConfig, isDisabled);
237
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
238
- var fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, labelTextActiveColor = propsGenerator.labelTextActiveColor, labelTextActiveHoverColor = propsGenerator.labelTextActiveHoverColor, labelTextColor = propsGenerator.labelTextColor, labelTextHoverColor = propsGenerator.labelTextHoverColor, labelTextSize = propsGenerator.labelTextSize, labelTextWrap = propsGenerator.labelTextWrap, iconFillDisabled = propsGenerator.iconFillDisabled, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, iconFill = propsGenerator.iconFill, iconFillActive = propsGenerator.iconFillActive, iconSize = propsGenerator.iconSize, indicatorFillClass = propsGenerator.indicatorFillClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
239
- return (jsx("div", { className: clsx(className, 'segmented', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), fillClass && "fill_".concat(fillClass), widthClass && "segmented_width_".concat(widthClass), sizeClass && "segmented_size_".concat(sizeClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass), isSkeleton && "segmented_skeleton"), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments === null || segments === void 0 ? void 0 : segments.map(function (item) {
240
- var isActive = String(activeSegment === null || activeSegment === void 0 ? void 0 : activeSegment.value) === String(item.value);
241
- return (jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && "segmented__item_size_".concat(sizeClass), isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
241
+ const appearanceConfig = useAppearanceConfig(appearance, segmentedConfig, isDisabled);
242
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
243
+ const { fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, labelTextActiveColor, labelTextActiveHoverColor, labelTextColor, labelTextHoverColor, labelTextSize, labelTextWrap, borderColorClass, borderTypeClass, borderWidthClass, iconFill, iconFillActive, iconFillDisabled, iconSize, indicatorFillClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator;
244
+ return (jsx("div", { className: clsx(className, 'segmented', shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, fillClass && `fill_${fillClass}`, widthClass && `segmented_width_${widthClass}`, sizeClass && `segmented_size_${sizeClass}`, borderColorClass && `border-color_${borderColorClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderTypeClass && `border_type_${borderTypeClass}`, isSkeleton && `segmented_skeleton`), ref: controlRef, children: jsx("div", { className: "segmented__wrapper", children: jsxs("div", { className: clsx('segmented__wrapper-inner'), children: [segments?.map((item) => {
245
+ const isActive = String(activeSegment?.value) === String(item.value);
246
+ return (jsx("div", { className: clsx('segmented__item', !item.label && 'segmented__item_icon', sizeClass && `segmented__item_size_${sizeClass}`, isActive && 'segmented__item_active', !isActive && isDisabled && 'segmented__item_state_disabled', isActive &&
242
247
  isDisabled &&
243
248
  'segmented__item_active_state_disabled', !isActive
244
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
249
+ ? fillHoverClass && `fill_hover_${fillHoverClass}`
245
250
  : fillActiveHoverClass &&
246
- "fill_active_hover_".concat(fillActiveHoverClass), isActive &&
251
+ `fill_active_hover_${fillActiveHoverClass}`, isActive &&
247
252
  fillActiveClass &&
248
- "fill_active_".concat(fillActiveClass)), ref: segmentsRefs.get(item.value), onClick: function () { return !isDisabled && onChangeValue(item); }, children: jsxs("div", { className: clsx('segmented__item-label', sizeClass && "segmented_size_".concat(sizeClass)), children: [item.iconBefore || item.iconBeforeActive ? (jsx(Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive
253
+ `fill_active_${fillActiveClass}`), ref: segmentsRefs.get(item.value), onClick: () => !isDisabled && onChangeValue(item), children: jsxs("div", { className: clsx('segmented__item-label', sizeClass && `segmented_size_${sizeClass}`), children: [item.iconBefore || item.iconBeforeActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
249
254
  ? item.iconBeforeActive || item.iconBefore
250
- : item.iconBefore, isActive: isActive })) : null, item.label && (jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWrap: labelTextWrap, isActive: isActive, children: item.label })), item.icon || item.iconActive ? (jsx(Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive })) : null, item.iconAfter || item.iconAfterActive ? (jsx(Icon, { className: "segmented__item-icon", iconFillDisabled: iconFillDisabled, isDisabled: isDisabled, iconFill: iconFill, iconFillActive: iconFillActive, iconSize: iconSize, SvgImage: isActive
255
+ : item.iconBefore, isActive: isActive, isDisabled: isDisabled })) : null, item.label && (jsx(Text, { size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWrap: labelTextWrap, isActive: isActive, children: item.label })), item.icon || item.iconActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive ? item.iconActive || item.icon : item.icon, isActive: isActive, isDisabled: isDisabled })) : null, item.iconAfter || item.iconAfterActive ? (jsx(Icon, { className: "segmented__item-icon", iconFill: iconFill, iconFillActive: iconFillActive, iconFillDisabled: iconFillDisabled, iconSize: iconSize, SvgImage: isActive
251
256
  ? item.iconAfterActive || item.iconAfter
252
- : item.iconAfter, isActive: isActive })) : null] }) }, "".concat(name, "-").concat(item.value)));
253
- }), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && "fill_".concat(indicatorFillClass)) })] }) }) }));
257
+ : item.iconAfter, isActive: isActive, isDisabled: isDisabled })) : null] }) }, `${name}-${item.value}`));
258
+ }), jsx("div", { className: clsx('segmented__indicator', indicatorFillClass && `fill_${indicatorFillClass}`) })] }) }) }));
254
259
  };
255
260
 
256
261
  export { Segmented, segmentedAppearance, segmentedConfig };