@thekestongroup/ui 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/keston-ui.js CHANGED
@@ -4490,7 +4490,7 @@ var Oo = [
4490
4490
  }, Lo = ["onClick"], Ro = {
4491
4491
  key: 1,
4492
4492
  "aria-hidden": "true"
4493
- }, zo = ["colspan"], Bo = "relative z-1 w-0 cursor-pointer", Vo = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Ho = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Uo = /* @__PURE__ */ f({
4493
+ }, zo = ["colspan"], Bo = "relative z-1 w-0 cursor-pointer", Vo = "absolute inset-0 outline-none", Ho = "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Uo = "outline-2 -outline-offset-2 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", Wo = /* @__PURE__ */ f({
4494
4494
  __name: "Table",
4495
4495
  props: /*@__PURE__*/ g({
4496
4496
  columns: {},
@@ -4557,9 +4557,9 @@ var Oo = [
4557
4557
  "after:absolute after:inset-0 after:outline-2 after:-outline-offset-2 after:outline-transparent",
4558
4558
  "focus-visible:after:outline-focus forced-colors:not-focus-visible:after:outline-0"
4559
4559
  ], H = [
4560
- "relative cursor-pointer hover:bg-black/5",
4561
- "[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link])]:relative",
4562
- "[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link])]:z-1"
4560
+ "cursor-pointer hover:bg-black/5 has-[[data-row-link]:focus-visible]:bg-black/5",
4561
+ "[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:relative",
4562
+ "[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:z-1"
4563
4563
  ], U = i(() => {
4564
4564
  let e = r.size === "sm" ? "px-4 py-2" : "px-4 py-3";
4565
4565
  return r.inset ? `${e} sm:first:pl-6 sm:last:pr-6` : e;
@@ -4577,7 +4577,7 @@ var Oo = [
4577
4577
  }), S(() => q?.disconnect()), (i, f) => (w(), s("div", {
4578
4578
  ref_key: "scroller",
4579
4579
  ref: W,
4580
- class: y(M(X)("relative overflow-auto", G.value && Ho, r.class)),
4580
+ class: y(M(X)("relative overflow-auto", G.value && Uo, r.class)),
4581
4581
  tabindex: G.value ? 0 : void 0,
4582
4582
  role: G.value ? "region" : void 0,
4583
4583
  "aria-labelledby": G.value && (e.caption || i.$slots.caption) ? p : void 0,
@@ -4610,7 +4610,7 @@ var Oo = [
4610
4610
  }, [O(i.$slots, `header-${e.key}`, { column: e }, () => [e.hideLabel ? (w(), s("span", Mo, j(e.label), 1)) : e.sortable ? (w(), s("button", {
4611
4611
  key: 1,
4612
4612
  type: "button",
4613
- class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black", Vo)),
4613
+ class: y(M(X)("-mx-1 inline-flex cursor-pointer items-center gap-1 rounded px-1 font-bold hover:text-black", e.align === "end" && "flex-row-reverse", l.value?.key === e.key && "text-black", Ho)),
4614
4614
  onClick: (t) => l.value = M(Do)(l.value, e.key)
4615
4615
  }, [u(j(e.label) + " ", 1), l.value?.key === e.key && l.value.direction === "asc" ? (w(), a(M(J), {
4616
4616
  key: 0,
@@ -4654,11 +4654,19 @@ var Oo = [
4654
4654
  ])) : o("", !0)], 10, Lo)) : o("", !0), (w(!0), s(n, null, D(e.columns, (t) => (w(), a(k(t.rowHeader ? "th" : "td"), {
4655
4655
  key: t.key,
4656
4656
  scope: t.rowHeader ? "row" : void 0,
4657
- class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", t.rowHeader ? "font-bold" : "font-normal", t.align === "end" && "tabular-nums", U.value, ee(t)))
4657
+ class: y(M(X)("border-b border-black/15 align-middle", !e.inset && "group-last/row:border-b-0", t.rowHeader ? "font-bold" : "font-normal", t.align === "end" && "tabular-nums", U.value, z(r, c) && "relative", ee(t)))
4658
4658
  }, {
4659
- default: V(() => [t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
4659
+ default: V(() => [t.key !== R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
4660
4660
  key: 0,
4661
4661
  ref_for: !0
4662
+ }, z(r, c), {
4663
+ "data-row-overlay": "",
4664
+ tabindex: "-1",
4665
+ "aria-hidden": "true",
4666
+ class: Vo
4667
+ }), null, 16)) : o("", !0), t.key === R.value && z(r, c) ? (w(), a(k(e.linkComponent), _({
4668
+ key: 1,
4669
+ ref_for: !0
4662
4670
  }, z(r, c), {
4663
4671
  "data-row-link": "",
4664
4672
  class: B
@@ -4673,7 +4681,7 @@ var Oo = [
4673
4681
  row: r,
4674
4682
  value: r[t.key],
4675
4683
  index: c
4676
- }, () => [u(j(r[t.key] ?? ""), 1)], void 0, 1)]),
4684
+ }, () => [u(j(r[t.key] ?? ""), 1)], void 0, 2)]),
4677
4685
  _: 2
4678
4686
  }, 1032, ["scope", "class"]))), 128))], 2))), 128)),
4679
4687
  e.inset && N.value.length && !i.$slots.footer ? (w(), s("tr", Ro, [c("td", {
@@ -4687,22 +4695,22 @@ var Oo = [
4687
4695
  }, [O(i.$slots, "footer")], 2)) : o("", !0)
4688
4696
  ], 10, ko)], 10, Oo));
4689
4697
  }
4690
- }), Wo = { class: "flex items-center gap-2 text-sm text-black/65" }, Go = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, Ko = { class: "text-2xl font-bold tabular-nums" }, qo = {
4698
+ }), Go = { class: "flex items-center gap-2 text-sm text-black/65" }, Ko = { class: "flex flex-wrap items-baseline gap-x-2 gap-y-1" }, qo = { class: "text-2xl font-bold tabular-nums" }, Jo = {
4691
4699
  key: 1,
4692
4700
  class: "sr-only"
4693
- }, Jo = {
4701
+ }, Yo = {
4694
4702
  key: 2,
4695
4703
  class: "font-bold tabular-nums"
4696
- }, Yo = {
4704
+ }, Xo = {
4697
4705
  key: 3,
4698
4706
  class: "text-black/65"
4699
- }, Xo = {
4707
+ }, Zo = {
4700
4708
  key: 0,
4701
4709
  class: "text-sm text-black/65"
4702
- }, Zo = {
4710
+ }, Qo = {
4703
4711
  key: 1,
4704
4712
  class: "mt-2 text-sm"
4705
- }, Qo = /* @__PURE__ */ f({
4713
+ }, $o = /* @__PURE__ */ f({
4706
4714
  __name: "StatTile",
4707
4715
  props: {
4708
4716
  label: {},
@@ -4737,12 +4745,12 @@ var Oo = [
4737
4745
  ui: { body: "gap-1" }
4738
4746
  }, {
4739
4747
  default: V(() => [
4740
- c("p", Wo, [e.icon ? (w(), a(k(e.icon), {
4748
+ c("p", Go, [e.icon ? (w(), a(k(e.icon), {
4741
4749
  key: 0,
4742
4750
  class: "size-4 shrink-0",
4743
4751
  "aria-hidden": "true"
4744
4752
  })) : o("", !0), u(" " + j(e.label), 1)]),
4745
- c("div", Go, [c("p", Ko, [O(t.$slots, "value", {}, () => [u(j(e.value ?? "—"), 1)])]), e.change || e.trend ? (w(), s("p", {
4753
+ c("div", Ko, [c("p", qo, [O(t.$slots, "value", {}, () => [u(j(e.value ?? "—"), 1)])]), e.change || e.trend ? (w(), s("p", {
4746
4754
  key: 0,
4747
4755
  class: y(M(X)("inline-flex items-center gap-0.5 text-sm", l[r.value]))
4748
4756
  }, [
@@ -4751,29 +4759,29 @@ var Oo = [
4751
4759
  class: "size-4 shrink-0",
4752
4760
  "aria-hidden": "true"
4753
4761
  })) : o("", !0),
4754
- e.trend ? (w(), s("span", qo, j(f.value[e.trend]), 1)) : o("", !0),
4755
- e.change ? (w(), s("span", Jo, j(e.change), 1)) : o("", !0),
4756
- e.changeLabel ? (w(), s("span", Yo, "\xA0" + j(e.changeLabel), 1)) : o("", !0)
4762
+ e.trend ? (w(), s("span", Jo, j(f.value[e.trend]), 1)) : o("", !0),
4763
+ e.change ? (w(), s("span", Yo, j(e.change), 1)) : o("", !0),
4764
+ e.changeLabel ? (w(), s("span", Xo, "\xA0" + j(e.changeLabel), 1)) : o("", !0)
4757
4765
  ], 2)) : o("", !0)]),
4758
- e.description || t.$slots.description ? (w(), s("p", Xo, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0),
4759
- t.$slots.footer ? (w(), s("div", Zo, [O(t.$slots, "footer")])) : o("", !0)
4766
+ e.description || t.$slots.description ? (w(), s("p", Zo, [O(t.$slots, "description", {}, () => [u(j(e.description), 1)])])) : o("", !0),
4767
+ t.$slots.footer ? (w(), s("div", Qo, [O(t.$slots, "footer")])) : o("", !0)
4760
4768
  ]),
4761
4769
  _: 3
4762
4770
  }, 8, ["class"]));
4763
4771
  }
4764
- }), $o = { class: "col-span-2 text-black/65 @sm:col-span-1" }, es = { class: "sr-only" }, ts = {
4772
+ }), es = { class: "col-span-2 text-black/65 @sm:col-span-1" }, ts = { class: "sr-only" }, ns = {
4765
4773
  key: 0,
4766
4774
  class: "mt-0.5 block text-black/65"
4767
- }, ns = {
4775
+ }, rs = {
4768
4776
  key: 0,
4769
4777
  class: "justify-self-end"
4770
- }, rs = { class: "text-black/65" }, is = { class: "sr-only" }, as = {
4778
+ }, is = { class: "text-black/65" }, as = { class: "sr-only" }, os = {
4771
4779
  key: 0,
4772
4780
  class: "mt-0.5 block font-normal text-black/65"
4773
- }, os = {
4781
+ }, ss = {
4774
4782
  key: 1,
4775
4783
  class: "mt-1 block font-normal"
4776
- }, ss = /* @__PURE__ */ f({
4784
+ }, cs = /* @__PURE__ */ f({
4777
4785
  __name: "SummaryList",
4778
4786
  props: {
4779
4787
  items: {},
@@ -4798,37 +4806,37 @@ var Oo = [
4798
4806
  key: r.label,
4799
4807
  class: y(M(X)("grid grid-cols-[1fr_auto] gap-x-4 gap-y-1 border-b border-black/15 py-3 first:pt-0 last:border-b-0 last:pb-0", a[e.labelWidth]))
4800
4808
  }, [
4801
- c("dt", $o, j(r.label), 1),
4809
+ c("dt", es, j(r.label), 1),
4802
4810
  c("dd", { class: y(M(X)("min-w-0 break-words", r.emphasis && "font-bold", !l.$slots.action && "col-span-2")) }, [O(l.$slots, "value", {
4803
4811
  item: r,
4804
4812
  index: f
4805
4813
  }, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[0] ||= c("span", {
4806
4814
  class: "text-black/40",
4807
4815
  "aria-hidden": "true"
4808
- }, "—", -1), c("span", es, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]), r.description ? (w(), s("span", ts, j(r.description), 1)) : o("", !0)], 2),
4809
- l.$slots.action ? (w(), s("dd", ns, [O(l.$slots, "action", {
4816
+ }, "—", -1), c("span", ts, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]), r.description ? (w(), s("span", ns, j(r.description), 1)) : o("", !0)], 2),
4817
+ l.$slots.action ? (w(), s("dd", rs, [O(l.$slots, "action", {
4810
4818
  item: r,
4811
4819
  index: f
4812
4820
  })])) : o("", !0)
4813
4821
  ], 2))), 128)) : (w(!0), s(n, { key: 1 }, D(e.items, (r, a) => (w(), s("div", {
4814
4822
  key: r.label,
4815
4823
  class: y(e.layout === "compact" ? "col-span-2 grid grid-cols-subgrid items-baseline" : "flex min-w-0 flex-col gap-1")
4816
- }, [c("dt", rs, j(r.label), 1), c("dd", { class: y(M(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
4824
+ }, [c("dt", is, j(r.label), 1), c("dd", { class: y(M(X)("min-w-0 break-words", e.layout === "compact" && "text-right font-bold tabular-nums", r.emphasis && "font-bold")) }, [
4817
4825
  O(l.$slots, "value", {
4818
4826
  item: r,
4819
4827
  index: a
4820
4828
  }, () => [i(r.value) ? (w(), s(n, { key: 1 }, [d[1] ||= c("span", {
4821
4829
  class: "text-black/40",
4822
4830
  "aria-hidden": "true"
4823
- }, "—", -1), c("span", is, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]),
4824
- r.description ? (w(), s("span", as, j(r.description), 1)) : o("", !0),
4825
- l.$slots.action ? (w(), s("span", os, [O(l.$slots, "action", {
4831
+ }, "—", -1), c("span", as, j(e.emptyLabel ?? M(t)("ui.summaryList.notSet")), 1)], 64)) : (w(), s(n, { key: 0 }, [u(j(r.value), 1)], 64))]),
4832
+ r.description ? (w(), s("span", os, j(r.description), 1)) : o("", !0),
4833
+ l.$slots.action ? (w(), s("span", ss, [O(l.$slots, "action", {
4826
4834
  item: r,
4827
4835
  index: a
4828
4836
  })])) : o("", !0)
4829
4837
  ], 2)], 2))), 128))], 2)], 2));
4830
4838
  }
4831
- }), cs = { class: "flex h-5 shrink-0 items-center" }, ls = { class: "sr-only" }, us = /* @__PURE__ */ f({
4839
+ }), ls = { class: "flex h-5 shrink-0 items-center" }, us = { class: "sr-only" }, ds = /* @__PURE__ */ f({
4832
4840
  __name: "Checklist",
4833
4841
  props: {
4834
4842
  items: {},
@@ -4845,7 +4853,7 @@ var Oo = [
4845
4853
  return (r, i) => (w(), s("ul", { class: y(M(X)("flex flex-col gap-2 text-sm", t.class)) }, [(w(!0), s(n, null, D(e.items, (e) => (w(), s("li", {
4846
4854
  key: e.label,
4847
4855
  class: "flex items-start gap-2"
4848
- }, [c("span", cs, [e.done ? (w(), a(M(ge), {
4856
+ }, [c("span", ls, [e.done ? (w(), a(M(ge), {
4849
4857
  key: 0,
4850
4858
  class: "size-4 text-green",
4851
4859
  "aria-hidden": "true"
@@ -4853,11 +4861,11 @@ var Oo = [
4853
4861
  key: 1,
4854
4862
  class: "size-4 text-black/40",
4855
4863
  "aria-hidden": "true"
4856
- }))]), c("span", { class: y(e.done ? "text-black" : "text-black/65") }, [u(j(e.label), 1), c("span", ls, j(e.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
4864
+ }))]), c("span", { class: y(e.done ? "text-black" : "text-black/65") }, [u(j(e.label), 1), c("span", us, j(e.done ? " (done)" : " (to do)"), 1)], 2)]))), 128))], 2));
4857
4865
  }
4858
4866
  });
4859
4867
  // src/lib/dates.ts
4860
- function ds(e) {
4868
+ function fs(e) {
4861
4869
  if (e instanceof Date) return e;
4862
4870
  if (typeof e == "string" && /^\d{4}-\d{2}-\d{2}$/.test(e)) {
4863
4871
  let [t, n, r] = e.split("-").map(Number);
@@ -4865,59 +4873,59 @@ function ds(e) {
4865
4873
  }
4866
4874
  return new Date(e);
4867
4875
  }
4868
- var fs = [
4876
+ var ps = [
4869
4877
  ["year", 31536e3],
4870
4878
  ["month", 2592e3],
4871
4879
  ["week", 604800],
4872
4880
  ["day", 86400],
4873
4881
  ["hour", 3600],
4874
4882
  ["minute", 60]
4875
- ], ps = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
4876
- function ms(e, t = /* @__PURE__ */ new Date()) {
4877
- let n = Math.round((ds(e).getTime() - t.getTime()) / 1e3);
4883
+ ], ms = new Intl.RelativeTimeFormat("en-GB", { numeric: "auto" });
4884
+ function hs(e, t = /* @__PURE__ */ new Date()) {
4885
+ let n = Math.round((fs(e).getTime() - t.getTime()) / 1e3);
4878
4886
  if (Math.abs(n) < 60) return "Just now";
4879
- for (let [e, t] of fs) if (Math.abs(n) >= t) {
4880
- let r = ps.format(Math.trunc(n / t), e);
4887
+ for (let [e, t] of ps) if (Math.abs(n) >= t) {
4888
+ let r = ms.format(Math.trunc(n / t), e);
4881
4889
  return r.charAt(0).toUpperCase() + r.slice(1);
4882
4890
  }
4883
4891
  return "Just now";
4884
4892
  }
4885
- function hs(e) {
4886
- let t = ds(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
4893
+ function gs(e) {
4894
+ let t = fs(e), n = t.toLocaleDateString("en-GB", { weekday: "long" }), r = t.toLocaleTimeString("en-GB", {
4887
4895
  hour: "2-digit",
4888
4896
  minute: "2-digit"
4889
4897
  });
4890
- return `${n} ${gs(t)} at ${r}`;
4898
+ return `${n} ${_s(t)} at ${r}`;
4891
4899
  }
4892
- function gs(e) {
4893
- return ds(e).toLocaleDateString("en-GB", {
4900
+ function _s(e) {
4901
+ return fs(e).toLocaleDateString("en-GB", {
4894
4902
  day: "numeric",
4895
4903
  month: "long",
4896
4904
  year: "numeric"
4897
4905
  });
4898
4906
  }
4899
- function _s(e, t = /* @__PURE__ */ new Date()) {
4900
- let n = ds(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
4907
+ function vs(e, t = /* @__PURE__ */ new Date()) {
4908
+ let n = fs(e), r = t.getFullYear() - n.getFullYear(), i = t.getMonth() - n.getMonth();
4901
4909
  return (i < 0 || i === 0 && t.getDate() < n.getDate()) && r--, r;
4902
4910
  }
4903
- function vs(e, t = /* @__PURE__ */ new Date()) {
4904
- let n = ds(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
4911
+ function ys(e, t = /* @__PURE__ */ new Date()) {
4912
+ let n = fs(e), r = new Date(t.getFullYear(), t.getMonth(), t.getDate()), i = (e) => {
4905
4913
  let t = new Date(e, n.getMonth(), n.getDate());
4906
4914
  return t.getMonth() === n.getMonth() ? t : new Date(e, 2, 1);
4907
4915
  }, a = i(r.getFullYear());
4908
4916
  return a < r && (a = i(r.getFullYear() + 1)), Math.round((a.getTime() - r.getTime()) / 864e5);
4909
4917
  }
4910
4918
  // src/lib/useNow.ts
4911
- var ys = E(/* @__PURE__ */ new Date()), bs = 0, xs;
4912
- function Ss() {
4919
+ var bs = E(/* @__PURE__ */ new Date()), xs = 0, Ss;
4920
+ function Cs() {
4913
4921
  return C(() => {
4914
- bs++ === 0 && (ys.value = /* @__PURE__ */ new Date(), xs = setInterval(() => ys.value = /* @__PURE__ */ new Date(), 3e4));
4922
+ xs++ === 0 && (bs.value = /* @__PURE__ */ new Date(), Ss = setInterval(() => bs.value = /* @__PURE__ */ new Date(), 3e4));
4915
4923
  }), S(() => {
4916
- --bs === 0 && clearInterval(xs);
4917
- }), ys;
4924
+ --xs === 0 && clearInterval(Ss);
4925
+ }), bs;
4918
4926
  }
4919
4927
  // src/components/RelativeTime/RelativeTime.vue?vue&type=script&setup=true&lang.ts
4920
- var Cs = ["datetime"], ws = /* @__PURE__ */ f({
4928
+ var ws = ["datetime"], Ts = /* @__PURE__ */ f({
4921
4929
  __name: "RelativeTime",
4922
4930
  props: {
4923
4931
  date: {},
@@ -4932,17 +4940,17 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
4932
4940
  ] }
4933
4941
  },
4934
4942
  setup(e) {
4935
- let t = e, n = Ss(), r = i(() => ds(t.date)), o = i(() => ms(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : hs(r.value));
4943
+ let t = e, n = Cs(), r = i(() => fs(t.date)), o = i(() => hs(r.value, t.now ?? n.value)), s = i(() => t.tooltip ? t.tooltip(r.value) : gs(r.value));
4936
4944
  return (e, n) => (w(), a(Aa, { text: s.value }, {
4937
4945
  default: V(() => [c("time", {
4938
4946
  datetime: r.value.toISOString(),
4939
4947
  tabindex: "0",
4940
4948
  class: y(M(X)("cursor-default rounded-sm underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", t.class))
4941
- }, j(o.value), 11, Cs)]),
4949
+ }, j(o.value), 11, ws)]),
4942
4950
  _: 1
4943
4951
  }, 8, ["text"]));
4944
4952
  }
4945
- }), Ts = ["data-birth-date"], Es = /* @__PURE__ */ f({
4953
+ }), Es = ["data-birth-date"], Ds = /* @__PURE__ */ f({
4946
4954
  __name: "Age",
4947
4955
  props: {
4948
4956
  birthDate: {},
@@ -4957,9 +4965,9 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
4957
4965
  ] }
4958
4966
  },
4959
4967
  setup(e) {
4960
- let { t } = K(), r = e, l = Ss(), d = i(() => ds(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => _s(d.value, f.value)), m = i(() => {
4961
- let e = vs(d.value, f.value), n = e === 0 ? ` · ${t("ui.age.birthdayToday")}` : e === 1 ? ` · ${t("ui.age.birthdayTomorrow")}` : e <= 7 ? ` · ${t("ui.age.birthdayInDays", { days: e })}` : "";
4962
- return `${t("ui.age.born", { date: gs(d.value) })}${n}`;
4968
+ let { t } = K(), r = e, l = Cs(), d = i(() => fs(r.birthDate)), f = i(() => r.now ?? l.value), p = i(() => vs(d.value, f.value)), m = i(() => {
4969
+ let e = ys(d.value, f.value), n = e === 0 ? ` · ${t("ui.age.birthdayToday")}` : e === 1 ? ` · ${t("ui.age.birthdayTomorrow")}` : e <= 7 ? ` · ${t("ui.age.birthdayInDays", { days: e })}` : "";
4970
+ return `${t("ui.age.born", { date: _s(d.value) })}${n}`;
4963
4971
  }), h = i(() => {
4964
4972
  let e = d.value;
4965
4973
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
@@ -4969,11 +4977,11 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
4969
4977
  tabindex: "0",
4970
4978
  "data-birth-date": h.value,
4971
4979
  class: y(M(X)("cursor-default rounded-sm tabular-nums underline decoration-current/40 decoration-dotted underline-offset-2", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", r.class))
4972
- }, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10, Ts)]),
4980
+ }, [u(j(p.value), 1), e.suffix ? (w(), s(n, { key: 0 }, [u("\xA0" + j(e.suffix), 1)], 64)) : o("", !0)], 10, Es)]),
4973
4981
  _: 1
4974
4982
  }, 8, ["text"]));
4975
4983
  }
4976
- }), Ds = /* @__PURE__ */ f({
4984
+ }), Os = /* @__PURE__ */ f({
4977
4985
  __name: "Link",
4978
4986
  props: {
4979
4987
  href: {},
@@ -5020,10 +5028,10 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
5020
5028
  "class"
5021
5029
  ]));
5022
5030
  }
5023
- }), Os = {
5031
+ }), ks = {
5024
5032
  class: "text-sm text-black/65",
5025
5033
  "aria-live": "polite"
5026
- }, ks = { class: "text-black" }, As = /* @__PURE__ */ f({
5034
+ }, As = { class: "text-black" }, js = /* @__PURE__ */ f({
5027
5035
  __name: "Steps",
5028
5036
  props: {
5029
5037
  steps: {},
@@ -5048,18 +5056,18 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
5048
5056
  "label",
5049
5057
  "value",
5050
5058
  "max"
5051
- ]), c("p", Os, [d(M(W), {
5059
+ ]), c("p", ks, [d(M(W), {
5052
5060
  keypath: "ui.steps.stepOfNamed",
5053
5061
  scope: "global",
5054
5062
  tag: "span"
5055
5063
  }, {
5056
5064
  current: V(() => [u(j(e.step + 1), 1)]),
5057
5065
  total: V(() => [u(j(e.steps.length), 1)]),
5058
- name: V(() => [c("span", ks, j(e.steps[e.step]), 1)]),
5066
+ name: V(() => [c("span", As, j(e.steps[e.step]), 1)]),
5059
5067
  _: 1
5060
5068
  })])], 2));
5061
5069
  }
5062
- }), js = /* @__PURE__ */ f({
5070
+ }), Ms = /* @__PURE__ */ f({
5063
5071
  __name: "Tabs",
5064
5072
  props: /*@__PURE__*/ g({
5065
5073
  tabs: {},
@@ -5121,11 +5129,11 @@ var Cs = ["datetime"], ws = /* @__PURE__ */ f({
5121
5129
  _: 3
5122
5130
  }, 8, ["model-value", "class"]));
5123
5131
  }
5124
- }), Ms = 0, Ns = () => `notification-${Date.now().toString(36)}-${(Ms++).toString(36)}`;
5125
- function Ps(e, t) {
5132
+ }), Ns = 0, Ps = () => `notification-${Date.now().toString(36)}-${(Ns++).toString(36)}`;
5133
+ function Fs(e, t) {
5126
5134
  return t === void 0 ? e.type === "error" ? Infinity : e.action ? e.compact ? 1e4 : Infinity : 6e3 : t;
5127
5135
  }
5128
- function Fs(e = []) {
5136
+ function Is(e = []) {
5129
5137
  let t = T({
5130
5138
  items: e.map(n).sort((e, t) => t.createdAt.getTime() - e.createdAt.getTime()),
5131
5139
  toasts: [],
@@ -5135,7 +5143,7 @@ function Fs(e = []) {
5135
5143
  function n(e) {
5136
5144
  return {
5137
5145
  ...e,
5138
- id: e.id ?? Ns(),
5146
+ id: e.id ?? Ps(),
5139
5147
  type: e.type ?? "info",
5140
5148
  createdAt: e.createdAt ?? /* @__PURE__ */ new Date(),
5141
5149
  read: e.read ?? !1
@@ -5145,7 +5153,7 @@ function Fs(e = []) {
5145
5153
  let i = n(e);
5146
5154
  return t.items = [i, ...t.items.filter((e) => e.id !== i.id)], r.toast !== !1 && !t.paneOpen && (t.toasts = [...t.toasts.filter((e) => e.id !== i.id), {
5147
5155
  id: i.id,
5148
- duration: Ps(i, r.duration),
5156
+ duration: Fs(i, r.duration),
5149
5157
  item: i
5150
5158
  }]), i.id;
5151
5159
  }
@@ -5194,25 +5202,25 @@ function Fs(e = []) {
5194
5202
  markAllRead: c
5195
5203
  };
5196
5204
  }
5197
- var Is;
5198
- function Ls() {
5199
- return Is ??= Fs();
5205
+ var Ls;
5206
+ function Rs() {
5207
+ return Ls ??= Is();
5200
5208
  }
5201
5209
  // src/components/Notification/Notification.vue?vue&type=script&setup=true&lang.ts
5202
- var Rs = { class: "sr-only" }, zs = {
5210
+ var zs = { class: "sr-only" }, Bs = {
5203
5211
  key: 0,
5204
5212
  class: "text-black/65 [&_a]:font-bold [&_a]:text-primary [&_a]:underline [&_b]:font-bold [&_b]:text-black [&_strong]:font-bold [&_strong]:text-black"
5205
- }, Bs = {
5213
+ }, Vs = {
5206
5214
  key: 1,
5207
5215
  class: "flex items-center gap-1.5 text-xs text-black/65"
5208
- }, Vs = {
5216
+ }, Hs = {
5209
5217
  key: 0,
5210
5218
  class: "size-2 shrink-0 rounded-full bg-primary",
5211
5219
  "aria-hidden": "true"
5212
- }, Hs = {
5220
+ }, Us = {
5213
5221
  key: 1,
5214
5222
  class: "sr-only"
5215
- }, Us = ["href"], Ws = /* @__PURE__ */ f({
5223
+ }, Ws = ["href"], Gs = /* @__PURE__ */ f({
5216
5224
  __name: "Notification",
5217
5225
  props: {
5218
5226
  type: { default: "info" },
@@ -5277,12 +5285,12 @@ var Rs = { class: "sr-only" }, zs = {
5277
5285
  c("p", {
5278
5286
  id: f,
5279
5287
  class: y(M(X)("font-bold", h.value && "min-w-0 flex-1 py-1"))
5280
- }, [c("span", Rs, j(p[e.type].word) + ": ", 1), u(j(e.title), 1)], 2),
5281
- !h.value && (e.description || t.$slots.default) ? (w(), s("div", zs, [O(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
5282
- e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p", Bs, [
5283
- e.unread ? (w(), s("span", Vs)) : o("", !0),
5284
- e.unread ? (w(), s("span", Hs, "Unread, ")) : o("", !0),
5285
- e.createdAt ? (w(), a(ws, {
5288
+ }, [c("span", zs, j(p[e.type].word) + ": ", 1), u(j(e.title), 1)], 2),
5289
+ !h.value && (e.description || t.$slots.default) ? (w(), s("div", Bs, [O(t.$slots, "default", {}, () => [d(m)])])) : o("", !0),
5290
+ e.appearance === "row" && (e.createdAt || e.unread) ? (w(), s("p", Vs, [
5291
+ e.unread ? (w(), s("span", Hs)) : o("", !0),
5292
+ e.unread ? (w(), s("span", Us, "Unread, ")) : o("", !0),
5293
+ e.createdAt ? (w(), a(Ts, {
5286
5294
  key: 2,
5287
5295
  date: e.createdAt,
5288
5296
  now: e.now
@@ -5297,7 +5305,7 @@ var Rs = { class: "sr-only" }, zs = {
5297
5305
  "as-child": "",
5298
5306
  onClick: g
5299
5307
  }, {
5300
- default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9, Us)]),
5308
+ default: V(() => [c("a", { href: e.action.href }, j(e.action.label), 9, Ws)]),
5301
5309
  _: 1
5302
5310
  })) : e.action ? (w(), a(Z, {
5303
5311
  key: 1,
@@ -5323,11 +5331,11 @@ var Rs = { class: "sr-only" }, zs = {
5323
5331
  }, 8, ["class", "aria-label"])) : o("", !0)
5324
5332
  ], 2));
5325
5333
  }
5326
- }), Gs = {
5334
+ }), Ks = {
5327
5335
  key: 0,
5328
5336
  class: "absolute top-1 left-1/2 ml-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-red px-1 text-xs leading-none font-bold text-white ring-2 ring-white",
5329
5337
  "aria-hidden": "true"
5330
- }, Ks = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-black/15 pr-2 pl-4" }, qs = ["inert"], Js = /* @__PURE__ */ f({
5338
+ }, qs = { class: "flex h-11 shrink-0 items-center justify-between gap-2 border-b border-black/15 pr-2 pl-4" }, Js = ["inert"], Ys = /* @__PURE__ */ f({
5331
5339
  __name: "NotificationPane",
5332
5340
  props: /*@__PURE__*/ g({
5333
5341
  notifications: {},
@@ -5343,7 +5351,7 @@ var Rs = { class: "sr-only" }, zs = {
5343
5351
  }),
5344
5352
  emits: ["update:open"],
5345
5353
  setup(e) {
5346
- let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ?? Ls()), p = i(() => f.value.items), m = i(() => f.value.unreadCount.value), h = i(() => m.value > 99 ? "99+" : String(m.value)), g = i(() => r.label ?? t("ui.notifications.title")), _ = i(() => m.value ? t("ui.notifications.withUnread", {
5354
+ let { t } = K(), r = e, l = F(e, "open"), f = i(() => r.notifications ?? Rs()), p = i(() => f.value.items), m = i(() => f.value.unreadCount.value), h = i(() => m.value > 99 ? "99+" : String(m.value)), g = i(() => r.label ?? t("ui.notifications.title")), _ = i(() => m.value ? t("ui.notifications.withUnread", {
5347
5355
  label: g.value,
5348
5356
  count: h.value
5349
5357
  }) : g.value), b = `${P()}-heading`, x = E(), S = E();
@@ -5393,7 +5401,7 @@ var Rs = { class: "sr-only" }, zs = {
5393
5401
  ref: C,
5394
5402
  "aria-labelledby": b,
5395
5403
  class: "flex min-h-0 flex-col"
5396
- }, [c("div", Ks, [c("h2", {
5404
+ }, [c("div", qs, [c("h2", {
5397
5405
  id: b,
5398
5406
  ref_key: "heading",
5399
5407
  ref: x,
@@ -5418,7 +5426,7 @@ var Rs = { class: "sr-only" }, zs = {
5418
5426
  }, [(w(!0), s(n, null, D(p.value, (e, t) => (w(), s("li", {
5419
5427
  key: e.id,
5420
5428
  class: "border-b border-black/15 last:border-b-0"
5421
- }, [d(Ws, {
5429
+ }, [d(Gs, {
5422
5430
  appearance: "row",
5423
5431
  type: e.type,
5424
5432
  title: e.title,
@@ -5437,7 +5445,7 @@ var Rs = { class: "sr-only" }, zs = {
5437
5445
  "unread",
5438
5446
  "onDismiss",
5439
5447
  "onAction"
5440
- ])]))), 128))], 42, qs)) : (w(), a(Co, {
5448
+ ])]))), 128))], 42, Js)) : (w(), a(Co, {
5441
5449
  key: 1,
5442
5450
  size: "sm",
5443
5451
  icon: M(oe),
@@ -5456,13 +5464,13 @@ var Rs = { class: "sr-only" }, zs = {
5456
5464
  "aria-label": _.value,
5457
5465
  class: y(M(X)("relative overflow-visible", e.ui?.trigger))
5458
5466
  }, {
5459
- default: V(() => [d(M(ae)), m.value ? (w(), s("span", Gs, j(h.value), 1)) : o("", !0)]),
5467
+ default: V(() => [d(M(ae)), m.value ? (w(), s("span", Ks, j(h.value), 1)) : o("", !0)]),
5460
5468
  _: 1
5461
5469
  }, 8, ["aria-label", "class"])]),
5462
5470
  _: 1
5463
5471
  }, 8, ["open", "ui"]));
5464
5472
  }
5465
- }), Ys = { class: "in-data-expanded:hidden" }, Xs = { class: "hidden in-data-expanded:inline" }, Zs = { class: "sr-only" }, Qs = 8, $s = .5, ec = 80, tc = /* @__PURE__ */ f({
5473
+ }), Xs = { class: "in-data-expanded:hidden" }, Zs = { class: "hidden in-data-expanded:inline" }, Qs = { class: "sr-only" }, $s = 8, ec = .5, tc = 80, nc = /* @__PURE__ */ f({
5466
5474
  __name: "Toaster",
5467
5475
  props: {
5468
5476
  notifications: {},
@@ -5479,15 +5487,15 @@ var Rs = { class: "sr-only" }, zs = {
5479
5487
  },
5480
5488
  emits: ["more"],
5481
5489
  setup(e, { emit: t }) {
5482
- let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ?? Ls()), m = i(() => l.position === "top-right"), h = E(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
5490
+ let { t: r } = K(), l = e, f = t, p = i(() => l.notifications ?? Rs()), m = i(() => l.position === "top-right"), h = E(typeof window > "u" ? 800 : window.innerHeight), g = () => h.value = window.innerHeight;
5483
5491
  C(() => window.addEventListener("resize", g)), S(() => window.removeEventListener("resize", g));
5484
- let _ = i(() => Math.max(h.value - ec, 108)), b = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, O = i(() => {
5485
- let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) + Qs, -8), i = /* @__PURE__ */ new Set();
5492
+ let _ = i(() => Math.max(h.value - tc, 108)), b = (e) => e.compact ? 42 : e.action ? 116 : e.description ? 78 : 56, O = i(() => {
5493
+ let e = p.value.toasts.slice(-l.limit).reverse(), t = (e) => L.get(e.id) ?? b(e.item), n = e.filter((e) => !W.has(e.id)), r = n.reduce((e, n) => e + t(n) + $s, -8), i = /* @__PURE__ */ new Set();
5486
5494
  if (r <= _.value) n.forEach((e) => i.add(e.id));
5487
5495
  else {
5488
5496
  let e = 44;
5489
5497
  for (let r of n) {
5490
- let n = e + t(r) + (i.size ? Qs : 0);
5498
+ let n = e + t(r) + (i.size ? $s : 0);
5491
5499
  if (i.size && n > _.value) break;
5492
5500
  i.add(r.id), e = n;
5493
5501
  }
@@ -5542,16 +5550,16 @@ var Rs = { class: "sr-only" }, zs = {
5542
5550
  }
5543
5551
  let q = i(() => {
5544
5552
  let e = k.value.filter((e) => !W.has(e.id)), t = /* @__PURE__ */ new Map(), n = [], r = 0;
5545
- for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + Qs;
5546
- let i = Math.max(r - Qs, 0), a = Math.min(l.maxHeight, _.value), o = 0;
5553
+ for (let t of e) n.push(r), r += (L.get(t.id) ?? 0) + $s;
5554
+ let i = Math.max(r - $s, 0), a = Math.min(l.maxHeight, _.value), o = 0;
5547
5555
  for (; o < e.length && (o === 0 || n[o] + (L.get(e[o].id) ?? 0) <= a);) o++;
5548
- let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + Qs;
5556
+ let s = e[o - 1], c = n[o - 1] ?? 0, u = s ? L.get(s.id) ?? 0 : 0, d = c + u + $s;
5549
5557
  e.forEach((r, i) => {
5550
5558
  let a = i >= o;
5551
5559
  t.set(r.id, {
5552
5560
  spread: n[i],
5553
5561
  stacked: a ? d : n[i],
5554
- scale: a ? $s : 1,
5562
+ scale: a ? ec : 1,
5555
5563
  opacity: +!a,
5556
5564
  z: e.length - i
5557
5565
  });
@@ -5562,7 +5570,7 @@ var Rs = { class: "sr-only" }, zs = {
5562
5570
  places: t,
5563
5571
  spreadHeight: i + (A.value > 0 ? 44 : 0),
5564
5572
  stackedHeight: p,
5565
- moreOffset: i + (i ? Qs : 0),
5573
+ moreOffset: i + (i ? $s : 0),
5566
5574
  notInView: f,
5567
5575
  pillOffset: d
5568
5576
  };
@@ -5571,10 +5579,10 @@ var Rs = { class: "sr-only" }, zs = {
5571
5579
  let t = W.has(e) ? G.get(e) : q.value.places.get(e), n = m.value ? 1 : -1, r = (e) => `${n * e}px`, i = {
5572
5580
  "--toast-spread": r(q.value.moreOffset),
5573
5581
  "--toast-stacked": r(q.value.pillOffset),
5574
- "--toast-scale": $s,
5582
+ "--toast-scale": ec,
5575
5583
  "--toast-opacity": 0,
5576
5584
  "--toast-spread-opacity": 0,
5577
- "--toast-spread-scale": $s,
5585
+ "--toast-spread-scale": ec,
5578
5586
  "--toast-z": 0
5579
5587
  };
5580
5588
  if (!t && N.has(e) || t && !U.has(e) && P.has(e)) return i;
@@ -5632,7 +5640,7 @@ var Rs = { class: "sr-only" }, zs = {
5632
5640
  class: y(M(X)("absolute inset-x-0 z-(--toast-z) list-none rounded", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0", m.value ? "top-0 origin-top" : "bottom-0 origin-bottom", "translate-y-(--toast-stacked) scale-(--toast-scale) opacity-(--toast-opacity)", "data-expanded:translate-y-(--toast-spread) data-expanded:scale-(--toast-spread-scale) data-expanded:opacity-(--toast-spread-opacity)", "transition-[translate,scale,opacity] duration-300 ease-out motion-reduce:transition-none", "data-[state=closed]:animate-fade-out", "data-[swipe=move]:translate-x-(--reka-toast-swipe-move-x) data-[swipe=move]:transition-none", "data-[swipe=cancel]:translate-x-0", "data-[swipe=end]:animate-slide-out-right")),
5633
5641
  "onUpdate:open": (t) => te(e.id, t)
5634
5642
  }, {
5635
- default: V(() => [d(Ws, {
5643
+ default: V(() => [d(Gs, {
5636
5644
  ref_for: !0,
5637
5645
  ref: (t) => H(e.id, t),
5638
5646
  type: e.item.type,
@@ -5675,7 +5683,7 @@ var Rs = { class: "sr-only" }, zs = {
5675
5683
  type: "button",
5676
5684
  class: y(M(X)("flex cursor-pointer items-center justify-center overflow-hidden border border-black/15 bg-white font-bold whitespace-nowrap text-black shadow-md hover:bg-surface-elevated", "h-7 w-24 rounded-2xl text-xs", A.value && "in-data-expanded:h-9 in-data-expanded:w-full in-data-expanded:rounded in-data-expanded:text-sm", "transition-[width,height,border-radius,font-size,background-color] duration-300 ease-out motion-reduce:transition-none", "outline-2 outline-offset-1 outline-transparent focus-visible:outline-focus forced-colors:not-focus-visible:outline-0")),
5677
5685
  onClick: ie
5678
- }, [A.value ? (w(), s(n, { key: 0 }, [c("span", Ys, j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1), c("span", Xs, j(M(r)("ui.notifications.more", { count: A.value })), 1)], 64)) : (w(), s(n, { key: 1 }, [u(j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1)], 64)), c("span", Zs, "\xA0" + j(M(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
5686
+ }, [A.value ? (w(), s(n, { key: 0 }, [c("span", Xs, j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1), c("span", Zs, j(M(r)("ui.notifications.more", { count: A.value })), 1)], 64)) : (w(), s(n, { key: 1 }, [u(j(M(r)("ui.notifications.more", { count: q.value.notInView })), 1)], 64)), c("span", Qs, "\xA0" + j(M(r)("ui.notifications.notifications")), 1)], 2)], 6)) : o("", !0)]),
5679
5687
  _: 1
5680
5688
  }, 8, [
5681
5689
  "label",
@@ -5685,7 +5693,7 @@ var Rs = { class: "sr-only" }, zs = {
5685
5693
  _: 1
5686
5694
  }, 8, ["label"]));
5687
5695
  }
5688
- }), nc = { ui: {
5696
+ }), rc = { ui: {
5689
5697
  age: {
5690
5698
  born: "Born {date}",
5691
5699
  birthdayToday: "Birthday today",
@@ -5801,16 +5809,16 @@ var Rs = { class: "sr-only" }, zs = {
5801
5809
  selectRow: "Select row {n}",
5802
5810
  select: "Select"
5803
5811
  }
5804
- } }, rc = { en: nc };
5805
- function ic(e = {}) {
5806
- let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(rc), ...Object.keys(t)])], a = {};
5812
+ } }, ic = { en: rc };
5813
+ function ac(e = {}) {
5814
+ let { messages: t = {}, fallbackLocale: n = "en", storageKey: r = "keston-locale" } = e, i = [.../* @__PURE__ */ new Set([...Object.keys(ic), ...Object.keys(t)])], a = {};
5807
5815
  for (let e of i) a[e] = {
5808
- ...rc[e],
5816
+ ...ic[e],
5809
5817
  ...t[e]
5810
5818
  };
5811
5819
  let o = G({
5812
5820
  legacy: !1,
5813
- locale: e.locale ?? ac(i, n, r),
5821
+ locale: e.locale ?? oc(i, n, r),
5814
5822
  fallbackLocale: n,
5815
5823
  messages: a
5816
5824
  });
@@ -5821,7 +5829,7 @@ function ic(e = {}) {
5821
5829
  typeof document < "u" && (document.documentElement.lang = e);
5822
5830
  }, { immediate: !0 }), o;
5823
5831
  }
5824
- function ac(e, t, n) {
5832
+ function oc(e, t, n) {
5825
5833
  try {
5826
5834
  let t = localStorage.getItem(n);
5827
5835
  if (t && e.includes(t)) return t;
@@ -5832,4 +5840,4 @@ function ac(e, t, n) {
5832
5840
  }
5833
5841
  return t;
5834
5842
  }
5835
- export { Es as Age, Yr as AppShell, ur as Avatar, Ti as AvatarGroup, br as Badge, ii as Breadcrumb, Z as Button, oa as Calendar, ki as Card, io as Checkbox, xo as CheckboxGroup, us as Checklist, Mi as Chip, Fi as Divider, Co as EmptyState, Ki as FormField, vr as Header, Ri as InfoTip, Ji as Input, Ha as InputCode, ka as InputDate, Zi as InputNumber, La as InputPassword, Na as InputRichText, _o as InputTextArea, So as LanguageSwitcher, Ds as Link, ai as Menu, Ws as Notification, Js as NotificationPane, pi as PageHeader, Jn as Popover, Lr as Progress, fo as RadioGroup, ws as RelativeTime, no as Select, vi as SettingsRow, Pr as Sidebar, Gr as Slideover, Rn as Spinner, Qo as StatTile, As as Steps, ss as SummaryList, ho as Switch, Uo as Table, js as Tabs, tc as Toaster, Aa as Tooltip, _s as age, X as cn, ic as createKestonI18n, Fs as createNotifications, vs as daysToBirthday, nc as en, gs as formatDate, hs as formatDateTime, ms as relativeTime, xr as sidebarTrail, Eo as sortRows, ds as toDate, rc as uiMessages, Ls as useNotifications, Ss as useNow };
5843
+ export { Ds as Age, Yr as AppShell, ur as Avatar, Ti as AvatarGroup, br as Badge, ii as Breadcrumb, Z as Button, oa as Calendar, ki as Card, io as Checkbox, xo as CheckboxGroup, ds as Checklist, Mi as Chip, Fi as Divider, Co as EmptyState, Ki as FormField, vr as Header, Ri as InfoTip, Ji as Input, Ha as InputCode, ka as InputDate, Zi as InputNumber, La as InputPassword, Na as InputRichText, _o as InputTextArea, So as LanguageSwitcher, Os as Link, ai as Menu, Gs as Notification, Ys as NotificationPane, pi as PageHeader, Jn as Popover, Lr as Progress, fo as RadioGroup, Ts as RelativeTime, no as Select, vi as SettingsRow, Pr as Sidebar, Gr as Slideover, Rn as Spinner, $o as StatTile, js as Steps, cs as SummaryList, ho as Switch, Wo as Table, Ms as Tabs, nc as Toaster, Aa as Tooltip, vs as age, X as cn, ac as createKestonI18n, Is as createNotifications, ys as daysToBirthday, rc as en, _s as formatDate, gs as formatDateTime, hs as relativeTime, xr as sidebarTrail, Eo as sortRows, fs as toDate, ic as uiMessages, Rs as useNotifications, Cs as useNow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thekestongroup/ui",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Keston UI — Vue 3 + Reka UI + Tailwind CSS component library",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -161,20 +161,25 @@ function linkFor(row: Row, index: number) {
161
161
  return props.linkComponent === 'a' ? { href: target as string } : { to: target }
162
162
  }
163
163
 
164
- // The link's ::after covers the row (the row is `relative`), so a click
165
- // anywhere follows it. Controls in other cells are lifted above it, so they
166
- // still get their own clicks. The focus ring is drawn on the ::after, round
167
- // the whole row, just inside its edge.
164
+ // A click anywhere on the row follows its link. Each cell is `relative` and
165
+ // holds its own overlay: the real link's ::after in its cell, and in the
166
+ // others a hidden twin (same target, out of the tab order and the
167
+ // accessibility tree). Not one overlay stretched across the row: Safari
168
+ // (WebKit) doesn't reliably make a <tr> the containing block for absolutely
169
+ // positioned children, so it grew to the whole table. Controls in other cells
170
+ // are lifted above the overlays, so they still get their own clicks. The focus
171
+ // ring is drawn on the real link's ::after, and the row is shaded to match.
168
172
  const rowLinkClass = [
169
173
  'text-inherit no-underline outline-none group-hover/row:underline underline-offset-2',
170
174
  'after:absolute after:inset-0 after:outline-2 after:-outline-offset-2 after:outline-transparent',
171
175
  'focus-visible:after:outline-focus forced-colors:not-focus-visible:after:outline-0'
172
176
  ]
173
177
  const linkedRowClass = [
174
- 'relative cursor-pointer hover:bg-black/5',
175
- '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link])]:relative',
176
- '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link])]:z-1'
178
+ 'cursor-pointer hover:bg-black/5 has-[[data-row-link]:focus-visible]:bg-black/5',
179
+ '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:relative',
180
+ '[&_:is(a,button,input,select,textarea,label,[tabindex]):not([data-row-link],[data-row-overlay])]:z-1'
177
181
  ]
182
+ const overlayClass = 'absolute inset-0 outline-none'
178
183
 
179
184
  const cellPadding = computed(() => {
180
185
  const base = props.size === 'sm' ? 'px-4 py-2' : 'px-4 py-3'
@@ -321,10 +326,20 @@ onBeforeUnmount(() => observer?.disconnect())
321
326
  column.rowHeader ? 'font-bold' : 'font-normal',
322
327
  column.align === 'end' && 'tabular-nums',
323
328
  cellPadding,
329
+ linkFor(row, index) && 'relative',
324
330
  columnClasses(column)
325
331
  )
326
332
  "
327
333
  >
334
+ <component
335
+ :is="linkComponent"
336
+ v-if="column.key !== linkColumn && linkFor(row, index)"
337
+ v-bind="linkFor(row, index)"
338
+ data-row-overlay
339
+ tabindex="-1"
340
+ aria-hidden="true"
341
+ :class="overlayClass"
342
+ />
328
343
  <component
329
344
  :is="linkComponent"
330
345
  v-if="column.key === linkColumn && linkFor(row, index)"