enjanga-components-library 1.0.39 → 1.0.41

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.d.mts CHANGED
@@ -7,11 +7,12 @@ interface AH_propsType {
7
7
  brandLabel: string;
8
8
  brandRoute: string;
9
9
  brand: React.ReactNode;
10
+ isHomeRoute: boolean;
10
11
  navigation: React.ReactNode;
11
12
  globalBarItems: React.ReactNode;
12
13
  }
13
14
 
14
- declare const AppHeader: ({ brand, brandLabel, brandRoute, navigation, }: AH_propsType) => react_jsx_runtime.JSX.Element | null;
15
+ declare const AppHeader: ({ brand, brandLabel, brandRoute, isHomeRoute, navigation, }: AH_propsType) => react_jsx_runtime.JSX.Element | null;
15
16
 
16
17
  declare const BL_roleOpt: readonly ["img", "presentation", "none"];
17
18
  type BL_roleOptPropsType = (typeof BL_roleOpt)[number];
package/dist/index.d.ts CHANGED
@@ -7,11 +7,12 @@ interface AH_propsType {
7
7
  brandLabel: string;
8
8
  brandRoute: string;
9
9
  brand: React.ReactNode;
10
+ isHomeRoute: boolean;
10
11
  navigation: React.ReactNode;
11
12
  globalBarItems: React.ReactNode;
12
13
  }
13
14
 
14
- declare const AppHeader: ({ brand, brandLabel, brandRoute, navigation, }: AH_propsType) => react_jsx_runtime.JSX.Element | null;
15
+ declare const AppHeader: ({ brand, brandLabel, brandRoute, isHomeRoute, navigation, }: AH_propsType) => react_jsx_runtime.JSX.Element | null;
15
16
 
16
17
  declare const BL_roleOpt: readonly ["img", "presentation", "none"];
17
18
  type BL_roleOptPropsType = (typeof BL_roleOpt)[number];
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
 
@@ -1124,14 +1125,14 @@ var AppHeader = ({
1124
1125
  brand,
1125
1126
  brandLabel,
1126
1127
  brandRoute = "/",
1128
+ isHomeRoute,
1127
1129
  navigation
1128
1130
  }) => {
1129
1131
  const labelOpenMenu = "Open menu";
1130
1132
  const labelSideNav = "Side navigation";
1131
1133
  const [visible, setVisible] = React4.useState(true);
1132
- const pathname = navigation_star.usePathname();
1134
+ navigation_star.usePathname();
1133
1135
  const { activeBreakpoint } = useWindowBreakpoint();
1134
- const isHomeRoute = pathname === "/";
1135
1136
  React4.useEffect(() => {
1136
1137
  const handleOpen = () => {
1137
1138
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1170,6 +1171,7 @@ var AppHeader = ({
1170
1171
  href: brandRoute,
1171
1172
  passHref: true,
1172
1173
  isCurrentPage: isHomeRoute,
1174
+ className: isHomeRoute ? "cds--header__name--current" : "",
1173
1175
  children: brand
1174
1176
  }
1175
1177
  ),
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
 
@@ -1097,14 +1098,14 @@ var AppHeader = ({
1097
1098
  brand,
1098
1099
  brandLabel,
1099
1100
  brandRoute = "/",
1101
+ isHomeRoute,
1100
1102
  navigation
1101
1103
  }) => {
1102
1104
  const labelOpenMenu = "Open menu";
1103
1105
  const labelSideNav = "Side navigation";
1104
1106
  const [visible, setVisible] = useState(true);
1105
- const pathname = usePathname();
1107
+ usePathname();
1106
1108
  const { activeBreakpoint } = useWindowBreakpoint();
1107
- const isHomeRoute = pathname === "/";
1108
1109
  useEffect(() => {
1109
1110
  const handleOpen = () => {
1110
1111
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1143,6 +1144,7 @@ var AppHeader = ({
1143
1144
  href: brandRoute,
1144
1145
  passHref: true,
1145
1146
  isCurrentPage: isHomeRoute,
1147
+ className: isHomeRoute ? "cds--header__name--current" : "",
1146
1148
  children: brand
1147
1149
  }
1148
1150
  ),
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.41",
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",