@db-ux/react-core-components 2.4.1 → 2.4.2
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.
|
@@ -4,7 +4,7 @@ import { filterPassingProps, getRootProps } from "../../utils/react";
|
|
|
4
4
|
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
5
5
|
import { DEFAULT_BACK } from "../../shared/constants";
|
|
6
6
|
import { cls, delay, getBoolean, getBooleanAsString, getHideProp, uuid, } from "../../utils";
|
|
7
|
-
import {
|
|
7
|
+
import { NavigationItemSafeTriangle } from "../../utils/navigation";
|
|
8
8
|
import DBButton from "../button/button";
|
|
9
9
|
function DBNavigationItemFn(props, component) {
|
|
10
10
|
var _a;
|
|
@@ -17,11 +17,12 @@ function DBNavigationItemFn(props, component) {
|
|
|
17
17
|
const [subNavigationId, setSubNavigationId] = useState(() => "sub-navigation-" + uuid());
|
|
18
18
|
const [navigationItemSafeTriangle, setNavigationItemSafeTriangle] = useState(() => undefined);
|
|
19
19
|
function handleNavigationItemClick(event) {
|
|
20
|
-
|
|
20
|
+
var _a;
|
|
21
|
+
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.nodeName) === "A") {
|
|
21
22
|
setAutoClose(true);
|
|
22
|
-
delay(() => {
|
|
23
|
+
void delay(() => {
|
|
23
24
|
setAutoClose(false);
|
|
24
|
-
},
|
|
25
|
+
}, 1000);
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
28
|
function handleClick(event) {
|
|
@@ -66,7 +67,7 @@ function DBNavigationItemFn(props, component) {
|
|
|
66
67
|
!hasSubNavigation ? (React.createElement(React.Fragment, null, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children))) : null,
|
|
67
68
|
hasSubNavigation ? (React.createElement(React.Fragment, null,
|
|
68
69
|
React.createElement("button", { className: "db-navigation-item-expand-button", "aria-haspopup": hasAreaPopup, "aria-expanded": isSubNavigationExpanded, disabled: getBoolean(props.disabled, "disabled"), onClick: (event) => handleClick(event) }, props.text ? React.createElement(React.Fragment, null, props.text) : React.createElement(React.Fragment, null, props.children)),
|
|
69
|
-
React.createElement("menu", { className: "db-sub-navigation", "data-
|
|
70
|
+
React.createElement("menu", { className: "db-sub-navigation", "data-force-close": autoClose, id: subNavigationId, onClick: (event) => handleNavigationItemClick(event) },
|
|
70
71
|
hasAreaPopup ? (React.createElement("div", { className: "db-mobile-navigation-back" },
|
|
71
72
|
React.createElement(DBButton, { icon: "arrow_left", variant: "ghost", id: props.backButtonId, onClick: (event) => handleBackClick(event) }, (_a = props.backButtonText) !== null && _a !== void 0 ? _a : DEFAULT_BACK))) : null,
|
|
72
73
|
React.createElement(React.Fragment, null, props.subNavigation)))) : null));
|
package/dist/shared/model.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@db-ux/react-core-components",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"description": "React components for @db-ux/core-components",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"tsc": "tsc -p . --sourceMap false"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@playwright/experimental-ct-react": "1.
|
|
30
|
+
"@playwright/experimental-ct-react": "1.54.1",
|
|
31
31
|
"@types/react": "^18.3.13",
|
|
32
32
|
"react": "^18.3.1",
|
|
33
33
|
"react-dom": "^18.3.1"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"sideEffects": false,
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@db-ux/core-components": "2.4.
|
|
42
|
-
"@db-ux/core-foundations": "2.4.
|
|
41
|
+
"@db-ux/core-components": "2.4.2",
|
|
42
|
+
"@db-ux/core-foundations": "2.4.2"
|
|
43
43
|
}
|
|
44
44
|
}
|