@salutejs/plasma-new-hope 0.157.1-canary.1412.11127658499.0 → 0.158.0-canary.1443.11125700749.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (246) hide show
  1. package/cjs/components/Drawer/Drawer.css +3 -4
  2. package/cjs/components/Drawer/Drawer.js +1 -1
  3. package/cjs/components/Drawer/Drawer.styles.js +0 -3
  4. package/cjs/components/Drawer/Drawer.styles.js.map +1 -1
  5. package/cjs/components/Drawer/hooks/useDrawer.js +1 -1
  6. package/cjs/components/Modal/Modal.css +3 -4
  7. package/cjs/components/Modal/hooks/useModal.js +1 -1
  8. package/cjs/components/Notification/NotificationsProvider.css +3 -4
  9. package/cjs/components/Popup/Popup.css +3 -0
  10. package/cjs/components/Popup/Popup.js +41 -29
  11. package/cjs/components/Popup/Popup.js.map +1 -1
  12. package/cjs/components/Popup/Popup.styles.js +27 -55
  13. package/cjs/components/Popup/Popup.styles.js.map +1 -1
  14. package/cjs/components/Popup/Popup.styles_141jyqa.css +3 -0
  15. package/cjs/components/Popup/PopupContext.js +10 -30
  16. package/cjs/components/Popup/PopupContext.js.map +1 -1
  17. package/cjs/components/Popup/PopupRoot.js +1 -1
  18. package/cjs/components/Popup/PopupRoot.js.map +1 -1
  19. package/cjs/components/Popup/hooks/usePopup.js +3 -6
  20. package/cjs/components/Popup/hooks/usePopup.js.map +1 -1
  21. package/cjs/components/Steps/Steps.css +18 -0
  22. package/cjs/components/Steps/Steps.js +118 -0
  23. package/cjs/components/Steps/Steps.js.map +1 -0
  24. package/cjs/components/Steps/Steps.styles.js +9 -0
  25. package/cjs/components/Steps/Steps.styles.js.map +1 -0
  26. package/cjs/components/Steps/Steps.styles_1qandre.css +1 -0
  27. package/cjs/components/Steps/Steps.tokens.js +81 -0
  28. package/cjs/components/Steps/Steps.tokens.js.map +1 -0
  29. package/cjs/components/Steps/ui/StepItem/StepItem.css +16 -0
  30. package/cjs/components/Steps/ui/StepItem/StepItem.js +117 -0
  31. package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -0
  32. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +83 -0
  33. package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -0
  34. package/cjs/components/Steps/ui/StepItem/StepItem.styles_1nnkvta.css +9 -0
  35. package/cjs/components/Steps/variations/_size/base.js +9 -0
  36. package/cjs/components/Steps/variations/_size/base.js.map +1 -0
  37. package/cjs/components/Steps/variations/_size/base_x642ct.css +1 -0
  38. package/cjs/components/Steps/variations/_view/base.js +9 -0
  39. package/cjs/components/Steps/variations/_view/base.js.map +1 -0
  40. package/cjs/components/Steps/variations/_view/base_x642ct.css +1 -0
  41. package/cjs/index.css +15 -4
  42. package/cjs/index.js +5 -0
  43. package/cjs/index.js.map +1 -1
  44. package/emotion/cjs/components/Popup/Popup.js +41 -29
  45. package/emotion/cjs/components/Popup/Popup.styles.js +17 -35
  46. package/emotion/cjs/components/Popup/PopupContext.js +10 -30
  47. package/emotion/cjs/components/Popup/PopupRoot.js +3 -1
  48. package/emotion/cjs/components/Popup/hooks/usePopup.js +3 -6
  49. package/emotion/cjs/components/Steps/Steps.js +130 -0
  50. package/emotion/cjs/components/Steps/Steps.review-doc.mdx +304 -0
  51. package/emotion/cjs/components/Steps/Steps.styles.js +9 -0
  52. package/emotion/cjs/components/Steps/Steps.template-doc.mdx +78 -0
  53. package/emotion/cjs/components/Steps/Steps.tokens.js +79 -0
  54. package/emotion/cjs/components/Steps/Steps.types.js +5 -0
  55. package/emotion/cjs/components/Steps/index.js +25 -0
  56. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +127 -0
  57. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +52 -0
  58. package/emotion/cjs/components/Steps/ui/StepItem/StepItem.types.js +5 -0
  59. package/emotion/cjs/components/Steps/ui/StepItem/index.js +12 -0
  60. package/emotion/cjs/components/Steps/ui/index.js +16 -0
  61. package/emotion/cjs/components/Steps/variations/_size/base.js +8 -0
  62. package/emotion/cjs/components/Steps/variations/_size/tokens.json +1 -0
  63. package/emotion/cjs/components/Steps/variations/_view/base.js +8 -0
  64. package/emotion/cjs/components/Steps/variations/_view/tokens.json +1 -0
  65. package/emotion/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  66. package/emotion/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  67. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +25 -0
  68. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.js +13 -0
  69. package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +169 -0
  70. package/emotion/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  71. package/emotion/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  72. package/emotion/cjs/index.js +11 -0
  73. package/emotion/es/components/Popup/Popup.js +43 -30
  74. package/emotion/es/components/Popup/Popup.styles.js +16 -34
  75. package/emotion/es/components/Popup/PopupContext.js +11 -30
  76. package/emotion/es/components/Popup/PopupRoot.js +3 -1
  77. package/emotion/es/components/Popup/hooks/usePopup.js +3 -6
  78. package/emotion/es/components/Steps/Steps.js +121 -0
  79. package/emotion/es/components/Steps/Steps.review-doc.mdx +304 -0
  80. package/emotion/es/components/Steps/Steps.styles.js +3 -0
  81. package/emotion/es/components/Steps/Steps.template-doc.mdx +78 -0
  82. package/emotion/es/components/Steps/Steps.tokens.js +73 -0
  83. package/emotion/es/components/Steps/Steps.types.js +1 -0
  84. package/emotion/es/components/Steps/index.js +2 -0
  85. package/emotion/es/components/Steps/ui/StepItem/StepItem.js +118 -0
  86. package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +45 -0
  87. package/emotion/es/components/Steps/ui/StepItem/StepItem.types.js +1 -0
  88. package/emotion/es/components/Steps/ui/StepItem/index.js +1 -0
  89. package/emotion/es/components/Steps/ui/index.js +1 -0
  90. package/emotion/es/components/Steps/variations/_size/base.js +2 -0
  91. package/emotion/es/components/Steps/variations/_size/tokens.json +1 -0
  92. package/emotion/es/components/Steps/variations/_view/base.js +2 -0
  93. package/emotion/es/components/Steps/variations/_view/tokens.json +1 -0
  94. package/emotion/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  95. package/emotion/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  96. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +19 -0
  97. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.js +9 -0
  98. package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +169 -0
  99. package/emotion/es/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  100. package/emotion/es/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  101. package/emotion/es/index.js +1 -0
  102. package/es/components/Drawer/Drawer.css +3 -4
  103. package/es/components/Drawer/Drawer.js +1 -1
  104. package/es/components/Drawer/Drawer.styles.js +0 -3
  105. package/es/components/Drawer/Drawer.styles.js.map +1 -1
  106. package/es/components/Drawer/hooks/useDrawer.js +1 -1
  107. package/es/components/Modal/Modal.css +3 -4
  108. package/es/components/Modal/hooks/useModal.js +1 -1
  109. package/es/components/Notification/NotificationsProvider.css +3 -4
  110. package/es/components/Popup/Popup.css +3 -0
  111. package/es/components/Popup/Popup.js +43 -31
  112. package/es/components/Popup/Popup.js.map +1 -1
  113. package/es/components/Popup/Popup.styles.js +28 -54
  114. package/es/components/Popup/Popup.styles.js.map +1 -1
  115. package/es/components/Popup/Popup.styles_141jyqa.css +3 -0
  116. package/es/components/Popup/PopupContext.js +11 -31
  117. package/es/components/Popup/PopupContext.js.map +1 -1
  118. package/es/components/Popup/PopupRoot.js +1 -1
  119. package/es/components/Popup/PopupRoot.js.map +1 -1
  120. package/es/components/Popup/hooks/usePopup.js +3 -6
  121. package/es/components/Popup/hooks/usePopup.js.map +1 -1
  122. package/es/components/Steps/Steps.css +18 -0
  123. package/es/components/Steps/Steps.js +113 -0
  124. package/es/components/Steps/Steps.js.map +1 -0
  125. package/es/components/Steps/Steps.styles.js +5 -0
  126. package/es/components/Steps/Steps.styles.js.map +1 -0
  127. package/es/components/Steps/Steps.styles_1qandre.css +1 -0
  128. package/es/components/Steps/Steps.tokens.js +76 -0
  129. package/es/components/Steps/Steps.tokens.js.map +1 -0
  130. package/es/components/Steps/ui/StepItem/StepItem.css +16 -0
  131. package/es/components/Steps/ui/StepItem/StepItem.js +113 -0
  132. package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -0
  133. package/es/components/Steps/ui/StepItem/StepItem.styles.js +71 -0
  134. package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -0
  135. package/es/components/Steps/ui/StepItem/StepItem.styles_1nnkvta.css +9 -0
  136. package/es/components/Steps/variations/_size/base.js +5 -0
  137. package/es/components/Steps/variations/_size/base.js.map +1 -0
  138. package/es/components/Steps/variations/_size/base_x642ct.css +1 -0
  139. package/es/components/Steps/variations/_view/base.js +5 -0
  140. package/es/components/Steps/variations/_view/base.js.map +1 -0
  141. package/es/components/Steps/variations/_view/base_x642ct.css +1 -0
  142. package/es/index.css +15 -4
  143. package/es/index.js +2 -0
  144. package/es/index.js.map +1 -1
  145. package/package.json +2 -2
  146. package/styled-components/cjs/components/Popup/Popup.js +41 -29
  147. package/styled-components/cjs/components/Popup/Popup.styles.js +14 -23
  148. package/styled-components/cjs/components/Popup/PopupContext.js +10 -30
  149. package/styled-components/cjs/components/Popup/PopupRoot.js +3 -1
  150. package/styled-components/cjs/components/Popup/hooks/usePopup.js +3 -6
  151. package/styled-components/cjs/components/Steps/Steps.js +130 -0
  152. package/styled-components/cjs/components/Steps/Steps.review-doc.mdx +304 -0
  153. package/styled-components/cjs/components/Steps/Steps.styles.js +9 -0
  154. package/styled-components/cjs/components/Steps/Steps.template-doc.mdx +78 -0
  155. package/styled-components/cjs/components/Steps/Steps.tokens.js +79 -0
  156. package/styled-components/cjs/components/Steps/Steps.types.js +5 -0
  157. package/styled-components/cjs/components/Steps/index.js +25 -0
  158. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +127 -0
  159. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +43 -0
  160. package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.types.js +5 -0
  161. package/styled-components/cjs/components/Steps/ui/StepItem/index.js +12 -0
  162. package/styled-components/cjs/components/Steps/ui/index.js +16 -0
  163. package/styled-components/cjs/components/Steps/variations/_size/base.js +8 -0
  164. package/styled-components/cjs/components/Steps/variations/_size/tokens.json +1 -0
  165. package/styled-components/cjs/components/Steps/variations/_view/base.js +8 -0
  166. package/styled-components/cjs/components/Steps/variations/_view/tokens.json +1 -0
  167. package/styled-components/cjs/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  168. package/styled-components/cjs/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  169. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +25 -0
  170. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.js +13 -0
  171. package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +169 -0
  172. package/styled-components/cjs/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  173. package/styled-components/cjs/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  174. package/styled-components/cjs/index.js +11 -0
  175. package/styled-components/es/components/Popup/Popup.js +43 -30
  176. package/styled-components/es/components/Popup/Popup.styles.js +13 -22
  177. package/styled-components/es/components/Popup/PopupContext.js +11 -30
  178. package/styled-components/es/components/Popup/PopupRoot.js +3 -1
  179. package/styled-components/es/components/Popup/hooks/usePopup.js +3 -6
  180. package/styled-components/es/components/Steps/Steps.js +121 -0
  181. package/styled-components/es/components/Steps/Steps.review-doc.mdx +304 -0
  182. package/styled-components/es/components/Steps/Steps.styles.js +3 -0
  183. package/styled-components/es/components/Steps/Steps.template-doc.mdx +78 -0
  184. package/styled-components/es/components/Steps/Steps.tokens.js +73 -0
  185. package/styled-components/es/components/Steps/Steps.types.js +1 -0
  186. package/styled-components/es/components/Steps/index.js +2 -0
  187. package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +118 -0
  188. package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +36 -0
  189. package/styled-components/es/components/Steps/ui/StepItem/StepItem.types.js +1 -0
  190. package/styled-components/es/components/Steps/ui/StepItem/index.js +1 -0
  191. package/styled-components/es/components/Steps/ui/index.js +1 -0
  192. package/styled-components/es/components/Steps/variations/_size/base.js +2 -0
  193. package/styled-components/es/components/Steps/variations/_size/tokens.json +1 -0
  194. package/styled-components/es/components/Steps/variations/_view/base.js +2 -0
  195. package/styled-components/es/components/Steps/variations/_view/tokens.json +1 -0
  196. package/styled-components/es/examples/plasma_b2c/components/Modal/Modal.stories.tsx +0 -3
  197. package/styled-components/es/examples/plasma_b2c/components/Popup/Popup.stories.tsx +0 -3
  198. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +19 -0
  199. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.js +9 -0
  200. package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +169 -0
  201. package/styled-components/es/examples/plasma_web/components/Modal/Modal.stories.tsx +0 -3
  202. package/styled-components/es/examples/plasma_web/components/Popup/Popup.stories.tsx +0 -3
  203. package/styled-components/es/index.js +1 -0
  204. package/types/components/Popup/Popup.d.ts +1 -1
  205. package/types/components/Popup/Popup.d.ts.map +1 -1
  206. package/types/components/Popup/Popup.styles.d.ts +1 -4
  207. package/types/components/Popup/Popup.styles.d.ts.map +1 -1
  208. package/types/components/Popup/Popup.types.d.ts +0 -3
  209. package/types/components/Popup/Popup.types.d.ts.map +1 -1
  210. package/types/components/Popup/PopupContext.d.ts.map +1 -1
  211. package/types/components/Popup/hooks/usePopup.d.ts +1 -2
  212. package/types/components/Popup/hooks/usePopup.d.ts.map +1 -1
  213. package/types/components/Steps/Steps.d.ts +23 -0
  214. package/types/components/Steps/Steps.d.ts.map +1 -0
  215. package/types/components/Steps/Steps.styles.d.ts +2 -0
  216. package/types/components/Steps/Steps.styles.d.ts.map +1 -0
  217. package/types/components/Steps/Steps.tokens.d.ts +74 -0
  218. package/types/components/Steps/Steps.tokens.d.ts.map +1 -0
  219. package/types/components/Steps/Steps.types.d.ts +55 -0
  220. package/types/components/Steps/Steps.types.d.ts.map +1 -0
  221. package/types/components/Steps/index.d.ts +4 -0
  222. package/types/components/Steps/index.d.ts.map +1 -0
  223. package/types/components/Steps/ui/StepItem/StepItem.d.ts +17 -0
  224. package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -0
  225. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +20 -0
  226. package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -0
  227. package/types/components/Steps/ui/StepItem/StepItem.types.d.ts +35 -0
  228. package/types/components/Steps/ui/StepItem/StepItem.types.d.ts.map +1 -0
  229. package/types/components/Steps/ui/StepItem/index.d.ts +3 -0
  230. package/types/components/Steps/ui/StepItem/index.d.ts.map +1 -0
  231. package/types/components/Steps/ui/index.d.ts +2 -0
  232. package/types/components/Steps/ui/index.d.ts.map +1 -0
  233. package/types/components/Steps/variations/_size/base.d.ts +2 -0
  234. package/types/components/Steps/variations/_size/base.d.ts.map +1 -0
  235. package/types/components/Steps/variations/_view/base.d.ts +2 -0
  236. package/types/components/Steps/variations/_view/base.d.ts.map +1 -0
  237. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts +18 -0
  238. package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -0
  239. package/types/examples/plasma_b2c/components/Steps/Steps.d.ts +35 -0
  240. package/types/examples/plasma_b2c/components/Steps/Steps.d.ts.map +1 -0
  241. package/types/index.d.ts +1 -0
  242. package/types/index.d.ts.map +1 -1
  243. package/cjs/components/Popup/Popup.styles_1uw5px0.css +0 -4
  244. package/cjs/components/Popup/PopupContext.css +0 -4
  245. package/es/components/Popup/Popup.styles_1uw5px0.css +0 -4
  246. package/es/components/Popup/PopupContext.css +0 -4
@@ -2,27 +2,9 @@ import _styled from "@emotion/styled/base";
2
2
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
3
  import { DEFAULT_Z_INDEX } from './utils';
4
4
  export var StyledPortal = /*#__PURE__*/_styled("div", {
5
- target: "eaqy7mk3",
6
- label: "plasma-new-hope__StyledPortal"
7
- })("position:fixed;top:0;left:0;right:0;bottom:0;z-index:", DEFAULT_Z_INDEX, ";width:", function (_ref) {
8
- var hasContent = _ref.hasContent;
9
- return hasContent ? 'auto' : '0';
10
- }, ";pointer-events:", function (_ref2) {
11
- var hasContent = _ref2.hasContent;
12
- return hasContent ? 'auto' : 'none';
13
- }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUG9wdXAvUG9wdXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUsrRCIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL1BvcHVwL1BvcHVwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHR5cGUgeyBQb3B1cFJvb3RDb250YWluZXJQcm9wcyB9IGZyb20gJy4vUG9wdXAudHlwZXMnO1xuaW1wb3J0IHsgREVGQVVMVF9aX0lOREVYIH0gZnJvbSAnLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRQb3J0YWwgPSBzdHlsZWQuZGl2PHsgaGFzQ29udGVudDogYm9vbGVhbiB9PmBcbiAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgdG9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c2l0aW9uIH0pID0+IHBvc2l0aW9uLnRyYW5zZm9ybSB8fCAnJ307XG5gO1xuIl19 */"));
14
- export var StyledPortalContainer = /*#__PURE__*/_styled("div", {
15
5
  target: "eaqy7mk2",
16
- label: "plasma-new-hope__StyledPortalContainer"
17
- })(process.env.NODE_ENV === "production" ? {
18
- name: "k2uqvh",
19
- styles: "width:0"
20
- } : {
21
- name: "k2uqvh",
22
- styles: "width:0",
23
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUG9wdXAvUG9wdXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCK0MiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9Qb3B1cC9Qb3B1cC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB0eXBlIHsgUG9wdXBSb290Q29udGFpbmVyUHJvcHMgfSBmcm9tICcuL1BvcHVwLnR5cGVzJztcbmltcG9ydCB7IERFRkFVTFRfWl9JTkRFWCB9IGZyb20gJy4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkUG9ydGFsID0gc3R5bGVkLmRpdjx7IGhhc0NvbnRlbnQ6IGJvb2xlYW4gfT5gXG4gICAgcG9zaXRpb246IGZpeGVkO1xuICAgIHRvcDogMDtcbiAgICBsZWZ0OiAwO1xuICAgIHJpZ2h0OiAwO1xuICAgIGJvdHRvbTogMDtcbiAgICB6LWluZGV4OiAke0RFRkFVTFRfWl9JTkRFWH07XG5cbiAgICB3aWR0aDogJHsoeyBoYXNDb250ZW50IH0pID0+IChoYXNDb250ZW50ID8gJ2F1dG8nIDogJzAnKX07XG4gICAgcG9pbnRlci1ldmVudHM6ICR7KHsgaGFzQ29udGVudCB9KSA9PiAoaGFzQ29udGVudCA/ICdhdXRvJyA6ICdub25lJyl9O1xuYDtcblxuZXhwb3J0IGNvbnN0IFN0eWxlZFBvcnRhbENvbnRhaW5lciA9IHN0eWxlZC5kaXZgXG4gICAgd2lkdGg6IDA7XG5gO1xuXG5leHBvcnQgY29uc3QgUG9wdXBWaWV3ID0gc3R5bGVkLmRpdmBcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgbWF4LXdpZHRoOiAxMDAlO1xuICAgIHBvaW50ZXItZXZlbnRzOiBhbGw7XG5gO1xuXG5leHBvcnQgY29uc3QgUG9wdXBSb290Q29udGFpbmVyID0gc3R5bGVkLmRpdjxQb3B1cFJvb3RDb250YWluZXJQcm9wcz5gXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCBERUZBVUxUX1pfSU5ERVh9O1xuICAgIGxlZnQ6ICR7KHsgcG9zaXRpb24gfSkgPT4gcG9zaXRpb24ubGVmdCB8fCAnJ307XG4gICAgcmlnaHQ6ICR7KHsgcG9zaXRpb24gfSkgPT4gcG9zaXRpb24ucmlnaHQgfHwgJyd9O1xuICAgIHRvcDogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi50b3AgfHwgJyd9O1xuICAgIGJvdHRvbTogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi5ib3R0b20gfHwgJyd9O1xuICAgIHRyYW5zZm9ybTogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi50cmFuc2Zvcm0gfHwgJyd9O1xuYDtcbiJdfQ== */",
24
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
25
- });
6
+ label: "plasma-new-hope__StyledPortal"
7
+ })(process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJz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B8fCAnJ307XG4gICAgYm90dG9tOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLmJvdHRvbSB8fCAnJ307XG4gICAgdHJhbnNmb3JtOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLnRyYW5zZm9ybSB8fCAnJ307XG5gO1xuIl19 */");
26
8
  export var PopupView = /*#__PURE__*/_styled("div", {
27
9
  target: "eaqy7mk1",
28
10
  label: "plasma-new-hope__PopupView"
@@ -32,28 +14,28 @@ export var PopupView = /*#__PURE__*/_styled("div", {
32
14
  } : {
33
15
  name: "1m82nn4",
34
16
  styles: "position:relative;max-width:100%;pointer-events:all",
35
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUG9wdXAvUG9wdXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCbUMiLCJmaWxlIjoiLi4vLi4vLi4vLi4vc3JjLWVtb3Rpb24vY29tcG9uZW50cy9Qb3B1cC9Qb3B1cC5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5cbmltcG9ydCB0eXBlIHsgUG9wdXBSb290Q29udGFpbmVyUHJvcHMgfSBmcm9tICcuL1BvcHVwLnR5cGVzJztcbmltcG9ydCB7IERFRkFVTFRfWl9JTkRFWCB9IGZyb20gJy4vdXRpbHMnO1xuXG5leHBvcnQgY29uc3QgU3R5bGVkUG9ydGFsID0gc3R5bGVkLmRpdjx7IGhhc0NvbnRlbnQ6IGJvb2xlYW4gfT5gXG4gICAgcG9zaXRpb246IGZpeGVkO1xuICAgIHRvcDogMDtcbiAgICBsZWZ0OiAwO1xuICAgIHJpZ2h0OiAwO1xuICAgIGJvdHRvbTogMDtcbiAgICB6LW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IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLnRvcCB8fCAnJ307XG4gICAgYm90dG9tOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLmJvdHRvbSB8fCAnJ307XG4gICAgdHJhbnNmb3JtOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLnRyYW5zZm9ybSB8fCAnJ307XG5gO1xuIl19 */",
36
18
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
37
19
  });
38
20
  export var PopupRootContainer = /*#__PURE__*/_styled("div", {
39
21
  target: "eaqy7mk0",
40
22
  label: "plasma-new-hope__PopupRootContainer"
41
- })("position:absolute;z-index:", function (_ref3) {
42
- var zIndex = _ref3.zIndex;
23
+ })("position:absolute;z-index:", function (_ref) {
24
+ var zIndex = _ref.zIndex;
43
25
  return zIndex || DEFAULT_Z_INDEX;
44
- }, ";left:", function (_ref4) {
45
- var position = _ref4.position;
26
+ }, ";left:", function (_ref2) {
27
+ var position = _ref2.position;
46
28
  return position.left || '';
47
- }, ";right:", function (_ref5) {
48
- var position = _ref5.position;
29
+ }, ";right:", function (_ref3) {
30
+ var position = _ref3.position;
49
31
  return position.right || '';
50
- }, ";top:", function (_ref6) {
51
- var position = _ref6.position;
32
+ }, ";top:", function (_ref4) {
33
+ var position = _ref4.position;
52
34
  return position.top || '';
53
- }, ";bottom:", function (_ref7) {
54
- var position = _ref7.position;
35
+ }, ";bottom:", function (_ref5) {
36
+ var position = _ref5.position;
55
37
  return position.bottom || '';
56
- }, ";transform:", function (_ref8) {
57
- var position = _ref8.position;
38
+ }, ";transform:", function (_ref6) {
39
+ var position = _ref6.position;
58
40
  return position.transform || '';
59
- }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUG9wdXAvUG9wdXAuc3R5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Q29udGFpbmVyID0gc3R5bGVkLmRpdjxQb3B1cFJvb3RDb250YWluZXJQcm9wcz5gXG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHotaW5kZXg6ICR7KHsgekluZGV4IH0pID0+IHpJbmRleCB8fCBERUZBVUxUX1pfSU5ERVh9O1xuICAgIGxlZnQ6ICR7KHsgcG9zaXRpb24gfSkgPT4gcG9zaXRpb24ubGVmdCB8fCAnJ307XG4gICAgcmlnaHQ6ICR7KHsgcG9zaXRpb24gfSkgPT4gcG9zaXRpb24ucmlnaHQgfHwgJyd9O1xuICAgIHRvcDogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi50b3AgfHwgJyd9O1xuICAgIGJvdHRvbTogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi5ib3R0b20gfHwgJyd9O1xuICAgIHRyYW5zZm9ybTogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi50cmFuc2Zvcm0gfHwgJyd9O1xuYDtcbiJdfQ== */"));
41
+ }, ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy1lbW90aW9uL2NvbXBvbmVudHMvUG9wdXAvUG9wdXAuc3R5bGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFxRSIsImZpbGUiOiIuLi8uLi8uLi8uLi9zcmMtZW1vdGlvbi9jb21wb25lbnRzL1BvcHVwL1BvcHVwLnN0eWxlcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcblxuaW1wb3J0IHR5cGUgeyBQb3B1cFJvb3RDb250YWluZXJQcm9wcyB9IGZyb20gJy4vUG9wdXAudHlwZXMnO1xuaW1wb3J0IHsgREVGQVVMVF9aX0lOREVYIH0gZnJvbSAnLi91dGlscyc7XG5cbmV4cG9ydCBjb25zdCBTdHlsZWRQb3J0YWwgPSBzdHlsZWQuZGl2YGA7XG5cbmV4cG9ydCBjb25zdCBQb3B1cFZpZXcgPSBzdHlsZWQuZGl2YFxuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICBtYXgtd2lkdGg6IDEwMCU7XG4gICAgcG9pbnRlci1ldmVudHM6IGFsbDtcbmA7XG5cbmV4cG9ydCBjb25zdCBQb3B1cFJvb3RDb250YWluZXIgPSBzdHlsZWQuZGl2PFBvcHVwUm9vdENvbnRhaW5lclByb3BzPmBcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgei1pbmRleDogJHsoeyB6SW5kZXggfSkgPT4gekluZGV4IHx8IERFRkFVTFRfWl9JTkRFWH07XG4gICAgbGVmdDogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi5sZWZ0IHx8ICcnfTtcbiAgICByaWdodDogJHsoeyBwb3NpdGlvbiB9KSA9PiBwb3NpdGlvbi5yaWdodCB8fCAnJ307XG4gICAgdG9wOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLnRvcCB8fCAnJ307XG4gICAgYm90dG9tOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLmJvdHRvbSB8fCAnJ307XG4gICAgdHJhbnNmb3JtOiAkeyh7IHBvc2l0aW9uIH0pID0+IHBvc2l0aW9uLnRyYW5zZm9ybSB8fCAnJ307XG5gO1xuIl19 */"));
@@ -8,21 +8,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
9
9
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import React, { createContext, useState, useContext, useRef } from 'react';
12
- import ReactDOM from 'react-dom';
11
+ import React, { createContext, useEffect, useState, useContext, useRef } from 'react';
13
12
  import { hasModals } from '../Modal/ModalContext';
14
- import { canUseDOM, safeUseId } from '../../utils';
15
- import { StyledPortal } from './Popup.styles';
16
13
  export var POPUP_PORTAL_ID = 'plasma-popup-root';
17
14
  var items = [];
18
15
  var PopupContext = /*#__PURE__*/createContext({
19
16
  items: items,
20
- rootId: POPUP_PORTAL_ID,
21
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
22
17
  register: function register(_info) {
23
18
  throw new Error('Function not implemented. Add PopupProvider');
24
19
  },
25
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
26
20
  unregister: function unregister(_id) {
27
21
  throw new Error('Function not implemented. Add PopupProvider');
28
22
  }
@@ -32,46 +26,29 @@ export var usePopupContext = function usePopupContext() {
32
26
  };
33
27
  export var PopupProvider = function PopupProvider(_ref) {
34
28
  var children = _ref.children;
35
- var globalItemsCount = useRef(0);
36
- var prevBodyOverflowY = useRef(canUseDOM ? document.body.style.overflowY : '');
37
- // eslint-disable-next-line no-shadow
29
+ var prevBodyOverflowY = useRef(typeof document !== 'undefined' ? document.body.style.overflowY : '');
38
30
  var _useState = useState([]),
39
31
  _useState2 = _slicedToArray(_useState, 2),
40
32
  items = _useState2[0],
41
33
  setItems = _useState2[1];
42
- var uuid = safeUseId();
43
- var rootId = "".concat(POPUP_PORTAL_ID, "-").concat(uuid);
44
34
  var register = function register(info) {
45
- if (!canUseDOM) {
46
- return;
47
- }
48
35
  setItems(function (prevItems) {
49
36
  var _info$info;
50
37
  if ((_info$info = info.info) !== null && _info$info !== void 0 && _info$info.isModal && !hasModals(prevItems)) {
51
38
  prevBodyOverflowY.current = document.body.style.overflowY;
52
39
  document.body.style.overflowY = 'hidden';
53
40
  }
54
- if (info.isGlobalPopup) {
55
- globalItemsCount.current += 1;
56
- }
57
41
  return [].concat(_toConsumableArray(prevItems), [info]);
58
42
  });
59
43
  };
60
44
  var unregister = function unregister(id) {
61
- if (!canUseDOM) {
62
- return;
63
- }
64
45
  setItems(function (prevItems) {
65
- var _prevItems$index;
66
46
  var index = prevItems.findIndex(function (item) {
67
47
  return id === item.id;
68
48
  });
69
49
  if (index === -1) {
70
50
  return prevItems;
71
51
  }
72
- if (prevItems !== null && prevItems !== void 0 && (_prevItems$index = prevItems[index]) !== null && _prevItems$index !== void 0 && _prevItems$index.isGlobalPopup) {
73
- globalItemsCount.current -= 1;
74
- }
75
52
  var prevHasModals = hasModals(prevItems);
76
53
  prevItems.splice(index, 1);
77
54
  if (prevHasModals && !hasModals(prevItems)) {
@@ -84,14 +61,18 @@ export var PopupProvider = function PopupProvider(_ref) {
84
61
  };
85
62
  var context = {
86
63
  items: items,
87
- rootId: rootId,
88
64
  register: register,
89
65
  unregister: unregister
90
66
  };
67
+ useEffect(function () {
68
+ return function () {
69
+ var portal = document.createElement('div');
70
+ if (portal && document.body.contains(portal)) {
71
+ document.body.removeChild(portal);
72
+ }
73
+ };
74
+ }, []);
91
75
  return /*#__PURE__*/React.createElement(PopupContext.Provider, {
92
76
  value: context
93
- }, children, /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(StyledPortal, {
94
- id: rootId,
95
- hasContent: globalItemsCount.current > 0
96
- }), document.body));
77
+ }, children);
97
78
  };
@@ -1,4 +1,4 @@
1
- var _excluded = ["id", "placement", "offset", "setVisible", "children", "role", "zIndex", "animationInfo"];
1
+ var _excluded = ["id", "placement", "offset", "frame", "setVisible", "children", "role", "zIndex", "animationInfo", "className"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -16,11 +16,13 @@ export var PopupRoot = /*#__PURE__*/forwardRef(function (_ref, ref) {
16
16
  var id = _ref.id,
17
17
  placement = _ref.placement,
18
18
  offset = _ref.offset,
19
+ frame = _ref.frame,
19
20
  setVisible = _ref.setVisible,
20
21
  children = _ref.children,
21
22
  role = _ref.role,
22
23
  zIndex = _ref.zIndex,
23
24
  animationInfo = _ref.animationInfo,
25
+ className = _ref.className,
24
26
  rest = _objectWithoutProperties(_ref, _excluded);
25
27
  var contentRef = useRef(null);
26
28
  var innerRef = useForkRef(contentRef, ref);
@@ -13,7 +13,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import { useEffect, useState } from 'react';
14
14
  import { usePopupContext } from '../PopupContext';
15
15
 
16
- // Хук для подключения анимации
16
+ // Хук для поключения анимации
17
17
  var usePopupAnimation = function usePopupAnimation() {
18
18
  var _useState = useState(false),
19
19
  _useState2 = _slicedToArray(_useState, 2),
@@ -35,7 +35,6 @@ var usePopupAnimation = function usePopupAnimation() {
35
35
  export var usePopup = function usePopup(_ref) {
36
36
  var isOpen = _ref.isOpen,
37
37
  id = _ref.id,
38
- isGlobalPopup = _ref.isGlobalPopup,
39
38
  popupInfo = _ref.popupInfo,
40
39
  withAnimation = _ref.withAnimation;
41
40
  var _useState5 = useState(false),
@@ -57,8 +56,7 @@ export var usePopup = function usePopup(_ref) {
57
56
  // при первом открытии
58
57
  if (isOpen && !isVisible) {
59
58
  popupController.register(_objectSpread({
60
- id: id,
61
- isGlobalPopup: isGlobalPopup
59
+ id: id
62
60
  }, popupInfo));
63
61
  setVisible(true);
64
62
  animationInfo.setEndAnimation(false);
@@ -87,7 +85,6 @@ export var usePopup = function usePopup(_ref) {
87
85
  isVisible: isVisible,
88
86
  setVisible: setVisible,
89
87
  animationInfo: animationInfo,
90
- withAnimation: withAnimation,
91
- rootId: popupController.rootId
88
+ withAnimation: withAnimation
92
89
  };
93
90
  };
@@ -0,0 +1,121 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["size", "orientation", "contentAlign", "hasLine", "hasContent", "hasLoader", "items", "onChange", "current", "status"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
14
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
15
+ import React, { forwardRef, useState, useEffect } from 'react';
16
+ import cls from 'classnames';
17
+ import { classes } from './Steps.tokens';
18
+ import { base } from './Steps.styles';
19
+ import { StepItem } from './ui';
20
+ import { base as sizeCSS } from './variations/_size/base';
21
+ import { base as viewCSS } from './variations/_view/base';
22
+ export var stepsRoot = function stepsRoot(Root) {
23
+ return /*#__PURE__*/forwardRef(function (props, outerRef) {
24
+ var _props$size = props.size,
25
+ size = _props$size === void 0 ? 's' : _props$size,
26
+ _props$orientation = props.orientation,
27
+ orientation = _props$orientation === void 0 ? 'horizontal' : _props$orientation,
28
+ _props$contentAlign = props.contentAlign,
29
+ contentAlign = _props$contentAlign === void 0 ? 'left' : _props$contentAlign,
30
+ _props$hasLine = props.hasLine,
31
+ hasLine = _props$hasLine === void 0 ? true : _props$hasLine,
32
+ _props$hasContent = props.hasContent,
33
+ hasContent = _props$hasContent === void 0 ? 'all' : _props$hasContent,
34
+ hasLoader = props.hasLoader,
35
+ _props$items = props.items,
36
+ items = _props$items === void 0 ? [] : _props$items,
37
+ onChange = props.onChange,
38
+ current = props.current,
39
+ status = props.status,
40
+ rest = _objectWithoutProperties(props, _excluded);
41
+ var _useState = useState(),
42
+ _useState2 = _slicedToArray(_useState, 2),
43
+ prevIndex = _useState2[0],
44
+ setPrevIndex = _useState2[1];
45
+ var isUncontrolled = current !== undefined;
46
+ var hasIndicator = items.some(function (item) {
47
+ return item.indicator != null;
48
+ });
49
+ var isSimple = items.every(function (item) {
50
+ return !item.title && !item.content;
51
+ });
52
+ useEffect(function () {
53
+ return function () {
54
+ if (current !== undefined) {
55
+ setPrevIndex(current);
56
+ } else {
57
+ var index = items.findIndex(function (item) {
58
+ return item.status === 'active';
59
+ });
60
+ setPrevIndex(index !== -1 ? index : undefined);
61
+ }
62
+ };
63
+ }, [current, items]);
64
+ return /*#__PURE__*/React.createElement(Root, _extends({
65
+ size: size,
66
+ view: "default",
67
+ ref: outerRef,
68
+ className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, orientation === 'vertical'), classes.simple, isSimple), classes.hasIndicator, hasIndicator))
69
+ }, rest), items.map(function (item, index) {
70
+ var itemStatus = 'inactive';
71
+ if (isUncontrolled) {
72
+ if (current > index) {
73
+ itemStatus = 'completed';
74
+ } else if (current === index) {
75
+ itemStatus = status || 'active';
76
+ }
77
+ } else {
78
+ itemStatus = status || item.status || 'inactive';
79
+ }
80
+ if (item.disabled) {
81
+ itemStatus = 'inactive';
82
+ }
83
+ var isActive = itemStatus === 'active';
84
+ var content = item.content;
85
+ if (hasContent === 'active' && !isActive || hasContent === 'none') {
86
+ content = '';
87
+ }
88
+ return /*#__PURE__*/React.createElement(StepItem, {
89
+ key: index,
90
+ index: index,
91
+ title: item.title,
92
+ content: content,
93
+ indicator: item.indicator,
94
+ status: itemStatus,
95
+ size: size,
96
+ orientation: orientation,
97
+ contentAlign: orientation === 'horizontal' ? contentAlign : 'left',
98
+ hasLine: hasLine,
99
+ hasLoader: hasLoader && isActive,
100
+ onClick: onChange ? function () {
101
+ return onChange(item, index, prevIndex);
102
+ } : undefined,
103
+ items: items
104
+ });
105
+ }));
106
+ });
107
+ };
108
+ export var stepsConfig = {
109
+ name: 'Steps',
110
+ tag: 'div',
111
+ layout: stepsRoot,
112
+ base: base,
113
+ variations: {
114
+ size: sizeCSS,
115
+ view: viewCSS
116
+ },
117
+ defaults: {
118
+ view: 'default',
119
+ size: 's'
120
+ }
121
+ };
@@ -0,0 +1,304 @@
1
+ ---
2
+ id: steps
3
+ title: Steps
4
+ ---
5
+
6
+ # Steps
7
+ Шаги могут отображаться в нескольких размерах, в упрощенном виде и в горизонтальной/вертикальной ориентации
8
+
9
+ ```tsx live
10
+ import { ReactNode } from 'react';
11
+
12
+ export type StepStatus = 'active' | 'inactive' | 'completed';
13
+
14
+ export interface StepItemProps {
15
+ /**
16
+ * Заголовок
17
+ */
18
+ title?: string;
19
+ /**
20
+ * Контент, может быть как React компонентом, так и функцией
21
+ */
22
+ content?: string | ReactNode | ((status: StepStatus, index: number, items: StepItemProps[]) => ReactNode);
23
+ /**
24
+ * Индикатор шага, может быть как React компонентом, так и функцией
25
+ */
26
+ indicator?: number | string | ReactNode | ((status: StepStatus, item: StepItemProps) => ReactNode | null);
27
+ /**
28
+ * Статус шага: активный, инактивный, завершенный
29
+ * @description
30
+ * active - активный шаг
31
+ * inactive - не пройденный шаг
32
+ * completed - пройденный шаг
33
+ */
34
+ status?: StepStatus;
35
+ /**
36
+ * Отключенный шаг
37
+ * @default false
38
+ */
39
+ disabled?: boolean;
40
+ }
41
+
42
+ interface BaseSteps {
43
+ /**
44
+ * Ориентация компонента
45
+ * @default 'horizontal'
46
+ */
47
+ orientation?: 'horizontal' | 'vertical';
48
+ /**
49
+ * Выравнивание контента в шагах
50
+ * @default 'left'
51
+ */
52
+ contentAlign?: 'left' | 'center';
53
+ /**
54
+ * Включает разделительную линию
55
+ * @default true
56
+ */
57
+ hasLine?: boolean;
58
+ /**
59
+ * Индекс текущего шага, для uncontrolled компонента
60
+ */
61
+ current?: number;
62
+ /**
63
+ * Статус текущего шага, имеет приоритет над item.status
64
+ */
65
+ status?: StepStatus;
66
+ /**
67
+ * Обработчик изменения шага, делает индикаторы и заголовки шагов кликабельными
68
+ */
69
+ onChange?: (item: StepItemProps, index: number, prevIndex?: number) => void;
70
+ /**
71
+ * Массив шагов
72
+ */
73
+ items: StepItemProps[];
74
+ }
75
+
76
+ type IndicatorSizeSimple = 8 | 16;
77
+ type IndicatorSize = 24 | 36;
78
+
79
+ export type Steps = BaseSteps & {
80
+ /**
81
+ * Размер шага
82
+ */
83
+ size: 'xs' | 's';
84
+ indicatorSize: never;
85
+ } & {
86
+ /**
87
+ * Размер шага
88
+ */
89
+ size: 'm' | 'l';
90
+ /**
91
+ * Размер индикатора
92
+ */
93
+ indicatorSize: IndicatorSize | IndicatorSizeSimple;
94
+ };
95
+
96
+ ```
97
+
98
+ примеры использования https://codesandbox.io/p/devbox/crzql2?file=%2Fsrc%2FDemo.tsx%3A23%2C1
99
+
100
+ ```
101
+ import React, { useState } from 'react';
102
+ import { fullItems } from './App.data.tsx';
103
+ import { Steps } from './Steps/Steps.tsx';
104
+ import { StepItemProps, StepStatus } from './Steps/Steps.types';
105
+
106
+ const DemoContent: React.FC<{ onClick: () => void; status: string; index?: number; current?: number }> = ({
107
+ onClick,
108
+ status,
109
+ index,
110
+ current = 0,
111
+ children,
112
+ }) => {
113
+ return (
114
+ <>
115
+ <div>Content</div>
116
+ <button onClick={onClick} disabled={index !== (current || 0)}>
117
+ {children}
118
+ </button>
119
+ </>
120
+ );
121
+ };
122
+
123
+ export const DemoWithExternalControl = () => {
124
+ const items = [
125
+ {
126
+ title: 'Title',
127
+ indicator: '1',
128
+ content: 'Content',
129
+ },
130
+ {
131
+ title: 'Title',
132
+ indicator: '2',
133
+ content: 'Content',
134
+ },
135
+ {
136
+ title: 'Title',
137
+ indicator: '3',
138
+ content: 'Content',
139
+ },
140
+ {
141
+ title: 'Title',
142
+ indicator: '4',
143
+ content: 'Content',
144
+ },
145
+ ];
146
+
147
+ const [current, setCurrent] = useState(1);
148
+ const [status, setStatus] = useState('active');
149
+
150
+ const isLast = current === items.length - 1;
151
+
152
+ const onClick = () => {
153
+ if (isLast) {
154
+ setStatus('completed');
155
+ } else {
156
+ setCurrent(current + 1);
157
+ }
158
+ };
159
+
160
+ return (
161
+ <>
162
+ <Steps style={{ width: '1000px' }} current={current} status={status} items={items} />
163
+ <br />
164
+ <div>
165
+ External control:{' '}
166
+ <button onClick={onClick} style={{ width: '5rem' }}>
167
+ {isLast ? 'complete' : 'next'}
168
+ </button>
169
+ </div>
170
+ <hr />
171
+ </>
172
+ );
173
+ };
174
+
175
+ export const DemoWithInternalControls = () => {
176
+ const [current, setCurrent] = useState(undefined);
177
+ const [status, setStatus] = useState<StepStatus | undefined>();
178
+
179
+ const renderContent = (status, index, items) => {
180
+ const isFirst = index === 0 && current === undefined;
181
+ const isLast = index === items.length - 1;
182
+
183
+ const onNext = () => setCurrent((current) => (current === undefined ? 0 : current + 1));
184
+ const onComplete = () => {
185
+ setStatus('completed');
186
+ };
187
+
188
+ return (
189
+ <DemoContent onClick={isLast ? onComplete : onNext} index={index} status={status} current={current}>
190
+ {isFirst && 'go'}
191
+ {isLast && 'complete'}
192
+ {!isFirst && !isLast && 'next'}
193
+ </DemoContent>
194
+ );
195
+ };
196
+
197
+ return (
198
+ <Steps
199
+ current={current}
200
+ status={status}
201
+ items={[
202
+ {
203
+ title: 'Title',
204
+ indicator: '1',
205
+ content: renderContent,
206
+ },
207
+ {
208
+ title: 'Title',
209
+ indicator: '2',
210
+ content: renderContent,
211
+ },
212
+ {
213
+ title: 'Title',
214
+ indicator: '3',
215
+ content: renderContent,
216
+ },
217
+ {
218
+ title: 'Title',
219
+ indicator: '4',
220
+ content: renderContent,
221
+ },
222
+ ]}
223
+ />
224
+ );
225
+ };
226
+
227
+ export const DemoWithControlledUsage = () => {
228
+ const [exampleItems, setExampleItems] = useState<StepItemProps[]>(() =>
229
+ fullItems.map((item) => ({ ...item, status: 'inactive' }))
230
+ );
231
+
232
+ return (
233
+ <Steps
234
+ style={{ width: '1000px' }}
235
+ onChange={(item, index) => {
236
+ setExampleItems(
237
+ exampleItems.map((item, itemIndex) => {
238
+ if (index > itemIndex) {
239
+ return { ...item, status: 'completed' };
240
+ }
241
+
242
+ if (index === itemIndex) {
243
+ return { ...item, status: 'active' };
244
+ }
245
+
246
+ return { ...item, status: 'inactive' };
247
+ })
248
+ );
249
+ }}
250
+ items={exampleItems}
251
+ />
252
+ );
253
+ };
254
+
255
+ export const DemoWithControlledFreeUsage = () => {
256
+ const [items, setItems] = useState<StepItemProps[]>(() => fullItems.map((item) => ({ ...item, status: 'inactive' })));
257
+
258
+ return (
259
+ <Steps
260
+ style={{ width: '1000px' }}
261
+ onChange={(item, index, prevIndex) => {
262
+ console.log('!!! onChange', index, prevIndex);
263
+
264
+ const newItems = [...items];
265
+ if (prevIndex !== undefined) {
266
+ newItems[prevIndex].status = 'completed';
267
+ }
268
+ newItems[index].status = 'active';
269
+
270
+ setItems(newItems);
271
+ }}
272
+ items={items}
273
+ />
274
+ );
275
+ };
276
+
277
+ export const DemoControlledWithStatus = () => {
278
+ const [items, setItems] = useState<StepItemProps[]>(() => fullItems.map(({ status, ...item }) => ({ ...item })));
279
+ return (
280
+ <Steps
281
+ style={{ width: '1000px' }}
282
+ current={2}
283
+ status="active"
284
+ onClick={(item, index) => {
285
+ setItems(
286
+ items.map((item, itemIndex) => {
287
+ if (index > itemIndex) {
288
+ return { ...item, status: 'completed' };
289
+ }
290
+
291
+ if (index === itemIndex) {
292
+ return { ...item, status: 'active' };
293
+ }
294
+
295
+ return { ...item, status: 'inactive' };
296
+ })
297
+ );
298
+ }}
299
+ items={items}
300
+ />
301
+ );
302
+ };
303
+
304
+ ```