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