@enos5/enos-vue 0.1.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2966 -0
  2. package/package.json +27 -0
package/dist/index.js ADDED
@@ -0,0 +1,2966 @@
1
+ import { ref as z, computed as f, watch as X, openBlock as s, createElementBlock as n, createElementVNode as r, Fragment as P, renderList as W, normalizeClass as _, normalizeStyle as he, toDisplayString as $, createBlock as A, createCommentVNode as O, renderSlot as g, createVNode as E, Transition as Y, withCtx as F, mergeProps as M, useSlots as oe, unref as V, withDirectives as G, vShow as Z, watchEffect as Me, onMounted as J, vModelCheckbox as ze, useAttrs as H, nextTick as de, onBeforeUnmount as Fe, Teleport as Ue, withModifiers as ue, onUnmounted as ve, isRef as ie, createTextVNode as ae, resolveDynamicComponent as xe, vModelText as Ne } from "vue";
2
+ import { usePage as Ee, Link as ee } from "@inertiajs/vue3";
3
+ import { useI18n as Ke } from "vue-i18n";
4
+ import { CheckCircleIcon as Re, ExclamationTriangleIcon as we, XMarkIcon as Pe, LockClosedIcon as He, ChevronDownIcon as ce, PhotoIcon as We, ExclamationCircleIcon as qe, ChevronUpIcon as ke, MagnifyingGlassIcon as Ge } from "@heroicons/vue/24/outline";
5
+ const Xe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
+ __proto__: null,
7
+ get ActionCard() {
8
+ return tt;
9
+ },
10
+ get ActionMessage() {
11
+ return st;
12
+ },
13
+ get ActionSection() {
14
+ return pt;
15
+ },
16
+ get ApplicationLogo() {
17
+ return ht;
18
+ },
19
+ get AuthenticationCard() {
20
+ return St;
21
+ },
22
+ get Badge() {
23
+ return Ct;
24
+ },
25
+ get Banner() {
26
+ return Lt;
27
+ },
28
+ get Card() {
29
+ return $e;
30
+ },
31
+ get CardTabs() {
32
+ return Se;
33
+ },
34
+ get Checkbox() {
35
+ return Ot;
36
+ },
37
+ get CheckboxInput() {
38
+ return Ce;
39
+ },
40
+ get CheckboxMultipleInput() {
41
+ return Oe;
42
+ },
43
+ get ConfirmationModal() {
44
+ return hl;
45
+ },
46
+ get CustomSelect() {
47
+ return Be;
48
+ },
49
+ get DangerButton() {
50
+ return xl;
51
+ },
52
+ get DateInput() {
53
+ return Ae;
54
+ },
55
+ get DialogModal() {
56
+ return Cl;
57
+ },
58
+ get Divider() {
59
+ return fe;
60
+ },
61
+ get Dropdown() {
62
+ return Vl;
63
+ },
64
+ get DropdownLink() {
65
+ return Al;
66
+ },
67
+ get EnosUiPlugin() {
68
+ return ea;
69
+ },
70
+ get FormSection() {
71
+ return Ol;
72
+ },
73
+ get ImageInput() {
74
+ return je;
75
+ },
76
+ get InputError() {
77
+ return zl;
78
+ },
79
+ get InputGroup() {
80
+ return re;
81
+ },
82
+ get InputLabel() {
83
+ return El;
84
+ },
85
+ get Modal() {
86
+ return me;
87
+ },
88
+ get NavLink() {
89
+ return Kl;
90
+ },
91
+ get NotationInput() {
92
+ return Ie;
93
+ },
94
+ get PrimaryButton() {
95
+ return Pl;
96
+ },
97
+ get PrimaryLinkButton() {
98
+ return ye;
99
+ },
100
+ get RadioInput() {
101
+ return Le;
102
+ },
103
+ get RadioMultipleInput() {
104
+ return De;
105
+ },
106
+ get ResponsiveNavLink() {
107
+ return ql;
108
+ },
109
+ get SecondaryButton() {
110
+ return Xl;
111
+ },
112
+ get SecondaryLinkButton() {
113
+ return Ql;
114
+ },
115
+ get SectionBorder() {
116
+ return es;
117
+ },
118
+ get SectionTitle() {
119
+ return pe;
120
+ },
121
+ get SelectInput() {
122
+ return Te;
123
+ },
124
+ get SortControls() {
125
+ return is;
126
+ },
127
+ get TableList() {
128
+ return Vs;
129
+ },
130
+ get TableListForm() {
131
+ return qs;
132
+ },
133
+ get TertiaryButton() {
134
+ return Xs;
135
+ },
136
+ get TertiaryLinkButton() {
137
+ return Qs;
138
+ },
139
+ get TextArea() {
140
+ return Ve;
141
+ },
142
+ get TextInput() {
143
+ return _e;
144
+ },
145
+ get ThSortable() {
146
+ return be;
147
+ },
148
+ get WarningButton() {
149
+ return Zs;
150
+ }
151
+ }, Symbol.toStringTag, { value: "Module" })), Je = { class: "border-b border-gray-200/80 bg-gray-50/80 p-2" }, Qe = {
152
+ role: "tablist",
153
+ class: "flex rounded-lg bg-white shadow-sm ring-1 ring-gray-200/80 overflow-hidden"
154
+ }, Ye = ["aria-selected", "tabindex", "onClick", "onKeydown"], Se = {
155
+ __name: "CardTabs",
156
+ props: {
157
+ tabs: {
158
+ type: Array,
159
+ default: () => [],
160
+ validator: (e) => e.every((a) => typeof a == "object" && a !== null && typeof a.value == "string" && a.value.length > 0 && typeof a.label == "string")
161
+ },
162
+ activeTab: {
163
+ type: String,
164
+ default: ""
165
+ }
166
+ },
167
+ emits: [
168
+ "update:activeTab",
169
+ "tab-click"
170
+ ],
171
+ setup(e, { emit: a }) {
172
+ const t = e, l = a, o = z([]), d = f(() => t.tabs.map((h) => h.value)), i = f(() => d.value.includes(t.activeTab) ? t.activeTab : d.value[0] ?? "");
173
+ X(i, (h) => {
174
+ h !== t.activeTab && l("update:activeTab", h);
175
+ }, { immediate: !0 });
176
+ const u = (h, b) => {
177
+ o.value[b] = h;
178
+ }, k = (h) => {
179
+ !h || h === t.activeTab || (l("update:activeTab", h), l("tab-click", h));
180
+ }, x = (h) => {
181
+ o.value[h]?.focus();
182
+ }, T = (h, b) => {
183
+ if (t.tabs.length === 0)
184
+ return;
185
+ let C = b;
186
+ switch (h.key) {
187
+ case "ArrowRight":
188
+ case "ArrowDown":
189
+ C = (b + 1) % t.tabs.length;
190
+ break;
191
+ case "ArrowLeft":
192
+ case "ArrowUp":
193
+ C = (b - 1 + t.tabs.length) % t.tabs.length;
194
+ break;
195
+ case "Home":
196
+ C = 0;
197
+ break;
198
+ case "End":
199
+ C = t.tabs.length - 1;
200
+ break;
201
+ default:
202
+ return;
203
+ }
204
+ h.preventDefault(), k(t.tabs[C].value), x(C);
205
+ };
206
+ return (h, b) => (s(), n("div", Je, [
207
+ r("div", Qe, [
208
+ (s(!0), n(P, null, W(e.tabs, (C, p) => (s(), n("button", {
209
+ key: C.value,
210
+ ref_for: !0,
211
+ ref: (L) => u(L, p),
212
+ type: "button",
213
+ style: he({ width: `${100 / e.tabs.length}%` }),
214
+ role: "tab",
215
+ "aria-selected": i.value === C.value,
216
+ tabindex: i.value === C.value ? 0 : -1,
217
+ class: _([
218
+ "px-4 py-3 text-center text-sm font-semibold tracking-wide transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500/40 focus-visible:ring-inset",
219
+ i.value === C.value ? "bg-blue-50 text-blue-700 shadow-[inset_0_-2px_0_0_rgb(37_99_235)]" : "text-gray-700 hover:bg-gray-50",
220
+ {
221
+ "border-r border-gray-200/80": p !== e.tabs.length - 1
222
+ }
223
+ ]),
224
+ onClick: (L) => k(C.value),
225
+ onKeydown: (L) => T(L, p)
226
+ }, $(C.label), 47, Ye))), 128))
227
+ ])
228
+ ]));
229
+ }
230
+ }, Ze = {
231
+ key: 0,
232
+ class: "mb-4"
233
+ }, et = {
234
+ key: 1,
235
+ class: "text-lg font-semibold text-gray-900 mb-4"
236
+ }, $e = {
237
+ __name: "Card",
238
+ props: {
239
+ title: {
240
+ type: String,
241
+ default: ""
242
+ },
243
+ sticky: {
244
+ type: Boolean,
245
+ default: !1
246
+ },
247
+ paddingClass: {
248
+ type: String,
249
+ default: "p-6 lg:p-8"
250
+ },
251
+ cardClass: {
252
+ type: String,
253
+ default: ""
254
+ },
255
+ overflowClass: {
256
+ type: String,
257
+ default: "overflow-visible"
258
+ },
259
+ contentClass: {
260
+ type: String,
261
+ default: ""
262
+ },
263
+ tabs: {
264
+ type: Array,
265
+ default: () => [],
266
+ validator: (e) => e.every((a) => typeof a == "object" && a !== null && typeof a.value == "string" && a.value.length > 0 && typeof a.label == "string")
267
+ },
268
+ activeTab: {
269
+ type: String,
270
+ default: ""
271
+ }
272
+ },
273
+ emits: [
274
+ "update:activeTab",
275
+ "tab-click"
276
+ ],
277
+ setup(e) {
278
+ const a = e, t = z(""), l = z("right"), o = f(() => a.tabs.findIndex((d) => d.value === a.activeTab));
279
+ return f(() => a.tabs.findIndex((d) => d.value === t.value)), X(o, (d, i) => {
280
+ i !== void 0 && i !== -1 && d !== -1 && d !== i && (l.value = d > i ? "right" : "left", t.value = a.activeTab);
281
+ }), (d, i) => (s(), n("div", {
282
+ class: _(["bg-white/80 backdrop-blur-sm border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)]", e.overflowClass, { "sticky top-6 self-start": e.sticky }, e.cardClass])
283
+ }, [
284
+ e.tabs.length > 0 ? (s(), A(Se, {
285
+ key: 0,
286
+ tabs: e.tabs,
287
+ "active-tab": e.activeTab,
288
+ "onUpdate:activeTab": i[0] || (i[0] = (u) => d.$emit("update:activeTab", u)),
289
+ onTabClick: i[1] || (i[1] = (u) => d.$emit("tab-click", u))
290
+ }, null, 8, ["tabs", "active-tab"])) : O("", !0),
291
+ r("div", {
292
+ class: _(e.paddingClass)
293
+ }, [
294
+ d.$slots.customTitle ? (s(), n("div", Ze, [
295
+ g(d.$slots, "customTitle")
296
+ ])) : e.title ? (s(), n("h3", et, $(e.title), 1)) : O("", !0),
297
+ r("div", {
298
+ class: _(["relative", e.tabs.length > 0 ? "overflow-hidden" : "overflow-visible"])
299
+ }, [
300
+ E(Y, {
301
+ "enter-active-class": "transition-all duration-200 ease-in-out",
302
+ "enter-from-class": l.value === "right" ? "translate-x-full opacity-0" : "-translate-x-full opacity-0",
303
+ "enter-to-class": "translate-x-0 opacity-100",
304
+ "leave-active-class": "transition-all duration-200 ease-in-out",
305
+ "leave-from-class": "translate-x-0 opacity-100",
306
+ "leave-to-class": l.value === "right" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
307
+ mode: "out-in"
308
+ }, {
309
+ default: F(() => [
310
+ (s(), n("div", {
311
+ key: e.activeTab,
312
+ class: _([e.tabs.length > 0 ? "p-2" : "", e.contentClass])
313
+ }, [
314
+ g(d.$slots, "default")
315
+ ], 2))
316
+ ]),
317
+ _: 3
318
+ }, 8, ["enter-from-class", "leave-to-class"])
319
+ ], 2)
320
+ ], 2)
321
+ ], 2));
322
+ }
323
+ }, fe = /* @__PURE__ */ Object.assign({
324
+ inheritAttrs: !1
325
+ }, {
326
+ __name: "Divider",
327
+ setup(e) {
328
+ return (a, t) => (s(), n("div", M({ class: "border-t border-gray-200" }, a.$attrs), [
329
+ g(a.$slots, "default")
330
+ ], 16));
331
+ }
332
+ }), tt = {
333
+ __name: "ActionCard",
334
+ props: {
335
+ title: {
336
+ type: String,
337
+ default: ""
338
+ },
339
+ actionsClass: {
340
+ type: String,
341
+ default: "space-y-3"
342
+ }
343
+ },
344
+ setup(e) {
345
+ const a = oe();
346
+ return (t, l) => (s(), A($e, {
347
+ title: e.title,
348
+ "content-class": e.actionsClass
349
+ }, {
350
+ default: F(() => [
351
+ g(t.$slots, "default"),
352
+ V(a).danger ? (s(), A(fe, {
353
+ key: 0,
354
+ class: "mt-6 pt-4"
355
+ }, {
356
+ default: F(() => [
357
+ g(t.$slots, "danger")
358
+ ]),
359
+ _: 3
360
+ })) : O("", !0)
361
+ ]),
362
+ _: 3
363
+ }, 8, ["title", "content-class"]));
364
+ }
365
+ }, lt = { class: "text-sm text-gray-600" }, st = {
366
+ __name: "ActionMessage",
367
+ props: {
368
+ on: Boolean
369
+ },
370
+ setup(e) {
371
+ return (a, t) => (s(), n("div", null, [
372
+ E(Y, {
373
+ "leave-active-class": "transition ease-in duration-1000",
374
+ "leave-from-class": "opacity-100",
375
+ "leave-to-class": "opacity-0"
376
+ }, {
377
+ default: F(() => [
378
+ G(r("div", lt, [
379
+ g(a.$slots, "default")
380
+ ], 512), [
381
+ [Z, e.on]
382
+ ])
383
+ ]),
384
+ _: 3
385
+ })
386
+ ]));
387
+ }
388
+ }, ge = (e, a) => {
389
+ const t = e.__vccOpts || e;
390
+ for (const [l, o] of a)
391
+ t[l] = o;
392
+ return t;
393
+ }, at = {}, nt = { class: "md:col-span-1 flex justify-between" }, ot = { class: "px-4 sm:px-0" }, rt = { class: "text-lg font-medium text-gray-900" }, it = { class: "mt-1 text-sm text-gray-600" }, dt = { class: "px-4 sm:px-0" };
394
+ function ut(e, a) {
395
+ return s(), n("div", nt, [
396
+ r("div", ot, [
397
+ r("h3", rt, [
398
+ g(e.$slots, "title")
399
+ ]),
400
+ r("p", it, [
401
+ g(e.$slots, "description")
402
+ ])
403
+ ]),
404
+ r("div", dt, [
405
+ g(e.$slots, "aside")
406
+ ])
407
+ ]);
408
+ }
409
+ const pe = /* @__PURE__ */ ge(at, [["render", ut]]), ct = { class: "md:grid md:grid-cols-3 md:gap-6" }, ft = { class: "mt-5 md:mt-0 md:col-span-2" }, gt = { class: "px-4 py-5 sm:p-6 bg-white shadow sm:rounded-lg" }, pt = {
410
+ __name: "ActionSection",
411
+ setup(e) {
412
+ return (a, t) => (s(), n("div", ct, [
413
+ E(pe, null, {
414
+ title: F(() => [
415
+ g(a.$slots, "title")
416
+ ]),
417
+ description: F(() => [
418
+ g(a.$slots, "description")
419
+ ]),
420
+ _: 3
421
+ }),
422
+ r("div", ft, [
423
+ r("div", gt, [
424
+ g(a.$slots, "content")
425
+ ])
426
+ ])
427
+ ]));
428
+ }
429
+ }, mt = {}, yt = {
430
+ viewBox: "0 0 317 48",
431
+ fill: "none",
432
+ xmlns: "http://www.w3.org/2000/svg"
433
+ };
434
+ function bt(e, a) {
435
+ return s(), n("svg", yt, [...a[0] || (a[0] = [
436
+ r("path", {
437
+ d: "M74.09 30.04V13h-4.14v21H82.1v-3.96h-8.01zM95.379 19v1.77c-1.08-1.35-2.7-2.19-4.89-2.19-3.99 0-7.29 3.45-7.29 7.92s3.3 7.92 7.29 7.92c2.19 0 3.81-.84 4.89-2.19V34h3.87V19h-3.87zm-4.17 11.73c-2.37 0-4.14-1.71-4.14-4.23 0-2.52 1.77-4.23 4.14-4.23 2.4 0 4.17 1.71 4.17 4.23 0 2.52-1.77 4.23-4.17 4.23zM106.628 21.58V19h-3.87v15h3.87v-7.17c0-3.15 2.55-4.05 4.56-3.81V18.7c-1.89 0-3.78.84-4.56 2.88zM124.295 19v1.77c-1.08-1.35-2.7-2.19-4.89-2.19-3.99 0-7.29 3.45-7.29 7.92s3.3 7.92 7.29 7.92c2.19 0 3.81-.84 4.89-2.19V34h3.87V19h-3.87zm-4.17 11.73c-2.37 0-4.14-1.71-4.14-4.23 0-2.52 1.77-4.23 4.14-4.23 2.4 0 4.17 1.71 4.17 4.23 0 2.52-1.77 4.23-4.17 4.23zM141.544 19l-3.66 10.5-3.63-10.5h-4.26l5.7 15h4.41l5.7-15h-4.26zM150.354 28.09h11.31c.09-.51.15-1.02.15-1.59 0-4.41-3.15-7.92-7.59-7.92-4.71 0-7.92 3.45-7.92 7.92s3.18 7.92 8.22 7.92c2.88 0 5.13-1.17 6.54-3.21l-3.12-1.8c-.66.87-1.86 1.5-3.36 1.5-2.04 0-3.69-.84-4.23-2.82zm-.06-3c.45-1.92 1.86-3.03 3.93-3.03 1.62 0 3.24.87 3.72 3.03h-7.65zM164.516 34h3.87V12.1h-3.87V34zM185.248 34.36c3.69 0 6.9-2.01 6.9-6.3V13h-2.1v15.06c0 3.03-2.07 4.26-4.8 4.26-2.19 0-3.93-.78-4.62-2.61l-1.77 1.05c1.05 2.43 3.57 3.6 6.39 3.6zM203.124 18.64c-4.65 0-7.83 3.45-7.83 7.86 0 4.53 3.24 7.86 7.98 7.86 3.03 0 5.34-1.41 6.6-3.45l-1.74-1.02c-.81 1.44-2.46 2.55-4.83 2.55-3.18 0-5.55-1.89-5.97-4.95h13.17c.03-.3.06-.63.06-.93 0-4.11-2.85-7.92-7.44-7.92zm0 1.92c2.58 0 4.98 1.71 5.4 5.01h-11.19c.39-2.94 2.64-5.01 5.79-5.01zM221.224 20.92V19h-4.32v-4.2l-1.98.6V19h-3.15v1.92h3.15v9.09c0 3.6 2.25 4.59 6.3 3.99v-1.74c-2.91.12-4.32.33-4.32-2.25v-9.09h4.32zM225.176 22.93c0-1.62 1.59-2.37 3.15-2.37 1.44 0 2.97.57 3.6 2.1l1.65-.96c-.87-1.86-2.79-3.06-5.25-3.06-3 0-5.13 1.89-5.13 4.29 0 5.52 8.76 3.39 8.76 7.11 0 1.77-1.68 2.4-3.45 2.4-2.01 0-3.57-.99-4.11-2.52l-1.68.99c.75 1.92 2.79 3.45 5.79 3.45 3.21 0 5.43-1.77 5.43-4.32 0-5.52-8.76-3.39-8.76-7.11zM244.603 20.92V19h-4.32v-4.2l-1.98.6V19h-3.15v1.92h3.15v9.09c0 3.6 2.25 4.59 6.3 3.99v-1.74c-2.91.12-4.32.33-4.32-2.25v-9.09h4.32zM249.883 21.49V19h-1.98v15h1.98v-8.34c0-3.72 2.34-4.98 4.74-4.98v-1.92c-1.92 0-3.69.63-4.74 2.73zM263.358 18.64c-4.65 0-7.83 3.45-7.83 7.86 0 4.53 3.24 7.86 7.98 7.86 3.03 0 5.34-1.41 6.6-3.45l-1.74-1.02c-.81 1.44-2.46 2.55-4.83 2.55-3.18 0-5.55-1.89-5.97-4.95h13.17c.03-.3.06-.63.06-.93 0-4.11-2.85-7.92-7.44-7.92zm0 1.92c2.58 0 4.98 1.71 5.4 5.01h-11.19c.39-2.94 2.64-5.01 5.79-5.01zM286.848 19v2.94c-1.26-2.01-3.39-3.3-6.06-3.3-4.23 0-7.74 3.42-7.74 7.86s3.51 7.86 7.74 7.86c2.67 0 4.8-1.29 6.06-3.3V34h1.98V19h-1.98zm-5.91 13.44c-3.33 0-5.91-2.61-5.91-5.94 0-3.33 2.58-5.94 5.91-5.94s5.91 2.61 5.91 5.94c0 3.33-2.58 5.94-5.91 5.94zM309.01 18.64c-1.92 0-3.75.87-4.86 2.73-.84-1.74-2.46-2.73-4.56-2.73-1.8 0-3.42.72-4.59 2.55V19h-1.98v15H295v-8.31c0-3.72 2.16-5.13 4.32-5.13 2.13 0 3.51 1.41 3.51 4.08V34h1.98v-8.31c0-3.72 1.86-5.13 4.17-5.13 2.13 0 3.66 1.41 3.66 4.08V34h1.98v-9.36c0-3.75-2.31-6-5.61-6z",
438
+ class: "fill-black"
439
+ }, null, -1),
440
+ r("path", {
441
+ d: "M11.395 44.428C4.557 40.198 0 32.632 0 24 0 10.745 10.745 0 24 0a23.891 23.891 0 0113.997 4.502c-.2 17.907-11.097 33.245-26.602 39.926z",
442
+ fill: "#6875F5"
443
+ }, null, -1),
444
+ r("path", {
445
+ d: "M14.134 45.885A23.914 23.914 0 0024 48c13.255 0 24-10.745 24-24 0-3.516-.756-6.856-2.115-9.866-4.659 15.143-16.608 27.092-31.75 31.751z",
446
+ fill: "#6875F5"
447
+ }, null, -1)
448
+ ])]);
449
+ }
450
+ const ht = /* @__PURE__ */ ge(mt, [["render", bt]]), vt = {}, xt = { class: "min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100" }, wt = { class: "w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden rounded-lg" };
451
+ function kt(e, a) {
452
+ return s(), n("div", xt, [
453
+ r("div", null, [
454
+ g(e.$slots, "logo")
455
+ ]),
456
+ r("div", wt, [
457
+ g(e.$slots, "default")
458
+ ])
459
+ ]);
460
+ }
461
+ const St = /* @__PURE__ */ ge(vt, [["render", kt]]), $t = { class: "sr-only" }, Ct = {
462
+ __name: "Badge",
463
+ props: {
464
+ type: {
465
+ type: String,
466
+ default: "default",
467
+ validator: (e) => ["default", "dot"].includes(e)
468
+ },
469
+ color: {
470
+ type: String,
471
+ default: "default",
472
+ validator: (e) => [
473
+ "default",
474
+ "primary",
475
+ "secondary",
476
+ "success",
477
+ "warning",
478
+ "danger",
479
+ "info",
480
+ "gray"
481
+ ].includes(e)
482
+ },
483
+ size: {
484
+ type: String,
485
+ default: "md",
486
+ validator: (e) => ["xs", "sm", "md", "lg"].includes(e)
487
+ },
488
+ rounded: {
489
+ type: String,
490
+ default: "full",
491
+ validator: (e) => ["none", "sm", "md", "lg", "full"].includes(e)
492
+ }
493
+ },
494
+ setup(e) {
495
+ const a = {
496
+ default: { bg: "bg-gray-100", text: "text-gray-800", dot: "bg-gray-600" },
497
+ primary: { bg: "bg-blue-100", text: "text-blue-800", dot: "bg-blue-600" },
498
+ secondary: { bg: "bg-purple-100", text: "text-purple-800", dot: "bg-purple-600" },
499
+ success: { bg: "bg-green-100", text: "text-green-800", dot: "bg-green-600" },
500
+ warning: { bg: "bg-amber-100", text: "text-amber-800", dot: "bg-amber-600" },
501
+ danger: { bg: "bg-red-100", text: "text-red-800", dot: "bg-red-600" },
502
+ info: { bg: "bg-cyan-100", text: "text-cyan-800", dot: "bg-cyan-600" },
503
+ gray: { bg: "bg-gray-100", text: "text-gray-600", dot: "bg-gray-600" }
504
+ }, t = {
505
+ xs: "px-1.5 py-0.5 text-xs",
506
+ sm: "px-2 py-0.5 text-xs",
507
+ md: "px-2.5 py-0.5 text-xs",
508
+ lg: "px-3 py-1 text-sm"
509
+ }, l = {
510
+ none: "rounded-none",
511
+ sm: "rounded-sm",
512
+ md: "rounded-md",
513
+ lg: "rounded-lg",
514
+ full: "rounded-full"
515
+ };
516
+ return (o, d) => e.type === "dot" ? (s(), n("span", {
517
+ key: 0,
518
+ class: _(["inline-flex items-center justify-center w-6 h-6 rounded-full", a[e.color].bg])
519
+ }, [
520
+ r("span", {
521
+ class: _(["w-2 h-2 rounded-full", a[e.color].dot])
522
+ }, null, 2),
523
+ r("span", $t, [
524
+ g(o.$slots, "default")
525
+ ])
526
+ ], 2)) : (s(), n("span", {
527
+ key: 1,
528
+ class: _(["inline-flex items-center font-medium", [
529
+ a[e.color].bg,
530
+ a[e.color].text,
531
+ t[e.size],
532
+ l[e.rounded]
533
+ ]])
534
+ }, [
535
+ g(o.$slots, "default")
536
+ ], 2));
537
+ }
538
+ }, _t = {
539
+ key: 0,
540
+ class: "fixed bottom-4 right-4 z-50"
541
+ }, Vt = { class: "flex items-center" }, Bt = { class: "flex-shrink-0" }, Tt = { class: "ml-3 w-0 flex-1" }, At = { class: "text-sm font-medium text-white" }, jt = { class: "ml-4 flex-shrink-0 flex" }, It = { class: "sr-only" }, Lt = {
542
+ __name: "Banner",
543
+ setup(e) {
544
+ const a = Ee(), { t } = Ke(), l = z(!1), o = z("success"), d = z(""), i = z(!1);
545
+ let u = null;
546
+ const k = () => {
547
+ i.value = !1, setTimeout(() => {
548
+ l.value = !1;
549
+ }, 300);
550
+ }, x = () => {
551
+ u && clearTimeout(u), l.value = !0, setTimeout(() => {
552
+ i.value = !0;
553
+ }, 50), u = setTimeout(() => {
554
+ k();
555
+ }, 5e3);
556
+ };
557
+ return Me(async () => {
558
+ const T = a.props.jetstream.flash?.bannerStyle || "success", h = a.props.jetstream.flash?.banner || "";
559
+ h && (o.value = T, d.value = h, x());
560
+ }), J(() => {
561
+ d.value && x();
562
+ }), (T, h) => l.value ? (s(), n("div", _t, [
563
+ r("div", {
564
+ class: _([
565
+ "transform transition-all duration-300 ease-out shadow-lg rounded-lg p-4 min-w-[300px] max-w-md",
566
+ i.value ? "translate-y-0 opacity-100" : "translate-y-full opacity-0",
567
+ o.value === "success" ? "bg-green-600" : "bg-red-600"
568
+ ])
569
+ }, [
570
+ r("div", Vt, [
571
+ r("div", Bt, [
572
+ r("div", {
573
+ class: _([
574
+ "flex p-2 rounded-full",
575
+ o.value === "success" ? "bg-green-700" : "bg-red-700"
576
+ ])
577
+ }, [
578
+ o.value === "success" ? (s(), A(V(Re), {
579
+ key: 0,
580
+ class: "w-5 h-5 text-white"
581
+ })) : O("", !0),
582
+ o.value === "danger" ? (s(), A(V(we), {
583
+ key: 1,
584
+ class: "w-5 h-5 text-white"
585
+ })) : O("", !0)
586
+ ], 2)
587
+ ]),
588
+ r("div", Tt, [
589
+ r("p", At, $(d.value), 1)
590
+ ]),
591
+ r("div", jt, [
592
+ r("button", {
593
+ type: "button",
594
+ class: _(["inline-flex text-white hover:bg-white/20 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-green-600 focus:ring-white rounded-md p-1.5 transition-colors", [
595
+ o.value === "success" ? "hover:bg-green-700 focus:ring-offset-green-600" : "hover:bg-red-700 focus:ring-offset-red-600"
596
+ ]]),
597
+ onClick: k
598
+ }, [
599
+ r("span", It, $(V(t)("Dismiss")), 1),
600
+ E(V(Pe), { class: "w-5 h-5" })
601
+ ], 2)
602
+ ])
603
+ ])
604
+ ], 2)
605
+ ])) : O("", !0);
606
+ }
607
+ }, Dt = ["value"], Ot = {
608
+ __name: "Checkbox",
609
+ props: {
610
+ checked: {
611
+ type: [Array, Boolean],
612
+ default: !1
613
+ },
614
+ value: {
615
+ type: String,
616
+ default: null
617
+ }
618
+ },
619
+ emits: ["update:checked"],
620
+ setup(e, { emit: a }) {
621
+ const t = a, l = e, o = f({
622
+ get() {
623
+ return l.checked;
624
+ },
625
+ set(d) {
626
+ t("update:checked", d);
627
+ }
628
+ });
629
+ return (d, i) => G((s(), n("input", {
630
+ "onUpdate:modelValue": i[0] || (i[0] = (u) => o.value = u),
631
+ type: "checkbox",
632
+ value: e.value,
633
+ class: "rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
634
+ }, null, 8, Dt)), [
635
+ [ze, o.value]
636
+ ]);
637
+ }
638
+ }, Mt = ["checked", "disabled"], Ce = {
639
+ __name: "CheckboxInput",
640
+ props: {
641
+ modelValue: {
642
+ type: [Boolean, String, Number, null],
643
+ default: !1
644
+ },
645
+ value: {
646
+ type: [Boolean, String, Number],
647
+ default: !0
648
+ },
649
+ uncheckedValue: {
650
+ type: [Boolean, String, Number, null],
651
+ default: !1
652
+ },
653
+ label: {
654
+ type: String,
655
+ default: ""
656
+ },
657
+ disabled: {
658
+ type: Boolean,
659
+ default: !1
660
+ }
661
+ },
662
+ emits: ["update:modelValue"],
663
+ setup(e, { emit: a }) {
664
+ const t = a, l = e, o = f(() => l.modelValue === l.value), d = z(!1), i = () => {
665
+ d.value = !0;
666
+ }, u = () => {
667
+ d.value = !1;
668
+ }, k = (x) => {
669
+ t("update:modelValue", x.target.checked ? l.value : l.uncheckedValue);
670
+ };
671
+ return (x, T) => (s(), n("label", {
672
+ class: _(["inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
673
+ o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
674
+ e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
675
+ d.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
676
+ ]])
677
+ }, [
678
+ r("input", {
679
+ type: "checkbox",
680
+ class: "sr-only",
681
+ checked: o.value,
682
+ disabled: e.disabled,
683
+ onChange: k,
684
+ onFocus: i,
685
+ onBlur: u
686
+ }, null, 40, Mt),
687
+ r("span", {
688
+ class: _(["inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none", [
689
+ o.value ? "border-current bg-white/15 text-current" : "border-current/70 text-transparent",
690
+ "rounded"
691
+ ]])
692
+ }, " ✓ ", 2),
693
+ r("span", null, $(e.label), 1)
694
+ ], 2));
695
+ }
696
+ }, zt = { class: "relative flex items-center" }, Ft = {
697
+ key: 0,
698
+ class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none"
699
+ }, Ut = ["type", "value", "disabled"], Nt = ["aria-label"], Et = {
700
+ key: 0,
701
+ class: "h-5 w-5",
702
+ fill: "none",
703
+ stroke: "currentColor",
704
+ viewBox: "0 0 24 24"
705
+ }, Kt = {
706
+ key: 1,
707
+ class: "h-5 w-5",
708
+ fill: "none",
709
+ stroke: "currentColor",
710
+ viewBox: "0 0 24 24"
711
+ }, Rt = 254, _e = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
712
+ __name: "TextInput",
713
+ props: {
714
+ modelValue: {
715
+ type: [String, Number, null],
716
+ default: ""
717
+ },
718
+ disabled: {
719
+ type: Boolean,
720
+ default: !1
721
+ },
722
+ disabledClass: {
723
+ type: String,
724
+ default: "!bg-gray-200"
725
+ }
726
+ },
727
+ emits: ["update:modelValue", "blur"],
728
+ setup(e, { expose: a, emit: t }) {
729
+ const l = e, o = t, d = H(), i = z(null), u = z(!1), k = f(() => String(d.type ?? "text")), x = f(() => k.value === "password"), T = f(() => x.value && u.value ? "text" : k.value), h = f(() => l.modelValue ?? ""), b = f(() => {
730
+ const { class: j, type: U, ...K } = d;
731
+ return K.maxlength === void 0 && (K.maxlength = Rt), K;
732
+ }), C = f(() => [
733
+ "w-full min-w-0 max-w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
734
+ d.class,
735
+ x.value ? "pr-10 pl-10" : ""
736
+ ]), p = () => {
737
+ u.value = !u.value;
738
+ }, L = (j) => {
739
+ if (T.value !== "number")
740
+ return;
741
+ j.preventDefault();
742
+ const U = document.scrollingElement ?? document.documentElement ?? document.body;
743
+ U && (U.scrollTop += j.deltaY);
744
+ };
745
+ return J(() => {
746
+ i.value?.hasAttribute("autofocus") && i.value.focus();
747
+ }), a({ focus: () => i.value?.focus() }), (j, U) => (s(), n("div", zt, [
748
+ x.value ? (s(), n("div", Ft, [
749
+ E(V(He), { class: "h-5 w-5 text-gray-400" })
750
+ ])) : O("", !0),
751
+ r("input", M({
752
+ ref_key: "input",
753
+ ref: i
754
+ }, b.value, {
755
+ type: T.value,
756
+ class: [C.value, l.disabled ? l.disabledClass : null],
757
+ value: h.value,
758
+ disabled: l.disabled,
759
+ onInput: U[0] || (U[0] = (K) => o("update:modelValue", K.target.value)),
760
+ onBlur: U[1] || (U[1] = (K) => o("blur", K)),
761
+ onWheel: L
762
+ }), null, 16, Ut),
763
+ x.value ? (s(), n("button", {
764
+ key: 1,
765
+ type: "button",
766
+ class: "absolute inset-y-0 right-0 flex items-center pr-3 text-gray-400 hover:text-gray-600 focus:outline-none",
767
+ "aria-label": u.value ? "Hide password" : "Show password",
768
+ onClick: p
769
+ }, [
770
+ u.value ? (s(), n("svg", Et, [...U[2] || (U[2] = [
771
+ r("path", {
772
+ "stroke-linecap": "round",
773
+ "stroke-linejoin": "round",
774
+ "stroke-width": "2",
775
+ d: "M13.875 18.825A10.05 10.05 0 0112 19c-5 0-9.27-3.11-11-7 1.01-2.27 2.78-4.1 5-5.32m3.08-1.3A9.96 9.96 0 0112 5c5 0 9.27 3.11 11 7a11.03 11.03 0 01-4.16 4.91M15 12a3 3 0 00-3-3m0 0a3 3 0 00-2.94 3.59M3 3l18 18"
776
+ }, null, -1)
777
+ ])])) : (s(), n("svg", Kt, [...U[3] || (U[3] = [
778
+ r("path", {
779
+ "stroke-linecap": "round",
780
+ "stroke-linejoin": "round",
781
+ "stroke-width": "2",
782
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
783
+ }, null, -1),
784
+ r("path", {
785
+ "stroke-linecap": "round",
786
+ "stroke-linejoin": "round",
787
+ "stroke-width": "2",
788
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5s8.268 2.943 9.542 7c-1.274 4.057-5.065 7-9.542 7S3.732 16.057 2.458 12z"
789
+ }, null, -1)
790
+ ])]))
791
+ ], 8, Nt)) : O("", !0)
792
+ ]));
793
+ }
794
+ }), Pt = { class: "p-1" }, Ht = ["value", "disabled"], Wt = 1e3, Ve = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
795
+ __name: "TextArea",
796
+ props: {
797
+ modelValue: String,
798
+ disabled: {
799
+ type: Boolean,
800
+ default: !1
801
+ },
802
+ disabledClass: {
803
+ type: String,
804
+ default: "!bg-gray-200"
805
+ },
806
+ autoResize: {
807
+ type: Boolean,
808
+ default: !0
809
+ }
810
+ },
811
+ emits: ["update:modelValue"],
812
+ setup(e, { expose: a, emit: t }) {
813
+ const l = e, o = t, d = H(), i = z(null), u = f(() => {
814
+ const { class: h, ...b } = d;
815
+ return b.maxlength === void 0 && (b.maxlength = Wt), b;
816
+ }), k = f(() => [
817
+ "w-full min-w-0 max-w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
818
+ l.autoResize ? "resize-none overflow-y-auto" : "resize-y",
819
+ d.class
820
+ ]), x = () => {
821
+ !l.autoResize || !i.value || (i.value.style.height = "auto", i.value.style.height = `${i.value.scrollHeight}px`);
822
+ }, T = (h) => {
823
+ o("update:modelValue", h.target.value), x();
824
+ };
825
+ return J(() => {
826
+ i.value?.hasAttribute("autofocus") && i.value.focus(), de(() => {
827
+ x();
828
+ });
829
+ }), X(() => l.modelValue, () => {
830
+ de(() => {
831
+ x();
832
+ });
833
+ }), a({ focus: () => i.value?.focus() }), (h, b) => (s(), n("div", Pt, [
834
+ r("textarea", M({
835
+ ref_key: "textarea",
836
+ ref: i
837
+ }, u.value, {
838
+ class: [k.value, l.disabled ? l.disabledClass : ""],
839
+ value: l.modelValue,
840
+ disabled: l.disabled,
841
+ onInput: T
842
+ }), null, 16, Ht)
843
+ ]));
844
+ }
845
+ }), qt = ["onClick"], Be = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
846
+ __name: "CustomSelect",
847
+ props: {
848
+ modelValue: {
849
+ type: [String, Number, Boolean, null],
850
+ default: ""
851
+ },
852
+ modelModifiers: {
853
+ type: Object,
854
+ default: () => ({})
855
+ },
856
+ options: {
857
+ type: Array,
858
+ default: () => []
859
+ },
860
+ placeholder: {
861
+ type: String,
862
+ default: ""
863
+ },
864
+ placeholderDisabled: {
865
+ type: Boolean,
866
+ default: !1
867
+ },
868
+ disabled: {
869
+ type: Boolean,
870
+ default: !1
871
+ },
872
+ softDeleteAware: {
873
+ type: Boolean,
874
+ default: !1
875
+ },
876
+ labelKey: {
877
+ type: String,
878
+ default: "name"
879
+ },
880
+ valueKey: {
881
+ type: String,
882
+ default: "id"
883
+ },
884
+ deletedKey: {
885
+ type: String,
886
+ default: "deleted_at"
887
+ },
888
+ optionLabel: {
889
+ type: Function,
890
+ default: null
891
+ },
892
+ baseClass: {
893
+ type: [String, Array, Object],
894
+ default: "block w-full rounded-md border border-gray-300 bg-white px-4 py-3 text-sm focus:border-indigo-500 focus:ring-2 focus:ring-indigo-500"
895
+ },
896
+ normalTextClass: {
897
+ type: [String, Array, Object],
898
+ default: "text-gray-900"
899
+ },
900
+ deletedSelectedClass: {
901
+ type: [String, Array, Object],
902
+ default: "text-red-600"
903
+ },
904
+ optionClass: {
905
+ type: [String, Array, Object],
906
+ default: "text-[#111827]"
907
+ },
908
+ deletedOptionClass: {
909
+ type: [String, Array, Object],
910
+ default: "text-[#dc2626]"
911
+ },
912
+ placeholderClass: {
913
+ type: [String, Array, Object],
914
+ default: "text-[#111827]"
915
+ },
916
+ dropdownClass: {
917
+ type: [String, Array, Object],
918
+ default: "bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-auto z-50"
919
+ },
920
+ dropdownOptionClass: {
921
+ type: [String, Array, Object],
922
+ default: "px-4 py-3 hover:bg-gray-100 cursor-pointer transition-colors"
923
+ },
924
+ dropdownSelectedClass: {
925
+ type: [String, Array, Object],
926
+ default: "bg-blue-50 text-blue-600 font-medium"
927
+ }
928
+ },
929
+ emits: ["update:modelValue"],
930
+ setup(e, { emit: a }) {
931
+ const t = e, l = a, o = H(), d = z(!1), i = z(null), u = z(null), k = z(null), x = z({}), T = (v) => typeof v == "object" && v !== null, h = (v) => T(v) ? v[t.valueKey] : v, b = (v) => t.optionLabel ? t.optionLabel(v) : T(v) ? v[t.labelKey] ?? v[t.valueKey] ?? "" : v, C = (v) => !t.softDeleteAware || !T(v) ? !1 : !!v[t.deletedKey], p = f(() => String(t.modelValue ?? "")), L = f(() => !t.softDeleteAware || p.value === "" ? null : t.options.find((v) => C(v) && String(h(v) ?? "") === p.value) ?? null), j = f(() => t.softDeleteAware ? t.options.filter((v) => !C(v)) : t.options), U = f(() => {
932
+ if (t.modelValue === null || t.modelValue === void 0 || t.modelValue === "" && !t.options.some((R) => h(R) === ""))
933
+ return t.placeholder;
934
+ const v = t.options.find((R) => {
935
+ const N = h(R);
936
+ return N === t.modelValue || String(N) === String(t.modelValue);
937
+ });
938
+ return v ? b(v) : t.modelValue;
939
+ }), K = (v) => t.modelModifiers.number ? v === "" ? "" : Number(v) : v, te = () => {
940
+ t.disabled || (d.value = !d.value);
941
+ }, le = (v) => {
942
+ const R = h(v);
943
+ l("update:modelValue", K(R)), d.value = !1;
944
+ }, se = () => {
945
+ t.placeholderDisabled || (l("update:modelValue", K("")), d.value = !1);
946
+ }, q = () => {
947
+ if (!u.value)
948
+ return;
949
+ const v = u.value.getBoundingClientRect(), R = window.innerWidth, N = window.innerHeight, c = N - v.bottom - 8, m = v.top - 8, y = c < 240 && m > c, D = Math.min(v.width, Math.max(R - v.left - 16, 160)), S = Math.max(Math.min(240, y ? m : c), 120);
950
+ x.value = {
951
+ position: "fixed",
952
+ left: `${Math.max(v.left, 8)}px`,
953
+ width: `${D}px`,
954
+ maxHeight: `${S}px`,
955
+ zIndex: "9999",
956
+ ...y ? { bottom: `${N - v.top + 1}px` } : { top: `${v.bottom - 1}px` }
957
+ };
958
+ }, Q = (v) => {
959
+ const R = i.value?.contains(v.target), N = k.value?.contains(v.target);
960
+ !R && !N && (d.value = !1);
961
+ };
962
+ return J(() => {
963
+ document.addEventListener("click", Q), window.addEventListener("resize", q), window.addEventListener("scroll", q, !0);
964
+ }), Fe(() => {
965
+ document.removeEventListener("click", Q), window.removeEventListener("resize", q), window.removeEventListener("scroll", q, !0);
966
+ }), X(d, async (v) => {
967
+ v && (await de(), q());
968
+ }), (v, R) => (s(), n("div", {
969
+ ref_key: "rootRef",
970
+ ref: i,
971
+ class: "relative",
972
+ onClick: te
973
+ }, [
974
+ r("div", M({
975
+ ref_key: "triggerRef",
976
+ ref: u,
977
+ class: [
978
+ e.baseClass,
979
+ L.value ? e.deletedSelectedClass : e.normalTextClass,
980
+ "flex items-center justify-between cursor-pointer",
981
+ V(o).class
982
+ ]
983
+ }, V(o), { tabindex: "0" }), [
984
+ r("span", {
985
+ class: _({ "text-gray-400": !e.modelValue && e.placeholder })
986
+ }, $(U.value), 3),
987
+ E(V(ce), {
988
+ class: _(["size-5 text-gray-400 transition-transform", { "rotate-180": d.value }])
989
+ }, null, 8, ["class"])
990
+ ], 16),
991
+ E(Y, {
992
+ "enter-active-class": "transition-all duration-200 ease-out",
993
+ "enter-from-class": "opacity-0 transform scale-95 -translate-y-2",
994
+ "enter-to-class": "opacity-100 transform scale-100 translate-y-0",
995
+ "leave-active-class": "transition-all duration-150 ease-in",
996
+ "leave-from-class": "opacity-100 transform scale-100 translate-y-0",
997
+ "leave-to-class": "opacity-0 transform scale-95 -translate-y-2"
998
+ }, {
999
+ default: F(() => [
1000
+ (s(), A(Ue, { to: "body" }, [
1001
+ d.value ? (s(), n("div", {
1002
+ key: 0,
1003
+ ref_key: "dropdownMenuRef",
1004
+ ref: k,
1005
+ class: _(e.dropdownClass),
1006
+ style: he(x.value)
1007
+ }, [
1008
+ e.placeholder ? (s(), n("div", {
1009
+ key: 0,
1010
+ class: _([
1011
+ e.dropdownOptionClass,
1012
+ e.placeholderClass,
1013
+ { "text-gray-400": !e.modelValue }
1014
+ ]),
1015
+ onClick: ue(se, ["stop"])
1016
+ }, $(e.placeholder), 3)) : O("", !0),
1017
+ L.value ? (s(), n("div", {
1018
+ key: 1,
1019
+ class: _([
1020
+ e.dropdownOptionClass,
1021
+ e.deletedOptionClass,
1022
+ e.dropdownSelectedClass
1023
+ ])
1024
+ }, $(b(L.value)), 3)) : O("", !0),
1025
+ (s(!0), n(P, null, W(j.value, (N) => (s(), n("div", {
1026
+ key: String(h(N)),
1027
+ class: _([
1028
+ e.dropdownOptionClass,
1029
+ e.optionClass,
1030
+ {
1031
+ [e.dropdownSelectedClass]: h(N) === e.modelValue || String(h(N)) === String(e.modelValue),
1032
+ "rounded-b-lg": N === j.value[j.value.length - 1] && !e.placeholder,
1033
+ "rounded-lg": !e.placeholder && j.value.length === 1
1034
+ }
1035
+ ]),
1036
+ onClick: ue((c) => le(N), ["stop"])
1037
+ }, $(b(N)), 11, qt))), 128))
1038
+ ], 6)) : O("", !0)
1039
+ ]))
1040
+ ]),
1041
+ _: 1
1042
+ })
1043
+ ], 512));
1044
+ }
1045
+ }), Te = {
1046
+ __name: "SelectInput",
1047
+ props: {
1048
+ modelValue: {
1049
+ type: [String, Number, Boolean, null],
1050
+ default: ""
1051
+ },
1052
+ modelModifiers: {
1053
+ type: Object,
1054
+ default: () => ({})
1055
+ },
1056
+ options: {
1057
+ type: Array,
1058
+ default: () => []
1059
+ },
1060
+ placeholder: {
1061
+ type: String,
1062
+ default: ""
1063
+ },
1064
+ placeholderDisabled: {
1065
+ type: Boolean,
1066
+ default: !1
1067
+ },
1068
+ disabled: {
1069
+ type: Boolean,
1070
+ default: !1
1071
+ },
1072
+ softDeleteAware: {
1073
+ type: Boolean,
1074
+ default: !1
1075
+ },
1076
+ labelKey: {
1077
+ type: String,
1078
+ default: "name"
1079
+ },
1080
+ valueKey: {
1081
+ type: String,
1082
+ default: "id"
1083
+ },
1084
+ deletedKey: {
1085
+ type: String,
1086
+ default: "deleted_at"
1087
+ },
1088
+ optionLabel: {
1089
+ type: Function,
1090
+ default: null
1091
+ },
1092
+ baseClass: {
1093
+ type: [String, Array, Object],
1094
+ default: "block w-full rounded-md border border-gray-300 bg-white px-4 py-3 text-sm focus:border-indigo-500 focus:outline-none focus:ring-2 focus:ring-indigo-500"
1095
+ },
1096
+ normalTextClass: {
1097
+ type: [String, Array, Object],
1098
+ default: "text-gray-900"
1099
+ },
1100
+ deletedSelectedClass: {
1101
+ type: [String, Array, Object],
1102
+ default: "text-red-600"
1103
+ },
1104
+ optionClass: {
1105
+ type: [String, Array, Object],
1106
+ default: "text-[#111827]"
1107
+ },
1108
+ deletedOptionClass: {
1109
+ type: [String, Array, Object],
1110
+ default: "text-[#dc2626]"
1111
+ },
1112
+ placeholderClass: {
1113
+ type: [String, Array, Object],
1114
+ default: "text-[#111827]"
1115
+ },
1116
+ dropdownClass: {
1117
+ type: [String, Array, Object],
1118
+ default: "bg-white border border-gray-300 rounded-lg shadow-lg max-h-60 overflow-auto z-50"
1119
+ },
1120
+ dropdownOptionClass: {
1121
+ type: [String, Array, Object],
1122
+ default: "px-4 py-3 hover:bg-gray-100 cursor-pointer transition-colors"
1123
+ },
1124
+ dropdownSelectedClass: {
1125
+ type: [String, Array, Object],
1126
+ default: "bg-indigo-50 text-indigo-600 font-medium"
1127
+ }
1128
+ },
1129
+ emits: ["update:modelValue"],
1130
+ setup(e, { emit: a }) {
1131
+ const t = a;
1132
+ return (l, o) => (s(), A(Be, M({
1133
+ "model-value": e.modelValue,
1134
+ "model-modifiers": e.modelModifiers,
1135
+ options: e.options,
1136
+ placeholder: e.placeholder,
1137
+ "placeholder-disabled": e.placeholderDisabled,
1138
+ disabled: e.disabled,
1139
+ "soft-delete-aware": e.softDeleteAware,
1140
+ "label-key": e.labelKey,
1141
+ "value-key": e.valueKey,
1142
+ "deleted-key": e.deletedKey,
1143
+ "option-label": e.optionLabel,
1144
+ "base-class": e.baseClass,
1145
+ "normal-text-class": e.normalTextClass,
1146
+ "deleted-selected-class": e.deletedSelectedClass,
1147
+ "option-class": e.optionClass,
1148
+ "deleted-option-class": e.deletedOptionClass,
1149
+ "placeholder-class": e.placeholderClass,
1150
+ "dropdown-class": e.dropdownClass,
1151
+ "dropdown-option-class": e.dropdownOptionClass,
1152
+ "dropdown-selected-class": e.dropdownSelectedClass,
1153
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => t("update:modelValue", d))
1154
+ }, l.$attrs), null, 16, ["model-value", "model-modifiers", "options", "placeholder", "placeholder-disabled", "disabled", "soft-delete-aware", "label-key", "value-key", "deleted-key", "option-label", "base-class", "normal-text-class", "deleted-selected-class", "option-class", "deleted-option-class", "placeholder-class", "dropdown-class", "dropdown-option-class", "dropdown-selected-class"]));
1155
+ }
1156
+ }, Gt = ["type", "max", "value", "disabled"], Ae = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1157
+ __name: "DateInput",
1158
+ props: {
1159
+ modelValue: {
1160
+ type: [String, Number, null],
1161
+ default: ""
1162
+ },
1163
+ withTimestamp: {
1164
+ type: Boolean,
1165
+ default: !1
1166
+ },
1167
+ disabled: {
1168
+ type: Boolean,
1169
+ default: !1
1170
+ },
1171
+ disabledClass: {
1172
+ type: String,
1173
+ default: "!bg-gray-200"
1174
+ }
1175
+ },
1176
+ emits: ["update:modelValue"],
1177
+ setup(e, { expose: a, emit: t }) {
1178
+ const l = e, o = t, d = H(), i = z(null), u = f(() => l.withTimestamp ? "datetime-local" : "date"), k = f(() => l.modelValue ?? ""), x = f(() => {
1179
+ const p = l.withTimestamp ? "9999-12-31T23:59" : "9999-12-31", L = d.max;
1180
+ return typeof L != "string" || L === "" || L > p ? p : L;
1181
+ }), T = f(() => {
1182
+ const { class: p, type: L, ...j } = d;
1183
+ return j;
1184
+ }), h = f(() => [
1185
+ "w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
1186
+ d.class
1187
+ ]), b = (p) => typeof p != "string" ? "" : p.replace(/^(\d{4})\d+/, "$1"), C = (p) => {
1188
+ const L = p.target;
1189
+ if (!L)
1190
+ return;
1191
+ const j = String(L.value ?? ""), U = b(j);
1192
+ U !== j && (L.value = U), o("update:modelValue", U);
1193
+ };
1194
+ return J(() => {
1195
+ i.value?.hasAttribute("autofocus") && i.value.focus();
1196
+ }), a({ focus: () => i.value?.focus() }), (p, L) => (s(), n("input", M({
1197
+ ref_key: "input",
1198
+ ref: i
1199
+ }, T.value, {
1200
+ type: u.value,
1201
+ max: x.value,
1202
+ class: [h.value, l.disabled ? l.disabledClass : null],
1203
+ value: k.value,
1204
+ disabled: l.disabled,
1205
+ onInput: C,
1206
+ onChange: C
1207
+ }), null, 16, Gt));
1208
+ }
1209
+ }), Xt = { class: "relative" }, Jt = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, Qt = ["accept"], Yt = {
1210
+ key: 0,
1211
+ class: "mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200"
1212
+ }, Zt = { class: "flex items-center space-x-4" }, el = ["src"], tl = { class: "text-sm font-medium text-gray-900" }, ll = { class: "text-xs text-gray-500" }, je = {
1213
+ __name: "ImageInput",
1214
+ props: {
1215
+ currentImageUrl: {
1216
+ type: String,
1217
+ default: ""
1218
+ },
1219
+ accept: {
1220
+ type: String,
1221
+ default: "image/*"
1222
+ },
1223
+ currentLabel: {
1224
+ type: String,
1225
+ default: "Current logo"
1226
+ },
1227
+ currentSubtext: {
1228
+ type: String,
1229
+ default: "Upload a new logo to replace this one"
1230
+ },
1231
+ attrs: {
1232
+ type: Object,
1233
+ default: () => ({})
1234
+ }
1235
+ },
1236
+ emits: ["update:modelValue"],
1237
+ setup(e, { emit: a }) {
1238
+ const t = a, l = e, o = (d) => {
1239
+ const i = d.target.files?.[0] ?? null;
1240
+ t("update:modelValue", i);
1241
+ };
1242
+ return (d, i) => (s(), n("div", null, [
1243
+ r("div", Xt, [
1244
+ r("div", Jt, [
1245
+ E(V(We), { class: "size-5 text-gray-400" })
1246
+ ]),
1247
+ r("input", M(e.attrs, {
1248
+ type: "file",
1249
+ accept: e.accept,
1250
+ class: "block w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg bg-white text-sm file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 cursor-pointer",
1251
+ onChange: o
1252
+ }), null, 16, Qt)
1253
+ ]),
1254
+ l.currentImageUrl ? (s(), n("div", Yt, [
1255
+ r("div", Zt, [
1256
+ r("img", {
1257
+ src: l.currentImageUrl,
1258
+ alt: "Current logo",
1259
+ class: "h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm"
1260
+ }, null, 8, el),
1261
+ r("div", null, [
1262
+ r("p", tl, $(l.currentLabel), 1),
1263
+ r("p", ll, $(l.currentSubtext), 1)
1264
+ ])
1265
+ ])
1266
+ ])) : O("", !0)
1267
+ ]));
1268
+ }
1269
+ }, sl = { class: "flex h-12 overflow-hidden rounded-lg border border-gray-300 text-sm" }, al = ["disabled", "onClick"], Ie = {
1270
+ __name: "NotationInput",
1271
+ props: {
1272
+ modelValue: {
1273
+ type: [String, Number, null],
1274
+ default: ""
1275
+ },
1276
+ options: {
1277
+ type: Array,
1278
+ default: () => []
1279
+ },
1280
+ disabled: {
1281
+ type: Boolean,
1282
+ default: !1
1283
+ }
1284
+ },
1285
+ emits: ["update:modelValue"],
1286
+ setup(e, { emit: a }) {
1287
+ const t = a, l = e, o = f(() => l.options.map((u) => u == null ? "" : String(u).trim()).filter((u) => u !== "")), d = (u) => String(u) === String(l.modelValue ?? ""), i = (u) => t("update:modelValue", u);
1288
+ return (u, k) => (s(), n("div", sl, [
1289
+ (s(!0), n(P, null, W(o.value, (x, T) => (s(), n("button", {
1290
+ key: `notation-${T}-${x}`,
1291
+ type: "button",
1292
+ class: _(["flex-1 border-l border-gray-300 px-2 text-center font-semibold transition-colors duration-150 first:border-l-0", [
1293
+ T === 0 ? "rounded-l-lg" : "",
1294
+ T === o.value.length - 1 ? "rounded-r-lg" : "",
1295
+ d(x) ? "bg-indigo-600 text-white" : "bg-white text-gray-700 hover:bg-gray-50",
1296
+ "focus-visible:ring-2 "
1297
+ ]]),
1298
+ disabled: e.disabled,
1299
+ onClick: (h) => i(x)
1300
+ }, $(x), 11, al))), 128))
1301
+ ]));
1302
+ }
1303
+ }, nl = ["name", "value", "checked", "disabled"], Le = {
1304
+ __name: "RadioInput",
1305
+ props: {
1306
+ modelValue: {
1307
+ type: [String, Number, Boolean, null],
1308
+ default: null
1309
+ },
1310
+ value: {
1311
+ type: [String, Number, Boolean],
1312
+ default: !0
1313
+ },
1314
+ label: {
1315
+ type: String,
1316
+ default: ""
1317
+ },
1318
+ name: {
1319
+ type: String,
1320
+ default: void 0
1321
+ },
1322
+ disabled: {
1323
+ type: Boolean,
1324
+ default: !1
1325
+ }
1326
+ },
1327
+ emits: ["update:modelValue"],
1328
+ setup(e, { emit: a }) {
1329
+ const t = a, l = e, o = f(() => String(l.modelValue ?? "") === String(l.value)), d = z(!1), i = () => {
1330
+ d.value = !0;
1331
+ }, u = () => {
1332
+ d.value = !1;
1333
+ }, k = () => t("update:modelValue", l.value);
1334
+ return (x, T) => (s(), n("label", {
1335
+ class: _(["inline-flex items-center rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
1336
+ o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
1337
+ e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
1338
+ d.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
1339
+ ]])
1340
+ }, [
1341
+ r("input", {
1342
+ type: "radio",
1343
+ class: "sr-only",
1344
+ name: e.name,
1345
+ value: e.value,
1346
+ checked: o.value,
1347
+ disabled: e.disabled,
1348
+ onChange: k,
1349
+ onFocus: i,
1350
+ onBlur: u
1351
+ }, null, 40, nl),
1352
+ r("span", null, $(o.value ? "✓" : "○") + " " + $(e.label), 1)
1353
+ ], 2));
1354
+ }
1355
+ }, ol = { class: "flex flex-wrap gap-3" }, De = {
1356
+ __name: "RadioMultipleInput",
1357
+ props: {
1358
+ modelValue: {
1359
+ type: [String, Number, null],
1360
+ default: ""
1361
+ },
1362
+ options: {
1363
+ type: Array,
1364
+ default: () => []
1365
+ },
1366
+ name: {
1367
+ type: String,
1368
+ default: void 0
1369
+ },
1370
+ disabled: {
1371
+ type: Boolean,
1372
+ default: !1
1373
+ }
1374
+ },
1375
+ emits: ["update:modelValue"],
1376
+ setup(e, { emit: a }) {
1377
+ const t = a, l = e, o = f(() => l.options.map((i) => i == null ? "" : String(i).trim()).filter((i) => i !== "")), d = (i) => t("update:modelValue", i);
1378
+ return (i, u) => (s(), n("div", ol, [
1379
+ (s(!0), n(P, null, W(o.value, (k) => (s(), A(re, {
1380
+ key: `radio-${e.name ?? "group"}-${k}`,
1381
+ type: "radio-input",
1382
+ "model-value": l.modelValue,
1383
+ name: e.name,
1384
+ value: k,
1385
+ label: k,
1386
+ disabled: e.disabled,
1387
+ "onUpdate:modelValue": d
1388
+ }, null, 8, ["model-value", "name", "value", "label", "disabled"]))), 128))
1389
+ ]));
1390
+ }
1391
+ }, rl = ["for"], il = {
1392
+ key: 1,
1393
+ class: "text-xs text-gray-500 mb-1 block break-all"
1394
+ }, dl = {
1395
+ key: 14,
1396
+ class: "flex items-center mt-2 text-sm text-red-600"
1397
+ }, ne = "block w-full px-4 py-3 rounded-lg bg-white text-sm placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200", re = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
1398
+ __name: "InputGroup",
1399
+ props: {
1400
+ type: {
1401
+ type: String,
1402
+ required: !0
1403
+ },
1404
+ label: {
1405
+ type: String,
1406
+ default: ""
1407
+ },
1408
+ helperText: {
1409
+ type: String,
1410
+ default: ""
1411
+ },
1412
+ name: {
1413
+ type: String,
1414
+ default: void 0
1415
+ },
1416
+ errorMessage: {
1417
+ type: String,
1418
+ default: ""
1419
+ },
1420
+ modelValue: {
1421
+ type: [String, Number, Boolean, Array, null],
1422
+ default: ""
1423
+ },
1424
+ disabled: {
1425
+ type: Boolean,
1426
+ default: !1
1427
+ },
1428
+ disabledClass: {
1429
+ type: String,
1430
+ default: "!bg-gray-200"
1431
+ },
1432
+ modelModifiers: {
1433
+ type: Object,
1434
+ default: () => ({})
1435
+ },
1436
+ withTimestamp: {
1437
+ type: Boolean,
1438
+ default: !1
1439
+ },
1440
+ options: {
1441
+ type: Array,
1442
+ default: () => []
1443
+ },
1444
+ placeholder: {
1445
+ type: String,
1446
+ default: ""
1447
+ },
1448
+ placeholderDisabled: {
1449
+ type: Boolean,
1450
+ default: !1
1451
+ },
1452
+ softDeleteAware: {
1453
+ type: Boolean,
1454
+ default: !1
1455
+ },
1456
+ labelKey: {
1457
+ type: String,
1458
+ default: "name"
1459
+ },
1460
+ valueKey: {
1461
+ type: String,
1462
+ default: "id"
1463
+ },
1464
+ deletedKey: {
1465
+ type: String,
1466
+ default: "deleted_at"
1467
+ },
1468
+ optionLabel: {
1469
+ type: Function,
1470
+ default: null
1471
+ },
1472
+ baseClass: {
1473
+ type: [String, Array, Object],
1474
+ default: void 0
1475
+ },
1476
+ normalTextClass: {
1477
+ type: [String, Array, Object],
1478
+ default: void 0
1479
+ },
1480
+ deletedSelectedClass: {
1481
+ type: [String, Array, Object],
1482
+ default: void 0
1483
+ },
1484
+ optionClass: {
1485
+ type: [String, Array, Object],
1486
+ default: void 0
1487
+ },
1488
+ deletedOptionClass: {
1489
+ type: [String, Array, Object],
1490
+ default: void 0
1491
+ },
1492
+ placeholderClass: {
1493
+ type: [String, Array, Object],
1494
+ default: void 0
1495
+ },
1496
+ accept: {
1497
+ type: String,
1498
+ default: void 0
1499
+ },
1500
+ currentImageUrl: {
1501
+ type: String,
1502
+ default: ""
1503
+ },
1504
+ currentLabel: {
1505
+ type: String,
1506
+ default: "Current logo"
1507
+ },
1508
+ currentSubtext: {
1509
+ type: String,
1510
+ default: "Upload a new logo to replace this one"
1511
+ }
1512
+ },
1513
+ emits: ["update:modelValue", "blur"],
1514
+ setup(e, { emit: a }) {
1515
+ const t = e, l = a, o = H(), d = (I) => l("update:modelValue", I), i = f(() => !!t.errorMessage), u = f(() => C.value || p.value), k = f(() => {
1516
+ const I = o.id;
1517
+ return typeof I == "string" && I !== "" ? I : void 0;
1518
+ }), x = [
1519
+ "text",
1520
+ "email",
1521
+ "password",
1522
+ "number",
1523
+ "time",
1524
+ "url",
1525
+ "tel",
1526
+ "search",
1527
+ "month",
1528
+ "week",
1529
+ "color"
1530
+ ], T = [], h = f(() => t.type === "image"), b = f(() => t.type === "notation"), C = f(() => t.type === "checkbox-input"), p = f(() => t.type === "radio-input"), L = f(() => t.type === "checkbox"), j = f(() => t.type === "radio"), U = f(() => t.type === "date" || t.type === "datetime-local"), K = f(() => t.type === "textarea"), te = f(() => t.type === "select"), le = f(() => x.includes(t.type)), se = f(() => T.includes(t.type)), q = f(() => ({
1531
+ ...o,
1532
+ class: [ne, o.class],
1533
+ type: t.type,
1534
+ modelValue: t.modelValue,
1535
+ disabled: t.disabled,
1536
+ disabledClass: t.disabledClass
1537
+ })), Q = f(() => ({
1538
+ ...o,
1539
+ class: [ne, o.class],
1540
+ modelValue: t.modelValue,
1541
+ disabled: t.disabled,
1542
+ disabledClass: t.disabledClass
1543
+ })), v = f(() => ({
1544
+ ...o,
1545
+ class: [ne, o.class],
1546
+ modelValue: t.modelValue,
1547
+ withTimestamp: t.type === "datetime-local" || t.withTimestamp,
1548
+ disabled: t.disabled,
1549
+ disabledClass: t.disabledClass
1550
+ })), R = f(() => {
1551
+ const I = {
1552
+ ...o,
1553
+ class: [ne, o.class],
1554
+ modelValue: t.modelValue,
1555
+ modelModifiers: t.modelModifiers,
1556
+ options: t.options,
1557
+ placeholder: t.placeholder,
1558
+ placeholderDisabled: t.placeholderDisabled,
1559
+ disabled: t.disabled,
1560
+ softDeleteAware: t.softDeleteAware,
1561
+ labelKey: t.labelKey,
1562
+ valueKey: t.valueKey,
1563
+ deletedKey: t.deletedKey,
1564
+ optionLabel: t.optionLabel
1565
+ };
1566
+ return t.baseClass !== void 0 && (I.baseClass = t.baseClass), t.normalTextClass !== void 0 && (I.normalTextClass = t.normalTextClass), t.deletedSelectedClass !== void 0 && (I.deletedSelectedClass = t.deletedSelectedClass), t.optionClass !== void 0 && (I.optionClass = t.optionClass), t.deletedOptionClass !== void 0 && (I.deletedOptionClass = t.deletedOptionClass), t.placeholderClass !== void 0 && (I.placeholderClass = t.placeholderClass), I;
1567
+ }), N = f(() => ({
1568
+ ...o,
1569
+ modelValue: t.modelValue,
1570
+ options: t.options,
1571
+ disabled: t.disabled
1572
+ })), c = f(() => ({
1573
+ ...o,
1574
+ modelValue: t.modelValue,
1575
+ options: t.options,
1576
+ disabled: t.disabled
1577
+ })), m = f(() => ({
1578
+ ...o,
1579
+ modelValue: t.modelValue,
1580
+ options: t.options,
1581
+ name: t.name ?? o.name,
1582
+ disabled: t.disabled
1583
+ })), y = f(() => ({
1584
+ ...o,
1585
+ modelValue: t.modelValue,
1586
+ label: t.label || o.label || "",
1587
+ disabled: t.disabled
1588
+ })), D = f(() => ({
1589
+ ...o,
1590
+ modelValue: t.modelValue,
1591
+ label: t.label || o.label || "",
1592
+ name: t.name ?? o.name,
1593
+ disabled: t.disabled
1594
+ })), S = f(() => ({
1595
+ ...o,
1596
+ accept: t.accept ?? o.accept ?? "image/*",
1597
+ modelValue: t.modelValue,
1598
+ currentImageUrl: t.currentImageUrl,
1599
+ currentLabel: t.currentLabel,
1600
+ currentSubtext: t.currentSubtext
1601
+ }));
1602
+ return (I, w) => (s(), n("div", null, [
1603
+ e.label && !u.value ? (s(), n("label", {
1604
+ key: 0,
1605
+ for: k.value,
1606
+ class: "text-base font-semibold text-gray-900 mb-1 block"
1607
+ }, $(e.label), 9, rl)) : O("", !0),
1608
+ e.helperText && !u.value ? (s(), n("span", il, $(e.helperText), 1)) : O("", !0),
1609
+ K.value ? (s(), A(Ve, M({ key: 2 }, Q.value, {
1610
+ "onUpdate:modelValue": w[0] || (w[0] = (B) => l("update:modelValue", B)),
1611
+ onBlur: w[1] || (w[1] = (B) => l("blur", B))
1612
+ }), null, 16)) : te.value ? (s(), A(Te, M({ key: 3 }, R.value, {
1613
+ "onUpdate:modelValue": w[2] || (w[2] = (B) => l("update:modelValue", B)),
1614
+ onBlur: w[3] || (w[3] = (B) => l("blur", B))
1615
+ }), null, 16)) : U.value ? (s(), A(Ae, M({ key: 4 }, v.value, {
1616
+ "onUpdate:modelValue": w[4] || (w[4] = (B) => l("update:modelValue", B)),
1617
+ onBlur: w[5] || (w[5] = (B) => l("blur", B))
1618
+ }), null, 16)) : le.value ? (s(), A(_e, M({ key: 5 }, q.value, {
1619
+ "onUpdate:modelValue": w[6] || (w[6] = (B) => l("update:modelValue", B)),
1620
+ onBlur: w[7] || (w[7] = (B) => l("blur", B))
1621
+ }), null, 16)) : h.value ? (s(), A(je, M({ key: 6 }, S.value, {
1622
+ "onUpdate:modelValue": w[8] || (w[8] = (B) => l("update:modelValue", B)),
1623
+ onBlur: w[9] || (w[9] = (B) => l("blur", B))
1624
+ }), null, 16)) : C.value ? (s(), A(Ce, M({ key: 7 }, y.value, {
1625
+ "onUpdate:modelValue": w[10] || (w[10] = (B) => l("update:modelValue", B)),
1626
+ onBlur: w[11] || (w[11] = (B) => l("blur", B))
1627
+ }), null, 16)) : p.value ? (s(), A(Le, M({ key: 8 }, D.value, {
1628
+ "onUpdate:modelValue": w[12] || (w[12] = (B) => l("update:modelValue", B)),
1629
+ onBlur: w[13] || (w[13] = (B) => l("blur", B))
1630
+ }), null, 16)) : b.value ? (s(), A(Ie, M({ key: 9 }, N.value, {
1631
+ "onUpdate:modelValue": w[14] || (w[14] = (B) => l("update:modelValue", B)),
1632
+ onBlur: w[15] || (w[15] = (B) => l("blur", B))
1633
+ }), null, 16)) : L.value ? (s(), A(Oe, M({ key: 10 }, c.value, {
1634
+ "onUpdate:modelValue": w[16] || (w[16] = (B) => l("update:modelValue", B)),
1635
+ onBlur: w[17] || (w[17] = (B) => l("blur", B))
1636
+ }), null, 16)) : j.value ? (s(), A(De, M({ key: 11 }, m.value, {
1637
+ "onUpdate:modelValue": w[18] || (w[18] = (B) => l("update:modelValue", B)),
1638
+ onBlur: w[19] || (w[19] = (B) => l("blur", B))
1639
+ }), null, 16)) : se.value ? g(I.$slots, "unsupported-type", {
1640
+ key: 12,
1641
+ type: e.type,
1642
+ modelValue: e.modelValue,
1643
+ updateValue: d,
1644
+ attrs: V(o)
1645
+ }) : g(I.$slots, "unsupported-type", {
1646
+ key: 13,
1647
+ type: e.type,
1648
+ modelValue: e.modelValue,
1649
+ updateValue: d,
1650
+ attrs: V(o)
1651
+ }),
1652
+ i.value ? (s(), n("div", dl, [
1653
+ E(V(qe), { class: "mr-1 h-4 w-4 flex-shrink-0" }),
1654
+ r("span", null, $(e.errorMessage), 1)
1655
+ ])) : O("", !0)
1656
+ ]));
1657
+ }
1658
+ }), ul = { class: "flex flex-wrap gap-3" }, Oe = {
1659
+ __name: "CheckboxMultipleInput",
1660
+ props: {
1661
+ modelValue: {
1662
+ type: Array,
1663
+ default: () => []
1664
+ },
1665
+ options: {
1666
+ type: Array,
1667
+ default: () => []
1668
+ },
1669
+ disabled: {
1670
+ type: Boolean,
1671
+ default: !1
1672
+ }
1673
+ },
1674
+ emits: ["update:modelValue"],
1675
+ setup(e, { emit: a }) {
1676
+ const t = a, l = e, o = f(() => l.options.map((u) => u == null ? "" : String(u).trim()).filter((u) => u !== "")), d = (u) => Array.isArray(l.modelValue) && l.modelValue.includes(u), i = (u, k) => {
1677
+ const x = Array.isArray(l.modelValue) ? [...l.modelValue] : [], T = x.indexOf(u);
1678
+ k && T === -1 ? x.push(u) : !k && T !== -1 && x.splice(T, 1), t("update:modelValue", x);
1679
+ };
1680
+ return (u, k) => (s(), n("div", ul, [
1681
+ (s(!0), n(P, null, W(o.value, (x) => (s(), A(re, {
1682
+ key: `checkbox-${x}`,
1683
+ type: "checkbox-input",
1684
+ "model-value": d(x),
1685
+ value: !0,
1686
+ "unchecked-value": !1,
1687
+ label: x,
1688
+ disabled: e.disabled,
1689
+ "onUpdate:modelValue": (T) => i(x, T)
1690
+ }, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]))), 128))
1691
+ ]));
1692
+ }
1693
+ }, me = {
1694
+ __name: "Modal",
1695
+ props: {
1696
+ show: {
1697
+ type: Boolean,
1698
+ default: !1
1699
+ },
1700
+ maxWidth: {
1701
+ type: String,
1702
+ default: "2xl"
1703
+ },
1704
+ closeable: {
1705
+ type: Boolean,
1706
+ default: !0
1707
+ },
1708
+ position: {
1709
+ type: String,
1710
+ default: "center",
1711
+ validator: (e) => ["top", "center", "bottom"].includes(e)
1712
+ }
1713
+ },
1714
+ emits: ["close"],
1715
+ setup(e, { emit: a }) {
1716
+ const t = e, l = a, o = z(), d = z(t.show);
1717
+ X(() => t.show, () => {
1718
+ t.show ? (document.body.style.overflow = "hidden", d.value = !0, o.value?.showModal()) : (document.body.style.overflow = null, setTimeout(() => {
1719
+ o.value?.close(), d.value = !1;
1720
+ }, 200));
1721
+ });
1722
+ const i = () => {
1723
+ t.closeable && l("close");
1724
+ }, u = (T) => {
1725
+ T.key === "Escape" && (T.preventDefault(), t.show && i());
1726
+ };
1727
+ J(() => document.addEventListener("keydown", u)), ve(() => {
1728
+ document.removeEventListener("keydown", u), document.body.style.overflow = null;
1729
+ });
1730
+ const k = f(() => ({
1731
+ sm: "sm:max-w-sm",
1732
+ md: "sm:max-w-md",
1733
+ lg: "sm:max-w-lg",
1734
+ xl: "sm:max-w-xl",
1735
+ "2xl": "sm:max-w-2xl"
1736
+ })[t.maxWidth]), x = f(() => {
1737
+ switch (t.position) {
1738
+ case "top":
1739
+ return "flex-col items-center pt-16";
1740
+ case "bottom":
1741
+ return "flex-col items-center justify-end pb-16";
1742
+ default:
1743
+ return "items-center justify-center";
1744
+ }
1745
+ });
1746
+ return (T, h) => (s(), n("dialog", {
1747
+ class: "z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent",
1748
+ ref_key: "dialog",
1749
+ ref: o
1750
+ }, [
1751
+ r("div", {
1752
+ class: _(["fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50 flex", x.value])
1753
+ }, [
1754
+ E(Y, {
1755
+ "enter-active-class": "ease-out duration-300",
1756
+ "enter-from-class": "opacity-0",
1757
+ "enter-to-class": "opacity-100",
1758
+ "leave-active-class": "ease-in duration-200",
1759
+ "leave-from-class": "opacity-100",
1760
+ "leave-to-class": "opacity-0"
1761
+ }, {
1762
+ default: F(() => [
1763
+ G(r("div", {
1764
+ class: "fixed inset-0 transform transition-all",
1765
+ onClick: i
1766
+ }, [...h[0] || (h[0] = [
1767
+ r("div", { class: "absolute inset-0 bg-gray-500 opacity-75" }, null, -1)
1768
+ ])], 512), [
1769
+ [Z, e.show]
1770
+ ])
1771
+ ]),
1772
+ _: 1
1773
+ }),
1774
+ E(Y, {
1775
+ "enter-active-class": "ease-out duration-300",
1776
+ "enter-from-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
1777
+ "enter-to-class": "opacity-100 translate-y-0 sm:scale-100",
1778
+ "leave-active-class": "ease-in duration-200",
1779
+ "leave-from-class": "opacity-100 translate-y-0 sm:scale-100",
1780
+ "leave-to-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
1781
+ }, {
1782
+ default: F(() => [
1783
+ G(r("div", {
1784
+ class: _(["mb-6 bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto", k.value])
1785
+ }, [
1786
+ d.value ? g(T.$slots, "default", { key: 0 }) : O("", !0)
1787
+ ], 2), [
1788
+ [Z, e.show]
1789
+ ])
1790
+ ]),
1791
+ _: 3
1792
+ })
1793
+ ], 2)
1794
+ ], 512));
1795
+ }
1796
+ }, cl = { class: "bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, fl = { class: "sm:flex sm:items-start" }, gl = { class: "mx-auto shrink-0 flex items-center justify-center size-12 rounded-full bg-red-100 sm:mx-0 sm:size-10" }, pl = { class: "mt-3 text-center sm:mt-0 sm:ms-4 sm:text-start" }, ml = { class: "text-lg font-medium text-gray-900" }, yl = { class: "mt-4 text-sm text-gray-600" }, bl = { class: "flex flex-col-reverse lg:flex-row lg:justify-end px-6 py-4 bg-gray-100 text-end gap-4 lg:gap-0" }, hl = {
1797
+ __name: "ConfirmationModal",
1798
+ props: {
1799
+ show: {
1800
+ type: Boolean,
1801
+ default: !1
1802
+ },
1803
+ maxWidth: {
1804
+ type: String,
1805
+ default: "2xl"
1806
+ },
1807
+ closeable: {
1808
+ type: Boolean,
1809
+ default: !0
1810
+ },
1811
+ position: {
1812
+ type: String,
1813
+ default: "center",
1814
+ validator: (e) => ["top", "center", "bottom"].includes(e)
1815
+ }
1816
+ },
1817
+ emits: ["close"],
1818
+ setup(e, { emit: a }) {
1819
+ const t = a, l = () => {
1820
+ t("close");
1821
+ };
1822
+ return (o, d) => (s(), A(me, {
1823
+ show: e.show,
1824
+ "max-width": e.maxWidth,
1825
+ closeable: e.closeable,
1826
+ position: e.position,
1827
+ onClose: l
1828
+ }, {
1829
+ default: F(() => [
1830
+ r("div", cl, [
1831
+ r("div", fl, [
1832
+ r("div", gl, [
1833
+ E(V(we), { class: "size-6 text-red-600" })
1834
+ ]),
1835
+ r("div", pl, [
1836
+ r("h3", ml, [
1837
+ g(o.$slots, "title")
1838
+ ]),
1839
+ r("div", yl, [
1840
+ g(o.$slots, "content")
1841
+ ])
1842
+ ])
1843
+ ])
1844
+ ]),
1845
+ r("div", bl, [
1846
+ g(o.$slots, "footer")
1847
+ ])
1848
+ ]),
1849
+ _: 3
1850
+ }, 8, ["show", "max-width", "closeable", "position"]));
1851
+ }
1852
+ }, vl = ["type", "disabled"], xl = /* @__PURE__ */ Object.assign({
1853
+ inheritAttrs: !1
1854
+ }, {
1855
+ __name: "DangerButton",
1856
+ props: {
1857
+ type: {
1858
+ type: String,
1859
+ default: "button"
1860
+ },
1861
+ disabled: {
1862
+ type: Boolean,
1863
+ default: !1
1864
+ }
1865
+ },
1866
+ setup(e) {
1867
+ const a = H();
1868
+ return (t, l) => (s(), n("button", M(V(a), {
1869
+ type: e.type,
1870
+ disabled: e.disabled,
1871
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg border border-red-300 bg-red-50 p-3 py-2 text-sm font-medium text-red-700 transition-all duration-200 hover:bg-red-100 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-red-50"
1872
+ }), [
1873
+ g(t.$slots, "default")
1874
+ ], 16, vl));
1875
+ }
1876
+ }), wl = { class: "px-6 py-4" }, kl = { class: "text-lg font-medium text-gray-900" }, Sl = { class: "mt-4 text-sm text-gray-600" }, $l = { class: "flex flex-row justify-end px-6 py-4 bg-gray-100 text-end" }, Cl = {
1877
+ __name: "DialogModal",
1878
+ props: {
1879
+ show: {
1880
+ type: Boolean,
1881
+ default: !1
1882
+ },
1883
+ maxWidth: {
1884
+ type: String,
1885
+ default: "2xl"
1886
+ },
1887
+ closeable: {
1888
+ type: Boolean,
1889
+ default: !0
1890
+ }
1891
+ },
1892
+ emits: ["close"],
1893
+ setup(e, { emit: a }) {
1894
+ const t = a, l = () => {
1895
+ t("close");
1896
+ };
1897
+ return (o, d) => (s(), A(me, {
1898
+ show: e.show,
1899
+ "max-width": e.maxWidth,
1900
+ closeable: e.closeable,
1901
+ onClose: l
1902
+ }, {
1903
+ default: F(() => [
1904
+ r("div", wl, [
1905
+ r("div", kl, [
1906
+ g(o.$slots, "title")
1907
+ ]),
1908
+ r("div", Sl, [
1909
+ g(o.$slots, "content")
1910
+ ])
1911
+ ]),
1912
+ r("div", $l, [
1913
+ g(o.$slots, "footer")
1914
+ ])
1915
+ ]),
1916
+ _: 3
1917
+ }, 8, ["show", "max-width", "closeable"]));
1918
+ }
1919
+ }, _l = { class: "relative" }, Vl = {
1920
+ __name: "Dropdown",
1921
+ props: {
1922
+ align: {
1923
+ type: String,
1924
+ default: "right"
1925
+ },
1926
+ width: {
1927
+ type: String,
1928
+ default: "48"
1929
+ },
1930
+ contentClasses: {
1931
+ type: Array,
1932
+ default: () => ["py-1", "bg-white"]
1933
+ }
1934
+ },
1935
+ setup(e) {
1936
+ const a = e;
1937
+ let t = z(!1);
1938
+ const l = (i) => {
1939
+ t.value && i.key === "Escape" && (t.value = !1);
1940
+ };
1941
+ J(() => document.addEventListener("keydown", l)), ve(() => document.removeEventListener("keydown", l));
1942
+ const o = f(() => ({
1943
+ 48: "w-48"
1944
+ })[a.width.toString()]), d = f(() => a.align === "left" ? "ltr:origin-top-left rtl:origin-top-right start-0" : a.align === "right" ? "ltr:origin-top-right rtl:origin-top-left end-0" : "origin-top");
1945
+ return (i, u) => (s(), n("div", _l, [
1946
+ r("div", {
1947
+ onClick: u[0] || (u[0] = (k) => ie(t) ? t.value = !V(t) : t = !V(t))
1948
+ }, [
1949
+ g(i.$slots, "trigger", { open: V(t) })
1950
+ ]),
1951
+ G(r("div", {
1952
+ class: "fixed inset-0 z-40",
1953
+ onClick: u[1] || (u[1] = (k) => ie(t) ? t.value = !1 : t = !1)
1954
+ }, null, 512), [
1955
+ [Z, V(t)]
1956
+ ]),
1957
+ E(Y, {
1958
+ "enter-active-class": "transition-all duration-300 ease-out",
1959
+ "enter-from-class": "transform opacity-0 scale-95 translate-y-2",
1960
+ "enter-to-class": "transform opacity-100 scale-100 translate-y-0",
1961
+ "leave-active-class": "transition-all duration-200 ease-in",
1962
+ "leave-from-class": "transform opacity-100 scale-100 translate-y-0",
1963
+ "leave-to-class": "transform opacity-0 scale-95 translate-y-2"
1964
+ }, {
1965
+ default: F(() => [
1966
+ G(r("div", {
1967
+ class: _(["absolute z-50 mt-2 rounded-xl shadow-xl shadow-gray-900/10", [o.value, d.value]]),
1968
+ style: { display: "none" },
1969
+ onClick: u[2] || (u[2] = (k) => ie(t) ? t.value = !1 : t = !1)
1970
+ }, [
1971
+ r("div", {
1972
+ class: _(["rounded-xl ring-1 ring-gray-200/60 backdrop-blur-sm bg-white/95", e.contentClasses])
1973
+ }, [
1974
+ g(i.$slots, "content")
1975
+ ], 2)
1976
+ ], 2), [
1977
+ [Z, V(t)]
1978
+ ])
1979
+ ]),
1980
+ _: 3
1981
+ })
1982
+ ]));
1983
+ }
1984
+ }, Bl = {
1985
+ key: 0,
1986
+ type: "submit",
1987
+ class: "block w-full px-4 py-2 text-start text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
1988
+ }, Tl = ["href"], Al = {
1989
+ __name: "DropdownLink",
1990
+ props: {
1991
+ href: String,
1992
+ as: String
1993
+ },
1994
+ setup(e) {
1995
+ return (a, t) => (s(), n("div", null, [
1996
+ e.as == "button" ? (s(), n("button", Bl, [
1997
+ g(a.$slots, "default")
1998
+ ])) : e.as == "a" ? (s(), n("a", {
1999
+ key: 1,
2000
+ href: e.href,
2001
+ class: "block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
2002
+ }, [
2003
+ g(a.$slots, "default")
2004
+ ], 8, Tl)) : (s(), A(V(ee), {
2005
+ key: 2,
2006
+ href: e.href,
2007
+ class: "block px-4 py-2 text-sm leading-5 text-gray-700 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 transition duration-150 ease-in-out"
2008
+ }, {
2009
+ default: F(() => [
2010
+ g(a.$slots, "default")
2011
+ ]),
2012
+ _: 3
2013
+ }, 8, ["href"]))
2014
+ ]));
2015
+ }
2016
+ }, jl = { class: "md:grid md:grid-cols-3 md:gap-6" }, Il = { class: "mt-5 md:mt-0 md:col-span-2 shadow sm:rounded-lg" }, Ll = { class: "grid grid-cols-6 gap-6" }, Dl = {
2017
+ key: 0,
2018
+ class: "flex items-center justify-start px-3 pb-6 bg-white text-end sm:rounded-bl-md sm:rounded-br-md"
2019
+ }, Ol = {
2020
+ __name: "FormSection",
2021
+ emits: ["submitted"],
2022
+ setup(e) {
2023
+ const a = f(() => !!oe().actions);
2024
+ return (t, l) => (s(), n("div", jl, [
2025
+ E(pe, null, {
2026
+ title: F(() => [
2027
+ g(t.$slots, "title")
2028
+ ]),
2029
+ description: F(() => [
2030
+ g(t.$slots, "description")
2031
+ ]),
2032
+ _: 3
2033
+ }),
2034
+ r("div", Il, [
2035
+ r("form", {
2036
+ onSubmit: l[0] || (l[0] = ue((o) => t.$emit("submitted"), ["prevent"]))
2037
+ }, [
2038
+ r("div", {
2039
+ class: _(["px-4 py-5 bg-white sm:p-6", a.value ? "sm:rounded-tl-md sm:rounded-tr-md" : "sm:rounded-md"])
2040
+ }, [
2041
+ r("div", Ll, [
2042
+ g(t.$slots, "form")
2043
+ ])
2044
+ ], 2),
2045
+ a.value ? (s(), n("div", Dl, [
2046
+ g(t.$slots, "actions")
2047
+ ])) : O("", !0)
2048
+ ], 32)
2049
+ ])
2050
+ ]));
2051
+ }
2052
+ }, Ml = { class: "text-sm text-red-600" }, zl = {
2053
+ __name: "InputError",
2054
+ props: {
2055
+ message: String
2056
+ },
2057
+ setup(e) {
2058
+ return (a, t) => G((s(), n("div", null, [
2059
+ r("p", Ml, $(e.message), 1)
2060
+ ], 512)), [
2061
+ [Z, e.message]
2062
+ ]);
2063
+ }
2064
+ }, Fl = { class: "block font-medium text-sm text-gray-700" }, Ul = { key: 0 }, Nl = { key: 1 }, El = {
2065
+ __name: "InputLabel",
2066
+ props: {
2067
+ value: String
2068
+ },
2069
+ setup(e) {
2070
+ return (a, t) => (s(), n("label", Fl, [
2071
+ e.value ? (s(), n("span", Ul, $(e.value), 1)) : (s(), n("span", Nl, [
2072
+ g(a.$slots, "default")
2073
+ ]))
2074
+ ]));
2075
+ }
2076
+ }, Kl = {
2077
+ __name: "NavLink",
2078
+ props: {
2079
+ href: String,
2080
+ active: Boolean
2081
+ },
2082
+ setup(e) {
2083
+ const a = e, t = f(() => a.active ? "inline-flex items-center px-1 pt-1 border-b-2 border-indigo-500 text-sm font-semibold leading-5 text-gray-900 focus:outline-none focus:border-indigo-700 transition-all duration-300 ease-out relative group" : "inline-flex items-center px-1 pt-1 border-b-2 border-transparent text-sm font-medium leading-5 text-gray-600 hover:text-gray-900 hover:border-gray-400 focus:outline-none focus:text-gray-900 focus:border-gray-400 transition-all duration-300 ease-out relative group");
2084
+ return (l, o) => (s(), A(V(ee), {
2085
+ href: e.href,
2086
+ class: _(t.value)
2087
+ }, {
2088
+ default: F(() => [
2089
+ g(l.$slots, "default")
2090
+ ]),
2091
+ _: 3
2092
+ }, 8, ["href", "class"]));
2093
+ }
2094
+ }, Rl = ["type", "disabled"], Pl = /* @__PURE__ */ Object.assign({
2095
+ inheritAttrs: !1
2096
+ }, {
2097
+ __name: "PrimaryButton",
2098
+ props: {
2099
+ type: {
2100
+ type: String,
2101
+ default: "submit"
2102
+ },
2103
+ disabled: {
2104
+ type: Boolean,
2105
+ default: !1
2106
+ }
2107
+ },
2108
+ setup(e) {
2109
+ const a = H();
2110
+ return (t, l) => (s(), n("button", M(V(a), {
2111
+ type: e.type,
2112
+ disabled: e.disabled,
2113
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-blue-500 to-blue-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-blue-600 hover:to-blue-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:from-blue-500 disabled:hover:to-blue-600"
2114
+ }), [
2115
+ g(t.$slots, "default")
2116
+ ], 16, Rl));
2117
+ }
2118
+ }), Hl = ["href", "title", "target", "rel"], ye = /* @__PURE__ */ Object.assign({
2119
+ inheritAttrs: !1
2120
+ }, {
2121
+ __name: "PrimaryLinkButton",
2122
+ props: {
2123
+ href: {
2124
+ type: String,
2125
+ required: !0
2126
+ },
2127
+ title: {
2128
+ type: String,
2129
+ default: null
2130
+ },
2131
+ external: {
2132
+ type: Boolean,
2133
+ default: !1
2134
+ },
2135
+ target: {
2136
+ type: String,
2137
+ default: null
2138
+ },
2139
+ rel: {
2140
+ type: String,
2141
+ default: null
2142
+ }
2143
+ },
2144
+ setup(e) {
2145
+ const a = H();
2146
+ return (t, l) => e.external ? (s(), n("a", M({ key: 1 }, V(a), {
2147
+ href: e.href,
2148
+ title: e.title,
2149
+ target: e.target,
2150
+ rel: e.rel,
2151
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-blue-500 to-blue-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-blue-600 hover:to-blue-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
2152
+ }), [
2153
+ g(t.$slots, "default")
2154
+ ], 16, Hl)) : (s(), A(V(ee), M({ key: 0 }, V(a), {
2155
+ href: e.href,
2156
+ title: e.title,
2157
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-blue-500 to-blue-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-blue-600 hover:to-blue-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
2158
+ }), {
2159
+ default: F(() => [
2160
+ g(t.$slots, "default")
2161
+ ]),
2162
+ _: 3
2163
+ }, 16, ["href", "title"]));
2164
+ }
2165
+ }), Wl = ["href"], ql = {
2166
+ __name: "ResponsiveNavLink",
2167
+ props: {
2168
+ active: Boolean,
2169
+ href: String,
2170
+ as: String
2171
+ },
2172
+ setup(e) {
2173
+ const a = e, t = f(() => a.active ? "block w-full ps-3 pe-4 py-2 border-l-4 border-indigo-400 text-start text-base font-medium text-indigo-700 bg-indigo-50 focus:outline-none focus:text-indigo-800 focus:bg-indigo-100 focus:border-indigo-700 transition duration-150 ease-in-out" : "block w-full ps-3 pe-4 py-2 border-l-4 border-transparent text-start text-base font-medium text-gray-600 hover:text-gray-800 hover:bg-gray-50 hover:border-gray-300 focus:outline-none focus:text-gray-800 focus:bg-gray-50 focus:border-gray-300 transition duration-150 ease-in-out");
2174
+ return (l, o) => (s(), n("div", null, [
2175
+ e.as == "button" ? (s(), n("button", {
2176
+ key: 0,
2177
+ class: _([t.value, "w-full text-start"])
2178
+ }, [
2179
+ g(l.$slots, "default")
2180
+ ], 2)) : e.as == "a" ? (s(), n("a", {
2181
+ key: 1,
2182
+ class: _([t.value, "w-full text-start"]),
2183
+ href: e.href
2184
+ }, [
2185
+ g(l.$slots, "default")
2186
+ ], 10, Wl)) : (s(), A(V(ee), {
2187
+ key: 2,
2188
+ href: e.href,
2189
+ class: _(t.value)
2190
+ }, {
2191
+ default: F(() => [
2192
+ g(l.$slots, "default")
2193
+ ]),
2194
+ _: 3
2195
+ }, 8, ["href", "class"]))
2196
+ ]));
2197
+ }
2198
+ }, Gl = ["type", "disabled"], Xl = /* @__PURE__ */ Object.assign({
2199
+ inheritAttrs: !1
2200
+ }, {
2201
+ __name: "SecondaryButton",
2202
+ props: {
2203
+ type: {
2204
+ type: String,
2205
+ default: "button"
2206
+ },
2207
+ disabled: {
2208
+ type: Boolean,
2209
+ default: !1
2210
+ }
2211
+ },
2212
+ setup(e) {
2213
+ const a = H();
2214
+ return (t, l) => (s(), n("button", M(V(a), {
2215
+ type: e.type,
2216
+ disabled: e.disabled,
2217
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-green-500 to-green-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-green-600 hover:to-green-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:from-green-500 disabled:hover:to-green-600"
2218
+ }), [
2219
+ g(t.$slots, "default")
2220
+ ], 16, Gl));
2221
+ }
2222
+ }), Jl = ["href", "title", "target", "rel"], Ql = /* @__PURE__ */ Object.assign({
2223
+ inheritAttrs: !1
2224
+ }, {
2225
+ __name: "SecondaryLinkButton",
2226
+ props: {
2227
+ href: {
2228
+ type: String,
2229
+ required: !0
2230
+ },
2231
+ title: {
2232
+ type: String,
2233
+ default: null
2234
+ },
2235
+ external: {
2236
+ type: Boolean,
2237
+ default: !1
2238
+ },
2239
+ target: {
2240
+ type: String,
2241
+ default: null
2242
+ },
2243
+ rel: {
2244
+ type: String,
2245
+ default: null
2246
+ }
2247
+ },
2248
+ setup(e) {
2249
+ const a = H();
2250
+ return (t, l) => e.external ? (s(), n("a", M({ key: 1 }, V(a), {
2251
+ href: e.href,
2252
+ title: e.title,
2253
+ target: e.target,
2254
+ rel: e.rel,
2255
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-green-500 to-green-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-green-600 hover:to-green-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2"
2256
+ }), [
2257
+ g(t.$slots, "default")
2258
+ ], 16, Jl)) : (s(), A(V(ee), M({ key: 0 }, V(a), {
2259
+ href: e.href,
2260
+ title: e.title,
2261
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-green-500 to-green-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-green-600 hover:to-green-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-green-500 focus:ring-offset-2"
2262
+ }), {
2263
+ default: F(() => [
2264
+ g(t.$slots, "default")
2265
+ ]),
2266
+ _: 3
2267
+ }, 16, ["href", "title"]));
2268
+ }
2269
+ }), Yl = { class: "hidden sm:block" }, Zl = { class: "py-8" }, es = {
2270
+ __name: "SectionBorder",
2271
+ setup(e) {
2272
+ return (a, t) => (s(), n("div", Yl, [
2273
+ r("div", Zl, [
2274
+ E(fe)
2275
+ ])
2276
+ ]));
2277
+ }
2278
+ }, ts = { class: "bg-white/80 backdrop-blur-sm border border-gray-200/60 rounded-xl px-6 py-4" }, ls = { class: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4" }, ss = { class: "flex items-center gap-3" }, as = { class: "text-sm font-medium text-gray-700" }, ns = { class: "flex flex-wrap items-center gap-2" }, os = ["onClick"], rs = { class: "text-xs text-gray-500" }, is = {
2279
+ __name: "SortControls",
2280
+ props: {
2281
+ fields: {
2282
+ type: Array,
2283
+ required: !0,
2284
+ validator: (e) => e.every(
2285
+ (a) => typeof a == "object" && a.key && a.label
2286
+ )
2287
+ },
2288
+ currentSortField: {
2289
+ type: String,
2290
+ default: ""
2291
+ },
2292
+ currentDirection: {
2293
+ type: String,
2294
+ default: "asc",
2295
+ validator: (e) => ["asc", "desc"].includes(e)
2296
+ },
2297
+ count: {
2298
+ type: Number,
2299
+ default: 0
2300
+ },
2301
+ countLabel: {
2302
+ type: String,
2303
+ default: "items"
2304
+ },
2305
+ sortByLabel: {
2306
+ type: String,
2307
+ default: "Sort by"
2308
+ }
2309
+ },
2310
+ emits: ["sort"],
2311
+ setup(e, { emit: a }) {
2312
+ const t = a, l = (o) => {
2313
+ t("sort", o);
2314
+ };
2315
+ return (o, d) => (s(), n("div", ts, [
2316
+ r("div", ls, [
2317
+ r("div", ss, [
2318
+ r("label", as, $(e.sortByLabel) + ":", 1),
2319
+ r("div", ns, [
2320
+ (s(!0), n(P, null, W(e.fields, (i) => (s(), n("button", {
2321
+ key: i.key,
2322
+ onClick: (u) => l(i.key),
2323
+ class: _([
2324
+ "px-3 py-1.5 text-sm font-medium rounded-lg transition-all duration-200",
2325
+ e.currentSortField === i.key ? "bg-blue-500 text-white shadow-sm" : "bg-gray-100 text-gray-700 hover:bg-gray-200"
2326
+ ])
2327
+ }, [
2328
+ ae($(i.label) + " ", 1),
2329
+ e.currentSortField === i.key && e.currentDirection === "asc" ? (s(), A(V(ke), {
2330
+ key: 0,
2331
+ class: "w-3 h-3 ml-1 inline"
2332
+ })) : O("", !0),
2333
+ e.currentSortField === i.key && e.currentDirection === "desc" ? (s(), A(V(ce), {
2334
+ key: 1,
2335
+ class: "w-3 h-3 ml-1 inline"
2336
+ })) : O("", !0)
2337
+ ], 10, os))), 128))
2338
+ ])
2339
+ ]),
2340
+ r("div", rs, $(e.count) + " " + $(e.countLabel), 1)
2341
+ ])
2342
+ ]));
2343
+ }
2344
+ }, ds = { class: "flex items-center space-x-1" }, us = { class: "flex flex-col" }, be = {
2345
+ __name: "ThSortable",
2346
+ props: {
2347
+ field: {
2348
+ type: String,
2349
+ required: !0
2350
+ },
2351
+ currentSortField: {
2352
+ type: String,
2353
+ default: ""
2354
+ },
2355
+ currentDirection: {
2356
+ type: String,
2357
+ default: "asc"
2358
+ }
2359
+ },
2360
+ setup(e) {
2361
+ const a = e, t = f(() => a.field === a.currentSortField), l = f(() => t.value ? "text-blue-600" : "text-gray-400");
2362
+ return (o, d) => (s(), n("th", {
2363
+ class: "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider cursor-pointer hover:bg-gray-100 transition-colors duration-150",
2364
+ onClick: d[0] || (d[0] = (i) => o.$emit("sort", e.field))
2365
+ }, [
2366
+ r("div", ds, [
2367
+ r("span", null, [
2368
+ g(o.$slots, "default")
2369
+ ]),
2370
+ r("div", us, [
2371
+ t.value && e.currentDirection === "asc" ? (s(), A(V(ke), {
2372
+ key: 0,
2373
+ class: _([l.value, "w-3 h-3"])
2374
+ }, null, 8, ["class"])) : O("", !0),
2375
+ t.value && e.currentDirection === "desc" ? (s(), A(V(ce), {
2376
+ key: 1,
2377
+ class: _([l.value, "w-3 h-3"])
2378
+ }, null, 8, ["class"])) : O("", !0)
2379
+ ])
2380
+ ])
2381
+ ]));
2382
+ }
2383
+ }, cs = { class: "bg-white border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)] animate-fadeIn mx-4 md:mx-0" }, fs = { class: "overflow-x-auto rounded-xl" }, gs = { class: "min-w-full divide-y divide-gray-200" }, ps = { class: "bg-gray-50" }, ms = {
2384
+ key: 0,
2385
+ class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
2386
+ }, ys = { class: "bg-white divide-y divide-gray-200" }, bs = {
2387
+ key: 0,
2388
+ class: "flex items-center"
2389
+ }, hs = ["title"], vs = {
2390
+ key: 0,
2391
+ class: "ml-2 inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800"
2392
+ }, xs = ["innerHTML"], ws = { key: 3 }, ks = {
2393
+ key: 0,
2394
+ class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
2395
+ }, Ss = {
2396
+ key: 0,
2397
+ class: "text-center py-12"
2398
+ }, $s = { class: "inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4" }, Cs = { class: "text-lg font-medium text-gray-900 mb-2" }, _s = { class: "text-gray-500 mb-4" }, Vs = {
2399
+ __name: "TableList",
2400
+ props: {
2401
+ data: {
2402
+ type: Array,
2403
+ required: !0
2404
+ },
2405
+ columns: {
2406
+ type: Array,
2407
+ required: !0
2408
+ },
2409
+ sortField: {
2410
+ type: String,
2411
+ default: ""
2412
+ },
2413
+ sortDirection: {
2414
+ type: String,
2415
+ default: "asc"
2416
+ },
2417
+ emptyState: {
2418
+ type: Object,
2419
+ default: () => ({
2420
+ icon: "UsersIcon",
2421
+ title: "No data found",
2422
+ description: "No items to display.",
2423
+ actionText: null,
2424
+ actionUrl: null
2425
+ })
2426
+ },
2427
+ rowClasses: {
2428
+ type: Function,
2429
+ default: (e, a) => [
2430
+ "transition-colors duration-150",
2431
+ e.deleted_at ? "bg-red-50 hover:bg-red-100" : "odd:bg-white even:bg-gray-50 hover:bg-gray-100"
2432
+ ]
2433
+ },
2434
+ maxTextLength: {
2435
+ type: Number,
2436
+ default: 40
2437
+ },
2438
+ actionsLabel: {
2439
+ type: String,
2440
+ default: "Actions"
2441
+ },
2442
+ deletedLabel: {
2443
+ type: String,
2444
+ default: "Deleted"
2445
+ }
2446
+ },
2447
+ emits: ["sort"],
2448
+ setup(e, { emit: a }) {
2449
+ const t = oe(), l = e, o = a;
2450
+ f(() => !!t.actions);
2451
+ const d = f(() => l.data && l.data.length > 0), i = (b) => {
2452
+ o("sort", b);
2453
+ }, u = (b) => {
2454
+ const C = String(b ?? ""), p = Number(l.maxTextLength);
2455
+ return !Number.isFinite(p) || p <= 0 || C.length <= p ? C : `${C.slice(0, p)}...`;
2456
+ }, k = (b, C) => {
2457
+ if (C.slot)
2458
+ return null;
2459
+ if (C.render)
2460
+ return C.render(b);
2461
+ const p = C.key.split(".").reduce((L, j) => L?.[j], b);
2462
+ return p == null || p === "" ? "-" : u(p);
2463
+ }, x = (b) => b.deleted_at || b.deleted, T = (b) => {
2464
+ if (b.class)
2465
+ return b.class;
2466
+ let C = "px-6 py-4 text-sm truncate";
2467
+ return b.isSecondary || (C += " font-medium"), b.isSecondary && (C += " text-gray-600"), C;
2468
+ }, h = (b) => b.sortable ? "" : "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider";
2469
+ return (b, C) => (s(), n("div", cs, [
2470
+ r("div", fs, [
2471
+ r("table", gs, [
2472
+ r("thead", ps, [
2473
+ r("tr", null, [
2474
+ (s(!0), n(P, null, W(e.columns, (p) => (s(), n(P, {
2475
+ key: p.key
2476
+ }, [
2477
+ p.sortable ? (s(), A(be, {
2478
+ key: 0,
2479
+ field: p.key,
2480
+ "current-sort-field": e.sortField,
2481
+ "current-direction": e.sortDirection,
2482
+ onSort: i
2483
+ }, {
2484
+ default: F(() => [
2485
+ ae($(p.label), 1)
2486
+ ]),
2487
+ _: 2
2488
+ }, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), n("th", {
2489
+ key: 1,
2490
+ class: _([h(p), { "text-right": p.align === "right" }])
2491
+ }, $(p.label), 3))
2492
+ ], 64))), 128)),
2493
+ b.$slots.actions ? (s(), n("th", ms, $(e.actionsLabel), 1)) : O("", !0)
2494
+ ])
2495
+ ]),
2496
+ r("tbody", ys, [
2497
+ (s(!0), n(P, null, W(e.data, (p, L) => (s(), n("tr", {
2498
+ key: p.id,
2499
+ class: _(e.rowClasses(p, L))
2500
+ }, [
2501
+ (s(!0), n(P, null, W(e.columns, (j) => (s(), n("td", {
2502
+ key: j.key,
2503
+ class: _(T(j))
2504
+ }, [
2505
+ j.key === "name" && !j.slot ? (s(), n("div", bs, [
2506
+ r("div", {
2507
+ class: "text-sm font-medium truncate",
2508
+ title: k(p, j)
2509
+ }, $(k(p, j)), 9, hs),
2510
+ x(p) ? (s(), n("span", vs, $(e.deletedLabel), 1)) : O("", !0)
2511
+ ])) : j.slot ? g(b.$slots, j.slot, {
2512
+ key: 1,
2513
+ item: p,
2514
+ column: j,
2515
+ index: L
2516
+ }) : j.render ? (s(), n("div", {
2517
+ key: 2,
2518
+ innerHTML: j.render(p)
2519
+ }, null, 8, xs)) : (s(), n("div", ws, $(k(p, j)), 1))
2520
+ ], 2))), 128)),
2521
+ b.$slots.actions ? (s(), n("td", ks, [
2522
+ g(b.$slots, "actions", {
2523
+ item: p,
2524
+ index: L
2525
+ })
2526
+ ])) : O("", !0)
2527
+ ], 2))), 128))
2528
+ ])
2529
+ ])
2530
+ ]),
2531
+ d.value ? O("", !0) : (s(), n("div", Ss, [
2532
+ r("div", $s, [
2533
+ (s(), A(xe(e.emptyState.icon), { class: "w-8 h-8 text-gray-400" }))
2534
+ ]),
2535
+ r("h3", Cs, $(e.emptyState.title), 1),
2536
+ r("p", _s, $(e.emptyState.description), 1),
2537
+ e.emptyState.actionText && e.emptyState.actionUrl ? (s(), A(ye, {
2538
+ key: 0,
2539
+ href: e.emptyState.actionUrl
2540
+ }, {
2541
+ default: F(() => [
2542
+ ae($(e.emptyState.actionText), 1)
2543
+ ]),
2544
+ _: 1
2545
+ }, 8, ["href"])) : O("", !0)
2546
+ ]))
2547
+ ]));
2548
+ }
2549
+ }, Bs = {
2550
+ key: 0,
2551
+ class: "bg-white/80 backdrop-blur-sm px-4 py-3 mx-4 md:mx-0 mb-4"
2552
+ }, Ts = { class: "relative p-1" }, As = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, js = ["placeholder"], Is = {
2553
+ key: 1,
2554
+ class: "overflow-x-auto rounded-xl"
2555
+ }, Ls = { class: "min-w-full divide-y divide-gray-200" }, Ds = { class: "bg-gray-50" }, Os = {
2556
+ key: 0,
2557
+ class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
2558
+ }, Ms = { class: "bg-white divide-y divide-gray-200" }, zs = {
2559
+ key: 0,
2560
+ class: "flex items-center"
2561
+ }, Fs = ["title"], Us = {
2562
+ key: 0,
2563
+ class: "ml-2 inline-flex items-center px-2 py-1 rounded-full text-xs font-medium bg-red-100 text-red-800"
2564
+ }, Ns = { key: 3 }, Es = { key: 4 }, Ks = {
2565
+ key: 0,
2566
+ class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
2567
+ }, Rs = {
2568
+ key: 2,
2569
+ class: "text-center py-12"
2570
+ }, Ps = { class: "inline-flex items-center justify-center w-16 h-16 bg-gray-100 rounded-full mb-4" }, Hs = { class: "text-lg font-medium text-gray-900 mb-2" }, Ws = { class: "text-gray-500 mb-4" }, qs = {
2571
+ __name: "TableListForm",
2572
+ props: {
2573
+ data: {
2574
+ type: Array,
2575
+ required: !0
2576
+ },
2577
+ columns: {
2578
+ type: Array,
2579
+ required: !0
2580
+ },
2581
+ sortField: {
2582
+ type: String,
2583
+ default: ""
2584
+ },
2585
+ sortDirection: {
2586
+ type: String,
2587
+ default: "asc"
2588
+ },
2589
+ emptyState: {
2590
+ type: Object,
2591
+ default: () => ({
2592
+ icon: "UsersIcon",
2593
+ title: "No data found",
2594
+ description: "No items to display.",
2595
+ actionText: null,
2596
+ actionUrl: null
2597
+ })
2598
+ },
2599
+ rowClasses: {
2600
+ type: Function,
2601
+ default: (e, a) => [
2602
+ "transition-colors duration-150",
2603
+ e.deleted_at ? "bg-red-50 hover:bg-red-100" : "odd:bg-white even:bg-gray-50 hover:bg-gray-100"
2604
+ ]
2605
+ },
2606
+ // New prop for error handling function
2607
+ getErrorMessage: {
2608
+ type: Function,
2609
+ default: (e, a, t) => null
2610
+ },
2611
+ // Search functionality
2612
+ search: {
2613
+ type: Boolean,
2614
+ default: !0
2615
+ },
2616
+ searchPlaceholder: {
2617
+ type: String,
2618
+ default: "Search..."
2619
+ },
2620
+ rowKey: {
2621
+ type: [String, Function],
2622
+ default: "id"
2623
+ },
2624
+ isDeletedFn: {
2625
+ type: Function,
2626
+ default: (e) => !!(e?.deleted_at || e?.deleted)
2627
+ },
2628
+ mutateRows: {
2629
+ type: Boolean,
2630
+ default: !0
2631
+ },
2632
+ isCard: {
2633
+ type: Boolean,
2634
+ default: !0
2635
+ },
2636
+ actionsLabel: {
2637
+ type: String,
2638
+ default: "Actions"
2639
+ },
2640
+ deletedLabel: {
2641
+ type: String,
2642
+ default: "Deleted"
2643
+ }
2644
+ },
2645
+ emits: ["sort", "update"],
2646
+ setup(e, { emit: a }) {
2647
+ const t = oe(), l = e, o = a, d = z(l.sortField), i = z(l.sortDirection), u = z("");
2648
+ X(() => l.sortField, (c) => {
2649
+ d.value = c;
2650
+ }), X(() => l.sortDirection, (c) => {
2651
+ i.value = c;
2652
+ });
2653
+ const k = f(() => {
2654
+ let c = l.data;
2655
+ if (l.search && u.value.trim()) {
2656
+ const m = u.value.toLowerCase().trim();
2657
+ c = l.data.filter((y) => l.columns.some((D) => {
2658
+ if (!D.searchable) return !1;
2659
+ const S = b(y, D.key);
2660
+ return S == null || S === "" ? !1 : S.toString().toLowerCase().includes(m);
2661
+ }));
2662
+ }
2663
+ return d.value ? [...c].sort((m, y) => {
2664
+ const D = b(m, d.value), S = b(y, d.value);
2665
+ if (D == null || D === "") return 1;
2666
+ if (S == null || S === "") return -1;
2667
+ let I = 0;
2668
+ return D < S && (I = -1), D > S && (I = 1), i.value === "desc" ? -I : I;
2669
+ }) : c;
2670
+ }), x = f(() => !!t.actions), T = f(() => k.value && k.value.length > 0), h = (c) => {
2671
+ d.value === c ? i.value = i.value === "asc" ? "desc" : "asc" : (d.value = c, i.value = "asc"), o("sort", { field: c, direction: i.value });
2672
+ }, b = (c, m) => !m || typeof m != "string" ? c : m.split(".").reduce((y, D) => y?.[D], c), C = (c, m, y) => {
2673
+ if (!m || typeof m != "string" || c == null)
2674
+ return;
2675
+ const D = m.split("."), S = D.pop();
2676
+ let I = c;
2677
+ for (const w of D)
2678
+ (I[w] === void 0 || I[w] === null || typeof I[w] != "object") && (I[w] = {}), I = I[w];
2679
+ S !== void 0 && (I[S] = y);
2680
+ }, p = (c) => c?.id ? l.data.findIndex((m) => m?.id === c.id) : l.data.findIndex((m) => m === c), L = (c, m) => typeof l.rowKey == "function" ? l.rowKey(c, m) ?? `row-${m}` : b(c, l.rowKey) ?? `row-${m}`, j = (c, m) => {
2681
+ if (m.slot || m.input)
2682
+ return null;
2683
+ if (m.render)
2684
+ return m.render(c);
2685
+ const y = m.key.split(".").reduce((D, S) => D?.[S], c);
2686
+ return y == null || y === "" ? "-" : y;
2687
+ }, U = (c) => l.isDeletedFn(c), K = (c) => {
2688
+ if (c.class)
2689
+ return c.class;
2690
+ let m = "px-4 py-4 text-sm truncate min-w-[150px]";
2691
+ return c.isSecondary || (m += " font-medium"), c.isSecondary && (m += " text-gray-600"), m;
2692
+ }, te = (c) => c.sortable ? "" : "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", le = (c) => c.inputType ? c.inputType : "text", se = (c) => {
2693
+ let m = "block w-full min-w-[130px] px-2 py-2 border border-gray-300 rounded-md text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200";
2694
+ return c.isSecondary ? m += " text-gray-600" : m += " font-medium text-gray-900", m;
2695
+ }, q = (c) => c.placeholder ? c.placeholder : c.label || "", Q = (c, m, y) => {
2696
+ const D = y.target.value;
2697
+ l.mutateRows && C(c, m.key, D), o("update", { item: c, field: m.key, value: D, index: p(c) });
2698
+ }, v = (c, m, y) => {
2699
+ const D = y.target.value;
2700
+ l.mutateRows && C(c, m.key, D), o("update", {
2701
+ item: c,
2702
+ field: m.key,
2703
+ value: D,
2704
+ index: p(c),
2705
+ event: "blur"
2706
+ });
2707
+ }, R = (c, m) => b(c, m.key) ?? "", N = (c, m) => {
2708
+ const y = p(c);
2709
+ return y === -1 ? null : l.getErrorMessage(y, m.key);
2710
+ };
2711
+ return (c, m) => (s(), n("div", {
2712
+ class: _("bg-white mx-4 md:mx-0 " + (e.isCard ? "border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)] animate-fadeIn" : ""))
2713
+ }, [
2714
+ e.search ? (s(), n("div", Bs, [
2715
+ r("div", Ts, [
2716
+ r("div", As, [
2717
+ E(V(Ge), { class: "h-5 w-5 text-gray-400" })
2718
+ ]),
2719
+ G(r("input", {
2720
+ "onUpdate:modelValue": m[0] || (m[0] = (y) => u.value = y),
2721
+ type: "text",
2722
+ placeholder: e.searchPlaceholder,
2723
+ class: "block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md text-sm placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200"
2724
+ }, null, 8, js), [
2725
+ [Ne, u.value]
2726
+ ])
2727
+ ])
2728
+ ])) : O("", !0),
2729
+ T.value ? (s(), n("div", Is, [
2730
+ r("table", Ls, [
2731
+ r("thead", Ds, [
2732
+ r("tr", null, [
2733
+ (s(!0), n(P, null, W(e.columns, (y) => (s(), n(P, {
2734
+ key: y.key
2735
+ }, [
2736
+ y.sortable ? (s(), A(be, {
2737
+ key: 0,
2738
+ field: y.key,
2739
+ "current-sort-field": d.value,
2740
+ "current-direction": i.value,
2741
+ onSort: h
2742
+ }, {
2743
+ default: F(() => [
2744
+ ae($(y.label), 1)
2745
+ ]),
2746
+ _: 2
2747
+ }, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), n("th", {
2748
+ key: 1,
2749
+ class: _([te(y), { "text-right": y.align === "right" }])
2750
+ }, $(y.label), 3))
2751
+ ], 64))), 128)),
2752
+ x.value ? (s(), n("th", Os, $(e.actionsLabel), 1)) : O("", !0)
2753
+ ])
2754
+ ]),
2755
+ r("tbody", Ms, [
2756
+ (s(!0), n(P, null, W(k.value, (y, D) => (s(), n("tr", {
2757
+ key: L(y, D),
2758
+ class: _(e.rowClasses(y, D))
2759
+ }, [
2760
+ (s(!0), n(P, null, W(e.columns, (S) => (s(), n("td", {
2761
+ key: S.key,
2762
+ class: _(K(S))
2763
+ }, [
2764
+ S.key === "name" && !S.slot && !S.input ? (s(), n("div", zs, [
2765
+ r("div", {
2766
+ class: "text-sm font-medium truncate",
2767
+ title: j(y, S)
2768
+ }, $(j(y, S)), 9, Fs),
2769
+ U(y) ? (s(), n("span", Us, $(e.deletedLabel), 1)) : O("", !0)
2770
+ ])) : S.input ? (s(), A(re, {
2771
+ key: 1,
2772
+ type: le(S),
2773
+ class: _(se(S)),
2774
+ placeholder: q(S),
2775
+ "model-value": R(y, S),
2776
+ "onUpdate:modelValue": (I) => Q(y, S, { target: { value: I } }),
2777
+ onBlur: (I) => v(y, S, I),
2778
+ disabled: S.disabled || U(y),
2779
+ maxlength: S.maxlength,
2780
+ "error-message": N(y, S),
2781
+ "helper-text": ""
2782
+ }, null, 8, ["type", "class", "placeholder", "model-value", "onUpdate:modelValue", "onBlur", "disabled", "maxlength", "error-message"])) : S.slot ? g(c.$slots, S.slot, {
2783
+ key: 2,
2784
+ item: y,
2785
+ column: S,
2786
+ index: D
2787
+ }) : S.render ? (s(), n("div", Ns, $(S.render(y)), 1)) : (s(), n("div", Es, $(j(y, S)), 1))
2788
+ ], 2))), 128)),
2789
+ x.value ? (s(), n("td", Ks, [
2790
+ g(c.$slots, "actions", {
2791
+ item: y,
2792
+ index: D
2793
+ })
2794
+ ])) : O("", !0)
2795
+ ], 2))), 128))
2796
+ ])
2797
+ ])
2798
+ ])) : (s(), n("div", Rs, [
2799
+ r("div", Ps, [
2800
+ (s(), A(xe(e.emptyState.icon), { class: "w-8 h-8 text-gray-400" }))
2801
+ ]),
2802
+ r("h3", Hs, $(e.emptyState.title), 1),
2803
+ r("p", Ws, $(e.emptyState.description), 1),
2804
+ e.emptyState.actionText && e.emptyState.actionUrl ? (s(), A(ye, {
2805
+ key: 0,
2806
+ href: e.emptyState.actionUrl
2807
+ }, {
2808
+ default: F(() => [
2809
+ ae($(e.emptyState.actionText), 1)
2810
+ ]),
2811
+ _: 1
2812
+ }, 8, ["href"])) : O("", !0)
2813
+ ]))
2814
+ ], 2));
2815
+ }
2816
+ }, Gs = ["type", "disabled"], Xs = /* @__PURE__ */ Object.assign({
2817
+ inheritAttrs: !1
2818
+ }, {
2819
+ __name: "TertiaryButton",
2820
+ props: {
2821
+ type: {
2822
+ type: String,
2823
+ default: "button"
2824
+ },
2825
+ disabled: {
2826
+ type: Boolean,
2827
+ default: !1
2828
+ }
2829
+ },
2830
+ setup(e) {
2831
+ const a = H();
2832
+ return (t, l) => (s(), n("button", M(V(a), {
2833
+ type: e.type,
2834
+ disabled: e.disabled,
2835
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-gray-500 to-gray-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-gray-600 hover:to-gray-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:from-gray-500 disabled:hover:to-gray-600"
2836
+ }), [
2837
+ g(t.$slots, "default")
2838
+ ], 16, Gs));
2839
+ }
2840
+ }), Js = ["href", "title", "target", "rel"], Qs = /* @__PURE__ */ Object.assign({
2841
+ inheritAttrs: !1
2842
+ }, {
2843
+ __name: "TertiaryLinkButton",
2844
+ props: {
2845
+ href: {
2846
+ type: String,
2847
+ required: !0
2848
+ },
2849
+ title: {
2850
+ type: String,
2851
+ default: null
2852
+ },
2853
+ external: {
2854
+ type: Boolean,
2855
+ default: !1
2856
+ },
2857
+ target: {
2858
+ type: String,
2859
+ default: null
2860
+ },
2861
+ rel: {
2862
+ type: String,
2863
+ default: null
2864
+ }
2865
+ },
2866
+ setup(e) {
2867
+ const a = H();
2868
+ return (t, l) => e.external ? (s(), n("a", M({ key: 1 }, V(a), {
2869
+ href: e.href,
2870
+ title: e.title,
2871
+ target: e.target,
2872
+ rel: e.rel,
2873
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-gray-500 to-gray-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-gray-600 hover:to-gray-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2"
2874
+ }), [
2875
+ g(t.$slots, "default")
2876
+ ], 16, Js)) : (s(), A(V(ee), M({ key: 0 }, V(a), {
2877
+ href: e.href,
2878
+ title: e.title,
2879
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg bg-gradient-to-r from-gray-500 to-gray-600 p-3 py-2 text-sm font-medium text-white shadow-[0_1px_3px_rgba(0,0,0,0.1)] transition-all duration-200 hover:from-gray-600 hover:to-gray-700 hover:shadow-[0_2px_6px_rgba(0,0,0,0.15)] focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2"
2880
+ }), {
2881
+ default: F(() => [
2882
+ g(t.$slots, "default")
2883
+ ]),
2884
+ _: 3
2885
+ }, 16, ["href", "title"]));
2886
+ }
2887
+ }), Ys = ["type", "disabled"], Zs = /* @__PURE__ */ Object.assign({
2888
+ inheritAttrs: !1
2889
+ }, {
2890
+ __name: "WarningButton",
2891
+ props: {
2892
+ type: {
2893
+ type: String,
2894
+ default: "button"
2895
+ },
2896
+ disabled: {
2897
+ type: Boolean,
2898
+ default: !1
2899
+ }
2900
+ },
2901
+ setup(e) {
2902
+ const a = H();
2903
+ return (t, l) => (s(), n("button", M(V(a), {
2904
+ type: e.type,
2905
+ disabled: e.disabled,
2906
+ class: "min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg border border-yellow-300 bg-yellow-50 p-3 py-2 text-sm font-medium text-yellow-700 transition-all duration-200 hover:bg-yellow-100 focus:outline-none focus:ring-2 focus:ring-yellow-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:bg-yellow-50"
2907
+ }), [
2908
+ g(t.$slots, "default")
2909
+ ], 16, Ys));
2910
+ }
2911
+ }), ea = {
2912
+ install(e) {
2913
+ for (const [a, t] of Object.entries(Xe))
2914
+ a !== "EnosUiPlugin" && e.component(a, t);
2915
+ }
2916
+ };
2917
+ export {
2918
+ tt as ActionCard,
2919
+ st as ActionMessage,
2920
+ pt as ActionSection,
2921
+ ht as ApplicationLogo,
2922
+ St as AuthenticationCard,
2923
+ Ct as Badge,
2924
+ Lt as Banner,
2925
+ $e as Card,
2926
+ Se as CardTabs,
2927
+ Ot as Checkbox,
2928
+ Ce as CheckboxInput,
2929
+ Oe as CheckboxMultipleInput,
2930
+ hl as ConfirmationModal,
2931
+ Be as CustomSelect,
2932
+ xl as DangerButton,
2933
+ Ae as DateInput,
2934
+ Cl as DialogModal,
2935
+ fe as Divider,
2936
+ Vl as Dropdown,
2937
+ Al as DropdownLink,
2938
+ ea as EnosUiPlugin,
2939
+ Ol as FormSection,
2940
+ je as ImageInput,
2941
+ zl as InputError,
2942
+ re as InputGroup,
2943
+ El as InputLabel,
2944
+ me as Modal,
2945
+ Kl as NavLink,
2946
+ Ie as NotationInput,
2947
+ Pl as PrimaryButton,
2948
+ ye as PrimaryLinkButton,
2949
+ Le as RadioInput,
2950
+ De as RadioMultipleInput,
2951
+ ql as ResponsiveNavLink,
2952
+ Xl as SecondaryButton,
2953
+ Ql as SecondaryLinkButton,
2954
+ es as SectionBorder,
2955
+ pe as SectionTitle,
2956
+ Te as SelectInput,
2957
+ is as SortControls,
2958
+ Vs as TableList,
2959
+ qs as TableListForm,
2960
+ Xs as TertiaryButton,
2961
+ Qs as TertiaryLinkButton,
2962
+ Ve as TextArea,
2963
+ _e as TextInput,
2964
+ be as ThSortable,
2965
+ Zs as WarningButton
2966
+ };