@enos5/enos-vue 1.0.4 → 1.0.6
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 +628 -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,19 @@ 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
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
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
|
+
success: "bg-gradient-to-r from-green-500 to-green-600 text-white shadow-[0_6px_14px_rgba(34,197,94,0.14)] hover:from-green-600 hover:to-green-700 hover:shadow-[0_8px_18px_rgba(34,197,94,0.18)] focus:ring-green-500 disabled:hover:from-green-500 disabled:hover:to-green-600",
|
|
611
|
+
secondary: "bg-gradient-to-r from-slate-700 to-slate-800 text-white shadow-[0_8px_18px_rgba(15,23,42,0.16)] hover:from-slate-800 hover:to-slate-900 hover:shadow-[0_10px_22px_rgba(15,23,42,0.22)] focus:ring-slate-500 disabled:hover:from-slate-700 disabled:hover:to-slate-800",
|
|
612
|
+
tertiary: "border border-slate-300 bg-white text-slate-700 shadow-sm hover:bg-slate-50 hover:border-slate-400 hover:shadow focus:ring-slate-500 disabled:hover:bg-white",
|
|
613
|
+
warning: "border border-amber-300 bg-amber-50 text-amber-800 shadow-sm hover:bg-amber-100 focus:ring-amber-500 disabled:hover:bg-amber-50",
|
|
614
|
+
danger: "border border-rose-300 bg-rose-50 text-rose-700 shadow-sm hover:bg-rose-100 focus:ring-rose-500 disabled:hover:bg-rose-50"
|
|
615
|
+
}, o = g(() => l[t.variant] ? t.variant : "primary"), u = g(() => [
|
|
616
|
+
"min-w-[40px] min-h-[35px] inline-flex items-center justify-center rounded-lg px-4 py-2 text-sm font-semibold tracking-tight transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-slate-50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
617
|
+
l[o.value],
|
|
618
|
+
a.class
|
|
618
619
|
]);
|
|
619
|
-
return (d, f) => (
|
|
620
|
+
return (d, f) => (s(), i("button", z(I(a), {
|
|
620
621
|
type: e.type,
|
|
621
622
|
disabled: e.disabled,
|
|
622
623
|
class: u.value
|
|
@@ -637,8 +638,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
637
638
|
}
|
|
638
639
|
},
|
|
639
640
|
emits: ["update:checked"],
|
|
640
|
-
setup(e, { emit:
|
|
641
|
-
const t =
|
|
641
|
+
setup(e, { emit: a }) {
|
|
642
|
+
const t = a, l = e, o = g({
|
|
642
643
|
get() {
|
|
643
644
|
return l.checked;
|
|
644
645
|
},
|
|
@@ -646,13 +647,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
646
647
|
t("update:checked", u);
|
|
647
648
|
}
|
|
648
649
|
});
|
|
649
|
-
return (u, d) => Z((
|
|
650
|
-
"onUpdate:modelValue": d[0] || (d[0] = (f) =>
|
|
650
|
+
return (u, d) => Z((s(), i("input", {
|
|
651
|
+
"onUpdate:modelValue": d[0] || (d[0] = (f) => o.value = f),
|
|
651
652
|
type: "checkbox",
|
|
652
653
|
value: e.value,
|
|
653
654
|
class: "rounded border-gray-300 text-indigo-600 shadow-sm focus:ring-indigo-500"
|
|
654
655
|
}, null, 8, Yt)), [
|
|
655
|
-
[Ye,
|
|
656
|
+
[Ye, o.value]
|
|
656
657
|
]);
|
|
657
658
|
}
|
|
658
659
|
}, Zt = ["checked", "disabled"], je = {
|
|
@@ -680,43 +681,43 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
680
681
|
}
|
|
681
682
|
},
|
|
682
683
|
emits: ["update:modelValue"],
|
|
683
|
-
setup(e, { emit:
|
|
684
|
-
const t =
|
|
684
|
+
setup(e, { emit: a }) {
|
|
685
|
+
const t = a, l = e, o = g(() => l.modelValue === l.value), u = j(!1), d = () => {
|
|
685
686
|
u.value = !0;
|
|
686
687
|
}, f = () => {
|
|
687
688
|
u.value = !1;
|
|
688
|
-
}, $ = (
|
|
689
|
-
t("update:modelValue",
|
|
689
|
+
}, $ = (y) => {
|
|
690
|
+
t("update:modelValue", y.target.checked ? l.value : l.uncheckedValue);
|
|
690
691
|
};
|
|
691
|
-
return (
|
|
692
|
+
return (y, C) => (s(), i("label", {
|
|
692
693
|
class: k(["inline-flex items-center gap-2 rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
693
|
-
|
|
694
|
+
o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
694
695
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
695
696
|
u.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
696
697
|
]])
|
|
697
698
|
}, [
|
|
698
|
-
|
|
699
|
+
r("input", {
|
|
699
700
|
type: "checkbox",
|
|
700
701
|
class: "sr-only",
|
|
701
|
-
checked:
|
|
702
|
+
checked: o.value,
|
|
702
703
|
disabled: e.disabled,
|
|
703
704
|
onChange: $,
|
|
704
705
|
onFocus: d,
|
|
705
706
|
onBlur: f
|
|
706
707
|
}, null, 40, Zt),
|
|
707
|
-
|
|
708
|
+
r("span", {
|
|
708
709
|
class: k(["inline-flex h-4 w-4 items-center justify-center border text-[10px] font-bold leading-none", [
|
|
709
|
-
|
|
710
|
+
o.value ? "border-current bg-white/15 text-current" : "border-current/70 text-transparent",
|
|
710
711
|
"rounded"
|
|
711
712
|
]])
|
|
712
713
|
}, " ✓ ", 2),
|
|
713
|
-
|
|
714
|
+
r("span", null, T(e.label), 1)
|
|
714
715
|
], 2));
|
|
715
716
|
}
|
|
716
717
|
}, el = { class: "relative flex items-center" }, tl = {
|
|
717
718
|
key: 0,
|
|
718
|
-
class: "absolute inset-y-0 left-0
|
|
719
|
-
}, ll = ["type", "value", "disabled"],
|
|
719
|
+
class: "absolute inset-y-0 left-0 flex items-center pointer-events-none pl-3"
|
|
720
|
+
}, ll = ["type", "value", "disabled"], sl = ["aria-label"], al = {
|
|
720
721
|
key: 0,
|
|
721
722
|
class: "h-5 w-5",
|
|
722
723
|
fill: "none",
|
|
@@ -728,7 +729,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
728
729
|
fill: "none",
|
|
729
730
|
stroke: "currentColor",
|
|
730
731
|
viewBox: "0 0 24 24"
|
|
731
|
-
},
|
|
732
|
+
}, ol = 254, Oe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
732
733
|
__name: "TextInput",
|
|
733
734
|
props: {
|
|
734
735
|
modelValue: {
|
|
@@ -741,19 +742,19 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
741
742
|
},
|
|
742
743
|
disabledClass: {
|
|
743
744
|
type: String,
|
|
744
|
-
default: "!bg-
|
|
745
|
+
default: "!bg-slate-100"
|
|
745
746
|
}
|
|
746
747
|
},
|
|
747
748
|
emits: ["update:modelValue", "blur"],
|
|
748
|
-
setup(e, { expose:
|
|
749
|
-
const l = e,
|
|
749
|
+
setup(e, { expose: a, emit: t }) {
|
|
750
|
+
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
751
|
const { class: L, type: E, ...F } = u;
|
|
751
|
-
return F.maxlength === void 0 && (F.maxlength =
|
|
752
|
+
return F.maxlength === void 0 && (F.maxlength = ol), F;
|
|
752
753
|
}), S = g(() => [
|
|
753
|
-
"w-full min-w-0 max-w-full border-
|
|
754
|
+
"w-full min-w-0 max-w-full rounded-lg border border-slate-300 bg-white text-slate-900 shadow-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 placeholder:text-slate-400",
|
|
754
755
|
u.class,
|
|
755
|
-
|
|
756
|
-
]),
|
|
756
|
+
y.value ? "pr-10 pl-10" : ""
|
|
757
|
+
]), m = () => {
|
|
757
758
|
f.value = !f.value;
|
|
758
759
|
}, M = (L) => {
|
|
759
760
|
if (C.value !== "number")
|
|
@@ -764,11 +765,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
764
765
|
};
|
|
765
766
|
return ee(() => {
|
|
766
767
|
d.value?.hasAttribute("autofocus") && d.value.focus();
|
|
767
|
-
}),
|
|
768
|
-
|
|
769
|
-
R(I(nt), { class: "h-5 w-5 text-
|
|
768
|
+
}), a({ focus: () => d.value?.focus() }), (L, E) => (s(), i("div", el, [
|
|
769
|
+
y.value ? (s(), i("div", tl, [
|
|
770
|
+
R(I(nt), { class: "h-5 w-5 text-slate-400" })
|
|
770
771
|
])) : D("", !0),
|
|
771
|
-
|
|
772
|
+
r("input", z({
|
|
772
773
|
ref_key: "input",
|
|
773
774
|
ref: d
|
|
774
775
|
}, v.value, {
|
|
@@ -776,42 +777,42 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
776
777
|
class: [S.value, l.disabled ? l.disabledClass : null],
|
|
777
778
|
value: h.value,
|
|
778
779
|
disabled: l.disabled,
|
|
779
|
-
onInput: E[0] || (E[0] = (F) =>
|
|
780
|
-
onBlur: E[1] || (E[1] = (F) =>
|
|
780
|
+
onInput: E[0] || (E[0] = (F) => o("update:modelValue", F.target.value)),
|
|
781
|
+
onBlur: E[1] || (E[1] = (F) => o("blur", F)),
|
|
781
782
|
onWheel: M
|
|
782
783
|
}), null, 16, ll),
|
|
783
|
-
|
|
784
|
+
y.value ? (s(), i("button", {
|
|
784
785
|
key: 1,
|
|
785
786
|
type: "button",
|
|
786
|
-
class: "absolute inset-y-0 right-0 flex items-center pr-3 text-
|
|
787
|
+
class: "absolute inset-y-0 right-0 flex items-center pr-3 text-slate-400 hover:text-slate-600 focus:outline-none",
|
|
787
788
|
"aria-label": f.value ? "Hide password" : "Show password",
|
|
788
|
-
onClick:
|
|
789
|
+
onClick: m
|
|
789
790
|
}, [
|
|
790
|
-
f.value ? (
|
|
791
|
-
|
|
791
|
+
f.value ? (s(), i("svg", al, [...E[2] || (E[2] = [
|
|
792
|
+
r("path", {
|
|
792
793
|
"stroke-linecap": "round",
|
|
793
794
|
"stroke-linejoin": "round",
|
|
794
795
|
"stroke-width": "2",
|
|
795
796
|
d: "M13.875 18.825A10.05 10.05 0 0112 19c-5 0-9.27-3.11-11-7 1.01-2.27 2.78-4.1 5-5.32m3.08-1.3A9.96 9.96 0 0112 5c5 0 9.27 3.11 11 7a11.03 11.03 0 01-4.16 4.91M15 12a3 3 0 00-3-3m0 0a3 3 0 00-2.94 3.59M3 3l18 18"
|
|
796
797
|
}, null, -1)
|
|
797
|
-
])])) : (
|
|
798
|
-
|
|
798
|
+
])])) : (s(), i("svg", nl, [...E[3] || (E[3] = [
|
|
799
|
+
r("path", {
|
|
799
800
|
"stroke-linecap": "round",
|
|
800
801
|
"stroke-linejoin": "round",
|
|
801
802
|
"stroke-width": "2",
|
|
802
803
|
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
803
804
|
}, null, -1),
|
|
804
|
-
|
|
805
|
+
r("path", {
|
|
805
806
|
"stroke-linecap": "round",
|
|
806
807
|
"stroke-linejoin": "round",
|
|
807
808
|
"stroke-width": "2",
|
|
808
809
|
d: "M2.458 12C3.732 7.943 7.523 5 12 5s8.268 2.943 9.542 7c-1.274 4.057-5.065 7-9.542 7S3.732 16.057 2.458 12z"
|
|
809
810
|
}, null, -1)
|
|
810
811
|
])]))
|
|
811
|
-
], 8,
|
|
812
|
+
], 8, sl)) : D("", !0)
|
|
812
813
|
]));
|
|
813
814
|
}
|
|
814
|
-
}),
|
|
815
|
+
}), rl = ["value", "disabled"], il = 1e3, ze = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
815
816
|
__name: "TextArea",
|
|
816
817
|
props: {
|
|
817
818
|
modelValue: String,
|
|
@@ -829,29 +830,29 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
829
830
|
}
|
|
830
831
|
},
|
|
831
832
|
emits: ["update:modelValue"],
|
|
832
|
-
setup(e, { expose:
|
|
833
|
-
const l = e,
|
|
833
|
+
setup(e, { expose: a, emit: t }) {
|
|
834
|
+
const l = e, o = t, u = ne(), d = j(null), f = g(() => {
|
|
834
835
|
const { class: h, ...v } = u;
|
|
835
836
|
return v.maxlength === void 0 && (v.maxlength = il), v;
|
|
836
837
|
}), $ = g(() => [
|
|
837
838
|
"w-full min-w-0 max-w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
838
839
|
l.autoResize ? "resize-none overflow-y-auto" : "resize-y",
|
|
839
840
|
u.class
|
|
840
|
-
]),
|
|
841
|
+
]), y = () => {
|
|
841
842
|
!l.autoResize || !d.value || (d.value.style.height = "auto", d.value.style.height = `${d.value.scrollHeight}px`);
|
|
842
843
|
}, C = (h) => {
|
|
843
|
-
|
|
844
|
+
o("update:modelValue", h.target.value), y();
|
|
844
845
|
};
|
|
845
846
|
return ee(() => {
|
|
846
|
-
d.value?.hasAttribute("autofocus") && d.value.focus(),
|
|
847
|
-
|
|
847
|
+
d.value?.hasAttribute("autofocus") && d.value.focus(), ye(() => {
|
|
848
|
+
y();
|
|
848
849
|
});
|
|
849
850
|
}), Q(() => l.modelValue, () => {
|
|
850
|
-
|
|
851
|
-
|
|
851
|
+
ye(() => {
|
|
852
|
+
y();
|
|
852
853
|
});
|
|
853
|
-
}),
|
|
854
|
-
|
|
854
|
+
}), a({ focus: () => d.value?.focus() }), (h, v) => (s(), i("div", null, [
|
|
855
|
+
r("textarea", z({
|
|
855
856
|
ref_key: "textarea",
|
|
856
857
|
ref: d
|
|
857
858
|
}, f.value, {
|
|
@@ -859,7 +860,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
859
860
|
value: l.modelValue,
|
|
860
861
|
disabled: l.disabled,
|
|
861
862
|
onInput: C
|
|
862
|
-
}), null, 16,
|
|
863
|
+
}), null, 16, rl)
|
|
863
864
|
]));
|
|
864
865
|
}
|
|
865
866
|
}), dl = ["onClick"], Ee = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -947,8 +948,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
947
948
|
}
|
|
948
949
|
},
|
|
949
950
|
emits: ["update:modelValue"],
|
|
950
|
-
setup(e, { emit:
|
|
951
|
-
const t = e, l =
|
|
951
|
+
setup(e, { emit: a }) {
|
|
952
|
+
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
953
|
if (t.modelValue === null || t.modelValue === void 0 || t.modelValue === "" && !t.options.some((N) => h(N) === ""))
|
|
953
954
|
return t.placeholder;
|
|
954
955
|
const x = t.options.find((N) => {
|
|
@@ -956,7 +957,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
956
957
|
return K === t.modelValue || String(K) === String(t.modelValue);
|
|
957
958
|
});
|
|
958
959
|
return x ? v(x) : t.modelValue;
|
|
959
|
-
}), F = (x) => t.modelModifiers.number ? x === "" ? "" : Number(x) : x,
|
|
960
|
+
}), F = (x) => t.modelModifiers.number ? x === "" ? "" : Number(x) : x, oe = () => {
|
|
960
961
|
t.disabled || (u.value = !u.value);
|
|
961
962
|
}, Y = (x) => {
|
|
962
963
|
const N = h(x);
|
|
@@ -966,12 +967,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
966
967
|
}, G = () => {
|
|
967
968
|
if (!f.value)
|
|
968
969
|
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
|
-
|
|
970
|
+
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);
|
|
971
|
+
y.value = {
|
|
971
972
|
position: "fixed",
|
|
972
973
|
left: `${Math.max(x.left, 8)}px`,
|
|
973
|
-
width: `${
|
|
974
|
-
maxHeight: `${
|
|
974
|
+
width: `${se}px`,
|
|
975
|
+
maxHeight: `${ae}px`,
|
|
975
976
|
zIndex: "9999",
|
|
976
977
|
...le ? { bottom: `${K - x.top + 1}px` } : { top: `${x.bottom - 1}px` }
|
|
977
978
|
};
|
|
@@ -984,31 +985,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
984
985
|
}), Je(() => {
|
|
985
986
|
document.removeEventListener("click", J), window.removeEventListener("resize", G), window.removeEventListener("scroll", G, !0);
|
|
986
987
|
}), Q(u, async (x) => {
|
|
987
|
-
x && (await
|
|
988
|
-
}), (x, N) => (
|
|
988
|
+
x && (await ye(), G());
|
|
989
|
+
}), (x, N) => (s(), i("div", {
|
|
989
990
|
ref_key: "rootRef",
|
|
990
991
|
ref: d,
|
|
991
992
|
class: "relative",
|
|
992
|
-
onClick:
|
|
993
|
+
onClick: oe
|
|
993
994
|
}, [
|
|
994
|
-
|
|
995
|
+
r("div", z({
|
|
995
996
|
ref_key: "triggerRef",
|
|
996
997
|
ref: f,
|
|
997
998
|
class: [
|
|
998
999
|
e.baseClass,
|
|
999
1000
|
M.value ? e.deletedSelectedClass : e.normalTextClass,
|
|
1000
1001
|
"flex items-center justify-between cursor-pointer",
|
|
1001
|
-
I(
|
|
1002
|
+
I(o).class
|
|
1002
1003
|
]
|
|
1003
|
-
}, I(
|
|
1004
|
-
|
|
1004
|
+
}, I(o), { tabindex: "0" }), [
|
|
1005
|
+
r("span", {
|
|
1005
1006
|
class: k({ "text-gray-400": !e.modelValue && e.placeholder })
|
|
1006
1007
|
}, T(E.value), 3),
|
|
1007
1008
|
R(I(xe), {
|
|
1008
1009
|
class: k(["size-5 text-gray-400 transition-transform", { "rotate-180": u.value }])
|
|
1009
1010
|
}, null, 8, ["class"])
|
|
1010
1011
|
], 16),
|
|
1011
|
-
R(
|
|
1012
|
+
R(re, {
|
|
1012
1013
|
"enter-active-class": "transition-all duration-200 ease-out",
|
|
1013
1014
|
"enter-from-class": "opacity-0 transform scale-95 -translate-y-2",
|
|
1014
1015
|
"enter-to-class": "opacity-100 transform scale-100 translate-y-0",
|
|
@@ -1017,15 +1018,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1017
1018
|
"leave-to-class": "opacity-0 transform scale-95 -translate-y-2"
|
|
1018
1019
|
}, {
|
|
1019
1020
|
default: O(() => [
|
|
1020
|
-
(
|
|
1021
|
-
u.value ? (
|
|
1021
|
+
(s(), B(Ze, { to: "body" }, [
|
|
1022
|
+
u.value ? (s(), i("div", {
|
|
1022
1023
|
key: 0,
|
|
1023
1024
|
ref_key: "dropdownMenuRef",
|
|
1024
1025
|
ref: $,
|
|
1025
1026
|
class: k(e.dropdownClass),
|
|
1026
|
-
style: Te(
|
|
1027
|
+
style: Te(y.value)
|
|
1027
1028
|
}, [
|
|
1028
|
-
e.placeholder ? (
|
|
1029
|
+
e.placeholder ? (s(), i("div", {
|
|
1029
1030
|
key: 0,
|
|
1030
1031
|
class: k([
|
|
1031
1032
|
e.dropdownOptionClass,
|
|
@@ -1034,7 +1035,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1034
1035
|
]),
|
|
1035
1036
|
onClick: ve(W, ["stop"])
|
|
1036
1037
|
}, T(e.placeholder), 3)) : D("", !0),
|
|
1037
|
-
M.value ? (
|
|
1038
|
+
M.value ? (s(), i("div", {
|
|
1038
1039
|
key: 1,
|
|
1039
1040
|
class: k([
|
|
1040
1041
|
e.dropdownOptionClass,
|
|
@@ -1042,7 +1043,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1042
1043
|
e.dropdownSelectedClass
|
|
1043
1044
|
])
|
|
1044
1045
|
}, T(v(M.value)), 3)) : D("", !0),
|
|
1045
|
-
(
|
|
1046
|
+
(s(!0), i(q, null, P(L.value, (K) => (s(), i("div", {
|
|
1046
1047
|
key: String(h(K)),
|
|
1047
1048
|
class: k([
|
|
1048
1049
|
e.dropdownOptionClass,
|
|
@@ -1111,11 +1112,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1111
1112
|
},
|
|
1112
1113
|
baseClass: {
|
|
1113
1114
|
type: [String, Array, Object],
|
|
1114
|
-
default: "block w-full rounded-
|
|
1115
|
+
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
1116
|
},
|
|
1116
1117
|
normalTextClass: {
|
|
1117
1118
|
type: [String, Array, Object],
|
|
1118
|
-
default: "text-
|
|
1119
|
+
default: "text-slate-900"
|
|
1119
1120
|
},
|
|
1120
1121
|
deletedSelectedClass: {
|
|
1121
1122
|
type: [String, Array, Object],
|
|
@@ -1123,33 +1124,33 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1123
1124
|
},
|
|
1124
1125
|
optionClass: {
|
|
1125
1126
|
type: [String, Array, Object],
|
|
1126
|
-
default: "text-
|
|
1127
|
+
default: "text-slate-900"
|
|
1127
1128
|
},
|
|
1128
1129
|
deletedOptionClass: {
|
|
1129
1130
|
type: [String, Array, Object],
|
|
1130
|
-
default: "text-
|
|
1131
|
+
default: "text-rose-700"
|
|
1131
1132
|
},
|
|
1132
1133
|
placeholderClass: {
|
|
1133
1134
|
type: [String, Array, Object],
|
|
1134
|
-
default: "text-
|
|
1135
|
+
default: "text-slate-500"
|
|
1135
1136
|
},
|
|
1136
1137
|
dropdownClass: {
|
|
1137
1138
|
type: [String, Array, Object],
|
|
1138
|
-
default: "bg-white border border-
|
|
1139
|
+
default: "bg-white/95 border border-slate-200 rounded-xl shadow-xl max-h-60 overflow-auto z-50 backdrop-blur-sm"
|
|
1139
1140
|
},
|
|
1140
1141
|
dropdownOptionClass: {
|
|
1141
1142
|
type: [String, Array, Object],
|
|
1142
|
-
default: "px-4 py-3 hover:bg-
|
|
1143
|
+
default: "px-4 py-3 hover:bg-slate-100 cursor-pointer transition-colors"
|
|
1143
1144
|
},
|
|
1144
1145
|
dropdownSelectedClass: {
|
|
1145
1146
|
type: [String, Array, Object],
|
|
1146
|
-
default: "bg-
|
|
1147
|
+
default: "bg-blue-50 text-blue-700 font-medium"
|
|
1147
1148
|
}
|
|
1148
1149
|
},
|
|
1149
1150
|
emits: ["update:modelValue"],
|
|
1150
|
-
setup(e, { emit:
|
|
1151
|
-
const t =
|
|
1152
|
-
return (l,
|
|
1151
|
+
setup(e, { emit: a }) {
|
|
1152
|
+
const t = a;
|
|
1153
|
+
return (l, o) => (s(), B(Ee, z({
|
|
1153
1154
|
"model-value": e.modelValue,
|
|
1154
1155
|
"model-modifiers": e.modelModifiers,
|
|
1155
1156
|
options: e.options,
|
|
@@ -1170,7 +1171,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1170
1171
|
"dropdown-class": e.dropdownClass,
|
|
1171
1172
|
"dropdown-option-class": e.dropdownOptionClass,
|
|
1172
1173
|
"dropdown-selected-class": e.dropdownSelectedClass,
|
|
1173
|
-
"onUpdate:modelValue":
|
|
1174
|
+
"onUpdate:modelValue": o[0] || (o[0] = (u) => t("update:modelValue", u))
|
|
1174
1175
|
}, l.$attrs), null, 16, ["model-value", "model-modifiers", "options", "placeholder", "placeholder-disabled", "disabled", "soft-delete-aware", "label-key", "value-key", "deleted-key", "option-label", "base-class", "normal-text-class", "deleted-selected-class", "option-class", "deleted-option-class", "placeholder-class", "dropdown-class", "dropdown-option-class", "dropdown-selected-class"]));
|
|
1175
1176
|
}
|
|
1176
1177
|
}, ul = ["type", "max", "value", "disabled"], Ne = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
@@ -1194,31 +1195,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1194
1195
|
}
|
|
1195
1196
|
},
|
|
1196
1197
|
emits: ["update:modelValue"],
|
|
1197
|
-
setup(e, { expose:
|
|
1198
|
-
const l = e,
|
|
1199
|
-
const
|
|
1200
|
-
return typeof M != "string" || M === "" || M >
|
|
1198
|
+
setup(e, { expose: a, emit: t }) {
|
|
1199
|
+
const l = e, o = t, u = ne(), d = j(null), f = g(() => l.withTimestamp ? "datetime-local" : "date"), $ = g(() => l.modelValue ?? ""), y = g(() => {
|
|
1200
|
+
const m = l.withTimestamp ? "9999-12-31T23:59" : "9999-12-31", M = u.max;
|
|
1201
|
+
return typeof M != "string" || M === "" || M > m ? m : M;
|
|
1201
1202
|
}), C = g(() => {
|
|
1202
|
-
const { class:
|
|
1203
|
+
const { class: m, type: M, ...L } = u;
|
|
1203
1204
|
return L;
|
|
1204
1205
|
}), h = g(() => [
|
|
1205
1206
|
"w-full border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm",
|
|
1206
1207
|
u.class
|
|
1207
|
-
]), v = (
|
|
1208
|
-
const M =
|
|
1208
|
+
]), v = (m) => typeof m != "string" ? "" : m.replace(/^(\d{4})\d+/, "$1"), S = (m) => {
|
|
1209
|
+
const M = m.target;
|
|
1209
1210
|
if (!M)
|
|
1210
1211
|
return;
|
|
1211
1212
|
const L = String(M.value ?? ""), E = v(L);
|
|
1212
|
-
E !== L && (M.value = E),
|
|
1213
|
+
E !== L && (M.value = E), o("update:modelValue", E);
|
|
1213
1214
|
};
|
|
1214
1215
|
return ee(() => {
|
|
1215
1216
|
d.value?.hasAttribute("autofocus") && d.value.focus();
|
|
1216
|
-
}),
|
|
1217
|
+
}), a({ focus: () => d.value?.focus() }), (m, M) => (s(), i("input", z({
|
|
1217
1218
|
ref_key: "input",
|
|
1218
1219
|
ref: d
|
|
1219
1220
|
}, C.value, {
|
|
1220
1221
|
type: f.value,
|
|
1221
|
-
max:
|
|
1222
|
+
max: y.value,
|
|
1222
1223
|
class: [h.value, l.disabled ? l.disabledClass : null],
|
|
1223
1224
|
value: $.value,
|
|
1224
1225
|
disabled: l.disabled,
|
|
@@ -1226,10 +1227,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1226
1227
|
onChange: S
|
|
1227
1228
|
}), null, 16, ul));
|
|
1228
1229
|
}
|
|
1229
|
-
}), cl = { class: "relative" }, fl = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, gl = ["accept"],
|
|
1230
|
+
}), cl = { class: "relative" }, fl = { class: "absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none" }, gl = ["accept"], pl = {
|
|
1230
1231
|
key: 0,
|
|
1231
1232
|
class: "mt-4 p-4 bg-gray-50 rounded-lg border border-gray-200"
|
|
1232
|
-
},
|
|
1233
|
+
}, 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
1234
|
__name: "ImageInput",
|
|
1234
1235
|
props: {
|
|
1235
1236
|
currentImageUrl: {
|
|
@@ -1254,33 +1255,33 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1254
1255
|
}
|
|
1255
1256
|
},
|
|
1256
1257
|
emits: ["update:modelValue"],
|
|
1257
|
-
setup(e, { emit:
|
|
1258
|
-
const t =
|
|
1258
|
+
setup(e, { emit: a }) {
|
|
1259
|
+
const t = a, l = e, o = (u) => {
|
|
1259
1260
|
const d = u.target.files?.[0] ?? null;
|
|
1260
1261
|
t("update:modelValue", d);
|
|
1261
1262
|
};
|
|
1262
|
-
return (u, d) => (
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
R(I(
|
|
1263
|
+
return (u, d) => (s(), i("div", null, [
|
|
1264
|
+
r("div", cl, [
|
|
1265
|
+
r("div", fl, [
|
|
1266
|
+
R(I(ot), { class: "size-5 text-gray-400" })
|
|
1266
1267
|
]),
|
|
1267
|
-
|
|
1268
|
+
r("input", z(e.attrs, {
|
|
1268
1269
|
type: "file",
|
|
1269
1270
|
accept: e.accept,
|
|
1270
1271
|
class: "block w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg bg-white text-sm file:mr-4 file:py-2 file:px-4 file:rounded-md file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200 cursor-pointer",
|
|
1271
|
-
onChange:
|
|
1272
|
+
onChange: o
|
|
1272
1273
|
}), null, 16, gl)
|
|
1273
1274
|
]),
|
|
1274
|
-
l.currentImageUrl ? (
|
|
1275
|
-
|
|
1276
|
-
|
|
1275
|
+
l.currentImageUrl ? (s(), i("div", pl, [
|
|
1276
|
+
r("div", ml, [
|
|
1277
|
+
r("img", {
|
|
1277
1278
|
src: l.currentImageUrl,
|
|
1278
1279
|
alt: "Current logo",
|
|
1279
1280
|
class: "h-16 w-auto max-w-24 object-contain rounded-lg shadow-sm"
|
|
1280
|
-
}, null, 8,
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1281
|
+
}, null, 8, bl),
|
|
1282
|
+
r("div", null, [
|
|
1283
|
+
r("p", yl, T(l.currentLabel), 1),
|
|
1284
|
+
r("p", vl, T(l.currentSubtext), 1)
|
|
1284
1285
|
])
|
|
1285
1286
|
])
|
|
1286
1287
|
])) : D("", !0)
|
|
@@ -1303,21 +1304,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1303
1304
|
}
|
|
1304
1305
|
},
|
|
1305
1306
|
emits: ["update:modelValue"],
|
|
1306
|
-
setup(e, { emit:
|
|
1307
|
-
const t =
|
|
1308
|
-
return (f, $) => (
|
|
1309
|
-
(
|
|
1310
|
-
key: `notation-${C}-${
|
|
1307
|
+
setup(e, { emit: a }) {
|
|
1308
|
+
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);
|
|
1309
|
+
return (f, $) => (s(), i("div", hl, [
|
|
1310
|
+
(s(!0), i(q, null, P(o.value, (y, C) => (s(), i("button", {
|
|
1311
|
+
key: `notation-${C}-${y}`,
|
|
1311
1312
|
type: "button",
|
|
1312
1313
|
class: k(["flex-1 border-l border-gray-300 px-2 text-center font-semibold transition-colors duration-150 first:border-l-0", [
|
|
1313
1314
|
C === 0 ? "rounded-l-lg" : "",
|
|
1314
|
-
C ===
|
|
1315
|
-
u(
|
|
1315
|
+
C === o.value.length - 1 ? "rounded-r-lg" : "",
|
|
1316
|
+
u(y) ? "bg-indigo-600 text-white" : "bg-white text-gray-700 hover:bg-gray-50",
|
|
1316
1317
|
"focus-visible:ring-2 "
|
|
1317
1318
|
]]),
|
|
1318
1319
|
disabled: e.disabled,
|
|
1319
|
-
onClick: (h) => d(
|
|
1320
|
-
}, T(
|
|
1320
|
+
onClick: (h) => d(y)
|
|
1321
|
+
}, T(y), 11, xl))), 128))
|
|
1321
1322
|
]));
|
|
1322
1323
|
}
|
|
1323
1324
|
}, wl = ["name", "value", "checked", "disabled"], Re = {
|
|
@@ -1345,31 +1346,31 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1345
1346
|
}
|
|
1346
1347
|
},
|
|
1347
1348
|
emits: ["update:modelValue"],
|
|
1348
|
-
setup(e, { emit:
|
|
1349
|
-
const t =
|
|
1349
|
+
setup(e, { emit: a }) {
|
|
1350
|
+
const t = a, l = e, o = g(() => String(l.modelValue ?? "") === String(l.value)), u = j(!1), d = () => {
|
|
1350
1351
|
u.value = !0;
|
|
1351
1352
|
}, f = () => {
|
|
1352
1353
|
u.value = !1;
|
|
1353
1354
|
}, $ = () => t("update:modelValue", l.value);
|
|
1354
|
-
return (
|
|
1355
|
+
return (y, C) => (s(), i("label", {
|
|
1355
1356
|
class: k(["inline-flex items-center rounded-full border px-3 py-1 text-sm font-medium select-none transition-colors", [
|
|
1356
|
-
|
|
1357
|
+
o.value ? "bg-indigo-600 text-white border-indigo-600" : "text-gray-600 border-gray-200",
|
|
1357
1358
|
e.disabled ? "opacity-60 cursor-not-allowed" : "cursor-pointer",
|
|
1358
1359
|
u.value && !e.disabled ? "ring-2 ring-indigo-500/80 ring-offset-2 ring-offset-white" : ""
|
|
1359
1360
|
]])
|
|
1360
1361
|
}, [
|
|
1361
|
-
|
|
1362
|
+
r("input", {
|
|
1362
1363
|
type: "radio",
|
|
1363
1364
|
class: "sr-only",
|
|
1364
1365
|
name: e.name,
|
|
1365
1366
|
value: e.value,
|
|
1366
|
-
checked:
|
|
1367
|
+
checked: o.value,
|
|
1367
1368
|
disabled: e.disabled,
|
|
1368
1369
|
onChange: $,
|
|
1369
1370
|
onFocus: d,
|
|
1370
1371
|
onBlur: f
|
|
1371
1372
|
}, null, 40, wl),
|
|
1372
|
-
|
|
1373
|
+
r("span", null, T(o.value ? "✓" : "○") + " " + T(e.label), 1)
|
|
1373
1374
|
], 2));
|
|
1374
1375
|
}
|
|
1375
1376
|
}, kl = { class: "flex flex-wrap gap-3" }, He = {
|
|
@@ -1393,10 +1394,10 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1393
1394
|
}
|
|
1394
1395
|
},
|
|
1395
1396
|
emits: ["update:modelValue"],
|
|
1396
|
-
setup(e, { emit:
|
|
1397
|
-
const t =
|
|
1398
|
-
return (d, f) => (
|
|
1399
|
-
(
|
|
1397
|
+
setup(e, { emit: a }) {
|
|
1398
|
+
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);
|
|
1399
|
+
return (d, f) => (s(), i("div", kl, [
|
|
1400
|
+
(s(!0), i(q, null, P(o.value, ($) => (s(), B(pe, {
|
|
1400
1401
|
key: `radio-${e.name ?? "group"}-${$}`,
|
|
1401
1402
|
type: "radio-input",
|
|
1402
1403
|
"model-value": l.modelValue,
|
|
@@ -1414,7 +1415,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1414
1415
|
}, Cl = {
|
|
1415
1416
|
key: 14,
|
|
1416
1417
|
class: "flex items-center mt-2 text-sm text-red-600"
|
|
1417
|
-
}, ce = "block w-full px-4 py-3
|
|
1418
|
+
}, ce = "block w-full rounded-lg border border-slate-300 bg-white px-4 py-3 text-sm text-slate-900 placeholder:text-slate-400 shadow-sm transition-all duration-200 focus:border-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500/20", pe = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
1418
1419
|
__name: "InputGroup",
|
|
1419
1420
|
props: {
|
|
1420
1421
|
type: {
|
|
@@ -1531,11 +1532,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1531
1532
|
}
|
|
1532
1533
|
},
|
|
1533
1534
|
emits: ["update:modelValue", "blur"],
|
|
1534
|
-
setup(e, { emit:
|
|
1535
|
-
const t = e, l =
|
|
1536
|
-
const U =
|
|
1535
|
+
setup(e, { emit: a }) {
|
|
1536
|
+
const t = e, l = a, o = ne(), u = (U) => l("update:modelValue", U), d = g(() => !!t.errorMessage), f = g(() => S.value || m.value), $ = g(() => {
|
|
1537
|
+
const U = o.id;
|
|
1537
1538
|
return typeof U == "string" && U !== "" ? U : void 0;
|
|
1538
|
-
}),
|
|
1539
|
+
}), y = [
|
|
1539
1540
|
"text",
|
|
1540
1541
|
"email",
|
|
1541
1542
|
"password",
|
|
@@ -1547,30 +1548,30 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1547
1548
|
"month",
|
|
1548
1549
|
"week",
|
|
1549
1550
|
"color"
|
|
1550
|
-
], C = [], h = g(() => t.type === "image"), v = g(() => t.type === "notation"), S = g(() => t.type === "checkbox-input"),
|
|
1551
|
-
...
|
|
1552
|
-
class: [ce,
|
|
1551
|
+
], 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(() => ({
|
|
1552
|
+
...o,
|
|
1553
|
+
class: [ce, o.class],
|
|
1553
1554
|
type: t.type,
|
|
1554
1555
|
modelValue: t.modelValue,
|
|
1555
1556
|
disabled: t.disabled,
|
|
1556
1557
|
disabledClass: t.disabledClass
|
|
1557
1558
|
})), J = g(() => ({
|
|
1558
|
-
...
|
|
1559
|
-
class: [ce,
|
|
1559
|
+
...o,
|
|
1560
|
+
class: [ce, o.class],
|
|
1560
1561
|
modelValue: t.modelValue,
|
|
1561
1562
|
disabled: t.disabled,
|
|
1562
1563
|
disabledClass: t.disabledClass
|
|
1563
1564
|
})), x = g(() => ({
|
|
1564
|
-
...
|
|
1565
|
-
class: [ce,
|
|
1565
|
+
...o,
|
|
1566
|
+
class: [ce, o.class],
|
|
1566
1567
|
modelValue: t.modelValue,
|
|
1567
1568
|
withTimestamp: t.type === "datetime-local" || t.withTimestamp,
|
|
1568
1569
|
disabled: t.disabled,
|
|
1569
1570
|
disabledClass: t.disabledClass
|
|
1570
1571
|
})), N = g(() => {
|
|
1571
1572
|
const U = {
|
|
1572
|
-
...
|
|
1573
|
-
class: [ce,
|
|
1573
|
+
...o,
|
|
1574
|
+
class: [ce, o.class],
|
|
1574
1575
|
modelValue: t.modelValue,
|
|
1575
1576
|
modelModifiers: t.modelModifiers,
|
|
1576
1577
|
options: t.options,
|
|
@@ -1585,75 +1586,75 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1585
1586
|
};
|
|
1586
1587
|
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
1588
|
}), K = g(() => ({
|
|
1588
|
-
...
|
|
1589
|
+
...o,
|
|
1589
1590
|
modelValue: t.modelValue,
|
|
1590
1591
|
options: t.options,
|
|
1591
1592
|
disabled: t.disabled
|
|
1592
1593
|
})), X = g(() => ({
|
|
1593
|
-
...
|
|
1594
|
+
...o,
|
|
1594
1595
|
modelValue: t.modelValue,
|
|
1595
1596
|
options: t.options,
|
|
1596
1597
|
disabled: t.disabled
|
|
1597
1598
|
})), te = g(() => ({
|
|
1598
|
-
...
|
|
1599
|
+
...o,
|
|
1599
1600
|
modelValue: t.modelValue,
|
|
1600
1601
|
options: t.options,
|
|
1601
|
-
name: t.name ??
|
|
1602
|
+
name: t.name ?? o.name,
|
|
1602
1603
|
disabled: t.disabled
|
|
1603
1604
|
})), le = g(() => ({
|
|
1604
|
-
...
|
|
1605
|
+
...o,
|
|
1605
1606
|
modelValue: t.modelValue,
|
|
1606
|
-
label: t.label ||
|
|
1607
|
+
label: t.label || o.label || "",
|
|
1607
1608
|
disabled: t.disabled
|
|
1608
|
-
})),
|
|
1609
|
-
...
|
|
1609
|
+
})), se = g(() => ({
|
|
1610
|
+
...o,
|
|
1610
1611
|
modelValue: t.modelValue,
|
|
1611
|
-
label: t.label ||
|
|
1612
|
-
name: t.name ??
|
|
1612
|
+
label: t.label || o.label || "",
|
|
1613
|
+
name: t.name ?? o.name,
|
|
1613
1614
|
disabled: t.disabled
|
|
1614
|
-
})),
|
|
1615
|
-
...
|
|
1616
|
-
accept: t.accept ??
|
|
1615
|
+
})), ae = g(() => ({
|
|
1616
|
+
...o,
|
|
1617
|
+
accept: t.accept ?? o.accept ?? "image/*",
|
|
1617
1618
|
modelValue: t.modelValue,
|
|
1618
1619
|
currentImageUrl: t.currentImageUrl,
|
|
1619
1620
|
currentLabel: t.currentLabel,
|
|
1620
1621
|
currentSubtext: t.currentSubtext
|
|
1621
1622
|
}));
|
|
1622
|
-
return (U, V) => (
|
|
1623
|
-
e.label && !f.value ? (
|
|
1623
|
+
return (U, V) => (s(), i("div", null, [
|
|
1624
|
+
e.label && !f.value ? (s(), i("label", {
|
|
1624
1625
|
key: 0,
|
|
1625
1626
|
for: $.value,
|
|
1626
1627
|
class: "text-base font-semibold text-gray-900 mb-1 block"
|
|
1627
1628
|
}, T(e.label), 9, Sl)) : D("", !0),
|
|
1628
|
-
e.helperText && !f.value ? (
|
|
1629
|
-
F.value ? (
|
|
1629
|
+
e.helperText && !f.value ? (s(), i("span", $l, T(e.helperText), 1)) : D("", !0),
|
|
1630
|
+
F.value ? (s(), B(ze, z({ key: 2 }, J.value, {
|
|
1630
1631
|
"onUpdate:modelValue": V[0] || (V[0] = (_) => l("update:modelValue", _)),
|
|
1631
1632
|
onBlur: V[1] || (V[1] = (_) => l("blur", _))
|
|
1632
|
-
}), null, 16)) :
|
|
1633
|
+
}), null, 16)) : oe.value ? (s(), B(Fe, z({ key: 3 }, N.value, {
|
|
1633
1634
|
"onUpdate:modelValue": V[2] || (V[2] = (_) => l("update:modelValue", _)),
|
|
1634
1635
|
onBlur: V[3] || (V[3] = (_) => l("blur", _))
|
|
1635
|
-
}), null, 16)) : E.value ? (
|
|
1636
|
+
}), null, 16)) : E.value ? (s(), B(Ne, z({ key: 4 }, x.value, {
|
|
1636
1637
|
"onUpdate:modelValue": V[4] || (V[4] = (_) => l("update:modelValue", _)),
|
|
1637
1638
|
onBlur: V[5] || (V[5] = (_) => l("blur", _))
|
|
1638
|
-
}), null, 16)) : Y.value ? (
|
|
1639
|
+
}), null, 16)) : Y.value ? (s(), B(Oe, z({ key: 5 }, G.value, {
|
|
1639
1640
|
"onUpdate:modelValue": V[6] || (V[6] = (_) => l("update:modelValue", _)),
|
|
1640
1641
|
onBlur: V[7] || (V[7] = (_) => l("blur", _))
|
|
1641
|
-
}), null, 16)) : h.value ? (
|
|
1642
|
+
}), null, 16)) : h.value ? (s(), B(Ke, z({ key: 6 }, ae.value, {
|
|
1642
1643
|
"onUpdate:modelValue": V[8] || (V[8] = (_) => l("update:modelValue", _)),
|
|
1643
1644
|
onBlur: V[9] || (V[9] = (_) => l("blur", _))
|
|
1644
|
-
}), null, 16)) : S.value ? (
|
|
1645
|
+
}), null, 16)) : S.value ? (s(), B(je, z({ key: 7 }, le.value, {
|
|
1645
1646
|
"onUpdate:modelValue": V[10] || (V[10] = (_) => l("update:modelValue", _)),
|
|
1646
1647
|
onBlur: V[11] || (V[11] = (_) => l("blur", _))
|
|
1647
|
-
}), null, 16)) :
|
|
1648
|
+
}), null, 16)) : m.value ? (s(), B(Re, z({ key: 8 }, se.value, {
|
|
1648
1649
|
"onUpdate:modelValue": V[12] || (V[12] = (_) => l("update:modelValue", _)),
|
|
1649
1650
|
onBlur: V[13] || (V[13] = (_) => l("blur", _))
|
|
1650
|
-
}), null, 16)) : v.value ? (
|
|
1651
|
+
}), null, 16)) : v.value ? (s(), B(Ue, z({ key: 9 }, K.value, {
|
|
1651
1652
|
"onUpdate:modelValue": V[14] || (V[14] = (_) => l("update:modelValue", _)),
|
|
1652
1653
|
onBlur: V[15] || (V[15] = (_) => l("blur", _))
|
|
1653
|
-
}), null, 16)) : M.value ? (
|
|
1654
|
+
}), null, 16)) : M.value ? (s(), B(qe, z({ key: 10 }, X.value, {
|
|
1654
1655
|
"onUpdate:modelValue": V[16] || (V[16] = (_) => l("update:modelValue", _)),
|
|
1655
1656
|
onBlur: V[17] || (V[17] = (_) => l("blur", _))
|
|
1656
|
-
}), null, 16)) : L.value ? (
|
|
1657
|
+
}), null, 16)) : L.value ? (s(), B(He, z({ key: 11 }, te.value, {
|
|
1657
1658
|
"onUpdate:modelValue": V[18] || (V[18] = (_) => l("update:modelValue", _)),
|
|
1658
1659
|
onBlur: V[19] || (V[19] = (_) => l("blur", _))
|
|
1659
1660
|
}), null, 16)) : W.value ? w(U.$slots, "unsupported-type", {
|
|
@@ -1661,17 +1662,17 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1661
1662
|
type: e.type,
|
|
1662
1663
|
modelValue: e.modelValue,
|
|
1663
1664
|
updateValue: u,
|
|
1664
|
-
attrs: I(
|
|
1665
|
+
attrs: I(o)
|
|
1665
1666
|
}) : w(U.$slots, "unsupported-type", {
|
|
1666
1667
|
key: 13,
|
|
1667
1668
|
type: e.type,
|
|
1668
1669
|
modelValue: e.modelValue,
|
|
1669
1670
|
updateValue: u,
|
|
1670
|
-
attrs: I(
|
|
1671
|
+
attrs: I(o)
|
|
1671
1672
|
}),
|
|
1672
|
-
d.value ? (
|
|
1673
|
-
R(I(
|
|
1674
|
-
|
|
1673
|
+
d.value ? (s(), i("div", Cl, [
|
|
1674
|
+
R(I(rt), { class: "mr-1 h-4 w-4 flex-shrink-0" }),
|
|
1675
|
+
r("span", null, T(e.errorMessage), 1)
|
|
1675
1676
|
])) : D("", !0)
|
|
1676
1677
|
]));
|
|
1677
1678
|
}
|
|
@@ -1692,21 +1693,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1692
1693
|
}
|
|
1693
1694
|
},
|
|
1694
1695
|
emits: ["update:modelValue"],
|
|
1695
|
-
setup(e, { emit:
|
|
1696
|
-
const t =
|
|
1697
|
-
const
|
|
1698
|
-
$ && C === -1 ?
|
|
1696
|
+
setup(e, { emit: a }) {
|
|
1697
|
+
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, $) => {
|
|
1698
|
+
const y = Array.isArray(l.modelValue) ? [...l.modelValue] : [], C = y.indexOf(f);
|
|
1699
|
+
$ && C === -1 ? y.push(f) : !$ && C !== -1 && y.splice(C, 1), t("update:modelValue", y);
|
|
1699
1700
|
};
|
|
1700
|
-
return (f, $) => (
|
|
1701
|
-
(
|
|
1702
|
-
key: `checkbox-${
|
|
1701
|
+
return (f, $) => (s(), i("div", Vl, [
|
|
1702
|
+
(s(!0), i(q, null, P(o.value, (y) => (s(), B(pe, {
|
|
1703
|
+
key: `checkbox-${y}`,
|
|
1703
1704
|
type: "checkbox-input",
|
|
1704
|
-
"model-value": u(
|
|
1705
|
+
"model-value": u(y),
|
|
1705
1706
|
value: !0,
|
|
1706
1707
|
"unchecked-value": !1,
|
|
1707
|
-
label:
|
|
1708
|
+
label: y,
|
|
1708
1709
|
disabled: e.disabled,
|
|
1709
|
-
"onUpdate:modelValue": (C) => d(
|
|
1710
|
+
"onUpdate:modelValue": (C) => d(y, C)
|
|
1710
1711
|
}, null, 8, ["model-value", "label", "disabled", "onUpdate:modelValue"]))), 128))
|
|
1711
1712
|
]));
|
|
1712
1713
|
}
|
|
@@ -1732,12 +1733,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1732
1733
|
}
|
|
1733
1734
|
},
|
|
1734
1735
|
emits: ["close"],
|
|
1735
|
-
setup(e, { emit:
|
|
1736
|
-
const t = e, l =
|
|
1737
|
-
document.body.style.overflow = "hidden", u.value = !0,
|
|
1736
|
+
setup(e, { emit: a }) {
|
|
1737
|
+
const t = e, l = a, o = j(), u = j(t.show), d = () => {
|
|
1738
|
+
document.body.style.overflow = "hidden", u.value = !0, o.value?.showModal();
|
|
1738
1739
|
}, f = () => {
|
|
1739
1740
|
document.body.style.overflow = null, setTimeout(() => {
|
|
1740
|
-
|
|
1741
|
+
o.value?.close(), u.value = !1;
|
|
1741
1742
|
}, 200);
|
|
1742
1743
|
};
|
|
1743
1744
|
Q(() => t.show, () => {
|
|
@@ -1747,11 +1748,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1747
1748
|
});
|
|
1748
1749
|
const $ = () => {
|
|
1749
1750
|
t.closeable && l("close");
|
|
1750
|
-
},
|
|
1751
|
+
}, y = (v) => {
|
|
1751
1752
|
v.key === "Escape" && (v.preventDefault(), t.show && $());
|
|
1752
1753
|
};
|
|
1753
|
-
ee(() => document.addEventListener("keydown",
|
|
1754
|
-
document.removeEventListener("keydown",
|
|
1754
|
+
ee(() => document.addEventListener("keydown", y)), Ae(() => {
|
|
1755
|
+
document.removeEventListener("keydown", y), document.body.style.overflow = null;
|
|
1755
1756
|
});
|
|
1756
1757
|
const C = g(() => ({
|
|
1757
1758
|
sm: "sm:max-w-sm",
|
|
@@ -1769,15 +1770,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1769
1770
|
return "items-center justify-center";
|
|
1770
1771
|
}
|
|
1771
1772
|
});
|
|
1772
|
-
return (v, S) => (
|
|
1773
|
+
return (v, S) => (s(), i("dialog", {
|
|
1773
1774
|
class: "z-50 m-0 min-h-full min-w-full overflow-y-auto bg-transparent backdrop:bg-transparent",
|
|
1774
1775
|
ref_key: "dialog",
|
|
1775
|
-
ref:
|
|
1776
|
+
ref: o
|
|
1776
1777
|
}, [
|
|
1777
|
-
|
|
1778
|
+
r("div", {
|
|
1778
1779
|
class: k(["fixed inset-0 overflow-y-auto px-4 py-6 sm:px-0 z-50 flex", h.value])
|
|
1779
1780
|
}, [
|
|
1780
|
-
R(
|
|
1781
|
+
R(re, {
|
|
1781
1782
|
"enter-active-class": "ease-out duration-300",
|
|
1782
1783
|
"enter-from-class": "opacity-0",
|
|
1783
1784
|
"enter-to-class": "opacity-100",
|
|
@@ -1786,18 +1787,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1786
1787
|
"leave-to-class": "opacity-0"
|
|
1787
1788
|
}, {
|
|
1788
1789
|
default: O(() => [
|
|
1789
|
-
Z(
|
|
1790
|
+
Z(r("div", {
|
|
1790
1791
|
class: "fixed inset-0 z-40 transform transition-all",
|
|
1791
1792
|
onClick: $
|
|
1792
1793
|
}, [...S[0] || (S[0] = [
|
|
1793
|
-
|
|
1794
|
+
r("div", { class: "absolute inset-0 bg-gray-500 opacity-75" }, null, -1)
|
|
1794
1795
|
])], 512), [
|
|
1795
1796
|
[ie, e.show]
|
|
1796
1797
|
])
|
|
1797
1798
|
]),
|
|
1798
1799
|
_: 1
|
|
1799
1800
|
}),
|
|
1800
|
-
R(
|
|
1801
|
+
R(re, {
|
|
1801
1802
|
"enter-active-class": "ease-out duration-300",
|
|
1802
1803
|
"enter-from-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",
|
|
1803
1804
|
"enter-to-class": "opacity-100 translate-y-0 sm:scale-100",
|
|
@@ -1806,7 +1807,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1806
1807
|
"leave-to-class": "opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
|
1807
1808
|
}, {
|
|
1808
1809
|
default: O(() => [
|
|
1809
|
-
Z(
|
|
1810
|
+
Z(r("div", {
|
|
1810
1811
|
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
1812
|
}, [
|
|
1812
1813
|
u.value ? w(v.$slots, "default", { key: 0 }) : D("", !0)
|
|
@@ -1841,11 +1842,11 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1841
1842
|
}
|
|
1842
1843
|
},
|
|
1843
1844
|
emits: ["close"],
|
|
1844
|
-
setup(e, { emit:
|
|
1845
|
-
const t =
|
|
1845
|
+
setup(e, { emit: a }) {
|
|
1846
|
+
const t = a, l = () => {
|
|
1846
1847
|
t("close");
|
|
1847
1848
|
};
|
|
1848
|
-
return (
|
|
1849
|
+
return (o, u) => (s(), B($e, {
|
|
1849
1850
|
show: e.show,
|
|
1850
1851
|
"max-width": e.maxWidth,
|
|
1851
1852
|
closeable: e.closeable,
|
|
@@ -1853,23 +1854,23 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1853
1854
|
onClose: l
|
|
1854
1855
|
}, {
|
|
1855
1856
|
default: O(() => [
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1857
|
+
r("div", _l, [
|
|
1858
|
+
r("div", Tl, [
|
|
1859
|
+
r("div", Al, [
|
|
1859
1860
|
R(I(Le), { class: "size-6 text-red-600" })
|
|
1860
1861
|
]),
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
w(
|
|
1862
|
+
r("div", Bl, [
|
|
1863
|
+
r("h3", Ll, [
|
|
1864
|
+
w(o.$slots, "title")
|
|
1864
1865
|
]),
|
|
1865
|
-
|
|
1866
|
-
w(
|
|
1866
|
+
r("div", Il, [
|
|
1867
|
+
w(o.$slots, "content")
|
|
1867
1868
|
])
|
|
1868
1869
|
])
|
|
1869
1870
|
])
|
|
1870
1871
|
]),
|
|
1871
|
-
|
|
1872
|
-
w(
|
|
1872
|
+
r("div", Dl, [
|
|
1873
|
+
w(o.$slots, "footer")
|
|
1873
1874
|
])
|
|
1874
1875
|
]),
|
|
1875
1876
|
_: 3
|
|
@@ -1892,27 +1893,27 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1892
1893
|
}
|
|
1893
1894
|
},
|
|
1894
1895
|
emits: ["close"],
|
|
1895
|
-
setup(e, { emit:
|
|
1896
|
-
const t =
|
|
1896
|
+
setup(e, { emit: a }) {
|
|
1897
|
+
const t = a, l = () => {
|
|
1897
1898
|
t("close");
|
|
1898
1899
|
};
|
|
1899
|
-
return (
|
|
1900
|
+
return (o, u) => (s(), B($e, {
|
|
1900
1901
|
show: e.show,
|
|
1901
1902
|
"max-width": e.maxWidth,
|
|
1902
1903
|
closeable: e.closeable,
|
|
1903
1904
|
onClose: l
|
|
1904
1905
|
}, {
|
|
1905
1906
|
default: O(() => [
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
w(
|
|
1907
|
+
r("div", jl, [
|
|
1908
|
+
r("div", Ol, [
|
|
1909
|
+
w(o.$slots, "title")
|
|
1909
1910
|
]),
|
|
1910
|
-
|
|
1911
|
-
w(
|
|
1911
|
+
r("div", zl, [
|
|
1912
|
+
w(o.$slots, "content")
|
|
1912
1913
|
])
|
|
1913
1914
|
]),
|
|
1914
|
-
|
|
1915
|
-
w(
|
|
1915
|
+
r("div", El, [
|
|
1916
|
+
w(o.$slots, "footer")
|
|
1916
1917
|
])
|
|
1917
1918
|
]),
|
|
1918
1919
|
_: 3
|
|
@@ -1935,28 +1936,28 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1935
1936
|
}
|
|
1936
1937
|
},
|
|
1937
1938
|
setup(e) {
|
|
1938
|
-
const
|
|
1939
|
+
const a = e;
|
|
1939
1940
|
let t = j(!1);
|
|
1940
1941
|
const l = (d) => {
|
|
1941
1942
|
t.value && d.key === "Escape" && (t.value = !1);
|
|
1942
1943
|
};
|
|
1943
1944
|
ee(() => document.addEventListener("keydown", l)), Ae(() => document.removeEventListener("keydown", l));
|
|
1944
|
-
const
|
|
1945
|
+
const o = g(() => ({
|
|
1945
1946
|
48: "w-48"
|
|
1946
|
-
})[
|
|
1947
|
-
return (d, f) => (
|
|
1948
|
-
|
|
1949
|
-
onClick: f[0] || (f[0] = ($) =>
|
|
1947
|
+
})[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");
|
|
1948
|
+
return (d, f) => (s(), i("div", Nl, [
|
|
1949
|
+
r("div", {
|
|
1950
|
+
onClick: f[0] || (f[0] = ($) => be(t) ? t.value = !I(t) : t = !I(t))
|
|
1950
1951
|
}, [
|
|
1951
1952
|
w(d.$slots, "trigger", { open: I(t) })
|
|
1952
1953
|
]),
|
|
1953
|
-
Z(
|
|
1954
|
+
Z(r("div", {
|
|
1954
1955
|
class: "fixed inset-0 z-40",
|
|
1955
|
-
onClick: f[1] || (f[1] = ($) =>
|
|
1956
|
+
onClick: f[1] || (f[1] = ($) => be(t) ? t.value = !1 : t = !1)
|
|
1956
1957
|
}, null, 512), [
|
|
1957
1958
|
[ie, I(t)]
|
|
1958
1959
|
]),
|
|
1959
|
-
R(
|
|
1960
|
+
R(re, {
|
|
1960
1961
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
1961
1962
|
"enter-from-class": "transform opacity-0 scale-95 translate-y-2",
|
|
1962
1963
|
"enter-to-class": "transform opacity-100 scale-100 translate-y-0",
|
|
@@ -1965,12 +1966,12 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1965
1966
|
"leave-to-class": "transform opacity-0 scale-95 translate-y-2"
|
|
1966
1967
|
}, {
|
|
1967
1968
|
default: O(() => [
|
|
1968
|
-
Z(
|
|
1969
|
-
class: k(["absolute z-50 mt-2 rounded-xl shadow-xl shadow-gray-900/10", [
|
|
1969
|
+
Z(r("div", {
|
|
1970
|
+
class: k(["absolute z-50 mt-2 rounded-xl shadow-xl shadow-gray-900/10", [o.value, u.value]]),
|
|
1970
1971
|
style: { display: "none" },
|
|
1971
|
-
onClick: f[2] || (f[2] = ($) =>
|
|
1972
|
+
onClick: f[2] || (f[2] = ($) => be(t) ? t.value = !1 : t = !1)
|
|
1972
1973
|
}, [
|
|
1973
|
-
|
|
1974
|
+
r("div", {
|
|
1974
1975
|
class: k(["rounded-xl ring-1 ring-gray-200/60 backdrop-blur-sm bg-white/95", e.contentClasses])
|
|
1975
1976
|
}, [
|
|
1976
1977
|
w(d.$slots, "content")
|
|
@@ -1994,22 +1995,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
1994
1995
|
as: String
|
|
1995
1996
|
},
|
|
1996
1997
|
setup(e) {
|
|
1997
|
-
return (
|
|
1998
|
-
e.as == "button" ? (
|
|
1999
|
-
w(
|
|
2000
|
-
])) : e.as == "a" ? (
|
|
1998
|
+
return (a, t) => (s(), i("div", null, [
|
|
1999
|
+
e.as == "button" ? (s(), i("button", Ul, [
|
|
2000
|
+
w(a.$slots, "default")
|
|
2001
|
+
])) : e.as == "a" ? (s(), i("a", {
|
|
2001
2002
|
key: 1,
|
|
2002
2003
|
href: e.href,
|
|
2003
2004
|
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
2005
|
}, [
|
|
2005
|
-
w(
|
|
2006
|
-
], 8, Rl)) : (
|
|
2006
|
+
w(a.$slots, "default")
|
|
2007
|
+
], 8, Rl)) : (s(), B(I(ge), {
|
|
2007
2008
|
key: 2,
|
|
2008
2009
|
href: e.href,
|
|
2009
2010
|
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
2011
|
}, {
|
|
2011
2012
|
default: O(() => [
|
|
2012
|
-
w(
|
|
2013
|
+
w(a.$slots, "default")
|
|
2013
2014
|
]),
|
|
2014
2015
|
_: 3
|
|
2015
2016
|
}, 8, ["href"]))
|
|
@@ -2022,8 +2023,8 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2022
2023
|
__name: "FormSection",
|
|
2023
2024
|
emits: ["submitted"],
|
|
2024
2025
|
setup(e) {
|
|
2025
|
-
const
|
|
2026
|
-
return (t, l) => (
|
|
2026
|
+
const a = g(() => !!fe().actions);
|
|
2027
|
+
return (t, l) => (s(), i("div", ql, [
|
|
2027
2028
|
R(Se, null, {
|
|
2028
2029
|
title: O(() => [
|
|
2029
2030
|
w(t.$slots, "title")
|
|
@@ -2033,18 +2034,18 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2033
2034
|
]),
|
|
2034
2035
|
_: 3
|
|
2035
2036
|
}),
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
onSubmit: l[0] || (l[0] = ve((
|
|
2037
|
+
r("div", Pl, [
|
|
2038
|
+
r("form", {
|
|
2039
|
+
onSubmit: l[0] || (l[0] = ve((o) => t.$emit("submitted"), ["prevent"]))
|
|
2039
2040
|
}, [
|
|
2040
|
-
|
|
2041
|
-
class: k(["px-4 py-5 bg-white sm:p-6",
|
|
2041
|
+
r("div", {
|
|
2042
|
+
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
2043
|
}, [
|
|
2043
|
-
|
|
2044
|
+
r("div", Wl, [
|
|
2044
2045
|
w(t.$slots, "form")
|
|
2045
2046
|
])
|
|
2046
2047
|
], 2),
|
|
2047
|
-
|
|
2048
|
+
a.value ? (s(), i("div", Gl, [
|
|
2048
2049
|
w(t.$slots, "actions")
|
|
2049
2050
|
])) : D("", !0)
|
|
2050
2051
|
], 32)
|
|
@@ -2057,25 +2058,25 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2057
2058
|
message: String
|
|
2058
2059
|
},
|
|
2059
2060
|
setup(e) {
|
|
2060
|
-
return (
|
|
2061
|
-
|
|
2061
|
+
return (a, t) => Z((s(), i("div", null, [
|
|
2062
|
+
r("p", Ql, T(e.message), 1)
|
|
2062
2063
|
], 512)), [
|
|
2063
2064
|
[ie, e.message]
|
|
2064
2065
|
]);
|
|
2065
2066
|
}
|
|
2066
|
-
}, Jl = { class: "block font-medium text-sm text-gray-700" }, Zl = { key: 0 },
|
|
2067
|
+
}, Jl = { class: "block font-medium text-sm text-gray-700" }, Zl = { key: 0 }, es = { key: 1 }, ts = {
|
|
2067
2068
|
__name: "InputLabel",
|
|
2068
2069
|
props: {
|
|
2069
2070
|
value: String
|
|
2070
2071
|
},
|
|
2071
2072
|
setup(e) {
|
|
2072
|
-
return (
|
|
2073
|
-
e.value ? (
|
|
2074
|
-
w(
|
|
2073
|
+
return (a, t) => (s(), i("label", Jl, [
|
|
2074
|
+
e.value ? (s(), i("span", Zl, T(e.value), 1)) : (s(), i("span", es, [
|
|
2075
|
+
w(a.$slots, "default")
|
|
2075
2076
|
]))
|
|
2076
2077
|
]));
|
|
2077
2078
|
}
|
|
2078
|
-
},
|
|
2079
|
+
}, ls = ["href", "title", "target", "rel"], Ce = /* @__PURE__ */ Object.assign({
|
|
2079
2080
|
inheritAttrs: !1
|
|
2080
2081
|
}, {
|
|
2081
2082
|
__name: "LinkButton",
|
|
@@ -2106,18 +2107,19 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2106
2107
|
}
|
|
2107
2108
|
},
|
|
2108
2109
|
setup(e) {
|
|
2109
|
-
const
|
|
2110
|
-
primary: "bg-gradient-to-r from-blue-500 to-blue-600 text-white shadow-[
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2110
|
+
const a = ne(), t = e, l = {
|
|
2111
|
+
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",
|
|
2112
|
+
success: "bg-gradient-to-r from-green-500 to-green-600 text-white shadow-[0_6px_14px_rgba(34,197,94,0.14)] hover:from-green-600 hover:to-green-700 hover:shadow-[0_8px_18px_rgba(34,197,94,0.18)] focus:ring-green-500",
|
|
2113
|
+
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",
|
|
2114
|
+
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",
|
|
2115
|
+
warning: "border border-amber-300 bg-amber-50 text-amber-800 shadow-sm hover:bg-amber-100 focus:ring-amber-500",
|
|
2116
|
+
danger: "border border-rose-300 bg-rose-50 text-rose-700 shadow-sm hover:bg-rose-100 focus:ring-rose-500"
|
|
2117
|
+
}, o = g(() => l[t.variant] ? t.variant : "primary"), u = g(() => [
|
|
2118
|
+
"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",
|
|
2119
|
+
l[o.value],
|
|
2120
|
+
a.class
|
|
2119
2121
|
]);
|
|
2120
|
-
return (d, f) => e.external ? (
|
|
2122
|
+
return (d, f) => e.external ? (s(), i("a", z({ key: 1 }, I(a), {
|
|
2121
2123
|
href: e.href,
|
|
2122
2124
|
title: e.title,
|
|
2123
2125
|
target: e.target,
|
|
@@ -2125,7 +2127,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2125
2127
|
class: u.value
|
|
2126
2128
|
}), [
|
|
2127
2129
|
w(d.$slots, "default")
|
|
2128
|
-
], 16,
|
|
2130
|
+
], 16, ls)) : (s(), B(I(ge), z({ key: 0 }, I(a), {
|
|
2129
2131
|
href: e.href,
|
|
2130
2132
|
title: e.title,
|
|
2131
2133
|
class: u.value
|
|
@@ -2136,15 +2138,15 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2136
2138
|
_: 3
|
|
2137
2139
|
}, 16, ["href", "title", "class"]));
|
|
2138
2140
|
}
|
|
2139
|
-
}),
|
|
2141
|
+
}), ss = {
|
|
2140
2142
|
__name: "NavLink",
|
|
2141
2143
|
props: {
|
|
2142
2144
|
href: String,
|
|
2143
2145
|
active: Boolean
|
|
2144
2146
|
},
|
|
2145
2147
|
setup(e) {
|
|
2146
|
-
const
|
|
2147
|
-
return (l,
|
|
2148
|
+
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");
|
|
2149
|
+
return (l, o) => (s(), B(I(ge), {
|
|
2148
2150
|
href: e.href,
|
|
2149
2151
|
class: k(t.value)
|
|
2150
2152
|
}, {
|
|
@@ -2154,7 +2156,7 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2154
2156
|
_: 3
|
|
2155
2157
|
}, 8, ["href", "class"]));
|
|
2156
2158
|
}
|
|
2157
|
-
},
|
|
2159
|
+
}, as = ["href"], ns = {
|
|
2158
2160
|
__name: "ResponsiveNavLink",
|
|
2159
2161
|
props: {
|
|
2160
2162
|
active: Boolean,
|
|
@@ -2162,20 +2164,20 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2162
2164
|
as: String
|
|
2163
2165
|
},
|
|
2164
2166
|
setup(e) {
|
|
2165
|
-
const
|
|
2166
|
-
return (l,
|
|
2167
|
-
e.as == "button" ? (
|
|
2167
|
+
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");
|
|
2168
|
+
return (l, o) => (s(), i("div", null, [
|
|
2169
|
+
e.as == "button" ? (s(), i("button", {
|
|
2168
2170
|
key: 0,
|
|
2169
2171
|
class: k([t.value, "w-full text-start"])
|
|
2170
2172
|
}, [
|
|
2171
2173
|
w(l.$slots, "default")
|
|
2172
|
-
], 2)) : e.as == "a" ? (
|
|
2174
|
+
], 2)) : e.as == "a" ? (s(), i("a", {
|
|
2173
2175
|
key: 1,
|
|
2174
2176
|
class: k([t.value, "w-full text-start"]),
|
|
2175
2177
|
href: e.href
|
|
2176
2178
|
}, [
|
|
2177
2179
|
w(l.$slots, "default")
|
|
2178
|
-
], 10,
|
|
2180
|
+
], 10, as)) : (s(), B(I(ge), {
|
|
2179
2181
|
key: 2,
|
|
2180
2182
|
href: e.href,
|
|
2181
2183
|
class: k(t.value)
|
|
@@ -2187,23 +2189,23 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2187
2189
|
}, 8, ["href", "class"]))
|
|
2188
2190
|
]));
|
|
2189
2191
|
}
|
|
2190
|
-
},
|
|
2192
|
+
}, os = { class: "hidden sm:block" }, rs = { class: "py-8" }, is = {
|
|
2191
2193
|
__name: "SectionBorder",
|
|
2192
2194
|
setup(e) {
|
|
2193
|
-
return (
|
|
2194
|
-
|
|
2195
|
+
return (a, t) => (s(), i("div", os, [
|
|
2196
|
+
r("div", rs, [
|
|
2195
2197
|
R(we)
|
|
2196
2198
|
])
|
|
2197
2199
|
]));
|
|
2198
2200
|
}
|
|
2199
|
-
},
|
|
2201
|
+
}, 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
2202
|
__name: "SortControls",
|
|
2201
2203
|
props: {
|
|
2202
2204
|
fields: {
|
|
2203
2205
|
type: Array,
|
|
2204
2206
|
required: !0,
|
|
2205
2207
|
validator: (e) => e.every(
|
|
2206
|
-
(
|
|
2208
|
+
(a) => typeof a == "object" && a.key && a.label
|
|
2207
2209
|
)
|
|
2208
2210
|
},
|
|
2209
2211
|
currentSortField: {
|
|
@@ -2229,16 +2231,16 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2229
2231
|
}
|
|
2230
2232
|
},
|
|
2231
2233
|
emits: ["sort"],
|
|
2232
|
-
setup(e, { emit:
|
|
2233
|
-
const t =
|
|
2234
|
-
t("sort",
|
|
2234
|
+
setup(e, { emit: a }) {
|
|
2235
|
+
const t = a, l = (o) => {
|
|
2236
|
+
t("sort", o);
|
|
2235
2237
|
};
|
|
2236
|
-
return (
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
(
|
|
2238
|
+
return (o, u) => (s(), i("div", ds, [
|
|
2239
|
+
r("div", us, [
|
|
2240
|
+
r("div", cs, [
|
|
2241
|
+
r("label", fs, T(e.sortByLabel) + ":", 1),
|
|
2242
|
+
r("div", gs, [
|
|
2243
|
+
(s(!0), i(q, null, P(e.fields, (d) => (s(), i("button", {
|
|
2242
2244
|
key: d.key,
|
|
2243
2245
|
onClick: (f) => l(d.key),
|
|
2244
2246
|
class: k([
|
|
@@ -2247,22 +2249,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2247
2249
|
])
|
|
2248
2250
|
}, [
|
|
2249
2251
|
ue(T(d.label) + " ", 1),
|
|
2250
|
-
e.currentSortField === d.key && e.currentDirection === "asc" ? (
|
|
2252
|
+
e.currentSortField === d.key && e.currentDirection === "asc" ? (s(), B(I(Ie), {
|
|
2251
2253
|
key: 0,
|
|
2252
2254
|
class: "w-3 h-3 ml-1 inline"
|
|
2253
2255
|
})) : D("", !0),
|
|
2254
|
-
e.currentSortField === d.key && e.currentDirection === "desc" ? (
|
|
2256
|
+
e.currentSortField === d.key && e.currentDirection === "desc" ? (s(), B(I(xe), {
|
|
2255
2257
|
key: 1,
|
|
2256
2258
|
class: "w-3 h-3 ml-1 inline"
|
|
2257
2259
|
})) : D("", !0)
|
|
2258
|
-
], 10,
|
|
2260
|
+
], 10, ps))), 128))
|
|
2259
2261
|
])
|
|
2260
2262
|
]),
|
|
2261
|
-
|
|
2263
|
+
r("div", ms, T(e.count) + " " + T(e.countLabel), 1)
|
|
2262
2264
|
])
|
|
2263
2265
|
]));
|
|
2264
2266
|
}
|
|
2265
|
-
},
|
|
2267
|
+
}, ys = { class: "flex items-center space-x-1" }, vs = { class: "flex flex-col" }, Ve = {
|
|
2266
2268
|
__name: "ThSortable",
|
|
2267
2269
|
props: {
|
|
2268
2270
|
field: {
|
|
@@ -2279,21 +2281,21 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2279
2281
|
}
|
|
2280
2282
|
},
|
|
2281
2283
|
setup(e) {
|
|
2282
|
-
const
|
|
2283
|
-
return (
|
|
2284
|
+
const a = e, t = g(() => a.field === a.currentSortField), l = g(() => t.value ? "text-blue-600" : "text-gray-400");
|
|
2285
|
+
return (o, u) => (s(), i("th", {
|
|
2284
2286
|
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) =>
|
|
2287
|
+
onClick: u[0] || (u[0] = (d) => o.$emit("sort", e.field))
|
|
2286
2288
|
}, [
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
w(
|
|
2289
|
+
r("div", ys, [
|
|
2290
|
+
r("span", null, [
|
|
2291
|
+
w(o.$slots, "default")
|
|
2290
2292
|
]),
|
|
2291
|
-
|
|
2292
|
-
t.value && e.currentDirection === "asc" ? (
|
|
2293
|
+
r("div", vs, [
|
|
2294
|
+
t.value && e.currentDirection === "asc" ? (s(), B(I(Ie), {
|
|
2293
2295
|
key: 0,
|
|
2294
2296
|
class: k([l.value, "w-3 h-3"])
|
|
2295
2297
|
}, null, 8, ["class"])) : D("", !0),
|
|
2296
|
-
t.value && e.currentDirection === "desc" ? (
|
|
2298
|
+
t.value && e.currentDirection === "desc" ? (s(), B(I(xe), {
|
|
2297
2299
|
key: 1,
|
|
2298
2300
|
class: k([l.value, "w-3 h-3"])
|
|
2299
2301
|
}, null, 8, ["class"])) : D("", !0)
|
|
@@ -2301,22 +2303,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2301
2303
|
])
|
|
2302
2304
|
]));
|
|
2303
2305
|
}
|
|
2304
|
-
},
|
|
2306
|
+
}, hs = { class: "min-w-full divide-y divide-slate-200/80" }, xs = { class: "bg-slate-50/80" }, ws = {
|
|
2305
2307
|
key: 0,
|
|
2306
|
-
class: "px-6 py-3 text-right text-
|
|
2307
|
-
},
|
|
2308
|
+
class: "px-6 py-3 text-right text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase"
|
|
2309
|
+
}, ks = { class: "bg-white divide-y divide-slate-200/80" }, Ss = {
|
|
2308
2310
|
key: 0,
|
|
2309
2311
|
class: "flex items-center"
|
|
2310
|
-
}, $
|
|
2312
|
+
}, $s = ["title"], Cs = {
|
|
2311
2313
|
key: 0,
|
|
2312
|
-
class: "ml-2 inline-flex items-center px-2 py-1
|
|
2313
|
-
},
|
|
2314
|
+
class: "ml-2 inline-flex items-center rounded-full bg-rose-100 px-2 py-1 text-xs font-medium text-rose-700"
|
|
2315
|
+
}, Vs = ["innerHTML"], _s = { key: 3 }, Ts = {
|
|
2314
2316
|
key: 0,
|
|
2315
2317
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2316
|
-
},
|
|
2318
|
+
}, As = {
|
|
2317
2319
|
key: 0,
|
|
2318
2320
|
class: "text-center py-12"
|
|
2319
|
-
},
|
|
2321
|
+
}, 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
2322
|
__name: "TableList",
|
|
2321
2323
|
props: {
|
|
2322
2324
|
data: {
|
|
@@ -2347,9 +2349,9 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2347
2349
|
},
|
|
2348
2350
|
rowClasses: {
|
|
2349
2351
|
type: Function,
|
|
2350
|
-
default: (e,
|
|
2352
|
+
default: (e, a) => [
|
|
2351
2353
|
"transition-colors duration-150",
|
|
2352
|
-
e.deleted_at ? "bg-
|
|
2354
|
+
e.deleted_at ? "bg-rose-50 hover:bg-rose-100" : "odd:bg-white even:bg-slate-50 hover:bg-slate-100"
|
|
2353
2355
|
]
|
|
2354
2356
|
},
|
|
2355
2357
|
maxTextLength: {
|
|
@@ -2370,86 +2372,86 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2370
2372
|
}
|
|
2371
2373
|
},
|
|
2372
2374
|
emits: ["sort"],
|
|
2373
|
-
setup(e, { emit:
|
|
2374
|
-
const t = fe(), l = e,
|
|
2375
|
+
setup(e, { emit: a }) {
|
|
2376
|
+
const t = fe(), l = e, o = a;
|
|
2375
2377
|
g(() => !!t.actions);
|
|
2376
2378
|
const u = g(() => l.data && l.data.length > 0), d = (v) => {
|
|
2377
|
-
|
|
2379
|
+
o("sort", v);
|
|
2378
2380
|
}, f = (v) => {
|
|
2379
|
-
const S = String(v ?? ""),
|
|
2380
|
-
return !Number.isFinite(
|
|
2381
|
+
const S = String(v ?? ""), m = Number(l.maxTextLength);
|
|
2382
|
+
return !Number.isFinite(m) || m <= 0 || S.length <= m ? S : `${S.slice(0, m)}...`;
|
|
2381
2383
|
}, $ = (v, S) => {
|
|
2382
2384
|
if (S.slot)
|
|
2383
2385
|
return null;
|
|
2384
2386
|
if (S.render)
|
|
2385
2387
|
return S.render(v);
|
|
2386
|
-
const
|
|
2387
|
-
return
|
|
2388
|
-
},
|
|
2388
|
+
const m = S.key.split(".").reduce((M, L) => M?.[L], v);
|
|
2389
|
+
return m == null || m === "" ? "-" : f(m);
|
|
2390
|
+
}, y = (v) => v.deleted_at || v.deleted, C = (v) => {
|
|
2389
2391
|
if (v.class)
|
|
2390
2392
|
return v.class;
|
|
2391
2393
|
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-
|
|
2394
|
+
return v.isSecondary || (S += " font-medium"), v.isSecondary && (S += " text-slate-600"), S;
|
|
2395
|
+
}, h = (v) => v.sortable ? "" : "px-6 py-3 text-left text-[11px] font-semibold tracking-[0.12em] text-slate-600 uppercase";
|
|
2396
|
+
return (v, S) => (s(), i("div", {
|
|
2397
|
+
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
2398
|
}, [
|
|
2397
|
-
|
|
2399
|
+
r("div", {
|
|
2398
2400
|
class: k(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2399
2401
|
}, [
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
(
|
|
2404
|
-
key:
|
|
2402
|
+
r("table", hs, [
|
|
2403
|
+
r("thead", xs, [
|
|
2404
|
+
r("tr", null, [
|
|
2405
|
+
(s(!0), i(q, null, P(e.columns, (m) => (s(), i(q, {
|
|
2406
|
+
key: m.key
|
|
2405
2407
|
}, [
|
|
2406
|
-
|
|
2408
|
+
m.sortable ? (s(), B(Ve, {
|
|
2407
2409
|
key: 0,
|
|
2408
|
-
field:
|
|
2410
|
+
field: m.key,
|
|
2409
2411
|
"current-sort-field": e.sortField,
|
|
2410
2412
|
"current-direction": e.sortDirection,
|
|
2411
2413
|
onSort: d
|
|
2412
2414
|
}, {
|
|
2413
2415
|
default: O(() => [
|
|
2414
|
-
ue(T(
|
|
2416
|
+
ue(T(m.label), 1)
|
|
2415
2417
|
]),
|
|
2416
2418
|
_: 2
|
|
2417
|
-
}, 1032, ["field", "current-sort-field", "current-direction"])) : (
|
|
2419
|
+
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2418
2420
|
key: 1,
|
|
2419
|
-
class: k([h(
|
|
2420
|
-
}, T(
|
|
2421
|
+
class: k([h(m), { "text-right": m.align === "right" }])
|
|
2422
|
+
}, T(m.label), 3))
|
|
2421
2423
|
], 64))), 128)),
|
|
2422
|
-
v.$slots.actions ? (
|
|
2424
|
+
v.$slots.actions ? (s(), i("th", ws, T(e.actionsLabel), 1)) : D("", !0)
|
|
2423
2425
|
])
|
|
2424
2426
|
]),
|
|
2425
|
-
|
|
2426
|
-
(
|
|
2427
|
-
key:
|
|
2428
|
-
class: k(e.rowClasses(
|
|
2427
|
+
r("tbody", ks, [
|
|
2428
|
+
(s(!0), i(q, null, P(e.data, (m, M) => (s(), i("tr", {
|
|
2429
|
+
key: m.id,
|
|
2430
|
+
class: k(e.rowClasses(m, M))
|
|
2429
2431
|
}, [
|
|
2430
|
-
(
|
|
2432
|
+
(s(!0), i(q, null, P(e.columns, (L) => (s(), i("td", {
|
|
2431
2433
|
key: L.key,
|
|
2432
2434
|
class: k(C(L))
|
|
2433
2435
|
}, [
|
|
2434
|
-
L.key === "name" && !L.slot ? (
|
|
2435
|
-
|
|
2436
|
-
class: "text-sm font-medium truncate",
|
|
2437
|
-
title: $(
|
|
2438
|
-
}, T($(
|
|
2439
|
-
|
|
2436
|
+
L.key === "name" && !L.slot ? (s(), i("div", Ss, [
|
|
2437
|
+
r("div", {
|
|
2438
|
+
class: "text-sm font-medium text-slate-900 truncate",
|
|
2439
|
+
title: $(m, L)
|
|
2440
|
+
}, T($(m, L)), 9, $s),
|
|
2441
|
+
y(m) ? (s(), i("span", Cs, T(e.deletedLabel), 1)) : D("", !0)
|
|
2440
2442
|
])) : L.slot ? w(v.$slots, L.slot, {
|
|
2441
2443
|
key: 1,
|
|
2442
|
-
item:
|
|
2444
|
+
item: m,
|
|
2443
2445
|
column: L,
|
|
2444
2446
|
index: M
|
|
2445
|
-
}) : L.render ? (
|
|
2447
|
+
}) : L.render ? (s(), i("div", {
|
|
2446
2448
|
key: 2,
|
|
2447
|
-
innerHTML: L.render(
|
|
2448
|
-
}, null, 8,
|
|
2449
|
+
innerHTML: L.render(m)
|
|
2450
|
+
}, null, 8, Vs)) : (s(), i("div", _s, T($(m, L)), 1))
|
|
2449
2451
|
], 2))), 128)),
|
|
2450
|
-
v.$slots.actions ? (
|
|
2452
|
+
v.$slots.actions ? (s(), i("td", Ts, [
|
|
2451
2453
|
w(v.$slots, "actions", {
|
|
2452
|
-
item:
|
|
2454
|
+
item: m,
|
|
2453
2455
|
index: M
|
|
2454
2456
|
})
|
|
2455
2457
|
])) : D("", !0)
|
|
@@ -2457,13 +2459,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2457
2459
|
])
|
|
2458
2460
|
])
|
|
2459
2461
|
], 2),
|
|
2460
|
-
u.value ? D("", !0) : (
|
|
2461
|
-
|
|
2462
|
-
(
|
|
2462
|
+
u.value ? D("", !0) : (s(), i("div", As, [
|
|
2463
|
+
r("div", Bs, [
|
|
2464
|
+
(s(), B(Be(e.emptyState.icon), { class: "w-8 h-8 text-slate-400" }))
|
|
2463
2465
|
]),
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (
|
|
2466
|
+
r("h3", Ls, T(e.emptyState.title), 1),
|
|
2467
|
+
r("p", Is, T(e.emptyState.description), 1),
|
|
2468
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), B(Ce, {
|
|
2467
2469
|
key: 0,
|
|
2468
2470
|
href: e.emptyState.actionUrl,
|
|
2469
2471
|
variant: "primary"
|
|
@@ -2476,22 +2478,22 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2476
2478
|
]))
|
|
2477
2479
|
], 2));
|
|
2478
2480
|
}
|
|
2479
|
-
},
|
|
2481
|
+
}, 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
2482
|
key: 0,
|
|
2481
2483
|
class: "px-6 py-3 text-right text-xs font-medium text-gray-500 uppercase tracking-wider"
|
|
2482
|
-
},
|
|
2484
|
+
}, Ns = { class: "bg-white divide-y divide-gray-200" }, Ks = {
|
|
2483
2485
|
key: 2,
|
|
2484
2486
|
class: "flex items-center"
|
|
2485
|
-
},
|
|
2487
|
+
}, Us = ["title"], Rs = {
|
|
2486
2488
|
key: 0,
|
|
2487
2489
|
class: "ml-2 inline-flex items-center rounded-full bg-red-100 px-2 py-1 text-xs font-medium text-red-800"
|
|
2488
|
-
},
|
|
2490
|
+
}, Hs = ["innerHTML"], qs = { key: 5 }, Ps = {
|
|
2489
2491
|
key: 0,
|
|
2490
2492
|
class: "px-6 py-4 whitespace-nowrap text-right text-sm font-medium"
|
|
2491
|
-
},
|
|
2493
|
+
}, Ws = { class: "flex items-center justify-end gap-2" }, Gs = {
|
|
2492
2494
|
key: 2,
|
|
2493
2495
|
class: "py-12 text-center"
|
|
2494
|
-
},
|
|
2496
|
+
}, 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
2497
|
__name: "TableListForm",
|
|
2496
2498
|
props: {
|
|
2497
2499
|
data: {
|
|
@@ -2589,158 +2591,158 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2589
2591
|
}
|
|
2590
2592
|
},
|
|
2591
2593
|
emits: ["sort", "update", "update:editingRowKey", "edit-start", "edit-cancel"],
|
|
2592
|
-
setup(e, { emit:
|
|
2593
|
-
const t = fe(), l = e,
|
|
2594
|
+
setup(e, { emit: a }) {
|
|
2595
|
+
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
2596
|
Q(() => l.sortField, (n) => {
|
|
2595
2597
|
u.value = n;
|
|
2596
2598
|
}), Q(() => l.sortDirection, (n) => {
|
|
2597
2599
|
d.value = n;
|
|
2598
2600
|
}), Q(() => l.rowEditing, (n) => {
|
|
2599
2601
|
n || X();
|
|
2600
|
-
}), Q(C, (n,
|
|
2601
|
-
if (n ===
|
|
2602
|
+
}), Q(C, (n, p) => {
|
|
2603
|
+
if (n === p)
|
|
2602
2604
|
return;
|
|
2603
2605
|
if (n == null || n === "") {
|
|
2604
|
-
|
|
2606
|
+
y.value = {};
|
|
2605
2607
|
return;
|
|
2606
2608
|
}
|
|
2607
|
-
const c = l.data.find((A,
|
|
2608
|
-
|
|
2609
|
+
const c = l.data.find((A, b) => W(A, b) === n);
|
|
2610
|
+
y.value = c ? L(c) : {};
|
|
2609
2611
|
}), Q(
|
|
2610
2612
|
() => l.data,
|
|
2611
2613
|
() => {
|
|
2612
2614
|
if (C.value === null || C.value === void 0)
|
|
2613
2615
|
return;
|
|
2614
|
-
l.data.find((
|
|
2616
|
+
l.data.find((p, c) => W(p, c) === C.value) || X();
|
|
2615
2617
|
},
|
|
2616
2618
|
{ deep: !0 }
|
|
2617
2619
|
);
|
|
2618
2620
|
const h = g(() => {
|
|
2619
2621
|
let n = l.data;
|
|
2620
2622
|
if (l.search && f.value.trim()) {
|
|
2621
|
-
const
|
|
2623
|
+
const p = f.value.toLowerCase().trim();
|
|
2622
2624
|
n = l.data.filter((c) => l.columns.some((A) => {
|
|
2623
2625
|
if (!A.searchable)
|
|
2624
2626
|
return !1;
|
|
2625
|
-
const
|
|
2626
|
-
return
|
|
2627
|
+
const b = F(c, A.key);
|
|
2628
|
+
return b == null || b === "" ? !1 : String(b).toLowerCase().includes(p);
|
|
2627
2629
|
}));
|
|
2628
2630
|
}
|
|
2629
|
-
return u.value ? [...n].sort((
|
|
2630
|
-
const A = F(
|
|
2631
|
+
return u.value ? [...n].sort((p, c) => {
|
|
2632
|
+
const A = F(p, u.value), b = F(c, u.value);
|
|
2631
2633
|
if (A == null || A === "") return 1;
|
|
2632
|
-
if (
|
|
2634
|
+
if (b == null || b === "") return -1;
|
|
2633
2635
|
let H = 0;
|
|
2634
|
-
return A <
|
|
2636
|
+
return A < b && (H = -1), A > b && (H = 1), d.value === "desc" ? -H : H;
|
|
2635
2637
|
}) : 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(([
|
|
2638
|
+
}), v = g(() => !!t.actions), S = g(() => v.value || l.rowEditing), m = g(() => h.value && h.value.length > 0), M = (n) => {
|
|
2639
|
+
u.value === n ? d.value = d.value === "asc" ? "desc" : "asc" : (u.value = n, d.value = "asc"), o("sort", { field: n, direction: d.value });
|
|
2640
|
+
}, L = (n) => Array.isArray(n) ? n.map((p) => L(p)) : n && typeof n == "object" ? Object.fromEntries(
|
|
2641
|
+
Object.entries(n).map(([p, c]) => [p, L(c)])
|
|
2640
2642
|
) : n, E = (n) => {
|
|
2641
|
-
const
|
|
2642
|
-
return !Number.isFinite(c) || c <= 0 ||
|
|
2643
|
-
}, F = (n,
|
|
2644
|
-
if (!
|
|
2643
|
+
const p = String(n ?? ""), c = Number(l.maxTextLength);
|
|
2644
|
+
return !Number.isFinite(c) || c <= 0 || p.length <= c ? p : `${p.slice(0, c)}...`;
|
|
2645
|
+
}, F = (n, p) => !p || typeof p != "string" ? n : p.split(".").reduce((c, A) => c?.[A], n), oe = (n, p, c) => {
|
|
2646
|
+
if (!p || typeof p != "string" || n == null)
|
|
2645
2647
|
return;
|
|
2646
|
-
const A =
|
|
2648
|
+
const A = p.split("."), b = A.pop();
|
|
2647
2649
|
let H = n;
|
|
2648
2650
|
for (const de of A)
|
|
2649
2651
|
(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,
|
|
2652
|
+
b !== void 0 && (H[b] = c);
|
|
2653
|
+
}, 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) => {
|
|
2654
|
+
l.editingRowKey === void 0 && ($.value = n), o("update:editingRowKey", n);
|
|
2655
|
+
}, 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
2656
|
x(null);
|
|
2655
|
-
}, te = (n,
|
|
2656
|
-
if (K(n,
|
|
2657
|
+
}, te = (n, p) => {
|
|
2658
|
+
if (K(n, p))
|
|
2657
2659
|
return;
|
|
2658
|
-
const c = W(n,
|
|
2659
|
-
x(c),
|
|
2660
|
+
const c = W(n, p);
|
|
2661
|
+
x(c), o("edit-start", {
|
|
2660
2662
|
item: n,
|
|
2661
2663
|
index: Y(n),
|
|
2662
2664
|
rowKey: c
|
|
2663
2665
|
});
|
|
2664
|
-
}, le = (n,
|
|
2665
|
-
|
|
2666
|
+
}, le = (n, p) => {
|
|
2667
|
+
o("edit-cancel", {
|
|
2666
2668
|
item: n,
|
|
2667
2669
|
index: Y(n),
|
|
2668
|
-
rowKey: W(n,
|
|
2670
|
+
rowKey: W(n, p)
|
|
2669
2671
|
}), X();
|
|
2670
|
-
},
|
|
2671
|
-
|
|
2672
|
+
}, se = (n, p, c, A = void 0) => {
|
|
2673
|
+
oe(y.value, n, p), l.mutateRows && oe(c, n, L(p)), o("update", {
|
|
2672
2674
|
item: c,
|
|
2673
|
-
draft:
|
|
2675
|
+
draft: y.value,
|
|
2674
2676
|
field: n,
|
|
2675
|
-
value:
|
|
2677
|
+
value: p,
|
|
2676
2678
|
index: Y(c),
|
|
2677
2679
|
rowKey: C.value,
|
|
2678
2680
|
event: A
|
|
2679
2681
|
});
|
|
2680
|
-
},
|
|
2681
|
-
if (
|
|
2682
|
+
}, ae = (n, p) => {
|
|
2683
|
+
if (p.slot)
|
|
2682
2684
|
return null;
|
|
2683
|
-
if (
|
|
2684
|
-
return
|
|
2685
|
-
const c = F(n,
|
|
2685
|
+
if (p.render)
|
|
2686
|
+
return p.render(n);
|
|
2687
|
+
const c = F(n, p.key);
|
|
2686
2688
|
return c == null || c === "" ? "-" : E(c);
|
|
2687
|
-
}, U = (n,
|
|
2689
|
+
}, U = (n, p, c) => {
|
|
2688
2690
|
if (n.class)
|
|
2689
2691
|
return n.class;
|
|
2690
|
-
let
|
|
2691
|
-
return n.isSecondary || (
|
|
2692
|
+
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";
|
|
2693
|
+
return n.isSecondary || (b += " font-medium"), n.isSecondary && (b += " text-gray-600"), b;
|
|
2692
2694
|
}, 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,
|
|
2695
|
+
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";
|
|
2696
|
+
return n.inputClass && (p += ` ${n.inputClass}`), n.isSecondary && (p += " text-gray-600"), p;
|
|
2697
|
+
}, 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
2698
|
const c = Y(n);
|
|
2697
|
-
return c === -1 ? null : l.getErrorMessage(c,
|
|
2698
|
-
},
|
|
2699
|
+
return c === -1 ? null : l.getErrorMessage(c, p.key);
|
|
2700
|
+
}, me = (n, p, c) => ({
|
|
2699
2701
|
item: n,
|
|
2700
|
-
column:
|
|
2702
|
+
column: p,
|
|
2701
2703
|
index: c,
|
|
2702
2704
|
isEditing: N(n, c),
|
|
2703
|
-
draft:
|
|
2705
|
+
draft: y.value,
|
|
2704
2706
|
rowKey: W(n, c),
|
|
2705
|
-
updateDraft: (A,
|
|
2707
|
+
updateDraft: (A, b) => se(A, b, n),
|
|
2706
2708
|
startEdit: () => te(n, c),
|
|
2707
2709
|
cancelEdit: () => le(n, c)
|
|
2708
|
-
}), Xe = (n,
|
|
2709
|
-
return (n,
|
|
2710
|
+
}), Xe = (n, p, c) => !!((typeof n.disabled == "function" ? n.disabled(p, c) : n.disabled) || J(p));
|
|
2711
|
+
return (n, p) => (s(), i("div", {
|
|
2710
2712
|
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
2713
|
}, [
|
|
2712
|
-
e.search ? (
|
|
2714
|
+
e.search ? (s(), i("div", {
|
|
2713
2715
|
key: 0,
|
|
2714
2716
|
class: k([
|
|
2715
2717
|
"px-6 py-4",
|
|
2716
2718
|
e.isCard ? "border-b border-gray-200 bg-gray-50/80 rounded-t-xl" : "mb-4 bg-white/80 backdrop-blur-sm"
|
|
2717
2719
|
])
|
|
2718
2720
|
}, [
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
+
r("div", Ms, [
|
|
2722
|
+
r("div", js, [
|
|
2721
2723
|
R(I(it), { class: "h-4 w-4 text-gray-400" })
|
|
2722
2724
|
]),
|
|
2723
|
-
Z(
|
|
2724
|
-
"onUpdate:modelValue":
|
|
2725
|
+
Z(r("input", {
|
|
2726
|
+
"onUpdate:modelValue": p[0] || (p[0] = (c) => f.value = c),
|
|
2725
2727
|
type: "text",
|
|
2726
2728
|
placeholder: e.searchPlaceholder,
|
|
2727
2729
|
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,
|
|
2730
|
+
}, null, 8, Os), [
|
|
2729
2731
|
[et, f.value]
|
|
2730
2732
|
])
|
|
2731
2733
|
])
|
|
2732
2734
|
], 2)) : D("", !0),
|
|
2733
|
-
|
|
2735
|
+
m.value ? (s(), i("div", {
|
|
2734
2736
|
key: 1,
|
|
2735
2737
|
class: k(["overflow-x-auto", e.isCard ? "rounded-xl" : ""])
|
|
2736
2738
|
}, [
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
(
|
|
2739
|
+
r("table", zs, [
|
|
2740
|
+
r("thead", Es, [
|
|
2741
|
+
r("tr", null, [
|
|
2742
|
+
(s(!0), i(q, null, P(e.columns, (c) => (s(), i(q, {
|
|
2741
2743
|
key: c.key
|
|
2742
2744
|
}, [
|
|
2743
|
-
c.sortable ? (
|
|
2745
|
+
c.sortable ? (s(), B(Ve, {
|
|
2744
2746
|
key: 0,
|
|
2745
2747
|
field: c.key,
|
|
2746
2748
|
"current-sort-field": u.value,
|
|
@@ -2751,78 +2753,78 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2751
2753
|
ue(T(c.label), 1)
|
|
2752
2754
|
]),
|
|
2753
2755
|
_: 2
|
|
2754
|
-
}, 1032, ["field", "current-sort-field", "current-direction"])) : (
|
|
2756
|
+
}, 1032, ["field", "current-sort-field", "current-direction"])) : (s(), i("th", {
|
|
2755
2757
|
key: 1,
|
|
2756
2758
|
class: k([V(c), { "text-right": c.align === "right" }])
|
|
2757
2759
|
}, T(c.label), 3))
|
|
2758
2760
|
], 64))), 128)),
|
|
2759
|
-
S.value ? (
|
|
2761
|
+
S.value ? (s(), i("th", Fs, T(e.actionsLabel), 1)) : D("", !0)
|
|
2760
2762
|
])
|
|
2761
2763
|
]),
|
|
2762
|
-
|
|
2763
|
-
(
|
|
2764
|
+
r("tbody", Ns, [
|
|
2765
|
+
(s(!0), i(q, null, P(h.value, (c, A) => (s(), i("tr", {
|
|
2764
2766
|
key: W(c, A),
|
|
2765
2767
|
class: k(e.rowClasses(c, A))
|
|
2766
2768
|
}, [
|
|
2767
|
-
(
|
|
2768
|
-
key:
|
|
2769
|
-
class: k([U(
|
|
2769
|
+
(s(!0), i(q, null, P(e.columns, (b) => (s(), i("td", {
|
|
2770
|
+
key: b.key,
|
|
2771
|
+
class: k([U(b, c, A), { "text-right": b.align === "right" }])
|
|
2770
2772
|
}, [
|
|
2771
|
-
N(c, A) &&
|
|
2773
|
+
N(c, A) && b.slot && I(t)[G(b)] ? w(n.$slots, G(b), z({
|
|
2772
2774
|
key: 0,
|
|
2773
2775
|
ref_for: !0
|
|
2774
|
-
},
|
|
2776
|
+
}, me(c, b, A))) : N(c, A) && b.input ? (s(), B(pe, {
|
|
2775
2777
|
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,
|
|
2778
|
+
type: _(b),
|
|
2779
|
+
class: k(Pe(b)),
|
|
2780
|
+
placeholder: We(b),
|
|
2781
|
+
"model-value": _e(c, b, A),
|
|
2782
|
+
disabled: Xe(b, c, A),
|
|
2783
|
+
maxlength: b.maxlength,
|
|
2784
|
+
"error-message": Ge(c, b),
|
|
2783
2785
|
"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
|
-
|
|
2786
|
+
"onUpdate:modelValue": (H) => se(b.key, H, c),
|
|
2787
|
+
onBlur: (H) => se(b.key, H?.target?.value ?? _e(c, b, A), c, "blur")
|
|
2788
|
+
}, null, 8, ["type", "class", "placeholder", "model-value", "disabled", "maxlength", "error-message", "onUpdate:modelValue", "onBlur"])) : b.key === "name" && !b.slot ? (s(), i("div", Ks, [
|
|
2789
|
+
r("div", {
|
|
2788
2790
|
class: "text-sm font-medium truncate",
|
|
2789
|
-
title:
|
|
2790
|
-
}, T(
|
|
2791
|
-
J(c) ? (
|
|
2792
|
-
])) :
|
|
2791
|
+
title: ae(c, b)
|
|
2792
|
+
}, T(ae(c, b)), 9, Us),
|
|
2793
|
+
J(c) ? (s(), i("span", Rs, T(e.deletedLabel), 1)) : D("", !0)
|
|
2794
|
+
])) : b.slot ? w(n.$slots, b.slot, z({
|
|
2793
2795
|
key: 3,
|
|
2794
2796
|
ref_for: !0
|
|
2795
|
-
},
|
|
2797
|
+
}, me(c, b, A))) : b.render ? (s(), i("div", {
|
|
2796
2798
|
key: 4,
|
|
2797
|
-
innerHTML:
|
|
2798
|
-
}, null, 8,
|
|
2799
|
+
innerHTML: b.render(c)
|
|
2800
|
+
}, null, 8, Hs)) : (s(), i("div", qs, T(ae(c, b)), 1))
|
|
2799
2801
|
], 2))), 128)),
|
|
2800
|
-
S.value ? (
|
|
2801
|
-
|
|
2802
|
+
S.value ? (s(), i("td", Ps, [
|
|
2803
|
+
r("div", Ws, [
|
|
2802
2804
|
v.value ? w(n.$slots, "actions", z({
|
|
2803
2805
|
key: 0,
|
|
2804
2806
|
ref_for: !0
|
|
2805
|
-
},
|
|
2806
|
-
e.rowEditing && N(c, A) ? (
|
|
2807
|
+
}, me(c, null, A))) : D("", !0),
|
|
2808
|
+
e.rowEditing && N(c, A) ? (s(), B(he, {
|
|
2807
2809
|
key: 1,
|
|
2808
2810
|
type: "button",
|
|
2809
2811
|
variant: "tertiary",
|
|
2810
2812
|
title: e.cancelLabel,
|
|
2811
2813
|
"aria-label": e.cancelLabel,
|
|
2812
|
-
onClick: (
|
|
2814
|
+
onClick: (b) => le(c, A)
|
|
2813
2815
|
}, {
|
|
2814
2816
|
default: O(() => [
|
|
2815
2817
|
R(I(dt), { class: "size-4" })
|
|
2816
2818
|
]),
|
|
2817
2819
|
_: 1
|
|
2818
|
-
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (
|
|
2820
|
+
}, 8, ["title", "aria-label", "onClick"])) : e.rowEditing ? (s(), B(he, {
|
|
2819
2821
|
key: 2,
|
|
2820
2822
|
type: "button",
|
|
2821
2823
|
variant: "warning",
|
|
2822
2824
|
disabled: K(c, A),
|
|
2823
2825
|
title: e.editLabel,
|
|
2824
2826
|
"aria-label": e.editLabel,
|
|
2825
|
-
onClick: (
|
|
2827
|
+
onClick: (b) => te(c, A)
|
|
2826
2828
|
}, {
|
|
2827
2829
|
default: O(() => [
|
|
2828
2830
|
R(I(ut), { class: "size-4" })
|
|
@@ -2834,13 +2836,13 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2834
2836
|
], 2))), 128))
|
|
2835
2837
|
])
|
|
2836
2838
|
])
|
|
2837
|
-
], 2)) : (
|
|
2838
|
-
|
|
2839
|
-
(
|
|
2839
|
+
], 2)) : (s(), i("div", Gs, [
|
|
2840
|
+
r("div", Xs, [
|
|
2841
|
+
(s(), B(Be(e.emptyState.icon), { class: "h-8 w-8 text-gray-400" }))
|
|
2840
2842
|
]),
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
e.emptyState.actionText && e.emptyState.actionUrl ? (
|
|
2843
|
+
r("h3", Qs, T(e.emptyState.title), 1),
|
|
2844
|
+
r("p", Ys, T(e.emptyState.description), 1),
|
|
2845
|
+
e.emptyState.actionText && e.emptyState.actionUrl ? (s(), B(Ce, {
|
|
2844
2846
|
key: 0,
|
|
2845
2847
|
href: e.emptyState.actionUrl,
|
|
2846
2848
|
variant: "primary"
|
|
@@ -2853,14 +2855,14 @@ const Ft = /* @__PURE__ */ ke(jt, [["render", Et]]), Nt = { class: "sr-only" },
|
|
|
2853
2855
|
]))
|
|
2854
2856
|
], 2));
|
|
2855
2857
|
}
|
|
2856
|
-
},
|
|
2858
|
+
}, Zs = {
|
|
2857
2859
|
install(e) {
|
|
2858
|
-
for (const [
|
|
2859
|
-
|
|
2860
|
+
for (const [a, t] of Object.entries(ct))
|
|
2861
|
+
a !== "EnosVue" && e.component(a, t);
|
|
2860
2862
|
}
|
|
2861
2863
|
};
|
|
2862
2864
|
export {
|
|
2863
|
-
|
|
2865
|
+
yt as ActionCard,
|
|
2864
2866
|
ht as ActionMessage,
|
|
2865
2867
|
Bt as ActionSection,
|
|
2866
2868
|
Mt as ApplicationLogo,
|
|
@@ -2880,25 +2882,25 @@ export {
|
|
|
2880
2882
|
we as Divider,
|
|
2881
2883
|
Kl as Dropdown,
|
|
2882
2884
|
Hl as DropdownLink,
|
|
2883
|
-
|
|
2885
|
+
Zs as EnosVue,
|
|
2884
2886
|
Xl as FormSection,
|
|
2885
2887
|
Ke as ImageInput,
|
|
2886
2888
|
Yl as InputError,
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
+
pe as InputGroup,
|
|
2890
|
+
ts as InputLabel,
|
|
2889
2891
|
Ce as LinkButton,
|
|
2890
2892
|
$e as Modal,
|
|
2891
|
-
|
|
2893
|
+
ss as NavLink,
|
|
2892
2894
|
Ue as NotationInput,
|
|
2893
2895
|
Re as RadioInput,
|
|
2894
2896
|
He as RadioMultipleInput,
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
+
ns as ResponsiveNavLink,
|
|
2898
|
+
is as SectionBorder,
|
|
2897
2899
|
Se as SectionTitle,
|
|
2898
2900
|
Fe as SelectInput,
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2901
|
+
bs as SortControls,
|
|
2902
|
+
Ds as TableList,
|
|
2903
|
+
Js as TableListForm,
|
|
2902
2904
|
ze as TextArea,
|
|
2903
2905
|
Oe as TextInput,
|
|
2904
2906
|
Ve as ThSortable
|