@hexure/ui 1.6.9 → 1.7.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/dist/cjs/index.js +90 -48
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Field/Field.d.ts +3 -0
- package/dist/cjs/types/components/Input/Input.d.ts +17 -1
- package/dist/cjs/types/components/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/cjs/types/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/cjs/types/components/Tooltip/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +90 -49
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Field/Field.d.ts +3 -0
- package/dist/esm/types/components/Input/Input.d.ts +17 -1
- package/dist/esm/types/components/MoreMenu/MoreMenu.d.ts +1 -1
- package/dist/esm/types/components/Tooltip/Tooltip.d.ts +11 -0
- package/dist/esm/types/components/Tooltip/index.d.ts +1 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +31 -3
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { TooltipProps } from '../Tooltip/Tooltip';
|
|
2
3
|
import { AccessibleProps } from '../../utils/Accessibility';
|
|
3
4
|
interface ActionProps {
|
|
4
5
|
label: string;
|
|
@@ -18,6 +19,8 @@ export interface FieldProps extends AccessibleProps {
|
|
|
18
19
|
label: string;
|
|
19
20
|
/** It is used to give description to input. */
|
|
20
21
|
description?: string;
|
|
22
|
+
/** Display a tooltip next to the label */
|
|
23
|
+
tooltip?: TooltipProps;
|
|
21
24
|
}
|
|
22
25
|
declare const Field: FC<FieldProps>;
|
|
23
26
|
export default Field;
|
|
@@ -4,21 +4,37 @@ export interface styleProps {
|
|
|
4
4
|
width?: number | string;
|
|
5
5
|
}
|
|
6
6
|
export interface InputProps extends AccessibleProps {
|
|
7
|
+
/** Force a specific format/mask for the Input value */
|
|
7
8
|
format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
|
|
9
|
+
/** Set the height of the textarea. This should only be used with textarea */
|
|
8
10
|
height?: string;
|
|
11
|
+
/** Display a read only suffix. Example: kg, lbs, etc */
|
|
9
12
|
suffix?: string;
|
|
13
|
+
/** Display the input as invalid, with a red border and red text */
|
|
10
14
|
invalid?: boolean;
|
|
15
|
+
/** Use with a number input to define the max allowed number */
|
|
11
16
|
max?: string;
|
|
17
|
+
/** Use with a text input to define the max number of characters */
|
|
12
18
|
maxLength?: number;
|
|
19
|
+
/** Use with a number input to define the min allowed number */
|
|
13
20
|
min?: string;
|
|
21
|
+
/** A method to be called when the changes focus away from the input */
|
|
14
22
|
onBlur?: (e?: any) => void;
|
|
23
|
+
/** A method to be called when the value of the input changes */
|
|
15
24
|
onChange?: (e?: any) => void;
|
|
25
|
+
/** A method to be called when the use presses a key */
|
|
16
26
|
onKeyDown?: (e?: any) => void;
|
|
27
|
+
/** Display placeholder text in the input */
|
|
17
28
|
placeholder?: string;
|
|
29
|
+
/** Display the input as read only, preventing the user from inteacting with it */
|
|
18
30
|
readOnly?: boolean;
|
|
31
|
+
/** Use with a number input to define how the number increments */
|
|
19
32
|
step?: number;
|
|
33
|
+
/** Set the css of the wrapping div */
|
|
20
34
|
style?: styleProps;
|
|
21
|
-
|
|
35
|
+
/** Define the type of input to be displayed */
|
|
36
|
+
type?: 'date' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea' | 'search';
|
|
37
|
+
/** Set the value of the input. This should be used by the parent component to control the input's value. */
|
|
22
38
|
value?: string;
|
|
23
39
|
}
|
|
24
40
|
declare const Input: FC<InputProps>;
|
|
@@ -7,7 +7,7 @@ interface MenuItemProps extends AccessibleProps {
|
|
|
7
7
|
}
|
|
8
8
|
export interface MoreMenuProps extends AccessibleProps {
|
|
9
9
|
menuItems: MenuItemProps[];
|
|
10
|
-
maxHeight
|
|
10
|
+
maxHeight?: string | number;
|
|
11
11
|
}
|
|
12
12
|
declare const MoreMenu: FC<MoreMenuProps>;
|
|
13
13
|
export default MoreMenu;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export interface TooltipProps {
|
|
3
|
+
/** It is used to give label to tag. */
|
|
4
|
+
children: string;
|
|
5
|
+
/** It is callback function called when user wants to close the tag. */
|
|
6
|
+
position?: 'right-top' | 'right-bottom' | 'right-center' | 'left-top' | 'left-bottom' | 'left-center';
|
|
7
|
+
/** Override the default content width of 240px */
|
|
8
|
+
width?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
11
|
+
export default Tooltip;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Tooltip';
|
|
@@ -25,4 +25,5 @@ export { default as Table } from './components/Table';
|
|
|
25
25
|
export { default as Tabs } from './components/Tabs';
|
|
26
26
|
export { default as Tag } from './components/Tag';
|
|
27
27
|
export { default as Toggle } from './components/Toggle';
|
|
28
|
+
export { default as Tooltip } from './components/Tooltip';
|
|
28
29
|
export { default as ZeroState } from './components/ZeroState';
|
package/dist/index.d.ts
CHANGED
|
@@ -189,6 +189,16 @@ interface DrawerProps extends AccessibleProps {
|
|
|
189
189
|
}
|
|
190
190
|
declare const Drawer: FC<DrawerProps>;
|
|
191
191
|
|
|
192
|
+
interface TooltipProps {
|
|
193
|
+
/** It is used to give label to tag. */
|
|
194
|
+
children: string;
|
|
195
|
+
/** It is callback function called when user wants to close the tag. */
|
|
196
|
+
position?: 'right-top' | 'right-bottom' | 'right-center' | 'left-top' | 'left-bottom' | 'left-center';
|
|
197
|
+
/** Override the default content width of 240px */
|
|
198
|
+
width?: string;
|
|
199
|
+
}
|
|
200
|
+
declare const Tooltip: FC<TooltipProps>;
|
|
201
|
+
|
|
192
202
|
interface ActionProps {
|
|
193
203
|
label: string;
|
|
194
204
|
onClick: (e?: any) => void;
|
|
@@ -207,6 +217,8 @@ interface FieldProps extends AccessibleProps {
|
|
|
207
217
|
label: string;
|
|
208
218
|
/** It is used to give description to input. */
|
|
209
219
|
description?: string;
|
|
220
|
+
/** Display a tooltip next to the label */
|
|
221
|
+
tooltip?: TooltipProps;
|
|
210
222
|
}
|
|
211
223
|
declare const Field: FC<FieldProps>;
|
|
212
224
|
|
|
@@ -249,21 +261,37 @@ interface styleProps$2 {
|
|
|
249
261
|
width?: number | string;
|
|
250
262
|
}
|
|
251
263
|
interface InputProps extends AccessibleProps {
|
|
264
|
+
/** Force a specific format/mask for the Input value */
|
|
252
265
|
format?: 'phone' | 'currency' | 'currency_decimal' | 'ssn';
|
|
266
|
+
/** Set the height of the textarea. This should only be used with textarea */
|
|
253
267
|
height?: string;
|
|
268
|
+
/** Display a read only suffix. Example: kg, lbs, etc */
|
|
254
269
|
suffix?: string;
|
|
270
|
+
/** Display the input as invalid, with a red border and red text */
|
|
255
271
|
invalid?: boolean;
|
|
272
|
+
/** Use with a number input to define the max allowed number */
|
|
256
273
|
max?: string;
|
|
274
|
+
/** Use with a text input to define the max number of characters */
|
|
257
275
|
maxLength?: number;
|
|
276
|
+
/** Use with a number input to define the min allowed number */
|
|
258
277
|
min?: string;
|
|
278
|
+
/** A method to be called when the changes focus away from the input */
|
|
259
279
|
onBlur?: (e?: any) => void;
|
|
280
|
+
/** A method to be called when the value of the input changes */
|
|
260
281
|
onChange?: (e?: any) => void;
|
|
282
|
+
/** A method to be called when the use presses a key */
|
|
261
283
|
onKeyDown?: (e?: any) => void;
|
|
284
|
+
/** Display placeholder text in the input */
|
|
262
285
|
placeholder?: string;
|
|
286
|
+
/** Display the input as read only, preventing the user from inteacting with it */
|
|
263
287
|
readOnly?: boolean;
|
|
288
|
+
/** Use with a number input to define how the number increments */
|
|
264
289
|
step?: number;
|
|
290
|
+
/** Set the css of the wrapping div */
|
|
265
291
|
style?: styleProps$2;
|
|
266
|
-
|
|
292
|
+
/** Define the type of input to be displayed */
|
|
293
|
+
type?: 'date' | 'email' | 'number' | 'password' | 'tel' | 'text' | 'url' | 'textarea' | 'search';
|
|
294
|
+
/** Set the value of the input. This should be used by the parent component to control the input's value. */
|
|
267
295
|
value?: string;
|
|
268
296
|
}
|
|
269
297
|
declare const Input: FC<InputProps>;
|
|
@@ -323,7 +351,7 @@ interface MenuItemProps extends AccessibleProps {
|
|
|
323
351
|
}
|
|
324
352
|
interface MoreMenuProps extends AccessibleProps {
|
|
325
353
|
menuItems: MenuItemProps[];
|
|
326
|
-
maxHeight
|
|
354
|
+
maxHeight?: string | number;
|
|
327
355
|
}
|
|
328
356
|
declare const MoreMenu: FC<MoreMenuProps>;
|
|
329
357
|
|
|
@@ -482,4 +510,4 @@ interface ZeroStateProps extends AccessibleProps {
|
|
|
482
510
|
}
|
|
483
511
|
declare const ZeroState: FC<ZeroStateProps>;
|
|
484
512
|
|
|
485
|
-
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, ZeroState };
|
|
513
|
+
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 };
|