@hitachivantara/uikit-react-core 6.4.2 → 6.5.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/Banner/BannerContent/BannerContent.js +1 -0
- package/dist/BreadCrumb/BreadCrumb.js +56 -31
- package/dist/BreadCrumb/Page/Page.js +1 -14
- package/dist/BreadCrumb/utils.js +3 -6
- package/dist/BulkActions/BulkActions.js +10 -7
- package/dist/BulkActions/BulkActions.styles.js +10 -12
- package/dist/FilterGroup/FilterContent/FilterContent.js +14 -5
- package/dist/FilterGroup/FilterContent/HeaderButton.js +104 -0
- package/dist/FilterGroup/LeftPanel/LeftPanel.js +4 -1
- package/dist/Snackbar/Snackbar.js +2 -0
- package/dist/Snackbar/SnackbarContent/SnackbarContent.js +2 -0
- package/dist/index.d.ts +15 -4
- package/dist/themes/pentaho.js +24 -2
- package/dist/utils/Callout.js +11 -1
- package/package.json +2 -2
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, isValidElement } from "react";
|
|
3
|
-
import { useDefaultProps
|
|
3
|
+
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { SvgBase } from "../icons.js";
|
|
4
5
|
import { useClasses } from "./BreadCrumb.styles.js";
|
|
5
6
|
import { staticClasses } from "./BreadCrumb.styles.js";
|
|
6
7
|
import { pathWithSubMenu, removeExtension } from "./utils.js";
|
|
7
8
|
import { HvPathElement } from "./PathElement/PathElement.js";
|
|
8
9
|
import { HvBreadCrumbPage } from "./Page/Page.js";
|
|
10
|
+
import { HvIconButton } from "../IconButton/IconButton.js";
|
|
9
11
|
import { HvTypography } from "../Typography/Typography.js";
|
|
12
|
+
const HomeIcon = (props) => /* @__PURE__ */ jsx(SvgBase, { viewBox: "0 0 256 256", width: "16", height: "16", ...props, children: /* @__PURE__ */ jsx("path", { d: "M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" }) });
|
|
10
13
|
const HvBreadCrumb = forwardRef(function HvBreadCrumb2(props, ref) {
|
|
11
14
|
const {
|
|
12
15
|
classes: classesProp,
|
|
13
16
|
className,
|
|
14
17
|
id,
|
|
15
18
|
listRoute = [],
|
|
19
|
+
home,
|
|
16
20
|
maxVisible,
|
|
17
21
|
url,
|
|
18
22
|
onClick,
|
|
@@ -22,7 +26,6 @@ const HvBreadCrumb = forwardRef(function HvBreadCrumb2(props, ref) {
|
|
|
22
26
|
...others
|
|
23
27
|
} = useDefaultProps("HvBreadCrumb", props);
|
|
24
28
|
const { classes, cx } = useClasses(classesProp);
|
|
25
|
-
const { activeTheme } = useTheme();
|
|
26
29
|
const maxVisibleElem = maxVisible && maxVisible < 2 ? 2 : maxVisible;
|
|
27
30
|
let listPath = listRoute.slice();
|
|
28
31
|
if (url != null) {
|
|
@@ -38,46 +41,68 @@ const HvBreadCrumb = forwardRef(function HvBreadCrumb2(props, ref) {
|
|
|
38
41
|
listPath,
|
|
39
42
|
maxVisibleElem,
|
|
40
43
|
onClick,
|
|
41
|
-
dropDownMenuProps
|
|
42
|
-
activeTheme?.name === "pentahoPlus" ? 2 : 1
|
|
44
|
+
dropDownMenuProps
|
|
43
45
|
) : listPath;
|
|
44
|
-
return /* @__PURE__ */ jsx("nav", { ref, id, className: cx(classes.root, className), ...others, children: /* @__PURE__ */
|
|
45
|
-
|
|
46
|
-
const isLast = index === breadcrumbPath.length - 1;
|
|
47
|
-
const isFirst = index === 0;
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
46
|
+
return /* @__PURE__ */ jsx("nav", { ref, id, className: cx(classes.root, className), ...others, children: /* @__PURE__ */ jsxs("ol", { className: classes.orderedList, children: [
|
|
47
|
+
home && /* @__PURE__ */ jsx(
|
|
49
48
|
HvPathElement,
|
|
50
49
|
{
|
|
51
50
|
classes: {
|
|
52
51
|
centerContainer: classes.centerContainer,
|
|
53
52
|
separatorContainer: classes.separatorContainer
|
|
54
53
|
},
|
|
55
|
-
last: isLast,
|
|
56
54
|
separator,
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
{
|
|
60
|
-
className: classes.currentPage,
|
|
61
|
-
variant: "caption1",
|
|
62
|
-
children: removeExtension(elem.label)
|
|
63
|
-
}
|
|
64
|
-
) || /* @__PURE__ */ jsx(
|
|
65
|
-
HvBreadCrumbPage,
|
|
55
|
+
children: /* @__PURE__ */ jsx(
|
|
56
|
+
HvIconButton,
|
|
66
57
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
58
|
+
title: home.label,
|
|
59
|
+
component: component || "a",
|
|
60
|
+
href: home.path,
|
|
61
|
+
onClick: (event) => {
|
|
62
|
+
event.preventDefault();
|
|
63
|
+
onClick?.(event, home);
|
|
72
64
|
},
|
|
73
|
-
|
|
74
|
-
onClick
|
|
65
|
+
children: /* @__PURE__ */ jsx(HomeIcon, {})
|
|
75
66
|
}
|
|
76
67
|
)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
)
|
|
80
|
-
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
listPath.map((elem, index) => {
|
|
71
|
+
const key = `key_${index}`;
|
|
72
|
+
const isLast = index === breadcrumbPath.length - 1;
|
|
73
|
+
return /* @__PURE__ */ jsx(
|
|
74
|
+
HvPathElement,
|
|
75
|
+
{
|
|
76
|
+
classes: {
|
|
77
|
+
centerContainer: classes.centerContainer,
|
|
78
|
+
separatorContainer: classes.separatorContainer
|
|
79
|
+
},
|
|
80
|
+
last: isLast,
|
|
81
|
+
separator,
|
|
82
|
+
children: isValidElement(elem) && elem || isLast && /* @__PURE__ */ jsx(
|
|
83
|
+
HvTypography,
|
|
84
|
+
{
|
|
85
|
+
className: classes.currentPage,
|
|
86
|
+
variant: "caption1",
|
|
87
|
+
children: removeExtension(elem.label)
|
|
88
|
+
}
|
|
89
|
+
) || /* @__PURE__ */ jsx(
|
|
90
|
+
HvBreadCrumbPage,
|
|
91
|
+
{
|
|
92
|
+
elem,
|
|
93
|
+
classes: {
|
|
94
|
+
a: classes.a,
|
|
95
|
+
link: classes.link
|
|
96
|
+
},
|
|
97
|
+
component,
|
|
98
|
+
onClick
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
},
|
|
102
|
+
key
|
|
103
|
+
);
|
|
104
|
+
})
|
|
105
|
+
] }) });
|
|
81
106
|
});
|
|
82
107
|
export {
|
|
83
108
|
HvBreadCrumb,
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
3
|
-
import { SvgBase } from "../../icons.js";
|
|
4
3
|
import { useClasses } from "./Page.styles.js";
|
|
5
4
|
import { staticClasses } from "./Page.styles.js";
|
|
6
|
-
import { HvIconButton } from "../../IconButton/IconButton.js";
|
|
7
5
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
8
6
|
import { HvOverflowTooltip } from "../../OverflowTooltip/OverflowTooltip.js";
|
|
9
|
-
const HomeIcon = (props) => /* @__PURE__ */ jsx(SvgBase, { viewBox: "0 0 256 256", width: "16", height: "16", ...props, children: /* @__PURE__ */ jsx("path", { d: "M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z" }) });
|
|
10
7
|
const HvBreadCrumbPage = (props) => {
|
|
11
8
|
const {
|
|
12
9
|
component,
|
|
13
10
|
onClick,
|
|
14
11
|
elem,
|
|
15
|
-
showHome,
|
|
16
12
|
classes: classesProp
|
|
17
13
|
} = useDefaultProps("HvBreadCrumbPage", props);
|
|
18
14
|
const { classes, cx } = useClasses(classesProp);
|
|
@@ -21,16 +17,7 @@ const HvBreadCrumbPage = (props) => {
|
|
|
21
17
|
event.preventDefault();
|
|
22
18
|
onClick?.(event, elem);
|
|
23
19
|
};
|
|
24
|
-
return
|
|
25
|
-
HvIconButton,
|
|
26
|
-
{
|
|
27
|
-
title: elem.label,
|
|
28
|
-
component: component || "a",
|
|
29
|
-
href: elem.path,
|
|
30
|
-
onClick: onClick && handleClick,
|
|
31
|
-
children: /* @__PURE__ */ jsx(HomeIcon, {})
|
|
32
|
-
}
|
|
33
|
-
) : /* @__PURE__ */ jsx(
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
34
21
|
HvTypography,
|
|
35
22
|
{
|
|
36
23
|
noWrap: true,
|
package/dist/BreadCrumb/utils.js
CHANGED
|
@@ -2,18 +2,15 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { HvIcon } from "../icons.js";
|
|
3
3
|
import { HvDropDownMenu } from "../DropDownMenu/DropDownMenu.js";
|
|
4
4
|
const removeExtension = (label) => label.includes(".") ? label.slice(0, label.lastIndexOf(".")) : label;
|
|
5
|
-
const pathWithSubMenu = (id, listRoute, maxVisible, onClick, dropDownMenuProps
|
|
5
|
+
const pathWithSubMenu = (id, listRoute, maxVisible, onClick, dropDownMenuProps) => {
|
|
6
6
|
const nbrElemToSubMenu = listRoute.length - maxVisible;
|
|
7
|
-
const subMenuList = listRoute.slice(
|
|
8
|
-
1,
|
|
9
|
-
nbrElemToSubMenu + moreOptionsPosition
|
|
10
|
-
);
|
|
7
|
+
const subMenuList = listRoute.slice(1, nbrElemToSubMenu + 1);
|
|
11
8
|
const handleClick = (event, data) => {
|
|
12
9
|
event.preventDefault();
|
|
13
10
|
onClick?.(event, data);
|
|
14
11
|
};
|
|
15
12
|
listRoute.splice(
|
|
16
|
-
|
|
13
|
+
1,
|
|
17
14
|
nbrElemToSubMenu,
|
|
18
15
|
/* @__PURE__ */ jsx(
|
|
19
16
|
HvDropDownMenu,
|
|
@@ -13,14 +13,15 @@ const HvBulkActions = forwardRef(function HvBulkActions2(props, ref) {
|
|
|
13
13
|
className,
|
|
14
14
|
classes: classesProp,
|
|
15
15
|
selectAllPagesLabel,
|
|
16
|
-
|
|
16
|
+
disabled,
|
|
17
|
+
actionsDisabled: actionsDisabledProp,
|
|
17
18
|
maxVisibleActions,
|
|
18
19
|
checkboxProps,
|
|
19
20
|
actions,
|
|
20
21
|
numTotal = 0,
|
|
21
22
|
numSelected = 0,
|
|
22
23
|
selectAllConjunctionLabel = "/",
|
|
23
|
-
showSelectAllPages
|
|
24
|
+
showSelectAllPages,
|
|
24
25
|
semantic = true,
|
|
25
26
|
onAction,
|
|
26
27
|
onSelectAll,
|
|
@@ -30,22 +31,23 @@ const HvBulkActions = forwardRef(function HvBulkActions2(props, ref) {
|
|
|
30
31
|
const { classes, cx } = useClasses(classesProp);
|
|
31
32
|
const anySelected = numSelected > 0;
|
|
32
33
|
const isSemantic = semantic && anySelected;
|
|
34
|
+
const actionsDisabled = disabled || actionsDisabledProp;
|
|
33
35
|
return /* @__PURE__ */ jsxs(
|
|
34
36
|
"div",
|
|
35
37
|
{
|
|
36
38
|
ref,
|
|
37
39
|
id,
|
|
38
|
-
className: cx(
|
|
39
|
-
classes.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
),
|
|
40
|
+
className: cx(classes.root, className, {
|
|
41
|
+
[classes.semantic]: isSemantic,
|
|
42
|
+
[classes.disabled]: disabled
|
|
43
|
+
}),
|
|
43
44
|
...others,
|
|
44
45
|
children: [
|
|
45
46
|
/* @__PURE__ */ jsxs("div", { className: classes.selectAllContainer, children: [
|
|
46
47
|
/* @__PURE__ */ jsx(
|
|
47
48
|
HvCheckBox,
|
|
48
49
|
{
|
|
50
|
+
disabled,
|
|
49
51
|
className: classes.selectAll,
|
|
50
52
|
checked: numSelected > 0,
|
|
51
53
|
semantic: isSemantic,
|
|
@@ -67,6 +69,7 @@ const HvBulkActions = forwardRef(function HvBulkActions2(props, ref) {
|
|
|
67
69
|
/* @__PURE__ */ jsx(
|
|
68
70
|
HvButton,
|
|
69
71
|
{
|
|
72
|
+
disabled,
|
|
70
73
|
className: classes.selectAllPages,
|
|
71
74
|
variant: isSemantic ? "primaryGhost" : "secondaryGhost",
|
|
72
75
|
onClick: onSelectAllPages,
|
|
@@ -12,15 +12,10 @@ const { staticClasses, useClasses } = createClasses("HvBulkActions", {
|
|
|
12
12
|
marginBottom: theme.space.xs
|
|
13
13
|
},
|
|
14
14
|
semantic: {
|
|
15
|
-
backgroundColor: theme.colors.bgHover
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"& $selectAll:focus-within div": {
|
|
22
|
-
backgroundColor: theme.alpha("textLight", 0.3)
|
|
23
|
-
}
|
|
15
|
+
backgroundColor: theme.colors.bgHover
|
|
16
|
+
},
|
|
17
|
+
disabled: {
|
|
18
|
+
backgroundColor: theme.colors.bgDisabled
|
|
24
19
|
},
|
|
25
20
|
actions: {
|
|
26
21
|
display: "inline-flex",
|
|
@@ -32,15 +27,18 @@ const { staticClasses, useClasses } = createClasses("HvBulkActions", {
|
|
|
32
27
|
}
|
|
33
28
|
}
|
|
34
29
|
},
|
|
35
|
-
selectAllContainer: {
|
|
30
|
+
selectAllContainer: {
|
|
31
|
+
display: "flex",
|
|
32
|
+
alignItems: "center",
|
|
33
|
+
gap: theme.space.xs
|
|
34
|
+
},
|
|
36
35
|
selectAll: {},
|
|
37
36
|
selectAllPages: {},
|
|
38
37
|
divider: {
|
|
39
38
|
display: "flex",
|
|
40
39
|
backgroundColor: theme.colors.border,
|
|
41
40
|
width: "1px",
|
|
42
|
-
height: "32px"
|
|
43
|
-
marginLeft: theme.space.sm
|
|
41
|
+
height: "32px"
|
|
44
42
|
}
|
|
45
43
|
});
|
|
46
44
|
export {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useState, useContext, useRef, useMemo } from "react";
|
|
3
|
-
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
3
|
+
import { useDefaultProps, useTheme } from "@hitachivantara/uikit-react-utils";
|
|
4
4
|
import { HvIcon } from "../../icons.js";
|
|
5
5
|
import { setId } from "../../utils/setId.js";
|
|
6
6
|
import { HvFilterGroupContext } from "../FilterGroupContext.js";
|
|
7
7
|
import { useClasses } from "./FilterContent.styles.js";
|
|
8
8
|
import { staticClasses } from "./FilterContent.styles.js";
|
|
9
|
+
import { HvHeaderButton } from "./HeaderButton.js";
|
|
9
10
|
import { HvFilterGroupLeftPanel } from "../LeftPanel/LeftPanel.js";
|
|
10
11
|
import { HvFilterGroupRightPanel } from "../RightPanel/RightPanel.js";
|
|
11
12
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
@@ -32,11 +33,13 @@ const HvFilterGroupContent = forwardRef(function HvFilterGroupContent2(props, re
|
|
|
32
33
|
height,
|
|
33
34
|
leftEmptyElement,
|
|
34
35
|
rightEmptyElement,
|
|
36
|
+
iconOnly,
|
|
35
37
|
classes: classesProp,
|
|
36
38
|
...others
|
|
37
39
|
} = useDefaultProps("HvFilterGroupContent", props);
|
|
38
|
-
const { classes } = useClasses(classesProp);
|
|
39
40
|
const [filterGroupOpen, setFilterGroupOpen] = useState(false);
|
|
41
|
+
const { classes } = useClasses(classesProp);
|
|
42
|
+
const { activeTheme } = useTheme();
|
|
40
43
|
const {
|
|
41
44
|
defaultValue,
|
|
42
45
|
filterValues,
|
|
@@ -90,13 +93,13 @@ const HvFilterGroupContent = forwardRef(function HvFilterGroupContent2(props, re
|
|
|
90
93
|
disabled,
|
|
91
94
|
disablePortal,
|
|
92
95
|
variableWidth: true,
|
|
93
|
-
placement: horizontalPlacement,
|
|
94
96
|
expanded: filterGroupOpen,
|
|
97
|
+
placement: horizontalPlacement,
|
|
95
98
|
onToggle: handleToggle,
|
|
96
99
|
onClickOutside: onCancelHandler,
|
|
97
100
|
onContainerCreation: focusOnContainer,
|
|
98
|
-
placeholder: Header,
|
|
99
|
-
adornment: /* @__PURE__ */ jsx(HvFilterGroupCounter, {}),
|
|
101
|
+
placeholder: activeTheme?.name === "pentahoPlus" ? void 0 : Header,
|
|
102
|
+
adornment: activeTheme?.name === "pentahoPlus" ? void 0 : /* @__PURE__ */ jsx(HvFilterGroupCounter, {}),
|
|
100
103
|
popperProps: {
|
|
101
104
|
modifiers: [{ name: "preventOverflow", enabled: escapeWithReference }]
|
|
102
105
|
},
|
|
@@ -106,6 +109,12 @@ const HvFilterGroupContent = forwardRef(function HvFilterGroupContent2(props, re
|
|
|
106
109
|
"aria-invalid": status === "invalid" ? true : void 0,
|
|
107
110
|
"aria-errormessage": status === "invalid" ? setId(id, "error") : void 0,
|
|
108
111
|
"aria-describedby": [description && setId(id, "description"), ariaDescribedBy].join(" ").trim() || void 0,
|
|
112
|
+
...activeTheme?.name === "pentahoPlus" && {
|
|
113
|
+
headerComponent: HvHeaderButton,
|
|
114
|
+
iconOnly,
|
|
115
|
+
title: labels?.placeholder,
|
|
116
|
+
count: filterValues?.flat().length ?? 0
|
|
117
|
+
},
|
|
109
118
|
...others,
|
|
110
119
|
children: [
|
|
111
120
|
/* @__PURE__ */ jsx("div", { ref: focusTarget, tabIndex: -1 }),
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import { useDefaultProps, createClasses } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { theme } from "@hitachivantara/uikit-styles";
|
|
5
|
+
import { HvIcon } from "../../icons.js";
|
|
6
|
+
import { HvBadge } from "../../Badge/Badge.js";
|
|
7
|
+
import { HvIconButton } from "../../IconButton/IconButton.js";
|
|
8
|
+
import { HvButton } from "../../Button/Button.js";
|
|
9
|
+
import { HvTypography } from "../../Typography/Typography.js";
|
|
10
|
+
const { useClasses } = createClasses("HvHeaderButton", {
|
|
11
|
+
iconOnly: {
|
|
12
|
+
"& > .HvBadge-badge": {
|
|
13
|
+
minWidth: "unset !important",
|
|
14
|
+
minHeight: "unset !important"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
button: {
|
|
18
|
+
border: `1px solid ${theme.colors.primaryDimmed}`,
|
|
19
|
+
borderRadius: theme.radii.full
|
|
20
|
+
},
|
|
21
|
+
headerContent: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: theme.space.xxs
|
|
25
|
+
},
|
|
26
|
+
badgeRoot: {
|
|
27
|
+
width: 0,
|
|
28
|
+
marginRight: theme.space.sm
|
|
29
|
+
},
|
|
30
|
+
badge: {
|
|
31
|
+
position: "relative"
|
|
32
|
+
},
|
|
33
|
+
badgeIconOnly: {
|
|
34
|
+
"&&>div:last-of-type": {
|
|
35
|
+
minWidth: "unset",
|
|
36
|
+
minHeight: "unset"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
badgeIcon: {
|
|
40
|
+
minHeight: 0,
|
|
41
|
+
minWidth: 0
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const HvHeaderButton = forwardRef((props, ref) => {
|
|
45
|
+
const {
|
|
46
|
+
onClick,
|
|
47
|
+
iconOnly,
|
|
48
|
+
count = 0,
|
|
49
|
+
disabled,
|
|
50
|
+
title = "Filter",
|
|
51
|
+
classes: classesProp,
|
|
52
|
+
...others
|
|
53
|
+
} = useDefaultProps("HvHeaderButton", props);
|
|
54
|
+
const { classes } = useClasses(classesProp, false);
|
|
55
|
+
return iconOnly ? /* @__PURE__ */ jsx(
|
|
56
|
+
HvBadge,
|
|
57
|
+
{
|
|
58
|
+
ref,
|
|
59
|
+
label: count,
|
|
60
|
+
showCount: true,
|
|
61
|
+
className: classes.badgeIconOnly,
|
|
62
|
+
icon: /* @__PURE__ */ jsx(
|
|
63
|
+
HvIconButton,
|
|
64
|
+
{
|
|
65
|
+
onClick,
|
|
66
|
+
title,
|
|
67
|
+
disabled,
|
|
68
|
+
className: classes.button,
|
|
69
|
+
...others,
|
|
70
|
+
children: /* @__PURE__ */ jsx(HvIcon, { name: "Filters" })
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
) : /* @__PURE__ */ jsx(
|
|
75
|
+
HvButton,
|
|
76
|
+
{
|
|
77
|
+
ref,
|
|
78
|
+
disabled,
|
|
79
|
+
variant: "secondarySubtle",
|
|
80
|
+
onClick,
|
|
81
|
+
startIcon: /* @__PURE__ */ jsx(HvIcon, { name: "Filters" }),
|
|
82
|
+
...others,
|
|
83
|
+
role: "combobox",
|
|
84
|
+
children: /* @__PURE__ */ jsxs("div", { className: classes.headerContent, children: [
|
|
85
|
+
/* @__PURE__ */ jsx(HvTypography, { variant: "label", children: title }),
|
|
86
|
+
/* @__PURE__ */ jsx(
|
|
87
|
+
HvBadge,
|
|
88
|
+
{
|
|
89
|
+
showCount: true,
|
|
90
|
+
label: count,
|
|
91
|
+
classes: {
|
|
92
|
+
root: classes.badgeRoot,
|
|
93
|
+
badge: classes.badge,
|
|
94
|
+
badgeIcon: classes.badgeIcon
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
] })
|
|
99
|
+
}
|
|
100
|
+
);
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
HvHeaderButton
|
|
104
|
+
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useContext } from "react";
|
|
3
|
+
import { useTheme } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { HvIcon } from "../../icons.js";
|
|
3
5
|
import { HvFilterGroupContext } from "../FilterGroupContext.js";
|
|
4
6
|
import { useClasses } from "./LeftPanel.styles.js";
|
|
5
7
|
import { staticClasses } from "./LeftPanel.styles.js";
|
|
@@ -14,6 +16,7 @@ const HvFilterGroupLeftPanel = ({
|
|
|
14
16
|
classes: classesProp
|
|
15
17
|
}) => {
|
|
16
18
|
const { classes } = useClasses(classesProp);
|
|
19
|
+
const { activeTheme } = useTheme();
|
|
17
20
|
const { filterOptions, activeGroup, setActiveGroup } = useContext(HvFilterGroupContext);
|
|
18
21
|
return /* @__PURE__ */ jsx(HvPanel, { className, children: filterOptions.length > 0 ? /* @__PURE__ */ jsx(HvListContainer, { condensed: true, interactive: true, children: filterOptions.map((group, index) => /* @__PURE__ */ jsx(
|
|
19
22
|
HvListItem,
|
|
@@ -21,7 +24,7 @@ const HvFilterGroupLeftPanel = ({
|
|
|
21
24
|
className: classes.listItem,
|
|
22
25
|
onClick: () => setActiveGroup(index),
|
|
23
26
|
selected: filterOptions[activeGroup].id === group.id,
|
|
24
|
-
endAdornment: /* @__PURE__ */ jsx(HvFilterGroupCounter, { groupId: group.id }),
|
|
27
|
+
endAdornment: activeTheme?.name === "pentahoPlus" ? /* @__PURE__ */ jsx(HvIcon, { name: "CaretRight" }) : /* @__PURE__ */ jsx(HvFilterGroupCounter, { groupId: group.id }),
|
|
25
28
|
children: /* @__PURE__ */ jsx(HvOverflowTooltip, { data: group.name })
|
|
26
29
|
},
|
|
27
30
|
group.id || group.name
|
|
@@ -29,6 +29,7 @@ const HvSnackbar = forwardRef(function HvSnackbar2(props, ref) {
|
|
|
29
29
|
container,
|
|
30
30
|
offset = 60,
|
|
31
31
|
snackbarContentProps,
|
|
32
|
+
size,
|
|
32
33
|
...others
|
|
33
34
|
} = useDefaultProps("HvSnackbar", props);
|
|
34
35
|
const { classes } = useClasses(classesProp);
|
|
@@ -78,6 +79,7 @@ const HvSnackbar = forwardRef(function HvSnackbar2(props, ref) {
|
|
|
78
79
|
action,
|
|
79
80
|
onAction,
|
|
80
81
|
onClose,
|
|
82
|
+
size,
|
|
81
83
|
...snackbarContentProps
|
|
82
84
|
}
|
|
83
85
|
)
|
|
@@ -18,6 +18,7 @@ const HvSnackbarContent = forwardRef(function HvSnackbarContent2(props, ref) {
|
|
|
18
18
|
action,
|
|
19
19
|
onAction,
|
|
20
20
|
onClose,
|
|
21
|
+
size,
|
|
21
22
|
...others
|
|
22
23
|
} = useDefaultProps("HvSnackbarContent", props);
|
|
23
24
|
const { classes, cx } = useClasses(classesProp);
|
|
@@ -40,6 +41,7 @@ const HvSnackbarContent = forwardRef(function HvSnackbarContent2(props, ref) {
|
|
|
40
41
|
actions: isActionGeneric(action) ? [action] : action,
|
|
41
42
|
onClose,
|
|
42
43
|
onAction,
|
|
44
|
+
size,
|
|
43
45
|
...others,
|
|
44
46
|
children: label
|
|
45
47
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -369,6 +369,7 @@ export declare const breadCrumbClasses: {
|
|
|
369
369
|
export declare const bulkActionsClasses: {
|
|
370
370
|
root: string;
|
|
371
371
|
semantic: string;
|
|
372
|
+
disabled: string;
|
|
372
373
|
actions: string;
|
|
373
374
|
selectAllContainer: string;
|
|
374
375
|
selectAll: string;
|
|
@@ -1234,7 +1235,7 @@ export declare interface HvBannerContentProps extends Omit<SnackbarContentProps,
|
|
|
1234
1235
|
/** The props to pass down to the Action Container. */
|
|
1235
1236
|
actionProps?: Partial<HvButtonProps>;
|
|
1236
1237
|
/** The size of the banner. */
|
|
1237
|
-
size?: HvCalloutProps["size"]
|
|
1238
|
+
size?: Extract<HvCalloutProps["size"], "regular" | "large" | "micro">;
|
|
1238
1239
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
1239
1240
|
classes?: HvBannerContentClasses;
|
|
1240
1241
|
}
|
|
@@ -1691,6 +1692,8 @@ export declare interface HvBreadCrumbPathElement extends Record<string, any> {
|
|
|
1691
1692
|
export declare interface HvBreadCrumbProps extends HvBaseProps<HTMLDivElement, "onClick"> {
|
|
1692
1693
|
/** List of breadcrumb. */
|
|
1693
1694
|
listRoute?: HvBreadCrumbPathElement[];
|
|
1695
|
+
/** Home breadcrumb element. If passed, it will be displayed as the first breadcrumb item as a Home icon */
|
|
1696
|
+
home?: HvBreadCrumbPathElement;
|
|
1694
1697
|
/** URL to build the breadcrumb. */
|
|
1695
1698
|
url?: string;
|
|
1696
1699
|
/** Number of pages visible. */
|
|
@@ -1737,6 +1740,8 @@ export declare interface HvBulkActionsProps extends HvBaseProps {
|
|
|
1737
1740
|
semantic?: boolean;
|
|
1738
1741
|
/** The renderable content inside the right actions slot, or an array of actions `{ id, label, icon, disabled, ... }` */
|
|
1739
1742
|
actions?: HvActionsGenericProps["actions"];
|
|
1743
|
+
/** Whether the bulk actions component is disabled */
|
|
1744
|
+
disabled?: boolean;
|
|
1740
1745
|
/** Whether actions should be all disabled */
|
|
1741
1746
|
actionsDisabled?: boolean;
|
|
1742
1747
|
/** The callback function called when an action is triggered, receiving `action` as parameter. */
|
|
@@ -1995,7 +2000,7 @@ declare interface HvCalloutProps extends Omit<SnackbarContentProps, "title" | "v
|
|
|
1995
2000
|
/** The props to pass down to the Action Container. */
|
|
1996
2001
|
actionProps?: Partial<HvButtonProps>;
|
|
1997
2002
|
/** The size of the banner. */
|
|
1998
|
-
size?: "large" | "regular" | "micro";
|
|
2003
|
+
size?: "large" | "regular" | "toast" | "micro";
|
|
1999
2004
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
2000
2005
|
classes?: HvCalloutClasses;
|
|
2001
2006
|
}
|
|
@@ -3269,6 +3274,7 @@ declare interface HvFilterGroupContentProps extends Omit<HvBaseDropdownProps, "o
|
|
|
3269
3274
|
leftEmptyElement?: React.ReactNode;
|
|
3270
3275
|
rightEmptyElement?: React.ReactNode;
|
|
3271
3276
|
disabled?: boolean;
|
|
3277
|
+
iconOnly?: boolean;
|
|
3272
3278
|
classes?: HvFilterGroupContentClasses;
|
|
3273
3279
|
}
|
|
3274
3280
|
|
|
@@ -5489,6 +5495,8 @@ export declare interface HvSnackbarContentProps extends Omit<SnackbarContentProp
|
|
|
5489
5495
|
onAction?: HvActionsGenericProps["onAction"];
|
|
5490
5496
|
/** @inheritdoc */
|
|
5491
5497
|
onClose?: SnackbarProps["onClose"];
|
|
5498
|
+
/** The size of the snackbar. */
|
|
5499
|
+
size?: Extract<HvCalloutProps["size"], "regular" | "toast">;
|
|
5492
5500
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
5493
5501
|
classes?: HvSnackbarContentClasses;
|
|
5494
5502
|
}
|
|
@@ -5532,6 +5540,8 @@ export declare interface HvSnackbarProps extends Omit<SnackbarProps, "action" |
|
|
|
5532
5540
|
offset?: number;
|
|
5533
5541
|
/** Others applied to the content of the snackbar. */
|
|
5534
5542
|
snackbarContentProps?: HvSnackbarContentProps;
|
|
5543
|
+
/** The size of the snackbar. */
|
|
5544
|
+
size?: Extract<HvCalloutProps["size"], "regular" | "toast">;
|
|
5535
5545
|
/** A Jss Object used to override or extend the styles applied to the component. */
|
|
5536
5546
|
classes?: HvSnackbarClasses;
|
|
5537
5547
|
/** @ignore */
|
|
@@ -8651,10 +8661,11 @@ declare const useClasses_35: (classesProp?: Partial<Record<"link" | "a" | "root"
|
|
|
8651
8661
|
readonly cx: (...args: any) => string;
|
|
8652
8662
|
};
|
|
8653
8663
|
|
|
8654
|
-
declare const useClasses_36: (classesProp?: Partial<Record<"semantic" | "root" | "actions" | "selectAll" | "selectAllContainer" | "selectAllPages" | "divider", string>>, addStatic?: boolean) => {
|
|
8664
|
+
declare const useClasses_36: (classesProp?: Partial<Record<"semantic" | "disabled" | "root" | "actions" | "selectAll" | "selectAllContainer" | "selectAllPages" | "divider", string>>, addStatic?: boolean) => {
|
|
8655
8665
|
readonly classes: {
|
|
8656
8666
|
root: string;
|
|
8657
8667
|
semantic: string;
|
|
8668
|
+
disabled: string;
|
|
8658
8669
|
actions: string;
|
|
8659
8670
|
selectAllContainer: string;
|
|
8660
8671
|
selectAll: string;
|
|
@@ -8964,7 +8975,7 @@ declare const useClasses_53: (classesProp?: Partial<Record<"body" | "expanded" |
|
|
|
8964
8975
|
readonly cx: (...args: any) => string;
|
|
8965
8976
|
};
|
|
8966
8977
|
|
|
8967
|
-
declare const useClasses_54: (classesProp?: Partial<Record<"body" | "resizer" | "footer" | "head" | "root" | "resizable" | "sorted" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "variantNone" | "variantCheckbox" | "variantActions" | "variantExpand" | "variantList" | "stickyColumn" | "stickyColumnMostLeft" | "stickyColumnLeastRight" | "groupColumnMostLeft" | "groupColumnMostRight" | "resizing" | "
|
|
8978
|
+
declare const useClasses_54: (classesProp?: Partial<Record<"body" | "resizer" | "footer" | "head" | "root" | "resizable" | "headerContent" | "sorted" | "alignLeft" | "alignCenter" | "alignRight" | "alignJustify" | "variantNone" | "variantCheckbox" | "variantActions" | "variantExpand" | "variantList" | "stickyColumn" | "stickyColumnMostLeft" | "stickyColumnLeastRight" | "groupColumnMostLeft" | "groupColumnMostRight" | "resizing" | "headerText" | "headerParagraph" | "sortableHeaderText" | "sortable" | "sortButton" | "sortIcon" | "alignFlexLeft" | "alignFlexRight" | "alignFlexCenter" | "alignFlexJustify", string>>, addStatic?: boolean) => {
|
|
8968
8979
|
readonly classes: {
|
|
8969
8980
|
root: string;
|
|
8970
8981
|
head: string;
|
package/dist/themes/pentaho.js
CHANGED
|
@@ -60,7 +60,8 @@ const pentaho = mergeTheme(pentaho$1, {
|
|
|
60
60
|
Start: "M205.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L131.31,128ZM51.31,128l74.35-74.34a8,8,0,0,0-11.32-11.32l-80,80a8,8,0,0,0,0,11.32l80,80a8,8,0,0,0,11.32-11.32Z",
|
|
61
61
|
Backwards: "M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z",
|
|
62
62
|
Forwards: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z",
|
|
63
|
-
End: "M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z"
|
|
63
|
+
End: "M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z",
|
|
64
|
+
Filters: "M230.6,49.53A15.81,15.81,0,0,0,216,40H40A16,16,0,0,0,28.19,66.76l.08.09L96,139.17V216a16,16,0,0,0,24.87,13.32l32-21.34A16,16,0,0,0,160,194.66V139.17l67.74-72.32.08-.09A15.8,15.8,0,0,0,230.6,49.53ZM40,56h0Zm106.18,74.58A8,8,0,0,0,144,136v58.66L112,216V136a8,8,0,0,0-2.16-5.47L40,56H216Z"
|
|
64
65
|
},
|
|
65
66
|
components: {
|
|
66
67
|
HvAvatar: {
|
|
@@ -124,9 +125,20 @@ const pentaho = mergeTheme(pentaho$1, {
|
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
127
|
},
|
|
128
|
+
HvBulkActions: {
|
|
129
|
+
semantic: false,
|
|
130
|
+
classes: {
|
|
131
|
+
root: {
|
|
132
|
+
borderRadius: theme.radii.round,
|
|
133
|
+
padding: theme.space.xs
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
127
137
|
HvCallout: {
|
|
128
138
|
classes: {
|
|
129
|
-
root: {
|
|
139
|
+
root: {
|
|
140
|
+
outline: "1px solid var(--icolor, currentcolor)"
|
|
141
|
+
},
|
|
130
142
|
...Object.fromEntries(
|
|
131
143
|
Object.entries(notificationMap).map(([variant, color]) => [
|
|
132
144
|
variant,
|
|
@@ -1120,11 +1132,21 @@ const pentaho = mergeTheme(pentaho$1, {
|
|
|
1120
1132
|
HvSnackbarContent: {
|
|
1121
1133
|
classes: {
|
|
1122
1134
|
root: {
|
|
1135
|
+
width: 525,
|
|
1123
1136
|
minHeight: "unset"
|
|
1137
|
+
},
|
|
1138
|
+
messageText: {
|
|
1139
|
+
paddingLeft: 0
|
|
1140
|
+
},
|
|
1141
|
+
iconVariant: {
|
|
1142
|
+
alignSelf: "flex-start",
|
|
1143
|
+
margin: theme.space.xxs,
|
|
1144
|
+
marginRight: theme.space.sm
|
|
1124
1145
|
}
|
|
1125
1146
|
}
|
|
1126
1147
|
},
|
|
1127
1148
|
HvBreadCrumb: {
|
|
1149
|
+
maxVisible: 5,
|
|
1128
1150
|
classes: {
|
|
1129
1151
|
currentPage: {
|
|
1130
1152
|
fontWeight: theme.fontWeights.semibold,
|
package/dist/utils/Callout.js
CHANGED
|
@@ -78,6 +78,16 @@ const { useClasses } = createClasses("HvCallout", {
|
|
|
78
78
|
alignSelf: "flex-end"
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
+
const getIconSize = (size) => {
|
|
82
|
+
switch (size) {
|
|
83
|
+
case "large":
|
|
84
|
+
return "md";
|
|
85
|
+
case "toast":
|
|
86
|
+
return "xs";
|
|
87
|
+
default:
|
|
88
|
+
return "sm";
|
|
89
|
+
}
|
|
90
|
+
};
|
|
81
91
|
const HvCallout = forwardRef(function HvCallout2(props, ref) {
|
|
82
92
|
const {
|
|
83
93
|
id,
|
|
@@ -130,7 +140,7 @@ const HvCallout = forwardRef(function HvCallout2(props, ref) {
|
|
|
130
140
|
icon && /* @__PURE__ */ jsx(
|
|
131
141
|
HvStatusIcon,
|
|
132
142
|
{
|
|
133
|
-
size: size
|
|
143
|
+
size: getIconSize(size),
|
|
134
144
|
className: classes.messageIcon,
|
|
135
145
|
variant: variant === "default" ? "info" : variant,
|
|
136
146
|
customIcon
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"private": false,
|
|
6
6
|
"author": "Hitachi Vantara UI Kit Team",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"access": "public",
|
|
62
62
|
"directory": "package"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "0985fa0fa2f1fdff7a57fced4fcb1385544cb457",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/index.d.ts",
|