hanap-labs 7.3.0 → 7.5.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.
@@ -110,19 +110,19 @@ function be(e) {
110
110
  function xe(e, t) {
111
111
  e && (ve[e] = t);
112
112
  }
113
- function Se(e) {
113
+ function U(e) {
114
114
  delete ve[e];
115
115
  }
116
- function Ce() {
116
+ function Se() {
117
117
  return Object.freeze(Object.keys(ve).sort());
118
118
  }
119
119
  //#endregion
120
120
  //#region src/components/hl-icon/HLIcon.vue?vue&type=script&setup=true&lang.ts
121
- var we = [
121
+ var Ce = [
122
122
  "role",
123
123
  "aria-label",
124
124
  "aria-hidden"
125
- ], Te = ["title", "innerHTML"], Ee = ["title"], De = /* @__PURE__ */ h({
125
+ ], we = ["title", "innerHTML"], Te = ["title"], Ee = /* @__PURE__ */ h({
126
126
  name: "HLIcon",
127
127
  __name: "HLIcon",
128
128
  props: {
@@ -260,24 +260,24 @@ var we = [
260
260
  class: "hl-icon__svg hl-inline-flex hl-size-full",
261
261
  title: e.title || void 0,
262
262
  innerHTML: p.value
263
- }, null, 8, Te)) : (k(), l("span", {
263
+ }, null, 8, we)) : (k(), l("span", {
264
264
  key: 1,
265
265
  class: "hl-inline-flex hl-size-full hl-items-center hl-justify-center hl-rounded hl-border hl-border-solid hl-border-danger hl-text-[10px] hl-text-danger",
266
266
  title: `Icon '${e.name}' is not found`
267
- }, " ? ", 8, Ee))], 14, we));
267
+ }, " ? ", 8, Te))], 14, Ce));
268
268
  }
269
- }), Oe = (e, t) => {
269
+ }), De = (e, t) => {
270
270
  let n = e.__vccOpts || e;
271
271
  for (let [e, r] of t) n[e] = r;
272
272
  return n;
273
- }, U = /* @__PURE__ */ Oe(De, [["__scopeId", "data-v-db47f9a8"]]), ke = {
273
+ }, W = /* @__PURE__ */ De(Ee, [["__scopeId", "data-v-db47f9a8"]]), Oe = {
274
274
  "aria-label": "Breadcrumb",
275
275
  class: "hanap-labs-theme hanap-labs-font"
276
- }, Ae = { class: "hl-flex hl-items-center hl-text-sm" }, je = {
276
+ }, ke = { class: "hl-flex hl-items-center hl-text-sm" }, Ae = {
277
277
  key: 1,
278
278
  class: "hl-mx-1 hl-theme-text-muted",
279
279
  "aria-hidden": "true"
280
- }, Me = ["href"], Ne = /* @__PURE__ */ h({
280
+ }, je = ["href"], Me = /* @__PURE__ */ h({
281
281
  name: "HLBreadcrumb",
282
282
  __name: "HLBreadcrumb",
283
283
  props: {
@@ -312,17 +312,17 @@ var we = [
312
312
  dark: "hover:hl-theme-hover-text",
313
313
  muted: "hover:hl-text-muted"
314
314
  }, i = o(() => e.activeColor ? t[e.activeColor] : "hl-theme-text"), a = o(() => e.activeColor ? n[e.activeColor] : "hl-theme-hover-text");
315
- return (t, n) => (k(), l("nav", ke, [u("ol", Ae, [(k(!0), l(r, null, N(e.items, (t, n) => (k(), l("li", {
315
+ return (t, n) => (k(), l("nav", Oe, [u("ol", ke, [(k(!0), l(r, null, N(e.items, (t, n) => (k(), l("li", {
316
316
  key: `${n}-${t.label}-${t.href ?? ""}`,
317
317
  class: "hl-flex hl-items-center"
318
- }, [n > 0 ? (k(), l(r, { key: 0 }, [e.separatorType === "icon" ? (k(), s(U, {
318
+ }, [n > 0 ? (k(), l(r, { key: 0 }, [e.separatorType === "icon" ? (k(), s(W, {
319
319
  key: 0,
320
320
  name: e.separatorIconName,
321
321
  size: "16px",
322
322
  color: "muted",
323
323
  class: "hl-mx-1",
324
324
  decorative: ""
325
- }, null, 8, ["name"])) : (k(), l("span", je, I(e.separator), 1))], 64)) : c("", !0), t.href && e.linkComponent ? (k(), s(F(e.linkComponent), {
325
+ }, null, 8, ["name"])) : (k(), l("span", Ae, I(e.separator), 1))], 64)) : c("", !0), t.href && e.linkComponent ? (k(), s(F(e.linkComponent), {
326
326
  key: 1,
327
327
  to: t.href,
328
328
  class: C(["hl-theme-text hl-no-underline hl-transition-colors hover:hl-no-underline", a.value])
@@ -333,12 +333,12 @@ var we = [
333
333
  key: 2,
334
334
  href: t.href,
335
335
  class: C(["hl-theme-text hl-no-underline hl-transition-colors hover:hl-no-underline", a.value])
336
- }, I(t.label), 11, Me)) : (k(), l("span", {
336
+ }, I(t.label), 11, je)) : (k(), l("span", {
337
337
  key: 3,
338
338
  class: C(["hl-font-semibold", t.isActive ? i.value : "hl-theme-text"])
339
339
  }, I(t.label), 3))]))), 128))])]));
340
340
  }
341
- }), W = {
341
+ }), Ne = {
342
342
  dashboardLabel: "Home",
343
343
  routeNameMap: {},
344
344
  routeHrefMap: {},
@@ -348,26 +348,26 @@ var we = [
348
348
  uuidPattern: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,
349
349
  uuidFallbackLabel: "Details"
350
350
  }, Pe = (e = {}) => ({
351
- ...W,
351
+ ...Ne,
352
352
  ...e,
353
353
  routeNameMap: {
354
- ...W.routeNameMap,
354
+ ...Ne.routeNameMap,
355
355
  ...e.routeNameMap
356
356
  },
357
357
  routeHrefMap: {
358
- ...W.routeHrefMap,
358
+ ...Ne.routeHrefMap,
359
359
  ...e.routeHrefMap
360
360
  },
361
361
  addLabelByParent: {
362
- ...W.addLabelByParent,
362
+ ...Ne.addLabelByParent,
363
363
  ...e.addLabelByParent
364
364
  },
365
365
  createLabelByRootSegment: {
366
- ...W.createLabelByRootSegment,
366
+ ...Ne.createLabelByRootSegment,
367
367
  ...e.createLabelByRootSegment
368
368
  },
369
369
  pathOverrides: {
370
- ...W.pathOverrides,
370
+ ...Ne.pathOverrides,
371
371
  ...e.pathOverrides
372
372
  }
373
373
  }), Fe = (e) => {
@@ -428,7 +428,7 @@ var ze = [
428
428
  ], Be = ["src", "alt"], Ve = {
429
429
  key: 1,
430
430
  class: "hl-box-border hl-whitespace-nowrap hl-truncate"
431
- }, G = /* @__PURE__ */ h({
431
+ }, He = /* @__PURE__ */ h({
432
432
  name: "HLAvatar",
433
433
  __name: "HLAvatar",
434
434
  props: {
@@ -535,7 +535,7 @@ var ze = [
535
535
  class: "hl-box-border hl-size-full hl-rounded-full hl-object-cover"
536
536
  }, null, 8, Be)) : (k(), l("span", Ve, I(p.value), 1))], 6)], 10, ze));
537
537
  }
538
- }), K = "hl-bg-transparent hl-border hl-border-solid", He = /* @__PURE__ */ h({
538
+ }), G = "hl-bg-transparent hl-border hl-border-solid", Ue = /* @__PURE__ */ h({
539
539
  name: "HLBadge",
540
540
  __name: "HLBadge",
541
541
  props: {
@@ -563,16 +563,16 @@ var ze = [
563
563
  dark: "hl-bg-dark hl-text-badge-dark",
564
564
  muted: "hl-bg-muted hl-text-badge-muted"
565
565
  }, n = {
566
- primary: `${K} hl-text-badge-outline-primary hl-border-primary`,
567
- secondary: `${K} hl-text-badge-outline-secondary hl-border-secondary`,
568
- tertiary: `${K} hl-text-badge-outline-tertiary hl-border-tertiary`,
569
- success: `${K} hl-text-badge-outline-success hl-border-success`,
570
- danger: `${K} hl-text-badge-outline-danger hl-border-danger`,
571
- warning: `${K} hl-text-badge-outline-warning hl-border-warning`,
572
- info: `${K} hl-text-badge-outline-info hl-border-info`,
573
- light: `${K} hl-text-badge-outline-light hl-border-light`,
574
- dark: `${K} hl-text-badge-outline-dark hl-border-dark`,
575
- muted: `${K} hl-text-badge-outline-muted hl-border-muted`
566
+ primary: `${G} hl-text-badge-outline-primary hl-border-primary`,
567
+ secondary: `${G} hl-text-badge-outline-secondary hl-border-secondary`,
568
+ tertiary: `${G} hl-text-badge-outline-tertiary hl-border-tertiary`,
569
+ success: `${G} hl-text-badge-outline-success hl-border-success`,
570
+ danger: `${G} hl-text-badge-outline-danger hl-border-danger`,
571
+ warning: `${G} hl-text-badge-outline-warning hl-border-warning`,
572
+ info: `${G} hl-text-badge-outline-info hl-border-info`,
573
+ light: `${G} hl-text-badge-outline-light hl-border-light`,
574
+ dark: `${G} hl-text-badge-outline-dark hl-border-dark`,
575
+ muted: `${G} hl-text-badge-outline-muted hl-border-muted`
576
576
  }, i = {
577
577
  xs: "hl-px-1.5 hl-py-0.5 hl-text-[10px]",
578
578
  sm: "hl-px-2 hl-py-0.5 hl-text-xs",
@@ -583,7 +583,7 @@ var ze = [
583
583
  sm: "hl-rounded-md",
584
584
  md: "hl-rounded-md",
585
585
  lg: "hl-rounded-lg"
586
- }, c = re(), u = o(() => c.default !== void 0), d = o(() => e.color ? e.variant === "outline" ? n[e.color] : t[e.color] : e.variant === "outline" ? `${K} hl-theme-border hl-theme-text` : "hl-bg-transparent hl-theme-text"), p = o(() => i[e.size]), m = o(() => e.rounded ? "hl-rounded-full" : a[e.size]);
586
+ }, c = re(), u = o(() => c.default !== void 0), d = o(() => e.color ? e.variant === "outline" ? n[e.color] : t[e.color] : e.variant === "outline" ? `${G} hl-theme-border hl-theme-text` : "hl-bg-transparent hl-theme-text"), p = o(() => i[e.size]), m = o(() => e.rounded ? "hl-rounded-full" : a[e.size]);
587
587
  return (t, n) => (k(), s(F(e.tag), {
588
588
  class: C(["hanap-labs-theme hanap-labs-font hl-inline-flex hl-items-center hl-justify-center hl-font-medium", [
589
589
  d.value,
@@ -596,7 +596,7 @@ var ze = [
596
596
  _: 3
597
597
  }, 8, ["class", "aria-label"]));
598
598
  }
599
- }), Ue = ["type", "disabled"], We = {
599
+ }), K = ["type", "disabled"], We = {
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", We, [p(U, {
696
+ }, [P(t.$slots, "icon")], 2)) : c("", !0), e.loading ? (k(), l("span", We, [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, Ue));
703
+ }, [P(t.$slots, "default", {}, () => [f(I(e.label), 1)])], 2))], 16, K));
704
704
  }
705
705
  }), Ge = /* @__PURE__ */ h({
706
706
  name: "HLCard",
@@ -773,10 +773,10 @@ var ze = [
773
773
  "aria-labelledby",
774
774
  "disabled",
775
775
  "data-checked"
776
- ], Y = {
776
+ ], Qe = {
777
777
  key: 1,
778
778
  class: "hl-sr-only"
779
- }, Qe = ["id", "disabled"], $e = "hl-bg-light", et = "hl-bg-primary", tt = /* @__PURE__ */ Oe(/* @__PURE__ */ h({
779
+ }, $e = ["id", "disabled"], et = "hl-bg-light", Y = "hl-bg-primary", tt = /* @__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 ? et : $e), T = o(() => {
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 ? Y : 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;
@@ -871,7 +871,7 @@ var ze = [
871
871
  "data-checked": t.value || void 0,
872
872
  class: C(["hanap-labs-font hl-no-focus-ring hl-inline-flex hl-w-full hl-appearance-none hl-border-0 hl-items-start hl-gap-3 hl-rounded-md hl-bg-transparent hl-text-left hl-transition-all hl-duration-300", e.disabled ? "hl-cursor-not-allowed hl-opacity-50" : "hl-cursor-pointer"]),
873
873
  onClick: c
874
- }, [u("span", { class: C(["hl-mt-0.5 hl-inline-flex hl-shrink-0 hl-items-center hl-justify-center hl-overflow-hidden hl-rounded hl-leading-none hl-transition-colors hl-duration-300", [y.value, w.value]]) }, [p(U, {
874
+ }, [u("span", { class: C(["hl-mt-0.5 hl-inline-flex hl-shrink-0 hl-items-center hl-justify-center hl-overflow-hidden hl-rounded hl-leading-none hl-transition-colors hl-duration-300", [y.value, w.value]]) }, [p(W, {
875
875
  name: "check",
876
876
  size: b.value,
877
877
  color: T.value,
@@ -898,13 +898,13 @@ var ze = [
898
898
  "size",
899
899
  "label-class",
900
900
  "description-class"
901
- ])) : (k(), l("span", Y, "toggle checkbox"))], 10, Ze), ue(u("input", {
901
+ ])) : (k(), l("span", Qe, "toggle checkbox"))], 10, Ze), ue(u("input", {
902
902
  id: r.value,
903
903
  "onUpdate:modelValue": o[0] ||= (e) => t.value = e,
904
904
  type: "checkbox",
905
905
  class: "hl-sr-only",
906
906
  disabled: e.disabled
907
- }, null, 8, Qe), [[ae, t.value]])]));
907
+ }, null, 8, $e), [[ae, t.value]])]));
908
908
  }
909
909
  }), [["__scopeId", "data-v-a03b1742"]]), nt = { class: "hanap-labs-theme hanap-labs-font hl-w-full" }, rt = { class: "hl-relative" }, it = {
910
910
  key: 0,
@@ -931,7 +931,7 @@ var ze = [
931
931
  }, st = ["aria-label", "aria-pressed"], ct = ["id"], lt = {
932
932
  key: 0,
933
933
  class: "hl-text-xs hl-input-error-theme"
934
- }, ut = /* @__PURE__ */ Oe(/* @__PURE__ */ h({
934
+ }, ut = /* @__PURE__ */ De(/* @__PURE__ */ h({
935
935
  name: "HLInput",
936
936
  __name: "HLInput",
937
937
  props: /* @__PURE__ */ b({
@@ -1099,7 +1099,7 @@ var ze = [
1099
1099
  onInput: a[3] ||= (e) => i("input"),
1100
1100
  onChange: a[4] ||= (e) => i("change")
1101
1101
  }, null, 46, at), [[oe, n.value]]),
1102
- e.loading ? (k(), l("div", ot, [p(U, {
1102
+ e.loading ? (k(), l("div", ot, [p(W, {
1103
1103
  name: "spinner",
1104
1104
  size: 20,
1105
1105
  class: "hl-animate-spin",
@@ -1110,7 +1110,7 @@ var ze = [
1110
1110
  class: "hl-absolute hl-inset-y-0 hl-right-0 hl-flex hl-items-center hl-pr-3 hl-appearance-none hl-border-0 hl-bg-transparent hl-p-0 hl-theme-text-muted hover:hl-text-primary hl-no-focus-ring hl-cursor-pointer",
1111
1111
  "aria-label": "Clear value",
1112
1112
  onClick: S
1113
- }, [p(U, {
1113
+ }, [p(W, {
1114
1114
  name: "x-mark",
1115
1115
  size: 16,
1116
1116
  decorative: !0,
@@ -1122,7 +1122,7 @@ var ze = [
1122
1122
  "aria-label": g.value ? "Hide password" : "Show password",
1123
1123
  "aria-pressed": g.value,
1124
1124
  onClick: b
1125
- }, [p(U, {
1125
+ }, [p(W, {
1126
1126
  name: g.value ? "hide" : "view",
1127
1127
  size: 18,
1128
1128
  decorative: !0,
@@ -1440,7 +1440,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1440
1440
  "aria-haspopup": "menu",
1441
1441
  onClick: O
1442
1442
  }, {
1443
- icon: V(() => [t.$slots.trigger ? P(t.$slots, "trigger", { key: 0 }) : (k(), s(U, {
1443
+ icon: V(() => [t.$slots.trigger ? P(t.$slots, "trigger", { key: 0 }) : (k(), s(W, {
1444
1444
  key: 1,
1445
1445
  name: "three-dots",
1446
1446
  class: "hl-size-5",
@@ -1474,7 +1474,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1474
1474
  onClick: (e) => A(t)
1475
1475
  }, d({ _: 2 }, [t.icon && !t.loading ? {
1476
1476
  name: "icon",
1477
- fn: V(() => [p(U, {
1477
+ fn: V(() => [p(W, {
1478
1478
  name: t.icon,
1479
1479
  size: 18,
1480
1480
  decorative: !0
@@ -1491,7 +1491,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1491
1491
  }), Ft = { class: "hl-min-w-0 hl-flex-1 hl-self-center hl-flex hl-flex-col hl-gap-0.5" }, It = { class: "hl-m-0 hl-truncate hl-text-[15px] hl-font-semibold hl-leading-[1.2] hl-theme-text" }, Lt = ["innerHTML"], Rt = {
1492
1492
  key: 1,
1493
1493
  class: "hl-m-0 hl-break-words hl-text-sm hl-leading-[1.35] hl-theme-text-subtle"
1494
- }, zt = { class: "hl-relative hl-size-8 hl-shrink-0" }, Bt = /* @__PURE__ */ Oe(/* @__PURE__ */ h({
1494
+ }, zt = { class: "hl-relative hl-size-8 hl-shrink-0" }, Bt = /* @__PURE__ */ De(/* @__PURE__ */ h({
1495
1495
  name: "HLNotifyToast",
1496
1496
  __name: "HLNotifyToast",
1497
1497
  props: {
@@ -1584,7 +1584,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1584
1584
  u("div", {
1585
1585
  class: "hl-flex hl-size-9 hl-shrink-0 hl-items-center hl-justify-center hl-rounded-full",
1586
1586
  style: w(a.value.iconWrapperStyle)
1587
- }, [p(U, {
1587
+ }, [p(W, {
1588
1588
  name: a.value.iconName,
1589
1589
  color: a.value.iconColor,
1590
1590
  class: C(a.value.iconSizeClass),
@@ -1618,7 +1618,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1618
1618
  "aria-label": "close notification",
1619
1619
  onClick: m
1620
1620
  }, {
1621
- icon: V(() => [p(U, {
1621
+ icon: V(() => [p(W, {
1622
1622
  name: "x-mark",
1623
1623
  class: "!hl-size-4",
1624
1624
  decorative: !0
@@ -1766,7 +1766,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
1766
1766
  default: V(() => [m.value ? (k(), l("div", {
1767
1767
  key: 0,
1768
1768
  class: C(["hl-relative hl-z-10 hl-flex hl-w-full hl-items-start hl-justify-center hl-px-4 hl-pointer-events-none", e.containerClass])
1769
- }, [u("div", $t, [e.type === "confirm" ? (k(), l("div", en, [u("div", tn, [E.value ? (k(), l("div", nn, [E.value ? (k(), s(U, {
1769
+ }, [u("div", $t, [e.type === "confirm" ? (k(), l("div", en, [u("div", tn, [E.value ? (k(), l("div", nn, [E.value ? (k(), s(W, {
1770
1770
  key: 0,
1771
1771
  name: w.value,
1772
1772
  source: T.value,
@@ -2028,14 +2028,14 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2028
2028
  dark: "light",
2029
2029
  muted: "light"
2030
2030
  };
2031
- function Se(e) {
2031
+ function U(e) {
2032
2032
  return typeof e == "string" && Object.prototype.hasOwnProperty.call(he, e);
2033
2033
  }
2034
- function Ce(e) {
2034
+ function Se(e) {
2035
2035
  return e instanceof HTMLElement ? e : e && "$el" in e && e.$el instanceof HTMLElement ? e.$el : null;
2036
2036
  }
2037
- function we(e) {
2038
- let t = Ce(e);
2037
+ function Ce(e) {
2038
+ let t = Se(e);
2039
2039
  if (!t) {
2040
2040
  g.value = null;
2041
2041
  return;
@@ -2046,157 +2046,167 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2046
2046
  }
2047
2047
  g.value = t.querySelector("input");
2048
2048
  }
2049
- function Te(e) {
2049
+ function we(e) {
2050
2050
  return Object.prototype.toString.call(e) === "[object Object]";
2051
2051
  }
2052
- function Ee(e, t) {
2052
+ function Te(e, t) {
2053
2053
  if (e === t) return !0;
2054
- if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length ? e.every((e, n) => Ee(e, t[n])) : !1;
2055
- if (Te(e) && Te(t)) {
2054
+ if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length ? e.every((e, n) => Te(e, t[n])) : !1;
2055
+ if (we(e) && we(t)) {
2056
2056
  let n = Object.keys(e), r = Object.keys(t);
2057
- return n.length === r.length ? n.every((n) => Ee(e[n], t[n])) : !1;
2057
+ return n.length === r.length ? n.every((n) => Te(e[n], t[n])) : !1;
2058
2058
  }
2059
2059
  return !1;
2060
2060
  }
2061
- function De(e, t) {
2061
+ function Ee(e) {
2062
+ return we(e) && "label" in e && typeof e.label == "string" && "value" in e;
2063
+ }
2064
+ function De(e) {
2065
+ return e === null ? null : Array.isArray(e) ? e.map((e) => Ee(e) ? e.value : e) : Ee(e) ? e.value : e;
2066
+ }
2067
+ function Oe(e, t) {
2062
2068
  return Object.keys(t).every((n) => {
2063
2069
  if (!(n in e)) return !1;
2064
2070
  let r = e[n], i = t[n];
2065
- return Te(r) && Te(i) ? De(r, i) : Ee(r, i);
2071
+ return we(r) && we(i) ? Oe(r, i) : Te(r, i);
2066
2072
  });
2067
2073
  }
2068
- function Oe(e, t) {
2069
- return Ee(e, t) ? !0 : Te(e) && Te(t) ? De(t, e) : !1;
2074
+ function ke(e, t) {
2075
+ return Te(e, t) ? !0 : we(e) && we(t) ? Oe(t, e) : !1;
2070
2076
  }
2071
- function ke(e) {
2072
- return Array.isArray(e) ? `[${e.map((e) => ke(e)).join(",")}]` : Te(e) ? `{${Object.keys(e).sort().map((t) => `${t}:${ke(e[t])}`).join(",")}}` : String(e);
2077
+ function Ae(e) {
2078
+ return Array.isArray(e) ? `[${e.map((e) => Ae(e)).join(",")}]` : we(e) ? `{${Object.keys(e).sort().map((t) => `${t}:${Ae(e[t])}`).join(",")}}` : String(e);
2073
2079
  }
2074
- function Ae(e, t) {
2075
- return `${e.label}-${ke(e.value)}-${t}`;
2080
+ function je(e, t) {
2081
+ return `${e.label}-${Ae(e.value)}-${t}`;
2076
2082
  }
2077
- function je(e) {
2083
+ function Me(e) {
2078
2084
  return `${fe.value}-option-${e}`;
2079
2085
  }
2080
- let Me = o(() => {
2086
+ let Ne = o(() => {
2081
2087
  let t = /* @__PURE__ */ new Map();
2082
- for (let n of [...e.options, ...v.value]) t.set(ke(n.value), n);
2088
+ for (let n of [...e.options, ...v.value]) t.set(Ae(n.value), n);
2083
2089
  return Array.from(t.values());
2084
- }), Ne = o(() => e.multiple ? Array.isArray(d.value) ? d.value : [] : d.value === null ? [] : [d.value]), W = o(() => Me.value.filter((e) => Ne.value.some((t) => Oe(e.value, t)))), Pe = o(() => Number.isFinite(e.maxVisiblePills) ? Math.max(0, Math.floor(e.maxVisiblePills)) : 1), Fe = o(() => e.multiple ? W.value.slice(0, Pe.value) : []), Ie = o(() => e.multiple ? Math.max(0, W.value.length - Fe.value.length) : 0), Le = o(() => Ne.value.length > 0), Re = o(() => !!e.error || e.errors.length > 0), ze = o(() => e.multiple ? W.value.length === 0 ? e.placeholder : W.value.length === 1 ? W.value[0].label : `${W.value.length} selected` : W.value[0]?.label ?? e.placeholder), Be = o(() => me[e.size]), Ve = o(() => {
2090
+ }), Pe = (e) => Ee(e) ? e.value : e, Fe = o(() => {
2091
+ let t = d.value;
2092
+ return e.multiple ? Array.isArray(t) ? t.map(Pe) : [] : t === null ? [] : [Pe(t)];
2093
+ }), Ie = o(() => Ne.value.filter((e) => Fe.value.some((t) => ke(e.value, t)))), Le = o(() => Number.isFinite(e.maxVisiblePills) ? Math.max(0, Math.floor(e.maxVisiblePills)) : 1), Re = o(() => e.multiple ? Ie.value.slice(0, Le.value) : []), ze = o(() => e.multiple ? Math.max(0, Ie.value.length - Re.value.length) : 0), Be = o(() => Fe.value.length > 0), Ve = o(() => !!e.error || e.errors.length > 0), He = o(() => e.multiple ? Ie.value.length === 0 ? e.placeholder : Ie.value.length === 1 ? Ie.value[0].label : `${Ie.value.length} selected` : Ie.value[0]?.label ?? e.placeholder), G = o(() => me[e.size]), Ue = o(() => {
2085
2094
  let e = _.value.trim().toLowerCase();
2086
- return e ? Me.value.filter((t) => t.label.toLowerCase().includes(e)) : Me.value;
2087
- }), G = o(() => {
2088
- if (!e.multiple) return Ve.value;
2095
+ return e ? Ne.value.filter((t) => t.label.toLowerCase().includes(e)) : Ne.value;
2096
+ }), K = o(() => {
2097
+ if (!e.multiple) return Ue.value;
2089
2098
  let t = [], n = [];
2090
- for (let e of Ve.value) Y(e) ? t.push(e) : n.push(e);
2099
+ for (let e of Ue.value) Y(e) ? t.push(e) : n.push(e);
2091
2100
  return [...t, ...n];
2092
- }), K = o(() => {
2101
+ }), We = o(() => {
2093
2102
  if (!e.multiple) return -1;
2094
- let t = G.value.filter((e) => Y(e)).length;
2095
- return t > 0 && t < G.value.length ? t : -1;
2096
- }), He = o(() => ({
2103
+ let t = K.value.filter((e) => Y(e)).length;
2104
+ return t > 0 && t < K.value.length ? t : -1;
2105
+ }), q = o(() => ({
2097
2106
  ...te.value,
2098
2107
  width: y.value > 0 ? `${y.value}px` : void 0,
2099
2108
  zIndex: 60
2100
- })), Ue = o(() => {
2109
+ })), J = o(() => {
2101
2110
  let t = _.value.trim();
2102
- return !e.allowCreateWhenNoMatch || !t || Ve.value.length > 0 ? !1 : !Me.value.some((e) => e.label.toLowerCase() === t.toLowerCase());
2103
- }), We = o(() => {
2104
- if (!(b.value < 0) && !(b.value >= G.value.length)) return je(b.value);
2105
- }), q = o(() => Se(e.color) ? he[e.color] : "hl-theme-border"), J = o(() => Se(e.color) ? ge[e.color] : "hl-theme-text"), Ge = o(() => Se(e.color) ? _e[e.color] : "hl-border-dark hl-bg-dark hl-text-white"), Ke = o(() => Se(e.color) ? _e[e.color] : "hl-theme-border hl-theme-bg-muted hl-theme-text"), qe = o(() => Se(e.color) ? ve[e.color] : "hl-theme-bg-muted hl-theme-border-strong"), Je = o(() => Se(e.color) ? ye[e.color] : "hover:hl-theme-bg-subtle"), Xe = o(() => Se(e.color) ? be[e.color] : "hl-theme-bg-muted"), Ze = o(() => {
2106
- if (Se(e.color)) return xe[e.color];
2111
+ return !e.allowCreateWhenNoMatch || !t || Ue.value.length > 0 ? !1 : !Ne.value.some((e) => e.label.toLowerCase() === t.toLowerCase());
2112
+ }), Ge = o(() => {
2113
+ if (!(b.value < 0) && !(b.value >= K.value.length)) return Me(b.value);
2114
+ }), Ke = o(() => U(e.color) ? he[e.color] : "hl-theme-border"), qe = o(() => U(e.color) ? ge[e.color] : "hl-theme-text"), Je = o(() => U(e.color) ? _e[e.color] : "hl-border-dark hl-bg-dark hl-text-white"), Xe = o(() => U(e.color) ? _e[e.color] : "hl-theme-border hl-theme-bg-muted hl-theme-text"), Ze = o(() => U(e.color) ? ve[e.color] : "hl-theme-bg-muted hl-theme-border-strong"), Qe = o(() => U(e.color) ? ye[e.color] : "hover:hl-theme-bg-subtle"), $e = o(() => U(e.color) ? be[e.color] : "hl-theme-bg-muted"), et = o(() => {
2115
+ if (U(e.color)) return xe[e.color];
2107
2116
  });
2108
2117
  function Y(e) {
2109
- return Ne.value.some((t) => Oe(e.value, t));
2118
+ return Fe.value.some((t) => ke(e.value, t));
2110
2119
  }
2111
- function Qe(e) {
2112
- d.value = e, m("change", e);
2120
+ function tt(e) {
2121
+ let t = De(e);
2122
+ d.value = t, m("change", t);
2113
2123
  }
2114
- function $e() {
2124
+ function nt() {
2115
2125
  let e = [];
2116
- return G.value.forEach((t, n) => {
2126
+ return K.value.forEach((t, n) => {
2117
2127
  t.disabled || e.push(n);
2118
2128
  }), e;
2119
2129
  }
2120
- function et() {
2130
+ function rt() {
2121
2131
  if (!O.value || b.value < 0) return;
2122
2132
  let e = `[data-option-index="${b.value}"]`, t = O.value.querySelector(e);
2123
2133
  t instanceof HTMLElement && t.scrollIntoView({ block: "nearest" });
2124
2134
  }
2125
- function tt(e) {
2135
+ function it(e) {
2126
2136
  b.value = e, S(() => {
2127
- et();
2137
+ rt();
2128
2138
  });
2129
2139
  }
2130
- function nt() {
2131
- let e = $e();
2140
+ function at() {
2141
+ let e = nt();
2132
2142
  if (e.length === 0) {
2133
- tt(-1);
2143
+ it(-1);
2134
2144
  return;
2135
2145
  }
2136
- let t = G.value.findIndex((e) => !e.disabled && Y(e));
2137
- tt(t >= 0 ? t : e[0]);
2146
+ let t = K.value.findIndex((e) => !e.disabled && Y(e));
2147
+ it(t >= 0 ? t : e[0]);
2138
2148
  }
2139
- function rt(e) {
2140
- let t = $e();
2149
+ function ot(e) {
2150
+ let t = nt();
2141
2151
  if (t.length === 0) {
2142
- tt(-1);
2152
+ it(-1);
2143
2153
  return;
2144
2154
  }
2145
2155
  if (b.value < 0) {
2146
- tt(e === 1 ? t[0] : t[t.length - 1]);
2156
+ it(e === 1 ? t[0] : t[t.length - 1]);
2147
2157
  return;
2148
2158
  }
2149
2159
  let n = t.indexOf(b.value);
2150
2160
  if (n < 0) {
2151
- tt(e === 1 ? t[0] : t[t.length - 1]);
2161
+ it(e === 1 ? t[0] : t[t.length - 1]);
2152
2162
  return;
2153
2163
  }
2154
- tt(t[(n + e + t.length) % t.length]);
2164
+ it(t[(n + e + t.length) % t.length]);
2155
2165
  }
2156
- function it() {
2166
+ function st() {
2157
2167
  if (b.value < 0) return;
2158
- let e = G.value[b.value];
2159
- !e || e.disabled || at(e);
2168
+ let e = K.value[b.value];
2169
+ !e || e.disabled || ct(e);
2160
2170
  }
2161
- function at(t) {
2171
+ function ct(t) {
2162
2172
  if (!(t.disabled || e.disabled)) {
2163
2173
  if (e.multiple) {
2164
- let e = Array.isArray(d.value) ? [...d.value] : [];
2165
- Qe(e.some((e) => Oe(t.value, e)) ? e.filter((e) => !Oe(t.value, e)) : [...e, t.value]);
2174
+ let e = (Array.isArray(d.value) ? d.value : []).map(Pe);
2175
+ tt(e.some((e) => ke(t.value, e)) ? e.filter((e) => !ke(t.value, e)) : [...e, t.value]);
2166
2176
  return;
2167
2177
  }
2168
- Qe(t.value), M();
2178
+ tt(t.value), M();
2169
2179
  }
2170
2180
  }
2171
- function ot() {
2172
- Qe(e.multiple ? [] : null), _.value = "", M();
2181
+ function lt() {
2182
+ tt(e.multiple ? [] : null), _.value = "", M();
2173
2183
  }
2174
- function st(e) {
2184
+ function dt(e) {
2175
2185
  return e.trim().toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "");
2176
2186
  }
2177
- function ct() {
2187
+ function ft() {
2178
2188
  let t = _.value.trim();
2179
- if (!t || !Ue.value) return;
2189
+ if (!t || !J.value) return;
2180
2190
  let n = {
2181
2191
  label: t,
2182
- value: st(t) || t.toLowerCase()
2192
+ value: dt(t) || t.toLowerCase()
2183
2193
  }, r = {
2184
2194
  label: t,
2185
2195
  value: n
2186
2196
  };
2187
2197
  if (v.value = [...v.value, r], m("create", n), e.multiple) {
2188
- Qe([...Array.isArray(d.value) ? [...d.value] : [], n]), _.value = "";
2198
+ tt([...Array.isArray(d.value) ? [...d.value] : [], n]), _.value = "";
2189
2199
  return;
2190
2200
  }
2191
- Qe(n), _.value = "", M();
2201
+ tt(n), _.value = "", M();
2192
2202
  }
2193
- function lt() {
2203
+ function pt() {
2194
2204
  y.value = D.value?.offsetWidth ?? 0;
2195
2205
  }
2196
- function dt() {
2206
+ function mt() {
2197
2207
  e.disabled || F();
2198
2208
  }
2199
- function ft(t) {
2209
+ function ht(t) {
2200
2210
  if (!e.disabled) {
2201
2211
  if (t.key === "Escape") {
2202
2212
  M();
@@ -2207,7 +2217,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2207
2217
  P();
2208
2218
  return;
2209
2219
  }
2210
- rt(1);
2220
+ ot(1);
2211
2221
  return;
2212
2222
  }
2213
2223
  if (t.key === "ArrowUp") {
@@ -2215,65 +2225,65 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2215
2225
  P();
2216
2226
  return;
2217
2227
  }
2218
- rt(-1);
2228
+ ot(-1);
2219
2229
  return;
2220
2230
  }
2221
2231
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), F());
2222
2232
  }
2223
2233
  }
2224
- function pt(e) {
2234
+ function gt(e) {
2225
2235
  if (e.key === "ArrowDown") {
2226
- e.preventDefault(), rt(1);
2236
+ e.preventDefault(), ot(1);
2227
2237
  return;
2228
2238
  }
2229
2239
  if (e.key === "ArrowUp") {
2230
- e.preventDefault(), rt(-1);
2240
+ e.preventDefault(), ot(-1);
2231
2241
  return;
2232
2242
  }
2233
2243
  if (e.key === "Enter") {
2234
2244
  if (e.preventDefault(), b.value >= 0) {
2235
- it();
2245
+ st();
2236
2246
  return;
2237
2247
  }
2238
- Ue.value && ct();
2248
+ J.value && ft();
2239
2249
  return;
2240
2250
  }
2241
2251
  e.key === "Escape" && (e.preventDefault(), M());
2242
2252
  }
2243
- function mt(e) {
2253
+ function _t(e) {
2244
2254
  if (!A.value) return;
2245
2255
  let t = e.target;
2246
- t instanceof Node && (O.value?.contains(t) ?? !1) && pt(e);
2256
+ t instanceof Node && (O.value?.contains(t) ?? !1) && gt(e);
2247
2257
  }
2248
- function ht(e) {
2249
- G.value[e]?.disabled || tt(e);
2258
+ function vt(e) {
2259
+ K.value[e]?.disabled || it(e);
2250
2260
  }
2251
- function gt(e) {
2261
+ function yt(e) {
2252
2262
  let t = e.target, n = h.value?.contains(t) ?? !1, r = O.value?.contains(t) ?? !1;
2253
2263
  !n && !r && M();
2254
2264
  }
2255
- return n({ clearSelection: ot }), B(() => e.disabled, (e) => {
2265
+ return n({ clearSelection: lt }), B(() => e.disabled, (e) => {
2256
2266
  e && M();
2257
2267
  }), B(A, async (e) => {
2258
2268
  if (e) {
2259
- m("open"), await S(), lt(), await L(), nt(), g.value?.focus({ preventScroll: !0 });
2269
+ m("open"), await S(), pt(), await L(), at(), g.value?.focus({ preventScroll: !0 });
2260
2270
  return;
2261
2271
  }
2262
2272
  m("close"), _.value = "", b.value = -1;
2263
- }), B(G, () => {
2273
+ }), B(K, () => {
2264
2274
  if (A.value) {
2265
- if (b.value < 0 || b.value >= G.value.length || G.value[b.value]?.disabled) {
2266
- nt();
2275
+ if (b.value < 0 || b.value >= K.value.length || K.value[b.value]?.disabled) {
2276
+ at();
2267
2277
  return;
2268
2278
  }
2269
2279
  S(() => {
2270
- et();
2280
+ rt();
2271
2281
  });
2272
2282
  }
2273
2283
  }), E(() => {
2274
- lt(), window.addEventListener("hl-resize", lt), document.addEventListener("pointerdown", gt), document.addEventListener("keydown", mt, !0);
2284
+ pt(), window.addEventListener("hl-resize", pt), document.addEventListener("pointerdown", yt), document.addEventListener("keydown", _t, !0);
2275
2285
  }), T(() => {
2276
- window.removeEventListener("hl-resize", lt), document.removeEventListener("pointerdown", gt), document.removeEventListener("keydown", mt, !0);
2286
+ window.removeEventListener("hl-resize", pt), document.removeEventListener("pointerdown", yt), document.removeEventListener("keydown", _t, !0);
2277
2287
  }), (t, n) => (k(), l("div", {
2278
2288
  ref_key: "rootRef",
2279
2289
  ref: h,
@@ -2299,12 +2309,12 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2299
2309
  ref: R(re).ref,
2300
2310
  type: "button",
2301
2311
  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", [
2302
- Be.value,
2312
+ G.value,
2303
2313
  e.inputClass,
2304
- Re.value ? "hl-input-error-border-theme focus:hl-input-error-border-theme" : q.value,
2314
+ Ve.value ? "hl-input-error-border-theme focus:hl-input-error-border-theme" : Ke.value,
2305
2315
  {
2306
- "hl-theme-text": Le.value,
2307
- "hl-theme-text-muted": !Le.value,
2316
+ "hl-theme-text": Be.value,
2317
+ "hl-theme-text-muted": !Be.value,
2308
2318
  "hl-border-0 focus:hl-border-0": e.noBorder
2309
2319
  }
2310
2320
  ]]),
@@ -2313,24 +2323,24 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2313
2323
  "aria-controls": fe.value,
2314
2324
  "aria-labelledby": e.label ? pe.value : void 0,
2315
2325
  "aria-haspopup": "listbox",
2316
- onClick: dt,
2317
- onKeydown: ft
2318
- }, [u("span", yn, [e.multiple && W.value.length > 0 ? (k(), l("span", bn, [(k(!0), l(r, null, N(Fe.value, (e, t) => (k(), l("span", {
2319
- key: Ae(e, t),
2320
- 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", Ke.value]),
2326
+ onClick: mt,
2327
+ onKeydown: ht
2328
+ }, [u("span", yn, [e.multiple && Ie.value.length > 0 ? (k(), l("span", bn, [(k(!0), l(r, null, N(Re.value, (e, t) => (k(), l("span", {
2329
+ key: je(e, t),
2330
+ 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", Xe.value]),
2321
2331
  onMouseenter: (t) => le(t, e),
2322
2332
  onMouseleave: V
2323
- }, [u("span", Sn, I(e.label), 1)], 42, xn))), 128)), Ie.value > 0 ? (k(), l("span", Cn, " +" + I(Ie.value) + " more ", 1)) : c("", !0)])) : (k(), l(r, { key: 1 }, [f(I(ze.value), 1)], 64))]), u("span", wn, [Le.value && !e.disabled ? (k(), l("button", {
2333
+ }, [u("span", Sn, I(e.label), 1)], 42, xn))), 128)), ze.value > 0 ? (k(), l("span", Cn, " +" + I(ze.value) + " more ", 1)) : c("", !0)])) : (k(), l(r, { key: 1 }, [f(I(He.value), 1)], 64))]), u("span", wn, [Be.value && !e.disabled ? (k(), l("button", {
2324
2334
  key: 0,
2325
2335
  type: "button",
2326
2336
  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",
2327
2337
  "aria-label": "Clear selection",
2328
- onClick: de(ot, ["stop"])
2329
- }, [p(U, {
2338
+ onClick: de(lt, ["stop"])
2339
+ }, [p(W, {
2330
2340
  name: "x-mark",
2331
2341
  size: 14,
2332
2342
  decorative: !0
2333
- })])) : c("", !0), u("span", { class: C(["hl-pointer-events-none hl-flex hl-items-center hl-theme-text-muted hl-transition-transform hl-duration-150", { "hl-rotate-180": R(A) }]) }, [p(U, {
2343
+ })])) : c("", !0), u("span", { class: C(["hl-pointer-events-none hl-flex hl-items-center hl-theme-text-muted hl-transition-transform hl-duration-150", { "hl-rotate-180": R(A) }]) }, [p(W, {
2334
2344
  name: "chevron-up-down",
2335
2345
  size: 20,
2336
2346
  decorative: !0
@@ -2339,13 +2349,13 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2339
2349
  key: 0,
2340
2350
  ref: R(ie).ref,
2341
2351
  class: "hanap-labs-theme hanap-labs-font hl-theme-bg hl-theme-border hl-rounded-md hl-border hl-border-solid hl-shadow-none",
2342
- style: w(He.value),
2352
+ style: w(q.value),
2343
2353
  id: fe.value,
2344
2354
  role: "listbox",
2345
2355
  "aria-labelledby": H.value,
2346
- "aria-activedescendant": We.value
2356
+ "aria-activedescendant": Ge.value
2347
2357
  }, [u("div", En, [p(ut, {
2348
- ref: we,
2358
+ ref: Ce,
2349
2359
  modelValue: _.value,
2350
2360
  "onUpdate:modelValue": n[0] ||= (e) => _.value = e,
2351
2361
  type: "search",
@@ -2354,9 +2364,9 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2354
2364
  }, null, 8, ["modelValue", "disabled"])]), u("div", {
2355
2365
  class: "hl-overflow-y-auto hl-py-1",
2356
2366
  style: w({ maxHeight: `${e.maxMenuHeight}px` })
2357
- }, [G.value.length > 0 ? (k(!0), l(r, { key: 0 }, N(G.value, (t, n) => (k(), l(r, { key: Ae(t, n) }, [K.value >= 0 && n === K.value ? (k(), l("div", Dn)) : c("", !0), u("button", {
2367
+ }, [K.value.length > 0 ? (k(!0), l(r, { key: 0 }, N(K.value, (t, n) => (k(), l(r, { key: je(t, n) }, [We.value >= 0 && n === We.value ? (k(), l("div", Dn)) : c("", !0), u("button", {
2358
2368
  type: "button",
2359
- id: je(n),
2369
+ id: Me(n),
2360
2370
  "data-option-index": n,
2361
2371
  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", [
2362
2372
  e.optionClass,
@@ -2366,36 +2376,36 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2366
2376
  "hl-theme-text": !t.disabled && !Y(t),
2367
2377
  "hl-font-medium": Y(t)
2368
2378
  },
2369
- !t.disabled && Y(t) ? J.value : "",
2370
- t.disabled ? "" : Je.value,
2371
- !t.disabled && b.value === n ? Xe.value : ""
2379
+ !t.disabled && Y(t) ? qe.value : "",
2380
+ t.disabled ? "" : Qe.value,
2381
+ !t.disabled && b.value === n ? $e.value : ""
2372
2382
  ]]),
2373
2383
  "aria-selected": Y(t),
2374
2384
  disabled: t.disabled,
2375
- onMouseenter: (e) => ht(n),
2376
- onClick: (e) => at(t)
2385
+ onMouseenter: (e) => vt(n),
2386
+ onClick: (e) => ct(t)
2377
2387
  }, [u("span", kn, [e.multiple ? (k(), l("span", {
2378
2388
  key: 0,
2379
- 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) ? Ge.value : qe.value])
2380
- }, [p(U, {
2389
+ 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) ? Je.value : Ze.value])
2390
+ }, [p(W, {
2381
2391
  name: "check",
2382
2392
  size: 12,
2383
- color: Y(t) ? Ze.value : void 0,
2393
+ color: Y(t) ? et.value : void 0,
2384
2394
  class: C(["hl-transition-opacity hl-duration-300", [Y(t) ? "hl-opacity-100" : "hl-opacity-0"]]),
2385
2395
  decorative: !0
2386
2396
  }, 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", {
2387
2397
  key: 0,
2388
- class: C(["hl-shrink-0 hl-text-xs", J.value])
2389
- }, [p(U, {
2398
+ class: C(["hl-shrink-0 hl-text-xs", qe.value])
2399
+ }, [p(W, {
2390
2400
  name: "check",
2391
2401
  size: 14,
2392
2402
  decorative: !0
2393
- })], 2)) : c("", !0)], 42, On)], 64))), 128)) : (k(), l("p", Nn, I(_.value.trim() ? "No matches found" : "No options available"), 1)), Ue.value ? (k(), l("button", {
2403
+ })], 2)) : c("", !0)], 42, On)], 64))), 128)) : (k(), l("p", Nn, I(_.value.trim() ? "No matches found" : "No options available"), 1)), J.value ? (k(), l("button", {
2394
2404
  key: 2,
2395
2405
  type: "button",
2396
2406
  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",
2397
- onClick: ct
2398
- }, [u("span", null, "Add \"" + I(_.value.trim()) + "\"", 1), p(U, {
2407
+ onClick: ft
2408
+ }, [u("span", null, "Add \"" + I(_.value.trim()) + "\"", 1), p(W, {
2399
2409
  name: "plus",
2400
2410
  size: 14,
2401
2411
  decorative: !0
@@ -2405,7 +2415,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2405
2415
  role: "tooltip"
2406
2416
  }), I(oe.value), 17)) : c("", !0)]))
2407
2417
  ]),
2408
- Re.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", {
2418
+ Ve.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", {
2409
2419
  key: e,
2410
2420
  class: "hl-text-xs hl-input-error-theme"
2411
2421
  }, I(e), 1))), 128))])) : c("", !0)
@@ -2478,7 +2488,7 @@ var jt = { class: "hanap-labs-theme hanap-labs-font hl-relative hl-inline-block"
2478
2488
  disabled: e.disabled,
2479
2489
  onClick: (t) => h(e.value)
2480
2490
  }, {
2481
- default: V(() => [u("span", Hn, [e.icon ? (k(), s(U, {
2491
+ default: V(() => [u("span", Hn, [e.icon ? (k(), s(W, {
2482
2492
  key: 0,
2483
2493
  name: e.icon,
2484
2494
  class: "hl-size-4 hl-shrink-0",
@@ -4300,7 +4310,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4300
4310
  "aria-label": "Refresh",
4301
4311
  onClick: se
4302
4312
  }, {
4303
- icon: V(() => [p(U, {
4313
+ icon: V(() => [p(W, {
4304
4314
  name: "rotate-ccw",
4305
4315
  size: 20,
4306
4316
  decorative: !0,
@@ -4325,7 +4335,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4325
4335
  key: 0,
4326
4336
  render: e.column.columnDef.header,
4327
4337
  props: e.getContext()
4328
- }, null, 8, ["render", "props"])), e.column.getCanSort() ? (k(), l("span", Oi, [p(U, {
4338
+ }, null, 8, ["render", "props"])), e.column.getCanSort() ? (k(), l("span", Oi, [p(W, {
4329
4339
  name: e.column.getIsSorted() === "asc" ? "chevron-up" : e.column.getIsSorted() === "desc" ? "chevron-down" : "chevron-up-down",
4330
4340
  size: 14,
4331
4341
  decorative: !0
@@ -4374,7 +4384,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4374
4384
  "aria-label": "Previous page",
4375
4385
  onClick: le
4376
4386
  }, {
4377
- icon: V(() => [p(U, {
4387
+ icon: V(() => [p(W, {
4378
4388
  name: "chevron-left",
4379
4389
  size: 14,
4380
4390
  decorative: !0
@@ -4410,7 +4420,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4410
4420
  "aria-label": "Next page",
4411
4421
  onClick: ue
4412
4422
  }, {
4413
- icon: V(() => [p(U, {
4423
+ icon: V(() => [p(W, {
4414
4424
  name: "chevron-right",
4415
4425
  size: 14,
4416
4426
  decorative: !0
@@ -4435,7 +4445,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4435
4445
  }, Ui = {
4436
4446
  key: 0,
4437
4447
  class: "hl-text-xs hl-input-error-theme"
4438
- }, Wi = /* @__PURE__ */ Oe(/* @__PURE__ */ h({
4448
+ }, Wi = /* @__PURE__ */ De(/* @__PURE__ */ h({
4439
4449
  __name: "HLTextarea",
4440
4450
  props: /* @__PURE__ */ b({
4441
4451
  id: { default: "" },
@@ -4564,7 +4574,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4564
4574
  "hl-p-1.5": !!e.icon && !e.label
4565
4575
  }]),
4566
4576
  onClick: r[0] ||= de((e) => n("click"), ["stop"])
4567
- }, [P(t.$slots, "default", {}, () => [e.icon ? (k(), s(U, {
4577
+ }, [P(t.$slots, "default", {}, () => [e.icon ? (k(), s(W, {
4568
4578
  key: 0,
4569
4579
  name: e.icon,
4570
4580
  size: 16
@@ -4787,13 +4797,13 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4787
4797
  let e = d.value;
4788
4798
  return e ? e.year() === t : !1;
4789
4799
  }
4790
- }, xe = (t) => !!(e.minDate && t.isSameOrBefore(H(e.minDate).subtract(1, "day"), "day") || e.maxDate && t.isSameOrAfter(H(e.maxDate).add(1, "day"), "day")), Se = (t) => {
4800
+ }, xe = (t) => !!(e.minDate && t.isSameOrBefore(H(e.minDate).subtract(1, "day"), "day") || e.maxDate && t.isSameOrAfter(H(e.maxDate).add(1, "day"), "day")), U = (t) => {
4791
4801
  let n = T.value.year(), r = H().year(n).month(t).startOf("month"), i = H().year(n).month(t).endOf("month");
4792
4802
  return !!(e.minDate && i.isSameOrBefore(H(e.minDate).subtract(1, "day"), "day") || e.maxDate && r.isSameOrAfter(H(e.maxDate).add(1, "day"), "day"));
4793
- }, Ce = (t) => {
4803
+ }, Se = (t) => {
4794
4804
  let n = H().year(t).startOf("year"), r = H().year(t).endOf("year");
4795
4805
  return !!(e.minDate && r.isSameOrBefore(H(e.minDate).subtract(1, "day"), "day") || e.maxDate && n.isSameOrAfter(H(e.maxDate).add(1, "day"), "day"));
4796
- }, we = (t) => {
4806
+ }, Ce = (t) => {
4797
4807
  if (!xe(t)) if (e.range) {
4798
4808
  let e = d.value;
4799
4809
  if (D.value === "start" || !e?.start) d.value = {
@@ -4810,15 +4820,15 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4810
4820
  d.value = i, f("change", i), _();
4811
4821
  }
4812
4822
  } else d.value = t, f("change", t), _();
4813
- }, Te = (t) => {
4814
- if (Se(t)) return;
4823
+ }, we = (t) => {
4824
+ if (U(t)) return;
4815
4825
  let n = T.value.year(), r = T.value.date(), i = H().year(n).month(t).endOf("month").date(), a = Math.min(r, i), o = T.value.set("month", t).date(a);
4816
4826
  T.value = o, e.range || (d.value = o, f("change", o)), w.value = "dates";
4817
- }, Ee = (e) => {
4818
- if (Ce(e)) return;
4827
+ }, Te = (e) => {
4828
+ if (Se(e)) return;
4819
4829
  let t = T.value.month(), n = T.value.date(), r = H().year(e).month(t).endOf("month").date(), i = Math.min(n, r);
4820
4830
  T.value = T.value.set("year", e).date(i), w.value = "months";
4821
- }, De = () => {
4831
+ }, Ee = () => {
4822
4832
  d.value = e.range ? {
4823
4833
  start: null,
4824
4834
  end: null
@@ -4859,7 +4869,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4859
4869
  disabled: e.disabled,
4860
4870
  "aria-expanded": R(m),
4861
4871
  onClick: n[0] ||= (t) => !e.disabled && R(g)()
4862
- }, [p(U, {
4872
+ }, [p(W, {
4863
4873
  name: "calendar",
4864
4874
  class: "hl-size-4"
4865
4875
  }), u("span", Qi, [P.value ? (k(), l("span", $i, I(P.value), 1)) : (k(), l("span", ea, I(e.placeholder), 1))])], 10, Zi),
@@ -4868,13 +4878,13 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4868
4878
  type: "button",
4869
4879
  class: "hl-theme-hover-text hl-absolute hl-inset-y-0 hl-right-6 hl-my-auto hl-px-1 hl-theme-text-muted hl-appearance-none hl-border-0 hl-bg-transparent hl-no-focus-ring hl-cursor-pointer",
4870
4880
  "aria-label": "Clear date",
4871
- onClick: de(De, ["stop"])
4872
- }, [p(U, {
4881
+ onClick: de(Ee, ["stop"])
4882
+ }, [p(W, {
4873
4883
  name: "x-mark",
4874
4884
  size: 14,
4875
4885
  decorative: !0
4876
4886
  })])) : c("", !0),
4877
- u("span", { class: C(["hl-pointer-events-none hl-absolute hl-inset-y-0 hl-right-2 hl-my-auto hl-flex hl-items-center hl-theme-text-muted hl-transition-transform hl-duration-150", { "hl-rotate-180": R(m) }]) }, [p(U, {
4887
+ u("span", { class: C(["hl-pointer-events-none hl-absolute hl-inset-y-0 hl-right-2 hl-my-auto hl-flex hl-items-center hl-theme-text-muted hl-transition-transform hl-duration-150", { "hl-rotate-180": R(m) }]) }, [p(W, {
4878
4888
  name: "chevron-up-down",
4879
4889
  size: 20,
4880
4890
  decorative: !0
@@ -4933,7 +4943,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4933
4943
  "in-range": ge(e.dayjs),
4934
4944
  "range-start": _e(e.dayjs),
4935
4945
  "range-end": ve(e.dayjs),
4936
- onClick: (t) => we(e.dayjs),
4946
+ onClick: (t) => Ce(e.dayjs),
4937
4947
  onMouseenter: (t) => O.value = e.dayjs,
4938
4948
  onMouseleave: n[3] ||= (e) => O.value = null
4939
4949
  }, null, 8, [
@@ -4960,7 +4970,7 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4960
4970
  "in-range": ge(e.dayjs),
4961
4971
  "range-start": _e(e.dayjs),
4962
4972
  "range-end": ve(e.dayjs),
4963
- onClick: (t) => we(e.dayjs),
4973
+ onClick: (t) => Ce(e.dayjs),
4964
4974
  onMouseenter: (t) => O.value = e.dayjs,
4965
4975
  onMouseleave: n[4] ||= (e) => O.value = null
4966
4976
  }, null, 8, [
@@ -4978,8 +4988,8 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4978
4988
  key: e,
4979
4989
  label: e,
4980
4990
  selected: ye(t),
4981
- disabled: Se(t),
4982
- onClick: (e) => Te(t)
4991
+ disabled: U(t),
4992
+ onClick: (e) => we(t)
4983
4993
  }, null, 8, [
4984
4994
  "label",
4985
4995
  "selected",
@@ -4991,8 +5001,8 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
4991
5001
  label: e,
4992
5002
  selected: be(e),
4993
5003
  muted: e < z.value || e > re.value,
4994
- disabled: Ce(e),
4995
- onClick: (t) => Ee(e)
5004
+ disabled: Se(e),
5005
+ onClick: (t) => Te(e)
4996
5006
  }, null, 8, [
4997
5007
  "label",
4998
5008
  "selected",
@@ -5007,4 +5017,4 @@ var _i = { class: "hanap-labs-theme hanap-labs-font hl-flex hl-flex-col hl-gap-4
5007
5017
  }
5008
5018
  });
5009
5019
  //#endregion
5010
- export { Se as A, Re as C, be as D, ye as E, Ce as O, G as S, U as T, tt 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, Ne as w, He as x, Ge as y };
5020
+ export { U as A, Re as C, be as D, ye as E, Se as O, He as S, W as T, tt 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 };
@@ -3141,37 +3141,41 @@ async function rn(e) {
3141
3141
  }
3142
3142
  function an(e = {}) {
3143
3143
  return function(n, r) {
3144
- let { queryKey: i, onSuccess: s, onError: c, enabled: l, ...u } = r ?? {}, d = nn(), f = [], p = [];
3145
- s !== void 0 && f.push(s), c !== void 0 && p.push(c);
3146
- let m = Zt({
3147
- queryKey: t(() => i === void 0 ? d : typeof i == "function" ? i() : a(i)),
3148
- queryFn: (e) => n({
3149
- queryKey: e.queryKey,
3150
- signal: e.signal
3151
- }),
3152
- enabled: t(() => tn(l)),
3153
- ...$t,
3154
- ...e,
3155
- ...u
3156
- });
3157
- f.length > 0 && o(() => m.data.value, (e) => {
3158
- if (e !== void 0) for (let t of f) t(e);
3159
- }, { immediate: !1 }), p.length > 0 && o(() => m.error.value, (e) => {
3160
- if (e !== null) for (let t of p) t(e);
3144
+ let i = nn(), s = [], c = t(() => r?.queryKey === void 0 ? i : typeof r.queryKey == "function" ? r.queryKey() : a(r.queryKey)), l = t(() => tn(r?.enabled)), u = Zt(t(() => {
3145
+ let { queryKey: t, onSuccess: i, onError: a, enabled: o, ...s } = r ?? {};
3146
+ return {
3147
+ queryKey: c.value,
3148
+ queryFn: (e) => n({
3149
+ queryKey: e.queryKey,
3150
+ signal: e.signal
3151
+ }),
3152
+ enabled: l.value,
3153
+ ...$t,
3154
+ ...e,
3155
+ ...s
3156
+ };
3157
+ }));
3158
+ o(() => u.data.value, (e) => {
3159
+ e !== void 0 && r?.onSuccess !== void 0 && r.onSuccess(e);
3160
+ }, { immediate: !1 }), o(() => u.error.value, (e) => {
3161
+ if (e !== null) {
3162
+ r?.onError !== void 0 && r.onError(e);
3163
+ for (let t of s) t(e);
3164
+ }
3161
3165
  }, { immediate: !1 });
3162
- let h = () => rn(m.refetch), g = {
3163
- data: X(m.data),
3164
- error: X(m.error),
3165
- isError: X(m.isError),
3166
- loading: X(m.isFetching),
3167
- initializing: X(m.isLoading),
3168
- isSuccess: X(m.isSuccess),
3169
- onError: (e) => (p.push(e), g),
3170
- refetch: h,
3171
- run: h,
3172
- status: X(m.status)
3166
+ let d = () => rn(u.refetch), f = {
3167
+ data: X(u.data),
3168
+ error: X(u.error),
3169
+ isError: X(u.isError),
3170
+ loading: X(u.isFetching),
3171
+ initializing: X(u.isLoading),
3172
+ isSuccess: X(u.isSuccess),
3173
+ onError: (e) => (s.push(e), f),
3174
+ refetch: d,
3175
+ run: d,
3176
+ status: X(u.status)
3173
3177
  };
3174
- return g;
3178
+ return f;
3175
3179
  };
3176
3180
  }
3177
3181
  var on = an();
@@ -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-BLXC1TJU.js";
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-jVa5T9J6.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 };
@@ -1,3 +1,3 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/composables-Dfe_Im7E.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "../chunks/composables-DgM66mjz.js";
2
2
  import { n as c, r as l, t as u } from "../chunks/usePopup-C4TqBG3M.js";
3
3
  export { n as createQueryPlugin, r as createUseMutation, e as createUseQuery, t as themePresets, l as useFloat, s as useForm, a as useMutation, c as useNotify, u as usePopup, i as useQuery, o as useTheme };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
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-Dfe_Im7E.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-BLXC1TJU.js";
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-DgM66mjz.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-jVa5T9J6.js";
3
3
  import { n as Ee, r as De, t as Oe } from "./chunks/usePopup-C4TqBG3M.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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hanap-labs",
3
- "version": "7.3.0",
3
+ "version": "7.5.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "vue",