@enos5/enos-vue 1.0.4 → 1.0.5
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 +626 -626
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ref as j, computed as g, watch as Q, openBlock as
|
|
1
|
+
import { ref as j, computed as g, watch as Q, openBlock as s, createElementBlock as i, createElementVNode as r, Fragment as q, renderList as P, normalizeClass as k, normalizeStyle as Te, toDisplayString as T, createBlock as B, createCommentVNode as D, renderSlot as w, createVNode as R, Transition as re, withCtx as O, mergeProps as z, useSlots as fe, unref as I, withDirectives as Z, vShow as ie, watchEffect as Qe, onMounted as ee, useAttrs as ne, vModelCheckbox as Ye, nextTick as ye, onBeforeUnmount as Je, Teleport as Ze, withModifiers as ve, onUnmounted as Ae, isRef as be, createTextVNode as ue, resolveDynamicComponent as Be, vModelText as et } from "vue";
|
|
2
2
|
import { usePage as tt, Link as ge } from "@inertiajs/vue3";
|
|
3
3
|
import { useI18n as lt } from "vue-i18n";
|
|
4
|
-
import { CheckCircleIcon as
|
|
4
|
+
import { CheckCircleIcon as st, ExclamationTriangleIcon as Le, XMarkIcon as at, LockClosedIcon as nt, ChevronDownIcon as xe, PhotoIcon as ot, ExclamationCircleIcon as rt, ChevronUpIcon as Ie, MagnifyingGlassIcon as it, CheckIcon as dt, PencilSquareIcon as ut } from "@heroicons/vue/24/outline";
|
|
5
5
|
const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
6
6
|
__proto__: null,
|
|
7
7
|
get ActionCard() {
|
|
8
|
-
return
|
|
8
|
+
return yt;
|
|
9
9
|
},
|
|
10
10
|
get ActionMessage() {
|
|
11
11
|
return ht;
|
|
@@ -65,7 +65,7 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
65
65
|
return Hl;
|
|
66
66
|
},
|
|
67
67
|
get EnosVue() {
|
|
68
|
-
return
|
|
68
|
+
return Zs;
|
|
69
69
|
},
|
|
70
70
|
get FormSection() {
|
|
71
71
|
return Xl;
|
|
@@ -77,10 +77,10 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
77
77
|
return Yl;
|
|
78
78
|
},
|
|
79
79
|
get InputGroup() {
|
|
80
|
-
return
|
|
80
|
+
return pe;
|
|
81
81
|
},
|
|
82
82
|
get InputLabel() {
|
|
83
|
-
return
|
|
83
|
+
return ts;
|
|
84
84
|
},
|
|
85
85
|
get LinkButton() {
|
|
86
86
|
return Ce;
|
|
@@ -89,7 +89,7 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
89
89
|
return $e;
|
|
90
90
|
},
|
|
91
91
|
get NavLink() {
|
|
92
|
-
return
|
|
92
|
+
return ss;
|
|
93
93
|
},
|
|
94
94
|
get NotationInput() {
|
|
95
95
|
return Ue;
|
|
@@ -101,10 +101,10 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
101
101
|
return He;
|
|
102
102
|
},
|
|
103
103
|
get ResponsiveNavLink() {
|
|
104
|
-
return
|
|
104
|
+
return ns;
|
|
105
105
|
},
|
|
106
106
|
get SectionBorder() {
|
|
107
|
-
return
|
|
107
|
+
return is;
|
|
108
108
|
},
|
|
109
109
|
get SectionTitle() {
|
|
110
110
|
return Se;
|
|
@@ -113,13 +113,13 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
113
113
|
return Fe;
|
|
114
114
|
},
|
|
115
115
|
get SortControls() {
|
|
116
|
-
return
|
|
116
|
+
return bs;
|
|
117
117
|
},
|
|
118
118
|
get TableList() {
|
|
119
|
-
return
|
|
119
|
+
return Ds;
|
|
120
120
|
},
|
|
121
121
|
get TableListForm() {
|
|
122
|
-
return
|
|
122
|
+
return Js;
|
|
123
123
|
},
|
|
124
124
|
get TextArea() {
|
|
125
125
|
return ze;
|
|
@@ -133,13 +133,13 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
133
133
|
}, Symbol.toStringTag, { value: "Module" })), ft = { class: "border-b border-gray-200/80 bg-gray-50/80 p-2" }, gt = {
|
|
134
134
|
role: "tablist",
|
|
135
135
|
class: "flex rounded-lg bg-white shadow-sm ring-1 ring-gray-200/80 overflow-hidden"
|
|
136
|
-
},
|
|
136
|
+
}, pt = ["aria-selected", "tabindex", "onClick", "onKeydown"], De = {
|
|
137
137
|
__name: "CardTabs",
|
|
138
138
|
props: {
|
|
139
139
|
tabs: {
|
|
140
140
|
type: Array,
|
|
141
141
|
default: () => [],
|
|
142
|
-
validator: (e) => e.every((
|
|
142
|
+
validator: (e) => e.every((a) => typeof a == "object" && a !== null && typeof a.value == "string" && a.value.length > 0 && typeof a.label == "string")
|
|
143
143
|
},
|
|
144
144
|
activeTab: {
|
|
145
145
|
type: String,
|
|
@@ -150,17 +150,17 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
150
150
|
"update:activeTab",
|
|
151
151
|
"tab-click"
|
|
152
152
|
],
|
|
153
|
-
setup(e, { emit:
|
|
154
|
-
const t = e, l =
|
|
153
|
+
setup(e, { emit: a }) {
|
|
154
|
+
const t = e, l = a, o = j([]), u = g(() => t.tabs.map((h) => h.value)), d = g(() => u.value.includes(t.activeTab) ? t.activeTab : u.value[0] ?? "");
|
|
155
155
|
Q(d, (h) => {
|
|
156
156
|
h !== t.activeTab && l("update:activeTab", h);
|
|
157
157
|
}, { immediate: !0 });
|
|
158
158
|
const f = (h, v) => {
|
|
159
|
-
|
|
159
|
+
o.value[v] = h;
|
|
160
160
|
}, $ = (h) => {
|
|
161
161
|
!h || h === t.activeTab || (l("update:activeTab", h), l("tab-click", h));
|
|
162
|
-
},
|
|
163
|
-
|
|
162
|
+
}, y = (h) => {
|
|
163
|
+
o.value[h]?.focus();
|
|
164
164
|
}, C = (h, v) => {
|
|
165
165
|
if (t.tabs.length === 0)
|
|
166
166
|
return;
|
|
@@ -183,14 +183,14 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
183
183
|
default:
|
|
184
184
|
return;
|
|
185
185
|
}
|
|
186
|
-
h.preventDefault(), $(t.tabs[S].value),
|
|
186
|
+
h.preventDefault(), $(t.tabs[S].value), y(S);
|
|
187
187
|
};
|
|
188
|
-
return (h, v) => (
|
|
189
|
-
|
|
190
|
-
(
|
|
188
|
+
return (h, v) => (s(), i("div", ft, [
|
|
189
|
+
r("div", gt, [
|
|
190
|
+
(s(!0), i(q, null, P(e.tabs, (S, m) => (s(), i("button", {
|
|
191
191
|
key: S.value,
|
|
192
192
|
ref_for: !0,
|
|
193
|
-
ref: (M) => f(M,
|
|
193
|
+
ref: (M) => f(M, m),
|
|
194
194
|
type: "button",
|
|
195
195
|
style: Te({ width: `${100 / e.tabs.length}%` }),
|
|
196
196
|
role: "tab",
|
|
@@ -200,21 +200,21 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
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
|
d.value === S.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
|
-
"border-r border-gray-200/80":
|
|
203
|
+
"border-r border-gray-200/80": m !== e.tabs.length - 1
|
|
204
204
|
}
|
|
205
205
|
]),
|
|
206
206
|
onClick: (M) => $(S.value),
|
|
207
|
-
onKeydown: (M) => C(M,
|
|
208
|
-
}, T(S.label), 47,
|
|
207
|
+
onKeydown: (M) => C(M, m)
|
|
208
|
+
}, T(S.label), 47, pt))), 128))
|
|
209
209
|
])
|
|
210
210
|
]));
|
|
211
211
|
}
|
|
212
|
-
},
|
|
212
|
+
}, mt = {
|
|
213
213
|
key: 0,
|
|
214
214
|
class: "mb-4"
|
|
215
|
-
},
|
|
215
|
+
}, bt = {
|
|
216
216
|
key: 1,
|
|
217
|
-
class: "text-
|
|
217
|
+
class: "mb-4 text-xl font-semibold tracking-tight text-slate-900"
|
|
218
218
|
}, Me = {
|
|
219
219
|
__name: "Card",
|
|
220
220
|
props: {
|
|
@@ -245,7 +245,7 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
245
245
|
tabs: {
|
|
246
246
|
type: Array,
|
|
247
247
|
default: () => [],
|
|
248
|
-
validator: (e) => e.every((
|
|
248
|
+
validator: (e) => e.every((a) => typeof a == "object" && a !== null && typeof a.value == "string" && a.value.length > 0 && typeof a.label == "string")
|
|
249
249
|
},
|
|
250
250
|
activeTab: {
|
|
251
251
|
type: String,
|
|
@@ -257,29 +257,29 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
257
257
|
"tab-click"
|
|
258
258
|
],
|
|
259
259
|
setup(e) {
|
|
260
|
-
const
|
|
261
|
-
return g(() =>
|
|
262
|
-
d !== void 0 && d !== -1 && u !== -1 && u !== d && (l.value = u > d ? "right" : "left", t.value =
|
|
263
|
-
}), (u, d) => (
|
|
264
|
-
class: k(["bg-white/
|
|
260
|
+
const a = e, t = j(""), l = j("right"), o = g(() => a.tabs.findIndex((u) => u.value === a.activeTab));
|
|
261
|
+
return g(() => a.tabs.findIndex((u) => u.value === t.value)), Q(o, (u, d) => {
|
|
262
|
+
d !== void 0 && d !== -1 && u !== -1 && u !== d && (l.value = u > d ? "right" : "left", t.value = a.activeTab);
|
|
263
|
+
}), (u, d) => (s(), i("div", {
|
|
264
|
+
class: k(["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 ? (
|
|
266
|
+
e.tabs.length > 0 ? (s(), B(De, {
|
|
267
267
|
key: 0,
|
|
268
268
|
tabs: e.tabs,
|
|
269
269
|
"active-tab": e.activeTab,
|
|
270
270
|
"onUpdate:activeTab": d[0] || (d[0] = (f) => u.$emit("update:activeTab", f)),
|
|
271
271
|
onTabClick: d[1] || (d[1] = (f) => u.$emit("tab-click", f))
|
|
272
272
|
}, null, 8, ["tabs", "active-tab"])) : D("", !0),
|
|
273
|
-
|
|
273
|
+
r("div", {
|
|
274
274
|
class: k(e.paddingClass)
|
|
275
275
|
}, [
|
|
276
|
-
u.$slots.customTitle ? (
|
|
276
|
+
u.$slots.customTitle ? (s(), i("div", mt, [
|
|
277
277
|
w(u.$slots, "customTitle")
|
|
278
|
-
])) : e.title ? (
|
|
279
|
-
|
|
278
|
+
])) : e.title ? (s(), i("h3", bt, T(e.title), 1)) : D("", !0),
|
|
279
|
+
r("div", {
|
|
280
280
|
class: k(["relative", e.tabs.length > 0 ? "overflow-hidden" : "overflow-visible"])
|
|
281
281
|
}, [
|
|
282
|
-
R(
|
|
282
|
+
R(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",
|
|
@@ -289,7 +289,7 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
289
289
|
mode: "out-in"
|
|
290
290
|
}, {
|
|
291
291
|
default: O(() => [
|
|
292
|
-
(
|
|
292
|
+
(s(), i("div", {
|
|
293
293
|
key: e.activeTab,
|
|
294
294
|
class: k([e.tabs.length > 0 ? "p-2" : "", e.contentClass])
|
|
295
295
|
}, [
|
|
@@ -307,11 +307,11 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
307
307
|
}, {
|
|
308
308
|
__name: "Divider",
|
|
309
309
|
setup(e) {
|
|
310
|
-
return (
|
|
311
|
-
w(
|
|
310
|
+
return (a, t) => (s(), i("div", z({ class: "border-t border-gray-200" }, a.$attrs), [
|
|
311
|
+
w(a.$slots, "default")
|
|
312
312
|
], 16));
|
|
313
313
|
}
|
|
314
|
-
}),
|
|
314
|
+
}), yt = {
|
|
315
315
|
__name: "ActionCard",
|
|
316
316
|
props: {
|
|
317
317
|
title: {
|
|
@@ -324,14 +324,14 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
324
324
|
}
|
|
325
325
|
},
|
|
326
326
|
setup(e) {
|
|
327
|
-
const
|
|
328
|
-
return (t, l) => (
|
|
327
|
+
const a = fe();
|
|
328
|
+
return (t, l) => (s(), B(Me, {
|
|
329
329
|
title: e.title,
|
|
330
330
|
"content-class": e.actionsClass
|
|
331
331
|
}, {
|
|
332
332
|
default: O(() => [
|
|
333
333
|
w(t.$slots, "default"),
|
|
334
|
-
I(
|
|
334
|
+
I(a).danger ? (s(), B(we, {
|
|
335
335
|
key: 0,
|
|
336
336
|
class: "mt-6 pt-4"
|
|
337
337
|
}, {
|
|
@@ -350,15 +350,15 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
350
350
|
on: Boolean
|
|
351
351
|
},
|
|
352
352
|
setup(e) {
|
|
353
|
-
return (
|
|
354
|
-
R(
|
|
353
|
+
return (a, t) => (s(), i("div", null, [
|
|
354
|
+
R(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
359
|
default: O(() => [
|
|
360
|
-
Z(
|
|
361
|
-
w(
|
|
360
|
+
Z(r("div", vt, [
|
|
361
|
+
w(a.$slots, "default")
|
|
362
362
|
], 512), [
|
|
363
363
|
[ie, e.on]
|
|
364
364
|
])
|
|
@@ -367,23 +367,23 @@ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
367
367
|
})
|
|
368
368
|
]));
|
|
369
369
|
}
|
|
370
|
-
}, ke = (e,
|
|
370
|
+
}, ke = (e, a) => {
|
|
371
371
|
const t = e.__vccOpts || e;
|
|
372
|
-
for (const [l,
|
|
373
|
-
t[l] =
|
|
372
|
+
for (const [l, o] of a)
|
|
373
|
+
t[l] = o;
|
|
374
374
|
return t;
|
|
375
|
-
}, xt = {}, wt = { class: "md:col-span-1 flex justify-between" }, kt = { class: "px-4 sm:px-0" }, St = { class: "text-
|
|
376
|
-
function Vt(e,
|
|
377
|
-
return
|
|
378
|
-
|
|
379
|
-
|
|
375
|
+
}, xt = {}, wt = { class: "md:col-span-1 flex justify-between" }, kt = { class: "px-4 sm:px-0" }, St = { class: "text-xl font-semibold tracking-tight text-slate-900" }, $t = { class: "mt-1 max-w-2xl text-sm text-slate-600" }, Ct = { class: "px-4 sm:px-0" };
|
|
376
|
+
function Vt(e, a) {
|
|
377
|
+
return s(), i("div", wt, [
|
|
378
|
+
r("div", kt, [
|
|
379
|
+
r("h3", St, [
|
|
380
380
|
w(e.$slots, "title")
|
|
381
381
|
]),
|
|
382
|
-
|
|
382
|
+
r("p", $t, [
|
|
383
383
|
w(e.$slots, "description")
|
|
384
384
|
])
|
|
385
385
|
]),
|
|
386
|
-
|
|
386
|
+
r("div", Ct, [
|
|
387
387
|
w(e.$slots, "aside")
|
|
388
388
|
])
|
|
389
389
|
]);
|
|
@@ -391,19 +391,19 @@ function Vt(e, s) {
|
|
|
391
391
|
const Se = /* @__PURE__ */ ke(xt, [["render", Vt]]), _t = { class: "md:grid md:grid-cols-3 md:gap-6" }, Tt = { class: "mt-5 md:mt-0 md:col-span-2" }, At = { class: "px-4 py-5 sm:p-6 bg-white shadow sm:rounded-lg" }, Bt = {
|
|
392
392
|
__name: "ActionSection",
|
|
393
393
|
setup(e) {
|
|
394
|
-
return (
|
|
394
|
+
return (a, t) => (s(), i("div", _t, [
|
|
395
395
|
R(Se, null, {
|
|
396
396
|
title: O(() => [
|
|
397
|
-
w(
|
|
397
|
+
w(a.$slots, "title")
|
|
398
398
|
]),
|
|
399
399
|
description: O(() => [
|
|
400
|
-
w(
|
|
400
|
+
w(a.$slots, "description")
|
|
401
401
|
]),
|
|
402
402
|
_: 3
|
|
403
403
|
}),
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
w(
|
|
404
|
+
r("div", Tt, [
|
|
405
|
+
r("div", At, [
|
|
406
|
+
w(a.$slots, "content")
|
|
407
407
|
])
|
|
408
408
|
])
|
|
409
409
|
]));
|
|
@@ -413,29 +413,29 @@ const Se = /* @__PURE__ */ ke(xt, [["render", Vt]]), _t = { class: "md:grid md:g
|
|
|
413
413
|
fill: "none",
|
|
414
414
|
xmlns: "http://www.w3.org/2000/svg"
|
|
415
415
|
};
|
|
416
|
-
function Dt(e,
|
|
417
|
-
return
|
|
418
|
-
|
|
416
|
+
function Dt(e, a) {
|
|
417
|
+
return s(), i("svg", It, [...a[0] || (a[0] = [
|
|
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"
|
|
421
421
|
}, null, -1),
|
|
422
|
-
|
|
422
|
+
r("path", {
|
|
423
423
|
d: "M11.395 44.428C4.557 40.198 0 32.632 0 24 0 10.745 10.745 0 24 0a23.891 23.891 0 0113.997 4.502c-.2 17.907-11.097 33.245-26.602 39.926z",
|
|
424
424
|
fill: "#6875F5"
|
|
425
425
|
}, null, -1),
|
|
426
|
-
|
|
426
|
+
r("path", {
|
|
427
427
|
d: "M14.134 45.885A23.914 23.914 0 0024 48c13.255 0 24-10.745 24-24 0-3.516-.756-6.856-2.115-9.866-4.659 15.143-16.608 27.092-31.75 31.751z",
|
|
428
428
|
fill: "#6875F5"
|
|
429
429
|
}, null, -1)
|
|
430
430
|
])]);
|
|
431
431
|
}
|
|
432
432
|
const Mt = /* @__PURE__ */ ke(Lt, [["render", Dt]]), jt = {}, Ot = { class: "min-h-screen flex flex-col sm:justify-center items-center pt-6 sm:pt-0 bg-gray-100" }, zt = { class: "w-full sm:max-w-md mt-6 px-6 py-4 bg-white shadow-md overflow-hidden rounded-lg" };
|
|
433
|
-
function Et(e,
|
|
434
|
-
return
|
|
435
|
-
|
|
433
|
+
function Et(e, a) {
|
|
434
|
+
return s(), i("div", Ot, [
|
|
435
|
+
r("div", null, [
|
|
436
436
|
w(e.$slots, "logo")
|
|
437
437
|
]),
|
|
438
|
-
|
|
438
|
+
r("div", zt, [
|
|
439
439
|
w(e.$slots, "default")
|
|
440
440
|
])
|
|
441
441
|
]);
|
|
@@ -474,15 +474,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
474
474
|
}
|
|
475
475
|
},
|
|
476
476
|
setup(e) {
|
|
477
|
-
const
|
|
478
|
-
default: { bg: "bg-
|
|
479
|
-
primary: { bg: "bg-blue-100", text: "text-blue-
|
|
480
|
-
secondary: { bg: "bg-
|
|
481
|
-
success: { bg: "bg-
|
|
482
|
-
warning: { bg: "bg-amber-100", text: "text-amber-
|
|
483
|
-
danger: { bg: "bg-
|
|
484
|
-
info: { bg: "bg-cyan-100", text: "text-cyan-
|
|
485
|
-
gray: { bg: "bg-
|
|
477
|
+
const a = {
|
|
478
|
+
default: { bg: "bg-slate-100", text: "text-slate-700", dot: "bg-slate-600" },
|
|
479
|
+
primary: { bg: "bg-blue-100", text: "text-blue-700", dot: "bg-blue-600" },
|
|
480
|
+
secondary: { bg: "bg-slate-100", text: "text-slate-700", dot: "bg-slate-600" },
|
|
481
|
+
success: { bg: "bg-emerald-100", text: "text-emerald-700", dot: "bg-emerald-600" },
|
|
482
|
+
warning: { bg: "bg-amber-100", text: "text-amber-700", dot: "bg-amber-600" },
|
|
483
|
+
danger: { bg: "bg-rose-100", text: "text-rose-700", dot: "bg-rose-600" },
|
|
484
|
+
info: { bg: "bg-cyan-100", text: "text-cyan-700", dot: "bg-cyan-600" },
|
|
485
|
+
gray: { bg: "bg-slate-100", text: "text-slate-600", dot: "bg-slate-600" }
|
|
486
486
|
}, t = {
|
|
487
487
|
xs: "px-1.5 py-0.5 text-xs",
|
|
488
488
|
sm: "px-2 py-0.5 text-xs",
|
|
@@ -495,26 +495,26 @@ 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 (o, u) => e.type === "dot" ? (s(), i("span", {
|
|
499
499
|
key: 0,
|
|
500
|
-
class: k(["inline-flex items-center justify-center w-6 h-6 rounded-full",
|
|
500
|
+
class: k(["inline-flex items-center justify-center w-6 h-6 rounded-full", a[e.color].bg])
|
|
501
501
|
}, [
|
|
502
|
-
|
|
503
|
-
class: k(["w-2 h-2 rounded-full",
|
|
502
|
+
r("span", {
|
|
503
|
+
class: k(["w-2 h-2 rounded-full", a[e.color].dot])
|
|
504
504
|
}, null, 2),
|
|
505
|
-
|
|
506
|
-
w(
|
|
505
|
+
r("span", Nt, [
|
|
506
|
+
w(o.$slots, "default")
|
|
507
507
|
])
|
|
508
|
-
], 2)) : (
|
|
508
|
+
], 2)) : (s(), i("span", {
|
|
509
509
|
key: 1,
|
|
510
510
|
class: k(["inline-flex items-center font-medium", [
|
|
511
|
-
|
|
512
|
-
|
|
511
|
+
a[e.color].bg,
|
|
512
|
+
a[e.color].text,
|
|
513
513
|
t[e.size],
|
|
514
514
|
l[e.rounded]
|
|
515
515
|
]])
|
|
516
516
|
}, [
|
|
517
|
-
w(
|
|
517
|
+
w(o.$slots, "default")
|
|
518
518
|
], 2));
|
|
519
519
|
}
|
|
520
520
|
}, Ut = {
|
|
@@ -523,13 +523,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
523
523
|
}, Rt = { class: "flex items-center" }, Ht = { class: "flex-shrink-0" }, qt = { class: "ml-3 w-0 flex-1" }, Pt = { class: "text-sm font-medium text-white" }, Wt = { class: "ml-4 flex-shrink-0 flex" }, Gt = { class: "sr-only" }, Xt = {
|
|
524
524
|
__name: "Banner",
|
|
525
525
|
setup(e) {
|
|
526
|
-
const
|
|
526
|
+
const a = tt(), { t } = lt(), l = j(!1), o = j("success"), u = j(""), d = j(!1);
|
|
527
527
|
let f = null;
|
|
528
528
|
const $ = () => {
|
|
529
529
|
d.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
|
d.value = !0;
|
|
535
535
|
}, 50), f = setTimeout(() => {
|
|
@@ -537,49 +537,49 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
537
537
|
}, 5e3);
|
|
538
538
|
};
|
|
539
539
|
return Qe(async () => {
|
|
540
|
-
const C =
|
|
541
|
-
h && (
|
|
540
|
+
const C = a.props.jetstream.flash?.bannerStyle || "success", h = a.props.jetstream.flash?.banner || "";
|
|
541
|
+
h && (o.value = C, u.value = h, y());
|
|
542
542
|
}), ee(() => {
|
|
543
|
-
u.value &&
|
|
544
|
-
}), (C, h) => l.value ? (
|
|
545
|
-
|
|
543
|
+
u.value && y();
|
|
544
|
+
}), (C, h) => l.value ? (s(), i("div", Ut, [
|
|
545
|
+
r("div", {
|
|
546
546
|
class: k([
|
|
547
547
|
"transform transition-all duration-300 ease-out shadow-lg rounded-lg p-4 min-w-[300px] max-w-md",
|
|
548
548
|
d.value ? "translate-y-0 opacity-100" : "translate-y-full opacity-0",
|
|
549
|
-
|
|
549
|
+
o.value === "success" ? "bg-green-600" : "bg-red-600"
|
|
550
550
|
])
|
|
551
551
|
}, [
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
552
|
+
r("div", Rt, [
|
|
553
|
+
r("div", Ht, [
|
|
554
|
+
r("div", {
|
|
555
555
|
class: k([
|
|
556
556
|
"flex p-2 rounded-full",
|
|
557
|
-
|
|
557
|
+
o.value === "success" ? "bg-green-700" : "bg-red-700"
|
|
558
558
|
])
|
|
559
559
|
}, [
|
|
560
|
-
|
|
560
|
+
o.value === "success" ? (s(), B(I(st), {
|
|
561
561
|
key: 0,
|
|
562
562
|
class: "w-5 h-5 text-white"
|
|
563
563
|
})) : D("", !0),
|
|
564
|
-
|
|
564
|
+
o.value === "danger" ? (s(), B(I(Le), {
|
|
565
565
|
key: 1,
|
|
566
566
|
class: "w-5 h-5 text-white"
|
|
567
567
|
})) : D("", !0)
|
|
568
568
|
], 2)
|
|
569
569
|
]),
|
|
570
|
-
|
|
571
|
-
|
|
570
|
+
r("div", qt, [
|
|
571
|
+
r("p", Pt, T(u.value), 1)
|
|
572
572
|
]),
|
|
573
|
-
|
|
574
|
-
|
|
573
|
+
r("div", Wt, [
|
|
574
|
+
r("button", {
|
|
575
575
|
type: "button",
|
|
576
576
|
class: k(["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
|
-
|
|
577
|
+
o.value === "success" ? "hover:bg-green-700 focus:ring-offset-green-600" : "hover:bg-red-700 focus:ring-offset-red-600"
|
|
578
578
|
]]),
|
|
579
579
|
onClick: $
|
|
580
580
|
}, [
|
|
581
|
-
|
|
582
|
-
R(I(
|
|
581
|
+
r("span", Gt, T(I(t)("Dismiss")), 1),
|
|
582
|
+
R(I(at), { class: "w-5 h-5" })
|
|
583
583
|
], 2)
|
|
584
584
|
])
|
|
585
585
|
])
|
|
@@ -605,18 +605,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
605
605
|
}
|
|
606
606
|
},
|
|
607
607
|
setup(e) {
|
|
608
|
-
const
|
|
609
|
-
primary: "bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-[
|
|
610
|
-
secondary: "bg-gradient-to-r from-
|
|
611
|
-
tertiary: "
|
|
612
|
-
warning: "border border-
|
|
613
|
-
danger: "border border-
|
|
614
|
-
},
|
|
615
|
-
"min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg
|
|
616
|
-
l[
|
|
617
|
-
|
|
608
|
+
const a = ne(), t = e, l = {
|
|
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
|
+
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
|
+
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
|
+
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
|
+
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
|
+
}, o = g(() => l[t.variant] ? t.variant : "primary"), u = g(() => [
|
|
615
|
+
"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[o.value],
|
|
617
|
+
a.class
|
|
618
618
|
]);
|
|
619
|
-
return (d, f) => (
|
|
619
|
+
return (d, f) => (s(), i("button", z(I(a), {
|
|
620
620
|
type: e.type,
|
|
621
621
|
disabled: e.disabled,
|
|
622
622
|
class: u.value
|
|
@@ -637,8 +637,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
637
637
|
}
|
|
638
638
|
},
|
|
639
639
|
emits: ["update:checked"],
|
|
640
|
-
setup(e, { emit:
|
|
641
|
-
const t =
|
|
640
|
+
setup(e, { emit: a }) {
|
|
641
|
+
const t = a, l = e, o = g({
|
|
642
642
|
get() {
|
|
643
643
|
return l.checked;
|
|
644
644
|
},
|
|
@@ -646,13 +646,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
646
646
|
t("update:checked", u);
|
|
647
647
|
}
|
|
648
648
|
});
|
|
649
|
-
return (u, d) => Z((
|
|
650
|
-
"onUpdate:modelValue": d[0] || (d[0] = (f) =>
|
|
649
|
+
return (u, d) => Z((s(), i("input", {
|
|
650
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => o.value = f),
|
|
651
651
|
type: "checkbox",
|
|
652
652
|
value: e.value,
|
|
653
653
|
class: "rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
|
|
654
654
|
}, null, 8, Yt)), [
|
|
655
|
-
[Ye,
|
|
655
|
+
[Ye, o.value]
|
|
656
656
|
]);
|
|
657
657
|
}
|
|
658
658
|
}, Zt = ["checked", "disabled"], je = {
|
|
@@ -680,43 +680,43 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
680
680
|
}
|
|
681
681
|
},
|
|
682
682
|
emits: ["update:modelValue"],
|
|
683
|
-
setup(e, { emit:
|
|
684
|
-
const t =
|
|
683
|
+
setup(e, { emit: a }) {
|
|
684
|
+
const t = a, l = e, o = g(() => l.modelValue === l.value), u = j(!1), d = () => {
|
|
685
685
|
u.value = !0;
|
|
686
686
|
}, f = () => {
|
|
687
687
|
u.value = !1;
|
|
688
|
-
}, $ = (
|
|
689
|
-
t("update:modelValue",
|
|
688
|
+
}, $ = (y) => {
|
|
689
|
+
t("update:modelValue", y.target.checked ? l.value : l.uncheckedValue);
|
|
690
690
|
};
|
|
691
|
-
return (
|
|
691
|
+
return (y, C) => (s(), i("label", {
|
|
692
692
|
class: k(["inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
693
|
-
|
|
693
|
+
o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
694
694
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
695
695
|
u.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
696
696
|
]])
|
|
697
697
|
}, [
|
|
698
|
-
|
|
698
|
+
r("input", {
|
|
699
699
|
type: "checkbox",
|
|
700
700
|
class: "sr-only",
|
|
701
|
-
checked:
|
|
701
|
+
checked: o.value,
|
|
702
702
|
disabled: e.disabled,
|
|
703
703
|
onChange: $,
|
|
704
704
|
onFocus: d,
|
|
705
705
|
onBlur: f
|
|
706
706
|
}, null, 40, Zt),
|
|
707
|
-
|
|
707
|
+
r("span", {
|
|
708
708
|
class: k(["inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none", [
|
|
709
|
-
|
|
709
|
+
o.value ? "border-current bg-white/15 text-current" : "border-current/70 text-transparent",
|
|
710
710
|
"rounded"
|
|
711
711
|
]])
|
|
712
712
|
}, " ✓ ", 2),
|
|
713
|
-
|
|
713
|
+
r("span", null, T(e.label), 1)
|
|
714
714
|
], 2));
|
|
715
715
|
}
|
|
716
716
|
}, el = { class: "relative flex items-center" }, tl = {
|
|
717
717
|
key: 0,
|
|
718
|
-
class: "absolute inset-y-0 left-0
|
|
719
|
-
}, ll = ["type", "value", "disabled"],
|
|
718
|
+
class: "absolute inset-y-0 left-0 flex items-center pointer-events-none pl-3"
|
|
719
|
+
}, ll = ["type", "value", "disabled"], sl = ["aria-label"], al = {
|
|
720
720
|
key: 0,
|
|
721
721
|
class: "h-5 w-5",
|
|
722
722
|
fill: "none",
|
|
@@ -728,7 +728,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
728
728
|
fill: "none",
|
|
729
729
|
stroke: "currentColor",
|
|
730
730
|
viewBox: "0 0 24 24"
|
|
731
|
-
},
|
|
731
|
+
}, ol = 254, Oe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
732
732
|
__name: "TextInput",
|
|
733
733
|
props: {
|
|
734
734
|
modelValue: {
|
|
@@ -741,19 +741,19 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
741
741
|
},
|
|
742
742
|
disabledClass: {
|
|
743
743
|
type: String,
|
|
744
|
-
default: "!bg-
|
|
744
|
+
default: "!bg-slate-100"
|
|
745
745
|
}
|
|
746
746
|
},
|
|
747
747
|
emits: ["update:modelValue", "blur"],
|
|
748
|
-
setup(e, { expose:
|
|
749
|
-
const l = e,
|
|
748
|
+
setup(e, { expose: a, emit: t }) {
|
|
749
|
+
const l = e, o = t, u = ne(), d = j(null), f = j(!1), $ = g(() => String(u.type ?? "text")), y = g(() => $.value === "password"), C = g(() => y.value && f.value ? "text" : $.value), h = g(() => l.modelValue ?? ""), v = g(() => {
|
|
750
750
|
const { class: L, type: E, ...F } = u;
|
|
751
|
-
return F.maxlength === void 0 && (F.maxlength =
|
|
751
|
+
return F.maxlength === void 0 && (F.maxlength = ol), F;
|
|
752
752
|
}), S = g(() => [
|
|
753
|
-
"w-full min-w-0 max-w-full border-
|
|
753
|
+
"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
754
|
u.class,
|
|
755
|
-
|
|
756
|
-
]),
|
|
755
|
+
y.value ? "pr-10 pl-10" : ""
|
|
756
|
+
]), m = () => {
|
|
757
757
|
f.value = !f.value;
|
|
758
758
|
}, M = (L) => {
|
|
759
759
|
if (C.value !== "number")
|
|
@@ -764,11 +764,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
764
764
|
};
|
|
765
765
|
return ee(() => {
|
|
766
766
|
d.value?.hasAttribute("autofocus") && d.value.focus();
|
|
767
|
-
}),
|
|
768
|
-
|
|
769
|
-
R(I(nt), { class: "h-5 w-5 text-
|
|
767
|
+
}), a({ focus: () => d.value?.focus() }), (L, E) => (s(), i("div", el, [
|
|
768
|
+
y.value ? (s(), i("div", tl, [
|
|
769
|
+
R(I(nt), { class: "h-5 w-5 text-slate-400" })
|
|
770
770
|
])) : D("", !0),
|
|
771
|
-
|
|
771
|
+
r("input", z({
|
|
772
772
|
ref_key: "input",
|
|
773
773
|
ref: d
|
|
774
774
|
}, v.value, {
|
|
@@ -776,42 +776,42 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
776
776
|
class: [S.value, l.disabled ? l.disabledClass : null],
|
|
777
777
|
value: h.value,
|
|
778
778
|
disabled: l.disabled,
|
|
779
|
-
onInput: E[0] || (E[0] = (F) =>
|
|
780
|
-
onBlur: E[1] || (E[1] = (F) =>
|
|
779
|
+
onInput: E[0] || (E[0] = (F) => o("update:modelValue", F.target.value)),
|
|
780
|
+
onBlur: E[1] || (E[1] = (F) => o("blur", F)),
|
|
781
781
|
onWheel: M
|
|
782
782
|
}), null, 16, ll),
|
|
783
|
-
|
|
783
|
+
y.value ? (s(), i("button", {
|
|
784
784
|
key: 1,
|
|
785
785
|
type: "button",
|
|
786
|
-
class: "absolute inset-y-0 right-0 flex items-center pr-3 text-
|
|
786
|
+
class: "absolute inset-y-0 right-0 flex items-center pr-3 text-slate-400 hover:text-slate-600 focus:outline-none",
|
|
787
787
|
"aria-label": f.value ? "Hide password" : "Show password",
|
|
788
|
-
onClick:
|
|
788
|
+
onClick: m
|
|
789
789
|
}, [
|
|
790
|
-
f.value ? (
|
|
791
|
-
|
|
790
|
+
f.value ? (s(), i("svg", al, [...E[2] || (E[2] = [
|
|
791
|
+
r("path", {
|
|
792
792
|
"stroke-linecap": "round",
|
|
793
793
|
"stroke-linejoin": "round",
|
|
794
794
|
"stroke-width": "2",
|
|
795
795
|
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
796
|
}, null, -1)
|
|
797
|
-
])])) : (
|
|
798
|
-
|
|
797
|
+
])])) : (s(), i("svg", nl, [...E[3] || (E[3] = [
|
|
798
|
+
r("path", {
|
|
799
799
|
"stroke-linecap": "round",
|
|
800
800
|
"stroke-linejoin": "round",
|
|
801
801
|
"stroke-width": "2",
|
|
802
802
|
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
803
803
|
}, null, -1),
|
|
804
|
-
|
|
804
|
+
r("path", {
|
|
805
805
|
"stroke-linecap": "round",
|
|
806
806
|
"stroke-linejoin": "round",
|
|
807
807
|
"stroke-width": "2",
|
|
808
808
|
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
809
|
}, null, -1)
|
|
810
810
|
])]))
|
|
811
|
-
], 8,
|
|
811
|
+
], 8, sl)) : D("", !0)
|
|
812
812
|
]));
|
|
813
813
|
}
|
|
814
|
-
}),
|
|
814
|
+
}), rl = ["value", "disabled"], il = 1e3, ze = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
815
815
|
__name: "TextArea",
|
|
816
816
|
props: {
|
|
817
817
|
modelValue: String,
|
|
@@ -829,29 +829,29 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
829
829
|
}
|
|
830
830
|
},
|
|
831
831
|
emits: ["update:modelValue"],
|
|
832
|
-
setup(e, { expose:
|
|
833
|
-
const l = e,
|
|
832
|
+
setup(e, { expose: a, emit: t }) {
|
|
833
|
+
const l = e, o = t, u = ne(), d = j(null), f = g(() => {
|
|
834
834
|
const { class: h, ...v } = u;
|
|
835
835
|
return v.maxlength === void 0 && (v.maxlength = il), v;
|
|
836
836
|
}), $ = g(() => [
|
|
837
837
|
"w-full min-w-0 max-w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
838
838
|
l.autoResize ? "resize-none overflow-y-auto" : "resize-y",
|
|
839
839
|
u.class
|
|
840
|
-
]),
|
|
840
|
+
]), y = () => {
|
|
841
841
|
!l.autoResize || !d.value || (d.value.style.height = "auto", d.value.style.height = `${d.value.scrollHeight}px`);
|
|
842
842
|
}, C = (h) => {
|
|
843
|
-
|
|
843
|
+
o("update:modelValue", h.target.value), y();
|
|
844
844
|
};
|
|
845
845
|
return ee(() => {
|
|
846
|
-
d.value?.hasAttribute("autofocus") && d.value.focus(),
|
|
847
|
-
|
|
846
|
+
d.value?.hasAttribute("autofocus") && d.value.focus(), ye(() => {
|
|
847
|
+
y();
|
|
848
848
|
});
|
|
849
849
|
}), Q(() => l.modelValue, () => {
|
|
850
|
-
|
|
851
|
-
|
|
850
|
+
ye(() => {
|
|
851
|
+
y();
|
|
852
852
|
});
|
|
853
|
-
}),
|
|
854
|
-
|
|
853
|
+
}), a({ focus: () => d.value?.focus() }), (h, v) => (s(), i("div", null, [
|
|
854
|
+
r("textarea", z({
|
|
855
855
|
ref_key: "textarea",
|
|
856
856
|
ref: d
|
|
857
857
|
}, f.value, {
|
|
@@ -859,7 +859,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
859
859
|
value: l.modelValue,
|
|
860
860
|
disabled: l.disabled,
|
|
861
861
|
onInput: C
|
|
862
|
-
}), null, 16,
|
|
862
|
+
}), null, 16, rl)
|
|
863
863
|
]));
|
|
864
864
|
}
|
|
865
865
|
}), dl = ["onClick"], Ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -947,8 +947,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
947
947
|
}
|
|
948
948
|
},
|
|
949
949
|
emits: ["update:modelValue"],
|
|
950
|
-
setup(e, { emit:
|
|
951
|
-
const t = e, l =
|
|
950
|
+
setup(e, { emit: a }) {
|
|
951
|
+
const t = e, l = a, o = ne(), u = j(!1), d = j(null), f = j(null), $ = j(null), y = j({}), C = (x) => typeof x == "object" && x !== null, h = (x) => C(x) ? x[t.valueKey] : x, v = (x) => t.optionLabel ? t.optionLabel(x) : C(x) ? x[t.labelKey] ?? x[t.valueKey] ?? "" : x, S = (x) => !t.softDeleteAware || !C(x) ? !1 : !!x[t.deletedKey], m = g(() => String(t.modelValue ?? "")), M = g(() => !t.softDeleteAware || m.value === "" ? null : t.options.find((x) => S(x) && String(h(x) ?? "") === m.value) ?? null), L = g(() => t.softDeleteAware ? t.options.filter((x) => !S(x)) : t.options), E = g(() => {
|
|
952
952
|
if (t.modelValue === null || t.modelValue === void 0 || t.modelValue === "" && !t.options.some((N) => h(N) === ""))
|
|
953
953
|
return t.placeholder;
|
|
954
954
|
const x = t.options.find((N) => {
|
|
@@ -956,7 +956,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
956
956
|
return K === t.modelValue || String(K) === String(t.modelValue);
|
|
957
957
|
});
|
|
958
958
|
return x ? v(x) : t.modelValue;
|
|
959
|
-
}), F = (x) => t.modelModifiers.number ? x === "" ? "" : Number(x) : x,
|
|
959
|
+
}), F = (x) => t.modelModifiers.number ? x === "" ? "" : Number(x) : x, oe = () => {
|
|
960
960
|
t.disabled || (u.value = !u.value);
|
|
961
961
|
}, Y = (x) => {
|
|
962
962
|
const N = h(x);
|
|
@@ -966,12 +966,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
966
966
|
}, G = () => {
|
|
967
967
|
if (!f.value)
|
|
968
968
|
return;
|
|
969
|
-
const x = f.value.getBoundingClientRect(), N = window.innerWidth, K = window.innerHeight, X = K - x.bottom - 8, te = x.top - 8, le = X < 240 && te > X,
|
|
970
|
-
|
|
969
|
+
const x = f.value.getBoundingClientRect(), N = window.innerWidth, K = window.innerHeight, X = K - x.bottom - 8, te = x.top - 8, le = X < 240 && te > X, se = Math.min(x.width, Math.max(N - x.left - 16, 160)), ae = Math.max(Math.min(240, le ? te : X), 120);
|
|
970
|
+
y.value = {
|
|
971
971
|
position: "fixed",
|
|
972
972
|
left: `${Math.max(x.left, 8)}px`,
|
|
973
|
-
width: `${
|
|
974
|
-
maxHeight: `${
|
|
973
|
+
width: `${se}px`,
|
|
974
|
+
maxHeight: `${ae}px`,
|
|
975
975
|
zIndex: "9999",
|
|
976
976
|
...le ? { bottom: `${K - x.top + 1}px` } : { top: `${x.bottom - 1}px` }
|
|
977
977
|
};
|
|
@@ -984,31 +984,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
984
984
|
}), Je(() => {
|
|
985
985
|
document.removeEventListener("click", J), window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
986
986
|
}), Q(u, async (x) => {
|
|
987
|
-
x && (await
|
|
988
|
-
}), (x, N) => (
|
|
987
|
+
x && (await ye(), G());
|
|
988
|
+
}), (x, N) => (s(), i("div", {
|
|
989
989
|
ref_key: "rootRef",
|
|
990
990
|
ref: d,
|
|
991
991
|
class: "relative",
|
|
992
|
-
onClick:
|
|
992
|
+
onClick: oe
|
|
993
993
|
}, [
|
|
994
|
-
|
|
994
|
+
r("div", z({
|
|
995
995
|
ref_key: "triggerRef",
|
|
996
996
|
ref: f,
|
|
997
997
|
class: [
|
|
998
998
|
e.baseClass,
|
|
999
999
|
M.value ? e.deletedSelectedClass : e.normalTextClass,
|
|
1000
1000
|
"flex items-center justify-between cursor-pointer",
|
|
1001
|
-
I(
|
|
1001
|
+
I(o).class
|
|
1002
1002
|
]
|
|
1003
|
-
}, I(
|
|
1004
|
-
|
|
1003
|
+
}, I(o), { tabindex: "0" }), [
|
|
1004
|
+
r("span", {
|
|
1005
1005
|
class: k({ "text-gray-400": !e.modelValue && e.placeholder })
|
|
1006
1006
|
}, T(E.value), 3),
|
|
1007
1007
|
R(I(xe), {
|
|
1008
1008
|
class: k(["size-5 text-gray-400 transition-transform", { "rotate-180": u.value }])
|
|
1009
1009
|
}, null, 8, ["class"])
|
|
1010
1010
|
], 16),
|
|
1011
|
-
R(
|
|
1011
|
+
R(re, {
|
|
1012
1012
|
"enter-active-class": "transition-all duration-200 ease-out",
|
|
1013
1013
|
"enter-from-class": "opacity-0 transform scale-95 -translate-y-2",
|
|
1014
1014
|
"enter-to-class": "opacity-100 transform scale-100 translate-y-0",
|
|
@@ -1017,15 +1017,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1017
1017
|
"leave-to-class": "opacity-0 transform scale-95 -translate-y-2"
|
|
1018
1018
|
}, {
|
|
1019
1019
|
default: O(() => [
|
|
1020
|
-
(
|
|
1021
|
-
u.value ? (
|
|
1020
|
+
(s(), B(Ze, { to: "body" }, [
|
|
1021
|
+
u.value ? (s(), i("div", {
|
|
1022
1022
|
key: 0,
|
|
1023
1023
|
ref_key: "dropdownMenuRef",
|
|
1024
1024
|
ref: $,
|
|
1025
1025
|
class: k(e.dropdownClass),
|
|
1026
|
-
style: Te(
|
|
1026
|
+
style: Te(y.value)
|
|
1027
1027
|
}, [
|
|
1028
|
-
e.placeholder ? (
|
|
1028
|
+
e.placeholder ? (s(), i("div", {
|
|
1029
1029
|
key: 0,
|
|
1030
1030
|
class: k([
|
|
1031
1031
|
e.dropdownOptionClass,
|
|
@@ -1034,7 +1034,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1034
1034
|
]),
|
|
1035
1035
|
onClick: ve(W, ["stop"])
|
|
1036
1036
|
}, T(e.placeholder), 3)) : D("", !0),
|
|
1037
|
-
M.value ? (
|
|
1037
|
+
M.value ? (s(), i("div", {
|
|
1038
1038
|
key: 1,
|
|
1039
1039
|
class: k([
|
|
1040
1040
|
e.dropdownOptionClass,
|
|
@@ -1042,7 +1042,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1042
1042
|
e.dropdownSelectedClass
|
|
1043
1043
|
])
|
|
1044
1044
|
}, T(v(M.value)), 3)) : D("", !0),
|
|
1045
|
-
(
|
|
1045
|
+
(s(!0), i(q, null, P(L.value, (K) => (s(), i("div", {
|
|
1046
1046
|
key: String(h(K)),
|
|
1047
1047
|
class: k([
|
|
1048
1048
|
e.dropdownOptionClass,
|
|
@@ -1111,11 +1111,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1111
1111
|
},
|
|
1112
1112
|
baseClass: {
|
|
1113
1113
|
type: [String, Array, Object],
|
|
1114
|
-
default: "block w-full rounded-
|
|
1114
|
+
default: "block w-full rounded-lg border border-slate-300 bg-white px-4 py-3 text-sm text-slate-900 shadow-sm focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20"
|
|
1115
1115
|
},
|
|
1116
1116
|
normalTextClass: {
|
|
1117
1117
|
type: [String, Array, Object],
|
|
1118
|
-
default: "text-
|
|
1118
|
+
default: "text-slate-900"
|
|
1119
1119
|
},
|
|
1120
1120
|
deletedSelectedClass: {
|
|
1121
1121
|
type: [String, Array, Object],
|
|
@@ -1123,33 +1123,33 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1123
1123
|
},
|
|
1124
1124
|
optionClass: {
|
|
1125
1125
|
type: [String, Array, Object],
|
|
1126
|
-
default: "text-
|
|
1126
|
+
default: "text-slate-900"
|
|
1127
1127
|
},
|
|
1128
1128
|
deletedOptionClass: {
|
|
1129
1129
|
type: [String, Array, Object],
|
|
1130
|
-
default: "text-
|
|
1130
|
+
default: "text-rose-700"
|
|
1131
1131
|
},
|
|
1132
1132
|
placeholderClass: {
|
|
1133
1133
|
type: [String, Array, Object],
|
|
1134
|
-
default: "text-
|
|
1134
|
+
default: "text-slate-500"
|
|
1135
1135
|
},
|
|
1136
1136
|
dropdownClass: {
|
|
1137
1137
|
type: [String, Array, Object],
|
|
1138
|
-
default: "bg-white border border-
|
|
1138
|
+
default: "bg-white/95 border border-slate-200 rounded-xl shadow-xl max-h-60 overflow-auto z-50 backdrop-blur-sm"
|
|
1139
1139
|
},
|
|
1140
1140
|
dropdownOptionClass: {
|
|
1141
1141
|
type: [String, Array, Object],
|
|
1142
|
-
default: "px-4 py-3 hover:bg-
|
|
1142
|
+
default: "px-4 py-3 hover:bg-slate-100 cursor-pointer transition-colors"
|
|
1143
1143
|
},
|
|
1144
1144
|
dropdownSelectedClass: {
|
|
1145
1145
|
type: [String, Array, Object],
|
|
1146
|
-
default: "bg-
|
|
1146
|
+
default: "bg-blue-50 text-blue-700 font-medium"
|
|
1147
1147
|
}
|
|
1148
1148
|
},
|
|
1149
1149
|
emits: ["update:modelValue"],
|
|
1150
|
-
setup(e, { emit:
|
|
1151
|
-
const t =
|
|
1152
|
-
return (l,
|
|
1150
|
+
setup(e, { emit: a }) {
|
|
1151
|
+
const t = a;
|
|
1152
|
+
return (l, o) => (s(), B(Ee, z({
|
|
1153
1153
|
"model-value": e.modelValue,
|
|
1154
1154
|
"model-modifiers": e.modelModifiers,
|
|
1155
1155
|
options: e.options,
|
|
@@ -1170,7 +1170,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1170
1170
|
"dropdown-class": e.dropdownClass,
|
|
1171
1171
|
"dropdown-option-class": e.dropdownOptionClass,
|
|
1172
1172
|
"dropdown-selected-class": e.dropdownSelectedClass,
|
|
1173
|
-
"onUpdate:modelValue":
|
|
1173
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t("update:modelValue", u))
|
|
1174
1174
|
}, 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
1175
|
}
|
|
1176
1176
|
}, ul = ["type", "max", "value", "disabled"], Ne = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -1194,31 +1194,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1194
1194
|
}
|
|
1195
1195
|
},
|
|
1196
1196
|
emits: ["update:modelValue"],
|
|
1197
|
-
setup(e, { expose:
|
|
1198
|
-
const l = e,
|
|
1199
|
-
const
|
|
1200
|
-
return typeof M != "string" || M === "" || M >
|
|
1197
|
+
setup(e, { expose: a, emit: t }) {
|
|
1198
|
+
const l = e, o = t, u = ne(), d = j(null), f = g(() => l.withTimestamp ? "datetime-local" : "date"), $ = g(() => l.modelValue ?? ""), y = g(() => {
|
|
1199
|
+
const m = l.withTimestamp ? "9999-12-31T23:59" : "9999-12-31", M = u.max;
|
|
1200
|
+
return typeof M != "string" || M === "" || M > m ? m : M;
|
|
1201
1201
|
}), C = g(() => {
|
|
1202
|
-
const { class:
|
|
1202
|
+
const { class: m, type: M, ...L } = u;
|
|
1203
1203
|
return L;
|
|
1204
1204
|
}), h = g(() => [
|
|
1205
1205
|
"w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
1206
1206
|
u.class
|
|
1207
|
-
]), v = (
|
|
1208
|
-
const M =
|
|
1207
|
+
]), v = (m) => typeof m != "string" ? "" : m.replace(/^(\d{4})\d+/, "$1"), S = (m) => {
|
|
1208
|
+
const M = m.target;
|
|
1209
1209
|
if (!M)
|
|
1210
1210
|
return;
|
|
1211
1211
|
const L = String(M.value ?? ""), E = v(L);
|
|
1212
|
-
E !== L && (M.value = E),
|
|
1212
|
+
E !== L && (M.value = E), o("update:modelValue", E);
|
|
1213
1213
|
};
|
|
1214
1214
|
return ee(() => {
|
|
1215
1215
|
d.value?.hasAttribute("autofocus") && d.value.focus();
|
|
1216
|
-
}),
|
|
1216
|
+
}), a({ focus: () => d.value?.focus() }), (m, M) => (s(), i("input", z({
|
|
1217
1217
|
ref_key: "input",
|
|
1218
1218
|
ref: d
|
|
1219
1219
|
}, C.value, {
|
|
1220
1220
|
type: f.value,
|
|
1221
|
-
max:
|
|
1221
|
+
max: y.value,
|
|
1222
1222
|
class: [h.value, l.disabled ? l.disabledClass : null],
|
|
1223
1223
|
value: $.value,
|
|
1224
1224
|
disabled: l.disabled,
|
|
@@ -1226,10 +1226,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1226
1226
|
onChange: S
|
|
1227
1227
|
}), null, 16, ul));
|
|
1228
1228
|
}
|
|
1229
|
-
}), cl = { class: "relative" }, fl = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, gl = ["accept"],
|
|
1229
|
+
}), cl = { class: "relative" }, fl = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, gl = ["accept"], pl = {
|
|
1230
1230
|
key: 0,
|
|
1231
1231
|
class: "mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200"
|
|
1232
|
-
},
|
|
1232
|
+
}, ml = { class: "flex items-center space-x-4" }, bl = ["src"], yl = { class: "text-sm font-medium text-gray-900" }, vl = { class: "text-xs text-gray-500" }, Ke = {
|
|
1233
1233
|
__name: "ImageInput",
|
|
1234
1234
|
props: {
|
|
1235
1235
|
currentImageUrl: {
|
|
@@ -1254,33 +1254,33 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1254
1254
|
}
|
|
1255
1255
|
},
|
|
1256
1256
|
emits: ["update:modelValue"],
|
|
1257
|
-
setup(e, { emit:
|
|
1258
|
-
const t =
|
|
1257
|
+
setup(e, { emit: a }) {
|
|
1258
|
+
const t = a, l = e, o = (u) => {
|
|
1259
1259
|
const d = u.target.files?.[0] ?? null;
|
|
1260
1260
|
t("update:modelValue", d);
|
|
1261
1261
|
};
|
|
1262
|
-
return (u, d) => (
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
R(I(
|
|
1262
|
+
return (u, d) => (s(), i("div", null, [
|
|
1263
|
+
r("div", cl, [
|
|
1264
|
+
r("div", fl, [
|
|
1265
|
+
R(I(ot), { class: "size-5 text-gray-400" })
|
|
1266
1266
|
]),
|
|
1267
|
-
|
|
1267
|
+
r("input", z(e.attrs, {
|
|
1268
1268
|
type: "file",
|
|
1269
1269
|
accept: e.accept,
|
|
1270
1270
|
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:
|
|
1271
|
+
onChange: o
|
|
1272
1272
|
}), null, 16, gl)
|
|
1273
1273
|
]),
|
|
1274
|
-
l.currentImageUrl ? (
|
|
1275
|
-
|
|
1276
|
-
|
|
1274
|
+
l.currentImageUrl ? (s(), i("div", pl, [
|
|
1275
|
+
r("div", ml, [
|
|
1276
|
+
r("img", {
|
|
1277
1277
|
src: l.currentImageUrl,
|
|
1278
1278
|
alt: "Current logo",
|
|
1279
1279
|
class: "h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm"
|
|
1280
|
-
}, null, 8,
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1280
|
+
}, null, 8, bl),
|
|
1281
|
+
r("div", null, [
|
|
1282
|
+
r("p", yl, T(l.currentLabel), 1),
|
|
1283
|
+
r("p", vl, T(l.currentSubtext), 1)
|
|
1284
1284
|
])
|
|
1285
1285
|
])
|
|
1286
1286
|
])) : D("", !0)
|
|
@@ -1303,21 +1303,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1303
1303
|
}
|
|
1304
1304
|
},
|
|
1305
1305
|
emits: ["update:modelValue"],
|
|
1306
|
-
setup(e, { emit:
|
|
1307
|
-
const t =
|
|
1308
|
-
return (f, $) => (
|
|
1309
|
-
(
|
|
1310
|
-
key: `notation-${C}-${
|
|
1306
|
+
setup(e, { emit: a }) {
|
|
1307
|
+
const t = a, l = e, o = g(() => l.options.map((f) => f == null ? "" : String(f).trim()).filter((f) => f !== "")), u = (f) => String(f) === String(l.modelValue ?? ""), d = (f) => t("update:modelValue", f);
|
|
1308
|
+
return (f, $) => (s(), i("div", hl, [
|
|
1309
|
+
(s(!0), i(q, null, P(o.value, (y, C) => (s(), i("button", {
|
|
1310
|
+
key: `notation-${C}-${y}`,
|
|
1311
1311
|
type: "button",
|
|
1312
1312
|
class: k(["flex-1 border-l border-gray-300 px-2 text-center font-semibold transition-colors duration-150 first:border-l-0", [
|
|
1313
1313
|
C === 0 ? "rounded-l-lg" : "",
|
|
1314
|
-
C ===
|
|
1315
|
-
u(
|
|
1314
|
+
C === o.value.length - 1 ? "rounded-r-lg" : "",
|
|
1315
|
+
u(y) ? "bg-indigo-600 text-white" : "bg-white text-gray-700 hover:bg-gray-50",
|
|
1316
1316
|
"focus-visible:ring-2 "
|
|
1317
1317
|
]]),
|
|
1318
1318
|
disabled: e.disabled,
|
|
1319
|
-
onClick: (h) => d(
|
|
1320
|
-
}, T(
|
|
1319
|
+
onClick: (h) => d(y)
|
|
1320
|
+
}, T(y), 11, xl))), 128))
|
|
1321
1321
|
]));
|
|
1322
1322
|
}
|
|
1323
1323
|
}, wl = ["name", "value", "checked", "disabled"], Re = {
|
|
@@ -1345,31 +1345,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1345
1345
|
}
|
|
1346
1346
|
},
|
|
1347
1347
|
emits: ["update:modelValue"],
|
|
1348
|
-
setup(e, { emit:
|
|
1349
|
-
const t =
|
|
1348
|
+
setup(e, { emit: a }) {
|
|
1349
|
+
const t = a, l = e, o = g(() => String(l.modelValue ?? "") === String(l.value)), u = j(!1), d = () => {
|
|
1350
1350
|
u.value = !0;
|
|
1351
1351
|
}, f = () => {
|
|
1352
1352
|
u.value = !1;
|
|
1353
1353
|
}, $ = () => t("update:modelValue", l.value);
|
|
1354
|
-
return (
|
|
1354
|
+
return (y, C) => (s(), i("label", {
|
|
1355
1355
|
class: k(["inline-flex items-center rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
1356
|
-
|
|
1356
|
+
o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
1357
1357
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
1358
1358
|
u.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
1359
1359
|
]])
|
|
1360
1360
|
}, [
|
|
1361
|
-
|
|
1361
|
+
r("input", {
|
|
1362
1362
|
type: "radio",
|
|
1363
1363
|
class: "sr-only",
|
|
1364
1364
|
name: e.name,
|
|
1365
1365
|
value: e.value,
|
|
1366
|
-
checked:
|
|
1366
|
+
checked: o.value,
|
|
1367
1367
|
disabled: e.disabled,
|
|
1368
1368
|
onChange: $,
|
|
1369
1369
|
onFocus: d,
|
|
1370
1370
|
onBlur: f
|
|
1371
1371
|
}, null, 40, wl),
|
|
1372
|
-
|
|
1372
|
+
r("span", null, T(o.value ? "✓" : "○") + " " + T(e.label), 1)
|
|
1373
1373
|
], 2));
|
|
1374
1374
|
}
|
|
1375
1375
|
}, kl = { class: "flex flex-wrap gap-3" }, He = {
|
|
@@ -1393,10 +1393,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1393
1393
|
}
|
|
1394
1394
|
},
|
|
1395
1395
|
emits: ["update:modelValue"],
|
|
1396
|
-
setup(e, { emit:
|
|
1397
|
-
const t =
|
|
1398
|
-
return (d, f) => (
|
|
1399
|
-
(
|
|
1396
|
+
setup(e, { emit: a }) {
|
|
1397
|
+
const t = a, l = e, o = g(() => l.options.map((d) => d == null ? "" : String(d).trim()).filter((d) => d !== "")), u = (d) => t("update:modelValue", d);
|
|
1398
|
+
return (d, f) => (s(), i("div", kl, [
|
|
1399
|
+
(s(!0), i(q, null, P(o.value, ($) => (s(), B(pe, {
|
|
1400
1400
|
key: `radio-${e.name ?? "group"}-${$}`,
|
|
1401
1401
|
type: "radio-input",
|
|
1402
1402
|
"model-value": l.modelValue,
|
|
@@ -1414,7 +1414,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1414
1414
|
}, Cl = {
|
|
1415
1415
|
key: 14,
|
|
1416
1416
|
class: "flex items-center mt-2 text-sm text-red-600"
|
|
1417
|
-
}, ce = "block w-full px-4 py-3
|
|
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", pe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1418
1418
|
__name: "InputGroup",
|
|
1419
1419
|
props: {
|
|
1420
1420
|
type: {
|
|
@@ -1531,11 +1531,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1531
1531
|
}
|
|
1532
1532
|
},
|
|
1533
1533
|
emits: ["update:modelValue", "blur"],
|
|
1534
|
-
setup(e, { emit:
|
|
1535
|
-
const t = e, l =
|
|
1536
|
-
const U =
|
|
1534
|
+
setup(e, { emit: a }) {
|
|
1535
|
+
const t = e, l = a, o = ne(), u = (U) => l("update:modelValue", U), d = g(() => !!t.errorMessage), f = g(() => S.value || m.value), $ = g(() => {
|
|
1536
|
+
const U = o.id;
|
|
1537
1537
|
return typeof U == "string" && U !== "" ? U : void 0;
|
|
1538
|
-
}),
|
|
1538
|
+
}), y = [
|
|
1539
1539
|
"text",
|
|
1540
1540
|
"email",
|
|
1541
1541
|
"password",
|
|
@@ -1547,30 +1547,30 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1547
1547
|
"month",
|
|
1548
1548
|
"week",
|
|
1549
1549
|
"color"
|
|
1550
|
-
], C = [], h = g(() => t.type === "image"), v = g(() => t.type === "notation"), S = g(() => t.type === "checkbox-input"),
|
|
1551
|
-
...
|
|
1552
|
-
class: [ce,
|
|
1550
|
+
], C = [], h = g(() => t.type === "image"), v = g(() => t.type === "notation"), S = g(() => t.type === "checkbox-input"), m = g(() => t.type === "radio-input"), M = g(() => t.type === "checkbox"), L = g(() => t.type === "radio"), E = g(() => t.type === "date" || t.type === "datetime-local"), F = g(() => t.type === "textarea"), oe = g(() => t.type === "select"), Y = g(() => y.includes(t.type)), W = g(() => C.includes(t.type)), G = g(() => ({
|
|
1551
|
+
...o,
|
|
1552
|
+
class: [ce, o.class],
|
|
1553
1553
|
type: t.type,
|
|
1554
1554
|
modelValue: t.modelValue,
|
|
1555
1555
|
disabled: t.disabled,
|
|
1556
1556
|
disabledClass: t.disabledClass
|
|
1557
1557
|
})), J = g(() => ({
|
|
1558
|
-
...
|
|
1559
|
-
class: [ce,
|
|
1558
|
+
...o,
|
|
1559
|
+
class: [ce, o.class],
|
|
1560
1560
|
modelValue: t.modelValue,
|
|
1561
1561
|
disabled: t.disabled,
|
|
1562
1562
|
disabledClass: t.disabledClass
|
|
1563
1563
|
})), x = g(() => ({
|
|
1564
|
-
...
|
|
1565
|
-
class: [ce,
|
|
1564
|
+
...o,
|
|
1565
|
+
class: [ce, o.class],
|
|
1566
1566
|
modelValue: t.modelValue,
|
|
1567
1567
|
withTimestamp: t.type === "datetime-local" || t.withTimestamp,
|
|
1568
1568
|
disabled: t.disabled,
|
|
1569
1569
|
disabledClass: t.disabledClass
|
|
1570
1570
|
})), N = g(() => {
|
|
1571
1571
|
const U = {
|
|
1572
|
-
...
|
|
1573
|
-
class: [ce,
|
|
1572
|
+
...o,
|
|
1573
|
+
class: [ce, o.class],
|
|
1574
1574
|
modelValue: t.modelValue,
|
|
1575
1575
|
modelModifiers: t.modelModifiers,
|
|
1576
1576
|
options: t.options,
|
|
@@ -1585,75 +1585,75 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1585
1585
|
};
|
|
1586
1586
|
return t.baseClass !== void 0 && (U.baseClass = t.baseClass), t.normalTextClass !== void 0 && (U.normalTextClass = t.normalTextClass), t.deletedSelectedClass !== void 0 && (U.deletedSelectedClass = t.deletedSelectedClass), t.optionClass !== void 0 && (U.optionClass = t.optionClass), t.deletedOptionClass !== void 0 && (U.deletedOptionClass = t.deletedOptionClass), t.placeholderClass !== void 0 && (U.placeholderClass = t.placeholderClass), U;
|
|
1587
1587
|
}), K = g(() => ({
|
|
1588
|
-
...
|
|
1588
|
+
...o,
|
|
1589
1589
|
modelValue: t.modelValue,
|
|
1590
1590
|
options: t.options,
|
|
1591
1591
|
disabled: t.disabled
|
|
1592
1592
|
})), X = g(() => ({
|
|
1593
|
-
...
|
|
1593
|
+
...o,
|
|
1594
1594
|
modelValue: t.modelValue,
|
|
1595
1595
|
options: t.options,
|
|
1596
1596
|
disabled: t.disabled
|
|
1597
1597
|
})), te = g(() => ({
|
|
1598
|
-
...
|
|
1598
|
+
...o,
|
|
1599
1599
|
modelValue: t.modelValue,
|
|
1600
1600
|
options: t.options,
|
|
1601
|
-
name: t.name ??
|
|
1601
|
+
name: t.name ?? o.name,
|
|
1602
1602
|
disabled: t.disabled
|
|
1603
1603
|
})), le = g(() => ({
|
|
1604
|
-
...
|
|
1604
|
+
...o,
|
|
1605
1605
|
modelValue: t.modelValue,
|
|
1606
|
-
label: t.label ||
|
|
1606
|
+
label: t.label || o.label || "",
|
|
1607
1607
|
disabled: t.disabled
|
|
1608
|
-
})),
|
|
1609
|
-
...
|
|
1608
|
+
})), se = g(() => ({
|
|
1609
|
+
...o,
|
|
1610
1610
|
modelValue: t.modelValue,
|
|
1611
|
-
label: t.label ||
|
|
1612
|
-
name: t.name ??
|
|
1611
|
+
label: t.label || o.label || "",
|
|
1612
|
+
name: t.name ?? o.name,
|
|
1613
1613
|
disabled: t.disabled
|
|
1614
|
-
})),
|
|
1615
|
-
...
|
|
1616
|
-
accept: t.accept ??
|
|
1614
|
+
})), ae = g(() => ({
|
|
1615
|
+
...o,
|
|
1616
|
+
accept: t.accept ?? o.accept ?? "image/*",
|
|
1617
1617
|
modelValue: t.modelValue,
|
|
1618
1618
|
currentImageUrl: t.currentImageUrl,
|
|
1619
1619
|
currentLabel: t.currentLabel,
|
|
1620
1620
|
currentSubtext: t.currentSubtext
|
|
1621
1621
|
}));
|
|
1622
|
-
return (U, V) => (
|
|
1623
|
-
e.label && !f.value ? (
|
|
1622
|
+
return (U, V) => (s(), i("div", null, [
|
|
1623
|
+
e.label && !f.value ? (s(), i("label", {
|
|
1624
1624
|
key: 0,
|
|
1625
1625
|
for: $.value,
|
|
1626
1626
|
class: "text-base font-semibold text-gray-900 mb-1 block"
|
|
1627
1627
|
}, T(e.label), 9, Sl)) : D("", !0),
|
|
1628
|
-
e.helperText && !f.value ? (
|
|
1629
|
-
F.value ? (
|
|
1628
|
+
e.helperText && !f.value ? (s(), i("span", $l, T(e.helperText), 1)) : D("", !0),
|
|
1629
|
+
F.value ? (s(), B(ze, z({ key: 2 }, J.value, {
|
|
1630
1630
|
"onUpdate:modelValue": V[0] || (V[0] = (_) => l("update:modelValue", _)),
|
|
1631
1631
|
onBlur: V[1] || (V[1] = (_) => l("blur", _))
|
|
1632
|
-
}), null, 16)) :
|
|
1632
|
+
}), null, 16)) : oe.value ? (s(), B(Fe, z({ key: 3 }, N.value, {
|
|
1633
1633
|
"onUpdate:modelValue": V[2] || (V[2] = (_) => l("update:modelValue", _)),
|
|
1634
1634
|
onBlur: V[3] || (V[3] = (_) => l("blur", _))
|
|
1635
|
-
}), null, 16)) : E.value ? (
|
|
1635
|
+
}), null, 16)) : E.value ? (s(), B(Ne, z({ key: 4 }, x.value, {
|
|
1636
1636
|
"onUpdate:modelValue": V[4] || (V[4] = (_) => l("update:modelValue", _)),
|
|
1637
1637
|
onBlur: V[5] || (V[5] = (_) => l("blur", _))
|
|
1638
|
-
}), null, 16)) : Y.value ? (
|
|
1638
|
+
}), null, 16)) : Y.value ? (s(), B(Oe, z({ key: 5 }, G.value, {
|
|
1639
1639
|
"onUpdate:modelValue": V[6] || (V[6] = (_) => l("update:modelValue", _)),
|
|
1640
1640
|
onBlur: V[7] || (V[7] = (_) => l("blur", _))
|
|
1641
|
-
}), null, 16)) : h.value ? (
|
|
1641
|
+
}), null, 16)) : h.value ? (s(), B(Ke, z({ key: 6 }, ae.value, {
|
|
1642
1642
|
"onUpdate:modelValue": V[8] || (V[8] = (_) => l("update:modelValue", _)),
|
|
1643
1643
|
onBlur: V[9] || (V[9] = (_) => l("blur", _))
|
|
1644
|
-
}), null, 16)) : S.value ? (
|
|
1644
|
+
}), null, 16)) : S.value ? (s(), B(je, z({ key: 7 }, le.value, {
|
|
1645
1645
|
"onUpdate:modelValue": V[10] || (V[10] = (_) => l("update:modelValue", _)),
|
|
1646
1646
|
onBlur: V[11] || (V[11] = (_) => l("blur", _))
|
|
1647
|
-
}), null, 16)) :
|
|
1647
|
+
}), null, 16)) : m.value ? (s(), B(Re, z({ key: 8 }, se.value, {
|
|
1648
1648
|
"onUpdate:modelValue": V[12] || (V[12] = (_) => l("update:modelValue", _)),
|
|
1649
1649
|
onBlur: V[13] || (V[13] = (_) => l("blur", _))
|
|
1650
|
-
}), null, 16)) : v.value ? (
|
|
1650
|
+
}), null, 16)) : v.value ? (s(), B(Ue, z({ key: 9 }, K.value, {
|
|
1651
1651
|
"onUpdate:modelValue": V[14] || (V[14] = (_) => l("update:modelValue", _)),
|
|
1652
1652
|
onBlur: V[15] || (V[15] = (_) => l("blur", _))
|
|
1653
|
-
}), null, 16)) : M.value ? (
|
|
1653
|
+
}), null, 16)) : M.value ? (s(), B(qe, z({ key: 10 }, X.value, {
|
|
1654
1654
|
"onUpdate:modelValue": V[16] || (V[16] = (_) => l("update:modelValue", _)),
|
|
1655
1655
|
onBlur: V[17] || (V[17] = (_) => l("blur", _))
|
|
1656
|
-
}), null, 16)) : L.value ? (
|
|
1656
|
+
}), null, 16)) : L.value ? (s(), B(He, z({ key: 11 }, te.value, {
|
|
1657
1657
|
"onUpdate:modelValue": V[18] || (V[18] = (_) => l("update:modelValue", _)),
|
|
1658
1658
|
onBlur: V[19] || (V[19] = (_) => l("blur", _))
|
|
1659
1659
|
}), null, 16)) : W.value ? w(U.$slots, "unsupported-type", {
|
|
@@ -1661,17 +1661,17 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1661
1661
|
type: e.type,
|
|
1662
1662
|
modelValue: e.modelValue,
|
|
1663
1663
|
updateValue: u,
|
|
1664
|
-
attrs: I(
|
|
1664
|
+
attrs: I(o)
|
|
1665
1665
|
}) : w(U.$slots, "unsupported-type", {
|
|
1666
1666
|
key: 13,
|
|
1667
1667
|
type: e.type,
|
|
1668
1668
|
modelValue: e.modelValue,
|
|
1669
1669
|
updateValue: u,
|
|
1670
|
-
attrs: I(
|
|
1670
|
+
attrs: I(o)
|
|
1671
1671
|
}),
|
|
1672
|
-
d.value ? (
|
|
1673
|
-
R(I(
|
|
1674
|
-
|
|
1672
|
+
d.value ? (s(), i("div", Cl, [
|
|
1673
|
+
R(I(rt), { class: "mr-1 h-4 w-4 flex-shrink-0" }),
|
|
1674
|
+
r("span", null, T(e.errorMessage), 1)
|
|
1675
1675
|
])) : D("", !0)
|
|
1676
1676
|
]));
|
|
1677
1677
|
}
|
|
@@ -1692,21 +1692,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1692
1692
|
}
|
|
1693
1693
|
},
|
|
1694
1694
|
emits: ["update:modelValue"],
|
|
1695
|
-
setup(e, { emit:
|
|
1696
|
-
const t =
|
|
1697
|
-
const
|
|
1698
|
-
$ && C === -1 ?
|
|
1695
|
+
setup(e, { emit: a }) {
|
|
1696
|
+
const t = a, l = e, o = g(() => l.options.map((f) => f == null ? "" : String(f).trim()).filter((f) => f !== "")), u = (f) => Array.isArray(l.modelValue) && l.modelValue.includes(f), d = (f, $) => {
|
|
1697
|
+
const y = Array.isArray(l.modelValue) ? [...l.modelValue] : [], C = y.indexOf(f);
|
|
1698
|
+
$ && C === -1 ? y.push(f) : !$ && C !== -1 && y.splice(C, 1), t("update:modelValue", y);
|
|
1699
1699
|
};
|
|
1700
|
-
return (f, $) => (
|
|
1701
|
-
(
|
|
1702
|
-
key: `checkbox-${
|
|
1700
|
+
return (f, $) => (s(), i("div", Vl, [
|
|
1701
|
+
(s(!0), i(q, null, P(o.value, (y) => (s(), B(pe, {
|
|
1702
|
+
key: `checkbox-${y}`,
|
|
1703
1703
|
type: "checkbox-input",
|
|
1704
|
-
"model-value": u(
|
|
1704
|
+
"model-value": u(y),
|
|
1705
1705
|
value: !0,
|
|
1706
1706
|
"unchecked-value": !1,
|
|
1707
|
-
label:
|
|
1707
|
+
label: y,
|
|
1708
1708
|
disabled: e.disabled,
|
|
1709
|
-
"onUpdate:modelValue": (C) => d(
|
|
1709
|
+
"onUpdate:modelValue": (C) => d(y, C)
|
|
1710
1710
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]))), 128))
|
|
1711
1711
|
]));
|
|
1712
1712
|
}
|
|
@@ -1732,12 +1732,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1732
1732
|
}
|
|
1733
1733
|
},
|
|
1734
1734
|
emits: ["close"],
|
|
1735
|
-
setup(e, { emit:
|
|
1736
|
-
const t = e, l =
|
|
1737
|
-
document.body.style.overflow = "hidden", u.value = !0,
|
|
1735
|
+
setup(e, { emit: a }) {
|
|
1736
|
+
const t = e, l = a, o = j(), u = j(t.show), d = () => {
|
|
1737
|
+
document.body.style.overflow = "hidden", u.value = !0, o.value?.showModal();
|
|
1738
1738
|
}, f = () => {
|
|
1739
1739
|
document.body.style.overflow = null, setTimeout(() => {
|
|
1740
|
-
|
|
1740
|
+
o.value?.close(), u.value = !1;
|
|
1741
1741
|
}, 200);
|
|
1742
1742
|
};
|
|
1743
1743
|
Q(() => t.show, () => {
|
|
@@ -1747,11 +1747,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1747
1747
|
});
|
|
1748
1748
|
const $ = () => {
|
|
1749
1749
|
t.closeable && l("close");
|
|
1750
|
-
},
|
|
1750
|
+
}, y = (v) => {
|
|
1751
1751
|
v.key === "Escape" && (v.preventDefault(), t.show && $());
|
|
1752
1752
|
};
|
|
1753
|
-
ee(() => document.addEventListener("keydown",
|
|
1754
|
-
document.removeEventListener("keydown",
|
|
1753
|
+
ee(() => document.addEventListener("keydown", y)), Ae(() => {
|
|
1754
|
+
document.removeEventListener("keydown", y), document.body.style.overflow = null;
|
|
1755
1755
|
});
|
|
1756
1756
|
const C = g(() => ({
|
|
1757
1757
|
sm: "sm:max-w-sm",
|
|
@@ -1769,15 +1769,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1769
1769
|
return "items-center justify-center";
|
|
1770
1770
|
}
|
|
1771
1771
|
});
|
|
1772
|
-
return (v, S) => (
|
|
1772
|
+
return (v, S) => (s(), i("dialog", {
|
|
1773
1773
|
class: "z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent",
|
|
1774
1774
|
ref_key: "dialog",
|
|
1775
|
-
ref:
|
|
1775
|
+
ref: o
|
|
1776
1776
|
}, [
|
|
1777
|
-
|
|
1777
|
+
r("div", {
|
|
1778
1778
|
class: k(["fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50 flex", h.value])
|
|
1779
1779
|
}, [
|
|
1780
|
-
R(
|
|
1780
|
+
R(re, {
|
|
1781
1781
|
"enter-active-class": "ease-out duration-300",
|
|
1782
1782
|
"enter-from-class": "opacity-0",
|
|
1783
1783
|
"enter-to-class": "opacity-100",
|
|
@@ -1786,18 +1786,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1786
1786
|
"leave-to-class": "opacity-0"
|
|
1787
1787
|
}, {
|
|
1788
1788
|
default: O(() => [
|
|
1789
|
-
Z(
|
|
1789
|
+
Z(r("div", {
|
|
1790
1790
|
class: "fixed inset-0 z-40 transform transition-all",
|
|
1791
1791
|
onClick: $
|
|
1792
1792
|
}, [...S[0] || (S[0] = [
|
|
1793
|
-
|
|
1793
|
+
r("div", { class: "absolute inset-0 bg-gray-500 opacity-75" }, null, -1)
|
|
1794
1794
|
])], 512), [
|
|
1795
1795
|
[ie, e.show]
|
|
1796
1796
|
])
|
|
1797
1797
|
]),
|
|
1798
1798
|
_: 1
|
|
1799
1799
|
}),
|
|
1800
|
-
R(
|
|
1800
|
+
R(re, {
|
|
1801
1801
|
"enter-active-class": "ease-out duration-300",
|
|
1802
1802
|
"enter-from-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
1803
1803
|
"enter-to-class": "opacity-100 translate-y-0 sm:scale-100",
|
|
@@ -1806,7 +1806,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1806
1806
|
"leave-to-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1807
1807
|
}, {
|
|
1808
1808
|
default: O(() => [
|
|
1809
|
-
Z(
|
|
1809
|
+
Z(r("div", {
|
|
1810
1810
|
class: k(["relative z-50 mb-6 bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto", C.value])
|
|
1811
1811
|
}, [
|
|
1812
1812
|
u.value ? w(v.$slots, "default", { key: 0 }) : D("", !0)
|
|
@@ -1841,11 +1841,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1841
1841
|
}
|
|
1842
1842
|
},
|
|
1843
1843
|
emits: ["close"],
|
|
1844
|
-
setup(e, { emit:
|
|
1845
|
-
const t =
|
|
1844
|
+
setup(e, { emit: a }) {
|
|
1845
|
+
const t = a, l = () => {
|
|
1846
1846
|
t("close");
|
|
1847
1847
|
};
|
|
1848
|
-
return (
|
|
1848
|
+
return (o, u) => (s(), B($e, {
|
|
1849
1849
|
show: e.show,
|
|
1850
1850
|
"max-width": e.maxWidth,
|
|
1851
1851
|
closeable: e.closeable,
|
|
@@ -1853,23 +1853,23 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1853
1853
|
onClose: l
|
|
1854
1854
|
}, {
|
|
1855
1855
|
default: O(() => [
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1856
|
+
r("div", _l, [
|
|
1857
|
+
r("div", Tl, [
|
|
1858
|
+
r("div", Al, [
|
|
1859
1859
|
R(I(Le), { class: "size-6 text-red-600" })
|
|
1860
1860
|
]),
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
w(
|
|
1861
|
+
r("div", Bl, [
|
|
1862
|
+
r("h3", Ll, [
|
|
1863
|
+
w(o.$slots, "title")
|
|
1864
1864
|
]),
|
|
1865
|
-
|
|
1866
|
-
w(
|
|
1865
|
+
r("div", Il, [
|
|
1866
|
+
w(o.$slots, "content")
|
|
1867
1867
|
])
|
|
1868
1868
|
])
|
|
1869
1869
|
])
|
|
1870
1870
|
]),
|
|
1871
|
-
|
|
1872
|
-
w(
|
|
1871
|
+
r("div", Dl, [
|
|
1872
|
+
w(o.$slots, "footer")
|
|
1873
1873
|
])
|
|
1874
1874
|
]),
|
|
1875
1875
|
_: 3
|
|
@@ -1892,27 +1892,27 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1892
1892
|
}
|
|
1893
1893
|
},
|
|
1894
1894
|
emits: ["close"],
|
|
1895
|
-
setup(e, { emit:
|
|
1896
|
-
const t =
|
|
1895
|
+
setup(e, { emit: a }) {
|
|
1896
|
+
const t = a, l = () => {
|
|
1897
1897
|
t("close");
|
|
1898
1898
|
};
|
|
1899
|
-
return (
|
|
1899
|
+
return (o, u) => (s(), B($e, {
|
|
1900
1900
|
show: e.show,
|
|
1901
1901
|
"max-width": e.maxWidth,
|
|
1902
1902
|
closeable: e.closeable,
|
|
1903
1903
|
onClose: l
|
|
1904
1904
|
}, {
|
|
1905
1905
|
default: O(() => [
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
w(
|
|
1906
|
+
r("div", jl, [
|
|
1907
|
+
r("div", Ol, [
|
|
1908
|
+
w(o.$slots, "title")
|
|
1909
1909
|
]),
|
|
1910
|
-
|
|
1911
|
-
w(
|
|
1910
|
+
r("div", zl, [
|
|
1911
|
+
w(o.$slots, "content")
|
|
1912
1912
|
])
|
|
1913
1913
|
]),
|
|
1914
|
-
|
|
1915
|
-
w(
|
|
1914
|
+
r("div", El, [
|
|
1915
|
+
w(o.$slots, "footer")
|
|
1916
1916
|
])
|
|
1917
1917
|
]),
|
|
1918
1918
|
_: 3
|
|
@@ -1935,28 +1935,28 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1935
1935
|
}
|
|
1936
1936
|
},
|
|
1937
1937
|
setup(e) {
|
|
1938
|
-
const
|
|
1938
|
+
const a = e;
|
|
1939
1939
|
let t = j(!1);
|
|
1940
1940
|
const l = (d) => {
|
|
1941
1941
|
t.value && d.key === "Escape" && (t.value = !1);
|
|
1942
1942
|
};
|
|
1943
1943
|
ee(() => document.addEventListener("keydown", l)), Ae(() => document.removeEventListener("keydown", l));
|
|
1944
|
-
const
|
|
1944
|
+
const o = g(() => ({
|
|
1945
1945
|
48: "w-48"
|
|
1946
|
-
})[
|
|
1947
|
-
return (d, f) => (
|
|
1948
|
-
|
|
1949
|
-
onClick: f[0] || (f[0] = ($) =>
|
|
1946
|
+
})[a.width.toString()]), u = g(() => a.align === "left" ? "ltr:origin-top-left rtl:origin-top-right start-0" : a.align === "right" ? "ltr:origin-top-right rtl:origin-top-left" : "origin-top");
|
|
1947
|
+
return (d, f) => (s(), i("div", Nl, [
|
|
1948
|
+
r("div", {
|
|
1949
|
+
onClick: f[0] || (f[0] = ($) => be(t) ? t.value = !I(t) : t = !I(t))
|
|
1950
1950
|
}, [
|
|
1951
1951
|
w(d.$slots, "trigger", { open: I(t) })
|
|
1952
1952
|
]),
|
|
1953
|
-
Z(
|
|
1953
|
+
Z(r("div", {
|
|
1954
1954
|
class: "fixed inset-0 z-40",
|
|
1955
|
-
onClick: f[1] || (f[1] = ($) =>
|
|
1955
|
+
onClick: f[1] || (f[1] = ($) => be(t) ? t.value = !1 : t = !1)
|
|
1956
1956
|
}, null, 512), [
|
|
1957
1957
|
[ie, I(t)]
|
|
1958
1958
|
]),
|
|
1959
|
-
R(
|
|
1959
|
+
R(re, {
|
|
1960
1960
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1961
1961
|
"enter-from-class": "transform opacity-0 scale-95 translate-y-2",
|
|
1962
1962
|
"enter-to-class": "transform opacity-100 scale-100 translate-y-0",
|
|
@@ -1965,12 +1965,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1965
1965
|
"leave-to-class": "transform opacity-0 scale-95 translate-y-2"
|
|
1966
1966
|
}, {
|
|
1967
1967
|
default: O(() => [
|
|
1968
|
-
Z(
|
|
1969
|
-
class: k(["absolute z-50 mt-2 rounded-xl shadow-xl shadow-gray-900/10", [
|
|
1968
|
+
Z(r("div", {
|
|
1969
|
+
class: k(["absolute z-50 mt-2 rounded-xl shadow-xl shadow-gray-900/10", [o.value, u.value]]),
|
|
1970
1970
|
style: { display: "none" },
|
|
1971
|
-
onClick: f[2] || (f[2] = ($) =>
|
|
1971
|
+
onClick: f[2] || (f[2] = ($) => be(t) ? t.value = !1 : t = !1)
|
|
1972
1972
|
}, [
|
|
1973
|
-
|
|
1973
|
+
r("div", {
|
|
1974
1974
|
class: k(["rounded-xl ring-1 ring-gray-200/60 backdrop-blur-sm bg-white/95", e.contentClasses])
|
|
1975
1975
|
}, [
|
|
1976
1976
|
w(d.$slots, "content")
|
|
@@ -1994,22 +1994,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1994
1994
|
as: String
|
|
1995
1995
|
},
|
|
1996
1996
|
setup(e) {
|
|
1997
|
-
return (
|
|
1998
|
-
e.as == "button" ? (
|
|
1999
|
-
w(
|
|
2000
|
-
])) : e.as == "a" ? (
|
|
1997
|
+
return (a, t) => (s(), i("div", null, [
|
|
1998
|
+
e.as == "button" ? (s(), i("button", Ul, [
|
|
1999
|
+
w(a.$slots, "default")
|
|
2000
|
+
])) : e.as == "a" ? (s(), i("a", {
|
|
2001
2001
|
key: 1,
|
|
2002
2002
|
href: e.href,
|
|
2003
2003
|
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
2004
|
}, [
|
|
2005
|
-
w(
|
|
2006
|
-
], 8, Rl)) : (
|
|
2005
|
+
w(a.$slots, "default")
|
|
2006
|
+
], 8, Rl)) : (s(), B(I(ge), {
|
|
2007
2007
|
key: 2,
|
|
2008
2008
|
href: e.href,
|
|
2009
2009
|
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
2010
|
}, {
|
|
2011
2011
|
default: O(() => [
|
|
2012
|
-
w(
|
|
2012
|
+
w(a.$slots, "default")
|
|
2013
2013
|
]),
|
|
2014
2014
|
_: 3
|
|
2015
2015
|
}, 8, ["href"]))
|
|
@@ -2022,8 +2022,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2022
2022
|
__name: "FormSection",
|
|
2023
2023
|
emits: ["submitted"],
|
|
2024
2024
|
setup(e) {
|
|
2025
|
-
const
|
|
2026
|
-
return (t, l) => (
|
|
2025
|
+
const a = g(() => !!fe().actions);
|
|
2026
|
+
return (t, l) => (s(), i("div", ql, [
|
|
2027
2027
|
R(Se, null, {
|
|
2028
2028
|
title: O(() => [
|
|
2029
2029
|
w(t.$slots, "title")
|
|
@@ -2033,18 +2033,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2033
2033
|
]),
|
|
2034
2034
|
_: 3
|
|
2035
2035
|
}),
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
onSubmit: l[0] || (l[0] = ve((
|
|
2036
|
+
r("div", Pl, [
|
|
2037
|
+
r("form", {
|
|
2038
|
+
onSubmit: l[0] || (l[0] = ve((o) => t.$emit("submitted"), ["prevent"]))
|
|
2039
2039
|
}, [
|
|
2040
|
-
|
|
2041
|
-
class: k(["px-4 py-5 bg-white sm:p-6",
|
|
2040
|
+
r("div", {
|
|
2041
|
+
class: k(["px-4 py-5 bg-white sm:p-6", a.value ? "sm:rounded-tl-md sm:rounded-tr-md" : "sm:rounded-md"])
|
|
2042
2042
|
}, [
|
|
2043
|
-
|
|
2043
|
+
r("div", Wl, [
|
|
2044
2044
|
w(t.$slots, "form")
|
|
2045
2045
|
])
|
|
2046
2046
|
], 2),
|
|
2047
|
-
|
|
2047
|
+
a.value ? (s(), i("div", Gl, [
|
|
2048
2048
|
w(t.$slots, "actions")
|
|
2049
2049
|
])) : D("", !0)
|
|
2050
2050
|
], 32)
|
|
@@ -2057,25 +2057,25 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2057
2057
|
message: String
|
|
2058
2058
|
},
|
|
2059
2059
|
setup(e) {
|
|
2060
|
-
return (
|
|
2061
|
-
|
|
2060
|
+
return (a, t) => Z((s(), i("div", null, [
|
|
2061
|
+
r("p", Ql, T(e.message), 1)
|
|
2062
2062
|
], 512)), [
|
|
2063
2063
|
[ie, e.message]
|
|
2064
2064
|
]);
|
|
2065
2065
|
}
|
|
2066
|
-
}, Jl = { class: "block font-medium text-sm text-gray-700" }, Zl = { key: 0 },
|
|
2066
|
+
}, Jl = { class: "block font-medium text-sm text-gray-700" }, Zl = { key: 0 }, es = { key: 1 }, ts = {
|
|
2067
2067
|
__name: "InputLabel",
|
|
2068
2068
|
props: {
|
|
2069
2069
|
value: String
|
|
2070
2070
|
},
|
|
2071
2071
|
setup(e) {
|
|
2072
|
-
return (
|
|
2073
|
-
e.value ? (
|
|
2074
|
-
w(
|
|
2072
|
+
return (a, t) => (s(), i("label", Jl, [
|
|
2073
|
+
e.value ? (s(), i("span", Zl, T(e.value), 1)) : (s(), i("span", es, [
|
|
2074
|
+
w(a.$slots, "default")
|
|
2075
2075
|
]))
|
|
2076
2076
|
]));
|
|
2077
2077
|
}
|
|
2078
|
-
},
|
|
2078
|
+
}, ls = ["href", "title", "target", "rel"], Ce = /* @__PURE__ */ Object.assign({
|
|
2079
2079
|
inheritAttrs: !1
|
|
2080
2080
|
}, {
|
|
2081
2081
|
__name: "LinkButton",
|
|
@@ -2106,18 +2106,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2106
2106
|
}
|
|
2107
2107
|
},
|
|
2108
2108
|
setup(e) {
|
|
2109
|
-
const
|
|
2110
|
-
primary: "bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-[
|
|
2111
|
-
secondary: "bg-gradient-to-r from-
|
|
2112
|
-
tertiary: "
|
|
2113
|
-
warning: "border border-
|
|
2114
|
-
danger: "border border-
|
|
2115
|
-
},
|
|
2116
|
-
"min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg
|
|
2117
|
-
l[
|
|
2118
|
-
|
|
2109
|
+
const a = ne(), t = e, l = {
|
|
2110
|
+
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",
|
|
2111
|
+
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
|
+
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
|
+
warning: "border border-amber-300 bg-amber-50 text-amber-800 shadow-sm hover:bg-amber-100 focus:ring-amber-500",
|
|
2114
|
+
danger: "border border-rose-300 bg-rose-50 text-rose-700 shadow-sm hover:bg-rose-100 focus:ring-rose-500"
|
|
2115
|
+
}, o = g(() => l[t.variant] ? t.variant : "primary"), u = g(() => [
|
|
2116
|
+
"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[o.value],
|
|
2118
|
+
a.class
|
|
2119
2119
|
]);
|
|
2120
|
-
return (d, f) => e.external ? (
|
|
2120
|
+
return (d, f) => e.external ? (s(), i("a", z({ key: 1 }, I(a), {
|
|
2121
2121
|
href: e.href,
|
|
2122
2122
|
title: e.title,
|
|
2123
2123
|
target: e.target,
|
|
@@ -2125,7 +2125,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2125
2125
|
class: u.value
|
|
2126
2126
|
}), [
|
|
2127
2127
|
w(d.$slots, "default")
|
|
2128
|
-
], 16,
|
|
2128
|
+
], 16, ls)) : (s(), B(I(ge), z({ key: 0 }, I(a), {
|
|
2129
2129
|
href: e.href,
|
|
2130
2130
|
title: e.title,
|
|
2131
2131
|
class: u.value
|
|
@@ -2136,15 +2136,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2136
2136
|
_: 3
|
|
2137
2137
|
}, 16, ["href", "title", "class"]));
|
|
2138
2138
|
}
|
|
2139
|
-
}),
|
|
2139
|
+
}), ss = {
|
|
2140
2140
|
__name: "NavLink",
|
|
2141
2141
|
props: {
|
|
2142
2142
|
href: String,
|
|
2143
2143
|
active: Boolean
|
|
2144
2144
|
},
|
|
2145
2145
|
setup(e) {
|
|
2146
|
-
const
|
|
2147
|
-
return (l,
|
|
2146
|
+
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, o) => (s(), B(I(ge), {
|
|
2148
2148
|
href: e.href,
|
|
2149
2149
|
class: k(t.value)
|
|
2150
2150
|
}, {
|
|
@@ -2154,7 +2154,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2154
2154
|
_: 3
|
|
2155
2155
|
}, 8, ["href", "class"]));
|
|
2156
2156
|
}
|
|
2157
|
-
},
|
|
2157
|
+
}, as = ["href"], ns = {
|
|
2158
2158
|
__name: "ResponsiveNavLink",
|
|
2159
2159
|
props: {
|
|
2160
2160
|
active: Boolean,
|
|
@@ -2162,20 +2162,20 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2162
2162
|
as: String
|
|
2163
2163
|
},
|
|
2164
2164
|
setup(e) {
|
|
2165
|
-
const
|
|
2166
|
-
return (l,
|
|
2167
|
-
e.as == "button" ? (
|
|
2165
|
+
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, o) => (s(), i("div", null, [
|
|
2167
|
+
e.as == "button" ? (s(), i("button", {
|
|
2168
2168
|
key: 0,
|
|
2169
2169
|
class: k([t.value, "w-full text-start"])
|
|
2170
2170
|
}, [
|
|
2171
2171
|
w(l.$slots, "default")
|
|
2172
|
-
], 2)) : e.as == "a" ? (
|
|
2172
|
+
], 2)) : e.as == "a" ? (s(), i("a", {
|
|
2173
2173
|
key: 1,
|
|
2174
2174
|
class: k([t.value, "w-full text-start"]),
|
|
2175
2175
|
href: e.href
|
|
2176
2176
|
}, [
|
|
2177
2177
|
w(l.$slots, "default")
|
|
2178
|
-
], 10,
|
|
2178
|
+
], 10, as)) : (s(), B(I(ge), {
|
|
2179
2179
|
key: 2,
|
|
2180
2180
|
href: e.href,
|
|
2181
2181
|
class: k(t.value)
|
|
@@ -2187,23 +2187,23 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2187
2187
|
}, 8, ["href", "class"]))
|
|
2188
2188
|
]));
|
|
2189
2189
|
}
|
|
2190
|
-
},
|
|
2190
|
+
}, os = { class: "hidden sm:block" }, rs = { class: "py-8" }, is = {
|
|
2191
2191
|
__name: "SectionBorder",
|
|
2192
2192
|
setup(e) {
|
|
2193
|
-
return (
|
|
2194
|
-
|
|
2193
|
+
return (a, t) => (s(), i("div", os, [
|
|
2194
|
+
r("div", rs, [
|
|
2195
2195
|
R(we)
|
|
2196
2196
|
])
|
|
2197
2197
|
]));
|
|
2198
2198
|
}
|
|
2199
|
-
},
|
|
2199
|
+
}, ds = { class: "bg-white/80 backdrop-blur-sm border border-gray-200/60 rounded-xl px-6 py-4" }, us = { class: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4" }, cs = { class: "flex items-center gap-3" }, fs = { class: "text-sm font-medium text-gray-700" }, gs = { class: "flex flex-wrap items-center gap-2" }, ps = ["onClick"], ms = { class: "text-xs text-gray-500" }, bs = {
|
|
2200
2200
|
__name: "SortControls",
|
|
2201
2201
|
props: {
|
|
2202
2202
|
fields: {
|
|
2203
2203
|
type: Array,
|
|
2204
2204
|
required: !0,
|
|
2205
2205
|
validator: (e) => e.every(
|
|
2206
|
-
(
|
|
2206
|
+
(a) => typeof a == "object" && a.key && a.label
|
|
2207
2207
|
)
|
|
2208
2208
|
},
|
|
2209
2209
|
currentSortField: {
|
|
@@ -2229,16 +2229,16 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2229
2229
|
}
|
|
2230
2230
|
},
|
|
2231
2231
|
emits: ["sort"],
|
|
2232
|
-
setup(e, { emit:
|
|
2233
|
-
const t =
|
|
2234
|
-
t("sort",
|
|
2232
|
+
setup(e, { emit: a }) {
|
|
2233
|
+
const t = a, l = (o) => {
|
|
2234
|
+
t("sort", o);
|
|
2235
2235
|
};
|
|
2236
|
-
return (
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
(
|
|
2236
|
+
return (o, u) => (s(), i("div", ds, [
|
|
2237
|
+
r("div", us, [
|
|
2238
|
+
r("div", cs, [
|
|
2239
|
+
r("label", fs, T(e.sortByLabel) + ":", 1),
|
|
2240
|
+
r("div", gs, [
|
|
2241
|
+
(s(!0), i(q, null, P(e.fields, (d) => (s(), i("button", {
|
|
2242
2242
|
key: d.key,
|
|
2243
2243
|
onClick: (f) => l(d.key),
|
|
2244
2244
|
class: k([
|
|
@@ -2247,22 +2247,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2247
2247
|
])
|
|
2248
2248
|
}, [
|
|
2249
2249
|
ue(T(d.label) + " ", 1),
|
|
2250
|
-
e.currentSortField === d.key && e.currentDirection === "asc" ? (
|
|
2250
|
+
e.currentSortField === d.key && e.currentDirection === "asc" ? (s(), B(I(Ie), {
|
|
2251
2251
|
key: 0,
|
|
2252
2252
|
class: "w-3 h-3 ml-1 inline"
|
|
2253
2253
|
})) : D("", !0),
|
|
2254
|
-
e.currentSortField === d.key && e.currentDirection === "desc" ? (
|
|
2254
|
+
e.currentSortField === d.key && e.currentDirection === "desc" ? (s(), B(I(xe), {
|
|
2255
2255
|
key: 1,
|
|
2256
2256
|
class: "w-3 h-3 ml-1 inline"
|
|
2257
2257
|
})) : D("", !0)
|
|
2258
|
-
], 10,
|
|
2258
|
+
], 10, ps))), 128))
|
|
2259
2259
|
])
|
|
2260
2260
|
]),
|
|
2261
|
-
|
|
2261
|
+
r("div", ms, T(e.count) + " " + T(e.countLabel), 1)
|
|
2262
2262
|
])
|
|
2263
2263
|
]));
|
|
2264
2264
|
}
|
|
2265
|
-
},
|
|
2265
|
+
}, ys = { class: "flex items-center space-x-1" }, vs = { class: "flex flex-col" }, Ve = {
|
|
2266
2266
|
__name: "ThSortable",
|
|
2267
2267
|
props: {
|
|
2268
2268
|
field: {
|
|
@@ -2279,21 +2279,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2279
2279
|
}
|
|
2280
2280
|
},
|
|
2281
2281
|
setup(e) {
|
|
2282
|
-
const
|
|
2283
|
-
return (
|
|
2282
|
+
const a = e, t = g(() => a.field === a.currentSortField), l = g(() => t.value ? "text-blue-600" : "text-gray-400");
|
|
2283
|
+
return (o, u) => (s(), i("th", {
|
|
2284
2284
|
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: u[0] || (u[0] = (d) =>
|
|
2285
|
+
onClick: u[0] || (u[0] = (d) => o.$emit("sort", e.field))
|
|
2286
2286
|
}, [
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
w(
|
|
2287
|
+
r("div", ys, [
|
|
2288
|
+
r("span", null, [
|
|
2289
|
+
w(o.$slots, "default")
|
|
2290
2290
|
]),
|
|
2291
|
-
|
|
2292
|
-
t.value && e.currentDirection === "asc" ? (
|
|
2291
|
+
r("div", vs, [
|
|
2292
|
+
t.value && e.currentDirection === "asc" ? (s(), B(I(Ie), {
|
|
2293
2293
|
key: 0,
|
|
2294
2294
|
class: k([l.value, "w-3 h-3"])
|
|
2295
2295
|
}, null, 8, ["class"])) : D("", !0),
|
|
2296
|
-
t.value && e.currentDirection === "desc" ? (
|
|
2296
|
+
t.value && e.currentDirection === "desc" ? (s(), B(I(xe), {
|
|
2297
2297
|
key: 1,
|
|
2298
2298
|
class: k([l.value, "w-3 h-3"])
|
|
2299
2299
|
}, null, 8, ["class"])) : D("", !0)
|
|
@@ -2301,22 +2301,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2301
2301
|
])
|
|
2302
2302
|
]));
|
|
2303
2303
|
}
|
|
2304
|
-
},
|
|
2304
|
+
}, hs = { class: "min-w-full divide-y divide-slate-200/80" }, xs = { class: "bg-slate-50/80" }, ws = {
|
|
2305
2305
|
key: 0,
|
|
2306
|
-
class: "px-6 py-3 text-right text-
|
|
2307
|
-
},
|
|
2306
|
+
class: "px-6 py-3 text-right text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase"
|
|
2307
|
+
}, ks = { class: "bg-white divide-y divide-slate-200/80" }, Ss = {
|
|
2308
2308
|
key: 0,
|
|
2309
2309
|
class: "flex items-center"
|
|
2310
|
-
}, $
|
|
2310
|
+
}, $s = ["title"], Cs = {
|
|
2311
2311
|
key: 0,
|
|
2312
|
-
class: "ml-2 inline-flex items-center px-2 py-1
|
|
2313
|
-
},
|
|
2312
|
+
class: "ml-2 inline-flex items-center rounded-full bg-rose-100 px-2 py-1 text-xs font-medium text-rose-700"
|
|
2313
|
+
}, Vs = ["innerHTML"], _s = { key: 3 }, Ts = {
|
|
2314
2314
|
key: 0,
|
|
2315
2315
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2316
|
-
},
|
|
2316
|
+
}, As = {
|
|
2317
2317
|
key: 0,
|
|
2318
2318
|
class: "text-center py-12"
|
|
2319
|
-
},
|
|
2319
|
+
}, Bs = { class: "inline-flex items-center justify-center w-16 h-16 rounded-full bg-slate-100 mb-4" }, Ls = { class: "mb-2 text-lg font-semibold text-slate-900" }, Is = { class: "mb-4 text-slate-600" }, Ds = {
|
|
2320
2320
|
__name: "TableList",
|
|
2321
2321
|
props: {
|
|
2322
2322
|
data: {
|
|
@@ -2347,9 +2347,9 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2347
2347
|
},
|
|
2348
2348
|
rowClasses: {
|
|
2349
2349
|
type: Function,
|
|
2350
|
-
default: (e,
|
|
2350
|
+
default: (e, a) => [
|
|
2351
2351
|
"transition-colors duration-150",
|
|
2352
|
-
e.deleted_at ? "bg-
|
|
2352
|
+
e.deleted_at ? "bg-rose-50 hover:bg-rose-100" : "odd:bg-white even:bg-slate-50 hover:bg-slate-100"
|
|
2353
2353
|
]
|
|
2354
2354
|
},
|
|
2355
2355
|
maxTextLength: {
|
|
@@ -2370,86 +2370,86 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2370
2370
|
}
|
|
2371
2371
|
},
|
|
2372
2372
|
emits: ["sort"],
|
|
2373
|
-
setup(e, { emit:
|
|
2374
|
-
const t = fe(), l = e,
|
|
2373
|
+
setup(e, { emit: a }) {
|
|
2374
|
+
const t = fe(), l = e, o = a;
|
|
2375
2375
|
g(() => !!t.actions);
|
|
2376
2376
|
const u = g(() => l.data && l.data.length > 0), d = (v) => {
|
|
2377
|
-
|
|
2377
|
+
o("sort", v);
|
|
2378
2378
|
}, f = (v) => {
|
|
2379
|
-
const S = String(v ?? ""),
|
|
2380
|
-
return !Number.isFinite(
|
|
2379
|
+
const S = String(v ?? ""), m = Number(l.maxTextLength);
|
|
2380
|
+
return !Number.isFinite(m) || m <= 0 || S.length <= m ? S : `${S.slice(0, m)}...`;
|
|
2381
2381
|
}, $ = (v, S) => {
|
|
2382
2382
|
if (S.slot)
|
|
2383
2383
|
return null;
|
|
2384
2384
|
if (S.render)
|
|
2385
2385
|
return S.render(v);
|
|
2386
|
-
const
|
|
2387
|
-
return
|
|
2388
|
-
},
|
|
2386
|
+
const m = S.key.split(".").reduce((M, L) => M?.[L], v);
|
|
2387
|
+
return m == null || m === "" ? "-" : f(m);
|
|
2388
|
+
}, y = (v) => v.deleted_at || v.deleted, C = (v) => {
|
|
2389
2389
|
if (v.class)
|
|
2390
2390
|
return v.class;
|
|
2391
2391
|
let S = "px-6 py-4 text-sm truncate";
|
|
2392
|
-
return v.isSecondary || (S += " font-medium"), v.isSecondary && (S += " text-
|
|
2393
|
-
}, h = (v) => v.sortable ? "" : "px-6 py-3 text-left text-
|
|
2394
|
-
return (v, S) => (
|
|
2395
|
-
class: k(["bg-white", e.isCard ? "border border-
|
|
2392
|
+
return v.isSecondary || (S += " font-medium"), v.isSecondary && (S += " text-slate-600"), S;
|
|
2393
|
+
}, h = (v) => v.sortable ? "" : "px-6 py-3 text-left text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase";
|
|
2394
|
+
return (v, S) => (s(), i("div", {
|
|
2395
|
+
class: k(["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
2396
|
}, [
|
|
2397
|
-
|
|
2397
|
+
r("div", {
|
|
2398
2398
|
class: k(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2399
2399
|
}, [
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
(
|
|
2404
|
-
key:
|
|
2400
|
+
r("table", hs, [
|
|
2401
|
+
r("thead", xs, [
|
|
2402
|
+
r("tr", null, [
|
|
2403
|
+
(s(!0), i(q, null, P(e.columns, (m) => (s(), i(q, {
|
|
2404
|
+
key: m.key
|
|
2405
2405
|
}, [
|
|
2406
|
-
|
|
2406
|
+
m.sortable ? (s(), B(Ve, {
|
|
2407
2407
|
key: 0,
|
|
2408
|
-
field:
|
|
2408
|
+
field: m.key,
|
|
2409
2409
|
"current-sort-field": e.sortField,
|
|
2410
2410
|
"current-direction": e.sortDirection,
|
|
2411
2411
|
onSort: d
|
|
2412
2412
|
}, {
|
|
2413
2413
|
default: O(() => [
|
|
2414
|
-
ue(T(
|
|
2414
|
+
ue(T(m.label), 1)
|
|
2415
2415
|
]),
|
|
2416
2416
|
_: 2
|
|
2417
|
-
}, 1032, ["field", "current-sort-field", "current-direction"])) : (
|
|
2417
|
+
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2418
2418
|
key: 1,
|
|
2419
|
-
class: k([h(
|
|
2420
|
-
}, T(
|
|
2419
|
+
class: k([h(m), { "text-right": m.align === "right" }])
|
|
2420
|
+
}, T(m.label), 3))
|
|
2421
2421
|
], 64))), 128)),
|
|
2422
|
-
v.$slots.actions ? (
|
|
2422
|
+
v.$slots.actions ? (s(), i("th", ws, T(e.actionsLabel), 1)) : D("", !0)
|
|
2423
2423
|
])
|
|
2424
2424
|
]),
|
|
2425
|
-
|
|
2426
|
-
(
|
|
2427
|
-
key:
|
|
2428
|
-
class: k(e.rowClasses(
|
|
2425
|
+
r("tbody", ks, [
|
|
2426
|
+
(s(!0), i(q, null, P(e.data, (m, M) => (s(), i("tr", {
|
|
2427
|
+
key: m.id,
|
|
2428
|
+
class: k(e.rowClasses(m, M))
|
|
2429
2429
|
}, [
|
|
2430
|
-
(
|
|
2430
|
+
(s(!0), i(q, null, P(e.columns, (L) => (s(), i("td", {
|
|
2431
2431
|
key: L.key,
|
|
2432
2432
|
class: k(C(L))
|
|
2433
2433
|
}, [
|
|
2434
|
-
L.key === "name" && !L.slot ? (
|
|
2435
|
-
|
|
2436
|
-
class: "text-sm font-medium truncate",
|
|
2437
|
-
title: $(
|
|
2438
|
-
}, T($(
|
|
2439
|
-
|
|
2434
|
+
L.key === "name" && !L.slot ? (s(), i("div", Ss, [
|
|
2435
|
+
r("div", {
|
|
2436
|
+
class: "text-sm font-medium text-slate-900 truncate",
|
|
2437
|
+
title: $(m, L)
|
|
2438
|
+
}, T($(m, L)), 9, $s),
|
|
2439
|
+
y(m) ? (s(), i("span", Cs, T(e.deletedLabel), 1)) : D("", !0)
|
|
2440
2440
|
])) : L.slot ? w(v.$slots, L.slot, {
|
|
2441
2441
|
key: 1,
|
|
2442
|
-
item:
|
|
2442
|
+
item: m,
|
|
2443
2443
|
column: L,
|
|
2444
2444
|
index: M
|
|
2445
|
-
}) : L.render ? (
|
|
2445
|
+
}) : L.render ? (s(), i("div", {
|
|
2446
2446
|
key: 2,
|
|
2447
|
-
innerHTML: L.render(
|
|
2448
|
-
}, null, 8,
|
|
2447
|
+
innerHTML: L.render(m)
|
|
2448
|
+
}, null, 8, Vs)) : (s(), i("div", _s, T($(m, L)), 1))
|
|
2449
2449
|
], 2))), 128)),
|
|
2450
|
-
v.$slots.actions ? (
|
|
2450
|
+
v.$slots.actions ? (s(), i("td", Ts, [
|
|
2451
2451
|
w(v.$slots, "actions", {
|
|
2452
|
-
item:
|
|
2452
|
+
item: m,
|
|
2453
2453
|
index: M
|
|
2454
2454
|
})
|
|
2455
2455
|
])) : D("", !0)
|
|
@@ -2457,13 +2457,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2457
2457
|
])
|
|
2458
2458
|
])
|
|
2459
2459
|
], 2),
|
|
2460
|
-
u.value ? D("", !0) : (
|
|
2461
|
-
|
|
2462
|
-
(
|
|
2460
|
+
u.value ? D("", !0) : (s(), i("div", As, [
|
|
2461
|
+
r("div", Bs, [
|
|
2462
|
+
(s(), B(Be(e.emptyState.icon), { class: "w-8 h-8 text-slate-400" }))
|
|
2463
2463
|
]),
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (
|
|
2464
|
+
r("h3", Ls, T(e.emptyState.title), 1),
|
|
2465
|
+
r("p", Is, T(e.emptyState.description), 1),
|
|
2466
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), B(Ce, {
|
|
2467
2467
|
key: 0,
|
|
2468
2468
|
href: e.emptyState.actionUrl,
|
|
2469
2469
|
variant: "primary"
|
|
@@ -2476,22 +2476,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2476
2476
|
]))
|
|
2477
2477
|
], 2));
|
|
2478
2478
|
}
|
|
2479
|
-
},
|
|
2479
|
+
}, Ms = { class: "relative max-w-sm" }, js = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, Os = ["placeholder"], zs = { class: "min-w-full divide-y divide-gray-200" }, Es = { class: "bg-gray-50" }, Fs = {
|
|
2480
2480
|
key: 0,
|
|
2481
2481
|
class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
2482
|
-
},
|
|
2482
|
+
}, Ns = { class: "bg-white divide-y divide-gray-200" }, Ks = {
|
|
2483
2483
|
key: 2,
|
|
2484
2484
|
class: "flex items-center"
|
|
2485
|
-
},
|
|
2485
|
+
}, Us = ["title"], Rs = {
|
|
2486
2486
|
key: 0,
|
|
2487
2487
|
class: "ml-2 inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800"
|
|
2488
|
-
},
|
|
2488
|
+
}, Hs = ["innerHTML"], qs = { key: 5 }, Ps = {
|
|
2489
2489
|
key: 0,
|
|
2490
2490
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2491
|
-
},
|
|
2491
|
+
}, Ws = { class: "flex items-center justify-end gap-2" }, Gs = {
|
|
2492
2492
|
key: 2,
|
|
2493
2493
|
class: "py-12 text-center"
|
|
2494
|
-
},
|
|
2494
|
+
}, Xs = { class: "mb-4 inline-flex h-16 w-16 items-center justify-center rounded-full bg-gray-100" }, Qs = { class: "mb-2 text-lg font-medium text-gray-900" }, Ys = { class: "mb-4 text-gray-500" }, Js = {
|
|
2495
2495
|
__name: "TableListForm",
|
|
2496
2496
|
props: {
|
|
2497
2497
|
data: {
|
|
@@ -2589,158 +2589,158 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2589
2589
|
}
|
|
2590
2590
|
},
|
|
2591
2591
|
emits: ["sort", "update", "update:editingRowKey", "edit-start", "edit-cancel"],
|
|
2592
|
-
setup(e, { emit:
|
|
2593
|
-
const t = fe(), l = e,
|
|
2592
|
+
setup(e, { emit: a }) {
|
|
2593
|
+
const t = fe(), l = e, o = a, u = j(l.sortField), d = j(l.sortDirection), f = j(""), $ = j(null), y = j({}), C = g(() => l.editingRowKey !== void 0 ? l.editingRowKey : $.value);
|
|
2594
2594
|
Q(() => l.sortField, (n) => {
|
|
2595
2595
|
u.value = n;
|
|
2596
2596
|
}), Q(() => l.sortDirection, (n) => {
|
|
2597
2597
|
d.value = n;
|
|
2598
2598
|
}), Q(() => l.rowEditing, (n) => {
|
|
2599
2599
|
n || X();
|
|
2600
|
-
}), Q(C, (n,
|
|
2601
|
-
if (n ===
|
|
2600
|
+
}), Q(C, (n, p) => {
|
|
2601
|
+
if (n === p)
|
|
2602
2602
|
return;
|
|
2603
2603
|
if (n == null || n === "") {
|
|
2604
|
-
|
|
2604
|
+
y.value = {};
|
|
2605
2605
|
return;
|
|
2606
2606
|
}
|
|
2607
|
-
const c = l.data.find((A,
|
|
2608
|
-
|
|
2607
|
+
const c = l.data.find((A, b) => W(A, b) === n);
|
|
2608
|
+
y.value = c ? L(c) : {};
|
|
2609
2609
|
}), Q(
|
|
2610
2610
|
() => l.data,
|
|
2611
2611
|
() => {
|
|
2612
2612
|
if (C.value === null || C.value === void 0)
|
|
2613
2613
|
return;
|
|
2614
|
-
l.data.find((
|
|
2614
|
+
l.data.find((p, c) => W(p, c) === C.value) || X();
|
|
2615
2615
|
},
|
|
2616
2616
|
{ deep: !0 }
|
|
2617
2617
|
);
|
|
2618
2618
|
const h = g(() => {
|
|
2619
2619
|
let n = l.data;
|
|
2620
2620
|
if (l.search && f.value.trim()) {
|
|
2621
|
-
const
|
|
2621
|
+
const p = f.value.toLowerCase().trim();
|
|
2622
2622
|
n = l.data.filter((c) => l.columns.some((A) => {
|
|
2623
2623
|
if (!A.searchable)
|
|
2624
2624
|
return !1;
|
|
2625
|
-
const
|
|
2626
|
-
return
|
|
2625
|
+
const b = F(c, A.key);
|
|
2626
|
+
return b == null || b === "" ? !1 : String(b).toLowerCase().includes(p);
|
|
2627
2627
|
}));
|
|
2628
2628
|
}
|
|
2629
|
-
return u.value ? [...n].sort((
|
|
2630
|
-
const A = F(
|
|
2629
|
+
return u.value ? [...n].sort((p, c) => {
|
|
2630
|
+
const A = F(p, u.value), b = F(c, u.value);
|
|
2631
2631
|
if (A == null || A === "") return 1;
|
|
2632
|
-
if (
|
|
2632
|
+
if (b == null || b === "") return -1;
|
|
2633
2633
|
let H = 0;
|
|
2634
|
-
return A <
|
|
2634
|
+
return A < b && (H = -1), A > b && (H = 1), d.value === "desc" ? -H : H;
|
|
2635
2635
|
}) : n;
|
|
2636
|
-
}), v = g(() => !!t.actions), S = g(() => v.value || l.rowEditing),
|
|
2637
|
-
u.value === n ? d.value = d.value === "asc" ? "desc" : "asc" : (u.value = n, d.value = "asc"),
|
|
2638
|
-
}, L = (n) => Array.isArray(n) ? n.map((
|
|
2639
|
-
Object.entries(n).map(([
|
|
2636
|
+
}), v = g(() => !!t.actions), S = g(() => v.value || l.rowEditing), m = g(() => h.value && h.value.length > 0), M = (n) => {
|
|
2637
|
+
u.value === n ? d.value = d.value === "asc" ? "desc" : "asc" : (u.value = n, d.value = "asc"), o("sort", { field: n, direction: d.value });
|
|
2638
|
+
}, L = (n) => Array.isArray(n) ? n.map((p) => L(p)) : n && typeof n == "object" ? Object.fromEntries(
|
|
2639
|
+
Object.entries(n).map(([p, c]) => [p, L(c)])
|
|
2640
2640
|
) : n, E = (n) => {
|
|
2641
|
-
const
|
|
2642
|
-
return !Number.isFinite(c) || c <= 0 ||
|
|
2643
|
-
}, F = (n,
|
|
2644
|
-
if (!
|
|
2641
|
+
const p = String(n ?? ""), c = Number(l.maxTextLength);
|
|
2642
|
+
return !Number.isFinite(c) || c <= 0 || p.length <= c ? p : `${p.slice(0, c)}...`;
|
|
2643
|
+
}, F = (n, p) => !p || typeof p != "string" ? n : p.split(".").reduce((c, A) => c?.[A], n), oe = (n, p, c) => {
|
|
2644
|
+
if (!p || typeof p != "string" || n == null)
|
|
2645
2645
|
return;
|
|
2646
|
-
const A =
|
|
2646
|
+
const A = p.split("."), b = A.pop();
|
|
2647
2647
|
let H = n;
|
|
2648
2648
|
for (const de of A)
|
|
2649
2649
|
(H[de] === void 0 || H[de] === null || typeof H[de] != "object") && (H[de] = {}), H = H[de];
|
|
2650
|
-
|
|
2651
|
-
}, Y = (n) => n?.id ? l.data.findIndex((
|
|
2652
|
-
l.editingRowKey === void 0 && ($.value = n),
|
|
2653
|
-
}, N = (n,
|
|
2650
|
+
b !== void 0 && (H[b] = c);
|
|
2651
|
+
}, Y = (n) => n?.id ? l.data.findIndex((p) => p?.id === n.id) : l.data.findIndex((p) => p === n), W = (n, p) => typeof l.rowKey == "function" ? l.rowKey(n, p) ?? `row-${p}` : F(n, l.rowKey) ?? `row-${p}`, G = (n) => `${n.slot}-edit`, J = (n) => l.isDeletedFn(n), x = (n) => {
|
|
2652
|
+
l.editingRowKey === void 0 && ($.value = n), o("update:editingRowKey", n);
|
|
2653
|
+
}, N = (n, p) => l.rowEditing && C.value !== null && C.value === W(n, p), K = (n, p) => !l.rowEditing || !l.canEditRow(n, p) || J(n) ? !0 : C.value !== null && !N(n, p), X = () => {
|
|
2654
2654
|
x(null);
|
|
2655
|
-
}, te = (n,
|
|
2656
|
-
if (K(n,
|
|
2655
|
+
}, te = (n, p) => {
|
|
2656
|
+
if (K(n, p))
|
|
2657
2657
|
return;
|
|
2658
|
-
const c = W(n,
|
|
2659
|
-
x(c),
|
|
2658
|
+
const c = W(n, p);
|
|
2659
|
+
x(c), o("edit-start", {
|
|
2660
2660
|
item: n,
|
|
2661
2661
|
index: Y(n),
|
|
2662
2662
|
rowKey: c
|
|
2663
2663
|
});
|
|
2664
|
-
}, le = (n,
|
|
2665
|
-
|
|
2664
|
+
}, le = (n, p) => {
|
|
2665
|
+
o("edit-cancel", {
|
|
2666
2666
|
item: n,
|
|
2667
2667
|
index: Y(n),
|
|
2668
|
-
rowKey: W(n,
|
|
2668
|
+
rowKey: W(n, p)
|
|
2669
2669
|
}), X();
|
|
2670
|
-
},
|
|
2671
|
-
|
|
2670
|
+
}, se = (n, p, c, A = void 0) => {
|
|
2671
|
+
oe(y.value, n, p), l.mutateRows && oe(c, n, L(p)), o("update", {
|
|
2672
2672
|
item: c,
|
|
2673
|
-
draft:
|
|
2673
|
+
draft: y.value,
|
|
2674
2674
|
field: n,
|
|
2675
|
-
value:
|
|
2675
|
+
value: p,
|
|
2676
2676
|
index: Y(c),
|
|
2677
2677
|
rowKey: C.value,
|
|
2678
2678
|
event: A
|
|
2679
2679
|
});
|
|
2680
|
-
},
|
|
2681
|
-
if (
|
|
2680
|
+
}, ae = (n, p) => {
|
|
2681
|
+
if (p.slot)
|
|
2682
2682
|
return null;
|
|
2683
|
-
if (
|
|
2684
|
-
return
|
|
2685
|
-
const c = F(n,
|
|
2683
|
+
if (p.render)
|
|
2684
|
+
return p.render(n);
|
|
2685
|
+
const c = F(n, p.key);
|
|
2686
2686
|
return c == null || c === "" ? "-" : E(c);
|
|
2687
|
-
}, U = (n,
|
|
2687
|
+
}, U = (n, p, c) => {
|
|
2688
2688
|
if (n.class)
|
|
2689
2689
|
return n.class;
|
|
2690
|
-
let
|
|
2691
|
-
return n.isSecondary || (
|
|
2690
|
+
let b = N(p, c) && (n.input || t[G(n)]) ? "px-6 py-3 text-sm align-top" : "px-6 py-4 text-sm truncate";
|
|
2691
|
+
return n.isSecondary || (b += " font-medium"), n.isSecondary && (b += " text-gray-600"), b;
|
|
2692
2692
|
}, V = (n) => n.sortable ? "" : "px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider", _ = (n) => n.inputType || "text", Pe = (n) => {
|
|
2693
|
-
let
|
|
2694
|
-
return n.inputClass && (
|
|
2695
|
-
}, We = (n) => n.placeholder || n.label || "", _e = (n,
|
|
2693
|
+
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 n.inputClass && (p += ` ${n.inputClass}`), n.isSecondary && (p += " text-gray-600"), p;
|
|
2695
|
+
}, We = (n) => n.placeholder || n.label || "", _e = (n, p, c) => N(n, c) ? F(y.value, p.key) ?? "" : F(n, p.key) ?? "", Ge = (n, p) => {
|
|
2696
2696
|
const c = Y(n);
|
|
2697
|
-
return c === -1 ? null : l.getErrorMessage(c,
|
|
2698
|
-
},
|
|
2697
|
+
return c === -1 ? null : l.getErrorMessage(c, p.key);
|
|
2698
|
+
}, me = (n, p, c) => ({
|
|
2699
2699
|
item: n,
|
|
2700
|
-
column:
|
|
2700
|
+
column: p,
|
|
2701
2701
|
index: c,
|
|
2702
2702
|
isEditing: N(n, c),
|
|
2703
|
-
draft:
|
|
2703
|
+
draft: y.value,
|
|
2704
2704
|
rowKey: W(n, c),
|
|
2705
|
-
updateDraft: (A,
|
|
2705
|
+
updateDraft: (A, b) => se(A, b, n),
|
|
2706
2706
|
startEdit: () => te(n, c),
|
|
2707
2707
|
cancelEdit: () => le(n, c)
|
|
2708
|
-
}), Xe = (n,
|
|
2709
|
-
return (n,
|
|
2708
|
+
}), Xe = (n, p, c) => !!((typeof n.disabled == "function" ? n.disabled(p, c) : n.disabled) || J(p));
|
|
2709
|
+
return (n, p) => (s(), i("div", {
|
|
2710
2710
|
class: k(["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
2711
|
}, [
|
|
2712
|
-
e.search ? (
|
|
2712
|
+
e.search ? (s(), i("div", {
|
|
2713
2713
|
key: 0,
|
|
2714
2714
|
class: k([
|
|
2715
2715
|
"px-6 py-4",
|
|
2716
2716
|
e.isCard ? "border-b border-gray-200 bg-gray-50/80 rounded-t-xl" : "mb-4 bg-white/80 backdrop-blur-sm"
|
|
2717
2717
|
])
|
|
2718
2718
|
}, [
|
|
2719
|
-
|
|
2720
|
-
|
|
2719
|
+
r("div", Ms, [
|
|
2720
|
+
r("div", js, [
|
|
2721
2721
|
R(I(it), { class: "h-4 w-4 text-gray-400" })
|
|
2722
2722
|
]),
|
|
2723
|
-
Z(
|
|
2724
|
-
"onUpdate:modelValue":
|
|
2723
|
+
Z(r("input", {
|
|
2724
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => f.value = c),
|
|
2725
2725
|
type: "text",
|
|
2726
2726
|
placeholder: e.searchPlaceholder,
|
|
2727
2727
|
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
|
-
}, null, 8,
|
|
2728
|
+
}, null, 8, Os), [
|
|
2729
2729
|
[et, f.value]
|
|
2730
2730
|
])
|
|
2731
2731
|
])
|
|
2732
2732
|
], 2)) : D("", !0),
|
|
2733
|
-
|
|
2733
|
+
m.value ? (s(), i("div", {
|
|
2734
2734
|
key: 1,
|
|
2735
2735
|
class: k(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2736
2736
|
}, [
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
(
|
|
2737
|
+
r("table", zs, [
|
|
2738
|
+
r("thead", Es, [
|
|
2739
|
+
r("tr", null, [
|
|
2740
|
+
(s(!0), i(q, null, P(e.columns, (c) => (s(), i(q, {
|
|
2741
2741
|
key: c.key
|
|
2742
2742
|
}, [
|
|
2743
|
-
c.sortable ? (
|
|
2743
|
+
c.sortable ? (s(), B(Ve, {
|
|
2744
2744
|
key: 0,
|
|
2745
2745
|
field: c.key,
|
|
2746
2746
|
"current-sort-field": u.value,
|
|
@@ -2751,78 +2751,78 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2751
2751
|
ue(T(c.label), 1)
|
|
2752
2752
|
]),
|
|
2753
2753
|
_: 2
|
|
2754
|
-
}, 1032, ["field", "current-sort-field", "current-direction"])) : (
|
|
2754
|
+
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2755
2755
|
key: 1,
|
|
2756
2756
|
class: k([V(c), { "text-right": c.align === "right" }])
|
|
2757
2757
|
}, T(c.label), 3))
|
|
2758
2758
|
], 64))), 128)),
|
|
2759
|
-
S.value ? (
|
|
2759
|
+
S.value ? (s(), i("th", Fs, T(e.actionsLabel), 1)) : D("", !0)
|
|
2760
2760
|
])
|
|
2761
2761
|
]),
|
|
2762
|
-
|
|
2763
|
-
(
|
|
2762
|
+
r("tbody", Ns, [
|
|
2763
|
+
(s(!0), i(q, null, P(h.value, (c, A) => (s(), i("tr", {
|
|
2764
2764
|
key: W(c, A),
|
|
2765
2765
|
class: k(e.rowClasses(c, A))
|
|
2766
2766
|
}, [
|
|
2767
|
-
(
|
|
2768
|
-
key:
|
|
2769
|
-
class: k([U(
|
|
2767
|
+
(s(!0), i(q, null, P(e.columns, (b) => (s(), i("td", {
|
|
2768
|
+
key: b.key,
|
|
2769
|
+
class: k([U(b, c, A), { "text-right": b.align === "right" }])
|
|
2770
2770
|
}, [
|
|
2771
|
-
N(c, A) &&
|
|
2771
|
+
N(c, A) && b.slot && I(t)[G(b)] ? w(n.$slots, G(b), z({
|
|
2772
2772
|
key: 0,
|
|
2773
2773
|
ref_for: !0
|
|
2774
|
-
},
|
|
2774
|
+
}, me(c, b, A))) : N(c, A) && b.input ? (s(), B(pe, {
|
|
2775
2775
|
key: 1,
|
|
2776
|
-
type: _(
|
|
2777
|
-
class: k(Pe(
|
|
2778
|
-
placeholder: We(
|
|
2779
|
-
"model-value": _e(c,
|
|
2780
|
-
disabled: Xe(
|
|
2781
|
-
maxlength:
|
|
2782
|
-
"error-message": Ge(c,
|
|
2776
|
+
type: _(b),
|
|
2777
|
+
class: k(Pe(b)),
|
|
2778
|
+
placeholder: We(b),
|
|
2779
|
+
"model-value": _e(c, b, A),
|
|
2780
|
+
disabled: Xe(b, c, A),
|
|
2781
|
+
maxlength: b.maxlength,
|
|
2782
|
+
"error-message": Ge(c, b),
|
|
2783
2783
|
"helper-text": "",
|
|
2784
|
-
"onUpdate:modelValue": (H) =>
|
|
2785
|
-
onBlur: (H) =>
|
|
2786
|
-
}, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) :
|
|
2787
|
-
|
|
2784
|
+
"onUpdate:modelValue": (H) => se(b.key, H, c),
|
|
2785
|
+
onBlur: (H) => se(b.key, H?.target?.value ?? _e(c, b, A), c, "blur")
|
|
2786
|
+
}, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) : b.key === "name" && !b.slot ? (s(), i("div", Ks, [
|
|
2787
|
+
r("div", {
|
|
2788
2788
|
class: "text-sm font-medium truncate",
|
|
2789
|
-
title:
|
|
2790
|
-
}, T(
|
|
2791
|
-
J(c) ? (
|
|
2792
|
-
])) :
|
|
2789
|
+
title: ae(c, b)
|
|
2790
|
+
}, T(ae(c, b)), 9, Us),
|
|
2791
|
+
J(c) ? (s(), i("span", Rs, T(e.deletedLabel), 1)) : D("", !0)
|
|
2792
|
+
])) : b.slot ? w(n.$slots, b.slot, z({
|
|
2793
2793
|
key: 3,
|
|
2794
2794
|
ref_for: !0
|
|
2795
|
-
},
|
|
2795
|
+
}, me(c, b, A))) : b.render ? (s(), i("div", {
|
|
2796
2796
|
key: 4,
|
|
2797
|
-
innerHTML:
|
|
2798
|
-
}, null, 8,
|
|
2797
|
+
innerHTML: b.render(c)
|
|
2798
|
+
}, null, 8, Hs)) : (s(), i("div", qs, T(ae(c, b)), 1))
|
|
2799
2799
|
], 2))), 128)),
|
|
2800
|
-
S.value ? (
|
|
2801
|
-
|
|
2800
|
+
S.value ? (s(), i("td", Ps, [
|
|
2801
|
+
r("div", Ws, [
|
|
2802
2802
|
v.value ? w(n.$slots, "actions", z({
|
|
2803
2803
|
key: 0,
|
|
2804
2804
|
ref_for: !0
|
|
2805
|
-
},
|
|
2806
|
-
e.rowEditing && N(c, A) ? (
|
|
2805
|
+
}, me(c, null, A))) : D("", !0),
|
|
2806
|
+
e.rowEditing && N(c, A) ? (s(), B(he, {
|
|
2807
2807
|
key: 1,
|
|
2808
2808
|
type: "button",
|
|
2809
2809
|
variant: "tertiary",
|
|
2810
2810
|
title: e.cancelLabel,
|
|
2811
2811
|
"aria-label": e.cancelLabel,
|
|
2812
|
-
onClick: (
|
|
2812
|
+
onClick: (b) => le(c, A)
|
|
2813
2813
|
}, {
|
|
2814
2814
|
default: O(() => [
|
|
2815
2815
|
R(I(dt), { class: "size-4" })
|
|
2816
2816
|
]),
|
|
2817
2817
|
_: 1
|
|
2818
|
-
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (
|
|
2818
|
+
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (s(), B(he, {
|
|
2819
2819
|
key: 2,
|
|
2820
2820
|
type: "button",
|
|
2821
2821
|
variant: "warning",
|
|
2822
2822
|
disabled: K(c, A),
|
|
2823
2823
|
title: e.editLabel,
|
|
2824
2824
|
"aria-label": e.editLabel,
|
|
2825
|
-
onClick: (
|
|
2825
|
+
onClick: (b) => te(c, A)
|
|
2826
2826
|
}, {
|
|
2827
2827
|
default: O(() => [
|
|
2828
2828
|
R(I(ut), { class: "size-4" })
|
|
@@ -2834,13 +2834,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2834
2834
|
], 2))), 128))
|
|
2835
2835
|
])
|
|
2836
2836
|
])
|
|
2837
|
-
], 2)) : (
|
|
2838
|
-
|
|
2839
|
-
(
|
|
2837
|
+
], 2)) : (s(), i("div", Gs, [
|
|
2838
|
+
r("div", Xs, [
|
|
2839
|
+
(s(), B(Be(e.emptyState.icon), { class: "h-8 w-8 text-gray-400" }))
|
|
2840
2840
|
]),
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (
|
|
2841
|
+
r("h3", Qs, T(e.emptyState.title), 1),
|
|
2842
|
+
r("p", Ys, T(e.emptyState.description), 1),
|
|
2843
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), B(Ce, {
|
|
2844
2844
|
key: 0,
|
|
2845
2845
|
href: e.emptyState.actionUrl,
|
|
2846
2846
|
variant: "primary"
|
|
@@ -2853,14 +2853,14 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2853
2853
|
]))
|
|
2854
2854
|
], 2));
|
|
2855
2855
|
}
|
|
2856
|
-
},
|
|
2856
|
+
}, Zs = {
|
|
2857
2857
|
install(e) {
|
|
2858
|
-
for (const [
|
|
2859
|
-
|
|
2858
|
+
for (const [a, t] of Object.entries(ct))
|
|
2859
|
+
a !== "EnosVue" && e.component(a, t);
|
|
2860
2860
|
}
|
|
2861
2861
|
};
|
|
2862
2862
|
export {
|
|
2863
|
-
|
|
2863
|
+
yt as ActionCard,
|
|
2864
2864
|
ht as ActionMessage,
|
|
2865
2865
|
Bt as ActionSection,
|
|
2866
2866
|
Mt as ApplicationLogo,
|
|
@@ -2880,25 +2880,25 @@ export {
|
|
|
2880
2880
|
we as Divider,
|
|
2881
2881
|
Kl as Dropdown,
|
|
2882
2882
|
Hl as DropdownLink,
|
|
2883
|
-
|
|
2883
|
+
Zs as EnosVue,
|
|
2884
2884
|
Xl as FormSection,
|
|
2885
2885
|
Ke as ImageInput,
|
|
2886
2886
|
Yl as InputError,
|
|
2887
|
-
|
|
2888
|
-
|
|
2887
|
+
pe as InputGroup,
|
|
2888
|
+
ts as InputLabel,
|
|
2889
2889
|
Ce as LinkButton,
|
|
2890
2890
|
$e as Modal,
|
|
2891
|
-
|
|
2891
|
+
ss as NavLink,
|
|
2892
2892
|
Ue as NotationInput,
|
|
2893
2893
|
Re as RadioInput,
|
|
2894
2894
|
He as RadioMultipleInput,
|
|
2895
|
-
|
|
2896
|
-
|
|
2895
|
+
ns as ResponsiveNavLink,
|
|
2896
|
+
is as SectionBorder,
|
|
2897
2897
|
Se as SectionTitle,
|
|
2898
2898
|
Fe as SelectInput,
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2899
|
+
bs as SortControls,
|
|
2900
|
+
Ds as TableList,
|
|
2901
|
+
Js as TableListForm,
|
|
2902
2902
|
ze as TextArea,
|
|
2903
2903
|
Oe as TextInput,
|
|
2904
2904
|
Ve as ThSortable
|