@hexure/ui 1.1.1 → 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.
@@ -13,7 +13,7 @@ export interface ButtonProps extends AccessibleProps {
13
13
  /** If enabled, the small button format will be used. */
14
14
  small?: boolean;
15
15
  /** Define which button type to display. By default the Primary button will be used. */
16
- type?: 'primary' | 'secondary';
16
+ type?: 'primary' | 'secondary' | 'red';
17
17
  }
18
18
  declare const Button: FC<ButtonProps>;
19
19
  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,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';
@@ -9,8 +9,8 @@ interface ButtonProps {
9
9
  }
10
10
  export interface ModalProps extends AccessibleProps {
11
11
  primaryButton: ButtonProps;
12
- secondaryButton: ButtonProps;
13
- tertiaryButton: ButtonProps;
12
+ secondaryButton?: ButtonProps;
13
+ tertiaryButton?: ButtonProps;
14
14
  maxWidth?: string | number;
15
15
  /** It is used to pass child nodes, string values and number as child components. */
16
16
  children: ReactNode;
@@ -8,7 +8,7 @@ export interface MultiSelectProps extends AccessibleProps {
8
8
  readOnly?: boolean;
9
9
  displayCount?: number;
10
10
  invalid?: boolean;
11
- onChange: (e?: any) => void;
11
+ onChange: (e: any) => void;
12
12
  options?: OptionProps[];
13
13
  selected: (string | number)[];
14
14
  showSelectAll?: boolean;
@@ -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$3 {
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$3;
41
- secondaryButton?: ButtonProps$3;
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$2 {
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$2[];
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$1 extends AccessibleProps {
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 */
@@ -79,9 +79,9 @@ interface ButtonProps$1 extends AccessibleProps {
79
79
  /** If enabled, the small button format will be used. */
80
80
  small?: boolean;
81
81
  /** Define which button type to display. By default the Primary button will be used. */
82
- type?: 'primary' | 'secondary';
82
+ type?: 'primary' | 'secondary' | 'red';
83
83
  }
84
- declare const Button: FC<ButtonProps$1>;
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;
@@ -183,8 +211,8 @@ interface ButtonProps {
183
211
  }
184
212
  interface ModalProps extends AccessibleProps {
185
213
  primaryButton: ButtonProps;
186
- secondaryButton: ButtonProps;
187
- tertiaryButton: ButtonProps;
214
+ secondaryButton?: ButtonProps;
215
+ tertiaryButton?: ButtonProps;
188
216
  maxWidth?: string | number;
189
217
  /** It is used to pass child nodes, string values and number as child components. */
190
218
  children: ReactNode;
@@ -203,7 +231,7 @@ interface MultiSelectProps extends AccessibleProps {
203
231
  readOnly?: boolean;
204
232
  displayCount?: number;
205
233
  invalid?: boolean;
206
- onChange: (e?: any) => void;
234
+ onChange: (e: any) => void;
207
235
  options?: OptionProps$2[];
208
236
  selected: (string | number)[];
209
237
  showSelectAll?: boolean;
@@ -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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hexure/ui",
3
- "version": "1.1.1",
3
+ "version": "1.2.0",
4
4
  "description": "A library of shared UI components used within Hexure products.",
5
5
  "scripts": {
6
6
  "rollup": "rollup -c rollup.config.mjs",