@cahyo-dimas/freeday 3.20.0 → 3.22.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, and lay out phone screens by `USAGE.md` §8.
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. Overriding anything else takes the app outside the kit's guarantee (§0): prefer the sanctioned attribute, such as `data-density="touch"` or `data-primary-fill="deep"`, when one exists.
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
- 2. **Theme:** `data-theme="light|dark"` + `data-density="comfortable|compact"`, normally on
172
- `<html>`, set once at the root. Use `compact` for table-heavy back-office screens. Both attributes
180
+ 2. **Theme:** `data-theme="light|dark"` + `data-density="comfortable|compact|touch"`, normally on
181
+ `<html>`, set once at the root. Use `compact` for table-heavy back-office screens and `touch` for an app people use on a phone. 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).
@@ -30,7 +30,7 @@ Freeday = **CSS** (semantic tokens + `fdy-*` classes) + **zero-dependency JS enh
30
30
  **after** that must be re-hydrated: `window.Freeday<X>.initAll(el)` (idempotent, safe to repeat).
31
31
  Each framework's adapter wraps this, so you don't call it manually.
32
32
  4. **Theme via `data-*`.** `data-theme="light|dark"` (all semantic tokens switch) +
33
- `data-density="comfortable|compact"` (control height, for data-dense screens). Normally on
33
+ `data-density="comfortable|compact|touch"` (control height: `compact` for data-dense screens, `touch` for phones). Normally on
34
34
  `<html>`; change at runtime with `document.documentElement.dataset.theme = 'dark'`. Both also
35
35
  work on **any ancestor**, because these are inheriting custom properties, so `<section data-theme="dark">`
36
36
  inverts just that region and every component inside it follows. See [`USAGE.md`](../USAGE.md) §5b.
@@ -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.20.0"` (public npm package). `dist/` is
201
+ Lands in `package.json` as `"@cahyo-dimas/freeday": "^3.22.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.20.0",
3
+ "version": "3.22.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/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",
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/palette-os-dark.mjs browser/primary-fill.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/actionbar.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",
@@ -0,0 +1,68 @@
1
+ /* Freeday. Action bar
2
+ *
3
+ * One to three actions pinned to the bottom of the screen, where a thumb reaches them on a phone:
4
+ * the sign-in button, approve and reject on a document, save on a long form. Before this, an app
5
+ * either put its primary action mid-page, where it scrolled away, or hand-wrote a fixed bar that
6
+ * sat on top of the bottom nav.
7
+ *
8
+ * Sticky, not fixed: the bar keeps its place in the flow, so the last row above it is never
9
+ * covered and the page needs no extra reservation. In a shell with a bottom nav it rests on top of
10
+ * the nav; anywhere else it clears the home indicator itself. */
11
+ .fdy-actionbar{
12
+ position:sticky;bottom:0;z-index:40;
13
+ display:flex;gap:var(--space-2);
14
+ padding:var(--space-3) var(--space-4);
15
+ padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
16
+ background:var(--color-surface-raised);
17
+ backdrop-filter:var(--surface-filter);
18
+ -webkit-backdrop-filter:var(--surface-filter);
19
+ border-top:var(--bw) solid var(--color-border);
20
+ }
21
+ /* The buttons share the width; the primary action goes last, nearest the thumb. */
22
+ .fdy-actionbar > .fdy-btn{flex:1 1 0;min-width:0;}
23
+ /* Sticky is bounded by its parent, and `.fdy-app__main` has bottom padding that sits below the bar,
24
+ * so at the end of the page the bar would stop short of the edge by that padding. A negative bottom
25
+ * margin cancels it when the bar is the last child (no :has(), the support floor includes iOS 15).
26
+ * The bar may also sit one wrapper down, in a page wrapper such as `.fdy-page`. Sticky is then
27
+ * bounded by the wrapper, so the wrapper must be the last in-flow content of main and its content
28
+ * box must end where main's does: no bottom padding, border or margin of its own (`.fdy-page` has
29
+ * none). A closed dialog and the fixed bottom nav take no room in the flow, so they may follow it.
30
+ * A dialog or drawer is not a wrapper: a bar inside a modal is not offset at any depth.
31
+ * Values mirror app-shell.css: main's padding is --space-8, and --space-5 at max-width 720px. */
32
+ .fdy-app__main > .fdy-actionbar:last-child,
33
+ .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-8));}
34
+ @media (max-width:720px){
35
+ .fdy-app__main > .fdy-actionbar:last-child,
36
+ .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{margin-bottom:calc(-1 * var(--space-5));}
37
+ /* On a phone the bar runs edge to edge, like the nav it rests on: inset by main's side padding
38
+ * it would leave a strip of scrolling content showing on either side. The same depth rule
39
+ * holds: a wrapper between main and the bar must add no side padding, border or margin. The
40
+ * landscape notch is cleared by the bar's own padding. */
41
+ .fdy-app__main > .fdy-actionbar,
42
+ .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar{
43
+ margin-inline:calc(-1 * var(--space-5));
44
+ padding-left:calc(var(--space-4) + env(safe-area-inset-left,0px));
45
+ padding-right:calc(var(--space-4) + env(safe-area-inset-right,0px));
46
+ }
47
+ }
48
+ /* Above the bottom nav: --fdy-bottomnav-h is declared, and obeyed, in bottomnav.css. The nav adds
49
+ * the safe-area inset itself, so the bar rests on all of it and does not add the inset twice. */
50
+ @media (max-width:720px){
51
+ .fdy-app--has-bottomnav .fdy-app__main .fdy-actionbar{
52
+ bottom:calc(var(--fdy-bottomnav-h) + env(safe-area-inset-bottom,0px));
53
+ padding-bottom:var(--space-3);
54
+ }
55
+ /* A modal or drawer is its own screen: its bar sits at its own bottom, whatever the depth. */
56
+ .fdy-app--has-bottomnav .fdy-app__main :is(dialog, .fdy-drawer) .fdy-actionbar{
57
+ bottom:0;
58
+ padding-bottom:calc(var(--space-3) + env(safe-area-inset-bottom,0px));
59
+ }
60
+ /* In the nav shell main's padding is --space-20 + inset (bottomnav.css) and the nav is
61
+ * --fdy-bottomnav-h + inset tall. What must remain below the bar is exactly the nav, so the
62
+ * bar ends on the nav at the end of the page and is not pushed up over the last row. The
63
+ * insets cancel. */
64
+ .fdy-app--has-bottomnav .fdy-app__main > .fdy-actionbar:last-child,
65
+ .fdy-app--has-bottomnav .fdy-app__main > :not(dialog):not(.fdy-drawer) > .fdy-actionbar:last-child{
66
+ margin-bottom:calc(var(--fdy-bottomnav-h) - var(--space-20));
67
+ }
68
+ }
@@ -8,8 +8,16 @@
8
8
  *
9
9
  * Deliberately NOT part of `.fdy-app`'s markup: it is `position:fixed`, so it works from
10
10
  * anywhere inside the shell's content slot, and an application that does not want one
11
- * pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it. */
11
+ * pays nothing. `.fdy-app--has-bottomnav` on the shell is what reserves room for it and states
12
+ * the bar's height, `--fdy-bottomnav-h`, which the bar is sized by. */
12
13
  .fdy-bottomnav{display:none;}
14
+ /* The bar's height, stated once so anything resting on the bar (the action bar) reads the same
15
+ * number the bar is drawn with: a 44px item, the vertical padding, the top hairline. Before this
16
+ * the height was only implied, and an item's icon and label made it 0.39px taller than the sum,
17
+ * more with a taller app font. The safe-area inset is added where it is used, not here. The
18
+ * price of a stated height: with a taller app font the label may overflow into the nav's bottom
19
+ * padding instead of growing it. */
20
+ .fdy-app--has-bottomnav{--fdy-bottomnav-h:calc(2.75rem + 2 * var(--space-2) + var(--bw));}
13
21
  @media (max-width:720px){
14
22
  .fdy-bottomnav{
15
23
  display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;
@@ -23,6 +31,8 @@
23
31
  backdrop-filter:var(--surface-filter);
24
32
  -webkit-backdrop-filter:var(--surface-filter);
25
33
  border-top:var(--bw) solid var(--color-border);
34
+ box-sizing:border-box;
35
+ height:calc(var(--fdy-bottomnav-h,auto) + env(safe-area-inset-bottom,0px));
26
36
  }
27
37
  /* Room for the bar, or the last row of every list on every screen sits under it -- and
28
38
  a row you cannot scroll to is a row nobody knows is there. */
@@ -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,44 @@
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}", "onDeep": "{neutral.0}" },
66
+ "sky": { "ramp": "sky", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
67
+ "blue": { "ramp": "blue", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
68
+ "indigo": { "ramp": "indigo", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}", "darkShift": true },
69
+ "violet": { "ramp": "violet", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}", "darkShift": true },
70
+ "purple": { "ramp": "purple", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
71
+ "fuchsia": { "ramp": "fuchsia", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
72
+ "pink": { "ramp": "pink", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
73
+ "rose": { "ramp": "rose", "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
74
+ "orange": { "ramp": "orange", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
75
+ "amber": { "ramp": "amber", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
76
+ "yellow": { "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}",
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}", "onDeep": "{neutral.0}" },
79
+ "green": { "ramp": "green", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
80
+ "emerald": { "ramp": "emerald", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
81
+ "teal": { "ramp": "teal", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
82
+ "cyan": { "ramp": "cyan", "on": "{neutral.950}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}" },
83
+ "noir": { "on": "{neutral.0}", "onDark": "{neutral.950}", "onDeep": "{neutral.0}",
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
+ "$primaryFill": {
88
+ "_comment": "Sub-axis of the palette: [data-primary-fill=\"deep\"] re-points these semantic tokens at the next shade down the alias ramp, light theme only, and swaps the label ink for each palette's measured onDeep. The soft wash and its border do not move. Dark keeps its normal values: dark fills are already lighter than the surface needs.",
89
+ "deep": {
90
+ "color-primary": "{primary.700}",
91
+ "color-primary-hover": "{primary.800}",
92
+ "color-primary-active": "{primary.800}",
93
+ "color-primary-strong": "{primary.800}",
94
+ "color-primary-rgb": "{primary.700.rgb}",
95
+ "focus-ring": "{primary.700}"
96
+ }
97
+ },
98
+ "$neutrals": {
99
+ "_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.",
100
+ "slate": { "ramp": "slate" },
101
+ "grey": { "ramp": "grey" },
102
+ "stone": { "ramp": "stone" }
68
103
  },
69
104
 
70
105
  "font": {
@@ -97,45 +132,45 @@
97
132
  },
98
133
  "dur": { "fast": { "$value": "120ms" }, "base": { "$value": "180ms" }, "slow": { "$value": "280ms" } },
99
134
  "ease": { "standard": { "$value": "cubic-bezier(.2,0,0,1)" }, "spring": { "$value": "cubic-bezier(.2,.8,.2,1)" } },
100
- "control": { "h": { "$value": "2.5rem", "$compact": "2rem" }, "box": { "$value": "1.15rem" }, "switch-w": { "$value": "2.4rem" }, "switch-h": { "$value": "1.35rem" } },
135
+ "control": { "h": { "$value": "2.5rem", "$compact": "2rem", "$touch": "2.75rem" }, "box": { "$value": "1.15rem" }, "switch-w": { "$value": "2.4rem" }, "switch-h": { "$value": "1.35rem" } },
101
136
  "bw": { "$value": "1px" },
102
137
 
103
138
  "color": {
104
139
  "primary": { "$value": "{primary.600}", "$dark": "{primary.500}" },
105
140
  "primary-hover": { "$value": "{primary.700}", "$dark": "{primary.400}" },
106
141
  "primary-active": { "$value": "{primary.800}", "$dark": "{primary.300}" },
107
- "on-primary": { "$value": "{slate.0}", "$dark": "{slate.0}" },
142
+ "on-primary": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
108
143
  "_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
144
  "primary-soft": { "$value": "{primary.50}", "$dark": "rgba({primary.600.rgb}, .2)" },
110
145
  "primary-border": { "$value": "{primary.100}", "$dark": "rgba({primary.400.rgb}, .28)" },
111
146
 
112
147
  "accent": { "$value": "{sky.600}", "$dark": "{sky.400}" },
113
148
  "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}" },
149
+ "on-accent": { "$value": "{neutral.0}", "$dark": "#06233f" },
150
+ "on-danger": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
116
151
  "danger-btn": { "$value": "{red.600}", "$dark": "{red.600}" },
117
152
 
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)" },
153
+ "surface": { "$value": "{neutral.0}", "$dark": "{neutral.950}" },
154
+ "surface-2": { "$value": "{neutral.50}", "$dark": "{neutral.900}" },
155
+ "surface-3": { "$value": "{neutral.100}", "$dark": "{neutral.800}" },
156
+ "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})" },
157
+ "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
158
  "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
159
 
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}" },
160
+ "text": { "$value": "{neutral.900}", "$dark": "{neutral.100}" },
161
+ "text-muted": { "$value": "{neutral.600}", "$dark": "{neutral.400}" },
162
+ "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}" },
163
+ "on-brand": { "$value": "{neutral.0}", "$dark": "{neutral.0}" },
129
164
 
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}" },
165
+ "border": { "$value": "{neutral.200}", "$dark": "{neutral.800}" },
166
+ "border-strong": { "$value": "{neutral.300}", "$dark": "{neutral.700}" },
167
+ "border-muted": { "$value": "{neutral.100}", "$dark": "{neutral.850}" },
168
+ "control-border": { "$value": "{neutral.450}", "$dark": "{neutral.450}" },
169
+ "switch-thumb": { "$value": "{neutral.0}" },
135
170
  "shadow-inset": { "$value": "rgba(16,14,30,.06)" },
136
171
 
137
- "inverse-surface": { "$value": "{slate.900}", "$dark": "{slate.100}" },
138
- "inverse-text": { "$value": "{slate.0}", "$dark": "{slate.900}" },
172
+ "inverse-surface": { "$value": "{neutral.900}", "$dark": "{neutral.100}" },
173
+ "inverse-text": { "$value": "{neutral.0}", "$dark": "{neutral.900}" },
139
174
 
140
175
  "success": { "$value": "{green.600}", "$dark": "{green.500}" }, "success-soft": { "$value": "{green.100}", "$dark": "rgba(34,197,94,.18)" },
141
176
  "warning": { "$value": "#c2740a", "$dark": "{amber.500}" }, "warning-soft": { "$value": "{amber.100}", "$dark": "rgba(234,179,8,.18)" },
@@ -153,14 +188,14 @@
153
188
 
154
189
  "_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
190
  "primary-rgb": { "$value": "{primary.600.rgb}", "$dark": "{primary.500.rgb}" },
156
- "on-primary-rgb": { "$value": "{slate.0.rgb}" },
191
+ "on-primary-rgb": { "$value": "{neutral.0.rgb}" },
157
192
  "danger-rgb": { "$value": "{red.600.rgb}", "$dark": "{red.400.rgb}" },
158
193
  "danger-btn-rgb": { "$value": "{red.600.rgb}" },
159
194
  "success-rgb": { "$value": "{green.600.rgb}", "$dark": "{green.500.rgb}" },
160
195
  "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
196
  "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}" }
197
+ "surface-rgb": { "$value": "{neutral.0.rgb}", "$dark": "{neutral.950.rgb}" },
198
+ "inverse-text-rgb": { "$value": "{neutral.0.rgb}", "$dark": "{neutral.900.rgb}" }
164
199
  },
165
200
 
166
201
  "chart": {
@@ -172,8 +207,8 @@
172
207
  "6": { "$value": "#008300", "$dark": "#008300" },
173
208
  "7": { "$value": "#4a3aa7", "$dark": "#9085e9" },
174
209
  "8": { "$value": "#e34948", "$dark": "#e66767" },
175
- "grid": { "$value": "{slate.200}", "$dark": "{slate.800}" },
176
- "tick": { "$value": "{slate.400}", "$dark": "{slate.600}" }
210
+ "grid": { "$value": "{neutral.200}", "$dark": "{neutral.800}" },
211
+ "tick": { "$value": "{neutral.400}", "$dark": "{neutral.600}" }
177
212
  },
178
213
 
179
214
  "_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).",