@hexure/ui 1.8.0 → 1.8.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 +3398 -3335
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ButtonMenu/ButtonMenu.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +2 -0
- package/dist/esm/index.js +3366 -3305
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ButtonMenu/ButtonMenu.d.ts +1 -0
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/index.d.ts +105 -72
- package/package.json +1 -1
|
@@ -3,6 +3,7 @@ export { default as ActionDialog } from './components/ActionDialog';
|
|
|
3
3
|
export { default as Alert } from './components/Alert';
|
|
4
4
|
export { default as BulkActionBar } from './components/BulkActionBar';
|
|
5
5
|
export { default as Button } from './components/Button';
|
|
6
|
+
export { default as ButtonMenu } from './components/ButtonMenu';
|
|
6
7
|
export { default as Checkbox } from './components/Checkbox';
|
|
7
8
|
export { default as Checklist } from './components/Checklist';
|
|
8
9
|
export { default as Copy } from './components/Copy';
|
|
@@ -17,6 +18,7 @@ export { default as Logo } from './components/Logo';
|
|
|
17
18
|
export { default as Modal } from './components/Modal';
|
|
18
19
|
export { default as MoreMenu } from './components/MoreMenu';
|
|
19
20
|
export { default as MultiSelect } from './components/MultiSelect';
|
|
21
|
+
export { default as PageHeader } from './components/PageHeader';
|
|
20
22
|
export { default as Pagination } from './components/Pagination';
|
|
21
23
|
export { default as Radio } from './components/Radio';
|
|
22
24
|
export { default as RadioList } from './components/RadioList';
|
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
|
'aria-label'?: 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
|
format?: 'primary' | 'red';
|
|
@@ -45,8 +45,8 @@ interface ActionDialogProps extends AccessibleProps {
|
|
|
45
45
|
/** Set the tertiary action for the dialog. This should only be defined after a secondary action is defined */
|
|
46
46
|
tertiaryButton?: ButtonProps$4;
|
|
47
47
|
}
|
|
48
|
-
declare const ActionDialog: FC<ActionDialogProps>;
|
|
49
|
-
|
|
48
|
+
declare const ActionDialog: FC<ActionDialogProps>;
|
|
49
|
+
|
|
50
50
|
interface ActionProps$1 extends AccessibleProps {
|
|
51
51
|
label: string;
|
|
52
52
|
onClick: (e?: any) => void;
|
|
@@ -60,8 +60,8 @@ interface AlertProps extends AccessibleProps {
|
|
|
60
60
|
/** Display a link to display below the description */
|
|
61
61
|
action?: ActionProps$1;
|
|
62
62
|
}
|
|
63
|
-
declare const Alert: FC<AlertProps>;
|
|
64
|
-
|
|
63
|
+
declare const Alert: FC<AlertProps>;
|
|
64
|
+
|
|
65
65
|
interface ButtonProps$3 {
|
|
66
66
|
children: string;
|
|
67
67
|
onClick: (e?: any) => void;
|
|
@@ -74,8 +74,8 @@ interface BulkActionBarProps extends AccessibleProps {
|
|
|
74
74
|
onClear: (e?: any) => void;
|
|
75
75
|
selectedCount?: number;
|
|
76
76
|
}
|
|
77
|
-
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
78
|
-
|
|
77
|
+
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
78
|
+
|
|
79
79
|
interface ButtonProps$2 extends AccessibleProps {
|
|
80
80
|
/** Display a number badge on the right side of the button */
|
|
81
81
|
badge?: number;
|
|
@@ -98,8 +98,30 @@ interface ButtonProps$2 extends AccessibleProps {
|
|
|
98
98
|
/** Define which button format to display. By default the Primary button will be used. */
|
|
99
99
|
format?: 'primary' | 'secondary' | 'red';
|
|
100
100
|
}
|
|
101
|
-
declare const Button: FC<ButtonProps$2>;
|
|
102
|
-
|
|
101
|
+
declare const Button: FC<ButtonProps$2>;
|
|
102
|
+
|
|
103
|
+
interface MenuItemProps extends AccessibleProps {
|
|
104
|
+
icon?: string;
|
|
105
|
+
label?: string;
|
|
106
|
+
onClick: (e?: any) => void;
|
|
107
|
+
}
|
|
108
|
+
interface MoreMenuProps extends AccessibleProps {
|
|
109
|
+
menuItems: MenuItemProps[];
|
|
110
|
+
maxHeight?: string | number;
|
|
111
|
+
}
|
|
112
|
+
declare const MoreMenu: FC<MoreMenuProps>;
|
|
113
|
+
|
|
114
|
+
interface ButtonMenuProps {
|
|
115
|
+
disabled?: boolean;
|
|
116
|
+
label: string;
|
|
117
|
+
small?: boolean;
|
|
118
|
+
menuItems: Array<MenuItemProps>;
|
|
119
|
+
maxHeight?: string | number;
|
|
120
|
+
position?: 'left' | 'right';
|
|
121
|
+
format?: 'primary' | 'secondary';
|
|
122
|
+
}
|
|
123
|
+
declare const ButtonMenu: FC<ButtonMenuProps>;
|
|
124
|
+
|
|
103
125
|
interface CheckboxProps extends AccessibleProps {
|
|
104
126
|
/** It is used to give label to checkbox. */
|
|
105
127
|
children?: string;
|
|
@@ -110,8 +132,8 @@ interface CheckboxProps extends AccessibleProps {
|
|
|
110
132
|
/** It is used to change value of checkbox. */
|
|
111
133
|
onChange: (e?: any) => void;
|
|
112
134
|
}
|
|
113
|
-
declare const Checkbox: FC<CheckboxProps>;
|
|
114
|
-
|
|
135
|
+
declare const Checkbox: FC<CheckboxProps>;
|
|
136
|
+
|
|
115
137
|
interface OptionProps$3 {
|
|
116
138
|
label?: string;
|
|
117
139
|
value: string | number;
|
|
@@ -123,8 +145,8 @@ interface ChecklistProps extends AccessibleProps {
|
|
|
123
145
|
selected: (string | number)[];
|
|
124
146
|
showSelectAll?: boolean;
|
|
125
147
|
}
|
|
126
|
-
declare const Checklist: FC<ChecklistProps>;
|
|
127
|
-
|
|
148
|
+
declare const Checklist: FC<ChecklistProps>;
|
|
149
|
+
|
|
128
150
|
interface CopyProps extends AccessibleProps {
|
|
129
151
|
/** Set the text to be displayed */
|
|
130
152
|
children: string;
|
|
@@ -138,8 +160,8 @@ interface CopyProps extends AccessibleProps {
|
|
|
138
160
|
/** Set the color of the copy based on the design system color pallette */
|
|
139
161
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
140
162
|
}
|
|
141
|
-
declare const Copy: FC<CopyProps>;
|
|
142
|
-
|
|
163
|
+
declare const Copy: FC<CopyProps>;
|
|
164
|
+
|
|
143
165
|
interface styleProps$3 {
|
|
144
166
|
width?: number | string;
|
|
145
167
|
}
|
|
@@ -159,8 +181,8 @@ interface DateProps extends AccessibleProps {
|
|
|
159
181
|
/** Override default styles */
|
|
160
182
|
style?: styleProps$3;
|
|
161
183
|
}
|
|
162
|
-
declare const DatePicker: FC<DateProps>;
|
|
163
|
-
|
|
184
|
+
declare const DatePicker: FC<DateProps>;
|
|
185
|
+
|
|
164
186
|
interface ButtonProps$1 extends AccessibleProps {
|
|
165
187
|
disabled: boolean;
|
|
166
188
|
children: string;
|
|
@@ -187,8 +209,8 @@ interface DrawerProps extends AccessibleProps {
|
|
|
187
209
|
/** It is used to close drawer. */
|
|
188
210
|
onClose: (e?: any) => void;
|
|
189
211
|
}
|
|
190
|
-
declare const Drawer: FC<DrawerProps>;
|
|
191
|
-
|
|
212
|
+
declare const Drawer: FC<DrawerProps>;
|
|
213
|
+
|
|
192
214
|
interface TooltipProps {
|
|
193
215
|
/** It is used to give label to tag. */
|
|
194
216
|
children: string;
|
|
@@ -197,8 +219,8 @@ interface TooltipProps {
|
|
|
197
219
|
/** Override the default content width of 240px */
|
|
198
220
|
width?: string;
|
|
199
221
|
}
|
|
200
|
-
declare const Tooltip: FC<TooltipProps>;
|
|
201
|
-
|
|
222
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
223
|
+
|
|
202
224
|
interface ActionProps {
|
|
203
225
|
label: string;
|
|
204
226
|
onClick: (e?: any) => void;
|
|
@@ -220,8 +242,8 @@ interface FieldProps extends AccessibleProps {
|
|
|
220
242
|
/** Display a tooltip next to the label */
|
|
221
243
|
tooltip?: TooltipProps;
|
|
222
244
|
}
|
|
223
|
-
declare const Field: FC<FieldProps>;
|
|
224
|
-
|
|
245
|
+
declare const Field: FC<FieldProps>;
|
|
246
|
+
|
|
225
247
|
interface FileUploadProps {
|
|
226
248
|
/** A method to call when files are added/removed. Return the new file or array of files. */
|
|
227
249
|
onChange?: (files: Array<File>) => void;
|
|
@@ -242,8 +264,8 @@ interface ErrorObject {
|
|
|
242
264
|
file: File;
|
|
243
265
|
message: string;
|
|
244
266
|
}
|
|
245
|
-
declare const FileUpload: FC<FileUploadProps>;
|
|
246
|
-
|
|
267
|
+
declare const FileUpload: FC<FileUploadProps>;
|
|
268
|
+
|
|
247
269
|
interface HeadingProps extends AccessibleProps {
|
|
248
270
|
/** Toggle between bold and normal font weights */
|
|
249
271
|
bold?: boolean;
|
|
@@ -256,8 +278,8 @@ interface HeadingProps extends AccessibleProps {
|
|
|
256
278
|
/** Set the type of heading to display: primary, secondary, tertiary */
|
|
257
279
|
type?: 'primary' | 'secondary' | 'tertiary';
|
|
258
280
|
}
|
|
259
|
-
declare const Heading: FC<HeadingProps>;
|
|
260
|
-
|
|
281
|
+
declare const Heading: FC<HeadingProps>;
|
|
282
|
+
|
|
261
283
|
interface styleProps$2 {
|
|
262
284
|
width?: number | string;
|
|
263
285
|
}
|
|
@@ -295,8 +317,8 @@ interface InputProps extends AccessibleProps {
|
|
|
295
317
|
/** Set the value of the input. This should be used by the parent component to control the input's value. */
|
|
296
318
|
value?: string;
|
|
297
319
|
}
|
|
298
|
-
declare const Input: FC<InputProps>;
|
|
299
|
-
|
|
320
|
+
declare const Input: FC<InputProps>;
|
|
321
|
+
|
|
300
322
|
interface LinkProps extends AccessibleProps {
|
|
301
323
|
/** Set the text to be displayed */
|
|
302
324
|
children: string;
|
|
@@ -305,14 +327,14 @@ interface LinkProps extends AccessibleProps {
|
|
|
305
327
|
/** A method to execute when this component is clicked */
|
|
306
328
|
onClick?: (e?: any) => void;
|
|
307
329
|
}
|
|
308
|
-
declare const Link: FC<LinkProps>;
|
|
309
|
-
|
|
330
|
+
declare const Link: FC<LinkProps>;
|
|
331
|
+
|
|
310
332
|
interface LogoProps extends AccessibleProps {
|
|
311
333
|
type?: 'mark_red' | 'mark_white' | 'standard_white' | 'standard_black' | 'standard_full' | 'standard_reversed';
|
|
312
334
|
height?: string;
|
|
313
335
|
}
|
|
314
|
-
declare const Logo: FC<LogoProps>;
|
|
315
|
-
|
|
336
|
+
declare const Logo: FC<LogoProps>;
|
|
337
|
+
|
|
316
338
|
interface ButtonProps {
|
|
317
339
|
disabled?: boolean;
|
|
318
340
|
children: string;
|
|
@@ -343,19 +365,8 @@ interface ModalProps extends AccessibleProps {
|
|
|
343
365
|
/** Display steps at the top of the modal */
|
|
344
366
|
steps?: StepProps[];
|
|
345
367
|
}
|
|
346
|
-
declare const Modal: FC<ModalProps>;
|
|
347
|
-
|
|
348
|
-
interface MenuItemProps extends AccessibleProps {
|
|
349
|
-
icon?: string;
|
|
350
|
-
label?: string;
|
|
351
|
-
onClick: (e?: any) => void;
|
|
352
|
-
}
|
|
353
|
-
interface MoreMenuProps extends AccessibleProps {
|
|
354
|
-
menuItems: MenuItemProps[];
|
|
355
|
-
maxHeight?: string | number;
|
|
356
|
-
}
|
|
357
|
-
declare const MoreMenu: FC<MoreMenuProps>;
|
|
358
|
-
|
|
368
|
+
declare const Modal: FC<ModalProps>;
|
|
369
|
+
|
|
359
370
|
interface OptionProps$2 {
|
|
360
371
|
label?: string;
|
|
361
372
|
value: string | number;
|
|
@@ -373,15 +384,37 @@ interface MultiSelectProps extends AccessibleProps {
|
|
|
373
384
|
showSelectAll?: boolean;
|
|
374
385
|
style?: styleProps$1;
|
|
375
386
|
}
|
|
376
|
-
declare const MultiSelect: FC<MultiSelectProps>;
|
|
377
|
-
|
|
387
|
+
declare const MultiSelect: FC<MultiSelectProps>;
|
|
388
|
+
|
|
389
|
+
interface PageHeaderProps {
|
|
390
|
+
title?: string;
|
|
391
|
+
breadcrumbs?: Array<{
|
|
392
|
+
label: string;
|
|
393
|
+
onClick?: (e: any) => void;
|
|
394
|
+
}>;
|
|
395
|
+
actions?: Array<{
|
|
396
|
+
disabled?: boolean;
|
|
397
|
+
format?: 'primary' | 'secondary' | 'red';
|
|
398
|
+
icon?: string;
|
|
399
|
+
label: string;
|
|
400
|
+
onClick?: (e: any) => void;
|
|
401
|
+
}>;
|
|
402
|
+
buttonMenu?: {
|
|
403
|
+
disabled?: boolean;
|
|
404
|
+
icon?: string;
|
|
405
|
+
label: string;
|
|
406
|
+
menuItems: Array<MenuItemProps>;
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
declare const PageHeader: FC<PageHeaderProps>;
|
|
410
|
+
|
|
378
411
|
interface PaginationProps extends AccessibleProps {
|
|
379
412
|
currentPage: number;
|
|
380
413
|
onClick: (e?: any) => void;
|
|
381
414
|
pageCount: number;
|
|
382
415
|
}
|
|
383
|
-
declare const Pagination: FC<PaginationProps>;
|
|
384
|
-
|
|
416
|
+
declare const Pagination: FC<PaginationProps>;
|
|
417
|
+
|
|
385
418
|
interface RadioProps extends AccessibleProps {
|
|
386
419
|
/** It is used to give label to radio. */
|
|
387
420
|
children: string | number;
|
|
@@ -393,8 +426,8 @@ interface RadioProps extends AccessibleProps {
|
|
|
393
426
|
onChange: (e?: any) => void;
|
|
394
427
|
value: string | number;
|
|
395
428
|
}
|
|
396
|
-
declare const Radio: FC<RadioProps>;
|
|
397
|
-
|
|
429
|
+
declare const Radio: FC<RadioProps>;
|
|
430
|
+
|
|
398
431
|
interface OptionProps$1 {
|
|
399
432
|
label?: string;
|
|
400
433
|
value: string | number;
|
|
@@ -405,8 +438,8 @@ interface RadioListProps extends AccessibleProps {
|
|
|
405
438
|
options: OptionProps$1[];
|
|
406
439
|
value: string;
|
|
407
440
|
}
|
|
408
|
-
declare const RadioList: FC<RadioListProps>;
|
|
409
|
-
|
|
441
|
+
declare const RadioList: FC<RadioListProps>;
|
|
442
|
+
|
|
410
443
|
interface OptionProps {
|
|
411
444
|
/** It is used to give label to option. */
|
|
412
445
|
label?: string;
|
|
@@ -438,8 +471,8 @@ interface SelectProps extends AccessibleProps {
|
|
|
438
471
|
/** It is used to change value when an option is clicked. */
|
|
439
472
|
onChange: (e: any) => void;
|
|
440
473
|
}
|
|
441
|
-
declare const Select: FC<SelectProps>;
|
|
442
|
-
|
|
474
|
+
declare const Select: FC<SelectProps>;
|
|
475
|
+
|
|
443
476
|
interface RowObject {
|
|
444
477
|
[key: string]: any;
|
|
445
478
|
}
|
|
@@ -461,8 +494,8 @@ interface TableProps extends AccessibleProps {
|
|
|
461
494
|
onSortChange?: (e?: any) => void;
|
|
462
495
|
tableLayout?: string;
|
|
463
496
|
}
|
|
464
|
-
declare const Table: FC<TableProps>;
|
|
465
|
-
|
|
497
|
+
declare const Table: FC<TableProps>;
|
|
498
|
+
|
|
466
499
|
interface TabProps extends AccessibleProps {
|
|
467
500
|
badgeCount?: number;
|
|
468
501
|
errorBadge?: boolean;
|
|
@@ -473,8 +506,8 @@ interface TabProps extends AccessibleProps {
|
|
|
473
506
|
interface TabsProps extends AccessibleProps {
|
|
474
507
|
tabs: TabProps[];
|
|
475
508
|
}
|
|
476
|
-
declare const Tabs: FC<TabsProps>;
|
|
477
|
-
|
|
509
|
+
declare const Tabs: FC<TabsProps>;
|
|
510
|
+
|
|
478
511
|
interface TagProps extends AccessibleProps {
|
|
479
512
|
/** It is used to select tag-type either default or removable. */
|
|
480
513
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'SUBTLE_GRAY';
|
|
@@ -485,16 +518,16 @@ interface TagProps extends AccessibleProps {
|
|
|
485
518
|
/** It is callback function called when user wants to close the tag. */
|
|
486
519
|
removable?: boolean;
|
|
487
520
|
}
|
|
488
|
-
declare const Tag: FC<TagProps>;
|
|
489
|
-
|
|
521
|
+
declare const Tag: FC<TagProps>;
|
|
522
|
+
|
|
490
523
|
interface ToggleProps extends AccessibleProps {
|
|
491
524
|
/** It is used to check whether Toggle is checked or not */
|
|
492
525
|
on: boolean;
|
|
493
526
|
/** Pass a callback then fires when user change value */
|
|
494
527
|
onClick: (e?: any) => void;
|
|
495
528
|
}
|
|
496
|
-
declare const Toggle: FC<ToggleProps>;
|
|
497
|
-
|
|
529
|
+
declare const Toggle: FC<ToggleProps>;
|
|
530
|
+
|
|
498
531
|
interface ZeroStateProps extends AccessibleProps {
|
|
499
532
|
/** The SVG path of the icon to show */
|
|
500
533
|
icon: string;
|
|
@@ -509,6 +542,6 @@ interface ZeroStateProps extends AccessibleProps {
|
|
|
509
542
|
onClick: (e?: any) => void;
|
|
510
543
|
};
|
|
511
544
|
}
|
|
512
|
-
declare const ZeroState: FC<ZeroStateProps>;
|
|
513
|
-
|
|
514
|
-
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FileUpload, Heading, Input, Link, Logo, Modal, MoreMenu, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
|
|
545
|
+
declare const ZeroState: FC<ZeroStateProps>;
|
|
546
|
+
|
|
547
|
+
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Copy, DatePicker, Drawer, Field, FileUpload, Heading, Input, Link, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState };
|