@still-forest/canopy 0.29.1 → 0.30.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.
@@ -1,9 +1,9 @@
1
1
  import { j as o } from "./jsx-runtime-B0GD0xBr.js";
2
2
  import { c as D, u as I, f as Rt, g as At, B as kt, h as Et, S as Dt, b as Pt } from "./calendar-D21xByT8.js";
3
3
  import * as l from "react";
4
- import w, { Fragment as It } from "react";
4
+ import T, { Fragment as It } from "react";
5
5
  import { c as h } from "./index-CRiPKpXj.js";
6
- import { a as F, c as K, b as O, P as _, e as j, d as $, f as St, g as Ot, u as Mt, h as _e, i as $t, R as Lt, j as zt, F as Ft, D as Ne, k as Ht, l as Re, m as Bt, A as Gt, n as Vt, C as Wt, o as qt, p as Kt, q as Ut, r as Yt, s as Xt } from "./popover-BhBG-w7n.js";
6
+ import { a as F, c as K, b as O, P as N, e as w, d as $, f as St, g as Ot, u as Mt, h as _e, i as $t, R as Lt, j as zt, F as Ft, D as Ne, k as Ht, l as Re, m as Bt, A as Gt, n as Vt, C as Wt, o as qt, p as Kt, q as Ut, r as Yt, s as Xt } from "./popover-BhBG-w7n.js";
7
7
  import { F as Ae } from "./Layout-DAdzkAxW.js";
8
8
  import { T as ke } from "./Heading-Bpvbpnw2.js";
9
9
  /**
@@ -137,7 +137,7 @@ var U = "Collapsible", [po, Pe] = K(U), [fo, ie] = po(U), Ie = l.forwardRef(
137
137
  open: d,
138
138
  onOpenToggle: l.useCallback(() => p((u) => !u), [p]),
139
139
  children: /* @__PURE__ */ o.jsx(
140
- _.div,
140
+ N.div,
141
141
  {
142
142
  "data-state": ue(d),
143
143
  "data-disabled": s ? "" : void 0,
@@ -154,7 +154,7 @@ var Se = "CollapsibleTrigger", le = l.forwardRef(
154
154
  (e, t) => {
155
155
  const { __scopeCollapsible: r, ...n } = e, a = ie(Se, r);
156
156
  return /* @__PURE__ */ o.jsx(
157
- _.button,
157
+ N.button,
158
158
  {
159
159
  type: "button",
160
160
  "aria-controls": a.contentId,
@@ -164,7 +164,7 @@ var Se = "CollapsibleTrigger", le = l.forwardRef(
164
164
  disabled: a.disabled,
165
165
  ...n,
166
166
  ref: t,
167
- onClick: j(e.onClick, a.onOpenToggle)
167
+ onClick: w(e.onClick, a.onOpenToggle)
168
168
  }
169
169
  );
170
170
  }
@@ -189,11 +189,11 @@ var ho = l.forwardRef((e, t) => {
189
189
  transitionDuration: f.style.transitionDuration,
190
190
  animationName: f.style.animationName
191
191
  }, f.style.transitionDuration = "0s", f.style.animationName = "none";
192
- const T = f.getBoundingClientRect();
193
- g.current = T.height, x.current = T.width, y.current || (f.style.transitionDuration = m.current.transitionDuration, f.style.animationName = m.current.animationName), d(n);
192
+ const _ = f.getBoundingClientRect();
193
+ g.current = _.height, x.current = _.width, y.current || (f.style.transitionDuration = m.current.transitionDuration, f.style.animationName = m.current.animationName), d(n);
194
194
  }
195
195
  }, [i.open, n]), /* @__PURE__ */ o.jsx(
196
- _.div,
196
+ N.div,
197
197
  {
198
198
  "data-state": ue(i.open),
199
199
  "data-disabled": i.disabled ? "" : void 0,
@@ -216,7 +216,7 @@ function ue(e) {
216
216
  var Oe = Ie, go = le, xo = de, R = "Accordion", bo = ["Home", "End", "ArrowDown", "ArrowUp", "ArrowLeft", "ArrowRight"], [pe, mo, vo] = Ot(R), [Y, mn] = K(R, [
217
217
  vo,
218
218
  Pe
219
- ]), fe = Pe(), Me = w.forwardRef(
219
+ ]), fe = Pe(), Me = T.forwardRef(
220
220
  (e, t) => {
221
221
  const { type: r, ...n } = e, a = n, s = n;
222
222
  return /* @__PURE__ */ o.jsx(pe.Provider, { scope: e.__scopeAccordion, children: r === "multiple" ? /* @__PURE__ */ o.jsx(wo, { ...s, ref: t }) : /* @__PURE__ */ o.jsx(jo, { ...a, ref: t }) });
@@ -226,7 +226,7 @@ Me.displayName = R;
226
226
  var [$e, Co] = Y(R), [Le, yo] = Y(
227
227
  R,
228
228
  { collapsible: !1 }
229
- ), jo = w.forwardRef(
229
+ ), jo = T.forwardRef(
230
230
  (e, t) => {
231
231
  const {
232
232
  value: r,
@@ -245,14 +245,14 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
245
245
  $e,
246
246
  {
247
247
  scope: e.__scopeAccordion,
248
- value: w.useMemo(() => c ? [c] : [], [c]),
248
+ value: T.useMemo(() => c ? [c] : [], [c]),
249
249
  onItemOpen: d,
250
- onItemClose: w.useCallback(() => s && d(""), [s, d]),
250
+ onItemClose: T.useCallback(() => s && d(""), [s, d]),
251
251
  children: /* @__PURE__ */ o.jsx(Le, { scope: e.__scopeAccordion, collapsible: s, children: /* @__PURE__ */ o.jsx(ze, { ...i, ref: t }) })
252
252
  }
253
253
  );
254
254
  }
255
- ), wo = w.forwardRef((e, t) => {
255
+ ), wo = T.forwardRef((e, t) => {
256
256
  const {
257
257
  value: r,
258
258
  defaultValue: n,
@@ -264,10 +264,10 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
264
264
  defaultProp: n ?? [],
265
265
  onChange: a,
266
266
  caller: R
267
- }), d = w.useCallback(
267
+ }), d = T.useCallback(
268
268
  (u) => c((g = []) => [...g, u]),
269
269
  [c]
270
- ), p = w.useCallback(
270
+ ), p = T.useCallback(
271
271
  (u) => c((g = []) => g.filter((b) => b !== u)),
272
272
  [c]
273
273
  );
@@ -281,22 +281,22 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
281
281
  children: /* @__PURE__ */ o.jsx(Le, { scope: e.__scopeAccordion, collapsible: !0, children: /* @__PURE__ */ o.jsx(ze, { ...s, ref: t }) })
282
282
  }
283
283
  );
284
- }), [To, X] = Y(R), ze = w.forwardRef(
284
+ }), [To, X] = Y(R), ze = T.forwardRef(
285
285
  (e, t) => {
286
- const { __scopeAccordion: r, disabled: n, dir: a, orientation: s = "vertical", ...i } = e, c = w.useRef(null), d = I(c, t), p = mo(r), g = Mt(a) === "ltr", b = j(e.onKeyDown, (x) => {
286
+ const { __scopeAccordion: r, disabled: n, dir: a, orientation: s = "vertical", ...i } = e, c = T.useRef(null), d = I(c, t), p = mo(r), g = Mt(a) === "ltr", b = w(e.onKeyDown, (x) => {
287
287
  if (!bo.includes(x.key)) return;
288
288
  const v = x.target, C = p().filter((te) => !te.ref.current?.disabled), y = C.findIndex((te) => te.ref.current === v), m = C.length;
289
289
  if (y === -1) return;
290
290
  x.preventDefault();
291
291
  let f = y;
292
- const T = 0, k = m - 1, E = () => {
293
- f = y + 1, f > k && (f = T);
292
+ const _ = 0, k = m - 1, E = () => {
293
+ f = y + 1, f > k && (f = _);
294
294
  }, S = () => {
295
- f = y - 1, f < T && (f = k);
295
+ f = y - 1, f < _ && (f = k);
296
296
  };
297
297
  switch (x.key) {
298
298
  case "Home":
299
- f = T;
299
+ f = _;
300
300
  break;
301
301
  case "End":
302
302
  f = k;
@@ -325,7 +325,7 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
325
325
  direction: a,
326
326
  orientation: s,
327
327
  children: /* @__PURE__ */ o.jsx(pe.Slot, { scope: r, children: /* @__PURE__ */ o.jsx(
328
- _.div,
328
+ N.div,
329
329
  {
330
330
  ...i,
331
331
  "data-orientation": s,
@@ -336,7 +336,7 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
336
336
  }
337
337
  );
338
338
  }
339
- ), W = "AccordionItem", [_o, he] = Y(W), Fe = w.forwardRef(
339
+ ), W = "AccordionItem", [_o, he] = Y(W), Fe = T.forwardRef(
340
340
  (e, t) => {
341
341
  const { __scopeAccordion: r, value: n, ...a } = e, s = X(W, r), i = Co(W, r), c = fe(r), d = O(), p = n && i.value.includes(n) || !1, u = s.disabled || e.disabled;
342
342
  return /* @__PURE__ */ o.jsx(
@@ -366,11 +366,11 @@ var [$e, Co] = Y(R), [Le, yo] = Y(
366
366
  }
367
367
  );
368
368
  Fe.displayName = W;
369
- var He = "AccordionHeader", Be = w.forwardRef(
369
+ var He = "AccordionHeader", Be = T.forwardRef(
370
370
  (e, t) => {
371
371
  const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(He, r);
372
372
  return /* @__PURE__ */ o.jsx(
373
- _.h3,
373
+ N.h3,
374
374
  {
375
375
  "data-orientation": a.orientation,
376
376
  "data-state": qe(s.open),
@@ -382,7 +382,7 @@ var He = "AccordionHeader", Be = w.forwardRef(
382
382
  }
383
383
  );
384
384
  Be.displayName = He;
385
- var re = "AccordionTrigger", Ge = w.forwardRef(
385
+ var re = "AccordionTrigger", Ge = T.forwardRef(
386
386
  (e, t) => {
387
387
  const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(re, r), i = yo(re, r), c = fe(r);
388
388
  return /* @__PURE__ */ o.jsx(pe.ItemSlot, { scope: r, children: /* @__PURE__ */ o.jsx(
@@ -399,7 +399,7 @@ var re = "AccordionTrigger", Ge = w.forwardRef(
399
399
  }
400
400
  );
401
401
  Ge.displayName = re;
402
- var Ve = "AccordionContent", We = w.forwardRef(
402
+ var Ve = "AccordionContent", We = T.forwardRef(
403
403
  (e, t) => {
404
404
  const { __scopeAccordion: r, ...n } = e, a = X(R, r), s = he(Ve, r), i = fe(r);
405
405
  return /* @__PURE__ */ o.jsx(
@@ -460,7 +460,7 @@ var Ye = "DialogTrigger", Xe = l.forwardRef(
460
460
  (e, t) => {
461
461
  const { __scopeDialog: r, ...n } = e, a = A(Ye, r), s = I(t, a.triggerRef);
462
462
  return /* @__PURE__ */ o.jsx(
463
- _.button,
463
+ N.button,
464
464
  {
465
465
  type: "button",
466
466
  "aria-haspopup": "dialog",
@@ -469,7 +469,7 @@ var Ye = "DialogTrigger", Xe = l.forwardRef(
469
469
  "data-state": be(a.open),
470
470
  ...n,
471
471
  ref: s,
472
- onClick: j(e.onClick, a.onOpenToggle)
472
+ onClick: w(e.onClick, a.onOpenToggle)
473
473
  }
474
474
  );
475
475
  }
@@ -496,7 +496,7 @@ var Io = Rt("DialogOverlay.RemoveScroll"), So = l.forwardRef(
496
496
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
497
497
  // ie. when `Overlay` and `Content` are siblings
498
498
  /* @__PURE__ */ o.jsx(Lt, { as: Io, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ o.jsx(
499
- _.div,
499
+ N.div,
500
500
  {
501
501
  "data-state": be(a.open),
502
502
  ...n,
@@ -526,14 +526,14 @@ var Oo = l.forwardRef(
526
526
  ref: a,
527
527
  trapFocus: r.open,
528
528
  disableOutsidePointerEvents: !0,
529
- onCloseAutoFocus: j(e.onCloseAutoFocus, (s) => {
529
+ onCloseAutoFocus: w(e.onCloseAutoFocus, (s) => {
530
530
  s.preventDefault(), r.triggerRef.current?.focus();
531
531
  }),
532
- onPointerDownOutside: j(e.onPointerDownOutside, (s) => {
532
+ onPointerDownOutside: w(e.onPointerDownOutside, (s) => {
533
533
  const i = s.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
534
534
  (i.button === 2 || c) && s.preventDefault();
535
535
  }),
536
- onFocusOutside: j(
536
+ onFocusOutside: w(
537
537
  e.onFocusOutside,
538
538
  (s) => s.preventDefault()
539
539
  )
@@ -597,14 +597,14 @@ var Oo = l.forwardRef(
597
597
  ), xe = "DialogTitle", ot = l.forwardRef(
598
598
  (e, t) => {
599
599
  const { __scopeDialog: r, ...n } = e, a = A(xe, r);
600
- return /* @__PURE__ */ o.jsx(_.h2, { id: a.titleId, ...n, ref: t });
600
+ return /* @__PURE__ */ o.jsx(N.h2, { id: a.titleId, ...n, ref: t });
601
601
  }
602
602
  );
603
603
  ot.displayName = xe;
604
604
  var rt = "DialogDescription", nt = l.forwardRef(
605
605
  (e, t) => {
606
606
  const { __scopeDialog: r, ...n } = e, a = A(rt, r);
607
- return /* @__PURE__ */ o.jsx(_.p, { id: a.descriptionId, ...n, ref: t });
607
+ return /* @__PURE__ */ o.jsx(N.p, { id: a.descriptionId, ...n, ref: t });
608
608
  }
609
609
  );
610
610
  nt.displayName = rt;
@@ -612,12 +612,12 @@ var at = "DialogClose", st = l.forwardRef(
612
612
  (e, t) => {
613
613
  const { __scopeDialog: r, ...n } = e, a = A(at, r);
614
614
  return /* @__PURE__ */ o.jsx(
615
- _.button,
615
+ N.button,
616
616
  {
617
617
  type: "button",
618
618
  ...n,
619
619
  ref: t,
620
- onClick: j(e.onClick, () => a.onOpenChange(!1))
620
+ onClick: w(e.onClick, () => a.onOpenChange(!1))
621
621
  }
622
622
  );
623
623
  }
@@ -648,7 +648,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
648
648
  }, Fo = Ue, yn = Xe, Ho = Je, Bo = Qe, Go = et, Vo = ot, Wo = nt, qo = st, Ko = "Separator", je = "horizontal", Uo = ["horizontal", "vertical"], ct = l.forwardRef((e, t) => {
649
649
  const { decorative: r, orientation: n = je, ...a } = e, s = Yo(n) ? n : je, c = r ? { role: "none" } : { "aria-orientation": s === "vertical" ? s : void 0, role: "separator" };
650
650
  return /* @__PURE__ */ o.jsx(
651
- _.div,
651
+ N.div,
652
652
  {
653
653
  "data-orientation": s,
654
654
  ...c,
@@ -715,7 +715,7 @@ var z = "Tooltip", [Qo, H] = J(z), pt = (e) => {
715
715
  B ? (d.onOpen(), document.dispatchEvent(new CustomEvent(ne))) : d.onClose(), s?.(B);
716
716
  },
717
717
  caller: z
718
- }), T = l.useMemo(() => m ? y.current ? "delayed-open" : "instant-open" : "closed", [m]), k = l.useCallback(() => {
718
+ }), _ = l.useMemo(() => m ? y.current ? "delayed-open" : "instant-open" : "closed", [m]), k = l.useCallback(() => {
719
719
  window.clearTimeout(x.current), x.current = 0, y.current = !1, f(!0);
720
720
  }, [f]), E = l.useCallback(() => {
721
721
  window.clearTimeout(x.current), x.current = 0, f(!1);
@@ -732,7 +732,7 @@ var z = "Tooltip", [Qo, H] = J(z), pt = (e) => {
732
732
  scope: t,
733
733
  contentId: b,
734
734
  open: m,
735
- stateAttribute: T,
735
+ stateAttribute: _,
736
736
  trigger: u,
737
737
  onTriggerChange: g,
738
738
  onTriggerEnter: l.useCallback(() => {
@@ -753,26 +753,26 @@ var ae = "TooltipTrigger", ft = l.forwardRef(
753
753
  (e, t) => {
754
754
  const { __scopeTooltip: r, ...n } = e, a = H(ae, r), s = me(ae, r), i = Q(r), c = l.useRef(null), d = I(t, c, a.onTriggerChange), p = l.useRef(!1), u = l.useRef(!1), g = l.useCallback(() => p.current = !1, []);
755
755
  return l.useEffect(() => () => document.removeEventListener("pointerup", g), [g]), /* @__PURE__ */ o.jsx(Gt, { asChild: !0, ...i, children: /* @__PURE__ */ o.jsx(
756
- _.button,
756
+ N.button,
757
757
  {
758
758
  "aria-describedby": a.open ? a.contentId : void 0,
759
759
  "data-state": a.stateAttribute,
760
760
  ...n,
761
761
  ref: d,
762
- onPointerMove: j(e.onPointerMove, (b) => {
762
+ onPointerMove: w(e.onPointerMove, (b) => {
763
763
  b.pointerType !== "touch" && !u.current && !s.isPointerInTransitRef.current && (a.onTriggerEnter(), u.current = !0);
764
764
  }),
765
- onPointerLeave: j(e.onPointerLeave, () => {
765
+ onPointerLeave: w(e.onPointerLeave, () => {
766
766
  a.onTriggerLeave(), u.current = !1;
767
767
  }),
768
- onPointerDown: j(e.onPointerDown, () => {
768
+ onPointerDown: w(e.onPointerDown, () => {
769
769
  a.open && a.onClose(), p.current = !0, document.addEventListener("pointerup", g, { once: !0 });
770
770
  }),
771
- onFocus: j(e.onFocus, () => {
771
+ onFocus: w(e.onFocus, () => {
772
772
  p.current || a.onOpen();
773
773
  }),
774
- onBlur: j(e.onBlur, a.onClose),
775
- onClick: j(e.onClick, a.onClose)
774
+ onBlur: w(e.onBlur, a.onClose),
775
+ onClick: w(e.onClick, a.onClose)
776
776
  }
777
777
  ) });
778
778
  }
@@ -795,7 +795,7 @@ var M = "TooltipContent", gt = l.forwardRef(
795
795
  c(null), g(!1);
796
796
  }, [g]), x = l.useCallback(
797
797
  (v, C) => {
798
- const y = v.currentTarget, m = { x: v.clientX, y: v.clientY }, f = sr(m, y.getBoundingClientRect()), T = ir(m, f), k = lr(C.getBoundingClientRect()), E = dr([...T, ...k]);
798
+ const y = v.currentTarget, m = { x: v.clientX, y: v.clientY }, f = sr(m, y.getBoundingClientRect()), _ = ir(m, f), k = lr(C.getBoundingClientRect()), E = dr([..._, ...k]);
799
799
  c(E), g(!0);
800
800
  },
801
801
  [g]
@@ -810,8 +810,8 @@ var M = "TooltipContent", gt = l.forwardRef(
810
810
  }, [d, u, x, b]), l.useEffect(() => {
811
811
  if (i) {
812
812
  const v = (C) => {
813
- const y = C.target, m = { x: C.clientX, y: C.clientY }, f = d?.contains(y) || u?.contains(y), T = !cr(m, i);
814
- f ? b() : T && (b(), p());
813
+ const y = C.target, m = { x: C.clientX, y: C.clientY }, f = d?.contains(y) || u?.contains(y), _ = !cr(m, i);
814
+ f ? b() : _ && (b(), p());
815
815
  };
816
816
  return document.addEventListener("pointermove", v), () => document.removeEventListener("pointermove", v);
817
817
  }
@@ -1149,17 +1149,17 @@ const we = [
1149
1149
  ...s
1150
1150
  }
1151
1151
  ) : /* @__PURE__ */ o.jsxs(Ae, { gap: "4", children: [
1152
- /* @__PURE__ */ o.jsxs(N, { children: [
1153
- /* @__PURE__ */ o.jsx(N.Trigger, { children: /* @__PURE__ */ o.jsx(eo, { className: i("system"), onClick: () => r("system"), size: 32 }) }),
1154
- /* @__PURE__ */ o.jsx(N.Content, { children: "Use system theme" })
1152
+ /* @__PURE__ */ o.jsxs(j, { children: [
1153
+ /* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(eo, { className: i("system"), onClick: () => r("system"), size: 32 }) }),
1154
+ /* @__PURE__ */ o.jsx(j.Content, { children: "Use system theme" })
1155
1155
  ] }),
1156
- /* @__PURE__ */ o.jsxs(N, { children: [
1157
- /* @__PURE__ */ o.jsx(N.Trigger, { children: /* @__PURE__ */ o.jsx(De, { className: i("light"), onClick: () => r("light"), size: 32 }) }),
1158
- /* @__PURE__ */ o.jsx(N.Content, { children: "Use light theme" })
1156
+ /* @__PURE__ */ o.jsxs(j, { children: [
1157
+ /* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(De, { className: i("light"), onClick: () => r("light"), size: 32 }) }),
1158
+ /* @__PURE__ */ o.jsx(j.Content, { children: "Use light theme" })
1159
1159
  ] }),
1160
- /* @__PURE__ */ o.jsxs(N, { children: [
1161
- /* @__PURE__ */ o.jsx(N.Trigger, { children: /* @__PURE__ */ o.jsx(Ee, { className: i("dark"), onClick: () => r("dark"), size: 32 }) }),
1162
- /* @__PURE__ */ o.jsx(N.Content, { children: "Use dark theme" })
1160
+ /* @__PURE__ */ o.jsxs(j, { children: [
1161
+ /* @__PURE__ */ o.jsx(j.Trigger, { children: /* @__PURE__ */ o.jsx(Ee, { className: i("dark"), onClick: () => r("dark"), size: 32 }) }),
1162
+ /* @__PURE__ */ o.jsx(j.Content, { children: "Use dark theme" })
1163
1163
  ] })
1164
1164
  ] });
1165
1165
  };
@@ -1195,7 +1195,7 @@ function wt({
1195
1195
  }
1196
1196
  ) });
1197
1197
  }
1198
- const N = ({ children: e, open: t, onOpenChange: r }) => /* @__PURE__ */ o.jsx(ye, { children: /* @__PURE__ */ o.jsx(yt, { onOpenChange: r, open: t, children: e }) }), Or = ({ children: e, cursor: t = "pointer", className: r }) => /* @__PURE__ */ o.jsx(
1198
+ const j = ({ children: e, open: t, onOpenChange: r }) => /* @__PURE__ */ o.jsx(ye, { children: /* @__PURE__ */ o.jsx(yt, { onOpenChange: r, open: t, children: e }) }), Or = ({ children: e, cursor: t = "pointer", className: r }) => /* @__PURE__ */ o.jsx(
1199
1199
  jt,
1200
1200
  {
1201
1201
  asChild: !0,
@@ -1208,9 +1208,13 @@ const N = ({ children: e, open: t, onOpenChange: r }) => /* @__PURE__ */ o.jsx(y
1208
1208
  ),
1209
1209
  children: e
1210
1210
  }
1211
- ), Mr = ({ children: e }) => /* @__PURE__ */ o.jsx(wt, { children: e });
1212
- N.Trigger = Or;
1213
- N.Content = Mr;
1211
+ ), Mr = ({ className: e, children: t }) => /* @__PURE__ */ o.jsx(wt, { className: e, children: t });
1212
+ j.Trigger = Or;
1213
+ j.Content = Mr;
1214
+ const wn = ({ children: e, content: t }) => /* @__PURE__ */ o.jsxs(j, { children: [
1215
+ /* @__PURE__ */ o.jsx(j.Trigger, { children: typeof e == "string" ? /* @__PURE__ */ o.jsx("span", { children: e }) : e }),
1216
+ /* @__PURE__ */ o.jsx(j.Content, { children: t })
1217
+ ] });
1214
1218
  function $r({ ...e }) {
1215
1219
  return /* @__PURE__ */ o.jsx(Fo, { "data-slot": "sheet", ...e });
1216
1220
  }
@@ -1670,7 +1674,7 @@ const Nt = ({ children: e }) => /* @__PURE__ */ o.jsx(ke, { size: "base", trunca
1670
1674
  ] })
1671
1675
  ] }) }),
1672
1676
  /* @__PURE__ */ o.jsx(en, {})
1673
- ] }), wn = ({ children: e, ...t }) => /* @__PURE__ */ o.jsxs(Zr, { children: [
1677
+ ] }), Tn = ({ children: e, ...t }) => /* @__PURE__ */ o.jsxs(Zr, { children: [
1674
1678
  /* @__PURE__ */ o.jsx(dn, { ...t }),
1675
1679
  /* @__PURE__ */ o.jsx(tn, { className: "max-w-screen-xl", children: e })
1676
1680
  ] });
@@ -1686,7 +1690,7 @@ export {
1686
1690
  yn as T,
1687
1691
  uo as X,
1688
1692
  dn as a,
1689
- wn as b,
1693
+ Tn as b,
1690
1694
  qo as c,
1691
1695
  Vo as d,
1692
1696
  _r as e,
@@ -1700,5 +1704,6 @@ export {
1700
1704
  Rr as m,
1701
1705
  kr as n,
1702
1706
  Sr as o,
1703
- N as p
1707
+ j as p,
1708
+ wn as q
1704
1709
  };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { Popover as Popover_3 } from 'radix-ui';
9
9
  import * as React_2 from 'react';
10
10
  import { ReactNode } from 'react';
11
11
  import { Tabs as Tabs_2 } from 'radix-ui';
12
+ import { Tooltip as Tooltip_3 } from 'radix-ui';
12
13
  import { VariantProps } from 'class-variance-authority';
13
14
 
14
15
  export declare const Accordion: AccordionComponent;
@@ -153,10 +154,6 @@ export declare interface CheckboxProps {
153
154
  onCheckedChange?: (checked: boolean) => void;
154
155
  }
155
156
 
156
- declare interface ChildProps {
157
- children: React.ReactNode;
158
- }
159
-
160
157
  export declare function cn(...inputs: ClassValue[]): string;
161
158
 
162
159
  export declare const Code: ({ children, ...props }: TextProps) => JSX.Element;
@@ -592,6 +589,13 @@ declare interface SideLinkSet {
592
589
  links: SideLink[];
593
590
  }
594
591
 
592
+ export declare const SimpleTooltip: ({ children, content }: SimpleTooltipProps) => JSX.Element;
593
+
594
+ declare interface SimpleTooltipProps {
595
+ children: string | React.ReactNode;
596
+ content: string | React.ReactNode;
597
+ }
598
+
595
599
  declare type Size = (typeof SIZES)[number];
596
600
 
597
601
  declare const SIZES: readonly [...string[], "auto", "full", "min", "max", "fit", "px"];
@@ -718,22 +722,24 @@ export declare interface ThemeSelectorProps {
718
722
 
719
723
  export declare const Tooltip: TooltipComponent;
720
724
 
725
+ declare function Tooltip_2({ ...props }: React_2.ComponentProps<typeof Tooltip_3.Root>): JSX.Element;
726
+
721
727
  declare type TooltipComponent = React.FC<TooltipProps> & {
722
- Trigger: React.FC<TriggerProps>;
723
- Content: React.FC<ChildProps>;
728
+ Trigger: React.FC<TooltipTriggerProps>;
729
+ Content: React.FC<TooltipContentProps>;
724
730
  };
725
731
 
726
- declare interface TooltipProps {
727
- children: React.ReactNode;
728
- open?: boolean;
729
- onOpenChange?: (open: boolean) => void;
730
- }
732
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof Tooltip_3.Content>): JSX.Element;
731
733
 
732
- declare interface TriggerProps {
733
- children: React.ReactNode;
734
+ declare type TooltipContentProps = React.ComponentProps<typeof TooltipContent>;
735
+
736
+ declare type TooltipProps = React.ComponentProps<typeof Tooltip_2>;
737
+
738
+ declare function TooltipTrigger({ ...props }: React_2.ComponentProps<typeof Tooltip_3.Trigger>): JSX.Element;
739
+
740
+ declare type TooltipTriggerProps = React.ComponentProps<typeof TooltipTrigger> & {
734
741
  cursor?: CursorType;
735
- className?: string;
736
- }
742
+ };
737
743
 
738
744
  declare const TYPOGRAPHY_ELEMENTS: readonly ["p", "span", "label", "div", "h1", "h2", "h3", "h4", "h5", "h6"];
739
745
 
package/dist/index.js CHANGED
@@ -1,19 +1,19 @@
1
- import { R, T as F, C as P, c as V, X as O, d as H, D as q, P as K, O as X, e as J } from "./chunks/SidebarLayout-CunUyuBL.js";
2
- import { A as Ma, f as za, M as Sa, g as Aa, a as $a, b as Da, S as Ea, h as Ba, i as La, j as Ga, k as Ra, l as Fa, m as Pa, n as Va, o as Oa, p as Ha } from "./chunks/SidebarLayout-CunUyuBL.js";
1
+ import { R, T as F, C as P, c as V, X as O, d as H, D as q, P as K, O as X, e as J } from "./chunks/SidebarLayout-Bm8SlspC.js";
2
+ import { A as Ma, f as Sa, M as za, g as Aa, a as $a, b as Da, S as Ea, q as Ba, h as La, i as Ga, j as Ra, k as Fa, l as Pa, m as Va, n as Oa, o as Ha, p as qa } from "./chunks/SidebarLayout-Bm8SlspC.js";
3
3
  import { j as t } from "./chunks/jsx-runtime-B0GD0xBr.js";
4
4
  import { c as b, b as N, S as T, C, d as Q, e as U } from "./chunks/calendar-D21xByT8.js";
5
- import { B as Ka, a as Xa } from "./chunks/calendar-D21xByT8.js";
5
+ import { B as Xa, a as Ja } from "./chunks/calendar-D21xByT8.js";
6
6
  import { c as i } from "./chunks/index-CRiPKpXj.js";
7
7
  import * as x from "react";
8
8
  import { Fragment as W, useState as Y, useEffect as Z, useMemo as ee } from "react";
9
9
  import { u as ae, a as te, c as re, b as se, P as h, d as ne, e as j } from "./chunks/popover-BhBG-w7n.js";
10
10
  import { g as _, h as oe, i as ie } from "./chunks/Textarea-Doc1h--A.js";
11
- import { C as Qa, a as Ua, b as Wa, D as Ya, I as Za, c as et, L as at, N as tt, R as rt, d as st, e as nt, S as ot, f as it, T as lt } from "./chunks/Textarea-Doc1h--A.js";
12
- import { E as dt, a as ut, I as mt, P as gt, b as bt } from "./chunks/PageNotFound-BqoSSvCP.js";
13
- import { B as xt, C as ft, F as vt, a as ht, G as yt, H as jt, L as Nt } from "./chunks/Layout-DAdzkAxW.js";
14
- import { C as wt } from "./chunks/Code-DSfz_jrJ.js";
15
- import { H as Ct, T as _t } from "./chunks/Heading-Bpvbpnw2.js";
16
- import { P as Mt } from "./chunks/Paragraph-Lcw42_Mz.js";
11
+ import { C as Ua, a as Wa, b as Ya, D as Za, I as et, c as at, L as tt, N as rt, R as st, d as nt, e as ot, S as it, f as lt, T as ct } from "./chunks/Textarea-Doc1h--A.js";
12
+ import { E as ut, a as mt, I as gt, P as bt, b as pt } from "./chunks/PageNotFound-BqoSSvCP.js";
13
+ import { B as ft, C as vt, F as ht, a as yt, G as jt, H as Nt, L as kt } from "./chunks/Layout-DAdzkAxW.js";
14
+ import { C as Tt } from "./chunks/Code-DSfz_jrJ.js";
15
+ import { H as _t, T as It } from "./chunks/Heading-Bpvbpnw2.js";
16
+ import { P as St } from "./chunks/Paragraph-Lcw42_Mz.js";
17
17
  /**
18
18
  * @license lucide-react v0.543.0 - ISC
19
19
  *
@@ -143,9 +143,9 @@ var y = "Tabs", [Ne, la] = re(y, [
143
143
  }
144
144
  );
145
145
  M.displayName = y;
146
- var z = "TabsList", S = x.forwardRef(
146
+ var S = "TabsList", z = x.forwardRef(
147
147
  (e, a) => {
148
- const { __scopeTabs: o, loop: s = !0, ...n } = e, l = k(z, o), r = I(o);
148
+ const { __scopeTabs: o, loop: s = !0, ...n } = e, l = k(S, o), r = I(o);
149
149
  return /* @__PURE__ */ t.jsx(
150
150
  oe,
151
151
  {
@@ -167,7 +167,7 @@ var z = "TabsList", S = x.forwardRef(
167
167
  );
168
168
  }
169
169
  );
170
- S.displayName = z;
170
+ z.displayName = S;
171
171
  var A = "TabsTrigger", $ = x.forwardRef(
172
172
  (e, a) => {
173
173
  const { __scopeTabs: o, value: s, disabled: n = !1, ...l } = e, r = k(A, o), c = I(o), m = B(r.baseId, s), g = L(r.baseId, s), d = s === r.value;
@@ -242,7 +242,7 @@ function B(e, a) {
242
242
  function L(e, a) {
243
243
  return `${e}-content-${a}`;
244
244
  }
245
- var we = M, Te = S, Ce = $, _e = E;
245
+ var we = M, Te = z, Ce = $, _e = E;
246
246
  const Ie = N(
247
247
  "relative w-full rounded-lg border px-3 py-2 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
248
248
  {
@@ -262,7 +262,7 @@ const Ie = N(
262
262
  function Me({ className: e, variant: a, ...o }) {
263
263
  return /* @__PURE__ */ t.jsx("div", { className: i(Ie({ variant: a }), e), "data-slot": "alert", role: "alert", ...o });
264
264
  }
265
- function ze({ className: e, ...a }) {
265
+ function Se({ className: e, ...a }) {
266
266
  return /* @__PURE__ */ t.jsx(
267
267
  "div",
268
268
  {
@@ -272,7 +272,7 @@ function ze({ className: e, ...a }) {
272
272
  }
273
273
  );
274
274
  }
275
- function Se({ className: e, ...a }) {
275
+ function ze({ className: e, ...a }) {
276
276
  return /* @__PURE__ */ t.jsx(
277
277
  "div",
278
278
  {
@@ -291,8 +291,8 @@ const Ae = {
291
291
  const n = Ae[e];
292
292
  return /* @__PURE__ */ t.jsxs(Me, { className: s, variant: e, children: [
293
293
  /* @__PURE__ */ t.jsx(n, { className: "h-4 w-4", "data-testid": `alert-icon-${e}` }),
294
- a ? /* @__PURE__ */ t.jsx(ze, { children: a }) : null,
295
- /* @__PURE__ */ t.jsx(Se, { children: o })
294
+ a ? /* @__PURE__ */ t.jsx(Se, { children: a }) : null,
295
+ /* @__PURE__ */ t.jsx(ze, { children: o })
296
296
  ] });
297
297
  }, $e = N(
298
298
  "inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",
@@ -953,10 +953,10 @@ export {
953
953
  Ma as Accordion,
954
954
  ca as Alert,
955
955
  da as Badge,
956
- xt as Box,
956
+ ft as Box,
957
957
  ua as Breadcrumbs,
958
- Ka as Button,
959
- Xa as ButtonGroup,
958
+ Xa as Button,
959
+ Ja as ButtonGroup,
960
960
  ma as Card,
961
961
  xa as CardAction,
962
962
  fa as CardContent,
@@ -964,57 +964,58 @@ export {
964
964
  va as CardFooter,
965
965
  ga as CardHeader,
966
966
  ba as CardTitle,
967
- Qa as Checkbox,
968
- wt as Code,
969
- za as Collapsible,
970
- ft as Container,
971
- Ua as DateInput,
972
- Wa as DatePicker,
973
- Ya as DeleteButton,
974
- dt as ErrorFallback,
975
- ut as ErrorOverlay,
976
- vt as Flex,
977
- ht as Footer,
978
- yt as Grid,
979
- jt as Header,
980
- Ct as Heading,
981
- Za as InputError,
982
- et as InputGroup,
983
- mt as Interstitial,
984
- at as Label,
985
- Nt as Layout,
986
- Sa as MenuItemText,
967
+ Ua as Checkbox,
968
+ Tt as Code,
969
+ Sa as Collapsible,
970
+ vt as Container,
971
+ Wa as DateInput,
972
+ Ya as DatePicker,
973
+ Za as DeleteButton,
974
+ ut as ErrorFallback,
975
+ mt as ErrorOverlay,
976
+ ht as Flex,
977
+ yt as Footer,
978
+ jt as Grid,
979
+ Nt as Header,
980
+ _t as Heading,
981
+ et as InputError,
982
+ at as InputGroup,
983
+ gt as Interstitial,
984
+ tt as Label,
985
+ kt as Layout,
986
+ za as MenuItemText,
987
987
  ha as Modal,
988
- tt as NumberInput,
989
- gt as PageLoader,
990
- bt as PageNotFound,
988
+ rt as NumberInput,
989
+ bt as PageLoader,
990
+ pt as PageNotFound,
991
991
  ya as Pagination,
992
- Mt as Paragraph,
992
+ St as Paragraph,
993
993
  Aa as Popover,
994
- rt as RadioSelect,
995
- st as SelectInput,
996
- nt as SelectPicker,
994
+ st as RadioSelect,
995
+ nt as SelectInput,
996
+ ot as SelectPicker,
997
997
  ja as Separator,
998
998
  $a as Sidebar,
999
999
  Da as SidebarLayout,
1000
1000
  Ea as SidebarTrigger,
1001
+ Ba as SimpleTooltip,
1001
1002
  Na as Skeleton,
1002
- ot as SubmitButton,
1003
- Ba as Table,
1004
- La as TableBody,
1005
- Ga as TableCaption,
1006
- Ra as TableCell,
1007
- Fa as TableHead,
1008
- Pa as TableHeader,
1009
- Va as TableRow,
1003
+ it as SubmitButton,
1004
+ La as Table,
1005
+ Ga as TableBody,
1006
+ Ra as TableCaption,
1007
+ Fa as TableCell,
1008
+ Pa as TableHead,
1009
+ Va as TableHeader,
1010
+ Oa as TableRow,
1010
1011
  ka as Tabs,
1011
1012
  Ca as TabsContent,
1012
1013
  wa as TabsList,
1013
1014
  Ta as TabsTrigger,
1014
- _t as Text,
1015
- it as TextInput,
1016
- lt as Textarea,
1017
- Oa as ThemeSelector,
1018
- Ha as Tooltip,
1015
+ It as Text,
1016
+ lt as TextInput,
1017
+ ct as Textarea,
1018
+ Ha as ThemeSelector,
1019
+ qa as Tooltip,
1019
1020
  i as cn
1020
1021
  };
@@ -1,4 +1,4 @@
1
- import { M as r, a as b, b as i, S as s } from "./chunks/SidebarLayout-CunUyuBL.js";
1
+ import { M as r, a as b, b as i, S as s } from "./chunks/SidebarLayout-Bm8SlspC.js";
2
2
  export {
3
3
  r as MenuItemText,
4
4
  b as Sidebar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-forest/canopy",
3
- "version": "0.29.1",
3
+ "version": "0.30.0",
4
4
  "author": "John Szymanowski",
5
5
  "license": "MIT",
6
6
  "description": "React components, built with Tailwind CSS, Shadcn, and VisX",