@sproutsocial/seeds-react-accordion 0.1.7 → 0.2.1
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +15 -0
- package/dist/esm/index.js +1079 -25
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1054 -23
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/src/Accordion.stories.tsx +27 -18
- package/src/AccordionTrigger.tsx +15 -4
- package/src/AccordionTypes.ts +2 -2
- package/src/__tests__/accordion.test.tsx +34 -2
- package/src/styles.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,76 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
33
|
+
// ../../node_modules/object-assign/index.js
|
|
34
|
+
var require_object_assign = __commonJS({
|
|
35
|
+
"../../node_modules/object-assign/index.js"(exports2, module2) {
|
|
36
|
+
"use strict";
|
|
37
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
38
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
39
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
40
|
+
function toObject(val) {
|
|
41
|
+
if (val === null || val === void 0) {
|
|
42
|
+
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
43
|
+
}
|
|
44
|
+
return Object(val);
|
|
45
|
+
}
|
|
46
|
+
function shouldUseNative() {
|
|
47
|
+
try {
|
|
48
|
+
if (!Object.assign) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
var test1 = new String("abc");
|
|
52
|
+
test1[5] = "de";
|
|
53
|
+
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
var test2 = {};
|
|
57
|
+
for (var i = 0; i < 10; i++) {
|
|
58
|
+
test2["_" + String.fromCharCode(i)] = i;
|
|
59
|
+
}
|
|
60
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
61
|
+
return test2[n];
|
|
62
|
+
});
|
|
63
|
+
if (order2.join("") !== "0123456789") {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
var test3 = {};
|
|
67
|
+
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
68
|
+
test3[letter] = letter;
|
|
69
|
+
});
|
|
70
|
+
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
return true;
|
|
74
|
+
} catch (err) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
module2.exports = shouldUseNative() ? Object.assign : function(target, source) {
|
|
79
|
+
var from;
|
|
80
|
+
var to = toObject(target);
|
|
81
|
+
var symbols;
|
|
82
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
83
|
+
from = Object(arguments[s]);
|
|
84
|
+
for (var key in from) {
|
|
85
|
+
if (hasOwnProperty.call(from, key)) {
|
|
86
|
+
to[key] = from[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
if (getOwnPropertySymbols) {
|
|
90
|
+
symbols = getOwnPropertySymbols(from);
|
|
91
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
92
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
93
|
+
to[symbols[i]] = from[symbols[i]];
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
return to;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
30
103
|
// src/index.ts
|
|
31
104
|
var index_exports = {};
|
|
32
105
|
__export(index_exports, {
|
|
@@ -111,6 +184,936 @@ var RadixAccordion3 = require("@radix-ui/react-accordion");
|
|
|
111
184
|
// src/styles.ts
|
|
112
185
|
var import_styled_components = __toESM(require("styled-components"));
|
|
113
186
|
var RadixAccordion2 = __toESM(require("@radix-ui/react-accordion"));
|
|
187
|
+
|
|
188
|
+
// ../../node_modules/@styled-system/core/dist/index.esm.js
|
|
189
|
+
var import_object_assign = __toESM(require_object_assign());
|
|
190
|
+
var merge = function merge2(a, b) {
|
|
191
|
+
var result = (0, import_object_assign.default)({}, a, b);
|
|
192
|
+
for (var key in a) {
|
|
193
|
+
var _assign;
|
|
194
|
+
if (!a[key] || typeof b[key] !== "object") continue;
|
|
195
|
+
(0, import_object_assign.default)(result, (_assign = {}, _assign[key] = (0, import_object_assign.default)(a[key], b[key]), _assign));
|
|
196
|
+
}
|
|
197
|
+
return result;
|
|
198
|
+
};
|
|
199
|
+
var sort = function sort2(obj) {
|
|
200
|
+
var next = {};
|
|
201
|
+
Object.keys(obj).sort(function(a, b) {
|
|
202
|
+
return a.localeCompare(b, void 0, {
|
|
203
|
+
numeric: true,
|
|
204
|
+
sensitivity: "base"
|
|
205
|
+
});
|
|
206
|
+
}).forEach(function(key) {
|
|
207
|
+
next[key] = obj[key];
|
|
208
|
+
});
|
|
209
|
+
return next;
|
|
210
|
+
};
|
|
211
|
+
var defaults = {
|
|
212
|
+
breakpoints: [40, 52, 64].map(function(n) {
|
|
213
|
+
return n + "em";
|
|
214
|
+
})
|
|
215
|
+
};
|
|
216
|
+
var createMediaQuery = function createMediaQuery2(n) {
|
|
217
|
+
return "@media screen and (min-width: " + n + ")";
|
|
218
|
+
};
|
|
219
|
+
var getValue = function getValue2(n, scale) {
|
|
220
|
+
return get(scale, n, n);
|
|
221
|
+
};
|
|
222
|
+
var get = function get2(obj, key, def, p, undef) {
|
|
223
|
+
key = key && key.split ? key.split(".") : [key];
|
|
224
|
+
for (p = 0; p < key.length; p++) {
|
|
225
|
+
obj = obj ? obj[key[p]] : undef;
|
|
226
|
+
}
|
|
227
|
+
return obj === undef ? def : obj;
|
|
228
|
+
};
|
|
229
|
+
var createParser = function createParser2(config9) {
|
|
230
|
+
var cache = {};
|
|
231
|
+
var parse = function parse2(props) {
|
|
232
|
+
var styles = {};
|
|
233
|
+
var shouldSort = false;
|
|
234
|
+
var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
|
|
235
|
+
for (var key in props) {
|
|
236
|
+
if (!config9[key]) continue;
|
|
237
|
+
var sx = config9[key];
|
|
238
|
+
var raw = props[key];
|
|
239
|
+
var scale = get(props.theme, sx.scale, sx.defaults);
|
|
240
|
+
if (typeof raw === "object") {
|
|
241
|
+
cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
|
|
242
|
+
if (Array.isArray(raw)) {
|
|
243
|
+
cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
|
|
244
|
+
styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
if (raw !== null) {
|
|
248
|
+
styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
|
|
249
|
+
shouldSort = true;
|
|
250
|
+
}
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
(0, import_object_assign.default)(styles, sx(raw, scale, props));
|
|
254
|
+
}
|
|
255
|
+
if (shouldSort) {
|
|
256
|
+
styles = sort(styles);
|
|
257
|
+
}
|
|
258
|
+
return styles;
|
|
259
|
+
};
|
|
260
|
+
parse.config = config9;
|
|
261
|
+
parse.propNames = Object.keys(config9);
|
|
262
|
+
parse.cache = cache;
|
|
263
|
+
var keys = Object.keys(config9).filter(function(k) {
|
|
264
|
+
return k !== "config";
|
|
265
|
+
});
|
|
266
|
+
if (keys.length > 1) {
|
|
267
|
+
keys.forEach(function(key) {
|
|
268
|
+
var _createParser;
|
|
269
|
+
parse[key] = createParser2((_createParser = {}, _createParser[key] = config9[key], _createParser));
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
return parse;
|
|
273
|
+
};
|
|
274
|
+
var parseResponsiveStyle = function parseResponsiveStyle2(mediaQueries, sx, scale, raw, _props) {
|
|
275
|
+
var styles = {};
|
|
276
|
+
raw.slice(0, mediaQueries.length).forEach(function(value, i) {
|
|
277
|
+
var media = mediaQueries[i];
|
|
278
|
+
var style = sx(value, scale, _props);
|
|
279
|
+
if (!media) {
|
|
280
|
+
(0, import_object_assign.default)(styles, style);
|
|
281
|
+
} else {
|
|
282
|
+
var _assign2;
|
|
283
|
+
(0, import_object_assign.default)(styles, (_assign2 = {}, _assign2[media] = (0, import_object_assign.default)({}, styles[media], style), _assign2));
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
return styles;
|
|
287
|
+
};
|
|
288
|
+
var parseResponsiveObject = function parseResponsiveObject2(breakpoints, sx, scale, raw, _props) {
|
|
289
|
+
var styles = {};
|
|
290
|
+
for (var key in raw) {
|
|
291
|
+
var breakpoint = breakpoints[key];
|
|
292
|
+
var value = raw[key];
|
|
293
|
+
var style = sx(value, scale, _props);
|
|
294
|
+
if (!breakpoint) {
|
|
295
|
+
(0, import_object_assign.default)(styles, style);
|
|
296
|
+
} else {
|
|
297
|
+
var _assign3;
|
|
298
|
+
var media = createMediaQuery(breakpoint);
|
|
299
|
+
(0, import_object_assign.default)(styles, (_assign3 = {}, _assign3[media] = (0, import_object_assign.default)({}, styles[media], style), _assign3));
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return styles;
|
|
303
|
+
};
|
|
304
|
+
var createStyleFunction = function createStyleFunction2(_ref) {
|
|
305
|
+
var properties = _ref.properties, property = _ref.property, scale = _ref.scale, _ref$transform = _ref.transform, transform = _ref$transform === void 0 ? getValue : _ref$transform, defaultScale = _ref.defaultScale;
|
|
306
|
+
properties = properties || [property];
|
|
307
|
+
var sx = function sx2(value, scale2, _props) {
|
|
308
|
+
var result = {};
|
|
309
|
+
var n = transform(value, scale2, _props);
|
|
310
|
+
if (n === null) return;
|
|
311
|
+
properties.forEach(function(prop) {
|
|
312
|
+
result[prop] = n;
|
|
313
|
+
});
|
|
314
|
+
return result;
|
|
315
|
+
};
|
|
316
|
+
sx.scale = scale;
|
|
317
|
+
sx.defaults = defaultScale;
|
|
318
|
+
return sx;
|
|
319
|
+
};
|
|
320
|
+
var system = function system2(args) {
|
|
321
|
+
if (args === void 0) {
|
|
322
|
+
args = {};
|
|
323
|
+
}
|
|
324
|
+
var config9 = {};
|
|
325
|
+
Object.keys(args).forEach(function(key) {
|
|
326
|
+
var conf = args[key];
|
|
327
|
+
if (conf === true) {
|
|
328
|
+
config9[key] = createStyleFunction({
|
|
329
|
+
property: key,
|
|
330
|
+
scale: key
|
|
331
|
+
});
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
if (typeof conf === "function") {
|
|
335
|
+
config9[key] = conf;
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
config9[key] = createStyleFunction(conf);
|
|
339
|
+
});
|
|
340
|
+
var parser = createParser(config9);
|
|
341
|
+
return parser;
|
|
342
|
+
};
|
|
343
|
+
var compose = function compose2() {
|
|
344
|
+
var config9 = {};
|
|
345
|
+
for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
346
|
+
parsers[_key] = arguments[_key];
|
|
347
|
+
}
|
|
348
|
+
parsers.forEach(function(parser2) {
|
|
349
|
+
if (!parser2 || !parser2.config) return;
|
|
350
|
+
(0, import_object_assign.default)(config9, parser2.config);
|
|
351
|
+
});
|
|
352
|
+
var parser = createParser(config9);
|
|
353
|
+
return parser;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// ../../node_modules/@styled-system/layout/dist/index.esm.js
|
|
357
|
+
var isNumber = function isNumber2(n) {
|
|
358
|
+
return typeof n === "number" && !isNaN(n);
|
|
359
|
+
};
|
|
360
|
+
var getWidth = function getWidth2(n, scale) {
|
|
361
|
+
return get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
|
|
362
|
+
};
|
|
363
|
+
var config = {
|
|
364
|
+
width: {
|
|
365
|
+
property: "width",
|
|
366
|
+
scale: "sizes",
|
|
367
|
+
transform: getWidth
|
|
368
|
+
},
|
|
369
|
+
height: {
|
|
370
|
+
property: "height",
|
|
371
|
+
scale: "sizes"
|
|
372
|
+
},
|
|
373
|
+
minWidth: {
|
|
374
|
+
property: "minWidth",
|
|
375
|
+
scale: "sizes"
|
|
376
|
+
},
|
|
377
|
+
minHeight: {
|
|
378
|
+
property: "minHeight",
|
|
379
|
+
scale: "sizes"
|
|
380
|
+
},
|
|
381
|
+
maxWidth: {
|
|
382
|
+
property: "maxWidth",
|
|
383
|
+
scale: "sizes"
|
|
384
|
+
},
|
|
385
|
+
maxHeight: {
|
|
386
|
+
property: "maxHeight",
|
|
387
|
+
scale: "sizes"
|
|
388
|
+
},
|
|
389
|
+
size: {
|
|
390
|
+
properties: ["width", "height"],
|
|
391
|
+
scale: "sizes"
|
|
392
|
+
},
|
|
393
|
+
overflow: true,
|
|
394
|
+
overflowX: true,
|
|
395
|
+
overflowY: true,
|
|
396
|
+
display: true,
|
|
397
|
+
verticalAlign: true
|
|
398
|
+
};
|
|
399
|
+
var layout = system(config);
|
|
400
|
+
var index_esm_default = layout;
|
|
401
|
+
|
|
402
|
+
// ../../node_modules/@styled-system/color/dist/index.esm.js
|
|
403
|
+
var config2 = {
|
|
404
|
+
color: {
|
|
405
|
+
property: "color",
|
|
406
|
+
scale: "colors"
|
|
407
|
+
},
|
|
408
|
+
backgroundColor: {
|
|
409
|
+
property: "backgroundColor",
|
|
410
|
+
scale: "colors"
|
|
411
|
+
},
|
|
412
|
+
opacity: true
|
|
413
|
+
};
|
|
414
|
+
config2.bg = config2.backgroundColor;
|
|
415
|
+
var color = system(config2);
|
|
416
|
+
var index_esm_default2 = color;
|
|
417
|
+
|
|
418
|
+
// ../../node_modules/@styled-system/typography/dist/index.esm.js
|
|
419
|
+
var defaults2 = {
|
|
420
|
+
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
|
|
421
|
+
};
|
|
422
|
+
var config3 = {
|
|
423
|
+
fontFamily: {
|
|
424
|
+
property: "fontFamily",
|
|
425
|
+
scale: "fonts"
|
|
426
|
+
},
|
|
427
|
+
fontSize: {
|
|
428
|
+
property: "fontSize",
|
|
429
|
+
scale: "fontSizes",
|
|
430
|
+
defaultScale: defaults2.fontSizes
|
|
431
|
+
},
|
|
432
|
+
fontWeight: {
|
|
433
|
+
property: "fontWeight",
|
|
434
|
+
scale: "fontWeights"
|
|
435
|
+
},
|
|
436
|
+
lineHeight: {
|
|
437
|
+
property: "lineHeight",
|
|
438
|
+
scale: "lineHeights"
|
|
439
|
+
},
|
|
440
|
+
letterSpacing: {
|
|
441
|
+
property: "letterSpacing",
|
|
442
|
+
scale: "letterSpacings"
|
|
443
|
+
},
|
|
444
|
+
textAlign: true,
|
|
445
|
+
fontStyle: true
|
|
446
|
+
};
|
|
447
|
+
var typography = system(config3);
|
|
448
|
+
var index_esm_default3 = typography;
|
|
449
|
+
|
|
450
|
+
// ../../node_modules/@styled-system/flexbox/dist/index.esm.js
|
|
451
|
+
var config4 = {
|
|
452
|
+
alignItems: true,
|
|
453
|
+
alignContent: true,
|
|
454
|
+
justifyItems: true,
|
|
455
|
+
justifyContent: true,
|
|
456
|
+
flexWrap: true,
|
|
457
|
+
flexDirection: true,
|
|
458
|
+
// item
|
|
459
|
+
flex: true,
|
|
460
|
+
flexGrow: true,
|
|
461
|
+
flexShrink: true,
|
|
462
|
+
flexBasis: true,
|
|
463
|
+
justifySelf: true,
|
|
464
|
+
alignSelf: true,
|
|
465
|
+
order: true
|
|
466
|
+
};
|
|
467
|
+
var flexbox = system(config4);
|
|
468
|
+
var index_esm_default4 = flexbox;
|
|
469
|
+
|
|
470
|
+
// ../../node_modules/@styled-system/grid/dist/index.esm.js
|
|
471
|
+
var defaults3 = {
|
|
472
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
473
|
+
};
|
|
474
|
+
var config5 = {
|
|
475
|
+
gridGap: {
|
|
476
|
+
property: "gridGap",
|
|
477
|
+
scale: "space",
|
|
478
|
+
defaultScale: defaults3.space
|
|
479
|
+
},
|
|
480
|
+
gridColumnGap: {
|
|
481
|
+
property: "gridColumnGap",
|
|
482
|
+
scale: "space",
|
|
483
|
+
defaultScale: defaults3.space
|
|
484
|
+
},
|
|
485
|
+
gridRowGap: {
|
|
486
|
+
property: "gridRowGap",
|
|
487
|
+
scale: "space",
|
|
488
|
+
defaultScale: defaults3.space
|
|
489
|
+
},
|
|
490
|
+
gridColumn: true,
|
|
491
|
+
gridRow: true,
|
|
492
|
+
gridAutoFlow: true,
|
|
493
|
+
gridAutoColumns: true,
|
|
494
|
+
gridAutoRows: true,
|
|
495
|
+
gridTemplateColumns: true,
|
|
496
|
+
gridTemplateRows: true,
|
|
497
|
+
gridTemplateAreas: true,
|
|
498
|
+
gridArea: true
|
|
499
|
+
};
|
|
500
|
+
var grid = system(config5);
|
|
501
|
+
var index_esm_default5 = grid;
|
|
502
|
+
|
|
503
|
+
// ../../node_modules/@styled-system/border/dist/index.esm.js
|
|
504
|
+
var config6 = {
|
|
505
|
+
border: {
|
|
506
|
+
property: "border",
|
|
507
|
+
scale: "borders"
|
|
508
|
+
},
|
|
509
|
+
borderWidth: {
|
|
510
|
+
property: "borderWidth",
|
|
511
|
+
scale: "borderWidths"
|
|
512
|
+
},
|
|
513
|
+
borderStyle: {
|
|
514
|
+
property: "borderStyle",
|
|
515
|
+
scale: "borderStyles"
|
|
516
|
+
},
|
|
517
|
+
borderColor: {
|
|
518
|
+
property: "borderColor",
|
|
519
|
+
scale: "colors"
|
|
520
|
+
},
|
|
521
|
+
borderRadius: {
|
|
522
|
+
property: "borderRadius",
|
|
523
|
+
scale: "radii"
|
|
524
|
+
},
|
|
525
|
+
borderTop: {
|
|
526
|
+
property: "borderTop",
|
|
527
|
+
scale: "borders"
|
|
528
|
+
},
|
|
529
|
+
borderTopLeftRadius: {
|
|
530
|
+
property: "borderTopLeftRadius",
|
|
531
|
+
scale: "radii"
|
|
532
|
+
},
|
|
533
|
+
borderTopRightRadius: {
|
|
534
|
+
property: "borderTopRightRadius",
|
|
535
|
+
scale: "radii"
|
|
536
|
+
},
|
|
537
|
+
borderRight: {
|
|
538
|
+
property: "borderRight",
|
|
539
|
+
scale: "borders"
|
|
540
|
+
},
|
|
541
|
+
borderBottom: {
|
|
542
|
+
property: "borderBottom",
|
|
543
|
+
scale: "borders"
|
|
544
|
+
},
|
|
545
|
+
borderBottomLeftRadius: {
|
|
546
|
+
property: "borderBottomLeftRadius",
|
|
547
|
+
scale: "radii"
|
|
548
|
+
},
|
|
549
|
+
borderBottomRightRadius: {
|
|
550
|
+
property: "borderBottomRightRadius",
|
|
551
|
+
scale: "radii"
|
|
552
|
+
},
|
|
553
|
+
borderLeft: {
|
|
554
|
+
property: "borderLeft",
|
|
555
|
+
scale: "borders"
|
|
556
|
+
},
|
|
557
|
+
borderX: {
|
|
558
|
+
properties: ["borderLeft", "borderRight"],
|
|
559
|
+
scale: "borders"
|
|
560
|
+
},
|
|
561
|
+
borderY: {
|
|
562
|
+
properties: ["borderTop", "borderBottom"],
|
|
563
|
+
scale: "borders"
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
config6.borderTopWidth = {
|
|
567
|
+
property: "borderTopWidth",
|
|
568
|
+
scale: "borderWidths"
|
|
569
|
+
};
|
|
570
|
+
config6.borderTopColor = {
|
|
571
|
+
property: "borderTopColor",
|
|
572
|
+
scale: "colors"
|
|
573
|
+
};
|
|
574
|
+
config6.borderTopStyle = {
|
|
575
|
+
property: "borderTopStyle",
|
|
576
|
+
scale: "borderStyles"
|
|
577
|
+
};
|
|
578
|
+
config6.borderTopLeftRadius = {
|
|
579
|
+
property: "borderTopLeftRadius",
|
|
580
|
+
scale: "radii"
|
|
581
|
+
};
|
|
582
|
+
config6.borderTopRightRadius = {
|
|
583
|
+
property: "borderTopRightRadius",
|
|
584
|
+
scale: "radii"
|
|
585
|
+
};
|
|
586
|
+
config6.borderBottomWidth = {
|
|
587
|
+
property: "borderBottomWidth",
|
|
588
|
+
scale: "borderWidths"
|
|
589
|
+
};
|
|
590
|
+
config6.borderBottomColor = {
|
|
591
|
+
property: "borderBottomColor",
|
|
592
|
+
scale: "colors"
|
|
593
|
+
};
|
|
594
|
+
config6.borderBottomStyle = {
|
|
595
|
+
property: "borderBottomStyle",
|
|
596
|
+
scale: "borderStyles"
|
|
597
|
+
};
|
|
598
|
+
config6.borderBottomLeftRadius = {
|
|
599
|
+
property: "borderBottomLeftRadius",
|
|
600
|
+
scale: "radii"
|
|
601
|
+
};
|
|
602
|
+
config6.borderBottomRightRadius = {
|
|
603
|
+
property: "borderBottomRightRadius",
|
|
604
|
+
scale: "radii"
|
|
605
|
+
};
|
|
606
|
+
config6.borderLeftWidth = {
|
|
607
|
+
property: "borderLeftWidth",
|
|
608
|
+
scale: "borderWidths"
|
|
609
|
+
};
|
|
610
|
+
config6.borderLeftColor = {
|
|
611
|
+
property: "borderLeftColor",
|
|
612
|
+
scale: "colors"
|
|
613
|
+
};
|
|
614
|
+
config6.borderLeftStyle = {
|
|
615
|
+
property: "borderLeftStyle",
|
|
616
|
+
scale: "borderStyles"
|
|
617
|
+
};
|
|
618
|
+
config6.borderRightWidth = {
|
|
619
|
+
property: "borderRightWidth",
|
|
620
|
+
scale: "borderWidths"
|
|
621
|
+
};
|
|
622
|
+
config6.borderRightColor = {
|
|
623
|
+
property: "borderRightColor",
|
|
624
|
+
scale: "colors"
|
|
625
|
+
};
|
|
626
|
+
config6.borderRightStyle = {
|
|
627
|
+
property: "borderRightStyle",
|
|
628
|
+
scale: "borderStyles"
|
|
629
|
+
};
|
|
630
|
+
var border = system(config6);
|
|
631
|
+
var index_esm_default6 = border;
|
|
632
|
+
|
|
633
|
+
// ../../node_modules/@styled-system/background/dist/index.esm.js
|
|
634
|
+
var config7 = {
|
|
635
|
+
background: true,
|
|
636
|
+
backgroundImage: true,
|
|
637
|
+
backgroundSize: true,
|
|
638
|
+
backgroundPosition: true,
|
|
639
|
+
backgroundRepeat: true
|
|
640
|
+
};
|
|
641
|
+
config7.bgImage = config7.backgroundImage;
|
|
642
|
+
config7.bgSize = config7.backgroundSize;
|
|
643
|
+
config7.bgPosition = config7.backgroundPosition;
|
|
644
|
+
config7.bgRepeat = config7.backgroundRepeat;
|
|
645
|
+
var background = system(config7);
|
|
646
|
+
var index_esm_default7 = background;
|
|
647
|
+
|
|
648
|
+
// ../../node_modules/@styled-system/position/dist/index.esm.js
|
|
649
|
+
var defaults4 = {
|
|
650
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
651
|
+
};
|
|
652
|
+
var config8 = {
|
|
653
|
+
position: true,
|
|
654
|
+
zIndex: {
|
|
655
|
+
property: "zIndex",
|
|
656
|
+
scale: "zIndices"
|
|
657
|
+
},
|
|
658
|
+
top: {
|
|
659
|
+
property: "top",
|
|
660
|
+
scale: "space",
|
|
661
|
+
defaultScale: defaults4.space
|
|
662
|
+
},
|
|
663
|
+
right: {
|
|
664
|
+
property: "right",
|
|
665
|
+
scale: "space",
|
|
666
|
+
defaultScale: defaults4.space
|
|
667
|
+
},
|
|
668
|
+
bottom: {
|
|
669
|
+
property: "bottom",
|
|
670
|
+
scale: "space",
|
|
671
|
+
defaultScale: defaults4.space
|
|
672
|
+
},
|
|
673
|
+
left: {
|
|
674
|
+
property: "left",
|
|
675
|
+
scale: "space",
|
|
676
|
+
defaultScale: defaults4.space
|
|
677
|
+
}
|
|
678
|
+
};
|
|
679
|
+
var position = system(config8);
|
|
680
|
+
var index_esm_default8 = position;
|
|
681
|
+
|
|
682
|
+
// ../../node_modules/@styled-system/space/dist/index.esm.js
|
|
683
|
+
var defaults5 = {
|
|
684
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
|
|
685
|
+
};
|
|
686
|
+
var isNumber3 = function isNumber4(n) {
|
|
687
|
+
return typeof n === "number" && !isNaN(n);
|
|
688
|
+
};
|
|
689
|
+
var getMargin = function getMargin2(n, scale) {
|
|
690
|
+
if (!isNumber3(n)) {
|
|
691
|
+
return get(scale, n, n);
|
|
692
|
+
}
|
|
693
|
+
var isNegative = n < 0;
|
|
694
|
+
var absolute = Math.abs(n);
|
|
695
|
+
var value = get(scale, absolute, absolute);
|
|
696
|
+
if (!isNumber3(value)) {
|
|
697
|
+
return isNegative ? "-" + value : value;
|
|
698
|
+
}
|
|
699
|
+
return value * (isNegative ? -1 : 1);
|
|
700
|
+
};
|
|
701
|
+
var configs = {};
|
|
702
|
+
configs.margin = {
|
|
703
|
+
margin: {
|
|
704
|
+
property: "margin",
|
|
705
|
+
scale: "space",
|
|
706
|
+
transform: getMargin,
|
|
707
|
+
defaultScale: defaults5.space
|
|
708
|
+
},
|
|
709
|
+
marginTop: {
|
|
710
|
+
property: "marginTop",
|
|
711
|
+
scale: "space",
|
|
712
|
+
transform: getMargin,
|
|
713
|
+
defaultScale: defaults5.space
|
|
714
|
+
},
|
|
715
|
+
marginRight: {
|
|
716
|
+
property: "marginRight",
|
|
717
|
+
scale: "space",
|
|
718
|
+
transform: getMargin,
|
|
719
|
+
defaultScale: defaults5.space
|
|
720
|
+
},
|
|
721
|
+
marginBottom: {
|
|
722
|
+
property: "marginBottom",
|
|
723
|
+
scale: "space",
|
|
724
|
+
transform: getMargin,
|
|
725
|
+
defaultScale: defaults5.space
|
|
726
|
+
},
|
|
727
|
+
marginLeft: {
|
|
728
|
+
property: "marginLeft",
|
|
729
|
+
scale: "space",
|
|
730
|
+
transform: getMargin,
|
|
731
|
+
defaultScale: defaults5.space
|
|
732
|
+
},
|
|
733
|
+
marginX: {
|
|
734
|
+
properties: ["marginLeft", "marginRight"],
|
|
735
|
+
scale: "space",
|
|
736
|
+
transform: getMargin,
|
|
737
|
+
defaultScale: defaults5.space
|
|
738
|
+
},
|
|
739
|
+
marginY: {
|
|
740
|
+
properties: ["marginTop", "marginBottom"],
|
|
741
|
+
scale: "space",
|
|
742
|
+
transform: getMargin,
|
|
743
|
+
defaultScale: defaults5.space
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
configs.margin.m = configs.margin.margin;
|
|
747
|
+
configs.margin.mt = configs.margin.marginTop;
|
|
748
|
+
configs.margin.mr = configs.margin.marginRight;
|
|
749
|
+
configs.margin.mb = configs.margin.marginBottom;
|
|
750
|
+
configs.margin.ml = configs.margin.marginLeft;
|
|
751
|
+
configs.margin.mx = configs.margin.marginX;
|
|
752
|
+
configs.margin.my = configs.margin.marginY;
|
|
753
|
+
configs.padding = {
|
|
754
|
+
padding: {
|
|
755
|
+
property: "padding",
|
|
756
|
+
scale: "space",
|
|
757
|
+
defaultScale: defaults5.space
|
|
758
|
+
},
|
|
759
|
+
paddingTop: {
|
|
760
|
+
property: "paddingTop",
|
|
761
|
+
scale: "space",
|
|
762
|
+
defaultScale: defaults5.space
|
|
763
|
+
},
|
|
764
|
+
paddingRight: {
|
|
765
|
+
property: "paddingRight",
|
|
766
|
+
scale: "space",
|
|
767
|
+
defaultScale: defaults5.space
|
|
768
|
+
},
|
|
769
|
+
paddingBottom: {
|
|
770
|
+
property: "paddingBottom",
|
|
771
|
+
scale: "space",
|
|
772
|
+
defaultScale: defaults5.space
|
|
773
|
+
},
|
|
774
|
+
paddingLeft: {
|
|
775
|
+
property: "paddingLeft",
|
|
776
|
+
scale: "space",
|
|
777
|
+
defaultScale: defaults5.space
|
|
778
|
+
},
|
|
779
|
+
paddingX: {
|
|
780
|
+
properties: ["paddingLeft", "paddingRight"],
|
|
781
|
+
scale: "space",
|
|
782
|
+
defaultScale: defaults5.space
|
|
783
|
+
},
|
|
784
|
+
paddingY: {
|
|
785
|
+
properties: ["paddingTop", "paddingBottom"],
|
|
786
|
+
scale: "space",
|
|
787
|
+
defaultScale: defaults5.space
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
configs.padding.p = configs.padding.padding;
|
|
791
|
+
configs.padding.pt = configs.padding.paddingTop;
|
|
792
|
+
configs.padding.pr = configs.padding.paddingRight;
|
|
793
|
+
configs.padding.pb = configs.padding.paddingBottom;
|
|
794
|
+
configs.padding.pl = configs.padding.paddingLeft;
|
|
795
|
+
configs.padding.px = configs.padding.paddingX;
|
|
796
|
+
configs.padding.py = configs.padding.paddingY;
|
|
797
|
+
var margin = system(configs.margin);
|
|
798
|
+
var padding = system(configs.padding);
|
|
799
|
+
var space = compose(margin, padding);
|
|
800
|
+
|
|
801
|
+
// ../../node_modules/@styled-system/shadow/dist/index.esm.js
|
|
802
|
+
var shadow = system({
|
|
803
|
+
boxShadow: {
|
|
804
|
+
property: "boxShadow",
|
|
805
|
+
scale: "shadows"
|
|
806
|
+
},
|
|
807
|
+
textShadow: {
|
|
808
|
+
property: "textShadow",
|
|
809
|
+
scale: "shadows"
|
|
810
|
+
}
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
// ../../node_modules/@styled-system/css/dist/index.esm.js
|
|
814
|
+
function _extends() {
|
|
815
|
+
_extends = Object.assign || function(target) {
|
|
816
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
817
|
+
var source = arguments[i];
|
|
818
|
+
for (var key in source) {
|
|
819
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
820
|
+
target[key] = source[key];
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
return target;
|
|
825
|
+
};
|
|
826
|
+
return _extends.apply(this, arguments);
|
|
827
|
+
}
|
|
828
|
+
var get3 = function get4(obj, key, def, p, undef) {
|
|
829
|
+
key = key && key.split ? key.split(".") : [key];
|
|
830
|
+
for (p = 0; p < key.length; p++) {
|
|
831
|
+
obj = obj ? obj[key[p]] : undef;
|
|
832
|
+
}
|
|
833
|
+
return obj === undef ? def : obj;
|
|
834
|
+
};
|
|
835
|
+
var defaultBreakpoints = [40, 52, 64].map(function(n) {
|
|
836
|
+
return n + "em";
|
|
837
|
+
});
|
|
838
|
+
var defaultTheme = {
|
|
839
|
+
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
840
|
+
fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
|
|
841
|
+
};
|
|
842
|
+
var aliases = {
|
|
843
|
+
bg: "backgroundColor",
|
|
844
|
+
m: "margin",
|
|
845
|
+
mt: "marginTop",
|
|
846
|
+
mr: "marginRight",
|
|
847
|
+
mb: "marginBottom",
|
|
848
|
+
ml: "marginLeft",
|
|
849
|
+
mx: "marginX",
|
|
850
|
+
my: "marginY",
|
|
851
|
+
p: "padding",
|
|
852
|
+
pt: "paddingTop",
|
|
853
|
+
pr: "paddingRight",
|
|
854
|
+
pb: "paddingBottom",
|
|
855
|
+
pl: "paddingLeft",
|
|
856
|
+
px: "paddingX",
|
|
857
|
+
py: "paddingY"
|
|
858
|
+
};
|
|
859
|
+
var multiples = {
|
|
860
|
+
marginX: ["marginLeft", "marginRight"],
|
|
861
|
+
marginY: ["marginTop", "marginBottom"],
|
|
862
|
+
paddingX: ["paddingLeft", "paddingRight"],
|
|
863
|
+
paddingY: ["paddingTop", "paddingBottom"],
|
|
864
|
+
size: ["width", "height"]
|
|
865
|
+
};
|
|
866
|
+
var scales = {
|
|
867
|
+
color: "colors",
|
|
868
|
+
backgroundColor: "colors",
|
|
869
|
+
borderColor: "colors",
|
|
870
|
+
margin: "space",
|
|
871
|
+
marginTop: "space",
|
|
872
|
+
marginRight: "space",
|
|
873
|
+
marginBottom: "space",
|
|
874
|
+
marginLeft: "space",
|
|
875
|
+
marginX: "space",
|
|
876
|
+
marginY: "space",
|
|
877
|
+
padding: "space",
|
|
878
|
+
paddingTop: "space",
|
|
879
|
+
paddingRight: "space",
|
|
880
|
+
paddingBottom: "space",
|
|
881
|
+
paddingLeft: "space",
|
|
882
|
+
paddingX: "space",
|
|
883
|
+
paddingY: "space",
|
|
884
|
+
top: "space",
|
|
885
|
+
right: "space",
|
|
886
|
+
bottom: "space",
|
|
887
|
+
left: "space",
|
|
888
|
+
gridGap: "space",
|
|
889
|
+
gridColumnGap: "space",
|
|
890
|
+
gridRowGap: "space",
|
|
891
|
+
gap: "space",
|
|
892
|
+
columnGap: "space",
|
|
893
|
+
rowGap: "space",
|
|
894
|
+
fontFamily: "fonts",
|
|
895
|
+
fontSize: "fontSizes",
|
|
896
|
+
fontWeight: "fontWeights",
|
|
897
|
+
lineHeight: "lineHeights",
|
|
898
|
+
letterSpacing: "letterSpacings",
|
|
899
|
+
border: "borders",
|
|
900
|
+
borderTop: "borders",
|
|
901
|
+
borderRight: "borders",
|
|
902
|
+
borderBottom: "borders",
|
|
903
|
+
borderLeft: "borders",
|
|
904
|
+
borderWidth: "borderWidths",
|
|
905
|
+
borderStyle: "borderStyles",
|
|
906
|
+
borderRadius: "radii",
|
|
907
|
+
borderTopRightRadius: "radii",
|
|
908
|
+
borderTopLeftRadius: "radii",
|
|
909
|
+
borderBottomRightRadius: "radii",
|
|
910
|
+
borderBottomLeftRadius: "radii",
|
|
911
|
+
borderTopWidth: "borderWidths",
|
|
912
|
+
borderTopColor: "colors",
|
|
913
|
+
borderTopStyle: "borderStyles",
|
|
914
|
+
borderBottomWidth: "borderWidths",
|
|
915
|
+
borderBottomColor: "colors",
|
|
916
|
+
borderBottomStyle: "borderStyles",
|
|
917
|
+
borderLeftWidth: "borderWidths",
|
|
918
|
+
borderLeftColor: "colors",
|
|
919
|
+
borderLeftStyle: "borderStyles",
|
|
920
|
+
borderRightWidth: "borderWidths",
|
|
921
|
+
borderRightColor: "colors",
|
|
922
|
+
borderRightStyle: "borderStyles",
|
|
923
|
+
outlineColor: "colors",
|
|
924
|
+
boxShadow: "shadows",
|
|
925
|
+
textShadow: "shadows",
|
|
926
|
+
zIndex: "zIndices",
|
|
927
|
+
width: "sizes",
|
|
928
|
+
minWidth: "sizes",
|
|
929
|
+
maxWidth: "sizes",
|
|
930
|
+
height: "sizes",
|
|
931
|
+
minHeight: "sizes",
|
|
932
|
+
maxHeight: "sizes",
|
|
933
|
+
flexBasis: "sizes",
|
|
934
|
+
size: "sizes",
|
|
935
|
+
// svg
|
|
936
|
+
fill: "colors",
|
|
937
|
+
stroke: "colors"
|
|
938
|
+
};
|
|
939
|
+
var positiveOrNegative = function positiveOrNegative2(scale, value) {
|
|
940
|
+
if (typeof value !== "number" || value >= 0) {
|
|
941
|
+
return get3(scale, value, value);
|
|
942
|
+
}
|
|
943
|
+
var absolute = Math.abs(value);
|
|
944
|
+
var n = get3(scale, absolute, absolute);
|
|
945
|
+
if (typeof n === "string") return "-" + n;
|
|
946
|
+
return n * -1;
|
|
947
|
+
};
|
|
948
|
+
var transforms = ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "top", "bottom", "left", "right"].reduce(function(acc, curr) {
|
|
949
|
+
var _extends2;
|
|
950
|
+
return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
|
|
951
|
+
}, {});
|
|
952
|
+
var responsive = function responsive2(styles) {
|
|
953
|
+
return function(theme) {
|
|
954
|
+
var next = {};
|
|
955
|
+
var breakpoints = get3(theme, "breakpoints", defaultBreakpoints);
|
|
956
|
+
var mediaQueries = [null].concat(breakpoints.map(function(n) {
|
|
957
|
+
return "@media screen and (min-width: " + n + ")";
|
|
958
|
+
}));
|
|
959
|
+
for (var key in styles) {
|
|
960
|
+
var value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
|
|
961
|
+
if (value == null) continue;
|
|
962
|
+
if (!Array.isArray(value)) {
|
|
963
|
+
next[key] = value;
|
|
964
|
+
continue;
|
|
965
|
+
}
|
|
966
|
+
for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
|
|
967
|
+
var media = mediaQueries[i];
|
|
968
|
+
if (!media) {
|
|
969
|
+
next[key] = value[i];
|
|
970
|
+
continue;
|
|
971
|
+
}
|
|
972
|
+
next[media] = next[media] || {};
|
|
973
|
+
if (value[i] == null) continue;
|
|
974
|
+
next[media][key] = value[i];
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
return next;
|
|
978
|
+
};
|
|
979
|
+
};
|
|
980
|
+
var css = function css2(args) {
|
|
981
|
+
return function(props) {
|
|
982
|
+
if (props === void 0) {
|
|
983
|
+
props = {};
|
|
984
|
+
}
|
|
985
|
+
var theme = _extends({}, defaultTheme, {}, props.theme || props);
|
|
986
|
+
var result = {};
|
|
987
|
+
var obj = typeof args === "function" ? args(theme) : args;
|
|
988
|
+
var styles = responsive(obj)(theme);
|
|
989
|
+
for (var key in styles) {
|
|
990
|
+
var x = styles[key];
|
|
991
|
+
var val = typeof x === "function" ? x(theme) : x;
|
|
992
|
+
if (key === "variant") {
|
|
993
|
+
var variant3 = css2(get3(theme, val))(theme);
|
|
994
|
+
result = _extends({}, result, {}, variant3);
|
|
995
|
+
continue;
|
|
996
|
+
}
|
|
997
|
+
if (val && typeof val === "object") {
|
|
998
|
+
result[key] = css2(val)(theme);
|
|
999
|
+
continue;
|
|
1000
|
+
}
|
|
1001
|
+
var prop = get3(aliases, key, key);
|
|
1002
|
+
var scaleName = get3(scales, prop);
|
|
1003
|
+
var scale = get3(theme, scaleName, get3(theme, prop, {}));
|
|
1004
|
+
var transform = get3(transforms, prop, get3);
|
|
1005
|
+
var value = transform(scale, val, val);
|
|
1006
|
+
if (multiples[prop]) {
|
|
1007
|
+
var dirs = multiples[prop];
|
|
1008
|
+
for (var i = 0; i < dirs.length; i++) {
|
|
1009
|
+
result[dirs[i]] = value;
|
|
1010
|
+
}
|
|
1011
|
+
} else {
|
|
1012
|
+
result[prop] = value;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
return result;
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
var index_esm_default9 = css;
|
|
1019
|
+
|
|
1020
|
+
// ../../node_modules/@styled-system/variant/dist/index.esm.js
|
|
1021
|
+
var variant = function variant2(_ref) {
|
|
1022
|
+
var _config;
|
|
1023
|
+
var scale = _ref.scale, _ref$prop = _ref.prop, prop = _ref$prop === void 0 ? "variant" : _ref$prop, _ref$variants = _ref.variants, variants = _ref$variants === void 0 ? {} : _ref$variants, key = _ref.key;
|
|
1024
|
+
var sx;
|
|
1025
|
+
if (Object.keys(variants).length) {
|
|
1026
|
+
sx = function sx2(value, scale2, props) {
|
|
1027
|
+
return index_esm_default9(get(scale2, value, null))(props.theme);
|
|
1028
|
+
};
|
|
1029
|
+
} else {
|
|
1030
|
+
sx = function sx2(value, scale2) {
|
|
1031
|
+
return get(scale2, value, null);
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
sx.scale = scale || key;
|
|
1035
|
+
sx.defaults = variants;
|
|
1036
|
+
var config9 = (_config = {}, _config[prop] = sx, _config);
|
|
1037
|
+
var parser = createParser(config9);
|
|
1038
|
+
return parser;
|
|
1039
|
+
};
|
|
1040
|
+
var buttonStyle = variant({
|
|
1041
|
+
key: "buttons"
|
|
1042
|
+
});
|
|
1043
|
+
var textStyle = variant({
|
|
1044
|
+
key: "textStyles",
|
|
1045
|
+
prop: "textStyle"
|
|
1046
|
+
});
|
|
1047
|
+
var colorStyle = variant({
|
|
1048
|
+
key: "colorStyles",
|
|
1049
|
+
prop: "colors"
|
|
1050
|
+
});
|
|
1051
|
+
|
|
1052
|
+
// ../../node_modules/styled-system/dist/index.esm.js
|
|
1053
|
+
var width = index_esm_default.width;
|
|
1054
|
+
var height = index_esm_default.height;
|
|
1055
|
+
var minWidth = index_esm_default.minWidth;
|
|
1056
|
+
var minHeight = index_esm_default.minHeight;
|
|
1057
|
+
var maxWidth = index_esm_default.maxWidth;
|
|
1058
|
+
var maxHeight = index_esm_default.maxHeight;
|
|
1059
|
+
var size = index_esm_default.size;
|
|
1060
|
+
var verticalAlign = index_esm_default.verticalAlign;
|
|
1061
|
+
var display = index_esm_default.display;
|
|
1062
|
+
var overflow = index_esm_default.overflow;
|
|
1063
|
+
var overflowX = index_esm_default.overflowX;
|
|
1064
|
+
var overflowY = index_esm_default.overflowY;
|
|
1065
|
+
var opacity = index_esm_default2.opacity;
|
|
1066
|
+
var fontSize = index_esm_default3.fontSize;
|
|
1067
|
+
var fontFamily = index_esm_default3.fontFamily;
|
|
1068
|
+
var fontWeight = index_esm_default3.fontWeight;
|
|
1069
|
+
var lineHeight = index_esm_default3.lineHeight;
|
|
1070
|
+
var textAlign = index_esm_default3.textAlign;
|
|
1071
|
+
var fontStyle = index_esm_default3.fontStyle;
|
|
1072
|
+
var letterSpacing = index_esm_default3.letterSpacing;
|
|
1073
|
+
var alignItems = index_esm_default4.alignItems;
|
|
1074
|
+
var alignContent = index_esm_default4.alignContent;
|
|
1075
|
+
var justifyItems = index_esm_default4.justifyItems;
|
|
1076
|
+
var justifyContent = index_esm_default4.justifyContent;
|
|
1077
|
+
var flexWrap = index_esm_default4.flexWrap;
|
|
1078
|
+
var flexDirection = index_esm_default4.flexDirection;
|
|
1079
|
+
var flex = index_esm_default4.flex;
|
|
1080
|
+
var flexGrow = index_esm_default4.flexGrow;
|
|
1081
|
+
var flexShrink = index_esm_default4.flexShrink;
|
|
1082
|
+
var flexBasis = index_esm_default4.flexBasis;
|
|
1083
|
+
var justifySelf = index_esm_default4.justifySelf;
|
|
1084
|
+
var alignSelf = index_esm_default4.alignSelf;
|
|
1085
|
+
var order = index_esm_default4.order;
|
|
1086
|
+
var gridGap = index_esm_default5.gridGap;
|
|
1087
|
+
var gridColumnGap = index_esm_default5.gridColumnGap;
|
|
1088
|
+
var gridRowGap = index_esm_default5.gridRowGap;
|
|
1089
|
+
var gridColumn = index_esm_default5.gridColumn;
|
|
1090
|
+
var gridRow = index_esm_default5.gridRow;
|
|
1091
|
+
var gridAutoFlow = index_esm_default5.gridAutoFlow;
|
|
1092
|
+
var gridAutoColumns = index_esm_default5.gridAutoColumns;
|
|
1093
|
+
var gridAutoRows = index_esm_default5.gridAutoRows;
|
|
1094
|
+
var gridTemplateColumns = index_esm_default5.gridTemplateColumns;
|
|
1095
|
+
var gridTemplateRows = index_esm_default5.gridTemplateRows;
|
|
1096
|
+
var gridTemplateAreas = index_esm_default5.gridTemplateAreas;
|
|
1097
|
+
var gridArea = index_esm_default5.gridArea;
|
|
1098
|
+
var borderWidth = index_esm_default6.borderWidth;
|
|
1099
|
+
var borderStyle = index_esm_default6.borderStyle;
|
|
1100
|
+
var borderColor = index_esm_default6.borderColor;
|
|
1101
|
+
var borderTop = index_esm_default6.borderTop;
|
|
1102
|
+
var borderRight = index_esm_default6.borderRight;
|
|
1103
|
+
var borderBottom = index_esm_default6.borderBottom;
|
|
1104
|
+
var borderLeft = index_esm_default6.borderLeft;
|
|
1105
|
+
var borderRadius = index_esm_default6.borderRadius;
|
|
1106
|
+
var backgroundImage = index_esm_default7.backgroundImage;
|
|
1107
|
+
var backgroundSize = index_esm_default7.backgroundSize;
|
|
1108
|
+
var backgroundPosition = index_esm_default7.backgroundPosition;
|
|
1109
|
+
var backgroundRepeat = index_esm_default7.backgroundRepeat;
|
|
1110
|
+
var zIndex = index_esm_default8.zIndex;
|
|
1111
|
+
var top = index_esm_default8.top;
|
|
1112
|
+
var right = index_esm_default8.right;
|
|
1113
|
+
var bottom = index_esm_default8.bottom;
|
|
1114
|
+
var left = index_esm_default8.left;
|
|
1115
|
+
|
|
1116
|
+
// src/styles.ts
|
|
114
1117
|
var import_seeds_react_system_props2 = require("@sproutsocial/seeds-react-system-props");
|
|
115
1118
|
var StyledAccordionItem = (0, import_styled_components.default)(RadixAccordion2.Item)``;
|
|
116
1119
|
var animations = import_styled_components.css`
|
|
@@ -147,7 +1150,6 @@ var StyledRadixAccordionTrigger = (0, import_styled_components.default)(
|
|
|
147
1150
|
${({ theme }) => theme.typography[200]};
|
|
148
1151
|
|
|
149
1152
|
.triggerIcon {
|
|
150
|
-
color: ${({ theme }) => theme.colors.icon.base};
|
|
151
1153
|
transition: transform 300ms ease-in-out;
|
|
152
1154
|
}
|
|
153
1155
|
|
|
@@ -205,10 +1207,10 @@ var ContentContainer = import_styled_components.default.div`
|
|
|
205
1207
|
color: ${({ theme }) => theme.colors.text.body};
|
|
206
1208
|
background: transparent;
|
|
207
1209
|
font-family: ${({ theme }) => theme.fontFamily};
|
|
208
|
-
${({ theme }) => theme.typography[200]};
|
|
209
1210
|
|
|
210
1211
|
&[data-styled="true"] {
|
|
211
1212
|
padding: ${({ theme }) => theme.space[400]};
|
|
1213
|
+
${({ theme }) => theme.typography[200]};
|
|
212
1214
|
}
|
|
213
1215
|
|
|
214
1216
|
.accordion-item:last-child[data-state="open"] &[data-styled="true"],
|
|
@@ -218,6 +1220,7 @@ var ContentContainer = import_styled_components.default.div`
|
|
|
218
1220
|
}
|
|
219
1221
|
|
|
220
1222
|
${import_seeds_react_system_props2.COMMON}
|
|
1223
|
+
${import_seeds_react_system_props2.TYPOGRAPHY}
|
|
221
1224
|
${import_seeds_react_system_props2.BORDER}
|
|
222
1225
|
${import_seeds_react_system_props2.LAYOUT}
|
|
223
1226
|
${import_seeds_react_system_props2.FLEXBOX}
|
|
@@ -264,16 +1267,17 @@ var TriggerContainer = import_styled_components.default.div`
|
|
|
264
1267
|
`;
|
|
265
1268
|
var TitleStyles = import_styled_components.default.h4`
|
|
266
1269
|
margin: 0;
|
|
267
|
-
font-size: ${({ theme }) => theme.fontSizes[200]};
|
|
268
1270
|
font-weight: normal;
|
|
269
1271
|
|
|
270
1272
|
&[data-styled="true"] {
|
|
1273
|
+
font-size: ${({ theme }) => theme.fontSizes[200]};
|
|
271
1274
|
font-weight: ${({ theme }) => theme.fontWeights.semibold};
|
|
272
1275
|
color: ${({ theme }) => theme.colors.text.headline};
|
|
273
1276
|
}
|
|
274
1277
|
|
|
275
1278
|
${import_seeds_react_system_props2.COMMON}
|
|
276
1279
|
${import_seeds_react_system_props2.TYPOGRAPHY}
|
|
1280
|
+
${fontSize}
|
|
277
1281
|
`;
|
|
278
1282
|
|
|
279
1283
|
// src/AccordionItem.tsx
|
|
@@ -313,8 +1317,8 @@ var AccordionTrigger = ({
|
|
|
313
1317
|
const { triggerIcon, triggerPosition, styled: styled2 } = (0, import_react3.useContext)(AccordionContext);
|
|
314
1318
|
const validatedActions = relatedActions?.slice(0, MAX_RELATED_ACTIONS);
|
|
315
1319
|
const {
|
|
316
|
-
color,
|
|
317
|
-
padding,
|
|
1320
|
+
color: color2,
|
|
1321
|
+
padding: padding2,
|
|
318
1322
|
paddingBottom,
|
|
319
1323
|
paddingTop,
|
|
320
1324
|
paddingX,
|
|
@@ -328,15 +1332,16 @@ var AccordionTrigger = ({
|
|
|
328
1332
|
pl,
|
|
329
1333
|
px,
|
|
330
1334
|
py,
|
|
331
|
-
fontFamily,
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
1335
|
+
fontFamily: fontFamily2,
|
|
1336
|
+
fontSize: fontSize2,
|
|
1337
|
+
fontStyle: fontStyle2,
|
|
1338
|
+
fontWeight: fontWeight2,
|
|
1339
|
+
lineHeight: lineHeight2,
|
|
1340
|
+
textAlign: textAlign2,
|
|
336
1341
|
...triggerProps
|
|
337
1342
|
} = rest;
|
|
338
1343
|
const spacingProps = {
|
|
339
|
-
padding,
|
|
1344
|
+
padding: padding2,
|
|
340
1345
|
paddingBottom,
|
|
341
1346
|
paddingTop,
|
|
342
1347
|
paddingX,
|
|
@@ -353,12 +1358,13 @@ var AccordionTrigger = ({
|
|
|
353
1358
|
};
|
|
354
1359
|
const typographyProps = Object.fromEntries(
|
|
355
1360
|
Object.entries({
|
|
356
|
-
color,
|
|
357
|
-
fontFamily,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
1361
|
+
color: color2,
|
|
1362
|
+
fontFamily: fontFamily2,
|
|
1363
|
+
fontSize: fontSize2,
|
|
1364
|
+
fontStyle: fontStyle2,
|
|
1365
|
+
fontWeight: fontWeight2,
|
|
1366
|
+
lineHeight: lineHeight2,
|
|
1367
|
+
textAlign: textAlign2
|
|
362
1368
|
}).filter(([_, value]) => value != null)
|
|
363
1369
|
);
|
|
364
1370
|
const renderedOverflowMenu = overflowMenu && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
@@ -369,7 +1375,14 @@ var AccordionTrigger = ({
|
|
|
369
1375
|
{
|
|
370
1376
|
"aria-label": overflowMenu["aria-label"],
|
|
371
1377
|
appearance: "unstyled",
|
|
372
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1378
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
1379
|
+
import_seeds_react_icon3.Icon,
|
|
1380
|
+
{
|
|
1381
|
+
name: "ellipsis-horizontal-outline",
|
|
1382
|
+
"aria-hidden": "true",
|
|
1383
|
+
color: color2
|
|
1384
|
+
}
|
|
1385
|
+
)
|
|
373
1386
|
}
|
|
374
1387
|
),
|
|
375
1388
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_menu2.MenuContent, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_menu2.MenuGroup, { id: "overflow-actions", children: overflowMenu.items.map((item, index) => {
|
|
@@ -380,10 +1393,19 @@ var AccordionTrigger = ({
|
|
|
380
1393
|
id: id || `overflow-item-${index}`,
|
|
381
1394
|
onClick,
|
|
382
1395
|
...menuItemProps,
|
|
383
|
-
children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
1396
|
+
children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
1397
|
+
import_seeds_react_box.Box,
|
|
1398
|
+
{
|
|
1399
|
+
display: "flex",
|
|
1400
|
+
alignItems: "center",
|
|
1401
|
+
gap: "300",
|
|
1402
|
+
color: color2,
|
|
1403
|
+
children: [
|
|
1404
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_icon3.Icon, { name: iconName, color: color2 }),
|
|
1405
|
+
children2
|
|
1406
|
+
]
|
|
1407
|
+
}
|
|
1408
|
+
) : children2
|
|
387
1409
|
},
|
|
388
1410
|
id || `overflow-item-${index}`
|
|
389
1411
|
);
|
|
@@ -395,7 +1417,7 @@ var AccordionTrigger = ({
|
|
|
395
1417
|
{
|
|
396
1418
|
onClick: action.onClick,
|
|
397
1419
|
"aria-label": action["aria-label"],
|
|
398
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_icon3.Icon, { name: action.iconName, "aria-hidden": "true" })
|
|
1420
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_seeds_react_icon3.Icon, { name: action.iconName, color: color2, "aria-hidden": "true" })
|
|
399
1421
|
},
|
|
400
1422
|
`${action.iconName}-${index}`
|
|
401
1423
|
)) });
|
|
@@ -428,4 +1450,13 @@ var AccordionTrigger = ({
|
|
|
428
1450
|
AccordionItem,
|
|
429
1451
|
AccordionTrigger
|
|
430
1452
|
});
|
|
1453
|
+
/*! Bundled license information:
|
|
1454
|
+
|
|
1455
|
+
object-assign/index.js:
|
|
1456
|
+
(*
|
|
1457
|
+
object-assign
|
|
1458
|
+
(c) Sindre Sorhus
|
|
1459
|
+
@license MIT
|
|
1460
|
+
*)
|
|
1461
|
+
*/
|
|
431
1462
|
//# sourceMappingURL=index.js.map
|