jenosize-ui 0.1.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 +28 -0
- package/README.md +100 -0
- package/THIRD-PARTY-NOTICES.md +163 -0
- package/dist/Button-Bt7pzM4R.d.ts +82 -0
- package/dist/PaymentInput-CKPIPNWH.d.ts +141 -0
- package/dist/Select-CVbEQ2Ep.d.ts +118 -0
- package/dist/TagInput-CTJYOB4J.d.ts +90 -0
- package/dist/avatar.d.ts +161 -0
- package/dist/avatar.js +11 -0
- package/dist/badge.d.ts +109 -0
- package/dist/badge.js +10 -0
- package/dist/breadcrumb.d.ts +58 -0
- package/dist/breadcrumb.js +7 -0
- package/dist/button.d.ts +54 -0
- package/dist/button.js +14 -0
- package/dist/calendar.d.ts +368 -0
- package/dist/calendar.js +21 -0
- package/dist/callout.d.ts +70 -0
- package/dist/callout.js +16 -0
- package/dist/card-nWicloNi.d.ts +80 -0
- package/dist/card.d.ts +2 -0
- package/dist/card.js +7 -0
- package/dist/checkbox.d.ts +133 -0
- package/dist/checkbox.js +11 -0
- package/dist/chunk-24TO7E32.js +42 -0
- package/dist/chunk-3Y5X7B5C.js +146 -0
- package/dist/chunk-4OLULPQG.js +202 -0
- package/dist/chunk-4P2NBLBW.js +103 -0
- package/dist/chunk-52IFGFTL.js +11 -0
- package/dist/chunk-5FATN5YD.js +115 -0
- package/dist/chunk-5NOBSXJN.js +297 -0
- package/dist/chunk-5RAPA22E.js +106 -0
- package/dist/chunk-7EUAMHMU.js +16 -0
- package/dist/chunk-7EWQKTNQ.js +1336 -0
- package/dist/chunk-7HOIZ3UO.js +110 -0
- package/dist/chunk-7IU5TMFL.js +452 -0
- package/dist/chunk-7JBNLEJ7.js +29 -0
- package/dist/chunk-7S2TBALK.js +23 -0
- package/dist/chunk-BJUZVYQC.js +188 -0
- package/dist/chunk-BVJWBYIG.js +66 -0
- package/dist/chunk-CME4DIML.js +65 -0
- package/dist/chunk-CYPPEUX5.js +73 -0
- package/dist/chunk-D5BTFSL7.js +71 -0
- package/dist/chunk-D6TPWNRK.js +387 -0
- package/dist/chunk-DJSXIAFH.js +66 -0
- package/dist/chunk-DRZCJCBO.js +46 -0
- package/dist/chunk-DWKILXHE.js +17 -0
- package/dist/chunk-E7ZSWBAK.js +70 -0
- package/dist/chunk-EDSK6FEH.js +8 -0
- package/dist/chunk-F2K7VJUV.js +114 -0
- package/dist/chunk-F6NLE6XJ.js +40 -0
- package/dist/chunk-FHHAPGCR.js +32 -0
- package/dist/chunk-FXIBGTS5.js +14 -0
- package/dist/chunk-GCVA3OIV.js +72 -0
- package/dist/chunk-GFOAJVW5.js +336 -0
- package/dist/chunk-GRLSUQQE.js +136 -0
- package/dist/chunk-GTHJWR3Q.js +77 -0
- package/dist/chunk-HMUZE6EK.js +67 -0
- package/dist/chunk-I7WU4GTY.js +503 -0
- package/dist/chunk-J2BCKBHC.js +151 -0
- package/dist/chunk-J36M3KRX.js +1315 -0
- package/dist/chunk-J7ZQQFPT.js +113 -0
- package/dist/chunk-JP26LPCY.js +234 -0
- package/dist/chunk-JTNFJLIY.js +1046 -0
- package/dist/chunk-JVJRHBTD.js +50 -0
- package/dist/chunk-JYGR44ZC.js +133 -0
- package/dist/chunk-KDLPXXD2.js +173 -0
- package/dist/chunk-KMSYEE23.js +224 -0
- package/dist/chunk-KNYKWUYX.js +52 -0
- package/dist/chunk-LME57Z6J.js +138 -0
- package/dist/chunk-MFJP5FA7.js +20 -0
- package/dist/chunk-MKC5HNA7.js +1692 -0
- package/dist/chunk-MQGD2OUF.js +39 -0
- package/dist/chunk-MUFHLP4S.js +566 -0
- package/dist/chunk-O2LG3PNI.js +74 -0
- package/dist/chunk-O4GRKO3I.js +66 -0
- package/dist/chunk-OHUFNYGN.js +791 -0
- package/dist/chunk-PWKWNDBS.js +243 -0
- package/dist/chunk-QA74ITR4.js +103 -0
- package/dist/chunk-R6RGJF4L.js +170 -0
- package/dist/chunk-S7NNXWIN.js +7 -0
- package/dist/chunk-SV56BSUQ.js +162 -0
- package/dist/chunk-T7FCG7XV.js +435 -0
- package/dist/chunk-THC2ISYP.js +57 -0
- package/dist/chunk-VWC72TR3.js +115 -0
- package/dist/chunk-W46K56XU.js +216 -0
- package/dist/chunk-W5GGOUUI.js +75 -0
- package/dist/chunk-WEUJYDCV.js +269 -0
- package/dist/chunk-WFY7DKQD.js +279 -0
- package/dist/chunk-WZQFC7ZN.js +448 -0
- package/dist/chunk-Z3ETJN5G.js +136 -0
- package/dist/chunk-ZOOX3TUB.js +192 -0
- package/dist/chunk-ZSNJ6UA3.js +42 -0
- package/dist/chunk-ZZA2LUTL.js +130 -0
- package/dist/chunk-ZZT2E5VT.js +24 -0
- package/dist/color-CtSxc1Rh.d.ts +6 -0
- package/dist/combobox.d.ts +184 -0
- package/dist/combobox.js +21 -0
- package/dist/date-input.d.ts +83 -0
- package/dist/date-input.js +16 -0
- package/dist/date-picker.d.ts +249 -0
- package/dist/date-picker.js +29 -0
- package/dist/date-utils-7hTFTXNK.d.ts +34 -0
- package/dist/date-vMJBKAFK.d.ts +22 -0
- package/dist/dialog.d.ts +86 -0
- package/dist/dialog.js +15 -0
- package/dist/drawer.d.ts +77 -0
- package/dist/drawer.js +14 -0
- package/dist/dropdown-menu.d.ts +218 -0
- package/dist/dropdown-menu.js +10 -0
- package/dist/file-trigger.d.ts +42 -0
- package/dist/file-trigger.js +3 -0
- package/dist/form.d.ts +487 -0
- package/dist/form.js +1179 -0
- package/dist/header-navigation.d.ts +74 -0
- package/dist/header-navigation.js +23 -0
- package/dist/icons/app.d.ts +48 -0
- package/dist/icons/app.js +282 -0
- package/dist/icons/flag.d.ts +817 -0
- package/dist/icons/flag.js +58336 -0
- package/dist/icons/integration.d.ts +36 -0
- package/dist/icons/integration.js +531 -0
- package/dist/icons/payment.d.ts +116 -0
- package/dist/icons/payment.js +2418 -0
- package/dist/icons.d.ts +2013 -0
- package/dist/icons.js +2012 -0
- package/dist/illustration.d.ts +48 -0
- package/dist/illustration.js +4 -0
- package/dist/index.d.ts +68 -0
- package/dist/index.js +73 -0
- package/dist/indicator.d.ts +51 -0
- package/dist/indicator.js +7 -0
- package/dist/input.d.ts +66 -0
- package/dist/input.js +15 -0
- package/dist/multi-value-CJb_tnvi.d.ts +8 -0
- package/dist/nav-Bla0o_-1.d.ts +98 -0
- package/dist/number-input.d.ts +80 -0
- package/dist/number-input.js +15 -0
- package/dist/options-CPEIgjtd.d.ts +68 -0
- package/dist/overflow-Df0h42Oi.d.ts +29 -0
- package/dist/pagination.d.ts +77 -0
- package/dist/pagination.js +17 -0
- package/dist/payment-input.d.ts +7 -0
- package/dist/payment-input.js +15 -0
- package/dist/popover.d.ts +60 -0
- package/dist/popover.js +14 -0
- package/dist/progress.d.ts +87 -0
- package/dist/progress.js +5 -0
- package/dist/radio.d.ts +77 -0
- package/dist/radio.js +12 -0
- package/dist/select.d.ts +68 -0
- package/dist/select.js +24 -0
- package/dist/shared-BNXAdgh2.d.ts +9 -0
- package/dist/shared-BYXJPnsN.d.ts +11 -0
- package/dist/shared-Dc-GgA16.d.ts +42 -0
- package/dist/sidebar-navigation.d.ts +129 -0
- package/dist/sidebar-navigation.js +15 -0
- package/dist/styles.css +2 -0
- package/dist/switch.d.ts +23 -0
- package/dist/switch.js +7 -0
- package/dist/table.d.ts +692 -0
- package/dist/table.js +44 -0
- package/dist/tabs.d.ts +111 -0
- package/dist/tabs.js +8 -0
- package/dist/tag-input.d.ts +12 -0
- package/dist/tag-input.js +19 -0
- package/dist/tag.d.ts +98 -0
- package/dist/tag.js +9 -0
- package/dist/textarea.d.ts +40 -0
- package/dist/textarea.js +12 -0
- package/dist/theme-script.d.ts +29 -0
- package/dist/theme-script.js +15 -0
- package/dist/theme.css +929 -0
- package/dist/theme.d.ts +71 -0
- package/dist/theme.js +15 -0
- package/dist/toast.d.ts +242 -0
- package/dist/toast.js +15 -0
- package/dist/tooltip.d.ts +70 -0
- package/dist/tooltip.js +6 -0
- package/dist/tree.d.ts +308 -0
- package/dist/tree.js +11 -0
- package/package.json +352 -0
package/dist/theme.css
ADDED
|
@@ -0,0 +1,929 @@
|
|
|
1
|
+
/* jenosize-ui — theme.css (the @theme token layer: colors + radii + shadows + typography).
|
|
2
|
+
* Consumed as `jenosize-ui/theme.css`. The consumer imports Tailwind itself:
|
|
3
|
+
* @import "tailwindcss";
|
|
4
|
+
* @import "jenosize-ui/theme.css";
|
|
5
|
+
* so this file does NOT import tailwindcss.
|
|
6
|
+
*
|
|
7
|
+
* THE CONTRACT. Colour role names and the type scale are held 1:1 to Untitled UI v8 — its names, its
|
|
8
|
+
* ladder grammar, its base palette, its dark-mode mechanism. A class string read off their source
|
|
9
|
+
* transfers verbatim. Structure, API, geometry, motion and state treatment stay HOUSE. House
|
|
10
|
+
* extensions keep a HYPHEN (`bg-ghost-hover`, `bg-selected-hover`, `bg-sunken`) where UUI's state
|
|
11
|
+
* pairs take an UNDERSCORE (`bg-primary_alt`, `text-secondary_hover`), so the grammar itself says
|
|
12
|
+
* which roles are ours.
|
|
13
|
+
*
|
|
14
|
+
* EVERY VALUE HERE IS a `var()` reference, a hex, an `rgb()`/`oklch()` function, or a `color-mix()`
|
|
15
|
+
* — never a bare channel list. (The reference ships two of those, `--color-app-store-badge-border`
|
|
16
|
+
* and `--color-avatar-styles-bg-neutral`, as `166 166 166 1` with no `rgb()` wrapper; they are not
|
|
17
|
+
* valid `<color>` values and the utilities compiled from them are inert. Do not copy the shape.)
|
|
18
|
+
*
|
|
19
|
+
* ── THE ONE VALUE-LEVEL DEVIATION: warning = Tailwind `amber`, NOT the `yellow` UUI v8 wires it to ──
|
|
20
|
+
*
|
|
21
|
+
* It is BOTH more accessible and more faithful than the reference:
|
|
22
|
+
*
|
|
23
|
+
* pair yellow amber min
|
|
24
|
+
* text-warning-primary -600 on bg-primary 2.94 ✖ 3.20 3.0
|
|
25
|
+
* white label on bg-warning-solid -600 2.94 ✖ 3.20 3.0
|
|
26
|
+
* dismiss glyph utility-<hue>-600 on -50 2.84 ✖ 3.09 3.0
|
|
27
|
+
* text-warning-primary -600 on the -50 wash 2.84 ✖ 3.09 3.0
|
|
28
|
+
* badge label utility-<hue>-700 on -50 4.77 4.85 4.5
|
|
29
|
+
* dark text-warning-primary -400 on -950 12.58 11.49 3.0
|
|
30
|
+
*
|
|
31
|
+
* yellow fails 4 of 6; amber passes 6 of 6. And in oklch, amber-600 #e17100 (L 66.7% · C .169 ·
|
|
32
|
+
* H 53.4°) sits 3.2° off Untitled UI's CLASSIC warning stop #dc6803 (64.6% / .170 / 50.2°), where
|
|
33
|
+
* yellow-600 is 21.3° off AND desaturated (C .146). UUI v8 ships `utility-amber-*` itself, so this
|
|
34
|
+
* invents no ramp. ONE hue selection stands in for FOUR stop-bumps. Do NOT "restore" yellow in a
|
|
35
|
+
* fidelity sweep — that reverts four gate pairs AND moves the hue further from the reference.
|
|
36
|
+
* Enforced by `pnpm contrast`.
|
|
37
|
+
*
|
|
38
|
+
* Every other deviation is a NAME we keep or a stop we hold, each commented at its declaration. */
|
|
39
|
+
|
|
40
|
+
/* Class-based dark mode (so `dark:` utilities track the .dark class, not the OS).
|
|
41
|
+
* We keep `.dark`, NOT the reference's `.dark-mode`: the class is a runtime API surface, not a
|
|
42
|
+
* token. It is a string literal in `ThemeProvider`, in the pre-paint no-flash IIFE that consumers
|
|
43
|
+
* INLINE into their own <head>, and in the visual harness — renaming it would silently break every
|
|
44
|
+
* consumer who already copied that script, which is the exact failure the script exists to prevent. */
|
|
45
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
46
|
+
|
|
47
|
+
@theme {
|
|
48
|
+
/* ═══════════════════ Primitive: brand — the ONLY ramp we declare ═══════════════════
|
|
49
|
+
*
|
|
50
|
+
* It is the REBRANDING SEAM. Untitled UI's own brand-swap workflow is "replace these 11 hexes
|
|
51
|
+
* and both themes follow", and that works because dark mode never shifts the ramp — it re-points
|
|
52
|
+
* ROLES at different stops of it. Mode-invariant by construction.
|
|
53
|
+
*
|
|
54
|
+
* `neutral`, `red`, `amber`, `green` and `blue` are INHERITED from Tailwind's `@theme default`,
|
|
55
|
+
* not re-declared — exactly what UUI v8 does (its whole checkout declares one ramp and zero
|
|
56
|
+
* `:root` blocks). Proven safe: Tailwind's reference-tracking follows a `var()` chain OUT of the
|
|
57
|
+
* theme block, so a stop reached only from the `.dark` rule still ships, and no unused stop does.
|
|
58
|
+
*
|
|
59
|
+
* What it buys: adding a semantic tone later costs EIGHT `var()` lines and ZERO colour decisions,
|
|
60
|
+
* because the ramp already exists, perceptually tuned and contrast-checked. Before this it cost
|
|
61
|
+
* eleven hand-picked hexes. What it costs: a Tailwind upgrade moves our palette — so the
|
|
62
|
+
* dependency is pinned to an EXACT version, and `pnpm contrast` re-resolves every pair from the
|
|
63
|
+
* compiled values on every run, so a ramp shift surfaces as a failing number, not a silent drift. */
|
|
64
|
+
--color-brand-50: #f9f5ff;
|
|
65
|
+
--color-brand-100: #f4ebff;
|
|
66
|
+
--color-brand-200: #e9d7fe;
|
|
67
|
+
--color-brand-300: #d6bbfb;
|
|
68
|
+
--color-brand-400: #b692f6;
|
|
69
|
+
--color-brand-500: #9e77ed;
|
|
70
|
+
--color-brand-600: #7f56d9;
|
|
71
|
+
--color-brand-700: #6941c6;
|
|
72
|
+
--color-brand-800: #53389e;
|
|
73
|
+
--color-brand-900: #42307d;
|
|
74
|
+
--color-brand-950: #2c1c5f;
|
|
75
|
+
|
|
76
|
+
/* ─────────────────────────── Semantic roles — LIGHT ─────────────────────────── */
|
|
77
|
+
/* Surfaces */
|
|
78
|
+
--color-bg-primary: #ffffff;
|
|
79
|
+
/* Reads as sitting ABOVE its host when the host is `bg-primary` too. Plain white in light —
|
|
80
|
+
* there a raised box is carried by its drop shadow — but one stop UP in dark, because a black
|
|
81
|
+
* shadow is invisible on a dark surface and an equal fill leaves the box merely outlined.
|
|
82
|
+
* Used by: the Callout's raised neutral icon container, and `SURFACE_VARIANT.elevated`. */
|
|
83
|
+
--color-bg-primary_alt: #ffffff;
|
|
84
|
+
/* The mirror of `bg-primary_alt`: a surface that reads as sitting BELOW its host — a well, an
|
|
85
|
+
* inset region. HOUSE EXTENSION: nothing in Untitled UI recedes (its `bg-primary_hover` goes
|
|
86
|
+
* LIGHTER in dark and `bg-secondary_alt` resolves to `bg-primary` — level, never below).
|
|
87
|
+
* Not an alias of `bg-secondary`: that role is the hover/highlight wash at ~21 call sites, and a
|
|
88
|
+
* hover in dark must go LIGHTER while a well must go DARKER. One token cannot do both. */
|
|
89
|
+
--color-bg-sunken: var(--color-neutral-50);
|
|
90
|
+
--color-bg-secondary: var(--color-neutral-50);
|
|
91
|
+
--color-bg-tertiary: var(--color-neutral-100);
|
|
92
|
+
--color-bg-quaternary: var(--color-neutral-200);
|
|
93
|
+
/* A GHOST control's hover wash — the one surface role that is deliberately TRANSLUCENT, because
|
|
94
|
+
* it is the only one whose correct value depends on what it sits on. A ghost rests with no fill,
|
|
95
|
+
* so its hover must read one step above its HOST, and the host is unknown at authoring time: a
|
|
96
|
+
* card, a hovered menu/table row, a zebra stripe, a hovered stripe, a selected row. Every fixed
|
|
97
|
+
* stop collides with one of them — `bg-secondary` matched the plain row hover, then `bg-tertiary`
|
|
98
|
+
* matched the STRIPED row hover EXACTLY (Δ0/255), so a row-action icon washed to the row's own
|
|
99
|
+
* colour and appeared dead. An alpha wash composites instead of replacing, so it steps relative
|
|
100
|
+
* to all five.
|
|
101
|
+
*
|
|
102
|
+
* ANCHOR: land on the absolute stop it replaced, `bg-tertiary`. Re-derived for the stock ramp —
|
|
103
|
+
* ink neutral-900 (23) over white (255) reaching neutral-100 (245) gives 255 − 232a = 245,
|
|
104
|
+
* a = 4.31% → 4%. It was 6% against the classic ramp; the stock ramp's light end is more
|
|
105
|
+
* compressed, which is where the ladder note on `bg-selected` below comes from. */
|
|
106
|
+
--color-bg-ghost-hover: color-mix(in oklab, var(--color-text-primary) 4%, transparent);
|
|
107
|
+
/* A NEUTRAL selected row and its own hover. Translucent for the ghost wash's reason (it must step
|
|
108
|
+
* off an unknown host) plus one it cannot avoid: EVERY fixed neutral stop collides with a border
|
|
109
|
+
* role, and which one differs per theme. Measured on the stock ramp: light `bg-quaternary`
|
|
110
|
+
* (neutral-200) IS `border-secondary` (neutral-200); dark `bg-tertiary` (neutral-800) IS
|
|
111
|
+
* `border-secondary` (neutral-800). A row that draws its own guide rules cannot fill itself from
|
|
112
|
+
* the stop it must not hide. The collision comes from the ROLE MAP, not the ramp, so it survived
|
|
113
|
+
* the repalette unchanged.
|
|
114
|
+
*
|
|
115
|
+
* The WEIGHT is SAMPLED off the reference, not reasoned: its selected band measures #f8f8f8, and
|
|
116
|
+
* `text-primary @3%` reproduces it exactly on the stock ramp too (255 − 232×0.03 = 248). That is
|
|
117
|
+
* LIGHTER than the hover wash — a selected row is deliberately NOT the heaviest fill: the state
|
|
118
|
+
* is carried by the checkbox and by the band existing at all, and a fill heavy enough to
|
|
119
|
+
* out-shout hover reads as a pressed button.
|
|
120
|
+
*
|
|
121
|
+
* LADDER, over a white card: idle #ffffff · selected #f8f8f8 · hover #f6f6f6 · sel+hover #efefef,
|
|
122
|
+
* with the `border-primary` guide rule clear of all four (1.482 / 1.396 / 1.372 / 1.289 against
|
|
123
|
+
* RULE_MIN 1.2). ONE STEP IS TIGHT AND IT IS DELIBERATE: selected→hover is 2/255, below the 3/255
|
|
124
|
+
* bar the other rungs clear, because Tailwind's neutral-100 (#f5f5f5) sits closer to white than
|
|
125
|
+
* the classic gray-100 did while the sampled band did not move. It is accepted rather than tuned
|
|
126
|
+
* away because both numbers are ANCHORED (the wash to `bg-tertiary`, the band to the reference)
|
|
127
|
+
* and because the confusable case is two ADJACENT rows in different states, where the checkbox
|
|
128
|
+
* and the pointer each disambiguate. Dark has no such compression: 10 · 27 · 39 · 46 per 255. */
|
|
129
|
+
--color-bg-selected: color-mix(in oklab, var(--color-text-primary) 3%, transparent);
|
|
130
|
+
--color-bg-selected-hover: color-mix(in oklab, var(--color-text-primary) 7%, transparent);
|
|
131
|
+
--color-bg-brand-solid: var(--color-brand-600);
|
|
132
|
+
--color-bg-brand-solid_hover: var(--color-brand-700);
|
|
133
|
+
/* The brand WASH — a selection band under `text-brand-secondary` text (Table ROW_SELECTED,
|
|
134
|
+
* DropdownMenu ITEM_ACTIVE, SidebarNavigation, HeaderNavigation, Pagination, Toast, TAG_SELECTED).
|
|
135
|
+
* Its dark value is brand-950, NOT the brand-500 Untitled UI declares: theirs fills check ICONS,
|
|
136
|
+
* so nothing sits on it, while brand-300 text on a brand-500 fill measures 1.96:1 — unreadable.
|
|
137
|
+
* brand-950 measures 8.59:1 and matches the shape the other three washes take (ramp-50/ramp-950),
|
|
138
|
+
* so all four tones are consistent; UUI's brand-500 is the outlier in their own file. */
|
|
139
|
+
--color-bg-brand-primary: var(--color-brand-50);
|
|
140
|
+
--color-bg-primary-solid: var(--color-neutral-950);
|
|
141
|
+
--color-bg-success-primary: var(--color-green-50);
|
|
142
|
+
--color-bg-warning-primary: var(--color-amber-50);
|
|
143
|
+
--color-bg-error-primary: var(--color-red-50);
|
|
144
|
+
--color-bg-error-solid: var(--color-red-600);
|
|
145
|
+
--color-bg-error-solid_hover: var(--color-red-700);
|
|
146
|
+
/* Solid fills. Each carries a WHITE (`fg-white`) label, and each `_hover` steps one stop DARKER
|
|
147
|
+
* in light and one stop LIGHTER in dark — Untitled UI's own direction. The earlier house rule
|
|
148
|
+
* darkened in dark too, because under a 4.5 TEXT floor brand-500 measured 3.33:1 and red-500
|
|
149
|
+
* 3.76:1 beneath that label. Under the re-thresholded gate a solid fill's label is STATUS (3.0 —
|
|
150
|
+
* a status colour is never the sole carrier of its meaning, and the fill itself is a non-text UI
|
|
151
|
+
* component where 1.4.11's 3:1 is the requirement), so the lighter stop is admissible and the
|
|
152
|
+
* deviation retires. `pnpm contrast` carries all six hover pairs, so this is checked, not asserted. */
|
|
153
|
+
--color-bg-secondary-solid: var(--color-neutral-600);
|
|
154
|
+
--color-bg-secondary-solid_hover: var(--color-neutral-700);
|
|
155
|
+
--color-bg-success-solid: var(--color-green-600);
|
|
156
|
+
--color-bg-success-solid_hover: var(--color-green-700);
|
|
157
|
+
--color-bg-warning-solid: var(--color-amber-600);
|
|
158
|
+
--color-bg-warning-solid_hover: var(--color-amber-700);
|
|
159
|
+
/* Modal scrim — neutral-950 at 50%. The alpha is BAKED IN where Untitled UI applies it at the
|
|
160
|
+
* call site (`bg-overlay/70`); keeping ours avoids editing 13 sites to add a `/NN`. Theme-constant,
|
|
161
|
+
* though the COMPOSITED result is not: #868686 over white vs #0a0a0a over the dark page, so a
|
|
162
|
+
* scrim always reads against content, never against bare page. */
|
|
163
|
+
--color-bg-overlay: color-mix(in oklab, var(--color-neutral-950) 50%, transparent);
|
|
164
|
+
|
|
165
|
+
/* Type. `text-*` is TYPE; `fg-*` below is NON-TEXT foreground (icons, dots, bars). The property
|
|
166
|
+
* prefix does not tell you which — `text-fg-quaternary` is an ICON coloured with the `text`
|
|
167
|
+
* property. The two families diverge in DARK, so a mis-filed site is invisible in the light
|
|
168
|
+
* baseline and wrong in the dark one. */
|
|
169
|
+
--color-text-primary: var(--color-neutral-900);
|
|
170
|
+
--color-text-secondary: var(--color-neutral-700);
|
|
171
|
+
--color-text-secondary_hover: var(--color-neutral-800);
|
|
172
|
+
--color-text-tertiary: var(--color-neutral-600);
|
|
173
|
+
--color-text-quaternary: var(--color-neutral-500);
|
|
174
|
+
/* Placeholder text, held at neutral-500 in BOTH themes — Untitled UI's own value, on purpose.
|
|
175
|
+
* On the dark page that measures 4.18, under the 4.5 TEXT floor, which is why the gate carries a
|
|
176
|
+
* named PLACEHOLDER = 3.0 category for this ONE role. The defence is structural, not numeric: a
|
|
177
|
+
* placeholder is supplementary. Every Field control in this library exposes `label` as part of
|
|
178
|
+
* one frame contract, and the seamless path requires `aria-label`, so a placeholder is never the
|
|
179
|
+
* accessible name and never the only copy of the field's purpose. It is NOT `text-quaternary`:
|
|
180
|
+
* that role is supplementary TEXT (calendar weekday headers, menu group labels, DateInput's empty
|
|
181
|
+
* segments) at ~30 sites, which must stay under the 4.5 floor. */
|
|
182
|
+
--color-text-placeholder: var(--color-neutral-500);
|
|
183
|
+
/* Brand text keeps BRAND in dark. Untitled UI grays these to neutral-300/200 there; the house
|
|
184
|
+
* rule is the opposite (tabs precedent), which is also why none of its de-branding `_alt` family
|
|
185
|
+
* is declared — those roles mean "identical in light, gray out in dark", so adopting them would
|
|
186
|
+
* be declaring a contradiction. */
|
|
187
|
+
--color-text-brand-secondary: var(--color-brand-700);
|
|
188
|
+
--color-text-brand-secondary_hover: var(--color-brand-800);
|
|
189
|
+
/* The required-`*` asterisk. This one DOES gray out in dark — but it is UUI's `text-brand-tertiary`,
|
|
190
|
+
* not an `_alt` role, so the rule above does not apply to it. Exact 1:1. */
|
|
191
|
+
--color-text-brand-tertiary: var(--color-brand-600);
|
|
192
|
+
/* Feedback text on a NEUTRAL surface. The -700 bumps these carried are RETIRED: green-600 measures
|
|
193
|
+
* 3.22 and amber-600 3.20 on white, which clear the STATUS floor. Error text stays -600 and the
|
|
194
|
+
* on-wash context uses `utility-red-700` instead — see the tripwire in `pnpm contrast`. */
|
|
195
|
+
--color-text-success-primary: var(--color-green-600);
|
|
196
|
+
--color-text-warning-primary: var(--color-amber-600);
|
|
197
|
+
--color-text-error-primary: var(--color-red-600);
|
|
198
|
+
|
|
199
|
+
/* Non-text foreground — icons, dots, bars. No mirror by design: these are used on many properties
|
|
200
|
+
* (`text-fg-*`, `fill-fg-*`, `stroke-fg-*`, `bg-fg-white`), and a single-property mirror would
|
|
201
|
+
* narrow them. The long spelling IS the idiom. */
|
|
202
|
+
/* The icon-layer twin of `text-secondary`, same value at the same rank (that is UUI's own
|
|
203
|
+
* arrangement, not a duplicate). Declared because a non-text site needs it: the generated brand
|
|
204
|
+
* icons paint mono glyphs with `fill-fg-secondary`, which is Untitled UI's own class string —
|
|
205
|
+
* declaring the role is what lets it transfer VERBATIM instead of through a crosswalk. */
|
|
206
|
+
--color-fg-secondary: var(--color-neutral-700);
|
|
207
|
+
--color-fg-quaternary: var(--color-neutral-400);
|
|
208
|
+
--color-fg-quaternary_hover: var(--color-neutral-500);
|
|
209
|
+
/* HOUSE: Untitled UI v8 replaced this with `opacity-50`, but a child's `opacity` EATS the inset
|
|
210
|
+
* focus outline, so it is not a free substitute here. 13 call sites. */
|
|
211
|
+
--color-fg-disabled: var(--color-neutral-400);
|
|
212
|
+
/* Absorbs the former `fg-on-brand` AND `fg-on-inverse` — both were the literal #ffffff in both
|
|
213
|
+
* themes. (`text-primary_on-brand` is NOT equivalent: its dark value is neutral-50.) */
|
|
214
|
+
--color-fg-white: #ffffff;
|
|
215
|
+
/* Leading-dot / secondary glyph tints — the saturated -500 stop. */
|
|
216
|
+
--color-fg-brand-secondary: var(--color-brand-500);
|
|
217
|
+
--color-fg-brand-secondary_hover: var(--color-brand-600);
|
|
218
|
+
--color-fg-error-secondary: var(--color-red-500);
|
|
219
|
+
/* Absorbs the former `status-online` (the avatar presence dot), which was theme-constant; UUI's
|
|
220
|
+
* role is not, and going brighter in dark is correct on a dark surface. */
|
|
221
|
+
--color-fg-success-secondary: var(--color-green-500);
|
|
222
|
+
|
|
223
|
+
/* Borders. THE RANK INVERTS relative to text: `border-primary` is the STRONGEST edge (neutral-300)
|
|
224
|
+
* and `border-secondary` is the library default (neutral-200) — the ramp number falls as the rank
|
|
225
|
+
* falls. Reads as backwards in a diff; it is not. */
|
|
226
|
+
--color-border-secondary: var(--color-neutral-200);
|
|
227
|
+
--color-border-primary: var(--color-neutral-300);
|
|
228
|
+
/* One stop softer than `border-secondary` — a subordinate rule that must read as beneath the grid
|
|
229
|
+
* it subdivides. Minted for the calendar's sub-hour slot line: ruling every 30-minute step at full
|
|
230
|
+
* weight turns a time grid into ruled paper. DARK IS HOUSE (neutral-900): UUI's own value there is
|
|
231
|
+
* neutral-800, which is IDENTICAL to its own `border-secondary` — the tier collapses. Ours steps
|
|
232
|
+
* one stop off `border-secondary` on each side, so the hierarchy survives the theme flip. */
|
|
233
|
+
--color-border-tertiary: var(--color-neutral-100);
|
|
234
|
+
/* The elevated-surface hairline — a translucent inset ring on menu/listbox popups, softer than the
|
|
235
|
+
* neutral-200 divider. `rgb()` rather than `oklch()` to match the reference's own notation. */
|
|
236
|
+
--color-border-secondary_alt: rgb(0 0 0 / 0.1);
|
|
237
|
+
--color-border-brand: var(--color-brand-500);
|
|
238
|
+
/* NOTE: no `--color-border-brand-solid`. The seamless checked rim for checkbox/radio must match the
|
|
239
|
+
* brand-600 solid FILL exactly, and a second role holding the same value is a role that can drift.
|
|
240
|
+
* The CLASS survives via the mirror layer aliasing `--color-bg-brand-solid` directly. */
|
|
241
|
+
/* The three semantic edges now share ONE recipe (-300 light / -500 dark) instead of two. `error`
|
|
242
|
+
* takes UUI's `_subtle` name because that is the stop our edge actually occupies; UUI's plainer
|
|
243
|
+
* `border-error` (-500/-400) has no call site here and is not declared — an unused token is what
|
|
244
|
+
* `--shadow-3xl` was. */
|
|
245
|
+
--color-border-error_subtle: var(--color-red-300);
|
|
246
|
+
--color-border-success: var(--color-green-300);
|
|
247
|
+
--color-border-warning: var(--color-amber-300);
|
|
248
|
+
|
|
249
|
+
/* Component tokens. No mirror: the focus ring is spelled `outline-focus-ring` / `ring-focus-ring`
|
|
250
|
+
* long, deliberately — a `ring-focus` spelling would sit in the same visual family as
|
|
251
|
+
* `ring-primary` (an edge) while meaning something categorically different (a state affordance),
|
|
252
|
+
* and the two would be one careless `cn()` away from cancelling each other. */
|
|
253
|
+
--color-focus-ring: var(--color-brand-500);
|
|
254
|
+
--color-focus-ring-error: var(--color-red-500);
|
|
255
|
+
--color-tooltip-supporting-text: var(--color-neutral-300);
|
|
256
|
+
|
|
257
|
+
/* ── Utility — the per-HUE ramp badges/tags/chips consume ──────────────────────────────────
|
|
258
|
+
*
|
|
259
|
+
* Six hues × eight stops. This REPLACES a 6-slot-per-tone record (`-soft`/`-soft-hover`/`-border`/
|
|
260
|
+
* `-accent`/`-accent-muted`/`-fg`) whose slots were six stops of a ramp all along. Light is an
|
|
261
|
+
* identity map onto the primitive; dark is a mechanical stop mirror, so the layer is GENERATED
|
|
262
|
+
* rather than hand-tuned.
|
|
263
|
+
*
|
|
264
|
+
* DECLARE ALL EIGHT even though components consume six. A hole in a ramp fails SILENTLY: Tailwind
|
|
265
|
+
* emits NO class for an undeclared token — no warning, no error, no gate — so `bg-utility-red-300`
|
|
266
|
+
* in six months would simply paint nothing. The spare rungs cost nothing at runtime; Tailwind
|
|
267
|
+
* tree-shakes unreferenced `@theme` colour vars out of the build.
|
|
268
|
+
*
|
|
269
|
+
* The tone→hue map is NOT identity: `neutral`→neutral, `info`→blue, and success/warning/error→
|
|
270
|
+
* green/amber/red. `src/lib/color.ts` is tone-indexed and must never derive a token name from its
|
|
271
|
+
* own key. Nine further UUI hues (orange, indigo, fuchsia, pink, purple, sky, slate, emerald,
|
|
272
|
+
* yellow) are deliberately NOT declared: five leftover categorical ramps once sat unread here and
|
|
273
|
+
* were deleted for exactly that reason. */
|
|
274
|
+
--color-utility-neutral-50: var(--color-neutral-50);
|
|
275
|
+
--color-utility-neutral-100: var(--color-neutral-100);
|
|
276
|
+
--color-utility-neutral-200: var(--color-neutral-200);
|
|
277
|
+
--color-utility-neutral-300: var(--color-neutral-300);
|
|
278
|
+
--color-utility-neutral-400: var(--color-neutral-400);
|
|
279
|
+
--color-utility-neutral-500: var(--color-neutral-500);
|
|
280
|
+
--color-utility-neutral-600: var(--color-neutral-600);
|
|
281
|
+
--color-utility-neutral-700: var(--color-neutral-700);
|
|
282
|
+
|
|
283
|
+
--color-utility-brand-50: var(--color-brand-50);
|
|
284
|
+
--color-utility-brand-100: var(--color-brand-100);
|
|
285
|
+
--color-utility-brand-200: var(--color-brand-200);
|
|
286
|
+
--color-utility-brand-300: var(--color-brand-300);
|
|
287
|
+
--color-utility-brand-400: var(--color-brand-400);
|
|
288
|
+
--color-utility-brand-500: var(--color-brand-500);
|
|
289
|
+
--color-utility-brand-600: var(--color-brand-600);
|
|
290
|
+
--color-utility-brand-700: var(--color-brand-700);
|
|
291
|
+
|
|
292
|
+
--color-utility-red-50: var(--color-red-50);
|
|
293
|
+
--color-utility-red-100: var(--color-red-100);
|
|
294
|
+
--color-utility-red-200: var(--color-red-200);
|
|
295
|
+
--color-utility-red-300: var(--color-red-300);
|
|
296
|
+
--color-utility-red-400: var(--color-red-400);
|
|
297
|
+
--color-utility-red-500: var(--color-red-500);
|
|
298
|
+
--color-utility-red-600: var(--color-red-600);
|
|
299
|
+
--color-utility-red-700: var(--color-red-700);
|
|
300
|
+
|
|
301
|
+
--color-utility-amber-50: var(--color-amber-50);
|
|
302
|
+
--color-utility-amber-100: var(--color-amber-100);
|
|
303
|
+
--color-utility-amber-200: var(--color-amber-200);
|
|
304
|
+
--color-utility-amber-300: var(--color-amber-300);
|
|
305
|
+
--color-utility-amber-400: var(--color-amber-400);
|
|
306
|
+
--color-utility-amber-500: var(--color-amber-500);
|
|
307
|
+
--color-utility-amber-600: var(--color-amber-600);
|
|
308
|
+
--color-utility-amber-700: var(--color-amber-700);
|
|
309
|
+
|
|
310
|
+
--color-utility-green-50: var(--color-green-50);
|
|
311
|
+
--color-utility-green-100: var(--color-green-100);
|
|
312
|
+
--color-utility-green-200: var(--color-green-200);
|
|
313
|
+
--color-utility-green-300: var(--color-green-300);
|
|
314
|
+
--color-utility-green-400: var(--color-green-400);
|
|
315
|
+
--color-utility-green-500: var(--color-green-500);
|
|
316
|
+
--color-utility-green-600: var(--color-green-600);
|
|
317
|
+
--color-utility-green-700: var(--color-green-700);
|
|
318
|
+
|
|
319
|
+
--color-utility-blue-50: var(--color-blue-50);
|
|
320
|
+
--color-utility-blue-100: var(--color-blue-100);
|
|
321
|
+
--color-utility-blue-200: var(--color-blue-200);
|
|
322
|
+
--color-utility-blue-300: var(--color-blue-300);
|
|
323
|
+
--color-utility-blue-400: var(--color-blue-400);
|
|
324
|
+
--color-utility-blue-500: var(--color-blue-500);
|
|
325
|
+
--color-utility-blue-600: var(--color-blue-600);
|
|
326
|
+
--color-utility-blue-700: var(--color-blue-700);
|
|
327
|
+
|
|
328
|
+
/* ── Illustration — 4 OPAQUE fill steps a line-art drawing is painted from ─────────────────
|
|
329
|
+
*
|
|
330
|
+
* Steps 1→4: the lit face, the backdrop disc + confetti, the shaded face, the deepest detail.
|
|
331
|
+
* `Illustration` binds them to `--art-1`…`--art-4`, so the artwork itself names no colour.
|
|
332
|
+
*
|
|
333
|
+
* GRAY ONLY, deliberately — a drawing is not a status signal, and the tone belongs to the copy
|
|
334
|
+
* beside it. Separate from `utility-neutral-*` for two reasons: an illustration's shapes OVERLAP
|
|
335
|
+
* (a box's front face over its side face over the backdrop disc), so a translucent fill lets the
|
|
336
|
+
* layer beneath show through and the object stops reading as solid; and it needs a FOURTH step.
|
|
337
|
+
* Step 4 carries down to neutral-600 rather than repeating -700, which is the one deviation from
|
|
338
|
+
* the source: UUI's neutral mirror folds BOTH -200 and -300 onto neutral-700, collapsing steps 3
|
|
339
|
+
* and 4 into one colour (their credit card's two overlapping chip circles vanish into each other). */
|
|
340
|
+
--color-illustration-neutral-1: var(--color-neutral-50);
|
|
341
|
+
--color-illustration-neutral-2: var(--color-neutral-100);
|
|
342
|
+
--color-illustration-neutral-3: var(--color-neutral-200);
|
|
343
|
+
--color-illustration-neutral-4: var(--color-neutral-300);
|
|
344
|
+
|
|
345
|
+
/* Textarea resize grip — an <svg> data-URI (two round-capped diagonals) drawn into the native
|
|
346
|
+
* ::-webkit-resizer corner, its stroke tracking `border-primary`. THE HEXES ARE BAKED INTO THE
|
|
347
|
+
* url() AND CANNOT INTERPOLATE A var(), so no rename script, eslint rule or gate will ever touch
|
|
348
|
+
* them — they are hand-maintained, two per theme. */
|
|
349
|
+
--textarea-resize-handle: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%3E%3Cpath%20d='M10%202L2%2010'%20stroke='%23d4d4d4'%20stroke-linecap='round'/%3E%3Cpath%20d='M11%207L7%2011'%20stroke='%23d4d4d4'%20stroke-linecap='round'/%3E%3C/svg%3E");
|
|
350
|
+
|
|
351
|
+
/* ══════════════════════ MIRRORS — the short spelling, and NOT ONE VALUE ══════════════════════
|
|
352
|
+
*
|
|
353
|
+
* Tailwind v4's `--color-*` namespace feeds EVERY colour utility, so `--color-bg-primary` emits
|
|
354
|
+
* `bg-bg-primary`, `text-bg-primary`, `ring-bg-primary`, … — correct, but the common case reads
|
|
355
|
+
* badly. Tailwind also honours per-PROPERTY namespaces, and those emit the short name:
|
|
356
|
+
*
|
|
357
|
+
* --color-bg-primary -> .bg-bg-primary { background-color: var(--color-bg-primary) }
|
|
358
|
+
* --background-color-primary -> .bg-primary { background-color: var(--background-color-primary) }
|
|
359
|
+
*
|
|
360
|
+
* Both spellings stay valid; we use the short one where it exists. Three families get a mirror
|
|
361
|
+
* (surfaces on `bg-`, type on `text-`, edges on `border-`/`ring-`/`outline-`). `fg-*`,
|
|
362
|
+
* `utility-*` and the component tokens deliberately get NONE — they are used on many properties,
|
|
363
|
+
* and a single-property mirror would narrow them, so their long spelling IS the idiom.
|
|
364
|
+
*
|
|
365
|
+
* TWO THINGS THAT BITE:
|
|
366
|
+
*
|
|
367
|
+
* 1. THESE LINES MUST BE REPEATED VERBATIM IN `.dark`, INCLUDING THE THEME-CONSTANT ONES. A custom
|
|
368
|
+
* property's computed value is its specified value with `var()`s ALREADY SUBSTITUTED, and it is
|
|
369
|
+
* that substituted value which inherits. Declared only at `:root`,
|
|
370
|
+
* `--background-color-primary` computes to #ffffff here and INHERITS #ffffff into `.dark` — it
|
|
371
|
+
* does not re-substitute there. Omit the repetition and dark mode is SILENTLY HALF-BROKEN:
|
|
372
|
+
* every long-form utility flips correctly while every short-form one stays frozen at its light
|
|
373
|
+
* value. No build error, no lint error, no gate. Repeat them even where the role is constant
|
|
374
|
+
* today — the line in `.dark` is what makes a FUTURE dark override actually take effect.
|
|
375
|
+
* `pnpm tokens:check` asserts both blocks carry every alias.
|
|
376
|
+
*
|
|
377
|
+
* 2. `ring-primary` (this layer, the EDGE colour) and `ring-bg-primary` (the `--color-*` layer,
|
|
378
|
+
* the SURFACE colour) are different values in the SAME tailwind-merge `ring-color` group, so
|
|
379
|
+
* `cn("ring-bg-primary", "ring-primary")` silently collapses to the edge colour. We ship 3 such
|
|
380
|
+
* sites — the Avatar/Indicator halo, whose whole job is to punch the page colour through an
|
|
381
|
+
* overlapping stack. The house rule that `className` is layout-only is what keeps this
|
|
382
|
+
* theoretical. Same shape on `outline-`: a caller's `outline-primary` would kill a focus ring.
|
|
383
|
+
*
|
|
384
|
+
* `border-brand-solid` is here rather than in the role block on purpose: it aliases
|
|
385
|
+
* `--color-bg-brand-solid` directly, so the checked rim cannot drift from the fill it must match. */
|
|
386
|
+
/* ── background-color ── */
|
|
387
|
+
--background-color-primary: var(--color-bg-primary);
|
|
388
|
+
--background-color-primary_alt: var(--color-bg-primary_alt);
|
|
389
|
+
--background-color-sunken: var(--color-bg-sunken);
|
|
390
|
+
--background-color-secondary: var(--color-bg-secondary);
|
|
391
|
+
--background-color-tertiary: var(--color-bg-tertiary);
|
|
392
|
+
--background-color-quaternary: var(--color-bg-quaternary);
|
|
393
|
+
--background-color-ghost-hover: var(--color-bg-ghost-hover);
|
|
394
|
+
--background-color-selected: var(--color-bg-selected);
|
|
395
|
+
--background-color-selected-hover: var(--color-bg-selected-hover);
|
|
396
|
+
--background-color-brand-solid: var(--color-bg-brand-solid);
|
|
397
|
+
--background-color-brand-solid_hover: var(--color-bg-brand-solid_hover);
|
|
398
|
+
--background-color-brand-primary: var(--color-bg-brand-primary);
|
|
399
|
+
--background-color-primary-solid: var(--color-bg-primary-solid);
|
|
400
|
+
--background-color-success-primary: var(--color-bg-success-primary);
|
|
401
|
+
--background-color-warning-primary: var(--color-bg-warning-primary);
|
|
402
|
+
--background-color-error-primary: var(--color-bg-error-primary);
|
|
403
|
+
--background-color-error-solid: var(--color-bg-error-solid);
|
|
404
|
+
--background-color-error-solid_hover: var(--color-bg-error-solid_hover);
|
|
405
|
+
--background-color-secondary-solid: var(--color-bg-secondary-solid);
|
|
406
|
+
--background-color-secondary-solid_hover: var(--color-bg-secondary-solid_hover);
|
|
407
|
+
--background-color-success-solid: var(--color-bg-success-solid);
|
|
408
|
+
--background-color-success-solid_hover: var(--color-bg-success-solid_hover);
|
|
409
|
+
--background-color-warning-solid: var(--color-bg-warning-solid);
|
|
410
|
+
--background-color-warning-solid_hover: var(--color-bg-warning-solid_hover);
|
|
411
|
+
--background-color-overlay: var(--color-bg-overlay);
|
|
412
|
+
|
|
413
|
+
/* ── text-color ── */
|
|
414
|
+
--text-color-primary: var(--color-text-primary);
|
|
415
|
+
--text-color-secondary: var(--color-text-secondary);
|
|
416
|
+
--text-color-secondary_hover: var(--color-text-secondary_hover);
|
|
417
|
+
--text-color-tertiary: var(--color-text-tertiary);
|
|
418
|
+
--text-color-quaternary: var(--color-text-quaternary);
|
|
419
|
+
--text-color-placeholder: var(--color-text-placeholder);
|
|
420
|
+
--text-color-brand-secondary: var(--color-text-brand-secondary);
|
|
421
|
+
--text-color-brand-secondary_hover: var(--color-text-brand-secondary_hover);
|
|
422
|
+
--text-color-brand-tertiary: var(--color-text-brand-tertiary);
|
|
423
|
+
--text-color-success-primary: var(--color-text-success-primary);
|
|
424
|
+
--text-color-warning-primary: var(--color-text-warning-primary);
|
|
425
|
+
--text-color-error-primary: var(--color-text-error-primary);
|
|
426
|
+
|
|
427
|
+
/* ── border-color ── */
|
|
428
|
+
--border-color-secondary: var(--color-border-secondary);
|
|
429
|
+
--border-color-primary: var(--color-border-primary);
|
|
430
|
+
--border-color-tertiary: var(--color-border-tertiary);
|
|
431
|
+
--border-color-secondary_alt: var(--color-border-secondary_alt);
|
|
432
|
+
--border-color-brand: var(--color-border-brand);
|
|
433
|
+
--border-color-error_subtle: var(--color-border-error_subtle);
|
|
434
|
+
--border-color-success: var(--color-border-success);
|
|
435
|
+
--border-color-warning: var(--color-border-warning);
|
|
436
|
+
--border-color-brand-solid: var(--color-bg-brand-solid);
|
|
437
|
+
|
|
438
|
+
/* ── ring-color ── */
|
|
439
|
+
--ring-color-secondary: var(--color-border-secondary);
|
|
440
|
+
--ring-color-primary: var(--color-border-primary);
|
|
441
|
+
--ring-color-tertiary: var(--color-border-tertiary);
|
|
442
|
+
--ring-color-secondary_alt: var(--color-border-secondary_alt);
|
|
443
|
+
--ring-color-brand: var(--color-border-brand);
|
|
444
|
+
--ring-color-error_subtle: var(--color-border-error_subtle);
|
|
445
|
+
--ring-color-success: var(--color-border-success);
|
|
446
|
+
--ring-color-warning: var(--color-border-warning);
|
|
447
|
+
--ring-color-brand-solid: var(--color-bg-brand-solid);
|
|
448
|
+
|
|
449
|
+
/* ── outline-color ── */
|
|
450
|
+
--outline-color-secondary: var(--color-border-secondary);
|
|
451
|
+
--outline-color-primary: var(--color-border-primary);
|
|
452
|
+
--outline-color-tertiary: var(--color-border-tertiary);
|
|
453
|
+
--outline-color-secondary_alt: var(--color-border-secondary_alt);
|
|
454
|
+
--outline-color-brand: var(--color-border-brand);
|
|
455
|
+
--outline-color-error_subtle: var(--color-border-error_subtle);
|
|
456
|
+
--outline-color-success: var(--color-border-success);
|
|
457
|
+
--outline-color-warning: var(--color-border-warning);
|
|
458
|
+
--outline-color-brand-solid: var(--color-bg-brand-solid);
|
|
459
|
+
|
|
460
|
+
/* ─────────────────────────── Radii ──────────────────────────────────────────── */
|
|
461
|
+
/* NO `--radius-*` TOKENS. Untitled UI declares none either — every `rounded-*` resolves to
|
|
462
|
+
* Tailwind's own ladder, and this library now spells its corners the same way.
|
|
463
|
+
*
|
|
464
|
+
* Ours used to be Tailwind's ladder shifted one step up (our `md` was 8px where Tailwind's is 6px),
|
|
465
|
+
* which meant a class string ported from the reference silently re-cornered by 2px. The fix was to
|
|
466
|
+
* RE-SPELL, not re-value: our 8px control corner is now `rounded-lg` — the reference's actual
|
|
467
|
+
* spelling AND its actual value — so `Button`'s class string is character-identical to theirs and
|
|
468
|
+
* 22 "their name = our name" translation comments could be deleted. Zero pixels moved.
|
|
469
|
+
*
|
|
470
|
+
* The effective ladder is therefore Tailwind's: sm 4 · md 6 · lg 8 · xl 12 · 2xl 16 · 3xl 24 ·
|
|
471
|
+
* 4xl 32 · full. (`xs` = 2px is newly reachable and deliberately unused — nothing here has a 2px
|
|
472
|
+
* corner.) 10px has no rung on that ladder and is written `rounded-[10px]`, which is also how the
|
|
473
|
+
* reference writes it, ten times — its own tab-pill container included.
|
|
474
|
+
*
|
|
475
|
+
* TWO MECHANICS WORTH KNOWING BEFORE RE-ADDING A TOKEN HERE:
|
|
476
|
+
* · A radius token needs no `cn.ts` registration ONLY while its name is a t-shirt size.
|
|
477
|
+
* tailwind-merge validates the `rounded` group with `isTshirtSize`, so a role-named token
|
|
478
|
+
* (`--radius-well`, `--radius-nested`) would NOT conflict with `rounded-none` — both classes
|
|
479
|
+
* survive, silently, and a `seamless` control keeps a stray corner. Same failure mode as
|
|
480
|
+
* `--ease-drawer`. An arbitrary value has no such problem: it is matched by `isArbitraryValue`.
|
|
481
|
+
* · `--radius-full: 9999px` used to OVERRIDE Tailwind's static `calc(infinity * 1px)`, because a
|
|
482
|
+
* theme key beats a static value. Deleting it restores the static form; identical below
|
|
483
|
+
* ~19998px of box height. */
|
|
484
|
+
|
|
485
|
+
/* ─────────────────────────── Shadows (Untitled UI — pure black, low opacity) ──── */
|
|
486
|
+
--shadow-xs: 0 1px 2px 0 oklch(0 0 0 / 0.05);
|
|
487
|
+
--shadow-sm: 0 1px 3px 0 oklch(0 0 0 / 0.1), 0 1px 2px -1px oklch(0 0 0 / 0.1);
|
|
488
|
+
/* Declared because `shadow-md` SHIPS while the token did not: Tree's drag label was the one shadow
|
|
489
|
+
* in the library not coming from our own token layer, so it silently ran Tailwind's default — whose
|
|
490
|
+
* second layer is alpha .10 against the reference's .06, 67% heavier. This is the reference's value.
|
|
491
|
+
*
|
|
492
|
+
* (`--shadow-3xl` went the other way and was deleted: ZERO call sites, yet it reached the shipped
|
|
493
|
+
* dist/styles.css anyway, because `@source "../lib"` let Tailwind's content scanner read the literal
|
|
494
|
+
* string `shadow-3xl` out of a COMMENT in cn.ts. ~200 bytes of dead CSS sourced from prose.) */
|
|
495
|
+
--shadow-md: 0 4px 6px -1px oklch(0 0 0 / 0.1), 0 2px 4px -2px oklch(0 0 0 / 0.06);
|
|
496
|
+
--shadow-lg: 0 12px 16px -4px oklch(0 0 0 / 0.08), 0 4px 6px -2px oklch(0 0 0 / 0.03), 0 2px 2px -1px oklch(0 0 0 / 0.04);
|
|
497
|
+
--shadow-xl: 0 20px 24px -4px oklch(0 0 0 / 0.08), 0 8px 8px -4px oklch(0 0 0 / 0.03), 0 3px 3px -1.5px oklch(0 0 0 / 0.04);
|
|
498
|
+
--shadow-2xl: 0 24px 48px -12px oklch(0 0 0 / 0.18), 0 4px 4px -2px oklch(0 0 0 / 0.04);
|
|
499
|
+
/* Skeuomorphic solid-button elevation — Untitled UI's recipe: shadow-xs + a 1px dark
|
|
500
|
+
* inset ring + a 2px dark bottom inner line. The white top gloss is a separate
|
|
501
|
+
* `before:` overlay on the solid Button variants, not baked in here. */
|
|
502
|
+
--shadow-skeuomorphic: 0 1px 2px 0 oklch(0 0 0 / 0.05), inset 0 0 0 1px oklch(0 0 0 / 0.18), inset 0 -2px 0 0 oklch(0 0 0 / 0.05);
|
|
503
|
+
|
|
504
|
+
/* ─────────────────────────── Motion (drawer / slideout) ─────────────────────── */
|
|
505
|
+
/* The drawer is the one overlay whose motion is worth retuning per app: it travels a whole
|
|
506
|
+
* panel width, so its timing is the most visible motion the library ships. There is no
|
|
507
|
+
* per-call `duration` prop — that would be an open `number` on an opinionated component
|
|
508
|
+
* (AGENTS §1, §4 Typing) — so the knob lives HERE, and an app overrides it by redeclaring
|
|
509
|
+
* these three in its own `:root` after the library's stylesheet. `src/components/overlay/motion.ts`
|
|
510
|
+
* is the only consumer.
|
|
511
|
+
*
|
|
512
|
+
* `--ease-*` is a Tailwind v4 theme namespace, so the curve is also the `ease-drawer` utility —
|
|
513
|
+
* and a token added to that namespace must ALSO be registered in `src/lib/cn.ts`, or
|
|
514
|
+
* tailwind-merge won't see `ease-drawer` as conflicting with `ease-out`, both survive the merge,
|
|
515
|
+
* and the composed override silently loses to whatever the stylesheet orders last.
|
|
516
|
+
* Why this curve and not `ease-out`/`ease-in`: both traced badly at panel-width distance — see
|
|
517
|
+
* the `DRAWER_EASE` doc comment. It front-loads (~50% of the travel in the first ~25% of the
|
|
518
|
+
* time), which is what lets a longer duration still read as crisp rather than sluggish. It is
|
|
519
|
+
* also why these durations sit ABOVE Untitled UI's 300ms enter: at the same 300ms this curve
|
|
520
|
+
* arrives perceptibly sooner than their near-symmetric `ease`, so matching their NUMBER
|
|
521
|
+
* undershot their FEEL. Out stays below in, per the house rule that the close is snappier. */
|
|
522
|
+
--ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
|
|
523
|
+
--drawer-duration-in: 400ms;
|
|
524
|
+
--drawer-duration-out: 300ms;
|
|
525
|
+
|
|
526
|
+
/* ─────────────────────────── Typography ─────────────────────────────────────── */
|
|
527
|
+
/* Inter has no Thai coverage — "Noto Sans Thai" catches Thai codepoints before the OS default.
|
|
528
|
+
*
|
|
529
|
+
* ONE family token, not Untitled UI's `--font-body` + `--font-display` pair. Theirs are
|
|
530
|
+
* character-for-character IDENTICAL to each other and the split is a Figma-variable artifact:
|
|
531
|
+
* across their whole component tree `font-body` is used ONCE (on a `<kbd>`, undoing the UA's
|
|
532
|
+
* monospace) and `font-display` ZERO times. Adopting it would also break something real —
|
|
533
|
+
* Tailwind's preflight sets `html { font-family: --theme(--default-font-family) }` and
|
|
534
|
+
* `--default-font-family` resolves through `--font-sans`, so renaming the token silently drops
|
|
535
|
+
* Inter off `<html>` and leaves it only on elements carrying an explicit `font-sans`. */
|
|
536
|
+
--font-sans:
|
|
537
|
+
"Inter", "Inter Variable", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
|
|
538
|
+
"Segoe UI Emoji";
|
|
539
|
+
--font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
540
|
+
|
|
541
|
+
/* NO `--font-weight-*` declarations. We used to declare normal/medium/semibold/bold at
|
|
542
|
+
* 400/500/600/700 — the exact four values Tailwind already declares, so all four were dead
|
|
543
|
+
* no-ops. The POLICY they were standing in for is real and lives here instead: this library
|
|
544
|
+
* uses THREE weights — 400 body, 500 for a label or an emphasised row, 600 for a title or a
|
|
545
|
+
* control label. 700 is reserved for rare display emphasis and currently has no caller.
|
|
546
|
+
* Deliberately NOT reset with `--font-weight-*: initial`: that would delete `font-light` /
|
|
547
|
+
* `font-black` from a CONSUMER's app, since this file ships as their token layer too. */
|
|
548
|
+
|
|
549
|
+
/* ── The size ladder ───────────────────────────────────────────────────────────────────────
|
|
550
|
+
*
|
|
551
|
+
* Names are Untitled UI v8's: `2xs`…`xl`, then `display-xs`…`display-2xl`. The DISPLAY steps are
|
|
552
|
+
* a rename, not a re-scale — every size we shipped was already value-exact against a UUI step
|
|
553
|
+
* (`2xl`=display-xs, `3xl`=display-sm, `4xl`=display-md, `6xl`=display-xl), which is why this
|
|
554
|
+
* ladder moves letter-spacing and nothing else.
|
|
555
|
+
*
|
|
556
|
+
* LITERAL `rem`, deliberately NOT the reference's `calc(var(--spacing) * n)`. `--spacing` is a
|
|
557
|
+
* SPACING token inherited from Tailwind, so their notation makes the entire type scale parasitic
|
|
558
|
+
* on it: a consumer who tightens density with `@theme { --spacing: 0.2rem }` — the documented v4
|
|
559
|
+
* knob — would silently rescale every font size in the library by 0.8x, with no warning. It is
|
|
560
|
+
* also unreadable (`calc(var(--spacing) * 7.5)` is 30px only if you already know `--spacing`)
|
|
561
|
+
* and unparseable by the token generator.
|
|
562
|
+
*
|
|
563
|
+
* `0em` is written EXPLICITLY on the un-tracked steps rather than omitted. Measured: a step with
|
|
564
|
+
* no `--text-*--letter-spacing` emits no `letter-spacing` declaration at all, which leaves the
|
|
565
|
+
* property INHERITABLE at that step — `text-sm` inside a `tracking-tight` ancestor would pick up
|
|
566
|
+
* -0.025em. One line per step buys a reset.
|
|
567
|
+
*
|
|
568
|
+
* Tracking starts at 36px, matching the reference: `display-xs` (24) and `display-sm` (30) are
|
|
569
|
+
* bare there, and every display value they DO carry is exactly -0.02em (-0.72/36 = -0.96/48 =
|
|
570
|
+
* -1.2/60 = -1.44/72). Written in `em`, not the reference's px: identical at the token's own
|
|
571
|
+
* size, but the em form survives a size override on the same element. */
|
|
572
|
+
|
|
573
|
+
/* 10px. Minted for a count numeral — `Indicator`'s `sm` count shipped as a raw
|
|
574
|
+
* `text-[0.625rem]`, the only off-ladder font size in the library, and `Tooltip` recorded the
|
|
575
|
+
* same wall from the other side ("would need a type token below `--text-xs`, so `sm` is
|
|
576
|
+
* deliberately unclaimed"). Untitled UI has the identical gap and answers it with an arbitrary
|
|
577
|
+
* `text-[10px] leading-[13px]`, duplicated inconsistently at a second site — which is the case
|
|
578
|
+
* for a token rather than a second escape hatch. 14px leading continues the ladder's own
|
|
579
|
+
* arithmetic (1.4) where their 13px is a one-off. */
|
|
580
|
+
--text-2xs: 0.625rem;
|
|
581
|
+
--text-2xs--line-height: 0.875rem;
|
|
582
|
+
--text-2xs--letter-spacing: 0em;
|
|
583
|
+
|
|
584
|
+
--text-xs: 0.75rem;
|
|
585
|
+
--text-xs--line-height: 1.125rem;
|
|
586
|
+
--text-xs--letter-spacing: 0em;
|
|
587
|
+
|
|
588
|
+
--text-sm: 0.875rem;
|
|
589
|
+
--text-sm--line-height: 1.25rem;
|
|
590
|
+
--text-sm--letter-spacing: 0em;
|
|
591
|
+
|
|
592
|
+
--text-md: 1rem;
|
|
593
|
+
--text-md--line-height: 1.5rem;
|
|
594
|
+
--text-md--letter-spacing: 0em;
|
|
595
|
+
|
|
596
|
+
--text-lg: 1.125rem;
|
|
597
|
+
--text-lg--line-height: 1.75rem;
|
|
598
|
+
--text-lg--letter-spacing: 0em;
|
|
599
|
+
|
|
600
|
+
--text-xl: 1.25rem;
|
|
601
|
+
--text-xl--line-height: 1.875rem;
|
|
602
|
+
--text-xl--letter-spacing: 0em;
|
|
603
|
+
|
|
604
|
+
--text-display-xs: 1.5rem;
|
|
605
|
+
--text-display-xs--line-height: 2rem;
|
|
606
|
+
--text-display-xs--letter-spacing: 0em;
|
|
607
|
+
|
|
608
|
+
--text-display-sm: 1.875rem;
|
|
609
|
+
--text-display-sm--line-height: 2.375rem;
|
|
610
|
+
--text-display-sm--letter-spacing: 0em;
|
|
611
|
+
|
|
612
|
+
--text-display-md: 2.25rem;
|
|
613
|
+
--text-display-md--line-height: 2.75rem;
|
|
614
|
+
--text-display-md--letter-spacing: -0.02em;
|
|
615
|
+
|
|
616
|
+
/* 48px — the one hole INSIDE the used range: `text-5xl` was never ours, so it resolved to
|
|
617
|
+
* Tailwind's un-themed 3rem with `line-height: 1` and no tracking, exactly the failure mode the
|
|
618
|
+
* old `--text-4xl` comment described and fixed one step short of. */
|
|
619
|
+
--text-display-lg: 3rem;
|
|
620
|
+
--text-display-lg--line-height: 3.75rem;
|
|
621
|
+
--text-display-lg--letter-spacing: -0.02em;
|
|
622
|
+
|
|
623
|
+
--text-display-xl: 3.75rem;
|
|
624
|
+
--text-display-xl--line-height: 4.5rem;
|
|
625
|
+
--text-display-xl--letter-spacing: -0.02em;
|
|
626
|
+
|
|
627
|
+
/* Declared though currently unread (it is dead in the reference too) — three lines that complete
|
|
628
|
+
* the ladder, and the Foundations Typography page is its first real consumer. */
|
|
629
|
+
--text-display-2xl: 4.5rem;
|
|
630
|
+
--text-display-2xl--line-height: 5.625rem;
|
|
631
|
+
--text-display-2xl--letter-spacing: -0.02em;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
/* ─────────────────────────── Semantic roles — DARK remap (.dark) ─────────────── */
|
|
635
|
+
.dark {
|
|
636
|
+
/* Surfaces */
|
|
637
|
+
--color-bg-primary: var(--color-neutral-950);
|
|
638
|
+
--color-bg-primary_alt: var(--color-neutral-900);
|
|
639
|
+
/* Pure black. The classic ramp's own 900→950 delta was 4/6/11, so a "one stop below 950" could be
|
|
640
|
+
* derived by extending it; the stock ramp's delta is a FLAT 13/13/13, and extending that lands at
|
|
641
|
+
* (−3,−3,−3) — the method is not available and a decision is required. Black is the honest floor
|
|
642
|
+
* on an achromatic ramp, and it REPRODUCES the step it replaces: contrast against `bg-primary` is
|
|
643
|
+
* 1.061 where the old gray-975/gray-950 pair measured 1.044, with `border-secondary` still clear
|
|
644
|
+
* of the well's edge at 1.388 (RULE_MIN 1.2). It also retires the bespoke `gray-975` primitive. */
|
|
645
|
+
--color-bg-sunken: #000000;
|
|
646
|
+
--color-bg-secondary: var(--color-neutral-900);
|
|
647
|
+
--color-bg-tertiary: var(--color-neutral-800);
|
|
648
|
+
--color-bg-quaternary: var(--color-neutral-700);
|
|
649
|
+
/* Re-derived, NOT scaled: ink neutral-50 (250) over neutral-950 (10) reaching neutral-800 (38)
|
|
650
|
+
* gives 10 + 240a = 38, a = 11.67% → 12%. It was 7% against the classic ramp. Light moved the
|
|
651
|
+
* OTHER way (6% → 4%) because the stock ramp's light end is compressed while its dark end is
|
|
652
|
+
* stretched — the two percentages are independent measurements, not one number and its mirror. */
|
|
653
|
+
--color-bg-ghost-hover: color-mix(in oklab, var(--color-text-primary) 12%, transparent);
|
|
654
|
+
/* Dark ladder over the page: idle #0a0a0a · selected #1b1b1b · hover #272727 · sel+hover #2e2e2e
|
|
655
|
+
* — steps of 17/12/7 per 255, with the `border-primary` rule clear of all four (1.909 / 1.661 /
|
|
656
|
+
* 1.441 / 1.310 against RULE_MIN 1.2). sel+hover is 15% rather than the 17% that would keep the
|
|
657
|
+
* step even: 17% pushed the rule to 1.219, 0.019 of headroom, and this tripwire exists because
|
|
658
|
+
* two fills HAVE gone byte-identical to a border role in production. */
|
|
659
|
+
--color-bg-selected: color-mix(in oklab, var(--color-text-primary) 7%, transparent);
|
|
660
|
+
--color-bg-selected-hover: color-mix(in oklab, var(--color-text-primary) 15%, transparent);
|
|
661
|
+
/* The solid fills stay CONSTANT (declared by absence) — a -600 fill under a white label reads the
|
|
662
|
+
* same on either page. Their `_hover`s do NOT: they step one stop LIGHTER here, Untitled UI's own
|
|
663
|
+
* direction. See the light block for why the former darken-in-dark deviation retired. */
|
|
664
|
+
--color-bg-brand-solid_hover: var(--color-brand-500);
|
|
665
|
+
--color-bg-error-solid_hover: var(--color-red-500);
|
|
666
|
+
/* `bg-secondary-solid_hover`, `bg-success-solid_hover` and `bg-warning-solid_hover` are absent —
|
|
667
|
+
* they stay CONSTANT at their darker light-mode stop. Untitled UI ships a `_hover` for the brand
|
|
668
|
+
* and error solids ONLY; those two are the ones lightened above, and they clear the STATUS floor
|
|
669
|
+
* when lightened (brand-500 = 3.33, red-500 = 3.81 under the white label). The other three are
|
|
670
|
+
* HOUSE additions, so there is no reference direction to restore — and measured, lightening them
|
|
671
|
+
* does not survive: white on green-500 is 2.22 and on amber-500 2.13, both well under 3.0. */
|
|
672
|
+
/* brand-950, not UUI's brand-500 — see the light block: this role backs TEXT here. */
|
|
673
|
+
--color-bg-brand-primary: var(--color-brand-950);
|
|
674
|
+
/* The inverse surface stays LIGHTER than the dark page so it still reads as a raised chip. */
|
|
675
|
+
--color-bg-primary-solid: var(--color-neutral-900);
|
|
676
|
+
/* The three status washes go to the ramp's floor — opaque, matching Untitled UI. Their label is
|
|
677
|
+
* the on-tint `utility-<hue>-700` (mirrored to -300 here), measured 8.15–12.09 on these stops. */
|
|
678
|
+
--color-bg-success-primary: var(--color-green-950);
|
|
679
|
+
--color-bg-warning-primary: var(--color-amber-950);
|
|
680
|
+
--color-bg-error-primary: var(--color-red-950);
|
|
681
|
+
|
|
682
|
+
/* Type */
|
|
683
|
+
--color-text-primary: var(--color-neutral-50);
|
|
684
|
+
--color-text-secondary: var(--color-neutral-300);
|
|
685
|
+
--color-text-secondary_hover: var(--color-neutral-200);
|
|
686
|
+
--color-text-tertiary: var(--color-neutral-400);
|
|
687
|
+
/* neutral-400, and the former a11y bump that forced it is now 1:1 for free: UUI v8's own
|
|
688
|
+
* `text-quaternary` is neutral-500 light / neutral-400 dark — the same stop pair we had bumped to
|
|
689
|
+
* against the classic ramp. Register entry satisfied natively. */
|
|
690
|
+
--color-text-quaternary: var(--color-neutral-400);
|
|
691
|
+
/* `text-placeholder` is deliberately ABSENT — neutral-500 in both themes. See the light block. */
|
|
692
|
+
--color-text-brand-secondary: var(--color-brand-300);
|
|
693
|
+
--color-text-brand-secondary_hover: var(--color-brand-200);
|
|
694
|
+
--color-text-brand-tertiary: var(--color-neutral-400);
|
|
695
|
+
--color-text-success-primary: var(--color-green-400);
|
|
696
|
+
--color-text-warning-primary: var(--color-amber-400);
|
|
697
|
+
--color-text-error-primary: var(--color-red-400);
|
|
698
|
+
|
|
699
|
+
/* Non-text foreground */
|
|
700
|
+
/* neutral-600 — Untitled UI's own value, adopted. It measures 2.53 against the dark page, under
|
|
701
|
+
* WCAG 1.4.11's 3:1 for a non-text UI glyph, and light measures 2.58; BOTH are accepted with the
|
|
702
|
+
* numbers on the table in `ACCEPTED_NON_TEXT` (`scripts/check-contrast.mjs`). The rescue is the
|
|
703
|
+
* two-step hover `fg-quaternary_hover` (4.74 light / 4.18 dark) plus the control's own focus ring,
|
|
704
|
+
* and the gate RE-MEASURES that hover: softening it "to match" the rest state is the failure mode
|
|
705
|
+
* the entry guards, because that is the whole rescue. */
|
|
706
|
+
--color-fg-secondary: var(--color-neutral-300);
|
|
707
|
+
--color-fg-quaternary: var(--color-neutral-600);
|
|
708
|
+
/* neutral-500 in both themes — constant, so it is declared by absence in this block. Against a
|
|
709
|
+
* neutral-600 rest it still steps LIGHTER here, which is the direction a dark hover must go. */
|
|
710
|
+
--color-fg-disabled: var(--color-neutral-600);
|
|
711
|
+
--color-fg-brand-secondary: var(--color-brand-400);
|
|
712
|
+
--color-fg-brand-secondary_hover: var(--color-brand-300);
|
|
713
|
+
--color-fg-error-secondary: var(--color-red-400);
|
|
714
|
+
--color-fg-success-secondary: var(--color-green-400);
|
|
715
|
+
|
|
716
|
+
/* Borders */
|
|
717
|
+
--color-border-secondary: var(--color-neutral-800);
|
|
718
|
+
--color-border-primary: var(--color-neutral-700);
|
|
719
|
+
/* neutral-900 — HOUSE. UUI's own value here is neutral-800, identical to its `border-secondary`. */
|
|
720
|
+
--color-border-tertiary: var(--color-neutral-900);
|
|
721
|
+
/* Resolves to a solid gray in dark, not a translucent black — matches `border-secondary`. */
|
|
722
|
+
--color-border-secondary_alt: var(--color-neutral-800);
|
|
723
|
+
--color-border-brand: var(--color-brand-400);
|
|
724
|
+
--color-border-error_subtle: var(--color-red-500);
|
|
725
|
+
--color-border-success: var(--color-green-500);
|
|
726
|
+
--color-border-warning: var(--color-amber-500);
|
|
727
|
+
|
|
728
|
+
/* Utility — the stop MIRROR. 50↔950 · 100↔900 · 200↔800 · 300↔700 · 400↔600 · 500↔500 (the fixed
|
|
729
|
+
* point, which is why every `-500` is theme-constant by construction rather than by assertion) ·
|
|
730
|
+
* 600↔400 · 700↔300.
|
|
731
|
+
*
|
|
732
|
+
* `neutral`'s mirror is BESPOKE and is copied as-is, including its defect: -50 folds to neutral-900
|
|
733
|
+
* rather than -950 (because neutral-950 IS `bg-primary` — a wash cannot be the page), and BOTH
|
|
734
|
+
* -200 and -300 fold onto neutral-700, so those two rungs are the SAME COLOUR here. That fold is
|
|
735
|
+
* the documented reason the illustration ramp exists as a separate family. */
|
|
736
|
+
--color-utility-neutral-50: var(--color-neutral-900);
|
|
737
|
+
--color-utility-neutral-100: var(--color-neutral-800);
|
|
738
|
+
--color-utility-neutral-200: var(--color-neutral-700);
|
|
739
|
+
--color-utility-neutral-300: var(--color-neutral-700);
|
|
740
|
+
--color-utility-neutral-400: var(--color-neutral-600);
|
|
741
|
+
--color-utility-neutral-500: var(--color-neutral-500);
|
|
742
|
+
--color-utility-neutral-600: var(--color-neutral-400);
|
|
743
|
+
--color-utility-neutral-700: var(--color-neutral-300);
|
|
744
|
+
|
|
745
|
+
--color-utility-brand-50: var(--color-brand-950);
|
|
746
|
+
--color-utility-brand-100: var(--color-brand-900);
|
|
747
|
+
--color-utility-brand-200: var(--color-brand-800);
|
|
748
|
+
--color-utility-brand-300: var(--color-brand-700);
|
|
749
|
+
--color-utility-brand-400: var(--color-brand-600);
|
|
750
|
+
--color-utility-brand-500: var(--color-brand-500);
|
|
751
|
+
--color-utility-brand-600: var(--color-brand-400);
|
|
752
|
+
--color-utility-brand-700: var(--color-brand-300);
|
|
753
|
+
|
|
754
|
+
--color-utility-red-50: var(--color-red-950);
|
|
755
|
+
--color-utility-red-100: var(--color-red-900);
|
|
756
|
+
--color-utility-red-200: var(--color-red-800);
|
|
757
|
+
--color-utility-red-300: var(--color-red-700);
|
|
758
|
+
--color-utility-red-400: var(--color-red-600);
|
|
759
|
+
--color-utility-red-500: var(--color-red-500);
|
|
760
|
+
--color-utility-red-600: var(--color-red-400);
|
|
761
|
+
--color-utility-red-700: var(--color-red-300);
|
|
762
|
+
|
|
763
|
+
--color-utility-amber-50: var(--color-amber-950);
|
|
764
|
+
--color-utility-amber-100: var(--color-amber-900);
|
|
765
|
+
--color-utility-amber-200: var(--color-amber-800);
|
|
766
|
+
--color-utility-amber-300: var(--color-amber-700);
|
|
767
|
+
--color-utility-amber-400: var(--color-amber-600);
|
|
768
|
+
--color-utility-amber-500: var(--color-amber-500);
|
|
769
|
+
--color-utility-amber-600: var(--color-amber-400);
|
|
770
|
+
--color-utility-amber-700: var(--color-amber-300);
|
|
771
|
+
|
|
772
|
+
--color-utility-green-50: var(--color-green-950);
|
|
773
|
+
--color-utility-green-100: var(--color-green-900);
|
|
774
|
+
--color-utility-green-200: var(--color-green-800);
|
|
775
|
+
--color-utility-green-300: var(--color-green-700);
|
|
776
|
+
--color-utility-green-400: var(--color-green-600);
|
|
777
|
+
--color-utility-green-500: var(--color-green-500);
|
|
778
|
+
--color-utility-green-600: var(--color-green-400);
|
|
779
|
+
--color-utility-green-700: var(--color-green-300);
|
|
780
|
+
|
|
781
|
+
--color-utility-blue-50: var(--color-blue-950);
|
|
782
|
+
--color-utility-blue-100: var(--color-blue-900);
|
|
783
|
+
--color-utility-blue-200: var(--color-blue-800);
|
|
784
|
+
--color-utility-blue-300: var(--color-blue-700);
|
|
785
|
+
--color-utility-blue-400: var(--color-blue-600);
|
|
786
|
+
--color-utility-blue-500: var(--color-blue-500);
|
|
787
|
+
--color-utility-blue-600: var(--color-blue-400);
|
|
788
|
+
--color-utility-blue-700: var(--color-blue-300);
|
|
789
|
+
|
|
790
|
+
/* Illustration — the inversion that lets ONE drawing read in both themes, straight by ramp stop. */
|
|
791
|
+
--color-illustration-neutral-1: var(--color-neutral-900);
|
|
792
|
+
--color-illustration-neutral-2: var(--color-neutral-800);
|
|
793
|
+
--color-illustration-neutral-3: var(--color-neutral-700);
|
|
794
|
+
--color-illustration-neutral-4: var(--color-neutral-600);
|
|
795
|
+
|
|
796
|
+
/* Textarea resize grip — stroke tracks `border-primary` (neutral-700). Hand-maintained: see light. */
|
|
797
|
+
--textarea-resize-handle: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%3E%3Cpath%20d='M10%202L2%2010'%20stroke='%23404040'%20stroke-linecap='round'/%3E%3Cpath%20d='M11%207L7%2011'%20stroke='%23404040'%20stroke-linecap='round'/%3E%3C/svg%3E");
|
|
798
|
+
|
|
799
|
+
/* ── MIRRORS, repeated. NOT redundant: a custom property inherits its ALREADY-SUBSTITUTED
|
|
800
|
+
* value, so without these every short-form utility (`bg-primary`, `text-secondary`,
|
|
801
|
+
* `border-secondary`) would stay frozen at its LIGHT colour in dark, silently. ── */
|
|
802
|
+
/* ── background-color ── */
|
|
803
|
+
--background-color-primary: var(--color-bg-primary);
|
|
804
|
+
--background-color-primary_alt: var(--color-bg-primary_alt);
|
|
805
|
+
--background-color-sunken: var(--color-bg-sunken);
|
|
806
|
+
--background-color-secondary: var(--color-bg-secondary);
|
|
807
|
+
--background-color-tertiary: var(--color-bg-tertiary);
|
|
808
|
+
--background-color-quaternary: var(--color-bg-quaternary);
|
|
809
|
+
--background-color-ghost-hover: var(--color-bg-ghost-hover);
|
|
810
|
+
--background-color-selected: var(--color-bg-selected);
|
|
811
|
+
--background-color-selected-hover: var(--color-bg-selected-hover);
|
|
812
|
+
--background-color-brand-solid: var(--color-bg-brand-solid);
|
|
813
|
+
--background-color-brand-solid_hover: var(--color-bg-brand-solid_hover);
|
|
814
|
+
--background-color-brand-primary: var(--color-bg-brand-primary);
|
|
815
|
+
--background-color-primary-solid: var(--color-bg-primary-solid);
|
|
816
|
+
--background-color-success-primary: var(--color-bg-success-primary);
|
|
817
|
+
--background-color-warning-primary: var(--color-bg-warning-primary);
|
|
818
|
+
--background-color-error-primary: var(--color-bg-error-primary);
|
|
819
|
+
--background-color-error-solid: var(--color-bg-error-solid);
|
|
820
|
+
--background-color-error-solid_hover: var(--color-bg-error-solid_hover);
|
|
821
|
+
--background-color-secondary-solid: var(--color-bg-secondary-solid);
|
|
822
|
+
--background-color-secondary-solid_hover: var(--color-bg-secondary-solid_hover);
|
|
823
|
+
--background-color-success-solid: var(--color-bg-success-solid);
|
|
824
|
+
--background-color-success-solid_hover: var(--color-bg-success-solid_hover);
|
|
825
|
+
--background-color-warning-solid: var(--color-bg-warning-solid);
|
|
826
|
+
--background-color-warning-solid_hover: var(--color-bg-warning-solid_hover);
|
|
827
|
+
--background-color-overlay: var(--color-bg-overlay);
|
|
828
|
+
|
|
829
|
+
/* ── text-color ── */
|
|
830
|
+
--text-color-primary: var(--color-text-primary);
|
|
831
|
+
--text-color-secondary: var(--color-text-secondary);
|
|
832
|
+
--text-color-secondary_hover: var(--color-text-secondary_hover);
|
|
833
|
+
--text-color-tertiary: var(--color-text-tertiary);
|
|
834
|
+
--text-color-quaternary: var(--color-text-quaternary);
|
|
835
|
+
--text-color-placeholder: var(--color-text-placeholder);
|
|
836
|
+
--text-color-brand-secondary: var(--color-text-brand-secondary);
|
|
837
|
+
--text-color-brand-secondary_hover: var(--color-text-brand-secondary_hover);
|
|
838
|
+
--text-color-brand-tertiary: var(--color-text-brand-tertiary);
|
|
839
|
+
--text-color-success-primary: var(--color-text-success-primary);
|
|
840
|
+
--text-color-warning-primary: var(--color-text-warning-primary);
|
|
841
|
+
--text-color-error-primary: var(--color-text-error-primary);
|
|
842
|
+
|
|
843
|
+
/* ── border-color ── */
|
|
844
|
+
--border-color-secondary: var(--color-border-secondary);
|
|
845
|
+
--border-color-primary: var(--color-border-primary);
|
|
846
|
+
--border-color-tertiary: var(--color-border-tertiary);
|
|
847
|
+
--border-color-secondary_alt: var(--color-border-secondary_alt);
|
|
848
|
+
--border-color-brand: var(--color-border-brand);
|
|
849
|
+
--border-color-error_subtle: var(--color-border-error_subtle);
|
|
850
|
+
--border-color-success: var(--color-border-success);
|
|
851
|
+
--border-color-warning: var(--color-border-warning);
|
|
852
|
+
--border-color-brand-solid: var(--color-bg-brand-solid);
|
|
853
|
+
|
|
854
|
+
/* ── ring-color ── */
|
|
855
|
+
--ring-color-secondary: var(--color-border-secondary);
|
|
856
|
+
--ring-color-primary: var(--color-border-primary);
|
|
857
|
+
--ring-color-tertiary: var(--color-border-tertiary);
|
|
858
|
+
--ring-color-secondary_alt: var(--color-border-secondary_alt);
|
|
859
|
+
--ring-color-brand: var(--color-border-brand);
|
|
860
|
+
--ring-color-error_subtle: var(--color-border-error_subtle);
|
|
861
|
+
--ring-color-success: var(--color-border-success);
|
|
862
|
+
--ring-color-warning: var(--color-border-warning);
|
|
863
|
+
--ring-color-brand-solid: var(--color-bg-brand-solid);
|
|
864
|
+
|
|
865
|
+
/* ── outline-color ── */
|
|
866
|
+
--outline-color-secondary: var(--color-border-secondary);
|
|
867
|
+
--outline-color-primary: var(--color-border-primary);
|
|
868
|
+
--outline-color-tertiary: var(--color-border-tertiary);
|
|
869
|
+
--outline-color-secondary_alt: var(--color-border-secondary_alt);
|
|
870
|
+
--outline-color-brand: var(--color-border-brand);
|
|
871
|
+
--outline-color-error_subtle: var(--color-border-error_subtle);
|
|
872
|
+
--outline-color-success: var(--color-border-success);
|
|
873
|
+
--outline-color-warning: var(--color-border-warning);
|
|
874
|
+
--outline-color-brand-solid: var(--color-bg-brand-solid);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/* ─────────────────────────── Utilities ──────────────────────────────────────── */
|
|
878
|
+
|
|
879
|
+
/* No scrollbar at all — the edge fade (`useScrollFade`) is the entire affordance. For a
|
|
880
|
+
* scroll region too SHORT to host a bar without eating its own content: the single-line
|
|
881
|
+
* pill/chip rows inside a field (TagInput · Select tags trigger · Combobox chips), where a
|
|
882
|
+
* platform bar (always visible off macOS) would cut into a 36–44px control. */
|
|
883
|
+
@utility scrollbar-none {
|
|
884
|
+
scrollbar-width: none;
|
|
885
|
+
&::-webkit-scrollbar {
|
|
886
|
+
display: none;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
/* Thin, always-visible scrollbar (overrides macOS overlay auto-hide) tinted with the
|
|
891
|
+
* semantic border-strong role — used by scrollable regions like TagInput's maxRows cap. */
|
|
892
|
+
@utility scrollbar-thin {
|
|
893
|
+
scrollbar-width: thin;
|
|
894
|
+
scrollbar-color: var(--color-border-primary) transparent;
|
|
895
|
+
&::-webkit-scrollbar {
|
|
896
|
+
width: 8px;
|
|
897
|
+
height: 8px;
|
|
898
|
+
}
|
|
899
|
+
&::-webkit-scrollbar-track {
|
|
900
|
+
background: transparent;
|
|
901
|
+
}
|
|
902
|
+
&::-webkit-scrollbar-thumb {
|
|
903
|
+
background: var(--color-border-primary);
|
|
904
|
+
border-radius: 9999px;
|
|
905
|
+
border: 2px solid transparent;
|
|
906
|
+
background-clip: padding-box;
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
/* Toast's auto-dismiss countdown — the bar pinned to the card's bottom edge that shows how long
|
|
911
|
+
* is left before the toast leaves on its own.
|
|
912
|
+
*
|
|
913
|
+
* A keyframe rather than a transition because there is no state change to transition FROM: the bar
|
|
914
|
+
* has to run for exactly the toast's own `duration`, which arrives per-card as `--toast-countdown`
|
|
915
|
+
* (an inline style, since it is a runtime value). `scaleX` on a `transform-origin: left` fill, not a
|
|
916
|
+
* width, so it composites instead of laying out 60 times a second.
|
|
917
|
+
*
|
|
918
|
+
* Pausing is the load-bearing part. Base UI pauses a toast's dismiss timer while the viewport is
|
|
919
|
+
* hovered or keyboard-focused, and marks that state `data-expanded` on the root — so the animation
|
|
920
|
+
* is paused off the same signal. Without it the bar would empty while the card sat there waiting,
|
|
921
|
+
* which reads as broken rather than paused. */
|
|
922
|
+
@keyframes jz-toast-countdown {
|
|
923
|
+
from {
|
|
924
|
+
transform: scaleX(1);
|
|
925
|
+
}
|
|
926
|
+
to {
|
|
927
|
+
transform: scaleX(0);
|
|
928
|
+
}
|
|
929
|
+
}
|