@sproutsocial/seeds-react-card 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1375 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
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
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+
33
+ // ../../node_modules/object-assign/index.js
34
+ var require_object_assign = __commonJS({
35
+ "../../node_modules/object-assign/index.js"(exports, 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
+
103
+ // src/index.ts
104
+ var src_exports = {};
105
+ __export(src_exports, {
106
+ Card: () => Card_default,
107
+ CardContent: () => CardContent,
108
+ CardFooter: () => CardFooter,
109
+ CardHeader: () => CardHeader,
110
+ CardLink: () => CardLink,
111
+ default: () => src_default
112
+ });
113
+ module.exports = __toCommonJS(src_exports);
114
+
115
+ // src/Card.tsx
116
+ var import_react3 = require("react");
117
+
118
+ // src/styles.tsx
119
+ var import_styled_components = __toESM(require("styled-components"));
120
+
121
+ // ../../node_modules/@styled-system/core/dist/index.esm.js
122
+ var import_object_assign = __toESM(require_object_assign());
123
+ var merge = function merge2(a, b) {
124
+ var result = (0, import_object_assign.default)({}, a, b);
125
+ for (var key in a) {
126
+ var _assign;
127
+ if (!a[key] || typeof b[key] !== "object")
128
+ continue;
129
+ (0, import_object_assign.default)(result, (_assign = {}, _assign[key] = (0, import_object_assign.default)(a[key], b[key]), _assign));
130
+ }
131
+ return result;
132
+ };
133
+ var sort = function sort2(obj) {
134
+ var next = {};
135
+ Object.keys(obj).sort(function(a, b) {
136
+ return a.localeCompare(b, void 0, {
137
+ numeric: true,
138
+ sensitivity: "base"
139
+ });
140
+ }).forEach(function(key) {
141
+ next[key] = obj[key];
142
+ });
143
+ return next;
144
+ };
145
+ var defaults = {
146
+ breakpoints: [40, 52, 64].map(function(n) {
147
+ return n + "em";
148
+ })
149
+ };
150
+ var createMediaQuery = function createMediaQuery2(n) {
151
+ return "@media screen and (min-width: " + n + ")";
152
+ };
153
+ var getValue = function getValue2(n, scale) {
154
+ return get(scale, n, n);
155
+ };
156
+ var get = function get2(obj, key, def, p, undef) {
157
+ key = key && key.split ? key.split(".") : [key];
158
+ for (p = 0; p < key.length; p++) {
159
+ obj = obj ? obj[key[p]] : undef;
160
+ }
161
+ return obj === undef ? def : obj;
162
+ };
163
+ var createParser = function createParser2(config9) {
164
+ var cache = {};
165
+ var parse = function parse2(props) {
166
+ var styles = {};
167
+ var shouldSort = false;
168
+ var isCacheDisabled = props.theme && props.theme.disableStyledSystemCache;
169
+ for (var key in props) {
170
+ if (!config9[key])
171
+ continue;
172
+ var sx = config9[key];
173
+ var raw = props[key];
174
+ var scale = get(props.theme, sx.scale, sx.defaults);
175
+ if (typeof raw === "object") {
176
+ cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
177
+ if (Array.isArray(raw)) {
178
+ cache.media = !isCacheDisabled && cache.media || [null].concat(cache.breakpoints.map(createMediaQuery));
179
+ styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
180
+ continue;
181
+ }
182
+ if (raw !== null) {
183
+ styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
184
+ shouldSort = true;
185
+ }
186
+ continue;
187
+ }
188
+ (0, import_object_assign.default)(styles, sx(raw, scale, props));
189
+ }
190
+ if (shouldSort) {
191
+ styles = sort(styles);
192
+ }
193
+ return styles;
194
+ };
195
+ parse.config = config9;
196
+ parse.propNames = Object.keys(config9);
197
+ parse.cache = cache;
198
+ var keys = Object.keys(config9).filter(function(k) {
199
+ return k !== "config";
200
+ });
201
+ if (keys.length > 1) {
202
+ keys.forEach(function(key) {
203
+ var _createParser;
204
+ parse[key] = createParser2((_createParser = {}, _createParser[key] = config9[key], _createParser));
205
+ });
206
+ }
207
+ return parse;
208
+ };
209
+ var parseResponsiveStyle = function parseResponsiveStyle2(mediaQueries, sx, scale, raw, _props) {
210
+ var styles = {};
211
+ raw.slice(0, mediaQueries.length).forEach(function(value, i) {
212
+ var media = mediaQueries[i];
213
+ var style = sx(value, scale, _props);
214
+ if (!media) {
215
+ (0, import_object_assign.default)(styles, style);
216
+ } else {
217
+ var _assign2;
218
+ (0, import_object_assign.default)(styles, (_assign2 = {}, _assign2[media] = (0, import_object_assign.default)({}, styles[media], style), _assign2));
219
+ }
220
+ });
221
+ return styles;
222
+ };
223
+ var parseResponsiveObject = function parseResponsiveObject2(breakpoints, sx, scale, raw, _props) {
224
+ var styles = {};
225
+ for (var key in raw) {
226
+ var breakpoint = breakpoints[key];
227
+ var value = raw[key];
228
+ var style = sx(value, scale, _props);
229
+ if (!breakpoint) {
230
+ (0, import_object_assign.default)(styles, style);
231
+ } else {
232
+ var _assign3;
233
+ var media = createMediaQuery(breakpoint);
234
+ (0, import_object_assign.default)(styles, (_assign3 = {}, _assign3[media] = (0, import_object_assign.default)({}, styles[media], style), _assign3));
235
+ }
236
+ }
237
+ return styles;
238
+ };
239
+ var createStyleFunction = function createStyleFunction2(_ref) {
240
+ 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;
241
+ properties = properties || [property];
242
+ var sx = function sx2(value, scale2, _props) {
243
+ var result = {};
244
+ var n = transform(value, scale2, _props);
245
+ if (n === null)
246
+ return;
247
+ properties.forEach(function(prop) {
248
+ result[prop] = n;
249
+ });
250
+ return result;
251
+ };
252
+ sx.scale = scale;
253
+ sx.defaults = defaultScale;
254
+ return sx;
255
+ };
256
+ var system = function system2(args) {
257
+ if (args === void 0) {
258
+ args = {};
259
+ }
260
+ var config9 = {};
261
+ Object.keys(args).forEach(function(key) {
262
+ var conf = args[key];
263
+ if (conf === true) {
264
+ config9[key] = createStyleFunction({
265
+ property: key,
266
+ scale: key
267
+ });
268
+ return;
269
+ }
270
+ if (typeof conf === "function") {
271
+ config9[key] = conf;
272
+ return;
273
+ }
274
+ config9[key] = createStyleFunction(conf);
275
+ });
276
+ var parser = createParser(config9);
277
+ return parser;
278
+ };
279
+ var compose = function compose2() {
280
+ var config9 = {};
281
+ for (var _len = arguments.length, parsers = new Array(_len), _key = 0; _key < _len; _key++) {
282
+ parsers[_key] = arguments[_key];
283
+ }
284
+ parsers.forEach(function(parser2) {
285
+ if (!parser2 || !parser2.config)
286
+ return;
287
+ (0, import_object_assign.default)(config9, parser2.config);
288
+ });
289
+ var parser = createParser(config9);
290
+ return parser;
291
+ };
292
+
293
+ // ../../node_modules/@styled-system/layout/dist/index.esm.js
294
+ var isNumber = function isNumber2(n) {
295
+ return typeof n === "number" && !isNaN(n);
296
+ };
297
+ var getWidth = function getWidth2(n, scale) {
298
+ return get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
299
+ };
300
+ var config = {
301
+ width: {
302
+ property: "width",
303
+ scale: "sizes",
304
+ transform: getWidth
305
+ },
306
+ height: {
307
+ property: "height",
308
+ scale: "sizes"
309
+ },
310
+ minWidth: {
311
+ property: "minWidth",
312
+ scale: "sizes"
313
+ },
314
+ minHeight: {
315
+ property: "minHeight",
316
+ scale: "sizes"
317
+ },
318
+ maxWidth: {
319
+ property: "maxWidth",
320
+ scale: "sizes"
321
+ },
322
+ maxHeight: {
323
+ property: "maxHeight",
324
+ scale: "sizes"
325
+ },
326
+ size: {
327
+ properties: ["width", "height"],
328
+ scale: "sizes"
329
+ },
330
+ overflow: true,
331
+ overflowX: true,
332
+ overflowY: true,
333
+ display: true,
334
+ verticalAlign: true
335
+ };
336
+ var layout = system(config);
337
+ var index_esm_default = layout;
338
+
339
+ // ../../node_modules/@styled-system/color/dist/index.esm.js
340
+ var config2 = {
341
+ color: {
342
+ property: "color",
343
+ scale: "colors"
344
+ },
345
+ backgroundColor: {
346
+ property: "backgroundColor",
347
+ scale: "colors"
348
+ },
349
+ opacity: true
350
+ };
351
+ config2.bg = config2.backgroundColor;
352
+ var color = system(config2);
353
+ var index_esm_default2 = color;
354
+
355
+ // ../../node_modules/@styled-system/typography/dist/index.esm.js
356
+ var defaults2 = {
357
+ fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
358
+ };
359
+ var config3 = {
360
+ fontFamily: {
361
+ property: "fontFamily",
362
+ scale: "fonts"
363
+ },
364
+ fontSize: {
365
+ property: "fontSize",
366
+ scale: "fontSizes",
367
+ defaultScale: defaults2.fontSizes
368
+ },
369
+ fontWeight: {
370
+ property: "fontWeight",
371
+ scale: "fontWeights"
372
+ },
373
+ lineHeight: {
374
+ property: "lineHeight",
375
+ scale: "lineHeights"
376
+ },
377
+ letterSpacing: {
378
+ property: "letterSpacing",
379
+ scale: "letterSpacings"
380
+ },
381
+ textAlign: true,
382
+ fontStyle: true
383
+ };
384
+ var typography = system(config3);
385
+ var index_esm_default3 = typography;
386
+
387
+ // ../../node_modules/@styled-system/flexbox/dist/index.esm.js
388
+ var config4 = {
389
+ alignItems: true,
390
+ alignContent: true,
391
+ justifyItems: true,
392
+ justifyContent: true,
393
+ flexWrap: true,
394
+ flexDirection: true,
395
+ // item
396
+ flex: true,
397
+ flexGrow: true,
398
+ flexShrink: true,
399
+ flexBasis: true,
400
+ justifySelf: true,
401
+ alignSelf: true,
402
+ order: true
403
+ };
404
+ var flexbox = system(config4);
405
+ var index_esm_default4 = flexbox;
406
+
407
+ // ../../node_modules/@styled-system/grid/dist/index.esm.js
408
+ var defaults3 = {
409
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
410
+ };
411
+ var config5 = {
412
+ gridGap: {
413
+ property: "gridGap",
414
+ scale: "space",
415
+ defaultScale: defaults3.space
416
+ },
417
+ gridColumnGap: {
418
+ property: "gridColumnGap",
419
+ scale: "space",
420
+ defaultScale: defaults3.space
421
+ },
422
+ gridRowGap: {
423
+ property: "gridRowGap",
424
+ scale: "space",
425
+ defaultScale: defaults3.space
426
+ },
427
+ gridColumn: true,
428
+ gridRow: true,
429
+ gridAutoFlow: true,
430
+ gridAutoColumns: true,
431
+ gridAutoRows: true,
432
+ gridTemplateColumns: true,
433
+ gridTemplateRows: true,
434
+ gridTemplateAreas: true,
435
+ gridArea: true
436
+ };
437
+ var grid = system(config5);
438
+ var index_esm_default5 = grid;
439
+
440
+ // ../../node_modules/@styled-system/border/dist/index.esm.js
441
+ var config6 = {
442
+ border: {
443
+ property: "border",
444
+ scale: "borders"
445
+ },
446
+ borderWidth: {
447
+ property: "borderWidth",
448
+ scale: "borderWidths"
449
+ },
450
+ borderStyle: {
451
+ property: "borderStyle",
452
+ scale: "borderStyles"
453
+ },
454
+ borderColor: {
455
+ property: "borderColor",
456
+ scale: "colors"
457
+ },
458
+ borderRadius: {
459
+ property: "borderRadius",
460
+ scale: "radii"
461
+ },
462
+ borderTop: {
463
+ property: "borderTop",
464
+ scale: "borders"
465
+ },
466
+ borderTopLeftRadius: {
467
+ property: "borderTopLeftRadius",
468
+ scale: "radii"
469
+ },
470
+ borderTopRightRadius: {
471
+ property: "borderTopRightRadius",
472
+ scale: "radii"
473
+ },
474
+ borderRight: {
475
+ property: "borderRight",
476
+ scale: "borders"
477
+ },
478
+ borderBottom: {
479
+ property: "borderBottom",
480
+ scale: "borders"
481
+ },
482
+ borderBottomLeftRadius: {
483
+ property: "borderBottomLeftRadius",
484
+ scale: "radii"
485
+ },
486
+ borderBottomRightRadius: {
487
+ property: "borderBottomRightRadius",
488
+ scale: "radii"
489
+ },
490
+ borderLeft: {
491
+ property: "borderLeft",
492
+ scale: "borders"
493
+ },
494
+ borderX: {
495
+ properties: ["borderLeft", "borderRight"],
496
+ scale: "borders"
497
+ },
498
+ borderY: {
499
+ properties: ["borderTop", "borderBottom"],
500
+ scale: "borders"
501
+ }
502
+ };
503
+ config6.borderTopWidth = {
504
+ property: "borderTopWidth",
505
+ scale: "borderWidths"
506
+ };
507
+ config6.borderTopColor = {
508
+ property: "borderTopColor",
509
+ scale: "colors"
510
+ };
511
+ config6.borderTopStyle = {
512
+ property: "borderTopStyle",
513
+ scale: "borderStyles"
514
+ };
515
+ config6.borderTopLeftRadius = {
516
+ property: "borderTopLeftRadius",
517
+ scale: "radii"
518
+ };
519
+ config6.borderTopRightRadius = {
520
+ property: "borderTopRightRadius",
521
+ scale: "radii"
522
+ };
523
+ config6.borderBottomWidth = {
524
+ property: "borderBottomWidth",
525
+ scale: "borderWidths"
526
+ };
527
+ config6.borderBottomColor = {
528
+ property: "borderBottomColor",
529
+ scale: "colors"
530
+ };
531
+ config6.borderBottomStyle = {
532
+ property: "borderBottomStyle",
533
+ scale: "borderStyles"
534
+ };
535
+ config6.borderBottomLeftRadius = {
536
+ property: "borderBottomLeftRadius",
537
+ scale: "radii"
538
+ };
539
+ config6.borderBottomRightRadius = {
540
+ property: "borderBottomRightRadius",
541
+ scale: "radii"
542
+ };
543
+ config6.borderLeftWidth = {
544
+ property: "borderLeftWidth",
545
+ scale: "borderWidths"
546
+ };
547
+ config6.borderLeftColor = {
548
+ property: "borderLeftColor",
549
+ scale: "colors"
550
+ };
551
+ config6.borderLeftStyle = {
552
+ property: "borderLeftStyle",
553
+ scale: "borderStyles"
554
+ };
555
+ config6.borderRightWidth = {
556
+ property: "borderRightWidth",
557
+ scale: "borderWidths"
558
+ };
559
+ config6.borderRightColor = {
560
+ property: "borderRightColor",
561
+ scale: "colors"
562
+ };
563
+ config6.borderRightStyle = {
564
+ property: "borderRightStyle",
565
+ scale: "borderStyles"
566
+ };
567
+ var border = system(config6);
568
+ var index_esm_default6 = border;
569
+
570
+ // ../../node_modules/@styled-system/background/dist/index.esm.js
571
+ var config7 = {
572
+ background: true,
573
+ backgroundImage: true,
574
+ backgroundSize: true,
575
+ backgroundPosition: true,
576
+ backgroundRepeat: true
577
+ };
578
+ config7.bgImage = config7.backgroundImage;
579
+ config7.bgSize = config7.backgroundSize;
580
+ config7.bgPosition = config7.backgroundPosition;
581
+ config7.bgRepeat = config7.backgroundRepeat;
582
+ var background = system(config7);
583
+ var index_esm_default7 = background;
584
+
585
+ // ../../node_modules/@styled-system/position/dist/index.esm.js
586
+ var defaults4 = {
587
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
588
+ };
589
+ var config8 = {
590
+ position: true,
591
+ zIndex: {
592
+ property: "zIndex",
593
+ scale: "zIndices"
594
+ },
595
+ top: {
596
+ property: "top",
597
+ scale: "space",
598
+ defaultScale: defaults4.space
599
+ },
600
+ right: {
601
+ property: "right",
602
+ scale: "space",
603
+ defaultScale: defaults4.space
604
+ },
605
+ bottom: {
606
+ property: "bottom",
607
+ scale: "space",
608
+ defaultScale: defaults4.space
609
+ },
610
+ left: {
611
+ property: "left",
612
+ scale: "space",
613
+ defaultScale: defaults4.space
614
+ }
615
+ };
616
+ var position = system(config8);
617
+ var index_esm_default8 = position;
618
+
619
+ // ../../node_modules/@styled-system/space/dist/index.esm.js
620
+ var defaults5 = {
621
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512]
622
+ };
623
+ var isNumber3 = function isNumber4(n) {
624
+ return typeof n === "number" && !isNaN(n);
625
+ };
626
+ var getMargin = function getMargin2(n, scale) {
627
+ if (!isNumber3(n)) {
628
+ return get(scale, n, n);
629
+ }
630
+ var isNegative = n < 0;
631
+ var absolute = Math.abs(n);
632
+ var value = get(scale, absolute, absolute);
633
+ if (!isNumber3(value)) {
634
+ return isNegative ? "-" + value : value;
635
+ }
636
+ return value * (isNegative ? -1 : 1);
637
+ };
638
+ var configs = {};
639
+ configs.margin = {
640
+ margin: {
641
+ property: "margin",
642
+ scale: "space",
643
+ transform: getMargin,
644
+ defaultScale: defaults5.space
645
+ },
646
+ marginTop: {
647
+ property: "marginTop",
648
+ scale: "space",
649
+ transform: getMargin,
650
+ defaultScale: defaults5.space
651
+ },
652
+ marginRight: {
653
+ property: "marginRight",
654
+ scale: "space",
655
+ transform: getMargin,
656
+ defaultScale: defaults5.space
657
+ },
658
+ marginBottom: {
659
+ property: "marginBottom",
660
+ scale: "space",
661
+ transform: getMargin,
662
+ defaultScale: defaults5.space
663
+ },
664
+ marginLeft: {
665
+ property: "marginLeft",
666
+ scale: "space",
667
+ transform: getMargin,
668
+ defaultScale: defaults5.space
669
+ },
670
+ marginX: {
671
+ properties: ["marginLeft", "marginRight"],
672
+ scale: "space",
673
+ transform: getMargin,
674
+ defaultScale: defaults5.space
675
+ },
676
+ marginY: {
677
+ properties: ["marginTop", "marginBottom"],
678
+ scale: "space",
679
+ transform: getMargin,
680
+ defaultScale: defaults5.space
681
+ }
682
+ };
683
+ configs.margin.m = configs.margin.margin;
684
+ configs.margin.mt = configs.margin.marginTop;
685
+ configs.margin.mr = configs.margin.marginRight;
686
+ configs.margin.mb = configs.margin.marginBottom;
687
+ configs.margin.ml = configs.margin.marginLeft;
688
+ configs.margin.mx = configs.margin.marginX;
689
+ configs.margin.my = configs.margin.marginY;
690
+ configs.padding = {
691
+ padding: {
692
+ property: "padding",
693
+ scale: "space",
694
+ defaultScale: defaults5.space
695
+ },
696
+ paddingTop: {
697
+ property: "paddingTop",
698
+ scale: "space",
699
+ defaultScale: defaults5.space
700
+ },
701
+ paddingRight: {
702
+ property: "paddingRight",
703
+ scale: "space",
704
+ defaultScale: defaults5.space
705
+ },
706
+ paddingBottom: {
707
+ property: "paddingBottom",
708
+ scale: "space",
709
+ defaultScale: defaults5.space
710
+ },
711
+ paddingLeft: {
712
+ property: "paddingLeft",
713
+ scale: "space",
714
+ defaultScale: defaults5.space
715
+ },
716
+ paddingX: {
717
+ properties: ["paddingLeft", "paddingRight"],
718
+ scale: "space",
719
+ defaultScale: defaults5.space
720
+ },
721
+ paddingY: {
722
+ properties: ["paddingTop", "paddingBottom"],
723
+ scale: "space",
724
+ defaultScale: defaults5.space
725
+ }
726
+ };
727
+ configs.padding.p = configs.padding.padding;
728
+ configs.padding.pt = configs.padding.paddingTop;
729
+ configs.padding.pr = configs.padding.paddingRight;
730
+ configs.padding.pb = configs.padding.paddingBottom;
731
+ configs.padding.pl = configs.padding.paddingLeft;
732
+ configs.padding.px = configs.padding.paddingX;
733
+ configs.padding.py = configs.padding.paddingY;
734
+ var margin = system(configs.margin);
735
+ var padding = system(configs.padding);
736
+ var space = compose(margin, padding);
737
+
738
+ // ../../node_modules/@styled-system/shadow/dist/index.esm.js
739
+ var shadow = system({
740
+ boxShadow: {
741
+ property: "boxShadow",
742
+ scale: "shadows"
743
+ },
744
+ textShadow: {
745
+ property: "textShadow",
746
+ scale: "shadows"
747
+ }
748
+ });
749
+
750
+ // ../../node_modules/@styled-system/css/dist/index.esm.js
751
+ function _extends() {
752
+ _extends = Object.assign || function(target) {
753
+ for (var i = 1; i < arguments.length; i++) {
754
+ var source = arguments[i];
755
+ for (var key in source) {
756
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
757
+ target[key] = source[key];
758
+ }
759
+ }
760
+ }
761
+ return target;
762
+ };
763
+ return _extends.apply(this, arguments);
764
+ }
765
+ var get3 = function get4(obj, key, def, p, undef) {
766
+ key = key && key.split ? key.split(".") : [key];
767
+ for (p = 0; p < key.length; p++) {
768
+ obj = obj ? obj[key[p]] : undef;
769
+ }
770
+ return obj === undef ? def : obj;
771
+ };
772
+ var defaultBreakpoints = [40, 52, 64].map(function(n) {
773
+ return n + "em";
774
+ });
775
+ var defaultTheme = {
776
+ space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
777
+ fontSizes: [12, 14, 16, 20, 24, 32, 48, 64, 72]
778
+ };
779
+ var aliases = {
780
+ bg: "backgroundColor",
781
+ m: "margin",
782
+ mt: "marginTop",
783
+ mr: "marginRight",
784
+ mb: "marginBottom",
785
+ ml: "marginLeft",
786
+ mx: "marginX",
787
+ my: "marginY",
788
+ p: "padding",
789
+ pt: "paddingTop",
790
+ pr: "paddingRight",
791
+ pb: "paddingBottom",
792
+ pl: "paddingLeft",
793
+ px: "paddingX",
794
+ py: "paddingY"
795
+ };
796
+ var multiples = {
797
+ marginX: ["marginLeft", "marginRight"],
798
+ marginY: ["marginTop", "marginBottom"],
799
+ paddingX: ["paddingLeft", "paddingRight"],
800
+ paddingY: ["paddingTop", "paddingBottom"],
801
+ size: ["width", "height"]
802
+ };
803
+ var scales = {
804
+ color: "colors",
805
+ backgroundColor: "colors",
806
+ borderColor: "colors",
807
+ margin: "space",
808
+ marginTop: "space",
809
+ marginRight: "space",
810
+ marginBottom: "space",
811
+ marginLeft: "space",
812
+ marginX: "space",
813
+ marginY: "space",
814
+ padding: "space",
815
+ paddingTop: "space",
816
+ paddingRight: "space",
817
+ paddingBottom: "space",
818
+ paddingLeft: "space",
819
+ paddingX: "space",
820
+ paddingY: "space",
821
+ top: "space",
822
+ right: "space",
823
+ bottom: "space",
824
+ left: "space",
825
+ gridGap: "space",
826
+ gridColumnGap: "space",
827
+ gridRowGap: "space",
828
+ gap: "space",
829
+ columnGap: "space",
830
+ rowGap: "space",
831
+ fontFamily: "fonts",
832
+ fontSize: "fontSizes",
833
+ fontWeight: "fontWeights",
834
+ lineHeight: "lineHeights",
835
+ letterSpacing: "letterSpacings",
836
+ border: "borders",
837
+ borderTop: "borders",
838
+ borderRight: "borders",
839
+ borderBottom: "borders",
840
+ borderLeft: "borders",
841
+ borderWidth: "borderWidths",
842
+ borderStyle: "borderStyles",
843
+ borderRadius: "radii",
844
+ borderTopRightRadius: "radii",
845
+ borderTopLeftRadius: "radii",
846
+ borderBottomRightRadius: "radii",
847
+ borderBottomLeftRadius: "radii",
848
+ borderTopWidth: "borderWidths",
849
+ borderTopColor: "colors",
850
+ borderTopStyle: "borderStyles",
851
+ borderBottomWidth: "borderWidths",
852
+ borderBottomColor: "colors",
853
+ borderBottomStyle: "borderStyles",
854
+ borderLeftWidth: "borderWidths",
855
+ borderLeftColor: "colors",
856
+ borderLeftStyle: "borderStyles",
857
+ borderRightWidth: "borderWidths",
858
+ borderRightColor: "colors",
859
+ borderRightStyle: "borderStyles",
860
+ outlineColor: "colors",
861
+ boxShadow: "shadows",
862
+ textShadow: "shadows",
863
+ zIndex: "zIndices",
864
+ width: "sizes",
865
+ minWidth: "sizes",
866
+ maxWidth: "sizes",
867
+ height: "sizes",
868
+ minHeight: "sizes",
869
+ maxHeight: "sizes",
870
+ flexBasis: "sizes",
871
+ size: "sizes",
872
+ // svg
873
+ fill: "colors",
874
+ stroke: "colors"
875
+ };
876
+ var positiveOrNegative = function positiveOrNegative2(scale, value) {
877
+ if (typeof value !== "number" || value >= 0) {
878
+ return get3(scale, value, value);
879
+ }
880
+ var absolute = Math.abs(value);
881
+ var n = get3(scale, absolute, absolute);
882
+ if (typeof n === "string")
883
+ return "-" + n;
884
+ return n * -1;
885
+ };
886
+ var transforms = ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "top", "bottom", "left", "right"].reduce(function(acc, curr) {
887
+ var _extends2;
888
+ return _extends({}, acc, (_extends2 = {}, _extends2[curr] = positiveOrNegative, _extends2));
889
+ }, {});
890
+ var responsive = function responsive2(styles) {
891
+ return function(theme) {
892
+ var next = {};
893
+ var breakpoints = get3(theme, "breakpoints", defaultBreakpoints);
894
+ var mediaQueries = [null].concat(breakpoints.map(function(n) {
895
+ return "@media screen and (min-width: " + n + ")";
896
+ }));
897
+ for (var key in styles) {
898
+ var value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
899
+ if (value == null)
900
+ continue;
901
+ if (!Array.isArray(value)) {
902
+ next[key] = value;
903
+ continue;
904
+ }
905
+ for (var i = 0; i < value.slice(0, mediaQueries.length).length; i++) {
906
+ var media = mediaQueries[i];
907
+ if (!media) {
908
+ next[key] = value[i];
909
+ continue;
910
+ }
911
+ next[media] = next[media] || {};
912
+ if (value[i] == null)
913
+ continue;
914
+ next[media][key] = value[i];
915
+ }
916
+ }
917
+ return next;
918
+ };
919
+ };
920
+ var css = function css2(args) {
921
+ return function(props) {
922
+ if (props === void 0) {
923
+ props = {};
924
+ }
925
+ var theme = _extends({}, defaultTheme, {}, props.theme || props);
926
+ var result = {};
927
+ var obj = typeof args === "function" ? args(theme) : args;
928
+ var styles = responsive(obj)(theme);
929
+ for (var key in styles) {
930
+ var x = styles[key];
931
+ var val = typeof x === "function" ? x(theme) : x;
932
+ if (key === "variant") {
933
+ var variant3 = css2(get3(theme, val))(theme);
934
+ result = _extends({}, result, {}, variant3);
935
+ continue;
936
+ }
937
+ if (val && typeof val === "object") {
938
+ result[key] = css2(val)(theme);
939
+ continue;
940
+ }
941
+ var prop = get3(aliases, key, key);
942
+ var scaleName = get3(scales, prop);
943
+ var scale = get3(theme, scaleName, get3(theme, prop, {}));
944
+ var transform = get3(transforms, prop, get3);
945
+ var value = transform(scale, val, val);
946
+ if (multiples[prop]) {
947
+ var dirs = multiples[prop];
948
+ for (var i = 0; i < dirs.length; i++) {
949
+ result[dirs[i]] = value;
950
+ }
951
+ } else {
952
+ result[prop] = value;
953
+ }
954
+ }
955
+ return result;
956
+ };
957
+ };
958
+ var index_esm_default9 = css;
959
+
960
+ // ../../node_modules/@styled-system/variant/dist/index.esm.js
961
+ var variant = function variant2(_ref) {
962
+ var _config;
963
+ 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;
964
+ var sx;
965
+ if (Object.keys(variants).length) {
966
+ sx = function sx2(value, scale2, props) {
967
+ return index_esm_default9(get(scale2, value, null))(props.theme);
968
+ };
969
+ } else {
970
+ sx = function sx2(value, scale2) {
971
+ return get(scale2, value, null);
972
+ };
973
+ }
974
+ sx.scale = scale || key;
975
+ sx.defaults = variants;
976
+ var config9 = (_config = {}, _config[prop] = sx, _config);
977
+ var parser = createParser(config9);
978
+ return parser;
979
+ };
980
+ var buttonStyle = variant({
981
+ key: "buttons"
982
+ });
983
+ var textStyle = variant({
984
+ key: "textStyles",
985
+ prop: "textStyle"
986
+ });
987
+ var colorStyle = variant({
988
+ key: "colorStyles",
989
+ prop: "colors"
990
+ });
991
+
992
+ // ../../node_modules/styled-system/dist/index.esm.js
993
+ var width = index_esm_default.width;
994
+ var height = index_esm_default.height;
995
+ var minWidth = index_esm_default.minWidth;
996
+ var minHeight = index_esm_default.minHeight;
997
+ var maxWidth = index_esm_default.maxWidth;
998
+ var maxHeight = index_esm_default.maxHeight;
999
+ var size = index_esm_default.size;
1000
+ var verticalAlign = index_esm_default.verticalAlign;
1001
+ var display = index_esm_default.display;
1002
+ var overflow = index_esm_default.overflow;
1003
+ var overflowX = index_esm_default.overflowX;
1004
+ var overflowY = index_esm_default.overflowY;
1005
+ var opacity = index_esm_default2.opacity;
1006
+ var fontSize = index_esm_default3.fontSize;
1007
+ var fontFamily = index_esm_default3.fontFamily;
1008
+ var fontWeight = index_esm_default3.fontWeight;
1009
+ var lineHeight = index_esm_default3.lineHeight;
1010
+ var textAlign = index_esm_default3.textAlign;
1011
+ var fontStyle = index_esm_default3.fontStyle;
1012
+ var letterSpacing = index_esm_default3.letterSpacing;
1013
+ var alignItems = index_esm_default4.alignItems;
1014
+ var alignContent = index_esm_default4.alignContent;
1015
+ var justifyItems = index_esm_default4.justifyItems;
1016
+ var justifyContent = index_esm_default4.justifyContent;
1017
+ var flexWrap = index_esm_default4.flexWrap;
1018
+ var flexDirection = index_esm_default4.flexDirection;
1019
+ var flex = index_esm_default4.flex;
1020
+ var flexGrow = index_esm_default4.flexGrow;
1021
+ var flexShrink = index_esm_default4.flexShrink;
1022
+ var flexBasis = index_esm_default4.flexBasis;
1023
+ var justifySelf = index_esm_default4.justifySelf;
1024
+ var alignSelf = index_esm_default4.alignSelf;
1025
+ var order = index_esm_default4.order;
1026
+ var gridGap = index_esm_default5.gridGap;
1027
+ var gridColumnGap = index_esm_default5.gridColumnGap;
1028
+ var gridRowGap = index_esm_default5.gridRowGap;
1029
+ var gridColumn = index_esm_default5.gridColumn;
1030
+ var gridRow = index_esm_default5.gridRow;
1031
+ var gridAutoFlow = index_esm_default5.gridAutoFlow;
1032
+ var gridAutoColumns = index_esm_default5.gridAutoColumns;
1033
+ var gridAutoRows = index_esm_default5.gridAutoRows;
1034
+ var gridTemplateColumns = index_esm_default5.gridTemplateColumns;
1035
+ var gridTemplateRows = index_esm_default5.gridTemplateRows;
1036
+ var gridTemplateAreas = index_esm_default5.gridTemplateAreas;
1037
+ var gridArea = index_esm_default5.gridArea;
1038
+ var borderWidth = index_esm_default6.borderWidth;
1039
+ var borderStyle = index_esm_default6.borderStyle;
1040
+ var borderColor = index_esm_default6.borderColor;
1041
+ var borderTop = index_esm_default6.borderTop;
1042
+ var borderRight = index_esm_default6.borderRight;
1043
+ var borderBottom = index_esm_default6.borderBottom;
1044
+ var borderLeft = index_esm_default6.borderLeft;
1045
+ var borderRadius = index_esm_default6.borderRadius;
1046
+ var backgroundImage = index_esm_default7.backgroundImage;
1047
+ var backgroundSize = index_esm_default7.backgroundSize;
1048
+ var backgroundPosition = index_esm_default7.backgroundPosition;
1049
+ var backgroundRepeat = index_esm_default7.backgroundRepeat;
1050
+ var zIndex = index_esm_default8.zIndex;
1051
+ var top = index_esm_default8.top;
1052
+ var right = index_esm_default8.right;
1053
+ var bottom = index_esm_default8.bottom;
1054
+ var left = index_esm_default8.left;
1055
+
1056
+ // src/styles.tsx
1057
+ var import_seeds_react_mixins = require("@sproutsocial/seeds-react-mixins");
1058
+ var import_seeds_react_icon = __toESM(require("@sproutsocial/seeds-react-icon"));
1059
+ var StyledCardContent = import_styled_components.default.div`
1060
+ display: flex;
1061
+ flex-direction: column;
1062
+ padding: ${({ theme }) => theme.space[400]};
1063
+ box-sizing: border-box;
1064
+
1065
+ ${border}
1066
+ ${color}
1067
+ ${flexbox}
1068
+ ${grid}
1069
+ ${layout}
1070
+ ${space}
1071
+ `;
1072
+ var StyledCardHeader = (0, import_styled_components.default)(StyledCardContent)`
1073
+ flex-direction: row;
1074
+ border-bottom: ${({ theme }) => `${theme.borderWidths[500]} solid
1075
+ ${theme.colors.container.border.base}`};
1076
+ border-top-left-radius: ${({ theme }) => theme.radii.inner};
1077
+ border-top-right-radius: ${({ theme }) => theme.radii.inner};
1078
+
1079
+ ${border}
1080
+ ${color}
1081
+ ${flexbox}
1082
+ ${grid}
1083
+ ${layout}
1084
+ ${space}
1085
+ `;
1086
+ var StyledCardFooter = (0, import_styled_components.default)(StyledCardContent)`
1087
+ flex-direction: row;
1088
+ border-top: ${({ theme }) => `${theme.borderWidths[500]} solid
1089
+ ${theme.colors.container.border.base}`};
1090
+ border-bottom-left-radius: ${({ theme }) => theme.radii.inner};
1091
+ border-bottom-right-radius: ${({ theme }) => theme.radii.inner};
1092
+
1093
+ ${border}
1094
+ ${color}
1095
+ ${flexbox}
1096
+ ${grid}
1097
+ ${layout}
1098
+ ${space}
1099
+ `;
1100
+ var SelectedIconWrapper = import_styled_components.default.div`
1101
+ display: flex;
1102
+ align-items: center;
1103
+ justify-content: center;
1104
+ position: absolute;
1105
+ top: -8px;
1106
+ right: -8px;
1107
+ `;
1108
+ var StyledSelectedIcon = (0, import_styled_components.default)(import_seeds_react_icon.default)`
1109
+ border-radius: 50%;
1110
+ background: ${({ theme }) => theme.colors.container.background.base};
1111
+ opacity: 0;
1112
+ transition: opacity ${({ theme }) => theme.duration.medium};
1113
+
1114
+ ${({ $selected }) => $selected && `
1115
+ opacity: 1;
1116
+ `}
1117
+ `;
1118
+ var StyledCardLink = import_styled_components.default.a`
1119
+ font-family: ${(p) => p.theme.fontFamily};
1120
+ font-weight: ${(p) => p.theme.fontWeights.bold};
1121
+ color: ${(p) => p.theme.colors.text.headline};
1122
+ ${(p) => p.theme.typography[400]};
1123
+
1124
+ ${color}
1125
+ ${typography}
1126
+ `;
1127
+ var StyledCard = import_styled_components.default.div`
1128
+ position: relative;
1129
+ display: flex;
1130
+ flex-direction: column;
1131
+ box-sizing: border-box;
1132
+ margin: 0;
1133
+ background: ${({ theme }) => theme.colors.container.background.base};
1134
+ border: ${({ theme }) => theme.borderWidths[500]} solid
1135
+ ${({ theme }) => theme.colors.container.border.base};
1136
+ padding: ${({ theme, $compositionalComponents }) => $compositionalComponents ? 0 : theme.space[400]};
1137
+ border-radius: ${({ theme }) => theme.radii.outer};
1138
+ transition: box-shadow ${({ theme }) => theme.duration.medium},
1139
+ border ${({ theme }) => theme.duration.medium};
1140
+
1141
+ &[role="button"],
1142
+ &[role="checkbox"] {
1143
+ cursor: pointer;
1144
+ }
1145
+
1146
+ ${({ $isRoleLink }) => $isRoleLink && `
1147
+ cursor: pointer;
1148
+ `}
1149
+
1150
+ &:hover {
1151
+ box-shadow: ${({ theme, $elevation = "low" }) => theme.shadows[$elevation]};
1152
+ }
1153
+
1154
+ &:focus-within {
1155
+ ${({ $isRoleLink }) => $isRoleLink ? import_seeds_react_mixins.focusRing : null}
1156
+ ${StyledCardLink}:focus {
1157
+ border: none;
1158
+ box-shadow: none;
1159
+ outline: none;
1160
+ }
1161
+ }
1162
+
1163
+ &:focus {
1164
+ ${import_seeds_react_mixins.focusRing}
1165
+ }
1166
+
1167
+ ${({ $disabled }) => $disabled && `
1168
+ ${import_seeds_react_mixins.disabled}
1169
+ `}
1170
+
1171
+ ${({ $selected, theme }) => $selected && `
1172
+ border: ${theme.borderWidths[500]} solid ${theme.colors.container.border.selected};
1173
+ `}
1174
+
1175
+ ${border}
1176
+ ${color}
1177
+ ${flexbox}
1178
+ ${grid}
1179
+ ${layout}
1180
+ ${position}
1181
+ ${space}
1182
+ `;
1183
+ var StyledCardAffordance = (0, import_styled_components.default)(import_seeds_react_icon.default)`
1184
+ ${StyledCard}:hover & {
1185
+ transform: translateX(${(p) => p.theme.space[200]});
1186
+ }
1187
+ transition: ${(p) => p.theme.duration.medium};
1188
+ `;
1189
+
1190
+ // src/utils.ts
1191
+ var import_react = require("react");
1192
+ var import_seeds_react_utilities = require("@sproutsocial/seeds-react-utilities");
1193
+ var SubComponentContext = (0, import_react.createContext)({
1194
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1195
+ setHasSubComponent: () => {
1196
+ },
1197
+ href: "",
1198
+ linkRef: null
1199
+ });
1200
+ function useChildContext() {
1201
+ const { setHasSubComponent } = (0, import_react.useContext)(SubComponentContext);
1202
+ (0, import_react.useEffect)(() => {
1203
+ setHasSubComponent && setHasSubComponent(true);
1204
+ }, [setHasSubComponent]);
1205
+ }
1206
+ var navigateTo = ({ e, href, ref }) => {
1207
+ const { target } = e;
1208
+ (0, import_seeds_react_utilities.assertIsElement)(target);
1209
+ if (ref.current?.contains(target)) {
1210
+ if (target.getAttribute("onclick") !== null || target.getAttribute("href") !== null) {
1211
+ e.stopPropagation();
1212
+ return;
1213
+ }
1214
+ }
1215
+ window.open(href, "_blank")?.focus();
1216
+ };
1217
+ var onKeyDown = ({ e, href, onClick, ref, role }) => {
1218
+ if (e?.key === "Enter") {
1219
+ if (role === "link") {
1220
+ return navigateTo({ e, href, ref });
1221
+ }
1222
+ if (role === "presentation") {
1223
+ return;
1224
+ }
1225
+ return onClick?.(e);
1226
+ }
1227
+ };
1228
+
1229
+ // src/subComponents.tsx
1230
+ var import_react2 = require("react");
1231
+ var import_jsx_runtime = require("react/jsx-runtime");
1232
+ var CardContent = ({
1233
+ children,
1234
+ ...rest
1235
+ }) => {
1236
+ useChildContext();
1237
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledCardContent, { ...rest, children });
1238
+ };
1239
+ var CardHeader = ({
1240
+ children,
1241
+ ...rest
1242
+ }) => {
1243
+ useChildContext();
1244
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledCardHeader, { ...rest, children });
1245
+ };
1246
+ var CardFooter = ({
1247
+ children,
1248
+ ...rest
1249
+ }) => {
1250
+ useChildContext();
1251
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StyledCardFooter, { ...rest, children });
1252
+ };
1253
+ var SelectedIcon = ({ $selected }) => {
1254
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectedIconWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1255
+ StyledSelectedIcon,
1256
+ {
1257
+ "aria-hidden": true,
1258
+ color: "icon.base",
1259
+ name: "circle-check-solid",
1260
+ $selected
1261
+ }
1262
+ ) });
1263
+ };
1264
+ var CardAffordance = ({ ...rest }) => {
1265
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1266
+ StyledCardAffordance,
1267
+ {
1268
+ ...rest,
1269
+ size: "mini",
1270
+ name: "arrow-right-solid",
1271
+ "aria-hidden": true
1272
+ }
1273
+ );
1274
+ };
1275
+ var CardLink = ({
1276
+ affordance,
1277
+ children,
1278
+ external = false,
1279
+ color: color2,
1280
+ ...rest
1281
+ }) => {
1282
+ const { href, linkRef } = (0, import_react2.useContext)(SubComponentContext);
1283
+ const handleClick = (e) => {
1284
+ e.stopPropagation();
1285
+ };
1286
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1287
+ StyledCardLink,
1288
+ {
1289
+ ...rest,
1290
+ target: external ? "_blank" : void 0,
1291
+ rel: external ? "noreferrer" : void 0,
1292
+ href,
1293
+ onClick: handleClick,
1294
+ ref: linkRef,
1295
+ color: color2,
1296
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1297
+ children,
1298
+ affordance ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardAffordance, { ml: 300 }) : null
1299
+ ] })
1300
+ }
1301
+ );
1302
+ };
1303
+
1304
+ // src/Card.tsx
1305
+ var import_jsx_runtime2 = require("react/jsx-runtime");
1306
+ var Card = ({
1307
+ children,
1308
+ disabled: disabled2 = false,
1309
+ elevation,
1310
+ href,
1311
+ onClick,
1312
+ role = "presentation",
1313
+ selected,
1314
+ ...rest
1315
+ }) => {
1316
+ const [hasSubComponent, setHasSubComponent] = (0, import_react3.useState)(false);
1317
+ const containerRef = (0, import_react3.useRef)(null);
1318
+ const linkRef = (0, import_react3.useRef)(null);
1319
+ const isRoleLink = role === "link";
1320
+ const checkedConditions = role === "checkbox" ? selected : void 0;
1321
+ const cardContext = {
1322
+ setHasSubComponent,
1323
+ href,
1324
+ linkRef
1325
+ };
1326
+ const handleClickConditions = (e) => isRoleLink ? linkRef.current?.click() : onClick?.(e);
1327
+ const handleKeyDown = (e) => onKeyDown({ e, href, onClick, ref: containerRef, role });
1328
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1329
+ StyledCard,
1330
+ {
1331
+ tabIndex: isRoleLink ? -1 : 0,
1332
+ role: isRoleLink ? void 0 : role,
1333
+ onClick: handleClickConditions,
1334
+ onKeyDown: handleKeyDown,
1335
+ $elevation: elevation,
1336
+ ref: containerRef,
1337
+ $selected: selected,
1338
+ "aria-checked": checkedConditions,
1339
+ $disabled: disabled2,
1340
+ "aria-disabled": disabled2 && disabled2,
1341
+ $compositionalComponents: hasSubComponent,
1342
+ $isRoleLink: isRoleLink,
1343
+ ...rest,
1344
+ children: [
1345
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SelectedIcon, { $selected: selected }),
1346
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SubComponentContext.Provider, { value: cardContext, children })
1347
+ ]
1348
+ }
1349
+ );
1350
+ };
1351
+ var Card_default = Card;
1352
+
1353
+ // src/CardTypes.ts
1354
+ var React3 = require("react");
1355
+
1356
+ // src/index.ts
1357
+ var src_default = Card_default;
1358
+ // Annotate the CommonJS export names for ESM import in node:
1359
+ 0 && (module.exports = {
1360
+ Card,
1361
+ CardContent,
1362
+ CardFooter,
1363
+ CardHeader,
1364
+ CardLink
1365
+ });
1366
+ /*! Bundled license information:
1367
+
1368
+ object-assign/index.js:
1369
+ (*
1370
+ object-assign
1371
+ (c) Sindre Sorhus
1372
+ @license MIT
1373
+ *)
1374
+ */
1375
+ //# sourceMappingURL=index.js.map