@takecasper/acuity-design-system 1.17.1 → 1.19.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
@@ -18,7 +18,7 @@ declare type AlertProps = {
18
18
  id?: string;
19
19
  content?: React.ReactNode;
20
20
  closeAriaLabel?: string;
21
- handleClose?: () => void;
21
+ handleClose?: React.MouseEventHandler<HTMLButtonElement | HTMLInputElement>;
22
22
  };
23
23
 
24
24
  export declare const Badge: ({ label, type, color, dismissible, dismissLabel, className, onDismiss, ...props }: BadgeProps) => JSX_2.Element;
@@ -36,18 +36,20 @@ declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
36
36
  export declare const Button: React_2.FC<ButtonProps>;
37
37
 
38
38
  declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
39
- variant?: 'primary' | 'secondary' | 'danger' | 'inline' | 'icon' | 'icon-no-label';
39
+ variant?: ButtonVariant;
40
40
  text?: string;
41
41
  label?: string;
42
42
  disabled?: boolean;
43
43
  className?: string;
44
- onClick: React_2.MouseEventHandler<HTMLButtonElement>;
44
+ onClick: React_2.MouseEventHandler<HTMLButtonElement | HTMLInputElement>;
45
45
  iconName?: IconNames | undefined;
46
46
  leadingIcon?: boolean;
47
47
  trailingIcon?: boolean;
48
48
  iconIndicator?: boolean;
49
49
  }
50
50
 
51
+ declare type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'inline';
52
+
51
53
  export declare const Card: ({ content, iconName, title, footer, className, ...props }: CardProps) => JSX_2.Element;
52
54
 
53
55
  declare interface CardProps {
@@ -65,7 +67,7 @@ declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputEleme
65
67
  label?: string;
66
68
  indeterminate?: boolean;
67
69
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
68
- onClick?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
70
+ onClick?: (e: React.MouseEvent<HTMLInputElement | HTMLButtonElement, MouseEvent>) => void;
69
71
  }
70
72
 
71
73
  export declare const Heading: ({ size, className, text, descriptionTop, descriptionBottom, hasHorizontalRule, hasMarginBottom, headingTag, ...props }: HeadingProps) => JSX_2.Element;
@@ -83,11 +85,27 @@ declare interface HeadingProps extends VariantProps<typeof headingVariants> {
83
85
  }
84
86
 
85
87
  declare const headingVariants: (props?: ({
86
- size?: "large" | "small" | "medium" | "extra-large" | null | undefined;
88
+ size?: "small" | "medium" | "large" | "extra-large" | null | undefined;
87
89
  } & ClassProp) | undefined) => string;
88
90
 
89
91
  export declare const Icon: ({ size, name, hasIndicator, className, altText, role }: IconProps) => JSX.Element;
90
92
 
93
+ export declare const IconButton: React_2.FC<IconButtonProps>;
94
+
95
+ declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
96
+ variant: 'default' | 'small';
97
+ iconName: IconNames;
98
+ iconSize?: 'small' | 'medium';
99
+ label?: string;
100
+ disabled: boolean;
101
+ className?: string;
102
+ onClick: React_2.MouseEventHandler<HTMLButtonElement | HTMLInputElement>;
103
+ hasIndicator?: boolean;
104
+ hasTooltip?: boolean;
105
+ iconColor?: string;
106
+ isTransparent?: boolean;
107
+ }
108
+
91
109
  declare type IconNames = 'settings' | 'questionCircle' | 'notifications' | 'flag' | 'edit' | 'delete' | 'resourceCenter' | 'search' | 'error' | 'warning' | 'dropdown' | 'calendar' | 'bookmark' | 'infoCircle' | 'menu' | 'add' | 'exclude' | 'email' | 'close' | 'checkCircle' | 'linkNewTab';
92
110
 
93
111
  declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'bookmark';
@@ -147,7 +165,7 @@ declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>
147
165
  name: string;
148
166
  id: string;
149
167
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
150
- onClick?: (e: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
168
+ onClick?: (e: React.MouseEvent<HTMLInputElement | HTMLButtonElement, MouseEvent>) => void;
151
169
  }
152
170
 
153
171
  export declare const TextInput: ({ id, state, disabled, type, label, optionalityLabel, helpText, message, ...props }: TextInputProps) => JSX_2.Element;