@takecasper/acuity-design-system 1.19.0 → 1.21.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
@@ -8,7 +8,7 @@ import { VariantProps } from 'class-variance-authority';
8
8
 
9
9
  export declare const Alert: ({ variant, isDismissible, showIcon, titleSize, title, description, content, closeAriaLabel, id, handleClose, ...props }: AlertProps) => JSX_2.Element;
10
10
 
11
- declare type AlertProps = {
11
+ export declare type AlertProps = {
12
12
  variant: 'success' | 'info' | 'warning' | 'error';
13
13
  isDismissible?: boolean;
14
14
  showIcon?: boolean;
@@ -23,7 +23,7 @@ declare type AlertProps = {
23
23
 
24
24
  export declare const Badge: ({ label, type, color, dismissible, dismissLabel, className, onDismiss, ...props }: BadgeProps) => JSX_2.Element;
25
25
 
26
- declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
26
+ export declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
27
27
  label: string;
28
28
  color?: 'default' | 'gray' | 'blue' | 'green' | 'yellow' | 'red';
29
29
  type?: 'regular' | 'small';
@@ -35,7 +35,7 @@ declare interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
35
35
 
36
36
  export declare const Button: React_2.FC<ButtonProps>;
37
37
 
38
- declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
38
+ export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
39
39
  variant?: ButtonVariant;
40
40
  text?: string;
41
41
  label?: string;
@@ -48,11 +48,11 @@ declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonEle
48
48
  iconIndicator?: boolean;
49
49
  }
50
50
 
51
- declare type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'inline';
51
+ export declare type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'inline';
52
52
 
53
53
  export declare const Card: ({ content, iconName, title, footer, className, ...props }: CardProps) => JSX_2.Element;
54
54
 
55
- declare interface CardProps {
55
+ export declare interface CardProps {
56
56
  iconName?: IconNames;
57
57
  title?: string;
58
58
  content?: React.ReactNode;
@@ -62,7 +62,7 @@ declare interface CardProps {
62
62
 
63
63
  export declare const Checkbox: ({ id, label, name, checked, disabled, indeterminate, onChange, onClick, ...props }: CheckboxProps) => JSX_2.Element;
64
64
 
65
- declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
65
+ export declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
66
66
  id: string;
67
67
  label?: string;
68
68
  indeterminate?: boolean;
@@ -70,9 +70,27 @@ declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputEleme
70
70
  onClick?: (e: React.MouseEvent<HTMLInputElement | HTMLButtonElement, MouseEvent>) => void;
71
71
  }
72
72
 
73
+ export declare const Dropdown: ({ id, state, disabled, label, optionalityLabel, helpText, message, ...props }: DropdownProps) => JSX_2.Element;
74
+
75
+ export declare const DropdownAtom: ({ state, disabled, className, ...props }: DropdownAtomProps) => JSX_2.Element;
76
+
77
+ export declare interface DropdownAtomProps extends React_2.SelectHTMLAttributes<HTMLSelectElement> {
78
+ state?: InputState;
79
+ }
80
+
81
+ export declare interface DropdownProps extends React.InputHTMLAttributes<HTMLSelectElement> {
82
+ id: string;
83
+ state?: InputState;
84
+ label: string;
85
+ optionalityLabel?: string;
86
+ helpText?: string[];
87
+ onChange?: (e: React.ChangeEvent<HTMLSelectElement>) => void;
88
+ message?: string;
89
+ }
90
+
73
91
  export declare const Heading: ({ size, className, text, descriptionTop, descriptionBottom, hasHorizontalRule, hasMarginBottom, headingTag, ...props }: HeadingProps) => JSX_2.Element;
74
92
 
75
- declare interface HeadingProps extends VariantProps<typeof headingVariants> {
93
+ export declare interface HeadingProps extends VariantProps<typeof headingVariants> {
76
94
  size?: 'small' | 'medium' | 'large' | 'extra-large';
77
95
  text?: string;
78
96
  descriptionTop?: string;
@@ -92,7 +110,7 @@ export declare const Icon: ({ size, name, hasIndicator, className, altText, role
92
110
 
93
111
  export declare const IconButton: React_2.FC<IconButtonProps>;
94
112
 
95
- declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
113
+ export declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
96
114
  variant: 'default' | 'small';
97
115
  iconName: IconNames;
98
116
  iconSize?: 'small' | 'medium';
@@ -108,9 +126,9 @@ declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButto
108
126
 
109
127
  declare type IconNames = 'settings' | 'questionCircle' | 'notifications' | 'flag' | 'edit' | 'delete' | 'resourceCenter' | 'search' | 'error' | 'warning' | 'dropdown' | 'calendar' | 'bookmark' | 'infoCircle' | 'menu' | 'add' | 'exclude' | 'email' | 'close' | 'checkCircle' | 'linkNewTab';
110
128
 
111
- declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'bookmark';
129
+ export declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'bookmark';
112
130
 
113
- declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
131
+ export declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
114
132
  size: 'small' | 'medium';
115
133
  name: IconNames | IconNamesWithIndicator;
116
134
  hasIndicator?: boolean;
@@ -121,11 +139,12 @@ declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
121
139
 
122
140
  declare type IconRole = 'graphics-document' | 'img' | 'graphics-symbol' | undefined;
123
141
 
124
- declare type InputState = 'default' | 'error' | 'success';
142
+ export declare type InputState = 'default' | 'error' | 'success';
125
143
 
126
- export declare const LabelAtom: ({ state, disabled, htmlFor, value, optionalityLabel }: LabelAtomProps) => JSX_2.Element;
144
+ export declare const LabelAtom: ({ id, state, disabled, htmlFor, value, optionalityLabel }: LabelAtomProps) => JSX_2.Element;
127
145
 
128
- declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
146
+ export declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
147
+ id?: string;
129
148
  state?: 'default' | 'error' | 'success';
130
149
  disabled?: boolean;
131
150
  htmlFor: string;
@@ -135,7 +154,7 @@ declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElem
135
154
 
136
155
  export declare const Link: React_2.FC<LinkProps>;
137
156
 
138
- declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
157
+ export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
139
158
  text: string;
140
159
  href: string;
141
160
  type?: 'default' | 'inline';
@@ -144,7 +163,7 @@ declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
144
163
 
145
164
  export declare const Modal: ({ open, onClose, title, backdrop, content, footer, icon, iconComponent, iconName, dismissible, horizontalRule }: ModalProps) => JSX_2.Element;
146
165
 
147
- declare interface ModalProps {
166
+ export declare interface ModalProps {
148
167
  open: boolean;
149
168
  onClose: () => void;
150
169
  title: string;
@@ -160,7 +179,7 @@ declare interface ModalProps {
160
179
 
161
180
  export declare const Radio: ({ label, name, id, disabled, onChange, onClick, ...props }: RadioProps) => JSX_2.Element;
162
181
 
163
- declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
182
+ export declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
164
183
  label?: string;
165
184
  name: string;
166
185
  id: string;
@@ -168,16 +187,40 @@ declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>
168
187
  onClick?: (e: React.MouseEvent<HTMLInputElement | HTMLButtonElement, MouseEvent>) => void;
169
188
  }
170
189
 
190
+ export declare const Textarea: ({ id, state, label, rows, cols, isResizable, optionalityLabel, helpText, message, disabled, ...props }: TextareaProps) => JSX_2.Element;
191
+
192
+ export declare const TextareaAtom: ({ state, rows, cols, isResizable, disabled, ...props }: TextareaAtomProps) => JSX_2.Element;
193
+
194
+ export declare interface TextareaAtomProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
195
+ state?: InputState;
196
+ rows?: number;
197
+ cols?: number;
198
+ isResizable?: boolean;
199
+ }
200
+
201
+ export declare interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
202
+ id: string;
203
+ state?: InputState;
204
+ label: string;
205
+ rows?: number;
206
+ cols?: number;
207
+ isResizable?: boolean;
208
+ onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
209
+ optionalityLabel?: string;
210
+ helpText?: string[];
211
+ message?: string;
212
+ }
213
+
171
214
  export declare const TextInput: ({ id, state, disabled, type, label, optionalityLabel, helpText, message, ...props }: TextInputProps) => JSX_2.Element;
172
215
 
173
216
  export declare const TextInputAtom: ({ state, disabled, type, ...props }: TextInputAtomProps) => JSX_2.Element;
174
217
 
175
- declare interface TextInputAtomProps extends React.InputHTMLAttributes<HTMLInputElement> {
218
+ export declare interface TextInputAtomProps extends React.InputHTMLAttributes<HTMLInputElement> {
176
219
  state?: InputState;
177
220
  type?: TextInputTypes;
178
221
  }
179
222
 
180
- declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
223
+ export declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
181
224
  id: string;
182
225
  state?: InputState;
183
226
  type?: TextInputTypes;
@@ -188,6 +231,6 @@ declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElem
188
231
  message?: string;
189
232
  }
190
233
 
191
- declare type TextInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
234
+ export declare type TextInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
192
235
 
193
236
  export { }