hanap-labs 0.1.0 → 0.1.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.
|
@@ -1,39 +1,39 @@
|
|
|
1
1
|
import { n as e, r as t, t as n } from "./usePopup-zCvtcQsc.js";
|
|
2
|
-
import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, customRef as m, defineComponent as h, getCurrentInstance as g, getCurrentScope as _, h as v, isRef as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onBeforeUnmount as ee, onMounted as T, onScopeDispose as E, onUnmounted as te, openBlock as D, readonly as O, ref as k, render as A, renderList as j, renderSlot as M, resolveDynamicComponent as ne, shallowRef as re, toDisplayString as N, toRef as ie, toValue as P, unref as F, useId as
|
|
2
|
+
import { Fragment as r, Teleport as i, Transition as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, customRef as m, defineComponent as h, getCurrentInstance as g, getCurrentScope as _, h as v, isRef as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onBeforeUnmount as ee, onMounted as T, onScopeDispose as E, onUnmounted as te, openBlock as D, readonly as O, ref as k, render as A, renderList as j, renderSlot as M, resolveDynamicComponent as ne, shallowRef as re, toDisplayString as N, toRef as ie, toValue as P, unref as F, useId as ae, useModel as oe, useSlots as se, vModelCheckbox as ce, vModelDynamic as le, vModelText as ue, watch as I, watchEffect as de, withCtx as L, withDirectives as fe, withModifiers as pe } from "vue";
|
|
3
3
|
//#endregion
|
|
4
4
|
//#region src/components/hl-icon/HLIcon.registry.ts
|
|
5
|
-
var
|
|
6
|
-
"../../assets/icons/check.svg": "<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\
|
|
5
|
+
var me = /* @__PURE__ */ Object.assign({
|
|
6
|
+
"../../assets/icons/check.svg": "<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" d=\"M16.704 5.29a1 1 0 010 1.414l-7.2 7.2a1 1 0 01-1.414 0l-3.6-3.6a1 1 0 011.414-1.414l2.893 2.893 6.493-6.493a1 1 0 011.414 0z\" clip-rule=\"evenodd\" />\n</svg>",
|
|
7
7
|
"../../assets/icons/chevron-down.svg": "<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path\n fill-rule=\"evenodd\"\n d=\"M5.23 7.21a.75.75 0 011.06.02L10 11.17l3.71-3.94a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z\"\n clip-rule=\"evenodd\"\n />\n</svg>\n",
|
|
8
|
-
"../../assets/icons/chevron-left.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
9
|
-
"../../assets/icons/chevron-right.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
10
|
-
"../../assets/icons/chevron-up-down.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
11
|
-
"../../assets/icons/chevron-up.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
12
|
-
"../../assets/icons/eye-off.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
13
|
-
"../../assets/icons/eye.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\
|
|
8
|
+
"../../assets/icons/chevron-left.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.75 19.5 8.25 12l7.5-7.5\" />\n</svg>\n",
|
|
9
|
+
"../../assets/icons/chevron-right.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m8.25 4.5 7.5 7.5-7.5 7.5\" />\n</svg>\n",
|
|
10
|
+
"../../assets/icons/chevron-up-down.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M8.25 15 12 18.75 15.75 15m-7.5-6L12 5.25 15.75 9\" />\n</svg>\n",
|
|
11
|
+
"../../assets/icons/chevron-up.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"m4.5 15.75 7.5-7.5 7.5 7.5\" />\n</svg>\n",
|
|
12
|
+
"../../assets/icons/eye-off.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M3.98 8.223A10.477 10.477 0 0 0 1.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.451 10.451 0 0 1 12 4.5c4.756 0 8.773 3.162 10.065 7.498a10.522 10.522 0 0 1-4.293 5.774M6.228 6.228 3 3m3.228 3.228 3.65 3.65m7.894 7.894L21 21m-3.228-3.228-3.65-3.65m0 0a3 3 0 1 0-4.243-4.243m4.242 4.242L9.88 9.88\" />\n</svg>\n",
|
|
13
|
+
"../../assets/icons/eye.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.036 12.322a1.012 1.012 0 0 1 0-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178Z\" />\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z\" />\n</svg>\n",
|
|
14
14
|
"../../assets/icons/plus.svg": "<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path\n fill-rule=\"evenodd\"\n d=\"M10 4.25a.75.75 0 01.75.75v4.25H15a.75.75 0 010 1.5h-4.25V15a.75.75 0 01-1.5 0v-4.25H5a.75.75 0 010-1.5h4.25V5a.75.75 0 01.75-.75z\"\n clip-rule=\"evenodd\"\n />\n</svg>\n",
|
|
15
|
-
"../../assets/icons/refresh.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\
|
|
16
|
-
"../../assets/icons/spinner.svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\
|
|
17
|
-
"../../assets/icons/three-dots.svg": "<svg fill=\"currentColor\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\
|
|
15
|
+
"../../assets/icons/refresh.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 -960 960 960\" fill=\"currentColor\">\n <path d=\"M204-318q-22-38-33-78t-11-82q0-134 93-228t227-94h7l-64-64 56-56 160 160-160 160-56-56 64-64h-7q-100 0-170 70.5T240-478q0 26 6 51t18 49l-60 60ZM481-40 321-200l160-160 56 56-64 64h7q100 0 170-70.5T720-482q0-26-6-51t-18-49l60-60q22 38 33 78t11 82q0 134-93 228t-227 94h-7l64 64-56 56Z\" />\n</svg>",
|
|
16
|
+
"../../assets/icons/spinner.svg": "<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n opacity=\"0.2\"\n />\n <circle\n cx=\"12\"\n cy=\"12\"\n r=\"9\"\n stroke=\"currentColor\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"42 14\"\n transform=\"rotate(-90 12 12)\"\n />\n</svg>\n",
|
|
17
|
+
"../../assets/icons/three-dots.svg": "<svg fill=\"currentColor\" viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\">\n <circle cx=\"10\" cy=\"4\" r=\"2\" />\n <circle cx=\"10\" cy=\"10\" r=\"2\" />\n <circle cx=\"10\" cy=\"16\" r=\"2\" />\n</svg>",
|
|
18
18
|
"../../assets/icons/x-mark.svg": "<svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path\n fill-rule=\"evenodd\"\n d=\"M4.22 4.22a.75.75 0 011.06 0L10 8.94l4.72-4.72a.75.75 0 111.06 1.06L11.06 10l4.72 4.72a.75.75 0 11-1.06 1.06L10 11.06l-4.72 4.72a.75.75 0 11-1.06-1.06L8.94 10 4.22 5.28a.75.75 0 010-1.06z\"\n clip-rule=\"evenodd\"\n />\n</svg>\n"
|
|
19
|
-
}),
|
|
20
|
-
for (let [e, t] of Object.entries(
|
|
21
|
-
let n = e.match(
|
|
19
|
+
}), he = /\/([^/]+)\.svg$/, R = {};
|
|
20
|
+
for (let [e, t] of Object.entries(me)) {
|
|
21
|
+
let n = e.match(he);
|
|
22
22
|
if (!n) continue;
|
|
23
23
|
let r = n[1];
|
|
24
|
-
|
|
24
|
+
R[r] = t;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
27
|
-
function
|
|
28
|
-
return
|
|
26
|
+
var ge = Object.freeze(Object.keys(R).sort((e, t) => e.localeCompare(t)));
|
|
27
|
+
function _e(e) {
|
|
28
|
+
return R[e];
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/components/hl-icon/HLIcon.vue?vue&type=script&setup=true&lang.ts
|
|
32
|
-
var
|
|
32
|
+
var ve = [
|
|
33
33
|
"role",
|
|
34
34
|
"aria-label",
|
|
35
35
|
"aria-hidden"
|
|
36
|
-
],
|
|
36
|
+
], ye = ["title", "innerHTML"], z = ["title"], be = /* @__PURE__ */ h({
|
|
37
37
|
__name: "HLIcon",
|
|
38
38
|
props: {
|
|
39
39
|
name: {},
|
|
@@ -53,7 +53,7 @@ var _e = [
|
|
|
53
53
|
return !(!t.startsWith("<svg") || !t.endsWith("</svg>") || /<script[\s>]/i.test(t) || /\son[a-z]+\s*=/i.test(t) || /javascript:/i.test(t));
|
|
54
54
|
}
|
|
55
55
|
let r = o(() => {
|
|
56
|
-
let t =
|
|
56
|
+
let t = _e(e.name);
|
|
57
57
|
if (t) return n(t) ? t : void 0;
|
|
58
58
|
}), i = o(() => e.ariaLabel || e.title || e.name), a = o(() => e.decorative), s = {
|
|
59
59
|
secondary: "text-secondary",
|
|
@@ -81,17 +81,17 @@ var _e = [
|
|
|
81
81
|
class: "hl-icon__svg inline-flex h-full w-full",
|
|
82
82
|
title: e.title || void 0,
|
|
83
83
|
innerHTML: r.value
|
|
84
|
-
}, null, 8,
|
|
84
|
+
}, null, 8, ye)) : (D(), l("span", {
|
|
85
85
|
key: 1,
|
|
86
86
|
class: "inline-flex h-full w-full items-center justify-center rounded border border-solid border-danger text-[10px] text-danger",
|
|
87
87
|
title: `Icon '${e.name}' is not found`
|
|
88
|
-
}, " ? ", 8,
|
|
88
|
+
}, " ? ", 8, z))], 14, ve));
|
|
89
89
|
}
|
|
90
|
-
}),
|
|
90
|
+
}), xe = (e, t) => {
|
|
91
91
|
let n = e.__vccOpts || e;
|
|
92
92
|
for (let [e, r] of t) n[e] = r;
|
|
93
93
|
return n;
|
|
94
|
-
},
|
|
94
|
+
}, B = /* @__PURE__ */ xe(be, [["__scopeId", "data-v-cddb1332"]]), V = {
|
|
95
95
|
dashboardLabel: "Dashboard",
|
|
96
96
|
routeNameMap: {
|
|
97
97
|
"": "Dashboard",
|
|
@@ -134,40 +134,40 @@ var _e = [
|
|
|
134
134
|
}
|
|
135
135
|
] },
|
|
136
136
|
uuidPattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i
|
|
137
|
-
},
|
|
138
|
-
...
|
|
137
|
+
}, Se = (e = {}) => ({
|
|
138
|
+
...V,
|
|
139
139
|
...e,
|
|
140
140
|
routeNameMap: {
|
|
141
|
-
...
|
|
141
|
+
...V.routeNameMap,
|
|
142
142
|
...e.routeNameMap
|
|
143
143
|
},
|
|
144
144
|
routeHrefMap: {
|
|
145
|
-
...
|
|
145
|
+
...V.routeHrefMap,
|
|
146
146
|
...e.routeHrefMap
|
|
147
147
|
},
|
|
148
148
|
addLabelByParent: {
|
|
149
|
-
...
|
|
149
|
+
...V.addLabelByParent,
|
|
150
150
|
...e.addLabelByParent
|
|
151
151
|
},
|
|
152
152
|
createLabelByRootSegment: {
|
|
153
|
-
...
|
|
153
|
+
...V.createLabelByRootSegment,
|
|
154
154
|
...e.createLabelByRootSegment
|
|
155
155
|
},
|
|
156
156
|
pathOverrides: {
|
|
157
|
-
...
|
|
157
|
+
...V.pathOverrides,
|
|
158
158
|
...e.pathOverrides
|
|
159
159
|
}
|
|
160
|
-
}),
|
|
160
|
+
}), Ce = (e) => {
|
|
161
161
|
let [t = ""] = e.split(/[?#]/u);
|
|
162
162
|
return t.length === 0 ? "/" : t.startsWith("/") ? t : `/${t}`;
|
|
163
|
-
},
|
|
164
|
-
function
|
|
165
|
-
let n =
|
|
163
|
+
}, we = (e) => e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1), Te = (e, t, n, r, i) => r !== null && r.length > 0 && t ? r : e === "new" ? i.addLabelByParent[n ?? ""] ?? "Add" : i.uuidPattern.test(e) && t ? "" : i.routeNameMap[e] ?? we(e);
|
|
164
|
+
function Ee(e, t = {}) {
|
|
165
|
+
let n = Se(t.staticData), r = t.dynamicLabel ?? o(() => null);
|
|
166
166
|
return o(() => {
|
|
167
|
-
let t =
|
|
167
|
+
let t = Ce(e.value), i = t.split("/").filter(Boolean), a = i[0], o = n.pathOverrides[t];
|
|
168
168
|
if (o !== void 0) return o.map((e) => ({ ...e }));
|
|
169
169
|
if (i.length === 1 && a !== void 0 && n.createLabelByRootSegment[a] !== void 0) {
|
|
170
|
-
let e = n.routeNameMap[a] ??
|
|
170
|
+
let e = n.routeNameMap[a] ?? we(a), t = n.routeHrefMap[a] ?? `/${a}`, r = n.createLabelByRootSegment[a];
|
|
171
171
|
return [
|
|
172
172
|
{
|
|
173
173
|
label: n.dashboardLabel,
|
|
@@ -197,7 +197,7 @@ function U(e, t = {}) {
|
|
|
197
197
|
return i.forEach((e, t) => {
|
|
198
198
|
let a = t === i.length - 1, o = t > 0 ? i[t - 1] : void 0;
|
|
199
199
|
c += `/${e}`;
|
|
200
|
-
let l =
|
|
200
|
+
let l = Te(e, a, o, r.value, n), u = a ? void 0 : n.routeHrefMap[e] ?? c;
|
|
201
201
|
s.push({
|
|
202
202
|
label: l,
|
|
203
203
|
href: u,
|
|
@@ -208,14 +208,14 @@ function U(e, t = {}) {
|
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region src/components/hl-breadcrumb/HLBreadcrumb.vue?vue&type=script&setup=true&lang.ts
|
|
211
|
-
var
|
|
211
|
+
var H = {
|
|
212
212
|
"aria-label": "Breadcrumb",
|
|
213
|
-
class: "
|
|
214
|
-
},
|
|
213
|
+
class: "hanap-labs-font"
|
|
214
|
+
}, De = { class: "flex items-center text-sm" }, Oe = {
|
|
215
215
|
key: 1,
|
|
216
216
|
class: "mx-1 text-muted",
|
|
217
217
|
"aria-hidden": "true"
|
|
218
|
-
},
|
|
218
|
+
}, ke = ["href"], Ae = /* @__PURE__ */ h({
|
|
219
219
|
__name: "HLBreadcrumb",
|
|
220
220
|
props: {
|
|
221
221
|
path: { default: "/" },
|
|
@@ -227,7 +227,7 @@ var Te = {
|
|
|
227
227
|
activeColor: {}
|
|
228
228
|
},
|
|
229
229
|
setup(e) {
|
|
230
|
-
let t = e, n = o(() => t.path), i = o(() => t.dynamicLabel), a =
|
|
230
|
+
let t = e, n = o(() => t.path), i = o(() => t.dynamicLabel), a = Ee(n, {
|
|
231
231
|
staticData: t.staticData,
|
|
232
232
|
dynamicLabel: i
|
|
233
233
|
}), d = {
|
|
@@ -242,26 +242,26 @@ var Te = {
|
|
|
242
242
|
dark: "text-dark",
|
|
243
243
|
muted: "text-muted"
|
|
244
244
|
}, f = o(() => t.activeColor ? d[t.activeColor] : "text-dark"), p = o(() => t.activeColor ? d[t.activeColor].replace("text-", "hover:text-") : "hover:text-dark");
|
|
245
|
-
return (t, n) => (D(), l("nav",
|
|
245
|
+
return (t, n) => (D(), l("nav", H, [u("ol", De, [(D(!0), l(r, null, j(F(a), (t, n) => (D(), l("li", {
|
|
246
246
|
key: `${n}-${t.label}-${t.href ?? ""}`,
|
|
247
247
|
class: "flex items-center"
|
|
248
|
-
}, [n > 0 ? (D(), l(r, { key: 0 }, [e.separatorType === "icon" ? (D(), s(
|
|
248
|
+
}, [n > 0 ? (D(), l(r, { key: 0 }, [e.separatorType === "icon" ? (D(), s(B, {
|
|
249
249
|
key: 0,
|
|
250
250
|
name: e.separatorIconName,
|
|
251
251
|
size: "16px",
|
|
252
252
|
color: "muted",
|
|
253
253
|
class: "mx-1 -rotate-90",
|
|
254
254
|
decorative: ""
|
|
255
|
-
}, null, 8, ["name"])) : (D(), l("span",
|
|
255
|
+
}, null, 8, ["name"])) : (D(), l("span", Oe, N(e.separator), 1))], 64)) : c("", !0), t.href ? (D(), l("a", {
|
|
256
256
|
key: 1,
|
|
257
257
|
href: t.href,
|
|
258
258
|
class: C(["text-dark no-underline transition-colors hover:no-underline", p.value])
|
|
259
|
-
}, N(t.label), 11,
|
|
259
|
+
}, N(t.label), 11, ke)) : (D(), l("span", {
|
|
260
260
|
key: 2,
|
|
261
261
|
class: C(["font-semibold", t.isActive ? f.value : "text-dark"])
|
|
262
262
|
}, N(t.label), 3))]))), 128))])]));
|
|
263
263
|
}
|
|
264
|
-
}),
|
|
264
|
+
}), je = ["src"], Me = { key: 1 }, Ne = /* @__PURE__ */ h({
|
|
265
265
|
__name: "HLAvatar",
|
|
266
266
|
props: {
|
|
267
267
|
text: { default: "?" },
|
|
@@ -328,7 +328,7 @@ var Te = {
|
|
|
328
328
|
return Math.abs(t);
|
|
329
329
|
}
|
|
330
330
|
return (n, o) => (D(), l("div", {
|
|
331
|
-
class: "inline-flex shrink-0 items-center justify-center bg-tertiary/35 ring-1 ring-primary/20
|
|
331
|
+
class: "inline-flex shrink-0 items-center justify-center bg-tertiary/35 ring-1 ring-primary/20 hanap-labs-font",
|
|
332
332
|
style: w(a.value)
|
|
333
333
|
}, [u("div", {
|
|
334
334
|
class: C(["inline-flex size-full items-center justify-center overflow-hidden border border-solid border-gray-200 bg-primary/10 font-bold uppercase leading-none text-primary select-none", t[e.size]]),
|
|
@@ -338,13 +338,13 @@ var Te = {
|
|
|
338
338
|
src: r.value,
|
|
339
339
|
alt: "Avatar image",
|
|
340
340
|
class: "size-full rounded-full object-cover"
|
|
341
|
-
}, null, 8,
|
|
341
|
+
}, null, 8, je)) : (D(), l("span", Me, N(i.value), 1))], 6)], 4));
|
|
342
342
|
}
|
|
343
|
-
}),
|
|
343
|
+
}), Pe = ["type", "disabled"], Fe = {
|
|
344
344
|
key: 1,
|
|
345
345
|
class: "inline-flex items-center justify-center",
|
|
346
346
|
"aria-hidden": "true"
|
|
347
|
-
},
|
|
347
|
+
}, U = "bg-transparent border border-solid", W = /* @__PURE__ */ h({
|
|
348
348
|
__name: "HLButton",
|
|
349
349
|
props: {
|
|
350
350
|
color: {},
|
|
@@ -388,61 +388,67 @@ var Te = {
|
|
|
388
388
|
dark: "border-0 bg-dark text-light hover:opacity-90",
|
|
389
389
|
muted: "border-0 bg-muted text-light hover:opacity-90"
|
|
390
390
|
}, r = {
|
|
391
|
-
secondary: `${
|
|
392
|
-
tertiary: `${
|
|
393
|
-
primary: `${
|
|
394
|
-
success: `${
|
|
395
|
-
danger: `${
|
|
396
|
-
warning: `${
|
|
397
|
-
info: `${
|
|
398
|
-
light: `${
|
|
399
|
-
dark: `${
|
|
400
|
-
muted: `${
|
|
391
|
+
secondary: `${U} text-secondary border-secondary hover:bg-secondary hover:text-primary`,
|
|
392
|
+
tertiary: `${U} text-tertiary border-tertiary hover:bg-tertiary hover:text-primary`,
|
|
393
|
+
primary: `${U} text-primary border-primary hover:bg-primary hover:text-light`,
|
|
394
|
+
success: `${U} text-success border-success hover:bg-success hover:text-light`,
|
|
395
|
+
danger: `${U} text-danger border-danger hover:bg-danger hover:text-light`,
|
|
396
|
+
warning: `${U} text-warning border-warning hover:bg-warning hover:text-dark`,
|
|
397
|
+
info: `${U} text-info border-info hover:bg-info hover:text-light`,
|
|
398
|
+
light: `${U} text-dark border-light hover:bg-light hover:text-dark`,
|
|
399
|
+
dark: `${U} text-dark border-dark hover:bg-dark hover:text-light`,
|
|
400
|
+
muted: `${U} text-muted border-muted hover:bg-muted hover:text-light`
|
|
401
401
|
}, i = {
|
|
402
|
-
xs: "
|
|
403
|
-
sm: "
|
|
404
|
-
md: "
|
|
405
|
-
lg: "
|
|
402
|
+
xs: "var(--hanap-labs-size-xs, 24px)",
|
|
403
|
+
sm: "var(--hanap-labs-size-sm, 36px)",
|
|
404
|
+
md: "var(--hanap-labs-size-md, 42px)",
|
|
405
|
+
lg: "var(--hanap-labs-size-lg, 48px)"
|
|
406
406
|
}, a = {
|
|
407
|
-
xs: "
|
|
408
|
-
sm: "
|
|
409
|
-
md: "
|
|
410
|
-
lg: "
|
|
407
|
+
xs: "px-2 text-xs",
|
|
408
|
+
sm: "px-2.5 text-xs",
|
|
409
|
+
md: "px-3 text-base",
|
|
410
|
+
lg: "px-4 text-base"
|
|
411
411
|
}, s = {
|
|
412
|
+
xs: "size-[var(--hanap-labs-size-xs)] text-xs",
|
|
413
|
+
sm: "size-[var(--hanap-labs-size-sm)] text-xs",
|
|
414
|
+
md: "size-[var(--hanap-labs-size-md)] text-base",
|
|
415
|
+
lg: "size-[var(--hanap-labs-size-lg)] text-base"
|
|
416
|
+
}, u = {
|
|
412
417
|
xs: "rounded-md",
|
|
413
418
|
sm: "rounded-md",
|
|
414
419
|
md: "rounded-lg",
|
|
415
420
|
lg: "rounded-xl"
|
|
416
|
-
},
|
|
421
|
+
}, d = t, f = o(() => e.color ? e.variant === "outline" ? r[e.color] : n[e.color] : e.variant === "outline" ? `${U} border-gray-200 text-dark hover:bg-gray-200` : "border border-solid border-gray-200 bg-transparent text-dark hover:bg-gray-200"), m = o(() => e.iconOnly ? s[e.size] : a[e.size]), h = o(() => e.iconOnly ? void 0 : { height: i[e.size] }), g = o(() => e.rounded ? "rounded-full" : u[e.size]);
|
|
417
422
|
return (t, n) => (D(), l("button", x({
|
|
418
423
|
type: e.type,
|
|
419
|
-
|
|
424
|
+
style: h.value,
|
|
425
|
+
class: "flex w-max items-center justify-center gap-2 hanap-labs-font font-medium hl-color-transition cursor-pointer hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60"
|
|
420
426
|
}, t.$attrs, {
|
|
421
427
|
class: [
|
|
422
|
-
d.value,
|
|
423
|
-
e.noBorder && "border-0",
|
|
424
428
|
f.value,
|
|
429
|
+
e.noBorder && "border-0",
|
|
425
430
|
m.value,
|
|
431
|
+
g.value,
|
|
426
432
|
e.iconOnly && "!gap-0 !min-w-0"
|
|
427
433
|
],
|
|
428
434
|
disabled: e.disabled || e.loading,
|
|
429
|
-
onClick: n[0] ||=
|
|
435
|
+
onClick: n[0] ||= pe((e) => d("click"), ["stop"])
|
|
430
436
|
}), [t.$slots.icon && !e.loading ? (D(), l("span", {
|
|
431
437
|
key: 0,
|
|
432
438
|
class: C(["inline-flex items-center justify-center", e.iconPosition === "right" ? "order-2" : "order-1"])
|
|
433
|
-
}, [M(t.$slots, "icon")], 2)) : c("", !0), e.loading ? (D(), l("span",
|
|
439
|
+
}, [M(t.$slots, "icon")], 2)) : c("", !0), e.loading ? (D(), l("span", Fe, [p(B, {
|
|
434
440
|
name: "spinner",
|
|
435
441
|
size: 16,
|
|
436
442
|
class: "animate-spin"
|
|
437
443
|
})])) : e.iconOnly ? c("", !0) : (D(), l("span", {
|
|
438
444
|
key: 2,
|
|
439
445
|
class: C(["inline-flex items-center justify-center", e.iconPosition === "right" && t.$slots.icon ? "order-1" : "order-2"])
|
|
440
|
-
}, N(e.label), 3))], 16,
|
|
446
|
+
}, N(e.label), 3))], 16, Pe));
|
|
441
447
|
}
|
|
442
|
-
}),
|
|
448
|
+
}), Ie = { class: "mb-1 hanap-labs-font" }, Le = ["for"], Re = ["id"], ze = {
|
|
443
449
|
key: 0,
|
|
444
450
|
class: "text-danger"
|
|
445
|
-
},
|
|
451
|
+
}, Be = /* @__PURE__ */ h({
|
|
446
452
|
__name: "HLLabel",
|
|
447
453
|
props: {
|
|
448
454
|
label: { default: "" },
|
|
@@ -469,23 +475,23 @@ var Te = {
|
|
|
469
475
|
md: "text-sm",
|
|
470
476
|
lg: "text-base"
|
|
471
477
|
})[e.size]);
|
|
472
|
-
return (r, i) => (D(), l("div",
|
|
478
|
+
return (r, i) => (D(), l("div", Ie, [u("label", {
|
|
473
479
|
for: e.forId || void 0,
|
|
474
480
|
class: C(["block text-dark font-medium", [t.value, e.labelClass]])
|
|
475
|
-
}, [u("span", { id: e.labelId || void 0 }, N(e.label), 9,
|
|
481
|
+
}, [u("span", { id: e.labelId || void 0 }, N(e.label), 9, Re), e.required ? (D(), l("span", ze, "*")) : c("", !0)], 10, Le), e.description ? (D(), l("p", {
|
|
476
482
|
key: 0,
|
|
477
483
|
class: C(["text-muted", [n.value, e.descriptionClass]])
|
|
478
484
|
}, N(e.description), 3)) : c("", !0)]));
|
|
479
485
|
}
|
|
480
|
-
}),
|
|
486
|
+
}), Ve = { class: "w-full select-none" }, He = [
|
|
481
487
|
"aria-checked",
|
|
482
488
|
"aria-label",
|
|
483
489
|
"aria-labelledby",
|
|
484
490
|
"disabled"
|
|
485
|
-
],
|
|
491
|
+
], Ue = {
|
|
486
492
|
key: 1,
|
|
487
493
|
class: "sr-only"
|
|
488
|
-
},
|
|
494
|
+
}, We = ["id", "disabled"], G = "bg-white border-gray-300", Ge = "bg-white border-gray-300 text-dark", Ke = /* @__PURE__ */ h({
|
|
489
495
|
__name: "HLCheckbox",
|
|
490
496
|
props: /* @__PURE__ */ b({
|
|
491
497
|
id: { default: "" },
|
|
@@ -518,7 +524,7 @@ var Te = {
|
|
|
518
524
|
}),
|
|
519
525
|
emits: ["update:modelValue"],
|
|
520
526
|
setup(e) {
|
|
521
|
-
let t =
|
|
527
|
+
let t = oe(e, "modelValue"), n = ae(), r = o(() => e.id || n), i = o(() => `${r.value}-label`), a = o(() => e.label.trim().length > 0), c = () => {
|
|
522
528
|
e.disabled || (t.value = !t.value);
|
|
523
529
|
}, d = {
|
|
524
530
|
xs: "w-3.5 h-3.5",
|
|
@@ -557,8 +563,8 @@ var Te = {
|
|
|
557
563
|
light: "bg-light border-muted",
|
|
558
564
|
dark: "bg-light border-dark",
|
|
559
565
|
muted: "bg-light border-muted"
|
|
560
|
-
}, _ = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(h, e), v = o(() => d[e.size]), y = o(() => m[e.size]), b = o(() => e.indeterminate && !t.value), x = o(() => b.value ? "mixed" : t.value), S = o(() => b.value ? "bg-primary/20 border-primary text-primary" : _(e.color) ? t.value ? h[e.color] : g[e.color] : t.value ?
|
|
561
|
-
return (n, o) => (D(), l("div",
|
|
566
|
+
}, _ = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(h, e), v = o(() => d[e.size]), y = o(() => m[e.size]), b = o(() => e.indeterminate && !t.value), x = o(() => b.value ? "mixed" : t.value), S = o(() => b.value ? "bg-primary/20 border-primary text-primary" : _(e.color) ? t.value ? h[e.color] : g[e.color] : t.value ? Ge : G);
|
|
567
|
+
return (n, o) => (D(), l("div", Ve, [u("button", {
|
|
562
568
|
type: "button",
|
|
563
569
|
role: "checkbox",
|
|
564
570
|
"aria-checked": x.value,
|
|
@@ -566,13 +572,13 @@ var Te = {
|
|
|
566
572
|
"aria-labelledby": a.value ? i.value : void 0,
|
|
567
573
|
disabled: e.disabled,
|
|
568
574
|
style: { "box-shadow": "none" },
|
|
569
|
-
class: C(["inline-flex w-full appearance-none border-0 !shadow-none items-start gap-3 rounded-md bg-transparent text-left
|
|
575
|
+
class: C(["inline-flex w-full appearance-none border-0 !shadow-none items-start gap-3 rounded-md bg-transparent text-left hanap-labs-font transition-all duration-200 hl-no-focus-ring", e.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"]),
|
|
570
576
|
onClick: c
|
|
571
577
|
}, [u("span", { class: C(["mt-0.5 inline-flex shrink-0 items-center justify-center overflow-hidden rounded border border-solid border-gray-200 bg-white leading-none transition-colors duration-200", [
|
|
572
578
|
v.value,
|
|
573
579
|
S.value,
|
|
574
580
|
e.noBorder && "border-0"
|
|
575
|
-
]]) }, [p(
|
|
581
|
+
]]) }, [p(B, {
|
|
576
582
|
name: "check",
|
|
577
583
|
size: y.value,
|
|
578
584
|
color: e.color,
|
|
@@ -581,7 +587,7 @@ var Te = {
|
|
|
581
587
|
"size",
|
|
582
588
|
"color",
|
|
583
589
|
"class"
|
|
584
|
-
])], 2), e.label || e.description ? (D(), s(
|
|
590
|
+
])], 2), e.label || e.description ? (D(), s(Be, {
|
|
585
591
|
key: 0,
|
|
586
592
|
class: "min-w-0",
|
|
587
593
|
label: e.label,
|
|
@@ -599,18 +605,18 @@ var Te = {
|
|
|
599
605
|
"size",
|
|
600
606
|
"label-class",
|
|
601
607
|
"description-class"
|
|
602
|
-
])) : (D(), l("span",
|
|
608
|
+
])) : (D(), l("span", Ue, "toggle checkbox"))], 10, He), fe(u("input", {
|
|
603
609
|
id: r.value,
|
|
604
610
|
"onUpdate:modelValue": o[0] ||= (e) => t.value = e,
|
|
605
611
|
type: "checkbox",
|
|
606
612
|
class: "sr-only",
|
|
607
613
|
disabled: e.disabled
|
|
608
|
-
}, null, 8,
|
|
614
|
+
}, null, 8, We), [[ce, t.value]])]));
|
|
609
615
|
}
|
|
610
|
-
}),
|
|
616
|
+
}), qe = { class: "w-full space-y-2 hanap-labs-font" }, K = { class: "relative" }, Je = {
|
|
611
617
|
key: 0,
|
|
612
618
|
class: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-muted"
|
|
613
|
-
},
|
|
619
|
+
}, Ye = [
|
|
614
620
|
"id",
|
|
615
621
|
"type",
|
|
616
622
|
"placeholder",
|
|
@@ -621,16 +627,16 @@ var Te = {
|
|
|
621
627
|
"maxlength",
|
|
622
628
|
"minlength",
|
|
623
629
|
"pattern"
|
|
624
|
-
],
|
|
630
|
+
], Xe = {
|
|
625
631
|
key: 1,
|
|
626
632
|
class: "pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-muted"
|
|
627
|
-
},
|
|
633
|
+
}, Ze = ["aria-label"], Qe = {
|
|
628
634
|
key: 1,
|
|
629
635
|
class: "mt-1 space-y-1"
|
|
630
|
-
},
|
|
636
|
+
}, $e = {
|
|
631
637
|
key: 0,
|
|
632
638
|
class: "text-xs text-danger"
|
|
633
|
-
},
|
|
639
|
+
}, et = /* @__PURE__ */ xe(/* @__PURE__ */ h({
|
|
634
640
|
__name: "HLInput",
|
|
635
641
|
props: /* @__PURE__ */ b({
|
|
636
642
|
id: { default: "" },
|
|
@@ -692,7 +698,7 @@ var Te = {
|
|
|
692
698
|
"change"
|
|
693
699
|
], ["update:modelValue"]),
|
|
694
700
|
setup(e, { emit: t }) {
|
|
695
|
-
let n =
|
|
701
|
+
let n = oe(e, "modelValue"), i = t, a = ae(), d = o(() => e.id || a), f = k(null), m = k(!1), h = o(() => e.type === "password"), g = o(() => e.type === "search"), _ = o(() => h.value && e.showPasswordToggle ? m.value ? "text" : "password" : e.type), v = () => {
|
|
696
702
|
m.value = !m.value;
|
|
697
703
|
}, y = o(() => g.value && String(n.value ?? "").length > 0), b = () => {
|
|
698
704
|
n.value = "", i("input"), i("change"), f.value?.focus();
|
|
@@ -700,17 +706,22 @@ var Te = {
|
|
|
700
706
|
let t = [];
|
|
701
707
|
for (let n of e.errors) t.includes(n) || t.push(n);
|
|
702
708
|
return t;
|
|
703
|
-
}),
|
|
704
|
-
xs: "
|
|
705
|
-
sm: "
|
|
706
|
-
md: "
|
|
707
|
-
lg: "
|
|
708
|
-
},
|
|
709
|
+
}), ee = o(() => !!x.value || S.value.length > 0), T = {
|
|
710
|
+
xs: "var(--hanap-labs-size-xs, 24px)",
|
|
711
|
+
sm: "var(--hanap-labs-size-sm, 36px)",
|
|
712
|
+
md: "var(--hanap-labs-size-md, 42px)",
|
|
713
|
+
lg: "var(--hanap-labs-size-lg, 48px)"
|
|
714
|
+
}, E = {
|
|
715
|
+
xs: "px-2 text-xs",
|
|
716
|
+
sm: "px-2.5 text-xs",
|
|
717
|
+
md: "px-3 text-sm",
|
|
718
|
+
lg: "px-4 text-sm"
|
|
719
|
+
}, te = {
|
|
709
720
|
xs: "rounded-md",
|
|
710
721
|
sm: "rounded-md",
|
|
711
722
|
md: "rounded-md",
|
|
712
723
|
lg: "rounded-lg"
|
|
713
|
-
},
|
|
724
|
+
}, O = {
|
|
714
725
|
secondary: "border-secondary focus:border-secondary",
|
|
715
726
|
tertiary: "border-tertiary focus:border-tertiary",
|
|
716
727
|
primary: "border-primary focus:border-primary",
|
|
@@ -721,9 +732,9 @@ var Te = {
|
|
|
721
732
|
light: "border-muted focus:border-secondary",
|
|
722
733
|
dark: "border-dark focus:border-dark",
|
|
723
734
|
muted: "border-muted focus:border-muted"
|
|
724
|
-
},
|
|
725
|
-
return (t, a) => (D(), l("div",
|
|
726
|
-
e.label || e.description ? (D(), s(
|
|
735
|
+
}, A = o(() => E[e.size]), ne = o(() => ({ height: T[e.size] })), re = o(() => e.rounded ? "rounded-full" : te[e.size]), ie = o(() => e.color ? O[e.color] : "border-gray-200 focus:border-gray-200");
|
|
736
|
+
return (t, a) => (D(), l("div", qe, [
|
|
737
|
+
e.label || e.description ? (D(), s(Be, {
|
|
727
738
|
key: 0,
|
|
728
739
|
label: e.label,
|
|
729
740
|
description: e.description,
|
|
@@ -739,13 +750,14 @@ var Te = {
|
|
|
739
750
|
"size",
|
|
740
751
|
"label-class"
|
|
741
752
|
])) : c("", !0),
|
|
742
|
-
u("div",
|
|
743
|
-
e.iconLeft ? (D(), l("div",
|
|
744
|
-
|
|
753
|
+
u("div", K, [
|
|
754
|
+
e.iconLeft ? (D(), l("div", Je, [M(t.$slots, "icon", {}, void 0, !0)])) : c("", !0),
|
|
755
|
+
fe(u("input", {
|
|
745
756
|
ref_key: "inputRef",
|
|
746
757
|
ref: f,
|
|
747
758
|
id: d.value,
|
|
748
759
|
"onUpdate:modelValue": a[0] ||= (e) => n.value = e,
|
|
760
|
+
style: w(ne.value),
|
|
749
761
|
type: _.value,
|
|
750
762
|
placeholder: e.placeholder,
|
|
751
763
|
required: e.required,
|
|
@@ -755,16 +767,16 @@ var Te = {
|
|
|
755
767
|
maxlength: e.maxlength,
|
|
756
768
|
minlength: e.minlength,
|
|
757
769
|
pattern: e.pattern,
|
|
758
|
-
class: C(["block w-full appearance-none box-border border border-solid bg-transparent text-dark placeholder:text-muted leading-tight transition-colors duration-150 hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60
|
|
759
|
-
te.value,
|
|
760
|
-
O.value,
|
|
770
|
+
class: C(["block w-full appearance-none box-border border border-solid bg-transparent text-dark placeholder:text-muted leading-tight transition-colors duration-150 hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60 hanap-labs-font", [
|
|
761
771
|
A.value,
|
|
772
|
+
re.value,
|
|
773
|
+
ie.value,
|
|
762
774
|
e.inputClass,
|
|
763
775
|
{
|
|
764
776
|
"cursor-not-allowed": e.disabled || e.loading,
|
|
765
777
|
"pr-10": e.showPasswordToggle && h.value || e.loading || y.value,
|
|
766
778
|
"pl-10": e.iconLeft,
|
|
767
|
-
"border-danger focus:border-danger":
|
|
779
|
+
"border-danger focus:border-danger": ee.value,
|
|
768
780
|
"border-0 focus:border-0": e.noBorder,
|
|
769
781
|
"hl-search-input": g.value
|
|
770
782
|
}
|
|
@@ -773,8 +785,8 @@ var Te = {
|
|
|
773
785
|
onBlur: a[2] ||= (e) => i("blur"),
|
|
774
786
|
onInput: a[3] ||= (e) => i("input"),
|
|
775
787
|
onChange: a[4] ||= (e) => i("change")
|
|
776
|
-
}, null,
|
|
777
|
-
e.loading ? (D(), l("div",
|
|
788
|
+
}, null, 46, Ye), [[le, n.value]]),
|
|
789
|
+
e.loading ? (D(), l("div", Xe, [p(B, {
|
|
778
790
|
name: "spinner",
|
|
779
791
|
size: 20,
|
|
780
792
|
class: "animate-spin",
|
|
@@ -785,7 +797,7 @@ var Te = {
|
|
|
785
797
|
class: "absolute inset-y-0 right-0 flex items-center pr-3 appearance-none border-0 bg-transparent p-0 text-muted hover:text-primary hl-no-focus-ring cursor-pointer",
|
|
786
798
|
"aria-label": "Clear search",
|
|
787
799
|
onClick: b
|
|
788
|
-
}, [p(
|
|
800
|
+
}, [p(B, {
|
|
789
801
|
name: "x-mark",
|
|
790
802
|
size: 16,
|
|
791
803
|
decorative: !0,
|
|
@@ -796,88 +808,88 @@ var Te = {
|
|
|
796
808
|
class: "absolute inset-y-0 right-0 flex items-center pr-3 appearance-none border-0 bg-transparent p-0 text-muted hover:text-primary hl-no-focus-ring cursor-pointer",
|
|
797
809
|
"aria-label": m.value ? "Hide password" : "Show password",
|
|
798
810
|
onClick: v
|
|
799
|
-
}, [p(
|
|
811
|
+
}, [p(B, {
|
|
800
812
|
name: m.value ? "eye-off" : "eye",
|
|
801
813
|
size: 18,
|
|
802
814
|
decorative: !0,
|
|
803
815
|
color: e.color
|
|
804
|
-
}, null, 8, ["name", "color"])], 8,
|
|
816
|
+
}, null, 8, ["name", "color"])], 8, Ze)) : c("", !0)
|
|
805
817
|
]),
|
|
806
|
-
|
|
818
|
+
ee.value ? (D(), l("div", Qe, [x.value ? (D(), l("p", $e, N(x.value), 1)) : c("", !0), (D(!0), l(r, null, j(S.value, (e) => (D(), l("p", {
|
|
807
819
|
key: e,
|
|
808
820
|
class: "text-xs text-danger"
|
|
809
821
|
}, N(e), 1))), 128))])) : c("", !0)
|
|
810
822
|
]));
|
|
811
823
|
}
|
|
812
|
-
}), [["__scopeId", "data-v-
|
|
824
|
+
}), [["__scopeId", "data-v-5110f02f"]]);
|
|
813
825
|
//#endregion
|
|
814
826
|
//#region node_modules/@vueuse/shared/dist/index.js
|
|
815
|
-
function
|
|
827
|
+
function tt(e, t) {
|
|
816
828
|
return _() ? (E(e, t), !0) : !1;
|
|
817
829
|
}
|
|
818
|
-
var
|
|
830
|
+
var q = typeof window < "u" && typeof document < "u";
|
|
819
831
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
820
|
-
var
|
|
821
|
-
function
|
|
832
|
+
var nt = Object.prototype.toString, rt = (e) => nt.call(e) === "[object Object]", it = () => {};
|
|
833
|
+
function at(...e) {
|
|
822
834
|
if (e.length !== 1) return ie(...e);
|
|
823
835
|
let t = e[0];
|
|
824
836
|
return typeof t == "function" ? O(m(() => ({
|
|
825
837
|
get: t,
|
|
826
|
-
set:
|
|
838
|
+
set: it
|
|
827
839
|
}))) : k(t);
|
|
828
840
|
}
|
|
829
|
-
function
|
|
841
|
+
function ot(e) {
|
|
830
842
|
return Array.isArray(e) ? e : [e];
|
|
831
843
|
}
|
|
832
|
-
function
|
|
833
|
-
return
|
|
844
|
+
function st(e, t, n) {
|
|
845
|
+
return I(e, t, {
|
|
834
846
|
...n,
|
|
835
847
|
immediate: !0
|
|
836
848
|
});
|
|
837
849
|
}
|
|
838
850
|
//#endregion
|
|
839
851
|
//#region node_modules/@vueuse/core/dist/index.js
|
|
840
|
-
var
|
|
841
|
-
|
|
842
|
-
function
|
|
852
|
+
var ct = q ? window : void 0;
|
|
853
|
+
q && window.document, q && window.navigator, q && window.location;
|
|
854
|
+
function lt(e) {
|
|
843
855
|
let t = P(e);
|
|
844
856
|
return t?.$el ?? t;
|
|
845
857
|
}
|
|
846
|
-
function
|
|
858
|
+
function ut(...e) {
|
|
847
859
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = o(() => {
|
|
848
|
-
let t =
|
|
860
|
+
let t = ot(P(e[0])).filter((e) => e != null);
|
|
849
861
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
850
862
|
});
|
|
851
|
-
return
|
|
852
|
-
n.value?.map((e) =>
|
|
853
|
-
|
|
854
|
-
|
|
863
|
+
return st(() => [
|
|
864
|
+
n.value?.map((e) => lt(e)) ?? [ct].filter((e) => e != null),
|
|
865
|
+
ot(P(n.value ? e[1] : e[0])),
|
|
866
|
+
ot(F(n.value ? e[2] : e[1])),
|
|
855
867
|
P(n.value ? e[3] : e[2])
|
|
856
868
|
], ([e, n, r, i], a, o) => {
|
|
857
869
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
858
|
-
let s =
|
|
870
|
+
let s = rt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
859
871
|
o(() => {
|
|
860
872
|
c.forEach((e) => e());
|
|
861
873
|
});
|
|
862
874
|
}, { flush: "post" });
|
|
863
875
|
}
|
|
864
|
-
function
|
|
876
|
+
function dt() {
|
|
865
877
|
let e = re(!1), t = g();
|
|
866
878
|
return t && T(() => {
|
|
867
879
|
e.value = !0;
|
|
868
880
|
}, t), e;
|
|
869
881
|
}
|
|
870
882
|
/* @__NO_SIDE_EFFECTS__ */
|
|
871
|
-
function
|
|
872
|
-
let t =
|
|
883
|
+
function ft(e) {
|
|
884
|
+
let t = dt();
|
|
873
885
|
return o(() => (t.value, !!e()));
|
|
874
886
|
}
|
|
875
|
-
function
|
|
876
|
-
let { window: r =
|
|
887
|
+
function pt(e, t, n = {}) {
|
|
888
|
+
let { window: r = ct, ...i } = n, a, s = /* @__PURE__ */ ft(() => r && "ResizeObserver" in r), c = () => {
|
|
877
889
|
a &&= (a.disconnect(), void 0);
|
|
878
|
-
}, l =
|
|
890
|
+
}, l = I(o(() => {
|
|
879
891
|
let t = P(e);
|
|
880
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
892
|
+
return Array.isArray(t) ? t.map((e) => lt(e)) : [lt(t)];
|
|
881
893
|
}), (e) => {
|
|
882
894
|
if (c(), s.value && r) {
|
|
883
895
|
a = new ResizeObserver(t);
|
|
@@ -889,16 +901,16 @@ function ft(e, t, n = {}) {
|
|
|
889
901
|
}), u = () => {
|
|
890
902
|
c(), l();
|
|
891
903
|
};
|
|
892
|
-
return
|
|
904
|
+
return tt(u), {
|
|
893
905
|
isSupported: s,
|
|
894
906
|
stop: u
|
|
895
907
|
};
|
|
896
908
|
}
|
|
897
|
-
function
|
|
909
|
+
function mt(e = ct, t) {
|
|
898
910
|
e && typeof e.requestAnimationFrame == "function" ? e.requestAnimationFrame(t) : t();
|
|
899
911
|
}
|
|
900
|
-
function
|
|
901
|
-
let { window: t =
|
|
912
|
+
function ht(e = {}) {
|
|
913
|
+
let { window: t = ct } = e, n = at(e?.element), r = at(e?.input ?? ""), i = e?.styleProp ?? "height", a = re(1), o = re(0);
|
|
902
914
|
function s() {
|
|
903
915
|
if (!n.value) return;
|
|
904
916
|
let t = "", r = e?.maxHeight;
|
|
@@ -906,14 +918,14 @@ function mt(e = {}) {
|
|
|
906
918
|
let o = P(e?.styleTarget), s = r == null ? `${a.value}px` : `${Math.min(a.value, r)}px`;
|
|
907
919
|
o ? o.style[i] = s : t = s, n.value.style[i] = t;
|
|
908
920
|
}
|
|
909
|
-
return
|
|
921
|
+
return I([r, n], () => S(s), { immediate: !0 }), I(a, () => {
|
|
910
922
|
var t;
|
|
911
923
|
return e == null || (t = e.onResize) == null ? void 0 : t.call(e);
|
|
912
|
-
}),
|
|
913
|
-
o.value !== e.width &&
|
|
924
|
+
}), pt(n, ([{ contentRect: e }]) => {
|
|
925
|
+
o.value !== e.width && mt(t, () => {
|
|
914
926
|
o.value = e.width, s();
|
|
915
927
|
});
|
|
916
|
-
}), e?.watch &&
|
|
928
|
+
}), e?.watch && I(e.watch, s, {
|
|
917
929
|
immediate: !0,
|
|
918
930
|
deep: !0
|
|
919
931
|
}), {
|
|
@@ -924,7 +936,7 @@ function mt(e = {}) {
|
|
|
924
936
|
}
|
|
925
937
|
//#endregion
|
|
926
938
|
//#region src/components/hl-menu-action/HLMenuAction.vue?vue&type=script&setup=true&lang.ts
|
|
927
|
-
var
|
|
939
|
+
var gt = { class: "relative inline-block hanap-labs-font" }, _t = /* @__PURE__ */ h({
|
|
928
940
|
__name: "HLMenuAction",
|
|
929
941
|
props: /* @__PURE__ */ b({
|
|
930
942
|
options: { default: () => [] },
|
|
@@ -971,7 +983,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
971
983
|
light: "text-slate-700",
|
|
972
984
|
dark: "text-dark",
|
|
973
985
|
muted: "text-muted"
|
|
974
|
-
}, a =
|
|
986
|
+
}, a = oe(e, "modelValue"), u = n, { ACTION_REF: f, FLOATING_REF: m, ACTION_ID: h, FLOATING_ID: g, isVisible: _, show: v, hide: y, floatingStyles: b } = t({
|
|
975
987
|
placement: "bottom-end",
|
|
976
988
|
strategy: "fixed",
|
|
977
989
|
offset: 4
|
|
@@ -984,19 +996,19 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
984
996
|
}, te = async (t) => {
|
|
985
997
|
t.disabled || t.loading || (u("select", t), t.callback && await t.callback(), e.closeOnSelect && T());
|
|
986
998
|
};
|
|
987
|
-
return
|
|
999
|
+
return I(a, (e) => {
|
|
988
1000
|
e !== _.value && (e ? ee() : T());
|
|
989
|
-
}),
|
|
1001
|
+
}), I(_, (e) => {
|
|
990
1002
|
a.value !== e && (a.value = e);
|
|
991
|
-
}),
|
|
1003
|
+
}), ut(window, "click", (t) => {
|
|
992
1004
|
if (!e.closeOnClickOutside || !_.value) return;
|
|
993
1005
|
let n = t.target;
|
|
994
1006
|
if (!(n instanceof Node)) return;
|
|
995
1007
|
let r = document.getElementById(h), i = document.getElementById(g);
|
|
996
1008
|
r && i && !r.contains(n) && !i.contains(n) && T();
|
|
997
|
-
}),
|
|
1009
|
+
}), ut(window, "keydown", (t) => {
|
|
998
1010
|
!e.closeOnEscape || !_.value || t.key === "Escape" && T();
|
|
999
|
-
}), (t, n) => (D(), l("div",
|
|
1011
|
+
}), (t, n) => (D(), l("div", gt, [p(W, {
|
|
1000
1012
|
ref: F(f),
|
|
1001
1013
|
label: "",
|
|
1002
1014
|
type: "button",
|
|
@@ -1009,7 +1021,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1009
1021
|
"aria-haspopup": "menu",
|
|
1010
1022
|
onClick: E
|
|
1011
1023
|
}, {
|
|
1012
|
-
icon:
|
|
1024
|
+
icon: L(() => [p(B, {
|
|
1013
1025
|
name: "three-dots",
|
|
1014
1026
|
class: "size-5",
|
|
1015
1027
|
decorative: !0
|
|
@@ -1025,7 +1037,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1025
1037
|
style: w(F(b)),
|
|
1026
1038
|
class: C(["z-50 min-w-40 overflow-hidden rounded-md border border-gray-200 bg-white shadow-lg divide-y-reverse divide-gray-200 divide-y", e.menuClass]),
|
|
1027
1039
|
role: "menu"
|
|
1028
|
-
}, [(D(!0), l(r, null, j(e.options, (t) => (D(), s(
|
|
1040
|
+
}, [(D(!0), l(r, null, j(e.options, (t) => (D(), s(W, {
|
|
1029
1041
|
key: t.value,
|
|
1030
1042
|
label: t.label,
|
|
1031
1043
|
type: "button",
|
|
@@ -1038,7 +1050,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1038
1050
|
onClick: (e) => te(t)
|
|
1039
1051
|
}, d({ _: 2 }, [t.icon && !t.loading ? {
|
|
1040
1052
|
name: "icon",
|
|
1041
|
-
fn:
|
|
1053
|
+
fn: L(() => [p(B, {
|
|
1042
1054
|
name: t.icon,
|
|
1043
1055
|
class: "size-4",
|
|
1044
1056
|
decorative: !0
|
|
@@ -1052,7 +1064,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1052
1064
|
"onClick"
|
|
1053
1065
|
]))), 128))], 6)) : c("", !0)]));
|
|
1054
1066
|
}
|
|
1055
|
-
}),
|
|
1067
|
+
}), vt = { class: "relative flex w-full items-start gap-3 overflow-hidden rounded-lg border border-dark/10 bg-light/95 px-4 py-3 shadow-lg backdrop-blur-sm" }, yt = { class: "shrink-0 pt-0.5" }, bt = { class: "min-w-0 flex-1" }, xt = { class: "mt-1 break-words text-sm leading-snug text-dark" }, St = /* @__PURE__ */ h({
|
|
1056
1068
|
__name: "HLToast",
|
|
1057
1069
|
props: {
|
|
1058
1070
|
type: {},
|
|
@@ -1093,30 +1105,30 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1093
1105
|
}, i = o(() => r[e.type]), a = o(() => e.title.trim().length > 0 ? e.title : e.type === "success" ? "Success" : e.type === "error" ? "Error" : e.type === "info" ? "Info" : "Warning"), s = () => {
|
|
1094
1106
|
n("close");
|
|
1095
1107
|
};
|
|
1096
|
-
return (t, n) => (D(), l("div",
|
|
1108
|
+
return (t, n) => (D(), l("div", vt, [
|
|
1097
1109
|
u("span", { class: C(["absolute inset-y-0 left-0 w-1", i.value.accentClass]) }, null, 2),
|
|
1098
|
-
u("div",
|
|
1110
|
+
u("div", yt, [p(B, {
|
|
1099
1111
|
name: i.value.iconName,
|
|
1100
1112
|
class: C(["size-6", i.value.iconClass]),
|
|
1101
1113
|
decorative: !0
|
|
1102
1114
|
}, null, 8, ["name", "class"])]),
|
|
1103
|
-
u("div",
|
|
1115
|
+
u("div", bt, [u("p", { class: C(["truncate text-sm font-semibold leading-tight", i.value.titleClass]) }, N(a.value), 3), u("p", xt, N(e.message), 1)]),
|
|
1104
1116
|
u("button", {
|
|
1105
1117
|
type: "button",
|
|
1106
1118
|
class: C(["inline-flex size-8 shrink-0 items-center justify-center rounded-full transition-colors", i.value.closeClass]),
|
|
1107
1119
|
"aria-label": "close notification",
|
|
1108
1120
|
onClick: s
|
|
1109
|
-
}, [p(
|
|
1121
|
+
}, [p(B, {
|
|
1110
1122
|
name: "x-mark",
|
|
1111
1123
|
class: "size-4",
|
|
1112
1124
|
decorative: !0
|
|
1113
1125
|
})], 2)
|
|
1114
1126
|
]));
|
|
1115
1127
|
}
|
|
1116
|
-
}),
|
|
1128
|
+
}), Ct = {
|
|
1117
1129
|
key: 0,
|
|
1118
1130
|
class: "pointer-events-none fixed inset-x-0 top-6 z-[9999] px-3 sm:px-0"
|
|
1119
|
-
},
|
|
1131
|
+
}, wt = { class: "mx-auto w-full max-w-xl" }, Tt = { class: "pointer-events-auto" }, Et = /* @__PURE__ */ h({
|
|
1120
1132
|
__name: "HLGlobalNotify",
|
|
1121
1133
|
setup(t) {
|
|
1122
1134
|
let { notification: n, hide: r } = e();
|
|
@@ -1128,7 +1140,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1128
1140
|
"leave-from-class": "translate-y-0 opacity-100",
|
|
1129
1141
|
"leave-to-class": "translate-y-2 opacity-0"
|
|
1130
1142
|
}, {
|
|
1131
|
-
default:
|
|
1143
|
+
default: L(() => [F(n).visible ? (D(), l("div", Ct, [u("div", wt, [u("div", Tt, [p(St, {
|
|
1132
1144
|
type: F(n).type,
|
|
1133
1145
|
title: F(n).title,
|
|
1134
1146
|
message: F(n).message,
|
|
@@ -1142,25 +1154,25 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1142
1154
|
_: 1
|
|
1143
1155
|
})]));
|
|
1144
1156
|
}
|
|
1145
|
-
}),
|
|
1157
|
+
}), Dt = {
|
|
1146
1158
|
autoMount: !0,
|
|
1147
1159
|
mountId: "hl-notify-host",
|
|
1148
1160
|
componentName: "HLGlobalNotify"
|
|
1149
|
-
},
|
|
1150
|
-
if (!kt() ||
|
|
1161
|
+
}, J = null, Ot = !1, kt = () => typeof window < "u" && typeof document < "u", At = (e, t) => {
|
|
1162
|
+
if (!kt() || J !== null) return;
|
|
1151
1163
|
let n = document.getElementById(t.mountId), r = n ?? document.createElement("div");
|
|
1152
1164
|
n === null ? (r.id = t.mountId, document.body.appendChild(r), Ot = !0) : Ot = !1;
|
|
1153
|
-
let i = p(
|
|
1154
|
-
i.appContext = e._context, A(i, r),
|
|
1165
|
+
let i = p(Et);
|
|
1166
|
+
i.appContext = e._context, A(i, r), J = r;
|
|
1155
1167
|
}, jt = () => {
|
|
1156
|
-
|
|
1168
|
+
J !== null && (A(null, J), Ot && J.parentNode !== null && J.parentNode.removeChild(J), J = null, Ot = !1);
|
|
1157
1169
|
}, Mt = (e = {}) => {
|
|
1158
1170
|
let t = {
|
|
1159
|
-
...
|
|
1171
|
+
...Dt,
|
|
1160
1172
|
...e
|
|
1161
1173
|
};
|
|
1162
1174
|
return { install(e) {
|
|
1163
|
-
e.component(t.componentName,
|
|
1175
|
+
e.component(t.componentName, Et), t.autoMount && At(e, t);
|
|
1164
1176
|
} };
|
|
1165
1177
|
}, Nt = {
|
|
1166
1178
|
key: 0,
|
|
@@ -1203,14 +1215,14 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1203
1215
|
function d() {
|
|
1204
1216
|
typeof document > "u" || n <= 0 || (--n, n === 0 && (document.body.style.overflow = r ?? "", r = null));
|
|
1205
1217
|
}
|
|
1206
|
-
let m =
|
|
1218
|
+
let m = oe(e, "modelValue"), h = t, g = () => {
|
|
1207
1219
|
!e.closeOnBackdrop || e.isLoading || (m.value = !1, h("close"));
|
|
1208
1220
|
}, _ = () => {
|
|
1209
1221
|
e.isLoading || (m.value = !1, h("close"));
|
|
1210
1222
|
}, v = () => {
|
|
1211
1223
|
e.isLoading || h("confirm");
|
|
1212
1224
|
};
|
|
1213
|
-
return
|
|
1225
|
+
return I(m, (e) => {
|
|
1214
1226
|
if (e) {
|
|
1215
1227
|
o();
|
|
1216
1228
|
return;
|
|
@@ -1226,7 +1238,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1226
1238
|
"leave-from-class": "opacity-100",
|
|
1227
1239
|
"leave-to-class": "opacity-0"
|
|
1228
1240
|
}, {
|
|
1229
|
-
default:
|
|
1241
|
+
default: L(() => [m.value ? (D(), l("div", Nt, [u("div", {
|
|
1230
1242
|
class: C(["absolute inset-0", e.backdropClass]),
|
|
1231
1243
|
onClick: g
|
|
1232
1244
|
}, null, 2), p(a, {
|
|
@@ -1237,7 +1249,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1237
1249
|
"leave-from-class": "scale-100 opacity-100",
|
|
1238
1250
|
"leave-to-class": "scale-95 opacity-0"
|
|
1239
1251
|
}, {
|
|
1240
|
-
default:
|
|
1252
|
+
default: L(() => [m.value ? (D(), l("div", {
|
|
1241
1253
|
key: 0,
|
|
1242
1254
|
class: C(["relative z-10 flex w-full items-start justify-center px-4 pointer-events-none", e.containerClass])
|
|
1243
1255
|
}, [u("div", Pt, [e.type === "confirm" ? (D(), l("div", Ft, [
|
|
@@ -1251,7 +1263,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1251
1263
|
class: "flex cursor-pointer items-center gap-2 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-primary/90 disabled:cursor-not-allowed disabled:opacity-70",
|
|
1252
1264
|
disabled: e.isLoading,
|
|
1253
1265
|
onClick: v
|
|
1254
|
-
}, [e.isLoading ? (D(), s(
|
|
1266
|
+
}, [e.isLoading ? (D(), s(B, {
|
|
1255
1267
|
key: 0,
|
|
1256
1268
|
name: "spinner",
|
|
1257
1269
|
class: "size-4 animate-spin"
|
|
@@ -1401,12 +1413,17 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1401
1413
|
"close"
|
|
1402
1414
|
], ["update:modelValue"]),
|
|
1403
1415
|
setup(e, { expose: n, emit: a }) {
|
|
1404
|
-
let d =
|
|
1405
|
-
xs: "
|
|
1406
|
-
sm: "
|
|
1407
|
-
md: "
|
|
1408
|
-
lg: "
|
|
1409
|
-
},
|
|
1416
|
+
let d = oe(e, "modelValue"), f = a, m = k(null), h = k(null), g = k(null), _ = k(null), v = k(""), y = k([]), b = k(0), x = k(-1), { ACTION_REF: E, FLOATING_REF: te, isVisible: O, hide: A, show: M, toggle: ne, floatingStyles: re, updatePosition: ie } = t({ placement: "bottom-start" }), P = ae(), se = o(() => e.id || P), ce = o(() => `${se.value}-listbox`), le = o(() => `${se.value}-label`), ue = {
|
|
1417
|
+
xs: "var(--hanap-labs-size-xs, 24px)",
|
|
1418
|
+
sm: "var(--hanap-labs-size-sm, 36px)",
|
|
1419
|
+
md: "var(--hanap-labs-size-md, 42px)",
|
|
1420
|
+
lg: "var(--hanap-labs-size-lg, 48px)"
|
|
1421
|
+
}, de = {
|
|
1422
|
+
xs: "px-2 text-xs",
|
|
1423
|
+
sm: "px-2.5 text-xs",
|
|
1424
|
+
md: "px-3 text-sm",
|
|
1425
|
+
lg: "px-4 text-sm"
|
|
1426
|
+
}, L = {
|
|
1410
1427
|
primary: "border-primary focus:border-primary",
|
|
1411
1428
|
secondary: "border-secondary focus:border-secondary",
|
|
1412
1429
|
tertiary: "border-tertiary focus:border-tertiary",
|
|
@@ -1417,7 +1434,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1417
1434
|
light: "border-muted focus:border-secondary",
|
|
1418
1435
|
dark: "border-dark focus:border-dark",
|
|
1419
1436
|
muted: "border-muted focus:border-muted"
|
|
1420
|
-
},
|
|
1437
|
+
}, fe = {
|
|
1421
1438
|
primary: "text-primary",
|
|
1422
1439
|
secondary: "text-secondary",
|
|
1423
1440
|
tertiary: "text-tertiary",
|
|
@@ -1428,7 +1445,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1428
1445
|
light: "text-dark",
|
|
1429
1446
|
dark: "text-dark",
|
|
1430
1447
|
muted: "text-muted"
|
|
1431
|
-
},
|
|
1448
|
+
}, me = {
|
|
1432
1449
|
primary: "bg-primary border-primary text-white",
|
|
1433
1450
|
secondary: "bg-secondary border-secondary text-white",
|
|
1434
1451
|
tertiary: "bg-tertiary border-tertiary text-dark",
|
|
@@ -1439,32 +1456,32 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1439
1456
|
light: "bg-light border-light text-dark",
|
|
1440
1457
|
dark: "bg-dark border-dark text-white",
|
|
1441
1458
|
muted: "bg-muted border-muted text-white"
|
|
1442
|
-
},
|
|
1443
|
-
primary: "--
|
|
1444
|
-
secondary: "--
|
|
1445
|
-
tertiary: "--
|
|
1446
|
-
success: "--
|
|
1447
|
-
danger: "--
|
|
1448
|
-
warning: "--
|
|
1449
|
-
info: "--
|
|
1450
|
-
light: "--
|
|
1451
|
-
dark: "--
|
|
1452
|
-
muted: "--
|
|
1459
|
+
}, he = {
|
|
1460
|
+
primary: "--hanap-labs-primary",
|
|
1461
|
+
secondary: "--hanap-labs-muted",
|
|
1462
|
+
tertiary: "--hanap-labs-tertiary",
|
|
1463
|
+
success: "--hanap-labs-success",
|
|
1464
|
+
danger: "--hanap-labs-danger",
|
|
1465
|
+
warning: "--hanap-labs-warning",
|
|
1466
|
+
info: "--hanap-labs-info",
|
|
1467
|
+
light: "--hanap-labs-muted",
|
|
1468
|
+
dark: "--hanap-labs-dark",
|
|
1469
|
+
muted: "--hanap-labs-muted"
|
|
1453
1470
|
};
|
|
1454
|
-
function
|
|
1455
|
-
return typeof e == "string" && Object.prototype.hasOwnProperty.call(
|
|
1471
|
+
function R(e) {
|
|
1472
|
+
return typeof e == "string" && Object.prototype.hasOwnProperty.call(L, e);
|
|
1456
1473
|
}
|
|
1457
|
-
function
|
|
1474
|
+
function ge(e) {
|
|
1458
1475
|
return e instanceof HTMLElement ? e : e && "$el" in e && e.$el instanceof HTMLElement ? e.$el : null;
|
|
1459
1476
|
}
|
|
1460
|
-
function
|
|
1461
|
-
h.value =
|
|
1477
|
+
function _e(e) {
|
|
1478
|
+
h.value = ge(e), E(e);
|
|
1462
1479
|
}
|
|
1463
|
-
function
|
|
1464
|
-
g.value =
|
|
1480
|
+
function ve(e) {
|
|
1481
|
+
g.value = ge(e), te(e);
|
|
1465
1482
|
}
|
|
1466
|
-
function
|
|
1467
|
-
let t =
|
|
1483
|
+
function ye(e) {
|
|
1484
|
+
let t = ge(e);
|
|
1468
1485
|
if (!t) {
|
|
1469
1486
|
_.value = null;
|
|
1470
1487
|
return;
|
|
@@ -1475,166 +1492,166 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1475
1492
|
}
|
|
1476
1493
|
_.value = t.querySelector("input");
|
|
1477
1494
|
}
|
|
1478
|
-
function
|
|
1495
|
+
function z(e) {
|
|
1479
1496
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
1480
1497
|
}
|
|
1481
|
-
function
|
|
1498
|
+
function be(e, t) {
|
|
1482
1499
|
if (e === t) return !0;
|
|
1483
|
-
if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length ? e.every((e, n) =>
|
|
1484
|
-
if (
|
|
1500
|
+
if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length ? e.every((e, n) => be(e, t[n])) : !1;
|
|
1501
|
+
if (z(e) && z(t)) {
|
|
1485
1502
|
let n = Object.keys(e), r = Object.keys(t);
|
|
1486
|
-
return n.length === r.length ? n.every((n) =>
|
|
1503
|
+
return n.length === r.length ? n.every((n) => be(e[n], t[n])) : !1;
|
|
1487
1504
|
}
|
|
1488
1505
|
return !1;
|
|
1489
1506
|
}
|
|
1490
|
-
function
|
|
1507
|
+
function xe(e, t) {
|
|
1491
1508
|
return Object.keys(t).every((n) => {
|
|
1492
1509
|
if (!(n in e)) return !1;
|
|
1493
1510
|
let r = e[n], i = t[n];
|
|
1494
|
-
return
|
|
1511
|
+
return z(r) && z(i) ? xe(r, i) : be(r, i);
|
|
1495
1512
|
});
|
|
1496
1513
|
}
|
|
1497
|
-
function
|
|
1498
|
-
return
|
|
1514
|
+
function V(e, t) {
|
|
1515
|
+
return be(e, t) ? !0 : z(e) && z(t) ? xe(t, e) : !1;
|
|
1499
1516
|
}
|
|
1500
|
-
function
|
|
1501
|
-
return Array.isArray(e) ? `[${e.map((e) =>
|
|
1517
|
+
function Se(e) {
|
|
1518
|
+
return Array.isArray(e) ? `[${e.map((e) => Se(e)).join(",")}]` : z(e) ? `{${Object.keys(e).sort().map((t) => `${t}:${Se(e[t])}`).join(",")}}` : String(e);
|
|
1502
1519
|
}
|
|
1503
|
-
function
|
|
1504
|
-
return `${e.label}-${
|
|
1520
|
+
function Ce(e, t) {
|
|
1521
|
+
return `${e.label}-${Se(e.value)}-${t}`;
|
|
1505
1522
|
}
|
|
1506
|
-
function
|
|
1507
|
-
return `${
|
|
1523
|
+
function we(e) {
|
|
1524
|
+
return `${ce.value}-option-${e}`;
|
|
1508
1525
|
}
|
|
1509
|
-
let
|
|
1526
|
+
let Te = o(() => {
|
|
1510
1527
|
let t = /* @__PURE__ */ new Map();
|
|
1511
|
-
for (let n of [...e.options, ...y.value]) t.set(
|
|
1528
|
+
for (let n of [...e.options, ...y.value]) t.set(Se(n.value), n);
|
|
1512
1529
|
return Array.from(t.values());
|
|
1513
|
-
}),
|
|
1530
|
+
}), Ee = o(() => e.multiple ? Array.isArray(d.value) ? d.value : [] : d.value === null ? [] : [d.value]), H = o(() => Te.value.filter((e) => Ee.value.some((t) => V(e.value, t)))), De = o(() => Number.isFinite(e.maxVisiblePills) ? Math.max(0, Math.floor(e.maxVisiblePills)) : 1), Oe = o(() => e.multiple ? H.value.slice(0, De.value) : []), ke = o(() => e.multiple ? Math.max(0, H.value.length - Oe.value.length) : 0), Ae = o(() => Ee.value.length > 0), je = o(() => !!e.error || e.errors.length > 0), Me = o(() => e.multiple ? H.value.length === 0 ? e.placeholder : H.value.length === 1 ? H.value[0].label : `${H.value.length} selected` : H.value[0]?.label ?? e.placeholder), Ne = o(() => de[e.size]), Pe = o(() => ({ height: ue[e.size] })), Fe = o(() => {
|
|
1514
1531
|
let e = v.value.trim().toLowerCase();
|
|
1515
|
-
return e ?
|
|
1516
|
-
}),
|
|
1517
|
-
if (!e.multiple) return
|
|
1532
|
+
return e ? Te.value.filter((t) => t.label.toLowerCase().includes(e)) : Te.value;
|
|
1533
|
+
}), U = o(() => {
|
|
1534
|
+
if (!e.multiple) return Fe.value;
|
|
1518
1535
|
let t = [], n = [];
|
|
1519
|
-
for (let e of
|
|
1536
|
+
for (let e of Fe.value) G(e) ? t.push(e) : n.push(e);
|
|
1520
1537
|
return [...t, ...n];
|
|
1521
|
-
}),
|
|
1538
|
+
}), W = o(() => {
|
|
1522
1539
|
if (!e.multiple) return -1;
|
|
1523
|
-
let t =
|
|
1524
|
-
return t > 0 && t <
|
|
1525
|
-
}),
|
|
1540
|
+
let t = U.value.filter((e) => G(e)).length;
|
|
1541
|
+
return t > 0 && t < U.value.length ? t : -1;
|
|
1542
|
+
}), Ie = o(() => ({
|
|
1526
1543
|
...re.value,
|
|
1527
1544
|
width: b.value > 0 ? `${b.value}px` : void 0,
|
|
1528
1545
|
maxHeight: `${e.maxMenuHeight}px`,
|
|
1529
1546
|
zIndex: 60
|
|
1530
|
-
})),
|
|
1547
|
+
})), Le = o(() => {
|
|
1531
1548
|
let t = v.value.trim();
|
|
1532
|
-
return !e.allowCreateWhenNoMatch || !t ||
|
|
1533
|
-
}),
|
|
1534
|
-
if (!(x.value < 0) && !(x.value >=
|
|
1535
|
-
}),
|
|
1536
|
-
if (!
|
|
1549
|
+
return !e.allowCreateWhenNoMatch || !t || Fe.value.length > 0 ? !1 : !Te.value.some((e) => e.label.toLowerCase() === t.toLowerCase());
|
|
1550
|
+
}), Re = o(() => {
|
|
1551
|
+
if (!(x.value < 0) && !(x.value >= U.value.length)) return we(x.value);
|
|
1552
|
+
}), ze = o(() => R(e.color) ? L[e.color] : "border-gray-200 focus:border-gray-200"), Ve = o(() => R(e.color) ? fe[e.color] : "text-dark"), He = o(() => R(e.color) ? me[e.color] : "border-dark bg-dark text-white"), Ue = o(() => R(e.color) ? me[e.color] : "border-light bg-light text-dark"), We = o(() => {
|
|
1553
|
+
if (!R(e.color)) return {
|
|
1537
1554
|
"--hl-select-option-hover-bg": "#f9fafb",
|
|
1538
1555
|
"--hl-select-option-highlight-bg": "#f3f4f6"
|
|
1539
1556
|
};
|
|
1540
|
-
let t =
|
|
1557
|
+
let t = he[e.color];
|
|
1541
1558
|
return {
|
|
1542
1559
|
"--hl-select-option-hover-bg": `color-mix(in srgb, var(${t}) 10%, white)`,
|
|
1543
1560
|
"--hl-select-option-highlight-bg": `color-mix(in srgb, var(${t}) 16%, white)`
|
|
1544
1561
|
};
|
|
1545
1562
|
});
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1563
|
+
function G(e) {
|
|
1564
|
+
return Ee.value.some((t) => V(e.value, t));
|
|
1548
1565
|
}
|
|
1549
|
-
function
|
|
1566
|
+
function Ge(e) {
|
|
1550
1567
|
d.value = e, f("change", e);
|
|
1551
1568
|
}
|
|
1552
|
-
function
|
|
1569
|
+
function Ke() {
|
|
1553
1570
|
let e = [];
|
|
1554
|
-
return
|
|
1571
|
+
return U.value.forEach((t, n) => {
|
|
1555
1572
|
t.disabled || e.push(n);
|
|
1556
1573
|
}), e;
|
|
1557
1574
|
}
|
|
1558
|
-
function
|
|
1575
|
+
function qe() {
|
|
1559
1576
|
if (!g.value || x.value < 0) return;
|
|
1560
1577
|
let e = `[data-option-index="${x.value}"]`, t = g.value.querySelector(e);
|
|
1561
1578
|
t instanceof HTMLElement && t.scrollIntoView({ block: "nearest" });
|
|
1562
1579
|
}
|
|
1563
|
-
function
|
|
1580
|
+
function K(e) {
|
|
1564
1581
|
x.value = e, S(() => {
|
|
1565
|
-
|
|
1582
|
+
qe();
|
|
1566
1583
|
});
|
|
1567
1584
|
}
|
|
1568
|
-
function
|
|
1569
|
-
let e =
|
|
1585
|
+
function Je() {
|
|
1586
|
+
let e = Ke();
|
|
1570
1587
|
if (e.length === 0) {
|
|
1571
|
-
|
|
1588
|
+
K(-1);
|
|
1572
1589
|
return;
|
|
1573
1590
|
}
|
|
1574
|
-
let t =
|
|
1575
|
-
|
|
1591
|
+
let t = U.value.findIndex((e) => !e.disabled && G(e));
|
|
1592
|
+
K(t >= 0 ? t : e[0]);
|
|
1576
1593
|
}
|
|
1577
|
-
function
|
|
1578
|
-
let t =
|
|
1594
|
+
function Ye(e) {
|
|
1595
|
+
let t = Ke();
|
|
1579
1596
|
if (t.length === 0) {
|
|
1580
|
-
|
|
1597
|
+
K(-1);
|
|
1581
1598
|
return;
|
|
1582
1599
|
}
|
|
1583
1600
|
if (x.value < 0) {
|
|
1584
|
-
|
|
1601
|
+
K(e === 1 ? t[0] : t[t.length - 1]);
|
|
1585
1602
|
return;
|
|
1586
1603
|
}
|
|
1587
1604
|
let n = t.indexOf(x.value);
|
|
1588
1605
|
if (n < 0) {
|
|
1589
|
-
|
|
1606
|
+
K(e === 1 ? t[0] : t[t.length - 1]);
|
|
1590
1607
|
return;
|
|
1591
1608
|
}
|
|
1592
|
-
|
|
1609
|
+
K(t[(n + e + t.length) % t.length]);
|
|
1593
1610
|
}
|
|
1594
|
-
function
|
|
1611
|
+
function Xe() {
|
|
1595
1612
|
if (x.value < 0) return;
|
|
1596
|
-
let e =
|
|
1597
|
-
!e || e.disabled ||
|
|
1613
|
+
let e = U.value[x.value];
|
|
1614
|
+
!e || e.disabled || Ze(e);
|
|
1598
1615
|
}
|
|
1599
|
-
function
|
|
1616
|
+
function Ze(t) {
|
|
1600
1617
|
if (!(t.disabled || e.disabled)) {
|
|
1601
1618
|
if (e.multiple) {
|
|
1602
1619
|
let e = Array.isArray(d.value) ? [...d.value] : [];
|
|
1603
|
-
|
|
1620
|
+
Ge(e.some((e) => V(t.value, e)) ? e.filter((e) => !V(t.value, e)) : [...e, t.value]);
|
|
1604
1621
|
return;
|
|
1605
1622
|
}
|
|
1606
|
-
|
|
1623
|
+
Ge(t.value), A();
|
|
1607
1624
|
}
|
|
1608
1625
|
}
|
|
1609
|
-
function
|
|
1610
|
-
|
|
1626
|
+
function Qe() {
|
|
1627
|
+
Ge(e.multiple ? [] : null), v.value = "", A();
|
|
1611
1628
|
}
|
|
1612
|
-
function
|
|
1629
|
+
function $e(e) {
|
|
1613
1630
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
1614
1631
|
}
|
|
1615
|
-
function
|
|
1632
|
+
function tt() {
|
|
1616
1633
|
let t = v.value.trim();
|
|
1617
|
-
if (!t || !
|
|
1634
|
+
if (!t || !Le.value) return;
|
|
1618
1635
|
let n = {
|
|
1619
1636
|
label: t,
|
|
1620
|
-
value:
|
|
1637
|
+
value: $e(t) || t.toLowerCase()
|
|
1621
1638
|
}, r = {
|
|
1622
1639
|
label: t,
|
|
1623
1640
|
value: n
|
|
1624
1641
|
};
|
|
1625
1642
|
if (y.value = [...y.value, r], f("create", n), e.multiple) {
|
|
1626
|
-
|
|
1643
|
+
Ge([...Array.isArray(d.value) ? [...d.value] : [], n]), v.value = "";
|
|
1627
1644
|
return;
|
|
1628
1645
|
}
|
|
1629
|
-
|
|
1646
|
+
Ge(n), v.value = "", A();
|
|
1630
1647
|
}
|
|
1631
|
-
function
|
|
1648
|
+
function q() {
|
|
1632
1649
|
b.value = h.value?.offsetWidth ?? 0;
|
|
1633
1650
|
}
|
|
1634
|
-
function
|
|
1651
|
+
function nt() {
|
|
1635
1652
|
e.disabled || ne();
|
|
1636
1653
|
}
|
|
1637
|
-
function
|
|
1654
|
+
function rt(t) {
|
|
1638
1655
|
if (!e.disabled) {
|
|
1639
1656
|
if (t.key === "Escape") {
|
|
1640
1657
|
A();
|
|
@@ -1645,7 +1662,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1645
1662
|
M();
|
|
1646
1663
|
return;
|
|
1647
1664
|
}
|
|
1648
|
-
|
|
1665
|
+
Ye(1);
|
|
1649
1666
|
return;
|
|
1650
1667
|
}
|
|
1651
1668
|
if (t.key === "ArrowUp") {
|
|
@@ -1653,75 +1670,75 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1653
1670
|
M();
|
|
1654
1671
|
return;
|
|
1655
1672
|
}
|
|
1656
|
-
|
|
1673
|
+
Ye(-1);
|
|
1657
1674
|
return;
|
|
1658
1675
|
}
|
|
1659
1676
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), ne());
|
|
1660
1677
|
}
|
|
1661
1678
|
}
|
|
1662
|
-
function
|
|
1679
|
+
function it(e) {
|
|
1663
1680
|
if (e.key === "ArrowDown") {
|
|
1664
|
-
e.preventDefault(),
|
|
1681
|
+
e.preventDefault(), Ye(1);
|
|
1665
1682
|
return;
|
|
1666
1683
|
}
|
|
1667
1684
|
if (e.key === "ArrowUp") {
|
|
1668
|
-
e.preventDefault(),
|
|
1685
|
+
e.preventDefault(), Ye(-1);
|
|
1669
1686
|
return;
|
|
1670
1687
|
}
|
|
1671
1688
|
if (e.key === "Enter") {
|
|
1672
1689
|
if (e.preventDefault(), x.value >= 0) {
|
|
1673
|
-
|
|
1690
|
+
Xe();
|
|
1674
1691
|
return;
|
|
1675
1692
|
}
|
|
1676
|
-
|
|
1693
|
+
Le.value && tt();
|
|
1677
1694
|
return;
|
|
1678
1695
|
}
|
|
1679
1696
|
e.key === "Escape" && (e.preventDefault(), A());
|
|
1680
1697
|
}
|
|
1681
|
-
function
|
|
1698
|
+
function at(e) {
|
|
1682
1699
|
if (!O.value) return;
|
|
1683
1700
|
let t = e.target;
|
|
1684
|
-
t instanceof Node && (g.value?.contains(t) ?? !1) &&
|
|
1701
|
+
t instanceof Node && (g.value?.contains(t) ?? !1) && it(e);
|
|
1685
1702
|
}
|
|
1686
|
-
function
|
|
1687
|
-
|
|
1703
|
+
function ot(e) {
|
|
1704
|
+
U.value[e]?.disabled || K(e);
|
|
1688
1705
|
}
|
|
1689
|
-
function
|
|
1706
|
+
function st(e) {
|
|
1690
1707
|
let t = e.target, n = m.value?.contains(t) ?? !1, r = g.value?.contains(t) ?? !1;
|
|
1691
1708
|
!n && !r && A();
|
|
1692
1709
|
}
|
|
1693
|
-
return n({ clearSelection:
|
|
1710
|
+
return n({ clearSelection: Qe }), I(() => e.disabled, (e) => {
|
|
1694
1711
|
e && A();
|
|
1695
|
-
}),
|
|
1712
|
+
}), I(O, async (e) => {
|
|
1696
1713
|
if (e) {
|
|
1697
|
-
f("open"), await S(),
|
|
1714
|
+
f("open"), await S(), q(), await ie(), Je(), _.value?.focus({ preventScroll: !0 });
|
|
1698
1715
|
return;
|
|
1699
1716
|
}
|
|
1700
1717
|
f("close"), v.value = "", x.value = -1;
|
|
1701
|
-
}),
|
|
1718
|
+
}), I(U, () => {
|
|
1702
1719
|
if (O.value) {
|
|
1703
|
-
if (x.value < 0 || x.value >=
|
|
1704
|
-
|
|
1720
|
+
if (x.value < 0 || x.value >= U.value.length || U.value[x.value]?.disabled) {
|
|
1721
|
+
Je();
|
|
1705
1722
|
return;
|
|
1706
1723
|
}
|
|
1707
1724
|
S(() => {
|
|
1708
|
-
|
|
1725
|
+
qe();
|
|
1709
1726
|
});
|
|
1710
1727
|
}
|
|
1711
1728
|
}), T(() => {
|
|
1712
|
-
|
|
1729
|
+
q(), window.addEventListener("resize", q), document.addEventListener("pointerdown", st), document.addEventListener("keydown", at, !0);
|
|
1713
1730
|
}), ee(() => {
|
|
1714
|
-
window.removeEventListener("resize",
|
|
1731
|
+
window.removeEventListener("resize", q), document.removeEventListener("pointerdown", st), document.removeEventListener("keydown", at, !0);
|
|
1715
1732
|
}), (t, n) => (D(), l("div", {
|
|
1716
1733
|
ref_key: "rootRef",
|
|
1717
1734
|
ref: m,
|
|
1718
|
-
class: "w-full
|
|
1735
|
+
class: "w-full hanap-labs-font"
|
|
1719
1736
|
}, [
|
|
1720
|
-
e.label || e.description ? (D(), s(
|
|
1737
|
+
e.label || e.description ? (D(), s(Be, {
|
|
1721
1738
|
key: 0,
|
|
1722
1739
|
label: e.label,
|
|
1723
1740
|
description: e.description,
|
|
1724
|
-
"label-id": e.label ?
|
|
1741
|
+
"label-id": e.label ? le.value : "",
|
|
1725
1742
|
required: e.required,
|
|
1726
1743
|
"label-class": e.labelClass
|
|
1727
1744
|
}, null, 8, [
|
|
@@ -1733,59 +1750,60 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1733
1750
|
])) : c("", !0),
|
|
1734
1751
|
u("div", Xt, [
|
|
1735
1752
|
u("button", {
|
|
1736
|
-
id:
|
|
1737
|
-
ref:
|
|
1753
|
+
id: se.value,
|
|
1754
|
+
ref: _e,
|
|
1738
1755
|
type: "button",
|
|
1756
|
+
style: w(Pe.value),
|
|
1739
1757
|
class: C(["flex w-full items-center gap-2 border border-solid bg-transparent text-left leading-tight transition-colors duration-150 hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60 rounded-md cursor-pointer", [
|
|
1740
|
-
|
|
1758
|
+
Ne.value,
|
|
1741
1759
|
e.inputClass,
|
|
1742
|
-
|
|
1760
|
+
je.value ? "border-danger focus:border-danger" : ze.value,
|
|
1743
1761
|
{
|
|
1744
|
-
"text-dark":
|
|
1745
|
-
"text-muted": !
|
|
1746
|
-
"pr-10":
|
|
1747
|
-
"pr-8": !
|
|
1762
|
+
"text-dark": Ae.value,
|
|
1763
|
+
"text-muted": !Ae.value,
|
|
1764
|
+
"pr-10": Ae.value,
|
|
1765
|
+
"pr-8": !Ae.value,
|
|
1748
1766
|
"border-0 focus:border-0": e.noBorder
|
|
1749
1767
|
}
|
|
1750
1768
|
]]),
|
|
1751
1769
|
disabled: e.disabled,
|
|
1752
1770
|
"aria-expanded": F(O),
|
|
1753
|
-
"aria-controls":
|
|
1754
|
-
"aria-labelledby": e.label ?
|
|
1771
|
+
"aria-controls": ce.value,
|
|
1772
|
+
"aria-labelledby": e.label ? le.value : void 0,
|
|
1755
1773
|
"aria-haspopup": "listbox",
|
|
1756
|
-
onClick:
|
|
1757
|
-
onKeydown:
|
|
1758
|
-
}, [e.multiple &&
|
|
1759
|
-
key:
|
|
1760
|
-
class: C(["inline-flex max-w-[110px] truncate rounded border border-solid px-1.5 py-0.5 text-xs",
|
|
1761
|
-
}, N(e.label), 3))), 128)),
|
|
1762
|
-
|
|
1774
|
+
onClick: nt,
|
|
1775
|
+
onKeydown: rt
|
|
1776
|
+
}, [e.multiple && H.value.length > 0 ? (D(), l("span", Qt, [(D(!0), l(r, null, j(Oe.value, (e, t) => (D(), l("span", {
|
|
1777
|
+
key: Ce(e, t),
|
|
1778
|
+
class: C(["inline-flex max-w-[110px] truncate rounded border border-solid px-1.5 py-0.5 text-xs", Ue.value])
|
|
1779
|
+
}, N(e.label), 3))), 128)), ke.value > 0 ? (D(), l("span", $t, " +" + N(ke.value) + " more ", 1)) : c("", !0)])) : (D(), l("span", en, N(Me.value), 1))], 46, Zt),
|
|
1780
|
+
Ae.value && !e.disabled ? (D(), l("button", {
|
|
1763
1781
|
key: 0,
|
|
1764
1782
|
type: "button",
|
|
1765
1783
|
class: "absolute inset-y-0 right-6 my-auto px-1 text-muted hover:text-dark appearance-none border-0 bg-transparent hl-no-focus-ring cursor-pointer",
|
|
1766
1784
|
"aria-label": "Clear selection",
|
|
1767
|
-
onClick:
|
|
1768
|
-
}, [p(
|
|
1785
|
+
onClick: pe(Qe, ["stop"])
|
|
1786
|
+
}, [p(B, {
|
|
1769
1787
|
name: "x-mark",
|
|
1770
1788
|
size: 14,
|
|
1771
1789
|
decorative: !0
|
|
1772
1790
|
})])) : c("", !0),
|
|
1773
|
-
u("span", { class: C(["pointer-events-none absolute inset-y-0 right-2 my-auto flex items-center text-muted transition-transform duration-150", { "rotate-180": F(O) }]) }, [p(
|
|
1791
|
+
u("span", { class: C(["pointer-events-none absolute inset-y-0 right-2 my-auto flex items-center text-muted transition-transform duration-150", { "rotate-180": F(O) }]) }, [p(B, {
|
|
1774
1792
|
name: "chevron-up-down",
|
|
1775
1793
|
size: 20,
|
|
1776
1794
|
decorative: !0
|
|
1777
1795
|
})], 2),
|
|
1778
1796
|
(D(), s(i, { to: "body" }, [F(O) ? (D(), l("div", {
|
|
1779
1797
|
key: 0,
|
|
1780
|
-
ref:
|
|
1798
|
+
ref: ve,
|
|
1781
1799
|
class: "overflow-hidden rounded-md bg-white border border-gray-200 border-solid shadow-none",
|
|
1782
|
-
style: w(
|
|
1783
|
-
id:
|
|
1800
|
+
style: w(Ie.value),
|
|
1801
|
+
id: ce.value,
|
|
1784
1802
|
role: "listbox",
|
|
1785
|
-
"aria-labelledby":
|
|
1786
|
-
"aria-activedescendant":
|
|
1787
|
-
}, [u("div", nn, [p(
|
|
1788
|
-
ref:
|
|
1803
|
+
"aria-labelledby": se.value,
|
|
1804
|
+
"aria-activedescendant": Re.value
|
|
1805
|
+
}, [u("div", nn, [p(et, {
|
|
1806
|
+
ref: ye,
|
|
1789
1807
|
modelValue: v.value,
|
|
1790
1808
|
"onUpdate:modelValue": n[0] ||= (e) => v.value = e,
|
|
1791
1809
|
type: "search",
|
|
@@ -1794,53 +1812,53 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1794
1812
|
}, null, 8, ["modelValue", "disabled"])]), u("div", {
|
|
1795
1813
|
class: "overflow-y-auto py-1",
|
|
1796
1814
|
style: w({ maxHeight: `${e.maxMenuHeight}px` })
|
|
1797
|
-
}, [
|
|
1815
|
+
}, [U.value.length > 0 ? (D(!0), l(r, { key: 0 }, j(U.value, (t, n) => (D(), l(r, { key: Ce(t, n) }, [W.value >= 0 && n === W.value ? (D(), l("div", rn)) : c("", !0), u("button", {
|
|
1798
1816
|
type: "button",
|
|
1799
|
-
id:
|
|
1817
|
+
id: we(n),
|
|
1800
1818
|
"data-option-index": n,
|
|
1801
1819
|
class: C(["flex w-full items-center justify-between gap-2 px-3 py-2 text-left text-sm transition-colors appearance-none border-0 bg-white hl-no-focus-ring", [
|
|
1802
1820
|
e.optionClass,
|
|
1803
1821
|
{
|
|
1804
1822
|
"cursor-not-allowed text-muted": t.disabled,
|
|
1805
1823
|
"cursor-pointer": !t.disabled,
|
|
1806
|
-
"text-dark": !t.disabled && !
|
|
1807
|
-
"font-medium":
|
|
1824
|
+
"text-dark": !t.disabled && !G(t),
|
|
1825
|
+
"font-medium": G(t),
|
|
1808
1826
|
"hover:bg-[var(--hl-select-option-hover-bg)]": !t.disabled
|
|
1809
1827
|
},
|
|
1810
|
-
!t.disabled &&
|
|
1828
|
+
!t.disabled && G(t) ? Ve.value : ""
|
|
1811
1829
|
]]),
|
|
1812
|
-
style: w([
|
|
1813
|
-
"aria-selected":
|
|
1830
|
+
style: w([We.value, !t.disabled && x.value === n ? { backgroundColor: "var(--hl-select-option-highlight-bg)" } : void 0]),
|
|
1831
|
+
"aria-selected": G(t),
|
|
1814
1832
|
disabled: t.disabled,
|
|
1815
|
-
onMouseenter: (e) =>
|
|
1816
|
-
onClick: (e) =>
|
|
1833
|
+
onMouseenter: (e) => ot(n),
|
|
1834
|
+
onClick: (e) => Ze(t)
|
|
1817
1835
|
}, [u("span", on, [e.multiple ? (D(), l("span", {
|
|
1818
1836
|
key: 0,
|
|
1819
|
-
class: C(["inline-flex size-4 items-center justify-center rounded border border-solid text-[10px]",
|
|
1820
|
-
}, [
|
|
1837
|
+
class: C(["inline-flex size-4 items-center justify-center rounded border border-solid text-[10px]", G(t) ? He.value : "border-gray-300"])
|
|
1838
|
+
}, [G(t) ? (D(), s(B, {
|
|
1821
1839
|
key: 0,
|
|
1822
1840
|
name: "check",
|
|
1823
1841
|
size: 10,
|
|
1824
1842
|
decorative: !0
|
|
1825
|
-
})) : c("", !0)], 2)) : c("", !0), u("span", sn, [u("span", cn, N(t.label), 1), t.description ? (D(), l("span", ln, N(t.description), 1)) : c("", !0)])]),
|
|
1843
|
+
})) : c("", !0)], 2)) : c("", !0), u("span", sn, [u("span", cn, N(t.label), 1), t.description ? (D(), l("span", ln, N(t.description), 1)) : c("", !0)])]), G(t) && !e.multiple ? (D(), l("span", {
|
|
1826
1844
|
key: 0,
|
|
1827
|
-
class: C(["shrink-0 text-xs",
|
|
1828
|
-
}, [p(
|
|
1845
|
+
class: C(["shrink-0 text-xs", Ve.value])
|
|
1846
|
+
}, [p(B, {
|
|
1829
1847
|
name: "check",
|
|
1830
1848
|
size: 14,
|
|
1831
1849
|
decorative: !0
|
|
1832
|
-
})], 2)) : c("", !0)], 46, an)], 64))), 128)) : (D(), l("p", un, N(v.value.trim() ? "No matches found" : "No options available"), 1)),
|
|
1850
|
+
})], 2)) : c("", !0)], 46, an)], 64))), 128)) : (D(), l("p", un, N(v.value.trim() ? "No matches found" : "No options available"), 1)), Le.value ? (D(), l("button", {
|
|
1833
1851
|
key: 2,
|
|
1834
1852
|
type: "button",
|
|
1835
1853
|
class: "mx-2 mb-2 flex w-[calc(100%-1rem)] items-center justify-between rounded-md border-0 bg-transparent px-3 py-2 text-left text-sm text-dark appearance-none hl-no-focus-ring",
|
|
1836
|
-
onClick:
|
|
1837
|
-
}, [u("span", null, "Add \"" + N(v.value.trim()) + "\"", 1), p(
|
|
1854
|
+
onClick: tt
|
|
1855
|
+
}, [u("span", null, "Add \"" + N(v.value.trim()) + "\"", 1), p(B, {
|
|
1838
1856
|
name: "plus",
|
|
1839
1857
|
size: 14,
|
|
1840
1858
|
decorative: !0
|
|
1841
1859
|
})])) : c("", !0)], 4)], 12, tn)) : c("", !0)]))
|
|
1842
1860
|
]),
|
|
1843
|
-
|
|
1861
|
+
je.value ? (D(), l("div", dn, [e.error ? (D(), l("p", fn, N(e.error), 1)) : c("", !0), (D(!0), l(r, null, j(e.errors, (e) => (D(), l("p", {
|
|
1844
1862
|
key: e,
|
|
1845
1863
|
class: "text-xs text-danger"
|
|
1846
1864
|
}, N(e), 1))), 128))])) : c("", !0)
|
|
@@ -1852,7 +1870,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1852
1870
|
setup(e) {
|
|
1853
1871
|
return (t, n) => (D(), l("div", { class: C(["animate-pulse rounded-lg bg-tertiary", e.class]) }, null, 2));
|
|
1854
1872
|
}
|
|
1855
|
-
}), hn = { class: "space-y-3 rounded-xl border border-solid border-tertiary bg-light p-3
|
|
1873
|
+
}), hn = { class: "space-y-3 rounded-xl border border-solid border-tertiary bg-light p-3 hanap-labs-font" }, gn = {
|
|
1856
1874
|
key: 0,
|
|
1857
1875
|
class: "flex flex-wrap items-center justify-between gap-3"
|
|
1858
1876
|
}, _n = { class: "relative overflow-x-auto" }, vn = {
|
|
@@ -1873,13 +1891,13 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1873
1891
|
}),
|
|
1874
1892
|
emits: /* @__PURE__ */ b(["tabs:change"], ["update:active"]),
|
|
1875
1893
|
setup(e, { emit: t }) {
|
|
1876
|
-
let n =
|
|
1894
|
+
let n = oe(e, "active"), i = t, a = o(() => e.items.filter((e) => !e.disabled)), d = o({
|
|
1877
1895
|
get: () => n.value ?? "",
|
|
1878
1896
|
set: (e) => {
|
|
1879
1897
|
n.value !== e && (n.value = e, i("tabs:change", e));
|
|
1880
1898
|
}
|
|
1881
|
-
}), p =
|
|
1882
|
-
|
|
1899
|
+
}), p = ae().replace(/:/g, ""), m = o(() => `hl-tabs-${p}`), h = o(() => _(d.value));
|
|
1900
|
+
de(() => {
|
|
1883
1901
|
if (!a.value.length) {
|
|
1884
1902
|
d.value = "";
|
|
1885
1903
|
return;
|
|
@@ -1910,7 +1928,7 @@ var ht = { class: "relative inline-block hanaplabstoolkit-font" }, gt = /* @__PU
|
|
|
1910
1928
|
onClick: (t) => g(e.value)
|
|
1911
1929
|
}, [
|
|
1912
1930
|
u("span", { class: C(["size-2 rounded-full", d.value === e.value ? "bg-light" : "bg-muted"]) }, null, 2),
|
|
1913
|
-
e.icon ? (D(), s(
|
|
1931
|
+
e.icon ? (D(), s(B, {
|
|
1914
1932
|
key: 0,
|
|
1915
1933
|
name: e.icon,
|
|
1916
1934
|
class: "size-4",
|
|
@@ -3414,7 +3432,7 @@ function Gr(e) {
|
|
|
3414
3432
|
}, t ? Wr(e) : e));
|
|
3415
3433
|
if (t) {
|
|
3416
3434
|
let t = re(e.data);
|
|
3417
|
-
|
|
3435
|
+
I(t, () => {
|
|
3418
3436
|
n.setState((e) => ({
|
|
3419
3437
|
...e,
|
|
3420
3438
|
data: t.value
|
|
@@ -3422,7 +3440,7 @@ function Gr(e) {
|
|
|
3422
3440
|
}, { immediate: !0 });
|
|
3423
3441
|
}
|
|
3424
3442
|
let r = k(n.initialState);
|
|
3425
|
-
return
|
|
3443
|
+
return de(() => {
|
|
3426
3444
|
n.setOptions((n) => {
|
|
3427
3445
|
let i = new Proxy({}, { get: (e, t) => r.value[t] });
|
|
3428
3446
|
return Hr(n, t ? Wr(e) : e, {
|
|
@@ -3436,7 +3454,7 @@ function Gr(e) {
|
|
|
3436
3454
|
}
|
|
3437
3455
|
//#endregion
|
|
3438
3456
|
//#region src/components/hl-table/HLTable.vue?vue&type=script&setup=true&lang.ts
|
|
3439
|
-
var Kr = { class: "flex flex-col gap-4
|
|
3457
|
+
var Kr = { class: "flex flex-col gap-4 hanap-labs-font" }, qr = {
|
|
3440
3458
|
key: 0,
|
|
3441
3459
|
class: "flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between"
|
|
3442
3460
|
}, Jr = {
|
|
@@ -3508,7 +3526,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3508
3526
|
"search"
|
|
3509
3527
|
], ["update:selectedRows"]),
|
|
3510
3528
|
setup(e, { expose: t, emit: n }) {
|
|
3511
|
-
let i =
|
|
3529
|
+
let i = oe(e, "selectedRows"), a = n, d = se(), f = k([]), m = k({}), h = k(""), g = k(!1);
|
|
3512
3530
|
function _(e) {
|
|
3513
3531
|
return Object.prototype.hasOwnProperty.call(e, "key");
|
|
3514
3532
|
}
|
|
@@ -3619,20 +3637,20 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3619
3637
|
function P(e) {
|
|
3620
3638
|
return e ?? {};
|
|
3621
3639
|
}
|
|
3622
|
-
function
|
|
3640
|
+
function ae(e) {
|
|
3623
3641
|
return e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left";
|
|
3624
3642
|
}
|
|
3625
|
-
function
|
|
3643
|
+
function ce(e) {
|
|
3626
3644
|
return e === "center" ? "justify-center" : e === "right" ? "justify-end" : "justify-start";
|
|
3627
3645
|
}
|
|
3628
|
-
function
|
|
3646
|
+
function le(e) {
|
|
3629
3647
|
return e === "center" ? "mx-auto w-3/4" : e === "right" ? "ml-auto w-3/4" : "w-full";
|
|
3630
3648
|
}
|
|
3631
|
-
|
|
3649
|
+
I(ee, (e, t) => {
|
|
3632
3650
|
t && !e && g.value && (g.value = !1);
|
|
3633
|
-
}),
|
|
3651
|
+
}), I(m, () => {
|
|
3634
3652
|
i.value = O.value;
|
|
3635
|
-
}, { deep: !0 }),
|
|
3653
|
+
}, { deep: !0 }), I(i, (e) => {
|
|
3636
3654
|
let t = O.value;
|
|
3637
3655
|
if (e.length === t.length && e.every((e) => t.includes(e))) return;
|
|
3638
3656
|
let n = {};
|
|
@@ -3640,7 +3658,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3640
3658
|
n[e] = !0;
|
|
3641
3659
|
}), m.value = n;
|
|
3642
3660
|
});
|
|
3643
|
-
function
|
|
3661
|
+
function ue(e) {
|
|
3644
3662
|
let t = f.value.find((t) => t.id === e), n = t ? !t.desc : !1;
|
|
3645
3663
|
f.value = [{
|
|
3646
3664
|
id: e,
|
|
@@ -3650,41 +3668,41 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3650
3668
|
direction: n ? "desc" : "asc"
|
|
3651
3669
|
});
|
|
3652
3670
|
}
|
|
3653
|
-
function
|
|
3671
|
+
function de() {
|
|
3654
3672
|
g.value = !0, a("refresh");
|
|
3655
3673
|
}
|
|
3656
|
-
function
|
|
3674
|
+
function fe() {
|
|
3657
3675
|
a("search", h.value);
|
|
3658
3676
|
}
|
|
3659
|
-
function
|
|
3677
|
+
function pe() {
|
|
3660
3678
|
if (T.value) {
|
|
3661
3679
|
a("page:change", Math.max(1, E.value - 1));
|
|
3662
3680
|
return;
|
|
3663
3681
|
}
|
|
3664
3682
|
w.previousPage();
|
|
3665
3683
|
}
|
|
3666
|
-
function
|
|
3684
|
+
function me() {
|
|
3667
3685
|
if (T.value) {
|
|
3668
3686
|
a("page:change", Math.min(te.value, E.value + 1));
|
|
3669
3687
|
return;
|
|
3670
3688
|
}
|
|
3671
3689
|
w.nextPage();
|
|
3672
3690
|
}
|
|
3673
|
-
function
|
|
3691
|
+
function he(e) {
|
|
3674
3692
|
if (T.value) {
|
|
3675
3693
|
a("page:change", e);
|
|
3676
3694
|
return;
|
|
3677
3695
|
}
|
|
3678
3696
|
w.setPageIndex(e - 1);
|
|
3679
3697
|
}
|
|
3680
|
-
function
|
|
3698
|
+
function R() {
|
|
3681
3699
|
if (A.value) {
|
|
3682
3700
|
w.resetRowSelection();
|
|
3683
3701
|
return;
|
|
3684
3702
|
}
|
|
3685
3703
|
w.toggleAllPageRowsSelected(!0);
|
|
3686
3704
|
}
|
|
3687
|
-
function
|
|
3705
|
+
function ge(e) {
|
|
3688
3706
|
e.toggleSelected();
|
|
3689
3707
|
}
|
|
3690
3708
|
return t({
|
|
@@ -3700,7 +3718,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3700
3718
|
e.searchable && !(e.selectable && O.value.length > 0) ? (D(), l("p", Yr, N(e.total) + " result" + N(e.total === 1 ? "" : "s"), 1)) : c("", !0),
|
|
3701
3719
|
e.selectable && O.value.length > 0 ? (D(), l("p", Xr, N(O.value.length) + " selected ", 1)) : c("", !0),
|
|
3702
3720
|
e.selectable && O.value.length > 0 ? M(t.$slots, "bulk-actions", { key: 2 }) : c("", !0),
|
|
3703
|
-
e.searchable ? (D(), s(
|
|
3721
|
+
e.searchable ? (D(), s(et, {
|
|
3704
3722
|
key: 3,
|
|
3705
3723
|
modelValue: h.value,
|
|
3706
3724
|
"onUpdate:modelValue": n[0] ||= (e) => h.value = e,
|
|
@@ -3709,19 +3727,19 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3709
3727
|
size: "md",
|
|
3710
3728
|
class: "w-full max-w-sm sm:w-72",
|
|
3711
3729
|
"input-class": "rounded-md border-gray-200 bg-transparent text-dark",
|
|
3712
|
-
onInput:
|
|
3730
|
+
onInput: fe
|
|
3713
3731
|
}, null, 8, ["modelValue", "placeholder"])) : c("", !0),
|
|
3714
|
-
e.refreshable ? (D(), s(
|
|
3732
|
+
e.refreshable ? (D(), s(W, {
|
|
3715
3733
|
key: 4,
|
|
3716
3734
|
label: "",
|
|
3717
3735
|
type: "button",
|
|
3718
3736
|
variant: "outline",
|
|
3719
|
-
class: "shrink-0 min-w-0 !w-[var(--
|
|
3737
|
+
class: "shrink-0 min-w-0 !w-[var(--hanap-labs-size-md)] !h-[var(--hanap-labs-size-md)] !p-0 !gap-0 hover:text-primary",
|
|
3720
3738
|
disabled: g.value || ee.value,
|
|
3721
3739
|
"aria-label": "Refresh",
|
|
3722
|
-
onClick:
|
|
3740
|
+
onClick: de
|
|
3723
3741
|
}, {
|
|
3724
|
-
icon:
|
|
3742
|
+
icon: L(() => [p(B, {
|
|
3725
3743
|
name: "refresh",
|
|
3726
3744
|
size: 20,
|
|
3727
3745
|
decorative: !0,
|
|
@@ -3731,22 +3749,22 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3731
3749
|
_: 1
|
|
3732
3750
|
}, 8, ["disabled"])) : c("", !0)
|
|
3733
3751
|
], 2)])) : c("", !0),
|
|
3734
|
-
u("div", Zr, [u("div", Qr, [u("table", $r, [u("thead", ei, [u("tr", null, [e.selectable ? (D(), l("th", ti, [p(
|
|
3752
|
+
u("div", Zr, [u("div", Qr, [u("table", $r, [u("thead", ei, [u("tr", null, [e.selectable ? (D(), l("th", ti, [p(Ke, {
|
|
3735
3753
|
"model-value": A.value,
|
|
3736
3754
|
indeterminate: ne.value,
|
|
3737
3755
|
"aria-label": "Toggle all rows",
|
|
3738
3756
|
size: "md",
|
|
3739
3757
|
class: "mx-auto max-w-max",
|
|
3740
|
-
"onUpdate:modelValue":
|
|
3758
|
+
"onUpdate:modelValue": R
|
|
3741
3759
|
}, null, 8, ["model-value", "indeterminate"])])) : c("", !0), (D(!0), l(r, null, j(F(w).getFlatHeaders().filter((e) => e.id !== "select"), (e) => (D(), l("th", {
|
|
3742
3760
|
key: e.id,
|
|
3743
|
-
class: C(["whitespace-nowrap px-4 py-3", [
|
|
3744
|
-
onClick: (t) => e.column.getCanSort() ?
|
|
3745
|
-
}, [u("div", { class: C(["flex w-full items-center gap-1.5",
|
|
3761
|
+
class: C(["whitespace-nowrap px-4 py-3", [ae(P(e.column.columnDef.meta).alignment), { "cursor-pointer select-none hover:text-primary": e.column.getCanSort() }]]),
|
|
3762
|
+
onClick: (t) => e.column.getCanSort() ? ue(e.id) : void 0
|
|
3763
|
+
}, [u("div", { class: C(["flex w-full items-center gap-1.5", ce(P(e.column.columnDef.meta).alignment)]) }, [e.isPlaceholder ? c("", !0) : (D(), s(F(Ur), {
|
|
3746
3764
|
key: 0,
|
|
3747
3765
|
render: e.column.columnDef.header,
|
|
3748
3766
|
props: e.getContext()
|
|
3749
|
-
}, null, 8, ["render", "props"])), e.column.getCanSort() ? (D(), l("span", ri, [p(
|
|
3767
|
+
}, null, 8, ["render", "props"])), e.column.getCanSort() ? (D(), l("span", ri, [p(B, {
|
|
3750
3768
|
name: e.column.getIsSorted() === "asc" ? "chevron-up" : e.column.getIsSorted() === "desc" ? "chevron-down" : "chevron-up-down",
|
|
3751
3769
|
size: 14,
|
|
3752
3770
|
decorative: !0
|
|
@@ -3755,20 +3773,20 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3755
3773
|
class: "animate-pulse"
|
|
3756
3774
|
}, [e.selectable ? (D(), l("td", ai, [...n[1] ||= [u("div", { class: "mx-auto size-5 rounded border border-solid border-gray-200 bg-gray-100" }, null, -1)]])) : c("", !0), (D(!0), l(r, null, j(F(w).getAllColumns().filter((e) => e.id !== "select"), (e) => (D(), l("td", {
|
|
3757
3775
|
key: `${t}-${e.id}`,
|
|
3758
|
-
class: C(["whitespace-nowrap px-4 py-3",
|
|
3759
|
-
}, [u("div", { class: C(["h-4 rounded bg-gray-100",
|
|
3776
|
+
class: C(["whitespace-nowrap px-4 py-3", ae(P(e.columnDef.meta).alignment)])
|
|
3777
|
+
}, [u("div", { class: C(["h-4 rounded bg-gray-100", le(P(e.columnDef.meta).alignment)]) }, null, 2)], 2))), 128))])), 64)) : (D(!0), l(r, { key: 1 }, j(F(w).getRowModel().rows, (n) => (D(), l("tr", {
|
|
3760
3778
|
key: n.id,
|
|
3761
3779
|
class: C(["hover:bg-gray-50", { "bg-primary/5": n.getIsSelected() }])
|
|
3762
|
-
}, [e.selectable ? (D(), l("td", oi, [p(
|
|
3780
|
+
}, [e.selectable ? (D(), l("td", oi, [p(Ke, {
|
|
3763
3781
|
"model-value": n.getIsSelected(),
|
|
3764
3782
|
"aria-label": "Toggle row",
|
|
3765
3783
|
size: "md",
|
|
3766
3784
|
class: "mx-auto max-w-max",
|
|
3767
|
-
"onUpdate:modelValue": (e) =>
|
|
3785
|
+
"onUpdate:modelValue": (e) => ge(n)
|
|
3768
3786
|
}, null, 8, ["model-value", "onUpdate:modelValue"])])) : c("", !0), (D(!0), l(r, null, j(n.getVisibleCells().filter((e) => e.column.id !== "select"), (e) => (D(), l("td", {
|
|
3769
3787
|
key: e.id,
|
|
3770
|
-
class: C(["whitespace-nowrap px-4 py-3 text-dark",
|
|
3771
|
-
}, [u("div", { class: C(["flex w-full items-center gap-1.5",
|
|
3788
|
+
class: C(["whitespace-nowrap px-4 py-3 text-dark", ae(P(e.column.columnDef.meta).alignment)])
|
|
3789
|
+
}, [u("div", { class: C(["flex w-full items-center gap-1.5", ce(P(e.column.columnDef.meta).alignment)]) }, [F(d)[e.column.id] ? M(t.$slots, e.column.id, {
|
|
3772
3790
|
key: 0,
|
|
3773
3791
|
row: n.original,
|
|
3774
3792
|
rowId: n.id,
|
|
@@ -3783,26 +3801,26 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3783
3801
|
class: "px-4 py-12 text-center text-muted"
|
|
3784
3802
|
}, [...n[2] ||= [u("div", { class: "flex flex-col items-center gap-1" }, [u("p", { class: "text-sm font-medium" }, "No results found"), u("p", { class: "text-xs" }, "Try adjusting your search terms")], -1)]], 8, ci)])) : c("", !0)])])])]),
|
|
3785
3803
|
e.pageCount !== void 0 || te.value > 1 ? (D(), l("div", li, [u("div", ui, [
|
|
3786
|
-
p(
|
|
3804
|
+
p(W, {
|
|
3787
3805
|
label: "",
|
|
3788
3806
|
type: "button",
|
|
3789
3807
|
size: "sm",
|
|
3790
3808
|
variant: "outline",
|
|
3791
3809
|
rounded: !1,
|
|
3792
3810
|
"icon-only": !0,
|
|
3793
|
-
class: "!size-[var(--
|
|
3811
|
+
class: "!size-[var(--hanap-labs-size-sm)] !min-w-0 !p-0 hover:!bg-gray-100",
|
|
3794
3812
|
disabled: T.value ? E.value <= 1 : !F(w).getCanPreviousPage(),
|
|
3795
3813
|
"aria-label": "Previous page",
|
|
3796
|
-
onClick:
|
|
3814
|
+
onClick: pe
|
|
3797
3815
|
}, {
|
|
3798
|
-
icon:
|
|
3816
|
+
icon: L(() => [p(B, {
|
|
3799
3817
|
name: "chevron-left",
|
|
3800
3818
|
size: 14,
|
|
3801
3819
|
decorative: !0
|
|
3802
3820
|
})]),
|
|
3803
3821
|
_: 1
|
|
3804
3822
|
}, 8, ["disabled"]),
|
|
3805
|
-
(D(!0), l(r, null, j(ie.value, (e, t) => (D(), l(r, { key: `${e}-${t}` }, [e === "ellipsis" ? (D(), l("span", di, " ... ")) : (D(), s(
|
|
3823
|
+
(D(!0), l(r, null, j(ie.value, (e, t) => (D(), l(r, { key: `${e}-${t}` }, [e === "ellipsis" ? (D(), l("span", di, " ... ")) : (D(), s(W, {
|
|
3806
3824
|
key: 0,
|
|
3807
3825
|
label: String(e),
|
|
3808
3826
|
type: "button",
|
|
@@ -3810,8 +3828,8 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3810
3828
|
variant: e === E.value ? "solid" : "outline",
|
|
3811
3829
|
color: e === E.value ? "primary" : void 0,
|
|
3812
3830
|
rounded: !1,
|
|
3813
|
-
class: C(["!size-[var(--
|
|
3814
|
-
onClick: (t) =>
|
|
3831
|
+
class: C(["!size-[var(--hanap-labs-size-sm)] !min-w-0 !p-0 !font-medium", e === E.value ? "" : "hover:!bg-gray-100"]),
|
|
3832
|
+
onClick: (t) => he(e)
|
|
3815
3833
|
}, null, 8, [
|
|
3816
3834
|
"label",
|
|
3817
3835
|
"variant",
|
|
@@ -3819,19 +3837,19 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3819
3837
|
"class",
|
|
3820
3838
|
"onClick"
|
|
3821
3839
|
]))], 64))), 128)),
|
|
3822
|
-
p(
|
|
3840
|
+
p(W, {
|
|
3823
3841
|
label: "",
|
|
3824
3842
|
type: "button",
|
|
3825
3843
|
size: "sm",
|
|
3826
3844
|
variant: "outline",
|
|
3827
3845
|
rounded: !1,
|
|
3828
3846
|
"icon-only": !0,
|
|
3829
|
-
class: "!size-[var(--
|
|
3847
|
+
class: "!size-[var(--hanap-labs-size-sm)] !min-w-0 !p-0 hover:!bg-gray-100",
|
|
3830
3848
|
disabled: T.value ? E.value >= te.value : !F(w).getCanNextPage(),
|
|
3831
3849
|
"aria-label": "Next page",
|
|
3832
|
-
onClick:
|
|
3850
|
+
onClick: me
|
|
3833
3851
|
}, {
|
|
3834
|
-
icon:
|
|
3852
|
+
icon: L(() => [p(B, {
|
|
3835
3853
|
name: "chevron-right",
|
|
3836
3854
|
size: 14,
|
|
3837
3855
|
decorative: !0
|
|
@@ -3856,7 +3874,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3856
3874
|
}, vi = {
|
|
3857
3875
|
key: 0,
|
|
3858
3876
|
class: "text-xs text-danger"
|
|
3859
|
-
}, yi = /* @__PURE__ */
|
|
3877
|
+
}, yi = /* @__PURE__ */ xe(/* @__PURE__ */ h({
|
|
3860
3878
|
__name: "HLTextarea",
|
|
3861
3879
|
props: /* @__PURE__ */ b({
|
|
3862
3880
|
id: { default: "" },
|
|
@@ -3896,17 +3914,17 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3896
3914
|
"input"
|
|
3897
3915
|
], ["update:modelValue"]),
|
|
3898
3916
|
setup(e, { emit: t }) {
|
|
3899
|
-
let n =
|
|
3917
|
+
let n = oe(e, "modelValue"), i = ht({
|
|
3900
3918
|
input: n,
|
|
3901
3919
|
styleProp: "minHeight"
|
|
3902
3920
|
}), a = t;
|
|
3903
3921
|
function d(e) {
|
|
3904
|
-
let t =
|
|
3922
|
+
let t = ae();
|
|
3905
3923
|
return { inputId: o(() => e || t) };
|
|
3906
3924
|
}
|
|
3907
3925
|
let { inputId: f } = d(e.id), p = o(() => !!e.error || e.errors.length > 0);
|
|
3908
3926
|
return (t, o) => (D(), l("div", mi, [
|
|
3909
|
-
e.label || e.description ? (D(), s(
|
|
3927
|
+
e.label || e.description ? (D(), s(Be, {
|
|
3910
3928
|
key: 0,
|
|
3911
3929
|
label: e.label,
|
|
3912
3930
|
description: e.description,
|
|
@@ -3920,7 +3938,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3920
3938
|
"required",
|
|
3921
3939
|
"label-class"
|
|
3922
3940
|
])) : c("", !0),
|
|
3923
|
-
u("div", hi, [
|
|
3941
|
+
u("div", hi, [fe(u("textarea", {
|
|
3924
3942
|
id: F(f),
|
|
3925
3943
|
ref: F(i).textarea,
|
|
3926
3944
|
"onUpdate:modelValue": o[0] ||= (e) => n.value = e,
|
|
@@ -3931,7 +3949,7 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3931
3949
|
rows: e.rows,
|
|
3932
3950
|
maxlength: e.maxlength,
|
|
3933
3951
|
minlength: e.minlength,
|
|
3934
|
-
class: C(["block w-full appearance-none box-border border border-solid border-gray-200 bg-transparent text-dark placeholder:text-muted leading-tight transition-colors duration-150 hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60 py-2.5 px-3 text-sm rounded-md resize-none
|
|
3952
|
+
class: C(["block w-full appearance-none box-border border border-solid border-gray-200 bg-transparent text-dark placeholder:text-muted leading-tight transition-colors duration-150 hl-no-focus-ring disabled:cursor-not-allowed disabled:opacity-60 py-2.5 px-3 text-sm rounded-md resize-none hanap-labs-font", [e.inputClass, {
|
|
3935
3953
|
"cursor-not-allowed": e.disabled,
|
|
3936
3954
|
"border-danger focus:border-danger": p.value,
|
|
3937
3955
|
"border-0 focus:border-0": e.noBorder
|
|
@@ -3939,13 +3957,13 @@ var Kr = { class: "flex flex-col gap-4 hanaplabstoolkit-font" }, qr = {
|
|
|
3939
3957
|
onFocus: o[1] ||= (e) => a("focus"),
|
|
3940
3958
|
onBlur: o[2] ||= (e) => a("blur"),
|
|
3941
3959
|
onInput: o[3] ||= (e) => a("input")
|
|
3942
|
-
}, null, 42, gi), [[
|
|
3960
|
+
}, null, 42, gi), [[ue, n.value]])]),
|
|
3943
3961
|
p.value ? (D(), l("div", _i, [e.error ? (D(), l("p", vi, N(e.error), 1)) : c("", !0), e.errors.length ? (D(!0), l(r, { key: 1 }, j(e.errors, (e) => (D(), l("p", {
|
|
3944
3962
|
key: e,
|
|
3945
3963
|
class: "text-xs text-danger"
|
|
3946
3964
|
}, N(e), 1))), 128)) : c("", !0)])) : c("", !0)
|
|
3947
3965
|
]));
|
|
3948
3966
|
}
|
|
3949
|
-
}), [["__scopeId", "data-v-
|
|
3967
|
+
}), [["__scopeId", "data-v-1b28fb3f"]]);
|
|
3950
3968
|
//#endregion
|
|
3951
|
-
export {
|
|
3969
|
+
export { _e as C, ge as S, Be as _, pn as a, Ae as b, Ht as c, jt as d, Et as f, Ke as g, et as h, mn as i, Vt as l, _t as m, pi as n, Yt as o, St as p, xn as r, Jt as s, yi as t, Mt as u, W as v, B as x, Ne as y };
|