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