basalt-ui 2.21.0 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/MIGRATING.md +277 -12
- package/agent/agents/basalt-design-reviewer.md +1 -1
- package/agent/rules/basalt-tokens.md +1 -1
- package/agent/skills/basalt-design/SKILL.md +1 -1
- package/agent/skills/basalt-design/references/anti-defaults.md +1 -1
- package/agent/skills/basalt-design/references/catalogue.md +1 -0
- package/dist/charts/BandStrip.d.ts.map +1 -1
- package/dist/charts/BandStrip.js +27 -3
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +5 -0
- package/dist/charts/CartesianChart.d.ts +8 -0
- package/dist/charts/CartesianChart.d.ts.map +1 -1
- package/dist/charts/CartesianChart.js +8 -5
- package/dist/charts/ChartCard.d.ts +12 -3
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +29 -8
- package/dist/charts/DualPanel.d.ts.map +1 -1
- package/dist/charts/DualPanel.js +5 -8
- package/dist/charts/Heatmap.d.ts +12 -1
- package/dist/charts/Heatmap.d.ts.map +1 -1
- package/dist/charts/Heatmap.js +34 -5
- package/dist/charts/Lines.d.ts +3 -0
- package/dist/charts/Lines.d.ts.map +1 -1
- package/dist/charts/Lines.js +29 -6
- package/dist/charts/MirroredBars.d.ts.map +1 -1
- package/dist/charts/MirroredBars.js +4 -6
- package/dist/charts/Sparkline.d.ts +7 -1
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +39 -14
- package/dist/charts/StackedArea.d.ts +4 -1
- package/dist/charts/StackedArea.d.ts.map +1 -1
- package/dist/charts/StackedArea.js +9 -3
- package/dist/charts/band-fold.d.ts +20 -1
- package/dist/charts/band-fold.d.ts.map +1 -1
- package/dist/charts/band-fold.js +9 -0
- package/dist/charts/chart-box.module.css +19 -0
- package/dist/charts/chart-card.module.css +25 -0
- package/dist/charts/chart-legend.module.css +7 -0
- package/dist/charts/compile.d.ts +17 -6
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +145 -74
- package/dist/charts/labels.d.ts +15 -4
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +34 -10
- package/dist/charts/legend.d.ts +2 -0
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +7 -21
- package/dist/charts/marks.js +1 -1
- package/dist/charts/panel.d.ts +0 -6
- package/dist/charts/panel.d.ts.map +1 -1
- package/dist/charts/panel.js +1 -10
- package/dist/charts/ref-label.d.ts +26 -0
- package/dist/charts/ref-label.d.ts.map +1 -0
- package/dist/charts/ref-label.js +63 -0
- package/dist/charts/scales.d.ts +4 -1
- package/dist/charts/scales.d.ts.map +1 -1
- package/dist/charts/scales.js +14 -3
- package/dist/charts/sparkline.module.css +10 -11
- package/dist/charts/sparkline.module.css.d.ts +1 -2
- package/dist/charts/state.d.ts +2 -0
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +2 -1
- package/dist/charts/types.d.ts +14 -5
- package/dist/charts/types.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.d.ts +1 -0
- package/dist/cli/doctor-upgrade.d.ts.map +1 -1
- package/dist/cli/doctor-upgrade.js +1 -0
- package/dist/cli/init.d.ts +2 -0
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +68 -4
- package/dist/cli/shot/capture.d.ts +21 -2
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +194 -32
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +14 -1
- package/dist/cli/shot/playwright.d.ts +5 -2
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/types.d.ts +2 -0
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/shot/types.js +2 -0
- package/dist/controls/controls.module.css +11 -1
- package/dist/controls/filter-pill.d.ts.map +1 -1
- package/dist/controls/filter-pill.js +1 -0
- package/dist/controls/sync-button.d.ts.map +1 -1
- package/dist/controls/sync-button.js +22 -3
- package/dist/controls/sync-button.module.css +34 -2
- package/dist/controls/sync-button.module.css.d.ts +1 -0
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +7 -8
- package/dist/dashboard/bar-list.module.css +53 -0
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/index.d.ts +1 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +2 -0
- package/dist/dashboard/meter-model.d.ts +77 -3
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +88 -15
- package/dist/dashboard/meter-parts.d.ts +8 -0
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +238 -71
- package/dist/dashboard/meter.d.ts +43 -60
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +20 -3
- package/dist/dashboard/meter.module.css +61 -0
- package/dist/dashboard/meter.module.css.d.ts +5 -0
- package/dist/dashboard/page-summary.d.ts +20 -0
- package/dist/dashboard/page-summary.d.ts.map +1 -0
- package/dist/dashboard/page-summary.js +28 -0
- package/dist/dashboard/page-summary.module.css +89 -0
- package/dist/dashboard/page-summary.module.css.d.ts +15 -0
- package/dist/dashboard/section.d.ts +25 -2
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.js +10 -5
- package/dist/dashboard/section.module.css +23 -0
- package/dist/dashboard/section.module.css.d.ts +1 -0
- package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
- package/dist/dashboard/stat-card-parts.js +1 -1
- package/dist/dashboard/stat-card.d.ts +4 -2
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +7 -5
- package/dist/dashboard/stat-card.module.css +17 -0
- package/dist/dashboard/stat-strip.d.ts +7 -1
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +74 -46
- package/dist/dashboard/stat-strip.module.css +67 -20
- package/dist/dashboard/stat-strip.module.css.d.ts +4 -0
- package/dist/dashboard/visual-slot.d.ts +7 -1
- package/dist/dashboard/visual-slot.d.ts.map +1 -1
- package/dist/dashboard/visual-slot.js +3 -1
- package/dist/guard/vx-names.d.ts.map +1 -1
- package/dist/guard/vx-names.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/styles.css +34 -2
- package/dist/theme/chrome-vars.d.ts +20 -5
- package/dist/theme/chrome-vars.d.ts.map +1 -1
- package/dist/theme/chrome-vars.js +46 -3
- package/dist/theme/controls.module.css +23 -0
- package/dist/theme/controls.module.css.d.ts +1 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +8 -20
- package/dist/tokens/core.d.ts +2 -1
- package/dist/tokens/core.d.ts.map +1 -1
- package/dist/tokens/core.js +6 -1
- package/dist/tokens/derive.d.ts +3 -1
- package/dist/tokens/derive.d.ts.map +1 -1
- package/dist/tokens/derive.js +16 -1
- package/dist/tokens/palette.d.ts +4 -0
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +4 -0
- package/dist/tokens/status-text.d.ts.map +1 -1
- package/dist/tokens/status-text.js +3 -1
- package/llms.txt +38 -20
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +33 -3
- package/src/charts/Bars.tsx +6 -0
- package/src/charts/CartesianChart.tsx +16 -3
- package/src/charts/ChartCard.tsx +34 -6
- package/src/charts/DualPanel.tsx +3 -6
- package/src/charts/Heatmap.tsx +54 -5
- package/src/charts/Lines.tsx +56 -10
- package/src/charts/MirroredBars.tsx +3 -5
- package/src/charts/Sparkline.tsx +50 -13
- package/src/charts/StackedArea.tsx +14 -4
- package/src/charts/band-fold.ts +31 -1
- package/src/charts/chart-box.module.css +19 -0
- package/src/charts/chart-card.module.css +25 -0
- package/src/charts/chart-legend.module.css +7 -0
- package/src/charts/compile.ts +210 -85
- package/src/charts/labels.ts +48 -14
- package/src/charts/legend.tsx +10 -20
- package/src/charts/marks.ts +1 -1
- package/src/charts/panel.tsx +1 -16
- package/src/charts/ref-label.ts +104 -0
- package/src/charts/scales.ts +22 -2
- package/src/charts/sparkline.module.css +10 -11
- package/src/charts/sparkline.module.css.d.ts +1 -2
- package/src/charts/state.tsx +3 -1
- package/src/charts/types.ts +14 -5
- package/src/cli/doctor-upgrade.ts +1 -1
- package/src/cli/init.ts +100 -3
- package/src/cli/shot/capture.ts +251 -32
- package/src/cli/shot/detect.ts +18 -1
- package/src/cli/shot/playwright.ts +2 -2
- package/src/cli/shot/types.ts +3 -0
- package/src/controls/controls.module.css +11 -1
- package/src/controls/filter-pill.tsx +2 -0
- package/src/controls/sync-button.module.css +34 -2
- package/src/controls/sync-button.module.css.d.ts +1 -0
- package/src/controls/sync-button.tsx +40 -4
- package/src/dashboard/bar-list.module.css +53 -0
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +78 -69
- package/src/dashboard/index.ts +1 -0
- package/src/dashboard/meter-model.ts +186 -20
- package/src/dashboard/meter-parts.tsx +285 -64
- package/src/dashboard/meter.module.css +61 -0
- package/src/dashboard/meter.module.css.d.ts +5 -0
- package/src/dashboard/meter.tsx +60 -10
- package/src/dashboard/page-summary.module.css +89 -0
- package/src/dashboard/page-summary.module.css.d.ts +15 -0
- package/src/dashboard/page-summary.tsx +95 -0
- package/src/dashboard/section.module.css +23 -0
- package/src/dashboard/section.module.css.d.ts +1 -0
- package/src/dashboard/section.tsx +59 -11
- package/src/dashboard/stat-card-parts.tsx +5 -1
- package/src/dashboard/stat-card.module.css +17 -0
- package/src/dashboard/stat-card.tsx +12 -6
- package/src/dashboard/stat-strip.module.css +67 -20
- package/src/dashboard/stat-strip.module.css.d.ts +4 -0
- package/src/dashboard/stat-strip.tsx +118 -72
- package/src/dashboard/visual-slot.ts +12 -3
- package/src/guard/vx-names.ts +2 -0
- package/src/index.ts +2 -0
- package/src/styles.css +34 -2
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +186 -60
- package/src/theme/chrome-vars.ts +77 -8
- package/src/theme/controls.module.css +23 -0
- package/src/theme/controls.module.css.d.ts +1 -0
- package/src/theme/index.ts +12 -25
- package/src/tokens/core.ts +4 -1
- package/src/tokens/derive.ts +32 -3
- package/src/tokens/palette.ts +4 -0
- package/src/tokens/status-text.ts +2 -0
|
@@ -40,7 +40,7 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
40
40
|
"#e5e5e9",
|
|
41
41
|
"#dddde1",
|
|
42
42
|
"#d4d4d8",
|
|
43
|
-
"#
|
|
43
|
+
"#a7a7aa",
|
|
44
44
|
"#444447",
|
|
45
45
|
"#38383b",
|
|
46
46
|
"#2b2b2e",
|
|
@@ -264,6 +264,7 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
264
264
|
},
|
|
265
265
|
"Badge": {
|
|
266
266
|
"classNames": {
|
|
267
|
+
"root": undefined,
|
|
267
268
|
"section": undefined,
|
|
268
269
|
},
|
|
269
270
|
"defaultProps": {
|
|
@@ -271,6 +272,60 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
271
272
|
"radius": 5,
|
|
272
273
|
"variant": "light",
|
|
273
274
|
},
|
|
275
|
+
"vars": {
|
|
276
|
+
"fn":
|
|
277
|
+
"function badgeVars(theme, props) {
|
|
278
|
+
const none = {
|
|
279
|
+
"--badge-bg": void 0,
|
|
280
|
+
"--badge-color": void 0,
|
|
281
|
+
"--badge-dot": void 0,
|
|
282
|
+
"--badge-dot-content": void 0,
|
|
283
|
+
"--badge-dot-cols": void 0
|
|
284
|
+
};
|
|
285
|
+
if ((props.variant ?? "light") !== "light")
|
|
286
|
+
return { root: none };
|
|
287
|
+
const name = props.color ?? "gray", dot = name === "gray" ? void 0 : dotColor(theme, name);
|
|
288
|
+
return {
|
|
289
|
+
root: {
|
|
290
|
+
...none,
|
|
291
|
+
"--badge-bg": SUBTLE,
|
|
292
|
+
"--badge-color": INK,
|
|
293
|
+
...dot !== void 0 && {
|
|
294
|
+
"--badge-dot": dot,
|
|
295
|
+
"--badge-dot-content": "''",
|
|
296
|
+
"--badge-dot-cols": "auto 1fr"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
}"
|
|
301
|
+
,
|
|
302
|
+
"outputs": [
|
|
303
|
+
{
|
|
304
|
+
"probes": 196,
|
|
305
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)"}}",
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"probes": 96,
|
|
309
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-blue-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
"probes": 96,
|
|
313
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-red-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"probes": 96,
|
|
317
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-dark-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"probes": 96,
|
|
321
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"accent","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"probes": 1728,
|
|
325
|
+
"result": "{"root":{}}",
|
|
326
|
+
},
|
|
327
|
+
],
|
|
328
|
+
},
|
|
274
329
|
},
|
|
275
330
|
"Breadcrumbs": {
|
|
276
331
|
"styles": {
|
|
@@ -306,99 +361,99 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
306
361
|
"outputs": [
|
|
307
362
|
{
|
|
308
363
|
"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-
|
|
364
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))"}}",
|
|
310
365
|
},
|
|
311
366
|
{
|
|
312
367
|
"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-
|
|
368
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
314
369
|
},
|
|
315
370
|
{
|
|
316
371
|
"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-
|
|
372
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
318
373
|
},
|
|
319
374
|
{
|
|
320
375
|
"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-
|
|
376
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
322
377
|
},
|
|
323
378
|
{
|
|
324
379
|
"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-
|
|
380
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))"}}",
|
|
326
381
|
},
|
|
327
382
|
{
|
|
328
383
|
"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-
|
|
384
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
330
385
|
},
|
|
331
386
|
{
|
|
332
387
|
"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-
|
|
388
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
334
389
|
},
|
|
335
390
|
{
|
|
336
391
|
"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-
|
|
392
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
338
393
|
},
|
|
339
394
|
{
|
|
340
395
|
"probes": 272,
|
|
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-
|
|
396
|
+
"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-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))"}}",
|
|
342
397
|
},
|
|
343
398
|
{
|
|
344
399
|
"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-
|
|
400
|
+
"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-lg) + var(--vx-space-stack-xs)) * 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
401
|
},
|
|
347
402
|
{
|
|
348
403
|
"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-
|
|
404
|
+
"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-lg) + var(--vx-space-stack-xs)) * 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
405
|
},
|
|
351
406
|
{
|
|
352
407
|
"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-
|
|
408
|
+
"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-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
354
409
|
},
|
|
355
410
|
{
|
|
356
411
|
"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-
|
|
412
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))"}}",
|
|
358
413
|
},
|
|
359
414
|
{
|
|
360
415
|
"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-
|
|
416
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
362
417
|
},
|
|
363
418
|
{
|
|
364
419
|
"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-
|
|
420
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
366
421
|
},
|
|
367
422
|
{
|
|
368
423
|
"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-
|
|
424
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
370
425
|
},
|
|
371
426
|
{
|
|
372
427
|
"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))"}}",
|
|
428
|
+
"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(--vx-space-stack-sm)) * var(--mantine-scale))"}}",
|
|
374
429
|
},
|
|
375
430
|
{
|
|
376
431
|
"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)"}}",
|
|
432
|
+
"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(--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)"}}",
|
|
378
433
|
},
|
|
379
434
|
{
|
|
380
435
|
"probes": 6,
|
|
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)"}}",
|
|
436
|
+
"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(--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)"}}",
|
|
382
437
|
},
|
|
383
438
|
{
|
|
384
439
|
"probes": 6,
|
|
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)"}}",
|
|
440
|
+
"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(--vx-space-stack-sm)) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
386
441
|
},
|
|
387
442
|
{
|
|
388
443
|
"probes": 270,
|
|
389
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
444
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)"}}",
|
|
390
445
|
},
|
|
391
446
|
{
|
|
392
447
|
"probes": 6,
|
|
393
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
448
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--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
449
|
},
|
|
395
450
|
{
|
|
396
451
|
"probes": 6,
|
|
397
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
452
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--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
453
|
},
|
|
399
454
|
{
|
|
400
455
|
"probes": 6,
|
|
401
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
456
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
402
457
|
},
|
|
403
458
|
{
|
|
404
459
|
"probes": 270,
|
|
@@ -937,11 +992,19 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
937
992
|
"vars": {
|
|
938
993
|
"fn":
|
|
939
994
|
"function tabsVars(theme, props) {
|
|
940
|
-
|
|
995
|
+
if (hasExplicitColor(props.color))
|
|
996
|
+
return {
|
|
997
|
+
root: {
|
|
998
|
+
"--tabs-text-color": onColorFor(theme, props),
|
|
999
|
+
"--tabs-color": void 0,
|
|
1000
|
+
"--tabs-radius": void 0
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
const pills = props.variant === "pills";
|
|
941
1004
|
return {
|
|
942
1005
|
root: {
|
|
943
|
-
"--tabs-text-color": onColorFor(theme, props),
|
|
944
|
-
"--tabs-color":
|
|
1006
|
+
"--tabs-text-color": pills ? INK : onColorFor(theme, props),
|
|
1007
|
+
"--tabs-color": pills ? PILL_FILL : INK,
|
|
945
1008
|
"--tabs-radius": void 0
|
|
946
1009
|
}
|
|
947
1010
|
};
|
|
@@ -949,11 +1012,11 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
949
1012
|
,
|
|
950
1013
|
"outputs": [
|
|
951
1014
|
{
|
|
952
|
-
"probes":
|
|
1015
|
+
"probes": 388,
|
|
953
1016
|
"result": "{"root":{"--tabs-text-color":"var(--vx-on-blue)","--tabs-color":"var(--vx-ink)"}}",
|
|
954
1017
|
},
|
|
955
1018
|
{
|
|
956
|
-
"probes":
|
|
1019
|
+
"probes": 384,
|
|
957
1020
|
"result": "{"root":{"--tabs-text-color":"var(--vx-on-blue)"}}",
|
|
958
1021
|
},
|
|
959
1022
|
{
|
|
@@ -1307,7 +1370,7 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1307
1370
|
"#e5e5e9",
|
|
1308
1371
|
"#dddde1",
|
|
1309
1372
|
"#d4d4d8",
|
|
1310
|
-
"#
|
|
1373
|
+
"#a7a7aa",
|
|
1311
1374
|
"#444447",
|
|
1312
1375
|
"#38383b",
|
|
1313
1376
|
"#2b2b2e",
|
|
@@ -1531,6 +1594,7 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1531
1594
|
},
|
|
1532
1595
|
"Badge": {
|
|
1533
1596
|
"classNames": {
|
|
1597
|
+
"root": undefined,
|
|
1534
1598
|
"section": undefined,
|
|
1535
1599
|
},
|
|
1536
1600
|
"defaultProps": {
|
|
@@ -1538,6 +1602,60 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1538
1602
|
"radius": 8,
|
|
1539
1603
|
"variant": "light",
|
|
1540
1604
|
},
|
|
1605
|
+
"vars": {
|
|
1606
|
+
"fn":
|
|
1607
|
+
"function badgeVars(theme, props) {
|
|
1608
|
+
const none = {
|
|
1609
|
+
"--badge-bg": void 0,
|
|
1610
|
+
"--badge-color": void 0,
|
|
1611
|
+
"--badge-dot": void 0,
|
|
1612
|
+
"--badge-dot-content": void 0,
|
|
1613
|
+
"--badge-dot-cols": void 0
|
|
1614
|
+
};
|
|
1615
|
+
if ((props.variant ?? "light") !== "light")
|
|
1616
|
+
return { root: none };
|
|
1617
|
+
const name = props.color ?? "gray", dot = name === "gray" ? void 0 : dotColor(theme, name);
|
|
1618
|
+
return {
|
|
1619
|
+
root: {
|
|
1620
|
+
...none,
|
|
1621
|
+
"--badge-bg": SUBTLE,
|
|
1622
|
+
"--badge-color": INK,
|
|
1623
|
+
...dot !== void 0 && {
|
|
1624
|
+
"--badge-dot": dot,
|
|
1625
|
+
"--badge-dot-content": "''",
|
|
1626
|
+
"--badge-dot-cols": "auto 1fr"
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
};
|
|
1630
|
+
}"
|
|
1631
|
+
,
|
|
1632
|
+
"outputs": [
|
|
1633
|
+
{
|
|
1634
|
+
"probes": 196,
|
|
1635
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)"}}",
|
|
1636
|
+
},
|
|
1637
|
+
{
|
|
1638
|
+
"probes": 96,
|
|
1639
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-blue-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
1640
|
+
},
|
|
1641
|
+
{
|
|
1642
|
+
"probes": 96,
|
|
1643
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-red-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
"probes": 96,
|
|
1647
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"var(--mantine-color-dark-filled)","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
1648
|
+
},
|
|
1649
|
+
{
|
|
1650
|
+
"probes": 96,
|
|
1651
|
+
"result": "{"root":{"--badge-bg":"var(--vx-surface-subtle)","--badge-color":"var(--vx-ink)","--badge-dot":"accent","--badge-dot-content":"''","--badge-dot-cols":"auto 1fr"}}",
|
|
1652
|
+
},
|
|
1653
|
+
{
|
|
1654
|
+
"probes": 1728,
|
|
1655
|
+
"result": "{"root":{}}",
|
|
1656
|
+
},
|
|
1657
|
+
],
|
|
1658
|
+
},
|
|
1541
1659
|
},
|
|
1542
1660
|
"Breadcrumbs": {
|
|
1543
1661
|
"styles": {
|
|
@@ -1573,99 +1691,99 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
1573
1691
|
"outputs": [
|
|
1574
1692
|
{
|
|
1575
1693
|
"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-
|
|
1694
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-lg)) * var(--mantine-scale))"}}",
|
|
1577
1695
|
},
|
|
1578
1696
|
{
|
|
1579
1697
|
"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-
|
|
1698
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
1581
1699
|
},
|
|
1582
1700
|
{
|
|
1583
1701
|
"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-
|
|
1702
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
1585
1703
|
},
|
|
1586
1704
|
{
|
|
1587
1705
|
"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-
|
|
1706
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-lg)) * 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)"}}",
|
|
1589
1707
|
},
|
|
1590
1708
|
{
|
|
1591
1709
|
"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-
|
|
1710
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-md)) * var(--mantine-scale))"}}",
|
|
1593
1711
|
},
|
|
1594
1712
|
{
|
|
1595
1713
|
"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-
|
|
1714
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
1597
1715
|
},
|
|
1598
1716
|
{
|
|
1599
1717
|
"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-
|
|
1718
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
1601
1719
|
},
|
|
1602
1720
|
{
|
|
1603
1721
|
"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-
|
|
1722
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-md)) * 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)"}}",
|
|
1605
1723
|
},
|
|
1606
1724
|
{
|
|
1607
1725
|
"probes": 272,
|
|
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-
|
|
1726
|
+
"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-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))"}}",
|
|
1609
1727
|
},
|
|
1610
1728
|
{
|
|
1611
1729
|
"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-
|
|
1730
|
+
"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-lg) + var(--vx-space-stack-xs)) * 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
1731
|
},
|
|
1614
1732
|
{
|
|
1615
1733
|
"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-
|
|
1734
|
+
"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-lg) + var(--vx-space-stack-xs)) * 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
1735
|
},
|
|
1618
1736
|
{
|
|
1619
1737
|
"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-
|
|
1738
|
+
"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-lg) + var(--vx-space-stack-xs)) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1621
1739
|
},
|
|
1622
1740
|
{
|
|
1623
1741
|
"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-
|
|
1742
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))","--button-section-padding-x":"calc((var(--vx-space-stack-xl)) * var(--mantine-scale))"}}",
|
|
1625
1743
|
},
|
|
1626
1744
|
{
|
|
1627
1745
|
"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-
|
|
1746
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
1629
1747
|
},
|
|
1630
1748
|
{
|
|
1631
1749
|
"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-
|
|
1750
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
1633
1751
|
},
|
|
1634
1752
|
{
|
|
1635
1753
|
"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-
|
|
1754
|
+
"result": "{"root":{"--button-padding-x":"calc((var(--vx-space-stack-xl)) * 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)"}}",
|
|
1637
1755
|
},
|
|
1638
1756
|
{
|
|
1639
1757
|
"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))"}}",
|
|
1758
|
+
"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(--vx-space-stack-sm)) * var(--mantine-scale))"}}",
|
|
1641
1759
|
},
|
|
1642
1760
|
{
|
|
1643
1761
|
"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)"}}",
|
|
1762
|
+
"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(--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)"}}",
|
|
1645
1763
|
},
|
|
1646
1764
|
{
|
|
1647
1765
|
"probes": 6,
|
|
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)"}}",
|
|
1766
|
+
"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(--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)"}}",
|
|
1649
1767
|
},
|
|
1650
1768
|
{
|
|
1651
1769
|
"probes": 6,
|
|
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)"}}",
|
|
1770
|
+
"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(--vx-space-stack-sm)) * var(--mantine-scale))","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1653
1771
|
},
|
|
1654
1772
|
{
|
|
1655
1773
|
"probes": 270,
|
|
1656
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
1774
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)"}}",
|
|
1657
1775
|
},
|
|
1658
1776
|
{
|
|
1659
1777
|
"probes": 6,
|
|
1660
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
1778
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--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
1779
|
},
|
|
1662
1780
|
{
|
|
1663
1781
|
"probes": 6,
|
|
1664
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
1782
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--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
1783
|
},
|
|
1666
1784
|
{
|
|
1667
1785
|
"probes": 6,
|
|
1668
|
-
"result": "{"root":{"--button-section-padding-x":"
|
|
1786
|
+
"result": "{"root":{"--button-section-padding-x":"var(--button-padding-x-ctl)","--button-color":"var(--vx-ink)","--button-hover":"color-mix(in srgb, var(--vx-ink) 6%, transparent)"}}",
|
|
1669
1787
|
},
|
|
1670
1788
|
{
|
|
1671
1789
|
"probes": 270,
|
|
@@ -2204,11 +2322,19 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
2204
2322
|
"vars": {
|
|
2205
2323
|
"fn":
|
|
2206
2324
|
"function tabsVars(theme, props) {
|
|
2207
|
-
|
|
2325
|
+
if (hasExplicitColor(props.color))
|
|
2326
|
+
return {
|
|
2327
|
+
root: {
|
|
2328
|
+
"--tabs-text-color": onColorFor(theme, props),
|
|
2329
|
+
"--tabs-color": void 0,
|
|
2330
|
+
"--tabs-radius": void 0
|
|
2331
|
+
}
|
|
2332
|
+
};
|
|
2333
|
+
const pills = props.variant === "pills";
|
|
2208
2334
|
return {
|
|
2209
2335
|
root: {
|
|
2210
|
-
"--tabs-text-color": onColorFor(theme, props),
|
|
2211
|
-
"--tabs-color":
|
|
2336
|
+
"--tabs-text-color": pills ? INK : onColorFor(theme, props),
|
|
2337
|
+
"--tabs-color": pills ? PILL_FILL : INK,
|
|
2212
2338
|
"--tabs-radius": void 0
|
|
2213
2339
|
}
|
|
2214
2340
|
};
|
|
@@ -2216,11 +2342,11 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
2216
2342
|
,
|
|
2217
2343
|
"outputs": [
|
|
2218
2344
|
{
|
|
2219
|
-
"probes":
|
|
2345
|
+
"probes": 388,
|
|
2220
2346
|
"result": "{"root":{"--tabs-text-color":"var(--vx-on-blue)","--tabs-color":"var(--vx-ink)"}}",
|
|
2221
2347
|
},
|
|
2222
2348
|
{
|
|
2223
|
-
"probes":
|
|
2349
|
+
"probes": 384,
|
|
2224
2350
|
"result": "{"root":{"--tabs-text-color":"var(--vx-on-blue)"}}",
|
|
2225
2351
|
},
|
|
2226
2352
|
{
|
package/src/theme/chrome-vars.ts
CHANGED
|
@@ -110,12 +110,17 @@ export function inkVars(props: {
|
|
|
110
110
|
return INK_BY_VARIANT[variant as keyof typeof INK_BY_VARIANT] ?? {}
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/** The selected `pills` Tab: one ink step over the panel, the same neutral the SegmentedControl indicator uses. */
|
|
114
|
+
const PILL_FILL = 'color-mix(in srgb, var(--vx-ink) 12%, var(--vx-surface-panel))'
|
|
115
|
+
|
|
113
116
|
/**
|
|
114
|
-
* Tabs vars: the
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
117
|
+
* Tabs vars: the selected tab reads by ink and weight, never the accent (SPEC § 6.12; DESIGN-CORE
|
|
118
|
+
* § Accent discipline). `default` and `outline` paint their active underline/border from
|
|
119
|
+
* `--tabs-color`, so that is ink; `pills` fills the tab with it, so the fill is an ink-mixed panel
|
|
120
|
+
* and the label (`--tabs-text-color`) is ink, not the on-accent white. An explicit `color=` opts out
|
|
121
|
+
* of all three and keeps the on-color text var. The return type lists `--tabs-text-color` and
|
|
122
|
+
* `--tabs-radius` because Mantine's `TabsCssVariables` type declares only `--tabs-color` /
|
|
123
|
+
* `--tabs-radius` while Tabs' OWN varsResolver writes `--tabs-text-color` (an upstream type gap).
|
|
119
124
|
*/
|
|
120
125
|
export function tabsVars(
|
|
121
126
|
theme: MantineTheme,
|
|
@@ -125,12 +130,76 @@ export function tabsVars(
|
|
|
125
130
|
autoContrast?: boolean | undefined
|
|
126
131
|
},
|
|
127
132
|
): { root: Record<'--tabs-color' | '--tabs-radius' | '--tabs-text-color', string | undefined> } {
|
|
128
|
-
|
|
133
|
+
if (hasExplicitColor(props.color)) {
|
|
134
|
+
return {
|
|
135
|
+
root: {
|
|
136
|
+
'--tabs-text-color': onColorFor(theme, props),
|
|
137
|
+
'--tabs-color': undefined,
|
|
138
|
+
'--tabs-radius': undefined,
|
|
139
|
+
},
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const pills = props.variant === 'pills'
|
|
129
143
|
return {
|
|
130
144
|
root: {
|
|
131
|
-
'--tabs-text-color': onColorFor(theme, props),
|
|
132
|
-
'--tabs-color':
|
|
145
|
+
'--tabs-text-color': pills ? INK : onColorFor(theme, props),
|
|
146
|
+
'--tabs-color': pills ? PILL_FILL : INK,
|
|
133
147
|
'--tabs-radius': undefined,
|
|
134
148
|
},
|
|
135
149
|
}
|
|
136
150
|
}
|
|
151
|
+
|
|
152
|
+
/** The dot's colour: a theme colour's fill, an indexed shade's own var (`red.6`), or the caller's literal (hex, var). */
|
|
153
|
+
function dotColor(theme: MantineTheme, color: string): string {
|
|
154
|
+
if (Object.hasOwn(theme.colors, color)) return `var(--mantine-color-${color}-filled)`
|
|
155
|
+
const [name, shade] = color.split('.')
|
|
156
|
+
if (
|
|
157
|
+
name !== undefined &&
|
|
158
|
+
shade !== undefined &&
|
|
159
|
+
/^\d$/.test(shade) &&
|
|
160
|
+
Object.hasOwn(theme.colors, name)
|
|
161
|
+
) {
|
|
162
|
+
return `var(--mantine-color-${name}-${shade})`
|
|
163
|
+
}
|
|
164
|
+
return color
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Badge vars (SPEC § 6.10): the status chip is the neutral surface with an ink word, and a named
|
|
169
|
+
* colour is a leading status dot, not a tinted slab (W36 r3/r6 "tinted status Badges"). Only the
|
|
170
|
+
* `light` variant (the theme default); `filled`, `outline`, `dot` and `default` keep their meaning —
|
|
171
|
+
* a `filled` accent count is the one tinted-chrome case that stays. Any colour the caller gives (theme name, indexed shade, hex, var) becomes the dot; `gray` is the
|
|
172
|
+
* no-signal chip. A `leftSection` glyph replaces the dot.
|
|
173
|
+
*/
|
|
174
|
+
export function badgeVars(
|
|
175
|
+
theme: MantineTheme,
|
|
176
|
+
props: { color?: string | null | undefined; variant?: string | undefined },
|
|
177
|
+
): {
|
|
178
|
+
root: Record<
|
|
179
|
+
'--badge-bg' | '--badge-color' | '--badge-dot' | '--badge-dot-content' | '--badge-dot-cols',
|
|
180
|
+
string | undefined
|
|
181
|
+
>
|
|
182
|
+
} {
|
|
183
|
+
const none = {
|
|
184
|
+
'--badge-bg': undefined,
|
|
185
|
+
'--badge-color': undefined,
|
|
186
|
+
'--badge-dot': undefined,
|
|
187
|
+
'--badge-dot-content': undefined,
|
|
188
|
+
'--badge-dot-cols': undefined,
|
|
189
|
+
}
|
|
190
|
+
if ((props.variant ?? 'light') !== 'light') return { root: none }
|
|
191
|
+
const name = props.color ?? 'gray'
|
|
192
|
+
const dot = name === 'gray' ? undefined : dotColor(theme, name)
|
|
193
|
+
return {
|
|
194
|
+
root: {
|
|
195
|
+
...none,
|
|
196
|
+
'--badge-bg': SUBTLE,
|
|
197
|
+
'--badge-color': INK,
|
|
198
|
+
...(dot !== undefined && {
|
|
199
|
+
'--badge-dot': dot,
|
|
200
|
+
'--badge-dot-content': "''",
|
|
201
|
+
'--badge-dot-cols': 'auto 1fr',
|
|
202
|
+
}),
|
|
203
|
+
},
|
|
204
|
+
}
|
|
205
|
+
}
|