@salutejs/plasma-new-hope 0.88.0-canary.1223.9316788273.0 → 0.88.0-canary.1225.9346550240.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
@@ -1,41 +0,0 @@
1
- import React, { forwardRef } from 'react';
2
- import { cx } from '../../utils';
3
- import { base } from './Accordion.styles';
4
- import { classes } from './Accordion.tokens';
5
- import { base as viewCSS } from './variations/_view/base';
6
- import { base as sizeCSS } from './variations/_size/base';
7
- export var accordionRoot = function accordionRoot(Root) {
8
- return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
9
- var size = _ref.size,
10
- view = _ref.view,
11
- _ref$stretching = _ref.stretching,
12
- stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching,
13
- children = _ref.children,
14
- className = _ref.className;
15
- var stretchingClass = classes["".concat(stretching, "Stretching")];
16
- return /*#__PURE__*/React.createElement(Root, {
17
- ref: outerRootRef,
18
- size: size,
19
- view: view,
20
- className: cx(stretchingClass, classes.accordionRoot, className)
21
- }, children);
22
- });
23
- };
24
- export var accordionConfig = {
25
- name: 'Accordion',
26
- tag: 'div',
27
- layout: accordionRoot,
28
- base: base,
29
- variations: {
30
- view: {
31
- css: viewCSS
32
- },
33
- size: {
34
- css: sizeCSS
35
- }
36
- },
37
- defaults: {
38
- view: 'default',
39
- size: 'm'
40
- }
41
- };
@@ -1,3 +0,0 @@
1
- import { css } from 'styled-components';
2
- import { classes, tokens } from './Accordion.tokens';
3
- export var base = /*#__PURE__*/css(["display:flex;flex-direction:column;gap:var(", ");align-items:stretch;height:auto;background:var(", ");&&.", "{width:var(", ");}&&.", "{width:100%;}"], tokens.accordionGap, tokens.accordionBackground, classes.fixedStretching, tokens.accordionWidth, classes.filledStretching);
@@ -1,37 +0,0 @@
1
- export var classes = {
2
- filledStretching: 'accordion-stretching-filled',
3
- fixedStretching: 'accordion-stretching-fixed',
4
- accordionRoot: 'accordion-root',
5
- accordionItem: 'accordion-item',
6
- clearAccordionItem: 'clear-accordion-item',
7
- accordionItemShowBody: 'accordion-item-show-body',
8
- accordionPlusAnimationElement: 'accordion-plus-animation-element'
9
- };
10
- export var tokens = {
11
- accordionGap: '--plasma-accordion-gap',
12
- accordionWidth: '--plasma-accordion-width',
13
- accordionBackground: '--plasma-accordion-background',
14
- accordionItemBackground: '--plasma-accordion-item-background',
15
- accordionItemBorderRadius: '--plasma-accordion-item-border-radius',
16
- accordionItemPaddingTop: '--plasma-accordion-item-padding-top',
17
- accordionItemPaddingRight: '--plasma-accordion-item-padding-right',
18
- accordionItemPaddingBottom: '--plasma-accordion-item-padding-bottom',
19
- accordionItemPaddingLeft: '--plasma-accordion-item-padding-left',
20
- accordionItemGap: '--plasma-accordion-item-gap',
21
- accordionItemFocus: '--plasma-accordion-item-focus',
22
- accordionItemBorderBottom: '--plasma-accordion-item-border-bottom',
23
- accordionItemTitleColor: '--plasma-accordion-item-title-color',
24
- accordionItemTitleFontFamily: '--plasma-accordion-item-title-font-family',
25
- accordionItemTitleFontSize: '--plasma-accordion-item-title-font-size',
26
- accordionItemTitleFontStyle: '--plasma-accordion-item-title-font-style',
27
- accordionItemTitleFontWeight: '--plasma-accordion-item-title-font-weight',
28
- accordionItemTitleLetterSpacing: '--plasma-accordion-item-title-letter-spacing',
29
- accordionItemTitleLineHeight: '--plasma-accordion-item-title-line-height',
30
- accordionItemTextColor: '--plasma-accordion-item-text-color',
31
- accordionItemTextFontFamily: '--plasma-accordion-item-text-font-family',
32
- accordionItemTextFontSize: '--plasma-accordion-item-text-font-size',
33
- accordionItemTextFontStyle: '--plasma-accordion-item-text-font-style',
34
- accordionItemTextFontWeight: '--plasma-accordion-item-text-font-weight',
35
- accordionItemTextLetterSpacing: '--plasma-accordion-item-text-letter-spacing',
36
- accordionItemTextLineHeight: '--plasma-accordion-item-text-line-height'
37
- };
@@ -1,3 +0,0 @@
1
- export { accordionRoot, accordionConfig } from './Accordion';
2
- export { AccordionItem } from './ui/AccordionItem/AccordionItem';
3
- export { tokens as accordionTokens, classes as accordionClasses } from './Accordion.tokens';
@@ -1,90 +0,0 @@
1
- var _StyledMinus, _StyledArrow;
2
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
- 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."); }
4
- 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); }
5
- 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; }
6
- 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; } }
7
- function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
- import React, { useState, useRef, useEffect } from 'react';
9
- import { convertRoundnessMatrix } from '../../../../utils/roundness';
10
- import { classes, tokens } from '../../Accordion.tokens';
11
- import { StyledAccordionItem, StyledAccordionHeader, StyledAccordionBody, StyledAccordionTitle, StyledAccordionContentLeft, StyledAccordionHeaderLeft, StyledAccordionContentRight, StyledArrow, StyledMinus, StyledPlus, StyledAccordionBodyAnimate } from './AccordionItem.styles';
12
- export var AccordionItem = function AccordionItem(_ref) {
13
- var value = _ref.value,
14
- contentRight = _ref.contentRight,
15
- contentLeft = _ref.contentLeft,
16
- title = _ref.title,
17
- _ref$pin = _ref.pin,
18
- pin = _ref$pin === void 0 ? 'square-square' : _ref$pin,
19
- body = _ref.body,
20
- _ref$type = _ref.type,
21
- type = _ref$type === void 0 ? 'sign' : _ref$type,
22
- eventKey = _ref.eventKey,
23
- onChangeValue = _ref.onChangeValue;
24
- var _useState = useState(value),
25
- _useState2 = _slicedToArray(_useState, 2),
26
- show = _useState2[0],
27
- setShow = _useState2[1];
28
- var _useState3 = useState(),
29
- _useState4 = _slicedToArray(_useState3, 2),
30
- leftPadding = _useState4[0],
31
- setLeftPadding = _useState4[1];
32
- var showHandler = function showHandler() {
33
- setShow(!show);
34
- onChangeValue && onChangeValue(!show, eventKey);
35
- };
36
- var onKeyPress = function onKeyPress(event) {
37
- event.persist();
38
- if (event.keyCode === 13) {
39
- showHandler();
40
- }
41
- };
42
- var leftContentRef = useRef(null);
43
- useEffect(function () {
44
- var _leftContentRef$curre, _leftContentRef$curre2;
45
- var leftContentWidth = (_leftContentRef$curre = leftContentRef === null || leftContentRef === void 0 || (_leftContentRef$curre2 = leftContentRef.current) === null || _leftContentRef$curre2 === void 0 ? void 0 : _leftContentRef$curre2.offsetWidth) !== null && _leftContentRef$curre !== void 0 ? _leftContentRef$curre : 0;
46
- var leftPaddingBody = leftContentWidth ? "calc(".concat(leftContentWidth, "px + var(").concat(tokens.accordionItemGap, "))") : 0;
47
- setLeftPadding(leftPaddingBody);
48
- }, [type, leftContentRef, setLeftPadding]);
49
- var showedBody = show ? classes.accordionItemShowBody : undefined;
50
- var StyledAnimationPLus = function StyledAnimationPLus() {
51
- return /*#__PURE__*/React.createElement(StyledPlus, null, _StyledMinus || (_StyledMinus = /*#__PURE__*/React.createElement(StyledMinus, {
52
- size: "xs",
53
- color: "inhert"
54
- })), /*#__PURE__*/React.createElement(StyledMinus, {
55
- size: "xs",
56
- color: "inhert",
57
- className: showedBody !== null && showedBody !== void 0 ? showedBody : classes.accordionPlusAnimationElement
58
- }));
59
- };
60
- var accordionBorderRadius = convertRoundnessMatrix(pin, "var(".concat(tokens.accordionItemBorderRadius, ")"));
61
- var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/React.createElement(StyledArrow, {
62
- size: "xs",
63
- color: "inhert"
64
- })) : undefined;
65
- var leftContentRotate = type === 'arrow' && show ? classes.accordionItemShowBody : undefined;
66
- var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? /*#__PURE__*/React.createElement(StyledAnimationPLus, null) : undefined;
67
- var rightContentRotate = type === 'sign' && show ? classes.accordionItemShowBody : undefined;
68
- return /*#__PURE__*/React.createElement(StyledAccordionItem, {
69
- role: "tab",
70
- className: classes.accordionItem,
71
- tabIndex: 0,
72
- key: eventKey,
73
- style: {
74
- borderRadius: accordionBorderRadius
75
- },
76
- onKeyDown: onKeyPress
77
- }, /*#__PURE__*/React.createElement(StyledAccordionHeader, {
78
- onClick: showHandler
79
- }, /*#__PURE__*/React.createElement(StyledAccordionHeaderLeft, null, leftContent && /*#__PURE__*/React.createElement(StyledAccordionContentLeft, {
80
- ref: leftContentRef,
81
- className: leftContentRotate
82
- }, leftContent), /*#__PURE__*/React.createElement(StyledAccordionTitle, null, title)), /*#__PURE__*/React.createElement(StyledAccordionContentRight, {
83
- className: rightContentRotate
84
- }, rightContent && rightContent)), /*#__PURE__*/React.createElement(StyledAccordionBodyAnimate, {
85
- className: showedBody,
86
- style: {
87
- paddingLeft: "".concat(leftPadding)
88
- }
89
- }, /*#__PURE__*/React.createElement(StyledAccordionBody, null, body)));
90
- };
@@ -1,42 +0,0 @@
1
- import styled from 'styled-components';
2
- import { IconChevronDownFill, IconMinus } from '../../../_Icon';
3
- import { classes, tokens } from '../../Accordion.tokens';
4
- import { addFocus } from '../../../../mixins';
5
- export var StyledAccordionItem = /*#__PURE__*/styled.div.withConfig({
6
- componentId: "plasma-new-hope__sc-20ij9z-0"
7
- })(["background:var(", ");border-bottom:var(", ");&:focus{outline:none;}", " &:last-child{border-bottom:none;}"], tokens.accordionItemBackground, tokens.accordionItemBorderBottom, /*#__PURE__*/addFocus({
8
- outlineOffset: '0.125rem',
9
- outlineSize: '0.125rem',
10
- outlineRadius: '0',
11
- outlineColor: /*#__PURE__*/"var(".concat(tokens.accordionItemFocus, ")")
12
- }));
13
- export var StyledAccordionHeader = /*#__PURE__*/styled.div.withConfig({
14
- componentId: "plasma-new-hope__sc-20ij9z-1"
15
- })(["padding-top:var(", ");padding-right:var(", ");padding-bottom:var(", ");padding-left:var(", ");display:flex;gap:var(", ");justify-content:space-between;align-items:center;cursor:pointer;"], tokens.accordionItemPaddingTop, tokens.accordionItemPaddingRight, tokens.accordionItemPaddingBottom, tokens.accordionItemPaddingLeft, tokens.accordionItemGap);
16
- export var StyledAccordionHeaderLeft = /*#__PURE__*/styled.div.withConfig({
17
- componentId: "plasma-new-hope__sc-20ij9z-2"
18
- })(["display:flex;gap:var(", ");justify-content:space-between;align-items:center;"], tokens.accordionItemGap);
19
- export var StyledAccordionContentRight = /*#__PURE__*/styled.div.withConfig({
20
- componentId: "plasma-new-hope__sc-20ij9z-3"
21
- })(["transition:0.2s;transform:rotate(90deg);&&.", "{transition:0.2s;transform:rotate(0deg);}"], classes.accordionItemShowBody);
22
- export var StyledAccordionContentLeft = /*#__PURE__*/styled.div.withConfig({
23
- componentId: "plasma-new-hope__sc-20ij9z-4"
24
- })(["transition:0.2s;display:flex;align-items:center;&&.", "{transition:0.2s;transform:rotate(180deg);}"], classes.accordionItemShowBody);
25
- export var StyledAccordionTitle = /*#__PURE__*/styled.div.withConfig({
26
- componentId: "plasma-new-hope__sc-20ij9z-5"
27
- })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.accordionItemTitleColor, tokens.accordionItemTitleFontFamily, tokens.accordionItemTitleFontSize, tokens.accordionItemTitleFontWeight, tokens.accordionItemTitleFontStyle, tokens.accordionItemTitleLetterSpacing, tokens.accordionItemTitleLineHeight);
28
- export var StyledAccordionBodyAnimate = /*#__PURE__*/styled.div.withConfig({
29
- componentId: "plasma-new-hope__sc-20ij9z-6"
30
- })(["display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.2s ease-out;overflow:hidden;&&.", "{grid-template-rows:1fr;padding-bottom:var(", ");&.", "{transition:0.2s;transform:rotate(0deg);}}"], classes.accordionItemShowBody, tokens.accordionItemPaddingBottom, classes.accordionPlusAnimationElement);
31
- export var StyledAccordionBody = /*#__PURE__*/styled.div.withConfig({
32
- componentId: "plasma-new-hope__sc-20ij9z-7"
33
- })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");overflow:hidden;padding-right:var(", ");padding-left:var(", ");"], tokens.accordionItemTextColor, tokens.accordionItemTextFontFamily, tokens.accordionItemTextFontSize, tokens.accordionItemTextFontWeight, tokens.accordionItemTextFontStyle, tokens.accordionItemTextLetterSpacing, tokens.accordionItemTextLineHeight, tokens.accordionItemPaddingRight, tokens.accordionItemPaddingLeft);
34
- export var StyledArrow = /*#__PURE__*/styled(IconChevronDownFill).withConfig({
35
- componentId: "plasma-new-hope__sc-20ij9z-8"
36
- })(["pointer-events:none;user-select:none;color:var(", ");"], tokens.accordionItemTextColor);
37
- export var StyledMinus = /*#__PURE__*/styled(IconMinus).withConfig({
38
- componentId: "plasma-new-hope__sc-20ij9z-9"
39
- })(["pointer-events:none;user-select:none;color:var(", ");display:flex;align-items:center;position:absolute;top:0;left:0;&&.", "{transition:0.2s;transform:rotate(90deg);}&&.", "{transition:0.2s;transform:rotate(0deg);}"], tokens.accordionItemTextColor, classes.accordionPlusAnimationElement, classes.accordionItemShowBody);
40
- export var StyledPlus = /*#__PURE__*/styled.div.withConfig({
41
- componentId: "plasma-new-hope__sc-20ij9z-10"
42
- })(["position:relative;height:1rem;display:flex;align-items:center;justify-content:center;width:1rem;"]);
@@ -1,6 +0,0 @@
1
- [
2
- "--plasma-button-height",
3
- "--plasma-button-padding",
4
- "--plasma-button-radius",
5
- { "name": "typography", "type": "enum", "value": "typo:body" }
6
- ]
@@ -1,2 +0,0 @@
1
- import { css } from 'styled-components';
2
- export var base = /*#__PURE__*/css([""]);
@@ -1 +0,0 @@
1
- ["--plasma-button-width"]
@@ -1,2 +0,0 @@
1
- import { css } from 'styled-components';
2
- export var base = /*#__PURE__*/css([""]);
@@ -1,8 +0,0 @@
1
- [
2
- "--plasma-button-color",
3
- "--plasma-button-bg-color",
4
- "--plasma-button-color-hover",
5
- "--plasma-button-bg-color-hover",
6
- "--plasma-button-color-active",
7
- "--plasma-button-bg-color-active"
8
- ]
@@ -1,25 +0,0 @@
1
- var _defs, _g;
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
- import React from 'react';
4
- export var ChevronDownFill = function ChevronDownFill(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "100%",
7
- viewBox: "0 0 16 16",
8
- fill: "none"
9
- }, props), _defs || (_defs = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
10
- id: "clip3066_154194"
11
- }, /*#__PURE__*/React.createElement("rect", {
12
- width: "16.000000",
13
- height: "16.000000",
14
- fill: "currentColor",
15
- fillOpacity: "0"
16
- })))), _g || (_g = /*#__PURE__*/React.createElement("g", {
17
- clipPath: "url(#clip3066_154194)"
18
- }, /*#__PURE__*/React.createElement("path", {
19
- id: "path",
20
- d: "M11.45 5.79C11.37 5.61 11.19 5.5 11 5.5L5 5.5C4.8 5.5 4.62 5.61 4.54 5.79C4.46 5.96 4.49 6.17 4.62 6.32L7.62 9.82C7.71 9.93 7.85 10 8 10C8.14 10 8.28 9.93 8.37 9.82L11.37 6.32C11.5 6.17 11.53 5.96 11.45 5.79Z",
21
- fillRule: "evenodd",
22
- fill: "currentColor",
23
- clipRule: "evenodd"
24
- }))));
25
- };
@@ -1,14 +0,0 @@
1
- var _path;
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
- import React from 'react';
4
- export var Minus = function Minus(props) {
5
- return /*#__PURE__*/React.createElement("svg", _extends({
6
- width: "100%",
7
- viewBox: "0 0 24 24",
8
- fill: "none"
9
- }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
10
- id: "icon",
11
- d: "M3.25 12C3.25 11.58 3.58 11.25 4 11.25L20 11.25C20.41 11.25 20.75 11.58 20.75 12C20.75 12.41 20.41 12.75 20 12.75L4 12.75C3.58 12.75 3.25 12.41 3.25 12Z",
12
- fill: "currentColor"
13
- })));
14
- };
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { ChevronDownFill } from '../Icon.assets/ChevronDownFill';
3
- import { IconRoot } from '../IconRoot';
4
- export var IconChevronDownFill = function IconChevronDownFill(_ref) {
5
- var _ref$size = _ref.size,
6
- size = _ref$size === void 0 ? 'xs' : _ref$size,
7
- color = _ref.color,
8
- className = _ref.className;
9
- return /*#__PURE__*/React.createElement(IconRoot, {
10
- className: className,
11
- size: size,
12
- color: color,
13
- icon: ChevronDownFill
14
- });
15
- };
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import { Minus } from '../Icon.assets/Minus';
3
- import { IconRoot } from '../IconRoot';
4
- export var IconMinus = function IconMinus(_ref) {
5
- var _ref$size = _ref.size,
6
- size = _ref$size === void 0 ? 's' : _ref$size,
7
- color = _ref.color,
8
- className = _ref.className;
9
- return /*#__PURE__*/React.createElement(IconRoot, {
10
- className: className,
11
- size: size,
12
- color: color,
13
- icon: Minus
14
- });
15
- };
@@ -1,24 +0,0 @@
1
- import { css } from 'styled-components';
2
- import { accordionTokens } from '../../../../components/Accordion';
3
- export var config = {
4
- defaults: {
5
- view: 'default',
6
- size: 'm'
7
- },
8
- variations: {
9
- view: {
10
- "default": /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);", ":0;"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom),
11
- clear: /*#__PURE__*/css(["", ":0;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--surface-clear);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-clear);", ":0.125rem solid var(--surface-solid-tertiary);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom)
12
- },
13
- size: {
14
- l: /*#__PURE__*/css(["", ":1.0625rem;", ":1.25rem;", ":1.0625rem;", ":1.25rem;", ":0.5rem;", ":0.875rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
15
- m: /*#__PURE__*/css(["", ":0.875rem;", ":1.125rem;", ":0.875rem;", ":1.125rem;", ":0.375rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
16
- s: /*#__PURE__*/css(["", ":0.6875rem;", ":0.875rem;", ":0.6875rem;", ":0.875rem;", ":0.375rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
17
- xs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":0.25rem;", ":0.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight)
18
- },
19
- stretching: {
20
- filled: /*#__PURE__*/css([""]),
21
- fixed: /*#__PURE__*/css([""])
22
- }
23
- }
24
- };
@@ -1,6 +0,0 @@
1
- import { accordionConfig, AccordionItem } from '../../../../components/Accordion';
2
- import { component, mergeConfig } from '../../../../engines';
3
- import { config } from './Accordion.config';
4
- var mergedConfig = /*#__PURE__*/mergeConfig(accordionConfig, config);
5
- export var Accordion = /*#__PURE__*/component(mergedConfig);
6
- export { AccordionItem };
@@ -1,75 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps } from 'react';
3
- import type { StoryObj, Meta } from '@storybook/react';
4
- import { disableProps } from '@salutejs/plasma-sb-utils';
5
-
6
- import { mergeConfig } from '../../../../engines';
7
- import { WithTheme, argTypesFromConfig } from '../../../_helpers';
8
- import { accordionConfig } from '../../../../components/Accordion';
9
-
10
- import { config } from './Accordion.config';
11
- import { Accordion, AccordionItem } from './Accordion';
12
-
13
- const meta: Meta<typeof Accordion> = {
14
- title: 'plasma_b2c/Accordion',
15
- decorators: [WithTheme],
16
- component: Accordion,
17
- args: {
18
- view: 'default',
19
- size: 'm',
20
- stretching: 'filled',
21
- pin: 'square-square',
22
- type: 'arrow',
23
- title: 'Как оплатить заправку бонусами СберСпасибо?',
24
- body:
25
- 'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
26
- },
27
- argTypes: {
28
- ...argTypesFromConfig(mergeConfig(accordionConfig, config)),
29
- pin: {
30
- options: [
31
- 'square-square',
32
- 'square-clear',
33
- 'clear-square',
34
- 'clear-clear',
35
- 'clear-circle',
36
- 'circle-clear',
37
- 'circle-circle',
38
- '',
39
- ],
40
- control: {
41
- type: 'select',
42
- },
43
- table: { defaultValue: { summary: 'bottom' } },
44
- },
45
- stretching: {
46
- options: ['filled', 'fixed'],
47
- control: {
48
- type: 'select',
49
- },
50
- },
51
- type: {
52
- options: ['arrow', 'sign', 'clear'],
53
- control: {
54
- type: 'select',
55
- },
56
- },
57
- },
58
- };
59
-
60
- export default meta;
61
-
62
- export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
63
- argTypes: { ...disableProps(['text']) },
64
- render: (props: ComponentProps<typeof Accordion>) => {
65
- const args = { ...props, text: undefined };
66
-
67
- return (
68
- <Accordion {...args}>
69
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
70
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
71
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
72
- </Accordion>
73
- );
74
- },
75
- };
@@ -1,24 +0,0 @@
1
- import { css } from 'styled-components';
2
- import { accordionTokens } from '../../../../components/Accordion';
3
- export var config = {
4
- defaults: {
5
- view: 'default',
6
- size: 'm'
7
- },
8
- variations: {
9
- view: {
10
- "default": /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);", ":0;"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom),
11
- clear: /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--surface-clear);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-clear);", ":0.125rem solid var(--surface-solid-tertiary);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom)
12
- },
13
- size: {
14
- l: /*#__PURE__*/css(["", ":1.0625rem;", ":1.25rem;", ":1.0625rem;", ":1.25rem;", ":0.5rem;", ":0.875rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
15
- m: /*#__PURE__*/css(["", ":0.875rem;", ":1.125rem;", ":0.875rem;", ":1.125rem;", ":0.375rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
16
- s: /*#__PURE__*/css(["", ":0.6875rem;", ":0.875rem;", ":0.6875rem;", ":0.875rem;", ":0.375rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
17
- xs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":0.5rem;", ":0.75rem;", ":0.25rem;", ":0.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], accordionTokens.accordionItemPaddingTop, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingBottom, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight)
18
- },
19
- stretching: {
20
- filled: /*#__PURE__*/css([""]),
21
- fixed: /*#__PURE__*/css([""])
22
- }
23
- }
24
- };
@@ -1,6 +0,0 @@
1
- import { accordionConfig, AccordionItem } from '../../../../components/Accordion';
2
- import { component, mergeConfig } from '../../../../engines';
3
- import { config } from './Accordion.config';
4
- var mergedConfig = /*#__PURE__*/mergeConfig(accordionConfig, config);
5
- export var Accordion = /*#__PURE__*/component(mergedConfig);
6
- export { AccordionItem };
@@ -1,75 +0,0 @@
1
- import * as React from 'react';
2
- import type { ComponentProps } from 'react';
3
- import type { StoryObj, Meta } from '@storybook/react';
4
- import { disableProps } from '@salutejs/plasma-sb-utils';
5
-
6
- import { mergeConfig } from '../../../../engines';
7
- import { WithTheme, argTypesFromConfig } from '../../../_helpers';
8
- import { accordionConfig } from '../../../../components/Accordion';
9
-
10
- import { config } from './Accordion.config';
11
- import { Accordion, AccordionItem } from './Accordion';
12
-
13
- const meta: Meta<typeof Accordion> = {
14
- title: 'plasma_web/Accordion',
15
- decorators: [WithTheme],
16
- component: Accordion,
17
- args: {
18
- view: 'default',
19
- size: 'm',
20
- stretching: 'filled',
21
- pin: 'square-square',
22
- type: 'arrow',
23
- title: 'Как оплатить заправку бонусами СберСпасибо?',
24
- body:
25
- 'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
26
- },
27
- argTypes: {
28
- ...argTypesFromConfig(mergeConfig(accordionConfig, config)),
29
- pin: {
30
- options: [
31
- 'square-square',
32
- 'square-clear',
33
- 'clear-square',
34
- 'clear-clear',
35
- 'clear-circle',
36
- 'circle-clear',
37
- 'circle-circle',
38
- '',
39
- ],
40
- control: {
41
- type: 'select',
42
- },
43
- table: { defaultValue: { summary: 'bottom' } },
44
- },
45
- stretching: {
46
- options: ['filled', 'fixed'],
47
- control: {
48
- type: 'select',
49
- },
50
- },
51
- type: {
52
- options: ['arrow', 'sign', 'clear'],
53
- control: {
54
- type: 'select',
55
- },
56
- },
57
- },
58
- };
59
-
60
- export default meta;
61
-
62
- export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
63
- argTypes: { ...disableProps(['text']) },
64
- render: (props: ComponentProps<typeof Accordion>) => {
65
- const args = { ...props, text: undefined };
66
-
67
- return (
68
- <Accordion {...args}>
69
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
70
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
71
- <AccordionItem type={args.type} pin={args.pin} title={args.title} body={args.body} />
72
- </Accordion>
73
- );
74
- },
75
- };
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import { RootProps } from '../../engines';
3
- import type { AccordionProps } from './Accordion.types';
4
- export declare const accordionRoot: (Root: RootProps<HTMLDivElement, AccordionProps>) => React.ForwardRefExoticComponent<{
5
- view: string;
6
- size?: string | undefined;
7
- stretching?: "fixed" | "filled" | undefined;
8
- children?: React.ReactNode;
9
- className?: string | undefined;
10
- } & React.RefAttributes<HTMLDivElement>>;
11
- export declare const accordionConfig: {
12
- name: string;
13
- tag: string;
14
- layout: (Root: RootProps<HTMLDivElement, AccordionProps>) => React.ForwardRefExoticComponent<{
15
- view: string;
16
- size?: string | undefined;
17
- stretching?: "fixed" | "filled" | undefined;
18
- children?: React.ReactNode;
19
- className?: string | undefined;
20
- } & React.RefAttributes<HTMLDivElement>>;
21
- base: import("@linaria/core").LinariaClassName;
22
- variations: {
23
- view: {
24
- css: import("@linaria/core").LinariaClassName;
25
- };
26
- size: {
27
- css: import("@linaria/core").LinariaClassName;
28
- };
29
- };
30
- defaults: {
31
- view: string;
32
- size: string;
33
- };
34
- };
35
- //# sourceMappingURL=Accordion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMxD,eAAO,MAAM,aAAa,SAAU,UAAU,cAAc,EAAE,cAAc,CAAC;;;;;;wCAgBxE,CAAC;AAEN,eAAO,MAAM,eAAe;;;mBAlBQ,UAAU,cAAc,EAAE,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;CAmC5E,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const base: import("@linaria/core").LinariaClassName;
2
- //# sourceMappingURL=Accordion.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Accordion.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAchB,CAAC"}