@hitachivantara/uikit-react-core 5.107.0 → 5.108.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.
@@ -2,18 +2,14 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
4
  const uikitStyles = require("@hitachivantara/uikit-styles");
5
- const Button_styles = require("../../Button/Button.styles.cjs");
6
- require("../../Button/Button.cjs");
7
5
  const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvHeader-Actions", {
8
6
  root: {
9
7
  backgroundColor: "transparent",
10
8
  display: "flex",
11
9
  gap: uikitStyles.theme.space.xs,
12
10
  alignItems: "center",
13
- marginLeft: "auto",
14
- [`& .${Button_styles.staticClasses?.root}`]: {
15
- "&:hover": { backgroundColor: uikitStyles.theme.colors.bgHover }
16
- }
11
+ justifyContent: "flex-end",
12
+ marginLeft: "auto"
17
13
  }
18
14
  });
19
15
  exports.staticClasses = staticClasses;
@@ -26,6 +26,7 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvHeader",
26
26
  }
27
27
  },
28
28
  fixed: { position: "fixed", top: 0, left: "auto", right: 0 },
29
+ /** @deprecated use `classes.root` instead */
29
30
  backgroundColor: {}
30
31
  });
31
32
  exports.staticClasses = staticClasses;
@@ -6,7 +6,6 @@ const reactResizeDetector = require("react-resize-detector");
6
6
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
7
7
  const OverflowTooltip_styles = require("./OverflowTooltip.styles.cjs");
8
8
  const Tooltip = require("../Tooltip/Tooltip.cjs");
9
- const Typography = require("../Typography/Typography.cjs");
10
9
  const isParagraph = (children = "") => /\s/.test(children);
11
10
  const HvOverflowTooltip = (props) => {
12
11
  const {
@@ -75,7 +74,8 @@ const HvOverflowTooltip = (props) => {
75
74
  disableHoverListener: !isOverflowing,
76
75
  open,
77
76
  placement,
78
- title: /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { className: classes.tooltipData, variant: "body", children: data }),
77
+ classes: { tooltip: classes.tooltipData },
78
+ title: data,
79
79
  "aria-label": null,
80
80
  "aria-labelledby": null,
81
81
  ...tooltipsProps,
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
4
- const uikitStyles = require("@hitachivantara/uikit-styles");
5
4
  const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvSearchInput", {
6
- root: { paddingLeft: uikitStyles.theme.space.xs },
5
+ root: {},
7
6
  input: { marginLeft: 0 }
8
7
  });
9
8
  exports.staticClasses = staticClasses;
@@ -16,37 +16,32 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvStatusIco
16
16
  lineHeight: 0,
17
17
  flexShrink: 0,
18
18
  padding: uikitStyles.theme.space.xxs,
19
+ borderRadius: uikitStyles.theme.radii.base,
19
20
  "--icsize": "auto",
20
- [`&[data-size=xs]`]: { borderRadius: uikitStyles.theme.radii.base },
21
- [`&[data-size=sm]`]: { borderRadius: uikitStyles.theme.radii.base },
22
- [`&[data-size=md]`]: { borderRadius: uikitStyles.theme.radii.round },
23
- [`&[data-size=lg]`]: { borderRadius: uikitStyles.theme.radii.large },
24
- [`&[data-size=xl]`]: { borderRadius: uikitStyles.theme.radii.large },
25
- [`:not([data-type="simple"])`]: {
21
+ ":where([data-size=md])": { borderRadius: uikitStyles.theme.radii.round },
22
+ ":where([data-size=lg])": { borderRadius: uikitStyles.theme.radii.large },
23
+ ":where([data-size=xl])": { borderRadius: uikitStyles.theme.radii.large },
24
+ ":where([data-type=full])": {
26
25
  outline: "1px solid currentcolor"
27
26
  },
28
27
  ...Object.fromEntries(
29
28
  Object.entries(notificationMap).map(([variant, color]) => [
30
- [`&[data-variant="${variant}"]`],
29
+ [`:where([data-variant=${variant}])`],
31
30
  {
32
31
  color: uikitStyles.theme.colors[color],
33
32
  outline: `1px solid ${uikitStyles.theme.colors[`${color}Border`]}`,
34
33
  backgroundColor: uikitStyles.theme.colors[`${color}Dimmed`],
35
- [`&[data-type="simple"]`]: {
34
+ ":where([data-type=simple])": {
36
35
  outline: "none",
37
36
  backgroundColor: "transparent"
38
37
  }
39
38
  }
40
39
  ])
41
40
  ),
42
- [`&[data-variant="default"]`]: {
41
+ ":where([data-variant=default][data-type=full])": {
43
42
  color: uikitStyles.theme.colors.text,
44
43
  backgroundColor: uikitStyles.theme.colors.bgPage,
45
- outline: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
46
- [`&[data-type="simple"]`]: {
47
- outline: "none",
48
- backgroundColor: "transparent"
49
- }
44
+ outline: `1px solid ${uikitStyles.theme.colors.borderSubtle}`
50
45
  }
51
46
  },
52
47
  icon: {
@@ -26,7 +26,7 @@ const HvTooltip = React.forwardRef(function HvTooltip2(props, ref) {
26
26
  ...others
27
27
  } = uikitReactUtils.useDefaultProps("HvTooltip", props);
28
28
  const { rootId } = uikitReactUtils.useTheme();
29
- const { classes } = Tooltip_styles.useClasses(classesProp);
29
+ const { classes, cx } = Tooltip_styles.useClasses(classesProp);
30
30
  const [container, setContainer] = React.useState(
31
31
  () => document.getElementById(containerId ?? rootId)
32
32
  );
@@ -44,7 +44,7 @@ const HvTooltip = React.forwardRef(function HvTooltip2(props, ref) {
44
44
  TransitionProps,
45
45
  className,
46
46
  classes: {
47
- tooltip: useSingle ? classes.tooltip : classes.tooltipMulti,
47
+ tooltip: cx(classes.tooltip, !useSingle && classes.tooltipMulti),
48
48
  popper: classes.popper
49
49
  },
50
50
  title,
@@ -5,17 +5,19 @@ const uikitReactUtils = require("@hitachivantara/uikit-react-utils");
5
5
  const uikitStyles = require("@hitachivantara/uikit-styles");
6
6
  const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTooltip", {
7
7
  root: {},
8
- tooltip: {},
8
+ tooltip: {
9
+ ...uikitStyles.theme.typography.body,
10
+ display: "flex",
11
+ width: "fit-content",
12
+ maxWidth: 532,
13
+ backgroundColor: uikitStyles.theme.colors.bgContainer,
14
+ boxShadow: uikitStyles.theme.colors.shadow,
15
+ padding: uikitStyles.theme.space.sm,
16
+ borderRadius: uikitStyles.theme.radii.round
17
+ },
9
18
  popper: {
10
- // TODO: move this to `tooltip` in v6 and make class always be applied
19
+ // TODO: remove these overrides in v6
11
20
  [`& .${Tooltip.tooltipClasses.tooltip}`]: {
12
- ...uikitStyles.theme.typography.body,
13
- display: "flex",
14
- width: "fit-content",
15
- maxWidth: 532,
16
- backgroundColor: uikitStyles.theme.colors.bgContainer,
17
- boxShadow: uikitStyles.theme.colors.shadow,
18
- padding: 0,
19
21
  "& p": {
20
22
  display: "-webkit-box",
21
23
  width: "fit-content",
@@ -52,8 +54,6 @@ const { staticClasses, useClasses } = uikitReactUtils.createClasses("HvTooltip",
52
54
  padding: uikitStyles.theme.space.sm
53
55
  },
54
56
  "& $tooltip": {
55
- padding: uikitStyles.theme.space.sm,
56
- borderRadius: uikitStyles.theme.radii.round,
57
57
  "& p": {
58
58
  wordBreak: "break-word"
59
59
  }
@@ -15,6 +15,7 @@ const inputColors = {
15
15
  bg: ld("#FFFFFF", "#020617")
16
16
  };
17
17
  const popperStyles = {
18
+ margin: uikitStyles.theme.spacing("xxs", 0),
18
19
  backgroundColor: uikitStyles.theme.colors.bgContainer,
19
20
  border: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
20
21
  borderRadius: uikitStyles.theme.radii.large,
@@ -863,6 +864,13 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
863
864
  borderRadius: uikitStyles.theme.radii.none
864
865
  }
865
866
  }
867
+ },
868
+ HvTooltip: {
869
+ classes: {
870
+ tooltip: {
871
+ padding: uikitStyles.theme.spacing("xs", "sm")
872
+ }
873
+ }
866
874
  }
867
875
  }
868
876
  });
@@ -1,17 +1,13 @@
1
1
  import { createClasses } from "@hitachivantara/uikit-react-utils";
2
2
  import { theme } from "@hitachivantara/uikit-styles";
3
- import { staticClasses as staticClasses$1 } from "../../Button/Button.styles.js";
4
- import "../../Button/Button.js";
5
3
  const { staticClasses, useClasses } = createClasses("HvHeader-Actions", {
6
4
  root: {
7
5
  backgroundColor: "transparent",
8
6
  display: "flex",
9
7
  gap: theme.space.xs,
10
8
  alignItems: "center",
11
- marginLeft: "auto",
12
- [`& .${staticClasses$1?.root}`]: {
13
- "&:hover": { backgroundColor: theme.colors.bgHover }
14
- }
9
+ justifyContent: "flex-end",
10
+ marginLeft: "auto"
15
11
  }
16
12
  });
17
13
  export {
@@ -24,6 +24,7 @@ const { staticClasses, useClasses } = createClasses("HvHeader", {
24
24
  }
25
25
  },
26
26
  fixed: { position: "fixed", top: 0, left: "auto", right: 0 },
27
+ /** @deprecated use `classes.root` instead */
27
28
  backgroundColor: {}
28
29
  });
29
30
  export {
@@ -5,7 +5,6 @@ import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
5
5
  import { useClasses } from "./OverflowTooltip.styles.js";
6
6
  import { staticClasses } from "./OverflowTooltip.styles.js";
7
7
  import { HvTooltip } from "../Tooltip/Tooltip.js";
8
- import { HvTypography } from "../Typography/Typography.js";
9
8
  const isParagraph = (children = "") => /\s/.test(children);
10
9
  const HvOverflowTooltip = (props) => {
11
10
  const {
@@ -74,7 +73,8 @@ const HvOverflowTooltip = (props) => {
74
73
  disableHoverListener: !isOverflowing,
75
74
  open,
76
75
  placement,
77
- title: /* @__PURE__ */ jsx(HvTypography, { className: classes.tooltipData, variant: "body", children: data }),
76
+ classes: { tooltip: classes.tooltipData },
77
+ title: data,
78
78
  "aria-label": null,
79
79
  "aria-labelledby": null,
80
80
  ...tooltipsProps,
@@ -1,7 +1,6 @@
1
1
  import { createClasses } from "@hitachivantara/uikit-react-utils";
2
- import { theme } from "@hitachivantara/uikit-styles";
3
2
  const { staticClasses, useClasses } = createClasses("HvSearchInput", {
4
- root: { paddingLeft: theme.space.xs },
3
+ root: {},
5
4
  input: { marginLeft: 0 }
6
5
  });
7
6
  export {
@@ -14,37 +14,32 @@ const { staticClasses, useClasses } = createClasses("HvStatusIcon", {
14
14
  lineHeight: 0,
15
15
  flexShrink: 0,
16
16
  padding: theme.space.xxs,
17
+ borderRadius: theme.radii.base,
17
18
  "--icsize": "auto",
18
- [`&[data-size=xs]`]: { borderRadius: theme.radii.base },
19
- [`&[data-size=sm]`]: { borderRadius: theme.radii.base },
20
- [`&[data-size=md]`]: { borderRadius: theme.radii.round },
21
- [`&[data-size=lg]`]: { borderRadius: theme.radii.large },
22
- [`&[data-size=xl]`]: { borderRadius: theme.radii.large },
23
- [`:not([data-type="simple"])`]: {
19
+ ":where([data-size=md])": { borderRadius: theme.radii.round },
20
+ ":where([data-size=lg])": { borderRadius: theme.radii.large },
21
+ ":where([data-size=xl])": { borderRadius: theme.radii.large },
22
+ ":where([data-type=full])": {
24
23
  outline: "1px solid currentcolor"
25
24
  },
26
25
  ...Object.fromEntries(
27
26
  Object.entries(notificationMap).map(([variant, color]) => [
28
- [`&[data-variant="${variant}"]`],
27
+ [`:where([data-variant=${variant}])`],
29
28
  {
30
29
  color: theme.colors[color],
31
30
  outline: `1px solid ${theme.colors[`${color}Border`]}`,
32
31
  backgroundColor: theme.colors[`${color}Dimmed`],
33
- [`&[data-type="simple"]`]: {
32
+ ":where([data-type=simple])": {
34
33
  outline: "none",
35
34
  backgroundColor: "transparent"
36
35
  }
37
36
  }
38
37
  ])
39
38
  ),
40
- [`&[data-variant="default"]`]: {
39
+ ":where([data-variant=default][data-type=full])": {
41
40
  color: theme.colors.text,
42
41
  backgroundColor: theme.colors.bgPage,
43
- outline: `1px solid ${theme.colors.borderSubtle}`,
44
- [`&[data-type="simple"]`]: {
45
- outline: "none",
46
- backgroundColor: "transparent"
47
- }
42
+ outline: `1px solid ${theme.colors.borderSubtle}`
48
43
  }
49
44
  },
50
45
  icon: {
@@ -22,7 +22,7 @@ const HvTooltip = forwardRef(function HvTooltip2(props, ref) {
22
22
  ...others
23
23
  } = useDefaultProps("HvTooltip", props);
24
24
  const { rootId } = useTheme();
25
- const { classes } = useClasses(classesProp);
25
+ const { classes, cx } = useClasses(classesProp);
26
26
  const [container, setContainer] = useState(
27
27
  () => getElementById(containerId ?? rootId)
28
28
  );
@@ -40,7 +40,7 @@ const HvTooltip = forwardRef(function HvTooltip2(props, ref) {
40
40
  TransitionProps,
41
41
  className,
42
42
  classes: {
43
- tooltip: useSingle ? classes.tooltip : classes.tooltipMulti,
43
+ tooltip: cx(classes.tooltip, !useSingle && classes.tooltipMulti),
44
44
  popper: classes.popper
45
45
  },
46
46
  title,
@@ -3,17 +3,19 @@ import { createClasses } from "@hitachivantara/uikit-react-utils";
3
3
  import { theme } from "@hitachivantara/uikit-styles";
4
4
  const { staticClasses, useClasses } = createClasses("HvTooltip", {
5
5
  root: {},
6
- tooltip: {},
6
+ tooltip: {
7
+ ...theme.typography.body,
8
+ display: "flex",
9
+ width: "fit-content",
10
+ maxWidth: 532,
11
+ backgroundColor: theme.colors.bgContainer,
12
+ boxShadow: theme.colors.shadow,
13
+ padding: theme.space.sm,
14
+ borderRadius: theme.radii.round
15
+ },
7
16
  popper: {
8
- // TODO: move this to `tooltip` in v6 and make class always be applied
17
+ // TODO: remove these overrides in v6
9
18
  [`& .${tooltipClasses.tooltip}`]: {
10
- ...theme.typography.body,
11
- display: "flex",
12
- width: "fit-content",
13
- maxWidth: 532,
14
- backgroundColor: theme.colors.bgContainer,
15
- boxShadow: theme.colors.shadow,
16
- padding: 0,
17
19
  "& p": {
18
20
  display: "-webkit-box",
19
21
  width: "fit-content",
@@ -50,8 +52,6 @@ const { staticClasses, useClasses } = createClasses("HvTooltip", {
50
52
  padding: theme.space.sm
51
53
  },
52
54
  "& $tooltip": {
53
- padding: theme.space.sm,
54
- borderRadius: theme.radii.round,
55
55
  "& p": {
56
56
  wordBreak: "break-word"
57
57
  }
@@ -13,6 +13,7 @@ const inputColors = {
13
13
  bg: ld("#FFFFFF", "#020617")
14
14
  };
15
15
  const popperStyles = {
16
+ margin: theme.spacing("xxs", 0),
16
17
  backgroundColor: theme.colors.bgContainer,
17
18
  border: `1px solid ${theme.colors.borderSubtle}`,
18
19
  borderRadius: theme.radii.large,
@@ -861,6 +862,13 @@ const pentahoPlus = mergeTheme(pentahoPlus$1, {
861
862
  borderRadius: theme.radii.none
862
863
  }
863
864
  }
865
+ },
866
+ HvTooltip: {
867
+ classes: {
868
+ tooltip: {
869
+ padding: theme.spacing("xs", "sm")
870
+ }
871
+ }
864
872
  }
865
873
  }
866
874
  });
@@ -1078,7 +1078,7 @@ export declare interface HvAccordionProps extends HvBaseProps<HTMLDivElement, "o
1078
1078
  /** Content to be rendered. */
1079
1079
  children: React.ReactNode;
1080
1080
  /** The accordion label button. */
1081
- label?: string;
1081
+ label?: React.ReactNode;
1082
1082
  /** The function that will be executed whenever the accordion toggles. It will receive the state of the accordion. */
1083
1083
  onChange?: (event: React.SyntheticEvent, value: boolean) => void;
1084
1084
  /** Whether the accordion is open or not. If this property is defined the accordion must be fully controlled. */
@@ -1437,7 +1437,7 @@ export declare interface HvBannerProps extends Omit<SnackbarProps, "anchorOrigin
1437
1437
  * */
1438
1438
  onClose?: (event: React.MouseEvent<HTMLButtonElement>) => void;
1439
1439
  /** The message to display. */
1440
- label?: string;
1440
+ label?: React.ReactNode;
1441
1441
  /** The anchor of the Snackbar. */
1442
1442
  anchorOrigin?: "top" | "bottom";
1443
1443
  /** Variant of the snackbar. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.107.0",
3
+ "version": "5.108.1",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "UI Kit Core React components.",
@@ -61,7 +61,7 @@
61
61
  "access": "public",
62
62
  "directory": "package"
63
63
  },
64
- "gitHead": "e34acd74656ecb0ad2c31d6afaed30a00d58a8ca",
64
+ "gitHead": "56ce37eb93012ec3cfc42d95912896cad5a912c3",
65
65
  "exports": {
66
66
  ".": {
67
67
  "types": "./dist/types/index.d.ts",