@itcase/ui 1.8.122 → 1.8.124

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/dist/Avatar_cjs_mojzcWRL.js +161 -0
  2. package/dist/Avatar_es_BFom0nAS.js +157 -0
  3. package/dist/{Button_cjs_i0Dn1pkl.js → Button_cjs_CZz8OjWi.js} +42 -30
  4. package/dist/{Button_es_CtH5EKJd.js → Button_es_Cn3wtv3M.js} +42 -30
  5. package/dist/ChipsGroup_cjs_Dgskkc1e.js +344 -0
  6. package/dist/{ChipsGroup_es_ayPPUwQ7.js → ChipsGroup_es_BVQ7_n0k.js} +48 -35
  7. package/dist/DatePicker_cjs_Lzrr9Amf.js +182 -0
  8. package/dist/DatePicker_es_D1LvY5RT.js +178 -0
  9. package/dist/Divider_cjs_DrmV2ezS.js +105 -0
  10. package/dist/Divider_es_BiYozVBS.js +101 -0
  11. package/dist/DropdownItem_cjs_rKLdFxSj.js +211 -0
  12. package/dist/DropdownItem_es_B-1qtEa7.js +206 -0
  13. package/dist/Group_cjs_DmfeUcFI.js +59 -0
  14. package/dist/Group_es_BU5k8f5S.js +55 -0
  15. package/dist/{Icon_cjs_Cz6IyOkb.js → Icon_cjs_DpFxIFv5.js} +170 -121
  16. package/dist/{Icon_es_BrwLifge.js → Icon_es_D5eiycFI.js} +170 -121
  17. package/dist/Image_cjs_CBDMUzv_.js +29 -0
  18. package/dist/Image_es_BHec4iVN.js +27 -0
  19. package/dist/{Input_cjs_Du73R-wm.js → Input_cjs_DDi5JVAV.js} +27 -19
  20. package/dist/{Input_es_CiDHjDqJ.js → Input_es_BnCXATnh.js} +27 -19
  21. package/dist/{Label_cjs_DMoaOoHi.js → Label_cjs_C-x9blCL.js} +45 -33
  22. package/dist/{Label_es_SULlg9bL.js → Label_es_DCqpSw_F.js} +45 -33
  23. package/dist/{Link_cjs_C5UsZUiF.js → Link_cjs_qKXVfU8e.js} +43 -30
  24. package/dist/{Link_es_XiqbdwLp.js → Link_es_P2b6ya7P.js} +43 -30
  25. package/dist/Loader_cjs_DIDsIq3J.js +143 -0
  26. package/dist/Loader_es_CmSggwbR.js +139 -0
  27. package/dist/Overlay_cjs_tGA2fU43.js +42 -0
  28. package/dist/Overlay_es_BS7OTFoy.js +38 -0
  29. package/dist/{Scrollbar_cjs_DcKOfcNp.js → Scrollbar_cjs_Cp-7v2Mt.js} +1 -1
  30. package/dist/{Scrollbar_es_CThJeCLF.js → Scrollbar_es_CcMgNvGi.js} +1 -1
  31. package/dist/Text_cjs_BDTjOTVB.js +69 -0
  32. package/dist/Text_es_CnymlElo.js +65 -0
  33. package/dist/cjs/components/Accordion.js +37 -34
  34. package/dist/cjs/components/Avatar.js +5 -6
  35. package/dist/cjs/components/AvatarStack/stories/__mock__.js +1 -1
  36. package/dist/cjs/components/AvatarStack.js +17 -16
  37. package/dist/cjs/components/Badge.js +3 -4
  38. package/dist/cjs/components/Breadcrumbs/stories/__mock__.js +1 -1
  39. package/dist/cjs/components/Breadcrumbs.js +27 -23
  40. package/dist/cjs/components/Button.js +5 -6
  41. package/dist/cjs/components/Cell/stories/__mock__.js +1 -1
  42. package/dist/cjs/components/Cell.js +28 -25
  43. package/dist/cjs/components/Checkbox.js +33 -26
  44. package/dist/cjs/components/Checkmark.js +28 -23
  45. package/dist/cjs/components/Chips/stories/__mock__.js +1 -1
  46. package/dist/cjs/components/Chips.js +4 -5
  47. package/dist/cjs/components/Choice/stories/__mock__.js +2 -2
  48. package/dist/cjs/components/Choice.js +46 -40
  49. package/dist/cjs/components/Code.js +34 -26
  50. package/dist/cjs/components/CookiesWarning.js +23 -23
  51. package/dist/cjs/components/Dadata.js +14 -9
  52. package/dist/cjs/components/DatePeriod.js +32 -30
  53. package/dist/cjs/components/DatePicker.js +8 -9
  54. package/dist/cjs/components/Divider.js +1 -2
  55. package/dist/cjs/components/Dot.js +5 -6
  56. package/dist/cjs/components/Drawer.js +23 -21
  57. package/dist/cjs/components/Dropdown/stories/__mock__.js +6 -6
  58. package/dist/cjs/components/Dropdown.js +5 -6
  59. package/dist/cjs/components/Flex.js +11 -12
  60. package/dist/cjs/components/Grid.js +15 -16
  61. package/dist/cjs/components/Group.js +1 -2
  62. package/dist/cjs/components/HTMLContent.js +5 -6
  63. package/dist/cjs/components/HeroTitle.js +17 -16
  64. package/dist/cjs/components/Icon.js +3 -4
  65. package/dist/cjs/components/Image.js +1 -2
  66. package/dist/cjs/components/Input.js +1 -2
  67. package/dist/cjs/components/InputPassword.js +114 -84
  68. package/dist/cjs/components/Label.js +4 -5
  69. package/dist/cjs/components/Link.js +1 -2
  70. package/dist/cjs/components/List.js +39 -28
  71. package/dist/cjs/components/Loader.js +2 -3
  72. package/dist/cjs/components/Logo.js +10 -11
  73. package/dist/cjs/components/MenuItem.js +36 -33
  74. package/dist/cjs/components/Modal.js +40 -38
  75. package/dist/cjs/components/ModalSheetBottom.js +17 -18
  76. package/dist/cjs/components/Notification/stories/__mock__.js +1 -1
  77. package/dist/cjs/components/Notification.js +31 -24
  78. package/dist/cjs/components/Overlay.js +1 -2
  79. package/dist/cjs/components/Pagination.js +43 -41
  80. package/dist/cjs/components/Radio.js +34 -26
  81. package/dist/cjs/components/RangeSlider.js +8 -9
  82. package/dist/cjs/components/Response/img.js +1 -1
  83. package/dist/cjs/components/Response.js +102 -84
  84. package/dist/cjs/components/SVGContent.js +6 -7
  85. package/dist/cjs/components/ScrollOnDrag/stories/__mock__.js +2 -2
  86. package/dist/cjs/components/ScrollOnDrag.js +7 -8
  87. package/dist/cjs/components/ScrollToView.js +8 -9
  88. package/dist/cjs/components/Scrollbar/stories/__mock__.js +1 -1
  89. package/dist/cjs/components/Scrollbar.js +1 -1
  90. package/dist/cjs/components/Search.js +39 -31
  91. package/dist/cjs/components/Segmented/stories/__mock__.js +23 -10
  92. package/dist/cjs/components/Segmented.js +47 -42
  93. package/dist/cjs/components/Select.js +118 -113
  94. package/dist/cjs/components/Swiper/stories/__mock__.js +3 -3
  95. package/dist/cjs/components/Swiper.js +27 -29
  96. package/dist/cjs/components/Switch.js +33 -26
  97. package/dist/cjs/components/Tab/stories/__mock__.js +1 -1
  98. package/dist/cjs/components/Tab.js +59 -69
  99. package/dist/cjs/components/Text.js +1 -2
  100. package/dist/cjs/components/Textarea.js +26 -18
  101. package/dist/cjs/components/Tile.js +21 -17
  102. package/dist/cjs/components/Title.js +3 -4
  103. package/dist/cjs/components/Tooltip.js +3 -4
  104. package/dist/cjs/components/Video/stories/__mocks__.js +1 -1
  105. package/dist/cjs/components/Video.js +3 -4
  106. package/dist/cjs/components/Warning.js +26 -20
  107. package/dist/cjs/context/Notifications.js +38 -42
  108. package/dist/cjs/context/UIContext.js +19 -17
  109. package/dist/cjs/context/UrlAssetPrefix.js +3 -3
  110. package/dist/cjs/hoc/urlWithAssetPrefix.js +13 -16
  111. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  112. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  113. package/dist/cjs/hooks/useActiveClasses/useActiveClasses.js +25 -29
  114. package/dist/cjs/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  115. package/dist/cjs/hooks/useAppearanceConfig.js +0 -1
  116. package/dist/cjs/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  117. package/dist/cjs/hooks/useDevicePropsGenerator.js +0 -1
  118. package/dist/cjs/hooks/useDeviceTargetClass.js +0 -1
  119. package/dist/cjs/hooks/useStyles/styleAttributes.js +1 -1
  120. package/dist/cjs/hooks/useStyles/useStyles.js +0 -1
  121. package/dist/cjs/hooks/useStyles.js +0 -1
  122. package/dist/cjs/hooks/useViewportFix.js +5 -5
  123. package/dist/cjs/hooks.js +1 -1
  124. package/dist/cjs/utils/setViewportProperty.js +3 -3
  125. package/dist/components/Accordion.js +37 -34
  126. package/dist/components/Avatar.js +5 -6
  127. package/dist/components/AvatarStack/stories/__mock__.js +1 -1
  128. package/dist/components/AvatarStack.js +17 -16
  129. package/dist/components/Badge.js +3 -4
  130. package/dist/components/Breadcrumbs/stories/__mock__.js +1 -1
  131. package/dist/components/Breadcrumbs.js +27 -23
  132. package/dist/components/Button.js +5 -6
  133. package/dist/components/Cell/stories/__mock__.js +1 -1
  134. package/dist/components/Cell.js +28 -25
  135. package/dist/components/Checkbox.js +33 -26
  136. package/dist/components/Checkmark.js +28 -23
  137. package/dist/components/Chips/stories/__mock__.js +1 -1
  138. package/dist/components/Chips.js +4 -5
  139. package/dist/components/Choice/stories/__mock__.js +2 -2
  140. package/dist/components/Choice.js +46 -40
  141. package/dist/components/Code.js +34 -26
  142. package/dist/components/CookiesWarning.js +23 -23
  143. package/dist/components/Dadata.js +14 -9
  144. package/dist/components/DatePeriod.js +32 -30
  145. package/dist/components/DatePicker.js +8 -9
  146. package/dist/components/Divider.js +1 -2
  147. package/dist/components/Dot.js +5 -6
  148. package/dist/components/Drawer.js +23 -21
  149. package/dist/components/Dropdown/stories/__mock__.js +6 -6
  150. package/dist/components/Dropdown.js +5 -6
  151. package/dist/components/Flex.js +11 -12
  152. package/dist/components/Grid.js +15 -16
  153. package/dist/components/Group.js +1 -2
  154. package/dist/components/HTMLContent.js +5 -6
  155. package/dist/components/HeroTitle.js +17 -16
  156. package/dist/components/Icon.js +3 -4
  157. package/dist/components/Image.js +1 -2
  158. package/dist/components/Input.js +1 -2
  159. package/dist/components/InputPassword.js +114 -84
  160. package/dist/components/Label.js +4 -5
  161. package/dist/components/Link.js +1 -2
  162. package/dist/components/List.js +39 -28
  163. package/dist/components/Loader.js +2 -3
  164. package/dist/components/Logo.js +10 -11
  165. package/dist/components/MenuItem.js +36 -33
  166. package/dist/components/Modal.js +40 -38
  167. package/dist/components/ModalSheetBottom.js +17 -18
  168. package/dist/components/Notification/stories/__mock__.js +1 -1
  169. package/dist/components/Notification.js +31 -24
  170. package/dist/components/Overlay.js +1 -2
  171. package/dist/components/Pagination.js +43 -41
  172. package/dist/components/Radio.js +34 -26
  173. package/dist/components/RangeSlider.js +8 -9
  174. package/dist/components/Response/img.js +1 -1
  175. package/dist/components/Response.js +102 -84
  176. package/dist/components/SVGContent.js +6 -7
  177. package/dist/components/ScrollOnDrag/stories/__mock__.js +2 -2
  178. package/dist/components/ScrollOnDrag.js +7 -8
  179. package/dist/components/ScrollToView.js +8 -9
  180. package/dist/components/Scrollbar/stories/__mock__.js +1 -1
  181. package/dist/components/Scrollbar.js +1 -1
  182. package/dist/components/Search.js +39 -31
  183. package/dist/components/Segmented/stories/__mock__.js +23 -10
  184. package/dist/components/Segmented.js +47 -42
  185. package/dist/components/Select.js +118 -113
  186. package/dist/components/Swiper/stories/__mock__.js +3 -3
  187. package/dist/components/Swiper.js +27 -29
  188. package/dist/components/Switch.js +33 -26
  189. package/dist/components/Tab/stories/__mock__.js +1 -1
  190. package/dist/components/Tab.js +59 -69
  191. package/dist/components/Text.js +1 -2
  192. package/dist/components/Textarea.js +26 -18
  193. package/dist/components/Tile.js +21 -17
  194. package/dist/components/Title.js +3 -4
  195. package/dist/components/Tooltip.js +3 -4
  196. package/dist/components/Video/stories/__mocks__.js +1 -1
  197. package/dist/components/Video.js +3 -4
  198. package/dist/components/Warning.js +26 -20
  199. package/dist/context/Notifications.js +38 -42
  200. package/dist/context/UIContext.js +19 -17
  201. package/dist/context/UrlAssetPrefix.js +3 -3
  202. package/dist/css/components/Checkmark/Checkmark.css +2 -0
  203. package/dist/css/components/DatePeriod/DatePeriod.css +3 -0
  204. package/dist/css/components/Input/Input.css +0 -8
  205. package/dist/css/components/InputPassword/InputPassword.css +34 -43
  206. package/dist/css/components/Tile/Tile.css +3 -3
  207. package/dist/hoc/urlWithAssetPrefix.js +13 -16
  208. package/dist/hooks/useActiveClasses/useActiveClasses.helpers.js +13 -40
  209. package/dist/hooks/useActiveClasses/useActiveClasses.interface.js +1 -1
  210. package/dist/hooks/useActiveClasses/useActiveClasses.js +25 -29
  211. package/dist/hooks/useAppearanceConfig/useAppearanceConfig.js +13 -15
  212. package/dist/hooks/useAppearanceConfig.js +0 -1
  213. package/dist/hooks/useDevicePropsGenerator/useDevicePropsGenerator.js +21 -28
  214. package/dist/hooks/useDevicePropsGenerator.js +0 -1
  215. package/dist/hooks/useDeviceTargetClass.js +0 -1
  216. package/dist/hooks/useStyles/styleAttributes.js +1 -1
  217. package/dist/hooks/useStyles/useStyles.js +0 -1
  218. package/dist/hooks/useStyles.js +0 -1
  219. package/dist/hooks/useViewportFix.js +5 -5
  220. package/dist/hooks.js +1 -1
  221. package/dist/types/components/InputPassword/InputPassword.appearance.d.ts +179 -2
  222. package/dist/types/components/InputPassword/appearance/inputPasswordDefault.d.ts +7 -4
  223. package/dist/types/components/InputPassword/appearance/inputPasswordDisabled.d.ts +6 -4
  224. package/dist/types/components/InputPassword/appearance/inputPasswordError.d.ts +6 -4
  225. package/dist/types/components/InputPassword/appearance/inputPasswordRequire.d.ts +6 -4
  226. package/dist/types/components/InputPassword/appearance/inputPasswordShape.d.ts +25 -0
  227. package/dist/types/components/InputPassword/appearance/inputPasswordSize.d.ts +14 -28
  228. package/dist/types/components/InputPassword/appearance/inputPasswordStyle.d.ts +5 -5
  229. package/dist/types/components/InputPassword/appearance/inputPasswordSuccess.d.ts +6 -4
  230. package/dist/types/components/Response/Response.constant.d.ts +32 -35
  231. package/dist/types/components/Response/appearance/responseConfirm.d.ts +1 -0
  232. package/dist/types/components/Response/appearance/responseDanger.d.ts +1 -0
  233. package/dist/types/components/Response/appearance/responseEmpty.d.ts +1 -0
  234. package/dist/types/components/Response/appearance/responseError.d.ts +1 -0
  235. package/dist/types/components/Response/appearance/responseFail.d.ts +1 -0
  236. package/dist/types/components/Response/appearance/responseNothingFound.d.ts +1 -0
  237. package/dist/types/components/Response/appearance/responseRefresh.d.ts +1 -0
  238. package/dist/types/components/Response/appearance/responseSuccess.d.ts +1 -0
  239. package/dist/types/components/Response/appearance/responseUnableLoadData.d.ts +1 -0
  240. package/dist/types/components/Response/appearance/responseWarning.d.ts +1 -0
  241. package/dist/types/components/Select/SelectContainer.d.ts +1 -1
  242. package/dist/types/components/Tab/appearance/tabSize.d.ts +0 -14
  243. package/dist/types/components/Tab/appearance/tabSurface.d.ts +7 -7
  244. package/dist/utils/setViewportProperty.js +3 -3
  245. package/package.json +14 -14
  246. package/dist/Avatar_cjs_kuE0Rueg.js +0 -157
  247. package/dist/Avatar_es_lx7s4Vla.js +0 -153
  248. package/dist/ChipsGroup_cjs_C8L3ZeD_.js +0 -331
  249. package/dist/DatePicker_cjs_DsIAoi01.js +0 -183
  250. package/dist/DatePicker_es_BP5BrEr-.js +0 -179
  251. package/dist/Divider_cjs_DUYtmwn2.js +0 -97
  252. package/dist/Divider_es_CCLBFIx6.js +0 -93
  253. package/dist/DropdownItem_cjs_Bhss6lyM.js +0 -207
  254. package/dist/DropdownItem_es_BXl6lPJx.js +0 -202
  255. package/dist/Group_cjs_CsJ6ICKK.js +0 -59
  256. package/dist/Group_es_DRqIIM9m.js +0 -55
  257. package/dist/Image_cjs_B6YlGx8G.js +0 -28
  258. package/dist/Image_es_BvYo_cHH.js +0 -26
  259. package/dist/Loader_cjs_D3lnxPlI.js +0 -132
  260. package/dist/Loader_es_BUSqFrCd.js +0 -128
  261. package/dist/Overlay_cjs_CcfJYN5o.js +0 -41
  262. package/dist/Overlay_es_DF3DAdxS.js +0 -37
  263. package/dist/Text_cjs_0EINiUq4.js +0 -68
  264. package/dist/Text_es_CwV9rjFD.js +0 -64
  265. package/dist/tslib.es6_cjs_CCZ3TN_7.js +0 -59
  266. package/dist/tslib.es6_es_Bwu1Cn-t.js +0 -56
@@ -0,0 +1,143 @@
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 Text = require('./Text_cjs_BDTjOTVB.js');
9
+
10
+ const loaderAppearanceAccent = {
11
+ accentPrimary: {
12
+ fill: 'accentPrimary',
13
+ itemFill: 'accentItemPrimary',
14
+ },
15
+ accentTertiary: {
16
+ fill: 'accentTertiary',
17
+ itemFill: 'accentItemSecondary',
18
+ },
19
+ };
20
+
21
+ const loaderAppearanceDanger = {
22
+ dangerPrimary: {
23
+ fill: 'dangerPrimary',
24
+ itemFill: 'dangerItemPrimary',
25
+ },
26
+ };
27
+
28
+ const loaderAppearanceError = {
29
+ errorPrimary: {
30
+ fill: 'errorPrimary',
31
+ itemFill: 'errorItemPrimary',
32
+ },
33
+ };
34
+
35
+ const loaderAppearanceInfo = {
36
+ infoPrimary: {
37
+ fill: 'infoPrimary',
38
+ itemFill: 'infoItemPrimary',
39
+ },
40
+ };
41
+
42
+ const loaderAppearancePrimary = {
43
+ primaryPrimary: {
44
+ fill: 'primaryPrimary',
45
+ itemFill: 'primaryItemPrimary',
46
+ },
47
+ };
48
+
49
+ const loaderAppearanceSecondary = {
50
+ secondaryPrimary: {
51
+ fill: 'secondaryPrimary',
52
+ itemFill: 'secondaryItemPrimary',
53
+ },
54
+ };
55
+
56
+ const loaderAppearanceSize = {
57
+ sizeL: {
58
+ size: 'l',
59
+ },
60
+ sizeM: {
61
+ size: 'm',
62
+ },
63
+ sizeS: {
64
+ size: 's',
65
+ },
66
+ };
67
+
68
+ const loaderAppearanceStyle = {
69
+ solid: {
70
+ borderColor: 'none',
71
+ },
72
+ outlined: {
73
+ fill: 'none',
74
+ },
75
+ full: {},
76
+ ghost: {
77
+ fill: 'none',
78
+ borderColor: 'none',
79
+ },
80
+ };
81
+
82
+ const loaderAppearanceSuccess = {
83
+ successPrimary: {
84
+ fill: 'successPrimary',
85
+ itemFill: 'successItemPrimary',
86
+ },
87
+ };
88
+
89
+ const loaderAppearanceSurface = {
90
+ surfacePrimary: {
91
+ fill: 'surfacePrimary',
92
+ itemFill: 'surfaceItemPrimary',
93
+ },
94
+ surfaceSecondary: {
95
+ fill: 'surfaceSecondary',
96
+ itemFill: 'surfaceItemPrimary',
97
+ },
98
+ surfaceTertiary: {
99
+ fill: 'surfaceTertiary',
100
+ itemFill: 'surfaceItemPrimary',
101
+ },
102
+ };
103
+
104
+ const loaderAppearanceWarning = {
105
+ warningPrimary: {
106
+ fill: 'warningPrimary',
107
+ itemFill: 'warningItemPrimary',
108
+ },
109
+ };
110
+
111
+ const loaderAppearance = {
112
+ ...loaderAppearanceAccent,
113
+ ...loaderAppearancePrimary,
114
+ ...loaderAppearanceSize,
115
+ ...loaderAppearanceSecondary,
116
+ ...loaderAppearanceSurface,
117
+ ...loaderAppearanceWarning,
118
+ ...loaderAppearanceSuccess,
119
+ ...loaderAppearanceInfo,
120
+ ...loaderAppearanceDanger,
121
+ ...loaderAppearanceError,
122
+ ...loaderAppearanceStyle,
123
+ };
124
+
125
+ const loaderConfig = {
126
+ appearance: loaderAppearance,
127
+ setAppearance: (appearanceConfig) => {
128
+ loaderConfig.appearance = appearanceConfig;
129
+ },
130
+ };
131
+ function Loader(props) {
132
+ const { className, type = 'simple', appearance, text, isDisabled, isSkeleton, children, } = props;
133
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, loaderConfig, isDisabled);
134
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
135
+ const { fillClass, textColor, textSize, heightClass, itemFillClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator; // TODO: сделать нормальные типы для useDevicePropsGenerator
136
+ // @ts-expect-error - TODO: сделать useStyles на ts
137
+ const { styles: loader } = useStyles.useStyles(props);
138
+ return (jsxRuntime.jsxs("div", { className: clsx('loader', className, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, fillClass && `fill_${fillClass}`, sizeClass && `loader_size_${sizeClass}`, isSkeleton && `loader_skeleton`, type && `loader_type_${type}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`), style: loader, children: [children || (jsxRuntime.jsxs("div", { className: "loader__inner", children: [jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" })] })), text && (jsxRuntime.jsx(Text.Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
139
+ }
140
+
141
+ exports.Loader = Loader;
142
+ exports.loaderAppearance = loaderAppearance;
143
+ exports.loaderConfig = loaderConfig;
@@ -0,0 +1,139 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
4
+ import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
5
+ import { useStyles } from './hooks/useStyles/useStyles.js';
6
+ import { T as Text } from './Text_es_CnymlElo.js';
7
+
8
+ const loaderAppearanceAccent = {
9
+ accentPrimary: {
10
+ fill: 'accentPrimary',
11
+ itemFill: 'accentItemPrimary',
12
+ },
13
+ accentTertiary: {
14
+ fill: 'accentTertiary',
15
+ itemFill: 'accentItemSecondary',
16
+ },
17
+ };
18
+
19
+ const loaderAppearanceDanger = {
20
+ dangerPrimary: {
21
+ fill: 'dangerPrimary',
22
+ itemFill: 'dangerItemPrimary',
23
+ },
24
+ };
25
+
26
+ const loaderAppearanceError = {
27
+ errorPrimary: {
28
+ fill: 'errorPrimary',
29
+ itemFill: 'errorItemPrimary',
30
+ },
31
+ };
32
+
33
+ const loaderAppearanceInfo = {
34
+ infoPrimary: {
35
+ fill: 'infoPrimary',
36
+ itemFill: 'infoItemPrimary',
37
+ },
38
+ };
39
+
40
+ const loaderAppearancePrimary = {
41
+ primaryPrimary: {
42
+ fill: 'primaryPrimary',
43
+ itemFill: 'primaryItemPrimary',
44
+ },
45
+ };
46
+
47
+ const loaderAppearanceSecondary = {
48
+ secondaryPrimary: {
49
+ fill: 'secondaryPrimary',
50
+ itemFill: 'secondaryItemPrimary',
51
+ },
52
+ };
53
+
54
+ const loaderAppearanceSize = {
55
+ sizeL: {
56
+ size: 'l',
57
+ },
58
+ sizeM: {
59
+ size: 'm',
60
+ },
61
+ sizeS: {
62
+ size: 's',
63
+ },
64
+ };
65
+
66
+ const loaderAppearanceStyle = {
67
+ solid: {
68
+ borderColor: 'none',
69
+ },
70
+ outlined: {
71
+ fill: 'none',
72
+ },
73
+ full: {},
74
+ ghost: {
75
+ fill: 'none',
76
+ borderColor: 'none',
77
+ },
78
+ };
79
+
80
+ const loaderAppearanceSuccess = {
81
+ successPrimary: {
82
+ fill: 'successPrimary',
83
+ itemFill: 'successItemPrimary',
84
+ },
85
+ };
86
+
87
+ const loaderAppearanceSurface = {
88
+ surfacePrimary: {
89
+ fill: 'surfacePrimary',
90
+ itemFill: 'surfaceItemPrimary',
91
+ },
92
+ surfaceSecondary: {
93
+ fill: 'surfaceSecondary',
94
+ itemFill: 'surfaceItemPrimary',
95
+ },
96
+ surfaceTertiary: {
97
+ fill: 'surfaceTertiary',
98
+ itemFill: 'surfaceItemPrimary',
99
+ },
100
+ };
101
+
102
+ const loaderAppearanceWarning = {
103
+ warningPrimary: {
104
+ fill: 'warningPrimary',
105
+ itemFill: 'warningItemPrimary',
106
+ },
107
+ };
108
+
109
+ const loaderAppearance = {
110
+ ...loaderAppearanceAccent,
111
+ ...loaderAppearancePrimary,
112
+ ...loaderAppearanceSize,
113
+ ...loaderAppearanceSecondary,
114
+ ...loaderAppearanceSurface,
115
+ ...loaderAppearanceWarning,
116
+ ...loaderAppearanceSuccess,
117
+ ...loaderAppearanceInfo,
118
+ ...loaderAppearanceDanger,
119
+ ...loaderAppearanceError,
120
+ ...loaderAppearanceStyle,
121
+ };
122
+
123
+ const loaderConfig = {
124
+ appearance: loaderAppearance,
125
+ setAppearance: (appearanceConfig) => {
126
+ loaderConfig.appearance = appearanceConfig;
127
+ },
128
+ };
129
+ function Loader(props) {
130
+ const { className, type = 'simple', appearance, text, isDisabled, isSkeleton, children, } = props;
131
+ const appearanceConfig = useAppearanceConfig(appearance, loaderConfig, isDisabled);
132
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
133
+ const { fillClass, textColor, textSize, heightClass, itemFillClass, shapeClass, shapeStrengthClass, sizeClass, widthClass, } = propsGenerator; // TODO: сделать нормальные типы для useDevicePropsGenerator
134
+ // @ts-expect-error - TODO: сделать useStyles на ts
135
+ const { styles: loader } = useStyles(props);
136
+ return (jsxs("div", { className: clsx('loader', className, widthClass && `width_${widthClass}`, heightClass && `height_${heightClass}`, fillClass && `fill_${fillClass}`, sizeClass && `loader_size_${sizeClass}`, isSkeleton && `loader_skeleton`, type && `loader_type_${type}`, shapeClass && `shape_${shapeClass}`, shapeStrengthClass && `shape-strength_${shapeStrengthClass}`), style: loader, children: [children || (jsxs("div", { className: "loader__inner", children: [jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" }), jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" }), jsx("span", { className: clsx('loader__item', itemFillClass && `fill_${itemFillClass}`), children: "\u00A0" })] })), text && (jsx(Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
137
+ }
138
+
139
+ export { Loader as L, loaderAppearance as a, loaderConfig as l };
@@ -0,0 +1,42 @@
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
+
9
+ const overlayAppearanceDefault = {
10
+ blackout: {
11
+ fill: 'black',
12
+ opacity: '50',
13
+ },
14
+ blur: {
15
+ fill: 'surfaceQuaternary',
16
+ blur: '10',
17
+ },
18
+ };
19
+
20
+ const overlayAppearance = {
21
+ ...overlayAppearanceDefault,
22
+ };
23
+
24
+ const overlayConfig = {
25
+ appearance: overlayAppearance,
26
+ setAppearance: (appearanceConfig) => {
27
+ overlayConfig.appearance = appearanceConfig;
28
+ },
29
+ };
30
+ function Overlay(props) {
31
+ const { dataTestId, dataTour, className, appearance, isOverlay, onClick } = props;
32
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, overlayConfig);
33
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
34
+ const { fillClass, blurClass, opacityClass } = propsGenerator;
35
+ // @ts-expect-error - TODO: сделать useStyles на ts
36
+ const { styles: overlayStyles } = useStyles.useStyles(props);
37
+ return (jsxRuntime.jsx("div", { className: clsx(className, 'overlay', opacityClass && `opacity_${opacityClass}`, blurClass && `blur_${blurClass}`, isOverlay && 'overlay_state_visible', fillClass && `fill_${fillClass}`), "data-test-id": dataTestId, "data-tour": dataTour, style: overlayStyles, onClick: onClick, children: "\u00A0" }));
38
+ }
39
+
40
+ exports.Overlay = Overlay;
41
+ exports.overlayAppearance = overlayAppearance;
42
+ exports.overlayConfig = overlayConfig;
@@ -0,0 +1,38 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
4
+ import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
5
+ import { useStyles } from './hooks/useStyles/useStyles.js';
6
+
7
+ const overlayAppearanceDefault = {
8
+ blackout: {
9
+ fill: 'black',
10
+ opacity: '50',
11
+ },
12
+ blur: {
13
+ fill: 'surfaceQuaternary',
14
+ blur: '10',
15
+ },
16
+ };
17
+
18
+ const overlayAppearance = {
19
+ ...overlayAppearanceDefault,
20
+ };
21
+
22
+ const overlayConfig = {
23
+ appearance: overlayAppearance,
24
+ setAppearance: (appearanceConfig) => {
25
+ overlayConfig.appearance = appearanceConfig;
26
+ },
27
+ };
28
+ function Overlay(props) {
29
+ const { dataTestId, dataTour, className, appearance, isOverlay, onClick } = props;
30
+ const appearanceConfig = useAppearanceConfig(appearance, overlayConfig);
31
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
32
+ const { fillClass, blurClass, opacityClass } = propsGenerator;
33
+ // @ts-expect-error - TODO: сделать useStyles на ts
34
+ const { styles: overlayStyles } = useStyles(props);
35
+ return (jsx("div", { className: clsx(className, 'overlay', opacityClass && `opacity_${opacityClass}`, blurClass && `blur_${blurClass}`, isOverlay && 'overlay_state_visible', fillClass && `fill_${fillClass}`), "data-test-id": dataTestId, "data-tour": dataTour, style: overlayStyles, onClick: onClick, children: "\u00A0" }));
36
+ }
37
+
38
+ export { Overlay as O, overlayAppearance as a, overlayConfig as o };
@@ -5,7 +5,7 @@ var clsx = require('clsx');
5
5
  var reactScrollbarsCustom = require('react-scrollbars-custom');
6
6
 
7
7
  function Scrollbar(props) {
8
- var className = props.className, noDefaultStyles = props.noDefaultStyles, scrollbarWidth = props.scrollbarWidth, _a = props.scrollHeight, scrollHeight = _a === void 0 ? '200' : _a, onScroll = props.onScroll, children = props.children;
8
+ const { className, noDefaultStyles, scrollbarWidth, scrollHeight = '200', onScroll, children, } = props;
9
9
  return (jsxRuntime.jsx(reactScrollbarsCustom.Scrollbar, { className: clsx('scrollbar', className), contentProps: {
10
10
  className: 'scrollbar__scroll-content',
11
11
  }, noDefaultStyles: noDefaultStyles, scrollbarWidth: scrollbarWidth, scrollerProps: {
@@ -3,7 +3,7 @@ import clsx from 'clsx';
3
3
  import { Scrollbar as Scrollbar$1 } from 'react-scrollbars-custom';
4
4
 
5
5
  function Scrollbar(props) {
6
- var className = props.className, noDefaultStyles = props.noDefaultStyles, scrollbarWidth = props.scrollbarWidth, _a = props.scrollHeight, scrollHeight = _a === void 0 ? '200' : _a, onScroll = props.onScroll, children = props.children;
6
+ const { className, noDefaultStyles, scrollbarWidth, scrollHeight = '200', onScroll, children, } = props;
7
7
  return (jsx(Scrollbar$1, { className: clsx('scrollbar', className), contentProps: {
8
8
  className: 'scrollbar__scroll-content',
9
9
  }, noDefaultStyles: noDefaultStyles, scrollbarWidth: scrollbarWidth, scrollerProps: {
@@ -0,0 +1,69 @@
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
+
9
+ const textAppearanceSize = {
10
+ sizeXXL: {
11
+ size: 'xxl',
12
+ },
13
+ sizeXL: {
14
+ size: 'xl',
15
+ },
16
+ sizeL: {
17
+ size: 'l',
18
+ },
19
+ sizeM: {
20
+ size: 'm',
21
+ },
22
+ sizeS: {
23
+ size: 's',
24
+ },
25
+ sizeXS: {
26
+ size: 'xs',
27
+ },
28
+ sizeXXS: {
29
+ size: 'xxs',
30
+ },
31
+ };
32
+
33
+ const textAppearance = {
34
+ ...textAppearanceSize,
35
+ };
36
+
37
+ const textConfig = {
38
+ appearance: textAppearance,
39
+ setAppearance: (appearanceConfig) => {
40
+ textConfig.appearance = appearanceConfig;
41
+ },
42
+ };
43
+ function Text(props) {
44
+ const { dataTestId, dataTour, className, appearance, isDisabled, cursor, htmlFor, tag: Tag = 'span', before, after, isActive, isSkeleton, onClick, onDoubleClick, children, } = props;
45
+ const appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, textConfig, isDisabled);
46
+ const propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
47
+ const { textColorDisabledClass, textAlignClass, textColorActiveClass, textColorActiveHoverClass, textColorClass, textColorHoverClass, textStyleClass, textTruncateClass, textWeightClass, textWrapClass, cursorClass, sizeClass, widthClass, } = propsGenerator;
48
+ // @ts-expect-error
49
+ const { styles: textStyles } = useStyles.useStyles(props);
50
+ return (jsxRuntime.jsxs(Tag, { className: clsx(className, 'text', sizeClass && `text_size_${sizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, textAlignClass && `text-align_${textAlignClass}`, isDisabled &&
51
+ textColorDisabledClass &&
52
+ `text-color_${textColorDisabledClass}`, !isActive &&
53
+ !isDisabled &&
54
+ textColorClass &&
55
+ `text-color_${textColorClass}`, !isActive &&
56
+ !isDisabled &&
57
+ textColorHoverClass &&
58
+ `text-color_hover_${textColorHoverClass}`, isActive &&
59
+ !isDisabled &&
60
+ textColorActiveHoverClass &&
61
+ `text-color_active_hover_${textColorActiveHoverClass}`, isActive &&
62
+ !isDisabled &&
63
+ textColorActiveClass &&
64
+ `text-color_active_${textColorActiveClass}`, textStyleClass && `text-style_${textStyleClass}`, textWrapClass && `word-wrap_${textWrapClass}`, textTruncateClass && `text-truncate_${textTruncateClass}`, isSkeleton && 'text_skeleton', widthClass && `width_${widthClass}`, cursorClass && `cursor_${cursorClass}`, onClick && (cursor || 'cursor_type_pointer')), "data-test-id": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: textStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before, children, after] }));
65
+ }
66
+
67
+ exports.Text = Text;
68
+ exports.textAppearance = textAppearance;
69
+ exports.textConfig = textConfig;
@@ -0,0 +1,65 @@
1
+ import { jsxs } from 'react/jsx-runtime';
2
+ import clsx from 'clsx';
3
+ import { useAppearanceConfig } from './hooks/useAppearanceConfig/useAppearanceConfig.js';
4
+ import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
5
+ import { useStyles } from './hooks/useStyles/useStyles.js';
6
+
7
+ const textAppearanceSize = {
8
+ sizeXXL: {
9
+ size: 'xxl',
10
+ },
11
+ sizeXL: {
12
+ size: 'xl',
13
+ },
14
+ sizeL: {
15
+ size: 'l',
16
+ },
17
+ sizeM: {
18
+ size: 'm',
19
+ },
20
+ sizeS: {
21
+ size: 's',
22
+ },
23
+ sizeXS: {
24
+ size: 'xs',
25
+ },
26
+ sizeXXS: {
27
+ size: 'xxs',
28
+ },
29
+ };
30
+
31
+ const textAppearance = {
32
+ ...textAppearanceSize,
33
+ };
34
+
35
+ const textConfig = {
36
+ appearance: textAppearance,
37
+ setAppearance: (appearanceConfig) => {
38
+ textConfig.appearance = appearanceConfig;
39
+ },
40
+ };
41
+ function Text(props) {
42
+ const { dataTestId, dataTour, className, appearance, isDisabled, cursor, htmlFor, tag: Tag = 'span', before, after, isActive, isSkeleton, onClick, onDoubleClick, children, } = props;
43
+ const appearanceConfig = useAppearanceConfig(appearance, textConfig, isDisabled);
44
+ const propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
45
+ const { textColorDisabledClass, textAlignClass, textColorActiveClass, textColorActiveHoverClass, textColorClass, textColorHoverClass, textStyleClass, textTruncateClass, textWeightClass, textWrapClass, cursorClass, sizeClass, widthClass, } = propsGenerator;
46
+ // @ts-expect-error
47
+ const { styles: textStyles } = useStyles(props);
48
+ return (jsxs(Tag, { className: clsx(className, 'text', sizeClass && `text_size_${sizeClass}`, textWeightClass && `text-weight_${textWeightClass}`, textAlignClass && `text-align_${textAlignClass}`, isDisabled &&
49
+ textColorDisabledClass &&
50
+ `text-color_${textColorDisabledClass}`, !isActive &&
51
+ !isDisabled &&
52
+ textColorClass &&
53
+ `text-color_${textColorClass}`, !isActive &&
54
+ !isDisabled &&
55
+ textColorHoverClass &&
56
+ `text-color_hover_${textColorHoverClass}`, isActive &&
57
+ !isDisabled &&
58
+ textColorActiveHoverClass &&
59
+ `text-color_active_hover_${textColorActiveHoverClass}`, isActive &&
60
+ !isDisabled &&
61
+ textColorActiveClass &&
62
+ `text-color_active_${textColorActiveClass}`, textStyleClass && `text-style_${textStyleClass}`, textWrapClass && `word-wrap_${textWrapClass}`, textTruncateClass && `text-truncate_${textTruncateClass}`, isSkeleton && 'text_skeleton', widthClass && `width_${widthClass}`, cursorClass && `cursor_${cursorClass}`, onClick && (cursor || 'cursor_type_pointer')), "data-test-id": dataTestId, "data-tour": dataTour, htmlFor: htmlFor, style: textStyles, onClick: onClick, onDoubleClick: onDoubleClick, children: [before, children, after] }));
63
+ }
64
+
65
+ export { Text as T, textAppearance as a, textConfig as t };