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