@davidbirchall/core 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1190 @@
1
+ import { defineComponent as C, openBlock as a, createElementBlock as l, normalizeClass as w, renderSlot as D, createBlock as W, resolveDynamicComponent as K, mergeProps as me, toHandlers as fe, withCtx as j, createCommentVNode as c, ref as V, computed as M, createElementVNode as s, withModifiers as T, toDisplayString as r, Fragment as L, renderList as N, createTextVNode as Y, watch as Q, onMounted as Z, onBeforeUnmount as ee, Teleport as J, normalizeStyle as U, createVNode as X, onUnmounted as ve, Transition as te } from "vue";
2
+ const he = /* @__PURE__ */ C({
3
+ __name: "Badge",
4
+ props: {
5
+ variant: { default: "primary" },
6
+ size: { default: "medium" }
7
+ },
8
+ setup(e) {
9
+ return (m, t) => (a(), l("span", {
10
+ class: w(["badge", `badge--${e.variant}`, `badge--${e.size}`])
11
+ }, [
12
+ D(m.$slots, "default", {}, void 0, !0)
13
+ ], 2));
14
+ }
15
+ }), x = (e, m) => {
16
+ const t = e.__vccOpts || e;
17
+ for (const [f, u] of m)
18
+ t[f] = u;
19
+ return t;
20
+ }, Va = /* @__PURE__ */ x(he, [["__scopeId", "data-v-f310f0d4"]]), be = {
21
+ key: 0,
22
+ class: "sr-only"
23
+ }, ye = /* @__PURE__ */ C({
24
+ __name: "Button",
25
+ props: {
26
+ variant: { default: "primary" },
27
+ disabled: { type: Boolean, default: !1 },
28
+ url: {},
29
+ target: { default: "_self" }
30
+ },
31
+ emits: ["click"],
32
+ setup(e, { emit: m }) {
33
+ const t = e, f = m, u = (v) => {
34
+ t.disabled ? (v.preventDefault(), v.stopImmediatePropagation()) : f("click", v);
35
+ };
36
+ return (v, d) => (a(), W(K(e.url ? "a" : "button"), me({
37
+ href: e.url,
38
+ target: e.url ? e.target : void 0,
39
+ rel: e.url && e.target === "_blank" ? "noopener noreferrer" : void 0,
40
+ class: ["btn", `btn--${e.variant}`, { "btn--disabled": e.disabled }],
41
+ disabled: !e.url && e.disabled,
42
+ "aria-disabled": e.disabled
43
+ }, fe(e.url ? {} : { click: u })), {
44
+ default: j(() => [
45
+ D(v.$slots, "default", {}, void 0, !0),
46
+ e.url && e.target === "_blank" ? (a(), l("span", be, "(opens in new window)")) : c("", !0)
47
+ ]),
48
+ _: 3
49
+ }, 16, ["href", "target", "rel", "class", "disabled", "aria-disabled"]));
50
+ }
51
+ }), Da = /* @__PURE__ */ x(ye, [["__scopeId", "data-v-86500989"]]), pe = { class: "calendar" }, ge = { class: "calendar-header" }, ke = { class: "calendar-title" }, $e = {
52
+ key: 0,
53
+ class: "calendar-body"
54
+ }, _e = { class: "calendar-weekdays" }, we = { class: "calendar-days" }, Ve = ["onClick", "disabled"], De = {
55
+ key: 1,
56
+ class: "calendar-picker"
57
+ }, Ce = { class: "calendar-picker-grid" }, xe = ["onClick"], Ie = {
58
+ key: 2,
59
+ class: "calendar-picker"
60
+ }, Se = { class: "calendar-picker-nav" }, Be = { class: "calendar-picker-range" }, Me = { class: "calendar-picker-grid" }, Pe = ["onClick"], Oe = /* @__PURE__ */ C({
61
+ __name: "Calendar",
62
+ props: {
63
+ modelValue: {},
64
+ mode: { default: "single" },
65
+ minDate: {},
66
+ maxDate: {},
67
+ disabledDates: {},
68
+ locale: { default: "en-US" },
69
+ firstDayOfWeek: { default: 0 },
70
+ initialDate: {}
71
+ },
72
+ emits: ["update:modelValue"],
73
+ setup(e, { emit: m }) {
74
+ const t = e, f = m, v = (() => {
75
+ if (t.initialDate) {
76
+ const [n, k, i] = t.initialDate.split("-").map(Number);
77
+ return new Date(n, k - 1, i);
78
+ }
79
+ if (t.modelValue) {
80
+ if (typeof t.modelValue == "string") {
81
+ const [n, k, i] = t.modelValue.split("-").map(Number);
82
+ return new Date(n, k - 1, i);
83
+ }
84
+ if (typeof t.modelValue == "object" && "start" in t.modelValue && t.modelValue.start) {
85
+ const [n, k, i] = t.modelValue.start.split("-").map(Number);
86
+ return new Date(n, k - 1, i);
87
+ }
88
+ if (Array.isArray(t.modelValue) && t.modelValue.length > 0) {
89
+ const [n, k, i] = t.modelValue[0].split("-").map(Number);
90
+ return new Date(n, k - 1, i);
91
+ }
92
+ }
93
+ return /* @__PURE__ */ new Date();
94
+ })(), d = V(v.getMonth()), p = V(v.getFullYear()), o = V(null), h = V(null), b = V(Math.floor(v.getFullYear() / 12) * 12), I = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], q = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], P = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], z = M(() => q[d.value]), _ = M(() => {
95
+ const n = [...P];
96
+ return t.firstDayOfWeek > 0 ? [...n.slice(t.firstDayOfWeek), ...n.slice(0, t.firstDayOfWeek)] : n;
97
+ }), y = M(() => Array.from({ length: 12 }, (n, k) => b.value + k)), g = M(() => {
98
+ const n = b.value, k = n + 11;
99
+ return `${n} - ${k}`;
100
+ }), S = M(() => {
101
+ const n = [], k = new Date(p.value, d.value, 1), i = new Date(p.value, d.value + 1, 0);
102
+ let O = k.getDay() - t.firstDayOfWeek;
103
+ O < 0 && (O += 7);
104
+ const G = new Date(p.value, d.value, 0).getDate();
105
+ for (let E = O - 1; E >= 0; E--) {
106
+ const F = new Date(p.value, d.value - 1, G - E);
107
+ n.push($(F, !1));
108
+ }
109
+ for (let E = 1; E <= i.getDate(); E++) {
110
+ const F = new Date(p.value, d.value, E);
111
+ n.push($(F, !0));
112
+ }
113
+ const ue = 42 - n.length;
114
+ for (let E = 1; E <= ue; E++) {
115
+ const F = new Date(p.value, d.value + 1, E);
116
+ n.push($(F, !1));
117
+ }
118
+ return n;
119
+ }), $ = (n, k) => {
120
+ const i = B(n), O = B(/* @__PURE__ */ new Date());
121
+ return {
122
+ date: n,
123
+ dateString: i,
124
+ isCurrentMonth: k,
125
+ isToday: i === O,
126
+ isSelected: R(i),
127
+ isDisabled: A(i),
128
+ isInRange: H(i)
129
+ };
130
+ }, B = (n) => {
131
+ const k = n.getFullYear(), i = String(n.getMonth() + 1).padStart(2, "0"), O = String(n.getDate()).padStart(2, "0");
132
+ return `${k}-${i}-${O}`;
133
+ }, R = (n) => t.modelValue ? t.mode === "single" ? t.modelValue === n : t.mode === "multiple" && Array.isArray(t.modelValue) ? t.modelValue.includes(n) : t.mode === "range" && typeof t.modelValue == "object" && "start" in t.modelValue ? n === t.modelValue.start || n === t.modelValue.end : !1 : !1, A = (n) => {
134
+ var k;
135
+ return !!(t.minDate && n < t.minDate || t.maxDate && n > t.maxDate || (k = t.disabledDates) != null && k.includes(n));
136
+ }, H = (n) => {
137
+ if (t.mode !== "range" || typeof t.modelValue != "object" || !("start" in t.modelValue)) return !1;
138
+ const { start: k, end: i } = t.modelValue;
139
+ return !k || !i ? !1 : n > k && n < i;
140
+ }, ae = (n) => {
141
+ if (!n.isDisabled) {
142
+ if (t.mode === "single")
143
+ f("update:modelValue", n.dateString);
144
+ else if (t.mode === "multiple") {
145
+ const k = Array.isArray(t.modelValue) ? [...t.modelValue] : [], i = k.indexOf(n.dateString);
146
+ i > -1 ? k.splice(i, 1) : k.push(n.dateString), f("update:modelValue", k);
147
+ } else if (t.mode === "range")
148
+ if (!h.value)
149
+ h.value = n.dateString, f("update:modelValue", { start: n.dateString, end: n.dateString });
150
+ else {
151
+ const k = h.value < n.dateString ? h.value : n.dateString, i = h.value < n.dateString ? n.dateString : h.value;
152
+ f("update:modelValue", { start: k, end: i }), h.value = null;
153
+ }
154
+ }
155
+ }, le = () => {
156
+ d.value === 0 ? (d.value = 11, p.value--) : d.value--;
157
+ }, se = () => {
158
+ d.value === 11 ? (d.value = 0, p.value++) : d.value++;
159
+ }, ne = () => {
160
+ o.value = o.value === "month" ? null : "month";
161
+ }, oe = () => {
162
+ o.value !== "year" && (b.value = Math.floor(p.value / 12) * 12), o.value = o.value === "year" ? null : "year";
163
+ }, re = (n) => {
164
+ d.value = n, o.value = null;
165
+ }, de = (n) => {
166
+ p.value = n, o.value = null;
167
+ }, ie = () => {
168
+ b.value -= 12;
169
+ }, ce = () => {
170
+ b.value += 12;
171
+ };
172
+ return (n, k) => (a(), l("div", pe, [
173
+ s("div", ge, [
174
+ s("button", {
175
+ onClick: T(le, ["stop"]),
176
+ class: "calendar-nav",
177
+ type: "button"
178
+ }, " ‹ "),
179
+ s("div", ke, [
180
+ s("button", {
181
+ onClick: T(ne, ["stop"]),
182
+ class: "calendar-month-btn",
183
+ type: "button"
184
+ }, r(z.value), 1),
185
+ s("button", {
186
+ onClick: T(oe, ["stop"]),
187
+ class: "calendar-year-btn",
188
+ type: "button"
189
+ }, r(p.value), 1)
190
+ ]),
191
+ s("button", {
192
+ onClick: T(se, ["stop"]),
193
+ class: "calendar-nav",
194
+ type: "button"
195
+ }, " › ")
196
+ ]),
197
+ o.value ? o.value === "month" ? (a(), l("div", De, [
198
+ s("div", Ce, [
199
+ (a(), l(L, null, N(I, (i, O) => s("button", {
200
+ key: i,
201
+ onClick: T((G) => re(O), ["stop"]),
202
+ type: "button",
203
+ class: w([
204
+ "calendar-picker-item",
205
+ { "calendar-picker-item--selected": O === d.value }
206
+ ])
207
+ }, r(i), 11, xe)), 64))
208
+ ])
209
+ ])) : o.value === "year" ? (a(), l("div", Ie, [
210
+ s("div", Se, [
211
+ s("button", {
212
+ onClick: T(ie, ["stop"]),
213
+ class: "calendar-nav",
214
+ type: "button"
215
+ }, " ‹ "),
216
+ s("span", Be, r(g.value), 1),
217
+ s("button", {
218
+ onClick: T(ce, ["stop"]),
219
+ class: "calendar-nav",
220
+ type: "button"
221
+ }, " › ")
222
+ ]),
223
+ s("div", Me, [
224
+ (a(!0), l(L, null, N(y.value, (i) => (a(), l("button", {
225
+ key: i,
226
+ onClick: T((O) => de(i), ["stop"]),
227
+ type: "button",
228
+ class: w([
229
+ "calendar-picker-item",
230
+ { "calendar-picker-item--selected": i === p.value }
231
+ ])
232
+ }, r(i), 11, Pe))), 128))
233
+ ])
234
+ ])) : c("", !0) : (a(), l("div", $e, [
235
+ s("div", _e, [
236
+ (a(!0), l(L, null, N(_.value, (i) => (a(), l("div", {
237
+ key: i,
238
+ class: "calendar-weekday"
239
+ }, r(i), 1))), 128))
240
+ ]),
241
+ s("div", we, [
242
+ (a(!0), l(L, null, N(S.value, (i) => (a(), l("button", {
243
+ key: i.dateString,
244
+ onClick: (O) => ae(i),
245
+ type: "button",
246
+ disabled: i.isDisabled,
247
+ class: w([
248
+ "calendar-day",
249
+ {
250
+ "calendar-day--other-month": !i.isCurrentMonth,
251
+ "calendar-day--today": i.isToday,
252
+ "calendar-day--selected": i.isSelected,
253
+ "calendar-day--disabled": i.isDisabled,
254
+ "calendar-day--in-range": i.isInRange
255
+ }
256
+ ])
257
+ }, r(i.date.getDate()), 11, Ve))), 128))
258
+ ])
259
+ ]))
260
+ ]));
261
+ }
262
+ }), Te = /* @__PURE__ */ x(Oe, [["__scopeId", "data-v-446fa187"]]), Ee = {
263
+ key: 0,
264
+ class: "card__header"
265
+ }, Le = { class: "card__body" }, Re = {
266
+ key: 1,
267
+ class: "card__footer"
268
+ }, Ae = /* @__PURE__ */ C({
269
+ __name: "Card",
270
+ props: {
271
+ hoverable: { type: Boolean, default: !1 }
272
+ },
273
+ setup(e) {
274
+ return (m, t) => (a(), l("div", {
275
+ class: w(["card", { "card--hoverable": e.hoverable }])
276
+ }, [
277
+ m.$slots.header ? (a(), l("div", Ee, [
278
+ D(m.$slots, "header", {}, void 0, !0)
279
+ ])) : c("", !0),
280
+ s("div", Le, [
281
+ D(m.$slots, "default", {}, void 0, !0)
282
+ ]),
283
+ m.$slots.footer ? (a(), l("div", Re, [
284
+ D(m.$slots, "footer", {}, void 0, !0)
285
+ ])) : c("", !0)
286
+ ], 2));
287
+ }
288
+ }), Ca = /* @__PURE__ */ x(Ae, [["__scopeId", "data-v-3c027648"]]), Ne = { class: "checkbox-wrapper" }, qe = ["checked", "disabled", "required"], ze = {
289
+ key: 0,
290
+ class: "checkbox-text"
291
+ }, Ye = {
292
+ key: 0,
293
+ class: "checkbox-error"
294
+ }, Fe = /* @__PURE__ */ C({
295
+ __name: "Checkbox",
296
+ props: {
297
+ modelValue: { type: Boolean, default: !1 },
298
+ label: {},
299
+ disabled: { type: Boolean, default: !1 },
300
+ required: { type: Boolean, default: !1 },
301
+ error: {}
302
+ },
303
+ emits: ["update:modelValue"],
304
+ setup(e, { emit: m }) {
305
+ const t = m, f = (u) => {
306
+ const v = u.target;
307
+ t("update:modelValue", v.checked);
308
+ };
309
+ return (u, v) => (a(), l("div", Ne, [
310
+ s("label", {
311
+ class: w(["checkbox-label", { "checkbox-label--disabled": e.disabled }])
312
+ }, [
313
+ s("input", {
314
+ type: "checkbox",
315
+ class: "checkbox-input",
316
+ checked: e.modelValue,
317
+ disabled: e.disabled,
318
+ required: e.required,
319
+ onChange: f
320
+ }, null, 40, qe),
321
+ v[0] || (v[0] = s("span", { class: "checkbox-box" }, null, -1)),
322
+ e.label ? (a(), l("span", ze, r(e.label), 1)) : c("", !0)
323
+ ], 2),
324
+ e.error ? (a(), l("span", Ye, r(e.error), 1)) : c("", !0)
325
+ ]));
326
+ }
327
+ }), xa = /* @__PURE__ */ x(Fe, [["__scopeId", "data-v-ce644bb9"]]), We = { class: "data-table" }, He = { class: "data-table__wrapper" }, Ue = { class: "data-table__table" }, je = { class: "data-table__head" }, Je = ["onClick"], Xe = { class: "data-table__header-content" }, Ge = {
328
+ key: 0,
329
+ class: "data-table__sort-icon"
330
+ }, Ke = { key: 0 }, Qe = {
331
+ key: 1,
332
+ class: "data-table__sort-icon--inactive"
333
+ }, Ze = { key: 0 }, et = ["colspan"], tt = /* @__PURE__ */ C({
334
+ __name: "DataTable",
335
+ props: {
336
+ columns: {},
337
+ data: {},
338
+ hoverable: { type: Boolean, default: !0 },
339
+ emptyText: { default: "No data available" }
340
+ },
341
+ setup(e) {
342
+ const m = e, t = V(null), f = V("asc"), u = (d) => {
343
+ t.value === d ? f.value = f.value === "asc" ? "desc" : "asc" : (t.value = d, f.value = "asc");
344
+ }, v = M(() => t.value ? [...m.data].sort((d, p) => {
345
+ const o = d[t.value], h = p[t.value];
346
+ if (o === h) return 0;
347
+ let b = 0;
348
+ return typeof o == "number" && typeof h == "number" ? b = o - h : b = String(o).localeCompare(String(h)), f.value === "asc" ? b : -b;
349
+ }) : m.data);
350
+ return (d, p) => (a(), l("div", We, [
351
+ s("div", He, [
352
+ s("table", Ue, [
353
+ s("thead", je, [
354
+ s("tr", null, [
355
+ (a(!0), l(L, null, N(e.columns, (o) => (a(), l("th", {
356
+ key: o.key,
357
+ class: w(["data-table__header", { "data-table__header--sortable": o.sortable }]),
358
+ onClick: (h) => o.sortable ? u(o.key) : void 0
359
+ }, [
360
+ s("div", Xe, [
361
+ Y(r(o.label) + " ", 1),
362
+ o.sortable ? (a(), l("span", Ge, [
363
+ t.value === o.key ? (a(), l("span", Ke, r(f.value === "asc" ? "↑" : "↓"), 1)) : (a(), l("span", Qe, "↕"))
364
+ ])) : c("", !0)
365
+ ])
366
+ ], 10, Je))), 128))
367
+ ])
368
+ ]),
369
+ s("tbody", null, [
370
+ (a(!0), l(L, null, N(v.value, (o, h) => (a(), l("tr", {
371
+ key: h,
372
+ class: "data-table__row"
373
+ }, [
374
+ (a(!0), l(L, null, N(e.columns, (b) => (a(), l("td", {
375
+ key: b.key,
376
+ class: "data-table__cell"
377
+ }, [
378
+ D(d.$slots, `cell-${b.key}`, {
379
+ row: o,
380
+ value: o[b.key]
381
+ }, () => [
382
+ Y(r(o[b.key]), 1)
383
+ ], !0)
384
+ ]))), 128))
385
+ ]))), 128)),
386
+ v.value.length === 0 ? (a(), l("tr", Ze, [
387
+ s("td", {
388
+ colspan: e.columns.length,
389
+ class: "data-table__cell data-table__cell--empty"
390
+ }, r(e.emptyText), 9, et)
391
+ ])) : c("", !0)
392
+ ])
393
+ ])
394
+ ])
395
+ ]));
396
+ }
397
+ }), Ia = /* @__PURE__ */ x(tt, [["__scopeId", "data-v-511dc0a4"]]), at = ["id", "value", "placeholder", "disabled"], lt = {
398
+ key: 0,
399
+ class: "date-error"
400
+ }, st = /* @__PURE__ */ C({
401
+ __name: "DatePicker",
402
+ props: {
403
+ modelValue: {},
404
+ id: {},
405
+ placeholder: { default: "Select date" },
406
+ disabled: { type: Boolean },
407
+ format: { default: "short" },
408
+ error: {},
409
+ mode: { default: "single" },
410
+ minDate: {},
411
+ maxDate: {},
412
+ disabledDates: {},
413
+ locale: {},
414
+ firstDayOfWeek: { default: 0 },
415
+ initialDate: {}
416
+ },
417
+ emits: ["update:modelValue"],
418
+ setup(e, { emit: m }) {
419
+ const t = e, f = m, u = V(!1);
420
+ let v = 0;
421
+ const d = `date-input-${++v}`, p = M(() => t.id || d), o = V(null), h = V(null), b = V({
422
+ top: "0px",
423
+ left: "0px",
424
+ width: "320px"
425
+ }), I = V(t.modelValue);
426
+ Q(() => t.modelValue, ($) => {
427
+ I.value = $;
428
+ }, { immediate: !0 });
429
+ const q = M(() => {
430
+ if (!t.modelValue) return "";
431
+ if (t.mode === "single" && typeof t.modelValue == "string")
432
+ return P(t.modelValue);
433
+ if (t.mode === "multiple" && Array.isArray(t.modelValue))
434
+ return t.modelValue.map(($) => P($)).join(", ");
435
+ if (t.mode === "range" && typeof t.modelValue == "object" && "start" in t.modelValue) {
436
+ const { start: $, end: B } = t.modelValue;
437
+ if ($ && B)
438
+ return `${P($)} - ${P(B)}`;
439
+ if ($) return P($);
440
+ }
441
+ return "";
442
+ }), P = ($) => {
443
+ const [B, R, A] = $.split("-").map(Number), H = new Date(B, R - 1, A);
444
+ return t.format === "long" ? H.toLocaleDateString("en-US", {
445
+ year: "numeric",
446
+ month: "long",
447
+ day: "numeric"
448
+ }) : H.toLocaleDateString("en-US", {
449
+ year: "numeric",
450
+ month: "short",
451
+ day: "numeric"
452
+ });
453
+ }, z = () => {
454
+ t.disabled || (u.value ? y() : _());
455
+ }, _ = () => {
456
+ u.value = !0, setTimeout(() => {
457
+ if (o.value) {
458
+ const $ = o.value.getBoundingClientRect(), R = window.innerHeight - $.bottom, A = 400;
459
+ R < A && $.top > A ? b.value = {
460
+ top: `${$.top - A + window.scrollY}px`,
461
+ left: `${$.left + window.scrollX}px`,
462
+ width: "320px"
463
+ } : b.value = {
464
+ top: `${$.bottom + 4 + window.scrollY}px`,
465
+ left: `${$.left + window.scrollX}px`,
466
+ width: "320px"
467
+ };
468
+ }
469
+ }, 0);
470
+ }, y = () => {
471
+ u.value = !1;
472
+ }, g = ($) => {
473
+ I.value = $, f("update:modelValue", $), t.mode === "single" && setTimeout(() => {
474
+ y();
475
+ }, 200), t.mode === "range" && typeof $ == "object" && "start" in $ && $.end && setTimeout(() => {
476
+ y();
477
+ }, 200);
478
+ }, S = ($) => {
479
+ var R, A;
480
+ if (!u.value) return;
481
+ const B = $.target;
482
+ (R = o.value) != null && R.contains(B) || (A = h.value) != null && A.contains(B) || y();
483
+ };
484
+ return Z(() => {
485
+ document.addEventListener("click", S);
486
+ }), ee(() => {
487
+ document.removeEventListener("click", S);
488
+ }), ($, B) => (a(), l("div", {
489
+ class: "date-picker",
490
+ ref_key: "datePickerRef",
491
+ ref: o
492
+ }, [
493
+ s("div", {
494
+ class: "date-picker-input",
495
+ onClick: z
496
+ }, [
497
+ s("input", {
498
+ type: "text",
499
+ id: p.value,
500
+ value: q.value,
501
+ placeholder: e.placeholder,
502
+ readonly: "",
503
+ disabled: e.disabled,
504
+ class: w(["date-input", { "date-input--error": e.error }])
505
+ }, null, 10, at),
506
+ B[1] || (B[1] = s("span", { class: "date-icon" }, "📅", -1))
507
+ ]),
508
+ e.error ? (a(), l("span", lt, r(e.error), 1)) : c("", !0),
509
+ (a(), W(J, { to: "body" }, [
510
+ u.value ? (a(), l("div", {
511
+ key: 0,
512
+ ref_key: "dropdownRef",
513
+ ref: h,
514
+ class: "date-picker-dropdown",
515
+ style: U(b.value)
516
+ }, [
517
+ X(Te, {
518
+ modelValue: I.value,
519
+ "onUpdate:modelValue": [
520
+ B[0] || (B[0] = (R) => I.value = R),
521
+ g
522
+ ],
523
+ mode: e.mode,
524
+ "min-date": e.minDate,
525
+ "max-date": e.maxDate,
526
+ "disabled-dates": e.disabledDates,
527
+ "first-day-of-week": e.firstDayOfWeek,
528
+ "initial-date": typeof e.modelValue == "string" ? e.modelValue : void 0
529
+ }, null, 8, ["modelValue", "mode", "min-date", "max-date", "disabled-dates", "first-day-of-week", "initial-date"])
530
+ ], 4)) : c("", !0)
531
+ ])),
532
+ u.value ? (a(), l("div", {
533
+ key: 1,
534
+ class: "date-picker-overlay",
535
+ onClick: y
536
+ })) : c("", !0)
537
+ ], 512));
538
+ }
539
+ }), Sa = /* @__PURE__ */ x(st, [["__scopeId", "data-v-0b550c0b"]]), nt = {
540
+ key: 0,
541
+ class: "dropdown__header"
542
+ }, ot = { class: "dropdown__content" }, rt = {
543
+ key: 0,
544
+ class: "dropdown__divider"
545
+ }, dt = ["disabled", "onClick"], it = {
546
+ key: 0,
547
+ class: "dropdown__item-icon"
548
+ }, ct = { class: "dropdown__item-label" }, ut = {
549
+ key: 1,
550
+ class: "dropdown__footer"
551
+ }, mt = /* @__PURE__ */ C({
552
+ __name: "Dropdown",
553
+ props: {
554
+ items: { default: () => [] },
555
+ placement: { default: "bottom-left" },
556
+ closeOnClick: { type: Boolean, default: !0 },
557
+ disabled: { type: Boolean, default: !1 }
558
+ },
559
+ emits: ["select", "open", "close"],
560
+ setup(e, { emit: m }) {
561
+ const t = e, f = m, u = V(null), v = V(null), d = V(!1), p = V({}), o = () => {
562
+ t.disabled || (d.value ? b() : h());
563
+ }, h = () => {
564
+ d.value = !0, f("open"), setTimeout(() => {
565
+ I();
566
+ }, 0);
567
+ }, b = () => {
568
+ d.value = !1, f("close");
569
+ }, I = () => {
570
+ if (!u.value || !v.value) return;
571
+ const _ = u.value.getBoundingClientRect(), y = v.value.getBoundingClientRect();
572
+ let g = 0, S = 0;
573
+ switch (t.placement) {
574
+ case "bottom-left":
575
+ g = _.bottom + 8, S = _.left;
576
+ break;
577
+ case "bottom-right":
578
+ g = _.bottom + 8, S = _.right - y.width;
579
+ break;
580
+ case "top-left":
581
+ g = _.top - y.height - 8, S = _.left;
582
+ break;
583
+ case "top-right":
584
+ g = _.top - y.height - 8, S = _.right - y.width;
585
+ break;
586
+ }
587
+ p.value = {
588
+ top: `${g}px`,
589
+ left: `${S}px`
590
+ };
591
+ }, q = (_) => {
592
+ _.disabled || (f("select", _), t.closeOnClick && b());
593
+ }, P = (_) => {
594
+ _.stopPropagation();
595
+ }, z = (_) => {
596
+ if (!u.value || !v.value) return;
597
+ const y = _.target;
598
+ !u.value.contains(y) && !v.value.contains(y) && b();
599
+ };
600
+ return Z(() => {
601
+ document.addEventListener("click", z), window.addEventListener("scroll", I, !0), window.addEventListener("resize", I);
602
+ }), ve(() => {
603
+ document.removeEventListener("click", z), window.removeEventListener("scroll", I, !0), window.removeEventListener("resize", I);
604
+ }), (_, y) => (a(), l("div", {
605
+ ref_key: "dropdownRef",
606
+ ref: u,
607
+ class: w(["dropdown", { "dropdown--disabled": e.disabled }])
608
+ }, [
609
+ s("div", {
610
+ onClick: o,
611
+ class: "dropdown__trigger"
612
+ }, [
613
+ D(_.$slots, "trigger", {}, () => [
614
+ y[0] || (y[0] = s("button", {
615
+ type: "button",
616
+ class: "dropdown__button"
617
+ }, " Menu ", -1))
618
+ ], !0)
619
+ ]),
620
+ (a(), W(J, { to: "body" }, [
621
+ X(te, { name: "dropdown-fade" }, {
622
+ default: j(() => [
623
+ d.value ? (a(), l("div", {
624
+ key: 0,
625
+ ref_key: "dropdownMenuRef",
626
+ ref: v,
627
+ class: w(["dropdown__menu", `dropdown__menu--${e.placement}`]),
628
+ style: U(p.value),
629
+ onClick: P
630
+ }, [
631
+ _.$slots.header ? (a(), l("div", nt, [
632
+ D(_.$slots, "header", {}, void 0, !0)
633
+ ])) : c("", !0),
634
+ s("div", ot, [
635
+ D(_.$slots, "default", {}, () => [
636
+ (a(!0), l(L, null, N(e.items, (g, S) => (a(), l(L, { key: S }, [
637
+ g.divider ? (a(), l("div", rt)) : (a(), l("button", {
638
+ key: 1,
639
+ type: "button",
640
+ class: w(["dropdown__item", { "dropdown__item--disabled": g.disabled }]),
641
+ disabled: g.disabled,
642
+ onClick: () => q(g)
643
+ }, [
644
+ g.icon ? (a(), l("span", it, r(g.icon), 1)) : c("", !0),
645
+ s("span", ct, r(g.label), 1)
646
+ ], 10, dt))
647
+ ], 64))), 128))
648
+ ], !0)
649
+ ]),
650
+ _.$slots.footer ? (a(), l("div", ut, [
651
+ D(_.$slots, "footer", {}, void 0, !0)
652
+ ])) : c("", !0)
653
+ ], 6)) : c("", !0)
654
+ ]),
655
+ _: 3
656
+ })
657
+ ]))
658
+ ], 2));
659
+ }
660
+ }), Ba = /* @__PURE__ */ x(mt, [["__scopeId", "data-v-d2e8b407"]]), ft = {
661
+ key: 0,
662
+ class: "empty-state__icon"
663
+ }, vt = { class: "empty-state__icon-text" }, ht = { class: "empty-state__content" }, bt = {
664
+ key: 0,
665
+ class: "empty-state__title"
666
+ }, yt = {
667
+ key: 1,
668
+ class: "empty-state__description"
669
+ }, pt = {
670
+ key: 2,
671
+ class: "empty-state__body"
672
+ }, gt = {
673
+ key: 1,
674
+ class: "empty-state__actions"
675
+ }, kt = /* @__PURE__ */ C({
676
+ __name: "EmptyState",
677
+ props: {
678
+ title: { default: "" },
679
+ description: { default: "" },
680
+ icon: { default: "" },
681
+ actionText: { default: "" },
682
+ actionVariant: { default: "primary" },
683
+ size: { default: "medium" }
684
+ },
685
+ emits: ["action"],
686
+ setup(e, { emit: m }) {
687
+ const t = m, f = () => {
688
+ t("action");
689
+ };
690
+ return (u, v) => (a(), l("div", {
691
+ class: w(["empty-state", `empty-state--${e.size}`])
692
+ }, [
693
+ e.icon || u.$slots.icon ? (a(), l("div", ft, [
694
+ D(u.$slots, "icon", {}, () => [
695
+ s("span", vt, r(e.icon), 1)
696
+ ], !0)
697
+ ])) : c("", !0),
698
+ s("div", ht, [
699
+ e.title || u.$slots.title ? (a(), l("h3", bt, [
700
+ D(u.$slots, "title", {}, () => [
701
+ Y(r(e.title), 1)
702
+ ], !0)
703
+ ])) : c("", !0),
704
+ e.description || u.$slots.description ? (a(), l("p", yt, [
705
+ D(u.$slots, "description", {}, () => [
706
+ Y(r(e.description), 1)
707
+ ], !0)
708
+ ])) : c("", !0),
709
+ u.$slots.default ? (a(), l("div", pt, [
710
+ D(u.$slots, "default", {}, void 0, !0)
711
+ ])) : c("", !0)
712
+ ]),
713
+ e.actionText || u.$slots.action ? (a(), l("div", gt, [
714
+ D(u.$slots, "action", {}, () => [
715
+ e.actionText ? (a(), l("button", {
716
+ key: 0,
717
+ type: "button",
718
+ class: w(["empty-state__button", `empty-state__button--${e.actionVariant}`]),
719
+ onClick: f
720
+ }, r(e.actionText), 3)) : c("", !0)
721
+ ], !0)
722
+ ])) : c("", !0)
723
+ ], 2));
724
+ }
725
+ }), Ma = /* @__PURE__ */ x(kt, [["__scopeId", "data-v-24e65287"]]), $t = {
726
+ key: 0,
727
+ class: "error-summary",
728
+ role: "alert",
729
+ "aria-live": "assertive"
730
+ }, _t = { class: "error-summary__header" }, wt = { class: "error-summary__title" }, Vt = { class: "error-summary__subtitle" }, Dt = { key: 0 }, Ct = { class: "error-summary__list" }, xt = ["href"], It = /* @__PURE__ */ C({
731
+ __name: "ErrorSummary",
732
+ props: {
733
+ title: { default: "There is a problem" },
734
+ errors: {}
735
+ },
736
+ setup(e) {
737
+ return (m, t) => e.errors.length ? (a(), l("div", $t, [
738
+ s("div", _t, [
739
+ t[1] || (t[1] = s("span", { class: "error-summary__icon" }, "⚠️", -1)),
740
+ s("div", null, [
741
+ s("h4", wt, r(e.title), 1),
742
+ s("p", Vt, [
743
+ Y("Please fix the following " + r(e.errors.length) + " issue", 1),
744
+ e.errors.length !== 1 ? (a(), l("span", Dt, "s")) : c("", !0),
745
+ t[0] || (t[0] = Y(":", -1))
746
+ ])
747
+ ])
748
+ ]),
749
+ s("ul", Ct, [
750
+ (a(!0), l(L, null, N(e.errors, (f) => (a(), l("li", {
751
+ key: f.id,
752
+ class: "error-summary__item"
753
+ }, [
754
+ s("a", {
755
+ href: `#${f.id}`,
756
+ class: "error-summary__link"
757
+ }, r(f.message), 9, xt)
758
+ ]))), 128))
759
+ ])
760
+ ])) : c("", !0);
761
+ }
762
+ }), Pa = /* @__PURE__ */ x(It, [["__scopeId", "data-v-2eeef3a2"]]), St = ["for"], Bt = {
763
+ key: 1,
764
+ class: "form-group__hint"
765
+ }, Mt = {
766
+ key: 2,
767
+ class: "form-group__error"
768
+ }, Pt = /* @__PURE__ */ C({
769
+ __name: "FormGroup",
770
+ props: {
771
+ label: { default: "" },
772
+ id: { default: "" },
773
+ hint: { default: "" },
774
+ error: { default: "" },
775
+ required: { type: Boolean, default: !1 }
776
+ },
777
+ setup(e) {
778
+ return (m, t) => (a(), l("div", {
779
+ class: w(["form-group", { "form-group--error": e.error }])
780
+ }, [
781
+ e.label ? (a(), l("label", {
782
+ key: 0,
783
+ for: e.id,
784
+ class: "form-group__label"
785
+ }, r(e.label), 9, St)) : c("", !0),
786
+ D(m.$slots, "default", {}, void 0, !0),
787
+ e.hint && !e.error ? (a(), l("small", Bt, r(e.hint), 1)) : c("", !0),
788
+ e.error ? (a(), l("small", Mt, r(e.error), 1)) : c("", !0)
789
+ ], 2));
790
+ }
791
+ }), Oa = /* @__PURE__ */ x(Pt, [["__scopeId", "data-v-328da37c"]]), Ot = /* @__PURE__ */ C({
792
+ __name: "Heading",
793
+ props: {
794
+ tag: { default: "h2" },
795
+ size: { default: "2" },
796
+ weight: { default: "bold" },
797
+ align: { default: "left" }
798
+ },
799
+ setup(e) {
800
+ return (m, t) => (a(), W(K(e.tag), {
801
+ class: w(["heading", `heading--${e.size}`, `heading--${e.weight}`, { [`heading--${e.align}`]: e.align }])
802
+ }, {
803
+ default: j(() => [
804
+ D(m.$slots, "default", {}, void 0, !0)
805
+ ]),
806
+ _: 3
807
+ }, 8, ["class"]));
808
+ }
809
+ }), Ta = /* @__PURE__ */ x(Ot, [["__scopeId", "data-v-507e54e1"]]), Tt = { class: "input-wrapper" }, Et = ["for"], Lt = ["id", "type", "value", "placeholder", "disabled", "required"], Rt = {
810
+ key: 1,
811
+ class: "input-error"
812
+ }, At = {
813
+ key: 2,
814
+ class: "input-hint"
815
+ }, Nt = /* @__PURE__ */ C({
816
+ __name: "Input",
817
+ props: {
818
+ modelValue: {},
819
+ id: {},
820
+ label: {},
821
+ type: { default: "text" },
822
+ placeholder: {},
823
+ disabled: { type: Boolean, default: !1 },
824
+ required: { type: Boolean, default: !1 },
825
+ error: {},
826
+ hint: {}
827
+ },
828
+ emits: ["update:modelValue"],
829
+ setup(e, { emit: m }) {
830
+ let t = 0;
831
+ const f = e, u = m, v = `input-${++t}`, d = M(() => f.id || v), p = (o) => {
832
+ const h = o.target;
833
+ u("update:modelValue", h.value);
834
+ };
835
+ return (o, h) => (a(), l("div", Tt, [
836
+ e.label ? (a(), l("label", {
837
+ key: 0,
838
+ for: d.value,
839
+ class: "input-label"
840
+ }, r(e.label), 9, Et)) : c("", !0),
841
+ s("input", {
842
+ id: d.value,
843
+ type: e.type,
844
+ value: e.modelValue,
845
+ placeholder: e.placeholder,
846
+ disabled: e.disabled,
847
+ required: e.required,
848
+ class: w(["input-field", { "input-field--error": e.error, "input-field--disabled": e.disabled }]),
849
+ onInput: p
850
+ }, null, 42, Lt),
851
+ e.error ? (a(), l("span", Rt, r(e.error), 1)) : c("", !0),
852
+ e.hint && !e.error ? (a(), l("span", At, r(e.hint), 1)) : c("", !0)
853
+ ]));
854
+ }
855
+ }), Ea = /* @__PURE__ */ x(Nt, [["__scopeId", "data-v-95616b7b"]]), qt = { class: "modal-header" }, zt = { class: "modal-title" }, Yt = { class: "modal-body" }, Ft = {
856
+ key: 0,
857
+ class: "modal-footer"
858
+ }, Wt = /* @__PURE__ */ C({
859
+ __name: "Modal",
860
+ props: {
861
+ modelValue: { type: Boolean },
862
+ title: { default: "" },
863
+ size: { default: "medium" },
864
+ closable: { type: Boolean, default: !0 },
865
+ closeOnOverlay: { type: Boolean, default: !0 }
866
+ },
867
+ emits: ["update:modelValue", "close"],
868
+ setup(e, { emit: m }) {
869
+ const t = e, f = m, u = () => {
870
+ f("update:modelValue", !1), f("close");
871
+ }, v = V(null), d = V(!1), p = V(!1), o = V(0), h = V(0), b = V(null), I = V(null), q = (y) => {
872
+ if (!d.value) return;
873
+ const g = Math.abs(y.clientX - o.value), S = Math.abs(y.clientY - h.value);
874
+ (g > 5 || S > 5) && (p.value = !0);
875
+ }, P = (y) => {
876
+ if (window.removeEventListener("pointermove", q), window.removeEventListener("pointerup", P), !d.value || I.value !== "overlay") {
877
+ d.value = !1, p.value = !1, I.value = null;
878
+ return;
879
+ }
880
+ const g = v.value, S = g && y.target === g;
881
+ t.closeOnOverlay && S && !p.value && u(), g && b.value !== null && g.hasPointerCapture(b.value) && g.releasePointerCapture(b.value), b.value = null, d.value = !1, p.value = !1, I.value = null;
882
+ }, z = (y) => {
883
+ if (!t.closeOnOverlay || y.target !== y.currentTarget) return;
884
+ d.value = !0, p.value = !1, I.value = "overlay", o.value = y.clientX, h.value = y.clientY;
885
+ const g = v.value;
886
+ g && (b.value = y.pointerId, g.setPointerCapture(y.pointerId)), window.addEventListener("pointermove", q), window.addEventListener("pointerup", P);
887
+ }, _ = () => {
888
+ I.value = "content";
889
+ };
890
+ return ee(() => {
891
+ window.removeEventListener("pointermove", q), window.removeEventListener("pointerup", P);
892
+ }), Q(() => t.modelValue, (y) => {
893
+ y ? document.body.style.overflow = "hidden" : document.body.style.overflow = "";
894
+ }), (y, g) => (a(), W(J, { to: "body" }, [
895
+ X(te, { name: "modal" }, {
896
+ default: j(() => [
897
+ e.modelValue ? (a(), l("div", {
898
+ key: 0,
899
+ ref_key: "overlayRef",
900
+ ref: v,
901
+ class: "modal-overlay",
902
+ onPointerdown: T(z, ["self"])
903
+ }, [
904
+ s("div", {
905
+ class: w(["modal-content", [`modal-content--${e.size}`]]),
906
+ onClick: g[0] || (g[0] = T(() => {
907
+ }, ["stop"])),
908
+ onPointerdown: T(_, ["stop"]),
909
+ onPointerup: g[1] || (g[1] = T(() => {
910
+ }, ["stop"]))
911
+ }, [
912
+ s("div", qt, [
913
+ D(y.$slots, "header", {}, () => [
914
+ s("h3", zt, r(e.title), 1)
915
+ ], !0),
916
+ e.closable ? (a(), l("button", {
917
+ key: 0,
918
+ onClick: u,
919
+ class: "modal-close",
920
+ "aria-label": "Close modal"
921
+ }, " × ")) : c("", !0)
922
+ ]),
923
+ s("div", Yt, [
924
+ D(y.$slots, "default", {}, void 0, !0)
925
+ ]),
926
+ y.$slots.footer ? (a(), l("div", Ft, [
927
+ D(y.$slots, "footer", {}, void 0, !0)
928
+ ])) : c("", !0)
929
+ ], 34)
930
+ ], 544)) : c("", !0)
931
+ ]),
932
+ _: 3
933
+ })
934
+ ]));
935
+ }
936
+ }), La = /* @__PURE__ */ x(Wt, [["__scopeId", "data-v-0621c687"]]), Ht = { class: "progress-bar" }, Ut = {
937
+ key: 0,
938
+ class: "progress-bar__header"
939
+ }, jt = { class: "progress-bar__label" }, Jt = { class: "progress-bar__percentage" }, Xt = {
940
+ key: 0,
941
+ class: "progress-bar__text"
942
+ }, Gt = /* @__PURE__ */ C({
943
+ __name: "ProgressBar",
944
+ props: {
945
+ percentage: { default: 0 },
946
+ label: { default: "" },
947
+ showLabel: { type: Boolean, default: !0 },
948
+ showPercentageInBar: { type: Boolean, default: !1 },
949
+ height: { default: 12 },
950
+ variant: { default: "primary" },
951
+ animated: { type: Boolean, default: !0 }
952
+ },
953
+ setup(e) {
954
+ const m = e, t = M(() => Math.min(Math.max(m.percentage, 0), 100)), f = M(() => Math.round(t.value));
955
+ return (u, v) => (a(), l("div", Ht, [
956
+ e.showLabel ? (a(), l("div", Ut, [
957
+ s("span", jt, r(e.label), 1),
958
+ s("span", Jt, r(f.value) + "%", 1)
959
+ ])) : c("", !0),
960
+ s("div", {
961
+ class: "progress-bar__track",
962
+ style: U({ height: `${e.height}px` })
963
+ }, [
964
+ s("div", {
965
+ class: w(["progress-bar__fill", [
966
+ `progress-bar__fill--${e.variant}`,
967
+ { "progress-bar__fill--animated": e.animated }
968
+ ]]),
969
+ style: U({ width: `${t.value}%` })
970
+ }, [
971
+ e.showPercentageInBar ? (a(), l("span", Xt, r(f.value) + "% ", 1)) : c("", !0)
972
+ ], 6)
973
+ ], 4)
974
+ ]));
975
+ }
976
+ }), Ra = /* @__PURE__ */ x(Gt, [["__scopeId", "data-v-1ee50aa7"]]), Kt = { class: "select-wrapper" }, Qt = ["for"], Zt = ["id", "value", "disabled", "required"], ea = {
977
+ key: 0,
978
+ value: "",
979
+ disabled: ""
980
+ }, ta = ["value"], aa = {
981
+ key: 1,
982
+ class: "select-error"
983
+ }, la = {
984
+ key: 2,
985
+ class: "select-hint"
986
+ }, sa = /* @__PURE__ */ C({
987
+ __name: "Select",
988
+ props: {
989
+ modelValue: {},
990
+ id: {},
991
+ label: {},
992
+ options: { default: () => [] },
993
+ placeholder: {},
994
+ disabled: { type: Boolean, default: !1 },
995
+ required: { type: Boolean, default: !1 },
996
+ error: {},
997
+ hint: {}
998
+ },
999
+ emits: ["update:modelValue"],
1000
+ setup(e, { emit: m }) {
1001
+ let t = 0;
1002
+ const f = e, u = m, v = `select-${++t}`, d = M(() => f.id || v), p = (o) => {
1003
+ const h = o.target;
1004
+ u("update:modelValue", h.value);
1005
+ };
1006
+ return (o, h) => (a(), l("div", Kt, [
1007
+ e.label ? (a(), l("label", {
1008
+ key: 0,
1009
+ for: d.value,
1010
+ class: "select-label"
1011
+ }, r(e.label), 9, Qt)) : c("", !0),
1012
+ s("select", {
1013
+ id: d.value,
1014
+ value: e.modelValue,
1015
+ disabled: e.disabled,
1016
+ required: e.required,
1017
+ class: w([
1018
+ "select-field",
1019
+ {
1020
+ "select-field--error": e.error,
1021
+ "select-field--disabled": e.disabled,
1022
+ "select-field--placeholder": !e.modelValue || e.modelValue === ""
1023
+ }
1024
+ ]),
1025
+ onChange: p
1026
+ }, [
1027
+ e.placeholder ? (a(), l("option", ea, r(e.placeholder), 1)) : c("", !0),
1028
+ (a(!0), l(L, null, N(e.options, (b) => (a(), l("option", {
1029
+ key: b.value,
1030
+ value: b.value
1031
+ }, r(b.label), 9, ta))), 128))
1032
+ ], 42, Zt),
1033
+ e.error ? (a(), l("span", aa, r(e.error), 1)) : c("", !0),
1034
+ e.hint && !e.error ? (a(), l("span", la, r(e.hint), 1)) : c("", !0)
1035
+ ]));
1036
+ }
1037
+ }), Aa = /* @__PURE__ */ x(sa, [["__scopeId", "data-v-aeafe36b"]]), na = { class: "stat-card__title" }, oa = {
1038
+ key: 0,
1039
+ class: "stat-card__input-wrapper"
1040
+ }, ra = {
1041
+ key: 0,
1042
+ class: "stat-card__prefix"
1043
+ }, da = ["value", "placeholder"], ia = {
1044
+ key: 1,
1045
+ class: "stat-card__suffix"
1046
+ }, ca = {
1047
+ key: 1,
1048
+ class: "stat-card__value-wrapper"
1049
+ }, ua = {
1050
+ key: 0,
1051
+ class: "stat-card__prefix"
1052
+ }, ma = {
1053
+ key: 1,
1054
+ class: "stat-card__suffix"
1055
+ }, fa = { class: "stat-card__trend-icon" }, va = { class: "stat-card__trend-value" }, ha = /* @__PURE__ */ C({
1056
+ __name: "StatCard",
1057
+ props: {
1058
+ title: {},
1059
+ value: {},
1060
+ variant: { default: "default" },
1061
+ prefix: { default: "" },
1062
+ suffix: { default: "" },
1063
+ editable: { type: Boolean, default: !1 },
1064
+ trend: {}
1065
+ },
1066
+ emits: ["input", "change"],
1067
+ setup(e, { emit: m }) {
1068
+ const t = e, f = m, u = M(() => typeof t.value == "number" ? t.value.toLocaleString() : t.value), v = M(() => typeof t.value == "number" && t.value < 0), d = (o) => {
1069
+ const h = o.target, b = h.valueAsNumber || h.value;
1070
+ f("input", b);
1071
+ }, p = (o) => {
1072
+ const h = o.target, b = h.valueAsNumber || h.value;
1073
+ f("change", b);
1074
+ };
1075
+ return (o, h) => (a(), l("div", {
1076
+ class: w(["stat-card", `stat-card--${e.variant}`])
1077
+ }, [
1078
+ s("h3", na, r(e.title), 1),
1079
+ e.editable ? (a(), l("div", oa, [
1080
+ e.prefix ? (a(), l("span", ra, r(e.prefix), 1)) : c("", !0),
1081
+ s("input", {
1082
+ value: e.value,
1083
+ onInput: d,
1084
+ onChange: p,
1085
+ type: "number",
1086
+ class: "stat-card__input",
1087
+ placeholder: String(e.value)
1088
+ }, null, 40, da),
1089
+ e.suffix ? (a(), l("span", ia, r(e.suffix), 1)) : c("", !0)
1090
+ ])) : (a(), l("div", ca, [
1091
+ s("p", {
1092
+ class: w(["stat-card__value", { "stat-card__value--negative": v.value }])
1093
+ }, [
1094
+ e.prefix ? (a(), l("span", ua, r(e.prefix), 1)) : c("", !0),
1095
+ s("span", null, r(u.value), 1),
1096
+ e.suffix ? (a(), l("span", ma, r(e.suffix), 1)) : c("", !0)
1097
+ ], 2),
1098
+ e.trend ? (a(), l("div", {
1099
+ key: 0,
1100
+ class: w(["stat-card__trend", `stat-card__trend--${e.trend.direction}`])
1101
+ }, [
1102
+ s("span", fa, r(e.trend.direction === "up" ? "↑" : "↓"), 1),
1103
+ s("span", va, r(Math.abs(e.trend.value)) + "%", 1)
1104
+ ], 2)) : c("", !0)
1105
+ ])),
1106
+ D(o.$slots, "footer", {}, void 0, !0)
1107
+ ], 2));
1108
+ }
1109
+ }), Na = /* @__PURE__ */ x(ha, [["__scopeId", "data-v-7858d875"]]), ba = /* @__PURE__ */ C({
1110
+ __name: "Tag",
1111
+ props: {
1112
+ variant: { default: "default" },
1113
+ size: { default: "medium" }
1114
+ },
1115
+ setup(e) {
1116
+ return (m, t) => (a(), l("span", {
1117
+ class: w(["tag", `tag--${e.variant}`, `tag--${e.size}`])
1118
+ }, [
1119
+ D(m.$slots, "default", {}, void 0, !0)
1120
+ ], 2));
1121
+ }
1122
+ }), qa = /* @__PURE__ */ x(ba, [["__scopeId", "data-v-df5365be"]]), ya = { class: "textarea-wrapper" }, pa = ["for"], ga = ["id", "value", "placeholder", "disabled", "required", "rows"], ka = {
1123
+ key: 1,
1124
+ class: "textarea-error"
1125
+ }, $a = {
1126
+ key: 2,
1127
+ class: "textarea-hint"
1128
+ }, _a = /* @__PURE__ */ C({
1129
+ __name: "TextArea",
1130
+ props: {
1131
+ modelValue: {},
1132
+ id: {},
1133
+ label: {},
1134
+ placeholder: {},
1135
+ disabled: { type: Boolean, default: !1 },
1136
+ required: { type: Boolean, default: !1 },
1137
+ rows: { default: 4 },
1138
+ error: {},
1139
+ hint: {}
1140
+ },
1141
+ emits: ["update:modelValue"],
1142
+ setup(e, { emit: m }) {
1143
+ let t = 0;
1144
+ const f = e, u = m, v = `textarea-${++t}`, d = M(() => f.id || v), p = (o) => {
1145
+ const h = o.target;
1146
+ u("update:modelValue", h.value);
1147
+ };
1148
+ return (o, h) => (a(), l("div", ya, [
1149
+ e.label ? (a(), l("label", {
1150
+ key: 0,
1151
+ for: d.value,
1152
+ class: "textarea-label"
1153
+ }, r(e.label), 9, pa)) : c("", !0),
1154
+ s("textarea", {
1155
+ id: d.value,
1156
+ value: e.modelValue,
1157
+ placeholder: e.placeholder,
1158
+ disabled: e.disabled,
1159
+ required: e.required,
1160
+ rows: e.rows,
1161
+ class: w(["textarea-field", { "textarea-field--error": e.error, "textarea-field--disabled": e.disabled }]),
1162
+ onInput: p
1163
+ }, null, 42, ga),
1164
+ e.error ? (a(), l("span", ka, r(e.error), 1)) : c("", !0),
1165
+ e.hint && !e.error ? (a(), l("span", $a, r(e.hint), 1)) : c("", !0)
1166
+ ]));
1167
+ }
1168
+ }), za = /* @__PURE__ */ x(_a, [["__scopeId", "data-v-00775f79"]]);
1169
+ export {
1170
+ Va as VBadge,
1171
+ Da as VButton,
1172
+ Te as VCalendar,
1173
+ Ca as VCard,
1174
+ xa as VCheckbox,
1175
+ Ia as VDataTable,
1176
+ Sa as VDatePicker,
1177
+ Ba as VDropdown,
1178
+ Ma as VEmptyState,
1179
+ Pa as VErrorSummary,
1180
+ Oa as VFormGroup,
1181
+ Ta as VHeading,
1182
+ Ea as VInput,
1183
+ La as VModal,
1184
+ Ra as VProgressBar,
1185
+ Aa as VSelect,
1186
+ Na as VStatCard,
1187
+ qa as VTag,
1188
+ za as VTextArea
1189
+ };
1190
+ //# sourceMappingURL=index.js.map