basalt-ui 1.5.0 → 1.6.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.
@@ -44,6 +44,37 @@ const SHADOW = {
44
44
  light: "0 1px 2px rgba(28,25,23,0.12)",
45
45
  dark: "0 1px 2px rgba(0,0,0,0.35)"
46
46
  },
47
+ /**
48
+ * Interactive-control depth — the ONE value every raised Button/ActionIcon/Input variant shares
49
+ * (`docs/DESIGN-SPEC.md` §5's Button idiom). Exists rather than reusing `card` because `card`'s
50
+ * ring is OUTSET, and an outset ring paints in the color of whatever it is drawn over: fine
51
+ * between neutral panels, but on light scheme it resolves to `--vx-surface-hairline` and draws a
52
+ * pale grey outline around a saturated `filled` button, which reads as a rendering defect.
53
+ *
54
+ * THE TWO SCHEMES ARE SHAPED DIFFERENTLY, and the asymmetry is the whole design — do NOT "tidy"
55
+ * them into one shape. Both were arrived at by elimination, on screen:
56
+ *
57
+ * - DARK = drop + a full inset rim. Its edge is a LIGHTENING, so it cannot collide with the
58
+ * dark drop below the box; a uniform lightening on a dark surface reads as rim light wrapping
59
+ * a raised object, which is exactly right.
60
+ *
61
+ * - LIGHT = drop ONLY, no edge at all. A light-mode edge would have to be a DARKENING (there is
62
+ * nothing lighter than a near-white control to lighten with), and every position for one
63
+ * fails: a uniform dark ring does not read as depth, it reads as a BORDER — it made `default`
64
+ * and `light` look like outlined buttons and every form field look boxed. Moving it to the
65
+ * bottom edge alone then put a dark inner line directly above the dark drop, i.e. a visible
66
+ * DOUBLE BOTTOM BORDER. There is no third position, because a light-mode raised object's only
67
+ * honest cue is the shadow it casts. So light casts one and draws nothing.
68
+ *
69
+ * Consequence to know, on light only: a `default` control nested in a Card shares
70
+ * `--vx-surface-panel` with it and has no boundary but the drop. That is accepted — a wrong-
71
+ * looking border on every control in the app is worse than a soft edge in one nesting case. If it
72
+ * ever needs more, raise the DROP. Do not reintroduce an edge; both shapes have been tried.
73
+ */
74
+ raised: {
75
+ light: "0 1px 2px rgba(28,25,23,0.10)",
76
+ dark: "0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent)"
77
+ },
47
78
  // Floating-layer elevation (menus, popovers, tooltips, modals, drawers) — a REAL drop shadow, a
48
79
  // step above `card`, so detached surfaces read as lifted off the page (`docs/DESIGN-SPEC.md` §5).
49
80
  // Unlike `card`, no embedded ring: floating surfaces carry a real 1px `--vx-surface-border` so
package/dist/tokens.css CHANGED
@@ -206,6 +206,7 @@ html[data-mantine-color-scheme='dark'] {
206
206
  --vx-divider: color-mix(in srgb, #ffffff 6%, transparent);
207
207
  --vx-shadow-card: 0 1px 3px rgba(0,0,0,0.4), inset 0 0 0 1px color-mix(in srgb, #ffffff 4%, transparent);
208
208
  --vx-shadow-ctrl: 0 1px 2px rgba(0,0,0,0.35);
209
+ --vx-shadow-raised: 0 1px 2px rgba(0,0,0,0.35), inset 0 0 0 1px color-mix(in srgb, #ffffff 8%, transparent);
209
210
  --vx-shadow-overlay: 0 8px 24px rgba(0,0,0,0.5);
210
211
  --vx-surface-bg: #27272a;
211
212
  --vx-surface-panel: #2b2b2e;
@@ -269,6 +270,7 @@ html[data-mantine-color-scheme='light'] {
269
270
  --vx-divider: color-mix(in srgb, #e5e5e5 65%, transparent);
270
271
  --vx-shadow-card: 0 1px 2px rgba(28,25,23,0.05), 0 0 0 1px var(--vx-surface-hairline);
271
272
  --vx-shadow-ctrl: 0 1px 2px rgba(28,25,23,0.12);
273
+ --vx-shadow-raised: 0 1px 2px rgba(28,25,23,0.10);
272
274
  --vx-shadow-overlay: 0 8px 24px rgba(28,25,23,0.10);
273
275
  --vx-surface-bg: #f2f2f5;
274
276
  --vx-surface-panel: #fafafd;
package/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # basalt-ui v1.5.0
1
+ # basalt-ui v1.6.0
2
2
  # Opinionated framework for Mantine-based React apps — theme, app shell, visx charts, toolchain presets
3
3
  #
4
4
  # basalt-ui is an opinionated framework for Mantine-based React apps.
@@ -19,7 +19,7 @@
19
19
  # ./tokens.css subpath. Guide: docs/FRAMEWORK-FREE.md in the repo.
20
20
 
21
21
  Package: basalt-ui
22
- Version: 1.5.0
22
+ Version: 1.6.0
23
23
 
24
24
  ## basalt-ui
25
25
  Import: import { ... } from 'basalt-ui'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "basalt-ui",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Opinionated framework for Mantine-based React apps — theme, app shell, visx charts, toolchain presets",
5
5
  "keywords": [
6
6
  "charts",
@@ -81,7 +81,8 @@ const LazyStickToBottom = lazy(() =>
81
81
  border: 'none',
82
82
  cursor: 'pointer',
83
83
  backgroundColor: 'var(--vx-surface-panel)',
84
- boxShadow: 'var(--vx-shadow-card)',
84
+ // Control depth, not panel depth — this is a real <button> (DESIGN-SPEC §2).
85
+ boxShadow: 'var(--vx-shadow-raised)',
85
86
  color: 'var(--vx-faint)',
86
87
  fontFamily: 'var(--basalt-font-mono)',
87
88
  fontSize: VX.text.md,
@@ -76,13 +76,14 @@ export function Composer({
76
76
  disabled,
77
77
  onChange: (event) => setValue(event.currentTarget.value),
78
78
  onKeyDown: handleKeyDown,
79
- // Composer input surface (docs/DESIGN-SPEC.md §5): panel + shadow-card, control radius (6px,
80
- // VX.radiusCtrl) — the ring
81
- // lives in the shadow, so the input carries no separate border.
79
+ // Composer input surface (docs/DESIGN-SPEC.md §5): panel + control radius (6px, VX.radiusCtrl);
80
+ // the ring lives in the shadow, so the input carries no separate border. Depth is deliberately
81
+ // NOT set here — it arrives from the themed `.input` class (theme/controls.module.css), which
82
+ // also grounds it when disabled. A `boxShadow` in this `styles` object renders as an INLINE
83
+ // style and would beat that class unconditionally, leaving a disabled composer raised.
82
84
  styles: {
83
85
  input: {
84
86
  backgroundColor: 'var(--vx-surface-panel)',
85
- boxShadow: 'var(--vx-shadow-card)',
86
87
  borderRadius: VX.radiusCtrl,
87
88
  border: 'none',
88
89
  },
@@ -6,7 +6,7 @@
6
6
  * line is the child-list left guide (`--vx-divider`). Never reintroduce brand/section/footer
7
7
  * borders.
8
8
  *
9
- * The active fill, shadow-card depth and icon-accent color live in the Mantine theme
9
+ * The active tint and icon-accent color live in the Mantine theme
10
10
  * (`NavLink.extend` + `theme/nav-link.module.css`) so they apply to EVERY render path, including a
11
11
  * consumer's router `<Link>` via `renderNavLink` (which never sees this CSS module). This module
12
12
  * owns the shell-local layout (docs/DESIGN-SPEC.md §5) and the INACTIVE state (muted text, faint
@@ -50,7 +50,7 @@
50
50
  }
51
51
 
52
52
  /* Hover — ink-6% tint + ink text, for inactive rows only (an active row already carries the
53
- * theme's panel/shadow-card treatment and keeps its own hover via `--nl-hover`). */
53
+ * theme's stronger ink-9% tint and keeps its own hover via `--nl-hover`). */
54
54
  @media (hover: hover) {
55
55
  .link:not([data-active]):not([aria-current='page']):hover {
56
56
  background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent) !important;
@@ -316,16 +316,14 @@
316
316
 
317
317
  /*
318
318
  * Active child = accent text, weight 600, NO fill (docs/DESIGN-SPEC.md §5) — unlike a top-level
319
- * active row (panel + shadow-card). Overrides the `--nl-*` custom properties the theme sets
320
- * inline on the SAME NavLink root, so `!important` is required; `box-shadow` cancels the theme
321
- * module's active shadow-card.
319
+ * active row (ink-9% tint). Overrides the `--nl-*` custom properties the theme sets inline on the
320
+ * SAME NavLink root, so `!important` is required.
322
321
  */
323
322
  .childList :global(.mantine-NavLink-root[data-active]),
324
323
  .childList :global(.mantine-NavLink-root[aria-current='page']) {
325
324
  --nl-color: var(--vx-accent) !important;
326
325
  --nl-bg: transparent !important;
327
326
  --nl-hover: color-mix(in srgb, var(--vx-ink) 5%, transparent) !important;
328
- box-shadow: none !important;
329
327
  }
330
328
 
331
329
  /* Child hover (inactive) — ink-5% + ink, one step quieter than the parent rows' 6%. Outranks the
@@ -1,6 +1,8 @@
1
1
  /*
2
2
  * Sidebar search trigger — replicates the former header search trigger (panel surface +
3
- * shadow-card, control radius, faint icon/label, mono Kbd) at full width inside the sidebar.
3
+ * shadow-raised, control radius, faint icon/label, mono Kbd) at full width inside the sidebar.
4
+ * `shadow-raised` is the shared CONTROL depth — §5 specifies this trigger and the header icon
5
+ * button as a matched pair, so the two must never drift onto different depth tokens.
4
6
  */
5
7
 
6
8
  .trigger {
@@ -12,7 +14,7 @@
12
14
  padding: 0 var(--vx-space-row-inset-x);
13
15
  border-radius: var(--vx-radius-ctrl);
14
16
  background-color: var(--vx-surface-panel);
15
- box-shadow: var(--vx-shadow-card);
17
+ box-shadow: var(--vx-shadow-raised);
16
18
  color: var(--vx-faint);
17
19
  }
18
20
 
@@ -6,10 +6,19 @@
6
6
 
7
7
  /*
8
8
  * Field idiom (docs/DESIGN-SPEC.md §5): inputs read slightly inset on the panel — field surface
9
- * (white on light, a page-bg step below panel on dark), depth via `shadow-card` (a whisper shadow
10
- * + ring baked into the one value — DESIGN-SPEC doctrine inversion #1: depth is `shadow-card`, not
11
- * a hairline; borders-as-borders stay reserved for layout dividers), faint placeholder, and an
9
+ * (white on light, a page-bg step below panel on dark), depth via `shadow-raised` (a whisper shadow
10
+ * + ring baked into the one value — DESIGN-SPEC doctrine inversion #1: depth is a shadow, not a
11
+ * hairline; borders-as-borders stay reserved for layout dividers), faint placeholder, and an
12
12
  * accent border on focus (Mantine's own `:focus` rule swaps `--input-bd` to `--input-bd-focus`).
13
+ *
14
+ * `shadow-raised` — the SAME token Button/ActionIcon take below, and that sharing is deliberate.
15
+ * A `size="md"` Input and a `size="md"` Button are pinned to identical heights by
16
+ * `--vx-space-control-height`, so they are read as one row of controls; when the buttons moved onto
17
+ * `shadow-raised` and the fields stayed on `shadow-card`, that row visibly split in two. Panels
18
+ * (Card/Paper/Notification/ChartCard/SettingsSection) keep `shadow-card` — the line is
19
+ * control-vs-panel, not component-by-component. Its inset ring also suits a field better than
20
+ * `card`'s outset one ever did: an outset ring draws a boundary AROUND the box, while an inset edge
21
+ * darkens the field's own rim, which is what "recessed into the panel" actually looks like.
13
22
  * The `--input-bd` box itself stays a TRANSPARENT 1px border (not `border: none`) so focus can
14
23
  * recolor the same box with no layout shift, and `[data-error]` still wins a real red border.
15
24
  *
@@ -30,13 +39,15 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
30
39
  }
31
40
 
32
41
  /*
33
- * Depth lands on the INPUT ELEMENT, never on the wrapper above — `--vx-shadow-card` bakes a 1px
42
+ * Depth lands on the INPUT ELEMENT, never on the wrapper above — `--vx-shadow-raised` bakes a 1px
34
43
  * ring into the shadow, and the ring follows the shadowed box's OWN `border-radius`, not any other
35
44
  * element's. Mantine's input wrapper (`.m_6c018570`) is a bare `position: relative` box with
36
45
  * `border-radius: 0`; the ring drawn there squares off around the rounded input inside it and leaks
37
46
  * visible corner nubs. The input element itself carries `border-radius: var(--input-radius)`
38
- * (Input.css), so the ring follows the rounded edge exactly. This is the general rule for the token
39
- * — see shadow-surfaces.test.ts.
47
+ * (Input.css), so the ring follows the rounded edge exactly. `raised`'s ring being INSET rather than
48
+ * outset does not soften this: an inset ring is drawn by the same box and follows the same corners,
49
+ * so a mismatch leaks nubs on the inside of the corner instead of the outside. This is the general
50
+ * rule for every depth token — see shadow-surfaces.test.ts.
40
51
  *
41
52
  * Mantine never declares a `box-shadow` on the input at any specificity, so a plain `.input` class
42
53
  * (0,1,0) wins uncontested. `--field-depth` carries the resting shadow so the `:focus` rule below
@@ -51,27 +62,155 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
51
62
  }
52
63
 
53
64
  .input[data-variant='default'] {
54
- --field-depth: var(--vx-shadow-card);
65
+ --field-depth: var(--vx-shadow-raised);
66
+ }
67
+
68
+ /*
69
+ * Button / ActionIcon depth (docs/DESIGN-SPEC.md §5's Button idiom; the header's search trigger and
70
+ * icon button are specified there as a matched pair and both land on `shadow-raised`, same as the
71
+ * field above).
72
+ *
73
+ * THE LAW: depth says "this is a control surface"; it is NOT the emphasis axis. Emphasis lives
74
+ * entirely in fill weight (`filled` > `light`/`outline` > `subtle`), exactly as every surveyed
75
+ * system resolves it — Material 3's filled button, Radix's `solid`, and Primer's primary all rank
76
+ * by fill and saturation, never by z-height. So every variant that OWNS A BOX gets the same
77
+ * resting depth, and only the tier that owns no box stays flat.
78
+ *
79
+ * This replaces a `default`-only rule that inverted the hierarchy in practice: `default` was the
80
+ * one variant carrying depth, so the SECONDARY button read as a physical object while the primary
81
+ * (`filled`) read as paint on the page. Raising the rest is what removes the inversion — flattening
82
+ * `default` instead would fix it too, but it is not open to us: DESIGN-SPEC doctrine inversion #1
83
+ * ("depth is a shadow, not a hairline") already raised Card/Paper/Input/Chip/CheckboxCard, so a flat
84
+ * Button would be the only flat control in a row of raised ones — most visibly beside a
85
+ * `size="md"` TextInput, which the `--vx-space-control-height` coupling in theme/index.ts pins to
86
+ * the exact same height.
87
+ *
88
+ * ONE depth value for the raised family, and it is `shadow-raised` — a drop plus a 1px INSET edge:
89
+ * - `default`/`filled`/`light` all take it, unmodified. The shared value is the point. An earlier
90
+ * revision split them (`default` on `shadow-card`, the rest on ring-free `shadow-ctrl`) and
91
+ * `default` visibly read a step more three-dimensional than the other two: it was the only one
92
+ * with a DEFINED EDGE, and on dark it also carried a wider blur. A soft drop alone reads as
93
+ * "something is under this"; a crisp boundary is what actually reads as an object. Landing them
94
+ * on one value is what closed that gap — `default` came down (no more 3px/0.4 dark blur, no
95
+ * outset ring), `filled`/`light` came up (they gained an edge at all).
96
+ * - The edge is INSET, which is exactly why one value can cover all three — see `SHADOW.raised`
97
+ * in tokens/palette.ts for the full reasoning. Short version: an outset ring paints in the color
98
+ * of what it is drawn over, so `card`'s pale hairline ring would read as a grey outline around a
99
+ * saturated `filled` button on light scheme; an inset edge is drawn over the control's OWN
100
+ * background and works on a fill, a 13% tint and a neutral panel alike. It also keeps `default`
101
+ * legible inside a Card, where button and card share `--vx-surface-panel` and the inset edge is
102
+ * the only thing separating them (its border is pinned `transparent` by
103
+ * `cssVariablesResolver`, which kills the stock hairline `defaultVariantColorsResolver` draws
104
+ * for EVERY default-variant control — so this edge really is its only one).
105
+ * - `outline` is the one raised variant NOT on it: it already carries a real 1px accent border,
106
+ * and an inset edge tucked just inside a border is muddy. It takes ring-free `shadow-ctrl`
107
+ * instead — the same token, for the same reason, that SegmentedControl's active segment uses to
108
+ * say "this is the lifted one". Its border is its edge, so it is not missing one.
109
+ *
110
+ * `subtle` is the one tier that owns no box — it is a text affordance, not an object, and every
111
+ * system surveyed keeps that tier flat. It stays flat in BOTH states here: its hover is Mantine's
112
+ * own background tint and nothing else, which is exactly how the spec's "ghost icon button" (§5:
113
+ * transparent, faint icon, hover ink-6% + ink icon) already behaved. Button's `subtle` and
114
+ * ActionIcon's therefore need no asymmetry between them. See the note below the variant rules for
115
+ * why an earlier hover-depth attempt was reverted.
116
+ *
117
+ * Mantine never declares a `box-shadow` on either component at ANY specificity, so a plain
118
+ * module-class + attribute selector wins uncontested — no `html[...]` prefix fight, unlike the
119
+ * input-variable overrides above. Depth rides `--ctrl-depth` rather than landing on `box-shadow`
120
+ * directly (the same indirection `.input` uses for `--field-depth`) so the disabled rule below
121
+ * moves ONE variable instead of restating a value per variant.
122
+ */
123
+ .buttonRoot,
124
+ .actionIconRoot {
125
+ --ctrl-depth: 0 0 transparent;
126
+
127
+ box-shadow: var(--ctrl-depth);
128
+ transition: box-shadow 120ms ease;
129
+ }
130
+
131
+ .buttonRoot[data-variant='default'],
132
+ .buttonRoot[data-variant='filled'],
133
+ .buttonRoot[data-variant='light'] {
134
+ --ctrl-depth: var(--vx-shadow-raised);
135
+ }
136
+
137
+ .actionIconRoot[data-variant='default'],
138
+ .actionIconRoot[data-variant='filled'],
139
+ .actionIconRoot[data-variant='light'] {
140
+ --ctrl-depth: var(--vx-shadow-raised);
141
+ }
142
+
143
+ .buttonRoot[data-variant='outline'] {
144
+ --ctrl-depth: var(--vx-shadow-ctrl);
145
+ }
146
+
147
+ .actionIconRoot[data-variant='outline'] {
148
+ --ctrl-depth: var(--vx-shadow-ctrl);
149
+ }
150
+
151
+ /*
152
+ * DEPTH HERE IS STATIC. No variant changes depth or position on hover or press — the raised variants
153
+ * already get hover feedback from Mantine's own background change, so anything layered on top just
154
+ * restates a signal that is already there. Two attempts at adding one were made and both reverted,
155
+ * for reasons worth keeping:
156
+ *
157
+ * - A 1px `translateY` lift on hover, reversed on press. It restated the background change AND
158
+ * cost something real: Floating UI measures a transformed rect, so a Tooltip or Popover anchored
159
+ * to the button visibly shifts with it.
160
+ * - `subtle` materializing into `shadow-raised` on hover. The theory was that `subtle` owns no box
161
+ * at rest, so gaining one under the cursor is the affordance rather than decoration. In practice
162
+ * `shadow-raised`'s INSET edge is a hard rim, and a rim appearing around a ghost button makes it
163
+ * read as an `outline` button rather than as a text affordance that lit up — the tint alone
164
+ * already says "pressable", and the rim says something else entirely. `subtle` is now flat in
165
+ * BOTH states, which also collapses an asymmetry that had to be documented twice: Button's
166
+ * `subtle` and ActionIcon's ghost icon button finally behave identically.
167
+ *
168
+ * DON'T REINTRODUCE EITHER. If a future pass wants `subtle` to gain depth on hover, the token to
169
+ * reach for is ring-free `shadow-ctrl`, not `shadow-raised` — the drop is the part that reads as
170
+ * lift, the rim is the part that read as wrong.
171
+ */
172
+
173
+ /*
174
+ * Disabled is flat and grounded — a raised control reads as pressable, which is the one thing a
175
+ * disabled control must not do. Mantine's own disabled rule (Button.css/ActionIcon.css) recolors
176
+ * background and text but never touches the shadow, so nothing here fights it; the `[data-loading]`
177
+ * exclusion mirrors that same rule, keeping a loading button's chrome intact while it works.
178
+ * Written as real (0,3,0) selectors rather than a `:where()` group so this outranks the (0,2,0)
179
+ * variant rules above on specificity alone, independent of source order.
180
+ */
181
+ .buttonRoot:disabled:not([data-loading]),
182
+ .buttonRoot[data-disabled]:not([data-loading]),
183
+ .actionIconRoot:disabled:not([data-loading]),
184
+ .actionIconRoot[data-disabled]:not([data-loading]) {
185
+ --ctrl-depth: 0 0 transparent;
55
186
  }
56
187
 
57
188
  /*
58
- * Button / ActionIcon (`default` variant): the SAME shadow-card depth as the field above and as
59
- * Card/Paper (docs/DESIGN-SPEC.md §5: "search trigger … panel + shadow-card", "icon button …
60
- * panel + shadow-card"). Background and border already resolve centrally, through
61
- * `--mantine-color-default`/`-border` (theme/index.ts's `cssVariablesResolver`) — the
62
- * `default-border` var is pinned to `transparent` there, which is what kills the stock 1px
63
- * hairline `defaultVariantColorsResolver`'s `variant === 'default'` branch draws for EVERY
64
- * default-variant control (Button, ActionIcon, Chip, CheckboxCard, RadioCard, …), not just these
65
- * two. Only the shadow is a fresh declaration (Mantine never sets one for `default`), so no
66
- * `html[...]` specificity fight is needed to win it — a plain module-class + attribute selector is
67
- * deterministic. `filled`/`subtle`/`light` variants are untouched by the attribute scope.
189
+ * Fields ground when disabled for the same reason, and this rule is why the field/button split had
190
+ * to close on BOTH sides: buttons got the treatment above when they moved onto `shadow-raised`,
191
+ * while inputs — which sat on `shadow-card` at the time — never had one at all, so a disabled
192
+ * TextInput stayed raised. Once fields joined the same depth family that gap became a visible
193
+ * inconsistency inside one form rather than a quiet oversight.
194
+ *
195
+ * `:disabled` covers the real `<input>`/`<textarea>`; `[data-disabled]` covers the composite fields
196
+ * (Select, MultiSelect, DatePicker) where Mantine disables a readonly input via the attribute
197
+ * instead. No `[data-loading]` exclusion here — inputs have no loading state, unlike Button.
68
198
  */
69
- .buttonRoot[data-variant='default'] {
70
- box-shadow: var(--vx-shadow-card);
199
+ .input:disabled,
200
+ .input[data-disabled] {
201
+ --field-depth: 0 0 transparent;
71
202
  }
72
203
 
73
- .actionIconRoot[data-variant='default'] {
74
- box-shadow: var(--vx-shadow-card);
204
+ /*
205
+ * Reduced motion drops the fade, never the shadow: a static shadow is not motion, and removing it
206
+ * would strip the very hierarchy this pass exists to establish from the users who asked for less
207
+ * animation. `subtle`'s hover depth still lands — it just lands instantly.
208
+ */
209
+ @media (prefers-reduced-motion: reduce) {
210
+ .buttonRoot,
211
+ .actionIconRoot {
212
+ transition: none;
213
+ }
75
214
  }
76
215
 
77
216
  /*
@@ -84,7 +223,7 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
84
223
  .radioCardRoot[data-with-border] {
85
224
  background-color: var(--vx-surface-panel);
86
225
  border-color: transparent;
87
- box-shadow: var(--vx-shadow-card);
226
+ box-shadow: var(--vx-shadow-raised);
88
227
  }
89
228
 
90
229
  /*
@@ -96,7 +235,7 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
96
235
  */
97
236
  .chipLabel:not([data-checked]):not([data-disabled]) {
98
237
  background-color: var(--vx-surface-panel);
99
- box-shadow: var(--vx-shadow-card);
238
+ box-shadow: var(--vx-shadow-raised);
100
239
  }
101
240
 
102
241
  /*
@@ -342,6 +342,24 @@ const basaltVariantColorResolver: VariantColorsResolver = (input) => {
342
342
  return autoContrast ? { ...resolved, color: on } : resolved
343
343
  }
344
344
 
345
+ // `subtle`: hover is a NEUTRAL ink tint, not Mantine's accent tint
346
+ // (`--mantine-color-{c}-light`). `docs/DESIGN-SPEC.md` §5 specifies the ghost idiom as "hover
347
+ // ink-6% + ink icon", and a subtle Button had never followed it — it hovered into a saturated
348
+ // accent block that read as a filled control appearing under the cursor. Fixing it HERE rather
349
+ // than in controls.module.css is what makes Button and ActionIcon agree: both resolve `subtle`
350
+ // through this one function, and §5's ghost icon button and a `variant="subtle"` Button are meant
351
+ // to be the same idiom at two sizes.
352
+ //
353
+ // Scoped to the DEFAULT color on purpose. An explicitly-colored subtle control (`color="red"` on a
354
+ // destructive text action) carries its hue as the whole signal, so neutralizing its hover would
355
+ // erase the one thing that marks it dangerous — those keep Mantine's own tinted hover.
356
+ if (input.variant === 'subtle') {
357
+ const isDefaultColor = input.color === undefined || input.color === input.theme.primaryColor
358
+ return isDefaultColor
359
+ ? { ...resolved, hover: `color-mix(in srgb, var(--vx-ink) 6%, transparent)` }
360
+ : resolved
361
+ }
362
+
345
363
  if (input.variant !== 'light') return resolved
346
364
  const ink = `var(--mantine-color-${colorName}-light-color)`
347
365
  return {
@@ -526,17 +544,26 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
526
544
  },
527
545
  }),
528
546
  // "Ink earns its color" — a nav selection is UI state, not the identity accent on the LABEL.
529
- // The active item is panel bg + `shadow-card` (forced here at the THEME level via NavLink's
530
- // `--nl-*` vars, so it holds for every render path — including a consumer's router `<Link>`
531
- // via `renderNavLink`, which never sees the shell CSS module); the active ICON is
532
- // accent-colored via `nav-link.module.css` (targets the `[data-position='left']` leftSection,
533
- // which the flat `vars`/`styles` API can't express conditionally on `[data-active]`).
547
+ // The active item is a SELECTED ROW, not a raised control: the same ink-tint idiom as the
548
+ // hover state (one step stronger, ink-9%), no panel fill and no `shadow-card` — a raised,
549
+ // panel-filled row read as a button sitting in the nav rather than as the current location.
550
+ // Selection is carried by the tint + ink text + weight 600 + the accent icon instead. Forced
551
+ // here at the THEME level via NavLink's `--nl-*` vars so it holds for every render path —
552
+ // including a consumer's router `<Link>` via `renderNavLink`, which never sees the shell CSS
553
+ // module; the active ICON is accent-colored via `nav-link.module.css` (targets the
554
+ // `[data-position='left']` leftSection, which the flat `vars`/`styles` API can't express
555
+ // conditionally on `[data-active]`).
556
+ //
557
+ // `--nl-hover` (ink-13%) only ever reaches an ACTIVE row in practice — the inactive hover is
558
+ // set at ink-6% by higher-specificity `:not([data-active])` rules in `nav-link.module.css` /
559
+ // `app-sidebar.module.css` — so it exists to keep the active row responding to the pointer
560
+ // now that its rest state sits in the same tint family as an inactive hover.
534
561
  NavLink: NavLink.extend({
535
562
  vars: () => ({
536
563
  root: {
537
- '--nl-bg': 'var(--vx-surface-panel)',
564
+ '--nl-bg': 'color-mix(in srgb, var(--vx-ink) 9%, transparent)',
538
565
  '--nl-color': 'var(--vx-ink)',
539
- '--nl-hover': 'color-mix(in srgb, var(--vx-ink) 6%, transparent)',
566
+ '--nl-hover': 'color-mix(in srgb, var(--vx-ink) 13%, transparent)',
540
567
  },
541
568
  children: {},
542
569
  }),
@@ -570,7 +597,7 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
570
597
  label: { fontSize: VX.text.md, lineHeight: 'var(--vx-space-row-line-height)' },
571
598
  },
572
599
  }),
573
- // Field idiom (docs/DESIGN-SPEC.md §5): field surface + `shadow-card` depth + faint placeholder,
600
+ // Field idiom (docs/DESIGN-SPEC.md §5): field surface + `shadow-raised` depth + faint placeholder,
574
601
  // accent border + subtle accent ring on focus — see controls.module.css. The two slots carry
575
602
  // different halves of it: the `wrapper` is where Mantine declares the `--input-*` vars, the
576
603
  // `input` is the box that actually paints the surface (bg + radius) and therefore the only
@@ -625,16 +652,19 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
625
652
  PillsInput: PillsInput.extend({
626
653
  classNames: { wrapper: controlsClasses.inputWrapper, input: controlsClasses.input },
627
654
  }),
628
- // Button / ActionIcon (`default` variant): same `shadow-card` depth as every other control
629
- // surface (docs/DESIGN-SPEC.md §5: "search trigger … panel + shadow-card", "icon button …
630
- // panel + shadow-card"; doctrine inversion #1). Background already resolves through the shared
655
+ // Button / ActionIcon: depth for EVERY variant that owns a box (docs/DESIGN-SPEC.md §5's
656
+ // Button idiom; doctrine inversion #1) — `default`/`filled`/`light` on the shared
657
+ // `shadow-raised`, `outline` on ring-free `shadow-ctrl`, `subtle` flat at rest. Emphasis stays
658
+ // in fill weight,
659
+ // never in z-height. Background for `default` already resolves through the shared
631
660
  // `--mantine-color-default` var (→ `--vx-surface-panel`, see cssVariablesResolver below) and
632
- // the border through `--mantine-color-default-border` (→ transparent, same resolver) — neither
661
+ // its border through `--mantine-color-default-border` (→ transparent, same resolver) — neither
633
662
  // component had a `.extend()` block at all before this, which is why they never picked up
634
- // either. Only the shadow needs adding here, in controls.module.css: Mantine's own
635
- // `[data-variant='default']` rule never declares a `box-shadow`, so no specificity fight is
636
- // needed to win one. `filled`/`subtle`/`light` variants are untouched — scoped by attribute
637
- // selector in the CSS, not here.
663
+ // either. Everything else — the per-variant depth and the disabled/reduced-motion grounding —
664
+ // lives in controls.module.css, where the variant scoping
665
+ // is an attribute selector: Mantine declares no `box-shadow` on either component at any
666
+ // specificity, so none of it needs a specificity fight. Nothing about depth is expressible in
667
+ // the flat `styles` objects here, which is the whole reason that file exists.
638
668
  //
639
669
  // Density coupling: mirrors Input's `--input-height` override above — Mantine's OWN
640
670
  // `--button-height-md`/`--ai-size` (via `--ai-size-md`) are global, non-retunable statics
@@ -679,7 +709,8 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
679
709
  // real attribute selectors ((0,2,0)) — Mantine's own rule wraps the same attribute in `:where()`
680
710
  // (0 specificity, landing at (0,1,0) total), so no `html[…]` prefix fight is needed here either.
681
711
  // Neither component sets a background of its own, so panel bg is added alongside the shadow —
682
- // the same panel-bg + shadow-card + no-border triad as Card/Paper.
712
+ // the same panel-bg + depth + no-border triad as Card/Paper — on `shadow-raised`, the shared
713
+ // CONTROL depth, not Card/Paper's `shadow-card`: a selection card is something you click.
683
714
  CheckboxCard: CheckboxCard.extend({
684
715
  classNames: { card: controlsClasses.checkboxCardRoot },
685
716
  }),
@@ -1099,8 +1130,8 @@ function buildCssVariablesResolver(data: PaletteData): CSSVariablesResolver {
1099
1130
  '--mantine-color-body': `var(--vx-surface-bg, ${SURFACE.bg.light})`, // page background
1100
1131
  '--mantine-color-default': `var(--vx-surface-panel, ${SURFACE.panel.light})`, // cards / default controls
1101
1132
  '--mantine-color-default-hover': `var(--vx-surface-elevated, ${SURFACE.elevated.light})`,
1102
- // THE central lever for doctrine inversion #1 on CONTROLS (docs/DESIGN-SPEC.md §8): depth is
1103
- // `shadow-card`, never a hairline, for every `variant="default"` control — not just Card/Paper.
1133
+ // THE central lever for doctrine inversion #1 on CONTROLS (docs/DESIGN-SPEC.md §8): depth is a
1134
+ // shadow, never a hairline, for every `variant="default"` control — not just Card/Paper.
1104
1135
  // `defaultVariantColorsResolver`'s `variant === 'default'` branch reads this ONE var for every
1105
1136
  // component that uses it (Button, ActionIcon, Chip, CheckboxCard, RadioCard, …), so pointing it
1106
1137
  // at `transparent` kills the stock 1px hairline everywhere at once. `transparent`, not `border:
@@ -1,19 +1,19 @@
1
1
  /*
2
- * Active nav row = heavier weight + card depth, applied at the THEME level via `classNames` so it
3
- * reaches EVERY NavLink render path — including a consumer's router `<Link>` mounted through
4
- * `renderNavLink`, which a shell-scoped CSS module never sees. Mantine's `styles` prop only takes
5
- * flat inline properties (a nested `&[data-active]` there throws a React warning), so the state
6
- * selectors live here. React Router's NavLink marks the active item via `aria-current` rather than
7
- * the `active` prop's `data-active`, so both states are matched.
2
+ * Active nav row = heavier weight over the ink tint `--nl-bg` carries (set in theme/index.ts,
3
+ * applied unconditionally by Mantine's own `[data-active]` CSS). NO depth: an active row is a
4
+ * SELECTED ROW, not a raised control — it deliberately reads as a stronger version of the hover
5
+ * tint rather than as a button, so the row never competes with the real filled controls around it.
8
6
  *
9
- * The row's background comes from `--nl-bg` (set in theme/index.ts, applies unconditionally via
10
- * Mantine's own `[data-active]` CSS) — `shadow-card` is added here because there's no `--nl-*` var
11
- * for depth.
7
+ * Applied at the THEME level via `classNames` so it reaches EVERY NavLink render path — including a
8
+ * consumer's router `<Link>` mounted through `renderNavLink`, which a shell-scoped CSS module never
9
+ * sees. Mantine's `styles` prop only takes flat inline properties (a nested `&[data-active]` there
10
+ * throws a React warning), so the state selectors live here. React Router's NavLink marks the
11
+ * active item via `aria-current` rather than the `active` prop's `data-active`, so both states are
12
+ * matched.
12
13
  */
13
14
  .root[data-active],
14
15
  .root[aria-current='page'] {
15
16
  font-weight: 600;
16
- box-shadow: var(--vx-shadow-card);
17
17
  }
18
18
 
19
19
  /*