enjanga-components-library 1.0.37 → 1.0.39
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/index.js +15 -4
- package/dist/index.mjs +16 -4
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1017,7 +1017,8 @@ var require_prop_types = __commonJS({
|
|
|
1017
1017
|
var next_exports = {};
|
|
1018
1018
|
__export(next_exports, {
|
|
1019
1019
|
Image: () => default3__default.default,
|
|
1020
|
-
Link: () => default2__default.default
|
|
1020
|
+
Link: () => default2__default.default,
|
|
1021
|
+
usePathname: () => navigation_star.usePathname
|
|
1021
1022
|
});
|
|
1022
1023
|
__reExport(next_exports, navigation_star__namespace);
|
|
1023
1024
|
|
|
@@ -1128,7 +1129,9 @@ var AppHeader = ({
|
|
|
1128
1129
|
const labelOpenMenu = "Open menu";
|
|
1129
1130
|
const labelSideNav = "Side navigation";
|
|
1130
1131
|
const [visible, setVisible] = React4.useState(true);
|
|
1132
|
+
const pathname = navigation_star.usePathname();
|
|
1131
1133
|
const { activeBreakpoint } = useWindowBreakpoint();
|
|
1134
|
+
const isHomeRoute = pathname === "/";
|
|
1132
1135
|
React4.useEffect(() => {
|
|
1133
1136
|
const handleOpen = () => {
|
|
1134
1137
|
if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
|
|
@@ -1159,7 +1162,17 @@ var AppHeader = ({
|
|
|
1159
1162
|
isActive: isSideNavExpanded
|
|
1160
1163
|
}
|
|
1161
1164
|
),
|
|
1162
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1166
|
+
react.HeaderName,
|
|
1167
|
+
{
|
|
1168
|
+
prefix: "",
|
|
1169
|
+
as: default2__default.default,
|
|
1170
|
+
href: brandRoute,
|
|
1171
|
+
passHref: true,
|
|
1172
|
+
isCurrentPage: isHomeRoute,
|
|
1173
|
+
children: brand
|
|
1174
|
+
}
|
|
1175
|
+
),
|
|
1163
1176
|
/* @__PURE__ */ jsxRuntime.jsx(react.HeaderNavigation, { "aria-label": brandLabel, children: navigation }),
|
|
1164
1177
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1165
1178
|
react.SideNav,
|
|
@@ -25652,10 +25665,8 @@ var ContentModal = ({
|
|
|
25652
25665
|
};
|
|
25653
25666
|
React4.useEffect(() => {
|
|
25654
25667
|
if (isOpen) {
|
|
25655
|
-
console.log("-MODAL_OPEN=", MODAL_OPEN);
|
|
25656
25668
|
modalEvents.emit(MODAL_OPEN);
|
|
25657
25669
|
} else {
|
|
25658
|
-
console.log("-MODAL_CLOSE=", MODAL_CLOSE);
|
|
25659
25670
|
modalEvents.emit(MODAL_CLOSE);
|
|
25660
25671
|
}
|
|
25661
25672
|
}, [isOpen]);
|
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@ import { Tile, ComposedModal, ModalHeader, ModalBody, ModalFooter, Button, Heade
|
|
|
2
2
|
import default2 from 'next/link';
|
|
3
3
|
import default3 from 'next/image';
|
|
4
4
|
import * as navigation_star from 'next/navigation';
|
|
5
|
+
import { usePathname } from 'next/navigation';
|
|
5
6
|
import React4, { memo, useState, useRef, useEffect, useMemo } from 'react';
|
|
6
7
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
8
|
import clsx2 from 'clsx';
|
|
@@ -989,7 +990,8 @@ var require_prop_types = __commonJS({
|
|
|
989
990
|
var next_exports = {};
|
|
990
991
|
__export(next_exports, {
|
|
991
992
|
Image: () => default3,
|
|
992
|
-
Link: () => default2
|
|
993
|
+
Link: () => default2,
|
|
994
|
+
usePathname: () => usePathname
|
|
993
995
|
});
|
|
994
996
|
__reExport(next_exports, navigation_star);
|
|
995
997
|
|
|
@@ -1100,7 +1102,9 @@ var AppHeader = ({
|
|
|
1100
1102
|
const labelOpenMenu = "Open menu";
|
|
1101
1103
|
const labelSideNav = "Side navigation";
|
|
1102
1104
|
const [visible, setVisible] = useState(true);
|
|
1105
|
+
const pathname = usePathname();
|
|
1103
1106
|
const { activeBreakpoint } = useWindowBreakpoint();
|
|
1107
|
+
const isHomeRoute = pathname === "/";
|
|
1104
1108
|
useEffect(() => {
|
|
1105
1109
|
const handleOpen = () => {
|
|
1106
1110
|
if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
|
|
@@ -1131,7 +1135,17 @@ var AppHeader = ({
|
|
|
1131
1135
|
isActive: isSideNavExpanded
|
|
1132
1136
|
}
|
|
1133
1137
|
),
|
|
1134
|
-
/* @__PURE__ */ jsx(
|
|
1138
|
+
/* @__PURE__ */ jsx(
|
|
1139
|
+
HeaderName,
|
|
1140
|
+
{
|
|
1141
|
+
prefix: "",
|
|
1142
|
+
as: default2,
|
|
1143
|
+
href: brandRoute,
|
|
1144
|
+
passHref: true,
|
|
1145
|
+
isCurrentPage: isHomeRoute,
|
|
1146
|
+
children: brand
|
|
1147
|
+
}
|
|
1148
|
+
),
|
|
1135
1149
|
/* @__PURE__ */ jsx(HeaderNavigation, { "aria-label": brandLabel, children: navigation }),
|
|
1136
1150
|
/* @__PURE__ */ jsx(
|
|
1137
1151
|
SideNav,
|
|
@@ -25624,10 +25638,8 @@ var ContentModal = ({
|
|
|
25624
25638
|
};
|
|
25625
25639
|
useEffect(() => {
|
|
25626
25640
|
if (isOpen) {
|
|
25627
|
-
console.log("-MODAL_OPEN=", MODAL_OPEN);
|
|
25628
25641
|
modalEvents.emit(MODAL_OPEN);
|
|
25629
25642
|
} else {
|
|
25630
|
-
console.log("-MODAL_CLOSE=", MODAL_CLOSE);
|
|
25631
25643
|
modalEvents.emit(MODAL_CLOSE);
|
|
25632
25644
|
}
|
|
25633
25645
|
}, [isOpen]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "enjanga-components-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"description": "Reusable component library for Next.js 13+ projects with Carbon design system.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"concurrently": "^9.1.2",
|
|
76
76
|
"css-loader": "^7.1.2",
|
|
77
|
-
"enjanga-core-setup": "^1.0.
|
|
77
|
+
"enjanga-core-setup": "^1.0.21",
|
|
78
78
|
"react": "^19.0.0",
|
|
79
79
|
"react-docgen-typescript": "^2.4.0",
|
|
80
80
|
"react-dom": "^19.0.0",
|