hans-ui-design-lib 0.0.90 → 1.0.0
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/index.d.ts +33 -35
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { default as default_2 } from '
|
|
2
|
-
import { default as default_3 } from '../../node_modules/react';
|
|
3
|
-
import { default as default_4 } from '../../../node_modules/react';
|
|
1
|
+
import { default as default_2 } from 'react';
|
|
4
2
|
import { JSX } from 'react/jsx-runtime';
|
|
5
3
|
|
|
6
4
|
export declare type ButtonShape = 'rounded' | 'square';
|
|
@@ -20,11 +18,11 @@ export declare type DropdownItem = PopupOptionItem;
|
|
|
20
18
|
|
|
21
19
|
export declare const DynamicIconImports: Record<string, () => Promise<IconLibrary>>;
|
|
22
20
|
|
|
23
|
-
export declare const HansAvatar:
|
|
21
|
+
export declare const HansAvatar: default_2.MemoExoticComponent<(props: HansAvatarProps) => JSX.Element>;
|
|
24
22
|
|
|
25
|
-
export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<
|
|
23
|
+
export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<default_2.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'size' | 'loading'>;
|
|
26
24
|
|
|
27
|
-
export declare const HansAvatarPropsList: ("
|
|
25
|
+
export declare const HansAvatarPropsList: ("customClasses" | "loading" | "alt" | "src" | "avatarSize" | "fallbackIconName")[];
|
|
28
26
|
|
|
29
27
|
declare const HansAvatarSchema: {
|
|
30
28
|
readonly src: "string";
|
|
@@ -72,12 +70,12 @@ declare const HansButtonSchema: {
|
|
|
72
70
|
readonly loading: "boolean";
|
|
73
71
|
};
|
|
74
72
|
|
|
75
|
-
export declare const HansCard:
|
|
73
|
+
export declare const HansCard: default_2.MemoExoticComponent<(props: HansCardProps) => JSX.Element>;
|
|
76
74
|
|
|
77
75
|
declare type HansCardLayout = 'profile' | 'image';
|
|
78
76
|
|
|
79
|
-
export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<
|
|
80
|
-
children?:
|
|
77
|
+
export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
|
|
78
|
+
children?: default_2.ReactNode;
|
|
81
79
|
};
|
|
82
80
|
|
|
83
81
|
export declare const HansCardPropsList: ("customClasses" | "loading" | "loadingColor" | "title" | "description" | "imageSrc" | "imageAlt" | "avatarSrc" | "avatarAlt" | "avatarLoading" | "loadingAriaLabel" | "cardLayout" | "cardSize" | "cardColor" | "cardVariant")[];
|
|
@@ -115,7 +113,7 @@ declare const HansCardSchema: {
|
|
|
115
113
|
readonly customClasses: "string";
|
|
116
114
|
};
|
|
117
115
|
|
|
118
|
-
export declare const HansChart:
|
|
116
|
+
export declare const HansChart: default_2.MemoExoticComponent<(props: HansChartProps) => JSX.Element>;
|
|
119
117
|
|
|
120
118
|
export declare type HansChartColor = Color | string;
|
|
121
119
|
|
|
@@ -132,7 +130,7 @@ export declare type HansChartPointEvent = {
|
|
|
132
130
|
seriesName?: string;
|
|
133
131
|
};
|
|
134
132
|
|
|
135
|
-
export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<
|
|
133
|
+
export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'onClick'> & {
|
|
136
134
|
onPointClick?: (event: HansChartPointEvent) => void;
|
|
137
135
|
};
|
|
138
136
|
|
|
@@ -302,7 +300,7 @@ declare const HansDropdownSchema: {
|
|
|
302
300
|
readonly noOptionsText: "string";
|
|
303
301
|
};
|
|
304
302
|
|
|
305
|
-
export declare const HansIcon:
|
|
303
|
+
export declare const HansIcon: default_2.FC<HansIconProps>;
|
|
306
304
|
|
|
307
305
|
export declare type HansIconProps = InferPropsFromSchema<typeof HansIconSchema>;
|
|
308
306
|
|
|
@@ -354,7 +352,7 @@ declare const HansInputSchema: {
|
|
|
354
352
|
readonly rightIcon: "node";
|
|
355
353
|
};
|
|
356
354
|
|
|
357
|
-
export declare const HansKanban:
|
|
355
|
+
export declare const HansKanban: default_2.MemoExoticComponent<(props: HansKanbanProps) => JSX.Element>;
|
|
358
356
|
|
|
359
357
|
export declare const HansKanbanColumn: default_2.MemoExoticComponent<(props: HansKanbanColumnProps) => JSX.Element>;
|
|
360
358
|
|
|
@@ -437,7 +435,7 @@ export declare type HansKanbanMoveEvent = {
|
|
|
437
435
|
nextItems: HansKanbanItemData[];
|
|
438
436
|
};
|
|
439
437
|
|
|
440
|
-
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<
|
|
438
|
+
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> & {
|
|
441
439
|
onItemsChange?: (items: HansKanbanItemData[]) => void;
|
|
442
440
|
onMoveItem?: (event: HansKanbanMoveEvent) => void;
|
|
443
441
|
onItemClick?: (item: HansKanbanItemData) => void;
|
|
@@ -473,9 +471,9 @@ declare const HansKanbanSchema: {
|
|
|
473
471
|
readonly loadingAriaLabel: "string";
|
|
474
472
|
};
|
|
475
473
|
|
|
476
|
-
export declare const HansLoading:
|
|
474
|
+
export declare const HansLoading: default_2.MemoExoticComponent<(props: HansLoadingProps) => JSX.Element>;
|
|
477
475
|
|
|
478
|
-
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<
|
|
476
|
+
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'>;
|
|
479
477
|
|
|
480
478
|
export declare const HansLoadingPropsList: ("rounded" | "customClasses" | "loadingType" | "loadingSize" | "loadingColor" | "skeletonWidth" | "skeletonHeight" | "ariaLabel")[];
|
|
481
479
|
|
|
@@ -505,10 +503,10 @@ declare const HansLoadingSchema: {
|
|
|
505
503
|
readonly ariaLabel: "string";
|
|
506
504
|
};
|
|
507
505
|
|
|
508
|
-
export declare const HansModal:
|
|
506
|
+
export declare const HansModal: default_2.MemoExoticComponent<(props: HansModalProps) => JSX.Element | null>;
|
|
509
507
|
|
|
510
|
-
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<
|
|
511
|
-
children?:
|
|
508
|
+
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color' | 'title'> & {
|
|
509
|
+
children?: default_2.ReactNode;
|
|
512
510
|
onOpenChange?: (open: boolean) => void;
|
|
513
511
|
onClose?: (reason: ModalCloseReason) => void;
|
|
514
512
|
onConfirm?: () => void;
|
|
@@ -573,17 +571,17 @@ declare const HansModalSchema: {
|
|
|
573
571
|
readonly maxBodyHeight: "string";
|
|
574
572
|
};
|
|
575
573
|
|
|
576
|
-
export declare const HansPopup:
|
|
574
|
+
export declare const HansPopup: default_2.MemoExoticComponent<(props: HansPopupProps) => JSX.Element>;
|
|
577
575
|
|
|
578
|
-
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<
|
|
579
|
-
children:
|
|
576
|
+
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
577
|
+
children: default_2.ReactNode;
|
|
580
578
|
onOpenChange?: (open: boolean) => void;
|
|
581
579
|
renderTrigger: (params: {
|
|
582
580
|
isOpen: boolean;
|
|
583
581
|
open: () => void;
|
|
584
582
|
close: () => void;
|
|
585
583
|
toggle: () => void;
|
|
586
|
-
}) =>
|
|
584
|
+
}) => default_2.ReactNode;
|
|
587
585
|
onDirectionChange?: (direction: PopupDirection) => void;
|
|
588
586
|
};
|
|
589
587
|
|
|
@@ -659,14 +657,14 @@ declare const HansSelectOptionSchema: {
|
|
|
659
657
|
export declare type HansTabItem = {
|
|
660
658
|
id: string;
|
|
661
659
|
title: string;
|
|
662
|
-
content:
|
|
660
|
+
content: default_2.ReactNode;
|
|
663
661
|
disabled?: boolean;
|
|
664
662
|
closable?: boolean;
|
|
665
663
|
tabColor?: Color;
|
|
666
664
|
tabVariant?: Variant;
|
|
667
665
|
};
|
|
668
666
|
|
|
669
|
-
export declare const HansTable:
|
|
667
|
+
export declare const HansTable: default_2.MemoExoticComponent<(props: HansTableProps) => JSX.Element>;
|
|
670
668
|
|
|
671
669
|
export declare type HansTableColumn = {
|
|
672
670
|
key: string;
|
|
@@ -676,7 +674,7 @@ export declare type HansTableColumn = {
|
|
|
676
674
|
width?: string;
|
|
677
675
|
align?: 'left' | 'center' | 'right';
|
|
678
676
|
filterAlign?: 'left' | 'center' | 'right';
|
|
679
|
-
render?: (value: unknown, row: HansTableRow, rowIndex: number) =>
|
|
677
|
+
render?: (value: unknown, row: HansTableRow, rowIndex: number) => default_2.ReactNode;
|
|
680
678
|
};
|
|
681
679
|
|
|
682
680
|
export declare type HansTableFilterConfig = {
|
|
@@ -690,7 +688,7 @@ export declare type HansTableFilterConfig = {
|
|
|
690
688
|
enableAutocomplete?: boolean;
|
|
691
689
|
};
|
|
692
690
|
|
|
693
|
-
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<
|
|
691
|
+
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
694
692
|
initialSort?: HansTableSortState;
|
|
695
693
|
initialFilters?: Record<string, string>;
|
|
696
694
|
onSortChange?: (sortState: HansTableSortState) => void;
|
|
@@ -764,9 +762,9 @@ export declare type HansTableSortState = {
|
|
|
764
762
|
direction: HansTableSortDirection;
|
|
765
763
|
} | null;
|
|
766
764
|
|
|
767
|
-
export declare const HansTabs:
|
|
765
|
+
export declare const HansTabs: default_2.MemoExoticComponent<(props: HansTabsProps) => JSX.Element>;
|
|
768
766
|
|
|
769
|
-
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<
|
|
767
|
+
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
770
768
|
onTabChange?: (tabId: string) => void;
|
|
771
769
|
onTabClose?: (tabId: string) => void;
|
|
772
770
|
onTabsChange?: (tabs: HansTabItem[]) => void;
|
|
@@ -804,9 +802,9 @@ declare const HansTabsSchema: {
|
|
|
804
802
|
readonly inputId: "string";
|
|
805
803
|
};
|
|
806
804
|
|
|
807
|
-
export declare const HansTag:
|
|
805
|
+
export declare const HansTag: default_2.MemoExoticComponent<(props: HansTagProps) => JSX.Element>;
|
|
808
806
|
|
|
809
|
-
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<
|
|
807
|
+
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
810
808
|
onAction?: () => void;
|
|
811
809
|
};
|
|
812
810
|
|
|
@@ -827,9 +825,9 @@ declare const HansTagSchema: {
|
|
|
827
825
|
readonly disabled: "boolean";
|
|
828
826
|
};
|
|
829
827
|
|
|
830
|
-
export declare const HansToast:
|
|
828
|
+
export declare const HansToast: default_2.MemoExoticComponent<(props: HansToastProps) => JSX.Element | null>;
|
|
831
829
|
|
|
832
|
-
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<
|
|
830
|
+
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
|
|
833
831
|
onClose?: (reason: ToastCloseReason) => void;
|
|
834
832
|
onVisibilityChange?: (visible: boolean) => void;
|
|
835
833
|
portalTarget?: HTMLElement | null;
|
|
@@ -922,10 +920,10 @@ declare const HansToggleSchema: {
|
|
|
922
920
|
readonly inputId: "string";
|
|
923
921
|
};
|
|
924
922
|
|
|
925
|
-
export declare type IconLibrary = Record<string,
|
|
923
|
+
export declare type IconLibrary = Record<string, default_2.ComponentType<default_2.SVGProps<SVGSVGElement>>>;
|
|
926
924
|
|
|
927
925
|
declare type InferPropsFromSchema<T extends Record<string, SchemaType>> = Partial<{
|
|
928
|
-
[K in keyof T]: T[K] extends 'string' ? string : T[K] extends 'boolean' ? boolean : T[K] extends 'number' ? number : T[K] extends 'node' ?
|
|
926
|
+
[K in keyof T]: T[K] extends 'string' ? string : T[K] extends 'boolean' ? boolean : T[K] extends 'number' ? number : T[K] extends 'node' ? default_2.ReactNode : T[K] extends 'json' ? Record<string, unknown> : T[K] extends {
|
|
929
927
|
type: 'custom';
|
|
930
928
|
ref: infer U;
|
|
931
929
|
} ? U : never;
|