@salutejs/plasma-new-hope 0.158.0-canary.1443.11128958088.0 → 0.158.0-canary.1451.11128265656.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/index.css +0 -12
- package/cjs/index.js +0 -5
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/index.js +0 -11
- package/emotion/es/index.js +0 -1
- package/es/index.css +0 -12
- package/es/index.js +0 -2
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/index.js +0 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/Steps/Steps.css +0 -18
- package/cjs/components/Steps/Steps.js +0 -118
- package/cjs/components/Steps/Steps.js.map +0 -1
- package/cjs/components/Steps/Steps.styles.js +0 -9
- package/cjs/components/Steps/Steps.styles.js.map +0 -1
- package/cjs/components/Steps/Steps.styles_1qandre.css +0 -1
- package/cjs/components/Steps/Steps.tokens.js +0 -81
- package/cjs/components/Steps/Steps.tokens.js.map +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.css +0 -16
- package/cjs/components/Steps/ui/StepItem/StepItem.js +0 -117
- package/cjs/components/Steps/ui/StepItem/StepItem.js.map +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -83
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +0 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_1nnkvta.css +0 -9
- package/cjs/components/Steps/variations/_size/base.js +0 -9
- package/cjs/components/Steps/variations/_size/base.js.map +0 -1
- package/cjs/components/Steps/variations/_size/base_x642ct.css +0 -1
- package/cjs/components/Steps/variations/_view/base.js +0 -9
- package/cjs/components/Steps/variations/_view/base.js.map +0 -1
- package/cjs/components/Steps/variations/_view/base_x642ct.css +0 -1
- package/emotion/cjs/components/Steps/Steps.js +0 -130
- package/emotion/cjs/components/Steps/Steps.review-doc.mdx +0 -304
- package/emotion/cjs/components/Steps/Steps.styles.js +0 -9
- package/emotion/cjs/components/Steps/Steps.template-doc.mdx +0 -84
- package/emotion/cjs/components/Steps/Steps.tokens.js +0 -79
- package/emotion/cjs/components/Steps/Steps.types.js +0 -5
- package/emotion/cjs/components/Steps/index.js +0 -25
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +0 -127
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -52
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.types.js +0 -5
- package/emotion/cjs/components/Steps/ui/StepItem/index.js +0 -12
- package/emotion/cjs/components/Steps/ui/index.js +0 -16
- package/emotion/cjs/components/Steps/variations/_size/base.js +0 -8
- package/emotion/cjs/components/Steps/variations/_size/tokens.json +0 -1
- package/emotion/cjs/components/Steps/variations/_view/base.js +0 -8
- package/emotion/cjs/components/Steps/variations/_view/tokens.json +0 -1
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +0 -25
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.js +0 -13
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +0 -169
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +0 -25
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.js +0 -13
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +0 -169
- package/emotion/es/components/Steps/Steps.js +0 -121
- package/emotion/es/components/Steps/Steps.review-doc.mdx +0 -304
- package/emotion/es/components/Steps/Steps.styles.js +0 -3
- package/emotion/es/components/Steps/Steps.template-doc.mdx +0 -84
- package/emotion/es/components/Steps/Steps.tokens.js +0 -73
- package/emotion/es/components/Steps/Steps.types.js +0 -1
- package/emotion/es/components/Steps/index.js +0 -2
- package/emotion/es/components/Steps/ui/StepItem/StepItem.js +0 -118
- package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -45
- package/emotion/es/components/Steps/ui/StepItem/StepItem.types.js +0 -1
- package/emotion/es/components/Steps/ui/StepItem/index.js +0 -1
- package/emotion/es/components/Steps/ui/index.js +0 -1
- package/emotion/es/components/Steps/variations/_size/base.js +0 -2
- package/emotion/es/components/Steps/variations/_size/tokens.json +0 -1
- package/emotion/es/components/Steps/variations/_view/base.js +0 -2
- package/emotion/es/components/Steps/variations/_view/tokens.json +0 -1
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +0 -19
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.js +0 -9
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +0 -169
- package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +0 -19
- package/emotion/es/examples/plasma_web/components/Steps/Steps.js +0 -9
- package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +0 -169
- package/es/components/Steps/Steps.css +0 -18
- package/es/components/Steps/Steps.js +0 -113
- package/es/components/Steps/Steps.js.map +0 -1
- package/es/components/Steps/Steps.styles.js +0 -5
- package/es/components/Steps/Steps.styles.js.map +0 -1
- package/es/components/Steps/Steps.styles_1qandre.css +0 -1
- package/es/components/Steps/Steps.tokens.js +0 -76
- package/es/components/Steps/Steps.tokens.js.map +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.css +0 -16
- package/es/components/Steps/ui/StepItem/StepItem.js +0 -113
- package/es/components/Steps/ui/StepItem/StepItem.js.map +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -71
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_1nnkvta.css +0 -9
- package/es/components/Steps/variations/_size/base.js +0 -5
- package/es/components/Steps/variations/_size/base.js.map +0 -1
- package/es/components/Steps/variations/_size/base_x642ct.css +0 -1
- package/es/components/Steps/variations/_view/base.js +0 -5
- package/es/components/Steps/variations/_view/base.js.map +0 -1
- package/es/components/Steps/variations/_view/base_x642ct.css +0 -1
- package/styled-components/cjs/components/Steps/Steps.js +0 -130
- package/styled-components/cjs/components/Steps/Steps.review-doc.mdx +0 -304
- package/styled-components/cjs/components/Steps/Steps.styles.js +0 -9
- package/styled-components/cjs/components/Steps/Steps.template-doc.mdx +0 -84
- package/styled-components/cjs/components/Steps/Steps.tokens.js +0 -79
- package/styled-components/cjs/components/Steps/Steps.types.js +0 -5
- package/styled-components/cjs/components/Steps/index.js +0 -25
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +0 -127
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +0 -43
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.types.js +0 -5
- package/styled-components/cjs/components/Steps/ui/StepItem/index.js +0 -12
- package/styled-components/cjs/components/Steps/ui/index.js +0 -16
- package/styled-components/cjs/components/Steps/variations/_size/base.js +0 -8
- package/styled-components/cjs/components/Steps/variations/_size/tokens.json +0 -1
- package/styled-components/cjs/components/Steps/variations/_view/base.js +0 -8
- package/styled-components/cjs/components/Steps/variations/_view/tokens.json +0 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +0 -25
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.js +0 -13
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +0 -169
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +0 -25
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.js +0 -13
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +0 -169
- package/styled-components/es/components/Steps/Steps.js +0 -121
- package/styled-components/es/components/Steps/Steps.review-doc.mdx +0 -304
- package/styled-components/es/components/Steps/Steps.styles.js +0 -3
- package/styled-components/es/components/Steps/Steps.template-doc.mdx +0 -84
- package/styled-components/es/components/Steps/Steps.tokens.js +0 -73
- package/styled-components/es/components/Steps/Steps.types.js +0 -1
- package/styled-components/es/components/Steps/index.js +0 -2
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +0 -118
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +0 -36
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.types.js +0 -1
- package/styled-components/es/components/Steps/ui/StepItem/index.js +0 -1
- package/styled-components/es/components/Steps/ui/index.js +0 -1
- package/styled-components/es/components/Steps/variations/_size/base.js +0 -2
- package/styled-components/es/components/Steps/variations/_size/tokens.json +0 -1
- package/styled-components/es/components/Steps/variations/_view/base.js +0 -2
- package/styled-components/es/components/Steps/variations/_view/tokens.json +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +0 -19
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.js +0 -9
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +0 -169
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +0 -19
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.js +0 -9
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +0 -169
- package/types/components/Steps/Steps.d.ts +0 -23
- package/types/components/Steps/Steps.d.ts.map +0 -1
- package/types/components/Steps/Steps.styles.d.ts +0 -2
- package/types/components/Steps/Steps.styles.d.ts.map +0 -1
- package/types/components/Steps/Steps.tokens.d.ts +0 -74
- package/types/components/Steps/Steps.tokens.d.ts.map +0 -1
- package/types/components/Steps/Steps.types.d.ts +0 -55
- package/types/components/Steps/Steps.types.d.ts.map +0 -1
- package/types/components/Steps/index.d.ts +0 -4
- package/types/components/Steps/index.d.ts.map +0 -1
- package/types/components/Steps/ui/StepItem/StepItem.d.ts +0 -17
- package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +0 -1
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +0 -20
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +0 -1
- package/types/components/Steps/ui/StepItem/StepItem.types.d.ts +0 -35
- package/types/components/Steps/ui/StepItem/StepItem.types.d.ts.map +0 -1
- package/types/components/Steps/ui/StepItem/index.d.ts +0 -3
- package/types/components/Steps/ui/StepItem/index.d.ts.map +0 -1
- package/types/components/Steps/ui/index.d.ts +0 -2
- package/types/components/Steps/ui/index.d.ts.map +0 -1
- package/types/components/Steps/variations/_size/base.d.ts +0 -2
- package/types/components/Steps/variations/_size/base.d.ts.map +0 -1
- package/types/components/Steps/variations/_view/base.d.ts +0 -2
- package/types/components/Steps/variations/_view/base.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts +0 -18
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +0 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.d.ts +0 -35
- package/types/examples/plasma_b2c/components/Steps/Steps.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts +0 -18
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +0 -1
- package/types/examples/plasma_web/components/Steps/Steps.d.ts +0 -35
- package/types/examples/plasma_web/components/Steps/Steps.d.ts.map +0 -1
@@ -1,118 +0,0 @@
|
|
1
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
2
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
3
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
4
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
5
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
6
|
-
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."); }
|
7
|
-
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
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
9
|
-
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
10
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
11
|
-
import React, { useState, useEffect } from 'react';
|
12
|
-
import cls from 'classnames';
|
13
|
-
import { classes, tokens } from '../../Steps.tokens';
|
14
|
-
import { Bullet, BulletIndicator, BulletIndicatorWrapper, StepItemContent, StepItemContentWrapper, StepItemDivider, StepItemStyled, StepItemTitle, SpinnerStyled } from './StepItem.styles';
|
15
|
-
var indicatorSizesIndentsMap = {
|
16
|
-
8: /*#__PURE__*/"var(".concat(tokens.smallBulletIndentHeight, ")"),
|
17
|
-
16: /*#__PURE__*/"var(".concat(tokens.largeBulletIndentHeight, ")"),
|
18
|
-
24: /*#__PURE__*/"var(".concat(tokens.smallIndicatorIndentHeight, ")"),
|
19
|
-
36: /*#__PURE__*/"var(".concat(tokens.largeIndicatorIndentHeight, ")")
|
20
|
-
};
|
21
|
-
export var StepItem = function StepItem(_ref) {
|
22
|
-
var index = _ref.index,
|
23
|
-
title = _ref.title,
|
24
|
-
content = _ref.content,
|
25
|
-
indicator = _ref.indicator,
|
26
|
-
_ref$status = _ref.status,
|
27
|
-
status = _ref$status === void 0 ? 'inactive' : _ref$status,
|
28
|
-
size = _ref.size,
|
29
|
-
orientation = _ref.orientation,
|
30
|
-
contentAlign = _ref.contentAlign,
|
31
|
-
hasLine = _ref.hasLine,
|
32
|
-
hasLoader = _ref.hasLoader,
|
33
|
-
onClick = _ref.onClick,
|
34
|
-
items = _ref.items;
|
35
|
-
var _useState = useState(false),
|
36
|
-
_useState2 = _slicedToArray(_useState, 2),
|
37
|
-
isHovered = _useState2[0],
|
38
|
-
setIsHovered = _useState2[1];
|
39
|
-
var isFirst = index === 0;
|
40
|
-
var isLast = index === items.length - 1;
|
41
|
-
var prevItem = items[index - 1];
|
42
|
-
var nextItem = items[index + 1];
|
43
|
-
var isActive = status === 'active';
|
44
|
-
var isInactive = status === 'inactive';
|
45
|
-
var isPrevInactive = prevItem && !(prevItem !== null && prevItem !== void 0 && prevItem.status) || (prevItem === null || prevItem === void 0 ? void 0 : prevItem.status) === 'inactive';
|
46
|
-
var isNextInactive = !(nextItem !== null && nextItem !== void 0 && nextItem.status) || (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'inactive';
|
47
|
-
var hasIndicator = indicator != null;
|
48
|
-
var BulletNode = hasIndicator ? BulletIndicator : Bullet;
|
49
|
-
var item = items[index];
|
50
|
-
var isSimple = !title && !content;
|
51
|
-
var clickable = Boolean(onClick);
|
52
|
-
var isVertical = orientation === 'vertical';
|
53
|
-
var isCentered = contentAlign === 'center';
|
54
|
-
var isDisabled = item.disabled;
|
55
|
-
var onClickHandler = onClick && !isDisabled ? function () {
|
56
|
-
return onClick(item, index);
|
57
|
-
} : undefined;
|
58
|
-
var resultIndicatorSize;
|
59
|
-
if (hasIndicator) {
|
60
|
-
resultIndicatorSize = isActive ? 36 : 24;
|
61
|
-
} else {
|
62
|
-
resultIndicatorSize = isActive ? 16 : 8;
|
63
|
-
}
|
64
|
-
var sizeToken = indicatorSizesIndentsMap[resultIndicatorSize];
|
65
|
-
var onMouseOver = clickable && !isDisabled ? function () {
|
66
|
-
if (isDisabled) {
|
67
|
-
setIsHovered(false);
|
68
|
-
}
|
69
|
-
setIsHovered(true);
|
70
|
-
} : undefined;
|
71
|
-
var onMouseOut = clickable && !isDisabled ? function () {
|
72
|
-
setIsHovered(false);
|
73
|
-
} : undefined;
|
74
|
-
useEffect(function () {
|
75
|
-
if (isDisabled) {
|
76
|
-
setIsHovered(false);
|
77
|
-
}
|
78
|
-
}, [isDisabled]);
|
79
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
80
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical))
|
81
|
-
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
82
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
83
|
-
onClick: onClickHandler,
|
84
|
-
onFocus: onMouseOver,
|
85
|
-
onBlur: onMouseOut,
|
86
|
-
onMouseOver: onMouseOver,
|
87
|
-
onMouseOut: onMouseOut
|
88
|
-
}, contentAlign === 'center' && !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
89
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive))
|
90
|
-
}), isVertical && (isSimple ? !isFirst : true) && /*#__PURE__*/React.createElement(StepItemDivider, {
|
91
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive)),
|
92
|
-
style: {
|
93
|
-
height: isSimple ? 'none' : sizeToken,
|
94
|
-
minHeight: sizeToken,
|
95
|
-
maxHeight: isSimple ? 'none' : sizeToken
|
96
|
-
}
|
97
|
-
}), hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
98
|
-
size: hasIndicator ? "var(".concat(tokens.activeIndicatorSize, ")") : "var(".concat(tokens.activeBulletSize, ")")
|
99
|
-
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
100
|
-
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
|
101
|
-
}, typeof indicator === 'function' && indicator({
|
102
|
-
status: status,
|
103
|
-
item: item,
|
104
|
-
size: size
|
105
|
-
}), typeof indicator !== 'function' && indicator), !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
106
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isLast), classes.inactive, isInactive || isNextInactive))
|
107
|
-
})), !isSimple && /*#__PURE__*/React.createElement(StepItemContentWrapper, {
|
108
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.active, isActive), classes.hasIndicator, hasIndicator))
|
109
|
-
}, /*#__PURE__*/React.createElement(StepItemTitle, {
|
110
|
-
onClick: onClickHandler,
|
111
|
-
onFocus: onMouseOver,
|
112
|
-
onBlur: onMouseOut,
|
113
|
-
onMouseOver: onMouseOver,
|
114
|
-
onMouseOut: onMouseOut
|
115
|
-
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' && content(status, index, items), typeof content !== 'function' && content))), isSimple && !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
|
116
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine), classes.inactive, isInactive || isNextInactive))
|
117
|
-
}));
|
118
|
-
};
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import styled from 'styled-components';
|
2
|
-
import { classes, tokens } from '../../Steps.tokens';
|
3
|
-
import { component, mergeConfig } from '../../../../engines';
|
4
|
-
import { spinnerConfig, spinnerTokens } from '../../../Spinner';
|
5
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(spinnerConfig);
|
6
|
-
var Spinner = /*#__PURE__*/component(mergedConfig);
|
7
|
-
export var SpinnerStyled = /*#__PURE__*/styled(Spinner).withConfig({
|
8
|
-
componentId: "plasma-new-hope__sc-bjma6z-0"
|
9
|
-
})(["", ":", ";", ":var(", ");"], spinnerTokens.size, function (_ref) {
|
10
|
-
var size = _ref.size;
|
11
|
-
return size;
|
12
|
-
}, spinnerTokens.color, tokens.activeIndicatorColor);
|
13
|
-
export var StepItemTitle = /*#__PURE__*/styled.div.withConfig({
|
14
|
-
componentId: "plasma-new-hope__sc-bjma6z-1"
|
15
|
-
})(["padding-top:var(", ");padding-right:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");word-break:break-word;"], tokens.titlePaddingTop, tokens.contentSidePadding, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight);
|
16
|
-
export var StepItemContent = /*#__PURE__*/styled.div.withConfig({
|
17
|
-
componentId: "plasma-new-hope__sc-bjma6z-2"
|
18
|
-
})(["padding-top:var(", ");padding-right:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");word-break:break-word;color:var(", ");"], tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.contentColor);
|
19
|
-
export var BulletIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
|
20
|
-
componentId: "plasma-new-hope__sc-bjma6z-3"
|
21
|
-
})(["display:flex;align-items:center;&:not(", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{align-items:center;padding-right:var(", ");&.", "{min-width:var(", ");min-height:100%;}&:not(.", "){min-width:var(", ");min-height:100%;}}}&.", "{flex-direction:column;align-items:flex-start;justify-content:center;}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.centered);
|
22
|
-
export var BulletIndicator = /*#__PURE__*/styled.div.withConfig({
|
23
|
-
componentId: "plasma-new-hope__sc-bjma6z-4"
|
24
|
-
})(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");}&.", "{color:var(", ");background:var(", ");&:before,&:after{background:var(", ");}}"], tokens.indicatorSize, tokens.indicatorSize, tokens.completedIndicatorColor, tokens.completedIndicatorBackground, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, classes.active, tokens.activeIndicatorSize, tokens.activeIndicatorSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, classes.inactive, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground);
|
25
|
-
export var Bullet = /*#__PURE__*/styled(BulletIndicator).withConfig({
|
26
|
-
componentId: "plasma-new-hope__sc-bjma6z-5"
|
27
|
-
})(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background-color:var(", ");}"], tokens.bulletSize, tokens.bulletSize, classes.active, tokens.activeBulletSize, tokens.activeBulletSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorBackground);
|
28
|
-
export var StepItemDivider = /*#__PURE__*/styled.div.withConfig({
|
29
|
-
componentId: "plasma-new-hope__sc-bjma6z-6"
|
30
|
-
})(["width:100%;height:var(", ");flex:1;background-color:var(", ");&.", "{background-color:var(", ");}&.", "{background-color:transparent;}"], tokens.dividerThickness, tokens.activeIndicatorColor, classes.inactive, tokens.inactiveIndicatorBackground, classes.transparentDivider);
|
31
|
-
export var StepItemContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
32
|
-
componentId: "plasma-new-hope__sc-bjma6z-7"
|
33
|
-
})(["&.", "{", "{padding-top:var(", ");padding-right:0;}", "{padding-top:var(", ");padding-bottom:var(", ");padding-right:0;}}&.", ".", "{}&.", ".", ".", "{}"], classes.verticalOrientation, StepItemTitle, tokens.contentVerticalPadding, StepItemContent, tokens.contentVerticalPadding, tokens.contentVerticalPadding, classes.verticalOrientation, classes.active, classes.verticalOrientation, classes.active, classes.hasIndicator);
|
34
|
-
export var StepItemStyled = /*#__PURE__*/styled.div.withConfig({
|
35
|
-
componentId: "plasma-new-hope__sc-bjma6z-8"
|
36
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;&.", "{flex-direction:row;align-items:stretch;&:not(", "):not(.", "){", "{position:relative;}&.", "{", "{position:relative;&.", "{}}}}", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{", "{color:var(", ");}}&.", "{&:not(", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{opacity:var(", ");}"], classes.verticalOrientation, classes.simple, classes.hasIndicator, BulletIndicatorWrapper, classes.active, BulletIndicatorWrapper, classes.active, StepItemDivider, tokens.dividerThickness, classes.active, StepItemTitle, tokens.activeTitleColor, classes.inactive, StepItemTitle, tokens.inactiveTitleColor, classes.hovered, classes.active, StepItemTitle, tokens.activeTitleColorHover, BulletIndicator, Bullet, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackgroundHover, classes.inactive, StepItemTitle, tokens.inactiveTitleColorHover, BulletIndicator, Bullet, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, classes.centered, StepItemContentWrapper, tokens.contentSidePadding, tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, classes.disabled, tokens.disabledOpacity);
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export { StepItem } from './StepItem';
|
@@ -1 +0,0 @@
|
|
1
|
-
export * from './StepItem';
|
@@ -1 +0,0 @@
|
|
1
|
-
[]
|
@@ -1 +0,0 @@
|
|
1
|
-
[]
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { stepsTokens as tokens } from '../../../../components/Steps';
|
3
|
-
export var config = {
|
4
|
-
defaults: {
|
5
|
-
size: 's',
|
6
|
-
view: 'default'
|
7
|
-
},
|
8
|
-
variations: {
|
9
|
-
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.disabledOpacity)
|
11
|
-
},
|
12
|
-
size: {
|
13
|
-
l: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
14
|
-
m: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.625rem;", ":0.375rem;", ":1.75rem;", ":0.875rem;", ":0.75rem;", ":0.75rem;", ":0.4375rem;", ":1.5rem;", ":1.125rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
15
|
-
s: /*#__PURE__*/css(["", ":1.5rem;", ":1.5rem;", ":0.5rem;", ":1rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.6875rem;", ":0.75rem;", ":0.5rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
16
|
-
xs: /*#__PURE__*/css(["", ":1.5rem;", ":1.5rem;", ":0.5rem;", ":1rem;", ":0.5rem;", ":0.25rem;", ":1.5rem;", ":0.5625rem;", ":0.75rem;", ":0.25rem;", ":0.25rem;", ":0.75rem;", ":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-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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness)
|
17
|
-
}
|
18
|
-
}
|
19
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { stepsConfig } from '../../../../components/Steps';
|
2
|
-
import { component, mergeConfig } from '../../../../engines';
|
3
|
-
import { config } from './Steps.config';
|
4
|
-
|
5
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
6
|
-
// @ts-ignore todo
|
7
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(stepsConfig, config);
|
8
|
-
var Steps = /*#__PURE__*/component(mergedConfig);
|
9
|
-
export { Steps, mergedConfig };
|
@@ -1,169 +0,0 @@
|
|
1
|
-
import React, { useState, useEffect } 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 { IconMic } from '../../../../components/_Icon';
|
7
|
-
import { argTypesFromConfig, WithTheme } from '../../../_helpers';
|
8
|
-
import { StepItemProps } from '../../../../components/Steps/ui';
|
9
|
-
|
10
|
-
import { Steps, mergedConfig } from './Steps';
|
11
|
-
|
12
|
-
const meta: Meta<typeof Steps> = {
|
13
|
-
title: 'plasma_b2c/Steps',
|
14
|
-
decorators: [WithTheme],
|
15
|
-
component: Steps,
|
16
|
-
argTypes: {
|
17
|
-
...argTypesFromConfig(mergedConfig),
|
18
|
-
},
|
19
|
-
};
|
20
|
-
|
21
|
-
export default meta;
|
22
|
-
|
23
|
-
type Story = StoryObj<ComponentProps<typeof Steps>>;
|
24
|
-
|
25
|
-
const renderIndicator = ({ status, size }) => {
|
26
|
-
let iconSize;
|
27
|
-
if (size === 'xs' || size === 's') {
|
28
|
-
iconSize = 'xs';
|
29
|
-
} else if (status === 'active') {
|
30
|
-
iconSize = 's';
|
31
|
-
} else {
|
32
|
-
iconSize = 'xs';
|
33
|
-
}
|
34
|
-
|
35
|
-
return <IconMic color="inherit" size={iconSize} />;
|
36
|
-
};
|
37
|
-
|
38
|
-
const DefaultStory = (args) => {
|
39
|
-
const { maxWidth, title, content, size, indicatorType, quantity, hasContent, loading, disabled, simple } = args;
|
40
|
-
|
41
|
-
const innerTitle = title || 'Title';
|
42
|
-
|
43
|
-
const [items, setItems] = useState([]);
|
44
|
-
|
45
|
-
useEffect(() => {
|
46
|
-
const newItems = new Array(quantity).fill(null).map((_, index) => {
|
47
|
-
const indicator = index + 1;
|
48
|
-
|
49
|
-
if (simple) {
|
50
|
-
return {
|
51
|
-
indicator,
|
52
|
-
status: 'inactive',
|
53
|
-
};
|
54
|
-
}
|
55
|
-
|
56
|
-
return {
|
57
|
-
title: innerTitle,
|
58
|
-
content,
|
59
|
-
indicator,
|
60
|
-
status: 'inactive',
|
61
|
-
};
|
62
|
-
});
|
63
|
-
|
64
|
-
setItems(newItems);
|
65
|
-
}, [hasContent, loading, quantity, innerTitle, content, simple]);
|
66
|
-
|
67
|
-
useEffect(() => {
|
68
|
-
setItems((curItems) =>
|
69
|
-
curItems.map((item, index) => {
|
70
|
-
if (indicatorType === 'numbered') {
|
71
|
-
return { ...item, indicator: index + 1 };
|
72
|
-
}
|
73
|
-
|
74
|
-
if (indicatorType === 'bullet') {
|
75
|
-
return { ...item, indicator: undefined };
|
76
|
-
}
|
77
|
-
|
78
|
-
if (indicatorType === 'icon') {
|
79
|
-
return { ...item, indicator: renderIndicator };
|
80
|
-
}
|
81
|
-
|
82
|
-
return item;
|
83
|
-
}),
|
84
|
-
);
|
85
|
-
}, [indicatorType]);
|
86
|
-
|
87
|
-
useEffect(() => {
|
88
|
-
setItems((curItems) => curItems.map((item) => ({ ...item, disabled })));
|
89
|
-
}, [disabled]);
|
90
|
-
|
91
|
-
const onChange = (item: StepItemProps, index: number, prevIndex: number) => {
|
92
|
-
if (prevIndex !== undefined) {
|
93
|
-
items[prevIndex].status = 'completed';
|
94
|
-
}
|
95
|
-
|
96
|
-
items[index].status = 'active';
|
97
|
-
|
98
|
-
setItems([...items]);
|
99
|
-
};
|
100
|
-
|
101
|
-
return (
|
102
|
-
<div style={{ maxWidth }}>
|
103
|
-
<Steps size={size} items={items} onChange={onChange} hasLoader={loading} {...args} />
|
104
|
-
</div>
|
105
|
-
);
|
106
|
-
};
|
107
|
-
|
108
|
-
export const Default: Story = {
|
109
|
-
args: {
|
110
|
-
maxWidth: '100%',
|
111
|
-
quantity: 6,
|
112
|
-
size: 'm',
|
113
|
-
title: 'Title',
|
114
|
-
content: 'Content',
|
115
|
-
contentAlign: 'left',
|
116
|
-
indicatorType: 'numbered',
|
117
|
-
orientation: 'horizontal',
|
118
|
-
hasLine: true,
|
119
|
-
hasContent: 'all',
|
120
|
-
disabled: false,
|
121
|
-
loading: false,
|
122
|
-
simple: false,
|
123
|
-
},
|
124
|
-
argTypes: {
|
125
|
-
maxWidth: {
|
126
|
-
control: {
|
127
|
-
type: 'text',
|
128
|
-
},
|
129
|
-
},
|
130
|
-
size: {
|
131
|
-
options: ['xs', 's', 'm', 'l'],
|
132
|
-
control: {
|
133
|
-
type: 'inline-radio',
|
134
|
-
},
|
135
|
-
},
|
136
|
-
orientation: {
|
137
|
-
options: ['horizontal', 'vertical'],
|
138
|
-
control: {
|
139
|
-
type: 'inline-radio',
|
140
|
-
},
|
141
|
-
},
|
142
|
-
contentAlign: {
|
143
|
-
options: ['left', 'center'],
|
144
|
-
control: {
|
145
|
-
type: 'inline-radio',
|
146
|
-
},
|
147
|
-
if: { arg: 'orientation', eq: 'horizontal' },
|
148
|
-
},
|
149
|
-
indicatorType: {
|
150
|
-
options: ['numbered', 'bullet', 'icon'],
|
151
|
-
control: {
|
152
|
-
type: 'inline-radio',
|
153
|
-
},
|
154
|
-
},
|
155
|
-
hasContent: {
|
156
|
-
options: ['all', 'active', 'none'],
|
157
|
-
control: {
|
158
|
-
type: 'inline-radio',
|
159
|
-
},
|
160
|
-
},
|
161
|
-
simple: {
|
162
|
-
control: {
|
163
|
-
type: 'boolean',
|
164
|
-
},
|
165
|
-
},
|
166
|
-
...disableProps(['view']),
|
167
|
-
},
|
168
|
-
render: (args) => <DefaultStory {...args} />,
|
169
|
-
};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { stepsTokens as tokens } from '../../../../components/Steps';
|
3
|
-
export var config = {
|
4
|
-
defaults: {
|
5
|
-
size: 's',
|
6
|
-
view: 'default'
|
7
|
-
},
|
8
|
-
variations: {
|
9
|
-
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary-hover);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.disabledOpacity)
|
11
|
-
},
|
12
|
-
size: {
|
13
|
-
l: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
14
|
-
m: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.625rem;", ":0.375rem;", ":1.75rem;", ":0.875rem;", ":0.75rem;", ":0.75rem;", ":0.4375rem;", ":1.5rem;", ":1.125rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
15
|
-
s: /*#__PURE__*/css(["", ":1.5rem;", ":1.5rem;", ":0.5rem;", ":1rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.6875rem;", ":0.75rem;", ":0.5rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":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);", ":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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
16
|
-
xs: /*#__PURE__*/css(["", ":1.5rem;", ":1.5rem;", ":0.5rem;", ":1rem;", ":0.5rem;", ":0.25rem;", ":1.5rem;", ":0.5625rem;", ":0.75rem;", ":0.25rem;", ":0.25rem;", ":0.75rem;", ":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-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);", ":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);", ":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);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness)
|
17
|
-
}
|
18
|
-
}
|
19
|
-
};
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { stepsConfig } from '../../../../components/Steps';
|
2
|
-
import { component, mergeConfig } from '../../../../engines';
|
3
|
-
import { config } from './Steps.config';
|
4
|
-
|
5
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
6
|
-
// @ts-ignore todo
|
7
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(stepsConfig, config);
|
8
|
-
var Steps = /*#__PURE__*/component(mergedConfig);
|
9
|
-
export { Steps, mergedConfig };
|
@@ -1,169 +0,0 @@
|
|
1
|
-
import React, { useState, useEffect } 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 { IconMic } from '../../../../components/_Icon';
|
7
|
-
import { argTypesFromConfig, WithTheme } from '../../../_helpers';
|
8
|
-
import { StepItemProps } from '../../../../components/Steps/ui';
|
9
|
-
|
10
|
-
import { Steps, mergedConfig } from './Steps';
|
11
|
-
|
12
|
-
const meta: Meta<typeof Steps> = {
|
13
|
-
title: 'plasma_web/Steps',
|
14
|
-
decorators: [WithTheme],
|
15
|
-
component: Steps,
|
16
|
-
argTypes: {
|
17
|
-
...argTypesFromConfig(mergedConfig),
|
18
|
-
},
|
19
|
-
};
|
20
|
-
|
21
|
-
export default meta;
|
22
|
-
|
23
|
-
type Story = StoryObj<ComponentProps<typeof Steps>>;
|
24
|
-
|
25
|
-
const renderIndicator = ({ status, size }) => {
|
26
|
-
let iconSize;
|
27
|
-
if (size === 'xs' || size === 's') {
|
28
|
-
iconSize = 'xs';
|
29
|
-
} else if (status === 'active') {
|
30
|
-
iconSize = 's';
|
31
|
-
} else {
|
32
|
-
iconSize = 'xs';
|
33
|
-
}
|
34
|
-
|
35
|
-
return <IconMic color="inherit" size={iconSize} />;
|
36
|
-
};
|
37
|
-
|
38
|
-
const DefaultStory = (args) => {
|
39
|
-
const { maxWidth, title, content, size, indicatorType, quantity, hasContent, loading, disabled, simple } = args;
|
40
|
-
|
41
|
-
const innerTitle = title || 'Title';
|
42
|
-
|
43
|
-
const [items, setItems] = useState([]);
|
44
|
-
|
45
|
-
useEffect(() => {
|
46
|
-
const newItems = new Array(quantity).fill(null).map((_, index) => {
|
47
|
-
const indicator = index + 1;
|
48
|
-
|
49
|
-
if (simple) {
|
50
|
-
return {
|
51
|
-
indicator,
|
52
|
-
status: 'inactive',
|
53
|
-
};
|
54
|
-
}
|
55
|
-
|
56
|
-
return {
|
57
|
-
title: innerTitle,
|
58
|
-
content,
|
59
|
-
indicator,
|
60
|
-
status: 'inactive',
|
61
|
-
};
|
62
|
-
});
|
63
|
-
|
64
|
-
setItems(newItems);
|
65
|
-
}, [hasContent, loading, quantity, innerTitle, content, simple]);
|
66
|
-
|
67
|
-
useEffect(() => {
|
68
|
-
setItems((curItems) =>
|
69
|
-
curItems.map((item, index) => {
|
70
|
-
if (indicatorType === 'numbered') {
|
71
|
-
return { ...item, indicator: index + 1 };
|
72
|
-
}
|
73
|
-
|
74
|
-
if (indicatorType === 'bullet') {
|
75
|
-
return { ...item, indicator: undefined };
|
76
|
-
}
|
77
|
-
|
78
|
-
if (indicatorType === 'icon') {
|
79
|
-
return { ...item, indicator: renderIndicator };
|
80
|
-
}
|
81
|
-
|
82
|
-
return item;
|
83
|
-
}),
|
84
|
-
);
|
85
|
-
}, [indicatorType]);
|
86
|
-
|
87
|
-
useEffect(() => {
|
88
|
-
setItems((curItems) => curItems.map((item) => ({ ...item, disabled })));
|
89
|
-
}, [disabled]);
|
90
|
-
|
91
|
-
const onChange = (item: StepItemProps, index: number, prevIndex: number) => {
|
92
|
-
if (prevIndex !== undefined) {
|
93
|
-
items[prevIndex].status = 'completed';
|
94
|
-
}
|
95
|
-
|
96
|
-
items[index].status = 'active';
|
97
|
-
|
98
|
-
setItems([...items]);
|
99
|
-
};
|
100
|
-
|
101
|
-
return (
|
102
|
-
<div style={{ maxWidth }}>
|
103
|
-
<Steps size={size} items={items} onChange={onChange} hasLoader={loading} {...args} />
|
104
|
-
</div>
|
105
|
-
);
|
106
|
-
};
|
107
|
-
|
108
|
-
export const Default: Story = {
|
109
|
-
args: {
|
110
|
-
maxWidth: '100%',
|
111
|
-
quantity: 6,
|
112
|
-
size: 'm',
|
113
|
-
title: 'Title',
|
114
|
-
content: 'Content',
|
115
|
-
contentAlign: 'left',
|
116
|
-
indicatorType: 'numbered',
|
117
|
-
orientation: 'horizontal',
|
118
|
-
hasLine: true,
|
119
|
-
hasContent: 'all',
|
120
|
-
disabled: false,
|
121
|
-
loading: false,
|
122
|
-
simple: false,
|
123
|
-
},
|
124
|
-
argTypes: {
|
125
|
-
maxWidth: {
|
126
|
-
control: {
|
127
|
-
type: 'text',
|
128
|
-
},
|
129
|
-
},
|
130
|
-
size: {
|
131
|
-
options: ['xs', 's', 'm', 'l'],
|
132
|
-
control: {
|
133
|
-
type: 'inline-radio',
|
134
|
-
},
|
135
|
-
},
|
136
|
-
orientation: {
|
137
|
-
options: ['horizontal', 'vertical'],
|
138
|
-
control: {
|
139
|
-
type: 'inline-radio',
|
140
|
-
},
|
141
|
-
},
|
142
|
-
contentAlign: {
|
143
|
-
options: ['left', 'center'],
|
144
|
-
control: {
|
145
|
-
type: 'inline-radio',
|
146
|
-
},
|
147
|
-
if: { arg: 'orientation', eq: 'horizontal' },
|
148
|
-
},
|
149
|
-
indicatorType: {
|
150
|
-
options: ['numbered', 'bullet', 'icon'],
|
151
|
-
control: {
|
152
|
-
type: 'inline-radio',
|
153
|
-
},
|
154
|
-
},
|
155
|
-
hasContent: {
|
156
|
-
options: ['all', 'active', 'none'],
|
157
|
-
control: {
|
158
|
-
type: 'inline-radio',
|
159
|
-
},
|
160
|
-
},
|
161
|
-
simple: {
|
162
|
-
control: {
|
163
|
-
type: 'boolean',
|
164
|
-
},
|
165
|
-
},
|
166
|
-
...disableProps(['view']),
|
167
|
-
},
|
168
|
-
render: (args) => <DefaultStory {...args} />,
|
169
|
-
};
|