@still-forest/canopy 0.20.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 +109 -29
- package/dist/index.js +13112 -12952
- package/dist/index.js.map +1 -1
- package/package.json +25 -40
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,15 +339,27 @@ 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 }: {
|
|
325
359
|
children: React.ReactNode;
|
|
326
360
|
}) => JSX.Element;
|
|
327
361
|
|
|
328
|
-
export declare const Modal: ({ trigger, children, title, description }: Props_2) => JSX.Element;
|
|
362
|
+
export declare const Modal: ({ trigger, children, title, description, open, onOpenChange }: Props_2) => JSX.Element;
|
|
329
363
|
|
|
330
364
|
/**
|
|
331
365
|
+ * A specialized input component for numeric values.
|
|
@@ -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"];
|
|
@@ -385,10 +434,12 @@ declare interface Props {
|
|
|
385
434
|
}
|
|
386
435
|
|
|
387
436
|
declare interface Props_2 {
|
|
388
|
-
trigger: React.ReactNode;
|
|
389
437
|
children: React.ReactNode;
|
|
438
|
+
trigger?: React.ReactNode;
|
|
390
439
|
title?: string;
|
|
391
440
|
description?: string;
|
|
441
|
+
open?: boolean;
|
|
442
|
+
onOpenChange?: (open: boolean) => void;
|
|
392
443
|
}
|
|
393
444
|
|
|
394
445
|
declare interface Props_3 {
|
|
@@ -402,17 +453,11 @@ declare interface Props_4 extends ButtonProps {
|
|
|
402
453
|
handleDelete: () => void;
|
|
403
454
|
}
|
|
404
455
|
|
|
405
|
-
declare interface Props_5 extends
|
|
406
|
-
submitting?: boolean;
|
|
407
|
-
disabled?: boolean;
|
|
408
|
-
submittingIcon?: React.ComponentType<React.SVGProps<SVGSVGElement>>;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
declare interface Props_6 extends SidebarProps {
|
|
456
|
+
declare interface Props_5 extends SidebarProps {
|
|
412
457
|
children?: React.ReactNode;
|
|
413
458
|
}
|
|
414
459
|
|
|
415
|
-
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;
|
|
416
461
|
|
|
417
462
|
declare interface RadioSelectProps {
|
|
418
463
|
name: string;
|
|
@@ -420,15 +465,14 @@ declare interface RadioSelectProps {
|
|
|
420
465
|
value?: string;
|
|
421
466
|
options: Option_3[];
|
|
422
467
|
onChange?: (value: string) => void;
|
|
468
|
+
error?: string;
|
|
423
469
|
}
|
|
424
470
|
|
|
425
471
|
declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2xl", "3xl", "full", true, false];
|
|
426
472
|
|
|
427
473
|
declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
|
|
428
474
|
|
|
429
|
-
export declare const
|
|
430
|
-
|
|
431
|
-
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;
|
|
432
476
|
|
|
433
477
|
export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir"> {
|
|
434
478
|
name: string;
|
|
@@ -439,6 +483,7 @@ export declare interface SelectInputProps extends Omit<React.ComponentProps<"sel
|
|
|
439
483
|
placeholder?: string;
|
|
440
484
|
note?: string;
|
|
441
485
|
className?: string;
|
|
486
|
+
error?: string;
|
|
442
487
|
}
|
|
443
488
|
|
|
444
489
|
export declare const SelectPicker: ({ options, value, placeholder, className, onSelect, renderSelected, }: SelectPickerProps) => JSX.Element;
|
|
@@ -473,7 +518,7 @@ declare function Sidebar_2({ side, variant, collapsible, className, children, ..
|
|
|
473
518
|
collapsible?: "offcanvas" | "icon" | "none";
|
|
474
519
|
}): JSX.Element;
|
|
475
520
|
|
|
476
|
-
export declare const SidebarLayout: ({ children, ...props }:
|
|
521
|
+
export declare const SidebarLayout: ({ children, ...props }: Props_5) => JSX.Element;
|
|
477
522
|
|
|
478
523
|
export declare interface SidebarProps extends React.ComponentProps<typeof Sidebar_2> {
|
|
479
524
|
brandContent: React.ReactNode;
|
|
@@ -505,13 +550,46 @@ declare const SIZES: readonly [...string[], "auto", "full", "min", "max", "fit",
|
|
|
505
550
|
|
|
506
551
|
export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
507
552
|
|
|
508
|
-
export declare
|
|
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
|
+
|
|
563
|
+
export declare const Table: TableComponent;
|
|
564
|
+
|
|
565
|
+
export declare function TableBody({ className, ...props }: React_2.ComponentProps<"tbody">): JSX.Element;
|
|
566
|
+
|
|
567
|
+
export declare function TableCaption({ className, ...props }: React_2.ComponentProps<"caption">): JSX.Element;
|
|
568
|
+
|
|
569
|
+
export declare function TableCell({ className, ...props }: React_2.ComponentProps<"td">): JSX.Element;
|
|
570
|
+
|
|
571
|
+
declare type TableComponent = React_2.FC<React_2.ComponentProps<"table">> & {
|
|
572
|
+
Body: typeof TableBody;
|
|
573
|
+
Caption: typeof TableCaption;
|
|
574
|
+
Cell: typeof TableCell;
|
|
575
|
+
Head: typeof TableHead;
|
|
576
|
+
Header: typeof TableHeader;
|
|
577
|
+
Row: typeof TableRow;
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
export declare function TableHead({ className, ...props }: React_2.ComponentProps<"th">): JSX.Element;
|
|
581
|
+
|
|
582
|
+
export declare function TableHeader({ className, ...props }: React_2.ComponentProps<"thead">): JSX.Element;
|
|
583
|
+
|
|
584
|
+
export declare function TableRow({ className, ...props }: React_2.ComponentProps<"tr">): JSX.Element;
|
|
585
|
+
|
|
586
|
+
export declare function Tabs({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Root>): JSX.Element;
|
|
509
587
|
|
|
510
|
-
export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof
|
|
588
|
+
export declare function TabsContent({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Content>): JSX.Element;
|
|
511
589
|
|
|
512
|
-
export declare function TabsList({ className, ...props }: React_2.ComponentProps<typeof
|
|
590
|
+
export declare function TabsList({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.List>): JSX.Element;
|
|
513
591
|
|
|
514
|
-
export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof
|
|
592
|
+
export declare function TabsTrigger({ className, ...props }: React_2.ComponentProps<typeof Tabs_2.Trigger>): JSX.Element;
|
|
515
593
|
|
|
516
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"];
|
|
517
595
|
|
|
@@ -528,7 +606,7 @@ declare const TEXT_TRACKINGS: readonly ["tighter", "tight", "normal", "wide", "w
|
|
|
528
606
|
|
|
529
607
|
declare type TextAlign = (typeof TEXT_ALIGNS)[number];
|
|
530
608
|
|
|
531
|
-
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;
|
|
532
610
|
|
|
533
611
|
export declare interface TextareaProps extends React.ComponentProps<"textarea"> {
|
|
534
612
|
name: string;
|
|
@@ -536,6 +614,7 @@ export declare interface TextareaProps extends React.ComponentProps<"textarea">
|
|
|
536
614
|
placeholder?: string;
|
|
537
615
|
note?: string;
|
|
538
616
|
className?: string;
|
|
617
|
+
error?: string;
|
|
539
618
|
}
|
|
540
619
|
|
|
541
620
|
declare interface TextBaseProps {
|
|
@@ -556,7 +635,7 @@ declare interface TextBaseProps {
|
|
|
556
635
|
as?: TypographyElement;
|
|
557
636
|
}
|
|
558
637
|
|
|
559
|
-
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;
|
|
560
639
|
|
|
561
640
|
export declare interface TextInputProps extends React.ComponentProps<"input"> {
|
|
562
641
|
name: string;
|
|
@@ -566,6 +645,7 @@ export declare interface TextInputProps extends React.ComponentProps<"input"> {
|
|
|
566
645
|
labelOrientation?: "top" | "left";
|
|
567
646
|
note?: string;
|
|
568
647
|
className?: string;
|
|
648
|
+
error?: string;
|
|
569
649
|
}
|
|
570
650
|
|
|
571
651
|
declare type TextLeading = (typeof TEXT_LEADINGS)[number];
|