@fiscozen/dialog 0.1.24 → 0.1.26
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/CHANGELOG.md +13 -0
- package/dist/dialog.js +1556 -0
- package/dist/dialog.umd.cjs +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/src/FzConfirmDialog.vue.d.ts +66 -0
- package/dist/src/FzDialog.vue.d.ts +50 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/types.d.ts +82 -0
- package/dist/style.css +1 -0
- package/package.json +7 -8
- package/src/FzDialog.vue +1 -0
- package/src/__tests__/FzDialog.spec.ts +1191 -0
- package/src/__tests__/__snapshots__/FzDialog.spec.ts.snap +13 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.ts +9 -1
- package/src/__test__/FzDialog.test.ts +0 -66
- package/src/__test__/__snapshots__/FzDialog.test.ts.snap +0 -211
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,1556 @@
|
|
|
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";
|
|
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
|
+
});
|
|
24
|
+
}
|
|
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
|
+
});
|
|
42
|
+
}
|
|
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
|
+
});
|
|
903
|
+
});
|
|
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);
|
|
929
|
+
}
|
|
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;
|
|
940
|
+
}
|
|
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;
|
|
951
|
+
}
|
|
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();
|
|
956
|
+
}
|
|
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;
|
|
962
|
+
}
|
|
963
|
+
function L(e) {
|
|
964
|
+
return !e || !e.hasAttribute("method") ? !1 : e.getAttribute("method").toLowerCase() === "dialog";
|
|
965
|
+
}
|
|
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;
|
|
976
|
+
}
|
|
977
|
+
function j(e) {
|
|
978
|
+
return e.isConnected || document.body.contains(e);
|
|
979
|
+
}
|
|
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;
|
|
992
|
+
}
|
|
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
|
+
}
|
|
1006
|
+
}
|
|
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));
|
|
1028
|
+
}
|
|
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 });
|
|
1202
|
+
};
|
|
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;
|
|
1311
|
+
}
|
|
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
|
+
}
|
|
1552
|
+
});
|
|
1553
|
+
export {
|
|
1554
|
+
Le as FzConfirmDialog,
|
|
1555
|
+
ze as FzDialog
|
|
1556
|
+
};
|