basalt-ui 2.15.0 → 2.16.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/CHANGELOG.md +29 -0
- package/MIGRATING.md +74 -12
- package/agent/agents/basalt-design-reviewer.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/configs/card-inset.test.ts +57 -0
- package/configs/oxlint-basalt.json +1 -1
- package/configs/oxlint-plugin.js +42 -18
- package/configs/oxlint-plugin.test.ts +37 -6
- package/dist/agent/chat/thread-message.js +1 -1
- package/dist/agent/chat/thread-outcome-card.js +1 -1
- package/dist/charts/ChartCard.js +1 -1
- package/dist/charts/chart-card.module.css +2 -2
- package/dist/cli/shot/board.js +1 -1
- package/dist/cli/shot/measure.d.ts +21 -2
- package/dist/cli/shot/measure.d.ts.map +1 -1
- package/dist/cli/shot/measure.js +20 -5
- package/dist/cli/shot/types.d.ts +3 -2
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +5 -2
- package/dist/dashboard/stat-card.js +12 -12
- package/dist/dashboard/stat-card.module.css +4 -4
- package/dist/dashboard/widget-header.module.css +3 -3
- package/dist/guard/guard-hook.d.ts.map +1 -1
- package/dist/guard/index.d.ts +4 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +18 -4
- package/dist/guard/vx-names.d.ts.map +1 -1
- package/dist/guard/vx-names.js +1 -0
- package/dist/shell/app-mobile-nav.module.css +2 -2
- package/dist/shell/app-sidebar-account.js +1 -1
- package/dist/shell/app-sidebar.js +2 -2
- package/dist/shell/app-sidebar.module.css +8 -8
- package/dist/shell/index.js +5 -1
- package/dist/shell/page-bar.js +1 -1
- package/dist/table/data-table.d.ts.map +1 -1
- package/dist/table/data-table.js +3 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +31 -21
- package/dist/tokens/core.d.ts +10 -4
- package/dist/tokens/core.d.ts.map +1 -1
- package/dist/tokens/core.js +16 -10
- package/dist/tokens/ctl-vars.d.ts +15 -0
- package/dist/tokens/ctl-vars.d.ts.map +1 -0
- package/dist/tokens/ctl-vars.js +22 -0
- package/dist/tokens/palette.d.ts +37 -29
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +32 -21
- package/dist/tokens/space-scale.d.ts +14 -0
- package/dist/tokens/space-scale.d.ts.map +1 -0
- package/dist/tokens/space-scale.js +10 -0
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/agent/chat/thread-message.tsx +1 -1
- package/src/agent/chat/thread-outcome-card.tsx +2 -2
- package/src/charts/ChartCard.tsx +1 -1
- package/src/charts/chart-card.module.css +2 -2
- package/src/cli/shot/board.ts +1 -1
- package/src/cli/shot/measure.ts +33 -6
- package/src/cli/shot/types.ts +3 -2
- package/src/dashboard/settings-section.tsx +5 -2
- package/src/dashboard/stat-card.module.css +4 -4
- package/src/dashboard/stat-card.tsx +13 -13
- package/src/dashboard/widget-header.module.css +3 -3
- package/src/guard/guard-hook.ts +3 -1
- package/src/guard/index.ts +27 -13
- package/src/guard/vx-names.ts +1 -0
- package/src/shell/app-mobile-nav.module.css +2 -2
- package/src/shell/app-sidebar-account.tsx +1 -1
- package/src/shell/app-sidebar.module.css +8 -8
- package/src/shell/app-sidebar.tsx +2 -2
- package/src/shell/index.tsx +10 -4
- package/src/shell/page-bar.tsx +1 -1
- package/src/table/data-table.tsx +10 -4
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +57 -45
- package/src/theme/ctl-theme.tsx +1 -1
- package/src/theme/index.ts +43 -23
- package/src/tokens/core.ts +16 -8
- package/src/tokens/ctl-vars.ts +32 -0
- package/src/tokens/palette.ts +40 -29
- package/src/tokens/space-scale.ts +13 -0
package/src/cli/shot/measure.ts
CHANGED
|
@@ -33,7 +33,29 @@ export type TextReading = {
|
|
|
33
33
|
/** No opaque ancestor background was found: `bg` is white by assumption. */
|
|
34
34
|
assumedWhite: boolean
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
/** A computed `border-top-left-radius` as the page read it, with the box it rounds. */
|
|
37
|
+
export type RawRadius = { value: string; width: number; height: number }
|
|
38
|
+
export type Reading = Omit<Measurement, 'contrast' | 'radius' | 'nested'> & {
|
|
39
|
+
radius: RawRadius
|
|
40
|
+
nested: { path: string; radius: RawRadius; padding: Measurement['padding'] }[]
|
|
41
|
+
texts: TextReading[]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A radius in px, or `'full'` when it rounds the box completely: a percentage of 50 or more
|
|
46
|
+
* (`50%` is a circle/pill however the box is shaped), or a px radius of at least half the shorter
|
|
47
|
+
* side (`9999px`). A zero-size box has nothing to round: 0. A smaller percentage stays a number,
|
|
48
|
+
* resolved against the shorter side — the radius a reader sees on a wide, short box.
|
|
49
|
+
*/
|
|
50
|
+
export function radiusReading({ value, width, height }: RawRadius): number | 'full' {
|
|
51
|
+
const first = value.trim()
|
|
52
|
+
const n = Number.parseFloat(first)
|
|
53
|
+
if (width <= 0 || height <= 0 || !Number.isFinite(n) || n <= 0) return 0
|
|
54
|
+
if (first.endsWith('%'))
|
|
55
|
+
return n >= 50 ? 'full' : Math.round((n / 100) * Math.min(width, height) * 100) / 100
|
|
56
|
+
if (n >= Math.min(width, height) / 2) return 'full'
|
|
57
|
+
return Math.round(n * 100) / 100
|
|
58
|
+
}
|
|
37
59
|
|
|
38
60
|
const hex = (c: readonly number[]): string =>
|
|
39
61
|
'#' +
|
|
@@ -46,7 +68,7 @@ const hex = (c: readonly number[]): string =>
|
|
|
46
68
|
* Contrast per text reading: `min` over all, `failures` below the WCAG AA threshold. The threshold
|
|
47
69
|
* is tested on the UNROUNDED ratio; only the stored value is rounded.
|
|
48
70
|
*/
|
|
49
|
-
export function finishMeasurement({ texts, ...rest }: Reading): Measurement {
|
|
71
|
+
export function finishMeasurement({ texts, radius, nested, ...rest }: Reading): Measurement {
|
|
50
72
|
const failures: ContrastFailure[] = []
|
|
51
73
|
let min: number | null = null
|
|
52
74
|
for (const t of texts) {
|
|
@@ -58,7 +80,12 @@ export function finishMeasurement({ texts, ...rest }: Reading): Measurement {
|
|
|
58
80
|
}
|
|
59
81
|
}
|
|
60
82
|
const backdrop = texts.some((t) => t.assumedWhite) ? ({ backdrop: 'assumed-white' } as const) : {}
|
|
61
|
-
return {
|
|
83
|
+
return {
|
|
84
|
+
...rest,
|
|
85
|
+
radius: radiusReading(radius),
|
|
86
|
+
nested: nested.map((n) => ({ ...n, radius: radiusReading(n.radius) })),
|
|
87
|
+
contrast: { min, failures, ...backdrop },
|
|
88
|
+
}
|
|
62
89
|
}
|
|
63
90
|
|
|
64
91
|
/* oxlint-disable unicorn/consistent-function-scoping -- the helpers below are serialised into the page with it: no outer scope */
|
|
@@ -143,7 +170,7 @@ export function measureAnchor(root: Element): Reading {
|
|
|
143
170
|
const fontSizes = new Set<number>()
|
|
144
171
|
const texts: Reading['texts'] = []
|
|
145
172
|
const painted: [number, number][] = []
|
|
146
|
-
const nested:
|
|
173
|
+
const nested: Reading['nested'] = []
|
|
147
174
|
const pathOf = (el: Element): string => {
|
|
148
175
|
const parts: string[] = []
|
|
149
176
|
for (let n: Element | null = el; n && n !== root; n = n.parentElement) {
|
|
@@ -164,7 +191,7 @@ export function measureAnchor(root: Element): Reading {
|
|
|
164
191
|
if (el !== root && (hasBg || hasBorder) && nested.length < 60) {
|
|
165
192
|
nested.push({
|
|
166
193
|
path: pathOf(el),
|
|
167
|
-
radius: px(
|
|
194
|
+
radius: { value: s.borderTopLeftRadius, width: px(r.width), height: px(r.height) },
|
|
168
195
|
padding: sides(s, 'padding'),
|
|
169
196
|
})
|
|
170
197
|
}
|
|
@@ -215,7 +242,7 @@ export function measureAnchor(root: Element): Reading {
|
|
|
215
242
|
box: { width: px(rect.width), height: px(rect.height) },
|
|
216
243
|
padding: sides(cs, 'padding'),
|
|
217
244
|
gap,
|
|
218
|
-
radius: px(
|
|
245
|
+
radius: { value: cs.borderTopLeftRadius, width: px(rect.width), height: px(rect.height) },
|
|
219
246
|
borderWidth: widest,
|
|
220
247
|
fontSizes: [...fontSizes].toSorted((a, b) => a - b),
|
|
221
248
|
nested,
|
package/src/cli/shot/types.ts
CHANGED
|
@@ -32,10 +32,11 @@ export type Measurement = {
|
|
|
32
32
|
box: { width: number; height: number }
|
|
33
33
|
padding: Sides
|
|
34
34
|
gap: { row: number; column: number }
|
|
35
|
-
radius
|
|
35
|
+
/** px, or `'full'` for a radius that rounds the box completely (`50%`, `9999px`). */
|
|
36
|
+
radius: number | 'full'
|
|
36
37
|
borderWidth: number
|
|
37
38
|
fontSizes: number[]
|
|
38
|
-
nested: { path: string; radius: number; padding: Sides }[]
|
|
39
|
+
nested: { path: string; radius: number | 'full'; padding: Sides }[]
|
|
39
40
|
emptyRatio: number
|
|
40
41
|
/** `min` is null when the anchor holds no text. */
|
|
41
42
|
contrast: {
|
|
@@ -81,7 +81,10 @@ export function SettingsSection({
|
|
|
81
81
|
return (
|
|
82
82
|
<Card
|
|
83
83
|
className={cx(classNames?.root, className)}
|
|
84
|
-
style={{
|
|
84
|
+
style={{
|
|
85
|
+
padding: 'var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)',
|
|
86
|
+
...style,
|
|
87
|
+
}}
|
|
85
88
|
>
|
|
86
89
|
<div className={cx(classes.header, classNames?.header)}>
|
|
87
90
|
<WidgetHeader
|
|
@@ -155,7 +158,7 @@ export function DangerZone({
|
|
|
155
158
|
<Card
|
|
156
159
|
className={cx(classNames?.root, className)}
|
|
157
160
|
style={{
|
|
158
|
-
padding: 'var(--
|
|
161
|
+
padding: 'var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)',
|
|
159
162
|
boxShadow: `${VX.shadowCard}, 0 0 0 1px ${alpha(VX.status.bad, 0.25)}`,
|
|
160
163
|
...style,
|
|
161
164
|
}}
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
|
|
124
124
|
.sparklineBleed {
|
|
125
125
|
margin-top: auto;
|
|
126
|
-
margin-inline: calc(-1 * var(--
|
|
127
|
-
margin-bottom: calc(-1 * var(--
|
|
126
|
+
margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
|
|
127
|
+
margin-bottom: calc(-1 * var(--vx-space-card-inset-y, 0.75rem));
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
/* Asks for `StatCard`'s `SPARKLINE_RIGHT_WIDTH`/`_HEIGHT` (handed down as custom properties, so this
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
flex: none;
|
|
160
160
|
align-self: stretch;
|
|
161
161
|
margin-top: auto;
|
|
162
|
-
margin-inline: calc(-1 * var(--
|
|
163
|
-
margin-bottom: calc(-1 * var(--
|
|
162
|
+
margin-inline: calc(-1 * var(--vx-space-card-inset-x, 1rem));
|
|
163
|
+
margin-bottom: calc(-1 * var(--vx-space-card-inset-y, 0.75rem));
|
|
164
164
|
}
|
|
165
165
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* StatCard — the KPI atom (docs/DESIGN-SPEC.md §5, docs/CONTROLS-SPEC.md §2.2): a panel +
|
|
3
|
-
* shadow-card + card-radius card (spacing
|
|
3
|
+
* shadow-card + card-radius card (spacing sm/md inset, no min-height — the content states the
|
|
4
4
|
* height, ~88-96px for the title/hero/trend shape). The header composes
|
|
5
5
|
* `WidgetHeader tier="widget"` — title/icon/value/delta/deltaPeriod all render through it, on the
|
|
6
6
|
* shared hero-metric row under the title. `actions` (e.g. a ghost "..." menu trigger) is wrapped in
|
|
@@ -400,24 +400,24 @@ export function StatCard({
|
|
|
400
400
|
<Card
|
|
401
401
|
className={cx(classNames?.root, className)}
|
|
402
402
|
style={{
|
|
403
|
-
// Card inset = the `cardInsetY`/`cardInsetX` role tokens (
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
// the full-bleed sparkline to the card's rounded corners
|
|
410
|
-
// renders outside its border box and is NOT clipped by its own
|
|
411
|
-
// shadow-card ring is unaffected (verified — only an ANCESTOR's overflow
|
|
412
|
-
// descendant's shadow). Mantine's Card root already sets `overflow: hidden`; this
|
|
413
|
-
// explicit for intent.
|
|
403
|
+
// Card inset = the `cardInsetY`/`cardInsetX` role tokens (12/16 at level 0, the `sm`/`md`
|
|
404
|
+
// rungs of the spacing grid), matching every other basalt card because `ChartCard` reads
|
|
405
|
+
// the SAME two vars. Below `sm` the horizontal one steps a rung down (to 12) on its own:
|
|
406
|
+
// the responsive half of the ladder lives in `spaceMobileDecls` (`tokens/index.ts`), which
|
|
407
|
+
// is the only home that can reach an inline style like this one.
|
|
408
|
+
//
|
|
409
|
+
// `overflow: hidden` clips the full-bleed sparkline to the card's rounded corners. An
|
|
410
|
+
// element's own `box-shadow` renders outside its border box and is NOT clipped by its own
|
|
411
|
+
// `overflow`, so the shadow-card ring is unaffected (verified — only an ANCESTOR's overflow
|
|
412
|
+
// clips a descendant's shadow). Mantine's Card root already sets `overflow: hidden`; this
|
|
413
|
+
// is explicit for intent.
|
|
414
414
|
//
|
|
415
415
|
// NO `minHeight`. It was 118px, which is ~25px of dead space under a card holding a title
|
|
416
416
|
// row, a hero row and a 26px trend — and it was dead space the card could not use, since the
|
|
417
417
|
// body is `height: 100%` and the sparkline is `margin-top: auto`. The content is what states
|
|
418
418
|
// the height now (~88-96px), and four cards in a `SimpleGrid` still match because a grid row
|
|
419
419
|
// stretches its items.
|
|
420
|
-
padding: 'var(--vx-space-card-inset-y, 0.
|
|
420
|
+
padding: 'var(--vx-space-card-inset-y, 0.75rem) var(--vx-space-card-inset-x, 1rem)',
|
|
421
421
|
overflow: 'hidden',
|
|
422
422
|
// Anchors the tone rail. Set unconditionally so a card's stacking context does not change
|
|
423
423
|
// depending on whether it happens to have crossed a threshold this render.
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
|
|
103
103
|
/*
|
|
104
104
|
* The icon slot PINS its glyph's box. A consumer's icon arrives at whatever size its own component
|
|
105
|
-
* chose (the playground's is 18px), and an 18px mark beside a
|
|
105
|
+
* chose (the playground's is 18px), and an 18px mark beside a 13px title is a bullet, not a label
|
|
106
106
|
* icon — so the tier states the size here rather than asking every call site to pass one.
|
|
107
107
|
*/
|
|
108
108
|
/*
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
overflow-wrap: anywhere;
|
|
175
175
|
font-family: var(--basalt-font-mono);
|
|
176
176
|
font-size: var(--vx-text-kpi);
|
|
177
|
-
font-weight:
|
|
177
|
+
font-weight: 500;
|
|
178
178
|
letter-spacing: -0.02em;
|
|
179
179
|
color: var(--vx-ink);
|
|
180
180
|
}
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
z-index: 10;
|
|
289
289
|
width: max-content;
|
|
290
290
|
max-width: 260px;
|
|
291
|
-
padding:
|
|
291
|
+
padding: var(--vx-space-stack-sm) var(--vx-space-row-inset-x);
|
|
292
292
|
border-radius: var(--vx-radius-card);
|
|
293
293
|
background-color: var(--vx-surface-panel);
|
|
294
294
|
box-shadow: var(--vx-shadow-card);
|
package/src/guard/guard-hook.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* guard-hook — pure helpers for the Claude Code PreToolUse hook adapter.
|
|
3
|
-
* Mantine-free
|
|
3
|
+
* Mantine-free and light: no non-type imports beyond guard internals and dependency-free leaves
|
|
4
|
+
* (`tokens/space-scale`), never `tokens/palette` or `derive` (their colour math would load on every
|
|
5
|
+
* Write/Edit).
|
|
4
6
|
*/
|
|
5
7
|
import { checkSource } from './index'
|
|
6
8
|
import type { GuardConfig } from './types'
|
package/src/guard/index.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* ./guard — headless policy core. Mantine-free
|
|
2
|
+
* ./guard — headless policy core. Mantine-free and light: it may import dependency-free leaves
|
|
3
|
+
* (`tokens/space-scale`, `common/*`), never `tokens/palette` or `derive` (colour math on every
|
|
4
|
+
* Write/Edit).
|
|
3
5
|
*
|
|
4
6
|
* GUARD_RULES: the closed registry of all 26 violation kinds.
|
|
5
7
|
* checkSource: pure (text, relPath, cfg) → Finding[]. No FS, no walk, no console.
|
|
@@ -9,6 +11,7 @@ import { vxFamilyOf } from '../common/vx-family'
|
|
|
9
11
|
import { BASALT_VX_FAMILIES } from '../common/vx-families'
|
|
10
12
|
import { FONTS_CSS_HINT } from './fonts-hint'
|
|
11
13
|
import { BASALT_VX_NAMES } from './vx-names'
|
|
14
|
+
import { SPACE_SCALE_LEVEL0 } from '../tokens/space-scale'
|
|
12
15
|
|
|
13
16
|
export type { Finding, GuardConfig, GuardKind, GuardSeverity }
|
|
14
17
|
|
|
@@ -192,7 +195,7 @@ const DECLARED_CONTAINER_NAMES = new Set(['basalt-card', 'basalt-form', 'basalt-
|
|
|
192
195
|
|
|
193
196
|
/**
|
|
194
197
|
* `CONTAINER_CLASSES` (`src/tokens/size-classes.ts`) boundaries, duplicated per the `CTL_THEME_TAGS`
|
|
195
|
-
* convention in the oxlint plugin — this module
|
|
198
|
+
* convention in the oxlint plugin — this module keeps to the leaves its file header names and
|
|
196
199
|
* must not import `../tokens`. Pinned against the real table by `check-source.test.ts`. Judged only
|
|
197
200
|
* against `basalt-card` and unnamed queries: the other declared names have no shipped numeric table
|
|
198
201
|
* yet. `0` is the container's own floor, not a class boundary, but `(width >= 0px)` is a legitimate
|
|
@@ -494,7 +497,7 @@ const INLINE_SPACING = new RegExp(
|
|
|
494
497
|
* `exemptPatternMatches`; the escape stays because a per-file exemption is still the wrong shape
|
|
495
498
|
* for a value that has no token).
|
|
496
499
|
*/
|
|
497
|
-
const MICRO_SPACING_CEILING_PX =
|
|
500
|
+
const MICRO_SPACING_CEILING_PX = SPACE_SCALE_LEVEL0.xs - 1
|
|
498
501
|
|
|
499
502
|
/**
|
|
500
503
|
* Object-literal openers that make the properties under them CSS.
|
|
@@ -812,19 +815,19 @@ const SUB_16_FONT_SIZE = /font-?[Ss]ize\s*:\s*['"]?(-?\d+(?:\.\d+)?)(?:px)?['"]?
|
|
|
812
815
|
/** Default spacing steps (px) flagged as raw spacing props. */
|
|
813
816
|
/**
|
|
814
817
|
* The `xs…xl` spacing scale, as raw numbers — what `raw-spacing` flags, because a prop value that
|
|
815
|
-
* EQUALS a step should be written as the token (`p="md"`, not `p={
|
|
818
|
+
* EQUALS a step should be written as the token (`p="md"`, not `p={16}`).
|
|
816
819
|
*
|
|
817
|
-
*
|
|
818
|
-
* the
|
|
819
|
-
*
|
|
820
|
-
*
|
|
821
|
-
* still read `[10, 12, 16, 20, 32]` after the level-0 retune, telling consumers to replace `p={16}`
|
|
822
|
-
* with a `p="md"` that resolves to 18.
|
|
820
|
+
* Read from `tokens/space-scale` — the dependency-free module the token layer's scale is defined
|
|
821
|
+
* from — so the guard cannot drift from it (a separate copy once did: it read `[10, 12, 16, 20, 32]`
|
|
822
|
+
* after a retune and told consumers to replace `p={16}` with a `p="md"` worth 18). The palette itself
|
|
823
|
+
* stays out of the hook: it would drag `derive.ts` + `hct.ts`'s colour math along.
|
|
823
824
|
*
|
|
824
825
|
* A consumer whose theme moves the scale (`createBasaltTheme({ density })`, or its own overrides)
|
|
825
826
|
* sets `basalt.spacingSteps` in package.json rather than living with this default.
|
|
826
827
|
*/
|
|
827
|
-
const DEFAULT_SPACING_STEPS: readonly number[] =
|
|
828
|
+
const DEFAULT_SPACING_STEPS: readonly number[] = Object.values(SPACE_SCALE_LEVEL0).toSorted(
|
|
829
|
+
(a, b) => a - b,
|
|
830
|
+
)
|
|
828
831
|
/** Default off-identity Mantine accent families. */
|
|
829
832
|
const DEFAULT_FORBIDDEN_ACCENTS: readonly string[] = ['teal', 'violet', 'grape', 'indigo', 'pink']
|
|
830
833
|
|
|
@@ -897,7 +900,18 @@ export type GraceEntry = { since: string; promote: string; why: string }
|
|
|
897
900
|
* 'raw-font-family': { since: '1.4.0', promote: '1.5.0', why: 'introduced 1.4.0 — …' },
|
|
898
901
|
* }
|
|
899
902
|
*/
|
|
900
|
-
export const GRACE_PERIOD_KINDS: Partial<Record<GuardKind, GraceEntry>> = {
|
|
903
|
+
export const GRACE_PERIOD_KINDS: Partial<Record<GuardKind, GraceEntry>> = {
|
|
904
|
+
'raw-spacing': {
|
|
905
|
+
since: '2.16.0',
|
|
906
|
+
promote: '2.17.0',
|
|
907
|
+
why: 'The spacing scale moved to 8/12/16/20/24 in 2.16.0: a prop value equal to a NEW step (p={16}) is newly a finding.',
|
|
908
|
+
},
|
|
909
|
+
'inline-spacing': {
|
|
910
|
+
since: '2.16.0',
|
|
911
|
+
promote: '2.17.0',
|
|
912
|
+
why: 'The scale moved to 8/12/16/20/24 and the CSS micro ceiling dropped 10 → 7 in 2.16.0: a literal 8px/10px in CSS is newly a finding.',
|
|
913
|
+
},
|
|
914
|
+
}
|
|
901
915
|
|
|
902
916
|
/** A kind's effective severity: consumer override first, then the grace table, then `error`. */
|
|
903
917
|
function severityOf(kind: GuardKind, cfg: GuardConfig): GuardSeverity {
|
|
@@ -2058,7 +2072,7 @@ export const GUARD_RULES = {
|
|
|
2058
2072
|
// JSX-tag-shaped (`<Card withBorder>`) — never appears in CSS text.
|
|
2059
2073
|
appliesTo: (relPath) => !relPath.endsWith('.css'),
|
|
2060
2074
|
message:
|
|
2061
|
-
'withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py="
|
|
2075
|
+
'withBorder on a Card/Paper double-draws the edge — card depth is --vx-shadow-card, which already bakes a 1px ring into the shadow. Drop the prop (docs/DESIGN-SPEC.md doctrine inversion #1) — and fix the inset in the same edit: an explicit p/padding or radius on that Card/Paper is the other half of the idiom, which only the oxlint lane sees (basalt/card-inset); leave both to the theme or use py="sm" px="md".',
|
|
2062
2076
|
},
|
|
2063
2077
|
'off-system-surface-var': {
|
|
2064
2078
|
kind: 'off-system-surface-var',
|
package/src/guard/vx-names.ts
CHANGED
|
@@ -111,6 +111,7 @@ export const BASALT_VX_NAMES: readonly string[] = [
|
|
|
111
111
|
'--vx-space-control-gap',
|
|
112
112
|
'--vx-space-control-height',
|
|
113
113
|
'--vx-space-control-height-ctl',
|
|
114
|
+
'--vx-space-control-height-dense',
|
|
114
115
|
'--vx-space-control-height-tag',
|
|
115
116
|
'--vx-space-control-height-widget',
|
|
116
117
|
'--vx-space-guide-body-gap-bottom',
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
.menuItem :global(.mantine-Menu-itemLabel) {
|
|
161
|
-
font-size: var(--mantine-font-size-
|
|
161
|
+
font-size: var(--mantine-font-size-sm) !important;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/* An active destination reads the same in the More surface as it does in the sheet. */
|
|
@@ -245,7 +245,7 @@
|
|
|
245
245
|
* touch target with a `min-height` floor and symmetric inset, so growing one side of it would make
|
|
246
246
|
* that row read as a different size from its siblings. */
|
|
247
247
|
.menuDropdown .menuSectionStart {
|
|
248
|
-
margin-top:
|
|
248
|
+
margin-top: var(--vx-space-stack-sm);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
/*
|
|
@@ -113,7 +113,7 @@ export function SidebarAccount(props: BasaltAccountProps & BasaltProps) {
|
|
|
113
113
|
<span className={classes.footerIconSlot}>
|
|
114
114
|
<IconUser />
|
|
115
115
|
</span>
|
|
116
|
-
<Text className={classes.accountText} fz={VX.text.
|
|
116
|
+
<Text className={classes.accountText} fz={VX.text.sm}>
|
|
117
117
|
Sign in
|
|
118
118
|
</Text>
|
|
119
119
|
</UnstyledButton>
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.link {
|
|
38
|
-
font-size: var(--vx-text-
|
|
38
|
+
font-size: var(--vx-text-sm);
|
|
39
39
|
border-radius: var(--vx-radius-ctrl) !important;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.link :global(.mantine-NavLink-label) {
|
|
43
|
-
font-size: var(--vx-text-
|
|
43
|
+
font-size: var(--vx-text-sm);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.link :global(.mantine-NavLink-section[data-position='left']) {
|
|
@@ -229,8 +229,8 @@
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
/*
|
|
232
|
-
* Footer settings row — IDENTICAL geometry to a nav row (
|
|
233
|
-
*
|
|
232
|
+
* Footer settings row — IDENTICAL geometry to a nav row (the row inset tokens, control radius, nav
|
|
233
|
+
* icon gap, `sm` type): muted text + faint icon at rest, ink-6% tint + ink on hover, exactly like an inactive
|
|
234
234
|
* nav item, so the footer never reads as a separate control family.
|
|
235
235
|
*/
|
|
236
236
|
.footerBtn {
|
|
@@ -241,7 +241,7 @@
|
|
|
241
241
|
gap: var(--vx-space-nav-icon-gap);
|
|
242
242
|
padding: var(--vx-space-row-inset-y) var(--vx-space-row-inset-x);
|
|
243
243
|
border-radius: var(--vx-radius-ctrl);
|
|
244
|
-
font-size: var(--vx-text-
|
|
244
|
+
font-size: var(--vx-text-sm);
|
|
245
245
|
/* The nav row's line-height, so a footer row is exactly as tall as a nav row (Mantine's `Text`
|
|
246
246
|
* would otherwise bring its own 1.55 and add ~3px). */
|
|
247
247
|
line-height: var(--vx-space-row-line-height);
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
|
|
330
330
|
/* Identity name — weight 600, ink. */
|
|
331
331
|
.accountName {
|
|
332
|
-
font-size: var(--vx-text-
|
|
332
|
+
font-size: var(--vx-text-sm);
|
|
333
333
|
font-weight: 600;
|
|
334
334
|
color: var(--vx-ink);
|
|
335
335
|
}
|
|
@@ -644,7 +644,7 @@
|
|
|
644
644
|
}
|
|
645
645
|
|
|
646
646
|
.childList :global(.mantine-NavLink-label) {
|
|
647
|
-
font-size: var(--vx-text-
|
|
647
|
+
font-size: var(--vx-text-xs);
|
|
648
648
|
}
|
|
649
649
|
|
|
650
650
|
/*
|
|
@@ -689,7 +689,7 @@
|
|
|
689
689
|
}
|
|
690
690
|
|
|
691
691
|
.subnavDropdown :global(.mantine-NavLink-label) {
|
|
692
|
-
font-size: var(--vx-text-
|
|
692
|
+
font-size: var(--vx-text-sm);
|
|
693
693
|
}
|
|
694
694
|
|
|
695
695
|
/*
|
|
@@ -519,7 +519,7 @@ export function AppSidebar(props: AppSidebarProps) {
|
|
|
519
519
|
target. `SettingsMenuItem.icon` stays optional; supply one per row in the flat form
|
|
520
520
|
and the gear never appears. */}
|
|
521
521
|
<span className={classes.footerIconSlot}>{entry.icon ?? <IconGear />}</span>
|
|
522
|
-
<Text className={classes.footerText} fz={VX.text.
|
|
522
|
+
<Text className={classes.footerText} fz={VX.text.sm}>
|
|
523
523
|
{entry.label}
|
|
524
524
|
</Text>
|
|
525
525
|
{/* The rail ring rides the FIRST row only — one progress block is one mark. */}
|
|
@@ -539,7 +539,7 @@ export function AppSidebar(props: AppSidebarProps) {
|
|
|
539
539
|
<Menu.Target>
|
|
540
540
|
<UnstyledButton className={classes.footerBtn} aria-label="Settings">
|
|
541
541
|
<IconGear />
|
|
542
|
-
<Text className={classes.footerText} fz={VX.text.
|
|
542
|
+
<Text className={classes.footerText} fz={VX.text.sm}>
|
|
543
543
|
Settings
|
|
544
544
|
</Text>
|
|
545
545
|
{ringMark}
|
package/src/shell/index.tsx
CHANGED
|
@@ -390,9 +390,9 @@ function ShellBody({
|
|
|
390
390
|
// `appShellInset` / `appShellInsetMobile` pair (see their entries in `tokens/palette.ts`).
|
|
391
391
|
//
|
|
392
392
|
// On a 390px phone that is 8 a side instead of 13 — 10px more line width, and 10px less vertical
|
|
393
|
-
// chrome, since `padding` is Main's vertical inset too. From `sm` up it is
|
|
394
|
-
//
|
|
395
|
-
//
|
|
393
|
+
// chrome, since `padding` is Main's vertical inset too. From `sm` up it is 16, and 24 from the
|
|
394
|
+
// expanded class (`appShellInsetExpanded`, a trial: SPEC D7). The gutter is not aligned to the
|
|
395
|
+
// sidebar's nav-icon column (x=20); the header's brand zone aligns to that column on its own.
|
|
396
396
|
//
|
|
397
397
|
// VERIFIED against the installed Mantine 9.3 source, because both props take the object by a
|
|
398
398
|
// DIFFERENT road and both had to be checked:
|
|
@@ -406,7 +406,13 @@ function ShellBody({
|
|
|
406
406
|
// `calc(0.5rem * var(--mantine-scale))` — rather than looked up, which is exactly why these are
|
|
407
407
|
// numbers: a spacing KEY resolves to `var(--mantine-spacing-sm)` and hands the gutter back to
|
|
408
408
|
// Mantine's own scale, which is where the 13px came from.
|
|
409
|
-
|
|
409
|
+
//
|
|
410
|
+
// `md` is the expanded class's boundary (`SIZE_CLASS_BREAKPOINTS`): the gutter widens there only.
|
|
411
|
+
const inset = {
|
|
412
|
+
base: step.appShellInsetMobile,
|
|
413
|
+
sm: step.appShellInset,
|
|
414
|
+
md: step.appShellInsetExpanded,
|
|
415
|
+
}
|
|
410
416
|
const aside = useAsideRegion()
|
|
411
417
|
const sizeClass = useSizeClass()
|
|
412
418
|
const [storedCollapsed, setStoredCollapsed, collapseIsSet] = collapseStore(storageKey)()
|
package/src/shell/page-bar.tsx
CHANGED
|
@@ -486,7 +486,7 @@ export function PageBar({
|
|
|
486
486
|
</div>
|
|
487
487
|
)}
|
|
488
488
|
{hasPills && (
|
|
489
|
-
<div className={classes.pills} data-basalt-page-bar-line="pills">
|
|
489
|
+
<div className={classes.pills} data-basalt-page-bar-line="pills" data-basalt-dense>
|
|
490
490
|
{filters !== undefined && (
|
|
491
491
|
<div className={classes.filters}>
|
|
492
492
|
<CtlSlot>{filters}</CtlSlot>
|
package/src/table/data-table.tsx
CHANGED
|
@@ -1008,15 +1008,20 @@ const TABLE_TOOLBAR_STYLE: CSSProperties = { flex: '0 1 auto', minWidth: 0 }
|
|
|
1008
1008
|
* narrow one, for the same one-word query. A stated width also makes the toolbar's own minimum width
|
|
1009
1009
|
* knowable, which is what lets it wrap under the title below `sm` with no media query.
|
|
1010
1010
|
*
|
|
1011
|
-
*
|
|
1012
|
-
* is available and lets it shrink where it is not, floored at `12ch` (a legible
|
|
1013
|
-
* search glyph) and capped at `100%` so it can never be the box that outgrows its
|
|
1014
|
-
* `
|
|
1011
|
+
* The field states a BASIS and a `width`, both `SEARCH_WIDTH`: `flex: 0 1 <SEARCH_WIDTH>px` holds it
|
|
1012
|
+
* at 220px wherever 220 is available and lets it shrink where it is not, floored at `12ch` (a legible
|
|
1013
|
+
* query plus the search glyph) and capped at `100%` so it can never be the box that outgrows its
|
|
1014
|
+
* column. The `width` is the field's intrinsic contribution: the toolbar is sized by its items'
|
|
1015
|
+
* max-content, and an input's own (~196px) came out short of the basis, which wrapped the facet pills
|
|
1016
|
+
* under the search at 1440. It is no floor — `min-width: 12ch` is. A literal `w={220}` in a 302px
|
|
1017
|
+
* column was half of the overflow above.
|
|
1015
1018
|
*/
|
|
1016
1019
|
const SEARCH_WIDTH = 220
|
|
1017
1020
|
/** How long the global search waits after the last keystroke before filtering. */
|
|
1018
1021
|
const SEARCH_DEBOUNCE_MS = 250
|
|
1019
1022
|
const TABLE_SEARCH_STYLE: CSSProperties = {
|
|
1023
|
+
// `width` as well as the basis — see the `SEARCH_WIDTH` JSDoc.
|
|
1024
|
+
width: SEARCH_WIDTH,
|
|
1020
1025
|
flex: `0 1 ${SEARCH_WIDTH}px`,
|
|
1021
1026
|
minWidth: '12ch',
|
|
1022
1027
|
maxWidth: '100%',
|
|
@@ -2022,6 +2027,7 @@ export function BasaltDataTable<T extends RowData>(props: BasaltDataTableProps<T
|
|
|
2022
2027
|
<CtlSlot>
|
|
2023
2028
|
<Group
|
|
2024
2029
|
className={cx(classNames?.toolbar)}
|
|
2030
|
+
data-basalt-dense
|
|
2025
2031
|
gap="xs"
|
|
2026
2032
|
wrap="wrap"
|
|
2027
2033
|
align="center"
|