@zendeskgarden/react-accordions 8.57.0 → 8.58.0
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/dist/index.cjs.js +394 -698
- package/dist/index.esm.js +394 -698
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -46,299 +46,114 @@ var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce);
|
|
|
46
46
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultLegacy(mergeRefs);
|
|
47
47
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
48
48
|
|
|
49
|
-
function ownKeys(object, enumerableOnly) {
|
|
50
|
-
var keys = Object.keys(object);
|
|
51
|
-
|
|
52
|
-
if (Object.getOwnPropertySymbols) {
|
|
53
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
54
|
-
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
55
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
56
|
-
})), keys.push.apply(keys, symbols);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return keys;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function _objectSpread2(target) {
|
|
63
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
64
|
-
var source = null != arguments[i] ? arguments[i] : {};
|
|
65
|
-
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
66
|
-
_defineProperty(target, key, source[key]);
|
|
67
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
68
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return target;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function _defineProperty(obj, key, value) {
|
|
76
|
-
if (key in obj) {
|
|
77
|
-
Object.defineProperty(obj, key, {
|
|
78
|
-
value: value,
|
|
79
|
-
enumerable: true,
|
|
80
|
-
configurable: true,
|
|
81
|
-
writable: true
|
|
82
|
-
});
|
|
83
|
-
} else {
|
|
84
|
-
obj[key] = value;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return obj;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
49
|
function _extends$3() {
|
|
91
50
|
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
92
51
|
for (var i = 1; i < arguments.length; i++) {
|
|
93
52
|
var source = arguments[i];
|
|
94
|
-
|
|
95
53
|
for (var key in source) {
|
|
96
54
|
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
97
55
|
target[key] = source[key];
|
|
98
56
|
}
|
|
99
57
|
}
|
|
100
58
|
}
|
|
101
|
-
|
|
102
59
|
return target;
|
|
103
60
|
};
|
|
104
61
|
return _extends$3.apply(this, arguments);
|
|
105
62
|
}
|
|
106
63
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return target;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
function _objectWithoutProperties(source, excluded) {
|
|
123
|
-
if (source == null) return {};
|
|
124
|
-
|
|
125
|
-
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
126
|
-
|
|
127
|
-
var key, i;
|
|
128
|
-
|
|
129
|
-
if (Object.getOwnPropertySymbols) {
|
|
130
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
131
|
-
|
|
132
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
133
|
-
key = sourceSymbolKeys[i];
|
|
134
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
135
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
136
|
-
target[key] = source[key];
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
return target;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
function _slicedToArray(arr, i) {
|
|
144
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function _arrayWithHoles(arr) {
|
|
148
|
-
if (Array.isArray(arr)) return arr;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
function _iterableToArrayLimit(arr, i) {
|
|
152
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
153
|
-
|
|
154
|
-
if (_i == null) return;
|
|
155
|
-
var _arr = [];
|
|
156
|
-
var _n = true;
|
|
157
|
-
var _d = false;
|
|
158
|
-
|
|
159
|
-
var _s, _e;
|
|
160
|
-
|
|
161
|
-
try {
|
|
162
|
-
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
163
|
-
_arr.push(_s.value);
|
|
164
|
-
|
|
165
|
-
if (i && _arr.length === i) break;
|
|
166
|
-
}
|
|
167
|
-
} catch (err) {
|
|
168
|
-
_d = true;
|
|
169
|
-
_e = err;
|
|
170
|
-
} finally {
|
|
171
|
-
try {
|
|
172
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
173
|
-
} finally {
|
|
174
|
-
if (_d) throw _e;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return _arr;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
182
|
-
if (!o) return;
|
|
183
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
184
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
185
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
186
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
187
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
function _arrayLikeToArray(arr, len) {
|
|
191
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
192
|
-
|
|
193
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
194
|
-
|
|
195
|
-
return arr2;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function _nonIterableRest() {
|
|
199
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
var COMPONENT_ID$k = 'accordions.step_content';
|
|
203
|
-
var sizeStyles$1 = function sizeStyles(props) {
|
|
204
|
-
var _props$theme = props.theme,
|
|
205
|
-
rtl = _props$theme.rtl,
|
|
206
|
-
space = _props$theme.space;
|
|
207
|
-
var paddingBottom = props.isActive ? space.base * 8 : space.base * 6;
|
|
208
|
-
var paddingRight = rtl ? space.base * 6 : space.base * 5;
|
|
209
|
-
var paddingLeft = rtl ? space.base * 5 : space.base * 6;
|
|
210
|
-
var marginRight = rtl ? space.base * 3 : '0';
|
|
211
|
-
var marginLeft = rtl ? '0' : space.base * 3;
|
|
212
|
-
var marginVertical = space.base * 3;
|
|
64
|
+
const COMPONENT_ID$k = 'accordions.step_content';
|
|
65
|
+
const sizeStyles$1 = props => {
|
|
66
|
+
const {
|
|
67
|
+
rtl,
|
|
68
|
+
space
|
|
69
|
+
} = props.theme;
|
|
70
|
+
const paddingBottom = props.isActive ? space.base * 8 : space.base * 6;
|
|
71
|
+
const paddingRight = rtl ? space.base * 6 : space.base * 5;
|
|
72
|
+
const paddingLeft = rtl ? space.base * 5 : space.base * 6;
|
|
73
|
+
const marginRight = rtl ? space.base * 3 : '0';
|
|
74
|
+
const marginLeft = rtl ? '0' : space.base * 3;
|
|
75
|
+
const marginVertical = space.base * 3;
|
|
213
76
|
return styled.css(["margin:", "px ", "px ", "px ", "px;padding:0 ", "px ", "px ", "px;"], marginVertical, marginRight, marginVertical, marginLeft, paddingRight, paddingBottom, paddingLeft);
|
|
214
77
|
};
|
|
215
|
-
|
|
78
|
+
const StyledContent = styled__default["default"].div.attrs({
|
|
216
79
|
'data-garden-id': COMPONENT_ID$k,
|
|
217
|
-
'data-garden-version': '8.
|
|
80
|
+
'data-garden-version': '8.58.0'
|
|
218
81
|
}).withConfig({
|
|
219
82
|
displayName: "StyledContent",
|
|
220
83
|
componentId: "sc-mazvvo-0"
|
|
221
|
-
})(["", " min-width:", "px;word-break:break-word;", ";"], sizeStyles$1,
|
|
222
|
-
return props.theme.space.base * 30;
|
|
223
|
-
}, function (props) {
|
|
224
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props);
|
|
225
|
-
});
|
|
84
|
+
})(["", " min-width:", "px;word-break:break-word;", ";"], sizeStyles$1, props => props.theme.space.base * 30, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$k, props));
|
|
226
85
|
StyledContent.defaultProps = {
|
|
227
86
|
theme: reactTheming.DEFAULT_THEME
|
|
228
87
|
};
|
|
229
88
|
|
|
230
|
-
|
|
231
|
-
|
|
89
|
+
const COMPONENT_ID$j = 'accordions.step_line';
|
|
90
|
+
const StyledLine = styled__default["default"].div.attrs({
|
|
232
91
|
'data-garden-id': COMPONENT_ID$j,
|
|
233
|
-
'data-garden-version': '8.
|
|
92
|
+
'data-garden-version': '8.58.0'
|
|
234
93
|
}).withConfig({
|
|
235
94
|
displayName: "StyledLine",
|
|
236
95
|
componentId: "sc-1gkpjbr-0"
|
|
237
|
-
})(["display:block;position:absolute;top:", "px;right:", ";left:", ";flex:1;border-top:", ";border-color:", ";"],
|
|
238
|
-
return props.theme.space.base * 3;
|
|
239
|
-
}, function (props) {
|
|
240
|
-
return "calc(50% + ".concat(props.theme.space.base * 6, "px)");
|
|
241
|
-
}, function (props) {
|
|
242
|
-
return "calc(-50% + ".concat(props.theme.space.base * 6, "px)");
|
|
243
|
-
}, function (props) {
|
|
244
|
-
return props.theme.borders.sm;
|
|
245
|
-
}, function (props) {
|
|
246
|
-
return reactTheming.getColor('neutralHue', 300, props.theme);
|
|
247
|
-
});
|
|
96
|
+
})(["display:block;position:absolute;top:", "px;right:", ";left:", ";flex:1;border-top:", ";border-color:", ";"], props => props.theme.space.base * 3, props => `calc(50% + ${props.theme.space.base * 6}px)`, props => `calc(-50% + ${props.theme.space.base * 6}px)`, props => props.theme.borders.sm, props => reactTheming.getColor('neutralHue', 300, props.theme));
|
|
248
97
|
StyledLine.defaultProps = {
|
|
249
98
|
theme: reactTheming.DEFAULT_THEME
|
|
250
99
|
};
|
|
251
100
|
|
|
252
|
-
|
|
253
|
-
|
|
101
|
+
const COMPONENT_ID$i = 'accordions.step';
|
|
102
|
+
const StyledStep = styled__default["default"].li.attrs({
|
|
254
103
|
'data-garden-id': COMPONENT_ID$i,
|
|
255
|
-
'data-garden-version': '8.
|
|
104
|
+
'data-garden-version': '8.58.0'
|
|
256
105
|
}).withConfig({
|
|
257
106
|
displayName: "StyledStep",
|
|
258
107
|
componentId: "sc-12fiwtz-0"
|
|
259
|
-
})(["position:", ";flex:", ";min-width:", ";&:last-of-type ", "{display:", ";}&:first-of-type ", "{display:", ";}&:not(:last-of-type) ", "{border-", ":", ";border-color:", ";}", ";"],
|
|
260
|
-
return props.isHorizontal && 'relative';
|
|
261
|
-
}, function (props) {
|
|
262
|
-
return props.isHorizontal && '1';
|
|
263
|
-
}, function (props) {
|
|
264
|
-
return props.isHorizontal && "".concat(props.theme.space.base * 15, "px");
|
|
265
|
-
}, StyledLine, function (props) {
|
|
266
|
-
return props.theme.rtl && 'none';
|
|
267
|
-
}, StyledLine, function (props) {
|
|
268
|
-
return !props.theme.rtl && 'none';
|
|
269
|
-
}, StyledContent, function (props) {
|
|
270
|
-
return props.theme.rtl ? 'right' : 'left';
|
|
271
|
-
}, function (props) {
|
|
272
|
-
return props.theme.borders.sm;
|
|
273
|
-
}, function (props) {
|
|
274
|
-
return reactTheming.getColor('neutralHue', 300, props.theme);
|
|
275
|
-
}, function (props) {
|
|
276
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props);
|
|
277
|
-
});
|
|
108
|
+
})(["position:", ";flex:", ";min-width:", ";&:last-of-type ", "{display:", ";}&:first-of-type ", "{display:", ";}&:not(:last-of-type) ", "{border-", ":", ";border-color:", ";}", ";"], props => props.isHorizontal && 'relative', props => props.isHorizontal && '1', props => props.isHorizontal && `${props.theme.space.base * 15}px`, StyledLine, props => props.theme.rtl && 'none', StyledLine, props => !props.theme.rtl && 'none', StyledContent, props => props.theme.rtl ? 'right' : 'left', props => props.theme.borders.sm, props => reactTheming.getColor('neutralHue', 300, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$i, props));
|
|
278
109
|
StyledStep.defaultProps = {
|
|
279
110
|
theme: reactTheming.DEFAULT_THEME
|
|
280
111
|
};
|
|
281
112
|
|
|
282
|
-
|
|
283
|
-
|
|
113
|
+
const COMPONENT_ID$h = 'accordions.step_inner_content';
|
|
114
|
+
const StyledInnerContent = styled__default["default"].div.attrs({
|
|
284
115
|
'data-garden-id': COMPONENT_ID$h,
|
|
285
|
-
'data-garden-version': '8.
|
|
116
|
+
'data-garden-version': '8.58.0'
|
|
286
117
|
}).withConfig({
|
|
287
118
|
displayName: "StyledInnerContent",
|
|
288
119
|
componentId: "sc-1xs9fh7-0"
|
|
289
|
-
})(["transition:max-height 0.25s ease-in-out;overflow:hidden;max-height:", ";line-height:", ";color:", ";font-size:", ";", ";"],
|
|
290
|
-
return !props.isActive && '0 !important';
|
|
291
|
-
}, function (props) {
|
|
292
|
-
return reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
293
|
-
}, function (props) {
|
|
294
|
-
return props.theme.colors.foreground;
|
|
295
|
-
}, function (props) {
|
|
296
|
-
return props.theme.fontSizes.md;
|
|
297
|
-
}, function (props) {
|
|
298
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props);
|
|
299
|
-
});
|
|
120
|
+
})(["transition:max-height 0.25s ease-in-out;overflow:hidden;max-height:", ";line-height:", ";color:", ";font-size:", ";", ";"], props => !props.isActive && '0 !important', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$h, props));
|
|
300
121
|
StyledInnerContent.defaultProps = {
|
|
301
122
|
theme: reactTheming.DEFAULT_THEME
|
|
302
123
|
};
|
|
303
124
|
|
|
304
|
-
|
|
305
|
-
|
|
125
|
+
const COMPONENT_ID$g = 'accordions.stepper';
|
|
126
|
+
const StyledStepper = styled__default["default"].ol.attrs({
|
|
306
127
|
'data-garden-id': COMPONENT_ID$g,
|
|
307
|
-
'data-garden-version': '8.
|
|
128
|
+
'data-garden-version': '8.58.0'
|
|
308
129
|
}).withConfig({
|
|
309
130
|
displayName: "StyledStepper",
|
|
310
131
|
componentId: "sc-dsxw0f-0"
|
|
311
|
-
})(["display:", ";margin:0;padding:0;list-style:none;", ";"],
|
|
312
|
-
return props.isHorizontal && 'flex';
|
|
313
|
-
}, function (props) {
|
|
314
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props);
|
|
315
|
-
});
|
|
132
|
+
})(["display:", ";margin:0;padding:0;list-style:none;", ";"], props => props.isHorizontal && 'flex', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$g, props));
|
|
316
133
|
StyledStepper.defaultProps = {
|
|
317
134
|
theme: reactTheming.DEFAULT_THEME
|
|
318
135
|
};
|
|
319
136
|
|
|
320
|
-
|
|
321
|
-
|
|
137
|
+
const COMPONENT_ID$f = 'accordions.step_icon';
|
|
138
|
+
const StyledIconFlexContainer = styled__default["default"].div.withConfig({
|
|
322
139
|
displayName: "StyledIcon__StyledIconFlexContainer",
|
|
323
140
|
componentId: "sc-v20nz9-0"
|
|
324
141
|
})(["display:flex;flex-basis:100%;justify-content:center;width:100%;"]);
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
return styled.css(["margin-bottom:", ";margin-", ":", ";width:", ";min-width:", ";height:", ";min-height:", ";line-height:", ";font-size:", ";"], props.isHorizontal &&
|
|
142
|
+
const sizeStyles = props => {
|
|
143
|
+
const size = `${props.theme.space.base * 6}px`;
|
|
144
|
+
const fontSize = props.theme.fontSizes.sm;
|
|
145
|
+
return styled.css(["margin-bottom:", ";margin-", ":", ";width:", ";min-width:", ";height:", ";min-height:", ";line-height:", ";font-size:", ";"], props.isHorizontal && `${props.theme.space.base * 2}px`, props.theme.rtl ? 'left' : 'right', !props.isHorizontal && `${props.theme.space.base * 3}px`, size, size, size, size, reactTheming.getLineHeight(size, fontSize), fontSize);
|
|
329
146
|
};
|
|
330
|
-
|
|
147
|
+
const colorStyles$2 = props => {
|
|
331
148
|
return styled.css(["background:", ";color:", ";"], props.isActive ? reactTheming.getColor('neutralHue', 600, props.theme) : reactTheming.getColor('neutralHue', 200, props.theme), props.isActive ? props.theme.colors.background : props.theme.colors.foreground);
|
|
332
149
|
};
|
|
333
|
-
|
|
150
|
+
const StyledIcon = styled__default["default"].div.attrs({
|
|
334
151
|
'data-garden-id': COMPONENT_ID$f,
|
|
335
|
-
'data-garden-version': '8.
|
|
152
|
+
'data-garden-version': '8.58.0'
|
|
336
153
|
}).withConfig({
|
|
337
154
|
displayName: "StyledIcon",
|
|
338
155
|
componentId: "sc-v20nz9-1"
|
|
339
|
-
})(["display:flex;align-items:center;justify-content:center;transition:background 0.25s ease-in-out,color 0.25s ease-in-out;border-radius:100%;", " ", " ", ";"], sizeStyles, colorStyles$2,
|
|
340
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props);
|
|
341
|
-
});
|
|
156
|
+
})(["display:flex;align-items:center;justify-content:center;transition:background 0.25s ease-in-out,color 0.25s ease-in-out;border-radius:100%;", " ", " ", ";"], sizeStyles, colorStyles$2, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$f, props));
|
|
342
157
|
StyledIconFlexContainer.defaultProps = {
|
|
343
158
|
theme: reactTheming.DEFAULT_THEME
|
|
344
159
|
};
|
|
@@ -346,72 +161,50 @@ StyledIcon.defaultProps = {
|
|
|
346
161
|
theme: reactTheming.DEFAULT_THEME
|
|
347
162
|
};
|
|
348
163
|
|
|
349
|
-
|
|
350
|
-
|
|
164
|
+
const COMPONENT_ID$e = 'accordions.step_label';
|
|
165
|
+
const StyledLabel = styled__default["default"].div.attrs({
|
|
351
166
|
'data-garden-id': COMPONENT_ID$e,
|
|
352
|
-
'data-garden-version': '8.
|
|
167
|
+
'data-garden-version': '8.58.0'
|
|
353
168
|
}).withConfig({
|
|
354
169
|
displayName: "StyledLabel",
|
|
355
170
|
componentId: "sc-1o82llj-0"
|
|
356
|
-
})(["display:", ";align-items:", ";transition:color 0.25s ease-in-out,font-weight 0.25s ease-in-out;text-align:", ";line-height:", ";color:", ";font-size:", ";font-weight:", ";", ";"],
|
|
357
|
-
return !props.isHorizontal && 'flex';
|
|
358
|
-
}, function (props) {
|
|
359
|
-
return !props.isHorizontal && 'center';
|
|
360
|
-
}, function (props) {
|
|
361
|
-
return props.isHorizontal && 'center';
|
|
362
|
-
}, function (props) {
|
|
363
|
-
return reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
364
|
-
}, function (props) {
|
|
365
|
-
return props.isActive ? props.theme.colors.foreground : reactTheming.getColor('neutralHue', 600, props.theme);
|
|
366
|
-
}, function (props) {
|
|
367
|
-
return props.theme.fontSizes.md;
|
|
368
|
-
}, function (props) {
|
|
369
|
-
return props.isActive && 600;
|
|
370
|
-
}, function (props) {
|
|
371
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props);
|
|
372
|
-
});
|
|
171
|
+
})(["display:", ";align-items:", ";transition:color 0.25s ease-in-out,font-weight 0.25s ease-in-out;text-align:", ";line-height:", ";color:", ";font-size:", ";font-weight:", ";", ";"], props => !props.isHorizontal && 'flex', props => !props.isHorizontal && 'center', props => props.isHorizontal && 'center', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.isActive ? props.theme.colors.foreground : reactTheming.getColor('neutralHue', 600, props.theme), props => props.theme.fontSizes.md, props => props.isActive && 600, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$e, props));
|
|
373
172
|
StyledLabel.defaultProps = {
|
|
374
173
|
theme: reactTheming.DEFAULT_THEME
|
|
375
174
|
};
|
|
376
175
|
|
|
377
|
-
|
|
378
|
-
|
|
176
|
+
const COMPONENT_ID$d = 'accordions.step_label_text';
|
|
177
|
+
const StyledLabelText = styled__default["default"].div.attrs({
|
|
379
178
|
'data-garden-id': COMPONENT_ID$d,
|
|
380
|
-
'data-garden-version': '8.
|
|
179
|
+
'data-garden-version': '8.58.0'
|
|
381
180
|
}).withConfig({
|
|
382
181
|
displayName: "StyledLabelText",
|
|
383
182
|
componentId: "sc-111m5zo-0"
|
|
384
|
-
})(["display:", ";padding:", ";word-wrap:", ";"],
|
|
385
|
-
return props.isHidden && 'none';
|
|
386
|
-
}, function (props) {
|
|
387
|
-
return props.isHorizontal && "0 ".concat(props.theme.space.base * 3, "px");
|
|
388
|
-
}, function (props) {
|
|
389
|
-
return props.isHorizontal && 'break-word';
|
|
390
|
-
});
|
|
183
|
+
})(["display:", ";padding:", ";word-wrap:", ";"], props => props.isHidden && 'none', props => props.isHorizontal && `0 ${props.theme.space.base * 3}px`, props => props.isHorizontal && 'break-word');
|
|
391
184
|
StyledLabelText.defaultProps = {
|
|
392
185
|
theme: reactTheming.DEFAULT_THEME
|
|
393
186
|
};
|
|
394
187
|
|
|
395
|
-
|
|
396
|
-
|
|
188
|
+
const COMPONENT_ID$c = 'accordions.accordion';
|
|
189
|
+
const StyledAccordion = styled__default["default"].div.attrs({
|
|
397
190
|
'data-garden-id': COMPONENT_ID$c,
|
|
398
|
-
'data-garden-version': '8.
|
|
191
|
+
'data-garden-version': '8.58.0'
|
|
399
192
|
}).withConfig({
|
|
400
193
|
displayName: "StyledAccordion",
|
|
401
194
|
componentId: "sc-niv9ic-0"
|
|
402
|
-
})(["", ";"],
|
|
403
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props);
|
|
404
|
-
});
|
|
195
|
+
})(["", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$c, props));
|
|
405
196
|
StyledAccordion.defaultProps = {
|
|
406
197
|
theme: reactTheming.DEFAULT_THEME
|
|
407
198
|
};
|
|
408
199
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
200
|
+
const COMPONENT_ID$b = 'accordions.panel';
|
|
201
|
+
const paddingStyles = props => {
|
|
202
|
+
const {
|
|
203
|
+
base
|
|
204
|
+
} = props.theme.space;
|
|
205
|
+
let paddingTop = base * 2;
|
|
206
|
+
let paddingHorizontal = base * 5;
|
|
207
|
+
let paddingBottom = base * 8;
|
|
415
208
|
if (props.isCompact) {
|
|
416
209
|
paddingTop = base * 2;
|
|
417
210
|
paddingHorizontal = base * 3;
|
|
@@ -423,341 +216,254 @@ var paddingStyles = function paddingStyles(props) {
|
|
|
423
216
|
}
|
|
424
217
|
return styled.css(["transition:", ";padding:", "px ", "px ", "px;"], props.isAnimated && 'padding 0.25s ease-in-out', paddingTop, paddingHorizontal, paddingBottom);
|
|
425
218
|
};
|
|
426
|
-
|
|
219
|
+
const StyledPanel = styled__default["default"].section.attrs({
|
|
427
220
|
'data-garden-id': COMPONENT_ID$b,
|
|
428
|
-
'data-garden-version': '8.
|
|
221
|
+
'data-garden-version': '8.58.0'
|
|
429
222
|
}).withConfig({
|
|
430
223
|
displayName: "StyledPanel",
|
|
431
224
|
componentId: "sc-1piryze-0"
|
|
432
|
-
})(["", ";border-bottom:", ";", ";"], paddingStyles,
|
|
433
|
-
return "".concat(props.theme.borders.sm, " ").concat(props.isBare ? 'transparent' : reactTheming.getColor('neutralHue', 300, props.theme));
|
|
434
|
-
}, function (props) {
|
|
435
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props);
|
|
436
|
-
});
|
|
225
|
+
})(["", ";border-bottom:", ";", ";"], paddingStyles, props => `${props.theme.borders.sm} ${props.isBare ? 'transparent' : reactTheming.getColor('neutralHue', 300, props.theme)}`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$b, props));
|
|
437
226
|
StyledPanel.defaultProps = {
|
|
438
227
|
isAnimated: true,
|
|
439
228
|
theme: reactTheming.DEFAULT_THEME
|
|
440
229
|
};
|
|
441
230
|
|
|
442
|
-
|
|
443
|
-
|
|
231
|
+
const COMPONENT_ID$a = 'accordions.section';
|
|
232
|
+
const StyledSection = styled__default["default"].div.attrs({
|
|
444
233
|
'data-garden-id': COMPONENT_ID$a,
|
|
445
|
-
'data-garden-version': '8.
|
|
234
|
+
'data-garden-version': '8.58.0'
|
|
446
235
|
}).withConfig({
|
|
447
236
|
displayName: "StyledSection",
|
|
448
237
|
componentId: "sc-v2t9bd-0"
|
|
449
|
-
})(["&:last-child ", "{border:none;}", ";"], StyledPanel,
|
|
450
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props);
|
|
451
|
-
});
|
|
238
|
+
})(["&:last-child ", "{border:none;}", ";"], StyledPanel, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$a, props));
|
|
452
239
|
StyledSection.defaultProps = {
|
|
453
240
|
theme: reactTheming.DEFAULT_THEME
|
|
454
241
|
};
|
|
455
242
|
|
|
456
|
-
|
|
457
|
-
|
|
243
|
+
const COMPONENT_ID$9 = 'accordions.header';
|
|
244
|
+
const StyledHeader = styled__default["default"].div.attrs({
|
|
458
245
|
'data-garden-id': COMPONENT_ID$9,
|
|
459
|
-
'data-garden-version': '8.
|
|
246
|
+
'data-garden-version': '8.58.0'
|
|
460
247
|
}).withConfig({
|
|
461
248
|
displayName: "StyledHeader",
|
|
462
249
|
componentId: "sc-2c6rbr-0"
|
|
463
|
-
})(["display:flex;align-items:center;box-shadow:", ";font-size:", ";&:hover{cursor:", ";}", ";"],
|
|
464
|
-
return props.isFocused && "".concat(props.theme.shadows.md(reactTheming.getColor('primaryHue', 600, props.theme, 0.35)), " inset");
|
|
465
|
-
}, function (props) {
|
|
466
|
-
return props.theme.fontSizes.md;
|
|
467
|
-
}, function (props) {
|
|
468
|
-
return (props.isCollapsible || !props.isExpanded) && 'pointer';
|
|
469
|
-
}, function (props) {
|
|
470
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props);
|
|
471
|
-
});
|
|
250
|
+
})(["display:flex;align-items:center;box-shadow:", ";font-size:", ";&:hover{cursor:", ";}", ";"], props => props.isFocused && `${props.theme.shadows.md(reactTheming.getColor('primaryHue', 600, props.theme, 0.35))} inset`, props => props.theme.fontSizes.md, props => (props.isCollapsible || !props.isExpanded) && 'pointer', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$9, props));
|
|
472
251
|
StyledHeader.defaultProps = {
|
|
473
252
|
theme: reactTheming.DEFAULT_THEME
|
|
474
253
|
};
|
|
475
254
|
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
255
|
+
const COMPONENT_ID$8 = 'accordions.button';
|
|
256
|
+
const colorStyles$1 = props => {
|
|
257
|
+
const showColor = props.isCollapsible || !props.isExpanded;
|
|
258
|
+
let color = props.theme.colors.foreground;
|
|
480
259
|
if (showColor && props.isHovered) {
|
|
481
260
|
color = reactTheming.getColor('primaryHue', 600, props.theme);
|
|
482
261
|
}
|
|
483
262
|
return styled.css(["color:", ";&:hover{cursor:", ";color:", ";}"], color, showColor && 'pointer', showColor && color);
|
|
484
263
|
};
|
|
485
|
-
|
|
264
|
+
const StyledButton = styled__default["default"].button.attrs({
|
|
486
265
|
'data-garden-id': COMPONENT_ID$8,
|
|
487
|
-
'data-garden-version': '8.
|
|
266
|
+
'data-garden-version': '8.58.0'
|
|
488
267
|
}).withConfig({
|
|
489
268
|
displayName: "StyledButton",
|
|
490
269
|
componentId: "sc-xj3hy7-0"
|
|
491
|
-
})(["transition:color 0.1s ease-in-out;outline:none;border:none;background:transparent;padding:", ";width:100%;text-align:", ";line-height:", ";font-family:inherit;font-size:", ";font-weight:", ";", " &::-moz-focus-inner{border:0;}&:hover{cursor:", ";}", ";"],
|
|
492
|
-
return props.isCompact ? "".concat(props.theme.space.base * 2, "px ").concat(props.theme.space.base * 3, "px") : "".concat(props.theme.space.base * 5, "px");
|
|
493
|
-
}, function (props) {
|
|
494
|
-
return props.theme.rtl ? 'right' : 'left';
|
|
495
|
-
}, function (props) {
|
|
496
|
-
return reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
497
|
-
}, function (props) {
|
|
498
|
-
return props.theme.fontSizes.md;
|
|
499
|
-
}, function (props) {
|
|
500
|
-
return props.theme.fontWeights.semibold;
|
|
501
|
-
}, colorStyles$1, function (props) {
|
|
502
|
-
return (props.isCollapsible || !props.isExpanded) && 'pointer';
|
|
503
|
-
}, function (props) {
|
|
504
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props);
|
|
505
|
-
});
|
|
270
|
+
})(["transition:color 0.1s ease-in-out;outline:none;border:none;background:transparent;padding:", ";width:100%;text-align:", ";line-height:", ";font-family:inherit;font-size:", ";font-weight:", ";", " &::-moz-focus-inner{border:0;}&:hover{cursor:", ";}", ";"], props => props.isCompact ? `${props.theme.space.base * 2}px ${props.theme.space.base * 3}px` : `${props.theme.space.base * 5}px`, props => props.theme.rtl ? 'right' : 'left', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => props.theme.fontWeights.semibold, colorStyles$1, props => (props.isCollapsible || !props.isExpanded) && 'pointer', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$8, props));
|
|
506
271
|
StyledButton.defaultProps = {
|
|
507
272
|
theme: reactTheming.DEFAULT_THEME
|
|
508
273
|
};
|
|
509
274
|
|
|
510
|
-
|
|
511
|
-
|
|
275
|
+
const COMPONENT_ID$7 = 'accordions.step_inner_panel';
|
|
276
|
+
const StyledInnerPanel = styled__default["default"].div.attrs({
|
|
512
277
|
'data-garden-id': COMPONENT_ID$7,
|
|
513
|
-
'data-garden-version': '8.
|
|
278
|
+
'data-garden-version': '8.58.0'
|
|
514
279
|
}).withConfig({
|
|
515
280
|
displayName: "StyledInnerPanel",
|
|
516
281
|
componentId: "sc-8nbueg-0"
|
|
517
|
-
})(["transition:", ";max-height:", ";overflow:hidden;line-height:", ";font-size:", ";", ";"],
|
|
518
|
-
return props.isAnimated && 'max-height 0.25s ease-in-out';
|
|
519
|
-
}, function (props) {
|
|
520
|
-
return !props.isExpanded && '0 !important';
|
|
521
|
-
}, function (props) {
|
|
522
|
-
return reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
523
|
-
}, function (props) {
|
|
524
|
-
return props.theme.fontSizes.md;
|
|
525
|
-
}, function (props) {
|
|
526
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props);
|
|
527
|
-
});
|
|
282
|
+
})(["transition:", ";max-height:", ";overflow:hidden;line-height:", ";font-size:", ";", ";"], props => props.isAnimated && 'max-height 0.25s ease-in-out', props => !props.isExpanded && '0 !important', props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.fontSizes.md, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$7, props));
|
|
528
283
|
StyledInnerPanel.defaultProps = {
|
|
529
284
|
isAnimated: true,
|
|
530
285
|
theme: reactTheming.DEFAULT_THEME
|
|
531
286
|
};
|
|
532
287
|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
var color = reactTheming.getColor('neutralHue', 600, props.theme);
|
|
288
|
+
const COMPONENT_ID$6 = 'accordions.rotate_icon';
|
|
289
|
+
const colorStyles = props => {
|
|
290
|
+
const showColor = props.isCollapsible || !props.isRotated;
|
|
291
|
+
let color = reactTheming.getColor('neutralHue', 600, props.theme);
|
|
538
292
|
if (showColor && props.isHovered) {
|
|
539
293
|
color = reactTheming.getColor('primaryHue', 600, props.theme);
|
|
540
294
|
}
|
|
541
295
|
return styled.css(["color:", ";&:hover{color:", ";}"], color, showColor && color);
|
|
542
296
|
};
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
297
|
+
const StyledRotateIcon = styled__default["default"](
|
|
298
|
+
_ref => {
|
|
299
|
+
let {
|
|
300
|
+
children,
|
|
301
|
+
isRotated,
|
|
302
|
+
isHovered,
|
|
303
|
+
isCompact,
|
|
304
|
+
isCollapsible,
|
|
305
|
+
...props
|
|
306
|
+
} = _ref;
|
|
551
307
|
return React.cloneElement(React.Children.only(children), props);
|
|
552
308
|
}).attrs({
|
|
553
309
|
'data-garden-id': COMPONENT_ID$6,
|
|
554
|
-
'data-garden-version': '8.
|
|
310
|
+
'data-garden-version': '8.58.0'
|
|
555
311
|
}).withConfig({
|
|
556
312
|
displayName: "StyledRotateIcon",
|
|
557
313
|
componentId: "sc-hp435q-0"
|
|
558
|
-
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";height:", ";vertical-align:middle;", " ", ";"],
|
|
559
|
-
return props.isRotated && "rotate(".concat(props.theme.rtl ? '-' : '+', "180deg)");
|
|
560
|
-
}, function (props) {
|
|
561
|
-
return props.isCompact ? "".concat(props.theme.space.base * 1.5, "px ").concat(props.theme.space.base * 3, "px") : "".concat(props.theme.space.base * 5, "px");
|
|
562
|
-
}, function (props) {
|
|
563
|
-
return props.theme.iconSizes.md;
|
|
564
|
-
}, function (props) {
|
|
565
|
-
return props.theme.iconSizes.md;
|
|
566
|
-
}, colorStyles, function (props) {
|
|
567
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props);
|
|
568
|
-
});
|
|
314
|
+
})(["transform:", ";transition:transform 0.25s ease-in-out,color 0.1s ease-in-out;box-sizing:content-box;padding:", ";width:", ";height:", ";vertical-align:middle;", " ", ";"], props => props.isRotated && `rotate(${props.theme.rtl ? '-' : '+'}180deg)`, props => props.isCompact ? `${props.theme.space.base * 1.5}px ${props.theme.space.base * 3}px` : `${props.theme.space.base * 5}px`, props => props.theme.iconSizes.md, props => props.theme.iconSizes.md, colorStyles, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$6, props));
|
|
569
315
|
StyledRotateIcon.defaultProps = {
|
|
570
316
|
theme: reactTheming.DEFAULT_THEME
|
|
571
317
|
};
|
|
572
318
|
|
|
573
|
-
|
|
574
|
-
|
|
319
|
+
const COMPONENT_ID$5 = 'timeline';
|
|
320
|
+
const StyledTimeline = styled__default["default"].ol.attrs({
|
|
575
321
|
'data-garden-id': COMPONENT_ID$5,
|
|
576
|
-
'data-garden-version': '8.
|
|
322
|
+
'data-garden-version': '8.58.0'
|
|
577
323
|
}).withConfig({
|
|
578
324
|
displayName: "StyledTimeline",
|
|
579
325
|
componentId: "sc-pig5kv-0"
|
|
580
|
-
})(["margin:0;padding:0;list-style:none;", ";"],
|
|
581
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props);
|
|
582
|
-
});
|
|
326
|
+
})(["margin:0;padding:0;list-style:none;", ";"], props => reactTheming.retrieveComponentStyles(COMPONENT_ID$5, props));
|
|
583
327
|
StyledTimeline.defaultProps = {
|
|
584
328
|
theme: reactTheming.DEFAULT_THEME
|
|
585
329
|
};
|
|
586
330
|
|
|
587
|
-
|
|
588
|
-
|
|
331
|
+
const COMPONENT_ID$4 = 'timeline.content.separator';
|
|
332
|
+
const StyledSeparator = styled__default["default"].div.attrs({
|
|
589
333
|
'data-garden-id': COMPONENT_ID$4,
|
|
590
|
-
'data-garden-version': '8.
|
|
334
|
+
'data-garden-version': '8.58.0'
|
|
591
335
|
}).withConfig({
|
|
592
336
|
displayName: "StyledSeparator",
|
|
593
337
|
componentId: "sc-fki51e-0"
|
|
594
|
-
})(["display:flex;position:relative;justify-content:center;padding:", ";&::after{position:absolute;border-left:", ";height:100%;content:'';}", ";"],
|
|
595
|
-
return "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base, "px");
|
|
596
|
-
}, function (props) {
|
|
597
|
-
return "".concat(props.theme.borders.sm, " ").concat(reactTheming.getColor('neutralHue', 600, props.theme));
|
|
598
|
-
}, function (props) {
|
|
599
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props);
|
|
600
|
-
});
|
|
338
|
+
})(["display:flex;position:relative;justify-content:center;padding:", ";&::after{position:absolute;border-left:", ";height:100%;content:'';}", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base}px`, props => `${props.theme.borders.sm} ${reactTheming.getColor('neutralHue', 600, props.theme)}`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$4, props));
|
|
601
339
|
StyledSeparator.defaultProps = {
|
|
602
340
|
theme: reactTheming.DEFAULT_THEME
|
|
603
341
|
};
|
|
604
342
|
|
|
605
|
-
|
|
606
|
-
|
|
343
|
+
const COMPONENT_ID$3 = 'timeline.content';
|
|
344
|
+
const StyledTimelineContent = styled__default["default"].div.attrs({
|
|
607
345
|
'data-garden-id': COMPONENT_ID$3,
|
|
608
|
-
'data-garden-version': '8.
|
|
346
|
+
'data-garden-version': '8.58.0'
|
|
609
347
|
}).withConfig({
|
|
610
348
|
displayName: "StyledContent__StyledTimelineContent",
|
|
611
349
|
componentId: "sc-19phgu1-0"
|
|
612
|
-
})(["flex:1;padding:", ";", ";"],
|
|
613
|
-
return "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base * 4, "px");
|
|
614
|
-
}, function (props) {
|
|
615
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props);
|
|
616
|
-
});
|
|
350
|
+
})(["flex:1;padding:", ";", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base * 4}px`, props => reactTheming.retrieveComponentStyles(COMPONENT_ID$3, props));
|
|
617
351
|
StyledTimelineContent.defaultProps = {
|
|
618
352
|
theme: reactTheming.DEFAULT_THEME
|
|
619
353
|
};
|
|
620
354
|
|
|
621
|
-
|
|
622
|
-
|
|
355
|
+
const COMPONENT_ID$2 = 'timeline.opposite.content';
|
|
356
|
+
const StyledOppositeContent = styled__default["default"].div.attrs({
|
|
623
357
|
'data-garden-id': COMPONENT_ID$2,
|
|
624
|
-
'data-garden-version': '8.
|
|
358
|
+
'data-garden-version': '8.58.0'
|
|
625
359
|
}).withConfig({
|
|
626
360
|
displayName: "StyledOppositeContent",
|
|
627
361
|
componentId: "sc-jurh2k-0"
|
|
628
|
-
})(["flex:1;padding:", ";text-align:", ";", ";"],
|
|
629
|
-
return "".concat(props.theme.space.base * 5, "px ").concat(props.theme.space.base * 4, "px");
|
|
630
|
-
}, function (props) {
|
|
631
|
-
return props.theme.rtl ? 'left' : 'right';
|
|
632
|
-
}, function (props) {
|
|
633
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props);
|
|
634
|
-
});
|
|
362
|
+
})(["flex:1;padding:", ";text-align:", ";", ";"], props => `${props.theme.space.base * 5}px ${props.theme.space.base * 4}px`, props => props.theme.rtl ? 'left' : 'right', props => reactTheming.retrieveComponentStyles(COMPONENT_ID$2, props));
|
|
635
363
|
StyledOppositeContent.defaultProps = {
|
|
636
364
|
theme: reactTheming.DEFAULT_THEME
|
|
637
365
|
};
|
|
638
366
|
|
|
639
|
-
|
|
640
|
-
|
|
367
|
+
const COMPONENT_ID$1 = 'timeline.item';
|
|
368
|
+
const StyledTimelineItem = styled__default["default"].li.attrs({
|
|
641
369
|
'data-garden-id': COMPONENT_ID$1,
|
|
642
|
-
'data-garden-version': '8.
|
|
370
|
+
'data-garden-version': '8.58.0'
|
|
643
371
|
}).withConfig({
|
|
644
372
|
displayName: "StyledItem__StyledTimelineItem",
|
|
645
373
|
componentId: "sc-5mcnzm-0"
|
|
646
|
-
})(["display:flex;position:relative;line-height:", ";color:", ";font-size:", ";&:last-of-type ", "::after{display:none;}", " ", " ", ";"],
|
|
647
|
-
return reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md);
|
|
648
|
-
}, function (props) {
|
|
649
|
-
return props.theme.colors.foreground;
|
|
650
|
-
}, function (props) {
|
|
651
|
-
return props.theme.fontSizes.md;
|
|
652
|
-
}, StyledSeparator, function (props) {
|
|
653
|
-
return !props.hasOppositeContent && props.isAlternate && styled.css(["&:before{flex:1;content:'';padding:", "px;}"], props.theme.space.base * 4);
|
|
654
|
-
}, function (props) {
|
|
655
|
-
return props.isAlternate && styled.css(["&:nth-child(even){flex-direction:row-reverse;", "{text-align:", ";}", "{text-align:", ";}}"], StyledOppositeContent, props.theme.rtl ? 'right' : 'left', StyledTimelineContent, props.theme.rtl ? 'left' : 'right');
|
|
656
|
-
}, function (props) {
|
|
657
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props);
|
|
658
|
-
});
|
|
374
|
+
})(["display:flex;position:relative;line-height:", ";color:", ";font-size:", ";&:last-of-type ", "::after{display:none;}", " ", " ", ";"], props => reactTheming.getLineHeight(props.theme.space.base * 5, props.theme.fontSizes.md), props => props.theme.colors.foreground, props => props.theme.fontSizes.md, StyledSeparator, props => !props.hasOppositeContent && props.isAlternate && styled.css(["&:before{flex:1;content:'';padding:", "px;}"], props.theme.space.base * 4), props => props.isAlternate && styled.css(["&:nth-child(even){flex-direction:row-reverse;", "{text-align:", ";}", "{text-align:", ";}}"], StyledOppositeContent, props.theme.rtl ? 'right' : 'left', StyledTimelineContent, props.theme.rtl ? 'left' : 'right'), props => reactTheming.retrieveComponentStyles(COMPONENT_ID$1, props));
|
|
659
375
|
StyledTimelineItem.defaultProps = {
|
|
660
376
|
theme: reactTheming.DEFAULT_THEME
|
|
661
377
|
};
|
|
662
378
|
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
379
|
+
const COMPONENT_ID = 'timeline.icon';
|
|
380
|
+
const StyledItemIcon = styled__default["default"](_ref => {
|
|
381
|
+
let {
|
|
382
|
+
surfaceColor,
|
|
383
|
+
children,
|
|
384
|
+
...props
|
|
385
|
+
} = _ref;
|
|
669
386
|
return React.cloneElement(React.Children.only(children), props);
|
|
670
387
|
}).attrs({
|
|
671
388
|
'data-garden-id': COMPONENT_ID,
|
|
672
|
-
'data-garden-version': '8.
|
|
389
|
+
'data-garden-version': '8.58.0'
|
|
673
390
|
}).withConfig({
|
|
674
391
|
displayName: "StyledItemIcon",
|
|
675
392
|
componentId: "sc-vz2l6e-0"
|
|
676
|
-
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"],
|
|
677
|
-
return props.surfaceColor || props.theme.colors.background;
|
|
678
|
-
}, function (props) {
|
|
679
|
-
return props.theme.space.base;
|
|
680
|
-
}, function (props) {
|
|
681
|
-
return polished.math("".concat(props.theme.iconSizes.sm, " + 1"));
|
|
682
|
-
}, function (props) {
|
|
683
|
-
return polished.math("".concat(props.theme.iconSizes.sm, " + 1"));
|
|
684
|
-
}, function (props) {
|
|
685
|
-
return reactTheming.getColor('neutralHue', 600, props.theme);
|
|
686
|
-
}, function (props) {
|
|
687
|
-
return reactTheming.retrieveComponentStyles(COMPONENT_ID, props);
|
|
688
|
-
});
|
|
393
|
+
})(["z-index:1;box-sizing:content-box;background-color:", ";padding:", "px 0;width:", ";height:", ";color:", ";", ";"], props => props.surfaceColor || props.theme.colors.background, props => props.theme.space.base, props => polished.math(`${props.theme.iconSizes.sm} + 1`), props => polished.math(`${props.theme.iconSizes.sm} + 1`), props => reactTheming.getColor('neutralHue', 600, props.theme), props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
689
394
|
StyledItemIcon.defaultProps = {
|
|
690
395
|
theme: reactTheming.DEFAULT_THEME
|
|
691
396
|
};
|
|
692
397
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
398
|
+
const StepperContext = React.createContext(undefined);
|
|
399
|
+
const useStepperContext = () => {
|
|
400
|
+
const context = React.useContext(StepperContext);
|
|
696
401
|
if (context === undefined) {
|
|
697
402
|
throw new Error('This component must be rendered within a Stepper component');
|
|
698
403
|
}
|
|
699
404
|
return context;
|
|
700
405
|
};
|
|
701
406
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
407
|
+
const StepContext = React.createContext(undefined);
|
|
408
|
+
const useStepContext = () => {
|
|
409
|
+
const context = React.useContext(StepContext);
|
|
705
410
|
if (context === undefined) {
|
|
706
411
|
throw new Error('This component must be rendered within a Stepper.Step component');
|
|
707
412
|
}
|
|
708
413
|
return context;
|
|
709
414
|
};
|
|
710
415
|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
416
|
+
const AccordionContext = React.createContext(undefined);
|
|
417
|
+
const useAccordionContext = () => {
|
|
418
|
+
const context = React.useContext(AccordionContext);
|
|
714
419
|
if (context === undefined) {
|
|
715
420
|
throw new Error('This component must be rendered within a Accordion component');
|
|
716
421
|
}
|
|
717
422
|
return context;
|
|
718
423
|
};
|
|
719
424
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
425
|
+
const SectionContext = React.createContext(undefined);
|
|
426
|
+
const useSectionContext = () => {
|
|
427
|
+
const context = React.useContext(SectionContext);
|
|
723
428
|
if (context === undefined) {
|
|
724
429
|
throw new Error('This component must be rendered within a Accordion.Section component');
|
|
725
430
|
}
|
|
726
431
|
return context;
|
|
727
432
|
};
|
|
728
433
|
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
434
|
+
const HeaderContext = React.createContext(undefined);
|
|
435
|
+
const useHeaderContext = () => {
|
|
436
|
+
const context = React.useContext(HeaderContext);
|
|
732
437
|
if (context === undefined) {
|
|
733
438
|
throw new Error('This component must be rendered within a Accordion.Header component');
|
|
734
439
|
}
|
|
735
440
|
return context;
|
|
736
441
|
};
|
|
737
442
|
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
443
|
+
const TimelineContext = React.createContext(undefined);
|
|
444
|
+
const useTimelineContext = () => {
|
|
445
|
+
const context = React.useContext(TimelineContext);
|
|
741
446
|
if (context === undefined) {
|
|
742
447
|
throw new Error('This component must be rendered within a Timeline component');
|
|
743
448
|
}
|
|
744
449
|
return context;
|
|
745
450
|
};
|
|
746
451
|
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
452
|
+
const TimelineItemContext = React.createContext(undefined);
|
|
453
|
+
const useTimelineItemContext = () => {
|
|
454
|
+
const context = React.useContext(TimelineItemContext);
|
|
750
455
|
if (context === undefined) {
|
|
751
456
|
throw new Error('This component must be rendered within a Timeline.Item component');
|
|
752
457
|
}
|
|
753
458
|
return context;
|
|
754
459
|
};
|
|
755
460
|
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
461
|
+
const SectionComponent = React.forwardRef((props, ref) => {
|
|
462
|
+
const {
|
|
463
|
+
currentIndexRef
|
|
464
|
+
} = useAccordionContext();
|
|
465
|
+
const sectionIndexRef = React.useRef(currentIndexRef.current++);
|
|
466
|
+
const sectionIndex = sectionIndexRef.current;
|
|
761
467
|
return React__default["default"].createElement(SectionContext.Provider, {
|
|
762
468
|
value: sectionIndex
|
|
763
469
|
}, React__default["default"].createElement(StyledSection, _extends$3({
|
|
@@ -765,7 +471,7 @@ var SectionComponent = React.forwardRef(function (props, ref) {
|
|
|
765
471
|
}, props)));
|
|
766
472
|
});
|
|
767
473
|
SectionComponent.displayName = 'Accordion.Section';
|
|
768
|
-
|
|
474
|
+
const Section = SectionComponent;
|
|
769
475
|
|
|
770
476
|
var _path$1;
|
|
771
477
|
|
|
@@ -778,109 +484,97 @@ var SvgChevronDownStroke = function SvgChevronDownStroke(props) {
|
|
|
778
484
|
height: 16,
|
|
779
485
|
focusable: "false",
|
|
780
486
|
viewBox: "0 0 16 16",
|
|
781
|
-
"aria-hidden": "true"
|
|
487
|
+
"aria-hidden": "true",
|
|
488
|
+
role: "img"
|
|
782
489
|
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
783
490
|
fill: "currentColor",
|
|
784
491
|
d: "M12.688 5.61a.5.5 0 01.69.718l-.066.062-5 4a.5.5 0 01-.542.054l-.082-.054-5-4a.5.5 0 01.55-.83l.074.05L8 9.359l4.688-3.75z"
|
|
785
492
|
})));
|
|
786
493
|
};
|
|
787
494
|
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
var _getTriggerProps = getTriggerProps({
|
|
495
|
+
const HeaderComponent = React.forwardRef((props, ref) => {
|
|
496
|
+
const {
|
|
497
|
+
level: ariaLevel,
|
|
498
|
+
isCompact,
|
|
499
|
+
isCollapsible,
|
|
500
|
+
getHeaderProps,
|
|
501
|
+
getTriggerProps,
|
|
502
|
+
expandedSections
|
|
503
|
+
} = useAccordionContext();
|
|
504
|
+
const {
|
|
505
|
+
onClick,
|
|
506
|
+
onFocus,
|
|
507
|
+
onBlur,
|
|
508
|
+
onMouseOver,
|
|
509
|
+
onMouseOut,
|
|
510
|
+
children,
|
|
511
|
+
...other
|
|
512
|
+
} = props;
|
|
513
|
+
const sectionIndex = useSectionContext();
|
|
514
|
+
const [isFocused, setIsFocused] = React.useState(false);
|
|
515
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
516
|
+
const isExpanded = expandedSections.includes(sectionIndex);
|
|
517
|
+
const {
|
|
518
|
+
onClick: onTriggerClick,
|
|
519
|
+
onKeyDown,
|
|
520
|
+
...otherTriggerProps
|
|
521
|
+
} = getTriggerProps({
|
|
816
522
|
type: 'button',
|
|
817
523
|
index: sectionIndex
|
|
818
|
-
})
|
|
819
|
-
|
|
820
|
-
_getTriggerProps.onKeyDown;
|
|
821
|
-
var otherTriggerProps = _objectWithoutProperties(_getTriggerProps, _excluded2);
|
|
822
|
-
var onHeaderFocus = function onHeaderFocus(e) {
|
|
524
|
+
});
|
|
525
|
+
const onHeaderFocus = e => {
|
|
823
526
|
e.persist();
|
|
824
|
-
setTimeout(
|
|
825
|
-
|
|
826
|
-
|
|
527
|
+
setTimeout(() => {
|
|
528
|
+
const isAccordionButton = e.target.getAttribute('data-garden-id') === COMPONENT_ID$8;
|
|
529
|
+
const isFocusVisible = e.target.getAttribute('data-garden-focus-visible');
|
|
827
530
|
if (isAccordionButton && isFocusVisible) {
|
|
828
531
|
setIsFocused(true);
|
|
829
532
|
}
|
|
830
533
|
}, 0);
|
|
831
534
|
};
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
};
|
|
837
|
-
}, [isHovered, otherTriggerProps]);
|
|
535
|
+
const value = React.useMemo(() => ({
|
|
536
|
+
isHovered,
|
|
537
|
+
otherTriggerProps
|
|
538
|
+
}), [isHovered, otherTriggerProps]);
|
|
838
539
|
return React__default["default"].createElement(HeaderContext.Provider, {
|
|
839
540
|
value: value
|
|
840
|
-
}, React__default["default"].createElement(StyledHeader, getHeaderProps(
|
|
841
|
-
ref
|
|
842
|
-
ariaLevel
|
|
843
|
-
isCompact
|
|
844
|
-
isFocused
|
|
845
|
-
isExpanded
|
|
846
|
-
isCollapsible
|
|
541
|
+
}, React__default["default"].createElement(StyledHeader, getHeaderProps({
|
|
542
|
+
ref,
|
|
543
|
+
ariaLevel,
|
|
544
|
+
isCompact,
|
|
545
|
+
isFocused,
|
|
546
|
+
isExpanded,
|
|
547
|
+
isCollapsible,
|
|
847
548
|
onClick: containerUtilities.composeEventHandlers(onClick, onTriggerClick),
|
|
848
549
|
onFocus: containerUtilities.composeEventHandlers(onFocus, onHeaderFocus),
|
|
849
|
-
onBlur: containerUtilities.composeEventHandlers(onBlur,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
}),
|
|
855
|
-
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, function () {
|
|
856
|
-
return setIsHovered(false);
|
|
857
|
-
})
|
|
858
|
-
}, other)), children, React__default["default"].createElement(StyledRotateIcon, {
|
|
550
|
+
onBlur: containerUtilities.composeEventHandlers(onBlur, () => setIsFocused(false)),
|
|
551
|
+
onMouseOver: containerUtilities.composeEventHandlers(onMouseOver, () => setIsHovered(true)),
|
|
552
|
+
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, () => setIsHovered(false)),
|
|
553
|
+
...other
|
|
554
|
+
}), children, React__default["default"].createElement(StyledRotateIcon, {
|
|
859
555
|
isCompact: isCompact,
|
|
860
556
|
isHovered: isHovered,
|
|
861
557
|
isRotated: isExpanded,
|
|
862
558
|
isCollapsible: isCollapsible,
|
|
863
|
-
onMouseOver: containerUtilities.composeEventHandlers(onMouseOver,
|
|
864
|
-
|
|
865
|
-
}),
|
|
866
|
-
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, function () {
|
|
867
|
-
return setIsHovered(false);
|
|
868
|
-
})
|
|
559
|
+
onMouseOver: containerUtilities.composeEventHandlers(onMouseOver, () => setIsHovered(true)),
|
|
560
|
+
onMouseOut: containerUtilities.composeEventHandlers(onMouseOut, () => setIsHovered(false))
|
|
869
561
|
}, React__default["default"].createElement(SvgChevronDownStroke, null))));
|
|
870
562
|
});
|
|
871
563
|
HeaderComponent.displayName = 'Accordion.Header';
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
564
|
+
const Header = HeaderComponent;
|
|
565
|
+
|
|
566
|
+
const LabelComponent$1 = React.forwardRef((props, ref) => {
|
|
567
|
+
const sectionIndex = useSectionContext();
|
|
568
|
+
const {
|
|
569
|
+
isCompact,
|
|
570
|
+
isCollapsible,
|
|
571
|
+
expandedSections
|
|
572
|
+
} = useAccordionContext();
|
|
573
|
+
const isExpanded = expandedSections.includes(sectionIndex);
|
|
574
|
+
const {
|
|
575
|
+
isHovered,
|
|
576
|
+
otherTriggerProps
|
|
577
|
+
} = useHeaderContext();
|
|
884
578
|
return React__default["default"].createElement(StyledButton, _extends$3({
|
|
885
579
|
ref: ref,
|
|
886
580
|
isCompact: isCompact,
|
|
@@ -890,91 +584,93 @@ var LabelComponent$1 = React.forwardRef(function (props, ref) {
|
|
|
890
584
|
}, otherTriggerProps, props));
|
|
891
585
|
});
|
|
892
586
|
LabelComponent$1.displayName = 'Accordion.Label';
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
587
|
+
const Label$1 = LabelComponent$1;
|
|
588
|
+
|
|
589
|
+
const PanelComponent = React.forwardRef((props, ref) => {
|
|
590
|
+
const {
|
|
591
|
+
isCompact,
|
|
592
|
+
isBare,
|
|
593
|
+
isAnimated,
|
|
594
|
+
getPanelProps,
|
|
595
|
+
expandedSections
|
|
596
|
+
} = useAccordionContext();
|
|
597
|
+
const panelRef = React.useRef();
|
|
598
|
+
const index = useSectionContext();
|
|
599
|
+
const isExpanded = expandedSections.includes(index);
|
|
600
|
+
const updateMaxHeight = React.useCallback(debounce__default["default"](() => {
|
|
906
601
|
if (panelRef.current) {
|
|
907
|
-
|
|
908
|
-
child.style.maxHeight =
|
|
602
|
+
const child = panelRef.current.children[0];
|
|
603
|
+
child.style.maxHeight = `${child.scrollHeight}px`;
|
|
909
604
|
}
|
|
910
605
|
}, 100), [panelRef]);
|
|
911
|
-
React__default["default"].useEffect(
|
|
606
|
+
React__default["default"].useEffect(() => {
|
|
912
607
|
if (!isAnimated) {
|
|
913
608
|
return undefined;
|
|
914
609
|
}
|
|
915
610
|
addEventListener('resize', updateMaxHeight);
|
|
916
611
|
updateMaxHeight();
|
|
917
|
-
return
|
|
612
|
+
return () => {
|
|
918
613
|
removeEventListener('resize', updateMaxHeight);
|
|
919
614
|
};
|
|
920
615
|
}, [isAnimated, isExpanded, updateMaxHeight, props.children]);
|
|
921
|
-
return React__default["default"].createElement(StyledPanel, getPanelProps(
|
|
616
|
+
return React__default["default"].createElement(StyledPanel, getPanelProps({
|
|
922
617
|
role: null,
|
|
923
618
|
ref: mergeRefs__default["default"]([panelRef, ref]),
|
|
924
|
-
index
|
|
925
|
-
isBare
|
|
926
|
-
isCompact
|
|
927
|
-
isExpanded
|
|
928
|
-
isAnimated
|
|
929
|
-
|
|
619
|
+
index,
|
|
620
|
+
isBare,
|
|
621
|
+
isCompact,
|
|
622
|
+
isExpanded,
|
|
623
|
+
isAnimated,
|
|
624
|
+
...props
|
|
625
|
+
}), React__default["default"].createElement(StyledInnerPanel, {
|
|
930
626
|
isExpanded: isExpanded,
|
|
931
627
|
isAnimated: isAnimated
|
|
932
628
|
}, props.children));
|
|
933
629
|
});
|
|
934
630
|
PanelComponent.displayName = 'Accordion.Panel';
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
631
|
+
const Panel = PanelComponent;
|
|
632
|
+
|
|
633
|
+
const AccordionComponent = React.forwardRef((_ref, ref) => {
|
|
634
|
+
let {
|
|
635
|
+
level,
|
|
636
|
+
isBare,
|
|
637
|
+
onChange,
|
|
638
|
+
isCompact,
|
|
639
|
+
isAnimated,
|
|
640
|
+
isExpandable,
|
|
641
|
+
isCollapsible,
|
|
642
|
+
defaultExpandedSections,
|
|
643
|
+
expandedSections: controlledExpandedSections,
|
|
644
|
+
...props
|
|
645
|
+
} = _ref;
|
|
646
|
+
const {
|
|
647
|
+
expandedSections,
|
|
648
|
+
getHeaderProps,
|
|
649
|
+
getTriggerProps,
|
|
650
|
+
getPanelProps
|
|
651
|
+
} = containerAccordion.useAccordion({
|
|
950
652
|
collapsible: isCollapsible,
|
|
951
653
|
expandable: isExpandable || false,
|
|
952
|
-
onChange
|
|
953
|
-
defaultExpandedSections
|
|
654
|
+
onChange,
|
|
655
|
+
defaultExpandedSections,
|
|
954
656
|
expandedSections: controlledExpandedSections
|
|
955
|
-
})
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
getTriggerProps = _useAccordion.getTriggerProps,
|
|
959
|
-
getPanelProps = _useAccordion.getPanelProps;
|
|
960
|
-
var currentIndexRef = React.useRef(0);
|
|
961
|
-
React.useEffect(function () {
|
|
657
|
+
});
|
|
658
|
+
const currentIndexRef = React.useRef(0);
|
|
659
|
+
React.useEffect(() => {
|
|
962
660
|
currentIndexRef.current = 0;
|
|
963
661
|
});
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
};
|
|
977
|
-
}, [level, isBare, isCompact, isAnimated, isCollapsible, getPanelProps, getHeaderProps, getTriggerProps, currentIndexRef, expandedSections]);
|
|
662
|
+
const value = React.useMemo(() => ({
|
|
663
|
+
level,
|
|
664
|
+
isBare,
|
|
665
|
+
isCompact,
|
|
666
|
+
isAnimated,
|
|
667
|
+
isCollapsible,
|
|
668
|
+
getPanelProps,
|
|
669
|
+
getHeaderProps,
|
|
670
|
+
getTriggerProps,
|
|
671
|
+
currentIndexRef,
|
|
672
|
+
expandedSections
|
|
673
|
+
}), [level, isBare, isCompact, isAnimated, isCollapsible, getPanelProps, getHeaderProps, getTriggerProps, currentIndexRef, expandedSections]);
|
|
978
674
|
return React__default["default"].createElement(AccordionContext.Provider, {
|
|
979
675
|
value: value
|
|
980
676
|
}, React__default["default"].createElement(StyledAccordion, _extends$3({
|
|
@@ -986,33 +682,29 @@ AccordionComponent.defaultProps = {
|
|
|
986
682
|
isAnimated: true,
|
|
987
683
|
isCollapsible: true
|
|
988
684
|
};
|
|
989
|
-
|
|
685
|
+
const Accordion = AccordionComponent;
|
|
990
686
|
Accordion.Header = Header;
|
|
991
687
|
Accordion.Label = Label$1;
|
|
992
688
|
Accordion.Panel = Panel;
|
|
993
689
|
Accordion.Section = Section;
|
|
994
690
|
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
setCurrentStepIndex = _useState2[1];
|
|
1003
|
-
React.useLayoutEffect(function () {
|
|
691
|
+
const StepComponent = React.forwardRef((props, ref) => {
|
|
692
|
+
const {
|
|
693
|
+
currentIndexRef,
|
|
694
|
+
isHorizontal
|
|
695
|
+
} = useStepperContext();
|
|
696
|
+
const [currentStepIndex, setCurrentStepIndex] = React.useState(currentIndexRef.current);
|
|
697
|
+
React.useLayoutEffect(() => {
|
|
1004
698
|
setCurrentStepIndex(currentIndexRef.current);
|
|
1005
699
|
currentIndexRef.current++;
|
|
1006
|
-
|
|
1007
|
-
return
|
|
700
|
+
const currentIndex = currentIndexRef;
|
|
701
|
+
return () => {
|
|
1008
702
|
currentIndex.current--;
|
|
1009
703
|
};
|
|
1010
704
|
}, [currentIndexRef]);
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
};
|
|
1015
|
-
}, [currentStepIndex]);
|
|
705
|
+
const value = React.useMemo(() => ({
|
|
706
|
+
currentStepIndex
|
|
707
|
+
}), [currentStepIndex]);
|
|
1016
708
|
return React__default["default"].createElement(StepContext.Provider, {
|
|
1017
709
|
value: value
|
|
1018
710
|
}, React__default["default"].createElement(StyledStep, _extends$3({
|
|
@@ -1021,7 +713,7 @@ var StepComponent = React.forwardRef(function (props, ref) {
|
|
|
1021
713
|
}, props), isHorizontal && React__default["default"].createElement(StyledLine, null), props.children));
|
|
1022
714
|
});
|
|
1023
715
|
StepComponent.displayName = 'Stepper.Step';
|
|
1024
|
-
|
|
716
|
+
const Step = StepComponent;
|
|
1025
717
|
|
|
1026
718
|
var _path;
|
|
1027
719
|
|
|
@@ -1034,7 +726,8 @@ var SvgCheckSmStroke = function SvgCheckSmStroke(props) {
|
|
|
1034
726
|
height: 16,
|
|
1035
727
|
focusable: "false",
|
|
1036
728
|
viewBox: "0 0 16 16",
|
|
1037
|
-
"aria-hidden": "true"
|
|
729
|
+
"aria-hidden": "true",
|
|
730
|
+
role: "img"
|
|
1038
731
|
}, props), _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1039
732
|
fill: "none",
|
|
1040
733
|
stroke: "currentColor",
|
|
@@ -1045,23 +738,26 @@ var SvgCheckSmStroke = function SvgCheckSmStroke(props) {
|
|
|
1045
738
|
})));
|
|
1046
739
|
};
|
|
1047
740
|
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
741
|
+
const LabelComponent = React.forwardRef((_ref, ref) => {
|
|
742
|
+
let {
|
|
743
|
+
icon,
|
|
744
|
+
iconProps,
|
|
745
|
+
isHidden,
|
|
746
|
+
children,
|
|
747
|
+
...other
|
|
748
|
+
} = _ref;
|
|
749
|
+
const {
|
|
750
|
+
currentStepIndex
|
|
751
|
+
} = useStepContext();
|
|
752
|
+
const {
|
|
753
|
+
activeIndex,
|
|
754
|
+
isHorizontal
|
|
755
|
+
} = useStepperContext();
|
|
756
|
+
const numericStep = currentStepIndex + 1;
|
|
757
|
+
const stepIcon = icon || numericStep;
|
|
758
|
+
const isActive = activeIndex === currentStepIndex;
|
|
759
|
+
const isCompleted = activeIndex > currentStepIndex;
|
|
760
|
+
const styledIcon = React__default["default"].createElement(StyledIcon, {
|
|
1065
761
|
isActive: isActive,
|
|
1066
762
|
isHorizontal: isHorizontal
|
|
1067
763
|
}, isCompleted ? React__default["default"].createElement(SvgCheckSmStroke, iconProps) : stepIcon);
|
|
@@ -1080,27 +776,29 @@ LabelComponent.propTypes = {
|
|
|
1080
776
|
iconProps: PropTypes__default["default"].object,
|
|
1081
777
|
isHidden: PropTypes__default["default"].bool
|
|
1082
778
|
};
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
779
|
+
const Label = LabelComponent;
|
|
780
|
+
|
|
781
|
+
const ContentComponent$1 = React.forwardRef((props, ref) => {
|
|
782
|
+
const contentRef = React.useRef();
|
|
783
|
+
const {
|
|
784
|
+
activeIndex,
|
|
785
|
+
isHorizontal
|
|
786
|
+
} = useStepperContext();
|
|
787
|
+
const {
|
|
788
|
+
currentStepIndex
|
|
789
|
+
} = useStepContext();
|
|
790
|
+
const isActive = currentStepIndex === activeIndex;
|
|
791
|
+
const updateMaxHeight = React.useCallback(debounce__default["default"](() => {
|
|
1094
792
|
if (contentRef.current) {
|
|
1095
|
-
|
|
1096
|
-
child.style.maxHeight =
|
|
793
|
+
const child = contentRef.current.children[0];
|
|
794
|
+
child.style.maxHeight = `${child.scrollHeight}px`;
|
|
1097
795
|
}
|
|
1098
796
|
}, 100), [contentRef]);
|
|
1099
|
-
React.useEffect(
|
|
797
|
+
React.useEffect(() => {
|
|
1100
798
|
if (isActive && isHorizontal === false) {
|
|
1101
799
|
addEventListener('resize', updateMaxHeight);
|
|
1102
800
|
updateMaxHeight();
|
|
1103
|
-
return
|
|
801
|
+
return () => {
|
|
1104
802
|
removeEventListener('resize', updateMaxHeight);
|
|
1105
803
|
};
|
|
1106
804
|
}
|
|
@@ -1115,22 +813,21 @@ var ContentComponent$1 = React.forwardRef(function (props, ref) {
|
|
|
1115
813
|
}, props.children)) : null;
|
|
1116
814
|
});
|
|
1117
815
|
ContentComponent$1.displayName = 'Stepper.Content';
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
React.useEffect(function () {
|
|
816
|
+
const Content$1 = ContentComponent$1;
|
|
817
|
+
|
|
818
|
+
const StepperComponent = React.forwardRef((_ref, ref) => {
|
|
819
|
+
let {
|
|
820
|
+
isHorizontal,
|
|
821
|
+
activeIndex,
|
|
822
|
+
...props
|
|
823
|
+
} = _ref;
|
|
824
|
+
const currentIndexRef = React.useRef(0);
|
|
825
|
+
const stepperContext = React.useMemo(() => ({
|
|
826
|
+
isHorizontal: isHorizontal || false,
|
|
827
|
+
activeIndex: activeIndex,
|
|
828
|
+
currentIndexRef
|
|
829
|
+
}), [isHorizontal, activeIndex, currentIndexRef]);
|
|
830
|
+
React.useEffect(() => {
|
|
1134
831
|
currentIndexRef.current = 0;
|
|
1135
832
|
});
|
|
1136
833
|
return React__default["default"].createElement(StepperContext.Provider, {
|
|
@@ -1144,34 +841,32 @@ StepperComponent.displayName = 'Stepper';
|
|
|
1144
841
|
StepperComponent.defaultProps = {
|
|
1145
842
|
activeIndex: 0
|
|
1146
843
|
};
|
|
1147
|
-
|
|
844
|
+
const Stepper = StepperComponent;
|
|
1148
845
|
Stepper.Content = Content$1;
|
|
1149
846
|
Stepper.Label = Label;
|
|
1150
847
|
Stepper.Step = Step;
|
|
1151
848
|
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
}, props));
|
|
1156
|
-
});
|
|
849
|
+
const OppositeContentComponent = React.forwardRef((props, ref) => React__default["default"].createElement(StyledOppositeContent, _extends$3({
|
|
850
|
+
ref: ref
|
|
851
|
+
}, props)));
|
|
1157
852
|
OppositeContentComponent.displayName = 'Timeline.OppositeContent';
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
React.Children.forEach(props.children,
|
|
853
|
+
const OppositeContent = OppositeContentComponent;
|
|
854
|
+
|
|
855
|
+
const ItemComponent = React.forwardRef((_ref, ref) => {
|
|
856
|
+
let {
|
|
857
|
+
icon,
|
|
858
|
+
surfaceColor,
|
|
859
|
+
...props
|
|
860
|
+
} = _ref;
|
|
861
|
+
const value = React.useMemo(() => ({
|
|
862
|
+
icon,
|
|
863
|
+
surfaceColor
|
|
864
|
+
}), [icon, surfaceColor]);
|
|
865
|
+
const {
|
|
866
|
+
isAlternate
|
|
867
|
+
} = useTimelineContext();
|
|
868
|
+
let hasOppositeContent = false;
|
|
869
|
+
React.Children.forEach(props.children, child => {
|
|
1175
870
|
if (child) {
|
|
1176
871
|
if (child.type === OppositeContent) {
|
|
1177
872
|
hasOppositeContent = true;
|
|
@@ -1187,7 +882,7 @@ var ItemComponent = React.forwardRef(function (_ref, ref) {
|
|
|
1187
882
|
}, props)));
|
|
1188
883
|
});
|
|
1189
884
|
ItemComponent.displayName = 'Timeline.Item';
|
|
1190
|
-
|
|
885
|
+
const Item = ItemComponent;
|
|
1191
886
|
|
|
1192
887
|
var _circle;
|
|
1193
888
|
|
|
@@ -1200,7 +895,8 @@ var SvgCircleFullStroke = function SvgCircleFullStroke(props) {
|
|
|
1200
895
|
height: 12,
|
|
1201
896
|
focusable: "false",
|
|
1202
897
|
viewBox: "0 0 12 12",
|
|
1203
|
-
"aria-hidden": "true"
|
|
898
|
+
"aria-hidden": "true",
|
|
899
|
+
role: "img"
|
|
1204
900
|
}, props), _circle || (_circle = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
1205
901
|
cx: 6,
|
|
1206
902
|
cy: 6,
|
|
@@ -1210,10 +906,11 @@ var SvgCircleFullStroke = function SvgCircleFullStroke(props) {
|
|
|
1210
906
|
})));
|
|
1211
907
|
};
|
|
1212
908
|
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
909
|
+
const ContentComponent = React.forwardRef((props, ref) => {
|
|
910
|
+
const {
|
|
911
|
+
icon,
|
|
912
|
+
surfaceColor
|
|
913
|
+
} = useTimelineItemContext();
|
|
1217
914
|
return React__default["default"].createElement(React__default["default"].Fragment, null, React__default["default"].createElement(StyledSeparator, null, React__default["default"].createElement(StyledItemIcon, {
|
|
1218
915
|
surfaceColor: surfaceColor
|
|
1219
916
|
}, icon || React__default["default"].createElement(SvgCircleFullStroke, null))), React__default["default"].createElement(StyledTimelineContent, _extends$3({
|
|
@@ -1221,17 +918,16 @@ var ContentComponent = React.forwardRef(function (props, ref) {
|
|
|
1221
918
|
}, props)));
|
|
1222
919
|
});
|
|
1223
920
|
ContentComponent.displayName = 'Timeline.Content';
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
}, [isAlternate]);
|
|
921
|
+
const Content = ContentComponent;
|
|
922
|
+
|
|
923
|
+
const TimelineComponent = React.forwardRef((_ref, ref) => {
|
|
924
|
+
let {
|
|
925
|
+
isAlternate,
|
|
926
|
+
...props
|
|
927
|
+
} = _ref;
|
|
928
|
+
const value = React.useMemo(() => ({
|
|
929
|
+
isAlternate
|
|
930
|
+
}), [isAlternate]);
|
|
1235
931
|
return React__default["default"].createElement(TimelineContext.Provider, {
|
|
1236
932
|
value: value
|
|
1237
933
|
}, React__default["default"].createElement(StyledTimeline, _extends$3({
|
|
@@ -1239,7 +935,7 @@ var TimelineComponent = React.forwardRef(function (_ref, ref) {
|
|
|
1239
935
|
}, props)));
|
|
1240
936
|
});
|
|
1241
937
|
TimelineComponent.displayName = 'Timeline';
|
|
1242
|
-
|
|
938
|
+
const Timeline = TimelineComponent;
|
|
1243
939
|
Timeline.Content = Content;
|
|
1244
940
|
Timeline.Item = Item;
|
|
1245
941
|
Timeline.OppositeContent = OppositeContent;
|