@delightui/components 0.1.44 → 0.1.46
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/components/atoms/Checkbox/Checkbox.d.ts +1 -0
- package/dist/cjs/components/atoms/Checkbox/Checkbox.types.d.ts +5 -0
- package/dist/cjs/components/atoms/Input/Input.d.ts +1 -0
- package/dist/cjs/components/atoms/Input/Input.types.d.ts +5 -0
- package/dist/cjs/components/atoms/SelectListItem/SelectListItem.d.ts +4 -0
- package/dist/cjs/components/atoms/SelectListItem/SelectListItem.types.d.ts +27 -0
- package/dist/cjs/components/atoms/SelectListItem/index.d.ts +4 -0
- package/dist/cjs/components/atoms/ToastNotification/ToastNotification.types.d.ts +0 -6
- package/dist/cjs/components/atoms/Toggle/index.d.ts +1 -0
- package/dist/cjs/components/atoms/Tooltip/Tooltip.d.ts +4 -0
- package/dist/cjs/components/atoms/Tooltip/Tooltip.types.d.ts +59 -0
- package/dist/cjs/components/atoms/Tooltip/index.d.ts +4 -0
- package/dist/cjs/components/atoms/index.d.ts +4 -0
- package/dist/cjs/components/molecules/ChipInput/ChipInput.d.ts +2 -2
- package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +6 -1
- package/dist/cjs/components/molecules/FormField/index.d.ts +3 -2
- package/dist/cjs/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
- package/dist/cjs/library.css +1616 -54
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +1 -0
- package/dist/esm/components/atoms/Checkbox/Checkbox.types.d.ts +5 -0
- package/dist/esm/components/atoms/Input/Input.d.ts +1 -0
- package/dist/esm/components/atoms/Input/Input.types.d.ts +5 -0
- package/dist/esm/components/atoms/SelectListItem/SelectListItem.d.ts +4 -0
- package/dist/esm/components/atoms/SelectListItem/SelectListItem.types.d.ts +27 -0
- package/dist/esm/components/atoms/SelectListItem/index.d.ts +4 -0
- package/dist/esm/components/atoms/ToastNotification/ToastNotification.types.d.ts +0 -6
- package/dist/esm/components/atoms/Toggle/index.d.ts +1 -0
- package/dist/esm/components/atoms/Tooltip/Tooltip.d.ts +4 -0
- package/dist/esm/components/atoms/Tooltip/Tooltip.types.d.ts +59 -0
- package/dist/esm/components/atoms/Tooltip/index.d.ts +4 -0
- package/dist/esm/components/atoms/index.d.ts +4 -0
- package/dist/esm/components/molecules/ChipInput/ChipInput.d.ts +2 -2
- package/dist/esm/components/molecules/FormField/FormField.types.d.ts +6 -1
- package/dist/esm/components/molecules/FormField/index.d.ts +3 -2
- package/dist/esm/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
- package/dist/esm/library.css +1616 -54
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.d.ts +0 -2129
|
@@ -8,5 +8,6 @@ declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttr
|
|
|
8
8
|
invalid?: boolean;
|
|
9
9
|
value?: string | number;
|
|
10
10
|
labelAlignment?: import("./Checkbox.types").CheckboxLabelAlignmentEnum;
|
|
11
|
+
independent?: boolean;
|
|
11
12
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
12
13
|
export default Checkbox;
|
|
@@ -38,4 +38,9 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' |
|
|
|
38
38
|
* The alignment of the label.
|
|
39
39
|
*/
|
|
40
40
|
labelAlignment?: CheckboxLabelAlignmentEnum;
|
|
41
|
+
/**
|
|
42
|
+
* The checkbox is independent of the parent form field context.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
independent?: boolean;
|
|
41
46
|
};
|
|
@@ -7,5 +7,6 @@ declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttribu
|
|
|
7
7
|
leadingIcon?: React.ReactNode;
|
|
8
8
|
trailingIcon?: React.ReactNode;
|
|
9
9
|
'component-variant'?: string;
|
|
10
|
+
independent?: boolean;
|
|
10
11
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
11
12
|
export default Input;
|
|
@@ -35,4 +35,9 @@ export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'v
|
|
|
35
35
|
* provide a way to override the styling
|
|
36
36
|
*/
|
|
37
37
|
'component-variant'?: string;
|
|
38
|
+
/**
|
|
39
|
+
* The input is independent of the parent form field context.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
independent?: boolean;
|
|
38
43
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export type SelectListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Icon to be displayed before the button's content.
|
|
5
|
+
*/
|
|
6
|
+
leadingIcon?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Icon to be displayed after the button's content.
|
|
9
|
+
*/
|
|
10
|
+
trailingIcon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the list item is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Click event handler for the list item.
|
|
17
|
+
*/
|
|
18
|
+
onClick?: (event?: MouseEvent<HTMLElement>) => void;
|
|
19
|
+
/**
|
|
20
|
+
* The label for the list item.
|
|
21
|
+
*/
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
/**
|
|
24
|
+
* Additional class for styling.
|
|
25
|
+
*/
|
|
26
|
+
className?: string;
|
|
27
|
+
};
|
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode, MouseEvent } from 'react';
|
|
2
2
|
export type ToastNotificationStyleEnum = 'Neutral' | 'Error' | 'Success';
|
|
3
|
-
export type ToastNotificationPositionEnum = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
4
3
|
export type ToastNotificationProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
5
4
|
/**
|
|
6
5
|
* Style of the toast notification.
|
|
7
6
|
* @default 'Neutral'
|
|
8
7
|
*/
|
|
9
8
|
style?: ToastNotificationStyleEnum;
|
|
10
|
-
/**
|
|
11
|
-
* Position of the toast notification.
|
|
12
|
-
* @default 'top-right'
|
|
13
|
-
*/
|
|
14
|
-
position?: ToastNotificationPositionEnum;
|
|
15
9
|
/**
|
|
16
10
|
* Determines if the toast notification is dismissible.
|
|
17
11
|
* @default true
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Enum for the action type of the Tooltip.
|
|
4
|
+
*/
|
|
5
|
+
export type TooltipActionType = 'Click' | 'Hover' | 'Follow';
|
|
6
|
+
/**
|
|
7
|
+
* Enum for the direction of the Tooltip.
|
|
8
|
+
*/
|
|
9
|
+
export type TooltipDirectionEnum = 'Top' | 'Bottom' | 'Right' | 'Left';
|
|
10
|
+
/**
|
|
11
|
+
* Enum for the alignment of the Tooltip.
|
|
12
|
+
*/
|
|
13
|
+
export type TooltipAlignEnum = 'Start' | 'End' | 'Center';
|
|
14
|
+
/**
|
|
15
|
+
* Enum for the style of the Tooltip.
|
|
16
|
+
*/
|
|
17
|
+
export type TooltipStyleEnum = 'Default' | 'Outlined';
|
|
18
|
+
/**
|
|
19
|
+
* Props for the Tooltip component.
|
|
20
|
+
*/
|
|
21
|
+
export type TooltipProps = {
|
|
22
|
+
/**
|
|
23
|
+
* The content displayed inside the tooltip.
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* The direction where the tooltip should appear relative to the target.
|
|
28
|
+
* @default "Top"
|
|
29
|
+
*/
|
|
30
|
+
direction?: TooltipDirectionEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Alignment of the tooltip relative to the target.
|
|
33
|
+
* @default "Start"
|
|
34
|
+
*/
|
|
35
|
+
alignment?: TooltipAlignEnum;
|
|
36
|
+
/**
|
|
37
|
+
* The event that action the tooltip visibility.
|
|
38
|
+
* @default "Hover"
|
|
39
|
+
*/
|
|
40
|
+
action?: TooltipActionType;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the tooltip is initially visible.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
isVisible?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The target element that triggers the tooltip.
|
|
48
|
+
*/
|
|
49
|
+
target?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The style of the tooltip.
|
|
52
|
+
* @default "Default"
|
|
53
|
+
*/
|
|
54
|
+
style?: TooltipStyleEnum;
|
|
55
|
+
/**
|
|
56
|
+
* Additional CSS class names for the tooltip.
|
|
57
|
+
*/
|
|
58
|
+
className?: string;
|
|
59
|
+
};
|
|
@@ -10,8 +10,10 @@ export { default as Text } from './Text';
|
|
|
10
10
|
export { default as TextArea } from './TextArea';
|
|
11
11
|
export { default as ResponsiveComponent } from './ResponsiveComponent';
|
|
12
12
|
export { default as ListItem } from './ListItem';
|
|
13
|
+
export { default as SelectListItem } from './SelectListItem';
|
|
13
14
|
export { default as Toggle } from './Toggle';
|
|
14
15
|
export { default as ToggleButton } from './ToggleButton';
|
|
16
|
+
export { default as Tooltip } from './Tooltip';
|
|
15
17
|
export { default as CustomToggle } from './CustomToggle';
|
|
16
18
|
export { default as Chip } from './Chip';
|
|
17
19
|
export { default as Checkbox } from './Checkbox';
|
|
@@ -29,6 +31,7 @@ export * from './Text';
|
|
|
29
31
|
export * from './TextArea';
|
|
30
32
|
export * from './ResponsiveComponent';
|
|
31
33
|
export * from './ListItem';
|
|
34
|
+
export * from './SelectListItem';
|
|
32
35
|
export * from './Toggle';
|
|
33
36
|
export * from './ToggleButton';
|
|
34
37
|
export * from './CustomToggle';
|
|
@@ -36,3 +39,4 @@ export * from './Chip';
|
|
|
36
39
|
export * from './Checkbox';
|
|
37
40
|
export * from './CheckboxItem';
|
|
38
41
|
export * from './Slider';
|
|
42
|
+
export * from './Tooltip';
|
|
@@ -7,7 +7,7 @@ export type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
7
7
|
/**
|
|
8
8
|
* The label for the form field
|
|
9
9
|
*/
|
|
10
|
-
label
|
|
10
|
+
label?: string;
|
|
11
11
|
/**
|
|
12
12
|
* Optional message for the form field
|
|
13
13
|
*/
|
|
@@ -129,4 +129,9 @@ export type UseFieldProps<T extends FieldValue = FieldValue> = {
|
|
|
129
129
|
* Default value for the field
|
|
130
130
|
*/
|
|
131
131
|
defaultValue?: T;
|
|
132
|
+
/**
|
|
133
|
+
* the field is independent of the parent form field contexts
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
independent?: boolean;
|
|
132
137
|
};
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import type { FormFieldProps, FormFieldProviderProps } from './FormField.types';
|
|
3
3
|
import useField from './useField';
|
|
4
4
|
export { useField };
|
|
5
|
-
|
|
5
|
+
type FormFieldPropsWithProvider = FormFieldProviderProps & FormFieldProps;
|
|
6
|
+
declare const FormField: (props: FormFieldPropsWithProvider) => React.JSX.Element;
|
|
6
7
|
export default FormField;
|
|
7
|
-
export type { FormFieldProps };
|
|
8
|
+
export type { FormFieldProps, FormFieldPropsWithProvider };
|