From 372098c36371e713620b7e002673ce64a7779c76 Mon Sep 17 00:00:00 2001 From: 8liam Date: Wed, 25 Nov 2026 16:00:01 +1000 Subject: [PATCH 1/4] fix(site): paint the app demos with the app's lime palette --- site/src/styles/index.css | 56 +++++++++++++++++++----------- site/src/styles/sections/bento.css | 2 +- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/site/src/styles/index.css b/site/src/styles/index.css index 28423b6..5694016 100644 --- a/site/src/styles/index.css +++ b/site/src/styles/index.css @@ -34,10 +34,15 @@ --color-border: var(--border); --color-input: var(--input); --color-accent: var(--accent); + --color-accent-strong: var(--accent-strong); --color-primary: var(--primary); --color-primary-foreground: var(--primary-foreground); --color-success: var(--success); --color-destructive: var(--destructive); + --color-destructive-solid: var(--destructive-solid); + /* Hovered solid buttons darken, so their dark or white text only gains contrast. */ + --color-primary-hover: color-mix(in oklab, var(--primary) 88%, black); + --color-destructive-solid-hover: color-mix(in oklab, var(--destructive-solid) 88%, black); --color-warning: var(--warning); /* Tokens the app's spec-sheet components use; values sit on .oi-app below. */ --color-accent-foreground: var(--accent-foreground); @@ -61,36 +66,40 @@ /* The vendored app: tokens scoped to its frame, plus a small reset (Tailwind's preflight stays off). */ .oi-app { color-scheme: dark; + /* The app's default dark palette (src/lib/theme/palettes.config.ts). */ --background: #0a0a0a; --foreground: #f5f5f5; - --card: color-mix(in srgb, #0a0a0a 97%, white); + --card: #111111; --thumb-base-tint: 18%; --thumb-dot-tint: 100%; --thumb-art-tone: contrast(0.82) brightness(1.13); --muted: rgb(255 255 255 / 0.03); - --muted-foreground: #8d8d8d; - --border: rgb(255 255 255 / 0.08); - --input: rgb(255 255 255 / 0.1); - --accent: rgb(255 255 255 / 0.04); - --primary: oklch(57.1% 0.21 264); - --primary-foreground: #ffffff; + --muted-foreground: #818181; + --border: rgb(255 255 255 / 0.06); + --input: rgb(255 255 255 / 0.08); + --accent: #a0ff69; + --accent-foreground: #0a0a0a; + --accent-strong: #a0ff69; + --control-border: #636363; + --accent-edge: transparent; + --primary-edge: transparent; + --primary: #a0ff69; + --primary-foreground: #0a0a0a; --success: #10b981; --destructive: #f87171; + --destructive-solid: #dc2626; --warning: #fbbf24; --skeleton: rgb(255 255 255 / 0.06); --skeleton-highlight: rgb(255 255 255 / 0.1); - --accent-foreground: var(--foreground); - --accent-ink: var(--primary); - --accent-edge: transparent; - --primary-edge: transparent; - --border-strong: rgb(255 255 255 / 0.12); - --control-border: #636363; - --fill-1: #f5f5f5; - --fill-2: #9a9a9a; - --fill-3: #5c5c5c; - --fill-4: #3a3a3a; - --fill-5: #262626; - --slot-empty: rgb(255 255 255 / 0.1); + /* Derived exactly as the app's src/index.css derives them. */ + --accent-ink: var(--accent-strong); + --border-strong: color-mix(in srgb, var(--foreground) 12%, transparent); + --fill-1: var(--foreground); + --fill-2: color-mix(in srgb, var(--foreground) 61%, var(--background)); + --fill-3: color-mix(in srgb, var(--foreground) 35%, var(--background)); + --fill-4: color-mix(in srgb, var(--foreground) 20%, var(--background)); + --fill-5: color-mix(in srgb, var(--foreground) 12%, var(--background)); + --slot-empty: color-mix(in srgb, var(--foreground) 10%, transparent); /* Data-visualisation palette, dark values from the app's src/index.css. */ --chart-1: #87bafd; --chart-2: #c97409; @@ -207,10 +216,17 @@ outline-offset: -2px; } .oi-app :focus-visible { - outline: 2px solid var(--primary); + outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; } + .oi-app .no-focus-ring:focus-visible { + outline: none; + } + .oi-app input[type="checkbox"], + .oi-app input[type="radio"] { + accent-color: var(--accent-ink); + } } @keyframes skeleton-shimmer { diff --git a/site/src/styles/sections/bento.css b/site/src/styles/sections/bento.css index 9a8ce1c..80887b8 100644 --- a/site/src/styles/sections/bento.css +++ b/site/src/styles/sections/bento.css @@ -131,7 +131,7 @@ letter-spacing: 0.02em; } -/* ── Shared: the app's own UI vocabulary, rebuilt with tokens (Tailwind never scans this folder, and the vendored .oi-app scope would paint the primary blue, so the app's measurements are copied here and its primary maps to the lime accent) ── */ +/* ── Shared: the app's own UI vocabulary, rebuilt with tokens (Tailwind never scans this folder, so the app's measurements are copied here and its primary maps to the lime accent) ── */ .bento__ui { --ui-fg: var(--c-fg); --ui-muted: #8d8d8d; From d9e93e4ee7107b002d0d8e69a44b420374314594 Mon Sep 17 00:00:00 2001 From: 8liam Date: Wed, 25 Nov 2026 16:00:01 +1000 Subject: [PATCH 2/4] fix(site): give the storage demo's units the app's 288px column --- site/src/mock/demo/storage-demo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/mock/demo/storage-demo.tsx b/site/src/mock/demo/storage-demo.tsx index 65ddb50..a65c3fd 100644 --- a/site/src/mock/demo/storage-demo.tsx +++ b/site/src/mock/demo/storage-demo.tsx @@ -38,7 +38,7 @@ export default function StorageDemo() {
-
+
{units.map((unit) => ( Date: Wed, 25 Nov 2026 16:00:01 +1000 Subject: [PATCH 3/4] fix(site): dress the items demo filters as the app's select --- site/src/mock/demo/items-demo.tsx | 65 +++++++++++++++++++------------ 1 file changed, 40 insertions(+), 25 deletions(-) diff --git a/site/src/mock/demo/items-demo.tsx b/site/src/mock/demo/items-demo.tsx index be4de92..e32f238 100644 --- a/site/src/mock/demo/items-demo.tsx +++ b/site/src/mock/demo/items-demo.tsx @@ -1,3 +1,4 @@ +import { ChevronsUpDown } from "lucide-react"; import { useDeferredValue, useMemo, useState } from "react"; import { ItemTable } from "~/components/item-table/item-table.component"; import { PageHeader } from "~/components/page-header/page-header.component"; @@ -11,8 +12,16 @@ import { useDemoInventory } from "./use-demo-inventory"; const ALL = "all"; /** The demo shows only the first matches; the real app lists everything. */ const ROW_CAP = 12; +/** + * Native selects dressed as the app's Select trigger. The app's own Select places its list with + * `position: fixed`, which lands in the wrong spot inside the scaled demo panels. + */ +const SELECT_WRAP_CLASS = "relative min-w-0 flex-1 sm:w-48 sm:flex-none"; const SELECT_CLASS = - "h-8 min-w-0 flex-1 rounded-md border border-input bg-card px-2.5 outline-none sm:flex-none"; + "h-8 w-full appearance-none rounded-md border border-control bg-background pl-2.5 pr-7 text-foreground transition-colors hover:bg-muted"; +const SELECT_ICON_CLASS = + "pointer-events-none absolute top-1/2 right-2 -translate-y-1/2 text-muted-foreground"; +const SELECT_ICON_SIZE = 14; /** The real Items page body: search, filters, sortable table and the move bar, on sample data. */ export default function ItemsDemo() { @@ -56,30 +65,36 @@ export default function ItemsDemo() { aria-label={COPY.common.searchPlaceholder} className="h-8 w-full rounded-md border border-input bg-card px-2.5 outline-none placeholder:text-muted-foreground focus:border-primary sm:w-44" /> - - +
+ + +
+
+ + +
{selectedItems.length > 0 && ( From 3e5f10ccfd6d3a03bdb5bc5a26f08c84920ca4ab Mon Sep 17 00:00:00 2001 From: 8liam Date: Wed, 25 Nov 2026 20:28:43 +1000 Subject: [PATCH 4/4] refactor(site): read the demo palette from the app's own config The demos' .oi-app colours were a hand-kept copy that drifted when the app went lime. They are now generated at build time from PALETTES and CHART_PALETTE, so a palette change in the app reaches the site with no edit here. --- site/src/layouts/Base.astro | 2 ++ site/src/lib/app-tokens/app-tokens.config.ts | 11 ++++++ site/src/lib/app-tokens/app-tokens.ts | 24 +++++++++++++ site/src/styles/index.css | 37 +------------------- 4 files changed, 38 insertions(+), 36 deletions(-) create mode 100644 site/src/lib/app-tokens/app-tokens.config.ts create mode 100644 site/src/lib/app-tokens/app-tokens.ts diff --git a/site/src/layouts/Base.astro b/site/src/layouts/Base.astro index 221b5ad..4144bfc 100644 --- a/site/src/layouts/Base.astro +++ b/site/src/layouts/Base.astro @@ -1,6 +1,7 @@ --- import Analytics from '@vercel/analytics/astro'; import { site } from '../data/site.config'; +import { appTokenCss } from '../lib/app-tokens/app-tokens'; import '../styles/index.css'; interface Props { title?: string; description?: string; noindex?: boolean } @@ -35,6 +36,7 @@ const jsonLd = { {noindex && } +