@still-forest/canopy 0.48.2 → 0.49.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +70 -63
  2. package/dist/index.js +3445 -3387
  3. package/package.json +5 -5
package/dist/index.d.ts CHANGED
@@ -76,7 +76,7 @@ declare interface BodyProps extends FlexProps {
76
76
 
77
77
  export declare const Box: default_2.ForwardRefExoticComponent<BoxProps & default_2.RefAttributes<HTMLDivElement>>;
78
78
 
79
- declare const BOX_SIZINGS: readonly ["content", "border"];
79
+ export declare const BOX_SIZINGS: readonly ["content", "border"];
80
80
 
81
81
  export declare interface BoxProps extends default_2.HTMLAttributes<HTMLDivElement> {
82
82
  as?: default_2.ElementType;
@@ -93,7 +93,7 @@ export declare interface BoxProps extends default_2.HTMLAttributes<HTMLDivElemen
93
93
  rounded?: RoundedSize;
94
94
  }
95
95
 
96
- declare type BoxSizing = (typeof BOX_SIZINGS)[number];
96
+ export declare type BoxSizing = (typeof BOX_SIZINGS)[number];
97
97
 
98
98
  export declare const Breadcrumbs: ({ breadcrumbs, linkComponent, pageComponent, className }: Props) => JSX.Element;
99
99
 
@@ -119,11 +119,11 @@ declare function Button_2({ className, variant, size, asChild, ...props }: React
119
119
  }): JSX.Element;
120
120
 
121
121
  export declare const ButtonGroup: {
122
- ({ children, className }: ButtonGroupProps): JSX.Element;
123
- Button({ children, className, ...props }: ButtonProps): JSX.Element;
122
+ ({ children, className, ...props }: ButtonGroupProps): JSX.Element;
123
+ Button: default_2.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & default_2.RefAttributes<HTMLButtonElement>>;
124
124
  };
125
125
 
126
- export declare interface ButtonGroupProps {
126
+ export declare interface ButtonGroupProps extends default_2.ComponentPropsWithoutRef<"div"> {
127
127
  children: default_2.ReactNode;
128
128
  className?: string;
129
129
  }
@@ -145,16 +145,16 @@ export declare interface ButtonProps extends default_2.ComponentProps<"button">
145
145
  rounded?: boolean;
146
146
  }
147
147
 
148
- export declare const ButtonSelectInput: ({ name, label, hint, options, error, note, secondaryOptions, value, onChange, buttonClassName, secondaryButtonClassName, ...props }: ButtonSelectInputProps) => JSX.Element;
148
+ export declare const ButtonSelectInput: ({ name, label, hint, options, error, note, secondaryOptions, value, onChange, buttonClassName, secondaryButtonClassName, className: groupClassName, ...props }: ButtonSelectInputProps) => JSX.Element;
149
149
 
150
- declare interface ButtonSelectInputProps extends Omit<ButtonGroupProps, "children"> {
150
+ declare interface ButtonSelectInputProps extends Omit<ButtonGroupProps, "children" | "onChange"> {
151
151
  name?: string;
152
152
  label?: string;
153
153
  hint?: string;
154
154
  error?: string;
155
155
  note?: string;
156
156
  options: Option_2[];
157
- secondaryOptions?: Option_2[];
157
+ secondaryOptions?: SelectPickerOption[];
158
158
  value: string | undefined;
159
159
  onChange: (value: string) => void;
160
160
  buttonClassName?: string;
@@ -246,6 +246,8 @@ declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof Co
246
246
 
247
247
  declare type CollapsibleTriggerProps = React.ComponentProps<typeof CollapsibleTrigger>;
248
248
 
249
+ export declare const COLOR_VARIANTS: readonly ["primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive", "brand"];
250
+
249
251
  export declare const Container: ({ children, className, direction, separation, ...props }: ContainerProps) => JSX.Element;
250
252
 
251
253
  export declare interface ContainerProps extends FlexProps {
@@ -280,11 +282,11 @@ declare interface DatePickerProps {
280
282
 
281
283
  export declare const DeleteButton: ({ disabled, handleDelete, ...rest }: Props_4) => JSX.Element;
282
284
 
283
- declare type Display = (typeof DISPLAYS)[number];
285
+ export declare type Display = (typeof DISPLAYS)[number];
284
286
 
285
287
  declare type Display_2 = "block" | "flex";
286
288
 
287
- 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"];
289
+ 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"];
288
290
 
289
291
  export declare const Empty: EmptyComponent;
290
292
 
@@ -338,23 +340,23 @@ export declare const Flex: typeof FlexComponent & {
338
340
  Item: typeof FlexItem;
339
341
  };
340
342
 
341
- declare const FLEX_ALIGNS: readonly ["start", "center", "end", "stretch", "baseline"];
343
+ export declare const FLEX_ALIGNS: readonly ["start", "center", "end", "stretch", "baseline"];
342
344
 
343
- declare const FLEX_DIRECTIONS: readonly ["row", "col", "row-reverse", "col-reverse"];
345
+ export declare const FLEX_DIRECTIONS: readonly ["row", "col", "row-reverse", "col-reverse"];
344
346
 
345
- declare const FLEX_GROWS: readonly [null, true, false, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
347
+ export declare const FLEX_GROWS: readonly [null, true, false, "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
346
348
 
347
- declare const FLEX_JUSTIFIES: readonly ["start", "center", "end", "between", "around", "evenly", "stretch", "baseline", "normal"];
349
+ export declare const FLEX_JUSTIFIES: readonly ["start", "center", "end", "between", "around", "evenly", "stretch", "baseline", "normal"];
348
350
 
349
- declare const FLEX_WRAPS: readonly ["nowrap", "wrap", "wrap-reverse"];
351
+ export declare const FLEX_WRAPS: readonly ["nowrap", "wrap", "wrap-reverse"];
350
352
 
351
- declare type FlexAlign = (typeof FLEX_ALIGNS)[number];
353
+ export declare type FlexAlign = (typeof FLEX_ALIGNS)[number];
352
354
 
353
355
  declare const FlexComponent: default_2.ForwardRefExoticComponent<FlexProps & default_2.RefAttributes<HTMLDivElement>>;
354
356
 
355
- declare type FlexDirection = (typeof FLEX_DIRECTIONS)[number];
357
+ export declare type FlexDirection = (typeof FLEX_DIRECTIONS)[number];
356
358
 
357
- declare type FlexGrow = (typeof FLEX_GROWS)[number];
359
+ export declare type FlexGrow = (typeof FLEX_GROWS)[number];
358
360
 
359
361
  declare const FlexItem: ({ flex, className, as, children, ...props }: FlexItemProps) => JSX.Element;
360
362
 
@@ -363,7 +365,7 @@ declare interface FlexItemProps extends React.HTMLAttributes<HTMLDivElement> {
363
365
  flex?: FlexType;
364
366
  }
365
367
 
366
- declare type FlexJustify = (typeof FLEX_JUSTIFIES)[number];
368
+ export declare type FlexJustify = (typeof FLEX_JUSTIFIES)[number];
367
369
 
368
370
  export declare interface FlexProps extends default_2.HTMLAttributes<HTMLDivElement> {
369
371
  as?: default_2.ElementType;
@@ -379,19 +381,19 @@ export declare interface FlexProps extends default_2.HTMLAttributes<HTMLDivEleme
379
381
 
380
382
  declare type FlexType = "1" | "auto" | "initial" | "none";
381
383
 
382
- declare type FlexWrap = (typeof FLEX_WRAPS)[number];
384
+ export declare type FlexWrap = (typeof FLEX_WRAPS)[number];
383
385
 
384
- declare const FONT_FAMILIES: readonly ["display", "serif", "sans", "mono", "heading", "body", "brand"];
386
+ export declare const FONT_FAMILIES: readonly ["display", "serif", "sans", "mono", "heading", "body", "brand"];
385
387
 
386
- declare const FONT_SIZES: readonly ["xs", "sm", "base", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl", "9xl"];
388
+ export declare const FONT_SIZES: readonly ["xs", "sm", "base", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "8xl", "9xl"];
387
389
 
388
- declare const FONT_WEIGHTS: readonly ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"];
390
+ export declare const FONT_WEIGHTS: readonly ["thin", "extralight", "light", "normal", "medium", "semibold", "bold", "extrabold", "black"];
389
391
 
390
- declare type FontFamily = (typeof FONT_FAMILIES)[number];
392
+ export declare type FontFamily = (typeof FONT_FAMILIES)[number];
391
393
 
392
- declare type FontSize = (typeof FONT_SIZES)[number];
394
+ export declare type FontSize = (typeof FONT_SIZES)[number];
393
395
 
394
- declare type FontWeight = (typeof FONT_WEIGHTS)[number];
396
+ export declare type FontWeight = (typeof FONT_WEIGHTS)[number];
395
397
 
396
398
  export declare const Footer: ({ children, className, ...props }: FooterProps) => JSX.Element;
397
399
 
@@ -399,21 +401,21 @@ declare interface FooterProps extends ContainerProps {
399
401
  children: React.ReactNode;
400
402
  }
401
403
 
402
- declare type Gap = (typeof GAPS)[number];
404
+ export declare type Gap = (typeof GAPS)[number];
403
405
 
404
- declare const GAPS: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"];
406
+ export declare const GAPS: readonly ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16"];
405
407
 
406
408
  export declare const Grid: default_2.ForwardRefExoticComponent<GridProps & default_2.RefAttributes<HTMLDivElement>>;
407
409
 
408
- declare const GRID_COLS: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
410
+ export declare const GRID_COLS: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "none"];
409
411
 
410
- declare const GRID_FLOWS: readonly ["row", "col", "dense", "row-dense", "col-dense"];
412
+ export declare const GRID_FLOWS: readonly ["row", "col", "dense", "row-dense", "col-dense"];
411
413
 
412
- declare const GRID_ROWS: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "none"];
414
+ export declare const GRID_ROWS: readonly ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "none"];
413
415
 
414
- declare type GridCols = (typeof GRID_COLS)[number];
416
+ export declare type GridCols = (typeof GRID_COLS)[number];
415
417
 
416
- declare type GridFlow = (typeof GRID_FLOWS)[number];
418
+ export declare type GridFlow = (typeof GRID_FLOWS)[number];
417
419
 
418
420
  export declare interface GridProps extends default_2.HTMLAttributes<HTMLDivElement> {
419
421
  as?: default_2.ElementType;
@@ -425,7 +427,7 @@ export declare interface GridProps extends default_2.HTMLAttributes<HTMLDivEleme
425
427
  gapY?: Gap;
426
428
  }
427
429
 
428
- declare type GridRows = (typeof GRID_ROWS)[number];
430
+ export declare type GridRows = (typeof GRID_ROWS)[number];
429
431
 
430
432
  export declare const Header: ({ children, sticky, className, ...props }: HeaderProps) => JSX.Element;
431
433
 
@@ -436,7 +438,7 @@ declare interface HeaderProps extends ContainerProps {
436
438
 
437
439
  export declare const Heading: default_2.ForwardRefExoticComponent<HeadingProps & default_2.RefAttributes<HTMLHeadingElement>>;
438
440
 
439
- declare const HEADING_LEVELS: readonly ["1", "2", "3", "4", "5", "6"];
441
+ export declare const HEADING_LEVELS: readonly ["1", "2", "3", "4", "5", "6"];
440
442
 
441
443
  export declare interface HeadingProps extends default_2.HTMLAttributes<HTMLHeadingElement> {
442
444
  level?: HeadingSize;
@@ -456,11 +458,11 @@ export declare interface HeadingProps extends default_2.HTMLAttributes<HTMLHeadi
456
458
  className?: string;
457
459
  }
458
460
 
459
- declare type HeadingSize = (typeof HEADING_LEVELS)[number];
461
+ export declare type HeadingSize = (typeof HEADING_LEVELS)[number];
460
462
 
461
- declare type Height = (typeof HEIGHTS)[number];
463
+ export declare type Height = (typeof HEIGHTS)[number];
462
464
 
463
- declare const HEIGHTS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "screen"];
465
+ export declare const HEIGHTS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "screen"];
464
466
 
465
467
  export declare const Hint: ({ content, className }: HintProps) => JSX.Element;
466
468
 
@@ -617,15 +619,19 @@ export declare const Layout: typeof LayoutComponent & {
617
619
  Footer: typeof Footer;
618
620
  };
619
621
 
620
- declare const LAYOUT_VARIANTS: readonly ["default", "primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive", "brand"];
622
+ export declare const LAYOUT_ELEMENTS: readonly ["div", "span", "section", "main", "header", "footer", "aside", "nav", "article"];
623
+
624
+ export declare const LAYOUT_VARIANTS: readonly ["default", "primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive", "brand"];
621
625
 
622
626
  declare const LayoutComponent: default_2.ForwardRefExoticComponent<LayoutProps & default_2.RefAttributes<HTMLDivElement>>;
623
627
 
628
+ export declare type LayoutElement = (typeof LAYOUT_ELEMENTS)[number];
629
+
624
630
  declare interface LayoutProps extends FlexProps {
625
631
  children: default_2.ReactNode;
626
632
  }
627
633
 
628
- declare type LayoutVariant = (typeof LAYOUT_VARIANTS)[number];
634
+ export declare type LayoutVariant = (typeof LAYOUT_VARIANTS)[number];
629
635
 
630
636
  export declare const LegacyInputGroup: ({ label, labelFor, className, labelClassName, children, }: InputGroupProps_2) => JSX.Element;
631
637
 
@@ -654,8 +660,9 @@ export declare interface NumberInputProps extends Omit<TextInputProps, "type"> {
654
660
  }
655
661
 
656
662
  declare interface Option_2 {
657
- label: string;
663
+ label?: string;
658
664
  value: string;
665
+ icon?: React.ReactElement;
659
666
  }
660
667
 
661
668
  declare interface Option_3 {
@@ -664,9 +671,9 @@ declare interface Option_3 {
664
671
  hint?: string;
665
672
  }
666
673
 
667
- declare type Overflow = (typeof OVERFLOWS)[number];
674
+ export declare type Overflow = (typeof OVERFLOWS)[number];
668
675
 
669
- declare const OVERFLOWS: readonly ["auto", "scroll", "hidden", "clip", "visible"];
676
+ export declare const OVERFLOWS: readonly ["auto", "scroll", "hidden", "clip", "visible"];
670
677
 
671
678
  export declare const PageLoader: ({ iconComponent, message, iconSize, iconClassName, ...props }: PageLoaderProps) => JSX.Element;
672
679
 
@@ -703,9 +710,9 @@ declare function PopoverContent({ className, align, sideOffset, ...props }: Reac
703
710
 
704
711
  declare function PopoverTrigger({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Trigger>): JSX.Element;
705
712
 
706
- declare type Position = (typeof POSITIONS)[number];
713
+ export declare type Position = (typeof POSITIONS)[number];
707
714
 
708
- declare const POSITIONS: readonly ["static", "fixed", "absolute", "relative", "sticky"];
715
+ export declare const POSITIONS: readonly ["static", "fixed", "absolute", "relative", "sticky"];
709
716
 
710
717
  declare interface Props {
711
718
  breadcrumbs: BreadcrumbType[];
@@ -756,9 +763,9 @@ declare interface RadioSelectProps {
756
763
  error?: string;
757
764
  }
758
765
 
759
- declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full", true, false];
766
+ export declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full", true, false];
760
767
 
761
- declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
768
+ export declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
762
769
 
763
770
  export declare const SelectInput: ({ name, defaultValue, options, label, labelClassName, placeholder, hint, note, className, value, onChange, error, size, id: idProp, ...props }: SelectInputProps) => JSX.Element;
764
771
 
@@ -868,9 +875,9 @@ declare interface SimpleTooltipProps {
868
875
  content: string | React.ReactNode;
869
876
  }
870
877
 
871
- declare type Size = (typeof SIZES)[number];
878
+ export declare type Size = (typeof SIZES)[number];
872
879
 
873
- declare const SIZES: readonly [...string[], "auto", "full", "min", "max", "fit", "px"];
880
+ export declare const SIZES: readonly [...string[], "auto", "full", "min", "max", "fit", "px"];
874
881
 
875
882
  export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
876
883
 
@@ -948,20 +955,20 @@ export declare function TabsList({ className, ...props }: React_2.ComponentProps
948
955
 
949
956
  export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Trigger>): JSX.Element;
950
957
 
951
- declare const TAILWIND_COLORS: readonly ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "slate", "gray", "zinc", "neutral", "stone", "white", "black"];
958
+ export declare const TAILWIND_COLORS: readonly ["red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "slate", "gray", "zinc", "neutral", "stone", "white", "black"];
952
959
 
953
- declare type TailwindColor = (typeof TAILWIND_COLORS)[number];
960
+ export declare type TailwindColor = (typeof TAILWIND_COLORS)[number];
954
961
 
955
962
  declare const Text_2: default_2.ForwardRefExoticComponent<Omit<any, "ref"> & default_2.RefAttributes<Element>>;
956
963
  export { Text_2 as Text }
957
964
 
958
- declare const TEXT_ALIGNS: readonly ["left", "center", "right", "justify", "start", "end"];
965
+ export declare const TEXT_ALIGNS: readonly ["left", "center", "right", "justify", "start", "end"];
959
966
 
960
- declare const TEXT_LEADINGS: readonly ["none", "tight", "snug", "normal", "relaxed", "loose"];
967
+ export declare const TEXT_LEADINGS: readonly ["none", "tight", "snug", "normal", "relaxed", "loose"];
961
968
 
962
- declare const TEXT_TRACKINGS: readonly ["tighter", "tight", "normal", "wide", "wider", "widest"];
969
+ export declare const TEXT_TRACKINGS: readonly ["tighter", "tight", "normal", "wide", "wider", "widest"];
963
970
 
964
- declare type TextAlign = (typeof TEXT_ALIGNS)[number];
971
+ export declare type TextAlign = (typeof TEXT_ALIGNS)[number];
965
972
 
966
973
  export declare function Textarea({ label, name, note, placeholder, className, error, labelClassName, hint, ...props }: TextareaProps): JSX.Element;
967
974
 
@@ -1012,7 +1019,7 @@ export declare interface TextInputProps extends Omit<React.ComponentProps<"input
1012
1019
  error?: string;
1013
1020
  }
1014
1021
 
1015
- declare type TextLeading = (typeof TEXT_LEADINGS)[number];
1022
+ export declare type TextLeading = (typeof TEXT_LEADINGS)[number];
1016
1023
 
1017
1024
  export declare const TextList: TextListComponent;
1018
1025
 
@@ -1036,7 +1043,7 @@ export declare type TextProps<E extends default_2.ElementType = TypographyElemen
1036
1043
  as?: E;
1037
1044
  } & default_2.ComponentPropsWithRef<E>;
1038
1045
 
1039
- declare type TextTracking = (typeof TEXT_TRACKINGS)[number];
1046
+ export declare type TextTracking = (typeof TEXT_TRACKINGS)[number];
1040
1047
 
1041
1048
  export declare type Theme = "system" | "light" | "dark";
1042
1049
 
@@ -1135,16 +1142,16 @@ declare type TooltipTriggerProps = React.ComponentProps<typeof TooltipTrigger> &
1135
1142
  cursor?: CursorType;
1136
1143
  };
1137
1144
 
1138
- declare const TYPOGRAPHY_ELEMENTS: readonly ["p", "span", "label", "div", "h1", "h2", "h3", "h4", "h5", "h6"];
1145
+ export declare const TYPOGRAPHY_ELEMENTS: readonly ["p", "span", "label", "div", "h1", "h2", "h3", "h4", "h5", "h6"];
1139
1146
 
1140
- declare const TYPOGRAPHY_VARIANTS: readonly ["default", "inherit", "primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive", "brand"];
1147
+ export declare const TYPOGRAPHY_VARIANTS: readonly ["default", "inherit", "primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive", "brand"];
1141
1148
 
1142
- declare type TypographyElement = (typeof TYPOGRAPHY_ELEMENTS)[number];
1149
+ export declare type TypographyElement = (typeof TYPOGRAPHY_ELEMENTS)[number];
1143
1150
 
1144
- declare type TypographyVariant = (typeof TYPOGRAPHY_VARIANTS)[number];
1151
+ export declare type TypographyVariant = (typeof TYPOGRAPHY_VARIANTS)[number];
1145
1152
 
1146
- declare type Width = (typeof WIDTHS)[number];
1153
+ export declare type Width = (typeof WIDTHS)[number];
1147
1154
 
1148
- declare const WIDTHS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "screen"];
1155
+ export declare const WIDTHS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "4xl", "5xl", "6xl", "7xl", "screen"];
1149
1156
 
1150
1157
  export { }