@still-forest/canopy 0.43.0 → 0.45.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 +47 -18
  2. package/dist/index.js +7361 -7115
  3. package/package.json +8 -7
package/dist/index.d.ts CHANGED
@@ -189,14 +189,18 @@ declare function CardTitle({ className, ...props }: React_2.ComponentProps<"div"
189
189
 
190
190
  declare type CardTitleProps = React.ComponentProps<typeof CardTitle>;
191
191
 
192
- export declare const Checkbox: ({ label, name, value, checked, onCheckedChange }: CheckboxProps) => JSX.Element;
192
+ export declare const Checkbox: ({ label, name, value, checked, onCheckedChange, note, error, labelClassName, hint, }: CheckboxProps) => JSX.Element;
193
193
 
194
194
  export declare interface CheckboxProps {
195
195
  label: string;
196
+ labelClassName?: string;
196
197
  name: string;
197
198
  value?: string;
198
199
  checked: boolean;
199
200
  onCheckedChange?: (checked: boolean) => void;
201
+ hint?: string;
202
+ note?: string;
203
+ error?: string;
200
204
  }
201
205
 
202
206
  export declare function cn(...inputs: ClassValue[]): string;
@@ -438,11 +442,21 @@ declare type Height = (typeof HEIGHTS)[number];
438
442
 
439
443
  declare const HEIGHTS: readonly [...string[], "auto", "full", "min", "max", "fit", "px", "screen"];
440
444
 
445
+ export declare const Hint: ({ content, className }: HintProps) => JSX.Element;
446
+
447
+ export declare interface HintProps {
448
+ content: string;
449
+ className?: string;
450
+ }
451
+
441
452
  export declare const Input: ({ type, step, ...props }: InputProps) => JSX.Element;
442
453
 
443
- export declare const InputError: ({ message }: {
454
+ export declare const InputError: ({ id, message }: InputErrorProps) => JSX.Element;
455
+
456
+ declare interface InputErrorProps {
457
+ id?: string;
444
458
  message: string;
445
- }) => JSX.Element;
459
+ }
446
460
 
447
461
  export declare const InputGroup: InputGroupComponent;
448
462
 
@@ -603,7 +617,7 @@ export declare const MenuItemText: ({ children }: {
603
617
  children: React.ReactNode;
604
618
  }) => JSX.Element;
605
619
 
606
- export declare const Modal: ({ trigger, children, title, description, open, onOpenChange }: Props_2) => JSX.Element;
620
+ export declare const Modal: ({ trigger, children, title, description, open, onOpenChange, ariaDescription }: Props_2) => JSX.Element;
607
621
 
608
622
  /**
609
623
  + * A specialized input component for numeric values.
@@ -618,6 +632,7 @@ export declare interface NumberInputProps extends Omit<TextInputProps, "type"> {
618
632
  declare interface Option_2 {
619
633
  value: string;
620
634
  label: string;
635
+ hint?: string;
621
636
  }
622
637
 
623
638
  declare type Overflow = (typeof OVERFLOWS)[number];
@@ -682,6 +697,7 @@ declare interface Props_2 {
682
697
  description?: string;
683
698
  open?: boolean;
684
699
  onOpenChange?: (open: boolean) => void;
700
+ ariaDescription?: string;
685
701
  }
686
702
 
687
703
  declare interface Props_3 {
@@ -699,11 +715,12 @@ declare interface Props_5 extends SidebarProps {
699
715
  children?: React.ReactNode;
700
716
  }
701
717
 
702
- export declare const RadioSelect: ({ label, name, options, value, onChange, error }: RadioSelectProps) => JSX.Element;
718
+ export declare const RadioSelect: ({ label, name, options, value, onChange, error, labelClassName }: RadioSelectProps) => JSX.Element;
703
719
 
704
720
  declare interface RadioSelectProps {
705
721
  name: string;
706
722
  label?: string;
723
+ labelClassName?: string;
707
724
  value?: string;
708
725
  options: Option_2[];
709
726
  onChange?: (value: string) => void;
@@ -714,10 +731,9 @@ declare const ROUNDED_SIZES: readonly ["none", "xs", "sm", "md", "lg", "xl", "2x
714
731
 
715
732
  declare type RoundedSize = (typeof ROUNDED_SIZES)[number];
716
733
 
717
- export declare const SelectInput: ({ name, defaultValue, options: optionsProp, label, placeholder, note, className, value, onValueChange, error, emptyOptionLabel, size, ...props }: SelectInputProps) => JSX.Element;
734
+ export declare const SelectInput: ({ name, defaultValue, options, label, labelClassName, placeholder, hint, note, className, value, onChange, error, size, id: idProp, ...props }: SelectInputProps) => JSX.Element;
718
735
 
719
736
  export declare interface SelectInputOption {
720
- icon?: string;
721
737
  value: string;
722
738
  label: string;
723
739
  }
@@ -727,39 +743,48 @@ export declare interface SelectInputOptionGroup {
727
743
  options: SelectInputOption[];
728
744
  }
729
745
 
730
- export declare interface SelectInputProps extends Omit<React.ComponentProps<"select">, "dir" | "size"> {
746
+ export declare interface SelectInputProps extends Omit<ComponentProps<"select">, "dir" | "size" | "onChange"> {
731
747
  name: string;
732
748
  value?: string;
733
- onValueChange: (value: string) => void;
749
+ onChange: (value: string) => void;
734
750
  options: SelectInputOption[] | SelectInputOptionGroup[];
735
751
  label?: string;
752
+ labelClassName?: string;
736
753
  placeholder?: string;
754
+ hint?: string;
737
755
  note?: string;
738
756
  className?: string;
739
757
  error?: string;
740
- emptyOptionLabel?: string;
741
758
  size?: "xs" | "sm" | "md" | "lg" | "xl";
742
759
  }
743
760
 
744
- export declare const SelectPicker: ({ options: optionGroups, value, placeholder, className, onSelect, renderSelected, }: SelectPickerProps) => JSX.Element;
761
+ export declare const SelectPicker: ({ options, value, placeholder, onChange, label, name, labelClassName, hint, note, error, renderSelected, }: SelectPickerProps) => JSX.Element;
745
762
 
746
763
  export declare interface SelectPickerOption {
747
764
  icon?: string;
748
- value: string;
749
765
  label: string;
766
+ value: SelectPickerOptionValue;
767
+ keywords?: string[];
750
768
  }
751
769
 
752
770
  export declare interface SelectPickerOptionGroup {
753
- label: string;
771
+ label?: string;
754
772
  options: SelectPickerOption[];
755
773
  }
756
774
 
775
+ export declare type SelectPickerOptionValue = string;
776
+
757
777
  export declare interface SelectPickerProps {
758
- options: SelectPickerOptionGroup[];
759
- onSelect: (selected: string) => void;
778
+ name: string;
760
779
  value?: string;
780
+ onChange: (value: string) => void;
781
+ options: SelectPickerOption[] | SelectPickerOptionGroup[];
782
+ label?: string;
783
+ labelClassName?: string;
761
784
  placeholder?: string;
762
- className?: string;
785
+ hint?: string;
786
+ note?: string;
787
+ error?: string;
763
788
  renderSelected?: (selected: SelectPickerOption) => React.ReactNode;
764
789
  }
765
790
 
@@ -906,12 +931,14 @@ declare const TEXT_TRACKINGS: readonly ["tighter", "tight", "normal", "wide", "w
906
931
 
907
932
  declare type TextAlign = (typeof TEXT_ALIGNS)[number];
908
933
 
909
- export declare function Textarea({ label, name, note, placeholder, className, error, ...props }: TextareaProps): JSX.Element;
934
+ export declare function Textarea({ label, name, note, placeholder, className, error, labelClassName, hint, ...props }: TextareaProps): JSX.Element;
910
935
 
911
936
  export declare interface TextareaProps extends React.ComponentProps<"textarea"> {
912
937
  name: string;
913
938
  label?: string;
939
+ labelClassName?: string;
914
940
  placeholder?: string;
941
+ hint?: string;
915
942
  note?: string;
916
943
  className?: string;
917
944
  error?: string;
@@ -937,14 +964,16 @@ declare interface TextBaseProps {
937
964
  as?: TypographyElement;
938
965
  }
939
966
 
940
- export declare const TextInput: ({ name, type, placeholder, label, labelOrientation, note, size, className, error, ...props }: TextInputProps) => JSX.Element;
967
+ export declare const TextInput: ({ name, type, placeholder, label, labelClassName, labelOrientation, hint, note, size, className, error, ...props }: TextInputProps) => JSX.Element;
941
968
 
942
969
  export declare interface TextInputProps extends Omit<React.ComponentProps<"input">, "size"> {
943
970
  name: string;
944
971
  type?: string;
945
972
  placeholder?: string;
946
973
  label?: string;
974
+ labelClassName?: string;
947
975
  labelOrientation?: "top" | "left";
976
+ hint?: string;
948
977
  note?: string;
949
978
  size?: "xs" | "sm" | "md" | "lg" | "xl";
950
979
  className?: string;