@still-forest/canopy 0.64.1 → 0.65.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.d.ts CHANGED
@@ -1,13 +1,19 @@
1
1
  import { Accordion as Accordion_3 } from '@base-ui/react/accordion';
2
- import { Button as Button_4 } from '@base-ui/react/button';
2
+ import { AlertDialog as AlertDialog_2 } from '@base-ui/react/alert-dialog';
3
+ import { ButtonHTMLAttributes } from 'react';
4
+ import { ClassAttributes } from 'react';
3
5
  import { ClassProp } from 'class-variance-authority/types';
4
6
  import { ClassValue } from 'clsx';
5
7
  import { Collapsible as Collapsible_3 } from '@base-ui/react/collapsible';
6
8
  import { ComponentProps } from 'react';
9
+ import { ComponentRenderFn } from '@base-ui/react';
7
10
  import { default as default_2 } from 'react';
8
- import { Dialog as Dialog_3 } from '@base-ui/react/dialog';
11
+ import { Dialog as Dialog_2 } from '@base-ui/react/dialog';
12
+ import { ElementType } from 'react';
9
13
  import { FC } from 'react';
14
+ import { HTMLProps } from '@base-ui/react';
10
15
  import { JSX } from 'react/jsx-runtime';
16
+ import { JSXElementConstructor } from 'react';
11
17
  import { Menu } from '@base-ui/react/menu';
12
18
  import { Menubar as Menubar_2 } from '@base-ui/react/menubar';
13
19
  import { Popover as Popover_2 } from '@base-ui/react/popover';
@@ -21,6 +27,7 @@ import { Switch as Switch_2 } from '@base-ui/react/switch';
21
27
  import { Tabs as Tabs_2 } from '@base-ui/react/tabs';
22
28
  import { Tooltip as Tooltip_3 } from '@base-ui/react/tooltip';
23
29
  import { useRender } from '@base-ui/react/use-render';
30
+ import { useRender as useRender_2 } from '@base-ui/react';
24
31
  import { VariantProps } from 'class-variance-authority';
25
32
 
26
33
  export declare const Accordion: AccordionComponent;
@@ -59,6 +66,46 @@ declare interface AddonProps extends ComponentProps<"div"> {
59
66
 
60
67
  export declare const Alert: ({ variant, title, description, actions, className, children }: AlertProps) => JSX.Element;
61
68
 
69
+ export declare function AlertDialog({ ...props }: AlertDialog_2.Root.Props): JSX.Element;
70
+
71
+ export declare namespace AlertDialog {
72
+ var Action: typeof AlertDialogAction;
73
+ var Cancel: typeof AlertDialogCancel;
74
+ var Content: typeof AlertDialogContent;
75
+ var Description: typeof AlertDialogDescription;
76
+ var Footer: typeof AlertDialogFooter;
77
+ var Header: typeof AlertDialogHeader;
78
+ var Media: typeof AlertDialogMedia;
79
+ var Overlay: typeof AlertDialogOverlay;
80
+ var Portal: typeof AlertDialogPortal;
81
+ var Title: typeof AlertDialogTitle;
82
+ var Trigger: typeof AlertDialogTrigger;
83
+ }
84
+
85
+ declare function AlertDialogAction({ className, ...props }: React_2.ComponentProps<typeof Button>): JSX.Element;
86
+
87
+ declare function AlertDialogCancel({ className, variant, outline, size, ...props }: AlertDialog_2.Close.Props & Pick<React_2.ComponentProps<typeof Button>, "variant" | "size" | "outline">): JSX.Element;
88
+
89
+ declare function AlertDialogContent({ className, size, ...props }: AlertDialog_2.Popup.Props & {
90
+ size?: "default" | "sm";
91
+ }): JSX.Element;
92
+
93
+ declare function AlertDialogDescription({ className, ...props }: React_2.ComponentProps<typeof AlertDialog_2.Description>): JSX.Element;
94
+
95
+ declare function AlertDialogFooter({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
96
+
97
+ declare function AlertDialogHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
98
+
99
+ declare function AlertDialogMedia({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
100
+
101
+ declare function AlertDialogOverlay({ className, ...props }: AlertDialog_2.Backdrop.Props): JSX.Element;
102
+
103
+ declare function AlertDialogPortal({ ...props }: AlertDialog_2.Portal.Props): JSX.Element;
104
+
105
+ declare function AlertDialogTitle({ className, ...props }: React_2.ComponentProps<typeof AlertDialog_2.Title>): JSX.Element;
106
+
107
+ declare function AlertDialogTrigger({ ...props }: AlertDialog_2.Trigger.Props): JSX.Element;
108
+
62
109
  declare interface AlertProps {
63
110
  variant: NotificationVariant;
64
111
  title?: string;
@@ -145,8 +192,6 @@ export declare const Button: ({ className, variant, size, outline, knockout, rou
145
192
 
146
193
  declare const Button_2: ({ children, size, variant, ...props }: ComponentProps<typeof Button>) => JSX.Element;
147
194
 
148
- declare function Button_3({ className, variant, size, ...props }: Button_4.Props & VariantProps<typeof buttonVariants>): JSX.Element;
149
-
150
195
  export declare const ButtonGroup: ({ children, className, ...props }: ButtonGroupProps) => JSX.Element;
151
196
 
152
197
  export declare interface ButtonGroupProps extends ComponentProps<"fieldset"> {
@@ -190,11 +235,6 @@ export declare type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
190
235
 
191
236
  export declare type ButtonVariant = "primary" | "secondary" | "muted" | "ghost" | "link" | "input" | "info" | "success" | "warning" | "danger";
192
237
 
193
- declare const buttonVariants: (props?: ({
194
- variant?: "secondary" | "info" | "success" | "warning" | "destructive" | "default" | "ghost" | "link" | "outline" | "unstyled" | "error" | null | undefined;
195
- size?: "default" | "xs" | "sm" | "md" | "lg" | "xl" | "icon" | "unstyled" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
196
- } & ClassProp) | undefined) => string;
197
-
198
238
  export declare const Card: CardComponent;
199
239
 
200
240
  declare function Card_2({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
@@ -343,40 +383,22 @@ declare interface DesktopSelectPickerProps {
343
383
  }
344
384
 
345
385
  export declare const Dialog: {
346
- (props: ComponentProps<typeof Dialog_2>): JSX.Element;
347
- Close: typeof DialogClose;
348
- Content: typeof DialogContent;
349
- Description: typeof DialogDescription;
350
- Footer: typeof DialogFooter;
351
- Header: typeof DialogHeader;
352
- Overlay: typeof DialogOverlay;
353
- Portal: typeof DialogPortal;
354
- Title: typeof DialogTitle;
355
- Trigger: ({ children, render, ...props }: Dialog_3.Trigger.Props & ButtonProps) => JSX.Element;
386
+ ({ ...props }: Dialog_2.Root.Props): JSX.Element;
387
+ Close: ({ ...props }: Dialog_2.Close.Props) => JSX.Element;
388
+ Content: ({ className, children, showCloseButton, ...props }: Dialog_2.Popup.Props & {
389
+ showCloseButton?: boolean;
390
+ }) => JSX.Element;
391
+ Description: ({ className, ...props }: Dialog_2.Description.Props) => JSX.Element;
392
+ Header: ({ className, ...props }: React_2.ComponentProps<"div">) => JSX.Element;
393
+ Footer: ({ className, showCloseButton, children, ...props }: React_2.ComponentProps<"div"> & {
394
+ showCloseButton?: boolean;
395
+ }) => JSX.Element;
396
+ Overlay: ({ className, ...props }: Dialog_2.Backdrop.Props) => JSX.Element;
397
+ Portal: ({ ...props }: Dialog_2.Portal.Props) => JSX.Element;
398
+ Title: ({ className, ...props }: Dialog_2.Title.Props) => JSX.Element;
399
+ Trigger: ({ ...props }: Dialog_2.Trigger.Props) => JSX.Element;
356
400
  };
357
401
 
358
- declare function Dialog_2({ ...props }: Dialog_3.Root.Props): JSX.Element;
359
-
360
- declare function DialogClose({ ...props }: Dialog_3.Close.Props): JSX.Element;
361
-
362
- declare function DialogContent({ className, children, showCloseButton, ...props }: Dialog_3.Popup.Props & {
363
- showCloseButton?: boolean;
364
- }): JSX.Element;
365
-
366
- declare function DialogDescription({ className, ...props }: Dialog_3.Description.Props): JSX.Element;
367
-
368
- declare function DialogFooter({ className, showCloseButton, children, ...props }: React_2.ComponentProps<"div"> & {
369
- showCloseButton?: boolean;
370
- }): JSX.Element;
371
-
372
- declare function DialogHeader({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
373
-
374
- declare function DialogOverlay({ className, ...props }: Dialog_3.Backdrop.Props): JSX.Element;
375
-
376
- declare function DialogPortal({ ...props }: Dialog_3.Portal.Props): JSX.Element;
377
-
378
- declare function DialogTitle({ className, ...props }: Dialog_3.Title.Props): JSX.Element;
379
-
380
402
  export declare type Display = (typeof DISPLAYS)[number];
381
403
 
382
404
  export declare const DISPLAYS: readonly ["block", "flex", "grid", "inline", "inline-block", "inline-flex", "inline-grid", "inline-table", "list-item", "flow-root", "contents", "table", "table-header-group", "table-footer-group", "table-column-group", "table-column", "table-row-group", "table-row", "table-cell", "table-caption", "hidden", "sr-only", "not-sr-only"];
@@ -749,12 +771,6 @@ export declare const Menubar: {
749
771
  MenuSeparator: ({ className, ...props }: ComponentProps<typeof Separator_2>) => JSX.Element;
750
772
  };
751
773
 
752
- export declare const MenuItemText: ({ children }: {
753
- children: React.ReactNode;
754
- }) => JSX.Element;
755
-
756
- export declare const Modal: ({ trigger, children, title, description, open, onOpenChange, ariaDescription }: Props_2) => JSX.Element;
757
-
758
774
  export declare const MultiSelectInput: ({ options, selectedOptions, onChange, unFilteredLabel, filteredLabel, size, className, }: MultiSelectInputProps) => JSX.Element;
759
775
 
760
776
  declare interface MultiSelectInputProps {
@@ -831,7 +847,7 @@ export declare type Overflow = (typeof OVERFLOWS)[number];
831
847
 
832
848
  export declare const OVERFLOWS: readonly ["auto", "scroll", "hidden", "clip", "visible"];
833
849
 
834
- export declare const Pagination: ({ pageCount, currentPage, onChange }: Props_3) => JSX.Element;
850
+ export declare const Pagination: ({ pageCount, currentPage, onChange }: Props_2) => JSX.Element;
835
851
 
836
852
  export declare const Paragraph: ({ children, className, as, ...props }: TextProps) => JSX.Element;
837
853
 
@@ -882,6 +898,12 @@ declare interface Props {
882
898
  }
883
899
 
884
900
  declare interface Props_2 {
901
+ pageCount: number;
902
+ currentPage: number;
903
+ onChange: (page: number) => void;
904
+ }
905
+
906
+ declare interface Props_3 {
885
907
  children: ReactNode;
886
908
  trigger?: ReactElement;
887
909
  title?: string;
@@ -891,16 +913,6 @@ declare interface Props_2 {
891
913
  ariaDescription?: string;
892
914
  }
893
915
 
894
- declare interface Props_3 {
895
- pageCount: number;
896
- currentPage: number;
897
- onChange: (page: number) => void;
898
- }
899
-
900
- declare interface Props_4 extends SidebarProps {
901
- children?: React.ReactNode;
902
- }
903
-
904
916
  export declare const RadioField: ({ label, name, options, note, value, size, onChange, error, labelClassName, }: RadioFieldProps) => JSX.Element;
905
917
 
906
918
  declare interface RadioFieldProps {
@@ -970,61 +982,93 @@ export declare interface SelectPickerProps {
970
982
 
971
983
  export declare const Separator: ({ className, orientation, gap, ...props }: SeparatorProps) => JSX.Element;
972
984
 
985
+ declare function Separator_3({ className, orientation, ...props }: Separator_2.Props): JSX.Element;
986
+
973
987
  declare interface SeparatorProps extends React.HTMLAttributes<HTMLDivElement> {
974
988
  orientation?: "horizontal" | "vertical";
975
989
  gap?: Gap;
976
990
  }
977
991
 
978
992
  export declare const Sheet: {
979
- ({ ...props }: Dialog_3.Root.Props): JSX.Element;
980
- Trigger: ({ ...props }: Dialog_3.Trigger.Props) => JSX.Element;
981
- Close: ({ ...props }: Dialog_3.Close.Props) => JSX.Element;
982
- Content: ({ className, children, side, showCloseButton, showOverlay, ...props }: Dialog_3.Popup.Props & {
993
+ ({ ...props }: Dialog_2.Root.Props): JSX.Element;
994
+ Trigger: ({ ...props }: Dialog_2.Trigger.Props) => JSX.Element;
995
+ Close: ({ ...props }: Dialog_2.Close.Props) => JSX.Element;
996
+ Content: ({ className, children, side, showCloseButton, showOverlay, ...props }: Dialog_2.Popup.Props & {
983
997
  side?: "top" | "right" | "bottom" | "left";
984
998
  showCloseButton?: boolean;
985
999
  showOverlay?: boolean;
986
1000
  }) => JSX.Element;
987
- Overlay: ({ className, ...props }: Dialog_3.Backdrop.Props) => JSX.Element;
1001
+ Overlay: ({ className, ...props }: Dialog_2.Backdrop.Props) => JSX.Element;
988
1002
  Header: ({ className, ...props }: ComponentProps<"div">) => JSX.Element;
989
1003
  Body: ({ className, ...props }: ComponentProps<"div">) => JSX.Element;
990
1004
  Footer: ({ className, ...props }: ComponentProps<"div">) => JSX.Element;
991
- Title: ({ className, ...props }: Dialog_3.Title.Props) => JSX.Element;
992
- Description: ({ className, ...props }: Dialog_3.Description.Props) => JSX.Element;
1005
+ Title: ({ className, ...props }: Dialog_2.Title.Props) => JSX.Element;
1006
+ Description: ({ className, ...props }: Dialog_2.Description.Props) => JSX.Element;
1007
+ };
1008
+
1009
+ export declare const Sidebar: {
1010
+ ({ side, collapsible, className, children, ...props }: SidebarProps): JSX.Element;
1011
+ Rail: ({ className, ...props }: React.ComponentProps<"button">) => JSX.Element;
1012
+ Inset: ({ className, ...props }: React.ComponentProps<"main">) => JSX.Element;
1013
+ Header: ({ className, ...props }: React.ComponentProps<"div">) => JSX.Element;
1014
+ Footer: ({ className, ...props }: React.ComponentProps<"div">) => JSX.Element;
1015
+ Content: ({ className, ...props }: React.ComponentProps<"div">) => JSX.Element;
1016
+ Group: ({ className, ...props }: React.ComponentProps<"div">) => JSX.Element;
1017
+ GroupLabel: ({ className, render, ...props }: useRender_2.ComponentProps<"div"> & React.ComponentProps<"div">) => ReactElement<unknown, string | JSXElementConstructor<any>>;
1018
+ GroupAction: ({ className, render, ...props }: useRender_2.ComponentProps<"button"> & React.ComponentProps<"button">) => ReactElement<unknown, string | JSXElementConstructor<any>>;
1019
+ GroupContent: ({ className, ...props }: React.ComponentProps<"div">) => JSX.Element;
1020
+ Menu: ({ className, ...props }: React.ComponentProps<"ul">) => JSX.Element;
1021
+ MenuItem: ({ className, ...props }: React.ComponentProps<"li">) => JSX.Element;
1022
+ MenuAction: ({ className, render, showOnHover, ...props }: useRender_2.ComponentProps<"button"> & React.ComponentProps<"button"> & {
1023
+ showOnHover?: boolean;
1024
+ }) => ReactElement<unknown, string | JSXElementConstructor<any>>;
1025
+ MenuSub: ({ className, ...props }: React.ComponentProps<"ul">) => JSX.Element;
1026
+ MenuSubItem: ({ className, ...props }: React.ComponentProps<"li">) => JSX.Element;
1027
+ MenuSubButton: ({ render, size, isActive, className, ...props }: useRender_2.ComponentProps<"a"> & React.ComponentProps<"a"> & {
1028
+ size?: "sm" | "md";
1029
+ isActive?: boolean;
1030
+ }) => ReactElement<unknown, string | JSXElementConstructor<any>>;
1031
+ Separator: ({ className, ...props }: React.ComponentProps<Separator_3>) => JSX.Element;
1032
+ MenuButton: ({ render, active, size, tooltip, forceTooltip, className, ...buttonProps }: ClassAttributes<HTMLButtonElement> & ButtonHTMLAttributes<HTMLButtonElement> & {
1033
+ render?: ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}> | undefined;
1034
+ } & {
1035
+ active?: boolean;
1036
+ tooltip?: string;
1037
+ forceTooltip?: boolean;
1038
+ size?: "default" | "lg";
1039
+ }) => JSX.Element;
1040
+ Trigger: ({ className, icon, children, ...props }: SidebarTriggerProps) => JSX.Element;
993
1041
  };
994
1042
 
995
- export declare const Sidebar: ({ brandContent, brandOnClick, activeSlug, itemSets, bottomItemSets, theme, setTheme, ...props }: SidebarProps) => JSX.Element;
1043
+ declare const SidebarMenuButton: ({ render, active, size, tooltip, forceTooltip, className, ...buttonProps }: SidebarMenuButtonProps) => JSX.Element;
996
1044
 
997
- declare function Sidebar_2({ side, variant, collapsible, className, children, dir, ...props }: React_2.ComponentProps<"div"> & {
1045
+ declare type SidebarMenuButtonProps = useRender.ComponentProps<"button"> & React_2.ComponentProps<"button"> & {
1046
+ active?: boolean;
1047
+ tooltip?: string;
1048
+ forceTooltip?: boolean;
1049
+ size?: "default" | "lg";
1050
+ };
1051
+
1052
+ export declare interface SidebarProps extends React.ComponentProps<"div"> {
998
1053
  side?: "left" | "right";
999
- variant?: "sidebar" | "floating" | "inset";
1000
1054
  collapsible?: "offcanvas" | "icon" | "none";
1001
- }): JSX.Element;
1055
+ }
1002
1056
 
1003
- export declare const SidebarLayout: ({ children, ...props }: Props_4) => JSX.Element;
1057
+ export declare const SidebarProvider: ({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: SidebarProviderProps) => JSX.Element;
1004
1058
 
1005
- export declare interface SidebarProps extends React.ComponentProps<typeof Sidebar_2> {
1006
- brandContent: React.ReactNode;
1007
- brandOnClick?: () => void;
1008
- activeSlug?: string;
1009
- itemSets: SideLinkSet[];
1010
- bottomItemSets?: SideLinkSet[];
1011
- theme: Theme;
1012
- setTheme: (theme: Theme) => void;
1059
+ declare interface SidebarProviderProps extends React_2.ComponentProps<"div"> {
1060
+ defaultOpen?: boolean;
1061
+ open?: boolean;
1062
+ onOpenChange?: (open: boolean) => void;
1013
1063
  }
1014
1064
 
1015
- export declare function SidebarTrigger({ className, onClick, children, ...props }: React_2.ComponentProps<typeof Button_3>): JSX.Element;
1065
+ export declare const SidebarTrigger: ({ className, icon, children, ...props }: SidebarTriggerProps) => JSX.Element;
1016
1066
 
1017
- declare interface SideLink {
1018
- slug: string;
1019
- title: string;
1020
- icon: React.ElementType;
1021
- onClick?: () => void;
1022
- external?: boolean;
1067
+ export declare interface SidebarTriggerProps extends React_2.ComponentProps<typeof SidebarMenuButton> {
1068
+ icon?: ElementType;
1023
1069
  }
1024
1070
 
1025
- declare interface SideLinkSet {
1026
- links: SideLink[];
1027
- }
1071
+ export declare const SimpleDialog: ({ trigger, children, title, description, open, onOpenChange, ariaDescription }: Props_3) => JSX.Element;
1028
1072
 
1029
1073
  export declare const SimpleTooltip: ({ children, cursor, content, ...props }: SimpleTooltipProps) => JSX.Element;
1030
1074
 
@@ -1072,11 +1116,21 @@ export declare interface SubmitButtonProps extends Omit<ButtonProps, "type"> {
1072
1116
  submitting: boolean;
1073
1117
  }
1074
1118
 
1075
- declare function Switch({ className, size, thumbClassName, ...props }: Switch_2.Root.Props & {
1119
+ export declare function Switch({ className, size, thumbClassName, ...props }: Switch_2.Root.Props & {
1076
1120
  size?: "xs" | "sm" | "md" | "lg" | "xl";
1077
1121
  thumbClassName?: string;
1078
1122
  }): JSX.Element;
1079
1123
 
1124
+ export declare const SwitchField: ({ id: idProp, label, labelClassName, containerClassName, size, ...props }: SwitchFieldProps) => JSX.Element;
1125
+
1126
+ declare interface SwitchFieldProps extends React.ComponentProps<typeof Switch> {
1127
+ id?: string;
1128
+ label?: string | (string | null)[];
1129
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
1130
+ labelClassName?: string | string[];
1131
+ containerClassName?: string;
1132
+ }
1133
+
1080
1134
  export declare const Table: {
1081
1135
  ({ className, ...props }: ComponentProps<"table">): JSX.Element;
1082
1136
  Header: (props: ComponentProps<"thead">) => JSX.Element;
@@ -1192,16 +1246,6 @@ export declare type TextTracking = (typeof TEXT_TRACKINGS)[number];
1192
1246
 
1193
1247
  export declare type Theme = "system" | "light" | "dark";
1194
1248
 
1195
- export declare const ToggleField: ({ id: idProp, label, labelClassName, containerClassName, size, ...props }: ToggleFieldProps) => JSX.Element;
1196
-
1197
- declare interface ToggleFieldProps extends React.ComponentProps<typeof Switch> {
1198
- id?: string;
1199
- label?: string | (string | null)[];
1200
- size?: "xs" | "sm" | "md" | "lg" | "xl";
1201
- labelClassName?: string | string[];
1202
- containerClassName?: string;
1203
- }
1204
-
1205
1249
  export declare const Tooltip: TooltipComponent;
1206
1250
 
1207
1251
  declare function Tooltip_2({ ...props }: Tooltip_3.Root.Props): JSX.Element;