@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 +14 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +15 -8
- package/dist/index.js.map +1 -1
- package/dist/types/components-props.d.cts +2 -1
- package/dist/types/components-props.d.ts +2 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3075,7 +3075,7 @@ declare const Drawer: FC$1<ILibDrawer>;
|
|
|
3075
3075
|
* @prop {React.ReactNode} [props.nav] - Navigation content to display.
|
|
3076
3076
|
* @prop {LibAllColors} [props.backgroundColor="primary"] - Background color for the header.
|
|
3077
3077
|
* @prop {LibAllColors} [props.textColor="white"] - Text color for header content.
|
|
3078
|
-
* @prop {LibColorsHover} [props.
|
|
3078
|
+
* @prop {LibColorsHover} [props.linksColor="white"] - Color for navigation links.
|
|
3079
3079
|
*
|
|
3080
3080
|
* @returns {JSX.Element} The rendered Header component.
|
|
3081
3081
|
*
|
|
@@ -3108,11 +3108,12 @@ declare const Header: FC$1<ILibHeader>;
|
|
|
3108
3108
|
* @prop {React.ReactNode} [props.children] - Child elements to display in the footer links section.
|
|
3109
3109
|
* @prop {boolean} [props.hideSeparator] - Whether to hide the top border separator line.
|
|
3110
3110
|
* @prop {boolean} [props.hideLinksSeparator] - Whether to hide separators between footer links.
|
|
3111
|
-
* @prop {"dot" | "dash"} [props.linksSeparator="dot"] - Type of separator to display between links.
|
|
3111
|
+
* @prop {"dot" | "dash"} [props.linksSeparator="dot"] - Type of separator to display between links. Possible values: "dot", "dash". Default: "dot".
|
|
3112
3112
|
* @prop {Array<React.ReactNode>} [props.items] - Array of footer link items to display.
|
|
3113
3113
|
* @prop {React.ReactNode} [props.logo] - Logo element to display in the footer.
|
|
3114
|
-
* @prop {"horizontal" | "vertical"} [props.direction="horizontal"] - Layout direction for footer content.
|
|
3115
|
-
* @prop {LibAllColors} [props.linksSeparatorColor="gray-500"] - Color for the separator between links.
|
|
3114
|
+
* @prop {"horizontal" | "vertical"} [props.direction="horizontal"] - Layout direction for footer content. Possible values: "horizontal", "vertical". Default: "horizontal".
|
|
3115
|
+
* @prop {LibAllColors} [props.linksSeparatorColor="gray-500"] - Color for the separator between links. Default: "gray-500".
|
|
3116
|
+
* @prop {LibColorsHover} [props.linksColor="primary"] - Color for the footer links. Default: "primary".
|
|
3116
3117
|
*
|
|
3117
3118
|
* @returns {JSX.Element} The rendered Footer component.
|
|
3118
3119
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -3075,7 +3075,7 @@ declare const Drawer: FC$1<ILibDrawer>;
|
|
|
3075
3075
|
* @prop {React.ReactNode} [props.nav] - Navigation content to display.
|
|
3076
3076
|
* @prop {LibAllColors} [props.backgroundColor="primary"] - Background color for the header.
|
|
3077
3077
|
* @prop {LibAllColors} [props.textColor="white"] - Text color for header content.
|
|
3078
|
-
* @prop {LibColorsHover} [props.
|
|
3078
|
+
* @prop {LibColorsHover} [props.linksColor="white"] - Color for navigation links.
|
|
3079
3079
|
*
|
|
3080
3080
|
* @returns {JSX.Element} The rendered Header component.
|
|
3081
3081
|
*
|
|
@@ -3108,11 +3108,12 @@ declare const Header: FC$1<ILibHeader>;
|
|
|
3108
3108
|
* @prop {React.ReactNode} [props.children] - Child elements to display in the footer links section.
|
|
3109
3109
|
* @prop {boolean} [props.hideSeparator] - Whether to hide the top border separator line.
|
|
3110
3110
|
* @prop {boolean} [props.hideLinksSeparator] - Whether to hide separators between footer links.
|
|
3111
|
-
* @prop {"dot" | "dash"} [props.linksSeparator="dot"] - Type of separator to display between links.
|
|
3111
|
+
* @prop {"dot" | "dash"} [props.linksSeparator="dot"] - Type of separator to display between links. Possible values: "dot", "dash". Default: "dot".
|
|
3112
3112
|
* @prop {Array<React.ReactNode>} [props.items] - Array of footer link items to display.
|
|
3113
3113
|
* @prop {React.ReactNode} [props.logo] - Logo element to display in the footer.
|
|
3114
|
-
* @prop {"horizontal" | "vertical"} [props.direction="horizontal"] - Layout direction for footer content.
|
|
3115
|
-
* @prop {LibAllColors} [props.linksSeparatorColor="gray-500"] - Color for the separator between links.
|
|
3114
|
+
* @prop {"horizontal" | "vertical"} [props.direction="horizontal"] - Layout direction for footer content. Possible values: "horizontal", "vertical". Default: "horizontal".
|
|
3115
|
+
* @prop {LibAllColors} [props.linksSeparatorColor="gray-500"] - Color for the separator between links. Default: "gray-500".
|
|
3116
|
+
* @prop {LibColorsHover} [props.linksColor="primary"] - Color for the footer links. Default: "primary".
|
|
3116
3117
|
*
|
|
3117
3118
|
* @returns {JSX.Element} The rendered Footer component.
|
|
3118
3119
|
*
|
package/dist/index.js
CHANGED
|
@@ -2283,15 +2283,19 @@ var useTouchScreen = () => {
|
|
|
2283
2283
|
|
|
2284
2284
|
// src/lib/hooks/useTranslation.tsx
|
|
2285
2285
|
import { useState as useState9, useEffect as useEffect7 } from "react";
|
|
2286
|
-
import
|
|
2286
|
+
import "@julseb-lib/utils";
|
|
2287
2287
|
var useTranslation = (translations) => {
|
|
2288
2288
|
const [language, setLanguage] = useState9("en");
|
|
2289
2289
|
const languages = Object.keys(translations);
|
|
2290
2290
|
useEffect7(() => {
|
|
2291
2291
|
if (window && typeof window !== "undefined") {
|
|
2292
|
-
|
|
2292
|
+
if (localStorage.getItem("lang")) {
|
|
2293
|
+
setLanguage(
|
|
2294
|
+
localStorage.getItem("lang")?.split("-")[0].toLowerCase() ?? "en"
|
|
2295
|
+
);
|
|
2296
|
+
}
|
|
2293
2297
|
}
|
|
2294
|
-
}, [
|
|
2298
|
+
}, []);
|
|
2295
2299
|
const translate = (key) => translations?.[language]?.[key];
|
|
2296
2300
|
return {
|
|
2297
2301
|
translate,
|
|
@@ -69406,7 +69410,7 @@ var Header = ({
|
|
|
69406
69410
|
nav,
|
|
69407
69411
|
backgroundColor = "primary",
|
|
69408
69412
|
textColor = "white",
|
|
69409
|
-
|
|
69413
|
+
linksColor = "white",
|
|
69410
69414
|
...rest
|
|
69411
69415
|
}) => {
|
|
69412
69416
|
const Element = element;
|
|
@@ -69455,7 +69459,7 @@ var Header = ({
|
|
|
69455
69459
|
"z-999 flex gap-2 [&>a]:outline-none transition-all duration-200 ease-in-out",
|
|
69456
69460
|
"fixed md:relative",
|
|
69457
69461
|
"flex-col md:flex-row px-[5%] md:px-0",
|
|
69458
|
-
genRingColorChildren[
|
|
69462
|
+
genRingColorChildren[linksColor],
|
|
69459
69463
|
navDesktopPosition === "left" && "grow",
|
|
69460
69464
|
genBgAllColors[backgroundColor],
|
|
69461
69465
|
navMobileVariant === "drawer" && [
|
|
@@ -69490,7 +69494,7 @@ var Header = ({
|
|
|
69490
69494
|
position,
|
|
69491
69495
|
genBgAllColors[backgroundColor],
|
|
69492
69496
|
genTextAllColor[textColor],
|
|
69493
|
-
genLinkColor[
|
|
69497
|
+
genLinkColor[linksColor],
|
|
69494
69498
|
isHidden ? "top-[-64px]" : "top-0",
|
|
69495
69499
|
"header",
|
|
69496
69500
|
className
|
|
@@ -69503,7 +69507,7 @@ var Header = ({
|
|
|
69503
69507
|
{
|
|
69504
69508
|
className: clsx(
|
|
69505
69509
|
"z-999 outline-none [&>a]:outline-none",
|
|
69506
|
-
genRingColorChildren[
|
|
69510
|
+
genRingColorChildren[linksColor]
|
|
69507
69511
|
),
|
|
69508
69512
|
children: logo
|
|
69509
69513
|
}
|
|
@@ -69546,6 +69550,7 @@ var Footer = ({
|
|
|
69546
69550
|
logo,
|
|
69547
69551
|
direction = "horizontal",
|
|
69548
69552
|
linksSeparatorColor = "gray-500",
|
|
69553
|
+
linksColor = "primary",
|
|
69549
69554
|
...rest
|
|
69550
69555
|
}) => {
|
|
69551
69556
|
const Element = element;
|
|
@@ -69558,12 +69563,14 @@ var Footer = ({
|
|
|
69558
69563
|
"relative flex px-[5%] pb-4",
|
|
69559
69564
|
direction === "horizontal" ? "flex-row justify-between" : "flex-col items-center gap-2",
|
|
69560
69565
|
!hideSeparator && "before:w-[90%] before:h-[1px] before:absolute before:top-0 before:left-[5%] before:bg-gray-200 pt-4",
|
|
69566
|
+
genLinkColor[linksColor],
|
|
69567
|
+
genButtonColor[linksColor],
|
|
69561
69568
|
"footer",
|
|
69562
69569
|
className
|
|
69563
69570
|
),
|
|
69564
69571
|
...rest,
|
|
69565
69572
|
children: [
|
|
69566
|
-
logo,
|
|
69573
|
+
typeof logo === "string" ? /* @__PURE__ */ jsx367(Text, { children: logo }) : logo,
|
|
69567
69574
|
/* @__PURE__ */ jsx367("div", { className: "flex items-container gap-2", children: items?.map((item, i) => /* @__PURE__ */ jsxs293(Fragment14, { children: [
|
|
69568
69575
|
item,
|
|
69569
69576
|
i !== items.length - 1 && !hideLinksSeparator && /* @__PURE__ */ jsx367(
|