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