@hexure/ui 1.12.2 → 1.12.3
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
|
@@ -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';
|
|
@@ -46,8 +46,8 @@ interface ActionDialogProps extends AccessibleProps {
|
|
|
46
46
|
/** Set the tertiary action for the dialog. This should only be defined after a secondary action is defined */
|
|
47
47
|
tertiaryButton?: ButtonProps$4;
|
|
48
48
|
}
|
|
49
|
-
declare const ActionDialog: FC<ActionDialogProps>;
|
|
50
|
-
|
|
49
|
+
declare const ActionDialog: FC<ActionDialogProps>;
|
|
50
|
+
|
|
51
51
|
interface ActionProps$1 extends AccessibleProps {
|
|
52
52
|
label: string;
|
|
53
53
|
onClick: (e?: any) => void;
|
|
@@ -63,8 +63,8 @@ interface AlertProps extends AccessibleProps {
|
|
|
63
63
|
/** Show a condensed, smaller version of the alert. The title and action props will be ignore if this is set to true */
|
|
64
64
|
small?: boolean;
|
|
65
65
|
}
|
|
66
|
-
declare const Alert: FC<AlertProps>;
|
|
67
|
-
|
|
66
|
+
declare const Alert: FC<AlertProps>;
|
|
67
|
+
|
|
68
68
|
interface ButtonProps$3 extends AccessibleProps {
|
|
69
69
|
/** Display a number badge on the right side of the button */
|
|
70
70
|
badge?: number;
|
|
@@ -87,14 +87,14 @@ interface ButtonProps$3 extends AccessibleProps {
|
|
|
87
87
|
/** Define which button format to display. By default the Primary button will be used. */
|
|
88
88
|
format?: 'primary' | 'secondary' | 'red' | 'green';
|
|
89
89
|
}
|
|
90
|
-
declare const Button: FC<ButtonProps$3>;
|
|
91
|
-
|
|
90
|
+
declare const Button: FC<ButtonProps$3>;
|
|
91
|
+
|
|
92
92
|
interface AppHeaderProps {
|
|
93
93
|
logoUrl?: string;
|
|
94
94
|
buttons: ButtonProps$3[];
|
|
95
95
|
}
|
|
96
|
-
declare const AppHeader: FC<AppHeaderProps>;
|
|
97
|
-
|
|
96
|
+
declare const AppHeader: FC<AppHeaderProps>;
|
|
97
|
+
|
|
98
98
|
interface MenuItemType extends AccessibleProps {
|
|
99
99
|
icon: string;
|
|
100
100
|
label: string;
|
|
@@ -112,8 +112,8 @@ interface AppMenuProps extends AccessibleProps {
|
|
|
112
112
|
footerTag?: string;
|
|
113
113
|
defaultWidth?: string;
|
|
114
114
|
}
|
|
115
|
-
declare const AppMenu: FC<AppMenuProps>;
|
|
116
|
-
|
|
115
|
+
declare const AppMenu: FC<AppMenuProps>;
|
|
116
|
+
|
|
117
117
|
interface ButtonProps$2 {
|
|
118
118
|
children: string;
|
|
119
119
|
onClick: (e?: any) => void;
|
|
@@ -126,8 +126,8 @@ interface BulkActionBarProps extends AccessibleProps {
|
|
|
126
126
|
onClear: (e?: any) => void;
|
|
127
127
|
selectedCount?: number;
|
|
128
128
|
}
|
|
129
|
-
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
130
|
-
|
|
129
|
+
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
130
|
+
|
|
131
131
|
interface MenuItemProps extends AccessibleProps {
|
|
132
132
|
icon?: string;
|
|
133
133
|
label?: string;
|
|
@@ -137,8 +137,8 @@ interface MoreMenuProps extends AccessibleProps {
|
|
|
137
137
|
menuItems: MenuItemProps[];
|
|
138
138
|
maxHeight?: string | number;
|
|
139
139
|
}
|
|
140
|
-
declare const MoreMenu: FC<MoreMenuProps>;
|
|
141
|
-
|
|
140
|
+
declare const MoreMenu: FC<MoreMenuProps>;
|
|
141
|
+
|
|
142
142
|
interface ButtonMenuProps {
|
|
143
143
|
disabled?: boolean;
|
|
144
144
|
label: string;
|
|
@@ -149,8 +149,8 @@ interface ButtonMenuProps {
|
|
|
149
149
|
position?: 'left' | 'right';
|
|
150
150
|
format?: 'primary' | 'secondary';
|
|
151
151
|
}
|
|
152
|
-
declare const ButtonMenu: FC<ButtonMenuProps>;
|
|
153
|
-
|
|
152
|
+
declare const ButtonMenu: FC<ButtonMenuProps>;
|
|
153
|
+
|
|
154
154
|
interface TooltipProps {
|
|
155
155
|
/** It is used to give label to tag. */
|
|
156
156
|
children: any;
|
|
@@ -161,8 +161,8 @@ interface TooltipProps {
|
|
|
161
161
|
/** The element to display that triggers the tooltip content */
|
|
162
162
|
trigger?: any;
|
|
163
163
|
}
|
|
164
|
-
declare const Tooltip: FC<TooltipProps>;
|
|
165
|
-
|
|
164
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
165
|
+
|
|
166
166
|
interface CheckboxProps extends AccessibleProps {
|
|
167
167
|
/** It is used to give label to checkbox. */
|
|
168
168
|
children?: string;
|
|
@@ -177,8 +177,8 @@ interface CheckboxProps extends AccessibleProps {
|
|
|
177
177
|
/** Display a tooltip next to the label */
|
|
178
178
|
tooltip?: TooltipProps;
|
|
179
179
|
}
|
|
180
|
-
declare const Checkbox: FC<CheckboxProps>;
|
|
181
|
-
|
|
180
|
+
declare const Checkbox: FC<CheckboxProps>;
|
|
181
|
+
|
|
182
182
|
interface OptionProps$3 {
|
|
183
183
|
label?: string;
|
|
184
184
|
value: string | number;
|
|
@@ -190,8 +190,8 @@ interface ChecklistProps extends AccessibleProps {
|
|
|
190
190
|
selected: (string | number)[];
|
|
191
191
|
showSelectAll?: boolean;
|
|
192
192
|
}
|
|
193
|
-
declare const Checklist: FC<ChecklistProps>;
|
|
194
|
-
|
|
193
|
+
declare const Checklist: FC<ChecklistProps>;
|
|
194
|
+
|
|
195
195
|
interface CopyProps extends AccessibleProps {
|
|
196
196
|
/** Set the text to be displayed */
|
|
197
197
|
children: string | React.ReactNode;
|
|
@@ -205,8 +205,8 @@ interface CopyProps extends AccessibleProps {
|
|
|
205
205
|
/** Set the color of the copy based on the design system color pallette */
|
|
206
206
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
207
207
|
}
|
|
208
|
-
declare const Copy: FC<CopyProps>;
|
|
209
|
-
|
|
208
|
+
declare const Copy: FC<CopyProps>;
|
|
209
|
+
|
|
210
210
|
interface styleProps$3 {
|
|
211
211
|
width?: number | string;
|
|
212
212
|
}
|
|
@@ -226,8 +226,8 @@ interface DateProps extends AccessibleProps {
|
|
|
226
226
|
/** Override default styles */
|
|
227
227
|
style?: styleProps$3;
|
|
228
228
|
}
|
|
229
|
-
declare const DatePicker: FC<DateProps>;
|
|
230
|
-
|
|
229
|
+
declare const DatePicker: FC<DateProps>;
|
|
230
|
+
|
|
231
231
|
interface ButtonProps$1 extends AccessibleProps {
|
|
232
232
|
disabled?: boolean;
|
|
233
233
|
children: string;
|
|
@@ -255,8 +255,8 @@ interface DrawerProps extends AccessibleProps {
|
|
|
255
255
|
/** It is used to close drawer. */
|
|
256
256
|
onClose: (e?: any) => void;
|
|
257
257
|
}
|
|
258
|
-
declare const Drawer: FC<DrawerProps>;
|
|
259
|
-
|
|
258
|
+
declare const Drawer: FC<DrawerProps>;
|
|
259
|
+
|
|
260
260
|
interface ActionProps {
|
|
261
261
|
id?: string;
|
|
262
262
|
label: string;
|
|
@@ -279,16 +279,16 @@ interface FieldProps extends AccessibleProps {
|
|
|
279
279
|
/** Display a tooltip next to the label */
|
|
280
280
|
tooltip?: TooltipProps;
|
|
281
281
|
}
|
|
282
|
-
declare const Field: FC<FieldProps>;
|
|
283
|
-
|
|
282
|
+
declare const Field: FC<FieldProps>;
|
|
283
|
+
|
|
284
284
|
interface FieldGroupProps {
|
|
285
285
|
/** The label to display above the field group */
|
|
286
286
|
label: string;
|
|
287
287
|
/** The content of the field group...usually a set of Field components */
|
|
288
288
|
children: any;
|
|
289
289
|
}
|
|
290
|
-
declare const FieldGroup: FC<FieldGroupProps>;
|
|
291
|
-
|
|
290
|
+
declare const FieldGroup: FC<FieldGroupProps>;
|
|
291
|
+
|
|
292
292
|
interface FileUploadProps {
|
|
293
293
|
/** A method to call when files are added/removed. Return the new file or array of files. */
|
|
294
294
|
onChange?: (files: Array<File>) => void;
|
|
@@ -309,13 +309,13 @@ interface ErrorObject {
|
|
|
309
309
|
file: File;
|
|
310
310
|
message: string;
|
|
311
311
|
}
|
|
312
|
-
declare const FileUpload: FC<FileUploadProps>;
|
|
313
|
-
|
|
312
|
+
declare const FileUpload: FC<FileUploadProps>;
|
|
313
|
+
|
|
314
314
|
interface HeadingProps extends AccessibleProps {
|
|
315
315
|
/** Toggle between bold and normal font weights */
|
|
316
316
|
bold?: boolean;
|
|
317
317
|
/** Set the text to be displayed */
|
|
318
|
-
children: string;
|
|
318
|
+
children: string | React.ReactNode;
|
|
319
319
|
/** Set the margin on the element */
|
|
320
320
|
margin?: string;
|
|
321
321
|
/** Set the padding on the element */
|
|
@@ -323,8 +323,8 @@ interface HeadingProps extends AccessibleProps {
|
|
|
323
323
|
/** Set the type of heading to display: primary, secondary, tertiary */
|
|
324
324
|
type?: 'primary' | 'secondary' | 'tertiary';
|
|
325
325
|
}
|
|
326
|
-
declare const Heading: FC<HeadingProps>;
|
|
327
|
-
|
|
326
|
+
declare const Heading: FC<HeadingProps>;
|
|
327
|
+
|
|
328
328
|
interface styleProps$2 {
|
|
329
329
|
width?: number | string;
|
|
330
330
|
}
|
|
@@ -372,8 +372,8 @@ interface InputProps extends AccessibleProps {
|
|
|
372
372
|
/** Display a loading indicator to the far right of the input */
|
|
373
373
|
loading?: boolean;
|
|
374
374
|
}
|
|
375
|
-
declare const Input: FC<InputProps>;
|
|
376
|
-
|
|
375
|
+
declare const Input: FC<InputProps>;
|
|
376
|
+
|
|
377
377
|
interface LinkProps extends AccessibleProps {
|
|
378
378
|
/** Set the text to be displayed */
|
|
379
379
|
children: string;
|
|
@@ -382,16 +382,16 @@ interface LinkProps extends AccessibleProps {
|
|
|
382
382
|
/** A method to execute when this component is clicked */
|
|
383
383
|
onClick?: (e?: any) => void;
|
|
384
384
|
}
|
|
385
|
-
declare const Link: FC<LinkProps>;
|
|
386
|
-
|
|
387
|
-
declare const Loader: FC;
|
|
388
|
-
|
|
385
|
+
declare const Link: FC<LinkProps>;
|
|
386
|
+
|
|
387
|
+
declare const Loader: FC;
|
|
388
|
+
|
|
389
389
|
interface LogoProps extends AccessibleProps {
|
|
390
390
|
type?: 'mark_red' | 'mark_white' | 'standard_white' | 'standard_black' | 'standard_full' | 'standard_reversed';
|
|
391
391
|
height?: string;
|
|
392
392
|
}
|
|
393
|
-
declare const Logo: FC<LogoProps>;
|
|
394
|
-
|
|
393
|
+
declare const Logo: FC<LogoProps>;
|
|
394
|
+
|
|
395
395
|
interface StepProps {
|
|
396
396
|
label: string;
|
|
397
397
|
complete?: boolean;
|
|
@@ -401,8 +401,8 @@ interface ProgressBarProps {
|
|
|
401
401
|
/** */
|
|
402
402
|
steps: StepProps[];
|
|
403
403
|
}
|
|
404
|
-
declare const ProgressBar: FC<ProgressBarProps>;
|
|
405
|
-
|
|
404
|
+
declare const ProgressBar: FC<ProgressBarProps>;
|
|
405
|
+
|
|
406
406
|
interface ButtonProps {
|
|
407
407
|
disabled?: boolean;
|
|
408
408
|
children: string;
|
|
@@ -431,8 +431,8 @@ interface ModalProps extends AccessibleProps {
|
|
|
431
431
|
/** Display steps at the top of the modal */
|
|
432
432
|
steps?: StepProps[];
|
|
433
433
|
}
|
|
434
|
-
declare const Modal: FC<ModalProps>;
|
|
435
|
-
|
|
434
|
+
declare const Modal: FC<ModalProps>;
|
|
435
|
+
|
|
436
436
|
interface OptionProps$2 {
|
|
437
437
|
label?: string;
|
|
438
438
|
value: string | number;
|
|
@@ -450,8 +450,8 @@ interface MultiSelectProps extends AccessibleProps {
|
|
|
450
450
|
showSelectAll?: boolean;
|
|
451
451
|
style?: styleProps$1;
|
|
452
452
|
}
|
|
453
|
-
declare const MultiSelect: FC<MultiSelectProps>;
|
|
454
|
-
|
|
453
|
+
declare const MultiSelect: FC<MultiSelectProps>;
|
|
454
|
+
|
|
455
455
|
interface TagProps extends AccessibleProps {
|
|
456
456
|
/** It is used to select tag-type either default or removable. */
|
|
457
457
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'SUBTLE_GRAY';
|
|
@@ -462,8 +462,8 @@ interface TagProps extends AccessibleProps {
|
|
|
462
462
|
/** It is callback function called when user wants to close the tag. */
|
|
463
463
|
removable?: boolean;
|
|
464
464
|
}
|
|
465
|
-
declare const Tag: FC<TagProps>;
|
|
466
|
-
|
|
465
|
+
declare const Tag: FC<TagProps>;
|
|
466
|
+
|
|
467
467
|
interface PageHeaderProps {
|
|
468
468
|
title?: string;
|
|
469
469
|
breadcrumbs?: Array<{
|
|
@@ -487,15 +487,15 @@ interface PageHeaderProps {
|
|
|
487
487
|
};
|
|
488
488
|
tag?: TagProps;
|
|
489
489
|
}
|
|
490
|
-
declare const PageHeader: FC<PageHeaderProps>;
|
|
491
|
-
|
|
490
|
+
declare const PageHeader: FC<PageHeaderProps>;
|
|
491
|
+
|
|
492
492
|
interface PaginationProps extends AccessibleProps {
|
|
493
493
|
currentPage: number;
|
|
494
494
|
onClick: (e?: any) => void;
|
|
495
495
|
pageCount: number;
|
|
496
496
|
}
|
|
497
|
-
declare const Pagination: FC<PaginationProps>;
|
|
498
|
-
|
|
497
|
+
declare const Pagination: FC<PaginationProps>;
|
|
498
|
+
|
|
499
499
|
interface RadioProps extends AccessibleProps {
|
|
500
500
|
/** It is used to give label to radio. */
|
|
501
501
|
children: string | number;
|
|
@@ -512,8 +512,8 @@ interface RadioProps extends AccessibleProps {
|
|
|
512
512
|
/** Display a tooltip next to the label */
|
|
513
513
|
tooltip?: TooltipProps;
|
|
514
514
|
}
|
|
515
|
-
declare const Radio: FC<RadioProps>;
|
|
516
|
-
|
|
515
|
+
declare const Radio: FC<RadioProps>;
|
|
516
|
+
|
|
517
517
|
interface OptionProps$1 {
|
|
518
518
|
label?: string;
|
|
519
519
|
value: string | number;
|
|
@@ -524,8 +524,8 @@ interface RadioListProps extends AccessibleProps {
|
|
|
524
524
|
options: OptionProps$1[];
|
|
525
525
|
value: string;
|
|
526
526
|
}
|
|
527
|
-
declare const RadioList: FC<RadioListProps>;
|
|
528
|
-
|
|
527
|
+
declare const RadioList: FC<RadioListProps>;
|
|
528
|
+
|
|
529
529
|
interface OptionProps {
|
|
530
530
|
/** It is used to give label to option. */
|
|
531
531
|
label?: string;
|
|
@@ -557,8 +557,8 @@ interface SelectProps extends AccessibleProps {
|
|
|
557
557
|
/** It is used to change value when an option is clicked. */
|
|
558
558
|
onChange: (e: any) => void;
|
|
559
559
|
}
|
|
560
|
-
declare const Select: FC<SelectProps>;
|
|
561
|
-
|
|
560
|
+
declare const Select: FC<SelectProps>;
|
|
561
|
+
|
|
562
562
|
interface RowObject {
|
|
563
563
|
[key: string]: any;
|
|
564
564
|
}
|
|
@@ -581,8 +581,8 @@ interface TableProps extends AccessibleProps {
|
|
|
581
581
|
onSortChange?: (e?: any) => void;
|
|
582
582
|
tableLayout?: string;
|
|
583
583
|
}
|
|
584
|
-
declare const Table: FC<TableProps>;
|
|
585
|
-
|
|
584
|
+
declare const Table: FC<TableProps>;
|
|
585
|
+
|
|
586
586
|
interface TabProps extends AccessibleProps {
|
|
587
587
|
badgeCount?: number;
|
|
588
588
|
errorBadge?: boolean;
|
|
@@ -593,16 +593,16 @@ interface TabProps extends AccessibleProps {
|
|
|
593
593
|
interface TabsProps extends AccessibleProps {
|
|
594
594
|
tabs: TabProps[];
|
|
595
595
|
}
|
|
596
|
-
declare const Tabs: FC<TabsProps>;
|
|
597
|
-
|
|
596
|
+
declare const Tabs: FC<TabsProps>;
|
|
597
|
+
|
|
598
598
|
interface ToggleProps extends AccessibleProps {
|
|
599
599
|
/** It is used to check whether Toggle is checked or not */
|
|
600
600
|
on: boolean;
|
|
601
601
|
/** Pass a callback then fires when user change value */
|
|
602
602
|
onClick: (e?: any) => void;
|
|
603
603
|
}
|
|
604
|
-
declare const Toggle: FC<ToggleProps>;
|
|
605
|
-
|
|
604
|
+
declare const Toggle: FC<ToggleProps>;
|
|
605
|
+
|
|
606
606
|
interface ZeroStateProps extends AccessibleProps {
|
|
607
607
|
/** The SVG path of the icon to show */
|
|
608
608
|
icon: string;
|
|
@@ -617,8 +617,8 @@ interface ZeroStateProps extends AccessibleProps {
|
|
|
617
617
|
onClick: (e?: any) => void;
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
declare const ZeroState: FC<ZeroStateProps>;
|
|
621
|
-
|
|
620
|
+
declare const ZeroState: FC<ZeroStateProps>;
|
|
621
|
+
|
|
622
622
|
declare const getAgesFromDob: (dob: string) => {
|
|
623
623
|
calculated_nearest_age: number | null;
|
|
624
624
|
calculated_current_age: number | null;
|
|
@@ -632,8 +632,8 @@ declare const getYears: () => {
|
|
|
632
632
|
declare const validateEmail: (email: string) => boolean;
|
|
633
633
|
declare const validatePhone: (phone: string) => boolean;
|
|
634
634
|
declare const formatAsPhone: (number: string) => string;
|
|
635
|
-
declare const formatAsSsn: (number: string) => string;
|
|
636
|
-
|
|
635
|
+
declare const formatAsSsn: (number: string) => string;
|
|
636
|
+
|
|
637
637
|
declare const Colors: {
|
|
638
638
|
PRIMARY: {
|
|
639
639
|
Hex: string;
|
|
@@ -685,6 +685,6 @@ declare const EditableTheme: {
|
|
|
685
685
|
Hex: string;
|
|
686
686
|
Rgb: string;
|
|
687
687
|
};
|
|
688
|
-
};
|
|
689
|
-
|
|
690
|
-
export { AccessibleProps, Accordion, ActionDialog, Alert, AppHeader, AppMenu, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Colors, Copy, DatePicker, Drawer, EditableTheme, Field, FieldGroup, FileUpload, FontSizes, FontStyles, Heading, Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, ProgressBar, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState, formatAsPhone, formatAsSsn, getAgesFromDob, getDaysForMonth, getYears, validateEmail, validatePhone };
|
|
688
|
+
};
|
|
689
|
+
|
|
690
|
+
export { AccessibleProps, Accordion, ActionDialog, Alert, AppHeader, AppMenu, BulkActionBar, Button, ButtonMenu, Checkbox, Checklist, Colors, Copy, DatePicker, Drawer, EditableTheme, Field, FieldGroup, FileUpload, FontSizes, FontStyles, Heading, Input, Link, Loader, Logo, Modal, MoreMenu, MultiSelect, PageHeader, Pagination, ProgressBar, Radio, RadioList, Select, Table, Tabs, Tag, Toggle, Tooltip, ZeroState, formatAsPhone, formatAsSsn, getAgesFromDob, getDaysForMonth, getYears, validateEmail, validatePhone };
|