@speckle/ui-components 2.16.1-alpha6 → 2.16.1-alpha8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AvatarEditor-1bbae637.js +193 -0
- package/dist/AvatarEditor-1bbae637.js.map +1 -0
- package/dist/AvatarEditor-f4b16291.cjs +2 -0
- package/dist/AvatarEditor-f4b16291.cjs.map +1 -0
- package/dist/components/common/loading/Icon.vue.d.ts +24 -0
- package/dist/components/form/Tags.vue.d.ts +8 -2
- package/dist/components/form/file-upload/Zone.vue.d.ts +62 -0
- package/dist/components/user/Avatar.vue.d.ts +58 -0
- package/dist/components/user/AvatarEditable.vue.d.ts +21 -0
- package/dist/components/user/AvatarEditor.vue.d.ts +26 -0
- package/dist/components/user/AvatarGroup.vue.d.ts +44 -0
- package/dist/composables/form/fileUpload.d.ts +63 -0
- package/dist/composables/form/textInput.d.ts +3 -0
- package/dist/composables/user/avatar.d.ts +19 -0
- package/dist/helpers/common/error.d.ts +28 -0
- package/dist/helpers/form/file.d.ts +41 -0
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.d.ts +10 -2
- package/dist/lib.js +2034 -1581
- package/dist/lib.js.map +1 -1
- package/dist/stories/helpers/avatar.d.ts +1 -0
- package/package.json +2 -1
- package/tsconfig.json +1 -1
package/dist/lib.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
|
|
1
|
+
var mt = Object.defineProperty;
|
|
2
|
+
var vt = (e, t, s) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
|
|
3
|
+
var Q = (e, t, s) => (vt(e, typeof t != "symbol" ? t + "" : t, s), s);
|
|
4
|
+
import { defineComponent as O, resolveDynamicComponent as Z, computed as u, openBlock as a, createBlock as z, normalizeClass as k, withCtx as V, createCommentVNode as S, renderSlot as R, createTextVNode as M, createElementBlock as p, createElementVNode as m, createVNode as _, Transition as Ae, unref as l, toDisplayString as L, toRefs as N, Fragment as U, renderList as q, ref as j, onMounted as se, mergeProps as ye, withDirectives as de, isRef as $e, vModelText as Oe, useSlots as Me, vModelDynamic as gt, pushScopeId as bt, popScopeId as yt, watch as J, withModifiers as ne, normalizeStyle as fe, useModel as xt, onBeforeUnmount as Ne, getCurrentInstance as kt, inject as wt, withKeys as ie, defineAsyncComponent as Ct } from "vue";
|
|
5
|
+
import { isObjectLike as Le, clamp as Ge, isArray as X, isString as Ce, isUndefined as ce, debounce as Te, throttle as $t, noop as It, uniq as St, intersection as Bt, difference as _t } from "lodash";
|
|
6
|
+
import { ArrowPathIcon as Je, ExclamationCircleIcon as Lt, ChevronUpIcon as Ye, ChevronDownIcon as Vt, XMarkIcon as Fe, MagnifyingGlassIcon as zt, CheckIcon as et, Bars3Icon as Pt, Squares2X2Icon as jt, UserCircleIcon as At } from "@heroicons/vue/24/solid";
|
|
7
|
+
import { CheckCircleIcon as Ot, XCircleIcon as Mt, ExclamationCircleIcon as Tt, InformationCircleIcon as Ft, XMarkIcon as Rt, CheckIcon as Et, ExclamationTriangleIcon as Dt } from "@heroicons/vue/24/outline";
|
|
8
|
+
import { XMarkIcon as pe, CheckIcon as tt, CheckCircleIcon as st, ExclamationCircleIcon as Ie, EnvelopeIcon as Ut, KeyIcon as Wt, XCircleIcon as qt, InformationCircleIcon as Kt } from "@heroicons/vue/20/solid";
|
|
9
|
+
import { useField as Re } from "vee-validate";
|
|
10
|
+
import { nanoid as Ee } from "nanoid";
|
|
11
|
+
import { isNullOrUndefined as Ht, SourceApps as Gt, getClientOperatingSystem as Xt, OperatingSystem as Ve, md5 as Zt } from "@speckle/shared";
|
|
12
|
+
import { useResizeObserver as Qt, useMutationObserver as Nt, onKeyDown as Jt, isClient as De, computedAsync as Yt, useFocus as es, useDropZone as ts } from "@vueuse/core";
|
|
13
|
+
import { Listbox as ss, ListboxLabel as ns, ListboxButton as ls, ListboxOptions as as, ListboxOption as os, Switch as rs, TransitionRoot as nt, Dialog as is, TransitionChild as Xe, DialogPanel as us, Disclosure as cs, DisclosureButton as ds, DisclosurePanel as fs, Menu as ps, MenuButton as hs, MenuItems as ms, MenuItem as vs, Combobox as gs, ComboboxOptions as bs, ComboboxOption as ys } from "@headlessui/vue";
|
|
14
|
+
import { directive as lt } from "vue-tippy";
|
|
15
|
+
import xs from "v3-infinite-loading";
|
|
16
|
+
const ks = {
|
|
14
17
|
key: 2,
|
|
15
18
|
style: { margin: "0 !important", width: "0.01px" }
|
|
16
|
-
},
|
|
19
|
+
}, ws = /* @__PURE__ */ O({
|
|
17
20
|
__name: "Button",
|
|
18
21
|
props: {
|
|
19
22
|
/**
|
|
@@ -140,137 +143,137 @@ const as = {
|
|
|
140
143
|
}
|
|
141
144
|
},
|
|
142
145
|
emits: ["click"],
|
|
143
|
-
setup(e, { emit:
|
|
144
|
-
const
|
|
145
|
-
if (!
|
|
146
|
-
return
|
|
147
|
-
}),
|
|
148
|
-
const
|
|
149
|
-
if (
|
|
150
|
-
|
|
151
|
-
|
|
146
|
+
setup(e, { emit: t }) {
|
|
147
|
+
const s = e, n = Z("NuxtLink"), r = Z("RouterLink"), o = u(() => s.linkComponent ? s.linkComponent : s.external ? "a" : Le(n) ? n : Le(r) ? r : "a"), d = u(() => {
|
|
148
|
+
if (!s.to)
|
|
149
|
+
return s.submit ? "submit" : "button";
|
|
150
|
+
}), i = u(() => s.disabled || s.loading), f = u(() => s.loading ? Je : s.iconLeft), c = u(() => {
|
|
151
|
+
const g = [];
|
|
152
|
+
if (g.push("border-2"), i.value)
|
|
153
|
+
g.push(
|
|
154
|
+
s.outlined ? "border-foreground-disabled" : "bg-foundation-disabled border-transparent"
|
|
152
155
|
);
|
|
153
156
|
else
|
|
154
|
-
switch (
|
|
157
|
+
switch (s.color) {
|
|
155
158
|
case "invert":
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
g.push(
|
|
160
|
+
s.outlined ? "border-foundation dark:border-foreground" : "bg-foundation dark:bg-foreground border-transparent"
|
|
158
161
|
);
|
|
159
162
|
break;
|
|
160
163
|
case "card":
|
|
161
|
-
|
|
162
|
-
|
|
164
|
+
g.push(
|
|
165
|
+
s.outlined ? "border-foundation-2 shadow" : "bg-foundation-2 dark:bg-foundation-2 border-foundation shadow"
|
|
163
166
|
);
|
|
164
167
|
break;
|
|
165
168
|
case "danger":
|
|
166
|
-
|
|
169
|
+
g.push(s.outlined ? "border-danger" : "bg-danger border-danger");
|
|
167
170
|
break;
|
|
168
171
|
case "secondary":
|
|
169
|
-
|
|
170
|
-
|
|
172
|
+
g.push(
|
|
173
|
+
s.outlined ? "border-foundation" : "bg-foundation border-foundation-2"
|
|
171
174
|
);
|
|
172
175
|
break;
|
|
173
176
|
case "warning":
|
|
174
|
-
|
|
177
|
+
g.push(s.outlined ? "border-warning" : "bg-warning border-warning");
|
|
175
178
|
break;
|
|
176
179
|
case "info":
|
|
177
|
-
|
|
180
|
+
g.push(s.outlined ? "border-info" : "bg-info border-info");
|
|
178
181
|
break;
|
|
179
182
|
case "success":
|
|
180
|
-
|
|
183
|
+
g.push(s.outlined ? "border-success" : "bg-success border-success");
|
|
181
184
|
break;
|
|
182
185
|
case "default":
|
|
183
186
|
default:
|
|
184
|
-
|
|
185
|
-
|
|
187
|
+
g.push(
|
|
188
|
+
s.outlined ? "border-primary hover:border-primary-focus" : "bg-primary hover:bg-primary-focus border-transparent"
|
|
186
189
|
);
|
|
187
190
|
break;
|
|
188
191
|
}
|
|
189
|
-
return
|
|
190
|
-
}),
|
|
191
|
-
const
|
|
192
|
-
if (!
|
|
193
|
-
if (
|
|
194
|
-
|
|
195
|
-
(
|
|
192
|
+
return g.join(" ");
|
|
193
|
+
}), x = u(() => {
|
|
194
|
+
const g = [];
|
|
195
|
+
if (!s.text && !s.link)
|
|
196
|
+
if (i.value)
|
|
197
|
+
g.push(
|
|
198
|
+
(s.outlined, "text-foreground-disabled")
|
|
196
199
|
);
|
|
197
200
|
else
|
|
198
|
-
switch (
|
|
201
|
+
switch (s.color) {
|
|
199
202
|
case "invert":
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
g.push(
|
|
204
|
+
s.outlined ? "text-foundation dark:text-foreground" : "text-primary"
|
|
202
205
|
);
|
|
203
206
|
break;
|
|
204
207
|
case "card":
|
|
205
|
-
|
|
208
|
+
g.push((s.outlined, "text-foreground"));
|
|
206
209
|
break;
|
|
207
210
|
case "danger":
|
|
208
|
-
|
|
209
|
-
|
|
211
|
+
g.push(
|
|
212
|
+
s.outlined ? "text-danger" : "text-foundation dark:text-foreground"
|
|
210
213
|
);
|
|
211
214
|
break;
|
|
212
215
|
case "warning":
|
|
213
|
-
|
|
214
|
-
|
|
216
|
+
g.push(
|
|
217
|
+
s.outlined ? "text-warning" : "text-foundation dark:text-foreground"
|
|
215
218
|
);
|
|
216
219
|
break;
|
|
217
220
|
case "info":
|
|
218
|
-
|
|
219
|
-
|
|
221
|
+
g.push(
|
|
222
|
+
s.outlined ? "text-info" : "text-foundation dark:text-foreground"
|
|
220
223
|
);
|
|
221
224
|
break;
|
|
222
225
|
case "success":
|
|
223
|
-
|
|
224
|
-
|
|
226
|
+
g.push(
|
|
227
|
+
s.outlined ? "text-success" : "text-foundation dark:text-foreground"
|
|
225
228
|
);
|
|
226
229
|
break;
|
|
227
230
|
case "secondary":
|
|
228
|
-
|
|
229
|
-
(
|
|
231
|
+
g.push(
|
|
232
|
+
(s.outlined, "text-foreground hover:text-primary")
|
|
230
233
|
);
|
|
231
234
|
break;
|
|
232
235
|
case "default":
|
|
233
236
|
default:
|
|
234
|
-
|
|
235
|
-
|
|
237
|
+
g.push(
|
|
238
|
+
s.outlined ? "text-primary hover:text-primary-focus" : "text-foundation dark:text-foreground"
|
|
236
239
|
);
|
|
237
240
|
break;
|
|
238
241
|
}
|
|
239
242
|
else
|
|
240
|
-
|
|
243
|
+
i.value ? g.push("text-foreground-disabled") : s.color === "invert" ? g.push(
|
|
241
244
|
"text-foundation hover:text-foundation-2 dark:text-foreground dark:hover:text-foreground"
|
|
242
|
-
) :
|
|
243
|
-
return
|
|
244
|
-
}),
|
|
245
|
-
const
|
|
246
|
-
return
|
|
247
|
-
}),
|
|
248
|
-
const
|
|
249
|
-
if (!
|
|
250
|
-
switch (
|
|
245
|
+
) : 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");
|
|
246
|
+
return g.join(" ");
|
|
247
|
+
}), v = u(() => {
|
|
248
|
+
const g = [];
|
|
249
|
+
return g.push(s.rounded ? "rounded-full" : "rounded-md"), g.join(" ");
|
|
250
|
+
}), h = u(() => {
|
|
251
|
+
const g = [];
|
|
252
|
+
if (!i.value)
|
|
253
|
+
switch (s.color) {
|
|
251
254
|
case "invert":
|
|
252
|
-
|
|
255
|
+
g.push("hover:ring-4 ring-white/50");
|
|
253
256
|
break;
|
|
254
257
|
case "danger":
|
|
255
|
-
|
|
258
|
+
g.push("hover:ring-4 ring-danger-lighter dark:ring-danger-darker");
|
|
256
259
|
break;
|
|
257
260
|
case "warning":
|
|
258
|
-
|
|
261
|
+
g.push("hover:ring-4 ring-warning-lighter dark:ring-warning-darker");
|
|
259
262
|
break;
|
|
260
263
|
case "info":
|
|
261
|
-
|
|
264
|
+
g.push("hover:ring-4 ring-info-lighter dark:ring-info-darker");
|
|
262
265
|
break;
|
|
263
266
|
case "success":
|
|
264
|
-
|
|
267
|
+
g.push("hover:ring-4 ring-success-lighter dark:ring-success-darker");
|
|
265
268
|
break;
|
|
266
269
|
case "default":
|
|
267
270
|
default:
|
|
268
|
-
|
|
271
|
+
g.push("hover:ring-2");
|
|
269
272
|
break;
|
|
270
273
|
}
|
|
271
|
-
return
|
|
272
|
-
}),
|
|
273
|
-
switch (
|
|
274
|
+
return g.join(" ");
|
|
275
|
+
}), C = u(() => {
|
|
276
|
+
switch (s.size) {
|
|
274
277
|
case "xs":
|
|
275
278
|
return "h-5 text-xs font-medium xxx-tracking-wide";
|
|
276
279
|
case "sm":
|
|
@@ -283,8 +286,8 @@ const as = {
|
|
|
283
286
|
case "base":
|
|
284
287
|
return "h-8 text-base font-medium xxx-tracking-wide";
|
|
285
288
|
}
|
|
286
|
-
}),
|
|
287
|
-
switch (
|
|
289
|
+
}), b = u(() => {
|
|
290
|
+
switch (s.size) {
|
|
288
291
|
case "xs":
|
|
289
292
|
return "px-1";
|
|
290
293
|
case "sm":
|
|
@@ -297,88 +300,88 @@ const as = {
|
|
|
297
300
|
case "base":
|
|
298
301
|
return "px-3";
|
|
299
302
|
}
|
|
300
|
-
}),
|
|
301
|
-
const
|
|
302
|
-
return
|
|
303
|
-
}),
|
|
304
|
-
const
|
|
305
|
-
return !
|
|
303
|
+
}), A = u(() => {
|
|
304
|
+
const g = [];
|
|
305
|
+
return s.fullWidth && g.push("w-full"), i.value && g.push("cursor-not-allowed"), g.join(" ");
|
|
306
|
+
}), w = u(() => {
|
|
307
|
+
const g = [];
|
|
308
|
+
return !i.value && !s.link && !s.text && g.push("active:scale-[0.97]"), !i.value && s.link && g.push(
|
|
306
309
|
"underline decoration-transparent decoration-2 underline-offset-4 hover:decoration-inherit"
|
|
307
|
-
),
|
|
308
|
-
}),
|
|
309
|
-
const
|
|
310
|
+
), g.join(" ");
|
|
311
|
+
}), $ = u(() => {
|
|
312
|
+
const g = s.link || s.text;
|
|
310
313
|
return [
|
|
311
314
|
"transition inline-flex justify-center items-center space-x-2 outline-none select-none",
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
A.value,
|
|
316
|
+
C.value,
|
|
317
|
+
x.value,
|
|
318
|
+
g ? "" : c.value,
|
|
319
|
+
g ? "" : v.value,
|
|
320
|
+
g ? "" : h.value,
|
|
321
|
+
s.link ? "" : b.value,
|
|
322
|
+
w.value
|
|
320
323
|
].join(" ");
|
|
321
|
-
}),
|
|
322
|
-
const
|
|
323
|
-
switch (
|
|
324
|
+
}), P = u(() => {
|
|
325
|
+
const g = [""];
|
|
326
|
+
switch (s.loading && g.push("animate-spin"), s.size) {
|
|
324
327
|
case "xs":
|
|
325
|
-
|
|
328
|
+
g.push("h-3 w-3");
|
|
326
329
|
break;
|
|
327
330
|
case "sm":
|
|
328
|
-
|
|
331
|
+
g.push("h-4 w-4");
|
|
329
332
|
break;
|
|
330
333
|
case "lg":
|
|
331
|
-
|
|
334
|
+
g.push("h-6 w-6");
|
|
332
335
|
break;
|
|
333
336
|
case "xl":
|
|
334
|
-
|
|
337
|
+
g.push("h-8 w-8");
|
|
335
338
|
break;
|
|
336
339
|
case "base":
|
|
337
340
|
default:
|
|
338
|
-
|
|
341
|
+
g.push("h-5 w-5");
|
|
339
342
|
break;
|
|
340
343
|
}
|
|
341
|
-
return
|
|
342
|
-
}),
|
|
343
|
-
if (
|
|
344
|
-
|
|
344
|
+
return g.join(" ");
|
|
345
|
+
}), E = (g) => {
|
|
346
|
+
if (i.value) {
|
|
347
|
+
g.preventDefault(), g.stopPropagation(), g.stopImmediatePropagation();
|
|
345
348
|
return;
|
|
346
349
|
}
|
|
347
|
-
|
|
350
|
+
t("click", g);
|
|
348
351
|
};
|
|
349
|
-
return (
|
|
352
|
+
return (g, T) => (a(), z(Z(e.to ? o.value : "button"), {
|
|
350
353
|
href: e.to,
|
|
351
354
|
to: e.to,
|
|
352
|
-
type:
|
|
355
|
+
type: d.value,
|
|
353
356
|
external: e.external,
|
|
354
|
-
class:
|
|
355
|
-
disabled:
|
|
357
|
+
class: k($.value),
|
|
358
|
+
disabled: i.value,
|
|
356
359
|
role: "button",
|
|
357
|
-
onClick:
|
|
360
|
+
onClick: E
|
|
358
361
|
}, {
|
|
359
|
-
default:
|
|
360
|
-
|
|
362
|
+
default: V(() => [
|
|
363
|
+
f.value ? (a(), z(Z(f.value), {
|
|
361
364
|
key: 0,
|
|
362
|
-
class:
|
|
363
|
-
}, null, 8, ["class"])) :
|
|
364
|
-
e.hideText ? (a(), p("div",
|
|
365
|
-
|
|
365
|
+
class: k(`${P.value} ${e.hideText ? "" : "mr-2"}`)
|
|
366
|
+
}, null, 8, ["class"])) : S("", !0),
|
|
367
|
+
e.hideText ? (a(), p("div", ks, " ")) : R(g.$slots, "default", { key: 1 }, () => [
|
|
368
|
+
M("Button")
|
|
366
369
|
], !0),
|
|
367
|
-
e.iconRight || !e.loading ? (a(),
|
|
370
|
+
e.iconRight || !e.loading ? (a(), z(Z(e.iconRight), {
|
|
368
371
|
key: 3,
|
|
369
|
-
class:
|
|
370
|
-
}, null, 8, ["class"])) :
|
|
372
|
+
class: k(`${P.value} ${e.hideText ? "" : "ml-2"}`)
|
|
373
|
+
}, null, 8, ["class"])) : S("", !0)
|
|
371
374
|
]),
|
|
372
375
|
_: 3
|
|
373
376
|
}, 8, ["href", "to", "type", "external", "class", "disabled"]));
|
|
374
377
|
}
|
|
375
378
|
});
|
|
376
|
-
const
|
|
377
|
-
const
|
|
378
|
-
for (const [
|
|
379
|
-
|
|
380
|
-
return
|
|
381
|
-
},
|
|
379
|
+
const at = (e, t) => {
|
|
380
|
+
const s = e.__vccOpts || e;
|
|
381
|
+
for (const [n, r] of t)
|
|
382
|
+
s[n] = r;
|
|
383
|
+
return s;
|
|
384
|
+
}, le = /* @__PURE__ */ at(ws, [["__scopeId", "data-v-38aa371e"]]), Cs = /* @__PURE__ */ O({
|
|
382
385
|
__name: "Link",
|
|
383
386
|
props: {
|
|
384
387
|
to: {
|
|
@@ -427,15 +430,15 @@ const tt = (e, n) => {
|
|
|
427
430
|
}
|
|
428
431
|
},
|
|
429
432
|
emits: ["click"],
|
|
430
|
-
setup(e, { emit:
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
433
|
-
|
|
433
|
+
setup(e, { emit: t }) {
|
|
434
|
+
const s = e, n = (r) => {
|
|
435
|
+
if (s.disabled) {
|
|
436
|
+
r.preventDefault(), r.stopPropagation(), r.stopImmediatePropagation();
|
|
434
437
|
return;
|
|
435
438
|
}
|
|
436
|
-
|
|
439
|
+
t("click", r);
|
|
437
440
|
};
|
|
438
|
-
return (
|
|
441
|
+
return (r, o) => (a(), z(le, {
|
|
439
442
|
link: "",
|
|
440
443
|
to: e.to,
|
|
441
444
|
external: e.external,
|
|
@@ -446,54 +449,54 @@ const tt = (e, n) => {
|
|
|
446
449
|
"icon-right": e.iconRight,
|
|
447
450
|
"hide-text": e.hideText,
|
|
448
451
|
role: "link",
|
|
449
|
-
onClickCapture:
|
|
452
|
+
onClickCapture: n
|
|
450
453
|
}, {
|
|
451
|
-
default:
|
|
452
|
-
|
|
453
|
-
|
|
454
|
+
default: V(() => [
|
|
455
|
+
R(r.$slots, "default", {}, () => [
|
|
456
|
+
M("Link")
|
|
454
457
|
])
|
|
455
458
|
]),
|
|
456
459
|
_: 3
|
|
457
460
|
}, 8, ["to", "external", "disabled", "size", "foreground-link", "icon-left", "icon-right", "hide-text"]));
|
|
458
461
|
}
|
|
459
462
|
});
|
|
460
|
-
var
|
|
461
|
-
const
|
|
463
|
+
var ve = /* @__PURE__ */ ((e) => (e[e.Success = 0] = "Success", e[e.Warning = 1] = "Warning", e[e.Danger = 2] = "Danger", e[e.Info = 3] = "Info", e))(ve || {});
|
|
464
|
+
const $s = {
|
|
462
465
|
"aria-live": "assertive",
|
|
463
466
|
class: "pointer-events-none fixed inset-0 flex items-end px-4 py-6 mt-10 sm:items-start sm:p-6 z-50"
|
|
464
|
-
},
|
|
467
|
+
}, Is = { class: "flex w-full flex-col items-center space-y-4 sm:items-end" }, Ss = {
|
|
465
468
|
key: 0,
|
|
466
469
|
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"
|
|
467
|
-
},
|
|
470
|
+
}, Bs = { class: "p-4" }, _s = { class: "flex items-start" }, Ls = { class: "flex-shrink-0" }, Vs = { class: "ml-2 w-0 flex-1 flex flex-col" }, zs = {
|
|
468
471
|
key: 0,
|
|
469
472
|
class: "text-foreground font-bold"
|
|
470
|
-
},
|
|
473
|
+
}, Ps = {
|
|
471
474
|
key: 1,
|
|
472
475
|
class: "label label--light text-foreground-2"
|
|
473
|
-
},
|
|
476
|
+
}, js = {
|
|
474
477
|
key: 2,
|
|
475
478
|
class: "flex justify-start mt-2"
|
|
476
|
-
},
|
|
479
|
+
}, As = /* @__PURE__ */ m("span", { class: "sr-only" }, "Close", -1), za = /* @__PURE__ */ O({
|
|
477
480
|
__name: "ToastRenderer",
|
|
478
481
|
props: {
|
|
479
482
|
notification: null
|
|
480
483
|
},
|
|
481
484
|
emits: ["update:notification"],
|
|
482
|
-
setup(e, { emit:
|
|
483
|
-
const
|
|
485
|
+
setup(e, { emit: t }) {
|
|
486
|
+
const s = e, n = u(
|
|
484
487
|
() => {
|
|
485
|
-
var
|
|
486
|
-
return !((
|
|
488
|
+
var d, i;
|
|
489
|
+
return !((d = s.notification) != null && d.description) && !((i = s.notification) != null && i.cta);
|
|
487
490
|
}
|
|
488
|
-
),
|
|
489
|
-
|
|
490
|
-
},
|
|
491
|
-
var
|
|
492
|
-
(
|
|
491
|
+
), r = () => {
|
|
492
|
+
t("update:notification", null);
|
|
493
|
+
}, o = (d) => {
|
|
494
|
+
var i, f, c;
|
|
495
|
+
(c = (f = (i = s.notification) == null ? void 0 : i.cta) == null ? void 0 : f.onClick) == null || c.call(f, d), r();
|
|
493
496
|
};
|
|
494
|
-
return (
|
|
495
|
-
|
|
496
|
-
|
|
497
|
+
return (d, i) => (a(), p("div", $s, [
|
|
498
|
+
m("div", Is, [
|
|
499
|
+
_(Ae, {
|
|
497
500
|
"enter-active-class": "transform ease-out duration-300 transition",
|
|
498
501
|
"enter-from-class": "translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2",
|
|
499
502
|
"enter-to-class": "translate-y-0 opacity-100 sm:translate-x-0",
|
|
@@ -501,56 +504,56 @@ const is = {
|
|
|
501
504
|
"leave-from-class": "opacity-100",
|
|
502
505
|
"leave-to-class": "opacity-0"
|
|
503
506
|
}, {
|
|
504
|
-
default:
|
|
505
|
-
e.notification ? (a(), p("div",
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
e.notification.type === l(
|
|
507
|
+
default: V(() => [
|
|
508
|
+
e.notification ? (a(), p("div", Ss, [
|
|
509
|
+
m("div", Bs, [
|
|
510
|
+
m("div", _s, [
|
|
511
|
+
m("div", Ls, [
|
|
512
|
+
e.notification.type === l(ve).Success ? (a(), z(l(Ot), {
|
|
510
513
|
key: 0,
|
|
511
514
|
class: "h-6 w-6 text-success",
|
|
512
515
|
"aria-hidden": "true"
|
|
513
|
-
})) : e.notification.type === l(
|
|
516
|
+
})) : e.notification.type === l(ve).Danger ? (a(), z(l(Mt), {
|
|
514
517
|
key: 1,
|
|
515
518
|
class: "h-6 w-6 text-danger",
|
|
516
519
|
"aria-hidden": "true"
|
|
517
|
-
})) : e.notification.type === l(
|
|
520
|
+
})) : e.notification.type === l(ve).Warning ? (a(), z(l(Tt), {
|
|
518
521
|
key: 2,
|
|
519
522
|
class: "h-6 w-6 text-warning",
|
|
520
523
|
"aria-hidden": "true"
|
|
521
|
-
})) : e.notification.type === l(
|
|
524
|
+
})) : e.notification.type === l(ve).Info ? (a(), z(l(Ft), {
|
|
522
525
|
key: 3,
|
|
523
526
|
class: "h-6 w-6 text-info",
|
|
524
527
|
"aria-hidden": "true"
|
|
525
|
-
})) :
|
|
528
|
+
})) : S("", !0)
|
|
526
529
|
]),
|
|
527
|
-
|
|
528
|
-
e.notification.title ? (a(), p("p",
|
|
529
|
-
e.notification.description ? (a(), p("p",
|
|
530
|
-
e.notification.cta ? (a(), p("div",
|
|
531
|
-
|
|
530
|
+
m("div", Vs, [
|
|
531
|
+
e.notification.title ? (a(), p("p", zs, L(e.notification.title), 1)) : S("", !0),
|
|
532
|
+
e.notification.description ? (a(), p("p", Ps, L(e.notification.description), 1)) : S("", !0),
|
|
533
|
+
e.notification.cta ? (a(), p("div", js, [
|
|
534
|
+
_(Cs, {
|
|
532
535
|
to: e.notification.cta.url,
|
|
533
536
|
class: "label",
|
|
534
537
|
primary: "",
|
|
535
|
-
onClick:
|
|
538
|
+
onClick: o
|
|
536
539
|
}, {
|
|
537
|
-
default:
|
|
538
|
-
|
|
540
|
+
default: V(() => [
|
|
541
|
+
M(L(e.notification.cta.title), 1)
|
|
539
542
|
]),
|
|
540
543
|
_: 1
|
|
541
544
|
}, 8, ["to"])
|
|
542
|
-
])) :
|
|
545
|
+
])) : S("", !0)
|
|
543
546
|
]),
|
|
544
|
-
|
|
545
|
-
class:
|
|
547
|
+
m("div", {
|
|
548
|
+
class: k(["ml-4 flex flex-shrink-0", { "self-center": n.value }])
|
|
546
549
|
}, [
|
|
547
|
-
|
|
550
|
+
m("button", {
|
|
548
551
|
type: "button",
|
|
549
552
|
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",
|
|
550
|
-
onClick:
|
|
553
|
+
onClick: r
|
|
551
554
|
}, [
|
|
552
|
-
|
|
553
|
-
|
|
555
|
+
As,
|
|
556
|
+
_(l(pe), {
|
|
554
557
|
class: "h-6 w-6",
|
|
555
558
|
"aria-hidden": "true"
|
|
556
559
|
})
|
|
@@ -558,20 +561,20 @@ const is = {
|
|
|
558
561
|
], 2)
|
|
559
562
|
])
|
|
560
563
|
])
|
|
561
|
-
])) :
|
|
564
|
+
])) : S("", !0)
|
|
562
565
|
]),
|
|
563
566
|
_: 1
|
|
564
567
|
})
|
|
565
568
|
])
|
|
566
569
|
]));
|
|
567
570
|
}
|
|
568
|
-
}),
|
|
571
|
+
}), Os = /* @__PURE__ */ m("circle", {
|
|
569
572
|
cx: "4",
|
|
570
573
|
cy: "4",
|
|
571
574
|
r: "3"
|
|
572
|
-
}, null, -1),
|
|
573
|
-
|
|
574
|
-
],
|
|
575
|
+
}, null, -1), Ms = [
|
|
576
|
+
Os
|
|
577
|
+
], Ue = /* @__PURE__ */ O({
|
|
575
578
|
__name: "Badge",
|
|
576
579
|
props: {
|
|
577
580
|
size: null,
|
|
@@ -583,119 +586,119 @@ const is = {
|
|
|
583
586
|
clickableIcon: { type: Boolean }
|
|
584
587
|
},
|
|
585
588
|
emits: ["click-icon"],
|
|
586
|
-
setup(e, { emit:
|
|
587
|
-
const
|
|
588
|
-
() =>
|
|
589
|
-
),
|
|
590
|
-
() =>
|
|
591
|
-
),
|
|
592
|
-
const
|
|
589
|
+
setup(e, { emit: t }) {
|
|
590
|
+
const s = e, n = u(
|
|
591
|
+
() => s.colorClasses || "bg-blue-100 text-blue-800"
|
|
592
|
+
), r = u(
|
|
593
|
+
() => s.dotIconColorClasses || "text-blue-400"
|
|
594
|
+
), o = u(() => {
|
|
595
|
+
const c = [
|
|
593
596
|
"inline-flex items-center",
|
|
594
|
-
|
|
595
|
-
|
|
597
|
+
n.value,
|
|
598
|
+
s.size === "lg" ? "px-3 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
596
599
|
];
|
|
597
|
-
return
|
|
598
|
-
|
|
599
|
-
)) : (
|
|
600
|
-
|
|
601
|
-
)),
|
|
602
|
-
}),
|
|
603
|
-
const
|
|
600
|
+
return s.rounded ? (c.push("rounded"), c.push(
|
|
601
|
+
s.size === "lg" ? "px-2 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
602
|
+
)) : (c.push("rounded-full"), c.push(
|
|
603
|
+
s.size === "lg" ? "px-2.5 py-0.5 label" : "px-2.5 py-0.5 caption font-medium"
|
|
604
|
+
)), c.join(" ");
|
|
605
|
+
}), d = u(() => {
|
|
606
|
+
const c = [
|
|
604
607
|
"mt-0.5 ml-0.5 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded-full focus:outline-none"
|
|
605
608
|
];
|
|
606
|
-
return
|
|
607
|
-
}),
|
|
609
|
+
return s.clickableIcon ? c.push("cursor-pointer") : c.push("cursor-default"), c.join(" ");
|
|
610
|
+
}), i = u(() => [
|
|
608
611
|
"-ml-0.5 mr-1.5 h-2 w-2",
|
|
609
|
-
|
|
610
|
-
].join(" ")),
|
|
611
|
-
if (!
|
|
612
|
-
|
|
612
|
+
r.value
|
|
613
|
+
].join(" ")), f = (c) => {
|
|
614
|
+
if (!s.clickableIcon) {
|
|
615
|
+
c.stopPropagation(), c.stopImmediatePropagation(), c.preventDefault();
|
|
613
616
|
return;
|
|
614
617
|
}
|
|
615
|
-
|
|
618
|
+
t("click-icon", c);
|
|
616
619
|
};
|
|
617
|
-
return (
|
|
618
|
-
class:
|
|
620
|
+
return (c, x) => (a(), p("span", {
|
|
621
|
+
class: k(o.value)
|
|
619
622
|
}, [
|
|
620
623
|
e.dot ? (a(), p("svg", {
|
|
621
624
|
key: 0,
|
|
622
|
-
class:
|
|
625
|
+
class: k(i.value),
|
|
623
626
|
fill: "currentColor",
|
|
624
627
|
viewBox: "0 0 8 8"
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
|
|
628
|
+
}, Ms, 2)) : S("", !0),
|
|
629
|
+
R(c.$slots, "default", {}, () => [
|
|
630
|
+
M("Badge")
|
|
628
631
|
]),
|
|
629
632
|
e.iconLeft ? (a(), p("button", {
|
|
630
633
|
key: 1,
|
|
631
|
-
class:
|
|
632
|
-
onClick:
|
|
634
|
+
class: k(d.value),
|
|
635
|
+
onClick: x[0] || (x[0] = (v) => f(v))
|
|
633
636
|
}, [
|
|
634
|
-
(a(),
|
|
635
|
-
class:
|
|
637
|
+
(a(), z(Z(e.iconLeft), {
|
|
638
|
+
class: k(["h-4 w-4", r.value])
|
|
636
639
|
}, null, 8, ["class"]))
|
|
637
|
-
], 2)) :
|
|
640
|
+
], 2)) : S("", !0)
|
|
638
641
|
], 2));
|
|
639
642
|
}
|
|
640
643
|
});
|
|
641
|
-
let
|
|
642
|
-
function
|
|
643
|
-
|
|
644
|
+
let Ze = [];
|
|
645
|
+
function Ts(e) {
|
|
646
|
+
Ze = Ze ? e : e.slice();
|
|
644
647
|
}
|
|
645
|
-
var
|
|
646
|
-
function
|
|
648
|
+
var ge = /* @__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))(ge || {});
|
|
649
|
+
function ot(e) {
|
|
647
650
|
const {
|
|
648
651
|
props: {
|
|
649
|
-
modelValue:
|
|
650
|
-
steps:
|
|
651
|
-
orientation:
|
|
652
|
-
goVerticalBelow:
|
|
653
|
-
nonInteractive:
|
|
654
|
-
stepsPadding:
|
|
655
|
-
},
|
|
656
|
-
emit:
|
|
657
|
-
} = e,
|
|
658
|
-
() => (
|
|
659
|
-
),
|
|
660
|
-
get: () =>
|
|
661
|
-
set: (
|
|
662
|
-
}),
|
|
663
|
-
var
|
|
664
|
-
if (
|
|
665
|
-
|
|
652
|
+
modelValue: t,
|
|
653
|
+
steps: s,
|
|
654
|
+
orientation: n,
|
|
655
|
+
goVerticalBelow: r,
|
|
656
|
+
nonInteractive: o,
|
|
657
|
+
stepsPadding: d
|
|
658
|
+
},
|
|
659
|
+
emit: i
|
|
660
|
+
} = e, f = u(
|
|
661
|
+
() => (n == null ? void 0 : n.value) === "vertical" ? "vertical" : "horizontal"
|
|
662
|
+
), c = u({
|
|
663
|
+
get: () => Ge((t == null ? void 0 : t.value) || 0, -1, s.value.length),
|
|
664
|
+
set: (w) => i("update:modelValue", Ge(w, 0, s.value.length))
|
|
665
|
+
}), x = (w) => `${w + 1}`, v = (w) => w === c.value, h = (w) => w < c.value, C = (w, $) => {
|
|
666
|
+
var E;
|
|
667
|
+
if (o != null && o.value) {
|
|
668
|
+
$ == null || $.preventDefault(), $ == null || $.stopPropagation(), $ == null || $.stopImmediatePropagation();
|
|
666
669
|
return;
|
|
667
670
|
}
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
(
|
|
671
|
-
},
|
|
672
|
-
const
|
|
673
|
-
let
|
|
674
|
-
return (
|
|
675
|
-
`sm:flex-row sm:space-y-0 sm:justify-start sm:${
|
|
676
|
-
) : (
|
|
677
|
-
`md:flex-row md:space-y-0 md:justify-start md:${
|
|
678
|
-
) : (
|
|
679
|
-
`lg:flex-row lg:space-y-0 lg:justify-start lg:${
|
|
680
|
-
) : (
|
|
681
|
-
`xl:flex-row xl:space-y-0 xl:justify-start xl:${
|
|
682
|
-
)) :
|
|
683
|
-
}),
|
|
684
|
-
const
|
|
685
|
-
return
|
|
671
|
+
c.value = w;
|
|
672
|
+
const P = s.value[c.value];
|
|
673
|
+
(E = P == null ? void 0 : P.onClick) == null || E.call(P);
|
|
674
|
+
}, b = u(() => {
|
|
675
|
+
const w = ["flex"];
|
|
676
|
+
let $, P;
|
|
677
|
+
return (d == null ? void 0 : d.value) === "xs" ? ($ = "space-x-2", P = "space-y-1") : (d == null ? void 0 : d.value) === "sm" ? ($ = "space-x-4", P = "space-y-1") : ($ = "space-x-8", P = "space-y-4"), w.push("flex"), f.value === "vertical" || r != null && r.value ? (w.push(`flex-col ${P} justify-center`), (r == null ? void 0 : r.value) === ge.sm ? w.push(
|
|
678
|
+
`sm:flex-row sm:space-y-0 sm:justify-start sm:${$} sm:items-center`
|
|
679
|
+
) : (r == null ? void 0 : r.value) === ge.md ? w.push(
|
|
680
|
+
`md:flex-row md:space-y-0 md:justify-start md:${$} md:items-center`
|
|
681
|
+
) : (r == null ? void 0 : r.value) === ge.lg ? w.push(
|
|
682
|
+
`lg:flex-row lg:space-y-0 lg:justify-start lg:${$} lg:items-center`
|
|
683
|
+
) : (r == null ? void 0 : r.value) === ge.xl && w.push(
|
|
684
|
+
`xl:flex-row xl:space-y-0 xl:justify-start xl:${$} xl:items-center`
|
|
685
|
+
)) : w.push(`flex-row ${$} items-center`), w.join(" ");
|
|
686
|
+
}), A = u(() => {
|
|
687
|
+
const w = ["flex items-center"];
|
|
688
|
+
return o != null && o.value || w.push("cursor-pointer"), w.join(" ");
|
|
686
689
|
});
|
|
687
690
|
return {
|
|
688
|
-
value:
|
|
689
|
-
isCurrentStep:
|
|
690
|
-
isFinishedStep:
|
|
691
|
-
switchStep:
|
|
692
|
-
getStepDisplayValue:
|
|
693
|
-
listClasses:
|
|
694
|
-
linkClasses:
|
|
695
|
-
orientation:
|
|
691
|
+
value: c,
|
|
692
|
+
isCurrentStep: v,
|
|
693
|
+
isFinishedStep: h,
|
|
694
|
+
switchStep: C,
|
|
695
|
+
getStepDisplayValue: x,
|
|
696
|
+
listClasses: b,
|
|
697
|
+
linkClasses: A,
|
|
698
|
+
orientation: f
|
|
696
699
|
};
|
|
697
700
|
}
|
|
698
|
-
|
|
701
|
+
Ts([
|
|
699
702
|
"sm:space-x-8",
|
|
700
703
|
"md:space-x-8",
|
|
701
704
|
"lg:space-x-8",
|
|
@@ -709,16 +712,16 @@ ks([
|
|
|
709
712
|
"lg:space-x-4",
|
|
710
713
|
"xl:space-x-4"
|
|
711
714
|
]);
|
|
712
|
-
const
|
|
715
|
+
const Fs = ["aria-label"], Rs = ["href", "onClick"], Es = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, Ds = { class: "shrink-0 h-8 w-8 rounded-full bg-primary-focus text-foreground-on-primary inline-flex items-center justify-center" }, Us = { class: "flex flex-col" }, Ws = {
|
|
713
716
|
key: 0,
|
|
714
717
|
class: "label label--light text-foreground"
|
|
715
|
-
},
|
|
718
|
+
}, qs = ["href", "onClick"], Ks = { class: "flex space-x-3 items-center text-primary-focus normal font-medium leading-5" }, Hs = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-primary-focus inline-flex items-center justify-center" }, Gs = { class: "flex flex-col" }, Xs = {
|
|
716
719
|
key: 0,
|
|
717
720
|
class: "label label--light text-foreground"
|
|
718
|
-
},
|
|
721
|
+
}, Zs = ["href", "onClick"], Qs = { class: "flex space-x-3 items-center text-foreground-disabled normal font-medium leading-5" }, Ns = { class: "shrink-0 h-8 w-8 rounded-full border-2 border-foreground-disabled inline-flex items-center justify-center" }, Js = { class: "flex flex-col" }, Ys = {
|
|
719
722
|
key: 0,
|
|
720
723
|
class: "label label--light"
|
|
721
|
-
},
|
|
724
|
+
}, Pa = /* @__PURE__ */ O({
|
|
722
725
|
__name: "Number",
|
|
723
726
|
props: {
|
|
724
727
|
ariaLabel: null,
|
|
@@ -730,94 +733,94 @@ const ws = ["aria-label"], Cs = ["href", "onClick"], $s = { class: "flex space-x
|
|
|
730
733
|
stepsPadding: null
|
|
731
734
|
},
|
|
732
735
|
emits: ["update:modelValue"],
|
|
733
|
-
setup(e, { emit:
|
|
734
|
-
const
|
|
735
|
-
isCurrentStep:
|
|
736
|
-
isFinishedStep:
|
|
737
|
-
switchStep:
|
|
738
|
-
getStepDisplayValue:
|
|
739
|
-
listClasses:
|
|
740
|
-
linkClasses:
|
|
741
|
-
} =
|
|
742
|
-
props:
|
|
743
|
-
emit:
|
|
736
|
+
setup(e, { emit: t }) {
|
|
737
|
+
const s = e, {
|
|
738
|
+
isCurrentStep: n,
|
|
739
|
+
isFinishedStep: r,
|
|
740
|
+
switchStep: o,
|
|
741
|
+
getStepDisplayValue: d,
|
|
742
|
+
listClasses: i,
|
|
743
|
+
linkClasses: f
|
|
744
|
+
} = ot({
|
|
745
|
+
props: N(s),
|
|
746
|
+
emit: t
|
|
744
747
|
});
|
|
745
|
-
return (
|
|
748
|
+
return (c, x) => (a(), p("nav", {
|
|
746
749
|
class: "flex justify-center",
|
|
747
750
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
748
751
|
}, [
|
|
749
|
-
|
|
750
|
-
class:
|
|
752
|
+
m("ol", {
|
|
753
|
+
class: k(l(i))
|
|
751
754
|
}, [
|
|
752
|
-
(a(!0), p(
|
|
753
|
-
key:
|
|
755
|
+
(a(!0), p(U, null, q(e.steps, (v, h) => (a(), p("li", {
|
|
756
|
+
key: v.name
|
|
754
757
|
}, [
|
|
755
|
-
l(
|
|
758
|
+
l(r)(h) ? (a(), p("a", {
|
|
756
759
|
key: 0,
|
|
757
|
-
href:
|
|
758
|
-
class:
|
|
759
|
-
onClick: (
|
|
760
|
+
href: v.href,
|
|
761
|
+
class: k(l(f)),
|
|
762
|
+
onClick: (C) => l(o)(h, C)
|
|
760
763
|
}, [
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
+
m("div", Es, [
|
|
765
|
+
m("div", Ds, [
|
|
766
|
+
_(l(tt), { class: "w-5 h-5" })
|
|
764
767
|
]),
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
+
m("div", Us, [
|
|
769
|
+
m("div", null, L(v.name), 1),
|
|
770
|
+
v.description ? (a(), p("div", Ws, L(v.description), 1)) : S("", !0)
|
|
768
771
|
])
|
|
769
772
|
])
|
|
770
|
-
], 10,
|
|
773
|
+
], 10, Rs)) : l(n)(h) ? (a(), p("a", {
|
|
771
774
|
key: 1,
|
|
772
|
-
href:
|
|
773
|
-
class:
|
|
775
|
+
href: v.href,
|
|
776
|
+
class: k(l(f)),
|
|
774
777
|
"aria-current": "step",
|
|
775
|
-
onClick: (
|
|
778
|
+
onClick: (C) => l(o)(h, C)
|
|
776
779
|
}, [
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
780
|
+
m("div", Ks, [
|
|
781
|
+
m("div", Hs, L(l(d)(h)), 1),
|
|
782
|
+
m("div", Gs, [
|
|
783
|
+
m("div", null, L(v.name), 1),
|
|
784
|
+
v.description ? (a(), p("div", Xs, L(v.description), 1)) : S("", !0)
|
|
782
785
|
])
|
|
783
786
|
])
|
|
784
|
-
], 10,
|
|
787
|
+
], 10, qs)) : (a(), p("a", {
|
|
785
788
|
key: 2,
|
|
786
|
-
href:
|
|
787
|
-
class:
|
|
788
|
-
onClick: (
|
|
789
|
+
href: v.href,
|
|
790
|
+
class: k(l(f)),
|
|
791
|
+
onClick: (C) => l(o)(h, C)
|
|
789
792
|
}, [
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
793
|
+
m("div", Qs, [
|
|
794
|
+
m("div", Ns, L(l(d)(h)), 1),
|
|
795
|
+
m("div", Js, [
|
|
796
|
+
m("div", null, L(v.name), 1),
|
|
797
|
+
v.description ? (a(), p("div", Ys, L(v.description), 1)) : S("", !0)
|
|
795
798
|
])
|
|
796
799
|
])
|
|
797
|
-
], 10,
|
|
800
|
+
], 10, Zs))
|
|
798
801
|
]))), 128))
|
|
799
802
|
], 2)
|
|
800
|
-
], 8,
|
|
803
|
+
], 8, Fs));
|
|
801
804
|
}
|
|
802
|
-
}),
|
|
805
|
+
}), en = ["aria-label"], tn = ["href", "onClick"], sn = { class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center" }, nn = {
|
|
803
806
|
key: 0,
|
|
804
807
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
805
|
-
},
|
|
808
|
+
}, ln = ["href", "onClick"], an = {
|
|
806
809
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
807
810
|
"aria-hidden": "true"
|
|
808
|
-
},
|
|
811
|
+
}, on = {
|
|
809
812
|
key: 0,
|
|
810
813
|
class: "h-3 w-3 rounded-full bg-foreground"
|
|
811
|
-
},
|
|
814
|
+
}, rn = /* @__PURE__ */ m("span", { class: "absolute h-4 w-4 rounded-full bg-outline-2" }, null, -1), un = /* @__PURE__ */ m("span", { class: "relative block h-2 w-2 rounded-full bg-primary-focus" }, null, -1), cn = ["href", "onClick"], dn = {
|
|
812
815
|
class: "relative flex h-5 w-5 flex-shrink-0 items-center justify-center",
|
|
813
816
|
"aria-hidden": "true"
|
|
814
|
-
},
|
|
817
|
+
}, fn = {
|
|
815
818
|
key: 0,
|
|
816
819
|
class: "h-3 w-3 rounded-full bg-foreground-2"
|
|
817
|
-
},
|
|
820
|
+
}, pn = {
|
|
818
821
|
key: 1,
|
|
819
822
|
class: "h-4 w-4 rounded-full bg-foreground-disabled"
|
|
820
|
-
},
|
|
823
|
+
}, ja = /* @__PURE__ */ O({
|
|
821
824
|
__name: "Bullet",
|
|
822
825
|
props: {
|
|
823
826
|
ariaLabel: null,
|
|
@@ -830,117 +833,117 @@ const ws = ["aria-label"], Cs = ["href", "onClick"], $s = { class: "flex space-x
|
|
|
830
833
|
stepsPadding: null
|
|
831
834
|
},
|
|
832
835
|
emits: ["update:modelValue"],
|
|
833
|
-
setup(e, { emit:
|
|
834
|
-
const
|
|
835
|
-
props:
|
|
836
|
-
emit:
|
|
837
|
-
}),
|
|
838
|
-
const
|
|
839
|
-
let
|
|
840
|
-
return
|
|
841
|
-
}),
|
|
842
|
-
const
|
|
843
|
-
return
|
|
836
|
+
setup(e, { emit: t }) {
|
|
837
|
+
const s = e, { isCurrentStep: n, isFinishedStep: r, switchStep: o, listClasses: d, linkClasses: i } = ot({
|
|
838
|
+
props: N(s),
|
|
839
|
+
emit: t
|
|
840
|
+
}), f = u(() => {
|
|
841
|
+
const x = ["h6 font-medium leading-7"];
|
|
842
|
+
let v;
|
|
843
|
+
return s.stepsPadding === "xs" ? v = "ml-1" : s.stepsPadding === "sm" ? v = "ml-2" : v = "ml-3", x.push(v), s.basic && x.push("sr-only"), x.join(" ");
|
|
844
|
+
}), c = u(() => {
|
|
845
|
+
const x = [];
|
|
846
|
+
return s.basic && x.push("basic"), x.join(" ");
|
|
844
847
|
});
|
|
845
|
-
return (
|
|
848
|
+
return (x, v) => (a(), p("nav", {
|
|
846
849
|
class: "flex justify-center",
|
|
847
850
|
"aria-label": e.ariaLabel || "Progress steps"
|
|
848
851
|
}, [
|
|
849
|
-
|
|
850
|
-
class:
|
|
852
|
+
m("ol", {
|
|
853
|
+
class: k([l(d), c.value])
|
|
851
854
|
}, [
|
|
852
|
-
(a(!0), p(
|
|
853
|
-
key:
|
|
855
|
+
(a(!0), p(U, null, q(e.steps, (h, C) => (a(), p("li", {
|
|
856
|
+
key: h.name
|
|
854
857
|
}, [
|
|
855
|
-
l(
|
|
858
|
+
l(r)(C) ? (a(), p("a", {
|
|
856
859
|
key: 0,
|
|
857
|
-
href:
|
|
858
|
-
class:
|
|
859
|
-
onClick: (
|
|
860
|
+
href: h.href,
|
|
861
|
+
class: k(l(i)),
|
|
862
|
+
onClick: (b) => l(o)(C, b)
|
|
860
863
|
}, [
|
|
861
|
-
|
|
862
|
-
e.basic ? (a(), p("span",
|
|
864
|
+
m("span", sn, [
|
|
865
|
+
e.basic ? (a(), p("span", nn)) : (a(), z(l(st), {
|
|
863
866
|
key: 1,
|
|
864
867
|
class: "h-full w-full text-primary",
|
|
865
868
|
"aria-hidden": "true"
|
|
866
869
|
}))
|
|
867
870
|
]),
|
|
868
|
-
|
|
869
|
-
class:
|
|
870
|
-
},
|
|
871
|
-
], 10,
|
|
871
|
+
m("span", {
|
|
872
|
+
class: k(["text-foreground", f.value])
|
|
873
|
+
}, L(h.name), 3)
|
|
874
|
+
], 10, tn)) : l(n)(C) ? (a(), p("a", {
|
|
872
875
|
key: 1,
|
|
873
|
-
href:
|
|
874
|
-
class:
|
|
876
|
+
href: h.href,
|
|
877
|
+
class: k(l(i)),
|
|
875
878
|
"aria-current": "step",
|
|
876
|
-
onClick: (
|
|
879
|
+
onClick: (b) => l(o)(C, b)
|
|
877
880
|
}, [
|
|
878
|
-
|
|
879
|
-
e.basic ? (a(), p("span",
|
|
880
|
-
|
|
881
|
-
|
|
881
|
+
m("span", an, [
|
|
882
|
+
e.basic ? (a(), p("span", on)) : (a(), p(U, { key: 1 }, [
|
|
883
|
+
rn,
|
|
884
|
+
un
|
|
882
885
|
], 64))
|
|
883
886
|
]),
|
|
884
|
-
|
|
885
|
-
class:
|
|
886
|
-
},
|
|
887
|
-
], 10,
|
|
887
|
+
m("span", {
|
|
888
|
+
class: k(["text-primary-focus", f.value])
|
|
889
|
+
}, L(h.name), 3)
|
|
890
|
+
], 10, ln)) : (a(), p("a", {
|
|
888
891
|
key: 2,
|
|
889
|
-
href:
|
|
890
|
-
class:
|
|
891
|
-
onClick: (
|
|
892
|
+
href: h.href,
|
|
893
|
+
class: k(l(i)),
|
|
894
|
+
onClick: (b) => l(o)(C, b)
|
|
892
895
|
}, [
|
|
893
|
-
|
|
894
|
-
e.basic ? (a(), p("span",
|
|
896
|
+
m("div", dn, [
|
|
897
|
+
e.basic ? (a(), p("span", fn)) : (a(), p("div", pn))
|
|
895
898
|
]),
|
|
896
|
-
|
|
897
|
-
class:
|
|
898
|
-
},
|
|
899
|
-
], 10,
|
|
899
|
+
m("p", {
|
|
900
|
+
class: k(["text-foreground-disabled", f.value])
|
|
901
|
+
}, L(h.name), 3)
|
|
902
|
+
], 10, cn))
|
|
900
903
|
]))), 128))
|
|
901
904
|
], 2)
|
|
902
|
-
], 8,
|
|
905
|
+
], 8, en));
|
|
903
906
|
}
|
|
904
|
-
}),
|
|
907
|
+
}), hn = ["disabled"], Aa = /* @__PURE__ */ O({
|
|
905
908
|
__name: "CardButton",
|
|
906
909
|
props: {
|
|
907
910
|
disabled: { type: Boolean },
|
|
908
911
|
modelValue: { type: Boolean }
|
|
909
912
|
},
|
|
910
913
|
emits: ["update:modelValue", "click"],
|
|
911
|
-
setup(e, { emit:
|
|
912
|
-
const
|
|
913
|
-
const
|
|
914
|
+
setup(e, { emit: t }) {
|
|
915
|
+
const s = e, n = u(() => {
|
|
916
|
+
const o = [
|
|
914
917
|
"h-20 bg-foundation-2 inline-flex justify-center items-center outline-none",
|
|
915
918
|
"normal px-16 py-5 shadow rounded transition active:scale-95"
|
|
916
919
|
];
|
|
917
|
-
return
|
|
918
|
-
|
|
919
|
-
),
|
|
920
|
-
}),
|
|
921
|
-
if (
|
|
922
|
-
|
|
920
|
+
return s.disabled ? o.push("bg-foundation-disabled text-foreground-2 cursor-not-allowed") : (o.push(
|
|
921
|
+
s.modelValue ? "bg-primary-focus text-foreground-on-primary" : "bg-foundation text-foreground"
|
|
922
|
+
), o.push("ring-outline-2 hover:ring-4")), o.join(" ");
|
|
923
|
+
}), r = (o) => {
|
|
924
|
+
if (s.disabled) {
|
|
925
|
+
o.preventDefault(), o.stopPropagation(), o.stopImmediatePropagation();
|
|
923
926
|
return;
|
|
924
927
|
}
|
|
925
|
-
|
|
928
|
+
t("update:modelValue", !s.modelValue), t("click", o);
|
|
926
929
|
};
|
|
927
|
-
return (
|
|
928
|
-
class:
|
|
930
|
+
return (o, d) => (a(), p("button", {
|
|
931
|
+
class: k(n.value),
|
|
929
932
|
disabled: e.disabled,
|
|
930
|
-
onClick:
|
|
933
|
+
onClick: r
|
|
931
934
|
}, [
|
|
932
|
-
|
|
933
|
-
|
|
935
|
+
R(o.$slots, "default", {}, () => [
|
|
936
|
+
M("Text")
|
|
934
937
|
])
|
|
935
|
-
], 10,
|
|
938
|
+
], 10, hn));
|
|
936
939
|
}
|
|
937
|
-
}),
|
|
940
|
+
}), mn = { class: "relative flex items-start" }, vn = { class: "flex h-6 items-center" }, gn = ["id", "checked", "aria-describedby", "name", "disabled", "value"], bn = {
|
|
938
941
|
class: "ml-2 text-sm",
|
|
939
942
|
style: { "padding-top": "2px" }
|
|
940
|
-
},
|
|
943
|
+
}, yn = ["for"], xn = {
|
|
941
944
|
key: 0,
|
|
942
945
|
class: "text-danger ml-1"
|
|
943
|
-
},
|
|
946
|
+
}, kn = ["id"], Oa = /* @__PURE__ */ O({
|
|
944
947
|
inheritAttrs: !1,
|
|
945
948
|
__name: "Checkbox",
|
|
946
949
|
props: {
|
|
@@ -1029,109 +1032,110 @@ const ws = ["aria-label"], Cs = ["href", "onClick"], $s = { class: "flex space-x
|
|
|
1029
1032
|
},
|
|
1030
1033
|
emits: ["update:modelValue"],
|
|
1031
1034
|
setup(e) {
|
|
1032
|
-
const
|
|
1033
|
-
checked:
|
|
1034
|
-
errorMessage:
|
|
1035
|
-
handleChange:
|
|
1036
|
-
value:
|
|
1037
|
-
} =
|
|
1038
|
-
validateOnMount:
|
|
1035
|
+
const t = e, s = (w) => `${w}-${Ee()}`, n = u(() => t.value || t.name), {
|
|
1036
|
+
checked: r,
|
|
1037
|
+
errorMessage: o,
|
|
1038
|
+
handleChange: d,
|
|
1039
|
+
value: i
|
|
1040
|
+
} = Re(t.name, t.rules, {
|
|
1041
|
+
validateOnMount: t.validateOnMount,
|
|
1039
1042
|
type: "checkbox",
|
|
1040
|
-
checkedValue:
|
|
1041
|
-
initialValue:
|
|
1042
|
-
}),
|
|
1043
|
-
const
|
|
1044
|
-
return
|
|
1045
|
-
}),
|
|
1046
|
-
|
|
1043
|
+
checkedValue: n,
|
|
1044
|
+
initialValue: t.modelValue || void 0
|
|
1045
|
+
}), f = u(() => t.label || t.name), c = u(() => o.value ? "border-danger-lighter" : "border-foreground-4 "), x = u(() => t.description || o.value), v = u(() => `${t.name}-description`), h = u(() => {
|
|
1046
|
+
const w = [];
|
|
1047
|
+
return t.inlineDescription ? w.push("inline ml-2") : w.push("block"), o.value ? w.push("text-danger") : w.push("text-foreground-2"), w.join(" ");
|
|
1048
|
+
}), C = j(s("checkbox")), b = u(() => t.id || C.value), A = (w) => {
|
|
1049
|
+
t.disabled || d(w);
|
|
1047
1050
|
};
|
|
1048
1051
|
return se(() => {
|
|
1049
|
-
const
|
|
1050
|
-
|
|
1051
|
-
}), (
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
id:
|
|
1055
|
-
checked: l(
|
|
1056
|
-
"aria-describedby":
|
|
1052
|
+
const w = t.modelValue, $ = i.value, P = Array.isArray(w) ? w.includes(t.value) : w === t.value, E = Array.isArray($) ? $.includes(t.value) : $ === t.value;
|
|
1053
|
+
P !== E && d(w);
|
|
1054
|
+
}), (w, $) => (a(), p("div", mn, [
|
|
1055
|
+
m("div", vn, [
|
|
1056
|
+
m("input", ye({
|
|
1057
|
+
id: b.value,
|
|
1058
|
+
checked: l(r),
|
|
1059
|
+
"aria-describedby": v.value,
|
|
1057
1060
|
name: e.name,
|
|
1058
1061
|
disabled: e.disabled,
|
|
1059
|
-
value:
|
|
1062
|
+
value: n.value,
|
|
1060
1063
|
type: "checkbox",
|
|
1061
|
-
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2",
|
|
1062
|
-
},
|
|
1064
|
+
class: ["h-4 w-4 rounded text-primary focus:ring-primary bg-foundation disabled:cursor-not-allowed disabled:bg-disabled disabled:text-disabled-2", c.value]
|
|
1065
|
+
}, w.$attrs, { onChange: A }), null, 16, gn)
|
|
1063
1066
|
]),
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
for:
|
|
1067
|
-
class:
|
|
1067
|
+
m("div", bn, [
|
|
1068
|
+
m("label", {
|
|
1069
|
+
for: b.value,
|
|
1070
|
+
class: k(["font-medium text-foreground", { "sr-only": e.hideLabel }])
|
|
1068
1071
|
}, [
|
|
1069
|
-
|
|
1070
|
-
e.showRequired ? (a(), p("span",
|
|
1071
|
-
], 10,
|
|
1072
|
-
|
|
1072
|
+
m("span", null, L(f.value), 1),
|
|
1073
|
+
e.showRequired ? (a(), p("span", xn, "*")) : S("", !0)
|
|
1074
|
+
], 10, yn),
|
|
1075
|
+
x.value ? (a(), p("p", {
|
|
1073
1076
|
key: 0,
|
|
1074
|
-
id:
|
|
1075
|
-
class:
|
|
1076
|
-
},
|
|
1077
|
+
id: v.value,
|
|
1078
|
+
class: k(h.value)
|
|
1079
|
+
}, L(x.value), 11, kn)) : S("", !0)
|
|
1077
1080
|
])
|
|
1078
1081
|
]));
|
|
1079
1082
|
}
|
|
1080
1083
|
});
|
|
1081
|
-
function
|
|
1082
|
-
const { props:
|
|
1083
|
-
validateOnMount: l(
|
|
1084
|
-
validateOnValueUpdate: l(
|
|
1085
|
-
initialValue: l(
|
|
1086
|
-
}), i =
|
|
1087
|
-
const
|
|
1088
|
-
return l(
|
|
1089
|
-
}),
|
|
1084
|
+
function We(e) {
|
|
1085
|
+
const { props: t, inputEl: s, emit: n, options: r } = e, { value: o, errorMessage: d } = Re(t.name, t.rules, {
|
|
1086
|
+
validateOnMount: l(t.validateOnMount),
|
|
1087
|
+
validateOnValueUpdate: l(t.validateOnValueUpdate),
|
|
1088
|
+
initialValue: l(t.modelValue) || void 0
|
|
1089
|
+
}), i = u(() => {
|
|
1090
|
+
const g = ["block label text-foreground-2 mb-2"];
|
|
1091
|
+
return l(t.showLabel) || g.push("sr-only"), g.join(" ");
|
|
1092
|
+
}), f = u(() => [
|
|
1090
1093
|
"focus:outline-none disabled:cursor-not-allowed disabled:bg-foundation-disabled",
|
|
1091
1094
|
"disabled:text-disabled-muted placeholder:text-foreground-2",
|
|
1092
1095
|
"rounded"
|
|
1093
|
-
].join(" ")),
|
|
1094
|
-
const
|
|
1096
|
+
].join(" ")), c = u(() => {
|
|
1097
|
+
const g = [
|
|
1095
1098
|
"block w-full text-foreground transition-all",
|
|
1096
|
-
|
|
1099
|
+
f.value
|
|
1097
1100
|
];
|
|
1098
|
-
return
|
|
1101
|
+
return d.value ? g.push(
|
|
1099
1102
|
"focus:border-danger focus:ring-danger border-2 border-danger text-danger-darker"
|
|
1100
|
-
) :
|
|
1101
|
-
}),
|
|
1102
|
-
const
|
|
1103
|
-
return !
|
|
1104
|
-
}),
|
|
1105
|
-
() =>
|
|
1106
|
-
),
|
|
1107
|
-
() =>
|
|
1108
|
-
),
|
|
1109
|
-
const
|
|
1110
|
-
return
|
|
1111
|
-
}),
|
|
1112
|
-
var
|
|
1113
|
-
(
|
|
1114
|
-
},
|
|
1115
|
-
|
|
1103
|
+
) : g.push("border-0 focus:ring-2 focus:ring-outline-2"), l(t.color) === "foundation" ? g.push("bg-foundation shadow-sm hover:shadow") : g.push("bg-foundation-page"), g.join(" ");
|
|
1104
|
+
}), x = j(Ee()), v = u(() => l(t.label) || l(t.name)), h = u(() => {
|
|
1105
|
+
const g = d.value;
|
|
1106
|
+
return !g || !l(t.useLabelInErrors) ? g : g.replace("Value", v.value);
|
|
1107
|
+
}), C = u(
|
|
1108
|
+
() => h.value && l(t.hideErrorMessage)
|
|
1109
|
+
), b = u(() => h.value || l(t.help)), A = u(() => !!b.value), w = u(
|
|
1110
|
+
() => A.value ? `${l(t.name)}-${x.value}` : void 0
|
|
1111
|
+
), $ = u(() => {
|
|
1112
|
+
const g = ["mt-2 text-sm"];
|
|
1113
|
+
return g.push(d.value ? "text-danger" : "text-foreground-2"), g.join(" ");
|
|
1114
|
+
}), P = () => {
|
|
1115
|
+
var g;
|
|
1116
|
+
(g = s.value) == null || g.focus();
|
|
1117
|
+
}, E = () => {
|
|
1118
|
+
var g;
|
|
1119
|
+
o.value = X(o.value) ? [] : "", (g = r == null ? void 0 : r.customClear) == null || g.call(r), n("change", { value: o.value }), n("clear");
|
|
1116
1120
|
};
|
|
1117
1121
|
return se(() => {
|
|
1118
|
-
l(
|
|
1122
|
+
l(t.autoFocus) && P();
|
|
1119
1123
|
}), {
|
|
1120
|
-
coreInputClasses:
|
|
1121
|
-
coreClasses:
|
|
1122
|
-
title:
|
|
1124
|
+
coreInputClasses: f,
|
|
1125
|
+
coreClasses: c,
|
|
1126
|
+
title: v,
|
|
1123
1127
|
value: o,
|
|
1124
|
-
helpTipId:
|
|
1125
|
-
helpTipClasses:
|
|
1126
|
-
helpTip:
|
|
1127
|
-
hideHelpTip:
|
|
1128
|
-
errorMessage:
|
|
1129
|
-
clear:
|
|
1130
|
-
focus:
|
|
1128
|
+
helpTipId: w,
|
|
1129
|
+
helpTipClasses: $,
|
|
1130
|
+
helpTip: b,
|
|
1131
|
+
hideHelpTip: C,
|
|
1132
|
+
errorMessage: h,
|
|
1133
|
+
clear: E,
|
|
1134
|
+
focus: P,
|
|
1131
1135
|
labelClasses: i
|
|
1132
1136
|
};
|
|
1133
1137
|
}
|
|
1134
|
-
const
|
|
1138
|
+
const wn = ["for"], Cn = { class: "relative" }, $n = ["id", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], In = /* @__PURE__ */ m("span", { class: "text-xs sr-only" }, "Clear input", -1), Sn = ["id"], Ma = /* @__PURE__ */ O({
|
|
1135
1139
|
__name: "TextArea",
|
|
1136
1140
|
props: {
|
|
1137
1141
|
name: null,
|
|
@@ -1153,101 +1157,101 @@ const al = ["for"], ol = { class: "relative" }, rl = ["id", "name", "placeholder
|
|
|
1153
1157
|
textareaClasses: null
|
|
1154
1158
|
},
|
|
1155
1159
|
emits: ["update:modelValue", "change", "input", "clear"],
|
|
1156
|
-
setup(e, { expose:
|
|
1157
|
-
const
|
|
1158
|
-
coreClasses:
|
|
1159
|
-
title:
|
|
1160
|
-
value:
|
|
1161
|
-
helpTipId:
|
|
1162
|
-
helpTipClasses:
|
|
1163
|
-
helpTip:
|
|
1164
|
-
errorMessage:
|
|
1165
|
-
labelClasses:
|
|
1166
|
-
clear:
|
|
1167
|
-
focus:
|
|
1168
|
-
} =
|
|
1169
|
-
props:
|
|
1170
|
-
emit:
|
|
1171
|
-
inputEl:
|
|
1172
|
-
}),
|
|
1173
|
-
const
|
|
1174
|
-
return
|
|
1160
|
+
setup(e, { expose: t, emit: s }) {
|
|
1161
|
+
const n = e, r = j(null), {
|
|
1162
|
+
coreClasses: o,
|
|
1163
|
+
title: d,
|
|
1164
|
+
value: i,
|
|
1165
|
+
helpTipId: f,
|
|
1166
|
+
helpTipClasses: c,
|
|
1167
|
+
helpTip: x,
|
|
1168
|
+
errorMessage: v,
|
|
1169
|
+
labelClasses: h,
|
|
1170
|
+
clear: C,
|
|
1171
|
+
focus: b
|
|
1172
|
+
} = We({
|
|
1173
|
+
props: N(n),
|
|
1174
|
+
emit: s,
|
|
1175
|
+
inputEl: r
|
|
1176
|
+
}), A = u(() => {
|
|
1177
|
+
const w = ["pl-2"];
|
|
1178
|
+
return n.showClear && v.value ? w.push("pr-12") : (n.showClear || v.value) && w.push("pr-8"), w.join(" ");
|
|
1175
1179
|
});
|
|
1176
|
-
return
|
|
1177
|
-
class:
|
|
1180
|
+
return t({ focus: b }), (w, $) => (a(), p("div", {
|
|
1181
|
+
class: k([e.fullWidth ? "w-full" : ""])
|
|
1178
1182
|
}, [
|
|
1179
|
-
|
|
1183
|
+
m("label", {
|
|
1180
1184
|
for: e.name,
|
|
1181
|
-
class:
|
|
1185
|
+
class: k(l(h))
|
|
1182
1186
|
}, [
|
|
1183
|
-
|
|
1184
|
-
], 10,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
+
m("span", null, L(l(d)), 1)
|
|
1188
|
+
], 10, wn),
|
|
1189
|
+
m("div", Cn, [
|
|
1190
|
+
de(m("textarea", ye({
|
|
1187
1191
|
id: e.name,
|
|
1188
1192
|
ref_key: "inputElement",
|
|
1189
|
-
ref:
|
|
1190
|
-
"onUpdate:modelValue":
|
|
1193
|
+
ref: r,
|
|
1194
|
+
"onUpdate:modelValue": $[0] || ($[0] = (P) => $e(i) ? i.value = P : null),
|
|
1191
1195
|
name: e.name,
|
|
1192
1196
|
class: [
|
|
1193
|
-
l(
|
|
1194
|
-
|
|
1197
|
+
l(o),
|
|
1198
|
+
A.value,
|
|
1195
1199
|
e.textareaClasses || "",
|
|
1196
1200
|
"min-h-[4rem] simple-scrollbar"
|
|
1197
1201
|
],
|
|
1198
1202
|
placeholder: e.placeholder,
|
|
1199
1203
|
disabled: e.disabled,
|
|
1200
|
-
"aria-invalid": l(
|
|
1201
|
-
"aria-describedby": l(
|
|
1202
|
-
},
|
|
1203
|
-
onChange:
|
|
1204
|
-
onInput:
|
|
1205
|
-
}), null, 16,
|
|
1206
|
-
[
|
|
1204
|
+
"aria-invalid": l(v) ? "true" : "false",
|
|
1205
|
+
"aria-describedby": l(f)
|
|
1206
|
+
}, w.$attrs, {
|
|
1207
|
+
onChange: $[1] || ($[1] = (P) => w.$emit("change", { event: P, value: l(i) })),
|
|
1208
|
+
onInput: $[2] || ($[2] = (P) => w.$emit("input", { event: P, value: l(i) }))
|
|
1209
|
+
}), null, 16, $n), [
|
|
1210
|
+
[Oe, l(i)]
|
|
1207
1211
|
]),
|
|
1208
1212
|
e.showClear ? (a(), p("a", {
|
|
1209
1213
|
key: 0,
|
|
1210
1214
|
title: "Clear input",
|
|
1211
1215
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
1212
|
-
onClick:
|
|
1213
|
-
(...
|
|
1214
|
-
onKeydown:
|
|
1215
|
-
(...
|
|
1216
|
+
onClick: $[3] || ($[3] = //@ts-ignore
|
|
1217
|
+
(...P) => l(C) && l(C)(...P)),
|
|
1218
|
+
onKeydown: $[4] || ($[4] = //@ts-ignore
|
|
1219
|
+
(...P) => l(C) && l(C)(...P))
|
|
1216
1220
|
}, [
|
|
1217
|
-
|
|
1218
|
-
|
|
1221
|
+
In,
|
|
1222
|
+
_(l(pe), {
|
|
1219
1223
|
class: "h-5 w-5 text-foreground",
|
|
1220
1224
|
"aria-hidden": "true"
|
|
1221
1225
|
})
|
|
1222
|
-
], 32)) :
|
|
1223
|
-
l(
|
|
1226
|
+
], 32)) : S("", !0),
|
|
1227
|
+
l(v) ? (a(), p("div", {
|
|
1224
1228
|
key: 1,
|
|
1225
|
-
class:
|
|
1229
|
+
class: k([
|
|
1226
1230
|
"pointer-events-none absolute inset-y-0 right-0 flex items-start mt-2",
|
|
1227
1231
|
e.showClear ? "pr-8" : "pr-2"
|
|
1228
1232
|
])
|
|
1229
1233
|
}, [
|
|
1230
|
-
|
|
1234
|
+
_(l(Ie), {
|
|
1231
1235
|
class: "h-4 w-4 text-danger",
|
|
1232
1236
|
"aria-hidden": "true"
|
|
1233
1237
|
})
|
|
1234
|
-
], 2)) :
|
|
1235
|
-
e.showRequired && !l(
|
|
1238
|
+
], 2)) : S("", !0),
|
|
1239
|
+
e.showRequired && !l(v) ? (a(), p("div", {
|
|
1236
1240
|
key: 2,
|
|
1237
|
-
class:
|
|
1238
|
-
}, " * ", 2)) :
|
|
1241
|
+
class: k(["pointer-events-none absolute inset-y-0 mt-0.5 text-4xl right-0 flex items-start text-danger opacity-50", [e.showClear ? "pr-8" : "pr-2"]])
|
|
1242
|
+
}, " * ", 2)) : S("", !0)
|
|
1239
1243
|
]),
|
|
1240
|
-
l(
|
|
1244
|
+
l(f) ? (a(), p("p", {
|
|
1241
1245
|
key: 0,
|
|
1242
|
-
id: l(
|
|
1243
|
-
class:
|
|
1244
|
-
},
|
|
1246
|
+
id: l(f),
|
|
1247
|
+
class: k(l(c))
|
|
1248
|
+
}, L(l(x)), 11, Sn)) : S("", !0)
|
|
1245
1249
|
], 2));
|
|
1246
1250
|
}
|
|
1247
|
-
}),
|
|
1251
|
+
}), Bn = ["for"], _n = { class: "relative" }, Ln = {
|
|
1248
1252
|
key: 0,
|
|
1249
1253
|
class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2"
|
|
1250
|
-
},
|
|
1254
|
+
}, Vn = ["id", "type", "name", "placeholder", "disabled", "aria-invalid", "aria-describedby"], zn = /* @__PURE__ */ m("span", { class: "text-xs sr-only" }, "Clear input", -1), Pn = ["id"], Ta = /* @__PURE__ */ O({
|
|
1251
1255
|
inheritAttrs: !1,
|
|
1252
1256
|
__name: "TextInput",
|
|
1253
1257
|
props: {
|
|
@@ -1383,33 +1387,33 @@ const al = ["for"], ol = { class: "relative" }, rl = ["id", "name", "placeholder
|
|
|
1383
1387
|
}
|
|
1384
1388
|
},
|
|
1385
1389
|
emits: ["update:modelValue", "change", "input", "clear", "focusin", "focusout"],
|
|
1386
|
-
setup(e, { expose:
|
|
1387
|
-
const
|
|
1388
|
-
coreClasses:
|
|
1389
|
-
title:
|
|
1390
|
-
value:
|
|
1391
|
-
helpTipId:
|
|
1392
|
-
helpTipClasses:
|
|
1393
|
-
helpTip:
|
|
1394
|
-
hideHelpTip:
|
|
1395
|
-
errorMessage:
|
|
1396
|
-
clear:
|
|
1397
|
-
focus:
|
|
1398
|
-
labelClasses:
|
|
1399
|
-
} =
|
|
1400
|
-
props:
|
|
1401
|
-
emit:
|
|
1402
|
-
inputEl:
|
|
1403
|
-
}),
|
|
1404
|
-
const
|
|
1405
|
-
return
|
|
1406
|
-
}),
|
|
1407
|
-
() => ["email", "password"].includes(
|
|
1408
|
-
),
|
|
1409
|
-
const
|
|
1410
|
-
return
|
|
1411
|
-
}),
|
|
1412
|
-
switch (
|
|
1390
|
+
setup(e, { expose: t, emit: s }) {
|
|
1391
|
+
const n = e, r = Me(), o = j(null), {
|
|
1392
|
+
coreClasses: d,
|
|
1393
|
+
title: i,
|
|
1394
|
+
value: f,
|
|
1395
|
+
helpTipId: c,
|
|
1396
|
+
helpTipClasses: x,
|
|
1397
|
+
helpTip: v,
|
|
1398
|
+
hideHelpTip: h,
|
|
1399
|
+
errorMessage: C,
|
|
1400
|
+
clear: b,
|
|
1401
|
+
focus: A,
|
|
1402
|
+
labelClasses: w
|
|
1403
|
+
} = We({
|
|
1404
|
+
props: N(n),
|
|
1405
|
+
emit: s,
|
|
1406
|
+
inputEl: o
|
|
1407
|
+
}), $ = u(() => {
|
|
1408
|
+
const T = ["h-5 w-5"];
|
|
1409
|
+
return C.value ? T.push("text-danger") : T.push("text-foreground-2"), T.join(" ");
|
|
1410
|
+
}), P = u(
|
|
1411
|
+
() => ["email", "password"].includes(n.type) || n.customIcon
|
|
1412
|
+
), E = u(() => {
|
|
1413
|
+
const T = [];
|
|
1414
|
+
return P.value ? T.push("pl-8") : T.push("pl-2"), r["input-right"] || (C.value || n.showClear) && (C.value && n.showClear ? T.push("pr-12") : T.push("pr-8")), T.join(" ");
|
|
1415
|
+
}), g = u(() => {
|
|
1416
|
+
switch (n.size) {
|
|
1413
1417
|
case "sm":
|
|
1414
1418
|
return "h-6";
|
|
1415
1419
|
case "lg":
|
|
@@ -1421,205 +1425,205 @@ const al = ["for"], ol = { class: "relative" }, rl = ["id", "name", "placeholder
|
|
|
1421
1425
|
return "h-8";
|
|
1422
1426
|
}
|
|
1423
1427
|
});
|
|
1424
|
-
return
|
|
1425
|
-
class:
|
|
1428
|
+
return t({ focus: A }), (T, D) => (a(), p("div", {
|
|
1429
|
+
class: k([e.fullWidth ? "w-full" : "", e.wrapperClasses])
|
|
1426
1430
|
}, [
|
|
1427
|
-
|
|
1431
|
+
m("label", {
|
|
1428
1432
|
for: e.name,
|
|
1429
|
-
class:
|
|
1433
|
+
class: k(l(w))
|
|
1430
1434
|
}, [
|
|
1431
|
-
|
|
1432
|
-
], 10,
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
e.customIcon ? (a(),
|
|
1435
|
+
m("span", null, L(l(i)), 1)
|
|
1436
|
+
], 10, Bn),
|
|
1437
|
+
m("div", _n, [
|
|
1438
|
+
P.value ? (a(), p("div", Ln, [
|
|
1439
|
+
e.customIcon ? (a(), z(Z(e.customIcon), {
|
|
1436
1440
|
key: 0,
|
|
1437
|
-
class:
|
|
1441
|
+
class: k($.value),
|
|
1438
1442
|
"aria-hidden": "true"
|
|
1439
|
-
}, null, 8, ["class"])) : e.type === "email" ? (a(),
|
|
1443
|
+
}, null, 8, ["class"])) : e.type === "email" ? (a(), z(l(Ut), {
|
|
1440
1444
|
key: 1,
|
|
1441
|
-
class:
|
|
1445
|
+
class: k($.value),
|
|
1442
1446
|
"aria-hidden": "true"
|
|
1443
|
-
}, null, 8, ["class"])) : e.type === "password" ? (a(),
|
|
1447
|
+
}, null, 8, ["class"])) : e.type === "password" ? (a(), z(l(Wt), {
|
|
1444
1448
|
key: 2,
|
|
1445
|
-
class:
|
|
1449
|
+
class: k($.value),
|
|
1446
1450
|
"aria-hidden": "true"
|
|
1447
|
-
}, null, 8, ["class"])) :
|
|
1448
|
-
])) :
|
|
1449
|
-
|
|
1451
|
+
}, null, 8, ["class"])) : S("", !0)
|
|
1452
|
+
])) : S("", !0),
|
|
1453
|
+
de(m("input", ye({
|
|
1450
1454
|
id: e.name,
|
|
1451
1455
|
ref_key: "inputElement",
|
|
1452
|
-
ref:
|
|
1453
|
-
"onUpdate:modelValue":
|
|
1456
|
+
ref: o,
|
|
1457
|
+
"onUpdate:modelValue": D[0] || (D[0] = (F) => $e(f) ? f.value = F : null),
|
|
1454
1458
|
type: e.type,
|
|
1455
1459
|
name: e.name,
|
|
1456
|
-
class: [l(
|
|
1460
|
+
class: [l(d), E.value, g.value, e.inputClasses || ""],
|
|
1457
1461
|
placeholder: e.placeholder,
|
|
1458
1462
|
disabled: e.disabled,
|
|
1459
|
-
"aria-invalid": l(
|
|
1460
|
-
"aria-describedby": l(
|
|
1463
|
+
"aria-invalid": l(C) ? "true" : "false",
|
|
1464
|
+
"aria-describedby": l(c),
|
|
1461
1465
|
role: "textbox"
|
|
1462
|
-
},
|
|
1463
|
-
onChange:
|
|
1464
|
-
onInput:
|
|
1465
|
-
}), null, 16,
|
|
1466
|
-
[
|
|
1466
|
+
}, T.$attrs, {
|
|
1467
|
+
onChange: D[1] || (D[1] = (F) => T.$emit("change", { event: F, value: l(f) })),
|
|
1468
|
+
onInput: D[2] || (D[2] = (F) => T.$emit("input", { event: F, value: l(f) }))
|
|
1469
|
+
}), null, 16, Vn), [
|
|
1470
|
+
[gt, l(f)]
|
|
1467
1471
|
]),
|
|
1468
|
-
|
|
1472
|
+
R(T.$slots, "input-right", {}, () => [
|
|
1469
1473
|
e.showClear ? (a(), p("a", {
|
|
1470
1474
|
key: 0,
|
|
1471
1475
|
title: "Clear input",
|
|
1472
1476
|
class: "absolute inset-y-0 right-0 flex items-center pr-2 cursor-pointer",
|
|
1473
|
-
onClick:
|
|
1474
|
-
(...
|
|
1475
|
-
onKeydown:
|
|
1476
|
-
(...
|
|
1477
|
+
onClick: D[3] || (D[3] = //@ts-ignore
|
|
1478
|
+
(...F) => l(b) && l(b)(...F)),
|
|
1479
|
+
onKeydown: D[4] || (D[4] = //@ts-ignore
|
|
1480
|
+
(...F) => l(b) && l(b)(...F))
|
|
1477
1481
|
}, [
|
|
1478
|
-
|
|
1479
|
-
|
|
1482
|
+
zn,
|
|
1483
|
+
_(l(pe), {
|
|
1480
1484
|
class: "h-5 w-5 text-foreground",
|
|
1481
1485
|
"aria-hidden": "true"
|
|
1482
1486
|
})
|
|
1483
|
-
], 32)) :
|
|
1484
|
-
l(
|
|
1487
|
+
], 32)) : S("", !0),
|
|
1488
|
+
l(C) ? (a(), p("div", {
|
|
1485
1489
|
key: 1,
|
|
1486
|
-
class:
|
|
1490
|
+
class: k([
|
|
1487
1491
|
"pointer-events-none absolute inset-y-0 right-0 flex items-center",
|
|
1488
1492
|
e.showClear ? "pr-8" : "pr-2"
|
|
1489
1493
|
])
|
|
1490
1494
|
}, [
|
|
1491
|
-
|
|
1495
|
+
_(l(Ie), {
|
|
1492
1496
|
class: "h-4 w-4 text-danger",
|
|
1493
1497
|
"aria-hidden": "true"
|
|
1494
1498
|
})
|
|
1495
|
-
], 2)) :
|
|
1496
|
-
e.showRequired && !l(
|
|
1499
|
+
], 2)) : S("", !0),
|
|
1500
|
+
e.showRequired && !l(C) ? (a(), p("div", {
|
|
1497
1501
|
key: 2,
|
|
1498
|
-
class:
|
|
1499
|
-
}, " * ", 2)) :
|
|
1502
|
+
class: k(["pointer-events-none absolute inset-y-0 mt-3 text-4xl right-0 flex items-center text-danger opacity-50", [e.showClear ? "pr-8" : "pr-2"]])
|
|
1503
|
+
}, " * ", 2)) : S("", !0)
|
|
1500
1504
|
])
|
|
1501
1505
|
]),
|
|
1502
|
-
l(
|
|
1506
|
+
l(c) && !l(h) ? (a(), p("p", {
|
|
1503
1507
|
key: 0,
|
|
1504
|
-
id: l(
|
|
1505
|
-
class:
|
|
1506
|
-
},
|
|
1508
|
+
id: l(c),
|
|
1509
|
+
class: k(l(x))
|
|
1510
|
+
}, L(l(v)), 11, Pn)) : S("", !0)
|
|
1507
1511
|
], 2));
|
|
1508
1512
|
}
|
|
1509
|
-
}),
|
|
1510
|
-
const { minLength:
|
|
1511
|
-
return
|
|
1512
|
-
},
|
|
1513
|
-
const { match:
|
|
1514
|
-
return
|
|
1515
|
-
},
|
|
1513
|
+
}), rt = /^https?:\/\//, qe = /^[\w-_.+]+@[\w-_.+]+$/, jn = (e) => (e || "").match(qe) ? !0 : "Value should be a valid e-mail address", An = (e) => (e || "").split(",").map((n) => n.trim()).every((n) => n.match(qe)) || "Value should be one or multiple comma-delimited e-mail addresses", On = (e) => (Ce(e) && (e = e.trim()), e ? !0 : "Value is required"), Mn = (e, t) => (s, n) => s === n.form[e] ? !0 : `Value must be the same as in field '${t || e}'`, Tn = (e) => (t) => {
|
|
1514
|
+
const { minLength: s, maxLength: n } = e;
|
|
1515
|
+
return t = Ht(t) ? "" : t, Ce(t) ? !ce(s) && t.length < s ? `Value needs to be at least ${s} characters long` : !ce(n) && t.length > n ? `Value needs to be no more than ${n} characters long` : !0 : "Value should be a text string";
|
|
1516
|
+
}, Fn = (e) => (t) => {
|
|
1517
|
+
const { match: s, message: n } = e;
|
|
1518
|
+
return Ce(t) ? s ? Ce(s) ? t.includes(s) ? !0 : n : s.test(t) ? !0 : n : !0 : "Value should be a text string";
|
|
1519
|
+
}, Rn = (e) => rt.test(e) ? !0 : "Value is not a valid URL", En = (e) => Array.isArray(e) && e.length > 0 ? !0 : "Value should have at least a single item selected", Fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1516
1520
|
__proto__: null,
|
|
1517
|
-
VALID_EMAIL:
|
|
1518
|
-
VALID_HTTP_URL:
|
|
1519
|
-
isEmail:
|
|
1520
|
-
isItemSelected:
|
|
1521
|
-
isOneOrMultipleEmails:
|
|
1522
|
-
isRequired:
|
|
1523
|
-
isSameAs:
|
|
1524
|
-
isStringOfLength:
|
|
1525
|
-
isUrl:
|
|
1526
|
-
stringContains:
|
|
1521
|
+
VALID_EMAIL: qe,
|
|
1522
|
+
VALID_HTTP_URL: rt,
|
|
1523
|
+
isEmail: jn,
|
|
1524
|
+
isItemSelected: En,
|
|
1525
|
+
isOneOrMultipleEmails: An,
|
|
1526
|
+
isRequired: On,
|
|
1527
|
+
isSameAs: Mn,
|
|
1528
|
+
isStringOfLength: Tn,
|
|
1529
|
+
isUrl: Rn,
|
|
1530
|
+
stringContains: Fn
|
|
1527
1531
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1528
|
-
function
|
|
1532
|
+
function it(e) {
|
|
1529
1533
|
const {
|
|
1530
|
-
skipCalculation:
|
|
1531
|
-
elementToWatchForChanges:
|
|
1532
|
-
itemContainer:
|
|
1533
|
-
trackResize:
|
|
1534
|
-
trackMutations:
|
|
1535
|
-
} = e || {},
|
|
1536
|
-
const
|
|
1537
|
-
if (
|
|
1534
|
+
skipCalculation: t,
|
|
1535
|
+
elementToWatchForChanges: s,
|
|
1536
|
+
itemContainer: n,
|
|
1537
|
+
trackResize: r = !1,
|
|
1538
|
+
trackMutations: o = !0
|
|
1539
|
+
} = e || {}, d = j(0), i = () => {
|
|
1540
|
+
const f = n.value;
|
|
1541
|
+
if (t != null && t.value || !f)
|
|
1538
1542
|
return;
|
|
1539
|
-
const
|
|
1540
|
-
let
|
|
1541
|
-
for (const
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1543
|
+
const c = f.children;
|
|
1544
|
+
let x = 0, v = 0, h;
|
|
1545
|
+
for (const C of c) {
|
|
1546
|
+
const b = C.offsetTop;
|
|
1547
|
+
ce(h) ? (h = b, x += 1) : b === h && (x += 1), v += 1;
|
|
1544
1548
|
}
|
|
1545
|
-
|
|
1549
|
+
d.value = v - x;
|
|
1546
1550
|
};
|
|
1547
|
-
return
|
|
1551
|
+
return r && Qt(s, i), o && Nt(s, i, {
|
|
1548
1552
|
childList: !0,
|
|
1549
1553
|
subtree: !0
|
|
1550
1554
|
}), {
|
|
1551
|
-
hiddenItemCount:
|
|
1555
|
+
hiddenItemCount: d
|
|
1552
1556
|
};
|
|
1553
1557
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const { props:
|
|
1556
|
-
let
|
|
1557
|
-
if (
|
|
1558
|
-
const { elementToWatchForChanges:
|
|
1559
|
-
|
|
1560
|
-
skipCalculation:
|
|
1561
|
-
var
|
|
1562
|
-
return !((
|
|
1558
|
+
function ut(e) {
|
|
1559
|
+
const { props: t, emit: s, dynamicVisibility: n } = e;
|
|
1560
|
+
let r;
|
|
1561
|
+
if (n) {
|
|
1562
|
+
const { elementToWatchForChanges: c, itemContainer: x } = n;
|
|
1563
|
+
r = it({
|
|
1564
|
+
skipCalculation: u(() => {
|
|
1565
|
+
var h;
|
|
1566
|
+
return !((h = t.multiple) != null && h.value);
|
|
1563
1567
|
}),
|
|
1564
|
-
elementToWatchForChanges:
|
|
1565
|
-
itemContainer:
|
|
1568
|
+
elementToWatchForChanges: c,
|
|
1569
|
+
itemContainer: x
|
|
1566
1570
|
}).hiddenItemCount;
|
|
1567
1571
|
} else
|
|
1568
|
-
|
|
1569
|
-
const
|
|
1572
|
+
r = j(0);
|
|
1573
|
+
const o = u({
|
|
1570
1574
|
get: () => {
|
|
1571
|
-
var
|
|
1572
|
-
const
|
|
1573
|
-
return (
|
|
1575
|
+
var x, v;
|
|
1576
|
+
const c = (x = t.modelValue) == null ? void 0 : x.value;
|
|
1577
|
+
return (v = t.multiple) != null && v.value ? X(c) ? c : [] : X(c) ? void 0 : c;
|
|
1574
1578
|
},
|
|
1575
|
-
set: (
|
|
1576
|
-
var
|
|
1577
|
-
if ((
|
|
1579
|
+
set: (c) => {
|
|
1580
|
+
var x, v, h;
|
|
1581
|
+
if ((x = t.multiple) != null && x.value && !X(c)) {
|
|
1578
1582
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1579
1583
|
return;
|
|
1580
|
-
} else if (!((
|
|
1584
|
+
} else if (!((v = t.multiple) != null && v.value) && X(c)) {
|
|
1581
1585
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1582
1586
|
return;
|
|
1583
1587
|
}
|
|
1584
|
-
|
|
1588
|
+
s("update:modelValue", (h = t.multiple) != null && h.value ? c || [] : c);
|
|
1585
1589
|
}
|
|
1586
|
-
}),
|
|
1590
|
+
}), d = (c) => X(c);
|
|
1587
1591
|
return {
|
|
1588
|
-
selectedValue:
|
|
1589
|
-
hiddenSelectedItemCount:
|
|
1590
|
-
isArrayValue:
|
|
1591
|
-
isMultiItemArrayValue: (
|
|
1592
|
-
firstItem: (
|
|
1592
|
+
selectedValue: o,
|
|
1593
|
+
hiddenSelectedItemCount: r,
|
|
1594
|
+
isArrayValue: d,
|
|
1595
|
+
isMultiItemArrayValue: (c) => X(c) && c.length > 1,
|
|
1596
|
+
firstItem: (c) => d(c) ? c[0] : c
|
|
1593
1597
|
};
|
|
1594
1598
|
}
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1597
|
-
],
|
|
1599
|
+
const Dn = (e) => (bt("data-v-60cf597b"), e = e(), yt(), e), Un = /* @__PURE__ */ Dn(() => /* @__PURE__ */ m("div", { class: "swoosher relative top-0 bg-blue-500/50" }, null, -1)), Wn = [
|
|
1600
|
+
Un
|
|
1601
|
+
], qn = /* @__PURE__ */ O({
|
|
1598
1602
|
__name: "Bar",
|
|
1599
1603
|
props: {
|
|
1600
1604
|
loading: { type: Boolean }
|
|
1601
1605
|
},
|
|
1602
1606
|
setup(e) {
|
|
1603
|
-
return (
|
|
1604
|
-
class:
|
|
1607
|
+
return (t, s) => (a(), p("div", {
|
|
1608
|
+
class: k([
|
|
1605
1609
|
"relative w-full h-1 bg-blue-500/30 text-xs text-foreground-on-primary overflow-hidden rounded-xl",
|
|
1606
1610
|
e.loading ? "opacity-100" : "opacity-0"
|
|
1607
1611
|
])
|
|
1608
|
-
},
|
|
1612
|
+
}, Wn, 2));
|
|
1609
1613
|
}
|
|
1610
1614
|
});
|
|
1611
|
-
const
|
|
1615
|
+
const Ke = /* @__PURE__ */ at(qn, [["__scopeId", "data-v-60cf597b"]]), Kn = { class: "flex items-center justify-between w-full" }, Hn = { class: "block truncate grow text-left" }, Gn = { class: "pointer-events-none shrink-0 ml-1 flex items-center space-x-2" }, Xn = {
|
|
1612
1616
|
key: 1,
|
|
1613
1617
|
class: "text-4xl text-danger opacity-50 h-4 w-4 leading-6"
|
|
1614
|
-
},
|
|
1618
|
+
}, Zn = ["disabled"], Qn = {
|
|
1615
1619
|
key: 0,
|
|
1616
1620
|
class: "flex flex-col mx-1 mb-1"
|
|
1617
|
-
},
|
|
1621
|
+
}, Nn = /* @__PURE__ */ m("span", { class: "sr-only label text-foreground" }, "Search", -1), Jn = { class: "relative" }, Yn = { class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2" }, el = ["placeholder"], tl = {
|
|
1618
1622
|
key: 0,
|
|
1619
1623
|
class: "px-1"
|
|
1620
|
-
},
|
|
1621
|
-
class: /* @__PURE__ */
|
|
1622
|
-
},
|
|
1624
|
+
}, sl = { key: 1 }, nl = /* @__PURE__ */ m("div", { class: "text-foreground-2 text-center" }, "Nothing found 🤷♂️", -1), ll = {
|
|
1625
|
+
class: /* @__PURE__ */ k(["block truncate"])
|
|
1626
|
+
}, al = ["id"], ct = /* @__PURE__ */ O({
|
|
1623
1627
|
__name: "Base",
|
|
1624
1628
|
props: {
|
|
1625
1629
|
multiple: {
|
|
@@ -1780,158 +1784,158 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
1780
1784
|
}
|
|
1781
1785
|
},
|
|
1782
1786
|
emits: ["update:modelValue"],
|
|
1783
|
-
setup(e, { expose:
|
|
1784
|
-
const
|
|
1785
|
-
validateOnMount:
|
|
1786
|
-
validateOnValueUpdate:
|
|
1787
|
-
initialValue:
|
|
1788
|
-
}),
|
|
1789
|
-
const
|
|
1790
|
-
return !
|
|
1791
|
-
}),
|
|
1792
|
-
() =>
|
|
1793
|
-
),
|
|
1794
|
-
() =>
|
|
1795
|
-
),
|
|
1796
|
-
() =>
|
|
1797
|
-
),
|
|
1798
|
-
const
|
|
1799
|
-
return
|
|
1800
|
-
}),
|
|
1801
|
-
const
|
|
1802
|
-
return
|
|
1803
|
-
|
|
1804
|
-
),
|
|
1805
|
-
}),
|
|
1806
|
-
const
|
|
1787
|
+
setup(e, { expose: t, emit: s }) {
|
|
1788
|
+
const n = e, r = (y) => Le(y), { value: o, errorMessage: d } = Re(n.name, n.rules, {
|
|
1789
|
+
validateOnMount: n.validateOnMount,
|
|
1790
|
+
validateOnValueUpdate: n.validateOnValueUpdate,
|
|
1791
|
+
initialValue: n.modelValue
|
|
1792
|
+
}), i = j(null), f = j(""), c = j([]), x = j(!1), v = j(1), h = j(Ee()), C = u(() => l(n.label) || l(n.name)), b = u(() => {
|
|
1793
|
+
const y = d.value;
|
|
1794
|
+
return !y || !l(n.useLabelInErrors) ? y : y.replace("Value", C.value);
|
|
1795
|
+
}), A = u(() => b.value || l(n.help)), w = u(() => !!A.value), $ = u(
|
|
1796
|
+
() => w.value ? `${l(n.name)}-${h.value}` : void 0
|
|
1797
|
+
), P = u(
|
|
1798
|
+
() => d.value ? "text-danger" : "text-foreground-2"
|
|
1799
|
+
), E = u(
|
|
1800
|
+
() => n.buttonStyle !== "simple" && n.clearable && !n.disabled
|
|
1801
|
+
), g = u(() => {
|
|
1802
|
+
const y = ["relative flex group"];
|
|
1803
|
+
return d.value ? (y.push("hover:shadow rounded-md"), y.push("text-danger-darker focus:border-danger focus:ring-danger"), n.buttonStyle !== "simple" && y.push("outline outline-2 outline-danger")) : n.buttonStyle !== "simple" && (y.push("hover:shadow rounded-md"), y.push("outline outline-2 outline-primary-muted")), n.fixedHeight && y.push("h-8"), y.join(" ");
|
|
1804
|
+
}), T = u(() => {
|
|
1805
|
+
const y = [];
|
|
1806
|
+
return n.buttonStyle !== "simple" && y.push(
|
|
1807
|
+
ee.value ? "bg-foundation-disabled text-foreground-disabled" : ""
|
|
1808
|
+
), ee.value && y.push("cursor-not-allowed"), y.join(" ");
|
|
1809
|
+
}), D = u(() => {
|
|
1810
|
+
const y = [
|
|
1807
1811
|
"relative z-[1]",
|
|
1808
1812
|
"flex items-center justify-center text-center shrink-0",
|
|
1809
1813
|
"rounded-r-md overflow-hidden transition-all",
|
|
1810
1814
|
"text-foreground",
|
|
1811
|
-
|
|
1815
|
+
xe.value ? `w-6 ${T.value}` : "w-0"
|
|
1812
1816
|
];
|
|
1813
|
-
return
|
|
1817
|
+
return ee.value || (y.push(
|
|
1814
1818
|
"hover:bg-primary hover:text-foreground-on-primary dark:text-foreground-on-primary"
|
|
1815
|
-
),
|
|
1816
|
-
}),
|
|
1817
|
-
const
|
|
1819
|
+
), n.buttonStyle === "tinted" ? y.push("bg-outline-3") : y.push("bg-primary-muted")), y.join(" ");
|
|
1820
|
+
}), F = u(() => {
|
|
1821
|
+
const y = [
|
|
1818
1822
|
"relative z-[2]",
|
|
1819
1823
|
"normal rounded-md cursor-pointer transition truncate flex-1",
|
|
1820
1824
|
"flex items-center",
|
|
1821
|
-
|
|
1825
|
+
T.value
|
|
1822
1826
|
];
|
|
1823
|
-
return
|
|
1824
|
-
}),
|
|
1825
|
-
() => !!(
|
|
1826
|
-
),
|
|
1827
|
-
() =>
|
|
1828
|
-
),
|
|
1827
|
+
return n.buttonStyle !== "simple" && (y.push("py-2 px-3"), ee.value || (n.buttonStyle === "tinted" ? y.push("bg-foundation-page text-foreground") : y.push("bg-foundation text-foreground"))), E.value && xe.value && y.push("rounded-r-none"), y.join(" ");
|
|
1828
|
+
}), ae = u(
|
|
1829
|
+
() => !!(n.search && (n.filterPredicate || n.getSearchResults))
|
|
1830
|
+
), G = u(() => ae.value && n.getSearchResults), ee = u(
|
|
1831
|
+
() => n.disabled || !n.items.length && !G.value
|
|
1832
|
+
), H = u({
|
|
1829
1833
|
get: () => {
|
|
1830
|
-
const
|
|
1831
|
-
return
|
|
1834
|
+
const y = o.value;
|
|
1835
|
+
return n.multiple ? X(y) ? y : [] : X(y) ? void 0 : y;
|
|
1832
1836
|
},
|
|
1833
|
-
set: (
|
|
1834
|
-
if (
|
|
1837
|
+
set: (y) => {
|
|
1838
|
+
if (n.multiple && !X(y)) {
|
|
1835
1839
|
console.warn("Attempting to set non-array value in selector w/ multiple=true");
|
|
1836
1840
|
return;
|
|
1837
|
-
} else if (!
|
|
1841
|
+
} else if (!n.multiple && X(y)) {
|
|
1838
1842
|
console.warn("Attempting to set array value in selector w/ multiple=false");
|
|
1839
1843
|
return;
|
|
1840
1844
|
}
|
|
1841
|
-
let
|
|
1842
|
-
if (
|
|
1843
|
-
|
|
1845
|
+
let B;
|
|
1846
|
+
if (n.multiple)
|
|
1847
|
+
B = y || [];
|
|
1844
1848
|
else {
|
|
1845
|
-
const
|
|
1846
|
-
|
|
1849
|
+
const I = o.value;
|
|
1850
|
+
B = n.allowUnset && I && y && te(I) === te(y) ? void 0 : y;
|
|
1847
1851
|
}
|
|
1848
|
-
|
|
1852
|
+
n.fullyControlValue ? s("update:modelValue", B) : o.value = B, v.value += 1;
|
|
1849
1853
|
}
|
|
1850
|
-
}),
|
|
1851
|
-
|
|
1852
|
-
},
|
|
1853
|
-
const
|
|
1854
|
-
return !
|
|
1855
|
-
(
|
|
1856
|
-
var
|
|
1857
|
-
return ((
|
|
1854
|
+
}), xe = u(() => n.multiple && X(H.value) ? H.value.length !== 0 : !!H.value), Se = () => {
|
|
1855
|
+
n.multiple ? H.value = [] : H.value = void 0;
|
|
1856
|
+
}, Be = u(() => {
|
|
1857
|
+
const y = f.value;
|
|
1858
|
+
return !ae.value || !(y != null && y.length) ? c.value : n.filterPredicate ? c.value.filter(
|
|
1859
|
+
(B) => {
|
|
1860
|
+
var I;
|
|
1861
|
+
return ((I = n.filterPredicate) == null ? void 0 : I.call(n, B, y)) || !1;
|
|
1858
1862
|
}
|
|
1859
|
-
) :
|
|
1860
|
-
}),
|
|
1861
|
-
if (!(!
|
|
1862
|
-
|
|
1863
|
+
) : c.value;
|
|
1864
|
+
}), ke = (y) => JSON.stringify(y), te = (y) => r(y) ? y[n.by || "id"] : y, he = async () => {
|
|
1865
|
+
if (!(!G.value || !n.getSearchResults)) {
|
|
1866
|
+
x.value = !0;
|
|
1863
1867
|
try {
|
|
1864
|
-
|
|
1868
|
+
c.value = await n.getSearchResults(f.value);
|
|
1865
1869
|
} finally {
|
|
1866
|
-
|
|
1870
|
+
x.value = !1;
|
|
1867
1871
|
}
|
|
1868
1872
|
}
|
|
1869
|
-
},
|
|
1870
|
-
const { active:
|
|
1873
|
+
}, _e = Te(he, 1e3), me = (y) => {
|
|
1874
|
+
const { active: B, disabled: I } = y || {}, { hideCheckmarks: W } = n, K = [
|
|
1871
1875
|
"relative transition cursor-pointer select-none py-1.5 pl-3",
|
|
1872
|
-
|
|
1876
|
+
W ? "" : "pr-9"
|
|
1873
1877
|
];
|
|
1874
|
-
return
|
|
1878
|
+
return I ? K.push("opacity-50 cursor-not-allowed") : K.push(B ? "text-primary" : "text-foreground"), K.join(" ");
|
|
1875
1879
|
};
|
|
1876
|
-
return
|
|
1877
|
-
() =>
|
|
1878
|
-
(
|
|
1879
|
-
|
|
1880
|
+
return J(
|
|
1881
|
+
() => n.items,
|
|
1882
|
+
(y) => {
|
|
1883
|
+
c.value = y.slice();
|
|
1880
1884
|
},
|
|
1881
1885
|
{ immediate: !0 }
|
|
1882
|
-
),
|
|
1883
|
-
|
|
1886
|
+
), J(f, () => {
|
|
1887
|
+
G.value && _e();
|
|
1884
1888
|
}), se(() => {
|
|
1885
|
-
|
|
1886
|
-
}),
|
|
1887
|
-
(a(),
|
|
1888
|
-
key:
|
|
1889
|
-
modelValue:
|
|
1890
|
-
"onUpdate:modelValue":
|
|
1889
|
+
G.value && !n.items.length && he();
|
|
1890
|
+
}), t({ triggerSearch: he }), (y, B) => (a(), p("div", null, [
|
|
1891
|
+
(a(), z(l(ss), {
|
|
1892
|
+
key: v.value,
|
|
1893
|
+
modelValue: H.value,
|
|
1894
|
+
"onUpdate:modelValue": B[4] || (B[4] = (I) => H.value = I),
|
|
1891
1895
|
name: e.name,
|
|
1892
1896
|
multiple: e.multiple,
|
|
1893
1897
|
by: e.by,
|
|
1894
|
-
disabled:
|
|
1898
|
+
disabled: ee.value,
|
|
1895
1899
|
as: "div"
|
|
1896
1900
|
}, {
|
|
1897
|
-
default:
|
|
1898
|
-
|
|
1899
|
-
class:
|
|
1901
|
+
default: V(() => [
|
|
1902
|
+
_(l(ns), {
|
|
1903
|
+
class: k(["block label text-foreground-2 mb-2", { "sr-only": !e.showLabel }])
|
|
1900
1904
|
}, {
|
|
1901
|
-
default:
|
|
1902
|
-
|
|
1905
|
+
default: V(() => [
|
|
1906
|
+
M(L(e.label), 1)
|
|
1903
1907
|
]),
|
|
1904
1908
|
_: 1
|
|
1905
1909
|
}, 8, ["class"]),
|
|
1906
|
-
|
|
1907
|
-
class: g
|
|
1910
|
+
m("div", {
|
|
1911
|
+
class: k(g.value)
|
|
1908
1912
|
}, [
|
|
1909
|
-
|
|
1910
|
-
class:
|
|
1913
|
+
_(l(ls), {
|
|
1914
|
+
class: k(F.value)
|
|
1911
1915
|
}, {
|
|
1912
|
-
default:
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
!
|
|
1916
|
-
|
|
1917
|
-
]) :
|
|
1916
|
+
default: V(({ open: I }) => [
|
|
1917
|
+
m("div", Kn, [
|
|
1918
|
+
m("div", Hn, [
|
|
1919
|
+
!H.value || l(X)(H.value) && !H.value.length ? R(y.$slots, "nothing-selected", { key: 0 }, () => [
|
|
1920
|
+
M(L(e.placeholder ? e.placeholder : e.label), 1)
|
|
1921
|
+
]) : R(y.$slots, "something-selected", {
|
|
1918
1922
|
key: 1,
|
|
1919
|
-
value:
|
|
1923
|
+
value: H.value
|
|
1920
1924
|
}, () => [
|
|
1921
|
-
|
|
1925
|
+
M(L(ke(H.value)), 1)
|
|
1922
1926
|
])
|
|
1923
1927
|
]),
|
|
1924
|
-
|
|
1925
|
-
|
|
1928
|
+
m("div", Gn, [
|
|
1929
|
+
b.value ? (a(), z(l(Lt), {
|
|
1926
1930
|
key: 0,
|
|
1927
1931
|
class: "h-4 w-4 text-danger",
|
|
1928
1932
|
"aria-hidden": "true"
|
|
1929
|
-
})) : e.showRequired ? (a(), p("div",
|
|
1930
|
-
|
|
1933
|
+
})) : e.showRequired ? (a(), p("div", Xn, " * ")) : S("", !0),
|
|
1934
|
+
I ? (a(), z(l(Ye), {
|
|
1931
1935
|
key: 2,
|
|
1932
1936
|
class: "h-4 w-4 text-foreground",
|
|
1933
1937
|
"aria-hidden": "true"
|
|
1934
|
-
})) : (a(),
|
|
1938
|
+
})) : (a(), z(l(Vt), {
|
|
1935
1939
|
key: 3,
|
|
1936
1940
|
class: "h-4 w-4 text-foreground",
|
|
1937
1941
|
"aria-hidden": "true"
|
|
@@ -1941,106 +1945,106 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
1941
1945
|
]),
|
|
1942
1946
|
_: 3
|
|
1943
1947
|
}, 8, ["class"]),
|
|
1944
|
-
|
|
1948
|
+
E.value ? de((a(), p("button", {
|
|
1945
1949
|
key: 0,
|
|
1946
|
-
class:
|
|
1950
|
+
class: k(D.value),
|
|
1947
1951
|
disabled: e.disabled,
|
|
1948
|
-
onClick:
|
|
1952
|
+
onClick: B[0] || (B[0] = (I) => Se())
|
|
1949
1953
|
}, [
|
|
1950
|
-
|
|
1951
|
-
], 10,
|
|
1952
|
-
[l(
|
|
1953
|
-
]) :
|
|
1954
|
-
|
|
1954
|
+
_(l(Fe), { class: "w-3 h-3" })
|
|
1955
|
+
], 10, Zn)), [
|
|
1956
|
+
[l(lt), "Clear"]
|
|
1957
|
+
]) : S("", !0),
|
|
1958
|
+
_(Ae, {
|
|
1955
1959
|
"leave-active-class": "transition ease-in duration-100",
|
|
1956
1960
|
"leave-from-class": "opacity-100",
|
|
1957
1961
|
"leave-to-class": "opacity-0"
|
|
1958
1962
|
}, {
|
|
1959
|
-
default:
|
|
1960
|
-
|
|
1963
|
+
default: V(() => [
|
|
1964
|
+
_(l(as), {
|
|
1961
1965
|
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",
|
|
1962
|
-
onFocus:
|
|
1963
|
-
var
|
|
1964
|
-
return (
|
|
1966
|
+
onFocus: B[3] || (B[3] = (I) => {
|
|
1967
|
+
var W;
|
|
1968
|
+
return (W = i.value) == null ? void 0 : W.focus();
|
|
1965
1969
|
})
|
|
1966
1970
|
}, {
|
|
1967
|
-
default:
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1971
|
+
default: V(() => [
|
|
1972
|
+
ae.value ? (a(), p("label", Qn, [
|
|
1973
|
+
Nn,
|
|
1974
|
+
m("div", Jn, [
|
|
1975
|
+
m("div", Yn, [
|
|
1976
|
+
_(l(zt), { class: "h-5 w-5 text-foreground" })
|
|
1973
1977
|
]),
|
|
1974
|
-
|
|
1978
|
+
de(m("input", {
|
|
1975
1979
|
ref_key: "searchInput",
|
|
1976
|
-
ref:
|
|
1977
|
-
"onUpdate:modelValue":
|
|
1980
|
+
ref: i,
|
|
1981
|
+
"onUpdate:modelValue": B[1] || (B[1] = (I) => f.value = I),
|
|
1978
1982
|
type: "text",
|
|
1979
1983
|
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",
|
|
1980
1984
|
placeholder: e.searchPlaceholder,
|
|
1981
|
-
onKeydown:
|
|
1985
|
+
onKeydown: B[2] || (B[2] = ne(() => {
|
|
1982
1986
|
}, ["stop"]))
|
|
1983
|
-
}, null, 40,
|
|
1984
|
-
[
|
|
1987
|
+
}, null, 40, el), [
|
|
1988
|
+
[Oe, f.value]
|
|
1985
1989
|
])
|
|
1986
1990
|
])
|
|
1987
|
-
])) :
|
|
1988
|
-
|
|
1989
|
-
class:
|
|
1991
|
+
])) : S("", !0),
|
|
1992
|
+
m("div", {
|
|
1993
|
+
class: k(["overflow-auto simple-scrollbar", [ae.value ? "max-h-52" : "max-h-60"]])
|
|
1990
1994
|
}, [
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
])) :
|
|
1994
|
-
|
|
1995
|
-
|
|
1995
|
+
G.value && x.value ? (a(), p("div", tl, [
|
|
1996
|
+
_(Ke, { loading: !0 })
|
|
1997
|
+
])) : G.value && !c.value.length ? (a(), p("div", sl, [
|
|
1998
|
+
R(y.$slots, "nothing-found", {}, () => [
|
|
1999
|
+
nl
|
|
1996
2000
|
])
|
|
1997
|
-
])) :
|
|
1998
|
-
!
|
|
1999
|
-
var
|
|
2000
|
-
return a(),
|
|
2001
|
-
key:
|
|
2002
|
-
value:
|
|
2003
|
-
disabled: ((
|
|
2001
|
+
])) : S("", !0),
|
|
2002
|
+
!G.value || !x.value ? (a(!0), p(U, { key: 2 }, q(Be.value, (I) => {
|
|
2003
|
+
var W;
|
|
2004
|
+
return a(), z(l(os), {
|
|
2005
|
+
key: te(I),
|
|
2006
|
+
value: I,
|
|
2007
|
+
disabled: ((W = e.disabledItemPredicate) == null ? void 0 : W.call(e, I)) || !1
|
|
2004
2008
|
}, {
|
|
2005
|
-
default:
|
|
2006
|
-
var
|
|
2009
|
+
default: V(({ active: K, selected: oe }) => {
|
|
2010
|
+
var re, we;
|
|
2007
2011
|
return [
|
|
2008
|
-
|
|
2009
|
-
class:
|
|
2010
|
-
|
|
2012
|
+
m("li", {
|
|
2013
|
+
class: k(
|
|
2014
|
+
me({
|
|
2011
2015
|
active: K,
|
|
2012
|
-
disabled: ((
|
|
2016
|
+
disabled: ((re = e.disabledItemPredicate) == null ? void 0 : re.call(e, I)) || !1
|
|
2013
2017
|
})
|
|
2014
2018
|
)
|
|
2015
2019
|
}, [
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
item:
|
|
2020
|
+
m("span", ll, [
|
|
2021
|
+
R(y.$slots, "option", {
|
|
2022
|
+
item: I,
|
|
2019
2023
|
active: K,
|
|
2020
|
-
selected:
|
|
2021
|
-
disabled: ((
|
|
2024
|
+
selected: oe,
|
|
2025
|
+
disabled: ((we = e.disabledItemPredicate) == null ? void 0 : we.call(e, I)) || !1
|
|
2022
2026
|
}, () => [
|
|
2023
|
-
|
|
2027
|
+
M(L(ke(I)), 1)
|
|
2024
2028
|
])
|
|
2025
2029
|
]),
|
|
2026
|
-
!e.hideCheckmarks &&
|
|
2030
|
+
!e.hideCheckmarks && oe ? (a(), p("span", {
|
|
2027
2031
|
key: 0,
|
|
2028
|
-
class:
|
|
2032
|
+
class: k([
|
|
2029
2033
|
K ? "text-primary" : "text-foreground",
|
|
2030
2034
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2031
2035
|
])
|
|
2032
2036
|
}, [
|
|
2033
|
-
|
|
2037
|
+
_(l(et), {
|
|
2034
2038
|
class: "h-5 w-5",
|
|
2035
2039
|
"aria-hidden": "true"
|
|
2036
2040
|
})
|
|
2037
|
-
], 2)) :
|
|
2041
|
+
], 2)) : S("", !0)
|
|
2038
2042
|
], 2)
|
|
2039
2043
|
];
|
|
2040
2044
|
}),
|
|
2041
2045
|
_: 2
|
|
2042
2046
|
}, 1032, ["value", "disabled"]);
|
|
2043
|
-
}), 128)) :
|
|
2047
|
+
}), 128)) : S("", !0)
|
|
2044
2048
|
], 2)
|
|
2045
2049
|
]),
|
|
2046
2050
|
_: 3
|
|
@@ -2052,37 +2056,37 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
2052
2056
|
]),
|
|
2053
2057
|
_: 3
|
|
2054
2058
|
}, 8, ["modelValue", "name", "multiple", "by", "disabled"])),
|
|
2055
|
-
|
|
2059
|
+
$.value ? (a(), p("p", {
|
|
2056
2060
|
key: 0,
|
|
2057
|
-
id:
|
|
2058
|
-
class:
|
|
2059
|
-
},
|
|
2061
|
+
id: $.value,
|
|
2062
|
+
class: k(["mt-2 text-sm", P.value])
|
|
2063
|
+
}, L(A.value), 11, al)) : S("", !0)
|
|
2060
2064
|
]));
|
|
2061
2065
|
}
|
|
2062
|
-
}),
|
|
2066
|
+
}), ol = /* @__PURE__ */ O({
|
|
2063
2067
|
__name: "SourceAppBadge",
|
|
2064
2068
|
props: {
|
|
2065
2069
|
sourceApp: null
|
|
2066
2070
|
},
|
|
2067
2071
|
setup(e) {
|
|
2068
|
-
return (
|
|
2072
|
+
return (t, s) => (a(), z(Ue, {
|
|
2069
2073
|
"color-classes": "text-foreground-on-primary",
|
|
2070
2074
|
rounded: "",
|
|
2071
|
-
style:
|
|
2075
|
+
style: fe({ backgroundColor: e.sourceApp.bgColor })
|
|
2072
2076
|
}, {
|
|
2073
|
-
default:
|
|
2074
|
-
|
|
2077
|
+
default: V(() => [
|
|
2078
|
+
M(L(e.sourceApp.short), 1)
|
|
2075
2079
|
]),
|
|
2076
2080
|
_: 1
|
|
2077
2081
|
}, 8, ["style"]));
|
|
2078
2082
|
}
|
|
2079
|
-
}),
|
|
2083
|
+
}), rl = {
|
|
2080
2084
|
key: 0,
|
|
2081
2085
|
class: "text-foreground-2 normal"
|
|
2082
|
-
},
|
|
2086
|
+
}, il = {
|
|
2083
2087
|
key: 1,
|
|
2084
2088
|
class: "flex items-center"
|
|
2085
|
-
},
|
|
2089
|
+
}, ul = { class: "truncate" }, cl = { class: "flex items-center" }, dl = { class: "truncate" }, Ra = /* @__PURE__ */ O({
|
|
2086
2090
|
__name: "SourceApps",
|
|
2087
2091
|
props: {
|
|
2088
2092
|
/**
|
|
@@ -2147,73 +2151,73 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
2147
2151
|
}
|
|
2148
2152
|
},
|
|
2149
2153
|
emits: ["update:modelValue"],
|
|
2150
|
-
setup(e, { emit:
|
|
2151
|
-
const
|
|
2152
|
-
props:
|
|
2153
|
-
emit:
|
|
2154
|
-
dynamicVisibility: { elementToWatchForChanges:
|
|
2155
|
-
}),
|
|
2156
|
-
return (
|
|
2157
|
-
modelValue: l(
|
|
2158
|
-
"onUpdate:modelValue":
|
|
2154
|
+
setup(e, { emit: t }) {
|
|
2155
|
+
const s = e, n = j(null), r = j(null), { selectedValue: o, hiddenSelectedItemCount: d, isMultiItemArrayValue: i, firstItem: f } = ut({
|
|
2156
|
+
props: N(s),
|
|
2157
|
+
emit: t,
|
|
2158
|
+
dynamicVisibility: { elementToWatchForChanges: n, itemContainer: r }
|
|
2159
|
+
}), c = (x, v) => x.name.toLocaleLowerCase().includes(v.toLocaleLowerCase());
|
|
2160
|
+
return (x, v) => (a(), z(ct, {
|
|
2161
|
+
modelValue: l(o),
|
|
2162
|
+
"onUpdate:modelValue": v[0] || (v[0] = (h) => $e(o) ? o.value = h : null),
|
|
2159
2163
|
multiple: e.multiple,
|
|
2160
|
-
items: e.items ?? l(
|
|
2164
|
+
items: e.items ?? l(Gt),
|
|
2161
2165
|
search: e.search,
|
|
2162
2166
|
"search-placeholder": e.searchPlaceholder,
|
|
2163
2167
|
label: e.label,
|
|
2164
2168
|
"show-label": e.showLabel,
|
|
2165
2169
|
name: e.name || "sourceApps",
|
|
2166
|
-
"filter-predicate":
|
|
2170
|
+
"filter-predicate": c,
|
|
2167
2171
|
clearable: e.clearable,
|
|
2168
2172
|
help: e.help,
|
|
2169
2173
|
by: "name"
|
|
2170
2174
|
}, {
|
|
2171
|
-
"nothing-selected":
|
|
2172
|
-
e.selectorPlaceholder ? (a(), p(
|
|
2173
|
-
|
|
2174
|
-
], 64)) : (a(), p(
|
|
2175
|
-
|
|
2175
|
+
"nothing-selected": V(() => [
|
|
2176
|
+
e.selectorPlaceholder ? (a(), p(U, { key: 0 }, [
|
|
2177
|
+
M(L(e.selectorPlaceholder), 1)
|
|
2178
|
+
], 64)) : (a(), p(U, { key: 1 }, [
|
|
2179
|
+
M(L(e.multiple ? "Select apps" : "Select an app"), 1)
|
|
2176
2180
|
], 64))
|
|
2177
2181
|
]),
|
|
2178
|
-
"something-selected":
|
|
2179
|
-
l(
|
|
2182
|
+
"something-selected": V(({ value: h }) => [
|
|
2183
|
+
l(i)(h) ? (a(), p("div", {
|
|
2180
2184
|
key: 0,
|
|
2181
2185
|
ref_key: "elementToWatchForChanges",
|
|
2182
|
-
ref:
|
|
2186
|
+
ref: n,
|
|
2183
2187
|
class: "flex items-center space-x-0.5 h-5"
|
|
2184
2188
|
}, [
|
|
2185
|
-
|
|
2189
|
+
m("div", {
|
|
2186
2190
|
ref_key: "itemContainer",
|
|
2187
|
-
ref:
|
|
2191
|
+
ref: r,
|
|
2188
2192
|
class: "flex flex-wrap overflow-hidden space-x-0.5 h-5"
|
|
2189
2193
|
}, [
|
|
2190
|
-
(a(!0), p(
|
|
2191
|
-
key:
|
|
2192
|
-
"source-app":
|
|
2194
|
+
(a(!0), p(U, null, q(h, (C) => (a(), z(ol, {
|
|
2195
|
+
key: C.name,
|
|
2196
|
+
"source-app": C
|
|
2193
2197
|
}, null, 8, ["source-app"]))), 128))
|
|
2194
2198
|
], 512),
|
|
2195
|
-
l(
|
|
2196
|
-
], 512)) : (a(), p("div",
|
|
2197
|
-
|
|
2199
|
+
l(d) > 0 ? (a(), p("div", rl, " +" + L(l(d)), 1)) : S("", !0)
|
|
2200
|
+
], 512)) : (a(), p("div", il, [
|
|
2201
|
+
m("div", {
|
|
2198
2202
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2199
|
-
style:
|
|
2203
|
+
style: fe({ backgroundColor: l(f)(h).bgColor })
|
|
2200
2204
|
}, null, 4),
|
|
2201
|
-
|
|
2205
|
+
m("span", ul, L(l(f)(h).name), 1)
|
|
2202
2206
|
]))
|
|
2203
2207
|
]),
|
|
2204
|
-
option:
|
|
2205
|
-
|
|
2206
|
-
|
|
2208
|
+
option: V(({ item: h }) => [
|
|
2209
|
+
m("div", cl, [
|
|
2210
|
+
m("div", {
|
|
2207
2211
|
class: "h-2 w-2 rounded-full mr-2",
|
|
2208
|
-
style:
|
|
2212
|
+
style: fe({ backgroundColor: h.bgColor })
|
|
2209
2213
|
}, null, 4),
|
|
2210
|
-
|
|
2214
|
+
m("span", dl, L(h.name), 1)
|
|
2211
2215
|
])
|
|
2212
2216
|
]),
|
|
2213
2217
|
_: 1
|
|
2214
2218
|
}, 8, ["modelValue", "multiple", "items", "search", "search-placeholder", "label", "show-label", "name", "clearable", "help"]));
|
|
2215
2219
|
}
|
|
2216
|
-
}),
|
|
2220
|
+
}), fl = { class: "flex flex-wrap gap-1.5 text-xs" }, Ea = /* @__PURE__ */ O({
|
|
2217
2221
|
__name: "Badges",
|
|
2218
2222
|
props: {
|
|
2219
2223
|
items: null,
|
|
@@ -2226,16 +2230,16 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
2226
2230
|
by: null
|
|
2227
2231
|
},
|
|
2228
2232
|
emits: ["update:modelValue"],
|
|
2229
|
-
setup(e, { emit:
|
|
2230
|
-
const
|
|
2231
|
-
props:
|
|
2232
|
-
emit:
|
|
2233
|
-
}),
|
|
2234
|
-
|
|
2233
|
+
setup(e, { emit: t }) {
|
|
2234
|
+
const s = e, { selectedValue: n, isArrayValue: r } = ut({
|
|
2235
|
+
props: N(s),
|
|
2236
|
+
emit: t
|
|
2237
|
+
}), o = (d) => {
|
|
2238
|
+
r(n.value) ? n.value = n.value.filter((i) => i.id !== d.id) : n.value = void 0;
|
|
2235
2239
|
};
|
|
2236
|
-
return (
|
|
2237
|
-
modelValue: l(
|
|
2238
|
-
"onUpdate:modelValue":
|
|
2240
|
+
return (d, i) => (a(), z(ct, {
|
|
2241
|
+
modelValue: l(n),
|
|
2242
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => $e(n) ? n.value = f : null),
|
|
2239
2243
|
multiple: e.multiple,
|
|
2240
2244
|
items: e.items,
|
|
2241
2245
|
label: e.label,
|
|
@@ -2244,52 +2248,52 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
2244
2248
|
rules: e.rules,
|
|
2245
2249
|
by: e.by
|
|
2246
2250
|
}, {
|
|
2247
|
-
"something-selected":
|
|
2248
|
-
|
|
2249
|
-
(a(!0), p(
|
|
2250
|
-
key:
|
|
2251
|
+
"something-selected": V(({ value: f }) => [
|
|
2252
|
+
m("ul", fl, [
|
|
2253
|
+
(a(!0), p(U, null, q(l(r)(f) ? f : [f], (c) => (a(), p("li", {
|
|
2254
|
+
key: c[e.by]
|
|
2251
2255
|
}, [
|
|
2252
|
-
|
|
2256
|
+
_(Ue, {
|
|
2253
2257
|
size: "lg",
|
|
2254
2258
|
"clickable-icon": !0,
|
|
2255
|
-
"icon-left": l(
|
|
2256
|
-
onClickIcon:
|
|
2259
|
+
"icon-left": l(Fe),
|
|
2260
|
+
onClickIcon: ne((x) => o(c), ["stop"])
|
|
2257
2261
|
}, {
|
|
2258
|
-
default:
|
|
2259
|
-
|
|
2262
|
+
default: V(() => [
|
|
2263
|
+
M(L(c.text), 1)
|
|
2260
2264
|
]),
|
|
2261
2265
|
_: 2
|
|
2262
2266
|
}, 1032, ["icon-left", "onClickIcon"])
|
|
2263
2267
|
]))), 128))
|
|
2264
2268
|
])
|
|
2265
2269
|
]),
|
|
2266
|
-
option:
|
|
2267
|
-
|
|
2270
|
+
option: V(({ item: f }) => [
|
|
2271
|
+
M(L(f.text), 1)
|
|
2268
2272
|
]),
|
|
2269
2273
|
_: 1
|
|
2270
2274
|
}, 8, ["modelValue", "multiple", "items", "label", "name", "help", "rules", "by"]));
|
|
2271
2275
|
}
|
|
2272
|
-
}),
|
|
2276
|
+
}), pl = { class: "flex items-center" }, hl = { class: "absolute inset-0 flex items-center gap-2 px-1 text-white" }, Da = /* @__PURE__ */ O({
|
|
2273
2277
|
__name: "Switch",
|
|
2274
2278
|
props: {
|
|
2275
2279
|
modelValue: { type: Boolean }
|
|
2276
2280
|
},
|
|
2277
2281
|
emits: ["update:modelValue"],
|
|
2278
2282
|
setup(e) {
|
|
2279
|
-
const
|
|
2280
|
-
return (
|
|
2281
|
-
|
|
2282
|
-
modelValue:
|
|
2283
|
-
"onUpdate:modelValue":
|
|
2284
|
-
class:
|
|
2283
|
+
const t = xt(e, "modelValue");
|
|
2284
|
+
return (s, n) => (a(), p("div", pl, [
|
|
2285
|
+
_(l(rs), {
|
|
2286
|
+
modelValue: t.value,
|
|
2287
|
+
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
|
|
2288
|
+
class: k(["relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary", { "bg-primary": t.value, "bg-primary-muted": !t.value }])
|
|
2285
2289
|
}, {
|
|
2286
|
-
default:
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
+
default: V(() => [
|
|
2291
|
+
m("div", hl, [
|
|
2292
|
+
_(l(et), { class: "h-5 w-5 drop-shadow-md" }),
|
|
2293
|
+
_(l(Fe), { class: "h-5 w-5 drop-shadow-md" })
|
|
2290
2294
|
]),
|
|
2291
|
-
|
|
2292
|
-
class:
|
|
2295
|
+
m("span", {
|
|
2296
|
+
class: k(["scale-95 pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200", { "translate-x-5": t.value, "translate-x-0": !t.value }])
|
|
2293
2297
|
}, null, 2)
|
|
2294
2298
|
]),
|
|
2295
2299
|
_: 1
|
|
@@ -2297,61 +2301,61 @@ const Ue = /* @__PURE__ */ tt(Vl, [["__scopeId", "data-v-60cf597b"]]), _l = { cl
|
|
|
2297
2301
|
]));
|
|
2298
2302
|
}
|
|
2299
2303
|
});
|
|
2300
|
-
var
|
|
2301
|
-
const
|
|
2304
|
+
var be = /* @__PURE__ */ ((e) => (e.CtrlOrCmd = "cmd-or-ctrl", e.AltOrOpt = "alt-or-opt", e.Shift = "shift", e))(be || {});
|
|
2305
|
+
const ze = Xt(), ml = {
|
|
2302
2306
|
[
|
|
2303
2307
|
"cmd-or-ctrl"
|
|
2304
2308
|
/* CtrlOrCmd */
|
|
2305
|
-
]:
|
|
2309
|
+
]: ze === Ve.Mac ? "Cmd" : "Ctrl",
|
|
2306
2310
|
[
|
|
2307
2311
|
"alt-or-opt"
|
|
2308
2312
|
/* AltOrOpt */
|
|
2309
|
-
]:
|
|
2313
|
+
]: ze === Ve.Mac ? "Opt" : "Alt",
|
|
2310
2314
|
shift: "Shift"
|
|
2311
2315
|
};
|
|
2312
|
-
function
|
|
2313
|
-
const
|
|
2314
|
-
return e.map((
|
|
2316
|
+
function Ua(e) {
|
|
2317
|
+
const t = (s) => Object.values(be).includes(s);
|
|
2318
|
+
return e.map((s) => t(s) ? ml[s] : s).join("+");
|
|
2315
2319
|
}
|
|
2316
|
-
function
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
(
|
|
2320
|
-
const
|
|
2321
|
-
for (const
|
|
2322
|
-
switch (
|
|
2323
|
-
case
|
|
2324
|
-
if (!
|
|
2320
|
+
function Wa(e, ...t) {
|
|
2321
|
+
Jt(
|
|
2322
|
+
t[0],
|
|
2323
|
+
(s) => {
|
|
2324
|
+
const n = s.getModifierState("Alt"), r = ze === Ve.Mac ? s.getModifierState("Meta") : s.getModifierState("Control"), o = s.getModifierState("Shift");
|
|
2325
|
+
for (const d of e)
|
|
2326
|
+
switch (d) {
|
|
2327
|
+
case be.CtrlOrCmd:
|
|
2328
|
+
if (!r)
|
|
2325
2329
|
return;
|
|
2326
2330
|
break;
|
|
2327
|
-
case
|
|
2328
|
-
if (!
|
|
2331
|
+
case be.AltOrOpt:
|
|
2332
|
+
if (!n)
|
|
2329
2333
|
return;
|
|
2330
2334
|
break;
|
|
2331
|
-
case
|
|
2332
|
-
if (!
|
|
2335
|
+
case be.Shift:
|
|
2336
|
+
if (!o)
|
|
2333
2337
|
return;
|
|
2334
2338
|
break;
|
|
2335
2339
|
}
|
|
2336
|
-
|
|
2340
|
+
t[1](s);
|
|
2337
2341
|
},
|
|
2338
|
-
|
|
2342
|
+
t[2]
|
|
2339
2343
|
);
|
|
2340
2344
|
}
|
|
2341
|
-
function
|
|
2342
|
-
const
|
|
2343
|
-
get: () => !!
|
|
2344
|
-
set: (
|
|
2345
|
+
function qa(e) {
|
|
2346
|
+
const t = (e == null ? void 0 : e.model) || j(), s = u({
|
|
2347
|
+
get: () => !!t.value,
|
|
2348
|
+
set: (n) => t.value = n ? !0 : void 0
|
|
2345
2349
|
});
|
|
2346
|
-
return { model:
|
|
2350
|
+
return { model: t, isChecked: s };
|
|
2347
2351
|
}
|
|
2348
|
-
const
|
|
2352
|
+
const vl = /* @__PURE__ */ m("div", { class: "fixed inset-0 bg-neutral-100/70 dark:bg-neutral-900/70 transition-opacity" }, null, -1), gl = { class: "fixed inset-0 z-10 overflow-y-auto" }, bl = { class: "flex min-h-full justify-center p-4 text-center items-center sm:p-0" }, yl = {
|
|
2349
2353
|
key: 0,
|
|
2350
2354
|
class: "flex items-center justify-center shadow p-4 relative z-10 bg-foundation rounded-t-lg"
|
|
2351
|
-
},
|
|
2355
|
+
}, xl = { class: "text-2xl font-bold" }, kl = { class: "p-4 sm:p-6" }, wl = {
|
|
2352
2356
|
key: 2,
|
|
2353
2357
|
class: "flex p-4 sm:px-6 sm:py-5 border-t gap-2 border-outline-3"
|
|
2354
|
-
},
|
|
2358
|
+
}, Ka = /* @__PURE__ */ O({
|
|
2355
2359
|
__name: "Dialog",
|
|
2356
2360
|
props: {
|
|
2357
2361
|
open: { type: Boolean },
|
|
@@ -2363,12 +2367,12 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2363
2367
|
onSubmit: { type: Function }
|
|
2364
2368
|
},
|
|
2365
2369
|
emits: ["update:open", "fully-closed"],
|
|
2366
|
-
setup(e, { emit:
|
|
2367
|
-
const
|
|
2368
|
-
get: () =>
|
|
2369
|
-
set: (
|
|
2370
|
-
}),
|
|
2371
|
-
switch (
|
|
2370
|
+
setup(e, { emit: t }) {
|
|
2371
|
+
const s = e, n = Me(), r = u(() => !!s.onSubmit), o = u(() => s.buttons || n.buttons), d = u({
|
|
2372
|
+
get: () => s.open,
|
|
2373
|
+
set: (x) => t("update:open", x)
|
|
2374
|
+
}), i = u(() => {
|
|
2375
|
+
switch (s.maxWidth) {
|
|
2372
2376
|
case "sm":
|
|
2373
2377
|
return 0;
|
|
2374
2378
|
case "md":
|
|
@@ -2380,24 +2384,24 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2380
2384
|
default:
|
|
2381
2385
|
return 1e4;
|
|
2382
2386
|
}
|
|
2383
|
-
}),
|
|
2384
|
-
const
|
|
2385
|
-
return !
|
|
2386
|
-
}),
|
|
2387
|
-
|
|
2387
|
+
}), f = u(() => {
|
|
2388
|
+
const x = ["w-full", "sm:my-8 sm:w-full sm:max-w-xl"];
|
|
2389
|
+
return !s.title && !o.value && x.push("px-4 pt-4 pb-4", "sm:p-6"), i.value >= 1 && x.push("md:max-w-2xl"), i.value >= 2 && x.push("lg:max-w-4xl"), i.value >= 3 && x.push("xl:max-w-6xl"), i.value >= 4 && x.push("2xl:max-w-7xl"), x.join(" ");
|
|
2390
|
+
}), c = () => {
|
|
2391
|
+
s.preventCloseOnClickOutside || (d.value = !1);
|
|
2388
2392
|
};
|
|
2389
|
-
return (
|
|
2393
|
+
return (x, v) => (a(), z(l(nt), {
|
|
2390
2394
|
as: "template",
|
|
2391
|
-
show:
|
|
2395
|
+
show: d.value
|
|
2392
2396
|
}, {
|
|
2393
|
-
default:
|
|
2394
|
-
|
|
2397
|
+
default: V(() => [
|
|
2398
|
+
_(l(is), {
|
|
2395
2399
|
as: "div",
|
|
2396
2400
|
class: "relative z-40",
|
|
2397
|
-
onClose:
|
|
2401
|
+
onClose: c
|
|
2398
2402
|
}, {
|
|
2399
|
-
default:
|
|
2400
|
-
|
|
2403
|
+
default: V(() => [
|
|
2404
|
+
_(l(Xe), {
|
|
2401
2405
|
as: "template",
|
|
2402
2406
|
enter: "ease-out duration-300",
|
|
2403
2407
|
"enter-from": "opacity-0",
|
|
@@ -2406,14 +2410,14 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2406
2410
|
"leave-from": "opacity-100",
|
|
2407
2411
|
"leave-to": "opacity-0"
|
|
2408
2412
|
}, {
|
|
2409
|
-
default:
|
|
2410
|
-
|
|
2413
|
+
default: V(() => [
|
|
2414
|
+
vl
|
|
2411
2415
|
]),
|
|
2412
2416
|
_: 1
|
|
2413
2417
|
}),
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2418
|
+
m("div", gl, [
|
|
2419
|
+
m("div", bl, [
|
|
2420
|
+
_(l(Xe), {
|
|
2417
2421
|
as: "template",
|
|
2418
2422
|
enter: "ease-out duration-300",
|
|
2419
2423
|
"enter-from": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
@@ -2421,43 +2425,43 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2421
2425
|
leave: "ease-in duration-200",
|
|
2422
2426
|
"leave-from": "opacity-100 translate-y-0 sm:scale-100",
|
|
2423
2427
|
"leave-to": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
2424
|
-
onAfterLeave:
|
|
2428
|
+
onAfterLeave: v[1] || (v[1] = (h) => x.$emit("fully-closed"))
|
|
2425
2429
|
}, {
|
|
2426
|
-
default:
|
|
2427
|
-
|
|
2428
|
-
class:
|
|
2430
|
+
default: V(() => [
|
|
2431
|
+
_(l(us), {
|
|
2432
|
+
class: k([
|
|
2429
2433
|
"transform rounded-lg bg-foundation text-left shadow-xl transition-all",
|
|
2430
|
-
|
|
2434
|
+
f.value
|
|
2431
2435
|
]),
|
|
2432
|
-
as:
|
|
2433
|
-
onSubmit:
|
|
2436
|
+
as: r.value ? "form" : "div",
|
|
2437
|
+
onSubmit: ne(e.onSubmit, ["prevent"])
|
|
2434
2438
|
}, {
|
|
2435
|
-
default:
|
|
2436
|
-
e.title ? (a(), p("div",
|
|
2437
|
-
|
|
2438
|
-
])) :
|
|
2439
|
-
e.hideCloser ?
|
|
2439
|
+
default: V(() => [
|
|
2440
|
+
e.title ? (a(), p("div", yl, [
|
|
2441
|
+
m("h4", xl, L(e.title), 1)
|
|
2442
|
+
])) : S("", !0),
|
|
2443
|
+
e.hideCloser ? S("", !0) : (a(), p("button", {
|
|
2440
2444
|
key: 1,
|
|
2441
2445
|
class: "absolute z-20 top-5 right-4 text-foreground",
|
|
2442
|
-
onClick:
|
|
2446
|
+
onClick: v[0] || (v[0] = (h) => d.value = !1)
|
|
2443
2447
|
}, [
|
|
2444
|
-
|
|
2448
|
+
_(l(Rt), { class: "h-6 w-6" })
|
|
2445
2449
|
])),
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2450
|
+
m("div", kl, [
|
|
2451
|
+
R(x.$slots, "default", {}, () => [
|
|
2452
|
+
M("Put your content here!")
|
|
2449
2453
|
])
|
|
2450
2454
|
]),
|
|
2451
|
-
|
|
2452
|
-
e.buttons ? (a(!0), p(
|
|
2453
|
-
onClick:
|
|
2455
|
+
o.value ? (a(), p("div", wl, [
|
|
2456
|
+
e.buttons ? (a(!0), p(U, { key: 0 }, q(e.buttons, (h, C) => (a(), z(l(le), ye({ key: C }, h.props, {
|
|
2457
|
+
onClick: h.onClick
|
|
2454
2458
|
}), {
|
|
2455
|
-
default:
|
|
2456
|
-
|
|
2459
|
+
default: V(() => [
|
|
2460
|
+
M(L(h.text), 1)
|
|
2457
2461
|
]),
|
|
2458
2462
|
_: 2
|
|
2459
|
-
}, 1040, ["onClick"]))), 128)) :
|
|
2460
|
-
])) :
|
|
2463
|
+
}, 1040, ["onClick"]))), 128)) : R(x.$slots, "buttons", { key: 1 })
|
|
2464
|
+
])) : S("", !0)
|
|
2461
2465
|
]),
|
|
2462
2466
|
_: 3
|
|
2463
2467
|
}, 8, ["class", "as", "onSubmit"])
|
|
@@ -2473,7 +2477,7 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2473
2477
|
_: 3
|
|
2474
2478
|
}, 8, ["show"]));
|
|
2475
2479
|
}
|
|
2476
|
-
}),
|
|
2480
|
+
}), Cl = { class: "inline-flex items-center space-x-2" }, $l = { class: "label-light" }, Ha = /* @__PURE__ */ O({
|
|
2477
2481
|
__name: "Disclosure",
|
|
2478
2482
|
props: {
|
|
2479
2483
|
title: null,
|
|
@@ -2481,79 +2485,79 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2481
2485
|
color: { default: "default" }
|
|
2482
2486
|
},
|
|
2483
2487
|
setup(e) {
|
|
2484
|
-
const
|
|
2485
|
-
const
|
|
2488
|
+
const t = e, s = u(() => {
|
|
2489
|
+
const r = [
|
|
2486
2490
|
"pr-3 h-10 w-full flex items-center justify-between border-l-2 px-2 rounded transition",
|
|
2487
2491
|
"ring-1 font-medium"
|
|
2488
2492
|
];
|
|
2489
|
-
switch (
|
|
2493
|
+
switch (t.color) {
|
|
2490
2494
|
case "warning":
|
|
2491
|
-
|
|
2495
|
+
r.push(
|
|
2492
2496
|
"border-warning text-warning ring-warning-lighter hover:ring-warning"
|
|
2493
2497
|
);
|
|
2494
2498
|
break;
|
|
2495
2499
|
case "success":
|
|
2496
|
-
|
|
2500
|
+
r.push(
|
|
2497
2501
|
"border-success text-success ring-success-lighter hover:ring-success"
|
|
2498
2502
|
);
|
|
2499
2503
|
break;
|
|
2500
2504
|
case "danger":
|
|
2501
|
-
|
|
2505
|
+
r.push("border-danger text-danger ring-danger-lighter hover:ring-danger");
|
|
2502
2506
|
break;
|
|
2503
2507
|
case "default":
|
|
2504
2508
|
default:
|
|
2505
|
-
|
|
2509
|
+
r.push(
|
|
2506
2510
|
"border-primary text-primary ring-primary-muted hover:ring-primary"
|
|
2507
2511
|
);
|
|
2508
2512
|
break;
|
|
2509
2513
|
}
|
|
2510
|
-
return
|
|
2511
|
-
}),
|
|
2512
|
-
const
|
|
2513
|
-
switch (
|
|
2514
|
+
return r.join(" ");
|
|
2515
|
+
}), n = u(() => {
|
|
2516
|
+
const r = ["mt-4 px-3 py-1 border-x "];
|
|
2517
|
+
switch (t.color) {
|
|
2514
2518
|
case "warning":
|
|
2515
|
-
|
|
2519
|
+
r.push("border-warning-lighter");
|
|
2516
2520
|
break;
|
|
2517
2521
|
case "success":
|
|
2518
|
-
|
|
2522
|
+
r.push("border-success-lighter");
|
|
2519
2523
|
break;
|
|
2520
2524
|
case "danger":
|
|
2521
|
-
|
|
2525
|
+
r.push("border-danger-lighter");
|
|
2522
2526
|
break;
|
|
2523
2527
|
case "default":
|
|
2524
2528
|
default:
|
|
2525
|
-
|
|
2529
|
+
r.push("border-primary-muted");
|
|
2526
2530
|
break;
|
|
2527
2531
|
}
|
|
2528
|
-
return
|
|
2532
|
+
return r.join(" ");
|
|
2529
2533
|
});
|
|
2530
|
-
return (
|
|
2531
|
-
|
|
2532
|
-
default:
|
|
2533
|
-
|
|
2534
|
-
class:
|
|
2534
|
+
return (r, o) => (a(), p("div", null, [
|
|
2535
|
+
_(l(cs), null, {
|
|
2536
|
+
default: V(({ open: d }) => [
|
|
2537
|
+
_(l(ds), {
|
|
2538
|
+
class: k(s.value)
|
|
2535
2539
|
}, {
|
|
2536
|
-
default:
|
|
2537
|
-
|
|
2538
|
-
e.icon ? (a(),
|
|
2540
|
+
default: V(() => [
|
|
2541
|
+
m("div", Cl, [
|
|
2542
|
+
e.icon ? (a(), z(Z(e.icon), {
|
|
2539
2543
|
key: 0,
|
|
2540
2544
|
class: "h-4 w-4"
|
|
2541
|
-
})) :
|
|
2542
|
-
|
|
2545
|
+
})) : S("", !0),
|
|
2546
|
+
m("span", null, L(e.title), 1)
|
|
2543
2547
|
]),
|
|
2544
|
-
|
|
2545
|
-
class:
|
|
2548
|
+
_(l(Ye), {
|
|
2549
|
+
class: k([d ? "" : "rotate-180 transform", "h-5 w-5"])
|
|
2546
2550
|
}, null, 8, ["class"])
|
|
2547
2551
|
]),
|
|
2548
2552
|
_: 2
|
|
2549
2553
|
}, 1032, ["class"]),
|
|
2550
|
-
|
|
2551
|
-
class:
|
|
2554
|
+
_(l(fs), {
|
|
2555
|
+
class: k(n.value)
|
|
2552
2556
|
}, {
|
|
2553
|
-
default:
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
+
default: V(() => [
|
|
2558
|
+
m("div", $l, [
|
|
2559
|
+
R(r.$slots, "default", {}, () => [
|
|
2560
|
+
M("Panel contents")
|
|
2557
2561
|
])
|
|
2558
2562
|
])
|
|
2559
2563
|
]),
|
|
@@ -2565,136 +2569,136 @@ const en = /* @__PURE__ */ u("div", { class: "fixed inset-0 bg-neutral-100/70 da
|
|
|
2565
2569
|
]));
|
|
2566
2570
|
}
|
|
2567
2571
|
});
|
|
2568
|
-
var
|
|
2569
|
-
const
|
|
2572
|
+
var ue = /* @__PURE__ */ ((e) => (e.Grid = "grid", e.List = "list", e))(ue || {});
|
|
2573
|
+
const Ga = /* @__PURE__ */ O({
|
|
2570
2574
|
__name: "GridListToggle",
|
|
2571
2575
|
props: {
|
|
2572
2576
|
modelValue: null
|
|
2573
2577
|
},
|
|
2574
2578
|
emits: ["click", "update:modelValue"],
|
|
2575
|
-
setup(e, { emit:
|
|
2576
|
-
const
|
|
2577
|
-
get: () =>
|
|
2578
|
-
set: (
|
|
2579
|
-
}),
|
|
2580
|
-
() =>
|
|
2581
|
-
),
|
|
2582
|
-
|
|
2583
|
-
const
|
|
2584
|
-
|
|
2579
|
+
setup(e, { emit: t }) {
|
|
2580
|
+
const s = e, n = u({
|
|
2581
|
+
get: () => s.modelValue || ue.Grid,
|
|
2582
|
+
set: (d) => t("update:modelValue", d)
|
|
2583
|
+
}), r = u(
|
|
2584
|
+
() => n.value === ue.Grid ? Pt : jt
|
|
2585
|
+
), o = (d) => {
|
|
2586
|
+
t("click", d);
|
|
2587
|
+
const i = n.value === ue.Grid ? ue.List : ue.Grid;
|
|
2588
|
+
n.value = i;
|
|
2585
2589
|
};
|
|
2586
|
-
return (
|
|
2590
|
+
return (d, i) => (a(), p("button", {
|
|
2587
2591
|
class: "flex items-center justify-center rounded bg-foundation h-8 w-8 shadow cursor-pointer text-foreground",
|
|
2588
|
-
onClick:
|
|
2592
|
+
onClick: o
|
|
2589
2593
|
}, [
|
|
2590
|
-
(a(),
|
|
2594
|
+
(a(), z(Z(r.value), { class: "h-6 w-6" }))
|
|
2591
2595
|
]));
|
|
2592
2596
|
}
|
|
2593
2597
|
});
|
|
2594
|
-
var
|
|
2595
|
-
function
|
|
2596
|
-
if (!
|
|
2598
|
+
var Il = /* @__PURE__ */ ((e) => (e[e.Throttle = 0] = "Throttle", e[e.Debounce = 1] = "Debounce", e))(Il || {}), Pe = /* @__PURE__ */ ((e) => (e[e.Left = 0] = "Left", e[e.Right = 1] = "Right", e))(Pe || {});
|
|
2599
|
+
function Sl(e, t) {
|
|
2600
|
+
if (!De)
|
|
2597
2601
|
return;
|
|
2598
2602
|
const {
|
|
2599
|
-
wait:
|
|
2600
|
-
throttleOrDebounce:
|
|
2603
|
+
wait: s = 100,
|
|
2604
|
+
throttleOrDebounce: n = 0
|
|
2601
2605
|
/* Throttle */
|
|
2602
|
-
} =
|
|
2603
|
-
se(() => window.addEventListener("resize",
|
|
2606
|
+
} = t || {}, r = s ? n === 0 ? $t(e, s) : Te(e, s) : e;
|
|
2607
|
+
se(() => window.addEventListener("resize", r)), Ne(() => window.removeEventListener("resize", r));
|
|
2604
2608
|
}
|
|
2605
|
-
function
|
|
2609
|
+
function Xa(e) {
|
|
2606
2610
|
se(() => {
|
|
2607
2611
|
window.addEventListener("beforeunload", e);
|
|
2608
|
-
}),
|
|
2612
|
+
}), Ne(() => {
|
|
2609
2613
|
window.removeEventListener("beforeunload", e);
|
|
2610
2614
|
});
|
|
2611
2615
|
}
|
|
2612
|
-
function
|
|
2613
|
-
const { el:
|
|
2614
|
-
|
|
2616
|
+
function Bl(e) {
|
|
2617
|
+
const { el: t, defaultDirection: s } = e, n = j(
|
|
2618
|
+
ce(s) ? 1 : s
|
|
2615
2619
|
/* Right */
|
|
2616
|
-
),
|
|
2617
|
-
const
|
|
2618
|
-
if (!
|
|
2619
|
-
return
|
|
2620
|
-
const
|
|
2621
|
-
return
|
|
2622
|
-
}),
|
|
2623
|
-
if (!
|
|
2620
|
+
), r = u(() => {
|
|
2621
|
+
const d = l(e.stopUpdatesBelowWidth);
|
|
2622
|
+
if (!ce(d))
|
|
2623
|
+
return d;
|
|
2624
|
+
const i = l(t);
|
|
2625
|
+
return i != null && i.offsetWidth ? i.offsetWidth * 2 : void 0;
|
|
2626
|
+
}), o = () => {
|
|
2627
|
+
if (!De)
|
|
2624
2628
|
return;
|
|
2625
|
-
const
|
|
2626
|
-
if (!
|
|
2629
|
+
const d = l(t);
|
|
2630
|
+
if (!d)
|
|
2627
2631
|
return;
|
|
2628
|
-
const
|
|
2629
|
-
|
|
2632
|
+
const i = d.getBoundingClientRect(), f = i.x + i.width > window.innerWidth, c = i.x < 0;
|
|
2633
|
+
f && c || !ce(r.value) && window.innerWidth < r.value || (f ? n.value = 0 : c && (n.value = 1));
|
|
2630
2634
|
};
|
|
2631
|
-
return
|
|
2632
|
-
() => l(
|
|
2633
|
-
(
|
|
2634
|
-
|
|
2635
|
+
return Sl(() => o()), J(
|
|
2636
|
+
() => l(t),
|
|
2637
|
+
(d) => {
|
|
2638
|
+
d && o();
|
|
2635
2639
|
}
|
|
2636
2640
|
), {
|
|
2637
|
-
direction:
|
|
2638
|
-
recalculateDirection:
|
|
2641
|
+
direction: u(() => n.value),
|
|
2642
|
+
recalculateDirection: o
|
|
2639
2643
|
};
|
|
2640
2644
|
}
|
|
2641
|
-
const
|
|
2645
|
+
const _l = ["disabled", "onClick"], Za = /* @__PURE__ */ O({
|
|
2642
2646
|
__name: "Menu",
|
|
2643
2647
|
props: {
|
|
2644
2648
|
open: { type: Boolean },
|
|
2645
2649
|
items: null
|
|
2646
2650
|
},
|
|
2647
2651
|
emits: ["update:open", "chosen"],
|
|
2648
|
-
setup(e, { emit:
|
|
2649
|
-
const
|
|
2650
|
-
el:
|
|
2651
|
-
var
|
|
2652
|
-
return ((
|
|
2652
|
+
setup(e, { emit: t }) {
|
|
2653
|
+
const s = e, n = j(null), { direction: r } = Bl({
|
|
2654
|
+
el: u(() => {
|
|
2655
|
+
var h;
|
|
2656
|
+
return ((h = n.value) == null ? void 0 : h.el) || null;
|
|
2653
2657
|
}),
|
|
2654
2658
|
defaultDirection: Pe.Left,
|
|
2655
2659
|
stopUpdatesBelowWidth: 300
|
|
2656
|
-
}),
|
|
2657
|
-
get: () =>
|
|
2658
|
-
set: (
|
|
2659
|
-
}),
|
|
2660
|
-
const { active:
|
|
2661
|
-
return
|
|
2662
|
-
},
|
|
2663
|
-
|
|
2664
|
-
},
|
|
2665
|
-
var
|
|
2666
|
-
return (
|
|
2667
|
-
},
|
|
2668
|
-
const
|
|
2669
|
-
return
|
|
2660
|
+
}), o = j(null), d = j(!1), i = u({
|
|
2661
|
+
get: () => s.open || !1,
|
|
2662
|
+
set: (h) => t("update:open", h)
|
|
2663
|
+
}), f = (h) => {
|
|
2664
|
+
const { active: C, disabled: b } = h, A = ["group flex w-full items-center rounded-md px-2 py-2 text-sm"];
|
|
2665
|
+
return C ? A.push("bg-primary text-foreground-on-primary") : b ? A.push("text-foreground-disabled") : A.push("text-foreground"), A.join(" ");
|
|
2666
|
+
}, c = (h, C) => {
|
|
2667
|
+
t("chosen", { item: h, event: C });
|
|
2668
|
+
}, x = () => {
|
|
2669
|
+
var h;
|
|
2670
|
+
return (h = o.value) == null ? void 0 : h.el.click();
|
|
2671
|
+
}, v = (h) => {
|
|
2672
|
+
const C = !!h;
|
|
2673
|
+
return d.value = C, C;
|
|
2670
2674
|
};
|
|
2671
|
-
return
|
|
2672
|
-
|
|
2673
|
-
}),
|
|
2674
|
-
(
|
|
2675
|
-
}), (
|
|
2675
|
+
return J(d, (h, C) => {
|
|
2676
|
+
h !== C && (i.value = h);
|
|
2677
|
+
}), J(i, (h) => {
|
|
2678
|
+
(h && !d.value || !h && d.value) && x();
|
|
2679
|
+
}), (h, C) => (a(), z(l(ps), {
|
|
2676
2680
|
as: "div",
|
|
2677
2681
|
class: "relative inline-block"
|
|
2678
2682
|
}, {
|
|
2679
|
-
default:
|
|
2680
|
-
|
|
2681
|
-
|
|
2683
|
+
default: V(({ open: b }) => [
|
|
2684
|
+
m("div", null, [
|
|
2685
|
+
_(l(hs), {
|
|
2682
2686
|
ref_key: "menuButton",
|
|
2683
|
-
ref:
|
|
2687
|
+
ref: o,
|
|
2684
2688
|
class: "hidden",
|
|
2685
|
-
onClick:
|
|
2689
|
+
onClick: C[0] || (C[0] = ne(() => {
|
|
2686
2690
|
}, ["stop", "prevent"]))
|
|
2687
2691
|
}, null, 512),
|
|
2688
|
-
|
|
2689
|
-
class:
|
|
2692
|
+
m("div", {
|
|
2693
|
+
class: k(b ? "pointer-events-none" : "")
|
|
2690
2694
|
}, [
|
|
2691
|
-
|
|
2692
|
-
toggle:
|
|
2693
|
-
open:
|
|
2695
|
+
R(h.$slots, "default", {
|
|
2696
|
+
toggle: x,
|
|
2697
|
+
open: v(b)
|
|
2694
2698
|
})
|
|
2695
2699
|
], 2)
|
|
2696
2700
|
]),
|
|
2697
|
-
|
|
2701
|
+
_(Ae, {
|
|
2698
2702
|
"enter-active-class": "transition duration-100 ease-out",
|
|
2699
2703
|
"enter-from-class": "transform scale-95 opacity-0",
|
|
2700
2704
|
"enter-to-class": "transform scale-100 opacity-100",
|
|
@@ -2702,37 +2706,37 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2702
2706
|
"leave-from-class": "transform scale-100 opacity-100",
|
|
2703
2707
|
"leave-to-class": "transform scale-95 opacity-0"
|
|
2704
2708
|
}, {
|
|
2705
|
-
default:
|
|
2706
|
-
|
|
2709
|
+
default: V(() => [
|
|
2710
|
+
_(l(ms), {
|
|
2707
2711
|
ref_key: "menuItems",
|
|
2708
|
-
ref:
|
|
2709
|
-
class:
|
|
2712
|
+
ref: n,
|
|
2713
|
+
class: k([
|
|
2710
2714
|
"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",
|
|
2711
|
-
l(
|
|
2715
|
+
l(r) === l(Pe).Left ? "right-0" : ""
|
|
2712
2716
|
])
|
|
2713
2717
|
}, {
|
|
2714
|
-
default:
|
|
2715
|
-
(a(!0), p(
|
|
2716
|
-
key:
|
|
2718
|
+
default: V(() => [
|
|
2719
|
+
(a(!0), p(U, null, q(e.items, (A, w) => (a(), p("div", {
|
|
2720
|
+
key: w,
|
|
2717
2721
|
class: "px-1 py-1"
|
|
2718
2722
|
}, [
|
|
2719
|
-
(a(!0), p(
|
|
2720
|
-
key:
|
|
2721
|
-
disabled:
|
|
2723
|
+
(a(!0), p(U, null, q(A, ($) => (a(), z(l(vs), {
|
|
2724
|
+
key: $.id,
|
|
2725
|
+
disabled: $.disabled
|
|
2722
2726
|
}, {
|
|
2723
|
-
default:
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
class:
|
|
2727
|
-
disabled:
|
|
2728
|
-
onClick: (
|
|
2727
|
+
default: V(({ active: P, disabled: E }) => [
|
|
2728
|
+
de((a(), p("span", null, [
|
|
2729
|
+
m("button", {
|
|
2730
|
+
class: k(f({ active: P, disabled: E })),
|
|
2731
|
+
disabled: E,
|
|
2732
|
+
onClick: (g) => c($, g)
|
|
2729
2733
|
}, [
|
|
2730
|
-
|
|
2731
|
-
|
|
2734
|
+
R(h.$slots, "item", { item: $ }, () => [
|
|
2735
|
+
M(L($.title), 1)
|
|
2732
2736
|
])
|
|
2733
|
-
], 10,
|
|
2737
|
+
], 10, _l)
|
|
2734
2738
|
])), [
|
|
2735
|
-
[l(
|
|
2739
|
+
[l(lt), $.disabled && $.disabledTooltip]
|
|
2736
2740
|
])
|
|
2737
2741
|
]),
|
|
2738
2742
|
_: 2
|
|
@@ -2748,33 +2752,33 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2748
2752
|
_: 3
|
|
2749
2753
|
}));
|
|
2750
2754
|
}
|
|
2751
|
-
}),
|
|
2755
|
+
}), Ll = { class: "flex flex-col space-y-4" }, Vl = { class: "flex space-x-6" }, Qa = /* @__PURE__ */ O({
|
|
2752
2756
|
__name: "Tabs",
|
|
2753
2757
|
props: {
|
|
2754
2758
|
items: null
|
|
2755
2759
|
},
|
|
2756
2760
|
setup(e) {
|
|
2757
|
-
const
|
|
2758
|
-
|
|
2761
|
+
const t = e, s = j(null), n = u(() => s.value && t.items.find((o) => o.id === s.value) || t.items[0]), r = (o) => {
|
|
2762
|
+
s.value = o.id;
|
|
2759
2763
|
};
|
|
2760
|
-
return (
|
|
2761
|
-
|
|
2762
|
-
(a(!0), p(
|
|
2763
|
-
key:
|
|
2764
|
+
return (o, d) => (a(), p("div", Ll, [
|
|
2765
|
+
m("div", Vl, [
|
|
2766
|
+
(a(!0), p(U, null, q(e.items, (i) => (a(), z(le, {
|
|
2767
|
+
key: i.id,
|
|
2764
2768
|
link: "",
|
|
2765
|
-
color:
|
|
2766
|
-
onClick: (
|
|
2769
|
+
color: n.value.id === i.id ? "default" : "secondary",
|
|
2770
|
+
onClick: (f) => r(i)
|
|
2767
2771
|
}, {
|
|
2768
|
-
default:
|
|
2769
|
-
|
|
2772
|
+
default: V(() => [
|
|
2773
|
+
M(L(i.title), 1)
|
|
2770
2774
|
]),
|
|
2771
2775
|
_: 2
|
|
2772
2776
|
}, 1032, ["color", "onClick"]))), 128))
|
|
2773
2777
|
]),
|
|
2774
|
-
|
|
2778
|
+
R(o.$slots, "default", { activeItem: n.value })
|
|
2775
2779
|
]));
|
|
2776
2780
|
}
|
|
2777
|
-
}),
|
|
2781
|
+
}), zl = { class: "text-foreground" }, Pl = { class: "w-full text-sm overflow-x-auto overflow-y-visible simple-scrollbar" }, jl = ["onClick", "onKeypress"], Al = /* @__PURE__ */ m("div", { class: "text-gray-900 font-medium order-1" }, "Placeholder", -1), Ol = { class: "absolute right-1.5 gap-1 flex items-center p-0" }, Na = /* @__PURE__ */ O({
|
|
2778
2782
|
__name: "Table",
|
|
2779
2783
|
props: {
|
|
2780
2784
|
items: null,
|
|
@@ -2784,72 +2788,72 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2784
2788
|
onRowClick: { type: Function }
|
|
2785
2789
|
},
|
|
2786
2790
|
setup(e) {
|
|
2787
|
-
const
|
|
2788
|
-
const
|
|
2789
|
-
let
|
|
2790
|
-
return
|
|
2791
|
-
}),
|
|
2792
|
-
var
|
|
2793
|
-
return ((
|
|
2794
|
-
},
|
|
2795
|
-
const
|
|
2796
|
-
return
|
|
2797
|
-
},
|
|
2798
|
-
var
|
|
2799
|
-
(
|
|
2791
|
+
const t = e, s = u(() => {
|
|
2792
|
+
const d = (t.buttons || []).length;
|
|
2793
|
+
let i = 16;
|
|
2794
|
+
return d > 0 && (i = 48 + (d - 1) * 42), `${i}px`;
|
|
2795
|
+
}), n = (d) => {
|
|
2796
|
+
var i;
|
|
2797
|
+
return ((i = t.columns.find((f) => f.id === d)) == null ? void 0 : i.classes) || "";
|
|
2798
|
+
}, r = (d, i) => {
|
|
2799
|
+
const f = n(d);
|
|
2800
|
+
return i === 0 ? `bg-transparent py-3 pr-5 px-1 ${f}` : `lg:p-0 px-1 ${f}`;
|
|
2801
|
+
}, o = (d) => {
|
|
2802
|
+
var i;
|
|
2803
|
+
(i = t.onRowClick) == null || i.call(t, d);
|
|
2800
2804
|
};
|
|
2801
|
-
return (
|
|
2802
|
-
|
|
2805
|
+
return (d, i) => (a(), p("div", zl, [
|
|
2806
|
+
m("div", Pl, [
|
|
2803
2807
|
e.items.length > 0 ? (a(), p("div", {
|
|
2804
2808
|
key: 0,
|
|
2805
2809
|
class: "grid z-10 grid-cols-12 items-center gap-6 font-semibold bg-foundation rounded-t-lg w-full border-b border-outline-3 pb-2 pt-4 px-4 min-w-[900px]",
|
|
2806
|
-
style:
|
|
2810
|
+
style: fe({ paddingRight: s.value })
|
|
2807
2811
|
}, [
|
|
2808
|
-
(a(!0), p(
|
|
2809
|
-
key:
|
|
2810
|
-
class:
|
|
2811
|
-
},
|
|
2812
|
-
], 4)) :
|
|
2813
|
-
|
|
2814
|
-
class:
|
|
2812
|
+
(a(!0), p(U, null, q(e.columns, (f) => (a(), p("div", {
|
|
2813
|
+
key: f.id,
|
|
2814
|
+
class: k([n(f.id), "capitalize"])
|
|
2815
|
+
}, L(f.header), 3))), 128))
|
|
2816
|
+
], 4)) : S("", !0),
|
|
2817
|
+
m("div", {
|
|
2818
|
+
class: k(["divide-y divide-outline-3 h-full overflow-visible", { "pb-32": e.overflowCells }])
|
|
2815
2819
|
}, [
|
|
2816
|
-
(a(!0), p(
|
|
2817
|
-
key:
|
|
2818
|
-
class:
|
|
2819
|
-
style:
|
|
2820
|
+
(a(!0), p(U, null, q(e.items, (f) => (a(), p("div", {
|
|
2821
|
+
key: f.id,
|
|
2822
|
+
class: k(["relative grid grid-cols-12 items-center gap-6 px-4 py-1 min-w-[900px] bg-foundation", { "cursor-pointer hover:bg-primary-muted": !!e.onRowClick }]),
|
|
2823
|
+
style: fe({ paddingRight: s.value }),
|
|
2820
2824
|
tabindex: "0",
|
|
2821
|
-
onClick: (
|
|
2822
|
-
onKeypress: (
|
|
2825
|
+
onClick: (c) => o(f),
|
|
2826
|
+
onKeypress: (c) => o(f)
|
|
2823
2827
|
}, [
|
|
2824
|
-
(a(!0), p(
|
|
2825
|
-
key:
|
|
2826
|
-
class:
|
|
2828
|
+
(a(!0), p(U, null, q(e.columns, (c, x) => (a(), p("div", {
|
|
2829
|
+
key: c.id,
|
|
2830
|
+
class: k(r(c.id, x)),
|
|
2827
2831
|
tabindex: "0"
|
|
2828
2832
|
}, [
|
|
2829
|
-
|
|
2830
|
-
|
|
2833
|
+
R(d.$slots, c.id, { item: f }, () => [
|
|
2834
|
+
Al
|
|
2831
2835
|
])
|
|
2832
2836
|
], 2))), 128)),
|
|
2833
|
-
|
|
2834
|
-
(a(!0), p(
|
|
2835
|
-
key:
|
|
2837
|
+
m("div", Ol, [
|
|
2838
|
+
(a(!0), p(U, null, q(e.buttons, (c) => (a(), p("div", {
|
|
2839
|
+
key: c.label
|
|
2836
2840
|
}, [
|
|
2837
|
-
|
|
2838
|
-
"icon-left":
|
|
2841
|
+
_(l(le), {
|
|
2842
|
+
"icon-left": c.icon,
|
|
2839
2843
|
size: "sm",
|
|
2840
2844
|
color: "secondary",
|
|
2841
2845
|
"hide-text": "",
|
|
2842
|
-
class:
|
|
2843
|
-
onClick:
|
|
2846
|
+
class: k(c.class),
|
|
2847
|
+
onClick: ne((x) => c.action(f), ["stop"])
|
|
2844
2848
|
}, null, 8, ["icon-left", "class", "onClick"])
|
|
2845
2849
|
]))), 128))
|
|
2846
2850
|
])
|
|
2847
|
-
], 46,
|
|
2851
|
+
], 46, jl))), 128))
|
|
2848
2852
|
], 2)
|
|
2849
2853
|
])
|
|
2850
2854
|
]));
|
|
2851
2855
|
}
|
|
2852
|
-
}),
|
|
2856
|
+
}), Ml = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, Tl = { class: "inline-flex items-center space-x-1" }, Fl = /* @__PURE__ */ m("span", { class: "text-foreground-2" }, "That's it, you've loaded everything!", -1), Rl = { class: "w-full flex flex-col items-center my-2 space-y-2 mt-4" }, El = { class: "inline-flex items-center space-x-1" }, Dl = /* @__PURE__ */ m("span", { class: "text-foreground-2" }, "An error occurred while loading", -1), Ja = /* @__PURE__ */ O({
|
|
2853
2857
|
__name: "InfiniteLoading",
|
|
2854
2858
|
props: {
|
|
2855
2859
|
settings: null,
|
|
@@ -2857,58 +2861,58 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2857
2861
|
},
|
|
2858
2862
|
emits: ["infinite"],
|
|
2859
2863
|
setup(e) {
|
|
2860
|
-
const
|
|
2861
|
-
return
|
|
2862
|
-
const
|
|
2863
|
-
var
|
|
2864
|
-
(
|
|
2864
|
+
const t = j(null), s = j(!1);
|
|
2865
|
+
return De && se(() => {
|
|
2866
|
+
const n = setInterval(() => {
|
|
2867
|
+
var r;
|
|
2868
|
+
(r = t.value) != null && r.isConnected && (s.value = !0, clearInterval(n));
|
|
2865
2869
|
}, 200);
|
|
2866
|
-
}), (
|
|
2870
|
+
}), (n, r) => (a(), p("div", {
|
|
2867
2871
|
ref_key: "wrapper",
|
|
2868
|
-
ref:
|
|
2872
|
+
ref: t
|
|
2869
2873
|
}, [
|
|
2870
|
-
|
|
2871
|
-
onInfinite:
|
|
2874
|
+
s.value ? (a(), z(l(xs), ye({ key: 0 }, n.$props.settings || {}, {
|
|
2875
|
+
onInfinite: r[0] || (r[0] = (o) => n.$emit("infinite", o))
|
|
2872
2876
|
}), {
|
|
2873
|
-
spinner:
|
|
2874
|
-
|
|
2877
|
+
spinner: V(() => [
|
|
2878
|
+
_(Ke, {
|
|
2875
2879
|
loading: !0,
|
|
2876
2880
|
class: "my-2"
|
|
2877
2881
|
})
|
|
2878
2882
|
]),
|
|
2879
|
-
complete:
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2883
|
+
complete: V(() => [
|
|
2884
|
+
m("div", Ml, [
|
|
2885
|
+
m("div", Tl, [
|
|
2886
|
+
_(l(Et), { class: "w-5 h-5 text-success" }),
|
|
2887
|
+
Fl
|
|
2884
2888
|
])
|
|
2885
2889
|
])
|
|
2886
2890
|
]),
|
|
2887
|
-
error:
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2891
|
+
error: V(({ retry: o }) => [
|
|
2892
|
+
m("div", Rl, [
|
|
2893
|
+
m("div", El, [
|
|
2894
|
+
_(l(Dt), { class: "w-5 h-5 text-danger" }),
|
|
2895
|
+
Dl
|
|
2892
2896
|
]),
|
|
2893
|
-
e.allowRetry ? (a(),
|
|
2897
|
+
e.allowRetry ? (a(), z(le, {
|
|
2894
2898
|
key: 0,
|
|
2895
|
-
onClick:
|
|
2899
|
+
onClick: o
|
|
2896
2900
|
}, {
|
|
2897
|
-
default:
|
|
2898
|
-
|
|
2901
|
+
default: V(() => [
|
|
2902
|
+
M("Retry")
|
|
2899
2903
|
]),
|
|
2900
2904
|
_: 2
|
|
2901
|
-
}, 1032, ["onClick"])) :
|
|
2905
|
+
}, 1032, ["onClick"])) : S("", !0)
|
|
2902
2906
|
])
|
|
2903
2907
|
]),
|
|
2904
2908
|
_: 1
|
|
2905
|
-
}, 16)) :
|
|
2909
|
+
}, 16)) : S("", !0)
|
|
2906
2910
|
], 512));
|
|
2907
2911
|
}
|
|
2908
|
-
}),
|
|
2912
|
+
}), Ul = { class: "relative group" }, Wl = {
|
|
2909
2913
|
key: 0,
|
|
2910
2914
|
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"
|
|
2911
|
-
},
|
|
2915
|
+
}, Ya = /* @__PURE__ */ O({
|
|
2912
2916
|
__name: "Panel",
|
|
2913
2917
|
props: {
|
|
2914
2918
|
/**
|
|
@@ -2945,48 +2949,48 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2945
2949
|
}
|
|
2946
2950
|
},
|
|
2947
2951
|
emits: ["submit"],
|
|
2948
|
-
setup(e, { emit:
|
|
2949
|
-
const
|
|
2950
|
-
() =>
|
|
2951
|
-
),
|
|
2952
|
-
() =>
|
|
2953
|
-
),
|
|
2954
|
-
const
|
|
2955
|
-
return
|
|
2952
|
+
setup(e, { emit: t }) {
|
|
2953
|
+
const s = e, n = u(
|
|
2954
|
+
() => s.customPadding ? "" : "px-4 py-4 sm:px-6"
|
|
2955
|
+
), r = u(
|
|
2956
|
+
() => s.customPadding ? "" : "px-4 py-4 sm:p-6"
|
|
2957
|
+
), o = u(() => {
|
|
2958
|
+
const d = ["rounded-lg"];
|
|
2959
|
+
return s.noShadow || d.push("shadow"), s.ring && d.push("ring-outline-2 hover:ring-2"), s.panelClasses && d.push(s.panelClasses), d.join(" ");
|
|
2956
2960
|
});
|
|
2957
|
-
return (
|
|
2958
|
-
e.fancyGlow ? (a(), p("div",
|
|
2959
|
-
(a(),
|
|
2960
|
-
class:
|
|
2961
|
+
return (d, i) => (a(), p("div", Ul, [
|
|
2962
|
+
e.fancyGlow ? (a(), p("div", Wl)) : S("", !0),
|
|
2963
|
+
(a(), z(Z(e.form ? "form" : "div"), {
|
|
2964
|
+
class: k([
|
|
2961
2965
|
"relative divide-outline-3 bg-foundation text-foreground flex flex-col divide-y overflow-hidden",
|
|
2962
|
-
|
|
2966
|
+
o.value
|
|
2963
2967
|
]),
|
|
2964
|
-
onSubmit:
|
|
2968
|
+
onSubmit: i[0] || (i[0] = (f) => t("submit", f))
|
|
2965
2969
|
}, {
|
|
2966
|
-
default:
|
|
2967
|
-
|
|
2970
|
+
default: V(() => [
|
|
2971
|
+
d.$slots.header ? (a(), p("div", {
|
|
2968
2972
|
key: 0,
|
|
2969
|
-
class:
|
|
2973
|
+
class: k(n.value)
|
|
2970
2974
|
}, [
|
|
2971
|
-
|
|
2972
|
-
], 2)) :
|
|
2973
|
-
|
|
2974
|
-
class:
|
|
2975
|
+
R(d.$slots, "header")
|
|
2976
|
+
], 2)) : S("", !0),
|
|
2977
|
+
m("div", {
|
|
2978
|
+
class: k(["grow", r.value])
|
|
2975
2979
|
}, [
|
|
2976
|
-
|
|
2980
|
+
R(d.$slots, "default")
|
|
2977
2981
|
], 2),
|
|
2978
|
-
|
|
2982
|
+
d.$slots.footer ? (a(), p("div", {
|
|
2979
2983
|
key: 1,
|
|
2980
|
-
class:
|
|
2984
|
+
class: k(n.value)
|
|
2981
2985
|
}, [
|
|
2982
|
-
|
|
2983
|
-
], 2)) :
|
|
2986
|
+
R(d.$slots, "footer")
|
|
2987
|
+
], 2)) : S("", !0)
|
|
2984
2988
|
]),
|
|
2985
2989
|
_: 3
|
|
2986
2990
|
}, 40, ["class"]))
|
|
2987
2991
|
]));
|
|
2988
2992
|
}
|
|
2989
|
-
}),
|
|
2993
|
+
}), ql = { class: "flex-shrink-0" }, Kl = /* @__PURE__ */ m("span", { class: "sr-only" }, "Dismiss", -1), eo = /* @__PURE__ */ O({
|
|
2990
2994
|
__name: "Alert",
|
|
2991
2995
|
props: {
|
|
2992
2996
|
color: { default: "success" },
|
|
@@ -2997,162 +3001,162 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
2997
3001
|
},
|
|
2998
3002
|
emits: ["dismiss"],
|
|
2999
3003
|
setup(e) {
|
|
3000
|
-
const
|
|
3001
|
-
if (
|
|
3002
|
-
return
|
|
3003
|
-
switch (
|
|
3004
|
+
const t = e, s = Me(), n = u(() => !!s.description), r = u(() => {
|
|
3005
|
+
if (t.customIcon)
|
|
3006
|
+
return t.customIcon;
|
|
3007
|
+
switch (t.color) {
|
|
3004
3008
|
case "info":
|
|
3005
|
-
return
|
|
3009
|
+
return Kt;
|
|
3006
3010
|
case "warning":
|
|
3007
|
-
return
|
|
3011
|
+
return Ie;
|
|
3008
3012
|
case "danger":
|
|
3009
|
-
return
|
|
3013
|
+
return qt;
|
|
3010
3014
|
case "success":
|
|
3011
3015
|
default:
|
|
3012
|
-
return
|
|
3016
|
+
return st;
|
|
3013
3017
|
}
|
|
3014
|
-
}),
|
|
3015
|
-
const
|
|
3016
|
-
switch (
|
|
3018
|
+
}), o = u(() => {
|
|
3019
|
+
const b = [];
|
|
3020
|
+
switch (t.size) {
|
|
3017
3021
|
case "xs":
|
|
3018
|
-
|
|
3022
|
+
b.push("p-1");
|
|
3019
3023
|
break;
|
|
3020
3024
|
case "default":
|
|
3021
3025
|
default:
|
|
3022
|
-
|
|
3026
|
+
b.push(n.value ? "p-4" : "p-2");
|
|
3023
3027
|
break;
|
|
3024
3028
|
}
|
|
3025
|
-
switch (
|
|
3029
|
+
switch (t.color) {
|
|
3026
3030
|
case "success":
|
|
3027
|
-
|
|
3031
|
+
b.push("bg-success-lighter border-l-4 border-success");
|
|
3028
3032
|
break;
|
|
3029
3033
|
case "info":
|
|
3030
|
-
|
|
3034
|
+
b.push("bg-info-lighter border-l-4 border-info");
|
|
3031
3035
|
break;
|
|
3032
3036
|
case "danger":
|
|
3033
|
-
|
|
3037
|
+
b.push("bg-danger-lighter border-l-4 border-danger");
|
|
3034
3038
|
break;
|
|
3035
3039
|
case "warning":
|
|
3036
|
-
|
|
3040
|
+
b.push("bg-warning-lighter border-l-4 border-warning");
|
|
3037
3041
|
break;
|
|
3038
3042
|
}
|
|
3039
|
-
return
|
|
3040
|
-
}),
|
|
3041
|
-
const
|
|
3042
|
-
if (
|
|
3043
|
-
|
|
3043
|
+
return b.join(" ");
|
|
3044
|
+
}), d = u(() => {
|
|
3045
|
+
const b = [];
|
|
3046
|
+
if (n.value)
|
|
3047
|
+
b.push("");
|
|
3044
3048
|
else
|
|
3045
|
-
switch (
|
|
3049
|
+
switch (b.push("items-center"), t.size) {
|
|
3046
3050
|
case "xs":
|
|
3047
|
-
|
|
3051
|
+
b.push("space-x-1");
|
|
3048
3052
|
break;
|
|
3049
3053
|
case "default":
|
|
3050
3054
|
default:
|
|
3051
|
-
|
|
3055
|
+
b.push("space-x-2");
|
|
3052
3056
|
break;
|
|
3053
3057
|
}
|
|
3054
|
-
return
|
|
3055
|
-
}),
|
|
3056
|
-
const
|
|
3057
|
-
switch (
|
|
3058
|
+
return b.join(" ");
|
|
3059
|
+
}), i = u(() => {
|
|
3060
|
+
const b = ["grow"];
|
|
3061
|
+
switch (n.value || b.push("flex items-center space-x-2"), t.size) {
|
|
3058
3062
|
case "xs":
|
|
3059
|
-
|
|
3063
|
+
b.push("ml-1");
|
|
3060
3064
|
break;
|
|
3061
3065
|
case "default":
|
|
3062
3066
|
default:
|
|
3063
|
-
|
|
3067
|
+
b.push("ml-3");
|
|
3064
3068
|
break;
|
|
3065
3069
|
}
|
|
3066
|
-
return
|
|
3067
|
-
}),
|
|
3068
|
-
const
|
|
3069
|
-
switch (
|
|
3070
|
+
return b.join(" ");
|
|
3071
|
+
}), f = u(() => {
|
|
3072
|
+
const b = [];
|
|
3073
|
+
switch (t.size) {
|
|
3070
3074
|
case "xs":
|
|
3071
|
-
|
|
3075
|
+
b.push("text-xs");
|
|
3072
3076
|
break;
|
|
3073
3077
|
case "default":
|
|
3074
3078
|
default:
|
|
3075
|
-
|
|
3079
|
+
b.push("mt-2 text-sm");
|
|
3076
3080
|
break;
|
|
3077
3081
|
}
|
|
3078
|
-
return
|
|
3079
|
-
}),
|
|
3080
|
-
var
|
|
3081
|
-
const
|
|
3082
|
-
|
|
3083
|
-
const
|
|
3084
|
-
switch (
|
|
3082
|
+
return b.join(" ");
|
|
3083
|
+
}), c = u(() => {
|
|
3084
|
+
var w;
|
|
3085
|
+
const b = ["flex"];
|
|
3086
|
+
n.value || b.push("grow justify-end");
|
|
3087
|
+
const A = n.value && ((w = t.actions) == null ? void 0 : w.length);
|
|
3088
|
+
switch (t.size) {
|
|
3085
3089
|
case "xs":
|
|
3086
|
-
|
|
3090
|
+
b.push("space-x-1"), A && b.push("mt-1");
|
|
3087
3091
|
break;
|
|
3088
3092
|
case "default":
|
|
3089
3093
|
default:
|
|
3090
|
-
|
|
3094
|
+
b.push("space-x-2"), A && b.push("mt-4");
|
|
3091
3095
|
break;
|
|
3092
3096
|
}
|
|
3093
|
-
return
|
|
3094
|
-
}),
|
|
3095
|
-
const
|
|
3096
|
-
switch (
|
|
3097
|
+
return b.join(" ");
|
|
3098
|
+
}), x = u(() => {
|
|
3099
|
+
const b = [];
|
|
3100
|
+
switch (t.color) {
|
|
3097
3101
|
case "success":
|
|
3098
|
-
|
|
3102
|
+
b.push("text-success-darker");
|
|
3099
3103
|
break;
|
|
3100
3104
|
case "info":
|
|
3101
|
-
|
|
3105
|
+
b.push("text-info-darker");
|
|
3102
3106
|
break;
|
|
3103
3107
|
case "danger":
|
|
3104
|
-
|
|
3108
|
+
b.push("text-danger-darker");
|
|
3105
3109
|
break;
|
|
3106
3110
|
case "warning":
|
|
3107
|
-
|
|
3111
|
+
b.push("text-warning-darker");
|
|
3108
3112
|
break;
|
|
3109
3113
|
}
|
|
3110
|
-
return
|
|
3111
|
-
}),
|
|
3112
|
-
const
|
|
3113
|
-
switch (
|
|
3114
|
+
return b.join(" ");
|
|
3115
|
+
}), v = u(() => {
|
|
3116
|
+
const b = [];
|
|
3117
|
+
switch (t.size) {
|
|
3114
3118
|
case "xs":
|
|
3115
|
-
|
|
3119
|
+
b.push("h-4 w-4"), b.push(n.value ? "mt-0.5" : "");
|
|
3116
3120
|
break;
|
|
3117
3121
|
case "default":
|
|
3118
3122
|
default:
|
|
3119
|
-
|
|
3123
|
+
b.push("h-5 w-5");
|
|
3120
3124
|
break;
|
|
3121
3125
|
}
|
|
3122
|
-
switch (
|
|
3126
|
+
switch (t.color) {
|
|
3123
3127
|
case "success":
|
|
3124
|
-
|
|
3128
|
+
b.push("text-success");
|
|
3125
3129
|
break;
|
|
3126
3130
|
case "info":
|
|
3127
|
-
|
|
3131
|
+
b.push("text-info");
|
|
3128
3132
|
break;
|
|
3129
3133
|
case "danger":
|
|
3130
|
-
|
|
3134
|
+
b.push("text-danger");
|
|
3131
3135
|
break;
|
|
3132
3136
|
case "warning":
|
|
3133
|
-
|
|
3137
|
+
b.push("text-warning");
|
|
3134
3138
|
break;
|
|
3135
3139
|
}
|
|
3136
|
-
return
|
|
3137
|
-
}),
|
|
3138
|
-
const
|
|
3139
|
-
switch (
|
|
3140
|
+
return b.join(" ");
|
|
3141
|
+
}), h = u(() => {
|
|
3142
|
+
const b = [];
|
|
3143
|
+
switch (t.color) {
|
|
3140
3144
|
case "success":
|
|
3141
|
-
|
|
3145
|
+
b.push("bg-success-lighter ring-success");
|
|
3142
3146
|
break;
|
|
3143
3147
|
case "info":
|
|
3144
|
-
|
|
3148
|
+
b.push("bg-info-lighter ring-info");
|
|
3145
3149
|
break;
|
|
3146
3150
|
case "danger":
|
|
3147
|
-
|
|
3151
|
+
b.push("bg-danger-lighter ring-danger");
|
|
3148
3152
|
break;
|
|
3149
3153
|
case "warning":
|
|
3150
|
-
|
|
3154
|
+
b.push("bg-warning-lighter ring-warning");
|
|
3151
3155
|
break;
|
|
3152
3156
|
}
|
|
3153
|
-
return
|
|
3154
|
-
}),
|
|
3155
|
-
switch (
|
|
3157
|
+
return b.join(" ");
|
|
3158
|
+
}), C = u(() => {
|
|
3159
|
+
switch (t.size) {
|
|
3156
3160
|
case "xs":
|
|
3157
3161
|
return "xs";
|
|
3158
3162
|
case "default":
|
|
@@ -3160,49 +3164,49 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
3160
3164
|
return "sm";
|
|
3161
3165
|
}
|
|
3162
3166
|
});
|
|
3163
|
-
return (
|
|
3164
|
-
class:
|
|
3167
|
+
return (b, A) => (a(), p("div", {
|
|
3168
|
+
class: k(["rounded-md", [o.value, x.value]])
|
|
3165
3169
|
}, [
|
|
3166
|
-
|
|
3167
|
-
class:
|
|
3170
|
+
m("div", {
|
|
3171
|
+
class: k(["flex", d.value])
|
|
3168
3172
|
}, [
|
|
3169
|
-
|
|
3170
|
-
(a(),
|
|
3171
|
-
class:
|
|
3173
|
+
m("div", ql, [
|
|
3174
|
+
(a(), z(Z(r.value), {
|
|
3175
|
+
class: k(v.value),
|
|
3172
3176
|
"aria-hidden": "true"
|
|
3173
3177
|
}, null, 8, ["class"]))
|
|
3174
3178
|
]),
|
|
3175
|
-
|
|
3176
|
-
class:
|
|
3179
|
+
m("div", {
|
|
3180
|
+
class: k(i.value)
|
|
3177
3181
|
}, [
|
|
3178
|
-
|
|
3179
|
-
class:
|
|
3182
|
+
m("h3", {
|
|
3183
|
+
class: k(["text-sm", [n.value ? "font-medium" : ""]])
|
|
3180
3184
|
}, [
|
|
3181
|
-
|
|
3182
|
-
|
|
3185
|
+
R(b.$slots, "title", {}, () => [
|
|
3186
|
+
M("Title")
|
|
3183
3187
|
])
|
|
3184
3188
|
], 2),
|
|
3185
|
-
|
|
3189
|
+
n.value ? (a(), p("div", {
|
|
3186
3190
|
key: 0,
|
|
3187
|
-
class:
|
|
3191
|
+
class: k(f.value)
|
|
3188
3192
|
}, [
|
|
3189
|
-
|
|
3190
|
-
|
|
3193
|
+
R(b.$slots, "description", {}, () => [
|
|
3194
|
+
M(" Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquid pariatur, ipsum similique veniam. ")
|
|
3191
3195
|
])
|
|
3192
|
-
], 2)) :
|
|
3193
|
-
|
|
3194
|
-
class:
|
|
3196
|
+
], 2)) : S("", !0),
|
|
3197
|
+
m("div", {
|
|
3198
|
+
class: k(c.value)
|
|
3195
3199
|
}, [
|
|
3196
|
-
(a(!0), p(
|
|
3197
|
-
key:
|
|
3200
|
+
(a(!0), p(U, null, q(e.actions || [], (w, $) => (a(), z(le, {
|
|
3201
|
+
key: $,
|
|
3198
3202
|
color: e.color,
|
|
3199
|
-
size:
|
|
3200
|
-
to:
|
|
3201
|
-
external:
|
|
3202
|
-
onClick: (
|
|
3203
|
+
size: C.value,
|
|
3204
|
+
to: w.url,
|
|
3205
|
+
external: w.externalUrl || !1,
|
|
3206
|
+
onClick: (P) => w.onClick || l(It)
|
|
3203
3207
|
}, {
|
|
3204
|
-
default:
|
|
3205
|
-
|
|
3208
|
+
default: V(() => [
|
|
3209
|
+
M(L(w.title), 1)
|
|
3206
3210
|
]),
|
|
3207
3211
|
_: 2
|
|
3208
3212
|
}, 1032, ["color", "size", "to", "external", "onClick"]))), 128))
|
|
@@ -3210,61 +3214,61 @@ const pn = ["disabled", "onClick"], ma = /* @__PURE__ */ R({
|
|
|
3210
3214
|
], 2),
|
|
3211
3215
|
e.withDismiss ? (a(), p("div", {
|
|
3212
3216
|
key: 0,
|
|
3213
|
-
class:
|
|
3217
|
+
class: k(["flex", [n.value ? "items-start" : "items-center"]])
|
|
3214
3218
|
}, [
|
|
3215
|
-
|
|
3219
|
+
m("button", {
|
|
3216
3220
|
type: "button",
|
|
3217
|
-
class:
|
|
3218
|
-
onClick:
|
|
3221
|
+
class: k(["inline-flex rounded-md focus:outline-none focus:ring-2", h.value]),
|
|
3222
|
+
onClick: A[0] || (A[0] = (w) => b.$emit("dismiss"))
|
|
3219
3223
|
}, [
|
|
3220
|
-
|
|
3221
|
-
|
|
3224
|
+
Kl,
|
|
3225
|
+
_(l(pe), {
|
|
3222
3226
|
class: "h-5 w-5",
|
|
3223
3227
|
"aria-hidden": "true"
|
|
3224
3228
|
})
|
|
3225
3229
|
], 2)
|
|
3226
|
-
], 2)) :
|
|
3230
|
+
], 2)) : S("", !0)
|
|
3227
3231
|
], 2)
|
|
3228
3232
|
], 2));
|
|
3229
3233
|
}
|
|
3230
3234
|
});
|
|
3231
|
-
function
|
|
3232
|
-
var
|
|
3233
|
-
const { get:
|
|
3234
|
-
const
|
|
3235
|
-
return
|
|
3236
|
-
} :
|
|
3237
|
-
return
|
|
3235
|
+
function to(e) {
|
|
3236
|
+
var b, A;
|
|
3237
|
+
const { get: t, initialState: s, readOptions: n, set: r, asyncRead: o = !0, debugging: d } = e, i = d == null ? void 0 : d.log, f = () => (new Error("Trace:").stack || "").substring(7), c = ((A = (b = e.debugging) == null ? void 0 : b.log) == null ? void 0 : A.logger) || console.debug, x = i && !i.writesOnly ? () => {
|
|
3238
|
+
const w = t();
|
|
3239
|
+
return c(`debugging: '${i.name}' read`, w, f()), w;
|
|
3240
|
+
} : t, v = i && !i.readsOnly ? (w) => (c(`debugging: '${i.name}' written to`, w, f()), r(w)) : r, h = o ? Yt(x, s, n) : u(x), C = u(() => h.value);
|
|
3241
|
+
return C.update = v, C;
|
|
3238
3242
|
}
|
|
3239
|
-
const
|
|
3243
|
+
const Hl = /* @__PURE__ */ O({
|
|
3240
3244
|
__name: "ContextManager",
|
|
3241
|
-
setup(e, { expose:
|
|
3242
|
-
const
|
|
3243
|
-
(
|
|
3245
|
+
setup(e, { expose: t }) {
|
|
3246
|
+
const n = kt().provides, r = Object.getOwnPropertySymbols(n).find(
|
|
3247
|
+
(h) => h.description === "ComboboxContext"
|
|
3244
3248
|
);
|
|
3245
|
-
|
|
3246
|
-
const
|
|
3247
|
-
return
|
|
3248
|
-
|
|
3249
|
+
r || console.error("FormTagsContextManager ctx key not found!");
|
|
3250
|
+
const o = wt(r || "__undefined");
|
|
3251
|
+
return o || console.error("FormTagsContextManager ctx not found!"), t({ goUp: () => {
|
|
3252
|
+
o == null || o.goToOption(1);
|
|
3249
3253
|
}, goDown: () => {
|
|
3250
|
-
|
|
3254
|
+
o == null || o.goToOption(2);
|
|
3251
3255
|
}, open: () => {
|
|
3252
|
-
|
|
3256
|
+
o && o.openCombobox();
|
|
3253
3257
|
}, close: () => {
|
|
3254
|
-
|
|
3258
|
+
o == null || o.closeCombobox();
|
|
3255
3259
|
}, selectActive: () => {
|
|
3256
|
-
|
|
3257
|
-
}, isOpen: () => (
|
|
3260
|
+
o == null || o.selectActiveOption();
|
|
3261
|
+
}, isOpen: () => (o == null ? void 0 : o.comboboxState.value) === 0 }), (h, C) => R(h.$slots, "default");
|
|
3258
3262
|
}
|
|
3259
|
-
}),
|
|
3260
|
-
/* @__PURE__ */
|
|
3261
|
-
/* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3263
|
-
], -1),
|
|
3264
|
-
|
|
3265
|
-
],
|
|
3263
|
+
}), Gl = ["for"], Xl = ["disabled", "placeholder", "onKeydown"], Zl = /* @__PURE__ */ m("span", { class: "text-xs sr-only" }, "Clear input", -1), Ql = { key: 1 }, Nl = /* @__PURE__ */ m("div", { class: "text-foreground-2 text-center" }, [
|
|
3264
|
+
/* @__PURE__ */ M(" Press "),
|
|
3265
|
+
/* @__PURE__ */ m("strong", null, "Enter"),
|
|
3266
|
+
/* @__PURE__ */ M(" to create tag ⚡ ")
|
|
3267
|
+
], -1), Jl = [
|
|
3268
|
+
Nl
|
|
3269
|
+
], Yl = ["id"], so = /* @__PURE__ */ O({
|
|
3266
3270
|
__name: "Tags",
|
|
3267
|
-
props:
|
|
3271
|
+
props: {
|
|
3268
3272
|
name: null,
|
|
3269
3273
|
help: null,
|
|
3270
3274
|
label: null,
|
|
@@ -3281,37 +3285,39 @@ const Ln = /* @__PURE__ */ R({
|
|
|
3281
3285
|
placeholder: null,
|
|
3282
3286
|
disabled: { type: Boolean },
|
|
3283
3287
|
useLabelInErrors: { type: Boolean, default: !0 },
|
|
3284
|
-
getAutocompleteItems: { type: Function }
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
const s = e, o = (I) => I.type === "input", r = Ge(e, "modelValue", { local: !0 }), i = T(null), { focused: c } = Dt(i), h = T(
|
|
3288
|
+
getAutocompleteItems: { type: Function },
|
|
3289
|
+
modelValue: null
|
|
3290
|
+
},
|
|
3291
|
+
emits: ["update:modelValue", "change", "clear"],
|
|
3292
|
+
setup(e, { expose: t, emit: s }) {
|
|
3293
|
+
const n = e, r = (y) => y.type === "input", o = j(null), { focused: d } = es(o), i = j(
|
|
3291
3294
|
null
|
|
3292
3295
|
), {
|
|
3293
3296
|
coreInputClasses: f,
|
|
3294
|
-
coreClasses:
|
|
3295
|
-
labelClasses:
|
|
3297
|
+
coreClasses: c,
|
|
3298
|
+
labelClasses: x,
|
|
3296
3299
|
title: v,
|
|
3297
|
-
helpTip:
|
|
3298
|
-
helpTipId:
|
|
3299
|
-
hideHelpTip:
|
|
3300
|
-
helpTipClasses:
|
|
3301
|
-
errorMessage:
|
|
3302
|
-
clear:
|
|
3303
|
-
value:
|
|
3304
|
-
} =
|
|
3305
|
-
props:
|
|
3306
|
-
emit:
|
|
3307
|
-
inputEl:
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3300
|
+
helpTip: h,
|
|
3301
|
+
helpTipId: C,
|
|
3302
|
+
hideHelpTip: b,
|
|
3303
|
+
helpTipClasses: A,
|
|
3304
|
+
errorMessage: w,
|
|
3305
|
+
clear: $,
|
|
3306
|
+
value: P
|
|
3307
|
+
} = We({
|
|
3308
|
+
props: N(n),
|
|
3309
|
+
emit: s,
|
|
3310
|
+
inputEl: o
|
|
3311
|
+
// options: {
|
|
3312
|
+
// customClear: () => (selectedItems.value = [])
|
|
3313
|
+
// }
|
|
3314
|
+
}), E = j([]), g = j(!1), T = j(!1), D = j(""), F = u({
|
|
3315
|
+
get: () => P.value || [],
|
|
3316
|
+
set: (y) => {
|
|
3317
|
+
P.value = St(y).filter((B) => !!B.length);
|
|
3312
3318
|
}
|
|
3313
|
-
}),
|
|
3314
|
-
switch (
|
|
3319
|
+
}), ae = u(() => {
|
|
3320
|
+
switch (n.size) {
|
|
3315
3321
|
case "sm":
|
|
3316
3322
|
return "h-6";
|
|
3317
3323
|
case "lg":
|
|
@@ -3322,210 +3328,204 @@ const Ln = /* @__PURE__ */ R({
|
|
|
3322
3328
|
default:
|
|
3323
3329
|
return "h-8";
|
|
3324
3330
|
}
|
|
3325
|
-
}),
|
|
3326
|
-
const
|
|
3327
|
-
|
|
3328
|
-
|
|
3331
|
+
}), G = u(() => n.showClear && !!F.value.length), ee = u(() => {
|
|
3332
|
+
const y = [
|
|
3333
|
+
c.value,
|
|
3334
|
+
n.disabled ? "cursor-not-allowed !bg-foundation-disabled !text-disabled-muted" : ""
|
|
3329
3335
|
];
|
|
3330
|
-
return
|
|
3331
|
-
}),
|
|
3332
|
-
if (
|
|
3336
|
+
return G.value && (w.value || n.showRequired) ? y.push("pr-14") : (G.value || w.value || n.showRequired) && y.push("pr-8"), w.value ? (y.push("border-2 border-danger text-danger-darker"), d.value && y.push("ring-1 ring-danger")) : (y.push("border-2 border-transparent"), d.value && y.push("ring-2 ring-outline-2")), y.join(" ");
|
|
3337
|
+
}), H = (y) => {
|
|
3338
|
+
if (n.disabled)
|
|
3333
3339
|
return;
|
|
3334
|
-
const
|
|
3335
|
-
if (
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3340
|
+
const B = F.value.indexOf(y);
|
|
3341
|
+
if (B !== -1) {
|
|
3342
|
+
const I = F.value.slice();
|
|
3343
|
+
I.splice(B, 1), F.value = I;
|
|
3338
3344
|
}
|
|
3339
|
-
},
|
|
3340
|
-
var
|
|
3341
|
-
(
|
|
3342
|
-
},
|
|
3343
|
-
if (
|
|
3345
|
+
}, xe = () => {
|
|
3346
|
+
var y;
|
|
3347
|
+
(y = o.value) == null || y.blur(), T.value = !1;
|
|
3348
|
+
}, Se = (y) => {
|
|
3349
|
+
if (y.key !== "Backspace" || D.value.length)
|
|
3344
3350
|
return;
|
|
3345
|
-
const
|
|
3346
|
-
|
|
3347
|
-
},
|
|
3348
|
-
var
|
|
3349
|
-
(
|
|
3350
|
-
},
|
|
3351
|
-
var
|
|
3352
|
-
(
|
|
3353
|
-
},
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
),
|
|
3357
|
-
},
|
|
3358
|
-
|
|
3359
|
-
},
|
|
3360
|
-
var
|
|
3361
|
-
if (
|
|
3362
|
-
let
|
|
3363
|
-
if ((
|
|
3364
|
-
(
|
|
3351
|
+
const B = F.value.slice();
|
|
3352
|
+
B.pop(), F.value = B, T.value = !1;
|
|
3353
|
+
}, Be = () => {
|
|
3354
|
+
var y, B, I;
|
|
3355
|
+
(y = i.value) != null && y.isOpen() ? (B = i.value) == null || B.goUp() : (I = i.value) == null || I.open();
|
|
3356
|
+
}, ke = () => {
|
|
3357
|
+
var y, B, I;
|
|
3358
|
+
(y = i.value) != null && y.isOpen() ? (B = i.value) == null || B.goDown() : (I = i.value) == null || I.open();
|
|
3359
|
+
}, te = async () => {
|
|
3360
|
+
n.getAutocompleteItems && (g.value = !0, E.value = await Promise.resolve(
|
|
3361
|
+
n.getAutocompleteItems(D.value)
|
|
3362
|
+
), g.value = !1);
|
|
3363
|
+
}, he = Te(te, 1e3), _e = () => {
|
|
3364
|
+
g.value = !0, he();
|
|
3365
|
+
}, me = (y, B) => {
|
|
3366
|
+
var W, K;
|
|
3367
|
+
if (r(y) ? y.data === " " || y.data === "," || y.data === ";" : !0) {
|
|
3368
|
+
let oe = !1;
|
|
3369
|
+
if ((W = i.value) != null && W.isOpen() && E.value.length && !B)
|
|
3370
|
+
(K = i.value) == null || K.selectActive(), oe = !0;
|
|
3365
3371
|
else {
|
|
3366
|
-
const
|
|
3367
|
-
|
|
3372
|
+
const re = D.value.trim().substring(0, D.value.length - (r(y) ? 1 : 0)), we = F.value.includes(re);
|
|
3373
|
+
re.length > 0 && !we && (F.value = [...F.value, re], oe = !0);
|
|
3368
3374
|
}
|
|
3369
|
-
|
|
3375
|
+
oe && (D.value = "", T.value = !1);
|
|
3370
3376
|
} else
|
|
3371
|
-
|
|
3377
|
+
T.value = !!D.value.length;
|
|
3372
3378
|
};
|
|
3373
|
-
return
|
|
3374
|
-
var
|
|
3375
|
-
|
|
3376
|
-
}),
|
|
3377
|
-
|
|
3378
|
-
}),
|
|
3379
|
-
()
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
{ deep: !0 }
|
|
3384
|
-
), se(() => {
|
|
3385
|
-
ee();
|
|
3386
|
-
}), n({ resolveAutocompleteItems: ee }), (I, S) => (a(), O(l(ts), {
|
|
3387
|
-
modelValue: q.value,
|
|
3388
|
-
"onUpdate:modelValue": S[5] || (S[5] = (j) => q.value = j),
|
|
3379
|
+
return J(T, (y, B) => {
|
|
3380
|
+
var I, W;
|
|
3381
|
+
y && !B ? n.getAutocompleteItems && ((I = i.value) == null || I.open()) : !y && B && ((W = i.value) == null || W.close());
|
|
3382
|
+
}), J(D, () => {
|
|
3383
|
+
_e();
|
|
3384
|
+
}), se(() => {
|
|
3385
|
+
te();
|
|
3386
|
+
}), t({ resolveAutocompleteItems: te }), (y, B) => (a(), z(l(gs), {
|
|
3387
|
+
modelValue: F.value,
|
|
3388
|
+
"onUpdate:modelValue": B[5] || (B[5] = (I) => F.value = I),
|
|
3389
3389
|
as: "div",
|
|
3390
3390
|
multiple: "",
|
|
3391
3391
|
clearable: "",
|
|
3392
|
-
class:
|
|
3392
|
+
class: k([e.wrapperClasses])
|
|
3393
3393
|
}, {
|
|
3394
|
-
default:
|
|
3395
|
-
|
|
3394
|
+
default: V(() => [
|
|
3395
|
+
_(Hl, {
|
|
3396
3396
|
ref_key: "ctxManager",
|
|
3397
|
-
ref:
|
|
3397
|
+
ref: i
|
|
3398
3398
|
}, {
|
|
3399
|
-
default:
|
|
3400
|
-
|
|
3399
|
+
default: V(() => [
|
|
3400
|
+
m("label", {
|
|
3401
3401
|
for: e.name,
|
|
3402
|
-
class:
|
|
3402
|
+
class: k(l(x))
|
|
3403
3403
|
}, [
|
|
3404
|
-
|
|
3405
|
-
], 10,
|
|
3406
|
-
|
|
3407
|
-
class:
|
|
3404
|
+
m("span", null, L(l(v)), 1)
|
|
3405
|
+
], 10, Gl),
|
|
3406
|
+
m("div", {
|
|
3407
|
+
class: k(["relative flex flex-wrap items-center space-x-1 px-2 py-1", ee.value])
|
|
3408
3408
|
}, [
|
|
3409
|
-
(a(!0), p(
|
|
3410
|
-
key:
|
|
3411
|
-
"icon-left": e.disabled ? void 0 : l(
|
|
3409
|
+
(a(!0), p(U, null, q(F.value, (I) => (a(), z(Ue, {
|
|
3410
|
+
key: I,
|
|
3411
|
+
"icon-left": e.disabled ? void 0 : l(pe),
|
|
3412
3412
|
"clickable-icon": "",
|
|
3413
3413
|
size: "lg",
|
|
3414
|
-
onClickIcon: () =>
|
|
3414
|
+
onClickIcon: () => H(I)
|
|
3415
3415
|
}, {
|
|
3416
|
-
default:
|
|
3417
|
-
|
|
3416
|
+
default: V(() => [
|
|
3417
|
+
M(L(I), 1)
|
|
3418
3418
|
]),
|
|
3419
3419
|
_: 2
|
|
3420
3420
|
}, 1032, ["icon-left", "onClickIcon"]))), 128)),
|
|
3421
|
-
|
|
3421
|
+
de(m("input", {
|
|
3422
3422
|
ref_key: "inputEl",
|
|
3423
|
-
ref:
|
|
3424
|
-
"onUpdate:modelValue":
|
|
3423
|
+
ref: o,
|
|
3424
|
+
"onUpdate:modelValue": B[0] || (B[0] = (I) => D.value = I),
|
|
3425
3425
|
disabled: e.disabled,
|
|
3426
|
-
class:
|
|
3426
|
+
class: k(["bg-transparent grow shrink border-0 focus:ring-0 p-0", [l(f), ae.value]]),
|
|
3427
3427
|
style: { "flex-basis": "70px", "min-width": "70px" },
|
|
3428
|
-
placeholder:
|
|
3429
|
-
onInput:
|
|
3428
|
+
placeholder: F.value.length ? void 0 : e.placeholder,
|
|
3429
|
+
onInput: me,
|
|
3430
3430
|
onKeydown: [
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3431
|
+
ie(xe, ["escape"]),
|
|
3432
|
+
B[1] || (B[1] = ie(ne((I) => me(I, !0), ["stop", "prevent"]), ["enter"])),
|
|
3433
|
+
ie(me, ["tab"]),
|
|
3434
|
+
ie(Se, ["backspace"]),
|
|
3435
|
+
ie(Be, ["arrow-up"]),
|
|
3436
|
+
ie(ke, ["arrow-down"])
|
|
3437
3437
|
],
|
|
3438
|
-
onBlur:
|
|
3439
|
-
}, null, 42,
|
|
3440
|
-
[
|
|
3438
|
+
onBlur: B[2] || (B[2] = (I) => T.value = !1)
|
|
3439
|
+
}, null, 42, Xl), [
|
|
3440
|
+
[Oe, D.value]
|
|
3441
3441
|
]),
|
|
3442
|
-
|
|
3442
|
+
G.value ? (a(), p("a", {
|
|
3443
3443
|
key: 0,
|
|
3444
3444
|
title: "Clear input",
|
|
3445
3445
|
class: "absolute top-2 right-0 flex items-center pr-2 cursor-pointer",
|
|
3446
|
-
onClick:
|
|
3447
|
-
(...
|
|
3448
|
-
onKeydown:
|
|
3449
|
-
(...
|
|
3446
|
+
onClick: B[3] || (B[3] = //@ts-ignore
|
|
3447
|
+
(...I) => l($) && l($)(...I)),
|
|
3448
|
+
onKeydown: B[4] || (B[4] = //@ts-ignore
|
|
3449
|
+
(...I) => l($) && l($)(...I))
|
|
3450
3450
|
}, [
|
|
3451
|
-
|
|
3452
|
-
|
|
3451
|
+
Zl,
|
|
3452
|
+
_(l(pe), {
|
|
3453
3453
|
class: "h-5 w-5 text-foreground",
|
|
3454
3454
|
"aria-hidden": "true"
|
|
3455
3455
|
})
|
|
3456
|
-
], 32)) :
|
|
3457
|
-
l(
|
|
3456
|
+
], 32)) : S("", !0),
|
|
3457
|
+
l(w) ? (a(), p("div", {
|
|
3458
3458
|
key: 1,
|
|
3459
|
-
class:
|
|
3459
|
+
class: k([
|
|
3460
3460
|
"pointer-events-none absolute top-[10px] right-0 flex items-center",
|
|
3461
|
-
|
|
3461
|
+
G.value ? "pr-8" : "pr-2"
|
|
3462
3462
|
])
|
|
3463
3463
|
}, [
|
|
3464
|
-
|
|
3464
|
+
_(l(Ie), {
|
|
3465
3465
|
class: "h-4 w-4 text-danger",
|
|
3466
3466
|
"aria-hidden": "true"
|
|
3467
3467
|
})
|
|
3468
|
-
], 2)) :
|
|
3469
|
-
e.showRequired && !l(
|
|
3468
|
+
], 2)) : S("", !0),
|
|
3469
|
+
e.showRequired && !l(w) ? (a(), p("div", {
|
|
3470
3470
|
key: 2,
|
|
3471
|
-
class:
|
|
3472
|
-
}, " * ", 2)) :
|
|
3471
|
+
class: k(["pointer-events-none absolute top-[2px] text-4xl right-0 flex items-center text-danger opacity-50", G.value ? "pr-8" : "pr-2"])
|
|
3472
|
+
}, " * ", 2)) : S("", !0)
|
|
3473
3473
|
], 2),
|
|
3474
|
-
|
|
3474
|
+
_(l(nt), {
|
|
3475
3475
|
leave: "transition ease-in duration-100",
|
|
3476
3476
|
"leave-from": "opacity-100",
|
|
3477
3477
|
"leave-to": "opacity-0",
|
|
3478
3478
|
class: "relative px-0.5"
|
|
3479
3479
|
}, {
|
|
3480
|
-
default:
|
|
3481
|
-
|
|
3482
|
-
default:
|
|
3483
|
-
|
|
3480
|
+
default: V(() => [
|
|
3481
|
+
_(l(bs), { class: "absolute top-1 max-h-60 w-full overflow-auto simple-scrollbar rounded-md bg-foundation-2 py-1 shadow label label--light outline outline-2 outline-primary-muted focus:outline-none" }, {
|
|
3482
|
+
default: V(() => [
|
|
3483
|
+
g.value ? (a(), p("div", {
|
|
3484
3484
|
key: 0,
|
|
3485
|
-
class:
|
|
3485
|
+
class: k(["px-1", E.value.length ? "mb-1" : ""])
|
|
3486
3486
|
}, [
|
|
3487
|
-
|
|
3488
|
-
], 2)) :
|
|
3489
|
-
!
|
|
3490
|
-
|
|
3491
|
-
key:
|
|
3487
|
+
_(Ke, { loading: !0 })
|
|
3488
|
+
], 2)) : S("", !0),
|
|
3489
|
+
!E.value.length && !g.value ? (a(), p("div", Ql, Jl)) : S("", !0),
|
|
3490
|
+
E.value.length ? (a(!0), p(U, { key: 2 }, q(E.value, (I) => (a(), z(l(ys), {
|
|
3491
|
+
key: I,
|
|
3492
3492
|
as: "template",
|
|
3493
|
-
value:
|
|
3493
|
+
value: I
|
|
3494
3494
|
}, {
|
|
3495
|
-
default:
|
|
3496
|
-
|
|
3497
|
-
class:
|
|
3498
|
-
"text-primary":
|
|
3499
|
-
"text-foreground": !
|
|
3495
|
+
default: V(({ selected: W, active: K }) => [
|
|
3496
|
+
m("li", {
|
|
3497
|
+
class: k(["relative cursor-pointer select-none py-1.5 pl-3", {
|
|
3498
|
+
"text-primary": K,
|
|
3499
|
+
"text-foreground": !K
|
|
3500
3500
|
}])
|
|
3501
3501
|
}, [
|
|
3502
|
-
|
|
3503
|
-
class:
|
|
3504
|
-
},
|
|
3505
|
-
|
|
3502
|
+
m("span", {
|
|
3503
|
+
class: k(["block truncate", { "font-medium": W, "font-normal": !W }])
|
|
3504
|
+
}, L(I), 3),
|
|
3505
|
+
W ? (a(), p("span", {
|
|
3506
3506
|
key: 0,
|
|
3507
|
-
class:
|
|
3507
|
+
class: k(["absolute inset-y-0 right-0 flex items-center pr-4", { "text-primary": K, "text-foreground": !K }])
|
|
3508
3508
|
}, [
|
|
3509
|
-
|
|
3509
|
+
_(l(tt), {
|
|
3510
3510
|
class: "h-5 w-5",
|
|
3511
3511
|
"aria-hidden": "true"
|
|
3512
3512
|
})
|
|
3513
|
-
], 2)) :
|
|
3513
|
+
], 2)) : S("", !0)
|
|
3514
3514
|
], 2)
|
|
3515
3515
|
]),
|
|
3516
3516
|
_: 2
|
|
3517
|
-
}, 1032, ["value"]))), 128)) :
|
|
3517
|
+
}, 1032, ["value"]))), 128)) : S("", !0)
|
|
3518
3518
|
]),
|
|
3519
3519
|
_: 1
|
|
3520
3520
|
})
|
|
3521
3521
|
]),
|
|
3522
3522
|
_: 1
|
|
3523
3523
|
}),
|
|
3524
|
-
l(
|
|
3524
|
+
l(C) && !l(b) ? (a(), p("p", {
|
|
3525
3525
|
key: 0,
|
|
3526
|
-
id: l(
|
|
3527
|
-
class:
|
|
3528
|
-
},
|
|
3526
|
+
id: l(C),
|
|
3527
|
+
class: k(l(A))
|
|
3528
|
+
}, L(l(h)), 11, Yl)) : S("", !0)
|
|
3529
3529
|
]),
|
|
3530
3530
|
_: 1
|
|
3531
3531
|
}, 512)
|
|
@@ -3534,49 +3534,502 @@ const Ln = /* @__PURE__ */ R({
|
|
|
3534
3534
|
}, 8, ["modelValue", "class"]));
|
|
3535
3535
|
}
|
|
3536
3536
|
});
|
|
3537
|
+
function dt(e) {
|
|
3538
|
+
const { props: t } = e, s = u(() => {
|
|
3539
|
+
var f;
|
|
3540
|
+
switch ((f = t.size) == null ? void 0 : f.value) {
|
|
3541
|
+
case "xs":
|
|
3542
|
+
return "h-5";
|
|
3543
|
+
case "sm":
|
|
3544
|
+
return "h-6";
|
|
3545
|
+
case "lg":
|
|
3546
|
+
return "h-10";
|
|
3547
|
+
case "xl":
|
|
3548
|
+
return "h-14";
|
|
3549
|
+
case "editable":
|
|
3550
|
+
return "h-60";
|
|
3551
|
+
case "base":
|
|
3552
|
+
default:
|
|
3553
|
+
return "h-8";
|
|
3554
|
+
}
|
|
3555
|
+
}), n = u(() => {
|
|
3556
|
+
var f;
|
|
3557
|
+
switch ((f = t.size) == null ? void 0 : f.value) {
|
|
3558
|
+
case "xs":
|
|
3559
|
+
return "w-5";
|
|
3560
|
+
case "sm":
|
|
3561
|
+
return "w-6";
|
|
3562
|
+
case "lg":
|
|
3563
|
+
return "w-10";
|
|
3564
|
+
case "xl":
|
|
3565
|
+
return "w-14";
|
|
3566
|
+
case "editable":
|
|
3567
|
+
return "w-60";
|
|
3568
|
+
case "base":
|
|
3569
|
+
default:
|
|
3570
|
+
return "w-8";
|
|
3571
|
+
}
|
|
3572
|
+
}), r = u(() => {
|
|
3573
|
+
var f;
|
|
3574
|
+
switch ((f = t.size) == null ? void 0 : f.value) {
|
|
3575
|
+
case "xs":
|
|
3576
|
+
return "text-tiny";
|
|
3577
|
+
case "sm":
|
|
3578
|
+
return "text-xs";
|
|
3579
|
+
case "lg":
|
|
3580
|
+
return "text-md";
|
|
3581
|
+
case "xl":
|
|
3582
|
+
return "text-2xl";
|
|
3583
|
+
case "editable":
|
|
3584
|
+
return "h1";
|
|
3585
|
+
case "base":
|
|
3586
|
+
default:
|
|
3587
|
+
return "text-sm";
|
|
3588
|
+
}
|
|
3589
|
+
}), o = u(() => {
|
|
3590
|
+
var f;
|
|
3591
|
+
switch ((f = t.size) == null ? void 0 : f.value) {
|
|
3592
|
+
case "xs":
|
|
3593
|
+
return "w-3 h-3";
|
|
3594
|
+
case "sm":
|
|
3595
|
+
return "w-3 h-3";
|
|
3596
|
+
case "lg":
|
|
3597
|
+
return "w-5 h-5";
|
|
3598
|
+
case "xl":
|
|
3599
|
+
return "w-8 h-8";
|
|
3600
|
+
case "editable":
|
|
3601
|
+
return "w-20 h-20";
|
|
3602
|
+
case "base":
|
|
3603
|
+
default:
|
|
3604
|
+
return "w-4 h-4";
|
|
3605
|
+
}
|
|
3606
|
+
}), d = u(
|
|
3607
|
+
() => `${n.value} ${s.value} ${r.value}`
|
|
3608
|
+
);
|
|
3609
|
+
return { heightClasses: s, widthClasses: n, sizeClasses: d, iconClasses: o };
|
|
3610
|
+
}
|
|
3611
|
+
const ea = {
|
|
3612
|
+
key: 1,
|
|
3613
|
+
class: "flex h-full w-full select-none items-center justify-center"
|
|
3614
|
+
}, ta = { key: 2 }, je = /* @__PURE__ */ O({
|
|
3615
|
+
__name: "Avatar",
|
|
3616
|
+
props: {
|
|
3617
|
+
user: { default: null },
|
|
3618
|
+
size: { default: "base" },
|
|
3619
|
+
hoverEffect: { type: Boolean, default: !1 },
|
|
3620
|
+
active: { type: Boolean },
|
|
3621
|
+
noBorder: { type: Boolean },
|
|
3622
|
+
noBg: { type: Boolean }
|
|
3623
|
+
},
|
|
3624
|
+
setup(e) {
|
|
3625
|
+
const t = e, { sizeClasses: s, iconClasses: n } = dt({ props: N(t) }), r = u(() => {
|
|
3626
|
+
var h, C, b;
|
|
3627
|
+
if (!((h = t.user) != null && h.name.length))
|
|
3628
|
+
return;
|
|
3629
|
+
const c = t.user.name.split(" "), x = ((C = c[0]) == null ? void 0 : C[0]) || "", v = ((b = c[1]) == null ? void 0 : b[0]) || "";
|
|
3630
|
+
return t.size === "sm" || t.size === "xs" ? x : x + v;
|
|
3631
|
+
}), o = u(() => t.noBorder ? "" : "border-2 border-foundation"), d = u(() => t.noBg ? "" : "bg-primary"), i = u(() => t.hoverEffect ? "hover:border-primary focus:border-primary active:scale-95" : ""), f = u(() => t.active ? "border-primary" : "");
|
|
3632
|
+
return (c, x) => (a(), p("div", {
|
|
3633
|
+
class: k([
|
|
3634
|
+
"text-foreground-on-primary flex shrink-0 items-center justify-center overflow-hidden rounded-full font-semibold uppercase transition",
|
|
3635
|
+
l(s),
|
|
3636
|
+
d.value,
|
|
3637
|
+
o.value,
|
|
3638
|
+
i.value,
|
|
3639
|
+
f.value
|
|
3640
|
+
])
|
|
3641
|
+
}, [
|
|
3642
|
+
R(c.$slots, "default", {}, () => {
|
|
3643
|
+
var v;
|
|
3644
|
+
return [
|
|
3645
|
+
(v = e.user) != null && v.avatar ? (a(), p("div", {
|
|
3646
|
+
key: 0,
|
|
3647
|
+
class: "h-full w-full bg-cover bg-center bg-no-repeat",
|
|
3648
|
+
style: fe({ backgroundImage: `url('${e.user.avatar}')` })
|
|
3649
|
+
}, null, 4)) : r.value ? (a(), p("div", ea, L(r.value), 1)) : (a(), p("div", ta, [
|
|
3650
|
+
_(l(At), {
|
|
3651
|
+
class: k(l(n))
|
|
3652
|
+
}, null, 8, ["class"])
|
|
3653
|
+
]))
|
|
3654
|
+
];
|
|
3655
|
+
})
|
|
3656
|
+
], 2));
|
|
3657
|
+
}
|
|
3658
|
+
}), no = /* @__PURE__ */ O({
|
|
3659
|
+
__name: "AvatarGroup",
|
|
3660
|
+
props: {
|
|
3661
|
+
users: { default: () => [] },
|
|
3662
|
+
overlap: { type: Boolean, default: !0 },
|
|
3663
|
+
size: { default: "base" },
|
|
3664
|
+
maxCount: { default: void 0 }
|
|
3665
|
+
},
|
|
3666
|
+
setup(e) {
|
|
3667
|
+
const t = e, s = j(null), n = j(null), { hiddenItemCount: r } = it({
|
|
3668
|
+
elementToWatchForChanges: s,
|
|
3669
|
+
itemContainer: n,
|
|
3670
|
+
trackResize: !0,
|
|
3671
|
+
trackMutations: !0
|
|
3672
|
+
}), { heightClasses: o } = dt({ props: N(t) }), d = u(() => t.maxCount ? Math.max(t.users.length - t.maxCount, 0) : 0), i = u(
|
|
3673
|
+
() => r.value + d.value
|
|
3674
|
+
), f = u(
|
|
3675
|
+
() => t.maxCount ? t.users.slice(0, t.maxCount) : t.users
|
|
3676
|
+
);
|
|
3677
|
+
return (c, x) => (a(), p("div", {
|
|
3678
|
+
ref_key: "elementToWatchForChanges",
|
|
3679
|
+
ref: s,
|
|
3680
|
+
class: k(`flex ${e.overlap ? "-space-x-2" : ""}`)
|
|
3681
|
+
}, [
|
|
3682
|
+
m("div", {
|
|
3683
|
+
ref_key: "itemContainer",
|
|
3684
|
+
ref: n,
|
|
3685
|
+
class: k(`flex flex-wrap overflow-hidden ${e.overlap ? "-space-x-2 " : ""} ${l(o)}`)
|
|
3686
|
+
}, [
|
|
3687
|
+
(a(!0), p(U, null, q(f.value, (v, h) => (a(), z(je, {
|
|
3688
|
+
key: v.id || h,
|
|
3689
|
+
user: v,
|
|
3690
|
+
size: e.size
|
|
3691
|
+
}, null, 8, ["user", "size"]))), 128))
|
|
3692
|
+
], 2),
|
|
3693
|
+
i.value ? (a(), z(je, {
|
|
3694
|
+
key: 0,
|
|
3695
|
+
size: e.size
|
|
3696
|
+
}, {
|
|
3697
|
+
default: V(() => [
|
|
3698
|
+
M(" +" + L(i.value), 1)
|
|
3699
|
+
]),
|
|
3700
|
+
_: 1
|
|
3701
|
+
}, 8, ["size"])) : S("", !0)
|
|
3702
|
+
], 2));
|
|
3703
|
+
}
|
|
3704
|
+
}), sa = /* @__PURE__ */ O({
|
|
3705
|
+
__name: "Icon",
|
|
3706
|
+
props: {
|
|
3707
|
+
loading: { type: Boolean, default: !0 },
|
|
3708
|
+
size: { default: "base" }
|
|
3709
|
+
},
|
|
3710
|
+
setup(e) {
|
|
3711
|
+
const t = e, s = u(() => {
|
|
3712
|
+
const n = ["text-primary transition-all animate-spin"];
|
|
3713
|
+
switch (n.push(t.loading ? "opacity-100" : "opacity-0"), t.size) {
|
|
3714
|
+
case "base":
|
|
3715
|
+
n.push("h-8 w-8");
|
|
3716
|
+
break;
|
|
3717
|
+
case "sm":
|
|
3718
|
+
n.push("h-5 w-5");
|
|
3719
|
+
break;
|
|
3720
|
+
case "lg":
|
|
3721
|
+
n.push("h-12 w-12");
|
|
3722
|
+
break;
|
|
3723
|
+
}
|
|
3724
|
+
return n.join(" ");
|
|
3725
|
+
});
|
|
3726
|
+
return (n, r) => (a(), z(l(Je), {
|
|
3727
|
+
class: k(s.value)
|
|
3728
|
+
}, null, 8, ["class"]));
|
|
3729
|
+
}
|
|
3730
|
+
}), na = { class: "flex justify-center" }, la = {
|
|
3731
|
+
key: 1,
|
|
3732
|
+
class: "relative group"
|
|
3733
|
+
}, aa = { class: "opacity-0 transition-all absolute group-hover:opacity-100 inset-0 flex items-end justify-center bottom-4" }, lo = /* @__PURE__ */ O({
|
|
3734
|
+
__name: "AvatarEditable",
|
|
3735
|
+
props: {
|
|
3736
|
+
user: null
|
|
3737
|
+
},
|
|
3738
|
+
emits: ["save"],
|
|
3739
|
+
setup(e, { expose: t, emit: s }) {
|
|
3740
|
+
const n = e, r = Ct({
|
|
3741
|
+
loader: () => import("./AvatarEditor-1bbae637.js"),
|
|
3742
|
+
loadingComponent: sa,
|
|
3743
|
+
delay: 100
|
|
3744
|
+
}), o = j(!1), d = (c) => {
|
|
3745
|
+
s("save", c);
|
|
3746
|
+
}, i = () => o.value = !0, f = () => o.value = !1;
|
|
3747
|
+
return J(
|
|
3748
|
+
() => n.user.avatar,
|
|
3749
|
+
() => {
|
|
3750
|
+
o.value = !1;
|
|
3751
|
+
}
|
|
3752
|
+
), t({ open: i, close: f }), (c, x) => (a(), p("div", na, [
|
|
3753
|
+
o.value ? (a(), z(l(r), {
|
|
3754
|
+
key: 0,
|
|
3755
|
+
user: e.user,
|
|
3756
|
+
onCancel: x[0] || (x[0] = (v) => o.value = !1),
|
|
3757
|
+
onSave: d
|
|
3758
|
+
}, null, 8, ["user"])) : (a(), p("div", la, [
|
|
3759
|
+
_(je, {
|
|
3760
|
+
user: e.user,
|
|
3761
|
+
size: "editable"
|
|
3762
|
+
}, null, 8, ["user"]),
|
|
3763
|
+
m("div", aa, [
|
|
3764
|
+
_(le, {
|
|
3765
|
+
color: "secondary",
|
|
3766
|
+
onClick: x[1] || (x[1] = (v) => o.value = !0)
|
|
3767
|
+
}, {
|
|
3768
|
+
default: V(() => [
|
|
3769
|
+
M("Change")
|
|
3770
|
+
]),
|
|
3771
|
+
_: 1
|
|
3772
|
+
})
|
|
3773
|
+
])
|
|
3774
|
+
]))
|
|
3775
|
+
]));
|
|
3776
|
+
}
|
|
3777
|
+
});
|
|
3778
|
+
class Y extends Error {
|
|
3779
|
+
constructor(t, s) {
|
|
3780
|
+
t || (t = new.target.defaultMessage), super(t, s);
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3783
|
+
/**
|
|
3784
|
+
* Default message if none is passed
|
|
3785
|
+
*/
|
|
3786
|
+
Q(Y, "defaultMessage", "Unexpected error occurred");
|
|
3787
|
+
class oa extends Y {
|
|
3788
|
+
}
|
|
3789
|
+
Q(oa, "defaultMessage", "An unexpected logic error occurred!");
|
|
3790
|
+
class ra extends Y {
|
|
3791
|
+
}
|
|
3792
|
+
Q(ra, "defaultMessage", "Attempting to access an uninitialized resource");
|
|
3793
|
+
class ia extends Y {
|
|
3794
|
+
}
|
|
3795
|
+
Q(ia, "defaultMessage", "getCurrentInstance() returned null. Method must be called at the top of a setup function");
|
|
3796
|
+
class ua extends Y {
|
|
3797
|
+
}
|
|
3798
|
+
Q(ua, "defaultMessage", "Operation not supported in current (server or client) environment");
|
|
3799
|
+
var He = /* @__PURE__ */ ((e) => (e.AnyAudio = "audio/*", e.AnyVideo = "video/*", e.AnyImage = "image/*", e))(He || {});
|
|
3800
|
+
function ca(e, t) {
|
|
3801
|
+
const s = Bt(
|
|
3802
|
+
Object.values(He),
|
|
3803
|
+
t
|
|
3804
|
+
);
|
|
3805
|
+
for (const o of s)
|
|
3806
|
+
switch (o) {
|
|
3807
|
+
case "audio/*":
|
|
3808
|
+
if (e.type.startsWith("audio"))
|
|
3809
|
+
return !0;
|
|
3810
|
+
break;
|
|
3811
|
+
case "image/*":
|
|
3812
|
+
if (e.type.startsWith("image"))
|
|
3813
|
+
return !0;
|
|
3814
|
+
break;
|
|
3815
|
+
case "video/*":
|
|
3816
|
+
if (e.type.startsWith("video"))
|
|
3817
|
+
return !0;
|
|
3818
|
+
break;
|
|
3819
|
+
}
|
|
3820
|
+
const n = _t(t, s), r = da(e.name);
|
|
3821
|
+
if (!r)
|
|
3822
|
+
return new ft();
|
|
3823
|
+
for (const o of n)
|
|
3824
|
+
if (o.toLowerCase() === r.toLowerCase())
|
|
3825
|
+
return !0;
|
|
3826
|
+
return new pt();
|
|
3827
|
+
}
|
|
3828
|
+
function da(e) {
|
|
3829
|
+
const t = e.split(".").pop() || null;
|
|
3830
|
+
return t ? `.${t}` : null;
|
|
3831
|
+
}
|
|
3832
|
+
function fa(e) {
|
|
3833
|
+
return e.startsWith(".") || Object.values(He).includes(e);
|
|
3834
|
+
}
|
|
3835
|
+
function Qe(e) {
|
|
3836
|
+
const t = (o) => parseFloat(o.toFixed(2)).toString();
|
|
3837
|
+
if (e < 1024)
|
|
3838
|
+
return `${e}bytes`;
|
|
3839
|
+
const s = e / 1024;
|
|
3840
|
+
if (s < 1024)
|
|
3841
|
+
return `${t(s)}KB`;
|
|
3842
|
+
const n = s / 1024;
|
|
3843
|
+
if (n < 1024)
|
|
3844
|
+
return `${t(n)}MB`;
|
|
3845
|
+
const r = n / 1024;
|
|
3846
|
+
return `${t(r)}GB`;
|
|
3847
|
+
}
|
|
3848
|
+
function pa(e) {
|
|
3849
|
+
const t = {
|
|
3850
|
+
name: e.name,
|
|
3851
|
+
lastModified: e.lastModified,
|
|
3852
|
+
size: e.size,
|
|
3853
|
+
type: e.type
|
|
3854
|
+
};
|
|
3855
|
+
return Zt(JSON.stringify(t));
|
|
3856
|
+
}
|
|
3857
|
+
class ft extends Y {
|
|
3858
|
+
}
|
|
3859
|
+
Q(ft, "defaultMessage", "The selected file has a missing extension");
|
|
3860
|
+
class pt extends Y {
|
|
3861
|
+
}
|
|
3862
|
+
Q(pt, "defaultMessage", "The selected file type is forbidden");
|
|
3863
|
+
var ha = /* @__PURE__ */ ((e) => (e[e.Success = 1] = "Success", e[e.Failure = 2] = "Failure", e))(ha || {});
|
|
3864
|
+
function ma(e) {
|
|
3865
|
+
if (!e)
|
|
3866
|
+
return;
|
|
3867
|
+
const t = e.split(",").map((s) => fa(s) ? s : null).filter((s) => s !== null);
|
|
3868
|
+
return t.length ? t : void 0;
|
|
3869
|
+
}
|
|
3870
|
+
function va(e) {
|
|
3871
|
+
const { disabled: t, accept: s, multiple: n, sizeLimit: r, countLimit: o } = e, d = u(() => ma(l(s))), i = (f) => {
|
|
3872
|
+
const c = [], x = d.value;
|
|
3873
|
+
for (const v of f) {
|
|
3874
|
+
const h = pa(v), C = l(n) ? l(o) : 1;
|
|
3875
|
+
if (!c.find((b) => b.id === h)) {
|
|
3876
|
+
if (C && c.length >= C)
|
|
3877
|
+
break;
|
|
3878
|
+
if (x) {
|
|
3879
|
+
const b = ca(v, x);
|
|
3880
|
+
if (b instanceof Error) {
|
|
3881
|
+
c.push({
|
|
3882
|
+
file: v,
|
|
3883
|
+
id: h,
|
|
3884
|
+
error: b
|
|
3885
|
+
});
|
|
3886
|
+
continue;
|
|
3887
|
+
}
|
|
3888
|
+
}
|
|
3889
|
+
if (v.size > l(r)) {
|
|
3890
|
+
c.push({
|
|
3891
|
+
file: v,
|
|
3892
|
+
id: h,
|
|
3893
|
+
error: new ht(
|
|
3894
|
+
`The selected file's size (${Qe(
|
|
3895
|
+
v.size
|
|
3896
|
+
)}) is too big (over ${Qe(l(r))})`
|
|
3897
|
+
)
|
|
3898
|
+
});
|
|
3899
|
+
continue;
|
|
3900
|
+
}
|
|
3901
|
+
c.push({ file: v, id: h, error: null });
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
return c;
|
|
3905
|
+
};
|
|
3906
|
+
return {
|
|
3907
|
+
/**
|
|
3908
|
+
* Validate incoming files and build UploadableFileItem structs out of them
|
|
3909
|
+
*/
|
|
3910
|
+
buildUploadableFiles: (f) => {
|
|
3911
|
+
if (!l(t || !1))
|
|
3912
|
+
return i(f);
|
|
3913
|
+
}
|
|
3914
|
+
};
|
|
3915
|
+
}
|
|
3916
|
+
class ht extends Y {
|
|
3917
|
+
}
|
|
3918
|
+
Q(ht, "defaultMessage", "The selected file's size is too large");
|
|
3919
|
+
const ga = ["accept", "multiple"], ao = /* @__PURE__ */ O({
|
|
3920
|
+
__name: "Zone",
|
|
3921
|
+
props: {
|
|
3922
|
+
accept: null,
|
|
3923
|
+
multiple: { type: Boolean },
|
|
3924
|
+
sizeLimit: { default: 1024 * 1024 * 100 },
|
|
3925
|
+
countLimit: null,
|
|
3926
|
+
disabled: { type: Boolean }
|
|
3927
|
+
},
|
|
3928
|
+
emits: ["files-selected"],
|
|
3929
|
+
setup(e, { expose: t, emit: s }) {
|
|
3930
|
+
const n = e, r = j(null), o = j(null), { buildUploadableFiles: d } = va({
|
|
3931
|
+
sizeLimit: u(() => n.sizeLimit),
|
|
3932
|
+
countLimit: u(() => n.countLimit),
|
|
3933
|
+
accept: u(() => n.accept),
|
|
3934
|
+
multiple: u(() => n.multiple),
|
|
3935
|
+
disabled: u(() => n.disabled)
|
|
3936
|
+
}), i = (v) => {
|
|
3937
|
+
const h = d(v);
|
|
3938
|
+
h != null && h.length && s("files-selected", { files: h });
|
|
3939
|
+
}, { isOverDropZone: f } = ts(r, (v) => {
|
|
3940
|
+
v != null && v.length && i(v);
|
|
3941
|
+
}), c = () => {
|
|
3942
|
+
const v = o.value;
|
|
3943
|
+
if (!v)
|
|
3944
|
+
return;
|
|
3945
|
+
const h = [...v.files || []];
|
|
3946
|
+
v.value = "", h.length && i(h);
|
|
3947
|
+
}, x = () => {
|
|
3948
|
+
var v;
|
|
3949
|
+
(v = o.value) == null || v.click();
|
|
3950
|
+
};
|
|
3951
|
+
return t({
|
|
3952
|
+
triggerPicker: x
|
|
3953
|
+
}), (v, h) => (a(), p("div", {
|
|
3954
|
+
ref_key: "fileUploadZone",
|
|
3955
|
+
ref: r,
|
|
3956
|
+
class: "file-upload-zone"
|
|
3957
|
+
}, [
|
|
3958
|
+
R(v.$slots, "default", {
|
|
3959
|
+
isDraggingFiles: l(f),
|
|
3960
|
+
openFilePicker: x,
|
|
3961
|
+
activatorOn: { click: x }
|
|
3962
|
+
}),
|
|
3963
|
+
m("input", {
|
|
3964
|
+
ref_key: "fileInput",
|
|
3965
|
+
ref: o,
|
|
3966
|
+
type: "file",
|
|
3967
|
+
class: "hidden",
|
|
3968
|
+
accept: e.accept,
|
|
3969
|
+
multiple: e.multiple,
|
|
3970
|
+
onClick: h[0] || (h[0] = ne(() => {
|
|
3971
|
+
}, ["stop"])),
|
|
3972
|
+
onChange: c
|
|
3973
|
+
}, null, 40, ga)
|
|
3974
|
+
], 512));
|
|
3975
|
+
}
|
|
3976
|
+
});
|
|
3537
3977
|
export {
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3978
|
+
Y as BaseError,
|
|
3979
|
+
ha as BlobUploadStatus,
|
|
3980
|
+
eo as CommonAlert,
|
|
3981
|
+
Ue as CommonBadge,
|
|
3982
|
+
Ke as CommonLoadingBar,
|
|
3983
|
+
sa as CommonLoadingIcon,
|
|
3984
|
+
ja as CommonStepsBullet,
|
|
3985
|
+
Pa as CommonStepsNumber,
|
|
3986
|
+
Cs as CommonTextLink,
|
|
3987
|
+
ia as ComposableInvokedOutOfScopeError,
|
|
3988
|
+
le as FormButton,
|
|
3989
|
+
Aa as FormCardButton,
|
|
3990
|
+
Oa as FormCheckbox,
|
|
3991
|
+
ao as FormFileUploadZone,
|
|
3992
|
+
Ea as FormSelectBadges,
|
|
3993
|
+
ct as FormSelectBase,
|
|
3994
|
+
Ra as FormSelectSourceApps,
|
|
3995
|
+
Da as FormSwitch,
|
|
3996
|
+
so as FormTags,
|
|
3997
|
+
Ma as FormTextArea,
|
|
3998
|
+
Ta as FormTextInput,
|
|
3999
|
+
za as GlobalToastRenderer,
|
|
4000
|
+
ue as GridListToggleValue,
|
|
3556
4001
|
Pe as HorizontalDirection,
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
ua as
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
4002
|
+
Ja as InfiniteLoading,
|
|
4003
|
+
Ka as LayoutDialog,
|
|
4004
|
+
Ha as LayoutDisclosure,
|
|
4005
|
+
Ga as LayoutGridListToggle,
|
|
4006
|
+
Za as LayoutMenu,
|
|
4007
|
+
Ya as LayoutPanel,
|
|
4008
|
+
Na as LayoutTable,
|
|
4009
|
+
Qa as LayoutTabs,
|
|
4010
|
+
oa as LogicError,
|
|
4011
|
+
be as ModifierKeys,
|
|
4012
|
+
ol as SourceAppBadge,
|
|
4013
|
+
ge as TailwindBreakpoints,
|
|
4014
|
+
Il as ThrottleOrDebounce,
|
|
4015
|
+
ve as ToastNotificationType,
|
|
4016
|
+
ra as UninitializedResourceAccessError,
|
|
4017
|
+
He as UniqueFileTypeSpecifier,
|
|
4018
|
+
ua as UnsupportedEnvironmentError,
|
|
4019
|
+
je as UserAvatar,
|
|
4020
|
+
lo as UserAvatarEditable,
|
|
4021
|
+
no as UserAvatarGroup,
|
|
4022
|
+
Fa as ValidationHelpers,
|
|
4023
|
+
ze as clientOs,
|
|
4024
|
+
Ua as getKeyboardShortcutTitle,
|
|
4025
|
+
Wa as onKeyboardShortcut,
|
|
4026
|
+
Qe as prettyFileSize,
|
|
4027
|
+
qa as useFormCheckboxModel,
|
|
4028
|
+
ut as useFormSelectChildInternals,
|
|
4029
|
+
Xa as useOnBeforeWindowUnload,
|
|
4030
|
+
Bl as useResponsiveHorizontalDirectionCalculation,
|
|
4031
|
+
Sl as useWindowResizeHandler,
|
|
4032
|
+
it as useWrappingContainerHiddenCount,
|
|
4033
|
+
to as writableAsyncComputed
|
|
3581
4034
|
};
|
|
3582
4035
|
//# sourceMappingURL=lib.js.map
|