@fiscozen/dialog 0.1.30 → 0.1.31

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/dialog.js CHANGED
@@ -1,1556 +1,2091 @@
1
- import { watch as W, onMounted as T, onBeforeUnmount as q, defineComponent as G, ref as h, onUnmounted as ee, computed as H, withDirectives as te, createCommentVNode as M, createElementBlock as I, openBlock as E, createElementVNode as f, normalizeClass as _, renderSlot as m, vShow as oe, createBlock as O, mergeProps as ae, createSlots as le, withCtx as w, createVNode as ne, toDisplayString as B, unref as A, withModifiers as P, createTextVNode as K } from "vue";
2
- import { FzIconButton as re, FzButton as V } from "@fiscozen/button";
1
+ import { computed as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createSlots as a, createTextVNode as o, createVNode as s, defineComponent as c, mergeProps as l, normalizeClass as u, onBeforeUnmount as d, onMounted as f, onUnmounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, unref as v, vShow as y, watch as b, withCtx as x, withDirectives as S, withModifiers as C } from "vue";
2
+ import { FzButton as w, FzIconButton as T } from "@fiscozen/button";
3
3
  new DOMRect(0, 0, window.innerWidth, window.innerHeight);
4
- function ie(e, t, o) {
5
- if (!e)
6
- throw new Error("A target component has to be provided.");
7
- if (!t)
8
- throw new Error("A callback has to be provided.");
9
- const a = (l) => {
10
- !e.value || l.target === e.value || l.composedPath().includes(e.value) || typeof t == "function" && t();
11
- };
12
- o && W(o, (l, n) => {
13
- n && n.removeEventListener("click", a), l == null || l.addEventListener("click", a);
14
- }), T(() => {
15
- o || document.addEventListener("click", a);
16
- }), q(() => {
17
- var l;
18
- if (o) {
19
- (l = o.value) == null || l.removeEventListener("click", a);
20
- return;
21
- }
22
- document.removeEventListener("click", a);
23
- });
4
+ //#endregion
5
+ //#region ../composables/src/composables/useClickOutside.ts
6
+ function E(e, t, n) {
7
+ if (!e) throw Error("A target component has to be provided.");
8
+ if (!t) throw Error("A callback has to be provided.");
9
+ let r = (n) => {
10
+ !e.value || n.target === e.value || n.composedPath().includes(e.value) || typeof t == "function" && t();
11
+ };
12
+ n && b(n, (e, t) => {
13
+ t && t.removeEventListener("click", r), e?.addEventListener("click", r);
14
+ }), f(() => {
15
+ n || document.addEventListener("click", r);
16
+ }), d(() => {
17
+ if (n) {
18
+ n.value?.removeEventListener("click", r);
19
+ return;
20
+ }
21
+ document.removeEventListener("click", r);
22
+ });
24
23
  }
25
- function se(e, t) {
26
- if (!e || typeof e != "function")
27
- throw new Error("A callback has to be provided.");
28
- const o = (a) => {
29
- e(a);
30
- };
31
- T(() => {
32
- {
33
- document.addEventListener("keyup", o);
34
- return;
35
- }
36
- }), q(() => {
37
- {
38
- document.removeEventListener("keyup", o);
39
- return;
40
- }
41
- });
24
+ //#endregion
25
+ //#region ../composables/src/composables/useKeyUp.ts
26
+ function D(e, t) {
27
+ if (!e || typeof e != "function") throw Error("A callback has to be provided.");
28
+ let n = (t) => {
29
+ e(t);
30
+ };
31
+ f(() => {
32
+ if (!t) {
33
+ document.addEventListener("keyup", n);
34
+ return;
35
+ }
36
+ t.value.addEventListener("keyup", n);
37
+ }), d(() => {
38
+ if (!t) {
39
+ document.removeEventListener("keyup", n);
40
+ return;
41
+ }
42
+ t.value.removeEventListener("keyup", n);
43
+ });
42
44
  }
43
- const ue = {
44
- blue: {
45
- 50: {
46
- value: "#eff1ff",
47
- type: "color"
48
- },
49
- 100: {
50
- value: "#dee2ff",
51
- type: "color"
52
- },
53
- 200: {
54
- value: "#bdc5ff",
55
- type: "color"
56
- },
57
- 300: {
58
- value: "#9ca8ff",
59
- type: "color"
60
- },
61
- 400: {
62
- value: "#7b8bff",
63
- type: "color"
64
- },
65
- 500: {
66
- value: "#5a6eff",
67
- type: "color"
68
- },
69
- 600: {
70
- value: "#4858cc",
71
- type: "color"
72
- },
73
- 700: {
74
- value: "#364299",
75
- type: "color"
76
- },
77
- 800: {
78
- value: "#242c66",
79
- type: "color"
80
- },
81
- 900: {
82
- value: "#1b214c",
83
- type: "color"
84
- }
85
- },
86
- purple: {
87
- 50: {
88
- value: "#f8f4ff",
89
- type: "color"
90
- },
91
- 100: {
92
- value: "#f0e9ff",
93
- type: "color"
94
- },
95
- 200: {
96
- value: "#e1d3ff",
97
- type: "color"
98
- },
99
- 300: {
100
- value: "#d2bdff",
101
- type: "color"
102
- },
103
- 400: {
104
- value: "#c3a7ff",
105
- type: "color"
106
- },
107
- 500: {
108
- value: "#b491ff",
109
- type: "color"
110
- },
111
- 600: {
112
- value: "#9074cc",
113
- type: "color"
114
- },
115
- 700: {
116
- value: "#6c5799",
117
- type: "color"
118
- },
119
- 800: {
120
- value: "#483a66",
121
- type: "color"
122
- },
123
- 900: {
124
- value: "#241d33",
125
- type: "color"
126
- }
127
- },
128
- orange: {
129
- 50: {
130
- value: "#fff2ef",
131
- type: "color"
132
- },
133
- 100: {
134
- value: "#ffe4de",
135
- type: "color"
136
- },
137
- 200: {
138
- value: "#ffc9bd",
139
- type: "color"
140
- },
141
- 300: {
142
- value: "#ffae9c",
143
- type: "color"
144
- },
145
- 400: {
146
- value: "#ff937b",
147
- type: "color"
148
- },
149
- 500: {
150
- value: "#ff785a",
151
- type: "color"
152
- },
153
- 600: {
154
- value: "#cc6048",
155
- type: "color"
156
- },
157
- 700: {
158
- value: "#994836",
159
- type: "color"
160
- },
161
- 800: {
162
- value: "#663024",
163
- type: "color"
164
- },
165
- 900: {
166
- value: "#331812",
167
- type: "color"
168
- }
169
- },
170
- pink: {
171
- 50: {
172
- value: "#fff5f5",
173
- type: "color"
174
- },
175
- 100: {
176
- value: "#ffe0e0",
177
- type: "color"
178
- },
179
- 200: {
180
- value: "#ffcbcb",
181
- type: "color"
182
- },
183
- 300: {
184
- value: "#ffc0c0",
185
- type: "color"
186
- },
187
- 400: {
188
- value: "#ffabab",
189
- type: "color"
190
- },
191
- 500: {
192
- value: "#ff9696",
193
- type: "color"
194
- },
195
- 600: {
196
- value: "#cc7878",
197
- type: "color"
198
- },
199
- 700: {
200
- value: "#995a5a",
201
- type: "color"
202
- },
203
- 800: {
204
- value: "#663c3c",
205
- type: "color"
206
- },
207
- 900: {
208
- value: "#331e1e",
209
- type: "color"
210
- }
211
- },
212
- yellow: {
213
- 50: {
214
- value: "#fffbf4",
215
- type: "color"
216
- },
217
- 100: {
218
- value: "#fff3de",
219
- type: "color"
220
- },
221
- 200: {
222
- value: "#ffebc8",
223
- type: "color"
224
- },
225
- 300: {
226
- value: "#ffe7bd",
227
- type: "color"
228
- },
229
- 400: {
230
- value: "#ffdfa7",
231
- type: "color"
232
- },
233
- 500: {
234
- value: "#ffd791",
235
- type: "color"
236
- },
237
- 600: {
238
- value: "#ccac74",
239
- type: "color"
240
- },
241
- 700: {
242
- value: "#998157",
243
- type: "color"
244
- },
245
- 800: {
246
- value: "#806c49",
247
- type: "color"
248
- },
249
- 900: {
250
- value: "#4c402b",
251
- type: "color"
252
- }
253
- },
254
- semantic: {
255
- error: {
256
- 50: {
257
- value: "#fef3f3",
258
- type: "color"
259
- },
260
- 100: {
261
- value: "#f8baba",
262
- type: "color"
263
- },
264
- 200: {
265
- value: "#f04242",
266
- type: "color"
267
- },
268
- 300: {
269
- value: "#aa2f2f",
270
- type: "color"
271
- }
272
- },
273
- warning: {
274
- 50: {
275
- value: "#fff8f3",
276
- type: "color"
277
- },
278
- 100: {
279
- value: "#ffdabd",
280
- type: "color"
281
- },
282
- 200: {
283
- value: "#ffae4f",
284
- type: "color"
285
- },
286
- 300: {
287
- value: "#b47b38",
288
- type: "color"
289
- }
290
- },
291
- success: {
292
- 50: {
293
- value: "#f2f8f6",
294
- type: "color"
295
- },
296
- 100: {
297
- value: "#b5d8ce",
298
- type: "color"
299
- },
300
- 200: {
301
- value: "#0fa88c",
302
- type: "color"
303
- },
304
- 300: {
305
- value: "#0b7763",
306
- type: "color"
307
- }
308
- },
309
- info: {
310
- 50: {
311
- value: "#f3f7ff",
312
- type: "color"
313
- },
314
- 100: {
315
- value: "#b4c8e1",
316
- type: "color"
317
- },
318
- 200: {
319
- value: "#4e9fff",
320
- type: "color"
321
- },
322
- 300: {
323
- value: "#3770b4",
324
- type: "color"
325
- }
326
- }
327
- },
328
- background: {
329
- "white-smoke": {
330
- value: "#f7f6f3",
331
- type: "color"
332
- },
333
- seashell: {
334
- value: "#f8ece7",
335
- type: "color"
336
- },
337
- "pale-purple": {
338
- value: "#f2e6ff",
339
- type: "color"
340
- },
341
- "alice-blue": {
342
- value: "#ecf2fc",
343
- type: "color"
344
- }
345
- },
346
- grey: {
347
- 100: {
348
- value: "#e9edf0",
349
- type: "color"
350
- },
351
- 200: {
352
- value: "#d1dde6",
353
- type: "color"
354
- },
355
- 300: {
356
- value: "#9da9b2",
357
- type: "color"
358
- },
359
- 400: {
360
- value: "#6e777e",
361
- type: "color"
362
- },
363
- 500: {
364
- value: "#596167",
365
- type: "color"
366
- }
367
- },
368
- core: {
369
- white: {
370
- value: "#ffffff",
371
- type: "color"
372
- },
373
- black: {
374
- value: "#2c282f",
375
- type: "color"
376
- }
377
- },
378
- "font-sans": {
379
- "sharp-grotesk": {
380
- value: '"Sharp Grotesk", sans-serif',
381
- type: "fontFamilies"
382
- },
383
- inter: {
384
- value: '"Inter", sans-serif',
385
- type: "fontFamilies"
386
- }
387
- },
388
- font: {
389
- light: {
390
- value: "300",
391
- type: "fontWeights"
392
- },
393
- normal: {
394
- value: "400",
395
- type: "fontWeights"
396
- },
397
- medium: {
398
- value: "500",
399
- type: "fontWeights"
400
- }
401
- },
402
- spacing: {
403
- 0: {
404
- value: "0px",
405
- type: "spacing"
406
- },
407
- 1: {
408
- value: "1px",
409
- type: "spacing"
410
- },
411
- 2: {
412
- value: "2px",
413
- type: "spacing"
414
- },
415
- 4: {
416
- value: "4px",
417
- type: "spacing"
418
- },
419
- 6: {
420
- value: "6px",
421
- type: "spacing"
422
- },
423
- 8: {
424
- value: "8px",
425
- type: "spacing"
426
- },
427
- 10: {
428
- value: "10px",
429
- type: "spacing"
430
- },
431
- 12: {
432
- value: "12px",
433
- type: "spacing"
434
- },
435
- 14: {
436
- value: "14px",
437
- type: "spacing"
438
- },
439
- 16: {
440
- value: "16px",
441
- type: "spacing"
442
- },
443
- 20: {
444
- value: "20px",
445
- type: "spacing"
446
- },
447
- 24: {
448
- value: "24px",
449
- type: "spacing"
450
- },
451
- 28: {
452
- value: "28px",
453
- type: "spacing"
454
- },
455
- 32: {
456
- value: "32px",
457
- type: "spacing"
458
- },
459
- 36: {
460
- value: "36px",
461
- type: "spacing"
462
- },
463
- 40: {
464
- value: "40px",
465
- type: "spacing"
466
- },
467
- 44: {
468
- value: "44px",
469
- type: "spacing"
470
- },
471
- 48: {
472
- value: "48px",
473
- type: "spacing"
474
- },
475
- 56: {
476
- value: "56px",
477
- type: "spacing"
478
- },
479
- 64: {
480
- value: "64px",
481
- type: "spacing"
482
- },
483
- 80: {
484
- value: "80px",
485
- type: "spacing"
486
- },
487
- 96: {
488
- value: "96px",
489
- type: "spacing"
490
- },
491
- 112: {
492
- value: "112px",
493
- type: "spacing"
494
- },
495
- 128: {
496
- value: "128px",
497
- type: "spacing"
498
- },
499
- 144: {
500
- value: "144px",
501
- type: "spacing"
502
- },
503
- 160: {
504
- value: "160px",
505
- type: "spacing"
506
- },
507
- 176: {
508
- value: "176px",
509
- type: "spacing"
510
- },
511
- 192: {
512
- value: "192px",
513
- type: "spacing"
514
- },
515
- 208: {
516
- value: "208px",
517
- type: "spacing"
518
- },
519
- 224: {
520
- value: "224px",
521
- type: "spacing"
522
- },
523
- 240: {
524
- value: "240px",
525
- type: "spacing"
526
- },
527
- 256: {
528
- value: "256px",
529
- type: "spacing"
530
- },
531
- 288: {
532
- value: "288px",
533
- type: "spacing"
534
- },
535
- 320: {
536
- value: "320px",
537
- type: "spacing"
538
- },
539
- 384: {
540
- value: "384px",
541
- type: "spacing"
542
- }
543
- },
544
- border: {
545
- 0: {
546
- value: "0px",
547
- type: "borderWidth"
548
- },
549
- 1: {
550
- value: "1px",
551
- type: "borderWidth"
552
- },
553
- 2: {
554
- value: "2px",
555
- type: "borderWidth"
556
- },
557
- 4: {
558
- value: "4px",
559
- type: "borderWidth"
560
- },
561
- 8: {
562
- value: "8px",
563
- type: "borderWidth"
564
- }
565
- },
566
- rounded: {
567
- none: {
568
- value: "0px",
569
- type: "borderRadius"
570
- },
571
- sm: {
572
- value: "2px",
573
- type: "borderRadius"
574
- },
575
- base: {
576
- value: "4px",
577
- type: "borderRadius"
578
- },
579
- md: {
580
- value: "6px",
581
- type: "borderRadius"
582
- },
583
- lg: {
584
- value: "8px",
585
- type: "borderRadius"
586
- },
587
- xl: {
588
- value: "12px",
589
- type: "borderRadius"
590
- },
591
- "2xl": {
592
- value: "16px",
593
- type: "borderRadius"
594
- },
595
- "3xl": {
596
- value: "24px",
597
- type: "borderRadius"
598
- },
599
- full: {
600
- value: "9999px",
601
- type: "borderRadius"
602
- }
603
- },
604
- breakpoint: {
605
- xs: {
606
- value: "376px",
607
- type: "sizing"
608
- },
609
- sm: {
610
- value: "640px",
611
- type: "sizing"
612
- },
613
- md: {
614
- value: "768px",
615
- type: "sizing"
616
- },
617
- lg: {
618
- value: "1024px",
619
- type: "sizing"
620
- },
621
- xl: {
622
- value: "1280px",
623
- type: "sizing"
624
- },
625
- "2xl": {
626
- value: "1440px",
627
- type: "sizing"
628
- },
629
- "3xl": {
630
- value: "1536px",
631
- type: "sizing"
632
- }
633
- },
634
- shadow: {
635
- none: {
636
- value: {
637
- color: "#000000",
638
- type: "dropShadow",
639
- x: "0",
640
- y: "0",
641
- blur: "0",
642
- spread: "0"
643
- },
644
- type: "boxShadow"
645
- },
646
- sm: {
647
- value: {
648
- color: "#0000000d",
649
- type: "dropShadow",
650
- x: "0",
651
- y: "1",
652
- blur: "2",
653
- spread: "0"
654
- },
655
- type: "boxShadow"
656
- },
657
- base: {
658
- value: [
659
- {
660
- color: "#0000000f",
661
- type: "dropShadow",
662
- x: "0",
663
- y: "1",
664
- blur: "2",
665
- spread: "0"
666
- },
667
- {
668
- color: "#0000001a",
669
- type: "dropShadow",
670
- x: "0",
671
- y: "1",
672
- blur: "3",
673
- spread: "0"
674
- }
675
- ],
676
- type: "boxShadow"
677
- },
678
- md: {
679
- value: [
680
- {
681
- color: "#0000000f",
682
- type: "dropShadow",
683
- x: "0",
684
- y: "2",
685
- blur: "4",
686
- spread: "-1"
687
- },
688
- {
689
- color: "#0000001a",
690
- type: "dropShadow",
691
- x: "0",
692
- y: "4",
693
- blur: "6",
694
- spread: "-1"
695
- }
696
- ],
697
- type: "boxShadow"
698
- },
699
- lg: {
700
- value: [
701
- {
702
- color: "#0000000d",
703
- type: "dropShadow",
704
- x: "0",
705
- y: "4",
706
- blur: "6",
707
- spread: "-2"
708
- },
709
- {
710
- color: "#0000001a",
711
- type: "dropShadow",
712
- x: "0",
713
- y: "10",
714
- blur: "15",
715
- spread: "-3"
716
- }
717
- ],
718
- type: "boxShadow"
719
- },
720
- xl: {
721
- value: [
722
- {
723
- color: "#0000000a",
724
- type: "dropShadow",
725
- x: "0",
726
- y: "10",
727
- blur: "10",
728
- spread: "-5"
729
- },
730
- {
731
- color: "#0000001a",
732
- type: "dropShadow",
733
- x: "0",
734
- y: "20",
735
- blur: "25",
736
- spread: "-5"
737
- }
738
- ],
739
- type: "boxShadow"
740
- },
741
- "2xl": {
742
- value: {
743
- color: "#00000040",
744
- type: "dropShadow",
745
- x: "0",
746
- y: "25",
747
- blur: "50",
748
- spread: "-12"
749
- },
750
- type: "boxShadow"
751
- },
752
- inner: {
753
- value: {
754
- color: "#0000000f",
755
- type: "innerShadow",
756
- x: "0",
757
- y: "2",
758
- blur: "4",
759
- spread: "0"
760
- },
761
- type: "boxShadow"
762
- }
763
- },
764
- underline: {
765
- value: "underline",
766
- type: "textDecoration"
767
- },
768
- text: {
769
- xs: {
770
- value: "12px",
771
- type: "fontSizes"
772
- },
773
- sm: {
774
- value: "14px",
775
- type: "fontSizes"
776
- },
777
- base: {
778
- value: "16px",
779
- type: "fontSizes"
780
- },
781
- lg: {
782
- value: "18px",
783
- type: "fontSizes"
784
- },
785
- xl: {
786
- value: "20px",
787
- type: "fontSizes"
788
- },
789
- "2xl": {
790
- value: "24px",
791
- type: "fontSizes"
792
- },
793
- "3xl": {
794
- value: "30px",
795
- type: "fontSizes"
796
- },
797
- "4xl": {
798
- value: "36px",
799
- type: "fontSizes"
800
- },
801
- "5xl": {
802
- value: "48px",
803
- type: "fontSizes"
804
- },
805
- "6xl": {
806
- value: "60px",
807
- type: "fontSizes"
808
- },
809
- "7xl": {
810
- value: "72px",
811
- type: "fontSizes"
812
- },
813
- "8xl": {
814
- value: "96px",
815
- type: "fontSizes"
816
- },
817
- "9xl": {
818
- value: "128px",
819
- type: "fontSizes"
820
- }
821
- },
822
- leading: {
823
- xs: {
824
- value: "16px",
825
- type: "lineHeights"
826
- },
827
- sm: {
828
- value: "18px",
829
- type: "lineHeights"
830
- },
831
- base: {
832
- value: "20px",
833
- type: "lineHeights"
834
- },
835
- lg: {
836
- value: "24px",
837
- type: "lineHeights"
838
- },
839
- xl: {
840
- value: "28px",
841
- type: "lineHeights"
842
- },
843
- "2xl": {
844
- value: "32px",
845
- type: "lineHeights"
846
- },
847
- "3xl": {
848
- value: "36px",
849
- type: "lineHeights"
850
- },
851
- "4xl": {
852
- value: "40px",
853
- type: "lineHeights"
854
- },
855
- "5xl": {
856
- value: "48px",
857
- type: "lineHeights"
858
- },
859
- "6xl": {
860
- value: "60px",
861
- type: "lineHeights"
862
- },
863
- "7xl": {
864
- value: "72px",
865
- type: "lineHeights"
866
- },
867
- "8xl": {
868
- value: "96px",
869
- type: "lineHeights"
870
- },
871
- "9xl": {
872
- value: "128px",
873
- type: "lineHeights"
874
- }
875
- }
876
- }, F = {
877
- global: ue
878
- }, ce = [
879
- "blue",
880
- "purple",
881
- "orange",
882
- "pink",
883
- "yellow",
884
- "grey",
885
- "core"
886
- ], de = {
887
- safeColorNames: ce
888
- }, pe = [
889
- "error",
890
- "warning",
891
- "success",
892
- "info"
893
- ], fe = {
894
- semanticColorNames: pe
895
- }, he = de.safeColorNames, ve = fe.semanticColorNames, g = {};
896
- he.forEach((e) => {
897
- const t = F.global[e];
898
- t && Object.keys(t).forEach((o) => {
899
- var l;
900
- const a = (l = t[o]) == null ? void 0 : l.value;
901
- a && (g[e] || (g[e] = {}), g[e][o] = a);
902
- });
45
+ var O = {
46
+ global: {
47
+ blue: {
48
+ 50: {
49
+ value: "#eff1ff",
50
+ type: "color"
51
+ },
52
+ 100: {
53
+ value: "#dee2ff",
54
+ type: "color"
55
+ },
56
+ 200: {
57
+ value: "#bdc5ff",
58
+ type: "color"
59
+ },
60
+ 300: {
61
+ value: "#9ca8ff",
62
+ type: "color"
63
+ },
64
+ 400: {
65
+ value: "#7b8bff",
66
+ type: "color"
67
+ },
68
+ 500: {
69
+ value: "#5a6eff",
70
+ type: "color"
71
+ },
72
+ 600: {
73
+ value: "#4858cc",
74
+ type: "color"
75
+ },
76
+ 700: {
77
+ value: "#364299",
78
+ type: "color"
79
+ },
80
+ 800: {
81
+ value: "#242c66",
82
+ type: "color"
83
+ },
84
+ 900: {
85
+ value: "#1b214c",
86
+ type: "color"
87
+ }
88
+ },
89
+ purple: {
90
+ 50: {
91
+ value: "#f8f4ff",
92
+ type: "color"
93
+ },
94
+ 100: {
95
+ value: "#f0e9ff",
96
+ type: "color"
97
+ },
98
+ 200: {
99
+ value: "#e1d3ff",
100
+ type: "color"
101
+ },
102
+ 300: {
103
+ value: "#d2bdff",
104
+ type: "color"
105
+ },
106
+ 400: {
107
+ value: "#c3a7ff",
108
+ type: "color"
109
+ },
110
+ 500: {
111
+ value: "#b491ff",
112
+ type: "color"
113
+ },
114
+ 600: {
115
+ value: "#9074cc",
116
+ type: "color"
117
+ },
118
+ 700: {
119
+ value: "#6c5799",
120
+ type: "color"
121
+ },
122
+ 800: {
123
+ value: "#483a66",
124
+ type: "color"
125
+ },
126
+ 900: {
127
+ value: "#241d33",
128
+ type: "color"
129
+ }
130
+ },
131
+ orange: {
132
+ 50: {
133
+ value: "#fff2ef",
134
+ type: "color"
135
+ },
136
+ 100: {
137
+ value: "#ffe4de",
138
+ type: "color"
139
+ },
140
+ 200: {
141
+ value: "#ffc9bd",
142
+ type: "color"
143
+ },
144
+ 300: {
145
+ value: "#ffae9c",
146
+ type: "color"
147
+ },
148
+ 400: {
149
+ value: "#ff937b",
150
+ type: "color"
151
+ },
152
+ 500: {
153
+ value: "#ff785a",
154
+ type: "color"
155
+ },
156
+ 600: {
157
+ value: "#cc6048",
158
+ type: "color"
159
+ },
160
+ 700: {
161
+ value: "#994836",
162
+ type: "color"
163
+ },
164
+ 800: {
165
+ value: "#663024",
166
+ type: "color"
167
+ },
168
+ 900: {
169
+ value: "#331812",
170
+ type: "color"
171
+ }
172
+ },
173
+ pink: {
174
+ 50: {
175
+ value: "#fff5f5",
176
+ type: "color"
177
+ },
178
+ 100: {
179
+ value: "#ffe0e0",
180
+ type: "color"
181
+ },
182
+ 200: {
183
+ value: "#ffcbcb",
184
+ type: "color"
185
+ },
186
+ 300: {
187
+ value: "#ffc0c0",
188
+ type: "color"
189
+ },
190
+ 400: {
191
+ value: "#ffabab",
192
+ type: "color"
193
+ },
194
+ 500: {
195
+ value: "#ff9696",
196
+ type: "color"
197
+ },
198
+ 600: {
199
+ value: "#cc7878",
200
+ type: "color"
201
+ },
202
+ 700: {
203
+ value: "#995a5a",
204
+ type: "color"
205
+ },
206
+ 800: {
207
+ value: "#663c3c",
208
+ type: "color"
209
+ },
210
+ 900: {
211
+ value: "#331e1e",
212
+ type: "color"
213
+ }
214
+ },
215
+ yellow: {
216
+ 50: {
217
+ value: "#fffbf4",
218
+ type: "color"
219
+ },
220
+ 100: {
221
+ value: "#fff3de",
222
+ type: "color"
223
+ },
224
+ 200: {
225
+ value: "#ffebc8",
226
+ type: "color"
227
+ },
228
+ 300: {
229
+ value: "#ffe7bd",
230
+ type: "color"
231
+ },
232
+ 400: {
233
+ value: "#ffdfa7",
234
+ type: "color"
235
+ },
236
+ 500: {
237
+ value: "#ffd791",
238
+ type: "color"
239
+ },
240
+ 600: {
241
+ value: "#ccac74",
242
+ type: "color"
243
+ },
244
+ 700: {
245
+ value: "#998157",
246
+ type: "color"
247
+ },
248
+ 800: {
249
+ value: "#806c49",
250
+ type: "color"
251
+ },
252
+ 900: {
253
+ value: "#4c402b",
254
+ type: "color"
255
+ }
256
+ },
257
+ semantic: {
258
+ error: {
259
+ 50: {
260
+ value: "#fef3f3",
261
+ type: "color"
262
+ },
263
+ 100: {
264
+ value: "#f8baba",
265
+ type: "color"
266
+ },
267
+ 200: {
268
+ value: "#f04242",
269
+ type: "color"
270
+ },
271
+ 300: {
272
+ value: "#aa2f2f",
273
+ type: "color"
274
+ }
275
+ },
276
+ warning: {
277
+ 50: {
278
+ value: "#fff8f3",
279
+ type: "color"
280
+ },
281
+ 100: {
282
+ value: "#ffdabd",
283
+ type: "color"
284
+ },
285
+ 200: {
286
+ value: "#ffae4f",
287
+ type: "color"
288
+ },
289
+ 300: {
290
+ value: "#b47b38",
291
+ type: "color"
292
+ }
293
+ },
294
+ success: {
295
+ 50: {
296
+ value: "#f2f8f6",
297
+ type: "color"
298
+ },
299
+ 100: {
300
+ value: "#b5d8ce",
301
+ type: "color"
302
+ },
303
+ 200: {
304
+ value: "#0fa88c",
305
+ type: "color"
306
+ },
307
+ 300: {
308
+ value: "#0b7763",
309
+ type: "color"
310
+ }
311
+ },
312
+ info: {
313
+ 50: {
314
+ value: "#f3f7ff",
315
+ type: "color"
316
+ },
317
+ 100: {
318
+ value: "#b4c8e1",
319
+ type: "color"
320
+ },
321
+ 200: {
322
+ value: "#4e9fff",
323
+ type: "color"
324
+ },
325
+ 300: {
326
+ value: "#3770b4",
327
+ type: "color"
328
+ }
329
+ }
330
+ },
331
+ background: {
332
+ "white-smoke": {
333
+ value: "#f7f6f3",
334
+ type: "color"
335
+ },
336
+ seashell: {
337
+ value: "#f8ece7",
338
+ type: "color"
339
+ },
340
+ "pale-purple": {
341
+ value: "#f2e6ff",
342
+ type: "color"
343
+ },
344
+ "alice-blue": {
345
+ value: "#ecf2fc",
346
+ type: "color"
347
+ }
348
+ },
349
+ grey: {
350
+ 100: {
351
+ value: "#e9edf0",
352
+ type: "color"
353
+ },
354
+ 200: {
355
+ value: "#d1dde6",
356
+ type: "color"
357
+ },
358
+ 300: {
359
+ value: "#9da9b2",
360
+ type: "color"
361
+ },
362
+ 400: {
363
+ value: "#6e777e",
364
+ type: "color"
365
+ },
366
+ 500: {
367
+ value: "#596167",
368
+ type: "color"
369
+ }
370
+ },
371
+ core: {
372
+ white: {
373
+ value: "#ffffff",
374
+ type: "color"
375
+ },
376
+ black: {
377
+ value: "#2c282f",
378
+ type: "color"
379
+ }
380
+ },
381
+ "font-sans": {
382
+ "sharp-grotesk": {
383
+ value: "\"Sharp Grotesk\", sans-serif",
384
+ type: "fontFamilies"
385
+ },
386
+ inter: {
387
+ value: "\"Inter\", sans-serif",
388
+ type: "fontFamilies"
389
+ }
390
+ },
391
+ font: {
392
+ light: {
393
+ value: "300",
394
+ type: "fontWeights"
395
+ },
396
+ normal: {
397
+ value: "400",
398
+ type: "fontWeights"
399
+ },
400
+ medium: {
401
+ value: "500",
402
+ type: "fontWeights"
403
+ }
404
+ },
405
+ spacing: {
406
+ 0: {
407
+ value: "0px",
408
+ type: "spacing"
409
+ },
410
+ 1: {
411
+ value: "1px",
412
+ type: "spacing"
413
+ },
414
+ 2: {
415
+ value: "2px",
416
+ type: "spacing"
417
+ },
418
+ 4: {
419
+ value: "4px",
420
+ type: "spacing"
421
+ },
422
+ 6: {
423
+ value: "6px",
424
+ type: "spacing"
425
+ },
426
+ 8: {
427
+ value: "8px",
428
+ type: "spacing"
429
+ },
430
+ 10: {
431
+ value: "10px",
432
+ type: "spacing"
433
+ },
434
+ 12: {
435
+ value: "12px",
436
+ type: "spacing"
437
+ },
438
+ 14: {
439
+ value: "14px",
440
+ type: "spacing"
441
+ },
442
+ 16: {
443
+ value: "16px",
444
+ type: "spacing"
445
+ },
446
+ 20: {
447
+ value: "20px",
448
+ type: "spacing"
449
+ },
450
+ 24: {
451
+ value: "24px",
452
+ type: "spacing"
453
+ },
454
+ 28: {
455
+ value: "28px",
456
+ type: "spacing"
457
+ },
458
+ 32: {
459
+ value: "32px",
460
+ type: "spacing"
461
+ },
462
+ 36: {
463
+ value: "36px",
464
+ type: "spacing"
465
+ },
466
+ 40: {
467
+ value: "40px",
468
+ type: "spacing"
469
+ },
470
+ 44: {
471
+ value: "44px",
472
+ type: "spacing"
473
+ },
474
+ 48: {
475
+ value: "48px",
476
+ type: "spacing"
477
+ },
478
+ 56: {
479
+ value: "56px",
480
+ type: "spacing"
481
+ },
482
+ 64: {
483
+ value: "64px",
484
+ type: "spacing"
485
+ },
486
+ 80: {
487
+ value: "80px",
488
+ type: "spacing"
489
+ },
490
+ 96: {
491
+ value: "96px",
492
+ type: "spacing"
493
+ },
494
+ 112: {
495
+ value: "112px",
496
+ type: "spacing"
497
+ },
498
+ 128: {
499
+ value: "128px",
500
+ type: "spacing"
501
+ },
502
+ 144: {
503
+ value: "144px",
504
+ type: "spacing"
505
+ },
506
+ 160: {
507
+ value: "160px",
508
+ type: "spacing"
509
+ },
510
+ 176: {
511
+ value: "176px",
512
+ type: "spacing"
513
+ },
514
+ 192: {
515
+ value: "192px",
516
+ type: "spacing"
517
+ },
518
+ 208: {
519
+ value: "208px",
520
+ type: "spacing"
521
+ },
522
+ 224: {
523
+ value: "224px",
524
+ type: "spacing"
525
+ },
526
+ 240: {
527
+ value: "240px",
528
+ type: "spacing"
529
+ },
530
+ 256: {
531
+ value: "256px",
532
+ type: "spacing"
533
+ },
534
+ 288: {
535
+ value: "288px",
536
+ type: "spacing"
537
+ },
538
+ 320: {
539
+ value: "320px",
540
+ type: "spacing"
541
+ },
542
+ 384: {
543
+ value: "384px",
544
+ type: "spacing"
545
+ }
546
+ },
547
+ border: {
548
+ 0: {
549
+ value: "0px",
550
+ type: "borderWidth"
551
+ },
552
+ 1: {
553
+ value: "1px",
554
+ type: "borderWidth"
555
+ },
556
+ 2: {
557
+ value: "2px",
558
+ type: "borderWidth"
559
+ },
560
+ 4: {
561
+ value: "4px",
562
+ type: "borderWidth"
563
+ },
564
+ 8: {
565
+ value: "8px",
566
+ type: "borderWidth"
567
+ }
568
+ },
569
+ rounded: {
570
+ none: {
571
+ value: "0px",
572
+ type: "borderRadius"
573
+ },
574
+ sm: {
575
+ value: "2px",
576
+ type: "borderRadius"
577
+ },
578
+ base: {
579
+ value: "4px",
580
+ type: "borderRadius"
581
+ },
582
+ md: {
583
+ value: "6px",
584
+ type: "borderRadius"
585
+ },
586
+ lg: {
587
+ value: "8px",
588
+ type: "borderRadius"
589
+ },
590
+ xl: {
591
+ value: "12px",
592
+ type: "borderRadius"
593
+ },
594
+ "2xl": {
595
+ value: "16px",
596
+ type: "borderRadius"
597
+ },
598
+ "3xl": {
599
+ value: "24px",
600
+ type: "borderRadius"
601
+ },
602
+ full: {
603
+ value: "9999px",
604
+ type: "borderRadius"
605
+ }
606
+ },
607
+ breakpoint: {
608
+ xs: {
609
+ value: "376px",
610
+ type: "sizing"
611
+ },
612
+ sm: {
613
+ value: "640px",
614
+ type: "sizing"
615
+ },
616
+ md: {
617
+ value: "768px",
618
+ type: "sizing"
619
+ },
620
+ lg: {
621
+ value: "1024px",
622
+ type: "sizing"
623
+ },
624
+ xl: {
625
+ value: "1280px",
626
+ type: "sizing"
627
+ },
628
+ "2xl": {
629
+ value: "1440px",
630
+ type: "sizing"
631
+ },
632
+ "3xl": {
633
+ value: "1536px",
634
+ type: "sizing"
635
+ }
636
+ },
637
+ shadow: {
638
+ none: {
639
+ value: {
640
+ color: "#000000",
641
+ type: "dropShadow",
642
+ x: "0",
643
+ y: "0",
644
+ blur: "0",
645
+ spread: "0"
646
+ },
647
+ type: "boxShadow"
648
+ },
649
+ sm: {
650
+ value: {
651
+ color: "#0000000d",
652
+ type: "dropShadow",
653
+ x: "0",
654
+ y: "1",
655
+ blur: "2",
656
+ spread: "0"
657
+ },
658
+ type: "boxShadow"
659
+ },
660
+ base: {
661
+ value: [{
662
+ color: "#0000000f",
663
+ type: "dropShadow",
664
+ x: "0",
665
+ y: "1",
666
+ blur: "2",
667
+ spread: "0"
668
+ }, {
669
+ color: "#0000001a",
670
+ type: "dropShadow",
671
+ x: "0",
672
+ y: "1",
673
+ blur: "3",
674
+ spread: "0"
675
+ }],
676
+ type: "boxShadow"
677
+ },
678
+ md: {
679
+ value: [{
680
+ color: "#0000000f",
681
+ type: "dropShadow",
682
+ x: "0",
683
+ y: "2",
684
+ blur: "4",
685
+ spread: "-1"
686
+ }, {
687
+ color: "#0000001a",
688
+ type: "dropShadow",
689
+ x: "0",
690
+ y: "4",
691
+ blur: "6",
692
+ spread: "-1"
693
+ }],
694
+ type: "boxShadow"
695
+ },
696
+ lg: {
697
+ value: [{
698
+ color: "#0000000d",
699
+ type: "dropShadow",
700
+ x: "0",
701
+ y: "4",
702
+ blur: "6",
703
+ spread: "-2"
704
+ }, {
705
+ color: "#0000001a",
706
+ type: "dropShadow",
707
+ x: "0",
708
+ y: "10",
709
+ blur: "15",
710
+ spread: "-3"
711
+ }],
712
+ type: "boxShadow"
713
+ },
714
+ xl: {
715
+ value: [{
716
+ color: "#0000000a",
717
+ type: "dropShadow",
718
+ x: "0",
719
+ y: "10",
720
+ blur: "10",
721
+ spread: "-5"
722
+ }, {
723
+ color: "#0000001a",
724
+ type: "dropShadow",
725
+ x: "0",
726
+ y: "20",
727
+ blur: "25",
728
+ spread: "-5"
729
+ }],
730
+ type: "boxShadow"
731
+ },
732
+ "2xl": {
733
+ value: {
734
+ color: "#00000040",
735
+ type: "dropShadow",
736
+ x: "0",
737
+ y: "25",
738
+ blur: "50",
739
+ spread: "-12"
740
+ },
741
+ type: "boxShadow"
742
+ },
743
+ inner: {
744
+ value: {
745
+ color: "#0000000f",
746
+ type: "innerShadow",
747
+ x: "0",
748
+ y: "2",
749
+ blur: "4",
750
+ spread: "0"
751
+ },
752
+ type: "boxShadow"
753
+ }
754
+ },
755
+ underline: {
756
+ value: "underline",
757
+ type: "textDecoration"
758
+ },
759
+ text: {
760
+ xs: {
761
+ value: "12px",
762
+ type: "fontSizes"
763
+ },
764
+ sm: {
765
+ value: "14px",
766
+ type: "fontSizes"
767
+ },
768
+ base: {
769
+ value: "16px",
770
+ type: "fontSizes"
771
+ },
772
+ lg: {
773
+ value: "18px",
774
+ type: "fontSizes"
775
+ },
776
+ xl: {
777
+ value: "20px",
778
+ type: "fontSizes"
779
+ },
780
+ "2xl": {
781
+ value: "24px",
782
+ type: "fontSizes"
783
+ },
784
+ "3xl": {
785
+ value: "30px",
786
+ type: "fontSizes"
787
+ },
788
+ "4xl": {
789
+ value: "36px",
790
+ type: "fontSizes"
791
+ },
792
+ "5xl": {
793
+ value: "48px",
794
+ type: "fontSizes"
795
+ },
796
+ "6xl": {
797
+ value: "60px",
798
+ type: "fontSizes"
799
+ },
800
+ "7xl": {
801
+ value: "72px",
802
+ type: "fontSizes"
803
+ },
804
+ "8xl": {
805
+ value: "96px",
806
+ type: "fontSizes"
807
+ },
808
+ "9xl": {
809
+ value: "128px",
810
+ type: "fontSizes"
811
+ }
812
+ },
813
+ leading: {
814
+ xs: {
815
+ value: "16px",
816
+ type: "lineHeights"
817
+ },
818
+ sm: {
819
+ value: "18px",
820
+ type: "lineHeights"
821
+ },
822
+ base: {
823
+ value: "20px",
824
+ type: "lineHeights"
825
+ },
826
+ lg: {
827
+ value: "24px",
828
+ type: "lineHeights"
829
+ },
830
+ xl: {
831
+ value: "28px",
832
+ type: "lineHeights"
833
+ },
834
+ "2xl": {
835
+ value: "32px",
836
+ type: "lineHeights"
837
+ },
838
+ "3xl": {
839
+ value: "36px",
840
+ type: "lineHeights"
841
+ },
842
+ "4xl": {
843
+ value: "40px",
844
+ type: "lineHeights"
845
+ },
846
+ "5xl": {
847
+ value: "48px",
848
+ type: "lineHeights"
849
+ },
850
+ "6xl": {
851
+ value: "60px",
852
+ type: "lineHeights"
853
+ },
854
+ "7xl": {
855
+ value: "72px",
856
+ type: "lineHeights"
857
+ },
858
+ "8xl": {
859
+ value: "96px",
860
+ type: "lineHeights"
861
+ },
862
+ "9xl": {
863
+ value: "128px",
864
+ type: "lineHeights"
865
+ }
866
+ }
867
+ },
868
+ alias: {
869
+ avatar: {
870
+ initials: {
871
+ "background-color": {
872
+ value: "{core.black}",
873
+ type: "color"
874
+ },
875
+ color: {
876
+ value: "{core.white}",
877
+ type: "color"
878
+ },
879
+ spacing: {
880
+ value: "{spacing.32}",
881
+ type: "spacing"
882
+ },
883
+ "border-radius": {
884
+ value: "{rounded.full}",
885
+ type: "borderRadius"
886
+ },
887
+ "font-family": {
888
+ value: "{font-sans.inter}",
889
+ type: "fontFamilies"
890
+ },
891
+ "font-weight": {
892
+ value: "{font.normal}",
893
+ type: "fontWeights"
894
+ },
895
+ "font-size": {
896
+ value: "{text.sm}",
897
+ type: "fontSizes"
898
+ },
899
+ "line-height": {
900
+ value: "{leading.sm}",
901
+ type: "lineHeights"
902
+ }
903
+ },
904
+ image: {
905
+ "border-radius": {
906
+ value: "{rounded.full}",
907
+ type: "borderRadius"
908
+ },
909
+ sm: {
910
+ value: "{spacing.16}",
911
+ type: "spacing"
912
+ },
913
+ md: {
914
+ value: "{spacing.24}",
915
+ type: "spacing"
916
+ },
917
+ lg: {
918
+ value: "{spacing.32}",
919
+ type: "spacing"
920
+ },
921
+ xl: {
922
+ value: "{spacing.40}",
923
+ type: "spacing"
924
+ }
925
+ }
926
+ },
927
+ "nav-link": {
928
+ spacing: {
929
+ value: "{spacing.32}",
930
+ type: "spacing"
931
+ },
932
+ "border-radius": {
933
+ value: "{rounded.base}",
934
+ type: "borderRadius"
935
+ },
936
+ "font-family": {
937
+ value: "{font-sans.inter}",
938
+ type: "fontFamilies"
939
+ },
940
+ "font-weight": {
941
+ value: "{font.medium}",
942
+ type: "fontWeights"
943
+ },
944
+ "line-height": {
945
+ value: "{leading.sm}",
946
+ type: "lineHeights"
947
+ },
948
+ "font-size": {
949
+ value: "{text.sm}",
950
+ type: "fontSizes"
951
+ },
952
+ "background-color": {
953
+ default: {
954
+ value: "none",
955
+ type: "color"
956
+ },
957
+ hover: {
958
+ value: "{background.alice-blue}",
959
+ type: "color"
960
+ },
961
+ pressed: {
962
+ value: "{background.alice-blue}",
963
+ type: "color"
964
+ },
965
+ focus: {
966
+ value: "{background.alice-blue}",
967
+ type: "color"
968
+ },
969
+ disabled: {
970
+ value: "none",
971
+ type: "color"
972
+ }
973
+ },
974
+ color: {
975
+ default: {
976
+ value: "{grey.500}",
977
+ type: "color"
978
+ },
979
+ hover: {
980
+ value: "{blue.500}",
981
+ type: "color"
982
+ },
983
+ pressed: {
984
+ value: "{blue.500}",
985
+ type: "color"
986
+ },
987
+ focus: {
988
+ value: "{blue.500}",
989
+ type: "color"
990
+ },
991
+ disabled: {
992
+ value: "{grey.100}",
993
+ type: "color"
994
+ }
995
+ },
996
+ border: {
997
+ default: {
998
+ value: "none",
999
+ type: "color"
1000
+ },
1001
+ hover: {
1002
+ value: "none",
1003
+ type: "color"
1004
+ },
1005
+ pressed: {
1006
+ value: "none",
1007
+ type: "color"
1008
+ },
1009
+ focus: {
1010
+ value: "{blue.500}",
1011
+ type: "color"
1012
+ },
1013
+ disabled: {
1014
+ value: "none",
1015
+ type: "color"
1016
+ }
1017
+ },
1018
+ "border-width": {
1019
+ default: {
1020
+ value: "none",
1021
+ type: "borderWidth"
1022
+ },
1023
+ hover: {
1024
+ value: "none",
1025
+ type: "borderWidth"
1026
+ },
1027
+ pressed: {
1028
+ value: "none",
1029
+ type: "borderWidth"
1030
+ },
1031
+ focus: {
1032
+ value: "{border.1}",
1033
+ type: "borderWidth"
1034
+ },
1035
+ disabled: {
1036
+ value: "none",
1037
+ type: "borderWidth"
1038
+ }
1039
+ },
1040
+ "box-shadow": {
1041
+ default: {
1042
+ value: "{shadow.none}",
1043
+ type: "boxShadow"
1044
+ },
1045
+ hover: {
1046
+ value: "{shadow.none}",
1047
+ type: "boxShadow"
1048
+ },
1049
+ pressed: {
1050
+ value: "{shadow.inner}",
1051
+ type: "boxShadow"
1052
+ },
1053
+ focus: {
1054
+ value: "none",
1055
+ type: "boxShadow"
1056
+ },
1057
+ disabled: {
1058
+ value: "none",
1059
+ type: "boxShadow"
1060
+ }
1061
+ }
1062
+ },
1063
+ "icon-button": {
1064
+ button: {
1065
+ sm: {
1066
+ value: "{spacing.28}",
1067
+ type: "spacing"
1068
+ },
1069
+ md: {
1070
+ value: "{spacing.32}",
1071
+ type: "spacing"
1072
+ },
1073
+ lg: {
1074
+ value: "{spacing.40}",
1075
+ type: "spacing"
1076
+ }
1077
+ },
1078
+ icon: {
1079
+ sm: {
1080
+ value: "{spacing.16}",
1081
+ type: "spacing"
1082
+ },
1083
+ md: {
1084
+ value: "{spacing.20}",
1085
+ type: "spacing"
1086
+ }
1087
+ },
1088
+ primary: {
1089
+ "background-color": {
1090
+ default: {
1091
+ value: "{blue.500}",
1092
+ type: "color"
1093
+ },
1094
+ hover: {
1095
+ value: "{blue.600}",
1096
+ type: "color"
1097
+ },
1098
+ pressed: {
1099
+ value: "{blue.600}",
1100
+ type: "color"
1101
+ },
1102
+ focus: {
1103
+ value: "{blue.500}",
1104
+ type: "color"
1105
+ },
1106
+ disabled: {
1107
+ value: "{blue.200}",
1108
+ type: "color"
1109
+ }
1110
+ },
1111
+ color: {
1112
+ default: {
1113
+ value: "{core.white}",
1114
+ type: "color"
1115
+ },
1116
+ hover: {
1117
+ value: "{core.white}",
1118
+ type: "color"
1119
+ },
1120
+ pressed: {
1121
+ value: "{core.white}",
1122
+ type: "color"
1123
+ },
1124
+ focus: {
1125
+ value: "{core.white}",
1126
+ type: "color"
1127
+ },
1128
+ disabled: {
1129
+ value: "{core.white}",
1130
+ type: "color"
1131
+ }
1132
+ },
1133
+ border: {
1134
+ default: {
1135
+ value: "none",
1136
+ type: "color"
1137
+ },
1138
+ hover: {
1139
+ value: "none",
1140
+ type: "color"
1141
+ },
1142
+ pressed: {
1143
+ value: "none",
1144
+ type: "color"
1145
+ },
1146
+ focus: {
1147
+ value: "{blue.600}",
1148
+ type: "color"
1149
+ },
1150
+ disabled: {
1151
+ value: "none",
1152
+ type: "color"
1153
+ }
1154
+ },
1155
+ "border-width": {
1156
+ default: {
1157
+ value: "none",
1158
+ type: "borderWidth"
1159
+ },
1160
+ hover: {
1161
+ value: "none",
1162
+ type: "borderWidth"
1163
+ },
1164
+ pressed: {
1165
+ value: "none",
1166
+ type: "borderWidth"
1167
+ },
1168
+ focus: {
1169
+ value: "{border.1}",
1170
+ type: "borderWidth"
1171
+ },
1172
+ disabled: {
1173
+ value: "none",
1174
+ type: "borderWidth"
1175
+ }
1176
+ }
1177
+ },
1178
+ secondary: {
1179
+ "background-color": {
1180
+ default: {
1181
+ value: "none",
1182
+ type: "color"
1183
+ },
1184
+ hover: {
1185
+ value: "{grey.100}",
1186
+ type: "color"
1187
+ },
1188
+ pressed: {
1189
+ value: "{grey.100}",
1190
+ type: "color"
1191
+ },
1192
+ focus: {
1193
+ value: "none",
1194
+ type: "color"
1195
+ },
1196
+ disabled: {
1197
+ value: "none",
1198
+ type: "color"
1199
+ }
1200
+ },
1201
+ color: {
1202
+ default: {
1203
+ value: "{grey.500}",
1204
+ type: "color"
1205
+ },
1206
+ hover: {
1207
+ value: "{grey.500}",
1208
+ type: "color"
1209
+ },
1210
+ pressed: {
1211
+ value: "{grey.500}",
1212
+ type: "color"
1213
+ },
1214
+ focus: {
1215
+ value: "{grey.500}",
1216
+ type: "color"
1217
+ },
1218
+ disabled: {
1219
+ value: "{grey.100}",
1220
+ type: "color"
1221
+ }
1222
+ },
1223
+ border: {
1224
+ default: {
1225
+ value: "{grey.200}",
1226
+ type: "color"
1227
+ },
1228
+ hover: {
1229
+ value: "{grey.200}",
1230
+ type: "color"
1231
+ },
1232
+ pressed: {
1233
+ value: "{grey.200}",
1234
+ type: "color"
1235
+ },
1236
+ focus: {
1237
+ value: "{blue.600}",
1238
+ type: "color"
1239
+ },
1240
+ disabled: {
1241
+ value: "{grey.100}",
1242
+ type: "color"
1243
+ }
1244
+ },
1245
+ "border-width": {
1246
+ value: "{border.1}",
1247
+ type: "borderWidth"
1248
+ }
1249
+ },
1250
+ notification: {
1251
+ "background-color": {
1252
+ default: {
1253
+ value: "none",
1254
+ type: "color"
1255
+ },
1256
+ hover: {
1257
+ value: "{grey.100}",
1258
+ type: "color"
1259
+ },
1260
+ pressed: {
1261
+ value: "{grey.100}",
1262
+ type: "color"
1263
+ }
1264
+ },
1265
+ color: {
1266
+ default: {
1267
+ value: "{grey.500}",
1268
+ type: "color"
1269
+ },
1270
+ hover: {
1271
+ value: "{grey.500}",
1272
+ type: "color"
1273
+ },
1274
+ pressed: {
1275
+ value: "{grey.500}",
1276
+ type: "color"
1277
+ },
1278
+ focus: {
1279
+ value: "{grey.500}",
1280
+ type: "color"
1281
+ },
1282
+ disabled: {
1283
+ value: "{grey.100}",
1284
+ type: "color"
1285
+ }
1286
+ },
1287
+ border: {
1288
+ default: {
1289
+ value: "{grey.200}",
1290
+ type: "color"
1291
+ },
1292
+ hover: {
1293
+ value: "{grey.200}",
1294
+ type: "color"
1295
+ },
1296
+ pressed: {
1297
+ value: "{grey.200}",
1298
+ type: "color"
1299
+ },
1300
+ focus: {
1301
+ value: "{grey.200}",
1302
+ type: "color"
1303
+ },
1304
+ disabled: {
1305
+ value: "{grey.100}",
1306
+ type: "color"
1307
+ }
1308
+ },
1309
+ "border-width": {
1310
+ value: "{border.1}",
1311
+ type: "borderWidth"
1312
+ }
1313
+ },
1314
+ "notification-badge": {
1315
+ "background-color": {
1316
+ default: {
1317
+ value: "{blue.500}",
1318
+ type: "color"
1319
+ },
1320
+ hover: {
1321
+ value: "{blue.500}",
1322
+ type: "color"
1323
+ },
1324
+ pressed: {
1325
+ value: "{blue.500}",
1326
+ type: "color"
1327
+ },
1328
+ focus: {
1329
+ value: "{blue.500}",
1330
+ type: "color"
1331
+ },
1332
+ disabled: {
1333
+ value: "{grey.200}",
1334
+ type: "color"
1335
+ }
1336
+ },
1337
+ border: {
1338
+ default: {
1339
+ value: "{core.white}",
1340
+ type: "color"
1341
+ },
1342
+ hover: {
1343
+ value: "{core.white}",
1344
+ type: "color"
1345
+ },
1346
+ pressed: {
1347
+ value: "{core.white}",
1348
+ type: "color"
1349
+ },
1350
+ focus: {
1351
+ value: "{core.white}",
1352
+ type: "color"
1353
+ },
1354
+ disabled: {
1355
+ value: "{core.white}",
1356
+ type: "color"
1357
+ }
1358
+ },
1359
+ sm: {
1360
+ value: "{spacing.6}",
1361
+ type: "spacing"
1362
+ },
1363
+ md: {
1364
+ value: "{spacing.8}",
1365
+ type: "spacing"
1366
+ },
1367
+ lg: {
1368
+ value: "{spacing.10}",
1369
+ type: "spacing"
1370
+ },
1371
+ "border-width": {
1372
+ value: "{border.1}",
1373
+ type: "borderWidth"
1374
+ }
1375
+ },
1376
+ invisible: {
1377
+ "background-color": {
1378
+ default: {
1379
+ value: "none",
1380
+ type: "color"
1381
+ },
1382
+ hover: {
1383
+ value: "{grey.100}",
1384
+ type: "color"
1385
+ },
1386
+ pressed: {
1387
+ value: "{grey.100}",
1388
+ type: "color"
1389
+ },
1390
+ focus: {
1391
+ value: "none",
1392
+ type: "color"
1393
+ },
1394
+ disabled: {
1395
+ value: "none",
1396
+ type: "color"
1397
+ }
1398
+ },
1399
+ color: {
1400
+ default: {
1401
+ value: "{grey.500}",
1402
+ type: "color"
1403
+ },
1404
+ hover: {
1405
+ value: "{grey.500}",
1406
+ type: "color"
1407
+ },
1408
+ pressed: {
1409
+ value: "{grey.500}",
1410
+ type: "color"
1411
+ },
1412
+ focus: {
1413
+ value: "{grey.500}",
1414
+ type: "color"
1415
+ },
1416
+ disabled: {
1417
+ value: "{grey.100}",
1418
+ type: "color"
1419
+ }
1420
+ },
1421
+ border: {
1422
+ default: {
1423
+ value: "none",
1424
+ type: "color"
1425
+ },
1426
+ hover: {
1427
+ value: "none",
1428
+ type: "color"
1429
+ },
1430
+ pressed: {
1431
+ value: "none",
1432
+ type: "color"
1433
+ },
1434
+ focus: {
1435
+ value: "{blue.600}",
1436
+ type: "color"
1437
+ },
1438
+ disabled: {
1439
+ value: "{grey.100}",
1440
+ type: "color"
1441
+ }
1442
+ },
1443
+ "border-width": {
1444
+ default: {
1445
+ value: "none",
1446
+ type: "borderWidth"
1447
+ },
1448
+ hover: {
1449
+ value: "none",
1450
+ type: "borderWidth"
1451
+ },
1452
+ pressed: {
1453
+ value: "none",
1454
+ type: "borderWidth"
1455
+ },
1456
+ focus: {
1457
+ value: "{border.1}",
1458
+ type: "borderWidth"
1459
+ },
1460
+ disabled: {
1461
+ value: "{border.1}",
1462
+ type: "borderWidth"
1463
+ }
1464
+ }
1465
+ },
1466
+ "border-radius": {
1467
+ value: "{rounded.base}",
1468
+ type: "borderRadius"
1469
+ },
1470
+ "box-shadow": {
1471
+ default: {
1472
+ value: "{shadow.none}",
1473
+ type: "boxShadow"
1474
+ },
1475
+ hover: {
1476
+ value: "{shadow.none}",
1477
+ type: "boxShadow"
1478
+ },
1479
+ pressed: {
1480
+ value: "{shadow.inner}",
1481
+ type: "boxShadow"
1482
+ },
1483
+ focus: {
1484
+ value: "none",
1485
+ type: "boxShadow"
1486
+ },
1487
+ disabled: {
1488
+ value: "none",
1489
+ type: "boxShadow"
1490
+ }
1491
+ }
1492
+ },
1493
+ breadcrumbs: {
1494
+ color: {
1495
+ "previous-page": {
1496
+ value: "{blue.500}",
1497
+ type: "color"
1498
+ },
1499
+ divider: {
1500
+ value: "{grey.300}",
1501
+ type: "color"
1502
+ },
1503
+ "current-page": {
1504
+ value: "{grey.500}",
1505
+ type: "color"
1506
+ }
1507
+ },
1508
+ "font-family": {
1509
+ value: "{font-sans.inter}",
1510
+ type: "fontFamilies"
1511
+ },
1512
+ "font-weight": {
1513
+ value: "{font.normal}",
1514
+ type: "fontWeights"
1515
+ },
1516
+ "line-height": {
1517
+ value: "{leading.sm}",
1518
+ type: "lineHeights"
1519
+ },
1520
+ "font-size": {
1521
+ value: "{text.sm}",
1522
+ type: "fontSizes"
1523
+ }
1524
+ },
1525
+ "main-content": {
1526
+ sm: {
1527
+ value: "{spacing.32}",
1528
+ type: "spacing"
1529
+ },
1530
+ base: {
1531
+ value: "{spacing.48}",
1532
+ type: "spacing"
1533
+ },
1534
+ lg: {
1535
+ value: "{spacing.64}",
1536
+ type: "spacing"
1537
+ }
1538
+ },
1539
+ "section-content": {
1540
+ none: {
1541
+ value: "{spacing.0}",
1542
+ type: "spacing"
1543
+ },
1544
+ xs: {
1545
+ value: "{spacing.8}",
1546
+ type: "spacing"
1547
+ },
1548
+ sm: {
1549
+ value: "{spacing.16}",
1550
+ type: "spacing"
1551
+ },
1552
+ base: {
1553
+ value: "{spacing.24}",
1554
+ type: "spacing"
1555
+ },
1556
+ lg: {
1557
+ value: "{spacing.32}",
1558
+ type: "spacing"
1559
+ }
1560
+ }
1561
+ },
1562
+ $themes: [],
1563
+ $metadata: { tokenSetOrder: ["global", "alias"] }
1564
+ }, k = {
1565
+ $schema: "http://json-schema.org/draft-07/schema#",
1566
+ description: "Lista dei colori da includere nella safelist di Tailwind. Per aggiungere un nuovo colore, aggiungi il suo nome qui e rigenera il build con 'pnpm run build'.",
1567
+ safeColorNames: [
1568
+ "blue",
1569
+ "purple",
1570
+ "orange",
1571
+ "pink",
1572
+ "yellow",
1573
+ "grey",
1574
+ "core"
1575
+ ]
1576
+ }, A = {
1577
+ $schema: "http://json-schema.org/draft-07/schema#",
1578
+ description: "Lista dei colori semantici da includere nella safelist di Tailwind. Per aggiungere un nuovo colore semantico, aggiungi il suo nome qui e rigenera il build con 'pnpm run build'.",
1579
+ semanticColorNames: [
1580
+ "error",
1581
+ "warning",
1582
+ "success",
1583
+ "info"
1584
+ ]
1585
+ }, j = k.safeColorNames, M = A.semanticColorNames, N = {};
1586
+ j.forEach((e) => {
1587
+ let t = O.global[e];
1588
+ t && Object.keys(t).forEach((n) => {
1589
+ let r = t[n]?.value;
1590
+ r && (N[e] || (N[e] = {}), N[e][n] = r);
1591
+ });
903
1592
  });
904
- const $ = F.global.semantic;
905
- $ && ve.forEach((e) => {
906
- const t = $[e];
907
- t && typeof t == "object" && Object.keys(t).forEach((o) => {
908
- var l;
909
- const a = (l = t[o]) == null ? void 0 : l.value;
910
- if (a) {
911
- const n = `semantic-${e}`;
912
- g[n] || (g[n] = {}), g[n][o] = a;
913
- }
914
- });
915
- });
916
- Object.entries(F.global.breakpoint).reduce(
917
- (e, [t, o]) => (e[t] = o.value, e),
918
- {}
919
- );
920
- var y = window.CustomEvent;
921
- (!y || typeof y == "object") && (y = function(t, o) {
922
- o = o || {};
923
- var a = document.createEvent("CustomEvent");
924
- return a.initCustomEvent(t, !!o.bubbles, !!o.cancelable, o.detail || null), a;
925
- }, y.prototype = window.Event.prototype);
926
- function X(e, t) {
927
- var o = "on" + t.type.toLowerCase();
928
- return typeof e[o] == "function" && e[o](t), e.dispatchEvent(t);
1593
+ var P = O.global.semantic;
1594
+ P && M.forEach((e) => {
1595
+ let t = P[e];
1596
+ t && typeof t == "object" && Object.keys(t).forEach((n) => {
1597
+ let r = t[n]?.value;
1598
+ if (r) {
1599
+ let t = `semantic-${e}`;
1600
+ N[t] || (N[t] = {}), N[t][n] = r;
1601
+ }
1602
+ });
1603
+ }), Object.entries(O.global.breakpoint).reduce((e, [t, n]) => (e[t] = n.value, e), {});
1604
+ //#endregion
1605
+ //#region ../../node_modules/.pnpm/dialog-polyfill@0.5.6/node_modules/dialog-polyfill/dist/dialog-polyfill.esm.js
1606
+ var F = window.CustomEvent;
1607
+ (!F || typeof F == "object") && (F = function(e, t) {
1608
+ t ||= {};
1609
+ var n = document.createEvent("CustomEvent");
1610
+ return n.initCustomEvent(e, !!t.bubbles, !!t.cancelable, t.detail || null), n;
1611
+ }, F.prototype = window.Event.prototype);
1612
+ function I(e, t) {
1613
+ var n = "on" + t.type.toLowerCase();
1614
+ return typeof e[n] == "function" && e[n](t), e.dispatchEvent(t);
929
1615
  }
930
- function ye(e) {
931
- for (; e && e !== document.body; ) {
932
- var t = window.getComputedStyle(e), o = function(a, l) {
933
- return !(t[a] === void 0 || t[a] === l);
934
- };
935
- if (t.opacity < 1 || o("zIndex", "auto") || o("transform", "none") || o("mixBlendMode", "normal") || o("filter", "none") || o("perspective", "none") || t.isolation === "isolate" || t.position === "fixed" || t.webkitOverflowScrolling === "touch")
936
- return !0;
937
- e = e.parentElement;
938
- }
939
- return !1;
1616
+ function L(e) {
1617
+ for (; e && e !== document.body;) {
1618
+ var t = window.getComputedStyle(e), n = function(e, n) {
1619
+ return !(t[e] === void 0 || t[e] === n);
1620
+ };
1621
+ if (t.opacity < 1 || n("zIndex", "auto") || n("transform", "none") || n("mixBlendMode", "normal") || n("filter", "none") || n("perspective", "none") || t.isolation === "isolate" || t.position === "fixed" || t.webkitOverflowScrolling === "touch") return !0;
1622
+ e = e.parentElement;
1623
+ }
1624
+ return !1;
940
1625
  }
941
- function S(e) {
942
- for (; e; ) {
943
- if (e.localName === "dialog")
944
- return (
945
- /** @type {HTMLDialogElement} */
946
- e
947
- );
948
- e.parentElement ? e = e.parentElement : e.parentNode ? e = e.parentNode.host : e = null;
949
- }
950
- return null;
1626
+ function R(e) {
1627
+ for (; e;) {
1628
+ if (e.localName === "dialog") return e;
1629
+ e = e.parentElement ? e.parentElement : e.parentNode ? e.parentNode.host : null;
1630
+ }
1631
+ return null;
951
1632
  }
952
- function Y(e) {
953
- for (; e && e.shadowRoot && e.shadowRoot.activeElement; )
954
- e = e.shadowRoot.activeElement;
955
- e && e.blur && e !== document.body && e.blur();
1633
+ function z(e) {
1634
+ for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
1635
+ e && e.blur && e !== document.body && e.blur();
956
1636
  }
957
- function me(e, t) {
958
- for (var o = 0; o < e.length; ++o)
959
- if (e[o] === t)
960
- return !0;
961
- return !1;
1637
+ function B(e, t) {
1638
+ for (var n = 0; n < e.length; ++n) if (e[n] === t) return !0;
1639
+ return !1;
962
1640
  }
963
- function L(e) {
964
- return !e || !e.hasAttribute("method") ? !1 : e.getAttribute("method").toLowerCase() === "dialog";
1641
+ function V(e) {
1642
+ return !e || !e.hasAttribute("method") ? !1 : e.getAttribute("method").toLowerCase() === "dialog";
965
1643
  }
966
- function Z(e) {
967
- var t = ["button", "input", "keygen", "select", "textarea"], o = t.map(function(i) {
968
- return i + ":not([disabled])";
969
- });
970
- o.push('[tabindex]:not([disabled]):not([tabindex=""])');
971
- var a = e.querySelector(o.join(", "));
972
- if (!a && "attachShadow" in Element.prototype)
973
- for (var l = e.querySelectorAll("*"), n = 0; n < l.length && !(l[n].tagName && l[n].shadowRoot && (a = Z(l[n].shadowRoot), a)); n++)
974
- ;
975
- return a;
1644
+ function H(e) {
1645
+ var t = [
1646
+ "button",
1647
+ "input",
1648
+ "keygen",
1649
+ "select",
1650
+ "textarea"
1651
+ ].map(function(e) {
1652
+ return e + ":not([disabled])";
1653
+ });
1654
+ t.push("[tabindex]:not([disabled]):not([tabindex=\"\"])");
1655
+ var n = e.querySelector(t.join(", "));
1656
+ if (!n && "attachShadow" in Element.prototype) for (var r = e.querySelectorAll("*"), i = 0; i < r.length && !(r[i].tagName && r[i].shadowRoot && (n = H(r[i].shadowRoot), n)); i++);
1657
+ return n;
976
1658
  }
977
- function j(e) {
978
- return e.isConnected || document.body.contains(e);
1659
+ function U(e) {
1660
+ return e.isConnected || document.body.contains(e);
979
1661
  }
980
- function J(e) {
981
- if (e.submitter)
982
- return e.submitter;
983
- var t = e.target;
984
- if (!(t instanceof HTMLFormElement))
985
- return null;
986
- var o = r.formSubmitter;
987
- if (!o) {
988
- var a = e.target, l = "getRootNode" in a && a.getRootNode() || document;
989
- o = l.activeElement;
990
- }
991
- return !o || o.form !== t ? null : o;
1662
+ function W(e) {
1663
+ if (e.submitter) return e.submitter;
1664
+ var t = e.target;
1665
+ if (!(t instanceof HTMLFormElement)) return null;
1666
+ var n = q.formSubmitter;
1667
+ if (!n) {
1668
+ var r = e.target;
1669
+ n = ("getRootNode" in r && r.getRootNode() || document).activeElement;
1670
+ }
1671
+ return !n || n.form !== t ? null : n;
992
1672
  }
993
- function ge(e) {
994
- if (!e.defaultPrevented) {
995
- var t = (
996
- /** @type {!HTMLFormElement} */
997
- e.target
998
- ), o = r.imagemapUseValue, a = J(e);
999
- o === null && a && (o = a.value);
1000
- var l = S(t);
1001
- if (l) {
1002
- var n = a && a.getAttribute("formmethod") || t.getAttribute("method");
1003
- n === "dialog" && (e.preventDefault(), o != null ? l.close(o) : l.close());
1004
- }
1005
- }
1673
+ function G(e) {
1674
+ if (!e.defaultPrevented) {
1675
+ var t = e.target, n = q.imagemapUseValue, r = W(e);
1676
+ n === null && r && (n = r.value);
1677
+ var i = R(t);
1678
+ i && (r && r.getAttribute("formmethod") || t.getAttribute("method")) === "dialog" && (e.preventDefault(), n == null ? i.close() : i.close(n));
1679
+ }
1006
1680
  }
1007
- function Q(e) {
1008
- if (this.dialog_ = e, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, e.hasAttribute("role") || e.setAttribute("role", "dialog"), e.show = this.show.bind(this), e.showModal = this.showModal.bind(this), e.close = this.close.bind(this), e.addEventListener("submit", ge, !1), "returnValue" in e || (e.returnValue = ""), "MutationObserver" in window) {
1009
- var t = new MutationObserver(this.maybeHideModal.bind(this));
1010
- t.observe(e, { attributes: !0, attributeFilter: ["open"] });
1011
- } else {
1012
- var o = !1, a = (function() {
1013
- o ? this.downgradeModal() : this.maybeHideModal(), o = !1;
1014
- }).bind(this), l, n = function(i) {
1015
- if (i.target === e) {
1016
- var c = "DOMNodeRemoved";
1017
- o |= i.type.substr(0, c.length) === c, window.clearTimeout(l), l = window.setTimeout(a, 0);
1018
- }
1019
- };
1020
- ["DOMAttrModified", "DOMNodeRemoved", "DOMNodeRemovedFromDocument"].forEach(function(i) {
1021
- e.addEventListener(i, n);
1022
- });
1023
- }
1024
- Object.defineProperty(e, "open", {
1025
- set: this.setOpen.bind(this),
1026
- get: e.hasAttribute.bind(e, "open")
1027
- }), this.backdrop_ = document.createElement("div"), this.backdrop_.className = "backdrop", this.backdrop_.addEventListener("mouseup", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("mousedown", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("click", this.backdropMouseEvent_.bind(this));
1681
+ function K(e) {
1682
+ if (this.dialog_ = e, this.replacedStyleTop_ = !1, this.openAsModal_ = !1, e.hasAttribute("role") || e.setAttribute("role", "dialog"), e.show = this.show.bind(this), e.showModal = this.showModal.bind(this), e.close = this.close.bind(this), e.addEventListener("submit", G, !1), "returnValue" in e || (e.returnValue = ""), "MutationObserver" in window) new MutationObserver(this.maybeHideModal.bind(this)).observe(e, {
1683
+ attributes: !0,
1684
+ attributeFilter: ["open"]
1685
+ });
1686
+ else {
1687
+ var t = !1, n = function() {
1688
+ t ? this.downgradeModal() : this.maybeHideModal(), t = !1;
1689
+ }.bind(this), r, i = function(i) {
1690
+ if (i.target === e) {
1691
+ var a = "DOMNodeRemoved";
1692
+ t |= i.type.substr(0, a.length) === a, window.clearTimeout(r), r = window.setTimeout(n, 0);
1693
+ }
1694
+ };
1695
+ [
1696
+ "DOMAttrModified",
1697
+ "DOMNodeRemoved",
1698
+ "DOMNodeRemovedFromDocument"
1699
+ ].forEach(function(t) {
1700
+ e.addEventListener(t, i);
1701
+ });
1702
+ }
1703
+ Object.defineProperty(e, "open", {
1704
+ set: this.setOpen.bind(this),
1705
+ get: e.hasAttribute.bind(e, "open")
1706
+ }), this.backdrop_ = document.createElement("div"), this.backdrop_.className = "backdrop", this.backdrop_.addEventListener("mouseup", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("mousedown", this.backdropMouseEvent_.bind(this)), this.backdrop_.addEventListener("click", this.backdropMouseEvent_.bind(this));
1028
1707
  }
1029
- Q.prototype = /** @type {HTMLDialogElement.prototype} */
1030
- {
1031
- get dialog() {
1032
- return this.dialog_;
1033
- },
1034
- /**
1035
- * Maybe remove this dialog from the modal top layer. This is called when
1036
- * a modal dialog may no longer be tenable, e.g., when the dialog is no
1037
- * longer open or is no longer part of the DOM.
1038
- */
1039
- maybeHideModal: function() {
1040
- this.dialog_.hasAttribute("open") && j(this.dialog_) || this.downgradeModal();
1041
- },
1042
- /**
1043
- * Remove this dialog from the modal top layer, leaving it as a non-modal.
1044
- */
1045
- downgradeModal: function() {
1046
- this.openAsModal_ && (this.openAsModal_ = !1, this.dialog_.style.zIndex = "", this.replacedStyleTop_ && (this.dialog_.style.top = "", this.replacedStyleTop_ = !1), this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_), r.dm.removeDialog(this));
1047
- },
1048
- /**
1049
- * @param {boolean} value whether to open or close this dialog
1050
- */
1051
- setOpen: function(e) {
1052
- e ? this.dialog_.hasAttribute("open") || this.dialog_.setAttribute("open", "") : (this.dialog_.removeAttribute("open"), this.maybeHideModal());
1053
- },
1054
- /**
1055
- * Handles mouse events ('mouseup', 'mousedown', 'click') on the fake .backdrop element, redirecting them as if
1056
- * they were on the dialog itself.
1057
- *
1058
- * @param {!Event} e to redirect
1059
- */
1060
- backdropMouseEvent_: function(e) {
1061
- if (this.dialog_.hasAttribute("tabindex"))
1062
- this.dialog_.focus();
1063
- else {
1064
- var t = document.createElement("div");
1065
- this.dialog_.insertBefore(t, this.dialog_.firstChild), t.tabIndex = -1, t.focus(), this.dialog_.removeChild(t);
1066
- }
1067
- var o = document.createEvent("MouseEvents");
1068
- o.initMouseEvent(
1069
- e.type,
1070
- e.bubbles,
1071
- e.cancelable,
1072
- window,
1073
- e.detail,
1074
- e.screenX,
1075
- e.screenY,
1076
- e.clientX,
1077
- e.clientY,
1078
- e.ctrlKey,
1079
- e.altKey,
1080
- e.shiftKey,
1081
- e.metaKey,
1082
- e.button,
1083
- e.relatedTarget
1084
- ), this.dialog_.dispatchEvent(o), e.stopPropagation();
1085
- },
1086
- /**
1087
- * Focuses on the first focusable element within the dialog. This will always blur the current
1088
- * focus, even if nothing within the dialog is found.
1089
- */
1090
- focus_: function() {
1091
- var e = this.dialog_.querySelector("[autofocus]:not([disabled])");
1092
- !e && this.dialog_.tabIndex >= 0 && (e = this.dialog_), e || (e = Z(this.dialog_)), Y(document.activeElement), e && e.focus();
1093
- },
1094
- /**
1095
- * Sets the zIndex for the backdrop and dialog.
1096
- *
1097
- * @param {number} dialogZ
1098
- * @param {number} backdropZ
1099
- */
1100
- updateZIndex: function(e, t) {
1101
- if (e < t)
1102
- throw new Error("dialogZ should never be < backdropZ");
1103
- this.dialog_.style.zIndex = e, this.backdrop_.style.zIndex = t;
1104
- },
1105
- /**
1106
- * Shows the dialog. If the dialog is already open, this does nothing.
1107
- */
1108
- show: function() {
1109
- this.dialog_.open || (this.setOpen(!0), this.focus_());
1110
- },
1111
- /**
1112
- * Show this dialog modally.
1113
- */
1114
- showModal: function() {
1115
- if (this.dialog_.hasAttribute("open"))
1116
- throw new Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");
1117
- if (!j(this.dialog_))
1118
- throw new Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
1119
- if (!r.dm.pushDialog(this))
1120
- throw new Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
1121
- ye(this.dialog_.parentElement) && console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"), this.setOpen(!0), this.openAsModal_ = !0, r.needsCentering(this.dialog_) ? (r.reposition(this.dialog_), this.replacedStyleTop_ = !0) : this.replacedStyleTop_ = !1, this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling), this.focus_();
1122
- },
1123
- /**
1124
- * Closes this HTMLDialogElement. This is optional vs clearing the open
1125
- * attribute, however this fires a 'close' event.
1126
- *
1127
- * @param {string=} opt_returnValue to use as the returnValue
1128
- */
1129
- close: function(e) {
1130
- if (!this.dialog_.hasAttribute("open"))
1131
- throw new Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
1132
- this.setOpen(!1), e !== void 0 && (this.dialog_.returnValue = e);
1133
- var t = new y("close", {
1134
- bubbles: !1,
1135
- cancelable: !1
1136
- });
1137
- X(this.dialog_, t);
1138
- }
1139
- };
1140
- var r = {};
1141
- r.reposition = function(e) {
1142
- var t = document.body.scrollTop || document.documentElement.scrollTop, o = t + (window.innerHeight - e.offsetHeight) / 2;
1143
- e.style.top = Math.max(t, o) + "px";
1144
- };
1145
- r.isInlinePositionSetByStylesheet = function(e) {
1146
- for (var t = 0; t < document.styleSheets.length; ++t) {
1147
- var o = document.styleSheets[t], a = null;
1148
- try {
1149
- a = o.cssRules;
1150
- } catch {
1151
- }
1152
- if (a)
1153
- for (var l = 0; l < a.length; ++l) {
1154
- var n = a[l], i = null;
1155
- try {
1156
- i = document.querySelectorAll(n.selectorText);
1157
- } catch {
1158
- }
1159
- if (!(!i || !me(i, e))) {
1160
- var c = n.style.getPropertyValue("top"), d = n.style.getPropertyValue("bottom");
1161
- if (c && c !== "auto" || d && d !== "auto")
1162
- return !0;
1163
- }
1164
- }
1165
- }
1166
- return !1;
1167
- };
1168
- r.needsCentering = function(e) {
1169
- var t = window.getComputedStyle(e);
1170
- return t.position !== "absolute" || e.style.top !== "auto" && e.style.top !== "" || e.style.bottom !== "auto" && e.style.bottom !== "" ? !1 : !r.isInlinePositionSetByStylesheet(e);
1171
- };
1172
- r.forceRegisterDialog = function(e) {
1173
- if ((window.HTMLDialogElement || e.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", e), e.localName !== "dialog")
1174
- throw new Error("Failed to register dialog: The element is not a dialog.");
1175
- new Q(
1176
- /** @type {!HTMLDialogElement} */
1177
- e
1178
- );
1179
- };
1180
- r.registerDialog = function(e) {
1181
- e.showModal || r.forceRegisterDialog(e);
1182
- };
1183
- r.DialogManager = function() {
1184
- this.pendingDialogStack = [];
1185
- var e = this.checkDOM_.bind(this);
1186
- this.overlay = document.createElement("div"), this.overlay.className = "_dialog_overlay", this.overlay.addEventListener("click", (function(t) {
1187
- this.forwardTab_ = void 0, t.stopPropagation(), e([]);
1188
- }).bind(this)), this.handleKey_ = this.handleKey_.bind(this), this.handleFocus_ = this.handleFocus_.bind(this), this.zIndexLow_ = 1e5, this.zIndexHigh_ = 100150, this.forwardTab_ = void 0, "MutationObserver" in window && (this.mo_ = new MutationObserver(function(t) {
1189
- var o = [];
1190
- t.forEach(function(a) {
1191
- for (var l = 0, n; n = a.removedNodes[l]; ++l) {
1192
- if (n instanceof Element)
1193
- n.localName === "dialog" && o.push(n);
1194
- else continue;
1195
- o = o.concat(n.querySelectorAll("dialog"));
1196
- }
1197
- }), o.length && e(o);
1198
- }));
1199
- };
1200
- r.DialogManager.prototype.blockDocument = function() {
1201
- document.documentElement.addEventListener("focus", this.handleFocus_, !0), document.addEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.observe(document, { childList: !0, subtree: !0 });
1708
+ K.prototype = {
1709
+ get dialog() {
1710
+ return this.dialog_;
1711
+ },
1712
+ maybeHideModal: function() {
1713
+ this.dialog_.hasAttribute("open") && U(this.dialog_) || this.downgradeModal();
1714
+ },
1715
+ downgradeModal: function() {
1716
+ this.openAsModal_ && (this.openAsModal_ = !1, this.dialog_.style.zIndex = "", this.replacedStyleTop_ &&= (this.dialog_.style.top = "", !1), this.backdrop_.parentNode && this.backdrop_.parentNode.removeChild(this.backdrop_), q.dm.removeDialog(this));
1717
+ },
1718
+ setOpen: function(e) {
1719
+ e ? this.dialog_.hasAttribute("open") || this.dialog_.setAttribute("open", "") : (this.dialog_.removeAttribute("open"), this.maybeHideModal());
1720
+ },
1721
+ backdropMouseEvent_: function(e) {
1722
+ if (this.dialog_.hasAttribute("tabindex")) this.dialog_.focus();
1723
+ else {
1724
+ var t = document.createElement("div");
1725
+ this.dialog_.insertBefore(t, this.dialog_.firstChild), t.tabIndex = -1, t.focus(), this.dialog_.removeChild(t);
1726
+ }
1727
+ var n = document.createEvent("MouseEvents");
1728
+ n.initMouseEvent(e.type, e.bubbles, e.cancelable, window, e.detail, e.screenX, e.screenY, e.clientX, e.clientY, e.ctrlKey, e.altKey, e.shiftKey, e.metaKey, e.button, e.relatedTarget), this.dialog_.dispatchEvent(n), e.stopPropagation();
1729
+ },
1730
+ focus_: function() {
1731
+ var e = this.dialog_.querySelector("[autofocus]:not([disabled])");
1732
+ !e && this.dialog_.tabIndex >= 0 && (e = this.dialog_), e ||= H(this.dialog_), z(document.activeElement), e && e.focus();
1733
+ },
1734
+ updateZIndex: function(e, t) {
1735
+ if (e < t) throw Error("dialogZ should never be < backdropZ");
1736
+ this.dialog_.style.zIndex = e, this.backdrop_.style.zIndex = t;
1737
+ },
1738
+ show: function() {
1739
+ this.dialog_.open || (this.setOpen(!0), this.focus_());
1740
+ },
1741
+ showModal: function() {
1742
+ if (this.dialog_.hasAttribute("open")) throw Error("Failed to execute 'showModal' on dialog: The element is already open, and therefore cannot be opened modally.");
1743
+ if (!U(this.dialog_)) throw Error("Failed to execute 'showModal' on dialog: The element is not in a Document.");
1744
+ if (!q.dm.pushDialog(this)) throw Error("Failed to execute 'showModal' on dialog: There are too many open modal dialogs.");
1745
+ L(this.dialog_.parentElement) && console.warn("A dialog is being shown inside a stacking context. This may cause it to be unusable. For more information, see this link: https://github.com/GoogleChrome/dialog-polyfill/#stacking-context"), this.setOpen(!0), this.openAsModal_ = !0, q.needsCentering(this.dialog_) ? (q.reposition(this.dialog_), this.replacedStyleTop_ = !0) : this.replacedStyleTop_ = !1, this.dialog_.parentNode.insertBefore(this.backdrop_, this.dialog_.nextSibling), this.focus_();
1746
+ },
1747
+ close: function(e) {
1748
+ if (!this.dialog_.hasAttribute("open")) throw Error("Failed to execute 'close' on dialog: The element does not have an 'open' attribute, and therefore cannot be closed.");
1749
+ this.setOpen(!1), e !== void 0 && (this.dialog_.returnValue = e);
1750
+ var t = new F("close", {
1751
+ bubbles: !1,
1752
+ cancelable: !1
1753
+ });
1754
+ I(this.dialog_, t);
1755
+ }
1202
1756
  };
1203
- r.DialogManager.prototype.unblockDocument = function() {
1204
- document.documentElement.removeEventListener("focus", this.handleFocus_, !0), document.removeEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.disconnect();
1205
- };
1206
- r.DialogManager.prototype.updateStacking = function() {
1207
- for (var e = this.zIndexHigh_, t = 0, o; o = this.pendingDialogStack[t]; ++t)
1208
- o.updateZIndex(--e, --e), t === 0 && (this.overlay.style.zIndex = --e);
1209
- var a = this.pendingDialogStack[0];
1210
- if (a) {
1211
- var l = a.dialog.parentNode || document.body;
1212
- l.appendChild(this.overlay);
1213
- } else this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
1214
- };
1215
- r.DialogManager.prototype.containedByTopDialog_ = function(e) {
1216
- for (; e = S(e); ) {
1217
- for (var t = 0, o; o = this.pendingDialogStack[t]; ++t)
1218
- if (o.dialog === e)
1219
- return t === 0;
1220
- e = e.parentElement;
1221
- }
1222
- return !1;
1223
- };
1224
- r.DialogManager.prototype.handleFocus_ = function(e) {
1225
- var t = e.composedPath ? e.composedPath()[0] : e.target;
1226
- if (!this.containedByTopDialog_(t) && document.activeElement !== document.documentElement && (e.preventDefault(), e.stopPropagation(), Y(
1227
- /** @type {Element} */
1228
- t
1229
- ), this.forwardTab_ !== void 0)) {
1230
- var o = this.pendingDialogStack[0], a = o.dialog, l = a.compareDocumentPosition(t);
1231
- return l & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ? o.focus_() : t !== document.documentElement && document.documentElement.focus()), !1;
1232
- }
1233
- };
1234
- r.DialogManager.prototype.handleKey_ = function(e) {
1235
- if (this.forwardTab_ = void 0, e.keyCode === 27) {
1236
- e.preventDefault(), e.stopPropagation();
1237
- var t = new y("cancel", {
1238
- bubbles: !1,
1239
- cancelable: !0
1240
- }), o = this.pendingDialogStack[0];
1241
- o && X(o.dialog, t) && o.dialog.close();
1242
- } else e.keyCode === 9 && (this.forwardTab_ = !e.shiftKey);
1243
- };
1244
- r.DialogManager.prototype.checkDOM_ = function(e) {
1245
- var t = this.pendingDialogStack.slice();
1246
- t.forEach(function(o) {
1247
- e.indexOf(o.dialog) !== -1 ? o.downgradeModal() : o.maybeHideModal();
1248
- });
1249
- };
1250
- r.DialogManager.prototype.pushDialog = function(e) {
1251
- var t = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
1252
- return this.pendingDialogStack.length >= t ? !1 : (this.pendingDialogStack.unshift(e) === 1 && this.blockDocument(), this.updateStacking(), !0);
1253
- };
1254
- r.DialogManager.prototype.removeDialog = function(e) {
1255
- var t = this.pendingDialogStack.indexOf(e);
1256
- t !== -1 && (this.pendingDialogStack.splice(t, 1), this.pendingDialogStack.length === 0 && this.unblockDocument(), this.updateStacking());
1257
- };
1258
- r.dm = new r.DialogManager();
1259
- r.formSubmitter = null;
1260
- r.imagemapUseValue = null;
1261
- if (window.HTMLDialogElement === void 0) {
1262
- var U = document.createElement("form");
1263
- if (U.setAttribute("method", "dialog"), U.method !== "dialog") {
1264
- var v = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
1265
- if (v) {
1266
- var be = v.get;
1267
- v.get = function() {
1268
- return L(this) ? "dialog" : be.call(this);
1269
- };
1270
- var xe = v.set;
1271
- v.set = function(e) {
1272
- return typeof e == "string" && e.toLowerCase() === "dialog" ? this.setAttribute("method", e) : xe.call(this, e);
1273
- }, Object.defineProperty(HTMLFormElement.prototype, "method", v);
1274
- }
1275
- }
1276
- document.addEventListener("click", function(e) {
1277
- if (r.formSubmitter = null, r.imagemapUseValue = null, !e.defaultPrevented) {
1278
- var t = (
1279
- /** @type {Element} */
1280
- e.target
1281
- );
1282
- if ("composedPath" in e) {
1283
- var o = e.composedPath();
1284
- t = o.shift() || t;
1285
- }
1286
- if (!(!t || !L(t.form))) {
1287
- var a = t.type === "submit" && ["button", "input"].indexOf(t.localName) > -1;
1288
- if (!a) {
1289
- if (!(t.localName === "input" && t.type === "image"))
1290
- return;
1291
- r.imagemapUseValue = e.offsetX + "," + e.offsetY;
1292
- }
1293
- var l = S(t);
1294
- l && (r.formSubmitter = t);
1295
- }
1296
- }
1297
- }, !1), document.addEventListener("submit", function(e) {
1298
- var t = e.target, o = S(t);
1299
- if (!o) {
1300
- var a = J(e), l = a && a.getAttribute("formmethod") || t.getAttribute("method");
1301
- l === "dialog" && e.preventDefault();
1302
- }
1303
- });
1304
- var we = HTMLFormElement.prototype.submit, Ee = function() {
1305
- if (!L(this))
1306
- return we.call(this);
1307
- var e = S(this);
1308
- e && e.close();
1309
- };
1310
- HTMLFormElement.prototype.submit = Ee;
1757
+ var q = {};
1758
+ if (q.reposition = function(e) {
1759
+ var t = document.body.scrollTop || document.documentElement.scrollTop, n = t + (window.innerHeight - e.offsetHeight) / 2;
1760
+ e.style.top = Math.max(t, n) + "px";
1761
+ }, q.isInlinePositionSetByStylesheet = function(e) {
1762
+ for (var t = 0; t < document.styleSheets.length; ++t) {
1763
+ var n = document.styleSheets[t], r = null;
1764
+ try {
1765
+ r = n.cssRules;
1766
+ } catch {}
1767
+ if (r) for (var i = 0; i < r.length; ++i) {
1768
+ var a = r[i], o = null;
1769
+ try {
1770
+ o = document.querySelectorAll(a.selectorText);
1771
+ } catch {}
1772
+ if (!(!o || !B(o, e))) {
1773
+ var s = a.style.getPropertyValue("top"), c = a.style.getPropertyValue("bottom");
1774
+ if (s && s !== "auto" || c && c !== "auto") return !0;
1775
+ }
1776
+ }
1777
+ }
1778
+ return !1;
1779
+ }, q.needsCentering = function(e) {
1780
+ return window.getComputedStyle(e).position !== "absolute" || e.style.top !== "auto" && e.style.top !== "" || e.style.bottom !== "auto" && e.style.bottom !== "" ? !1 : !q.isInlinePositionSetByStylesheet(e);
1781
+ }, q.forceRegisterDialog = function(e) {
1782
+ if ((window.HTMLDialogElement || e.showModal) && console.warn("This browser already supports <dialog>, the polyfill may not work correctly", e), e.localName !== "dialog") throw Error("Failed to register dialog: The element is not a dialog.");
1783
+ new K(e);
1784
+ }, q.registerDialog = function(e) {
1785
+ e.showModal || q.forceRegisterDialog(e);
1786
+ }, q.DialogManager = function() {
1787
+ this.pendingDialogStack = [];
1788
+ var e = this.checkDOM_.bind(this);
1789
+ this.overlay = document.createElement("div"), this.overlay.className = "_dialog_overlay", this.overlay.addEventListener("click", function(t) {
1790
+ this.forwardTab_ = void 0, t.stopPropagation(), e([]);
1791
+ }.bind(this)), this.handleKey_ = this.handleKey_.bind(this), this.handleFocus_ = this.handleFocus_.bind(this), this.zIndexLow_ = 1e5, this.zIndexHigh_ = 100150, this.forwardTab_ = void 0, "MutationObserver" in window && (this.mo_ = new MutationObserver(function(t) {
1792
+ var n = [];
1793
+ t.forEach(function(e) {
1794
+ for (var t = 0, r; r = e.removedNodes[t]; ++t) {
1795
+ if (r instanceof Element) r.localName === "dialog" && n.push(r);
1796
+ else continue;
1797
+ n = n.concat(r.querySelectorAll("dialog"));
1798
+ }
1799
+ }), n.length && e(n);
1800
+ }));
1801
+ }, q.DialogManager.prototype.blockDocument = function() {
1802
+ document.documentElement.addEventListener("focus", this.handleFocus_, !0), document.addEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.observe(document, {
1803
+ childList: !0,
1804
+ subtree: !0
1805
+ });
1806
+ }, q.DialogManager.prototype.unblockDocument = function() {
1807
+ document.documentElement.removeEventListener("focus", this.handleFocus_, !0), document.removeEventListener("keydown", this.handleKey_), this.mo_ && this.mo_.disconnect();
1808
+ }, q.DialogManager.prototype.updateStacking = function() {
1809
+ for (var e = this.zIndexHigh_, t = 0, n; n = this.pendingDialogStack[t]; ++t) n.updateZIndex(--e, --e), t === 0 && (this.overlay.style.zIndex = --e);
1810
+ var r = this.pendingDialogStack[0];
1811
+ r ? (r.dialog.parentNode || document.body).appendChild(this.overlay) : this.overlay.parentNode && this.overlay.parentNode.removeChild(this.overlay);
1812
+ }, q.DialogManager.prototype.containedByTopDialog_ = function(e) {
1813
+ for (; e = R(e);) {
1814
+ for (var t = 0, n; n = this.pendingDialogStack[t]; ++t) if (n.dialog === e) return t === 0;
1815
+ e = e.parentElement;
1816
+ }
1817
+ return !1;
1818
+ }, q.DialogManager.prototype.handleFocus_ = function(e) {
1819
+ var t = e.composedPath ? e.composedPath()[0] : e.target;
1820
+ if (!this.containedByTopDialog_(t) && document.activeElement !== document.documentElement && (e.preventDefault(), e.stopPropagation(), z(t), this.forwardTab_ !== void 0)) {
1821
+ var n = this.pendingDialogStack[0];
1822
+ return n.dialog.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING && (this.forwardTab_ ? n.focus_() : t !== document.documentElement && document.documentElement.focus()), !1;
1823
+ }
1824
+ }, q.DialogManager.prototype.handleKey_ = function(e) {
1825
+ if (this.forwardTab_ = void 0, e.keyCode === 27) {
1826
+ e.preventDefault(), e.stopPropagation();
1827
+ var t = new F("cancel", {
1828
+ bubbles: !1,
1829
+ cancelable: !0
1830
+ }), n = this.pendingDialogStack[0];
1831
+ n && I(n.dialog, t) && n.dialog.close();
1832
+ } else e.keyCode === 9 && (this.forwardTab_ = !e.shiftKey);
1833
+ }, q.DialogManager.prototype.checkDOM_ = function(e) {
1834
+ this.pendingDialogStack.slice().forEach(function(t) {
1835
+ e.indexOf(t.dialog) === -1 ? t.maybeHideModal() : t.downgradeModal();
1836
+ });
1837
+ }, q.DialogManager.prototype.pushDialog = function(e) {
1838
+ var t = (this.zIndexHigh_ - this.zIndexLow_) / 2 - 1;
1839
+ return this.pendingDialogStack.length >= t ? !1 : (this.pendingDialogStack.unshift(e) === 1 && this.blockDocument(), this.updateStacking(), !0);
1840
+ }, q.DialogManager.prototype.removeDialog = function(e) {
1841
+ var t = this.pendingDialogStack.indexOf(e);
1842
+ t !== -1 && (this.pendingDialogStack.splice(t, 1), this.pendingDialogStack.length === 0 && this.unblockDocument(), this.updateStacking());
1843
+ }, q.dm = new q.DialogManager(), q.formSubmitter = null, q.imagemapUseValue = null, window.HTMLDialogElement === void 0) {
1844
+ var J = document.createElement("form");
1845
+ if (J.setAttribute("method", "dialog"), J.method !== "dialog") {
1846
+ var Y = Object.getOwnPropertyDescriptor(HTMLFormElement.prototype, "method");
1847
+ if (Y) {
1848
+ var X = Y.get;
1849
+ Y.get = function() {
1850
+ return V(this) ? "dialog" : X.call(this);
1851
+ };
1852
+ var Z = Y.set;
1853
+ Y.set = function(e) {
1854
+ return typeof e == "string" && e.toLowerCase() === "dialog" ? this.setAttribute("method", e) : Z.call(this, e);
1855
+ }, Object.defineProperty(HTMLFormElement.prototype, "method", Y);
1856
+ }
1857
+ }
1858
+ document.addEventListener("click", function(e) {
1859
+ if (q.formSubmitter = null, q.imagemapUseValue = null, !e.defaultPrevented) {
1860
+ var t = e.target;
1861
+ if ("composedPath" in e && (t = e.composedPath().shift() || t), !(!t || !V(t.form))) {
1862
+ if (!(t.type === "submit" && ["button", "input"].indexOf(t.localName) > -1)) {
1863
+ if (!(t.localName === "input" && t.type === "image")) return;
1864
+ q.imagemapUseValue = e.offsetX + "," + e.offsetY;
1865
+ }
1866
+ R(t) && (q.formSubmitter = t);
1867
+ }
1868
+ }
1869
+ }, !1), document.addEventListener("submit", function(e) {
1870
+ var t = e.target;
1871
+ if (!R(t)) {
1872
+ var n = W(e);
1873
+ (n && n.getAttribute("formmethod") || t.getAttribute("method")) === "dialog" && e.preventDefault();
1874
+ }
1875
+ });
1876
+ var Q = HTMLFormElement.prototype.submit, ee = function() {
1877
+ if (!V(this)) return Q.call(this);
1878
+ var e = R(this);
1879
+ e && e.close();
1880
+ };
1881
+ HTMLFormElement.prototype.submit = ee;
1311
1882
  }
1312
- const _e = { class: "flex items-center p-12 w-full border-b-1 border-grey-100 border-solid" }, Se = {
1313
- key: 0,
1314
- class: "flex flex-row p-12 border-t-1 border-grey-100 items-center border-solid"
1315
- }, ke = "flex flex-col bg-core-white", De = "border-1 rounded border-grey-100 p-0 z-[42] top-0 bottom-0", Ce = /* @__PURE__ */ G({
1316
- __name: "FzDialog",
1317
- props: {
1318
- size: { default: "md" },
1319
- title: {},
1320
- confirmLabel: {},
1321
- cancelLabel: {},
1322
- text: {},
1323
- isDrawer: { type: Boolean },
1324
- closeOnBackdrop: { type: Boolean, default: !0 },
1325
- closeOnEscape: { type: Boolean, default: !0 },
1326
- bodyClasses: {},
1327
- shouldAlwaysRender: { type: Boolean }
1328
- },
1329
- emits: ["fzmodal:cancel"],
1330
- setup(e, { expose: t, emit: o }) {
1331
- const a = e, l = o, n = h(), i = h(), c = h(), d = h(!1), p = h(!1);
1332
- function b() {
1333
- var u;
1334
- (u = n.value) == null || u.style.setProperty("--innerHeight", `${window.innerHeight}px`);
1335
- }
1336
- function k() {
1337
- b(), r.registerDialog(n.value), n.value.show(), d.value = !0;
1338
- }
1339
- T(() => {
1340
- window.addEventListener("resize", b);
1341
- }), ee(() => {
1342
- window.removeEventListener("resize", b);
1343
- });
1344
- const z = () => {
1345
- a.shouldAlwaysRender ? k() : p.value = !0;
1346
- }, x = (u) => {
1347
- var N;
1348
- (N = n.value) == null || N.close(u);
1349
- };
1350
- function D() {
1351
- d.value = !1, a.shouldAlwaysRender || (p.value = !1);
1352
- }
1353
- W(n, (u) => {
1354
- u && p.value && k();
1355
- }), t({
1356
- show: z,
1357
- close: x,
1358
- visible: d
1359
- }), ie(
1360
- c,
1361
- () => {
1362
- a.closeOnBackdrop && (n.value.close(), l("fzmodal:cancel"));
1363
- },
1364
- i
1365
- ), se((u) => {
1366
- !d.value || u.key !== "Escape" || !a.closeOnEscape || (n.value.close(), l("fzmodal:cancel"));
1367
- });
1368
- const C = H(() => {
1369
- if (a.isDrawer)
1370
- return "m-0 fixed top-0 ml-auto max-h-screen";
1371
- switch (a.size) {
1372
- case "md":
1373
- return "xs:max-sm:m-0 xs:max-sm:max-h-screen xs:max-sm:h-dvh xs:max-sm:w-dvw xs:max-sm:max-w-screen-xl";
1374
- case "lg":
1375
- return "xs:max-md:m-0 xs:max-md:max-h-screen xs:max-md:h-dvh xs:max-md:w-dvw xs:max-md:max-w-screen-xl";
1376
- case "xl":
1377
- return "xs:max-xl:m-0 xs:max-xl:max-h-screen xs:max-xl:h-dvh xs:max-xl:w-dvw xs:max-xl:max-w-screen-xl";
1378
- }
1379
- }), R = H(() => {
1380
- if (a.isDrawer)
1381
- return "w-[480px] h-dvh";
1382
- switch (a.size) {
1383
- case "sm":
1384
- return "w-[320px] min-h-[200px] max-h-[432px]";
1385
- case "md":
1386
- return "w-dvw sm:w-[480px] min-h-[300px] sm:max-h-[600px] h-dvh sm:h-auto";
1387
- case "lg":
1388
- return "w-dvw md:w-[640px] min-h-[300px] md:max-h-[600px] h-dvh md:h-auto";
1389
- case "xl":
1390
- return "w-dvw xl:w-[960px] min-h-[400px] xl:max-h-[600px] h-dvh xl:h-auto";
1391
- }
1392
- });
1393
- return (u, N) => p.value || e.shouldAlwaysRender ? te((E(), I("div", {
1394
- key: 0,
1395
- ref_key: "backdrop",
1396
- ref: i,
1397
- class: "fz-dialog__backdrop w-screen h-screen fixed flex flex-col items-center justify-start sm:justify-center z-20"
1398
- }, [
1399
- f("dialog", {
1400
- ref_key: "dialog",
1401
- ref: n,
1402
- onClose: D,
1403
- class: _([De, C.value])
1404
- }, [
1405
- f("div", {
1406
- ref_key: "innerDialog",
1407
- ref: c,
1408
- class: _([ke, R.value])
1409
- }, [
1410
- f("div", _e, [
1411
- m(u.$slots, "header", {}, void 0, !0)
1412
- ]),
1413
- f("div", {
1414
- class: _(["grow p-12 overflow-auto", e.bodyClasses])
1415
- }, [
1416
- m(u.$slots, "body", {}, void 0, !0)
1417
- ], 2),
1418
- u.$slots.footer ? (E(), I("div", Se, [
1419
- m(u.$slots, "footer", {}, void 0, !0)
1420
- ])) : M("", !0)
1421
- ], 2)
1422
- ], 34)
1423
- ], 512)), [
1424
- [oe, d.value]
1425
- ]) : M("", !0);
1426
- }
1427
- }), Me = (e, t) => {
1428
- const o = e.__vccOpts || e;
1429
- for (const [a, l] of t)
1430
- o[a] = l;
1431
- return o;
1432
- }, ze = /* @__PURE__ */ Me(Ce, [["__scopeId", "data-v-ba12262d"]]), Ne = { class: "grow h-28 font-medium" }, Oe = {
1433
- method: "dialog",
1434
- class: "w-full h-full"
1435
- }, Le = /* @__PURE__ */ G({
1436
- __name: "FzConfirmDialog",
1437
- props: {
1438
- size: { default: "md" },
1439
- title: {},
1440
- confirmLabel: {},
1441
- cancelLabel: {},
1442
- text: {},
1443
- isDrawer: { type: Boolean },
1444
- closeOnBackdrop: { type: Boolean },
1445
- closeOnEscape: { type: Boolean },
1446
- bodyClasses: {},
1447
- shouldAlwaysRender: { type: Boolean },
1448
- footerEnabled: { type: Boolean, default: !0 },
1449
- cancelButtonEnabled: { type: Boolean, default: !0 },
1450
- disableConfirm: { type: Boolean, default: !1 },
1451
- confirmButtonEnabled: { type: Boolean, default: !0 },
1452
- confirmButtonVariant: {},
1453
- doesConfirmButtonCloseDialog: { type: Boolean, default: !0 },
1454
- doesCancelButtonCloseDialog: { type: Boolean, default: !0 },
1455
- footerClasses: {}
1456
- },
1457
- emits: ["fzmodal:confirm", "fzmodal:cancel"],
1458
- setup(e, { expose: t, emit: o }) {
1459
- const a = e, l = o, n = h(), i = h(!1), c = ["flex flex-row items-center text-xl grow"], d = H(() => ({
1460
- "h-32": a.isDrawer,
1461
- "h-28": !a.isDrawer
1462
- })), p = [
1463
- "flex flex-row items-center h-32 grow justify-end"
1464
- ], b = {
1465
- "h-32": !a.isDrawer,
1466
- "h-40": a.isDrawer
1467
- }, k = () => {
1468
- var s;
1469
- (s = n.value) == null || s.show(), i.value = !0;
1470
- }, z = () => {
1471
- var s;
1472
- (s = n.value) == null || s.close(), i.value = !1;
1473
- }, x = () => {
1474
- var s;
1475
- a.doesCancelButtonCloseDialog && ((s = n.value) == null || s.close(), i.value = !1), l("fzmodal:cancel");
1476
- }, D = () => {
1477
- var s;
1478
- a.doesConfirmButtonCloseDialog && ((s = n.value) == null || s.close(), i.value = !1), l("fzmodal:confirm");
1479
- };
1480
- return t({
1481
- handleCancel: x,
1482
- handleConfirm: D,
1483
- visible: i,
1484
- show: k,
1485
- close: z
1486
- }), (s, C) => (E(), O(ze, ae(a, {
1487
- ref_key: "dialog",
1488
- ref: n,
1489
- "onFzmodal:cancel": C[0] || (C[0] = (R) => l("fzmodal:cancel"))
1490
- }), le({
1491
- header: w(() => [
1492
- m(s.$slots, "header", {}, () => [
1493
- f("div", {
1494
- class: _([c, d.value])
1495
- }, [
1496
- f("div", Ne, B(e.title), 1),
1497
- ne(A(re), {
1498
- onClick: x,
1499
- class: "ml-12",
1500
- iconName: "xmark-large",
1501
- size: "sm",
1502
- variant: "invisible"
1503
- })
1504
- ], 2)
1505
- ])
1506
- ]),
1507
- body: w(() => [
1508
- m(s.$slots, "body")
1509
- ]),
1510
- _: 2
1511
- }, [
1512
- e.footerEnabled ? {
1513
- name: "footer",
1514
- fn: w(() => [
1515
- m(s.$slots, "footer", {}, () => [
1516
- f("form", Oe, [
1517
- f("div", {
1518
- class: _([p, b, e.footerClasses])
1519
- }, [
1520
- e.cancelButtonEnabled ? (E(), O(A(V), {
1521
- key: 0,
1522
- variant: "invisible",
1523
- onClick: P(x, ["prevent"]),
1524
- value: "false"
1525
- }, {
1526
- default: w(() => [
1527
- K(B(e.cancelLabel), 1)
1528
- ]),
1529
- _: 1
1530
- })) : M("", !0),
1531
- e.confirmButtonEnabled ? (E(), O(A(V), {
1532
- key: 1,
1533
- class: "ml-12",
1534
- onClick: P(D, ["prevent"]),
1535
- disabled: e.disableConfirm,
1536
- value: "true",
1537
- variant: e.confirmButtonVariant
1538
- }, {
1539
- default: w(() => [
1540
- K(B(e.confirmLabel), 1)
1541
- ]),
1542
- _: 1
1543
- }, 8, ["disabled", "variant"])) : M("", !0)
1544
- ], 2)
1545
- ])
1546
- ])
1547
- ]),
1548
- key: "0"
1549
- } : void 0
1550
- ]), 1040));
1551
- }
1883
+ //#endregion
1884
+ //#region src/FzDialog.vue?vue&type=script&setup=true&lang.ts
1885
+ var te = { class: "flex items-center p-12 w-full border-b-1 border-grey-100 border-solid" }, ne = {
1886
+ key: 0,
1887
+ class: "flex flex-row p-12 border-t-1 border-grey-100 items-center border-solid"
1888
+ }, re = "flex flex-col bg-core-white", ie = "border-1 rounded border-grey-100 p-0 z-[42] top-0 bottom-0", $ = /* @__PURE__ */ ((e, t) => {
1889
+ let n = e.__vccOpts || e;
1890
+ for (let [e, r] of t) n[e] = r;
1891
+ return n;
1892
+ })(/* @__PURE__ */ c({
1893
+ __name: "FzDialog",
1894
+ props: {
1895
+ size: { default: "md" },
1896
+ title: {},
1897
+ confirmLabel: {},
1898
+ cancelLabel: {},
1899
+ text: {},
1900
+ isDrawer: { type: Boolean },
1901
+ closeOnBackdrop: {
1902
+ type: Boolean,
1903
+ default: !0
1904
+ },
1905
+ closeOnEscape: {
1906
+ type: Boolean,
1907
+ default: !0
1908
+ },
1909
+ bodyClasses: {},
1910
+ shouldAlwaysRender: { type: Boolean }
1911
+ },
1912
+ emits: ["fzmodal:cancel"],
1913
+ setup(t, { expose: a, emit: o }) {
1914
+ let s = t, c = o, l = h(), d = h(), _ = h(), v = h(!1), x = h(!1);
1915
+ function C() {
1916
+ l.value?.style.setProperty("--innerHeight", `${window.innerHeight}px`);
1917
+ }
1918
+ function w() {
1919
+ C(), q.registerDialog(l.value), l.value.show(), v.value = !0;
1920
+ }
1921
+ f(() => {
1922
+ window.addEventListener("resize", C);
1923
+ }), p(() => {
1924
+ window.removeEventListener("resize", C);
1925
+ });
1926
+ let T = () => {
1927
+ s.shouldAlwaysRender ? w() : x.value = !0;
1928
+ }, O = (e) => {
1929
+ l.value?.close(e);
1930
+ };
1931
+ function k() {
1932
+ v.value = !1, s.shouldAlwaysRender || (x.value = !1);
1933
+ }
1934
+ b(l, (e) => {
1935
+ e && x.value && w();
1936
+ }), a({
1937
+ show: T,
1938
+ close: O,
1939
+ visible: v
1940
+ }), E(_, () => {
1941
+ s.closeOnBackdrop && (l.value.close(), c("fzmodal:cancel"));
1942
+ }, d), D((e) => {
1943
+ !v.value || e.key !== "Escape" || !s.closeOnEscape || (l.value.close(), c("fzmodal:cancel"));
1944
+ });
1945
+ let A = e(() => {
1946
+ if (s.isDrawer) return "m-0 fixed top-0 ml-auto max-h-screen";
1947
+ switch (s.size) {
1948
+ case "md": return "xs:max-sm:m-0 xs:max-sm:max-h-screen xs:max-sm:h-dvh xs:max-sm:w-dvw xs:max-sm:max-w-screen-xl";
1949
+ case "lg": return "xs:max-md:m-0 xs:max-md:max-h-screen xs:max-md:h-dvh xs:max-md:w-dvw xs:max-md:max-w-screen-xl";
1950
+ case "xl": return "xs:max-xl:m-0 xs:max-xl:max-h-screen xs:max-xl:h-dvh xs:max-xl:w-dvw xs:max-xl:max-w-screen-xl";
1951
+ }
1952
+ }), j = e(() => {
1953
+ if (s.isDrawer) return "w-[480px] h-dvh";
1954
+ switch (s.size) {
1955
+ case "sm": return "w-[320px] min-h-[200px] max-h-[432px]";
1956
+ case "md": return "w-dvw sm:w-[480px] min-h-[300px] sm:max-h-[600px] h-dvh sm:h-auto";
1957
+ case "lg": return "w-dvw md:w-[640px] min-h-[300px] md:max-h-[600px] h-dvh md:h-auto";
1958
+ case "xl": return "w-dvw xl:w-[960px] min-h-[400px] xl:max-h-[600px] h-dvh xl:h-auto";
1959
+ }
1960
+ });
1961
+ return (e, a) => x.value || t.shouldAlwaysRender ? S((m(), r("div", {
1962
+ key: 0,
1963
+ ref_key: "backdrop",
1964
+ ref: d,
1965
+ class: "fz-dialog__backdrop w-screen h-screen fixed flex flex-col items-center justify-start sm:justify-center z-20"
1966
+ }, [i("dialog", {
1967
+ ref_key: "dialog",
1968
+ ref: l,
1969
+ onClose: k,
1970
+ class: u([ie, A.value])
1971
+ }, [i("div", {
1972
+ ref_key: "innerDialog",
1973
+ ref: _,
1974
+ class: u([re, j.value])
1975
+ }, [
1976
+ i("div", te, [g(e.$slots, "header", {}, void 0, !0)]),
1977
+ i("div", { class: u(["grow p-12 overflow-auto", t.bodyClasses]) }, [g(e.$slots, "body", {}, void 0, !0)], 2),
1978
+ e.$slots.footer ? (m(), r("div", ne, [g(e.$slots, "footer", {}, void 0, !0)])) : n("", !0)
1979
+ ], 2)], 34)], 512)), [[y, v.value]]) : n("", !0);
1980
+ }
1981
+ }), [["__scopeId", "data-v-ba12262d"]]), ae = { class: "grow h-28 font-medium" }, oe = {
1982
+ method: "dialog",
1983
+ class: "w-full h-full"
1984
+ }, se = /* @__PURE__ */ c({
1985
+ __name: "FzConfirmDialog",
1986
+ props: {
1987
+ size: { default: "md" },
1988
+ title: {},
1989
+ confirmLabel: {},
1990
+ cancelLabel: {},
1991
+ text: {},
1992
+ isDrawer: { type: Boolean },
1993
+ closeOnBackdrop: { type: Boolean },
1994
+ closeOnEscape: { type: Boolean },
1995
+ bodyClasses: {},
1996
+ shouldAlwaysRender: { type: Boolean },
1997
+ footerEnabled: {
1998
+ type: Boolean,
1999
+ default: !0
2000
+ },
2001
+ cancelButtonEnabled: {
2002
+ type: Boolean,
2003
+ default: !0
2004
+ },
2005
+ disableConfirm: {
2006
+ type: Boolean,
2007
+ default: !1
2008
+ },
2009
+ confirmButtonEnabled: {
2010
+ type: Boolean,
2011
+ default: !0
2012
+ },
2013
+ confirmButtonVariant: {},
2014
+ doesConfirmButtonCloseDialog: {
2015
+ type: Boolean,
2016
+ default: !0
2017
+ },
2018
+ doesCancelButtonCloseDialog: {
2019
+ type: Boolean,
2020
+ default: !0
2021
+ },
2022
+ footerClasses: {}
2023
+ },
2024
+ emits: ["fzmodal:confirm", "fzmodal:cancel"],
2025
+ setup(r, { expose: c, emit: d }) {
2026
+ let f = r, p = d, y = h(), b = h(!1), S = ["flex flex-row items-center text-xl grow"], E = e(() => ({
2027
+ "h-32": f.isDrawer,
2028
+ "h-28": !f.isDrawer
2029
+ })), D = ["flex flex-row items-center h-32 grow justify-end"], O = {
2030
+ "h-32": !f.isDrawer,
2031
+ "h-40": f.isDrawer
2032
+ }, k = () => {
2033
+ y.value?.show(), b.value = !0;
2034
+ }, A = () => {
2035
+ y.value?.close(), b.value = !1;
2036
+ }, j = () => {
2037
+ f.doesCancelButtonCloseDialog && (y.value?.close(), b.value = !1), p("fzmodal:cancel");
2038
+ }, M = () => {
2039
+ f.doesConfirmButtonCloseDialog && (y.value?.close(), b.value = !1), p("fzmodal:confirm");
2040
+ };
2041
+ return c({
2042
+ handleCancel: j,
2043
+ handleConfirm: M,
2044
+ visible: b,
2045
+ show: k,
2046
+ close: A
2047
+ }), (e, c) => (m(), t($, l(f, {
2048
+ ref_key: "dialog",
2049
+ ref: y,
2050
+ "onFzmodal:cancel": c[0] ||= (e) => p("fzmodal:cancel")
2051
+ }), a({
2052
+ header: x(() => [g(e.$slots, "header", {}, () => [i("div", { class: u([S, E.value]) }, [i("div", ae, _(r.title), 1), s(v(T), {
2053
+ onClick: j,
2054
+ class: "ml-12",
2055
+ iconName: "xmark-large",
2056
+ size: "sm",
2057
+ variant: "invisible"
2058
+ })], 2)])]),
2059
+ body: x(() => [g(e.$slots, "body")]),
2060
+ _: 2
2061
+ }, [r.footerEnabled ? {
2062
+ name: "footer",
2063
+ fn: x(() => [g(e.$slots, "footer", {}, () => [i("form", oe, [i("div", { class: u([
2064
+ D,
2065
+ O,
2066
+ r.footerClasses
2067
+ ]) }, [r.cancelButtonEnabled ? (m(), t(v(w), {
2068
+ key: 0,
2069
+ variant: "invisible",
2070
+ onClick: C(j, ["prevent"]),
2071
+ value: "false"
2072
+ }, {
2073
+ default: x(() => [o(_(r.cancelLabel), 1)]),
2074
+ _: 1
2075
+ })) : n("", !0), r.confirmButtonEnabled ? (m(), t(v(w), {
2076
+ key: 1,
2077
+ class: "ml-12",
2078
+ onClick: C(M, ["prevent"]),
2079
+ disabled: r.disableConfirm,
2080
+ value: "true",
2081
+ variant: r.confirmButtonVariant
2082
+ }, {
2083
+ default: x(() => [o(_(r.confirmLabel), 1)]),
2084
+ _: 1
2085
+ }, 8, ["disabled", "variant"])) : n("", !0)], 2)])])]),
2086
+ key: "0"
2087
+ } : void 0]), 1040));
2088
+ }
1552
2089
  });
1553
- export {
1554
- Le as FzConfirmDialog,
1555
- ze as FzDialog
1556
- };
2090
+ //#endregion
2091
+ export { se as FzConfirmDialog, $ as FzDialog };