@delightui/components 0.1.43 → 0.1.45

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 (46) 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/Accordion/Accordion.types.d.ts +6 -0
  15. package/dist/cjs/components/molecules/ChipInput/ChipInput.d.ts +2 -2
  16. package/dist/cjs/components/molecules/FormField/FormField.types.d.ts +10 -1
  17. package/dist/cjs/components/molecules/FormField/index.d.ts +3 -2
  18. package/dist/cjs/components/molecules/FormField/useField.d.ts +1 -0
  19. package/dist/cjs/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
  20. package/dist/cjs/library.css +6008 -1642
  21. package/dist/cjs/library.js +3 -3
  22. package/dist/cjs/library.js.map +1 -1
  23. package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +1 -0
  24. package/dist/esm/components/atoms/Checkbox/Checkbox.types.d.ts +5 -0
  25. package/dist/esm/components/atoms/Input/Input.d.ts +1 -0
  26. package/dist/esm/components/atoms/Input/Input.types.d.ts +5 -0
  27. package/dist/esm/components/atoms/SelectListItem/SelectListItem.d.ts +4 -0
  28. package/dist/esm/components/atoms/SelectListItem/SelectListItem.types.d.ts +27 -0
  29. package/dist/esm/components/atoms/SelectListItem/index.d.ts +4 -0
  30. package/dist/esm/components/atoms/ToastNotification/ToastNotification.types.d.ts +0 -6
  31. package/dist/esm/components/atoms/Toggle/index.d.ts +1 -0
  32. package/dist/esm/components/atoms/Tooltip/Tooltip.d.ts +4 -0
  33. package/dist/esm/components/atoms/Tooltip/Tooltip.types.d.ts +59 -0
  34. package/dist/esm/components/atoms/Tooltip/index.d.ts +4 -0
  35. package/dist/esm/components/atoms/index.d.ts +4 -0
  36. package/dist/esm/components/molecules/Accordion/Accordion.types.d.ts +6 -0
  37. package/dist/esm/components/molecules/ChipInput/ChipInput.d.ts +2 -2
  38. package/dist/esm/components/molecules/FormField/FormField.types.d.ts +10 -1
  39. package/dist/esm/components/molecules/FormField/index.d.ts +3 -2
  40. package/dist/esm/components/molecules/FormField/useField.d.ts +1 -0
  41. package/dist/esm/components/molecules/ProgressBar/ProgressBar.types.d.ts +0 -1
  42. package/dist/esm/library.css +6008 -1642
  43. package/dist/esm/library.js +3 -3
  44. package/dist/esm/library.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/index.d.ts +0 -2122
@@ -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,5 @@
1
1
  import { ReactNode } from "react";
2
+ export type AccordionSizeEnum = 'Small' | 'Medium' | 'Large';
2
3
  export type AccordionSummaryProps = {
3
4
  children: ReactNode;
4
5
  className?: string;
@@ -21,6 +22,11 @@ export type AccordionDetailsProps = {
21
22
  export type AccordionProps = {
22
23
  children: ReactNode;
23
24
  className?: string;
25
+ /**
26
+ * The size of the accordion.
27
+ * @default 'Medium'
28
+ */
29
+ size?: AccordionSizeEnum;
24
30
  /**
25
31
  * Whether the accordion is expanded by default.
26
32
  * @default false
@@ -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
  */
@@ -56,6 +56,10 @@ export type FormFieldContextValues<T extends FieldValue = FieldValue> = {
56
56
  * id to use as htmlFor for label and id for input elements
57
57
  */
58
58
  formFieldId: string;
59
+ /**
60
+ * name of the form field
61
+ */
62
+ name?: string;
59
63
  };
60
64
  /**
61
65
  * Props for the FormFieldProvider component.
@@ -125,4 +129,9 @@ export type UseFieldProps<T extends FieldValue = FieldValue> = {
125
129
  * Default value for the field
126
130
  */
127
131
  defaultValue?: T;
132
+ /**
133
+ * the field is independent of the parent form field contexts
134
+ * @default false
135
+ */
136
+ independent?: boolean;
128
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 };
@@ -7,5 +7,6 @@ declare const useField: <T extends FieldValue = FieldValue>(props: UseFieldProps
7
7
  requiredField: boolean | undefined;
8
8
  invalidField: boolean | undefined;
9
9
  formFieldId: string | undefined;
10
+ name: string | undefined;
10
11
  };
11
12
  export default useField;
@@ -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
  */