@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.
Files changed (42) hide show
  1. package/dist/cjs/components/atoms/Checkbox/Checkbox.d.ts +1 -0
  2. package/dist/cjs/components/atoms/Checkbox/Checkbox.types.d.ts +5 -0
  3. package/dist/cjs/components/atoms/Input/Input.d.ts +1 -0
  4. package/dist/cjs/components/atoms/Input/Input.types.d.ts +5 -0
  5. package/dist/cjs/components/atoms/SelectListItem/SelectListItem.d.ts +4 -0
  6. package/dist/cjs/components/atoms/SelectListItem/SelectListItem.types.d.ts +27 -0
  7. package/dist/cjs/components/atoms/SelectListItem/index.d.ts +4 -0
  8. package/dist/cjs/components/atoms/ToastNotification/ToastNotification.types.d.ts +0 -6
  9. package/dist/cjs/components/atoms/Toggle/index.d.ts +1 -0
  10. package/dist/cjs/components/atoms/Tooltip/Tooltip.d.ts +4 -0
  11. package/dist/cjs/components/atoms/Tooltip/Tooltip.types.d.ts +59 -0
  12. package/dist/cjs/components/atoms/Tooltip/index.d.ts +4 -0
  13. package/dist/cjs/components/atoms/index.d.ts +4 -0
  14. package/dist/cjs/components/molecules/ChipInput/ChipInput.d.ts +2 -2
  15. package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +6 -1
  16. package/dist/cjs/components/molecules/FormField/index.d.ts +3 -2
  17. package/dist/cjs/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
  18. package/dist/cjs/library.css +1616 -54
  19. package/dist/cjs/library.js +3 -3
  20. package/dist/cjs/library.js.map +1 -1
  21. package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +1 -0
  22. package/dist/esm/components/atoms/Checkbox/Checkbox.types.d.ts +5 -0
  23. package/dist/esm/components/atoms/Input/Input.d.ts +1 -0
  24. package/dist/esm/components/atoms/Input/Input.types.d.ts +5 -0
  25. package/dist/esm/components/atoms/SelectListItem/SelectListItem.d.ts +4 -0
  26. package/dist/esm/components/atoms/SelectListItem/SelectListItem.types.d.ts +27 -0
  27. package/dist/esm/components/atoms/SelectListItem/index.d.ts +4 -0
  28. package/dist/esm/components/atoms/ToastNotification/ToastNotification.types.d.ts +0 -6
  29. package/dist/esm/components/atoms/Toggle/index.d.ts +1 -0
  30. package/dist/esm/components/atoms/Tooltip/Tooltip.d.ts +4 -0
  31. package/dist/esm/components/atoms/Tooltip/Tooltip.types.d.ts +59 -0
  32. package/dist/esm/components/atoms/Tooltip/index.d.ts +4 -0
  33. package/dist/esm/components/atoms/index.d.ts +4 -0
  34. package/dist/esm/components/molecules/ChipInput/ChipInput.d.ts +2 -2
  35. package/dist/esm/components/molecules/FormField/FormField.types.d.ts +6 -1
  36. package/dist/esm/components/molecules/FormField/index.d.ts +3 -2
  37. package/dist/esm/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
  38. package/dist/esm/library.css +1616 -54
  39. package/dist/esm/library.js +3 -3
  40. package/dist/esm/library.js.map +1 -1
  41. package/package.json +1 -1
  42. 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,4 @@
1
+ import React from 'react';
2
+ import { SelectListItemProps } from "./SelectListItem.types";
3
+ declare const SelectListItem: (props: SelectListItemProps) => React.JSX.Element;
4
+ export default SelectListItem;
@@ -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
+ };
@@ -0,0 +1,4 @@
1
+ import SelectListItem from './SelectListItem';
2
+ import type { SelectListItemProps } from './SelectListItem.types';
3
+ export type { SelectListItemProps };
4
+ export default SelectListItem;
@@ -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
@@ -1,2 +1,3 @@
1
1
  import Toggle from './Toggle';
2
2
  export default Toggle;
3
+ export * from './Toggle.types';
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TooltipProps } from './Tooltip.types';
3
+ declare const Tooltip: ({ children, direction, alignment, action, style, isVisible, target, className, }: TooltipProps) => React.JSX.Element;
4
+ export default Tooltip;
@@ -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
+ };
@@ -0,0 +1,4 @@
1
+ import Tooltip from './Tooltip';
2
+ import { TooltipProps } from './Tooltip.types';
3
+ export default Tooltip;
4
+ export type { TooltipProps };
@@ -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';
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { ChipInputProps } from "./ChipInput.types";
3
- declare const ChipInput: React.FC<ChipInputProps>;
4
- export default ChipInput;
3
+ declare const _default: React.NamedExoticComponent<ChipInputProps>;
4
+ export default _default;
@@ -7,7 +7,7 @@ export type FormFieldProps = HTMLAttributes<HTMLDivElement> & {
7
7
  /**
8
8
  * The label for the form field
9
9
  */
10
- label: string;
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
- declare const FormField: (props: FormFieldProviderProps & FormFieldProps) => React.JSX.Element;
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 };
@@ -20,7 +20,6 @@ export type ProgressBarProps = {
20
20
  * Defines the orientation of the progress bar
21
21
  * @default "horizontal"
22
22
  */
23
- orientation?: ProgressBarOrientation;
24
23
  /**
25
24
  * Determines if and how the label is displayed
26
25
  */