@delightui/components 0.1.73 → 0.1.75

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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  declare const Checkbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "checked" | "value" | "type" | "size"> & {
3
3
  children?: React.ReactNode;
4
4
  size?: import("./Checkbox.types").CheckboxSizeEnum;
5
+ type?: import("./Checkbox.types").CheckboxTypeEnum;
5
6
  checked?: boolean;
6
7
  onValueChanged?: (value: boolean) => void;
7
8
  defaultChecked?: boolean;
@@ -1,6 +1,7 @@
1
1
  import type { InputHTMLAttributes } from 'react';
2
2
  export type CheckboxSizeEnum = 'Small' | 'Medium' | 'Large';
3
3
  export type CheckboxLabelAlignmentEnum = 'Left' | 'Right';
4
+ export type CheckboxTypeEnum = 'Default' | 'Inverse';
4
5
  export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size'> & {
5
6
  /**
6
7
  * The label of the checkbox.
@@ -11,6 +12,11 @@ export type CheckboxProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' |
11
12
  * @default 'Medium'
12
13
  */
13
14
  size?: CheckboxSizeEnum;
15
+ /**
16
+ * The type of the checkbox for inverse colors
17
+ * @default 'Default'
18
+ */
19
+ type?: CheckboxTypeEnum;
14
20
  /**
15
21
  * The checked state of the checkbox.
16
22
  */
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const onEnterKeyPreventFormSubmit: (onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>) => (e: React.KeyboardEvent<HTMLInputElement>) => void;
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { ButtonProps, IconButtonProps, TextProps } from '../../atoms';
3
+ export type DropzoneStatus = 'Empty' | 'Loading' | 'Uploaded';
3
4
  /**
4
5
  * Dropzone component props
5
- * @param initial React.ReactNode - The initial state of the dropzone.
6
- * @param uploading React.ReactNode - The uploading state of the dropzone.
6
+ * @param empty React.ReactNode - The empty state of the dropzone.
7
+ * @param loading React.ReactNode - The loading state of the dropzone.
7
8
  * @param uploaded React.ReactNode - The uploaded state of the dropzone.
8
9
  * @param accept { [key: string]: readonly string[] } - The accepted file types.
9
10
  * @param maxSize number - The maximum size of the file in bytes.
@@ -14,13 +15,13 @@ import { ButtonProps, IconButtonProps, TextProps } from '../../atoms';
14
15
  export type DropzoneProps = {
15
16
  className?: string;
16
17
  /**
17
- * The initial state of the dropzone.
18
+ * The empty state of the dropzone.
18
19
  */
19
- initial?: React.ReactNode;
20
+ empty?: React.ReactNode;
20
21
  /**
21
- * The uploading state of the dropzone.
22
+ * The loading state of the dropzone.
22
23
  */
23
- uploading?: React.ReactNode;
24
+ loading?: React.ReactNode;
24
25
  /**
25
26
  * The uploaded state of the dropzone.
26
27
  */
@@ -57,7 +58,7 @@ export type DropzoneProps = {
57
58
  };
58
59
  /**
59
60
  * Dropzone context type
60
- * @param status 'initial' | 'uploading' | 'uploaded' - The status of the dropzone.
61
+ * @param status DropzoneStatus - The status of the dropzone.
61
62
  * @param file File | null - The file of the dropzone.
62
63
  * @param selectFile () => void - The function to call when the file is selected.
63
64
  * @param resetUpload () => void - The function to call when the file is reset.
@@ -66,7 +67,7 @@ export type DropzoneContextType = {
66
67
  /**
67
68
  * The status of the dropzone.
68
69
  */
69
- status: 'initial' | 'uploading' | 'uploaded';
70
+ status: DropzoneStatus;
70
71
  /**
71
72
  * The files of the dropzone.
72
73
  */