@takecasper/acuity-design-system 1.5.2 → 1.6.1

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,6 +1,6 @@
1
1
  import { ClassProp } from 'class-variance-authority/types';
2
2
  import { JSX as JSX_2 } from 'react/jsx-runtime';
3
- import { ReactNode } from 'react';
3
+ import { default as React_2 } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
 
6
6
  export declare const Alert: ({ variant, isDismissible, showIcon, titleSize, title, description, content, closeAriaLabel, id, handleClose }: AlertProps) => JSX_2.Element;
@@ -18,17 +18,20 @@ declare type AlertProps = {
18
18
  handleClose?: () => void;
19
19
  };
20
20
 
21
- export declare const Button: ({ type, variant, disabled, className, handleClick, label, children }: ButtonProps) => JSX_2.Element;
21
+ export declare const Button: React_2.FC<ButtonProps>;
22
22
 
23
- declare type ButtonProps = {
24
- type: 'button' | 'submit';
25
- variant: 'primary' | 'secondary' | 'danger' | 'outline';
26
- disabled: boolean;
27
- className: string;
28
- handleClick: React.MouseEventHandler<HTMLButtonElement>;
29
- label: string;
30
- children: React.ReactNode;
31
- };
23
+ declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
24
+ variant?: 'primary' | 'secondary' | 'danger' | 'inline' | 'icon' | 'icon-no-label';
25
+ text?: string;
26
+ label?: string;
27
+ disabled?: boolean;
28
+ className?: string;
29
+ onClick: React_2.MouseEventHandler<HTMLButtonElement>;
30
+ iconName?: IconNames | undefined;
31
+ leadingIcon?: boolean;
32
+ trailingIcon?: boolean;
33
+ iconIndicator?: boolean;
34
+ }
32
35
 
33
36
  export declare const Card: ({ bodyContent, iconName, title, footerContent }: CardProps) => JSX_2.Element;
34
37
 
@@ -53,10 +56,10 @@ declare interface HeadingProps extends VariantProps<typeof headingVariants> {
53
56
  }
54
57
 
55
58
  declare const headingVariants: (props?: ({
56
- size?: "large" | "medium" | "small" | "extra-large" | null | undefined;
59
+ size?: "small" | "medium" | "large" | "extra-large" | null | undefined;
57
60
  } & ClassProp) | undefined) => string;
58
61
 
59
- export declare const Icon: ({ size, name, hasIndicator, className, altText }: IconProps) => ReactNode;
62
+ export declare const Icon: ({ size, name, hasIndicator, className, altText }: IconProps) => JSX_2.Element;
60
63
 
61
64
  declare type IconNames = 'settings' | 'questionCircle' | 'notifications' | 'flag' | 'edit' | 'delete' | 'resourceCenter' | 'search' | 'error' | 'warning' | 'dropdown' | 'calendar' | 'bookmark' | 'infoCircle' | 'menu' | 'add' | 'exclude' | 'email' | 'close' | 'checkCircle' | 'linkNewTab';
62
65
 
@@ -65,9 +68,9 @@ declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'book
65
68
  declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
66
69
  size: 'small' | 'medium';
67
70
  name: IconNames | IconNamesWithIndicator;
68
- hasIndicator: boolean;
69
- className: string;
70
- altText: string;
71
+ hasIndicator?: boolean;
72
+ className?: string;
73
+ altText?: string;
71
74
  }
72
75
 
73
76
  export declare const Radio: ({ label, name, id, disabled, handleChange, ...props }: RadioProps) => JSX_2.Element;