@salutejs/plasma-new-hope 0.88.0-canary.1223.9286484439.0 → 0.88.0-canary.1223.9302553119.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +4 -4
- package/styled-components/cjs/components/Accordion/Accordion.js +1 -1
- package/styled-components/cjs/components/Accordion/Accordion.tokens.js +2 -1
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +20 -13
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +9 -6
- package/styled-components/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +32 -0
- package/styled-components/cjs/components/_Icon/Icon.assets/Minus.js +21 -0
- package/styled-components/cjs/components/_Icon/Icons/IconChevronDownFill.js +22 -0
- package/styled-components/cjs/components/_Icon/Icons/IconMinus.js +22 -0
- package/styled-components/cjs/components/_Icon/index.js +15 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.config.js +2 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.config.js +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx +4 -19
- package/styled-components/es/components/Accordion/Accordion.js +1 -1
- package/styled-components/es/components/Accordion/Accordion.tokens.js +2 -1
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.js +21 -14
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +9 -6
- package/styled-components/es/components/_Icon/Icon.assets/ChevronDownFill.js +25 -0
- package/styled-components/es/components/_Icon/Icon.assets/Minus.js +14 -0
- package/styled-components/es/components/_Icon/Icons/IconChevronDownFill.js +15 -0
- package/styled-components/es/components/_Icon/Icons/IconMinus.js +15 -0
- package/styled-components/es/components/_Icon/index.js +3 -1
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.config.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.config.js +2 -2
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.stories.tsx +4 -19
- package/types/components/Accordion/Accordion.tokens.d.ts +1 -0
- package/types/components/Accordion/Accordion.tokens.d.ts.map +1 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts +2 -1
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts.map +1 -0
- package/types/components/_Icon/Icon.assets/Minus.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/Minus.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts +4 -0
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconMinus.d.ts +4 -0
- package/types/components/_Icon/Icons/IconMinus.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +2 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts +1 -1
- package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts +1 -1
- package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts +1 -1
- package/types/examples/plasma_web/components/Accordion/Accordion.d.ts +1 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.88.0-canary.1223.
|
3
|
+
"version": "0.88.0-canary.1223.9302553119.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -68,7 +68,7 @@
|
|
68
68
|
"@rollup/plugin-babel": "^6.0.4",
|
69
69
|
"@rollup/plugin-commonjs": "^25.0.4",
|
70
70
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
71
|
-
"@salutejs/plasma-sb-utils": "0.158.0
|
71
|
+
"@salutejs/plasma-sb-utils": "0.158.0",
|
72
72
|
"@storybook/addon-docs": "^7.6.17",
|
73
73
|
"@storybook/addon-essentials": "^7.6.17",
|
74
74
|
"@storybook/addons": "^7.6.17",
|
@@ -97,11 +97,11 @@
|
|
97
97
|
"@linaria/core": "5.0.2",
|
98
98
|
"@linaria/react": "5.0.3",
|
99
99
|
"@popperjs/core": "2.11.8",
|
100
|
-
"@salutejs/plasma-core": "1.160.0
|
100
|
+
"@salutejs/plasma-core": "1.160.0",
|
101
101
|
"focus-visible": "5.2.0",
|
102
102
|
"react-draggable": "4.4.3",
|
103
103
|
"react-popper": "2.3.0",
|
104
104
|
"storeon": "3.1.5"
|
105
105
|
},
|
106
|
-
"gitHead": "
|
106
|
+
"gitHead": "87d78f583ce31022b0bcaa10859379befa5c45ef"
|
107
107
|
}
|
@@ -10,7 +10,8 @@ var classes = exports.classes = {
|
|
10
10
|
accordionRoot: 'accordion-root',
|
11
11
|
accordionItem: 'accordion-item',
|
12
12
|
clearAccordionItem: 'clear-accordion-item',
|
13
|
-
accordionItemShowBody: 'accordion-item-show-body'
|
13
|
+
accordionItemShowBody: 'accordion-item-show-body',
|
14
|
+
accordionPlusAnimationElement: 'accordion-plus-animation-element'
|
14
15
|
};
|
15
16
|
var tokens = exports.tokens = {
|
16
17
|
accordionGap: '--plasma-accordion-gap',
|
@@ -9,7 +9,7 @@ var _react = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("react")
|
|
9
9
|
var _roundness = /*#__PURE__*/require("../../../../utils/roundness");
|
10
10
|
var _Accordion = /*#__PURE__*/require("../../Accordion.tokens");
|
11
11
|
var _AccordionItem = /*#__PURE__*/require("./AccordionItem.styles");
|
12
|
-
var
|
12
|
+
var _StyledMinus, _StyledArrow;
|
13
13
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
14
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
15
15
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
@@ -37,18 +37,6 @@ var AccordionItem = exports.AccordionItem = function AccordionItem(_ref) {
|
|
37
37
|
_useState4 = _slicedToArray(_useState3, 2),
|
38
38
|
leftPadding = _useState4[0],
|
39
39
|
setLeftPadding = _useState4[1];
|
40
|
-
var accordionBorderRadius = (0, _roundness.convertRoundnessMatrix)(pin, "var(".concat(_Accordion.tokens.accordionItemBorderRadius, ")"));
|
41
|
-
var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledArrow, {
|
42
|
-
size: "s",
|
43
|
-
color: "inhert"
|
44
|
-
})) : undefined;
|
45
|
-
var leftContentRotate = type === 'arrow' && show ? _Accordion.classes.accordionItemShowBody : undefined;
|
46
|
-
var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? _StyledClose || (_StyledClose = /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledClose, {
|
47
|
-
size: "xs",
|
48
|
-
color: "inhert"
|
49
|
-
})) : undefined;
|
50
|
-
var rightContentRotate = type === 'sign' && show ? _Accordion.classes.accordionItemShowBody : undefined;
|
51
|
-
var showedBody = show ? _Accordion.classes.accordionItemShowBody : undefined;
|
52
40
|
var showHandler = function showHandler() {
|
53
41
|
setShow(!show);
|
54
42
|
onChangeValue && onChangeValue(!show);
|
@@ -66,6 +54,25 @@ var AccordionItem = exports.AccordionItem = function AccordionItem(_ref) {
|
|
66
54
|
var leftPaddingBody = leftContentWidth ? "calc(".concat(leftContentWidth, "px + var(").concat(_Accordion.tokens.accordionItemGap, "))") : 0;
|
67
55
|
setLeftPadding(leftPaddingBody);
|
68
56
|
}, [type, leftContentRef, setLeftPadding]);
|
57
|
+
var showedBody = show ? _Accordion.classes.accordionItemShowBody : undefined;
|
58
|
+
var StyledAnimationPLus = function StyledAnimationPLus() {
|
59
|
+
return /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledPlus, null, _StyledMinus || (_StyledMinus = /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledMinus, {
|
60
|
+
size: "xs",
|
61
|
+
color: "inhert"
|
62
|
+
})), /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledMinus, {
|
63
|
+
size: "xs",
|
64
|
+
color: "inhert",
|
65
|
+
className: showedBody !== null && showedBody !== void 0 ? showedBody : _Accordion.classes.accordionPlusAnimationElement
|
66
|
+
}));
|
67
|
+
};
|
68
|
+
var accordionBorderRadius = (0, _roundness.convertRoundnessMatrix)(pin, "var(".concat(_Accordion.tokens.accordionItemBorderRadius, ")"));
|
69
|
+
var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledArrow, {
|
70
|
+
size: "xs",
|
71
|
+
color: "inhert"
|
72
|
+
})) : undefined;
|
73
|
+
var leftContentRotate = type === 'arrow' && show ? _Accordion.classes.accordionItemShowBody : undefined;
|
74
|
+
var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? /*#__PURE__*/_react["default"].createElement(StyledAnimationPLus, null) : undefined;
|
75
|
+
var rightContentRotate = type === 'sign' && show ? _Accordion.classes.accordionItemShowBody : undefined;
|
69
76
|
return /*#__PURE__*/_react["default"].createElement(_AccordionItem.StyledAccordionItem, {
|
70
77
|
role: "tab",
|
71
78
|
tabIndex: 0,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
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
7
|
var _styledComponents = /*#__PURE__*/_interopRequireDefault( /*#__PURE__*/require("styled-components"));
|
8
8
|
var _Icon = /*#__PURE__*/require("../../../_Icon");
|
9
9
|
var _Accordion = /*#__PURE__*/require("../../Accordion.tokens");
|
@@ -25,7 +25,7 @@ var StyledAccordionHeaderLeft = exports.StyledAccordionHeaderLeft = /*#__PURE__*
|
|
25
25
|
})(["display:flex;gap:var(", ");justify-content:space-between;align-items:center;"], _Accordion.tokens.accordionItemGap);
|
26
26
|
var StyledAccordionContentRight = exports.StyledAccordionContentRight = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
27
27
|
componentId: "plasma-new-hope__sc-20ij9z-3"
|
28
|
-
})(["transition:0.2s;&&.", "{transition:0.2s;transform:rotate(
|
28
|
+
})(["transition:0.2s;transform:rotate(90deg);&&.", "{transition:0.2s;transform:rotate(0deg);}"], _Accordion.classes.accordionItemShowBody);
|
29
29
|
var StyledAccordionContentLeft = exports.StyledAccordionContentLeft = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
30
30
|
componentId: "plasma-new-hope__sc-20ij9z-4"
|
31
31
|
})(["transition:0.2s;display:flex;align-items:center;&&.", "{transition:0.2s;transform:rotate(180deg);}"], _Accordion.classes.accordionItemShowBody);
|
@@ -34,13 +34,16 @@ var StyledAccordionTitle = exports.StyledAccordionTitle = /*#__PURE__*/_styledCo
|
|
34
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.accordionItemTitleFontWeight, _Accordion.tokens.accordionItemTitleFontSize, _Accordion.tokens.accordionItemTitleFontWeight, _Accordion.tokens.accordionItemTitleFontStyle, _Accordion.tokens.accordionItemTitleLetterSpacing, _Accordion.tokens.accordionItemTitleLineHeight);
|
35
35
|
var StyledAccordionBodyAnimate = exports.StyledAccordionBodyAnimate = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
36
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(", ");}"], _Accordion.classes.accordionItemShowBody, _Accordion.tokens.accordionItemPaddingBottom);
|
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.accordionItemPaddingBottom, _Accordion.classes.accordionPlusAnimationElement);
|
38
38
|
var StyledAccordionBody = exports.StyledAccordionBody = /*#__PURE__*/_styledComponents["default"].div.withConfig({
|
39
39
|
componentId: "plasma-new-hope__sc-20ij9z-7"
|
40
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.accordionItemTextFontWeight, _Accordion.tokens.accordionItemTextFontSize, _Accordion.tokens.accordionItemTextFontWeight, _Accordion.tokens.accordionItemTextFontStyle, _Accordion.tokens.accordionItemTextLetterSpacing, _Accordion.tokens.accordionItemTextLineHeight, _Accordion.tokens.accordionItemPaddingRight, _Accordion.tokens.accordionItemPaddingLeft);
|
41
|
-
var StyledArrow = exports.StyledArrow = /*#__PURE__*/(0, _styledComponents["default"])(_Icon.
|
41
|
+
var StyledArrow = exports.StyledArrow = /*#__PURE__*/(0, _styledComponents["default"])(_Icon.IconChevronDownFill).withConfig({
|
42
42
|
componentId: "plasma-new-hope__sc-20ij9z-8"
|
43
43
|
})(["pointer-events:none;user-select:none;color:var(", ");"], _Accordion.tokens.accordionItemTextColor);
|
44
|
-
var
|
44
|
+
var StyledMinus = exports.StyledMinus = /*#__PURE__*/(0, _styledComponents["default"])(_Icon.IconMinus).withConfig({
|
45
45
|
componentId: "plasma-new-hope__sc-20ij9z-9"
|
46
|
-
})(["pointer-events:none;user-select:none;color:var(", ");
|
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,32 @@
|
|
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 _defs, _g;
|
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), _defs || (_defs = /*#__PURE__*/_react["default"].createElement("defs", null, /*#__PURE__*/_react["default"].createElement("clipPath", {
|
17
|
+
id: "clip3066_154194"
|
18
|
+
}, /*#__PURE__*/_react["default"].createElement("rect", {
|
19
|
+
width: "16.000000",
|
20
|
+
height: "16.000000",
|
21
|
+
fill: "currentColor",
|
22
|
+
fillOpacity: "0"
|
23
|
+
})))), _g || (_g = /*#__PURE__*/_react["default"].createElement("g", {
|
24
|
+
clipPath: "url(#clip3066_154194)"
|
25
|
+
}, /*#__PURE__*/_react["default"].createElement("path", {
|
26
|
+
id: "path",
|
27
|
+
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",
|
28
|
+
fillRule: "evenodd",
|
29
|
+
fill: "currentColor",
|
30
|
+
clipRule: "evenodd"
|
31
|
+
}))));
|
32
|
+
};
|
@@ -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");
|
@@ -8,12 +8,12 @@ var _styledComponents = /*#__PURE__*/require("styled-components");
|
|
8
8
|
var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
|
9
9
|
var config = exports.config = {
|
10
10
|
defaults: {
|
11
|
-
view: '
|
11
|
+
view: 'default',
|
12
12
|
size: 'm'
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
|
16
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionBackground),
|
17
17
|
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--background-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-solid-tertiary);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPaddingRight, _Accordion.accordionTokens.accordionItemPaddingLeft, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionBackground)
|
18
18
|
},
|
19
19
|
size: {
|
@@ -8,12 +8,12 @@ var _styledComponents = /*#__PURE__*/require("styled-components");
|
|
8
8
|
var _Accordion = /*#__PURE__*/require("../../../../components/Accordion");
|
9
9
|
var config = exports.config = {
|
10
10
|
defaults: {
|
11
|
-
view: '
|
11
|
+
view: 'default',
|
12
12
|
size: 'm'
|
13
13
|
},
|
14
14
|
variations: {
|
15
15
|
view: {
|
16
|
-
|
16
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionBackground),
|
17
17
|
clear: /*#__PURE__*/(0, _styledComponents.css)(["", ":0.125rem;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--background-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-solid-tertiary);"], _Accordion.accordionTokens.accordionGap, _Accordion.accordionTokens.accordionWidth, _Accordion.accordionTokens.accordionItemPaddingRight, _Accordion.accordionTokens.accordionItemPaddingLeft, _Accordion.accordionTokens.accordionItemBackground, _Accordion.accordionTokens.accordionItemTitleColor, _Accordion.accordionTokens.accordionItemTextColor, _Accordion.accordionTokens.accordionItemFocus, _Accordion.accordionTokens.accordionItemBorderRadius, _Accordion.accordionTokens.accordionBackground)
|
18
18
|
},
|
19
19
|
size: {
|
package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx
CHANGED
@@ -15,7 +15,7 @@ const meta: Meta<typeof Accordion> = {
|
|
15
15
|
decorators: [WithTheme],
|
16
16
|
component: Accordion,
|
17
17
|
args: {
|
18
|
-
view: '
|
18
|
+
view: 'default',
|
19
19
|
size: 'm',
|
20
20
|
stretching: 'filled',
|
21
21
|
pin: 'square-square',
|
@@ -66,24 +66,9 @@ export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
|
|
66
66
|
|
67
67
|
return (
|
68
68
|
<Accordion {...args}>
|
69
|
-
<AccordionItem
|
70
|
-
|
71
|
-
|
72
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
73
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
74
|
-
/>
|
75
|
-
<AccordionItem
|
76
|
-
type={args.type}
|
77
|
-
pin={args.pin}
|
78
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
79
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
80
|
-
/>
|
81
|
-
<AccordionItem
|
82
|
-
type={args.type}
|
83
|
-
pin={args.pin}
|
84
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
85
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
86
|
-
/>
|
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} />
|
87
72
|
</Accordion>
|
88
73
|
);
|
89
74
|
},
|
@@ -4,7 +4,8 @@ export var classes = {
|
|
4
4
|
accordionRoot: 'accordion-root',
|
5
5
|
accordionItem: 'accordion-item',
|
6
6
|
clearAccordionItem: 'clear-accordion-item',
|
7
|
-
accordionItemShowBody: 'accordion-item-show-body'
|
7
|
+
accordionItemShowBody: 'accordion-item-show-body',
|
8
|
+
accordionPlusAnimationElement: 'accordion-plus-animation-element'
|
8
9
|
};
|
9
10
|
export var tokens = {
|
10
11
|
accordionGap: '--plasma-accordion-gap',
|
@@ -1,4 +1,4 @@
|
|
1
|
-
var
|
1
|
+
var _StyledMinus, _StyledArrow;
|
2
2
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
3
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
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); }
|
@@ -8,7 +8,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
8
8
|
import React, { useState, useRef, useEffect } from 'react';
|
9
9
|
import { convertRoundnessMatrix } from '../../../../utils/roundness';
|
10
10
|
import { classes, tokens } from '../../Accordion.tokens';
|
11
|
-
import { StyledAccordionItem, StyledAccordionHeader, StyledAccordionBody, StyledAccordionTitle, StyledAccordionContentLeft, StyledAccordionHeaderLeft, StyledAccordionContentRight, StyledArrow,
|
11
|
+
import { StyledAccordionItem, StyledAccordionHeader, StyledAccordionBody, StyledAccordionTitle, StyledAccordionContentLeft, StyledAccordionHeaderLeft, StyledAccordionContentRight, StyledArrow, StyledMinus, StyledPlus, StyledAccordionBodyAnimate } from './AccordionItem.styles';
|
12
12
|
export var AccordionItem = function AccordionItem(_ref) {
|
13
13
|
var value = _ref.value,
|
14
14
|
contentRight = _ref.contentRight,
|
@@ -28,18 +28,6 @@ export var AccordionItem = function AccordionItem(_ref) {
|
|
28
28
|
_useState4 = _slicedToArray(_useState3, 2),
|
29
29
|
leftPadding = _useState4[0],
|
30
30
|
setLeftPadding = _useState4[1];
|
31
|
-
var accordionBorderRadius = convertRoundnessMatrix(pin, "var(".concat(tokens.accordionItemBorderRadius, ")"));
|
32
|
-
var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/React.createElement(StyledArrow, {
|
33
|
-
size: "s",
|
34
|
-
color: "inhert"
|
35
|
-
})) : undefined;
|
36
|
-
var leftContentRotate = type === 'arrow' && show ? classes.accordionItemShowBody : undefined;
|
37
|
-
var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? _StyledClose || (_StyledClose = /*#__PURE__*/React.createElement(StyledClose, {
|
38
|
-
size: "xs",
|
39
|
-
color: "inhert"
|
40
|
-
})) : undefined;
|
41
|
-
var rightContentRotate = type === 'sign' && show ? classes.accordionItemShowBody : undefined;
|
42
|
-
var showedBody = show ? classes.accordionItemShowBody : undefined;
|
43
31
|
var showHandler = function showHandler() {
|
44
32
|
setShow(!show);
|
45
33
|
onChangeValue && onChangeValue(!show);
|
@@ -57,6 +45,25 @@ export var AccordionItem = function AccordionItem(_ref) {
|
|
57
45
|
var leftPaddingBody = leftContentWidth ? "calc(".concat(leftContentWidth, "px + var(").concat(tokens.accordionItemGap, "))") : 0;
|
58
46
|
setLeftPadding(leftPaddingBody);
|
59
47
|
}, [type, leftContentRef, setLeftPadding]);
|
48
|
+
var showedBody = show ? classes.accordionItemShowBody : undefined;
|
49
|
+
var StyledAnimationPLus = function StyledAnimationPLus() {
|
50
|
+
return /*#__PURE__*/React.createElement(StyledPlus, null, _StyledMinus || (_StyledMinus = /*#__PURE__*/React.createElement(StyledMinus, {
|
51
|
+
size: "xs",
|
52
|
+
color: "inhert"
|
53
|
+
})), /*#__PURE__*/React.createElement(StyledMinus, {
|
54
|
+
size: "xs",
|
55
|
+
color: "inhert",
|
56
|
+
className: showedBody !== null && showedBody !== void 0 ? showedBody : classes.accordionPlusAnimationElement
|
57
|
+
}));
|
58
|
+
};
|
59
|
+
var accordionBorderRadius = convertRoundnessMatrix(pin, "var(".concat(tokens.accordionItemBorderRadius, ")"));
|
60
|
+
var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/React.createElement(StyledArrow, {
|
61
|
+
size: "xs",
|
62
|
+
color: "inhert"
|
63
|
+
})) : undefined;
|
64
|
+
var leftContentRotate = type === 'arrow' && show ? classes.accordionItemShowBody : undefined;
|
65
|
+
var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? /*#__PURE__*/React.createElement(StyledAnimationPLus, null) : undefined;
|
66
|
+
var rightContentRotate = type === 'sign' && show ? classes.accordionItemShowBody : undefined;
|
60
67
|
return /*#__PURE__*/React.createElement(StyledAccordionItem, {
|
61
68
|
role: "tab",
|
62
69
|
tabIndex: 0,
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import styled from 'styled-components';
|
2
|
-
import {
|
2
|
+
import { IconChevronDownFill, IconMinus } from '../../../_Icon';
|
3
3
|
import { classes, tokens } from '../../Accordion.tokens';
|
4
4
|
import { addFocus } from '../../../../mixins';
|
5
5
|
export var StyledAccordionItem = /*#__PURE__*/styled.div.withConfig({
|
@@ -18,7 +18,7 @@ export var StyledAccordionHeaderLeft = /*#__PURE__*/styled.div.withConfig({
|
|
18
18
|
})(["display:flex;gap:var(", ");justify-content:space-between;align-items:center;"], tokens.accordionItemGap);
|
19
19
|
export var StyledAccordionContentRight = /*#__PURE__*/styled.div.withConfig({
|
20
20
|
componentId: "plasma-new-hope__sc-20ij9z-3"
|
21
|
-
})(["transition:0.2s;&&.", "{transition:0.2s;transform:rotate(
|
21
|
+
})(["transition:0.2s;transform:rotate(90deg);&&.", "{transition:0.2s;transform:rotate(0deg);}"], classes.accordionItemShowBody);
|
22
22
|
export var StyledAccordionContentLeft = /*#__PURE__*/styled.div.withConfig({
|
23
23
|
componentId: "plasma-new-hope__sc-20ij9z-4"
|
24
24
|
})(["transition:0.2s;display:flex;align-items:center;&&.", "{transition:0.2s;transform:rotate(180deg);}"], classes.accordionItemShowBody);
|
@@ -27,13 +27,16 @@ export var StyledAccordionTitle = /*#__PURE__*/styled.div.withConfig({
|
|
27
27
|
})(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");"], tokens.accordionItemTitleColor, tokens.accordionItemTitleFontWeight, tokens.accordionItemTitleFontSize, tokens.accordionItemTitleFontWeight, tokens.accordionItemTitleFontStyle, tokens.accordionItemTitleLetterSpacing, tokens.accordionItemTitleLineHeight);
|
28
28
|
export var StyledAccordionBodyAnimate = /*#__PURE__*/styled.div.withConfig({
|
29
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(", ");}"], classes.accordionItemShowBody, tokens.accordionItemPaddingBottom);
|
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
31
|
export var StyledAccordionBody = /*#__PURE__*/styled.div.withConfig({
|
32
32
|
componentId: "plasma-new-hope__sc-20ij9z-7"
|
33
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.accordionItemTextFontWeight, tokens.accordionItemTextFontSize, tokens.accordionItemTextFontWeight, tokens.accordionItemTextFontStyle, tokens.accordionItemTextLetterSpacing, tokens.accordionItemTextLineHeight, tokens.accordionItemPaddingRight, tokens.accordionItemPaddingLeft);
|
34
|
-
export var StyledArrow = /*#__PURE__*/styled(
|
34
|
+
export var StyledArrow = /*#__PURE__*/styled(IconChevronDownFill).withConfig({
|
35
35
|
componentId: "plasma-new-hope__sc-20ij9z-8"
|
36
36
|
})(["pointer-events:none;user-select:none;color:var(", ");"], tokens.accordionItemTextColor);
|
37
|
-
export var
|
37
|
+
export var StyledMinus = /*#__PURE__*/styled(IconMinus).withConfig({
|
38
38
|
componentId: "plasma-new-hope__sc-20ij9z-9"
|
39
|
-
})(["pointer-events:none;user-select:none;color:var(", ");
|
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;"]);
|
@@ -0,0 +1,25 @@
|
|
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
|
+
};
|
@@ -0,0 +1,14 @@
|
|
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
|
+
};
|
@@ -0,0 +1,15 @@
|
|
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
|
+
};
|
@@ -0,0 +1,15 @@
|
|
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
|
+
};
|
@@ -4,6 +4,8 @@ export { IconMic } from './Icons/IconMic';
|
|
4
4
|
export { IconChevronLeft } from './Icons/IconChevronLeft';
|
5
5
|
export { IconChevronDoubleLeft } from './Icons/IconChevronDoubleLeft';
|
6
6
|
export { IconChevronDown } from './Icons/IconChevronDown';
|
7
|
+
export { IconChevronDownFill } from './Icons/IconChevronDownFill';
|
7
8
|
export { IconClose } from './Icons/IconClose';
|
8
9
|
export { IconCross } from './Icons/IconCross';
|
9
|
-
export { IconDone } from './Icons/IconDone';
|
10
|
+
export { IconDone } from './Icons/IconDone';
|
11
|
+
export { IconMinus } from './Icons/IconMinus';
|
@@ -2,12 +2,12 @@ import { css } from 'styled-components';
|
|
2
2
|
import { accordionTokens } from '../../../../components/Accordion';
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
|
-
view: '
|
5
|
+
view: 'default',
|
6
6
|
size: 'm'
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
|
10
|
+
"default": /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionBackground),
|
11
11
|
clear: /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--background-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-solid-tertiary);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionBackground)
|
12
12
|
},
|
13
13
|
size: {
|
@@ -2,12 +2,12 @@ import { css } from 'styled-components';
|
|
2
2
|
import { accordionTokens } from '../../../../components/Accordion';
|
3
3
|
export var config = {
|
4
4
|
defaults: {
|
5
|
-
view: '
|
5
|
+
view: 'default',
|
6
6
|
size: 'm'
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
|
10
|
+
"default": /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionBackground),
|
11
11
|
clear: /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":0rem !important;", ":0rem !important;", ":var(--background-primary);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-solid-tertiary);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPaddingRight, accordionTokens.accordionItemPaddingLeft, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionBackground)
|
12
12
|
},
|
13
13
|
size: {
|
@@ -15,7 +15,7 @@ const meta: Meta<typeof Accordion> = {
|
|
15
15
|
decorators: [WithTheme],
|
16
16
|
component: Accordion,
|
17
17
|
args: {
|
18
|
-
view: '
|
18
|
+
view: 'default',
|
19
19
|
size: 'm',
|
20
20
|
stretching: 'filled',
|
21
21
|
pin: 'square-square',
|
@@ -66,24 +66,9 @@ export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
|
|
66
66
|
|
67
67
|
return (
|
68
68
|
<Accordion {...args}>
|
69
|
-
<AccordionItem
|
70
|
-
|
71
|
-
|
72
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
73
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
74
|
-
/>
|
75
|
-
<AccordionItem
|
76
|
-
type={args.type}
|
77
|
-
pin={args.pin}
|
78
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
79
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
80
|
-
/>
|
81
|
-
<AccordionItem
|
82
|
-
type={args.type}
|
83
|
-
pin={args.pin}
|
84
|
-
title="Как оплатить заправку бонусами СберСпасибо?"
|
85
|
-
body="После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива"
|
86
|
-
/>
|
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} />
|
87
72
|
</Accordion>
|
88
73
|
);
|
89
74
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Accordion.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO
|
1
|
+
{"version":3,"file":"Accordion.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;CAQnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAA8C,MAAM,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAA8C,MAAM,OAAO,CAAC;AAkB1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,CA4EvF,CAAC"}
|
@@ -8,5 +8,6 @@ export declare const StyledAccordionTitle: import("styled-components").StyledCom
|
|
8
8
|
export declare const StyledAccordionBodyAnimate: import("styled-components").StyledComponent<"div", any, {}, never>;
|
9
9
|
export declare const StyledAccordionBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
10
10
|
export declare const StyledArrow: import("styled-components").StyledComponent<import("react").FC<import("../../../_Icon/IconRoot").IconProps>, any, {}, never>;
|
11
|
-
export declare const
|
11
|
+
export declare const StyledMinus: import("styled-components").StyledComponent<import("react").FC<import("../../../_Icon/IconRoot").IconProps>, any, {}, never>;
|
12
|
+
export declare const StyledPlus: import("styled-components").StyledComponent<"div", any, {}, never>;
|
12
13
|
//# sourceMappingURL=AccordionItem.styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AccordionItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,mBAAmB,oEAa/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,oEAUjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oEAKrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,
|
1
|
+
{"version":3,"file":"AccordionItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,mBAAmB,oEAa/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,oEAUjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oEAKrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,oEAQvC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oEAStC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAQhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oEAetC,CAAC;AAEF,eAAO,MAAM,mBAAmB,oEAW/B,CAAC;AAEF,eAAO,MAAM,WAAW,8HAIvB,CAAC;AAEF,eAAO,MAAM,WAAW,8HAmBvB,CAAC;AAEF,eAAO,MAAM,UAAU,oEAOtB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChevronDownFill.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icon.assets/ChevronDownFill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAiB/C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Minus.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icon.assets/Minus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAQrC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconChevronDownFill.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icons/IconChevronDownFill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEnD,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconMinus.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icons/IconMinus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEzC,CAAC"}
|
@@ -4,7 +4,9 @@ export { IconMic } from './Icons/IconMic';
|
|
4
4
|
export { IconChevronLeft } from './Icons/IconChevronLeft';
|
5
5
|
export { IconChevronDoubleLeft } from './Icons/IconChevronDoubleLeft';
|
6
6
|
export { IconChevronDown } from './Icons/IconChevronDown';
|
7
|
+
export { IconChevronDownFill } from './Icons/IconChevronDownFill';
|
7
8
|
export { IconClose } from './Icons/IconClose';
|
8
9
|
export { IconCross } from './Icons/IconCross';
|
9
10
|
export { IconDone } from './Icons/IconDone';
|
11
|
+
export { IconMinus } from './Icons/IconMinus';
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { AccordionItem } from '../../../../components/Accordion';
|
3
3
|
export declare const Accordion: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
|
4
4
|
view: {
|
5
|
-
|
5
|
+
default: import("@linaria/core").LinariaClassName;
|
6
6
|
clear: import("@linaria/core").LinariaClassName;
|
7
7
|
};
|
8
8
|
size: {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { AccordionItem } from '../../../../components/Accordion';
|
3
3
|
export declare const Accordion: import("react").FunctionComponent<import("../../../../engines/types").PropsType<{
|
4
4
|
view: {
|
5
|
-
|
5
|
+
default: import("@linaria/core").LinariaClassName;
|
6
6
|
clear: import("@linaria/core").LinariaClassName;
|
7
7
|
};
|
8
8
|
size: {
|