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
|
@@ -8,7 +8,7 @@ import { StatusDot } from "../theme/status-dot.js";
|
|
|
8
8
|
import { VX } from "../tokens/index.js";
|
|
9
9
|
import { InfoGlyph } from "./widget-header.js";
|
|
10
10
|
import classes from "./stat-strip.module.css";
|
|
11
|
-
import { VisualSlotContext } from "./visual-slot.js";
|
|
11
|
+
import { HOSTED, VisualSlotContext } from "./visual-slot.js";
|
|
12
12
|
const EMPTY = "\u2014";
|
|
13
13
|
function CellState({ state }) {
|
|
14
14
|
if (state.kind === "empty") {
|
|
@@ -27,58 +27,86 @@ function CellState({ state }) {
|
|
|
27
27
|
state.onRetry !== void 0 && /* @__PURE__ */ jsx(RetryButton, { onClick: state.onRetry, retrying: state.retrying ?? false })
|
|
28
28
|
] });
|
|
29
29
|
}
|
|
30
|
+
function lastTrackOf(cell, state) {
|
|
31
|
+
if (state !== void 0) return state.kind === "empty" && state.reason !== void 0 ? 4 : 2;
|
|
32
|
+
if (cell.rows !== void 0)
|
|
33
|
+
return cell.footer !== void 0 ? 6 : cell.visual !== void 0 ? 5 : 4;
|
|
34
|
+
if (cell.visual !== void 0) return 4;
|
|
35
|
+
return cell.footer !== void 0 ? 3 : 2;
|
|
36
|
+
}
|
|
30
37
|
function StripCell({ cell }) {
|
|
31
38
|
const captionId = useId();
|
|
32
39
|
const { rows, loading } = cell;
|
|
33
40
|
const state = loading ? void 0 : cell.state;
|
|
34
41
|
const hasHero = cell.value !== void 0 || rows === void 0;
|
|
35
42
|
const ownFooter = cell.visual !== void 0 && rows === void 0;
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
const heroFooter = hasHero && cell.visual === void 0 && rows === void 0;
|
|
44
|
+
const hostSlot = !hasHero ? null : cell.tone === void 0 ? HOSTED : { tone: cell.tone };
|
|
45
|
+
const lastTrack = lastTrackOf(cell, state);
|
|
46
|
+
const footerEl = cell.footer !== void 0 && /* @__PURE__ */ jsx("div", { className: cx(classes.footer, heroFooter && classes.heroFooter), "data-strip-footer": true, children: cell.footer });
|
|
47
|
+
const heroEl = loading ? /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonValue, radius: "sm" }) : /* @__PURE__ */ jsxs("div", { className: classes.valueRow, children: [
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
"span",
|
|
50
|
+
{
|
|
51
|
+
className: classes.value,
|
|
52
|
+
"data-strip-value": true,
|
|
53
|
+
style: cell.tone !== void 0 ? { color: VX.status[cell.tone] } : void 0,
|
|
54
|
+
children: cell.value ?? EMPTY
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
cell.value !== void 0 && cell.value !== null && cell.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.unit, children: cell.unit }),
|
|
58
|
+
cell.delta
|
|
59
|
+
] });
|
|
60
|
+
return (
|
|
61
|
+
// The slot owns the dividers and stretches to the row; the article inside ends at its content.
|
|
62
|
+
/* @__PURE__ */ jsx("div", { className: classes.cell, "data-strip-slot": true, children: /* @__PURE__ */ jsxs(
|
|
63
|
+
"article",
|
|
64
|
+
{
|
|
65
|
+
className: classes.content,
|
|
66
|
+
style: { "--basalt-strip-span": lastTrack },
|
|
67
|
+
"data-strip-cell": cell.key,
|
|
68
|
+
"data-shot": `strip-${cell.key}`,
|
|
69
|
+
"aria-labelledby": captionId,
|
|
70
|
+
...state === void 0 && cell.visual !== void 0 && { "data-strip-has-visual": "" },
|
|
71
|
+
...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
|
|
72
|
+
...cell.stale && { "data-stale": "true" },
|
|
73
|
+
children: [
|
|
74
|
+
/* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: classes.captionMain, children: [
|
|
76
|
+
/* @__PURE__ */ jsxs("span", { className: classes.lead, children: [
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
"span",
|
|
79
|
+
{
|
|
80
|
+
className: classes.caption,
|
|
81
|
+
id: captionId,
|
|
82
|
+
title: cell.caption,
|
|
83
|
+
"data-strip-caption": true,
|
|
84
|
+
children: cell.caption
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
cell.info !== void 0 && /* @__PURE__ */ jsx(InfoGlyph, { text: cell.info })
|
|
88
|
+
] }),
|
|
89
|
+
cell.qualifier !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.qualifier, children: cell.qualifier })
|
|
90
|
+
] }),
|
|
91
|
+
cell.action !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.action, "data-strip-action": true, children: cell.action })
|
|
52
92
|
] }),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
/* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hasHero, children: cell.visual }) }),
|
|
71
|
-
ownFooter && footerEl
|
|
72
|
-
] }),
|
|
73
|
-
state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
|
|
74
|
-
/* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
|
|
75
|
-
/* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
|
|
76
|
-
/* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.value ?? EMPTY }),
|
|
77
|
-
/* @__PURE__ */ jsx("span", { children: row.delta })
|
|
78
|
-
] }, row.key)) })),
|
|
79
|
-
state === void 0 && !ownFooter && footerEl
|
|
80
|
-
]
|
|
81
|
-
}
|
|
93
|
+
state !== void 0 && /* @__PURE__ */ jsx(CellState, { state }),
|
|
94
|
+
state === void 0 && hasHero && heroEl,
|
|
95
|
+
state === void 0 && heroFooter && footerEl,
|
|
96
|
+
state === void 0 && cell.visual !== void 0 && /* @__PURE__ */ jsxs("div", { className: classes.visualStack, children: [
|
|
97
|
+
/* @__PURE__ */ jsx("div", { className: classes.visual, "data-strip-visual": true, children: /* @__PURE__ */ jsx(VisualSlotContext.Provider, { value: hostSlot, children: cell.visual }) }),
|
|
98
|
+
ownFooter && footerEl
|
|
99
|
+
] }),
|
|
100
|
+
state === void 0 && rows !== void 0 && (loading ? /* @__PURE__ */ jsx("div", { className: classes.rows, "aria-hidden": "true", children: rows.map((row) => /* @__PURE__ */ jsx(Skeleton, { className: classes.skeletonRow, radius: "sm" }, row.key)) }) : /* @__PURE__ */ jsx("ul", { className: classes.rows, "data-strip-rows": true, children: rows.map((row) => /* @__PURE__ */ jsxs("li", { className: classes.row, "data-strip-row": row.key, children: [
|
|
101
|
+
/* @__PURE__ */ jsx("span", { className: classes.rowLabel, children: row.label }),
|
|
102
|
+
/* @__PURE__ */ jsx("span", { className: classes.visual, children: row.visual }),
|
|
103
|
+
/* @__PURE__ */ jsx("span", { className: classes.rowValue, children: row.hideValue ? null : row.value ?? EMPTY }),
|
|
104
|
+
/* @__PURE__ */ jsx("span", { children: row.delta })
|
|
105
|
+
] }, row.key)) })),
|
|
106
|
+
state === void 0 && !ownFooter && !heroFooter && footerEl
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
) })
|
|
82
110
|
);
|
|
83
111
|
}
|
|
84
112
|
function StatStrip({ label, cells, footer, cols, className, style }) {
|
|
@@ -27,17 +27,33 @@
|
|
|
27
27
|
margin: -1px 0 0 -1px;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
+
/* The CELL is the row-high column: it owns the hairlines, so they run the whole row however short
|
|
31
|
+
* the cell inside it ends. It paints nothing else — the one surface stays the Card's. */
|
|
30
32
|
.cell {
|
|
31
33
|
display: grid;
|
|
32
|
-
grid-row: span
|
|
34
|
+
grid-row: span 6;
|
|
33
35
|
grid-template-rows: subgrid;
|
|
34
36
|
min-width: 0;
|
|
35
|
-
|
|
37
|
+
/* The foot inset lives HERE, on the row-high slot (it lands on the last track of every cell
|
|
38
|
+
* alike). A cell that ends early must not carry it: its padding would inflate the shared track
|
|
39
|
+
* it ends in and push the parts below out of line. */
|
|
40
|
+
padding-block-end: var(--vx-space-stack-md);
|
|
36
41
|
box-shadow:
|
|
37
42
|
-1px 0 0 var(--vx-divider),
|
|
38
43
|
0 -1px 0 var(--vx-divider);
|
|
39
44
|
}
|
|
40
45
|
|
|
46
|
+
/* The CONTENT spans the same six tracks (parts align through the subgrid) but is `align-self: start`,
|
|
47
|
+
* so its own box ends at its content instead of at the row's bottom. */
|
|
48
|
+
.content {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-row: 1 / span var(--basalt-strip-span, 6);
|
|
51
|
+
grid-template-rows: subgrid;
|
|
52
|
+
align-self: start;
|
|
53
|
+
min-width: 0;
|
|
54
|
+
padding: var(--vx-space-stack-md) var(--vx-space-stack-md) 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
41
57
|
/* Forced colors drop box-shadows, so the hairlines come back as CanvasText borders. Every cell takes
|
|
42
58
|
* both, so they stay level with each other; `.clip` still hides the leading ones. */
|
|
43
59
|
@media (forced-colors: active) {
|
|
@@ -47,22 +63,22 @@
|
|
|
47
63
|
}
|
|
48
64
|
}
|
|
49
65
|
|
|
50
|
-
/* Cells align by PART. Every cell
|
|
51
|
-
* rows, footer), so a row of cells shares one caption top and one value baseline, and a void opens
|
|
52
|
-
* only where a sibling's same part is taller. A
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* rides in the visual track
|
|
66
|
+
/* Cells align by PART. Every cell sits on the same six tracks of `.cells` (caption, hero, hero footer,
|
|
67
|
+
* visual, rows, footer), so a row of cells shares one caption top and one value baseline, and a void opens
|
|
68
|
+
* only where a sibling's same part is taller. A cell SPANS only down to its last part
|
|
69
|
+
* (`--basalt-strip-span`), so its own box ends at its content; the slot around it runs the whole
|
|
70
|
+
* row. A part a cell lacks collapses its track (the spacing is a margin on the part, not a gap).
|
|
71
|
+
* A footer rides with what it captions: under a hero alone it takes the hero-footer track right
|
|
72
|
+
* below the hero, under a visual it rides in the visual track (`.visualStack`); only a rows
|
|
57
73
|
* cell's footer uses the shared footer track. A hero-less cell (rows only) starts its rows in the
|
|
58
74
|
* visual track, so the hero track above them is the one void, and only as tall as a sibling's
|
|
59
75
|
* value. */
|
|
60
|
-
.
|
|
76
|
+
.content > * {
|
|
61
77
|
grid-column: 1;
|
|
62
78
|
min-width: 0;
|
|
63
79
|
}
|
|
64
80
|
|
|
65
|
-
.
|
|
81
|
+
.content > :not(.captionLine) {
|
|
66
82
|
margin-block-start: var(--vx-space-stack-sm);
|
|
67
83
|
}
|
|
68
84
|
|
|
@@ -72,22 +88,24 @@
|
|
|
72
88
|
grid-row: 2;
|
|
73
89
|
}
|
|
74
90
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
78
|
-
.cell > .footer {
|
|
91
|
+
/* A hero's footer has its own track right under the hero track, so it hugs the value however tall a
|
|
92
|
+
* sibling's visual is, and a cell without a footer never spans (or reserves) it. */
|
|
93
|
+
.content > .heroFooter {
|
|
79
94
|
grid-row: 3;
|
|
80
95
|
}
|
|
81
96
|
|
|
82
|
-
.
|
|
97
|
+
.content > .visualStack,
|
|
98
|
+
.content > .reason,
|
|
99
|
+
.content > .rows {
|
|
83
100
|
grid-row: 4;
|
|
84
101
|
}
|
|
85
102
|
|
|
86
|
-
.
|
|
103
|
+
.content[data-strip-has-visual] > .rows {
|
|
87
104
|
grid-row: 5;
|
|
88
105
|
}
|
|
89
106
|
|
|
90
|
-
.
|
|
107
|
+
.content > .footer:not(.heroFooter) {
|
|
108
|
+
grid-row: 6;
|
|
91
109
|
align-self: start;
|
|
92
110
|
}
|
|
93
111
|
|
|
@@ -110,6 +128,16 @@
|
|
|
110
128
|
.captionLine {
|
|
111
129
|
grid-row: 1;
|
|
112
130
|
display: flex;
|
|
131
|
+
flex-wrap: nowrap;
|
|
132
|
+
align-items: center;
|
|
133
|
+
column-gap: var(--vx-space-control-gap);
|
|
134
|
+
min-width: 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* Caption + qualifier wrap among themselves; the `action` beside them never joins the wrap. */
|
|
138
|
+
.captionMain {
|
|
139
|
+
display: flex;
|
|
140
|
+
flex: 1 1 0;
|
|
113
141
|
flex-wrap: wrap;
|
|
114
142
|
align-items: center;
|
|
115
143
|
column-gap: var(--vx-space-control-gap);
|
|
@@ -147,6 +175,14 @@
|
|
|
147
175
|
overflow-wrap: anywhere;
|
|
148
176
|
}
|
|
149
177
|
|
|
178
|
+
/* A control at the end of the caption line: it keeps its size, the caption truncates first. */
|
|
179
|
+
.action {
|
|
180
|
+
display: inline-flex;
|
|
181
|
+
flex: none;
|
|
182
|
+
align-items: center;
|
|
183
|
+
margin-inline-start: auto;
|
|
184
|
+
}
|
|
185
|
+
|
|
150
186
|
.valueRow {
|
|
151
187
|
display: flex;
|
|
152
188
|
flex-wrap: wrap;
|
|
@@ -180,7 +216,7 @@
|
|
|
180
216
|
height: calc(var(--vx-text-kpi) * 1.25);
|
|
181
217
|
}
|
|
182
218
|
|
|
183
|
-
.
|
|
219
|
+
.content[data-stale] {
|
|
184
220
|
/* The package's one dimmed-state value (controls.module.css, panel-row.module.css). */
|
|
185
221
|
opacity: 0.55;
|
|
186
222
|
}
|
|
@@ -201,7 +237,7 @@
|
|
|
201
237
|
/* A Sparkline's hover readout takes this line above its plot (`charts/sparkline.module.css`). The
|
|
202
238
|
* cell's own stack gap already sits above it; the slot reserves the rest, so the chip never covers
|
|
203
239
|
* the value. */
|
|
204
|
-
.
|
|
240
|
+
.content {
|
|
205
241
|
--basalt-spark-readout-h: 1.125rem;
|
|
206
242
|
}
|
|
207
243
|
|
|
@@ -282,6 +318,17 @@
|
|
|
282
318
|
margin-left: -1px;
|
|
283
319
|
}
|
|
284
320
|
|
|
321
|
+
/* A meter's start and end captions read as one phrase (name, then value) however wide the track. */
|
|
322
|
+
.footerCell [data-meter-captions] {
|
|
323
|
+
justify-content: flex-start;
|
|
324
|
+
column-gap: var(--vx-space-stack-md);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.footerCell [data-meter-captions] > * {
|
|
328
|
+
margin-inline-start: 0;
|
|
329
|
+
text-align: start;
|
|
330
|
+
}
|
|
331
|
+
|
|
285
332
|
.footerCell {
|
|
286
333
|
flex: 1 1 14rem;
|
|
287
334
|
min-width: 0;
|
|
@@ -7,11 +7,15 @@ declare const classes: {
|
|
|
7
7
|
readonly clip: string
|
|
8
8
|
readonly cells: string
|
|
9
9
|
readonly cell: string
|
|
10
|
+
readonly content: string
|
|
11
|
+
readonly action: string
|
|
10
12
|
readonly captionLine: string
|
|
13
|
+
readonly captionMain: string
|
|
11
14
|
readonly lead: string
|
|
12
15
|
readonly caption: string
|
|
13
16
|
readonly qualifier: string
|
|
14
17
|
readonly valueRow: string
|
|
18
|
+
readonly heroFooter: string
|
|
15
19
|
readonly value: string
|
|
16
20
|
readonly unit: string
|
|
17
21
|
readonly skeletonValue: string
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Tone } from '../common/props.js';
|
|
2
|
+
export interface VisualSlot {
|
|
3
|
+
readonly tone?: Tone;
|
|
4
|
+
}
|
|
5
|
+
/** A host with no verdict of its own: one shared object, so a provider never re-renders its readers. */
|
|
6
|
+
export declare const HOSTED: VisualSlot;
|
|
7
|
+
export declare const VisualSlotContext: import("react").Context<VisualSlot | null>;
|
|
2
8
|
//# sourceMappingURL=visual-slot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"visual-slot.d.ts","sourceRoot":"","sources":["../../src/dashboard/visual-slot.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"visual-slot.d.ts","sourceRoot":"","sources":["../../src/dashboard/visual-slot.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAE3C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CACrB;AAED,wGAAwG;AACxG,eAAO,MAAM,MAAM,EAAE,UAAe,CAAA;AAEpC,eAAO,MAAM,iBAAiB,4CAAyC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"vx-names.d.ts","sourceRoot":"","sources":["../../src/guard/vx-names.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAgO5C,CAAA"}
|
package/dist/guard/vx-names.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export { ThemeToggle } from './theme/theme-toggle.js';
|
|
|
15
15
|
export { StatusDot, type StatusDotProps } from './theme/status-dot.js';
|
|
16
16
|
export { StatusVerdict, type StatusVerdictProps } from './theme/status-verdict.js';
|
|
17
17
|
export { BasaltShell, PageBar, PageAside, useSizeClass, PageTitle, type ShellBaseProps, type SidebarBlock, type SettingsMenuItem, } from './shell/index.js';
|
|
18
|
-
export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, } from './dashboard/index.js';
|
|
18
|
+
export { WidgetHeader, DeltaBadge, Section, StatCard, type StatCardBreakdownRow, type StatCardSparklineSize, StatGroup, type StatStripCell, type StatStripRow, EmptyState, SettingsSection, SettingsRow, DangerZone, Meter, type MeterProps, type MeterSegment, type MeterTick, type MeterZone, BarList, type BarListProps, PageSummary, type PageSummaryProps, } from './dashboard/index.js';
|
|
19
19
|
export { unwrap } from './unwrap.js';
|
|
20
20
|
export type { BasaltRegister, SeriesKey } from './register.js';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAA;AACrE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,0BAA0B,CAAA;AACjC,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;A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Summary
|
|
37
38
|
} from "./dashboard/index.js";
|
|
38
39
|
import { unwrap } from "./unwrap.js";
|
|
39
40
|
export {
|
|
@@ -46,6 +47,7 @@ export {
|
|
|
46
47
|
Meter,
|
|
47
48
|
PageAside,
|
|
48
49
|
PageBar,
|
|
50
|
+
PageSummary,
|
|
49
51
|
PageTitle,
|
|
50
52
|
Section,
|
|
51
53
|
SettingsRow,
|
package/dist/styles.css
CHANGED
|
@@ -67,6 +67,32 @@
|
|
|
67
67
|
text-size-adjust: 100%;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
+
/* A slashed zero belongs to data text only. Hubot Sans (the heading face) draws one, and it leaked
|
|
71
|
+
into every title that borrows the face (`2026`, `90 days`). `zero` is OFF by default and nothing
|
|
72
|
+
in the package turns it on, so this is the off state at the root: it inherits into every head-face
|
|
73
|
+
surface whether a heading element, a Mantine title or a CSS-module class that only sets the
|
|
74
|
+
family, and is a no-op on the mono stack. */
|
|
75
|
+
:root {
|
|
76
|
+
font-feature-settings: 'zero' 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/* Mono data text drops its ligatures: `<>` in a facts line is two characters, not a diamond. Reaches
|
|
80
|
+
the mono stack by element (code, kbd, samp, pre), by contract (`data-numeric`, `data-monospace`),
|
|
81
|
+
by Mantine's `ff="monospace"` inline style, and by the stack's own var in an inline style. Body
|
|
82
|
+
sans keeps its ligatures. A CSS-module class that only sets the mono family is out of reach. */
|
|
83
|
+
code,
|
|
84
|
+
kbd,
|
|
85
|
+
samp,
|
|
86
|
+
pre,
|
|
87
|
+
[data-numeric],
|
|
88
|
+
[data-monospace],
|
|
89
|
+
[style*='font-family-monospace'],
|
|
90
|
+
[style*='basalt-font-mono'],
|
|
91
|
+
.mantine-Code-root,
|
|
92
|
+
.mantine-Kbd-root {
|
|
93
|
+
font-variant-ligatures: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
70
96
|
/* Removes the grey tap-highlight flash on iOS/Android for anything actually tappable. Scoped to
|
|
71
97
|
the interactive roles/tags rather than `*` (argo's own rule): a highlight on non-interactive
|
|
72
98
|
content is not the flash this exists to remove, and `*` would also numb a consumer's own
|
|
@@ -144,6 +170,14 @@
|
|
|
144
170
|
outline-color: var(--vx-accent);
|
|
145
171
|
}
|
|
146
172
|
|
|
173
|
+
/* The chart host is a focusable element Mantine does not own, so no `mantine-focus-*` class reaches
|
|
174
|
+
it and the UA ring paints instead: a white double ring in dark (argo strength strip and
|
|
175
|
+
diagnostics at dark 390). There is no media or pointer branch behind it. */
|
|
176
|
+
.basalt-chart:focus-visible {
|
|
177
|
+
outline: 2px solid var(--vx-accent);
|
|
178
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
179
|
+
}
|
|
180
|
+
|
|
147
181
|
/* Hubot Sans is a condensed display face — the spec pins it at 88% font-stretch everywhere it
|
|
148
182
|
lands (headings + the Mantine Title component). Read from the knob declared above rather than
|
|
149
183
|
hardcoded here, so a consumer retunes it in one declaration instead of fighting these bare
|
|
@@ -156,8 +190,6 @@
|
|
|
156
190
|
h6,
|
|
157
191
|
.mantine-Title-root {
|
|
158
192
|
font-stretch: var(--basalt-font-head-stretch, 88%);
|
|
159
|
-
/* Hubot Sans draws a slashed zero by default; a heading numeral is a figure, not code. */
|
|
160
|
-
font-feature-settings: 'zero' 0;
|
|
161
193
|
font-variant-numeric: lining-nums;
|
|
162
194
|
}
|
|
163
195
|
|
|
@@ -77,11 +77,13 @@ export declare function inkVars(props: {
|
|
|
77
77
|
variant?: string | undefined;
|
|
78
78
|
}): InkVars;
|
|
79
79
|
/**
|
|
80
|
-
* Tabs vars: the
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
80
|
+
* Tabs vars: the selected tab reads by ink and weight, never the accent (SPEC § 6.12; DESIGN-CORE
|
|
81
|
+
* § Accent discipline). `default` and `outline` paint their active underline/border from
|
|
82
|
+
* `--tabs-color`, so that is ink; `pills` fills the tab with it, so the fill is an ink-mixed panel
|
|
83
|
+
* and the label (`--tabs-text-color`) is ink, not the on-accent white. An explicit `color=` opts out
|
|
84
|
+
* of all three and keeps the on-color text var. The return type lists `--tabs-text-color` and
|
|
85
|
+
* `--tabs-radius` because Mantine's `TabsCssVariables` type declares only `--tabs-color` /
|
|
86
|
+
* `--tabs-radius` while Tabs' OWN varsResolver writes `--tabs-text-color` (an upstream type gap).
|
|
85
87
|
*/
|
|
86
88
|
export declare function tabsVars(theme: MantineTheme, props: {
|
|
87
89
|
color?: string | null | undefined;
|
|
@@ -90,5 +92,18 @@ export declare function tabsVars(theme: MantineTheme, props: {
|
|
|
90
92
|
}): {
|
|
91
93
|
root: Record<'--tabs-color' | '--tabs-radius' | '--tabs-text-color', string | undefined>;
|
|
92
94
|
};
|
|
95
|
+
/**
|
|
96
|
+
* Badge vars (SPEC § 6.10): the status chip is the neutral surface with an ink word, and a named
|
|
97
|
+
* colour is a leading status dot, not a tinted slab (W36 r3/r6 "tinted status Badges"). Only the
|
|
98
|
+
* `light` variant (the theme default); `filled`, `outline`, `dot` and `default` keep their meaning —
|
|
99
|
+
* 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
|
|
100
|
+
* no-signal chip. A `leftSection` glyph replaces the dot.
|
|
101
|
+
*/
|
|
102
|
+
export declare function badgeVars(theme: MantineTheme, props: {
|
|
103
|
+
color?: string | null | undefined;
|
|
104
|
+
variant?: string | undefined;
|
|
105
|
+
}): {
|
|
106
|
+
root: Record<'--badge-bg' | '--badge-color' | '--badge-dot' | '--badge-dot-content' | '--badge-dot-cols', string | undefined>;
|
|
107
|
+
};
|
|
93
108
|
export {};
|
|
94
109
|
//# sourceMappingURL=chrome-vars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chrome-vars.d.ts","sourceRoot":"","sources":["../../src/theme/chrome-vars.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YA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AM,GAAG,SAAS,CAAA;CAAE,GACzE;IACD,IAAI,EAAE,MAAM,CACV,YAAY,GAAG,eAAe,GAAG,aAAa,GAAG,qBAAqB,GAAG,kBAAkB,EAC3F,MAAM,GAAG,SAAS,CACnB,CAAA;CACF,CAuBA"}
|
|
@@ -27,17 +27,60 @@ function inkVars(props) {
|
|
|
27
27
|
if (!Object.hasOwn(INK_BY_VARIANT, variant)) return {};
|
|
28
28
|
return INK_BY_VARIANT[variant] ?? {};
|
|
29
29
|
}
|
|
30
|
+
const PILL_FILL = "color-mix(in srgb, var(--vx-ink) 12%, var(--vx-surface-panel))";
|
|
30
31
|
function tabsVars(theme, props) {
|
|
31
|
-
|
|
32
|
+
if (hasExplicitColor(props.color)) {
|
|
33
|
+
return {
|
|
34
|
+
root: {
|
|
35
|
+
"--tabs-text-color": onColorFor(theme, props),
|
|
36
|
+
"--tabs-color": void 0,
|
|
37
|
+
"--tabs-radius": void 0
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const pills = props.variant === "pills";
|
|
32
42
|
return {
|
|
33
43
|
root: {
|
|
34
|
-
"--tabs-text-color": onColorFor(theme, props),
|
|
35
|
-
"--tabs-color":
|
|
44
|
+
"--tabs-text-color": pills ? INK : onColorFor(theme, props),
|
|
45
|
+
"--tabs-color": pills ? PILL_FILL : INK,
|
|
36
46
|
"--tabs-radius": void 0
|
|
37
47
|
}
|
|
38
48
|
};
|
|
39
49
|
}
|
|
50
|
+
function dotColor(theme, color) {
|
|
51
|
+
if (Object.hasOwn(theme.colors, color)) return `var(--mantine-color-${color}-filled)`;
|
|
52
|
+
const [name, shade] = color.split(".");
|
|
53
|
+
if (name !== void 0 && shade !== void 0 && /^\d$/.test(shade) && Object.hasOwn(theme.colors, name)) {
|
|
54
|
+
return `var(--mantine-color-${name}-${shade})`;
|
|
55
|
+
}
|
|
56
|
+
return color;
|
|
57
|
+
}
|
|
58
|
+
function badgeVars(theme, props) {
|
|
59
|
+
const none = {
|
|
60
|
+
"--badge-bg": void 0,
|
|
61
|
+
"--badge-color": void 0,
|
|
62
|
+
"--badge-dot": void 0,
|
|
63
|
+
"--badge-dot-content": void 0,
|
|
64
|
+
"--badge-dot-cols": void 0
|
|
65
|
+
};
|
|
66
|
+
if ((props.variant ?? "light") !== "light") return { root: none };
|
|
67
|
+
const name = props.color ?? "gray";
|
|
68
|
+
const dot = name === "gray" ? void 0 : dotColor(theme, name);
|
|
69
|
+
return {
|
|
70
|
+
root: {
|
|
71
|
+
...none,
|
|
72
|
+
"--badge-bg": SUBTLE,
|
|
73
|
+
"--badge-color": INK,
|
|
74
|
+
...dot !== void 0 && {
|
|
75
|
+
"--badge-dot": dot,
|
|
76
|
+
"--badge-dot-content": "''",
|
|
77
|
+
"--badge-dot-cols": "auto 1fr"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
40
82
|
export {
|
|
83
|
+
badgeVars,
|
|
41
84
|
hasExplicitColor,
|
|
42
85
|
inkVars,
|
|
43
86
|
onColor,
|
|
@@ -200,6 +200,11 @@ html[data-mantine-color-scheme] .inputWrapper[data-variant='default']:not([data-
|
|
|
200
200
|
.actionIconRoot:disabled:not([data-loading]),
|
|
201
201
|
.actionIconRoot[data-disabled]:not([data-loading]) {
|
|
202
202
|
--ctrl-depth: 0 0 transparent;
|
|
203
|
+
|
|
204
|
+
/* One surface in both schemes. Mantine's disabled fill is a gray step that is the PANEL itself in
|
|
205
|
+
* dark, so a disabled Button there read as the subtle variant with dimmer text; an ink-mixed panel
|
|
206
|
+
* is visible on either page, and the state is told apart by more than ink. */
|
|
207
|
+
background: color-mix(in srgb, var(--vx-ink) 8%, var(--vx-surface-panel));
|
|
203
208
|
}
|
|
204
209
|
|
|
205
210
|
/*
|
|
@@ -318,6 +323,24 @@ html .tableRoot tbody tr:last-of-type {
|
|
|
318
323
|
border-bottom: none;
|
|
319
324
|
}
|
|
320
325
|
|
|
326
|
+
/*
|
|
327
|
+
* Badge status dot: a coloured `light` Badge is the neutral surface + ink word with a leading dot in the
|
|
328
|
+
* status colour (`badgeVars` writes the `--badge-dot*` vars; nothing here without them). The dot is a
|
|
329
|
+
* grid item, so the root takes two columns while it is shown. A section (left or right) replaces it.
|
|
330
|
+
*/
|
|
331
|
+
.badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section]) {
|
|
332
|
+
grid-template-columns: var(--badge-dot-cols, none);
|
|
333
|
+
column-gap: calc(0.25rem * var(--mantine-scale));
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section])::before {
|
|
337
|
+
content: var(--badge-dot-content, none);
|
|
338
|
+
width: calc(0.375rem * var(--mantine-scale));
|
|
339
|
+
height: calc(0.375rem * var(--mantine-scale));
|
|
340
|
+
border-radius: 50%;
|
|
341
|
+
background: var(--badge-dot);
|
|
342
|
+
}
|
|
343
|
+
|
|
321
344
|
/*
|
|
322
345
|
* Badge leading glyph (`leftSection`): the state encoded by shape. 12px on a 20px chip, 4px gap
|
|
323
346
|
* (Mantine's own section margin is spacing.xs / 2 = 4), centred on the label.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EA0CV,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAe,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAKpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAWvD;;;;;GAKG;AACH,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAIvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAMvD,OAAO,EAAE,SAAS,EAAE,OAAO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