@salutejs/plasma-new-hope 0.88.0-canary.1223.9316788273.0 → 0.88.0-canary.1225.9347054103.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (254) hide show
  1. package/cjs/components/Sheet/Sheet.css +5 -0
  2. package/cjs/components/Sheet/Sheet.js +91 -0
  3. package/cjs/components/Sheet/Sheet.js.map +1 -0
  4. package/cjs/components/Sheet/Sheet.styles.js +62 -0
  5. package/cjs/components/Sheet/Sheet.styles.js.map +1 -0
  6. package/cjs/components/Sheet/Sheet.styles_1bm46e7.css +5 -0
  7. package/cjs/components/Sheet/Sheet.tokens.js +16 -0
  8. package/cjs/components/Sheet/Sheet.tokens.js.map +1 -0
  9. package/cjs/components/Sheet/hooks/useSheet.js +26 -0
  10. package/cjs/components/Sheet/hooks/useSheet.js.map +1 -0
  11. package/cjs/components/Sheet/hooks/useSheetSwipe.js +98 -0
  12. package/cjs/components/Sheet/hooks/useSheetSwipe.js.map +1 -0
  13. package/cjs/components/Sheet/hooks/useThemeContext.js +17 -0
  14. package/cjs/components/Sheet/hooks/useThemeContext.js.map +1 -0
  15. package/cjs/components/Sheet/utils/handleTransition.js +14 -0
  16. package/cjs/components/Sheet/utils/handleTransition.js.map +1 -0
  17. package/cjs/components/{Accordion/variations/_size → Sheet/variations/_view}/base.js +1 -1
  18. package/cjs/components/Sheet/variations/_view/base.js.map +1 -0
  19. package/cjs/index.css +6 -2
  20. package/cjs/index.js +6 -8
  21. package/cjs/index.js.map +1 -1
  22. package/es/components/Sheet/Sheet.css +5 -0
  23. package/es/components/Sheet/Sheet.js +86 -0
  24. package/es/components/Sheet/Sheet.js.map +1 -0
  25. package/es/components/Sheet/Sheet.styles.js +54 -0
  26. package/es/components/Sheet/Sheet.styles.js.map +1 -0
  27. package/es/components/Sheet/Sheet.styles_1bm46e7.css +5 -0
  28. package/es/components/Sheet/Sheet.tokens.js +11 -0
  29. package/es/components/Sheet/Sheet.tokens.js.map +1 -0
  30. package/es/components/Sheet/hooks/useSheet.js +22 -0
  31. package/es/components/Sheet/hooks/useSheet.js.map +1 -0
  32. package/es/components/Sheet/hooks/useSheetSwipe.js +94 -0
  33. package/es/components/Sheet/hooks/useSheetSwipe.js.map +1 -0
  34. package/es/components/Sheet/hooks/useThemeContext.js +13 -0
  35. package/es/components/Sheet/hooks/useThemeContext.js.map +1 -0
  36. package/es/components/Sheet/utils/handleTransition.js +10 -0
  37. package/es/components/Sheet/utils/handleTransition.js.map +1 -0
  38. package/es/components/{Accordion → Sheet}/variations/_view/base.js +1 -1
  39. package/es/components/Sheet/variations/_view/base.js.map +1 -0
  40. package/es/index.css +6 -2
  41. package/es/index.js +2 -3
  42. package/es/index.js.map +1 -1
  43. package/package.json +4 -2
  44. package/styled-components/cjs/components/Sheet/Sheet.js +90 -0
  45. package/styled-components/cjs/components/Sheet/Sheet.styles.js +28 -0
  46. package/styled-components/cjs/components/Sheet/Sheet.tokens.js +14 -0
  47. package/styled-components/cjs/components/Sheet/hooks/index.js +26 -0
  48. package/styled-components/cjs/components/Sheet/hooks/useSheet.js +24 -0
  49. package/styled-components/cjs/components/Sheet/hooks/useSheetSwipe.js +102 -0
  50. package/styled-components/cjs/components/Sheet/hooks/useThemeContext.js +15 -0
  51. package/styled-components/cjs/components/Sheet/index.js +31 -0
  52. package/styled-components/cjs/components/Sheet/utils/handleTransition.js +13 -0
  53. package/styled-components/cjs/components/Sheet/utils/index.js +12 -0
  54. package/styled-components/cjs/components/Sheet/variations/_view/tokens.json +3 -0
  55. package/styled-components/cjs/components/_Icon/index.js +1 -15
  56. package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.config.js +18 -0
  57. package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.js +17 -0
  58. package/styled-components/cjs/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +239 -0
  59. package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.config.js +18 -0
  60. package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.js +17 -0
  61. package/styled-components/cjs/examples/plasma_web/components/Sheet/Sheet.stories.tsx +239 -0
  62. package/styled-components/cjs/index.js +11 -11
  63. package/styled-components/es/components/Sheet/Sheet.js +82 -0
  64. package/styled-components/es/components/Sheet/Sheet.styles.js +21 -0
  65. package/styled-components/es/components/Sheet/Sheet.tokens.js +8 -0
  66. package/styled-components/es/components/Sheet/hooks/index.js +3 -0
  67. package/styled-components/es/components/Sheet/hooks/useSheet.js +18 -0
  68. package/styled-components/es/components/Sheet/hooks/useSheetSwipe.js +95 -0
  69. package/styled-components/es/components/Sheet/hooks/useThemeContext.js +9 -0
  70. package/styled-components/es/components/Sheet/index.js +2 -0
  71. package/styled-components/es/components/Sheet/utils/handleTransition.js +7 -0
  72. package/styled-components/es/components/Sheet/utils/index.js +1 -0
  73. package/styled-components/es/components/Sheet/variations/_view/tokens.json +3 -0
  74. package/styled-components/es/components/_Icon/index.js +1 -3
  75. package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.config.js +12 -0
  76. package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.js +6 -0
  77. package/styled-components/es/examples/plasma_b2c/components/Sheet/Sheet.stories.tsx +239 -0
  78. package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.config.js +12 -0
  79. package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.js +6 -0
  80. package/styled-components/es/examples/plasma_web/components/Sheet/Sheet.stories.tsx +239 -0
  81. package/styled-components/es/index.js +2 -2
  82. package/types/components/Sheet/Sheet.d.ts +22 -0
  83. package/types/components/Sheet/Sheet.d.ts.map +1 -0
  84. package/types/components/Sheet/Sheet.styles.d.ts +13 -0
  85. package/types/components/Sheet/Sheet.styles.d.ts.map +1 -0
  86. package/types/components/Sheet/Sheet.tokens.d.ts +9 -0
  87. package/types/components/Sheet/Sheet.tokens.d.ts.map +1 -0
  88. package/types/components/Sheet/Sheet.types.d.ts +35 -0
  89. package/types/components/Sheet/Sheet.types.d.ts.map +1 -0
  90. package/types/components/Sheet/hooks/index.d.ts +4 -0
  91. package/types/components/Sheet/hooks/index.d.ts.map +1 -0
  92. package/types/components/Sheet/hooks/useSheet.d.ts +3 -0
  93. package/types/components/Sheet/hooks/useSheet.d.ts.map +1 -0
  94. package/types/components/Sheet/hooks/useSheetSwipe.d.ts +9 -0
  95. package/types/components/Sheet/hooks/useSheetSwipe.d.ts.map +1 -0
  96. package/types/components/Sheet/hooks/useThemeContext.d.ts +7 -0
  97. package/types/components/Sheet/hooks/useThemeContext.d.ts.map +1 -0
  98. package/types/components/Sheet/index.d.ts +4 -0
  99. package/types/components/Sheet/index.d.ts.map +1 -0
  100. package/types/components/Sheet/utils/handleTransition.d.ts +5 -0
  101. package/types/components/Sheet/utils/handleTransition.d.ts.map +1 -0
  102. package/types/components/Sheet/utils/index.d.ts +2 -0
  103. package/types/components/Sheet/utils/index.d.ts.map +1 -0
  104. package/types/components/Sheet/variations/_view/base.d.ts.map +1 -0
  105. package/types/components/_Icon/index.d.ts +0 -2
  106. package/types/components/_Icon/index.d.ts.map +1 -1
  107. package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts +11 -0
  108. package/types/examples/plasma_b2c/components/Sheet/Sheet.config.d.ts.map +1 -0
  109. package/types/examples/plasma_b2c/components/Sheet/Sheet.d.ts +8 -0
  110. package/types/examples/plasma_b2c/components/Sheet/Sheet.d.ts.map +1 -0
  111. package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts +11 -0
  112. package/types/examples/plasma_web/components/Sheet/Sheet.config.d.ts.map +1 -0
  113. package/types/examples/plasma_web/components/Sheet/Sheet.d.ts +8 -0
  114. package/types/examples/plasma_web/components/Sheet/Sheet.d.ts.map +1 -0
  115. package/types/index.d.ts +1 -1
  116. package/types/index.d.ts.map +1 -1
  117. package/cjs/components/Accordion/Accordion.css +0 -1
  118. package/cjs/components/Accordion/Accordion.js +0 -50
  119. package/cjs/components/Accordion/Accordion.js.map +0 -1
  120. package/cjs/components/Accordion/Accordion.styles.js +0 -9
  121. package/cjs/components/Accordion/Accordion.styles.js.map +0 -1
  122. package/cjs/components/Accordion/Accordion.styles_1mo1sxr.css +0 -1
  123. package/cjs/components/Accordion/Accordion.tokens.js +0 -45
  124. package/cjs/components/Accordion/Accordion.tokens.js.map +0 -1
  125. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -93
  126. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js.map +0 -1
  127. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -63
  128. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +0 -1
  129. package/cjs/components/Accordion/variations/_size/base.js.map +0 -1
  130. package/cjs/components/Accordion/variations/_view/base.js +0 -9
  131. package/cjs/components/Accordion/variations/_view/base.js.map +0 -1
  132. package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +0 -33
  133. package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js.map +0 -1
  134. package/cjs/components/_Icon/Icon.assets/Minus.js +0 -22
  135. package/cjs/components/_Icon/Icon.assets/Minus.js.map +0 -1
  136. package/cjs/components/_Icon/Icons/IconChevronDownFill.js +0 -23
  137. package/cjs/components/_Icon/Icons/IconChevronDownFill.js.map +0 -1
  138. package/cjs/components/_Icon/Icons/IconMinus.js +0 -23
  139. package/cjs/components/_Icon/Icons/IconMinus.js.map +0 -1
  140. package/es/components/Accordion/Accordion.css +0 -1
  141. package/es/components/Accordion/Accordion.js +0 -45
  142. package/es/components/Accordion/Accordion.js.map +0 -1
  143. package/es/components/Accordion/Accordion.styles.js +0 -5
  144. package/es/components/Accordion/Accordion.styles.js.map +0 -1
  145. package/es/components/Accordion/Accordion.styles_1mo1sxr.css +0 -1
  146. package/es/components/Accordion/Accordion.tokens.js +0 -40
  147. package/es/components/Accordion/Accordion.tokens.js.map +0 -1
  148. package/es/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -89
  149. package/es/components/Accordion/ui/AccordionItem/AccordionItem.js.map +0 -1
  150. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -49
  151. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +0 -1
  152. package/es/components/Accordion/variations/_size/base.js +0 -5
  153. package/es/components/Accordion/variations/_size/base.js.map +0 -1
  154. package/es/components/Accordion/variations/_size/base_x642ct.css +0 -1
  155. package/es/components/Accordion/variations/_view/base.js.map +0 -1
  156. package/es/components/Accordion/variations/_view/base_x642ct.css +0 -1
  157. package/es/components/_Icon/Icon.assets/ChevronDownFill.js +0 -29
  158. package/es/components/_Icon/Icon.assets/ChevronDownFill.js.map +0 -1
  159. package/es/components/_Icon/Icon.assets/Minus.js +0 -18
  160. package/es/components/_Icon/Icon.assets/Minus.js.map +0 -1
  161. package/es/components/_Icon/Icons/IconChevronDownFill.js +0 -19
  162. package/es/components/_Icon/Icons/IconChevronDownFill.js.map +0 -1
  163. package/es/components/_Icon/Icons/IconMinus.js +0 -19
  164. package/es/components/_Icon/Icons/IconMinus.js.map +0 -1
  165. package/styled-components/cjs/components/Accordion/Accordion.js +0 -50
  166. package/styled-components/cjs/components/Accordion/Accordion.styles.js +0 -9
  167. package/styled-components/cjs/components/Accordion/Accordion.tokens.js +0 -43
  168. package/styled-components/cjs/components/Accordion/index.js +0 -38
  169. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -99
  170. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -49
  171. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.types.js +0 -5
  172. package/styled-components/cjs/components/Accordion/variations/_size/tokens.json +0 -6
  173. package/styled-components/cjs/components/Accordion/variations/_stretching/base.js +0 -8
  174. package/styled-components/cjs/components/Accordion/variations/_stretching/tokens.json +0 -1
  175. package/styled-components/cjs/components/Accordion/variations/_view/base.js +0 -8
  176. package/styled-components/cjs/components/Accordion/variations/_view/tokens.json +0 -8
  177. package/styled-components/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +0 -32
  178. package/styled-components/cjs/components/_Icon/Icon.assets/Minus.js +0 -21
  179. package/styled-components/cjs/components/_Icon/Icons/IconChevronDownFill.js +0 -22
  180. package/styled-components/cjs/components/_Icon/Icons/IconMinus.js +0 -22
  181. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.config.js +0 -30
  182. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.js +0 -17
  183. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +0 -75
  184. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.config.js +0 -30
  185. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.js +0 -17
  186. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx +0 -75
  187. package/styled-components/es/components/Accordion/Accordion.js +0 -41
  188. package/styled-components/es/components/Accordion/Accordion.styles.js +0 -3
  189. package/styled-components/es/components/Accordion/Accordion.tokens.js +0 -37
  190. package/styled-components/es/components/Accordion/index.js +0 -3
  191. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.js +0 -90
  192. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +0 -42
  193. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.types.js +0 -1
  194. package/styled-components/es/components/Accordion/variations/_size/tokens.json +0 -6
  195. package/styled-components/es/components/Accordion/variations/_stretching/base.js +0 -2
  196. package/styled-components/es/components/Accordion/variations/_stretching/tokens.json +0 -1
  197. package/styled-components/es/components/Accordion/variations/_view/base.js +0 -2
  198. package/styled-components/es/components/Accordion/variations/_view/tokens.json +0 -8
  199. package/styled-components/es/components/_Icon/Icon.assets/ChevronDownFill.js +0 -25
  200. package/styled-components/es/components/_Icon/Icon.assets/Minus.js +0 -14
  201. package/styled-components/es/components/_Icon/Icons/IconChevronDownFill.js +0 -15
  202. package/styled-components/es/components/_Icon/Icons/IconMinus.js +0 -15
  203. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.config.js +0 -24
  204. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.js +0 -6
  205. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +0 -75
  206. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.config.js +0 -24
  207. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.js +0 -6
  208. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.stories.tsx +0 -75
  209. package/types/components/Accordion/Accordion.d.ts +0 -35
  210. package/types/components/Accordion/Accordion.d.ts.map +0 -1
  211. package/types/components/Accordion/Accordion.styles.d.ts +0 -2
  212. package/types/components/Accordion/Accordion.styles.d.ts.map +0 -1
  213. package/types/components/Accordion/Accordion.tokens.d.ts +0 -38
  214. package/types/components/Accordion/Accordion.tokens.d.ts.map +0 -1
  215. package/types/components/Accordion/Accordion.types.d.ts +0 -24
  216. package/types/components/Accordion/Accordion.types.d.ts.map +0 -1
  217. package/types/components/Accordion/index.d.ts +0 -5
  218. package/types/components/Accordion/index.d.ts.map +0 -1
  219. package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts +0 -4
  220. package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts.map +0 -1
  221. package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts +0 -13
  222. package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts.map +0 -1
  223. package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts +0 -43
  224. package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts.map +0 -1
  225. package/types/components/Accordion/variations/_size/base.d.ts.map +0 -1
  226. package/types/components/Accordion/variations/_stretching/base.d.ts +0 -2
  227. package/types/components/Accordion/variations/_stretching/base.d.ts.map +0 -1
  228. package/types/components/Accordion/variations/_view/base.d.ts +0 -2
  229. package/types/components/Accordion/variations/_view/base.d.ts.map +0 -1
  230. package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts +0 -4
  231. package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts.map +0 -1
  232. package/types/components/_Icon/Icon.assets/Minus.d.ts +0 -4
  233. package/types/components/_Icon/Icon.assets/Minus.d.ts.map +0 -1
  234. package/types/components/_Icon/Icons/IconChevronDownFill.d.ts +0 -4
  235. package/types/components/_Icon/Icons/IconChevronDownFill.d.ts.map +0 -1
  236. package/types/components/_Icon/Icons/IconMinus.d.ts +0 -4
  237. package/types/components/_Icon/Icons/IconMinus.d.ts.map +0 -1
  238. package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts +0 -23
  239. package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts.map +0 -1
  240. package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts +0 -26
  241. package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts.map +0 -1
  242. package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts +0 -23
  243. package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts.map +0 -1
  244. package/types/examples/plasma_web/components/Accordion/Accordion.d.ts +0 -26
  245. package/types/examples/plasma_web/components/Accordion/Accordion.d.ts.map +0 -1
  246. /package/cjs/components/{Accordion/variations/_size → Sheet/variations/_view}/base_x642ct.css +0 -0
  247. /package/cjs/components/{Accordion/ui/AccordionItem/AccordionItem.css → _Icon/Icons/IconClose.css} +0 -0
  248. /package/{cjs/components/Accordion → es/components/Sheet}/variations/_view/base_x642ct.css +0 -0
  249. /package/es/components/{Accordion/ui/AccordionItem/AccordionItem.css → _Icon/Icons/IconClose.css} +0 -0
  250. /package/styled-components/cjs/components/{Accordion/Accordion.types.js → Sheet/Sheet.types.js} +0 -0
  251. /package/styled-components/cjs/components/{Accordion/variations/_size → Sheet/variations/_view}/base.js +0 -0
  252. /package/styled-components/es/components/{Accordion/Accordion.types.js → Sheet/Sheet.types.js} +0 -0
  253. /package/styled-components/es/components/{Accordion/variations/_size → Sheet/variations/_view}/base.js +0 -0
  254. /package/types/components/{Accordion/variations/_size → Sheet/variations/_view}/base.d.ts +0 -0
@@ -0,0 +1,239 @@
1
+ import React, { useState } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import type { ComponentProps } from 'react';
4
+ import { Body1 } from '@salutejs/plasma-core';
5
+
6
+ import { Button } from '../Button/Button';
7
+ import { WithTheme } from '../../../_helpers';
8
+
9
+ import { Sheet } from './Sheet';
10
+
11
+ const meta: Meta<typeof Sheet> = {
12
+ title: 'plasma_b2c/Sheet',
13
+ decorators: [WithTheme],
14
+ parameters: { viewport: { defaultViewport: '860' } },
15
+ };
16
+
17
+ export default meta;
18
+
19
+ type StorySheetProps = ComponentProps<typeof Sheet>;
20
+
21
+ const StoryDefault = ({ withOverlay, withTransition }: StorySheetProps) => {
22
+ const [isOpen, setIsOpen] = useState(false);
23
+
24
+ return (
25
+ <>
26
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
27
+ <Sheet
28
+ isOpen={isOpen}
29
+ withOverlay={withOverlay}
30
+ withTransition={withTransition}
31
+ onClose={() => setIsOpen(false)}
32
+ >
33
+ <p>Вложенные кнопки</p>
34
+ <div
35
+ style={{
36
+ height: '75px',
37
+ overflow: 'scroll',
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ gap: '1rem',
41
+ }}
42
+ >
43
+ <Button>Кнопка 1</Button>
44
+ <Button>Кнопка 2</Button>
45
+ <Button>Кнопка 3</Button>
46
+ <Button>Кнопка 4</Button>
47
+ <Button>Кнопка 5</Button>
48
+ <Button>Кнопка 6</Button>
49
+ <Button>Кнопка 7</Button>
50
+ <Button>Кнопка 8</Button>
51
+ </div>
52
+ <Body1>
53
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
54
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel illum ea
55
+ fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos nostrum
56
+ placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt ullam,
57
+ dolorem labore quaerat vero maxime ab ipsa nihil.
58
+ </Body1>
59
+ </Sheet>
60
+ </>
61
+ );
62
+ };
63
+
64
+ export const Default: StoryObj<StorySheetProps> = {
65
+ args: {
66
+ withOverlay: true,
67
+ withTransition: true,
68
+ },
69
+ render: (args) => <StoryDefault {...args} />,
70
+ };
71
+
72
+ const StoryWithoutOverlay = () => {
73
+ const [isOpen, setIsOpen] = useState(false);
74
+
75
+ return (
76
+ <>
77
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
78
+ <Sheet isOpen={isOpen} withOverlay={false} onClose={() => setIsOpen(false)}>
79
+ <Body1>
80
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
81
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel illum ea
82
+ fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos nostrum
83
+ placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt ullam,
84
+ dolorem labore quaerat vero maxime ab ipsa nihil.
85
+ </Body1>
86
+ </Sheet>
87
+ </>
88
+ );
89
+ };
90
+
91
+ export const WithoutOverlay: StoryObj = {
92
+ render: () => <StoryWithoutOverlay />,
93
+ };
94
+
95
+ const StoryWithScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
96
+ const [isOpen, setIsOpen] = useState(false);
97
+
98
+ return (
99
+ <>
100
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
101
+ <Sheet
102
+ isOpen={isOpen}
103
+ withOverlay={withOverlay}
104
+ withTransition={withTransition}
105
+ onClose={() => setIsOpen(false)}
106
+ >
107
+ <Body1>
108
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
109
+ <p>
110
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
111
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
112
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
113
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
114
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
115
+ </p>
116
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
117
+ <p>
118
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
119
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
120
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
121
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
122
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
123
+ </p>
124
+ </Body1>
125
+ </Sheet>
126
+ </>
127
+ );
128
+ };
129
+
130
+ export const WithScroll: StoryObj<StorySheetProps> = {
131
+ render: (args) => <StoryWithScroll {...args} />,
132
+ };
133
+
134
+ const StoryWithInsideScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
135
+ const [isOpen, setIsOpen] = useState(false);
136
+
137
+ return (
138
+ <>
139
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
140
+ <Sheet
141
+ isOpen={isOpen}
142
+ withOverlay={withOverlay}
143
+ withTransition={withTransition}
144
+ onClose={() => setIsOpen(false)}
145
+ >
146
+ <p>Вложенные кнопки</p>
147
+ <div
148
+ style={{
149
+ height: '150px',
150
+ overflow: 'scroll',
151
+ display: 'flex',
152
+ flexDirection: 'column',
153
+ gap: '1rem',
154
+ }}
155
+ >
156
+ <Button>Кнопка 1</Button>
157
+ <Button>Кнопка 2</Button>
158
+ <Button>Кнопка 3</Button>
159
+ <Button>Кнопка 4</Button>
160
+ <Button>Кнопка 5</Button>
161
+ <Button>Кнопка 6</Button>
162
+ <Button>Кнопка 7</Button>
163
+ <Button>Кнопка 8</Button>
164
+ </div>
165
+ <Body1>Lorem ipsum dolor sit amet consectetur adipisicing elit.</Body1>
166
+ </Sheet>
167
+ </>
168
+ );
169
+ };
170
+
171
+ export const WithInsideScroll: StoryObj<StorySheetProps> = {
172
+ args: {
173
+ withOverlay: true,
174
+ withTransition: true,
175
+ },
176
+ render: (args) => <StoryWithInsideScroll {...args} />,
177
+ };
178
+
179
+ const StoryWithDoubleScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
180
+ const [isOpen, setIsOpen] = useState(false);
181
+
182
+ return (
183
+ <>
184
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
185
+ <Sheet
186
+ isOpen={isOpen}
187
+ withOverlay={withOverlay}
188
+ withTransition={withTransition}
189
+ onClose={() => setIsOpen(false)}
190
+ >
191
+ <Body1>
192
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
193
+ <p>Вложенные кнопки</p>
194
+ <div
195
+ style={{
196
+ height: '150px',
197
+ overflow: 'scroll',
198
+ display: 'flex',
199
+ flexDirection: 'column',
200
+ gap: '1rem',
201
+ }}
202
+ >
203
+ <Button>Кнопка 1</Button>
204
+ <Button>Кнопка 2</Button>
205
+ <Button>Кнопка 3</Button>
206
+ <Button>Кнопка 4</Button>
207
+ <Button>Кнопка 5</Button>
208
+ <Button>Кнопка 6</Button>
209
+ <Button>Кнопка 7</Button>
210
+ <Button>Кнопка 8</Button>
211
+ </div>
212
+ <p>
213
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
214
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
215
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
216
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
217
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
218
+ </p>
219
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
220
+ <p>
221
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
222
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
223
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
224
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
225
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
226
+ </p>
227
+ </Body1>
228
+ </Sheet>
229
+ </>
230
+ );
231
+ };
232
+
233
+ export const WithDoubleScroll: StoryObj<StorySheetProps> = {
234
+ args: {
235
+ withOverlay: true,
236
+ withTransition: true,
237
+ },
238
+ render: (args) => <StoryWithDoubleScroll {...args} />,
239
+ };
@@ -0,0 +1,12 @@
1
+ import { css } from 'styled-components';
2
+ import { sheetTokens } from '../../../../components/Sheet';
3
+ export var config = {
4
+ defaults: {
5
+ view: 'default'
6
+ },
7
+ variations: {
8
+ view: {
9
+ "default": /*#__PURE__*/css(["", ":var(--plasma-colors-background-primary);", ":var(--plasma-colors-overlay);", ":var(--plasma-colors-white);"], sheetTokens.contentBackgroundColor, sheetTokens.overlayBackgroundColor, sheetTokens.handleColor)
10
+ }
11
+ }
12
+ };
@@ -0,0 +1,6 @@
1
+ import { sheetConfig } from '../../../../components/Sheet';
2
+ import { component, mergeConfig } from '../../../../engines';
3
+ import { config } from './Sheet.config';
4
+ export { sheetClasses } from '../../../../components/Sheet';
5
+ var mergedConfig = /*#__PURE__*/mergeConfig(sheetConfig, config);
6
+ export var Sheet = /*#__PURE__*/component(mergedConfig);
@@ -0,0 +1,239 @@
1
+ import React, { useState } from 'react';
2
+ import type { StoryObj, Meta } from '@storybook/react';
3
+ import type { ComponentProps } from 'react';
4
+ import { Body1 } from '@salutejs/plasma-core';
5
+
6
+ import { Button } from '../Button/Button';
7
+ import { WithTheme } from '../../../_helpers';
8
+
9
+ import { Sheet } from './Sheet';
10
+
11
+ const meta: Meta<typeof Sheet> = {
12
+ title: 'plasma_web/Sheet',
13
+ decorators: [WithTheme],
14
+ parameters: { viewport: { defaultViewport: '860' } },
15
+ };
16
+
17
+ export default meta;
18
+
19
+ type StorySheetProps = ComponentProps<typeof Sheet>;
20
+
21
+ const StoryDefault = ({ withOverlay, withTransition }: StorySheetProps) => {
22
+ const [isOpen, setIsOpen] = useState(false);
23
+
24
+ return (
25
+ <>
26
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
27
+ <Sheet
28
+ isOpen={isOpen}
29
+ withOverlay={withOverlay}
30
+ withTransition={withTransition}
31
+ onClose={() => setIsOpen(false)}
32
+ >
33
+ <p>Вложенные кнопки</p>
34
+ <div
35
+ style={{
36
+ height: '75px',
37
+ overflow: 'scroll',
38
+ display: 'flex',
39
+ flexDirection: 'column',
40
+ gap: '1rem',
41
+ }}
42
+ >
43
+ <Button>Кнопка 1</Button>
44
+ <Button>Кнопка 2</Button>
45
+ <Button>Кнопка 3</Button>
46
+ <Button>Кнопка 4</Button>
47
+ <Button>Кнопка 5</Button>
48
+ <Button>Кнопка 6</Button>
49
+ <Button>Кнопка 7</Button>
50
+ <Button>Кнопка 8</Button>
51
+ </div>
52
+ <Body1>
53
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
54
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel illum ea
55
+ fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos nostrum
56
+ placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt ullam,
57
+ dolorem labore quaerat vero maxime ab ipsa nihil.
58
+ </Body1>
59
+ </Sheet>
60
+ </>
61
+ );
62
+ };
63
+
64
+ export const Default: StoryObj<StorySheetProps> = {
65
+ args: {
66
+ withOverlay: true,
67
+ withTransition: true,
68
+ },
69
+ render: (args) => <StoryDefault {...args} />,
70
+ };
71
+
72
+ const StoryWithoutOverlay = () => {
73
+ const [isOpen, setIsOpen] = useState(false);
74
+
75
+ return (
76
+ <>
77
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
78
+ <Sheet isOpen={isOpen} withOverlay={false} onClose={() => setIsOpen(false)}>
79
+ <Body1>
80
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
81
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel illum ea
82
+ fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos nostrum
83
+ placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt ullam,
84
+ dolorem labore quaerat vero maxime ab ipsa nihil.
85
+ </Body1>
86
+ </Sheet>
87
+ </>
88
+ );
89
+ };
90
+
91
+ export const WithoutOverlay: StoryObj = {
92
+ render: () => <StoryWithoutOverlay />,
93
+ };
94
+
95
+ const StoryWithScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
96
+ const [isOpen, setIsOpen] = useState(false);
97
+
98
+ return (
99
+ <>
100
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
101
+ <Sheet
102
+ isOpen={isOpen}
103
+ withOverlay={withOverlay}
104
+ withTransition={withTransition}
105
+ onClose={() => setIsOpen(false)}
106
+ >
107
+ <Body1>
108
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
109
+ <p>
110
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
111
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
112
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
113
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
114
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
115
+ </p>
116
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
117
+ <p>
118
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
119
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
120
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
121
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
122
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
123
+ </p>
124
+ </Body1>
125
+ </Sheet>
126
+ </>
127
+ );
128
+ };
129
+
130
+ export const WithScroll: StoryObj<StorySheetProps> = {
131
+ render: (args) => <StoryWithScroll {...args} />,
132
+ };
133
+
134
+ const StoryWithInsideScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
135
+ const [isOpen, setIsOpen] = useState(false);
136
+
137
+ return (
138
+ <>
139
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
140
+ <Sheet
141
+ isOpen={isOpen}
142
+ withOverlay={withOverlay}
143
+ withTransition={withTransition}
144
+ onClose={() => setIsOpen(false)}
145
+ >
146
+ <p>Вложенные кнопки</p>
147
+ <div
148
+ style={{
149
+ height: '150px',
150
+ overflow: 'scroll',
151
+ display: 'flex',
152
+ flexDirection: 'column',
153
+ gap: '1rem',
154
+ }}
155
+ >
156
+ <Button>Кнопка 1</Button>
157
+ <Button>Кнопка 2</Button>
158
+ <Button>Кнопка 3</Button>
159
+ <Button>Кнопка 4</Button>
160
+ <Button>Кнопка 5</Button>
161
+ <Button>Кнопка 6</Button>
162
+ <Button>Кнопка 7</Button>
163
+ <Button>Кнопка 8</Button>
164
+ </div>
165
+ <Body1>Lorem ipsum dolor sit amet consectetur adipisicing elit.</Body1>
166
+ </Sheet>
167
+ </>
168
+ );
169
+ };
170
+
171
+ export const WithInsideScroll: StoryObj<StorySheetProps> = {
172
+ args: {
173
+ withOverlay: true,
174
+ withTransition: true,
175
+ },
176
+ render: (args) => <StoryWithInsideScroll {...args} />,
177
+ };
178
+
179
+ const StoryWithDoubleScroll = ({ withOverlay, withTransition }: StorySheetProps) => {
180
+ const [isOpen, setIsOpen] = useState(false);
181
+
182
+ return (
183
+ <>
184
+ <Button onClick={() => setIsOpen(true)}>Открыть</Button>
185
+ <Sheet
186
+ isOpen={isOpen}
187
+ withOverlay={withOverlay}
188
+ withTransition={withTransition}
189
+ onClose={() => setIsOpen(false)}
190
+ >
191
+ <Body1>
192
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
193
+ <p>Вложенные кнопки</p>
194
+ <div
195
+ style={{
196
+ height: '150px',
197
+ overflow: 'scroll',
198
+ display: 'flex',
199
+ flexDirection: 'column',
200
+ gap: '1rem',
201
+ }}
202
+ >
203
+ <Button>Кнопка 1</Button>
204
+ <Button>Кнопка 2</Button>
205
+ <Button>Кнопка 3</Button>
206
+ <Button>Кнопка 4</Button>
207
+ <Button>Кнопка 5</Button>
208
+ <Button>Кнопка 6</Button>
209
+ <Button>Кнопка 7</Button>
210
+ <Button>Кнопка 8</Button>
211
+ </div>
212
+ <p>
213
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
214
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
215
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
216
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
217
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
218
+ </p>
219
+ <Button onClick={() => setIsOpen(false)}>Закрыть</Button>
220
+ <p>
221
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Quae tempore vitae porro laboriosam
222
+ consectetur fugiat assumenda, earum nesciunt. Distinctio minima nesciunt dicta rem quae vel
223
+ illum ea fugit molestiae dolorem? Lorem ipsum dolor sit amet consectetur, adipisicing elit. Quos
224
+ nostrum placeat, neque repudiandae consectetur voluptates soluta et sint eum obcaecati nesciunt
225
+ ullam, dolorem labore quaerat vero maxime ab ipsa nihil.
226
+ </p>
227
+ </Body1>
228
+ </Sheet>
229
+ </>
230
+ );
231
+ };
232
+
233
+ export const WithDoubleScroll: StoryObj<StorySheetProps> = {
234
+ args: {
235
+ withOverlay: true,
236
+ withTransition: true,
237
+ },
238
+ render: (args) => <StoryWithDoubleScroll {...args} />,
239
+ };
@@ -46,6 +46,6 @@ export * from './components/Progress';
46
46
  export * from './components/Select';
47
47
  export * from './components/Divider';
48
48
  export * from './components/Toolbar';
49
+ export * from './components/Sheet';
49
50
  export * from './components/Slider';
50
- export * from './components/Range';
51
- export * from './components/Accordion';
51
+ export * from './components/Range';
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { RootProps } from '../../engines';
3
+ import { SheetProps } from './Sheet.types';
4
+ /**
5
+ * Открывает окно-шторку поверх основного экрана.
6
+ */
7
+ export declare const sheetRoot: (Root: RootProps<HTMLDivElement, SheetProps>) => React.ForwardRefExoticComponent<SheetProps & React.RefAttributes<HTMLDivElement>>;
8
+ export declare const sheetConfig: {
9
+ name: string;
10
+ tag: string;
11
+ layout: (Root: RootProps<HTMLDivElement, SheetProps>) => React.ForwardRefExoticComponent<SheetProps & React.RefAttributes<HTMLDivElement>>;
12
+ base: string;
13
+ variations: {
14
+ view: {
15
+ css: import("@linaria/core").LinariaClassName;
16
+ };
17
+ };
18
+ defaults: {
19
+ view: string;
20
+ };
21
+ };
22
+ //# sourceMappingURL=Sheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAY3C;;GAEG;AAEH,eAAO,MAAM,SAAS,SAAU,UAAU,cAAc,EAAE,UAAU,CAAC,sFAkDhE,CAAC;AAEN,eAAO,MAAM,WAAW;;;mBApDQ,UAAU,cAAc,EAAE,UAAU,CAAC;;;;;;;;;;CAiEpE,CAAC"}
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Pick<import("./Sheet.types").SheetProps, "isOpen" | "withTransition"> & {
3
+ theme: import("./Sheet.types").ThemeProviderContext;
4
+ }>;
5
+ export declare const StyledContentWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Pick<import("./Sheet.types").SheetProps, "isOpen" | "withTransition"> & {
6
+ theme: import("./Sheet.types").ThemeProviderContext;
7
+ }>;
8
+ export declare const StyledOverlay: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
9
+ withOverlay: boolean;
10
+ }>;
11
+ export declare const StyledSheetContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
+ export declare const StyledSheetHandle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
13
+ //# sourceMappingURL=Sheet.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,aAAa;;EAczB,CAAC;AAEF,eAAO,MAAM,oBAAoB;;EAiBhC,CAAC;AAEF,eAAO,MAAM,aAAa;iBAA6B,OAAO;EAQ7D,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAY9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAc7B,CAAC"}
@@ -0,0 +1,9 @@
1
+ export declare const classes: {
2
+ isClosed: string;
3
+ };
4
+ export declare const tokens: {
5
+ overlayBackgroundColor: string;
6
+ contentBackgroundColor: string;
7
+ handleColor: string;
8
+ };
9
+ //# sourceMappingURL=Sheet.tokens.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;CAMlB,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { ReactNode } from 'react';
2
+ export interface SheetProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /**
4
+ * Состояние шторки, открыта или скрыта
5
+ */
6
+ isOpen: boolean;
7
+ /**
8
+ * Обработчик закрытия шторки. Вызывается при клике по оверлею или смахиванию шторки вниз
9
+ */
10
+ onClose: () => void;
11
+ /**
12
+ * Наличие оверлея шторки. Если включен, то контент под шторкой перекрывается оверлеем, при нажатии на
13
+ * который шторка закрывается.
14
+ */
15
+ withOverlay?: boolean;
16
+ children?: ReactNode;
17
+ /**
18
+ * Наличие состояния анимации/перехода, по-умолчанию true.
19
+ */
20
+ withTransition?: boolean;
21
+ /**
22
+ * Throttling внутренних обработчиков события onScroll
23
+ */
24
+ throttleMs?: number;
25
+ view?: string;
26
+ }
27
+ export interface ThemeProviderContext {
28
+ lowPerformance: boolean;
29
+ [key: string]: unknown;
30
+ }
31
+ export declare type CommonProps = Pick<SheetProps, 'withTransition' | 'isOpen'> & {
32
+ theme: ThemeProviderContext;
33
+ };
34
+ export declare type SheetHookArgs = Pick<SheetProps, 'isOpen'>;
35
+ //# sourceMappingURL=Sheet.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Sheet.types.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,oBAAoB;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,oBAAY,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,gBAAgB,GAAG,QAAQ,CAAC,GAAG;IACtE,KAAK,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAEF,oBAAY,aAAa,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { useThemeContext } from './useThemeContext';
2
+ export { useSheetSwipe } from './useSheetSwipe';
3
+ export { useSheet } from './useSheet';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { SheetHookArgs } from '../Sheet.types';
2
+ export declare const useSheet: ({ isOpen }: SheetHookArgs) => void;
3
+ //# sourceMappingURL=useSheet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSheet.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useSheet.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,eAAO,MAAM,QAAQ,eAAgB,aAAa,SAgBjD,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare const useSheetSwipe: (args: {
3
+ contentWrapperRef: React.RefObject<HTMLDivElement>;
4
+ contentRef: React.RefObject<HTMLDivElement>;
5
+ handleRef: React.RefObject<HTMLDivElement>;
6
+ throttleMs?: number | undefined;
7
+ onClose: () => void;
8
+ }) => void;
9
+ //# sourceMappingURL=useSheetSwipe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSheetSwipe.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useSheetSwipe.ts"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAoB3D,eAAO,MAAM,aAAa;uBACH,MAAM,SAAS,CAAC,cAAc,CAAC;gBACtC,MAAM,SAAS,CAAC,cAAc,CAAC;eAChC,MAAM,SAAS,CAAC,cAAc,CAAC;;aAEjC,MAAM,IAAI;UA6FtB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ThemeProviderContext } from '../Sheet.types';
2
+ /**
3
+ * Возвращает контекст темы.
4
+ * @return {ThemeProviderContext}
5
+ */
6
+ export declare const useThemeContext: () => ThemeProviderContext;
7
+ //# sourceMappingURL=useThemeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Sheet/hooks/useThemeContext.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,oBAElC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { sheetConfig, sheetRoot } from './Sheet';
2
+ export { classes as sheetClasses, tokens as sheetTokens } from './Sheet.tokens';
3
+ export type { SheetProps } from './Sheet.types';
4
+ //# sourceMappingURL=index.d.ts.map