@hitachivantara/uikit-react-core 5.36.5 → 5.36.6
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/AppSwitcher/Action/Action.cjs +4 -2
- package/dist/cjs/components/AppSwitcher/Action/Action.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/Action/Action.styles.cjs +6 -8
- package/dist/cjs/components/AppSwitcher/Action/Action.styles.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/AppSwitcher.cjs +4 -2
- package/dist/cjs/components/AppSwitcher/AppSwitcher.cjs.map +1 -1
- package/dist/cjs/components/AppSwitcher/AppSwitcher.styles.cjs +4 -3
- package/dist/cjs/components/AppSwitcher/AppSwitcher.styles.cjs.map +1 -1
- package/dist/cjs/components/BreadCrumb/Page/Page.cjs +1 -1
- package/dist/cjs/components/Button/Button.cjs +0 -3
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/Calendar/utils.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +2 -5
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Dropdown/Dropdown.cjs +0 -3
- package/dist/cjs/components/Dropdown/Dropdown.cjs.map +1 -1
- package/dist/cjs/components/OverflowTooltip/OverflowTooltip.cjs +9 -2
- package/dist/cjs/components/OverflowTooltip/OverflowTooltip.cjs.map +1 -1
- package/dist/cjs/components/OverflowTooltip/OverflowTooltip.styles.cjs +2 -2
- package/dist/cjs/components/OverflowTooltip/OverflowTooltip.styles.cjs.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs +2 -1
- package/dist/cjs/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/cjs/components/TreeView/internals/DescendantProvider.cjs +0 -3
- package/dist/cjs/components/TreeView/internals/DescendantProvider.cjs.map +1 -1
- package/dist/cjs/components/TreeView/internals/TreeViewProvider.cjs +0 -3
- package/dist/cjs/components/TreeView/internals/TreeViewProvider.cjs.map +1 -1
- package/dist/cjs/components/Typography/utils.cjs +3 -13
- package/dist/cjs/components/Typography/utils.cjs.map +1 -1
- package/dist/cjs/components/VerticalNavigation/TreeView/descendants.cjs +0 -3
- package/dist/cjs/components/VerticalNavigation/TreeView/descendants.cjs.map +1 -1
- package/dist/cjs/hooks/useControlled.cjs +0 -3
- package/dist/cjs/hooks/useControlled.cjs.map +1 -1
- package/dist/cjs/providers/Provider.cjs +3 -2
- package/dist/cjs/providers/Provider.cjs.map +1 -1
- package/dist/cjs/utils/document.cjs +11 -0
- package/dist/cjs/utils/document.cjs.map +1 -0
- package/dist/cjs/utils/theme.cjs +5 -7
- package/dist/cjs/utils/theme.cjs.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.js +4 -2
- package/dist/esm/components/AppSwitcher/Action/Action.js.map +1 -1
- package/dist/esm/components/AppSwitcher/Action/Action.styles.js +6 -8
- package/dist/esm/components/AppSwitcher/Action/Action.styles.js.map +1 -1
- package/dist/esm/components/AppSwitcher/AppSwitcher.js +4 -2
- package/dist/esm/components/AppSwitcher/AppSwitcher.js.map +1 -1
- package/dist/esm/components/AppSwitcher/AppSwitcher.styles.js +4 -3
- package/dist/esm/components/AppSwitcher/AppSwitcher.styles.js.map +1 -1
- package/dist/esm/components/BreadCrumb/Page/Page.js +1 -1
- package/dist/esm/components/Button/Button.js +0 -3
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Calendar/utils.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +2 -5
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +0 -3
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/OverflowTooltip/OverflowTooltip.js +9 -2
- package/dist/esm/components/OverflowTooltip/OverflowTooltip.js.map +1 -1
- package/dist/esm/components/OverflowTooltip/OverflowTooltip.styles.js +2 -2
- package/dist/esm/components/OverflowTooltip/OverflowTooltip.styles.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +2 -1
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/TreeView/internals/DescendantProvider.js +0 -3
- package/dist/esm/components/TreeView/internals/DescendantProvider.js.map +1 -1
- package/dist/esm/components/TreeView/internals/TreeViewProvider.js +0 -3
- package/dist/esm/components/TreeView/internals/TreeViewProvider.js.map +1 -1
- package/dist/esm/components/Typography/utils.js +3 -13
- package/dist/esm/components/Typography/utils.js.map +1 -1
- package/dist/esm/components/VerticalNavigation/TreeView/descendants.js +0 -3
- package/dist/esm/components/VerticalNavigation/TreeView/descendants.js.map +1 -1
- package/dist/esm/hooks/useControlled.js +0 -3
- package/dist/esm/hooks/useControlled.js.map +1 -1
- package/dist/esm/providers/Provider.js +4 -3
- package/dist/esm/providers/Provider.js.map +1 -1
- package/dist/esm/utils/document.js +11 -0
- package/dist/esm/utils/document.js.map +1 -0
- package/dist/esm/utils/theme.js +5 -7
- package/dist/esm/utils/theme.js.map +1 -1
- package/dist/types/index.d.ts +7 -3
- package/package.json +2 -2
- package/dist/cjs/components/AppSwitcher/TitleWithTooltip.cjs +0 -22
- package/dist/cjs/components/AppSwitcher/TitleWithTooltip.cjs.map +0 -1
- package/dist/esm/components/AppSwitcher/TitleWithTooltip.js +0 -22
- package/dist/esm/components/AppSwitcher/TitleWithTooltip.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -213,6 +213,7 @@ export declare const appSwitcherActionClasses: {
|
|
|
213
213
|
selected: "HvAppSwitcher-Action-selected";
|
|
214
214
|
iconUrl: "HvAppSwitcher-Action-iconUrl";
|
|
215
215
|
iconInfo: "HvAppSwitcher-Action-iconInfo";
|
|
216
|
+
titleAnchor: "HvAppSwitcher-Action-titleAnchor";
|
|
216
217
|
};
|
|
217
218
|
|
|
218
219
|
export declare const appSwitcherClasses: {
|
|
@@ -222,6 +223,7 @@ export declare const appSwitcherClasses: {
|
|
|
222
223
|
actionsContainer: "HvAppSwitcher-actionsContainer";
|
|
223
224
|
open: "HvAppSwitcher-open";
|
|
224
225
|
item: "HvAppSwitcher-item";
|
|
226
|
+
titleAnchor: "HvAppSwitcher-titleAnchor";
|
|
225
227
|
itemSelected: "HvAppSwitcher-itemSelected";
|
|
226
228
|
itemDisabled: "HvAppSwitcher-itemDisabled";
|
|
227
229
|
itemTrigger: "HvAppSwitcher-itemTrigger";
|
|
@@ -4537,7 +4539,7 @@ export declare interface HvOverflowTooltipProps extends HvBaseProps {
|
|
|
4537
4539
|
data: React.ReactNode;
|
|
4538
4540
|
/** If true, the tooltip is shown. */
|
|
4539
4541
|
open?: boolean;
|
|
4540
|
-
/** If `true
|
|
4542
|
+
/** If `true`, the overflow tooltip will always use the paragraph overflow style. */
|
|
4541
4543
|
paragraphOverflow?: boolean;
|
|
4542
4544
|
/** Tooltip placement. */
|
|
4543
4545
|
placement?: "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top-start" | "top";
|
|
@@ -9390,7 +9392,7 @@ declare const useClasses_53: (classesProp?: Partial<Record<"root" | "disabled" |
|
|
|
9390
9392
|
cx: (...args: any) => string;
|
|
9391
9393
|
};
|
|
9392
9394
|
|
|
9393
|
-
declare const useClasses_54: (classesProp?: Partial<Record<"root" | "title" | "single" | "actionsContainer" | "open" | "item" | "itemSelected" | "itemDisabled" | "itemTrigger" | "itemIcon" | "itemTitle" | "itemInfoIcon" | "footerContainer" | "closed" | "dual" | "fluid", string>>, addStatic?: boolean) => {
|
|
9395
|
+
declare const useClasses_54: (classesProp?: Partial<Record<"root" | "title" | "single" | "actionsContainer" | "open" | "item" | "titleAnchor" | "itemSelected" | "itemDisabled" | "itemTrigger" | "itemIcon" | "itemTitle" | "itemInfoIcon" | "footerContainer" | "closed" | "dual" | "fluid", string>>, addStatic?: boolean) => {
|
|
9394
9396
|
classes: {
|
|
9395
9397
|
root: string;
|
|
9396
9398
|
title: string;
|
|
@@ -9398,6 +9400,7 @@ declare const useClasses_54: (classesProp?: Partial<Record<"root" | "title" | "s
|
|
|
9398
9400
|
actionsContainer: string;
|
|
9399
9401
|
open: string;
|
|
9400
9402
|
item: string;
|
|
9403
|
+
titleAnchor: string;
|
|
9401
9404
|
itemSelected: string;
|
|
9402
9405
|
itemDisabled: string;
|
|
9403
9406
|
itemTrigger: string;
|
|
@@ -9416,7 +9419,7 @@ declare const useClasses_54: (classesProp?: Partial<Record<"root" | "title" | "s
|
|
|
9416
9419
|
cx: (...args: any) => string;
|
|
9417
9420
|
};
|
|
9418
9421
|
|
|
9419
|
-
declare const useClasses_55: (classesProp?: Partial<Record<"typography" | "root" | "disabled" | "icon" | "title" | "selected" | "iconUrl" | "iconInfo", string>>, addStatic?: boolean) => {
|
|
9422
|
+
declare const useClasses_55: (classesProp?: Partial<Record<"typography" | "root" | "disabled" | "icon" | "title" | "selected" | "iconUrl" | "iconInfo" | "titleAnchor", string>>, addStatic?: boolean) => {
|
|
9420
9423
|
classes: {
|
|
9421
9424
|
typography: string;
|
|
9422
9425
|
root: string;
|
|
@@ -9426,6 +9429,7 @@ declare const useClasses_55: (classesProp?: Partial<Record<"typography" | "root"
|
|
|
9426
9429
|
selected: string;
|
|
9427
9430
|
iconUrl: string;
|
|
9428
9431
|
iconInfo: string;
|
|
9432
|
+
titleAnchor: string;
|
|
9429
9433
|
};
|
|
9430
9434
|
css: {
|
|
9431
9435
|
(template: TemplateStringsArray, ...args: CSSInterpolation[]): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-core",
|
|
3
|
-
"version": "5.36.
|
|
3
|
+
"version": "5.36.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Hitachi Vantara UI Kit Team",
|
|
6
6
|
"description": "Core React components for the NEXT Design System.",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"access": "public",
|
|
65
65
|
"directory": "package"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "49bd36118748f723caf1236cf4b0223a0d24986c",
|
|
68
68
|
"main": "dist/cjs/index.cjs",
|
|
69
69
|
"exports": {
|
|
70
70
|
".": {
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
4
|
-
const React = require("react");
|
|
5
|
-
const Tooltip = require("../Tooltip/Tooltip.cjs");
|
|
6
|
-
const Typography = require("../Typography/Typography.cjs");
|
|
7
|
-
const TitleWithTooltip = ({
|
|
8
|
-
className,
|
|
9
|
-
title
|
|
10
|
-
}) => {
|
|
11
|
-
const textRef = React.useRef(null);
|
|
12
|
-
const isOverflowed = React.useMemo(() => {
|
|
13
|
-
const el = textRef.current;
|
|
14
|
-
if (!el)
|
|
15
|
-
return false;
|
|
16
|
-
return el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;
|
|
17
|
-
}, []);
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tooltip.HvTooltip, { disableHoverListener: !isOverflowed, placement: "top-start", title: /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { children: title }), children: /* @__PURE__ */ jsxRuntime.jsx(Typography.HvTypography, { className, variant: "label", component: "span", ref: textRef, children: title }) });
|
|
19
|
-
};
|
|
20
|
-
const TitleWithTooltip$1 = TitleWithTooltip;
|
|
21
|
-
exports.default = TitleWithTooltip$1;
|
|
22
|
-
//# sourceMappingURL=TitleWithTooltip.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TitleWithTooltip.cjs","sources":["../../../../src/components/AppSwitcher/TitleWithTooltip.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\n\nimport { HvTooltip } from \"@core/components/Tooltip\";\nimport { HvTypography } from \"@core/components/Typography\";\n\nconst TitleWithTooltip = ({ className, title }) => {\n const textRef = useRef<HTMLDivElement>(null);\n\n const isOverflowed = useMemo(() => {\n const el = textRef.current;\n if (!el) return false;\n\n return el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }, []);\n\n return (\n <HvTooltip\n disableHoverListener={!isOverflowed}\n placement=\"top-start\"\n title={<HvTypography>{title}</HvTypography>}\n >\n <HvTypography\n className={className}\n variant=\"label\"\n component=\"span\"\n ref={textRef}\n >\n {title}\n </HvTypography>\n </HvTooltip>\n );\n};\n\nexport default TitleWithTooltip;\n"],"names":["TitleWithTooltip","className","title","textRef","useRef","isOverflowed","useMemo","el","current","scrollWidth","clientWidth","scrollHeight","clientHeight","jsx","HvTooltip","HvTypography"],"mappings":";;;;;;AAKA,MAAMA,mBAAmBA,CAAC;AAAA,EAAEC;AAAAA,EAAWC;AAAM,MAAM;AAC3CC,QAAAA,UAAUC,aAAuB,IAAI;AAErCC,QAAAA,eAAeC,MAAAA,QAAQ,MAAM;AACjC,UAAMC,KAAKJ,QAAQK;AACnB,QAAI,CAACD;AAAW,aAAA;AAEhB,WAAOA,GAAGE,cAAcF,GAAGG,eAAeH,GAAGI,eAAeJ,GAAGK;AAAAA,EACjE,GAAG,CAAE,CAAA;AAGH,SAAAC,2BAAA,IAACC,qBACC,sBAAsB,CAACT,cACvB,WAAU,aACV,OAAOQ,2BAAAA,IAACE,WAAAA,cAAcb,EAAAA,UAAAA,MAAAA,CAAM,GAE5B,UAACW,2BAAAA,IAAAE,WAAAA,cAAA,EACC,WACA,SAAQ,SACR,WAAU,QACV,KAAKZ,SAEJD,UAAAA,MACH,CAAA,EACF,CAAA;AAEJ;AAEA,MAAA,qBAAeF;;"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useRef, useMemo } from "react";
|
|
3
|
-
import { HvTooltip } from "../Tooltip/Tooltip.js";
|
|
4
|
-
import { HvTypography } from "../Typography/Typography.js";
|
|
5
|
-
const TitleWithTooltip = ({
|
|
6
|
-
className,
|
|
7
|
-
title
|
|
8
|
-
}) => {
|
|
9
|
-
const textRef = useRef(null);
|
|
10
|
-
const isOverflowed = useMemo(() => {
|
|
11
|
-
const el = textRef.current;
|
|
12
|
-
if (!el)
|
|
13
|
-
return false;
|
|
14
|
-
return el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;
|
|
15
|
-
}, []);
|
|
16
|
-
return /* @__PURE__ */ jsx(HvTooltip, { disableHoverListener: !isOverflowed, placement: "top-start", title: /* @__PURE__ */ jsx(HvTypography, { children: title }), children: /* @__PURE__ */ jsx(HvTypography, { className, variant: "label", component: "span", ref: textRef, children: title }) });
|
|
17
|
-
};
|
|
18
|
-
const TitleWithTooltip$1 = TitleWithTooltip;
|
|
19
|
-
export {
|
|
20
|
-
TitleWithTooltip$1 as default
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=TitleWithTooltip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TitleWithTooltip.js","sources":["../../../../src/components/AppSwitcher/TitleWithTooltip.tsx"],"sourcesContent":["import { useMemo, useRef } from \"react\";\n\nimport { HvTooltip } from \"@core/components/Tooltip\";\nimport { HvTypography } from \"@core/components/Typography\";\n\nconst TitleWithTooltip = ({ className, title }) => {\n const textRef = useRef<HTMLDivElement>(null);\n\n const isOverflowed = useMemo(() => {\n const el = textRef.current;\n if (!el) return false;\n\n return el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight;\n }, []);\n\n return (\n <HvTooltip\n disableHoverListener={!isOverflowed}\n placement=\"top-start\"\n title={<HvTypography>{title}</HvTypography>}\n >\n <HvTypography\n className={className}\n variant=\"label\"\n component=\"span\"\n ref={textRef}\n >\n {title}\n </HvTypography>\n </HvTooltip>\n );\n};\n\nexport default TitleWithTooltip;\n"],"names":["TitleWithTooltip","className","title","textRef","useRef","isOverflowed","useMemo","el","current","scrollWidth","clientWidth","scrollHeight","clientHeight"],"mappings":";;;;AAKA,MAAMA,mBAAmBA,CAAC;AAAA,EAAEC;AAAAA,EAAWC;AAAM,MAAM;AAC3CC,QAAAA,UAAUC,OAAuB,IAAI;AAErCC,QAAAA,eAAeC,QAAQ,MAAM;AACjC,UAAMC,KAAKJ,QAAQK;AACnB,QAAI,CAACD;AAAW,aAAA;AAEhB,WAAOA,GAAGE,cAAcF,GAAGG,eAAeH,GAAGI,eAAeJ,GAAGK;AAAAA,EACjE,GAAG,CAAE,CAAA;AAGH,SAAA,oBAAC,aACC,sBAAsB,CAACP,cACvB,WAAU,aACV,OAAO,oBAAC,cAAcH,EAAAA,UAAAA,MAAAA,CAAM,GAE5B,UAAC,oBAAA,cAAA,EACC,WACA,SAAQ,SACR,WAAU,QACV,KAAKC,SAEJD,UAAAA,MACH,CAAA,EACF,CAAA;AAEJ;AAEA,MAAA,qBAAeF;"}
|