@sykoramaros/marosh-components 0.0.9 → 0.1.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/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { clsx as qn } from "clsx";
2
2
  import { twMerge as Xn } from "tailwind-merge";
3
- import { jsx as v, Fragment as ie, jsxs as D } from "react/jsx-runtime";
3
+ import { jsx as v, Fragment as ie, jsxs as A } from "react/jsx-runtime";
4
4
  import { Slot as Zn, createSlot as Se } from "@radix-ui/react-slot";
5
5
  import { cva as Gt } from "class-variance-authority";
6
6
  import * as i from "react";
@@ -876,7 +876,7 @@ function Xt(...e) {
876
876
  };
877
877
  };
878
878
  }
879
- function A(...e) {
879
+ function D(...e) {
880
880
  return i.useCallback(Xt(...e), e);
881
881
  }
882
882
  var Lr = i.createContext(void 0);
@@ -888,7 +888,7 @@ function Fr(e, t) {
888
888
  return i.useReducer((n, r) => t[n][r] ?? n, e);
889
889
  }
890
890
  var H = (e) => {
891
- const { present: t, children: n } = e, r = Vr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), a = A(r.ref, Wr(o));
891
+ const { present: t, children: n } = e, r = Vr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), a = D(r.ref, Wr(o));
892
892
  return typeof n == "function" || r.isPresent ? i.cloneElement(o, { ref: a }) : null;
893
893
  };
894
894
  H.displayName = "Presence";
@@ -967,14 +967,14 @@ function Zt(e) {
967
967
  c.displayName = t;
968
968
  const s = e + "CollectionSlot", m = Se(s), f = K.forwardRef(
969
969
  (u, g) => {
970
- const { scope: w, children: R } = u, b = a(s, w), E = A(g, b.collectionRef);
970
+ const { scope: w, children: R } = u, b = a(s, w), E = D(g, b.collectionRef);
971
971
  return /* @__PURE__ */ v(m, { ref: E, children: R });
972
972
  }
973
973
  );
974
974
  f.displayName = s;
975
975
  const l = e + "CollectionItemSlot", d = "data-radix-collection-item", h = Se(l), p = K.forwardRef(
976
976
  (u, g) => {
977
- const { scope: w, children: R, ...b } = u, E = K.useRef(null), S = A(g, E), C = a(l, w);
977
+ const { scope: w, children: R, ...b } = u, E = K.useRef(null), S = D(g, E), C = a(l, w);
978
978
  return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...b }), () => {
979
979
  C.itemMap.delete(E);
980
980
  })), /* @__PURE__ */ v(h, { [d]: "", ref: S, children: R });
@@ -1027,7 +1027,7 @@ var Br = "DismissableLayer", He = "dismissableLayer.update", $r = "dismissableLa
1027
1027
  onInteractOutside: c,
1028
1028
  onDismiss: s,
1029
1029
  ...m
1030
- } = e, f = i.useContext(Qt), [l, d] = i.useState(null), h = l?.ownerDocument ?? globalThis?.document, [, p] = i.useState({}), y = A(t, (_) => d(_)), u = Array.from(f.layers), [g] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = u.indexOf(g), R = l ? u.indexOf(l) : -1, b = f.layersWithOutsidePointerEventsDisabled.size > 0, E = R >= w, S = Yr((_) => {
1030
+ } = e, f = i.useContext(Qt), [l, d] = i.useState(null), h = l?.ownerDocument ?? globalThis?.document, [, p] = i.useState({}), y = D(t, (_) => d(_)), u = Array.from(f.layers), [g] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = u.indexOf(g), R = l ? u.indexOf(l) : -1, b = f.layersWithOutsidePointerEventsDisabled.size > 0, E = R >= w, S = Yr((_) => {
1031
1031
  const T = _.target, O = [...f.branches].some((P) => P.contains(T));
1032
1032
  !E || O || (o?.(_), c?.(_), _.defaultPrevented || s?.());
1033
1033
  }, h), C = qr((_) => {
@@ -1067,7 +1067,7 @@ var Br = "DismissableLayer", He = "dismissableLayer.update", $r = "dismissableLa
1067
1067
  );
1068
1068
  nt.displayName = Br;
1069
1069
  var Hr = "DismissableLayerBranch", jr = i.forwardRef((e, t) => {
1070
- const n = i.useContext(Qt), r = i.useRef(null), o = A(t, r);
1070
+ const n = i.useContext(Qt), r = i.useRef(null), o = D(t, r);
1071
1071
  return i.useEffect(() => {
1072
1072
  const a = r.current;
1073
1073
  if (a)
@@ -1171,7 +1171,7 @@ var Jr = en, q = "NavigationMenu", [rt, tn, eo] = Zt(q), [je, to, no] = Zt(q), [
1171
1171
  orientation: m = "horizontal",
1172
1172
  dir: f,
1173
1173
  ...l
1174
- } = e, [d, h] = i.useState(null), p = A(t, (O) => h(O)), y = kr(f), u = i.useRef(0), g = i.useRef(0), w = i.useRef(0), [R, b] = i.useState(!0), [E, S] = tt({
1174
+ } = e, [d, h] = i.useState(null), p = D(t, (O) => h(O)), y = kr(f), u = i.useRef(0), g = i.useRef(0), w = i.useRef(0), [R, b] = i.useState(!0), [E, S] = tt({
1175
1175
  prop: r,
1176
1176
  onChange: (O) => {
1177
1177
  const P = O !== "", L = s > 0;
@@ -1356,8 +1356,8 @@ var sn = "NavigationMenuItem", [so, cn] = ot(sn), un = i.forwardRef(
1356
1356
  );
1357
1357
  un.displayName = sn;
1358
1358
  var qe = "NavigationMenuTrigger", co = i.forwardRef((e, t) => {
1359
- const { __scopeNavigationMenu: n, disabled: r, ...o } = e, a = V(qe, e.__scopeNavigationMenu), c = cn(qe, e.__scopeNavigationMenu), s = i.useRef(null), m = A(s, c.triggerRef, t), f = pn(a.baseId, c.value), l = hn(a.baseId, c.value), d = i.useRef(!1), h = i.useRef(!1), p = c.value === a.value;
1360
- return /* @__PURE__ */ D(ie, { children: [
1359
+ const { __scopeNavigationMenu: n, disabled: r, ...o } = e, a = V(qe, e.__scopeNavigationMenu), c = cn(qe, e.__scopeNavigationMenu), s = i.useRef(null), m = D(s, c.triggerRef, t), f = pn(a.baseId, c.value), l = hn(a.baseId, c.value), d = i.useRef(!1), h = i.useRef(!1), p = c.value === a.value;
1360
+ return /* @__PURE__ */ A(ie, { children: [
1361
1361
  /* @__PURE__ */ v(rt.ItemSlot, { scope: n, value: c.value, children: /* @__PURE__ */ v(mn, { asChild: !0, children: /* @__PURE__ */ v(
1362
1362
  M.button,
1363
1363
  {
@@ -1393,7 +1393,7 @@ var qe = "NavigationMenuTrigger", co = i.forwardRef((e, t) => {
1393
1393
  })
1394
1394
  }
1395
1395
  ) }) }),
1396
- p && /* @__PURE__ */ D(ie, { children: [
1396
+ p && /* @__PURE__ */ A(ie, { children: [
1397
1397
  /* @__PURE__ */ v(
1398
1398
  Jr,
1399
1399
  {
@@ -1489,7 +1489,7 @@ var fo = i.forwardRef((e, t) => {
1489
1489
  }
1490
1490
  ) : null;
1491
1491
  }), te = "NavigationMenuContent", vo = i.forwardRef((e, t) => {
1492
- const { forceMount: n, ...r } = e, o = V(te, e.__scopeNavigationMenu), a = cn(te, e.__scopeNavigationMenu), c = A(a.contentRef, t), s = a.value === o.value, m = {
1492
+ const { forceMount: n, ...r } = e, o = V(te, e.__scopeNavigationMenu), a = cn(te, e.__scopeNavigationMenu), c = D(a.contentRef, t), s = a.value === o.value, m = {
1493
1493
  value: a.value,
1494
1494
  triggerRef: a.triggerRef,
1495
1495
  focusProxyRef: a.focusProxyRef,
@@ -1536,7 +1536,7 @@ var mo = i.forwardRef((e, t) => {
1536
1536
  onRootContentClose: s,
1537
1537
  onContentFocusOutside: m,
1538
1538
  ...f
1539
- } = e, l = V(te, n), d = i.useRef(null), h = A(d, t), p = pn(l.baseId, r), y = hn(l.baseId, r), u = tn(n), g = i.useRef(null), { onItemDismiss: w } = l;
1539
+ } = e, l = V(te, n), d = i.useRef(null), h = D(d, t), p = pn(l.baseId, r), y = hn(l.baseId, r), u = tn(n), g = i.useRef(null), { onItemDismiss: w } = l;
1540
1540
  i.useEffect(() => {
1541
1541
  const b = d.current;
1542
1542
  if (l.isRootMenu && b) {
@@ -1604,7 +1604,7 @@ var mo = i.forwardRef((e, t) => {
1604
1604
  });
1605
1605
  fn.displayName = it;
1606
1606
  var po = i.forwardRef((e, t) => {
1607
- const { __scopeNavigationMenu: n, children: r, ...o } = e, a = V(it, n), c = A(t, a.onViewportChange), s = ao(
1607
+ const { __scopeNavigationMenu: n, children: r, ...o } = e, a = V(it, n), c = D(t, a.onViewportChange), s = ao(
1608
1608
  te,
1609
1609
  e.__scopeNavigationMenu
1610
1610
  ), [m, f] = i.useState(null), [l, d] = i.useState(null), h = m ? m?.width + "px" : void 0, p = m ? m?.height + "px" : void 0, y = !!a.value, u = y ? a.value : a.previousValue;
@@ -1724,7 +1724,7 @@ function Ro({
1724
1724
  viewport: n = !0,
1725
1725
  ...r
1726
1726
  }) {
1727
- return /* @__PURE__ */ D(
1727
+ return /* @__PURE__ */ A(
1728
1728
  Eo,
1729
1729
  {
1730
1730
  "data-slot": "navigation-menu",
@@ -1820,7 +1820,7 @@ var Ve = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", Lt
1820
1820
  onMountAutoFocus: o,
1821
1821
  onUnmountAutoFocus: a,
1822
1822
  ...c
1823
- } = e, [s, m] = i.useState(null), f = k(o), l = k(a), d = i.useRef(null), h = A(t, (u) => m(u)), p = i.useRef({
1823
+ } = e, [s, m] = i.useState(null), f = k(o), l = k(a), d = i.useRef(null), h = D(t, (u) => m(u)), p = i.useRef({
1824
1824
  paused: !1,
1825
1825
  pause() {
1826
1826
  this.paused = !0;
@@ -2518,7 +2518,7 @@ var wa = function(e) {
2518
2518
  Mn.displayName = xe;
2519
2519
  var Pn = "DialogTrigger", In = i.forwardRef(
2520
2520
  (e, t) => {
2521
- const { __scopeDialog: n, ...r } = e, o = U(Pn, n), a = A(t, o.triggerRef);
2521
+ const { __scopeDialog: n, ...r } = e, o = U(Pn, n), a = D(t, o.triggerRef);
2522
2522
  return /* @__PURE__ */ v(
2523
2523
  M.button,
2524
2524
  {
@@ -2575,7 +2575,7 @@ var Na = Se("DialogOverlay.RemoveScroll"), Ta = i.forwardRef(
2575
2575
  kn.displayName = Y;
2576
2576
  var xa = i.forwardRef(
2577
2577
  (e, t) => {
2578
- const n = U(Y, e.__scopeDialog), r = i.useRef(null), o = A(t, n.contentRef, r);
2578
+ const n = U(Y, e.__scopeDialog), r = i.useRef(null), o = D(t, n.contentRef, r);
2579
2579
  return i.useEffect(() => {
2580
2580
  const a = r.current;
2581
2581
  if (a) return Ra(a);
@@ -2623,8 +2623,8 @@ var xa = i.forwardRef(
2623
2623
  }
2624
2624
  ), Fn = i.forwardRef(
2625
2625
  (e, t) => {
2626
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, s = U(Y, n), m = i.useRef(null), f = A(t, m);
2627
- return Vo(), /* @__PURE__ */ D(ie, { children: [
2626
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, s = U(Y, n), m = i.useRef(null), f = D(t, m);
2627
+ return Vo(), /* @__PURE__ */ A(ie, { children: [
2628
2628
  /* @__PURE__ */ v(
2629
2629
  gn,
2630
2630
  {
@@ -2648,7 +2648,7 @@ var xa = i.forwardRef(
2648
2648
  )
2649
2649
  }
2650
2650
  ),
2651
- /* @__PURE__ */ D(ie, { children: [
2651
+ /* @__PURE__ */ A(ie, { children: [
2652
2652
  /* @__PURE__ */ v(Da, { titleId: s.titleId }),
2653
2653
  /* @__PURE__ */ v(La, { contentRef: m, descriptionId: s.descriptionId })
2654
2654
  ] })
@@ -2741,9 +2741,9 @@ function Ha({
2741
2741
  side: n = "right",
2742
2742
  ...r
2743
2743
  }) {
2744
- return /* @__PURE__ */ D($a, { children: [
2744
+ return /* @__PURE__ */ A($a, { children: [
2745
2745
  /* @__PURE__ */ v(Ga, {}),
2746
- /* @__PURE__ */ D(
2746
+ /* @__PURE__ */ A(
2747
2747
  Ka,
2748
2748
  {
2749
2749
  "data-slot": "sheet-content",
@@ -2758,7 +2758,7 @@ function Ha({
2758
2758
  ...r,
2759
2759
  children: [
2760
2760
  t,
2761
- /* @__PURE__ */ D(Ua, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2761
+ /* @__PURE__ */ A(Ua, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2762
2762
  /* @__PURE__ */ v(nr, { className: "size-4" }),
2763
2763
  /* @__PURE__ */ v("span", { className: "sr-only", children: "Close" })
2764
2764
  ] })
@@ -2772,21 +2772,21 @@ const vi = ({
2772
2772
  LinkComponent: t = "a",
2773
2773
  className: n,
2774
2774
  ...r
2775
- }) => /* @__PURE__ */ D("header", { className: F(n), ...r, children: [
2775
+ }) => /* @__PURE__ */ A("header", { className: F(n), ...r, children: [
2776
2776
  /* @__PURE__ */ v("nav", { className: "hidden sm:flex sticky top-0 z-10 items-center px-4 h-14", children: /* @__PURE__ */ v(Ro, { children: /* @__PURE__ */ v(_o, { children: e.map((o) => /* @__PURE__ */ v(Oo, { children: /* @__PURE__ */ v(
2777
2777
  xo,
2778
2778
  {
2779
2779
  asChild: !0,
2780
2780
  className: No(),
2781
- children: /* @__PURE__ */ D(t, { to: o.url, className: "flex items-center", children: [
2781
+ children: /* @__PURE__ */ A(t, { to: o.url, className: "flex items-center", children: [
2782
2782
  o.icon && /* @__PURE__ */ v(o.icon, {}),
2783
2783
  /* @__PURE__ */ v("span", { children: o.title })
2784
2784
  ] })
2785
2785
  }
2786
2786
  ) }, o.title)) }) }) }),
2787
- /* @__PURE__ */ v("nav", { className: "flex sm:hidden", children: /* @__PURE__ */ D(za, { children: [
2787
+ /* @__PURE__ */ v("nav", { className: "flex sm:hidden", children: /* @__PURE__ */ A(za, { children: [
2788
2788
  /* @__PURE__ */ v(Ba, { asChild: !0, children: /* @__PURE__ */ v(Je, { variant: "ghost", size: "icon", children: /* @__PURE__ */ v(rr, {}) }) }),
2789
- /* @__PURE__ */ v(Ha, { side: "top", className: "p-8", children: /* @__PURE__ */ v("div", { className: "flex flex-col gap-4", children: e.map((o) => /* @__PURE__ */ D(
2789
+ /* @__PURE__ */ v(Ha, { side: "top", className: "p-8", children: /* @__PURE__ */ v("div", { className: "flex flex-col gap-4", children: e.map((o) => /* @__PURE__ */ A(
2790
2790
  t,
2791
2791
  {
2792
2792
  to: o.url,
@@ -2805,7 +2805,7 @@ const vi = ({
2805
2805
  socialProfiles: n,
2806
2806
  className: r,
2807
2807
  ...o
2808
- }) => /* @__PURE__ */ v("footer", { className: F(r), ...o, children: /* @__PURE__ */ D("div", { className: "flex flex-col items-center justify-center gap-5 bg-background py-8 border-t", children: [
2808
+ }) => /* @__PURE__ */ v("footer", { className: F(r), ...o, children: /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center gap-5 bg-background py-8 border-t", children: [
2809
2809
  /* @__PURE__ */ v("div", { className: "flex justify-center gap-5 sm:gap-8 xl:gap-13", children: n.map((a) => /* @__PURE__ */ v(
2810
2810
  Je,
2811
2811
  {
@@ -2820,11 +2820,7 @@ const vi = ({
2820
2820
  const c = a.url;
2821
2821
  return /* @__PURE__ */ v("a", { href: c, children: a.title }, a.title);
2822
2822
  }) }),
2823
- /* @__PURE__ */ D("div", { className: "text-muted", children: [
2824
- t,
2825
- " ",
2826
- (/* @__PURE__ */ new Date()).getFullYear()
2827
- ] })
2823
+ /* @__PURE__ */ v("div", { className: "text-muted", children: t })
2828
2824
  ] }) });
2829
2825
  export {
2830
2826
  di as CustomButton,