@hexure/ui 1.3.1 → 1.3.2
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/cjs/index.js +11 -9
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Alert/Alert.d.ts +6 -0
- package/dist/esm/index.js +11 -9
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Alert/Alert.d.ts +6 -0
- package/dist/index.d.ts +59 -53
- package/package.json +1 -1
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
|
+
export interface ActionProps extends AccessibleProps {
|
|
4
|
+
label: string;
|
|
5
|
+
onClick: (e?: any) => void;
|
|
6
|
+
}
|
|
3
7
|
export interface AlertProps extends AccessibleProps {
|
|
4
8
|
type?: 'info' | 'error' | 'warning' | 'success';
|
|
5
9
|
/** It is used to add title to alert. */
|
|
6
10
|
title: string;
|
|
7
11
|
/** It is used to add description to alert. */
|
|
8
12
|
description: string;
|
|
13
|
+
/** Display a link to display below the description */
|
|
14
|
+
action?: ActionProps;
|
|
9
15
|
}
|
|
10
16
|
declare const Alert: FC<AlertProps>;
|
|
11
17
|
export default Alert;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { FC, ReactNode } from 'react';
|
|
2
|
-
|
|
1
|
+
import React, { FC, ReactNode } from 'react';
|
|
2
|
+
|
|
3
3
|
interface AccessibleProps {
|
|
4
4
|
/** Set the css id for the main wrapping html element */
|
|
5
5
|
id?: string;
|
|
@@ -13,8 +13,8 @@ interface AccessibleProps {
|
|
|
13
13
|
tabIndex?: number;
|
|
14
14
|
/** Set a label for an interactive element. See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label */
|
|
15
15
|
ariaLabel?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
16
|
+
}
|
|
17
|
+
|
|
18
18
|
interface AccordionProps extends AccessibleProps {
|
|
19
19
|
title?: string;
|
|
20
20
|
/** Define the content to be displayed */
|
|
@@ -24,8 +24,8 @@ interface AccordionProps extends AccessibleProps {
|
|
|
24
24
|
/** Method to call when the header is clicked */
|
|
25
25
|
onClick: (e?: any) => void;
|
|
26
26
|
}
|
|
27
|
-
declare const Accordion: FC<AccordionProps>;
|
|
28
|
-
|
|
27
|
+
declare const Accordion: FC<AccordionProps>;
|
|
28
|
+
|
|
29
29
|
interface ButtonProps$4 {
|
|
30
30
|
children: string;
|
|
31
31
|
icon?: string;
|
|
@@ -41,17 +41,23 @@ interface ActionDialogProps extends AccessibleProps {
|
|
|
41
41
|
secondaryButton?: ButtonProps$4;
|
|
42
42
|
onClose: (e?: any) => void;
|
|
43
43
|
}
|
|
44
|
-
declare const ActionDialog: FC<ActionDialogProps>;
|
|
45
|
-
|
|
44
|
+
declare const ActionDialog: FC<ActionDialogProps>;
|
|
45
|
+
|
|
46
|
+
interface ActionProps$1 extends AccessibleProps {
|
|
47
|
+
label: string;
|
|
48
|
+
onClick: (e?: any) => void;
|
|
49
|
+
}
|
|
46
50
|
interface AlertProps extends AccessibleProps {
|
|
47
51
|
type?: 'info' | 'error' | 'warning' | 'success';
|
|
48
52
|
/** It is used to add title to alert. */
|
|
49
53
|
title: string;
|
|
50
54
|
/** It is used to add description to alert. */
|
|
51
55
|
description: string;
|
|
56
|
+
/** Display a link to display below the description */
|
|
57
|
+
action?: ActionProps$1;
|
|
52
58
|
}
|
|
53
|
-
declare const Alert: FC<AlertProps>;
|
|
54
|
-
|
|
59
|
+
declare const Alert: FC<AlertProps>;
|
|
60
|
+
|
|
55
61
|
interface ButtonProps$3 {
|
|
56
62
|
children: string;
|
|
57
63
|
onClick: (e?: any) => void;
|
|
@@ -64,8 +70,8 @@ interface BulkActionBarProps extends AccessibleProps {
|
|
|
64
70
|
onClear: (e?: any) => void;
|
|
65
71
|
selectedCount?: number;
|
|
66
72
|
}
|
|
67
|
-
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
68
|
-
|
|
73
|
+
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
74
|
+
|
|
69
75
|
interface ButtonProps$2 extends AccessibleProps {
|
|
70
76
|
/** Display a number badge on the right side of the button */
|
|
71
77
|
badge?: number;
|
|
@@ -86,8 +92,8 @@ interface ButtonProps$2 extends AccessibleProps {
|
|
|
86
92
|
/** Define which button format to display. By default the Primary button will be used. */
|
|
87
93
|
format?: 'primary' | 'secondary' | 'red';
|
|
88
94
|
}
|
|
89
|
-
declare const Button: FC<ButtonProps$2>;
|
|
90
|
-
|
|
95
|
+
declare const Button: FC<ButtonProps$2>;
|
|
96
|
+
|
|
91
97
|
interface CheckboxProps extends AccessibleProps {
|
|
92
98
|
/** It is used to give label to checkbox. */
|
|
93
99
|
children?: string;
|
|
@@ -98,8 +104,8 @@ interface CheckboxProps extends AccessibleProps {
|
|
|
98
104
|
/** It is used to change value of checkbox. */
|
|
99
105
|
onChange: (e?: any) => void;
|
|
100
106
|
}
|
|
101
|
-
declare const Checkbox: FC<CheckboxProps>;
|
|
102
|
-
|
|
107
|
+
declare const Checkbox: FC<CheckboxProps>;
|
|
108
|
+
|
|
103
109
|
interface OptionProps$3 {
|
|
104
110
|
label?: string;
|
|
105
111
|
value: string | number;
|
|
@@ -111,8 +117,8 @@ interface ChecklistProps extends AccessibleProps {
|
|
|
111
117
|
selected: (string | number)[];
|
|
112
118
|
showSelectAll?: boolean;
|
|
113
119
|
}
|
|
114
|
-
declare const Checklist: FC<ChecklistProps>;
|
|
115
|
-
|
|
120
|
+
declare const Checklist: FC<ChecklistProps>;
|
|
121
|
+
|
|
116
122
|
interface CopyProps extends AccessibleProps {
|
|
117
123
|
/** Set the text to be displayed */
|
|
118
124
|
children: string;
|
|
@@ -126,8 +132,8 @@ interface CopyProps extends AccessibleProps {
|
|
|
126
132
|
/** Set the color of the copy based on the design system color pallette */
|
|
127
133
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
128
134
|
}
|
|
129
|
-
declare const Copy: FC<CopyProps>;
|
|
130
|
-
|
|
135
|
+
declare const Copy: FC<CopyProps>;
|
|
136
|
+
|
|
131
137
|
interface ButtonProps$1 extends AccessibleProps {
|
|
132
138
|
disabled: boolean;
|
|
133
139
|
children: string;
|
|
@@ -152,8 +158,8 @@ interface DrawerProps extends AccessibleProps {
|
|
|
152
158
|
/** It is used to close drawer. */
|
|
153
159
|
onClose: (e?: any) => void;
|
|
154
160
|
}
|
|
155
|
-
declare const Drawer: FC<DrawerProps>;
|
|
156
|
-
|
|
161
|
+
declare const Drawer: FC<DrawerProps>;
|
|
162
|
+
|
|
157
163
|
interface ActionProps {
|
|
158
164
|
label: string;
|
|
159
165
|
onClick: (e?: any) => void;
|
|
@@ -173,8 +179,8 @@ interface FieldProps extends AccessibleProps {
|
|
|
173
179
|
/** It is used to give description to input. */
|
|
174
180
|
description?: string;
|
|
175
181
|
}
|
|
176
|
-
declare const Field: FC<FieldProps>;
|
|
177
|
-
|
|
182
|
+
declare const Field: FC<FieldProps>;
|
|
183
|
+
|
|
178
184
|
interface HeadingProps extends AccessibleProps {
|
|
179
185
|
/** Toggle between bold and normal font weights */
|
|
180
186
|
bold?: boolean;
|
|
@@ -187,8 +193,8 @@ interface HeadingProps extends AccessibleProps {
|
|
|
187
193
|
/** Set the type of heading to display: primary, secondary, tertiary */
|
|
188
194
|
type?: 'primary' | 'secondary' | 'tertiary';
|
|
189
195
|
}
|
|
190
|
-
declare const Heading: FC<HeadingProps>;
|
|
191
|
-
|
|
196
|
+
declare const Heading: FC<HeadingProps>;
|
|
197
|
+
|
|
192
198
|
interface InputProps extends AccessibleProps {
|
|
193
199
|
format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
|
|
194
200
|
height?: string;
|
|
@@ -206,8 +212,8 @@ interface InputProps extends AccessibleProps {
|
|
|
206
212
|
type?: 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea';
|
|
207
213
|
value?: string;
|
|
208
214
|
}
|
|
209
|
-
declare const Input: FC<InputProps>;
|
|
210
|
-
|
|
215
|
+
declare const Input: FC<InputProps>;
|
|
216
|
+
|
|
211
217
|
interface ButtonProps {
|
|
212
218
|
disabled: boolean;
|
|
213
219
|
children: string;
|
|
@@ -227,8 +233,8 @@ interface ModalProps extends AccessibleProps {
|
|
|
227
233
|
/** It is used to close modal. */
|
|
228
234
|
onClose: (e?: any) => void;
|
|
229
235
|
}
|
|
230
|
-
declare const Modal: FC<ModalProps>;
|
|
231
|
-
|
|
236
|
+
declare const Modal: FC<ModalProps>;
|
|
237
|
+
|
|
232
238
|
interface MenuItemProps extends AccessibleProps {
|
|
233
239
|
icon?: string;
|
|
234
240
|
label?: string;
|
|
@@ -238,8 +244,8 @@ interface MoreMenuProps extends AccessibleProps {
|
|
|
238
244
|
menuItems: MenuItemProps[];
|
|
239
245
|
maxHeight: string | number;
|
|
240
246
|
}
|
|
241
|
-
declare const MoreMenu: FC<MoreMenuProps>;
|
|
242
|
-
|
|
247
|
+
declare const MoreMenu: FC<MoreMenuProps>;
|
|
248
|
+
|
|
243
249
|
interface OptionProps$2 {
|
|
244
250
|
label?: string;
|
|
245
251
|
value: string | number;
|
|
@@ -253,15 +259,15 @@ interface MultiSelectProps extends AccessibleProps {
|
|
|
253
259
|
selected: (string | number)[];
|
|
254
260
|
showSelectAll?: boolean;
|
|
255
261
|
}
|
|
256
|
-
declare const MultiSelect: FC<MultiSelectProps>;
|
|
257
|
-
|
|
262
|
+
declare const MultiSelect: FC<MultiSelectProps>;
|
|
263
|
+
|
|
258
264
|
interface PaginationProps extends AccessibleProps {
|
|
259
265
|
currentPage: number;
|
|
260
266
|
onClick: (e?: any) => void;
|
|
261
267
|
pageCount: number;
|
|
262
268
|
}
|
|
263
|
-
declare const Pagination: FC<PaginationProps>;
|
|
264
|
-
|
|
269
|
+
declare const Pagination: FC<PaginationProps>;
|
|
270
|
+
|
|
265
271
|
interface RadioProps extends AccessibleProps {
|
|
266
272
|
/** It is used to give label to radio. */
|
|
267
273
|
children: string | number;
|
|
@@ -273,8 +279,8 @@ interface RadioProps extends AccessibleProps {
|
|
|
273
279
|
onChange: (e?: any) => void;
|
|
274
280
|
value: string | number;
|
|
275
281
|
}
|
|
276
|
-
declare const Radio: FC<RadioProps>;
|
|
277
|
-
|
|
282
|
+
declare const Radio: FC<RadioProps>;
|
|
283
|
+
|
|
278
284
|
interface OptionProps$1 {
|
|
279
285
|
label?: string;
|
|
280
286
|
value: string | number;
|
|
@@ -285,8 +291,8 @@ interface RadioListProps extends AccessibleProps {
|
|
|
285
291
|
options: OptionProps$1[];
|
|
286
292
|
value: string;
|
|
287
293
|
}
|
|
288
|
-
declare const RadioList: FC<RadioListProps>;
|
|
289
|
-
|
|
294
|
+
declare const RadioList: FC<RadioListProps>;
|
|
295
|
+
|
|
290
296
|
interface OptionProps {
|
|
291
297
|
/** It is used to give label to option. */
|
|
292
298
|
label: string;
|
|
@@ -316,8 +322,8 @@ interface SelectProps extends AccessibleProps {
|
|
|
316
322
|
/** It is used to change value when an option is clicked. */
|
|
317
323
|
onChange: (e: any) => void;
|
|
318
324
|
}
|
|
319
|
-
declare const Select: FC<SelectProps>;
|
|
320
|
-
|
|
325
|
+
declare const Select: FC<SelectProps>;
|
|
326
|
+
|
|
321
327
|
interface RowObject {
|
|
322
328
|
[key: string]: any;
|
|
323
329
|
}
|
|
@@ -339,8 +345,8 @@ interface TableProps extends AccessibleProps {
|
|
|
339
345
|
onSortChange?: (e?: any) => void;
|
|
340
346
|
tableLayout?: string;
|
|
341
347
|
}
|
|
342
|
-
declare const Table: FC<TableProps>;
|
|
343
|
-
|
|
348
|
+
declare const Table: FC<TableProps>;
|
|
349
|
+
|
|
344
350
|
interface TabProps extends AccessibleProps {
|
|
345
351
|
label: string;
|
|
346
352
|
onClick: (e?: any) => void;
|
|
@@ -349,8 +355,8 @@ interface TabProps extends AccessibleProps {
|
|
|
349
355
|
interface TabsProps extends AccessibleProps {
|
|
350
356
|
tabs: TabProps[];
|
|
351
357
|
}
|
|
352
|
-
declare const Tabs: FC<TabsProps>;
|
|
353
|
-
|
|
358
|
+
declare const Tabs: FC<TabsProps>;
|
|
359
|
+
|
|
354
360
|
interface TagProps extends AccessibleProps {
|
|
355
361
|
/** It is used to select tag-type either default or removable. */
|
|
356
362
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK';
|
|
@@ -360,16 +366,16 @@ interface TagProps extends AccessibleProps {
|
|
|
360
366
|
/** It is callback function called when user wants to close the tag. */
|
|
361
367
|
removable?: boolean;
|
|
362
368
|
}
|
|
363
|
-
declare const Tag: FC<TagProps>;
|
|
364
|
-
|
|
369
|
+
declare const Tag: FC<TagProps>;
|
|
370
|
+
|
|
365
371
|
interface ToggleProps extends AccessibleProps {
|
|
366
372
|
/** It is used to check whether Toggle is checked or not */
|
|
367
373
|
on: boolean;
|
|
368
374
|
/** Pass a callback then fires when user change value */
|
|
369
375
|
onClick: (e?: any) => void;
|
|
370
376
|
}
|
|
371
|
-
declare const Toggle: FC<ToggleProps>;
|
|
372
|
-
|
|
377
|
+
declare const Toggle: FC<ToggleProps>;
|
|
378
|
+
|
|
373
379
|
interface ZeroStateProps extends AccessibleProps {
|
|
374
380
|
/** The SVG path of the icon to show */
|
|
375
381
|
icon: string;
|
|
@@ -384,6 +390,6 @@ interface ZeroStateProps extends AccessibleProps {
|
|
|
384
390
|
onClick: (e?: any) => void;
|
|
385
391
|
};
|
|
386
392
|
}
|
|
387
|
-
declare const ZeroState: FC<ZeroStateProps>;
|
|
388
|
-
|
|
389
|
-
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input, Modal, MoreMenu, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, ZeroState };
|
|
393
|
+
declare const ZeroState: FC<ZeroStateProps>;
|
|
394
|
+
|
|
395
|
+
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input, Modal, MoreMenu, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, ZeroState };
|