digital-rabbit-cl 2.3.1 → 2.4.1
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/components/FileUpload/FileUpload.d.ts +39 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -0
- package/dist/components/FileUpload/index.d.ts +3 -0
- package/dist/components/FileUpload/index.d.ts.map +1 -0
- package/dist/components/ImageThumbnail/ImageThumbnail.d.ts +53 -0
- package/dist/components/ImageThumbnail/ImageThumbnail.d.ts.map +1 -0
- package/dist/components/ImageThumbnail/index.d.ts +3 -0
- package/dist/components/ImageThumbnail/index.d.ts.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +11 -0
- package/dist/components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/Skeleton/index.d.ts +3 -0
- package/dist/components/Skeleton/index.d.ts.map +1 -0
- package/dist/digital-rabbit-cl.es.js +1561 -1320
- package/dist/digital-rabbit-cl.umd.js +4 -4
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps, ElementSpecificProps } from '../../types/component-props';
|
|
3
|
+
export interface FileUploadProps extends Pick<BaseComponentProps, 'className' | 'style'> {
|
|
4
|
+
/**
|
|
5
|
+
* Called when a valid file is selected or dropped
|
|
6
|
+
*/
|
|
7
|
+
onUpload: (file: File) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Accepted file types (e.g., "image/*", ".pdf,.doc")
|
|
10
|
+
*/
|
|
11
|
+
accept?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum file size in bytes
|
|
14
|
+
*/
|
|
15
|
+
maxSizeBytes?: number;
|
|
16
|
+
/**
|
|
17
|
+
* Whether an upload is in progress
|
|
18
|
+
*/
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Error message to display (also triggers error styling)
|
|
22
|
+
*/
|
|
23
|
+
error?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Label text shown in the drop zone
|
|
26
|
+
*/
|
|
27
|
+
label?: string;
|
|
28
|
+
/**
|
|
29
|
+
* HTML div element attributes
|
|
30
|
+
*/
|
|
31
|
+
divProps?: Omit<ElementSpecificProps<HTMLDivElement>, 'className' | 'style'>;
|
|
32
|
+
/**
|
|
33
|
+
* HTML input element attributes (omits conflicting props)
|
|
34
|
+
*/
|
|
35
|
+
inputProps?: Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type' | 'accept' | 'onChange' | 'disabled' | 'style' | 'className'>;
|
|
36
|
+
}
|
|
37
|
+
declare const FileUpload: React.FC<FileUploadProps>;
|
|
38
|
+
export default FileUpload;
|
|
39
|
+
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/FileUpload.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC;IACtF;;OAEG;IACH,QAAQ,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAE/B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;IAE7E;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CACf,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAC3C,MAAM,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,OAAO,GAAG,WAAW,CACpE,CAAC;CACH;AAgBD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoIzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FileUpload/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps, ElementSpecificProps } from '../../types/component-props';
|
|
3
|
+
export type ImageThumbnailSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export interface ImageThumbnailProps extends Pick<BaseComponentProps, 'className' | 'style'> {
|
|
5
|
+
/**
|
|
6
|
+
* Image source URL (e.g., GCS public URL)
|
|
7
|
+
*/
|
|
8
|
+
src?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Alt text for the image
|
|
11
|
+
*/
|
|
12
|
+
alt?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Size variant
|
|
15
|
+
* - sm: 48x48
|
|
16
|
+
* - md: 96x96
|
|
17
|
+
* - lg: 192x192
|
|
18
|
+
* @default 'md'
|
|
19
|
+
*/
|
|
20
|
+
size?: ImageThumbnailSize;
|
|
21
|
+
/**
|
|
22
|
+
* Explicitly show the skeleton — use when you don't have a src yet (e.g. mid-upload).
|
|
23
|
+
* The skeleton also shows automatically while the image loads from the network,
|
|
24
|
+
* but only after skeletonDelay ms have passed (to avoid flashing on fast loads).
|
|
25
|
+
*/
|
|
26
|
+
loading?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* How long to wait before showing the network-load skeleton (ms).
|
|
29
|
+
* Set to 0 to show immediately. Has no effect on the explicit loading prop.
|
|
30
|
+
* @default 150
|
|
31
|
+
*/
|
|
32
|
+
skeletonDelay?: number;
|
|
33
|
+
/**
|
|
34
|
+
* When provided, renders an × button overlay. Call this to remove the item.
|
|
35
|
+
*/
|
|
36
|
+
onRemove?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Accessible label for the remove button
|
|
39
|
+
* @default 'Remove'
|
|
40
|
+
*/
|
|
41
|
+
removeLabel?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Custom fallback element shown when src is missing or fails to load
|
|
44
|
+
*/
|
|
45
|
+
fallback?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* HTML img element attributes (omits conflicting props)
|
|
48
|
+
*/
|
|
49
|
+
imgProps?: Omit<ElementSpecificProps<HTMLImageElement>, 'src' | 'alt' | 'style' | 'className'>;
|
|
50
|
+
}
|
|
51
|
+
declare const ImageThumbnail: React.FC<ImageThumbnailProps>;
|
|
52
|
+
export default ImageThumbnail;
|
|
53
|
+
//# sourceMappingURL=ImageThumbnail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageThumbnail.d.ts","sourceRoot":"","sources":["../../../src/components/ImageThumbnail/ImageThumbnail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEpD,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC;IAC1F;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAE1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,OAAO,GAAG,WAAW,CAAC,CAAC;CAChG;AAmBD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8FjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ImageThumbnail/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { BaseComponentProps, ElementSpecificProps } from '../../types/component-props';
|
|
3
|
+
export interface SkeletonProps extends Pick<BaseComponentProps, 'className' | 'style'> {
|
|
4
|
+
/**
|
|
5
|
+
* HTML div element attributes
|
|
6
|
+
*/
|
|
7
|
+
divProps?: Omit<ElementSpecificProps<HTMLDivElement>, 'className' | 'style'>;
|
|
8
|
+
}
|
|
9
|
+
declare const Skeleton: React.FC<SkeletonProps>;
|
|
10
|
+
export default Skeleton;
|
|
11
|
+
//# sourceMappingURL=Skeleton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAE5F,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,kBAAkB,EAAE,WAAW,GAAG,OAAO,CAAC;IACpF;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC,oBAAoB,CAAC,cAAc,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,CAAC;CAC9E;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAcrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,YAAY,CAAC"}
|