@itcase/ui 1.8.123 → 1.8.125

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/dist/Avatar_cjs_AwXEUY8j.js +161 -0
  2. package/dist/Avatar_es_BtlaCRc5.js +157 -0
  3. package/dist/{Button_cjs_Ce97psFT.js → Button_cjs_C34BU1BK.js} +46 -34
  4. package/dist/{Button_es_CZss7cXh.js → Button_es_DnlzLBUT.js} +46 -34
  5. package/dist/ChipsGroup_cjs_DfAKN5CA.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_DBKY2UyF.js} +48 -35
  7. package/dist/DatePicker_cjs_DfbeIL2m.js +182 -0
  8. package/dist/DatePicker_es_BIJNx427.js +178 -0
  9. package/dist/Divider_cjs_DrmV2ezS.js +105 -0
  10. package/dist/Divider_es_BiYozVBS.js +101 -0
  11. package/dist/DropdownItem_cjs_vHuzXW9M.js +211 -0
  12. package/dist/DropdownItem_es_DVHWWgnU.js +206 -0
  13. package/dist/Group_cjs_DmfeUcFI.js +59 -0
  14. package/dist/Group_es_BU5k8f5S.js +55 -0
  15. package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_BVLGzj7Y.js} +170 -157
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_DkVkzTha.js} +170 -157
  17. package/dist/Image_cjs_BUM81t4Y.js +28 -0
  18. package/dist/Image_es_C-IjVkKX.js +26 -0
  19. package/dist/{Input_cjs_DRPK_RHK.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_Cv5nEb_n.js → Input_es_BnCXATnh.js} +27 -19
  21. package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_DwAmukik.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_B2kcstsG.js} +45 -33
  23. package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
  24. package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
  25. package/dist/Loader_cjs_DIDsIq3J.js +143 -0
  26. package/dist/Loader_es_CmSggwbR.js +139 -0
  27. package/dist/Overlay_cjs_tGA2fU43.js +42 -0
  28. package/dist/Overlay_es_BS7OTFoy.js +38 -0
  29. package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
  30. package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
  31. package/dist/Text_cjs_BDTjOTVB.js +69 -0
  32. package/dist/Text_es_CnymlElo.js +65 -0
  33. package/dist/cjs/components/Accordion.js +37 -34
  34. package/dist/cjs/components/Avatar.js +5 -6
  35. package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
  36. package/dist/cjs/components/AvatarStack.js +17 -16
  37. package/dist/cjs/components/Badge.js +3 -4
  38. package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
  39. package/dist/cjs/components/Breadcrumbs.js +27 -23
  40. package/dist/cjs/components/Button.js +5 -6
  41. package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
  42. package/dist/cjs/components/Cell.js +28 -25
  43. package/dist/cjs/components/Checkbox.js +33 -26
  44. package/dist/cjs/components/Checkmark.js +28 -23
  45. package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
  46. package/dist/cjs/components/Chips.js +4 -5
  47. package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
  48. package/dist/cjs/components/Choice.js +46 -40
  49. package/dist/cjs/components/Code.js +34 -26
  50. package/dist/cjs/components/CookiesWarning.js +23 -23
  51. package/dist/cjs/components/Dadata.js +14 -9
  52. package/dist/cjs/components/DatePeriod.js +32 -30
  53. package/dist/cjs/components/DatePicker.js +8 -9
  54. package/dist/cjs/components/Divider.js +1 -2
  55. package/dist/cjs/components/Dot.js +5 -6
  56. package/dist/cjs/components/Drawer.js +23 -21
  57. package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
  58. package/dist/cjs/components/Dropdown.js +5 -6
  59. package/dist/cjs/components/Flex.js +11 -12
  60. package/dist/cjs/components/Grid.js +15 -16
  61. package/dist/cjs/components/Group.js +1 -2
  62. package/dist/cjs/components/HTMLContent.js +5 -6
  63. package/dist/cjs/components/HeroTitle.js +17 -16
  64. package/dist/cjs/components/Icon.js +3 -4
  65. package/dist/cjs/components/Image.js +1 -2
  66. package/dist/cjs/components/Input.js +1 -2
  67. package/dist/cjs/components/InputPassword.js +34 -26
  68. package/dist/cjs/components/Label.js +4 -5
  69. package/dist/cjs/components/Link.js +1 -2
  70. package/dist/cjs/components/List.js +39 -28
  71. package/dist/cjs/components/Loader.js +2 -3
  72. package/dist/cjs/components/Logo.js +10 -11
  73. package/dist/cjs/components/MenuItem.js +36 -33
  74. package/dist/cjs/components/Modal.js +40 -38
  75. package/dist/cjs/components/ModalSheetBottom.js +17 -18
  76. package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
  77. package/dist/cjs/components/Notification.js +31 -24
  78. package/dist/cjs/components/Overlay.js +1 -2
  79. package/dist/cjs/components/Pagination.js +43 -41
  80. package/dist/cjs/components/Radio.js +34 -26
  81. package/dist/cjs/components/RangeSlider.js +8 -9
  82. package/dist/cjs/components/Response/img.js +1 -1
  83. package/dist/cjs/components/Response.js +45 -34
  84. package/dist/cjs/components/SVGContent.js +6 -7
  85. package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
  86. package/dist/cjs/components/ScrollOnDrag.js +7 -8
  87. package/dist/cjs/components/ScrollToView.js +8 -9
  88. package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
  89. package/dist/cjs/components/Scrollbar.js +1 -1
  90. package/dist/cjs/components/Search.js +39 -31
  91. package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
  92. package/dist/cjs/components/Segmented.js +46 -41
  93. package/dist/cjs/components/Select.js +118 -113
  94. package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
  95. package/dist/cjs/components/Swiper.js +27 -29
  96. package/dist/cjs/components/Switch.js +33 -26
  97. package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
  98. package/dist/cjs/components/Tab.js +33 -29
  99. package/dist/cjs/components/Text.js +1 -2
  100. package/dist/cjs/components/Textarea.js +26 -18
  101. package/dist/cjs/components/Tile.js +21 -17
  102. package/dist/cjs/components/Title.js +3 -4
  103. package/dist/cjs/components/Tooltip.js +3 -4
  104. package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
  105. package/dist/cjs/components/Video.js +3 -4
  106. package/dist/cjs/components/Warning.js +26 -20
  107. package/dist/cjs/context/Notifications.js +38 -42
  108. package/dist/cjs/context/UIContext.js +19 -17
  109. package/dist/cjs/context/UrlAssetPrefix.js +3 -3
  110. package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
  111. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  112. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  113. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
  114. package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  115. package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
  116. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  117. package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
  118. package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
  119. package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
  120. package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
  121. package/dist/cjs/hooks/useStyles.js +0 -1
  122. package/dist/cjs/hooks/useViewportFix.js +5 -5
  123. package/dist/cjs/hooks.js +1 -1
  124. package/dist/cjs/utils/setViewportProperty.js +3 -3
  125. package/dist/components/Accordion.js +37 -34
  126. package/dist/components/Avatar.js +5 -6
  127. package/dist/components/AvatarStack/stories/__mock__.js +1 -1
  128. package/dist/components/AvatarStack.js +17 -16
  129. package/dist/components/Badge.js +3 -4
  130. package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
  131. package/dist/components/Breadcrumbs.js +27 -23
  132. package/dist/components/Button.js +5 -6
  133. package/dist/components/Cell/stories/__mock__.js +1 -1
  134. package/dist/components/Cell.js +28 -25
  135. package/dist/components/Checkbox.js +33 -26
  136. package/dist/components/Checkmark.js +28 -23
  137. package/dist/components/Chips/stories/__mock__.js +1 -1
  138. package/dist/components/Chips.js +4 -5
  139. package/dist/components/Choice/stories/__mock__.js +2 -2
  140. package/dist/components/Choice.js +46 -40
  141. package/dist/components/Code.js +34 -26
  142. package/dist/components/CookiesWarning.js +23 -23
  143. package/dist/components/Dadata.js +14 -9
  144. package/dist/components/DatePeriod.js +32 -30
  145. package/dist/components/DatePicker.js +8 -9
  146. package/dist/components/Divider.js +1 -2
  147. package/dist/components/Dot.js +5 -6
  148. package/dist/components/Drawer.js +23 -21
  149. package/dist/components/Dropdown/stories/__mock__.js +6 -6
  150. package/dist/components/Dropdown.js +5 -6
  151. package/dist/components/Flex.js +11 -12
  152. package/dist/components/Grid.js +15 -16
  153. package/dist/components/Group.js +1 -2
  154. package/dist/components/HTMLContent.js +5 -6
  155. package/dist/components/HeroTitle.js +17 -16
  156. package/dist/components/Icon.js +3 -4
  157. package/dist/components/Image.js +1 -2
  158. package/dist/components/Input.js +1 -2
  159. package/dist/components/InputPassword.js +34 -26
  160. package/dist/components/Label.js +4 -5
  161. package/dist/components/Link.js +1 -2
  162. package/dist/components/List.js +39 -28
  163. package/dist/components/Loader.js +2 -3
  164. package/dist/components/Logo.js +10 -11
  165. package/dist/components/MenuItem.js +36 -33
  166. package/dist/components/Modal.js +40 -38
  167. package/dist/components/ModalSheetBottom.js +17 -18
  168. package/dist/components/Notification/stories/__mock__.js +1 -1
  169. package/dist/components/Notification.js +31 -24
  170. package/dist/components/Overlay.js +1 -2
  171. package/dist/components/Pagination.js +43 -41
  172. package/dist/components/Radio.js +34 -26
  173. package/dist/components/RangeSlider.js +8 -9
  174. package/dist/components/Response/img.js +1 -1
  175. package/dist/components/Response.js +45 -34
  176. package/dist/components/SVGContent.js +6 -7
  177. package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
  178. package/dist/components/ScrollOnDrag.js +7 -8
  179. package/dist/components/ScrollToView.js +8 -9
  180. package/dist/components/Scrollbar/stories/__mock__.js +1 -1
  181. package/dist/components/Scrollbar.js +1 -1
  182. package/dist/components/Search.js +39 -31
  183. package/dist/components/Segmented/stories/__mock__.js +23 -10
  184. package/dist/components/Segmented.js +46 -41
  185. package/dist/components/Select.js +118 -113
  186. package/dist/components/Swiper/stories/__mock__.js +3 -3
  187. package/dist/components/Swiper.js +27 -29
  188. package/dist/components/Switch.js +33 -26
  189. package/dist/components/Tab/stories/__mock__.js +1 -1
  190. package/dist/components/Tab.js +33 -29
  191. package/dist/components/Text.js +1 -2
  192. package/dist/components/Textarea.js +26 -18
  193. package/dist/components/Tile.js +21 -17
  194. package/dist/components/Title.js +3 -4
  195. package/dist/components/Tooltip.js +3 -4
  196. package/dist/components/Video/stories/__mocks__.js +1 -1
  197. package/dist/components/Video.js +3 -4
  198. package/dist/components/Warning.js +26 -20
  199. package/dist/context/Notifications.js +38 -42
  200. package/dist/context/UIContext.js +19 -17
  201. package/dist/context/UrlAssetPrefix.js +3 -3
  202. package/dist/css/components/Tile/Tile.css +3 -3
  203. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  204. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  205. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  206. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  207. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  208. package/dist/hooks/useAppearanceConfig.js +0 -1
  209. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  210. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  211. package/dist/hooks/useDeviceTargetClass.js +0 -1
  212. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  213. package/dist/hooks/useStyles/useStyles.js +0 -1
  214. package/dist/hooks/useStyles.js +0 -1
  215. package/dist/hooks/useViewportFix.js +5 -5
  216. package/dist/hooks.js +1 -1
  217. package/dist/types/components/Button/Button.appearance.d.ts +232 -232
  218. package/dist/types/components/Button/Button.d.ts +4 -4
  219. package/dist/types/components/Button/Button.interface.d.ts +5 -5
  220. package/dist/types/components/Pagination/Pagination.d.ts +1 -1
  221. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  222. package/dist/types/components/Text/Text.appearance.d.ts +58 -58
  223. package/dist/types/components/Text/Text.interface.d.ts +1 -1
  224. package/dist/utils/setViewportProperty.js +3 -3
  225. package/package.json +3 -3
  226. package/dist/Avatar_cjs_CLJnKU39.js +0 -157
  227. package/dist/Avatar_es_BgN-fbOj.js +0 -153
  228. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  229. package/dist/DatePicker_cjs_BzEtDAb8.js +0 -183
  230. package/dist/DatePicker_es_DRyCMO0I.js +0 -179
  231. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  232. package/dist/Divider_es_CCLBFIx6.js +0 -93
  233. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  234. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  235. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  236. package/dist/Group_es_DRqIIM9m.js +0 -55
  237. package/dist/Image_cjs_DRhhc66R.js +0 -29
  238. package/dist/Image_es_BpMidmve.js +0 -27
  239. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  240. package/dist/Loader_es_BUSqFrCd.js +0 -128
  241. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  242. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  243. package/dist/Text_cjs_0EINiUq4.js +0 -68
  244. package/dist/Text_es_CwV9rjFD.js +0 -64
  245. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  246. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
4
3
  var jsxRuntime = require('react/jsx-runtime');
5
4
  var React = require('react');
6
5
  var clsx = require('clsx');
@@ -8,9 +7,9 @@ var castArray = require('lodash/castArray');
8
7
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
9
8
  var useStyles = require('../hooks/useStyles/useStyles.js');
10
9
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
11
- var Icon = require('../../Icon_cjs_Cz6IyOkb.js');
12
- var Divider = require('../../Divider_cjs_DUYtmwn2.js');
13
- var Text = require('../../Text_cjs_0EINiUq4.js');
10
+ var Icon = require('../../Icon_cjs_BVLGzj7Y.js');
11
+ var Divider = require('../../Divider_cjs_DrmV2ezS.js');
12
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
14
13
  var _default = require('@itcase/icons/default');
15
14
  require('lodash/camelCase');
16
15
  require('lodash/upperFirst');
@@ -27,9 +26,9 @@ require('lodash/maxBy');
27
26
  require('react-inlinesvg');
28
27
  require('../hoc/urlWithAssetPrefix.js');
29
28
  require('../context/UrlAssetPrefix.js');
30
- require('../../Link_cjs_C5UsZUiF.js');
29
+ require('../../Link_cjs_qKXVfU8e.js');
31
30
 
32
- var accordionAppearanceSize = {
31
+ const accordionAppearanceSize = {
33
32
  sizeXXL: {
34
33
  size: 'xxl',
35
34
  titleTextSize: 'h3',
@@ -80,7 +79,7 @@ var accordionAppearanceSize = {
80
79
  },
81
80
  };
82
81
 
83
- var accordionAppearanceStyle = {
82
+ const accordionAppearanceStyle = {
84
83
  solid: {
85
84
  borderColor: 'none',
86
85
  },
@@ -94,7 +93,7 @@ var accordionAppearanceStyle = {
94
93
  },
95
94
  };
96
95
 
97
- var accordionAppearanceSurface = {
96
+ const accordionAppearanceSurface = {
98
97
  surfacePrimary: {
99
98
  fill: 'surfacePrimary',
100
99
  fillHover: 'surfacePrimaryHover',
@@ -130,19 +129,23 @@ var accordionAppearanceSurface = {
130
129
  },
131
130
  };
132
131
 
133
- var accordionAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, accordionAppearanceSize), accordionAppearanceStyle), accordionAppearanceSurface);
132
+ const accordionAppearance = {
133
+ ...accordionAppearanceSize,
134
+ ...accordionAppearanceStyle,
135
+ ...accordionAppearanceSurface,
136
+ };
134
137
 
135
- var accordionItemConfig = {
138
+ const accordionItemConfig = {
136
139
  appearance: accordionAppearance,
137
- setAppearance: function (appearanceConfig) {
140
+ setAppearance: (appearanceConfig) => {
138
141
  accordionItemConfig.appearance = appearanceConfig;
139
142
  },
140
143
  };
141
144
  function AccordionItem(props) {
142
- var id = props.id, className = props.className, appearance = props.appearance, title = props.title, afterContent = props.afterContent, beforeContent = props.beforeContent, content = props.content, isExpanded = props.isExpanded, onClick = props.onClick, children = props.children;
143
- var onClickTitle = React.useCallback(function () {
145
+ const { id, className, appearance, title, afterContent, beforeContent, content, isExpanded, onClick, children, } = props;
146
+ const onClickTitle = React.useCallback(() => {
144
147
  // "!isExpanded" - is next state of expanded
145
- var thisItemData = {
148
+ const thisItemData = {
146
149
  id: id,
147
150
  title: title,
148
151
  content: content,
@@ -150,27 +153,27 @@ function AccordionItem(props) {
150
153
  };
151
154
  onClick && onClick(thisItemData);
152
155
  }, [id, title, content, isExpanded, onClick]);
153
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, accordionItemConfig);
154
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
155
- var fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleBorderColorClass = propsGenerator.titleBorderColorClass, titleFillClass = propsGenerator.titleFillClass, titleFillHoverClass = propsGenerator.titleFillHoverClass, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextWeight = propsGenerator.titleTextWeight, titleWidthClass = propsGenerator.titleWidthClass, borderColorClass = propsGenerator.borderColorClass, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, contentTextColor = propsGenerator.contentTextColor, contentTextSize = propsGenerator.contentTextSize, contentTextWeight = propsGenerator.contentTextWeight, dividerDirection = propsGenerator.dividerDirection, dividerFill = propsGenerator.dividerFill, dividerSize = propsGenerator.dividerSize, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, showDivider = propsGenerator.showDivider, sizeClass = propsGenerator.sizeClass, zeroGap = propsGenerator.zeroGap, zeroPadding = propsGenerator.zeroPadding;
156
- var styles = useStyles.useStyles(props).styles;
157
- return (jsxRuntime.jsxs("div", { className: clsx('accordion-item', className, zeroPadding && 'accordion-item_zero-padding', zeroGap && 'accordion-item_zero-gap', borderColorClass && "border-color_".concat(borderColorClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), sizeClass && "accordion-item_size_".concat(sizeClass), isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxRuntime.jsxs("div", { className: clsx('accordion-item__header', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass)), children: [jsxRuntime.jsx(Text.Text, { className: clsx('accordion-item__title', titleBorderColorClass && "border-color_".concat(titleBorderColorClass), titleFillClass && "fill_".concat(titleFillClass), titleFillHoverClass && "fill_hover_".concat(titleFillHoverClass), titleWidthClass && "width_".concat(titleWidthClass), onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), jsxRuntime.jsxs("div", { className: "accordion-item__action", children: [badgeValue && (jsxRuntime.jsx(Icon.Badge, { className: "accordion-item__badge", appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))] }), showDivider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", direction: dividerDirection, size: dividerSize, fill: dividerFill || 'surfaceTertiary' }))] }), beforeContent, isExpanded && (jsxRuntime.jsxs("div", { className: clsx('accordion-item__content'), children: [content && (jsxRuntime.jsx("div", { className: clsx('accordion-item__content-inner', fillClass && "fill_".concat(fillClass)), children: jsxRuntime.jsx(Text.Text, { size: contentTextSize, textColor: contentTextColor, textWeight: contentTextWeight, children: content }) })), children] })), afterContent] }));
156
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, accordionItemConfig);
157
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
158
+ const { fillClass, fillHoverClass, titleBorderColorClass, titleFillClass, titleFillHoverClass, titleTextColor, titleTextSize, titleTextWeight, titleWidthClass, borderColorClass, badgeAppearance, badgeAppearanceSize, badgeShape, badgeSize, badgeTextColor, badgeTextSize, badgeValue, contentTextColor, contentTextSize, contentTextWeight, dividerDirection, dividerFill, dividerSize, icon, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, shapeClass, shapeStrengthClass, showDivider, sizeClass, zeroGap, zeroPadding, } = propsGenerator;
159
+ const { styles } = useStyles.useStyles(props);
160
+ return (jsxRuntime.jsxs("div", { className: clsx('accordion-item', className, zeroPadding && 'accordion-item_zero-padding', zeroGap && 'accordion-item_zero-gap', borderColorClass && `border-color_${borderColorClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, sizeClass && `accordion-item_size_${sizeClass}`, isExpanded && 'accordion-item_state_open'), style: styles, children: [jsxRuntime.jsxs("div", { className: clsx('accordion-item__header', fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`), children: [jsxRuntime.jsx(Text.Text, { className: clsx('accordion-item__title', titleBorderColorClass && `border-color_${titleBorderColorClass}`, titleFillClass && `fill_${titleFillClass}`, titleFillHoverClass && `fill_hover_${titleFillHoverClass}`, titleWidthClass && `width_${titleWidthClass}`, onClickTitle && 'cursor_type_pointer'), size: titleTextSize, textColor: titleTextColor, textWeight: titleTextWeight, onClick: onClickTitle, children: title }), jsxRuntime.jsxs("div", { className: "accordion-item__action", children: [badgeValue && (jsxRuntime.jsx(Icon.Badge, { className: "accordion-item__badge", appearance: `${badgeAppearance} ${badgeAppearanceSize}`, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('accordion-item__icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon, onClick: onClickTitle }))] }), showDivider && (jsxRuntime.jsx(Divider.Divider, { width: "fill", direction: dividerDirection, size: dividerSize, fill: dividerFill || 'surfaceTertiary' }))] }), beforeContent, isExpanded && (jsxRuntime.jsxs("div", { className: clsx('accordion-item__content'), children: [content && (jsxRuntime.jsx("div", { className: clsx('accordion-item__content-inner', fillClass && `fill_${fillClass}`), children: jsxRuntime.jsx(Text.Text, { size: contentTextSize, textColor: contentTextColor, textWeight: contentTextWeight, children: content }) })), children] })), afterContent] }));
158
161
  }
159
162
 
160
163
  function Accordion(props) {
161
- var className = props.className, appearance = props.appearance, _a = props.initial, initial = _a === void 0 ? [] : _a, items = props.items, isMultiple = props.isMultiple, onClickItem = props.onClickItem, children = props.children;
162
- var _b = React.useState(function () { return castArray(initial); }), expandedItems = _b[0], setExpandedItems = _b[1];
163
- var onClickAccordionItem = React.useCallback(function (targetItem) {
164
- setExpandedItems(function (prevState) {
165
- var isExpanded = prevState.find(function (id) { return id === targetItem.id; });
164
+ const { className, appearance, initial = [], items, isMultiple, onClickItem, children, } = props;
165
+ const [expandedItems, setExpandedItems] = React.useState(() => castArray(initial));
166
+ const onClickAccordionItem = React.useCallback((targetItem) => {
167
+ setExpandedItems((prevState) => {
168
+ const isExpanded = prevState.find((id) => id === targetItem.id);
166
169
  if (isMultiple) {
167
170
  if (isExpanded) {
168
171
  // ... without target id
169
- return prevState.filter(function (id) { return id !== targetItem.id; });
172
+ return prevState.filter((id) => id !== targetItem.id);
170
173
  }
171
174
  else {
172
175
  // ... with target id
173
- return tslib_es6.__spreadArray(tslib_es6.__spreadArray([], prevState, true), [targetItem.id], false);
176
+ return [...prevState, targetItem.id];
174
177
  }
175
178
  }
176
179
  else {
@@ -184,15 +187,15 @@ function Accordion(props) {
184
187
  });
185
188
  onClickItem && onClickItem(targetItem);
186
189
  }, [isMultiple, onClickItem]);
187
- var accordionItemsList = React.useMemo(function () {
190
+ const accordionItemsList = React.useMemo(() => {
188
191
  if (items) {
189
- return items.map(function (item, i) { return (jsxRuntime.jsx(AccordionItem, { id: item.id, appearance: appearance, title: item.title, content: item.content, isExpanded: expandedItems.includes(item.id), onClick: onClickAccordionItem }, "accordionItem_".concat(item.id || i + 1))); });
192
+ return items.map((item, i) => (jsxRuntime.jsx(AccordionItem, { id: item.id, appearance: appearance, title: item.title, content: item.content, isExpanded: expandedItems.includes(item.id), onClick: onClickAccordionItem }, `accordionItem_${item.id || i + 1}`)));
190
193
  }
191
194
  if (children) {
192
195
  // @ts-ignore
193
- return React.Children.toArray(children).map(function (child) {
196
+ return React.Children.toArray(children).map((child) => {
194
197
  if (React.isValidElement(child)) {
195
- var childID = child.props.id || child.key;
198
+ const childID = child.props.id || child.key;
196
199
  return React.cloneElement(child, {
197
200
  id: childID,
198
201
  isExpanded: expandedItems.includes(childID),
@@ -204,10 +207,10 @@ function Accordion(props) {
204
207
  }
205
208
  return [];
206
209
  }, [children, items, expandedItems, onClickAccordionItem]);
207
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
208
- var fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, widthClass = propsGenerator.widthClass;
209
- var accordionStyles = useStyles.useStyles(props).styles;
210
- return (jsxRuntime.jsx("div", { className: clsx(className, 'accordion', borderColorClass && "border-color_".concat(borderColorClass), fillClass && "fill_".concat(fillClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), widthClass && "width_".concat(widthClass)), style: accordionStyles, children: accordionItemsList }));
210
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
211
+ const { fillClass, borderColorClass, shapeClass, shapeStrengthClass, widthClass, } = propsGenerator;
212
+ const { styles: accordionStyles } = useStyles.useStyles(props);
213
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'accordion', borderColorClass && `border-color_${borderColorClass}`, fillClass && `fill_${fillClass}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`, widthClass && `width_${widthClass}`), style: accordionStyles, children: accordionItemsList }));
211
214
  }
212
215
 
213
216
  exports.Accordion = Accordion;
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var Avatar = require('../../Avatar_cjs_CLJnKU39.js');
3
+ var Avatar = require('../../Avatar_cjs_AwXEUY8j.js');
4
4
  require('react/jsx-runtime');
5
5
  require('react');
6
6
  require('clsx');
7
7
  require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
8
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
9
8
  require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
10
9
  require('lodash/camelCase');
11
10
  require('lodash/castArray');
@@ -19,15 +18,15 @@ require('react-responsive');
19
18
  require('../utils/setViewportProperty.js');
20
19
  require('../hooks.js');
21
20
  require('../hooks/useStyles/styleAttributes.js');
22
- require('../../Icon_cjs_Cz6IyOkb.js');
21
+ require('../../Icon_cjs_BVLGzj7Y.js');
23
22
  require('react-inlinesvg');
24
23
  require('../hoc/urlWithAssetPrefix.js');
25
24
  require('../context/UrlAssetPrefix.js');
26
25
  require('../hooks/useStyles/useStyles.js');
27
26
  require('lodash/maxBy');
28
- require('../../Link_cjs_C5UsZUiF.js');
29
- require('../../Text_cjs_0EINiUq4.js');
30
- require('../../Image_cjs_DRhhc66R.js');
27
+ require('../../Link_cjs_qKXVfU8e.js');
28
+ require('../../Text_cjs_BDTjOTVB.js');
29
+ require('../../Image_cjs_BUM81t4Y.js');
31
30
 
32
31
 
33
32
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var avatarsListMock = [
3
+ const avatarsListMock = [
4
4
  {
5
5
  id: 0,
6
6
  src: '/avatar/Man.png',
@@ -5,10 +5,9 @@ var clsx = require('clsx');
5
5
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
6
6
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
7
7
  var useStyles = require('../hooks/useStyles/useStyles.js');
8
- var Avatar = require('../../Avatar_cjs_CLJnKU39.js');
9
- var Group = require('../../Group_cjs_CsJ6ICKK.js');
10
- var Text = require('../../Text_cjs_0EINiUq4.js');
11
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
8
+ var Avatar = require('../../Avatar_cjs_AwXEUY8j.js');
9
+ var Group = require('../../Group_cjs_DmfeUcFI.js');
10
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
12
11
  require('react');
13
12
  require('lodash/camelCase');
14
13
  require('lodash/castArray');
@@ -23,14 +22,14 @@ require('../utils/setViewportProperty.js');
23
22
  require('../hooks.js');
24
23
  require('../hooks/useStyles/styleAttributes.js');
25
24
  require('lodash/maxBy');
26
- require('../../Icon_cjs_Cz6IyOkb.js');
25
+ require('../../Icon_cjs_BVLGzj7Y.js');
27
26
  require('react-inlinesvg');
28
27
  require('../hoc/urlWithAssetPrefix.js');
29
28
  require('../context/UrlAssetPrefix.js');
30
- require('../../Link_cjs_C5UsZUiF.js');
31
- require('../../Image_cjs_DRhhc66R.js');
29
+ require('../../Link_cjs_qKXVfU8e.js');
30
+ require('../../Image_cjs_BUM81t4Y.js');
32
31
 
33
- var avatarStackAppearanceSize = {
32
+ const avatarStackAppearanceSize = {
34
33
  size16: {
35
34
  size: '16',
36
35
  },
@@ -51,18 +50,20 @@ var avatarStackAppearanceSize = {
51
50
  },
52
51
  };
53
52
 
54
- var avatarStackAppearance = tslib_es6.__assign({}, avatarStackAppearanceSize);
53
+ const avatarStackAppearance = {
54
+ ...avatarStackAppearanceSize,
55
+ };
55
56
 
56
- var avatarStackConfig = {
57
+ const avatarStackConfig = {
57
58
  appearance: avatarStackAppearance};
58
59
  function AvatarStack(props) {
59
- var className = props.className, appearance = props.appearance, _a = props.direction, direction = _a === void 0 ? 'horizontal' : _a, avatarAppearance = props.avatarAppearance, avatarsList = props.avatarsList, _b = props.length, length = _b === void 0 ? 3 : _b, isSkeleton = props.isSkeleton;
60
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, avatarStackConfig);
61
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
60
+ const { className, appearance, direction = 'horizontal', avatarAppearance, avatarsList, length = 3, isSkeleton, } = props;
61
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, avatarStackConfig);
62
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
62
63
  // "size" is numeric
63
- var size = propsGenerator.size;
64
- var avatarStackStyles = useStyles.useStyles(props).styles;
65
- return (avatarsList.length && (jsxRuntime.jsxs("div", { className: clsx(className, 'avatar-stack', direction && "group_direction_".concat(direction), size && "avatar-stack_size_".concat(size), isSkeleton && "avatar-stack-skeleton"), style: avatarStackStyles, children: [avatarsList.slice(0, length).map(function (item) { return (jsxRuntime.jsx(Avatar.Avatar, { className: "avatar-stack__item", appearance: "".concat(avatarAppearance, " size").concat(size), src: item.src, textSize: "l", firstName: item.firstName, secondName: item.lastName, shape: "circular" }, item.id)); }), avatarsList.length > length && (jsxRuntime.jsx(Group.Group, { className: "avatar-stack__item avatar-stack__item-text", width: size, height: size, fill: "surfaceSecondary", children: jsxRuntime.jsxs(Text.Text, { size: "xs", textColor: "surfaceTextPrimary", textWeight: "600", children: ["+", avatarsList.length - length] }) }))] })));
64
+ const { size } = propsGenerator;
65
+ const { styles: avatarStackStyles } = useStyles.useStyles(props);
66
+ return (avatarsList.length && (jsxRuntime.jsxs("div", { className: clsx(className, 'avatar-stack', direction && `group_direction_${direction}`, size && `avatar-stack_size_${size}`, isSkeleton && `avatar-stack-skeleton`), style: avatarStackStyles, children: [avatarsList.slice(0, length).map((item) => (jsxRuntime.jsx(Avatar.Avatar, { className: "avatar-stack__item", appearance: `${avatarAppearance} size${size}`, src: item.src, textSize: "l", firstName: item.firstName, secondName: item.lastName, shape: "circular" }, item.id))), avatarsList.length > length && (jsxRuntime.jsx(Group.Group, { className: "avatar-stack__item avatar-stack__item-text", width: size, height: size, fill: "surfaceSecondary", children: jsxRuntime.jsxs(Text.Text, { size: "xs", textColor: "surfaceTextPrimary", textWeight: "600", children: ["+", avatarsList.length - length] }) }))] })));
66
67
  }
67
68
 
68
69
  exports.AvatarStack = AvatarStack;
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var Icon = require('../../Icon_cjs_Cz6IyOkb.js');
4
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
3
+ var Icon = require('../../Icon_cjs_BVLGzj7Y.js');
5
4
  require('react/jsx-runtime');
6
5
  require('react');
7
6
  require('clsx');
@@ -24,8 +23,8 @@ require('../hooks.js');
24
23
  require('../hooks/useStyles/styleAttributes.js');
25
24
  require('../hooks/useStyles/useStyles.js');
26
25
  require('lodash/maxBy');
27
- require('../../Link_cjs_C5UsZUiF.js');
28
- require('../../Text_cjs_0EINiUq4.js');
26
+ require('../../Link_cjs_qKXVfU8e.js');
27
+ require('../../Text_cjs_BDTjOTVB.js');
29
28
 
30
29
 
31
30
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var breadcrumbsListMock = [
3
+ const breadcrumbsListMock = [
4
4
  {
5
5
  id: '1',
6
6
  key: 1,
@@ -6,10 +6,9 @@ var clsx = require('clsx');
6
6
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
7
7
  var useStyles = require('../hooks/useStyles/useStyles.js');
8
8
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
9
- var Icon = require('../../Icon_cjs_Cz6IyOkb.js');
10
- var Link = require('../../Link_cjs_C5UsZUiF.js');
11
- var Text = require('../../Text_cjs_0EINiUq4.js');
12
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
9
+ var Icon = require('../../Icon_cjs_BVLGzj7Y.js');
10
+ var Link = require('../../Link_cjs_qKXVfU8e.js');
11
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
13
12
  var _default = require('@itcase/icons/default');
14
13
  require('lodash/camelCase');
15
14
  require('lodash/castArray');
@@ -28,7 +27,7 @@ require('react-inlinesvg');
28
27
  require('../hoc/urlWithAssetPrefix.js');
29
28
  require('../context/UrlAssetPrefix.js');
30
29
 
31
- var breadcrumbsAppearanceAccent = {
30
+ const breadcrumbsAppearanceAccent = {
32
31
  accentPrimary: {
33
32
  fill: 'accentPrimary',
34
33
  labelTextColor: 'accentTextPrimary',
@@ -37,7 +36,7 @@ var breadcrumbsAppearanceAccent = {
37
36
  },
38
37
  };
39
38
 
40
- var breadcrumbsAppearanceSize = {
39
+ const breadcrumbsAppearanceSize = {
41
40
  sizeXXL: {
42
41
  size: 'xxl',
43
42
  labelTextSize: 'xxl',
@@ -75,7 +74,7 @@ var breadcrumbsAppearanceSize = {
75
74
  },
76
75
  };
77
76
 
78
- var breadcrumbsAppearanceStyle = {
77
+ const breadcrumbsAppearanceStyle = {
79
78
  solid: {
80
79
  borderColor: 'none',
81
80
  },
@@ -89,7 +88,7 @@ var breadcrumbsAppearanceStyle = {
89
88
  },
90
89
  };
91
90
 
92
- var breadcrumbsAppearanceSurface = {
91
+ const breadcrumbsAppearanceSurface = {
93
92
  surfacePrimary: {
94
93
  fill: 'surfacePrimary',
95
94
  labelTextColor: 'surfaceTextPrimary',
@@ -116,35 +115,40 @@ var breadcrumbsAppearanceSurface = {
116
115
  },
117
116
  };
118
117
 
119
- var breadcrumbsAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, breadcrumbsAppearanceSize), breadcrumbsAppearanceStyle), breadcrumbsAppearanceAccent), breadcrumbsAppearanceSurface);
118
+ const breadcrumbsAppearance = {
119
+ ...breadcrumbsAppearanceSize,
120
+ ...breadcrumbsAppearanceStyle,
121
+ ...breadcrumbsAppearanceAccent,
122
+ ...breadcrumbsAppearanceSurface,
123
+ };
120
124
 
121
- var breadcrumbsConfig = {
125
+ const breadcrumbsConfig = {
122
126
  appearance: breadcrumbsAppearance};
123
127
  function BreadcrumbsItem(props) {
124
- var className = props.className, appearance = props.appearance, href = props.href, isActive = props.isActive, isSkeleton = props.isSkeleton, onClick = props.onClick, children = props.children;
125
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, breadcrumbsConfig);
126
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
127
- var fillClass = propsGenerator.fillClass, labelTextColor = propsGenerator.labelTextColor, labelTextColorHover = propsGenerator.labelTextColorHover, labelTextSize = propsGenerator.labelTextSize, borderColorClass = propsGenerator.borderColorClass, text = propsGenerator.text, cursor = propsGenerator.cursor, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillIcon = propsGenerator.iconFillIcon, iconFillSize = propsGenerator.iconFillSize, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, underlineClass = propsGenerator.underlineClass;
128
+ const { className, appearance, href, isActive, isSkeleton, onClick, children, } = props;
129
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, breadcrumbsConfig);
130
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
131
+ const { fillClass, labelTextColor, labelTextColorHover, labelTextSize, borderColorClass, text, cursor, icon, iconFill, iconFillIcon, iconFillSize, iconShape, iconSize, iconSrc, shapeClass, sizeClass, underlineClass, } = propsGenerator;
128
132
  // @ts-expect-error
129
- var itemStyles = useStyles.useStyles(props).styles;
130
- return (jsxRuntime.jsxs(Link.LinkWrapper, { className: clsx(className, 'breadcrumbs__item', borderColorClass && "border-color_".concat(borderColorClass), isActive && 'breadcrumbs__item_current', sizeClass && "breadcrumbs__item_size_".concat(sizeClass), shapeClass && "breadcrumbs__item_shape_".concat(shapeClass), fillClass && "fill_".concat(fillClass), underlineClass && "text-decoration_".concat(underlineClass), isSkeleton && "breadcrumbs__item_skeleton", onClick && (cursor || 'cursor_type_pointer')), href: href, LinkComponent: "div", style: itemStyles, onClick: onClick, children: [jsxRuntime.jsx(Text.Text, { className: "breadcrumbs__item-text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, children: text || children }), !isActive && (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('breadcrumbs__item-icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }));
133
+ const { styles: itemStyles } = useStyles.useStyles(props);
134
+ return (jsxRuntime.jsxs(Link.LinkWrapper, { className: clsx(className, 'breadcrumbs__item', borderColorClass && `border-color_${borderColorClass}`, isActive && 'breadcrumbs__item_current', sizeClass && `breadcrumbs__item_size_${sizeClass}`, shapeClass && `breadcrumbs__item_shape_${shapeClass}`, fillClass && `fill_${fillClass}`, underlineClass && `text-decoration_${underlineClass}`, isSkeleton && `breadcrumbs__item_skeleton`, onClick && (cursor || 'cursor_type_pointer')), href: href, LinkComponent: "div", style: itemStyles, onClick: onClick, children: [jsxRuntime.jsx(Text.Text, { className: "breadcrumbs__item-text", size: labelTextSize, textColor: labelTextColor, textColorHover: labelTextColorHover, children: text || children }), !isActive && (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: clsx('breadcrumbs__item-icon'), fill: iconFill, fillSize: iconFillSize, iconFill: iconFillIcon, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon }))] }));
131
135
  }
132
136
 
133
137
  function Breadcrumbs(props) {
134
- var className = props.className, appearance = props.appearance, breadcrumbsList = props.breadcrumbsList, isSkeleton = props.isSkeleton, children = props.children;
135
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
136
- var _a = propsGenerator.directionClass, directionClass = _a === void 0 ? 'horizontal' : _a, widthClass = propsGenerator.widthClass;
137
- var breadcrumbsItemsList = React.useMemo(function () {
138
+ const { className, appearance, breadcrumbsList, isSkeleton, children } = props;
139
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
140
+ const { directionClass = 'horizontal', widthClass } = propsGenerator;
141
+ const breadcrumbsItemsList = React.useMemo(() => {
138
142
  if (breadcrumbsList) {
139
- return breadcrumbsList.map(function (item, i) { return (jsxRuntime.jsx(BreadcrumbsItem, { appearance: appearance, text: item.text, icon: item.icon, iconSrc: item.icon, isActive: i + 1 === breadcrumbsList.length && true, isSkeleton: isSkeleton }, "breadcrumbsItem_".concat(item.key || item.id || item.text))); });
143
+ return breadcrumbsList.map((item, i) => (jsxRuntime.jsx(BreadcrumbsItem, { appearance: appearance, text: item.text, icon: item.icon, iconSrc: item.icon, isActive: i + 1 === breadcrumbsList.length && true, isSkeleton: isSkeleton }, `breadcrumbsItem_${item.key || item.id || item.text}`)));
140
144
  }
141
145
  if (children) {
142
146
  return children;
143
147
  }
144
148
  return [];
145
149
  }, [children, breadcrumbsList, appearance]);
146
- var breadcrumbsStyles = useStyles.useStyles(props).styles;
147
- return (jsxRuntime.jsx("div", { className: clsx(className, 'breadcrumbs', widthClass && "width_".concat(widthClass), directionClass && "direction_".concat(directionClass)), style: breadcrumbsStyles, children: breadcrumbsItemsList }));
150
+ const { styles: breadcrumbsStyles } = useStyles.useStyles(props);
151
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'breadcrumbs', widthClass && `width_${widthClass}`, directionClass && `direction_${directionClass}`), style: breadcrumbsStyles, children: breadcrumbsItemsList }));
148
152
  }
149
153
 
150
154
  exports.Breadcrumbs = Breadcrumbs;
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var Button = require('../../Button_cjs_Ce97psFT.js');
3
+ var Button = require('../../Button_cjs_C34BU1BK.js');
4
4
  require('react/jsx-runtime');
5
5
  require('react');
6
6
  require('clsx');
7
- require('../../Icon_cjs_Cz6IyOkb.js');
8
- require('../../tslib.es6_cjs_CCZ3TN_7.js');
7
+ require('../../Icon_cjs_BVLGzj7Y.js');
9
8
  require('react-inlinesvg');
10
9
  require('../hoc/urlWithAssetPrefix.js');
11
10
  require('@itcase/common');
@@ -25,9 +24,9 @@ require('../hooks.js');
25
24
  require('../hooks/useStyles/styleAttributes.js');
26
25
  require('../hooks/useStyles/useStyles.js');
27
26
  require('lodash/maxBy');
28
- require('../../Link_cjs_C5UsZUiF.js');
29
- require('../../Text_cjs_0EINiUq4.js');
30
- require('../../Loader_cjs_D3lnxPlI.js');
27
+ require('../../Link_cjs_qKXVfU8e.js');
28
+ require('../../Text_cjs_BDTjOTVB.js');
29
+ require('../../Loader_cjs_DIDsIq3J.js');
31
30
 
32
31
 
33
32
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  // "Placeholder" is removed from @itcase/icons.
4
4
  // Use url to ".storybook/assets/icons/placeholder.svg"
5
- var cellMock = {
5
+ const cellMock = {
6
6
  title: 'Title',
7
7
  // titleIcon: icons16.Placeholder,
8
8
  titleLabel: 'Label',
@@ -5,10 +5,9 @@ var clsx = require('clsx');
5
5
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
6
6
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
7
7
  var useStyles = require('../hooks/useStyles/useStyles.js');
8
- var Icon = require('../../Icon_cjs_Cz6IyOkb.js');
9
- var Label = require('../../Label_cjs_DMoaOoHi.js');
10
- var Text = require('../../Text_cjs_0EINiUq4.js');
11
- var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
8
+ var Icon = require('../../Icon_cjs_BVLGzj7Y.js');
9
+ var Label = require('../../Label_cjs_DwAmukik.js');
10
+ var Text = require('../../Text_cjs_BDTjOTVB.js');
12
11
  require('react');
13
12
  require('lodash/camelCase');
14
13
  require('lodash/castArray');
@@ -26,9 +25,9 @@ require('lodash/maxBy');
26
25
  require('react-inlinesvg');
27
26
  require('../hoc/urlWithAssetPrefix.js');
28
27
  require('../context/UrlAssetPrefix.js');
29
- require('../../Link_cjs_C5UsZUiF.js');
28
+ require('../../Link_cjs_qKXVfU8e.js');
30
29
 
31
- var cellAppearanceSize = {
30
+ const cellAppearanceSize = {
32
31
  sizeXL: {
33
32
  size: 'xl',
34
33
  titleLabelAppearanceSize: 'sizeXS',
@@ -87,7 +86,7 @@ var cellAppearanceSize = {
87
86
  },
88
87
  };
89
88
 
90
- var cellAppearanceStyle = {
89
+ const cellAppearanceStyle = {
91
90
  solid: {
92
91
  borderColor: 'none',
93
92
  },
@@ -101,7 +100,7 @@ var cellAppearanceStyle = {
101
100
  },
102
101
  };
103
102
 
104
- var cellAppearanceSurface = {
103
+ const cellAppearanceSurface = {
105
104
  surfacePrimary: {
106
105
  fill: 'surfacePrimary',
107
106
  fillHover: 'surfacePrimaryHover',
@@ -156,33 +155,37 @@ var cellAppearanceSurface = {
156
155
  },
157
156
  };
158
157
 
159
- var cellAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, cellAppearanceSize), cellAppearanceStyle), cellAppearanceSurface);
158
+ const cellAppearance = {
159
+ ...cellAppearanceSize,
160
+ ...cellAppearanceStyle,
161
+ ...cellAppearanceSurface,
162
+ };
160
163
 
161
- var cellConfig = {
164
+ const cellConfig = {
162
165
  appearance: cellAppearance,
163
- setAppearance: function (appearanceConfig) {
166
+ setAppearance: (appearanceConfig) => {
164
167
  cellConfig.appearance = appearanceConfig;
165
168
  },
166
169
  };
167
170
  function Cell(props) {
168
- var className = props.className, appearance = props.appearance, title = props.title, titleIcon = props.titleIcon, titleLabel = props.titleLabel, titleTag = props.titleTag, showTitleLabel = props.showTitleLabel, showValueLabel = props.showValueLabel, value = props.value, valueIcon = props.valueIcon, valueTag = props.valueTag, before = props.before, after = props.after, isActive = props.isActive, isEqual = props.isEqual, isSameWidth = props.isSameWidth, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
169
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, cellConfig);
170
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
171
- var directionClass = propsGenerator.directionClass, fillActiveClass = propsGenerator.fillActiveClass, fillActiveHoverClass = propsGenerator.fillActiveHoverClass, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, titleIconFill = propsGenerator.titleIconFill, titleIconFillHover = propsGenerator.titleIconFillHover, titleIconFillSize = propsGenerator.titleIconFillSize, titleIconItemFill = propsGenerator.titleIconItemFill, titleIconShape = propsGenerator.titleIconShape, titleIconSrc = propsGenerator.titleIconSrc, titleLabelAppearance = propsGenerator.titleLabelAppearance, titleLabelAppearanceSize = propsGenerator.titleLabelAppearanceSize, titleLabelShape = propsGenerator.titleLabelShape, titleLabelSize = propsGenerator.titleLabelSize, titleLabelTextSize = propsGenerator.titleLabelTextSize, titleTextColor = propsGenerator.titleTextColor, titleTextSize = propsGenerator.titleTextSize, titleTextTruncate = propsGenerator.titleTextTruncate, titleTextWeight = propsGenerator.titleTextWeight, titleTextWrap = propsGenerator.titleTextWrap, borderColorActiveClass = propsGenerator.borderColorActiveClass, borderColorActiveHoverClass = propsGenerator.borderColorActiveHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorHoverClass = propsGenerator.borderColorHoverClass, reverseClass = propsGenerator.reverseClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, valueIconFill = propsGenerator.valueIconFill, valueIconFillHover = propsGenerator.valueIconFillHover, valueIconFillSize = propsGenerator.valueIconFillSize, valueIconItemFill = propsGenerator.valueIconItemFill, valueIconShape = propsGenerator.valueIconShape, valueIconSrc = propsGenerator.valueIconSrc, valueLabel = propsGenerator.valueLabel, valueLabelAppearance = propsGenerator.valueLabelAppearance, valueLabelAppearanceSize = propsGenerator.valueLabelAppearanceSize, valueLabelShape = propsGenerator.valueLabelShape, valueLabelSize = propsGenerator.valueLabelSize, valueLabelTextSize = propsGenerator.valueLabelTextSize, valueTextAlign = propsGenerator.valueTextAlign, valueTextColor = propsGenerator.valueTextColor, valueTextSize = propsGenerator.valueTextSize, valueTextTruncate = propsGenerator.valueTextTruncate, valueTextWeight = propsGenerator.valueTextWeight, valueTextWrap = propsGenerator.valueTextWrap, widthClass = propsGenerator.widthClass, zeroGap = propsGenerator.zeroGap, zeroPadding = propsGenerator.zeroPadding;
171
+ const { className, appearance, title, titleIcon, titleLabel, titleTag, showTitleLabel, showValueLabel, value, valueIcon, valueTag, before, after, isActive, isEqual, isSameWidth, onClick, onMouseEnter, } = props;
172
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, cellConfig);
173
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
174
+ const { directionClass, fillActiveClass, fillActiveHoverClass, fillClass, fillHoverClass, titleIconFill, titleIconFillHover, titleIconFillSize, titleIconItemFill, titleIconShape, titleIconSrc, titleLabelAppearance, titleLabelAppearanceSize, titleLabelShape, titleLabelSize, titleLabelTextSize, titleTextColor, titleTextSize, titleTextTruncate, titleTextWeight, titleTextWrap, borderColorActiveClass, borderColorActiveHoverClass, borderColorClass, borderColorHoverClass, reverseClass, shapeClass, sizeClass, valueIconFill, valueIconFillHover, valueIconFillSize, valueIconItemFill, valueIconShape, valueIconSrc, valueLabel, valueLabelAppearance, valueLabelAppearanceSize, valueLabelShape, valueLabelSize, valueLabelTextSize, valueTextAlign, valueTextColor, valueTextSize, valueTextTruncate, valueTextWeight, valueTextWrap, widthClass, zeroGap, zeroPadding, } = propsGenerator;
172
175
  // @ts-expect-error
173
- var _a = useStyles.useStyles(props), dataStyles = _a.data, cellStyles = _a.styles;
174
- return (jsxRuntime.jsxs("div", { className: clsx(className, 'cell', sizeClass && "cell_size_".concat(sizeClass), !isActive
175
- ? fillClass && "fill_".concat(fillClass)
176
- : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
177
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
178
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), !isActive
179
- ? borderColorClass && "border-color_".concat(borderColorClass)
176
+ const { data: dataStyles, styles: cellStyles } = useStyles.useStyles(props);
177
+ return (jsxRuntime.jsxs("div", { className: clsx(className, 'cell', sizeClass && `cell_size_${sizeClass}`, !isActive
178
+ ? fillClass && `fill_${fillClass}`
179
+ : fillActiveClass && `fill_active_${fillActiveClass}`, !isActive
180
+ ? fillHoverClass && `fill_hover_${fillHoverClass}`
181
+ : fillActiveHoverClass && `fill_active_hover_${fillActiveHoverClass}`, !isActive
182
+ ? borderColorClass && `border-color_${borderColorClass}`
180
183
  : borderColorActiveClass &&
181
- "border-color_active_".concat(borderColorActiveClass), !isActive
184
+ `border-color_active_${borderColorActiveClass}`, !isActive
182
185
  ? borderColorHoverClass &&
183
- "border-color_hover_".concat(borderColorHoverClass)
186
+ `border-color_hover_${borderColorHoverClass}`
184
187
  : borderColorActiveHoverClass &&
185
- "border-color_active_hover_".concat(borderColorActiveHoverClass), reverseClass && "cell_reverse_".concat(reverseClass), shapeClass && "cell_shape_".concat(shapeClass), widthClass && "width_".concat(widthClass), zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsxRuntime.jsx("div", { className: "cell__before", children: before }), jsxRuntime.jsxs("div", { className: clsx('cell__wrapper', directionClass && "cell__wrapper_direction_".concat(directionClass), isEqual && 'cell__wrapper-equal', isSameWidth && 'cell__wrapper-same-width'), children: [title && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__title", size: titleTextSize, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__title-icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), (showTitleLabel || titleLabel) && (jsxRuntime.jsx(Label.Label, { className: "cell__title-label", appearance: "".concat(titleLabelAppearance, " ").concat(titleLabelAppearanceSize), size: titleLabelSize, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape }))] })), value && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__value", size: valueTextSize, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__value-icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), (showValueLabel || valueLabel) && (jsxRuntime.jsx(Label.Label, { className: "cell__value-label", appearance: "".concat(valueLabelAppearance, " ").concat(valueLabelAppearanceSize), size: valueLabelSize, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape }))] }))] }), after && jsxRuntime.jsx("div", { className: "cell__after", children: after })] }));
188
+ `border-color_active_hover_${borderColorActiveHoverClass}`, reverseClass && `cell_reverse_${reverseClass}`, shapeClass && `cell_shape_${shapeClass}`, widthClass && `width_${widthClass}`, zeroPadding && 'cell_reset-padding', zeroGap && 'cell_reset-gap'), style: cellStyles, onClick: onClick, onMouseEnter: onMouseEnter, children: [before && jsxRuntime.jsx("div", { className: "cell__before", children: before }), jsxRuntime.jsxs("div", { className: clsx('cell__wrapper', directionClass && `cell__wrapper_direction_${directionClass}`, isEqual && 'cell__wrapper-equal', isSameWidth && 'cell__wrapper-same-width'), children: [title && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__title", size: titleTextSize, textColor: titleTextColor, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, tag: titleTag, children: title }), (titleIcon || titleIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__title-icon", fill: titleIconFill, fillSize: titleIconFillSize, iconFill: titleIconItemFill, iconFillHover: titleIconFillHover, imageSrc: titleIconSrc, shape: titleIconShape, SvgImage: titleIcon })), (showTitleLabel || titleLabel) && (jsxRuntime.jsx(Label.Label, { className: "cell__title-label", appearance: `${titleLabelAppearance} ${titleLabelAppearanceSize}`, size: titleLabelSize, label: titleLabel, labelTextSize: titleLabelTextSize, shape: titleLabelShape }))] })), value && (jsxRuntime.jsxs("div", { className: "cell__data", style: dataStyles, children: [jsxRuntime.jsx(Text.Text, { className: "cell__value", size: valueTextSize, textAlign: valueTextAlign, textColor: valueTextColor, textTruncate: valueTextTruncate, textWeight: valueTextWeight, textWrap: valueTextWrap, tag: valueTag, children: value }), (valueIcon || valueIconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "cell__value-icon", fill: valueIconFill, fillSize: valueIconFillSize, iconFill: valueIconItemFill, iconFillHover: valueIconFillHover, imageSrc: valueIconSrc, shape: valueIconShape, SvgImage: valueIcon })), (showValueLabel || valueLabel) && (jsxRuntime.jsx(Label.Label, { className: "cell__value-label", appearance: `${valueLabelAppearance} ${valueLabelAppearanceSize}`, size: valueLabelSize, label: valueLabel, labelTextSize: valueLabelTextSize, shape: valueLabelShape }))] }))] }), after && jsxRuntime.jsx("div", { className: "cell__after", children: after })] }));
186
189
  }
187
190
 
188
191
  exports.Cell = Cell;