hans-ui-design-lib 1.0.35 → 1.0.37

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 CHANGED
@@ -1,4 +1,6 @@
1
- import { default as default_2 } from 'react';
1
+ import { default as default_2 } from '../../../../node_modules/react';
2
+ import { default as default_3 } from '../../node_modules/react';
3
+ import { default as default_4 } from '../../../node_modules/react';
2
4
  import { JSX } from 'react/jsx-runtime';
3
5
 
4
6
  export declare const assertCompleteHansTheme: (theme: HansThemeCombination) => void;
@@ -49,16 +51,16 @@ export declare const HANS_THEME_TONE_LEVELS: HansThemeToneLevel[];
49
51
 
50
52
  export declare const HANS_THEME_WINDOW_KEY = "HansUI";
51
53
 
52
- export declare const HansAccordion: default_2.MemoExoticComponent<(props: HansAccordionProps) => JSX.Element>;
54
+ export declare const HansAccordion: default_4.MemoExoticComponent<(props: HansAccordionProps) => JSX.Element>;
53
55
 
54
56
  export declare type HansAccordionItem = {
55
57
  id?: string;
56
58
  title: string;
57
- description: default_2.ReactNode;
59
+ description: default_4.ReactNode;
58
60
  disabled?: boolean;
59
61
  };
60
62
 
61
- export declare type HansAccordionProps = InferPropsFromSchema<typeof HansAccordionSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
63
+ export declare type HansAccordionProps = InferPropsFromSchema<typeof HansAccordionSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color'> & {
62
64
  onOpenItemIdsChange?: (openItemIds: string[]) => void;
63
65
  };
64
66
 
@@ -109,11 +111,11 @@ declare const HansAccordionSchema: {
109
111
  readonly accordionId: "string";
110
112
  };
111
113
 
112
- export declare const HansAvatar: default_2.MemoExoticComponent<(props: HansAvatarProps) => JSX.Element>;
114
+ export declare const HansAvatar: default_4.MemoExoticComponent<(props: HansAvatarProps) => JSX.Element>;
113
115
 
114
- export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<default_2.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'size' | 'loading'>;
116
+ export declare type HansAvatarProps = InferPropsFromSchema<typeof HansAvatarSchema> & Omit<default_4.ImgHTMLAttributes<HTMLImageElement>, 'src' | 'alt' | 'size' | 'loading'>;
115
117
 
116
- export declare const HansAvatarPropsList: Partial<Record<"customClasses" | "loading" | "alt" | "src" | "avatarSize" | "fallbackIconName", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
118
+ export declare const HansAvatarPropsList: Partial<Record<"src" | "alt" | "customClasses" | "loading" | "avatarSize" | "fallbackIconName", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
117
119
 
118
120
  declare const HansAvatarSchema: {
119
121
  readonly src: "string";
@@ -169,12 +171,12 @@ declare const HansButtonSchema: {
169
171
  readonly loading: "boolean";
170
172
  };
171
173
 
172
- export declare const HansCard: default_2.MemoExoticComponent<(props: HansCardProps) => JSX.Element>;
174
+ export declare const HansCard: default_4.MemoExoticComponent<(props: HansCardProps) => JSX.Element>;
173
175
 
174
176
  declare type HansCardLayout = 'profile' | 'image' | 'custom';
175
177
 
176
- export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
177
- children?: default_2.ReactNode;
178
+ export declare type HansCardProps = InferPropsFromSchema<typeof HansCardSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
179
+ children?: default_4.ReactNode;
178
180
  };
179
181
 
180
182
  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>>;
@@ -216,7 +218,7 @@ declare const HansCardSchema: {
216
218
  readonly customClasses: "string";
217
219
  };
218
220
 
219
- export declare const HansCarousel: default_2.MemoExoticComponent<(props: HansCarouselProps) => JSX.Element>;
221
+ export declare const HansCarousel: default_4.MemoExoticComponent<(props: HansCarouselProps) => JSX.Element>;
220
222
 
221
223
  export declare type HansCarouselItem = {
222
224
  id?: string;
@@ -226,7 +228,7 @@ export declare type HansCarouselItem = {
226
228
  description?: string;
227
229
  };
228
230
 
229
- export declare type HansCarouselProps = InferPropsFromSchema<typeof HansCarouselSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
231
+ export declare type HansCarouselProps = InferPropsFromSchema<typeof HansCarouselSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color'> & {
230
232
  onActiveItemChange?: (activeItemIndex: number) => void;
231
233
  };
232
234
 
@@ -269,7 +271,7 @@ declare const HansCarouselSchema: {
269
271
  readonly carouselId: "string";
270
272
  };
271
273
 
272
- export declare const HansChart: default_2.MemoExoticComponent<(props: HansChartProps) => JSX.Element>;
274
+ export declare const HansChart: default_4.MemoExoticComponent<(props: HansChartProps) => JSX.Element>;
273
275
 
274
276
  export declare type HansChartColor = Color | string;
275
277
 
@@ -286,11 +288,11 @@ export declare type HansChartPointEvent = {
286
288
  seriesName?: string;
287
289
  };
288
290
 
289
- export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'onClick'> & {
291
+ export declare type HansChartProps = InferPropsFromSchema<typeof HansChartSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color' | 'onClick'> & {
290
292
  onPointClick?: (event: HansChartPointEvent) => void;
291
293
  };
292
294
 
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>>;
295
+ export declare const HansChartPropsList: Partial<Record<"customClasses" | "loadingType" | "title" | "height" | "backgroundColor" | "emptyText" | "chartType" | "categories" | "series" | "colors" | "showLegend" | "isLoading" | "optionOverrides", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
294
296
 
295
297
  declare const HansChartSchema: {
296
298
  readonly title: "string";
@@ -485,7 +487,7 @@ declare const HansDropdownSchema: {
485
487
  readonly emptyTextColor: "string";
486
488
  };
487
489
 
488
- export declare const HansIcon: default_2.FC<HansIconProps>;
490
+ export declare const HansIcon: default_4.FC<HansIconProps>;
489
491
 
490
492
  export declare type HansIconProps = InferPropsFromSchema<typeof HansIconSchema>;
491
493
 
@@ -570,7 +572,7 @@ declare const HansInputSchema: {
570
572
 
571
573
  declare type HansInputSchemaProps = InferPropsFromSchema<typeof HansInputSchema>;
572
574
 
573
- export declare const HansKanban: default_2.MemoExoticComponent<(props: HansKanbanProps) => JSX.Element>;
575
+ export declare const HansKanban: default_4.MemoExoticComponent<(props: HansKanbanProps) => JSX.Element>;
574
576
 
575
577
  export declare const HansKanbanColumn: default_2.MemoExoticComponent<(props: HansKanbanColumnProps) => JSX.Element>;
576
578
 
@@ -655,13 +657,13 @@ export declare type HansKanbanMoveEvent = {
655
657
  nextItems: HansKanbanItemData[];
656
658
  };
657
659
 
658
- export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> & {
660
+ export declare type HansKanbanProps = InferPropsFromSchema<typeof HansKanbanSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'children' | 'color'> & {
659
661
  onItemsChange?: (items: HansKanbanItemData[]) => void;
660
662
  onMoveItem?: (event: HansKanbanMoveEvent) => void;
661
663
  onItemClick?: (item: HansKanbanItemData) => void;
662
664
  };
663
665
 
664
- export declare const HansKanbanPropsList: Partial<Record<"customClasses" | "loading" | "loadingColor" | "items" | "loadingAriaLabel" | "columns" | "defaultItems" | "boardLabel" | "emptyColumnText" | "columnMinWidth" | "boardMinHeight" | "showColumnCounts" | "dragAndDrop", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
666
+ export declare const HansKanbanPropsList: Partial<Record<"customClasses" | "loading" | "loadingColor" | "columns" | "items" | "loadingAriaLabel" | "defaultItems" | "boardLabel" | "emptyColumnText" | "columnMinWidth" | "boardMinHeight" | "showColumnCounts" | "dragAndDrop", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
665
667
 
666
668
  declare const HansKanbanSchema: {
667
669
  readonly columns: {
@@ -694,9 +696,9 @@ declare const HansKanbanSchema: {
694
696
  readonly loadingAriaLabel: "string";
695
697
  };
696
698
 
697
- export declare const HansLoading: default_2.MemoExoticComponent<(props: HansLoadingProps) => JSX.Element>;
699
+ export declare const HansLoading: default_4.MemoExoticComponent<(props: HansLoadingProps) => JSX.Element>;
698
700
 
699
- export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'>;
701
+ export declare type HansLoadingProps = InferPropsFromSchema<typeof HansLoadingSchema> & Omit<default_4.HTMLAttributes<HTMLSpanElement>, 'color'>;
700
702
 
701
703
  export declare const HansLoadingPropsList: Partial<Record<"rounded" | "customClasses" | "loadingType" | "loadingSize" | "loadingColor" | "skeletonWidth" | "skeletonHeight" | "ariaLabel", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
702
704
 
@@ -726,10 +728,10 @@ declare const HansLoadingSchema: {
726
728
  readonly ariaLabel: "string";
727
729
  };
728
730
 
729
- export declare const HansModal: default_2.MemoExoticComponent<(props: HansModalProps) => JSX.Element | null>;
731
+ export declare const HansModal: default_4.MemoExoticComponent<(props: HansModalProps) => JSX.Element | null>;
730
732
 
731
- export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children' | 'color' | 'title'> & {
732
- children?: default_2.ReactNode;
733
+ export declare type HansModalProps = InferPropsFromSchema<typeof HansModalSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'children' | 'color' | 'title'> & {
734
+ children?: default_4.ReactNode;
733
735
  container?: HTMLElement | ShadowRoot | null;
734
736
  onOpenChange?: (open: boolean) => void;
735
737
  onClose?: (reason: ModalCloseReason) => void;
@@ -833,9 +835,9 @@ declare const HansModalSchema: {
833
835
  readonly maxBodyHeight: "string";
834
836
  };
835
837
 
836
- export declare const HansPagination: default_2.MemoExoticComponent<(props: HansPaginationProps) => JSX.Element | null>;
838
+ export declare const HansPagination: default_4.MemoExoticComponent<(props: HansPaginationProps) => JSX.Element | null>;
837
839
 
838
- export declare type HansPaginationProps = InferPropsFromSchema<typeof HansPaginationSchema> & Omit<default_2.HTMLAttributes<HTMLElement>, 'children' | 'color' | 'onChange'> & {
840
+ export declare type HansPaginationProps = InferPropsFromSchema<typeof HansPaginationSchema> & Omit<default_4.HTMLAttributes<HTMLElement>, 'children' | 'color' | 'onChange'> & {
839
841
  onPageChange?: (page: number) => void;
840
842
  };
841
843
 
@@ -875,22 +877,23 @@ declare const HansPaginationSchema: {
875
877
  readonly customClasses: "string";
876
878
  };
877
879
 
878
- export declare const HansPopup: default_2.MemoExoticComponent<(props: HansPopupProps) => JSX.Element>;
880
+ export declare const HansPopup: default_4.MemoExoticComponent<(props: HansPopupProps) => JSX.Element>;
879
881
 
880
- export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'children'> & {
881
- children: default_2.ReactNode;
882
+ export declare type HansPopupProps = InferPropsFromSchema<typeof HansPopupSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'children'> & {
883
+ children: default_4.ReactNode;
882
884
  onOpenChange?: (open: boolean) => void;
883
885
  renderTrigger: (params: {
884
886
  isOpen: boolean;
885
887
  open: () => void;
886
888
  close: () => void;
887
889
  toggle: () => void;
888
- }) => default_2.ReactNode;
890
+ }) => default_4.ReactNode;
889
891
  onDirectionChange?: (direction: PopupDirection) => void;
890
892
  onHorizontalPositionChange?: (horizontalPosition: PopupHorizontalPosition) => void;
893
+ portalHorizontalPosition?: PopupHorizontalPosition;
891
894
  };
892
895
 
893
- export declare const HansPopupPropsList: Partial<Record<"customClasses" | "disabled" | "isOpen" | "popupBackgroundColor" | "noContentText" | "popupClassName" | "panelClassName", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
896
+ export declare const HansPopupPropsList: Partial<Record<"customClasses" | "disabled" | "isOpen" | "popupBackgroundColor" | "noContentText" | "popupClassName" | "panelClassName" | "portal" | "portalMatchTriggerWidth", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
894
897
 
895
898
  declare const HansPopupSchema: {
896
899
  readonly isOpen: "boolean";
@@ -900,6 +903,8 @@ declare const HansPopupSchema: {
900
903
  readonly popupClassName: "string";
901
904
  readonly panelClassName: "string";
902
905
  readonly customClasses: "string";
906
+ readonly portal: "boolean";
907
+ readonly portalMatchTriggerWidth: "boolean";
903
908
  };
904
909
 
905
910
  export declare const HansSelectOption: default_2.MemoExoticComponent<(props: HansSelectOptionProps) => JSX.Element>;
@@ -965,14 +970,14 @@ declare const HansSelectOptionSchema: {
965
970
  export declare type HansTabItem = {
966
971
  id: string;
967
972
  title: string;
968
- content: default_2.ReactNode;
973
+ content: default_4.ReactNode;
969
974
  disabled?: boolean;
970
975
  closable?: boolean;
971
976
  tabColor?: Color;
972
977
  tabVariant?: Variant;
973
978
  };
974
979
 
975
- export declare const HansTable: default_2.MemoExoticComponent<(props: HansTableProps) => JSX.Element>;
980
+ export declare const HansTable: default_4.MemoExoticComponent<(props: HansTableProps) => JSX.Element>;
976
981
 
977
982
  export declare type HansTableColumn = {
978
983
  key: string;
@@ -982,7 +987,7 @@ export declare type HansTableColumn = {
982
987
  width?: string;
983
988
  align?: 'left' | 'center' | 'right';
984
989
  filterAlign?: 'left' | 'center' | 'right';
985
- render?: (value: unknown, row: HansTableRow, rowIndex: number) => default_2.ReactNode;
990
+ render?: (value: unknown, row: HansTableRow, rowIndex: number) => default_4.ReactNode;
986
991
  };
987
992
 
988
993
  export declare type HansTableFilterConfig = {
@@ -996,14 +1001,14 @@ export declare type HansTableFilterConfig = {
996
1001
  enableAutocomplete?: boolean;
997
1002
  };
998
1003
 
999
- export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
1004
+ export declare type HansTableProps = InferPropsFromSchema<typeof HansTableSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color'> & {
1000
1005
  initialSort?: HansTableSortState;
1001
1006
  initialFilters?: Record<string, string>;
1002
1007
  onSortChange?: (sortState: HansTableSortState) => void;
1003
1008
  onFiltersChange?: (filters: Record<string, string>) => void;
1004
1009
  };
1005
1010
 
1006
- 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>>;
1011
+ export declare const HansTablePropsList: Partial<Record<"customClasses" | "loadingType" | "loadingColor" | "minWidth" | "maxHeight" | "borderColor" | "columns" | "emptyText" | "loadingAriaLabel" | "isLoading" | "rows" | "headerColor" | "rowColor" | "headerTextColor" | "rowTextColor" | "dividerColor" | "rowHoverColor" | "showColumnDividers" | "defaultDropdownFilterClearLabel" | "striped", "string" | "number" | "boolean" | "function" | "json" | "method" | undefined>>;
1007
1012
 
1008
1013
  export declare type HansTableRow = Record<string, unknown>;
1009
1014
 
@@ -1072,9 +1077,9 @@ export declare type HansTableSortState = {
1072
1077
  direction: HansTableSortDirection;
1073
1078
  } | null;
1074
1079
 
1075
- export declare const HansTabs: default_2.MemoExoticComponent<(props: HansTabsProps) => JSX.Element>;
1080
+ export declare const HansTabs: default_4.MemoExoticComponent<(props: HansTabsProps) => JSX.Element>;
1076
1081
 
1077
- export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color'> & {
1082
+ export declare type HansTabsProps = InferPropsFromSchema<typeof HansTabsSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color'> & {
1078
1083
  onTabChange?: (tabId: string) => void;
1079
1084
  onTabClose?: (tabId: string) => void;
1080
1085
  onTabsChange?: (tabs: HansTabItem[]) => void;
@@ -1113,9 +1118,9 @@ declare const HansTabsSchema: {
1113
1118
  readonly inputId: "string";
1114
1119
  };
1115
1120
 
1116
- export declare const HansTag: default_2.MemoExoticComponent<(props: HansTagProps) => JSX.Element>;
1121
+ export declare const HansTag: default_4.MemoExoticComponent<(props: HansTagProps) => JSX.Element>;
1117
1122
 
1118
- export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'color'> & {
1123
+ export declare type HansTagProps = InferPropsFromSchema<typeof HansTagSchema> & Omit<default_4.HTMLAttributes<HTMLSpanElement>, 'color'> & {
1119
1124
  onAction?: () => void;
1120
1125
  };
1121
1126
 
@@ -1167,9 +1172,9 @@ export declare type HansThemeTone = Record<HansThemeToneLevel, string>;
1167
1172
 
1168
1173
  export declare type HansThemeToneLevel = 'strong' | 'default' | 'neutral';
1169
1174
 
1170
- export declare const HansToast: default_2.MemoExoticComponent<(props: HansToastProps) => JSX.Element | null>;
1175
+ export declare const HansToast: default_4.MemoExoticComponent<(props: HansToastProps) => JSX.Element | null>;
1171
1176
 
1172
- export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<default_2.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
1177
+ export declare type HansToastProps = InferPropsFromSchema<typeof HansToastSchema> & Omit<default_4.HTMLAttributes<HTMLDivElement>, 'color' | 'title'> & {
1173
1178
  onClose?: (reason: ToastCloseReason) => void;
1174
1179
  onVisibilityChange?: (visible: boolean) => void;
1175
1180
  portalTarget?: HTMLElement | null;
@@ -1263,10 +1268,10 @@ declare const HansToggleSchema: {
1263
1268
  readonly inputId: "string";
1264
1269
  };
1265
1270
 
1266
- export declare type IconLibrary = Record<string, default_2.ComponentType<default_2.SVGProps<SVGSVGElement>>>;
1271
+ export declare type IconLibrary = Record<string, default_4.ComponentType<default_4.SVGProps<SVGSVGElement>>>;
1267
1272
 
1268
1273
  declare type InferPropsFromSchema<T extends Record<string, SchemaType>> = Partial<{
1269
- [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 {
1274
+ [K in keyof T]: T[K] extends 'string' ? string : T[K] extends 'boolean' ? boolean : T[K] extends 'number' ? number : T[K] extends 'node' ? default_3.ReactNode : T[K] extends 'json' ? Record<string, unknown> : T[K] extends {
1270
1275
  type: 'custom';
1271
1276
  ref: infer U;
1272
1277
  } ? U : never;