basalt-ui 2.19.0 → 2.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +89 -0
- package/MIGRATING.md +291 -12
- package/agent/agents/basalt-design-reviewer.md +22 -5
- package/agent/rules/basalt-charts.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/agent/rules/basalt-tokens.md +2 -2
- package/agent/skills/basalt-app/SKILL.md +1 -1
- package/agent/skills/basalt-design/SKILL.md +10 -23
- package/agent/skills/basalt-design/references/anti-defaults.md +24 -0
- package/agent/skills/basalt-design/references/catalogue.md +48 -0
- package/agent/skills/basalt-design/references/concept.md +36 -0
- package/agent/skills/basalt-design/references/encoding-rules.md +45 -0
- package/agent/skills/basalt-design/references/stat-tile.md +24 -0
- package/agent/templates/AGENTS-block.md.tpl +3 -3
- package/agent/templates/DESIGN.md.tpl +1 -1
- package/configs/oxlint-plugin.js +34 -19
- package/configs/oxlint-plugin.test.ts +32 -2
- package/dist/charts/ChartCard.d.ts +33 -4
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +37 -11
- package/dist/charts/Donut.d.ts.map +1 -1
- package/dist/charts/Donut.js +13 -1
- package/dist/charts/Heatmap.js +1 -1
- package/dist/charts/Sparkline.d.ts +7 -1
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +137 -18
- package/dist/charts/box.d.ts +2 -0
- package/dist/charts/box.d.ts.map +1 -1
- package/dist/charts/box.js +2 -0
- package/dist/charts/chart-box.module.css +30 -0
- package/dist/charts/chart-box.module.css.d.ts +1 -0
- package/dist/charts/chart-card.module.css +47 -0
- package/dist/charts/chart-card.module.css.d.ts +7 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +35 -8
- package/dist/charts/host.d.ts.map +1 -1
- package/dist/charts/host.js +2 -1
- package/dist/charts/index.d.ts +1 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/sparkline.module.css +59 -0
- package/dist/charts/sparkline.module.css.d.ts +13 -0
- package/dist/charts/state.d.ts +5 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +34 -4
- package/dist/charts/types.d.ts +6 -0
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/check-theme.d.ts.map +1 -1
- package/dist/cli/check-theme.js +3 -0
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +3 -2
- package/dist/cli/index.d.ts +4 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +27 -15
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +3 -2
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +6 -1
- package/dist/cli/shot/detect.d.ts +51 -0
- package/dist/cli/shot/detect.d.ts.map +1 -0
- package/dist/cli/shot/detect.js +396 -0
- package/dist/cli/shot/index.d.ts.map +1 -1
- package/dist/cli/shot/index.js +7 -4
- package/dist/cli/shot/measure.d.ts +2 -0
- package/dist/cli/shot/measure.d.ts.map +1 -1
- package/dist/cli/shot/measure.js +2 -0
- package/dist/cli/shot/types.d.ts +4 -1
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/shot/types.js +2 -0
- package/dist/cli/sync.d.ts +2 -0
- package/dist/cli/sync.d.ts.map +1 -1
- package/dist/cli/sync.js +2 -2
- package/dist/common/retry-button.d.ts +12 -0
- package/dist/common/retry-button.d.ts.map +1 -0
- package/dist/common/retry-button.js +22 -0
- package/dist/common/retry-button.module.css +58 -0
- package/dist/common/retry-button.module.css.d.ts +8 -0
- package/dist/controls/sync-button.d.ts +3 -0
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/dashboard/bar-list.d.ts +18 -4
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +39 -15
- package/dist/dashboard/bar-list.module.css +77 -2
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/delta-badge.d.ts +8 -3
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +9 -2
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/meter-model.d.ts +53 -6
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +62 -14
- package/dist/dashboard/meter-parts.d.ts +5 -1
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +140 -68
- package/dist/dashboard/meter.d.ts +29 -4
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +8 -1
- package/dist/dashboard/meter.module.css +74 -43
- package/dist/dashboard/meter.module.css.d.ts +4 -4
- package/dist/dashboard/query-state.d.ts +1 -1
- package/dist/dashboard/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +16 -10
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +14 -25
- package/dist/dashboard/stat-card-parts.js +1 -1
- package/dist/dashboard/stat-card.d.ts +1 -1
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +5 -7
- package/dist/dashboard/stat-card.module.css +15 -7
- package/dist/dashboard/stat-group.d.ts +11 -2
- package/dist/dashboard/stat-group.d.ts.map +1 -1
- package/dist/dashboard/stat-group.js +9 -7
- package/dist/dashboard/stat-strip.d.ts +67 -0
- package/dist/dashboard/stat-strip.d.ts.map +1 -0
- package/dist/dashboard/stat-strip.js +115 -0
- package/dist/dashboard/stat-strip.module.css +291 -0
- package/dist/dashboard/stat-strip.module.css.d.ts +32 -0
- package/dist/dashboard/visual-slot.d.ts +2 -0
- package/dist/dashboard/visual-slot.d.ts.map +1 -0
- package/dist/dashboard/visual-slot.js +5 -0
- package/dist/dashboard/widget-header.d.ts +3 -3
- package/dist/dashboard/widget-header.module.css +10 -6
- package/dist/format/date.d.ts.map +1 -1
- package/dist/format/date.js +4 -3
- package/dist/format/shared.d.ts +6 -0
- package/dist/format/shared.d.ts.map +1 -1
- package/dist/format/shared.js +6 -2
- package/dist/guard/index.d.ts +16 -3
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +15 -1
- package/dist/guard/palette.d.ts +51 -0
- package/dist/guard/palette.d.ts.map +1 -0
- package/dist/guard/palette.js +190 -0
- package/dist/guard/series-file.d.ts +15 -0
- package/dist/guard/series-file.d.ts.map +1 -0
- package/dist/guard/series-file.js +29 -0
- package/dist/guard/types.d.ts +3 -3
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/styles.css +6 -0
- package/dist/surfaces.d.ts +1 -1
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +2 -0
- package/dist/theme/card-inset.module.css +76 -0
- package/dist/theme/card-inset.module.css.d.ts +9 -0
- package/dist/theme/controls.module.css +13 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +41 -0
- package/dist/theme/nav-link.module.css +8 -10
- package/dist/theme/status-dot.d.ts +3 -2
- package/dist/theme/status-dot.d.ts.map +1 -1
- package/dist/theme/status-dot.js +12 -3
- package/dist/theme/status-verdict.d.ts +3 -2
- package/dist/theme/status-verdict.d.ts.map +1 -1
- package/dist/theme/status-verdict.js +3 -2
- package/dist/theme/status-verdict.module.css +4 -2
- package/dist/tokens/oklab.d.ts +28 -0
- package/dist/tokens/oklab.d.ts.map +1 -0
- package/dist/tokens/oklab.js +73 -0
- package/llms.txt +33 -7
- package/package.json +1 -1
- package/src/charts/ChartCard.tsx +79 -5
- package/src/charts/Donut.tsx +9 -1
- package/src/charts/Heatmap.tsx +1 -1
- package/src/charts/Sparkline.tsx +180 -18
- package/src/charts/box.tsx +2 -0
- package/src/charts/chart-box.module.css +30 -0
- package/src/charts/chart-box.module.css.d.ts +1 -0
- package/src/charts/chart-card.module.css +47 -0
- package/src/charts/chart-card.module.css.d.ts +7 -0
- package/src/charts/compile.ts +42 -9
- package/src/charts/host.tsx +6 -3
- package/src/charts/index.ts +1 -1
- package/src/charts/sparkline.module.css +59 -0
- package/src/charts/sparkline.module.css.d.ts +13 -0
- package/src/charts/state.tsx +53 -4
- package/src/charts/types.ts +6 -0
- package/src/cli/check-theme.ts +3 -0
- package/src/cli/help.ts +18 -1
- package/src/cli/index.ts +48 -17
- package/src/cli/init.ts +2 -1
- package/src/cli/shot/capture.ts +15 -2
- package/src/cli/shot/detect.ts +533 -0
- package/src/cli/shot/index.ts +8 -4
- package/src/cli/shot/measure.ts +4 -0
- package/src/cli/shot/types.ts +5 -1
- package/src/cli/sync.ts +4 -2
- package/src/common/retry-button.module.css +58 -0
- package/src/common/retry-button.module.css.d.ts +8 -0
- package/src/common/retry-button.tsx +29 -0
- package/src/controls/sync-button.tsx +3 -0
- package/src/dashboard/bar-list.module.css +77 -2
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +89 -18
- package/src/dashboard/delta-badge.tsx +21 -5
- package/src/dashboard/index.ts +2 -0
- package/src/dashboard/meter-model.ts +126 -20
- package/src/dashboard/meter-parts.tsx +224 -88
- package/src/dashboard/meter.module.css +74 -43
- package/src/dashboard/meter.module.css.d.ts +4 -4
- package/src/dashboard/meter.tsx +39 -5
- package/src/dashboard/query-state.tsx +26 -20
- package/src/dashboard/settings-section.tsx +1 -8
- package/src/dashboard/stat-card-parts.tsx +1 -1
- package/src/dashboard/stat-card.module.css +15 -7
- package/src/dashboard/stat-card.tsx +9 -9
- package/src/dashboard/stat-group.tsx +19 -8
- package/src/dashboard/stat-strip.module.css +291 -0
- package/src/dashboard/stat-strip.module.css.d.ts +32 -0
- package/src/dashboard/stat-strip.tsx +263 -0
- package/src/dashboard/visual-slot.ts +8 -0
- package/src/dashboard/widget-header.module.css +10 -6
- package/src/dashboard/widget-header.tsx +3 -3
- package/src/format/date.ts +6 -3
- package/src/format/shared.ts +11 -2
- package/src/guard/index.ts +17 -5
- package/src/guard/palette.ts +261 -0
- package/src/guard/series-file.ts +51 -0
- package/src/guard/types.ts +3 -2
- package/src/index.ts +7 -0
- package/src/styles.css +6 -0
- package/src/surfaces.ts +2 -0
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +202 -24
- package/src/theme/card-inset.module.css +76 -0
- package/src/theme/card-inset.module.css.d.ts +9 -0
- package/src/theme/controls.module.css +13 -0
- package/src/theme/index.ts +56 -0
- package/src/theme/nav-link.module.css +8 -10
- package/src/theme/status-dot.tsx +17 -5
- package/src/theme/status-verdict.module.css +4 -2
- package/src/theme/status-verdict.tsx +9 -4
- package/src/tokens/oklab.ts +97 -0
|
@@ -293,6 +293,8 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
293
293
|
return {
|
|
294
294
|
root: {
|
|
295
295
|
"--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
|
|
296
|
+
"--button-padding-x": buttonPaddingX(props.size),
|
|
297
|
+
"--button-section-padding-x": buttonSectionX(props.size),
|
|
296
298
|
"--button-color": ink.color,
|
|
297
299
|
"--button-hover": ink.hover,
|
|
298
300
|
"--button-bg": ink.bg,
|
|
@@ -303,41 +305,125 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
303
305
|
,
|
|
304
306
|
"outputs": [
|
|
305
307
|
{
|
|
306
|
-
"probes":
|
|
307
|
-
"result": "{"root":{}}",
|
|
308
|
+
"probes": 542,
|
|
309
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))"}}",
|
|
308
310
|
},
|
|
309
311
|
{
|
|
310
|
-
"probes":
|
|
311
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
312
|
+
"probes": 12,
|
|
313
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
312
314
|
},
|
|
313
315
|
{
|
|
314
|
-
"probes":
|
|
315
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
316
|
+
"probes": 12,
|
|
317
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
316
318
|
},
|
|
317
319
|
{
|
|
318
|
-
"probes":
|
|
319
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
320
|
+
"probes": 12,
|
|
321
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"probes": 270,
|
|
325
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))"}}",
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"probes": 6,
|
|
329
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"probes": 6,
|
|
333
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"probes": 6,
|
|
337
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
320
338
|
},
|
|
321
339
|
{
|
|
322
340
|
"probes": 272,
|
|
323
|
-
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))"}}",
|
|
341
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))"}}",
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"probes": 6,
|
|
345
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"probes": 6,
|
|
349
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"probes": 6,
|
|
353
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"probes": 270,
|
|
357
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))"}}",
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
"probes": 6,
|
|
361
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
"probes": 6,
|
|
365
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"probes": 6,
|
|
369
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"probes": 270,
|
|
373
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))"}}",
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"probes": 6,
|
|
377
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
324
378
|
},
|
|
325
379
|
{
|
|
326
380
|
"probes": 6,
|
|
327
|
-
"result": "{"root":{"--button-
|
|
381
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
328
382
|
},
|
|
329
383
|
{
|
|
330
384
|
"probes": 6,
|
|
331
|
-
"result": "{"root":{"--button-
|
|
385
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"probes": 270,
|
|
389
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))"}}",
|
|
332
390
|
},
|
|
333
391
|
{
|
|
334
392
|
"probes": 6,
|
|
335
|
-
"result": "{"root":{"--button-
|
|
393
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
"probes": 6,
|
|
397
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"probes": 6,
|
|
401
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"probes": 270,
|
|
405
|
+
"result": "{"root":{}}",
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"probes": 6,
|
|
409
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"probes": 6,
|
|
413
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"probes": 6,
|
|
417
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
336
418
|
},
|
|
337
419
|
],
|
|
338
420
|
},
|
|
339
421
|
},
|
|
340
422
|
"Card": {
|
|
423
|
+
"classNames": {
|
|
424
|
+
"root": undefined,
|
|
425
|
+
"section": undefined,
|
|
426
|
+
},
|
|
341
427
|
"styles": {
|
|
342
428
|
"root": {
|
|
343
429
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
@@ -648,6 +734,9 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
648
734
|
},
|
|
649
735
|
},
|
|
650
736
|
"Paper": {
|
|
737
|
+
"classNames": {
|
|
738
|
+
"root": undefined,
|
|
739
|
+
},
|
|
651
740
|
"styles": {
|
|
652
741
|
"root": {
|
|
653
742
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
@@ -1471,6 +1560,8 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1471
1560
|
return {
|
|
1472
1561
|
root: {
|
|
1473
1562
|
"--button-height": props.size === "md" ? "calc(var(--vx-space-control-height) * var(--mantine-scale))" : void 0,
|
|
1563
|
+
"--button-padding-x": buttonPaddingX(props.size),
|
|
1564
|
+
"--button-section-padding-x": buttonSectionX(props.size),
|
|
1474
1565
|
"--button-color": ink.color,
|
|
1475
1566
|
"--button-hover": ink.hover,
|
|
1476
1567
|
"--button-bg": ink.bg,
|
|
@@ -1481,41 +1572,125 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1481
1572
|
,
|
|
1482
1573
|
"outputs": [
|
|
1483
1574
|
{
|
|
1484
|
-
"probes":
|
|
1485
|
-
"result": "{"root":{}}",
|
|
1575
|
+
"probes": 542,
|
|
1576
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))"}}",
|
|
1486
1577
|
},
|
|
1487
1578
|
{
|
|
1488
|
-
"probes":
|
|
1489
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1579
|
+
"probes": 12,
|
|
1580
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1490
1581
|
},
|
|
1491
1582
|
{
|
|
1492
|
-
"probes":
|
|
1493
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1583
|
+
"probes": 12,
|
|
1584
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1494
1585
|
},
|
|
1495
1586
|
{
|
|
1496
|
-
"probes":
|
|
1497
|
-
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1587
|
+
"probes": 12,
|
|
1588
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1589
|
+
},
|
|
1590
|
+
{
|
|
1591
|
+
"probes": 270,
|
|
1592
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))"}}",
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"probes": 6,
|
|
1596
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"probes": 6,
|
|
1600
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"probes": 6,
|
|
1604
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1498
1605
|
},
|
|
1499
1606
|
{
|
|
1500
1607
|
"probes": 272,
|
|
1501
|
-
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))"}}",
|
|
1608
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))"}}",
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"probes": 6,
|
|
1612
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1613
|
+
},
|
|
1614
|
+
{
|
|
1615
|
+
"probes": 6,
|
|
1616
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"probes": 6,
|
|
1620
|
+
"result": "{"root":{"--button-height":"calc(var(--vx-space-control-height) * var(--mantine-scale))","--button-padding-x":"calc((var(--vx-space-stack-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-md) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"probes": 270,
|
|
1624
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))"}}",
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
"probes": 6,
|
|
1628
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1629
|
+
},
|
|
1630
|
+
{
|
|
1631
|
+
"probes": 6,
|
|
1632
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"probes": 6,
|
|
1636
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-lg) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1637
|
+
},
|
|
1638
|
+
{
|
|
1639
|
+
"probes": 270,
|
|
1640
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))"}}",
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"probes": 6,
|
|
1644
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1502
1645
|
},
|
|
1503
1646
|
{
|
|
1504
1647
|
"probes": 6,
|
|
1505
|
-
"result": "{"root":{"--button-
|
|
1648
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1506
1649
|
},
|
|
1507
1650
|
{
|
|
1508
1651
|
"probes": 6,
|
|
1509
|
-
"result": "{"root":{"--button-
|
|
1652
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl) + var(--vx-space-stack-sm)) * var(--mantine-scale))","--button-section-padding-x":"calc(var(--vx-space-stack-xl) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"probes": 270,
|
|
1656
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))"}}",
|
|
1510
1657
|
},
|
|
1511
1658
|
{
|
|
1512
1659
|
"probes": 6,
|
|
1513
|
-
"result": "{"root":{"--button-
|
|
1660
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1661
|
+
},
|
|
1662
|
+
{
|
|
1663
|
+
"probes": 6,
|
|
1664
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"probes": 6,
|
|
1668
|
+
"result": "{"root":{"--button-section-padding-x":"calc(var(--vx-space-stack-sm) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
"probes": 270,
|
|
1672
|
+
"result": "{"root":{}}",
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"probes": 6,
|
|
1676
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, var(--vx-surface-subtle))","--button-bg":"var(--vx-surface-subtle)"}}",
|
|
1677
|
+
},
|
|
1678
|
+
{
|
|
1679
|
+
"probes": 6,
|
|
1680
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"var(--vx-surface-subtle)","--button-bd":"calc(0.0625rem * var(--mantine-scale)) solid var(--vx-surface-border)"}}",
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"probes": 6,
|
|
1684
|
+
"result": "{"root":{"--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1514
1685
|
},
|
|
1515
1686
|
],
|
|
1516
1687
|
},
|
|
1517
1688
|
},
|
|
1518
1689
|
"Card": {
|
|
1690
|
+
"classNames": {
|
|
1691
|
+
"root": undefined,
|
|
1692
|
+
"section": undefined,
|
|
1693
|
+
},
|
|
1519
1694
|
"styles": {
|
|
1520
1695
|
"root": {
|
|
1521
1696
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
@@ -1826,6 +2001,9 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1826
2001
|
},
|
|
1827
2002
|
},
|
|
1828
2003
|
"Paper": {
|
|
2004
|
+
"classNames": {
|
|
2005
|
+
"root": undefined,
|
|
2006
|
+
},
|
|
1829
2007
|
"styles": {
|
|
1830
2008
|
"root": {
|
|
1831
2009
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The theme owns the card inset (Wave 35, ledger rows 163/165). Mantine's own defaults miss the law:
|
|
3
|
+
* a bare `Card` is 16 px all round and a bare `Paper` is 0. Both resolve here to the density-scaled
|
|
4
|
+
* 12/16 tokens, so a consumer writes nothing.
|
|
5
|
+
*
|
|
6
|
+
* `--card-inset-y/x` are the one pair every part reads: the root's padding, a `Card.Section`'s
|
|
7
|
+
* negative margins (Mantine derives them from ONE `--card-padding`, which cannot express 12/16),
|
|
8
|
+
* and `variant="flush"`, which zeroes the pair — a flush card's sections then cancel nothing.
|
|
9
|
+
*
|
|
10
|
+
* Components that render a `Paper` of their own (Modal / Drawer content, Dialog, ActionBar,
|
|
11
|
+
* FloatingWindow) carry their padding on other parts; the `:not()` list keeps this off them. It sits in
|
|
12
|
+
* `:where()` so the rule stays (0,1,0) and a consumer's own class-based padding wins on source order.
|
|
13
|
+
*/
|
|
14
|
+
/* `--card-padding` is Mantine's: the class default is neutralised to the guaranteed-invalid value so
|
|
15
|
+
`var()` falls through to the token, while an inline `--card-padding` (what a Card `padding` prop
|
|
16
|
+
writes) is still seen and wins. Doubled class: it must out-rank Mantine's own `--card-padding`. */
|
|
17
|
+
.inset.inset {
|
|
18
|
+
--card-padding: initial;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.inset {
|
|
22
|
+
--card-inset-y: var(--card-padding, var(--vx-space-card-inset-y, 12px));
|
|
23
|
+
--card-inset-x: var(--card-padding, var(--vx-space-card-inset-x, 16px));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.inset[data-variant='flush'] {
|
|
27
|
+
--card-inset-y: 0px;
|
|
28
|
+
--card-inset-x: 0px;
|
|
29
|
+
padding: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.inset:where(
|
|
33
|
+
:not(
|
|
34
|
+
[data-variant='flush'],
|
|
35
|
+
[class*='mantine-Modal-'],
|
|
36
|
+
[class*='mantine-Drawer-'],
|
|
37
|
+
[class*='mantine-Dialog-'],
|
|
38
|
+
[class*='mantine-ActionBar-'],
|
|
39
|
+
[class*='mantine-FloatingWindow-']
|
|
40
|
+
)
|
|
41
|
+
) {
|
|
42
|
+
padding: var(--card-inset-y) var(--card-inset-x);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.section[data-orientation='vertical'] {
|
|
46
|
+
margin-inline: calc(var(--card-inset-x, 16px) * -1);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.section[data-orientation='vertical']:first-child {
|
|
50
|
+
margin-top: calc(var(--card-inset-y, 12px) * -1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.section[data-orientation='vertical']:last-child {
|
|
54
|
+
margin-bottom: calc(var(--card-inset-y, 12px) * -1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.section[data-orientation='vertical'][data-inherit-padding] {
|
|
58
|
+
padding-inline: var(--card-inset-x, 16px);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.section[data-orientation='horizontal'] {
|
|
62
|
+
margin-block: calc(var(--card-inset-y, 12px) * -1);
|
|
63
|
+
margin-inline: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.section[data-orientation='horizontal']:first-child {
|
|
67
|
+
margin-inline-start: calc(var(--card-inset-x, 16px) * -1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.section[data-orientation='horizontal']:last-child {
|
|
71
|
+
margin-inline-end: calc(var(--card-inset-x, 16px) * -1);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.section[data-orientation='horizontal'][data-inherit-padding] {
|
|
75
|
+
padding-block: var(--card-inset-y, 12px);
|
|
76
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed CSS-module declaration (the S4 CSS-modules path). Named string props — not an index
|
|
3
|
+
* signature — so dot access stays verbatim under the package's strict flags.
|
|
4
|
+
*/
|
|
5
|
+
declare const classes: {
|
|
6
|
+
readonly inset: string
|
|
7
|
+
readonly section: string
|
|
8
|
+
}
|
|
9
|
+
export default classes
|
|
@@ -135,6 +135,16 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
|
|
|
135
135
|
transition: box-shadow 120ms ease;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
+
/* Section-side inset on the stack scale (`buttonSectionX`, theme/index.ts) — beats Mantine's
|
|
139
|
+
* zero-specificity `:where([data-with-*-section])` `padding-x / 1.5`. */
|
|
140
|
+
.buttonRoot[data-with-left-section] {
|
|
141
|
+
padding-inline-start: var(--button-section-padding-x, calc(var(--button-padding-x) / 1.5));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.buttonRoot[data-with-right-section] {
|
|
145
|
+
padding-inline-end: var(--button-section-padding-x, calc(var(--button-padding-x) / 1.5));
|
|
146
|
+
}
|
|
147
|
+
|
|
138
148
|
.buttonRoot[data-variant='default'],
|
|
139
149
|
.buttonRoot[data-variant='filled'],
|
|
140
150
|
.buttonRoot[data-variant='light'] {
|
|
@@ -280,6 +290,9 @@ html .accordionItem {
|
|
|
280
290
|
*/
|
|
281
291
|
html[data-mantine-color-scheme] .tabsRoot {
|
|
282
292
|
--tab-border-color: var(--vx-divider);
|
|
293
|
+
/* Mantine's dark hover (dark-6) is the page itself, so a hovered tab read identical to rest. The
|
|
294
|
+
* ink-5% step is NavLink's inactive hover, and resolves per scheme. */
|
|
295
|
+
--tab-hover-color: color-mix(in srgb, var(--vx-ink) 5%, transparent);
|
|
283
296
|
}
|
|
284
297
|
|
|
285
298
|
/*
|
package/src/theme/index.ts
CHANGED
|
@@ -87,6 +87,7 @@ import type { CtlHeightVar } from '../tokens/ctl-vars'
|
|
|
87
87
|
import { SIZE_CLASS_BREAKPOINTS } from '../tokens/size-classes'
|
|
88
88
|
import type { BasaltFontsConfig } from '../tokens/core'
|
|
89
89
|
import { onColor, onColorFor, inkVars, tabsVars } from './chrome-vars'
|
|
90
|
+
import cardInsetClasses from './card-inset.module.css'
|
|
90
91
|
import controlsClasses from './controls.module.css'
|
|
91
92
|
import floatingClasses from './floating.module.css'
|
|
92
93
|
import navLinkClasses from './nav-link.module.css'
|
|
@@ -480,7 +481,11 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
480
481
|
// • radius → `--vx-radius-card` (10px).
|
|
481
482
|
// This is the single source the user's "strict surface across components" demands; the
|
|
482
483
|
// `raw-surface` guard then stops consumers re-overriding any of it inline.
|
|
484
|
+
// • inset → `card-inset.module.css`: the density-scaled 12/16 tokens, on Paper too (Mantine
|
|
485
|
+
// gives a bare Paper 0 and a bare Card 16); `variant="flush"` zeroes it and `Card.Section`
|
|
486
|
+
// cancels exactly it. A Card `padding` prop still wins (see the CSS).
|
|
483
487
|
Card: ext<typeof Card>({
|
|
488
|
+
classNames: { root: cardInsetClasses.inset, section: cardInsetClasses.section },
|
|
484
489
|
styles: {
|
|
485
490
|
root: {
|
|
486
491
|
backgroundColor: 'var(--vx-surface-panel)',
|
|
@@ -490,6 +495,7 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
490
495
|
},
|
|
491
496
|
}),
|
|
492
497
|
Paper: ext<typeof Paper>({
|
|
498
|
+
classNames: { root: cardInsetClasses.inset },
|
|
493
499
|
styles: {
|
|
494
500
|
root: {
|
|
495
501
|
backgroundColor: 'var(--vx-surface-panel)',
|
|
@@ -683,6 +689,8 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
683
689
|
props.size === 'md'
|
|
684
690
|
? 'calc(var(--vx-space-control-height) * var(--mantine-scale))'
|
|
685
691
|
: undefined,
|
|
692
|
+
'--button-padding-x': buttonPaddingX(props.size),
|
|
693
|
+
'--button-section-padding-x': buttonSectionX(props.size),
|
|
686
694
|
'--button-color': ink.color,
|
|
687
695
|
'--button-hover': ink.hover,
|
|
688
696
|
'--button-bg': ink.bg,
|
|
@@ -1225,6 +1233,54 @@ function familyBridge(data: PaletteData): Record<string, string> {
|
|
|
1225
1233
|
return vars
|
|
1226
1234
|
}
|
|
1227
1235
|
|
|
1236
|
+
/**
|
|
1237
|
+
* Button inline padding per Mantine size, on the density-scaled `--vx-space-stack-*` steps (4/8/12/16/24
|
|
1238
|
+
* at level 0) instead of Mantine's 14/18/22/26/32 and 7/8/10/12/14 — the off-scale values argo's
|
|
1239
|
+
* decision cards showed (SPEC § 6.12). Heights are untouched. `ctl` (and any custom size) stays
|
|
1240
|
+
* undefined so its own `--button-padding-x-ctl` applies; an unsized Button is Mantine's `sm`.
|
|
1241
|
+
*/
|
|
1242
|
+
const BUTTON_PADDING_X: Record<string, string> = {
|
|
1243
|
+
xs: 'var(--vx-space-stack-md)',
|
|
1244
|
+
sm: 'var(--vx-space-stack-lg)',
|
|
1245
|
+
md: 'var(--vx-space-stack-lg) + var(--vx-space-stack-xs)',
|
|
1246
|
+
lg: 'var(--vx-space-stack-xl)',
|
|
1247
|
+
xl: 'var(--vx-space-stack-xl) + var(--vx-space-stack-sm)',
|
|
1248
|
+
'compact-xs': 'var(--vx-space-stack-sm)',
|
|
1249
|
+
'compact-sm': 'var(--vx-space-stack-sm)',
|
|
1250
|
+
'compact-md': 'var(--vx-space-stack-md)',
|
|
1251
|
+
'compact-lg': 'var(--vx-space-stack-md)',
|
|
1252
|
+
'compact-xl': 'var(--vx-space-stack-lg)',
|
|
1253
|
+
}
|
|
1254
|
+
function buttonPaddingX(size: unknown): string | undefined {
|
|
1255
|
+
const steps = BUTTON_PADDING_X[typeof size === 'string' ? size : 'sm']
|
|
1256
|
+
return steps === undefined ? undefined : `calc((${steps}) * var(--mantine-scale))`
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* The inset on a Button's section side, a step of the same stack scale. Mantine derives it as
|
|
1261
|
+
* `--button-padding-x / 1.5` (`Button.css`, `[data-with-left-section]` / `[data-with-right-section]`),
|
|
1262
|
+
* which lands at 10.67 / 13.33 / 21.33 / 5.33 px — off the scale. Each size takes the nearest step to
|
|
1263
|
+
* that quotient at level 0 (xs 8, sm 12, md 12, lg 16, xl 24; compact-xs/sm 4, compact-md/lg 8,
|
|
1264
|
+
* compact-xl 12; `ctl` 6.67 → 8). Undefined sizes keep Mantine's own value.
|
|
1265
|
+
*/
|
|
1266
|
+
const BUTTON_SECTION_X: Record<string, string> = {
|
|
1267
|
+
xs: 'var(--vx-space-stack-sm)',
|
|
1268
|
+
sm: 'var(--vx-space-stack-md)',
|
|
1269
|
+
md: 'var(--vx-space-stack-md)',
|
|
1270
|
+
lg: 'var(--vx-space-stack-lg)',
|
|
1271
|
+
xl: 'var(--vx-space-stack-xl)',
|
|
1272
|
+
ctl: 'var(--vx-space-stack-sm)',
|
|
1273
|
+
'compact-xs': 'var(--vx-space-stack-xs)',
|
|
1274
|
+
'compact-sm': 'var(--vx-space-stack-xs)',
|
|
1275
|
+
'compact-md': 'var(--vx-space-stack-sm)',
|
|
1276
|
+
'compact-lg': 'var(--vx-space-stack-sm)',
|
|
1277
|
+
'compact-xl': 'var(--vx-space-stack-md)',
|
|
1278
|
+
}
|
|
1279
|
+
function buttonSectionX(size: unknown): string | undefined {
|
|
1280
|
+
const step = BUTTON_SECTION_X[typeof size === 'string' ? size : 'sm']
|
|
1281
|
+
return step === undefined ? undefined : `calc(${step} * var(--mantine-scale))`
|
|
1282
|
+
}
|
|
1283
|
+
|
|
1228
1284
|
/**
|
|
1229
1285
|
* The `ctl` tier's horizontal inset — one number for a Button, a `FilterPill`, a SegmentedControl
|
|
1230
1286
|
* segment and a `kind: 'custom'` Badge, so a home's row reads as one control family
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Active nav row =
|
|
3
|
-
* SELECTED rather than merely hovered (docs/DESIGN-SPEC.md §5).
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* an active row is a SELECTED ROW, not a raised control.
|
|
2
|
+
* Active nav row = a NEUTRAL ink fill (10%, twice the 5% inactive hover) plus heavier weight, so the
|
|
3
|
+
* row reads as SELECTED rather than merely hovered (docs/DESIGN-SPEC.md §5). Never the accent
|
|
4
|
+
* (DESIGN-CORE § Accent discipline, SPEC § 6.12): the accent stays on the focus ring, the filled
|
|
5
|
+
* primary and the active ICON below. NO depth: an active row is a SELECTED ROW, not a raised control.
|
|
7
6
|
*
|
|
8
7
|
* `[data-active]` is the ONLY style hook here — `use-nav.ts` already resolves exactly one winner
|
|
9
8
|
* per route and stamps `data-active` on it, so keying these selectors on `aria-current="page"` too
|
|
@@ -17,7 +16,7 @@
|
|
|
17
16
|
* there throws a React warning), so the state selectors live here.
|
|
18
17
|
*/
|
|
19
18
|
.root[data-active] {
|
|
20
|
-
background-color: color-mix(in srgb, var(--vx-
|
|
19
|
+
background-color: color-mix(in srgb, var(--vx-ink) 10%, transparent);
|
|
21
20
|
font-weight: 600;
|
|
22
21
|
}
|
|
23
22
|
|
|
@@ -32,7 +31,7 @@
|
|
|
32
31
|
* still reads as feedback rather than as a flat, unresponsive selection. */
|
|
33
32
|
@media (hover: hover) {
|
|
34
33
|
.root[data-active]:hover {
|
|
35
|
-
background-color: color-mix(in srgb, var(--vx-
|
|
34
|
+
background-color: color-mix(in srgb, var(--vx-ink) 14%, transparent);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -61,10 +60,9 @@
|
|
|
61
60
|
|
|
62
61
|
/*
|
|
63
62
|
* Inactive hover — the ink-5% ghost tint + ink text/icon (docs/DESIGN-SPEC.md §5; dropped from 6%
|
|
64
|
-
* so it reads clearly below the active row's
|
|
65
|
-
* ink fill). Lives here (not only in the shell module) so a consumer's `SidebarItem.Anchor` path
|
|
63
|
+
* so it reads clearly below the active row's 10% ink fill). Lives here (not only in the shell module) so a consumer's `SidebarItem.Anchor` path
|
|
66
64
|
* gets the same hover; Mantine's own hover fill uses `:where(scheme) .m_*:hover` (gray-0/dark-6),
|
|
67
|
-
* which this outranks on specificity. Active rows keep their
|
|
65
|
+
* which this outranks on specificity. Active rows keep their ink fill above, untouched here.
|
|
68
66
|
*/
|
|
69
67
|
@media (hover: hover) {
|
|
70
68
|
.root:not([data-active]):hover {
|
package/src/theme/status-dot.tsx
CHANGED
|
@@ -1,19 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `StatusDot` — the one status mark: a 6px round dot that carries a colour and nothing else. It is
|
|
3
3
|
* decoration (`aria-hidden`); the meaning always travels as a word beside it (`StatusVerdict`), so a
|
|
4
|
-
* verdict is never colour alone.
|
|
4
|
+
* verdict is never colour alone. Exported from the root.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <StatusDot color={VX.status.ok} />
|
|
5
8
|
*/
|
|
6
9
|
import type { CSSProperties } from 'react'
|
|
10
|
+
import { cx } from '../common/props'
|
|
11
|
+
import type { BasaltProps } from '../common/props'
|
|
7
12
|
import classes from './status-dot.module.css'
|
|
8
13
|
|
|
9
|
-
export type StatusDotProps = {
|
|
14
|
+
export type StatusDotProps = BasaltProps & {
|
|
10
15
|
/** Any CSS colour; callers pass a `VX.status.*` token so it re-resolves per scheme. */
|
|
11
16
|
color: string
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
type DotStyle = CSSProperties & { '--basalt-status-dot': string }
|
|
15
20
|
|
|
16
|
-
export function StatusDot({ color }: StatusDotProps) {
|
|
17
|
-
const
|
|
18
|
-
return
|
|
21
|
+
export function StatusDot({ color, className, style }: StatusDotProps) {
|
|
22
|
+
const merged: DotStyle = { ...style, '--basalt-status-dot': color }
|
|
23
|
+
return (
|
|
24
|
+
<span
|
|
25
|
+
className={cx(classes.dot, className)}
|
|
26
|
+
data-basalt-status-dot=""
|
|
27
|
+
aria-hidden="true"
|
|
28
|
+
style={merged}
|
|
29
|
+
/>
|
|
30
|
+
)
|
|
19
31
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/* A status dot plus its word: the dot carries the colour, the word is muted ink. `flex: none` keeps
|
|
2
|
-
* it whole when a neighbouring caption or title truncates.
|
|
2
|
+
* it whole when a neighbouring caption or title truncates. The word is the proportional sans, at the
|
|
3
|
+
* micro size: it is a sentence fragment ("Blocked · Waits on the API change"), not an UPPERCASE
|
|
4
|
+
* caption, so it never takes the mono. */
|
|
3
5
|
.verdict {
|
|
4
6
|
display: inline-flex;
|
|
5
7
|
flex: none;
|
|
6
8
|
align-items: center;
|
|
7
9
|
gap: 5px;
|
|
8
|
-
font-family: var(--basalt-font-
|
|
10
|
+
font-family: var(--basalt-font-sans);
|
|
9
11
|
font-size: var(--vx-text-micro);
|
|
10
12
|
color: var(--vx-muted);
|
|
11
13
|
}
|