@hitachivantara/uikit-react-core 6.4.0 → 6.4.1
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/Dialog/Content/Content.js +16 -25
- package/dist/Dialog/Content/Content.styles.js +1 -3
- package/dist/Dialog/Dialog.styles.js +1 -1
- package/dist/FilterGroup/FilterContent/FilterContent.js +22 -20
- package/dist/FilterGroup/FilterContent/FilterContent.styles.js +5 -3
- package/dist/index.d.ts +3 -2
- package/dist/themes/pentaho.js +7 -0
- package/package.json +2 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { useResizeDetector } from "react-resize-detector";
|
|
3
4
|
import MuiDialogContent from "@mui/material/DialogContent";
|
|
4
|
-
import { useDefaultProps
|
|
5
|
+
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
5
6
|
import { useClasses } from "./Content.styles.js";
|
|
6
7
|
import { staticClasses } from "./Content.styles.js";
|
|
7
8
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
@@ -10,44 +11,34 @@ const HvDialogContent = (props) => {
|
|
|
10
11
|
classes: classesProp,
|
|
11
12
|
className,
|
|
12
13
|
children,
|
|
13
|
-
indentContent
|
|
14
|
-
|
|
14
|
+
indentContent,
|
|
15
|
+
dividers,
|
|
15
16
|
...others
|
|
16
17
|
} = useDefaultProps("HvDialogContent", props);
|
|
17
18
|
const { classes, cx } = useClasses(classesProp);
|
|
18
19
|
const [hasBorder, setHasBorder] = useState(false);
|
|
19
|
-
const elRef =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
29
|
-
if (elRef.current) {
|
|
30
|
-
resizeObserver.observe(elRef.current);
|
|
31
|
-
}
|
|
32
|
-
return () => {
|
|
33
|
-
resizeObserver.disconnect();
|
|
34
|
-
};
|
|
20
|
+
const { ref: elRef } = useResizeDetector({
|
|
21
|
+
refreshMode: "throttle",
|
|
22
|
+
refreshRate: 100,
|
|
23
|
+
handleWidth: false,
|
|
24
|
+
disableRerender: true,
|
|
25
|
+
onResize: ({ entry }) => {
|
|
26
|
+
if (!entry) return;
|
|
27
|
+
const hasOverflow = entry.target.scrollHeight > entry.target.clientHeight;
|
|
28
|
+
setHasBorder(hasOverflow);
|
|
35
29
|
}
|
|
36
|
-
|
|
37
|
-
}, []);
|
|
30
|
+
});
|
|
38
31
|
return /* @__PURE__ */ jsx(
|
|
39
32
|
HvTypography,
|
|
40
33
|
{
|
|
41
34
|
ref: elRef,
|
|
42
35
|
component: MuiDialogContent,
|
|
36
|
+
dividers: dividers ?? hasBorder,
|
|
43
37
|
className: cx(
|
|
44
38
|
classes.root,
|
|
45
39
|
{ [classes.textContent]: !!indentContent },
|
|
46
40
|
className
|
|
47
41
|
),
|
|
48
|
-
style: mergeStyles(style, {
|
|
49
|
-
"--borderW": hasBorder ? "1px" : "0px"
|
|
50
|
-
}),
|
|
51
42
|
...others,
|
|
52
43
|
children
|
|
53
44
|
}
|
|
@@ -3,9 +3,7 @@ import { theme } from "@hitachivantara/uikit-styles";
|
|
|
3
3
|
const { staticClasses, useClasses } = createClasses("HvDialogContent", {
|
|
4
4
|
root: {
|
|
5
5
|
padding: theme.spacing(0, "sm", "sm"),
|
|
6
|
-
borderColor: theme.colors.borderSubtle
|
|
7
|
-
borderTopWidth: "var(--borderW)",
|
|
8
|
-
borderBottomWidth: "var(--borderW)"
|
|
6
|
+
borderColor: theme.colors.borderSubtle
|
|
9
7
|
},
|
|
10
8
|
textContent: {
|
|
11
9
|
paddingLeft: `calc(42px + ${theme.space.sm})`,
|
|
@@ -7,7 +7,7 @@ const { staticClasses, useClasses } = createClasses("HvDialog", {
|
|
|
7
7
|
},
|
|
8
8
|
paper: {
|
|
9
9
|
color: theme.colors.text,
|
|
10
|
-
|
|
10
|
+
background: theme.colors.bgContainer,
|
|
11
11
|
boxShadow: theme.colors.shadow,
|
|
12
12
|
borderColor: theme.colors.border,
|
|
13
13
|
borderRadius: theme.radii.round
|
|
@@ -140,26 +140,28 @@ const HvFilterGroupContent = forwardRef(function HvFilterGroupContent2(props, re
|
|
|
140
140
|
}
|
|
141
141
|
),
|
|
142
142
|
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: classes.space, children: " " }),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
143
|
+
/* @__PURE__ */ jsxs("div", { className: classes.actions, children: [
|
|
144
|
+
/* @__PURE__ */ jsx(
|
|
145
|
+
HvButton,
|
|
146
|
+
{
|
|
147
|
+
id: setId(id, "apply-button"),
|
|
148
|
+
disabled: applyDisabled,
|
|
149
|
+
variant: "primary",
|
|
150
|
+
onClick: onApplyHandler,
|
|
151
|
+
className: classes.applyButton,
|
|
152
|
+
children: labels?.applyLabel
|
|
153
|
+
}
|
|
154
|
+
),
|
|
155
|
+
/* @__PURE__ */ jsx(
|
|
156
|
+
HvButton,
|
|
157
|
+
{
|
|
158
|
+
id: setId(id, "cancel-button"),
|
|
159
|
+
variant: "secondarySubtle",
|
|
160
|
+
onClick: onCancelHandler,
|
|
161
|
+
children: labels?.cancelLabel
|
|
162
|
+
}
|
|
163
|
+
)
|
|
164
|
+
] })
|
|
163
165
|
] })
|
|
164
166
|
]
|
|
165
167
|
}
|
|
@@ -40,12 +40,14 @@ const { staticClasses, useClasses } = createClasses(name, {
|
|
|
40
40
|
minHeight: "calc(370px - 75px)"
|
|
41
41
|
},
|
|
42
42
|
actionBar: {},
|
|
43
|
+
actions: {
|
|
44
|
+
display: "flex",
|
|
45
|
+
gap: theme.space.xs
|
|
46
|
+
},
|
|
43
47
|
space: {
|
|
44
48
|
flex: 1
|
|
45
49
|
},
|
|
46
|
-
applyButton: {
|
|
47
|
-
marginRight: "8px"
|
|
48
|
-
}
|
|
50
|
+
applyButton: {}
|
|
49
51
|
});
|
|
50
52
|
export {
|
|
51
53
|
staticClasses,
|
package/dist/index.d.ts
CHANGED
|
@@ -8209,7 +8209,7 @@ declare const useClasses_127: (classesProp?: Partial<Record<"action" | "minimize
|
|
|
8209
8209
|
readonly cx: (...args: any) => string;
|
|
8210
8210
|
};
|
|
8211
8211
|
|
|
8212
|
-
declare const useClasses_128: (classesProp?: Partial<Record<"list" | "popup" | "root" | "
|
|
8212
|
+
declare const useClasses_128: (classesProp?: Partial<Record<"list" | "popup" | "root" | "listItem" | "collapsed" | "navigationPopup", string>>, addStatic?: boolean) => {
|
|
8213
8213
|
readonly classes: {
|
|
8214
8214
|
root: string;
|
|
8215
8215
|
list: string;
|
|
@@ -9293,7 +9293,7 @@ declare const useClasses_74: (classesProp?: Partial<Record<"label" | "error" | "
|
|
|
9293
9293
|
readonly cx: (...args: any) => string;
|
|
9294
9294
|
};
|
|
9295
9295
|
|
|
9296
|
-
declare const useClasses_75: (classesProp?: Partial<Record<"dropdown" | "space" | "header" | "root" | "panel" | "baseDropdownSelection" | "rightSidePanel" | "leftSidePanel" | "actionBar" | "applyButton", string>>, addStatic?: boolean) => {
|
|
9296
|
+
declare const useClasses_75: (classesProp?: Partial<Record<"dropdown" | "space" | "header" | "root" | "panel" | "actions" | "baseDropdownSelection" | "rightSidePanel" | "leftSidePanel" | "actionBar" | "applyButton", string>>, addStatic?: boolean) => {
|
|
9297
9297
|
readonly classes: {
|
|
9298
9298
|
dropdown: string;
|
|
9299
9299
|
panel: string;
|
|
@@ -9303,6 +9303,7 @@ declare const useClasses_75: (classesProp?: Partial<Record<"dropdown" | "space"
|
|
|
9303
9303
|
rightSidePanel: string;
|
|
9304
9304
|
leftSidePanel: string;
|
|
9305
9305
|
actionBar: string;
|
|
9306
|
+
actions: string;
|
|
9306
9307
|
space: string;
|
|
9307
9308
|
applyButton: string;
|
|
9308
9309
|
};
|
package/dist/themes/pentaho.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.1",
|
|
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": "5dc28acf7238a5b194609f7e671b618fe7f0b0bc",
|
|
65
65
|
"exports": {
|
|
66
66
|
".": {
|
|
67
67
|
"types": "./dist/index.d.ts",
|