enjanga-components-library 1.0.40 → 1.0.42

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
@@ -1125,15 +1125,14 @@ var AppHeader = ({
1125
1125
  brand,
1126
1126
  brandLabel,
1127
1127
  brandRoute = "/",
1128
+ isHomeRoute,
1128
1129
  navigation
1129
1130
  }) => {
1130
1131
  const labelOpenMenu = "Open menu";
1131
1132
  const labelSideNav = "Side navigation";
1132
1133
  const [visible, setVisible] = React4.useState(true);
1133
- const searchParams = navigation_star.useSearchParams();
1134
- const pathname = navigation_star.usePathname();
1134
+ navigation_star.usePathname();
1135
1135
  const { activeBreakpoint } = useWindowBreakpoint();
1136
- const isHomeRoute = pathname === "/" && !searchParams.has("section");
1137
1136
  React4.useEffect(() => {
1138
1137
  const handleOpen = () => {
1139
1138
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1171,7 +1170,7 @@ var AppHeader = ({
1171
1170
  as: default2__default.default,
1172
1171
  href: brandRoute,
1173
1172
  passHref: true,
1174
- isCurrentPage: isHomeRoute,
1173
+ isActive: isHomeRoute,
1175
1174
  className: isHomeRoute ? "cds--header__name--current" : "",
1176
1175
  children: brand
1177
1176
  }
package/dist/index.mjs CHANGED
@@ -1098,15 +1098,14 @@ var AppHeader = ({
1098
1098
  brand,
1099
1099
  brandLabel,
1100
1100
  brandRoute = "/",
1101
+ isHomeRoute,
1101
1102
  navigation
1102
1103
  }) => {
1103
1104
  const labelOpenMenu = "Open menu";
1104
1105
  const labelSideNav = "Side navigation";
1105
1106
  const [visible, setVisible] = useState(true);
1106
- const searchParams = useSearchParams();
1107
- const pathname = usePathname();
1107
+ usePathname();
1108
1108
  const { activeBreakpoint } = useWindowBreakpoint();
1109
- const isHomeRoute = pathname === "/" && !searchParams.has("section");
1110
1109
  useEffect(() => {
1111
1110
  const handleOpen = () => {
1112
1111
  if (activeBreakpoint !== "sm" && activeBreakpoint !== "md") return;
@@ -1144,7 +1143,7 @@ var AppHeader = ({
1144
1143
  as: default2,
1145
1144
  href: brandRoute,
1146
1145
  passHref: true,
1147
- isCurrentPage: isHomeRoute,
1146
+ isActive: isHomeRoute,
1148
1147
  className: isHomeRoute ? "cds--header__name--current" : "",
1149
1148
  children: brand
1150
1149
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enjanga-components-library",
3
- "version": "1.0.40",
3
+ "version": "1.0.42",
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",