@fastr-pro/global-header 1.0.16 → 1.0.18

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/index.js CHANGED
@@ -810,11 +810,13 @@ function ut({ className: e, ...t }) {
810
810
  });
811
811
  }
812
812
  var dt = d("group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center gap-1.5 rounded-lg px-2.5 py-1.5 text-sm font-medium transition-colors outline-none hover:bg-muted focus:bg-muted focus-visible:ring-2 focus-visible:ring-ring focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 data-popup-open:bg-muted data-open:bg-muted cursor-pointer text-foreground select-none");
813
- function ft({ className: e, children: t, ...n }) {
813
+ function ft({ className: e, children: t, render: n, href: r, ...i }) {
814
+ let a = r ? /* @__PURE__ */ s("a", { href: r }) : void 0;
814
815
  return /* @__PURE__ */ c(u.Trigger, {
815
816
  "data-slot": "navigation-menu-trigger",
816
817
  className: Z(dt(), "group", e),
817
- ...n,
818
+ render: n || a,
819
+ ...i,
818
820
  children: [t, /* @__PURE__ */ s(x, {
819
821
  className: "size-3.5 shrink-0 opacity-70 transition-transform duration-200 group-data-popup-open/navigation-menu-trigger:rotate-180 group-data-open/navigation-menu-trigger:rotate-180",
820
822
  "aria-hidden": "true"
@@ -851,11 +853,12 @@ function mt({ className: e, side: t = "bottom", sideOffset: n = 8, align: r = "s
851
853
  })
852
854
  });
853
855
  }
854
- function ht({ className: e, ...t }) {
856
+ function ht({ className: e, render: t, ...n }) {
855
857
  return /* @__PURE__ */ s(u.Link, {
856
858
  "data-slot": "navigation-menu-link",
859
+ render: t,
857
860
  className: Z("flex items-center gap-2 rounded-lg p-2 text-sm transition-all outline-none hover:bg-muted focus:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 in-data-[slot=navigation-menu-content]:rounded-md data-active:bg-muted/50 data-active:hover:bg-muted data-active:focus:bg-muted [&_svg:not([class*='size-'])]:size-4", e),
858
- ...t
861
+ ...n
859
862
  });
860
863
  }
861
864
  function gt({ className: e, ...t }) {
@@ -3260,7 +3263,7 @@ var Vt = t(function({ app: e, type: t = "macro", config: n, currentApp: a = "der
3260
3263
  return /* @__PURE__ */ s("div", {
3261
3264
  "data-fastr-popup": "",
3262
3265
  "data-theme": l ? "dark" : "light",
3263
- className: "bg-popover text-popover-foreground border-border w-[960px] max-w-[calc(100vw-2rem)] rounded-xl border p-4 shadow-2xl transition-all overflow-hidden",
3266
+ className: "bg-popover text-popover-foreground border-border w-240 max-w-[calc(100vw-2rem)] rounded-xl border p-4 shadow-2xl transition-all overflow-hidden",
3264
3267
  onMouseDown: (e) => e.stopPropagation(),
3265
3268
  children: /* @__PURE__ */ c("div", {
3266
3269
  className: "grid grid-cols-1 gap-4 lg:grid-cols-[220px_190px_1fr]",
@@ -3642,7 +3645,7 @@ function Gt({ config: e, authApiUrl: t, authRedirectUrl: l, redirectOnInvalidSes
3642
3645
  try {
3643
3646
  localStorage.removeItem("user"), localStorage.removeItem("token"), localStorage.removeItem("auth_token"), sessionStorage.removeItem("user"), sessionStorage.removeItem("token"), sessionStorage.removeItem("auth_token");
3644
3647
  } catch {}
3645
- let e = window.location.href, t = encodeURIComponent(e), n = `${L}/logout?app_id=${encodeURIComponent(F || "")}&p_screen=${t}&redirect=${t}`;
3648
+ let e = window.location.href, t = encodeURIComponent(e), n = `${L}/login?app_id=${encodeURIComponent(F || "")}&p_screen=${t}&redirect=${t}`;
3646
3649
  window.location.assign(n);
3647
3650
  }
3648
3651
  }, Ge = i(() => {
@@ -3746,6 +3749,7 @@ function Gt({ config: e, authApiUrl: t, authRedirectUrl: l, redirectOnInvalidSes
3746
3749
  className: "bg-transparent overflow-visible!",
3747
3750
  children: [/* @__PURE__ */ c(ft, {
3748
3751
  ref: t === 0 ? J : void 0,
3752
+ href: e.href || "/",
3749
3753
  onClick: (t) => Ke(t, e),
3750
3754
  className: Z(e.isActive && "border-primary border-2 text-primary font-semibold"),
3751
3755
  children: [Rt(e.icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ s("span", { children: e.name })]
@@ -3769,17 +3773,16 @@ function Gt({ config: e, authApiUrl: t, authRedirectUrl: l, redirectOnInvalidSes
3769
3773
  })]
3770
3774
  }, e.id) : /* @__PURE__ */ s(ut, {
3771
3775
  value: e.id,
3772
- children: /* @__PURE__ */ s(ht, {
3773
- asChild: !0,
3774
- children: /* @__PURE__ */ c("a", {
3776
+ children: /* @__PURE__ */ c(ht, {
3777
+ render: /* @__PURE__ */ s("a", {
3775
3778
  ref: t === 0 ? J : void 0,
3776
3779
  href: e.href || "/",
3777
3780
  onClick: (t) => {
3778
3781
  t.metaKey || t.ctrlKey || t.shiftKey || t.button === 1 || Ke(t, e);
3779
3782
  },
3780
- className: Z(dt(), "cursor-pointer", e.isActive && "bg-primary text-primary-foreground font-semibold hover:bg-primary/90 hover:text-primary-foreground"),
3781
- children: [Rt(e.icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ s("span", { children: e.name })]
3782
- })
3783
+ className: Z(dt(), "cursor-pointer", e.isActive && "bg-primary text-primary-foreground font-semibold hover:bg-primary/90 hover:text-primary-foreground")
3784
+ }),
3785
+ children: [Rt(e.icon, { className: "size-4 shrink-0" }), /* @__PURE__ */ s("span", { children: e.name })]
3783
3786
  })
3784
3787
  }, e.id);
3785
3788
  })