@delightui/components 0.1.149 → 0.1.151
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/Button/Button.contants.d.ts +2 -0
- package/dist/cjs/components/atoms/Button/Button.types.d.ts +6 -0
- package/dist/cjs/components/atoms/Button/ButtonExample.d.ts +3 -0
- package/dist/cjs/components/atoms/ToggleButton/ToggleButton.presenter.d.ts +1 -0
- package/dist/cjs/components/organisms/Dropzone/Dropzone.d.ts +2 -2
- package/dist/cjs/components/organisms/Dropzone/Dropzone.presenter.d.ts +5 -4
- package/dist/cjs/components/organisms/Dropzone/Dropzone.types.d.ts +16 -2
- package/dist/cjs/library.css +75 -44
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.contants.d.ts +2 -0
- package/dist/esm/components/atoms/Button/Button.types.d.ts +6 -0
- package/dist/esm/components/atoms/Button/ButtonExample.d.ts +3 -0
- package/dist/esm/components/atoms/ToggleButton/ToggleButton.presenter.d.ts +1 -0
- package/dist/esm/components/organisms/Dropzone/Dropzone.d.ts +2 -2
- package/dist/esm/components/organisms/Dropzone/Dropzone.presenter.d.ts +5 -4
- package/dist/esm/components/organisms/Dropzone/Dropzone.types.d.ts +16 -2
- package/dist/esm/library.css +75 -44
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +23 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -69,6 +69,7 @@ type ButtonTypeEnum = 'Filled' | 'Outlined' | 'Ghost';
|
|
|
69
69
|
type ButtonStyleEnum = 'Primary' | 'Secondary' | 'Destructive';
|
|
70
70
|
type ButtonSizeEnum = 'Small' | 'Medium' | 'Large';
|
|
71
71
|
type ButtonActionTypeEnum = 'button' | 'submit' | 'reset';
|
|
72
|
+
type ButtonContentAlignmentEnum = 'Center' | 'SpaceBetween';
|
|
72
73
|
type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
|
|
73
74
|
/**
|
|
74
75
|
* Appearance of the button.
|
|
@@ -121,6 +122,11 @@ type ButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, 'style'> & {
|
|
|
121
122
|
* @default 'button'
|
|
122
123
|
*/
|
|
123
124
|
actionType?: ButtonActionTypeEnum;
|
|
125
|
+
/**
|
|
126
|
+
* Specifies alignment of the content like leading icon, content and trailing icon
|
|
127
|
+
* @default 'Center'
|
|
128
|
+
*/
|
|
129
|
+
alignContent?: ButtonContentAlignmentEnum;
|
|
124
130
|
};
|
|
125
131
|
|
|
126
132
|
/**
|
|
@@ -2257,7 +2263,7 @@ type DropzoneStatus = 'Empty' | 'Loading' | 'Uploaded';
|
|
|
2257
2263
|
* @param onFilesUpload (file: File) => void - callback when files are selected
|
|
2258
2264
|
* @param onFilesReset () => void - callback when files are reset
|
|
2259
2265
|
*/
|
|
2260
|
-
type DropzoneProps = ControlledFormComponentProps<
|
|
2266
|
+
type DropzoneProps<T extends File | string = File> = ControlledFormComponentProps<T[]> & {
|
|
2261
2267
|
className?: string;
|
|
2262
2268
|
/**
|
|
2263
2269
|
* the view when no file is selected.
|
|
@@ -2298,6 +2304,18 @@ type DropzoneProps = ControlledFormComponentProps<File[]> & {
|
|
|
2298
2304
|
* callback when files are reset
|
|
2299
2305
|
*/
|
|
2300
2306
|
onFilesReset?: () => void;
|
|
2307
|
+
/**
|
|
2308
|
+
* Callback when files are changed for dropzone
|
|
2309
|
+
* @param Files updated selected files by user
|
|
2310
|
+
* @returns {void}
|
|
2311
|
+
*/
|
|
2312
|
+
handleFilesChange?: (Files: File[]) => void;
|
|
2313
|
+
/**
|
|
2314
|
+
* specifies what the component needs to accept as value
|
|
2315
|
+
* sync this with Dropzone generics
|
|
2316
|
+
* @default 'File'
|
|
2317
|
+
*/
|
|
2318
|
+
type?: 'File' | 'URL';
|
|
2301
2319
|
};
|
|
2302
2320
|
/**
|
|
2303
2321
|
* Dropzone context type
|
|
@@ -2306,7 +2324,7 @@ type DropzoneProps = ControlledFormComponentProps<File[]> & {
|
|
|
2306
2324
|
* @param selectFile () => void - The function to call when the file is selected.
|
|
2307
2325
|
* @param resetUpload () => void - The function to call when the file is reset.
|
|
2308
2326
|
*/
|
|
2309
|
-
type DropzoneContextType = {
|
|
2327
|
+
type DropzoneContextType<T extends File | string = File> = {
|
|
2310
2328
|
/**
|
|
2311
2329
|
* The status of the dropzone.
|
|
2312
2330
|
*/
|
|
@@ -2325,6 +2343,7 @@ type DropzoneContextType = {
|
|
|
2325
2343
|
accept: {
|
|
2326
2344
|
[key: string]: readonly string[];
|
|
2327
2345
|
};
|
|
2346
|
+
value?: T[];
|
|
2328
2347
|
/**
|
|
2329
2348
|
* The function to call to open the file dialog.
|
|
2330
2349
|
*/
|
|
@@ -2346,8 +2365,8 @@ type DropzoneFilenameProps = TextProps & {
|
|
|
2346
2365
|
fileIndex?: number;
|
|
2347
2366
|
};
|
|
2348
2367
|
|
|
2349
|
-
declare const Dropzone: (props: DropzoneProps) => react_jsx_runtime.JSX.Element;
|
|
2350
|
-
declare const useDropzoneContext: () => DropzoneContextType
|
|
2368
|
+
declare const Dropzone: <T extends File | string = File>(props: DropzoneProps<T>) => react_jsx_runtime.JSX.Element;
|
|
2369
|
+
declare const useDropzoneContext: <T extends File | string = File>() => DropzoneContextType<T>;
|
|
2351
2370
|
|
|
2352
2371
|
declare const DropzoneClear: (props: DropzoneClearProps) => react_jsx_runtime.JSX.Element;
|
|
2353
2372
|
|