@hexure/ui 1.8.0 → 1.8.1

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.
@@ -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,29 @@ 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
+ }
122
+ declare const ButtonMenu: FC<ButtonMenuProps>;
123
+
103
124
  interface CheckboxProps extends AccessibleProps {
104
125
  /** It is used to give label to checkbox. */
105
126
  children?: string;
@@ -110,8 +131,8 @@ interface CheckboxProps extends AccessibleProps {
110
131
  /** It is used to change value of checkbox. */
111
132
  onChange: (e?: any) => void;
112
133
  }
113
- declare const Checkbox: FC<CheckboxProps>;
114
-
134
+ declare const Checkbox: FC<CheckboxProps>;
135
+
115
136
  interface OptionProps$3 {
116
137
  label?: string;
117
138
  value: string | number;
@@ -123,8 +144,8 @@ interface ChecklistProps extends AccessibleProps {
123
144
  selected: (string | number)[];
124
145
  showSelectAll?: boolean;
125
146
  }
126
- declare const Checklist: FC<ChecklistProps>;
127
-
147
+ declare const Checklist: FC<ChecklistProps>;
148
+
128
149
  interface CopyProps extends AccessibleProps {
129
150
  /** Set the text to be displayed */
130
151
  children: string;
@@ -138,8 +159,8 @@ interface CopyProps extends AccessibleProps {
138
159
  /** Set the color of the copy based on the design system color pallette */
139
160
  color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
140
161
  }
141
- declare const Copy: FC<CopyProps>;
142
-
162
+ declare const Copy: FC<CopyProps>;
163
+
143
164
  interface styleProps$3 {
144
165
  width?: number | string;
145
166
  }
@@ -159,8 +180,8 @@ interface DateProps extends AccessibleProps {
159
180
  /** Override default styles */
160
181
  style?: styleProps$3;
161
182
  }
162
- declare const DatePicker: FC<DateProps>;
163
-
183
+ declare const DatePicker: FC<DateProps>;
184
+
164
185
  interface ButtonProps$1 extends AccessibleProps {
165
186
  disabled: boolean;
166
187
  children: string;
@@ -187,8 +208,8 @@ interface DrawerProps extends AccessibleProps {
187
208
  /** It is used to close drawer. */
188
209
  onClose: (e?: any) => void;
189
210
  }
190
- declare const Drawer: FC<DrawerProps>;
191
-
211
+ declare const Drawer: FC<DrawerProps>;
212
+
192
213
  interface TooltipProps {
193
214
  /** It is used to give label to tag. */
194
215
  children: string;
@@ -197,8 +218,8 @@ interface TooltipProps {
197
218
  /** Override the default content width of 240px */
198
219
  width?: string;
199
220
  }
200
- declare const Tooltip: FC<TooltipProps>;
201
-
221
+ declare const Tooltip: FC<TooltipProps>;
222
+
202
223
  interface ActionProps {
203
224
  label: string;
204
225
  onClick: (e?: any) => void;
@@ -220,8 +241,8 @@ interface FieldProps extends AccessibleProps {
220
241
  /** Display a tooltip next to the label */
221
242
  tooltip?: TooltipProps;
222
243
  }
223
- declare const Field: FC<FieldProps>;
224
-
244
+ declare const Field: FC<FieldProps>;
245
+
225
246
  interface FileUploadProps {
226
247
  /** A method to call when files are added/removed. Return the new file or array of files. */
227
248
  onChange?: (files: Array<File>) => void;
@@ -242,8 +263,8 @@ interface ErrorObject {
242
263
  file: File;
243
264
  message: string;
244
265
  }
245
- declare const FileUpload: FC<FileUploadProps>;
246
-
266
+ declare const FileUpload: FC<FileUploadProps>;
267
+
247
268
  interface HeadingProps extends AccessibleProps {
248
269
  /** Toggle between bold and normal font weights */
249
270
  bold?: boolean;
@@ -256,8 +277,8 @@ interface HeadingProps extends AccessibleProps {
256
277
  /** Set the type of heading to display: primary, secondary, tertiary */
257
278
  type?: 'primary' | 'secondary' | 'tertiary';
258
279
  }
259
- declare const Heading: FC<HeadingProps>;
260
-
280
+ declare const Heading: FC<HeadingProps>;
281
+
261
282
  interface styleProps$2 {
262
283
  width?: number | string;
263
284
  }
@@ -295,8 +316,8 @@ interface InputProps extends AccessibleProps {
295
316
  /** Set the value of the input. This should be used by the parent component to control the input's value. */
296
317
  value?: string;
297
318
  }
298
- declare const Input: FC<InputProps>;
299
-
319
+ declare const Input: FC<InputProps>;
320
+
300
321
  interface LinkProps extends AccessibleProps {
301
322
  /** Set the text to be displayed */
302
323
  children: string;
@@ -305,14 +326,14 @@ interface LinkProps extends AccessibleProps {
305
326
  /** A method to execute when this component is clicked */
306
327
  onClick?: (e?: any) => void;
307
328
  }
308
- declare const Link: FC<LinkProps>;
309
-
329
+ declare const Link: FC<LinkProps>;
330
+
310
331
  interface LogoProps extends AccessibleProps {
311
332
  type?: 'mark_red' | 'mark_white' | 'standard_white' | 'standard_black' | 'standard_full' | 'standard_reversed';
312
333
  height?: string;
313
334
  }
314
- declare const Logo: FC<LogoProps>;
315
-
335
+ declare const Logo: FC<LogoProps>;
336
+
316
337
  interface ButtonProps {
317
338
  disabled?: boolean;
318
339
  children: string;
@@ -343,19 +364,8 @@ interface ModalProps extends AccessibleProps {
343
364
  /** Display steps at the top of the modal */
344
365
  steps?: StepProps[];
345
366
  }
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
-
367
+ declare const Modal: FC<ModalProps>;
368
+
359
369
  interface OptionProps$2 {
360
370
  label?: string;
361
371
  value: string | number;
@@ -373,15 +383,37 @@ interface MultiSelectProps extends AccessibleProps {
373
383
  showSelectAll?: boolean;
374
384
  style?: styleProps$1;
375
385
  }
376
- declare const MultiSelect: FC<MultiSelectProps>;
377
-
386
+ declare const MultiSelect: FC<MultiSelectProps>;
387
+
388
+ interface PageHeaderProps {
389
+ title?: string;
390
+ breadcrumbs?: Array<{
391
+ label: string;
392
+ onClick?: (e: any) => void;
393
+ }>;
394
+ actions?: Array<{
395
+ disabled?: boolean;
396
+ format?: 'primary' | 'secondary' | 'red';
397
+ icon?: string;
398
+ label: string;
399
+ onClick?: (e: any) => void;
400
+ }>;
401
+ buttonMenu?: {
402
+ disabled?: boolean;
403
+ icon?: string;
404
+ label: string;
405
+ menuItems: Array<MenuItemProps>;
406
+ };
407
+ }
408
+ declare const PageHeader: FC<PageHeaderProps>;
409
+
378
410
  interface PaginationProps extends AccessibleProps {
379
411
  currentPage: number;
380
412
  onClick: (e?: any) => void;
381
413
  pageCount: number;
382
414
  }
383
- declare const Pagination: FC<PaginationProps>;
384
-
415
+ declare const Pagination: FC<PaginationProps>;
416
+
385
417
  interface RadioProps extends AccessibleProps {
386
418
  /** It is used to give label to radio. */
387
419
  children: string | number;
@@ -393,8 +425,8 @@ interface RadioProps extends AccessibleProps {
393
425
  onChange: (e?: any) => void;
394
426
  value: string | number;
395
427
  }
396
- declare const Radio: FC<RadioProps>;
397
-
428
+ declare const Radio: FC<RadioProps>;
429
+
398
430
  interface OptionProps$1 {
399
431
  label?: string;
400
432
  value: string | number;
@@ -405,8 +437,8 @@ interface RadioListProps extends AccessibleProps {
405
437
  options: OptionProps$1[];
406
438
  value: string;
407
439
  }
408
- declare const RadioList: FC<RadioListProps>;
409
-
440
+ declare const RadioList: FC<RadioListProps>;
441
+
410
442
  interface OptionProps {
411
443
  /** It is used to give label to option. */
412
444
  label?: string;
@@ -438,8 +470,8 @@ interface SelectProps extends AccessibleProps {
438
470
  /** It is used to change value when an option is clicked. */
439
471
  onChange: (e: any) => void;
440
472
  }
441
- declare const Select: FC<SelectProps>;
442
-
473
+ declare const Select: FC<SelectProps>;
474
+
443
475
  interface RowObject {
444
476
  [key: string]: any;
445
477
  }
@@ -461,8 +493,8 @@ interface TableProps extends AccessibleProps {
461
493
  onSortChange?: (e?: any) => void;
462
494
  tableLayout?: string;
463
495
  }
464
- declare const Table: FC<TableProps>;
465
-
496
+ declare const Table: FC<TableProps>;
497
+
466
498
  interface TabProps extends AccessibleProps {
467
499
  badgeCount?: number;
468
500
  errorBadge?: boolean;
@@ -473,8 +505,8 @@ interface TabProps extends AccessibleProps {
473
505
  interface TabsProps extends AccessibleProps {
474
506
  tabs: TabProps[];
475
507
  }
476
- declare const Tabs: FC<TabsProps>;
477
-
508
+ declare const Tabs: FC<TabsProps>;
509
+
478
510
  interface TagProps extends AccessibleProps {
479
511
  /** It is used to select tag-type either default or removable. */
480
512
  color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'SUBTLE_GRAY';
@@ -485,16 +517,16 @@ interface TagProps extends AccessibleProps {
485
517
  /** It is callback function called when user wants to close the tag. */
486
518
  removable?: boolean;
487
519
  }
488
- declare const Tag: FC<TagProps>;
489
-
520
+ declare const Tag: FC<TagProps>;
521
+
490
522
  interface ToggleProps extends AccessibleProps {
491
523
  /** It is used to check whether Toggle is checked or not */
492
524
  on: boolean;
493
525
  /** Pass a callback then fires when user change value */
494
526
  onClick: (e?: any) => void;
495
527
  }
496
- declare const Toggle: FC<ToggleProps>;
497
-
528
+ declare const Toggle: FC<ToggleProps>;
529
+
498
530
  interface ZeroStateProps extends AccessibleProps {
499
531
  /** The SVG path of the icon to show */
500
532
  icon: string;
@@ -509,6 +541,6 @@ interface ZeroStateProps extends AccessibleProps {
509
541
  onClick: (e?: any) => void;
510
542
  };
511
543
  }
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 };
544
+ declare const ZeroState: FC<ZeroStateProps>;
545
+
546
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexure/ui",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "A library of shared UI components used within Hexure products.",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c rollup.config.mjs",