@illinois-grad/grad-vue 2.2.0 → 2.3.1

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.
@@ -1,2905 +0,0 @@
1
- import { defineComponent as A, useAttrs as qe, computed as I, createBlock as q, openBlock as i, resolveDynamicComponent as ve, mergeProps as le, unref as b, withCtx as j, renderSlot as H, mergeModels as R, useModel as N, useId as Z, ref as B, createElementBlock as c, normalizeClass as P, createCommentVNode as M, createElementVNode as n, toDisplayString as C, createTextVNode as W, onBeforeUnmount as fe, shallowRef as Ee, watch as X, toValue as xe, nextTick as Q, onMounted as ce, useTemplateRef as be, createVNode as Y, Transition as ye, normalizeStyle as de, Fragment as F, renderList as J, onBeforeMount as Pe, Teleport as Re, withDirectives as he, withModifiers as ue, vShow as Ze, inject as Fe, getCurrentInstance as He, watchEffect as Te, reactive as Ye, toRaw as Ke, useSlots as Ue, vModelCheckbox as Ae, normalizeProps as Qe, guardReactiveProps as Je } from "vue";
2
- import { toArray as Xe, unrefElement as et, tryOnScopeDispose as tt, useFocusWithin as lt, useDebounceFn as at, useClipboard as ot, useResizeObserver as ze } from "@vueuse/core";
3
- import { createFocusTrap as st } from "focus-trap";
4
- const ne = /* @__PURE__ */ A({
5
- __name: "GButton",
6
- props: {
7
- size: { default: "medium" },
8
- theme: { default: "primary" },
9
- outlined: { type: Boolean, default: !1 },
10
- text: { type: Boolean, default: !1 },
11
- to: { default: void 0 },
12
- component: { default: void 0 }
13
- },
14
- emits: [
15
- "click",
16
- "focus",
17
- "blur",
18
- "keydown",
19
- "keyup",
20
- "mousedown",
21
- "mouseup",
22
- "mouseenter",
23
- "mouseleave"
24
- ],
25
- setup(e) {
26
- const l = e, t = qe(), a = I(() => [
27
- "g-btn",
28
- `g-btn--${l.size}`,
29
- `g-btn--${l.theme}`,
30
- {
31
- "g-btn--outlined": l.outlined,
32
- "g-btn--text": l.text,
33
- "g-btn--primary": l.theme === "primary",
34
- "g-btn--accent": l.theme === "accent",
35
- "g-btn-has-text": l.text
36
- }
37
- ]);
38
- return (o, s) => (i(), q(ve(l.component ? l.component : "button"), le(b(t), {
39
- to: l.to,
40
- class: a.value,
41
- type: l.to ? void 0 : "button",
42
- onClick: s[0] || (s[0] = (r) => o.$emit("click", r)),
43
- onFocus: s[1] || (s[1] = (r) => o.$emit("focus", r)),
44
- onBlur: s[2] || (s[2] = (r) => o.$emit("blur", r)),
45
- onKeydown: s[3] || (s[3] = (r) => o.$emit("keydown", r)),
46
- onKeyup: s[4] || (s[4] = (r) => o.$emit("keyup", r)),
47
- onMousedown: s[5] || (s[5] = (r) => o.$emit("mousedown", r)),
48
- onMouseup: s[6] || (s[6] = (r) => o.$emit("mouseup", r)),
49
- onMouseenter: s[7] || (s[7] = (r) => o.$emit("mouseenter", r)),
50
- onMouseleave: s[8] || (s[8] = (r) => o.$emit("mouseleave", r))
51
- }), {
52
- default: j(() => [
53
- H(o.$slots, "default")
54
- ]),
55
- _: 3
56
- }, 16, ["to", "class", "type"]));
57
- }
58
- }), nt = ["for"], it = ["id"], rt = { class: "g-text-input-field-wrapper" }, ut = {
59
- key: 0,
60
- class: "g-text-input-prefix"
61
- }, dt = ["value", "placeholder", "disabled", "aria-invalid"], ct = {
62
- key: 1,
63
- class: "g-text-input-suffix"
64
- }, vt = ["id"], ft = /* @__PURE__ */ A({
65
- inheritAttrs: !1,
66
- __name: "GTextInput",
67
- props: /* @__PURE__ */ R({
68
- label: { default: void 0 },
69
- placeholder: { default: "" },
70
- disabled: { type: Boolean, default: !1 },
71
- error: { default: "" },
72
- instructions: { default: "" },
73
- prefix: { default: "" },
74
- suffix: { default: "" },
75
- debounce: { default: 100 }
76
- }, {
77
- modelValue: { type: String },
78
- modelModifiers: {}
79
- }),
80
- emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
81
- setup(e, { emit: l }) {
82
- const t = e, a = N(e, "modelValue"), o = Z(), s = l, r = B(a.value ?? "");
83
- let u = null;
84
- function d(g) {
85
- if (g !== a.value) {
86
- const L = a.value;
87
- a.value = g, s("change", {
88
- was: L,
89
- to: g
90
- });
91
- }
92
- }
93
- function v(g) {
94
- const L = g.target.value;
95
- r.value = L, u && clearTimeout(u), u = setTimeout(() => {
96
- d(r.value), u = null;
97
- }, t.debounce);
98
- }
99
- function f(g) {
100
- u && (clearTimeout(u), u = null), d(g.target.value);
101
- }
102
- function m(g) {
103
- u && (clearTimeout(u), u = null), setTimeout(() => {
104
- const L = g.target.value;
105
- d(L);
106
- }, 0);
107
- }
108
- function y(g) {
109
- (g.key === "PageUp" || g.key === "PageDown") && (u && (clearTimeout(u), u = null), d(g.target.value)), g.key === "Enter" && d(g.target.value);
110
- }
111
- return (g, L) => (i(), c("div", {
112
- class: P(["g-text-input-wrap", { "g-text-input-has-error": t.error }])
113
- }, [
114
- t.label ? (i(), c("label", {
115
- key: 0,
116
- for: g.$attrs.id || b(o),
117
- class: "g-text-input-label"
118
- }, C(t.label), 9, nt)) : M("", !0),
119
- g.$slots.instructions || e.instructions ? (i(), c("div", {
120
- key: 1,
121
- id: "instructions-" + b(o),
122
- class: "g-text-input-instructions"
123
- }, [
124
- H(g.$slots, "instructions", {}, () => [
125
- W(C(e.instructions), 1)
126
- ], !0)
127
- ], 8, it)) : M("", !0),
128
- n("div", rt, [
129
- t.prefix ? (i(), c("span", ut, C(t.prefix), 1)) : M("", !0),
130
- n("input", le({
131
- value: a.value,
132
- placeholder: t.placeholder,
133
- disabled: t.disabled,
134
- onInput: v,
135
- onBlur: f,
136
- onPaste: m,
137
- onKeydown: y,
138
- type: "text",
139
- class: "g-text-input"
140
- }, {
141
- ...g.$attrs,
142
- id: g.$attrs.id || b(o),
143
- "aria-describedby": g.$slots.instructions || e.instructions ? "instructions-" + b(o) : void 0,
144
- "aria-errormessage": t.error ? "error-message-" + b(o) : void 0
145
- }, {
146
- "aria-invalid": t.error ? "true" : "false"
147
- }), null, 16, dt),
148
- t.suffix ? (i(), c("span", ct, C(t.suffix), 1)) : M("", !0)
149
- ]),
150
- t.error ? (i(), c("div", {
151
- key: 2,
152
- class: "error-message",
153
- id: "error-message-" + b(o),
154
- role: "alert"
155
- }, [
156
- L[0] || (L[0] = n("svg", {
157
- class: "g-text-input-error-icon",
158
- xmlns: "http://www.w3.org/2000/svg",
159
- viewBox: "0 0 640 640"
160
- }, [
161
- n("path", {
162
- fill: "currentColor",
163
- d: "M320 64C334.7 64 348.2 72.1 355.2 85L571.2 485C577.9 497.4 577.6 512.4 570.4 524.5C563.2 536.6 550.1 544 536 544L104 544C89.9 544 76.8 536.6 69.6 524.5C62.4 512.4 62.1 497.4 68.8 485L284.8 85C291.8 72.1 305.3 64 320 64zM320 416C302.3 416 288 430.3 288 448C288 465.7 302.3 480 320 480C337.7 480 352 465.7 352 448C352 430.3 337.7 416 320 416zM320 224C301.8 224 287.3 239.5 288.6 257.7L296 361.7C296.9 374.2 307.4 384 319.9 384C332.5 384 342.9 374.3 343.8 361.7L351.2 257.7C352.5 239.5 338.1 224 319.8 224z"
164
- })
165
- ], -1)),
166
- W(" " + C(t.error), 1)
167
- ], 8, vt)) : M("", !0)
168
- ], 2));
169
- }
170
- }), D = (e, l) => {
171
- const t = e.__vccOpts || e;
172
- for (const [a, o] of l)
173
- t[a] = o;
174
- return t;
175
- }, Le = /* @__PURE__ */ D(ft, [["__scopeId", "data-v-018b538e"]]);
176
- function je() {
177
- window._g_overlay_stack_state || (window._g_overlay_stack_state = {
178
- stack: B([]),
179
- modalStack: B([]),
180
- scrollLockStack: B([]),
181
- updateBodyScrollLock() {
182
- if (typeof document < "u")
183
- if (t.value.length > 0) {
184
- const o = window.innerWidth - document.documentElement.clientWidth;
185
- document.body.classList.add("g-scroll-lock"), document.body.style.paddingRight = `${o}px`, document.body.style.setProperty("--g-scrollbar-width", `${o}px`);
186
- } else
187
- document.body.style.paddingRight = "0", document.body.classList.remove("g-scroll-lock"), document.body.style.removeProperty("--g-scrollbar-width");
188
- }
189
- });
190
- const { stack: e, modalStack: l, scrollLockStack: t, updateBodyScrollLock: a } = window._g_overlay_stack_state;
191
- return { stack: e, modalStack: l, scrollLockStack: t, updateBodyScrollLock: a };
192
- }
193
- function ke(e, l = !1, t = !1) {
194
- if (!document)
195
- return {};
196
- const { stack: a, modalStack: o, scrollLockStack: s, updateBodyScrollLock: r } = je(), u = l ? o : a;
197
- function d() {
198
- u.value.push(e), t && !s.value.includes(e) && (s.value.push(e), r());
199
- }
200
- function v() {
201
- const y = u.value.lastIndexOf(e);
202
- y !== -1 && u.value.splice(y, 1);
203
- const g = s.value.lastIndexOf(e);
204
- g !== -1 && (s.value.splice(g, 1), r());
205
- }
206
- const f = I(() => !l && o.value.length > 0 ? !1 : u.value.length > 0 && u.value[u.value.length - 1] === e), m = I(() => {
207
- const y = u.value.indexOf(e);
208
- return y === -1 ? 0 : (l ? 200 : 100) + y;
209
- });
210
- return fe(v), { push: d, pop: v, isTop: f, zIndex: m };
211
- }
212
- function bt() {
213
- if (!document)
214
- return {};
215
- const { stack: e, modalStack: l, scrollLockStack: t } = je(), a = I(() => l.value.length > 0), o = I(
216
- () => e.value.length > 0 || l.value.length > 0
217
- ), s = I(() => t.value.length > 0);
218
- return { hasModal: a, hasOverlay: o, hasScrollLock: s };
219
- }
220
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
221
- const gt = (e) => e != null;
222
- function pt(e, l = {}) {
223
- let t;
224
- const { immediate: a, ...o } = l, s = Ee(!1), r = Ee(!1), u = (m) => t && t.activate(m), d = (m) => t && t.deactivate(m), v = () => {
225
- t && (t.pause(), r.value = !0);
226
- }, f = () => {
227
- t && (t.unpause(), r.value = !1);
228
- };
229
- return X(I(() => Xe(xe(e)).map((m) => {
230
- const y = xe(m);
231
- return typeof y == "string" ? y : et(y);
232
- }).filter(gt)), (m) => {
233
- if (m.length)
234
- if (!t)
235
- t = st(m, {
236
- ...o,
237
- onActivate() {
238
- s.value = !0, l.onActivate && l.onActivate();
239
- },
240
- onDeactivate() {
241
- s.value = !1, l.onDeactivate && l.onDeactivate();
242
- }
243
- }), a && u();
244
- else {
245
- const y = t?.active;
246
- t?.updateContainerElements(m), !y && a && u();
247
- }
248
- }, { flush: "post" }), tt(() => d()), {
249
- hasFocus: s,
250
- isPaused: r,
251
- activate: u,
252
- deactivate: d,
253
- pause: v,
254
- unpause: f
255
- };
256
- }
257
- function Se(e, l, t = !1) {
258
- const a = B(!1), { activate: o, deactivate: s, pause: r, unpause: u } = pt(e, {
259
- immediate: !0,
260
- clickOutsideDeactivates: t,
261
- initialFocus: () => {
262
- if (a.value)
263
- return !1;
264
- const d = e.value?.querySelector("[popover-focus]");
265
- if (d)
266
- return d;
267
- const v = e.value?.querySelector("h2");
268
- if (v)
269
- return v;
270
- const f = e.value?.querySelector(
271
- "[aria-selected='true']"
272
- );
273
- if (f)
274
- return f;
275
- },
276
- onPostPause: () => a.value = !0,
277
- onPostUnpause: () => {
278
- Q(() => {
279
- a.value = !1;
280
- }).catch((d) => {
281
- console.error(d);
282
- });
283
- }
284
- });
285
- return X(l, (d) => {
286
- d ? Q(() => {
287
- u();
288
- }).catch((v) => {
289
- console.error(v);
290
- }) : r();
291
- }), { activate: o, deactivate: s, pause: r, unpause: u };
292
- }
293
- function Ie(e, l, t, a, o) {
294
- function s(u) {
295
- for (const d of e)
296
- if (d.value?.contains(u.target))
297
- return;
298
- a();
299
- }
300
- function r(u) {
301
- u.key === "Escape" && t.value && l.value && (u.preventDefault(), Q(a).catch((d) => {
302
- console.error(d);
303
- }));
304
- }
305
- ce(() => {
306
- document.addEventListener("mousedown", s), document.addEventListener("keydown", r);
307
- }), fe(() => {
308
- document.removeEventListener("mousedown", s), document.removeEventListener("keydown", r), o();
309
- });
310
- }
311
- function Ne(e, l, t, a) {
312
- const o = a?.gap ?? 8, s = a?.margin ?? 16, r = a?.preferAbove ?? !1;
313
- let u = !1, d = !1, v;
314
- r ? e.top - l.height - o > t.top + s ? (v = e.top - l.height - o, u = !0) : e.bottom + l.height + o <= t.bottom - s ? v = e.bottom + o : (v = t.top + s, d = !0) : e.bottom + l.height + o > t.bottom - s && e.top - l.height - o > t.top + s ? (v = e.top - l.height - o, u = !0) : e.bottom + l.height + o > t.bottom - s && e.top - l.height - o <= t.top + s ? (v = t.top + s, d = !0) : v = e.bottom + o;
315
- let f = e.left + (e.width - l.width) / 2;
316
- f < t.left + s && (f = t.left + s), f + l.width > t.right - s && (f = t.right - l.width - s), f < t.left + s && (f = t.left + s);
317
- const m = e.left + (e.width - l.width) / 2, y = f - m;
318
- return { top: v, left: f, xOffset: y, placedAbove: u, overlay: d };
319
- }
320
- const mt = { class: "g-popover-wrap" }, ht = ["id"], yt = ["aria-labelledby"], kt = /* @__PURE__ */ A({
321
- __name: "GPopover",
322
- props: /* @__PURE__ */ R({
323
- minimal: { type: Boolean, default: !1 }
324
- }, {
325
- modelValue: { type: Boolean, default: !1 },
326
- modelModifiers: {}
327
- }),
328
- emits: /* @__PURE__ */ R(["show", "hide"], ["update:modelValue"]),
329
- setup(e, { emit: l }) {
330
- const t = e, a = l, o = N(e, "modelValue"), s = be("triggerRef"), r = be("popoverRef"), u = Z(), { push: d, pop: v, isTop: f, zIndex: m } = ke(u), { activate: y, deactivate: g } = Se(r, f, !0);
331
- Ie([r, s], f, o, L, v), X(o, (T) => {
332
- T ? (Q(() => {
333
- Q(() => y());
334
- }), d(), a("show")) : (g(), v(), a("hide"));
335
- });
336
- function L() {
337
- o.value = !1;
338
- }
339
- function p() {
340
- o.value = !o.value;
341
- }
342
- const k = B({ top: 0, left: 0 }), $ = B({ left: "50%" }), O = B(!1), h = B(!1);
343
- let S = null;
344
- function K() {
345
- if (!s.value || !r.value)
346
- return;
347
- const T = s.value.getBoundingClientRect(), U = r.value.getBoundingClientRect(), z = window.innerWidth - document.documentElement.clientWidth, oe = window.innerWidth - z, ee = new DOMRect(0, 0, oe, window.innerHeight), { top: se, left: x, xOffset: E, placedAbove: w, overlay: G } = Ne(T, U, ee, {
348
- gap: t.minimal ? 0 : 8
349
- });
350
- k.value = { top: se, left: x }, $.value = {
351
- left: `${U.width / 2 - E}px`,
352
- top: w ? "auto" : void 0,
353
- bottom: w ? "-8px" : void 0
354
- }, O.value = w, h.value = G;
355
- }
356
- return X(o, (T) => {
357
- T ? Q(() => {
358
- K(), window.addEventListener("resize", K), r.value && (S && S.disconnect(), S = new ResizeObserver(
359
- () => K()
360
- ), S.observe(r.value));
361
- }) : (window.removeEventListener("resize", K), S && S.disconnect());
362
- }), fe(() => {
363
- window.removeEventListener("resize", K), S && S.disconnect();
364
- }), (T, U) => (i(), c("div", mt, [
365
- n("div", {
366
- ref_key: "triggerRef",
367
- ref: s,
368
- class: "g-popover-trigger",
369
- id: `${b(u)}-trigger`
370
- }, [
371
- H(T.$slots, "trigger", { toggle: p }, void 0, !0)
372
- ], 8, ht),
373
- Y(ye, {
374
- name: "g-popover-expand",
375
- appear: ""
376
- }, {
377
- default: j(() => [
378
- o.value ? (i(), c("div", {
379
- key: 0,
380
- ref_key: "popoverRef",
381
- ref: r,
382
- class: P({
383
- "g-popover": !0,
384
- "g-popover-above": O.value,
385
- "g-popover-below": !O.value,
386
- "g-popover-minimal": e.minimal
387
- }),
388
- role: "dialog",
389
- "aria-modal": "true",
390
- "aria-labelledby": `${b(u)}-trigger`,
391
- style: de({
392
- top: k.value.top + "px",
393
- left: k.value.left + "px",
394
- zIndex: b(m)
395
- })
396
- }, [
397
- !h.value && !e.minimal ? (i(), c("div", {
398
- key: 0,
399
- class: P(["g-popover-arrow", { "g-popover-arrow-above": O.value }]),
400
- style: de($.value),
401
- "aria-hidden": "true"
402
- }, null, 6)) : M("", !0),
403
- H(T.$slots, "default", {}, void 0, !0),
404
- e.minimal ? M("", !0) : (i(), c("button", {
405
- key: 1,
406
- class: "g-popover-close",
407
- type: "button",
408
- "aria-label": "Close popover",
409
- onClick: L
410
- }, [...U[0] || (U[0] = [
411
- n("svg", {
412
- class: "g-popover-close-icon",
413
- xmlns: "http://www.w3.org/2000/svg",
414
- viewBox: "0 0 51.26 51.26",
415
- "aria-hidden": "true"
416
- }, [
417
- n("path", {
418
- fill: "currentColor",
419
- d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
420
- })
421
- ], -1)
422
- ])]))
423
- ], 14, yt)) : M("", !0)
424
- ]),
425
- _: 3
426
- })
427
- ]));
428
- }
429
- }), Me = /* @__PURE__ */ D(kt, [["__scopeId", "data-v-9df8ca26"]]), wt = ["disabled"], $t = { class: "g-select-btn-legend" }, _t = { class: "g-select-btn-row" }, Ct = ["id", "name", "value", "checked", "disabled", "onChange"], xt = ["for"], Lt = /* @__PURE__ */ A({
430
- __name: "GSelectButton",
431
- props: /* @__PURE__ */ R({
432
- options: {},
433
- label: {},
434
- size: { default: "medium" },
435
- name: { default: void 0 },
436
- disabled: { type: Boolean, default: !1 }
437
- }, {
438
- modelValue: { default: () => "" },
439
- modelModifiers: {}
440
- }),
441
- emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
442
- setup(e, { emit: l }) {
443
- const t = e, a = l, o = N(e, "modelValue"), s = Z(), r = I(() => t.options.map((f) => typeof f == "string" ? { label: f, value: f } : f)), u = I(() => [
444
- "g-select-btn-group",
445
- `g-select-btn-group--${t.size}`
446
- ]), d = (f) => [
447
- "g-select-btn",
448
- f ? "g-select-btn--selected" : "",
449
- { "g-select-btn--disabled": t.disabled }
450
- ];
451
- function v(f) {
452
- !t.disabled && f !== o.value && (o.value = f, a("change", f));
453
- }
454
- return (f, m) => (i(), c("fieldset", {
455
- class: P(u.value),
456
- disabled: t.disabled
457
- }, [
458
- n("legend", $t, C(t.label), 1),
459
- n("div", _t, [
460
- (i(!0), c(F, null, J(r.value, (y, g) => (i(), c(F, {
461
- key: y.value
462
- }, [
463
- n("input", {
464
- class: "g-select-btn-radio",
465
- type: "radio",
466
- id: `${b(s)}-${y.value}`,
467
- name: t.name || b(s),
468
- value: y.value,
469
- checked: y.value === o.value,
470
- disabled: t.disabled,
471
- onChange: (L) => v(y.value)
472
- }, null, 40, Ct),
473
- n("label", {
474
- for: `${b(s)}-${y.value}`,
475
- class: P(d(y.value === o.value))
476
- }, C(y.label), 11, xt)
477
- ], 64))), 128))
478
- ])
479
- ], 10, wt));
480
- }
481
- }), St = /* @__PURE__ */ D(Lt, [["__scopeId", "data-v-308c6015"]]), It = ["width", "height"], Mt = ["cx", "cy", "r"], Bt = ["cx", "cy", "r", "stroke-dasharray", "stroke-dashoffset"], Vt = ["cx", "cy", "r"], ae = 4, Et = /* @__PURE__ */ A({
482
- __name: "GProgress",
483
- props: {
484
- label: { default: "Loading" },
485
- value: { default: void 0 },
486
- size: { default: "medium" }
487
- },
488
- setup(e) {
489
- const l = e, t = I(
490
- () => l.value && l.value >= 1 && l.value <= 100
491
- ), a = I(() => {
492
- switch (l.size) {
493
- case "tiny":
494
- return 9;
495
- case "small":
496
- return 12;
497
- case "large":
498
- return 24;
499
- default:
500
- return 18;
501
- }
502
- }), o = I(() => 2 * Math.PI * a.value), s = I(
503
- () => t.value ? l.value / 100 * o.value : 0
504
- ), r = I(
505
- () => t.value ? {
506
- role: "progressbar",
507
- "aria-valuenow": l.value,
508
- "aria-valuemin": 1,
509
- "aria-valuemax": 100,
510
- "aria-label": l.label
511
- } : {
512
- role: "status",
513
- "aria-label": l.label
514
- }
515
- );
516
- return (u, d) => (i(), c("span", le({ class: "g-progress" }, r.value), [
517
- (i(), c("svg", {
518
- width: a.value * 2 + ae,
519
- height: a.value * 2 + ae,
520
- class: P([
521
- "g-progress__svg",
522
- {
523
- "g-progress--determinate": t.value,
524
- "g-progress--indeterminate": !t.value
525
- }
526
- ]),
527
- focusable: "false",
528
- "aria-hidden": "true"
529
- }, [
530
- n("circle", {
531
- class: "g-progress__track",
532
- cx: a.value + ae / 2,
533
- cy: a.value + ae / 2,
534
- r: a.value,
535
- "stroke-width": ae,
536
- fill: "none"
537
- }, null, 8, Mt),
538
- t.value ? (i(), c("circle", {
539
- key: 0,
540
- class: "g-progress__value",
541
- cx: a.value + ae / 2,
542
- cy: a.value + ae / 2,
543
- r: a.value,
544
- "stroke-width": ae,
545
- fill: "none",
546
- "stroke-dasharray": o.value,
547
- "stroke-dashoffset": o.value - s.value,
548
- style: { transform: "rotate(-90deg)", "transform-origin": "center" }
549
- }, null, 8, Bt)) : (i(), c("circle", {
550
- key: 1,
551
- class: "g-progress__spinner",
552
- cx: a.value + ae / 2,
553
- cy: a.value + ae / 2,
554
- r: a.value,
555
- "stroke-width": ae,
556
- fill: "none"
557
- }, null, 8, Vt))
558
- ], 10, It))
559
- ], 16));
560
- }
561
- }), Tt = /* @__PURE__ */ D(Et, [["__scopeId", "data-v-7dccaf49"]]), At = ["id", "aria-labelledby", "aria-describedby"], zt = { class: "g-alertdialog-inner" }, Gt = ["id"], Ot = ["id"], Dt = { class: "g-alertdialog-actions" }, Pt = /* @__PURE__ */ A({
562
- __name: "GAlertDialog",
563
- props: {
564
- label: { default: "Confirmation" },
565
- buttonText: { default: "Continue" },
566
- buttonColor: { default: "primary" }
567
- },
568
- emits: ["cancel", "confirm"],
569
- setup(e, { emit: l }) {
570
- const t = e, a = l, o = B(null), s = B(!0), r = Z(), { pop: u, push: d, isTop: v, zIndex: f } = ke(r, !0, !0), { deactivate: m, activate: y } = Se(o, v);
571
- function g() {
572
- a("cancel");
573
- }
574
- return Ie([o], v, s, g, u), ce(() => {
575
- d(), y();
576
- }), Pe(() => {
577
- u(), m();
578
- }), (L, p) => (i(), q(Re, { to: "#modal-root" }, [
579
- Y(ye, {
580
- name: "g-fade",
581
- appear: ""
582
- }, {
583
- default: j(() => [
584
- n("div", {
585
- id: "alertdialog-" + b(r),
586
- class: "g-alertdialog",
587
- role: "alertdialog",
588
- "aria-modal": "true",
589
- "aria-labelledby": "alertdialog-label-" + b(r),
590
- "aria-describedby": "alertdialog-description-" + b(r),
591
- ref_key: "dialog",
592
- ref: o,
593
- style: de({ zIndex: b(f) })
594
- }, [
595
- n("div", zt, [
596
- n("h2", {
597
- id: "alertdialog-label-" + b(r),
598
- class: "g-alertdialog-label"
599
- }, C(t.label), 9, Gt),
600
- n("div", {
601
- id: "alertdialog-description-" + b(r),
602
- class: "g-alertdialog-content"
603
- }, [
604
- H(L.$slots, "default", {}, void 0, !0)
605
- ], 8, Ot),
606
- n("div", Dt, [
607
- Y(ne, {
608
- outlined: "",
609
- onClick: p[0] || (p[0] = (k) => a("cancel"))
610
- }, {
611
- default: j(() => [...p[2] || (p[2] = [
612
- W("Cancel", -1)
613
- ])]),
614
- _: 1
615
- }),
616
- Y(ne, {
617
- theme: t.buttonColor,
618
- onClick: p[1] || (p[1] = (k) => a("confirm"))
619
- }, {
620
- default: j(() => [
621
- W(C(t.buttonText), 1)
622
- ]),
623
- _: 1
624
- }, 8, ["theme"])
625
- ])
626
- ])
627
- ], 12, At)
628
- ]),
629
- _: 3
630
- })
631
- ]));
632
- }
633
- }), Bo = /* @__PURE__ */ D(Pt, [["__scopeId", "data-v-8bac6ffd"]]), Rt = ["id"], Ft = { class: "g-select-input-wrap" }, Ht = ["id"], Kt = ["value", "placeholder", "disabled", "aria-controls", "aria-expanded", "aria-activedescendant"], Ut = ["id", "aria-controls", "aria-expanded", "aria-activedescendant"], jt = ["id"], Nt = ["id", "aria-selected", "onClick"], Wt = {
634
- key: 1,
635
- "aria-live": "polite",
636
- class: "g-select-combo-option g-select-option g-select-no-results"
637
- }, qt = /* @__PURE__ */ A({
638
- __name: "GSelect",
639
- props: /* @__PURE__ */ R({
640
- options: {},
641
- label: {},
642
- hiddenLabel: { type: Boolean },
643
- placeholder: {},
644
- disabled: { type: Boolean, default: !1 },
645
- name: { default: void 0 },
646
- searchable: { type: Boolean, default: !1 },
647
- clearButton: { type: Boolean },
648
- compact: { type: Boolean, default: !1 }
649
- }, {
650
- modelValue: {},
651
- modelModifiers: {}
652
- }),
653
- emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
654
- setup(e, { emit: l }) {
655
- const t = e, a = l, o = N(e, "modelValue"), s = Z(), r = B(null), u = B(null), d = B(!1), v = B(0), f = B(!1), m = B(!1), { push: y, pop: g, isTop: L } = ke(s), p = B("below"), k = B(null), $ = I(() => {
656
- const _ = {};
657
- return k.value !== null && (_.maxHeight = `${k.value}px`), p.value === "above" ? (_.top = "auto", _.bottom = "100%") : (_.top = "100%", _.bottom = "auto"), _;
658
- });
659
- function O() {
660
- if (!d.value || !r.value)
661
- return;
662
- const _ = r.value.getBoundingClientRect(), V = window.innerHeight - _.bottom, te = _.top, re = u.value?.scrollHeight ?? 200, _e = Math.min(200, re), Ce = 8;
663
- if (V >= _e) {
664
- p.value = "below", k.value = Math.max(0, Math.floor(V - Ce));
665
- return;
666
- }
667
- if (V < _e && te > V) {
668
- p.value = "above", k.value = Math.max(0, Math.floor(te - Ce));
669
- return;
670
- }
671
- p.value = "below", k.value = Math.max(0, Math.floor(V - Ce));
672
- }
673
- let h = null;
674
- function S() {
675
- if (h)
676
- return;
677
- const _ = () => {
678
- O();
679
- };
680
- window.addEventListener("resize", _, { passive: !0 }), window.addEventListener("scroll", _, {
681
- passive: !0,
682
- capture: !0
683
- }), h = () => {
684
- window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0), h = null;
685
- };
686
- }
687
- function K() {
688
- h && h();
689
- }
690
- const T = I(() => t.options.map((_) => typeof _ == "string" ? { label: _, value: _ } : _)), U = B(""), z = I(() => {
691
- if (!t.searchable || !d.value || !U.value)
692
- return T.value;
693
- const _ = U.value.toLowerCase();
694
- return T.value.filter(
695
- (V) => V.label.toLowerCase().includes(_)
696
- );
697
- }), oe = I(() => z.value.findIndex((_) => _.value === o.value));
698
- X(
699
- () => o.value,
700
- (_) => {
701
- const V = z.value.findIndex((te) => te.value === _);
702
- V !== -1 && (v.value = V);
703
- }
704
- ), X(d, (_) => {
705
- _ ? y() : g();
706
- }), X(d, (_) => {
707
- _ ? (S(), Q(() => {
708
- O();
709
- })) : (K(), p.value = "below", k.value = null);
710
- });
711
- function ee() {
712
- if (!t.disabled && (d.value = !0, Q(() => {
713
- O();
714
- }), t.searchable)) {
715
- U.value = "";
716
- const _ = z.value.findIndex(
717
- (V) => V.value === o.value
718
- );
719
- v.value = _ !== -1 ? _ : 0, Q(() => {
720
- x.value && x.value.focus();
721
- });
722
- }
723
- }
724
- function se() {
725
- d.value = !1, t.searchable && (U.value = "");
726
- }
727
- fe(() => {
728
- K();
729
- });
730
- const x = B(null);
731
- function E(_) {
732
- if (!t.disabled && t.searchable) {
733
- if (m.value) {
734
- m.value = !1;
735
- return;
736
- }
737
- ee();
738
- }
739
- }
740
- function w(_) {
741
- if (!t.searchable) return;
742
- d.value || ee(), U.value = _.target.value;
743
- const V = z.value.findIndex(
744
- (te) => te.value === o.value
745
- );
746
- v.value = V !== -1 ? V : 0;
747
- }
748
- function G(_) {
749
- const V = _.relatedTarget;
750
- if (f.value) {
751
- f.value = !1;
752
- return;
753
- }
754
- V && u.value && u.value.contains(V) || (t.searchable && (U.value = ""), se());
755
- }
756
- function ie(_) {
757
- const V = z.value[_];
758
- V && V.value !== o.value && (o.value = V.value, a("change", V.value)), m.value = !0, se(), setTimeout(() => {
759
- m.value = !1;
760
- }, 100);
761
- }
762
- function we() {
763
- t.disabled || (d.value ? se() : ee());
764
- }
765
- function ge(_) {
766
- if (t.disabled)
767
- return;
768
- const V = z.value.length - 1;
769
- if (!d.value && ["ArrowDown", "ArrowUp", "Enter", " "].includes(_.key)) {
770
- _.preventDefault(), ee();
771
- return;
772
- }
773
- switch (_.key) {
774
- case "ArrowDown":
775
- _.preventDefault(), d.value ? (v.value = Math.min(V, v.value + 1), me()) : ee();
776
- break;
777
- case "ArrowUp":
778
- _.preventDefault(), d.value ? (v.value = Math.max(0, v.value - 1), me()) : ee();
779
- break;
780
- case "Home":
781
- _.preventDefault(), v.value = 0, me();
782
- break;
783
- case "End":
784
- _.preventDefault(), v.value = V, me();
785
- break;
786
- case "Enter":
787
- case " ":
788
- _.preventDefault(), d.value ? ie(v.value) : ee();
789
- break;
790
- case "Escape":
791
- L.value && (_.preventDefault(), setTimeout(() => {
792
- se();
793
- }, 0));
794
- break;
795
- }
796
- }
797
- function pe(_) {
798
- ie(_);
799
- }
800
- function $e() {
801
- f.value = !0;
802
- }
803
- function me() {
804
- Q(() => {
805
- const _ = document.getElementById(
806
- `${s}-option-${v.value}`
807
- );
808
- _ && _.scrollIntoView({ block: "nearest" });
809
- });
810
- }
811
- const Be = I(() => t.clearButton && o.value !== null && o.value !== void 0 && !t.disabled);
812
- function Ve() {
813
- t.disabled || (o.value = null, a("change", null), t.searchable && (U.value = ""));
814
- }
815
- return fe(() => {
816
- g();
817
- }), (_, V) => (i(), c("div", {
818
- class: P(["g-select-root g-select-combo", { "g-select-open": d.value, "g-select-compact": e.compact }])
819
- }, [
820
- e.hiddenLabel ? M("", !0) : (i(), c("div", {
821
- key: 0,
822
- id: b(s) + "-label",
823
- class: "g-select-combo-label g-select-label"
824
- }, C(t.label), 9, Rt)),
825
- n("div", Ft, [
826
- t.searchable ? (i(), c("div", {
827
- key: 0,
828
- class: "g-select-combo-input g-select-control",
829
- id: b(s)
830
- }, [
831
- n("input", le(
832
- {
833
- ref_key: "comboRef",
834
- ref: r,
835
- type: "text",
836
- name: "comboInput",
837
- class: ["g-select-search-input", { "g-select-clearable": e.clearButton }],
838
- value: d.value ? U.value : T.value[oe.value] ? T.value[oe.value].label : "",
839
- placeholder: d.value ? "" : e.placeholder,
840
- disabled: t.disabled,
841
- onFocus: E,
842
- onInput: w,
843
- onKeydown: ge,
844
- onBlur: G,
845
- "aria-autocomplete": "list",
846
- "aria-controls": b(s) + "-listbox",
847
- "aria-expanded": d.value ? "true" : "false",
848
- "aria-haspopup": "listbox",
849
- "aria-activedescendant": d.value ? b(s) + "-option-" + v.value : void 0
850
- },
851
- e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(s) + "-label" },
852
- {
853
- role: "combobox",
854
- autocomplete: "off"
855
- }
856
- ), null, 16, Kt),
857
- Be.value ? (i(), c("button", {
858
- key: 0,
859
- type: "button",
860
- class: "g-select-clear-btn",
861
- onClick: Ve
862
- }, [...V[0] || (V[0] = [
863
- n("svg", {
864
- role: "img",
865
- "aria-label": "Clear Selection",
866
- xmlns: "http://www.w3.org/2000/svg",
867
- viewBox: "0 0 51.26 51.26",
868
- width: "1.125em"
869
- }, [
870
- n("path", {
871
- fill: "currentColor",
872
- d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
873
- })
874
- ], -1)
875
- ])])) : M("", !0),
876
- V[1] || (V[1] = n("svg", {
877
- class: "g-select-caret",
878
- xmlns: "http://www.w3.org/2000/svg",
879
- viewBox: "0 0 51.26 51.26",
880
- "aria-hidden": "true",
881
- width: "1.125em"
882
- }, [
883
- n("path", {
884
- fill: "currentColor",
885
- d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
886
- })
887
- ], -1))
888
- ], 8, Ht)) : (i(), c("div", le(
889
- {
890
- key: 1,
891
- ref_key: "comboRef",
892
- ref: r,
893
- id: b(s),
894
- class: ["g-select-combo-button g-select-control", { "g-select-clearable": e.clearButton }],
895
- role: "combobox",
896
- "aria-controls": b(s) + "-listbox",
897
- "aria-expanded": d.value ? "true" : "false",
898
- "aria-haspopup": "listbox"
899
- },
900
- e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(s) + "-label" },
901
- {
902
- "aria-activedescendant": d.value ? b(s) + "-option-" + v.value : void 0,
903
- tabindex: "0",
904
- onClick: we,
905
- onKeydown: ge,
906
- onFocus: E,
907
- onBlur: G
908
- }
909
- ), [
910
- W(C(T.value[oe.value] ? T.value[oe.value].label : "") + " ", 1),
911
- Be.value ? (i(), c("button", {
912
- key: 0,
913
- type: "button",
914
- class: "g-select-clear-btn",
915
- onClick: ue(Ve, ["stop"])
916
- }, [...V[2] || (V[2] = [
917
- n("svg", {
918
- role: "img",
919
- "aria-label": "Clear Selection",
920
- xmlns: "http://www.w3.org/2000/svg",
921
- viewBox: "0 0 51.26 51.26",
922
- width: "1.125em"
923
- }, [
924
- n("path", {
925
- fill: "currentColor",
926
- d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
927
- })
928
- ], -1)
929
- ])])) : M("", !0),
930
- V[3] || (V[3] = n("svg", {
931
- class: "g-select-caret",
932
- xmlns: "http://www.w3.org/2000/svg",
933
- viewBox: "0 0 51.26 51.26",
934
- "aria-hidden": "true",
935
- width: "1.125em"
936
- }, [
937
- n("path", {
938
- fill: "currentColor",
939
- d: "M38.75 24.13a1.36 1.36 0 0 1 0 2.36l-12.44 7.18-12.43 7.18a1.36 1.36 0 0 1-2.05-1.18V11a1.36 1.36 0 0 1 2.05-1.18L26.31 17Z"
940
- })
941
- ], -1))
942
- ], 16, Ut)),
943
- he(n("div", le(
944
- {
945
- ref_key: "listboxRef",
946
- ref: u,
947
- class: ["g-select-combo-menu g-select-list", {
948
- "g-select-combo-menu--above": p.value === "above"
949
- }],
950
- style: $.value,
951
- role: "listbox",
952
- id: b(s) + "-listbox"
953
- },
954
- e.hiddenLabel ? { "aria-label": t.label } : { "aria-labelledby": b(s) + "-label" },
955
- { tabindex: "-1" }
956
- ), [
957
- z.value.length > 0 ? (i(!0), c(F, { key: 0 }, J(z.value, (te, re) => (i(), c("div", {
958
- key: te.value,
959
- id: b(s) + "-option-" + re,
960
- class: P(["g-select-combo-option g-select-option", {
961
- "g-select-option-current": re === v.value,
962
- "ilw-theme-blue": te.value === o.value
963
- }]),
964
- role: "option",
965
- "aria-selected": te.value === o.value ? "true" : "false",
966
- onMousedown: $e,
967
- onClick: (_e) => pe(re)
968
- }, [
969
- H(_.$slots, "option", {
970
- option: te,
971
- selected: te.value === o.value,
972
- index: re
973
- }, () => [
974
- W(C(te.label), 1)
975
- ], !0)
976
- ], 42, Nt))), 128)) : (i(), c("div", Wt, " No results found. "))
977
- ], 16, jt), [
978
- [Ze, d.value]
979
- ])
980
- ])
981
- ], 2));
982
- }
983
- }), We = /* @__PURE__ */ D(qt, [["__scopeId", "data-v-9eeba6a5"]]), Zt = ["aria-label"], Yt = ["placeholder", "value", "aria-expanded", "aria-controls", "aria-activedescendant"], Qt = {
984
- key: 0,
985
- class: "g-search-dropdown"
986
- }, Jt = {
987
- "aria-live": "polite",
988
- class: "g-search-result-count"
989
- }, Xt = ["id"], el = ["aria-label"], tl = { class: "g-search-group-label" }, ll = ["id", "onMousedown", "aria-selected"], al = ["id", "onMousedown", "aria-selected"], Vo = /* @__PURE__ */ A({
990
- __name: "GSearch",
991
- props: /* @__PURE__ */ R({
992
- results: {},
993
- placeholder: { default: "Search..." },
994
- label: { default: "Search" },
995
- auto: { type: Boolean, default: !0 },
996
- loading: { type: Boolean }
997
- }, {
998
- modelValue: { default: () => "" },
999
- modelModifiers: {}
1000
- }),
1001
- emits: /* @__PURE__ */ R(["select", "submit"], ["update:modelValue"]),
1002
- setup(e, { emit: l }) {
1003
- const t = N(e, "modelValue"), a = e, o = l, s = B(null), r = B(null), u = B(!0), d = B(-1), v = I(() => Array.isArray(a.results) && a.results.length && "items" in a.results[0] ? a.results.flatMap((S) => S.items) : a.results), f = I(() => v.value.length);
1004
- function m(S) {
1005
- const K = S.target.value;
1006
- t.value = K, a.auto && K.length > 1 && (u.value = !1);
1007
- }
1008
- function y() {
1009
- Q(() => {
1010
- const S = r.value?.querySelector('[aria-selected="true"]');
1011
- S && S.scrollIntoView({ block: "nearest" });
1012
- });
1013
- }
1014
- const { focused: g } = lt(s);
1015
- function L(S) {
1016
- const K = S.altKey;
1017
- if (S.key === "ArrowDown") {
1018
- if (!f.value)
1019
- return;
1020
- S.preventDefault(), u.value = !1, K || (d.value = (d.value + 1) % f.value, y());
1021
- } else if (S.key === "ArrowUp") {
1022
- if (!f.value)
1023
- return;
1024
- S.preventDefault(), u.value = !1, d.value = (d.value - 1 + f.value) % f.value, y();
1025
- } else if (S.key === "Enter")
1026
- u.value ? (o("submit", t.value), u.value = !1, S.preventDefault()) : p(v.value[d.value]);
1027
- else if (S.key === "Escape") {
1028
- if (!f.value)
1029
- return;
1030
- S.preventDefault(), $.value || (t.value = ""), u.value = !0, d.value = -1;
1031
- }
1032
- ["Backspace", "Delete", "Clear", "Undo"].includes(S.key) && (u.value = !0);
1033
- }
1034
- function p(S) {
1035
- o("select", S), t.value = "", u.value = !0, d.value = -1;
1036
- }
1037
- const k = I(() => !!a.loading), $ = I(() => g.value && !u.value), O = at(() => {
1038
- o("submit", t.value);
1039
- }, 300);
1040
- X(
1041
- () => t.value,
1042
- (S) => {
1043
- S ? a.auto && O() : d.value = -1;
1044
- }
1045
- );
1046
- const h = Z();
1047
- return (S, K) => (i(), c("div", {
1048
- class: "g-search",
1049
- role: "search",
1050
- "aria-label": a.label
1051
- }, [
1052
- n("form", {
1053
- class: "g-search-form",
1054
- onSubmit: K[0] || (K[0] = ue((T) => p(null), ["prevent"]))
1055
- }, [
1056
- n("input", {
1057
- ref_key: "inputRef",
1058
- ref: s,
1059
- class: "g-search-input",
1060
- name: "search",
1061
- type: "search",
1062
- placeholder: a.placeholder,
1063
- value: t.value,
1064
- onInput: m,
1065
- onKeydown: L,
1066
- role: "combobox",
1067
- "aria-expanded": $.value,
1068
- "aria-autocomplete": "list",
1069
- "aria-controls": `${b(h)}-list`,
1070
- "aria-activedescendant": d.value >= 0 ? "g-search-option-" + v.value[d.value].id : void 0
1071
- }, null, 40, Yt),
1072
- n("button", {
1073
- type: "submit",
1074
- class: "g-search-submit",
1075
- "aria-label": "Submit search",
1076
- onKeydown: L
1077
- }, [
1078
- k.value ? (i(), q(Tt, {
1079
- key: 0,
1080
- size: "tiny"
1081
- })) : M("", !0),
1082
- K[1] || (K[1] = n("svg", {
1083
- role: "img",
1084
- "aria-label": "Search",
1085
- xmlns: "http://www.w3.org/2000/svg",
1086
- viewBox: "0 0 51.26 51.26"
1087
- }, [
1088
- n("path", {
1089
- fill: "currentColor",
1090
- d: "M30 9.76A14.05 14.05 0 1 0 28.3 31l11.3 13a3.34 3.34 0 0 0 4.72-4.72L31.44 27.86A14.05 14.05 0 0 0 30 9.76ZM27.27 27a10.26 10.26 0 1 1 0-14.5 10.25 10.25 0 0 1 0 14.5Z"
1091
- })
1092
- ], -1))
1093
- ], 32)
1094
- ], 32),
1095
- $.value ? (i(), c("div", Qt, [
1096
- n("div", Jt, [
1097
- k.value ? M("", !0) : (i(), c(F, { key: 0 }, [
1098
- W(C(f.value) + " result" + C(f.value === 1 ? "" : "s"), 1)
1099
- ], 64))
1100
- ]),
1101
- n("div", {
1102
- role: "listbox",
1103
- id: `${b(h)}-list`,
1104
- ref_key: "listboxRef",
1105
- ref: r,
1106
- "aria-label": "Search results"
1107
- }, [
1108
- f.value > 0 && "items" in a.results[0] ? (i(!0), c(F, { key: 0 }, J(a.results, (T, U) => (i(), c("div", {
1109
- key: T.type,
1110
- class: "g-search-group",
1111
- role: "group",
1112
- "aria-label": T.label
1113
- }, [
1114
- H(S.$slots, "group", { group: T }, () => [
1115
- n("div", tl, C(T.label), 1)
1116
- ]),
1117
- (i(!0), c(F, null, J(T.items, (z, oe) => (i(), c("div", {
1118
- key: z.id,
1119
- id: "g-search-option-" + z.id,
1120
- class: P(["g-search-option", {
1121
- "g-search-option-active": v.value[d.value] && v.value[d.value].id === z.id
1122
- }]),
1123
- role: "option",
1124
- onMousedown: ue((ee) => p(z), ["prevent"]),
1125
- "aria-selected": v.value[d.value] && v.value[d.value].id === z.id
1126
- }, [
1127
- H(S.$slots, "option", { option: z }, () => [
1128
- W(C(z.title), 1)
1129
- ])
1130
- ], 42, ll))), 128))
1131
- ], 8, el))), 128)) : f.value > 0 ? (i(!0), c(F, { key: 1 }, J(v.value, (T, U) => (i(), c("div", {
1132
- key: T.id,
1133
- id: "g-search-option-" + T.id,
1134
- class: P(["g-search-option", {
1135
- "g-search-option-active": d.value === U
1136
- }]),
1137
- role: "option",
1138
- onMousedown: ue((z) => p(T), ["prevent"]),
1139
- "aria-selected": d.value === U
1140
- }, [
1141
- H(S.$slots, "option", { option: T }, () => [
1142
- W(C(T.title), 1)
1143
- ])
1144
- ], 42, al))), 128)) : M("", !0)
1145
- ], 8, Xt)
1146
- ])) : M("", !0)
1147
- ], 8, Zt));
1148
- }
1149
- }), ol = {
1150
- class: /* @__PURE__ */ P({
1151
- "g-app-header": !0
1152
- })
1153
- }, sl = { class: "g-app-header__brand" }, nl = {
1154
- class: "g-app-header__brand-text",
1155
- href: "/"
1156
- }, il = {
1157
- key: 0,
1158
- class: "g-app-header__block-i-container"
1159
- }, rl = { class: "g-app-header__title" }, ul = { class: "g-app-header__app-controls-wrap" }, dl = /* @__PURE__ */ A({
1160
- __name: "GAppHeader",
1161
- props: {
1162
- illinois: { type: Boolean, default: !1 },
1163
- brand: { default: "GRAD" }
1164
- },
1165
- setup(e) {
1166
- return (l, t) => (i(), c("header", ol, [
1167
- t[1] || (t[1] = n("div", { class: "g-app-header__background" }, [
1168
- n("div", { class: "g-app-header__background-pattern" }),
1169
- n("div", { class: "g-app-header__background-gradient" })
1170
- ], -1)),
1171
- n("div", sl, [
1172
- H(l.$slots, "left", {}, () => [
1173
- n("a", nl, C(e.brand), 1)
1174
- ], !0)
1175
- ]),
1176
- e.illinois ? (i(), c("div", il, [...t[0] || (t[0] = [
1177
- n("svg", {
1178
- class: "g-app-header__block-i",
1179
- role: "img",
1180
- width: "55",
1181
- viewBox: "0 0 55 79",
1182
- xmlns: "http://www.w3.org/2000/svg"
1183
- }, [
1184
- n("title", null, "Block I logo"),
1185
- n("path", {
1186
- class: "g-app-header__block-i-outline",
1187
- d: "M54.2 21.1V0H0v21.1h12v36.1H0v21.1h54.2V57.2h-12V21.1z"
1188
- }),
1189
- n("path", {
1190
- class: "g-app-header__block-i-fill",
1191
- d: "M42.1 18.1h9V3H3v15h9c1.7 0 3 1.3 3 3v36.1c0 1.7-1.3 3-3 3H3v15h48.1v-15h-9c-1.7 0-3-1.3-3-3v-36c0-1.7 1.4-3 3-3z"
1192
- })
1193
- ], -1)
1194
- ])])) : H(l.$slots, "icon", { key: 1 }, void 0, !0),
1195
- n("div", rl, [
1196
- H(l.$slots, "title", {}, void 0, !0)
1197
- ]),
1198
- n("div", ul, [
1199
- H(l.$slots, "app-controls", { class: "g-app-header__app-controls" }, void 0, !0)
1200
- ])
1201
- ]));
1202
- }
1203
- }), Eo = /* @__PURE__ */ D(dl, [["__scopeId", "data-v-5c3dd169"]]), cl = ["id"], vl = /* @__PURE__ */ A({
1204
- __name: "GSidebar",
1205
- props: {
1206
- backgroundColor: { default: "" },
1207
- backgroundImage: { default: "none" },
1208
- theme: { default: "dark" },
1209
- topOffset: { default: "" },
1210
- topOffsetVar: { default: "" },
1211
- width: { default: "300px" }
1212
- },
1213
- setup(e) {
1214
- const l = e, t = Fe(
1215
- "sidebar",
1216
- // This isn't required, so the default value just avoids compiler warnings
1217
- () => {
1218
- },
1219
- !0
1220
- ), a = I(() => l.backgroundImage ? l.backgroundImage : l.theme === "light" ? "none" : "url('https://gradcdn.blob.core.windows.net/public/sidebar-bg2.jpg')"), o = I(() => l.backgroundColor ? l.backgroundColor : l.theme === "light" ? "#f9f9f9" : "#030913"), s = I(() => l.topOffsetVar ? `var(${l.topOffsetVar})` : l.topOffset ? l.topOffset : "var(--g-toolbar-height)"), r = Z();
1221
- function u(d) {
1222
- d.key === "Escape" && t?.isCollapsible?.value && t?.open?.value && (t.open.value = !1, document.getElementById(`${t.id}-hamburger`)?.focus());
1223
- }
1224
- return (d, v) => (i(), c("div", {
1225
- ref: "sidebar-ref",
1226
- id: `${b(t)?.id ?? b(r)}-sidebar`,
1227
- class: P(["g-sidebar", [
1228
- `g-sidebar__${e.theme}`,
1229
- {
1230
- "g-sidebar--collapsible": b(t)?.isCollapsible?.value,
1231
- "g-sidebar--closed": !b(t)?.open?.value && b(t)?.isCollapsible?.value,
1232
- "g-sidebar--open": b(t)?.open?.value && b(t)?.isCollapsible?.value
1233
- }
1234
- ]]),
1235
- style: de({
1236
- backgroundImage: a.value,
1237
- backgroundColor: o.value,
1238
- "--g-sidebar-top-offset": s.value,
1239
- "--g-sidebar-width": e.width ?? "300px",
1240
- width: "var(--g-sidebar-width)"
1241
- }),
1242
- onKeydown: u
1243
- }, [
1244
- H(d.$slots, "default", {}, void 0, !0)
1245
- ], 46, cl));
1246
- }
1247
- }), To = /* @__PURE__ */ D(vl, [["__scopeId", "data-v-859b6ad5"]]), fl = ["id"], bl = { class: "g-sidebar-menu__list" }, gl = ["href", "aria-current", "onClick"], pl = /* @__PURE__ */ A({
1248
- __name: "GSidebarMenu",
1249
- props: /* @__PURE__ */ R({
1250
- title: {},
1251
- items: {},
1252
- offset: { default: 70 },
1253
- spy: { type: Boolean, default: !0 },
1254
- theme: { default: "light" },
1255
- compact: { type: Boolean, default: !1 }
1256
- }, {
1257
- modelValue: { default: null, type: String },
1258
- modelModifiers: {}
1259
- }),
1260
- emits: ["update:modelValue"],
1261
- setup(e) {
1262
- const l = e, t = N(e, "modelValue"), a = I(() => l.spy && t.value ? "#" + t.value : null), o = be("content");
1263
- ce(() => {
1264
- X(
1265
- t,
1266
- () => {
1267
- Q(() => {
1268
- const v = o.value?.querySelector(
1269
- ".g-sidebar-menu__is-active"
1270
- );
1271
- v && v.scrollIntoView({ block: "nearest" });
1272
- });
1273
- },
1274
- { immediate: !0 }
1275
- );
1276
- });
1277
- const s = He(), r = I(() => s?.appContext?.components?.RouterLink ?? null);
1278
- function u(v, f) {
1279
- if (!f.href || !f.href.startsWith("#"))
1280
- return;
1281
- const m = f.href.slice(1), y = document.getElementById(m)?.querySelector("h2, h3, h4, h5");
1282
- y && (v.preventDefault(), y.setAttribute("tabindex", "-1"), y.focus(), y.scrollIntoView({ block: "start" }), history.replaceState(null, "", f.href));
1283
- }
1284
- const d = Z();
1285
- return (v, f) => (i(), c("nav", le({
1286
- class: ["g-sidebar-menu", [
1287
- `g-sidebar-menu__${l.theme}`,
1288
- { "g-sidebar-menu--compact": l.compact }
1289
- ]]
1290
- }, {
1291
- "aria-labelledby": e.title ? b(d) : void 0,
1292
- "aria-label": e.title ? void 0 : "Sidebar Menu"
1293
- }), [
1294
- e.title ? (i(), c("h2", {
1295
- key: 0,
1296
- id: b(d),
1297
- class: "g-sidebar-menu__title"
1298
- }, C(e.title), 9, fl)) : M("", !0),
1299
- f[0] || (f[0] = n("div", { class: "g-sidebar-menu__divider" }, null, -1)),
1300
- n("div", {
1301
- class: "g-sidebar-menu__content",
1302
- ref_key: "content",
1303
- ref: o
1304
- }, [
1305
- n("ul", bl, [
1306
- (i(!0), c(F, null, J(e.items, (m) => (i(), c("li", {
1307
- key: m.href || m.to,
1308
- class: "g-sidebar-menu__item",
1309
- ref_for: !0,
1310
- ref: "listItems"
1311
- }, [
1312
- m.to && r.value ? (i(), q(ve(r.value), {
1313
- key: 0,
1314
- class: "g-sidebar-menu__link",
1315
- to: m.to
1316
- }, {
1317
- default: j(() => [
1318
- W(C(m.label), 1)
1319
- ]),
1320
- _: 2
1321
- }, 1032, ["to"])) : (i(), c("a", {
1322
- key: 1,
1323
- class: P(["g-sidebar-menu__link", {
1324
- "g-sidebar-menu__is-active": a.value === (m.href || "")
1325
- }]),
1326
- href: m.href || m.to || "#",
1327
- "aria-current": a.value === (m.href || "") ? "location" : void 0,
1328
- onClick: (y) => u(y, m)
1329
- }, C(m.label), 11, gl))
1330
- ]))), 128))
1331
- ])
1332
- ], 512)
1333
- ], 16));
1334
- }
1335
- }), Ao = /* @__PURE__ */ D(pl, [["__scopeId", "data-v-26c98caa"]]);
1336
- let ml = 1;
1337
- function hl(e, l) {
1338
- const t = document.createElement("div");
1339
- return t.className = "v-gtooltip", t.textContent = e, t.setAttribute("role", "tooltip"), t.setAttribute("id", l), t;
1340
- }
1341
- function Ge(e, l) {
1342
- const t = e.getBoundingClientRect(), a = l.getBoundingClientRect(), o = new DOMRect(window.scrollX, window.scrollY, window.innerWidth, window.innerHeight), { top: s, left: r, placedAbove: u } = Ne(t, a, o, {
1343
- gap: 8,
1344
- margin: 8,
1345
- preferAbove: !0
1346
- }), f = (t.left + t.width / 2 - r) / a.width * 100;
1347
- l.style.setProperty("--v-gtooltip-arrow-x", `${f}%`), l.classList.remove("v-gtooltip-bottom"), u || l.classList.add("v-gtooltip-bottom"), l.style.left = `${r}px`, l.style.top = `${s}px`, l.style.opacity = "1";
1348
- }
1349
- function yl(e) {
1350
- e.style.opacity = "0";
1351
- }
1352
- const kl = {
1353
- mounted(e, l) {
1354
- const t = B(null), a = B(!1), o = B(!1), s = B(l.value);
1355
- let r = null, u;
1356
- e.getAttribute("aria-describedby") ? u = e.getAttribute("aria-describedby") : (u = `v-gtooltip-${++ml}`, e.setAttribute("aria-describedby", u));
1357
- const d = () => {
1358
- t.value || (t.value = hl(s.value, u), e.parentNode ? e.parentNode.insertBefore(t.value, e.nextSibling) : document.body.appendChild(t.value), r = new ResizeObserver(() => {
1359
- t.value && (a.value || o.value) && Ge(e, t.value);
1360
- }), r.observe(t.value));
1361
- };
1362
- Te(() => {
1363
- t.value && (t.value.textContent = s.value);
1364
- }), Te(() => {
1365
- a.value || o.value ? (d(), t.value && Ge(e, t.value)) : t.value && (yl(t.value), setTimeout(() => {
1366
- e.dispatchEvent(new CustomEvent("tooltip-hide"));
1367
- }, 150));
1368
- });
1369
- const v = () => {
1370
- a.value = !0;
1371
- }, f = () => {
1372
- a.value = !1;
1373
- }, m = () => {
1374
- o.value = !0;
1375
- }, y = () => {
1376
- o.value = !1;
1377
- }, g = (L) => {
1378
- (L.key === "Escape" || L.key === "Esc") && (a.value = !1, o.value = !1);
1379
- };
1380
- e.addEventListener("mouseenter", v), e.addEventListener("mouseleave", f), e.addEventListener("focus", m), e.addEventListener("blur", y), e.addEventListener("keydown", g), d(), e._v_gtooltip = {
1381
- onMouseEnter: v,
1382
- onMouseLeave: f,
1383
- onFocus: m,
1384
- onBlur: y,
1385
- onKeyDown: g,
1386
- tooltip: t,
1387
- tooltipText: s,
1388
- isHovered: a,
1389
- isFocused: o,
1390
- resizeObserver: r,
1391
- tooltipId: u
1392
- };
1393
- },
1394
- updated(e, l) {
1395
- const t = e._v_gtooltip;
1396
- t && t.tooltipText && (t.tooltipText.value = l.value);
1397
- },
1398
- unmounted(e) {
1399
- const l = e._v_gtooltip;
1400
- l && l.tooltip && l.tooltip.value && (l.resizeObserver && l.resizeObserver.disconnect(), l.tooltip.value.remove(), l.tooltip.value = null), e.removeEventListener("mouseenter", l.onMouseEnter), e.removeEventListener("mouseleave", l.onMouseLeave), e.removeEventListener("focus", l.onFocus), e.removeEventListener("blur", l.onBlur), e.removeEventListener("keydown", l.onKeyDown), e.removeAttribute("aria-describedby");
1401
- }
1402
- }, wl = { class: "g-clipboard-text" }, $l = /* @__PURE__ */ A({
1403
- __name: "GClipboard",
1404
- props: {
1405
- text: {},
1406
- hideText: { type: Boolean },
1407
- copyLabel: {}
1408
- },
1409
- setup(e) {
1410
- const l = e, t = kl, { text: a, copy: o, copied: s, isSupported: r } = ot({
1411
- source: l.text
1412
- }), u = B(l.copyLabel ?? "Copy to clipboard"), d = () => {
1413
- r.value ? (o(), u.value = "Copied") : u.value = "Copy not supported";
1414
- }, v = () => {
1415
- u.value = l.copyLabel ?? "Copy to clipboard";
1416
- };
1417
- return (f, m) => (i(), c("div", wl, [
1418
- e.hideText ? M("", !0) : (i(), c(F, { key: 0 }, [
1419
- W(C(l.text), 1)
1420
- ], 64)),
1421
- he((i(), c("button", {
1422
- type: "button",
1423
- "aria-label": "Copy",
1424
- onClick: d,
1425
- onTooltipHide: v,
1426
- class: "g-clipboard-text-button"
1427
- }, [...m[0] || (m[0] = [
1428
- n("svg", {
1429
- class: "g-clipboard-svg",
1430
- xmlns: "http://www.w3.org/2000/svg",
1431
- viewBox: "0 0 640 640",
1432
- height: "1.125rem",
1433
- role: "none presentation"
1434
- }, [
1435
- n("path", {
1436
- fill: "currentColor",
1437
- d: "M480 400L288 400C279.2 400 272 392.8 272 384L272 128C272 119.2 279.2 112 288 112L421.5 112C425.7 112 429.8 113.7 432.8 116.7L491.3 175.2C494.3 178.2 496 182.3 496 186.5L496 384C496 392.8 488.8 400 480 400zM288 448L480 448C515.3 448 544 419.3 544 384L544 186.5C544 169.5 537.3 153.2 525.3 141.2L466.7 82.7C454.7 70.7 438.5 64 421.5 64L288 64C252.7 64 224 92.7 224 128L224 384C224 419.3 252.7 448 288 448zM160 192C124.7 192 96 220.7 96 256L96 512C96 547.3 124.7 576 160 576L352 576C387.3 576 416 547.3 416 512L416 496L368 496L368 512C368 520.8 360.8 528 352 528L160 528C151.2 528 144 520.8 144 512L144 256C144 247.2 151.2 240 160 240L176 240L176 192L160 192z"
1438
- })
1439
- ], -1)
1440
- ])], 32)), [
1441
- [b(t), u.value]
1442
- ])
1443
- ]));
1444
- }
1445
- }), zo = /* @__PURE__ */ D($l, [["__scopeId", "data-v-c74932aa"]]), _l = { class: "g-history-scroller-wrapper" }, Cl = {
1446
- key: 0,
1447
- class: "g-history-shadow g-history-shadow--top",
1448
- "aria-hidden": "true"
1449
- }, xl = {
1450
- key: 1,
1451
- class: "g-history-shadow g-history-shadow--bottom",
1452
- "aria-hidden": "true"
1453
- }, Ll = ["role", "aria-label"], Sl = /* @__PURE__ */ A({
1454
- __name: "GHistoryScroller",
1455
- props: {
1456
- label: {},
1457
- entries: { default: () => [] }
1458
- },
1459
- setup(e) {
1460
- const l = e, t = B(null), a = B(null), o = B(!0), s = B(!0);
1461
- async function r({ focusLast: v = !1 } = {}) {
1462
- if (t.value && (t.value.scrollTop = t.value.scrollHeight), v && a.value) {
1463
- const f = a.value.querySelectorAll(".g-history-entry");
1464
- if (f.length > 0) {
1465
- const m = f[f.length - 1];
1466
- await Q(), m.focus();
1467
- }
1468
- }
1469
- }
1470
- function u() {
1471
- if (!t.value) return;
1472
- const { scrollTop: v, scrollHeight: f, clientHeight: m } = t.value;
1473
- o.value = v + m >= f - 2, s.value = v <= 2;
1474
- }
1475
- ce(() => {
1476
- Q(r);
1477
- }), ze(t, () => {
1478
- o.value && r();
1479
- }), ze(a, () => {
1480
- o.value && r();
1481
- }), X(
1482
- () => l.entries,
1483
- async () => {
1484
- o.value && (await Q(), r());
1485
- }
1486
- );
1487
- const d = I(() => [...l.entries].reverse());
1488
- return (v, f) => (i(), c("div", _l, [
1489
- s.value ? M("", !0) : (i(), c("div", Cl)),
1490
- o.value ? M("", !0) : (i(), c("div", xl)),
1491
- n("div", {
1492
- ref_key: "scrollerRef",
1493
- ref: t,
1494
- class: "g-history-scroller",
1495
- role: e.label ? "log" : void 0,
1496
- "aria-label": e.label,
1497
- onScroll: u
1498
- }, [
1499
- Y(ne, {
1500
- class: P(["g-scroll-to-bottom-btn", { "scroll-to-bottom-btn--hidden": o.value }]),
1501
- size: "small",
1502
- type: "button",
1503
- onClick: f[0] || (f[0] = () => r({ focusLast: !0 })),
1504
- "aria-label": "Jump to Latest"
1505
- }, {
1506
- default: j(() => [...f[1] || (f[1] = [
1507
- n("svg", {
1508
- "aria-hidden": "true",
1509
- xmlns: "http://www.w3.org/2000/svg",
1510
- viewBox: "0 0 640 640",
1511
- height: "1.25rem"
1512
- }, [
1513
- n("path", {
1514
- fill: "currentColor",
1515
- d: "M303.5 569C312.9 578.4 328.1 578.4 337.4 569L505.4 401C514.8 391.6 514.8 376.4 505.4 367.1C496 357.8 480.8 357.7 471.5 367.1L344.5 494.1L344.5 88C344.5 74.7 333.8 64 320.5 64C307.2 64 296.5 74.7 296.5 88L296.5 494.1L169.5 367.1C160.1 357.7 144.9 357.7 135.6 367.1C126.3 376.5 126.2 391.7 135.6 401L303.6 569z"
1516
- })
1517
- ], -1)
1518
- ])]),
1519
- _: 1
1520
- }, 8, ["class"]),
1521
- n("div", {
1522
- role: "list",
1523
- ref_key: "contentRef",
1524
- ref: a,
1525
- class: "g-history-list"
1526
- }, [
1527
- (i(!0), c(F, null, J(d.value, (m) => (i(), c("div", {
1528
- role: "listitem",
1529
- key: m.id,
1530
- class: "g-history-entry",
1531
- tabindex: "-1"
1532
- }, [
1533
- H(v.$slots, "default", { entry: m }, void 0, !0)
1534
- ]))), 128))
1535
- ], 512)
1536
- ], 40, Ll)
1537
- ]));
1538
- }
1539
- }), Go = /* @__PURE__ */ D(Sl, [["__scopeId", "data-v-fa53fd7c"]]), Il = { class: "g-three-way-toggle-wrapper" }, Ml = { class: "g-three-way-toggle-control" }, Bl = ["id"], Vl = ["aria-labelledby", "aria-describedby", "disabled", "aria-invalid", "aria-errormessage"], El = { key: 0 }, Tl = { key: 1 }, Al = { key: 2 }, zl = ["for"], Gl = ["id", "name", "checked", "disabled"], Ol = ["for"], Dl = ["id", "name", "checked", "disabled"], Pl = ["for"], Rl = ["id", "name", "checked", "disabled"], Fl = ["id"], Hl = /* @__PURE__ */ A({
1540
- __name: "GThreeWayToggle",
1541
- props: /* @__PURE__ */ R({
1542
- label: {},
1543
- describedby: {},
1544
- error: {},
1545
- disabled: { type: Boolean }
1546
- }, {
1547
- modelValue: { type: [Boolean, null], default: () => null },
1548
- modelModifiers: {}
1549
- }),
1550
- emits: /* @__PURE__ */ R(["change"], ["update:modelValue"]),
1551
- setup(e, { emit: l }) {
1552
- const t = e, a = N(e, "modelValue"), o = l;
1553
- function s(p) {
1554
- const k = a.value;
1555
- a.value = p, p !== k && o("change", {
1556
- was: k,
1557
- to: p
1558
- });
1559
- }
1560
- function r(p) {
1561
- t.disabled || (a.value === p ? s(null) : s(p));
1562
- }
1563
- function u(p) {
1564
- t.disabled || a.value === p && s(null);
1565
- }
1566
- const d = Z(), v = I(() => `g-three-way-toggle-${d}`), f = Z(), m = Z(), y = Z(), g = I(() => a.value === !1 ? "g-left" : a.value === !0 ? "g-right" : "g-center");
1567
- function L(p) {
1568
- t.disabled || (p.key === "n" || p.key === "N" ? (s(!1), p.preventDefault()) : (p.key === "y" || p.key === "Y") && (s(!0), p.preventDefault()));
1569
- }
1570
- return (p, k) => (i(), c("div", Il, [
1571
- n("div", Ml, [
1572
- n("span", {
1573
- class: "g-label",
1574
- id: b(d)
1575
- }, [
1576
- H(p.$slots, "label", {}, () => [
1577
- W(C(e.label), 1)
1578
- ], !0)
1579
- ], 8, Bl),
1580
- n("fieldset", {
1581
- class: P(["g-three-way-toggle", { "g-has-error": e.error }]),
1582
- role: "radiogroup",
1583
- "aria-labelledby": b(d),
1584
- "aria-describedby": e.describedby,
1585
- disabled: e.disabled,
1586
- "aria-invalid": e.error ? "true" : void 0,
1587
- "aria-errormessage": e.error ? b(d) + "-error" : void 0
1588
- }, [
1589
- n("div", {
1590
- class: P(["g-toggle-track", [g.value, { "g-disabled": e.disabled }]])
1591
- }, [
1592
- n("span", {
1593
- class: P(["g-toggle-thumb", g.value]),
1594
- "aria-hidden": "true"
1595
- }, [
1596
- a.value === !1 ? (i(), c("span", El, "NO")) : a.value === !0 ? (i(), c("span", Tl, "YES")) : (i(), c("span", Al))
1597
- ], 2),
1598
- n("label", {
1599
- for: b(f),
1600
- class: "g-toggle-option g-left",
1601
- onClick: k[1] || (k[1] = ($) => u(!1)),
1602
- onKeydown: L
1603
- }, [
1604
- n("input", {
1605
- type: "radio",
1606
- id: b(f),
1607
- name: v.value,
1608
- checked: a.value === !1,
1609
- value: "false",
1610
- disabled: e.disabled,
1611
- onChange: k[0] || (k[0] = ($) => r(!1))
1612
- }, null, 40, Gl),
1613
- k[5] || (k[5] = n("span", { class: "ilw-sr-only" }, "No", -1))
1614
- ], 40, zl),
1615
- n("label", {
1616
- for: b(m),
1617
- class: "g-toggle-option g-center",
1618
- onKeydown: L
1619
- }, [
1620
- n("input", {
1621
- type: "radio",
1622
- id: b(m),
1623
- name: v.value,
1624
- checked: a.value === null,
1625
- disabled: e.disabled,
1626
- onChange: k[2] || (k[2] = ($) => r(null))
1627
- }, null, 40, Dl),
1628
- k[6] || (k[6] = n("span", { class: "ilw-sr-only" }, "Unset", -1))
1629
- ], 40, Ol),
1630
- n("label", {
1631
- for: b(y),
1632
- class: "g-toggle-option g-right",
1633
- onClick: k[4] || (k[4] = ($) => u(!0)),
1634
- onKeydown: L
1635
- }, [
1636
- n("input", {
1637
- type: "radio",
1638
- id: b(y),
1639
- name: v.value,
1640
- value: "true",
1641
- checked: a.value === !0,
1642
- disabled: e.disabled,
1643
- onChange: k[3] || (k[3] = ($) => r(!0))
1644
- }, null, 40, Rl),
1645
- k[7] || (k[7] = n("span", { class: "ilw-sr-only" }, "Yes", -1))
1646
- ], 40, Pl)
1647
- ], 2)
1648
- ], 10, Vl)
1649
- ]),
1650
- e.error ? (i(), c("div", {
1651
- key: 0,
1652
- id: `${b(d)}-error`,
1653
- class: "g-form-error",
1654
- role: "alert",
1655
- "aria-atomic": "true"
1656
- }, C(e.error), 9, Fl)) : M("", !0)
1657
- ]));
1658
- }
1659
- }), Oo = /* @__PURE__ */ D(Hl, [["__scopeId", "data-v-b154ee55"]]), Kl = {
1660
- ref: "tableBodyRef",
1661
- class: "efficient-table-body"
1662
- }, Ul = ["aria-rowindex"], jl = {
1663
- key: 0,
1664
- class: "table-group-checkbox"
1665
- }, Nl = ["colspan"], Wl = ["aria-rowindex", "onMousedown", "onClick"], ql = ["checked", "onClick", "aria-label", "name"], Zl = ["id"], Yl = {
1666
- key: 0,
1667
- class: "editable-cell"
1668
- }, Ql = {
1669
- key: 0,
1670
- class: "cell-prefix"
1671
- }, Jl = ["value", "onChange", "aria-labelledby", "aria-invalid", "name"], Xl = ["value"], ea = ["value", "onInput", "aria-labelledby", "aria-invalid", "aria-errormessage", "name"], ta = {
1672
- key: 3,
1673
- class: "cell-suffix"
1674
- }, la = ["id"], aa = /* @__PURE__ */ A({
1675
- __name: "GTableBody",
1676
- props: {
1677
- data: {},
1678
- groupBy: {},
1679
- columns: {},
1680
- groupRender: { type: Function },
1681
- rowClickable: { type: Boolean },
1682
- rowClass: { type: Function },
1683
- startIndex: {},
1684
- bulkSelectionEnabled: { type: Boolean },
1685
- selectedRows: {},
1686
- tableId: {},
1687
- changeTracker: {}
1688
- },
1689
- emits: ["row-click", "toggle-row", "cell-change"],
1690
- setup(e, { emit: l }) {
1691
- const t = e, a = l;
1692
- function o(p, k) {
1693
- t.bulkSelectionEnabled && p.shiftKey && !p.target.closest("a,button,[tabindex],input") && p.preventDefault();
1694
- }
1695
- function s(p, k) {
1696
- if (!t.rowClickable && !t.bulkSelectionEnabled || p.target.closest("a,button,[tabindex],input"))
1697
- return;
1698
- const $ = p.target.closest(
1699
- "tr"
1700
- );
1701
- if ($) {
1702
- if (t.bulkSelectionEnabled)
1703
- $.querySelector(
1704
- "input[type=checkbox]"
1705
- ) && u(k, p.shiftKey);
1706
- else if (t.rowClickable) {
1707
- const h = $.querySelector("a[href]")?.getAttribute("href");
1708
- h && a("row-click", h);
1709
- }
1710
- }
1711
- }
1712
- function r(p) {
1713
- return t.selectedRows?.includes(p) ?? !1;
1714
- }
1715
- function u(p, k = !1) {
1716
- a("toggle-row", p, k);
1717
- }
1718
- function d(p, k, $) {
1719
- const h = p.target.value;
1720
- a("cell-change", { row: k, column: $, value: h });
1721
- }
1722
- function v(p, k) {
1723
- const $ = `${t.tableId}-th-${String(k.key)}`;
1724
- return k.editable?.labelKey ? `${`${t.tableId}-td-${p.key}-${k.editable.labelKey}`} ${$} ` : $;
1725
- }
1726
- const f = I(
1727
- () => {
1728
- for (const p of t.columns)
1729
- if (p.editable?.labelKey)
1730
- return p.editable.labelKey;
1731
- }
1732
- );
1733
- function m(p) {
1734
- return p.key === f.value;
1735
- }
1736
- function y(p, k) {
1737
- return t.changeTracker ? t.changeTracker.hasChange(p.key, k.key) : !1;
1738
- }
1739
- function g(p, k) {
1740
- return t.changeTracker ? t.changeTracker.hasError(p.key, k.key) : !1;
1741
- }
1742
- function L(p, k) {
1743
- if (t.changeTracker)
1744
- return t.changeTracker.getError(p.key, k.key);
1745
- }
1746
- return (p, k) => (i(), c("tbody", Kl, [
1747
- (i(!0), c(F, null, J(e.data, ($, O) => (i(), c(F, {
1748
- key: $.key
1749
- }, [
1750
- e.groupBy && (O === 0 || $[e.groupBy] !== e.data[O - 1][e.groupBy]) ? (i(), c("tr", {
1751
- key: 0,
1752
- "aria-rowindex": e.startIndex + O + 2
1753
- }, [
1754
- e.bulkSelectionEnabled ? (i(), c("td", jl)) : M("", !0),
1755
- n("td", {
1756
- colspan: e.columns.length,
1757
- class: "table-group-row"
1758
- }, [
1759
- e.groupRender ? (i(), q(ve(e.groupRender($[e.groupBy], $)), { key: 0 })) : (i(), c(F, { key: 1 }, [
1760
- W(C($[e.groupBy]), 1)
1761
- ], 64))
1762
- ], 8, Nl)
1763
- ], 8, Ul)) : M("", !0),
1764
- n("tr", {
1765
- class: P([
1766
- "efficient-table-row",
1767
- {
1768
- "row-striped": O % 2 === 1,
1769
- "row-clickable": e.rowClickable || e.bulkSelectionEnabled
1770
- },
1771
- e.rowClass ? e.rowClass($) : void 0
1772
- ]),
1773
- "aria-rowindex": e.startIndex + O + 2,
1774
- onMousedown: (h) => o(h, $.key),
1775
- onClick: (h) => s(h, $.key)
1776
- }, [
1777
- e.bulkSelectionEnabled ? (i(), c("td", {
1778
- key: 0,
1779
- class: "td-checkbox",
1780
- onClick: k[0] || (k[0] = ue(() => {
1781
- }, ["stop"]))
1782
- }, [
1783
- n("input", {
1784
- type: "checkbox",
1785
- checked: r($.key),
1786
- onClick: (h) => u($.key, h.shiftKey),
1787
- "aria-label": `Select row ${$.key}`,
1788
- name: `row-${$.key}-checkbox`,
1789
- class: "g-bulk-select-checkbox"
1790
- }, null, 8, ql)
1791
- ])) : M("", !0),
1792
- (i(!0), c(F, null, J(e.columns, (h) => (i(), c("td", {
1793
- key: h.key,
1794
- id: m(h) ? `${e.tableId}-td-${$.key}-${String(h.key)}` : void 0,
1795
- class: P([
1796
- h.editable ? "editable-td" : "",
1797
- y($, h) ? "g-cell-changed" : "",
1798
- g($, h) ? "g-cell-error" : "",
1799
- typeof h.tdClass == "function" ? h.tdClass($) : h.tdClass
1800
- ])
1801
- }, [
1802
- h.editable ? (i(), c("div", Yl, [
1803
- h.editable.prefix ? (i(), c("span", Ql, C(h.editable.prefix), 1)) : M("", !0),
1804
- h.editable.type === "select" ? (i(), c("select", {
1805
- key: 1,
1806
- value: $[h.key],
1807
- onChange: (S) => d(S, $, h),
1808
- "aria-labelledby": v($, h),
1809
- "aria-invalid": g($, h),
1810
- name: `row-${$.key}-${String(h.key)}-select`,
1811
- class: "editable-input editable-select"
1812
- }, [
1813
- (i(!0), c(F, null, J(h.editable.options, (S) => (i(), c("option", {
1814
- key: S.value,
1815
- value: S.value
1816
- }, C(S.label), 9, Xl))), 128))
1817
- ], 40, Jl)) : (i(), c("input", le({
1818
- key: 2,
1819
- value: $[h.key]
1820
- }, { ref_for: !0 }, h.editable.inputAttributes, {
1821
- onInput: (S) => d(S, $, h),
1822
- "aria-labelledby": v($, h),
1823
- "aria-invalid": g($, h),
1824
- "aria-errormessage": g($, h) ? `${e.tableId}-error-${$.key}-${String(h.key)}` : void 0,
1825
- name: `row-${$.key}-${String(h.key)}-input`,
1826
- class: "editable-input",
1827
- style: {
1828
- paddingLeft: h.editable.prefix ? "1.5rem" : void 0,
1829
- paddingRight: h.editable.suffix ? "2rem" : void 0
1830
- }
1831
- }), null, 16, ea)),
1832
- h.editable.suffix ? (i(), c("span", ta, C(h.editable.suffix), 1)) : M("", !0)
1833
- ])) : h.display ? (i(), q(ve(h.display($)), { key: 1 })) : (i(), c(F, { key: 2 }, [
1834
- W(C($[h.key]), 1)
1835
- ], 64)),
1836
- g($, h) ? (i(), c("div", {
1837
- key: 3,
1838
- role: "alert",
1839
- class: "g-cell-error-message",
1840
- id: `${e.tableId}-error-${$.key}-${String(h.key)}`
1841
- }, C(L($, h)), 9, la)) : M("", !0)
1842
- ], 10, Zl))), 128))
1843
- ], 42, Wl)
1844
- ], 64))), 128))
1845
- ], 512));
1846
- }
1847
- });
1848
- function Oe(e) {
1849
- if (!(Array.isArray(e) && e.length === 0) && !(e === null || e === !1 || e === ""))
1850
- return e;
1851
- }
1852
- function Do(e) {
1853
- return Object.fromEntries(
1854
- Object.entries(e).filter(([l, t]) => t && (!Array.isArray(t) || t.length > 0))
1855
- );
1856
- }
1857
- function Po(e) {
1858
- if (e != null)
1859
- return Array.isArray(e) ? e.filter(
1860
- (l) => l != null
1861
- ) : [e];
1862
- }
1863
- function Ro(e) {
1864
- let l = {};
1865
- for (let [t, a] of Object.entries(Ke(e)))
1866
- Array.isArray(a) ? a.length > 0 && (l[t] = a) : a === !0 ? l[t] = "true" : l[t] = a || void 0;
1867
- return l;
1868
- }
1869
- function oa(e) {
1870
- const l = {};
1871
- return Object.keys(e).forEach((t) => {
1872
- const a = e[t];
1873
- a != null && a !== "" && a !== !1 && (Array.isArray(a) ? a.length > 0 && (l[t] = a.map((o) => String(o))) : l[t] = String(a));
1874
- }), l;
1875
- }
1876
- function sa(e, l = {}) {
1877
- const t = Ye(
1878
- Object.fromEntries(
1879
- Object.entries(e).map(([u, d]) => [u, d])
1880
- )
1881
- ), a = l.syncWith;
1882
- if (a) {
1883
- if (a.value) {
1884
- const u = xe(a);
1885
- Object.keys(e).forEach((d) => {
1886
- if (u[d] !== void 0) {
1887
- const v = u[d];
1888
- typeof v == "string" && (v.includes(",") ? t[d] = v.split(",") : t[d] = v);
1889
- }
1890
- });
1891
- }
1892
- X(
1893
- t,
1894
- (u) => {
1895
- a.value = oa(u);
1896
- },
1897
- { deep: !0 }
1898
- );
1899
- }
1900
- const o = I(() => {
1901
- for (const u of Object.keys(e))
1902
- if (Oe(t[u]))
1903
- return !0;
1904
- return !1;
1905
- }), s = () => {
1906
- Object.keys(t).forEach((u) => {
1907
- t[u] = void 0;
1908
- });
1909
- }, r = I(() => {
1910
- const u = {};
1911
- for (const d of Object.keys(e))
1912
- u[d] = !!Oe(t[d]);
1913
- return u;
1914
- });
1915
- return {
1916
- filters: t,
1917
- isFiltered: o,
1918
- clearFilters: s,
1919
- filteredColumns: r
1920
- };
1921
- }
1922
- const na = { class: "g-table-outer-wrap" }, ia = {
1923
- key: 0,
1924
- class: "g-table-controls"
1925
- }, ra = { class: "g-clear-filters-wrap" }, ua = {
1926
- key: 0,
1927
- class: "pagination"
1928
- }, da = { class: "g-result-count" }, ca = ["aria-label", "aria-rowcount"], va = { class: "g-table-head" }, fa = { "aria-rowindex": "1" }, ba = {
1929
- key: 0,
1930
- scope: "col",
1931
- class: "g-th g-th-checkbox"
1932
- }, ga = ["checked", "indeterminate", "aria-label"], pa = ["id", "aria-sort"], ma = { class: "th-inner" }, ha = ["onClick"], ya = {
1933
- key: 0,
1934
- class: "sort-indicator"
1935
- }, ka = ["aria-label"], wa = {
1936
- key: 1,
1937
- class: "g-column-head"
1938
- }, $a = ["onClick", "aria-label"], _a = { key: 1 }, Ca = { class: "g-filter-toggle" }, xa = ["onUpdate:modelValue", "id", "aria-describedby"], La = ["for"], Sa = ["id"], Ia = {
1939
- key: 2,
1940
- class: "g-multi-select"
1941
- }, Ma = ["onUpdate:modelValue", "id", "value"], Ba = ["for"], Va = {
1942
- key: 1,
1943
- class: "g-bulk-actions-toolbar"
1944
- }, Ea = { class: "g-selected-count" }, Ta = { class: "g-bulk-actions" }, Aa = /* @__PURE__ */ A({
1945
- __name: "GTable",
1946
- props: /* @__PURE__ */ R({
1947
- label: {},
1948
- data: {},
1949
- columns: {},
1950
- resultCount: {},
1951
- groupBy: {},
1952
- filtering: {},
1953
- groupRender: {},
1954
- rowClickable: { type: Boolean },
1955
- rowClass: {},
1956
- startIndex: {},
1957
- bulkSelectionEnabled: { type: Boolean, default: !1 },
1958
- bulkActions: { default: () => [] },
1959
- changeTracker: {},
1960
- showPagination: { type: Boolean, default: !1 }
1961
- }, {
1962
- sortField: {},
1963
- sortFieldModifiers: {},
1964
- sortOrder: {},
1965
- sortOrderModifiers: {},
1966
- filter: {
1967
- default: () => ({})
1968
- },
1969
- filterModifiers: {},
1970
- selectedRows: {
1971
- default: () => []
1972
- },
1973
- selectedRowsModifiers: {}
1974
- }),
1975
- emits: /* @__PURE__ */ R(["row-click", "bulk-action", "cell-change"], ["update:sortField", "update:sortOrder", "update:filter", "update:selectedRows"]),
1976
- setup(e, { emit: l }) {
1977
- const t = N(e, "sortField"), a = N(e, "sortOrder"), o = N(e, "filter"), s = N(e, "selectedRows"), r = e, u = l;
1978
- function d(x) {
1979
- x.sortable && (t.value === x.key ? a.value === 1 ? a.value = -1 : a.value === -1 && (t.value = void 0, a.value = 1) : (t.value = x.key, a.value = 1));
1980
- }
1981
- let v = r.filtering;
1982
- v || (v = sa({}));
1983
- const { filters: f, filteredColumns: m, isFiltered: y, clearFilters: g } = v, L = I(() => r.data.map((x) => x.key)), p = I(() => s.value.filter((x) => L.value.includes(x))), k = I(() => !r.bulkSelectionEnabled || r.data.length === 0 ? !1 : p.value.length === L.value.length), $ = I(() => !r.bulkSelectionEnabled || r.data.length === 0 ? !1 : p.value.length > 0 && p.value.length < L.value.length), O = B(null);
1984
- function h() {
1985
- if (k.value)
1986
- s.value = s.value.filter(
1987
- (x) => !L.value.includes(x)
1988
- );
1989
- else {
1990
- const x = new Set(s.value);
1991
- L.value.forEach((E) => x.add(E)), s.value = Array.from(x);
1992
- }
1993
- }
1994
- function S(x, E = !1) {
1995
- if (E && O.value) {
1996
- const w = L.value.indexOf(O.value), G = L.value.indexOf(x);
1997
- if (w !== -1 && G !== -1) {
1998
- const ie = Math.min(w, G), we = Math.max(w, G), ge = L.value.slice(ie, we + 1), pe = new Set(s.value);
1999
- ge.forEach(($e) => pe.add($e)), s.value = Array.from(pe);
2000
- }
2001
- } else
2002
- s.value.includes(x) ? s.value = s.value.filter(
2003
- (w) => w !== x
2004
- ) : s.value = [...s.value, x];
2005
- O.value = x;
2006
- }
2007
- function K(x) {
2008
- u("row-click", x);
2009
- }
2010
- function T(x) {
2011
- u("bulk-action", x, s.value);
2012
- }
2013
- function U(x) {
2014
- let E = x.value, w = Ke(x.row[x.column.key]);
2015
- x.column.editable?.inputAttributes?.type === "number" && (E = x.value === "" ? null : Number(x.value)), x.row[x.column.key] = E;
2016
- const G = {
2017
- row: x.row,
2018
- column: x.column,
2019
- value: E,
2020
- previousValue: w
2021
- };
2022
- u("cell-change", G);
2023
- }
2024
- const z = Z(), oe = Ue(), ee = I(() => r.showPagination ? !0 : !!oe.pagination), se = I(() => !!(y.value || ee.value));
2025
- return ce(() => {
2026
- r.rowClickable && r.bulkSelectionEnabled && console.warn(
2027
- "GTable: rowClickable and bulkSelectionEnabled cannot be used together. rowClickable will be ignored."
2028
- );
2029
- for (const x of r.columns)
2030
- if (x.editable && x.display && console.warn(
2031
- `GTable: Column "${String(x.key)}" has both 'editable' and 'display' configured. 'display' will be ignored.`
2032
- ), x.filter && x.filter.type === "multi-select" && !Array.isArray(o.value[x.key])) {
2033
- let E = o.value[x.key];
2034
- o.value[x.key] = E ? [E] : [];
2035
- }
2036
- }), X(
2037
- () => r.columns,
2038
- (x) => {
2039
- for (const E of x)
2040
- if (E.filter && E.filter.type === "multi-select" && !Array.isArray(o.value[E.key])) {
2041
- let w = o.value[E.key];
2042
- o.value[E.key] = w ? [w] : [];
2043
- }
2044
- },
2045
- { immediate: !0 }
2046
- ), (x, E) => (i(), c("div", na, [
2047
- se.value ? (i(), c("div", ia, [
2048
- n("div", ra, [
2049
- b(y) ? (i(), q(ne, {
2050
- key: 0,
2051
- outlined: "",
2052
- size: "small",
2053
- class: "clear-filters",
2054
- onClick: b(g)
2055
- }, {
2056
- default: j(() => [...E[0] || (E[0] = [
2057
- n("svg", {
2058
- xmlns: "http://www.w3.org/2000/svg",
2059
- viewBox: "0 0 51.26 51.26",
2060
- height: "1em",
2061
- "aria-hidden": "true"
2062
- }, [
2063
- n("path", {
2064
- fill: "currentColor",
2065
- d: "m37.84 32.94-7.63-7.63 7.63-7.63a3.24 3.24 0 0 0-4.58-4.58l-7.63 7.63L18 13.1a3.24 3.24 0 0 0-4.58 4.58L21 25.31l-7.62 7.63A3.24 3.24 0 1 0 18 37.52l7.63-7.63 7.63 7.63a3.24 3.24 0 0 0 4.58-4.58Z"
2066
- })
2067
- ], -1),
2068
- n("span", { class: "g-clear-filters-text" }, " Clear Filters ", -1)
2069
- ])]),
2070
- _: 1
2071
- }, 8, ["onClick"])) : M("", !0)
2072
- ]),
2073
- ee.value ? (i(), c("div", ua, [
2074
- H(x.$slots, "pagination", {}, void 0, !0)
2075
- ])) : M("", !0),
2076
- n("span", da, C(r.resultCount || e.data.length) + " results", 1)
2077
- ])) : M("", !0),
2078
- n("table", {
2079
- class: "g-table",
2080
- ref: "tableRef",
2081
- "aria-label": e.label,
2082
- "aria-rowcount": r.resultCount || e.data.length
2083
- }, [
2084
- n("thead", va, [
2085
- n("tr", fa, [
2086
- e.bulkSelectionEnabled ? (i(), c("th", ba, [
2087
- n("input", {
2088
- type: "checkbox",
2089
- checked: k.value,
2090
- indeterminate: $.value,
2091
- onChange: h,
2092
- "aria-label": k.value ? "Deselect all rows" : "Select all rows",
2093
- class: "g-bulk-select-checkbox"
2094
- }, null, 40, ga)
2095
- ])) : M("", !0),
2096
- (i(!0), c(F, null, J(e.columns, (w) => (i(), c("th", {
2097
- key: w.key,
2098
- id: `${b(z)}-th-${String(w.key)}`,
2099
- "aria-sort": t.value === w.key ? a.value === 1 ? "ascending" : "descending" : "none",
2100
- class: P([
2101
- "g-th",
2102
- { sorted: t.value === w.key },
2103
- { filtered: b(m)[w.key] }
2104
- ]),
2105
- scope: "col"
2106
- }, [
2107
- n("div", ma, [
2108
- w.sortable ? (i(), c("button", {
2109
- key: 0,
2110
- type: "button",
2111
- class: "g-column-head",
2112
- onClick: (G) => d(w)
2113
- }, [
2114
- W(C(w.label) + " ", 1),
2115
- t.value === w.key ? (i(), c("span", ya, [
2116
- (i(), c("svg", {
2117
- xmlns: "http://www.w3.org/2000/svg",
2118
- viewBox: "0 0 640 640",
2119
- height: "1.5em",
2120
- role: "img",
2121
- "aria-label": a.value === 1 ? "Sorted ascending" : "Sorted descending",
2122
- style: de({
2123
- transform: `rotate(${a.value === 1 ? 0 : 180}deg)`
2124
- })
2125
- }, [...E[1] || (E[1] = [
2126
- n("path", {
2127
- fill: "currentColor",
2128
- d: "M300.3 199.2C312.9 188.9 331.4 189.7 343.1 201.4L471.1 329.4C480.3 338.6 483 352.3 478 364.3C473 376.3 461.4 384 448.5 384L192.5 384C179.6 384 167.9 376.2 162.9 364.2C157.9 352.2 160.7 338.5 169.9 329.4L297.9 201.4L300.3 199.2z"
2129
- }, null, -1)
2130
- ])], 12, ka))
2131
- ])) : M("", !0)
2132
- ], 8, ha)) : (i(), c("span", wa, C(w.label), 1)),
2133
- w.filter ? (i(), q(Me, { key: 2 }, {
2134
- trigger: j(({ toggle: G }) => [
2135
- n("button", {
2136
- onClick: ue(G, ["stop"]),
2137
- "aria-label": b(m)[w.key] ? "Column Filtered" : "Filter Column",
2138
- class: P(["g-filter-btn", {
2139
- "g-active": b(m)[w.key]
2140
- }]),
2141
- type: "button"
2142
- }, [...E[2] || (E[2] = [
2143
- n("svg", {
2144
- xmlns: "http://www.w3.org/2000/svg",
2145
- viewBox: "0 0 640 640",
2146
- height: "1.5em",
2147
- "aria-hidden": "true"
2148
- }, [
2149
- n("path", {
2150
- fill: "currentColor",
2151
- d: "M96 128C83.1 128 71.4 135.8 66.4 147.8C61.4 159.8 64.2 173.5 73.4 182.6L256 365.3L256 480C256 488.5 259.4 496.6 265.4 502.6L329.4 566.6C338.6 575.8 352.3 578.5 364.3 573.5C376.3 568.5 384 556.9 384 544L384 365.3L566.6 182.7C575.8 173.5 578.5 159.8 573.5 147.8C568.5 135.8 556.9 128 544 128L96 128z"
2152
- })
2153
- ], -1)
2154
- ])], 10, $a)
2155
- ]),
2156
- default: j(() => [
2157
- w.filter.type === "select" ? (i(), q(We, {
2158
- key: 0,
2159
- modelValue: o.value[w.key],
2160
- "onUpdate:modelValue": (G) => o.value[w.key] = G,
2161
- options: w.filter.options,
2162
- class: "g-filter-select",
2163
- label: "Filter select",
2164
- searchable: "",
2165
- "clear-button": ""
2166
- }, null, 8, ["modelValue", "onUpdate:modelValue", "options"])) : w.filter.type === "toggle" ? (i(), c("div", _a, [
2167
- n("div", Ca, [
2168
- he(n("input", {
2169
- type: "checkbox",
2170
- "onUpdate:modelValue": (G) => o.value[w.key] = G,
2171
- id: `${b(z)}-filter-${String(w.key)}`,
2172
- "aria-describedby": w.filter.description ? `${b(z)}-filter-description-${String(w.key)}` : void 0
2173
- }, null, 8, xa), [
2174
- [Ae, o.value[w.key]]
2175
- ]),
2176
- n("label", {
2177
- for: `${b(z)}-filter-${String(w.key)}`
2178
- }, C(w.filter.label), 9, La),
2179
- w.filter.description ? (i(), c("span", {
2180
- key: 0,
2181
- class: "g-filter-description",
2182
- id: `${b(z)}-filter-description-${String(w.key)}`
2183
- }, C(w.filter.description), 9, Sa)) : M("", !0)
2184
- ])
2185
- ])) : w.filter.type === "multi-select" ? (i(), c("fieldset", Ia, [
2186
- E[4] || (E[4] = n("legend", { class: "g-multi-select-legend" }, " Include values ", -1)),
2187
- (i(!0), c(F, null, J(w.filter.options, (G) => (i(), c("div", {
2188
- key: G.value
2189
- }, [
2190
- he(n("input", {
2191
- type: "checkbox",
2192
- "onUpdate:modelValue": (ie) => o.value[w.key] = ie,
2193
- id: `filter-${String(w.key)}-${G.value}`,
2194
- value: G.value,
2195
- name: "filter-multiselect"
2196
- }, null, 8, Ma), [
2197
- [Ae, o.value[w.key]]
2198
- ]),
2199
- n("label", {
2200
- for: `filter-${String(w.key)}-${G.value}`
2201
- }, C(G.label), 9, Ba)
2202
- ]))), 128)),
2203
- o.value[w.key] && o.value[w.key].length ? (i(), q(ne, {
2204
- key: 0,
2205
- class: "clear-multiselect-btn",
2206
- theme: "accent",
2207
- size: "small",
2208
- onClick: (G) => o.value[w.key] = []
2209
- }, {
2210
- default: j(() => [...E[3] || (E[3] = [
2211
- W(" Clear ", -1)
2212
- ])]),
2213
- _: 1
2214
- }, 8, ["onClick"])) : M("", !0)
2215
- ])) : M("", !0)
2216
- ]),
2217
- _: 2
2218
- }, 1024)) : M("", !0)
2219
- ])
2220
- ], 10, pa))), 128))
2221
- ])
2222
- ]),
2223
- Y(aa, {
2224
- data: e.data,
2225
- columns: e.columns,
2226
- "group-by": e.groupBy,
2227
- "group-render": e.groupRender,
2228
- "row-clickable": e.rowClickable,
2229
- "row-class": e.rowClass,
2230
- "start-index": e.startIndex,
2231
- "bulk-selection-enabled": e.bulkSelectionEnabled,
2232
- "selected-rows": s.value,
2233
- "table-id": b(z),
2234
- "change-tracker": e.changeTracker,
2235
- onRowClick: K,
2236
- onToggleRow: S,
2237
- onCellChange: U
2238
- }, null, 8, ["data", "columns", "group-by", "group-render", "row-clickable", "row-class", "start-index", "bulk-selection-enabled", "selected-rows", "table-id", "change-tracker"])
2239
- ], 8, ca),
2240
- e.bulkSelectionEnabled && s.value.length > 0 ? (i(), c("div", Va, [
2241
- n("span", Ea, C(s.value.length) + " row" + C(s.value.length === 1 ? "" : "s") + " selected", 1),
2242
- n("ul", Ta, [
2243
- (i(!0), c(F, null, J(e.bulkActions, (w) => (i(), c("li", {
2244
- key: w.id
2245
- }, [
2246
- Y(ne, {
2247
- theme: w.theme || "accent",
2248
- onClick: (G) => T(w.id),
2249
- size: "small"
2250
- }, {
2251
- default: j(() => [
2252
- W(C(w.label) + " " + C(s.value.length) + " row" + C(s.value.length === 1 ? "" : "s"), 1)
2253
- ]),
2254
- _: 2
2255
- }, 1032, ["theme", "onClick"])
2256
- ]))), 128))
2257
- ])
2258
- ])) : M("", !0)
2259
- ]));
2260
- }
2261
- }), Fo = /* @__PURE__ */ D(Aa, [["__scopeId", "data-v-f59daf0b"]]), za = {
2262
- class: "g-pagination",
2263
- "aria-label": "Pagination"
2264
- }, Ga = ["disabled"], Oa = ["disabled"], Da = { class: "page-range" }, Pa = ["disabled"], Ra = ["disabled"], Fa = ["value"], Ha = ["value"], Ka = /* @__PURE__ */ A({
2265
- __name: "GTablePagination",
2266
- props: /* @__PURE__ */ R({
2267
- start: {},
2268
- pageSize: {},
2269
- total: {},
2270
- pageSizes: {}
2271
- }, {
2272
- start: {},
2273
- startModifiers: {},
2274
- pageSize: {},
2275
- pageSizeModifiers: {}
2276
- }),
2277
- emits: ["update:start", "update:pageSize"],
2278
- setup(e) {
2279
- const l = e, t = I(() => Math.max(1, Math.ceil(l.total / l.pageSize))), a = N(e, "start"), o = N(e, "pageSize"), s = I(() => a.value ?? l.start), r = I(() => o.value ?? l.pageSize), u = I(() => l.total === 0 ? 0 : s.value + 1), d = I(() => l.total === 0 ? 0 : Math.min(s.value + r.value, l.total)), v = I(() => Math.floor(s.value / r.value) + 1);
2280
- function f(y) {
2281
- y < 1 || y > t.value || (a.value = (y - 1) * r.value);
2282
- }
2283
- function m(y) {
2284
- o.value = parseInt(y.target.value, 10);
2285
- }
2286
- return (y, g) => (i(), c("nav", za, [
2287
- n("button", {
2288
- class: "first-page g-pagination-button",
2289
- disabled: v.value === 1,
2290
- onClick: g[0] || (g[0] = (L) => f(1))
2291
- }, [...g[4] || (g[4] = [
2292
- n("svg", {
2293
- role: "img",
2294
- "aria-label": "First Page",
2295
- height: "2em",
2296
- xmlns: "http://www.w3.org/2000/svg",
2297
- width: "2em",
2298
- viewBox: "0 0 24 24",
2299
- fill: "none",
2300
- stroke: "currentColor",
2301
- "stroke-width": "2",
2302
- "stroke-linecap": "round",
2303
- "stroke-linejoin": "round"
2304
- }, [
2305
- n("path", {
2306
- stroke: "none",
2307
- d: "M0 0h24v24H0z",
2308
- fill: "none"
2309
- }),
2310
- n("path", { d: "M11 7l-5 5l5 5" }),
2311
- n("path", { d: "M17 7l-5 5l5 5" })
2312
- ], -1)
2313
- ])], 8, Ga),
2314
- n("button", {
2315
- class: "prev-page g-pagination-button",
2316
- disabled: v.value === 1,
2317
- onClick: g[1] || (g[1] = (L) => f(v.value - 1))
2318
- }, [...g[5] || (g[5] = [
2319
- n("svg", {
2320
- role: "img",
2321
- "aria-label": "Previous Page",
2322
- xmlns: "http://www.w3.org/2000/svg",
2323
- width: "2em",
2324
- height: "2em",
2325
- viewBox: "0 0 24 24",
2326
- fill: "none",
2327
- stroke: "currentColor",
2328
- "stroke-width": "2",
2329
- "stroke-linecap": "round",
2330
- "stroke-linejoin": "round"
2331
- }, [
2332
- n("path", {
2333
- stroke: "none",
2334
- d: "M0 0h24v24H0z",
2335
- fill: "none"
2336
- }),
2337
- n("path", { d: "M15 6l-6 6l6 6" })
2338
- ], -1)
2339
- ])], 8, Oa),
2340
- n("span", Da, C(u.value) + " to " + C(d.value), 1),
2341
- n("button", {
2342
- class: "next-page g-pagination-button",
2343
- disabled: v.value === t.value,
2344
- onClick: g[2] || (g[2] = (L) => f(v.value + 1))
2345
- }, [...g[6] || (g[6] = [
2346
- n("svg", {
2347
- role: "img",
2348
- "aria-label": "Next Page",
2349
- xmlns: "http://www.w3.org/2000/svg",
2350
- width: "2em",
2351
- height: "2em",
2352
- viewBox: "0 0 24 24",
2353
- fill: "none",
2354
- stroke: "currentColor",
2355
- "stroke-width": "2",
2356
- "stroke-linecap": "round",
2357
- "stroke-linejoin": "round"
2358
- }, [
2359
- n("path", {
2360
- stroke: "none",
2361
- d: "M0 0h24v24H0z",
2362
- fill: "none"
2363
- }),
2364
- n("path", { d: "M9 6l6 6l-6 6" })
2365
- ], -1)
2366
- ])], 8, Pa),
2367
- n("button", {
2368
- class: "last-page g-pagination-button",
2369
- disabled: v.value === t.value,
2370
- onClick: g[3] || (g[3] = (L) => f(t.value))
2371
- }, [...g[7] || (g[7] = [
2372
- n("svg", {
2373
- role: "img",
2374
- "aria-label": "Last Page",
2375
- xmlns: "http://www.w3.org/2000/svg",
2376
- width: "2em",
2377
- height: "2em",
2378
- viewBox: "0 0 24 24",
2379
- fill: "none",
2380
- stroke: "currentColor",
2381
- "stroke-width": "2",
2382
- "stroke-linecap": "round",
2383
- "stroke-linejoin": "round"
2384
- }, [
2385
- n("path", {
2386
- stroke: "none",
2387
- d: "M0 0h24v24H0z",
2388
- fill: "none"
2389
- }),
2390
- n("path", { d: "M7 7l5 5l-5 5" }),
2391
- n("path", { d: "M13 7l5 5l-5 5" })
2392
- ], -1)
2393
- ])], 8, Ra),
2394
- n("select", {
2395
- id: "page-size-select",
2396
- class: "page-size-select",
2397
- value: o.value,
2398
- onChange: m
2399
- }, [
2400
- (i(!0), c(F, null, J(l.pageSizes || [10, 25, 50, 100], (L) => (i(), c("option", {
2401
- key: L,
2402
- value: L
2403
- }, C(L), 9, Ha))), 128))
2404
- ], 40, Fa),
2405
- g[8] || (g[8] = n("label", {
2406
- class: "page-size-label",
2407
- for: "page-size-select"
2408
- }, "per page", -1))
2409
- ]));
2410
- }
2411
- }), Ho = /* @__PURE__ */ D(Ka, [["__scopeId", "data-v-46e71363"]]), Ua = ["id"], ja = { class: "g-modal-inner" }, Na = { class: "g-modal-header" }, Wa = ["id"], qa = ["id"], Za = /* @__PURE__ */ A({
2412
- __name: "GModal",
2413
- props: {
2414
- label: {},
2415
- describedby: { default: void 0 },
2416
- hiddenLabel: { type: Boolean, default: !1 },
2417
- size: { default: "medium" }
2418
- },
2419
- emits: ["close"],
2420
- setup(e, { emit: l }) {
2421
- const t = l, a = be("dialog"), o = B(!0), s = Z(), { pop: r, push: u, isTop: d, zIndex: v } = ke(s, !0, !0), { deactivate: f, activate: m } = Se(a, d);
2422
- function y() {
2423
- t("close");
2424
- }
2425
- return Ie([a], d, o, y, r), ce(() => {
2426
- u(), m();
2427
- }), Pe(() => {
2428
- r(), f();
2429
- }), (g, L) => (i(), q(Re, { to: "#modal-root" }, [
2430
- Y(ye, {
2431
- name: "g-fade",
2432
- appear: ""
2433
- }, {
2434
- default: j(() => [
2435
- n("div", le({
2436
- id: "modal-" + b(s),
2437
- class: ["g-modal", "g-modal--" + e.size],
2438
- role: "dialog",
2439
- "aria-modal": "true"
2440
- }, {
2441
- "aria-labelledby": e.hiddenLabel ? void 0 : "modal-label-" + b(s),
2442
- "aria-label": e.hiddenLabel ? e.label : void 0,
2443
- "aria-describedby": e.describedby ? e.describedby : void 0
2444
- }, {
2445
- ref_key: "dialog",
2446
- ref: a,
2447
- style: { zIndex: b(v) }
2448
- }), [
2449
- n("div", ja, [
2450
- n("div", Na, [
2451
- e.hiddenLabel ? M("", !0) : (i(), c("h2", {
2452
- key: 0,
2453
- id: "modal-label-" + b(s),
2454
- class: "g-modal-label",
2455
- tabindex: "-1"
2456
- }, C(e.label), 9, Wa)),
2457
- n("button", {
2458
- class: "g-modal-close",
2459
- onClick: y,
2460
- "aria-label": "Close"
2461
- }, [...L[0] || (L[0] = [
2462
- n("svg", {
2463
- viewBox: "0 0 24 24",
2464
- width: "24",
2465
- height: "24",
2466
- "aria-hidden": "true"
2467
- }, [
2468
- n("path", {
2469
- fill: "currentColor",
2470
- d: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
2471
- })
2472
- ], -1)
2473
- ])])
2474
- ]),
2475
- n("div", {
2476
- id: "modal-description-" + b(s),
2477
- class: "g-modal-content"
2478
- }, [
2479
- H(g.$slots, "default", {}, void 0, !0)
2480
- ], 8, qa)
2481
- ])
2482
- ], 16, Ua)
2483
- ]),
2484
- _: 3
2485
- })
2486
- ]));
2487
- }
2488
- }), Ko = /* @__PURE__ */ D(Za, [["__scopeId", "data-v-d2f3bb35"]]), Ya = ["id", "aria-expanded", "aria-label", "aria-controls"], Qa = /* @__PURE__ */ A({
2489
- __name: "GHamburgerMenu",
2490
- props: {
2491
- label: { default: "Main Navigation" }
2492
- },
2493
- emits: ["toggle"],
2494
- setup(e, { emit: l }) {
2495
- const t = Fe("sidebar"), a = l;
2496
- function o() {
2497
- a("toggle"), t?.toggle();
2498
- }
2499
- function s(u) {
2500
- u.key === "Escape" && t?.open?.value && (t.open.value = !1);
2501
- }
2502
- const r = Z();
2503
- return (u, d) => (i(), c("button", {
2504
- id: `${b(t)?.id ?? b(r)}-hamburger`,
2505
- class: P(["g-hamburger-button", {
2506
- "g-hamburger-button--open": b(t)?.open?.value,
2507
- "g-hamburger-button--collapsible": b(t)?.isCollapsible?.value
2508
- }]),
2509
- onClick: o,
2510
- onKeydown: s,
2511
- "aria-expanded": b(t)?.open?.value ? "true" : "false",
2512
- "aria-label": e.label,
2513
- "aria-controls": b(t) ? `${b(t).id}-sidebar` : void 0
2514
- }, [...d[0] || (d[0] = [
2515
- n("svg", {
2516
- xmlns: "http://www.w3.org/2000/svg",
2517
- viewBox: "0 0 51.26 51.26"
2518
- }, [
2519
- n("g", { fill: "currentColor" }, [
2520
- n("path", { d: "M11.6 16.52h28.06a3.24 3.24 0 1 0 0-6.48H11.6a3.24 3.24 0 0 0 0 6.48ZM39.66 22.07H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48ZM39.66 34.1H11.6a3.24 3.24 0 0 0 0 6.48h28.06a3.24 3.24 0 1 0 0-6.48Z" })
2521
- ])
2522
- ], -1)
2523
- ])], 42, Ya));
2524
- }
2525
- }), Uo = /* @__PURE__ */ D(Qa, [["__scopeId", "data-v-6c69828a"]]), Ja = /* @__PURE__ */ A({
2526
- __name: "GDetailList",
2527
- props: {
2528
- variant: { default: "grid" }
2529
- },
2530
- setup(e) {
2531
- const l = e;
2532
- return (t, a) => (i(), c("dl", {
2533
- class: P(["g-detail-list", `g-detail-list--${l.variant}`])
2534
- }, [
2535
- H(t.$slots, "default", {}, void 0, !0)
2536
- ], 2));
2537
- }
2538
- }), jo = /* @__PURE__ */ D(Ja, [["__scopeId", "data-v-9f983ea6"]]), Xa = { class: "g-detail-list-item" }, eo = { class: "g-detail-list-item__label" }, to = { class: "g-detail-list-item__value" }, No = /* @__PURE__ */ A({
2539
- __name: "GDetailListItem",
2540
- props: {
2541
- label: {}
2542
- },
2543
- setup(e) {
2544
- return (l, t) => (i(), c("div", Xa, [
2545
- n("dt", eo, [
2546
- H(l.$slots, "label", {}, () => [
2547
- W(C(e.label), 1)
2548
- ])
2549
- ]),
2550
- n("dd", to, [
2551
- H(l.$slots, "default")
2552
- ])
2553
- ]));
2554
- }
2555
- }), lo = {
2556
- key: 0,
2557
- class: "g-scroll-lock-overlay"
2558
- }, Wo = /* @__PURE__ */ A({
2559
- __name: "GOverlay",
2560
- setup(e) {
2561
- const { hasScrollLock: l } = bt();
2562
- return (t, a) => (i(), q(ye, { name: "g-fade" }, {
2563
- default: j(() => [
2564
- b(l) ? (i(), c("div", lo)) : M("", !0)
2565
- ]),
2566
- _: 1
2567
- }));
2568
- }
2569
- }), ao = { class: "popover-content" }, oo = { class: "year-dropdown" }, so = { class: "month-selector" }, no = /* @__PURE__ */ A({
2570
- __name: "GTermSelectorControl",
2571
- props: /* @__PURE__ */ R({
2572
- termYears: { default: () => ["2026"] },
2573
- termNames: { default: () => ["Spring", "Summer", "Fall"] },
2574
- yearLabel: { default: "Select Year" },
2575
- periodLabel: { default: "Term" }
2576
- }, {
2577
- modelValue: {
2578
- default: () => ({ year: "2026", name: "Spring" })
2579
- },
2580
- modelModifiers: {}
2581
- }),
2582
- emits: ["update:modelValue"],
2583
- setup(e) {
2584
- const l = N(e, "modelValue");
2585
- return (t, a) => (i(), c("div", ao, [
2586
- n("div", oo, [
2587
- Y(We, {
2588
- modelValue: l.value.year,
2589
- "onUpdate:modelValue": a[0] || (a[0] = (o) => l.value.year = o),
2590
- options: e.termYears,
2591
- label: e.yearLabel
2592
- }, null, 8, ["modelValue", "options", "label"])
2593
- ]),
2594
- n("div", so, [
2595
- Y(St, {
2596
- modelValue: l.value.name,
2597
- "onUpdate:modelValue": a[1] || (a[1] = (o) => l.value.name = o),
2598
- options: e.termNames,
2599
- "allow-empty": !1,
2600
- label: e.periodLabel
2601
- }, null, 8, ["modelValue", "options", "label"])
2602
- ])
2603
- ]));
2604
- }
2605
- }), io = /* @__PURE__ */ D(no, [["__scopeId", "data-v-f9b2a431"]]), ro = { class: "g-term-selector" }, uo = { class: "g-term-label" }, co = {
2606
- class: "popover-title",
2607
- tabindex: "-1"
2608
- }, vo = /* @__PURE__ */ A({
2609
- __name: "GTermSelector",
2610
- props: /* @__PURE__ */ R({
2611
- title: { default: "Period Selection" },
2612
- yearLabel: {},
2613
- periodLabel: {},
2614
- termYears: { default: () => ["2026"] },
2615
- termNames: { default: () => ["Spring", "Summer", "Fall"] }
2616
- }, {
2617
- modelValue: {
2618
- default: () => ({ year: "2026", name: "Spring" })
2619
- },
2620
- modelModifiers: {}
2621
- }),
2622
- emits: ["update:modelValue"],
2623
- setup(e) {
2624
- const l = N(e, "modelValue");
2625
- return (t, a) => (i(), c("div", ro, [
2626
- Y(Me, null, {
2627
- trigger: j(({ toggle: o }) => [
2628
- Y(ne, {
2629
- class: "g-term-selector-button",
2630
- theme: "none",
2631
- outlined: "",
2632
- onClick: o
2633
- }, {
2634
- default: j(() => [
2635
- a[0] || (a[0] = n("span", { class: "g-calendar-icon" }, [
2636
- n("svg", {
2637
- role: "none presentation",
2638
- xmlns: "http://www.w3.org/2000/svg",
2639
- viewBox: "0 0 640 640"
2640
- }, [
2641
- n("path", { d: "M224 64C206.3 64 192 78.3 192 96L192 128L160 128C124.7 128 96 156.7 96 192L96 240L544 240L544 192C544 156.7 515.3 128 480 128L448 128L448 96C448 78.3 433.7 64 416 64C398.3 64 384 78.3 384 96L384 128L256 128L256 96C256 78.3 241.7 64 224 64zM96 288L96 480C96 515.3 124.7 544 160 544L480 544C515.3 544 544 515.3 544 480L544 288L96 288z" })
2642
- ])
2643
- ], -1)),
2644
- n("span", uo, C(l.value?.name) + " " + C(l.value?.year), 1),
2645
- a[1] || (a[1] = n("span", { class: "g-caret" }, [
2646
- n("svg", {
2647
- role: "none presentation",
2648
- xmlns: "http://www.w3.org/2000/svg",
2649
- viewBox: "0 0 640 640"
2650
- }, [
2651
- n("path", { d: "M300.3 440.8C312.9 451 331.4 450.3 343.1 438.6L471.1 310.6C480.3 301.4 483 287.7 478 275.7C473 263.7 461.4 256 448.5 256L192.5 256C179.6 256 167.9 263.8 162.9 275.8C157.9 287.8 160.7 301.5 169.9 310.6L297.9 438.6L300.3 440.8z" })
2652
- ])
2653
- ], -1))
2654
- ]),
2655
- _: 1
2656
- }, 8, ["onClick"])
2657
- ]),
2658
- default: j(() => [
2659
- n("h2", co, C(e.title), 1),
2660
- Y(io, Qe(Je(t.$props)), null, 16)
2661
- ]),
2662
- _: 1
2663
- })
2664
- ]));
2665
- }
2666
- }), qo = /* @__PURE__ */ D(vo, [["__scopeId", "data-v-68fc0cf4"]]), fo = { class: "g-user-menu" }, bo = ["aria-label", "aria-expanded", "onClick"], go = { class: "g-user-menu__popover" }, po = { class: "g-user-menu__list" }, mo = /* @__PURE__ */ A({
2667
- __name: "GUserMenu",
2668
- props: {
2669
- initials: {},
2670
- email: {},
2671
- color: { default: "var(--g-surface-700)" },
2672
- label: { default: "User menu" }
2673
- },
2674
- setup(e) {
2675
- const t = `${Z()}-email`, a = B(!1), o = be("emailHeading");
2676
- He()?.appContext?.components?.RouterLink;
2677
- const r = Ue();
2678
- return (u, d) => (i(), c("div", fo, [
2679
- Y(Me, {
2680
- modelValue: a.value,
2681
- "onUpdate:modelValue": d[0] || (d[0] = (v) => a.value = v),
2682
- minimal: ""
2683
- }, {
2684
- trigger: j(({ toggle: v }) => [
2685
- n("button", {
2686
- class: "g-user-menu__avatar",
2687
- style: de({ backgroundColor: e.color }),
2688
- "aria-label": e.initials + " - " + e.label,
2689
- "aria-expanded": a.value,
2690
- "aria-haspopup": "menu",
2691
- onClick: v
2692
- }, C(e.initials), 13, bo)
2693
- ]),
2694
- default: j(() => [
2695
- n("div", go, [
2696
- n("h2", {
2697
- id: t,
2698
- ref_key: "emailHeading",
2699
- ref: o,
2700
- class: "g-user-menu__email",
2701
- tabindex: "-1"
2702
- }, C(e.email), 513),
2703
- n("nav", {
2704
- class: "g-user-menu__nav",
2705
- "aria-labelledby": t
2706
- }, [
2707
- n("ul", po, [
2708
- (i(!0), c(F, null, J(r.default(), (v, f) => (i(), c("li", { key: f }, [
2709
- (i(), q(ve(v)))
2710
- ]))), 128))
2711
- ])
2712
- ])
2713
- ])
2714
- ]),
2715
- _: 1
2716
- }, 8, ["modelValue"])
2717
- ]));
2718
- }
2719
- }), Zo = /* @__PURE__ */ D(mo, [["__scopeId", "data-v-4b786fbc"]]), ho = /* @__PURE__ */ A({
2720
- __name: "GCurrencyInput",
2721
- props: /* @__PURE__ */ R({
2722
- label: { default: void 0 },
2723
- placeholder: { default: "" },
2724
- disabled: { type: Boolean, default: !1 },
2725
- error: { default: "" },
2726
- instructions: { default: "" }
2727
- }, {
2728
- modelValue: { type: String },
2729
- modelModifiers: {}
2730
- }),
2731
- emits: ["update:modelValue"],
2732
- setup(e) {
2733
- const l = e, t = N(e, "modelValue");
2734
- return (a, o) => (i(), q(Le, le({
2735
- modelValue: t.value,
2736
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
2737
- label: l.label,
2738
- placeholder: l.placeholder,
2739
- disabled: l.disabled,
2740
- error: l.error,
2741
- instructions: l.instructions,
2742
- prefix: "$",
2743
- type: "number",
2744
- step: "0.01",
2745
- min: "0"
2746
- }, a.$attrs), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "instructions"]));
2747
- }
2748
- }), Yo = /* @__PURE__ */ D(ho, [["__scopeId", "data-v-ad76a634"]]), yo = /* @__PURE__ */ A({
2749
- __name: "GEmailInput",
2750
- props: /* @__PURE__ */ R({
2751
- label: { default: void 0 },
2752
- placeholder: { default: "" },
2753
- disabled: { type: Boolean, default: !1 },
2754
- error: { default: "" },
2755
- instructions: { default: "" }
2756
- }, {
2757
- modelValue: { type: String },
2758
- modelModifiers: {}
2759
- }),
2760
- emits: ["update:modelValue"],
2761
- setup(e) {
2762
- const l = e, t = N(e, "modelValue");
2763
- return (a, o) => (i(), q(Le, le({
2764
- modelValue: t.value,
2765
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
2766
- label: l.label,
2767
- placeholder: l.placeholder,
2768
- disabled: l.disabled,
2769
- error: l.error,
2770
- instructions: l.instructions,
2771
- type: "email"
2772
- }, a.$attrs), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "instructions"]));
2773
- }
2774
- }), Qo = /* @__PURE__ */ D(yo, [["__scopeId", "data-v-4e8b99da"]]), ko = /* @__PURE__ */ A({
2775
- __name: "GDateInput",
2776
- props: /* @__PURE__ */ R({
2777
- label: { default: void 0 },
2778
- placeholder: { default: "" },
2779
- disabled: { type: Boolean, default: !1 },
2780
- error: { default: "" },
2781
- instructions: { default: "" }
2782
- }, {
2783
- modelValue: { type: String },
2784
- modelModifiers: {}
2785
- }),
2786
- emits: ["update:modelValue"],
2787
- setup(e) {
2788
- const l = e, t = N(e, "modelValue");
2789
- return (a, o) => (i(), q(Le, le({
2790
- modelValue: t.value,
2791
- "onUpdate:modelValue": o[0] || (o[0] = (s) => t.value = s),
2792
- label: l.label,
2793
- placeholder: l.placeholder,
2794
- disabled: l.disabled,
2795
- error: l.error,
2796
- instructions: l.instructions,
2797
- type: "date"
2798
- }, a.$attrs), null, 16, ["modelValue", "label", "placeholder", "disabled", "error", "instructions"]));
2799
- }
2800
- }), De = /* @__PURE__ */ D(ko, [["__scopeId", "data-v-0060fc5c"]]), wo = { class: "g-date-range-input" }, $o = {
2801
- key: 0,
2802
- class: "g-date-range-input__label"
2803
- }, _o = {
2804
- key: 1,
2805
- class: "g-date-range-input__instructions"
2806
- }, Co = { class: "g-date-range-input__fields" }, xo = {
2807
- key: 2,
2808
- class: "g-date-range-input__error",
2809
- role: "alert"
2810
- }, Lo = /* @__PURE__ */ A({
2811
- __name: "GDateRangeInput",
2812
- props: /* @__PURE__ */ R({
2813
- label: { default: void 0 },
2814
- startLabel: { default: "Start Date" },
2815
- endLabel: { default: "End Date" },
2816
- disabled: { type: Boolean, default: !1 },
2817
- error: { default: "" },
2818
- instructions: { default: "" }
2819
- }, {
2820
- modelValue: {
2821
- default: () => ({ start: null, end: null })
2822
- },
2823
- modelModifiers: {}
2824
- }),
2825
- emits: ["update:modelValue"],
2826
- setup(e) {
2827
- const l = e, t = N(e, "modelValue"), a = B(t.value.start || null), o = B(t.value.end || null);
2828
- return X([a, o], () => {
2829
- t.value = {
2830
- start: a.value,
2831
- end: o.value
2832
- };
2833
- }), X(
2834
- t,
2835
- (s) => {
2836
- s.start !== a.value && (a.value = s.start), s.end !== o.value && (o.value = s.end);
2837
- },
2838
- { deep: !0 }
2839
- ), (s, r) => (i(), c("div", wo, [
2840
- l.label ? (i(), c("div", $o, C(l.label), 1)) : M("", !0),
2841
- l.instructions ? (i(), c("div", _o, C(l.instructions), 1)) : M("", !0),
2842
- n("div", Co, [
2843
- Y(De, {
2844
- modelValue: a.value,
2845
- "onUpdate:modelValue": r[0] || (r[0] = (u) => a.value = u),
2846
- label: l.startLabel,
2847
- disabled: l.disabled,
2848
- class: "g-date-range-input__field"
2849
- }, null, 8, ["modelValue", "label", "disabled"]),
2850
- Y(De, {
2851
- modelValue: o.value,
2852
- "onUpdate:modelValue": r[1] || (r[1] = (u) => o.value = u),
2853
- label: l.endLabel,
2854
- disabled: l.disabled,
2855
- class: "g-date-range-input__field"
2856
- }, null, 8, ["modelValue", "label", "disabled"])
2857
- ]),
2858
- l.error ? (i(), c("div", xo, C(l.error), 1)) : M("", !0)
2859
- ]));
2860
- }
2861
- }), Jo = /* @__PURE__ */ D(Lo, [["__scopeId", "data-v-503cfa1a"]]);
2862
- export {
2863
- Jo as A,
2864
- Ne as B,
2865
- Ie as C,
2866
- Se as D,
2867
- ke as E,
2868
- bt as F,
2869
- Eo as G,
2870
- sa as H,
2871
- oa as I,
2872
- Do as J,
2873
- Ro as K,
2874
- Po as L,
2875
- Oe as M,
2876
- kl as V,
2877
- ne as _,
2878
- Le as a,
2879
- Me as b,
2880
- St as c,
2881
- Tt as d,
2882
- Bo as e,
2883
- We as f,
2884
- Vo as g,
2885
- To as h,
2886
- Ao as i,
2887
- zo as j,
2888
- Go as k,
2889
- Oo as l,
2890
- Fo as m,
2891
- aa as n,
2892
- Ho as o,
2893
- Ko as p,
2894
- Wo as q,
2895
- Uo as r,
2896
- jo as s,
2897
- No as t,
2898
- qo as u,
2899
- io as v,
2900
- Zo as w,
2901
- Yo as x,
2902
- Qo as y,
2903
- De as z
2904
- };
2905
- //# sourceMappingURL=main-Cfnx_6UB.js.map