@still-forest/canopy 0.21.0 → 0.22.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.
package/dist/index.d.ts CHANGED
@@ -1,23 +1,24 @@
1
- import * as AccordionPrimitive from '@radix-ui/react-accordion';
1
+ import { Accordion as Accordion_2 } from 'radix-ui';
2
2
  import { ClassProp } from 'class-variance-authority/types';
3
3
  import { ComponentProps } from 'react';
4
4
  import { default as default_2 } from 'react';
5
5
  import { JSX } from 'react/jsx-runtime';
6
+ import { Popover as Popover_3 } from 'radix-ui';
6
7
  import * as React_2 from 'react';
7
- import * as TabsPrimitive from '@radix-ui/react-tabs';
8
+ import { Tabs as Tabs_2 } from 'radix-ui';
8
9
  import { VariantProps } from 'class-variance-authority';
9
10
 
10
- export declare function Accordion({ ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Root>): JSX.Element;
11
+ export declare function Accordion({ ...props }: React_2.ComponentProps<typeof Accordion_2.Root>): JSX.Element;
11
12
 
12
- export declare function AccordionContent({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Content>): JSX.Element;
13
+ export declare function AccordionContent({ className, children, ...props }: React_2.ComponentProps<typeof Accordion_2.Content>): JSX.Element;
13
14
 
14
- export declare function AccordionItem({ className, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Item>): JSX.Element;
15
+ export declare function AccordionItem({ className, ...props }: React_2.ComponentProps<typeof Accordion_2.Item>): JSX.Element;
15
16
 
16
- export declare function AccordionTrigger({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Trigger>): JSX.Element;
17
+ export declare function AccordionTrigger({ className, children, ...props }: React_2.ComponentProps<typeof Accordion_2.Trigger>): JSX.Element;
17
18
 
18
19
  export declare const Alert: ({ type, title, message, className }: AlertProps) => JSX.Element;
19
20
 
20
- declare interface AlertProps {
21
+ export declare interface AlertProps {
21
22
  type: "info" | "success" | "warning" | "error";
22
23
  title?: string;
23
24
  message: string;
@@ -34,6 +35,12 @@ declare interface BadgeProps {
34
35
  className?: string;
35
36
  }
36
37
 
38
+ declare const Body_2: ({ children, className, withContainer, ...props }: BodyProps) => JSX.Element;
39
+
40
+ declare interface BodyProps extends FlexProps {
41
+ withContainer?: boolean;
42
+ }
43
+
37
44
  export declare const Box: default_2.ForwardRefExoticComponent<BoxProps & default_2.RefAttributes<HTMLDivElement>>;
38
45
 
39
46
  declare const BOX_SIZINGS: readonly ["content", "border"];
@@ -127,8 +134,9 @@ export declare const Code: ({ children, ...props }: TextProps) => JSX.Element;
127
134
 
128
135
  export declare const Container: ({ children, className, ...props }: ContainerProps) => JSX.Element;
129
136
 
130
- export declare interface ContainerProps extends BoxProps {
137
+ export declare interface ContainerProps extends FlexProps {
131
138
  children: React.ReactNode;
139
+ display?: Display_2;
132
140
  className?: string;
133
141
  }
134
142
 
@@ -139,19 +147,22 @@ export declare const DateInput: ({ name, label, placeholder, note, className, ..
139
147
  declare interface DateInputProps extends Omit<TextInputProps, "type"> {
140
148
  }
141
149
 
142
- export declare const DatePicker: ({ onDateSelection, initialValue, className, size }: DatePickerProps) => JSX.Element;
150
+ export declare const DatePicker: ({ onDateSelection, initialValue, className, size, error }: DatePickerProps) => JSX.Element;
143
151
 
144
152
  declare interface DatePickerProps {
145
153
  onDateSelection: (date: Date) => void;
146
154
  initialValue?: Date;
147
155
  className?: string;
148
156
  size?: "default" | "xs" | "sm" | "lg";
157
+ error?: string;
149
158
  }
150
159
 
151
160
  export declare const DeleteButton: ({ disabled, handleDelete, ...rest }: Props_4) => JSX.Element;
152
161
 
153
162
  declare type Display = (typeof DISPLAYS)[number];
154
163
 
164
+ declare type Display_2 = "block" | "flex";
165
+
155
166
  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"];
156
167
 
157
168
  export declare const ErrorFallback: ({ error, onRetry }: ErrorFallbackProps) => JSX.Element;
@@ -261,6 +272,13 @@ export declare interface GridProps extends default_2.HTMLAttributes<HTMLDivEleme
261
272
 
262
273
  declare type GridRows = (typeof GRID_ROWS)[number];
263
274
 
275
+ export declare const Header: ({ children, sticky, className, ...props }: HeaderProps) => JSX.Element;
276
+
277
+ declare interface HeaderProps extends ContainerProps {
278
+ children: React.ReactNode;
279
+ sticky?: boolean;
280
+ }
281
+
264
282
  export declare const Heading: default_2.ForwardRefExoticComponent<HeadingProps & default_2.RefAttributes<HTMLHeadingElement>>;
265
283
 
266
284
  declare const HEADING_LEVELS: readonly ["1", "2", "3", "4", "5", "6"];
@@ -289,6 +307,10 @@ declare type Height = (typeof HEIGHTS)[number];
289
307
 
290
308
  declare const HEIGHTS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "screen"];
291
309
 
310
+ export declare const InputError: ({ message }: {
311
+ message: string;
312
+ }) => JSX.Element;
313
+
292
314
  export declare const InputGroup: ({ label, labelFor, className, labelClassName, children }: InputGroupProps) => JSX.Element;
293
315
 
294
316
  declare interface InputGroupProps {
@@ -317,8 +339,20 @@ export declare interface LabelProps extends ComponentProps<"label"> {
317
339
  className?: string;
318
340
  }
319
341
 
342
+ export declare const Layout: typeof LayoutComponent & {
343
+ Header: typeof Header;
344
+ Body: typeof Body_2;
345
+ Footer: typeof Footer;
346
+ };
347
+
320
348
  declare const LAYOUT_VARIANTS: readonly ["default", "primary", "secondary", "muted", "accent", "info", "success", "warning", "destructive"];
321
349
 
350
+ declare const LayoutComponent: default_2.ForwardRefExoticComponent<LayoutProps & default_2.RefAttributes<HTMLDivElement>>;
351
+
352
+ declare interface LayoutProps extends FlexProps {
353
+ children: default_2.ReactNode;
354
+ }
355
+
322
356
  declare type LayoutVariant = (typeof LAYOUT_VARIANTS)[number];
323
357
 
324
358
  export declare const MenuItemText: ({ children }: {
@@ -368,6 +402,21 @@ declare interface PageNotFoundProps {
368
402
 
369
403
  export declare const Pagination: ({ pageCount, currentPage, onChange }: Props_3) => JSX.Element;
370
404
 
405
+ export declare const Paragraph: ({ children, className, ...props }: TextProps) => JSX.Element;
406
+
407
+ export declare const Popover: PopoverComponent;
408
+
409
+ declare function Popover_2({ ...props }: React_2.ComponentProps<typeof Popover_3.Root>): JSX.Element;
410
+
411
+ declare type PopoverComponent = default_2.FC<default_2.ComponentProps<typeof Popover_2>> & {
412
+ Trigger: typeof PopoverTrigger;
413
+ Content: typeof PopoverContent;
414
+ };
415
+
416
+ declare function PopoverContent({ className, align, sideOffset, ...props }: React_2.ComponentProps<typeof Popover_3.Content>): JSX.Element;
417
+
418
+ declare function PopoverTrigger({ ...props }: React_2.ComponentProps<typeof Popover_3.Trigger>): JSX.Element;
419
+
371
420
  declare type Position = (typeof POSITIONS)[number];
372
421
 
373
422
  declare const POSITIONS: readonly ["static", "fixed", "absolute", "relative", "sticky"];
@@ -404,17 +453,11 @@ declare interface Props_4 extends ButtonProps {
404
453
  handleDelete: () => void;
405
454
  }
406
455
 
407
- declare interface Props_5 extends ButtonProps {
408
- submitting?: boolean;
409
- disabled?: boolean;
410
- submittingIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
411
- }
412
-
413
- declare interface Props_6 extends SidebarProps {
456
+ declare interface Props_5 extends SidebarProps {
414
457
  children?: React.ReactNode;
415
458
  }
416
459
 
417
- export declare const RadioSelect: ({ label, name, options, value, onChange }: RadioSelectProps) => JSX.Element;
460
+ export declare const RadioSelect: ({ label, name, options, value, onChange, error }: RadioSelectProps) => JSX.Element;
418
461
 
419
462
  declare interface RadioSelectProps {
420
463
  name: string;
@@ -422,15 +465,14 @@ declare interface RadioSelectProps {
422
465
  value?: string;
423
466
  options: Option_3[];
424
467
  onChange?: (value: string) => void;
468
+ error?: string;
425
469
  }
426
470
 
427
471
  declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full", true, false];
428
472
 
429
473
  declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
430
474
 
431
- export declare const SaveButton: ({ submitting, disabled, submittingIcon, ...rest }: Props_5) => JSX.Element;
432
-
433
- export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, ...props }: SelectInputProps) => JSX.Element;
475
+ export declare const SelectInput: ({ name, defaultValue, options, label, placeholder, note, className, value, onValueChange, error, ...props }: SelectInputProps) => JSX.Element;
434
476
 
435
477
  export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir"> {
436
478
  name: string;
@@ -441,6 +483,7 @@ export declare interface SelectInputProps extends Omit<React.ComponentProps<"sel
441
483
  placeholder?: string;
442
484
  note?: string;
443
485
  className?: string;
486
+ error?: string;
444
487
  }
445
488
 
446
489
  export declare const SelectPicker: ({ options, value, placeholder, className, onSelect, renderSelected, }: SelectPickerProps) => JSX.Element;
@@ -475,7 +518,7 @@ declare function Sidebar_2({ side, variant, collapsible, className, children, ..
475
518
  collapsible?: "offcanvas" | "icon" | "none";
476
519
  }): JSX.Element;
477
520
 
478
- export declare const SidebarLayout: ({ children, ...props }: Props_6) => JSX.Element;
521
+ export declare const SidebarLayout: ({ children, ...props }: Props_5) => JSX.Element;
479
522
 
480
523
  export declare interface SidebarProps extends React.ComponentProps<typeof Sidebar_2> {
481
524
  brandContent: React.ReactNode;
@@ -507,6 +550,16 @@ declare const SIZES: readonly [...string[], "auto", "full", "min", "max", "fit",
507
550
 
508
551
  export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
509
552
 
553
+ export declare const SubmitButton: ({ submitting, disabled, submittingIcon, action, noIcon, ...rest }: SubmitButtonProps) => JSX.Element;
554
+
555
+ declare interface SubmitButtonProps extends ButtonProps {
556
+ action?: "default" | "submit" | "save" | "send";
557
+ submitting?: boolean;
558
+ disabled?: boolean;
559
+ submittingIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
560
+ noIcon?: boolean;
561
+ }
562
+
510
563
  export declare const Table: TableComponent;
511
564
 
512
565
  export declare function TableBody({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
@@ -530,13 +583,13 @@ export declare function TableHeader({ className, ...props }: React_2.ComponentPr
530
583
 
531
584
  export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
532
585
 
533
- export declare function Tabs({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Root>): JSX.Element;
586
+ export declare function Tabs({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Root>): JSX.Element;
534
587
 
535
- export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Content>): JSX.Element;
588
+ export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Content>): JSX.Element;
536
589
 
537
- export declare function TabsList({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.List>): JSX.Element;
590
+ export declare function TabsList({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.List>): JSX.Element;
538
591
 
539
- export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof TabsPrimitive.Trigger>): JSX.Element;
592
+ export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Trigger>): JSX.Element;
540
593
 
541
594
  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"];
542
595
 
@@ -553,7 +606,7 @@ declare const TEXT_TRACKINGS: readonly ["tighter", "tight", "normal", "wide", "w
553
606
 
554
607
  declare type TextAlign = (typeof TEXT_ALIGNS)[number];
555
608
 
556
- export declare function Textarea({ label, name, note, placeholder, className, ...props }: TextareaProps): JSX.Element;
609
+ export declare function Textarea({ label, name, note, placeholder, className, error, ...props }: TextareaProps): JSX.Element;
557
610
 
558
611
  export declare interface TextareaProps extends React.ComponentProps<"textarea"> {
559
612
  name: string;
@@ -561,6 +614,7 @@ export declare interface TextareaProps extends React.ComponentProps<"textarea">
561
614
  placeholder?: string;
562
615
  note?: string;
563
616
  className?: string;
617
+ error?: string;
564
618
  }
565
619
 
566
620
  declare interface TextBaseProps {
@@ -581,7 +635,7 @@ declare interface TextBaseProps {
581
635
  as?: TypographyElement;
582
636
  }
583
637
 
584
- export declare const TextInput: ({ name, type, placeholder, label, labelOrientation, note, className, ...props }: TextInputProps) => JSX.Element;
638
+ export declare const TextInput: ({ name, type, placeholder, label, labelOrientation, note, className, error, ...props }: TextInputProps) => JSX.Element;
585
639
 
586
640
  export declare interface TextInputProps extends React.ComponentProps<"input"> {
587
641
  name: string;
@@ -591,6 +645,7 @@ export declare interface TextInputProps extends React.ComponentProps<"input"> {
591
645
  labelOrientation?: "top" | "left";
592
646
  note?: string;
593
647
  className?: string;
648
+ error?: string;
594
649
  }
595
650
 
596
651
  declare type TextLeading = (typeof TEXT_LEADINGS)[number];