enjanga-components-library 1.0.39 → 1.0.40

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 CHANGED
@@ -1018,7 +1018,8 @@ var next_exports = {};
1018
1018
  __export(next_exports, {
1019
1019
  Image: () => default3__default.default,
1020
1020
  Link: () => default2__default.default,
1021
- usePathname: () => navigation_star.usePathname
1021
+ usePathname: () => navigation_star.usePathname,
1022
+ useSearchParams: () => navigation_star.useSearchParams
1022
1023
  });
1023
1024
  __reExport(next_exports, navigation_star__namespace);
1024
1025
 
@@ -1129,9 +1130,10 @@ var AppHeader = ({
1129
1130
  const labelOpenMenu = "Open menu";
1130
1131
  const labelSideNav = "Side navigation";
1131
1132
  const [visible, setVisible] = React4.useState(true);
1133
+ const searchParams = navigation_star.useSearchParams();
1132
1134
  const pathname = navigation_star.usePathname();
1133
1135
  const { activeBreakpoint } = useWindowBreakpoint();
1134
- const isHomeRoute = pathname === "/";
1136
+ const isHomeRoute = pathname === "/" && !searchParams.has("section");
1135
1137
  React4.useEffect(() => {
1136
1138
  const handleOpen = () => {
1137
1139
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1170,6 +1172,7 @@ var AppHeader = ({
1170
1172
  href: brandRoute,
1171
1173
  passHref: true,
1172
1174
  isCurrentPage: isHomeRoute,
1175
+ className: isHomeRoute ? "cds--header__name--current" : "",
1173
1176
  children: brand
1174
1177
  }
1175
1178
  ),
package/dist/index.mjs CHANGED
@@ -2,7 +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
+ import { useSearchParams, usePathname } from 'next/navigation';
6
6
  import React4, { memo, useState, useRef, useEffect, useMemo } from 'react';
7
7
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
8
8
  import clsx2 from 'clsx';
@@ -991,7 +991,8 @@ var next_exports = {};
991
991
  __export(next_exports, {
992
992
  Image: () => default3,
993
993
  Link: () => default2,
994
- usePathname: () => usePathname
994
+ usePathname: () => usePathname,
995
+ useSearchParams: () => useSearchParams
995
996
  });
996
997
  __reExport(next_exports, navigation_star);
997
998
 
@@ -1102,9 +1103,10 @@ var AppHeader = ({
1102
1103
  const labelOpenMenu = "Open menu";
1103
1104
  const labelSideNav = "Side navigation";
1104
1105
  const [visible, setVisible] = useState(true);
1106
+ const searchParams = useSearchParams();
1105
1107
  const pathname = usePathname();
1106
1108
  const { activeBreakpoint } = useWindowBreakpoint();
1107
- const isHomeRoute = pathname === "/";
1109
+ const isHomeRoute = pathname === "/" && !searchParams.has("section");
1108
1110
  useEffect(() => {
1109
1111
  const handleOpen = () => {
1110
1112
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1143,6 +1145,7 @@ var AppHeader = ({
1143
1145
  href: brandRoute,
1144
1146
  passHref: true,
1145
1147
  isCurrentPage: isHomeRoute,
1148
+ className: isHomeRoute ? "cds--header__name--current" : "",
1146
1149
  children: brand
1147
1150
  }
1148
1151
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enjanga-components-library",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
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.21",
77
+ "enjanga-core-setup": "^1.0.22",
78
78
  "react": "^19.0.0",
79
79
  "react-docgen-typescript": "^2.4.0",
80
80
  "react-dom": "^19.0.0",