@anywayseo/tools 5.3.0 → 5.4.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/base/index.d.ts +2 -0
- package/dist/components/base/social-network/icons/facebook/index.d.ts +2 -0
- package/dist/components/base/social-network/icons/index.d.ts +5 -0
- package/dist/components/base/social-network/icons/instagram/index.d.ts +2 -0
- package/dist/components/base/social-network/icons/pinterest/index.d.ts +2 -0
- package/dist/components/base/social-network/icons/x/index.d.ts +2 -0
- package/dist/components/base/social-network/icons/youtube/index.d.ts +2 -0
- package/dist/components/base/social-network/index.d.ts +5 -0
- package/dist/components/base/social-networks/index.d.ts +8 -0
- package/dist/components/index.cjs +3 -1
- package/dist/components/index.mjs +3 -1
- package/dist/{index-BGMR4f6W.js → index-4Zb1neOM.js} +293 -206
- package/dist/{index-CjaAcLJf.mjs → index-BM-_Lr_j.mjs} +96 -9
- package/dist/index.cjs +3 -1
- package/dist/index.mjs +3 -1
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/social-network/index.d.ts +6 -0
- package/dist/types/content/author/index.d.ts +2 -7
- package/dist/types/site/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
-
const react
|
|
3
|
+
const react = require("@chakra-ui/react");
|
|
4
4
|
const reactI18next = require("react-i18next");
|
|
5
5
|
require("react-medium-image-zoom");
|
|
6
6
|
const index = require("./index-BltrZp3R.js");
|
|
7
|
-
const react = require("react");
|
|
7
|
+
const react$1 = require("react");
|
|
8
8
|
const index$3 = require("./index-C6MG_f24.js");
|
|
9
9
|
const index$5 = require("./index-CJVr79Z2.js");
|
|
10
10
|
const react$2 = require("@mdx-js/react");
|
|
@@ -14,13 +14,96 @@ const index$2 = require("./index-At00w6EN.js");
|
|
|
14
14
|
const index$1 = require("./index-CAfBnNV6.js");
|
|
15
15
|
const i18next = require("i18next");
|
|
16
16
|
const Markdown = require("react-markdown");
|
|
17
|
+
const FacebookIcon = (props) => {
|
|
18
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "Facebook", ...props, children: [
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
+
"path",
|
|
22
|
+
{
|
|
23
|
+
d: "M13.5 8h2V6h-2c-2.2 0-3.5 1.3-3.5 3.5V11H8v2h2v5h2v-5h2l.5-2h-2v-1.3c0-.5.2-.7 1-.7Z",
|
|
24
|
+
fill: "currentColor"
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
] });
|
|
28
|
+
};
|
|
29
|
+
const InstagramIcon = (props) => {
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
31
|
+
"svg",
|
|
32
|
+
{
|
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34
|
+
width: "24",
|
|
35
|
+
height: "24",
|
|
36
|
+
viewBox: "0 0 24 24",
|
|
37
|
+
"aria-label": "Instagram",
|
|
38
|
+
...props,
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
|
|
41
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "4", fill: "none", stroke: "currentColor", "stroke-width": "2" }),
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "17", cy: "7", r: "1.25", fill: "currentColor" })
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
const PinterestIcon = (props) => {
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
49
|
+
"svg",
|
|
50
|
+
{
|
|
51
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
52
|
+
width: "24",
|
|
53
|
+
height: "24",
|
|
54
|
+
viewBox: "0 0 24 24",
|
|
55
|
+
"aria-label": "Pinterest",
|
|
56
|
+
...props,
|
|
57
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
58
|
+
"path",
|
|
59
|
+
{
|
|
60
|
+
fill: "currentColor",
|
|
61
|
+
d: "M12 0C5.373 0 0 5.373 0 12c0 4.99 3.657 9.128 8.438 10.122-.117-.858-.222-2.178.047-3.116.242-.83 1.557-5.288 1.557-5.288s-.396-.792-.396-1.963c0-1.84 1.067-3.215 2.395-3.215 1.13 0 1.675.848 1.675 1.866 0 1.138-.724 2.842-1.097 4.421-.312 1.319.663 2.395 1.965 2.395 2.358 0 3.947-3.032 3.947-6.617 0-2.727-1.84-4.769-5.178-4.769-3.774 0-6.134 2.822-6.134 5.97 0 1.086.322 1.852.827 2.443.232.274.264.384.18.698-.06.23-.197.786-.256 1.007-.084.322-.34.437-.628.318-1.75-.714-2.564-2.63-2.564-4.785 0-3.555 2.998-7.817 8.946-7.817 4.782 0 7.923 3.454 7.923 7.168 0 4.924-2.74 8.6-6.781 8.6-1.356 0-2.63-.73-3.066-1.565l-.833 3.173c-.301 1.147-1.118 2.582-1.667 3.455C9.708 23.812 10.828 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
const XcomIcon = (props) => {
|
|
68
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "X", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
69
|
+
"path",
|
|
70
|
+
{
|
|
71
|
+
fill: "currentColor",
|
|
72
|
+
d: "M18.244 2H21l-6.57 7.498L22 22h-5.657l-4.403-5.808L6.06 22H3.302l7.02-8.006L2 2h5.822l3.983 5.293L18.244 2zM16.97 20h1.9L8.153 4h-1.9L16.97 20z"
|
|
73
|
+
}
|
|
74
|
+
) });
|
|
75
|
+
};
|
|
76
|
+
const YoutubeIcon = (props) => {
|
|
77
|
+
return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "YouTube", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
+
"path",
|
|
79
|
+
{
|
|
80
|
+
fill: "currentColor",
|
|
81
|
+
d: "M23.498 6.186a2.974 2.974 0 0 0-2.095-2.107C19.505 3.5 12 3.5 12 3.5s-7.505 0-9.403.579A2.974 2.974 0 0 0 .502 6.186C0 8.09 0 12 0 12s0 3.91.502 5.814a2.974 2.974 0 0 0 2.095 2.107C4.495 20.5 12 20.5 12 20.5s7.505 0 9.403-.579a2.974 2.974 0 0 0 2.095-2.107C24 15.91 24 12 24 12s0-3.91-.502-5.814zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"
|
|
82
|
+
}
|
|
83
|
+
) });
|
|
84
|
+
};
|
|
85
|
+
const SocialNetworkMap = {
|
|
86
|
+
facebook: FacebookIcon,
|
|
87
|
+
instagram: InstagramIcon,
|
|
88
|
+
pinterest: PinterestIcon,
|
|
89
|
+
x: XcomIcon,
|
|
90
|
+
youtube: YoutubeIcon
|
|
91
|
+
};
|
|
92
|
+
const SocialNetwork = ({ kind, url }) => {
|
|
93
|
+
const Icon = SocialNetworkMap[kind];
|
|
94
|
+
return /* @__PURE__ */ jsxRuntime.jsx(index.Link, { to: url, children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) });
|
|
95
|
+
};
|
|
96
|
+
const SocialNetworks = ({ socialNetworks, ...flexProps }) => {
|
|
97
|
+
const uniqueSocialNetworks = [...new Map(socialNetworks.map((item) => [item.kind, item])).values()];
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { gap: 2, ...flexProps, children: uniqueSocialNetworks.map((socialNetwork) => /* @__PURE__ */ jsxRuntime.jsx(SocialNetwork, { ...socialNetwork }, socialNetwork.kind)) });
|
|
99
|
+
};
|
|
17
100
|
const ONE_LINE_HEIGHT = 24;
|
|
18
101
|
const Bio = ({ content, maxLines = 1 }) => {
|
|
19
|
-
const ref = react.useRef(null);
|
|
20
|
-
const [showToggle, setShowToggle] = react.useState(false);
|
|
21
|
-
const [isExpanded, setIsExpanded] = react.useState(false);
|
|
102
|
+
const ref = react$1.useRef(null);
|
|
103
|
+
const [showToggle, setShowToggle] = react$1.useState(false);
|
|
104
|
+
const [isExpanded, setIsExpanded] = react$1.useState(false);
|
|
22
105
|
const { t } = reactI18next.useTranslation("author");
|
|
23
|
-
react.useLayoutEffect(() => {
|
|
106
|
+
react$1.useLayoutEffect(() => {
|
|
24
107
|
if (ref.current) {
|
|
25
108
|
const { scrollWidth, clientWidth, scrollHeight, clientHeight } = ref.current;
|
|
26
109
|
const isClamped = scrollWidth > clientWidth || scrollHeight > clientHeight;
|
|
@@ -33,39 +116,40 @@ const Bio = ({ content, maxLines = 1 }) => {
|
|
|
33
116
|
function handleClick() {
|
|
34
117
|
setIsExpanded((prev) => !prev);
|
|
35
118
|
}
|
|
36
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
37
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
38
|
-
showToggle && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
119
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, startingHeight: ONE_LINE_HEIGHT * maxLines, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ref, fontSize: "md", noOfLines: isExpanded ? void 0 : maxLines, children: content }) }),
|
|
121
|
+
showToggle && /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", colorScheme: "blue", onClick: handleClick, children: isExpanded ? t("action.collapse") : t("action.expand") })
|
|
39
122
|
] });
|
|
40
123
|
};
|
|
41
124
|
const Author = ({ author, variant }) => {
|
|
42
|
-
const { name, role, bio, avatar } = author;
|
|
125
|
+
const { name, role, bio, avatar, socialNetworks } = author;
|
|
43
126
|
if (variant === "short") {
|
|
44
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
45
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
47
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
48
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
127
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { align: "center", gap: 4, children: [
|
|
128
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: 12, h: 12, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
|
|
129
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { fontWeight: "semibold", children: [
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: name }),
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.500", children: role })
|
|
49
132
|
] })
|
|
50
133
|
] });
|
|
51
134
|
}
|
|
52
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
53
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
54
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
55
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
135
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", sm: "row" }, align: { base: "center", sm: "flex-start" }, gap: 4, children: [
|
|
136
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: 1, maxW: { base: 48, sm: 32 }, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
|
|
137
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { children: [
|
|
138
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "lg", fontWeight: 600, children: [
|
|
56
139
|
`${name}, `,
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
140
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "inline-block", color: "gray.500", children: role })
|
|
58
141
|
] }),
|
|
142
|
+
(socialNetworks == null ? void 0 : socialNetworks.length) && /* @__PURE__ */ jsxRuntime.jsx(SocialNetworks, { socialNetworks }),
|
|
59
143
|
/* @__PURE__ */ jsxRuntime.jsx(Bio, { content: bio })
|
|
60
144
|
] }) })
|
|
61
145
|
] });
|
|
62
146
|
};
|
|
63
147
|
const Center = ({ children, ...boxProps }) => {
|
|
64
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
148
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Center, { ...boxProps, children });
|
|
65
149
|
};
|
|
66
150
|
const defaultColumns = { base: 1, sm: 2, md: 3, lg: 4, xl: 5 };
|
|
67
151
|
const Grid = ({ items, columns = defaultColumns, gap, render, getKey, ...boxProps }) => {
|
|
68
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ul", columns, spacing: gap, p: 0, m: 0, listStyleType: "none", ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index2)) });
|
|
69
153
|
};
|
|
70
154
|
const LinkButton = ({
|
|
71
155
|
label,
|
|
@@ -85,11 +169,11 @@ const LinkButton = ({
|
|
|
85
169
|
const isInvertedColor = (_a = config == null ? void 0 : config.theme) == null ? void 0 : _a.isInvertedColor;
|
|
86
170
|
const isRedirectLink = linkType === "redirect";
|
|
87
171
|
const isInternalLink = index$2.isRelativePath(href);
|
|
88
|
-
const LinkComponent = isInternalLink ? index.Link : react
|
|
172
|
+
const LinkComponent = isInternalLink ? index.Link : react.Link;
|
|
89
173
|
const hrefKey = isInternalLink ? "to" : "href";
|
|
90
174
|
const hrefValue = isRedirectLink ? `/follow?to=${href}` : href;
|
|
91
175
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
92
|
-
react
|
|
176
|
+
react.Button,
|
|
93
177
|
{
|
|
94
178
|
w: width,
|
|
95
179
|
size: size === "auto" ? { base: "sm", md: "lg" } : size,
|
|
@@ -113,21 +197,21 @@ const LinkButton = ({
|
|
|
113
197
|
};
|
|
114
198
|
const AuthorCard = ({ author, ...boxProps }) => {
|
|
115
199
|
const { t } = reactI18next.useTranslation("author");
|
|
116
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
117
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
118
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
200
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "filled", ...boxProps, children: [
|
|
201
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { pb: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { size: "md", children: t("title") }) }),
|
|
202
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "full" }) })
|
|
119
203
|
] });
|
|
120
204
|
};
|
|
121
205
|
const BonusCardContent = ({ content, buttonColor }) => {
|
|
122
206
|
const { t } = reactI18next.useTranslation("author");
|
|
123
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
124
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
125
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
208
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", color: buttonColor, children: isOpen ? t("action.collapse") : t("action.expand") }) }),
|
|
209
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { children: content.map((paragraph, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: paragraph }, index2)) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: content }) }) }) })
|
|
126
210
|
] }) });
|
|
127
211
|
};
|
|
128
212
|
const BonusCardTitle = ({ content, color, textColor }) => {
|
|
129
213
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
130
|
-
react
|
|
214
|
+
react.Text,
|
|
131
215
|
{
|
|
132
216
|
as: "h3",
|
|
133
217
|
display: "inline-block",
|
|
@@ -155,7 +239,7 @@ const BonusCard = ({
|
|
|
155
239
|
className
|
|
156
240
|
}) => {
|
|
157
241
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
158
|
-
react
|
|
242
|
+
react.Card,
|
|
159
243
|
{
|
|
160
244
|
as: "article",
|
|
161
245
|
h: "full",
|
|
@@ -176,12 +260,12 @@ const BonusCard = ({
|
|
|
176
260
|
} : void 0,
|
|
177
261
|
className,
|
|
178
262
|
children: [
|
|
179
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
263
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.CardBody, { as: "section", pb: 0, flex: 1, children: [
|
|
180
264
|
/* @__PURE__ */ jsxRuntime.jsx(BonusCardTitle, { content: title, color: titleColor, textColor: titleTextColor }),
|
|
181
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
265
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
|
|
182
266
|
/* @__PURE__ */ jsxRuntime.jsx(BonusCardContent, { content, buttonColor: textColor })
|
|
183
267
|
] }),
|
|
184
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
268
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link, width: "full", size: "md", textDecoration: "none" }) })
|
|
185
269
|
]
|
|
186
270
|
}
|
|
187
271
|
);
|
|
@@ -205,7 +289,7 @@ const BonusCardGrid = ({
|
|
|
205
289
|
);
|
|
206
290
|
};
|
|
207
291
|
const ContactForm = ({ ...boxProps }) => {
|
|
208
|
-
const toast = react
|
|
292
|
+
const toast = react.useToast();
|
|
209
293
|
const { t } = reactI18next.useTranslation("contactForm");
|
|
210
294
|
function handleSubmit(event) {
|
|
211
295
|
event.preventDefault();
|
|
@@ -229,21 +313,21 @@ const ContactForm = ({ ...boxProps }) => {
|
|
|
229
313
|
}
|
|
230
314
|
}
|
|
231
315
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
232
|
-
react
|
|
316
|
+
react.Box,
|
|
233
317
|
{
|
|
234
318
|
as: "form",
|
|
235
319
|
borderRadius: "lg",
|
|
236
320
|
p: 8,
|
|
237
|
-
color: react
|
|
238
|
-
bg: react
|
|
321
|
+
color: react.useColorModeValue("gray.700", "whiteAlpha.900"),
|
|
322
|
+
bg: react.useColorModeValue("white", "gray.700"),
|
|
239
323
|
shadow: "base",
|
|
240
324
|
onSubmit: handleSubmit,
|
|
241
325
|
...boxProps,
|
|
242
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
243
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
244
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
245
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
246
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
326
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, children: [
|
|
327
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.name.label") }),
|
|
329
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
|
|
330
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
247
331
|
"svg",
|
|
248
332
|
{
|
|
249
333
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -255,45 +339,45 @@ const ContactForm = ({ ...boxProps }) => {
|
|
|
255
339
|
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6" })
|
|
256
340
|
}
|
|
257
341
|
) }),
|
|
258
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
342
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "text", name: "name", placeholder: t("field.name.placeholder") })
|
|
259
343
|
] })
|
|
260
344
|
] }),
|
|
261
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
262
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
263
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
264
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
265
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
345
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
|
|
346
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.email.label") }),
|
|
347
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
|
|
348
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.EmailIcon, {}) }),
|
|
349
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "email", name: "email", placeholder: t("field.email.placeholder") })
|
|
266
350
|
] })
|
|
267
351
|
] }),
|
|
268
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
269
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
270
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
352
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
|
|
353
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.message.label") }),
|
|
354
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Textarea, { name: "message", placeholder: t("field.message.placeholder"), rows: 6, resize: "none" })
|
|
271
355
|
] }),
|
|
272
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
356
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Button, { type: "submit", colorScheme: "brand", width: "full", children: t("action.send") })
|
|
273
357
|
] })
|
|
274
358
|
}
|
|
275
359
|
);
|
|
276
360
|
};
|
|
277
361
|
const Faq = ({ items, ...boxProps }) => {
|
|
278
362
|
const { bgColor, invertedColor } = index$1.usePrimaryColors();
|
|
279
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
280
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
281
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
282
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
283
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
363
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
|
|
364
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionItem, { border: 0, children: [
|
|
365
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "h3", children: /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionButton, { _hover: { color: invertedColor, bgColor }, children: [
|
|
366
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
|
|
367
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AccordionIcon, {})
|
|
284
368
|
] }) }),
|
|
285
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
369
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AccordionPanel, { children: answer })
|
|
286
370
|
] }, question);
|
|
287
371
|
}) });
|
|
288
372
|
};
|
|
289
373
|
const FeatureCard = ({ title, description }) => {
|
|
290
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
291
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
374
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
|
|
292
376
|
/* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" }),
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 600, children: title }),
|
|
294
378
|
/* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" })
|
|
295
379
|
] }),
|
|
296
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
380
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.500", children: description }) })
|
|
297
381
|
] });
|
|
298
382
|
};
|
|
299
383
|
const FeatureCardGrid = ({
|
|
@@ -316,7 +400,7 @@ const FeatureCardGrid = ({
|
|
|
316
400
|
};
|
|
317
401
|
const GameCard = ({ name, description, image, href, height = "auto" }) => {
|
|
318
402
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
319
|
-
react
|
|
403
|
+
react.LinkBox,
|
|
320
404
|
{
|
|
321
405
|
as: "article",
|
|
322
406
|
rounded: "md",
|
|
@@ -329,9 +413,9 @@ const GameCard = ({ name, description, image, href, height = "auto" }) => {
|
|
|
329
413
|
_hover: { transform: "scale(1.05)" },
|
|
330
414
|
children: [
|
|
331
415
|
/* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt: name, mode: "thumbnail" }),
|
|
332
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
333
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
334
|
-
!!description && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
416
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "section", rounded: "md", p: 4, children: [
|
|
417
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: href ? /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { href, children: name }) : name }),
|
|
418
|
+
!!description && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: "gray.600", children: description })
|
|
335
419
|
] })
|
|
336
420
|
]
|
|
337
421
|
}
|
|
@@ -372,7 +456,7 @@ const GameDemoContent = ({
|
|
|
372
456
|
const { t } = reactI18next.useTranslation("gameDemo");
|
|
373
457
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
374
458
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
375
|
-
react
|
|
459
|
+
react.Box,
|
|
376
460
|
{
|
|
377
461
|
as: "iframe",
|
|
378
462
|
src,
|
|
@@ -385,9 +469,9 @@ const GameDemoContent = ({
|
|
|
385
469
|
children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("warning") })
|
|
386
470
|
}
|
|
387
471
|
),
|
|
388
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
472
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { position: "absolute", top: 2, left: 2, gap: 2, children: [
|
|
389
473
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
-
react
|
|
474
|
+
react.IconButton,
|
|
391
475
|
{
|
|
392
476
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 3, h: 3 }),
|
|
393
477
|
title: t("action.exit"),
|
|
@@ -401,7 +485,7 @@ const GameDemoContent = ({
|
|
|
401
485
|
}
|
|
402
486
|
),
|
|
403
487
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
404
|
-
react
|
|
488
|
+
react.IconButton,
|
|
405
489
|
{
|
|
406
490
|
icon: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(icons.ViewOffIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.ViewIcon, { w: 4, h: 4 }),
|
|
407
491
|
title: t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
|
|
@@ -415,14 +499,14 @@ const GameDemoContent = ({
|
|
|
415
499
|
}
|
|
416
500
|
)
|
|
417
501
|
] }),
|
|
418
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
502
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
|
|
419
503
|
] });
|
|
420
504
|
};
|
|
421
505
|
const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo }) => {
|
|
422
506
|
const { t } = reactI18next.useTranslation("gameDemo");
|
|
423
507
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
424
508
|
/* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
|
|
425
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
509
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 4, children: [
|
|
426
510
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
427
511
|
LinkButton,
|
|
428
512
|
{
|
|
@@ -431,7 +515,7 @@ const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo })
|
|
|
431
515
|
}
|
|
432
516
|
),
|
|
433
517
|
!!href && /* @__PURE__ */ jsxRuntime.jsx(
|
|
434
|
-
react
|
|
518
|
+
react.Button,
|
|
435
519
|
{
|
|
436
520
|
variant: "solid",
|
|
437
521
|
colorScheme: "brand",
|
|
@@ -445,9 +529,9 @@ const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo })
|
|
|
445
529
|
] });
|
|
446
530
|
};
|
|
447
531
|
const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps }) => {
|
|
448
|
-
const [isRunning, setIsRunning] = react.useState(false);
|
|
449
|
-
const [isLoaded, setIsLoaded] = react.useState(false);
|
|
450
|
-
const { isOpen: isFullscreen, onToggle, onClose } = react
|
|
532
|
+
const [isRunning, setIsRunning] = react$1.useState(false);
|
|
533
|
+
const [isLoaded, setIsLoaded] = react$1.useState(false);
|
|
534
|
+
const { isOpen: isFullscreen, onToggle, onClose } = react.useDisclosure({ defaultIsOpen: false });
|
|
451
535
|
function handleLoad() {
|
|
452
536
|
setIsLoaded(true);
|
|
453
537
|
}
|
|
@@ -464,7 +548,7 @@ const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps
|
|
|
464
548
|
setIsRunning(true);
|
|
465
549
|
}
|
|
466
550
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
467
|
-
react
|
|
551
|
+
react.Box,
|
|
468
552
|
{
|
|
469
553
|
as: "article",
|
|
470
554
|
display: "grid",
|
|
@@ -496,12 +580,12 @@ const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps
|
|
|
496
580
|
);
|
|
497
581
|
};
|
|
498
582
|
const GameInfoItem = ({ title, value }) => {
|
|
499
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
500
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
583
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, children: [
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { w: "50%", color: "gray.500", textTransform: "capitalize", children: [
|
|
501
585
|
title,
|
|
502
586
|
":"
|
|
503
587
|
] }),
|
|
504
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { w: "50%", textTransform: "capitalize", children: value })
|
|
505
589
|
] });
|
|
506
590
|
};
|
|
507
591
|
const MAX_VISIBLE_LANGUAGE = 5;
|
|
@@ -558,18 +642,18 @@ const GameInfo = ({ info, currencies }) => {
|
|
|
558
642
|
const { currentLocale } = index.usePageContext();
|
|
559
643
|
const currency = (currencies == null ? void 0 : currencies.length) ? getGameInfoCurrency(currencies, currentLocale.code) : DEFAULT_CURRENCY;
|
|
560
644
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
561
|
-
react
|
|
645
|
+
react.Box,
|
|
562
646
|
{
|
|
563
647
|
as: "aside",
|
|
564
648
|
float: { base: "none", lg: "right" },
|
|
565
649
|
w: { base: "100%", lg: "xs" },
|
|
566
650
|
ml: { base: 0, lg: 4 },
|
|
567
651
|
mb: { base: 0, lg: 4 },
|
|
568
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
569
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
570
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
571
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
572
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
652
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", h: "100%", p: 2, children: [
|
|
653
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { as: "header", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h2", fontSize: "xl", children: t("title") }) }),
|
|
654
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", p: 0, children: Object.entries(info).map(([group, items]) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.Fragment, { children: [
|
|
655
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, { my: 2 }),
|
|
656
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "semibold", mb: 2, children: t(`group.${group}`) }),
|
|
573
657
|
Object.entries(items).map(([itemKey, itemValue]) => {
|
|
574
658
|
if (!itemValue) {
|
|
575
659
|
return null;
|
|
@@ -585,30 +669,30 @@ const GameInfo = ({ info, currencies }) => {
|
|
|
585
669
|
};
|
|
586
670
|
const HowTo = ({ steps, ...boxProps }) => {
|
|
587
671
|
const { bgColor, invertedColor } = index$1.usePrimaryColors();
|
|
588
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
589
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
590
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
591
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
672
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, thumbnail }, index$12) => /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
|
|
673
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Circle, { size: 12, bgColor, color: invertedColor, fontSize: "lg", fontWeight: "bold", children: String(index$12 + 1) }),
|
|
674
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
675
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "lg", fontWeight: "bold", children: title }),
|
|
592
676
|
/* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: thumbnail, alt: title, mode: "thumbnail", hasZoom: true }),
|
|
593
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
677
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: description })
|
|
594
678
|
] })
|
|
595
679
|
] }, index$12)) });
|
|
596
680
|
};
|
|
597
681
|
const Container = ({ children }) => {
|
|
598
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
682
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Container, { maxW: "container.xl", children });
|
|
599
683
|
};
|
|
600
684
|
const Content = ({ children }) => {
|
|
601
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
685
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", py: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children }) });
|
|
602
686
|
};
|
|
603
687
|
const Logo = () => {
|
|
604
688
|
const { metadata } = index.useSiteContext();
|
|
605
689
|
const { logo } = metadata;
|
|
606
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
690
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: logo, alt: "Logo", objectFit: "contain" }) });
|
|
607
691
|
};
|
|
608
692
|
const Brand$1 = ({ brand }) => {
|
|
609
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
610
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
611
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
693
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", my: 2, py: 8, children: [
|
|
694
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
|
|
695
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { display: "flex", bgColor: react.useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsxRuntime.jsx(index.Link, { to: "/", children: brand }) })
|
|
612
696
|
] });
|
|
613
697
|
};
|
|
614
698
|
const Copyright = () => {
|
|
@@ -616,23 +700,23 @@ const Copyright = () => {
|
|
|
616
700
|
const { t } = reactI18next.useTranslation("footer");
|
|
617
701
|
const siteName = metadata.name;
|
|
618
702
|
const lang = metadata.lang;
|
|
619
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
703
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$4.getCurrentYear(lang), siteName }) });
|
|
620
704
|
};
|
|
621
705
|
const Disclaimer = () => {
|
|
622
706
|
const { metadata } = index.useSiteContext();
|
|
623
707
|
const { t } = reactI18next.useTranslation("footer");
|
|
624
708
|
const siteName = metadata.name;
|
|
625
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
626
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
709
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
|
|
710
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontWeight: "bold", color: "red.600", children: t("disclaimer.title") }),
|
|
627
711
|
t("disclaimer.description", { siteName })
|
|
628
712
|
] });
|
|
629
713
|
};
|
|
630
714
|
const Extra = ({ children }) => {
|
|
631
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
715
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", my: 2, children });
|
|
632
716
|
};
|
|
633
717
|
const Navigation$1 = ({ menu }) => {
|
|
634
718
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
635
|
-
react
|
|
719
|
+
react.SimpleGrid,
|
|
636
720
|
{
|
|
637
721
|
as: "ul",
|
|
638
722
|
columns: { base: 1, sm: 2, md: 4 },
|
|
@@ -642,8 +726,8 @@ const Navigation$1 = ({ menu }) => {
|
|
|
642
726
|
spacing: 4,
|
|
643
727
|
justifyItems: { base: "flex-start", md: "center" },
|
|
644
728
|
justifyContent: "space-between",
|
|
645
|
-
children: menu.map(({ slug, label }, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react
|
|
646
|
-
react
|
|
729
|
+
children: menu.map(({ slug, label }, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
730
|
+
react.Text,
|
|
647
731
|
{
|
|
648
732
|
as: index.Link,
|
|
649
733
|
to: slug,
|
|
@@ -658,26 +742,27 @@ const Navigation$1 = ({ menu }) => {
|
|
|
658
742
|
);
|
|
659
743
|
};
|
|
660
744
|
const Footer = () => {
|
|
661
|
-
|
|
662
|
-
const { navigation, config } = index.useSiteContext();
|
|
745
|
+
const { metadata, navigation, config } = index.useSiteContext();
|
|
663
746
|
const { currentLocale } = index.usePageContext();
|
|
664
747
|
const menu = navigation.footer[currentLocale.code] ?? [];
|
|
665
|
-
const
|
|
666
|
-
const showDisclaimer =
|
|
748
|
+
const socialNetworks = metadata.socialNetworks ?? [];
|
|
749
|
+
const { extra, showDisclaimer = true } = (config == null ? void 0 : config.footer) ?? {};
|
|
667
750
|
const hasNavigation = !!menu.length;
|
|
751
|
+
const hasSocialNetworks = !!socialNetworks.length;
|
|
668
752
|
const hasExtra = !!extra;
|
|
669
753
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
670
|
-
react
|
|
754
|
+
react.Box,
|
|
671
755
|
{
|
|
672
756
|
as: "footer",
|
|
673
|
-
bg: react
|
|
674
|
-
color: react
|
|
757
|
+
bg: react.useColorModeValue("gray.50", "gray.900"),
|
|
758
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
675
759
|
py: 4,
|
|
676
760
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
|
|
677
761
|
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu }),
|
|
678
762
|
hasExtra && /* @__PURE__ */ jsxRuntime.jsx(Extra, { children: extra }),
|
|
679
763
|
showDisclaimer && /* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
|
|
680
764
|
/* @__PURE__ */ jsxRuntime.jsx(Brand$1, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
|
|
765
|
+
hasSocialNetworks && /* @__PURE__ */ jsxRuntime.jsx(SocialNetworks, { socialNetworks, justify: "center", my: 2 }),
|
|
681
766
|
/* @__PURE__ */ jsxRuntime.jsx(Copyright, {})
|
|
682
767
|
] })
|
|
683
768
|
}
|
|
@@ -760,31 +845,31 @@ function getMappedIcon(code) {
|
|
|
760
845
|
const LocaleSwitcher = ({ currentLocale, locales }) => {
|
|
761
846
|
const localeCode = currentLocale.code;
|
|
762
847
|
const localeIcon = getMappedIcon(localeCode);
|
|
763
|
-
const localeMenuItems = react.useMemo(
|
|
848
|
+
const localeMenuItems = react$1.useMemo(
|
|
764
849
|
() => locales.map((locale) => ({ ...locale, icon: getMappedIcon(locale.code) })),
|
|
765
850
|
[locales]
|
|
766
851
|
);
|
|
767
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
852
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Menu, { placement: "bottom-end", children: [
|
|
768
853
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
769
|
-
react
|
|
854
|
+
react.MenuButton,
|
|
770
855
|
{
|
|
771
|
-
as: react
|
|
856
|
+
as: react.Button,
|
|
772
857
|
rightIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}),
|
|
773
858
|
w: { base: 20, md: "28" },
|
|
774
859
|
px: { base: 1, md: 4 },
|
|
775
860
|
size: { base: "sm", md: "lg" },
|
|
776
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
777
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
861
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
|
|
862
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: localeIcon }),
|
|
778
863
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: localeCode.toUpperCase() })
|
|
779
864
|
] })
|
|
780
865
|
}
|
|
781
866
|
),
|
|
782
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
867
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.MenuList, { minW: "fit-content", children: localeMenuItems.map(({ code, name, icon }) => /* @__PURE__ */ jsxRuntime.jsx(react.MenuItem, { as: index.Link, to: `/${code}`, icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icon, w: 4, h: 4 }), children: name }, code)) })
|
|
783
868
|
] });
|
|
784
869
|
};
|
|
785
|
-
const NavLink = react.forwardRef(({ slug, label }, ref) => {
|
|
870
|
+
const NavLink = react$1.forwardRef(({ slug, label }, ref) => {
|
|
786
871
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
787
|
-
react
|
|
872
|
+
react.Text,
|
|
788
873
|
{
|
|
789
874
|
ref,
|
|
790
875
|
as: index.Link,
|
|
@@ -798,11 +883,11 @@ const NavLink = react.forwardRef(({ slug, label }, ref) => {
|
|
|
798
883
|
});
|
|
799
884
|
NavLink.displayName = "NavLink";
|
|
800
885
|
const NavList$1 = ({ slug, label, children }) => {
|
|
801
|
-
const background = react
|
|
802
|
-
const backgroundHover = react
|
|
803
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
804
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
805
|
-
react
|
|
886
|
+
const background = react.useColorModeValue("white", "gray.800");
|
|
887
|
+
const backgroundHover = react.useColorModeValue("brand.50", "gray.900");
|
|
888
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { trigger: "hover", placement: "bottom-start", children: [
|
|
889
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
890
|
+
react.Text,
|
|
806
891
|
{
|
|
807
892
|
p: 2,
|
|
808
893
|
fontWeight: "semibold",
|
|
@@ -813,7 +898,7 @@ const NavList$1 = ({ slug, label, children }) => {
|
|
|
813
898
|
}
|
|
814
899
|
) }),
|
|
815
900
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
816
|
-
react
|
|
901
|
+
react.PopoverContent,
|
|
817
902
|
{
|
|
818
903
|
p: 2,
|
|
819
904
|
border: 0,
|
|
@@ -823,11 +908,11 @@ const NavList$1 = ({ slug, label, children }) => {
|
|
|
823
908
|
rounded: "xl",
|
|
824
909
|
boxShadow: "xl",
|
|
825
910
|
bg: background,
|
|
826
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react
|
|
827
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
828
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
911
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index$12) => {
|
|
912
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: index.Link, to: index$2.buildPath(child.slug, slug), p: 2, role: "group", children: [
|
|
913
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
|
|
829
914
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
830
|
-
react
|
|
915
|
+
react.Flex,
|
|
831
916
|
{
|
|
832
917
|
flex: 1,
|
|
833
918
|
justify: "flex-end",
|
|
@@ -836,7 +921,7 @@ const NavList$1 = ({ slug, label, children }) => {
|
|
|
836
921
|
transition: "all .3s ease",
|
|
837
922
|
transform: "translateX(-10px)",
|
|
838
923
|
_groupHover: { opacity: 1, transform: "translateX(0)" },
|
|
839
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react
|
|
924
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icons.ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
|
|
840
925
|
}
|
|
841
926
|
)
|
|
842
927
|
] }) }, index$12);
|
|
@@ -846,16 +931,16 @@ const NavList$1 = ({ slug, label, children }) => {
|
|
|
846
931
|
] });
|
|
847
932
|
};
|
|
848
933
|
const DesktopNavigation = ({ menu }) => {
|
|
849
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
934
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item, index2) => {
|
|
850
935
|
var _a;
|
|
851
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
936
|
+
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);
|
|
852
937
|
}) });
|
|
853
938
|
};
|
|
854
939
|
const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
|
|
855
940
|
const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
856
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
941
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
|
|
857
942
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
858
|
-
react
|
|
943
|
+
react.Flex,
|
|
859
944
|
{
|
|
860
945
|
as: "button",
|
|
861
946
|
p: 2,
|
|
@@ -865,7 +950,7 @@ const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
|
865
950
|
_hover: { textDecoration: "none", color: "brand.400" },
|
|
866
951
|
onClick: onExpand,
|
|
867
952
|
children: [
|
|
868
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
953
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { isTruncated: true, fontWeight: 600, children: label }),
|
|
869
954
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
870
955
|
icons.ChevronDownIcon,
|
|
871
956
|
{
|
|
@@ -878,8 +963,8 @@ const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
|
878
963
|
]
|
|
879
964
|
}
|
|
880
965
|
),
|
|
881
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
882
|
-
react
|
|
966
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
967
|
+
react.List,
|
|
883
968
|
{
|
|
884
969
|
ml: 2,
|
|
885
970
|
pl: 0,
|
|
@@ -887,8 +972,8 @@ const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
|
887
972
|
overflowY: "auto",
|
|
888
973
|
borderLeft: 1,
|
|
889
974
|
borderStyle: "solid",
|
|
890
|
-
borderColor: react
|
|
891
|
-
children: children == null ? void 0 : children.map((child, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react
|
|
975
|
+
borderColor: react.useColorModeValue("gray.200", "gray.700"),
|
|
976
|
+
children: children == null ? void 0 : children.map((child, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: index.Link, to: index$2.buildPath(child.slug, slug), p: 2, fontSize: "sm", children: child.label }) }, index$12))
|
|
892
977
|
}
|
|
893
978
|
) })
|
|
894
979
|
] });
|
|
@@ -896,9 +981,9 @@ const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
|
|
|
896
981
|
const CLOSE_ICON_SIZE = "0.75rem";
|
|
897
982
|
const HAMBURGER_ICON_SIZE = "1rem";
|
|
898
983
|
const MobileNavigation = ({ menu }) => {
|
|
899
|
-
const [expanded, setExpanded] = react.useState(null);
|
|
900
|
-
const { isOpen, onToggle } = react
|
|
901
|
-
const background = react
|
|
984
|
+
const [expanded, setExpanded] = react$1.useState(null);
|
|
985
|
+
const { isOpen, onToggle } = react.useDisclosure();
|
|
986
|
+
const background = react.useColorModeValue("gray.50", "gray.900");
|
|
902
987
|
function handleExpand(index2) {
|
|
903
988
|
return () => {
|
|
904
989
|
setExpanded((prev) => prev === index2 ? null : index2);
|
|
@@ -908,9 +993,9 @@ const MobileNavigation = ({ menu }) => {
|
|
|
908
993
|
setExpanded(null);
|
|
909
994
|
onToggle();
|
|
910
995
|
}
|
|
911
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
996
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: { base: "block", md: "none" }, children: [
|
|
912
997
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
913
|
-
react
|
|
998
|
+
react.IconButton,
|
|
914
999
|
{
|
|
915
1000
|
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 }),
|
|
916
1001
|
size: "sm",
|
|
@@ -920,19 +1005,19 @@ const MobileNavigation = ({ menu }) => {
|
|
|
920
1005
|
onClick: handleClick
|
|
921
1006
|
}
|
|
922
1007
|
),
|
|
923
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
924
|
-
react
|
|
1008
|
+
/* @__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(
|
|
1009
|
+
react.List,
|
|
925
1010
|
{
|
|
926
1011
|
spacing: 2,
|
|
927
1012
|
p: 2,
|
|
928
1013
|
boxShadow: "md",
|
|
929
1014
|
borderWidth: "1px",
|
|
930
|
-
borderColor: react
|
|
1015
|
+
borderColor: react.useColorModeValue("gray.200", "gray.700"),
|
|
931
1016
|
borderRadius: "md",
|
|
932
1017
|
bg: background,
|
|
933
1018
|
children: menu.map((item, index2) => {
|
|
934
1019
|
var _a;
|
|
935
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1020
|
+
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);
|
|
936
1021
|
})
|
|
937
1022
|
}
|
|
938
1023
|
) }) })
|
|
@@ -955,19 +1040,19 @@ const Header = () => {
|
|
|
955
1040
|
const hasNavigation = !!menu.length;
|
|
956
1041
|
const hasToolbar = !!toolbar || isMultiLanguage;
|
|
957
1042
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
958
|
-
react
|
|
1043
|
+
react.Box,
|
|
959
1044
|
{
|
|
960
1045
|
as: "header",
|
|
961
1046
|
position: "sticky",
|
|
962
1047
|
top: 0,
|
|
963
|
-
bg: react
|
|
964
|
-
color: react
|
|
1048
|
+
bg: react.useColorModeValue("white", "gray.900"),
|
|
1049
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
965
1050
|
boxShadow: "sm",
|
|
966
1051
|
zIndex: 100,
|
|
967
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1052
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "nav", gap: 2, py: 2, children: [
|
|
968
1053
|
/* @__PURE__ */ jsxRuntime.jsx(Brand, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
|
|
969
1054
|
(hasNavigation || hasToolbar) && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
970
|
-
react
|
|
1055
|
+
react.Flex,
|
|
971
1056
|
{
|
|
972
1057
|
as: "section",
|
|
973
1058
|
flex: 1,
|
|
@@ -976,8 +1061,8 @@ const Header = () => {
|
|
|
976
1061
|
align: "center",
|
|
977
1062
|
gap: 2,
|
|
978
1063
|
children: [
|
|
979
|
-
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
980
|
-
hasToolbar && /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1064
|
+
hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: { base: 0, md: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Navigation, { menu }) }),
|
|
1065
|
+
hasToolbar && /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, flex: { base: 1, md: 0 }, justifyContent: "flex-end", children: [
|
|
981
1066
|
!!toolbar && toolbar,
|
|
982
1067
|
isMultiLanguage && /* @__PURE__ */ jsxRuntime.jsx(LocaleSwitcher, { currentLocale, locales })
|
|
983
1068
|
] })
|
|
@@ -989,37 +1074,37 @@ const Header = () => {
|
|
|
989
1074
|
);
|
|
990
1075
|
};
|
|
991
1076
|
const Hero = ({ title, subtitle, content, link, image }) => {
|
|
992
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
993
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
994
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
995
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1077
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", bg: "gray.900", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", md: "row" }, children: [
|
|
1078
|
+
/* @__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: [
|
|
1079
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Heading, { as: "h1", fontSize: { base: "3xl", md: "4xl", lg: "5xl" }, children: [
|
|
1080
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", display: "block", children: [
|
|
996
1081
|
title,
|
|
997
1082
|
" —"
|
|
998
1083
|
] }),
|
|
999
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1084
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "block", color: "brand.400", children: subtitle })
|
|
1000
1085
|
] }),
|
|
1001
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1002
|
-
!!link && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1086
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: { base: "md", lg: "lg" }, color: "gray.500", children: content }),
|
|
1087
|
+
!!link && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link, size: "md", textDecoration: "none" }) })
|
|
1003
1088
|
] }) }),
|
|
1004
|
-
image && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1089
|
+
image && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { display: { base: "none", md: "flex" }, flex: 1, children: image })
|
|
1005
1090
|
] }) }) });
|
|
1006
1091
|
};
|
|
1007
1092
|
const Main = ({ children }) => {
|
|
1008
1093
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1009
|
-
react
|
|
1094
|
+
react.Flex,
|
|
1010
1095
|
{
|
|
1011
1096
|
as: "main",
|
|
1012
1097
|
direction: "column",
|
|
1013
1098
|
flexGrow: 1,
|
|
1014
|
-
bg: react
|
|
1015
|
-
color: react
|
|
1099
|
+
bg: react.useColorModeValue("white", "gray.800"),
|
|
1100
|
+
color: react.useColorModeValue("gray.700", "gray.200"),
|
|
1016
1101
|
children
|
|
1017
1102
|
}
|
|
1018
1103
|
);
|
|
1019
1104
|
};
|
|
1020
1105
|
const ScrollToTop = () => {
|
|
1021
|
-
const [isVisible, setIsVisible] = react.useState(false);
|
|
1022
|
-
react.useEffect(() => {
|
|
1106
|
+
const [isVisible, setIsVisible] = react$1.useState(false);
|
|
1107
|
+
react$1.useEffect(() => {
|
|
1023
1108
|
const toggleVisibility = () => {
|
|
1024
1109
|
setIsVisible(window.scrollY > 300);
|
|
1025
1110
|
};
|
|
@@ -1035,7 +1120,7 @@ const ScrollToTop = () => {
|
|
|
1035
1120
|
});
|
|
1036
1121
|
}
|
|
1037
1122
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1038
|
-
react
|
|
1123
|
+
react.Box,
|
|
1039
1124
|
{
|
|
1040
1125
|
position: "fixed",
|
|
1041
1126
|
bottom: { base: 4, md: 8, lg: 16 },
|
|
@@ -1046,7 +1131,7 @@ const ScrollToTop = () => {
|
|
|
1046
1131
|
transition: "opacity 0.4s ease, transform 0.4s ease",
|
|
1047
1132
|
pointerEvents: isVisible ? "auto" : "none",
|
|
1048
1133
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1049
|
-
react
|
|
1134
|
+
react.IconButton,
|
|
1050
1135
|
{
|
|
1051
1136
|
"aria-label": "Scroll to top",
|
|
1052
1137
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronUpIcon, { w: 6, h: 6 }),
|
|
@@ -1062,7 +1147,7 @@ const ScrollToTop = () => {
|
|
|
1062
1147
|
};
|
|
1063
1148
|
const Layout = ({ children }) => {
|
|
1064
1149
|
const content = typeof children === "function" ? children({ Hero, Content }) : /* @__PURE__ */ jsxRuntime.jsx(Content, { children });
|
|
1065
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1150
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 0, position: "relative", w: "100%", minH: "100dvh", children: [
|
|
1066
1151
|
/* @__PURE__ */ jsxRuntime.jsx(Header, {}),
|
|
1067
1152
|
/* @__PURE__ */ jsxRuntime.jsx(Main, { children: content }),
|
|
1068
1153
|
/* @__PURE__ */ jsxRuntime.jsx(Footer, {}),
|
|
@@ -1070,19 +1155,19 @@ const Layout = ({ children }) => {
|
|
|
1070
1155
|
] });
|
|
1071
1156
|
};
|
|
1072
1157
|
const List = ({ items, bullet = "—", render, ...boxProps }) => {
|
|
1073
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1074
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1158
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.List, { pl: 0, ml: 2, ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", gap: 1, children: [
|
|
1159
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: bullet }),
|
|
1075
1160
|
render ? render(item) : item
|
|
1076
1161
|
] }, index2)) });
|
|
1077
1162
|
};
|
|
1078
1163
|
const NotFound = () => {
|
|
1079
1164
|
const { t } = reactI18next.useTranslation("pageNotFound");
|
|
1080
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1081
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1082
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1165
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { gap: 4, children: [
|
|
1166
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h1", children: t("title") }),
|
|
1167
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "xl", children: [
|
|
1083
1168
|
t("description"),
|
|
1084
1169
|
" ",
|
|
1085
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1170
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Button, { as: index.Link, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t("action") })
|
|
1086
1171
|
] })
|
|
1087
1172
|
] });
|
|
1088
1173
|
};
|
|
@@ -1105,35 +1190,35 @@ const BgColorMap = {
|
|
|
1105
1190
|
const ProsConsCard = ({ itemType, items }) => {
|
|
1106
1191
|
const { t } = reactI18next.useTranslation("prosCons");
|
|
1107
1192
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1108
|
-
react
|
|
1193
|
+
react.Card,
|
|
1109
1194
|
{
|
|
1110
1195
|
as: "article",
|
|
1111
1196
|
flex: 1,
|
|
1112
1197
|
p: 2,
|
|
1113
|
-
bgColor: react
|
|
1198
|
+
bgColor: react.useColorModeValue(`${BgColorMap[itemType]}.100`, `${BgColorMap[itemType]}.800`),
|
|
1114
1199
|
children: [
|
|
1115
1200
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
|
-
react
|
|
1201
|
+
react.CardHeader,
|
|
1117
1202
|
{
|
|
1118
1203
|
as: "header",
|
|
1119
1204
|
p: 2,
|
|
1120
1205
|
borderTopRadius: "md",
|
|
1121
|
-
bgColor: react
|
|
1122
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1206
|
+
bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
|
|
1207
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h3", textTransform: "uppercase", fontSize: "xl", children: t(TitleMap[itemType]) })
|
|
1123
1208
|
}
|
|
1124
1209
|
),
|
|
1125
1210
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1126
|
-
react
|
|
1211
|
+
react.CardBody,
|
|
1127
1212
|
{
|
|
1128
1213
|
as: "section",
|
|
1129
1214
|
p: 2,
|
|
1130
1215
|
borderBottomRadius: "md",
|
|
1131
|
-
bgColor: react
|
|
1132
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1133
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1134
|
-
/* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1216
|
+
bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
|
|
1217
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 4, p: 0, children: items.map(({ title, description }) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", children: [
|
|
1218
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.ListIcon, { as: IconMap[itemType], w: 6, h: 6, color: IconColorMap[itemType] }),
|
|
1219
|
+
/* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontWeight: "semibold", fontSize: "md", children: [
|
|
1135
1220
|
title,
|
|
1136
|
-
!!description && /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1221
|
+
!!description && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", fontWeight: "normal", children: [
|
|
1137
1222
|
": ",
|
|
1138
1223
|
description
|
|
1139
1224
|
] })
|
|
@@ -1147,7 +1232,7 @@ const ProsConsCard = ({ itemType, items }) => {
|
|
|
1147
1232
|
};
|
|
1148
1233
|
const ProsCons = ({ items, ...boxProps }) => {
|
|
1149
1234
|
const { pros, cons } = items;
|
|
1150
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1235
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "section", direction: { base: "column", md: "row" }, gap: 4, ...boxProps, children: [
|
|
1151
1236
|
/* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "pros", items: pros }),
|
|
1152
1237
|
/* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "cons", items: cons })
|
|
1153
1238
|
] });
|
|
@@ -1164,7 +1249,7 @@ const Seo = ({ children, title, description, lang }) => {
|
|
|
1164
1249
|
const { name: siteName, lang: defaultLang, seo } = metadata;
|
|
1165
1250
|
const { title: defaultTitle, description: defaultDescription } = seo;
|
|
1166
1251
|
const siteLang = lang || defaultLang;
|
|
1167
|
-
const placeholders = react.useMemo(
|
|
1252
|
+
const placeholders = react$1.useMemo(
|
|
1168
1253
|
() => ({
|
|
1169
1254
|
siteName,
|
|
1170
1255
|
currentYear: index$4.getCurrentYear(siteLang),
|
|
@@ -1197,22 +1282,22 @@ const Table = ({
|
|
|
1197
1282
|
const headerItems = items.slice(0, columnNumber);
|
|
1198
1283
|
const bodyItems = items.slice(columnNumber);
|
|
1199
1284
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1200
|
-
react
|
|
1285
|
+
react.TableContainer,
|
|
1201
1286
|
{
|
|
1202
1287
|
border: bordered ? void 0 : "none",
|
|
1203
1288
|
...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
|
|
1204
1289
|
...boxProps,
|
|
1205
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1206
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1207
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1208
|
-
!!caption && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1290
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(react.Table, { variant: striped ? "striped" : "simple", children: [
|
|
1291
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Thead, { ...scrollable ? { position: "sticky", top: 0, zIndex: 1, bg: "gray.800" } : {}, children: /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: headerItems.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Th, { children: item }, index2)) }) }),
|
|
1292
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.Tbody, { children: Array.from({ length: Math.ceil(bodyItems.length / columnNumber) }, (_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: Array.from({ length: columnNumber }, (_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Td, { children: bodyItems[rowIndex * columnNumber + colIndex] || "" }, colIndex)) }, rowIndex)) }),
|
|
1293
|
+
!!caption && /* @__PURE__ */ jsxRuntime.jsx(react.TableCaption, { children: caption })
|
|
1209
1294
|
] })
|
|
1210
1295
|
}
|
|
1211
1296
|
);
|
|
1212
1297
|
};
|
|
1213
1298
|
const Tip = ({ tip, author = null, ...boxProps }) => {
|
|
1214
1299
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1215
|
-
react
|
|
1300
|
+
react.Card,
|
|
1216
1301
|
{
|
|
1217
1302
|
variant: "filled",
|
|
1218
1303
|
p: 4,
|
|
@@ -1225,12 +1310,12 @@ const Tip = ({ tip, author = null, ...boxProps }) => {
|
|
|
1225
1310
|
left: -2,
|
|
1226
1311
|
fontSize: "6rem",
|
|
1227
1312
|
fontStyle: "italic",
|
|
1228
|
-
color: react
|
|
1313
|
+
color: react.useColorModeValue("blackAlpha.300", "whiteAlpha.300")
|
|
1229
1314
|
},
|
|
1230
1315
|
...boxProps,
|
|
1231
1316
|
children: [
|
|
1232
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1233
|
-
!!author && /* @__PURE__ */ jsxRuntime.jsx(react
|
|
1317
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "blockquote", p: 0, fontStyle: "italic", children: tip }),
|
|
1318
|
+
!!author && /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { alignItems: "center", justify: "flex-end", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "short" }) })
|
|
1234
1319
|
]
|
|
1235
1320
|
}
|
|
1236
1321
|
);
|
|
@@ -1355,7 +1440,7 @@ const StrapiContentRenderer = ({ content, imageComponent }) => {
|
|
|
1355
1440
|
return content.map(({ __typename: type, ...props }, index2) => /* @__PURE__ */ jsxRuntime.jsx(StrapiComponent, { type, props, imageComponent }, index2));
|
|
1356
1441
|
};
|
|
1357
1442
|
const Tabs = ({ items, render, ...boxProps }) => {
|
|
1358
|
-
const { tabs, panels } = react.useMemo(() => {
|
|
1443
|
+
const { tabs, panels } = react$1.useMemo(() => {
|
|
1359
1444
|
const tabs2 = [];
|
|
1360
1445
|
const panels2 = [];
|
|
1361
1446
|
items.forEach(({ content, ...tab }) => {
|
|
@@ -1364,9 +1449,9 @@ const Tabs = ({ items, render, ...boxProps }) => {
|
|
|
1364
1449
|
});
|
|
1365
1450
|
return { tabs: tabs2, panels: panels2 };
|
|
1366
1451
|
}, []);
|
|
1367
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react
|
|
1368
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1369
|
-
/* @__PURE__ */ jsxRuntime.jsx(react
|
|
1452
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.Tabs, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
|
|
1453
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Tab, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index2)) }),
|
|
1454
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.TabPanel, { children: render ? render(panel) : panel }, index2)) })
|
|
1370
1455
|
] });
|
|
1371
1456
|
};
|
|
1372
1457
|
exports.Author = Author;
|
|
@@ -1390,6 +1475,8 @@ exports.List = List;
|
|
|
1390
1475
|
exports.NotFound = NotFound;
|
|
1391
1476
|
exports.ProsCons = ProsCons;
|
|
1392
1477
|
exports.Seo = Seo;
|
|
1478
|
+
exports.SocialNetwork = SocialNetwork;
|
|
1479
|
+
exports.SocialNetworks = SocialNetworks;
|
|
1393
1480
|
exports.StrapiContentRenderer = StrapiContentRenderer;
|
|
1394
1481
|
exports.Table = Table;
|
|
1395
1482
|
exports.Tabs = Tabs;
|