@hexure/ui 1.2.0 → 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.
Files changed (40) hide show
  1. package/dist/cjs/index.js +179 -124
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/types/components/Alert/Alert.d.ts +6 -0
  4. package/dist/cjs/types/components/Button/Button.d.ts +7 -2
  5. package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +27 -0
  6. package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
  7. package/dist/cjs/types/components/DatePicker/index.d.ts +1 -0
  8. package/dist/cjs/types/components/Input/Input.d.ts +1 -0
  9. package/dist/cjs/types/components/Logo/Logo.d.ts +16 -0
  10. package/dist/cjs/types/components/Logo/Logo.stories.d.ts +5 -0
  11. package/dist/cjs/types/components/Logo/index.d.ts +1 -0
  12. package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +13 -0
  13. package/dist/cjs/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
  14. package/dist/cjs/types/components/MoreMenu/index.d.ts +1 -0
  15. package/dist/cjs/types/components/Select/Select.d.ts +9 -0
  16. package/dist/cjs/types/components/ZeroState/ZeroState.d.ts +18 -0
  17. package/dist/cjs/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
  18. package/dist/cjs/types/components/ZeroState/index.d.ts +1 -0
  19. package/dist/cjs/types/index.d.ts +2 -0
  20. package/dist/esm/index.js +178 -125
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/types/components/Alert/Alert.d.ts +6 -0
  23. package/dist/esm/types/components/Button/Button.d.ts +7 -2
  24. package/dist/esm/types/components/DatePicker/DatePicker.d.ts +27 -0
  25. package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
  26. package/dist/esm/types/components/DatePicker/index.d.ts +1 -0
  27. package/dist/esm/types/components/Input/Input.d.ts +1 -0
  28. package/dist/esm/types/components/Logo/Logo.d.ts +16 -0
  29. package/dist/esm/types/components/Logo/Logo.stories.d.ts +5 -0
  30. package/dist/esm/types/components/Logo/index.d.ts +1 -0
  31. package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +13 -0
  32. package/dist/esm/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
  33. package/dist/esm/types/components/MoreMenu/index.d.ts +1 -0
  34. package/dist/esm/types/components/Select/Select.d.ts +9 -0
  35. package/dist/esm/types/components/ZeroState/ZeroState.d.ts +18 -0
  36. package/dist/esm/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
  37. package/dist/esm/types/components/ZeroState/index.d.ts +1 -0
  38. package/dist/esm/types/index.d.ts +2 -0
  39. package/dist/index.d.ts +47 -3
  40. package/package.json +6 -5
@@ -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;
@@ -1,19 +1,24 @@
1
1
  import { FC } from 'react';
2
2
  import { AccessibleProps } from '../../utils/Accessibility';
3
3
  export interface ButtonProps extends AccessibleProps {
4
+ /** Display a number badge on the right side of the button */
5
+ badge?: number;
4
6
  /** Define the button label. */
5
7
  children?: string;
6
8
  /** If enabled, the button will be disabled */
7
9
  disabled?: boolean;
8
10
  /** The SVG path of the icon to show */
9
11
  icon?: string;
12
+ /** Adjust the button to work within a <form> tag. Ignores onClick, sets type='form' */
13
+ isForm?: boolean;
14
+ /** Set the margin of the button as needed */
10
15
  margin?: string;
11
16
  /** Prop to pass a that fires when the user does a click. */
12
17
  onClick?: (e?: any) => void;
13
18
  /** If enabled, the small button format will be used. */
14
19
  small?: boolean;
15
- /** Define which button type to display. By default the Primary button will be used. */
16
- type?: 'primary' | 'secondary' | 'red';
20
+ /** Define which button format to display. By default the Primary button will be used. */
21
+ format?: 'primary' | 'secondary' | 'red';
17
22
  }
18
23
  declare const Button: FC<ButtonProps>;
19
24
  export default Button;
@@ -0,0 +1,27 @@
1
+ import { FC } from 'react';
2
+ import { AccessibleProps } from '../../utils/Accessibility';
3
+ export interface DateProps extends AccessibleProps {
4
+ /** If it's value is true then select is disabled. */
5
+ readOnly?: boolean;
6
+ /** It is used to show error messages when it's value is false. */
7
+ invalid?: boolean;
8
+ /** It is used to set maxxiumum year. */
9
+ maxYear?: number;
10
+ /** It is used to set minumum year. */
11
+ minYear?: number;
12
+ /** It is used to set the date. */
13
+ date?: {
14
+ month: number;
15
+ day: number;
16
+ year: number;
17
+ };
18
+ /** It is used to read value for border rasius & flex grow */
19
+ style?: {
20
+ borderRadius?: string;
21
+ flexGrow?: number;
22
+ };
23
+ /** It is used to get selected value */
24
+ onChange: (e: any) => void;
25
+ }
26
+ declare const DatePicker: FC<DateProps>;
27
+ export default DatePicker;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./DatePicker").DateProps>>;
4
+ export default _default;
5
+ export declare const _DatePicker: ComponentStory<React.FC<import("./DatePicker").DateProps>>;
@@ -0,0 +1 @@
1
+ export { default } from './DatePicker';
@@ -3,6 +3,7 @@ import { AccessibleProps } from '../../utils/Accessibility';
3
3
  export interface InputProps extends AccessibleProps {
4
4
  format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
5
5
  height?: string;
6
+ suffix?: string;
6
7
  invalid?: boolean;
7
8
  max?: number;
8
9
  maxLength?: number;
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+ import { AccessibleProps } from '../../utils/Accessibility';
3
+ export interface LogoProps extends AccessibleProps {
4
+ type?: 'mark_red' | 'mark_white' | 'standard_white' | 'standard_black' | 'standard_full' | 'standard_reversed';
5
+ height?: string;
6
+ }
7
+ export interface colorProps {
8
+ fill_1: string;
9
+ fill_2: string;
10
+ fill_3: string;
11
+ }
12
+ export interface colorObj {
13
+ [key: string]: colorProps;
14
+ }
15
+ declare const Logo: FC<LogoProps>;
16
+ export default Logo;
@@ -0,0 +1,5 @@
1
+ import { ComponentMeta, ComponentStory } from '@storybook/react';
2
+ import React from 'react';
3
+ declare const _default: ComponentMeta<React.FC<import("./Logo").LogoProps>>;
4
+ export default _default;
5
+ export declare const _Logo: ComponentStory<React.FC<import("./Logo").LogoProps>>;
@@ -0,0 +1 @@
1
+ export { default } from './Logo';
@@ -0,0 +1,13 @@
1
+ import { FC } from 'react';
2
+ import { AccessibleProps } from '../../utils/Accessibility';
3
+ interface MenuItemProps extends AccessibleProps {
4
+ icon?: string;
5
+ label?: string;
6
+ onClick: (e?: any) => void;
7
+ }
8
+ export interface MoreMenuProps extends AccessibleProps {
9
+ menuItems: MenuItemProps[];
10
+ maxHeight: string | number;
11
+ }
12
+ declare const MoreMenu: FC<MoreMenuProps>;
13
+ export default MoreMenu;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./MoreMenu").MoreMenuProps>>;
4
+ export default _default;
5
+ export declare const _MoreMenu: ComponentStory<React.FC<import("./MoreMenu").MoreMenuProps>>;
@@ -0,0 +1 @@
1
+ export { default } from './MoreMenu';
@@ -10,6 +10,10 @@ export interface OptionGroupProps {
10
10
  options: OptionProps[];
11
11
  label: string;
12
12
  }
13
+ export interface styleProps {
14
+ borderRadius?: string;
15
+ flexGrow?: number;
16
+ }
13
17
  export interface SelectProps extends AccessibleProps {
14
18
  /** It is used to give options from which value is selected. */
15
19
  options?: OptionProps[];
@@ -21,6 +25,11 @@ export interface SelectProps extends AccessibleProps {
21
25
  invalid?: boolean;
22
26
  /** It is used to read value for selected option. */
23
27
  value: string;
28
+ /** It is used to read value for border rasius & flex grow */
29
+ style?: {
30
+ borderRadius?: string;
31
+ flexGrow?: number;
32
+ };
24
33
  /** It is used to change value when an option is clicked. */
25
34
  onChange: (e: any) => void;
26
35
  }
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { AccessibleProps } from '../../utils/Accessibility';
3
+ export interface ZeroStateProps extends AccessibleProps {
4
+ /** The SVG path of the icon to show */
5
+ icon: string;
6
+ /** It is used to give title. */
7
+ title: string;
8
+ /** It is used to give description. */
9
+ description?: string;
10
+ /** It is used to pass object to button. */
11
+ action?: {
12
+ children: string;
13
+ icon?: string;
14
+ onClick: (e?: any) => void;
15
+ };
16
+ }
17
+ declare const ZeroState: FC<ZeroStateProps>;
18
+ export default ZeroState;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ComponentStory, ComponentMeta } from '@storybook/react';
3
+ declare const _default: ComponentMeta<React.FC<import("./ZeroState").ZeroStateProps>>;
4
+ export default _default;
5
+ export declare const _ZeroState: ComponentStory<React.FC<import("./ZeroState").ZeroStateProps>>;
@@ -0,0 +1 @@
1
+ export { default } from './ZeroState';
@@ -11,6 +11,7 @@ export { default as Field } from './components/Field';
11
11
  export { default as Heading } from './components/Heading';
12
12
  export { default as Input } from './components/Input';
13
13
  export { default as Modal } from './components/Modal';
14
+ export { default as MoreMenu } from './components/MoreMenu';
14
15
  export { default as MultiSelect } from './components/MultiSelect';
15
16
  export { default as Pagination } from './components/Pagination';
16
17
  export { default as Radio } from './components/Radio';
@@ -20,3 +21,4 @@ export { default as Table } from './components/Table';
20
21
  export { default as Tabs } from './components/Tabs';
21
22
  export { default as Tag } from './components/Tag';
22
23
  export { default as Toggle } from './components/Toggle';
24
+ export { default as ZeroState } from './components/ZeroState';
package/dist/index.d.ts CHANGED
@@ -43,12 +43,18 @@ interface ActionDialogProps extends AccessibleProps {
43
43
  }
44
44
  declare const ActionDialog: FC<ActionDialogProps>;
45
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
59
  declare const Alert: FC<AlertProps>;
54
60
 
@@ -67,19 +73,24 @@ interface BulkActionBarProps extends AccessibleProps {
67
73
  declare const BulkActionBar: FC<BulkActionBarProps>;
68
74
 
69
75
  interface ButtonProps$2 extends AccessibleProps {
76
+ /** Display a number badge on the right side of the button */
77
+ badge?: number;
70
78
  /** Define the button label. */
71
79
  children?: string;
72
80
  /** If enabled, the button will be disabled */
73
81
  disabled?: boolean;
74
82
  /** The SVG path of the icon to show */
75
83
  icon?: string;
84
+ /** Adjust the button to work within a <form> tag. Ignores onClick, sets type='form' */
85
+ isForm?: boolean;
86
+ /** Set the margin of the button as needed */
76
87
  margin?: string;
77
88
  /** Prop to pass a that fires when the user does a click. */
78
89
  onClick?: (e?: any) => void;
79
90
  /** If enabled, the small button format will be used. */
80
91
  small?: boolean;
81
- /** Define which button type to display. By default the Primary button will be used. */
82
- type?: 'primary' | 'secondary' | 'red';
92
+ /** Define which button format to display. By default the Primary button will be used. */
93
+ format?: 'primary' | 'secondary' | 'red';
83
94
  }
84
95
  declare const Button: FC<ButtonProps$2>;
85
96
 
@@ -187,6 +198,7 @@ declare const Heading: FC<HeadingProps>;
187
198
  interface InputProps extends AccessibleProps {
188
199
  format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
189
200
  height?: string;
201
+ suffix?: string;
190
202
  invalid?: boolean;
191
203
  max?: number;
192
204
  maxLength?: number;
@@ -223,6 +235,17 @@ interface ModalProps extends AccessibleProps {
223
235
  }
224
236
  declare const Modal: FC<ModalProps>;
225
237
 
238
+ interface MenuItemProps extends AccessibleProps {
239
+ icon?: string;
240
+ label?: string;
241
+ onClick: (e?: any) => void;
242
+ }
243
+ interface MoreMenuProps extends AccessibleProps {
244
+ menuItems: MenuItemProps[];
245
+ maxHeight: string | number;
246
+ }
247
+ declare const MoreMenu: FC<MoreMenuProps>;
248
+
226
249
  interface OptionProps$2 {
227
250
  label?: string;
228
251
  value: string | number;
@@ -291,6 +314,11 @@ interface SelectProps extends AccessibleProps {
291
314
  invalid?: boolean;
292
315
  /** It is used to read value for selected option. */
293
316
  value: string;
317
+ /** It is used to read value for border rasius & flex grow */
318
+ style?: {
319
+ borderRadius?: string;
320
+ flexGrow?: number;
321
+ };
294
322
  /** It is used to change value when an option is clicked. */
295
323
  onChange: (e: any) => void;
296
324
  }
@@ -348,4 +376,20 @@ interface ToggleProps extends AccessibleProps {
348
376
  }
349
377
  declare const Toggle: FC<ToggleProps>;
350
378
 
351
- export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input, Modal, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle };
379
+ interface ZeroStateProps extends AccessibleProps {
380
+ /** The SVG path of the icon to show */
381
+ icon: string;
382
+ /** It is used to give title. */
383
+ title: string;
384
+ /** It is used to give description. */
385
+ description?: string;
386
+ /** It is used to pass object to button. */
387
+ action?: {
388
+ children: string;
389
+ icon?: string;
390
+ onClick: (e?: any) => void;
391
+ };
392
+ }
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexure/ui",
3
- "version": "1.2.0",
3
+ "version": "1.3.2",
4
4
  "description": "A library of shared UI components used within Hexure products.",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c rollup.config.mjs",
@@ -69,21 +69,22 @@
69
69
  "@mdi/font": "^7.0.96",
70
70
  "@mdi/js": "^7.1.96",
71
71
  "@mdi/react": "^1.6.1",
72
+ "dayjs": "^1.11.8",
72
73
  "moment": "^2.29.4",
73
74
  "numeral": "^2.0.6",
74
75
  "styled-components": "^5.3.6"
75
76
  },
76
77
  "peerDependencies": {
77
- "react": ">=16.14.0",
78
- "react-dom": ">=16.14.0",
79
78
  "@mdi/font": ">=7.0.96",
80
79
  "@mdi/js": ">=7.1.96",
81
80
  "@mdi/react": ">=1.6.1",
82
81
  "moment": ">=2.29.4",
83
- "numeral": ">=2.0.6"
82
+ "numeral": ">=2.0.6",
83
+ "react": ">=16.14.0",
84
+ "react-dom": ">=16.14.0"
84
85
  },
85
86
  "repository": {
86
87
  "type": "git",
87
88
  "url": "https://InsuranceTechnologies@dev.azure.com/InsuranceTechnologies/Enterprise/_git/InsTech.UI.Library"
88
89
  }
89
- }
90
+ }