@salutejs/plasma-new-hope 0.191.2-canary.1517.11801064973.0 → 0.191.2-canary.1557.11803291365.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Steps/Steps.css +10 -10
- package/cjs/components/Steps/Steps.js +14 -21
- package/cjs/components/Steps/Steps.js.map +1 -1
- package/cjs/components/Steps/Steps.styles.js +1 -1
- package/cjs/components/Steps/Steps.styles.js.map +1 -1
- package/cjs/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
- package/cjs/components/Steps/Steps.tokens.js +0 -1
- package/cjs/components/Steps/Steps.tokens.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/cjs/components/Steps/ui/StepItem/StepItem.js +8 -32
- package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
- package/cjs/components/Switch/Switch.css +11 -7
- package/cjs/components/Switch/Switch.js +16 -7
- package/cjs/components/Switch/Switch.js.map +1 -1
- package/cjs/components/Switch/Switch.styles.js +16 -4
- package/cjs/components/Switch/Switch.styles.js.map +1 -1
- package/cjs/components/Switch/Switch.styles_bei7bh.css +6 -0
- package/cjs/components/Switch/Switch.tokens.js +11 -0
- package/cjs/components/Switch/Switch.tokens.js.map +1 -1
- package/cjs/components/Switch/_focused/base.js +1 -1
- package/{es/components/Switch/_focused/base_j4murk.css → cjs/components/Switch/_focused/base_sz3n0x.css} +1 -1
- package/cjs/components/Switch/_size/base.js +1 -1
- package/cjs/components/Switch/_size/base.js.map +1 -1
- package/cjs/components/Switch/_size/base_1tcl212.css +1 -0
- package/cjs/components/Switch/_toggleSize/base.js +9 -0
- package/cjs/components/Switch/_toggleSize/base.js.map +1 -0
- package/cjs/components/Switch/_toggleSize/base_6i0904.css +1 -0
- package/cjs/components/Switch/_view/base.js +1 -1
- package/cjs/components/Switch/_view/base.js.map +1 -1
- package/cjs/components/Switch/_view/base_yxkf3s.css +1 -0
- package/cjs/index.css +22 -18
- package/emotion/cjs/components/Steps/Steps.js +14 -23
- package/emotion/cjs/components/Steps/Steps.styles.js +1 -1
- package/emotion/cjs/components/Steps/Steps.tokens.js +0 -1
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +8 -32
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
- package/emotion/cjs/components/Switch/Switch.js +17 -8
- package/emotion/cjs/components/Switch/Switch.styles.js +21 -5
- package/emotion/cjs/components/Switch/Switch.template-doc.mdx +37 -1
- package/emotion/cjs/components/Switch/Switch.tokens.js +11 -0
- package/emotion/cjs/components/Switch/_size/base.js +1 -1
- package/emotion/cjs/components/Switch/_toggleSize/base.js +10 -0
- package/emotion/cjs/components/Switch/_view/base.js +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +11 -4
- package/emotion/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.config.js +11 -4
- package/emotion/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
- package/emotion/es/components/Steps/Steps.js +15 -24
- package/emotion/es/components/Steps/Steps.styles.js +1 -1
- package/emotion/es/components/Steps/Steps.tokens.js +0 -1
- package/emotion/es/components/Steps/ui/StepItem/StepItem.js +8 -32
- package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +11 -22
- package/emotion/es/components/Switch/Switch.js +13 -4
- package/emotion/es/components/Switch/Switch.styles.js +20 -4
- package/emotion/es/components/Switch/Switch.template-doc.mdx +37 -1
- package/emotion/es/components/Switch/Switch.tokens.js +11 -0
- package/emotion/es/components/Switch/_size/base.js +2 -2
- package/emotion/es/components/Switch/_toggleSize/base.js +4 -0
- package/emotion/es/components/Switch/_view/base.js +2 -2
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.config.js +11 -4
- package/emotion/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
- package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Switch/Switch.config.js +11 -4
- package/emotion/es/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
- package/es/components/Steps/Steps.css +10 -10
- package/es/components/Steps/Steps.js +16 -23
- package/es/components/Steps/Steps.js.map +1 -1
- package/es/components/Steps/Steps.styles.js +1 -1
- package/es/components/Steps/Steps.styles.js.map +1 -1
- package/es/components/Steps/{Steps.styles_wa45kj.css → Steps.styles_1xmqxqu.css} +1 -1
- package/es/components/Steps/Steps.tokens.js +0 -1
- package/es/components/Steps/Steps.tokens.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/es/components/Steps/ui/StepItem/StepItem.js +9 -33
- package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +9 -0
- package/es/components/Switch/Switch.css +11 -7
- package/es/components/Switch/Switch.js +17 -8
- package/es/components/Switch/Switch.js.map +1 -1
- package/es/components/Switch/Switch.styles.js +15 -5
- package/es/components/Switch/Switch.styles.js.map +1 -1
- package/es/components/Switch/Switch.styles_bei7bh.css +6 -0
- package/es/components/Switch/Switch.tokens.js +11 -0
- package/es/components/Switch/Switch.tokens.js.map +1 -1
- package/es/components/Switch/_focused/base.js +1 -1
- package/{cjs/components/Switch/_focused/base_j4murk.css → es/components/Switch/_focused/base_sz3n0x.css} +1 -1
- package/es/components/Switch/_size/base.js +1 -1
- package/es/components/Switch/_size/base.js.map +1 -1
- package/es/components/Switch/_size/base_1tcl212.css +1 -0
- package/es/components/Switch/_toggleSize/base.js +5 -0
- package/es/components/Switch/_toggleSize/base.js.map +1 -0
- package/es/components/Switch/_toggleSize/base_6i0904.css +1 -0
- package/es/components/Switch/_view/base.js +1 -1
- package/es/components/Switch/_view/base.js.map +1 -1
- package/es/components/Switch/_view/base_yxkf3s.css +1 -0
- package/es/index.css +22 -18
- package/package.json +2 -2
- package/styled-components/cjs/components/Steps/Steps.js +14 -23
- package/styled-components/cjs/components/Steps/Steps.styles.js +1 -1
- package/styled-components/cjs/components/Steps/Steps.tokens.js +0 -1
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +8 -32
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
- package/styled-components/cjs/components/Switch/Switch.js +17 -8
- package/styled-components/cjs/components/Switch/Switch.styles.js +11 -5
- package/styled-components/cjs/components/Switch/Switch.template-doc.mdx +37 -1
- package/styled-components/cjs/components/Switch/Switch.tokens.js +11 -0
- package/styled-components/cjs/components/Switch/_size/base.js +1 -1
- package/styled-components/cjs/components/Switch/_toggleSize/base.js +10 -0
- package/styled-components/cjs/components/Switch/_view/base.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.config.js +9 -2
- package/styled-components/cjs/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.config.js +9 -2
- package/styled-components/cjs/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
- package/styled-components/es/components/Steps/Steps.js +15 -24
- package/styled-components/es/components/Steps/Steps.styles.js +1 -1
- package/styled-components/es/components/Steps/Steps.tokens.js +0 -1
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +8 -32
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -17
- package/styled-components/es/components/Switch/Switch.js +13 -4
- package/styled-components/es/components/Switch/Switch.styles.js +10 -4
- package/styled-components/es/components/Switch/Switch.template-doc.mdx +37 -1
- package/styled-components/es/components/Switch/Switch.tokens.js +11 -0
- package/styled-components/es/components/Switch/_size/base.js +2 -2
- package/styled-components/es/components/Switch/_toggleSize/base.js +4 -0
- package/styled-components/es/components/Switch/_view/base.js +2 -2
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.config.js +9 -2
- package/styled-components/es/examples/plasma_b2c/components/Switch/Switch.stories.tsx +7 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.config.js +9 -2
- package/styled-components/es/examples/plasma_web/components/Switch/Switch.stories.tsx +14 -1
- package/types/components/Steps/Steps.d.ts.map +1 -1
- package/types/components/Steps/Steps.styles.d.ts.map +1 -1
- package/types/components/Steps/Steps.tokens.d.ts +0 -1
- package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.d.ts +3 -0
- package/types/components/Switch/Switch.d.ts.map +1 -1
- package/types/components/Switch/Switch.styles.d.ts +2 -0
- package/types/components/Switch/Switch.styles.d.ts.map +1 -1
- package/types/components/Switch/Switch.tokens.d.ts +9 -0
- package/types/components/Switch/Switch.tokens.d.ts.map +1 -1
- package/types/components/Switch/Switch.types.d.ts +10 -2
- package/types/components/Switch/Switch.types.d.ts.map +1 -1
- package/types/components/Switch/_size/base.d.ts.map +1 -1
- package/types/components/Switch/_toggleSize/base.d.ts +2 -0
- package/types/components/Switch/_toggleSize/base.d.ts.map +1 -0
- package/types/components/Switch/_view/base.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts +7 -0
- package/types/examples/plasma_b2c/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Switch/Switch.d.ts +6 -0
- package/types/examples/plasma_b2c/components/Switch/Switch.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.config.d.ts +7 -0
- package/types/examples/plasma_web/components/Switch/Switch.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Switch/Switch.d.ts +6 -0
- package/types/examples/plasma_web/components/Switch/Switch.d.ts.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_acxstj.css +0 -9
- package/cjs/components/Switch/Switch.styles_1kk0qzz.css +0 -4
- package/cjs/components/Switch/_size/base_1rjzpi4.css +0 -1
- package/cjs/components/Switch/_view/base_1mtyz12.css +0 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_acxstj.css +0 -9
- package/es/components/Switch/Switch.styles_1kk0qzz.css +0 -4
- package/es/components/Switch/_size/base_1rjzpi4.css +0 -1
- package/es/components/Switch/_view/base_1mtyz12.css +0 -1
@@ -1,8 +1,6 @@
|
|
1
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
2
|
var _excluded = ["view", "size", "orientation", "contentAlign", "hasLine", "hasContent", "hasLoader", "items", "onChange", "current", "status"];
|
3
3
|
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); }
|
4
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
4
|
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; }
|
7
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
8
6
|
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); }
|
@@ -14,7 +12,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
14
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
15
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
16
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
17
|
-
import React, { forwardRef, useState, useEffect
|
15
|
+
import React, { forwardRef, useState, useEffect } from 'react';
|
18
16
|
import cls from 'classnames';
|
19
17
|
import { classes } from './Steps.tokens';
|
20
18
|
import { StepItem } from './ui';
|
@@ -46,33 +44,19 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
46
44
|
_useState2 = _slicedToArray(_useState, 2),
|
47
45
|
prevIndex = _useState2[0],
|
48
46
|
setPrevIndex = _useState2[1];
|
47
|
+
var isUncontrolled = current !== undefined;
|
49
48
|
var hasIndicator = items.some(function (item) {
|
50
49
|
return item.indicator != null;
|
51
50
|
});
|
52
51
|
var isSimple = items.every(function (item) {
|
53
52
|
return !item.title && !item.content;
|
54
53
|
});
|
55
|
-
var innerItems = useMemo(function () {
|
56
|
-
var isUncontrolled = current !== undefined;
|
57
|
-
return items.map(function (item, index) {
|
58
|
-
var itemStatus = getItemStatus({
|
59
|
-
isUncontrolled: isUncontrolled,
|
60
|
-
current: current,
|
61
|
-
status: status,
|
62
|
-
index: index,
|
63
|
-
item: item
|
64
|
-
});
|
65
|
-
return _objectSpread(_objectSpread({}, item), {}, {
|
66
|
-
status: itemStatus
|
67
|
-
});
|
68
|
-
});
|
69
|
-
}, [status, current, items]);
|
70
54
|
useEffect(function () {
|
71
55
|
var calcPrevIndex = function calcPrevIndex() {
|
72
56
|
if (current !== undefined) {
|
73
57
|
setPrevIndex(current);
|
74
58
|
} else {
|
75
|
-
var index =
|
59
|
+
var index = items.findIndex(function (item) {
|
76
60
|
return item.status === 'active';
|
77
61
|
});
|
78
62
|
setPrevIndex(index !== -1 ? index : undefined);
|
@@ -82,14 +66,21 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
82
66
|
return function () {
|
83
67
|
calcPrevIndex();
|
84
68
|
};
|
85
|
-
}, [current,
|
69
|
+
}, [current, items]);
|
86
70
|
return /*#__PURE__*/React.createElement(Root, _extends({
|
87
71
|
size: size,
|
88
72
|
view: view,
|
89
73
|
ref: outerRef,
|
90
74
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, orientation === 'vertical'), classes.simple, isSimple), classes.hasIndicator, hasIndicator))
|
91
|
-
}, rest),
|
92
|
-
var
|
75
|
+
}, rest), items.map(function (item, index) {
|
76
|
+
var itemStatus = getItemStatus({
|
77
|
+
isUncontrolled: isUncontrolled,
|
78
|
+
current: current,
|
79
|
+
status: status,
|
80
|
+
index: index,
|
81
|
+
item: item
|
82
|
+
});
|
83
|
+
var isActive = itemStatus === 'active';
|
93
84
|
var itemContent = hasContent === 'active' && !isActive || hasContent === 'none' ? '' : item.content;
|
94
85
|
var itemContentAlign = orientation === 'horizontal' ? contentAlign : 'left';
|
95
86
|
var onClick = onChange ? function () {
|
@@ -101,14 +92,14 @@ export var stepsRoot = function stepsRoot(Root) {
|
|
101
92
|
title: item.title,
|
102
93
|
content: itemContent,
|
103
94
|
indicator: item.indicator,
|
104
|
-
status:
|
95
|
+
status: itemStatus,
|
105
96
|
size: size,
|
106
97
|
orientation: orientation,
|
107
98
|
contentAlign: itemContentAlign,
|
108
99
|
hasLine: hasLine,
|
109
100
|
hasLoader: hasLoader && isActive,
|
110
101
|
onClick: onClick,
|
111
|
-
items:
|
102
|
+
items: items
|
112
103
|
});
|
113
104
|
}));
|
114
105
|
});
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { classes, tokens } from './Steps.tokens';
|
3
|
-
export var base = /*#__PURE__*/css(["display:flex;flex-direction:row;&.", "{align-items:center;&:not(&.", "){&.", "{height:var(", ");}&:not(.", "){height:var(", ");}}&.", "{&.", "{width:var(", ");}&:not(.", "){width:var(", ");}}}&.", "{display:flex;flex-direction:column;justify-content:center;height:100
|
3
|
+
export var base = /*#__PURE__*/css(["display:flex;flex-direction:row;&.", "{align-items:center;&:not(&.", "){&.", "{height:var(", ");}&:not(.", "){height:var(", ");}}&.", "{&.", "{width:var(", ");}&:not(.", "){width:var(", ");}}}&.", "{display:flex;flex-direction:column;justify-content:center;height:100%;&.", "{display:inline-flex;}}"], classes.simple, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, classes.simple);
|
@@ -56,7 +56,6 @@ export var tokens = {
|
|
56
56
|
inactiveTitleColor: '--plasma-step-item-inactive-title-color',
|
57
57
|
inactiveTitleColorHover: '--plasma-step-item-inactive-title-color-hover',
|
58
58
|
contentColor: '--plasma-step-item-content-color',
|
59
|
-
focusColor: '--plasma-step-item-focus-color',
|
60
59
|
activeIndicatorBorder: '--plasma-step-item-active-indicator-border',
|
61
60
|
activeIndicatorBorderHover: '--plasma-step-item-active-indicator-border-hover',
|
62
61
|
activeIndicatorColor: '--plasma-step-item-active-indicator-color',
|
@@ -43,7 +43,6 @@ export var StepItem = function StepItem(_ref) {
|
|
43
43
|
var prevItem = items[index - 1];
|
44
44
|
var nextItem = items[index + 1];
|
45
45
|
var isActive = status === 'active';
|
46
|
-
var isNextActive = (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'active';
|
47
46
|
var isInactive = status === 'inactive';
|
48
47
|
var isPrevInactive = prevItem && !(prevItem !== null && prevItem !== void 0 && prevItem.status) || (prevItem === null || prevItem === void 0 ? void 0 : prevItem.status) === 'inactive';
|
49
48
|
var isNextInactive = !(nextItem !== null && nextItem !== void 0 && nextItem.status) || (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'inactive';
|
@@ -81,32 +80,8 @@ export var StepItem = function StepItem(_ref) {
|
|
81
80
|
setIsHovered(false);
|
82
81
|
}
|
83
82
|
}, [isDisabled]);
|
84
|
-
if (isSimple) {
|
85
|
-
var _cls;
|
86
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
87
|
-
className: cls((_cls = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, 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.transparentDivider, !hasLine), classes.verticalOrientation, isVertical), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, "isFirst", isFirst), "isLast", isLast), "isPrevInactive", isPrevInactive), "isNextInactive", isNextInactive)))
|
88
|
-
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
89
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
90
|
-
onClick: onClickHandler,
|
91
|
-
onFocus: onMouseOver,
|
92
|
-
onBlur: onMouseOut,
|
93
|
-
onMouseOver: onMouseOver,
|
94
|
-
onMouseOut: onMouseOut
|
95
|
-
}, hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
96
|
-
hasIndicator: hasIndicator
|
97
|
-
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
98
|
-
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive)),
|
99
|
-
disabled: isDisabled
|
100
|
-
}, typeof indicator === 'function' && indicator({
|
101
|
-
status: status,
|
102
|
-
item: item,
|
103
|
-
size: size
|
104
|
-
}), typeof indicator !== 'function' && indicator))), !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
|
105
|
-
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.active, isActive), classes.inactive, isInactive || isNextInactive), classes.disabled, isDisabled))
|
106
|
-
}));
|
107
|
-
}
|
108
83
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
109
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(
|
84
|
+
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))
|
110
85
|
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
111
86
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
112
87
|
onClick: onClickHandler,
|
@@ -116,21 +91,20 @@ export var StepItem = function StepItem(_ref) {
|
|
116
91
|
onMouseOut: onMouseOut
|
117
92
|
}, contentAlign === 'center' && !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
118
93
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive))
|
119
|
-
}), isVertical && /*#__PURE__*/React.createElement(StepItemDivider, {
|
94
|
+
}), isVertical && (isSimple ? !isFirst : true) && /*#__PURE__*/React.createElement(StepItemDivider, {
|
120
95
|
className: cls(classes.indentDivider, _defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive)),
|
121
96
|
indentToken: indentToken
|
122
97
|
}), hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
123
98
|
hasIndicator: hasIndicator
|
124
99
|
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
125
|
-
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
|
126
|
-
disabled: isDisabled
|
100
|
+
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
|
127
101
|
}, typeof indicator === 'function' && indicator({
|
128
102
|
status: status,
|
129
103
|
item: item,
|
130
104
|
size: size
|
131
|
-
}), typeof indicator !== 'function' && indicator), /*#__PURE__*/React.createElement(StepItemDivider, {
|
105
|
+
}), typeof indicator !== 'function' && indicator), !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
132
106
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isLast), classes.inactive, isInactive || isNextInactive))
|
133
|
-
})), /*#__PURE__*/React.createElement(StepItemContentWrapper, {
|
107
|
+
})), !isSimple && /*#__PURE__*/React.createElement(StepItemContentWrapper, {
|
134
108
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.active, isActive), classes.hasIndicator, hasIndicator))
|
135
109
|
}, /*#__PURE__*/React.createElement(StepItemTitle, {
|
136
110
|
onClick: onClickHandler,
|
@@ -138,5 +112,7 @@ export var StepItem = function StepItem(_ref) {
|
|
138
112
|
onBlur: onMouseOut,
|
139
113
|
onMouseOver: onMouseOver,
|
140
114
|
onMouseOut: onMouseOut
|
141
|
-
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content)))
|
115
|
+
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content))), isSimple && !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
|
116
|
+
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.inactive, isInactive || isNextInactive))
|
117
|
+
}));
|
142
118
|
};
|
@@ -2,7 +2,6 @@ import styled from 'styled-components';
|
|
2
2
|
import { classes, tokens } from '../../Steps.tokens';
|
3
3
|
import { component, mergeConfig } from '../../../../engines';
|
4
4
|
import { spinnerConfig, spinnerTokens } from '../../../Spinner';
|
5
|
-
import { addFocus } from '../../../../mixins';
|
6
5
|
var mergedConfig = /*#__PURE__*/mergeConfig(spinnerConfig);
|
7
6
|
var Spinner = /*#__PURE__*/component(mergedConfig);
|
8
7
|
export var SpinnerStyled = /*#__PURE__*/styled(Spinner).withConfig({
|
@@ -19,26 +18,16 @@ export var StepItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
19
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);
|
20
19
|
export var BulletIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
|
21
20
|
componentId: "plasma-new-hope__sc-bjma6z-3"
|
22
|
-
})(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex
|
23
|
-
export var BulletIndicator = /*#__PURE__*/styled.
|
21
|
+
})(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.centered);
|
22
|
+
export var BulletIndicator = /*#__PURE__*/styled.div.withConfig({
|
24
23
|
componentId: "plasma-new-hope__sc-bjma6z-4"
|
25
|
-
})(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;
|
26
|
-
outlineOffset: '-0.0625rem',
|
27
|
-
outlineSize: '0.0625rem',
|
28
|
-
outlineRadius: '50%',
|
29
|
-
outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
|
30
|
-
}), 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, /*#__PURE__*/addFocus({
|
31
|
-
outlineOffset: '-0.1875rem',
|
32
|
-
outlineSize: '0.0625rem',
|
33
|
-
outlineRadius: '50%',
|
34
|
-
outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
|
35
|
-
}), classes.inactive, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorBackground, classes.simple, tokens.inactiveIndicatorBackground);
|
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);
|
36
25
|
export var Bullet = /*#__PURE__*/styled(BulletIndicator).withConfig({
|
37
26
|
componentId: "plasma-new-hope__sc-bjma6z-5"
|
38
|
-
})(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background:var(", ");}"], tokens.bulletSize, tokens.bulletSize, classes.active, tokens.activeBulletSize, tokens.activeBulletSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorBackground);
|
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);
|
39
28
|
export var StepItemDivider = /*#__PURE__*/styled.div.withConfig({
|
40
29
|
componentId: "plasma-new-hope__sc-bjma6z-6"
|
41
|
-
})(["width:100%;height:var(", ");flex:1;background:var(", ");&.", "{background:var(", ");}&.", "{
|
30
|
+
})(["width:100%;height:var(", ");flex:1;background-color:var(", ");&.", "{background-color:var(", ");}&.", "{background-color:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], tokens.dividerThickness, tokens.activeIndicatorColor, classes.inactive, tokens.inactiveIndicatorBackground, classes.transparentDivider, classes.verticalOrientation, tokens.dividerThickness, classes.indentDivider, function (_ref2) {
|
42
31
|
var indentToken = _ref2.indentToken;
|
43
32
|
return indentToken || '';
|
44
33
|
}, function (_ref3) {
|
@@ -53,4 +42,4 @@ export var StepItemContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
53
42
|
})(["&.", "{", "{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);
|
54
43
|
export var StepItemStyled = /*#__PURE__*/styled.div.withConfig({
|
55
44
|
componentId: "plasma-new-hope__sc-bjma6z-8"
|
56
|
-
})(["
|
45
|
+
})(["display:flex;flex-direction:column;align-items:flex-start;flex:1;&.", "{flex-direction:row;align-items:stretch;", "{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;}}}&.", "{flex:0;}&.", "{opacity:var(", ");}"], classes.verticalOrientation, 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.simple, classes.disabled, tokens.disabledOpacity);
|
@@ -1,25 +1,28 @@
|
|
1
1
|
var _StyledTrigger;
|
2
|
-
var _excluded = ["size", "view", "focused", "outlined", "disabled", "labelPosition", "label", "id", "style", "className", "checked", "pressed", "defaultChecked"];
|
2
|
+
var _excluded = ["size", "toggleSize", "view", "focused", "outlined", "disabled", "labelPosition", "label", "description", "id", "style", "className", "checked", "pressed", "defaultChecked"];
|
3
3
|
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); }
|
4
4
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
5
5
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
6
6
|
import React, { forwardRef } from 'react';
|
7
7
|
import { base as sizeCSS } from '../Switch/_size/base';
|
8
|
+
import { base as toggleSizeCSS } from '../Switch/_toggleSize/base';
|
8
9
|
import { base as viewCSS } from '../Switch/_view/base';
|
9
10
|
import { base as focusedCSS } from '../Switch/_focused/base';
|
10
11
|
import { base as disabledCSS } from '../Switch/_disabled/base';
|
11
12
|
import { cx } from '../../utils';
|
12
|
-
import { StyledInput, StyledLabel, StyledTrigger, base } from './Switch.styles';
|
13
|
+
import { StyledContent, StyledDescription, StyledInput, StyledLabel, StyledTrigger, base } from './Switch.styles';
|
13
14
|
import { classes } from './Switch.tokens';
|
14
15
|
export var switchRoot = function switchRoot(Root) {
|
15
16
|
return /*#__PURE__*/forwardRef(function (props, ref) {
|
16
17
|
var size = props.size,
|
18
|
+
toggleSize = props.toggleSize,
|
17
19
|
view = props.view,
|
18
20
|
focused = props.focused,
|
19
21
|
outlined = props.outlined,
|
20
22
|
disabled = props.disabled,
|
21
23
|
labelPosition = props.labelPosition,
|
22
24
|
label = props.label,
|
25
|
+
description = props.description,
|
23
26
|
id = props.id,
|
24
27
|
style = props.style,
|
25
28
|
className = props.className,
|
@@ -31,12 +34,15 @@ export var switchRoot = function switchRoot(Root) {
|
|
31
34
|
return /*#__PURE__*/React.createElement(Root, {
|
32
35
|
view: view,
|
33
36
|
size: size,
|
37
|
+
toggleSize: toggleSize,
|
34
38
|
disabled: disabled,
|
35
39
|
focused: focused !== null && focused !== void 0 ? focused : outlined,
|
36
40
|
labelPosition: labelPosition,
|
37
41
|
id: id,
|
38
42
|
style: style,
|
39
|
-
className: cx(className
|
43
|
+
className: cx(className)
|
44
|
+
}, /*#__PURE__*/React.createElement(StyledContent, {
|
45
|
+
className: cx(classes["".concat(labelPosition, "SwitchLabelPosition")])
|
40
46
|
}, /*#__PURE__*/React.createElement(StyledInput, _extends({}, rest, {
|
41
47
|
ref: ref,
|
42
48
|
role: "switch",
|
@@ -49,7 +55,7 @@ export var switchRoot = function switchRoot(Root) {
|
|
49
55
|
tabIndex: -1
|
50
56
|
}, label), _StyledTrigger || (_StyledTrigger = /*#__PURE__*/React.createElement(StyledTrigger, {
|
51
57
|
"aria-hidden": true
|
52
|
-
})));
|
58
|
+
}))), description && /*#__PURE__*/React.createElement(StyledDescription, null, description));
|
53
59
|
});
|
54
60
|
};
|
55
61
|
export var switchConfig = {
|
@@ -64,6 +70,9 @@ export var switchConfig = {
|
|
64
70
|
view: {
|
65
71
|
css: viewCSS
|
66
72
|
},
|
73
|
+
toggleSize: {
|
74
|
+
css: toggleSizeCSS
|
75
|
+
},
|
67
76
|
disabled: {
|
68
77
|
css: disabledCSS,
|
69
78
|
attrs: true
|
@@ -2,13 +2,19 @@ import styled from 'styled-components';
|
|
2
2
|
import { css } from 'styled-components';
|
3
3
|
import { applyEllipsis } from '../../mixins';
|
4
4
|
import { classes, tokens } from './Switch.tokens';
|
5
|
-
export var base = /*#__PURE__*/css(["position:relative;display:flex;
|
6
|
-
export var
|
5
|
+
export var base = /*#__PURE__*/css(["position:relative;display:flex;flex-direction:column;gap:var(", ");cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);&:focus{outline:0 none;}"], tokens.verticalGap);
|
6
|
+
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
7
7
|
componentId: "plasma-new-hope__sc-i4fgom-0"
|
8
|
+
})(["width:100%;position:relative;display:flex;align-items:center;&.", "{justify-content:space-between;", ":0 var(", ") 0 0;}&.", "{justify-content:start;flex-direction:row-reverse;", ":0 0 0 var(", ");}"], classes.beforeSwitchLabelPosition, tokens.labelOffsetPrivate, tokens.labelOffset, classes.afterSwitchLabelPosition, tokens.labelOffsetPrivate, tokens.labelOffset);
|
9
|
+
export var StyledDescription = /*#__PURE__*/styled.div.withConfig({
|
10
|
+
componentId: "plasma-new-hope__sc-i4fgom-1"
|
11
|
+
})(["position:relative;"]);
|
12
|
+
export var StyledInput = /*#__PURE__*/styled.input.withConfig({
|
13
|
+
componentId: "plasma-new-hope__sc-i4fgom-2"
|
8
14
|
})(["position:absolute;right:0;margin:0;opacity:0;&:focus{outline:0 none;}"]);
|
9
15
|
export var StyledLabel = /*#__PURE__*/styled.span.withConfig({
|
10
|
-
componentId: "plasma-new-hope__sc-i4fgom-
|
16
|
+
componentId: "plasma-new-hope__sc-i4fgom-3"
|
11
17
|
})(["user-select:none;", ""], /*#__PURE__*/applyEllipsis());
|
12
18
|
export var StyledTrigger = /*#__PURE__*/styled.div.withConfig({
|
13
|
-
componentId: "plasma-new-hope__sc-i4fgom-
|
19
|
+
componentId: "plasma-new-hope__sc-i4fgom-4"
|
14
20
|
})(["position:relative;display:flex;align-items:center;transition:background-color 0.15s ease-in-out 0.1s;::after{content:'';position:absolute;right:auto;left:0;transition:width 0.15s ease-in-out 0s,left 0.3s ease-in-out 0s,right 0.3s ease-in-out 0s;}", ":checked ~ &::after{right:0;left:auto;}"], StyledInput);
|
@@ -18,7 +18,43 @@ import { Switch } from '@salutejs/{{ package }}';
|
|
18
18
|
|
19
19
|
export function App() {
|
20
20
|
return (
|
21
|
-
<Switch label="Переключатель" defaultChecked />
|
21
|
+
<Switch description="Описание переключателя" label="Переключатель" defaultChecked />
|
22
|
+
);
|
23
|
+
}
|
24
|
+
```
|
25
|
+
|
26
|
+
## Примеры
|
27
|
+
|
28
|
+
### Размер Switch
|
29
|
+
Размер компонента задается с помощью свойства `size`.
|
30
|
+
|
31
|
+
```tsx live
|
32
|
+
import React from 'react';
|
33
|
+
import { Button } from '@salutejs/{{ package }}';
|
34
|
+
|
35
|
+
export function App() {
|
36
|
+
return (
|
37
|
+
<div>
|
38
|
+
<Switch size="s" description="Описание переключателя" label="Переключатель" defaultChecked />
|
39
|
+
<Switch size="m" description="Описание переключателя" label="Переключатель" defaultChecked />
|
40
|
+
<Switch size="l" description="Описание переключателя" label="Переключатель" defaultChecked />
|
41
|
+
</div>
|
42
|
+
);
|
43
|
+
}
|
44
|
+
```
|
45
|
+
|
46
|
+
Размер переключателя задается с помощью свойства `toggleSize`.
|
47
|
+
|
48
|
+
```tsx live
|
49
|
+
import React from 'react';
|
50
|
+
import { Button } from '@salutejs/{{ package }}';
|
51
|
+
|
52
|
+
export function App() {
|
53
|
+
return (
|
54
|
+
<div style=\{{ alignItems: "center" }}>
|
55
|
+
<Switch toggleSize="s" label="Переключатель" defaultChecked />
|
56
|
+
<Switch toggleSize="l" label="Переключатель" defaultChecked />
|
57
|
+
</div>
|
22
58
|
);
|
23
59
|
}
|
24
60
|
```
|
@@ -5,11 +5,22 @@ export var tokens = {
|
|
5
5
|
fontWeight: '--plasma-switch-font-weight',
|
6
6
|
letterSpacing: '--plasma-switch-letter-spacing',
|
7
7
|
lineHeight: '--plasma-switch-line-height',
|
8
|
+
/* Токены description */
|
9
|
+
descriptionFontFamily: '--plasma-switch-description-font-family',
|
10
|
+
descriptionFontStyle: '--plasma-switch-description-font-style',
|
11
|
+
descriptionFontSize: '--plasma-switch-description-font-size',
|
12
|
+
descriptionFontWeight: '--plasma-switch-description-font-weight',
|
13
|
+
descriptionLetterSpacing: '--plasma-switch-description-letter-spacing',
|
14
|
+
descriptionLineHeight: '--plasma-switch-description-line-height',
|
8
15
|
/* Цвет подписи */
|
9
16
|
labelColor: '--plasma-switch__label-color',
|
10
17
|
labelOffset: '--plasma-switch__label-offset',
|
18
|
+
/* Цвет описания */
|
19
|
+
descriptionColor: '--plasma-switch__description-color',
|
20
|
+
descriptionOffset: '--plasma-switch__description-offset',
|
11
21
|
/** Прозрачность для всего компонента в состоянии disabled */
|
12
22
|
disabledOpacity: '--plasma-switch-disabled-opacity',
|
23
|
+
verticalGap: '--plasma-switch-vertical-gap',
|
13
24
|
trackWidth: '--plasma-switch__track-width',
|
14
25
|
trackHeight: '--plasma-switch__track-height',
|
15
26
|
trackBorderRadius: '--plasma-switch__track-border-radius',
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { tokens } from '../Switch.tokens';
|
3
|
-
import {
|
4
|
-
export var base = /*#__PURE__*/css(["font-family:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");font-size:var(", ");", "{
|
3
|
+
import { StyledContent, StyledDescription, StyledLabel } from '../Switch.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{font-family:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");font-size:var(", ");}", "{font-family:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");font-size:var(", ");}", "{margin:var(", ",0);}"], StyledContent, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.lineHeight, tokens.fontSize, StyledDescription, tokens.descriptionFontFamily, tokens.descriptionFontStyle, tokens.descriptionFontWeight, tokens.descriptionLetterSpacing, tokens.descriptionLineHeight, tokens.descriptionFontSize, StyledLabel, tokens.labelOffsetPrivate);
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { tokens } from '../Switch.tokens';
|
3
|
+
import { StyledTrigger } from '../Switch.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{flex:0 0 var(", ");width:var(", ");height:var(", ");border-radius:var(", ");&::after{width:var(", ");height:var(", ");border-radius:var(", ");margin:auto var(", ");}}:active:not([disabled]) ", "::after{width:calc(var(", ") * var(", ",1));}"], StyledTrigger, tokens.trackWidth, tokens.trackWidth, tokens.trackHeight, tokens.trackBorderRadius, tokens.thumbSize, tokens.thumbSize, tokens.thumbBorderRadius, tokens.thumbOffset, StyledTrigger, tokens.thumbSize, tokens.thumbPressScale);
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { css } from 'styled-components';
|
2
2
|
import { tokens } from '../Switch.tokens';
|
3
|
-
import { StyledTrigger, StyledInput } from '../Switch.styles';
|
4
|
-
export var base = /*#__PURE__*/css(["", "{background-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{box-shadow:var(", ",var(", "));}"], StyledTrigger, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOffHover, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOn, StyledInput, StyledTrigger, tokens.trackBackgroundColorOnHover, tokens.trackBackgroundColorOn, StyledTrigger, tokens.thumbBackgroundColor, tokens.thumbBoxShadow, StyledInput, StyledTrigger, tokens.thumbBoxShadowOn, tokens.thumbBoxShadow);
|
3
|
+
import { StyledTrigger, StyledInput, StyledLabel, StyledDescription } from '../Switch.styles';
|
4
|
+
export var base = /*#__PURE__*/css(["", "{background-color:var(", ");}", ":not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", ":checked ~ ", "{background-color:var(", ");}", ":checked:not([disabled]) ~ ", ":hover{background-color:var(", ",var(", "));}", "::after{background-color:var(", ");box-shadow:var(", ");}", ":checked ~ ", "::after{box-shadow:var(", ",var(", "));}", "{color:var(", ");}", "{color:var(", ");}"], StyledTrigger, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOffHover, tokens.trackBackgroundColorOff, StyledInput, StyledTrigger, tokens.trackBackgroundColorOn, StyledInput, StyledTrigger, tokens.trackBackgroundColorOnHover, tokens.trackBackgroundColorOn, StyledTrigger, tokens.thumbBackgroundColor, tokens.thumbBoxShadow, StyledInput, StyledTrigger, tokens.thumbBoxShadowOn, tokens.thumbBoxShadow, StyledLabel, tokens.labelColor, StyledDescription, tokens.descriptionColor);
|
@@ -7,7 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
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);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":
|
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);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":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
11
|
},
|
12
12
|
size: {
|
13
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),
|
@@ -4,15 +4,22 @@ export var config = {
|
|
4
4
|
defaults: {
|
5
5
|
view: 'default',
|
6
6
|
size: 'm',
|
7
|
+
toggleSize: 'l',
|
7
8
|
labelPosition: 'before',
|
8
9
|
focused: 'true'
|
9
10
|
},
|
10
11
|
variations: {
|
11
12
|
size: {
|
12
|
-
|
13
|
+
s: /*#__PURE__*/css(["", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset),
|
14
|
+
m: /*#__PURE__*/css(["", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset),
|
15
|
+
l: /*#__PURE__*/css(["", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-xs-letter-spacing);", ":0.25rem;", ":0.75rem;"], switchTokens.fontFamily, switchTokens.fontStyle, switchTokens.fontWeight, switchTokens.lineHeight, switchTokens.fontSize, switchTokens.letterSpacing, switchTokens.descriptionFontFamily, switchTokens.descriptionFontStyle, switchTokens.descriptionFontWeight, switchTokens.descriptionLineHeight, switchTokens.descriptionFontSize, switchTokens.descriptionLetterSpacing, switchTokens.verticalGap, switchTokens.labelOffset)
|
16
|
+
},
|
17
|
+
toggleSize: {
|
18
|
+
l: /*#__PURE__*/css(["", ":2.75rem;", ":1.75rem;", ":calc(var(", ") / 2);", ":1.5rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale),
|
19
|
+
s: /*#__PURE__*/css(["", ":2rem;", ":1.25rem;", ":calc(var(", ") / 2);", ":1rem;", ":calc(var(", ") / 2);", ":0.125rem;", ":1.25;"], switchTokens.trackWidth, switchTokens.trackHeight, switchTokens.trackBorderRadius, switchTokens.trackHeight, switchTokens.thumbSize, switchTokens.thumbBorderRadius, switchTokens.thumbSize, switchTokens.thumbOffset, switchTokens.thumbPressScale)
|
13
20
|
},
|
14
21
|
view: {
|
15
|
-
"default": /*#__PURE__*/css(["", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.thumbBackgroundColor, switchTokens.thumbBoxShadow)
|
22
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-secondary);", ":var(--surface-accent);", ":var(--surface-accent-hover);", ":var(--surface-transparent-tertiary);", ":var(--surface-transparent-tertiary-hover);", ":var(--on-dark-surface-solid-default);", ":0 1px 1px rgba(0,0,0,0.11);"], switchTokens.labelColor, switchTokens.descriptionColor, switchTokens.trackBackgroundColorOn, switchTokens.trackBackgroundColorOnHover, switchTokens.trackBackgroundColorOff, switchTokens.trackBackgroundColorOffHover, switchTokens.thumbBackgroundColor, switchTokens.thumbBoxShadow)
|
16
23
|
},
|
17
24
|
disabled: {
|
18
25
|
"true": /*#__PURE__*/css(["", ":0.4;"], switchTokens.disabledOpacity)
|
@@ -18,7 +18,7 @@ const meta: Meta<SwitchProps> = {
|
|
18
18
|
decorators: [WithTheme],
|
19
19
|
component: Switch,
|
20
20
|
argTypes: {
|
21
|
-
...argTypesFromConfig(mergeConfig(switchConfig, config), ['
|
21
|
+
...argTypesFromConfig(mergeConfig(switchConfig, config), ['view', 'focused']),
|
22
22
|
labelPosition: {
|
23
23
|
options: ['before', 'after'],
|
24
24
|
control: { type: 'select' },
|
@@ -26,6 +26,7 @@ const meta: Meta<SwitchProps> = {
|
|
26
26
|
},
|
27
27
|
args: {
|
28
28
|
label: 'Label',
|
29
|
+
description: 'Description',
|
29
30
|
labelPosition: 'before',
|
30
31
|
},
|
31
32
|
};
|
@@ -64,5 +65,10 @@ const StoryDefault = (args: SwitchProps) => {
|
|
64
65
|
};
|
65
66
|
|
66
67
|
export const Default: StoryObj<SwitchProps> = {
|
68
|
+
args: {
|
69
|
+
size: 'm',
|
70
|
+
toggleSize: 'l',
|
71
|
+
disabled: false,
|
72
|
+
},
|
67
73
|
render: (args) => <StoryDefault {...args} />,
|
68
74
|
};
|
@@ -7,7 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
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);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":
|
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);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":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
11
|
},
|
12
12
|
size: {
|
13
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),
|