@sabrenski/spire-ui-vue 0.2.6 → 0.2.8

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/spire-ui.js CHANGED
@@ -498,7 +498,7 @@ const I1 = /* @__PURE__ */ Q({
498
498
  lg: "md",
499
499
  xl: "lg"
500
500
  }, C = L(() => e.href ? "a" : "button"), k = L(() => c[t]), u = L(() => [
501
- "inline-flex items-center justify-center font-medium rounded-button",
501
+ "inline-flex items-center justify-center font-medium rounded-button shrink-0",
502
502
  "transition-colors duration-150",
503
503
  "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-ring-offset",
504
504
  i[r],
@@ -2022,6 +2022,7 @@ const vb1 = {
2022
2022
  "aria-labelledby": l,
2023
2023
  "aria-multiselectable": o.multiple || void 0,
2024
2024
  "data-spire-placement": "bottom-start",
2025
+ "data-spire-strategy": "fixed",
2025
2026
  class: N(PH1.value),
2026
2027
  style: x1({ "--trigger-width": y.value?.offsetWidth + "px" }),
2027
2028
  tabindex: "-1",
@@ -3631,6 +3632,7 @@ const aV1 = ["x", "y", "width", "height", "rx", "ry", "fill", "opacity"], dV1 =
3631
3632
  "aria-multiselectable": o.multiple || void 0,
3632
3633
  "aria-activedescendant": I(V1),
3633
3634
  "data-spire-placement": "bottom-start",
3635
+ "data-spire-strategy": "fixed",
3634
3636
  class: N(j1.value),
3635
3637
  style: x1({ "--trigger-width": l.value?.offsetWidth + "px" }),
3636
3638
  tabindex: "-1",
@@ -16038,7 +16040,7 @@ const Vf1 = Symbol("popover"), kw1 = ["aria-expanded", "aria-disabled", "data-sp
16038
16040
  placement: { default: "bottom" },
16039
16041
  showDelay: { default: 0 },
16040
16042
  hideDelay: { default: 200 },
16041
- strategy: { default: "absolute" },
16043
+ strategy: { default: "fixed" },
16042
16044
  disabled: { type: Boolean, default: !1 },
16043
16045
  closeOnClickOutside: { type: Boolean, default: !0 },
16044
16046
  closeOnEscape: { type: Boolean, default: !0 }
@@ -17019,6 +17021,7 @@ const Vf1 = Symbol("popover"), kw1 = ["aria-expanded", "aria-disabled", "data-sp
17019
17021
  role: "dialog",
17020
17022
  "aria-modal": "true",
17021
17023
  "data-spire-placement": "bottom-start",
17024
+ "data-spire-strategy": "fixed",
17022
17025
  class: N(F.value),
17023
17026
  tabindex: "-1",
17024
17027
  onToggle: m,
@@ -17584,7 +17587,7 @@ const Vf1 = Symbol("popover"), kw1 = ["aria-expanded", "aria-disabled", "data-sp
17584
17587
  closeOnSelect: { type: Boolean, default: !0 },
17585
17588
  placement: { default: "bottom-start" },
17586
17589
  offset: { default: 4 },
17587
- strategy: { default: "absolute" }
17590
+ strategy: { default: "fixed" }
17588
17591
  },
17589
17592
  emits: ["update:open", "action", "open", "close"],
17590
17593
  setup(o, { expose: e, emit: r }) {
@@ -18106,6 +18109,7 @@ const Vf1 = Symbol("popover"), kw1 = ["aria-expanded", "aria-disabled", "data-sp
18106
18109
  role: "menu",
18107
18110
  "aria-labelledby": n,
18108
18111
  "data-spire-placement": "right-start",
18112
+ "data-spire-strategy": "fixed",
18109
18113
  class: N(v.value),
18110
18114
  onMouseenter: u,
18111
18115
  onMouseleave: y,
@@ -18760,7 +18764,8 @@ const Vf1 = Symbol("popover"), kw1 = ["aria-expanded", "aria-disabled", "data-sp
18760
18764
  popover: "hint",
18761
18765
  role: "tooltip",
18762
18766
  class: N(l.value),
18763
- "data-spire-placement": o.placement
18767
+ "data-spire-placement": o.placement,
18768
+ "data-spire-strategy": "fixed"
18764
18769
  }, [
18765
18770
  A(m.$slots, "content", {}, () => [
18766
18771
  W1(G(o.content), 1)
@@ -24694,8 +24699,8 @@ const bN1 = { class: "line-chart-path" }, VN1 = ["d", "fill", "fill-opacity"], F
24694
24699
  bottom: "fixed inset-x-0 bottom-0 top-auto m-0 w-full max-h-none max-w-none rounded-none rounded-t-xl"
24695
24700
  }, f = {
24696
24701
  center: "m-auto rounded-xl",
24697
- left: "fixed top-4 left-4 bottom-4 right-auto m-0 h-auto max-h-none rounded-xl",
24698
- right: "fixed top-4 right-4 bottom-4 left-auto m-0 h-auto max-h-none rounded-xl",
24702
+ left: "fixed top-4 left-4 bottom-4 right-auto m-0 rounded-xl",
24703
+ right: "fixed top-4 right-4 bottom-4 left-auto m-0 rounded-xl",
24699
24704
  top: "fixed top-4 left-4 right-4 bottom-auto m-0 w-auto max-w-none rounded-xl",
24700
24705
  bottom: "fixed bottom-4 left-4 right-4 top-auto m-0 w-auto max-w-none rounded-xl"
24701
24706
  }, j = {
@@ -24736,11 +24741,13 @@ const bN1 = { class: "line-chart-path" }, VN1 = ["d", "fill", "fill-opacity"], F
24736
24741
  t.backdrop ? "backdrop:bg-overlay backdrop:backdrop-blur-sm" : "backdrop:bg-transparent"
24737
24742
  ]), H = L(() => [
24738
24743
  "flex flex-col",
24739
- u.value && (t.placement === "left" || t.placement === "right") ? "h-full" : "max-h-[calc(100vh-4rem)]"
24744
+ u.value && (t.placement === "left" || t.placement === "right") ? "h-full max-h-full" : "max-h-[calc(100vh-4rem)]"
24740
24745
  ]);
24741
24746
  function b() {
24742
24747
  if (!(!s.value || i.value)) {
24743
- if (s.value.showModal(), i.value = !0, l.value) {
24748
+ if (document.querySelectorAll("[popover]:popover-open").forEach((B) => {
24749
+ B.hidePopover();
24750
+ }), s.value.showModal(), i.value = !0, l.value) {
24744
24751
  const B = h();
24745
24752
  document.body.style.paddingRight = `${B}px`, document.body.style.overflow = "hidden";
24746
24753
  }
@@ -26431,6 +26438,7 @@ const Wx1 = Symbol("phone-input"), gx1 = { class: "relative" }, jx1 = ["data-spi
26431
26438
  popover: "auto",
26432
26439
  role: "listbox",
26433
26440
  "data-spire-placement": "bottom-start",
26441
+ "data-spire-strategy": "fixed",
26434
26442
  class: N(v1.value),
26435
26443
  style: x1({ "--trigger-width": h.value?.offsetWidth + "px" }),
26436
26444
  tabindex: "-1",
@@ -28043,6 +28051,7 @@ const Bx1 = ["transform"], Rx1 = ["d", "fill", "opacity"], Dx1 = /* @__PURE__ */
28043
28051
  },
28044
28052
  popover: "manual",
28045
28053
  "data-spire-placement": "bottom-start",
28054
+ "data-spire-strategy": "fixed",
28046
28055
  class: N(Z.value),
28047
28056
  style: x1({ minWidth: j.value }),
28048
28057
  role: "listbox",
@@ -28402,7 +28411,7 @@ const ZK1 = ["aria-label"], AK1 = ["aria-expanded"], TK1 = {
28402
28411
  as: { default: "a" }
28403
28412
  },
28404
28413
  setup(o) {
28405
- const e = o, r = H1(i5), t = L(() => r?.isMini.value ?? !1), n = Ok(() => e.as, "a"), s = L(() => e.href ? n.value : "div"), i = L(() => e.href ? e.as === "a" ? { href: e.href } : e.as === "router-link" || e.as === "inertia-link" ? { to: e.href } : { href: e.href } : {}), a = L(() => [
28414
+ const e = o, r = H1(i5), t = L(() => r?.isMini.value ?? !1), n = Ok(() => e.as, "a"), s = L(() => e.href ? n.value : "div"), i = L(() => e.href ? e.as === "router-link" ? { to: e.href } : { href: e.href } : {}), a = L(() => [
28406
28415
  "flex items-center py-4",
28407
28416
  "border-b border-border",
28408
28417
  "min-h-[64px]",
@@ -28561,7 +28570,7 @@ const ZK1 = ["aria-label"], AK1 = ["aria-expanded"], TK1 = {
28561
28570
  setup(o, { emit: e }) {
28562
28571
  const r = o, t = e, n = H1(i5), s = L(() => n?.isMini.value ?? !1), i = R1();
28563
28572
  L(() => r.itemKey ?? i);
28564
- const a = L(() => r.isActive ? !0 : n?.activeKey.value && r.itemKey ? n.activeKey.value === r.itemKey : !1), d = Ok(() => r.as, "a"), c = L(() => r.isDisabled ? "span" : r.href ? d.value : "button"), C = L(() => r.isDisabled || !r.href ? {} : r.as === "a" ? { href: r.href } : r.as === "router-link" || r.as === "inertia-link" ? { to: r.href } : { href: r.href }), k = L(() => s.value ? r.tooltip ?? r.label ?? "" : "");
28573
+ const a = L(() => r.isActive ? !0 : n?.activeKey.value && r.itemKey ? n.activeKey.value === r.itemKey : !1), d = Ok(() => r.as, "a"), c = L(() => r.isDisabled ? "span" : r.href ? d.value : "button"), C = L(() => r.isDisabled || !r.href ? {} : r.as === "router-link" ? { to: r.href } : { href: r.href }), k = L(() => s.value ? r.tooltip ?? r.label ?? "" : "");
28565
28574
  function u(y) {
28566
28575
  if (r.isDisabled) {
28567
28576
  y.preventDefault();
@@ -28670,7 +28679,7 @@ const ZK1 = ["aria-label"], AK1 = ["aria-expanded"], TK1 = {
28670
28679
  function u() {
28671
28680
  i.value = !1, a.value = !1;
28672
28681
  }
28673
- const l = L(() => s.value ? "button" : r.href && r.as === "div" ? "a" : r.as), h = L(() => r.href ? r.as === "a" || r.as === "div" ? { href: r.href } : r.as === "router-link" || r.as === "inertia-link" ? { to: r.href } : { href: r.href } : {}), p = L(() => [
28682
+ const l = L(() => s.value ? "button" : r.href && r.as === "div" ? "a" : r.as), h = L(() => r.href ? r.as === "router-link" ? { to: r.href } : { href: r.href } : {}), p = L(() => [
28674
28683
  "inline-flex items-center gap-3",
28675
28684
  "transition-colors duration-150",
28676
28685
  r.isFocusable ? "focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:rounded-lg" : "",
@@ -28877,7 +28886,7 @@ const ZK1 = ["aria-label"], AK1 = ["aria-expanded"], TK1 = {
28877
28886
  as: { default: "a" }
28878
28887
  },
28879
28888
  setup(o) {
28880
- const e = o, r = H1(i5), t = L(() => r?.isMini.value ?? !1), n = Ok(() => e.as, "a"), s = L(() => e.href ? n.value : "div"), i = L(() => e.href ? e.as === "a" ? { href: e.href } : e.as === "router-link" || e.as === "inertia-link" ? { to: e.href } : { href: e.href } : {}), a = L(() => [
28889
+ const e = o, r = H1(i5), t = L(() => r?.isMini.value ?? !1), n = Ok(() => e.as, "a"), s = L(() => e.href ? n.value : "div"), i = L(() => e.href ? e.as === "router-link" ? { to: e.href } : { href: e.href } : {}), a = L(() => [
28881
28890
  "flex items-center",
28882
28891
  "transition-all duration-150",
28883
28892
  t.value ? "justify-center" : "gap-3",
@@ -54739,6 +54748,7 @@ const yU1 = { class: "flex gap-0.5 p-2" }, MU1 = ["onClick"], mU1 = ["onClick"],
54739
54748
  role: "dialog",
54740
54749
  "aria-modal": "true",
54741
54750
  "data-spire-placement": "bottom-start",
54751
+ "data-spire-strategy": "fixed",
54742
54752
  class: N(l1.value),
54743
54753
  tabindex: "-1",
54744
54754
  onToggle: x,
@@ -55311,62 +55321,67 @@ const yU1 = { class: "flex gap-0.5 p-2" }, MU1 = ["onClick"], mU1 = ["onClick"],
55311
55321
  "bottom-left": "animate-toast-slide-out-left",
55312
55322
  "bottom-center": "animate-toast-slide-out-bottom",
55313
55323
  "bottom-right": "animate-toast-slide-out-right"
55314
- }, a = L(() => qu.value.toasts), d = L(() => a.value.filter((f) => f.placement === r.placement).slice(0, r.maxVisibleToasts)), c = L(() => [
55324
+ }, a = L(() => qu.value.toasts), d = L(() => a.value.filter((j) => j.placement === r.placement).slice(0, r.maxVisibleToasts)), c = L(() => [
55315
55325
  "fixed z-50 flex flex-col p-4 pointer-events-none",
55316
55326
  n[r.placement]
55317
55327
  ]), C = L(() => {
55318
- const m = r.offset ?? { x: 0, y: 0 };
55328
+ const f = r.offset ?? { x: 0, y: 0 };
55319
55329
  return {
55330
+ position: "fixed",
55331
+ inset: "unset",
55320
55332
  gap: `${r.gap}px`,
55321
- ...m.x ? { [r.placement.includes("left") ? "left" : "right"]: `${m.x}px` } : {},
55322
- ...m.y ? { [r.placement.includes("top") ? "top" : "bottom"]: `${m.y}px` } : {}
55333
+ ...f.x ? { [r.placement.includes("left") ? "left" : "right"]: `${f.x}px` } : {},
55334
+ ...f.y ? { [r.placement.includes("top") ? "top" : "bottom"]: `${f.y}px` } : {}
55323
55335
  };
55324
- }), k = L(() => r.placement.includes("bottom"));
55325
- function u(m) {
55326
- ZC(m), t("toastDismiss", m);
55336
+ }), k = L(() => r.placement.includes("bottom")), u = S(null);
55337
+ function l(f) {
55338
+ ZC(f), t("toastDismiss", f);
55327
55339
  }
55328
- function l(m) {
55329
- const f = Ho({ ...m, placement: m.placement ?? r.placement });
55330
- return t("toastAdd", f), f;
55340
+ function h(f) {
55341
+ const j = Ho({ ...f, placement: f.placement ?? r.placement });
55342
+ return t("toastAdd", j), j;
55331
55343
  }
55332
- const h = {
55333
- add: l,
55344
+ const p = {
55345
+ add: h,
55334
55346
  dismiss: ZC,
55335
55347
  dismissAll: XW1,
55336
55348
  update: Cd,
55337
55349
  toasts: L(() => qu.value.toasts),
55338
55350
  defaultPlacement: r.placement
55339
55351
  };
55340
- r2(QU1, h), T1(() => {
55341
- Qc({
55352
+ r2(QU1, p), T1(() => {
55353
+ u.value?.showPopover(), Qc({
55342
55354
  defaultPlacement: r.placement,
55343
55355
  maxVisibleToasts: r.maxVisibleToasts
55344
55356
  });
55345
- }), M1(() => r.placement, (m) => {
55346
- Qc({ defaultPlacement: m });
55347
- }), M1(() => r.maxVisibleToasts, (m) => {
55348
- Qc({ maxVisibleToasts: m });
55357
+ }), M1(() => r.placement, (f) => {
55358
+ Qc({ defaultPlacement: f });
55359
+ }), M1(() => r.maxVisibleToasts, (f) => {
55360
+ Qc({ maxVisibleToasts: f });
55349
55361
  });
55350
- let p = null;
55351
- async function y() {
55362
+ let y = null;
55363
+ async function m() {
55352
55364
  try {
55353
- let m = function() {
55354
- const H = v.props.flash;
55355
- H?.toast && l(H.toast);
55365
+ let f = function() {
55366
+ const b = H.props.flash;
55367
+ b?.toast && h(b.toast);
55356
55368
  };
55357
- const { usePage: f, router: j } = await import("@inertiajs/vue3"), v = f();
55358
- m(), j.on("finish", m), p = () => {
55359
- j.off("finish", m);
55369
+ const { usePage: j, router: v } = await import("@inertiajs/vue3"), H = j();
55370
+ f(), v.on("finish", f), y = () => {
55371
+ v.off("finish", f);
55360
55372
  };
55361
55373
  } catch {
55362
55374
  }
55363
55375
  }
55364
55376
  return T1(() => {
55365
- y();
55377
+ m();
55366
55378
  }), U1(() => {
55367
- p && p();
55368
- }), (m, f) => (M(), $(Dk, { to: "body" }, [
55379
+ y && y();
55380
+ }), (f, j) => (M(), $(Dk, { to: "body" }, [
55369
55381
  g("div", {
55382
+ ref_key: "containerRef",
55383
+ ref: u,
55384
+ popover: "manual",
55370
55385
  class: N(c.value),
55371
55386
  style: x1(C.value),
55372
55387
  role: "region",
@@ -55380,31 +55395,31 @@ const yU1 = { class: "flex gap-0.5 p-2" }, MU1 = ["onClick"], mU1 = ["onClick"],
55380
55395
  "move-class": "transition-transform duration-300 ease-smooth"
55381
55396
  }, {
55382
55397
  default: t1(() => [
55383
- (M(!0), W(u1, null, b1(k.value ? [...d.value].reverse() : d.value, (j) => (M(), $(JU1, {
55384
- key: j.id,
55385
- id: j.id,
55386
- title: j.props.title,
55387
- description: j.props.description,
55388
- color: j.props.color,
55389
- variant: j.props.variant,
55390
- "hide-icon": j.props.hideIcon,
55391
- timeout: j.remainingTime,
55392
- closable: j.props.closable,
55393
- draggable: j.props.draggable,
55394
- "show-progress": j.props.showProgress,
55395
- "pause-on-hover": j.props.pauseOnHover,
55396
- actions: j.props.actions,
55397
- "promise-state": j.props.promiseState,
55398
+ (M(!0), W(u1, null, b1(k.value ? [...d.value].reverse() : d.value, (v) => (M(), $(JU1, {
55399
+ key: v.id,
55400
+ id: v.id,
55401
+ title: v.props.title,
55402
+ description: v.props.description,
55403
+ color: v.props.color,
55404
+ variant: v.props.variant,
55405
+ "hide-icon": v.props.hideIcon,
55406
+ timeout: v.remainingTime,
55407
+ closable: v.props.closable,
55408
+ draggable: v.props.draggable,
55409
+ "show-progress": v.props.showProgress,
55410
+ "pause-on-hover": v.props.pauseOnHover,
55411
+ actions: v.props.actions,
55412
+ "promise-state": v.props.promiseState,
55398
55413
  placement: o.placement,
55399
55414
  class: "pointer-events-auto",
55400
- onDismiss: (v) => u(j.id),
55401
- onClick: (v) => j.props.onClick?.(j.id)
55415
+ onDismiss: (H) => l(v.id),
55416
+ onClick: (H) => v.props.onClick?.(v.id)
55402
55417
  }, null, 8, ["id", "title", "description", "color", "variant", "hide-icon", "timeout", "closable", "draggable", "show-progress", "pause-on-hover", "actions", "promise-state", "placement", "onDismiss", "onClick"]))), 128))
55403
55418
  ]),
55404
55419
  _: 1
55405
55420
  }, 8, ["enter-active-class", "leave-active-class"])
55406
55421
  ], 14, YU1),
55407
- A(m.$slots, "default")
55422
+ A(f.$slots, "default")
55408
55423
  ]));
55409
55424
  }
55410
55425
  }), ZH1 = Symbol("tree"), XU1 = ["aria-expanded", "aria-selected", "aria-disabled", "tabindex", "onKeydown"], _U1 = ["aria-label"], eG1 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sabrenski/spire-ui-vue",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "A modern, themeable Vue 3 component library with 57+ components, TypeScript support, and Tailwind CSS v4",
5
5
  "type": "module",
6
6
  "author": "Spire UI Contributors",