@hexure/ui 1.1.2 → 1.2.0
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 +81 -39
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Copy/Copy.d.ts +2 -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/index.d.ts +1 -0
- package/dist/esm/index.js +81 -40
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Copy/Copy.d.ts +2 -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/index.d.ts +1 -0
- package/dist/index.d.ts +36 -8
- package/package.json +1 -1
|
@@ -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,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';
|
|
@@ -6,6 +6,7 @@ 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';
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ interface AccordionProps extends AccessibleProps {
|
|
|
26
26
|
}
|
|
27
27
|
declare const Accordion: FC<AccordionProps>;
|
|
28
28
|
|
|
29
|
-
interface ButtonProps$
|
|
29
|
+
interface ButtonProps$4 {
|
|
30
30
|
children: string;
|
|
31
31
|
icon?: string;
|
|
32
32
|
onClick: (e?: any) => void;
|
|
@@ -37,8 +37,8 @@ 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
44
|
declare const ActionDialog: FC<ActionDialogProps>;
|
|
@@ -52,21 +52,21 @@ interface AlertProps extends AccessibleProps {
|
|
|
52
52
|
}
|
|
53
53
|
declare const Alert: FC<AlertProps>;
|
|
54
54
|
|
|
55
|
-
interface ButtonProps$
|
|
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
67
|
declare const BulkActionBar: FC<BulkActionBarProps>;
|
|
68
68
|
|
|
69
|
-
interface ButtonProps$
|
|
69
|
+
interface ButtonProps$2 extends AccessibleProps {
|
|
70
70
|
/** Define the button label. */
|
|
71
71
|
children?: string;
|
|
72
72
|
/** If enabled, the button will be disabled */
|
|
@@ -81,7 +81,7 @@ interface ButtonProps$1 extends AccessibleProps {
|
|
|
81
81
|
/** Define which button type to display. By default the Primary button will be used. */
|
|
82
82
|
type?: 'primary' | 'secondary' | 'red';
|
|
83
83
|
}
|
|
84
|
-
declare const Button: FC<ButtonProps$
|
|
84
|
+
declare const Button: FC<ButtonProps$2>;
|
|
85
85
|
|
|
86
86
|
interface CheckboxProps extends AccessibleProps {
|
|
87
87
|
/** It is used to give label to checkbox. */
|
|
@@ -118,9 +118,37 @@ interface CopyProps extends AccessibleProps {
|
|
|
118
118
|
padding?: string;
|
|
119
119
|
/** Set the type of copy to display */
|
|
120
120
|
type?: 'default' | 'bold' | 'italic' | 'underline' | 'line-through' | 'small';
|
|
121
|
+
/** Set the color of the copy based on the design system color pallette */
|
|
122
|
+
color?: 'PRIMARY' | 'GREEN' | 'RED' | 'YELLOW' | 'BLACK' | 'GRAY' | 'MEDIUM_GRAY' | 'LIGHT_GRAY';
|
|
121
123
|
}
|
|
122
124
|
declare const Copy: FC<CopyProps>;
|
|
123
125
|
|
|
126
|
+
interface ButtonProps$1 extends AccessibleProps {
|
|
127
|
+
disabled: boolean;
|
|
128
|
+
children: string;
|
|
129
|
+
icon?: string;
|
|
130
|
+
onClick: (e?: any) => void;
|
|
131
|
+
tabIndex?: number;
|
|
132
|
+
}
|
|
133
|
+
interface DrawerProps extends AccessibleProps {
|
|
134
|
+
primaryButton: ButtonProps$1;
|
|
135
|
+
secondaryButton?: ButtonProps$1;
|
|
136
|
+
tertiaryButton?: ButtonProps$1;
|
|
137
|
+
/** It is used to pass child nodes, string values and number as child components. */
|
|
138
|
+
children: ReactNode;
|
|
139
|
+
/** It is used to give title. */
|
|
140
|
+
title: string;
|
|
141
|
+
/** Define an optional description that's displayed under the title */
|
|
142
|
+
description?: string;
|
|
143
|
+
/** Set a width wider than 400px */
|
|
144
|
+
width?: string | number;
|
|
145
|
+
/** Display an scrim over the main content, forcing users to interact with the drawer */
|
|
146
|
+
scrim?: 'transparent' | 'dark';
|
|
147
|
+
/** It is used to close drawer. */
|
|
148
|
+
onClose: (e?: any) => void;
|
|
149
|
+
}
|
|
150
|
+
declare const Drawer: FC<DrawerProps>;
|
|
151
|
+
|
|
124
152
|
interface ActionProps {
|
|
125
153
|
label: string;
|
|
126
154
|
onClick: (e?: any) => void;
|
|
@@ -320,4 +348,4 @@ interface ToggleProps extends AccessibleProps {
|
|
|
320
348
|
}
|
|
321
349
|
declare const Toggle: FC<ToggleProps>;
|
|
322
350
|
|
|
323
|
-
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Field, Heading, Input, Modal, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle };
|
|
351
|
+
export { Accordion, ActionDialog, Alert, BulkActionBar, Button, Checkbox, Checklist, Copy, Drawer, Field, Heading, Input, Modal, MultiSelect, Pagination, Radio, RadioList, Select, Table, Tabs, Tag, Toggle };
|