@takecasper/acuity-design-system 1.18.0 → 1.20.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/README.md +15 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.cjs.js +10 -10
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +46 -19
- package/dist/index.es.js +1420 -1312
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
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,19 +35,21 @@ 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> {
|
|
39
|
-
variant?:
|
|
38
|
+
export declare interface ButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
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
|
+
export 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 {
|
|
@@ -60,7 +62,7 @@ declare interface CardProps {
|
|
|
60
62
|
|
|
61
63
|
export declare const Checkbox: ({ id, label, name, checked, disabled, indeterminate, onChange, onClick, ...props }: CheckboxProps) => JSX_2.Element;
|
|
62
64
|
|
|
63
|
-
declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
65
|
+
export declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
64
66
|
id: string;
|
|
65
67
|
label?: string;
|
|
66
68
|
indeterminate?: boolean;
|
|
@@ -70,7 +72,7 @@ declare interface CheckboxProps extends React.InputHTMLAttributes<HTMLInputEleme
|
|
|
70
72
|
|
|
71
73
|
export declare const Heading: ({ size, className, text, descriptionTop, descriptionBottom, hasHorizontalRule, hasMarginBottom, headingTag, ...props }: HeadingProps) => JSX_2.Element;
|
|
72
74
|
|
|
73
|
-
declare interface HeadingProps extends VariantProps<typeof headingVariants> {
|
|
75
|
+
export declare interface HeadingProps extends VariantProps<typeof headingVariants> {
|
|
74
76
|
size?: 'small' | 'medium' | 'large' | 'extra-large';
|
|
75
77
|
text?: string;
|
|
76
78
|
descriptionTop?: string;
|
|
@@ -90,7 +92,7 @@ export declare const Icon: ({ size, name, hasIndicator, className, altText, role
|
|
|
90
92
|
|
|
91
93
|
export declare const IconButton: React_2.FC<IconButtonProps>;
|
|
92
94
|
|
|
93
|
-
declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
95
|
+
export declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
94
96
|
variant: 'default' | 'small';
|
|
95
97
|
iconName: IconNames;
|
|
96
98
|
iconSize?: 'small' | 'medium';
|
|
@@ -106,9 +108,9 @@ declare interface IconButtonProps extends React_2.ButtonHTMLAttributes<HTMLButto
|
|
|
106
108
|
|
|
107
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';
|
|
108
110
|
|
|
109
|
-
declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'bookmark';
|
|
111
|
+
export declare type IconNamesWithIndicator = 'notifications' | 'resourceCenter' | 'bookmark';
|
|
110
112
|
|
|
111
|
-
declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
|
|
113
|
+
export declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
|
|
112
114
|
size: 'small' | 'medium';
|
|
113
115
|
name: IconNames | IconNamesWithIndicator;
|
|
114
116
|
hasIndicator?: boolean;
|
|
@@ -119,11 +121,12 @@ declare interface IconProps extends React.SVGAttributes<HTMLOrSVGImageElement> {
|
|
|
119
121
|
|
|
120
122
|
declare type IconRole = 'graphics-document' | 'img' | 'graphics-symbol' | undefined;
|
|
121
123
|
|
|
122
|
-
declare type InputState = 'default' | 'error' | 'success';
|
|
124
|
+
export declare type InputState = 'default' | 'error' | 'success';
|
|
123
125
|
|
|
124
|
-
export declare const LabelAtom: ({ state, disabled, htmlFor, value, optionalityLabel }: LabelAtomProps) => JSX_2.Element;
|
|
126
|
+
export declare const LabelAtom: ({ id, state, disabled, htmlFor, value, optionalityLabel }: LabelAtomProps) => JSX_2.Element;
|
|
125
127
|
|
|
126
|
-
declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
128
|
+
export declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
129
|
+
id?: string;
|
|
127
130
|
state?: 'default' | 'error' | 'success';
|
|
128
131
|
disabled?: boolean;
|
|
129
132
|
htmlFor: string;
|
|
@@ -133,7 +136,7 @@ declare interface LabelAtomProps extends React.LabelHTMLAttributes<HTMLLabelElem
|
|
|
133
136
|
|
|
134
137
|
export declare const Link: React_2.FC<LinkProps>;
|
|
135
138
|
|
|
136
|
-
declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
139
|
+
export declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
137
140
|
text: string;
|
|
138
141
|
href: string;
|
|
139
142
|
type?: 'default' | 'inline';
|
|
@@ -142,7 +145,7 @@ declare interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
|
142
145
|
|
|
143
146
|
export declare const Modal: ({ open, onClose, title, backdrop, content, footer, icon, iconComponent, iconName, dismissible, horizontalRule }: ModalProps) => JSX_2.Element;
|
|
144
147
|
|
|
145
|
-
declare interface ModalProps {
|
|
148
|
+
export declare interface ModalProps {
|
|
146
149
|
open: boolean;
|
|
147
150
|
onClose: () => void;
|
|
148
151
|
title: string;
|
|
@@ -158,7 +161,7 @@ declare interface ModalProps {
|
|
|
158
161
|
|
|
159
162
|
export declare const Radio: ({ label, name, id, disabled, onChange, onClick, ...props }: RadioProps) => JSX_2.Element;
|
|
160
163
|
|
|
161
|
-
declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
164
|
+
export declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
162
165
|
label?: string;
|
|
163
166
|
name: string;
|
|
164
167
|
id: string;
|
|
@@ -166,16 +169,40 @@ declare interface RadioProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
166
169
|
onClick?: (e: React.MouseEvent<HTMLInputElement | HTMLButtonElement, MouseEvent>) => void;
|
|
167
170
|
}
|
|
168
171
|
|
|
172
|
+
export declare const Textarea: ({ id, state, label, rows, cols, isResizable, optionalityLabel, helpText, message, disabled, ...props }: TextareaProps) => JSX_2.Element;
|
|
173
|
+
|
|
174
|
+
export declare const TextareaAtom: ({ state, rows, cols, isResizable, disabled, ...props }: TextareaAtomProps) => JSX_2.Element;
|
|
175
|
+
|
|
176
|
+
export declare interface TextareaAtomProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
177
|
+
state?: InputState;
|
|
178
|
+
rows?: number;
|
|
179
|
+
cols?: number;
|
|
180
|
+
isResizable?: boolean;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export declare interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
184
|
+
id: string;
|
|
185
|
+
state?: InputState;
|
|
186
|
+
label: string;
|
|
187
|
+
rows?: number;
|
|
188
|
+
cols?: number;
|
|
189
|
+
isResizable?: boolean;
|
|
190
|
+
onChange?: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
191
|
+
optionalityLabel?: string;
|
|
192
|
+
helpText?: string[];
|
|
193
|
+
message?: string;
|
|
194
|
+
}
|
|
195
|
+
|
|
169
196
|
export declare const TextInput: ({ id, state, disabled, type, label, optionalityLabel, helpText, message, ...props }: TextInputProps) => JSX_2.Element;
|
|
170
197
|
|
|
171
198
|
export declare const TextInputAtom: ({ state, disabled, type, ...props }: TextInputAtomProps) => JSX_2.Element;
|
|
172
199
|
|
|
173
|
-
declare interface TextInputAtomProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
200
|
+
export declare interface TextInputAtomProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
174
201
|
state?: InputState;
|
|
175
202
|
type?: TextInputTypes;
|
|
176
203
|
}
|
|
177
204
|
|
|
178
|
-
declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
205
|
+
export declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
179
206
|
id: string;
|
|
180
207
|
state?: InputState;
|
|
181
208
|
type?: TextInputTypes;
|
|
@@ -186,6 +213,6 @@ declare interface TextInputProps extends React.InputHTMLAttributes<HTMLInputElem
|
|
|
186
213
|
message?: string;
|
|
187
214
|
}
|
|
188
215
|
|
|
189
|
-
declare type TextInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
216
|
+
export declare type TextInputTypes = 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
190
217
|
|
|
191
218
|
export { }
|