@speckle/ui-components 2.14.8-alpha7 → 2.14.8-alpha9
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/components/common/Alert.vue.d.ts +46 -0
- package/dist/components/form/Button.vue.d.ts +1 -1
- package/dist/components/form/select/Base.vue.d.ts +1 -1
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +1099 -932
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isObjectLike as
|
|
3
|
-
import { ArrowPathIcon as
|
|
4
|
-
import { CheckCircleIcon as
|
|
5
|
-
import { XMarkIcon as
|
|
6
|
-
import { useField as
|
|
7
|
-
import { nanoid as
|
|
8
|
-
import { isNullOrUndefined as it, SourceApps as ut, getClientOperatingSystem as ct, OperatingSystem as
|
|
9
|
-
import { useResizeObserver as dt, useMutationObserver as ft, onKeyDown as pt, isClient as
|
|
10
|
-
import { Listbox as ht, ListboxLabel as mt, ListboxButton as gt, ListboxOptions as yt, ListboxOption as
|
|
1
|
+
import { defineComponent as V, resolveDynamicComponent as q, computed as u, openBlock as l, createBlock as j, unref as t, normalizeClass as b, withCtx as B, createCommentVNode as _, renderSlot as R, createTextVNode as D, createElementBlock as m, createElementVNode as r, createVNode as I, Transition as fe, toDisplayString as S, toRefs as Z, Fragment as U, renderList as H, ref as A, mergeProps as ne, onMounted as ee, withDirectives as te, isRef as le, vModelText as _e, useSlots as Se, vModelDynamic as Fe, pushScopeId as Ee, popScopeId as We, watch as Y, withModifiers as Ie, normalizeStyle as ie, onBeforeUnmount as Be } from "vue";
|
|
2
|
+
import { isObjectLike as ke, clamp as Ce, isString as se, isUndefined as X, isArray as W, debounce as Le, throttle as Ue, noop as qe } from "lodash";
|
|
3
|
+
import { ArrowPathIcon as He, ChevronUpIcon as Pe, ChevronDownIcon as Ge, XMarkIcon as Ke, MagnifyingGlassIcon as Xe, CheckIcon as Ne, Bars3Icon as Je, Squares2X2Icon as Qe } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { CheckCircleIcon as Ye, XCircleIcon as Ze, ExclamationCircleIcon as et, InformationCircleIcon as tt, XMarkIcon as st, CheckIcon as nt, ExclamationTriangleIcon as lt } from "@heroicons/vue/24/outline";
|
|
5
|
+
import { XMarkIcon as ae, CheckIcon as at, CheckCircleIcon as je, ExclamationCircleIcon as Ve, EnvelopeIcon as ot, KeyIcon as rt } from "@heroicons/vue/20/solid";
|
|
6
|
+
import { useField as pe } from "vee-validate";
|
|
7
|
+
import { nanoid as he } from "nanoid";
|
|
8
|
+
import { isNullOrUndefined as it, SourceApps as ut, getClientOperatingSystem as ct, OperatingSystem as ue } from "@speckle/shared";
|
|
9
|
+
import { useResizeObserver as dt, useMutationObserver as ft, onKeyDown as pt, isClient as me } from "@vueuse/core";
|
|
10
|
+
import { Listbox as ht, ListboxLabel as mt, ListboxButton as gt, ListboxOptions as yt, ListboxOption as bt, TransitionRoot as vt, Dialog as xt, TransitionChild as we, DialogPanel as kt, Disclosure as Ct, DisclosureButton as wt, DisclosurePanel as $t, Menu as _t, MenuButton as St, MenuItems as It, MenuItem as Bt } from "@headlessui/vue";
|
|
11
11
|
import { directive as Lt } from "vue-tippy";
|
|
12
12
|
import Pt from "v3-infinite-loading";
|
|
13
|
-
const
|
|
13
|
+
const jt = {
|
|
14
14
|
key: 2,
|
|
15
15
|
style: { margin: "0 !important", width: "0.01px" }
|
|
16
|
-
},
|
|
16
|
+
}, Vt = /* @__PURE__ */ V({
|
|
17
17
|
__name: "Button",
|
|
18
18
|
props: {
|
|
19
19
|
/**
|
|
@@ -141,124 +141,135 @@ const Vt = {
|
|
|
141
141
|
},
|
|
142
142
|
emits: ["click"],
|
|
143
143
|
setup(e, { emit: s }) {
|
|
144
|
-
const n = e,
|
|
144
|
+
const n = e, a = q("NuxtLink"), o = q("RouterLink"), i = u(() => n.linkComponent ? n.linkComponent : n.external ? "a" : ke(a) ? a : ke(o) ? o : "a"), f = u(() => {
|
|
145
145
|
if (!n.to)
|
|
146
146
|
return n.submit ? "submit" : "button";
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
|
|
147
|
+
}), c = u(() => n.disabled || n.loading), d = u(() => n.loading ? He : n.iconLeft), p = u(() => {
|
|
148
|
+
const h = [];
|
|
149
|
+
if (h.push("border-2"), c.value)
|
|
150
|
+
h.push(
|
|
151
151
|
n.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
|
|
152
152
|
);
|
|
153
153
|
else
|
|
154
154
|
switch (n.color) {
|
|
155
155
|
case "invert":
|
|
156
|
-
|
|
156
|
+
h.push(
|
|
157
157
|
n.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
|
|
158
158
|
);
|
|
159
159
|
break;
|
|
160
160
|
case "card":
|
|
161
|
-
|
|
161
|
+
h.push(
|
|
162
162
|
n.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
|
|
163
163
|
);
|
|
164
164
|
break;
|
|
165
165
|
case "danger":
|
|
166
|
-
|
|
166
|
+
h.push(n.outlined ? "border-danger" : "bg-danger border-danger");
|
|
167
167
|
break;
|
|
168
168
|
case "secondary":
|
|
169
|
-
|
|
169
|
+
h.push(
|
|
170
170
|
n.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
|
|
171
171
|
);
|
|
172
172
|
break;
|
|
173
173
|
case "warning":
|
|
174
|
-
|
|
174
|
+
h.push(n.outlined ? "border-warning" : "bg-warning border-warning");
|
|
175
|
+
break;
|
|
176
|
+
case "info":
|
|
177
|
+
h.push(n.outlined ? "border-info" : "bg-info border-info");
|
|
175
178
|
break;
|
|
176
179
|
case "success":
|
|
177
|
-
|
|
180
|
+
h.push(n.outlined ? "border-success" : "bg-success border-success");
|
|
178
181
|
break;
|
|
179
182
|
case "default":
|
|
180
183
|
default:
|
|
181
|
-
|
|
184
|
+
h.push(
|
|
182
185
|
n.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
|
|
183
186
|
);
|
|
184
187
|
break;
|
|
185
188
|
}
|
|
186
|
-
return
|
|
187
|
-
}),
|
|
188
|
-
const
|
|
189
|
+
return h.join(" ");
|
|
190
|
+
}), k = u(() => {
|
|
191
|
+
const h = [];
|
|
189
192
|
if (!n.text && !n.link)
|
|
190
|
-
if (
|
|
191
|
-
|
|
193
|
+
if (c.value)
|
|
194
|
+
h.push(
|
|
192
195
|
(n.outlined, "text-foreground-disabled")
|
|
193
196
|
);
|
|
194
197
|
else
|
|
195
198
|
switch (n.color) {
|
|
196
199
|
case "invert":
|
|
197
|
-
|
|
200
|
+
h.push(
|
|
198
201
|
n.outlined ? "text-foundation dark:text-foreground" : "text-primary"
|
|
199
202
|
);
|
|
200
203
|
break;
|
|
201
204
|
case "card":
|
|
202
|
-
|
|
205
|
+
h.push((n.outlined, "text-foreground"));
|
|
203
206
|
break;
|
|
204
207
|
case "danger":
|
|
205
|
-
|
|
208
|
+
h.push(
|
|
206
209
|
n.outlined ? "text-danger" : "text-foundation dark:text-foreground"
|
|
207
210
|
);
|
|
208
211
|
break;
|
|
209
212
|
case "warning":
|
|
210
|
-
|
|
213
|
+
h.push(
|
|
211
214
|
n.outlined ? "text-warning" : "text-foundation dark:text-foreground"
|
|
212
215
|
);
|
|
213
216
|
break;
|
|
217
|
+
case "info":
|
|
218
|
+
h.push(
|
|
219
|
+
n.outlined ? "text-info" : "text-foundation dark:text-foreground"
|
|
220
|
+
);
|
|
221
|
+
break;
|
|
214
222
|
case "success":
|
|
215
|
-
|
|
223
|
+
h.push(
|
|
216
224
|
n.outlined ? "text-success" : "text-foundation dark:text-foreground"
|
|
217
225
|
);
|
|
218
226
|
break;
|
|
219
227
|
case "secondary":
|
|
220
|
-
|
|
228
|
+
h.push(
|
|
221
229
|
(n.outlined, "text-foreground hover:text-primary")
|
|
222
230
|
);
|
|
223
231
|
break;
|
|
224
232
|
case "default":
|
|
225
233
|
default:
|
|
226
|
-
|
|
234
|
+
h.push(
|
|
227
235
|
n.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
|
|
228
236
|
);
|
|
229
237
|
break;
|
|
230
238
|
}
|
|
231
239
|
else
|
|
232
|
-
|
|
240
|
+
c.value ? h.push("text-foreground-disabled") : n.color === "invert" ? h.push(
|
|
233
241
|
"text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"
|
|
234
|
-
) : n.color === "secondary" ?
|
|
235
|
-
return
|
|
236
|
-
}),
|
|
237
|
-
const
|
|
238
|
-
return
|
|
239
|
-
}),
|
|
240
|
-
const
|
|
241
|
-
if (!
|
|
242
|
+
) : n.color === "secondary" ? h.push("text-foreground-2 hover:text-primary-focus") : n.color === "success" ? h.push("text-success") : n.color === "warning" ? h.push("text-warning") : n.color === "info" ? h.push("text-info") : n.color === "danger" ? h.push("text-danger") : h.push("text-primary hover:text-primary-focus");
|
|
243
|
+
return h.join(" ");
|
|
244
|
+
}), y = u(() => {
|
|
245
|
+
const h = [];
|
|
246
|
+
return h.push(n.rounded ? "rounded-full" : "rounded-md"), h.join(" ");
|
|
247
|
+
}), g = u(() => {
|
|
248
|
+
const h = [];
|
|
249
|
+
if (!c.value)
|
|
242
250
|
switch (n.color) {
|
|
243
251
|
case "invert":
|
|
244
|
-
|
|
252
|
+
h.push("hover:ring-4 ring-white/50");
|
|
245
253
|
break;
|
|
246
254
|
case "danger":
|
|
247
|
-
|
|
255
|
+
h.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");
|
|
248
256
|
break;
|
|
249
257
|
case "warning":
|
|
250
|
-
|
|
258
|
+
h.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");
|
|
259
|
+
break;
|
|
260
|
+
case "info":
|
|
261
|
+
h.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");
|
|
251
262
|
break;
|
|
252
263
|
case "success":
|
|
253
|
-
|
|
264
|
+
h.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");
|
|
254
265
|
break;
|
|
255
266
|
case "default":
|
|
256
267
|
default:
|
|
257
|
-
|
|
268
|
+
h.push("hover:ring-2");
|
|
258
269
|
break;
|
|
259
270
|
}
|
|
260
|
-
return
|
|
261
|
-
}),
|
|
271
|
+
return h.join(" ");
|
|
272
|
+
}), v = u(() => {
|
|
262
273
|
switch (n.size) {
|
|
263
274
|
case "xs":
|
|
264
275
|
return "h-5 text-xs font-medium xxx-tracking-wide";
|
|
@@ -272,7 +283,7 @@ const Vt = {
|
|
|
272
283
|
case "base":
|
|
273
284
|
return "h-8 text-base font-medium xxx-tracking-wide";
|
|
274
285
|
}
|
|
275
|
-
}),
|
|
286
|
+
}), L = u(() => {
|
|
276
287
|
switch (n.size) {
|
|
277
288
|
case "xs":
|
|
278
289
|
return "px-1";
|
|
@@ -286,88 +297,88 @@ const Vt = {
|
|
|
286
297
|
case "base":
|
|
287
298
|
return "px-3";
|
|
288
299
|
}
|
|
289
|
-
}),
|
|
290
|
-
const
|
|
291
|
-
return n.fullWidth &&
|
|
292
|
-
}), $ =
|
|
293
|
-
const
|
|
294
|
-
return !
|
|
300
|
+
}), P = u(() => {
|
|
301
|
+
const h = [];
|
|
302
|
+
return n.fullWidth && h.push("w-full"), c.value && h.push("cursor-not-allowed"), h.join(" ");
|
|
303
|
+
}), $ = u(() => {
|
|
304
|
+
const h = [];
|
|
305
|
+
return !c.value && !n.link && !n.text && h.push("active:scale-[0.97]"), !c.value && n.link && h.push(
|
|
295
306
|
"underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"
|
|
296
|
-
),
|
|
297
|
-
}),
|
|
298
|
-
const
|
|
307
|
+
), h.join(" ");
|
|
308
|
+
}), w = u(() => {
|
|
309
|
+
const h = n.link || n.text;
|
|
299
310
|
return [
|
|
300
311
|
"transition inline-flex justify-center items-center space-x-2 outline-none select-none",
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
n.link ? "" :
|
|
312
|
+
P.value,
|
|
313
|
+
v.value,
|
|
314
|
+
k.value,
|
|
315
|
+
h ? "" : p.value,
|
|
316
|
+
h ? "" : y.value,
|
|
317
|
+
h ? "" : g.value,
|
|
318
|
+
n.link ? "" : L.value,
|
|
308
319
|
$.value
|
|
309
320
|
].join(" ");
|
|
310
|
-
}),
|
|
311
|
-
const
|
|
312
|
-
switch (n.loading &&
|
|
321
|
+
}), C = u(() => {
|
|
322
|
+
const h = [""];
|
|
323
|
+
switch (n.loading && h.push("animate-spin"), n.size) {
|
|
313
324
|
case "xs":
|
|
314
|
-
|
|
325
|
+
h.push("h-3 w-3");
|
|
315
326
|
break;
|
|
316
327
|
case "sm":
|
|
317
|
-
|
|
328
|
+
h.push("h-4 w-4");
|
|
318
329
|
break;
|
|
319
330
|
case "lg":
|
|
320
|
-
|
|
331
|
+
h.push("h-6 w-6");
|
|
321
332
|
break;
|
|
322
333
|
case "xl":
|
|
323
|
-
|
|
334
|
+
h.push("h-8 w-8");
|
|
324
335
|
break;
|
|
325
336
|
case "base":
|
|
326
337
|
default:
|
|
327
|
-
|
|
338
|
+
h.push("h-5 w-5");
|
|
328
339
|
break;
|
|
329
340
|
}
|
|
330
|
-
return
|
|
331
|
-
}), E = (
|
|
332
|
-
if (
|
|
333
|
-
|
|
341
|
+
return h.join(" ");
|
|
342
|
+
}), E = (h) => {
|
|
343
|
+
if (c.value) {
|
|
344
|
+
h.preventDefault(), h.stopPropagation(), h.stopImmediatePropagation();
|
|
334
345
|
return;
|
|
335
346
|
}
|
|
336
|
-
s("click",
|
|
347
|
+
s("click", h);
|
|
337
348
|
};
|
|
338
|
-
return (
|
|
349
|
+
return (h, O) => (l(), j(q(e.to ? t(i) : "button"), {
|
|
339
350
|
href: e.to,
|
|
340
351
|
to: e.to,
|
|
341
|
-
type: t(
|
|
352
|
+
type: t(f),
|
|
342
353
|
external: e.external,
|
|
343
|
-
class:
|
|
344
|
-
disabled: t(
|
|
354
|
+
class: b(t(w)),
|
|
355
|
+
disabled: t(c),
|
|
345
356
|
role: "button",
|
|
346
357
|
onClick: E
|
|
347
358
|
}, {
|
|
348
359
|
default: B(() => [
|
|
349
|
-
t(
|
|
360
|
+
t(d) ? (l(), j(q(t(d)), {
|
|
350
361
|
key: 0,
|
|
351
|
-
class:
|
|
362
|
+
class: b(`${t(C)} ${e.hideText ? "" : "mr-2"}`)
|
|
352
363
|
}, null, 8, ["class"])) : _("", !0),
|
|
353
|
-
e.hideText ? (l(),
|
|
354
|
-
|
|
364
|
+
e.hideText ? (l(), m("div", jt, " ")) : R(h.$slots, "default", { key: 1 }, () => [
|
|
365
|
+
D("Button")
|
|
355
366
|
], !0),
|
|
356
|
-
e.iconRight || !e.loading ? (l(),
|
|
367
|
+
e.iconRight || !e.loading ? (l(), j(q(e.iconRight), {
|
|
357
368
|
key: 3,
|
|
358
|
-
class:
|
|
369
|
+
class: b(`${t(C)} ${e.hideText ? "" : "ml-2"}`)
|
|
359
370
|
}, null, 8, ["class"])) : _("", !0)
|
|
360
371
|
]),
|
|
361
372
|
_: 3
|
|
362
373
|
}, 8, ["href", "to", "type", "external", "class", "disabled"]));
|
|
363
374
|
}
|
|
364
375
|
});
|
|
365
|
-
const
|
|
376
|
+
const Oe = (e, s) => {
|
|
366
377
|
const n = e.__vccOpts || e;
|
|
367
|
-
for (const [
|
|
368
|
-
n[
|
|
378
|
+
for (const [a, o] of s)
|
|
379
|
+
n[a] = o;
|
|
369
380
|
return n;
|
|
370
|
-
},
|
|
381
|
+
}, oe = /* @__PURE__ */ Oe(Vt, [["__scopeId", "data-v-38aa371e"]]), Ot = /* @__PURE__ */ V({
|
|
371
382
|
__name: "Link",
|
|
372
383
|
props: {
|
|
373
384
|
to: {
|
|
@@ -417,14 +428,14 @@ const me = (e, s) => {
|
|
|
417
428
|
},
|
|
418
429
|
emits: ["click"],
|
|
419
430
|
setup(e, { emit: s }) {
|
|
420
|
-
const n = e,
|
|
431
|
+
const n = e, a = (o) => {
|
|
421
432
|
if (n.disabled) {
|
|
422
|
-
|
|
433
|
+
o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation();
|
|
423
434
|
return;
|
|
424
435
|
}
|
|
425
|
-
s("click",
|
|
436
|
+
s("click", o);
|
|
426
437
|
};
|
|
427
|
-
return (
|
|
438
|
+
return (o, i) => (l(), j(oe, {
|
|
428
439
|
link: "",
|
|
429
440
|
to: e.to,
|
|
430
441
|
external: e.external,
|
|
@@ -435,11 +446,11 @@ const me = (e, s) => {
|
|
|
435
446
|
"icon-right": e.iconRight,
|
|
436
447
|
"hide-text": e.hideText,
|
|
437
448
|
role: "link",
|
|
438
|
-
onClickCapture:
|
|
449
|
+
onClickCapture: a
|
|
439
450
|
}, {
|
|
440
451
|
default: B(() => [
|
|
441
|
-
R(
|
|
442
|
-
|
|
452
|
+
R(o.$slots, "default", {}, () => [
|
|
453
|
+
D("Link")
|
|
443
454
|
])
|
|
444
455
|
]),
|
|
445
456
|
_: 3
|
|
@@ -462,27 +473,27 @@ const Mt = {
|
|
|
462
473
|
}, Ut = {
|
|
463
474
|
key: 2,
|
|
464
475
|
class: "flex justify-start mt-2"
|
|
465
|
-
}, qt = /* @__PURE__ */
|
|
476
|
+
}, qt = /* @__PURE__ */ r("span", { class: "sr-only" }, "Close", -1), cl = /* @__PURE__ */ V({
|
|
466
477
|
__name: "ToastRenderer",
|
|
467
478
|
props: {
|
|
468
479
|
notification: null
|
|
469
480
|
},
|
|
470
481
|
emits: ["update:notification"],
|
|
471
482
|
setup(e, { emit: s }) {
|
|
472
|
-
const n = e,
|
|
483
|
+
const n = e, a = u(
|
|
473
484
|
() => {
|
|
474
|
-
var
|
|
475
|
-
return !((
|
|
485
|
+
var f, c;
|
|
486
|
+
return !((f = n.notification) != null && f.description) && !((c = n.notification) != null && c.cta);
|
|
476
487
|
}
|
|
477
|
-
),
|
|
488
|
+
), o = () => {
|
|
478
489
|
s("update:notification", null);
|
|
479
|
-
},
|
|
480
|
-
var
|
|
481
|
-
(
|
|
490
|
+
}, i = (f) => {
|
|
491
|
+
var c, d, p;
|
|
492
|
+
(p = (d = (c = n.notification) == null ? void 0 : c.cta) == null ? void 0 : d.onClick) == null || p.call(d, f), o();
|
|
482
493
|
};
|
|
483
|
-
return (
|
|
484
|
-
|
|
485
|
-
I(
|
|
494
|
+
return (f, c) => (l(), m("div", Mt, [
|
|
495
|
+
r("div", At, [
|
|
496
|
+
I(fe, {
|
|
486
497
|
"enter-active-class": "transform ease-out duration-300 transition",
|
|
487
498
|
"enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
488
499
|
"enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0",
|
|
@@ -491,55 +502,55 @@ const Mt = {
|
|
|
491
502
|
"leave-to-class": "opacity-0"
|
|
492
503
|
}, {
|
|
493
504
|
default: B(() => [
|
|
494
|
-
e.notification ? (l(),
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
e.notification.type === t(N).Success ? (l(),
|
|
505
|
+
e.notification ? (l(), m("div", Dt, [
|
|
506
|
+
r("div", Rt, [
|
|
507
|
+
r("div", Tt, [
|
|
508
|
+
r("div", zt, [
|
|
509
|
+
e.notification.type === t(N).Success ? (l(), j(t(Ye), {
|
|
499
510
|
key: 0,
|
|
500
511
|
class: "h-6 w-6 text-success",
|
|
501
512
|
"aria-hidden": "true"
|
|
502
|
-
})) : e.notification.type === t(N).Danger ? (l(),
|
|
513
|
+
})) : e.notification.type === t(N).Danger ? (l(), j(t(Ze), {
|
|
503
514
|
key: 1,
|
|
504
515
|
class: "h-6 w-6 text-danger",
|
|
505
516
|
"aria-hidden": "true"
|
|
506
|
-
})) : e.notification.type === t(N).Warning ? (l(),
|
|
517
|
+
})) : e.notification.type === t(N).Warning ? (l(), j(t(et), {
|
|
507
518
|
key: 2,
|
|
508
519
|
class: "h-6 w-6 text-warning",
|
|
509
520
|
"aria-hidden": "true"
|
|
510
|
-
})) : e.notification.type === t(N).Info ? (l(),
|
|
521
|
+
})) : e.notification.type === t(N).Info ? (l(), j(t(tt), {
|
|
511
522
|
key: 3,
|
|
512
523
|
class: "h-6 w-6 text-info",
|
|
513
524
|
"aria-hidden": "true"
|
|
514
525
|
})) : _("", !0)
|
|
515
526
|
]),
|
|
516
|
-
|
|
517
|
-
e.notification.title ? (l(),
|
|
518
|
-
e.notification.description ? (l(),
|
|
519
|
-
e.notification.cta ? (l(),
|
|
527
|
+
r("div", Ft, [
|
|
528
|
+
e.notification.title ? (l(), m("p", Et, S(e.notification.title), 1)) : _("", !0),
|
|
529
|
+
e.notification.description ? (l(), m("p", Wt, S(e.notification.description), 1)) : _("", !0),
|
|
530
|
+
e.notification.cta ? (l(), m("div", Ut, [
|
|
520
531
|
I(Ot, {
|
|
521
532
|
to: e.notification.cta.url,
|
|
522
533
|
class: "label",
|
|
523
534
|
primary: "",
|
|
524
|
-
onClick:
|
|
535
|
+
onClick: i
|
|
525
536
|
}, {
|
|
526
537
|
default: B(() => [
|
|
527
|
-
|
|
538
|
+
D(S(e.notification.cta.title), 1)
|
|
528
539
|
]),
|
|
529
540
|
_: 1
|
|
530
541
|
}, 8, ["to"])
|
|
531
542
|
])) : _("", !0)
|
|
532
543
|
]),
|
|
533
|
-
|
|
534
|
-
class:
|
|
544
|
+
r("div", {
|
|
545
|
+
class: b(["ml-4 flex flex-shrink-0", { "self-center": t(a) }])
|
|
535
546
|
}, [
|
|
536
|
-
|
|
547
|
+
r("button", {
|
|
537
548
|
type: "button",
|
|
538
549
|
class: "inline-flex rounded-md bg-foundation text-foreground-2 hover:text-foreground focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2",
|
|
539
|
-
onClick:
|
|
550
|
+
onClick: o
|
|
540
551
|
}, [
|
|
541
552
|
qt,
|
|
542
|
-
I(t(
|
|
553
|
+
I(t(ae), {
|
|
543
554
|
class: "h-6 w-6",
|
|
544
555
|
"aria-hidden": "true"
|
|
545
556
|
})
|
|
@@ -554,13 +565,13 @@ const Mt = {
|
|
|
554
565
|
])
|
|
555
566
|
]));
|
|
556
567
|
}
|
|
557
|
-
}), Ht = /* @__PURE__ */
|
|
568
|
+
}), Ht = /* @__PURE__ */ r("circle", {
|
|
558
569
|
cx: "4",
|
|
559
570
|
cy: "4",
|
|
560
571
|
r: "3"
|
|
561
572
|
}, null, -1), Gt = [
|
|
562
573
|
Ht
|
|
563
|
-
], Kt = /* @__PURE__ */
|
|
574
|
+
], Kt = /* @__PURE__ */ V({
|
|
564
575
|
__name: "Badge",
|
|
565
576
|
props: {
|
|
566
577
|
size: null,
|
|
@@ -573,63 +584,63 @@ const Mt = {
|
|
|
573
584
|
},
|
|
574
585
|
emits: ["click-icon"],
|
|
575
586
|
setup(e, { emit: s }) {
|
|
576
|
-
const n = e,
|
|
587
|
+
const n = e, a = u(
|
|
577
588
|
() => n.colorClasses || "bg-blue-100 text-blue-800"
|
|
578
|
-
),
|
|
589
|
+
), o = u(
|
|
579
590
|
() => n.dotIconColorClasses || "text-blue-400"
|
|
580
|
-
),
|
|
581
|
-
const
|
|
591
|
+
), i = u(() => {
|
|
592
|
+
const p = [
|
|
582
593
|
"inline-flex items-center",
|
|
583
|
-
|
|
594
|
+
a.value,
|
|
584
595
|
n.size === "lg" ? "px-3 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
585
596
|
];
|
|
586
|
-
return n.rounded ? (
|
|
597
|
+
return n.rounded ? (p.push("rounded"), p.push(
|
|
587
598
|
n.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
588
|
-
)) : (
|
|
599
|
+
)) : (p.push("rounded-full"), p.push(
|
|
589
600
|
n.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
590
|
-
)),
|
|
591
|
-
}),
|
|
592
|
-
const
|
|
601
|
+
)), p.join(" ");
|
|
602
|
+
}), f = u(() => {
|
|
603
|
+
const p = [
|
|
593
604
|
"mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"
|
|
594
605
|
];
|
|
595
|
-
return n.clickableIcon ?
|
|
596
|
-
}),
|
|
606
|
+
return n.clickableIcon ? p.push("cursor-pointer") : p.push("cursor-default"), p.join(" ");
|
|
607
|
+
}), c = u(() => [
|
|
597
608
|
"-ml-0.5 mr-1.5 h-2 w-2",
|
|
598
|
-
|
|
599
|
-
].join(" ")),
|
|
609
|
+
o.value
|
|
610
|
+
].join(" ")), d = (p) => {
|
|
600
611
|
if (!n.clickableIcon) {
|
|
601
|
-
|
|
612
|
+
p.stopPropagation(), p.stopImmediatePropagation(), p.preventDefault();
|
|
602
613
|
return;
|
|
603
614
|
}
|
|
604
|
-
s("click-icon",
|
|
615
|
+
s("click-icon", p);
|
|
605
616
|
};
|
|
606
|
-
return (
|
|
607
|
-
class:
|
|
617
|
+
return (p, k) => (l(), m("span", {
|
|
618
|
+
class: b(t(i))
|
|
608
619
|
}, [
|
|
609
|
-
e.dot ? (l(),
|
|
620
|
+
e.dot ? (l(), m("svg", {
|
|
610
621
|
key: 0,
|
|
611
|
-
class:
|
|
622
|
+
class: b(t(c)),
|
|
612
623
|
fill: "currentColor",
|
|
613
624
|
viewBox: "0 0 8 8"
|
|
614
625
|
}, Gt, 2)) : _("", !0),
|
|
615
|
-
R(
|
|
616
|
-
|
|
626
|
+
R(p.$slots, "default", {}, () => [
|
|
627
|
+
D("Badge")
|
|
617
628
|
]),
|
|
618
|
-
e.iconLeft ? (l(),
|
|
629
|
+
e.iconLeft ? (l(), m("button", {
|
|
619
630
|
key: 1,
|
|
620
|
-
class:
|
|
621
|
-
onClick:
|
|
631
|
+
class: b(t(f)),
|
|
632
|
+
onClick: k[0] || (k[0] = (y) => d(y))
|
|
622
633
|
}, [
|
|
623
|
-
(l(),
|
|
624
|
-
class:
|
|
634
|
+
(l(), j(q(e.iconLeft), {
|
|
635
|
+
class: b(["h-4 w-4", t(o)])
|
|
625
636
|
}, null, 8, ["class"]))
|
|
626
637
|
], 2)) : _("", !0)
|
|
627
638
|
], 2));
|
|
628
639
|
}
|
|
629
640
|
});
|
|
630
|
-
let
|
|
641
|
+
let $e = [];
|
|
631
642
|
function Xt(e) {
|
|
632
|
-
|
|
643
|
+
$e = $e ? e : e.slice();
|
|
633
644
|
}
|
|
634
645
|
var J = /* @__PURE__ */ ((e) => (e[e.sm = 640] = "sm", e[e.md = 746] = "md", e[e.lg = 1024] = "lg", e[e.xl = 1280] = "xl", e[e["2xl"] = 1536] = "2xl", e))(J || {});
|
|
635
646
|
function Me(e) {
|
|
@@ -637,51 +648,51 @@ function Me(e) {
|
|
|
637
648
|
props: {
|
|
638
649
|
modelValue: s,
|
|
639
650
|
steps: n,
|
|
640
|
-
orientation:
|
|
641
|
-
goVerticalBelow:
|
|
642
|
-
nonInteractive:
|
|
643
|
-
stepsPadding:
|
|
644
|
-
},
|
|
645
|
-
emit:
|
|
646
|
-
} = e,
|
|
647
|
-
() => (
|
|
648
|
-
),
|
|
649
|
-
get: () =>
|
|
650
|
-
set: ($) =>
|
|
651
|
-
}),
|
|
651
|
+
orientation: a,
|
|
652
|
+
goVerticalBelow: o,
|
|
653
|
+
nonInteractive: i,
|
|
654
|
+
stepsPadding: f
|
|
655
|
+
},
|
|
656
|
+
emit: c
|
|
657
|
+
} = e, d = u(
|
|
658
|
+
() => (a == null ? void 0 : a.value) === "vertical" ? "vertical" : "horizontal"
|
|
659
|
+
), p = u({
|
|
660
|
+
get: () => Ce((s == null ? void 0 : s.value) || 0, -1, n.value.length),
|
|
661
|
+
set: ($) => c("update:modelValue", Ce($, 0, n.value.length))
|
|
662
|
+
}), k = ($) => `${$ + 1}`, y = ($) => $ === p.value, g = ($) => $ < p.value, v = ($, w) => {
|
|
652
663
|
var E;
|
|
653
|
-
if (
|
|
654
|
-
|
|
664
|
+
if (i != null && i.value) {
|
|
665
|
+
w == null || w.preventDefault(), w == null || w.stopPropagation(), w == null || w.stopImmediatePropagation();
|
|
655
666
|
return;
|
|
656
667
|
}
|
|
657
|
-
|
|
658
|
-
const
|
|
659
|
-
(E =
|
|
660
|
-
},
|
|
668
|
+
p.value = $;
|
|
669
|
+
const C = n.value[p.value];
|
|
670
|
+
(E = C == null ? void 0 : C.onClick) == null || E.call(C);
|
|
671
|
+
}, L = u(() => {
|
|
661
672
|
const $ = ["flex"];
|
|
662
|
-
let
|
|
663
|
-
return (
|
|
664
|
-
`sm:flex-row sm:space-y-0 sm:justify-start sm:${
|
|
665
|
-
) : (
|
|
666
|
-
`md:flex-row md:space-y-0 md:justify-start md:${
|
|
667
|
-
) : (
|
|
668
|
-
`lg:flex-row lg:space-y-0 lg:justify-start lg:${
|
|
669
|
-
) : (
|
|
670
|
-
`xl:flex-row xl:space-y-0 xl:justify-start xl:${
|
|
671
|
-
)) : $.push(`flex-row ${
|
|
672
|
-
}),
|
|
673
|
+
let w, C;
|
|
674
|
+
return (f == null ? void 0 : f.value) === "xs" ? (w = "space-x-2", C = "space-y-1") : (f == null ? void 0 : f.value) === "sm" ? (w = "space-x-4", C = "space-y-1") : (w = "space-x-8", C = "space-y-4"), $.push("flex"), d.value === "vertical" || o != null && o.value ? ($.push(`flex-col ${C} justify-center`), (o == null ? void 0 : o.value) === J.sm ? $.push(
|
|
675
|
+
`sm:flex-row sm:space-y-0 sm:justify-start sm:${w} sm:items-center`
|
|
676
|
+
) : (o == null ? void 0 : o.value) === J.md ? $.push(
|
|
677
|
+
`md:flex-row md:space-y-0 md:justify-start md:${w} md:items-center`
|
|
678
|
+
) : (o == null ? void 0 : o.value) === J.lg ? $.push(
|
|
679
|
+
`lg:flex-row lg:space-y-0 lg:justify-start lg:${w} lg:items-center`
|
|
680
|
+
) : (o == null ? void 0 : o.value) === J.xl && $.push(
|
|
681
|
+
`xl:flex-row xl:space-y-0 xl:justify-start xl:${w} xl:items-center`
|
|
682
|
+
)) : $.push(`flex-row ${w} items-center`), $.join(" ");
|
|
683
|
+
}), P = u(() => {
|
|
673
684
|
const $ = ["flex items-center"];
|
|
674
|
-
return
|
|
685
|
+
return i != null && i.value || $.push("cursor-pointer"), $.join(" ");
|
|
675
686
|
});
|
|
676
687
|
return {
|
|
677
|
-
value:
|
|
678
|
-
isCurrentStep:
|
|
679
|
-
isFinishedStep:
|
|
680
|
-
switchStep:
|
|
681
|
-
getStepDisplayValue:
|
|
682
|
-
listClasses:
|
|
683
|
-
linkClasses:
|
|
684
|
-
orientation:
|
|
688
|
+
value: p,
|
|
689
|
+
isCurrentStep: y,
|
|
690
|
+
isFinishedStep: g,
|
|
691
|
+
switchStep: v,
|
|
692
|
+
getStepDisplayValue: k,
|
|
693
|
+
listClasses: L,
|
|
694
|
+
linkClasses: P,
|
|
695
|
+
orientation: d
|
|
685
696
|
};
|
|
686
697
|
}
|
|
687
698
|
Xt([
|
|
@@ -707,7 +718,7 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
707
718
|
}, os = ["href", "onClick"], rs = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, is = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, us = { class: "flex flex-col" }, cs = {
|
|
708
719
|
key: 0,
|
|
709
720
|
class: "label label--light"
|
|
710
|
-
},
|
|
721
|
+
}, dl = /* @__PURE__ */ V({
|
|
711
722
|
__name: "Number",
|
|
712
723
|
props: {
|
|
713
724
|
ariaLabel: null,
|
|
@@ -721,66 +732,66 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
721
732
|
emits: ["update:modelValue"],
|
|
722
733
|
setup(e, { emit: s }) {
|
|
723
734
|
const n = e, {
|
|
724
|
-
isCurrentStep:
|
|
725
|
-
isFinishedStep:
|
|
726
|
-
switchStep:
|
|
727
|
-
getStepDisplayValue:
|
|
728
|
-
listClasses:
|
|
729
|
-
linkClasses:
|
|
735
|
+
isCurrentStep: a,
|
|
736
|
+
isFinishedStep: o,
|
|
737
|
+
switchStep: i,
|
|
738
|
+
getStepDisplayValue: f,
|
|
739
|
+
listClasses: c,
|
|
740
|
+
linkClasses: d
|
|
730
741
|
} = Me({
|
|
731
742
|
props: Z(n),
|
|
732
743
|
emit: s
|
|
733
744
|
});
|
|
734
|
-
return (
|
|
745
|
+
return (p, k) => (l(), m("nav", {
|
|
735
746
|
class: "flex justify-center",
|
|
736
747
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
737
748
|
}, [
|
|
738
|
-
|
|
739
|
-
class:
|
|
749
|
+
r("ol", {
|
|
750
|
+
class: b(t(c))
|
|
740
751
|
}, [
|
|
741
|
-
(l(!0),
|
|
742
|
-
key:
|
|
752
|
+
(l(!0), m(U, null, H(e.steps, (y, g) => (l(), m("li", {
|
|
753
|
+
key: y.name
|
|
743
754
|
}, [
|
|
744
|
-
t(
|
|
755
|
+
t(o)(g) ? (l(), m("a", {
|
|
745
756
|
key: 0,
|
|
746
|
-
href:
|
|
747
|
-
class:
|
|
748
|
-
onClick: (
|
|
757
|
+
href: y.href,
|
|
758
|
+
class: b(t(d)),
|
|
759
|
+
onClick: (v) => t(i)(g, v)
|
|
749
760
|
}, [
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
I(t(
|
|
761
|
+
r("div", Qt, [
|
|
762
|
+
r("div", Yt, [
|
|
763
|
+
I(t(at), { class: "w-5 h-5" })
|
|
753
764
|
]),
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
765
|
+
r("div", Zt, [
|
|
766
|
+
r("div", null, S(y.name), 1),
|
|
767
|
+
y.description ? (l(), m("div", es, S(y.description), 1)) : _("", !0)
|
|
757
768
|
])
|
|
758
769
|
])
|
|
759
|
-
], 10, Jt)) : t(
|
|
770
|
+
], 10, Jt)) : t(a)(g) ? (l(), m("a", {
|
|
760
771
|
key: 1,
|
|
761
|
-
href:
|
|
762
|
-
class:
|
|
772
|
+
href: y.href,
|
|
773
|
+
class: b(t(d)),
|
|
763
774
|
"aria-current": "step",
|
|
764
|
-
onClick: (
|
|
775
|
+
onClick: (v) => t(i)(g, v)
|
|
765
776
|
}, [
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
777
|
+
r("div", ss, [
|
|
778
|
+
r("div", ns, S(t(f)(g)), 1),
|
|
779
|
+
r("div", ls, [
|
|
780
|
+
r("div", null, S(y.name), 1),
|
|
781
|
+
y.description ? (l(), m("div", as, S(y.description), 1)) : _("", !0)
|
|
771
782
|
])
|
|
772
783
|
])
|
|
773
|
-
], 10, ts)) : (l(),
|
|
784
|
+
], 10, ts)) : (l(), m("a", {
|
|
774
785
|
key: 2,
|
|
775
|
-
href:
|
|
776
|
-
class:
|
|
777
|
-
onClick: (
|
|
786
|
+
href: y.href,
|
|
787
|
+
class: b(t(d)),
|
|
788
|
+
onClick: (v) => t(i)(g, v)
|
|
778
789
|
}, [
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
790
|
+
r("div", rs, [
|
|
791
|
+
r("div", is, S(t(f)(g)), 1),
|
|
792
|
+
r("div", us, [
|
|
793
|
+
r("div", null, S(y.name), 1),
|
|
794
|
+
y.description ? (l(), m("div", cs, S(y.description), 1)) : _("", !0)
|
|
784
795
|
])
|
|
785
796
|
])
|
|
786
797
|
], 10, os))
|
|
@@ -788,7 +799,7 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
788
799
|
], 2)
|
|
789
800
|
], 8, Nt));
|
|
790
801
|
}
|
|
791
|
-
}),
|
|
802
|
+
}), ds = ["aria-label"], fs = ["href", "onClick"], ps = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, hs = {
|
|
792
803
|
key: 0,
|
|
793
804
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
794
805
|
}, ms = ["href", "onClick"], gs = {
|
|
@@ -797,7 +808,7 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
797
808
|
}, ys = {
|
|
798
809
|
key: 0,
|
|
799
810
|
class: "h-3 w-3 rounded-full bg-foreground"
|
|
800
|
-
},
|
|
811
|
+
}, bs = /* @__PURE__ */ r("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), vs = /* @__PURE__ */ r("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), xs = ["href", "onClick"], ks = {
|
|
801
812
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
802
813
|
"aria-hidden": "true"
|
|
803
814
|
}, Cs = {
|
|
@@ -806,7 +817,7 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
806
817
|
}, ws = {
|
|
807
818
|
key: 1,
|
|
808
819
|
class: "h-4 w-4 rounded-full bg-foreground-disabled"
|
|
809
|
-
},
|
|
820
|
+
}, fl = /* @__PURE__ */ V({
|
|
810
821
|
__name: "Bullet",
|
|
811
822
|
props: {
|
|
812
823
|
ariaLabel: null,
|
|
@@ -820,75 +831,77 @@ const Nt = ["aria-label"], Jt = ["href", "onClick"], Qt = { class: "flex space-x
|
|
|
820
831
|
},
|
|
821
832
|
emits: ["update:modelValue"],
|
|
822
833
|
setup(e, { emit: s }) {
|
|
823
|
-
const n = e, { isCurrentStep:
|
|
834
|
+
const n = e, { isCurrentStep: a, isFinishedStep: o, switchStep: i, listClasses: f, linkClasses: c } = Me({
|
|
824
835
|
props: Z(n),
|
|
825
836
|
emit: s
|
|
826
|
-
}),
|
|
827
|
-
const
|
|
828
|
-
let
|
|
829
|
-
return n.stepsPadding === "xs" ?
|
|
837
|
+
}), d = u(() => {
|
|
838
|
+
const k = ["h6 font-medium leading-7"];
|
|
839
|
+
let y;
|
|
840
|
+
return n.stepsPadding === "xs" ? y = "ml-1" : n.stepsPadding === "sm" ? y = "ml-2" : y = "ml-3", k.push(y), n.basic && k.push("sr-only"), k.join(" ");
|
|
841
|
+
}), p = u(() => {
|
|
842
|
+
const k = [];
|
|
843
|
+
return n.basic && k.push("basic"), k.join(" ");
|
|
830
844
|
});
|
|
831
|
-
return (
|
|
845
|
+
return (k, y) => (l(), m("nav", {
|
|
832
846
|
class: "flex justify-center",
|
|
833
847
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
834
848
|
}, [
|
|
835
|
-
|
|
836
|
-
class:
|
|
849
|
+
r("ol", {
|
|
850
|
+
class: b([t(f), t(p)])
|
|
837
851
|
}, [
|
|
838
|
-
(l(!0),
|
|
852
|
+
(l(!0), m(U, null, H(e.steps, (g, v) => (l(), m("li", {
|
|
839
853
|
key: g.name
|
|
840
854
|
}, [
|
|
841
|
-
t(
|
|
855
|
+
t(o)(v) ? (l(), m("a", {
|
|
842
856
|
key: 0,
|
|
843
857
|
href: g.href,
|
|
844
|
-
class:
|
|
845
|
-
onClick: (
|
|
858
|
+
class: b(t(c)),
|
|
859
|
+
onClick: (L) => t(i)(v, L)
|
|
846
860
|
}, [
|
|
847
|
-
|
|
848
|
-
e.basic ? (l(),
|
|
861
|
+
r("span", ps, [
|
|
862
|
+
e.basic ? (l(), m("span", hs)) : (l(), j(t(je), {
|
|
849
863
|
key: 1,
|
|
850
864
|
class: "h-full w-full text-primary",
|
|
851
865
|
"aria-hidden": "true"
|
|
852
866
|
}))
|
|
853
867
|
]),
|
|
854
|
-
|
|
855
|
-
class:
|
|
868
|
+
r("span", {
|
|
869
|
+
class: b(["text-foreground", t(d)])
|
|
856
870
|
}, S(g.name), 3)
|
|
857
|
-
], 10, fs)) : t(
|
|
871
|
+
], 10, fs)) : t(a)(v) ? (l(), m("a", {
|
|
858
872
|
key: 1,
|
|
859
873
|
href: g.href,
|
|
860
|
-
class:
|
|
874
|
+
class: b(t(c)),
|
|
861
875
|
"aria-current": "step",
|
|
862
|
-
onClick: (
|
|
876
|
+
onClick: (L) => t(i)(v, L)
|
|
863
877
|
}, [
|
|
864
|
-
|
|
865
|
-
e.basic ? (l(),
|
|
866
|
-
|
|
867
|
-
|
|
878
|
+
r("span", gs, [
|
|
879
|
+
e.basic ? (l(), m("span", ys)) : (l(), m(U, { key: 1 }, [
|
|
880
|
+
bs,
|
|
881
|
+
vs
|
|
868
882
|
], 64))
|
|
869
883
|
]),
|
|
870
|
-
|
|
871
|
-
class:
|
|
884
|
+
r("span", {
|
|
885
|
+
class: b(["text-primary-focus", t(d)])
|
|
872
886
|
}, S(g.name), 3)
|
|
873
|
-
], 10, ms)) : (l(),
|
|
887
|
+
], 10, ms)) : (l(), m("a", {
|
|
874
888
|
key: 2,
|
|
875
889
|
href: g.href,
|
|
876
|
-
class:
|
|
877
|
-
onClick: (
|
|
890
|
+
class: b(t(c)),
|
|
891
|
+
onClick: (L) => t(i)(v, L)
|
|
878
892
|
}, [
|
|
879
|
-
|
|
880
|
-
e.basic ? (l(),
|
|
893
|
+
r("div", ks, [
|
|
894
|
+
e.basic ? (l(), m("span", Cs)) : (l(), m("div", ws))
|
|
881
895
|
]),
|
|
882
|
-
|
|
883
|
-
class:
|
|
896
|
+
r("p", {
|
|
897
|
+
class: b(["text-foreground-disabled", t(d)])
|
|
884
898
|
}, S(g.name), 3)
|
|
885
899
|
], 10, xs))
|
|
886
900
|
]))), 128))
|
|
887
901
|
], 2)
|
|
888
902
|
], 8, ds));
|
|
889
903
|
}
|
|
890
|
-
})
|
|
891
|
-
const cl = /* @__PURE__ */ me($s, [["__scopeId", "data-v-9dd7b659"]]), _s = ["disabled"], dl = /* @__PURE__ */ O({
|
|
904
|
+
}), $s = ["disabled"], pl = /* @__PURE__ */ V({
|
|
892
905
|
__name: "CardButton",
|
|
893
906
|
props: {
|
|
894
907
|
disabled: { type: Boolean },
|
|
@@ -896,41 +909,41 @@ const cl = /* @__PURE__ */ me($s, [["__scopeId", "data-v-9dd7b659"]]), _s = ["di
|
|
|
896
909
|
},
|
|
897
910
|
emits: ["update:modelValue", "click"],
|
|
898
911
|
setup(e, { emit: s }) {
|
|
899
|
-
const n = e,
|
|
900
|
-
const
|
|
912
|
+
const n = e, a = u(() => {
|
|
913
|
+
const i = [
|
|
901
914
|
"h-20 bg-foundation-2 inline-flex justify-center items-center outline-none",
|
|
902
915
|
"normal px-16 py-5 shadow rounded transition active:scale-95"
|
|
903
916
|
];
|
|
904
|
-
return n.disabled ?
|
|
917
|
+
return n.disabled ? i.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (i.push(
|
|
905
918
|
n.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
|
|
906
|
-
),
|
|
907
|
-
}),
|
|
919
|
+
), i.push("ring-outline-2 hover:ring-4")), i.join(" ");
|
|
920
|
+
}), o = (i) => {
|
|
908
921
|
if (n.disabled) {
|
|
909
|
-
|
|
922
|
+
i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation();
|
|
910
923
|
return;
|
|
911
924
|
}
|
|
912
|
-
s("update:modelValue", !n.modelValue), s("click",
|
|
925
|
+
s("update:modelValue", !n.modelValue), s("click", i);
|
|
913
926
|
};
|
|
914
|
-
return (
|
|
915
|
-
class:
|
|
927
|
+
return (i, f) => (l(), m("button", {
|
|
928
|
+
class: b(t(a)),
|
|
916
929
|
disabled: e.disabled,
|
|
917
|
-
onClick:
|
|
930
|
+
onClick: o
|
|
918
931
|
}, [
|
|
919
|
-
R(
|
|
920
|
-
|
|
932
|
+
R(i.$slots, "default", {}, () => [
|
|
933
|
+
D("Text")
|
|
921
934
|
])
|
|
922
|
-
], 10,
|
|
935
|
+
], 10, $s));
|
|
923
936
|
}
|
|
924
|
-
}),
|
|
937
|
+
}), _s = { class: "relative flex items-start" }, Ss = { class: "flex h-6 items-center" }, Is = ["id", "checked", "aria-describedby", "name", "value", "disabled"], Bs = {
|
|
925
938
|
class: "ml-2 text-sm",
|
|
926
939
|
style: { "padding-top": "2px" }
|
|
927
|
-
},
|
|
940
|
+
}, Ls = ["for"], Ps = {
|
|
928
941
|
key: 0,
|
|
929
942
|
class: "text-danger ml-1"
|
|
930
|
-
}, js = ["id"],
|
|
943
|
+
}, js = ["id"], Vs = V({
|
|
931
944
|
inheritAttrs: !1
|
|
932
|
-
}),
|
|
933
|
-
...
|
|
945
|
+
}), hl = /* @__PURE__ */ V({
|
|
946
|
+
...Vs,
|
|
934
947
|
__name: "Checkbox",
|
|
935
948
|
props: {
|
|
936
949
|
/**
|
|
@@ -1018,104 +1031,104 @@ const cl = /* @__PURE__ */ me($s, [["__scopeId", "data-v-9dd7b659"]]), _s = ["di
|
|
|
1018
1031
|
},
|
|
1019
1032
|
emits: ["update:modelValue"],
|
|
1020
1033
|
setup(e) {
|
|
1021
|
-
const s = e, n = (
|
|
1022
|
-
checked:
|
|
1023
|
-
errorMessage:
|
|
1024
|
-
handleChange:
|
|
1025
|
-
} =
|
|
1034
|
+
const s = e, n = (P) => `${P}-${he()}`, a = u(() => s.value || s.name), {
|
|
1035
|
+
checked: o,
|
|
1036
|
+
errorMessage: i,
|
|
1037
|
+
handleChange: f
|
|
1038
|
+
} = pe(s.name, s.rules, {
|
|
1026
1039
|
validateOnMount: s.validateOnMount,
|
|
1027
1040
|
type: "checkbox",
|
|
1028
|
-
checkedValue:
|
|
1041
|
+
checkedValue: a,
|
|
1029
1042
|
initialValue: s.modelValue || void 0
|
|
1030
|
-
}),
|
|
1031
|
-
s.disabled ||
|
|
1032
|
-
},
|
|
1033
|
-
const
|
|
1034
|
-
return s.inlineDescription ?
|
|
1035
|
-
}),
|
|
1036
|
-
return (
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
id: t(
|
|
1040
|
-
checked: t(
|
|
1041
|
-
"aria-describedby": t(
|
|
1043
|
+
}), c = (P) => {
|
|
1044
|
+
s.disabled || f(P);
|
|
1045
|
+
}, d = u(() => s.label || s.name), p = u(() => i.value ? "border-danger-lighter" : "border-foreground-4 "), k = u(() => s.description || i.value), y = u(() => `${s.name}-description`), g = u(() => {
|
|
1046
|
+
const P = [];
|
|
1047
|
+
return s.inlineDescription ? P.push("inline ml-2") : P.push("block"), i.value ? P.push("text-danger") : P.push("text-foreground-2"), P.join(" ");
|
|
1048
|
+
}), v = A(n("checkbox")), L = u(() => s.id || v.value);
|
|
1049
|
+
return (P, $) => (l(), m("div", _s, [
|
|
1050
|
+
r("div", Ss, [
|
|
1051
|
+
r("input", ne({
|
|
1052
|
+
id: t(L),
|
|
1053
|
+
checked: t(o),
|
|
1054
|
+
"aria-describedby": t(y),
|
|
1042
1055
|
name: e.name,
|
|
1043
|
-
value: t(
|
|
1056
|
+
value: t(a),
|
|
1044
1057
|
disabled: e.disabled,
|
|
1045
1058
|
type: "checkbox",
|
|
1046
|
-
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", t(
|
|
1047
|
-
},
|
|
1059
|
+
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", t(p)]
|
|
1060
|
+
}, P.$attrs, { onChange: c }), null, 16, Is)
|
|
1048
1061
|
]),
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
for: t(
|
|
1052
|
-
class:
|
|
1062
|
+
r("div", Bs, [
|
|
1063
|
+
r("label", {
|
|
1064
|
+
for: t(L),
|
|
1065
|
+
class: b(["font-medium text-foreground", { "sr-only": e.hideLabel }])
|
|
1053
1066
|
}, [
|
|
1054
|
-
|
|
1055
|
-
e.showRequired ? (l(),
|
|
1056
|
-
], 10,
|
|
1057
|
-
t(
|
|
1067
|
+
r("span", null, S(t(d)), 1),
|
|
1068
|
+
e.showRequired ? (l(), m("span", Ps, "*")) : _("", !0)
|
|
1069
|
+
], 10, Ls),
|
|
1070
|
+
t(k) ? (l(), m("p", {
|
|
1058
1071
|
key: 0,
|
|
1059
|
-
id: t(
|
|
1060
|
-
class:
|
|
1061
|
-
}, S(t(
|
|
1072
|
+
id: t(y),
|
|
1073
|
+
class: b(t(g))
|
|
1074
|
+
}, S(t(k)), 11, js)) : _("", !0)
|
|
1062
1075
|
])
|
|
1063
1076
|
]));
|
|
1064
1077
|
}
|
|
1065
1078
|
});
|
|
1066
|
-
function
|
|
1067
|
-
const { props: s, inputEl: n, emit:
|
|
1079
|
+
function Ae(e) {
|
|
1080
|
+
const { props: s, inputEl: n, emit: a } = e, { value: o, errorMessage: i } = pe(s.name, s.rules, {
|
|
1068
1081
|
validateOnMount: t(s.validateOnMount),
|
|
1069
1082
|
validateOnValueUpdate: t(s.validateOnValueUpdate),
|
|
1070
1083
|
initialValue: t(s.modelValue) || void 0
|
|
1071
|
-
}),
|
|
1072
|
-
const
|
|
1073
|
-
return t(s.showLabel) ||
|
|
1074
|
-
}),
|
|
1075
|
-
const
|
|
1084
|
+
}), f = u(() => {
|
|
1085
|
+
const C = ["block label text-foreground-2 mb-2"];
|
|
1086
|
+
return t(s.showLabel) || C.push("sr-only"), C.join(" ");
|
|
1087
|
+
}), c = u(() => {
|
|
1088
|
+
const C = [
|
|
1076
1089
|
"block w-full rounded focus:outline-none text-foreground transition-all",
|
|
1077
1090
|
"disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted",
|
|
1078
1091
|
"placeholder:text-foreground-2"
|
|
1079
1092
|
];
|
|
1080
|
-
return
|
|
1093
|
+
return i.value ? C.push(
|
|
1081
1094
|
"border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"
|
|
1082
|
-
) :
|
|
1083
|
-
}),
|
|
1084
|
-
const
|
|
1085
|
-
return !
|
|
1086
|
-
}),
|
|
1087
|
-
() =>
|
|
1088
|
-
),
|
|
1089
|
-
() =>
|
|
1090
|
-
),
|
|
1091
|
-
const
|
|
1092
|
-
return
|
|
1095
|
+
) : C.push("border-0 focus:ring-2 focus:ring-outline-2"), t(s.color) === "foundation" ? C.push("bg-foundation shadow-sm hover:shadow") : C.push("bg-foundation-page"), C.join(" ");
|
|
1096
|
+
}), d = A(he()), p = u(() => t(s.label) || t(s.name)), k = u(() => {
|
|
1097
|
+
const C = i.value;
|
|
1098
|
+
return !C || !t(s.useLabelInErrors) ? C : C.replace("Value", p.value);
|
|
1099
|
+
}), y = u(
|
|
1100
|
+
() => k.value && t(s.hideErrorMessage)
|
|
1101
|
+
), g = u(() => k.value || t(s.help)), v = u(() => !!g.value), L = u(
|
|
1102
|
+
() => v.value ? `${t(s.name)}-${d.value}` : void 0
|
|
1103
|
+
), P = u(() => {
|
|
1104
|
+
const C = ["mt-2 text-sm"];
|
|
1105
|
+
return C.push(i.value ? "text-danger" : "text-foreground-2"), C.join(" ");
|
|
1093
1106
|
}), $ = () => {
|
|
1094
|
-
var
|
|
1095
|
-
(
|
|
1096
|
-
},
|
|
1097
|
-
|
|
1107
|
+
var C;
|
|
1108
|
+
(C = n.value) == null || C.focus();
|
|
1109
|
+
}, w = () => {
|
|
1110
|
+
o.value = "", a("change", { value: "" }), a("clear");
|
|
1098
1111
|
};
|
|
1099
1112
|
return ee(() => {
|
|
1100
1113
|
t(s.autoFocus) && $();
|
|
1101
1114
|
}), {
|
|
1102
|
-
coreClasses:
|
|
1103
|
-
title:
|
|
1104
|
-
value:
|
|
1105
|
-
helpTipId:
|
|
1106
|
-
helpTipClasses:
|
|
1107
|
-
helpTip:
|
|
1108
|
-
hideHelpTip:
|
|
1109
|
-
errorMessage:
|
|
1110
|
-
clear:
|
|
1115
|
+
coreClasses: c,
|
|
1116
|
+
title: p,
|
|
1117
|
+
value: o,
|
|
1118
|
+
helpTipId: L,
|
|
1119
|
+
helpTipClasses: P,
|
|
1120
|
+
helpTip: g,
|
|
1121
|
+
hideHelpTip: y,
|
|
1122
|
+
errorMessage: k,
|
|
1123
|
+
clear: w,
|
|
1111
1124
|
focus: $,
|
|
1112
|
-
labelClasses:
|
|
1125
|
+
labelClasses: f
|
|
1113
1126
|
};
|
|
1114
1127
|
}
|
|
1115
|
-
const
|
|
1128
|
+
const Os = ["for"], Ms = { class: "relative" }, As = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Ds = /* @__PURE__ */ r("span", { class: "text-xs sr-only" }, "Clear input", -1), Rs = {
|
|
1116
1129
|
key: 2,
|
|
1117
1130
|
class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
|
|
1118
|
-
},
|
|
1131
|
+
}, Ts = ["id"], ml = /* @__PURE__ */ V({
|
|
1119
1132
|
__name: "TextArea",
|
|
1120
1133
|
props: {
|
|
1121
1134
|
name: null,
|
|
@@ -1137,98 +1150,98 @@ const Ms = ["for"], As = { class: "relative" }, Ds = ["id", "name", "placeholder
|
|
|
1137
1150
|
},
|
|
1138
1151
|
emits: ["update:modelValue", "change", "input", "clear"],
|
|
1139
1152
|
setup(e, { expose: s, emit: n }) {
|
|
1140
|
-
const
|
|
1141
|
-
coreClasses:
|
|
1142
|
-
title:
|
|
1143
|
-
value:
|
|
1144
|
-
helpTipId:
|
|
1145
|
-
helpTipClasses:
|
|
1146
|
-
helpTip:
|
|
1147
|
-
errorMessage:
|
|
1148
|
-
labelClasses:
|
|
1149
|
-
clear:
|
|
1150
|
-
focus:
|
|
1151
|
-
} =
|
|
1152
|
-
props: Z(
|
|
1153
|
+
const a = e, o = A(null), {
|
|
1154
|
+
coreClasses: i,
|
|
1155
|
+
title: f,
|
|
1156
|
+
value: c,
|
|
1157
|
+
helpTipId: d,
|
|
1158
|
+
helpTipClasses: p,
|
|
1159
|
+
helpTip: k,
|
|
1160
|
+
errorMessage: y,
|
|
1161
|
+
labelClasses: g,
|
|
1162
|
+
clear: v,
|
|
1163
|
+
focus: L
|
|
1164
|
+
} = Ae({
|
|
1165
|
+
props: Z(a),
|
|
1153
1166
|
emit: n,
|
|
1154
|
-
inputEl:
|
|
1155
|
-
}),
|
|
1167
|
+
inputEl: o
|
|
1168
|
+
}), P = u(() => {
|
|
1156
1169
|
const $ = ["pl-2"];
|
|
1157
|
-
return
|
|
1170
|
+
return a.showClear && y.value ? $.push("pr-12") : (a.showClear || y.value) && $.push("pr-8"), $.join(" ");
|
|
1158
1171
|
});
|
|
1159
|
-
return s({ focus:
|
|
1160
|
-
class:
|
|
1172
|
+
return s({ focus: L }), ($, w) => (l(), m("div", {
|
|
1173
|
+
class: b([e.fullWidth ? "w-full" : ""])
|
|
1161
1174
|
}, [
|
|
1162
|
-
|
|
1175
|
+
r("label", {
|
|
1163
1176
|
for: e.name,
|
|
1164
|
-
class:
|
|
1177
|
+
class: b(t(g))
|
|
1165
1178
|
}, [
|
|
1166
|
-
|
|
1167
|
-
], 10,
|
|
1168
|
-
|
|
1169
|
-
te(
|
|
1179
|
+
r("span", null, S(t(f)), 1)
|
|
1180
|
+
], 10, Os),
|
|
1181
|
+
r("div", Ms, [
|
|
1182
|
+
te(r("textarea", ne({
|
|
1170
1183
|
id: e.name,
|
|
1171
1184
|
ref_key: "inputElement",
|
|
1172
|
-
ref:
|
|
1173
|
-
"onUpdate:modelValue":
|
|
1185
|
+
ref: o,
|
|
1186
|
+
"onUpdate:modelValue": w[0] || (w[0] = (C) => le(c) ? c.value = C : null),
|
|
1174
1187
|
name: e.name,
|
|
1175
|
-
class: [t(
|
|
1188
|
+
class: [t(i), t(P), "min-h-[4rem]"],
|
|
1176
1189
|
placeholder: e.placeholder,
|
|
1177
1190
|
disabled: e.disabled,
|
|
1178
|
-
"aria-invalid": t(
|
|
1179
|
-
"aria-describedby": t(
|
|
1191
|
+
"aria-invalid": t(y) ? "true" : "false",
|
|
1192
|
+
"aria-describedby": t(d)
|
|
1180
1193
|
}, $.$attrs, {
|
|
1181
|
-
onChange:
|
|
1182
|
-
onInput:
|
|
1183
|
-
}), null, 16,
|
|
1184
|
-
[
|
|
1194
|
+
onChange: w[1] || (w[1] = (C) => $.$emit("change", { event: C, value: t(c) })),
|
|
1195
|
+
onInput: w[2] || (w[2] = (C) => $.$emit("input", { event: C, value: t(c) }))
|
|
1196
|
+
}), null, 16, As), [
|
|
1197
|
+
[_e, t(c)]
|
|
1185
1198
|
]),
|
|
1186
|
-
e.showClear ? (l(),
|
|
1199
|
+
e.showClear ? (l(), m("a", {
|
|
1187
1200
|
key: 0,
|
|
1188
1201
|
title: "Clear input",
|
|
1189
1202
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
1190
|
-
onClick:
|
|
1191
|
-
(...
|
|
1192
|
-
onKeydown:
|
|
1193
|
-
(...
|
|
1203
|
+
onClick: w[3] || (w[3] = //@ts-ignore
|
|
1204
|
+
(...C) => t(v) && t(v)(...C)),
|
|
1205
|
+
onKeydown: w[4] || (w[4] = //@ts-ignore
|
|
1206
|
+
(...C) => t(v) && t(v)(...C))
|
|
1194
1207
|
}, [
|
|
1195
|
-
|
|
1196
|
-
I(t(
|
|
1208
|
+
Ds,
|
|
1209
|
+
I(t(ae), {
|
|
1197
1210
|
class: "h-5 w-5 text-foreground",
|
|
1198
1211
|
"aria-hidden": "true"
|
|
1199
1212
|
})
|
|
1200
1213
|
], 32)) : _("", !0),
|
|
1201
|
-
t(
|
|
1214
|
+
t(y) ? (l(), m("div", {
|
|
1202
1215
|
key: 1,
|
|
1203
|
-
class:
|
|
1216
|
+
class: b([
|
|
1204
1217
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1205
1218
|
e.showClear ? "pr-8" : "pr-2"
|
|
1206
1219
|
])
|
|
1207
1220
|
}, [
|
|
1208
|
-
I(t(
|
|
1221
|
+
I(t(Ve), {
|
|
1209
1222
|
class: "h-4 w-4 text-danger",
|
|
1210
1223
|
"aria-hidden": "true"
|
|
1211
1224
|
})
|
|
1212
1225
|
], 2)) : _("", !0),
|
|
1213
|
-
e.showRequired && !t(
|
|
1226
|
+
e.showRequired && !t(y) ? (l(), m("div", Rs, " * ")) : _("", !0)
|
|
1214
1227
|
]),
|
|
1215
|
-
t(
|
|
1228
|
+
t(d) ? (l(), m("p", {
|
|
1216
1229
|
key: 0,
|
|
1217
|
-
id: t(
|
|
1218
|
-
class:
|
|
1219
|
-
}, S(t(
|
|
1230
|
+
id: t(d),
|
|
1231
|
+
class: b(t(p))
|
|
1232
|
+
}, S(t(k)), 11, Ts)) : _("", !0)
|
|
1220
1233
|
], 2));
|
|
1221
1234
|
}
|
|
1222
|
-
}),
|
|
1235
|
+
}), zs = ["for"], Fs = { class: "relative" }, Es = {
|
|
1223
1236
|
key: 0,
|
|
1224
1237
|
class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"
|
|
1225
|
-
},
|
|
1238
|
+
}, Ws = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], Us = /* @__PURE__ */ r("span", { class: "text-xs sr-only" }, "Clear input", -1), qs = {
|
|
1226
1239
|
key: 2,
|
|
1227
1240
|
class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
|
|
1228
|
-
},
|
|
1241
|
+
}, Hs = ["id"], Gs = V({
|
|
1229
1242
|
inheritAttrs: !1
|
|
1230
|
-
}),
|
|
1231
|
-
...
|
|
1243
|
+
}), gl = /* @__PURE__ */ V({
|
|
1244
|
+
...Gs,
|
|
1232
1245
|
__name: "TextInput",
|
|
1233
1246
|
props: {
|
|
1234
1247
|
/**
|
|
@@ -1364,32 +1377,32 @@ const Ms = ["for"], As = { class: "relative" }, Ds = ["id", "name", "placeholder
|
|
|
1364
1377
|
},
|
|
1365
1378
|
emits: ["update:modelValue", "change", "input", "clear", "focusin", "focusout"],
|
|
1366
1379
|
setup(e, { expose: s, emit: n }) {
|
|
1367
|
-
const
|
|
1368
|
-
coreClasses:
|
|
1369
|
-
title:
|
|
1370
|
-
value:
|
|
1371
|
-
helpTipId:
|
|
1372
|
-
helpTipClasses:
|
|
1373
|
-
helpTip:
|
|
1374
|
-
hideHelpTip:
|
|
1375
|
-
errorMessage:
|
|
1376
|
-
clear:
|
|
1377
|
-
focus:
|
|
1380
|
+
const a = e, o = Se(), i = A(null), {
|
|
1381
|
+
coreClasses: f,
|
|
1382
|
+
title: c,
|
|
1383
|
+
value: d,
|
|
1384
|
+
helpTipId: p,
|
|
1385
|
+
helpTipClasses: k,
|
|
1386
|
+
helpTip: y,
|
|
1387
|
+
hideHelpTip: g,
|
|
1388
|
+
errorMessage: v,
|
|
1389
|
+
clear: L,
|
|
1390
|
+
focus: P,
|
|
1378
1391
|
labelClasses: $
|
|
1379
|
-
} =
|
|
1380
|
-
props: Z(
|
|
1392
|
+
} = Ae({
|
|
1393
|
+
props: Z(a),
|
|
1381
1394
|
emit: n,
|
|
1382
|
-
inputEl:
|
|
1383
|
-
}),
|
|
1384
|
-
const
|
|
1385
|
-
return
|
|
1386
|
-
}),
|
|
1387
|
-
() => ["email", "password"].includes(
|
|
1388
|
-
), E =
|
|
1389
|
-
const
|
|
1390
|
-
return
|
|
1391
|
-
}),
|
|
1392
|
-
switch (
|
|
1395
|
+
inputEl: i
|
|
1396
|
+
}), w = u(() => {
|
|
1397
|
+
const O = ["h-5 w-5"];
|
|
1398
|
+
return v.value ? O.push("text-danger") : O.push("text-foreground-2"), O.join(" ");
|
|
1399
|
+
}), C = u(
|
|
1400
|
+
() => ["email", "password"].includes(a.type) || a.customIcon
|
|
1401
|
+
), E = u(() => {
|
|
1402
|
+
const O = [];
|
|
1403
|
+
return C.value ? O.push("pl-8") : O.push("pl-2"), o["input-right"] || (v.value || a.showClear) && (v.value && a.showClear ? O.push("pr-12") : O.push("pr-8")), O.join(" ");
|
|
1404
|
+
}), h = u(() => {
|
|
1405
|
+
switch (a.size) {
|
|
1393
1406
|
case "sm":
|
|
1394
1407
|
return "h-6";
|
|
1395
1408
|
case "lg":
|
|
@@ -1401,197 +1414,197 @@ const Ms = ["for"], As = { class: "relative" }, Ds = ["id", "name", "placeholder
|
|
|
1401
1414
|
return "h-8";
|
|
1402
1415
|
}
|
|
1403
1416
|
});
|
|
1404
|
-
return s({ focus:
|
|
1405
|
-
class:
|
|
1417
|
+
return s({ focus: P }), (O, z) => (l(), m("div", {
|
|
1418
|
+
class: b([e.fullWidth ? "w-full" : "", e.wrapperClasses])
|
|
1406
1419
|
}, [
|
|
1407
|
-
|
|
1420
|
+
r("label", {
|
|
1408
1421
|
for: e.name,
|
|
1409
|
-
class:
|
|
1422
|
+
class: b(t($))
|
|
1410
1423
|
}, [
|
|
1411
|
-
|
|
1412
|
-
], 10,
|
|
1413
|
-
|
|
1414
|
-
t(
|
|
1415
|
-
e.customIcon ? (l(),
|
|
1424
|
+
r("span", null, S(t(c)), 1)
|
|
1425
|
+
], 10, zs),
|
|
1426
|
+
r("div", Fs, [
|
|
1427
|
+
t(C) ? (l(), m("div", Es, [
|
|
1428
|
+
e.customIcon ? (l(), j(q(e.customIcon), {
|
|
1416
1429
|
key: 0,
|
|
1417
|
-
class:
|
|
1430
|
+
class: b(t(w)),
|
|
1418
1431
|
"aria-hidden": "true"
|
|
1419
|
-
}, null, 8, ["class"])) : e.type === "email" ? (l(),
|
|
1432
|
+
}, null, 8, ["class"])) : e.type === "email" ? (l(), j(t(ot), {
|
|
1420
1433
|
key: 1,
|
|
1421
|
-
class:
|
|
1434
|
+
class: b(t(w)),
|
|
1422
1435
|
"aria-hidden": "true"
|
|
1423
|
-
}, null, 8, ["class"])) : e.type === "password" ? (l(),
|
|
1436
|
+
}, null, 8, ["class"])) : e.type === "password" ? (l(), j(t(rt), {
|
|
1424
1437
|
key: 2,
|
|
1425
|
-
class:
|
|
1438
|
+
class: b(t(w)),
|
|
1426
1439
|
"aria-hidden": "true"
|
|
1427
1440
|
}, null, 8, ["class"])) : _("", !0)
|
|
1428
1441
|
])) : _("", !0),
|
|
1429
|
-
te(
|
|
1442
|
+
te(r("input", ne({
|
|
1430
1443
|
id: e.name,
|
|
1431
1444
|
ref_key: "inputElement",
|
|
1432
|
-
ref:
|
|
1433
|
-
"onUpdate:modelValue": z[0] || (z[0] = (M) => le(
|
|
1445
|
+
ref: i,
|
|
1446
|
+
"onUpdate:modelValue": z[0] || (z[0] = (M) => le(d) ? d.value = M : null),
|
|
1434
1447
|
type: e.type,
|
|
1435
1448
|
name: e.name,
|
|
1436
|
-
class: [t(
|
|
1449
|
+
class: [t(f), t(E), t(h), e.inputClasses || ""],
|
|
1437
1450
|
placeholder: e.placeholder,
|
|
1438
1451
|
disabled: e.disabled,
|
|
1439
|
-
"aria-invalid": t(
|
|
1440
|
-
"aria-describedby": t(
|
|
1452
|
+
"aria-invalid": t(v) ? "true" : "false",
|
|
1453
|
+
"aria-describedby": t(p),
|
|
1441
1454
|
role: "textbox"
|
|
1442
|
-
},
|
|
1443
|
-
onChange: z[1] || (z[1] = (M) =>
|
|
1444
|
-
onInput: z[2] || (z[2] = (M) =>
|
|
1445
|
-
}), null, 16,
|
|
1446
|
-
[
|
|
1455
|
+
}, O.$attrs, {
|
|
1456
|
+
onChange: z[1] || (z[1] = (M) => O.$emit("change", { event: M, value: t(d) })),
|
|
1457
|
+
onInput: z[2] || (z[2] = (M) => O.$emit("input", { event: M, value: t(d) }))
|
|
1458
|
+
}), null, 16, Ws), [
|
|
1459
|
+
[Fe, t(d)]
|
|
1447
1460
|
]),
|
|
1448
|
-
R(
|
|
1449
|
-
e.showClear ? (l(),
|
|
1461
|
+
R(O.$slots, "input-right", {}, () => [
|
|
1462
|
+
e.showClear ? (l(), m("a", {
|
|
1450
1463
|
key: 0,
|
|
1451
1464
|
title: "Clear input",
|
|
1452
1465
|
class: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",
|
|
1453
1466
|
onClick: z[3] || (z[3] = //@ts-ignore
|
|
1454
|
-
(...M) => t(
|
|
1467
|
+
(...M) => t(L) && t(L)(...M)),
|
|
1455
1468
|
onKeydown: z[4] || (z[4] = //@ts-ignore
|
|
1456
|
-
(...M) => t(
|
|
1469
|
+
(...M) => t(L) && t(L)(...M))
|
|
1457
1470
|
}, [
|
|
1458
|
-
|
|
1459
|
-
I(t(
|
|
1471
|
+
Us,
|
|
1472
|
+
I(t(ae), {
|
|
1460
1473
|
class: "h-5 w-5 text-foreground",
|
|
1461
1474
|
"aria-hidden": "true"
|
|
1462
1475
|
})
|
|
1463
1476
|
], 32)) : _("", !0),
|
|
1464
|
-
t(
|
|
1477
|
+
t(v) ? (l(), m("div", {
|
|
1465
1478
|
key: 1,
|
|
1466
|
-
class:
|
|
1479
|
+
class: b([
|
|
1467
1480
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1468
1481
|
e.showClear ? "pr-8" : "pr-2"
|
|
1469
1482
|
])
|
|
1470
1483
|
}, [
|
|
1471
|
-
I(t(
|
|
1484
|
+
I(t(Ve), {
|
|
1472
1485
|
class: "h-4 w-4 text-danger",
|
|
1473
1486
|
"aria-hidden": "true"
|
|
1474
1487
|
})
|
|
1475
1488
|
], 2)) : _("", !0),
|
|
1476
|
-
e.showRequired && !t(
|
|
1489
|
+
e.showRequired && !t(v) ? (l(), m("div", qs, " * ")) : _("", !0)
|
|
1477
1490
|
])
|
|
1478
1491
|
]),
|
|
1479
|
-
t(
|
|
1492
|
+
t(p) && !t(g) ? (l(), m("p", {
|
|
1480
1493
|
key: 0,
|
|
1481
|
-
id: t(
|
|
1482
|
-
class:
|
|
1483
|
-
}, S(t(
|
|
1494
|
+
id: t(p),
|
|
1495
|
+
class: b(t(k))
|
|
1496
|
+
}, S(t(y)), 11, Hs)) : _("", !0)
|
|
1484
1497
|
], 2));
|
|
1485
1498
|
}
|
|
1486
|
-
}),
|
|
1487
|
-
const { minLength: n, maxLength:
|
|
1488
|
-
return s = it(s) ? "" : s, se(s) ? !X(n) && s.length < n ? `Value needs to be at least ${n} characters long` : !X(
|
|
1489
|
-
},
|
|
1490
|
-
const { match: n, message:
|
|
1491
|
-
return se(s) ? n ? se(n) ? s.includes(n) ? !0 :
|
|
1492
|
-
},
|
|
1499
|
+
}), Ks = /^https?:\/\//, ge = /^[\w-_.+]+@[\w-_.+]+$/, Xs = (e) => (e || "").match(ge) ? !0 : "Value should be a valid e-mail address", Ns = (e) => (e || "").split(",").map((a) => a.trim()).every((a) => a.match(ge)) || "Value should be one or multiple comma-delimited e-mail addresses", Js = (e) => (se(e) && (e = e.trim()), e ? !0 : "Value is required"), Qs = (e, s) => (n, a) => n === a.form[e] ? !0 : `Value must be the same as in field '${s || e}'`, Ys = (e) => (s) => {
|
|
1500
|
+
const { minLength: n, maxLength: a } = e;
|
|
1501
|
+
return s = it(s) ? "" : s, se(s) ? !X(n) && s.length < n ? `Value needs to be at least ${n} characters long` : !X(a) && s.length > a ? `Value needs to be no more than ${a} characters long` : !0 : "Value should be a text string";
|
|
1502
|
+
}, Zs = (e) => (s) => {
|
|
1503
|
+
const { match: n, message: a } = e;
|
|
1504
|
+
return se(s) ? n ? se(n) ? s.includes(n) ? !0 : a : n.test(s) ? !0 : a : !0 : "Value should be a text string";
|
|
1505
|
+
}, yl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1493
1506
|
__proto__: null,
|
|
1494
|
-
VALID_EMAIL:
|
|
1495
|
-
VALID_HTTP_URL:
|
|
1496
|
-
isEmail:
|
|
1497
|
-
isOneOrMultipleEmails:
|
|
1498
|
-
isRequired:
|
|
1499
|
-
isSameAs:
|
|
1500
|
-
isStringOfLength:
|
|
1501
|
-
stringContains:
|
|
1507
|
+
VALID_EMAIL: ge,
|
|
1508
|
+
VALID_HTTP_URL: Ks,
|
|
1509
|
+
isEmail: Xs,
|
|
1510
|
+
isOneOrMultipleEmails: Ns,
|
|
1511
|
+
isRequired: Js,
|
|
1512
|
+
isSameAs: Qs,
|
|
1513
|
+
isStringOfLength: Ys,
|
|
1514
|
+
stringContains: Zs
|
|
1502
1515
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1503
|
-
function
|
|
1516
|
+
function en(e) {
|
|
1504
1517
|
const {
|
|
1505
1518
|
skipCalculation: s,
|
|
1506
1519
|
elementToWatchForChanges: n,
|
|
1507
|
-
itemContainer:
|
|
1508
|
-
trackResize:
|
|
1509
|
-
trackMutations:
|
|
1510
|
-
} = e || {},
|
|
1511
|
-
const
|
|
1512
|
-
if (s != null && s.value || !
|
|
1520
|
+
itemContainer: a,
|
|
1521
|
+
trackResize: o = !1,
|
|
1522
|
+
trackMutations: i = !0
|
|
1523
|
+
} = e || {}, f = A(0), c = () => {
|
|
1524
|
+
const d = a.value;
|
|
1525
|
+
if (s != null && s.value || !d)
|
|
1513
1526
|
return;
|
|
1514
|
-
const
|
|
1515
|
-
let
|
|
1516
|
-
for (const
|
|
1517
|
-
const
|
|
1518
|
-
X(
|
|
1527
|
+
const p = d.children;
|
|
1528
|
+
let k = 0, y = 0, g;
|
|
1529
|
+
for (const v of p) {
|
|
1530
|
+
const L = v.offsetTop;
|
|
1531
|
+
X(g) ? (g = L, k += 1) : L === g && (k += 1), y += 1;
|
|
1519
1532
|
}
|
|
1520
|
-
|
|
1533
|
+
f.value = y - k;
|
|
1521
1534
|
};
|
|
1522
|
-
return
|
|
1535
|
+
return o && dt(n, c), i && ft(n, c, {
|
|
1523
1536
|
childList: !0,
|
|
1524
1537
|
subtree: !0
|
|
1525
1538
|
}), {
|
|
1526
|
-
hiddenItemCount:
|
|
1539
|
+
hiddenItemCount: f
|
|
1527
1540
|
};
|
|
1528
1541
|
}
|
|
1529
|
-
function
|
|
1530
|
-
const { props: s, emit: n, dynamicVisibility:
|
|
1531
|
-
let
|
|
1532
|
-
if (
|
|
1533
|
-
const { elementToWatchForChanges:
|
|
1534
|
-
|
|
1535
|
-
skipCalculation:
|
|
1536
|
-
var
|
|
1537
|
-
return !((
|
|
1542
|
+
function tn(e) {
|
|
1543
|
+
const { props: s, emit: n, dynamicVisibility: a } = e;
|
|
1544
|
+
let o;
|
|
1545
|
+
if (a) {
|
|
1546
|
+
const { elementToWatchForChanges: p, itemContainer: k } = a;
|
|
1547
|
+
o = en({
|
|
1548
|
+
skipCalculation: u(() => {
|
|
1549
|
+
var g;
|
|
1550
|
+
return !((g = s.multiple) != null && g.value);
|
|
1538
1551
|
}),
|
|
1539
|
-
elementToWatchForChanges:
|
|
1540
|
-
itemContainer:
|
|
1552
|
+
elementToWatchForChanges: p,
|
|
1553
|
+
itemContainer: k
|
|
1541
1554
|
}).hiddenItemCount;
|
|
1542
1555
|
} else
|
|
1543
|
-
|
|
1544
|
-
const
|
|
1556
|
+
o = A(0);
|
|
1557
|
+
const i = u({
|
|
1545
1558
|
get: () => {
|
|
1546
|
-
var
|
|
1547
|
-
const
|
|
1548
|
-
return (
|
|
1559
|
+
var k, y;
|
|
1560
|
+
const p = (k = s.modelValue) == null ? void 0 : k.value;
|
|
1561
|
+
return (y = s.multiple) != null && y.value ? W(p) ? p : [] : W(p) ? void 0 : p;
|
|
1549
1562
|
},
|
|
1550
|
-
set: (
|
|
1551
|
-
var
|
|
1552
|
-
if ((
|
|
1563
|
+
set: (p) => {
|
|
1564
|
+
var k, y, g;
|
|
1565
|
+
if ((k = s.multiple) != null && k.value && !W(p)) {
|
|
1553
1566
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1554
1567
|
return;
|
|
1555
|
-
} else if (!((
|
|
1568
|
+
} else if (!((y = s.multiple) != null && y.value) && W(p)) {
|
|
1556
1569
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1557
1570
|
return;
|
|
1558
1571
|
}
|
|
1559
|
-
n("update:modelValue", (
|
|
1572
|
+
n("update:modelValue", (g = s.multiple) != null && g.value ? p || [] : p);
|
|
1560
1573
|
}
|
|
1561
|
-
}),
|
|
1574
|
+
}), f = (p) => W(p);
|
|
1562
1575
|
return {
|
|
1563
|
-
selectedValue:
|
|
1564
|
-
hiddenSelectedItemCount:
|
|
1565
|
-
isArrayValue:
|
|
1566
|
-
isMultiItemArrayValue: (
|
|
1567
|
-
firstItem: (
|
|
1576
|
+
selectedValue: i,
|
|
1577
|
+
hiddenSelectedItemCount: o,
|
|
1578
|
+
isArrayValue: f,
|
|
1579
|
+
isMultiItemArrayValue: (p) => W(p) && p.length > 1,
|
|
1580
|
+
firstItem: (p) => f(p) ? p[0] : p
|
|
1568
1581
|
};
|
|
1569
1582
|
}
|
|
1570
|
-
const
|
|
1571
|
-
|
|
1572
|
-
],
|
|
1583
|
+
const sn = (e) => (Ee("data-v-60cf597b"), e = e(), We(), e), nn = /* @__PURE__ */ sn(() => /* @__PURE__ */ r("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), ln = [
|
|
1584
|
+
nn
|
|
1585
|
+
], an = /* @__PURE__ */ V({
|
|
1573
1586
|
__name: "Bar",
|
|
1574
1587
|
props: {
|
|
1575
1588
|
loading: { type: Boolean }
|
|
1576
1589
|
},
|
|
1577
1590
|
setup(e) {
|
|
1578
|
-
return (s, n) => (l(),
|
|
1579
|
-
class:
|
|
1591
|
+
return (s, n) => (l(), m("div", {
|
|
1592
|
+
class: b([
|
|
1580
1593
|
"relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
|
|
1581
1594
|
e.loading ? "opacity-100" : "opacity-0"
|
|
1582
1595
|
])
|
|
1583
|
-
},
|
|
1596
|
+
}, ln, 2));
|
|
1584
1597
|
}
|
|
1585
1598
|
});
|
|
1586
|
-
const
|
|
1599
|
+
const De = /* @__PURE__ */ Oe(an, [["__scopeId", "data-v-60cf597b"]]), on = { class: "flex items-center justify-between w-full" }, rn = { class: "block truncate grow text-left" }, un = { class: "pointer-events-none shrink-0 ml-1 flex items-center" }, cn = ["disabled"], dn = {
|
|
1587
1600
|
key: 0,
|
|
1588
1601
|
class: "flex flex-col mx-1 mb-1"
|
|
1589
|
-
},
|
|
1602
|
+
}, fn = /* @__PURE__ */ r("span", { class: "sr-only label text-foreground" }, "Search", -1), pn = { class: "relative" }, hn = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, mn = ["placeholder"], gn = {
|
|
1590
1603
|
key: 0,
|
|
1591
1604
|
class: "px-1"
|
|
1592
|
-
},
|
|
1593
|
-
class: /* @__PURE__ */
|
|
1594
|
-
},
|
|
1605
|
+
}, yn = { key: 1 }, bn = /* @__PURE__ */ r("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷♂️", -1), vn = {
|
|
1606
|
+
class: /* @__PURE__ */ b(["block truncate"])
|
|
1607
|
+
}, xn = ["id"], kn = /* @__PURE__ */ V({
|
|
1595
1608
|
__name: "Base",
|
|
1596
1609
|
props: {
|
|
1597
1610
|
multiple: {
|
|
@@ -1723,103 +1736,104 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
1723
1736
|
},
|
|
1724
1737
|
emits: ["update:modelValue"],
|
|
1725
1738
|
setup(e) {
|
|
1726
|
-
const s = e, { value: n, errorMessage:
|
|
1739
|
+
const s = e, { value: n, errorMessage: a } = pe(s.name, s.rules, {
|
|
1727
1740
|
validateOnMount: s.validateOnMount,
|
|
1728
1741
|
validateOnValueUpdate: s.validateOnValueUpdate,
|
|
1729
1742
|
initialValue: s.modelValue
|
|
1730
|
-
}),
|
|
1731
|
-
const
|
|
1732
|
-
return !
|
|
1733
|
-
}),
|
|
1734
|
-
() =>
|
|
1735
|
-
),
|
|
1736
|
-
() =>
|
|
1737
|
-
),
|
|
1743
|
+
}), o = A(null), i = A(""), f = A([]), c = A(!1), d = A(he()), p = u(() => t(s.label) || t(s.name)), k = u(() => {
|
|
1744
|
+
const x = a.value;
|
|
1745
|
+
return !x || !t(s.useLabelInErrors) ? x : x.replace("Value", p.value);
|
|
1746
|
+
}), y = u(() => k.value || t(s.help)), g = u(() => !!y.value), v = u(
|
|
1747
|
+
() => g.value ? `${t(s.name)}-${d.value}` : void 0
|
|
1748
|
+
), L = u(
|
|
1749
|
+
() => a.value ? "text-danger" : "text-foreground-2"
|
|
1750
|
+
), P = u(
|
|
1738
1751
|
() => s.buttonStyle !== "simple" && s.clearable && !s.disabled
|
|
1739
|
-
), $ =
|
|
1740
|
-
const
|
|
1741
|
-
return s.buttonStyle !== "simple" && (
|
|
1742
|
-
}),
|
|
1743
|
-
const
|
|
1744
|
-
return s.buttonStyle !== "simple" &&
|
|
1752
|
+
), $ = u(() => {
|
|
1753
|
+
const x = ["relative flex group"];
|
|
1754
|
+
return s.buttonStyle !== "simple" && (x.push("hover:shadow rounded-md"), x.push("outline outline-2 outline-primary-muted")), s.fixedHeight && x.push("h-8"), x.join(" ");
|
|
1755
|
+
}), w = u(() => {
|
|
1756
|
+
const x = [];
|
|
1757
|
+
return s.buttonStyle !== "simple" && x.push(
|
|
1745
1758
|
z.value ? "bg-foundation-disabled text-foreground-disabled" : ""
|
|
1746
|
-
), z.value &&
|
|
1747
|
-
}),
|
|
1748
|
-
const
|
|
1759
|
+
), z.value && x.push("cursor-not-allowed"), x.join(" ");
|
|
1760
|
+
}), C = u(() => {
|
|
1761
|
+
const x = [
|
|
1749
1762
|
"relative z-[1]",
|
|
1750
1763
|
"flex items-center justify-center text-center shrink-0",
|
|
1751
1764
|
"rounded-r-md overflow-hidden transition-all",
|
|
1752
|
-
|
|
1765
|
+
"text-foreground",
|
|
1766
|
+
ye.value ? `w-6 ${w.value}` : "w-0"
|
|
1753
1767
|
];
|
|
1754
|
-
return z.value ||
|
|
1755
|
-
"bg-primary
|
|
1756
|
-
),
|
|
1757
|
-
}), E =
|
|
1758
|
-
const
|
|
1768
|
+
return z.value || (x.push(
|
|
1769
|
+
"hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"
|
|
1770
|
+
), s.buttonStyle === "tinted" ? x.push("bg-outline-3") : x.push("bg-primary-muted")), x.join(" ");
|
|
1771
|
+
}), E = u(() => {
|
|
1772
|
+
const x = [
|
|
1759
1773
|
"relative z-[2]",
|
|
1760
1774
|
"normal rounded-md cursor-pointer transition truncate flex-1",
|
|
1761
1775
|
"flex items-center",
|
|
1762
|
-
|
|
1776
|
+
w.value
|
|
1763
1777
|
];
|
|
1764
|
-
return s.buttonStyle !== "simple" && (
|
|
1765
|
-
}),
|
|
1778
|
+
return s.buttonStyle !== "simple" && (x.push("py-2 px-3"), z.value || (s.buttonStyle === "tinted" ? x.push("bg-foundation-page text-foreground") : x.push("bg-foundation text-foreground"))), P.value && ye.value && x.push("rounded-r-none"), x.join(" ");
|
|
1779
|
+
}), h = u(
|
|
1766
1780
|
() => !!(s.search && (s.filterPredicate || s.getSearchResults))
|
|
1767
|
-
),
|
|
1768
|
-
() => s.disabled || !s.items.length && !
|
|
1769
|
-
), M =
|
|
1781
|
+
), O = u(() => h.value && s.getSearchResults), z = u(
|
|
1782
|
+
() => s.disabled || !s.items.length && !O.value
|
|
1783
|
+
), M = u({
|
|
1770
1784
|
get: () => {
|
|
1771
|
-
const
|
|
1772
|
-
return s.multiple ? W(
|
|
1785
|
+
const x = n.value;
|
|
1786
|
+
return s.multiple ? W(x) ? x : [] : W(x) ? void 0 : x;
|
|
1773
1787
|
},
|
|
1774
|
-
set: (
|
|
1775
|
-
if (s.multiple && !W(
|
|
1788
|
+
set: (x) => {
|
|
1789
|
+
if (s.multiple && !W(x)) {
|
|
1776
1790
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1777
1791
|
return;
|
|
1778
|
-
} else if (!s.multiple && W(
|
|
1792
|
+
} else if (!s.multiple && W(x)) {
|
|
1779
1793
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1780
1794
|
return;
|
|
1781
1795
|
}
|
|
1782
1796
|
if (s.multiple)
|
|
1783
|
-
n.value =
|
|
1797
|
+
n.value = x || [];
|
|
1784
1798
|
else {
|
|
1785
|
-
const F = n.value,
|
|
1786
|
-
n.value =
|
|
1799
|
+
const F = n.value, T = s.allowUnset && F && x && re(F) === re(x);
|
|
1800
|
+
n.value = T ? void 0 : x;
|
|
1787
1801
|
}
|
|
1788
1802
|
}
|
|
1789
|
-
}),
|
|
1803
|
+
}), ye = u(() => s.multiple ? M.value.length !== 0 : !!M.value), Re = () => {
|
|
1790
1804
|
s.multiple ? M.value = [] : M.value = void 0;
|
|
1791
|
-
},
|
|
1792
|
-
const
|
|
1793
|
-
return !
|
|
1805
|
+
}, Te = u(() => {
|
|
1806
|
+
const x = i.value;
|
|
1807
|
+
return !h.value || !(x != null && x.length) ? f.value : s.filterPredicate ? f.value.filter(
|
|
1794
1808
|
(F) => {
|
|
1795
|
-
var
|
|
1796
|
-
return ((
|
|
1809
|
+
var T;
|
|
1810
|
+
return ((T = s.filterPredicate) == null ? void 0 : T.call(s, F, x)) || !1;
|
|
1797
1811
|
}
|
|
1798
|
-
) :
|
|
1799
|
-
}), be = (
|
|
1800
|
-
if (
|
|
1801
|
-
|
|
1812
|
+
) : f.value;
|
|
1813
|
+
}), be = (x) => JSON.stringify(x), re = (x) => s.by ? x[s.by] : x, ve = async () => {
|
|
1814
|
+
if (!(!O.value || !s.getSearchResults)) {
|
|
1815
|
+
c.value = !0;
|
|
1802
1816
|
try {
|
|
1803
|
-
|
|
1817
|
+
f.value = await s.getSearchResults(i.value);
|
|
1804
1818
|
} finally {
|
|
1805
|
-
|
|
1819
|
+
c.value = !1;
|
|
1806
1820
|
}
|
|
1807
1821
|
}
|
|
1808
|
-
},
|
|
1822
|
+
}, ze = Le(ve, 1e3);
|
|
1809
1823
|
return Y(
|
|
1810
1824
|
() => s.items,
|
|
1811
|
-
(
|
|
1812
|
-
|
|
1825
|
+
(x) => {
|
|
1826
|
+
f.value = x.slice();
|
|
1813
1827
|
},
|
|
1814
1828
|
{ immediate: !0 }
|
|
1815
|
-
), Y(
|
|
1816
|
-
|
|
1829
|
+
), Y(i, () => {
|
|
1830
|
+
O.value && ze();
|
|
1817
1831
|
}), ee(() => {
|
|
1818
|
-
|
|
1819
|
-
}), (
|
|
1832
|
+
O.value && !s.items.length && ve();
|
|
1833
|
+
}), (x, F) => (l(), m("div", null, [
|
|
1820
1834
|
I(t(ht), {
|
|
1821
1835
|
modelValue: t(M),
|
|
1822
|
-
"onUpdate:modelValue": F[4] || (F[4] = (
|
|
1836
|
+
"onUpdate:modelValue": F[4] || (F[4] = (T) => le(M) ? M.value = T : null),
|
|
1823
1837
|
name: e.name,
|
|
1824
1838
|
multiple: e.multiple,
|
|
1825
1839
|
by: e.by,
|
|
@@ -1828,37 +1842,37 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
1828
1842
|
}, {
|
|
1829
1843
|
default: B(() => [
|
|
1830
1844
|
I(t(mt), {
|
|
1831
|
-
class:
|
|
1845
|
+
class: b(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
|
|
1832
1846
|
}, {
|
|
1833
1847
|
default: B(() => [
|
|
1834
|
-
|
|
1848
|
+
D(S(e.label), 1)
|
|
1835
1849
|
]),
|
|
1836
1850
|
_: 1
|
|
1837
1851
|
}, 8, ["class"]),
|
|
1838
|
-
|
|
1839
|
-
class:
|
|
1852
|
+
r("div", {
|
|
1853
|
+
class: b(t($))
|
|
1840
1854
|
}, [
|
|
1841
1855
|
I(t(gt), {
|
|
1842
|
-
class:
|
|
1856
|
+
class: b(t(E))
|
|
1843
1857
|
}, {
|
|
1844
|
-
default: B(({ open:
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
!t(M) || t(W)(t(M)) && !t(M).length ? R(
|
|
1848
|
-
|
|
1849
|
-
]) : R(
|
|
1858
|
+
default: B(({ open: T }) => [
|
|
1859
|
+
r("div", on, [
|
|
1860
|
+
r("div", rn, [
|
|
1861
|
+
!t(M) || t(W)(t(M)) && !t(M).length ? R(x.$slots, "nothing-selected", { key: 0 }, () => [
|
|
1862
|
+
D(S(e.label), 1)
|
|
1863
|
+
]) : R(x.$slots, "something-selected", {
|
|
1850
1864
|
key: 1,
|
|
1851
1865
|
value: t(M)
|
|
1852
1866
|
}, () => [
|
|
1853
|
-
|
|
1867
|
+
D(S(be(t(M))), 1)
|
|
1854
1868
|
])
|
|
1855
1869
|
]),
|
|
1856
|
-
|
|
1857
|
-
|
|
1870
|
+
r("div", un, [
|
|
1871
|
+
T ? (l(), j(t(Pe), {
|
|
1858
1872
|
key: 0,
|
|
1859
1873
|
class: "h-4 w-4 text-foreground",
|
|
1860
1874
|
"aria-hidden": "true"
|
|
1861
|
-
})) : (l(),
|
|
1875
|
+
})) : (l(), j(t(Ge), {
|
|
1862
1876
|
key: 1,
|
|
1863
1877
|
class: "h-4 w-4 text-foreground",
|
|
1864
1878
|
"aria-hidden": "true"
|
|
@@ -1868,17 +1882,17 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
1868
1882
|
]),
|
|
1869
1883
|
_: 3
|
|
1870
1884
|
}, 8, ["class"]),
|
|
1871
|
-
t(
|
|
1885
|
+
t(P) ? te((l(), m("button", {
|
|
1872
1886
|
key: 0,
|
|
1873
|
-
class:
|
|
1887
|
+
class: b(t(C)),
|
|
1874
1888
|
disabled: e.disabled,
|
|
1875
|
-
onClick: F[0] || (F[0] = (
|
|
1889
|
+
onClick: F[0] || (F[0] = (T) => Re())
|
|
1876
1890
|
}, [
|
|
1877
|
-
I(t(
|
|
1878
|
-
], 10,
|
|
1891
|
+
I(t(Ke), { class: "w-3 h-3" })
|
|
1892
|
+
], 10, cn)), [
|
|
1879
1893
|
[t(Lt), "Clear"]
|
|
1880
1894
|
]) : _("", !0),
|
|
1881
|
-
I(
|
|
1895
|
+
I(fe, {
|
|
1882
1896
|
"leave-active-class": "transition ease-in duration-100",
|
|
1883
1897
|
"leave-from-class": "opacity-100",
|
|
1884
1898
|
"leave-to-class": "opacity-0"
|
|
@@ -1886,71 +1900,71 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
1886
1900
|
default: B(() => [
|
|
1887
1901
|
I(t(yt), {
|
|
1888
1902
|
class: "absolute top-[100%] z-10 mt-1 w-full rounded-md bg-foundation-2 py-1 label label--light outline outline-2 outline-primary-muted focus:outline-none shadow",
|
|
1889
|
-
onFocus: F[3] || (F[3] = (
|
|
1903
|
+
onFocus: F[3] || (F[3] = (T) => {
|
|
1890
1904
|
var G;
|
|
1891
|
-
return (G =
|
|
1905
|
+
return (G = o.value) == null ? void 0 : G.focus();
|
|
1892
1906
|
})
|
|
1893
1907
|
}, {
|
|
1894
1908
|
default: B(() => [
|
|
1895
|
-
t(
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
I(t(
|
|
1909
|
+
t(h) ? (l(), m("label", dn, [
|
|
1910
|
+
fn,
|
|
1911
|
+
r("div", pn, [
|
|
1912
|
+
r("div", hn, [
|
|
1913
|
+
I(t(Xe), { class: "h-5 w-5 text-foreground" })
|
|
1900
1914
|
]),
|
|
1901
|
-
te(
|
|
1915
|
+
te(r("input", {
|
|
1902
1916
|
ref_key: "searchInput",
|
|
1903
|
-
ref:
|
|
1904
|
-
"onUpdate:modelValue": F[1] || (F[1] = (
|
|
1917
|
+
ref: o,
|
|
1918
|
+
"onUpdate:modelValue": F[1] || (F[1] = (T) => i.value = T),
|
|
1905
1919
|
type: "text",
|
|
1906
1920
|
class: "pl-9 w-full border-0 bg-foundation-page rounded placeholder:font-normal normal placeholder:text-foreground-2 focus:outline-none focus:ring-1 focus:border-outline-1 focus:ring-outline-1",
|
|
1907
1921
|
placeholder: e.searchPlaceholder,
|
|
1908
|
-
onKeydown: F[2] || (F[2] =
|
|
1922
|
+
onKeydown: F[2] || (F[2] = Ie(() => {
|
|
1909
1923
|
}, ["stop"]))
|
|
1910
|
-
}, null, 40,
|
|
1911
|
-
[
|
|
1924
|
+
}, null, 40, mn), [
|
|
1925
|
+
[_e, i.value]
|
|
1912
1926
|
])
|
|
1913
1927
|
])
|
|
1914
1928
|
])) : _("", !0),
|
|
1915
|
-
|
|
1916
|
-
class:
|
|
1929
|
+
r("div", {
|
|
1930
|
+
class: b(["overflow-auto simple-scrollbar", [t(h) ? "max-h-52" : "max-h-60"]])
|
|
1917
1931
|
}, [
|
|
1918
|
-
t(
|
|
1919
|
-
I(
|
|
1920
|
-
])) : t(
|
|
1921
|
-
R(
|
|
1932
|
+
t(O) && c.value ? (l(), m("div", gn, [
|
|
1933
|
+
I(De, { loading: !0 })
|
|
1934
|
+
])) : t(O) && !f.value.length ? (l(), m("div", yn, [
|
|
1935
|
+
R(x.$slots, "nothing-found", {}, () => [
|
|
1922
1936
|
bn
|
|
1923
1937
|
])
|
|
1924
1938
|
])) : _("", !0),
|
|
1925
|
-
!t(
|
|
1926
|
-
key:
|
|
1927
|
-
value:
|
|
1939
|
+
!t(O) || !c.value ? (l(!0), m(U, { key: 2 }, H(t(Te), (T) => (l(), j(t(bt), {
|
|
1940
|
+
key: re(T),
|
|
1941
|
+
value: T
|
|
1928
1942
|
}, {
|
|
1929
|
-
default: B(({ active: G, selected:
|
|
1930
|
-
|
|
1931
|
-
class:
|
|
1943
|
+
default: B(({ active: G, selected: xe }) => [
|
|
1944
|
+
r("li", {
|
|
1945
|
+
class: b([
|
|
1932
1946
|
G ? "text-primary" : "text-foreground",
|
|
1933
1947
|
"relative transition cursor-pointer select-none py-1.5 pl-3",
|
|
1934
1948
|
e.hideCheckmarks ? "" : "pr-9"
|
|
1935
1949
|
])
|
|
1936
1950
|
}, [
|
|
1937
|
-
|
|
1938
|
-
R(
|
|
1939
|
-
item:
|
|
1951
|
+
r("span", vn, [
|
|
1952
|
+
R(x.$slots, "option", {
|
|
1953
|
+
item: T,
|
|
1940
1954
|
active: G,
|
|
1941
|
-
selected:
|
|
1955
|
+
selected: xe
|
|
1942
1956
|
}, () => [
|
|
1943
|
-
|
|
1957
|
+
D(S(be(T)), 1)
|
|
1944
1958
|
])
|
|
1945
1959
|
]),
|
|
1946
|
-
!e.hideCheckmarks &&
|
|
1960
|
+
!e.hideCheckmarks && xe ? (l(), m("span", {
|
|
1947
1961
|
key: 0,
|
|
1948
|
-
class:
|
|
1962
|
+
class: b([
|
|
1949
1963
|
G ? "text-primary" : "text-foreground",
|
|
1950
1964
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
1951
1965
|
])
|
|
1952
1966
|
}, [
|
|
1953
|
-
I(t(
|
|
1967
|
+
I(t(Ne), {
|
|
1954
1968
|
class: "h-5 w-5",
|
|
1955
1969
|
"aria-hidden": "true"
|
|
1956
1970
|
})
|
|
@@ -1970,37 +1984,37 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
1970
1984
|
]),
|
|
1971
1985
|
_: 3
|
|
1972
1986
|
}, 8, ["modelValue", "name", "multiple", "by", "disabled"]),
|
|
1973
|
-
t(
|
|
1987
|
+
t(v) ? (l(), m("p", {
|
|
1974
1988
|
key: 0,
|
|
1975
|
-
id: t(
|
|
1976
|
-
class:
|
|
1977
|
-
}, S(t(
|
|
1989
|
+
id: t(v),
|
|
1990
|
+
class: b(["mt-2 text-sm", t(L)])
|
|
1991
|
+
}, S(t(y)), 11, xn)) : _("", !0)
|
|
1978
1992
|
]));
|
|
1979
1993
|
}
|
|
1980
|
-
}),
|
|
1994
|
+
}), Cn = /* @__PURE__ */ V({
|
|
1981
1995
|
__name: "SourceAppBadge",
|
|
1982
1996
|
props: {
|
|
1983
1997
|
sourceApp: null
|
|
1984
1998
|
},
|
|
1985
1999
|
setup(e) {
|
|
1986
|
-
return (s, n) => (l(),
|
|
2000
|
+
return (s, n) => (l(), j(Kt, {
|
|
1987
2001
|
"color-classes": "text-foreground-on-primary",
|
|
1988
2002
|
rounded: "",
|
|
1989
|
-
style:
|
|
2003
|
+
style: ie({ backgroundColor: e.sourceApp.bgColor })
|
|
1990
2004
|
}, {
|
|
1991
2005
|
default: B(() => [
|
|
1992
|
-
|
|
2006
|
+
D(S(e.sourceApp.short), 1)
|
|
1993
2007
|
]),
|
|
1994
2008
|
_: 1
|
|
1995
2009
|
}, 8, ["style"]));
|
|
1996
2010
|
}
|
|
1997
|
-
}),
|
|
2011
|
+
}), wn = {
|
|
1998
2012
|
key: 0,
|
|
1999
2013
|
class: "text-foreground-2 normal"
|
|
2000
|
-
},
|
|
2014
|
+
}, $n = {
|
|
2001
2015
|
key: 1,
|
|
2002
2016
|
class: "flex items-center"
|
|
2003
|
-
},
|
|
2017
|
+
}, _n = { class: "truncate" }, Sn = { class: "flex items-center" }, In = { class: "truncate" }, bl = /* @__PURE__ */ V({
|
|
2004
2018
|
__name: "SourceApps",
|
|
2005
2019
|
props: {
|
|
2006
2020
|
/**
|
|
@@ -2060,14 +2074,14 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
2060
2074
|
},
|
|
2061
2075
|
emits: ["update:modelValue"],
|
|
2062
2076
|
setup(e, { emit: s }) {
|
|
2063
|
-
const n = e,
|
|
2077
|
+
const n = e, a = A(null), o = A(null), { selectedValue: i, hiddenSelectedItemCount: f, isMultiItemArrayValue: c, firstItem: d } = tn({
|
|
2064
2078
|
props: Z(n),
|
|
2065
2079
|
emit: s,
|
|
2066
|
-
dynamicVisibility: { elementToWatchForChanges:
|
|
2067
|
-
}),
|
|
2068
|
-
return (
|
|
2069
|
-
modelValue: t(
|
|
2070
|
-
"onUpdate:modelValue":
|
|
2080
|
+
dynamicVisibility: { elementToWatchForChanges: a, itemContainer: o }
|
|
2081
|
+
}), p = (k, y) => k.name.toLocaleLowerCase().includes(y.toLocaleLowerCase());
|
|
2082
|
+
return (k, y) => (l(), j(kn, {
|
|
2083
|
+
modelValue: t(i),
|
|
2084
|
+
"onUpdate:modelValue": y[0] || (y[0] = (g) => le(i) ? i.value = g : null),
|
|
2071
2085
|
multiple: e.multiple,
|
|
2072
2086
|
items: e.items ?? t(ut),
|
|
2073
2087
|
search: e.search,
|
|
@@ -2075,49 +2089,49 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
2075
2089
|
label: e.label,
|
|
2076
2090
|
"show-label": e.showLabel,
|
|
2077
2091
|
name: e.name || "sourceApps",
|
|
2078
|
-
"filter-predicate":
|
|
2092
|
+
"filter-predicate": p,
|
|
2079
2093
|
by: "name"
|
|
2080
2094
|
}, {
|
|
2081
2095
|
"nothing-selected": B(() => [
|
|
2082
|
-
e.selectorPlaceholder ? (l(),
|
|
2083
|
-
|
|
2084
|
-
], 64)) : (l(),
|
|
2085
|
-
|
|
2096
|
+
e.selectorPlaceholder ? (l(), m(U, { key: 0 }, [
|
|
2097
|
+
D(S(e.selectorPlaceholder), 1)
|
|
2098
|
+
], 64)) : (l(), m(U, { key: 1 }, [
|
|
2099
|
+
D(S(e.multiple ? "Select apps" : "Select an app"), 1)
|
|
2086
2100
|
], 64))
|
|
2087
2101
|
]),
|
|
2088
|
-
"something-selected": B(({ value:
|
|
2089
|
-
t(
|
|
2102
|
+
"something-selected": B(({ value: g }) => [
|
|
2103
|
+
t(c)(g) ? (l(), m("div", {
|
|
2090
2104
|
key: 0,
|
|
2091
2105
|
ref_key: "elementToWatchForChanges",
|
|
2092
|
-
ref:
|
|
2106
|
+
ref: a,
|
|
2093
2107
|
class: "flex items-center space-x-0.5 h-5"
|
|
2094
2108
|
}, [
|
|
2095
|
-
|
|
2109
|
+
r("div", {
|
|
2096
2110
|
ref_key: "itemContainer",
|
|
2097
|
-
ref:
|
|
2111
|
+
ref: o,
|
|
2098
2112
|
class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
|
|
2099
2113
|
}, [
|
|
2100
|
-
(l(!0),
|
|
2101
|
-
key:
|
|
2102
|
-
"source-app":
|
|
2114
|
+
(l(!0), m(U, null, H(g, (v) => (l(), j(Cn, {
|
|
2115
|
+
key: v.name,
|
|
2116
|
+
"source-app": v
|
|
2103
2117
|
}, null, 8, ["source-app"]))), 128))
|
|
2104
2118
|
], 512),
|
|
2105
|
-
t(
|
|
2106
|
-
], 512)) : (l(),
|
|
2107
|
-
|
|
2119
|
+
t(f) > 0 ? (l(), m("div", wn, " +" + S(t(f)), 1)) : _("", !0)
|
|
2120
|
+
], 512)) : (l(), m("div", $n, [
|
|
2121
|
+
r("div", {
|
|
2108
2122
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2109
|
-
style:
|
|
2123
|
+
style: ie({ backgroundColor: t(d)(g).bgColor })
|
|
2110
2124
|
}, null, 4),
|
|
2111
|
-
|
|
2125
|
+
r("span", _n, S(t(d)(g).name), 1)
|
|
2112
2126
|
]))
|
|
2113
2127
|
]),
|
|
2114
|
-
option: B(({ item:
|
|
2115
|
-
|
|
2116
|
-
|
|
2128
|
+
option: B(({ item: g }) => [
|
|
2129
|
+
r("div", Sn, [
|
|
2130
|
+
r("div", {
|
|
2117
2131
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2118
|
-
style:
|
|
2132
|
+
style: ie({ backgroundColor: g.bgColor })
|
|
2119
2133
|
}, null, 4),
|
|
2120
|
-
|
|
2134
|
+
r("span", In, S(g.name), 1)
|
|
2121
2135
|
])
|
|
2122
2136
|
]),
|
|
2123
2137
|
_: 1
|
|
@@ -2125,38 +2139,38 @@ const Re = /* @__PURE__ */ me(on, [["__scopeId", "data-v-60cf597b"]]), rn = { cl
|
|
|
2125
2139
|
}
|
|
2126
2140
|
});
|
|
2127
2141
|
var Q = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(Q || {});
|
|
2128
|
-
const
|
|
2142
|
+
const ce = ct(), Bn = {
|
|
2129
2143
|
[
|
|
2130
2144
|
"cmd-or-ctrl"
|
|
2131
2145
|
/* CtrlOrCmd */
|
|
2132
|
-
]:
|
|
2146
|
+
]: ce === ue.Mac ? "Cmd" : "Ctrl",
|
|
2133
2147
|
[
|
|
2134
2148
|
"alt-or-opt"
|
|
2135
2149
|
/* AltOrOpt */
|
|
2136
|
-
]:
|
|
2150
|
+
]: ce === ue.Mac ? "Opt" : "Alt",
|
|
2137
2151
|
shift: "Shift"
|
|
2138
2152
|
};
|
|
2139
|
-
function
|
|
2153
|
+
function vl(e) {
|
|
2140
2154
|
const s = (n) => Object.values(Q).includes(n);
|
|
2141
|
-
return e.map((n) => s(n) ?
|
|
2155
|
+
return e.map((n) => s(n) ? Bn[n] : n).join("+");
|
|
2142
2156
|
}
|
|
2143
|
-
function
|
|
2157
|
+
function xl(e, ...s) {
|
|
2144
2158
|
pt(
|
|
2145
2159
|
s[0],
|
|
2146
2160
|
(n) => {
|
|
2147
|
-
const
|
|
2148
|
-
for (const
|
|
2149
|
-
switch (
|
|
2161
|
+
const a = n.getModifierState("Alt"), o = ce === ue.Mac ? n.getModifierState("Meta") : n.getModifierState("Control"), i = n.getModifierState("Shift");
|
|
2162
|
+
for (const f of e)
|
|
2163
|
+
switch (f) {
|
|
2150
2164
|
case Q.CtrlOrCmd:
|
|
2151
|
-
if (!
|
|
2165
|
+
if (!o)
|
|
2152
2166
|
return;
|
|
2153
2167
|
break;
|
|
2154
2168
|
case Q.AltOrOpt:
|
|
2155
|
-
if (!
|
|
2169
|
+
if (!a)
|
|
2156
2170
|
return;
|
|
2157
2171
|
break;
|
|
2158
2172
|
case Q.Shift:
|
|
2159
|
-
if (!
|
|
2173
|
+
if (!i)
|
|
2160
2174
|
return;
|
|
2161
2175
|
break;
|
|
2162
2176
|
}
|
|
@@ -2165,7 +2179,7 @@ function vl(e, ...s) {
|
|
|
2165
2179
|
s[2]
|
|
2166
2180
|
);
|
|
2167
2181
|
}
|
|
2168
|
-
const
|
|
2182
|
+
const Ln = /* @__PURE__ */ r("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity" }, null, -1), Pn = { class: "fixed inset-0 z-10 overflow-y-auto" }, jn = { class: "flex min-h-full justify-center p-4 text-center items-center sm:p-0" }, Vn = { class: "relative" }, kl = /* @__PURE__ */ V({
|
|
2169
2183
|
__name: "Dialog",
|
|
2170
2184
|
props: {
|
|
2171
2185
|
open: { type: Boolean },
|
|
@@ -2175,10 +2189,10 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2175
2189
|
},
|
|
2176
2190
|
emits: ["update:open", "fully-closed"],
|
|
2177
2191
|
setup(e, { emit: s }) {
|
|
2178
|
-
const n = e,
|
|
2192
|
+
const n = e, a = u({
|
|
2179
2193
|
get: () => n.open,
|
|
2180
|
-
set: (
|
|
2181
|
-
}),
|
|
2194
|
+
set: (c) => s("update:open", c)
|
|
2195
|
+
}), o = u(() => {
|
|
2182
2196
|
switch (n.maxWidth) {
|
|
2183
2197
|
case "sm":
|
|
2184
2198
|
return 0;
|
|
@@ -2191,27 +2205,27 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2191
2205
|
default:
|
|
2192
2206
|
return 1e4;
|
|
2193
2207
|
}
|
|
2194
|
-
}),
|
|
2195
|
-
const
|
|
2208
|
+
}), i = u(() => {
|
|
2209
|
+
const c = [
|
|
2196
2210
|
"px-4 pt-4 pb-4 w-full",
|
|
2197
2211
|
"sm:my-8 sm:w-full sm:max-w-xl sm:p-6"
|
|
2198
2212
|
];
|
|
2199
|
-
return
|
|
2200
|
-
}),
|
|
2201
|
-
n.preventCloseOnClickOutside || (
|
|
2213
|
+
return o.value >= 1 && c.push("md:max-w-2xl"), o.value >= 2 && c.push("lg:max-w-4xl"), o.value >= 3 && c.push("xl:max-w-6xl"), o.value >= 4 && c.push("2xl:max-w-7xl"), c.join(" ");
|
|
2214
|
+
}), f = () => {
|
|
2215
|
+
n.preventCloseOnClickOutside || (a.value = !1);
|
|
2202
2216
|
};
|
|
2203
|
-
return (
|
|
2217
|
+
return (c, d) => (l(), j(t(vt), {
|
|
2204
2218
|
as: "template",
|
|
2205
|
-
show: t(
|
|
2219
|
+
show: t(a)
|
|
2206
2220
|
}, {
|
|
2207
2221
|
default: B(() => [
|
|
2208
2222
|
I(t(xt), {
|
|
2209
2223
|
as: "div",
|
|
2210
2224
|
class: "relative z-40",
|
|
2211
|
-
onClose:
|
|
2225
|
+
onClose: f
|
|
2212
2226
|
}, {
|
|
2213
2227
|
default: B(() => [
|
|
2214
|
-
I(t(
|
|
2228
|
+
I(t(we), {
|
|
2215
2229
|
as: "template",
|
|
2216
2230
|
enter: "ease-out duration-300",
|
|
2217
2231
|
"enter-from": "opacity-0",
|
|
@@ -2221,13 +2235,13 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2221
2235
|
"leave-to": "opacity-0"
|
|
2222
2236
|
}, {
|
|
2223
2237
|
default: B(() => [
|
|
2224
|
-
|
|
2238
|
+
Ln
|
|
2225
2239
|
]),
|
|
2226
2240
|
_: 1
|
|
2227
2241
|
}),
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
I(t(
|
|
2242
|
+
r("div", Pn, [
|
|
2243
|
+
r("div", jn, [
|
|
2244
|
+
I(t(we), {
|
|
2231
2245
|
as: "template",
|
|
2232
2246
|
enter: "ease-out duration-300",
|
|
2233
2247
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -2235,26 +2249,26 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2235
2249
|
leave: "ease-in duration-200",
|
|
2236
2250
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
2237
2251
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
2238
|
-
onAfterLeave:
|
|
2252
|
+
onAfterLeave: d[1] || (d[1] = (p) => c.$emit("fully-closed"))
|
|
2239
2253
|
}, {
|
|
2240
2254
|
default: B(() => [
|
|
2241
2255
|
I(t(kt), {
|
|
2242
|
-
class:
|
|
2256
|
+
class: b([
|
|
2243
2257
|
"transform rounded-lg bg-foundation text-left shadow-xl transition-all",
|
|
2244
|
-
t(
|
|
2258
|
+
t(i)
|
|
2245
2259
|
])
|
|
2246
2260
|
}, {
|
|
2247
2261
|
default: B(() => [
|
|
2248
|
-
|
|
2249
|
-
R(
|
|
2250
|
-
|
|
2262
|
+
r("div", Vn, [
|
|
2263
|
+
R(c.$slots, "default", {}, () => [
|
|
2264
|
+
D("Put your content here!")
|
|
2251
2265
|
]),
|
|
2252
|
-
e.hideCloser ? _("", !0) : (l(),
|
|
2266
|
+
e.hideCloser ? _("", !0) : (l(), m("button", {
|
|
2253
2267
|
key: 0,
|
|
2254
2268
|
class: "absolute top-0 right-0 text-foreground",
|
|
2255
|
-
onClick:
|
|
2269
|
+
onClick: d[0] || (d[0] = (p) => a.value = !1)
|
|
2256
2270
|
}, [
|
|
2257
|
-
I(t(
|
|
2271
|
+
I(t(st), { class: "h-6 w-6" })
|
|
2258
2272
|
]))
|
|
2259
2273
|
])
|
|
2260
2274
|
]),
|
|
@@ -2272,7 +2286,7 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2272
2286
|
_: 3
|
|
2273
2287
|
}, 8, ["show"]));
|
|
2274
2288
|
}
|
|
2275
|
-
}),
|
|
2289
|
+
}), On = { class: "inline-flex items-center space-x-2" }, Mn = { class: "label-light" }, Cl = /* @__PURE__ */ V({
|
|
2276
2290
|
__name: "Disclosure",
|
|
2277
2291
|
props: {
|
|
2278
2292
|
title: null,
|
|
@@ -2280,63 +2294,63 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2280
2294
|
color: { default: "default" }
|
|
2281
2295
|
},
|
|
2282
2296
|
setup(e) {
|
|
2283
|
-
const s = e, n =
|
|
2284
|
-
const
|
|
2297
|
+
const s = e, n = u(() => {
|
|
2298
|
+
const o = [
|
|
2285
2299
|
"pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition",
|
|
2286
2300
|
"ring-1"
|
|
2287
2301
|
];
|
|
2288
2302
|
switch (s.color) {
|
|
2289
2303
|
case "danger":
|
|
2290
|
-
|
|
2304
|
+
o.push("border-danger text-danger ring-danger-lighter hover:ring-danger");
|
|
2291
2305
|
break;
|
|
2292
2306
|
case "default":
|
|
2293
2307
|
default:
|
|
2294
|
-
|
|
2308
|
+
o.push(
|
|
2295
2309
|
"border-primary text-primary ring-primary-muted hover:ring-primary"
|
|
2296
2310
|
);
|
|
2297
2311
|
break;
|
|
2298
2312
|
}
|
|
2299
|
-
return
|
|
2300
|
-
}),
|
|
2301
|
-
const
|
|
2313
|
+
return o.join(" ");
|
|
2314
|
+
}), a = u(() => {
|
|
2315
|
+
const o = ["mt-4 px-3 py-1 border-x "];
|
|
2302
2316
|
switch (s.color) {
|
|
2303
2317
|
case "danger":
|
|
2304
|
-
|
|
2318
|
+
o.push("border-danger-lighter");
|
|
2305
2319
|
break;
|
|
2306
2320
|
case "default":
|
|
2307
2321
|
default:
|
|
2308
|
-
|
|
2322
|
+
o.push("border-primary-muted");
|
|
2309
2323
|
break;
|
|
2310
2324
|
}
|
|
2311
|
-
return
|
|
2325
|
+
return o.join(" ");
|
|
2312
2326
|
});
|
|
2313
|
-
return (
|
|
2327
|
+
return (o, i) => (l(), m("div", null, [
|
|
2314
2328
|
I(t(Ct), null, {
|
|
2315
|
-
default: B(({ open:
|
|
2329
|
+
default: B(({ open: f }) => [
|
|
2316
2330
|
I(t(wt), {
|
|
2317
|
-
class:
|
|
2331
|
+
class: b(t(n))
|
|
2318
2332
|
}, {
|
|
2319
2333
|
default: B(() => [
|
|
2320
|
-
|
|
2321
|
-
e.icon ? (l(),
|
|
2334
|
+
r("div", On, [
|
|
2335
|
+
e.icon ? (l(), j(q(e.icon), {
|
|
2322
2336
|
key: 0,
|
|
2323
2337
|
class: "h-4 w-4"
|
|
2324
2338
|
})) : _("", !0),
|
|
2325
|
-
|
|
2339
|
+
r("span", null, S(e.title), 1)
|
|
2326
2340
|
]),
|
|
2327
|
-
I(t(
|
|
2328
|
-
class:
|
|
2341
|
+
I(t(Pe), {
|
|
2342
|
+
class: b([f ? "" : "rotate-180 transform", "h-5 w-5"])
|
|
2329
2343
|
}, null, 8, ["class"])
|
|
2330
2344
|
]),
|
|
2331
2345
|
_: 2
|
|
2332
2346
|
}, 1032, ["class"]),
|
|
2333
2347
|
I(t($t), {
|
|
2334
|
-
class:
|
|
2348
|
+
class: b(t(a))
|
|
2335
2349
|
}, {
|
|
2336
2350
|
default: B(() => [
|
|
2337
|
-
|
|
2338
|
-
R(
|
|
2339
|
-
|
|
2351
|
+
r("div", Mn, [
|
|
2352
|
+
R(o.$slots, "default", {}, () => [
|
|
2353
|
+
D("Panel contents")
|
|
2340
2354
|
])
|
|
2341
2355
|
])
|
|
2342
2356
|
]),
|
|
@@ -2349,79 +2363,79 @@ const Pn = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2349
2363
|
}
|
|
2350
2364
|
});
|
|
2351
2365
|
var K = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(K || {});
|
|
2352
|
-
const
|
|
2366
|
+
const wl = /* @__PURE__ */ V({
|
|
2353
2367
|
__name: "GridListToggle",
|
|
2354
2368
|
props: {
|
|
2355
2369
|
modelValue: null
|
|
2356
2370
|
},
|
|
2357
2371
|
emits: ["click", "update:modelValue"],
|
|
2358
2372
|
setup(e, { emit: s }) {
|
|
2359
|
-
const n = e,
|
|
2373
|
+
const n = e, a = u({
|
|
2360
2374
|
get: () => n.modelValue || K.Grid,
|
|
2361
|
-
set: (
|
|
2362
|
-
}),
|
|
2363
|
-
() =>
|
|
2364
|
-
),
|
|
2365
|
-
s("click",
|
|
2366
|
-
const
|
|
2367
|
-
|
|
2375
|
+
set: (f) => s("update:modelValue", f)
|
|
2376
|
+
}), o = u(
|
|
2377
|
+
() => a.value === K.Grid ? Je : Qe
|
|
2378
|
+
), i = (f) => {
|
|
2379
|
+
s("click", f);
|
|
2380
|
+
const c = a.value === K.Grid ? K.List : K.Grid;
|
|
2381
|
+
a.value = c;
|
|
2368
2382
|
};
|
|
2369
|
-
return (
|
|
2383
|
+
return (f, c) => (l(), m("button", {
|
|
2370
2384
|
class: "flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",
|
|
2371
|
-
onClick:
|
|
2385
|
+
onClick: i
|
|
2372
2386
|
}, [
|
|
2373
|
-
(l(),
|
|
2387
|
+
(l(), j(q(t(o)), { class: "h-6 w-6" }))
|
|
2374
2388
|
]));
|
|
2375
2389
|
}
|
|
2376
2390
|
});
|
|
2377
|
-
var
|
|
2378
|
-
function
|
|
2379
|
-
if (!
|
|
2391
|
+
var An = /* @__PURE__ */ ((e) => (e[e.Throttle = 0] = "Throttle", e[e.Debounce = 1] = "Debounce", e))(An || {}), de = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(de || {});
|
|
2392
|
+
function Dn(e, s) {
|
|
2393
|
+
if (!me)
|
|
2380
2394
|
return;
|
|
2381
2395
|
const {
|
|
2382
2396
|
wait: n = 100,
|
|
2383
|
-
throttleOrDebounce:
|
|
2397
|
+
throttleOrDebounce: a = 0
|
|
2384
2398
|
/* Throttle */
|
|
2385
|
-
} = s || {},
|
|
2386
|
-
ee(() => window.addEventListener("resize",
|
|
2399
|
+
} = s || {}, o = n ? a === 0 ? Ue(e, n) : Le(e, n) : e;
|
|
2400
|
+
ee(() => window.addEventListener("resize", o)), Be(() => window.removeEventListener("resize", o));
|
|
2387
2401
|
}
|
|
2388
|
-
function
|
|
2402
|
+
function $l(e) {
|
|
2389
2403
|
ee(() => {
|
|
2390
2404
|
window.addEventListener("beforeunload", e);
|
|
2391
|
-
}),
|
|
2405
|
+
}), Be(() => {
|
|
2392
2406
|
window.removeEventListener("beforeunload", e);
|
|
2393
2407
|
});
|
|
2394
2408
|
}
|
|
2395
|
-
function
|
|
2396
|
-
const { el: s, defaultDirection: n } = e,
|
|
2409
|
+
function Rn(e) {
|
|
2410
|
+
const { el: s, defaultDirection: n } = e, a = A(
|
|
2397
2411
|
X(n) ? 1 : n
|
|
2398
2412
|
/* Right */
|
|
2399
|
-
),
|
|
2400
|
-
const
|
|
2401
|
-
if (!X(
|
|
2402
|
-
return
|
|
2403
|
-
const i = t(s);
|
|
2404
|
-
return i != null && i.offsetWidth ? i.offsetWidth * 2 : void 0;
|
|
2405
|
-
}), r = () => {
|
|
2406
|
-
if (!he)
|
|
2407
|
-
return;
|
|
2413
|
+
), o = u(() => {
|
|
2414
|
+
const f = t(e.stopUpdatesBelowWidth);
|
|
2415
|
+
if (!X(f))
|
|
2416
|
+
return f;
|
|
2408
2417
|
const c = t(s);
|
|
2409
|
-
|
|
2418
|
+
return c != null && c.offsetWidth ? c.offsetWidth * 2 : void 0;
|
|
2419
|
+
}), i = () => {
|
|
2420
|
+
if (!me)
|
|
2421
|
+
return;
|
|
2422
|
+
const f = t(s);
|
|
2423
|
+
if (!f)
|
|
2410
2424
|
return;
|
|
2411
|
-
const
|
|
2412
|
-
|
|
2425
|
+
const c = f.getBoundingClientRect(), d = c.x + c.width > window.innerWidth, p = c.x < 0;
|
|
2426
|
+
d && p || !X(o.value) && window.innerWidth < o.value || (d ? a.value = 0 : p && (a.value = 1));
|
|
2413
2427
|
};
|
|
2414
|
-
return
|
|
2428
|
+
return Dn(() => i()), Y(
|
|
2415
2429
|
() => t(s),
|
|
2416
|
-
(
|
|
2417
|
-
|
|
2430
|
+
(f) => {
|
|
2431
|
+
f && i();
|
|
2418
2432
|
}
|
|
2419
2433
|
), {
|
|
2420
|
-
direction:
|
|
2421
|
-
recalculateDirection:
|
|
2434
|
+
direction: u(() => a.value),
|
|
2435
|
+
recalculateDirection: i
|
|
2422
2436
|
};
|
|
2423
2437
|
}
|
|
2424
|
-
const
|
|
2438
|
+
const Tn = ["onClick"], _l = /* @__PURE__ */ V({
|
|
2425
2439
|
__name: "Menu",
|
|
2426
2440
|
props: {
|
|
2427
2441
|
open: { type: Boolean },
|
|
@@ -2429,55 +2443,55 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2429
2443
|
},
|
|
2430
2444
|
emits: ["update:open", "chosen"],
|
|
2431
2445
|
setup(e, { emit: s }) {
|
|
2432
|
-
const n = e,
|
|
2433
|
-
el:
|
|
2434
|
-
var
|
|
2435
|
-
return ((
|
|
2446
|
+
const n = e, a = A(null), { direction: o } = Rn({
|
|
2447
|
+
el: u(() => {
|
|
2448
|
+
var g;
|
|
2449
|
+
return ((g = a.value) == null ? void 0 : g.el) || null;
|
|
2436
2450
|
}),
|
|
2437
|
-
defaultDirection:
|
|
2451
|
+
defaultDirection: de.Left,
|
|
2438
2452
|
stopUpdatesBelowWidth: 300
|
|
2439
|
-
}),
|
|
2453
|
+
}), i = A(null), f = A(!1), c = u({
|
|
2440
2454
|
get: () => n.open || !1,
|
|
2441
|
-
set: (
|
|
2442
|
-
}),
|
|
2443
|
-
const { active:
|
|
2444
|
-
return
|
|
2445
|
-
},
|
|
2446
|
-
s("chosen", { item:
|
|
2447
|
-
},
|
|
2448
|
-
var
|
|
2449
|
-
return (
|
|
2450
|
-
},
|
|
2451
|
-
const
|
|
2452
|
-
return
|
|
2455
|
+
set: (g) => s("update:open", g)
|
|
2456
|
+
}), d = (g) => {
|
|
2457
|
+
const { active: v, disabled: L } = g, P = ["group flex w-full items-center rounded-md px-2 py-2 text-sm"];
|
|
2458
|
+
return v ? P.push("bg-primary text-foreground-on-primary") : L ? P.push("text-foreground-disabled") : P.push("text-foreground"), P.join(" ");
|
|
2459
|
+
}, p = (g, v) => {
|
|
2460
|
+
s("chosen", { item: g, event: v });
|
|
2461
|
+
}, k = () => {
|
|
2462
|
+
var g;
|
|
2463
|
+
return (g = i.value) == null ? void 0 : g.el.click();
|
|
2464
|
+
}, y = (g) => {
|
|
2465
|
+
const v = !!g;
|
|
2466
|
+
return f.value = v, v;
|
|
2453
2467
|
};
|
|
2454
|
-
return Y(
|
|
2455
|
-
|
|
2456
|
-
}), Y(
|
|
2457
|
-
(
|
|
2458
|
-
}), (
|
|
2468
|
+
return Y(f, (g, v) => {
|
|
2469
|
+
g !== v && (c.value = g);
|
|
2470
|
+
}), Y(c, (g) => {
|
|
2471
|
+
(g && !f.value || !g && f.value) && k();
|
|
2472
|
+
}), (g, v) => (l(), j(t(_t), {
|
|
2459
2473
|
as: "div",
|
|
2460
2474
|
class: "relative inline-block"
|
|
2461
2475
|
}, {
|
|
2462
|
-
default: B(({ open:
|
|
2463
|
-
|
|
2476
|
+
default: B(({ open: L }) => [
|
|
2477
|
+
r("div", null, [
|
|
2464
2478
|
I(t(St), {
|
|
2465
2479
|
ref_key: "menuButton",
|
|
2466
|
-
ref:
|
|
2480
|
+
ref: i,
|
|
2467
2481
|
class: "hidden",
|
|
2468
|
-
onClick:
|
|
2482
|
+
onClick: v[0] || (v[0] = Ie(() => {
|
|
2469
2483
|
}, ["stop", "prevent"]))
|
|
2470
2484
|
}, null, 512),
|
|
2471
|
-
|
|
2472
|
-
class:
|
|
2485
|
+
r("div", {
|
|
2486
|
+
class: b(L ? "pointer-events-none" : "")
|
|
2473
2487
|
}, [
|
|
2474
|
-
R(
|
|
2475
|
-
toggle:
|
|
2476
|
-
open:
|
|
2488
|
+
R(g.$slots, "default", {
|
|
2489
|
+
toggle: k,
|
|
2490
|
+
open: y(L)
|
|
2477
2491
|
})
|
|
2478
2492
|
], 2)
|
|
2479
2493
|
]),
|
|
2480
|
-
I(
|
|
2494
|
+
I(fe, {
|
|
2481
2495
|
"enter-active-class": "transition duration-100 ease-out",
|
|
2482
2496
|
"enter-from-class": "transform scale-95 opacity-0",
|
|
2483
2497
|
"enter-to-class": "transform scale-100 opacity-100",
|
|
@@ -2488,30 +2502,30 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2488
2502
|
default: B(() => [
|
|
2489
2503
|
I(t(It), {
|
|
2490
2504
|
ref_key: "menuItems",
|
|
2491
|
-
ref:
|
|
2492
|
-
class:
|
|
2505
|
+
ref: a,
|
|
2506
|
+
class: b([
|
|
2493
2507
|
"absolute mt-2 w-56 origin-top-right divide-y divide-outline-3 rounded-md bg-foundation shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none z-40",
|
|
2494
|
-
t(
|
|
2508
|
+
t(o) === t(de).Left ? "right-0" : ""
|
|
2495
2509
|
])
|
|
2496
2510
|
}, {
|
|
2497
2511
|
default: B(() => [
|
|
2498
|
-
(l(!0),
|
|
2512
|
+
(l(!0), m(U, null, H(e.items, (P, $) => (l(), m("div", {
|
|
2499
2513
|
key: $,
|
|
2500
2514
|
class: "px-1 py-1"
|
|
2501
2515
|
}, [
|
|
2502
|
-
(l(!0),
|
|
2503
|
-
key:
|
|
2504
|
-
disabled:
|
|
2516
|
+
(l(!0), m(U, null, H(P, (w) => (l(), j(t(Bt), {
|
|
2517
|
+
key: w.id,
|
|
2518
|
+
disabled: w.disabled
|
|
2505
2519
|
}, {
|
|
2506
|
-
default: B(({ active:
|
|
2507
|
-
|
|
2508
|
-
class:
|
|
2509
|
-
onClick: (
|
|
2520
|
+
default: B(({ active: C, disabled: E }) => [
|
|
2521
|
+
r("button", {
|
|
2522
|
+
class: b(d({ active: C, disabled: E })),
|
|
2523
|
+
onClick: (h) => p(w, h)
|
|
2510
2524
|
}, [
|
|
2511
|
-
R(
|
|
2512
|
-
|
|
2525
|
+
R(g.$slots, "item", { item: w }, () => [
|
|
2526
|
+
D(S(w.title), 1)
|
|
2513
2527
|
])
|
|
2514
|
-
], 10,
|
|
2528
|
+
], 10, Tn)
|
|
2515
2529
|
]),
|
|
2516
2530
|
_: 2
|
|
2517
2531
|
}, 1032, ["disabled"]))), 128))
|
|
@@ -2526,33 +2540,33 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2526
2540
|
_: 3
|
|
2527
2541
|
}));
|
|
2528
2542
|
}
|
|
2529
|
-
}),
|
|
2543
|
+
}), zn = { class: "flex flex-col space-y-4" }, Fn = { class: "flex space-x-6" }, Sl = /* @__PURE__ */ V({
|
|
2530
2544
|
__name: "Tabs",
|
|
2531
2545
|
props: {
|
|
2532
2546
|
items: null
|
|
2533
2547
|
},
|
|
2534
2548
|
setup(e) {
|
|
2535
|
-
const s = e, n = A(null),
|
|
2536
|
-
n.value =
|
|
2549
|
+
const s = e, n = A(null), a = u(() => n.value && s.items.find((i) => i.id === n.value) || s.items[0]), o = (i) => {
|
|
2550
|
+
n.value = i.id;
|
|
2537
2551
|
};
|
|
2538
|
-
return (
|
|
2539
|
-
|
|
2540
|
-
(l(!0),
|
|
2541
|
-
key:
|
|
2552
|
+
return (i, f) => (l(), m("div", zn, [
|
|
2553
|
+
r("div", Fn, [
|
|
2554
|
+
(l(!0), m(U, null, H(e.items, (c) => (l(), j(oe, {
|
|
2555
|
+
key: c.id,
|
|
2542
2556
|
link: "",
|
|
2543
|
-
color: t(
|
|
2544
|
-
onClick: (
|
|
2557
|
+
color: t(a).id === c.id ? "default" : "secondary",
|
|
2558
|
+
onClick: (d) => o(c)
|
|
2545
2559
|
}, {
|
|
2546
2560
|
default: B(() => [
|
|
2547
|
-
|
|
2561
|
+
D(S(c.title), 1)
|
|
2548
2562
|
]),
|
|
2549
2563
|
_: 2
|
|
2550
2564
|
}, 1032, ["color", "onClick"]))), 128))
|
|
2551
2565
|
]),
|
|
2552
|
-
R(
|
|
2566
|
+
R(i.$slots, "default", { activeItem: t(a) })
|
|
2553
2567
|
]));
|
|
2554
2568
|
}
|
|
2555
|
-
}),
|
|
2569
|
+
}), En = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Wn = { class: "inline-flex items-center space-x-1" }, Un = /* @__PURE__ */ r("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), qn = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Hn = { class: "inline-flex items-center space-x-1" }, Gn = /* @__PURE__ */ r("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), Il = /* @__PURE__ */ V({
|
|
2556
2570
|
__name: "InfiniteLoading",
|
|
2557
2571
|
props: {
|
|
2558
2572
|
settings: null,
|
|
@@ -2561,44 +2575,44 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2561
2575
|
emits: ["infinite"],
|
|
2562
2576
|
setup(e) {
|
|
2563
2577
|
const s = A(null), n = A(!1);
|
|
2564
|
-
return
|
|
2565
|
-
const
|
|
2566
|
-
var
|
|
2567
|
-
(
|
|
2578
|
+
return me && ee(() => {
|
|
2579
|
+
const a = setInterval(() => {
|
|
2580
|
+
var o;
|
|
2581
|
+
(o = s.value) != null && o.isConnected && (n.value = !0, clearInterval(a));
|
|
2568
2582
|
}, 200);
|
|
2569
|
-
}), (
|
|
2583
|
+
}), (a, o) => (l(), m("div", {
|
|
2570
2584
|
ref_key: "wrapper",
|
|
2571
2585
|
ref: s
|
|
2572
2586
|
}, [
|
|
2573
|
-
n.value ? (l(),
|
|
2574
|
-
onInfinite:
|
|
2587
|
+
n.value ? (l(), j(t(Pt), ne({ key: 0 }, a.$props.settings || {}, {
|
|
2588
|
+
onInfinite: o[0] || (o[0] = (i) => a.$emit("infinite", i))
|
|
2575
2589
|
}), {
|
|
2576
2590
|
spinner: B(() => [
|
|
2577
|
-
I(
|
|
2591
|
+
I(De, {
|
|
2578
2592
|
loading: !0,
|
|
2579
2593
|
class: "my-2"
|
|
2580
2594
|
})
|
|
2581
2595
|
]),
|
|
2582
2596
|
complete: B(() => [
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
I(t(
|
|
2586
|
-
|
|
2597
|
+
r("div", En, [
|
|
2598
|
+
r("div", Wn, [
|
|
2599
|
+
I(t(nt), { class: "w-5 h-5 text-success" }),
|
|
2600
|
+
Un
|
|
2587
2601
|
])
|
|
2588
2602
|
])
|
|
2589
2603
|
]),
|
|
2590
|
-
error: B(({ retry:
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
I(t(
|
|
2594
|
-
|
|
2604
|
+
error: B(({ retry: i }) => [
|
|
2605
|
+
r("div", qn, [
|
|
2606
|
+
r("div", Hn, [
|
|
2607
|
+
I(t(lt), { class: "w-5 h-5 text-danger" }),
|
|
2608
|
+
Gn
|
|
2595
2609
|
]),
|
|
2596
|
-
e.allowRetry ? (l(),
|
|
2610
|
+
e.allowRetry ? (l(), j(oe, {
|
|
2597
2611
|
key: 0,
|
|
2598
|
-
onClick:
|
|
2612
|
+
onClick: i
|
|
2599
2613
|
}, {
|
|
2600
2614
|
default: B(() => [
|
|
2601
|
-
|
|
2615
|
+
D("Retry")
|
|
2602
2616
|
]),
|
|
2603
2617
|
_: 2
|
|
2604
2618
|
}, 1032, ["onClick"])) : _("", !0)
|
|
@@ -2608,10 +2622,10 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2608
2622
|
}, 16)) : _("", !0)
|
|
2609
2623
|
], 512));
|
|
2610
2624
|
}
|
|
2611
|
-
}),
|
|
2625
|
+
}), Kn = { class: "relative group" }, Xn = {
|
|
2612
2626
|
key: 0,
|
|
2613
2627
|
class: "absolute -inset-1 bg-blue-300 dark:bg-blue-500 opacity-5 dark:opacity-0 rounded-md blur-sm group-hover:opacity-60 dark:group-hover:opacity-30 transition duration-500"
|
|
2614
|
-
},
|
|
2628
|
+
}, Bl = /* @__PURE__ */ V({
|
|
2615
2629
|
__name: "Panel",
|
|
2616
2630
|
props: {
|
|
2617
2631
|
/**
|
|
@@ -2646,82 +2660,235 @@ const zn = ["onClick"], wl = /* @__PURE__ */ O({
|
|
|
2646
2660
|
},
|
|
2647
2661
|
emits: ["submit"],
|
|
2648
2662
|
setup(e, { emit: s }) {
|
|
2649
|
-
const n = e,
|
|
2663
|
+
const n = e, a = u(
|
|
2650
2664
|
() => n.customPadding ? "" : "px-4 py-4 sm:px-6"
|
|
2651
|
-
),
|
|
2665
|
+
), o = u(
|
|
2652
2666
|
() => n.customPadding ? "" : "px-4 py-4 sm:p-6"
|
|
2653
|
-
),
|
|
2654
|
-
const
|
|
2655
|
-
return n.noShadow ||
|
|
2667
|
+
), i = u(() => {
|
|
2668
|
+
const f = ["rounded-lg"];
|
|
2669
|
+
return n.noShadow || f.push("shadow"), n.ring && f.push("ring-outline-2 hover:ring-2"), f.join(" ");
|
|
2656
2670
|
});
|
|
2657
|
-
return (
|
|
2658
|
-
e.fancyGlow ? (l(),
|
|
2659
|
-
(l(),
|
|
2660
|
-
class:
|
|
2671
|
+
return (f, c) => (l(), m("div", Kn, [
|
|
2672
|
+
e.fancyGlow ? (l(), m("div", Xn)) : _("", !0),
|
|
2673
|
+
(l(), j(q(e.form ? "form" : "div"), {
|
|
2674
|
+
class: b([
|
|
2661
2675
|
"relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",
|
|
2662
|
-
t(
|
|
2676
|
+
t(i)
|
|
2663
2677
|
]),
|
|
2664
|
-
onSubmit:
|
|
2678
|
+
onSubmit: c[0] || (c[0] = (d) => s("submit", d))
|
|
2665
2679
|
}, {
|
|
2666
2680
|
default: B(() => [
|
|
2667
|
-
|
|
2681
|
+
f.$slots.header ? (l(), m("div", {
|
|
2668
2682
|
key: 0,
|
|
2669
|
-
class:
|
|
2683
|
+
class: b(t(a))
|
|
2670
2684
|
}, [
|
|
2671
|
-
R(
|
|
2685
|
+
R(f.$slots, "header")
|
|
2672
2686
|
], 2)) : _("", !0),
|
|
2673
|
-
|
|
2674
|
-
class:
|
|
2687
|
+
r("div", {
|
|
2688
|
+
class: b(["grow", t(o)])
|
|
2675
2689
|
}, [
|
|
2676
|
-
R(
|
|
2690
|
+
R(f.$slots, "default")
|
|
2677
2691
|
], 2),
|
|
2678
|
-
|
|
2692
|
+
f.$slots.footer ? (l(), m("div", {
|
|
2679
2693
|
key: 1,
|
|
2680
|
-
class:
|
|
2694
|
+
class: b(t(a))
|
|
2681
2695
|
}, [
|
|
2682
|
-
R(
|
|
2696
|
+
R(f.$slots, "footer")
|
|
2683
2697
|
], 2)) : _("", !0)
|
|
2684
2698
|
]),
|
|
2685
2699
|
_: 3
|
|
2686
2700
|
}, 40, ["class"]))
|
|
2687
2701
|
]));
|
|
2688
2702
|
}
|
|
2703
|
+
}), Nn = { class: "flex-shrink-0" }, Jn = {
|
|
2704
|
+
key: 0,
|
|
2705
|
+
class: "mt-2 text-sm"
|
|
2706
|
+
}, Qn = /* @__PURE__ */ r("span", { class: "sr-only" }, "Dismiss", -1), Ll = /* @__PURE__ */ V({
|
|
2707
|
+
__name: "Alert",
|
|
2708
|
+
props: {
|
|
2709
|
+
color: { default: "success" },
|
|
2710
|
+
withDismiss: { type: Boolean },
|
|
2711
|
+
actions: null
|
|
2712
|
+
},
|
|
2713
|
+
emits: ["dismiss"],
|
|
2714
|
+
setup(e) {
|
|
2715
|
+
const s = e, n = Se(), a = u(() => !!n.description), o = u(() => {
|
|
2716
|
+
const d = [];
|
|
2717
|
+
switch (d.push(a.value ? "p-4" : "p-2"), s.color) {
|
|
2718
|
+
case "success":
|
|
2719
|
+
d.push("bg-success-lighter border-l-4 border-success");
|
|
2720
|
+
break;
|
|
2721
|
+
case "info":
|
|
2722
|
+
d.push("bg-info-lighter border-l-4 border-info");
|
|
2723
|
+
break;
|
|
2724
|
+
case "danger":
|
|
2725
|
+
d.push("bg-danger-lighter border-l-4 border-danger");
|
|
2726
|
+
break;
|
|
2727
|
+
case "warning":
|
|
2728
|
+
d.push("bg-warning-lighter border-l-4 border-warning");
|
|
2729
|
+
break;
|
|
2730
|
+
}
|
|
2731
|
+
return d.join(" ");
|
|
2732
|
+
}), i = u(() => {
|
|
2733
|
+
const d = [];
|
|
2734
|
+
switch (s.color) {
|
|
2735
|
+
case "success":
|
|
2736
|
+
d.push("text-success-darker");
|
|
2737
|
+
break;
|
|
2738
|
+
case "info":
|
|
2739
|
+
d.push("text-info-darker");
|
|
2740
|
+
break;
|
|
2741
|
+
case "danger":
|
|
2742
|
+
d.push("text-danger-darker");
|
|
2743
|
+
break;
|
|
2744
|
+
case "warning":
|
|
2745
|
+
d.push("text-warning-darker");
|
|
2746
|
+
break;
|
|
2747
|
+
}
|
|
2748
|
+
return d.join(" ");
|
|
2749
|
+
}), f = u(() => {
|
|
2750
|
+
const d = [];
|
|
2751
|
+
switch (s.color) {
|
|
2752
|
+
case "success":
|
|
2753
|
+
d.push("text-success");
|
|
2754
|
+
break;
|
|
2755
|
+
case "info":
|
|
2756
|
+
d.push("text-info");
|
|
2757
|
+
break;
|
|
2758
|
+
case "danger":
|
|
2759
|
+
d.push("text-danger");
|
|
2760
|
+
break;
|
|
2761
|
+
case "warning":
|
|
2762
|
+
d.push("text-warning");
|
|
2763
|
+
break;
|
|
2764
|
+
}
|
|
2765
|
+
return d.join(" ");
|
|
2766
|
+
}), c = u(() => {
|
|
2767
|
+
const d = [];
|
|
2768
|
+
switch (s.color) {
|
|
2769
|
+
case "success":
|
|
2770
|
+
d.push("bg-success-lighter ring-success");
|
|
2771
|
+
break;
|
|
2772
|
+
case "info":
|
|
2773
|
+
d.push("bg-info-lighter ring-info");
|
|
2774
|
+
break;
|
|
2775
|
+
case "danger":
|
|
2776
|
+
d.push("bg-danger-lighter ring-danger");
|
|
2777
|
+
break;
|
|
2778
|
+
case "warning":
|
|
2779
|
+
d.push("bg-warning-lighter ring-warning");
|
|
2780
|
+
break;
|
|
2781
|
+
}
|
|
2782
|
+
return d.join(" ");
|
|
2783
|
+
});
|
|
2784
|
+
return (d, p) => {
|
|
2785
|
+
var k;
|
|
2786
|
+
return l(), m("div", {
|
|
2787
|
+
class: b(["rounded-md", [t(o), t(i)]])
|
|
2788
|
+
}, [
|
|
2789
|
+
r("div", {
|
|
2790
|
+
class: b(["flex", [t(a) ? "" : "items-center space-x-2"]])
|
|
2791
|
+
}, [
|
|
2792
|
+
r("div", Nn, [
|
|
2793
|
+
I(t(je), {
|
|
2794
|
+
class: b(["h-5 w-5", t(f)]),
|
|
2795
|
+
"aria-hidden": "true"
|
|
2796
|
+
}, null, 8, ["class"])
|
|
2797
|
+
]),
|
|
2798
|
+
r("div", {
|
|
2799
|
+
class: b(["ml-3 grow", [t(a) ? "" : "flex items-center space-x-2"]])
|
|
2800
|
+
}, [
|
|
2801
|
+
r("h3", {
|
|
2802
|
+
class: b(["text-sm", [t(a) ? "font-medium" : ""]])
|
|
2803
|
+
}, [
|
|
2804
|
+
R(d.$slots, "title", {}, () => [
|
|
2805
|
+
D("Title")
|
|
2806
|
+
])
|
|
2807
|
+
], 2),
|
|
2808
|
+
t(a) ? (l(), m("div", Jn, [
|
|
2809
|
+
R(d.$slots, "description", {}, () => [
|
|
2810
|
+
D(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
|
|
2811
|
+
])
|
|
2812
|
+
])) : _("", !0),
|
|
2813
|
+
r("div", {
|
|
2814
|
+
class: b([t(a) ? (k = e.actions) != null && k.length ? "mt-4" : "" : "grow flex"])
|
|
2815
|
+
}, [
|
|
2816
|
+
r("div", {
|
|
2817
|
+
class: b(["flex", ["space-x-2", t(a) ? "" : "grow justify-end"]])
|
|
2818
|
+
}, [
|
|
2819
|
+
(l(!0), m(U, null, H(e.actions || [], (y, g) => (l(), j(oe, {
|
|
2820
|
+
key: g,
|
|
2821
|
+
color: e.color,
|
|
2822
|
+
size: "sm",
|
|
2823
|
+
to: y.url,
|
|
2824
|
+
external: y.externalUrl || !1,
|
|
2825
|
+
onClick: (v) => y.onClick || t(qe)
|
|
2826
|
+
}, {
|
|
2827
|
+
default: B(() => [
|
|
2828
|
+
D(S(y.title), 1)
|
|
2829
|
+
]),
|
|
2830
|
+
_: 2
|
|
2831
|
+
}, 1032, ["color", "to", "external", "onClick"]))), 128))
|
|
2832
|
+
], 2)
|
|
2833
|
+
], 2)
|
|
2834
|
+
], 2),
|
|
2835
|
+
e.withDismiss ? (l(), m("div", {
|
|
2836
|
+
key: 0,
|
|
2837
|
+
class: b(["flex", [t(a) ? "items-start" : "items-center"]])
|
|
2838
|
+
}, [
|
|
2839
|
+
r("button", {
|
|
2840
|
+
type: "button",
|
|
2841
|
+
class: b(["inline-flex rounded-md focus:outline-none focus:ring-2", t(c)]),
|
|
2842
|
+
onClick: p[0] || (p[0] = (y) => d.$emit("dismiss"))
|
|
2843
|
+
}, [
|
|
2844
|
+
Qn,
|
|
2845
|
+
I(t(ae), {
|
|
2846
|
+
class: "h-5 w-5",
|
|
2847
|
+
"aria-hidden": "true"
|
|
2848
|
+
})
|
|
2849
|
+
], 2)
|
|
2850
|
+
], 2)) : _("", !0)
|
|
2851
|
+
], 2)
|
|
2852
|
+
], 2);
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2689
2855
|
});
|
|
2690
2856
|
export {
|
|
2857
|
+
Ll as CommonAlert,
|
|
2691
2858
|
Kt as CommonBadge,
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2859
|
+
De as CommonLoadingBar,
|
|
2860
|
+
fl as CommonStepsBullet,
|
|
2861
|
+
dl as CommonStepsNumber,
|
|
2695
2862
|
Ot as CommonTextLink,
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2863
|
+
oe as FormButton,
|
|
2864
|
+
pl as FormCardButton,
|
|
2865
|
+
hl as FormCheckbox,
|
|
2866
|
+
kn as FormSelectBase,
|
|
2867
|
+
bl as FormSelectSourceApps,
|
|
2868
|
+
ml as FormTextArea,
|
|
2869
|
+
gl as FormTextInput,
|
|
2870
|
+
cl as GlobalToastRenderer,
|
|
2704
2871
|
K as GridListToggleValue,
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2872
|
+
de as HorizontalDirection,
|
|
2873
|
+
Il as InfiniteLoading,
|
|
2874
|
+
kl as LayoutDialog,
|
|
2875
|
+
Cl as LayoutDisclosure,
|
|
2876
|
+
wl as LayoutGridListToggle,
|
|
2877
|
+
_l as LayoutMenu,
|
|
2878
|
+
Bl as LayoutPanel,
|
|
2879
|
+
Sl as LayoutTabs,
|
|
2713
2880
|
Q as ModifierKeys,
|
|
2714
|
-
|
|
2881
|
+
Cn as SourceAppBadge,
|
|
2715
2882
|
J as TailwindBreakpoints,
|
|
2716
|
-
|
|
2883
|
+
An as ThrottleOrDebounce,
|
|
2717
2884
|
N as ToastNotificationType,
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2885
|
+
yl as ValidationHelpers,
|
|
2886
|
+
ce as clientOs,
|
|
2887
|
+
vl as getKeyboardShortcutTitle,
|
|
2888
|
+
xl as onKeyboardShortcut,
|
|
2889
|
+
tn as useFormSelectChildInternals,
|
|
2890
|
+
$l as useOnBeforeWindowUnload,
|
|
2891
|
+
Rn as useResponsiveHorizontalDirectionCalculation,
|
|
2892
|
+
Dn as useWindowResizeHandler,
|
|
2893
|
+
en as useWrappingContainerHiddenCount
|
|
2727
2894
|
};
|