hanap-labs 8.1.0 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -596,7 +596,7 @@ var ze = [
|
|
|
596
596
|
_: 3
|
|
597
597
|
}, 8, ["class", "aria-label"]));
|
|
598
598
|
}
|
|
599
|
-
}),
|
|
599
|
+
}), We = ["type", "disabled"], K = {
|
|
600
600
|
key: 1,
|
|
601
601
|
class: "hl-inline-flex hl-items-center hl-justify-center",
|
|
602
602
|
"aria-hidden": "true"
|
|
@@ -693,14 +693,14 @@ var ze = [
|
|
|
693
693
|
}), [t.$slots.icon && !e.loading ? (k(), l("span", {
|
|
694
694
|
key: 0,
|
|
695
695
|
class: C(["hl-inline-flex hl-items-center hl-justify-center", e.iconPosition === "right" ? "hl-order-2" : "hl-order-1"])
|
|
696
|
-
}, [P(t.$slots, "icon")], 2)) : c("", !0), e.loading ? (k(), l("span",
|
|
696
|
+
}, [P(t.$slots, "icon")], 2)) : c("", !0), e.loading ? (k(), l("span", K, [p(W, {
|
|
697
697
|
name: "spinner",
|
|
698
698
|
size: 16,
|
|
699
699
|
class: "hl-animate-spin"
|
|
700
700
|
})])) : e.iconOnly ? c("", !0) : (k(), l("span", {
|
|
701
701
|
key: 2,
|
|
702
702
|
class: C(["hl-inline-flex hl-items-center hl-justify-center", e.iconPosition === "right" && t.$slots.icon ? "hl-order-1" : "hl-order-2"])
|
|
703
|
-
}, [P(t.$slots, "default", {}, () => [f(I(e.label), 1)])], 2))], 16,
|
|
703
|
+
}, [P(t.$slots, "default", {}, () => [f(I(e.label), 1)])], 2))], 16, We));
|
|
704
704
|
}
|
|
705
705
|
}), Ge = /* @__PURE__ */ h({
|
|
706
706
|
name: "HLCard",
|
|
@@ -776,7 +776,7 @@ var ze = [
|
|
|
776
776
|
], Qe = {
|
|
777
777
|
key: 1,
|
|
778
778
|
class: "hl-sr-only"
|
|
779
|
-
}, $e = ["id", "disabled"], et = "hl-bg-light",
|
|
779
|
+
}, $e = ["id", "disabled"], et = "hl-bg-light", tt = "hl-bg-primary", Y = /* @__PURE__ */ De(/* @__PURE__ */ h({
|
|
780
780
|
name: "HLCheckbox",
|
|
781
781
|
__name: "HLCheckbox",
|
|
782
782
|
props: /* @__PURE__ */ b({
|
|
@@ -856,7 +856,7 @@ var ze = [
|
|
|
856
856
|
light: "dark",
|
|
857
857
|
dark: "light",
|
|
858
858
|
muted: "light"
|
|
859
|
-
}, v = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(h, e), y = o(() => d[e.size]), b = o(() => m[e.size]), x = o(() => e.indeterminate && !t.value), S = o(() => x.value ? "mixed" : t.value), w = o(() => x.value ? "hl-bg-primary-20 hl-border-primary" : v(e.color) ? t.value ? h[e.color] : g[e.color] : t.value ?
|
|
859
|
+
}, v = (e) => typeof e == "string" && Object.prototype.hasOwnProperty.call(h, e), y = o(() => d[e.size]), b = o(() => m[e.size]), x = o(() => e.indeterminate && !t.value), S = o(() => x.value ? "mixed" : t.value), w = o(() => x.value ? "hl-bg-primary-20 hl-border-primary" : v(e.color) ? t.value ? h[e.color] : g[e.color] : t.value ? tt : et), T = o(() => {
|
|
860
860
|
if (x.value) return "primary";
|
|
861
861
|
if (t.value) return v(e.color) ? _[e.color] : "light";
|
|
862
862
|
if (v(e.color)) return e.color;
|
|
@@ -2063,151 +2063,157 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2063
2063
|
return we(e) && "label" in e && typeof e.label == "string" && "value" in e;
|
|
2064
2064
|
}
|
|
2065
2065
|
function De(e) {
|
|
2066
|
-
return e
|
|
2066
|
+
return Ee(e) ? e : Pe.value.find((t) => Ae(t.value, e)) ?? {
|
|
2067
|
+
label: String(e),
|
|
2068
|
+
value: e
|
|
2069
|
+
};
|
|
2070
|
+
}
|
|
2071
|
+
function Oe(e) {
|
|
2072
|
+
return e === null ? null : Array.isArray(e) ? e.map((e) => De(e)) : (Ee(e), e);
|
|
2067
2073
|
}
|
|
2068
|
-
function
|
|
2074
|
+
function ke(e, t) {
|
|
2069
2075
|
return Object.keys(t).every((n) => {
|
|
2070
2076
|
if (!(n in e)) return !1;
|
|
2071
2077
|
let r = e[n], i = t[n];
|
|
2072
|
-
return we(r) && we(i) ?
|
|
2078
|
+
return we(r) && we(i) ? ke(r, i) : Te(r, i);
|
|
2073
2079
|
});
|
|
2074
2080
|
}
|
|
2075
|
-
function
|
|
2076
|
-
return Te(e, t) ? !0 : we(e) && we(t) ?
|
|
2081
|
+
function Ae(e, t) {
|
|
2082
|
+
return Te(e, t) ? !0 : we(e) && we(t) ? ke(t, e) : !1;
|
|
2077
2083
|
}
|
|
2078
|
-
function
|
|
2079
|
-
return Array.isArray(e) ? `[${e.map((e) =>
|
|
2084
|
+
function je(e) {
|
|
2085
|
+
return Array.isArray(e) ? `[${e.map((e) => je(e)).join(",")}]` : we(e) ? `{${Object.keys(e).sort().map((t) => `${t}:${je(e[t])}`).join(",")}}` : String(e);
|
|
2080
2086
|
}
|
|
2081
|
-
function
|
|
2082
|
-
return `${e.label}-${
|
|
2087
|
+
function Me(e, t) {
|
|
2088
|
+
return `${e.label}-${je(e.value)}-${t}`;
|
|
2083
2089
|
}
|
|
2084
|
-
function
|
|
2090
|
+
function Ne(e) {
|
|
2085
2091
|
return `${fe.value}-option-${e}`;
|
|
2086
2092
|
}
|
|
2087
|
-
let
|
|
2093
|
+
let Pe = o(() => {
|
|
2088
2094
|
let t = /* @__PURE__ */ new Map();
|
|
2089
|
-
for (let n of [...e.options, ...v.value]) t.set(
|
|
2095
|
+
for (let n of [...e.options, ...v.value]) t.set(je(n.value), n);
|
|
2090
2096
|
return Array.from(t.values());
|
|
2091
|
-
}),
|
|
2097
|
+
}), Fe = (e) => Ee(e) ? e.value : e, Ie = o(() => {
|
|
2092
2098
|
let t = d.value;
|
|
2093
|
-
return e.multiple ? Array.isArray(t) ? t.map(
|
|
2094
|
-
}),
|
|
2099
|
+
return e.multiple ? Array.isArray(t) ? t.map(Fe) : [] : t === null ? [] : [Fe(t)];
|
|
2100
|
+
}), Le = o(() => Pe.value.filter((e) => Ie.value.some((t) => Ae(e.value, t)))), Re = o(() => Number.isFinite(e.maxVisiblePills) ? Math.max(0, Math.floor(e.maxVisiblePills)) : 1), ze = o(() => e.multiple ? Le.value.slice(0, Re.value) : []), Be = o(() => e.multiple ? Math.max(0, Le.value.length - ze.value.length) : 0), Ve = o(() => Ie.value.length > 0), He = o(() => !!e.error || e.errors.length > 0), G = o(() => e.multiple ? Le.value.length === 0 ? e.placeholder : Le.value.length === 1 ? Le.value[0].label : `${Le.value.length} selected` : Le.value[0]?.label ?? e.placeholder), Ue = o(() => me[e.size]), We = o(() => {
|
|
2095
2101
|
let e = _.value.trim().toLowerCase();
|
|
2096
|
-
return e ?
|
|
2102
|
+
return e ? Pe.value.filter((t) => t.label.toLowerCase().includes(e)) : Pe.value;
|
|
2097
2103
|
}), K = o(() => {
|
|
2098
|
-
if (!e.multiple) return
|
|
2104
|
+
if (!e.multiple) return We.value;
|
|
2099
2105
|
let t = [], n = [];
|
|
2100
|
-
for (let e of
|
|
2106
|
+
for (let e of We.value) Y(e) ? t.push(e) : n.push(e);
|
|
2101
2107
|
return [...t, ...n];
|
|
2102
|
-
}),
|
|
2108
|
+
}), q = o(() => {
|
|
2103
2109
|
if (!e.multiple) return -1;
|
|
2104
2110
|
let t = K.value.filter((e) => Y(e)).length;
|
|
2105
2111
|
return t > 0 && t < K.value.length ? t : -1;
|
|
2106
|
-
}),
|
|
2112
|
+
}), J = o(() => ({
|
|
2107
2113
|
...te.value,
|
|
2108
2114
|
width: y.value > 0 ? `${y.value}px` : void 0,
|
|
2109
2115
|
zIndex: 60
|
|
2110
|
-
})),
|
|
2116
|
+
})), Ge = o(() => {
|
|
2111
2117
|
let t = _.value.trim();
|
|
2112
|
-
return !e.allowCreateWhenNoMatch || !t ||
|
|
2113
|
-
}),
|
|
2114
|
-
if (!(b.value < 0) && !(b.value >= K.value.length)) return
|
|
2115
|
-
}),
|
|
2118
|
+
return !e.allowCreateWhenNoMatch || !t || We.value.length > 0 ? !1 : !Pe.value.some((e) => e.label.toLowerCase() === t.toLowerCase());
|
|
2119
|
+
}), Ke = o(() => {
|
|
2120
|
+
if (!(b.value < 0) && !(b.value >= K.value.length)) return Ne(b.value);
|
|
2121
|
+
}), qe = o(() => U(e.color) ? he[e.color] : "hl-theme-border"), Je = o(() => U(e.color) ? ge[e.color] : "hl-theme-text"), Xe = o(() => U(e.color) ? _e[e.color] : "hl-border-dark hl-bg-dark hl-text-white"), Ze = o(() => U(e.color) ? _e[e.color] : "hl-theme-border hl-theme-bg-muted hl-theme-text"), Qe = o(() => U(e.color) ? ve[e.color] : "hl-theme-bg-muted hl-theme-border-strong"), $e = o(() => U(e.color) ? ye[e.color] : "hover:hl-theme-bg-subtle"), et = o(() => U(e.color) ? be[e.color] : "hl-theme-bg-muted"), tt = o(() => {
|
|
2116
2122
|
if (U(e.color)) return xe[e.color];
|
|
2117
2123
|
});
|
|
2118
2124
|
function Y(e) {
|
|
2119
|
-
return
|
|
2125
|
+
return Ie.value.some((t) => Ae(e.value, t));
|
|
2120
2126
|
}
|
|
2121
|
-
function
|
|
2122
|
-
let t =
|
|
2127
|
+
function nt(e) {
|
|
2128
|
+
let t = Oe(e);
|
|
2123
2129
|
d.value = t, m("change", t);
|
|
2124
2130
|
}
|
|
2125
|
-
function
|
|
2131
|
+
function rt() {
|
|
2126
2132
|
let e = [];
|
|
2127
2133
|
return K.value.forEach((t, n) => {
|
|
2128
2134
|
t.disabled || e.push(n);
|
|
2129
2135
|
}), e;
|
|
2130
2136
|
}
|
|
2131
|
-
function
|
|
2137
|
+
function it() {
|
|
2132
2138
|
if (!O.value || b.value < 0) return;
|
|
2133
2139
|
let e = `[data-option-index="${b.value}"]`, t = O.value.querySelector(e);
|
|
2134
2140
|
t instanceof HTMLElement && t.scrollIntoView({ block: "nearest" });
|
|
2135
2141
|
}
|
|
2136
|
-
function
|
|
2142
|
+
function at(e) {
|
|
2137
2143
|
b.value = e, S(() => {
|
|
2138
|
-
|
|
2144
|
+
it();
|
|
2139
2145
|
});
|
|
2140
2146
|
}
|
|
2141
|
-
function
|
|
2142
|
-
let e =
|
|
2147
|
+
function ot() {
|
|
2148
|
+
let e = rt();
|
|
2143
2149
|
if (e.length === 0) {
|
|
2144
|
-
|
|
2150
|
+
at(-1);
|
|
2145
2151
|
return;
|
|
2146
2152
|
}
|
|
2147
2153
|
let t = K.value.findIndex((e) => !e.disabled && Y(e));
|
|
2148
|
-
|
|
2154
|
+
at(t >= 0 ? t : e[0]);
|
|
2149
2155
|
}
|
|
2150
|
-
function
|
|
2151
|
-
let t =
|
|
2156
|
+
function st(e) {
|
|
2157
|
+
let t = rt();
|
|
2152
2158
|
if (t.length === 0) {
|
|
2153
|
-
|
|
2159
|
+
at(-1);
|
|
2154
2160
|
return;
|
|
2155
2161
|
}
|
|
2156
2162
|
if (b.value < 0) {
|
|
2157
|
-
|
|
2163
|
+
at(e === 1 ? t[0] : t[t.length - 1]);
|
|
2158
2164
|
return;
|
|
2159
2165
|
}
|
|
2160
2166
|
let n = t.indexOf(b.value);
|
|
2161
2167
|
if (n < 0) {
|
|
2162
|
-
|
|
2168
|
+
at(e === 1 ? t[0] : t[t.length - 1]);
|
|
2163
2169
|
return;
|
|
2164
2170
|
}
|
|
2165
|
-
|
|
2171
|
+
at(t[(n + e + t.length) % t.length]);
|
|
2166
2172
|
}
|
|
2167
|
-
function
|
|
2173
|
+
function ct() {
|
|
2168
2174
|
if (b.value < 0) return;
|
|
2169
2175
|
let e = K.value[b.value];
|
|
2170
|
-
!e || e.disabled ||
|
|
2176
|
+
!e || e.disabled || lt(e);
|
|
2171
2177
|
}
|
|
2172
|
-
function
|
|
2178
|
+
function lt(t) {
|
|
2173
2179
|
if (!(t.disabled || e.disabled)) {
|
|
2174
2180
|
if (e.multiple) {
|
|
2175
|
-
let e = (Array.isArray(d.value) ? d.value : []).map(
|
|
2176
|
-
|
|
2181
|
+
let e = (Array.isArray(d.value) ? d.value : []).map((e) => De(e));
|
|
2182
|
+
nt(e.some((e) => Ae(e.value, t.value)) ? e.filter((e) => !Ae(e.value, t.value)) : [...e, t]);
|
|
2177
2183
|
return;
|
|
2178
2184
|
}
|
|
2179
|
-
|
|
2185
|
+
nt(t), M();
|
|
2180
2186
|
}
|
|
2181
2187
|
}
|
|
2182
|
-
function
|
|
2183
|
-
|
|
2188
|
+
function dt() {
|
|
2189
|
+
nt(e.multiple ? [] : null), _.value = "", M();
|
|
2184
2190
|
}
|
|
2185
|
-
function
|
|
2191
|
+
function ft(e) {
|
|
2186
2192
|
return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
|
|
2187
2193
|
}
|
|
2188
|
-
function
|
|
2194
|
+
function pt() {
|
|
2189
2195
|
let t = _.value.trim();
|
|
2190
|
-
if (!t || !
|
|
2196
|
+
if (!t || !Ge.value) return;
|
|
2191
2197
|
let n = {
|
|
2192
2198
|
label: t,
|
|
2193
|
-
value:
|
|
2199
|
+
value: ft(t) || t.toLowerCase()
|
|
2194
2200
|
}, r = {
|
|
2195
2201
|
label: t,
|
|
2196
2202
|
value: n
|
|
2197
2203
|
};
|
|
2198
2204
|
if (v.value = [...v.value, r], m("create", n), e.multiple) {
|
|
2199
|
-
|
|
2205
|
+
nt([...Array.isArray(d.value) ? d.value : [], r]), _.value = "";
|
|
2200
2206
|
return;
|
|
2201
2207
|
}
|
|
2202
|
-
|
|
2208
|
+
nt(n), _.value = "", M();
|
|
2203
2209
|
}
|
|
2204
|
-
function
|
|
2210
|
+
function mt() {
|
|
2205
2211
|
y.value = D.value?.offsetWidth ?? 0;
|
|
2206
2212
|
}
|
|
2207
|
-
function
|
|
2213
|
+
function ht() {
|
|
2208
2214
|
e.disabled || F();
|
|
2209
2215
|
}
|
|
2210
|
-
function
|
|
2216
|
+
function gt(t) {
|
|
2211
2217
|
if (!e.disabled) {
|
|
2212
2218
|
if (t.key === "Escape") {
|
|
2213
2219
|
M();
|
|
@@ -2218,7 +2224,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2218
2224
|
P();
|
|
2219
2225
|
return;
|
|
2220
2226
|
}
|
|
2221
|
-
|
|
2227
|
+
st(1);
|
|
2222
2228
|
return;
|
|
2223
2229
|
}
|
|
2224
2230
|
if (t.key === "ArrowUp") {
|
|
@@ -2226,65 +2232,65 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2226
2232
|
P();
|
|
2227
2233
|
return;
|
|
2228
2234
|
}
|
|
2229
|
-
|
|
2235
|
+
st(-1);
|
|
2230
2236
|
return;
|
|
2231
2237
|
}
|
|
2232
2238
|
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), F());
|
|
2233
2239
|
}
|
|
2234
2240
|
}
|
|
2235
|
-
function
|
|
2241
|
+
function _t(e) {
|
|
2236
2242
|
if (e.key === "ArrowDown") {
|
|
2237
|
-
e.preventDefault(),
|
|
2243
|
+
e.preventDefault(), st(1);
|
|
2238
2244
|
return;
|
|
2239
2245
|
}
|
|
2240
2246
|
if (e.key === "ArrowUp") {
|
|
2241
|
-
e.preventDefault(),
|
|
2247
|
+
e.preventDefault(), st(-1);
|
|
2242
2248
|
return;
|
|
2243
2249
|
}
|
|
2244
2250
|
if (e.key === "Enter") {
|
|
2245
2251
|
if (e.preventDefault(), b.value >= 0) {
|
|
2246
|
-
|
|
2252
|
+
ct();
|
|
2247
2253
|
return;
|
|
2248
2254
|
}
|
|
2249
|
-
|
|
2255
|
+
Ge.value && pt();
|
|
2250
2256
|
return;
|
|
2251
2257
|
}
|
|
2252
2258
|
e.key === "Escape" && (e.preventDefault(), M());
|
|
2253
2259
|
}
|
|
2254
|
-
function
|
|
2260
|
+
function vt(e) {
|
|
2255
2261
|
if (!A.value) return;
|
|
2256
2262
|
let t = e.target;
|
|
2257
|
-
t instanceof Node && (O.value?.contains(t) ?? !1) &&
|
|
2258
|
-
}
|
|
2259
|
-
function vt(e) {
|
|
2260
|
-
K.value[e]?.disabled || it(e);
|
|
2263
|
+
t instanceof Node && (O.value?.contains(t) ?? !1) && _t(e);
|
|
2261
2264
|
}
|
|
2262
2265
|
function yt(e) {
|
|
2266
|
+
K.value[e]?.disabled || at(e);
|
|
2267
|
+
}
|
|
2268
|
+
function bt(e) {
|
|
2263
2269
|
let t = e.target, n = h.value?.contains(t) ?? !1, r = O.value?.contains(t) ?? !1;
|
|
2264
2270
|
!n && !r && M();
|
|
2265
2271
|
}
|
|
2266
|
-
return n({ clearSelection:
|
|
2272
|
+
return n({ clearSelection: dt }), B(() => e.disabled, (e) => {
|
|
2267
2273
|
e && M();
|
|
2268
2274
|
}), B(A, async (e) => {
|
|
2269
2275
|
if (e) {
|
|
2270
|
-
m("open"), await S(),
|
|
2276
|
+
m("open"), await S(), mt(), await L(), ot(), g.value?.focus({ preventScroll: !0 });
|
|
2271
2277
|
return;
|
|
2272
2278
|
}
|
|
2273
2279
|
m("close"), _.value = "", b.value = -1;
|
|
2274
2280
|
}), B(K, () => {
|
|
2275
2281
|
if (A.value) {
|
|
2276
2282
|
if (b.value < 0 || b.value >= K.value.length || K.value[b.value]?.disabled) {
|
|
2277
|
-
|
|
2283
|
+
ot();
|
|
2278
2284
|
return;
|
|
2279
2285
|
}
|
|
2280
2286
|
S(() => {
|
|
2281
|
-
|
|
2287
|
+
it();
|
|
2282
2288
|
});
|
|
2283
2289
|
}
|
|
2284
2290
|
}), E(() => {
|
|
2285
|
-
|
|
2291
|
+
mt(), window.addEventListener("hl-resize", mt), document.addEventListener("pointerdown", bt), document.addEventListener("keydown", vt, !0);
|
|
2286
2292
|
}), T(() => {
|
|
2287
|
-
window.removeEventListener("hl-resize",
|
|
2293
|
+
window.removeEventListener("hl-resize", mt), document.removeEventListener("pointerdown", bt), document.removeEventListener("keydown", vt, !0);
|
|
2288
2294
|
}), (t, n) => (k(), l("div", {
|
|
2289
2295
|
ref_key: "rootRef",
|
|
2290
2296
|
ref: h,
|
|
@@ -2312,12 +2318,12 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2312
2318
|
ref: R(re).ref,
|
|
2313
2319
|
type: "button",
|
|
2314
2320
|
class: C(["hl-control-bg hl-flex hl-w-full hl-items-center hl-gap-1 hl-border hl-border-solid hl-text-left hl-leading-tight hl-transition-colors hl-duration-300 hl-no-focus-ring disabled:hl-cursor-not-allowed disabled:hl-opacity-60 hl-rounded-lg hl-cursor-pointer", [
|
|
2315
|
-
|
|
2321
|
+
Ue.value,
|
|
2316
2322
|
e.inputClass,
|
|
2317
|
-
|
|
2323
|
+
He.value ? "hl-input-error-border-theme focus:hl-input-error-border-theme" : qe.value,
|
|
2318
2324
|
{
|
|
2319
|
-
"hl-theme-text":
|
|
2320
|
-
"hl-theme-text-muted": !
|
|
2325
|
+
"hl-theme-text": Ve.value,
|
|
2326
|
+
"hl-theme-text-muted": !Ve.value,
|
|
2321
2327
|
"hl-border-0 focus:hl-border-0": e.noBorder
|
|
2322
2328
|
}
|
|
2323
2329
|
]]),
|
|
@@ -2326,19 +2332,19 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2326
2332
|
"aria-controls": fe.value,
|
|
2327
2333
|
"aria-labelledby": e.label ? pe.value : void 0,
|
|
2328
2334
|
"aria-haspopup": "listbox",
|
|
2329
|
-
onClick:
|
|
2330
|
-
onKeydown:
|
|
2331
|
-
}, [u("span", yn, [e.multiple &&
|
|
2332
|
-
key:
|
|
2333
|
-
class: C(["hl-inline-flex hl-min-w-0 hl-items-center hl-rounded hl-border hl-border-solid hl-px-1.5 hl-py-0.5 hl-text-xs",
|
|
2335
|
+
onClick: ht,
|
|
2336
|
+
onKeydown: gt
|
|
2337
|
+
}, [u("span", yn, [e.multiple && Le.value.length > 0 ? (k(), l("span", bn, [(k(!0), l(r, null, N(ze.value, (e, t) => (k(), l("span", {
|
|
2338
|
+
key: Me(e, t),
|
|
2339
|
+
class: C(["hl-inline-flex hl-min-w-0 hl-items-center hl-rounded hl-border hl-border-solid hl-px-1.5 hl-py-0.5 hl-text-xs", Ze.value]),
|
|
2334
2340
|
onMouseenter: (t) => le(t, e),
|
|
2335
2341
|
onMouseleave: V
|
|
2336
|
-
}, [u("span", Sn, I(e.label), 1)], 42, xn))), 128)),
|
|
2342
|
+
}, [u("span", Sn, I(e.label), 1)], 42, xn))), 128)), Be.value > 0 ? (k(), l("span", Cn, " +" + I(Be.value) + " more ", 1)) : c("", !0)])) : (k(), l(r, { key: 1 }, [f(I(G.value), 1)], 64))]), u("span", wn, [Ve.value && !e.disabled ? (k(), l("button", {
|
|
2337
2343
|
key: 0,
|
|
2338
2344
|
type: "button",
|
|
2339
2345
|
class: "hl-theme-hover-text hl-flex hl-items-center hl-px-1 hl-theme-text-muted hl-appearance-none hl-border-0 hl-bg-transparent hl-no-focus-ring hl-cursor-pointer",
|
|
2340
2346
|
"aria-label": "Clear selection",
|
|
2341
|
-
onClick: de(
|
|
2347
|
+
onClick: de(dt, ["stop"])
|
|
2342
2348
|
}, [p(W, {
|
|
2343
2349
|
name: "x-mark",
|
|
2344
2350
|
size: 14,
|
|
@@ -2352,11 +2358,11 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2352
2358
|
key: 0,
|
|
2353
2359
|
ref: R(ie).ref,
|
|
2354
2360
|
class: "hanap-labs-theme hanap-labs-font hl-theme-bg hl-theme-border hl-rounded-md hl-border hl-border-solid hl-shadow-none",
|
|
2355
|
-
style: w(
|
|
2361
|
+
style: w(J.value),
|
|
2356
2362
|
id: fe.value,
|
|
2357
2363
|
role: "listbox",
|
|
2358
2364
|
"aria-labelledby": H.value,
|
|
2359
|
-
"aria-activedescendant":
|
|
2365
|
+
"aria-activedescendant": Ke.value
|
|
2360
2366
|
}, [u("div", En, [p(ut, {
|
|
2361
2367
|
ref: Ce,
|
|
2362
2368
|
modelValue: _.value,
|
|
@@ -2367,9 +2373,9 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2367
2373
|
}, null, 8, ["modelValue", "disabled"])]), u("div", {
|
|
2368
2374
|
class: "hl-overflow-y-auto hl-py-1",
|
|
2369
2375
|
style: w({ maxHeight: `${e.maxMenuHeight}px` })
|
|
2370
|
-
}, [K.value.length > 0 ? (k(!0), l(r, { key: 0 }, N(K.value, (t, n) => (k(), l(r, { key:
|
|
2376
|
+
}, [K.value.length > 0 ? (k(!0), l(r, { key: 0 }, N(K.value, (t, n) => (k(), l(r, { key: Me(t, n) }, [q.value >= 0 && n === q.value ? (k(), l("div", Dn)) : c("", !0), u("button", {
|
|
2371
2377
|
type: "button",
|
|
2372
|
-
id:
|
|
2378
|
+
id: Ne(n),
|
|
2373
2379
|
"data-option-index": n,
|
|
2374
2380
|
class: C(["hl-theme-bg hl-flex hl-w-full hl-items-center hl-justify-between hl-gap-2 hl-px-3 hl-py-2 hl-text-left hl-text-sm hl-transition-colors hl-appearance-none hl-border-0 hl-no-focus-ring", [
|
|
2375
2381
|
e.optionClass,
|
|
@@ -2379,35 +2385,35 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2379
2385
|
"hl-theme-text": !t.disabled && !Y(t),
|
|
2380
2386
|
"hl-font-medium": Y(t)
|
|
2381
2387
|
},
|
|
2382
|
-
!t.disabled && Y(t) ?
|
|
2383
|
-
t.disabled ? "" :
|
|
2384
|
-
!t.disabled && b.value === n ?
|
|
2388
|
+
!t.disabled && Y(t) ? Je.value : "",
|
|
2389
|
+
t.disabled ? "" : $e.value,
|
|
2390
|
+
!t.disabled && b.value === n ? et.value : ""
|
|
2385
2391
|
]]),
|
|
2386
2392
|
"aria-selected": Y(t),
|
|
2387
2393
|
disabled: t.disabled,
|
|
2388
|
-
onMouseenter: (e) =>
|
|
2389
|
-
onClick: (e) =>
|
|
2394
|
+
onMouseenter: (e) => yt(n),
|
|
2395
|
+
onClick: (e) => lt(t)
|
|
2390
2396
|
}, [u("span", kn, [e.multiple ? (k(), l("span", {
|
|
2391
2397
|
key: 0,
|
|
2392
|
-
class: C(["hl-theme-border hl-inline-flex hl-shrink-0 hl-items-center hl-justify-center hl-overflow-hidden hl-rounded hl-border hl-border-solid hl-leading-none hl-transition-colors hl-duration-300 hl-size-4", Y(t) ?
|
|
2398
|
+
class: C(["hl-theme-border hl-inline-flex hl-shrink-0 hl-items-center hl-justify-center hl-overflow-hidden hl-rounded hl-border hl-border-solid hl-leading-none hl-transition-colors hl-duration-300 hl-size-4", Y(t) ? Xe.value : Qe.value])
|
|
2393
2399
|
}, [p(W, {
|
|
2394
2400
|
name: "check",
|
|
2395
2401
|
size: 12,
|
|
2396
|
-
color: Y(t) ?
|
|
2402
|
+
color: Y(t) ? tt.value : void 0,
|
|
2397
2403
|
class: C(["hl-transition-opacity hl-duration-300", [Y(t) ? "hl-opacity-100" : "hl-opacity-0"]]),
|
|
2398
2404
|
decorative: !0
|
|
2399
2405
|
}, null, 8, ["color", "class"])], 2)) : c("", !0), u("span", An, [u("span", jn, I(t.label), 1), t.description ? (k(), l("span", Mn, I(t.description), 1)) : c("", !0)])]), Y(t) && !e.multiple ? (k(), l("span", {
|
|
2400
2406
|
key: 0,
|
|
2401
|
-
class: C(["hl-shrink-0 hl-text-xs",
|
|
2407
|
+
class: C(["hl-shrink-0 hl-text-xs", Je.value])
|
|
2402
2408
|
}, [p(W, {
|
|
2403
2409
|
name: "check",
|
|
2404
2410
|
size: 14,
|
|
2405
2411
|
decorative: !0
|
|
2406
|
-
})], 2)) : c("", !0)], 42, On)], 64))), 128)) : (k(), l("p", Nn, I(_.value.trim() ? "No matches found" : "No options available"), 1)),
|
|
2412
|
+
})], 2)) : c("", !0)], 42, On)], 64))), 128)) : (k(), l("p", Nn, I(_.value.trim() ? "No matches found" : "No options available"), 1)), Ge.value ? (k(), l("button", {
|
|
2407
2413
|
key: 2,
|
|
2408
2414
|
type: "button",
|
|
2409
2415
|
class: "hl-theme-text hl-theme-hover-bg-muted hl-mx-2 hl-mb-2 hl-flex hl-w-[calc(100%-1rem)] hl-items-center hl-justify-between hl-rounded-md hl-border-0 hl-bg-transparent hl-px-3 hl-py-2 hl-text-left hl-text-sm hl-appearance-none hl-no-focus-ring",
|
|
2410
|
-
onClick:
|
|
2416
|
+
onClick: pt
|
|
2411
2417
|
}, [u("span", null, "Add \"" + I(_.value.trim()) + "\"", 1), p(W, {
|
|
2412
2418
|
name: "plus",
|
|
2413
2419
|
size: 14,
|
|
@@ -2418,7 +2424,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
|
|
|
2418
2424
|
role: "tooltip"
|
|
2419
2425
|
}), I(oe.value), 17)) : c("", !0)]))
|
|
2420
2426
|
]),
|
|
2421
|
-
|
|
2427
|
+
He.value ? (k(), l("div", Pn, [e.error ? (k(), l("div", Fn, I(e.error), 1)) : c("", !0), (k(!0), l(r, null, N(e.errors, (e) => (k(), l("div", {
|
|
2422
2428
|
key: e,
|
|
2423
2429
|
class: "hl-text-xs hl-input-error-theme"
|
|
2424
2430
|
}, I(e), 1))), 128))])) : c("", !0)
|
|
@@ -4323,7 +4329,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
|
|
|
4323
4329
|
_: 1
|
|
4324
4330
|
}, 8, ["disabled"])) : c("", !0)
|
|
4325
4331
|
], 2)])) : c("", !0),
|
|
4326
|
-
u("div", Si, [u("div", Ci, [u("table", wi, [u("thead", Ti, [u("tr", null, [e.selectable ? (k(), l("th", Ei, [p(
|
|
4332
|
+
u("div", Si, [u("div", Ci, [u("table", wi, [u("thead", Ti, [u("tr", null, [e.selectable ? (k(), l("th", Ei, [p(Y, {
|
|
4327
4333
|
"model-value": M.value,
|
|
4328
4334
|
indeterminate: F.value,
|
|
4329
4335
|
"aria-label": "Toggle all rows",
|
|
@@ -4351,7 +4357,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
|
|
|
4351
4357
|
}, [u("div", { class: C(["hl-theme-bg-muted hl-h-4 hl-rounded", ae(L(e.columnDef.meta).alignment)]) }, null, 2)], 2))), 128))])), 64)) : (k(!0), l(r, { key: 1 }, N(R(w).getRowModel().rows, (n) => (k(), l("tr", {
|
|
4352
4358
|
key: n.id,
|
|
4353
4359
|
class: C(["hl-theme-hover-bg-subtle", { "hl-bg-primary/5": n.getIsSelected() }])
|
|
4354
|
-
}, [e.selectable ? (k(), l("td", ji, [p(
|
|
4360
|
+
}, [e.selectable ? (k(), l("td", ji, [p(Y, {
|
|
4355
4361
|
"model-value": n.getIsSelected(),
|
|
4356
4362
|
"aria-label": "Toggle row",
|
|
4357
4363
|
size: "md",
|
|
@@ -5029,4 +5035,4 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
|
|
|
5029
5035
|
}
|
|
5030
5036
|
});
|
|
5031
5037
|
//#endregion
|
|
5032
|
-
export { U as A, Re as C, be as D, ye as E, Se as O, He as S, W as T,
|
|
5038
|
+
export { U as A, Re as C, be as D, ye as E, Se as O, He as S, W as T, Y as _, Ln as a, J as b, hn as c, Zt as d, Xt as f, ut as g, Pt as h, Gn as i, xe as k, ln as l, Bt as m, Wi as n, In as o, Wt as p, Ri as r, gn as s, xa as t, cn as u, Ye as v, Me as w, Ue as x, Ge as y };
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../chunks/components-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, O as i, S as a, T as o, _ as s, a as c, b as l, c as u, d, f, g as p, h as m, i as h, k as g, l as _, m as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T, v as E, w as D, x as O, y as k } from "../chunks/components-CW8EKPet.js";
|
|
2
2
|
export { a as HLAvatar, O as HLBadge, D as HLBreadcrumb, l as HLButton, k as HLCard, s as HLCheckbox, w as HLDatepicker, o as HLIcon, p as HLInput, E as HLLabel, m as HLMenuAction, x as HLNotify, v as HLNotifyToast, _ as HLPopup, T as HLPopupContent, b as HLSelect, c as HLSkeleton, S as HLTable, h as HLTabs, y as HLTextarea, r as HL_ICON_NAMES, d as createNotifyPlugin, C as createPopupPlugin, n as getHLIconSvg, i as listHLIconNames, g as registerHLIcon, f as unmountNotifyHost, u as unmountPopupHost, e as unregisterHLIcon, t as useBreadcrumb };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c } from "./chunks/composables-DYxDGCpw.js";
|
|
2
|
-
import { A as l, C as u, D as d, E as f, O as ee, S as te, T as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./chunks/components-
|
|
2
|
+
import { A as l, C as u, D as d, E as f, O as ee, S as te, T as ne, _ as re, a as ie, b as ae, c as oe, d as se, f as ce, g as le, h as ue, i as de, k as fe, l as pe, m as me, n as he, o as ge, p as _e, r as ve, s as ye, t as be, u as xe, v as Se, w as Ce, x as we, y as Te } from "./chunks/components-CW8EKPet.js";
|
|
3
3
|
import { n as Ee, r as De, t as Oe } from "./chunks/usePopup-CbluSYxf.js";
|
|
4
4
|
import { t as ke } from "./chunks/helpers-BjMDD0mP.js";
|
|
5
5
|
import { createToolkitAutoImportModules as Ae, createToolkitAutoImportOptions as je, createToolkitComponentsResolver as Me } from "./auto-import/index.js";
|