@salutejs/plasma-new-hope 0.159.1-canary.1412.11144674561.0 → 0.160.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. package/cjs/components/Drawer/Drawer.css +3 -4
  2. package/cjs/components/Drawer/Drawer.styles.js +0 -3
  3. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  4. package/cjs/components/Modal/Modal.css +3 -4
  5. package/cjs/components/Notification/NotificationsProvider.css +3 -4
  6. package/cjs/components/Popup/Popup.css +3 -0
  7. package/cjs/components/Popup/Popup.js +41 -30
  8. package/cjs/components/Popup/Popup.js.map +1 -1
  9. package/cjs/components/Popup/Popup.styles.js +27 -55
  10. package/cjs/components/Popup/Popup.styles.js.map +1 -1
  11. package/cjs/components/Popup/Popup.styles_141jyqa.css +3 -0
  12. package/cjs/components/Popup/PopupContext.js +10 -32
  13. package/cjs/components/Popup/PopupContext.js.map +1 -1
  14. package/cjs/components/Popup/PopupRoot.js +1 -1
  15. package/cjs/components/Popup/PopupRoot.js.map +1 -1
  16. package/cjs/components/Popup/hooks/usePopup.js +3 -6
  17. package/cjs/components/Popup/hooks/usePopup.js.map +1 -1
  18. package/cjs/components/Steps/Steps.css +18 -0
  19. package/cjs/components/Steps/Steps.js +117 -0
  20. package/cjs/components/Steps/Steps.js.map +1 -0
  21. package/cjs/components/Steps/Steps.styles.js +9 -0
  22. package/cjs/components/Steps/Steps.styles.js.map +1 -0
  23. package/cjs/components/Steps/Steps.styles_1xmqxqu.css +1 -0
  24. package/cjs/components/Steps/Steps.tokens.js +82 -0
  25. package/cjs/components/Steps/Steps.tokens.js.map +1 -0
  26. package/cjs/components/Steps/ui/StepItem/StepItem.css +16 -0
  27. package/cjs/components/Steps/ui/StepItem/StepItem.js +116 -0
  28. package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -0
  29. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +93 -0
  30. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -0
  31. package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  32. package/cjs/components/Steps/utils/getItemStatus.js +27 -0
  33. package/cjs/components/Steps/utils/getItemStatus.js.map +1 -0
  34. package/cjs/components/Steps/variations/_size/base.js +9 -0
  35. package/cjs/components/Steps/variations/_size/base.js.map +1 -0
  36. package/cjs/components/Steps/variations/_size/base_x642ct.css +1 -0
  37. package/cjs/components/Steps/variations/_view/base.js +9 -0
  38. package/cjs/components/Steps/variations/_view/base.js.map +1 -0
  39. package/cjs/components/Steps/variations/_view/base_x642ct.css +1 -0
  40. package/cjs/index.css +15 -4
  41. package/cjs/index.js +5 -0
  42. package/cjs/index.js.map +1 -1
  43. package/emotion/cjs/components/Popup/Popup.js +41 -29
  44. package/emotion/cjs/components/Popup/Popup.styles.js +17 -35
  45. package/emotion/cjs/components/Popup/PopupContext.js +10 -31
  46. package/emotion/cjs/components/Popup/PopupRoot.js +3 -1
  47. package/emotion/cjs/components/Popup/hooks/usePopup.js +3 -6
  48. package/emotion/cjs/components/Steps/Steps.js +129 -0
  49. package/emotion/cjs/components/Steps/Steps.styles.js +9 -0
  50. package/emotion/cjs/components/Steps/Steps.template-doc.mdx +84 -0
  51. package/emotion/cjs/components/Steps/Steps.tokens.js +80 -0
  52. package/emotion/cjs/components/Steps/Steps.types.js +5 -0
  53. package/emotion/cjs/components/Steps/index.js +25 -0
  54. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +126 -0
  55. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +61 -0
  56. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.types.js +5 -0
  57. package/emotion/cjs/components/Steps/ui/StepItem/index.js +12 -0
  58. package/emotion/cjs/components/Steps/ui/index.js +16 -0
  59. package/emotion/cjs/components/Steps/utils/getItemStatus.js +26 -0
  60. package/emotion/cjs/components/Steps/variations/_size/base.js +8 -0
  61. package/emotion/cjs/components/Steps/variations/_size/tokens.json +1 -0
  62. package/emotion/cjs/components/Steps/variations/_view/base.js +8 -0
  63. package/emotion/cjs/components/Steps/variations/_view/tokens.json +1 -0
  64. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  65. package/emotion/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  66. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +25 -0
  67. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.js +11 -0
  68. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +195 -0
  69. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  70. package/emotion/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  71. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +25 -0
  72. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.js +11 -0
  73. package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +195 -0
  74. package/emotion/cjs/index.js +11 -0
  75. package/emotion/es/components/Popup/Popup.js +43 -31
  76. package/emotion/es/components/Popup/Popup.styles.js +16 -34
  77. package/emotion/es/components/Popup/PopupContext.js +11 -32
  78. package/emotion/es/components/Popup/PopupRoot.js +3 -1
  79. package/emotion/es/components/Popup/hooks/usePopup.js +3 -6
  80. package/emotion/es/components/Steps/Steps.js +120 -0
  81. package/emotion/es/components/Steps/Steps.styles.js +3 -0
  82. package/emotion/es/components/Steps/Steps.template-doc.mdx +84 -0
  83. package/emotion/es/components/Steps/Steps.tokens.js +74 -0
  84. package/emotion/es/components/Steps/Steps.types.js +1 -0
  85. package/emotion/es/components/Steps/index.js +2 -0
  86. package/emotion/es/components/Steps/ui/StepItem/StepItem.js +118 -0
  87. package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +54 -0
  88. package/emotion/es/components/Steps/ui/StepItem/StepItem.types.js +1 -0
  89. package/emotion/es/components/Steps/ui/StepItem/index.js +1 -0
  90. package/emotion/es/components/Steps/ui/index.js +1 -0
  91. package/emotion/es/components/Steps/utils/getItemStatus.js +20 -0
  92. package/emotion/es/components/Steps/variations/_size/base.js +2 -0
  93. package/emotion/es/components/Steps/variations/_size/tokens.json +1 -0
  94. package/emotion/es/components/Steps/variations/_view/base.js +2 -0
  95. package/emotion/es/components/Steps/variations/_view/tokens.json +1 -0
  96. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  97. package/emotion/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  98. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +19 -0
  99. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.js +6 -0
  100. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +195 -0
  101. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  102. package/emotion/es/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  103. package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +19 -0
  104. package/emotion/es/examples/plasma_web/components/Steps/Steps.js +6 -0
  105. package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +195 -0
  106. package/emotion/es/index.js +1 -0
  107. package/es/components/Drawer/Drawer.css +3 -4
  108. package/es/components/Drawer/Drawer.styles.js +0 -3
  109. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  110. package/es/components/Modal/Modal.css +3 -4
  111. package/es/components/Notification/NotificationsProvider.css +3 -4
  112. package/es/components/Popup/Popup.css +3 -0
  113. package/es/components/Popup/Popup.js +43 -32
  114. package/es/components/Popup/Popup.js.map +1 -1
  115. package/es/components/Popup/Popup.styles.js +28 -54
  116. package/es/components/Popup/Popup.styles.js.map +1 -1
  117. package/es/components/Popup/Popup.styles_141jyqa.css +3 -0
  118. package/es/components/Popup/PopupContext.js +11 -33
  119. package/es/components/Popup/PopupContext.js.map +1 -1
  120. package/es/components/Popup/PopupRoot.js +1 -1
  121. package/es/components/Popup/PopupRoot.js.map +1 -1
  122. package/es/components/Popup/hooks/usePopup.js +3 -6
  123. package/es/components/Popup/hooks/usePopup.js.map +1 -1
  124. package/es/components/Steps/Steps.css +18 -0
  125. package/es/components/Steps/Steps.js +112 -0
  126. package/es/components/Steps/Steps.js.map +1 -0
  127. package/es/components/Steps/Steps.styles.js +5 -0
  128. package/es/components/Steps/Steps.styles.js.map +1 -0
  129. package/es/components/Steps/Steps.styles_1xmqxqu.css +1 -0
  130. package/es/components/Steps/Steps.tokens.js +77 -0
  131. package/es/components/Steps/Steps.tokens.js.map +1 -0
  132. package/es/components/Steps/ui/StepItem/StepItem.css +16 -0
  133. package/es/components/Steps/ui/StepItem/StepItem.js +112 -0
  134. package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -0
  135. package/es/components/Steps/ui/StepItem/StepItem.styles.js +81 -0
  136. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -0
  137. package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
  138. package/es/components/Steps/utils/getItemStatus.js +23 -0
  139. package/es/components/Steps/utils/getItemStatus.js.map +1 -0
  140. package/es/components/Steps/variations/_size/base.js +5 -0
  141. package/es/components/Steps/variations/_size/base.js.map +1 -0
  142. package/es/components/Steps/variations/_size/base_x642ct.css +1 -0
  143. package/es/components/Steps/variations/_view/base.js +5 -0
  144. package/es/components/Steps/variations/_view/base.js.map +1 -0
  145. package/es/components/Steps/variations/_view/base_x642ct.css +1 -0
  146. package/es/index.css +15 -4
  147. package/es/index.js +2 -0
  148. package/es/index.js.map +1 -1
  149. package/package.json +3 -2
  150. package/styled-components/cjs/components/Popup/Popup.js +41 -29
  151. package/styled-components/cjs/components/Popup/Popup.styles.js +14 -23
  152. package/styled-components/cjs/components/Popup/PopupContext.js +10 -31
  153. package/styled-components/cjs/components/Popup/PopupRoot.js +3 -1
  154. package/styled-components/cjs/components/Popup/hooks/usePopup.js +3 -6
  155. package/styled-components/cjs/components/Steps/Steps.js +129 -0
  156. package/styled-components/cjs/components/Steps/Steps.styles.js +9 -0
  157. package/styled-components/cjs/components/Steps/Steps.template-doc.mdx +84 -0
  158. package/styled-components/cjs/components/Steps/Steps.tokens.js +80 -0
  159. package/styled-components/cjs/components/Steps/Steps.types.js +5 -0
  160. package/styled-components/cjs/components/Steps/index.js +25 -0
  161. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +126 -0
  162. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +52 -0
  163. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.types.js +5 -0
  164. package/styled-components/cjs/components/Steps/ui/StepItem/index.js +12 -0
  165. package/styled-components/cjs/components/Steps/ui/index.js +16 -0
  166. package/styled-components/cjs/components/Steps/utils/getItemStatus.js +26 -0
  167. package/styled-components/cjs/components/Steps/variations/_size/base.js +8 -0
  168. package/styled-components/cjs/components/Steps/variations/_size/tokens.json +1 -0
  169. package/styled-components/cjs/components/Steps/variations/_view/base.js +8 -0
  170. package/styled-components/cjs/components/Steps/variations/_view/tokens.json +1 -0
  171. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  172. package/styled-components/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  173. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +25 -0
  174. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.js +11 -0
  175. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +195 -0
  176. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  177. package/styled-components/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  178. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +25 -0
  179. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.js +11 -0
  180. package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +195 -0
  181. package/styled-components/cjs/index.js +11 -0
  182. package/styled-components/es/components/Popup/Popup.js +43 -31
  183. package/styled-components/es/components/Popup/Popup.styles.js +13 -22
  184. package/styled-components/es/components/Popup/PopupContext.js +11 -32
  185. package/styled-components/es/components/Popup/PopupRoot.js +3 -1
  186. package/styled-components/es/components/Popup/hooks/usePopup.js +3 -6
  187. package/styled-components/es/components/Steps/Steps.js +120 -0
  188. package/styled-components/es/components/Steps/Steps.styles.js +3 -0
  189. package/styled-components/es/components/Steps/Steps.template-doc.mdx +84 -0
  190. package/styled-components/es/components/Steps/Steps.tokens.js +74 -0
  191. package/styled-components/es/components/Steps/Steps.types.js +1 -0
  192. package/styled-components/es/components/Steps/index.js +2 -0
  193. package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +118 -0
  194. package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +45 -0
  195. package/styled-components/es/components/Steps/ui/StepItem/StepItem.types.js +1 -0
  196. package/styled-components/es/components/Steps/ui/StepItem/index.js +1 -0
  197. package/styled-components/es/components/Steps/ui/index.js +1 -0
  198. package/styled-components/es/components/Steps/utils/getItemStatus.js +20 -0
  199. package/styled-components/es/components/Steps/variations/_size/base.js +2 -0
  200. package/styled-components/es/components/Steps/variations/_size/tokens.json +1 -0
  201. package/styled-components/es/components/Steps/variations/_view/base.js +2 -0
  202. package/styled-components/es/components/Steps/variations/_view/tokens.json +1 -0
  203. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  204. package/styled-components/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  205. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +19 -0
  206. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.js +6 -0
  207. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +195 -0
  208. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  209. package/styled-components/es/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  210. package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +19 -0
  211. package/styled-components/es/examples/plasma_web/components/Steps/Steps.js +6 -0
  212. package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +195 -0
  213. package/styled-components/es/index.js +1 -0
  214. package/types/components/Popup/Popup.d.ts +1 -1
  215. package/types/components/Popup/Popup.d.ts.map +1 -1
  216. package/types/components/Popup/Popup.styles.d.ts +1 -4
  217. package/types/components/Popup/Popup.styles.d.ts.map +1 -1
  218. package/types/components/Popup/Popup.types.d.ts +0 -3
  219. package/types/components/Popup/Popup.types.d.ts.map +1 -1
  220. package/types/components/Popup/PopupContext.d.ts.map +1 -1
  221. package/types/components/Popup/hooks/usePopup.d.ts +1 -2
  222. package/types/components/Popup/hooks/usePopup.d.ts.map +1 -1
  223. package/types/components/Steps/Steps.d.ts +21 -0
  224. package/types/components/Steps/Steps.d.ts.map +1 -0
  225. package/types/components/Steps/Steps.styles.d.ts +2 -0
  226. package/types/components/Steps/Steps.styles.d.ts.map +1 -0
  227. package/types/components/Steps/Steps.tokens.d.ts +75 -0
  228. package/types/components/Steps/Steps.tokens.d.ts.map +1 -0
  229. package/types/components/Steps/Steps.types.d.ts +63 -0
  230. package/types/components/Steps/Steps.types.d.ts.map +1 -0
  231. package/types/components/Steps/index.d.ts +4 -0
  232. package/types/components/Steps/index.d.ts.map +1 -0
  233. package/types/components/Steps/ui/StepItem/StepItem.d.ts +17 -0
  234. package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -0
  235. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +32 -0
  236. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -0
  237. package/types/components/Steps/ui/StepItem/StepItem.types.d.ts +36 -0
  238. package/types/components/Steps/ui/StepItem/StepItem.types.d.ts.map +1 -0
  239. package/types/components/Steps/ui/StepItem/index.d.ts +3 -0
  240. package/types/components/Steps/ui/StepItem/index.d.ts.map +1 -0
  241. package/types/components/Steps/ui/index.d.ts +2 -0
  242. package/types/components/Steps/ui/index.d.ts.map +1 -0
  243. package/types/components/Steps/utils/getItemStatus.d.ts +9 -0
  244. package/types/components/Steps/utils/getItemStatus.d.ts.map +1 -0
  245. package/types/components/Steps/variations/_size/base.d.ts +2 -0
  246. package/types/components/Steps/variations/_size/base.d.ts.map +1 -0
  247. package/types/components/Steps/variations/_view/base.d.ts +2 -0
  248. package/types/components/Steps/variations/_view/base.d.ts.map +1 -0
  249. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts +18 -0
  250. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -0
  251. package/types/examples/plasma_b2c/components/Steps/Steps.d.ts +35 -0
  252. package/types/examples/plasma_b2c/components/Steps/Steps.d.ts.map +1 -0
  253. package/types/examples/plasma_web/components/Steps/Steps.config.d.ts +18 -0
  254. package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -0
  255. package/types/examples/plasma_web/components/Steps/Steps.d.ts +35 -0
  256. package/types/examples/plasma_web/components/Steps/Steps.d.ts.map +1 -0
  257. package/types/index.d.ts +1 -0
  258. package/types/index.d.ts.map +1 -1
  259. package/cjs/components/Popup/Popup.styles_1uw5px0.css +0 -4
  260. package/cjs/components/Popup/PopupContext.css +0 -4
  261. package/es/components/Popup/Popup.styles_1uw5px0.css +0 -4
  262. package/es/components/Popup/PopupContext.css +0 -4
@@ -0,0 +1,195 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import type { ComponentProps } from 'react';
3
+ import type { StoryObj, Meta } from '@storybook/react';
4
+ import { disableProps } from '@salutejs/plasma-sb-utils';
5
+
6
+ import { IconMic } from '../../../../components/_Icon';
7
+ import { argTypesFromConfig, WithTheme } from '../../../_helpers';
8
+ import { StepItemProps } from '../../../../components/Steps/ui';
9
+
10
+ import { Steps, mergedConfig } from './Steps';
11
+
12
+ const meta: Meta<typeof Steps> = {
13
+ title: 'plasma_web/Steps',
14
+ decorators: [WithTheme],
15
+ component: Steps,
16
+ argTypes: {
17
+ ...argTypesFromConfig(mergedConfig),
18
+ },
19
+ };
20
+
21
+ export default meta;
22
+
23
+ type Story = StoryObj<ComponentProps<typeof Steps>>;
24
+
25
+ const renderIndicator = ({ status, size }) => {
26
+ let iconSize;
27
+ if (size === 'xs' || size === 's') {
28
+ iconSize = 'xs';
29
+ } else if (status === 'active') {
30
+ iconSize = 's';
31
+ } else {
32
+ iconSize = 'xs';
33
+ }
34
+
35
+ return <IconMic color="inherit" size={iconSize} />;
36
+ };
37
+
38
+ const DefaultStory = (args) => {
39
+ const {
40
+ maxWidth,
41
+ title,
42
+ content,
43
+ size,
44
+ indicatorType,
45
+ quantity,
46
+ hasContent,
47
+ loading,
48
+ disabled,
49
+ simple,
50
+ ...rest
51
+ } = args;
52
+
53
+ const innerTitle = title || 'Title';
54
+
55
+ const [items, setItems] = useState([]);
56
+
57
+ useEffect(() => {
58
+ const newItems = new Array(quantity).fill(null).map((_, index) => {
59
+ const indicator = index + 1;
60
+ const status = index === 0 ? 'active' : 'inactive';
61
+
62
+ if (simple) {
63
+ return {
64
+ indicator,
65
+ status,
66
+ };
67
+ }
68
+
69
+ return {
70
+ title: innerTitle,
71
+ content,
72
+ indicator,
73
+ status,
74
+ };
75
+ });
76
+
77
+ setItems(newItems);
78
+ }, [loading, quantity, simple]);
79
+
80
+ useEffect(() => {
81
+ setItems((curItems) =>
82
+ curItems.map((item, index) => {
83
+ if (indicatorType === 'numbered') {
84
+ return simple
85
+ ? { ...item, indicator: index + 1 }
86
+ : { ...item, title: innerTitle, content, indicator: index + 1 };
87
+ }
88
+
89
+ if (indicatorType === 'bullet') {
90
+ return simple
91
+ ? { ...item, indicator: undefined }
92
+ : { ...item, title: innerTitle, content, indicator: undefined };
93
+ }
94
+
95
+ if (indicatorType === 'icon') {
96
+ return simple
97
+ ? { ...item, indicator: renderIndicator }
98
+ : { ...item, title: innerTitle, content, indicator: renderIndicator };
99
+ }
100
+
101
+ return item;
102
+ }),
103
+ );
104
+ }, [indicatorType, innerTitle, content, simple]);
105
+
106
+ useEffect(() => {
107
+ setItems((curItems) => curItems.map((item) => ({ ...item, disabled })));
108
+ }, [disabled]);
109
+
110
+ const onChange = (item: StepItemProps, index: number, prevIndex: number) => {
111
+ if (prevIndex !== undefined) {
112
+ items[prevIndex].status = 'completed';
113
+ }
114
+
115
+ items[index].status = 'active';
116
+
117
+ setItems([...items]);
118
+ };
119
+
120
+ return (
121
+ <div style={{ maxWidth, height: '400px' }}>
122
+ <Steps
123
+ size={size}
124
+ items={items}
125
+ onChange={onChange}
126
+ hasLoader={loading}
127
+ hasContent={hasContent}
128
+ {...rest}
129
+ />
130
+ </div>
131
+ );
132
+ };
133
+
134
+ export const Default: Story = {
135
+ args: {
136
+ maxWidth: '100%',
137
+ quantity: 6,
138
+ size: 'm',
139
+ title: 'Title',
140
+ content: 'Content',
141
+ contentAlign: 'left',
142
+ indicatorType: 'numbered',
143
+ orientation: 'horizontal',
144
+ hasLine: true,
145
+ hasContent: 'all',
146
+ disabled: false,
147
+ loading: false,
148
+ simple: false,
149
+ },
150
+ argTypes: {
151
+ maxWidth: {
152
+ control: {
153
+ type: 'text',
154
+ },
155
+ },
156
+ size: {
157
+ options: ['xs', 's', 'm', 'l'],
158
+ control: {
159
+ type: 'inline-radio',
160
+ },
161
+ },
162
+ orientation: {
163
+ options: ['horizontal', 'vertical'],
164
+ control: {
165
+ type: 'inline-radio',
166
+ },
167
+ },
168
+ contentAlign: {
169
+ options: ['left', 'center'],
170
+ control: {
171
+ type: 'inline-radio',
172
+ },
173
+ if: { arg: 'orientation', eq: 'horizontal' },
174
+ },
175
+ indicatorType: {
176
+ options: ['numbered', 'bullet', 'icon'],
177
+ control: {
178
+ type: 'inline-radio',
179
+ },
180
+ },
181
+ hasContent: {
182
+ options: ['all', 'active', 'none'],
183
+ control: {
184
+ type: 'inline-radio',
185
+ },
186
+ },
187
+ simple: {
188
+ control: {
189
+ type: 'boolean',
190
+ },
191
+ },
192
+ ...disableProps(['view']),
193
+ },
194
+ render: (args) => <DefaultStory {...args} />,
195
+ };
@@ -50,6 +50,7 @@ export * from './components/Divider';
50
50
  export * from './components/Toolbar';
51
51
  export * from './components/Sheet';
52
52
  export * from './components/Slider';
53
+ export * from './components/Steps';
53
54
  export * from './components/Range';
54
55
  export * from './components/Accordion';
55
56
  export * from './components/DatePicker';
@@ -3,7 +3,7 @@ import { RootProps } from '../../engines/types';
3
3
  import type { PopupPlacement, PopupPositionType, PopupProps } from './Popup.types';
4
4
  export declare const handlePosition: (placement: PopupPlacement, offset: [number, number] | [string, string]) => PopupPositionType;
5
5
  /**
6
- * Базовый компонент Popup.
6
+ * Базовый копмонент Popup.
7
7
  */
8
8
  export declare const popupRoot: (Root: RootProps<HTMLDivElement, PopupProps>) => React.ForwardRefExoticComponent<PopupProps & React.RefAttributes<HTMLDivElement>>;
9
9
  export declare const popupConfig: {
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,KAAK,EAAuB,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAMxG,eAAO,MAAM,cAAc,cACZ,cAAc,UACjB,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5C,iBA8DF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAuFhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBAzFQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;CAgGpE,CAAC"}
1
+ {"version":3,"file":"Popup.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIhD,OAAO,KAAK,EAAuB,cAAc,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAMxG,eAAO,MAAM,cAAc,cACZ,cAAc,UACjB,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,KAC5C,iBA8DF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAyGhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBA3GQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;CAkHpE,CAAC"}
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { PopupRootContainerProps } from './Popup.types';
3
- export declare const StyledPortal: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
4
- hasContent: boolean;
5
- }>;
6
- export declare const StyledPortalContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const StyledPortal: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
7
4
  export declare const PopupView: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
5
  export declare const PopupRootContainer: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & PopupRootContainerProps>;
9
6
  //# sourceMappingURL=Popup.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.styles.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,eAAO,MAAM,YAAY;gBAA4B,OAAO;EAU3D,CAAC;AAEF,eAAO,MAAM,qBAAqB,qKAEjC,CAAC;AAEF,eAAO,MAAM,SAAS,qKAIrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sKAQ9B,CAAC"}
1
+ {"version":3,"file":"Popup.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.styles.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,eAAO,MAAM,YAAY,qKAAe,CAAC;AAEzC,eAAO,MAAM,SAAS,qKAIrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sKAQ9B,CAAC"}
@@ -4,12 +4,10 @@ export declare type PopupPlacementMixed = 'top-right' | 'top-left' | 'bottom-rig
4
4
  export declare type PopupPlacement = PopupPlacementBasic | PopupPlacementMixed;
5
5
  export interface PopupInfo {
6
6
  id: string;
7
- isGlobalPopup?: boolean;
8
7
  info?: Record<string, any>;
9
8
  }
10
9
  export interface PopupContextType {
11
10
  items: PopupInfo[];
12
- rootId: string;
13
11
  register: (info: PopupInfo) => void;
14
12
  unregister: (id: string) => void;
15
13
  }
@@ -74,7 +72,6 @@ export interface PopupRootProps extends Omit<PopupProps, 'opened' | 'isOpen' | '
74
72
  export interface PopupHookArgs extends Pick<PopupProps, 'popupInfo' | 'withAnimation'> {
75
73
  id: string;
76
74
  isOpen: boolean;
77
- isGlobalPopup?: boolean;
78
75
  }
79
76
  export interface PopupRootContainerProps extends Omit<PopupProps, 'opened' | 'isOpen' | 'overlay'> {
80
77
  endTransition?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"Popup.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/Popup.types.ts"],"names":[],"mappings":";AAAA,oBAAY,mBAAmB,GAAG,QAAQ,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AACjF,oBAAY,mBAAmB,GAAG,WAAW,GAAG,UAAU,GAAG,cAAc,GAAG,aAAa,CAAC;AAC5F,oBAAY,cAAc,G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Ae,CAAC;AAGjE,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAiBnD,eAAO,MAAM,eAAe,wBAAiC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAuE/C,CAAC"}
1
+ {"version":3,"file":"PopupContext.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/PopupContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAkD,EAAE,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAI7G,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAEjE,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAcnD,eAAO,MAAM,eAAe,wBAAiC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAmD/C,CAAC"}
@@ -1,10 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import type { PopupAnimationInfo, PopupHookArgs } from '../Popup.types';
3
- export declare const usePopup: ({ isOpen, id, isGlobalPopup, popupInfo, withAnimation }: PopupHookArgs) => {
3
+ export declare const usePopup: ({ isOpen, id, popupInfo, withAnimation }: PopupHookArgs) => {
4
4
  isVisible: boolean;
5
5
  setVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
6
  animationInfo: PopupAnimationInfo;
7
7
  withAnimation: boolean | undefined;
8
- rootId: string;
9
8
  };
10
9
  //# sourceMappingURL=usePopup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePopup.d.ts","sourceRoot":"","sources":["../../../../src/components/Popup/hooks/usePopup.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAYxE,eAAO,MAAM,QAAQ,4DAA6D,aAAa;;;;;;CA4C9F,CAAC"}
1
+ {"version":3,"file":"usePopup.d.ts","sourceRoot":"","sources":["../../../../src/components/Popup/hooks/usePopup.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAYxE,eAAO,MAAM,QAAQ,6CAA8C,aAAa;;;;;CA4C/E,CAAC"}
@@ -0,0 +1,21 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import type { RootPropsOmitOnChange } from '../../engines/types';
3
+ import { StepsProps as BaseStepsProps } from './Steps.types';
4
+ declare type StepsProps = BaseStepsProps & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
5
+ export declare const stepsRoot: (Root: RootPropsOmitOnChange<HTMLDivElement, StepsProps>) => React.ForwardRefExoticComponent<BaseStepsProps & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<HTMLDivElement>>;
6
+ export declare const stepsConfig: {
7
+ name: string;
8
+ tag: string;
9
+ layout: (Root: RootPropsOmitOnChange<HTMLDivElement, StepsProps>) => React.ForwardRefExoticComponent<BaseStepsProps & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<HTMLDivElement>>;
10
+ base: import("@linaria/core").LinariaClassName;
11
+ variations: {
12
+ size: import("@linaria/core").LinariaClassName;
13
+ view: import("@linaria/core").LinariaClassName;
14
+ };
15
+ defaults: {
16
+ view: string;
17
+ size: string;
18
+ };
19
+ };
20
+ export {};
21
+ //# sourceMappingURL=Steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Steps.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAmC,cAAc,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAGjE,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAO7D,aAAK,UAAU,GAAG,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAEpF,eAAO,MAAM,SAAS,SAAU,sBAAsB,cAAc,EAAE,UAAU,CAAC,mJAmF3E,CAAC;AAEP,eAAO,MAAM,WAAW;;;mBArFQ,sBAAsB,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CAkGhF,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const base: import("@linaria/core").LinariaClassName;
2
+ //# sourceMappingURL=Steps.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Steps.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAqChB,CAAC"}
@@ -0,0 +1,75 @@
1
+ export declare const classes: {
2
+ simple: string;
3
+ centered: string;
4
+ active: string;
5
+ inactive: string;
6
+ clickable: string;
7
+ hovered: string;
8
+ disabled: string;
9
+ verticalOrientation: string;
10
+ hasIndicator: string;
11
+ activeItem: string;
12
+ indentDivider: string;
13
+ transparentDivider: string;
14
+ };
15
+ export declare const tokens: {
16
+ indicatorSize: string;
17
+ activeIndicatorSize: string;
18
+ bulletSize: string;
19
+ activeBulletSize: string;
20
+ titlePaddingTop: string;
21
+ contentPaddingTop: string;
22
+ contentPaddingRight: string;
23
+ contentSidePadding: string;
24
+ contentVerticalPadding: string;
25
+ verticalContentPaddingLeft: string;
26
+ smallIndicatorIndentHeight: string;
27
+ largeIndicatorIndentHeight: string;
28
+ smallBulletIndentHeight: string;
29
+ largeBulletIndentHeight: string;
30
+ titleFontFamily: string;
31
+ titleFontSize: string;
32
+ titleFontStyle: string;
33
+ titleFontWeight: string;
34
+ titleLetterSpacing: string;
35
+ titleLineHeight: string;
36
+ contentFontFamily: string;
37
+ contentFontSize: string;
38
+ contentFontStyle: string;
39
+ contentFontWeight: string;
40
+ contentLetterSpacing: string;
41
+ contentLineHeight: string;
42
+ indicatorFontFamily: string;
43
+ indicatorFontSize: string;
44
+ indicatorFontStyle: string;
45
+ indicatorFontWeight: string;
46
+ indicatorLetterSpacing: string;
47
+ indicatorLineHeight: string;
48
+ activeIndicatorFontFamily: string;
49
+ activeIndicatorFontSize: string;
50
+ activeIndicatorFontStyle: string;
51
+ activeIndicatorFontWeight: string;
52
+ activeIndicatorLetterSpacing: string;
53
+ activeIndicatorLineHeight: string;
54
+ activeTitleColor: string;
55
+ activeTitleColorHover: string;
56
+ inactiveTitleColor: string;
57
+ inactiveTitleColorHover: string;
58
+ contentColor: string;
59
+ activeIndicatorBorder: string;
60
+ activeIndicatorBorderHover: string;
61
+ activeIndicatorColor: string;
62
+ activeIndicatorColorHover: string;
63
+ activeIndicatorBackground: string;
64
+ completedIndicatorColor: string;
65
+ completedIndicatorColorHover: string;
66
+ completedIndicatorBackground: string;
67
+ completedIndicatorBackgroundHover: string;
68
+ inactiveIndicatorColor: string;
69
+ inactiveIndicatorColorHover: string;
70
+ inactiveIndicatorBackground: string;
71
+ inactiveIndicatorBackgroundHover: string;
72
+ disabledOpacity: string;
73
+ dividerThickness: string;
74
+ };
75
+ //# sourceMappingURL=Steps.tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Steps.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAanB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyElB,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { StepStatus, StepItemProps } from './ui';
2
+ export declare type StepsContent = 'all' | 'active' | 'none';
3
+ export declare type StepsContentAlign = 'left' | 'center';
4
+ export declare type StepsOrientation = 'horizontal' | 'vertical';
5
+ export interface StepsProps {
6
+ /**
7
+ * Массив шагов
8
+ * @default []
9
+ */
10
+ items?: StepItemProps[];
11
+ /**
12
+ * Размер шага
13
+ */
14
+ size?: string;
15
+ /**
16
+ * Отображение шага
17
+ */
18
+ view?: string;
19
+ /**
20
+ * Ориентация компонента
21
+ * @default 'horizontal'
22
+ */
23
+ orientation?: StepsOrientation;
24
+ /**
25
+ * Выравнивание контента в шагах
26
+ * @default 'left'
27
+ * @description
28
+ * left - выравнивание по левому краю
29
+ * center - выравнивание по центру
30
+ */
31
+ contentAlign?: StepsContentAlign;
32
+ /**
33
+ * Включает разделительную линию
34
+ * @default true
35
+ */
36
+ hasLine?: boolean;
37
+ /**
38
+ * Режим отображения контента
39
+ * @default 'all'
40
+ * @description
41
+ * all - контент у всех элементов
42
+ * active - только у активного
43
+ * none - контент скрыт
44
+ */
45
+ hasContent?: StepsContent;
46
+ /**
47
+ * Отображает лоадер вместо индикатора активного шага.
48
+ */
49
+ hasLoader?: boolean;
50
+ /**
51
+ * Индекс текущего шага, для uncontrolled компонента
52
+ */
53
+ current?: number;
54
+ /**
55
+ * Статус текущего шага, имеет приоритет над item.status
56
+ */
57
+ status?: StepStatus;
58
+ /**
59
+ * Обработчик изменения шага, делает индикаторы и заголовки шагов кликабельными
60
+ */
61
+ onChange?: (item: StepItemProps, index: number, prevIndex?: number) => void;
62
+ }
63
+ //# sourceMappingURL=Steps.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Steps.types.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/Steps.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,MAAM,CAAC;AAEjD,oBAAY,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AACrD,oBAAY,iBAAiB,GAAG,MAAM,GAAG,QAAQ,CAAC;AAClD,oBAAY,gBAAgB,GAAG,YAAY,GAAG,UAAU,CAAC;AAEzD,MAAM,WAAW,UAAU;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B;;;;;;OAMG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/E"}
@@ -0,0 +1,4 @@
1
+ export { stepsConfig, stepsRoot } from './Steps';
2
+ export { tokens as stepsTokens } from './Steps.tokens';
3
+ export type { StepItemProps } from './ui/StepItem/StepItem.types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { StepsContent, StepsContentAlign, StepsOrientation } from '../../Steps.types';
3
+ import type { StepItemProps } from './StepItem.types';
4
+ export declare const StepItem: React.FC<StepItemProps & {
5
+ index: number;
6
+ items: StepItemProps[];
7
+ size: string;
8
+ hasLine?: boolean;
9
+ hasContent?: StepsContent;
10
+ hasLoader?: boolean;
11
+ isFirst?: boolean;
12
+ isLast?: boolean;
13
+ onClick?: (item: StepItemProps, index: number) => void;
14
+ contentAlign?: StepsContentAlign;
15
+ orientation?: StepsOrientation;
16
+ }>;
17
+ //# sourceMappingURL=StepItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/ui/StepItem/StepItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAEtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAqBtD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAC3B,aAAa,GAAG;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,YAAY,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,gBAAgB,CAAC;CAClC,CA2LJ,CAAC"}
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ export declare const SpinnerStyled: import("@linaria/react").StyledComponent<{
3
+ hasIndicator?: boolean | undefined;
4
+ } & (import("../../../../engines/types").PropsType<import("../../../../engines/types").Variants> & ((import("react").HTMLAttributes<HTMLDivElement> & {
5
+ width?: undefined;
6
+ height?: undefined;
7
+ size?: string | undefined;
8
+ view?: string | undefined;
9
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
10
+ width: number;
11
+ height: number;
12
+ size?: undefined;
13
+ view?: string | undefined;
14
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & {
15
+ width: string;
16
+ height: string;
17
+ size?: undefined;
18
+ view?: string | undefined;
19
+ } & import("react").RefAttributes<HTMLDivElement>)))>;
20
+ export declare const StepItemTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
21
+ export declare const StepItemContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
22
+ export declare const BulletIndicatorWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
23
+ export declare const BulletIndicator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
24
+ export declare const Bullet: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown> & {
25
+ as?: import("react").ElementType<any> | undefined;
26
+ }>;
27
+ export declare const StepItemDivider: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
28
+ indentToken?: string | undefined;
29
+ }>;
30
+ export declare const StepItemContentWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
31
+ export declare const StepItemStyled: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
32
+ //# sourceMappingURL=StepItem.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/ui/StepItem/StepItem.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;qDAIzB,CAAC;AAEF,eAAO,MAAM,aAAa,qKAYzB,CAAC;AAEF,eAAO,MAAM,eAAe,qKAc3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,qKAsClC,CAAC;AAEF,eAAO,MAAM,eAAe,qKA+C3B,CAAC;AAEF,eAAO,MAAM,MAAM;;EAYlB,CAAC;AAEF,eAAO,MAAM,eAAe;;EA8B3B,CAAC;AAEF,eAAO,MAAM,sBAAsB,qKAalC,CAAC;AAEF,eAAO,MAAM,cAAc,qKAoF1B,CAAC"}
@@ -0,0 +1,36 @@
1
+ import { ReactNode } from 'react';
2
+ export declare type StepStatus = 'active' | 'inactive' | 'completed';
3
+ declare type StepIndicatorFunc = ({ status, item, size, }: {
4
+ status: StepStatus;
5
+ item: StepItemProps;
6
+ size: string;
7
+ }) => ReactNode;
8
+ export interface StepItemProps {
9
+ /**
10
+ * Заголовок
11
+ */
12
+ title?: string;
13
+ /**
14
+ * Контент, может быть как React компонентом, так и функцией
15
+ */
16
+ content?: string | ReactNode | ((status: StepStatus, index: number, items: StepItemProps[]) => ReactNode);
17
+ /**
18
+ * Индикатор шага, может быть как React компонентом, так и функцией
19
+ */
20
+ indicator?: number | string | ReactNode | StepIndicatorFunc;
21
+ /**
22
+ * Статус шага
23
+ * @description
24
+ * active - активный шаг
25
+ * inactive - не пройденный шаг
26
+ * completed - завершенный шаг
27
+ */
28
+ status?: StepStatus;
29
+ /**
30
+ * Отключенный шаг
31
+ * @default false
32
+ */
33
+ disabled?: boolean;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=StepItem.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepItem.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/ui/StepItem/StepItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,oBAAY,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,CAAC;AAE7D,aAAK,iBAAiB,GAAG,CAAC,EACtB,MAAM,EACN,IAAI,EACJ,IAAI,GACP,EAAE;IACC,MAAM,EAAE,UAAU,CAAC;IACnB,IAAI,EAAE,aAAa,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB,KAAK,SAAS,CAAC;AAEhB,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,SAAS,CAAC,CAAC;IAC1G;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,iBAAiB,CAAC;IAC5D;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
@@ -0,0 +1,3 @@
1
+ export { StepItem } from './StepItem';
2
+ export type { StepItemProps, StepStatus } from './StepItem.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/ui/StepItem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './StepItem';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Steps/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { StepItemProps, StepStatus } from '../ui';
2
+ export declare const getItemStatus: ({ isUncontrolled, current, status, index, item, }: {
3
+ isUncontrolled: boolean;
4
+ current?: number | undefined;
5
+ status?: StepStatus | undefined;
6
+ index: number;
7
+ item: StepItemProps;
8
+ }) => StepStatus;
9
+ //# sourceMappingURL=getItemStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItemStatus.d.ts","sourceRoot":"","sources":["../../../../src/components/Steps/utils/getItemStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,aAAa;oBAON,OAAO;;;WAGhB,MAAM;UACP,aAAa;gBAmBtB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const base: import("@linaria/core").LinariaClassName;
2
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/variations/_size/base.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const base: import("@linaria/core").LinariaClassName;
2
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steps/variations/_view/base.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAAQ,CAAC"}