feat(frontend): add cabinet shells, brand tokens, and state primitives

This commit is contained in:
shira committed 2026-10-06 01:09:08 +03:00
1 parent dda3825786
commit 0e2a3b02ab
85 files changed
+3313 -113

No files matched your search

+7 -16
View File
@@ -1,24 +1,15 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Route, Routes } from "react-router-dom";
import { HomePage } from "../../pages/home";
import { QueryClientProvider } from "@tanstack/react-query";
import { RouterProvider, createBrowserRouter } from "react-router-dom";
import { createQueryClient } from "../providers/query-client";
import { routes } from "../router/routes";
const queryClient = new QueryClient({
defaultOptions: {
queries: {
retry: false,
staleTime: 30_000,
},
},
});
const queryClient = createQueryClient();
const router = createBrowserRouter(routes);
export function App() {
return (
<QueryClientProvider client={queryClient}>
<BrowserRouter>
<Routes>
<Route path="*" element={<HomePage />} />
</Routes>
</BrowserRouter>
<RouterProvider router={router} />
</QueryClientProvider>
);
}
+11
View File
@@ -0,0 +1,11 @@
import { Outlet, ScrollRestoration } from "react-router-dom";
/** Top route element shared by every route group. */
export function RootLayout() {
return (
<>
<ScrollRestoration />
<Outlet />
</>
);
}
+24
View File
@@ -0,0 +1,24 @@
import { useRouteError } from "react-router-dom";
import { ErrorState, Page } from "../../shared/ui";
/**
* Last-resort boundary for errors thrown while rendering a route. It has no
* shell, because the shell itself may be what failed.
*/
export function RouteErrorPage() {
const error = useRouteError();
return (
<main>
<Page title="Ошибка интерфейса" eyebrow="Lincodex">
<ErrorState
error={error}
title="Не удалось показать страницу"
onRetry={() => {
window.location.reload();
}}
/>
</Page>
</main>
);
}
+67 -12
View File
@@ -1,32 +1,87 @@
/* Global base styles. Tokens and fonts are imported before this file. */
:root {
font-family:
Inter,
ui-sans-serif,
system-ui,
-apple-system,
BlinkMacSystemFont,
"Segoe UI",
sans-serif;
color: #15202b;
background: #f4f6f8;
color: var(--color-text);
font-family: var(--font-text);
font-size: 100%;
line-height: var(--line-height-body);
background-color: var(--color-canvas);
color-scheme: light;
font-synthesis: none;
text-rendering: optimizelegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
* {
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
min-width: 320px;
min-width: 20rem;
min-height: 100vh;
margin: 0;
font-size: var(--font-size-m);
/* Sparse dot grid: a quiet "protocol paper" texture behind surfaces. */
background-image: radial-gradient(circle at 1px 1px, rgb(27 28 33 / 9%) 1px, transparent 1.5px);
background-size: 1.5rem 1.5rem;
}
h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
margin: 0;
}
h1,
h2,
h3,
h4 {
line-height: var(--line-height-snug);
text-wrap: balance;
}
button,
input,
select,
textarea {
font: inherit;
color: inherit;
}
img,
svg {
display: block;
max-width: 100%;
}
/* One focus indicator for every interactive element. Local dark regions
* override --color-focus-ring with a checked value. */
:focus-visible {
outline: var(--focus-ring-width) solid var(--color-focus-ring);
outline-offset: var(--focus-ring-offset);
}
:focus:not(:focus-visible) {
outline: none;
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
scroll-behavior: auto !important;
transition-duration: 0.01ms !important;
}
}