@pingux/astro 2.140.0-alpha.3 → 2.140.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/Callout/Callout.stories.js +16 -6
- package/lib/cjs/components/DataTable/DataTable.js +13 -10
- package/lib/cjs/components/Stepper/Step.js +11 -4
- package/lib/cjs/components/Stepper/Stepper.js +42 -8
- package/lib/cjs/components/Stepper/Stepper.stories.js +48 -2
- package/lib/cjs/components/Stepper/Stepper.styles.js +85 -30
- package/lib/cjs/components/Text/Text.styles.d.ts +840 -0
- package/lib/cjs/components/Text/Text.styles.js +10 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +2 -1
- package/lib/cjs/styles/themes/astro/customProperties/icons.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +5 -0
- package/lib/cjs/styles/themes/next-gen/variants/dataTable.d.ts +5 -0
- package/lib/cjs/styles/themes/next-gen/variants/dataTable.js +5 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +5 -0
- package/lib/cjs/types/dataTable.d.ts +2 -0
- package/lib/components/Callout/Callout.stories.js +16 -6
- package/lib/components/DataTable/DataTable.js +13 -10
- package/lib/components/Stepper/Step.js +11 -4
- package/lib/components/Stepper/Stepper.js +43 -9
- package/lib/components/Stepper/Stepper.stories.js +45 -0
- package/lib/components/Stepper/Stepper.styles.js +83 -29
- package/lib/components/Text/Text.styles.js +10 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +2 -1
- package/lib/styles/themes/astro/customProperties/icons.js +1 -1
- package/lib/styles/themes/next-gen/variants/dataTable.js +5 -0
- package/package.json +1 -1
@@ -128,15 +128,25 @@ Warning.parameters = {
|
|
128
128
|
url: _figmaLinks.FIGMA_LINKS.callout.warning
|
129
129
|
}
|
130
130
|
};
|
131
|
+
var iconContainer = {
|
132
|
+
display: 'flex',
|
133
|
+
justifyContent: 'center',
|
134
|
+
alignItems: 'center',
|
135
|
+
width: 25,
|
136
|
+
height: 25,
|
137
|
+
minWidth: 25,
|
138
|
+
minHeight: 25,
|
139
|
+
borderStyle: 'solid',
|
140
|
+
borderRadius: '50%',
|
141
|
+
backgroundColor: 'active',
|
142
|
+
borderColor: 'active',
|
143
|
+
color: 'text.primaryLight',
|
144
|
+
mx: 'md'
|
145
|
+
};
|
131
146
|
var WithCustomIcon = function WithCustomIcon() {
|
132
147
|
return (0, _react2.jsx)(_index.Callout, {
|
133
148
|
icon: (0, _react2.jsx)(_index.Box, {
|
134
|
-
|
135
|
-
mx: "md",
|
136
|
-
minHeight: 25,
|
137
|
-
minWidth: 25,
|
138
|
-
height: 25,
|
139
|
-
width: 25
|
149
|
+
sx: iconContainer
|
140
150
|
}, (0, _react2.jsx)(_index.Icon, {
|
141
151
|
icon: _CheckBoldIcon["default"],
|
142
152
|
title: {
|
@@ -33,7 +33,7 @@ var _useGetTheme3 = _interopRequireDefault(require("../../hooks/useGetTheme"));
|
|
33
33
|
var _index = require("../../index");
|
34
34
|
var _DataTableVirtualizer = _interopRequireDefault(require("./DataTableVirtualizer"));
|
35
35
|
var _react2 = require("@emotion/react");
|
36
|
-
var _excluded = ["defaultSelectedKeys", "selectionMode", "selectedKeys"],
|
36
|
+
var _excluded = ["defaultSelectedKeys", "selectionMode", "selectedKeys", "containerProps"],
|
37
37
|
_excluded2 = ["children"],
|
38
38
|
_excluded3 = ["children"],
|
39
39
|
_excluded4 = ["item", "children", "hasActions"];
|
@@ -69,6 +69,7 @@ var DataTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
69
69
|
defaultSelectedKeys = _props$defaultSelecte === void 0 ? [] : _props$defaultSelecte,
|
70
70
|
selectionMode = props.selectionMode,
|
71
71
|
selectedKeys = props.selectedKeys,
|
72
|
+
containerProps = props.containerProps,
|
72
73
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
73
74
|
var direction = 'ltr';
|
74
75
|
var onAction = props.onAction,
|
@@ -246,9 +247,9 @@ var DataTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
246
247
|
}
|
247
248
|
};
|
248
249
|
var mergedProps = (0, _reactAria.mergeProps)(gridProps, focusProps);
|
249
|
-
return (0, _react2.jsx)(_index.Box, {
|
250
|
+
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
250
251
|
variant: "dataTable.container"
|
251
|
-
}, (0, _react2.jsx)(_DataTableContext.DataTableContext.Provider, {
|
252
|
+
}, containerProps), (0, _react2.jsx)(_DataTableContext.DataTableContext.Provider, {
|
252
253
|
value: {
|
253
254
|
state: state,
|
254
255
|
layout: layout,
|
@@ -291,24 +292,26 @@ var TableColumnHeader = function TableColumnHeader(props) {
|
|
291
292
|
var _useDataTableContext = (0, _DataTableContext.useDataTableContext)(),
|
292
293
|
state = _useDataTableContext.state;
|
293
294
|
var _useGetTheme2 = (0, _useGetTheme3["default"])(),
|
294
|
-
icons = _useGetTheme2.icons
|
295
|
-
|
296
|
-
|
295
|
+
icons = _useGetTheme2.icons,
|
296
|
+
isOnyx = _useGetTheme2.themeState.isOnyx;
|
297
|
+
var Ascending = icons.Ascending,
|
298
|
+
Descending = icons.Descending;
|
297
299
|
var _useTableColumnHeader = (0, _table.useTableColumnHeader)({
|
298
300
|
node: column,
|
299
301
|
isVirtualized: true
|
300
302
|
}, state, ref),
|
301
303
|
columnHeaderProps = _useTableColumnHeader.columnHeaderProps;
|
302
304
|
var columnProps = column.props;
|
305
|
+
var iconSize = isOnyx ? 16 : 24;
|
303
306
|
var arrowIcon = ((_state$sortDescriptor = state.sortDescriptor) === null || _state$sortDescriptor === void 0 ? void 0 : _state$sortDescriptor.direction) === 'ascending' && column.key === ((_state$sortDescriptor2 = state.sortDescriptor) === null || _state$sortDescriptor2 === void 0 ? void 0 : _state$sortDescriptor2.column) ? (0, _react2.jsx)(_index.Icon, {
|
304
|
-
size:
|
305
|
-
icon:
|
307
|
+
size: iconSize,
|
308
|
+
icon: Ascending,
|
306
309
|
title: {
|
307
310
|
name: 'Menu Up Icon'
|
308
311
|
}
|
309
312
|
}) : (0, _react2.jsx)(_index.Icon, {
|
310
|
-
size:
|
311
|
-
icon:
|
313
|
+
size: iconSize,
|
314
|
+
icon: Descending,
|
312
315
|
color: "active",
|
313
316
|
title: {
|
314
317
|
name: 'Menu Down Icon'
|
@@ -16,6 +16,7 @@ var _CheckBoldIcon = _interopRequireDefault(require("@pingux/mdi-react/CheckBold
|
|
16
16
|
var _interactions = require("@react-aria/interactions");
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
18
18
|
var _index = require("../../index");
|
19
|
+
var _orientation = _interopRequireDefault(require("../../utils/devUtils/constants/orientation"));
|
19
20
|
var _Stepper = require("./Stepper.constants");
|
20
21
|
var _react2 = require("@emotion/react");
|
21
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -24,25 +25,31 @@ var COMPLETED = _Stepper.stepStatuses.COMPLETED,
|
|
24
25
|
INACTIVE = _Stepper.stepStatuses.INACTIVE;
|
25
26
|
var Step = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
26
27
|
var status = props.status,
|
27
|
-
value = props.value
|
28
|
+
value = props.value,
|
29
|
+
className = props.className,
|
30
|
+
orientation = props.orientation;
|
28
31
|
var _useHover = (0, _interactions.useHover)(props),
|
29
32
|
hoverProps = _useHover.hoverProps,
|
30
33
|
isHovered = _useHover.isHovered;
|
34
|
+
var stepValue = orientation !== _orientation["default"].VERTICAL && value;
|
31
35
|
return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
32
36
|
variant: "stepper.step.".concat(status),
|
33
37
|
ref: ref
|
34
|
-
}, hoverProps
|
38
|
+
}, hoverProps, {
|
39
|
+
className: className
|
40
|
+
}), status === COMPLETED && !isHovered ? (0, _react2.jsx)(_index.Icon, {
|
35
41
|
icon: _CheckBoldIcon["default"],
|
36
42
|
size: 23,
|
37
43
|
color: "text.primaryLight",
|
38
44
|
title: {
|
39
45
|
name: 'Check Bold Icon'
|
40
46
|
}
|
41
|
-
}) :
|
47
|
+
}) : stepValue);
|
42
48
|
});
|
43
49
|
Step.propTypes = {
|
44
50
|
status: _propTypes["default"].oneOf((0, _values["default"])(_Stepper.stepStatuses)),
|
45
|
-
value: _propTypes["default"].number
|
51
|
+
value: _propTypes["default"].number,
|
52
|
+
orientation: _propTypes["default"].oneOf([_orientation["default"].VERTICAL, _orientation["default"].HORIZONTAL])
|
46
53
|
};
|
47
54
|
Step.defaultProps = {
|
48
55
|
status: INACTIVE,
|
@@ -25,11 +25,14 @@ var _react = _interopRequireWildcard(require("react"));
|
|
25
25
|
var _list = require("@react-stately/list");
|
26
26
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
27
27
|
var _ = require("../..");
|
28
|
+
var _hooks = require("../../hooks");
|
29
|
+
var _orientation = _interopRequireDefault(require("../../utils/devUtils/constants/orientation"));
|
28
30
|
var _isValidPositiveInt = _interopRequireDefault(require("../../utils/devUtils/props/isValidPositiveInt"));
|
29
31
|
var _Line = _interopRequireDefault(require("./Line"));
|
30
32
|
var _Stepper = require("./Stepper.constants");
|
33
|
+
var _Stepper2 = require("./Stepper.styles");
|
31
34
|
var _react2 = require("@emotion/react");
|
32
|
-
var _excluded = ["activeStep", "onStepChange", "tabListProps", "tooltipProps"];
|
35
|
+
var _excluded = ["activeStep", "onStepChange", "tabListProps", "tooltipProps", "orientation", "className"];
|
33
36
|
/* istanbul ignore file */
|
34
37
|
function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
35
38
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
@@ -44,6 +47,8 @@ var Stepper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
44
47
|
onStepChange = props.onStepChange,
|
45
48
|
tabListProps = props.tabListProps,
|
46
49
|
tooltipProps = props.tooltipProps,
|
50
|
+
orientation = props.orientation,
|
51
|
+
className = props.className,
|
47
52
|
others = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
48
53
|
var state = (0, _list.useSingleSelectListState)(props);
|
49
54
|
var getStatus = function getStatus(i) {
|
@@ -60,23 +65,46 @@ var Stepper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
60
65
|
onStepChange(+key);
|
61
66
|
}
|
62
67
|
};
|
68
|
+
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
69
|
+
'is-vertical': orientation === _orientation["default"].VERTICAL,
|
70
|
+
'is-horizontal': orientation === _orientation["default"].HORIZONTAL
|
71
|
+
}),
|
72
|
+
classNames = _useStatusClasses.classNames;
|
63
73
|
var steps = (0, _from["default"])(state.collection);
|
64
74
|
var lines = (0, _map["default"])(steps).call(steps, function (_v, i) {
|
65
75
|
return (0, _react2.jsx)(_Line["default"], {
|
76
|
+
className: classNames,
|
66
77
|
status: getStatus(i + 2)
|
67
78
|
});
|
68
79
|
});
|
69
80
|
var isFirst = true; // make sure not to insert until there's at least one non-null child
|
70
81
|
|
71
82
|
var render = (0, _map["default"])(steps).call(steps, function (item, i) {
|
83
|
+
var _item$props;
|
72
84
|
var stepIndex = i + 1;
|
73
85
|
var stepStatus = getStatus(stepIndex);
|
86
|
+
var line = (0, _isArray["default"])(lines) ? lines[i - 1] : lines;
|
87
|
+
var defaultIndicator = (0, _react2.jsx)(_.Box, {
|
88
|
+
variant: "forms.label.indicator"
|
89
|
+
}, "*");
|
74
90
|
var step = (0, _react2.jsx)(_.Step, {
|
75
91
|
key: item.key,
|
76
92
|
value: stepIndex,
|
77
|
-
status: stepStatus
|
93
|
+
status: stepStatus,
|
94
|
+
className: classNames,
|
95
|
+
orientation: orientation
|
78
96
|
});
|
79
|
-
var
|
97
|
+
var verticalStep = (0, _react2.jsx)(_.Box, {
|
98
|
+
isRow: true
|
99
|
+
}, (0, _react2.jsx)(_.Step, {
|
100
|
+
key: item.key,
|
101
|
+
value: stepIndex,
|
102
|
+
status: stepStatus,
|
103
|
+
className: classNames,
|
104
|
+
orientation: orientation
|
105
|
+
}), (0, _react2.jsx)(_.Text, {
|
106
|
+
variant: "stepperLabel"
|
107
|
+
}, item.textValue, (item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 ? void 0 : _item$props.isRequired) && defaultIndicator));
|
80
108
|
|
81
109
|
/* istanbul ignore next */
|
82
110
|
var textValue = item && item.value && item.value.label || item.textValue || stepIndex.toString();
|
@@ -90,11 +118,12 @@ var Stepper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
90
118
|
variant: 'stepper.tabLabel'
|
91
119
|
},
|
92
120
|
textValue: textValue,
|
93
|
-
title: step,
|
121
|
+
title: orientation === _orientation["default"].VERTICAL ? verticalStep : step,
|
94
122
|
"aria-label": textValue,
|
95
123
|
content: item.rendered,
|
96
|
-
separator: !isFirst && line,
|
97
|
-
tooltipTriggerProps: tooltipProps
|
124
|
+
separator: !isFirst && orientation === _orientation["default"].HORIZONTAL && !isFirst && line,
|
125
|
+
tooltipTriggerProps: tooltipProps,
|
126
|
+
sx: i !== steps.length - 1 && orientation === _orientation["default"].VERTICAL && _Stepper2.verticalLine
|
98
127
|
});
|
99
128
|
isFirst = isFirst && !container;
|
100
129
|
return container;
|
@@ -108,7 +137,8 @@ var Stepper = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
108
137
|
}, tabListProps),
|
109
138
|
onSelectionChange: onStepChangeHandler,
|
110
139
|
selectedKey: activeStep === null || activeStep === void 0 ? void 0 : activeStep.toString(),
|
111
|
-
mode: "tooltip"
|
140
|
+
mode: "tooltip",
|
141
|
+
orientation: orientation
|
112
142
|
}, others), render);
|
113
143
|
});
|
114
144
|
Stepper.propTypes = {
|
@@ -132,8 +162,12 @@ Stepper.propTypes = {
|
|
132
162
|
onStepChange: _propTypes["default"].func,
|
133
163
|
/** A props object that is subsequently spread into the rendered tablist. */
|
134
164
|
tabListProps: _propTypes["default"].shape({}),
|
135
|
-
tooltipProps: _propTypes["default"].shape({})
|
165
|
+
tooltipProps: _propTypes["default"].shape({}),
|
166
|
+
orientation: _propTypes["default"].oneOf(['vertical', 'horizontal'])
|
136
167
|
};
|
137
168
|
Stepper.displayName = 'Stepper';
|
169
|
+
Stepper.defaultProps = {
|
170
|
+
orientation: 'horizontal'
|
171
|
+
};
|
138
172
|
var _default = Stepper;
|
139
173
|
exports["default"] = _default;
|
@@ -8,7 +8,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
8
8
|
_Object$defineProperty(exports, "__esModule", {
|
9
9
|
value: true
|
10
10
|
});
|
11
|
-
exports["default"] = exports.WithCustomTooltip = exports.Panel = exports.DisabledToolTips = exports.Default = exports.ControlledStepper = void 0;
|
11
|
+
exports["default"] = exports.WithCustomTooltip = exports.VerticalStepper = exports.Panel = exports.DisabledToolTips = exports.Default = exports.ControlledStepper = void 0;
|
12
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
13
13
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
14
|
var _react = _interopRequireWildcard(require("react"));
|
@@ -84,6 +84,23 @@ var steps = [{
|
|
84
84
|
title: 'Excepteur Sint',
|
85
85
|
name: 'step3'
|
86
86
|
}];
|
87
|
+
var customSteps = [{
|
88
|
+
label: 'Duis Aute',
|
89
|
+
children: 'Quis autem vel eum iure reprehenderit qui in ea voluptate',
|
90
|
+
title: 'Duis Aute',
|
91
|
+
name: 'step1',
|
92
|
+
isRequired: true
|
93
|
+
}, {
|
94
|
+
label: 'Lorem Ipsum',
|
95
|
+
children: 'Sed ut perspiciatis unde omnis',
|
96
|
+
title: 'Lorem Ipsum',
|
97
|
+
name: 'step2'
|
98
|
+
}, {
|
99
|
+
label: 'Excepteur Sint',
|
100
|
+
children: 'Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam',
|
101
|
+
title: 'Excepteur Sint',
|
102
|
+
name: 'step3'
|
103
|
+
}];
|
87
104
|
var sx = {
|
88
105
|
overlayPanel: {
|
89
106
|
padding: '0px',
|
@@ -98,6 +115,11 @@ var sx = {
|
|
98
115
|
},
|
99
116
|
buttonStyle: {
|
100
117
|
margin: '50px 0px'
|
118
|
+
},
|
119
|
+
verticalContentContainer: {
|
120
|
+
marginTop: 'lg',
|
121
|
+
ml: 'lg',
|
122
|
+
gap: 'sm'
|
101
123
|
}
|
102
124
|
};
|
103
125
|
var Default = function Default(args) {
|
@@ -293,4 +315,28 @@ var Panel = function Panel() {
|
|
293
315
|
})))
|
294
316
|
);
|
295
317
|
};
|
296
|
-
exports.Panel = Panel;
|
318
|
+
exports.Panel = Panel;
|
319
|
+
var VerticalStepper = function VerticalStepper() {
|
320
|
+
var _useState5 = (0, _react.useState)(2),
|
321
|
+
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
322
|
+
activeStep = _useState6[0],
|
323
|
+
setActiveStep = _useState6[1];
|
324
|
+
return (0, _react2.jsx)(_index.Stepper, {
|
325
|
+
items: customSteps,
|
326
|
+
activeStep: activeStep,
|
327
|
+
onStepChange: setActiveStep,
|
328
|
+
orientation: "vertical",
|
329
|
+
mode: "tooltipIsDisabled"
|
330
|
+
}, function (item) {
|
331
|
+
return (0, _react2.jsx)(_index.Item, {
|
332
|
+
key: item.name,
|
333
|
+
textValue: item.title,
|
334
|
+
isRequired: item === null || item === void 0 ? void 0 : item.isRequired
|
335
|
+
}, (0, _react2.jsx)(_index.Box, {
|
336
|
+
sx: sx.verticalContentContainer
|
337
|
+
}, (0, _react2.jsx)(_index.Text, {
|
338
|
+
fontSize: "md"
|
339
|
+
}, item.children)));
|
340
|
+
});
|
341
|
+
};
|
342
|
+
exports.VerticalStepper = VerticalStepper;
|
@@ -12,7 +12,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
12
12
|
_Object$defineProperty(exports, "__esModule", {
|
13
13
|
value: true
|
14
14
|
});
|
15
|
-
exports["default"] = void 0;
|
15
|
+
exports.verticalLine = exports["default"] = void 0;
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
17
17
|
var _Buttons = require("../Button/Buttons.styles");
|
18
18
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
@@ -24,19 +24,49 @@ var tabs = {
|
|
24
24
|
outline: 'none',
|
25
25
|
borderBottom: 'none',
|
26
26
|
mb: 0,
|
27
|
-
|
28
|
-
|
27
|
+
justifyContent: 'center',
|
28
|
+
'&.is-horizontal': {
|
29
|
+
width: '100%'
|
30
|
+
},
|
31
|
+
'&.is-vertical': {
|
32
|
+
minWidth: '217px',
|
33
|
+
borderRight: '1px solid #e4e6e9'
|
34
|
+
}
|
35
|
+
};
|
36
|
+
var verticalLine = {
|
37
|
+
'&:before': {
|
38
|
+
position: 'absolute',
|
39
|
+
content: '""',
|
40
|
+
borderLeft: '2px solid',
|
41
|
+
borderLeftColor: 'neutral.80',
|
42
|
+
left: '27px',
|
43
|
+
top: '28px',
|
44
|
+
height: '26px'
|
45
|
+
}
|
29
46
|
};
|
47
|
+
exports.verticalLine = verticalLine;
|
30
48
|
var tab = {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
49
|
+
'&.is-horizontal': {
|
50
|
+
mb: 0,
|
51
|
+
mr: 0,
|
52
|
+
outline: 'none',
|
53
|
+
'&.is-focused': _objectSpread({
|
54
|
+
borderRadius: '50%'
|
55
|
+
}, _Buttons.defaultFocus),
|
56
|
+
'&:not(:first-of-type)': {
|
57
|
+
flex: 1,
|
58
|
+
maxWidth: 122
|
59
|
+
}
|
60
|
+
},
|
61
|
+
'&.is-vertical': {
|
62
|
+
position: 'relative',
|
63
|
+
height: '42px',
|
64
|
+
width: '100%',
|
65
|
+
py: '12px',
|
66
|
+
px: '20px',
|
67
|
+
':focus-visible:not(.is-focused)': {
|
68
|
+
outline: 'none'
|
69
|
+
}
|
40
70
|
}
|
41
71
|
};
|
42
72
|
var tabLabel = {
|
@@ -48,13 +78,13 @@ var outerWrapper = {
|
|
48
78
|
|
49
79
|
/** Step styles */
|
50
80
|
var stepBase = {
|
81
|
+
display: 'flex',
|
82
|
+
justifyContent: 'center',
|
83
|
+
alignItems: 'center',
|
51
84
|
width: 32,
|
52
85
|
height: 32,
|
53
86
|
minWidth: 32,
|
54
87
|
minHeight: 32,
|
55
|
-
display: 'flex',
|
56
|
-
justifyContent: 'center',
|
57
|
-
alignItems: 'center',
|
58
88
|
borderWidth: 1,
|
59
89
|
borderStyle: 'solid',
|
60
90
|
borderRadius: '50%',
|
@@ -67,22 +97,47 @@ var stepBase = {
|
|
67
97
|
color: 'text.primaryLight'
|
68
98
|
}
|
69
99
|
};
|
100
|
+
var stepBaseVertical = _objectSpread(_objectSpread({}, stepBase), {}, {
|
101
|
+
width: 16,
|
102
|
+
height: 16,
|
103
|
+
minWidth: 16,
|
104
|
+
minHeight: 16
|
105
|
+
});
|
70
106
|
var step = {
|
71
|
-
active:
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
107
|
+
active: {
|
108
|
+
'&.is-horizontal': _objectSpread({
|
109
|
+
backgroundColor: 'accent.99',
|
110
|
+
borderColor: 'active',
|
111
|
+
color: 'active'
|
112
|
+
}, stepBase),
|
113
|
+
'&.is-vertical': _objectSpread(_objectSpread({}, stepBaseVertical), {}, {
|
114
|
+
backgroundColor: '#fff',
|
115
|
+
border: '4px solid',
|
116
|
+
borderColor: 'active'
|
117
|
+
})
|
118
|
+
},
|
119
|
+
completed: {
|
120
|
+
'&.is-horizontal': _objectSpread({
|
121
|
+
backgroundColor: 'active',
|
122
|
+
borderColor: 'active',
|
123
|
+
color: 'text.primaryLight'
|
124
|
+
}, stepBase),
|
125
|
+
'&.is-vertical': _objectSpread({
|
126
|
+
backgroundColor: 'active',
|
127
|
+
borderColor: 'transparent'
|
128
|
+
}, stepBaseVertical)
|
129
|
+
},
|
130
|
+
inactive: {
|
131
|
+
'&.is-horizontal': _objectSpread({
|
132
|
+
backgroundColor: 'white',
|
133
|
+
borderColor: 'neutral.80',
|
134
|
+
color: 'neutral.40'
|
135
|
+
}, stepBase),
|
136
|
+
'&.is-vertical': _objectSpread(_objectSpread({}, stepBaseVertical), {}, {
|
137
|
+
backgroundColor: '#caced3',
|
138
|
+
border: '4px solid #fff'
|
139
|
+
})
|
140
|
+
}
|
86
141
|
};
|
87
142
|
|
88
143
|
/** Line styles */
|