@anywayseo/tools 2.2.1 → 2.2.2
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/nav-link/index.d.ts +2 -2
- package/dist/{index-Bc2a2-SP.mjs → index-BOs_12nr.mjs} +4 -4
- package/dist/{index-Cn_SqfLz.js → index-BkW3HmFj.js} +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/components/navigation/index.d.ts +5 -2
- 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-BkW3HmFj.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 {
|
|
2
|
-
type NavLinkProps =
|
|
1
|
+
import { INavItem } from '../../../../../types';
|
|
2
|
+
type NavLinkProps = Omit<INavItem, 'children'>;
|
|
3
3
|
declare const NavLink: import('react').ForwardRefExoticComponent<NavLinkProps & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
4
4
|
export default NavLink;
|
|
@@ -636,9 +636,9 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
636
636
|
] });
|
|
637
637
|
};
|
|
638
638
|
const DesktopNavigation = ({ menu }) => {
|
|
639
|
-
return /* @__PURE__ */ jsx(Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item) => {
|
|
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 }) }, item.path);
|
|
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
644
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
@@ -696,9 +696,9 @@ const MobileNavigation = ({ menu }) => {
|
|
|
696
696
|
onClick: handleClick
|
|
697
697
|
}
|
|
698
698
|
),
|
|
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) => {
|
|
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
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);
|
|
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
|
}) }) }) })
|
|
703
703
|
] });
|
|
704
704
|
};
|
|
@@ -637,9 +637,9 @@ const NavList$1 = ({ path, label, children }) => {
|
|
|
637
637
|
] });
|
|
638
638
|
};
|
|
639
639
|
const DesktopNavigation = ({ menu }) => {
|
|
640
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item) => {
|
|
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 }) }, item.path);
|
|
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
645
|
const NavList = ({ path, label, children, isExpanded, onExpand }) => {
|
|
@@ -697,9 +697,9 @@ const MobileNavigation = ({ menu }) => {
|
|
|
697
697
|
onClick: handleClick
|
|
698
698
|
}
|
|
699
699
|
),
|
|
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) => {
|
|
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
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);
|
|
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
|
}) }) }) })
|
|
704
704
|
] });
|
|
705
705
|
};
|
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-BkW3HmFj.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-BOs_12nr.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";
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
type Path = `/${string}`;
|
|
2
|
+
type EmptyPath = '';
|
|
2
3
|
type IndexPath = '/';
|
|
3
4
|
export interface INavItem<P extends Path = Path> {
|
|
4
|
-
path: P;
|
|
5
|
+
path: P | EmptyPath;
|
|
5
6
|
label: string;
|
|
6
7
|
children?: ISubNavItem[];
|
|
7
8
|
}
|
|
8
|
-
export interface ISubNavItem<P extends Path = Path>
|
|
9
|
+
export interface ISubNavItem<P extends Path = Path> {
|
|
10
|
+
path: P | IndexPath;
|
|
11
|
+
label: string;
|
|
9
12
|
}
|
|
10
13
|
export {};
|