@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,132 +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 Text = require('./Text_cjs_0EINiUq4.js');
9
- var tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
10
-
11
- var loaderAppearanceAccent = {
12
- accentPrimary: {
13
- fill: 'accentPrimary',
14
- itemFill: 'accentItemPrimary',
15
- },
16
- accentTertiary: {
17
- fill: 'accentTertiary',
18
- itemFill: 'accentItemSecondary',
19
- },
20
- };
21
-
22
- var loaderAppearanceDanger = {
23
- dangerPrimary: {
24
- fill: 'dangerPrimary',
25
- itemFill: 'dangerItemPrimary',
26
- },
27
- };
28
-
29
- var loaderAppearanceError = {
30
- errorPrimary: {
31
- fill: 'errorPrimary',
32
- itemFill: 'errorItemPrimary',
33
- },
34
- };
35
-
36
- var loaderAppearanceInfo = {
37
- infoPrimary: {
38
- fill: 'infoPrimary',
39
- itemFill: 'infoItemPrimary',
40
- },
41
- };
42
-
43
- var loaderAppearancePrimary = {
44
- primaryPrimary: {
45
- fill: 'primaryPrimary',
46
- itemFill: 'primaryItemPrimary',
47
- },
48
- };
49
-
50
- var loaderAppearanceSecondary = {
51
- secondaryPrimary: {
52
- fill: 'secondaryPrimary',
53
- itemFill: 'secondaryItemPrimary',
54
- },
55
- };
56
-
57
- var loaderAppearanceSize = {
58
- sizeL: {
59
- size: 'l',
60
- },
61
- sizeM: {
62
- size: 'm',
63
- },
64
- sizeS: {
65
- size: 's',
66
- },
67
- };
68
-
69
- var loaderAppearanceStyle = {
70
- solid: {
71
- borderColor: 'none',
72
- },
73
- outlined: {
74
- fill: 'none',
75
- },
76
- full: {},
77
- ghost: {
78
- fill: 'none',
79
- borderColor: 'none',
80
- },
81
- };
82
-
83
- var loaderAppearanceSuccess = {
84
- successPrimary: {
85
- fill: 'successPrimary',
86
- itemFill: 'successItemPrimary',
87
- },
88
- };
89
-
90
- var loaderAppearanceSurface = {
91
- surfacePrimary: {
92
- fill: 'surfacePrimary',
93
- itemFill: 'surfaceItemPrimary',
94
- },
95
- surfaceSecondary: {
96
- fill: 'surfaceSecondary',
97
- itemFill: 'surfaceItemPrimary',
98
- },
99
- surfaceTertiary: {
100
- fill: 'surfaceTertiary',
101
- itemFill: 'surfaceItemPrimary',
102
- },
103
- };
104
-
105
- var loaderAppearanceWarning = {
106
- warningPrimary: {
107
- fill: 'warningPrimary',
108
- itemFill: 'warningItemPrimary',
109
- },
110
- };
111
-
112
- var loaderAppearance = 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({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSize), loaderAppearanceSecondary), loaderAppearanceSurface), loaderAppearanceWarning), loaderAppearanceSuccess), loaderAppearanceInfo), loaderAppearanceDanger), loaderAppearanceError), loaderAppearanceStyle);
113
-
114
- var loaderConfig = {
115
- appearance: loaderAppearance,
116
- setAppearance: function (appearanceConfig) {
117
- loaderConfig.appearance = appearanceConfig;
118
- },
119
- };
120
- function Loader(props) {
121
- var className = props.className, _a = props.type, type = _a === void 0 ? 'simple' : _a, appearance = props.appearance, text = props.text, isDisabled = props.isDisabled, isSkeleton = props.isSkeleton, children = props.children;
122
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, loaderConfig, isDisabled);
123
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
124
- var _b = propsGenerator, fillClass = _b.fillClass, textColor = _b.textColor, textSize = _b.textSize, heightClass = _b.heightClass, itemFillClass = _b.itemFillClass, shapeClass = _b.shapeClass, shapeStrengthClass = _b.shapeStrengthClass, sizeClass = _b.sizeClass, widthClass = _b.widthClass; // TODO: сделать нормальные типы для useDevicePropsGenerator
125
- // @ts-expect-error - TODO: сделать useStyles на ts
126
- var loader = useStyles.useStyles(props).styles;
127
- return (jsxRuntime.jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), style: loader, children: [children || (jsxRuntime.jsxs("div", { className: "loader__inner", children: [jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" }), jsxRuntime.jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" })] })), text && (jsxRuntime.jsx(Text.Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
128
- }
129
-
130
- exports.Loader = Loader;
131
- exports.loaderAppearance = loaderAppearance;
132
- exports.loaderConfig = loaderConfig;
@@ -1,128 +0,0 @@
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_CwV9rjFD.js';
7
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
8
-
9
- var loaderAppearanceAccent = {
10
- accentPrimary: {
11
- fill: 'accentPrimary',
12
- itemFill: 'accentItemPrimary',
13
- },
14
- accentTertiary: {
15
- fill: 'accentTertiary',
16
- itemFill: 'accentItemSecondary',
17
- },
18
- };
19
-
20
- var loaderAppearanceDanger = {
21
- dangerPrimary: {
22
- fill: 'dangerPrimary',
23
- itemFill: 'dangerItemPrimary',
24
- },
25
- };
26
-
27
- var loaderAppearanceError = {
28
- errorPrimary: {
29
- fill: 'errorPrimary',
30
- itemFill: 'errorItemPrimary',
31
- },
32
- };
33
-
34
- var loaderAppearanceInfo = {
35
- infoPrimary: {
36
- fill: 'infoPrimary',
37
- itemFill: 'infoItemPrimary',
38
- },
39
- };
40
-
41
- var loaderAppearancePrimary = {
42
- primaryPrimary: {
43
- fill: 'primaryPrimary',
44
- itemFill: 'primaryItemPrimary',
45
- },
46
- };
47
-
48
- var loaderAppearanceSecondary = {
49
- secondaryPrimary: {
50
- fill: 'secondaryPrimary',
51
- itemFill: 'secondaryItemPrimary',
52
- },
53
- };
54
-
55
- var loaderAppearanceSize = {
56
- sizeL: {
57
- size: 'l',
58
- },
59
- sizeM: {
60
- size: 'm',
61
- },
62
- sizeS: {
63
- size: 's',
64
- },
65
- };
66
-
67
- var loaderAppearanceStyle = {
68
- solid: {
69
- borderColor: 'none',
70
- },
71
- outlined: {
72
- fill: 'none',
73
- },
74
- full: {},
75
- ghost: {
76
- fill: 'none',
77
- borderColor: 'none',
78
- },
79
- };
80
-
81
- var loaderAppearanceSuccess = {
82
- successPrimary: {
83
- fill: 'successPrimary',
84
- itemFill: 'successItemPrimary',
85
- },
86
- };
87
-
88
- var loaderAppearanceSurface = {
89
- surfacePrimary: {
90
- fill: 'surfacePrimary',
91
- itemFill: 'surfaceItemPrimary',
92
- },
93
- surfaceSecondary: {
94
- fill: 'surfaceSecondary',
95
- itemFill: 'surfaceItemPrimary',
96
- },
97
- surfaceTertiary: {
98
- fill: 'surfaceTertiary',
99
- itemFill: 'surfaceItemPrimary',
100
- },
101
- };
102
-
103
- var loaderAppearanceWarning = {
104
- warningPrimary: {
105
- fill: 'warningPrimary',
106
- itemFill: 'warningItemPrimary',
107
- },
108
- };
109
-
110
- var loaderAppearance = __assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, loaderAppearanceAccent), loaderAppearancePrimary), loaderAppearanceSize), loaderAppearanceSecondary), loaderAppearanceSurface), loaderAppearanceWarning), loaderAppearanceSuccess), loaderAppearanceInfo), loaderAppearanceDanger), loaderAppearanceError), loaderAppearanceStyle);
111
-
112
- var loaderConfig = {
113
- appearance: loaderAppearance,
114
- setAppearance: function (appearanceConfig) {
115
- loaderConfig.appearance = appearanceConfig;
116
- },
117
- };
118
- function Loader(props) {
119
- var className = props.className, _a = props.type, type = _a === void 0 ? 'simple' : _a, appearance = props.appearance, text = props.text, isDisabled = props.isDisabled, isSkeleton = props.isSkeleton, children = props.children;
120
- var appearanceConfig = useAppearanceConfig(appearance, loaderConfig, isDisabled);
121
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
122
- var _b = propsGenerator, fillClass = _b.fillClass, textColor = _b.textColor, textSize = _b.textSize, heightClass = _b.heightClass, itemFillClass = _b.itemFillClass, shapeClass = _b.shapeClass, shapeStrengthClass = _b.shapeStrengthClass, sizeClass = _b.sizeClass, widthClass = _b.widthClass; // TODO: сделать нормальные типы для useDevicePropsGenerator
123
- // @ts-expect-error - TODO: сделать useStyles на ts
124
- var loader = useStyles(props).styles;
125
- return (jsxs("div", { className: clsx('loader', className, widthClass && "width_".concat(widthClass), heightClass && "height_".concat(heightClass), fillClass && "fill_".concat(fillClass), sizeClass && "loader_size_".concat(sizeClass), isSkeleton && "loader_skeleton", type && "loader_type_".concat(type), shapeClass && "shape_".concat(shapeClass), shapeStrengthClass && "shape-strength_".concat(shapeStrengthClass)), style: loader, children: [children || (jsxs("div", { className: "loader__inner", children: [jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" }), jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" }), jsx("span", { className: clsx('loader__item', itemFillClass && "fill_".concat(itemFillClass)), children: "\u00A0" })] })), text && (jsx(Text, { className: "loader__text", size: textSize, textColor: textColor, children: text }))] }));
126
- }
127
-
128
- export { Loader as L, loaderAppearance as a, loaderConfig as l };
@@ -1,41 +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 tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
9
-
10
- var overlayAppearanceDefault = {
11
- blackout: {
12
- fill: 'black',
13
- opacity: '50',
14
- },
15
- blur: {
16
- fill: 'surfaceQuaternary',
17
- blur: '10',
18
- },
19
- };
20
-
21
- var overlayAppearance = tslib_es6.__assign({}, overlayAppearanceDefault);
22
-
23
- var overlayConfig = {
24
- appearance: overlayAppearance,
25
- setAppearance: function (appearanceConfig) {
26
- overlayConfig.appearance = appearanceConfig;
27
- },
28
- };
29
- function Overlay(props) {
30
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, isOverlay = props.isOverlay, onClick = props.onClick;
31
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, overlayConfig);
32
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
33
- var fillClass = propsGenerator.fillClass, blurClass = propsGenerator.blurClass, opacityClass = propsGenerator.opacityClass;
34
- // @ts-expect-error - TODO: сделать useStyles на ts
35
- var overlayStyles = useStyles.useStyles(props).styles;
36
- return (jsxRuntime.jsx("div", { className: clsx(className, 'overlay', opacityClass && "opacity_".concat(opacityClass), blurClass && "blur_".concat(blurClass), isOverlay && 'overlay_state_visible', fillClass && "fill_".concat(fillClass)), "data-test-id": dataTestId, "data-tour": dataTour, style: overlayStyles, onClick: onClick, children: "\u00A0" }));
37
- }
38
-
39
- exports.Overlay = Overlay;
40
- exports.overlayAppearance = overlayAppearance;
41
- exports.overlayConfig = overlayConfig;
@@ -1,37 +0,0 @@
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
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
7
-
8
- var overlayAppearanceDefault = {
9
- blackout: {
10
- fill: 'black',
11
- opacity: '50',
12
- },
13
- blur: {
14
- fill: 'surfaceQuaternary',
15
- blur: '10',
16
- },
17
- };
18
-
19
- var overlayAppearance = __assign({}, overlayAppearanceDefault);
20
-
21
- var overlayConfig = {
22
- appearance: overlayAppearance,
23
- setAppearance: function (appearanceConfig) {
24
- overlayConfig.appearance = appearanceConfig;
25
- },
26
- };
27
- function Overlay(props) {
28
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, isOverlay = props.isOverlay, onClick = props.onClick;
29
- var appearanceConfig = useAppearanceConfig(appearance, overlayConfig);
30
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
31
- var fillClass = propsGenerator.fillClass, blurClass = propsGenerator.blurClass, opacityClass = propsGenerator.opacityClass;
32
- // @ts-expect-error - TODO: сделать useStyles на ts
33
- var overlayStyles = useStyles(props).styles;
34
- return (jsx("div", { className: clsx(className, 'overlay', opacityClass && "opacity_".concat(opacityClass), blurClass && "blur_".concat(blurClass), isOverlay && 'overlay_state_visible', fillClass && "fill_".concat(fillClass)), "data-test-id": dataTestId, "data-tour": dataTour, style: overlayStyles, onClick: onClick, children: "\u00A0" }));
35
- }
36
-
37
- export { Overlay as O, overlayAppearance as a, overlayConfig as o };
@@ -1,68 +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 tslib_es6 = require('./tslib.es6_cjs_CCZ3TN_7.js');
9
-
10
- var textAppearanceSize = {
11
- sizeXXL: {
12
- size: 'xxl',
13
- },
14
- sizeXL: {
15
- size: 'xl',
16
- },
17
- sizeL: {
18
- size: 'l',
19
- },
20
- sizeM: {
21
- size: 'm',
22
- },
23
- sizeS: {
24
- size: 's',
25
- },
26
- sizeXS: {
27
- size: 'xs',
28
- },
29
- sizeXXS: {
30
- size: 'xxs',
31
- },
32
- };
33
-
34
- var textAppearance = tslib_es6.__assign({}, textAppearanceSize);
35
-
36
- var textConfig = {
37
- appearance: textAppearance,
38
- setAppearance: function (appearanceConfig) {
39
- textConfig.appearance = appearanceConfig;
40
- },
41
- };
42
- function Text(props) {
43
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, cursor = props.cursor, htmlFor = props.htmlFor, _a = props.tag, Tag = _a === void 0 ? 'span' : _a, before = props.before, after = props.after, isActive = props.isActive, isSkeleton = props.isSkeleton, onClick = props.onClick, onDoubleClick = props.onDoubleClick, children = props.children;
44
- var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, textConfig, isDisabled);
45
- var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
46
- var textColorDisabledClass = propsGenerator.textColorDisabledClass, textAlignClass = propsGenerator.textAlignClass, textColorActiveClass = propsGenerator.textColorActiveClass, textColorActiveHoverClass = propsGenerator.textColorActiveHoverClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, textStyleClass = propsGenerator.textStyleClass, textTruncateClass = propsGenerator.textTruncateClass, textWeightClass = propsGenerator.textWeightClass, textWrapClass = propsGenerator.textWrapClass, cursorClass = propsGenerator.cursorClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
47
- // @ts-expect-error
48
- var textStyles = useStyles.useStyles(props).styles;
49
- return (jsxRuntime.jsxs(Tag, { className: clsx(className, 'text', sizeClass && "text_size_".concat(sizeClass), textWeightClass && "text-weight_".concat(textWeightClass), textAlignClass && "text-align_".concat(textAlignClass), isDisabled &&
50
- textColorDisabledClass &&
51
- "text-color_".concat(textColorDisabledClass), !isActive &&
52
- !isDisabled &&
53
- textColorClass &&
54
- "text-color_".concat(textColorClass), !isActive &&
55
- !isDisabled &&
56
- textColorHoverClass &&
57
- "text-color_hover_".concat(textColorHoverClass), isActive &&
58
- !isDisabled &&
59
- textColorActiveHoverClass &&
60
- "text-color_active_hover_".concat(textColorActiveHoverClass), isActive &&
61
- !isDisabled &&
62
- textColorActiveClass &&
63
- "text-color_active_".concat(textColorActiveClass), textStyleClass && "text-style_".concat(textStyleClass), textWrapClass && "word-wrap_".concat(textWrapClass), textTruncateClass && "text-truncate_".concat(textTruncateClass), isSkeleton && 'text_skeleton', widthClass && "width_".concat(widthClass), cursorClass && "cursor_".concat(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] }));
64
- }
65
-
66
- exports.Text = Text;
67
- exports.textAppearance = textAppearance;
68
- exports.textConfig = textConfig;
@@ -1,64 +0,0 @@
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
- import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
7
-
8
- var textAppearanceSize = {
9
- sizeXXL: {
10
- size: 'xxl',
11
- },
12
- sizeXL: {
13
- size: 'xl',
14
- },
15
- sizeL: {
16
- size: 'l',
17
- },
18
- sizeM: {
19
- size: 'm',
20
- },
21
- sizeS: {
22
- size: 's',
23
- },
24
- sizeXS: {
25
- size: 'xs',
26
- },
27
- sizeXXS: {
28
- size: 'xxs',
29
- },
30
- };
31
-
32
- var textAppearance = __assign({}, textAppearanceSize);
33
-
34
- var textConfig = {
35
- appearance: textAppearance,
36
- setAppearance: function (appearanceConfig) {
37
- textConfig.appearance = appearanceConfig;
38
- },
39
- };
40
- function Text(props) {
41
- var dataTestId = props.dataTestId, dataTour = props.dataTour, className = props.className, appearance = props.appearance, isDisabled = props.isDisabled, cursor = props.cursor, htmlFor = props.htmlFor, _a = props.tag, Tag = _a === void 0 ? 'span' : _a, before = props.before, after = props.after, isActive = props.isActive, isSkeleton = props.isSkeleton, onClick = props.onClick, onDoubleClick = props.onDoubleClick, children = props.children;
42
- var appearanceConfig = useAppearanceConfig(appearance, textConfig, isDisabled);
43
- var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
44
- var textColorDisabledClass = propsGenerator.textColorDisabledClass, textAlignClass = propsGenerator.textAlignClass, textColorActiveClass = propsGenerator.textColorActiveClass, textColorActiveHoverClass = propsGenerator.textColorActiveHoverClass, textColorClass = propsGenerator.textColorClass, textColorHoverClass = propsGenerator.textColorHoverClass, textStyleClass = propsGenerator.textStyleClass, textTruncateClass = propsGenerator.textTruncateClass, textWeightClass = propsGenerator.textWeightClass, textWrapClass = propsGenerator.textWrapClass, cursorClass = propsGenerator.cursorClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
45
- // @ts-expect-error
46
- var textStyles = useStyles(props).styles;
47
- return (jsxs(Tag, { className: clsx(className, 'text', sizeClass && "text_size_".concat(sizeClass), textWeightClass && "text-weight_".concat(textWeightClass), textAlignClass && "text-align_".concat(textAlignClass), isDisabled &&
48
- textColorDisabledClass &&
49
- "text-color_".concat(textColorDisabledClass), !isActive &&
50
- !isDisabled &&
51
- textColorClass &&
52
- "text-color_".concat(textColorClass), !isActive &&
53
- !isDisabled &&
54
- textColorHoverClass &&
55
- "text-color_hover_".concat(textColorHoverClass), isActive &&
56
- !isDisabled &&
57
- textColorActiveHoverClass &&
58
- "text-color_active_hover_".concat(textColorActiveHoverClass), isActive &&
59
- !isDisabled &&
60
- textColorActiveClass &&
61
- "text-color_active_".concat(textColorActiveClass), textStyleClass && "text-style_".concat(textStyleClass), textWrapClass && "word-wrap_".concat(textWrapClass), textTruncateClass && "text-truncate_".concat(textTruncateClass), isSkeleton && 'text_skeleton', widthClass && "width_".concat(widthClass), cursorClass && "cursor_".concat(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] }));
62
- }
63
-
64
- export { Text as T, textAppearance as a, textConfig as t };
@@ -1,59 +0,0 @@
1
- 'use strict';
2
-
3
- /******************************************************************************
4
- Copyright (c) Microsoft Corporation.
5
-
6
- Permission to use, copy, modify, and/or distribute this software for any
7
- purpose with or without fee is hereby granted.
8
-
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
- ***************************************************************************** */
17
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
18
-
19
-
20
- exports.__assign = function() {
21
- exports.__assign = Object.assign || function __assign(t) {
22
- for (var s, i = 1, n = arguments.length; i < n; i++) {
23
- s = arguments[i];
24
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
25
- }
26
- return t;
27
- };
28
- return exports.__assign.apply(this, arguments);
29
- };
30
-
31
- function __rest(s, e) {
32
- var t = {};
33
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
34
- t[p] = s[p];
35
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
36
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
37
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
38
- t[p[i]] = s[p[i]];
39
- }
40
- return t;
41
- }
42
-
43
- function __spreadArray(to, from, pack) {
44
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
45
- if (ar || !(i in from)) {
46
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
47
- ar[i] = from[i];
48
- }
49
- }
50
- return to.concat(ar || Array.prototype.slice.call(from));
51
- }
52
-
53
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
54
- var e = new Error(message);
55
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
56
- };
57
-
58
- exports.__rest = __rest;
59
- exports.__spreadArray = __spreadArray;
@@ -1,56 +0,0 @@
1
- /******************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
15
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
16
-
17
-
18
- var __assign = function() {
19
- __assign = Object.assign || function __assign(t) {
20
- for (var s, i = 1, n = arguments.length; i < n; i++) {
21
- s = arguments[i];
22
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
-
29
- function __rest(s, e) {
30
- var t = {};
31
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
32
- t[p] = s[p];
33
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
34
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
35
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
36
- t[p[i]] = s[p[i]];
37
- }
38
- return t;
39
- }
40
-
41
- function __spreadArray(to, from, pack) {
42
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
43
- if (ar || !(i in from)) {
44
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
45
- ar[i] = from[i];
46
- }
47
- }
48
- return to.concat(ar || Array.prototype.slice.call(from));
49
- }
50
-
51
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
52
- var e = new Error(message);
53
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
54
- };
55
-
56
- export { __assign as _, __spreadArray as a, __rest as b };