@still-forest/canopy 0.39.4 → 0.40.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/forms.d.ts CHANGED
@@ -1,15 +1,18 @@
1
+ import { ClassProp } from 'class-variance-authority/types';
1
2
  import { ComponentProps } from 'react';
2
3
  import { default as default_2 } from 'react';
3
4
  import { JSX } from 'react/jsx-runtime';
4
5
  import * as React_2 from 'react';
6
+ import { ReactNode } from 'react';
5
7
  import * as SliderPrimitive from '@radix-ui/react-slider';
6
8
  import * as SwitchPrimitive from '@radix-ui/react-switch';
9
+ import { VariantProps } from 'class-variance-authority';
7
10
 
8
11
  export declare type BaseButtonSize = "xs" | "sm" | "md" | "lg" | "xl" | "icon" | "unstyled";
9
12
 
10
13
  export declare type BaseButtonVariant = "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "unstyled";
11
14
 
12
- export declare const Button: ({ label, children, onClick, variant, size, icon, disabled, className, type, asChild, full, fit, ...rest }: ButtonProps) => JSX.Element;
15
+ export declare const Button: ({ label, children, onClick, variant, size, icon, asIcon, disabled, className, type, asChild, full, fit, rounded, ...rest }: ButtonProps) => JSX.Element;
13
16
 
14
17
  export declare const ButtonGroup: {
15
18
  ({ children, className }: ButtonGroupProps): JSX.Element;
@@ -28,12 +31,14 @@ export declare interface ButtonProps extends default_2.ComponentProps<"button">
28
31
  variant?: "default" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "unstyled" | "subtle";
29
32
  size?: "default" | "xs" | "sm" | "md" | "lg" | "xl";
30
33
  icon?: default_2.ReactElement;
34
+ asIcon?: boolean;
31
35
  disabled?: boolean;
32
36
  className?: string;
33
37
  type?: "button" | "submit" | "reset";
34
38
  fit?: boolean;
35
39
  full?: boolean;
36
40
  asChild?: boolean;
41
+ rounded?: boolean;
37
42
  }
38
43
 
39
44
  export declare const Checkbox: ({ label, name, value, checked, onCheckedChange }: CheckboxProps) => JSX.Element;
@@ -69,18 +74,57 @@ declare interface DatePickerProps {
69
74
 
70
75
  export declare const DeleteButton: ({ disabled, handleDelete, ...rest }: Props) => JSX.Element;
71
76
 
77
+ export declare const Input: ({ type, step, ...props }: InputProps) => JSX.Element;
78
+
72
79
  export declare const InputError: ({ message }: {
73
80
  message: string;
74
81
  }) => JSX.Element;
75
82
 
76
- export declare const InputGroup: ({ label, labelFor, className, labelClassName, children }: InputGroupProps) => JSX.Element;
83
+ export declare const InputGroup: InputGroupComponent;
84
+
85
+ declare function InputGroup_2({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
86
+
87
+ declare function InputGroupAddon({ className, align, ...props }: React_2.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): JSX.Element;
88
+
89
+ declare interface InputGroupAddonProps extends React.ComponentProps<typeof InputGroupAddon> {
90
+ right?: boolean;
91
+ }
92
+
93
+ declare const inputGroupAddonVariants: (props?: ({
94
+ align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
95
+ } & ClassProp) | undefined) => string;
77
96
 
78
- declare interface InputGroupProps {
97
+ declare type InputGroupComponent = React.FC<InputGroupProps> & {
98
+ Input: React.FC<InputProps>;
99
+ Addon: React.FC<InputGroupAddonProps>;
100
+ Button: React.FC<ButtonProps>;
101
+ Text: React.FC<InputGroupTextProps>;
102
+ Textarea: React.FC<InputGroupTextareaProps>;
103
+ };
104
+
105
+ export declare type InputGroupProps = React.ComponentProps<typeof InputGroup_2> & {
106
+ children: ReactNode;
107
+ };
108
+
109
+ declare interface InputGroupProps_2 {
79
110
  label?: string;
80
111
  labelFor?: string;
81
112
  className?: string;
82
113
  labelClassName?: string;
83
- children: React.ReactNode;
114
+ children: ReactNode;
115
+ }
116
+
117
+ declare function InputGroupText({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
118
+
119
+ declare const InputGroupTextarea: ({ className, ...props }: TextareaProps) => JSX.Element;
120
+
121
+ declare type InputGroupTextareaProps = React.ComponentProps<typeof InputGroupTextarea>;
122
+
123
+ declare type InputGroupTextProps = React.ComponentProps<typeof InputGroupText>;
124
+
125
+ export declare interface InputProps extends TextInputProps {
126
+ type?: "text" | "number" | "date" | "email" | "password";
127
+ step?: string;
84
128
  }
85
129
 
86
130
  export declare const Label: ({ htmlFor, value, children, size, className, ...props }: LabelProps) => JSX.Element;
@@ -93,6 +137,8 @@ export declare interface LabelProps extends ComponentProps<"label"> {
93
137
  className?: string;
94
138
  }
95
139
 
140
+ export declare const LegacyInputGroup: ({ label, labelFor, className, labelClassName, children, }: InputGroupProps_2) => JSX.Element;
141
+
96
142
  /**
97
143
  + * A specialized input component for numeric values.
98
144
  + * Extends TextInput with number-specific functionality.
@@ -114,6 +160,11 @@ declare interface Option_3 {
114
160
  label: string;
115
161
  }
116
162
 
163
+ export declare const PasswordInput: ({ name, size, label, labelOrientation, note, error, ...props }: PasswordInputProps) => JSX.Element;
164
+
165
+ declare interface PasswordInputProps extends Omit<InputProps, "type"> {
166
+ }
167
+
117
168
  declare interface Props extends ButtonProps {
118
169
  disabled?: boolean;
119
170
  handleDelete: () => void;
package/dist/forms.js CHANGED
@@ -1,23 +1,26 @@
1
- import { B as e, a as s } from "./chunks/calendar-C-nHBQQ8.js";
2
- import { C as u, a as r, b as n, c as p, D as c, I as i, d as I, L as S, N as l, R as B, e as b, f as x, g as m, S as D, h as d, i as f, T as h } from "./chunks/Textarea-BnxULR0R.js";
1
+ import { B as e, a as s, D as u, I as o, b as r, c as p, L as n, N as c, d as I, T as S } from "./chunks/sidebar-BNz0YKgO.js";
2
+ import { C as i, a as l, b as B, D as d, L as x, P as D, R as m, c as L, d as P, e as f, S as k, f as C } from "./chunks/Switch-C6ICR4ht.js";
3
3
  export {
4
4
  e as Button,
5
5
  s as ButtonGroup,
6
- u as Checkbox,
7
- r as CopyButton,
8
- n as DateInput,
9
- p as DatePicker,
10
- c as DeleteButton,
11
- i as InputError,
12
- I as InputGroup,
13
- S as Label,
14
- l as NumberInput,
15
- B as RadioSelect,
16
- b as SelectInput,
17
- x as SelectPicker,
18
- m as Slider,
19
- D as SubmitButton,
20
- d as Switch,
21
- f as TextInput,
22
- h as Textarea
6
+ i as Checkbox,
7
+ l as CopyButton,
8
+ u as DateInput,
9
+ B as DatePicker,
10
+ d as DeleteButton,
11
+ o as Input,
12
+ r as InputError,
13
+ p as InputGroup,
14
+ n as Label,
15
+ x as LegacyInputGroup,
16
+ c as NumberInput,
17
+ D as PasswordInput,
18
+ m as RadioSelect,
19
+ L as SelectInput,
20
+ P as SelectPicker,
21
+ f as Slider,
22
+ k as SubmitButton,
23
+ C as Switch,
24
+ I as TextInput,
25
+ S as Textarea
23
26
  };
package/dist/index.d.ts CHANGED
@@ -98,7 +98,7 @@ export declare interface BreadcrumbType {
98
98
  to?: string;
99
99
  }
100
100
 
101
- export declare const Button: ({ label, children, onClick, variant, size, icon, disabled, className, type, asChild, full, fit, ...rest }: ButtonProps) => JSX.Element;
101
+ export declare const Button: ({ label, children, onClick, variant, size, icon, asIcon, disabled, className, type, asChild, full, fit, rounded, ...rest }: ButtonProps) => JSX.Element;
102
102
 
103
103
  declare function Button_2({ className, variant, size, asChild, ...props }: React_2.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
104
104
  asChild?: boolean;
@@ -121,12 +121,14 @@ export declare interface ButtonProps extends default_2.ComponentProps<"button">
121
121
  variant?: "default" | "primary" | "secondary" | "destructive" | "outline" | "ghost" | "link" | "unstyled" | "subtle";
122
122
  size?: "default" | "xs" | "sm" | "md" | "lg" | "xl";
123
123
  icon?: default_2.ReactElement;
124
+ asIcon?: boolean;
124
125
  disabled?: boolean;
125
126
  className?: string;
126
127
  type?: "button" | "submit" | "reset";
127
128
  fit?: boolean;
128
129
  full?: boolean;
129
130
  asChild?: boolean;
131
+ rounded?: boolean;
130
132
  }
131
133
 
132
134
  declare const buttonVariants: (props?: ({
@@ -284,18 +286,16 @@ export declare type EmptyProps = React.ComponentProps<typeof Empty_2> & {
284
286
 
285
287
  declare type EmptyTitleProps = React.ComponentProps<typeof Heading>;
286
288
 
287
- export declare const ErrorFallback: ({ error, onRetry }: ErrorFallbackProps) => JSX.Element;
289
+ export declare const ErrorFallback: ({ error, onRetry, ...props }: ErrorFallbackProps) => JSX.Element;
288
290
 
289
- declare interface ErrorFallbackProps {
291
+ declare interface ErrorFallbackProps extends ErrorOverlayProps {
290
292
  error: Error;
291
293
  onRetry?: () => void;
292
294
  }
293
295
 
294
- export declare const ErrorOverlay: ({ message, children }: ErrorOverlayProps) => JSX.Element;
296
+ export declare const ErrorOverlay: ({ message, children, ...props }: ErrorOverlayProps) => JSX.Element;
295
297
 
296
- declare interface ErrorOverlayProps {
297
- message?: string;
298
- children?: React.ReactNode;
298
+ export declare interface ErrorOverlayProps extends InterstitialProps {
299
299
  }
300
300
 
301
301
  export declare const Flex: typeof FlexComponent & {
@@ -426,21 +426,60 @@ declare type Height = (typeof HEIGHTS)[number];
426
426
 
427
427
  declare const HEIGHTS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "screen"];
428
428
 
429
+ export declare const Input: ({ type, step, ...props }: InputProps) => JSX.Element;
430
+
429
431
  export declare const InputError: ({ message }: {
430
432
  message: string;
431
433
  }) => JSX.Element;
432
434
 
433
- export declare const InputGroup: ({ label, labelFor, className, labelClassName, children }: InputGroupProps) => JSX.Element;
435
+ export declare const InputGroup: InputGroupComponent;
436
+
437
+ declare function InputGroup_2({ className, ...props }: React_2.ComponentProps<"div">): JSX.Element;
438
+
439
+ declare function InputGroupAddon({ className, align, ...props }: React_2.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): JSX.Element;
440
+
441
+ declare interface InputGroupAddonProps extends React.ComponentProps<typeof InputGroupAddon> {
442
+ right?: boolean;
443
+ }
444
+
445
+ declare const inputGroupAddonVariants: (props?: ({
446
+ align?: "block-end" | "block-start" | "inline-end" | "inline-start" | null | undefined;
447
+ } & ClassProp) | undefined) => string;
448
+
449
+ declare type InputGroupComponent = React.FC<InputGroupProps> & {
450
+ Input: React.FC<InputProps>;
451
+ Addon: React.FC<InputGroupAddonProps>;
452
+ Button: React.FC<ButtonProps>;
453
+ Text: React.FC<InputGroupTextProps>;
454
+ Textarea: React.FC<InputGroupTextareaProps>;
455
+ };
456
+
457
+ export declare type InputGroupProps = React.ComponentProps<typeof InputGroup_2> & {
458
+ children: ReactNode;
459
+ };
434
460
 
435
- declare interface InputGroupProps {
461
+ declare interface InputGroupProps_2 {
436
462
  label?: string;
437
463
  labelFor?: string;
438
464
  className?: string;
439
465
  labelClassName?: string;
440
- children: React.ReactNode;
466
+ children: ReactNode;
441
467
  }
442
468
 
443
- export declare const Interstitial: ({ variant, iconComponent, message, children, iconSize, iconClassName, }: InterstitialProps) => JSX.Element;
469
+ declare function InputGroupText({ className, ...props }: React_2.ComponentProps<"span">): JSX.Element;
470
+
471
+ declare const InputGroupTextarea: ({ className, ...props }: TextareaProps) => JSX.Element;
472
+
473
+ declare type InputGroupTextareaProps = React.ComponentProps<typeof InputGroupTextarea>;
474
+
475
+ declare type InputGroupTextProps = React.ComponentProps<typeof InputGroupText>;
476
+
477
+ export declare interface InputProps extends TextInputProps {
478
+ type?: "text" | "number" | "date" | "email" | "password";
479
+ step?: string;
480
+ }
481
+
482
+ export declare const Interstitial: ({ variant, iconComponent, message, children, iconSize, iconClassName, fullScreen, containerClassName, }: InterstitialProps) => JSX.Element;
444
483
 
445
484
  export declare interface InterstitialProps {
446
485
  variant?: "error" | "info" | "success" | "warning";
@@ -449,6 +488,8 @@ export declare interface InterstitialProps {
449
488
  iconSize?: LoaderProps["size"];
450
489
  iconClassName?: string;
451
490
  children?: default_2.ReactNode;
491
+ fullScreen?: boolean;
492
+ containerClassName?: string;
452
493
  }
453
494
 
454
495
  export declare const Item: ItemComponent;
@@ -536,6 +577,8 @@ declare interface LayoutProps extends FlexProps {
536
577
 
537
578
  declare type LayoutVariant = (typeof LAYOUT_VARIANTS)[number];
538
579
 
580
+ export declare const LegacyInputGroup: ({ label, labelFor, className, labelClassName, children, }: InputGroupProps_2) => JSX.Element;
581
+
539
582
  export declare const Loader: ({ variant, icon, size, className, ...props }: LoaderProps) => JSX.Element;
540
583
 
541
584
  export declare interface LoaderProps extends React.ComponentProps<"svg"> {
@@ -575,21 +618,14 @@ declare type Overflow = (typeof OVERFLOWS)[number];
575
618
 
576
619
  declare const OVERFLOWS: readonly ["auto", "scroll", "hidden", "clip", "visible"];
577
620
 
578
- export declare const PageLoader: ({ iconComponent, message, containerClassName, iconSize, fullScreen, iconClassName, }: PageLoaderProps) => JSX.Element;
621
+ export declare const PageLoader: ({ iconComponent, message, iconSize, iconClassName, ...props }: PageLoaderProps) => JSX.Element;
579
622
 
580
- declare interface PageLoaderProps {
581
- iconComponent?: React.ElementType;
582
- message?: string;
583
- containerClassName?: string;
584
- iconSize?: LoaderProps["size"];
585
- fullScreen?: boolean;
586
- iconClassName?: string;
623
+ declare interface PageLoaderProps extends InterstitialProps {
587
624
  }
588
625
 
589
- export declare const PageNotFound: ({ onBack, message, backIcon, backLabel, }: PageNotFoundProps) => JSX.Element;
626
+ export declare const PageNotFound: ({ onBack, message, backIcon, backLabel, ...props }: PageNotFoundProps) => JSX.Element;
590
627
 
591
- declare interface PageNotFoundProps {
592
- message?: string;
628
+ declare interface PageNotFoundProps extends InterstitialProps {
593
629
  backIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
594
630
  backLabel?: string;
595
631
  onBack?: () => void;
@@ -599,6 +635,11 @@ export declare const Pagination: ({ pageCount, currentPage, onChange }: Props_3)
599
635
 
600
636
  export declare const Paragraph: ({ children, className, as, ...props }: TextProps) => JSX.Element;
601
637
 
638
+ export declare const PasswordInput: ({ name, size, label, labelOrientation, note, error, ...props }: PasswordInputProps) => JSX.Element;
639
+
640
+ declare interface PasswordInputProps extends Omit<InputProps, "type"> {
641
+ }
642
+
602
643
  export declare const Popover: PopoverComponent;
603
644
 
604
645
  declare function Popover_2({ ...props }: React_2.ComponentProps<typeof PopoverPrimitive.Root>): JSX.Element;