hans-ui-design-lib 1.0.26 → 1.0.28
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.css +1 -1
- package/dist/index.d.ts +42 -43
- package/dist/index.es.js +17512 -17447
- 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,11 +286,11 @@ 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
|
|
|
295
|
-
export declare const HansChartPropsList: Partial<Record<"customClasses" | "loadingType" | "title" | "height" | "emptyText" | "chartType" | "categories" | "series" | "colors" | "showLegend" | "isLoading" | "optionOverrides", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
293
|
+
export declare const HansChartPropsList: Partial<Record<"customClasses" | "loadingType" | "title" | "height" | "emptyText" | "chartType" | "categories" | "series" | "colors" | "backgroundColor" | "showLegend" | "isLoading" | "optionOverrides", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
296
294
|
|
|
297
295
|
declare const HansChartSchema: {
|
|
298
296
|
readonly title: "string";
|
|
@@ -315,6 +313,7 @@ declare const HansChartSchema: {
|
|
|
315
313
|
readonly ref: HansChartColor[];
|
|
316
314
|
readonly webComponentType: "property";
|
|
317
315
|
};
|
|
316
|
+
readonly backgroundColor: "string";
|
|
318
317
|
readonly height: "number";
|
|
319
318
|
readonly showLegend: "boolean";
|
|
320
319
|
readonly isLoading: "boolean";
|
|
@@ -485,7 +484,7 @@ declare const HansDropdownSchema: {
|
|
|
485
484
|
readonly emptyTextColor: "string";
|
|
486
485
|
};
|
|
487
486
|
|
|
488
|
-
export declare const HansIcon:
|
|
487
|
+
export declare const HansIcon: default_2.FC<HansIconProps>;
|
|
489
488
|
|
|
490
489
|
export declare type HansIconProps = InferPropsFromSchema<typeof HansIconSchema>;
|
|
491
490
|
|
|
@@ -558,7 +557,7 @@ declare const HansInputSchema: {
|
|
|
558
557
|
|
|
559
558
|
declare type HansInputSchemaProps = InferPropsFromSchema<typeof HansInputSchema>;
|
|
560
559
|
|
|
561
|
-
export declare const HansKanban:
|
|
560
|
+
export declare const HansKanban: default_2.MemoExoticComponent<(props: HansKanbanProps) => JSX.Element>;
|
|
562
561
|
|
|
563
562
|
export declare const HansKanbanColumn: default_2.MemoExoticComponent<(props: HansKanbanColumnProps) => JSX.Element>;
|
|
564
563
|
|
|
@@ -643,7 +642,7 @@ export declare type HansKanbanMoveEvent = {
|
|
|
643
642
|
nextItems: HansKanbanItemData[];
|
|
644
643
|
};
|
|
645
644
|
|
|
646
|
-
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<
|
|
645
|
+
export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> & {
|
|
647
646
|
onItemsChange?: (items: HansKanbanItemData[]) => void;
|
|
648
647
|
onMoveItem?: (event: HansKanbanMoveEvent) => void;
|
|
649
648
|
onItemClick?: (item: HansKanbanItemData) => void;
|
|
@@ -682,9 +681,9 @@ declare const HansKanbanSchema: {
|
|
|
682
681
|
readonly loadingAriaLabel: "string";
|
|
683
682
|
};
|
|
684
683
|
|
|
685
|
-
export declare const HansLoading:
|
|
684
|
+
export declare const HansLoading: default_2.MemoExoticComponent<(props: HansLoadingProps) => JSX.Element>;
|
|
686
685
|
|
|
687
|
-
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<
|
|
686
|
+
export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'>;
|
|
688
687
|
|
|
689
688
|
export declare const HansLoadingPropsList: Partial<Record<"rounded" | "customClasses" | "loadingType" | "loadingSize" | "loadingColor" | "skeletonWidth" | "skeletonHeight" | "ariaLabel", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
|
|
690
689
|
|
|
@@ -714,10 +713,10 @@ declare const HansLoadingSchema: {
|
|
|
714
713
|
readonly ariaLabel: "string";
|
|
715
714
|
};
|
|
716
715
|
|
|
717
|
-
export declare const HansModal:
|
|
716
|
+
export declare const HansModal: default_2.MemoExoticComponent<(props: HansModalProps) => JSX.Element | null>;
|
|
718
717
|
|
|
719
|
-
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<
|
|
720
|
-
children?:
|
|
718
|
+
export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color' | 'title'> & {
|
|
719
|
+
children?: default_2.ReactNode;
|
|
721
720
|
container?: HTMLElement | ShadowRoot | null;
|
|
722
721
|
onOpenChange?: (open: boolean) => void;
|
|
723
722
|
onClose?: (reason: ModalCloseReason) => void;
|
|
@@ -785,17 +784,17 @@ declare const HansModalSchema: {
|
|
|
785
784
|
readonly maxBodyHeight: "string";
|
|
786
785
|
};
|
|
787
786
|
|
|
788
|
-
export declare const HansPopup:
|
|
787
|
+
export declare const HansPopup: default_2.MemoExoticComponent<(props: HansPopupProps) => JSX.Element>;
|
|
789
788
|
|
|
790
|
-
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<
|
|
791
|
-
children:
|
|
789
|
+
export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
790
|
+
children: default_2.ReactNode;
|
|
792
791
|
onOpenChange?: (open: boolean) => void;
|
|
793
792
|
renderTrigger: (params: {
|
|
794
793
|
isOpen: boolean;
|
|
795
794
|
open: () => void;
|
|
796
795
|
close: () => void;
|
|
797
796
|
toggle: () => void;
|
|
798
|
-
}) =>
|
|
797
|
+
}) => default_2.ReactNode;
|
|
799
798
|
onDirectionChange?: (direction: PopupDirection) => void;
|
|
800
799
|
onHorizontalPositionChange?: (horizontalPosition: PopupHorizontalPosition) => void;
|
|
801
800
|
};
|
|
@@ -875,14 +874,14 @@ declare const HansSelectOptionSchema: {
|
|
|
875
874
|
export declare type HansTabItem = {
|
|
876
875
|
id: string;
|
|
877
876
|
title: string;
|
|
878
|
-
content:
|
|
877
|
+
content: default_2.ReactNode;
|
|
879
878
|
disabled?: boolean;
|
|
880
879
|
closable?: boolean;
|
|
881
880
|
tabColor?: Color;
|
|
882
881
|
tabVariant?: Variant;
|
|
883
882
|
};
|
|
884
883
|
|
|
885
|
-
export declare const HansTable:
|
|
884
|
+
export declare const HansTable: default_2.MemoExoticComponent<(props: HansTableProps) => JSX.Element>;
|
|
886
885
|
|
|
887
886
|
export declare type HansTableColumn = {
|
|
888
887
|
key: string;
|
|
@@ -892,7 +891,7 @@ export declare type HansTableColumn = {
|
|
|
892
891
|
width?: string;
|
|
893
892
|
align?: 'left' | 'center' | 'right';
|
|
894
893
|
filterAlign?: 'left' | 'center' | 'right';
|
|
895
|
-
render?: (value: unknown, row: HansTableRow, rowIndex: number) =>
|
|
894
|
+
render?: (value: unknown, row: HansTableRow, rowIndex: number) => default_2.ReactNode;
|
|
896
895
|
};
|
|
897
896
|
|
|
898
897
|
export declare type HansTableFilterConfig = {
|
|
@@ -906,14 +905,14 @@ export declare type HansTableFilterConfig = {
|
|
|
906
905
|
enableAutocomplete?: boolean;
|
|
907
906
|
};
|
|
908
907
|
|
|
909
|
-
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<
|
|
908
|
+
export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
910
909
|
initialSort?: HansTableSortState;
|
|
911
910
|
initialFilters?: Record<string, string>;
|
|
912
911
|
onSortChange?: (sortState: HansTableSortState) => void;
|
|
913
912
|
onFiltersChange?: (filters: Record<string, string>) => void;
|
|
914
913
|
};
|
|
915
914
|
|
|
916
|
-
export declare const HansTablePropsList: Partial<Record<"customClasses" | "loadingType" | "loadingColor" | "emptyText" | "loadingAriaLabel" | "isLoading" | "columns" | "rows" | "headerColor" | "rowColor" | "headerTextColor" | "rowTextColor" | "
|
|
915
|
+
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
916
|
|
|
918
917
|
export declare type HansTableRow = Record<string, unknown>;
|
|
919
918
|
|
|
@@ -982,9 +981,9 @@ export declare type HansTableSortState = {
|
|
|
982
981
|
direction: HansTableSortDirection;
|
|
983
982
|
} | null;
|
|
984
983
|
|
|
985
|
-
export declare const HansTabs:
|
|
984
|
+
export declare const HansTabs: default_2.MemoExoticComponent<(props: HansTabsProps) => JSX.Element>;
|
|
986
985
|
|
|
987
|
-
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<
|
|
986
|
+
export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
|
|
988
987
|
onTabChange?: (tabId: string) => void;
|
|
989
988
|
onTabClose?: (tabId: string) => void;
|
|
990
989
|
onTabsChange?: (tabs: HansTabItem[]) => void;
|
|
@@ -1023,9 +1022,9 @@ declare const HansTabsSchema: {
|
|
|
1023
1022
|
readonly inputId: "string";
|
|
1024
1023
|
};
|
|
1025
1024
|
|
|
1026
|
-
export declare const HansTag:
|
|
1025
|
+
export declare const HansTag: default_2.MemoExoticComponent<(props: HansTagProps) => JSX.Element>;
|
|
1027
1026
|
|
|
1028
|
-
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<
|
|
1027
|
+
export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'> & {
|
|
1029
1028
|
onAction?: () => void;
|
|
1030
1029
|
};
|
|
1031
1030
|
|
|
@@ -1077,15 +1076,15 @@ export declare type HansThemeTone = Record<HansThemeToneLevel, string>;
|
|
|
1077
1076
|
|
|
1078
1077
|
export declare type HansThemeToneLevel = 'strong' | 'default' | 'neutral';
|
|
1079
1078
|
|
|
1080
|
-
export declare const HansToast:
|
|
1079
|
+
export declare const HansToast: default_2.MemoExoticComponent<(props: HansToastProps) => JSX.Element | null>;
|
|
1081
1080
|
|
|
1082
|
-
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<
|
|
1081
|
+
export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
|
|
1083
1082
|
onClose?: (reason: ToastCloseReason) => void;
|
|
1084
1083
|
onVisibilityChange?: (visible: boolean) => void;
|
|
1085
1084
|
portalTarget?: HTMLElement | null;
|
|
1086
1085
|
};
|
|
1087
1086
|
|
|
1088
|
-
export declare const HansToastPropsList: Partial<Record<"customClasses" | "title" | "message" | "position" | "isVisible" | "defaultVisible" | "duration" | "toastColor" | "toastVariant" | "toastSize" | "dismissible" | "iconName" | "stackGap" | "
|
|
1087
|
+
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
1088
|
|
|
1090
1089
|
declare const HansToastSchema: {
|
|
1091
1090
|
readonly title: "string";
|
|
@@ -1173,10 +1172,10 @@ declare const HansToggleSchema: {
|
|
|
1173
1172
|
readonly inputId: "string";
|
|
1174
1173
|
};
|
|
1175
1174
|
|
|
1176
|
-
export declare type IconLibrary = Record<string,
|
|
1175
|
+
export declare type IconLibrary = Record<string, default_2.ComponentType<default_2.SVGProps<SVGSVGElement>>>;
|
|
1177
1176
|
|
|
1178
1177
|
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' ?
|
|
1178
|
+
[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
1179
|
type: 'custom';
|
|
1181
1180
|
ref: infer U;
|
|
1182
1181
|
} ? U : never;
|