@hitachivantara/uikit-react-core 5.34.0 → 5.36.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/cjs/components/BaseInput/BaseInput.styles.cjs +14 -16
- package/dist/cjs/components/BaseInput/BaseInput.styles.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.cjs +14 -19
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.cjs.map +1 -1
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.styles.cjs +7 -38
- package/dist/cjs/components/Calendar/CalendarHeader/CalendarHeader.styles.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +26 -8
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/Dropdown/List/List.cjs +5 -1
- package/dist/cjs/components/Dropdown/List/List.cjs.map +1 -1
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs +3 -2
- package/dist/cjs/components/ListContainer/ListItem/ListItem.cjs.map +1 -1
- package/dist/cjs/components/TreeView/TreeItem/DefaultContent.cjs +54 -0
- package/dist/cjs/components/TreeView/TreeItem/DefaultContent.cjs.map +1 -0
- package/dist/cjs/components/TreeView/TreeItem/TreeItem.cjs +124 -0
- package/dist/cjs/components/TreeView/TreeItem/TreeItem.cjs.map +1 -0
- package/dist/cjs/components/TreeView/TreeItem/TreeItem.styles.cjs +74 -0
- package/dist/cjs/components/TreeView/TreeItem/TreeItem.styles.cjs.map +1 -0
- package/dist/cjs/components/TreeView/TreeItem/useHvTreeItem.cjs +62 -0
- package/dist/cjs/components/TreeView/TreeItem/useHvTreeItem.cjs.map +1 -0
- package/dist/cjs/components/TreeView/TreeView.cjs +72 -0
- package/dist/cjs/components/TreeView/TreeView.cjs.map +1 -0
- package/dist/cjs/components/TreeView/TreeView.styles.cjs +18 -0
- package/dist/cjs/components/TreeView/TreeView.styles.cjs.map +1 -0
- package/dist/cjs/components/TreeView/internals.cjs +30 -0
- package/dist/cjs/components/TreeView/internals.cjs.map +1 -0
- package/dist/cjs/index.cjs +10 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/components/BaseInput/BaseInput.styles.js +14 -16
- package/dist/esm/components/BaseInput/BaseInput.styles.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.js +15 -20
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.js.map +1 -1
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.styles.js +7 -38
- package/dist/esm/components/Calendar/CalendarHeader/CalendarHeader.styles.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +28 -10
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Dropdown/List/List.js +6 -2
- package/dist/esm/components/Dropdown/List/List.js.map +1 -1
- package/dist/esm/components/ListContainer/ListItem/ListItem.js +4 -3
- package/dist/esm/components/ListContainer/ListItem/ListItem.js.map +1 -1
- package/dist/esm/components/TreeView/TreeItem/DefaultContent.js +54 -0
- package/dist/esm/components/TreeView/TreeItem/DefaultContent.js.map +1 -0
- package/dist/esm/components/TreeView/TreeItem/TreeItem.js +125 -0
- package/dist/esm/components/TreeView/TreeItem/TreeItem.js.map +1 -0
- package/dist/esm/components/TreeView/TreeItem/TreeItem.styles.js +74 -0
- package/dist/esm/components/TreeView/TreeItem/TreeItem.styles.js.map +1 -0
- package/dist/esm/components/TreeView/TreeItem/useHvTreeItem.js +62 -0
- package/dist/esm/components/TreeView/TreeItem/useHvTreeItem.js.map +1 -0
- package/dist/esm/components/TreeView/TreeView.js +73 -0
- package/dist/esm/components/TreeView/TreeView.js.map +1 -0
- package/dist/esm/components/TreeView/TreeView.styles.js +18 -0
- package/dist/esm/components/TreeView/TreeView.styles.js.map +1 -0
- package/dist/esm/components/TreeView/internals.js +15 -0
- package/dist/esm/components/TreeView/internals.js.map +1 -0
- package/dist/esm/index.js +12 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/types/index.d.ts +126 -9
- package/package.json +6 -5
package/dist/types/index.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { CSSInterpolation as CSSInterpolation_2 } from '@emotion/css';
|
|
|
22
22
|
import { CSSProperties } from 'react';
|
|
23
23
|
import { defaultCacheKey } from '@hitachivantara/uikit-react-shared';
|
|
24
24
|
import { defaultEmotionCache } from '@hitachivantara/uikit-react-shared';
|
|
25
|
+
import { DefaultTreeViewPluginParameters } from '@mui/x-tree-view/internals/plugins/defaultPlugins';
|
|
25
26
|
import { DialogActionsProps } from '@mui/material/DialogActions';
|
|
26
27
|
import { DialogContentProps } from '@mui/material/DialogContent';
|
|
27
28
|
import { DialogProps } from '@mui/material/Dialog';
|
|
@@ -75,6 +76,7 @@ import { PropGetter } from 'react-table';
|
|
|
75
76
|
import { RadioProps } from '@mui/material/Radio';
|
|
76
77
|
import { RadioProps as RadioProps_2 } from '@mui/material';
|
|
77
78
|
import { default as React_2 } from 'react';
|
|
79
|
+
import * as React_3 from 'react';
|
|
78
80
|
import { ReactElement } from 'react';
|
|
79
81
|
import { ReactNode } from 'react';
|
|
80
82
|
import { ReducerTableState } from 'react-table';
|
|
@@ -110,6 +112,8 @@ import { theme } from '@hitachivantara/uikit-styles';
|
|
|
110
112
|
import { themes } from '@hitachivantara/uikit-styles';
|
|
111
113
|
import type { ThHTMLAttributes } from 'react';
|
|
112
114
|
import { TooltipProps } from '@mui/material';
|
|
115
|
+
import type { TreeItemContentProps } from '@mui/x-tree-view';
|
|
116
|
+
import type { TreeItemProps } from '@mui/x-tree-view';
|
|
113
117
|
import { UseColumnOrderInstanceProps } from 'react-table';
|
|
114
118
|
import { UseColumnOrderState } from 'react-table';
|
|
115
119
|
import { useEffect } from 'react';
|
|
@@ -153,6 +157,11 @@ import { UseSortByInstanceProps } from 'react-table';
|
|
|
153
157
|
import { UseSortByOptions } from 'react-table';
|
|
154
158
|
import { UseSortByState } from 'react-table';
|
|
155
159
|
import { UseTableHeaderGroupProps } from 'react-table';
|
|
160
|
+
import type { UseTreeViewExpansionInstance } from '@mui/x-tree-view/internals/plugins/useTreeViewExpansion/useTreeViewExpansion.types';
|
|
161
|
+
import type { UseTreeViewFocusInstance } from '@mui/x-tree-view/internals/plugins/useTreeViewFocus/useTreeViewFocus.types';
|
|
162
|
+
import type { UseTreeViewKeyboardNavigationInstance } from '@mui/x-tree-view/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.types';
|
|
163
|
+
import type { UseTreeViewNodesInstance } from '@mui/x-tree-view/internals/plugins/useTreeViewNodes/useTreeViewNodes.types';
|
|
164
|
+
import type { UseTreeViewSelectionInstance } from '@mui/x-tree-view/internals/plugins/useTreeViewSelection/useTreeViewSelection.types';
|
|
156
165
|
|
|
157
166
|
declare type Accessor<D extends object> = (originalRow: D, index: number, sub: {
|
|
158
167
|
subRows: D[];
|
|
@@ -1922,7 +1931,7 @@ export declare interface HvCalendarHeaderProps {
|
|
|
1922
1931
|
/**
|
|
1923
1932
|
* Callback to handle input onFocus.
|
|
1924
1933
|
*/
|
|
1925
|
-
onFocus?: (event: React.
|
|
1934
|
+
onFocus?: (event: React.FocusEvent<HTMLTextAreaElement | HTMLInputElement>, formattedDate: string | null) => void;
|
|
1926
1935
|
/**
|
|
1927
1936
|
* Indicates if header should display end date in a date range.
|
|
1928
1937
|
*/
|
|
@@ -2860,6 +2869,14 @@ export declare interface HvDrawerProps extends DrawerProps, Omit<DrawerProps, "c
|
|
|
2860
2869
|
* Title for the button close.
|
|
2861
2870
|
*/
|
|
2862
2871
|
buttonTitle?: string;
|
|
2872
|
+
/**
|
|
2873
|
+
* Show backdrop when drawer ix open.
|
|
2874
|
+
*/
|
|
2875
|
+
showBackdrop?: boolean;
|
|
2876
|
+
/**
|
|
2877
|
+
* Prevent closing the dialog when clicking on the backdrop.
|
|
2878
|
+
*/
|
|
2879
|
+
disableBackdropClick?: boolean;
|
|
2863
2880
|
/** @ignore */
|
|
2864
2881
|
ref?: DrawerProps["ref"];
|
|
2865
2882
|
/** @ignore */
|
|
@@ -4307,7 +4324,7 @@ export declare interface HvListContainerProps extends HvBaseProps<HTMLUListEleme
|
|
|
4307
4324
|
/**
|
|
4308
4325
|
* ListItem description/documentation paragraph
|
|
4309
4326
|
*/
|
|
4310
|
-
export declare const HvListItem:
|
|
4327
|
+
export declare const HvListItem: React_2.ForwardRefExoticComponent<HvListItemProps & React_2.RefAttributes<any>>;
|
|
4311
4328
|
|
|
4312
4329
|
export declare type HvListItemClasses = ExtractNames<typeof useClasses_4>;
|
|
4313
4330
|
|
|
@@ -4315,7 +4332,7 @@ export declare interface HvListItemProps extends HvBaseProps<HTMLLIElement> {
|
|
|
4315
4332
|
/**
|
|
4316
4333
|
* Overrides the implicit list item role.
|
|
4317
4334
|
*/
|
|
4318
|
-
role?:
|
|
4335
|
+
role?: HvBaseProps<HTMLLIElement>["role"];
|
|
4319
4336
|
/** Indicates if the list item is selected. */
|
|
4320
4337
|
selected?: boolean;
|
|
4321
4338
|
/** If true, the list item will be disabled. */
|
|
@@ -5419,7 +5436,7 @@ export declare interface HvScrollToVerticalProps extends HvBaseProps<HTMLOListEl
|
|
|
5419
5436
|
*/
|
|
5420
5437
|
export declare const HvSection: (props: HvSectionProps) => JSX_2.Element;
|
|
5421
5438
|
|
|
5422
|
-
export declare type HvSectionClasses = ExtractNames<typeof
|
|
5439
|
+
export declare type HvSectionClasses = ExtractNames<typeof useClasses_121>;
|
|
5423
5440
|
|
|
5424
5441
|
export declare interface HvSectionProps extends Omit<HvBaseProps<HTMLDivElement>, "title"> {
|
|
5425
5442
|
/** The title of the section */
|
|
@@ -6739,6 +6756,49 @@ export declare interface HvTooltipProps extends Omit<TooltipProps, "classes"> {
|
|
|
6739
6756
|
containerId?: string;
|
|
6740
6757
|
}
|
|
6741
6758
|
|
|
6759
|
+
export declare interface HvTreeContentProps extends TreeItemContentProps {
|
|
6760
|
+
}
|
|
6761
|
+
|
|
6762
|
+
export declare const HvTreeItem: ForwardRefExoticComponent<HvTreeItemProps & RefAttributes<HTMLLIElement>>;
|
|
6763
|
+
|
|
6764
|
+
export declare type HvTreeItemClasses = ExtractNames<typeof useClasses_120>;
|
|
6765
|
+
|
|
6766
|
+
export declare interface HvTreeItemProps extends TreeItemProps {
|
|
6767
|
+
classes?: HvTreeItemClasses;
|
|
6768
|
+
disabled?: boolean;
|
|
6769
|
+
icon?: ReactNode;
|
|
6770
|
+
ContentComponent?: React.JSXElementConstructor<HvTreeContentProps>;
|
|
6771
|
+
}
|
|
6772
|
+
|
|
6773
|
+
/**
|
|
6774
|
+
* A Tree View displays hierarchical structures.
|
|
6775
|
+
* It also facilitates the exploration of categorical levels and their content.
|
|
6776
|
+
*
|
|
6777
|
+
* Tree structures are built through composing the `HvTreeItem` component,
|
|
6778
|
+
* or a custom variation of it.
|
|
6779
|
+
*
|
|
6780
|
+
* It is based on MUI's [TreeView](https://mui.com/x/react-tree-view) component.
|
|
6781
|
+
*
|
|
6782
|
+
* @example
|
|
6783
|
+
* ```tsx
|
|
6784
|
+
* <HvTreeView>
|
|
6785
|
+
* <HvTreeItem nodeId="1" label="File1" />
|
|
6786
|
+
* </HvTreeView>
|
|
6787
|
+
* ```
|
|
6788
|
+
*/
|
|
6789
|
+
export declare const HvTreeView: HvTreeViewComponent;
|
|
6790
|
+
|
|
6791
|
+
export declare type HvTreeViewClasses = ExtractNames<typeof useClasses_119>;
|
|
6792
|
+
|
|
6793
|
+
declare type HvTreeViewComponent = <Multiple extends boolean | undefined = undefined>(props: HvTreeViewProps<Multiple>) => React.JSX.Element;
|
|
6794
|
+
|
|
6795
|
+
export declare interface HvTreeViewProps<Multiple extends boolean | undefined> extends HvBaseProps<HTMLUListElement>, DefaultTreeViewPluginParameters<Multiple> {
|
|
6796
|
+
/** A Jss Object used to override or extend the styles applied. */
|
|
6797
|
+
classes?: HvTreeViewClasses;
|
|
6798
|
+
/** Tree View children. Usually a `HvTreeItem` instance, or a custom variation of it */
|
|
6799
|
+
children?: ReactNode;
|
|
6800
|
+
}
|
|
6801
|
+
|
|
6742
6802
|
/**
|
|
6743
6803
|
* Typography component is used to render text and paragraphs within an interface.
|
|
6744
6804
|
*/
|
|
@@ -7920,6 +7980,22 @@ export declare const tooltipClasses: {
|
|
|
7920
7980
|
valueWrapper: "HvTooltip-valueWrapper";
|
|
7921
7981
|
};
|
|
7922
7982
|
|
|
7983
|
+
export declare const treeItemClasses: {
|
|
7984
|
+
content: "HvTreeItem-content";
|
|
7985
|
+
label: "HvTreeItem-label";
|
|
7986
|
+
root: "HvTreeItem-root";
|
|
7987
|
+
group: "HvTreeItem-group";
|
|
7988
|
+
expanded: "HvTreeItem-expanded";
|
|
7989
|
+
disabled: "HvTreeItem-disabled";
|
|
7990
|
+
selected: "HvTreeItem-selected";
|
|
7991
|
+
focused: "HvTreeItem-focused";
|
|
7992
|
+
iconContainer: "HvTreeItem-iconContainer";
|
|
7993
|
+
};
|
|
7994
|
+
|
|
7995
|
+
export declare const treeView2Classes: {
|
|
7996
|
+
root: "HvTreeView-root";
|
|
7997
|
+
};
|
|
7998
|
+
|
|
7923
7999
|
export declare const treeViewClasses: {
|
|
7924
8000
|
root: "HvVerticalNavigationTreeView-root";
|
|
7925
8001
|
};
|
|
@@ -8427,13 +8503,9 @@ declare const useClasses_118: (classesProp?: Partial<Record<"placeholder" | "lab
|
|
|
8427
8503
|
cx: (...args: any) => string;
|
|
8428
8504
|
};
|
|
8429
8505
|
|
|
8430
|
-
declare const useClasses_119: (classesProp?: Partial<Record<"
|
|
8506
|
+
declare const useClasses_119: (classesProp?: Partial<Record<"root", string>>, addStatic?: boolean) => {
|
|
8431
8507
|
classes: {
|
|
8432
|
-
hidden: string;
|
|
8433
|
-
content: string;
|
|
8434
|
-
header: string;
|
|
8435
8508
|
root: string;
|
|
8436
|
-
actions: string;
|
|
8437
8509
|
};
|
|
8438
8510
|
css: {
|
|
8439
8511
|
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
@@ -8455,6 +8527,40 @@ declare const useClasses_12: (classesProp?: Partial<Record<"root" | "popper" | "
|
|
|
8455
8527
|
cx: (...args: any) => string;
|
|
8456
8528
|
};
|
|
8457
8529
|
|
|
8530
|
+
declare const useClasses_120: (classesProp?: Partial<Record<"content" | "label" | "root" | "group" | "expanded" | "disabled" | "selected" | "focused" | "iconContainer", string>>, addStatic?: boolean) => {
|
|
8531
|
+
classes: {
|
|
8532
|
+
content: string;
|
|
8533
|
+
label: string;
|
|
8534
|
+
root: string;
|
|
8535
|
+
group: string;
|
|
8536
|
+
expanded: string;
|
|
8537
|
+
disabled: string;
|
|
8538
|
+
selected: string;
|
|
8539
|
+
focused: string;
|
|
8540
|
+
iconContainer: string;
|
|
8541
|
+
};
|
|
8542
|
+
css: {
|
|
8543
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
8544
|
+
(...args: CSSInterpolation[]): string;
|
|
8545
|
+
};
|
|
8546
|
+
cx: (...args: any) => string;
|
|
8547
|
+
};
|
|
8548
|
+
|
|
8549
|
+
declare const useClasses_121: (classesProp?: Partial<Record<"hidden" | "content" | "header" | "root" | "actions", string>>, addStatic?: boolean) => {
|
|
8550
|
+
classes: {
|
|
8551
|
+
hidden: string;
|
|
8552
|
+
content: string;
|
|
8553
|
+
header: string;
|
|
8554
|
+
root: string;
|
|
8555
|
+
actions: string;
|
|
8556
|
+
};
|
|
8557
|
+
css: {
|
|
8558
|
+
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
|
8559
|
+
(...args: CSSInterpolation[]): string;
|
|
8560
|
+
};
|
|
8561
|
+
cx: (...args: any) => string;
|
|
8562
|
+
};
|
|
8563
|
+
|
|
8458
8564
|
declare const useClasses_13: (classesProp?: Partial<Record<"input" | "root" | "disabled" | "readOnly" | "invalid" | "resizable" | "inputBorderContainer" | "inputRootInvalid" | "inputRootReadOnly" | "inputRoot" | "inputRootFocused" | "inputRootDisabled" | "inputRootMultiline" | "inputDisabled" | "inputReadOnly" | "inputResizable", string>>, addStatic?: boolean) => {
|
|
8459
8565
|
classes: {
|
|
8460
8566
|
input: string;
|
|
@@ -10383,6 +10489,17 @@ export declare interface UseHvTableStylesTableRowProps {
|
|
|
10383
10489
|
hover?: boolean;
|
|
10384
10490
|
}
|
|
10385
10491
|
|
|
10492
|
+
export declare function useHvTreeItem(nodeId: string): {
|
|
10493
|
+
instance: (UseTreeViewNodesInstance & UseTreeViewExpansionInstance & UseTreeViewSelectionInstance & UseTreeViewFocusInstance & UseTreeViewKeyboardNavigationInstance) | null;
|
|
10494
|
+
disabled: boolean;
|
|
10495
|
+
expanded: boolean;
|
|
10496
|
+
selected: boolean;
|
|
10497
|
+
focused: boolean;
|
|
10498
|
+
handleExpansion: (event: React_3.MouseEvent<HTMLDivElement>) => void;
|
|
10499
|
+
handleSelection: (event: React_3.MouseEvent<HTMLDivElement>) => void;
|
|
10500
|
+
preventSelection: (event: React_3.MouseEvent<HTMLDivElement>) => void;
|
|
10501
|
+
};
|
|
10502
|
+
|
|
10386
10503
|
export declare const useImageLoaded: (src: any, srcSet: any) => string | boolean;
|
|
10387
10504
|
|
|
10388
10505
|
export declare function useInstance(instance: any): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.36.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -33,11 +33,12 @@
|
|
|
33
33
|
"@emotion/css": "^11.11.0",
|
|
34
34
|
"@emotion/serialize": "^1.1.2",
|
|
35
35
|
"@emotion/utils": "^1.2.1",
|
|
36
|
-
"@hitachivantara/uikit-react-icons": "^5.6.
|
|
37
|
-
"@hitachivantara/uikit-react-shared": "^5.1.
|
|
38
|
-
"@hitachivantara/uikit-styles": "^5.
|
|
36
|
+
"@hitachivantara/uikit-react-icons": "^5.6.12",
|
|
37
|
+
"@hitachivantara/uikit-react-shared": "^5.1.16",
|
|
38
|
+
"@hitachivantara/uikit-styles": "^5.16.0",
|
|
39
39
|
"@internationalized/date": "^3.2.0",
|
|
40
40
|
"@mui/base": "^5.0.0-beta.4",
|
|
41
|
+
"@mui/x-tree-view": "6.0.0-beta.0",
|
|
41
42
|
"@popperjs/core": "^2.11.8",
|
|
42
43
|
"@react-aria/datepicker": "^3.4.1",
|
|
43
44
|
"@react-stately/datepicker": "^3.4.1",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"access": "public",
|
|
65
66
|
"directory": "package"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "e0cb17343a2120b95474818aa0d2b693843e140f",
|
|
68
69
|
"main": "dist/cjs/index.cjs",
|
|
69
70
|
"exports": {
|
|
70
71
|
".": {
|