@enos5/enos-vue 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +961 -914
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { usePage as
|
|
3
|
-
import { useI18n as
|
|
4
|
-
import { CheckCircleIcon as
|
|
5
|
-
const
|
|
1
|
+
import { ref as O, computed as g, watch as J, openBlock as s, createElementBlock as i, createElementVNode as r, Fragment as Q, renderList as Y, normalizeClass as C, normalizeStyle as he, toDisplayString as B, createBlock as L, createCommentVNode as M, renderSlot as S, createVNode as H, Transition as re, withCtx as F, mergeProps as R, useSlots as ge, unref as j, withDirectives as ne, vShow as de, watchEffect as Qe, onMounted as ee, useAttrs as oe, vModelCheckbox as Ye, nextTick as fe, onBeforeUnmount as Je, Teleport as Te, withModifiers as ye, onUnmounted as Ae, createTextVNode as ue, resolveDynamicComponent as Be, vModelText as Ze } from "vue";
|
|
2
|
+
import { usePage as et, Link as pe } from "@inertiajs/vue3";
|
|
3
|
+
import { useI18n as tt } from "vue-i18n";
|
|
4
|
+
import { CheckCircleIcon as lt, ExclamationTriangleIcon as Le, XMarkIcon as st, LockClosedIcon as at, ChevronDownIcon as xe, PhotoIcon as nt, ExclamationCircleIcon as ot, ChevronUpIcon as Ie, MagnifyingGlassIcon as rt, CheckIcon as it, PencilSquareIcon as dt } from "@heroicons/vue/24/outline";
|
|
5
|
+
const ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
get ActionCard() {
|
|
8
|
-
return
|
|
8
|
+
return bt;
|
|
9
9
|
},
|
|
10
10
|
get ActionMessage() {
|
|
11
|
-
return
|
|
11
|
+
return vt;
|
|
12
12
|
},
|
|
13
13
|
get ActionSection() {
|
|
14
|
-
return
|
|
14
|
+
return At;
|
|
15
15
|
},
|
|
16
16
|
get ApplicationLogo() {
|
|
17
17
|
return Mt;
|
|
18
18
|
},
|
|
19
19
|
get AuthenticationCard() {
|
|
20
|
-
return
|
|
20
|
+
return Et;
|
|
21
21
|
},
|
|
22
22
|
get Badge() {
|
|
23
|
-
return
|
|
23
|
+
return Rt;
|
|
24
24
|
},
|
|
25
25
|
get Banner() {
|
|
26
|
-
return
|
|
26
|
+
return Gt;
|
|
27
27
|
},
|
|
28
28
|
get Button() {
|
|
29
|
-
return
|
|
29
|
+
return ve;
|
|
30
30
|
},
|
|
31
31
|
get Card() {
|
|
32
|
-
return
|
|
32
|
+
return De;
|
|
33
33
|
},
|
|
34
34
|
get CardTabs() {
|
|
35
|
-
return
|
|
35
|
+
return Me;
|
|
36
36
|
},
|
|
37
37
|
get Checkbox() {
|
|
38
|
-
return
|
|
38
|
+
return Yt;
|
|
39
39
|
},
|
|
40
40
|
get CheckboxInput() {
|
|
41
|
-
return
|
|
41
|
+
return Oe;
|
|
42
42
|
},
|
|
43
43
|
get CheckboxMultipleInput() {
|
|
44
|
-
return
|
|
44
|
+
return We;
|
|
45
45
|
},
|
|
46
46
|
get ConfirmationModal() {
|
|
47
47
|
return Ml;
|
|
@@ -50,37 +50,37 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
50
50
|
return Ee;
|
|
51
51
|
},
|
|
52
52
|
get DateInput() {
|
|
53
|
-
return
|
|
53
|
+
return Re;
|
|
54
54
|
},
|
|
55
55
|
get DialogModal() {
|
|
56
|
-
return
|
|
56
|
+
return El;
|
|
57
57
|
},
|
|
58
58
|
get Divider() {
|
|
59
59
|
return we;
|
|
60
60
|
},
|
|
61
61
|
get Dropdown() {
|
|
62
|
-
return
|
|
62
|
+
return Rl;
|
|
63
63
|
},
|
|
64
64
|
get DropdownLink() {
|
|
65
|
-
return
|
|
65
|
+
return Kl;
|
|
66
66
|
},
|
|
67
67
|
get EnosVue() {
|
|
68
|
-
return
|
|
68
|
+
return Js;
|
|
69
69
|
},
|
|
70
70
|
get FormSection() {
|
|
71
|
-
return
|
|
71
|
+
return Gl;
|
|
72
72
|
},
|
|
73
73
|
get ImageInput() {
|
|
74
|
-
return
|
|
74
|
+
return Ne;
|
|
75
75
|
},
|
|
76
76
|
get InputError() {
|
|
77
|
-
return
|
|
77
|
+
return Ql;
|
|
78
78
|
},
|
|
79
79
|
get InputGroup() {
|
|
80
|
-
return
|
|
80
|
+
return me;
|
|
81
81
|
},
|
|
82
82
|
get InputLabel() {
|
|
83
|
-
return
|
|
83
|
+
return es;
|
|
84
84
|
},
|
|
85
85
|
get LinkButton() {
|
|
86
86
|
return Ce;
|
|
@@ -89,22 +89,22 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
89
89
|
return $e;
|
|
90
90
|
},
|
|
91
91
|
get NavLink() {
|
|
92
|
-
return
|
|
92
|
+
return ls;
|
|
93
93
|
},
|
|
94
94
|
get NotationInput() {
|
|
95
95
|
return Ue;
|
|
96
96
|
},
|
|
97
97
|
get RadioInput() {
|
|
98
|
-
return
|
|
98
|
+
return Ke;
|
|
99
99
|
},
|
|
100
100
|
get RadioMultipleInput() {
|
|
101
101
|
return He;
|
|
102
102
|
},
|
|
103
103
|
get ResponsiveNavLink() {
|
|
104
|
-
return
|
|
104
|
+
return as;
|
|
105
105
|
},
|
|
106
106
|
get SectionBorder() {
|
|
107
|
-
return
|
|
107
|
+
return rs;
|
|
108
108
|
},
|
|
109
109
|
get SectionTitle() {
|
|
110
110
|
return Se;
|
|
@@ -113,27 +113,27 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
113
113
|
return Fe;
|
|
114
114
|
},
|
|
115
115
|
get SortControls() {
|
|
116
|
-
return
|
|
116
|
+
return ms;
|
|
117
117
|
},
|
|
118
118
|
get TableList() {
|
|
119
|
-
return
|
|
119
|
+
return Is;
|
|
120
120
|
},
|
|
121
121
|
get TableListForm() {
|
|
122
|
-
return
|
|
122
|
+
return Ys;
|
|
123
123
|
},
|
|
124
124
|
get TextArea() {
|
|
125
125
|
return ze;
|
|
126
126
|
},
|
|
127
127
|
get TextInput() {
|
|
128
|
-
return
|
|
128
|
+
return je;
|
|
129
129
|
},
|
|
130
130
|
get ThSortable() {
|
|
131
131
|
return Ve;
|
|
132
132
|
}
|
|
133
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
133
|
+
}, Symbol.toStringTag, { value: "Module" })), ct = { class: "border-b border-gray-200/80 bg-gray-50/80 p-2" }, ft = {
|
|
134
134
|
role: "tablist",
|
|
135
135
|
class: "flex rounded-lg bg-white shadow-sm ring-1 ring-gray-200/80 overflow-hidden"
|
|
136
|
-
},
|
|
136
|
+
}, gt = ["aria-selected", "tabindex", "onClick", "onKeydown"], Me = {
|
|
137
137
|
__name: "CardTabs",
|
|
138
138
|
props: {
|
|
139
139
|
tabs: {
|
|
@@ -151,71 +151,71 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
151
151
|
"tab-click"
|
|
152
152
|
],
|
|
153
153
|
setup(e, { emit: a }) {
|
|
154
|
-
const t = e, l = a,
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
const t = e, l = a, n = O([]), d = g(() => t.tabs.map((w) => w.value)), u = g(() => d.value.includes(t.activeTab) ? t.activeTab : d.value[0] ?? "");
|
|
155
|
+
J(u, (w) => {
|
|
156
|
+
w !== t.activeTab && l("update:activeTab", w);
|
|
157
157
|
}, { immediate: !0 });
|
|
158
|
-
const f = (
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
!
|
|
162
|
-
}, y = (
|
|
163
|
-
|
|
164
|
-
},
|
|
158
|
+
const f = (w, b) => {
|
|
159
|
+
n.value[b] = w;
|
|
160
|
+
}, _ = (w) => {
|
|
161
|
+
!w || w === t.activeTab || (l("update:activeTab", w), l("tab-click", w));
|
|
162
|
+
}, y = (w) => {
|
|
163
|
+
n.value[w]?.focus();
|
|
164
|
+
}, V = (w, b) => {
|
|
165
165
|
if (t.tabs.length === 0)
|
|
166
166
|
return;
|
|
167
|
-
let
|
|
168
|
-
switch (
|
|
167
|
+
let $ = b;
|
|
168
|
+
switch (w.key) {
|
|
169
169
|
case "ArrowRight":
|
|
170
170
|
case "ArrowDown":
|
|
171
|
-
|
|
171
|
+
$ = (b + 1) % t.tabs.length;
|
|
172
172
|
break;
|
|
173
173
|
case "ArrowLeft":
|
|
174
174
|
case "ArrowUp":
|
|
175
|
-
|
|
175
|
+
$ = (b - 1 + t.tabs.length) % t.tabs.length;
|
|
176
176
|
break;
|
|
177
177
|
case "Home":
|
|
178
|
-
|
|
178
|
+
$ = 0;
|
|
179
179
|
break;
|
|
180
180
|
case "End":
|
|
181
|
-
|
|
181
|
+
$ = t.tabs.length - 1;
|
|
182
182
|
break;
|
|
183
183
|
default:
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
|
|
186
|
+
w.preventDefault(), _(t.tabs[$].value), y($);
|
|
187
187
|
};
|
|
188
|
-
return (
|
|
189
|
-
r("div",
|
|
190
|
-
(s(!0), i(
|
|
191
|
-
key:
|
|
188
|
+
return (w, b) => (s(), i("div", ct, [
|
|
189
|
+
r("div", ft, [
|
|
190
|
+
(s(!0), i(Q, null, Y(e.tabs, ($, m) => (s(), i("button", {
|
|
191
|
+
key: $.value,
|
|
192
192
|
ref_for: !0,
|
|
193
|
-
ref: (
|
|
193
|
+
ref: (x) => f(x, m),
|
|
194
194
|
type: "button",
|
|
195
|
-
style:
|
|
195
|
+
style: he({ width: `${100 / e.tabs.length}%` }),
|
|
196
196
|
role: "tab",
|
|
197
|
-
"aria-selected":
|
|
198
|
-
tabindex:
|
|
199
|
-
class:
|
|
197
|
+
"aria-selected": u.value === $.value,
|
|
198
|
+
tabindex: u.value === $.value ? 0 : -1,
|
|
199
|
+
class: C([
|
|
200
200
|
"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",
|
|
201
|
-
|
|
201
|
+
u.value === $.value ? "bg-blue-50 text-blue-700 shadow-[inset_0_-2px_0_0_rgb(37_99_235)]" : "text-gray-700 hover:bg-gray-50",
|
|
202
202
|
{
|
|
203
203
|
"border-r border-gray-200/80": m !== e.tabs.length - 1
|
|
204
204
|
}
|
|
205
205
|
]),
|
|
206
|
-
onClick: (
|
|
207
|
-
onKeydown: (
|
|
208
|
-
},
|
|
206
|
+
onClick: (x) => _($.value),
|
|
207
|
+
onKeydown: (x) => V(x, m)
|
|
208
|
+
}, B($.label), 47, gt))), 128))
|
|
209
209
|
])
|
|
210
210
|
]));
|
|
211
211
|
}
|
|
212
|
-
},
|
|
212
|
+
}, pt = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "mb-4"
|
|
215
|
-
},
|
|
215
|
+
}, mt = {
|
|
216
216
|
key: 1,
|
|
217
217
|
class: "mb-4 text-xl font-semibold tracking-tight text-slate-900"
|
|
218
|
-
},
|
|
218
|
+
}, De = {
|
|
219
219
|
__name: "Card",
|
|
220
220
|
props: {
|
|
221
221
|
title: {
|
|
@@ -257,29 +257,29 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
257
257
|
"tab-click"
|
|
258
258
|
],
|
|
259
259
|
setup(e) {
|
|
260
|
-
const a = e, t =
|
|
261
|
-
return g(() => a.tabs.findIndex((
|
|
262
|
-
|
|
263
|
-
}), (
|
|
264
|
-
class:
|
|
260
|
+
const a = e, t = O(""), l = O("right"), n = g(() => a.tabs.findIndex((d) => d.value === a.activeTab));
|
|
261
|
+
return g(() => a.tabs.findIndex((d) => d.value === t.value)), J(n, (d, u) => {
|
|
262
|
+
u !== void 0 && u !== -1 && d !== -1 && d !== u && (l.value = d > u ? "right" : "left", t.value = a.activeTab);
|
|
263
|
+
}), (d, u) => (s(), i("div", {
|
|
264
|
+
class: C(["bg-white/90 backdrop-blur-sm border border-slate-200/70 rounded-2xl shadow-[0_12px_30px_rgba(15,23,42,0.06)]", e.overflowClass, { "sticky top-6 self-start": e.sticky }, e.cardClass])
|
|
265
265
|
}, [
|
|
266
|
-
e.tabs.length > 0 ? (s(),
|
|
266
|
+
e.tabs.length > 0 ? (s(), L(Me, {
|
|
267
267
|
key: 0,
|
|
268
268
|
tabs: e.tabs,
|
|
269
269
|
"active-tab": e.activeTab,
|
|
270
|
-
"onUpdate:activeTab":
|
|
271
|
-
onTabClick:
|
|
272
|
-
}, null, 8, ["tabs", "active-tab"])) :
|
|
270
|
+
"onUpdate:activeTab": u[0] || (u[0] = (f) => d.$emit("update:activeTab", f)),
|
|
271
|
+
onTabClick: u[1] || (u[1] = (f) => d.$emit("tab-click", f))
|
|
272
|
+
}, null, 8, ["tabs", "active-tab"])) : M("", !0),
|
|
273
273
|
r("div", {
|
|
274
|
-
class:
|
|
274
|
+
class: C(e.paddingClass)
|
|
275
275
|
}, [
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
])) : e.title ? (s(), i("h3",
|
|
276
|
+
d.$slots.customTitle ? (s(), i("div", pt, [
|
|
277
|
+
S(d.$slots, "customTitle")
|
|
278
|
+
])) : e.title ? (s(), i("h3", mt, B(e.title), 1)) : M("", !0),
|
|
279
279
|
r("div", {
|
|
280
|
-
class:
|
|
280
|
+
class: C(["relative", e.tabs.length > 0 ? "overflow-hidden" : "overflow-visible"])
|
|
281
281
|
}, [
|
|
282
|
-
|
|
282
|
+
H(re, {
|
|
283
283
|
"enter-active-class": "transition-all duration-200 ease-in-out",
|
|
284
284
|
"enter-from-class": l.value === "right" ? "translate-x-full opacity-0" : "-translate-x-full opacity-0",
|
|
285
285
|
"enter-to-class": "translate-x-0 opacity-100",
|
|
@@ -288,12 +288,12 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
288
288
|
"leave-to-class": l.value === "right" ? "-translate-x-full opacity-0" : "translate-x-full opacity-0",
|
|
289
289
|
mode: "out-in"
|
|
290
290
|
}, {
|
|
291
|
-
default:
|
|
291
|
+
default: F(() => [
|
|
292
292
|
(s(), i("div", {
|
|
293
293
|
key: e.activeTab,
|
|
294
|
-
class:
|
|
294
|
+
class: C([e.tabs.length > 0 ? "p-2" : "", e.contentClass])
|
|
295
295
|
}, [
|
|
296
|
-
|
|
296
|
+
S(d.$slots, "default")
|
|
297
297
|
], 2))
|
|
298
298
|
]),
|
|
299
299
|
_: 3
|
|
@@ -307,11 +307,11 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
307
307
|
}, {
|
|
308
308
|
__name: "Divider",
|
|
309
309
|
setup(e) {
|
|
310
|
-
return (a, t) => (s(), i("div",
|
|
311
|
-
|
|
310
|
+
return (a, t) => (s(), i("div", R({ class: "border-t border-gray-200" }, a.$attrs), [
|
|
311
|
+
S(a.$slots, "default")
|
|
312
312
|
], 16));
|
|
313
313
|
}
|
|
314
|
-
}),
|
|
314
|
+
}), bt = {
|
|
315
315
|
__name: "ActionCard",
|
|
316
316
|
props: {
|
|
317
317
|
title: {
|
|
@@ -324,43 +324,43 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
324
324
|
}
|
|
325
325
|
},
|
|
326
326
|
setup(e) {
|
|
327
|
-
const a =
|
|
328
|
-
return (t, l) => (s(),
|
|
327
|
+
const a = ge();
|
|
328
|
+
return (t, l) => (s(), L(De, {
|
|
329
329
|
title: e.title,
|
|
330
330
|
"content-class": e.actionsClass
|
|
331
331
|
}, {
|
|
332
|
-
default:
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
default: F(() => [
|
|
333
|
+
S(t.$slots, "default"),
|
|
334
|
+
j(a).danger ? (s(), L(we, {
|
|
335
335
|
key: 0,
|
|
336
336
|
class: "mt-6 pt-4"
|
|
337
337
|
}, {
|
|
338
|
-
default:
|
|
339
|
-
|
|
338
|
+
default: F(() => [
|
|
339
|
+
S(t.$slots, "danger")
|
|
340
340
|
]),
|
|
341
341
|
_: 3
|
|
342
|
-
})) :
|
|
342
|
+
})) : M("", !0)
|
|
343
343
|
]),
|
|
344
344
|
_: 3
|
|
345
345
|
}, 8, ["title", "content-class"]));
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, yt = { class: "text-sm text-gray-600" }, vt = {
|
|
348
348
|
__name: "ActionMessage",
|
|
349
349
|
props: {
|
|
350
350
|
on: Boolean
|
|
351
351
|
},
|
|
352
352
|
setup(e) {
|
|
353
353
|
return (a, t) => (s(), i("div", null, [
|
|
354
|
-
|
|
354
|
+
H(re, {
|
|
355
355
|
"leave-active-class": "transition ease-in duration-1000",
|
|
356
356
|
"leave-from-class": "opacity-100",
|
|
357
357
|
"leave-to-class": "opacity-0"
|
|
358
358
|
}, {
|
|
359
|
-
default:
|
|
360
|
-
|
|
361
|
-
|
|
359
|
+
default: F(() => [
|
|
360
|
+
ne(r("div", yt, [
|
|
361
|
+
S(a.$slots, "default")
|
|
362
362
|
], 512), [
|
|
363
|
-
[
|
|
363
|
+
[de, e.on]
|
|
364
364
|
])
|
|
365
365
|
]),
|
|
366
366
|
_: 3
|
|
@@ -369,52 +369,52 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
369
369
|
}
|
|
370
370
|
}, ke = (e, a) => {
|
|
371
371
|
const t = e.__vccOpts || e;
|
|
372
|
-
for (const [l,
|
|
373
|
-
t[l] =
|
|
372
|
+
for (const [l, n] of a)
|
|
373
|
+
t[l] = n;
|
|
374
374
|
return t;
|
|
375
|
-
},
|
|
376
|
-
function
|
|
377
|
-
return s(), i("div",
|
|
378
|
-
r("div",
|
|
379
|
-
r("h3",
|
|
380
|
-
|
|
375
|
+
}, ht = {}, xt = { class: "md:col-span-1 flex justify-between" }, wt = { class: "px-4 sm:px-0" }, kt = { class: "text-xl font-semibold tracking-tight text-slate-900" }, St = { class: "mt-1 max-w-2xl text-sm text-slate-600" }, $t = { class: "px-4 sm:px-0" };
|
|
376
|
+
function Ct(e, a) {
|
|
377
|
+
return s(), i("div", xt, [
|
|
378
|
+
r("div", wt, [
|
|
379
|
+
r("h3", kt, [
|
|
380
|
+
S(e.$slots, "title")
|
|
381
381
|
]),
|
|
382
|
-
r("p",
|
|
383
|
-
|
|
382
|
+
r("p", St, [
|
|
383
|
+
S(e.$slots, "description")
|
|
384
384
|
])
|
|
385
385
|
]),
|
|
386
|
-
r("div",
|
|
387
|
-
|
|
386
|
+
r("div", $t, [
|
|
387
|
+
S(e.$slots, "aside")
|
|
388
388
|
])
|
|
389
389
|
]);
|
|
390
390
|
}
|
|
391
|
-
const Se = /* @__PURE__ */ ke(
|
|
391
|
+
const Se = /* @__PURE__ */ ke(ht, [["render", Ct]]), Vt = { class: "md:grid md:grid-cols-3 md:gap-6" }, _t = { class: "mt-5 md:mt-0 md:col-span-2" }, Tt = { class: "px-4 py-5 sm:p-6 bg-white shadow sm:rounded-lg" }, At = {
|
|
392
392
|
__name: "ActionSection",
|
|
393
393
|
setup(e) {
|
|
394
|
-
return (a, t) => (s(), i("div",
|
|
395
|
-
|
|
396
|
-
title:
|
|
397
|
-
|
|
394
|
+
return (a, t) => (s(), i("div", Vt, [
|
|
395
|
+
H(Se, null, {
|
|
396
|
+
title: F(() => [
|
|
397
|
+
S(a.$slots, "title")
|
|
398
398
|
]),
|
|
399
|
-
description:
|
|
400
|
-
|
|
399
|
+
description: F(() => [
|
|
400
|
+
S(a.$slots, "description")
|
|
401
401
|
]),
|
|
402
402
|
_: 3
|
|
403
403
|
}),
|
|
404
|
-
r("div",
|
|
405
|
-
r("div",
|
|
406
|
-
|
|
404
|
+
r("div", _t, [
|
|
405
|
+
r("div", Tt, [
|
|
406
|
+
S(a.$slots, "content")
|
|
407
407
|
])
|
|
408
408
|
])
|
|
409
409
|
]));
|
|
410
410
|
}
|
|
411
|
-
},
|
|
411
|
+
}, Bt = {}, Lt = {
|
|
412
412
|
viewBox: "0 0 317 48",
|
|
413
413
|
fill: "none",
|
|
414
414
|
xmlns: "http://www.w3.org/2000/svg"
|
|
415
415
|
};
|
|
416
|
-
function
|
|
417
|
-
return s(), i("svg",
|
|
416
|
+
function It(e, a) {
|
|
417
|
+
return s(), i("svg", Lt, [...a[0] || (a[0] = [
|
|
418
418
|
r("path", {
|
|
419
419
|
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",
|
|
420
420
|
class: "fill-black"
|
|
@@ -429,18 +429,18 @@ function Dt(e, a) {
|
|
|
429
429
|
}, null, -1)
|
|
430
430
|
])]);
|
|
431
431
|
}
|
|
432
|
-
const Mt = /* @__PURE__ */ ke(
|
|
433
|
-
function
|
|
432
|
+
const Mt = /* @__PURE__ */ ke(Bt, [["render", It]]), Dt = {}, Ot = { class: "min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100" }, jt = { class: "w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden rounded-lg" };
|
|
433
|
+
function zt(e, a) {
|
|
434
434
|
return s(), i("div", Ot, [
|
|
435
435
|
r("div", null, [
|
|
436
|
-
|
|
436
|
+
S(e.$slots, "logo")
|
|
437
437
|
]),
|
|
438
|
-
r("div",
|
|
439
|
-
|
|
438
|
+
r("div", jt, [
|
|
439
|
+
S(e.$slots, "default")
|
|
440
440
|
])
|
|
441
441
|
]);
|
|
442
442
|
}
|
|
443
|
-
const
|
|
443
|
+
const Et = /* @__PURE__ */ ke(Dt, [["render", zt]]), Ft = { class: "sr-only" }, Rt = {
|
|
444
444
|
__name: "Badge",
|
|
445
445
|
props: {
|
|
446
446
|
type: {
|
|
@@ -495,98 +495,98 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
495
495
|
lg: "rounded-lg",
|
|
496
496
|
full: "rounded-full"
|
|
497
497
|
};
|
|
498
|
-
return (
|
|
498
|
+
return (n, d) => e.type === "dot" ? (s(), i("span", {
|
|
499
499
|
key: 0,
|
|
500
|
-
class:
|
|
500
|
+
class: C(["inline-flex items-center justify-center w-6 h-6 rounded-full", a[e.color].bg])
|
|
501
501
|
}, [
|
|
502
502
|
r("span", {
|
|
503
|
-
class:
|
|
503
|
+
class: C(["w-2 h-2 rounded-full", a[e.color].dot])
|
|
504
504
|
}, null, 2),
|
|
505
|
-
r("span",
|
|
506
|
-
|
|
505
|
+
r("span", Ft, [
|
|
506
|
+
S(n.$slots, "default")
|
|
507
507
|
])
|
|
508
508
|
], 2)) : (s(), i("span", {
|
|
509
509
|
key: 1,
|
|
510
|
-
class:
|
|
510
|
+
class: C(["inline-flex items-center font-medium", [
|
|
511
511
|
a[e.color].bg,
|
|
512
512
|
a[e.color].text,
|
|
513
513
|
t[e.size],
|
|
514
514
|
l[e.rounded]
|
|
515
515
|
]])
|
|
516
516
|
}, [
|
|
517
|
-
|
|
517
|
+
S(n.$slots, "default")
|
|
518
518
|
], 2));
|
|
519
519
|
}
|
|
520
|
-
},
|
|
520
|
+
}, Nt = {
|
|
521
521
|
key: 0,
|
|
522
522
|
class: "fixed bottom-4 right-4 z-50"
|
|
523
|
-
},
|
|
523
|
+
}, Ut = { class: "flex items-center" }, Kt = { class: "flex-shrink-0" }, Ht = { class: "ml-3 w-0 flex-1" }, Wt = { class: "text-sm font-medium text-white" }, Pt = { class: "ml-4 flex-shrink-0 flex" }, qt = { class: "sr-only" }, Gt = {
|
|
524
524
|
__name: "Banner",
|
|
525
525
|
setup(e) {
|
|
526
|
-
const a =
|
|
526
|
+
const a = et(), { t } = tt(), l = O(!1), n = O("success"), d = O(""), u = O(!1);
|
|
527
527
|
let f = null;
|
|
528
|
-
const
|
|
529
|
-
|
|
528
|
+
const _ = () => {
|
|
529
|
+
u.value = !1, setTimeout(() => {
|
|
530
530
|
l.value = !1;
|
|
531
531
|
}, 300);
|
|
532
532
|
}, y = () => {
|
|
533
533
|
f && clearTimeout(f), l.value = !0, setTimeout(() => {
|
|
534
|
-
|
|
534
|
+
u.value = !0;
|
|
535
535
|
}, 50), f = setTimeout(() => {
|
|
536
|
-
|
|
536
|
+
_();
|
|
537
537
|
}, 5e3);
|
|
538
538
|
};
|
|
539
539
|
return Qe(async () => {
|
|
540
|
-
const
|
|
541
|
-
|
|
540
|
+
const V = a.props.jetstream.flash?.bannerStyle || "success", w = a.props.jetstream.flash?.banner || "";
|
|
541
|
+
w && (n.value = V, d.value = w, y());
|
|
542
542
|
}), ee(() => {
|
|
543
|
-
|
|
544
|
-
}), (
|
|
543
|
+
d.value && y();
|
|
544
|
+
}), (V, w) => l.value ? (s(), i("div", Nt, [
|
|
545
545
|
r("div", {
|
|
546
|
-
class:
|
|
546
|
+
class: C([
|
|
547
547
|
"transform transition-all duration-300 ease-out shadow-lg rounded-lg p-4 min-w-[300px] max-w-md",
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
u.value ? "translate-y-0 opacity-100" : "translate-y-full opacity-0",
|
|
549
|
+
n.value === "success" ? "bg-green-600" : "bg-red-600"
|
|
550
550
|
])
|
|
551
551
|
}, [
|
|
552
|
-
r("div",
|
|
553
|
-
r("div",
|
|
552
|
+
r("div", Ut, [
|
|
553
|
+
r("div", Kt, [
|
|
554
554
|
r("div", {
|
|
555
|
-
class:
|
|
555
|
+
class: C([
|
|
556
556
|
"flex p-2 rounded-full",
|
|
557
|
-
|
|
557
|
+
n.value === "success" ? "bg-green-700" : "bg-red-700"
|
|
558
558
|
])
|
|
559
559
|
}, [
|
|
560
|
-
|
|
560
|
+
n.value === "success" ? (s(), L(j(lt), {
|
|
561
561
|
key: 0,
|
|
562
562
|
class: "w-5 h-5 text-white"
|
|
563
|
-
})) :
|
|
564
|
-
|
|
563
|
+
})) : M("", !0),
|
|
564
|
+
n.value === "danger" ? (s(), L(j(Le), {
|
|
565
565
|
key: 1,
|
|
566
566
|
class: "w-5 h-5 text-white"
|
|
567
|
-
})) :
|
|
567
|
+
})) : M("", !0)
|
|
568
568
|
], 2)
|
|
569
569
|
]),
|
|
570
|
-
r("div",
|
|
571
|
-
r("p",
|
|
570
|
+
r("div", Ht, [
|
|
571
|
+
r("p", Wt, B(d.value), 1)
|
|
572
572
|
]),
|
|
573
|
-
r("div",
|
|
573
|
+
r("div", Pt, [
|
|
574
574
|
r("button", {
|
|
575
575
|
type: "button",
|
|
576
|
-
class:
|
|
577
|
-
|
|
576
|
+
class: C(["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", [
|
|
577
|
+
n.value === "success" ? "hover:bg-green-700 focus:ring-offset-green-600" : "hover:bg-red-700 focus:ring-offset-red-600"
|
|
578
578
|
]]),
|
|
579
|
-
onClick:
|
|
579
|
+
onClick: _
|
|
580
580
|
}, [
|
|
581
|
-
r("span",
|
|
582
|
-
|
|
581
|
+
r("span", qt, B(j(t)("Dismiss")), 1),
|
|
582
|
+
H(j(st), { class: "w-5 h-5" })
|
|
583
583
|
], 2)
|
|
584
584
|
])
|
|
585
585
|
])
|
|
586
586
|
], 2)
|
|
587
|
-
])) :
|
|
587
|
+
])) : M("", !0);
|
|
588
588
|
}
|
|
589
|
-
},
|
|
589
|
+
}, Xt = ["type", "disabled"], ve = /* @__PURE__ */ Object.assign({
|
|
590
590
|
inheritAttrs: !1
|
|
591
591
|
}, {
|
|
592
592
|
__name: "Button",
|
|
@@ -605,26 +605,27 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
setup(e) {
|
|
608
|
-
const a =
|
|
608
|
+
const a = oe(), t = e, l = {
|
|
609
609
|
primary: "bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-[0_6px_14px_rgba(37,99,235,0.14)] hover:from-blue-600 hover:to-blue-700 hover:shadow-[0_8px_18px_rgba(37,99,235,0.18)] focus:ring-blue-500 disabled:hover:from-blue-500 disabled:hover:to-blue-600",
|
|
610
|
+
success: "bg-gradient-to-r from-green-500 to-green-600 text-white shadow-[0_6px_14px_rgba(34,197,94,0.14)] hover:from-green-600 hover:to-green-700 hover:shadow-[0_8px_18px_rgba(34,197,94,0.18)] focus:ring-green-500 disabled:hover:from-green-500 disabled:hover:to-green-600",
|
|
610
611
|
secondary: "bg-gradient-to-r from-slate-700 to-slate-800 text-white shadow-[0_8px_18px_rgba(15,23,42,0.16)] hover:from-slate-800 hover:to-slate-900 hover:shadow-[0_10px_22px_rgba(15,23,42,0.22)] focus:ring-slate-500 disabled:hover:from-slate-700 disabled:hover:to-slate-800",
|
|
611
612
|
tertiary: "border border-slate-300 bg-white text-slate-700 shadow-sm hover:bg-slate-50 hover:border-slate-400 hover:shadow focus:ring-slate-500 disabled:hover:bg-white",
|
|
612
613
|
warning: "border border-amber-300 bg-amber-50 text-amber-800 shadow-sm hover:bg-amber-100 focus:ring-amber-500 disabled:hover:bg-amber-50",
|
|
613
614
|
danger: "border border-rose-300 bg-rose-50 text-rose-700 shadow-sm hover:bg-rose-100 focus:ring-rose-500 disabled:hover:bg-rose-50"
|
|
614
|
-
},
|
|
615
|
+
}, n = g(() => l[t.variant] ? t.variant : "primary"), d = g(() => [
|
|
615
616
|
"min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-semibold tracking-tight transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-slate-50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
616
|
-
l[
|
|
617
|
+
l[n.value],
|
|
617
618
|
a.class
|
|
618
619
|
]);
|
|
619
|
-
return (
|
|
620
|
+
return (u, f) => (s(), i("button", R(j(a), {
|
|
620
621
|
type: e.type,
|
|
621
622
|
disabled: e.disabled,
|
|
622
|
-
class:
|
|
623
|
+
class: d.value
|
|
623
624
|
}), [
|
|
624
|
-
|
|
625
|
-
], 16,
|
|
625
|
+
S(u.$slots, "default")
|
|
626
|
+
], 16, Xt));
|
|
626
627
|
}
|
|
627
|
-
}),
|
|
628
|
+
}), Qt = ["value"], Yt = {
|
|
628
629
|
__name: "Checkbox",
|
|
629
630
|
props: {
|
|
630
631
|
checked: {
|
|
@@ -638,24 +639,24 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
638
639
|
},
|
|
639
640
|
emits: ["update:checked"],
|
|
640
641
|
setup(e, { emit: a }) {
|
|
641
|
-
const t = a, l = e,
|
|
642
|
+
const t = a, l = e, n = g({
|
|
642
643
|
get() {
|
|
643
644
|
return l.checked;
|
|
644
645
|
},
|
|
645
|
-
set(
|
|
646
|
-
t("update:checked",
|
|
646
|
+
set(d) {
|
|
647
|
+
t("update:checked", d);
|
|
647
648
|
}
|
|
648
649
|
});
|
|
649
|
-
return (
|
|
650
|
-
"onUpdate:modelValue":
|
|
650
|
+
return (d, u) => ne((s(), i("input", {
|
|
651
|
+
"onUpdate:modelValue": u[0] || (u[0] = (f) => n.value = f),
|
|
651
652
|
type: "checkbox",
|
|
652
653
|
value: e.value,
|
|
653
654
|
class: "rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
|
|
654
|
-
}, null, 8,
|
|
655
|
-
[Ye,
|
|
655
|
+
}, null, 8, Qt)), [
|
|
656
|
+
[Ye, n.value]
|
|
656
657
|
]);
|
|
657
658
|
}
|
|
658
|
-
},
|
|
659
|
+
}, Jt = ["checked", "disabled"], Oe = {
|
|
659
660
|
__name: "CheckboxInput",
|
|
660
661
|
props: {
|
|
661
662
|
modelValue: {
|
|
@@ -681,54 +682,54 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
681
682
|
},
|
|
682
683
|
emits: ["update:modelValue"],
|
|
683
684
|
setup(e, { emit: a }) {
|
|
684
|
-
const t = a, l = e,
|
|
685
|
-
|
|
685
|
+
const t = a, l = e, n = g(() => l.modelValue === l.value), d = O(!1), u = () => {
|
|
686
|
+
d.value = !0;
|
|
686
687
|
}, f = () => {
|
|
687
|
-
|
|
688
|
-
},
|
|
688
|
+
d.value = !1;
|
|
689
|
+
}, _ = (y) => {
|
|
689
690
|
t("update:modelValue", y.target.checked ? l.value : l.uncheckedValue);
|
|
690
691
|
};
|
|
691
|
-
return (y,
|
|
692
|
-
class:
|
|
693
|
-
|
|
692
|
+
return (y, V) => (s(), i("label", {
|
|
693
|
+
class: C(["inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
694
|
+
n.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
694
695
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
695
|
-
|
|
696
|
+
d.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
696
697
|
]])
|
|
697
698
|
}, [
|
|
698
699
|
r("input", {
|
|
699
700
|
type: "checkbox",
|
|
700
701
|
class: "sr-only",
|
|
701
|
-
checked:
|
|
702
|
+
checked: n.value,
|
|
702
703
|
disabled: e.disabled,
|
|
703
|
-
onChange:
|
|
704
|
-
onFocus:
|
|
704
|
+
onChange: _,
|
|
705
|
+
onFocus: u,
|
|
705
706
|
onBlur: f
|
|
706
|
-
}, null, 40,
|
|
707
|
+
}, null, 40, Jt),
|
|
707
708
|
r("span", {
|
|
708
|
-
class:
|
|
709
|
-
|
|
709
|
+
class: C(["inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none", [
|
|
710
|
+
n.value ? "border-current bg-white/15 text-current" : "border-current/70 text-transparent",
|
|
710
711
|
"rounded"
|
|
711
712
|
]])
|
|
712
713
|
}, " ✓ ", 2),
|
|
713
|
-
r("span", null,
|
|
714
|
+
r("span", null, B(e.label), 1)
|
|
714
715
|
], 2));
|
|
715
716
|
}
|
|
716
|
-
},
|
|
717
|
+
}, Zt = { class: "relative flex items-center" }, el = {
|
|
717
718
|
key: 0,
|
|
718
719
|
class: "absolute inset-y-0 left-0 flex items-center pointer-events-none pl-3"
|
|
719
|
-
},
|
|
720
|
+
}, tl = ["type", "value", "disabled"], ll = ["aria-label"], sl = {
|
|
720
721
|
key: 0,
|
|
721
722
|
class: "h-5 w-5",
|
|
722
723
|
fill: "none",
|
|
723
724
|
stroke: "currentColor",
|
|
724
725
|
viewBox: "0 0 24 24"
|
|
725
|
-
},
|
|
726
|
+
}, al = {
|
|
726
727
|
key: 1,
|
|
727
728
|
class: "h-5 w-5",
|
|
728
729
|
fill: "none",
|
|
729
730
|
stroke: "currentColor",
|
|
730
731
|
viewBox: "0 0 24 24"
|
|
731
|
-
},
|
|
732
|
+
}, nl = 254, je = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
732
733
|
__name: "TextInput",
|
|
733
734
|
props: {
|
|
734
735
|
modelValue: {
|
|
@@ -746,40 +747,40 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
746
747
|
},
|
|
747
748
|
emits: ["update:modelValue", "blur"],
|
|
748
749
|
setup(e, { expose: a, emit: t }) {
|
|
749
|
-
const l = e,
|
|
750
|
-
const { class:
|
|
751
|
-
return
|
|
752
|
-
}),
|
|
750
|
+
const l = e, n = t, d = oe(), u = O(null), f = O(!1), _ = g(() => String(d.type ?? "text")), y = g(() => _.value === "password"), V = g(() => y.value && f.value ? "text" : _.value), w = g(() => l.modelValue ?? ""), b = g(() => {
|
|
751
|
+
const { class: k, type: D, ...z } = d;
|
|
752
|
+
return z.maxlength === void 0 && (z.maxlength = nl), z;
|
|
753
|
+
}), $ = g(() => [
|
|
753
754
|
"w-full min-w-0 max-w-full rounded-lg border border-slate-300 bg-white text-slate-900 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 placeholder:text-slate-400",
|
|
754
|
-
|
|
755
|
+
d.class,
|
|
755
756
|
y.value ? "pr-10 pl-10" : ""
|
|
756
757
|
]), m = () => {
|
|
757
758
|
f.value = !f.value;
|
|
758
|
-
},
|
|
759
|
-
if (
|
|
759
|
+
}, x = (k) => {
|
|
760
|
+
if (V.value !== "number")
|
|
760
761
|
return;
|
|
761
|
-
|
|
762
|
-
const
|
|
763
|
-
|
|
762
|
+
k.preventDefault();
|
|
763
|
+
const D = document.scrollingElement ?? document.documentElement ?? document.body;
|
|
764
|
+
D && (D.scrollTop += k.deltaY);
|
|
764
765
|
};
|
|
765
766
|
return ee(() => {
|
|
766
|
-
|
|
767
|
-
}), a({ focus: () =>
|
|
768
|
-
y.value ? (s(), i("div",
|
|
769
|
-
|
|
770
|
-
])) :
|
|
771
|
-
r("input",
|
|
767
|
+
u.value?.hasAttribute("autofocus") && u.value.focus();
|
|
768
|
+
}), a({ focus: () => u.value?.focus() }), (k, D) => (s(), i("div", Zt, [
|
|
769
|
+
y.value ? (s(), i("div", el, [
|
|
770
|
+
H(j(at), { class: "h-5 w-5 text-slate-400" })
|
|
771
|
+
])) : M("", !0),
|
|
772
|
+
r("input", R({
|
|
772
773
|
ref_key: "input",
|
|
773
|
-
ref:
|
|
774
|
-
},
|
|
775
|
-
type:
|
|
776
|
-
class: [
|
|
777
|
-
value:
|
|
774
|
+
ref: u
|
|
775
|
+
}, b.value, {
|
|
776
|
+
type: V.value,
|
|
777
|
+
class: [$.value, l.disabled ? l.disabledClass : null],
|
|
778
|
+
value: w.value,
|
|
778
779
|
disabled: l.disabled,
|
|
779
|
-
onInput:
|
|
780
|
-
onBlur:
|
|
781
|
-
onWheel:
|
|
782
|
-
}), null, 16,
|
|
780
|
+
onInput: D[0] || (D[0] = (z) => n("update:modelValue", z.target.value)),
|
|
781
|
+
onBlur: D[1] || (D[1] = (z) => n("blur", z)),
|
|
782
|
+
onWheel: x
|
|
783
|
+
}), null, 16, tl),
|
|
783
784
|
y.value ? (s(), i("button", {
|
|
784
785
|
key: 1,
|
|
785
786
|
type: "button",
|
|
@@ -787,14 +788,14 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
787
788
|
"aria-label": f.value ? "Hide password" : "Show password",
|
|
788
789
|
onClick: m
|
|
789
790
|
}, [
|
|
790
|
-
f.value ? (s(), i("svg",
|
|
791
|
+
f.value ? (s(), i("svg", sl, [...D[2] || (D[2] = [
|
|
791
792
|
r("path", {
|
|
792
793
|
"stroke-linecap": "round",
|
|
793
794
|
"stroke-linejoin": "round",
|
|
794
795
|
"stroke-width": "2",
|
|
795
796
|
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"
|
|
796
797
|
}, null, -1)
|
|
797
|
-
])])) : (s(), i("svg",
|
|
798
|
+
])])) : (s(), i("svg", al, [...D[3] || (D[3] = [
|
|
798
799
|
r("path", {
|
|
799
800
|
"stroke-linecap": "round",
|
|
800
801
|
"stroke-linejoin": "round",
|
|
@@ -808,10 +809,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
808
809
|
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"
|
|
809
810
|
}, null, -1)
|
|
810
811
|
])]))
|
|
811
|
-
], 8,
|
|
812
|
+
], 8, ll)) : M("", !0)
|
|
812
813
|
]));
|
|
813
814
|
}
|
|
814
|
-
}),
|
|
815
|
+
}), ol = ["value", "disabled"], rl = 1e3, ze = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
815
816
|
__name: "TextArea",
|
|
816
817
|
props: {
|
|
817
818
|
modelValue: String,
|
|
@@ -830,39 +831,39 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
830
831
|
},
|
|
831
832
|
emits: ["update:modelValue"],
|
|
832
833
|
setup(e, { expose: a, emit: t }) {
|
|
833
|
-
const l = e,
|
|
834
|
-
const { class:
|
|
835
|
-
return
|
|
836
|
-
}),
|
|
834
|
+
const l = e, n = t, d = oe(), u = O(null), f = g(() => {
|
|
835
|
+
const { class: w, ...b } = d;
|
|
836
|
+
return b.maxlength === void 0 && (b.maxlength = rl), b;
|
|
837
|
+
}), _ = g(() => [
|
|
837
838
|
"w-full min-w-0 max-w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
838
839
|
l.autoResize ? "resize-none overflow-y-auto" : "resize-y",
|
|
839
|
-
|
|
840
|
+
d.class
|
|
840
841
|
]), y = () => {
|
|
841
|
-
!l.autoResize || !
|
|
842
|
-
},
|
|
843
|
-
|
|
842
|
+
!l.autoResize || !u.value || (u.value.style.height = "auto", u.value.style.height = `${u.value.scrollHeight}px`);
|
|
843
|
+
}, V = (w) => {
|
|
844
|
+
n("update:modelValue", w.target.value), y();
|
|
844
845
|
};
|
|
845
846
|
return ee(() => {
|
|
846
|
-
|
|
847
|
+
u.value?.hasAttribute("autofocus") && u.value.focus(), fe(() => {
|
|
847
848
|
y();
|
|
848
849
|
});
|
|
849
|
-
}),
|
|
850
|
-
|
|
850
|
+
}), J(() => l.modelValue, () => {
|
|
851
|
+
fe(() => {
|
|
851
852
|
y();
|
|
852
853
|
});
|
|
853
|
-
}), a({ focus: () =>
|
|
854
|
-
r("textarea",
|
|
854
|
+
}), a({ focus: () => u.value?.focus() }), (w, b) => (s(), i("div", null, [
|
|
855
|
+
r("textarea", R({
|
|
855
856
|
ref_key: "textarea",
|
|
856
|
-
ref:
|
|
857
|
+
ref: u
|
|
857
858
|
}, f.value, {
|
|
858
|
-
class: [
|
|
859
|
+
class: [_.value, l.disabled ? l.disabledClass : ""],
|
|
859
860
|
value: l.modelValue,
|
|
860
861
|
disabled: l.disabled,
|
|
861
|
-
onInput:
|
|
862
|
-
}), null, 16,
|
|
862
|
+
onInput: V
|
|
863
|
+
}), null, 16, ol)
|
|
863
864
|
]));
|
|
864
865
|
}
|
|
865
|
-
}),
|
|
866
|
+
}), il = ["onClick"], Ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
866
867
|
__name: "CustomSelect",
|
|
867
868
|
props: {
|
|
868
869
|
modelValue: {
|
|
@@ -948,67 +949,67 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
948
949
|
},
|
|
949
950
|
emits: ["update:modelValue"],
|
|
950
951
|
setup(e, { emit: a }) {
|
|
951
|
-
const t = e, l = a,
|
|
952
|
-
if (t.modelValue === null || t.modelValue === void 0 || t.modelValue === "" && !t.options.some((
|
|
952
|
+
const t = e, l = a, n = oe(), d = O(!1), u = O(null), f = O(null), _ = O(null), y = O({}), V = (v) => typeof v == "object" && v !== null, w = (v) => V(v) ? v[t.valueKey] : v, b = (v) => t.optionLabel ? t.optionLabel(v) : V(v) ? v[t.labelKey] ?? v[t.valueKey] ?? "" : v, $ = (v) => !t.softDeleteAware || !V(v) ? !1 : !!v[t.deletedKey], m = g(() => String(t.modelValue ?? "")), x = g(() => !t.softDeleteAware || m.value === "" ? null : t.options.find((v) => $(v) && String(w(v) ?? "") === m.value) ?? null), k = g(() => t.softDeleteAware ? t.options.filter((v) => !$(v)) : t.options), D = g(() => {
|
|
953
|
+
if (t.modelValue === null || t.modelValue === void 0 || t.modelValue === "" && !t.options.some((E) => w(E) === ""))
|
|
953
954
|
return t.placeholder;
|
|
954
|
-
const
|
|
955
|
-
const
|
|
956
|
-
return
|
|
955
|
+
const v = t.options.find((E) => {
|
|
956
|
+
const N = w(E);
|
|
957
|
+
return N === t.modelValue || String(N) === String(t.modelValue);
|
|
957
958
|
});
|
|
958
|
-
return
|
|
959
|
-
}),
|
|
960
|
-
t.disabled || (
|
|
961
|
-
},
|
|
962
|
-
const
|
|
963
|
-
l("update:modelValue",
|
|
964
|
-
},
|
|
965
|
-
t.placeholderDisabled || (l("update:modelValue",
|
|
959
|
+
return v ? b(v) : t.modelValue;
|
|
960
|
+
}), z = (v) => t.modelModifiers.number ? v === "" ? "" : Number(v) : v, Z = () => {
|
|
961
|
+
t.disabled || (d.value = !d.value);
|
|
962
|
+
}, U = (v) => {
|
|
963
|
+
const E = w(v);
|
|
964
|
+
l("update:modelValue", z(E)), d.value = !1;
|
|
965
|
+
}, q = () => {
|
|
966
|
+
t.placeholderDisabled || (l("update:modelValue", z("")), d.value = !1);
|
|
966
967
|
}, G = () => {
|
|
967
968
|
if (!f.value)
|
|
968
969
|
return;
|
|
969
|
-
const
|
|
970
|
+
const v = f.value.getBoundingClientRect(), E = window.innerWidth, N = window.innerHeight, X = N - v.bottom - 8, te = v.top - 8, le = X < 240 && te > X, se = Math.min(v.width, Math.max(E - v.left - 16, 160)), ae = Math.max(Math.min(240, le ? te : X), 120);
|
|
970
971
|
y.value = {
|
|
971
972
|
position: "fixed",
|
|
972
|
-
left: `${Math.max(
|
|
973
|
+
left: `${Math.max(v.left, 8)}px`,
|
|
973
974
|
width: `${se}px`,
|
|
974
975
|
maxHeight: `${ae}px`,
|
|
975
976
|
zIndex: "9999",
|
|
976
|
-
...le ? { bottom: `${
|
|
977
|
+
...le ? { bottom: `${N - v.top + 1}px` } : { top: `${v.bottom - 1}px` }
|
|
977
978
|
};
|
|
978
|
-
},
|
|
979
|
-
const
|
|
980
|
-
!
|
|
979
|
+
}, P = (v) => {
|
|
980
|
+
const E = u.value?.contains(v.target), N = _.value?.contains(v.target);
|
|
981
|
+
!E && !N && (d.value = !1);
|
|
981
982
|
};
|
|
982
983
|
return ee(() => {
|
|
983
|
-
document.addEventListener("click",
|
|
984
|
+
document.addEventListener("click", P), window.addEventListener("resize", G), window.addEventListener("scroll", G, !0);
|
|
984
985
|
}), Je(() => {
|
|
985
|
-
document.removeEventListener("click",
|
|
986
|
-
}),
|
|
987
|
-
|
|
988
|
-
}), (
|
|
986
|
+
document.removeEventListener("click", P), window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
987
|
+
}), J(d, async (v) => {
|
|
988
|
+
v && (await fe(), G());
|
|
989
|
+
}), (v, E) => (s(), i("div", {
|
|
989
990
|
ref_key: "rootRef",
|
|
990
|
-
ref:
|
|
991
|
+
ref: u,
|
|
991
992
|
class: "relative",
|
|
992
|
-
onClick:
|
|
993
|
+
onClick: Z
|
|
993
994
|
}, [
|
|
994
|
-
r("div",
|
|
995
|
+
r("div", R({
|
|
995
996
|
ref_key: "triggerRef",
|
|
996
997
|
ref: f,
|
|
997
998
|
class: [
|
|
998
999
|
e.baseClass,
|
|
999
|
-
|
|
1000
|
+
x.value ? e.deletedSelectedClass : e.normalTextClass,
|
|
1000
1001
|
"flex items-center justify-between cursor-pointer",
|
|
1001
|
-
|
|
1002
|
+
j(n).class
|
|
1002
1003
|
]
|
|
1003
|
-
},
|
|
1004
|
+
}, j(n), { tabindex: "0" }), [
|
|
1004
1005
|
r("span", {
|
|
1005
|
-
class:
|
|
1006
|
-
},
|
|
1007
|
-
|
|
1008
|
-
class:
|
|
1006
|
+
class: C({ "text-gray-400": !e.modelValue && e.placeholder })
|
|
1007
|
+
}, B(D.value), 3),
|
|
1008
|
+
H(j(xe), {
|
|
1009
|
+
class: C(["size-5 text-gray-400 transition-transform", { "rotate-180": d.value }])
|
|
1009
1010
|
}, null, 8, ["class"])
|
|
1010
1011
|
], 16),
|
|
1011
|
-
|
|
1012
|
+
H(re, {
|
|
1012
1013
|
"enter-active-class": "transition-all duration-200 ease-out",
|
|
1013
1014
|
"enter-from-class": "opacity-0 transform scale-95 -translate-y-2",
|
|
1014
1015
|
"enter-to-class": "opacity-100 transform scale-100 translate-y-0",
|
|
@@ -1016,46 +1017,46 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1016
1017
|
"leave-from-class": "opacity-100 transform scale-100 translate-y-0",
|
|
1017
1018
|
"leave-to-class": "opacity-0 transform scale-95 -translate-y-2"
|
|
1018
1019
|
}, {
|
|
1019
|
-
default:
|
|
1020
|
-
(s(),
|
|
1021
|
-
|
|
1020
|
+
default: F(() => [
|
|
1021
|
+
(s(), L(Te, { to: "body" }, [
|
|
1022
|
+
d.value ? (s(), i("div", {
|
|
1022
1023
|
key: 0,
|
|
1023
1024
|
ref_key: "dropdownMenuRef",
|
|
1024
|
-
ref:
|
|
1025
|
-
class:
|
|
1026
|
-
style:
|
|
1025
|
+
ref: _,
|
|
1026
|
+
class: C(e.dropdownClass),
|
|
1027
|
+
style: he(y.value)
|
|
1027
1028
|
}, [
|
|
1028
1029
|
e.placeholder ? (s(), i("div", {
|
|
1029
1030
|
key: 0,
|
|
1030
|
-
class:
|
|
1031
|
+
class: C([
|
|
1031
1032
|
e.dropdownOptionClass,
|
|
1032
1033
|
e.placeholderClass,
|
|
1033
1034
|
{ "text-gray-400": !e.modelValue }
|
|
1034
1035
|
]),
|
|
1035
|
-
onClick:
|
|
1036
|
-
},
|
|
1037
|
-
|
|
1036
|
+
onClick: ye(q, ["stop"])
|
|
1037
|
+
}, B(e.placeholder), 3)) : M("", !0),
|
|
1038
|
+
x.value ? (s(), i("div", {
|
|
1038
1039
|
key: 1,
|
|
1039
|
-
class:
|
|
1040
|
+
class: C([
|
|
1040
1041
|
e.dropdownOptionClass,
|
|
1041
1042
|
e.deletedOptionClass,
|
|
1042
1043
|
e.dropdownSelectedClass
|
|
1043
1044
|
])
|
|
1044
|
-
},
|
|
1045
|
-
(s(!0), i(
|
|
1046
|
-
key: String(
|
|
1047
|
-
class:
|
|
1045
|
+
}, B(b(x.value)), 3)) : M("", !0),
|
|
1046
|
+
(s(!0), i(Q, null, Y(k.value, (N) => (s(), i("div", {
|
|
1047
|
+
key: String(w(N)),
|
|
1048
|
+
class: C([
|
|
1048
1049
|
e.dropdownOptionClass,
|
|
1049
1050
|
e.optionClass,
|
|
1050
1051
|
{
|
|
1051
|
-
[e.dropdownSelectedClass]:
|
|
1052
|
-
"rounded-b-lg":
|
|
1053
|
-
"rounded-lg": !e.placeholder &&
|
|
1052
|
+
[e.dropdownSelectedClass]: w(N) === e.modelValue || String(w(N)) === String(e.modelValue),
|
|
1053
|
+
"rounded-b-lg": N === k.value[k.value.length - 1] && !e.placeholder,
|
|
1054
|
+
"rounded-lg": !e.placeholder && k.value.length === 1
|
|
1054
1055
|
}
|
|
1055
1056
|
]),
|
|
1056
|
-
onClick:
|
|
1057
|
-
},
|
|
1058
|
-
], 6)) :
|
|
1057
|
+
onClick: ye((X) => U(N), ["stop"])
|
|
1058
|
+
}, B(b(N)), 11, il))), 128))
|
|
1059
|
+
], 6)) : M("", !0)
|
|
1059
1060
|
]))
|
|
1060
1061
|
]),
|
|
1061
1062
|
_: 1
|
|
@@ -1149,7 +1150,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1149
1150
|
emits: ["update:modelValue"],
|
|
1150
1151
|
setup(e, { emit: a }) {
|
|
1151
1152
|
const t = a;
|
|
1152
|
-
return (l,
|
|
1153
|
+
return (l, n) => (s(), L(Ee, R({
|
|
1153
1154
|
"model-value": e.modelValue,
|
|
1154
1155
|
"model-modifiers": e.modelModifiers,
|
|
1155
1156
|
options: e.options,
|
|
@@ -1170,10 +1171,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1170
1171
|
"dropdown-class": e.dropdownClass,
|
|
1171
1172
|
"dropdown-option-class": e.dropdownOptionClass,
|
|
1172
1173
|
"dropdown-selected-class": e.dropdownSelectedClass,
|
|
1173
|
-
"onUpdate:modelValue":
|
|
1174
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => t("update:modelValue", d))
|
|
1174
1175
|
}, 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"]));
|
|
1175
1176
|
}
|
|
1176
|
-
},
|
|
1177
|
+
}, dl = ["type", "max", "value", "disabled"], Re = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1177
1178
|
__name: "DateInput",
|
|
1178
1179
|
props: {
|
|
1179
1180
|
modelValue: {
|
|
@@ -1195,41 +1196,41 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1195
1196
|
},
|
|
1196
1197
|
emits: ["update:modelValue"],
|
|
1197
1198
|
setup(e, { expose: a, emit: t }) {
|
|
1198
|
-
const l = e,
|
|
1199
|
-
const m = l.withTimestamp ? "9999-12-31T23:59" : "9999-12-31",
|
|
1200
|
-
return typeof
|
|
1201
|
-
}),
|
|
1202
|
-
const { class: m, type:
|
|
1203
|
-
return
|
|
1204
|
-
}),
|
|
1199
|
+
const l = e, n = t, d = oe(), u = O(null), f = g(() => l.withTimestamp ? "datetime-local" : "date"), _ = g(() => l.modelValue ?? ""), y = g(() => {
|
|
1200
|
+
const m = l.withTimestamp ? "9999-12-31T23:59" : "9999-12-31", x = d.max;
|
|
1201
|
+
return typeof x != "string" || x === "" || x > m ? m : x;
|
|
1202
|
+
}), V = g(() => {
|
|
1203
|
+
const { class: m, type: x, ...k } = d;
|
|
1204
|
+
return k;
|
|
1205
|
+
}), w = g(() => [
|
|
1205
1206
|
"w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
1206
|
-
|
|
1207
|
-
]),
|
|
1208
|
-
const
|
|
1209
|
-
if (!
|
|
1207
|
+
d.class
|
|
1208
|
+
]), b = (m) => typeof m != "string" ? "" : m.replace(/^(\d{4})\d+/, "$1"), $ = (m) => {
|
|
1209
|
+
const x = m.target;
|
|
1210
|
+
if (!x)
|
|
1210
1211
|
return;
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1212
|
+
const k = String(x.value ?? ""), D = b(k);
|
|
1213
|
+
D !== k && (x.value = D), n("update:modelValue", D);
|
|
1213
1214
|
};
|
|
1214
1215
|
return ee(() => {
|
|
1215
|
-
|
|
1216
|
-
}), a({ focus: () =>
|
|
1216
|
+
u.value?.hasAttribute("autofocus") && u.value.focus();
|
|
1217
|
+
}), a({ focus: () => u.value?.focus() }), (m, x) => (s(), i("input", R({
|
|
1217
1218
|
ref_key: "input",
|
|
1218
|
-
ref:
|
|
1219
|
-
},
|
|
1219
|
+
ref: u
|
|
1220
|
+
}, V.value, {
|
|
1220
1221
|
type: f.value,
|
|
1221
1222
|
max: y.value,
|
|
1222
|
-
class: [
|
|
1223
|
-
value:
|
|
1223
|
+
class: [w.value, l.disabled ? l.disabledClass : null],
|
|
1224
|
+
value: _.value,
|
|
1224
1225
|
disabled: l.disabled,
|
|
1225
|
-
onInput:
|
|
1226
|
-
onChange:
|
|
1227
|
-
}), null, 16,
|
|
1226
|
+
onInput: $,
|
|
1227
|
+
onChange: $
|
|
1228
|
+
}), null, 16, dl));
|
|
1228
1229
|
}
|
|
1229
|
-
}),
|
|
1230
|
+
}), ul = { class: "relative" }, cl = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, fl = ["accept"], gl = {
|
|
1230
1231
|
key: 0,
|
|
1231
1232
|
class: "mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200"
|
|
1232
|
-
},
|
|
1233
|
+
}, pl = { class: "flex items-center space-x-4" }, ml = ["src"], bl = { class: "text-sm font-medium text-gray-900" }, yl = { class: "text-xs text-gray-500" }, Ne = {
|
|
1233
1234
|
__name: "ImageInput",
|
|
1234
1235
|
props: {
|
|
1235
1236
|
currentImageUrl: {
|
|
@@ -1255,38 +1256,38 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1255
1256
|
},
|
|
1256
1257
|
emits: ["update:modelValue"],
|
|
1257
1258
|
setup(e, { emit: a }) {
|
|
1258
|
-
const t = a, l = e,
|
|
1259
|
-
const
|
|
1260
|
-
t("update:modelValue",
|
|
1259
|
+
const t = a, l = e, n = (d) => {
|
|
1260
|
+
const u = d.target.files?.[0] ?? null;
|
|
1261
|
+
t("update:modelValue", u);
|
|
1261
1262
|
};
|
|
1262
|
-
return (
|
|
1263
|
-
r("div",
|
|
1264
|
-
r("div",
|
|
1265
|
-
|
|
1263
|
+
return (d, u) => (s(), i("div", null, [
|
|
1264
|
+
r("div", ul, [
|
|
1265
|
+
r("div", cl, [
|
|
1266
|
+
H(j(nt), { class: "size-5 text-gray-400" })
|
|
1266
1267
|
]),
|
|
1267
|
-
r("input",
|
|
1268
|
+
r("input", R(e.attrs, {
|
|
1268
1269
|
type: "file",
|
|
1269
1270
|
accept: e.accept,
|
|
1270
1271
|
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",
|
|
1271
|
-
onChange:
|
|
1272
|
-
}), null, 16,
|
|
1272
|
+
onChange: n
|
|
1273
|
+
}), null, 16, fl)
|
|
1273
1274
|
]),
|
|
1274
|
-
l.currentImageUrl ? (s(), i("div",
|
|
1275
|
-
r("div",
|
|
1275
|
+
l.currentImageUrl ? (s(), i("div", gl, [
|
|
1276
|
+
r("div", pl, [
|
|
1276
1277
|
r("img", {
|
|
1277
1278
|
src: l.currentImageUrl,
|
|
1278
1279
|
alt: "Current logo",
|
|
1279
1280
|
class: "h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm"
|
|
1280
|
-
}, null, 8,
|
|
1281
|
+
}, null, 8, ml),
|
|
1281
1282
|
r("div", null, [
|
|
1282
|
-
r("p",
|
|
1283
|
-
r("p",
|
|
1283
|
+
r("p", bl, B(l.currentLabel), 1),
|
|
1284
|
+
r("p", yl, B(l.currentSubtext), 1)
|
|
1284
1285
|
])
|
|
1285
1286
|
])
|
|
1286
|
-
])) :
|
|
1287
|
+
])) : M("", !0)
|
|
1287
1288
|
]));
|
|
1288
1289
|
}
|
|
1289
|
-
},
|
|
1290
|
+
}, vl = { class: "flex h-12 overflow-hidden rounded-lg border border-gray-300 text-sm" }, hl = ["disabled", "onClick"], Ue = {
|
|
1290
1291
|
__name: "NotationInput",
|
|
1291
1292
|
props: {
|
|
1292
1293
|
modelValue: {
|
|
@@ -1304,23 +1305,23 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1304
1305
|
},
|
|
1305
1306
|
emits: ["update:modelValue"],
|
|
1306
1307
|
setup(e, { emit: a }) {
|
|
1307
|
-
const t = a, l = e,
|
|
1308
|
-
return (f,
|
|
1309
|
-
(s(!0), i(
|
|
1310
|
-
key: `notation-${
|
|
1308
|
+
const t = a, l = e, n = g(() => l.options.map((f) => f == null ? "" : String(f).trim()).filter((f) => f !== "")), d = (f) => String(f) === String(l.modelValue ?? ""), u = (f) => t("update:modelValue", f);
|
|
1309
|
+
return (f, _) => (s(), i("div", vl, [
|
|
1310
|
+
(s(!0), i(Q, null, Y(n.value, (y, V) => (s(), i("button", {
|
|
1311
|
+
key: `notation-${V}-${y}`,
|
|
1311
1312
|
type: "button",
|
|
1312
|
-
class:
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1313
|
+
class: C(["flex-1 border-l border-gray-300 px-2 text-center font-semibold transition-colors duration-150 first:border-l-0", [
|
|
1314
|
+
V === 0 ? "rounded-l-lg" : "",
|
|
1315
|
+
V === n.value.length - 1 ? "rounded-r-lg" : "",
|
|
1316
|
+
d(y) ? "bg-indigo-600 text-white" : "bg-white text-gray-700 hover:bg-gray-50",
|
|
1316
1317
|
"focus-visible:ring-2 "
|
|
1317
1318
|
]]),
|
|
1318
1319
|
disabled: e.disabled,
|
|
1319
|
-
onClick: (
|
|
1320
|
-
},
|
|
1320
|
+
onClick: (w) => u(y)
|
|
1321
|
+
}, B(y), 11, hl))), 128))
|
|
1321
1322
|
]));
|
|
1322
1323
|
}
|
|
1323
|
-
},
|
|
1324
|
+
}, xl = ["name", "value", "checked", "disabled"], Ke = {
|
|
1324
1325
|
__name: "RadioInput",
|
|
1325
1326
|
props: {
|
|
1326
1327
|
modelValue: {
|
|
@@ -1346,16 +1347,16 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1346
1347
|
},
|
|
1347
1348
|
emits: ["update:modelValue"],
|
|
1348
1349
|
setup(e, { emit: a }) {
|
|
1349
|
-
const t = a, l = e,
|
|
1350
|
-
|
|
1350
|
+
const t = a, l = e, n = g(() => String(l.modelValue ?? "") === String(l.value)), d = O(!1), u = () => {
|
|
1351
|
+
d.value = !0;
|
|
1351
1352
|
}, f = () => {
|
|
1352
|
-
|
|
1353
|
-
},
|
|
1354
|
-
return (y,
|
|
1355
|
-
class:
|
|
1356
|
-
|
|
1353
|
+
d.value = !1;
|
|
1354
|
+
}, _ = () => t("update:modelValue", l.value);
|
|
1355
|
+
return (y, V) => (s(), i("label", {
|
|
1356
|
+
class: C(["inline-flex items-center rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
1357
|
+
n.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
1357
1358
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
1358
|
-
|
|
1359
|
+
d.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
1359
1360
|
]])
|
|
1360
1361
|
}, [
|
|
1361
1362
|
r("input", {
|
|
@@ -1363,16 +1364,16 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1363
1364
|
class: "sr-only",
|
|
1364
1365
|
name: e.name,
|
|
1365
1366
|
value: e.value,
|
|
1366
|
-
checked:
|
|
1367
|
+
checked: n.value,
|
|
1367
1368
|
disabled: e.disabled,
|
|
1368
|
-
onChange:
|
|
1369
|
-
onFocus:
|
|
1369
|
+
onChange: _,
|
|
1370
|
+
onFocus: u,
|
|
1370
1371
|
onBlur: f
|
|
1371
|
-
}, null, 40,
|
|
1372
|
-
r("span", null,
|
|
1372
|
+
}, null, 40, xl),
|
|
1373
|
+
r("span", null, B(n.value ? "✓" : "○") + " " + B(e.label), 1)
|
|
1373
1374
|
], 2));
|
|
1374
1375
|
}
|
|
1375
|
-
},
|
|
1376
|
+
}, wl = { class: "flex flex-wrap gap-3" }, He = {
|
|
1376
1377
|
__name: "RadioMultipleInput",
|
|
1377
1378
|
props: {
|
|
1378
1379
|
modelValue: {
|
|
@@ -1394,27 +1395,27 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1394
1395
|
},
|
|
1395
1396
|
emits: ["update:modelValue"],
|
|
1396
1397
|
setup(e, { emit: a }) {
|
|
1397
|
-
const t = a, l = e,
|
|
1398
|
-
return (
|
|
1399
|
-
(s(!0), i(
|
|
1400
|
-
key: `radio-${e.name ?? "group"}-${
|
|
1398
|
+
const t = a, l = e, n = g(() => l.options.map((u) => u == null ? "" : String(u).trim()).filter((u) => u !== "")), d = (u) => t("update:modelValue", u);
|
|
1399
|
+
return (u, f) => (s(), i("div", wl, [
|
|
1400
|
+
(s(!0), i(Q, null, Y(n.value, (_) => (s(), L(me, {
|
|
1401
|
+
key: `radio-${e.name ?? "group"}-${_}`,
|
|
1401
1402
|
type: "radio-input",
|
|
1402
1403
|
"model-value": l.modelValue,
|
|
1403
1404
|
name: e.name,
|
|
1404
|
-
value:
|
|
1405
|
-
label:
|
|
1405
|
+
value: _,
|
|
1406
|
+
label: _,
|
|
1406
1407
|
disabled: e.disabled,
|
|
1407
|
-
"onUpdate:modelValue":
|
|
1408
|
+
"onUpdate:modelValue": d
|
|
1408
1409
|
}, null, 8, ["model-value", "name", "value", "label", "disabled"]))), 128))
|
|
1409
1410
|
]));
|
|
1410
1411
|
}
|
|
1411
|
-
},
|
|
1412
|
+
}, kl = ["for"], Sl = {
|
|
1412
1413
|
key: 1,
|
|
1413
1414
|
class: "text-xs text-gray-500 mb-1 block break-all"
|
|
1414
|
-
},
|
|
1415
|
+
}, $l = {
|
|
1415
1416
|
key: 14,
|
|
1416
1417
|
class: "flex items-center mt-2 text-sm text-red-600"
|
|
1417
|
-
}, ce = "block w-full rounded-lg border border-slate-300 bg-white px-4 py-3 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm transition-all duration-200 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20",
|
|
1418
|
+
}, ce = "block w-full rounded-lg border border-slate-300 bg-white px-4 py-3 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm transition-all duration-200 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20", me = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1418
1419
|
__name: "InputGroup",
|
|
1419
1420
|
props: {
|
|
1420
1421
|
type: {
|
|
@@ -1532,9 +1533,9 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1532
1533
|
},
|
|
1533
1534
|
emits: ["update:modelValue", "blur"],
|
|
1534
1535
|
setup(e, { emit: a }) {
|
|
1535
|
-
const t = e, l = a,
|
|
1536
|
-
const
|
|
1537
|
-
return typeof
|
|
1536
|
+
const t = e, l = a, n = oe(), d = (K) => l("update:modelValue", K), u = g(() => !!t.errorMessage), f = g(() => $.value || m.value), _ = g(() => {
|
|
1537
|
+
const K = n.id;
|
|
1538
|
+
return typeof K == "string" && K !== "" ? K : void 0;
|
|
1538
1539
|
}), y = [
|
|
1539
1540
|
"text",
|
|
1540
1541
|
"email",
|
|
@@ -1547,30 +1548,30 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1547
1548
|
"month",
|
|
1548
1549
|
"week",
|
|
1549
1550
|
"color"
|
|
1550
|
-
],
|
|
1551
|
-
...
|
|
1552
|
-
class: [ce,
|
|
1551
|
+
], V = [], w = g(() => t.type === "image"), b = g(() => t.type === "notation"), $ = g(() => t.type === "checkbox-input"), m = g(() => t.type === "radio-input"), x = g(() => t.type === "checkbox"), k = g(() => t.type === "radio"), D = g(() => t.type === "date" || t.type === "datetime-local"), z = g(() => t.type === "textarea"), Z = g(() => t.type === "select"), U = g(() => y.includes(t.type)), q = g(() => V.includes(t.type)), G = g(() => ({
|
|
1552
|
+
...n,
|
|
1553
|
+
class: [ce, n.class],
|
|
1553
1554
|
type: t.type,
|
|
1554
1555
|
modelValue: t.modelValue,
|
|
1555
1556
|
disabled: t.disabled,
|
|
1556
1557
|
disabledClass: t.disabledClass
|
|
1557
|
-
})),
|
|
1558
|
-
...
|
|
1559
|
-
class: [ce,
|
|
1558
|
+
})), P = g(() => ({
|
|
1559
|
+
...n,
|
|
1560
|
+
class: [ce, n.class],
|
|
1560
1561
|
modelValue: t.modelValue,
|
|
1561
1562
|
disabled: t.disabled,
|
|
1562
1563
|
disabledClass: t.disabledClass
|
|
1563
|
-
})),
|
|
1564
|
-
...
|
|
1565
|
-
class: [ce,
|
|
1564
|
+
})), v = g(() => ({
|
|
1565
|
+
...n,
|
|
1566
|
+
class: [ce, n.class],
|
|
1566
1567
|
modelValue: t.modelValue,
|
|
1567
1568
|
withTimestamp: t.type === "datetime-local" || t.withTimestamp,
|
|
1568
1569
|
disabled: t.disabled,
|
|
1569
1570
|
disabledClass: t.disabledClass
|
|
1570
|
-
})),
|
|
1571
|
-
const
|
|
1572
|
-
...
|
|
1573
|
-
class: [ce,
|
|
1571
|
+
})), E = g(() => {
|
|
1572
|
+
const K = {
|
|
1573
|
+
...n,
|
|
1574
|
+
class: [ce, n.class],
|
|
1574
1575
|
modelValue: t.modelValue,
|
|
1575
1576
|
modelModifiers: t.modelModifiers,
|
|
1576
1577
|
options: t.options,
|
|
@@ -1583,99 +1584,99 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1583
1584
|
deletedKey: t.deletedKey,
|
|
1584
1585
|
optionLabel: t.optionLabel
|
|
1585
1586
|
};
|
|
1586
|
-
return t.baseClass !== void 0 && (
|
|
1587
|
-
}),
|
|
1588
|
-
...
|
|
1587
|
+
return t.baseClass !== void 0 && (K.baseClass = t.baseClass), t.normalTextClass !== void 0 && (K.normalTextClass = t.normalTextClass), t.deletedSelectedClass !== void 0 && (K.deletedSelectedClass = t.deletedSelectedClass), t.optionClass !== void 0 && (K.optionClass = t.optionClass), t.deletedOptionClass !== void 0 && (K.deletedOptionClass = t.deletedOptionClass), t.placeholderClass !== void 0 && (K.placeholderClass = t.placeholderClass), K;
|
|
1588
|
+
}), N = g(() => ({
|
|
1589
|
+
...n,
|
|
1589
1590
|
modelValue: t.modelValue,
|
|
1590
1591
|
options: t.options,
|
|
1591
1592
|
disabled: t.disabled
|
|
1592
1593
|
})), X = g(() => ({
|
|
1593
|
-
...
|
|
1594
|
+
...n,
|
|
1594
1595
|
modelValue: t.modelValue,
|
|
1595
1596
|
options: t.options,
|
|
1596
1597
|
disabled: t.disabled
|
|
1597
1598
|
})), te = g(() => ({
|
|
1598
|
-
...
|
|
1599
|
+
...n,
|
|
1599
1600
|
modelValue: t.modelValue,
|
|
1600
1601
|
options: t.options,
|
|
1601
|
-
name: t.name ??
|
|
1602
|
+
name: t.name ?? n.name,
|
|
1602
1603
|
disabled: t.disabled
|
|
1603
1604
|
})), le = g(() => ({
|
|
1604
|
-
...
|
|
1605
|
+
...n,
|
|
1605
1606
|
modelValue: t.modelValue,
|
|
1606
|
-
label: t.label ||
|
|
1607
|
+
label: t.label || n.label || "",
|
|
1607
1608
|
disabled: t.disabled
|
|
1608
1609
|
})), se = g(() => ({
|
|
1609
|
-
...
|
|
1610
|
+
...n,
|
|
1610
1611
|
modelValue: t.modelValue,
|
|
1611
|
-
label: t.label ||
|
|
1612
|
-
name: t.name ??
|
|
1612
|
+
label: t.label || n.label || "",
|
|
1613
|
+
name: t.name ?? n.name,
|
|
1613
1614
|
disabled: t.disabled
|
|
1614
1615
|
})), ae = g(() => ({
|
|
1615
|
-
...
|
|
1616
|
-
accept: t.accept ??
|
|
1616
|
+
...n,
|
|
1617
|
+
accept: t.accept ?? n.accept ?? "image/*",
|
|
1617
1618
|
modelValue: t.modelValue,
|
|
1618
1619
|
currentImageUrl: t.currentImageUrl,
|
|
1619
1620
|
currentLabel: t.currentLabel,
|
|
1620
1621
|
currentSubtext: t.currentSubtext
|
|
1621
1622
|
}));
|
|
1622
|
-
return (
|
|
1623
|
+
return (K, T) => (s(), i("div", null, [
|
|
1623
1624
|
e.label && !f.value ? (s(), i("label", {
|
|
1624
1625
|
key: 0,
|
|
1625
|
-
for:
|
|
1626
|
+
for: _.value,
|
|
1626
1627
|
class: "text-base font-semibold text-gray-900 mb-1 block"
|
|
1627
|
-
},
|
|
1628
|
-
e.helperText && !f.value ? (s(), i("span",
|
|
1629
|
-
|
|
1630
|
-
"onUpdate:modelValue":
|
|
1631
|
-
onBlur:
|
|
1632
|
-
}), null, 16)) :
|
|
1633
|
-
"onUpdate:modelValue":
|
|
1634
|
-
onBlur:
|
|
1635
|
-
}), null, 16)) :
|
|
1636
|
-
"onUpdate:modelValue":
|
|
1637
|
-
onBlur:
|
|
1638
|
-
}), null, 16)) :
|
|
1639
|
-
"onUpdate:modelValue":
|
|
1640
|
-
onBlur:
|
|
1641
|
-
}), null, 16)) :
|
|
1642
|
-
"onUpdate:modelValue":
|
|
1643
|
-
onBlur:
|
|
1644
|
-
}), null, 16)) :
|
|
1645
|
-
"onUpdate:modelValue":
|
|
1646
|
-
onBlur:
|
|
1647
|
-
}), null, 16)) : m.value ? (s(),
|
|
1648
|
-
"onUpdate:modelValue":
|
|
1649
|
-
onBlur:
|
|
1650
|
-
}), null, 16)) :
|
|
1651
|
-
"onUpdate:modelValue":
|
|
1652
|
-
onBlur:
|
|
1653
|
-
}), null, 16)) :
|
|
1654
|
-
"onUpdate:modelValue":
|
|
1655
|
-
onBlur:
|
|
1656
|
-
}), null, 16)) :
|
|
1657
|
-
"onUpdate:modelValue":
|
|
1658
|
-
onBlur:
|
|
1659
|
-
}), null, 16)) :
|
|
1628
|
+
}, B(e.label), 9, kl)) : M("", !0),
|
|
1629
|
+
e.helperText && !f.value ? (s(), i("span", Sl, B(e.helperText), 1)) : M("", !0),
|
|
1630
|
+
z.value ? (s(), L(ze, R({ key: 2 }, P.value, {
|
|
1631
|
+
"onUpdate:modelValue": T[0] || (T[0] = (A) => l("update:modelValue", A)),
|
|
1632
|
+
onBlur: T[1] || (T[1] = (A) => l("blur", A))
|
|
1633
|
+
}), null, 16)) : Z.value ? (s(), L(Fe, R({ key: 3 }, E.value, {
|
|
1634
|
+
"onUpdate:modelValue": T[2] || (T[2] = (A) => l("update:modelValue", A)),
|
|
1635
|
+
onBlur: T[3] || (T[3] = (A) => l("blur", A))
|
|
1636
|
+
}), null, 16)) : D.value ? (s(), L(Re, R({ key: 4 }, v.value, {
|
|
1637
|
+
"onUpdate:modelValue": T[4] || (T[4] = (A) => l("update:modelValue", A)),
|
|
1638
|
+
onBlur: T[5] || (T[5] = (A) => l("blur", A))
|
|
1639
|
+
}), null, 16)) : U.value ? (s(), L(je, R({ key: 5 }, G.value, {
|
|
1640
|
+
"onUpdate:modelValue": T[6] || (T[6] = (A) => l("update:modelValue", A)),
|
|
1641
|
+
onBlur: T[7] || (T[7] = (A) => l("blur", A))
|
|
1642
|
+
}), null, 16)) : w.value ? (s(), L(Ne, R({ key: 6 }, ae.value, {
|
|
1643
|
+
"onUpdate:modelValue": T[8] || (T[8] = (A) => l("update:modelValue", A)),
|
|
1644
|
+
onBlur: T[9] || (T[9] = (A) => l("blur", A))
|
|
1645
|
+
}), null, 16)) : $.value ? (s(), L(Oe, R({ key: 7 }, le.value, {
|
|
1646
|
+
"onUpdate:modelValue": T[10] || (T[10] = (A) => l("update:modelValue", A)),
|
|
1647
|
+
onBlur: T[11] || (T[11] = (A) => l("blur", A))
|
|
1648
|
+
}), null, 16)) : m.value ? (s(), L(Ke, R({ key: 8 }, se.value, {
|
|
1649
|
+
"onUpdate:modelValue": T[12] || (T[12] = (A) => l("update:modelValue", A)),
|
|
1650
|
+
onBlur: T[13] || (T[13] = (A) => l("blur", A))
|
|
1651
|
+
}), null, 16)) : b.value ? (s(), L(Ue, R({ key: 9 }, N.value, {
|
|
1652
|
+
"onUpdate:modelValue": T[14] || (T[14] = (A) => l("update:modelValue", A)),
|
|
1653
|
+
onBlur: T[15] || (T[15] = (A) => l("blur", A))
|
|
1654
|
+
}), null, 16)) : x.value ? (s(), L(We, R({ key: 10 }, X.value, {
|
|
1655
|
+
"onUpdate:modelValue": T[16] || (T[16] = (A) => l("update:modelValue", A)),
|
|
1656
|
+
onBlur: T[17] || (T[17] = (A) => l("blur", A))
|
|
1657
|
+
}), null, 16)) : k.value ? (s(), L(He, R({ key: 11 }, te.value, {
|
|
1658
|
+
"onUpdate:modelValue": T[18] || (T[18] = (A) => l("update:modelValue", A)),
|
|
1659
|
+
onBlur: T[19] || (T[19] = (A) => l("blur", A))
|
|
1660
|
+
}), null, 16)) : q.value ? S(K.$slots, "unsupported-type", {
|
|
1660
1661
|
key: 12,
|
|
1661
1662
|
type: e.type,
|
|
1662
1663
|
modelValue: e.modelValue,
|
|
1663
|
-
updateValue:
|
|
1664
|
-
attrs:
|
|
1665
|
-
}) :
|
|
1664
|
+
updateValue: d,
|
|
1665
|
+
attrs: j(n)
|
|
1666
|
+
}) : S(K.$slots, "unsupported-type", {
|
|
1666
1667
|
key: 13,
|
|
1667
1668
|
type: e.type,
|
|
1668
1669
|
modelValue: e.modelValue,
|
|
1669
|
-
updateValue:
|
|
1670
|
-
attrs:
|
|
1670
|
+
updateValue: d,
|
|
1671
|
+
attrs: j(n)
|
|
1671
1672
|
}),
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
r("span", null,
|
|
1675
|
-
])) :
|
|
1673
|
+
u.value ? (s(), i("div", $l, [
|
|
1674
|
+
H(j(ot), { class: "mr-1 h-4 w-4 flex-shrink-0" }),
|
|
1675
|
+
r("span", null, B(e.errorMessage), 1)
|
|
1676
|
+
])) : M("", !0)
|
|
1676
1677
|
]));
|
|
1677
1678
|
}
|
|
1678
|
-
}),
|
|
1679
|
+
}), Cl = { class: "flex flex-wrap gap-3" }, We = {
|
|
1679
1680
|
__name: "CheckboxMultipleInput",
|
|
1680
1681
|
props: {
|
|
1681
1682
|
modelValue: {
|
|
@@ -1693,20 +1694,20 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1693
1694
|
},
|
|
1694
1695
|
emits: ["update:modelValue"],
|
|
1695
1696
|
setup(e, { emit: a }) {
|
|
1696
|
-
const t = a, l = e,
|
|
1697
|
-
const y = Array.isArray(l.modelValue) ? [...l.modelValue] : [],
|
|
1698
|
-
|
|
1697
|
+
const t = a, l = e, n = g(() => l.options.map((f) => f == null ? "" : String(f).trim()).filter((f) => f !== "")), d = (f) => Array.isArray(l.modelValue) && l.modelValue.includes(f), u = (f, _) => {
|
|
1698
|
+
const y = Array.isArray(l.modelValue) ? [...l.modelValue] : [], V = y.indexOf(f);
|
|
1699
|
+
_ && V === -1 ? y.push(f) : !_ && V !== -1 && y.splice(V, 1), t("update:modelValue", y);
|
|
1699
1700
|
};
|
|
1700
|
-
return (f,
|
|
1701
|
-
(s(!0), i(
|
|
1701
|
+
return (f, _) => (s(), i("div", Cl, [
|
|
1702
|
+
(s(!0), i(Q, null, Y(n.value, (y) => (s(), L(me, {
|
|
1702
1703
|
key: `checkbox-${y}`,
|
|
1703
1704
|
type: "checkbox-input",
|
|
1704
|
-
"model-value":
|
|
1705
|
+
"model-value": d(y),
|
|
1705
1706
|
value: !0,
|
|
1706
1707
|
"unchecked-value": !1,
|
|
1707
1708
|
label: y,
|
|
1708
1709
|
disabled: e.disabled,
|
|
1709
|
-
"onUpdate:modelValue": (
|
|
1710
|
+
"onUpdate:modelValue": (V) => u(y, V)
|
|
1710
1711
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]))), 128))
|
|
1711
1712
|
]));
|
|
1712
1713
|
}
|
|
@@ -1733,33 +1734,33 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1733
1734
|
},
|
|
1734
1735
|
emits: ["close"],
|
|
1735
1736
|
setup(e, { emit: a }) {
|
|
1736
|
-
const t = e, l = a,
|
|
1737
|
-
document.body.style.overflow = "hidden",
|
|
1737
|
+
const t = e, l = a, n = O(), d = O(t.show), u = () => {
|
|
1738
|
+
document.body.style.overflow = "hidden", d.value = !0, n.value?.showModal();
|
|
1738
1739
|
}, f = () => {
|
|
1739
1740
|
document.body.style.overflow = null, setTimeout(() => {
|
|
1740
|
-
|
|
1741
|
+
n.value?.close(), d.value = !1;
|
|
1741
1742
|
}, 200);
|
|
1742
1743
|
};
|
|
1743
|
-
|
|
1744
|
-
t.show ?
|
|
1744
|
+
J(() => t.show, () => {
|
|
1745
|
+
t.show ? u() : f();
|
|
1745
1746
|
}), ee(() => {
|
|
1746
|
-
t.show &&
|
|
1747
|
+
t.show && u();
|
|
1747
1748
|
});
|
|
1748
|
-
const
|
|
1749
|
+
const _ = () => {
|
|
1749
1750
|
t.closeable && l("close");
|
|
1750
|
-
}, y = (
|
|
1751
|
-
|
|
1751
|
+
}, y = (b) => {
|
|
1752
|
+
b.key === "Escape" && (b.preventDefault(), t.show && _());
|
|
1752
1753
|
};
|
|
1753
1754
|
ee(() => document.addEventListener("keydown", y)), Ae(() => {
|
|
1754
1755
|
document.removeEventListener("keydown", y), document.body.style.overflow = null;
|
|
1755
1756
|
});
|
|
1756
|
-
const
|
|
1757
|
+
const V = g(() => ({
|
|
1757
1758
|
sm: "sm:max-w-sm",
|
|
1758
1759
|
md: "sm:max-w-md",
|
|
1759
1760
|
lg: "sm:max-w-lg",
|
|
1760
1761
|
xl: "sm:max-w-xl",
|
|
1761
1762
|
"2xl": "sm:max-w-2xl"
|
|
1762
|
-
})[t.maxWidth]),
|
|
1763
|
+
})[t.maxWidth]), w = g(() => {
|
|
1763
1764
|
switch (t.position) {
|
|
1764
1765
|
case "top":
|
|
1765
1766
|
return "flex-col items-center pt-16";
|
|
@@ -1769,15 +1770,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1769
1770
|
return "items-center justify-center";
|
|
1770
1771
|
}
|
|
1771
1772
|
});
|
|
1772
|
-
return (
|
|
1773
|
+
return (b, $) => (s(), i("dialog", {
|
|
1773
1774
|
class: "z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent",
|
|
1774
1775
|
ref_key: "dialog",
|
|
1775
|
-
ref:
|
|
1776
|
+
ref: n
|
|
1776
1777
|
}, [
|
|
1777
1778
|
r("div", {
|
|
1778
|
-
class:
|
|
1779
|
+
class: C(["fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50 flex", w.value])
|
|
1779
1780
|
}, [
|
|
1780
|
-
|
|
1781
|
+
H(re, {
|
|
1781
1782
|
"enter-active-class": "ease-out duration-300",
|
|
1782
1783
|
"enter-from-class": "opacity-0",
|
|
1783
1784
|
"enter-to-class": "opacity-100",
|
|
@@ -1785,19 +1786,19 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1785
1786
|
"leave-from-class": "opacity-100",
|
|
1786
1787
|
"leave-to-class": "opacity-0"
|
|
1787
1788
|
}, {
|
|
1788
|
-
default:
|
|
1789
|
-
|
|
1789
|
+
default: F(() => [
|
|
1790
|
+
ne(r("div", {
|
|
1790
1791
|
class: "fixed inset-0 z-40 transform transition-all",
|
|
1791
|
-
onClick:
|
|
1792
|
-
}, [
|
|
1792
|
+
onClick: _
|
|
1793
|
+
}, [...$[0] || ($[0] = [
|
|
1793
1794
|
r("div", { class: "absolute inset-0 bg-gray-500 opacity-75" }, null, -1)
|
|
1794
1795
|
])], 512), [
|
|
1795
|
-
[
|
|
1796
|
+
[de, e.show]
|
|
1796
1797
|
])
|
|
1797
1798
|
]),
|
|
1798
1799
|
_: 1
|
|
1799
1800
|
}),
|
|
1800
|
-
|
|
1801
|
+
H(re, {
|
|
1801
1802
|
"enter-active-class": "ease-out duration-300",
|
|
1802
1803
|
"enter-from-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
1803
1804
|
"enter-to-class": "opacity-100 translate-y-0 sm:scale-100",
|
|
@@ -1805,13 +1806,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1805
1806
|
"leave-from-class": "opacity-100 translate-y-0 sm:scale-100",
|
|
1806
1807
|
"leave-to-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1807
1808
|
}, {
|
|
1808
|
-
default:
|
|
1809
|
-
|
|
1810
|
-
class:
|
|
1809
|
+
default: F(() => [
|
|
1810
|
+
ne(r("div", {
|
|
1811
|
+
class: C(["relative z-50 mb-6 bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto", V.value])
|
|
1811
1812
|
}, [
|
|
1812
|
-
|
|
1813
|
+
d.value ? S(b.$slots, "default", { key: 0 }) : M("", !0)
|
|
1813
1814
|
], 2), [
|
|
1814
|
-
[
|
|
1815
|
+
[de, e.show]
|
|
1815
1816
|
])
|
|
1816
1817
|
]),
|
|
1817
1818
|
_: 3
|
|
@@ -1819,7 +1820,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1819
1820
|
], 2)
|
|
1820
1821
|
], 512));
|
|
1821
1822
|
}
|
|
1822
|
-
},
|
|
1823
|
+
}, Vl = { class: "bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4" }, _l = { class: "sm:flex sm:items-start" }, Tl = { class: "mx-auto shrink-0 flex items-center justify-center size-12 rounded-full bg-red-100 sm:mx-0 sm:size-10" }, Al = { class: "mt-3 text-center sm:mt-0 sm:ms-4 sm:text-start" }, Bl = { class: "text-lg font-medium text-gray-900" }, Ll = { class: "mt-4 text-sm text-gray-600" }, Il = { 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" }, Ml = {
|
|
1823
1824
|
__name: "ConfirmationModal",
|
|
1824
1825
|
props: {
|
|
1825
1826
|
show: {
|
|
@@ -1845,37 +1846,37 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1845
1846
|
const t = a, l = () => {
|
|
1846
1847
|
t("close");
|
|
1847
1848
|
};
|
|
1848
|
-
return (
|
|
1849
|
+
return (n, d) => (s(), L($e, {
|
|
1849
1850
|
show: e.show,
|
|
1850
1851
|
"max-width": e.maxWidth,
|
|
1851
1852
|
closeable: e.closeable,
|
|
1852
1853
|
position: e.position,
|
|
1853
1854
|
onClose: l
|
|
1854
1855
|
}, {
|
|
1855
|
-
default:
|
|
1856
|
-
r("div",
|
|
1857
|
-
r("div",
|
|
1858
|
-
r("div",
|
|
1859
|
-
|
|
1856
|
+
default: F(() => [
|
|
1857
|
+
r("div", Vl, [
|
|
1858
|
+
r("div", _l, [
|
|
1859
|
+
r("div", Tl, [
|
|
1860
|
+
H(j(Le), { class: "size-6 text-red-600" })
|
|
1860
1861
|
]),
|
|
1861
|
-
r("div",
|
|
1862
|
-
r("h3",
|
|
1863
|
-
|
|
1862
|
+
r("div", Al, [
|
|
1863
|
+
r("h3", Bl, [
|
|
1864
|
+
S(n.$slots, "title")
|
|
1864
1865
|
]),
|
|
1865
|
-
r("div",
|
|
1866
|
-
|
|
1866
|
+
r("div", Ll, [
|
|
1867
|
+
S(n.$slots, "content")
|
|
1867
1868
|
])
|
|
1868
1869
|
])
|
|
1869
1870
|
])
|
|
1870
1871
|
]),
|
|
1871
|
-
r("div",
|
|
1872
|
-
|
|
1872
|
+
r("div", Il, [
|
|
1873
|
+
S(n.$slots, "footer")
|
|
1873
1874
|
])
|
|
1874
1875
|
]),
|
|
1875
1876
|
_: 3
|
|
1876
1877
|
}, 8, ["show", "max-width", "closeable", "position"]));
|
|
1877
1878
|
}
|
|
1878
|
-
},
|
|
1879
|
+
}, Dl = { class: "px-6 py-4" }, Ol = { class: "text-lg font-medium text-gray-900" }, jl = { class: "mt-4 text-sm text-gray-600" }, zl = { class: "flex flex-row justify-end px-6 py-4 bg-gray-100 text-end" }, El = {
|
|
1879
1880
|
__name: "DialogModal",
|
|
1880
1881
|
props: {
|
|
1881
1882
|
show: {
|
|
@@ -1896,29 +1897,29 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1896
1897
|
const t = a, l = () => {
|
|
1897
1898
|
t("close");
|
|
1898
1899
|
};
|
|
1899
|
-
return (
|
|
1900
|
+
return (n, d) => (s(), L($e, {
|
|
1900
1901
|
show: e.show,
|
|
1901
1902
|
"max-width": e.maxWidth,
|
|
1902
1903
|
closeable: e.closeable,
|
|
1903
1904
|
onClose: l
|
|
1904
1905
|
}, {
|
|
1905
|
-
default:
|
|
1906
|
-
r("div",
|
|
1906
|
+
default: F(() => [
|
|
1907
|
+
r("div", Dl, [
|
|
1907
1908
|
r("div", Ol, [
|
|
1908
|
-
|
|
1909
|
+
S(n.$slots, "title")
|
|
1909
1910
|
]),
|
|
1910
|
-
r("div",
|
|
1911
|
-
|
|
1911
|
+
r("div", jl, [
|
|
1912
|
+
S(n.$slots, "content")
|
|
1912
1913
|
])
|
|
1913
1914
|
]),
|
|
1914
|
-
r("div",
|
|
1915
|
-
|
|
1915
|
+
r("div", zl, [
|
|
1916
|
+
S(n.$slots, "footer")
|
|
1916
1917
|
])
|
|
1917
1918
|
]),
|
|
1918
1919
|
_: 3
|
|
1919
1920
|
}, 8, ["show", "max-width", "closeable"]));
|
|
1920
1921
|
}
|
|
1921
|
-
},
|
|
1922
|
+
}, Fl = { class: "relative inline-block w-fit" }, Rl = {
|
|
1922
1923
|
__name: "Dropdown",
|
|
1923
1924
|
props: {
|
|
1924
1925
|
align: {
|
|
@@ -1935,59 +1936,104 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1935
1936
|
}
|
|
1936
1937
|
},
|
|
1937
1938
|
setup(e) {
|
|
1938
|
-
const a = e
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1939
|
+
const a = e, t = O(!1), l = O(null), n = O(null), d = O({
|
|
1940
|
+
position: "fixed",
|
|
1941
|
+
left: "0px",
|
|
1942
|
+
top: "0px",
|
|
1943
|
+
visibility: "hidden"
|
|
1944
|
+
}), u = O("ltr:origin-top-right rtl:origin-top-left");
|
|
1945
|
+
let f = null;
|
|
1946
|
+
const _ = (x) => {
|
|
1947
|
+
t.value && x.key === "Escape" && (t.value = !1);
|
|
1948
|
+
}, y = (x, k) => {
|
|
1949
|
+
const D = x ? "ltr:origin-top-right rtl:origin-top-left" : "ltr:origin-top-left rtl:origin-top-right";
|
|
1950
|
+
u.value = `${D} ${k ? "origin-bottom" : "origin-top"}`;
|
|
1951
|
+
}, V = g(() => ({
|
|
1945
1952
|
48: "w-48"
|
|
1946
|
-
})[a.width.toString()]),
|
|
1947
|
-
|
|
1953
|
+
})[a.width.toString()]), w = g(() => u.value), b = () => {
|
|
1954
|
+
if (!l.value || !n.value)
|
|
1955
|
+
return;
|
|
1956
|
+
const x = l.value.getBoundingClientRect(), k = window.innerWidth, D = window.innerHeight, z = n.value.offsetWidth, Z = n.value.offsetHeight, U = 8, q = x.left - U, G = k - x.right - U;
|
|
1957
|
+
let P = a.align === "right";
|
|
1958
|
+
P && x.right + z > k - U && q > G ? P = !1 : !P && x.left + z > k - U && G > q && (P = !0);
|
|
1959
|
+
let v = P ? x.right - z : x.left;
|
|
1960
|
+
v = Math.max(U, Math.min(v, k - z - U));
|
|
1961
|
+
const E = D - x.bottom - U, N = x.top - U, X = E < Z && N > E;
|
|
1962
|
+
d.value = {
|
|
1963
|
+
position: "fixed",
|
|
1964
|
+
left: `${v}px`,
|
|
1965
|
+
...X ? { bottom: `${D - x.top + U}px` } : { top: `${x.bottom + U}px` },
|
|
1966
|
+
zIndex: "9999",
|
|
1967
|
+
maxHeight: `${Math.max(Math.min(X ? N : E, 320), 160)}px`
|
|
1968
|
+
}, y(P, X);
|
|
1969
|
+
}, $ = async () => {
|
|
1970
|
+
t.value && (f !== null && (cancelAnimationFrame(f), f = null), d.value = {
|
|
1971
|
+
...d.value,
|
|
1972
|
+
visibility: "hidden"
|
|
1973
|
+
}, await fe(), b(), f = requestAnimationFrame(() => {
|
|
1974
|
+
t.value && (d.value = {
|
|
1975
|
+
...d.value,
|
|
1976
|
+
visibility: "visible"
|
|
1977
|
+
});
|
|
1978
|
+
}));
|
|
1979
|
+
}, m = () => {
|
|
1980
|
+
t.value && b();
|
|
1981
|
+
};
|
|
1982
|
+
return J(t, (x) => {
|
|
1983
|
+
x && $();
|
|
1984
|
+
}), ee(() => {
|
|
1985
|
+
document.addEventListener("keydown", _), window.addEventListener("resize", m), window.addEventListener("scroll", m, !0);
|
|
1986
|
+
}), Ae(() => {
|
|
1987
|
+
f !== null && cancelAnimationFrame(f), document.removeEventListener("keydown", _), window.removeEventListener("resize", m), window.removeEventListener("scroll", m, !0);
|
|
1988
|
+
}), (x, k) => (s(), i("div", Fl, [
|
|
1948
1989
|
r("div", {
|
|
1949
|
-
|
|
1990
|
+
ref_key: "triggerRef",
|
|
1991
|
+
ref: l,
|
|
1992
|
+
onClick: k[0] || (k[0] = (D) => t.value = !t.value)
|
|
1950
1993
|
}, [
|
|
1951
|
-
|
|
1952
|
-
]),
|
|
1953
|
-
|
|
1994
|
+
S(x.$slots, "trigger", { open: t.value })
|
|
1995
|
+
], 512),
|
|
1996
|
+
ne(r("div", {
|
|
1954
1997
|
class: "fixed inset-0 z-40",
|
|
1955
|
-
onClick:
|
|
1998
|
+
onClick: k[1] || (k[1] = (D) => t.value = !1)
|
|
1956
1999
|
}, null, 512), [
|
|
1957
|
-
[
|
|
2000
|
+
[de, t.value]
|
|
1958
2001
|
]),
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
2002
|
+
(s(), L(Te, { to: "body" }, [
|
|
2003
|
+
H(re, {
|
|
2004
|
+
"enter-active-class": "transition-opacity duration-150 ease-out",
|
|
2005
|
+
"enter-from-class": "opacity-0",
|
|
2006
|
+
"enter-to-class": "opacity-100",
|
|
2007
|
+
"leave-active-class": "transition-opacity duration-100 ease-in",
|
|
2008
|
+
"leave-from-class": "opacity-100",
|
|
2009
|
+
"leave-to-class": "opacity-0"
|
|
2010
|
+
}, {
|
|
2011
|
+
default: F(() => [
|
|
2012
|
+
t.value ? (s(), i("div", {
|
|
2013
|
+
key: 0,
|
|
2014
|
+
ref_key: "menuRef",
|
|
2015
|
+
ref: n,
|
|
2016
|
+
class: C(["z-50 rounded-xl shadow-xl shadow-gray-900/10", [V.value, w.value]]),
|
|
2017
|
+
style: he(d.value),
|
|
2018
|
+
onClick: k[2] || (k[2] = (D) => t.value = !1)
|
|
1975
2019
|
}, [
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
2020
|
+
r("div", {
|
|
2021
|
+
class: C(["rounded-xl ring-1 ring-gray-200/60 backdrop-blur-sm bg-white/95", e.contentClasses])
|
|
2022
|
+
}, [
|
|
2023
|
+
S(x.$slots, "content")
|
|
2024
|
+
], 2)
|
|
2025
|
+
], 6)) : M("", !0)
|
|
2026
|
+
]),
|
|
2027
|
+
_: 3
|
|
2028
|
+
})
|
|
2029
|
+
]))
|
|
1984
2030
|
]));
|
|
1985
2031
|
}
|
|
1986
|
-
},
|
|
2032
|
+
}, Nl = {
|
|
1987
2033
|
key: 0,
|
|
1988
2034
|
type: "submit",
|
|
1989
2035
|
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"
|
|
1990
|
-
},
|
|
2036
|
+
}, Ul = ["href"], Kl = {
|
|
1991
2037
|
__name: "DropdownLink",
|
|
1992
2038
|
props: {
|
|
1993
2039
|
href: String,
|
|
@@ -1995,87 +2041,87 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1995
2041
|
},
|
|
1996
2042
|
setup(e) {
|
|
1997
2043
|
return (a, t) => (s(), i("div", null, [
|
|
1998
|
-
e.as == "button" ? (s(), i("button",
|
|
1999
|
-
|
|
2044
|
+
e.as == "button" ? (s(), i("button", Nl, [
|
|
2045
|
+
S(a.$slots, "default")
|
|
2000
2046
|
])) : e.as == "a" ? (s(), i("a", {
|
|
2001
2047
|
key: 1,
|
|
2002
2048
|
href: e.href,
|
|
2003
2049
|
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"
|
|
2004
2050
|
}, [
|
|
2005
|
-
|
|
2006
|
-
], 8,
|
|
2051
|
+
S(a.$slots, "default")
|
|
2052
|
+
], 8, Ul)) : (s(), L(j(pe), {
|
|
2007
2053
|
key: 2,
|
|
2008
2054
|
href: e.href,
|
|
2009
2055
|
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"
|
|
2010
2056
|
}, {
|
|
2011
|
-
default:
|
|
2012
|
-
|
|
2057
|
+
default: F(() => [
|
|
2058
|
+
S(a.$slots, "default")
|
|
2013
2059
|
]),
|
|
2014
2060
|
_: 3
|
|
2015
2061
|
}, 8, ["href"]))
|
|
2016
2062
|
]));
|
|
2017
2063
|
}
|
|
2018
|
-
},
|
|
2064
|
+
}, Hl = { class: "md:grid md:grid-cols-3 md:gap-6" }, Wl = { class: "mt-5 md:mt-0 md:col-span-2 shadow sm:rounded-lg" }, Pl = { class: "grid grid-cols-6 gap-6" }, ql = {
|
|
2019
2065
|
key: 0,
|
|
2020
2066
|
class: "flex items-center justify-start px-3 pb-6 bg-white text-end sm:rounded-bl-md sm:rounded-br-md"
|
|
2021
|
-
},
|
|
2067
|
+
}, Gl = {
|
|
2022
2068
|
__name: "FormSection",
|
|
2023
2069
|
emits: ["submitted"],
|
|
2024
2070
|
setup(e) {
|
|
2025
|
-
const a = g(() => !!
|
|
2026
|
-
return (t, l) => (s(), i("div",
|
|
2027
|
-
|
|
2028
|
-
title:
|
|
2029
|
-
|
|
2071
|
+
const a = g(() => !!ge().actions);
|
|
2072
|
+
return (t, l) => (s(), i("div", Hl, [
|
|
2073
|
+
H(Se, null, {
|
|
2074
|
+
title: F(() => [
|
|
2075
|
+
S(t.$slots, "title")
|
|
2030
2076
|
]),
|
|
2031
|
-
description:
|
|
2032
|
-
|
|
2077
|
+
description: F(() => [
|
|
2078
|
+
S(t.$slots, "description")
|
|
2033
2079
|
]),
|
|
2034
2080
|
_: 3
|
|
2035
2081
|
}),
|
|
2036
|
-
r("div",
|
|
2082
|
+
r("div", Wl, [
|
|
2037
2083
|
r("form", {
|
|
2038
|
-
onSubmit: l[0] || (l[0] =
|
|
2084
|
+
onSubmit: l[0] || (l[0] = ye((n) => t.$emit("submitted"), ["prevent"]))
|
|
2039
2085
|
}, [
|
|
2040
2086
|
r("div", {
|
|
2041
|
-
class:
|
|
2087
|
+
class: C(["px-4 py-5 bg-white sm:p-6", a.value ? "sm:rounded-tl-md sm:rounded-tr-md" : "sm:rounded-md"])
|
|
2042
2088
|
}, [
|
|
2043
|
-
r("div",
|
|
2044
|
-
|
|
2089
|
+
r("div", Pl, [
|
|
2090
|
+
S(t.$slots, "form")
|
|
2045
2091
|
])
|
|
2046
2092
|
], 2),
|
|
2047
|
-
a.value ? (s(), i("div",
|
|
2048
|
-
|
|
2049
|
-
])) :
|
|
2093
|
+
a.value ? (s(), i("div", ql, [
|
|
2094
|
+
S(t.$slots, "actions")
|
|
2095
|
+
])) : M("", !0)
|
|
2050
2096
|
], 32)
|
|
2051
2097
|
])
|
|
2052
2098
|
]));
|
|
2053
2099
|
}
|
|
2054
|
-
},
|
|
2100
|
+
}, Xl = { class: "text-sm text-red-600" }, Ql = {
|
|
2055
2101
|
__name: "InputError",
|
|
2056
2102
|
props: {
|
|
2057
2103
|
message: String
|
|
2058
2104
|
},
|
|
2059
2105
|
setup(e) {
|
|
2060
|
-
return (a, t) =>
|
|
2061
|
-
r("p",
|
|
2106
|
+
return (a, t) => ne((s(), i("div", null, [
|
|
2107
|
+
r("p", Xl, B(e.message), 1)
|
|
2062
2108
|
], 512)), [
|
|
2063
|
-
[
|
|
2109
|
+
[de, e.message]
|
|
2064
2110
|
]);
|
|
2065
2111
|
}
|
|
2066
|
-
},
|
|
2112
|
+
}, Yl = { class: "block font-medium text-sm text-gray-700" }, Jl = { key: 0 }, Zl = { key: 1 }, es = {
|
|
2067
2113
|
__name: "InputLabel",
|
|
2068
2114
|
props: {
|
|
2069
2115
|
value: String
|
|
2070
2116
|
},
|
|
2071
2117
|
setup(e) {
|
|
2072
|
-
return (a, t) => (s(), i("label",
|
|
2073
|
-
e.value ? (s(), i("span",
|
|
2074
|
-
|
|
2118
|
+
return (a, t) => (s(), i("label", Yl, [
|
|
2119
|
+
e.value ? (s(), i("span", Jl, B(e.value), 1)) : (s(), i("span", Zl, [
|
|
2120
|
+
S(a.$slots, "default")
|
|
2075
2121
|
]))
|
|
2076
2122
|
]));
|
|
2077
2123
|
}
|
|
2078
|
-
},
|
|
2124
|
+
}, ts = ["href", "title", "target", "rel"], Ce = /* @__PURE__ */ Object.assign({
|
|
2079
2125
|
inheritAttrs: !1
|
|
2080
2126
|
}, {
|
|
2081
2127
|
__name: "LinkButton",
|
|
@@ -2106,37 +2152,38 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2106
2152
|
}
|
|
2107
2153
|
},
|
|
2108
2154
|
setup(e) {
|
|
2109
|
-
const a =
|
|
2155
|
+
const a = oe(), t = e, l = {
|
|
2110
2156
|
primary: "bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-[0_6px_14px_rgba(37,99,235,0.14)] hover:from-blue-600 hover:to-blue-700 hover:shadow-[0_8px_18px_rgba(37,99,235,0.18)] focus:ring-blue-500",
|
|
2157
|
+
success: "bg-gradient-to-r from-green-500 to-green-600 text-white shadow-[0_6px_14px_rgba(34,197,94,0.14)] hover:from-green-600 hover:to-green-700 hover:shadow-[0_8px_18px_rgba(34,197,94,0.18)] focus:ring-green-500",
|
|
2111
2158
|
secondary: "bg-gradient-to-r from-slate-700 to-slate-800 text-white shadow-[0_8px_18px_rgba(15,23,42,0.16)] hover:from-slate-800 hover:to-slate-900 hover:shadow-[0_10px_22px_rgba(15,23,42,0.22)] focus:ring-slate-500",
|
|
2112
2159
|
tertiary: "border border-slate-300 bg-white text-slate-700 shadow-sm hover:bg-slate-50 hover:border-slate-400 hover:shadow focus:ring-slate-500",
|
|
2113
2160
|
warning: "border border-amber-300 bg-amber-50 text-amber-800 shadow-sm hover:bg-amber-100 focus:ring-amber-500",
|
|
2114
2161
|
danger: "border border-rose-300 bg-rose-50 text-rose-700 shadow-sm hover:bg-rose-100 focus:ring-rose-500"
|
|
2115
|
-
},
|
|
2162
|
+
}, n = g(() => l[t.variant] ? t.variant : "primary"), d = g(() => [
|
|
2116
2163
|
"min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-semibold tracking-tight transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-slate-50",
|
|
2117
|
-
l[
|
|
2164
|
+
l[n.value],
|
|
2118
2165
|
a.class
|
|
2119
2166
|
]);
|
|
2120
|
-
return (
|
|
2167
|
+
return (u, f) => e.external ? (s(), i("a", R({ key: 1 }, j(a), {
|
|
2121
2168
|
href: e.href,
|
|
2122
2169
|
title: e.title,
|
|
2123
2170
|
target: e.target,
|
|
2124
2171
|
rel: e.rel,
|
|
2125
|
-
class:
|
|
2172
|
+
class: d.value
|
|
2126
2173
|
}), [
|
|
2127
|
-
|
|
2128
|
-
], 16,
|
|
2174
|
+
S(u.$slots, "default")
|
|
2175
|
+
], 16, ts)) : (s(), L(j(pe), R({ key: 0 }, j(a), {
|
|
2129
2176
|
href: e.href,
|
|
2130
2177
|
title: e.title,
|
|
2131
|
-
class:
|
|
2178
|
+
class: d.value
|
|
2132
2179
|
}), {
|
|
2133
|
-
default:
|
|
2134
|
-
|
|
2180
|
+
default: F(() => [
|
|
2181
|
+
S(u.$slots, "default")
|
|
2135
2182
|
]),
|
|
2136
2183
|
_: 3
|
|
2137
2184
|
}, 16, ["href", "title", "class"]));
|
|
2138
2185
|
}
|
|
2139
|
-
}),
|
|
2186
|
+
}), ls = {
|
|
2140
2187
|
__name: "NavLink",
|
|
2141
2188
|
props: {
|
|
2142
2189
|
href: String,
|
|
@@ -2144,17 +2191,17 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2144
2191
|
},
|
|
2145
2192
|
setup(e) {
|
|
2146
2193
|
const a = e, t = g(() => 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");
|
|
2147
|
-
return (l,
|
|
2194
|
+
return (l, n) => (s(), L(j(pe), {
|
|
2148
2195
|
href: e.href,
|
|
2149
|
-
class:
|
|
2196
|
+
class: C(t.value)
|
|
2150
2197
|
}, {
|
|
2151
|
-
default:
|
|
2152
|
-
|
|
2198
|
+
default: F(() => [
|
|
2199
|
+
S(l.$slots, "default")
|
|
2153
2200
|
]),
|
|
2154
2201
|
_: 3
|
|
2155
2202
|
}, 8, ["href", "class"]));
|
|
2156
2203
|
}
|
|
2157
|
-
},
|
|
2204
|
+
}, ss = ["href"], as = {
|
|
2158
2205
|
__name: "ResponsiveNavLink",
|
|
2159
2206
|
props: {
|
|
2160
2207
|
active: Boolean,
|
|
@@ -2163,40 +2210,40 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2163
2210
|
},
|
|
2164
2211
|
setup(e) {
|
|
2165
2212
|
const a = e, t = g(() => 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");
|
|
2166
|
-
return (l,
|
|
2213
|
+
return (l, n) => (s(), i("div", null, [
|
|
2167
2214
|
e.as == "button" ? (s(), i("button", {
|
|
2168
2215
|
key: 0,
|
|
2169
|
-
class:
|
|
2216
|
+
class: C([t.value, "w-full text-start"])
|
|
2170
2217
|
}, [
|
|
2171
|
-
|
|
2218
|
+
S(l.$slots, "default")
|
|
2172
2219
|
], 2)) : e.as == "a" ? (s(), i("a", {
|
|
2173
2220
|
key: 1,
|
|
2174
|
-
class:
|
|
2221
|
+
class: C([t.value, "w-full text-start"]),
|
|
2175
2222
|
href: e.href
|
|
2176
2223
|
}, [
|
|
2177
|
-
|
|
2178
|
-
], 10,
|
|
2224
|
+
S(l.$slots, "default")
|
|
2225
|
+
], 10, ss)) : (s(), L(j(pe), {
|
|
2179
2226
|
key: 2,
|
|
2180
2227
|
href: e.href,
|
|
2181
|
-
class:
|
|
2228
|
+
class: C(t.value)
|
|
2182
2229
|
}, {
|
|
2183
|
-
default:
|
|
2184
|
-
|
|
2230
|
+
default: F(() => [
|
|
2231
|
+
S(l.$slots, "default")
|
|
2185
2232
|
]),
|
|
2186
2233
|
_: 3
|
|
2187
2234
|
}, 8, ["href", "class"]))
|
|
2188
2235
|
]));
|
|
2189
2236
|
}
|
|
2190
|
-
},
|
|
2237
|
+
}, ns = { class: "hidden sm:block" }, os = { class: "py-8" }, rs = {
|
|
2191
2238
|
__name: "SectionBorder",
|
|
2192
2239
|
setup(e) {
|
|
2193
|
-
return (a, t) => (s(), i("div",
|
|
2194
|
-
r("div",
|
|
2195
|
-
|
|
2240
|
+
return (a, t) => (s(), i("div", ns, [
|
|
2241
|
+
r("div", os, [
|
|
2242
|
+
H(we)
|
|
2196
2243
|
])
|
|
2197
2244
|
]));
|
|
2198
2245
|
}
|
|
2199
|
-
},
|
|
2246
|
+
}, is = { class: "bg-white/80 backdrop-blur-sm border border-gray-200/60 rounded-xl px-6 py-4" }, ds = { class: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4" }, us = { class: "flex items-center gap-3" }, cs = { class: "text-sm font-medium text-gray-700" }, fs = { class: "flex flex-wrap items-center gap-2" }, gs = ["onClick"], ps = { class: "text-xs text-gray-500" }, ms = {
|
|
2200
2247
|
__name: "SortControls",
|
|
2201
2248
|
props: {
|
|
2202
2249
|
fields: {
|
|
@@ -2230,39 +2277,39 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2230
2277
|
},
|
|
2231
2278
|
emits: ["sort"],
|
|
2232
2279
|
setup(e, { emit: a }) {
|
|
2233
|
-
const t = a, l = (
|
|
2234
|
-
t("sort",
|
|
2280
|
+
const t = a, l = (n) => {
|
|
2281
|
+
t("sort", n);
|
|
2235
2282
|
};
|
|
2236
|
-
return (
|
|
2237
|
-
r("div",
|
|
2238
|
-
r("div",
|
|
2239
|
-
r("label",
|
|
2240
|
-
r("div",
|
|
2241
|
-
(s(!0), i(
|
|
2242
|
-
key:
|
|
2243
|
-
onClick: (f) => l(
|
|
2244
|
-
class:
|
|
2283
|
+
return (n, d) => (s(), i("div", is, [
|
|
2284
|
+
r("div", ds, [
|
|
2285
|
+
r("div", us, [
|
|
2286
|
+
r("label", cs, B(e.sortByLabel) + ":", 1),
|
|
2287
|
+
r("div", fs, [
|
|
2288
|
+
(s(!0), i(Q, null, Y(e.fields, (u) => (s(), i("button", {
|
|
2289
|
+
key: u.key,
|
|
2290
|
+
onClick: (f) => l(u.key),
|
|
2291
|
+
class: C([
|
|
2245
2292
|
"px-3 py-1.5 text-sm font-medium rounded-lg transition-all duration-200",
|
|
2246
|
-
e.currentSortField ===
|
|
2293
|
+
e.currentSortField === u.key ? "bg-blue-500 text-white shadow-sm" : "bg-gray-100 text-gray-700 hover:bg-gray-200"
|
|
2247
2294
|
])
|
|
2248
2295
|
}, [
|
|
2249
|
-
ue(
|
|
2250
|
-
e.currentSortField ===
|
|
2296
|
+
ue(B(u.label) + " ", 1),
|
|
2297
|
+
e.currentSortField === u.key && e.currentDirection === "asc" ? (s(), L(j(Ie), {
|
|
2251
2298
|
key: 0,
|
|
2252
2299
|
class: "w-3 h-3 ml-1 inline"
|
|
2253
|
-
})) :
|
|
2254
|
-
e.currentSortField ===
|
|
2300
|
+
})) : M("", !0),
|
|
2301
|
+
e.currentSortField === u.key && e.currentDirection === "desc" ? (s(), L(j(xe), {
|
|
2255
2302
|
key: 1,
|
|
2256
2303
|
class: "w-3 h-3 ml-1 inline"
|
|
2257
|
-
})) :
|
|
2258
|
-
], 10,
|
|
2304
|
+
})) : M("", !0)
|
|
2305
|
+
], 10, gs))), 128))
|
|
2259
2306
|
])
|
|
2260
2307
|
]),
|
|
2261
|
-
r("div",
|
|
2308
|
+
r("div", ps, B(e.count) + " " + B(e.countLabel), 1)
|
|
2262
2309
|
])
|
|
2263
2310
|
]));
|
|
2264
2311
|
}
|
|
2265
|
-
},
|
|
2312
|
+
}, bs = { class: "flex items-center space-x-1" }, ys = { class: "flex flex-col" }, Ve = {
|
|
2266
2313
|
__name: "ThSortable",
|
|
2267
2314
|
props: {
|
|
2268
2315
|
field: {
|
|
@@ -2280,43 +2327,43 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2280
2327
|
},
|
|
2281
2328
|
setup(e) {
|
|
2282
2329
|
const a = e, t = g(() => a.field === a.currentSortField), l = g(() => t.value ? "text-blue-600" : "text-gray-400");
|
|
2283
|
-
return (
|
|
2330
|
+
return (n, d) => (s(), i("th", {
|
|
2284
2331
|
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",
|
|
2285
|
-
onClick:
|
|
2332
|
+
onClick: d[0] || (d[0] = (u) => n.$emit("sort", e.field))
|
|
2286
2333
|
}, [
|
|
2287
|
-
r("div",
|
|
2334
|
+
r("div", bs, [
|
|
2288
2335
|
r("span", null, [
|
|
2289
|
-
|
|
2336
|
+
S(n.$slots, "default")
|
|
2290
2337
|
]),
|
|
2291
|
-
r("div",
|
|
2292
|
-
t.value && e.currentDirection === "asc" ? (s(),
|
|
2338
|
+
r("div", ys, [
|
|
2339
|
+
t.value && e.currentDirection === "asc" ? (s(), L(j(Ie), {
|
|
2293
2340
|
key: 0,
|
|
2294
|
-
class:
|
|
2295
|
-
}, null, 8, ["class"])) :
|
|
2296
|
-
t.value && e.currentDirection === "desc" ? (s(),
|
|
2341
|
+
class: C([l.value, "w-3 h-3"])
|
|
2342
|
+
}, null, 8, ["class"])) : M("", !0),
|
|
2343
|
+
t.value && e.currentDirection === "desc" ? (s(), L(j(xe), {
|
|
2297
2344
|
key: 1,
|
|
2298
|
-
class:
|
|
2299
|
-
}, null, 8, ["class"])) :
|
|
2345
|
+
class: C([l.value, "w-3 h-3"])
|
|
2346
|
+
}, null, 8, ["class"])) : M("", !0)
|
|
2300
2347
|
])
|
|
2301
2348
|
])
|
|
2302
2349
|
]));
|
|
2303
2350
|
}
|
|
2304
|
-
},
|
|
2351
|
+
}, vs = { class: "min-w-full divide-y divide-slate-200/80" }, hs = { class: "bg-slate-50/80" }, xs = {
|
|
2305
2352
|
key: 0,
|
|
2306
2353
|
class: "px-6 py-3 text-right text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase"
|
|
2307
|
-
},
|
|
2354
|
+
}, ws = { class: "bg-white divide-y divide-slate-200/80" }, ks = {
|
|
2308
2355
|
key: 0,
|
|
2309
2356
|
class: "flex items-center"
|
|
2310
|
-
},
|
|
2357
|
+
}, Ss = ["title"], $s = {
|
|
2311
2358
|
key: 0,
|
|
2312
2359
|
class: "ml-2 inline-flex items-center rounded-full bg-rose-100 px-2 py-1 text-xs font-medium text-rose-700"
|
|
2313
|
-
},
|
|
2360
|
+
}, Cs = ["innerHTML"], Vs = { key: 3 }, _s = {
|
|
2314
2361
|
key: 0,
|
|
2315
2362
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2316
|
-
},
|
|
2363
|
+
}, Ts = {
|
|
2317
2364
|
key: 0,
|
|
2318
2365
|
class: "text-center py-12"
|
|
2319
|
-
},
|
|
2366
|
+
}, As = { class: "inline-flex items-center justify-center w-16 h-16 rounded-full bg-slate-100 mb-4" }, Bs = { class: "mb-2 text-lg font-semibold text-slate-900" }, Ls = { class: "mb-4 text-slate-600" }, Is = {
|
|
2320
2367
|
__name: "TableList",
|
|
2321
2368
|
props: {
|
|
2322
2369
|
data: {
|
|
@@ -2371,127 +2418,127 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2371
2418
|
},
|
|
2372
2419
|
emits: ["sort"],
|
|
2373
2420
|
setup(e, { emit: a }) {
|
|
2374
|
-
const t =
|
|
2421
|
+
const t = ge(), l = e, n = a;
|
|
2375
2422
|
g(() => !!t.actions);
|
|
2376
|
-
const
|
|
2377
|
-
|
|
2378
|
-
}, f = (
|
|
2379
|
-
const
|
|
2380
|
-
return !Number.isFinite(m) || m <= 0 ||
|
|
2381
|
-
},
|
|
2382
|
-
if (
|
|
2423
|
+
const d = g(() => l.data && l.data.length > 0), u = (b) => {
|
|
2424
|
+
n("sort", b);
|
|
2425
|
+
}, f = (b) => {
|
|
2426
|
+
const $ = String(b ?? ""), m = Number(l.maxTextLength);
|
|
2427
|
+
return !Number.isFinite(m) || m <= 0 || $.length <= m ? $ : `${$.slice(0, m)}...`;
|
|
2428
|
+
}, _ = (b, $) => {
|
|
2429
|
+
if ($.slot)
|
|
2383
2430
|
return null;
|
|
2384
|
-
if (
|
|
2385
|
-
return
|
|
2386
|
-
const m =
|
|
2431
|
+
if ($.render)
|
|
2432
|
+
return $.render(b);
|
|
2433
|
+
const m = $.key.split(".").reduce((x, k) => x?.[k], b);
|
|
2387
2434
|
return m == null || m === "" ? "-" : f(m);
|
|
2388
|
-
}, y = (
|
|
2389
|
-
if (
|
|
2390
|
-
return
|
|
2391
|
-
let
|
|
2392
|
-
return
|
|
2393
|
-
},
|
|
2394
|
-
return (
|
|
2395
|
-
class:
|
|
2435
|
+
}, y = (b) => b.deleted_at || b.deleted, V = (b) => {
|
|
2436
|
+
if (b.class)
|
|
2437
|
+
return b.class;
|
|
2438
|
+
let $ = "px-6 py-4 text-sm truncate";
|
|
2439
|
+
return b.isSecondary || ($ += " font-medium"), b.isSecondary && ($ += " text-slate-600"), $;
|
|
2440
|
+
}, w = (b) => b.sortable ? "" : "px-6 py-3 text-left text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase";
|
|
2441
|
+
return (b, $) => (s(), i("div", {
|
|
2442
|
+
class: C(["bg-white/90 backdrop-blur-sm", e.isCard ? "border border-slate-200/70 rounded-2xl shadow-[0_12px_30px_rgba(15,23,42,0.06)] animate-fadeIn mx-4 md:mx-0" : ""])
|
|
2396
2443
|
}, [
|
|
2397
2444
|
r("div", {
|
|
2398
|
-
class:
|
|
2445
|
+
class: C(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2399
2446
|
}, [
|
|
2400
|
-
r("table",
|
|
2401
|
-
r("thead",
|
|
2447
|
+
r("table", vs, [
|
|
2448
|
+
r("thead", hs, [
|
|
2402
2449
|
r("tr", null, [
|
|
2403
|
-
(s(!0), i(
|
|
2450
|
+
(s(!0), i(Q, null, Y(e.columns, (m) => (s(), i(Q, {
|
|
2404
2451
|
key: m.key
|
|
2405
2452
|
}, [
|
|
2406
|
-
m.sortable ? (s(),
|
|
2453
|
+
m.sortable ? (s(), L(Ve, {
|
|
2407
2454
|
key: 0,
|
|
2408
2455
|
field: m.key,
|
|
2409
2456
|
"current-sort-field": e.sortField,
|
|
2410
2457
|
"current-direction": e.sortDirection,
|
|
2411
|
-
onSort:
|
|
2458
|
+
onSort: u
|
|
2412
2459
|
}, {
|
|
2413
|
-
default:
|
|
2414
|
-
ue(
|
|
2460
|
+
default: F(() => [
|
|
2461
|
+
ue(B(m.label), 1)
|
|
2415
2462
|
]),
|
|
2416
2463
|
_: 2
|
|
2417
2464
|
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2418
2465
|
key: 1,
|
|
2419
|
-
class:
|
|
2420
|
-
},
|
|
2466
|
+
class: C([w(m), { "text-right": m.align === "right" }])
|
|
2467
|
+
}, B(m.label), 3))
|
|
2421
2468
|
], 64))), 128)),
|
|
2422
|
-
|
|
2469
|
+
b.$slots.actions ? (s(), i("th", xs, B(e.actionsLabel), 1)) : M("", !0)
|
|
2423
2470
|
])
|
|
2424
2471
|
]),
|
|
2425
|
-
r("tbody",
|
|
2426
|
-
(s(!0), i(
|
|
2472
|
+
r("tbody", ws, [
|
|
2473
|
+
(s(!0), i(Q, null, Y(e.data, (m, x) => (s(), i("tr", {
|
|
2427
2474
|
key: m.id,
|
|
2428
|
-
class:
|
|
2475
|
+
class: C(e.rowClasses(m, x))
|
|
2429
2476
|
}, [
|
|
2430
|
-
(s(!0), i(
|
|
2431
|
-
key:
|
|
2432
|
-
class:
|
|
2477
|
+
(s(!0), i(Q, null, Y(e.columns, (k) => (s(), i("td", {
|
|
2478
|
+
key: k.key,
|
|
2479
|
+
class: C(V(k))
|
|
2433
2480
|
}, [
|
|
2434
|
-
|
|
2481
|
+
k.key === "name" && !k.slot ? (s(), i("div", ks, [
|
|
2435
2482
|
r("div", {
|
|
2436
2483
|
class: "text-sm font-medium text-slate-900 truncate",
|
|
2437
|
-
title:
|
|
2438
|
-
},
|
|
2439
|
-
y(m) ? (s(), i("span",
|
|
2440
|
-
])) :
|
|
2484
|
+
title: _(m, k)
|
|
2485
|
+
}, B(_(m, k)), 9, Ss),
|
|
2486
|
+
y(m) ? (s(), i("span", $s, B(e.deletedLabel), 1)) : M("", !0)
|
|
2487
|
+
])) : k.slot ? S(b.$slots, k.slot, {
|
|
2441
2488
|
key: 1,
|
|
2442
2489
|
item: m,
|
|
2443
|
-
column:
|
|
2444
|
-
index:
|
|
2445
|
-
}) :
|
|
2490
|
+
column: k,
|
|
2491
|
+
index: x
|
|
2492
|
+
}) : k.render ? (s(), i("div", {
|
|
2446
2493
|
key: 2,
|
|
2447
|
-
innerHTML:
|
|
2448
|
-
}, null, 8,
|
|
2494
|
+
innerHTML: k.render(m)
|
|
2495
|
+
}, null, 8, Cs)) : (s(), i("div", Vs, B(_(m, k)), 1))
|
|
2449
2496
|
], 2))), 128)),
|
|
2450
|
-
|
|
2451
|
-
|
|
2497
|
+
b.$slots.actions ? (s(), i("td", _s, [
|
|
2498
|
+
S(b.$slots, "actions", {
|
|
2452
2499
|
item: m,
|
|
2453
|
-
index:
|
|
2500
|
+
index: x
|
|
2454
2501
|
})
|
|
2455
|
-
])) :
|
|
2502
|
+
])) : M("", !0)
|
|
2456
2503
|
], 2))), 128))
|
|
2457
2504
|
])
|
|
2458
2505
|
])
|
|
2459
2506
|
], 2),
|
|
2460
|
-
|
|
2461
|
-
r("div",
|
|
2462
|
-
(s(),
|
|
2507
|
+
d.value ? M("", !0) : (s(), i("div", Ts, [
|
|
2508
|
+
r("div", As, [
|
|
2509
|
+
(s(), L(Be(e.emptyState.icon), { class: "w-8 h-8 text-slate-400" }))
|
|
2463
2510
|
]),
|
|
2464
|
-
r("h3",
|
|
2465
|
-
r("p",
|
|
2466
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (s(),
|
|
2511
|
+
r("h3", Bs, B(e.emptyState.title), 1),
|
|
2512
|
+
r("p", Ls, B(e.emptyState.description), 1),
|
|
2513
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), L(Ce, {
|
|
2467
2514
|
key: 0,
|
|
2468
2515
|
href: e.emptyState.actionUrl,
|
|
2469
2516
|
variant: "primary"
|
|
2470
2517
|
}, {
|
|
2471
|
-
default:
|
|
2472
|
-
ue(
|
|
2518
|
+
default: F(() => [
|
|
2519
|
+
ue(B(e.emptyState.actionText), 1)
|
|
2473
2520
|
]),
|
|
2474
2521
|
_: 1
|
|
2475
|
-
}, 8, ["href"])) :
|
|
2522
|
+
}, 8, ["href"])) : M("", !0)
|
|
2476
2523
|
]))
|
|
2477
2524
|
], 2));
|
|
2478
2525
|
}
|
|
2479
|
-
}, Ms = { class: "relative max-w-sm" },
|
|
2526
|
+
}, Ms = { class: "relative max-w-sm" }, Ds = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, Os = ["placeholder"], js = { class: "min-w-full divide-y divide-gray-200" }, zs = { class: "bg-gray-50" }, Es = {
|
|
2480
2527
|
key: 0,
|
|
2481
2528
|
class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
2482
|
-
},
|
|
2529
|
+
}, Fs = { class: "bg-white divide-y divide-gray-200" }, Rs = {
|
|
2483
2530
|
key: 2,
|
|
2484
2531
|
class: "flex items-center"
|
|
2485
|
-
},
|
|
2532
|
+
}, Ns = ["title"], Us = {
|
|
2486
2533
|
key: 0,
|
|
2487
2534
|
class: "ml-2 inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800"
|
|
2488
|
-
},
|
|
2535
|
+
}, Ks = ["innerHTML"], Hs = { key: 5 }, Ws = {
|
|
2489
2536
|
key: 0,
|
|
2490
2537
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2491
|
-
},
|
|
2538
|
+
}, Ps = { class: "flex items-center justify-end gap-2" }, qs = {
|
|
2492
2539
|
key: 2,
|
|
2493
2540
|
class: "py-12 text-center"
|
|
2494
|
-
},
|
|
2541
|
+
}, Gs = { class: "mb-4 inline-flex h-16 w-16 items-center justify-center rounded-full bg-gray-100" }, Xs = { class: "mb-2 text-lg font-medium text-gray-900" }, Qs = { class: "mb-4 text-gray-500" }, Ys = {
|
|
2495
2542
|
__name: "TableListForm",
|
|
2496
2543
|
props: {
|
|
2497
2544
|
data: {
|
|
@@ -2590,316 +2637,316 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2590
2637
|
},
|
|
2591
2638
|
emits: ["sort", "update", "update:editingRowKey", "edit-start", "edit-cancel"],
|
|
2592
2639
|
setup(e, { emit: a }) {
|
|
2593
|
-
const t =
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
}),
|
|
2597
|
-
|
|
2598
|
-
}),
|
|
2599
|
-
|
|
2600
|
-
}),
|
|
2601
|
-
if (
|
|
2640
|
+
const t = ge(), l = e, n = a, d = O(l.sortField), u = O(l.sortDirection), f = O(""), _ = O(null), y = O({}), V = g(() => l.editingRowKey !== void 0 ? l.editingRowKey : _.value);
|
|
2641
|
+
J(() => l.sortField, (o) => {
|
|
2642
|
+
d.value = o;
|
|
2643
|
+
}), J(() => l.sortDirection, (o) => {
|
|
2644
|
+
u.value = o;
|
|
2645
|
+
}), J(() => l.rowEditing, (o) => {
|
|
2646
|
+
o || X();
|
|
2647
|
+
}), J(V, (o, p) => {
|
|
2648
|
+
if (o === p)
|
|
2602
2649
|
return;
|
|
2603
|
-
if (
|
|
2650
|
+
if (o == null || o === "") {
|
|
2604
2651
|
y.value = {};
|
|
2605
2652
|
return;
|
|
2606
2653
|
}
|
|
2607
|
-
const c = l.data.find((
|
|
2608
|
-
y.value = c ?
|
|
2609
|
-
}),
|
|
2654
|
+
const c = l.data.find((I, h) => q(I, h) === o);
|
|
2655
|
+
y.value = c ? k(c) : {};
|
|
2656
|
+
}), J(
|
|
2610
2657
|
() => l.data,
|
|
2611
2658
|
() => {
|
|
2612
|
-
if (
|
|
2659
|
+
if (V.value === null || V.value === void 0)
|
|
2613
2660
|
return;
|
|
2614
|
-
l.data.find((p, c) =>
|
|
2661
|
+
l.data.find((p, c) => q(p, c) === V.value) || X();
|
|
2615
2662
|
},
|
|
2616
2663
|
{ deep: !0 }
|
|
2617
2664
|
);
|
|
2618
|
-
const
|
|
2619
|
-
let
|
|
2665
|
+
const w = g(() => {
|
|
2666
|
+
let o = l.data;
|
|
2620
2667
|
if (l.search && f.value.trim()) {
|
|
2621
2668
|
const p = f.value.toLowerCase().trim();
|
|
2622
|
-
|
|
2623
|
-
if (!
|
|
2669
|
+
o = l.data.filter((c) => l.columns.some((I) => {
|
|
2670
|
+
if (!I.searchable)
|
|
2624
2671
|
return !1;
|
|
2625
|
-
const
|
|
2626
|
-
return
|
|
2672
|
+
const h = z(c, I.key);
|
|
2673
|
+
return h == null || h === "" ? !1 : String(h).toLowerCase().includes(p);
|
|
2627
2674
|
}));
|
|
2628
2675
|
}
|
|
2629
|
-
return
|
|
2630
|
-
const
|
|
2631
|
-
if (
|
|
2632
|
-
if (
|
|
2633
|
-
let
|
|
2634
|
-
return
|
|
2635
|
-
}) :
|
|
2636
|
-
}),
|
|
2637
|
-
|
|
2638
|
-
},
|
|
2639
|
-
Object.entries(
|
|
2640
|
-
) :
|
|
2641
|
-
const p = String(
|
|
2676
|
+
return d.value ? [...o].sort((p, c) => {
|
|
2677
|
+
const I = z(p, d.value), h = z(c, d.value);
|
|
2678
|
+
if (I == null || I === "") return 1;
|
|
2679
|
+
if (h == null || h === "") return -1;
|
|
2680
|
+
let W = 0;
|
|
2681
|
+
return I < h && (W = -1), I > h && (W = 1), u.value === "desc" ? -W : W;
|
|
2682
|
+
}) : o;
|
|
2683
|
+
}), b = g(() => !!t.actions), $ = g(() => b.value || l.rowEditing), m = g(() => w.value && w.value.length > 0), x = (o) => {
|
|
2684
|
+
d.value === o ? u.value = u.value === "asc" ? "desc" : "asc" : (d.value = o, u.value = "asc"), n("sort", { field: o, direction: u.value });
|
|
2685
|
+
}, k = (o) => Array.isArray(o) ? o.map((p) => k(p)) : o && typeof o == "object" ? Object.fromEntries(
|
|
2686
|
+
Object.entries(o).map(([p, c]) => [p, k(c)])
|
|
2687
|
+
) : o, D = (o) => {
|
|
2688
|
+
const p = String(o ?? ""), c = Number(l.maxTextLength);
|
|
2642
2689
|
return !Number.isFinite(c) || c <= 0 || p.length <= c ? p : `${p.slice(0, c)}...`;
|
|
2643
|
-
},
|
|
2644
|
-
if (!p || typeof p != "string" ||
|
|
2690
|
+
}, z = (o, p) => !p || typeof p != "string" ? o : p.split(".").reduce((c, I) => c?.[I], o), Z = (o, p, c) => {
|
|
2691
|
+
if (!p || typeof p != "string" || o == null)
|
|
2645
2692
|
return;
|
|
2646
|
-
const
|
|
2647
|
-
let
|
|
2648
|
-
for (const
|
|
2649
|
-
(
|
|
2650
|
-
|
|
2651
|
-
},
|
|
2652
|
-
l.editingRowKey === void 0 && (
|
|
2653
|
-
},
|
|
2654
|
-
|
|
2655
|
-
}, te = (
|
|
2656
|
-
if (
|
|
2693
|
+
const I = p.split("."), h = I.pop();
|
|
2694
|
+
let W = o;
|
|
2695
|
+
for (const ie of I)
|
|
2696
|
+
(W[ie] === void 0 || W[ie] === null || typeof W[ie] != "object") && (W[ie] = {}), W = W[ie];
|
|
2697
|
+
h !== void 0 && (W[h] = c);
|
|
2698
|
+
}, U = (o) => o?.id ? l.data.findIndex((p) => p?.id === o.id) : l.data.findIndex((p) => p === o), q = (o, p) => typeof l.rowKey == "function" ? l.rowKey(o, p) ?? `row-${p}` : z(o, l.rowKey) ?? `row-${p}`, G = (o) => `${o.slot}-edit`, P = (o) => l.isDeletedFn(o), v = (o) => {
|
|
2699
|
+
l.editingRowKey === void 0 && (_.value = o), n("update:editingRowKey", o);
|
|
2700
|
+
}, E = (o, p) => l.rowEditing && V.value !== null && V.value === q(o, p), N = (o, p) => !l.rowEditing || !l.canEditRow(o, p) || P(o) ? !0 : V.value !== null && !E(o, p), X = () => {
|
|
2701
|
+
v(null);
|
|
2702
|
+
}, te = (o, p) => {
|
|
2703
|
+
if (N(o, p))
|
|
2657
2704
|
return;
|
|
2658
|
-
const c =
|
|
2659
|
-
|
|
2660
|
-
item:
|
|
2661
|
-
index:
|
|
2705
|
+
const c = q(o, p);
|
|
2706
|
+
v(c), n("edit-start", {
|
|
2707
|
+
item: o,
|
|
2708
|
+
index: U(o),
|
|
2662
2709
|
rowKey: c
|
|
2663
2710
|
});
|
|
2664
|
-
}, le = (
|
|
2665
|
-
|
|
2666
|
-
item:
|
|
2667
|
-
index:
|
|
2668
|
-
rowKey:
|
|
2711
|
+
}, le = (o, p) => {
|
|
2712
|
+
n("edit-cancel", {
|
|
2713
|
+
item: o,
|
|
2714
|
+
index: U(o),
|
|
2715
|
+
rowKey: q(o, p)
|
|
2669
2716
|
}), X();
|
|
2670
|
-
}, se = (
|
|
2671
|
-
|
|
2717
|
+
}, se = (o, p, c, I = void 0) => {
|
|
2718
|
+
Z(y.value, o, p), l.mutateRows && Z(c, o, k(p)), n("update", {
|
|
2672
2719
|
item: c,
|
|
2673
2720
|
draft: y.value,
|
|
2674
|
-
field:
|
|
2721
|
+
field: o,
|
|
2675
2722
|
value: p,
|
|
2676
|
-
index:
|
|
2677
|
-
rowKey:
|
|
2678
|
-
event:
|
|
2723
|
+
index: U(c),
|
|
2724
|
+
rowKey: V.value,
|
|
2725
|
+
event: I
|
|
2679
2726
|
});
|
|
2680
|
-
}, ae = (
|
|
2727
|
+
}, ae = (o, p) => {
|
|
2681
2728
|
if (p.slot)
|
|
2682
2729
|
return null;
|
|
2683
2730
|
if (p.render)
|
|
2684
|
-
return p.render(
|
|
2685
|
-
const c =
|
|
2686
|
-
return c == null || c === "" ? "-" :
|
|
2687
|
-
},
|
|
2688
|
-
if (
|
|
2689
|
-
return
|
|
2690
|
-
let
|
|
2691
|
-
return
|
|
2692
|
-
},
|
|
2731
|
+
return p.render(o);
|
|
2732
|
+
const c = z(o, p.key);
|
|
2733
|
+
return c == null || c === "" ? "-" : D(c);
|
|
2734
|
+
}, K = (o, p, c) => {
|
|
2735
|
+
if (o.class)
|
|
2736
|
+
return o.class;
|
|
2737
|
+
let h = E(p, c) && (o.input || t[G(o)]) ? "px-6 py-3 text-sm align-top" : "px-6 py-4 text-sm truncate";
|
|
2738
|
+
return o.isSecondary || (h += " font-medium"), o.isSecondary && (h += " text-gray-600"), h;
|
|
2739
|
+
}, T = (o) => o.sortable ? "" : "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", A = (o) => o.inputType || "text", Pe = (o) => {
|
|
2693
2740
|
let p = "block w-full min-w-[12rem] sm:min-w-[10rem] max-w-xs rounded-md border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-900 shadow-none placeholder-gray-400 transition-colors duration-200 focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20";
|
|
2694
|
-
return
|
|
2695
|
-
},
|
|
2696
|
-
const c =
|
|
2741
|
+
return o.inputClass && (p += ` ${o.inputClass}`), o.isSecondary && (p += " text-gray-600"), p;
|
|
2742
|
+
}, qe = (o) => o.placeholder || o.label || "", _e = (o, p, c) => E(o, c) ? z(y.value, p.key) ?? "" : z(o, p.key) ?? "", Ge = (o, p) => {
|
|
2743
|
+
const c = U(o);
|
|
2697
2744
|
return c === -1 ? null : l.getErrorMessage(c, p.key);
|
|
2698
|
-
},
|
|
2699
|
-
item:
|
|
2745
|
+
}, be = (o, p, c) => ({
|
|
2746
|
+
item: o,
|
|
2700
2747
|
column: p,
|
|
2701
2748
|
index: c,
|
|
2702
|
-
isEditing:
|
|
2749
|
+
isEditing: E(o, c),
|
|
2703
2750
|
draft: y.value,
|
|
2704
|
-
rowKey:
|
|
2705
|
-
updateDraft: (
|
|
2706
|
-
startEdit: () => te(
|
|
2707
|
-
cancelEdit: () => le(
|
|
2708
|
-
}), Xe = (
|
|
2709
|
-
return (
|
|
2710
|
-
class:
|
|
2751
|
+
rowKey: q(o, c),
|
|
2752
|
+
updateDraft: (I, h) => se(I, h, o),
|
|
2753
|
+
startEdit: () => te(o, c),
|
|
2754
|
+
cancelEdit: () => le(o, c)
|
|
2755
|
+
}), Xe = (o, p, c) => !!((typeof o.disabled == "function" ? o.disabled(p, c) : o.disabled) || P(p));
|
|
2756
|
+
return (o, p) => (s(), i("div", {
|
|
2757
|
+
class: C(["bg-white", e.isCard ? "mx-4 md:mx-0 border border-gray-200/60 rounded-xl shadow-[0_1px_3px_rgba(0,0,0,0.1)] animate-fadeIn" : ""])
|
|
2711
2758
|
}, [
|
|
2712
2759
|
e.search ? (s(), i("div", {
|
|
2713
2760
|
key: 0,
|
|
2714
|
-
class:
|
|
2761
|
+
class: C([
|
|
2715
2762
|
"px-6 py-4",
|
|
2716
2763
|
e.isCard ? "border-b border-gray-200 bg-gray-50/80 rounded-t-xl" : "mb-4 bg-white/80 backdrop-blur-sm"
|
|
2717
2764
|
])
|
|
2718
2765
|
}, [
|
|
2719
2766
|
r("div", Ms, [
|
|
2720
|
-
r("div",
|
|
2721
|
-
|
|
2767
|
+
r("div", Ds, [
|
|
2768
|
+
H(j(rt), { class: "h-4 w-4 text-gray-400" })
|
|
2722
2769
|
]),
|
|
2723
|
-
|
|
2770
|
+
ne(r("input", {
|
|
2724
2771
|
"onUpdate:modelValue": p[0] || (p[0] = (c) => f.value = c),
|
|
2725
2772
|
type: "text",
|
|
2726
2773
|
placeholder: e.searchPlaceholder,
|
|
2727
2774
|
class: "block w-full rounded-md border border-gray-200 bg-white pl-9 pr-3 py-2 text-sm text-gray-900 placeholder-gray-500 transition-colors duration-200 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"
|
|
2728
2775
|
}, null, 8, Os), [
|
|
2729
|
-
[
|
|
2776
|
+
[Ze, f.value]
|
|
2730
2777
|
])
|
|
2731
2778
|
])
|
|
2732
|
-
], 2)) :
|
|
2779
|
+
], 2)) : M("", !0),
|
|
2733
2780
|
m.value ? (s(), i("div", {
|
|
2734
2781
|
key: 1,
|
|
2735
|
-
class:
|
|
2782
|
+
class: C(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2736
2783
|
}, [
|
|
2737
|
-
r("table",
|
|
2738
|
-
r("thead",
|
|
2784
|
+
r("table", js, [
|
|
2785
|
+
r("thead", zs, [
|
|
2739
2786
|
r("tr", null, [
|
|
2740
|
-
(s(!0), i(
|
|
2787
|
+
(s(!0), i(Q, null, Y(e.columns, (c) => (s(), i(Q, {
|
|
2741
2788
|
key: c.key
|
|
2742
2789
|
}, [
|
|
2743
|
-
c.sortable ? (s(),
|
|
2790
|
+
c.sortable ? (s(), L(Ve, {
|
|
2744
2791
|
key: 0,
|
|
2745
2792
|
field: c.key,
|
|
2746
|
-
"current-sort-field":
|
|
2747
|
-
"current-direction":
|
|
2748
|
-
onSort:
|
|
2793
|
+
"current-sort-field": d.value,
|
|
2794
|
+
"current-direction": u.value,
|
|
2795
|
+
onSort: x
|
|
2749
2796
|
}, {
|
|
2750
|
-
default:
|
|
2751
|
-
ue(
|
|
2797
|
+
default: F(() => [
|
|
2798
|
+
ue(B(c.label), 1)
|
|
2752
2799
|
]),
|
|
2753
2800
|
_: 2
|
|
2754
2801
|
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2755
2802
|
key: 1,
|
|
2756
|
-
class:
|
|
2757
|
-
},
|
|
2803
|
+
class: C([T(c), { "text-right": c.align === "right" }])
|
|
2804
|
+
}, B(c.label), 3))
|
|
2758
2805
|
], 64))), 128)),
|
|
2759
|
-
|
|
2806
|
+
$.value ? (s(), i("th", Es, B(e.actionsLabel), 1)) : M("", !0)
|
|
2760
2807
|
])
|
|
2761
2808
|
]),
|
|
2762
|
-
r("tbody",
|
|
2763
|
-
(s(!0), i(
|
|
2764
|
-
key:
|
|
2765
|
-
class:
|
|
2809
|
+
r("tbody", Fs, [
|
|
2810
|
+
(s(!0), i(Q, null, Y(w.value, (c, I) => (s(), i("tr", {
|
|
2811
|
+
key: q(c, I),
|
|
2812
|
+
class: C(e.rowClasses(c, I))
|
|
2766
2813
|
}, [
|
|
2767
|
-
(s(!0), i(
|
|
2768
|
-
key:
|
|
2769
|
-
class:
|
|
2814
|
+
(s(!0), i(Q, null, Y(e.columns, (h) => (s(), i("td", {
|
|
2815
|
+
key: h.key,
|
|
2816
|
+
class: C([K(h, c, I), { "text-right": h.align === "right" }])
|
|
2770
2817
|
}, [
|
|
2771
|
-
|
|
2818
|
+
E(c, I) && h.slot && j(t)[G(h)] ? S(o.$slots, G(h), R({
|
|
2772
2819
|
key: 0,
|
|
2773
2820
|
ref_for: !0
|
|
2774
|
-
},
|
|
2821
|
+
}, be(c, h, I))) : E(c, I) && h.input ? (s(), L(me, {
|
|
2775
2822
|
key: 1,
|
|
2776
|
-
type:
|
|
2777
|
-
class:
|
|
2778
|
-
placeholder:
|
|
2779
|
-
"model-value": _e(c,
|
|
2780
|
-
disabled: Xe(
|
|
2781
|
-
maxlength:
|
|
2782
|
-
"error-message": Ge(c,
|
|
2823
|
+
type: A(h),
|
|
2824
|
+
class: C(Pe(h)),
|
|
2825
|
+
placeholder: qe(h),
|
|
2826
|
+
"model-value": _e(c, h, I),
|
|
2827
|
+
disabled: Xe(h, c, I),
|
|
2828
|
+
maxlength: h.maxlength,
|
|
2829
|
+
"error-message": Ge(c, h),
|
|
2783
2830
|
"helper-text": "",
|
|
2784
|
-
"onUpdate:modelValue": (
|
|
2785
|
-
onBlur: (
|
|
2786
|
-
}, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) :
|
|
2831
|
+
"onUpdate:modelValue": (W) => se(h.key, W, c),
|
|
2832
|
+
onBlur: (W) => se(h.key, W?.target?.value ?? _e(c, h, I), c, "blur")
|
|
2833
|
+
}, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) : h.key === "name" && !h.slot ? (s(), i("div", Rs, [
|
|
2787
2834
|
r("div", {
|
|
2788
2835
|
class: "text-sm font-medium truncate",
|
|
2789
|
-
title: ae(c,
|
|
2790
|
-
},
|
|
2791
|
-
|
|
2792
|
-
])) :
|
|
2836
|
+
title: ae(c, h)
|
|
2837
|
+
}, B(ae(c, h)), 9, Ns),
|
|
2838
|
+
P(c) ? (s(), i("span", Us, B(e.deletedLabel), 1)) : M("", !0)
|
|
2839
|
+
])) : h.slot ? S(o.$slots, h.slot, R({
|
|
2793
2840
|
key: 3,
|
|
2794
2841
|
ref_for: !0
|
|
2795
|
-
},
|
|
2842
|
+
}, be(c, h, I))) : h.render ? (s(), i("div", {
|
|
2796
2843
|
key: 4,
|
|
2797
|
-
innerHTML:
|
|
2798
|
-
}, null, 8,
|
|
2844
|
+
innerHTML: h.render(c)
|
|
2845
|
+
}, null, 8, Ks)) : (s(), i("div", Hs, B(ae(c, h)), 1))
|
|
2799
2846
|
], 2))), 128)),
|
|
2800
|
-
|
|
2801
|
-
r("div",
|
|
2802
|
-
|
|
2847
|
+
$.value ? (s(), i("td", Ws, [
|
|
2848
|
+
r("div", Ps, [
|
|
2849
|
+
b.value ? S(o.$slots, "actions", R({
|
|
2803
2850
|
key: 0,
|
|
2804
2851
|
ref_for: !0
|
|
2805
|
-
},
|
|
2806
|
-
e.rowEditing &&
|
|
2852
|
+
}, be(c, null, I))) : M("", !0),
|
|
2853
|
+
e.rowEditing && E(c, I) ? (s(), L(ve, {
|
|
2807
2854
|
key: 1,
|
|
2808
2855
|
type: "button",
|
|
2809
2856
|
variant: "tertiary",
|
|
2810
2857
|
title: e.cancelLabel,
|
|
2811
2858
|
"aria-label": e.cancelLabel,
|
|
2812
|
-
onClick: (
|
|
2859
|
+
onClick: (h) => le(c, I)
|
|
2813
2860
|
}, {
|
|
2814
|
-
default:
|
|
2815
|
-
|
|
2861
|
+
default: F(() => [
|
|
2862
|
+
H(j(it), { class: "size-4" })
|
|
2816
2863
|
]),
|
|
2817
2864
|
_: 1
|
|
2818
|
-
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (s(),
|
|
2865
|
+
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (s(), L(ve, {
|
|
2819
2866
|
key: 2,
|
|
2820
2867
|
type: "button",
|
|
2821
2868
|
variant: "warning",
|
|
2822
|
-
disabled:
|
|
2869
|
+
disabled: N(c, I),
|
|
2823
2870
|
title: e.editLabel,
|
|
2824
2871
|
"aria-label": e.editLabel,
|
|
2825
|
-
onClick: (
|
|
2872
|
+
onClick: (h) => te(c, I)
|
|
2826
2873
|
}, {
|
|
2827
|
-
default:
|
|
2828
|
-
|
|
2874
|
+
default: F(() => [
|
|
2875
|
+
H(j(dt), { class: "size-4" })
|
|
2829
2876
|
]),
|
|
2830
2877
|
_: 1
|
|
2831
|
-
}, 8, ["disabled", "title", "aria-label", "onClick"])) :
|
|
2878
|
+
}, 8, ["disabled", "title", "aria-label", "onClick"])) : M("", !0)
|
|
2832
2879
|
])
|
|
2833
|
-
])) :
|
|
2880
|
+
])) : M("", !0)
|
|
2834
2881
|
], 2))), 128))
|
|
2835
2882
|
])
|
|
2836
2883
|
])
|
|
2837
|
-
], 2)) : (s(), i("div",
|
|
2838
|
-
r("div",
|
|
2839
|
-
(s(),
|
|
2884
|
+
], 2)) : (s(), i("div", qs, [
|
|
2885
|
+
r("div", Gs, [
|
|
2886
|
+
(s(), L(Be(e.emptyState.icon), { class: "h-8 w-8 text-gray-400" }))
|
|
2840
2887
|
]),
|
|
2841
|
-
r("h3",
|
|
2842
|
-
r("p",
|
|
2843
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (s(),
|
|
2888
|
+
r("h3", Xs, B(e.emptyState.title), 1),
|
|
2889
|
+
r("p", Qs, B(e.emptyState.description), 1),
|
|
2890
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), L(Ce, {
|
|
2844
2891
|
key: 0,
|
|
2845
2892
|
href: e.emptyState.actionUrl,
|
|
2846
2893
|
variant: "primary"
|
|
2847
2894
|
}, {
|
|
2848
|
-
default:
|
|
2849
|
-
ue(
|
|
2895
|
+
default: F(() => [
|
|
2896
|
+
ue(B(e.emptyState.actionText), 1)
|
|
2850
2897
|
]),
|
|
2851
2898
|
_: 1
|
|
2852
|
-
}, 8, ["href"])) :
|
|
2899
|
+
}, 8, ["href"])) : M("", !0)
|
|
2853
2900
|
]))
|
|
2854
2901
|
], 2));
|
|
2855
2902
|
}
|
|
2856
|
-
},
|
|
2903
|
+
}, Js = {
|
|
2857
2904
|
install(e) {
|
|
2858
|
-
for (const [a, t] of Object.entries(
|
|
2905
|
+
for (const [a, t] of Object.entries(ut))
|
|
2859
2906
|
a !== "EnosVue" && e.component(a, t);
|
|
2860
2907
|
}
|
|
2861
2908
|
};
|
|
2862
2909
|
export {
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2910
|
+
bt as ActionCard,
|
|
2911
|
+
vt as ActionMessage,
|
|
2912
|
+
At as ActionSection,
|
|
2866
2913
|
Mt as ApplicationLogo,
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2914
|
+
Et as AuthenticationCard,
|
|
2915
|
+
Rt as Badge,
|
|
2916
|
+
Gt as Banner,
|
|
2917
|
+
ve as Button,
|
|
2918
|
+
De as Card,
|
|
2919
|
+
Me as CardTabs,
|
|
2920
|
+
Yt as Checkbox,
|
|
2921
|
+
Oe as CheckboxInput,
|
|
2922
|
+
We as CheckboxMultipleInput,
|
|
2876
2923
|
Ml as ConfirmationModal,
|
|
2877
2924
|
Ee as CustomSelect,
|
|
2878
|
-
|
|
2879
|
-
|
|
2925
|
+
Re as DateInput,
|
|
2926
|
+
El as DialogModal,
|
|
2880
2927
|
we as Divider,
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2928
|
+
Rl as Dropdown,
|
|
2929
|
+
Kl as DropdownLink,
|
|
2930
|
+
Js as EnosVue,
|
|
2931
|
+
Gl as FormSection,
|
|
2932
|
+
Ne as ImageInput,
|
|
2933
|
+
Ql as InputError,
|
|
2934
|
+
me as InputGroup,
|
|
2935
|
+
es as InputLabel,
|
|
2889
2936
|
Ce as LinkButton,
|
|
2890
2937
|
$e as Modal,
|
|
2891
|
-
|
|
2938
|
+
ls as NavLink,
|
|
2892
2939
|
Ue as NotationInput,
|
|
2893
|
-
|
|
2940
|
+
Ke as RadioInput,
|
|
2894
2941
|
He as RadioMultipleInput,
|
|
2895
|
-
|
|
2896
|
-
|
|
2942
|
+
as as ResponsiveNavLink,
|
|
2943
|
+
rs as SectionBorder,
|
|
2897
2944
|
Se as SectionTitle,
|
|
2898
2945
|
Fe as SelectInput,
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2946
|
+
ms as SortControls,
|
|
2947
|
+
Is as TableList,
|
|
2948
|
+
Ys as TableListForm,
|
|
2902
2949
|
ze as TextArea,
|
|
2903
|
-
|
|
2950
|
+
je as TextInput,
|
|
2904
2951
|
Ve as ThSortable
|
|
2905
2952
|
};
|