@julseb-lib/react 0.1.82 → 0.1.84

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.cjs CHANGED
@@ -2471,9 +2471,13 @@ var useTranslation = (translations) => {
2471
2471
  const languages = Object.keys(translations);
2472
2472
  (0, import_react15.useEffect)(() => {
2473
2473
  if (window && typeof window !== "undefined") {
2474
- setLanguage((0, import_utils20.detectLanguage)() ?? "en");
2474
+ if (localStorage.getItem("lang")) {
2475
+ setLanguage(
2476
+ localStorage.getItem("lang")?.split("-")[0].toLowerCase() ?? "en"
2477
+ );
2478
+ }
2475
2479
  }
2476
- }, [language]);
2480
+ }, []);
2477
2481
  const translate = (key) => translations?.[language]?.[key];
2478
2482
  return {
2479
2483
  translate,
@@ -69568,7 +69572,7 @@ var Header = ({
69568
69572
  nav,
69569
69573
  backgroundColor = "primary",
69570
69574
  textColor = "white",
69571
- linkColor = "white",
69575
+ linksColor = "white",
69572
69576
  ...rest
69573
69577
  }) => {
69574
69578
  const Element = element;
@@ -69617,7 +69621,7 @@ var Header = ({
69617
69621
  "z-999 flex gap-2 [&>a]:outline-none transition-all duration-200 ease-in-out",
69618
69622
  "fixed md:relative",
69619
69623
  "flex-col md:flex-row px-[5%] md:px-0",
69620
- genRingColorChildren[linkColor],
69624
+ genRingColorChildren[linksColor],
69621
69625
  navDesktopPosition === "left" && "grow",
69622
69626
  genBgAllColors[backgroundColor],
69623
69627
  navMobileVariant === "drawer" && [
@@ -69652,7 +69656,7 @@ var Header = ({
69652
69656
  position,
69653
69657
  genBgAllColors[backgroundColor],
69654
69658
  genTextAllColor[textColor],
69655
- genLinkColor[linkColor],
69659
+ genLinkColor[linksColor],
69656
69660
  isHidden ? "top-[-64px]" : "top-0",
69657
69661
  "header",
69658
69662
  className
@@ -69665,7 +69669,7 @@ var Header = ({
69665
69669
  {
69666
69670
  className: clsx(
69667
69671
  "z-999 outline-none [&>a]:outline-none",
69668
- genRingColorChildren[linkColor]
69672
+ genRingColorChildren[linksColor]
69669
69673
  ),
69670
69674
  children: logo
69671
69675
  }
@@ -69708,6 +69712,7 @@ var Footer = ({
69708
69712
  logo,
69709
69713
  direction = "horizontal",
69710
69714
  linksSeparatorColor = "gray-500",
69715
+ linksColor = "primary",
69711
69716
  ...rest
69712
69717
  }) => {
69713
69718
  const Element = element;
@@ -69720,12 +69725,14 @@ var Footer = ({
69720
69725
  "relative flex px-[5%] pb-4",
69721
69726
  direction === "horizontal" ? "flex-row justify-between" : "flex-col items-center gap-2",
69722
69727
  !hideSeparator && "before:w-[90%] before:h-[1px] before:absolute before:top-0 before:left-[5%] before:bg-gray-200 pt-4",
69728
+ genLinkColor[linksColor],
69729
+ genButtonColor[linksColor],
69723
69730
  "footer",
69724
69731
  className
69725
69732
  ),
69726
69733
  ...rest,
69727
69734
  children: [
69728
- logo,
69735
+ typeof logo === "string" ? /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(Text, { children: logo }) : logo,
69729
69736
  /* @__PURE__ */ (0, import_jsx_runtime368.jsx)("div", { className: "flex items-container gap-2", children: items?.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime368.jsxs)(import_react115.Fragment, { children: [
69730
69737
  item,
69731
69738
  i !== items.length - 1 && !hideLinksSeparator && /* @__PURE__ */ (0, import_jsx_runtime368.jsx)(