@anywayseo/tools 2.2.2 → 2.2.3

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("../index-BkW3HmFj.js");
3
+ const index = require("../index-B-J8fcfm.js");
4
4
  exports.Author = index.Author;
5
5
  exports.BonusCard = index.BonusCard;
6
6
  exports.Center = index.Center;
@@ -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-BOs_12nr.mjs";
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-CAcPXV4F.mjs";
2
2
  export {
3
3
  A as Author,
4
4
  B as BonusCard,
@@ -642,17 +642,18 @@ const DesktopNavigation = ({ menu }) => {
642
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 }) }, item.path || index2);
643
643
  }) });
644
644
  };
645
+ const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
645
646
  const NavList = ({ path, label, children, isExpanded, onExpand }) => {
646
647
  function handleClick() {
647
648
  onExpand(path);
648
649
  }
649
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { w: "full", children: [
650
+ return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
650
651
  /* @__PURE__ */ jsxRuntime.jsxs(
651
652
  react.Flex,
652
653
  {
653
654
  as: "button",
654
655
  p: 2,
655
- pe: 1,
656
+ pr: "3px",
656
657
  align: "center",
657
658
  justifyContent: "space-between",
658
659
  _hover: { textDecoration: "none", color: "brand.400" },
@@ -662,8 +663,8 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
662
663
  /* @__PURE__ */ jsxRuntime.jsx(
663
664
  icons.ChevronDownIcon,
664
665
  {
665
- w: 24,
666
- h: 24,
666
+ w: CHEVRON_DOWN_ICON_SIZE,
667
+ h: CHEVRON_DOWN_ICON_SIZE,
667
668
  transform: isExpanded ? "rotate(180deg)" : "",
668
669
  transition: "all .25s ease-in-out"
669
670
  }
@@ -674,6 +675,8 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
674
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 }) }, child.path)) }) })
675
676
  ] });
676
677
  };
678
+ const CLOSE_ICON_SIZE = "0.75rem";
679
+ const HAMBURGER_ICON_SIZE = "1rem";
677
680
  const MobileNavigation = ({ menu }) => {
678
681
  const [selected, setSelected] = react$1.useState(null);
679
682
  const { isOpen, onToggle } = react.useDisclosure();
@@ -689,7 +692,7 @@ const MobileNavigation = ({ menu }) => {
689
692
  /* @__PURE__ */ jsxRuntime.jsx(
690
693
  react.IconButton,
691
694
  {
692
- icon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 12, h: 12 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.HamburgerIcon, { w: 18, h: 18 }),
695
+ 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
696
  size: "sm",
694
697
  variant: "ghost",
695
698
  "aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
@@ -697,10 +700,22 @@ const MobileNavigation = ({ menu }) => {
697
700
  onClick: handleClick
698
701
  }
699
702
  ),
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(react.List, { spacing: 2, p: 2, w: "full", borderRadius: "md", boxShadow: "md", bg: background, children: menu.map((item, index2) => {
701
- var _a;
702
- 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: item.path === selected, onExpand: handleExpand }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, item.path || index2);
703
- }) }) }) })
703
+ /* @__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(
704
+ react.List,
705
+ {
706
+ spacing: 2,
707
+ p: 2,
708
+ boxShadow: "md",
709
+ borderWidth: "1px",
710
+ borderColor: react.useColorModeValue("gray.200", "gray.700"),
711
+ borderRadius: "md",
712
+ bg: background,
713
+ children: menu.map((item, index2) => {
714
+ 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: item.path === selected, onExpand: handleExpand }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, item.path || index2);
716
+ })
717
+ }
718
+ ) }) })
704
719
  ] });
705
720
  };
706
721
  const Navigation = ({ menu }) => {
@@ -641,17 +641,18 @@ const DesktopNavigation = ({ menu }) => {
641
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 }) }, item.path || index);
642
642
  }) });
643
643
  };
644
+ const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
644
645
  const NavList = ({ path, label, children, isExpanded, onExpand }) => {
645
646
  function handleClick() {
646
647
  onExpand(path);
647
648
  }
648
- return /* @__PURE__ */ jsxs(Stack, { w: "full", children: [
649
+ return /* @__PURE__ */ jsxs(Stack, { flex: 1, children: [
649
650
  /* @__PURE__ */ jsxs(
650
651
  Flex,
651
652
  {
652
653
  as: "button",
653
654
  p: 2,
654
- pe: 1,
655
+ pr: "3px",
655
656
  align: "center",
656
657
  justifyContent: "space-between",
657
658
  _hover: { textDecoration: "none", color: "brand.400" },
@@ -661,8 +662,8 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
661
662
  /* @__PURE__ */ jsx(
662
663
  ChevronDownIcon,
663
664
  {
664
- w: 24,
665
- h: 24,
665
+ w: CHEVRON_DOWN_ICON_SIZE,
666
+ h: CHEVRON_DOWN_ICON_SIZE,
666
667
  transform: isExpanded ? "rotate(180deg)" : "",
667
668
  transition: "all .25s ease-in-out"
668
669
  }
@@ -673,6 +674,8 @@ const NavList = ({ path, label, children, isExpanded, onExpand }) => {
673
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 }) }, child.path)) }) })
674
675
  ] });
675
676
  };
677
+ const CLOSE_ICON_SIZE = "0.75rem";
678
+ const HAMBURGER_ICON_SIZE = "1rem";
676
679
  const MobileNavigation = ({ menu }) => {
677
680
  const [selected, setSelected] = useState(null);
678
681
  const { isOpen, onToggle } = useDisclosure();
@@ -688,7 +691,7 @@ const MobileNavigation = ({ menu }) => {
688
691
  /* @__PURE__ */ jsx(
689
692
  IconButton,
690
693
  {
691
- icon: isOpen ? /* @__PURE__ */ jsx(CloseIcon, { w: 12, h: 12 }) : /* @__PURE__ */ jsx(HamburgerIcon, { w: 18, h: 18 }),
694
+ 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
695
  size: "sm",
693
696
  variant: "ghost",
694
697
  "aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
@@ -696,10 +699,22 @@ const MobileNavigation = ({ menu }) => {
696
699
  onClick: handleClick
697
700
  }
698
701
  ),
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(List$1, { spacing: 2, p: 2, w: "full", borderRadius: "md", boxShadow: "md", bg: background, children: menu.map((item, index) => {
700
- var _a;
701
- return /* @__PURE__ */ jsx(Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsx(NavList, { ...item, isExpanded: item.path === selected, onExpand: handleExpand }) : /* @__PURE__ */ jsx(NavLink, { ...item }) }, item.path || index);
702
- }) }) }) })
702
+ /* @__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(
703
+ List$1,
704
+ {
705
+ spacing: 2,
706
+ p: 2,
707
+ boxShadow: "md",
708
+ borderWidth: "1px",
709
+ borderColor: useColorModeValue("gray.200", "gray.700"),
710
+ borderRadius: "md",
711
+ bg: background,
712
+ children: menu.map((item, index) => {
713
+ 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: item.path === selected, onExpand: handleExpand }) : /* @__PURE__ */ jsx(NavLink, { ...item }) }, item.path || index);
715
+ })
716
+ }
717
+ ) }) })
703
718
  ] });
704
719
  };
705
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-BkW3HmFj.js");
3
+ const index = require("./index-B-J8fcfm.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-BOs_12nr.mjs";
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-CAcPXV4F.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";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@anywayseo/tools",
3
3
  "description": "Shared UI Components and Modules",
4
- "version": "2.2.2",
4
+ "version": "2.2.3",
5
5
  "keywords": [
6
6
  "react",
7
7
  "ui",