@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.8.123",
3
+ "version": "1.8.125",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",
@@ -101,9 +101,9 @@
101
101
  },
102
102
  "dependencies": {
103
103
  "@emotion/is-prop-valid": "^1.4.0",
104
- "@itcase/common": "^1.2.29",
104
+ "@itcase/common": "^1.2.31",
105
105
  "@itcase/icons": "^1.2.19",
106
- "@itcase/storybook-config": "^1.2.6",
106
+ "@itcase/storybook-config": "^1.2.7",
107
107
  "@itcase/tokens-am": "^1.1.19",
108
108
  "@itcase/tokens-baikal": "^1.1.17",
109
109
  "@itcase/tokens-palette": "^1.1.11",
@@ -1,157 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
5
- var clsx = require('clsx');
6
- var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
7
- var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
8
- var Icon = require('./Icon_cjs_Cz6IyOkb.js');
9
- var Image = require('./Image_cjs_DRhhc66R.js');
10
- var Text = require('./Text_cjs_0EINiUq4.js');
11
- var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
12
-
13
- var avatarAppearanceDefault = {
14
- surfacePrimary: {
15
- fill: 'surfacePrimary',
16
- textColor: 'surfaceTextPrimary',
17
- badgeAppearance: 'accentPrimary solid circular',
18
- },
19
- surfaceSecondary: {
20
- fill: 'surfaceSecondary',
21
- textColor: 'surfaceTextPrimary',
22
- badgeAppearance: 'accentPrimary solid circular',
23
- },
24
- surfaceTertiary: {
25
- fill: 'surfaceTertiary',
26
- textColor: 'surfaceTextPrimary',
27
- badgeAppearance: 'accentPrimary solid circular',
28
- },
29
- surfaceQuaternary: {
30
- fill: 'surfaceQuaternary',
31
- textColor: 'surfaceTextPrimary',
32
- badgeAppearance: 'accentPrimary solid circular',
33
- },
34
- };
35
-
36
- var avatarAppearanceShape = {
37
- circular: {
38
- shape: 'circular',
39
- },
40
- rounded: {
41
- shape: 'rounded',
42
- },
43
- roundedXL: {
44
- shape: 'rounded',
45
- shapeStrength: '2m',
46
- },
47
- roundedL: {
48
- shape: 'rounded',
49
- shapeStrength: '1_5m',
50
- },
51
- roundedM: {
52
- shape: 'rounded',
53
- shapeStrength: '1m',
54
- },
55
- roundedS: {
56
- shape: 'rounded',
57
- shapeStrength: '0_5m',
58
- },
59
- };
60
-
61
- var avatarAppearanceSize = {
62
- size16: {
63
- size: '16',
64
- textSize: 'xxl',
65
- badgeAppearanceSize: 'sizeXXS',
66
- iconFillSize: '12',
67
- },
68
- size20: {
69
- size: '20',
70
- textSize: 'xxl',
71
- badgeAppearanceSize: 'sizeXXS',
72
- iconFillSize: '12',
73
- },
74
- size24: {
75
- size: '24',
76
- textSize: 'l',
77
- badgeAppearanceSize: 'sizeXXS',
78
- iconFillSize: '12',
79
- },
80
- size32: {
81
- size: '32',
82
- textSize: 'l',
83
- badgeAppearanceSize: 'sizeXS',
84
- iconFillSize: '12',
85
- },
86
- size40: {
87
- size: '40',
88
- textSize: 'l',
89
- badgeAppearanceSize: 'sizeS',
90
- iconFillSize: '12',
91
- },
92
- size56: {
93
- size: '56',
94
- textSize: 'xxl',
95
- badgeAppearanceSize: 'sizeM',
96
- iconFillSize: '16',
97
- },
98
- size96: {
99
- size: '96',
100
- textSize: 'xxl',
101
- badgeAppearanceSize: 'sizeXL',
102
- iconFillSize: '32',
103
- },
104
- size144: {
105
- size: '144',
106
- textSize: 'xxl',
107
- badgeAppearanceSize: 'sizeXXL',
108
- iconFillSize: '40',
109
- },
110
- size240: {
111
- size: '240',
112
- textSize: 'xxl',
113
- badgeAppearanceSize: 'sizeXXL',
114
- iconFillSize: '40',
115
- },
116
- };
117
-
118
- var avatarAppearanceStyle = {
119
- solid: {
120
- borderColor: 'none',
121
- },
122
- outlined: {
123
- fill: 'none',
124
- },
125
- full: {
126
- borderColor: 'none',
127
- },
128
- ghost: {
129
- fill: 'none',
130
- borderColor: 'none',
131
- },
132
- };
133
-
134
- var avatarAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, avatarAppearanceSize), avatarAppearanceStyle), avatarAppearanceShape), avatarAppearanceDefault);
135
-
136
- var avatarConfig = {
137
- appearance: avatarAppearance,
138
- setAppearance: function (appearanceConfig) {
139
- avatarConfig.appearance = appearanceConfig;
140
- },
141
- };
142
- function Avatar(props) {
143
- var className = props.className, appearance = props.appearance, src = props.src, _a = props.firstName, firstName = _a === void 0 ? '' : _a, _b = props.secondName, secondName = _b === void 0 ? '' : _b, count = props.count, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick;
144
- var avatarChars = React.useMemo(function () {
145
- var firstChar = ((firstName === null || firstName === void 0 ? void 0 : firstName[0]) || '').toUpperCase();
146
- var secondChar = ((secondName === null || secondName === void 0 ? void 0 : secondName[0]) || '').toUpperCase();
147
- return "".concat(firstChar).concat(secondChar);
148
- }, [firstName, secondName]);
149
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, avatarConfig);
150
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
151
- var size = propsGenerator.size, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, textWeight = propsGenerator.textWeight, badge = propsGenerator.badge, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, placeholderUrl = propsGenerator.placeholderUrl, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass;
152
- return (jsxRuntime.jsx("div", { className: clsx(className, 'avatar', size && "avatar_size_".concat(sizeClass), (badgeValue || badgeAppearance || badgeSize) && 'avatar_status', isSkeleton && "avatar_skeleton", onClick && 'cursor_type_pointer'), onClick: onClick, children: jsxRuntime.jsxs("div", { className: clsx('avatar__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), children: [before, src ? (jsxRuntime.jsx(Image.Image, { className: clsx('avatar__image', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), src: src, placeholderUrl: placeholderUrl })) : (jsxRuntime.jsx(Text.Text, { className: "avatar__text", size: textSize, textColor: textColor, textWeight: textWeight, children: avatarChars || count })), (icon || iconSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "avatar__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), (badge || badgeValue) && (jsxRuntime.jsx(Icon.Badge, { className: "avatar__badge", appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), after] }) }));
153
- }
154
-
155
- exports.Avatar = Avatar;
156
- exports.avatarAppearance = avatarAppearance;
157
- exports.avatarConfig = avatarConfig;
@@ -1,153 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
- import clsx from 'clsx';
4
- import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
5
- import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
6
- import { I as Icon, B as Badge } from './Icon_es_BrwLifge.js';
7
- import { I as Image } from './Image_es_BpMidmve.js';
8
- import { T as Text } from './Text_es_CwV9rjFD.js';
9
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
10
-
11
- var avatarAppearanceDefault = {
12
- surfacePrimary: {
13
- fill: 'surfacePrimary',
14
- textColor: 'surfaceTextPrimary',
15
- badgeAppearance: 'accentPrimary solid circular',
16
- },
17
- surfaceSecondary: {
18
- fill: 'surfaceSecondary',
19
- textColor: 'surfaceTextPrimary',
20
- badgeAppearance: 'accentPrimary solid circular',
21
- },
22
- surfaceTertiary: {
23
- fill: 'surfaceTertiary',
24
- textColor: 'surfaceTextPrimary',
25
- badgeAppearance: 'accentPrimary solid circular',
26
- },
27
- surfaceQuaternary: {
28
- fill: 'surfaceQuaternary',
29
- textColor: 'surfaceTextPrimary',
30
- badgeAppearance: 'accentPrimary solid circular',
31
- },
32
- };
33
-
34
- var avatarAppearanceShape = {
35
- circular: {
36
- shape: 'circular',
37
- },
38
- rounded: {
39
- shape: 'rounded',
40
- },
41
- roundedXL: {
42
- shape: 'rounded',
43
- shapeStrength: '2m',
44
- },
45
- roundedL: {
46
- shape: 'rounded',
47
- shapeStrength: '1_5m',
48
- },
49
- roundedM: {
50
- shape: 'rounded',
51
- shapeStrength: '1m',
52
- },
53
- roundedS: {
54
- shape: 'rounded',
55
- shapeStrength: '0_5m',
56
- },
57
- };
58
-
59
- var avatarAppearanceSize = {
60
- size16: {
61
- size: '16',
62
- textSize: 'xxl',
63
- badgeAppearanceSize: 'sizeXXS',
64
- iconFillSize: '12',
65
- },
66
- size20: {
67
- size: '20',
68
- textSize: 'xxl',
69
- badgeAppearanceSize: 'sizeXXS',
70
- iconFillSize: '12',
71
- },
72
- size24: {
73
- size: '24',
74
- textSize: 'l',
75
- badgeAppearanceSize: 'sizeXXS',
76
- iconFillSize: '12',
77
- },
78
- size32: {
79
- size: '32',
80
- textSize: 'l',
81
- badgeAppearanceSize: 'sizeXS',
82
- iconFillSize: '12',
83
- },
84
- size40: {
85
- size: '40',
86
- textSize: 'l',
87
- badgeAppearanceSize: 'sizeS',
88
- iconFillSize: '12',
89
- },
90
- size56: {
91
- size: '56',
92
- textSize: 'xxl',
93
- badgeAppearanceSize: 'sizeM',
94
- iconFillSize: '16',
95
- },
96
- size96: {
97
- size: '96',
98
- textSize: 'xxl',
99
- badgeAppearanceSize: 'sizeXL',
100
- iconFillSize: '32',
101
- },
102
- size144: {
103
- size: '144',
104
- textSize: 'xxl',
105
- badgeAppearanceSize: 'sizeXXL',
106
- iconFillSize: '40',
107
- },
108
- size240: {
109
- size: '240',
110
- textSize: 'xxl',
111
- badgeAppearanceSize: 'sizeXXL',
112
- iconFillSize: '40',
113
- },
114
- };
115
-
116
- var avatarAppearanceStyle = {
117
- solid: {
118
- borderColor: 'none',
119
- },
120
- outlined: {
121
- fill: 'none',
122
- },
123
- full: {
124
- borderColor: 'none',
125
- },
126
- ghost: {
127
- fill: 'none',
128
- borderColor: 'none',
129
- },
130
- };
131
-
132
- var avatarAppearance = __assign(__assign(__assign(__assign({}, avatarAppearanceSize), avatarAppearanceStyle), avatarAppearanceShape), avatarAppearanceDefault);
133
-
134
- var avatarConfig = {
135
- appearance: avatarAppearance,
136
- setAppearance: function (appearanceConfig) {
137
- avatarConfig.appearance = appearanceConfig;
138
- },
139
- };
140
- function Avatar(props) {
141
- var className = props.className, appearance = props.appearance, src = props.src, _a = props.firstName, firstName = _a === void 0 ? '' : _a, _b = props.secondName, secondName = _b === void 0 ? '' : _b, count = props.count, before = props.before, after = props.after, isSkeleton = props.isSkeleton, onClick = props.onClick;
142
- var avatarChars = useMemo(function () {
143
- var firstChar = ((firstName === null || firstName === void 0 ? void 0 : firstName[0]) || '').toUpperCase();
144
- var secondChar = ((secondName === null || secondName === void 0 ? void 0 : secondName[0]) || '').toUpperCase();
145
- return "".concat(firstChar).concat(secondChar);
146
- }, [firstName, secondName]);
147
- var appearanceConfig = useAppearanceConfig(appearance, avatarConfig);
148
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
149
- var size = propsGenerator.size, fillClass = propsGenerator.fillClass, fillHoverClass = propsGenerator.fillHoverClass, textColor = propsGenerator.textColor, textSize = propsGenerator.textSize, textWeight = propsGenerator.textWeight, badge = propsGenerator.badge, badgeAppearance = propsGenerator.badgeAppearance, badgeAppearanceSize = propsGenerator.badgeAppearanceSize, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, icon = propsGenerator.icon, iconFill = propsGenerator.iconFill, iconFillHover = propsGenerator.iconFillHover, iconFillSize = propsGenerator.iconFillSize, iconItemFill = propsGenerator.iconItemFill, iconShape = propsGenerator.iconShape, iconSize = propsGenerator.iconSize, iconSrc = propsGenerator.iconSrc, placeholderUrl = propsGenerator.placeholderUrl, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass;
150
- return (jsx("div", { className: clsx(className, 'avatar', size && "avatar_size_".concat(sizeClass), (badgeValue || badgeAppearance || badgeSize) && 'avatar_status', isSkeleton && "avatar_skeleton", onClick && 'cursor_type_pointer'), onClick: onClick, children: jsxs("div", { className: clsx('avatar__wrapper', fillClass && "fill_".concat(fillClass), fillHoverClass && "fill_hover_".concat(fillHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), children: [before, src ? (jsx(Image, { className: clsx('avatar__image', shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), src: src, placeholderUrl: placeholderUrl })) : (jsx(Text, { className: "avatar__text", size: textSize, textColor: textColor, textWeight: textWeight, children: avatarChars || count })), (icon || iconSrc) && (jsx(Icon, { className: "avatar__icon", fill: iconFill, fillHover: iconFillHover, fillSize: iconFillSize, iconFill: iconItemFill, iconSize: iconSize, imageSrc: iconSrc, shape: iconShape, SvgImage: icon })), (badge || badgeValue) && (jsx(Badge, { className: "avatar__badge", appearance: "".concat(badgeAppearance, " ").concat(badgeAppearanceSize), size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue })), after] }) }));
151
- }
152
-
153
- export { Avatar as A, avatarConfig as a, avatarAppearance as b };
@@ -1,331 +0,0 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var clsx = require('clsx');
5
- var useAppearanceConfig = require('./cjs/hooks/useAppearanceConfig/useAppearanceConfig.js');
6
- var useDevicePropsGenerator = require('./cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
7
- var useStyles = require('./cjs/hooks/useStyles/useStyles.js');
8
- var Icon = require('./Icon_cjs_Cz6IyOkb.js');
9
- var Text = require('./Text_cjs_0EINiUq4.js');
10
- var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
11
-
12
- var chipsAppearanceAccent = {
13
- accent: {
14
- fill: 'accentPrimary',
15
- fillHover: 'accentHoverPrimary',
16
- labelTextColor: 'accentTextPrimary',
17
- borderColor: 'accentBorderSecondary',
18
- },
19
- accentMutedPrimary: {
20
- fill: 'accentTertiary',
21
- fillHover: 'accentHoverPrimary',
22
- labelTextColor: 'accentTextSecondary',
23
- borderColor: 'accentBorderSecondary',
24
- iconAfterFillIcon: 'accentItemQuaternary',
25
- iconBeforeFillIcon: 'accentItemQuaternary',
26
- },
27
- accentPrimary: {
28
- fill: 'accentPrimary',
29
- fillHover: 'accentHoverPrimary',
30
- labelTextColor: 'accentTextPrimary',
31
- borderColor: 'accentBorderSecondary',
32
- iconAfterFillIcon: 'accentItemPrimary',
33
- iconBeforeFillIcon: 'accentItemPrimary',
34
- },
35
- };
36
-
37
- var chipsAppearanceDanger = {
38
- dangerMutedPrimary: {
39
- fill: 'dangerTertiary',
40
- labelTextColor: 'dangerTextQuaternary',
41
- borderColor: 'dangerBorderQuaternary',
42
- iconAfterFillIcon: 'dangerItemQuaternary',
43
- iconBeforeFillIcon: 'dangerItemQuaternary',
44
- },
45
- dangerPrimary: {
46
- fill: 'dangerPrimary',
47
- labelTextColor: 'dangerTextPrimary',
48
- borderColor: 'dangerBorderSecondary',
49
- iconAfterFillIcon: 'dangerItemPrimary',
50
- iconBeforeFillIcon: 'dangerItemPrimary',
51
- },
52
- };
53
-
54
- var chipsAppearanceDisabled = {
55
- disabled: {
56
- fill: 'surfaceDisabled',
57
- labelTextColor: 'surfaceTextDisabled',
58
- borderColor: 'surfaceBorderDisabled',
59
- iconAfterFillIcon: 'surfaceItemDisabled',
60
- iconBeforeFillIcon: 'surfaceItemDisabled',
61
- },
62
- };
63
-
64
- var chipsAppearanceError = {
65
- errorMutedPrimary: {
66
- fill: 'errorDisabled',
67
- labelTextColor: 'errorTextQuaternary',
68
- borderColor: 'errorBorderQuaternary',
69
- iconAfterFillIcon: 'errorItemQuaternary',
70
- iconBeforeFillIcon: 'errorItemQuaternary',
71
- },
72
- errorPrimary: {
73
- fill: 'errorPrimary',
74
- labelTextColor: 'errorTextPrimary',
75
- borderColor: 'errorBorderSecondary',
76
- iconAfterFillIcon: 'errorItemPrimary',
77
- iconBeforeFillIcon: 'errorItemPrimary',
78
- },
79
- };
80
-
81
- var chipsAppearanceInfo = {
82
- infoMutedPrimary: {
83
- fill: 'infoTertiary',
84
- labelTextColor: 'infoTextPrimary',
85
- borderColor: 'infoBorderSecondary',
86
- iconAfterFillIcon: 'infoItemPrimary',
87
- iconBeforeFillIcon: 'infoItemPrimary',
88
- },
89
- infoPrimary: {
90
- fill: 'infoPrimary',
91
- labelTextColor: 'infoTextHover',
92
- borderColor: 'infoBorderHover',
93
- iconAfterFillIcon: 'infoItemHover',
94
- iconBeforeFillIcon: 'infoItemHover',
95
- },
96
- };
97
-
98
- var chipsAppearancePrimary = {
99
- primaryMutedPrimary: {
100
- fill: 'primaryDisabled',
101
- labelTextColor: 'primaryTextSecondary',
102
- borderColor: 'primaryBorderSecondary',
103
- iconAfterFillIcon: 'primaryItemSecondary',
104
- iconBeforeFillIcon: 'primaryItemSecondary',
105
- },
106
- primaryPrimary: {
107
- fill: 'primaryPrimary',
108
- labelTextColor: 'primaryTextPrimary',
109
- borderColor: 'primaryBorderSecondary',
110
- iconAfterFillIcon: 'primaryItemPrimary',
111
- iconBeforeFillIcon: 'primaryItemPrimary',
112
- },
113
- };
114
-
115
- var chipsAppearanceSecondary = {
116
- secondaryMutedPrimary: {
117
- fill: 'secondaryDisabled',
118
- labelTextColor: 'secondaryTextQuaternary',
119
- borderColor: 'secondaryBorderSecondary',
120
- iconAfterFillIcon: 'secondaryItemQuaternary',
121
- iconBeforeFillIcon: 'secondaryItemQuaternary',
122
- },
123
- secondaryPrimary: {
124
- fill: 'secondaryPrimary',
125
- labelTextColor: 'secondaryTextPrimary',
126
- borderColor: 'secondaryBorderSecondary',
127
- iconAfterFillIcon: 'secondaryItemPrimary',
128
- iconBeforeFillIcon: 'secondaryItemPrimary',
129
- },
130
- };
131
-
132
- var chipsAppearanceShape = {
133
- circular: {
134
- shape: 'circular',
135
- },
136
- rounded: {
137
- shape: 'rounded',
138
- },
139
- roundedS: {
140
- shape: 'rounded',
141
- shapeStrength: '0_5m',
142
- },
143
- roundedM: {
144
- shape: 'rounded',
145
- shapeStrength: '1m',
146
- },
147
- roundedL: {
148
- shape: 'rounded',
149
- shapeStrength: '1_5m',
150
- },
151
- roundedXL: {
152
- shape: 'rounded',
153
- shapeStrength: '2m',
154
- },
155
- };
156
-
157
- var chipsAppearanceSize = {
158
- sizeXXL: {
159
- size: 'xxl',
160
- labelTextSize: 'xl',
161
- iconAfterSize: 24,
162
- iconBeforeSize: 24,
163
- },
164
- sizeXL: {
165
- size: 'xl',
166
- labelTextSize: 'm',
167
- iconAfterSize: 20,
168
- iconBeforeSize: 20,
169
- },
170
- sizeL: {
171
- size: 'l',
172
- labelTextSize: 'm',
173
- iconAfterSize: 16,
174
- iconBeforeSize: 16,
175
- },
176
- sizeM: {
177
- size: 'm',
178
- labelTextSize: 's',
179
- iconAfterSize: 16,
180
- iconBeforeSize: 16,
181
- },
182
- sizeS: {
183
- size: 's',
184
- labelTextSize: 's',
185
- iconAfterSize: 16,
186
- iconBeforeSize: 16,
187
- },
188
- sizeXS: {
189
- size: 'xs',
190
- labelTextSize: 'xs',
191
- iconAfterSize: 14,
192
- iconBeforeSize: 14,
193
- },
194
- sizeXXS: {
195
- size: 'xxs',
196
- labelTextSize: 'xxs',
197
- iconAfterSize: 12,
198
- iconBeforeSize: 12,
199
- },
200
- };
201
-
202
- var chipsAppearanceStyle = {
203
- solid: {
204
- borderColor: 'none',
205
- },
206
- outlined: {
207
- fill: 'none',
208
- },
209
- full: {},
210
- ghost: {
211
- fill: 'none',
212
- borderColor: 'none',
213
- },
214
- };
215
-
216
- var chipsAppearanceSuccess = {
217
- successMutedPrimary: {
218
- fill: 'successTertiary',
219
- labelTextColor: 'successTextQuaternary',
220
- borderColor: 'successBorderQuaternary',
221
- iconAfterFillIcon: 'successItemQuaternary',
222
- iconBeforeFillIcon: 'successItemQuaternary',
223
- },
224
- successPrimary: {
225
- fill: 'successPrimary',
226
- labelTextColor: 'successTextPrimary',
227
- borderColor: 'successBorderSecondary',
228
- iconAfterFillIcon: 'successItemPrimary',
229
- iconBeforeFillIcon: 'successItemPrimary',
230
- },
231
- };
232
-
233
- var chipsAppearanceSurface = {
234
- surfaceMutedPrimary: {
235
- fill: 'surfaceSecondary',
236
- labelTextColor: 'surfaceTextQuaternary',
237
- borderColor: 'surfaceBorderQuaternary',
238
- iconAfterFillIcon: 'surfaceItemQuaternary',
239
- iconBeforeFillIcon: 'surfaceItemQuaternary',
240
- },
241
- surfacePrimary: {
242
- fill: 'surfacePrimary',
243
- fillActive: 'accentPrimary',
244
- fillActiveHover: 'accentSecondary',
245
- fillHover: 'surfaceTertiary',
246
- labelTextActiveColor: 'accentTextPrimary',
247
- labelTextColor: 'surfaceTextPrimary',
248
- labelTextHoverColor: 'surfaceTextPrimary',
249
- borderColor: 'surfaceBorderTertiary',
250
- activeIconItemFill: 'surfaceItemSecondary',
251
- badgeAppearance: 'surfacePrimary sizeXS solid',
252
- iconAfterFillActiveIcon: 'accentItemPrimary',
253
- iconAfterFillIcon: 'surfaceItemPrimary',
254
- iconBeforeFillActiveIcon: 'accentItemPrimary',
255
- iconBeforeFillIcon: 'surfaceItemPrimary',
256
- },
257
- surfaceSecondary: {
258
- fill: 'surfaceSecondary',
259
- fillActive: 'accentPrimary',
260
- fillActiveHover: 'accentSecondary',
261
- fillHover: 'surfaceTertiary',
262
- labelTextActiveColor: 'accentTextPrimary',
263
- labelTextColor: 'surfaceTextPrimary',
264
- labelTextHoverColor: 'surfaceTextPrimary',
265
- borderColor: 'surfaceBorderSecondary',
266
- iconAfterFillActiveIcon: 'accentItemPrimary',
267
- iconAfterFillIcon: 'surfaceItemPrimary',
268
- iconBeforeFillActiveIcon: 'accentItemPrimary',
269
- iconBeforeFillIcon: 'surfaceItemPrimary',
270
- },
271
- surfaceTertiary: {
272
- fill: 'surfaceTertiary',
273
- fillHover: 'surfaceHover',
274
- labelTextColor: 'surfaceTextPrimary',
275
- borderColor: 'surfaceBorderTertiary',
276
- },
277
- };
278
-
279
- var chipsAppearanceWarning = {
280
- warningMutedPrimary: {
281
- fill: 'warningTertiary',
282
- labelTextColor: 'warningTextSecondary',
283
- borderColor: 'warningBorderSecondary',
284
- iconAfterFillIcon: 'warningItemSecondary',
285
- iconBeforeFillIcon: 'warningItemSecondary',
286
- },
287
- warningPrimary: {
288
- fill: 'warningPrimary',
289
- labelTextColor: 'warningTextPrimary',
290
- borderColor: 'warningBorderSecondary',
291
- iconAfterFillIcon: 'warningItemPrimary',
292
- iconBeforeFillIcon: 'warningItemPrimary',
293
- },
294
- };
295
-
296
- var chipsAppearance = tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign(tslib_es6.__assign({}, chipsAppearanceSize), chipsAppearanceStyle), chipsAppearanceAccent), chipsAppearanceDanger), chipsAppearanceError), chipsAppearanceInfo), chipsAppearanceDisabled), chipsAppearancePrimary), chipsAppearanceSecondary), chipsAppearanceSuccess), chipsAppearanceSurface), chipsAppearanceWarning), chipsAppearanceShape);
297
-
298
- var chipsConfig = {
299
- appearance: chipsAppearance,
300
- setAppearance: function (appearanceConfig) {
301
- chipsConfig.appearance = appearanceConfig;
302
- },
303
- };
304
- function Chips(props) {
305
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, _a = props.label, label = _a === void 0 ? '' : _a, isDisabled = props.isDisabled, iconAfter = props.iconAfter, iconAfterSrc = props.iconAfterSrc, iconBefore = props.iconBefore, iconBeforeSrc = props.iconBeforeSrc, isActive = props.isActive, isSkeleton = props.isSkeleton, onClick = props.onClick, onClickIconAfter = props.onClickIconAfter, onClickIconBefore = props.onClickIconBefore, children = props.children;
306
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, chipsConfig, isDisabled);
307
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
308
- var alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, 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, labelTextWeight = propsGenerator.labelTextWeight, labelTextWrap = propsGenerator.labelTextWrap, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, badgeAppearance = propsGenerator.badgeAppearance, badgeShape = propsGenerator.badgeShape, badgeSize = propsGenerator.badgeSize, badgeTextColor = propsGenerator.badgeTextColor, badgeTextSize = propsGenerator.badgeTextSize, badgeValue = propsGenerator.badgeValue, cursorClass = propsGenerator.cursorClass, iconAfterFill = propsGenerator.iconAfterFill, iconAfterFillActiveIcon = propsGenerator.iconAfterFillActiveIcon, iconAfterFillIcon = propsGenerator.iconAfterFillIcon, iconAfterFillSize = propsGenerator.iconAfterFillSize, iconAfterShape = propsGenerator.iconAfterShape, iconAfterSize = propsGenerator.iconAfterSize, iconBeforeFill = propsGenerator.iconBeforeFill, iconBeforeFillActiveIcon = propsGenerator.iconBeforeFillActiveIcon, iconBeforeFillIcon = propsGenerator.iconBeforeFillIcon, iconBeforeFillSize = propsGenerator.iconBeforeFillSize, iconBeforeShape = propsGenerator.iconBeforeShape, iconBeforeSize = propsGenerator.iconBeforeSize, shapeClass = propsGenerator.shapeClass, shapeStrengthClass = propsGenerator.shapeStrengthClass, sizeClass = propsGenerator.sizeClass;
309
- var chipsStyles = useStyles.useStyles(props).styles;
310
- return (jsxRuntime.jsx("div", { "data-test-id": dataTestId && "".concat(dataTestId, "Chips"), "data-tour": dataTour, className: clsx(className, 'chips', !isActive
311
- ? fillClass && "fill_".concat(fillClass)
312
- : fillActiveClass && "fill_active_".concat(fillActiveClass), !isActive
313
- ? fillHoverClass && "fill_hover_".concat(fillHoverClass)
314
- : fillActiveHoverClass && "fill_active_hover_".concat(fillActiveHoverClass), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass), borderColorClass && "border-color_".concat(borderColorClass), borderTypeClass && "border_type_".concat(borderTypeClass), sizeClass && "chips_size_".concat(sizeClass), alignDirectionClass && "align_".concat(alignDirectionClass), alignClass && "align_".concat(alignClass), isActive && 'chips_state_active', isDisabled && "chips_state_disabled", cursorClass && "cursor_".concat(cursorClass), onClick && 'cursor_type_pointer', isSkeleton && "chips_skeleton"), style: chipsStyles, onClick: !isDisabled ? onClick : undefined, children: jsxRuntime.jsxs("div", { className: "chips__inner", children: [(iconBefore || iconBeforeSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "chips__icon_before", size: iconBeforeSize, fill: iconBeforeFill, fillSize: iconBeforeFillSize, iconFill: iconBeforeFillIcon, iconFillActive: iconBeforeFillActiveIcon, imageSrc: iconBeforeSrc, shape: iconBeforeShape, SvgImage: iconBefore, isActive: isActive, onClick: onClickIconBefore })), typeof label === 'string' ? (jsxRuntime.jsx(Text.Text, { className: "chips__label", size: labelTextSize, textColor: labelTextColor, textColorActive: labelTextActiveColor, textColorActiveHover: labelTextActiveHoverColor, textColorHover: labelTextHoverColor, textWeight: labelTextWeight, textWrap: labelTextWrap, isActive: isActive, children: label })) : (jsxRuntime.jsx("div", { className: "chips__label", children: label })), children, (iconAfter || iconAfterSrc) && (jsxRuntime.jsx(Icon.Icon, { className: "chips__icon_after", size: iconAfterSize, fill: iconAfterFill, fillSize: iconAfterFillSize, iconFill: iconAfterFillIcon, iconFillActive: iconAfterFillActiveIcon, imageSrc: iconAfterSrc, shape: iconAfterShape, SvgImage: iconAfter, isActive: isActive, onClick: onClickIconAfter })), badgeValue && (jsxRuntime.jsx(Icon.Badge, { className: "chips__badge", appearance: badgeAppearance, size: badgeSize, textColor: badgeTextColor, textSize: badgeTextSize, shape: badgeShape, value: badgeValue }))] }) }));
315
- }
316
-
317
- function ChipsGroup(props) {
318
- var className = props.className, chipsList = props.chipsList, dataTestId = props.dataTestId, dataTour = props.dataTour, horizontalScroll = props.horizontalScroll, style = props.style, onClick = props.onClick, children = props.children;
319
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props);
320
- var directionClass = propsGenerator.directionClass, alignClass = propsGenerator.alignClass, alignDirectionClass = propsGenerator.alignDirectionClass, fillClass = propsGenerator.fillClass, borderColorClass = propsGenerator.borderColorClass, borderTypeClass = propsGenerator.borderTypeClass, borderWidthClass = propsGenerator.borderWidthClass, chipsAppearance = propsGenerator.chipsAppearance, widthClass = propsGenerator.widthClass, wrapClass = propsGenerator.wrapClass;
321
- // @ts-expect-error
322
- var _a = useStyles.useStyles(props), groupStyles = _a.styles, groupWrapperStyles = _a.wrapper;
323
- return (jsxRuntime.jsx("div", { className: clsx(className, 'chips-group', 'group', widthClass && "width_".concat(widthClass), alignDirectionClass && "align_".concat(alignDirectionClass), directionClass && "group_direction_".concat(directionClass), alignClass && "align_".concat(alignClass), fillClass && "fill_".concat(fillClass), horizontalScroll && 'group_type_horizontal_scroll', wrapClass && "group_wrap_".concat(wrapClass), borderColorClass && "border-color_".concat(borderColorClass), borderWidthClass && "border-width_".concat(borderWidthClass), borderTypeClass && "border_type_".concat(borderTypeClass)), "data-test-id": dataTestId, "data-tour": dataTour, style: Object.assign({}, groupStyles, style), children: horizontalScroll ? (jsxRuntime.jsx("div", { className: "chips-group__wrapper", style: groupWrapperStyles, children: children
324
- ? children
325
- : chipsList === null || chipsList === void 0 ? void 0 : chipsList.map(function (item) { return (jsxRuntime.jsx(Chips, { appearance: chipsAppearance, label: item.label, isDisabled: item.isDisabled, iconAfter: item.iconAfter, iconBefore: item.iconBefore, isActive: item.isActive, onClick: function () { return onClick(item); } }, item.id)); }) })) : children ? (children) : (chipsList === null || chipsList === void 0 ? void 0 : chipsList.map(function (item) { return (jsxRuntime.jsx(Chips, { appearance: chipsAppearance, label: item.label, isDisabled: item.isDisabled, iconAfter: item.iconAfter, iconBefore: item.iconBefore, isActive: item.isActive, onClick: function () { return onClick(item); } }, item.id)); })) }));
326
- }
327
-
328
- exports.Chips = Chips;
329
- exports.ChipsGroup = ChipsGroup;
330
- exports.chipsAppearance = chipsAppearance;
331
- exports.chipsConfig = chipsConfig;