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