@yamatozhen/design_system 1.0.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/LICENSE +201 -0
- package/README.md +101 -0
- package/package.json +49 -0
- package/scripts/postinstall.js +105 -0
- package/template/app/ClientNav.tsx +310 -0
- package/template/app/globals.css +167 -0
- package/template/app/layout.tsx +128 -0
- package/template/app/themes/dark-mc.css +51 -0
- package/template/app/themes/dark.css +51 -0
- package/template/app/themes/light-mc.css +51 -0
- package/template/app/themes/light.css +51 -0
- package/template/app/themes/theme.css +82 -0
- package/template/components/layout/Lightbox/LightboxCard.tsx +100 -0
- package/template/components/layout/Lightbox/LightboxGallery.module.css +249 -0
- package/template/components/layout/Lightbox/LightboxGallery.tsx +72 -0
- package/template/components/layout/Lightbox/LightboxGrid.tsx +186 -0
- package/template/components/layout/Lightbox/LightboxModal.module.css +395 -0
- package/template/components/layout/Lightbox/LightboxModal.tsx +500 -0
- package/template/components/layout/Lightbox/demo.tsx +412 -0
- package/template/components/layout/Lightbox/index.ts +30 -0
- package/template/components/layout/Lightbox/types.ts +113 -0
- package/template/components/layout/Lightbox/useLightboxFilters.ts +140 -0
- package/template/components/layout/accordion/Accordion.module.css +149 -0
- package/template/components/layout/accordion/Accordion.tsx +114 -0
- package/template/components/layout/button/Button.module.css +305 -0
- package/template/components/layout/button/ButtonGroup.tsx +503 -0
- package/template/components/layout/button/FAB.tsx +118 -0
- package/template/components/layout/button/button.tsx +128 -0
- package/template/components/layout/button/drop.module.css +229 -0
- package/template/components/layout/button/drop.tsx +516 -0
- package/template/components/layout/hero/v1/heroSlideshow.module.css +107 -0
- package/template/components/layout/hero/v1/heroSlideshow.tsx +233 -0
- package/template/components/layout/modals/accessibilityModal/AccessibilityModal.module.css +126 -0
- package/template/components/layout/modals/accessibilityModal/AccessibilityModal.tsx +290 -0
- package/template/components/layout/modals/alert/Alert.tsx +188 -0
- package/template/components/layout/navigation/MioCard.module.css +88 -0
- package/template/components/layout/navigation/MioCard.tsx +266 -0
- package/template/components/layout/navigation/Wrap.tsx +41 -0
- package/template/components/layout/navigation/nav/Nav.module.css +508 -0
- package/template/components/layout/navigation/nav/Nav.tsx +167 -0
- package/template/components/layout/navigation/nav/NavBar.tsx +419 -0
- package/template/components/layout/navigation/nav/NavContext.tsx +259 -0
- package/template/components/layout/navigation/nav/NavItem.tsx +173 -0
- package/template/components/layout/navigation/nav/NavNew.module.css +373 -0
- package/template/components/layout/navigation/nav/NavRail.tsx +315 -0
- package/template/components/layout/navigation/nav/NavSection.tsx +102 -0
- package/template/components/layout/navigation/nav/NavTab.tsx +25 -0
- package/template/components/layout/navigation/nav/navftb/NavFTB.module.css +252 -0
- package/template/components/layout/navigation/nav/navftb/NavFTB.tsx +399 -0
- package/template/components/layout/navigation/nav/navftb/useTabIndicator.ts +484 -0
- package/template/components/layout/navigation/nav/navheader/NavHeader.module.css +59 -0
- package/template/components/layout/navigation/nav/navheader/NavHeader.tsx +478 -0
- package/template/components/layout/pages/loadingScreen.tsx +102 -0
- package/template/components/layout/pages/maintenance/Maintenance.tsx +53 -0
- package/template/components/layout/pages/maintenance/maintenance.module.css +163 -0
- package/template/components/layout/switch/Switch.module.css +102 -0
- package/template/components/layout/switch/Switch.tsx +48 -0
- package/template/components/tools/Divider.tsx +11 -0
- package/template/components/tools/ProgressiveBlur.tsx +73 -0
- package/template/components/tools/ReduceMotionContext.tsx +5 -0
- package/template/components/tools/Sinewave.tsx +199 -0
- package/template/components/tools/SinewaveProgress.tsx +135 -0
- package/template/components/tools/badge/Badge.tsx +28 -0
- package/template/components/tools/flubber.d.ts +7 -0
- package/template/components/tools/icon/SocialIcons.tsx +88 -0
- package/template/components/tools/icon/icon.module.css +0 -0
- package/template/components/tools/icon/icon.tsx +125 -0
- package/template/components/tools/mobileViewProvider.tsx +58 -0
- package/template/components/tools/react-bits/ClickSpark.tsx +177 -0
- package/template/components/tools/react-bits/FadeContent.tsx +90 -0
- package/template/components/tools/react-bits/GlareHover.tsx +73 -0
- package/template/components/tools/react-bits/GradientText/GradientText.css +70 -0
- package/template/components/tools/react-bits/GradientText/GradientText.tsx +44 -0
- package/template/components/tools/react-bits/Magnet.tsx +118 -0
- package/template/components/tools/react-bits/Stepper/Stepper.css +134 -0
- package/template/components/tools/react-bits/Stepper/Stepper.tsx +412 -0
- package/template/components/tools/ripple/ripple.css +41 -0
- package/template/components/tools/ripple/ripple.tsx +53 -0
- package/template/components/tools/shape/ShapeLoader.tsx +101 -0
- package/template/components/tools/shape/ShapeMorph.tsx +190 -0
- package/template/components/tools/shape/ShapePaths.ts +116 -0
- package/template/components/tools/switch/Switch.module.css +102 -0
- package/template/components/tools/switch/Switch.tsx +48 -0
- package/template/components/tools/useBodyScrollLock.tsx +27 -0
- package/template/components/tools/useImageColor.ts +47 -0
- package/template/components/tools/useNavSheetDrag.tsx +196 -0
- package/template/public/fonts/material-symbols/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2 +0 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import { usePathname } from "next/navigation";
|
|
4
|
+
import Nav from "../components/layout/navigation/nav/Nav";
|
|
5
|
+
import AccessibilityModal from "../components/layout/modals/accessibilityModal/AccessibilityModal";
|
|
6
|
+
import { ReduceMotionContext } from "@/components/tools/ReduceMotionContext";
|
|
7
|
+
import {
|
|
8
|
+
useBreakpoints,
|
|
9
|
+
useMediaQuery,
|
|
10
|
+
} from "@/components/tools/mobileViewProvider";
|
|
11
|
+
import FadeContent from "@/components/tools/react-bits/FadeContent";
|
|
12
|
+
import Button from "@/components/layout/button/button";
|
|
13
|
+
import Icon from "@/components/tools/icon/icon";
|
|
14
|
+
import {
|
|
15
|
+
HEADER_TRANSITION,
|
|
16
|
+
useNavHeaderState,
|
|
17
|
+
} from "../components/layout/navigation/nav/navheader/NavHeader";
|
|
18
|
+
import { motion } from "framer-motion";
|
|
19
|
+
const Header = Nav.Header;
|
|
20
|
+
|
|
21
|
+
function PageTransition({ children }: { children: React.ReactNode }) {
|
|
22
|
+
const pathname = usePathname();
|
|
23
|
+
return (
|
|
24
|
+
<FadeContent
|
|
25
|
+
key={pathname}
|
|
26
|
+
duration={400}
|
|
27
|
+
easing="var(--transition-expressive-fast-alt)"
|
|
28
|
+
fadeFrom="bottom"
|
|
29
|
+
>
|
|
30
|
+
{children}
|
|
31
|
+
</FadeContent>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Runs inside the header subtree, so useNavHeaderState() resolves correctly.
|
|
36
|
+
// Plain <img> so your `.logoWrap img` CSS transitions drive the size changes.
|
|
37
|
+
function HeaderLogo() {
|
|
38
|
+
const { collapsed } = useNavHeaderState();
|
|
39
|
+
return (
|
|
40
|
+
<motion.div
|
|
41
|
+
style={{
|
|
42
|
+
display: "flex",
|
|
43
|
+
flexDirection: "column",
|
|
44
|
+
alignItems: "flex-end",
|
|
45
|
+
marginRight: 24,
|
|
46
|
+
padding: 10,
|
|
47
|
+
}}
|
|
48
|
+
animate={{
|
|
49
|
+
height: collapsed ? 44 : "calc(72px * 2 + 12px)",
|
|
50
|
+
width: collapsed ? "calc(59px + 95px)" : 286,
|
|
51
|
+
}}
|
|
52
|
+
transition={HEADER_TRANSITION}
|
|
53
|
+
>
|
|
54
|
+
<div
|
|
55
|
+
role="img"
|
|
56
|
+
aria-label="Logo1"
|
|
57
|
+
style={{
|
|
58
|
+
width: collapsed ? 95 : 286,
|
|
59
|
+
height: collapsed ? 24 : 72,
|
|
60
|
+
backgroundImage: 'url("/Yamato.svg")',
|
|
61
|
+
backgroundSize: "100% 100%",
|
|
62
|
+
backgroundRepeat: "no-repeat",
|
|
63
|
+
flexShrink: 0,
|
|
64
|
+
backgroundPosition: "center",
|
|
65
|
+
marginBottom: collapsed ? 0 : 6,
|
|
66
|
+
transform: collapsed
|
|
67
|
+
? "translate3d(-46px,0,0)"
|
|
68
|
+
: "translate3d(0,0,0)",
|
|
69
|
+
transition:
|
|
70
|
+
"transform var(--transition-expressive-slow), width var(--transition-expressive-slow), height var(--transition-expressive-slow) ",
|
|
71
|
+
willChange: "transform",
|
|
72
|
+
}}
|
|
73
|
+
/>
|
|
74
|
+
<div
|
|
75
|
+
role="img"
|
|
76
|
+
aria-label="Logo2"
|
|
77
|
+
style={{
|
|
78
|
+
width: collapsed ? 59 : 188,
|
|
79
|
+
height: collapsed ? 24 : 72,
|
|
80
|
+
backgroundImage: 'url("/Zhen C.svg")',
|
|
81
|
+
backgroundSize: "100% 100%",
|
|
82
|
+
backgroundRepeat: "no-repeat",
|
|
83
|
+
flexShrink: 0,
|
|
84
|
+
backgroundPosition: "center",
|
|
85
|
+
marginTop: collapsed ? 0 : 6,
|
|
86
|
+
transform: collapsed
|
|
87
|
+
? "translate3d(13px,-100%,0)"
|
|
88
|
+
: "translate3d(51px,0,0)",
|
|
89
|
+
transition:
|
|
90
|
+
"transform var(--transition-expressive-slow), width var(--transition-expressive-slow), height var(--transition-expressive-slow)",
|
|
91
|
+
willChange: "transform",
|
|
92
|
+
}}
|
|
93
|
+
/>
|
|
94
|
+
</motion.div>
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// Shared nav items — defined once, passed to Bar so it stays in sync.
|
|
99
|
+
const NAV_ITEMS = (
|
|
100
|
+
<>
|
|
101
|
+
<Nav.Item default={true} path="/" systemName="home" label="Home" />
|
|
102
|
+
<Nav.Item systemName="widgets" label="Library">
|
|
103
|
+
<Nav.Tab path="/library" label="Overview" />
|
|
104
|
+
<Nav.Tab path="/library/components" label="Components" />
|
|
105
|
+
<Nav.Tab path="/library/icons" label="Icons" />
|
|
106
|
+
<Nav.Tab path="/library/themes" label="Themes" />
|
|
107
|
+
</Nav.Item>
|
|
108
|
+
<Nav.Item path="/settings" systemName="settings" label="Settings" />
|
|
109
|
+
<Nav.Item path="/login" systemName="person" label="Profile" />
|
|
110
|
+
</>
|
|
111
|
+
);
|
|
112
|
+
export default function ClientNav({
|
|
113
|
+
children,
|
|
114
|
+
}: {
|
|
115
|
+
children?: React.ReactNode;
|
|
116
|
+
}) {
|
|
117
|
+
const [theme, setTheme] = useState<"light" | "dark">("light");
|
|
118
|
+
const [contrast, setContrast] = useState<"none" | "medium">("none");
|
|
119
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
120
|
+
const [isAccessibilityOpen, setIsAccessibilityOpen] = useState(false);
|
|
121
|
+
const [largerText, setLargerText] = useState(false);
|
|
122
|
+
const [fontSize, setFontSize] = useState<16 | 18 | 20 | 24>(16);
|
|
123
|
+
const [reduceMotion, setReduceMotion] = useState(false);
|
|
124
|
+
const [showBorders, setShowBorders] = useState(false);
|
|
125
|
+
const [disableBrightness, setDisableBrightness] = useState(false);
|
|
126
|
+
const { isMobile, isTablet } = useBreakpoints();
|
|
127
|
+
useMediaQuery("(max-width: 812px)");
|
|
128
|
+
|
|
129
|
+
const applyThemeClass = useCallback(
|
|
130
|
+
(t: "light" | "dark", c: "none" | "medium") => {
|
|
131
|
+
const next = t + (c === "medium" ? "-medium-contrast" : "");
|
|
132
|
+
const el = document.documentElement;
|
|
133
|
+
el.classList.remove(
|
|
134
|
+
"light",
|
|
135
|
+
"dark",
|
|
136
|
+
"light-medium-contrast",
|
|
137
|
+
"dark-medium-contrast",
|
|
138
|
+
);
|
|
139
|
+
el.classList.add(next);
|
|
140
|
+
el.setAttribute("data-theme", t);
|
|
141
|
+
},
|
|
142
|
+
[],
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
const savedTheme = localStorage.getItem("theme") as "light" | "dark" | null;
|
|
147
|
+
const savedContrast = (localStorage.getItem("contrast") ?? "none") as
|
|
148
|
+
| "none"
|
|
149
|
+
| "medium";
|
|
150
|
+
const savedFontSize = localStorage.getItem("font-size");
|
|
151
|
+
if (savedFontSize) {
|
|
152
|
+
const parsed = parseInt(savedFontSize, 10) as 16 | 18 | 20 | 24;
|
|
153
|
+
setLargerText(parsed > 16);
|
|
154
|
+
setFontSize(parsed);
|
|
155
|
+
}
|
|
156
|
+
const savedReduceMotion = localStorage.getItem("reduce-motion") === "true";
|
|
157
|
+
setReduceMotion(savedReduceMotion);
|
|
158
|
+
const savedShowBorders = localStorage.getItem("show-borders") === "true";
|
|
159
|
+
setShowBorders(savedShowBorders);
|
|
160
|
+
if (savedShowBorders) {
|
|
161
|
+
document.documentElement.setAttribute("data-show-borders", "true");
|
|
162
|
+
}
|
|
163
|
+
const savedDisableBrightness =
|
|
164
|
+
localStorage.getItem("disable-brightness") === "true";
|
|
165
|
+
setDisableBrightness(savedDisableBrightness);
|
|
166
|
+
if (savedDisableBrightness) {
|
|
167
|
+
document.documentElement.setAttribute("data-disable-brightness", "true");
|
|
168
|
+
}
|
|
169
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
170
|
+
|
|
171
|
+
const handleChange = () => {
|
|
172
|
+
if (!localStorage.getItem("theme")) {
|
|
173
|
+
const newTheme = mediaQuery.matches ? "dark" : "light";
|
|
174
|
+
setTheme(newTheme);
|
|
175
|
+
applyThemeClass(newTheme, savedContrast);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
const initialTheme = savedTheme || (mediaQuery.matches ? "dark" : "light");
|
|
180
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
181
|
+
setTheme(initialTheme);
|
|
182
|
+
setContrast(savedContrast);
|
|
183
|
+
applyThemeClass(initialTheme, savedContrast);
|
|
184
|
+
|
|
185
|
+
mediaQuery.addEventListener("change", handleChange);
|
|
186
|
+
return () => mediaQuery.removeEventListener("change", handleChange);
|
|
187
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
188
|
+
}, []);
|
|
189
|
+
|
|
190
|
+
const handleAccessibility = useCallback(() => {
|
|
191
|
+
setIsAccessibilityOpen(true);
|
|
192
|
+
}, []);
|
|
193
|
+
|
|
194
|
+
const handleThemeOnClick = useCallback(() => {
|
|
195
|
+
const newTheme = theme === "light" ? "dark" : "light";
|
|
196
|
+
localStorage.setItem("theme", newTheme);
|
|
197
|
+
applyThemeClass(newTheme, contrast);
|
|
198
|
+
setTheme(newTheme);
|
|
199
|
+
}, [theme, contrast, applyThemeClass]);
|
|
200
|
+
|
|
201
|
+
const handleSave = useCallback(
|
|
202
|
+
({
|
|
203
|
+
contrast: c,
|
|
204
|
+
largerText: lt,
|
|
205
|
+
fontSize: fs,
|
|
206
|
+
reduceMotion: rm,
|
|
207
|
+
showBorders: sb,
|
|
208
|
+
disableBrightness: db,
|
|
209
|
+
}: {
|
|
210
|
+
contrast: "none" | "medium";
|
|
211
|
+
largerText: boolean;
|
|
212
|
+
fontSize: 16 | 18 | 20 | 24;
|
|
213
|
+
reduceMotion: boolean;
|
|
214
|
+
showBorders: boolean;
|
|
215
|
+
disableBrightness: boolean;
|
|
216
|
+
}) => {
|
|
217
|
+
setContrast(c);
|
|
218
|
+
localStorage.setItem("contrast", c);
|
|
219
|
+
applyThemeClass(theme, c);
|
|
220
|
+
setLargerText(lt);
|
|
221
|
+
setFontSize(fs);
|
|
222
|
+
localStorage.setItem("font-size", String(fs));
|
|
223
|
+
document.documentElement.style.setProperty("--font-size-base", `${fs}px`);
|
|
224
|
+
setReduceMotion(rm);
|
|
225
|
+
localStorage.setItem("reduce-motion", String(rm));
|
|
226
|
+
if (rm) {
|
|
227
|
+
document.documentElement.setAttribute("data-reduce-motion", "true");
|
|
228
|
+
} else {
|
|
229
|
+
document.documentElement.removeAttribute("data-reduce-motion");
|
|
230
|
+
}
|
|
231
|
+
setShowBorders(sb);
|
|
232
|
+
localStorage.setItem("show-borders", String(sb));
|
|
233
|
+
if (sb) {
|
|
234
|
+
document.documentElement.setAttribute("data-show-borders", "true");
|
|
235
|
+
} else {
|
|
236
|
+
document.documentElement.removeAttribute("data-show-borders");
|
|
237
|
+
}
|
|
238
|
+
setDisableBrightness(db);
|
|
239
|
+
localStorage.setItem("disable-brightness", String(db));
|
|
240
|
+
if (db) {
|
|
241
|
+
document.documentElement.setAttribute(
|
|
242
|
+
"data-disable-brightness",
|
|
243
|
+
"true",
|
|
244
|
+
);
|
|
245
|
+
} else {
|
|
246
|
+
document.documentElement.removeAttribute("data-disable-brightness");
|
|
247
|
+
}
|
|
248
|
+
setIsAccessibilityOpen(false);
|
|
249
|
+
},
|
|
250
|
+
[theme, applyThemeClass],
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
const handleToggleExpanded = useCallback(
|
|
254
|
+
() => setIsExpanded((prev) => !prev),
|
|
255
|
+
[],
|
|
256
|
+
);
|
|
257
|
+
|
|
258
|
+
const handleCollapse = useCallback(() => setIsExpanded(false), []);
|
|
259
|
+
|
|
260
|
+
const handleCancelAccessibility = useCallback(
|
|
261
|
+
() => setIsAccessibilityOpen(false),
|
|
262
|
+
[],
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
// Shared props for both nav variants
|
|
266
|
+
const sharedNavProps = {
|
|
267
|
+
logoUrl: "/favicon.png",
|
|
268
|
+
accessibilityAriaLabel: "Open accessibility settings",
|
|
269
|
+
accessibilityOnClick: handleAccessibility,
|
|
270
|
+
themeOnClick: handleThemeOnClick,
|
|
271
|
+
theme,
|
|
272
|
+
isExpanded,
|
|
273
|
+
onToggleExpanded: handleToggleExpanded,
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
return (
|
|
277
|
+
<ReduceMotionContext.Provider value={reduceMotion}>
|
|
278
|
+
<Nav isExpanded={isExpanded} onCollapse={handleCollapse}>
|
|
279
|
+
<AccessibilityModal
|
|
280
|
+
isOpen={isAccessibilityOpen}
|
|
281
|
+
contrast={contrast}
|
|
282
|
+
largerText={largerText}
|
|
283
|
+
fontSize={fontSize}
|
|
284
|
+
reduceMotion={reduceMotion}
|
|
285
|
+
showBorders={showBorders}
|
|
286
|
+
disableBrightness={disableBrightness}
|
|
287
|
+
onSave={handleSave}
|
|
288
|
+
onCancel={handleCancelAccessibility}
|
|
289
|
+
/>
|
|
290
|
+
<Nav.Bar
|
|
291
|
+
{...sharedNavProps}
|
|
292
|
+
style={{ display: isMobile || isTablet ? undefined : "none" }}
|
|
293
|
+
>
|
|
294
|
+
{NAV_ITEMS}
|
|
295
|
+
</Nav.Bar>
|
|
296
|
+
<Nav.Rail
|
|
297
|
+
{...sharedNavProps}
|
|
298
|
+
logoUrl=""
|
|
299
|
+
style={{ display: isMobile || isTablet ? "none" : undefined }}
|
|
300
|
+
>
|
|
301
|
+
{NAV_ITEMS}
|
|
302
|
+
</Nav.Rail>
|
|
303
|
+
|
|
304
|
+
<Nav.Content>
|
|
305
|
+
<PageTransition>{children}</PageTransition>
|
|
306
|
+
</Nav.Content>
|
|
307
|
+
</Nav>
|
|
308
|
+
</ReduceMotionContext.Provider>
|
|
309
|
+
);
|
|
310
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "./themes/theme.css";
|
|
3
|
+
|
|
4
|
+
/* Auto-generated theme palettes — do not edit these files directly */
|
|
5
|
+
@import "./themes/light.css";
|
|
6
|
+
@import "./themes/dark.css";
|
|
7
|
+
@import "./themes/light-mc.css";
|
|
8
|
+
@import "./themes/dark-mc.css";
|
|
9
|
+
|
|
10
|
+
@font-face {
|
|
11
|
+
font-family: "Material Symbols Rounded";
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 100 700;
|
|
14
|
+
font-display: swap;
|
|
15
|
+
src: url("/fonts/material-symbols/MaterialSymbolsRounded-VariableFont_FILL\,GRAD\,opsz\,wght.woff2")
|
|
16
|
+
format("woff2");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.material-symbols-rounded {
|
|
20
|
+
font-family: "Material Symbols Rounded";
|
|
21
|
+
font-weight: normal;
|
|
22
|
+
font-style: normal;
|
|
23
|
+
font-size: 24px; /* Preferred icon size */
|
|
24
|
+
display: inline-block;
|
|
25
|
+
line-height: 3;
|
|
26
|
+
text-transform: none;
|
|
27
|
+
letter-spacing: normal;
|
|
28
|
+
word-wrap: normal;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
direction: ltr;
|
|
31
|
+
|
|
32
|
+
/* Ligature icons */
|
|
33
|
+
font-feature-settings: "liga";
|
|
34
|
+
-webkit-font-feature-settings: "liga";
|
|
35
|
+
|
|
36
|
+
/* Variable font defaults */
|
|
37
|
+
font-variation-settings:
|
|
38
|
+
"FILL" 0,
|
|
39
|
+
"wght" 300,
|
|
40
|
+
"GRAD" 0,
|
|
41
|
+
"opsz" 24;
|
|
42
|
+
|
|
43
|
+
/* Support for all WebKit browsers. */
|
|
44
|
+
-webkit-font-smoothing: antialiased;
|
|
45
|
+
/* Support for Safari and Chrome. */
|
|
46
|
+
text-rendering: optimizeLegibility;
|
|
47
|
+
|
|
48
|
+
/* Support for Firefox. */
|
|
49
|
+
-moz-osx-font-smoothing: grayscale;
|
|
50
|
+
}
|
|
51
|
+
.material-symbols-rounded.md-18 {
|
|
52
|
+
font-size: 18px;
|
|
53
|
+
}
|
|
54
|
+
.material-symbols-rounded.md-24 {
|
|
55
|
+
font-size: 24px;
|
|
56
|
+
}
|
|
57
|
+
.material-symbols-rounded.md-36 {
|
|
58
|
+
font-size: 36px;
|
|
59
|
+
}
|
|
60
|
+
.material-symbols-rounded.md-48 {
|
|
61
|
+
font-size: 48px;
|
|
62
|
+
}
|
|
63
|
+
:root {
|
|
64
|
+
--font-size-base: 16px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
p,
|
|
68
|
+
h1,
|
|
69
|
+
h2,
|
|
70
|
+
h3,
|
|
71
|
+
h4,
|
|
72
|
+
h5,
|
|
73
|
+
h6 {
|
|
74
|
+
transition: color var(--transition-expressive-color);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
h1,
|
|
78
|
+
h2,
|
|
79
|
+
h3,
|
|
80
|
+
h4,
|
|
81
|
+
h5,
|
|
82
|
+
h6 {
|
|
83
|
+
font-family: "Outfit", sans-serif;
|
|
84
|
+
font-weight: inherit;
|
|
85
|
+
margin: 0;
|
|
86
|
+
padding: 0;
|
|
87
|
+
line-height: 1.3;
|
|
88
|
+
}
|
|
89
|
+
h1 {
|
|
90
|
+
font-size: 48px;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
}
|
|
93
|
+
h2 {
|
|
94
|
+
font-size: 36px;
|
|
95
|
+
font-weight: 500;
|
|
96
|
+
}
|
|
97
|
+
h3 {
|
|
98
|
+
font-size: 24px;
|
|
99
|
+
font-weight: 500;
|
|
100
|
+
}
|
|
101
|
+
h4 {
|
|
102
|
+
font-size: 24px;
|
|
103
|
+
font-weight: 300;
|
|
104
|
+
}
|
|
105
|
+
h5 {
|
|
106
|
+
font-size: 20px;
|
|
107
|
+
font-weight: 500;
|
|
108
|
+
}
|
|
109
|
+
h6 {
|
|
110
|
+
font-size: 18px;
|
|
111
|
+
font-weight: 300;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
body,
|
|
115
|
+
html {
|
|
116
|
+
background-color: var(--sys-background);
|
|
117
|
+
color: var(--md-sys-color-on-surface);
|
|
118
|
+
width: 100%;
|
|
119
|
+
min-height: 100dvh;
|
|
120
|
+
transition: background var(--transition-expressive-color);
|
|
121
|
+
margin: 0;
|
|
122
|
+
text-align: left;
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: row;
|
|
125
|
+
font-family: "Outfit", sans-serif !important;
|
|
126
|
+
line-height: 1.5;
|
|
127
|
+
font-size: var(--font-size-base);
|
|
128
|
+
font-weight: 400;
|
|
129
|
+
font-style: normal;
|
|
130
|
+
font-optical-sizing: auto;
|
|
131
|
+
column-rule: var(--md-sys-color-text);
|
|
132
|
+
font-synthesis: none;
|
|
133
|
+
text-rendering: optimizeLegibility;
|
|
134
|
+
-webkit-font-smoothing: antialiased;
|
|
135
|
+
-moz-osx-font-smoothing: grayscale;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.MuiSvgIcon-root {
|
|
139
|
+
stroke-width: 1;
|
|
140
|
+
}
|
|
141
|
+
.elevated {
|
|
142
|
+
box-shadow:
|
|
143
|
+
0 1px 1px rgba(0, 0, 0, 0.1),
|
|
144
|
+
0 2px 2px rgba(0, 0, 0, 0.1),
|
|
145
|
+
0 3px 3px rgba(0, 0, 0, 0.1),
|
|
146
|
+
0 4px 4px rgba(0, 0, 0, 0.1);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
*::-webkit-scrollbar {
|
|
150
|
+
display: none; /* Chrome, Safari, Edge */
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* ── Accessibility: Show Borders ──────────────────────────────────────────── */
|
|
154
|
+
[data-show-borders="true"] .a11y-modal-surface {
|
|
155
|
+
border: var(--a11y-border) !important;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
[data-show-borders="true"] .a11y-shape-loader {
|
|
159
|
+
border: var(--a11y-border) !important;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@media screen and (max-width: 812px) {
|
|
163
|
+
body,
|
|
164
|
+
html {
|
|
165
|
+
background: var(--sys-background);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import "./globals.css";
|
|
3
|
+
import "@fontsource/outfit/300.css";
|
|
4
|
+
import "@fontsource/outfit/400.css";
|
|
5
|
+
import "@fontsource/outfit/500.css";
|
|
6
|
+
import "@fontsource/outfit/600.css";
|
|
7
|
+
import "@fontsource/outfit/700.css";
|
|
8
|
+
import "@fontsource/outfit/800.css";
|
|
9
|
+
import ClientNav from "./ClientNav";
|
|
10
|
+
import { MobileViewProvider } from "@/components/tools/mobileViewProvider";
|
|
11
|
+
import LoadingScreen from "@/components/layout/pages/loadingScreen";
|
|
12
|
+
{
|
|
13
|
+
/*import Maintenance from "@/components/layout/pages/maintenance/Maintenance";*/
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const metadata: Metadata = {
|
|
17
|
+
title: "Yamato Zhen",
|
|
18
|
+
description: "Design. Code. Art. Explore Aedan's portfolio",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default function RootLayout({
|
|
22
|
+
children,
|
|
23
|
+
}: Readonly<{
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
}>) {
|
|
26
|
+
return (
|
|
27
|
+
<html lang="en" suppressHydrationWarning>
|
|
28
|
+
<head>
|
|
29
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
30
|
+
|
|
31
|
+
{/* Favicon */}
|
|
32
|
+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon.png" />
|
|
33
|
+
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
34
|
+
|
|
35
|
+
{/* Preload local icon font so it's fetched in parallel with CSS */}
|
|
36
|
+
<link
|
|
37
|
+
rel="preload"
|
|
38
|
+
href="/fonts/material-symbols/MaterialSymbolsRounded-VariableFont_FILL,GRAD,opsz,wght.woff2"
|
|
39
|
+
as="font"
|
|
40
|
+
type="font/woff2"
|
|
41
|
+
crossOrigin="anonymous"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
{/* Material Symbols Fonts
|
|
45
|
+
<link
|
|
46
|
+
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=optional"
|
|
47
|
+
rel="stylesheet"
|
|
48
|
+
/> */}
|
|
49
|
+
<meta
|
|
50
|
+
name="description"
|
|
51
|
+
content="Explore Aedan’s portfolio — blending design, art, and engineering to craft bold experiences."
|
|
52
|
+
/>
|
|
53
|
+
<meta
|
|
54
|
+
name="keywords"
|
|
55
|
+
content="UI/UX, digital art, frontend, design portfolio, creative technologist"
|
|
56
|
+
/>
|
|
57
|
+
<meta name="author" content="Aedan" />
|
|
58
|
+
|
|
59
|
+
<meta
|
|
60
|
+
property="og:title"
|
|
61
|
+
content="Aedan – UI/UX Designer, Digital Artist, Frontend Engineer"
|
|
62
|
+
/>
|
|
63
|
+
<meta
|
|
64
|
+
property="og:description"
|
|
65
|
+
content="Design. Code. Art. Explore Aedan's portfolio."
|
|
66
|
+
/>
|
|
67
|
+
<meta property="og:image" content="/preview.png" />
|
|
68
|
+
<meta property="og:url" content="https://yamatozhen.com" />
|
|
69
|
+
|
|
70
|
+
<meta name="twitter:card" content="summary_large_image" />
|
|
71
|
+
<meta name="twitter:title" content="Aedan – Portfolio" />
|
|
72
|
+
<meta
|
|
73
|
+
name="twitter:description"
|
|
74
|
+
content="Interfaces that wow. Code that works."
|
|
75
|
+
/>
|
|
76
|
+
<meta name="twitter:image" content="/preview.png" />
|
|
77
|
+
|
|
78
|
+
<title>
|
|
79
|
+
Yamato Zhen | UI/UX Designer, Digital Artist & Frontend Engineer
|
|
80
|
+
Portfolio
|
|
81
|
+
</title>
|
|
82
|
+
|
|
83
|
+
{/* Blocking theme script — runs before first paint to avoid FOUC.
|
|
84
|
+
Reads localStorage and stamps the correct palette class on <html>
|
|
85
|
+
before any CSS is applied, so the right colour tokens are available
|
|
86
|
+
from the very first render. */}
|
|
87
|
+
<script
|
|
88
|
+
dangerouslySetInnerHTML={{
|
|
89
|
+
__html: `(function(){
|
|
90
|
+
// Theme manager — disabled, when in dev
|
|
91
|
+
try {
|
|
92
|
+
var t = localStorage.getItem('theme');
|
|
93
|
+
var c = localStorage.getItem('contrast') || 'none';
|
|
94
|
+
if (!t) {
|
|
95
|
+
t = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
|
96
|
+
}
|
|
97
|
+
var suffix = c === 'medium' ? '-medium-contrast' : '';
|
|
98
|
+
document.documentElement.classList.add(t + suffix);
|
|
99
|
+
document.documentElement.setAttribute('data-theme', t);
|
|
100
|
+
var fs = localStorage.getItem('font-size');
|
|
101
|
+
if (fs) {
|
|
102
|
+
document.documentElement.style.setProperty('--font-size-base', fs + 'px');
|
|
103
|
+
}
|
|
104
|
+
var rm = localStorage.getItem('reduce-motion');
|
|
105
|
+
if (rm === 'true') {
|
|
106
|
+
document.documentElement.setAttribute('data-reduce-motion', 'true');
|
|
107
|
+
}
|
|
108
|
+
var sb = localStorage.getItem('show-borders');
|
|
109
|
+
if (sb === 'true') {
|
|
110
|
+
document.documentElement.setAttribute('data-show-borders', 'true');
|
|
111
|
+
}
|
|
112
|
+
} catch(e) {}
|
|
113
|
+
//document.documentElement.classList.add('dark');
|
|
114
|
+
//document.documentElement.setAttribute('data-theme', 'dark');
|
|
115
|
+
})();`,
|
|
116
|
+
}}
|
|
117
|
+
/>
|
|
118
|
+
</head>
|
|
119
|
+
<body style={{ display: "flex" }}>
|
|
120
|
+
<LoadingScreen />
|
|
121
|
+
<MobileViewProvider>
|
|
122
|
+
<ClientNav>{children}</ClientNav>
|
|
123
|
+
</MobileViewProvider>
|
|
124
|
+
{/*<Maintenance />*/}
|
|
125
|
+
</body>
|
|
126
|
+
</html>
|
|
127
|
+
);
|
|
128
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.dark-medium-contrast {
|
|
2
|
+
--md-sys-color-primary: rgb(176 228 255);
|
|
3
|
+
--md-sys-color-surface-tint: rgb(140 207 240);
|
|
4
|
+
--md-sys-color-on-primary: rgb(0 41 56);
|
|
5
|
+
--md-sys-color-primary-container: rgb(85 153 184);
|
|
6
|
+
--md-sys-color-on-primary-container: rgb(0 0 0);
|
|
7
|
+
--md-sys-color-secondary: rgb(202 224 236);
|
|
8
|
+
--md-sys-color-on-secondary: rgb(20 40 50);
|
|
9
|
+
--md-sys-color-secondary-container: rgb(127 148 159);
|
|
10
|
+
--md-sys-color-on-secondary-container: rgb(0 0 0);
|
|
11
|
+
--md-sys-color-tertiary: rgb(221 216 255);
|
|
12
|
+
--md-sys-color-on-tertiary: rgb(37 34 65);
|
|
13
|
+
--md-sys-color-tertiary-container: rgb(145 141 178);
|
|
14
|
+
--md-sys-color-on-tertiary-container: rgb(0 0 0);
|
|
15
|
+
--md-sys-color-error: rgb(255 210 204);
|
|
16
|
+
--md-sys-color-on-error: rgb(84 0 3);
|
|
17
|
+
--md-sys-color-error-container: rgb(255 84 73);
|
|
18
|
+
--md-sys-color-on-error-container: rgb(0 0 0);
|
|
19
|
+
--md-sys-color-background: rgb(15 20 23);
|
|
20
|
+
--md-sys-color-on-background: rgb(223 227 231);
|
|
21
|
+
--md-sys-color-surface: rgb(15 20 23);
|
|
22
|
+
--md-sys-color-on-surface: rgb(255 255 255);
|
|
23
|
+
--md-sys-color-surface-variant: rgb(64 72 76);
|
|
24
|
+
--md-sys-color-on-surface-variant: rgb(214 221 227);
|
|
25
|
+
--md-sys-color-outline: rgb(171 179 184);
|
|
26
|
+
--md-sys-color-outline-variant: rgb(138 145 150);
|
|
27
|
+
--md-sys-color-shadow: rgb(0 0 0);
|
|
28
|
+
--md-sys-color-scrim: rgb(0 0 0);
|
|
29
|
+
--md-sys-color-inverse-surface: rgb(223 227 231);
|
|
30
|
+
--md-sys-color-inverse-on-surface: rgb(38 43 46);
|
|
31
|
+
--md-sys-color-inverse-primary: rgb(0 78 103);
|
|
32
|
+
--md-sys-color-primary-fixed: rgb(191 232 255);
|
|
33
|
+
--md-sys-color-on-primary-fixed: rgb(0 19 28);
|
|
34
|
+
--md-sys-color-primary-fixed-dim: rgb(140 207 240);
|
|
35
|
+
--md-sys-color-on-primary-fixed-variant: rgb(0 59 79);
|
|
36
|
+
--md-sys-color-secondary-fixed: rgb(208 230 243);
|
|
37
|
+
--md-sys-color-on-secondary-fixed: rgb(0 19 28);
|
|
38
|
+
--md-sys-color-secondary-fixed-dim: rgb(180 202 214);
|
|
39
|
+
--md-sys-color-on-secondary-fixed-variant: rgb(37 57 67);
|
|
40
|
+
--md-sys-color-tertiary-fixed: rgb(228 223 255);
|
|
41
|
+
--md-sys-color-on-tertiary-fixed: rgb(16 13 43);
|
|
42
|
+
--md-sys-color-tertiary-fixed-dim: rgb(199 194 234);
|
|
43
|
+
--md-sys-color-on-tertiary-fixed-variant: rgb(53 50 83);
|
|
44
|
+
--md-sys-color-surface-dim: rgb(15 20 23);
|
|
45
|
+
--md-sys-color-surface-bright: rgb(64 69 72);
|
|
46
|
+
--md-sys-color-surface-container-lowest: rgb(4 8 10);
|
|
47
|
+
--md-sys-color-surface-container-low: rgb(25 30 33);
|
|
48
|
+
--md-sys-color-surface-container: rgb(36 41 43);
|
|
49
|
+
--md-sys-color-surface-container-high: rgb(46 51 54);
|
|
50
|
+
--md-sys-color-surface-container-highest: rgb(57 62 65);
|
|
51
|
+
}
|