@anywayseo/tools 2.2.3 → 2.2.4
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/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/layout/header/navigation/mobile/nav-list/index.d.ts +1 -1
- package/dist/{index-CAcPXV4F.mjs → index-COCjNsCL.mjs} +12 -13
- package/dist/{index-B-J8fcfm.js → index-DWa1ea5F.js} +12 -13
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../index-
|
|
3
|
+
const index = require("../index-DWa1ea5F.js");
|
|
4
4
|
exports.Author = index.Author;
|
|
5
5
|
exports.BonusCard = index.BonusCard;
|
|
6
6
|
exports.Center = index.Center;
|
|
@@ -2,7 +2,7 @@ import { FC } from 'react';
|
|
|
2
2
|
import { INavItem } from '../../../../../../types';
|
|
3
3
|
type NavListProps = INavItem & {
|
|
4
4
|
isExpanded: boolean;
|
|
5
|
-
onExpand:
|
|
5
|
+
onExpand: VoidFunction;
|
|
6
6
|
};
|
|
7
7
|
declare const NavList: FC<NavListProps>;
|
|
8
8
|
export default NavList;
|
|
@@ -617,7 +617,7 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
617
617
|
children: label
|
|
618
618
|
}
|
|
619
619
|
) }),
|
|
620
|
-
/* @__PURE__ */ jsx(PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(List$1, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link$1, to: `${path}${child.path}`, p: 2, role: "group", children: [
|
|
620
|
+
/* @__PURE__ */ jsx(PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsx(List$1, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxs(Flex, { as: Link$1, to: `${path}${child.path}`, p: 2, role: "group", children: [
|
|
621
621
|
/* @__PURE__ */ jsx(Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
|
|
622
622
|
/* @__PURE__ */ jsx(
|
|
623
623
|
Flex,
|
|
@@ -632,20 +632,17 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
632
632
|
children: /* @__PURE__ */ jsx(Icon, { as: ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
|
|
633
633
|
}
|
|
634
634
|
)
|
|
635
|
-
] }) },
|
|
635
|
+
] }) }, index)) }) })
|
|
636
636
|
] });
|
|
637
637
|
};
|
|
638
638
|
const DesktopNavigation = ({ menu }) => {
|
|
639
639
|
return /* @__PURE__ */ jsx(Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item, index) => {
|
|
640
640
|
var _a;
|
|
641
|
-
return /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(NavList$1, { ...item }) : /* @__PURE__ */ jsx(NavLink, { ...item }) },
|
|
641
|
+
return /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(NavList$1, { ...item }) : /* @__PURE__ */ jsx(NavLink, { ...item }) }, index);
|
|
642
642
|
}) });
|
|
643
643
|
};
|
|
644
644
|
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
645
645
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
646
|
-
function handleClick() {
|
|
647
|
-
onExpand(path);
|
|
648
|
-
}
|
|
649
646
|
return /* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
|
|
650
647
|
/* @__PURE__ */ jsxs(
|
|
651
648
|
Flex,
|
|
@@ -656,7 +653,7 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
656
653
|
align: "center",
|
|
657
654
|
justifyContent: "space-between",
|
|
658
655
|
_hover: { textDecoration: "none", color: "brand.400" },
|
|
659
|
-
onClick:
|
|
656
|
+
onClick: onExpand,
|
|
660
657
|
children: [
|
|
661
658
|
/* @__PURE__ */ jsx(Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
662
659
|
/* @__PURE__ */ jsx(
|
|
@@ -671,20 +668,22 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
671
668
|
]
|
|
672
669
|
}
|
|
673
670
|
),
|
|
674
|
-
/* @__PURE__ */ jsx(Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsx(List$1, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link$1, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) },
|
|
671
|
+
/* @__PURE__ */ jsx(Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsx(List$1, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child, index) => /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsx(Text, { as: Link$1, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) }, index)) }) })
|
|
675
672
|
] });
|
|
676
673
|
};
|
|
677
674
|
const CLOSE_ICON_SIZE = "0.75rem";
|
|
678
675
|
const HAMBURGER_ICON_SIZE = "1rem";
|
|
679
676
|
const MobileNavigation = ({ menu }) => {
|
|
680
|
-
const [
|
|
677
|
+
const [expanded, setExpanded] = useState(null);
|
|
681
678
|
const { isOpen, onToggle } = useDisclosure();
|
|
682
679
|
const background = useColorModeValue("gray.50", "gray.900");
|
|
683
|
-
function handleExpand(
|
|
684
|
-
|
|
680
|
+
function handleExpand(index) {
|
|
681
|
+
return () => {
|
|
682
|
+
setExpanded((prev) => prev === index ? null : index);
|
|
683
|
+
};
|
|
685
684
|
}
|
|
686
685
|
function handleClick() {
|
|
687
|
-
|
|
686
|
+
setExpanded(null);
|
|
688
687
|
onToggle();
|
|
689
688
|
}
|
|
690
689
|
return /* @__PURE__ */ jsxs(Box, { display: { base: "block", md: "none" }, children: [
|
|
@@ -711,7 +710,7 @@ const MobileNavigation = ({ menu }) => {
|
|
|
711
710
|
bg: background,
|
|
712
711
|
children: menu.map((item, index) => {
|
|
713
712
|
var _a;
|
|
714
|
-
return /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(NavList, { ...item, isExpanded:
|
|
713
|
+
return /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(NavList, { ...item, isExpanded: index === expanded, onExpand: handleExpand(index) }) : /* @__PURE__ */ jsx(NavLink, { ...item }) }, index);
|
|
715
714
|
})
|
|
716
715
|
}
|
|
717
716
|
) }) })
|
|
@@ -618,7 +618,7 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
618
618
|
children: label
|
|
619
619
|
}
|
|
620
620
|
) }),
|
|
621
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: gatsby.Link, to: `${path}${child.path}`, p: 2, role: "group", children: [
|
|
621
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { p: 2, border: 0, minW: "sm", rounded: "xl", boxShadow: "xl", bg: background, children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: gatsby.Link, to: `${path}${child.path}`, p: 2, role: "group", children: [
|
|
622
622
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
|
|
623
623
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
624
624
|
react.Flex,
|
|
@@ -633,20 +633,17 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
633
633
|
children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icons.ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
|
|
634
634
|
}
|
|
635
635
|
)
|
|
636
|
-
] }) },
|
|
636
|
+
] }) }, index2)) }) })
|
|
637
637
|
] });
|
|
638
638
|
};
|
|
639
639
|
const DesktopNavigation = ({ menu }) => {
|
|
640
640
|
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item, index2) => {
|
|
641
641
|
var _a;
|
|
642
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList$1, { ...item }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) },
|
|
642
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList$1, { ...item }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, index2);
|
|
643
643
|
}) });
|
|
644
644
|
};
|
|
645
645
|
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
646
646
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
647
|
-
function handleClick() {
|
|
648
|
-
onExpand(path);
|
|
649
|
-
}
|
|
650
647
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
651
648
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
652
649
|
react.Flex,
|
|
@@ -657,7 +654,7 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
657
654
|
align: "center",
|
|
658
655
|
justifyContent: "space-between",
|
|
659
656
|
_hover: { textDecoration: "none", color: "brand.400" },
|
|
660
|
-
onClick:
|
|
657
|
+
onClick: onExpand,
|
|
661
658
|
children: [
|
|
662
659
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
663
660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -672,20 +669,22 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
672
669
|
]
|
|
673
670
|
}
|
|
674
671
|
),
|
|
675
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: react.useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: gatsby.Link, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) },
|
|
672
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { ml: 2, pl: 0, borderLeft: 1, borderStyle: "solid", borderColor: react.useColorModeValue("gray.200", "gray.700"), children: children == null ? void 0 : children.map((child, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: gatsby.Link, to: `${path}${child.path}`, p: 2, fontSize: "sm", children: child.label }) }, index2)) }) })
|
|
676
673
|
] });
|
|
677
674
|
};
|
|
678
675
|
const CLOSE_ICON_SIZE = "0.75rem";
|
|
679
676
|
const HAMBURGER_ICON_SIZE = "1rem";
|
|
680
677
|
const MobileNavigation = ({ menu }) => {
|
|
681
|
-
const [
|
|
678
|
+
const [expanded, setExpanded] = react$1.useState(null);
|
|
682
679
|
const { isOpen, onToggle } = react.useDisclosure();
|
|
683
680
|
const background = react.useColorModeValue("gray.50", "gray.900");
|
|
684
|
-
function handleExpand(
|
|
685
|
-
|
|
681
|
+
function handleExpand(index2) {
|
|
682
|
+
return () => {
|
|
683
|
+
setExpanded((prev) => prev === index2 ? null : index2);
|
|
684
|
+
};
|
|
686
685
|
}
|
|
687
686
|
function handleClick() {
|
|
688
|
-
|
|
687
|
+
setExpanded(null);
|
|
689
688
|
onToggle();
|
|
690
689
|
}
|
|
691
690
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: { base: "block", md: "none" }, children: [
|
|
@@ -712,7 +711,7 @@ const MobileNavigation = ({ menu }) => {
|
|
|
712
711
|
bg: background,
|
|
713
712
|
children: menu.map((item, index2) => {
|
|
714
713
|
var _a;
|
|
715
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList, { ...item, isExpanded:
|
|
714
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList, { ...item, isExpanded: index2 === expanded, onExpand: handleExpand(index2) }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, index2);
|
|
716
715
|
})
|
|
717
716
|
}
|
|
718
717
|
) }) })
|
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-DWa1ea5F.js");
|
|
4
4
|
const index$1 = require("./index-IpSV-c71.js");
|
|
5
5
|
const i18n$1 = require("./index-DCIXk-YH.js");
|
|
6
6
|
const index$2 = require("./index-BWuTDC6H.js");
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, S, T, f } from "./index-
|
|
1
|
+
import { A, B, g, C, h, E, F, a, b, G, c, d, i, H, L, j, e, P, k, S, T, f } from "./index-COCjNsCL.mjs";
|
|
2
2
|
import { u } from "./index-xuSxvz5z.mjs";
|
|
3
3
|
import { a as a2, G as G2, r } from "./index-DxLcykuT.mjs";
|
|
4
4
|
import { M } from "./index-wbMOJRW_.mjs";
|