@anywayseo/tools 5.5.0 → 5.7.0
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/action-button/index.d.ts +5 -0
- package/dist/components/article-card/index.d.ts +7 -0
- package/dist/components/article-card-grid/index.d.ts +7 -0
- package/dist/components/article-info-card/index.d.ts +5 -0
- package/dist/components/base/article-meta/index.d.ts +7 -0
- package/dist/components/base/article-meta/item/index.d.ts +7 -0
- package/dist/components/base/copy-text/index.d.ts +6 -0
- package/dist/components/base/grid/index.d.ts +2 -4
- package/dist/components/base/h1/index.d.ts +4 -0
- package/dist/components/base/h2/index.d.ts +4 -0
- package/dist/components/base/h3/index.d.ts +4 -0
- package/dist/components/base/index.d.ts +11 -0
- package/dist/components/base/link/index.d.ts +5 -1
- package/dist/components/base/link/utils.d.ts +1 -0
- package/dist/components/base/ol/index.d.ts +4 -0
- package/dist/components/base/p/index.d.ts +4 -0
- package/dist/components/base/rating/index.d.ts +10 -0
- package/dist/components/base/ul/index.d.ts +4 -0
- package/dist/components/bonus-card-grid/index.d.ts +2 -4
- package/dist/components/casino-table/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-actions/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-bonus/index.d.ts +8 -0
- package/dist/components/casino-table/row/casino-info/index.d.ts +7 -0
- package/dist/components/casino-table/row/casino-info/item/index.d.ts +7 -0
- package/dist/components/casino-table/row/casino-info/utils.d.ts +2 -0
- package/dist/components/casino-table/row/casino-license/index.d.ts +5 -0
- package/dist/components/casino-table/row/casino-logo/index.d.ts +9 -0
- package/dist/components/casino-table/row/casino-name/index.d.ts +8 -0
- package/dist/components/casino-table/row/cell/index.d.ts +7 -0
- package/dist/components/casino-table/row/index.d.ts +7 -0
- package/dist/components/feature-card-grid/index.d.ts +2 -4
- package/dist/components/game-card-grid/index.d.ts +2 -4
- package/dist/components/game-demo/content/index.d.ts +1 -1
- package/dist/components/game-demo/index.d.ts +2 -2
- package/dist/components/game-demo/preview/alert/index.d.ts +3 -0
- package/dist/components/game-demo/preview/index.d.ts +2 -1
- package/dist/components/index.cjs +30 -9
- package/dist/components/index.d.ts +7 -3
- package/dist/components/index.mjs +44 -23
- package/dist/components/informer/index.d.ts +9 -0
- package/dist/components/informer/utils.d.ts +5 -0
- package/dist/components/{contact-form → pages/contacts/contact-form}/index.d.ts +1 -1
- package/dist/components/pages/contacts/index.d.ts +3 -0
- package/dist/components/pages/cookie-policy/index.d.ts +3 -0
- package/dist/components/pages/index.d.ts +5 -0
- package/dist/components/pages/privacy-policy/index.d.ts +6 -0
- package/dist/components/pages/terms-and-conditions/index.d.ts +6 -0
- package/dist/components/tip/index.d.ts +3 -0
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.mjs +2 -2
- package/dist/i18n/index.cjs +10 -5
- package/dist/i18n/index.mjs +10 -5
- package/dist/i18n/resources/bg/index.d.ts +331 -0
- package/dist/i18n/resources/da/index.d.ts +331 -0
- package/dist/i18n/resources/de/index.d.ts +219 -0
- package/dist/i18n/resources/en/index.d.ts +219 -0
- package/dist/i18n/resources/fi/index.d.ts +331 -0
- package/dist/i18n/resources/fr/index.d.ts +219 -0
- package/dist/i18n/resources/it/index.d.ts +219 -0
- package/dist/i18n/resources/ka/index.d.ts +331 -0
- package/dist/i18n/resources/pt/index.d.ts +331 -0
- package/dist/i18n/resources/ru/index.d.ts +219 -0
- package/dist/index-B-k9oWE7.js +3552 -0
- package/dist/{index-D86anUPd.js → index-B71VkIfX.js} +426 -726
- package/dist/index-BEjKnOZA.mjs +28 -0
- package/dist/index-BTpEZIok.js +401 -0
- package/dist/index-BeJTy4iY.mjs +26 -0
- package/dist/index-BfITsKAr.js +25 -0
- package/dist/{index-BmaWfWLV.mjs → index-Bph7a3PR.mjs} +4 -0
- package/dist/{index-BCK4kr6V.mjs → index-C7z5qqm_.mjs} +3 -26
- package/dist/{index-tj12BA6U.mjs → index-CB0JfZMx.mjs} +1 -1
- package/dist/{index-cEaX-HbN.mjs → index-CEqTLcAR.mjs} +427 -727
- package/dist/index-CVN8I7r9.mjs +3553 -0
- package/dist/{index-CAfBnNV6.js → index-D15SAjJc.js} +1 -1
- package/dist/index-DDg_PkD2.js +27 -0
- package/dist/{index-BzbpMLDD.mjs → index-DHURrUMW.mjs} +1 -1
- package/dist/{index-At00w6EN.js → index-DgrIJs-a.js} +4 -0
- package/dist/index-FfZIjQy3.mjs +45 -0
- package/dist/index-Lln67Kfn.mjs +402 -0
- package/dist/{index-DZBLiQFh.js → index-QPgJfbrC.js} +52 -36
- package/dist/{index-BcFDxh8P.js → index-TxqSZvgf.js} +15 -27
- package/dist/{index-8_-KtKsW.mjs → index-ksqN4RPm.mjs} +50 -34
- package/dist/{index-WFgDSB1A.js → index-ma-iV7GU.js} +1 -1
- package/dist/{index-BICcOaT7.js → index-qR3kVjjs.js} +0 -23
- package/dist/index.cjs +73 -45
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +75 -47
- package/dist/{components/layout → layout}/footer/navigation/index.d.ts +1 -1
- package/dist/layout/header/locale-switcher/icons/brazil/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/bulgaria/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/denmark/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/finland/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/france/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/georgia/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/germany/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/globe/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/index.d.ts +10 -0
- package/dist/layout/header/locale-switcher/icons/italy/index.d.ts +2 -0
- package/dist/layout/header/locale-switcher/icons/russia/index.d.ts +2 -0
- package/dist/{components/layout → layout}/header/locale-switcher/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/locale-switcher/utils.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/desktop/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/desktop/nav-list/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/mobile/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/mobile/nav-list/index.d.ts +1 -1
- package/dist/{components/layout → layout}/header/navigation/nav-link/index.d.ts +1 -1
- package/dist/{components/layout → layout}/hero/index.d.ts +1 -1
- package/dist/layout/index.cjs +597 -0
- package/dist/layout/index.mjs +598 -0
- package/dist/providers/index.cjs +2 -2
- package/dist/providers/index.mjs +2 -2
- package/dist/providers/mdx-provider/types.d.ts +3 -1
- package/dist/providers/mdx-provider/utils.d.ts +1 -2
- package/dist/types/components/article-card/index.d.ts +9 -0
- package/dist/types/components/button/index.d.ts +1 -1
- package/dist/types/components/casino/index.d.ts +32 -0
- package/dist/types/components/casino-info/index.d.ts +12 -0
- package/dist/types/components/common/index.d.ts +1 -1
- package/dist/types/components/game-info/index.d.ts +4 -8
- package/dist/types/components/grid/index.d.ts +4 -0
- package/dist/types/components/index.d.ts +4 -0
- package/dist/types/components/informer/index.d.ts +5 -0
- package/dist/types/components/strapi-component/index.d.ts +1 -1
- package/dist/types/content/article/index.d.ts +12 -0
- package/dist/types/content/index.d.ts +1 -0
- package/dist/types/i18n/index.d.ts +2 -2
- package/dist/utils/index.cjs +15 -13
- package/dist/utils/index.mjs +10 -8
- package/dist/utils/navigation/index.d.ts +1 -0
- package/package.json +7 -1
- package/dist/components/layout/header/locale-switcher/icons/earth/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/france/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/germany/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/globe/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/index.d.ts +0 -6
- package/dist/components/layout/header/locale-switcher/icons/italy/index.d.ts +0 -2
- package/dist/components/layout/header/locale-switcher/icons/russia/index.d.ts +0 -2
- package/dist/index-Bts2DBYS.mjs +0 -637
- package/dist/index-CJVr79Z2.js +0 -636
- package/dist/index-C_FekfFC.mjs +0 -57
- /package/dist/components/{layout → base}/container/index.d.ts +0 -0
- /package/dist/components/{layout → base}/logo/index.d.ts +0 -0
- /package/dist/components/{not-found → pages/not-found}/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/content/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/brand/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/copyright/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/disclaimer/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/extra/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/footer/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/brand/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/header/theme-toggler/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/main/index.d.ts +0 -0
- /package/dist/{components/layout → layout}/scroll-to-top/index.d.ts +0 -0
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
const react = require("@chakra-ui/react");
|
|
4
|
+
const reactI18next = require("react-i18next");
|
|
5
|
+
require("@mdx-js/react");
|
|
6
|
+
const index$1 = require("../index-QPgJfbrC.js");
|
|
7
|
+
require("../index-C6MG_f24.js");
|
|
8
|
+
require("../index-B-k9oWE7.js");
|
|
9
|
+
require("react-medium-image-zoom");
|
|
10
|
+
const react$1 = require("react");
|
|
11
|
+
const index = require("../index-BTpEZIok.js");
|
|
12
|
+
const icons = require("@chakra-ui/icons");
|
|
13
|
+
require("i18next");
|
|
14
|
+
require("react-markdown");
|
|
15
|
+
const index$2 = require("../index-qR3kVjjs.js");
|
|
16
|
+
const index$3 = require("../index-DgrIJs-a.js");
|
|
17
|
+
const Content = ({ children }) => {
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", py: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Container, { children }) });
|
|
19
|
+
};
|
|
20
|
+
const Brand$1 = ({ brand }) => {
|
|
21
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", my: 2, py: 8, children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { display: "flex", bgColor: react.useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsxRuntime.jsx(index$1.Link, { to: "/", children: brand }) })
|
|
24
|
+
] });
|
|
25
|
+
};
|
|
26
|
+
const Copyright = () => {
|
|
27
|
+
const { metadata } = index$1.useSiteContext();
|
|
28
|
+
const { t } = reactI18next.useTranslation("footer");
|
|
29
|
+
const siteName = metadata.name;
|
|
30
|
+
const lang = metadata.lang;
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$2.getCurrentYear(lang), siteName }) });
|
|
32
|
+
};
|
|
33
|
+
const Disclaimer = () => {
|
|
34
|
+
const { metadata } = index$1.useSiteContext();
|
|
35
|
+
const { t } = reactI18next.useTranslation("footer");
|
|
36
|
+
const siteName = metadata.name;
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
|
|
38
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontWeight: "bold", color: "red.600", children: t("disclaimer.title") }),
|
|
39
|
+
t("disclaimer.description", { siteName })
|
|
40
|
+
] });
|
|
41
|
+
};
|
|
42
|
+
const Extra = ({ children }) => {
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", my: 2, children });
|
|
44
|
+
};
|
|
45
|
+
const Navigation$1 = ({ menu }) => {
|
|
46
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
+
react.SimpleGrid,
|
|
48
|
+
{
|
|
49
|
+
as: "ul",
|
|
50
|
+
columns: { base: 1, sm: 2, md: 4 },
|
|
51
|
+
mt: 4,
|
|
52
|
+
mb: 6,
|
|
53
|
+
p: 0,
|
|
54
|
+
spacing: 4,
|
|
55
|
+
justifyItems: { base: "flex-start", md: "center" },
|
|
56
|
+
justifyContent: "space-between",
|
|
57
|
+
children: menu.map(({ slug, label }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
+
react.Text,
|
|
59
|
+
{
|
|
60
|
+
as: index$1.Link,
|
|
61
|
+
to: slug,
|
|
62
|
+
fontSize: "md",
|
|
63
|
+
fontWeight: "semibold",
|
|
64
|
+
colorScheme: "gray",
|
|
65
|
+
_hover: { textDecoration: "none", color: "brand.400" },
|
|
66
|
+
children: label
|
|
67
|
+
}
|
|
68
|
+
) }, index2))
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
const Footer = () => {
|
|
73
|
+
const { metadata, navigation, config } = index$1.useSiteContext();
|
|
74
|
+
const { currentLocale } = index$1.usePageContext();
|
|
75
|
+
const menu = navigation.footer[currentLocale.code] ?? [];
|
|
76
|
+
const socialNetworks = metadata.socialNetworks ?? [];
|
|
77
|
+
const { extra, showDisclaimer = true } = (config == null ? void 0 : config.footer) ?? {};
|
|
78
|
+
const hasNavigation = !!menu.length;
|
|
79
|
+
const hasSocialNetworks = !!socialNetworks.length;
|
|
80
|
+
const hasExtra = !!extra;
|
|
81
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
+
react.Box,
|
|
83
|
+
{
|
|
84
|
+
as: "footer",
|
|
85
|
+
bg: react.useColorModeValue("gray.50", "gray.900"),
|
|
86
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
87
|
+
py: 4,
|
|
88
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(index.Container, { children: [
|
|
89
|
+
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu }),
|
|
90
|
+
hasExtra && /* @__PURE__ */ jsxRuntime.jsx(Extra, { children: extra }),
|
|
91
|
+
showDisclaimer && /* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
|
|
92
|
+
/* @__PURE__ */ jsxRuntime.jsx(Brand$1, { brand: /* @__PURE__ */ jsxRuntime.jsx(index.Logo, {}) }),
|
|
93
|
+
hasSocialNetworks && /* @__PURE__ */ jsxRuntime.jsx(index.SocialNetworks, { socialNetworks, justify: "center", my: 2 }),
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsx(Copyright, {})
|
|
95
|
+
] })
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
};
|
|
99
|
+
const Brand = ({ brand }) => {
|
|
100
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index$1.Link, { to: "/", children: brand });
|
|
101
|
+
};
|
|
102
|
+
const BrazilIcon = (props) => {
|
|
103
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
104
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsBr0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsBr0)", children: [
|
|
106
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#6da544", d: "M0 0h512v512H0z" }),
|
|
107
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#ffda44", d: "M256 100.2L467.5 256L256 411.8L44.5 256z" }),
|
|
108
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
+
"path",
|
|
110
|
+
{
|
|
111
|
+
fill: "#eee",
|
|
112
|
+
d: "M174.2 221a87 87 0 0 0-7.2 36.3l162 49.8a88.5 88.5 0 0 0 14.4-34c-40.6-65.3-119.7-80.3-169.1-52z"
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
"path",
|
|
117
|
+
{
|
|
118
|
+
fill: "#0052b4",
|
|
119
|
+
d: "M255.7 167a89 89 0 0 0-41.9 10.6a89 89 0 0 0-39.6 43.4a181.7 181.7 0 0 1 169.1 52.2a89 89 0 0 0-9-59.4a89 89 0 0 0-78.6-46.8M212 250.5a149 149 0 0 0-45 6.8a89 89 0 0 0 10.5 40.9a89 89 0 0 0 120.6 36.2a89 89 0 0 0 30.7-27.3A151 151 0 0 0 212 250.5"
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] })
|
|
123
|
+
] });
|
|
124
|
+
};
|
|
125
|
+
const BulgariaIcon = (props) => {
|
|
126
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
127
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsBg0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
128
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsBg0)", children: [
|
|
129
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#496e2d", d: "m0 166.9l258-31.7l254 31.7v178l-251.4 41.3L0 344.9z" }),
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M0 0h512v166.9H0z" }),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M0 344.9h512V512H0z" })
|
|
132
|
+
] })
|
|
133
|
+
] });
|
|
134
|
+
};
|
|
135
|
+
const DenmarkIcon = (props) => {
|
|
136
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsDk0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
138
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsDk0)", children: [
|
|
139
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
140
|
+
"path",
|
|
141
|
+
{
|
|
142
|
+
fill: "#d80027",
|
|
143
|
+
d: "M0 0h133.6l32.7 20.3l34-20.3H512v222.6L491.4 256l20.6 33.4V512H200.3l-31.7-20.4l-35 20.4H0V289.4l29.4-33L0 222.7z"
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M133.6 0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0z" })
|
|
147
|
+
] })
|
|
148
|
+
] });
|
|
149
|
+
};
|
|
150
|
+
const FinlandIcon = (props) => {
|
|
151
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
152
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsFi0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
153
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsFi0)", children: [
|
|
154
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
"path",
|
|
156
|
+
{
|
|
157
|
+
fill: "#eee",
|
|
158
|
+
d: "M0 0h133.6l35.3 16.7L200.3 0H512v222.6l-22.6 31.7l22.6 35.1V512H200.3l-32-19.8l-34.7 19.8H0V289.4l22.1-33.3L0 222.6z"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#0052b4", d: "M133.6 0v222.6H0v66.8h133.6V512h66.7V289.4H512v-66.8H200.3V0z" })
|
|
162
|
+
] })
|
|
163
|
+
] });
|
|
164
|
+
};
|
|
165
|
+
const FranceIcon = (props) => {
|
|
166
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
167
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsFr0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
168
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsFr0)", children: [
|
|
169
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z" }),
|
|
170
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#0052b4", d: "M0 0h167v512H0z" }),
|
|
171
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M345 0h167v512H345z" })
|
|
172
|
+
] })
|
|
173
|
+
] });
|
|
174
|
+
};
|
|
175
|
+
const GeorgiaIcon = (props) => {
|
|
176
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsGe0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
178
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsGe0)", children: [
|
|
179
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
180
|
+
"path",
|
|
181
|
+
{
|
|
182
|
+
fill: "#eee",
|
|
183
|
+
d: "M0 0h224l32 32l32-32h224v224l-32 32l32 32v224H288l-32-32l-32 32H0V288l32-32l-32-32Z"
|
|
184
|
+
}
|
|
185
|
+
),
|
|
186
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
187
|
+
"path",
|
|
188
|
+
{
|
|
189
|
+
fill: "#d80027",
|
|
190
|
+
d: "M224 0v224H0v64h224v224h64V288h224v-64H288V0zm-96 96v32H96v32h32v32h32v-32h32v-32h-32V96zm224 0v32h-32v32h32v32h32v-32h32v-32h-32V96zM128 320v32H96v32h32v32h32v-32h32v-32h-32v-32zm224 0v32h-32v32h32v32h32v-32h32v-32h-32v-32z"
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] })
|
|
194
|
+
] });
|
|
195
|
+
};
|
|
196
|
+
const GermanyIcon = (props) => {
|
|
197
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
198
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsDe0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
199
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsDe0)", children: [
|
|
200
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#ffda44", d: "m0 345l256.7-25.5L512 345v167H0z" }),
|
|
201
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "m0 167l255-23l257 23v178H0z" }),
|
|
202
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#333", d: "M0 0h512v167H0z" })
|
|
203
|
+
] })
|
|
204
|
+
] });
|
|
205
|
+
};
|
|
206
|
+
const GlobeIcon = (props) => {
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 496", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
208
|
+
"path",
|
|
209
|
+
{
|
|
210
|
+
fill: "currentColor",
|
|
211
|
+
d: "M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64m324.7-96c-28.6-67.9-86.5-120.4-158-141.6c24.4 33.8 41.2 84.7 50 141.6zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6M487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64M120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64m39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6M19.3 352c28.6 67.9 86.5 120.4 158 141.6c-24.4-33.8-41.2-84.7-50-141.6z"
|
|
212
|
+
}
|
|
213
|
+
) });
|
|
214
|
+
};
|
|
215
|
+
const ItalyIcon = (props) => {
|
|
216
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
217
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsIt0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
218
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsIt0)", children: [
|
|
219
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z" }),
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#6da544", d: "M0 0h167v512H0z" }),
|
|
221
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M345 0h167v512H345z" })
|
|
222
|
+
] })
|
|
223
|
+
] });
|
|
224
|
+
};
|
|
225
|
+
const RussiaIcon = (props) => {
|
|
226
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
|
|
227
|
+
/* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsRu0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
|
|
228
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsRu0)", children: [
|
|
229
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#0052b4", d: "M512 170v172l-256 32L0 342V170l256-32z" }),
|
|
230
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M512 0v170H0V0Z" }),
|
|
231
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M512 342v170H0V342Z" })
|
|
232
|
+
] })
|
|
233
|
+
] });
|
|
234
|
+
};
|
|
235
|
+
function getMappedIcon(code) {
|
|
236
|
+
let icon = GlobeIcon;
|
|
237
|
+
switch (code) {
|
|
238
|
+
case "pt-BR":
|
|
239
|
+
icon = BrazilIcon;
|
|
240
|
+
break;
|
|
241
|
+
case "bg":
|
|
242
|
+
case "bg-BG":
|
|
243
|
+
icon = BulgariaIcon;
|
|
244
|
+
break;
|
|
245
|
+
case "da":
|
|
246
|
+
case "da-DK":
|
|
247
|
+
case "en-DK":
|
|
248
|
+
icon = DenmarkIcon;
|
|
249
|
+
break;
|
|
250
|
+
case "fi":
|
|
251
|
+
case "fi-FI":
|
|
252
|
+
case "sv-FI":
|
|
253
|
+
case "en-FI":
|
|
254
|
+
icon = FinlandIcon;
|
|
255
|
+
break;
|
|
256
|
+
case "fr":
|
|
257
|
+
case "fr-FR":
|
|
258
|
+
icon = FranceIcon;
|
|
259
|
+
break;
|
|
260
|
+
case "ka":
|
|
261
|
+
case "ka-GE":
|
|
262
|
+
icon = GeorgiaIcon;
|
|
263
|
+
break;
|
|
264
|
+
case "de":
|
|
265
|
+
case "de-DE":
|
|
266
|
+
case "en-DE":
|
|
267
|
+
icon = GermanyIcon;
|
|
268
|
+
break;
|
|
269
|
+
case "it":
|
|
270
|
+
case "it-IT":
|
|
271
|
+
icon = ItalyIcon;
|
|
272
|
+
break;
|
|
273
|
+
case "ru":
|
|
274
|
+
case "ru-RU":
|
|
275
|
+
icon = RussiaIcon;
|
|
276
|
+
break;
|
|
277
|
+
case "en":
|
|
278
|
+
default:
|
|
279
|
+
icon = GlobeIcon;
|
|
280
|
+
break;
|
|
281
|
+
}
|
|
282
|
+
return icon;
|
|
283
|
+
}
|
|
284
|
+
const LocaleSwitcher = ({ currentLocale, locales }) => {
|
|
285
|
+
const localeCode = currentLocale.code;
|
|
286
|
+
const localeIcon = getMappedIcon(localeCode);
|
|
287
|
+
const localeLabel = localeCode.split("-")[0].toUpperCase();
|
|
288
|
+
const localeMenuItems = react$1.useMemo(
|
|
289
|
+
() => locales.map((locale) => ({ ...locale, code: locale.code.toLowerCase(), icon: getMappedIcon(locale.code) })),
|
|
290
|
+
[locales]
|
|
291
|
+
);
|
|
292
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Menu, { placement: "bottom-end", children: [
|
|
293
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
294
|
+
react.MenuButton,
|
|
295
|
+
{
|
|
296
|
+
as: react.Button,
|
|
297
|
+
rightIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}),
|
|
298
|
+
w: { base: 20, md: 24 },
|
|
299
|
+
px: { base: 1, md: 3 },
|
|
300
|
+
size: { base: "sm", md: "lg" },
|
|
301
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
302
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: localeIcon }),
|
|
303
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: localeLabel })
|
|
304
|
+
] })
|
|
305
|
+
}
|
|
306
|
+
),
|
|
307
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.MenuList, { minW: "fit-content", children: localeMenuItems.map(({ code, name, icon }) => /* @__PURE__ */ jsxRuntime.jsx(react.MenuItem, { as: index$1.Link, to: `/${code}`, icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icon, w: 4, h: 4 }), children: name }, code)) })
|
|
308
|
+
] });
|
|
309
|
+
};
|
|
310
|
+
const NavLink = react$1.forwardRef(({ slug, label }, ref) => {
|
|
311
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
312
|
+
react.Text,
|
|
313
|
+
{
|
|
314
|
+
ref,
|
|
315
|
+
as: index$1.Link,
|
|
316
|
+
to: slug,
|
|
317
|
+
p: 2,
|
|
318
|
+
fontWeight: "semibold",
|
|
319
|
+
_hover: { textDecoration: "none", color: "brand.400" },
|
|
320
|
+
children: label
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
});
|
|
324
|
+
NavLink.displayName = "NavLink";
|
|
325
|
+
const NavList$1 = ({ slug, label, children }) => {
|
|
326
|
+
const background = react.useColorModeValue("white", "gray.800");
|
|
327
|
+
const backgroundHover = react.useColorModeValue("brand.50", "gray.900");
|
|
328
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { trigger: "hover", placement: "bottom-start", children: [
|
|
329
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
330
|
+
react.Text,
|
|
331
|
+
{
|
|
332
|
+
p: 2,
|
|
333
|
+
fontWeight: "semibold",
|
|
334
|
+
cursor: "pointer",
|
|
335
|
+
tabIndex: 0,
|
|
336
|
+
_hover: { textDecoration: "none", color: "brand.400" },
|
|
337
|
+
children: label
|
|
338
|
+
}
|
|
339
|
+
) }),
|
|
340
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
341
|
+
react.PopoverContent,
|
|
342
|
+
{
|
|
343
|
+
p: 2,
|
|
344
|
+
border: 0,
|
|
345
|
+
minW: "sm",
|
|
346
|
+
maxH: 300,
|
|
347
|
+
overflowY: "auto",
|
|
348
|
+
rounded: "xl",
|
|
349
|
+
boxShadow: "xl",
|
|
350
|
+
bg: background,
|
|
351
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index2) => {
|
|
352
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: index$1.Link, to: index$3.buildPath(child.slug, slug), p: 2, role: "group", textDecoration: "none", children: [
|
|
353
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
|
|
354
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
355
|
+
react.Flex,
|
|
356
|
+
{
|
|
357
|
+
flex: 1,
|
|
358
|
+
justify: "flex-end",
|
|
359
|
+
align: "center",
|
|
360
|
+
opacity: 0,
|
|
361
|
+
transition: "all .3s ease",
|
|
362
|
+
transform: "translateX(-10px)",
|
|
363
|
+
_groupHover: { opacity: 1, transform: "translateX(0)" },
|
|
364
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icons.ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
|
|
365
|
+
}
|
|
366
|
+
)
|
|
367
|
+
] }) }, index2);
|
|
368
|
+
}) })
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
] });
|
|
372
|
+
};
|
|
373
|
+
const DesktopNavigation = ({ menu }) => {
|
|
374
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item, index2) => {
|
|
375
|
+
var _a;
|
|
376
|
+
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);
|
|
377
|
+
}) });
|
|
378
|
+
};
|
|
379
|
+
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
380
|
+
const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
381
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
382
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
383
|
+
react.Flex,
|
|
384
|
+
{
|
|
385
|
+
as: "button",
|
|
386
|
+
p: 2,
|
|
387
|
+
pr: "3px",
|
|
388
|
+
align: "center",
|
|
389
|
+
justifyContent: "space-between",
|
|
390
|
+
_hover: { textDecoration: "none", color: "brand.400" },
|
|
391
|
+
onClick: onExpand,
|
|
392
|
+
children: [
|
|
393
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
394
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
395
|
+
icons.ChevronDownIcon,
|
|
396
|
+
{
|
|
397
|
+
w: CHEVRON_DOWN_ICON_SIZE,
|
|
398
|
+
h: CHEVRON_DOWN_ICON_SIZE,
|
|
399
|
+
transform: isExpanded ? "rotate(180deg)" : "",
|
|
400
|
+
transition: "all .25s ease-in-out"
|
|
401
|
+
}
|
|
402
|
+
)
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
),
|
|
406
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
407
|
+
react.List,
|
|
408
|
+
{
|
|
409
|
+
ml: 2,
|
|
410
|
+
pl: 0,
|
|
411
|
+
maxH: 300,
|
|
412
|
+
overflowY: "auto",
|
|
413
|
+
borderLeft: 1,
|
|
414
|
+
borderStyle: "solid",
|
|
415
|
+
borderColor: react.useColorModeValue("gray.200", "gray.700"),
|
|
416
|
+
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: index$1.Link, to: index$3.buildPath(child.slug, slug), p: 2, fontSize: "sm", textDecoration: "none", children: child.label }) }, index2))
|
|
417
|
+
}
|
|
418
|
+
) })
|
|
419
|
+
] });
|
|
420
|
+
};
|
|
421
|
+
const CLOSE_ICON_SIZE = "0.75rem";
|
|
422
|
+
const HAMBURGER_ICON_SIZE = "1rem";
|
|
423
|
+
const MobileNavigation = ({ menu }) => {
|
|
424
|
+
const [expanded, setExpanded] = react$1.useState(null);
|
|
425
|
+
const { isOpen, onToggle } = react.useDisclosure();
|
|
426
|
+
const background = react.useColorModeValue("gray.50", "gray.900");
|
|
427
|
+
function handleExpand(index2) {
|
|
428
|
+
return () => {
|
|
429
|
+
setExpanded((prev) => prev === index2 ? null : index2);
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
function handleClick() {
|
|
433
|
+
setExpanded(null);
|
|
434
|
+
onToggle();
|
|
435
|
+
}
|
|
436
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: { base: "block", md: "none" }, children: [
|
|
437
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
438
|
+
react.IconButton,
|
|
439
|
+
{
|
|
440
|
+
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 }),
|
|
441
|
+
size: "sm",
|
|
442
|
+
variant: "ghost",
|
|
443
|
+
"aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
|
|
444
|
+
"aria-expanded": isOpen,
|
|
445
|
+
onClick: handleClick
|
|
446
|
+
}
|
|
447
|
+
),
|
|
448
|
+
/* @__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(
|
|
449
|
+
react.List,
|
|
450
|
+
{
|
|
451
|
+
spacing: 2,
|
|
452
|
+
p: 2,
|
|
453
|
+
boxShadow: "md",
|
|
454
|
+
borderWidth: "1px",
|
|
455
|
+
borderColor: react.useColorModeValue("gray.200", "gray.700"),
|
|
456
|
+
borderRadius: "md",
|
|
457
|
+
bg: background,
|
|
458
|
+
children: menu.map((item, index2) => {
|
|
459
|
+
var _a;
|
|
460
|
+
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);
|
|
461
|
+
})
|
|
462
|
+
}
|
|
463
|
+
) }) })
|
|
464
|
+
] });
|
|
465
|
+
};
|
|
466
|
+
const Navigation = ({ menu }) => {
|
|
467
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
468
|
+
/* @__PURE__ */ jsxRuntime.jsx(DesktopNavigation, { menu }),
|
|
469
|
+
/* @__PURE__ */ jsxRuntime.jsx(MobileNavigation, { menu })
|
|
470
|
+
] });
|
|
471
|
+
};
|
|
472
|
+
const Header = () => {
|
|
473
|
+
var _a;
|
|
474
|
+
const { navigation, localization, config } = index$1.useSiteContext();
|
|
475
|
+
const { currentLocale } = index$1.usePageContext();
|
|
476
|
+
const locales = localization.locales;
|
|
477
|
+
const menu = navigation.header[currentLocale.code] ?? [];
|
|
478
|
+
const toolbar = (_a = config == null ? void 0 : config.header) == null ? void 0 : _a.toolbar;
|
|
479
|
+
const isMultiLanguage = locales.length > 1;
|
|
480
|
+
const hasNavigation = !!menu.length;
|
|
481
|
+
const hasToolbar = !!toolbar || isMultiLanguage;
|
|
482
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
483
|
+
react.Box,
|
|
484
|
+
{
|
|
485
|
+
as: "header",
|
|
486
|
+
position: "sticky",
|
|
487
|
+
top: 0,
|
|
488
|
+
bg: react.useColorModeValue("white", "gray.900"),
|
|
489
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
490
|
+
boxShadow: "sm",
|
|
491
|
+
zIndex: 100,
|
|
492
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(index.Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "nav", gap: 2, py: 2, children: [
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx(Brand, { brand: /* @__PURE__ */ jsxRuntime.jsx(index.Logo, {}) }),
|
|
494
|
+
(hasNavigation || hasToolbar) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
495
|
+
react.Flex,
|
|
496
|
+
{
|
|
497
|
+
as: "section",
|
|
498
|
+
flex: 1,
|
|
499
|
+
flexDir: { base: "row-reverse", md: "row" },
|
|
500
|
+
justifyContent: "end",
|
|
501
|
+
align: "center",
|
|
502
|
+
gap: 2,
|
|
503
|
+
children: [
|
|
504
|
+
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: { base: 0, md: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Navigation, { menu }) }),
|
|
505
|
+
hasToolbar && /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, flex: { base: 1, md: 0 }, justifyContent: "flex-end", children: [
|
|
506
|
+
!!toolbar && toolbar,
|
|
507
|
+
isMultiLanguage && /* @__PURE__ */ jsxRuntime.jsx(LocaleSwitcher, { currentLocale, locales })
|
|
508
|
+
] })
|
|
509
|
+
]
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
] }) })
|
|
513
|
+
}
|
|
514
|
+
);
|
|
515
|
+
};
|
|
516
|
+
const Hero = ({ title, subtitle, content, link, image }) => {
|
|
517
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", bg: "gray.900", children: /* @__PURE__ */ jsxRuntime.jsx(index.Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", md: "row" }, children: [
|
|
518
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { align: "center", justify: { base: "center", md: "flex-start" }, flex: 1, py: 8, pe: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 6, w: "full", maxW: "lg", children: [
|
|
519
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Heading, { as: "h1", fontSize: { base: "3xl", md: "4xl", lg: "5xl" }, children: [
|
|
520
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", display: "block", children: [
|
|
521
|
+
title,
|
|
522
|
+
" —"
|
|
523
|
+
] }),
|
|
524
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "block", color: "brand.400", children: subtitle })
|
|
525
|
+
] }),
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: { base: "md", lg: "lg" }, color: "gray.500", children: content }),
|
|
527
|
+
!!link && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsxRuntime.jsx(index.LinkButton, { ...link, size: "md", textDecoration: "none" }) })
|
|
528
|
+
] }) }),
|
|
529
|
+
image && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { display: { base: "none", md: "flex" }, flex: 1, children: image })
|
|
530
|
+
] }) }) });
|
|
531
|
+
};
|
|
532
|
+
const Main = ({ children }) => {
|
|
533
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
534
|
+
react.Flex,
|
|
535
|
+
{
|
|
536
|
+
as: "main",
|
|
537
|
+
direction: "column",
|
|
538
|
+
flexGrow: 1,
|
|
539
|
+
bg: react.useColorModeValue("white", "gray.800"),
|
|
540
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
541
|
+
children
|
|
542
|
+
}
|
|
543
|
+
);
|
|
544
|
+
};
|
|
545
|
+
const ScrollToTop = () => {
|
|
546
|
+
const [isVisible, setIsVisible] = react$1.useState(false);
|
|
547
|
+
react$1.useEffect(() => {
|
|
548
|
+
const toggleVisibility = () => {
|
|
549
|
+
setIsVisible(window.scrollY > 300);
|
|
550
|
+
};
|
|
551
|
+
window.addEventListener("scroll", toggleVisibility);
|
|
552
|
+
return () => {
|
|
553
|
+
window.removeEventListener("scroll", toggleVisibility);
|
|
554
|
+
};
|
|
555
|
+
}, []);
|
|
556
|
+
function handleClick() {
|
|
557
|
+
window.scrollTo({
|
|
558
|
+
top: 0,
|
|
559
|
+
behavior: "smooth"
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
563
|
+
react.Box,
|
|
564
|
+
{
|
|
565
|
+
position: "fixed",
|
|
566
|
+
bottom: { base: 4, md: 8, lg: 16 },
|
|
567
|
+
right: { base: 4, md: 8, lg: 16 },
|
|
568
|
+
zIndex: "1000",
|
|
569
|
+
opacity: isVisible ? 1 : 0,
|
|
570
|
+
transform: isVisible ? "translateY(0)" : "translateY(0.5rem)",
|
|
571
|
+
transition: "opacity 0.4s ease, transform 0.4s ease",
|
|
572
|
+
pointerEvents: isVisible ? "auto" : "none",
|
|
573
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
574
|
+
react.IconButton,
|
|
575
|
+
{
|
|
576
|
+
"aria-label": "Scroll to top",
|
|
577
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronUpIcon, { w: 6, h: 6 }),
|
|
578
|
+
size: "lg",
|
|
579
|
+
shadow: "lg",
|
|
580
|
+
colorScheme: "brand",
|
|
581
|
+
isRound: true,
|
|
582
|
+
onClick: handleClick
|
|
583
|
+
}
|
|
584
|
+
)
|
|
585
|
+
}
|
|
586
|
+
);
|
|
587
|
+
};
|
|
588
|
+
const Layout = ({ children }) => {
|
|
589
|
+
const content = typeof children === "function" ? children({ Hero, Content }) : /* @__PURE__ */ jsxRuntime.jsx(Content, { children });
|
|
590
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 0, position: "relative", w: "100%", minH: "100dvh", children: [
|
|
591
|
+
/* @__PURE__ */ jsxRuntime.jsx(Header, {}),
|
|
592
|
+
/* @__PURE__ */ jsxRuntime.jsx(Main, { children: content }),
|
|
593
|
+
/* @__PURE__ */ jsxRuntime.jsx(Footer, {}),
|
|
594
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollToTop, {})
|
|
595
|
+
] });
|
|
596
|
+
};
|
|
597
|
+
module.exports = Layout;
|