@sproutsocial/seeds-react-card 1.1.10 → 1.1.13

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/esm/index.js CHANGED
@@ -1,1034 +1,18 @@
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
-
97
1
  // src/Card.tsx
98
2
  import { useRef, useState } from "react";
99
3
 
100
4
  // src/styles.tsx
101
5
  import styled from "styled-components";
102
-
103
- // ../../node_modules/@styled-system/core/dist/index.esm.js
104
- var import_object_assign = __toESM(require_object_assign());
105
- var merge = function merge2(a, b) {
106
- var result = (0, import_object_assign.default)({}, a, b);
107
- for (var key in a) {
108
- var _assign;
109
- if (!a[key] || typeof b[key] !== "object") continue;
110
- (0, import_object_assign.default)(result, (_assign = {}, _assign[key] = (0, import_object_assign.default)(a[key], b[key]), _assign));
111
- }
112
- return result;
113
- };
114
- var sort = function sort2(obj) {
115
- var next = {};
116
- Object.keys(obj).sort(function(a, b) {
117
- return a.localeCompare(b, void 0, {
118
- numeric: true,
119
- sensitivity: "base"
120
- });
121
- }).forEach(function(key) {
122
- next[key] = obj[key];
123
- });
124
- return next;
125
- };
126
- var defaults = {
127
- breakpoints: [40, 52, 64].map(function(n) {
128
- return n + "em";
129
- })
130
- };
131
- var createMediaQuery = function createMediaQuery2(n) {
132
- return "@media screen and (min-width: " + n + ")";
133
- };
134
- var getValue = function getValue2(n, scale) {
135
- return get(scale, n, n);
136
- };
137
- var get = function get2(obj, key, def, p, undef) {
138
- key = key && key.split ? key.split(".") : [key];
139
- for (p = 0; p < key.length; p++) {
140
- obj = obj ? obj[key[p]] : undef;
141
- }
142
- return obj === undef ? def : obj;
143
- };
144
- var createParser = function createParser2(config9) {
145
- var cache = {};
146
- var parse = function parse2(props) {
147
- var styles = {};
148
- var shouldSort = false;
149
- var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
150
- for (var key in props) {
151
- if (!config9[key]) continue;
152
- var sx = config9[key];
153
- var raw = props[key];
154
- var scale = get(props.theme, sx.scale, sx.defaults);
155
- if (typeof raw === "object") {
156
- cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
157
- if (Array.isArray(raw)) {
158
- cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
159
- styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
160
- continue;
161
- }
162
- if (raw !== null) {
163
- styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
164
- shouldSort = true;
165
- }
166
- continue;
167
- }
168
- (0, import_object_assign.default)(styles, sx(raw, scale, props));
169
- }
170
- if (shouldSort) {
171
- styles = sort(styles);
172
- }
173
- return styles;
174
- };
175
- parse.config = config9;
176
- parse.propNames = Object.keys(config9);
177
- parse.cache = cache;
178
- var keys = Object.keys(config9).filter(function(k) {
179
- return k !== "config";
180
- });
181
- if (keys.length > 1) {
182
- keys.forEach(function(key) {
183
- var _createParser;
184
- parse[key] = createParser2((_createParser = {}, _createParser[key] = config9[key], _createParser));
185
- });
186
- }
187
- return parse;
188
- };
189
- var parseResponsiveStyle = function parseResponsiveStyle2(mediaQueries, sx, scale, raw, _props) {
190
- var styles = {};
191
- raw.slice(0, mediaQueries.length).forEach(function(value, i) {
192
- var media = mediaQueries[i];
193
- var style = sx(value, scale, _props);
194
- if (!media) {
195
- (0, import_object_assign.default)(styles, style);
196
- } else {
197
- var _assign2;
198
- (0, import_object_assign.default)(styles, (_assign2 = {}, _assign2[media] = (0, import_object_assign.default)({}, styles[media], style), _assign2));
199
- }
200
- });
201
- return styles;
202
- };
203
- var parseResponsiveObject = function parseResponsiveObject2(breakpoints, sx, scale, raw, _props) {
204
- var styles = {};
205
- for (var key in raw) {
206
- var breakpoint = breakpoints[key];
207
- var value = raw[key];
208
- var style = sx(value, scale, _props);
209
- if (!breakpoint) {
210
- (0, import_object_assign.default)(styles, style);
211
- } else {
212
- var _assign3;
213
- var media = createMediaQuery(breakpoint);
214
- (0, import_object_assign.default)(styles, (_assign3 = {}, _assign3[media] = (0, import_object_assign.default)({}, styles[media], style), _assign3));
215
- }
216
- }
217
- return styles;
218
- };
219
- var createStyleFunction = function createStyleFunction2(_ref) {
220
- 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;
221
- properties = properties || [property];
222
- var sx = function sx2(value, scale2, _props) {
223
- var result = {};
224
- var n = transform(value, scale2, _props);
225
- if (n === null) return;
226
- properties.forEach(function(prop) {
227
- result[prop] = n;
228
- });
229
- return result;
230
- };
231
- sx.scale = scale;
232
- sx.defaults = defaultScale;
233
- return sx;
234
- };
235
- var system = function system2(args) {
236
- if (args === void 0) {
237
- args = {};
238
- }
239
- var config9 = {};
240
- Object.keys(args).forEach(function(key) {
241
- var conf = args[key];
242
- if (conf === true) {
243
- config9[key] = createStyleFunction({
244
- property: key,
245
- scale: key
246
- });
247
- return;
248
- }
249
- if (typeof conf === "function") {
250
- config9[key] = conf;
251
- return;
252
- }
253
- config9[key] = createStyleFunction(conf);
254
- });
255
- var parser = createParser(config9);
256
- return parser;
257
- };
258
- var compose = function compose2() {
259
- var config9 = {};
260
- for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
261
- parsers[_key] = arguments[_key];
262
- }
263
- parsers.forEach(function(parser2) {
264
- if (!parser2 || !parser2.config) return;
265
- (0, import_object_assign.default)(config9, parser2.config);
266
- });
267
- var parser = createParser(config9);
268
- return parser;
269
- };
270
-
271
- // ../../node_modules/@styled-system/layout/dist/index.esm.js
272
- var isNumber = function isNumber2(n) {
273
- return typeof n === "number" && !isNaN(n);
274
- };
275
- var getWidth = function getWidth2(n, scale) {
276
- return get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
277
- };
278
- var config = {
279
- width: {
280
- property: "width",
281
- scale: "sizes",
282
- transform: getWidth
283
- },
284
- height: {
285
- property: "height",
286
- scale: "sizes"
287
- },
288
- minWidth: {
289
- property: "minWidth",
290
- scale: "sizes"
291
- },
292
- minHeight: {
293
- property: "minHeight",
294
- scale: "sizes"
295
- },
296
- maxWidth: {
297
- property: "maxWidth",
298
- scale: "sizes"
299
- },
300
- maxHeight: {
301
- property: "maxHeight",
302
- scale: "sizes"
303
- },
304
- size: {
305
- properties: ["width", "height"],
306
- scale: "sizes"
307
- },
308
- overflow: true,
309
- overflowX: true,
310
- overflowY: true,
311
- display: true,
312
- verticalAlign: true
313
- };
314
- var layout = system(config);
315
- var index_esm_default = layout;
316
-
317
- // ../../node_modules/@styled-system/color/dist/index.esm.js
318
- var config2 = {
319
- color: {
320
- property: "color",
321
- scale: "colors"
322
- },
323
- backgroundColor: {
324
- property: "backgroundColor",
325
- scale: "colors"
326
- },
327
- opacity: true
328
- };
329
- config2.bg = config2.backgroundColor;
330
- var color = system(config2);
331
- var index_esm_default2 = color;
332
-
333
- // ../../node_modules/@styled-system/typography/dist/index.esm.js
334
- var defaults2 = {
335
- fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
336
- };
337
- var config3 = {
338
- fontFamily: {
339
- property: "fontFamily",
340
- scale: "fonts"
341
- },
342
- fontSize: {
343
- property: "fontSize",
344
- scale: "fontSizes",
345
- defaultScale: defaults2.fontSizes
346
- },
347
- fontWeight: {
348
- property: "fontWeight",
349
- scale: "fontWeights"
350
- },
351
- lineHeight: {
352
- property: "lineHeight",
353
- scale: "lineHeights"
354
- },
355
- letterSpacing: {
356
- property: "letterSpacing",
357
- scale: "letterSpacings"
358
- },
359
- textAlign: true,
360
- fontStyle: true
361
- };
362
- var typography = system(config3);
363
- var index_esm_default3 = typography;
364
-
365
- // ../../node_modules/@styled-system/flexbox/dist/index.esm.js
366
- var config4 = {
367
- alignItems: true,
368
- alignContent: true,
369
- justifyItems: true,
370
- justifyContent: true,
371
- flexWrap: true,
372
- flexDirection: true,
373
- // item
374
- flex: true,
375
- flexGrow: true,
376
- flexShrink: true,
377
- flexBasis: true,
378
- justifySelf: true,
379
- alignSelf: true,
380
- order: true
381
- };
382
- var flexbox = system(config4);
383
- var index_esm_default4 = flexbox;
384
-
385
- // ../../node_modules/@styled-system/grid/dist/index.esm.js
386
- var defaults3 = {
387
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
388
- };
389
- var config5 = {
390
- gridGap: {
391
- property: "gridGap",
392
- scale: "space",
393
- defaultScale: defaults3.space
394
- },
395
- gridColumnGap: {
396
- property: "gridColumnGap",
397
- scale: "space",
398
- defaultScale: defaults3.space
399
- },
400
- gridRowGap: {
401
- property: "gridRowGap",
402
- scale: "space",
403
- defaultScale: defaults3.space
404
- },
405
- gridColumn: true,
406
- gridRow: true,
407
- gridAutoFlow: true,
408
- gridAutoColumns: true,
409
- gridAutoRows: true,
410
- gridTemplateColumns: true,
411
- gridTemplateRows: true,
412
- gridTemplateAreas: true,
413
- gridArea: true
414
- };
415
- var grid = system(config5);
416
- var index_esm_default5 = grid;
417
-
418
- // ../../node_modules/@styled-system/border/dist/index.esm.js
419
- var config6 = {
420
- border: {
421
- property: "border",
422
- scale: "borders"
423
- },
424
- borderWidth: {
425
- property: "borderWidth",
426
- scale: "borderWidths"
427
- },
428
- borderStyle: {
429
- property: "borderStyle",
430
- scale: "borderStyles"
431
- },
432
- borderColor: {
433
- property: "borderColor",
434
- scale: "colors"
435
- },
436
- borderRadius: {
437
- property: "borderRadius",
438
- scale: "radii"
439
- },
440
- borderTop: {
441
- property: "borderTop",
442
- scale: "borders"
443
- },
444
- borderTopLeftRadius: {
445
- property: "borderTopLeftRadius",
446
- scale: "radii"
447
- },
448
- borderTopRightRadius: {
449
- property: "borderTopRightRadius",
450
- scale: "radii"
451
- },
452
- borderRight: {
453
- property: "borderRight",
454
- scale: "borders"
455
- },
456
- borderBottom: {
457
- property: "borderBottom",
458
- scale: "borders"
459
- },
460
- borderBottomLeftRadius: {
461
- property: "borderBottomLeftRadius",
462
- scale: "radii"
463
- },
464
- borderBottomRightRadius: {
465
- property: "borderBottomRightRadius",
466
- scale: "radii"
467
- },
468
- borderLeft: {
469
- property: "borderLeft",
470
- scale: "borders"
471
- },
472
- borderX: {
473
- properties: ["borderLeft", "borderRight"],
474
- scale: "borders"
475
- },
476
- borderY: {
477
- properties: ["borderTop", "borderBottom"],
478
- scale: "borders"
479
- }
480
- };
481
- config6.borderTopWidth = {
482
- property: "borderTopWidth",
483
- scale: "borderWidths"
484
- };
485
- config6.borderTopColor = {
486
- property: "borderTopColor",
487
- scale: "colors"
488
- };
489
- config6.borderTopStyle = {
490
- property: "borderTopStyle",
491
- scale: "borderStyles"
492
- };
493
- config6.borderTopLeftRadius = {
494
- property: "borderTopLeftRadius",
495
- scale: "radii"
496
- };
497
- config6.borderTopRightRadius = {
498
- property: "borderTopRightRadius",
499
- scale: "radii"
500
- };
501
- config6.borderBottomWidth = {
502
- property: "borderBottomWidth",
503
- scale: "borderWidths"
504
- };
505
- config6.borderBottomColor = {
506
- property: "borderBottomColor",
507
- scale: "colors"
508
- };
509
- config6.borderBottomStyle = {
510
- property: "borderBottomStyle",
511
- scale: "borderStyles"
512
- };
513
- config6.borderBottomLeftRadius = {
514
- property: "borderBottomLeftRadius",
515
- scale: "radii"
516
- };
517
- config6.borderBottomRightRadius = {
518
- property: "borderBottomRightRadius",
519
- scale: "radii"
520
- };
521
- config6.borderLeftWidth = {
522
- property: "borderLeftWidth",
523
- scale: "borderWidths"
524
- };
525
- config6.borderLeftColor = {
526
- property: "borderLeftColor",
527
- scale: "colors"
528
- };
529
- config6.borderLeftStyle = {
530
- property: "borderLeftStyle",
531
- scale: "borderStyles"
532
- };
533
- config6.borderRightWidth = {
534
- property: "borderRightWidth",
535
- scale: "borderWidths"
536
- };
537
- config6.borderRightColor = {
538
- property: "borderRightColor",
539
- scale: "colors"
540
- };
541
- config6.borderRightStyle = {
542
- property: "borderRightStyle",
543
- scale: "borderStyles"
544
- };
545
- var border = system(config6);
546
- var index_esm_default6 = border;
547
-
548
- // ../../node_modules/@styled-system/background/dist/index.esm.js
549
- var config7 = {
550
- background: true,
551
- backgroundImage: true,
552
- backgroundSize: true,
553
- backgroundPosition: true,
554
- backgroundRepeat: true
555
- };
556
- config7.bgImage = config7.backgroundImage;
557
- config7.bgSize = config7.backgroundSize;
558
- config7.bgPosition = config7.backgroundPosition;
559
- config7.bgRepeat = config7.backgroundRepeat;
560
- var background = system(config7);
561
- var index_esm_default7 = background;
562
-
563
- // ../../node_modules/@styled-system/position/dist/index.esm.js
564
- var defaults4 = {
565
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
566
- };
567
- var config8 = {
568
- position: true,
569
- zIndex: {
570
- property: "zIndex",
571
- scale: "zIndices"
572
- },
573
- top: {
574
- property: "top",
575
- scale: "space",
576
- defaultScale: defaults4.space
577
- },
578
- right: {
579
- property: "right",
580
- scale: "space",
581
- defaultScale: defaults4.space
582
- },
583
- bottom: {
584
- property: "bottom",
585
- scale: "space",
586
- defaultScale: defaults4.space
587
- },
588
- left: {
589
- property: "left",
590
- scale: "space",
591
- defaultScale: defaults4.space
592
- }
593
- };
594
- var position = system(config8);
595
- var index_esm_default8 = position;
596
-
597
- // ../../node_modules/@styled-system/space/dist/index.esm.js
598
- var defaults5 = {
599
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
600
- };
601
- var isNumber3 = function isNumber4(n) {
602
- return typeof n === "number" && !isNaN(n);
603
- };
604
- var getMargin = function getMargin2(n, scale) {
605
- if (!isNumber3(n)) {
606
- return get(scale, n, n);
607
- }
608
- var isNegative = n < 0;
609
- var absolute = Math.abs(n);
610
- var value = get(scale, absolute, absolute);
611
- if (!isNumber3(value)) {
612
- return isNegative ? "-" + value : value;
613
- }
614
- return value * (isNegative ? -1 : 1);
615
- };
616
- var configs = {};
617
- configs.margin = {
618
- margin: {
619
- property: "margin",
620
- scale: "space",
621
- transform: getMargin,
622
- defaultScale: defaults5.space
623
- },
624
- marginTop: {
625
- property: "marginTop",
626
- scale: "space",
627
- transform: getMargin,
628
- defaultScale: defaults5.space
629
- },
630
- marginRight: {
631
- property: "marginRight",
632
- scale: "space",
633
- transform: getMargin,
634
- defaultScale: defaults5.space
635
- },
636
- marginBottom: {
637
- property: "marginBottom",
638
- scale: "space",
639
- transform: getMargin,
640
- defaultScale: defaults5.space
641
- },
642
- marginLeft: {
643
- property: "marginLeft",
644
- scale: "space",
645
- transform: getMargin,
646
- defaultScale: defaults5.space
647
- },
648
- marginX: {
649
- properties: ["marginLeft", "marginRight"],
650
- scale: "space",
651
- transform: getMargin,
652
- defaultScale: defaults5.space
653
- },
654
- marginY: {
655
- properties: ["marginTop", "marginBottom"],
656
- scale: "space",
657
- transform: getMargin,
658
- defaultScale: defaults5.space
659
- }
660
- };
661
- configs.margin.m = configs.margin.margin;
662
- configs.margin.mt = configs.margin.marginTop;
663
- configs.margin.mr = configs.margin.marginRight;
664
- configs.margin.mb = configs.margin.marginBottom;
665
- configs.margin.ml = configs.margin.marginLeft;
666
- configs.margin.mx = configs.margin.marginX;
667
- configs.margin.my = configs.margin.marginY;
668
- configs.padding = {
669
- padding: {
670
- property: "padding",
671
- scale: "space",
672
- defaultScale: defaults5.space
673
- },
674
- paddingTop: {
675
- property: "paddingTop",
676
- scale: "space",
677
- defaultScale: defaults5.space
678
- },
679
- paddingRight: {
680
- property: "paddingRight",
681
- scale: "space",
682
- defaultScale: defaults5.space
683
- },
684
- paddingBottom: {
685
- property: "paddingBottom",
686
- scale: "space",
687
- defaultScale: defaults5.space
688
- },
689
- paddingLeft: {
690
- property: "paddingLeft",
691
- scale: "space",
692
- defaultScale: defaults5.space
693
- },
694
- paddingX: {
695
- properties: ["paddingLeft", "paddingRight"],
696
- scale: "space",
697
- defaultScale: defaults5.space
698
- },
699
- paddingY: {
700
- properties: ["paddingTop", "paddingBottom"],
701
- scale: "space",
702
- defaultScale: defaults5.space
703
- }
704
- };
705
- configs.padding.p = configs.padding.padding;
706
- configs.padding.pt = configs.padding.paddingTop;
707
- configs.padding.pr = configs.padding.paddingRight;
708
- configs.padding.pb = configs.padding.paddingBottom;
709
- configs.padding.pl = configs.padding.paddingLeft;
710
- configs.padding.px = configs.padding.paddingX;
711
- configs.padding.py = configs.padding.paddingY;
712
- var margin = system(configs.margin);
713
- var padding = system(configs.padding);
714
- var space = compose(margin, padding);
715
-
716
- // ../../node_modules/@styled-system/shadow/dist/index.esm.js
717
- var shadow = system({
718
- boxShadow: {
719
- property: "boxShadow",
720
- scale: "shadows"
721
- },
722
- textShadow: {
723
- property: "textShadow",
724
- scale: "shadows"
725
- }
726
- });
727
-
728
- // ../../node_modules/@styled-system/css/dist/index.esm.js
729
- function _extends() {
730
- _extends = Object.assign || function(target) {
731
- for (var i = 1; i < arguments.length; i++) {
732
- var source = arguments[i];
733
- for (var key in source) {
734
- if (Object.prototype.hasOwnProperty.call(source, key)) {
735
- target[key] = source[key];
736
- }
737
- }
738
- }
739
- return target;
740
- };
741
- return _extends.apply(this, arguments);
742
- }
743
- var get3 = function get4(obj, key, def, p, undef) {
744
- key = key && key.split ? key.split(".") : [key];
745
- for (p = 0; p < key.length; p++) {
746
- obj = obj ? obj[key[p]] : undef;
747
- }
748
- return obj === undef ? def : obj;
749
- };
750
- var defaultBreakpoints = [40, 52, 64].map(function(n) {
751
- return n + "em";
752
- });
753
- var defaultTheme = {
754
- space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
755
- fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
756
- };
757
- var aliases = {
758
- bg: "backgroundColor",
759
- m: "margin",
760
- mt: "marginTop",
761
- mr: "marginRight",
762
- mb: "marginBottom",
763
- ml: "marginLeft",
764
- mx: "marginX",
765
- my: "marginY",
766
- p: "padding",
767
- pt: "paddingTop",
768
- pr: "paddingRight",
769
- pb: "paddingBottom",
770
- pl: "paddingLeft",
771
- px: "paddingX",
772
- py: "paddingY"
773
- };
774
- var multiples = {
775
- marginX: ["marginLeft", "marginRight"],
776
- marginY: ["marginTop", "marginBottom"],
777
- paddingX: ["paddingLeft", "paddingRight"],
778
- paddingY: ["paddingTop", "paddingBottom"],
779
- size: ["width", "height"]
780
- };
781
- var scales = {
782
- color: "colors",
783
- backgroundColor: "colors",
784
- borderColor: "colors",
785
- margin: "space",
786
- marginTop: "space",
787
- marginRight: "space",
788
- marginBottom: "space",
789
- marginLeft: "space",
790
- marginX: "space",
791
- marginY: "space",
792
- padding: "space",
793
- paddingTop: "space",
794
- paddingRight: "space",
795
- paddingBottom: "space",
796
- paddingLeft: "space",
797
- paddingX: "space",
798
- paddingY: "space",
799
- top: "space",
800
- right: "space",
801
- bottom: "space",
802
- left: "space",
803
- gridGap: "space",
804
- gridColumnGap: "space",
805
- gridRowGap: "space",
806
- gap: "space",
807
- columnGap: "space",
808
- rowGap: "space",
809
- fontFamily: "fonts",
810
- fontSize: "fontSizes",
811
- fontWeight: "fontWeights",
812
- lineHeight: "lineHeights",
813
- letterSpacing: "letterSpacings",
814
- border: "borders",
815
- borderTop: "borders",
816
- borderRight: "borders",
817
- borderBottom: "borders",
818
- borderLeft: "borders",
819
- borderWidth: "borderWidths",
820
- borderStyle: "borderStyles",
821
- borderRadius: "radii",
822
- borderTopRightRadius: "radii",
823
- borderTopLeftRadius: "radii",
824
- borderBottomRightRadius: "radii",
825
- borderBottomLeftRadius: "radii",
826
- borderTopWidth: "borderWidths",
827
- borderTopColor: "colors",
828
- borderTopStyle: "borderStyles",
829
- borderBottomWidth: "borderWidths",
830
- borderBottomColor: "colors",
831
- borderBottomStyle: "borderStyles",
832
- borderLeftWidth: "borderWidths",
833
- borderLeftColor: "colors",
834
- borderLeftStyle: "borderStyles",
835
- borderRightWidth: "borderWidths",
836
- borderRightColor: "colors",
837
- borderRightStyle: "borderStyles",
838
- outlineColor: "colors",
839
- boxShadow: "shadows",
840
- textShadow: "shadows",
841
- zIndex: "zIndices",
842
- width: "sizes",
843
- minWidth: "sizes",
844
- maxWidth: "sizes",
845
- height: "sizes",
846
- minHeight: "sizes",
847
- maxHeight: "sizes",
848
- flexBasis: "sizes",
849
- size: "sizes",
850
- // svg
851
- fill: "colors",
852
- stroke: "colors"
853
- };
854
- var positiveOrNegative = function positiveOrNegative2(scale, value) {
855
- if (typeof value !== "number" || value >= 0) {
856
- return get3(scale, value, value);
857
- }
858
- var absolute = Math.abs(value);
859
- var n = get3(scale, absolute, absolute);
860
- if (typeof n === "string") return "-" + n;
861
- return n * -1;
862
- };
863
- var transforms = ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "top", "bottom", "left", "right"].reduce(function(acc, curr) {
864
- var _extends2;
865
- return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
866
- }, {});
867
- var responsive = function responsive2(styles) {
868
- return function(theme) {
869
- var next = {};
870
- var breakpoints = get3(theme, "breakpoints", defaultBreakpoints);
871
- var mediaQueries = [null].concat(breakpoints.map(function(n) {
872
- return "@media screen and (min-width: " + n + ")";
873
- }));
874
- for (var key in styles) {
875
- var value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
876
- if (value == null) continue;
877
- if (!Array.isArray(value)) {
878
- next[key] = value;
879
- continue;
880
- }
881
- for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
882
- var media = mediaQueries[i];
883
- if (!media) {
884
- next[key] = value[i];
885
- continue;
886
- }
887
- next[media] = next[media] || {};
888
- if (value[i] == null) continue;
889
- next[media][key] = value[i];
890
- }
891
- }
892
- return next;
893
- };
894
- };
895
- var css = function css2(args) {
896
- return function(props) {
897
- if (props === void 0) {
898
- props = {};
899
- }
900
- var theme = _extends({}, defaultTheme, {}, props.theme || props);
901
- var result = {};
902
- var obj = typeof args === "function" ? args(theme) : args;
903
- var styles = responsive(obj)(theme);
904
- for (var key in styles) {
905
- var x = styles[key];
906
- var val = typeof x === "function" ? x(theme) : x;
907
- if (key === "variant") {
908
- var variant3 = css2(get3(theme, val))(theme);
909
- result = _extends({}, result, {}, variant3);
910
- continue;
911
- }
912
- if (val && typeof val === "object") {
913
- result[key] = css2(val)(theme);
914
- continue;
915
- }
916
- var prop = get3(aliases, key, key);
917
- var scaleName = get3(scales, prop);
918
- var scale = get3(theme, scaleName, get3(theme, prop, {}));
919
- var transform = get3(transforms, prop, get3);
920
- var value = transform(scale, val, val);
921
- if (multiples[prop]) {
922
- var dirs = multiples[prop];
923
- for (var i = 0; i < dirs.length; i++) {
924
- result[dirs[i]] = value;
925
- }
926
- } else {
927
- result[prop] = value;
928
- }
929
- }
930
- return result;
931
- };
932
- };
933
- var index_esm_default9 = css;
934
-
935
- // ../../node_modules/@styled-system/variant/dist/index.esm.js
936
- var variant = function variant2(_ref) {
937
- var _config;
938
- 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;
939
- var sx;
940
- if (Object.keys(variants).length) {
941
- sx = function sx2(value, scale2, props) {
942
- return index_esm_default9(get(scale2, value, null))(props.theme);
943
- };
944
- } else {
945
- sx = function sx2(value, scale2) {
946
- return get(scale2, value, null);
947
- };
948
- }
949
- sx.scale = scale || key;
950
- sx.defaults = variants;
951
- var config9 = (_config = {}, _config[prop] = sx, _config);
952
- var parser = createParser(config9);
953
- return parser;
954
- };
955
- var buttonStyle = variant({
956
- key: "buttons"
957
- });
958
- var textStyle = variant({
959
- key: "textStyles",
960
- prop: "textStyle"
961
- });
962
- var colorStyle = variant({
963
- key: "colorStyles",
964
- prop: "colors"
965
- });
966
-
967
- // ../../node_modules/styled-system/dist/index.esm.js
968
- var width = index_esm_default.width;
969
- var height = index_esm_default.height;
970
- var minWidth = index_esm_default.minWidth;
971
- var minHeight = index_esm_default.minHeight;
972
- var maxWidth = index_esm_default.maxWidth;
973
- var maxHeight = index_esm_default.maxHeight;
974
- var size = index_esm_default.size;
975
- var verticalAlign = index_esm_default.verticalAlign;
976
- var display = index_esm_default.display;
977
- var overflow = index_esm_default.overflow;
978
- var overflowX = index_esm_default.overflowX;
979
- var overflowY = index_esm_default.overflowY;
980
- var opacity = index_esm_default2.opacity;
981
- var fontSize = index_esm_default3.fontSize;
982
- var fontFamily = index_esm_default3.fontFamily;
983
- var fontWeight = index_esm_default3.fontWeight;
984
- var lineHeight = index_esm_default3.lineHeight;
985
- var textAlign = index_esm_default3.textAlign;
986
- var fontStyle = index_esm_default3.fontStyle;
987
- var letterSpacing = index_esm_default3.letterSpacing;
988
- var alignItems = index_esm_default4.alignItems;
989
- var alignContent = index_esm_default4.alignContent;
990
- var justifyItems = index_esm_default4.justifyItems;
991
- var justifyContent = index_esm_default4.justifyContent;
992
- var flexWrap = index_esm_default4.flexWrap;
993
- var flexDirection = index_esm_default4.flexDirection;
994
- var flex = index_esm_default4.flex;
995
- var flexGrow = index_esm_default4.flexGrow;
996
- var flexShrink = index_esm_default4.flexShrink;
997
- var flexBasis = index_esm_default4.flexBasis;
998
- var justifySelf = index_esm_default4.justifySelf;
999
- var alignSelf = index_esm_default4.alignSelf;
1000
- var order = index_esm_default4.order;
1001
- var gridGap = index_esm_default5.gridGap;
1002
- var gridColumnGap = index_esm_default5.gridColumnGap;
1003
- var gridRowGap = index_esm_default5.gridRowGap;
1004
- var gridColumn = index_esm_default5.gridColumn;
1005
- var gridRow = index_esm_default5.gridRow;
1006
- var gridAutoFlow = index_esm_default5.gridAutoFlow;
1007
- var gridAutoColumns = index_esm_default5.gridAutoColumns;
1008
- var gridAutoRows = index_esm_default5.gridAutoRows;
1009
- var gridTemplateColumns = index_esm_default5.gridTemplateColumns;
1010
- var gridTemplateRows = index_esm_default5.gridTemplateRows;
1011
- var gridTemplateAreas = index_esm_default5.gridTemplateAreas;
1012
- var gridArea = index_esm_default5.gridArea;
1013
- var borderWidth = index_esm_default6.borderWidth;
1014
- var borderStyle = index_esm_default6.borderStyle;
1015
- var borderColor = index_esm_default6.borderColor;
1016
- var borderTop = index_esm_default6.borderTop;
1017
- var borderRight = index_esm_default6.borderRight;
1018
- var borderBottom = index_esm_default6.borderBottom;
1019
- var borderLeft = index_esm_default6.borderLeft;
1020
- var borderRadius = index_esm_default6.borderRadius;
1021
- var backgroundImage = index_esm_default7.backgroundImage;
1022
- var backgroundSize = index_esm_default7.backgroundSize;
1023
- var backgroundPosition = index_esm_default7.backgroundPosition;
1024
- var backgroundRepeat = index_esm_default7.backgroundRepeat;
1025
- var zIndex = index_esm_default8.zIndex;
1026
- var top = index_esm_default8.top;
1027
- var right = index_esm_default8.right;
1028
- var bottom = index_esm_default8.bottom;
1029
- var left = index_esm_default8.left;
1030
-
1031
- // src/styles.tsx
6
+ import {
7
+ border,
8
+ color,
9
+ flexbox,
10
+ grid,
11
+ layout,
12
+ position,
13
+ space,
14
+ typography
15
+ } from "styled-system";
1032
16
  import { focusRing, disabled } from "@sproutsocial/seeds-react-mixins";
1033
17
  import Icon from "@sproutsocial/seeds-react-icon";
1034
18
  var StyledCardContent = styled.div`
@@ -1338,13 +322,4 @@ export {
1338
322
  CardLink,
1339
323
  index_default as default
1340
324
  };
1341
- /*! Bundled license information:
1342
-
1343
- object-assign/index.js:
1344
- (*
1345
- object-assign
1346
- (c) Sindre Sorhus
1347
- @license MIT
1348
- *)
1349
- */
1350
325
  //# sourceMappingURL=index.js.map