@salutejs/plasma-new-hope 0.88.0-canary.1253.9520566145.0 → 0.88.0-canary.1254.9539033175.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (178) hide show
  1. package/cjs/components/Accordion/Accordion.css +1 -0
  2. package/cjs/components/Accordion/Accordion.js +81 -0
  3. package/cjs/components/Accordion/Accordion.js.map +1 -0
  4. package/cjs/components/Accordion/Accordion.styles.js +9 -0
  5. package/cjs/components/Accordion/Accordion.styles.js.map +1 -0
  6. package/cjs/components/Accordion/Accordion.styles_rsiff6.css +1 -0
  7. package/cjs/components/Accordion/Accordion.tokens.js +45 -0
  8. package/cjs/components/Accordion/Accordion.tokens.js.map +1 -0
  9. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +97 -0
  10. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js.map +1 -0
  11. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +63 -0
  12. package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -0
  13. package/cjs/components/Accordion/utils/index.js +30 -0
  14. package/cjs/components/Accordion/utils/index.js.map +1 -0
  15. package/cjs/components/Accordion/variations/_size/base.js +9 -0
  16. package/cjs/components/Accordion/variations/_size/base.js.map +1 -0
  17. package/cjs/components/Accordion/variations/_size/base_x642ct.css +1 -0
  18. package/cjs/components/Accordion/variations/_view/base.js +9 -0
  19. package/cjs/components/Accordion/variations/_view/base.js.map +1 -0
  20. package/cjs/components/Accordion/variations/_view/base_x642ct.css +1 -0
  21. package/cjs/components/Range/Range.css +6 -6
  22. package/cjs/components/Slider/Slider.css +6 -6
  23. package/cjs/components/Slider/components/Double/Double.css +6 -6
  24. package/cjs/components/TextField/TextField.styles.js +1 -1
  25. package/cjs/components/TextField/TextField.styles.js.map +1 -1
  26. package/cjs/components/TextField/{TextField.styles_9fkr1l.css → TextField.styles_aqmut.css} +2 -2
  27. package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +24 -0
  28. package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js.map +1 -0
  29. package/cjs/components/_Icon/Icon.assets/Minus.js +22 -0
  30. package/cjs/components/_Icon/Icon.assets/Minus.js.map +1 -0
  31. package/cjs/components/_Icon/Icons/IconChevronDownFill.js +23 -0
  32. package/cjs/components/_Icon/Icons/IconChevronDownFill.js.map +1 -0
  33. package/cjs/components/_Icon/Icons/IconMinus.js +23 -0
  34. package/cjs/components/_Icon/Icons/IconMinus.js.map +1 -0
  35. package/cjs/index.css +8 -6
  36. package/cjs/index.js +8 -0
  37. package/cjs/index.js.map +1 -1
  38. package/es/components/Accordion/Accordion.css +1 -0
  39. package/es/components/Accordion/Accordion.js +76 -0
  40. package/es/components/Accordion/Accordion.js.map +1 -0
  41. package/es/components/Accordion/Accordion.styles.js +5 -0
  42. package/es/components/Accordion/Accordion.styles.js.map +1 -0
  43. package/es/components/Accordion/Accordion.styles_rsiff6.css +1 -0
  44. package/es/components/Accordion/Accordion.tokens.js +40 -0
  45. package/es/components/Accordion/Accordion.tokens.js.map +1 -0
  46. package/es/components/Accordion/ui/AccordionItem/AccordionItem.js +93 -0
  47. package/es/components/Accordion/ui/AccordionItem/AccordionItem.js.map +1 -0
  48. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +49 -0
  49. package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -0
  50. package/es/components/Accordion/utils/index.js +25 -0
  51. package/es/components/Accordion/utils/index.js.map +1 -0
  52. package/es/components/Accordion/variations/_size/base.js +5 -0
  53. package/es/components/Accordion/variations/_size/base.js.map +1 -0
  54. package/es/components/Accordion/variations/_size/base_x642ct.css +1 -0
  55. package/es/components/Accordion/variations/_view/base.js +5 -0
  56. package/es/components/Accordion/variations/_view/base.js.map +1 -0
  57. package/es/components/Accordion/variations/_view/base_x642ct.css +1 -0
  58. package/es/components/Range/Range.css +6 -6
  59. package/es/components/Slider/Slider.css +6 -6
  60. package/es/components/Slider/components/Double/Double.css +6 -6
  61. package/es/components/TextField/TextField.styles.js +1 -1
  62. package/es/components/TextField/TextField.styles.js.map +1 -1
  63. package/es/components/TextField/{TextField.styles_9fkr1l.css → TextField.styles_aqmut.css} +2 -2
  64. package/es/components/_Icon/Icon.assets/ChevronDownFill.js +20 -0
  65. package/es/components/_Icon/Icon.assets/ChevronDownFill.js.map +1 -0
  66. package/es/components/_Icon/Icon.assets/Minus.js +18 -0
  67. package/es/components/_Icon/Icon.assets/Minus.js.map +1 -0
  68. package/es/components/_Icon/Icons/IconChevronDownFill.js +19 -0
  69. package/es/components/_Icon/Icons/IconChevronDownFill.js.map +1 -0
  70. package/es/components/_Icon/Icons/IconMinus.js +19 -0
  71. package/es/components/_Icon/Icons/IconMinus.js.map +1 -0
  72. package/es/index.css +8 -6
  73. package/es/index.js +3 -0
  74. package/es/index.js.map +1 -1
  75. package/package.json +2 -2
  76. package/styled-components/cjs/components/Accordion/Accordion.js +90 -0
  77. package/styled-components/cjs/components/Accordion/Accordion.styles.js +9 -0
  78. package/styled-components/cjs/components/Accordion/Accordion.tokens.js +43 -0
  79. package/styled-components/cjs/components/Accordion/Accordion.types.js +5 -0
  80. package/styled-components/cjs/components/Accordion/index.js +38 -0
  81. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +103 -0
  82. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +49 -0
  83. package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.types.js +5 -0
  84. package/styled-components/cjs/components/Accordion/utils/index.js +27 -0
  85. package/styled-components/cjs/components/Accordion/variations/_size/base.js +8 -0
  86. package/styled-components/cjs/components/Accordion/variations/_size/tokens.json +6 -0
  87. package/styled-components/cjs/components/Accordion/variations/_stretching/base.js +8 -0
  88. package/styled-components/cjs/components/Accordion/variations/_stretching/tokens.json +1 -0
  89. package/styled-components/cjs/components/Accordion/variations/_view/base.js +8 -0
  90. package/styled-components/cjs/components/Accordion/variations/_view/tokens.json +8 -0
  91. package/styled-components/cjs/components/TextField/TextField.styles.js +2 -2
  92. package/styled-components/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +23 -0
  93. package/styled-components/cjs/components/_Icon/Icon.assets/Minus.js +21 -0
  94. package/styled-components/cjs/components/_Icon/Icons/IconChevronDownFill.js +22 -0
  95. package/styled-components/cjs/components/_Icon/Icons/IconMinus.js +22 -0
  96. package/styled-components/cjs/components/_Icon/index.js +15 -1
  97. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.config.js +26 -0
  98. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.js +17 -0
  99. package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +66 -0
  100. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.config.js +30 -0
  101. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.js +17 -0
  102. package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx +65 -0
  103. package/styled-components/cjs/index.js +11 -0
  104. package/styled-components/es/components/Accordion/Accordion.js +81 -0
  105. package/styled-components/es/components/Accordion/Accordion.styles.js +3 -0
  106. package/styled-components/es/components/Accordion/Accordion.tokens.js +37 -0
  107. package/styled-components/es/components/Accordion/Accordion.types.js +1 -0
  108. package/styled-components/es/components/Accordion/index.js +3 -0
  109. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.js +94 -0
  110. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +42 -0
  111. package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.types.js +1 -0
  112. package/styled-components/es/components/Accordion/utils/index.js +21 -0
  113. package/styled-components/es/components/Accordion/variations/_size/base.js +2 -0
  114. package/styled-components/es/components/Accordion/variations/_size/tokens.json +6 -0
  115. package/styled-components/es/components/Accordion/variations/_stretching/base.js +2 -0
  116. package/styled-components/es/components/Accordion/variations/_stretching/tokens.json +1 -0
  117. package/styled-components/es/components/Accordion/variations/_view/base.js +2 -0
  118. package/styled-components/es/components/Accordion/variations/_view/tokens.json +8 -0
  119. package/styled-components/es/components/TextField/TextField.styles.js +2 -2
  120. package/styled-components/es/components/_Icon/Icon.assets/ChevronDownFill.js +16 -0
  121. package/styled-components/es/components/_Icon/Icon.assets/Minus.js +14 -0
  122. package/styled-components/es/components/_Icon/Icons/IconChevronDownFill.js +15 -0
  123. package/styled-components/es/components/_Icon/Icons/IconMinus.js +15 -0
  124. package/styled-components/es/components/_Icon/index.js +3 -1
  125. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.config.js +20 -0
  126. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.js +6 -0
  127. package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +66 -0
  128. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.config.js +24 -0
  129. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.js +6 -0
  130. package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.stories.tsx +65 -0
  131. package/styled-components/es/index.js +2 -1
  132. package/types/components/Accordion/Accordion.d.ts +43 -0
  133. package/types/components/Accordion/Accordion.d.ts.map +1 -0
  134. package/types/components/Accordion/Accordion.styles.d.ts +2 -0
  135. package/types/components/Accordion/Accordion.styles.d.ts.map +1 -0
  136. package/types/components/Accordion/Accordion.tokens.d.ts +38 -0
  137. package/types/components/Accordion/Accordion.tokens.d.ts.map +1 -0
  138. package/types/components/Accordion/Accordion.types.d.ts +36 -0
  139. package/types/components/Accordion/Accordion.types.d.ts.map +1 -0
  140. package/types/components/Accordion/index.d.ts +5 -0
  141. package/types/components/Accordion/index.d.ts.map +1 -0
  142. package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts +4 -0
  143. package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts.map +1 -0
  144. package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts +13 -0
  145. package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts.map +1 -0
  146. package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts +51 -0
  147. package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts.map +1 -0
  148. package/types/components/Accordion/utils/index.d.ts +17 -0
  149. package/types/components/Accordion/utils/index.d.ts.map +1 -0
  150. package/types/components/Accordion/variations/_size/base.d.ts +2 -0
  151. package/types/components/Accordion/variations/_size/base.d.ts.map +1 -0
  152. package/types/components/Accordion/variations/_stretching/base.d.ts +2 -0
  153. package/types/components/Accordion/variations/_stretching/base.d.ts.map +1 -0
  154. package/types/components/Accordion/variations/_view/base.d.ts +2 -0
  155. package/types/components/Accordion/variations/_view/base.d.ts.map +1 -0
  156. package/types/components/TextField/TextField.styles.d.ts.map +1 -1
  157. package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts +4 -0
  158. package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts.map +1 -0
  159. package/types/components/_Icon/Icon.assets/Minus.d.ts +4 -0
  160. package/types/components/_Icon/Icon.assets/Minus.d.ts.map +1 -0
  161. package/types/components/_Icon/Icons/IconChevronDownFill.d.ts +4 -0
  162. package/types/components/_Icon/Icons/IconChevronDownFill.d.ts.map +1 -0
  163. package/types/components/_Icon/Icons/IconMinus.d.ts +4 -0
  164. package/types/components/_Icon/Icons/IconMinus.d.ts.map +1 -0
  165. package/types/components/_Icon/index.d.ts +2 -0
  166. package/types/components/_Icon/index.d.ts.map +1 -1
  167. package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts +19 -0
  168. package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts.map +1 -0
  169. package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts +26 -0
  170. package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts.map +1 -0
  171. package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts +23 -0
  172. package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts.map +1 -0
  173. package/types/examples/plasma_web/components/Accordion/Accordion.d.ts +30 -0
  174. package/types/examples/plasma_web/components/Accordion/Accordion.d.ts.map +1 -0
  175. package/types/index.d.ts +1 -0
  176. package/types/index.d.ts.map +1 -1
  177. /package/cjs/components/{_Icon/Icons/IconClose.css → Accordion/ui/AccordionItem/AccordionItem.css} +0 -0
  178. /package/es/components/{_Icon/Icons/IconClose.css → Accordion/ui/AccordionItem/AccordionItem.css} +0 -0
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.StyledPlus = exports.StyledMinus = exports.StyledArrow = exports.StyledAccordionTitle = exports.StyledAccordionItem = exports.StyledAccordionHeaderLeft = exports.StyledAccordionHeader = exports.StyledAccordionContentRight = exports.StyledAccordionContentLeft = exports.StyledAccordionBodyAnimate = exports.StyledAccordionBody = void 0;
7
+ var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
8
+ var _Icon = /*#__PURE__*/require("../../../_Icon");
9
+ var _Accordion = /*#__PURE__*/require("../../Accordion.tokens");
10
+ var _mixins = /*#__PURE__*/require("../../../../mixins");
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ var StyledAccordionItem = exports.StyledAccordionItem = /*#__PURE__*/_styledComponents["default"].div.withConfig({
13
+ componentId: "plasma-new-hope__sc-20ij9z-0"
14
+ })(["background:var(", ");border-bottom:var(", ");&:last-child{border-bottom:none;}"], _Accordion.tokens.accordionItemBackground, _Accordion.tokens.accordionItemBorderBottom);
15
+ var StyledAccordionHeader = exports.StyledAccordionHeader = /*#__PURE__*/_styledComponents["default"].button.withConfig({
16
+ componentId: "plasma-new-hope__sc-20ij9z-1"
17
+ })(["width:100%;border:none;padding:var(", ");display:flex;gap:var(", ");justify-content:space-between;align-items:center;background:none;box-sizing:border-box;cursor:pointer;&.", "{opacity:0.4;cursor:not-allowed;}&:focus{outline:none;}", ""], _Accordion.tokens.accordionItemPadding, _Accordion.tokens.accordionItemGap, _Accordion.classes.accordionDisabled, /*#__PURE__*/(0, _mixins.addFocus)({
18
+ outlineOffset: '0.125rem',
19
+ outlineSize: '0.125rem',
20
+ outlineRadius: '0',
21
+ outlineColor: /*#__PURE__*/"var(".concat(_Accordion.tokens.accordionItemFocus, ")")
22
+ }));
23
+ var StyledAccordionHeaderLeft = exports.StyledAccordionHeaderLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
24
+ componentId: "plasma-new-hope__sc-20ij9z-2"
25
+ })(["display:flex;gap:var(", ");justify-content:space-between;align-items:center;"], _Accordion.tokens.accordionItemGap);
26
+ var StyledAccordionContentRight = exports.StyledAccordionContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
27
+ componentId: "plasma-new-hope__sc-20ij9z-3"
28
+ })(["transition:0.2s;transform:rotate(90deg);&.", "{transition:0.2s;transform:rotate(0deg);}"], _Accordion.classes.accordionItemShowBody);
29
+ var StyledAccordionContentLeft = exports.StyledAccordionContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
30
+ componentId: "plasma-new-hope__sc-20ij9z-4"
31
+ })(["transition:0.2s;display:flex;align-items:center;&.", "{transition:0.2s;transform:rotate(180deg);}"], _Accordion.classes.accordionItemShowBody);
32
+ var StyledAccordionTitle = exports.StyledAccordionTitle = /*#__PURE__*/_styledComponents["default"].div.withConfig({
33
+ componentId: "plasma-new-hope__sc-20ij9z-5"
34
+ })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");"], _Accordion.tokens.accordionItemTitleColor, _Accordion.tokens.accordionItemTitleFontFamily, _Accordion.tokens.accordionItemTitleFontSize, _Accordion.tokens.accordionItemTitleFontWeight, _Accordion.tokens.accordionItemTitleFontStyle, _Accordion.tokens.accordionItemTitleLetterSpacing, _Accordion.tokens.accordionItemTitleLineHeight);
35
+ var StyledAccordionBodyAnimate = exports.StyledAccordionBodyAnimate = /*#__PURE__*/_styledComponents["default"].div.withConfig({
36
+ componentId: "plasma-new-hope__sc-20ij9z-6"
37
+ })(["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);}}"], _Accordion.classes.accordionItemShowBody, _Accordion.tokens.accordionItemPaddingVertical, _Accordion.classes.accordionPlusAnimationElement);
38
+ var StyledAccordionBody = exports.StyledAccordionBody = /*#__PURE__*/_styledComponents["default"].div.withConfig({
39
+ componentId: "plasma-new-hope__sc-20ij9z-7"
40
+ })(["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(", ");"], _Accordion.tokens.accordionItemTextColor, _Accordion.tokens.accordionItemTextFontFamily, _Accordion.tokens.accordionItemTextFontSize, _Accordion.tokens.accordionItemTextFontWeight, _Accordion.tokens.accordionItemTextFontStyle, _Accordion.tokens.accordionItemTextLetterSpacing, _Accordion.tokens.accordionItemTextLineHeight, _Accordion.tokens.accordionItemPaddingHorizontal, _Accordion.tokens.accordionItemPaddingHorizontal);
41
+ var StyledArrow = exports.StyledArrow = /*#__PURE__*/(0, _styledComponents["default"])(_Icon.IconChevronDownFill).withConfig({
42
+ componentId: "plasma-new-hope__sc-20ij9z-8"
43
+ })(["pointer-events:none;user-select:none;color:var(", ");"], _Accordion.tokens.accordionItemTextColor);
44
+ var StyledMinus = exports.StyledMinus = /*#__PURE__*/(0, _styledComponents["default"])(_Icon.IconMinus).withConfig({
45
+ componentId: "plasma-new-hope__sc-20ij9z-9"
46
+ })(["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);}"], _Accordion.tokens.accordionItemTextColor, _Accordion.classes.accordionPlusAnimationElement, _Accordion.classes.accordionItemShowBody);
47
+ var StyledPlus = exports.StyledPlus = /*#__PURE__*/_styledComponents["default"].div.withConfig({
48
+ componentId: "plasma-new-hope__sc-20ij9z-10"
49
+ })(["position:relative;height:1rem;display:flex;align-items:center;justify-content:center;width:1rem;"]);
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.updatePropsRecursively = exports.getChildren = void 0;
7
+ var _react = /*#__PURE__*/require("react");
8
+ var updatePropsRecursively = exports.updatePropsRecursively = function updatePropsRecursively(children, activeIndex, disabled, updateValue) {
9
+ return _react.Children.map(children || [], function (child, index) {
10
+ if (! /*#__PURE__*/(0, _react.isValidElement)(child)) {
11
+ return child;
12
+ }
13
+ var props = {
14
+ index: index,
15
+ value: !!((activeIndex === null || activeIndex === void 0 ? void 0 : activeIndex.findIndex(function (i) {
16
+ var _child$props$eventKey;
17
+ return i === ((_child$props$eventKey = child.props.eventKey) !== null && _child$props$eventKey !== void 0 ? _child$props$eventKey : index);
18
+ })) !== -1),
19
+ disabled: disabled,
20
+ onChange: updateValue
21
+ };
22
+ return /*#__PURE__*/(0, _react.cloneElement)(child, props);
23
+ });
24
+ };
25
+ var getChildren = exports.getChildren = function getChildren(children, activeIndex, disabled, updateValue) {
26
+ return updatePropsRecursively(children, activeIndex, disabled, updateValue);
27
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
@@ -0,0 +1,6 @@
1
+ [
2
+ "--plasma-accordion-item-padding-vertical",
3
+ "--plasma-accordion-item-padding-horizontal",
4
+ "--plasma-accordion-item-gap",
5
+ "--plasma-accordion-item-border-radius"
6
+ ]
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.base = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var base = exports.base = /*#__PURE__*/(0, _styledComponents.css)([""]);
@@ -0,0 +1,8 @@
1
+ [
2
+ "--plasma-accordion-width",
3
+ "--plasma-accordion-gap",
4
+ "--plasma-accordion-item-padding",
5
+ "--plasma-accordion-background",
6
+ "--plasma-accordion-item-background",
7
+ "--plasma-accordion-item-border-bottom"
8
+ ]
@@ -24,10 +24,10 @@ var Label = exports.Label = /*#__PURE__*/_styledComponents["default"].label.with
24
24
  })([""]);
25
25
  var StyledContentLeft = exports.StyledContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
26
26
  componentId: "plasma-new-hope__sc-g4vxbb-5"
27
- })(["margin:var(", ");line-height:0;"], _TextField.tokens.leftContentMargin);
27
+ })(["margin:var(", ");"], _TextField.tokens.leftContentMargin);
28
28
  var StyledContentRight = exports.StyledContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
29
29
  componentId: "plasma-new-hope__sc-g4vxbb-6"
30
- })(["margin:var(", ");line-height:0;"], _TextField.tokens.rightContentMargin);
30
+ })(["margin:var(", ");"], _TextField.tokens.rightContentMargin);
31
31
  var LeftHelper = exports.LeftHelper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
32
32
  componentId: "plasma-new-hope__sc-g4vxbb-7"
33
33
  })([""]);
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ChevronDownFill = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _path;
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ 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); }
11
+ var ChevronDownFill = exports.ChevronDownFill = function ChevronDownFill(props) {
12
+ return /*#__PURE__*/_react["default"].createElement("svg", _extends({
13
+ width: "100%",
14
+ viewBox: "0 0 16 16",
15
+ fill: "none"
16
+ }, props), _path || (_path = /*#__PURE__*/_react["default"].createElement("path", {
17
+ id: "path",
18
+ 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",
19
+ fillRule: "evenodd",
20
+ fill: "currentColor",
21
+ clipRule: "evenodd"
22
+ })));
23
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Minus = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _path;
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
+ 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); }
11
+ var Minus = exports.Minus = function Minus(props) {
12
+ return /*#__PURE__*/_react["default"].createElement("svg", _extends({
13
+ width: "100%",
14
+ viewBox: "0 0 24 24",
15
+ fill: "none"
16
+ }, props), _path || (_path = /*#__PURE__*/_react["default"].createElement("path", {
17
+ id: "icon",
18
+ 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",
19
+ fill: "currentColor"
20
+ })));
21
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconChevronDownFill = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _ChevronDownFill = /*#__PURE__*/require("../Icon.assets/ChevronDownFill");
9
+ var _IconRoot = /*#__PURE__*/require("../IconRoot");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ var IconChevronDownFill = exports.IconChevronDownFill = function IconChevronDownFill(_ref) {
12
+ var _ref$size = _ref.size,
13
+ size = _ref$size === void 0 ? 'xs' : _ref$size,
14
+ color = _ref.color,
15
+ className = _ref.className;
16
+ return /*#__PURE__*/_react["default"].createElement(_IconRoot.IconRoot, {
17
+ className: className,
18
+ size: size,
19
+ color: color,
20
+ icon: _ChevronDownFill.ChevronDownFill
21
+ });
22
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.IconMinus = void 0;
7
+ var _react = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("react"));
8
+ var _Minus = /*#__PURE__*/require("../Icon.assets/Minus");
9
+ var _IconRoot = /*#__PURE__*/require("../IconRoot");
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ var IconMinus = exports.IconMinus = function IconMinus(_ref) {
12
+ var _ref$size = _ref.size,
13
+ size = _ref$size === void 0 ? 's' : _ref$size,
14
+ color = _ref.color,
15
+ className = _ref.className;
16
+ return /*#__PURE__*/_react["default"].createElement(_IconRoot.IconRoot, {
17
+ className: className,
18
+ size: size,
19
+ color: color,
20
+ icon: _Minus.Minus
21
+ });
22
+ };
@@ -15,6 +15,12 @@ Object.defineProperty(exports, "IconChevronDown", {
15
15
  return _IconChevronDown.IconChevronDown;
16
16
  }
17
17
  });
18
+ Object.defineProperty(exports, "IconChevronDownFill", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _IconChevronDownFill.IconChevronDownFill;
22
+ }
23
+ });
18
24
  Object.defineProperty(exports, "IconChevronLeft", {
19
25
  enumerable: true,
20
26
  get: function get() {
@@ -57,12 +63,20 @@ Object.defineProperty(exports, "IconMic", {
57
63
  return _IconMic.IconMic;
58
64
  }
59
65
  });
66
+ Object.defineProperty(exports, "IconMinus", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _IconMinus.IconMinus;
70
+ }
71
+ });
60
72
  var _IconDisclosureLeft = /*#__PURE__*/require("./Icons/IconDisclosureLeft");
61
73
  var _IconDisclosureRight = /*#__PURE__*/require("./Icons/IconDisclosureRight");
62
74
  var _IconMic = /*#__PURE__*/require("./Icons/IconMic");
63
75
  var _IconChevronLeft = /*#__PURE__*/require("./Icons/IconChevronLeft");
64
76
  var _IconChevronDoubleLeft = /*#__PURE__*/require("./Icons/IconChevronDoubleLeft");
65
77
  var _IconChevronDown = /*#__PURE__*/require("./Icons/IconChevronDown");
78
+ var _IconChevronDownFill = /*#__PURE__*/require("./Icons/IconChevronDownFill");
66
79
  var _IconClose = /*#__PURE__*/require("./Icons/IconClose");
67
80
  var _IconCross = /*#__PURE__*/require("./Icons/IconCross");
68
- var _IconDone = /*#__PURE__*/require("./Icons/IconDone");
81
+ var _IconDone = /*#__PURE__*/require("./Icons/IconDone");
82
+ var _IconMinus = /*#__PURE__*/require("./Icons/IconMinus");
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
9
+ var config = exports.config = {
10
+ defaults: {
11
+ view: 'default',
12
+ size: 'm'
13
+ },
14
+ variations: {
15
+ view: {
16
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":var(", ") var(", ");", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);", ":0;"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPadding, _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionBackground, _Accordion.accordionTokens.accordionItemBorderBottom),
17
+ clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":0;", ":20rem;", ":var(", ") 0rem;", ":var(--surface-clear);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-clear);", ":0.125rem solid var(--surface-solid-tertiary);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPadding, _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionBackground, _Accordion.accordionTokens.accordionItemBorderBottom)
18
+ },
19
+ size: {
20
+ l: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
21
+ m: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
22
+ s: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
23
+ xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight)
24
+ }
25
+ }
26
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Accordion = void 0;
7
+ Object.defineProperty(exports, "AccordionItem", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _Accordion.AccordionItem;
11
+ }
12
+ });
13
+ var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
14
+ var _engines = /*#__PURE__*/require("../../../../engines");
15
+ var _Accordion2 = /*#__PURE__*/require("./Accordion.config");
16
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Accordion.accordionConfig, _Accordion2.config);
17
+ var Accordion = exports.Accordion = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,66 @@
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
+ singleActive: false,
19
+ view: 'default',
20
+ size: 'm',
21
+ stretching: 'filled',
22
+ type: 'arrow',
23
+ disabled: false,
24
+ title: 'Как оплатить заправку бонусами СберСпасибо?',
25
+ body:
26
+ 'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
27
+ },
28
+ argTypes: {
29
+ ...argTypesFromConfig(mergeConfig(accordionConfig, config)),
30
+ ...disableProps(['text']),
31
+ stretching: {
32
+ options: ['filled', 'fixed'],
33
+ control: {
34
+ type: 'select',
35
+ },
36
+ },
37
+ type: {
38
+ options: ['arrow', 'sign', 'clear'],
39
+ control: {
40
+ type: 'select',
41
+ },
42
+ },
43
+ },
44
+ };
45
+
46
+ export default meta;
47
+
48
+ export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
49
+ render: (props: ComponentProps<typeof Accordion>) => {
50
+ const args = { ...props, text: undefined };
51
+
52
+ return (
53
+ <Accordion {...args}>
54
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
55
+ {args.body}
56
+ </AccordionItem>
57
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
58
+ {args.body}
59
+ </AccordionItem>
60
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
61
+ {args.body}
62
+ </AccordionItem>
63
+ </Accordion>
64
+ );
65
+ },
66
+ };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.config = void 0;
7
+ var _styledComponents = /*#__PURE__*/require("styled-components");
8
+ var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
9
+ var config = exports.config = {
10
+ defaults: {
11
+ view: 'default',
12
+ size: 'm'
13
+ },
14
+ variations: {
15
+ view: {
16
+ "default": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":var(", ") var(", ");", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);", ":0;"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPadding, _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionBackground, _Accordion.accordionTokens.accordionItemBorderBottom),
17
+ clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":var(", ") 0rem;", ":var(--surface-clear);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-clear);", ":0.125rem solid var(--surface-solid-tertiary);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPadding, _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionBackground, _Accordion.accordionTokens.accordionItemBorderBottom)
18
+ },
19
+ size: {
20
+ l: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
21
+ m: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
22
+ s: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight),
23
+ xs: /*#__PURE__*/(0, _styledComponents.css)(["", ":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);"], _Accordion.accordionTokens.accordionItemPaddingVertical, _Accordion.accordionTokens.accordionItemPaddingHorizontal, _Accordion.accordionTokens.accordionItemGap, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionItemTitleFontFamily, _Accordion.accordionTokens.accordionItemTitleFontSize, _Accordion.accordionTokens.accordionItemTitleFontStyle, _Accordion.accordionTokens.accordionItemTitleFontWeight, _Accordion.accordionTokens.accordionItemTitleLetterSpacing, _Accordion.accordionTokens.accordionItemTitleLineHeight, _Accordion.accordionTokens.accordionItemTextFontFamily, _Accordion.accordionTokens.accordionItemTextFontSize, _Accordion.accordionTokens.accordionItemTextFontStyle, _Accordion.accordionTokens.accordionItemTextFontWeight, _Accordion.accordionTokens.accordionItemTextLetterSpacing, _Accordion.accordionTokens.accordionItemTextLineHeight)
24
+ },
25
+ stretching: {
26
+ filled: /*#__PURE__*/(0, _styledComponents.css)([""]),
27
+ fixed: /*#__PURE__*/(0, _styledComponents.css)([""])
28
+ }
29
+ }
30
+ };
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Accordion = void 0;
7
+ Object.defineProperty(exports, "AccordionItem", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _Accordion.AccordionItem;
11
+ }
12
+ });
13
+ var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
14
+ var _engines = /*#__PURE__*/require("../../../../engines");
15
+ var _Accordion2 = /*#__PURE__*/require("./Accordion.config");
16
+ var mergedConfig = /*#__PURE__*/(0, _engines.mergeConfig)(_Accordion.accordionConfig, _Accordion2.config);
17
+ var Accordion = exports.Accordion = /*#__PURE__*/(0, _engines.component)(mergedConfig);
@@ -0,0 +1,65 @@
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
+ singleActive: false,
19
+ view: 'default',
20
+ size: 'm',
21
+ stretching: 'filled',
22
+ type: 'arrow',
23
+ title: 'Как оплатить заправку бонусами СберСпасибо?',
24
+ body:
25
+ 'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
26
+ },
27
+ argTypes: {
28
+ ...argTypesFromConfig(mergeConfig(accordionConfig, config)),
29
+ ...disableProps(['text']),
30
+ stretching: {
31
+ options: ['filled', 'fixed'],
32
+ control: {
33
+ type: 'select',
34
+ },
35
+ },
36
+ type: {
37
+ options: ['arrow', 'sign', 'clear'],
38
+ control: {
39
+ type: 'select',
40
+ },
41
+ },
42
+ },
43
+ };
44
+
45
+ export default meta;
46
+
47
+ export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
48
+ render: (props: ComponentProps<typeof Accordion>) => {
49
+ const args = { ...props, text: undefined };
50
+
51
+ return (
52
+ <Accordion {...args}>
53
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
54
+ {args.body}
55
+ </AccordionItem>
56
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
57
+ {args.body}
58
+ </AccordionItem>
59
+ <AccordionItem type={args.type} pin={args.pin} title={args.title}>
60
+ {args.body}
61
+ </AccordionItem>
62
+ </Accordion>
63
+ );
64
+ },
65
+ };
@@ -530,4 +530,15 @@ Object.keys(_Range).forEach(function (key) {
530
530
  return _Range[key];
531
531
  }
532
532
  });
533
+ });
534
+ var _Accordion = /*#__PURE__*/require("./components/Accordion");
535
+ Object.keys(_Accordion).forEach(function (key) {
536
+ if (key === "default" || key === "__esModule") return;
537
+ if (key in exports && exports[key] === _Accordion[key]) return;
538
+ Object.defineProperty(exports, key, {
539
+ enumerable: true,
540
+ get: function get() {
541
+ return _Accordion[key];
542
+ }
543
+ });
533
544
  });