@cahyo-dimas/freeday 3.19.1 → 3.21.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.
@@ -18,8 +18,10 @@ the **root of the consuming project**:
18
18
  ```markdown
19
19
  ## UI: Freeday design system (@cahyo-dimas/freeday)
20
20
 
21
- All UI in this project is built from Freeday: a **token-driven CSS kit** (`fdy-*` classes on plain
22
- markup) with **typed components for Vue, React and Blazor** layered on top. Most of the kit is
21
+ This project's components and tokens come from Freeday: a **token-driven CSS kit** (`fdy-*` classes
22
+ on plain markup) with **typed components for Vue, React and Blazor** layered on top. How the app
23
+ looks (type, shape, depth, palette, neutral, and the shape of each screen) is decided for this app,
24
+ inside the contract in `USAGE.md` §0. Most of the kit is
23
25
  markup + classes; the interactive components listed below also ship a typed wrapper, and in those three stacks
24
26
  the wrapper is the correct way to use them.
25
27
 
@@ -62,10 +64,16 @@ wrapper, use the raw markup and hydrate it:
62
64
  - `node_modules/@cahyo-dimas/freeday/docs/screen-states.md` lists the screens and states an app
63
65
  needs beyond its ideal screens: 404/403/session expired, the three kinds of empty, loading, load
64
66
  error, action feedback, account flows. **Starting a new app, build these with the first screens.**
67
+ - **Starting a new app, decide the look before the first screen.** Write the design brief from
68
+ `USAGE.md` §0 into this project's `DESIGN.md`, then `app.identity.css` from the template beside
69
+ it, then set `data-primary`, `data-neutral`, `data-style`, the app's default `data-density` and the default theme on
70
+ `<html>`. Keeping a default is allowed when the brief says why. Then pick each screen's
71
+ archetype from `USAGE.md` §7b before writing its markup.
65
72
 
66
73
  **Non-negotiables:**
67
74
  1. No raw hex or px in app CSS. Use tokens: `var(--color-primary)`, `var(--space-4)` (4px scale),
68
- `var(--radius-md)`, `var(--shadow-1)`, `var(--dur-2)`.
75
+ `var(--radius-md)`, `var(--shadow-1)`, `var(--dur-base)`. The one exception is `app.identity.css`,
76
+ which gives the tokens listed in `USAGE.md` §0 their literal values and sets nothing else.
69
77
  2. Components only touch semantic tokens (`--color-*`), never the primitive ramp (`--azure-600`).
70
78
  3. `.fdy-btn` is already the primary action (there is no `--primary`). One per screen; everything
71
79
  else is `--ghost` or `--text`.
@@ -79,7 +87,10 @@ wrapper, use the raw markup and hydrate it:
79
87
  SPA, re-hydrate dynamic DOM with `useFreeday` / `FreedayBlazor.initAll`. This applies to the
80
88
  components **without** a typed wrapper. For the ones listed in step 0, use the wrapper instead.
81
89
  8. Freeday owns components + tokens, **not layout**. Grids/stacks/one-off gaps come from our own
82
- layout layer. Build its theme on `var(--space-N)` so both systems stay in step.
90
+ layout layer. Build its theme on `var(--space-N)` so both systems stay in step. Each screen's
91
+ shape comes from the archetype table in `USAGE.md` §7b. Screens do not all open with a stats
92
+ row, a page is not a grid of identical cards, and an app with a few destinations puts a
93
+ horizontal `.fdy-nav` in the app bar instead of a sidebar.
83
94
  9. The enhancers render their own English UI strings (pager, filter dialog, validation). Never
84
95
  hand-translate one by rewriting the enhancer's nodes — set `data-fdy-text-<key>` on the
85
96
  component root, and `<html lang>` for date names. Keys are in COMPONENTS.md.
@@ -161,19 +172,21 @@ Recent additions most likely to replace something an app hand-rolled (all detail
161
172
  The order matters; skipping to components is what produces flat, identical-card screens.
162
173
 
163
174
  0. **Pick the screen shape first.** Which archetype is this: dashboard, master-detail, kanban,
164
- wizard, POS…? The repo's
165
- [`reference/README.md`](https://github.com/cahyo-dimas/freeday-ui-kit/blob/main/reference/README.md)
166
- maps 15 archetypes to the exact primitives that compose each one, and says plainly which shapes
167
- the kit has **no** component for (kanban columns, calendar month grid, chat bubbles, canvas) so
168
- you build the frame instead of inventing a class. Not in the npm package, so read it on GitHub.
175
+ wizard, POS…? `USAGE.md` §7b maps 15 archetypes to the primitives that compose each one, and
176
+ says plainly which shapes the kit has **no** component for (kanban columns, calendar month grid,
177
+ chat bubbles, canvas), so you build the frame instead of inventing a class.
169
178
  1. **Shell:** is `.fdy-app` already in place (usually once, in the app layout)? If not, copy it
170
179
  from `docs/getting-started.md` §The app shell.
171
180
  2. **Theme:** `data-theme="light|dark"` + `data-density="comfortable|compact"`, normally on
172
181
  `<html>`, set once at the root. Use `compact` for table-heavy back-office screens. Both attributes
173
182
  also work on **any ancestor**: `<section data-theme="dark">` inverts that region and every
174
- component inside it follows, so never hand-colour an inverted panel.
175
- 3. **Fonts:** the package ships **no** `@font-face`. Load Sora / IBM Plex Sans / JetBrains Mono
176
- yourself, or override `--font-display`/`--font-body`/`--font-mono`. Skipping this reads as
183
+ component inside it follows, so never hand-colour an inverted panel. `data-primary` and
184
+ `data-neutral` are set once on `<html>`. An inverted region in an app with a non-default palette
185
+ or neutral repeats both beside its `data-theme`, or its labels lose contrast. Never put either
186
+ axis on a bare wrapper: it half-applies (`USAGE.md` §5b).
187
+ 3. **Fonts:** the package ships **no** `@font-face`. Choose the families in `app.identity.css`
188
+ (`USAGE.md` §0) and load them yourself; the defaults are Sora / IBM Plex Sans / JetBrains Mono.
189
+ Skipping this reads as
177
190
  "unfinished design", not "missing dependency".
178
191
  4. **Page frame:** `.fdy-page` + `.fdy-page__header` (eyebrow + `.fdy-title-page` + desc on the
179
192
  left, **one** primary action on the right).
@@ -57,8 +57,8 @@ Freeday = **CSS** (semantic tokens + `fdy-*` classes) + **zero-dependency JS enh
57
57
  @import '@fontsource/sora/600.css'; @import '@fontsource/sora/700.css';
58
58
  @import '@fontsource-variable/ibm-plex-sans'; @import '@fontsource/jetbrains-mono/500.css';
59
59
  ```
60
- (Or a `<link>` to your own self-hosted copies, or override `--font-display`/`--font-body`/`--font-mono`
61
- to faces you already ship. If you keep a system-sans fallback, consider softening
60
+ (Or a `<link>` to your own self-hosted copies. Choosing different families is part of the app's
61
+ identity: see `USAGE.md` §0. If you keep a system-sans fallback, consider softening
62
62
  `--tracking-tighter` on headings, since it's tuned for Sora's proportions.)
63
63
  8. **Start from the shell, then compose.** Every application goes inside **`.fdy-app`** (see below);
64
64
  inside it, assemble screens from the composition primitives (`.fdy-page`, `.fdy-page__header`,
@@ -198,7 +198,7 @@ live docs also have a copy button per component.
198
198
  ```bash
199
199
  npm i @cahyo-dimas/freeday
200
200
  ```
201
- Lands in `package.json` as `"@cahyo-dimas/freeday": "^3.19.1"` (public npm package). `dist/` is
201
+ Lands in `package.json` as `"@cahyo-dimas/freeday": "^3.21.0"` (public npm package). `dist/` is
202
202
  committed and published → no build step; `npm ci` runs without auth.
203
203
 
204
204
  ### 2. Import the CSS + enhancers **once** in your entry (`src/main.ts`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cahyo-dimas/freeday",
3
- "version": "3.19.1",
3
+ "version": "3.21.0",
4
4
  "description": "Freeday: token-driven, framework-agnostic UI KIT (design source-of-truth).",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -97,7 +97,7 @@
97
97
  "scripts": {
98
98
  "build": "node tokens/build.mjs",
99
99
  "test": "node --test",
100
- "test:browser": "node --test --test-concurrency=3 browser/color-mix.mjs browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/stretch-warn.mjs browser/hidden-attr.mjs browser/form-grid-rows.mjs browser/theme-pref.mjs browser/text-override.mjs browser/control-heights.mjs browser/field-width.mjs browser/cfl-multi.mjs browser/cfl-dialog-only.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs browser/overlay-stack.mjs browser/chart-a11y.mjs browser/app-shell.mjs browser/bottom-nav.mjs browser/picker-states.mjs browser/tabs-strip.mjs browser/tabs-vertical.mjs browser/menu-align.mjs browser/cfl-narrow.mjs browser/form-reveal.mjs browser/confirm-search-copy.mjs browser/daterange-settled.mjs browser/display-parts.mjs browser/table-empty.mjs browser/table-footer-text.mjs browser/month-mode.mjs browser/monthpicker.mjs browser/page-columns.mjs browser/table-hover.mjs browser/typed-popover.mjs browser/filter-parity.mjs browser/filter-wrap.mjs browser/filter-stack.mjs browser/timepicker.mjs browser/form-kit-required.mjs browser/form-required-rest.mjs browser/autocomplete-open.mjs browser/picker-in-modal.mjs browser/harness-contract.mjs browser/app-owned.mjs browser/sortable.mjs browser/modal-phone.mjs browser/empty-ref.mjs browser/stack-standalone.mjs",
100
+ "test:browser": "node --test --test-concurrency=3 browser/color-mix.mjs browser/vanilla.mjs browser/adapter.mjs browser/layout.mjs browser/theme.mjs browser/axis-nesting.mjs browser/state.mjs browser/root-init.mjs browser/upload-states.mjs browser/number.mjs browser/card-stretch.mjs browser/stretch-warn.mjs browser/hidden-attr.mjs browser/form-grid-rows.mjs browser/theme-pref.mjs browser/text-override.mjs browser/control-heights.mjs browser/field-width.mjs browser/cfl-multi.mjs browser/cfl-dialog-only.mjs browser/crowding.mjs browser/over-dialog.mjs browser/chart-scale.mjs browser/overlay-stack.mjs browser/chart-a11y.mjs browser/app-shell.mjs browser/bottom-nav.mjs browser/picker-states.mjs browser/tabs-strip.mjs browser/tabs-vertical.mjs browser/menu-align.mjs browser/cfl-narrow.mjs browser/form-reveal.mjs browser/confirm-search-copy.mjs browser/daterange-settled.mjs browser/daterange-single.mjs browser/display-parts.mjs browser/table-empty.mjs browser/table-footer-text.mjs browser/month-mode.mjs browser/monthpicker.mjs browser/page-columns.mjs browser/table-hover.mjs browser/typed-popover.mjs browser/filter-parity.mjs browser/filter-wrap.mjs browser/filter-stack.mjs browser/timepicker.mjs browser/form-kit-required.mjs browser/form-required-rest.mjs browser/autocomplete-open.mjs browser/picker-in-modal.mjs browser/harness-contract.mjs browser/app-owned.mjs browser/sortable.mjs browser/modal-phone.mjs browser/empty-ref.mjs browser/stack-standalone.mjs",
101
101
  "prepack": "node tokens/build.mjs",
102
102
  "version": "node tokens/build.mjs && git add dist",
103
103
  "typecheck:react": "tsc -p adapters/react/tsconfig.json --noEmit",
@@ -78,4 +78,19 @@
78
78
  .fdy-daterange .fdy-datepicker{flex:0 1 11rem;min-width:7rem;}
79
79
  .fdy-daterange__sep{flex:none;color:var(--color-text-subtle);}
80
80
 
81
+ /* Range in one field (`data-layout="single"` / `layout="single"`): one trigger holding both dates.
82
+ Wider than a single picker's cap, which is sized for one date and would cut the second one off. */
83
+ .fdy-datepicker--range{max-width:18rem;}
84
+ /* The band. Day cells sit 2px apart, so a band painted on the cells alone is striped; each cell in it
85
+ spreads 1px into the gap on both sides, which closes it. The ends are square on their inner side
86
+ and keep their radius on the outer one, so the run reads as one bar from start to end. */
87
+ .fdy-cal__day.in-range{box-shadow:-1px 0 0 var(--color-primary-soft),1px 0 0 var(--color-primary-soft);}
88
+ .fdy-cal__day.in-range.is-today{box-shadow:inset 0 0 0 1.5px var(--color-border-strong),-1px 0 0 var(--color-primary-soft),1px 0 0 var(--color-primary-soft);}
89
+ .fdy-cal__day.is-range-start{border-top-right-radius:0;border-bottom-right-radius:0;box-shadow:1px 0 0 var(--color-primary-soft);}
90
+ .fdy-cal__day.is-range-end{border-top-left-radius:0;border-bottom-left-radius:0;box-shadow:-1px 0 0 var(--color-primary-soft);}
91
+ .fdy-cal__day.is-range-end.in-range{border-top-right-radius:var(--radius-sm);border-bottom-right-radius:var(--radius-sm);}
92
+ /* The band rules above weigh what the focus ring weighs and come later, so without this the day the
93
+ keyboard is previewing from would be the one cell in the grid with no visible focus. */
94
+ .fdy-cal__day.in-range:focus-visible,.fdy-cal__day.is-range-start:focus-visible,.fdy-cal__day.is-range-end:focus-visible{box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.26);}
95
+
81
96
  @media (prefers-reduced-motion:no-preference){.fdy-datepicker__panel:not([hidden]){animation:fdy-combo-in var(--dur-fast) var(--ease-standard);}}
@@ -9,14 +9,32 @@
9
9
  },
10
10
  "primary": { "_comment": { "$value": "Alias ramp. The primary semantics read THESE, never a brand ramp directly, so swapping a palette is eight declarations under [data-primary] instead of re-deriving every semantic token twice (once per theme). Only the eight shades the semantics actually consume are aliased." },
11
11
  "50": { "$value": "{azure.50}" }, "100": { "$value": "{azure.100}" }, "300": { "$value": "{azure.300}" }, "400": { "$value": "{azure.400}" }, "500": { "$value": "{azure.500}" }, "600": { "$value": "{azure.600}" }, "700": { "$value": "{azure.700}" }, "800": { "$value": "{azure.800}" } },
12
+ "neutral": { "_comment": { "$value": "Alias ramp for every grey in the kit: surfaces, borders, inks, chart grid, and the noir palette. Semantic tokens read THESE, never a neutral ramp directly, so [data-neutral] re-points fourteen declarations instead of re-deriving every semantic per theme. The default is slate, and it must equal the slate entry of $neutrals (asserted in test/build.test.mjs)." },
13
+ "0": { "$value": "{slate.0}" }, "50": { "$value": "{slate.50}" }, "100": { "$value": "{slate.100}" }, "200": { "$value": "{slate.200}" }, "300": { "$value": "{slate.300}" }, "400": { "$value": "{slate.400}" }, "450": { "$value": "{slate.450}" }, "500": { "$value": "{slate.500}" }, "600": { "$value": "{slate.600}" }, "700": { "$value": "{slate.700}" }, "800": { "$value": "{slate.800}" }, "850": { "$value": "{slate.850}" }, "900": { "$value": "{slate.900}" }, "950": { "$value": "{slate.950}" } },
12
14
  "slate": {
13
15
  "0": { "$value": "#ffffff" }, "50": { "$value": "#f7f8fa" },
14
16
  "100": { "$value": "#eef0f4" }, "200": { "$value": "#e0e3ea" },
15
17
  "300": { "$value": "#cbd0da" }, "400": { "$value": "#99a1b3" }, "450": { "$value": "#798295" },
16
18
  "500": { "$value": "#6b7488" }, "600": { "$value": "#4d5568" },
17
- "700": { "$value": "#3a4152" }, "800": { "$value": "#262b38" },
19
+ "700": { "$value": "#3a4152" }, "800": { "$value": "#262b38" }, "850": { "$value": "#1c2130" },
18
20
  "900": { "$value": "#171b26" }, "950": { "$value": "#0e111a" }
19
21
  },
22
+ "grey": { "_comment": { "$value": "The hueless neutral. Each shade keeps the OKLCH lightness of the slate shade with the same number and sets chroma to 0, so every contrast ratio the gate measures for slate moves by a few hundredths at most. Computed once, committed as literals; the build does no OKLCH maths." },
23
+ "0": { "$value": "#ffffff" }, "50": { "$value": "#f8f8f8" },
24
+ "100": { "$value": "#f0f0f0" }, "200": { "$value": "#e3e3e3" },
25
+ "300": { "$value": "#d0d0d0" }, "400": { "$value": "#a1a1a1" }, "450": { "$value": "#828282" },
26
+ "500": { "$value": "#747474" }, "600": { "$value": "#555555" },
27
+ "700": { "$value": "#414141" }, "800": { "$value": "#2b2b2b" }, "850": { "$value": "#222222" },
28
+ "900": { "$value": "#1b1b1b" }, "950": { "$value": "#111111" }
29
+ },
30
+ "stone": { "_comment": { "$value": "The warm neutral. Each shade keeps the OKLCH lightness of the slate shade with the same number, at hue 70 and chroma min(0.85 x slate's chroma, 0.020); shades 800 to 950 cap chroma at 0.012 instead, because 0.020 read as brown on a dark surface. Computed once, committed as literals; the build does no OKLCH maths." },
31
+ "0": { "$value": "#ffffff" }, "50": { "$value": "#f9f8f6" },
32
+ "100": { "$value": "#f2efed" }, "200": { "$value": "#e7e2dd" },
33
+ "300": { "$value": "#d5cfc7" }, "400": { "$value": "#a99f94" }, "450": { "$value": "#8a8075" },
34
+ "500": { "$value": "#7c7268" }, "600": { "$value": "#5d5449" },
35
+ "700": { "$value": "#484036" }, "800": { "$value": "#2f2a25" }, "850": { "$value": "#25211b" },
36
+ "900": { "$value": "#1f1a15" }, "950": { "$value": "#15110c" }
37
+ },
20
38
  "sky": {
21
39
  "50": { "$value": "#eff6fd" }, "100": { "$value": "#d6e9fb" },
22
40
  "200": { "$value": "#b0d4f6" }, "300": { "$value": "#7bbdef" },
@@ -44,27 +62,33 @@
44
62
 
45
63
  "$primaries": {
46
64
  "_comment": "The primary palette axis. Each entry redefines the eight-shade `primary` ALIAS ramp under [data-primary=\"name\"], so the semantic mapping (which shade is the fill, which is hover, which is the soft wash) is written once and never per palette. `on`/`onDark` are the label ink on a primary fill; both are MEASURED, and every pair is asserted by the contrast suite. `darkShift` pulls the dark aliases one step lighter, for a hue whose 500 sits in the luminance band where neither white nor ink reaches 4.5:1.",
47
- "azure": { "ramp": "azure", "on": "{slate.0}", "onDark": "{slate.0}" },
48
- "sky": { "ramp": "sky", "on": "{slate.0}", "onDark": "{slate.950}" },
49
- "blue": { "ramp": "blue", "on": "{slate.0}", "onDark": "{slate.950}" },
50
- "indigo": { "ramp": "indigo", "on": "{slate.0}", "onDark": "{slate.950}", "darkShift": true },
51
- "violet": { "ramp": "violet", "on": "{slate.0}", "onDark": "{slate.950}", "darkShift": true },
52
- "purple": { "ramp": "purple", "on": "{slate.0}", "onDark": "{slate.950}" },
53
- "fuchsia": { "ramp": "fuchsia", "on": "{slate.0}", "onDark": "{slate.950}" },
54
- "pink": { "ramp": "pink", "on": "{slate.0}", "onDark": "{slate.950}" },
55
- "rose": { "ramp": "rose", "on": "{slate.0}", "onDark": "{slate.950}" },
56
- "orange": { "ramp": "orange", "on": "{slate.950}", "onDark": "{slate.950}" },
57
- "amber": { "ramp": "amber", "on": "{slate.950}", "onDark": "{slate.950}" },
58
- "yellow": { "on": "{slate.0}", "onDark": "{slate.950}",
65
+ "azure": { "ramp": "azure", "on": "{neutral.0}", "onDark": "{neutral.0}" },
66
+ "sky": { "ramp": "sky", "on": "{neutral.0}", "onDark": "{neutral.950}" },
67
+ "blue": { "ramp": "blue", "on": "{neutral.0}", "onDark": "{neutral.950}" },
68
+ "indigo": { "ramp": "indigo", "on": "{neutral.0}", "onDark": "{neutral.950}", "darkShift": true },
69
+ "violet": { "ramp": "violet", "on": "{neutral.0}", "onDark": "{neutral.950}", "darkShift": true },
70
+ "purple": { "ramp": "purple", "on": "{neutral.0}", "onDark": "{neutral.950}" },
71
+ "fuchsia": { "ramp": "fuchsia", "on": "{neutral.0}", "onDark": "{neutral.950}" },
72
+ "pink": { "ramp": "pink", "on": "{neutral.0}", "onDark": "{neutral.950}" },
73
+ "rose": { "ramp": "rose", "on": "{neutral.0}", "onDark": "{neutral.950}" },
74
+ "orange": { "ramp": "orange", "on": "{neutral.950}", "onDark": "{neutral.950}" },
75
+ "amber": { "ramp": "amber", "on": "{neutral.950}", "onDark": "{neutral.950}" },
76
+ "yellow": { "on": "{neutral.0}", "onDark": "{neutral.950}",
59
77
  "light": { "50": "{yellow.50}", "100": "{yellow.100}", "300": "{yellow.300}", "400": "{yellow.400}", "500": "{yellow.500}", "600": "{yellow.700}", "700": "{yellow.800}", "800": "{yellow.900}" } },
60
- "lime": { "ramp": "lime", "on": "{slate.950}", "onDark": "{slate.950}" },
61
- "green": { "ramp": "green", "on": "{slate.950}", "onDark": "{slate.950}" },
62
- "emerald": { "ramp": "emerald", "on": "{slate.950}", "onDark": "{slate.950}" },
63
- "teal": { "ramp": "teal", "on": "{slate.950}", "onDark": "{slate.950}" },
64
- "cyan": { "ramp": "cyan", "on": "{slate.950}", "onDark": "{slate.950}" },
65
- "noir": { "on": "{slate.0}", "onDark": "{slate.950}",
66
- "light": { "50": "{slate.100}", "100": "{slate.200}", "300": "{slate.500}", "400": "{slate.700}", "500": "{slate.800}", "600": "{slate.900}", "700": "{slate.800}", "800": "{slate.950}" },
67
- "dark": { "50": "{slate.800}", "100": "{slate.700}", "300": "{slate.300}", "400": "{slate.200}", "500": "{slate.100}", "600": "{slate.50}", "700": "{slate.200}", "800": "{slate.300}" } }
78
+ "lime": { "ramp": "lime", "on": "{neutral.950}", "onDark": "{neutral.950}" },
79
+ "green": { "ramp": "green", "on": "{neutral.950}", "onDark": "{neutral.950}" },
80
+ "emerald": { "ramp": "emerald", "on": "{neutral.950}", "onDark": "{neutral.950}" },
81
+ "teal": { "ramp": "teal", "on": "{neutral.950}", "onDark": "{neutral.950}" },
82
+ "cyan": { "ramp": "cyan", "on": "{neutral.950}", "onDark": "{neutral.950}" },
83
+ "noir": { "on": "{neutral.0}", "onDark": "{neutral.950}",
84
+ "light": { "50": "{neutral.100}", "100": "{neutral.200}", "300": "{neutral.500}", "400": "{neutral.700}", "500": "{neutral.800}", "600": "{neutral.900}", "700": "{neutral.800}", "800": "{neutral.950}" },
85
+ "dark": { "50": "{neutral.800}", "100": "{neutral.700}", "300": "{neutral.300}", "400": "{neutral.200}", "500": "{neutral.100}", "600": "{neutral.50}", "700": "{neutral.200}", "800": "{neutral.300}" } }
86
+ },
87
+ "$neutrals": {
88
+ "_comment": "The neutral axis. Each entry names the Tier-1 ramp the `neutral` alias points at under [data-neutral=\"name\"]. The build flattens the whole token set once per entry and emits only what differs from the default, so tints mixed over a surface and channel triples follow the neutral with no list kept here. slate is the default and emits nothing.",
89
+ "slate": { "ramp": "slate" },
90
+ "grey": { "ramp": "grey" },
91
+ "stone": { "ramp": "stone" }
68
92
  },
69
93
 
70
94
  "font": {
@@ -104,38 +128,38 @@
104
128
  "primary": { "$value": "{primary.600}", "$dark": "{primary.500}" },
105
129
  "primary-hover": { "$value": "{primary.700}", "$dark": "{primary.400}" },
106
130
  "primary-active": { "$value": "{primary.800}", "$dark": "{primary.300}" },
107
- "on-primary": { "$value": "{slate.0}", "$dark": "{slate.0}" },
131
+ "on-primary": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
108
132
  "_comment_primary_alpha": { "$value": "A custom property can NEVER hold color-mix(): the declaration that finally uses it contains var(), so it is assumed valid at parse time and only fails at computed-value time, where the property drops to its INITIAL value instead of to a preceding fallback. There is no earlier line to catch it and @supports cannot reach inside a var() chain. Both of these said color-mix() until v3.7.0, which is why a dark-theme chip on Safari <= 16.1 lost its wash entirely. rgba() over a channel triple is the same colour, stated statically." },
109
133
  "primary-soft": { "$value": "{primary.50}", "$dark": "rgba({primary.600.rgb}, .2)" },
110
134
  "primary-border": { "$value": "{primary.100}", "$dark": "rgba({primary.400.rgb}, .28)" },
111
135
 
112
136
  "accent": { "$value": "{sky.600}", "$dark": "{sky.400}" },
113
137
  "accent-hover": { "$value": "{sky.700}", "$dark": "{sky.300}" },
114
- "on-accent": { "$value": "{slate.0}", "$dark": "#06233f" },
115
- "on-danger": { "$value": "{slate.0}", "$dark": "{slate.0}" },
138
+ "on-accent": { "$value": "{neutral.0}", "$dark": "#06233f" },
139
+ "on-danger": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
116
140
  "danger-btn": { "$value": "{red.600}", "$dark": "{red.600}" },
117
141
 
118
- "surface": { "$value": "{slate.0}", "$dark": "{slate.950}" },
119
- "surface-2": { "$value": "{slate.50}", "$dark": "{slate.900}" },
120
- "surface-3": { "$value": "{slate.100}", "$dark": "{slate.800}" },
121
- "surface-stripe": { "$comment": "The zebra tint: 55% of --color-surface-2 over --color-surface, flattened. OPAQUE on purpose, and that is the whole reason it is a token rather than a mix written in the table: a frozen column paints this and scrolls over its neighbours, so a translucent stripe would show the rows travelling underneath it. Both values are MEASURED against the mix they replace (rgb(251,251,252) light, rgb(19,23,33) dark, identical to the byte) — see test/color-mix.test.mjs.", "$value": "#fbfbfc", "$dark": "#131721" },
122
- "surface-raised": { "$comment": "How transparent glass may be is decided by the CONTRAST GATE, not by taste: below .79 (light) / .88 (dark) the muted ink and primary-strong stop clearing 4.5:1 once the panel is composited over an arbitrary ground. Measured, and asserted in test/contrast.test.mjs. The frost people actually see comes from --surface-filter's blur, not from the alpha.", "$value": "{color.surface}", "$dark": "{color.surface}", "$glass": "rgba(255,255,255,.82)", "$glassDark": "rgba(23,27,38,.90)" },
142
+ "surface": { "$value": "{neutral.0}", "$dark": "{neutral.950}" },
143
+ "surface-2": { "$value": "{neutral.50}", "$dark": "{neutral.900}" },
144
+ "surface-3": { "$value": "{neutral.100}", "$dark": "{neutral.800}" },
145
+ "surface-stripe": { "$comment": "The zebra tint: 55% of --color-surface-2 over --color-surface, flattened by the build per theme and per neutral. OPAQUE on purpose, and that is the whole reason it is a token rather than a mix written in the table: a frozen column paints this and scrolls over its neighbours, so a translucent stripe would show the rows travelling underneath it.", "$value": "color-mix(in srgb, {color.surface-2} 55%, {color.surface})" },
146
+ "surface-raised": { "$comment": "How transparent glass may be is decided by the CONTRAST GATE, not by taste: below .79 (light) / .88 (dark) the muted ink and primary-strong stop clearing 4.5:1 once the panel is composited over an arbitrary ground. Measured, and asserted in test/contrast.test.mjs. The frost people actually see comes from --surface-filter's blur, not from the alpha.", "$value": "{color.surface}", "$dark": "{color.surface}", "$glass": "rgba(255,255,255,.82)", "$glassDark": "rgba({neutral.900.rgb},.90)" },
123
147
  "scrim": { "$value": "rgba(10,12,25,.5)", "$comment": "Overlay dim. Deliberately the SAME in both themes: a scrim darkens whatever sits behind it, so it does not flip with the palette. The literal matches the modal/drawer ::backdrop, which states it literally because ::backdrop does not inherit a custom property in every engine." },
124
148
 
125
- "text": { "$value": "{slate.900}", "$dark": "{slate.100}" },
126
- "text-muted": { "$value": "{slate.600}", "$dark": "{slate.400}" },
127
- "text-subtle": { "$comment": "The faintest ink, and the ONLY text tier whose dark value is not the light one's mirror (#053). Light slate-500 on white is 4.69:1 and clears AA on its own; the same primitive on the dark surface is 4.02:1, and the tier is exactly what a placeholder uses — the one line telling an operator what an empty field wants. Dark is slate-450 for that reason: 4.88:1 on --color-surface, which is what every .fdy-input paints itself, so the placeholder clears AA where placeholders actually sit. It is still NOT a body-text tier on the darker surfaces (3.66:1 on surface-3); reaching AA there needs slate-400, which is --color-text-muted, and a subtle that equals muted is not a tier. test/contrast.test.mjs asserts both halves of that split.", "$value": "{slate.500}", "$dark": "{slate.450}" },
128
- "on-brand": { "$value": "{slate.0}", "$dark": "{slate.0}" },
149
+ "text": { "$value": "{neutral.900}", "$dark": "{neutral.100}" },
150
+ "text-muted": { "$value": "{neutral.600}", "$dark": "{neutral.400}" },
151
+ "text-subtle": { "$comment": "The faintest ink, and the ONLY text tier whose dark value is not the light one's mirror (#053). Light slate-500 on white is 4.69:1 and clears AA on its own; the same primitive on the dark surface is 4.02:1, and the tier is exactly what a placeholder uses — the one line telling an operator what an empty field wants. Dark is slate-450 for that reason: 4.88:1 on --color-surface, which is what every .fdy-input paints itself, so the placeholder clears AA where placeholders actually sit. It is still NOT a body-text tier on the darker surfaces (3.66:1 on surface-3); reaching AA there needs slate-400, which is --color-text-muted, and a subtle that equals muted is not a tier. test/contrast.test.mjs asserts both halves of that split.", "$value": "{neutral.500}", "$dark": "{neutral.450}" },
152
+ "on-brand": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
129
153
 
130
- "border": { "$value": "{slate.200}", "$dark": "{slate.800}" },
131
- "border-strong": { "$value": "{slate.300}", "$dark": "{slate.700}" },
132
- "border-muted": { "$value": "{slate.100}", "$dark": "#1c2130" },
133
- "control-border": { "$value": "{slate.450}", "$dark": "{slate.450}" },
134
- "switch-thumb": { "$value": "{slate.0}" },
154
+ "border": { "$value": "{neutral.200}", "$dark": "{neutral.800}" },
155
+ "border-strong": { "$value": "{neutral.300}", "$dark": "{neutral.700}" },
156
+ "border-muted": { "$value": "{neutral.100}", "$dark": "{neutral.850}" },
157
+ "control-border": { "$value": "{neutral.450}", "$dark": "{neutral.450}" },
158
+ "switch-thumb": { "$value": "{neutral.0}" },
135
159
  "shadow-inset": { "$value": "rgba(16,14,30,.06)" },
136
160
 
137
- "inverse-surface": { "$value": "{slate.900}", "$dark": "{slate.100}" },
138
- "inverse-text": { "$value": "{slate.0}", "$dark": "{slate.900}" },
161
+ "inverse-surface": { "$value": "{neutral.900}", "$dark": "{neutral.100}" },
162
+ "inverse-text": { "$value": "{neutral.0}", "$dark": "{neutral.900}" },
139
163
 
140
164
  "success": { "$value": "{green.600}", "$dark": "{green.500}" }, "success-soft": { "$value": "{green.100}", "$dark": "rgba(34,197,94,.18)" },
141
165
  "warning": { "$value": "#c2740a", "$dark": "{amber.500}" }, "warning-soft": { "$value": "{amber.100}", "$dark": "rgba(234,179,8,.18)" },
@@ -153,14 +177,14 @@
153
177
 
154
178
  "_comment_rgb": { "$value": "Channel triples, the kit's way of putting an alpha on a role. `rgba(var(--color-primary-rgb), .26)` is exactly `color-mix(in srgb, var(--color-primary) 26%, transparent)` and works back to Safari 9; the mix form does not survive Safari <= 16.1, and because it carries var() it fails at computed-value time, where a preceding fallback declaration is never consulted. Each triple MUST stay the channels of the role it is named after, in every theme and every palette; test/color-mix.test.mjs asserts exactly that, scope by scope." },
155
179
  "primary-rgb": { "$value": "{primary.600.rgb}", "$dark": "{primary.500.rgb}" },
156
- "on-primary-rgb": { "$value": "{slate.0.rgb}" },
180
+ "on-primary-rgb": { "$value": "{neutral.0.rgb}" },
157
181
  "danger-rgb": { "$value": "{red.600.rgb}", "$dark": "{red.400.rgb}" },
158
182
  "danger-btn-rgb": { "$value": "{red.600.rgb}" },
159
183
  "success-rgb": { "$value": "{green.600.rgb}", "$dark": "{green.500.rgb}" },
160
184
  "warning-rgb": { "$comment": "The one triple written out rather than referenced: --color-warning's light value is itself a literal (#c2740a, a darkened amber with no ramp step of its own), so there is no reference to follow. The drift that invites is what the per-scope assertion in test/color-mix.test.mjs is for.", "$value": "194,116,10", "$dark": "{amber.500.rgb}" },
161
185
  "info-rgb": { "$value": "{blue.600.rgb}", "$dark": "{blue.400.rgb}" },
162
- "surface-rgb": { "$value": "{slate.0.rgb}", "$dark": "{slate.950.rgb}" },
163
- "inverse-text-rgb": { "$value": "{slate.0.rgb}", "$dark": "{slate.900.rgb}" }
186
+ "surface-rgb": { "$value": "{neutral.0.rgb}", "$dark": "{neutral.950.rgb}" },
187
+ "inverse-text-rgb": { "$value": "{neutral.0.rgb}", "$dark": "{neutral.900.rgb}" }
164
188
  },
165
189
 
166
190
  "chart": {
@@ -172,8 +196,8 @@
172
196
  "6": { "$value": "#008300", "$dark": "#008300" },
173
197
  "7": { "$value": "#4a3aa7", "$dark": "#9085e9" },
174
198
  "8": { "$value": "#e34948", "$dark": "#e66767" },
175
- "grid": { "$value": "{slate.200}", "$dark": "{slate.800}" },
176
- "tick": { "$value": "{slate.400}", "$dark": "{slate.600}" }
199
+ "grid": { "$value": "{neutral.200}", "$dark": "{neutral.800}" },
200
+ "tick": { "$value": "{neutral.400}", "$dark": "{neutral.600}" }
177
201
  },
178
202
 
179
203
  "_comment_tone": "General categorical palette: the same 8 validated hues as chart, aliased under a chart-neutral name for avatars, chips, tags, legend swatches (theme-follows via chart's own $dark).",