@zjlab-fe/data-hub-ui 0.10.1 → 0.10.3
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/types/components/feature-card/index.d.ts +3 -24
- package/dist/types/components/feature-card/types.d.ts +33 -0
- package/dist/types/components/file-uploader/components/uploader-drop-zone.d.ts +2 -2
- package/dist/types/components/file-uploader/components/uploader-file-item.d.ts +2 -2
- package/dist/types/components/file-uploader/components/uploader-file-list.d.ts +6 -2
- package/dist/types/components/file-uploader/components/uploader.d.ts +8 -8
- package/dist/types/components/section-heading/index.d.ts +3 -17
- package/dist/types/components/section-heading/types.d.ts +24 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -1
- package/tailwind.config.js +0 -1
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './index.css';
|
|
3
|
-
type
|
|
4
|
-
type
|
|
5
|
-
export interface FeatureCardClassNames {
|
|
6
|
-
root?: string;
|
|
7
|
-
icon?: string;
|
|
8
|
-
body?: string;
|
|
9
|
-
title?: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface FeatureCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
13
|
-
/** Icon content: ReactNode or string (URL/path to image) */
|
|
14
|
-
icon?: React.ReactNode | string;
|
|
15
|
-
/** Card title (named `cardTitle` to avoid conflict with HTML title attribute) */
|
|
16
|
-
cardTitle?: React.ReactNode;
|
|
17
|
-
description?: React.ReactNode;
|
|
18
|
-
titleAs?: keyof JSX.IntrinsicElements;
|
|
19
|
-
/** Alignment: left (default), center, right */
|
|
20
|
-
align?: Align;
|
|
21
|
-
/** Size: sm, md (default), lg */
|
|
22
|
-
size?: Size;
|
|
23
|
-
/** Custom classNames for each element */
|
|
24
|
-
classNames?: FeatureCardClassNames;
|
|
25
|
-
}
|
|
3
|
+
import type { FeatureCardProps } from './types';
|
|
4
|
+
export type { FeatureCardClassNames, FeatureCardProps, FeatureCardStyles, FeatureCardAlign, FeatureCardSize, } from './types';
|
|
26
5
|
declare const FeatureCardRoot: React.ForwardRefExoticComponent<FeatureCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
27
6
|
export type FeatureCardRootProps = React.ComponentPropsWithoutRef<typeof FeatureCardRoot>;
|
|
28
7
|
interface SlottableProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export type FeatureCardAlign = 'left' | 'center' | 'right';
|
|
2
|
+
export type FeatureCardSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface FeatureCardClassNames {
|
|
4
|
+
root?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
body?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface FeatureCardStyles {
|
|
11
|
+
root?: React.CSSProperties;
|
|
12
|
+
icon?: React.CSSProperties;
|
|
13
|
+
body?: React.CSSProperties;
|
|
14
|
+
title?: React.CSSProperties;
|
|
15
|
+
description?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export interface FeatureCardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
18
|
+
/** Icon content: ReactNode or string (URL/path to image) */
|
|
19
|
+
icon?: React.ReactNode | string;
|
|
20
|
+
/** Card title (named `cardTitle` to avoid conflict with HTML title attribute) */
|
|
21
|
+
cardTitle?: React.ReactNode;
|
|
22
|
+
description?: React.ReactNode;
|
|
23
|
+
titleAs?: keyof JSX.IntrinsicElements;
|
|
24
|
+
/** Alignment: left (default), center, right */
|
|
25
|
+
align?: FeatureCardAlign;
|
|
26
|
+
/** Size: sm, md (default), lg */
|
|
27
|
+
size?: FeatureCardSize;
|
|
28
|
+
/** Gap: 2, 3, 4 */
|
|
29
|
+
iconVariant?: 'default' | 'full' | 'square';
|
|
30
|
+
/** Custom classNames for each element */
|
|
31
|
+
classNames?: FeatureCardClassNames | ((props: FeatureCardProps) => FeatureCardClassNames);
|
|
32
|
+
styles?: FeatureCardStyles | ((props: FeatureCardProps) => FeatureCardStyles);
|
|
33
|
+
}
|
|
@@ -34,7 +34,7 @@ export interface UploaderDropZoneProps {
|
|
|
34
34
|
/** Custom icon - can be a React component or image/svg path */
|
|
35
35
|
icon?: ReactNode | string;
|
|
36
36
|
/** Custom class names for different elements */
|
|
37
|
-
classNames?: UploaderDropZoneClassNames;
|
|
37
|
+
classNames?: UploaderDropZoneClassNames | ((props: UploaderDropZoneProps) => UploaderDropZoneClassNames);
|
|
38
38
|
/** Callback when files are dropped or selected */
|
|
39
39
|
onDrop: (files: FileWithPath[]) => void;
|
|
40
40
|
/** custom file validation callback */
|
|
@@ -47,4 +47,4 @@ export interface DropZoneError {
|
|
|
47
47
|
message: string;
|
|
48
48
|
rejectedFiles?: File[];
|
|
49
49
|
}
|
|
50
|
-
export declare function UploaderDropZone(
|
|
50
|
+
export declare function UploaderDropZone(props: UploaderDropZoneProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -28,7 +28,7 @@ export interface UploaderFileItemClassNames {
|
|
|
28
28
|
interface FileItemProps {
|
|
29
29
|
file: UploadFile;
|
|
30
30
|
/** Custom class names for different elements */
|
|
31
|
-
classNames?: UploaderFileItemClassNames;
|
|
31
|
+
classNames?: UploaderFileItemClassNames | ((props: FileItemProps) => UploaderFileItemClassNames);
|
|
32
32
|
/** start function passed from parent that has upload handlers */
|
|
33
33
|
onStart?: (id: string) => void;
|
|
34
34
|
/** Cancel function passed from parent that has upload handlers */
|
|
@@ -40,5 +40,5 @@ interface FileItemProps {
|
|
|
40
40
|
/** Resume function passed from parent that has upload handlers */
|
|
41
41
|
onResume?: (id: string) => void;
|
|
42
42
|
}
|
|
43
|
-
export declare function UploaderFileItem(
|
|
43
|
+
export declare function UploaderFileItem(props: FileItemProps): import("react/jsx-runtime").JSX.Element;
|
|
44
44
|
export {};
|
|
@@ -3,12 +3,16 @@ import './uploader-file-list.css';
|
|
|
3
3
|
export interface FileListClassNames {
|
|
4
4
|
/** File list container */
|
|
5
5
|
container?: string;
|
|
6
|
+
/** File list title */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** File list */
|
|
9
|
+
listWrapper?: string;
|
|
6
10
|
/** Empty state wrapper */
|
|
7
11
|
empty?: string;
|
|
8
12
|
}
|
|
9
13
|
interface FileListProps {
|
|
10
14
|
/** Custom class names for different elements */
|
|
11
|
-
classNames?: FileListClassNames;
|
|
15
|
+
classNames?: FileListClassNames | ((props: FileListProps) => FileListClassNames);
|
|
12
16
|
/** Empty state text or component */
|
|
13
17
|
emptyText?: string;
|
|
14
18
|
/** Children components (e.g., file items) */
|
|
@@ -25,5 +29,5 @@ interface FileListProps {
|
|
|
25
29
|
* />
|
|
26
30
|
* ```
|
|
27
31
|
*/
|
|
28
|
-
export declare function UploaderFileListLayout(
|
|
32
|
+
export declare function UploaderFileListLayout(props: FileListProps): import("react/jsx-runtime").JSX.Element;
|
|
29
33
|
export {};
|
|
@@ -5,6 +5,12 @@ import { type DropZoneError, type UploaderDropZoneClassNames } from './uploader-
|
|
|
5
5
|
import type { UploadHandlers } from '../types';
|
|
6
6
|
import { type FileListClassNames } from './uploader-file-list';
|
|
7
7
|
import { type UploaderFileItemClassNames } from './uploader-file-item';
|
|
8
|
+
interface UploaderClassNames {
|
|
9
|
+
container?: string;
|
|
10
|
+
dragZone?: UploaderDropZoneClassNames;
|
|
11
|
+
fileItem?: UploaderFileItemClassNames;
|
|
12
|
+
fileList?: FileListClassNames;
|
|
13
|
+
}
|
|
8
14
|
interface UploaderProps {
|
|
9
15
|
/** Provide handlers per file (decided at selection time) */
|
|
10
16
|
handlers: UploadHandlers;
|
|
@@ -21,12 +27,7 @@ interface UploaderProps {
|
|
|
21
27
|
/** Maximum file size in bytes (per-usage option) */
|
|
22
28
|
maxSize?: number;
|
|
23
29
|
/** Additional class name for the uploader container */
|
|
24
|
-
classNames?:
|
|
25
|
-
container?: string;
|
|
26
|
-
dragZone?: UploaderDropZoneClassNames;
|
|
27
|
-
fileList?: UploaderFileItemClassNames;
|
|
28
|
-
fileItem?: FileListClassNames;
|
|
29
|
-
};
|
|
30
|
+
classNames?: UploaderClassNames | ((props: UploaderProps) => UploaderClassNames);
|
|
30
31
|
/** Error callback for upload errors */
|
|
31
32
|
onDropZoneError?: (error: DropZoneError) => void;
|
|
32
33
|
/** custom file validation callback */
|
|
@@ -59,6 +60,5 @@ interface UploaderProps {
|
|
|
59
60
|
* />
|
|
60
61
|
* ```
|
|
61
62
|
*/
|
|
62
|
-
export declare function Uploader(
|
|
63
|
-
classNames, onDropZoneError, fileValidation, }: UploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export declare function Uploader(props: UploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
64
64
|
export {};
|
|
@@ -1,21 +1,7 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './index.css';
|
|
3
|
-
type
|
|
4
|
-
type
|
|
5
|
-
export interface SectionHeadingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
kicker?: React.ReactNode;
|
|
7
|
-
mainTitle?: React.ReactNode;
|
|
8
|
-
description?: React.ReactNode;
|
|
9
|
-
align?: Align;
|
|
10
|
-
size?: Size;
|
|
11
|
-
titleAs?: keyof JSX.IntrinsicElements;
|
|
12
|
-
classNames?: {
|
|
13
|
-
root?: string;
|
|
14
|
-
kicker?: string;
|
|
15
|
-
title?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
3
|
+
import type { SectionHeadingProps } from './types';
|
|
4
|
+
export type { SectionHeadingClassNames, SectionHeadingProps, SectionHeadingStyles, SectionHeadingAlign, SectionHeadingSize, } from './types';
|
|
19
5
|
declare const SectionHeadingRoot: React.ForwardRefExoticComponent<SectionHeadingProps & React.RefAttributes<HTMLDivElement>>;
|
|
20
6
|
export type SectionHeadingRootProps = React.ComponentPropsWithoutRef<typeof SectionHeadingRoot>;
|
|
21
7
|
interface SlottableProps extends React.HTMLAttributes<HTMLElement> {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type SectionHeadingAlign = 'left' | 'center' | 'right';
|
|
2
|
+
export type SectionHeadingSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
export interface SectionHeadingClassNames {
|
|
4
|
+
root?: string;
|
|
5
|
+
kicker?: string;
|
|
6
|
+
title?: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SectionHeadingStyles {
|
|
10
|
+
root?: React.CSSProperties;
|
|
11
|
+
kicker?: React.CSSProperties;
|
|
12
|
+
title?: React.CSSProperties;
|
|
13
|
+
description?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export interface SectionHeadingProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
16
|
+
kicker?: React.ReactNode;
|
|
17
|
+
mainTitle?: React.ReactNode;
|
|
18
|
+
description?: React.ReactNode;
|
|
19
|
+
align?: SectionHeadingAlign;
|
|
20
|
+
size?: SectionHeadingSize;
|
|
21
|
+
titleAs?: keyof JSX.IntrinsicElements;
|
|
22
|
+
classNames?: SectionHeadingClassNames | ((props: SectionHeadingProps) => SectionHeadingClassNames);
|
|
23
|
+
styles?: SectionHeadingStyles | ((props: SectionHeadingProps) => SectionHeadingStyles);
|
|
24
|
+
}
|