hans-ui-design-lib 1.0.26 → 1.0.27
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.cjs.js +36 -36
- package/dist/index.d.ts +40 -42
- package/dist/index.es.js +17452 -17420
- 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 const assertCompleteHansTheme: (theme: HansThemeCombination) => void;
|
|
@@ -51,16 +49,16 @@ export declare const HANS_THEME_TONE_LEVELS: HansThemeToneLevel[];
|
|
|
51
49
|
|
|
52
50
|
export declare const HANS_THEME_WINDOW_KEY = "HansUI";
|
|
53
51
|
|
|
54
|
-
export declare const HansAccordion:
|
|
52
|
+
export declare const HansAccordion: default_2.MemoExoticComponent<(props: HansAccordionProps) => JSX.Element>;
|
|
55
53
|
|
|
56
54
|
export declare type HansAccordionItem = {
|
|
57
55
|
id?: string;
|
|
58
56
|
title: string;
|
|
59
|
-
description:
|
|
57
|
+
description: default_2.ReactNode;
|
|
60
58
|
disabled?: boolean;
|
|
61
59
|
};
|
|
62
60
|
|
|
63
|
-
export declare type HansAccordionProps = InferPropsFromSchema<typeof HansAccordionSchema> & Omit<
|
|
61
|
+
export declare type HansAccordionProps = InferPropsFromSchema<typeof HansAccordionSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
64
62
|
onOpenItemIdsChange?: (openItemIds: string[]) => void;
|
|
65
63
|
};
|
|
66
64
|
|
|
@@ -111,11 +109,11 @@ declare const HansAccordionSchema: {
|
|
|
111
109
|
readonly accordionId: "string";
|
|
112
110
|
};
|
|
113
111
|
|
|
114
|
-
export declare const HansAvatar:
|
|
112
|
+
export declare const HansAvatar: default_2.MemoExoticComponent<(props: HansAvatarProps) => JSX.Element>;
|
|
115
113
|
|
|
116
|
-
export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<
|
|
114
|
+
export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<default_2.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'size' | 'loading'>;
|
|
117
115
|
|
|
118
|
-
export declare const HansAvatarPropsList: Partial<Record<"
|
|
116
|
+
export declare const HansAvatarPropsList: Partial<Record<"customClasses" | "loading" | "alt" | "src" | "avatarSize" | "fallbackIconName", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
119
117
|
|
|
120
118
|
declare const HansAvatarSchema: {
|
|
121
119
|
readonly src: "string";
|
|
@@ -171,12 +169,12 @@ declare const HansButtonSchema: {
|
|
|
171
169
|
readonly loading: "boolean";
|
|
172
170
|
};
|
|
173
171
|
|
|
174
|
-
export declare const HansCard:
|
|
172
|
+
export declare const HansCard: default_2.MemoExoticComponent<(props: HansCardProps) => JSX.Element>;
|
|
175
173
|
|
|
176
174
|
declare type HansCardLayout = 'profile' | 'image' | 'custom';
|
|
177
175
|
|
|
178
|
-
export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<
|
|
179
|
-
children?:
|
|
176
|
+
export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
|
|
177
|
+
children?: default_2.ReactNode;
|
|
180
178
|
};
|
|
181
179
|
|
|
182
180
|
export declare const HansCardPropsList: Partial<Record<"customClasses" | "loading" | "loadingColor" | "title" | "imageSrc" | "imageAlt" | "description" | "avatarSrc" | "avatarAlt" | "avatarLoading" | "loadingAriaLabel" | "cardLayout" | "cardSize" | "cardColor" | "cardVariant" | "cardBackgroundColor" | "cardBorderColor" | "cardTextColor" | "cardMutedColor", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
@@ -218,7 +216,7 @@ declare const HansCardSchema: {
|
|
|
218
216
|
readonly customClasses: "string";
|
|
219
217
|
};
|
|
220
218
|
|
|
221
|
-
export declare const HansCarousel:
|
|
219
|
+
export declare const HansCarousel: default_2.MemoExoticComponent<(props: HansCarouselProps) => JSX.Element>;
|
|
222
220
|
|
|
223
221
|
export declare type HansCarouselItem = {
|
|
224
222
|
id?: string;
|
|
@@ -228,7 +226,7 @@ export declare type HansCarouselItem = {
|
|
|
228
226
|
description?: string;
|
|
229
227
|
};
|
|
230
228
|
|
|
231
|
-
export declare type HansCarouselProps = InferPropsFromSchema<typeof HansCarouselSchema> & Omit<
|
|
229
|
+
export declare type HansCarouselProps = InferPropsFromSchema<typeof HansCarouselSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
232
230
|
onActiveItemChange?: (activeItemIndex: number) => void;
|
|
233
231
|
};
|
|
234
232
|
|
|
@@ -271,7 +269,7 @@ declare const HansCarouselSchema: {
|
|
|
271
269
|
readonly carouselId: "string";
|
|
272
270
|
};
|
|
273
271
|
|
|
274
|
-
export declare const HansChart:
|
|
272
|
+
export declare const HansChart: default_2.MemoExoticComponent<(props: HansChartProps) => JSX.Element>;
|
|
275
273
|
|
|
276
274
|
export declare type HansChartColor = Color | string;
|
|
277
275
|
|
|
@@ -288,7 +286,7 @@ export declare type HansChartPointEvent = {
|
|
|
288
286
|
seriesName?: string;
|
|
289
287
|
};
|
|
290
288
|
|
|
291
|
-
export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<
|
|
289
|
+
export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'onClick'> & {
|
|
292
290
|
onPointClick?: (event: HansChartPointEvent) => void;
|
|
293
291
|
};
|
|
294
292
|
|
|
@@ -485,7 +483,7 @@ declare const HansDropdownSchema: {
|
|
|
485
483
|
readonly emptyTextColor: "string";
|
|
486
484
|
};
|
|
487
485
|
|
|
488
|
-
export declare const HansIcon:
|
|
486
|
+
export declare const HansIcon: default_2.FC<HansIconProps>;
|
|
489
487
|
|
|
490
488
|
export declare type HansIconProps = InferPropsFromSchema<typeof HansIconSchema>;
|
|
491
489
|
|
|
@@ -558,7 +556,7 @@ declare const HansInputSchema: {
|
|
|
558
556
|
|
|
559
557
|
declare type HansInputSchemaProps = InferPropsFromSchema<typeof HansInputSchema>;
|
|
560
558
|
|
|
561
|
-
export declare const HansKanban:
|
|
559
|
+
export declare const HansKanban: default_2.MemoExoticComponent<(props: HansKanbanProps) => JSX.Element>;
|
|
562
560
|
|
|
563
561
|
export declare const HansKanbanColumn: default_2.MemoExoticComponent<(props: HansKanbanColumnProps) => JSX.Element>;
|
|
564
562
|
|
|
@@ -643,7 +641,7 @@ export declare type HansKanbanMoveEvent = {
|
|
|
643
641
|
nextItems: HansKanbanItemData[];
|
|
644
642
|
};
|
|
645
643
|
|
|
646
|
-
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<
|
|
644
|
+
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> & {
|
|
647
645
|
onItemsChange?: (items: HansKanbanItemData[]) => void;
|
|
648
646
|
onMoveItem?: (event: HansKanbanMoveEvent) => void;
|
|
649
647
|
onItemClick?: (item: HansKanbanItemData) => void;
|
|
@@ -682,9 +680,9 @@ declare const HansKanbanSchema: {
|
|
|
682
680
|
readonly loadingAriaLabel: "string";
|
|
683
681
|
};
|
|
684
682
|
|
|
685
|
-
export declare const HansLoading:
|
|
683
|
+
export declare const HansLoading: default_2.MemoExoticComponent<(props: HansLoadingProps) => JSX.Element>;
|
|
686
684
|
|
|
687
|
-
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<
|
|
685
|
+
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'>;
|
|
688
686
|
|
|
689
687
|
export declare const HansLoadingPropsList: Partial<Record<"rounded" | "customClasses" | "loadingType" | "loadingSize" | "loadingColor" | "skeletonWidth" | "skeletonHeight" | "ariaLabel", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
690
688
|
|
|
@@ -714,10 +712,10 @@ declare const HansLoadingSchema: {
|
|
|
714
712
|
readonly ariaLabel: "string";
|
|
715
713
|
};
|
|
716
714
|
|
|
717
|
-
export declare const HansModal:
|
|
715
|
+
export declare const HansModal: default_2.MemoExoticComponent<(props: HansModalProps) => JSX.Element | null>;
|
|
718
716
|
|
|
719
|
-
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<
|
|
720
|
-
children?:
|
|
717
|
+
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color' | 'title'> & {
|
|
718
|
+
children?: default_2.ReactNode;
|
|
721
719
|
container?: HTMLElement | ShadowRoot | null;
|
|
722
720
|
onOpenChange?: (open: boolean) => void;
|
|
723
721
|
onClose?: (reason: ModalCloseReason) => void;
|
|
@@ -785,17 +783,17 @@ declare const HansModalSchema: {
|
|
|
785
783
|
readonly maxBodyHeight: "string";
|
|
786
784
|
};
|
|
787
785
|
|
|
788
|
-
export declare const HansPopup:
|
|
786
|
+
export declare const HansPopup: default_2.MemoExoticComponent<(props: HansPopupProps) => JSX.Element>;
|
|
789
787
|
|
|
790
|
-
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<
|
|
791
|
-
children:
|
|
788
|
+
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
789
|
+
children: default_2.ReactNode;
|
|
792
790
|
onOpenChange?: (open: boolean) => void;
|
|
793
791
|
renderTrigger: (params: {
|
|
794
792
|
isOpen: boolean;
|
|
795
793
|
open: () => void;
|
|
796
794
|
close: () => void;
|
|
797
795
|
toggle: () => void;
|
|
798
|
-
}) =>
|
|
796
|
+
}) => default_2.ReactNode;
|
|
799
797
|
onDirectionChange?: (direction: PopupDirection) => void;
|
|
800
798
|
onHorizontalPositionChange?: (horizontalPosition: PopupHorizontalPosition) => void;
|
|
801
799
|
};
|
|
@@ -875,14 +873,14 @@ declare const HansSelectOptionSchema: {
|
|
|
875
873
|
export declare type HansTabItem = {
|
|
876
874
|
id: string;
|
|
877
875
|
title: string;
|
|
878
|
-
content:
|
|
876
|
+
content: default_2.ReactNode;
|
|
879
877
|
disabled?: boolean;
|
|
880
878
|
closable?: boolean;
|
|
881
879
|
tabColor?: Color;
|
|
882
880
|
tabVariant?: Variant;
|
|
883
881
|
};
|
|
884
882
|
|
|
885
|
-
export declare const HansTable:
|
|
883
|
+
export declare const HansTable: default_2.MemoExoticComponent<(props: HansTableProps) => JSX.Element>;
|
|
886
884
|
|
|
887
885
|
export declare type HansTableColumn = {
|
|
888
886
|
key: string;
|
|
@@ -892,7 +890,7 @@ export declare type HansTableColumn = {
|
|
|
892
890
|
width?: string;
|
|
893
891
|
align?: 'left' | 'center' | 'right';
|
|
894
892
|
filterAlign?: 'left' | 'center' | 'right';
|
|
895
|
-
render?: (value: unknown, row: HansTableRow, rowIndex: number) =>
|
|
893
|
+
render?: (value: unknown, row: HansTableRow, rowIndex: number) => default_2.ReactNode;
|
|
896
894
|
};
|
|
897
895
|
|
|
898
896
|
export declare type HansTableFilterConfig = {
|
|
@@ -906,14 +904,14 @@ export declare type HansTableFilterConfig = {
|
|
|
906
904
|
enableAutocomplete?: boolean;
|
|
907
905
|
};
|
|
908
906
|
|
|
909
|
-
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<
|
|
907
|
+
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
910
908
|
initialSort?: HansTableSortState;
|
|
911
909
|
initialFilters?: Record<string, string>;
|
|
912
910
|
onSortChange?: (sortState: HansTableSortState) => void;
|
|
913
911
|
onFiltersChange?: (filters: Record<string, string>) => void;
|
|
914
912
|
};
|
|
915
913
|
|
|
916
|
-
export declare const HansTablePropsList: Partial<Record<"customClasses" | "loadingType" | "loadingColor" | "emptyText" | "loadingAriaLabel" | "isLoading" | "columns" | "rows" | "headerColor" | "rowColor" | "headerTextColor" | "rowTextColor" | "
|
|
914
|
+
export declare const HansTablePropsList: Partial<Record<"customClasses" | "loadingType" | "loadingColor" | "emptyText" | "loadingAriaLabel" | "isLoading" | "borderColor" | "columns" | "rows" | "headerColor" | "rowColor" | "headerTextColor" | "rowTextColor" | "dividerColor" | "rowHoverColor" | "showColumnDividers" | "defaultDropdownFilterClearLabel" | "maxHeight" | "minWidth" | "striped", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
917
915
|
|
|
918
916
|
export declare type HansTableRow = Record<string, unknown>;
|
|
919
917
|
|
|
@@ -982,9 +980,9 @@ export declare type HansTableSortState = {
|
|
|
982
980
|
direction: HansTableSortDirection;
|
|
983
981
|
} | null;
|
|
984
982
|
|
|
985
|
-
export declare const HansTabs:
|
|
983
|
+
export declare const HansTabs: default_2.MemoExoticComponent<(props: HansTabsProps) => JSX.Element>;
|
|
986
984
|
|
|
987
|
-
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<
|
|
985
|
+
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
988
986
|
onTabChange?: (tabId: string) => void;
|
|
989
987
|
onTabClose?: (tabId: string) => void;
|
|
990
988
|
onTabsChange?: (tabs: HansTabItem[]) => void;
|
|
@@ -1023,9 +1021,9 @@ declare const HansTabsSchema: {
|
|
|
1023
1021
|
readonly inputId: "string";
|
|
1024
1022
|
};
|
|
1025
1023
|
|
|
1026
|
-
export declare const HansTag:
|
|
1024
|
+
export declare const HansTag: default_2.MemoExoticComponent<(props: HansTagProps) => JSX.Element>;
|
|
1027
1025
|
|
|
1028
|
-
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<
|
|
1026
|
+
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
1029
1027
|
onAction?: () => void;
|
|
1030
1028
|
};
|
|
1031
1029
|
|
|
@@ -1077,15 +1075,15 @@ export declare type HansThemeTone = Record<HansThemeToneLevel, string>;
|
|
|
1077
1075
|
|
|
1078
1076
|
export declare type HansThemeToneLevel = 'strong' | 'default' | 'neutral';
|
|
1079
1077
|
|
|
1080
|
-
export declare const HansToast:
|
|
1078
|
+
export declare const HansToast: default_2.MemoExoticComponent<(props: HansToastProps) => JSX.Element | null>;
|
|
1081
1079
|
|
|
1082
|
-
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<
|
|
1080
|
+
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
|
|
1083
1081
|
onClose?: (reason: ToastCloseReason) => void;
|
|
1084
1082
|
onVisibilityChange?: (visible: boolean) => void;
|
|
1085
1083
|
portalTarget?: HTMLElement | null;
|
|
1086
1084
|
};
|
|
1087
1085
|
|
|
1088
|
-
export declare const HansToastPropsList: Partial<Record<"customClasses" | "title" | "message" | "position" | "isVisible" | "defaultVisible" | "duration" | "toastColor" | "toastVariant" | "toastSize" | "dismissible" | "iconName" | "stackGap" | "
|
|
1086
|
+
export declare const HansToastPropsList: Partial<Record<"customClasses" | "title" | "message" | "position" | "offset" | "isVisible" | "defaultVisible" | "duration" | "toastColor" | "toastVariant" | "toastSize" | "dismissible" | "iconName" | "stackGap" | "closeButtonLabel" | "titleClassName" | "messageClassName", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
1089
1087
|
|
|
1090
1088
|
declare const HansToastSchema: {
|
|
1091
1089
|
readonly title: "string";
|
|
@@ -1173,10 +1171,10 @@ declare const HansToggleSchema: {
|
|
|
1173
1171
|
readonly inputId: "string";
|
|
1174
1172
|
};
|
|
1175
1173
|
|
|
1176
|
-
export declare type IconLibrary = Record<string,
|
|
1174
|
+
export declare type IconLibrary = Record<string, default_2.ComponentType<default_2.SVGProps<SVGSVGElement>>>;
|
|
1177
1175
|
|
|
1178
1176
|
declare type InferPropsFromSchema<T extends Record<string, SchemaType>> = Partial<{
|
|
1179
|
-
[K in keyof T]: T[K] extends 'string' ? string : T[K] extends 'boolean' ? boolean : T[K] extends 'number' ? number : T[K] extends 'node' ?
|
|
1177
|
+
[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 {
|
|
1180
1178
|
type: 'custom';
|
|
1181
1179
|
ref: infer U;
|
|
1182
1180
|
} ? U : never;
|