@hexure/ui 1.1.2 → 1.3.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.
- package/README.md +10 -9
- package/dist/cjs/index.js +211 -116
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Button/Button.d.ts +7 -2
- package/dist/cjs/types/components/Copy/Copy.d.ts +2 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.d.ts +27 -0
- package/dist/cjs/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/cjs/types/components/DatePicker/index.d.ts +1 -0
- package/dist/cjs/types/components/Drawer/Drawer.d.ts +28 -0
- package/dist/cjs/types/components/Drawer/Drawer.stories.d.ts +5 -0
- package/dist/cjs/types/components/Drawer/index.d.ts +1 -0
- package/dist/cjs/types/components/Input/Input.d.ts +1 -0
- package/dist/cjs/types/components/Logo/Logo.d.ts +16 -0
- package/dist/cjs/types/components/Logo/Logo.stories.d.ts +5 -0
- package/dist/cjs/types/components/Logo/index.d.ts +1 -0
- package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +13 -0
- package/dist/cjs/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
- package/dist/cjs/types/components/MoreMenu/index.d.ts +1 -0
- package/dist/cjs/types/components/Select/Select.d.ts +9 -0
- package/dist/cjs/types/components/ZeroState/ZeroState.d.ts +18 -0
- package/dist/cjs/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
- package/dist/cjs/types/components/ZeroState/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +3 -0
- package/dist/esm/index.js +209 -117
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Button/Button.d.ts +7 -2
- package/dist/esm/types/components/Copy/Copy.d.ts +2 -0
- package/dist/esm/types/components/DatePicker/DatePicker.d.ts +27 -0
- package/dist/esm/types/components/DatePicker/DatePicker.stories.d.ts +5 -0
- package/dist/esm/types/components/DatePicker/index.d.ts +1 -0
- package/dist/esm/types/components/Drawer/Drawer.d.ts +28 -0
- package/dist/esm/types/components/Drawer/Drawer.stories.d.ts +5 -0
- package/dist/esm/types/components/Drawer/index.d.ts +1 -0
- package/dist/esm/types/components/Input/Input.d.ts +1 -0
- package/dist/esm/types/components/Logo/Logo.d.ts +16 -0
- package/dist/esm/types/components/Logo/Logo.stories.d.ts +5 -0
- package/dist/esm/types/components/Logo/index.d.ts +1 -0
- package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +13 -0
- package/dist/esm/types/components/MoreMenu/MoreMenu.stories.d.ts +5 -0
- package/dist/esm/types/components/MoreMenu/index.d.ts +1 -0
- package/dist/esm/types/components/Select/Select.d.ts +9 -0
- package/dist/esm/types/components/ZeroState/ZeroState.d.ts +18 -0
- package/dist/esm/types/components/ZeroState/ZeroState.stories.d.ts +5 -0
- package/dist/esm/types/components/ZeroState/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/index.d.ts +121 -55
- package/package.json +6 -5
|
@@ -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
|
|
16
|
-
|
|
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;
|
|
@@ -10,6 +10,8 @@ export interface CopyProps extends AccessibleProps {
|
|
|
10
10
|
padding?: string;
|
|
11
11
|
/** Set the type of copy to display */
|
|
12
12
|
type?: 'default' | 'bold' | 'italic' | 'underline' | 'line-through' | 'small';
|
|
13
|
+
/** Set the color of the copy based on the design system color pallette */
|
|
14
|
+
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
13
15
|
}
|
|
14
16
|
declare const Copy: FC<CopyProps>;
|
|
15
17
|
export default Copy;
|
|
@@ -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';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
|
+
interface ButtonProps extends AccessibleProps {
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
children: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
onClick: (e?: any) => void;
|
|
8
|
+
tabIndex?: number;
|
|
9
|
+
}
|
|
10
|
+
export interface DrawerProps extends AccessibleProps {
|
|
11
|
+
primaryButton: ButtonProps;
|
|
12
|
+
secondaryButton?: ButtonProps;
|
|
13
|
+
tertiaryButton?: ButtonProps;
|
|
14
|
+
/** It is used to pass child nodes, string values and number as child components. */
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
/** It is used to give title. */
|
|
17
|
+
title: string;
|
|
18
|
+
/** Define an optional description that's displayed under the title */
|
|
19
|
+
description?: string;
|
|
20
|
+
/** Set a width wider than 400px */
|
|
21
|
+
width?: string | number;
|
|
22
|
+
/** Display an scrim over the main content, forcing users to interact with the drawer */
|
|
23
|
+
scrim?: 'transparent' | 'dark';
|
|
24
|
+
/** It is used to close drawer. */
|
|
25
|
+
onClose: (e?: any) => void;
|
|
26
|
+
}
|
|
27
|
+
declare const Drawer: FC<DrawerProps>;
|
|
28
|
+
export default Drawer;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
+
declare const _default: ComponentMeta<React.FC<import("./Drawer").DrawerProps>>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const _Drawer: ComponentStory<React.FC<import("./Drawer").DrawerProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Drawer';
|
|
@@ -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';
|
|
@@ -6,10 +6,12 @@ export { default as Button } from './components/Button';
|
|
|
6
6
|
export { default as Checkbox } from './components/Checkbox';
|
|
7
7
|
export { default as Checklist } from './components/Checklist';
|
|
8
8
|
export { default as Copy } from './components/Copy';
|
|
9
|
+
export { default as Drawer } from './components/Drawer';
|
|
9
10
|
export { default as Field } from './components/Field';
|
|
10
11
|
export { default as Heading } from './components/Heading';
|
|
11
12
|
export { default as Input } from './components/Input';
|
|
12
13
|
export { default as Modal } from './components/Modal';
|
|
14
|
+
export { default as MoreMenu } from './components/MoreMenu';
|
|
13
15
|
export { default as MultiSelect } from './components/MultiSelect';
|
|
14
16
|
export { default as Pagination } from './components/Pagination';
|
|
15
17
|
export { default as Radio } from './components/Radio';
|
|
@@ -19,3 +21,4 @@ export { default as Table } from './components/Table';
|
|
|
19
21
|
export { default as Tabs } from './components/Tabs';
|
|
20
22
|
export { default as Tag } from './components/Tag';
|
|
21
23
|
export { default as Toggle } from './components/Toggle';
|
|
24
|
+
export { default as ZeroState } from './components/ZeroState';
|
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,9 +24,9 @@ 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
|
-
|
|
29
|
-
interface ButtonProps$
|
|
27
|
+
declare const Accordion: FC<AccordionProps>;
|
|
28
|
+
|
|
29
|
+
interface ButtonProps$4 {
|
|
30
30
|
children: string;
|
|
31
31
|
icon?: string;
|
|
32
32
|
onClick: (e?: any) => void;
|
|
@@ -37,12 +37,12 @@ interface ActionDialogProps extends AccessibleProps {
|
|
|
37
37
|
title?: string;
|
|
38
38
|
/** It is used to give description. */
|
|
39
39
|
description?: string;
|
|
40
|
-
primaryButton?: ButtonProps$
|
|
41
|
-
secondaryButton?: ButtonProps$
|
|
40
|
+
primaryButton?: ButtonProps$4;
|
|
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
46
|
interface AlertProps extends AccessibleProps {
|
|
47
47
|
type?: 'info' | 'error' | 'warning' | 'success';
|
|
48
48
|
/** It is used to add title to alert. */
|
|
@@ -50,39 +50,44 @@ interface AlertProps extends AccessibleProps {
|
|
|
50
50
|
/** It is used to add description to alert. */
|
|
51
51
|
description: string;
|
|
52
52
|
}
|
|
53
|
-
declare const Alert: FC<AlertProps>;
|
|
54
|
-
|
|
55
|
-
interface ButtonProps$
|
|
53
|
+
declare const Alert: FC<AlertProps>;
|
|
54
|
+
|
|
55
|
+
interface ButtonProps$3 {
|
|
56
56
|
children: string;
|
|
57
57
|
onClick: (e?: any) => void;
|
|
58
58
|
type?: 'primary' | 'secondary';
|
|
59
59
|
icon?: string;
|
|
60
60
|
}
|
|
61
61
|
interface BulkActionBarProps extends AccessibleProps {
|
|
62
|
-
actions?: ButtonProps$
|
|
62
|
+
actions?: ButtonProps$3[];
|
|
63
63
|
errorMsg?: string;
|
|
64
64
|
onClear: (e?: any) => void;
|
|
65
65
|
selectedCount?: number;
|
|
66
66
|
}
|
|
67
|
-
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
68
|
-
|
|
69
|
-
interface ButtonProps$
|
|
67
|
+
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
68
|
+
|
|
69
|
+
interface ButtonProps$2 extends AccessibleProps {
|
|
70
|
+
/** Display a number badge on the right side of the button */
|
|
71
|
+
badge?: number;
|
|
70
72
|
/** Define the button label. */
|
|
71
73
|
children?: string;
|
|
72
74
|
/** If enabled, the button will be disabled */
|
|
73
75
|
disabled?: boolean;
|
|
74
76
|
/** The SVG path of the icon to show */
|
|
75
77
|
icon?: string;
|
|
78
|
+
/** Adjust the button to work within a <form> tag. Ignores onClick, sets type='form' */
|
|
79
|
+
isForm?: boolean;
|
|
80
|
+
/** Set the margin of the button as needed */
|
|
76
81
|
margin?: string;
|
|
77
82
|
/** Prop to pass a that fires when the user does a click. */
|
|
78
83
|
onClick?: (e?: any) => void;
|
|
79
84
|
/** If enabled, the small button format will be used. */
|
|
80
85
|
small?: boolean;
|
|
81
|
-
/** Define which button
|
|
82
|
-
|
|
86
|
+
/** Define which button format to display. By default the Primary button will be used. */
|
|
87
|
+
format?: 'primary' | 'secondary' | 'red';
|
|
83
88
|
}
|
|
84
|
-
declare const Button: FC<ButtonProps$
|
|
85
|
-
|
|
89
|
+
declare const Button: FC<ButtonProps$2>;
|
|
90
|
+
|
|
86
91
|
interface CheckboxProps extends AccessibleProps {
|
|
87
92
|
/** It is used to give label to checkbox. */
|
|
88
93
|
children?: string;
|
|
@@ -93,8 +98,8 @@ interface CheckboxProps extends AccessibleProps {
|
|
|
93
98
|
/** It is used to change value of checkbox. */
|
|
94
99
|
onChange: (e?: any) => void;
|
|
95
100
|
}
|
|
96
|
-
declare const Checkbox: FC<CheckboxProps>;
|
|
97
|
-
|
|
101
|
+
declare const Checkbox: FC<CheckboxProps>;
|
|
102
|
+
|
|
98
103
|
interface OptionProps$3 {
|
|
99
104
|
label?: string;
|
|
100
105
|
value: string | number;
|
|
@@ -106,8 +111,8 @@ interface ChecklistProps extends AccessibleProps {
|
|
|
106
111
|
selected: (string | number)[];
|
|
107
112
|
showSelectAll?: boolean;
|
|
108
113
|
}
|
|
109
|
-
declare const Checklist: FC<ChecklistProps>;
|
|
110
|
-
|
|
114
|
+
declare const Checklist: FC<ChecklistProps>;
|
|
115
|
+
|
|
111
116
|
interface CopyProps extends AccessibleProps {
|
|
112
117
|
/** Set the text to be displayed */
|
|
113
118
|
children: string;
|
|
@@ -118,9 +123,37 @@ interface CopyProps extends AccessibleProps {
|
|
|
118
123
|
padding?: string;
|
|
119
124
|
/** Set the type of copy to display */
|
|
120
125
|
type?: 'default' | 'bold' | 'italic' | 'underline' | 'line-through' | 'small';
|
|
126
|
+
/** Set the color of the copy based on the design system color pallette */
|
|
127
|
+
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
121
128
|
}
|
|
122
|
-
declare const Copy: FC<CopyProps>;
|
|
123
|
-
|
|
129
|
+
declare const Copy: FC<CopyProps>;
|
|
130
|
+
|
|
131
|
+
interface ButtonProps$1 extends AccessibleProps {
|
|
132
|
+
disabled: boolean;
|
|
133
|
+
children: string;
|
|
134
|
+
icon?: string;
|
|
135
|
+
onClick: (e?: any) => void;
|
|
136
|
+
tabIndex?: number;
|
|
137
|
+
}
|
|
138
|
+
interface DrawerProps extends AccessibleProps {
|
|
139
|
+
primaryButton: ButtonProps$1;
|
|
140
|
+
secondaryButton?: ButtonProps$1;
|
|
141
|
+
tertiaryButton?: ButtonProps$1;
|
|
142
|
+
/** It is used to pass child nodes, string values and number as child components. */
|
|
143
|
+
children: ReactNode;
|
|
144
|
+
/** It is used to give title. */
|
|
145
|
+
title: string;
|
|
146
|
+
/** Define an optional description that's displayed under the title */
|
|
147
|
+
description?: string;
|
|
148
|
+
/** Set a width wider than 400px */
|
|
149
|
+
width?: string | number;
|
|
150
|
+
/** Display an scrim over the main content, forcing users to interact with the drawer */
|
|
151
|
+
scrim?: 'transparent' | 'dark';
|
|
152
|
+
/** It is used to close drawer. */
|
|
153
|
+
onClose: (e?: any) => void;
|
|
154
|
+
}
|
|
155
|
+
declare const Drawer: FC<DrawerProps>;
|
|
156
|
+
|
|
124
157
|
interface ActionProps {
|
|
125
158
|
label: string;
|
|
126
159
|
onClick: (e?: any) => void;
|
|
@@ -140,8 +173,8 @@ interface FieldProps extends AccessibleProps {
|
|
|
140
173
|
/** It is used to give description to input. */
|
|
141
174
|
description?: string;
|
|
142
175
|
}
|
|
143
|
-
declare const Field: FC<FieldProps>;
|
|
144
|
-
|
|
176
|
+
declare const Field: FC<FieldProps>;
|
|
177
|
+
|
|
145
178
|
interface HeadingProps extends AccessibleProps {
|
|
146
179
|
/** Toggle between bold and normal font weights */
|
|
147
180
|
bold?: boolean;
|
|
@@ -154,11 +187,12 @@ interface HeadingProps extends AccessibleProps {
|
|
|
154
187
|
/** Set the type of heading to display: primary, secondary, tertiary */
|
|
155
188
|
type?: 'primary' | 'secondary' | 'tertiary';
|
|
156
189
|
}
|
|
157
|
-
declare const Heading: FC<HeadingProps>;
|
|
158
|
-
|
|
190
|
+
declare const Heading: FC<HeadingProps>;
|
|
191
|
+
|
|
159
192
|
interface InputProps extends AccessibleProps {
|
|
160
193
|
format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
|
|
161
194
|
height?: string;
|
|
195
|
+
suffix?: string;
|
|
162
196
|
invalid?: boolean;
|
|
163
197
|
max?: number;
|
|
164
198
|
maxLength?: number;
|
|
@@ -172,8 +206,8 @@ interface InputProps extends AccessibleProps {
|
|
|
172
206
|
type?: 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea';
|
|
173
207
|
value?: string;
|
|
174
208
|
}
|
|
175
|
-
declare const Input: FC<InputProps>;
|
|
176
|
-
|
|
209
|
+
declare const Input: FC<InputProps>;
|
|
210
|
+
|
|
177
211
|
interface ButtonProps {
|
|
178
212
|
disabled: boolean;
|
|
179
213
|
children: string;
|
|
@@ -193,8 +227,19 @@ interface ModalProps extends AccessibleProps {
|
|
|
193
227
|
/** It is used to close modal. */
|
|
194
228
|
onClose: (e?: any) => void;
|
|
195
229
|
}
|
|
196
|
-
declare const Modal: FC<ModalProps>;
|
|
197
|
-
|
|
230
|
+
declare const Modal: FC<ModalProps>;
|
|
231
|
+
|
|
232
|
+
interface MenuItemProps extends AccessibleProps {
|
|
233
|
+
icon?: string;
|
|
234
|
+
label?: string;
|
|
235
|
+
onClick: (e?: any) => void;
|
|
236
|
+
}
|
|
237
|
+
interface MoreMenuProps extends AccessibleProps {
|
|
238
|
+
menuItems: MenuItemProps[];
|
|
239
|
+
maxHeight: string | number;
|
|
240
|
+
}
|
|
241
|
+
declare const MoreMenu: FC<MoreMenuProps>;
|
|
242
|
+
|
|
198
243
|
interface OptionProps$2 {
|
|
199
244
|
label?: string;
|
|
200
245
|
value: string | number;
|
|
@@ -208,15 +253,15 @@ interface MultiSelectProps extends AccessibleProps {
|
|
|
208
253
|
selected: (string | number)[];
|
|
209
254
|
showSelectAll?: boolean;
|
|
210
255
|
}
|
|
211
|
-
declare const MultiSelect: FC<MultiSelectProps>;
|
|
212
|
-
|
|
256
|
+
declare const MultiSelect: FC<MultiSelectProps>;
|
|
257
|
+
|
|
213
258
|
interface PaginationProps extends AccessibleProps {
|
|
214
259
|
currentPage: number;
|
|
215
260
|
onClick: (e?: any) => void;
|
|
216
261
|
pageCount: number;
|
|
217
262
|
}
|
|
218
|
-
declare const Pagination: FC<PaginationProps>;
|
|
219
|
-
|
|
263
|
+
declare const Pagination: FC<PaginationProps>;
|
|
264
|
+
|
|
220
265
|
interface RadioProps extends AccessibleProps {
|
|
221
266
|
/** It is used to give label to radio. */
|
|
222
267
|
children: string | number;
|
|
@@ -228,8 +273,8 @@ interface RadioProps extends AccessibleProps {
|
|
|
228
273
|
onChange: (e?: any) => void;
|
|
229
274
|
value: string | number;
|
|
230
275
|
}
|
|
231
|
-
declare const Radio: FC<RadioProps>;
|
|
232
|
-
|
|
276
|
+
declare const Radio: FC<RadioProps>;
|
|
277
|
+
|
|
233
278
|
interface OptionProps$1 {
|
|
234
279
|
label?: string;
|
|
235
280
|
value: string | number;
|
|
@@ -240,8 +285,8 @@ interface RadioListProps extends AccessibleProps {
|
|
|
240
285
|
options: OptionProps$1[];
|
|
241
286
|
value: string;
|
|
242
287
|
}
|
|
243
|
-
declare const RadioList: FC<RadioListProps>;
|
|
244
|
-
|
|
288
|
+
declare const RadioList: FC<RadioListProps>;
|
|
289
|
+
|
|
245
290
|
interface OptionProps {
|
|
246
291
|
/** It is used to give label to option. */
|
|
247
292
|
label: string;
|
|
@@ -263,11 +308,16 @@ interface SelectProps extends AccessibleProps {
|
|
|
263
308
|
invalid?: boolean;
|
|
264
309
|
/** It is used to read value for selected option. */
|
|
265
310
|
value: string;
|
|
311
|
+
/** It is used to read value for border rasius & flex grow */
|
|
312
|
+
style?: {
|
|
313
|
+
borderRadius?: string;
|
|
314
|
+
flexGrow?: number;
|
|
315
|
+
};
|
|
266
316
|
/** It is used to change value when an option is clicked. */
|
|
267
317
|
onChange: (e: any) => void;
|
|
268
318
|
}
|
|
269
|
-
declare const Select: FC<SelectProps>;
|
|
270
|
-
|
|
319
|
+
declare const Select: FC<SelectProps>;
|
|
320
|
+
|
|
271
321
|
interface RowObject {
|
|
272
322
|
[key: string]: any;
|
|
273
323
|
}
|
|
@@ -289,8 +339,8 @@ interface TableProps extends AccessibleProps {
|
|
|
289
339
|
onSortChange?: (e?: any) => void;
|
|
290
340
|
tableLayout?: string;
|
|
291
341
|
}
|
|
292
|
-
declare const Table: FC<TableProps>;
|
|
293
|
-
|
|
342
|
+
declare const Table: FC<TableProps>;
|
|
343
|
+
|
|
294
344
|
interface TabProps extends AccessibleProps {
|
|
295
345
|
label: string;
|
|
296
346
|
onClick: (e?: any) => void;
|
|
@@ -299,8 +349,8 @@ interface TabProps extends AccessibleProps {
|
|
|
299
349
|
interface TabsProps extends AccessibleProps {
|
|
300
350
|
tabs: TabProps[];
|
|
301
351
|
}
|
|
302
|
-
declare const Tabs: FC<TabsProps>;
|
|
303
|
-
|
|
352
|
+
declare const Tabs: FC<TabsProps>;
|
|
353
|
+
|
|
304
354
|
interface TagProps extends AccessibleProps {
|
|
305
355
|
/** It is used to select tag-type either default or removable. */
|
|
306
356
|
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK';
|
|
@@ -310,14 +360,30 @@ interface TagProps extends AccessibleProps {
|
|
|
310
360
|
/** It is callback function called when user wants to close the tag. */
|
|
311
361
|
removable?: boolean;
|
|
312
362
|
}
|
|
313
|
-
declare const Tag: FC<TagProps>;
|
|
314
|
-
|
|
363
|
+
declare const Tag: FC<TagProps>;
|
|
364
|
+
|
|
315
365
|
interface ToggleProps extends AccessibleProps {
|
|
316
366
|
/** It is used to check whether Toggle is checked or not */
|
|
317
367
|
on: boolean;
|
|
318
368
|
/** Pass a callback then fires when user change value */
|
|
319
369
|
onClick: (e?: any) => void;
|
|
320
370
|
}
|
|
321
|
-
declare const Toggle: FC<ToggleProps>;
|
|
322
|
-
|
|
323
|
-
|
|
371
|
+
declare const Toggle: FC<ToggleProps>;
|
|
372
|
+
|
|
373
|
+
interface ZeroStateProps extends AccessibleProps {
|
|
374
|
+
/** The SVG path of the icon to show */
|
|
375
|
+
icon: string;
|
|
376
|
+
/** It is used to give title. */
|
|
377
|
+
title: string;
|
|
378
|
+
/** It is used to give description. */
|
|
379
|
+
description?: string;
|
|
380
|
+
/** It is used to pass object to button. */
|
|
381
|
+
action?: {
|
|
382
|
+
children: string;
|
|
383
|
+
icon?: string;
|
|
384
|
+
onClick: (e?: any) => void;
|
|
385
|
+
};
|
|
386
|
+
}
|
|
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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hexure/ui",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.3.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",
|
|
@@ -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
|
+
}
|