@anywayseo/tools 2.2.2 → 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-BOs_12nr.mjs → index-COCjNsCL.mjs} +35 -21
- package/dist/{index-BkW3HmFj.js → index-DWa1ea5F.js} +35 -21
- 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,37 +632,35 @@ 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
|
+
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
644
645
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
645
|
-
|
|
646
|
-
onExpand(path);
|
|
647
|
-
}
|
|
648
|
-
return /* @__PURE__ */ jsxs(Stack, { w: "full", children: [
|
|
646
|
+
return /* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
|
|
649
647
|
/* @__PURE__ */ jsxs(
|
|
650
648
|
Flex,
|
|
651
649
|
{
|
|
652
650
|
as: "button",
|
|
653
651
|
p: 2,
|
|
654
|
-
|
|
652
|
+
pr: "3px",
|
|
655
653
|
align: "center",
|
|
656
654
|
justifyContent: "space-between",
|
|
657
655
|
_hover: { textDecoration: "none", color: "brand.400" },
|
|
658
|
-
onClick:
|
|
656
|
+
onClick: onExpand,
|
|
659
657
|
children: [
|
|
660
658
|
/* @__PURE__ */ jsx(Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
661
659
|
/* @__PURE__ */ jsx(
|
|
662
660
|
ChevronDownIcon,
|
|
663
661
|
{
|
|
664
|
-
w:
|
|
665
|
-
h:
|
|
662
|
+
w: CHEVRON_DOWN_ICON_SIZE,
|
|
663
|
+
h: CHEVRON_DOWN_ICON_SIZE,
|
|
666
664
|
transform: isExpanded ? "rotate(180deg)" : "",
|
|
667
665
|
transition: "all .25s ease-in-out"
|
|
668
666
|
}
|
|
@@ -670,25 +668,29 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
670
668
|
]
|
|
671
669
|
}
|
|
672
670
|
),
|
|
673
|
-
/* @__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)) }) })
|
|
674
672
|
] });
|
|
675
673
|
};
|
|
674
|
+
const CLOSE_ICON_SIZE = "0.75rem";
|
|
675
|
+
const HAMBURGER_ICON_SIZE = "1rem";
|
|
676
676
|
const MobileNavigation = ({ menu }) => {
|
|
677
|
-
const [
|
|
677
|
+
const [expanded, setExpanded] = useState(null);
|
|
678
678
|
const { isOpen, onToggle } = useDisclosure();
|
|
679
679
|
const background = useColorModeValue("gray.50", "gray.900");
|
|
680
|
-
function handleExpand(
|
|
681
|
-
|
|
680
|
+
function handleExpand(index) {
|
|
681
|
+
return () => {
|
|
682
|
+
setExpanded((prev) => prev === index ? null : index);
|
|
683
|
+
};
|
|
682
684
|
}
|
|
683
685
|
function handleClick() {
|
|
684
|
-
|
|
686
|
+
setExpanded(null);
|
|
685
687
|
onToggle();
|
|
686
688
|
}
|
|
687
689
|
return /* @__PURE__ */ jsxs(Box, { display: { base: "block", md: "none" }, children: [
|
|
688
690
|
/* @__PURE__ */ jsx(
|
|
689
691
|
IconButton,
|
|
690
692
|
{
|
|
691
|
-
icon: isOpen ? /* @__PURE__ */ jsx(CloseIcon, { w:
|
|
693
|
+
icon: isOpen ? /* @__PURE__ */ jsx(CloseIcon, { w: CLOSE_ICON_SIZE, h: CLOSE_ICON_SIZE }) : /* @__PURE__ */ jsx(HamburgerIcon, { w: HAMBURGER_ICON_SIZE, h: HAMBURGER_ICON_SIZE }),
|
|
692
694
|
size: "sm",
|
|
693
695
|
variant: "ghost",
|
|
694
696
|
"aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
|
|
@@ -696,10 +698,22 @@ const MobileNavigation = ({ menu }) => {
|
|
|
696
698
|
onClick: handleClick
|
|
697
699
|
}
|
|
698
700
|
),
|
|
699
|
-
/* @__PURE__ */ jsx(Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsx(Box, { position: "absolute", top: 16, left: 0, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsx(
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
701
|
+
/* @__PURE__ */ jsx(Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsx(Box, { position: "absolute", top: 16, left: 0, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsx(
|
|
702
|
+
List$1,
|
|
703
|
+
{
|
|
704
|
+
spacing: 2,
|
|
705
|
+
p: 2,
|
|
706
|
+
boxShadow: "md",
|
|
707
|
+
borderWidth: "1px",
|
|
708
|
+
borderColor: useColorModeValue("gray.200", "gray.700"),
|
|
709
|
+
borderRadius: "md",
|
|
710
|
+
bg: background,
|
|
711
|
+
children: menu.map((item, index) => {
|
|
712
|
+
var _a;
|
|
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);
|
|
714
|
+
})
|
|
715
|
+
}
|
|
716
|
+
) }) })
|
|
703
717
|
] });
|
|
704
718
|
};
|
|
705
719
|
const Navigation = ({ menu }) => {
|
|
@@ -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,37 +633,35 @@ 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
|
+
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
645
646
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
646
|
-
|
|
647
|
-
onExpand(path);
|
|
648
|
-
}
|
|
649
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { w: "full", children: [
|
|
647
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
650
648
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
651
649
|
react.Flex,
|
|
652
650
|
{
|
|
653
651
|
as: "button",
|
|
654
652
|
p: 2,
|
|
655
|
-
|
|
653
|
+
pr: "3px",
|
|
656
654
|
align: "center",
|
|
657
655
|
justifyContent: "space-between",
|
|
658
656
|
_hover: { textDecoration: "none", color: "brand.400" },
|
|
659
|
-
onClick:
|
|
657
|
+
onClick: onExpand,
|
|
660
658
|
children: [
|
|
661
659
|
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
662
660
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
663
661
|
icons.ChevronDownIcon,
|
|
664
662
|
{
|
|
665
|
-
w:
|
|
666
|
-
h:
|
|
663
|
+
w: CHEVRON_DOWN_ICON_SIZE,
|
|
664
|
+
h: CHEVRON_DOWN_ICON_SIZE,
|
|
667
665
|
transform: isExpanded ? "rotate(180deg)" : "",
|
|
668
666
|
transition: "all .25s ease-in-out"
|
|
669
667
|
}
|
|
@@ -671,25 +669,29 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
|
671
669
|
]
|
|
672
670
|
}
|
|
673
671
|
),
|
|
674
|
-
/* @__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)) }) })
|
|
675
673
|
] });
|
|
676
674
|
};
|
|
675
|
+
const CLOSE_ICON_SIZE = "0.75rem";
|
|
676
|
+
const HAMBURGER_ICON_SIZE = "1rem";
|
|
677
677
|
const MobileNavigation = ({ menu }) => {
|
|
678
|
-
const [
|
|
678
|
+
const [expanded, setExpanded] = react$1.useState(null);
|
|
679
679
|
const { isOpen, onToggle } = react.useDisclosure();
|
|
680
680
|
const background = react.useColorModeValue("gray.50", "gray.900");
|
|
681
|
-
function handleExpand(
|
|
682
|
-
|
|
681
|
+
function handleExpand(index2) {
|
|
682
|
+
return () => {
|
|
683
|
+
setExpanded((prev) => prev === index2 ? null : index2);
|
|
684
|
+
};
|
|
683
685
|
}
|
|
684
686
|
function handleClick() {
|
|
685
|
-
|
|
687
|
+
setExpanded(null);
|
|
686
688
|
onToggle();
|
|
687
689
|
}
|
|
688
690
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: { base: "block", md: "none" }, children: [
|
|
689
691
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
690
692
|
react.IconButton,
|
|
691
693
|
{
|
|
692
|
-
icon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w:
|
|
694
|
+
icon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: CLOSE_ICON_SIZE, h: CLOSE_ICON_SIZE }) : /* @__PURE__ */ jsxRuntime.jsx(icons.HamburgerIcon, { w: HAMBURGER_ICON_SIZE, h: HAMBURGER_ICON_SIZE }),
|
|
693
695
|
size: "sm",
|
|
694
696
|
variant: "ghost",
|
|
695
697
|
"aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
|
|
@@ -697,10 +699,22 @@ const MobileNavigation = ({ menu }) => {
|
|
|
697
699
|
onClick: handleClick
|
|
698
700
|
}
|
|
699
701
|
),
|
|
700
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { position: "absolute", top: 16, left: 0, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
702
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { position: "absolute", top: 16, left: 0, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
703
|
+
react.List,
|
|
704
|
+
{
|
|
705
|
+
spacing: 2,
|
|
706
|
+
p: 2,
|
|
707
|
+
boxShadow: "md",
|
|
708
|
+
borderWidth: "1px",
|
|
709
|
+
borderColor: react.useColorModeValue("gray.200", "gray.700"),
|
|
710
|
+
borderRadius: "md",
|
|
711
|
+
bg: background,
|
|
712
|
+
children: menu.map((item, index2) => {
|
|
713
|
+
var _a;
|
|
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);
|
|
715
|
+
})
|
|
716
|
+
}
|
|
717
|
+
) }) })
|
|
704
718
|
] });
|
|
705
719
|
};
|
|
706
720
|
const Navigation = ({ menu }) => {
|
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";
|