@fiscozen/card 1.0.1 → 1.1.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/card.js ADDED
@@ -0,0 +1,1120 @@
1
+ import { defineComponent as E, computed as r, createBlock as d, openBlock as n, resolveDynamicComponent as T, normalizeClass as s, withCtx as F, renderSlot as g, ref as B, onMounted as R, onUnmounted as Q, useSlots as Y, watch as q, createElementBlock as b, createCommentVNode as p, withDirectives as N, createElementVNode as w, toDisplayString as G, unref as i, withModifiers as P, vShow as $, createVNode as U } from "vue";
2
+ import { FzIconButton as k, FzButton as H } from "@fiscozen/button";
3
+ const J = /* @__PURE__ */ E({
4
+ __name: "FzContainer",
5
+ props: {
6
+ main: { type: Boolean, default: !1 },
7
+ gap: { default: "base" },
8
+ tag: { default: "div" },
9
+ alignItems: { default: void 0 },
10
+ horizontal: { type: Boolean, default: !1 },
11
+ layout: {}
12
+ },
13
+ setup(e) {
14
+ const a = e, l = r(() => a.alignItems ?? (a.horizontal ? "center" : "stretch"));
15
+ if (!a.horizontal && "layout" in a) {
16
+ const o = a.layout;
17
+ o && o !== "default" && console.error(
18
+ `[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${a.horizontal}, layout: "${o}".`
19
+ );
20
+ }
21
+ const t = r(() => {
22
+ const o = a.main ? "main-content" : "section-content", y = [
23
+ a.horizontal ? "fz-container--horizontal" : "fz-container--vertical",
24
+ `gap-${o}-${a.gap}`,
25
+ `align-items-${l.value}`
26
+ ];
27
+ if (a.horizontal) {
28
+ const v = ("layout" in a ? a.layout : void 0) || "default";
29
+ y.push(`layout-${v}`);
30
+ }
31
+ return y;
32
+ });
33
+ return (o, c) => (n(), d(T(a.tag), {
34
+ class: s(["fz-container", t.value])
35
+ }, {
36
+ default: F(() => [
37
+ g(o.$slots, "default", {}, void 0, !0)
38
+ ]),
39
+ _: 3
40
+ }, 8, ["class"]));
41
+ }
42
+ }), K = (e, a) => {
43
+ const l = e.__vccOpts || e;
44
+ for (const [t, o] of a)
45
+ l[t] = o;
46
+ return l;
47
+ }, X = /* @__PURE__ */ K(J, [["__scopeId", "data-v-8c40daeb"]]);
48
+ new DOMRect(0, 0, window.innerWidth, window.innerHeight);
49
+ function Z(e) {
50
+ const a = window.matchMedia(e), l = B(a.matches);
51
+ function t(o) {
52
+ l.value = o.matches;
53
+ }
54
+ return R(() => {
55
+ a.addEventListener("change", t);
56
+ }), Q(() => {
57
+ a.removeEventListener("change", t);
58
+ }), r(() => l.value);
59
+ }
60
+ const _ = {
61
+ blue: {
62
+ 50: {
63
+ value: "#eff1ff",
64
+ type: "color"
65
+ },
66
+ 100: {
67
+ value: "#dee2ff",
68
+ type: "color"
69
+ },
70
+ 200: {
71
+ value: "#bdc5ff",
72
+ type: "color"
73
+ },
74
+ 300: {
75
+ value: "#9ca8ff",
76
+ type: "color"
77
+ },
78
+ 400: {
79
+ value: "#7b8bff",
80
+ type: "color"
81
+ },
82
+ 500: {
83
+ value: "#5a6eff",
84
+ type: "color"
85
+ },
86
+ 600: {
87
+ value: "#4858cc",
88
+ type: "color"
89
+ },
90
+ 700: {
91
+ value: "#364299",
92
+ type: "color"
93
+ },
94
+ 800: {
95
+ value: "#242c66",
96
+ type: "color"
97
+ },
98
+ 900: {
99
+ value: "#1b214c",
100
+ type: "color"
101
+ }
102
+ },
103
+ purple: {
104
+ 50: {
105
+ value: "#f8f4ff",
106
+ type: "color"
107
+ },
108
+ 100: {
109
+ value: "#f0e9ff",
110
+ type: "color"
111
+ },
112
+ 200: {
113
+ value: "#e1d3ff",
114
+ type: "color"
115
+ },
116
+ 300: {
117
+ value: "#d2bdff",
118
+ type: "color"
119
+ },
120
+ 400: {
121
+ value: "#c3a7ff",
122
+ type: "color"
123
+ },
124
+ 500: {
125
+ value: "#b491ff",
126
+ type: "color"
127
+ },
128
+ 600: {
129
+ value: "#9074cc",
130
+ type: "color"
131
+ },
132
+ 700: {
133
+ value: "#6c5799",
134
+ type: "color"
135
+ },
136
+ 800: {
137
+ value: "#483a66",
138
+ type: "color"
139
+ },
140
+ 900: {
141
+ value: "#241d33",
142
+ type: "color"
143
+ }
144
+ },
145
+ orange: {
146
+ 50: {
147
+ value: "#fff2ef",
148
+ type: "color"
149
+ },
150
+ 100: {
151
+ value: "#ffe4de",
152
+ type: "color"
153
+ },
154
+ 200: {
155
+ value: "#ffc9bd",
156
+ type: "color"
157
+ },
158
+ 300: {
159
+ value: "#ffae9c",
160
+ type: "color"
161
+ },
162
+ 400: {
163
+ value: "#ff937b",
164
+ type: "color"
165
+ },
166
+ 500: {
167
+ value: "#ff785a",
168
+ type: "color"
169
+ },
170
+ 600: {
171
+ value: "#cc6048",
172
+ type: "color"
173
+ },
174
+ 700: {
175
+ value: "#994836",
176
+ type: "color"
177
+ },
178
+ 800: {
179
+ value: "#663024",
180
+ type: "color"
181
+ },
182
+ 900: {
183
+ value: "#331812",
184
+ type: "color"
185
+ }
186
+ },
187
+ pink: {
188
+ 50: {
189
+ value: "#fff5f5",
190
+ type: "color"
191
+ },
192
+ 100: {
193
+ value: "#ffe0e0",
194
+ type: "color"
195
+ },
196
+ 200: {
197
+ value: "#ffcbcb",
198
+ type: "color"
199
+ },
200
+ 300: {
201
+ value: "#ffc0c0",
202
+ type: "color"
203
+ },
204
+ 400: {
205
+ value: "#ffabab",
206
+ type: "color"
207
+ },
208
+ 500: {
209
+ value: "#ff9696",
210
+ type: "color"
211
+ },
212
+ 600: {
213
+ value: "#cc7878",
214
+ type: "color"
215
+ },
216
+ 700: {
217
+ value: "#995a5a",
218
+ type: "color"
219
+ },
220
+ 800: {
221
+ value: "#663c3c",
222
+ type: "color"
223
+ },
224
+ 900: {
225
+ value: "#331e1e",
226
+ type: "color"
227
+ }
228
+ },
229
+ yellow: {
230
+ 50: {
231
+ value: "#fffbf4",
232
+ type: "color"
233
+ },
234
+ 100: {
235
+ value: "#fff3de",
236
+ type: "color"
237
+ },
238
+ 200: {
239
+ value: "#ffebc8",
240
+ type: "color"
241
+ },
242
+ 300: {
243
+ value: "#ffe7bd",
244
+ type: "color"
245
+ },
246
+ 400: {
247
+ value: "#ffdfa7",
248
+ type: "color"
249
+ },
250
+ 500: {
251
+ value: "#ffd791",
252
+ type: "color"
253
+ },
254
+ 600: {
255
+ value: "#ccac74",
256
+ type: "color"
257
+ },
258
+ 700: {
259
+ value: "#998157",
260
+ type: "color"
261
+ },
262
+ 800: {
263
+ value: "#806c49",
264
+ type: "color"
265
+ },
266
+ 900: {
267
+ value: "#4c402b",
268
+ type: "color"
269
+ }
270
+ },
271
+ semantic: {
272
+ error: {
273
+ 50: {
274
+ value: "#fef3f3",
275
+ type: "color"
276
+ },
277
+ 100: {
278
+ value: "#f8baba",
279
+ type: "color"
280
+ },
281
+ 200: {
282
+ value: "#f04242",
283
+ type: "color"
284
+ },
285
+ 300: {
286
+ value: "#aa2f2f",
287
+ type: "color"
288
+ }
289
+ },
290
+ warning: {
291
+ 50: {
292
+ value: "#fff8f3",
293
+ type: "color"
294
+ },
295
+ 100: {
296
+ value: "#ffdabd",
297
+ type: "color"
298
+ },
299
+ 200: {
300
+ value: "#ffae4f",
301
+ type: "color"
302
+ },
303
+ 300: {
304
+ value: "#b47b38",
305
+ type: "color"
306
+ }
307
+ },
308
+ success: {
309
+ 50: {
310
+ value: "#f2f8f6",
311
+ type: "color"
312
+ },
313
+ 100: {
314
+ value: "#b5d8ce",
315
+ type: "color"
316
+ },
317
+ 200: {
318
+ value: "#0fa88c",
319
+ type: "color"
320
+ },
321
+ 300: {
322
+ value: "#0b7763",
323
+ type: "color"
324
+ }
325
+ },
326
+ info: {
327
+ 50: {
328
+ value: "#f3f7ff",
329
+ type: "color"
330
+ },
331
+ 100: {
332
+ value: "#b4c8e1",
333
+ type: "color"
334
+ },
335
+ 200: {
336
+ value: "#4e9fff",
337
+ type: "color"
338
+ },
339
+ 300: {
340
+ value: "#3770b4",
341
+ type: "color"
342
+ }
343
+ }
344
+ },
345
+ background: {
346
+ "white-smoke": {
347
+ value: "#f7f6f3",
348
+ type: "color"
349
+ },
350
+ seashell: {
351
+ value: "#f8ece7",
352
+ type: "color"
353
+ },
354
+ "pale-purple": {
355
+ value: "#f2e6ff",
356
+ type: "color"
357
+ },
358
+ "alice-blue": {
359
+ value: "#ecf2fc",
360
+ type: "color"
361
+ }
362
+ },
363
+ grey: {
364
+ 100: {
365
+ value: "#e9edf0",
366
+ type: "color"
367
+ },
368
+ 200: {
369
+ value: "#d1dde6",
370
+ type: "color"
371
+ },
372
+ 300: {
373
+ value: "#9da9b2",
374
+ type: "color"
375
+ },
376
+ 400: {
377
+ value: "#6e777e",
378
+ type: "color"
379
+ },
380
+ 500: {
381
+ value: "#596167",
382
+ type: "color"
383
+ }
384
+ },
385
+ core: {
386
+ white: {
387
+ value: "#ffffff",
388
+ type: "color"
389
+ },
390
+ black: {
391
+ value: "#2c282f",
392
+ type: "color"
393
+ }
394
+ },
395
+ "font-sans": {
396
+ "sharp-grotesk": {
397
+ value: '"Sharp Grotesk", sans-serif',
398
+ type: "fontFamilies"
399
+ },
400
+ inter: {
401
+ value: '"Inter", sans-serif',
402
+ type: "fontFamilies"
403
+ }
404
+ },
405
+ font: {
406
+ light: {
407
+ value: "300",
408
+ type: "fontWeights"
409
+ },
410
+ normal: {
411
+ value: "400",
412
+ type: "fontWeights"
413
+ },
414
+ medium: {
415
+ value: "500",
416
+ type: "fontWeights"
417
+ }
418
+ },
419
+ spacing: {
420
+ 0: {
421
+ value: "0px",
422
+ type: "spacing"
423
+ },
424
+ 1: {
425
+ value: "1px",
426
+ type: "spacing"
427
+ },
428
+ 2: {
429
+ value: "2px",
430
+ type: "spacing"
431
+ },
432
+ 4: {
433
+ value: "4px",
434
+ type: "spacing"
435
+ },
436
+ 6: {
437
+ value: "6px",
438
+ type: "spacing"
439
+ },
440
+ 8: {
441
+ value: "8px",
442
+ type: "spacing"
443
+ },
444
+ 10: {
445
+ value: "10px",
446
+ type: "spacing"
447
+ },
448
+ 12: {
449
+ value: "12px",
450
+ type: "spacing"
451
+ },
452
+ 14: {
453
+ value: "14px",
454
+ type: "spacing"
455
+ },
456
+ 16: {
457
+ value: "16px",
458
+ type: "spacing"
459
+ },
460
+ 20: {
461
+ value: "20px",
462
+ type: "spacing"
463
+ },
464
+ 24: {
465
+ value: "24px",
466
+ type: "spacing"
467
+ },
468
+ 28: {
469
+ value: "28px",
470
+ type: "spacing"
471
+ },
472
+ 32: {
473
+ value: "32px",
474
+ type: "spacing"
475
+ },
476
+ 36: {
477
+ value: "36px",
478
+ type: "spacing"
479
+ },
480
+ 40: {
481
+ value: "40px",
482
+ type: "spacing"
483
+ },
484
+ 44: {
485
+ value: "44px",
486
+ type: "spacing"
487
+ },
488
+ 48: {
489
+ value: "48px",
490
+ type: "spacing"
491
+ },
492
+ 56: {
493
+ value: "56px",
494
+ type: "spacing"
495
+ },
496
+ 64: {
497
+ value: "64px",
498
+ type: "spacing"
499
+ },
500
+ 80: {
501
+ value: "80px",
502
+ type: "spacing"
503
+ },
504
+ 96: {
505
+ value: "96px",
506
+ type: "spacing"
507
+ },
508
+ 112: {
509
+ value: "112px",
510
+ type: "spacing"
511
+ },
512
+ 128: {
513
+ value: "128px",
514
+ type: "spacing"
515
+ },
516
+ 144: {
517
+ value: "144px",
518
+ type: "spacing"
519
+ },
520
+ 160: {
521
+ value: "160px",
522
+ type: "spacing"
523
+ },
524
+ 176: {
525
+ value: "176px",
526
+ type: "spacing"
527
+ },
528
+ 192: {
529
+ value: "192px",
530
+ type: "spacing"
531
+ },
532
+ 208: {
533
+ value: "208px",
534
+ type: "spacing"
535
+ },
536
+ 224: {
537
+ value: "224px",
538
+ type: "spacing"
539
+ },
540
+ 240: {
541
+ value: "240px",
542
+ type: "spacing"
543
+ },
544
+ 256: {
545
+ value: "256px",
546
+ type: "spacing"
547
+ },
548
+ 288: {
549
+ value: "288px",
550
+ type: "spacing"
551
+ },
552
+ 320: {
553
+ value: "320px",
554
+ type: "spacing"
555
+ },
556
+ 384: {
557
+ value: "384px",
558
+ type: "spacing"
559
+ }
560
+ },
561
+ border: {
562
+ 0: {
563
+ value: "0px",
564
+ type: "borderWidth"
565
+ },
566
+ 1: {
567
+ value: "1px",
568
+ type: "borderWidth"
569
+ },
570
+ 2: {
571
+ value: "2px",
572
+ type: "borderWidth"
573
+ },
574
+ 4: {
575
+ value: "4px",
576
+ type: "borderWidth"
577
+ },
578
+ 8: {
579
+ value: "8px",
580
+ type: "borderWidth"
581
+ }
582
+ },
583
+ rounded: {
584
+ none: {
585
+ value: "0px",
586
+ type: "borderRadius"
587
+ },
588
+ sm: {
589
+ value: "2px",
590
+ type: "borderRadius"
591
+ },
592
+ base: {
593
+ value: "4px",
594
+ type: "borderRadius"
595
+ },
596
+ md: {
597
+ value: "6px",
598
+ type: "borderRadius"
599
+ },
600
+ lg: {
601
+ value: "8px",
602
+ type: "borderRadius"
603
+ },
604
+ xl: {
605
+ value: "12px",
606
+ type: "borderRadius"
607
+ },
608
+ "2xl": {
609
+ value: "16px",
610
+ type: "borderRadius"
611
+ },
612
+ "3xl": {
613
+ value: "24px",
614
+ type: "borderRadius"
615
+ },
616
+ full: {
617
+ value: "9999px",
618
+ type: "borderRadius"
619
+ }
620
+ },
621
+ breakpoint: {
622
+ xs: {
623
+ value: "376px",
624
+ type: "sizing"
625
+ },
626
+ sm: {
627
+ value: "640px",
628
+ type: "sizing"
629
+ },
630
+ md: {
631
+ value: "768px",
632
+ type: "sizing"
633
+ },
634
+ lg: {
635
+ value: "1024px",
636
+ type: "sizing"
637
+ },
638
+ xl: {
639
+ value: "1280px",
640
+ type: "sizing"
641
+ },
642
+ "2xl": {
643
+ value: "1440px",
644
+ type: "sizing"
645
+ },
646
+ "3xl": {
647
+ value: "1536px",
648
+ type: "sizing"
649
+ }
650
+ },
651
+ shadow: {
652
+ none: {
653
+ value: {
654
+ color: "#000000",
655
+ type: "dropShadow",
656
+ x: "0",
657
+ y: "0",
658
+ blur: "0",
659
+ spread: "0"
660
+ },
661
+ type: "boxShadow"
662
+ },
663
+ sm: {
664
+ value: {
665
+ color: "#0000000d",
666
+ type: "dropShadow",
667
+ x: "0",
668
+ y: "1",
669
+ blur: "2",
670
+ spread: "0"
671
+ },
672
+ type: "boxShadow"
673
+ },
674
+ base: {
675
+ value: [
676
+ {
677
+ color: "#0000000f",
678
+ type: "dropShadow",
679
+ x: "0",
680
+ y: "1",
681
+ blur: "2",
682
+ spread: "0"
683
+ },
684
+ {
685
+ color: "#0000001a",
686
+ type: "dropShadow",
687
+ x: "0",
688
+ y: "1",
689
+ blur: "3",
690
+ spread: "0"
691
+ }
692
+ ],
693
+ type: "boxShadow"
694
+ },
695
+ md: {
696
+ value: [
697
+ {
698
+ color: "#0000000f",
699
+ type: "dropShadow",
700
+ x: "0",
701
+ y: "2",
702
+ blur: "4",
703
+ spread: "-1"
704
+ },
705
+ {
706
+ color: "#0000001a",
707
+ type: "dropShadow",
708
+ x: "0",
709
+ y: "4",
710
+ blur: "6",
711
+ spread: "-1"
712
+ }
713
+ ],
714
+ type: "boxShadow"
715
+ },
716
+ lg: {
717
+ value: [
718
+ {
719
+ color: "#0000000d",
720
+ type: "dropShadow",
721
+ x: "0",
722
+ y: "4",
723
+ blur: "6",
724
+ spread: "-2"
725
+ },
726
+ {
727
+ color: "#0000001a",
728
+ type: "dropShadow",
729
+ x: "0",
730
+ y: "10",
731
+ blur: "15",
732
+ spread: "-3"
733
+ }
734
+ ],
735
+ type: "boxShadow"
736
+ },
737
+ xl: {
738
+ value: [
739
+ {
740
+ color: "#0000000a",
741
+ type: "dropShadow",
742
+ x: "0",
743
+ y: "10",
744
+ blur: "10",
745
+ spread: "-5"
746
+ },
747
+ {
748
+ color: "#0000001a",
749
+ type: "dropShadow",
750
+ x: "0",
751
+ y: "20",
752
+ blur: "25",
753
+ spread: "-5"
754
+ }
755
+ ],
756
+ type: "boxShadow"
757
+ },
758
+ "2xl": {
759
+ value: {
760
+ color: "#00000040",
761
+ type: "dropShadow",
762
+ x: "0",
763
+ y: "25",
764
+ blur: "50",
765
+ spread: "-12"
766
+ },
767
+ type: "boxShadow"
768
+ },
769
+ inner: {
770
+ value: {
771
+ color: "#0000000f",
772
+ type: "innerShadow",
773
+ x: "0",
774
+ y: "2",
775
+ blur: "4",
776
+ spread: "0"
777
+ },
778
+ type: "boxShadow"
779
+ }
780
+ },
781
+ underline: {
782
+ value: "underline",
783
+ type: "textDecoration"
784
+ },
785
+ text: {
786
+ xs: {
787
+ value: "12px",
788
+ type: "fontSizes"
789
+ },
790
+ sm: {
791
+ value: "14px",
792
+ type: "fontSizes"
793
+ },
794
+ base: {
795
+ value: "16px",
796
+ type: "fontSizes"
797
+ },
798
+ lg: {
799
+ value: "18px",
800
+ type: "fontSizes"
801
+ },
802
+ xl: {
803
+ value: "20px",
804
+ type: "fontSizes"
805
+ },
806
+ "2xl": {
807
+ value: "24px",
808
+ type: "fontSizes"
809
+ },
810
+ "3xl": {
811
+ value: "30px",
812
+ type: "fontSizes"
813
+ },
814
+ "4xl": {
815
+ value: "36px",
816
+ type: "fontSizes"
817
+ },
818
+ "5xl": {
819
+ value: "48px",
820
+ type: "fontSizes"
821
+ },
822
+ "6xl": {
823
+ value: "60px",
824
+ type: "fontSizes"
825
+ },
826
+ "7xl": {
827
+ value: "72px",
828
+ type: "fontSizes"
829
+ },
830
+ "8xl": {
831
+ value: "96px",
832
+ type: "fontSizes"
833
+ },
834
+ "9xl": {
835
+ value: "128px",
836
+ type: "fontSizes"
837
+ }
838
+ },
839
+ leading: {
840
+ xs: {
841
+ value: "16px",
842
+ type: "lineHeights"
843
+ },
844
+ sm: {
845
+ value: "18px",
846
+ type: "lineHeights"
847
+ },
848
+ base: {
849
+ value: "20px",
850
+ type: "lineHeights"
851
+ },
852
+ lg: {
853
+ value: "24px",
854
+ type: "lineHeights"
855
+ },
856
+ xl: {
857
+ value: "28px",
858
+ type: "lineHeights"
859
+ },
860
+ "2xl": {
861
+ value: "32px",
862
+ type: "lineHeights"
863
+ },
864
+ "3xl": {
865
+ value: "36px",
866
+ type: "lineHeights"
867
+ },
868
+ "4xl": {
869
+ value: "40px",
870
+ type: "lineHeights"
871
+ },
872
+ "5xl": {
873
+ value: "48px",
874
+ type: "lineHeights"
875
+ },
876
+ "6xl": {
877
+ value: "60px",
878
+ type: "lineHeights"
879
+ },
880
+ "7xl": {
881
+ value: "72px",
882
+ type: "lineHeights"
883
+ },
884
+ "8xl": {
885
+ value: "96px",
886
+ type: "lineHeights"
887
+ },
888
+ "9xl": {
889
+ value: "128px",
890
+ type: "lineHeights"
891
+ }
892
+ }
893
+ }, z = {
894
+ global: _
895
+ }, ee = [
896
+ "blue",
897
+ "purple",
898
+ "orange",
899
+ "pink",
900
+ "yellow",
901
+ "grey",
902
+ "core"
903
+ ], oe = {
904
+ safeColorNames: ee
905
+ }, ae = [
906
+ "error",
907
+ "warning",
908
+ "success",
909
+ "info"
910
+ ], le = {
911
+ semanticColorNames: ae
912
+ }, te = oe.safeColorNames, re = le.semanticColorNames, x = {};
913
+ te.forEach((e) => {
914
+ const a = z.global[e];
915
+ a && Object.keys(a).forEach((l) => {
916
+ var o;
917
+ const t = (o = a[l]) == null ? void 0 : o.value;
918
+ t && (x[e] || (x[e] = {}), x[e][l] = t);
919
+ });
920
+ });
921
+ const O = z.global.semantic;
922
+ O && re.forEach((e) => {
923
+ const a = O[e];
924
+ a && typeof a == "object" && Object.keys(a).forEach((l) => {
925
+ var o;
926
+ const t = (o = a[l]) == null ? void 0 : o.value;
927
+ if (t) {
928
+ const c = `semantic-${e}`;
929
+ x[c] || (x[c] = {}), x[c][l] = t;
930
+ }
931
+ });
932
+ });
933
+ const ne = Object.entries(z.global.breakpoint).reduce(
934
+ (e, [a, l]) => (e[a] = l.value, e),
935
+ {}
936
+ ), ce = ["title"], ie = { class: "flex flex-row gap-8 items-start" }, se = "border-1 border-solid rounded flex flex-col", pe = "border-solid pt-16 px-16 flex flex-row justify-between", ue = "border-solid pt-0 px-16 pb-16 flex gap-12 items-center", fe = /* @__PURE__ */ E({
937
+ __name: "FzCard",
938
+ props: {
939
+ title: {},
940
+ color: {},
941
+ primaryAction: {},
942
+ secondaryAction: {},
943
+ tertiaryAction: {},
944
+ contentClass: {},
945
+ collapsible: { type: Boolean },
946
+ defaultExpanded: { type: Boolean },
947
+ alwaysAlive: { type: Boolean },
948
+ hasInfoIcon: { type: Boolean },
949
+ environment: { default: "frontoffice" }
950
+ },
951
+ emits: ["fzprimary:click", "fzsecondary:click", "fztertiary:click", "fzcard:click-info"],
952
+ setup(e, { expose: a, emit: l }) {
953
+ const t = Z(`(max-width: ${ne.sm})`), o = e, c = l, y = Y(), v = B(o.defaultExpanded ?? !1);
954
+ q(
955
+ () => o.color === "aliceblue",
956
+ (f) => {
957
+ f && console.warn(
958
+ "[FzCard] The color prop value 'aliceblue' is deprecated and will be removed in a future version. Please use 'blue' instead. The component will automatically map 'aliceblue' to 'blue' for now."
959
+ );
960
+ },
961
+ { immediate: !0 }
962
+ );
963
+ const C = r(() => o.color === "aliceblue" ? "blue" : o.color), m = r(() => v.value || !o.collapsible), S = r(() => o.alwaysAlive || m.value), I = r(
964
+ () => o.title || y.header || y["header-content"]
965
+ ), W = r(() => [
966
+ o.collapsible ? "cursor-pointer" : ""
967
+ ]), j = r(() => o.environment === "backoffice" ? "py-2" : "py-8"), M = r(() => {
968
+ switch (C.value) {
969
+ case "blue":
970
+ return "bg-background-alice-blue";
971
+ case "orange":
972
+ return "bg-background-seashell";
973
+ case "purple":
974
+ return "bg-background-pale-purple";
975
+ case "grey":
976
+ return "bg-background-white-smoke";
977
+ case "yellow":
978
+ return "bg-semantic-warning-50";
979
+ case "red":
980
+ return "bg-semantic-error-50";
981
+ default:
982
+ return "bg-core-white";
983
+ }
984
+ }), D = r(() => "text-core-black"), L = r(() => {
985
+ switch (C.value) {
986
+ case "blue":
987
+ return "border-background-alice-blue";
988
+ case "orange":
989
+ return "border-background-seashell";
990
+ case "purple":
991
+ return "border-background-pale-purple";
992
+ case "grey":
993
+ return "border-background-white-smoke";
994
+ case "yellow":
995
+ return "border-semantic-warning-50";
996
+ case "red":
997
+ return "border-semantic-error-50";
998
+ default:
999
+ return "border-grey-100";
1000
+ }
1001
+ }), V = r(
1002
+ () => o.primaryAction !== void 0 || o.secondaryAction !== void 0 || o.tertiaryAction !== void 0
1003
+ );
1004
+ function A() {
1005
+ o.collapsible && (v.value = !v.value);
1006
+ }
1007
+ return R(() => {
1008
+ o.tertiaryAction && !o.secondaryAction && !o.primaryAction ? console.warn(
1009
+ "[Fiscozen Design System]: You should set primaryAction and secondaryAction if you want to set tertiaryAction"
1010
+ ) : o.secondaryAction && !o.primaryAction && console.warn(
1011
+ "[Fiscozen Design System]: You should set primaryAction if you want to set secondaryAction"
1012
+ );
1013
+ }), a({
1014
+ /**
1015
+ * Method to toggle the card open/closed state
1016
+ */
1017
+ toggleOpen: A
1018
+ }), (f, u) => (n(), b("section", {
1019
+ class: s([
1020
+ se,
1021
+ M.value,
1022
+ D.value,
1023
+ L.value,
1024
+ { "pb-16": !m.value }
1025
+ ])
1026
+ }, [
1027
+ I.value ? (n(), b("header", {
1028
+ key: 0,
1029
+ class: s([W.value]),
1030
+ onClick: A
1031
+ }, [
1032
+ w("div", {
1033
+ class: s(pe)
1034
+ }, [
1035
+ w("div", {
1036
+ class: s(["flex flex-row gap-12 items-start", j.value])
1037
+ }, [
1038
+ e.title ? (n(), b("h2", {
1039
+ key: 0,
1040
+ class: "text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink",
1041
+ title: e.title
1042
+ }, G(e.title), 9, ce)) : p("", !0),
1043
+ g(f.$slots, "header")
1044
+ ], 2),
1045
+ w("div", ie, [
1046
+ e.hasInfoIcon ? (n(), d(i(k), {
1047
+ key: 0,
1048
+ iconName: "circle-question",
1049
+ variant: "invisible",
1050
+ environment: e.environment,
1051
+ onClick: u[0] || (u[0] = P((h) => c("fzcard:click-info"), ["stop"]))
1052
+ }, null, 8, ["environment"])) : p("", !0),
1053
+ e.collapsible ? (n(), d(i(k), {
1054
+ key: 1,
1055
+ iconName: v.value ? "chevron-up" : "chevron-down",
1056
+ variant: "invisible",
1057
+ environment: e.environment
1058
+ }, null, 8, ["iconName", "environment"])) : p("", !0)
1059
+ ])
1060
+ ]),
1061
+ g(f.$slots, "header-content")
1062
+ ], 2)) : p("", !0),
1063
+ S.value ? N((n(), b("article", {
1064
+ key: 1,
1065
+ class: s(["p-16", e.contentClass])
1066
+ }, [
1067
+ g(f.$slots, "default")
1068
+ ], 2)), [
1069
+ [$, m.value]
1070
+ ]) : p("", !0),
1071
+ (y.footer || V.value) && S.value ? N((n(), b("footer", {
1072
+ key: 2,
1073
+ class: s([ue, { "justify-end": !i(t) }])
1074
+ }, [
1075
+ g(f.$slots, "footer", {}, () => [
1076
+ U(i(X), {
1077
+ horizontal: "",
1078
+ gap: "sm",
1079
+ class: s({ "w-full": i(t) })
1080
+ }, {
1081
+ default: F(() => [
1082
+ e.tertiaryAction ? (n(), d(i(k), {
1083
+ key: 0,
1084
+ onClick: u[1] || (u[1] = (h) => c("fztertiary:click")),
1085
+ iconName: e.tertiaryAction.icon,
1086
+ variant: "invisible",
1087
+ environment: e.environment,
1088
+ disabled: e.tertiaryAction.disabled
1089
+ }, null, 8, ["iconName", "environment", "disabled"])) : p("", !0),
1090
+ e.secondaryAction ? (n(), d(i(H), {
1091
+ key: 1,
1092
+ class: s({ "flex-grow": i(t) }),
1093
+ onClick: u[2] || (u[2] = (h) => c("fzsecondary:click")),
1094
+ label: e.secondaryAction.label,
1095
+ variant: "secondary",
1096
+ environment: e.environment,
1097
+ disabled: e.secondaryAction.disabled
1098
+ }, null, 8, ["class", "label", "environment", "disabled"])) : p("", !0),
1099
+ e.primaryAction ? (n(), d(i(H), {
1100
+ key: 2,
1101
+ class: s({ "flex-grow": i(t) }),
1102
+ onClick: u[3] || (u[3] = (h) => c("fzprimary:click")),
1103
+ label: e.primaryAction.label,
1104
+ variant: "primary",
1105
+ environment: e.environment,
1106
+ disabled: e.primaryAction.disabled
1107
+ }, null, 8, ["class", "label", "environment", "disabled"])) : p("", !0)
1108
+ ]),
1109
+ _: 1
1110
+ }, 8, ["class"])
1111
+ ])
1112
+ ], 2)), [
1113
+ [$, m.value]
1114
+ ]) : p("", !0)
1115
+ ], 2));
1116
+ }
1117
+ });
1118
+ export {
1119
+ fe as FzCard
1120
+ };