@still-forest/canopy 0.36.0 → 0.37.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.
@@ -3,7 +3,7 @@ import { c as re, u as V, f as Pt, B as ct, i as fr, j as Ne, h as pr } from "./
3
3
  import * as a from "react";
4
4
  import { useState as lt, useEffect as mr, useMemo as vr } from "react";
5
5
  import { F as ae, G as hr } from "./Layout-CvVv48kM.js";
6
- import { T as Ae } from "./Heading-DpvcMbmF.js";
6
+ import { T as Ae } from "./Heading-DjVutKs1.js";
7
7
  import { L as gr } from "./Loader-BgoWXwkX.js";
8
8
  import { c as $ } from "./index-CRiPKpXj.js";
9
9
  import { c as we, d as jt, P, a as ye, e as L, t as _t, g as kt, b as Z, u as dt, v as Me, l as Tt, m as xr, A as br, f as ne, h as Dt, V as yr, i as At, j as wr, R as Mt, F as Ot, D as Cr, C as Sr, n as Er, q as Lt, r as Ft, s as Bt, p as $t, w as Ir, x as Rr, k as Nr } from "./popover-ByOImpZC.js";
package/dist/forms.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { B as e, a as s } from "./chunks/calendar-DKwGFkIw.js";
2
- import { C as o, a as r, b as n, D as p, I as c, c as I, L as b, N as l, R as x, d as B, e as S, S as i, f as m, T as D } from "./chunks/Textarea-CZDF6QhO.js";
2
+ import { C as o, a as r, b as n, D as p, I as c, c as I, L as b, N as l, R as x, d as B, e as S, S as i, f as m, T as D } from "./chunks/Textarea-nT-kvT7U.js";
3
3
  export {
4
4
  e as Button,
5
5
  s as ButtonGroup,
package/dist/index.d.ts CHANGED
@@ -38,13 +38,14 @@ declare function AccordionTrigger({ className, children, ...props }: React_2.Com
38
38
 
39
39
  declare type AccordionTriggerProps = React.ComponentProps<typeof AccordionTrigger>;
40
40
 
41
- export declare const Alert: ({ type, title, message, className }: AlertProps) => JSX.Element;
41
+ export declare const Alert: ({ type, title, message, className, children }: AlertProps) => JSX.Element;
42
42
 
43
43
  export declare interface AlertProps {
44
44
  type: "info" | "success" | "warning" | "error";
45
45
  title?: string;
46
- message: string;
46
+ message?: string;
47
47
  className?: string;
48
+ children?: React.ReactNode;
48
49
  }
49
50
 
50
51
  export declare const Badge: ({ label, onClick, className, variant, color }: BadgeProps) => JSX.Element;
@@ -828,6 +829,8 @@ declare interface TextBaseProps {
828
829
  truncate?: boolean;
829
830
  numeric?: boolean;
830
831
  className?: string;
832
+ inheritColor?: boolean;
833
+ inline?: boolean;
831
834
  as?: TypographyElement;
832
835
  }
833
836
 
@@ -847,6 +850,24 @@ export declare interface TextInputProps extends Omit<React.ComponentProps<"input
847
850
 
848
851
  declare type TextLeading = (typeof TEXT_LEADINGS)[number];
849
852
 
853
+ export declare const TextList: TextListComponent;
854
+
855
+ declare type TextListComponent = React.FC<TextListProps> & {
856
+ Item: React.FC<TextListItemProps>;
857
+ };
858
+
859
+ declare type TextListItemProps = React.ComponentProps<"li"> & {
860
+ asChild?: boolean;
861
+ children: ReactNode;
862
+ };
863
+
864
+ declare type TextListProps = React.ComponentProps<"ul"> & {
865
+ type?: "ordered" | "unordered" | "none";
866
+ position?: "inside" | "outside";
867
+ variant?: TypographyVariant;
868
+ children: ReactNode;
869
+ };
870
+
850
871
  export declare type TextProps<E extends default_2.ElementType = TypographyElement> = TextBaseProps & {
851
872
  as?: E;
852
873
  } & default_2.ComponentPropsWithRef<E>;
package/dist/index.js CHANGED
@@ -1,20 +1,20 @@
1
- import { R, T as P, C as F, c as V, X as O, d as H, D as q, P as K, O as X, e as J } from "./chunks/SidebarLayout-CRATwjpz.js";
2
- import { A as Na, f as ka, g as wa, E as Ta, h as Ca, I as Ia, M as _a, i as Ma, a as Sa, b as za, S as Aa, s as Ea, j as $a, k as Da, l as La, m as Ba, n as Ga, o as Ra, p as Pa, q as Fa, r as Va } from "./chunks/SidebarLayout-CRATwjpz.js";
1
+ import { R, T as P, C as F, c as V, X as O, d as H, D as q, P as K, O as X, e as J } from "./chunks/SidebarLayout-C0jOUIuV.js";
2
+ import { A as Na, f as ka, g as wa, E as Ta, h as Ca, I as Ia, M as _a, i as Ma, a as Sa, b as za, S as Aa, t as Ea, j as $a, k as La, l as Da, m as Ba, n as Ga, o as Ra, p as Pa, q as Fa, r as Va, s as Oa } from "./chunks/SidebarLayout-C0jOUIuV.js";
3
3
  import { j as t } from "./chunks/jsx-runtime-B0GD0xBr.js";
4
4
  import { c as g, b as N, S as T, C, d as Q, e as U } from "./chunks/calendar-DKwGFkIw.js";
5
- import { B as Ha, a as qa } from "./chunks/calendar-DKwGFkIw.js";
5
+ import { B as qa, a as Ka } from "./chunks/calendar-DKwGFkIw.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
- import { L as Xa } from "./chunks/Loader-BgoWXwkX.js";
9
+ import { L as Ja } from "./chunks/Loader-BgoWXwkX.js";
10
10
  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-ByOImpZC.js";
11
- import { g as I, h as oe, i as ie } from "./chunks/Textarea-CZDF6QhO.js";
12
- 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-CZDF6QhO.js";
13
- import { E as dt, a as ut, I as mt, P as bt, b as gt } from "./chunks/PageNotFound-OZwSPdMe.js";
14
- 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-CvVv48kM.js";
15
- import { C as wt } from "./chunks/Code-zUdzRHTD.js";
16
- import { H as Ct, T as It } from "./chunks/Heading-DpvcMbmF.js";
17
- import { P as Mt } from "./chunks/Paragraph-DjkeVXzm.js";
11
+ import { g as I, h as oe, i as ie } from "./chunks/Textarea-nT-kvT7U.js";
12
+ 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-nT-kvT7U.js";
13
+ import { E as ut, a as mt, I as bt, P as gt, b as pt } from "./chunks/PageNotFound-D4e2bv36.js";
14
+ 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-CvVv48kM.js";
15
+ import { C as Tt } from "./chunks/Code-BLilg72p.js";
16
+ import { H as It, T as _t } from "./chunks/Heading-DjVutKs1.js";
17
+ import { P as St } from "./chunks/Paragraph-ai9KZse1.js";
18
18
  /**
19
19
  * @license lucide-react v0.543.0 - ISC
20
20
  *
@@ -171,7 +171,7 @@ var S = "TabsList", z = x.forwardRef(
171
171
  z.displayName = S;
172
172
  var A = "TabsTrigger", E = x.forwardRef(
173
173
  (e, a) => {
174
- const { __scopeTabs: o, value: s, disabled: n = !1, ...l } = e, r = k(A, o), c = _(o), m = L(r.baseId, s), b = B(r.baseId, s), d = s === r.value;
174
+ const { __scopeTabs: o, value: s, disabled: n = !1, ...l } = e, r = k(A, o), c = _(o), m = D(r.baseId, s), b = B(r.baseId, s), d = s === r.value;
175
175
  return /* @__PURE__ */ t.jsx(
176
176
  ie,
177
177
  {
@@ -209,9 +209,9 @@ var A = "TabsTrigger", E = x.forwardRef(
209
209
  }
210
210
  );
211
211
  E.displayName = A;
212
- var $ = "TabsContent", D = x.forwardRef(
212
+ var $ = "TabsContent", L = x.forwardRef(
213
213
  (e, a) => {
214
- const { __scopeTabs: o, value: s, forceMount: n, children: l, ...r } = e, c = k($, o), m = L(c.baseId, s), b = B(c.baseId, s), d = s === c.value, u = x.useRef(d);
214
+ const { __scopeTabs: o, value: s, forceMount: n, children: l, ...r } = e, c = k($, o), m = D(c.baseId, s), b = B(c.baseId, s), d = s === c.value, u = x.useRef(d);
215
215
  return x.useEffect(() => {
216
216
  const p = requestAnimationFrame(() => u.current = !1);
217
217
  return () => cancelAnimationFrame(p);
@@ -236,14 +236,14 @@ var $ = "TabsContent", D = x.forwardRef(
236
236
  ) });
237
237
  }
238
238
  );
239
- D.displayName = $;
240
- function L(e, a) {
239
+ L.displayName = $;
240
+ function D(e, a) {
241
241
  return `${e}-trigger-${a}`;
242
242
  }
243
243
  function B(e, a) {
244
244
  return `${e}-content-${a}`;
245
245
  }
246
- var we = M, Te = z, Ce = E, Ie = D;
246
+ var we = M, Te = z, Ce = E, Ie = L;
247
247
  const _e = N(
248
248
  "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",
249
249
  {
@@ -288,12 +288,14 @@ const Ae = {
288
288
  info: fe,
289
289
  error: he,
290
290
  warning: je
291
- }, ca = ({ type: e, title: a, message: o, className: s = "" }) => {
292
- const n = Ae[e];
291
+ }, ca = ({ type: e, title: a, message: o, className: s = "", children: n }) => {
292
+ const l = Ae[e];
293
+ if (o && n)
294
+ throw new Error("Alert cannot have both message and children");
293
295
  return /* @__PURE__ */ t.jsxs(Me, { className: s, variant: e, children: [
294
- /* @__PURE__ */ t.jsx(n, { className: "h-4 w-4", "data-testid": `alert-icon-${e}` }),
296
+ /* @__PURE__ */ t.jsx(l, { className: "h-4 w-4", "data-testid": `alert-icon-${e}` }),
295
297
  a ? /* @__PURE__ */ t.jsx(Se, { children: a }) : null,
296
- /* @__PURE__ */ t.jsx(ze, { children: o })
298
+ /* @__PURE__ */ t.jsx(ze, { children: o || n })
297
299
  ] });
298
300
  }, Ee = N(
299
301
  "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",
@@ -320,7 +322,7 @@ function $e({
320
322
  const n = o ? T : "span";
321
323
  return /* @__PURE__ */ t.jsx(n, { className: i(Ee({ variant: a }), e), "data-slot": "badge", ...s });
322
324
  }
323
- const De = N(
325
+ const Le = N(
324
326
  "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",
325
327
  {
326
328
  variants: {
@@ -488,7 +490,7 @@ const De = N(
488
490
  const l = i(
489
491
  "cursor-default",
490
492
  !!a && "cursor-pointer",
491
- De({ color: n, variant: s }),
493
+ Le({ color: n, variant: s }),
492
494
  {
493
495
  "text-white": n === "black" && s !== "outline",
494
496
  "text-black": n === "white" && s !== "outline"
@@ -500,7 +502,7 @@ const De = N(
500
502
  );
501
503
  return /* @__PURE__ */ t.jsx($e, { className: l, onClick: a, variant: s, children: e });
502
504
  };
503
- function Le({ ...e }) {
505
+ function De({ ...e }) {
504
506
  return /* @__PURE__ */ t.jsx("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...e });
505
507
  }
506
508
  function Be({ className: e, ...a }) {
@@ -554,7 +556,7 @@ function Pe({ children: e, className: a, ...o }) {
554
556
  }
555
557
  const Fe = ({ to: e, label: a }) => /* @__PURE__ */ t.jsx(G, { className: "font-display", href: e, children: a }), Ve = ({ label: e }) => /* @__PURE__ */ t.jsx(Re, { className: "font-display", children: e }), ua = ({ breadcrumbs: e, linkComponent: a, pageComponent: o, className: s }) => {
556
558
  const n = a || Fe, l = o || Ve;
557
- return /* @__PURE__ */ t.jsx(Le, { className: i("my-4", s), children: /* @__PURE__ */ t.jsx(Be, { children: e.map(({ to: r, label: c }, m) => /* @__PURE__ */ t.jsxs(W, { children: [
559
+ return /* @__PURE__ */ t.jsx(De, { className: i("my-4", s), children: /* @__PURE__ */ t.jsx(Be, { children: e.map(({ to: r, label: c }, m) => /* @__PURE__ */ t.jsxs(W, { children: [
558
560
  /* @__PURE__ */ t.jsxs(Ge, { children: [
559
561
  r && /* @__PURE__ */ t.jsx(G, { asChild: !0, className: "font-display", children: /* @__PURE__ */ t.jsx(n, { label: c, to: r }) }),
560
562
  !r && /* @__PURE__ */ t.jsx(l, { label: c })
@@ -909,55 +911,55 @@ export {
909
911
  Na as Accordion,
910
912
  ca as Alert,
911
913
  da as Badge,
912
- xt as Box,
914
+ ft as Box,
913
915
  ua as Breadcrumbs,
914
- Ha as Button,
915
- qa as ButtonGroup,
916
+ qa as Button,
917
+ Ka as ButtonGroup,
916
918
  ka as Card,
917
- Qa as Checkbox,
918
- wt as Code,
919
+ Ua as Checkbox,
920
+ Tt as Code,
919
921
  wa as Collapsible,
920
- ft as Container,
921
- Ua as DateInput,
922
- Wa as DatePicker,
923
- Ya as DeleteButton,
922
+ vt as Container,
923
+ Wa as DateInput,
924
+ Ya as DatePicker,
925
+ Za as DeleteButton,
924
926
  Ta as Empty,
925
- dt as ErrorFallback,
926
- ut as ErrorOverlay,
927
- vt as Flex,
928
- ht as Footer,
929
- yt as Grid,
930
- jt as Header,
931
- Ct as Heading,
932
- Za as InputError,
933
- et as InputGroup,
934
- mt as Interstitial,
927
+ ut as ErrorFallback,
928
+ mt as ErrorOverlay,
929
+ ht as Flex,
930
+ yt as Footer,
931
+ jt as Grid,
932
+ Nt as Header,
933
+ It as Heading,
934
+ et as InputError,
935
+ at as InputGroup,
936
+ bt as Interstitial,
935
937
  Ca as Item,
936
938
  Ia as ItemGroup,
937
- at as Label,
938
- Nt as Layout,
939
- Xa as Loader,
939
+ tt as Label,
940
+ kt as Layout,
941
+ Ja as Loader,
940
942
  _a as MenuItemText,
941
943
  ma as Modal,
942
- tt as NumberInput,
943
- bt as PageLoader,
944
- gt as PageNotFound,
944
+ rt as NumberInput,
945
+ gt as PageLoader,
946
+ pt as PageNotFound,
945
947
  ba as Pagination,
946
- Mt as Paragraph,
948
+ St as Paragraph,
947
949
  Ma as Popover,
948
- rt as RadioSelect,
949
- st as SelectInput,
950
- nt as SelectPicker,
950
+ st as RadioSelect,
951
+ nt as SelectInput,
952
+ ot as SelectPicker,
951
953
  ga as Separator,
952
954
  Sa as Sidebar,
953
955
  za as SidebarLayout,
954
956
  Aa as SidebarTrigger,
955
957
  Ea as SimpleTooltip,
956
958
  pa as Skeleton,
957
- ot as SubmitButton,
959
+ it as SubmitButton,
958
960
  $a as Table,
959
- Da as TableBody,
960
- La as TableCaption,
961
+ La as TableBody,
962
+ Da as TableCaption,
961
963
  Ba as TableCell,
962
964
  Ga as TableHead,
963
965
  Ra as TableHeader,
@@ -966,10 +968,11 @@ export {
966
968
  ha as TabsContent,
967
969
  fa as TabsList,
968
970
  va as TabsTrigger,
969
- It as Text,
970
- it as TextInput,
971
- lt as Textarea,
972
- Fa as ThemeSelector,
973
- Va as Tooltip,
971
+ _t as Text,
972
+ lt as TextInput,
973
+ Fa as TextList,
974
+ ct as Textarea,
975
+ Va as ThemeSelector,
976
+ Oa as Tooltip,
974
977
  i as cn
975
978
  };
@@ -1,4 +1,4 @@
1
- import { E as o, a as e, I as s, P as t, b as l } from "./chunks/PageNotFound-OZwSPdMe.js";
1
+ import { E as o, a as e, I as s, P as t, b as l } from "./chunks/PageNotFound-D4e2bv36.js";
2
2
  export {
3
3
  o as ErrorFallback,
4
4
  e as ErrorOverlay,
@@ -1,4 +1,4 @@
1
- import { M as r, a as b, b as i, S as s } from "./chunks/SidebarLayout-CRATwjpz.js";
1
+ import { M as r, a as b, b as i, S as s } from "./chunks/SidebarLayout-C0jOUIuV.js";
2
2
  export {
3
3
  r as MenuItemText,
4
4
  b as Sidebar,
@@ -67,6 +67,8 @@ declare interface TextBaseProps {
67
67
  truncate?: boolean;
68
68
  numeric?: boolean;
69
69
  className?: string;
70
+ inheritColor?: boolean;
71
+ inline?: boolean;
70
72
  as?: TypographyElement;
71
73
  }
72
74
 
@@ -1,6 +1,6 @@
1
- import { C as o } from "./chunks/Code-zUdzRHTD.js";
2
- import { H as p, T as s } from "./chunks/Heading-DpvcMbmF.js";
3
- import { P as x } from "./chunks/Paragraph-DjkeVXzm.js";
1
+ import { C as o } from "./chunks/Code-BLilg72p.js";
2
+ import { H as p, T as s } from "./chunks/Heading-DjVutKs1.js";
3
+ import { P as x } from "./chunks/Paragraph-ai9KZse1.js";
4
4
  export {
5
5
  o as Code,
6
6
  p as Heading,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@still-forest/canopy",
3
- "version": "0.36.0",
3
+ "version": "0.37.0",
4
4
  "author": "John Szymanowski",
5
5
  "license": "MIT",
6
6
  "description": "React components, built with Tailwind CSS, Shadcn, and VisX",