@speckle/ui-components 2.14.4 → 2.14.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/form/Button.vue.d.ts +15 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.js +685 -678
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/lib.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { isObjectLike as ge, clamp as be, isString as Q, isUndefined as se, isArray as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { defineComponent as A, resolveDynamicComponent as q, computed as r, openBlock as n, createBlock as j, unref as t, normalizeClass as x, withCtx as T, createCommentVNode as S, renderSlot as E, createTextVNode as z, createElementBlock as f, createElementVNode as i, createVNode as P, Transition as ye, toDisplayString as $, toRefs as G, Fragment as U, renderList as Y, pushScopeId as ve, popScopeId as xe, ref as R, mergeProps as ae, onMounted as ke, withDirectives as J, isRef as Z, vModelText as Ce, useSlots as Le, vModelDynamic as je, watch as me, withModifiers as Oe, normalizeStyle as te } from "vue";
|
|
2
|
+
import { isObjectLike as ge, clamp as be, isString as Q, isUndefined as se, isArray as D, debounce as Pe } from "lodash";
|
|
3
|
+
import { ArrowPathIcon as Me, ChevronUpIcon as Ae, ChevronDownIcon as Fe, XMarkIcon as Te, MagnifyingGlassIcon as Re, CheckIcon as ze } from "@heroicons/vue/24/solid";
|
|
4
|
+
import { CheckCircleIcon as De, XCircleIcon as Ee, ExclamationCircleIcon as qe, InformationCircleIcon as Ue } from "@heroicons/vue/24/outline";
|
|
5
|
+
import { XMarkIcon as oe, CheckIcon as We, CheckCircleIcon as He, ExclamationCircleIcon as we, EnvelopeIcon as Ke, KeyIcon as Xe } from "@heroicons/vue/20/solid";
|
|
5
6
|
import { useField as re } from "vee-validate";
|
|
6
7
|
import { nanoid as ie } from "nanoid";
|
|
7
|
-
import { isNullOrUndefined as
|
|
8
|
-
import { useResizeObserver as
|
|
9
|
-
import { Listbox as
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
const at = {
|
|
8
|
+
import { isNullOrUndefined as Ne, SourceApps as Ge, getClientOperatingSystem as Je, OperatingSystem as le } from "@speckle/shared";
|
|
9
|
+
import { useResizeObserver as Qe, useMutationObserver as Ye, onKeyDown as Ze } from "@vueuse/core";
|
|
10
|
+
import { Listbox as et, ListboxLabel as tt, ListboxButton as st, ListboxOptions as lt, ListboxOption as nt } from "@headlessui/vue";
|
|
11
|
+
import { directive as at } from "vue-tippy";
|
|
12
|
+
const ot = {
|
|
13
13
|
key: 2,
|
|
14
14
|
style: { margin: "0 !important", width: "0.01px" }
|
|
15
|
-
},
|
|
15
|
+
}, rt = /* @__PURE__ */ A({
|
|
16
16
|
__name: "Button",
|
|
17
17
|
props: {
|
|
18
18
|
/**
|
|
@@ -129,128 +129,135 @@ const at = {
|
|
|
129
129
|
linkComponent: {
|
|
130
130
|
type: [Object, Function],
|
|
131
131
|
default: null
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Disables the button and shows a spinning loader
|
|
135
|
+
*/
|
|
136
|
+
loading: {
|
|
137
|
+
type: Boolean,
|
|
138
|
+
default: !1
|
|
132
139
|
}
|
|
133
140
|
},
|
|
134
141
|
emits: ["click"],
|
|
135
142
|
setup(e, { emit: s }) {
|
|
136
|
-
const l = e, u =
|
|
143
|
+
const l = e, u = q("NuxtLink"), d = q("RouterLink"), c = r(() => l.linkComponent ? l.linkComponent : ge(u) ? u : ge(d) ? d : "a"), v = r(() => {
|
|
137
144
|
if (!l.to)
|
|
138
145
|
return l.submit ? "submit" : "button";
|
|
139
|
-
}),
|
|
140
|
-
const
|
|
141
|
-
if (
|
|
142
|
-
|
|
146
|
+
}), h = r(() => l.disabled || l.loading), b = r(() => l.loading ? Me : l.iconLeft), o = r(() => {
|
|
147
|
+
const a = [];
|
|
148
|
+
if (a.push("border-2"), h.value)
|
|
149
|
+
a.push(
|
|
143
150
|
l.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
|
|
144
151
|
);
|
|
145
152
|
else
|
|
146
153
|
switch (l.color) {
|
|
147
154
|
case "invert":
|
|
148
|
-
|
|
155
|
+
a.push(
|
|
149
156
|
l.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
|
|
150
157
|
);
|
|
151
158
|
break;
|
|
152
159
|
case "card":
|
|
153
|
-
|
|
160
|
+
a.push(
|
|
154
161
|
l.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
|
|
155
162
|
);
|
|
156
163
|
break;
|
|
157
164
|
case "danger":
|
|
158
|
-
|
|
165
|
+
a.push(l.outlined ? "border-danger" : "bg-danger border-danger");
|
|
159
166
|
break;
|
|
160
167
|
case "secondary":
|
|
161
|
-
|
|
168
|
+
a.push(
|
|
162
169
|
l.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
|
|
163
170
|
);
|
|
164
171
|
break;
|
|
165
172
|
case "warning":
|
|
166
|
-
|
|
173
|
+
a.push(l.outlined ? "border-warning" : "bg-warning border-warning");
|
|
167
174
|
break;
|
|
168
175
|
case "success":
|
|
169
|
-
|
|
176
|
+
a.push(l.outlined ? "border-success" : "bg-success border-success");
|
|
170
177
|
break;
|
|
171
178
|
case "default":
|
|
172
179
|
default:
|
|
173
|
-
|
|
180
|
+
a.push(
|
|
174
181
|
l.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
|
|
175
182
|
);
|
|
176
183
|
break;
|
|
177
184
|
}
|
|
178
|
-
return
|
|
179
|
-
}),
|
|
180
|
-
const
|
|
185
|
+
return a.join(" ");
|
|
186
|
+
}), w = r(() => {
|
|
187
|
+
const a = [];
|
|
181
188
|
if (!l.text && !l.link)
|
|
182
|
-
if (
|
|
183
|
-
|
|
189
|
+
if (h.value)
|
|
190
|
+
a.push(
|
|
184
191
|
(l.outlined, "text-foreground-disabled")
|
|
185
192
|
);
|
|
186
193
|
else
|
|
187
194
|
switch (l.color) {
|
|
188
195
|
case "invert":
|
|
189
|
-
|
|
196
|
+
a.push(
|
|
190
197
|
l.outlined ? "text-foundation dark:text-foreground" : "text-primary"
|
|
191
198
|
);
|
|
192
199
|
break;
|
|
193
200
|
case "card":
|
|
194
|
-
|
|
201
|
+
a.push((l.outlined, "text-foreground"));
|
|
195
202
|
break;
|
|
196
203
|
case "danger":
|
|
197
|
-
|
|
204
|
+
a.push(
|
|
198
205
|
l.outlined ? "text-danger" : "text-foundation dark:text-foreground"
|
|
199
206
|
);
|
|
200
207
|
break;
|
|
201
208
|
case "warning":
|
|
202
|
-
|
|
209
|
+
a.push(
|
|
203
210
|
l.outlined ? "text-warning" : "text-foundation dark:text-foreground"
|
|
204
211
|
);
|
|
205
212
|
break;
|
|
206
213
|
case "success":
|
|
207
|
-
|
|
214
|
+
a.push(
|
|
208
215
|
l.outlined ? "text-success" : "text-foundation dark:text-foreground"
|
|
209
216
|
);
|
|
210
217
|
break;
|
|
211
218
|
case "secondary":
|
|
212
|
-
|
|
219
|
+
a.push(
|
|
213
220
|
(l.outlined, "text-foreground hover:text-primary")
|
|
214
221
|
);
|
|
215
222
|
break;
|
|
216
223
|
case "default":
|
|
217
224
|
default:
|
|
218
|
-
|
|
225
|
+
a.push(
|
|
219
226
|
l.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
|
|
220
227
|
);
|
|
221
228
|
break;
|
|
222
229
|
}
|
|
223
230
|
else
|
|
224
|
-
|
|
231
|
+
h.value ? a.push("text-foreground-disabled") : l.color === "invert" ? a.push(
|
|
225
232
|
"text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"
|
|
226
|
-
) : l.color === "secondary" ?
|
|
227
|
-
return
|
|
228
|
-
}),
|
|
229
|
-
const
|
|
230
|
-
return
|
|
231
|
-
}),
|
|
232
|
-
const
|
|
233
|
-
if (!
|
|
233
|
+
) : l.color === "secondary" ? a.push("text-foreground-2 hover:text-primary-focus") : l.color === "success" ? a.push("text-success") : l.color === "warning" ? a.push("text-warning") : l.color === "danger" ? a.push("text-danger") : a.push("text-primary hover:text-primary-focus");
|
|
234
|
+
return a.join(" ");
|
|
235
|
+
}), p = r(() => {
|
|
236
|
+
const a = [];
|
|
237
|
+
return a.push(l.rounded ? "rounded-full" : "rounded-md"), a.join(" ");
|
|
238
|
+
}), g = r(() => {
|
|
239
|
+
const a = [];
|
|
240
|
+
if (!h.value)
|
|
234
241
|
switch (l.color) {
|
|
235
242
|
case "invert":
|
|
236
|
-
|
|
243
|
+
a.push("hover:ring-4 ring-white/50");
|
|
237
244
|
break;
|
|
238
245
|
case "danger":
|
|
239
|
-
|
|
246
|
+
a.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");
|
|
240
247
|
break;
|
|
241
248
|
case "warning":
|
|
242
|
-
|
|
249
|
+
a.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");
|
|
243
250
|
break;
|
|
244
251
|
case "success":
|
|
245
|
-
|
|
252
|
+
a.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");
|
|
246
253
|
break;
|
|
247
254
|
case "default":
|
|
248
255
|
default:
|
|
249
|
-
|
|
256
|
+
a.push("hover:ring-2");
|
|
250
257
|
break;
|
|
251
258
|
}
|
|
252
|
-
return
|
|
253
|
-
}),
|
|
259
|
+
return a.join(" ");
|
|
260
|
+
}), k = r(() => {
|
|
254
261
|
switch (l.size) {
|
|
255
262
|
case "xs":
|
|
256
263
|
return "h-5 text-xs font-medium xxx-tracking-wide";
|
|
@@ -264,7 +271,7 @@ const at = {
|
|
|
264
271
|
case "base":
|
|
265
272
|
return "h-8 text-base font-medium xxx-tracking-wide";
|
|
266
273
|
}
|
|
267
|
-
}),
|
|
274
|
+
}), L = r(() => {
|
|
268
275
|
switch (l.size) {
|
|
269
276
|
case "xs":
|
|
270
277
|
return "px-1";
|
|
@@ -278,77 +285,77 @@ const at = {
|
|
|
278
285
|
case "base":
|
|
279
286
|
return "px-3";
|
|
280
287
|
}
|
|
281
|
-
}),
|
|
282
|
-
const
|
|
283
|
-
return l.fullWidth &&
|
|
284
|
-
}),
|
|
285
|
-
const
|
|
286
|
-
return !
|
|
288
|
+
}), y = r(() => {
|
|
289
|
+
const a = [];
|
|
290
|
+
return l.fullWidth && a.push("w-full"), h.value && a.push("cursor-not-allowed"), a.join(" ");
|
|
291
|
+
}), _ = r(() => {
|
|
292
|
+
const a = [];
|
|
293
|
+
return !h.value && !l.link && !l.text && a.push("active:scale-[0.97]"), !h.value && l.link && a.push(
|
|
287
294
|
"underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"
|
|
288
|
-
),
|
|
289
|
-
}),
|
|
290
|
-
const
|
|
295
|
+
), a.join(" ");
|
|
296
|
+
}), I = r(() => {
|
|
297
|
+
const a = l.link || l.text;
|
|
291
298
|
return [
|
|
292
299
|
"transition inline-flex justify-center items-center space-x-2 outline-none select-none",
|
|
300
|
+
y.value,
|
|
293
301
|
k.value,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
V.value
|
|
302
|
+
w.value,
|
|
303
|
+
a ? "" : o.value,
|
|
304
|
+
a ? "" : p.value,
|
|
305
|
+
a ? "" : g.value,
|
|
306
|
+
l.link ? "" : L.value,
|
|
307
|
+
_.value
|
|
301
308
|
].join(" ");
|
|
302
|
-
}),
|
|
303
|
-
const
|
|
304
|
-
switch (l.size) {
|
|
309
|
+
}), C = r(() => {
|
|
310
|
+
const a = [""];
|
|
311
|
+
switch (l.loading && a.push("animate-spin"), l.size) {
|
|
305
312
|
case "xs":
|
|
306
|
-
|
|
313
|
+
a.push("h-3 w-3");
|
|
307
314
|
break;
|
|
308
315
|
case "sm":
|
|
309
|
-
|
|
316
|
+
a.push("h-4 w-4");
|
|
310
317
|
break;
|
|
311
318
|
case "lg":
|
|
312
|
-
|
|
319
|
+
a.push("h-6 w-6");
|
|
313
320
|
break;
|
|
314
321
|
case "xl":
|
|
315
|
-
|
|
322
|
+
a.push("h-8 w-8");
|
|
316
323
|
break;
|
|
317
324
|
case "base":
|
|
318
325
|
default:
|
|
319
|
-
|
|
326
|
+
a.push("h-5 w-5");
|
|
320
327
|
break;
|
|
321
328
|
}
|
|
322
|
-
return
|
|
323
|
-
}),
|
|
324
|
-
if (
|
|
325
|
-
|
|
329
|
+
return a.join(" ");
|
|
330
|
+
}), W = (a) => {
|
|
331
|
+
if (h.value) {
|
|
332
|
+
a.preventDefault(), a.stopPropagation(), a.stopImmediatePropagation();
|
|
326
333
|
return;
|
|
327
334
|
}
|
|
328
|
-
s("click",
|
|
335
|
+
s("click", a);
|
|
329
336
|
};
|
|
330
|
-
return (
|
|
337
|
+
return (a, B) => (n(), j(q(e.to ? t(c) : "button"), {
|
|
331
338
|
href: e.to,
|
|
332
339
|
to: e.to,
|
|
333
|
-
type: t(
|
|
340
|
+
type: t(v),
|
|
334
341
|
external: e.external,
|
|
335
|
-
class:
|
|
336
|
-
disabled:
|
|
342
|
+
class: x(t(I)),
|
|
343
|
+
disabled: t(h),
|
|
337
344
|
role: "button",
|
|
338
|
-
onClick:
|
|
345
|
+
onClick: W
|
|
339
346
|
}, {
|
|
340
|
-
default:
|
|
341
|
-
|
|
347
|
+
default: T(() => [
|
|
348
|
+
t(b) ? (n(), j(q(t(b)), {
|
|
342
349
|
key: 0,
|
|
343
|
-
class:
|
|
344
|
-
}, null, 8, ["class"])) :
|
|
345
|
-
e.hideText ? (
|
|
346
|
-
|
|
350
|
+
class: x(`${t(C)} ${e.hideText ? "" : "mr-2"}`)
|
|
351
|
+
}, null, 8, ["class"])) : S("", !0),
|
|
352
|
+
e.hideText ? (n(), f("div", ot, " ")) : E(a.$slots, "default", { key: 1 }, () => [
|
|
353
|
+
z("Button")
|
|
347
354
|
], !0),
|
|
348
|
-
e.iconRight ? (
|
|
355
|
+
e.iconRight || !e.loading ? (n(), j(q(e.iconRight), {
|
|
349
356
|
key: 3,
|
|
350
|
-
class:
|
|
351
|
-
}, null, 8, ["class"])) :
|
|
357
|
+
class: x(`${t(C)} ${e.hideText ? "" : "ml-2"}`)
|
|
358
|
+
}, null, 8, ["class"])) : S("", !0)
|
|
352
359
|
]),
|
|
353
360
|
_: 3
|
|
354
361
|
}, 8, ["href", "to", "type", "external", "class", "disabled"]));
|
|
@@ -359,7 +366,7 @@ const ue = (e, s) => {
|
|
|
359
366
|
for (const [u, d] of s)
|
|
360
367
|
l[u] = d;
|
|
361
368
|
return l;
|
|
362
|
-
},
|
|
369
|
+
}, it = /* @__PURE__ */ ue(rt, [["__scopeId", "data-v-521f798e"]]), ut = /* @__PURE__ */ A({
|
|
363
370
|
__name: "Link",
|
|
364
371
|
props: {
|
|
365
372
|
to: {
|
|
@@ -416,7 +423,7 @@ const ue = (e, s) => {
|
|
|
416
423
|
}
|
|
417
424
|
s("click", d);
|
|
418
425
|
};
|
|
419
|
-
return (d, c) => (
|
|
426
|
+
return (d, c) => (n(), j(it, {
|
|
420
427
|
link: "",
|
|
421
428
|
to: e.to,
|
|
422
429
|
external: e.external,
|
|
@@ -429,9 +436,9 @@ const ue = (e, s) => {
|
|
|
429
436
|
role: "link",
|
|
430
437
|
onClickCapture: u
|
|
431
438
|
}, {
|
|
432
|
-
default:
|
|
439
|
+
default: T(() => [
|
|
433
440
|
E(d.$slots, "default", {}, () => [
|
|
434
|
-
|
|
441
|
+
z("Link")
|
|
435
442
|
])
|
|
436
443
|
]),
|
|
437
444
|
_: 3
|
|
@@ -439,42 +446,42 @@ const ue = (e, s) => {
|
|
|
439
446
|
}
|
|
440
447
|
});
|
|
441
448
|
var K = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(K || {});
|
|
442
|
-
const
|
|
449
|
+
const dt = {
|
|
443
450
|
"aria-live": "assertive",
|
|
444
451
|
class: "pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"
|
|
445
|
-
},
|
|
452
|
+
}, ct = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, ft = {
|
|
446
453
|
key: 0,
|
|
447
454
|
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"
|
|
448
|
-
},
|
|
455
|
+
}, pt = { class: "p-4" }, ht = { class: "flex items-start" }, mt = { class: "flex-shrink-0" }, gt = { class: "ml-2 w-0 flex-1 flex flex-col" }, bt = {
|
|
449
456
|
key: 0,
|
|
450
457
|
class: "text-foreground font-bold"
|
|
451
|
-
},
|
|
458
|
+
}, yt = {
|
|
452
459
|
key: 1,
|
|
453
460
|
class: "label label--light text-foreground-2"
|
|
454
|
-
},
|
|
461
|
+
}, vt = {
|
|
455
462
|
key: 2,
|
|
456
463
|
class: "flex justify-start mt-2"
|
|
457
|
-
},
|
|
464
|
+
}, xt = /* @__PURE__ */ i("span", { class: "sr-only" }, "Close", -1), gl = /* @__PURE__ */ A({
|
|
458
465
|
__name: "ToastRenderer",
|
|
459
466
|
props: {
|
|
460
467
|
notification: null
|
|
461
468
|
},
|
|
462
469
|
emits: ["update:notification"],
|
|
463
470
|
setup(e, { emit: s }) {
|
|
464
|
-
const l = e, u =
|
|
471
|
+
const l = e, u = r(
|
|
465
472
|
() => {
|
|
466
|
-
var
|
|
467
|
-
return !((
|
|
473
|
+
var v, h;
|
|
474
|
+
return !((v = l.notification) != null && v.description) && !((h = l.notification) != null && h.cta);
|
|
468
475
|
}
|
|
469
476
|
), d = () => {
|
|
470
477
|
s("update:notification", null);
|
|
471
|
-
}, c = (
|
|
472
|
-
var
|
|
473
|
-
(o = (
|
|
478
|
+
}, c = (v) => {
|
|
479
|
+
var h, b, o;
|
|
480
|
+
(o = (b = (h = l.notification) == null ? void 0 : h.cta) == null ? void 0 : b.onClick) == null || o.call(b, v), d();
|
|
474
481
|
};
|
|
475
|
-
return (
|
|
476
|
-
|
|
477
|
-
|
|
482
|
+
return (v, h) => (n(), f("div", dt, [
|
|
483
|
+
i("div", ct, [
|
|
484
|
+
P(ye, {
|
|
478
485
|
"enter-active-class": "transform ease-out duration-300 transition",
|
|
479
486
|
"enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
480
487
|
"enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0",
|
|
@@ -482,56 +489,56 @@ const ut = {
|
|
|
482
489
|
"leave-from-class": "opacity-100",
|
|
483
490
|
"leave-to-class": "opacity-0"
|
|
484
491
|
}, {
|
|
485
|
-
default:
|
|
486
|
-
e.notification ? (
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
e.notification.type === t(K).Success ? (
|
|
492
|
+
default: T(() => [
|
|
493
|
+
e.notification ? (n(), f("div", ft, [
|
|
494
|
+
i("div", pt, [
|
|
495
|
+
i("div", ht, [
|
|
496
|
+
i("div", mt, [
|
|
497
|
+
e.notification.type === t(K).Success ? (n(), j(t(De), {
|
|
491
498
|
key: 0,
|
|
492
499
|
class: "h-6 w-6 text-success",
|
|
493
500
|
"aria-hidden": "true"
|
|
494
|
-
})) : e.notification.type === t(K).Danger ? (
|
|
501
|
+
})) : e.notification.type === t(K).Danger ? (n(), j(t(Ee), {
|
|
495
502
|
key: 1,
|
|
496
503
|
class: "h-6 w-6 text-danger",
|
|
497
504
|
"aria-hidden": "true"
|
|
498
|
-
})) : e.notification.type === t(K).Warning ? (
|
|
505
|
+
})) : e.notification.type === t(K).Warning ? (n(), j(t(qe), {
|
|
499
506
|
key: 2,
|
|
500
507
|
class: "h-6 w-6 text-warning",
|
|
501
508
|
"aria-hidden": "true"
|
|
502
|
-
})) : e.notification.type === t(K).Info ? (
|
|
509
|
+
})) : e.notification.type === t(K).Info ? (n(), j(t(Ue), {
|
|
503
510
|
key: 3,
|
|
504
511
|
class: "h-6 w-6 text-info",
|
|
505
512
|
"aria-hidden": "true"
|
|
506
|
-
})) :
|
|
513
|
+
})) : S("", !0)
|
|
507
514
|
]),
|
|
508
|
-
|
|
509
|
-
e.notification.title ? (
|
|
510
|
-
e.notification.description ? (
|
|
511
|
-
e.notification.cta ? (
|
|
512
|
-
|
|
515
|
+
i("div", gt, [
|
|
516
|
+
e.notification.title ? (n(), f("p", bt, $(e.notification.title), 1)) : S("", !0),
|
|
517
|
+
e.notification.description ? (n(), f("p", yt, $(e.notification.description), 1)) : S("", !0),
|
|
518
|
+
e.notification.cta ? (n(), f("div", vt, [
|
|
519
|
+
P(ut, {
|
|
513
520
|
to: e.notification.cta.url,
|
|
514
521
|
class: "label",
|
|
515
522
|
primary: "",
|
|
516
523
|
onClick: c
|
|
517
524
|
}, {
|
|
518
|
-
default:
|
|
519
|
-
|
|
525
|
+
default: T(() => [
|
|
526
|
+
z($(e.notification.cta.title), 1)
|
|
520
527
|
]),
|
|
521
528
|
_: 1
|
|
522
529
|
}, 8, ["to"])
|
|
523
|
-
])) :
|
|
530
|
+
])) : S("", !0)
|
|
524
531
|
]),
|
|
525
|
-
|
|
526
|
-
class:
|
|
532
|
+
i("div", {
|
|
533
|
+
class: x(["ml-4 flex flex-shrink-0", { "self-center": t(u) }])
|
|
527
534
|
}, [
|
|
528
|
-
|
|
535
|
+
i("button", {
|
|
529
536
|
type: "button",
|
|
530
537
|
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",
|
|
531
538
|
onClick: d
|
|
532
539
|
}, [
|
|
533
|
-
|
|
534
|
-
|
|
540
|
+
xt,
|
|
541
|
+
P(t(oe), {
|
|
535
542
|
class: "h-6 w-6",
|
|
536
543
|
"aria-hidden": "true"
|
|
537
544
|
})
|
|
@@ -539,20 +546,20 @@ const ut = {
|
|
|
539
546
|
], 2)
|
|
540
547
|
])
|
|
541
548
|
])
|
|
542
|
-
])) :
|
|
549
|
+
])) : S("", !0)
|
|
543
550
|
]),
|
|
544
551
|
_: 1
|
|
545
552
|
})
|
|
546
553
|
])
|
|
547
554
|
]));
|
|
548
555
|
}
|
|
549
|
-
}),
|
|
556
|
+
}), kt = /* @__PURE__ */ i("circle", {
|
|
550
557
|
cx: "4",
|
|
551
558
|
cy: "4",
|
|
552
559
|
r: "3"
|
|
553
|
-
}, null, -1),
|
|
554
|
-
|
|
555
|
-
],
|
|
560
|
+
}, null, -1), Ct = [
|
|
561
|
+
kt
|
|
562
|
+
], wt = /* @__PURE__ */ A({
|
|
556
563
|
__name: "Badge",
|
|
557
564
|
props: {
|
|
558
565
|
size: null,
|
|
@@ -565,11 +572,11 @@ const ut = {
|
|
|
565
572
|
},
|
|
566
573
|
emits: ["click-icon"],
|
|
567
574
|
setup(e, { emit: s }) {
|
|
568
|
-
const l = e, u =
|
|
575
|
+
const l = e, u = r(
|
|
569
576
|
() => l.colorClasses || "bg-blue-100 text-blue-800"
|
|
570
|
-
), d =
|
|
577
|
+
), d = r(
|
|
571
578
|
() => l.dotIconColorClasses || "text-blue-400"
|
|
572
|
-
), c =
|
|
579
|
+
), c = r(() => {
|
|
573
580
|
const o = [
|
|
574
581
|
"inline-flex items-center",
|
|
575
582
|
u.value,
|
|
@@ -580,42 +587,42 @@ const ut = {
|
|
|
580
587
|
)) : (o.push("rounded-full"), o.push(
|
|
581
588
|
l.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
582
589
|
)), o.join(" ");
|
|
583
|
-
}),
|
|
590
|
+
}), v = r(() => {
|
|
584
591
|
const o = [
|
|
585
592
|
"mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"
|
|
586
593
|
];
|
|
587
594
|
return l.clickableIcon ? o.push("cursor-pointer") : o.push("cursor-default"), o.join(" ");
|
|
588
|
-
}),
|
|
595
|
+
}), h = r(() => [
|
|
589
596
|
"-ml-0.5 mr-1.5 h-2 w-2",
|
|
590
597
|
d.value
|
|
591
|
-
].join(" ")),
|
|
598
|
+
].join(" ")), b = (o) => {
|
|
592
599
|
if (!l.clickableIcon) {
|
|
593
600
|
o.stopPropagation(), o.stopImmediatePropagation(), o.preventDefault();
|
|
594
601
|
return;
|
|
595
602
|
}
|
|
596
603
|
s("click-icon", o);
|
|
597
604
|
};
|
|
598
|
-
return (o,
|
|
599
|
-
class:
|
|
605
|
+
return (o, w) => (n(), f("span", {
|
|
606
|
+
class: x(t(c))
|
|
600
607
|
}, [
|
|
601
|
-
e.dot ? (
|
|
608
|
+
e.dot ? (n(), f("svg", {
|
|
602
609
|
key: 0,
|
|
603
|
-
class:
|
|
610
|
+
class: x(t(h)),
|
|
604
611
|
fill: "currentColor",
|
|
605
612
|
viewBox: "0 0 8 8"
|
|
606
|
-
},
|
|
613
|
+
}, Ct, 2)) : S("", !0),
|
|
607
614
|
E(o.$slots, "default", {}, () => [
|
|
608
|
-
|
|
615
|
+
z("Badge")
|
|
609
616
|
]),
|
|
610
|
-
e.iconLeft ? (
|
|
617
|
+
e.iconLeft ? (n(), f("button", {
|
|
611
618
|
key: 1,
|
|
612
|
-
class:
|
|
613
|
-
onClick:
|
|
619
|
+
class: x(t(v)),
|
|
620
|
+
onClick: w[0] || (w[0] = (p) => b(p))
|
|
614
621
|
}, [
|
|
615
|
-
(
|
|
616
|
-
class:
|
|
622
|
+
(n(), j(q(e.iconLeft), {
|
|
623
|
+
class: x(["h-4 w-4", t(d)])
|
|
617
624
|
}, null, 8, ["class"]))
|
|
618
|
-
], 2)) :
|
|
625
|
+
], 2)) : S("", !0)
|
|
619
626
|
], 2));
|
|
620
627
|
}
|
|
621
628
|
});
|
|
@@ -623,57 +630,57 @@ var X = /* @__PURE__ */ ((e) => (e[e.sm = 640] = "sm", e[e.md = 746] = "md", e[e
|
|
|
623
630
|
function $e(e) {
|
|
624
631
|
const {
|
|
625
632
|
props: { modelValue: s, steps: l, orientation: u, goVerticalBelow: d, nonInteractive: c },
|
|
626
|
-
emit:
|
|
627
|
-
} = e,
|
|
633
|
+
emit: v
|
|
634
|
+
} = e, h = r(
|
|
628
635
|
() => (u == null ? void 0 : u.value) === "vertical" ? "vertical" : "horizontal"
|
|
629
|
-
),
|
|
636
|
+
), b = r({
|
|
630
637
|
get: () => be((s == null ? void 0 : s.value) || 0, -1, l.value.length),
|
|
631
|
-
set: (
|
|
632
|
-
}), o = (
|
|
633
|
-
var
|
|
638
|
+
set: (y) => v("update:modelValue", be(y, 0, l.value.length))
|
|
639
|
+
}), o = (y) => `${y + 1}`, w = (y) => y === b.value, p = (y) => y < b.value, g = (y, _) => {
|
|
640
|
+
var C;
|
|
634
641
|
if (c != null && c.value) {
|
|
635
|
-
|
|
642
|
+
_ == null || _.preventDefault(), _ == null || _.stopPropagation(), _ == null || _.stopImmediatePropagation();
|
|
636
643
|
return;
|
|
637
644
|
}
|
|
638
|
-
|
|
639
|
-
const
|
|
640
|
-
(
|
|
641
|
-
}, k =
|
|
642
|
-
const
|
|
643
|
-
return
|
|
645
|
+
b.value = y;
|
|
646
|
+
const I = l.value[b.value];
|
|
647
|
+
(C = I == null ? void 0 : I.onClick) == null || C.call(I);
|
|
648
|
+
}, k = r(() => {
|
|
649
|
+
const y = ["flex"];
|
|
650
|
+
return y.push("flex"), h.value === "vertical" || d != null && d.value ? (y.push("flex-col space-y-4 justify-center"), (d == null ? void 0 : d.value) === X.sm ? y.push(
|
|
644
651
|
"sm:flex-row sm:space-y-0 sm:justify-start sm:space-x-8 sm:items-center"
|
|
645
|
-
) : (d == null ? void 0 : d.value) === X.md ?
|
|
652
|
+
) : (d == null ? void 0 : d.value) === X.md ? y.push(
|
|
646
653
|
"md:flex-row md:space-y-0 md:justify-start md:space-x-8 md:items-center"
|
|
647
|
-
) : (d == null ? void 0 : d.value) === X.lg ?
|
|
654
|
+
) : (d == null ? void 0 : d.value) === X.lg ? y.push(
|
|
648
655
|
"lg:flex-row lg:space-y-0 lg:justify-start lg:space-x-8 lg:items-center"
|
|
649
|
-
) : (d == null ? void 0 : d.value) === X.xl &&
|
|
656
|
+
) : (d == null ? void 0 : d.value) === X.xl && y.push(
|
|
650
657
|
"xl:flex-row xl:space-y-0 xl:justify-start xl:space-x-8 xl:items-center"
|
|
651
|
-
)) :
|
|
652
|
-
}),
|
|
653
|
-
const
|
|
654
|
-
return c != null && c.value ||
|
|
658
|
+
)) : y.push("flex-row space-x-8 items-center"), y.join(" ");
|
|
659
|
+
}), L = r(() => {
|
|
660
|
+
const y = ["flex items-center"];
|
|
661
|
+
return c != null && c.value || y.push("cursor-pointer"), y.join(" ");
|
|
655
662
|
});
|
|
656
663
|
return {
|
|
657
|
-
value:
|
|
658
|
-
isCurrentStep:
|
|
664
|
+
value: b,
|
|
665
|
+
isCurrentStep: w,
|
|
659
666
|
isFinishedStep: p,
|
|
660
|
-
switchStep:
|
|
667
|
+
switchStep: g,
|
|
661
668
|
getStepDisplayValue: o,
|
|
662
669
|
listClasses: k,
|
|
663
|
-
linkClasses:
|
|
664
|
-
orientation:
|
|
670
|
+
linkClasses: L,
|
|
671
|
+
orientation: h
|
|
665
672
|
};
|
|
666
673
|
}
|
|
667
|
-
const
|
|
674
|
+
const $t = ["aria-label"], St = ["href", "onClick"], _t = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, It = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, Bt = { class: "flex flex-col" }, Vt = {
|
|
668
675
|
key: 0,
|
|
669
676
|
class: "label label--light text-foreground"
|
|
670
|
-
},
|
|
677
|
+
}, Lt = ["href", "onClick"], jt = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, Ot = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center" }, Pt = { class: "flex flex-col" }, Mt = {
|
|
671
678
|
key: 0,
|
|
672
679
|
class: "label label--light text-foreground"
|
|
673
|
-
},
|
|
680
|
+
}, At = ["href", "onClick"], Ft = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, Tt = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, Rt = { class: "flex flex-col" }, zt = {
|
|
674
681
|
key: 0,
|
|
675
682
|
class: "label label--light"
|
|
676
|
-
},
|
|
683
|
+
}, bl = /* @__PURE__ */ A({
|
|
677
684
|
__name: "Number",
|
|
678
685
|
props: {
|
|
679
686
|
ariaLabel: null,
|
|
@@ -689,89 +696,89 @@ const wt = ["aria-label"], $t = ["href", "onClick"], St = { class: "flex space-x
|
|
|
689
696
|
isCurrentStep: u,
|
|
690
697
|
isFinishedStep: d,
|
|
691
698
|
switchStep: c,
|
|
692
|
-
getStepDisplayValue:
|
|
693
|
-
listClasses:
|
|
694
|
-
linkClasses:
|
|
699
|
+
getStepDisplayValue: v,
|
|
700
|
+
listClasses: h,
|
|
701
|
+
linkClasses: b
|
|
695
702
|
} = $e({
|
|
696
703
|
props: G(l),
|
|
697
704
|
emit: s
|
|
698
705
|
});
|
|
699
|
-
return (o,
|
|
706
|
+
return (o, w) => (n(), f("nav", {
|
|
700
707
|
class: "flex justify-center",
|
|
701
708
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
702
709
|
}, [
|
|
703
|
-
|
|
704
|
-
class:
|
|
710
|
+
i("ol", {
|
|
711
|
+
class: x(t(h))
|
|
705
712
|
}, [
|
|
706
|
-
(
|
|
713
|
+
(n(!0), f(U, null, Y(e.steps, (p, g) => (n(), f("li", {
|
|
707
714
|
key: p.name
|
|
708
715
|
}, [
|
|
709
|
-
t(d)(
|
|
716
|
+
t(d)(g) ? (n(), f("a", {
|
|
710
717
|
key: 0,
|
|
711
718
|
href: p.href,
|
|
712
|
-
class:
|
|
713
|
-
onClick: (k) => t(c)(
|
|
719
|
+
class: x(t(b)),
|
|
720
|
+
onClick: (k) => t(c)(g, k)
|
|
714
721
|
}, [
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
722
|
+
i("div", _t, [
|
|
723
|
+
i("div", It, [
|
|
724
|
+
P(t(We), { class: "w-5 h-5" })
|
|
718
725
|
]),
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
p.description ? (
|
|
726
|
+
i("div", Bt, [
|
|
727
|
+
i("div", null, $(p.name), 1),
|
|
728
|
+
p.description ? (n(), f("div", Vt, $(p.description), 1)) : S("", !0)
|
|
722
729
|
])
|
|
723
730
|
])
|
|
724
|
-
], 10,
|
|
731
|
+
], 10, St)) : t(u)(g) ? (n(), f("a", {
|
|
725
732
|
key: 1,
|
|
726
733
|
href: p.href,
|
|
727
|
-
class:
|
|
734
|
+
class: x(t(b)),
|
|
728
735
|
"aria-current": "step",
|
|
729
|
-
onClick: (k) => t(c)(
|
|
736
|
+
onClick: (k) => t(c)(g, k)
|
|
730
737
|
}, [
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
p.description ? (
|
|
738
|
+
i("div", jt, [
|
|
739
|
+
i("div", Ot, $(t(v)(g)), 1),
|
|
740
|
+
i("div", Pt, [
|
|
741
|
+
i("div", null, $(p.name), 1),
|
|
742
|
+
p.description ? (n(), f("div", Mt, $(p.description), 1)) : S("", !0)
|
|
736
743
|
])
|
|
737
744
|
])
|
|
738
|
-
], 10,
|
|
745
|
+
], 10, Lt)) : (n(), f("a", {
|
|
739
746
|
key: 2,
|
|
740
747
|
href: p.href,
|
|
741
|
-
class:
|
|
742
|
-
onClick: (k) => t(c)(
|
|
748
|
+
class: x(t(b)),
|
|
749
|
+
onClick: (k) => t(c)(g, k)
|
|
743
750
|
}, [
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
p.description ? (
|
|
751
|
+
i("div", Ft, [
|
|
752
|
+
i("div", Tt, $(t(v)(g)), 1),
|
|
753
|
+
i("div", Rt, [
|
|
754
|
+
i("div", null, $(p.name), 1),
|
|
755
|
+
p.description ? (n(), f("div", zt, $(p.description), 1)) : S("", !0)
|
|
749
756
|
])
|
|
750
757
|
])
|
|
751
|
-
], 10,
|
|
758
|
+
], 10, At))
|
|
752
759
|
]))), 128))
|
|
753
760
|
], 2)
|
|
754
|
-
], 8,
|
|
761
|
+
], 8, $t));
|
|
755
762
|
}
|
|
756
|
-
}), Se = (e) => (ve("data-v-56fc6520"), e = e(), xe(), e),
|
|
763
|
+
}), Se = (e) => (ve("data-v-56fc6520"), e = e(), xe(), e), Dt = ["aria-label"], Et = ["href", "onClick"], qt = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, Ut = {
|
|
757
764
|
key: 0,
|
|
758
765
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
759
|
-
},
|
|
766
|
+
}, Wt = ["href", "onClick"], Ht = {
|
|
760
767
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
761
768
|
"aria-hidden": "true"
|
|
762
|
-
},
|
|
769
|
+
}, Kt = {
|
|
763
770
|
key: 0,
|
|
764
771
|
class: "h-3 w-3 rounded-full bg-foreground"
|
|
765
|
-
},
|
|
772
|
+
}, Xt = /* @__PURE__ */ Se(() => /* @__PURE__ */ i("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1)), Nt = /* @__PURE__ */ Se(() => /* @__PURE__ */ i("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1)), Gt = ["href", "onClick"], Jt = {
|
|
766
773
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
767
774
|
"aria-hidden": "true"
|
|
768
|
-
},
|
|
775
|
+
}, Qt = {
|
|
769
776
|
key: 0,
|
|
770
777
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
771
|
-
},
|
|
778
|
+
}, Yt = {
|
|
772
779
|
key: 1,
|
|
773
780
|
class: "h-4 w-4 rounded-full bg-foreground-disabled"
|
|
774
|
-
},
|
|
781
|
+
}, Zt = /* @__PURE__ */ A({
|
|
775
782
|
__name: "Bullet",
|
|
776
783
|
props: {
|
|
777
784
|
ariaLabel: null,
|
|
@@ -784,74 +791,74 @@ const wt = ["aria-label"], $t = ["href", "onClick"], St = { class: "flex space-x
|
|
|
784
791
|
},
|
|
785
792
|
emits: ["update:modelValue"],
|
|
786
793
|
setup(e, { emit: s }) {
|
|
787
|
-
const l = e, { isCurrentStep: u, isFinishedStep: d, switchStep: c, listClasses:
|
|
794
|
+
const l = e, { isCurrentStep: u, isFinishedStep: d, switchStep: c, listClasses: v, linkClasses: h } = $e({
|
|
788
795
|
props: G(l),
|
|
789
796
|
emit: s
|
|
790
|
-
}),
|
|
797
|
+
}), b = r(() => {
|
|
791
798
|
const o = ["ml-3 h6 font-medium leading-7"];
|
|
792
799
|
return l.basic && o.push("sr-only"), o.join(" ");
|
|
793
800
|
});
|
|
794
|
-
return (o,
|
|
801
|
+
return (o, w) => (n(), f("nav", {
|
|
795
802
|
class: "flex justify-center",
|
|
796
803
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
797
804
|
}, [
|
|
798
|
-
|
|
799
|
-
class:
|
|
805
|
+
i("ol", {
|
|
806
|
+
class: x([t(v), e.basic ? "basic" : ""])
|
|
800
807
|
}, [
|
|
801
|
-
(
|
|
808
|
+
(n(!0), f(U, null, Y(e.steps, (p, g) => (n(), f("li", {
|
|
802
809
|
key: p.name
|
|
803
810
|
}, [
|
|
804
|
-
t(d)(
|
|
811
|
+
t(d)(g) ? (n(), f("a", {
|
|
805
812
|
key: 0,
|
|
806
813
|
href: p.href,
|
|
807
|
-
class:
|
|
808
|
-
onClick: (k) => t(c)(
|
|
814
|
+
class: x(t(h)),
|
|
815
|
+
onClick: (k) => t(c)(g, k)
|
|
809
816
|
}, [
|
|
810
|
-
|
|
811
|
-
e.basic ? (
|
|
817
|
+
i("span", qt, [
|
|
818
|
+
e.basic ? (n(), f("span", Ut)) : (n(), j(t(He), {
|
|
812
819
|
key: 1,
|
|
813
820
|
class: "h-full w-full text-primary",
|
|
814
821
|
"aria-hidden": "true"
|
|
815
822
|
}))
|
|
816
823
|
]),
|
|
817
|
-
|
|
818
|
-
class:
|
|
819
|
-
},
|
|
820
|
-
], 10, Et)) : t(u)(
|
|
824
|
+
i("span", {
|
|
825
|
+
class: x(["text-foreground", t(b)])
|
|
826
|
+
}, $(p.name), 3)
|
|
827
|
+
], 10, Et)) : t(u)(g) ? (n(), f("a", {
|
|
821
828
|
key: 1,
|
|
822
829
|
href: p.href,
|
|
823
|
-
class:
|
|
830
|
+
class: x(t(h)),
|
|
824
831
|
"aria-current": "step",
|
|
825
|
-
onClick: (k) => t(c)(
|
|
832
|
+
onClick: (k) => t(c)(g, k)
|
|
826
833
|
}, [
|
|
827
|
-
|
|
828
|
-
e.basic ? (
|
|
829
|
-
|
|
830
|
-
|
|
834
|
+
i("span", Ht, [
|
|
835
|
+
e.basic ? (n(), f("span", Kt)) : (n(), f(U, { key: 1 }, [
|
|
836
|
+
Xt,
|
|
837
|
+
Nt
|
|
831
838
|
], 64))
|
|
832
839
|
]),
|
|
833
|
-
|
|
834
|
-
class:
|
|
835
|
-
},
|
|
836
|
-
], 10,
|
|
840
|
+
i("span", {
|
|
841
|
+
class: x(["text-primary-focus", t(b)])
|
|
842
|
+
}, $(p.name), 3)
|
|
843
|
+
], 10, Wt)) : (n(), f("a", {
|
|
837
844
|
key: 2,
|
|
838
845
|
href: p.href,
|
|
839
|
-
class:
|
|
840
|
-
onClick: (k) => t(c)(
|
|
846
|
+
class: x(t(h)),
|
|
847
|
+
onClick: (k) => t(c)(g, k)
|
|
841
848
|
}, [
|
|
842
|
-
|
|
843
|
-
e.basic ? (
|
|
849
|
+
i("div", Jt, [
|
|
850
|
+
e.basic ? (n(), f("span", Qt)) : (n(), f("div", Yt))
|
|
844
851
|
]),
|
|
845
|
-
|
|
846
|
-
class:
|
|
847
|
-
},
|
|
848
|
-
], 10,
|
|
852
|
+
i("p", {
|
|
853
|
+
class: x(["text-foreground-disabled", t(b)])
|
|
854
|
+
}, $(p.name), 3)
|
|
855
|
+
], 10, Gt))
|
|
849
856
|
]))), 128))
|
|
850
857
|
], 2)
|
|
851
|
-
], 8,
|
|
858
|
+
], 8, Dt));
|
|
852
859
|
}
|
|
853
860
|
});
|
|
854
|
-
const
|
|
861
|
+
const yl = /* @__PURE__ */ ue(Zt, [["__scopeId", "data-v-56fc6520"]]), es = ["disabled"], vl = /* @__PURE__ */ A({
|
|
855
862
|
__name: "CardButton",
|
|
856
863
|
props: {
|
|
857
864
|
disabled: { type: Boolean },
|
|
@@ -859,7 +866,7 @@ const bl = /* @__PURE__ */ ue(Yt, [["__scopeId", "data-v-56fc6520"]]), Zt = ["di
|
|
|
859
866
|
},
|
|
860
867
|
emits: ["update:modelValue", "click"],
|
|
861
868
|
setup(e, { emit: s }) {
|
|
862
|
-
const l = e, u =
|
|
869
|
+
const l = e, u = r(() => {
|
|
863
870
|
const c = [
|
|
864
871
|
"h-20 bg-foundation-2 inline-flex justify-center items-center outline-none",
|
|
865
872
|
"normal px-16 py-5 shadow rounded transition active:scale-95"
|
|
@@ -874,26 +881,26 @@ const bl = /* @__PURE__ */ ue(Yt, [["__scopeId", "data-v-56fc6520"]]), Zt = ["di
|
|
|
874
881
|
}
|
|
875
882
|
s("update:modelValue", !l.modelValue), s("click", c);
|
|
876
883
|
};
|
|
877
|
-
return (c,
|
|
878
|
-
class:
|
|
884
|
+
return (c, v) => (n(), f("button", {
|
|
885
|
+
class: x(t(u)),
|
|
879
886
|
disabled: e.disabled,
|
|
880
887
|
onClick: d
|
|
881
888
|
}, [
|
|
882
889
|
E(c.$slots, "default", {}, () => [
|
|
883
|
-
|
|
890
|
+
z("Text")
|
|
884
891
|
])
|
|
885
|
-
], 10,
|
|
892
|
+
], 10, es));
|
|
886
893
|
}
|
|
887
|
-
}),
|
|
894
|
+
}), ts = { class: "relative flex items-start" }, ss = { class: "flex h-6 items-center" }, ls = ["id", "checked", "aria-describedby", "name", "value", "disabled"], ns = {
|
|
888
895
|
class: "ml-2 text-sm",
|
|
889
896
|
style: { "padding-top": "2px" }
|
|
890
|
-
},
|
|
897
|
+
}, as = ["for"], os = {
|
|
891
898
|
key: 0,
|
|
892
899
|
class: "text-danger ml-1"
|
|
893
|
-
},
|
|
900
|
+
}, rs = ["id"], is = A({
|
|
894
901
|
inheritAttrs: !1
|
|
895
|
-
}),
|
|
896
|
-
...
|
|
902
|
+
}), xl = /* @__PURE__ */ A({
|
|
903
|
+
...is,
|
|
897
904
|
__name: "Checkbox",
|
|
898
905
|
props: {
|
|
899
906
|
/**
|
|
@@ -981,25 +988,25 @@ const bl = /* @__PURE__ */ ue(Yt, [["__scopeId", "data-v-56fc6520"]]), Zt = ["di
|
|
|
981
988
|
},
|
|
982
989
|
emits: ["update:modelValue"],
|
|
983
990
|
setup(e) {
|
|
984
|
-
const s = e, l = (
|
|
991
|
+
const s = e, l = (y) => `${y}-${ie()}`, u = r(() => s.value || s.name), {
|
|
985
992
|
checked: d,
|
|
986
993
|
errorMessage: c,
|
|
987
|
-
handleChange:
|
|
994
|
+
handleChange: v
|
|
988
995
|
} = re(s.name, s.rules, {
|
|
989
996
|
validateOnMount: s.validateOnMount,
|
|
990
997
|
type: "checkbox",
|
|
991
998
|
checkedValue: u,
|
|
992
999
|
initialValue: s.modelValue || void 0
|
|
993
|
-
}),
|
|
994
|
-
s.disabled || y
|
|
995
|
-
},
|
|
996
|
-
const
|
|
997
|
-
return s.inlineDescription ?
|
|
998
|
-
}), k =
|
|
999
|
-
return (
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
id: t(
|
|
1000
|
+
}), h = (y) => {
|
|
1001
|
+
s.disabled || v(y);
|
|
1002
|
+
}, b = r(() => s.label || s.name), o = r(() => c.value ? "border-danger-lighter" : "border-foreground-4 "), w = r(() => s.description || c.value), p = r(() => `${s.name}-description`), g = r(() => {
|
|
1003
|
+
const y = [];
|
|
1004
|
+
return s.inlineDescription ? y.push("inline ml-2") : y.push("block"), c.value ? y.push("text-danger") : y.push("text-foreground-2"), y.join(" ");
|
|
1005
|
+
}), k = R(l("checkbox")), L = r(() => s.id || k.value);
|
|
1006
|
+
return (y, _) => (n(), f("div", ts, [
|
|
1007
|
+
i("div", ss, [
|
|
1008
|
+
i("input", ae({
|
|
1009
|
+
id: t(L),
|
|
1003
1010
|
checked: t(d),
|
|
1004
1011
|
"aria-describedby": t(p),
|
|
1005
1012
|
name: e.name,
|
|
@@ -1007,21 +1014,21 @@ const bl = /* @__PURE__ */ ue(Yt, [["__scopeId", "data-v-56fc6520"]]), Zt = ["di
|
|
|
1007
1014
|
disabled: e.disabled,
|
|
1008
1015
|
type: "checkbox",
|
|
1009
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(o)]
|
|
1010
|
-
},
|
|
1017
|
+
}, y.$attrs, { onChange: h }), null, 16, ls)
|
|
1011
1018
|
]),
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
for: t(
|
|
1015
|
-
class:
|
|
1019
|
+
i("div", ns, [
|
|
1020
|
+
i("label", {
|
|
1021
|
+
for: t(L),
|
|
1022
|
+
class: x(["font-medium text-foreground", { "sr-only": e.hideLabel }])
|
|
1016
1023
|
}, [
|
|
1017
|
-
|
|
1018
|
-
e.showRequired ? (
|
|
1019
|
-
], 10,
|
|
1020
|
-
t(
|
|
1024
|
+
i("span", null, $(t(b)), 1),
|
|
1025
|
+
e.showRequired ? (n(), f("span", os, "*")) : S("", !0)
|
|
1026
|
+
], 10, as),
|
|
1027
|
+
t(w) ? (n(), f("p", {
|
|
1021
1028
|
key: 0,
|
|
1022
1029
|
id: t(p),
|
|
1023
|
-
class:
|
|
1024
|
-
},
|
|
1030
|
+
class: x(t(g))
|
|
1031
|
+
}, $(t(w)), 11, rs)) : S("", !0)
|
|
1025
1032
|
])
|
|
1026
1033
|
]));
|
|
1027
1034
|
}
|
|
@@ -1031,54 +1038,54 @@ function _e(e) {
|
|
|
1031
1038
|
validateOnMount: t(s.validateOnMount),
|
|
1032
1039
|
validateOnValueUpdate: t(s.validateOnValueUpdate),
|
|
1033
1040
|
initialValue: t(s.modelValue) || void 0
|
|
1034
|
-
}),
|
|
1035
|
-
const
|
|
1036
|
-
return t(s.showLabel) ||
|
|
1037
|
-
}),
|
|
1038
|
-
const
|
|
1041
|
+
}), v = r(() => {
|
|
1042
|
+
const C = ["block label text-foreground-2 mb-2"];
|
|
1043
|
+
return t(s.showLabel) || C.push("sr-only"), C.join(" ");
|
|
1044
|
+
}), h = r(() => {
|
|
1045
|
+
const C = [
|
|
1039
1046
|
"block w-full rounded focus:outline-none text-foreground transition-all",
|
|
1040
1047
|
"disabled:cursor-not-allowed disabled:bg-foundation-disabled disabled:text-disabled-muted",
|
|
1041
1048
|
"placeholder:text-foreground-2"
|
|
1042
1049
|
];
|
|
1043
|
-
return c.value ?
|
|
1050
|
+
return c.value ? C.push(
|
|
1044
1051
|
"border-2 border-danger text-danger-darker focus:border-danger focus:ring-danger"
|
|
1045
|
-
) :
|
|
1046
|
-
}),
|
|
1047
|
-
const
|
|
1048
|
-
return !
|
|
1049
|
-
}), p =
|
|
1050
|
-
() =>
|
|
1051
|
-
),
|
|
1052
|
-
() => k.value ? `${t(s.name)}-${
|
|
1053
|
-
),
|
|
1054
|
-
const
|
|
1055
|
-
return
|
|
1056
|
-
}),
|
|
1057
|
-
var
|
|
1058
|
-
(
|
|
1059
|
-
},
|
|
1052
|
+
) : C.push("border-0 focus:ring-2 focus:ring-outline-2"), t(s.color) === "foundation" ? C.push("bg-foundation shadow-sm hover:shadow") : C.push("bg-foundation-page"), C.join(" ");
|
|
1053
|
+
}), b = R(ie()), o = r(() => t(s.label) || t(s.name)), w = r(() => {
|
|
1054
|
+
const C = c.value;
|
|
1055
|
+
return !C || !t(s.useLabelInErrors) ? C : C.replace("Value", o.value);
|
|
1056
|
+
}), p = r(
|
|
1057
|
+
() => w.value && t(s.hideErrorMessage)
|
|
1058
|
+
), g = r(() => w.value || t(s.help)), k = r(() => !!g.value), L = r(
|
|
1059
|
+
() => k.value ? `${t(s.name)}-${b.value}` : void 0
|
|
1060
|
+
), y = r(() => {
|
|
1061
|
+
const C = ["mt-2 text-sm"];
|
|
1062
|
+
return C.push(c.value ? "text-danger" : "text-foreground-2"), C.join(" ");
|
|
1063
|
+
}), _ = () => {
|
|
1064
|
+
var C;
|
|
1065
|
+
(C = l.value) == null || C.focus();
|
|
1066
|
+
}, I = () => {
|
|
1060
1067
|
d.value = "", u("change", { value: "" }), u("clear");
|
|
1061
1068
|
};
|
|
1062
1069
|
return ke(() => {
|
|
1063
|
-
t(s.autoFocus) &&
|
|
1070
|
+
t(s.autoFocus) && _();
|
|
1064
1071
|
}), {
|
|
1065
|
-
coreClasses:
|
|
1072
|
+
coreClasses: h,
|
|
1066
1073
|
title: o,
|
|
1067
1074
|
value: d,
|
|
1068
|
-
helpTipId:
|
|
1069
|
-
helpTipClasses:
|
|
1070
|
-
helpTip:
|
|
1075
|
+
helpTipId: L,
|
|
1076
|
+
helpTipClasses: y,
|
|
1077
|
+
helpTip: g,
|
|
1071
1078
|
hideHelpTip: p,
|
|
1072
|
-
errorMessage:
|
|
1073
|
-
clear:
|
|
1074
|
-
focus:
|
|
1075
|
-
labelClasses:
|
|
1079
|
+
errorMessage: w,
|
|
1080
|
+
clear: I,
|
|
1081
|
+
focus: _,
|
|
1082
|
+
labelClasses: v
|
|
1076
1083
|
};
|
|
1077
1084
|
}
|
|
1078
|
-
const
|
|
1085
|
+
const us = ["for"], ds = { class: "relative" }, cs = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], fs = /* @__PURE__ */ i("span", { class: "text-xs sr-only" }, "Clear input", -1), ps = {
|
|
1079
1086
|
key: 2,
|
|
1080
1087
|
class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
|
|
1081
|
-
},
|
|
1088
|
+
}, hs = ["id"], kl = /* @__PURE__ */ A({
|
|
1082
1089
|
__name: "TextArea",
|
|
1083
1090
|
props: {
|
|
1084
1091
|
name: null,
|
|
@@ -1100,98 +1107,98 @@ const is = ["for"], us = { class: "relative" }, ds = ["id", "name", "placeholder
|
|
|
1100
1107
|
},
|
|
1101
1108
|
emits: ["update:modelValue", "change", "input", "clear"],
|
|
1102
1109
|
setup(e, { expose: s, emit: l }) {
|
|
1103
|
-
const u = e, d =
|
|
1110
|
+
const u = e, d = R(null), {
|
|
1104
1111
|
coreClasses: c,
|
|
1105
|
-
title:
|
|
1106
|
-
value:
|
|
1107
|
-
helpTipId:
|
|
1112
|
+
title: v,
|
|
1113
|
+
value: h,
|
|
1114
|
+
helpTipId: b,
|
|
1108
1115
|
helpTipClasses: o,
|
|
1109
|
-
helpTip:
|
|
1116
|
+
helpTip: w,
|
|
1110
1117
|
errorMessage: p,
|
|
1111
|
-
labelClasses:
|
|
1118
|
+
labelClasses: g,
|
|
1112
1119
|
clear: k,
|
|
1113
|
-
focus:
|
|
1120
|
+
focus: L
|
|
1114
1121
|
} = _e({
|
|
1115
1122
|
props: G(u),
|
|
1116
1123
|
emit: l,
|
|
1117
1124
|
inputEl: d
|
|
1118
|
-
}),
|
|
1119
|
-
const
|
|
1120
|
-
return u.showClear && p.value ?
|
|
1125
|
+
}), y = r(() => {
|
|
1126
|
+
const _ = ["pl-2"];
|
|
1127
|
+
return u.showClear && p.value ? _.push("pr-12") : (u.showClear || p.value) && _.push("pr-8"), _.join(" ");
|
|
1121
1128
|
});
|
|
1122
|
-
return s({ focus:
|
|
1123
|
-
class:
|
|
1129
|
+
return s({ focus: L }), (_, I) => (n(), f("div", {
|
|
1130
|
+
class: x([e.fullWidth ? "w-full" : ""])
|
|
1124
1131
|
}, [
|
|
1125
|
-
|
|
1132
|
+
i("label", {
|
|
1126
1133
|
for: e.name,
|
|
1127
|
-
class:
|
|
1134
|
+
class: x(t(g))
|
|
1128
1135
|
}, [
|
|
1129
|
-
|
|
1130
|
-
], 10,
|
|
1131
|
-
|
|
1132
|
-
J(
|
|
1136
|
+
i("span", null, $(t(v)), 1)
|
|
1137
|
+
], 10, us),
|
|
1138
|
+
i("div", ds, [
|
|
1139
|
+
J(i("textarea", ae({
|
|
1133
1140
|
id: e.name,
|
|
1134
1141
|
ref_key: "inputElement",
|
|
1135
1142
|
ref: d,
|
|
1136
|
-
"onUpdate:modelValue":
|
|
1143
|
+
"onUpdate:modelValue": I[0] || (I[0] = (C) => Z(h) ? h.value = C : null),
|
|
1137
1144
|
name: e.name,
|
|
1138
|
-
class: [t(c), t(
|
|
1145
|
+
class: [t(c), t(y), "min-h-[4rem]"],
|
|
1139
1146
|
placeholder: e.placeholder,
|
|
1140
1147
|
disabled: e.disabled,
|
|
1141
1148
|
"aria-invalid": t(p) ? "true" : "false",
|
|
1142
|
-
"aria-describedby": t(
|
|
1143
|
-
},
|
|
1144
|
-
onChange:
|
|
1145
|
-
onInput:
|
|
1146
|
-
}), null, 16,
|
|
1147
|
-
[Ce, t(
|
|
1149
|
+
"aria-describedby": t(b)
|
|
1150
|
+
}, _.$attrs, {
|
|
1151
|
+
onChange: I[1] || (I[1] = (C) => _.$emit("change", { event: C, value: t(h) })),
|
|
1152
|
+
onInput: I[2] || (I[2] = (C) => _.$emit("input", { event: C, value: t(h) }))
|
|
1153
|
+
}), null, 16, cs), [
|
|
1154
|
+
[Ce, t(h)]
|
|
1148
1155
|
]),
|
|
1149
|
-
e.showClear ? (
|
|
1156
|
+
e.showClear ? (n(), f("a", {
|
|
1150
1157
|
key: 0,
|
|
1151
1158
|
title: "Clear input",
|
|
1152
1159
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
1153
|
-
onClick:
|
|
1154
|
-
(...
|
|
1155
|
-
onKeydown:
|
|
1156
|
-
(...
|
|
1160
|
+
onClick: I[3] || (I[3] = //@ts-ignore
|
|
1161
|
+
(...C) => t(k) && t(k)(...C)),
|
|
1162
|
+
onKeydown: I[4] || (I[4] = //@ts-ignore
|
|
1163
|
+
(...C) => t(k) && t(k)(...C))
|
|
1157
1164
|
}, [
|
|
1158
|
-
|
|
1159
|
-
|
|
1165
|
+
fs,
|
|
1166
|
+
P(t(oe), {
|
|
1160
1167
|
class: "h-5 w-5 text-foreground",
|
|
1161
1168
|
"aria-hidden": "true"
|
|
1162
1169
|
})
|
|
1163
|
-
], 32)) :
|
|
1164
|
-
t(p) ? (
|
|
1170
|
+
], 32)) : S("", !0),
|
|
1171
|
+
t(p) ? (n(), f("div", {
|
|
1165
1172
|
key: 1,
|
|
1166
|
-
class:
|
|
1173
|
+
class: x([
|
|
1167
1174
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1168
1175
|
e.showClear ? "pr-8" : "pr-2"
|
|
1169
1176
|
])
|
|
1170
1177
|
}, [
|
|
1171
|
-
|
|
1178
|
+
P(t(we), {
|
|
1172
1179
|
class: "h-4 w-4 text-danger",
|
|
1173
1180
|
"aria-hidden": "true"
|
|
1174
1181
|
})
|
|
1175
|
-
], 2)) :
|
|
1176
|
-
e.showRequired && !t(p) ? (
|
|
1182
|
+
], 2)) : S("", !0),
|
|
1183
|
+
e.showRequired && !t(p) ? (n(), f("div", ps, " * ")) : S("", !0)
|
|
1177
1184
|
]),
|
|
1178
|
-
t(
|
|
1185
|
+
t(b) ? (n(), f("p", {
|
|
1179
1186
|
key: 0,
|
|
1180
|
-
id: t(
|
|
1181
|
-
class:
|
|
1182
|
-
},
|
|
1187
|
+
id: t(b),
|
|
1188
|
+
class: x(t(o))
|
|
1189
|
+
}, $(t(w)), 11, hs)) : S("", !0)
|
|
1183
1190
|
], 2));
|
|
1184
1191
|
}
|
|
1185
|
-
}),
|
|
1192
|
+
}), ms = ["for"], gs = { class: "relative" }, bs = {
|
|
1186
1193
|
key: 0,
|
|
1187
1194
|
class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"
|
|
1188
|
-
},
|
|
1195
|
+
}, ys = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], vs = /* @__PURE__ */ i("span", { class: "text-xs sr-only" }, "Clear input", -1), xs = {
|
|
1189
1196
|
key: 2,
|
|
1190
1197
|
class: "pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center pr-2 text-danger opacity-50"
|
|
1191
|
-
},
|
|
1198
|
+
}, ks = ["id"], Cs = A({
|
|
1192
1199
|
inheritAttrs: !1
|
|
1193
|
-
}),
|
|
1194
|
-
...
|
|
1200
|
+
}), Cl = /* @__PURE__ */ A({
|
|
1201
|
+
...Cs,
|
|
1195
1202
|
__name: "TextInput",
|
|
1196
1203
|
props: {
|
|
1197
1204
|
/**
|
|
@@ -1327,31 +1334,31 @@ const is = ["for"], us = { class: "relative" }, ds = ["id", "name", "placeholder
|
|
|
1327
1334
|
},
|
|
1328
1335
|
emits: ["update:modelValue", "change", "input", "clear", "focusin", "focusout"],
|
|
1329
1336
|
setup(e, { expose: s, emit: l }) {
|
|
1330
|
-
const u = e, d = Le(), c =
|
|
1331
|
-
coreClasses:
|
|
1332
|
-
title:
|
|
1333
|
-
value:
|
|
1337
|
+
const u = e, d = Le(), c = R(null), {
|
|
1338
|
+
coreClasses: v,
|
|
1339
|
+
title: h,
|
|
1340
|
+
value: b,
|
|
1334
1341
|
helpTipId: o,
|
|
1335
|
-
helpTipClasses:
|
|
1342
|
+
helpTipClasses: w,
|
|
1336
1343
|
helpTip: p,
|
|
1337
|
-
hideHelpTip:
|
|
1344
|
+
hideHelpTip: g,
|
|
1338
1345
|
errorMessage: k,
|
|
1339
|
-
clear:
|
|
1340
|
-
focus:
|
|
1341
|
-
labelClasses:
|
|
1346
|
+
clear: L,
|
|
1347
|
+
focus: y,
|
|
1348
|
+
labelClasses: _
|
|
1342
1349
|
} = _e({
|
|
1343
1350
|
props: G(u),
|
|
1344
1351
|
emit: l,
|
|
1345
1352
|
inputEl: c
|
|
1346
|
-
}),
|
|
1347
|
-
const
|
|
1348
|
-
return k.value ?
|
|
1349
|
-
}),
|
|
1353
|
+
}), I = r(() => {
|
|
1354
|
+
const B = ["h-5 w-5"];
|
|
1355
|
+
return k.value ? B.push("text-danger") : B.push("text-foreground-2"), B.join(" ");
|
|
1356
|
+
}), C = r(
|
|
1350
1357
|
() => ["email", "password"].includes(u.type) || u.customIcon
|
|
1351
|
-
),
|
|
1352
|
-
const
|
|
1353
|
-
return
|
|
1354
|
-
}),
|
|
1358
|
+
), W = r(() => {
|
|
1359
|
+
const B = [];
|
|
1360
|
+
return C.value ? B.push("pl-8") : B.push("pl-2"), d["input-right"] || (k.value || u.showClear) && (k.value && u.showClear ? B.push("pr-12") : B.push("pr-8")), B.join(" ");
|
|
1361
|
+
}), a = r(() => {
|
|
1355
1362
|
switch (u.size) {
|
|
1356
1363
|
case "sm":
|
|
1357
1364
|
return "h-6";
|
|
@@ -1364,197 +1371,197 @@ const is = ["for"], us = { class: "relative" }, ds = ["id", "name", "placeholder
|
|
|
1364
1371
|
return "h-8";
|
|
1365
1372
|
}
|
|
1366
1373
|
});
|
|
1367
|
-
return s({ focus:
|
|
1368
|
-
class:
|
|
1374
|
+
return s({ focus: y }), (B, M) => (n(), f("div", {
|
|
1375
|
+
class: x([e.fullWidth ? "w-full" : "", e.wrapperClasses])
|
|
1369
1376
|
}, [
|
|
1370
|
-
|
|
1377
|
+
i("label", {
|
|
1371
1378
|
for: e.name,
|
|
1372
|
-
class:
|
|
1379
|
+
class: x(t(_))
|
|
1373
1380
|
}, [
|
|
1374
|
-
|
|
1375
|
-
], 10,
|
|
1376
|
-
|
|
1377
|
-
t(
|
|
1378
|
-
e.customIcon ? (
|
|
1381
|
+
i("span", null, $(t(h)), 1)
|
|
1382
|
+
], 10, ms),
|
|
1383
|
+
i("div", gs, [
|
|
1384
|
+
t(C) ? (n(), f("div", bs, [
|
|
1385
|
+
e.customIcon ? (n(), j(q(e.customIcon), {
|
|
1379
1386
|
key: 0,
|
|
1380
|
-
class:
|
|
1387
|
+
class: x(t(I)),
|
|
1381
1388
|
"aria-hidden": "true"
|
|
1382
|
-
}, null, 8, ["class"])) : e.type === "email" ? (
|
|
1389
|
+
}, null, 8, ["class"])) : e.type === "email" ? (n(), j(t(Ke), {
|
|
1383
1390
|
key: 1,
|
|
1384
|
-
class:
|
|
1391
|
+
class: x(t(I)),
|
|
1385
1392
|
"aria-hidden": "true"
|
|
1386
|
-
}, null, 8, ["class"])) : e.type === "password" ? (
|
|
1393
|
+
}, null, 8, ["class"])) : e.type === "password" ? (n(), j(t(Xe), {
|
|
1387
1394
|
key: 2,
|
|
1388
|
-
class:
|
|
1395
|
+
class: x(t(I)),
|
|
1389
1396
|
"aria-hidden": "true"
|
|
1390
|
-
}, null, 8, ["class"])) :
|
|
1391
|
-
])) :
|
|
1392
|
-
J(
|
|
1397
|
+
}, null, 8, ["class"])) : S("", !0)
|
|
1398
|
+
])) : S("", !0),
|
|
1399
|
+
J(i("input", ae({
|
|
1393
1400
|
id: e.name,
|
|
1394
1401
|
ref_key: "inputElement",
|
|
1395
1402
|
ref: c,
|
|
1396
|
-
"onUpdate:modelValue":
|
|
1403
|
+
"onUpdate:modelValue": M[0] || (M[0] = (V) => Z(b) ? b.value = V : null),
|
|
1397
1404
|
type: e.type,
|
|
1398
1405
|
name: e.name,
|
|
1399
|
-
class: [t(
|
|
1406
|
+
class: [t(v), t(W), t(a), e.inputClasses || ""],
|
|
1400
1407
|
placeholder: e.placeholder,
|
|
1401
1408
|
disabled: e.disabled,
|
|
1402
1409
|
"aria-invalid": t(k) ? "true" : "false",
|
|
1403
1410
|
"aria-describedby": t(o),
|
|
1404
1411
|
role: "textbox"
|
|
1405
|
-
},
|
|
1406
|
-
onChange:
|
|
1407
|
-
onInput:
|
|
1408
|
-
}), null, 16,
|
|
1409
|
-
[je, t(
|
|
1412
|
+
}, B.$attrs, {
|
|
1413
|
+
onChange: M[1] || (M[1] = (V) => B.$emit("change", { event: V, value: t(b) })),
|
|
1414
|
+
onInput: M[2] || (M[2] = (V) => B.$emit("input", { event: V, value: t(b) }))
|
|
1415
|
+
}), null, 16, ys), [
|
|
1416
|
+
[je, t(b)]
|
|
1410
1417
|
]),
|
|
1411
|
-
E(
|
|
1412
|
-
e.showClear ? (
|
|
1418
|
+
E(B.$slots, "input-right", {}, () => [
|
|
1419
|
+
e.showClear ? (n(), f("a", {
|
|
1413
1420
|
key: 0,
|
|
1414
1421
|
title: "Clear input",
|
|
1415
1422
|
class: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",
|
|
1416
|
-
onClick:
|
|
1417
|
-
(...
|
|
1418
|
-
onKeydown:
|
|
1419
|
-
(...
|
|
1423
|
+
onClick: M[3] || (M[3] = //@ts-ignore
|
|
1424
|
+
(...V) => t(L) && t(L)(...V)),
|
|
1425
|
+
onKeydown: M[4] || (M[4] = //@ts-ignore
|
|
1426
|
+
(...V) => t(L) && t(L)(...V))
|
|
1420
1427
|
}, [
|
|
1421
|
-
|
|
1422
|
-
|
|
1428
|
+
vs,
|
|
1429
|
+
P(t(oe), {
|
|
1423
1430
|
class: "h-5 w-5 text-foreground",
|
|
1424
1431
|
"aria-hidden": "true"
|
|
1425
1432
|
})
|
|
1426
|
-
], 32)) :
|
|
1427
|
-
t(k) ? (
|
|
1433
|
+
], 32)) : S("", !0),
|
|
1434
|
+
t(k) ? (n(), f("div", {
|
|
1428
1435
|
key: 1,
|
|
1429
|
-
class:
|
|
1436
|
+
class: x([
|
|
1430
1437
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1431
1438
|
e.showClear ? "pr-8" : "pr-2"
|
|
1432
1439
|
])
|
|
1433
1440
|
}, [
|
|
1434
|
-
|
|
1441
|
+
P(t(we), {
|
|
1435
1442
|
class: "h-4 w-4 text-danger",
|
|
1436
1443
|
"aria-hidden": "true"
|
|
1437
1444
|
})
|
|
1438
|
-
], 2)) :
|
|
1439
|
-
e.showRequired && !t(k) ? (
|
|
1445
|
+
], 2)) : S("", !0),
|
|
1446
|
+
e.showRequired && !t(k) ? (n(), f("div", xs, " * ")) : S("", !0)
|
|
1440
1447
|
])
|
|
1441
1448
|
]),
|
|
1442
|
-
t(o) && !t(
|
|
1449
|
+
t(o) && !t(g) ? (n(), f("p", {
|
|
1443
1450
|
key: 0,
|
|
1444
1451
|
id: t(o),
|
|
1445
|
-
class:
|
|
1446
|
-
},
|
|
1452
|
+
class: x(t(w))
|
|
1453
|
+
}, $(t(p)), 11, ks)) : S("", !0)
|
|
1447
1454
|
], 2));
|
|
1448
1455
|
}
|
|
1449
|
-
}),
|
|
1456
|
+
}), ws = /^https?:\/\//, de = /^[\w-_.+]+@[\w-_.+]+$/, $s = (e) => (e || "").match(de) ? !0 : "Value should be a valid e-mail address", Ss = (e) => (e || "").split(",").map((u) => u.trim()).every((u) => u.match(de)) || "Value should be one or multiple comma-delimited e-mail addresses", _s = (e) => (Q(e) && (e = e.trim()), e ? !0 : "Value is required"), Is = (e, s) => (l, u) => l === u.form[e] ? !0 : `Value must be the same as in field '${s || e}'`, Bs = (e) => (s) => {
|
|
1450
1457
|
const { minLength: l, maxLength: u } = e;
|
|
1451
|
-
return s =
|
|
1452
|
-
},
|
|
1458
|
+
return s = Ne(s) ? "" : s, Q(s) ? !se(l) && s.length < l ? `Value needs to be at least ${l} characters long` : !se(u) && s.length > u ? `Value needs to be no more than ${u} characters long` : !0 : "Value should be a text string";
|
|
1459
|
+
}, Vs = (e) => (s) => {
|
|
1453
1460
|
const { match: l, message: u } = e;
|
|
1454
1461
|
return Q(s) ? l ? Q(l) ? s.includes(l) ? !0 : u : l.test(s) ? !0 : u : !0 : "Value should be a text string";
|
|
1455
|
-
},
|
|
1462
|
+
}, wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1456
1463
|
__proto__: null,
|
|
1457
1464
|
VALID_EMAIL: de,
|
|
1458
|
-
VALID_HTTP_URL:
|
|
1459
|
-
isEmail:
|
|
1460
|
-
isOneOrMultipleEmails:
|
|
1461
|
-
isRequired:
|
|
1462
|
-
isSameAs:
|
|
1463
|
-
isStringOfLength:
|
|
1464
|
-
stringContains:
|
|
1465
|
+
VALID_HTTP_URL: ws,
|
|
1466
|
+
isEmail: $s,
|
|
1467
|
+
isOneOrMultipleEmails: Ss,
|
|
1468
|
+
isRequired: _s,
|
|
1469
|
+
isSameAs: Is,
|
|
1470
|
+
isStringOfLength: Bs,
|
|
1471
|
+
stringContains: Vs
|
|
1465
1472
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1466
|
-
function
|
|
1473
|
+
function Ls(e) {
|
|
1467
1474
|
const {
|
|
1468
1475
|
skipCalculation: s,
|
|
1469
1476
|
elementToWatchForChanges: l,
|
|
1470
1477
|
itemContainer: u,
|
|
1471
1478
|
trackResize: d = !1,
|
|
1472
1479
|
trackMutations: c = !0
|
|
1473
|
-
} = e || {},
|
|
1474
|
-
const
|
|
1475
|
-
if (s != null && s.value || !
|
|
1480
|
+
} = e || {}, v = R(0), h = () => {
|
|
1481
|
+
const b = u.value;
|
|
1482
|
+
if (s != null && s.value || !b)
|
|
1476
1483
|
return;
|
|
1477
|
-
const o =
|
|
1478
|
-
let
|
|
1484
|
+
const o = b.children;
|
|
1485
|
+
let w = 0, p = 0, g;
|
|
1479
1486
|
for (const k of o) {
|
|
1480
|
-
const
|
|
1481
|
-
se(
|
|
1487
|
+
const L = k.offsetTop;
|
|
1488
|
+
se(g) ? (g = L, w += 1) : L === g && (w += 1), p += 1;
|
|
1482
1489
|
}
|
|
1483
|
-
|
|
1490
|
+
v.value = p - w;
|
|
1484
1491
|
};
|
|
1485
|
-
return d &&
|
|
1492
|
+
return d && Qe(l, h), c && Ye(l, h, {
|
|
1486
1493
|
childList: !0,
|
|
1487
1494
|
subtree: !0
|
|
1488
1495
|
}), {
|
|
1489
|
-
hiddenItemCount:
|
|
1496
|
+
hiddenItemCount: v
|
|
1490
1497
|
};
|
|
1491
1498
|
}
|
|
1492
|
-
function
|
|
1499
|
+
function js(e) {
|
|
1493
1500
|
const { props: s, emit: l, dynamicVisibility: u } = e;
|
|
1494
1501
|
let d;
|
|
1495
1502
|
if (u) {
|
|
1496
|
-
const { elementToWatchForChanges: o, itemContainer:
|
|
1497
|
-
d =
|
|
1498
|
-
skipCalculation:
|
|
1499
|
-
var
|
|
1500
|
-
return !((
|
|
1503
|
+
const { elementToWatchForChanges: o, itemContainer: w } = u;
|
|
1504
|
+
d = Ls({
|
|
1505
|
+
skipCalculation: r(() => {
|
|
1506
|
+
var g;
|
|
1507
|
+
return !((g = s.multiple) != null && g.value);
|
|
1501
1508
|
}),
|
|
1502
1509
|
elementToWatchForChanges: o,
|
|
1503
|
-
itemContainer:
|
|
1510
|
+
itemContainer: w
|
|
1504
1511
|
}).hiddenItemCount;
|
|
1505
1512
|
} else
|
|
1506
|
-
d =
|
|
1507
|
-
const c =
|
|
1513
|
+
d = R(0);
|
|
1514
|
+
const c = r({
|
|
1508
1515
|
get: () => {
|
|
1509
|
-
var
|
|
1510
|
-
const o = (
|
|
1511
|
-
return (p = s.multiple) != null && p.value ?
|
|
1516
|
+
var w, p;
|
|
1517
|
+
const o = (w = s.modelValue) == null ? void 0 : w.value;
|
|
1518
|
+
return (p = s.multiple) != null && p.value ? D(o) ? o : [] : D(o) ? void 0 : o;
|
|
1512
1519
|
},
|
|
1513
1520
|
set: (o) => {
|
|
1514
|
-
var
|
|
1515
|
-
if ((
|
|
1521
|
+
var w, p, g;
|
|
1522
|
+
if ((w = s.multiple) != null && w.value && !D(o)) {
|
|
1516
1523
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1517
1524
|
return;
|
|
1518
|
-
} else if (!((p = s.multiple) != null && p.value) &&
|
|
1525
|
+
} else if (!((p = s.multiple) != null && p.value) && D(o)) {
|
|
1519
1526
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1520
1527
|
return;
|
|
1521
1528
|
}
|
|
1522
|
-
l("update:modelValue", (
|
|
1529
|
+
l("update:modelValue", (g = s.multiple) != null && g.value ? o || [] : o);
|
|
1523
1530
|
}
|
|
1524
|
-
}),
|
|
1531
|
+
}), v = (o) => D(o);
|
|
1525
1532
|
return {
|
|
1526
1533
|
selectedValue: c,
|
|
1527
1534
|
hiddenSelectedItemCount: d,
|
|
1528
|
-
isArrayValue:
|
|
1529
|
-
isMultiItemArrayValue: (o) =>
|
|
1530
|
-
firstItem: (o) =>
|
|
1535
|
+
isArrayValue: v,
|
|
1536
|
+
isMultiItemArrayValue: (o) => D(o) && o.length > 1,
|
|
1537
|
+
firstItem: (o) => v(o) ? o[0] : o
|
|
1531
1538
|
};
|
|
1532
1539
|
}
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
],
|
|
1540
|
+
const Os = (e) => (ve("data-v-60cf597b"), e = e(), xe(), e), Ps = /* @__PURE__ */ Os(() => /* @__PURE__ */ i("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), Ms = [
|
|
1541
|
+
Ps
|
|
1542
|
+
], As = /* @__PURE__ */ A({
|
|
1536
1543
|
__name: "Bar",
|
|
1537
1544
|
props: {
|
|
1538
1545
|
loading: { type: Boolean }
|
|
1539
1546
|
},
|
|
1540
1547
|
setup(e) {
|
|
1541
|
-
return (s, l) => (
|
|
1542
|
-
class:
|
|
1548
|
+
return (s, l) => (n(), f("div", {
|
|
1549
|
+
class: x([
|
|
1543
1550
|
"relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
|
|
1544
1551
|
e.loading ? "opacity-100" : "opacity-0"
|
|
1545
1552
|
])
|
|
1546
|
-
},
|
|
1553
|
+
}, Ms, 2));
|
|
1547
1554
|
}
|
|
1548
1555
|
});
|
|
1549
|
-
const
|
|
1556
|
+
const Fs = /* @__PURE__ */ ue(As, [["__scopeId", "data-v-60cf597b"]]), Ts = { class: "flex items-center justify-between w-full" }, Rs = { class: "block truncate grow text-left" }, zs = { class: "pointer-events-none shrink-0 ml-1 flex items-center" }, Ds = ["disabled"], Es = {
|
|
1550
1557
|
key: 0,
|
|
1551
1558
|
class: "flex flex-col mx-1 mb-1"
|
|
1552
|
-
},
|
|
1559
|
+
}, qs = /* @__PURE__ */ i("span", { class: "sr-only label text-foreground" }, "Search", -1), Us = { class: "relative" }, Ws = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, Hs = ["placeholder"], Ks = {
|
|
1553
1560
|
key: 0,
|
|
1554
1561
|
class: "px-1"
|
|
1555
|
-
},
|
|
1556
|
-
class: /* @__PURE__ */
|
|
1557
|
-
},
|
|
1562
|
+
}, Xs = { key: 1 }, Ns = /* @__PURE__ */ i("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷♂️", -1), Gs = {
|
|
1563
|
+
class: /* @__PURE__ */ x(["block truncate"])
|
|
1564
|
+
}, Js = ["id"], Qs = /* @__PURE__ */ A({
|
|
1558
1565
|
__name: "Base",
|
|
1559
1566
|
props: {
|
|
1560
1567
|
multiple: {
|
|
@@ -1690,138 +1697,138 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
1690
1697
|
validateOnMount: s.validateOnMount,
|
|
1691
1698
|
validateOnValueUpdate: s.validateOnValueUpdate,
|
|
1692
1699
|
initialValue: s.modelValue
|
|
1693
|
-
}), d =
|
|
1694
|
-
const
|
|
1695
|
-
return !
|
|
1696
|
-
}), p =
|
|
1697
|
-
() =>
|
|
1698
|
-
),
|
|
1700
|
+
}), d = R(null), c = R(""), v = R([]), h = R(!1), b = R(ie()), o = r(() => t(s.label) || t(s.name)), w = r(() => {
|
|
1701
|
+
const m = u.value;
|
|
1702
|
+
return !m || !t(s.useLabelInErrors) ? m : m.replace("Value", o.value);
|
|
1703
|
+
}), p = r(() => w.value || t(s.help)), g = r(() => !!p.value), k = r(
|
|
1704
|
+
() => g.value ? `${t(s.name)}-${b.value}` : void 0
|
|
1705
|
+
), L = r(
|
|
1699
1706
|
() => u.value ? "text-danger" : "text-foreground-2"
|
|
1700
|
-
),
|
|
1707
|
+
), y = r(
|
|
1701
1708
|
() => s.buttonStyle !== "simple" && s.clearable && !s.disabled
|
|
1702
|
-
),
|
|
1703
|
-
const
|
|
1704
|
-
return s.buttonStyle !== "simple" && (
|
|
1705
|
-
}),
|
|
1706
|
-
const
|
|
1707
|
-
return s.buttonStyle !== "simple" &&
|
|
1708
|
-
|
|
1709
|
-
),
|
|
1710
|
-
}),
|
|
1711
|
-
const
|
|
1709
|
+
), _ = r(() => {
|
|
1710
|
+
const m = ["relative flex group", s.showLabel ? "mt-1" : ""];
|
|
1711
|
+
return s.buttonStyle !== "simple" && (m.push("hover:shadow rounded-md"), m.push("outline outline-2 outline-primary-muted")), s.fixedHeight && m.push("h-8"), m.join(" ");
|
|
1712
|
+
}), I = r(() => {
|
|
1713
|
+
const m = [];
|
|
1714
|
+
return s.buttonStyle !== "simple" && m.push(
|
|
1715
|
+
M.value ? "bg-foundation-disabled text-foreground-disabled" : ""
|
|
1716
|
+
), M.value && m.push("cursor-not-allowed"), m.join(" ");
|
|
1717
|
+
}), C = r(() => {
|
|
1718
|
+
const m = [
|
|
1712
1719
|
"relative z-[1]",
|
|
1713
1720
|
"flex items-center justify-center text-center shrink-0",
|
|
1714
1721
|
"rounded-r-md overflow-hidden transition-all",
|
|
1715
|
-
ce.value ? `w-6 ${
|
|
1722
|
+
ce.value ? `w-6 ${I.value}` : "w-0"
|
|
1716
1723
|
];
|
|
1717
|
-
return
|
|
1724
|
+
return M.value || m.push(
|
|
1718
1725
|
"bg-primary-muted hover:bg-primary hover:text-foreground-on-primary"
|
|
1719
|
-
),
|
|
1720
|
-
}),
|
|
1721
|
-
const
|
|
1726
|
+
), m.join(" ");
|
|
1727
|
+
}), W = r(() => {
|
|
1728
|
+
const m = [
|
|
1722
1729
|
"relative z-[2]",
|
|
1723
1730
|
"normal rounded-md cursor-pointer transition truncate flex-1",
|
|
1724
1731
|
"flex items-center",
|
|
1725
|
-
|
|
1732
|
+
I.value
|
|
1726
1733
|
];
|
|
1727
|
-
return s.buttonStyle !== "simple" && (
|
|
1728
|
-
}),
|
|
1734
|
+
return s.buttonStyle !== "simple" && (m.push("py-2 px-3"), M.value || m.push("bg-foundation text-foreground")), y.value && ce.value && m.push("rounded-r-none"), m.join(" ");
|
|
1735
|
+
}), a = r(
|
|
1729
1736
|
() => !!(s.search && (s.filterPredicate || s.getSearchResults))
|
|
1730
|
-
),
|
|
1731
|
-
() => s.disabled || !s.items.length && !
|
|
1732
|
-
),
|
|
1737
|
+
), B = r(() => a.value && s.getSearchResults), M = r(
|
|
1738
|
+
() => s.disabled || !s.items.length && !B.value
|
|
1739
|
+
), V = r({
|
|
1733
1740
|
get: () => {
|
|
1734
|
-
const
|
|
1735
|
-
return s.multiple ?
|
|
1741
|
+
const m = l.value;
|
|
1742
|
+
return s.multiple ? D(m) ? m : [] : D(m) ? void 0 : m;
|
|
1736
1743
|
},
|
|
1737
|
-
set: (
|
|
1738
|
-
if (s.multiple && !
|
|
1744
|
+
set: (m) => {
|
|
1745
|
+
if (s.multiple && !D(m)) {
|
|
1739
1746
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1740
1747
|
return;
|
|
1741
|
-
} else if (!s.multiple &&
|
|
1748
|
+
} else if (!s.multiple && D(m)) {
|
|
1742
1749
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1743
1750
|
return;
|
|
1744
1751
|
}
|
|
1745
1752
|
if (s.multiple)
|
|
1746
|
-
l.value =
|
|
1753
|
+
l.value = m || [];
|
|
1747
1754
|
else {
|
|
1748
|
-
const
|
|
1749
|
-
l.value =
|
|
1755
|
+
const F = l.value, O = s.allowUnset && F && m && ee(F) === ee(m);
|
|
1756
|
+
l.value = O ? void 0 : m;
|
|
1750
1757
|
}
|
|
1751
1758
|
}
|
|
1752
|
-
}), ce =
|
|
1753
|
-
s.multiple ?
|
|
1754
|
-
}, Be =
|
|
1755
|
-
const
|
|
1756
|
-
return !
|
|
1757
|
-
(
|
|
1758
|
-
var
|
|
1759
|
-
return ((
|
|
1759
|
+
}), ce = r(() => s.multiple ? V.value.length !== 0 : !!V.value), Ie = () => {
|
|
1760
|
+
s.multiple ? V.value = [] : V.value = void 0;
|
|
1761
|
+
}, Be = r(() => {
|
|
1762
|
+
const m = c.value;
|
|
1763
|
+
return !a.value || !(m != null && m.length) ? v.value : s.filterPredicate ? v.value.filter(
|
|
1764
|
+
(F) => {
|
|
1765
|
+
var O;
|
|
1766
|
+
return ((O = s.filterPredicate) == null ? void 0 : O.call(s, F, m)) || !1;
|
|
1760
1767
|
}
|
|
1761
|
-
) :
|
|
1762
|
-
}), fe = (
|
|
1763
|
-
if (console.log("triggerSearch"), !(!
|
|
1764
|
-
|
|
1768
|
+
) : v.value;
|
|
1769
|
+
}), fe = (m) => JSON.stringify(m), ee = (m) => s.by ? m[s.by] : m, pe = async () => {
|
|
1770
|
+
if (console.log("triggerSearch"), !(!B.value || !s.getSearchResults)) {
|
|
1771
|
+
h.value = !0;
|
|
1765
1772
|
try {
|
|
1766
|
-
|
|
1773
|
+
v.value = await s.getSearchResults(c.value);
|
|
1767
1774
|
} finally {
|
|
1768
|
-
|
|
1775
|
+
h.value = !1;
|
|
1769
1776
|
}
|
|
1770
1777
|
}
|
|
1771
1778
|
}, Ve = Pe(pe, 1e3);
|
|
1772
1779
|
return me(
|
|
1773
1780
|
() => s.items,
|
|
1774
|
-
(
|
|
1775
|
-
|
|
1781
|
+
(m) => {
|
|
1782
|
+
v.value = m.slice();
|
|
1776
1783
|
},
|
|
1777
1784
|
{ immediate: !0 }
|
|
1778
1785
|
), me(c, () => {
|
|
1779
|
-
|
|
1786
|
+
B.value && Ve();
|
|
1780
1787
|
}), ke(() => {
|
|
1781
|
-
|
|
1782
|
-
}), (
|
|
1783
|
-
|
|
1784
|
-
modelValue: t(
|
|
1785
|
-
"onUpdate:modelValue":
|
|
1788
|
+
B.value && !s.items.length && pe();
|
|
1789
|
+
}), (m, F) => (n(), f("div", null, [
|
|
1790
|
+
P(t(et), {
|
|
1791
|
+
modelValue: t(V),
|
|
1792
|
+
"onUpdate:modelValue": F[4] || (F[4] = (O) => Z(V) ? V.value = O : null),
|
|
1786
1793
|
name: e.name,
|
|
1787
1794
|
multiple: e.multiple,
|
|
1788
1795
|
by: e.by,
|
|
1789
|
-
disabled: t(
|
|
1796
|
+
disabled: t(M),
|
|
1790
1797
|
as: "div"
|
|
1791
1798
|
}, {
|
|
1792
|
-
default:
|
|
1793
|
-
|
|
1794
|
-
class:
|
|
1799
|
+
default: T(() => [
|
|
1800
|
+
P(t(tt), {
|
|
1801
|
+
class: x(["block label text-foreground", { "sr-only": !e.showLabel }])
|
|
1795
1802
|
}, {
|
|
1796
|
-
default:
|
|
1797
|
-
|
|
1803
|
+
default: T(() => [
|
|
1804
|
+
z($(e.label), 1)
|
|
1798
1805
|
]),
|
|
1799
1806
|
_: 1
|
|
1800
1807
|
}, 8, ["class"]),
|
|
1801
|
-
|
|
1802
|
-
class:
|
|
1808
|
+
i("div", {
|
|
1809
|
+
class: x(t(_))
|
|
1803
1810
|
}, [
|
|
1804
|
-
|
|
1805
|
-
class:
|
|
1811
|
+
P(t(st), {
|
|
1812
|
+
class: x(t(W))
|
|
1806
1813
|
}, {
|
|
1807
|
-
default:
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
!t(
|
|
1811
|
-
|
|
1812
|
-
]) : E(
|
|
1814
|
+
default: T(({ open: O }) => [
|
|
1815
|
+
i("div", Ts, [
|
|
1816
|
+
i("div", Rs, [
|
|
1817
|
+
!t(V) || t(D)(t(V)) && !t(V).length ? E(m.$slots, "nothing-selected", { key: 0 }, () => [
|
|
1818
|
+
z($(e.label), 1)
|
|
1819
|
+
]) : E(m.$slots, "something-selected", {
|
|
1813
1820
|
key: 1,
|
|
1814
|
-
value: t(
|
|
1821
|
+
value: t(V)
|
|
1815
1822
|
}, () => [
|
|
1816
|
-
|
|
1823
|
+
z($(fe(t(V))), 1)
|
|
1817
1824
|
])
|
|
1818
1825
|
]),
|
|
1819
|
-
|
|
1820
|
-
|
|
1826
|
+
i("div", zs, [
|
|
1827
|
+
O ? (n(), j(t(Ae), {
|
|
1821
1828
|
key: 0,
|
|
1822
1829
|
class: "h-4 w-4 text-foreground",
|
|
1823
1830
|
"aria-hidden": "true"
|
|
1824
|
-
})) : (
|
|
1831
|
+
})) : (n(), j(t(Fe), {
|
|
1825
1832
|
key: 1,
|
|
1826
1833
|
class: "h-4 w-4 text-foreground",
|
|
1827
1834
|
"aria-hidden": "true"
|
|
@@ -1831,97 +1838,97 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
1831
1838
|
]),
|
|
1832
1839
|
_: 3
|
|
1833
1840
|
}, 8, ["class"]),
|
|
1834
|
-
t(
|
|
1841
|
+
t(y) ? J((n(), f("button", {
|
|
1835
1842
|
key: 0,
|
|
1836
|
-
class:
|
|
1843
|
+
class: x(t(C)),
|
|
1837
1844
|
disabled: e.disabled,
|
|
1838
|
-
onClick:
|
|
1845
|
+
onClick: F[0] || (F[0] = (O) => Ie())
|
|
1839
1846
|
}, [
|
|
1840
|
-
|
|
1841
|
-
], 10,
|
|
1842
|
-
[t(
|
|
1843
|
-
]) :
|
|
1844
|
-
|
|
1847
|
+
P(t(Te), { class: "w-3 h-3" })
|
|
1848
|
+
], 10, Ds)), [
|
|
1849
|
+
[t(at), "Clear"]
|
|
1850
|
+
]) : S("", !0),
|
|
1851
|
+
P(ye, {
|
|
1845
1852
|
"leave-active-class": "transition ease-in duration-100",
|
|
1846
1853
|
"leave-from-class": "opacity-100",
|
|
1847
1854
|
"leave-to-class": "opacity-0"
|
|
1848
1855
|
}, {
|
|
1849
|
-
default:
|
|
1850
|
-
|
|
1856
|
+
default: T(() => [
|
|
1857
|
+
P(t(lt), {
|
|
1851
1858
|
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",
|
|
1852
|
-
onFocus:
|
|
1853
|
-
var
|
|
1854
|
-
return (
|
|
1859
|
+
onFocus: F[3] || (F[3] = (O) => {
|
|
1860
|
+
var H;
|
|
1861
|
+
return (H = d.value) == null ? void 0 : H.focus();
|
|
1855
1862
|
})
|
|
1856
1863
|
}, {
|
|
1857
|
-
default:
|
|
1858
|
-
t(
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1864
|
+
default: T(() => [
|
|
1865
|
+
t(a) ? (n(), f("label", Es, [
|
|
1866
|
+
qs,
|
|
1867
|
+
i("div", Us, [
|
|
1868
|
+
i("div", Ws, [
|
|
1869
|
+
P(t(Re), { class: "h-5 w-5 text-foreground" })
|
|
1863
1870
|
]),
|
|
1864
|
-
J(
|
|
1871
|
+
J(i("input", {
|
|
1865
1872
|
ref_key: "searchInput",
|
|
1866
1873
|
ref: d,
|
|
1867
|
-
"onUpdate:modelValue":
|
|
1874
|
+
"onUpdate:modelValue": F[1] || (F[1] = (O) => c.value = O),
|
|
1868
1875
|
type: "text",
|
|
1869
1876
|
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",
|
|
1870
1877
|
placeholder: e.searchPlaceholder,
|
|
1871
|
-
onKeydown:
|
|
1878
|
+
onKeydown: F[2] || (F[2] = Oe(() => {
|
|
1872
1879
|
}, ["stop"]))
|
|
1873
|
-
}, null, 40,
|
|
1880
|
+
}, null, 40, Hs), [
|
|
1874
1881
|
[Ce, c.value]
|
|
1875
1882
|
])
|
|
1876
1883
|
])
|
|
1877
|
-
])) :
|
|
1878
|
-
|
|
1879
|
-
class:
|
|
1884
|
+
])) : S("", !0),
|
|
1885
|
+
i("div", {
|
|
1886
|
+
class: x(["overflow-auto simple-scrollbar", [t(a) ? "max-h-52" : "max-h-60"]])
|
|
1880
1887
|
}, [
|
|
1881
|
-
t(
|
|
1882
|
-
|
|
1883
|
-
])) : t(
|
|
1884
|
-
E(
|
|
1885
|
-
|
|
1888
|
+
t(B) && h.value ? (n(), f("div", Ks, [
|
|
1889
|
+
P(Fs, { loading: !0 })
|
|
1890
|
+
])) : t(B) && !v.value.length ? (n(), f("div", Xs, [
|
|
1891
|
+
E(m.$slots, "nothing-found", {}, () => [
|
|
1892
|
+
Ns
|
|
1886
1893
|
])
|
|
1887
|
-
])) :
|
|
1888
|
-
!t(
|
|
1889
|
-
key: ee(
|
|
1890
|
-
value:
|
|
1894
|
+
])) : S("", !0),
|
|
1895
|
+
!t(B) || !h.value ? (n(!0), f(U, { key: 2 }, Y(t(Be), (O) => (n(), j(t(nt), {
|
|
1896
|
+
key: ee(O),
|
|
1897
|
+
value: O
|
|
1891
1898
|
}, {
|
|
1892
|
-
default:
|
|
1893
|
-
|
|
1894
|
-
class:
|
|
1895
|
-
|
|
1899
|
+
default: T(({ active: H, selected: he }) => [
|
|
1900
|
+
i("li", {
|
|
1901
|
+
class: x([
|
|
1902
|
+
H ? "text-primary" : "text-foreground",
|
|
1896
1903
|
"relative transition cursor-pointer select-none py-1.5 pl-3",
|
|
1897
1904
|
e.hideCheckmarks ? "" : "pr-9"
|
|
1898
1905
|
])
|
|
1899
1906
|
}, [
|
|
1900
|
-
|
|
1901
|
-
E(
|
|
1902
|
-
item:
|
|
1903
|
-
active:
|
|
1907
|
+
i("span", Gs, [
|
|
1908
|
+
E(m.$slots, "option", {
|
|
1909
|
+
item: O,
|
|
1910
|
+
active: H,
|
|
1904
1911
|
selected: he
|
|
1905
1912
|
}, () => [
|
|
1906
|
-
|
|
1913
|
+
z($(fe(O)), 1)
|
|
1907
1914
|
])
|
|
1908
1915
|
]),
|
|
1909
|
-
!e.hideCheckmarks && he ? (
|
|
1916
|
+
!e.hideCheckmarks && he ? (n(), f("span", {
|
|
1910
1917
|
key: 0,
|
|
1911
|
-
class:
|
|
1912
|
-
|
|
1918
|
+
class: x([
|
|
1919
|
+
H ? "text-primary" : "text-foreground",
|
|
1913
1920
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
1914
1921
|
])
|
|
1915
1922
|
}, [
|
|
1916
|
-
|
|
1923
|
+
P(t(ze), {
|
|
1917
1924
|
class: "h-5 w-5",
|
|
1918
1925
|
"aria-hidden": "true"
|
|
1919
1926
|
})
|
|
1920
|
-
], 2)) :
|
|
1927
|
+
], 2)) : S("", !0)
|
|
1921
1928
|
], 2)
|
|
1922
1929
|
]),
|
|
1923
1930
|
_: 2
|
|
1924
|
-
}, 1032, ["value"]))), 128)) :
|
|
1931
|
+
}, 1032, ["value"]))), 128)) : S("", !0)
|
|
1925
1932
|
], 2)
|
|
1926
1933
|
]),
|
|
1927
1934
|
_: 3
|
|
@@ -1933,37 +1940,37 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
1933
1940
|
]),
|
|
1934
1941
|
_: 3
|
|
1935
1942
|
}, 8, ["modelValue", "name", "multiple", "by", "disabled"]),
|
|
1936
|
-
t(k) ? (
|
|
1943
|
+
t(k) ? (n(), f("p", {
|
|
1937
1944
|
key: 0,
|
|
1938
1945
|
id: t(k),
|
|
1939
|
-
class:
|
|
1940
|
-
},
|
|
1946
|
+
class: x(["mt-2 ml-3 text-sm", t(L)])
|
|
1947
|
+
}, $(t(p)), 11, Js)) : S("", !0)
|
|
1941
1948
|
]));
|
|
1942
1949
|
}
|
|
1943
|
-
}),
|
|
1950
|
+
}), Ys = /* @__PURE__ */ A({
|
|
1944
1951
|
__name: "SourceAppBadge",
|
|
1945
1952
|
props: {
|
|
1946
1953
|
sourceApp: null
|
|
1947
1954
|
},
|
|
1948
1955
|
setup(e) {
|
|
1949
|
-
return (s, l) => (
|
|
1956
|
+
return (s, l) => (n(), j(wt, {
|
|
1950
1957
|
"color-classes": "text-foreground-on-primary",
|
|
1951
1958
|
rounded: "",
|
|
1952
1959
|
style: te({ backgroundColor: e.sourceApp.bgColor })
|
|
1953
1960
|
}, {
|
|
1954
|
-
default:
|
|
1955
|
-
|
|
1961
|
+
default: T(() => [
|
|
1962
|
+
z($(e.sourceApp.short), 1)
|
|
1956
1963
|
]),
|
|
1957
1964
|
_: 1
|
|
1958
1965
|
}, 8, ["style"]));
|
|
1959
1966
|
}
|
|
1960
|
-
}),
|
|
1967
|
+
}), Zs = {
|
|
1961
1968
|
key: 0,
|
|
1962
1969
|
class: "text-foreground-2 normal"
|
|
1963
|
-
},
|
|
1970
|
+
}, el = {
|
|
1964
1971
|
key: 1,
|
|
1965
1972
|
class: "flex items-center"
|
|
1966
|
-
},
|
|
1973
|
+
}, tl = { class: "truncate" }, sl = { class: "flex items-center" }, ll = { class: "truncate" }, $l = /* @__PURE__ */ A({
|
|
1967
1974
|
__name: "SourceApps",
|
|
1968
1975
|
props: {
|
|
1969
1976
|
/**
|
|
@@ -2023,16 +2030,16 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
2023
2030
|
},
|
|
2024
2031
|
emits: ["update:modelValue"],
|
|
2025
2032
|
setup(e, { emit: s }) {
|
|
2026
|
-
const l = e, u =
|
|
2033
|
+
const l = e, u = R(null), d = R(null), { selectedValue: c, hiddenSelectedItemCount: v, isMultiItemArrayValue: h, firstItem: b } = js({
|
|
2027
2034
|
props: G(l),
|
|
2028
2035
|
emit: s,
|
|
2029
2036
|
dynamicVisibility: { elementToWatchForChanges: u, itemContainer: d }
|
|
2030
|
-
}), o = (
|
|
2031
|
-
return (
|
|
2037
|
+
}), o = (w, p) => w.name.toLocaleLowerCase().includes(p.toLocaleLowerCase());
|
|
2038
|
+
return (w, p) => (n(), j(Qs, {
|
|
2032
2039
|
modelValue: t(c),
|
|
2033
|
-
"onUpdate:modelValue": p[0] || (p[0] = (
|
|
2040
|
+
"onUpdate:modelValue": p[0] || (p[0] = (g) => Z(c) ? c.value = g : null),
|
|
2034
2041
|
multiple: e.multiple,
|
|
2035
|
-
items: e.items ?? t(
|
|
2042
|
+
items: e.items ?? t(Ge),
|
|
2036
2043
|
search: e.search,
|
|
2037
2044
|
"search-placeholder": e.searchPlaceholder,
|
|
2038
2045
|
label: e.label,
|
|
@@ -2041,46 +2048,46 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
2041
2048
|
"filter-predicate": o,
|
|
2042
2049
|
by: "name"
|
|
2043
2050
|
}, {
|
|
2044
|
-
"nothing-selected":
|
|
2045
|
-
e.selectorPlaceholder ? (
|
|
2046
|
-
|
|
2047
|
-
], 64)) : (
|
|
2048
|
-
|
|
2051
|
+
"nothing-selected": T(() => [
|
|
2052
|
+
e.selectorPlaceholder ? (n(), f(U, { key: 0 }, [
|
|
2053
|
+
z($(e.selectorPlaceholder), 1)
|
|
2054
|
+
], 64)) : (n(), f(U, { key: 1 }, [
|
|
2055
|
+
z($(e.multiple ? "Select apps" : "Select an app"), 1)
|
|
2049
2056
|
], 64))
|
|
2050
2057
|
]),
|
|
2051
|
-
"something-selected":
|
|
2052
|
-
t(
|
|
2058
|
+
"something-selected": T(({ value: g }) => [
|
|
2059
|
+
t(h)(g) ? (n(), f("div", {
|
|
2053
2060
|
key: 0,
|
|
2054
2061
|
ref_key: "elementToWatchForChanges",
|
|
2055
2062
|
ref: u,
|
|
2056
2063
|
class: "flex items-center space-x-0.5 h-5"
|
|
2057
2064
|
}, [
|
|
2058
|
-
|
|
2065
|
+
i("div", {
|
|
2059
2066
|
ref_key: "itemContainer",
|
|
2060
2067
|
ref: d,
|
|
2061
2068
|
class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
|
|
2062
2069
|
}, [
|
|
2063
|
-
(
|
|
2070
|
+
(n(!0), f(U, null, Y(g, (k) => (n(), j(Ys, {
|
|
2064
2071
|
key: k.name,
|
|
2065
2072
|
"source-app": k
|
|
2066
2073
|
}, null, 8, ["source-app"]))), 128))
|
|
2067
2074
|
], 512),
|
|
2068
|
-
t(
|
|
2069
|
-
], 512)) : (
|
|
2070
|
-
|
|
2075
|
+
t(v) > 0 ? (n(), f("div", Zs, " +" + $(t(v)), 1)) : S("", !0)
|
|
2076
|
+
], 512)) : (n(), f("div", el, [
|
|
2077
|
+
i("div", {
|
|
2071
2078
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2072
|
-
style: te({ backgroundColor: t(
|
|
2079
|
+
style: te({ backgroundColor: t(b)(g).bgColor })
|
|
2073
2080
|
}, null, 4),
|
|
2074
|
-
|
|
2081
|
+
i("span", tl, $(t(b)(g).name), 1)
|
|
2075
2082
|
]))
|
|
2076
2083
|
]),
|
|
2077
|
-
option:
|
|
2078
|
-
|
|
2079
|
-
|
|
2084
|
+
option: T(({ item: g }) => [
|
|
2085
|
+
i("div", sl, [
|
|
2086
|
+
i("div", {
|
|
2080
2087
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2081
|
-
style: te({ backgroundColor:
|
|
2088
|
+
style: te({ backgroundColor: g.bgColor })
|
|
2082
2089
|
}, null, 4),
|
|
2083
|
-
|
|
2090
|
+
i("span", ll, $(g.name), 1)
|
|
2084
2091
|
])
|
|
2085
2092
|
]),
|
|
2086
2093
|
_: 1
|
|
@@ -2088,7 +2095,7 @@ const As = /* @__PURE__ */ ue(Ms, [["__scopeId", "data-v-60cf597b"]]), Fs = { cl
|
|
|
2088
2095
|
}
|
|
2089
2096
|
});
|
|
2090
2097
|
var N = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(N || {});
|
|
2091
|
-
const ne =
|
|
2098
|
+
const ne = Je(), nl = {
|
|
2092
2099
|
[
|
|
2093
2100
|
"cmd-or-ctrl"
|
|
2094
2101
|
/* CtrlOrCmd */
|
|
@@ -2099,17 +2106,17 @@ const ne = We(), ll = {
|
|
|
2099
2106
|
]: ne === le.Mac ? "Opt" : "Alt",
|
|
2100
2107
|
shift: "Shift"
|
|
2101
2108
|
};
|
|
2102
|
-
function
|
|
2109
|
+
function Sl(e) {
|
|
2103
2110
|
const s = (l) => Object.values(N).includes(l);
|
|
2104
|
-
return e.map((l) => s(l) ?
|
|
2111
|
+
return e.map((l) => s(l) ? nl[l] : l).join("+");
|
|
2105
2112
|
}
|
|
2106
|
-
function
|
|
2107
|
-
|
|
2113
|
+
function _l(e, ...s) {
|
|
2114
|
+
Ze(
|
|
2108
2115
|
s[0],
|
|
2109
2116
|
(l) => {
|
|
2110
2117
|
const u = l.getModifierState("Alt"), d = ne === le.Mac ? l.getModifierState("Meta") : l.getModifierState("Control"), c = l.getModifierState("Shift");
|
|
2111
|
-
for (const
|
|
2112
|
-
switch (
|
|
2118
|
+
for (const v of e)
|
|
2119
|
+
switch (v) {
|
|
2113
2120
|
case N.CtrlOrCmd:
|
|
2114
2121
|
if (!d)
|
|
2115
2122
|
return;
|
|
@@ -2129,27 +2136,27 @@ function Sl(e, ...s) {
|
|
|
2129
2136
|
);
|
|
2130
2137
|
}
|
|
2131
2138
|
export {
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2139
|
+
wt as CommonBadge,
|
|
2140
|
+
Fs as CommonLoadingBar,
|
|
2141
|
+
yl as CommonStepsBullet,
|
|
2142
|
+
bl as CommonStepsNumber,
|
|
2143
|
+
ut as CommonTextLink,
|
|
2144
|
+
it as FormButton,
|
|
2145
|
+
vl as FormCardButton,
|
|
2146
|
+
xl as FormCheckbox,
|
|
2147
|
+
Qs as FormSelectBase,
|
|
2148
|
+
$l as FormSelectSourceApps,
|
|
2149
|
+
kl as FormTextArea,
|
|
2150
|
+
Cl as FormTextInput,
|
|
2151
|
+
gl as GlobalToastRenderer,
|
|
2145
2152
|
N as ModifierKeys,
|
|
2146
|
-
|
|
2153
|
+
Ys as SourceAppBadge,
|
|
2147
2154
|
X as TailwindBreakpoints,
|
|
2148
2155
|
K as ToastNotificationType,
|
|
2149
|
-
|
|
2156
|
+
wl as ValidationHelpers,
|
|
2150
2157
|
ne as clientOs,
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2158
|
+
Sl as getKeyboardShortcutTitle,
|
|
2159
|
+
_l as onKeyboardShortcut,
|
|
2160
|
+
js as useFormSelectChildInternals,
|
|
2161
|
+
Ls as useWrappingContainerHiddenCount
|
|
2155
2162
|
};
|