basalt-ui 2.21.0 → 2.23.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 +60 -0
- package/MIGRATING.md +452 -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 +73 -3
- package/dist/charts/Bars.d.ts.map +1 -1
- package/dist/charts/Bars.js +6 -0
- package/dist/charts/CartesianChart.d.ts +10 -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 +39 -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 +14 -2
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +101 -22
- 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 +38 -1
- package/dist/charts/band-fold.d.ts.map +1 -1
- package/dist/charts/band-fold.js +18 -1
- package/dist/charts/chart-box.module.css +19 -0
- package/dist/charts/chart-card.module.css +25 -0
- package/dist/charts/chart-dates.d.ts +12 -0
- package/dist/charts/chart-dates.d.ts.map +1 -0
- package/dist/charts/chart-dates.js +16 -0
- package/dist/charts/chart-legend.module.css +7 -0
- package/dist/charts/compile.d.ts +25 -6
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +152 -72
- package/dist/charts/date-tick-format.d.ts +5 -5
- package/dist/charts/date-tick-format.d.ts.map +1 -1
- package/dist/charts/date-tick-format.js +3 -7
- package/dist/charts/labels.d.ts +21 -6
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +52 -17
- 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 +43 -0
- package/dist/charts/ref-label.d.ts.map +1 -0
- package/dist/charts/ref-label.js +75 -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 +13 -17
- 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 +5 -2
- package/dist/charts/types.d.ts +18 -8
- 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 +202 -36
- package/dist/cli/shot/detect.d.ts.map +1 -1
- package/dist/cli/shot/detect.js +17 -1
- package/dist/cli/shot/playwright.d.ts +13 -2
- package/dist/cli/shot/playwright.d.ts.map +1 -1
- package/dist/cli/shot/playwright.js +5 -1
- package/dist/cli/shot/types.d.ts +4 -0
- package/dist/cli/shot/types.d.ts.map +1 -1
- package/dist/cli/shot/types.js +2 -0
- package/dist/cli/tokens-css.d.ts +5 -7
- package/dist/cli/tokens-css.d.ts.map +1 -1
- package/dist/cli/tokens-css.js +11 -12
- 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 +6 -1
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +15 -8
- package/dist/dashboard/bar-list.module.css +83 -0
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/delta-badge.d.ts.map +1 -1
- package/dist/dashboard/delta-badge.js +2 -2
- 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 +84 -5
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +100 -15
- package/dist/dashboard/meter-parts.d.ts +9 -1
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +276 -74
- package/dist/dashboard/meter.d.ts +54 -65
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.js +21 -4
- package/dist/dashboard/meter.module.css +76 -0
- package/dist/dashboard/meter.module.css.d.ts +6 -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/query-state.d.ts.map +1 -1
- package/dist/dashboard/query-state.js +1 -1
- 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 +36 -0
- package/dist/dashboard/stat-group.module.css +7 -0
- package/dist/dashboard/stat-strip.d.ts +22 -6
- package/dist/dashboard/stat-strip.d.ts.map +1 -1
- package/dist/dashboard/stat-strip.js +104 -60
- package/dist/dashboard/stat-strip.module.css +122 -53
- 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/index.d.ts.map +1 -1
- package/dist/guard/index.js +0 -5
- 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 +43 -4
- 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 +37 -0
- package/dist/theme/controls.module.css.d.ts +2 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +18 -27
- package/dist/theme/status-verdict.d.ts.map +1 -1
- package/dist/theme/status-verdict.js +9 -1
- 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 +11 -10
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +11 -10
- package/dist/tokens/status-text.d.ts.map +1 -1
- package/dist/tokens/status-text.js +3 -1
- package/llms.txt +42 -22
- package/package.json +1 -1
- package/src/charts/BandStrip.tsx +83 -3
- package/src/charts/Bars.tsx +7 -0
- package/src/charts/CartesianChart.tsx +18 -3
- package/src/charts/ChartCard.tsx +54 -13
- 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 +135 -25
- package/src/charts/StackedArea.tsx +14 -4
- package/src/charts/band-fold.ts +50 -1
- package/src/charts/chart-box.module.css +19 -0
- package/src/charts/chart-card.module.css +25 -0
- package/src/charts/chart-dates.ts +30 -0
- package/src/charts/chart-legend.module.css +7 -0
- package/src/charts/compile.ts +253 -87
- package/src/charts/date-tick-format.ts +10 -13
- package/src/charts/labels.ts +81 -26
- 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 +131 -0
- package/src/charts/scales.ts +22 -2
- package/src/charts/sparkline.module.css +13 -17
- package/src/charts/sparkline.module.css.d.ts +1 -2
- package/src/charts/state.tsx +9 -4
- package/src/charts/types.ts +18 -8
- package/src/cli/doctor-upgrade.ts +1 -1
- package/src/cli/init.ts +100 -3
- package/src/cli/shot/capture.ts +266 -35
- package/src/cli/shot/detect.ts +18 -1
- package/src/cli/shot/playwright.ts +20 -4
- package/src/cli/shot/types.ts +5 -0
- package/src/cli/tokens-css.ts +18 -20
- 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 +83 -0
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +107 -69
- package/src/dashboard/delta-badge.tsx +6 -2
- package/src/dashboard/index.ts +1 -0
- package/src/dashboard/meter-model.ts +207 -24
- package/src/dashboard/meter-parts.tsx +349 -67
- package/src/dashboard/meter.module.css +76 -0
- package/src/dashboard/meter.module.css.d.ts +6 -0
- package/src/dashboard/meter.tsx +72 -18
- 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/query-state.tsx +1 -1
- 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 +36 -0
- package/src/dashboard/stat-card.tsx +12 -6
- package/src/dashboard/stat-group.module.css +7 -0
- package/src/dashboard/stat-strip.module.css +122 -53
- package/src/dashboard/stat-strip.module.css.d.ts +4 -0
- package/src/dashboard/stat-strip.tsx +176 -91
- package/src/dashboard/visual-slot.ts +12 -3
- package/src/guard/index.ts +0 -5
- package/src/guard/vx-names.ts +2 -0
- package/src/index.ts +2 -0
- package/src/styles.css +43 -4
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +200 -68
- package/src/theme/chrome-vars.ts +77 -8
- package/src/theme/controls.module.css +37 -0
- package/src/theme/controls.module.css.d.ts +2 -0
- package/src/theme/index.ts +22 -32
- package/src/theme/status-verdict.tsx +5 -1
- package/src/tokens/core.ts +4 -1
- package/src/tokens/derive.ts +32 -3
- package/src/tokens/palette.ts +11 -10
- package/src/tokens/status-text.ts +2 -0
package/dist/guard/index.js
CHANGED
|
@@ -266,11 +266,6 @@ const GRACE_PERIOD_KINDS = {
|
|
|
266
266
|
since: "2.16.0",
|
|
267
267
|
promote: "2.24.0",
|
|
268
268
|
why: "The scale moved to 8/12/16/20/24 and the CSS micro ceiling dropped 10 \u2192 7 in 2.16.0: a literal 8px/10px in CSS is newly a finding."
|
|
269
|
-
},
|
|
270
|
-
"series-palette": {
|
|
271
|
-
since: "2.21.0",
|
|
272
|
-
promote: "2.23.0",
|
|
273
|
-
why: "New in 2.21.0: the series file is judged by computed lightness, chroma, colour-blind separation and contrast; a palette that was tuned by eye is newly a finding."
|
|
274
269
|
}
|
|
275
270
|
};
|
|
276
271
|
function severityOf(kind, cfg) {
|
|
@@ -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;AACnG,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,KAAK,SAAS,GACf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,SAAS,EACT,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,K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Ac,EACnB,KAAK,YAAY,EACjB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAA;AAChB,OAAO,EACL,YAAY,EACZ,UAAU,EACV,OAAO,EACP,QAAQ,EACR,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,UAAU,EACV,KAAK,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACd,OAAO,EACP,KAAK,YAAY,EACjB,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAMjC,YAAY,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,8 @@ import {
|
|
|
33
33
|
SettingsRow,
|
|
34
34
|
DangerZone,
|
|
35
35
|
Meter,
|
|
36
|
-
BarList
|
|
36
|
+
BarList,
|
|
37
|
+
PageSummary
|
|
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
|
@@ -31,6 +31,21 @@
|
|
|
31
31
|
@import '@fontsource-variable/hubot-sans';
|
|
32
32
|
@import '@fontsource-variable/jetbrains-mono';
|
|
33
33
|
|
|
34
|
+
/* Hubot Sans has no `zero` OpenType feature and its default zero is slashed, so a head-face "2026" or
|
|
35
|
+
* "90 days" cannot be fixed with `font-feature-settings`. Digits come from the sans instead: this
|
|
36
|
+
* face covers U+0030-0039 only, cut from the Nunito Sans variable file, and leads
|
|
37
|
+
* `--basalt-font-head`, so Hubot draws every letter and Nunito every digit. */
|
|
38
|
+
@font-face {
|
|
39
|
+
/* theme-allow raw-font-family — declares the face, uses nothing */
|
|
40
|
+
font-family: 'Basalt Head Digits';
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-display: swap;
|
|
43
|
+
font-weight: 200 1000;
|
|
44
|
+
src: url('@fontsource-variable/nunito-sans/files/nunito-sans-latin-wght-normal.woff2')
|
|
45
|
+
format('woff2-variations');
|
|
46
|
+
unicode-range: U+0030-0039;
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
/* Font stack — overridable via the --basalt-font-* custom properties. */
|
|
35
50
|
@layer base {
|
|
36
51
|
:root {
|
|
@@ -42,9 +57,10 @@
|
|
|
42
57
|
--basalt-font-sans:
|
|
43
58
|
'Nunito Sans Variable', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
|
|
44
59
|
Helvetica, Arial, sans-serif;
|
|
60
|
+
/* A consumer that sets its own head family replaces this stack, digit face included, by design. */
|
|
45
61
|
--basalt-font-head:
|
|
46
|
-
'Hubot Sans Variable', ui-sans-serif, system-ui, -apple-system,
|
|
47
|
-
Arial, sans-serif;
|
|
62
|
+
'Basalt Head Digits', 'Hubot Sans Variable', ui-sans-serif, system-ui, -apple-system,
|
|
63
|
+
'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
48
64
|
--basalt-font-mono: 'JetBrains Mono Variable', ui-monospace, 'SF Mono', Menlo, monospace;
|
|
49
65
|
/* Hero values, unit/count/delta text, bar-list and meter figures: proportional sans, lining
|
|
50
66
|
figures. Set to `var(--basalt-font-mono)` to restore the pre-Wave-35 mono numerals. */
|
|
@@ -67,6 +83,23 @@
|
|
|
67
83
|
text-size-adjust: 100%;
|
|
68
84
|
}
|
|
69
85
|
|
|
86
|
+
/* Mono data text drops its ligatures: `<>` in a facts line is two characters, not a diamond. Reaches
|
|
87
|
+
the mono stack by element (code, kbd, samp, pre), by contract (`data-numeric`, `data-monospace`),
|
|
88
|
+
by Mantine's `ff="monospace"` inline style, and by the stack's own var in an inline style. Body
|
|
89
|
+
sans keeps its ligatures. A CSS-module class that only sets the mono family is out of reach. */
|
|
90
|
+
code,
|
|
91
|
+
kbd,
|
|
92
|
+
samp,
|
|
93
|
+
pre,
|
|
94
|
+
[data-numeric],
|
|
95
|
+
[data-monospace],
|
|
96
|
+
[style*='font-family-monospace'],
|
|
97
|
+
[style*='basalt-font-mono'],
|
|
98
|
+
.mantine-Code-root,
|
|
99
|
+
.mantine-Kbd-root {
|
|
100
|
+
font-variant-ligatures: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
70
103
|
/* Removes the grey tap-highlight flash on iOS/Android for anything actually tappable. Scoped to
|
|
71
104
|
the interactive roles/tags rather than `*` (argo's own rule): a highlight on non-interactive
|
|
72
105
|
content is not the flash this exists to remove, and `*` would also numb a consumer's own
|
|
@@ -144,6 +177,14 @@
|
|
|
144
177
|
outline-color: var(--vx-accent);
|
|
145
178
|
}
|
|
146
179
|
|
|
180
|
+
/* The chart host is a focusable element Mantine does not own, so no `mantine-focus-*` class reaches
|
|
181
|
+
it and the UA ring paints instead: a white double ring in dark (argo strength strip and
|
|
182
|
+
diagnostics at dark 390). There is no media or pointer branch behind it. */
|
|
183
|
+
.basalt-chart:focus-visible {
|
|
184
|
+
outline: 2px solid var(--vx-accent);
|
|
185
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
186
|
+
}
|
|
187
|
+
|
|
147
188
|
/* Hubot Sans is a condensed display face — the spec pins it at 88% font-stretch everywhere it
|
|
148
189
|
lands (headings + the Mantine Title component). Read from the knob declared above rather than
|
|
149
190
|
hardcoded here, so a consumer retunes it in one declaration instead of fighting these bare
|
|
@@ -156,8 +197,6 @@
|
|
|
156
197
|
h6,
|
|
157
198
|
.mantine-Title-root {
|
|
158
199
|
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
200
|
font-variant-numeric: lining-nums;
|
|
162
201
|
}
|
|
163
202
|
|
|
@@ -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,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAIjG;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,GAC/E,MAAM,GAAG,SAAS,CAGpB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAE1E;AAED,KAAK,OAAO,GAAG;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAgBD;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,KAAK,EA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AY,EACnB,KAAK,EAAE;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CACnC,GACA;IAAE,IAAI,EAAE,MAAM,CAAC,cAAc,GAAG,eAAe,GAAG,mBAAmB,EAAE,MAAM,GAAG,SAAS,CAAC,CAAA;CAAE,CAkB9F;AAiBD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,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,30 @@ html .tableRoot tbody tr:last-of-type {
|
|
|
318
323
|
border-bottom: none;
|
|
319
324
|
}
|
|
320
325
|
|
|
326
|
+
/* A status word is the text as written ("Healthy"), not Mantine's UPPERCASE default; a caller who wants
|
|
327
|
+
* a micro-caption passes `tt="uppercase"`, which is inline and wins. `html` outranks Mantine's class. */
|
|
328
|
+
html .badgeRoot {
|
|
329
|
+
text-transform: none;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/*
|
|
333
|
+
* Badge status dot: a coloured `light` Badge is the neutral surface + ink word with a leading dot in the
|
|
334
|
+
* status colour (`badgeVars` writes the `--badge-dot*` vars; nothing here without them). The dot is a
|
|
335
|
+
* grid item, so the root takes two columns while it is shown. A section (left or right) replaces it.
|
|
336
|
+
*/
|
|
337
|
+
.badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section]) {
|
|
338
|
+
grid-template-columns: var(--badge-dot-cols, none);
|
|
339
|
+
column-gap: calc(0.25rem * var(--mantine-scale));
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.badgeRoot[data-variant='light']:not([data-with-left-section], [data-with-right-section])::before {
|
|
343
|
+
content: var(--badge-dot-content, none);
|
|
344
|
+
width: calc(0.375rem * var(--mantine-scale));
|
|
345
|
+
height: calc(0.375rem * var(--mantine-scale));
|
|
346
|
+
border-radius: 50%;
|
|
347
|
+
background: var(--badge-dot);
|
|
348
|
+
}
|
|
349
|
+
|
|
321
350
|
/*
|
|
322
351
|
* Badge leading glyph (`leftSection`): the state encoded by shape. 12px on a 20px chip, 4px gap
|
|
323
352
|
* (Mantine's own section margin is spacing.xs / 2 = 4), centred on the label.
|
|
@@ -336,3 +365,11 @@ html .tableRoot tbody tr:last-of-type {
|
|
|
336
365
|
.badgeSection img {
|
|
337
366
|
object-fit: contain;
|
|
338
367
|
}
|
|
368
|
+
|
|
369
|
+
/*
|
|
370
|
+
* Alert: an inline Code inside it sits one nested step (3px) under the Alert's own radius
|
|
371
|
+
* (craft-1/nested-radius-step). The Code theme reads `--basalt-code-radius`; the Alert supplies it.
|
|
372
|
+
*/
|
|
373
|
+
.alertRoot {
|
|
374
|
+
--basalt-code-radius: max(0px, calc(var(--alert-radius, var(--vx-radius-ctrl)) - 3px));
|
|
375
|
+
}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
declare const classes: {
|
|
6
6
|
readonly inputWrapper: string
|
|
7
7
|
readonly input: string
|
|
8
|
+
readonly alertRoot: string
|
|
8
9
|
readonly buttonRoot: string
|
|
9
10
|
readonly actionIconRoot: string
|
|
10
11
|
readonly checkboxCardRoot: string
|
|
@@ -13,6 +14,7 @@ declare const classes: {
|
|
|
13
14
|
readonly accordionItem: string
|
|
14
15
|
readonly tabsRoot: string
|
|
15
16
|
readonly tableRoot: string
|
|
17
|
+
readonly badgeRoot: string
|
|
16
18
|
readonly badgeSection: string
|
|
17
19
|
}
|
|
18
20
|
export default classes
|
|
@@ -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,O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gCD;+EAC+E;AAC/E,eAAO,MAAM,SAAS,EAAE,oBAAuD,CAAA;AA2R/E,6FAA6F;AAC7F,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAE9E,8FAA8F;AAC9F,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAsF7D;;8FAE8F;AAC9F,eAAO,MAAM,oBAAoB,EAAE,oBACc,CAAA;AAEjD,kEAAkE;AAClE,MAAM,MAAM,wBAAwB,GAAG;IACrC;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAA;IAE9B;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAA;IAEzB;;;;;;;;;;;;;;;;OAgBG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAA;IAE1B;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;CAC7B,CAAA;AAYD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,CAAC,EAAE,IAAI,CAAC,oBAAoB,EAAE,aAAa,CAAC,EACrD,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAiCtB"}
|
package/dist/theme/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { DEFAULT_DERIVE_CONFIG, isDefaultDeriveConfig, resolveDeriveConfig } fro
|
|
|
17
17
|
import { pxRem, TEXT_LINE, VX } from "../tokens/core.js";
|
|
18
18
|
import { CTL_HEIGHT_VARS } from "../tokens/ctl-vars.js";
|
|
19
19
|
import { SIZE_CLASS_BREAKPOINTS } from "../tokens/size-classes.js";
|
|
20
|
-
import { onColor, onColorFor, inkVars, tabsVars } from "./chrome-vars.js";
|
|
20
|
+
import { badgeVars, onColor, onColorFor, inkVars, tabsVars } from "./chrome-vars.js";
|
|
21
21
|
import cardInsetClasses from "./card-inset.module.css";
|
|
22
22
|
import controlsClasses from "./controls.module.css";
|
|
23
23
|
import floatingClasses from "./floating.module.css";
|
|
@@ -254,16 +254,19 @@ function buildTheme(data, options = {}) {
|
|
|
254
254
|
}
|
|
255
255
|
}),
|
|
256
256
|
// Status chip (SPEC § 6.10): `light` + `tight`, neutral until `color=` opts in (the accent is
|
|
257
|
-
// never a status chip's default)
|
|
257
|
+
// never a status chip's default). The neutral surface + ink word is the chip; a named colour is
|
|
258
|
+
// a leading dot (`badgeVars`); a `leftSection` glyph is sized in `badgeSection`.
|
|
258
259
|
Badge: ext({
|
|
259
260
|
defaultProps: { variant: "light", color: "gray", radius: radius.tight },
|
|
260
|
-
classNames: { section: controlsClasses.badgeSection }
|
|
261
|
+
classNames: { root: controlsClasses.badgeRoot, section: controlsClasses.badgeSection },
|
|
262
|
+
vars: badgeVars
|
|
261
263
|
}),
|
|
262
264
|
// Alert renders its title in the body font by default; bring it onto the head-font idiom
|
|
263
265
|
// (docs/DESIGN-SPEC.md §5) like every other titled surface. Radius/padding/color tint are
|
|
264
266
|
// already on-system (defaultRadius 'md' control tier + the variant color resolver), so only
|
|
265
267
|
// the title font is overridden.
|
|
266
268
|
Alert: ext({
|
|
269
|
+
classNames: { root: controlsClasses.alertRoot },
|
|
267
270
|
styles: {
|
|
268
271
|
title: {
|
|
269
272
|
fontFamily: "var(--basalt-font-head)",
|
|
@@ -506,11 +509,11 @@ function buildTheme(data, options = {}) {
|
|
|
506
509
|
// label that no longer fits its equal share truncates instead of forcing the column wide.
|
|
507
510
|
//
|
|
508
511
|
// The track's padding is `SPACE_FIXED.segmentedTrackInset`, a plain literal — NOT a
|
|
509
|
-
// `--vx-space-*` var — because it is density-EXEMPT
|
|
510
|
-
//
|
|
511
|
-
//
|
|
512
|
-
//
|
|
513
|
-
//
|
|
512
|
+
// `--vx-space-*` var — because it is density-EXEMPT (see that constant's doc in
|
|
513
|
+
// `tokens/palette.ts`). The INDICATOR radius is the track's per-instance radius (`--sc-radius`,
|
|
514
|
+
// which Mantine sets on the root from the `radius` prop) minus 3 px: exact concentricity would
|
|
515
|
+
// be track − inset (2 px), but `craft-1/nested-radius-step` wants nested surfaces ≥ 3 px apart
|
|
516
|
+
// and that lint step wins. A custom `radius` therefore nests too.
|
|
514
517
|
SegmentedControl: ext({
|
|
515
518
|
defaultProps: { radius: radius.ctrl },
|
|
516
519
|
classNames: {
|
|
@@ -549,7 +552,8 @@ function buildTheme(data, options = {}) {
|
|
|
549
552
|
// ink-12% fill sat one shade from the track and read as a hover state.
|
|
550
553
|
boxShadow: "var(--vx-shadow-raised)",
|
|
551
554
|
outline: "1px solid color-mix(in srgb, var(--vx-ink) 14%, transparent)",
|
|
552
|
-
|
|
555
|
+
// Track radius − 3 px: craft-1/nested-radius-step beats exact concentricity.
|
|
556
|
+
borderRadius: "max(0px, calc(var(--sc-radius, var(--vx-radius-ctrl)) - 3px))"
|
|
553
557
|
},
|
|
554
558
|
// Conditionally spread the WHOLE key (never a present `label: undefined`) — the package
|
|
555
559
|
// builds under `exactOptionalPropertyTypes`, which treats a key present-but-`undefined` as
|
|
@@ -768,7 +772,8 @@ function buildTheme(data, options = {}) {
|
|
|
768
772
|
styles: {
|
|
769
773
|
root: {
|
|
770
774
|
backgroundColor: "color-mix(in srgb, var(--vx-ink) 7%, transparent)",
|
|
771
|
-
|
|
775
|
+
// An Alert re-points the var (`controls.module.css`) so a nested Code steps down.
|
|
776
|
+
borderRadius: "var(--basalt-code-radius, var(--vx-radius-tight))"
|
|
772
777
|
}
|
|
773
778
|
}
|
|
774
779
|
}),
|
|
@@ -811,8 +816,8 @@ function buildTheme(data, options = {}) {
|
|
|
811
816
|
// The tab-list bottom rule (and the inactive-tab hover underline) is a layout separator, not
|
|
812
817
|
// control chrome — it reads the divider token instead of the heavy gray-3/dark-4 line
|
|
813
818
|
// (controls.module.css; custom properties are stripped from `styles` objects). The active tab
|
|
814
|
-
// underline
|
|
815
|
-
// `color=` opts back in.
|
|
819
|
+
// underline, outline border and pill fill take ink, not the accent (SPEC § 6.12; DESIGN-CORE
|
|
820
|
+
// § Accent discipline); `color=` opts back in.
|
|
816
821
|
Tabs: ext({
|
|
817
822
|
classNames: { root: controlsClasses.tabsRoot },
|
|
818
823
|
vars: tabsVars
|
|
@@ -918,22 +923,8 @@ function buttonPaddingX(size) {
|
|
|
918
923
|
const steps = BUTTON_PADDING_X[typeof size === "string" ? size : "sm"];
|
|
919
924
|
return steps === void 0 ? void 0 : `calc((${steps}) * var(--mantine-scale))`;
|
|
920
925
|
}
|
|
921
|
-
const BUTTON_SECTION_X = {
|
|
922
|
-
xs: "var(--vx-space-stack-sm)",
|
|
923
|
-
sm: "var(--vx-space-stack-md)",
|
|
924
|
-
md: "var(--vx-space-stack-md)",
|
|
925
|
-
lg: "var(--vx-space-stack-lg)",
|
|
926
|
-
xl: "var(--vx-space-stack-xl)",
|
|
927
|
-
ctl: "var(--vx-space-stack-sm)",
|
|
928
|
-
"compact-xs": "var(--vx-space-stack-xs)",
|
|
929
|
-
"compact-sm": "var(--vx-space-stack-xs)",
|
|
930
|
-
"compact-md": "var(--vx-space-stack-sm)",
|
|
931
|
-
"compact-lg": "var(--vx-space-stack-sm)",
|
|
932
|
-
"compact-xl": "var(--vx-space-stack-md)"
|
|
933
|
-
};
|
|
934
926
|
function buttonSectionX(size) {
|
|
935
|
-
|
|
936
|
-
return step === void 0 ? void 0 : `calc(${step} * var(--mantine-scale))`;
|
|
927
|
+
return size === "ctl" ? "var(--button-padding-x-ctl)" : buttonPaddingX(size);
|
|
937
928
|
}
|
|
938
929
|
const CTL_PADDING_X = 10;
|
|
939
930
|
const CTL_INPUT_PADDING_Y = 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-verdict.d.ts","sourceRoot":"","sources":["../../src/theme/status-verdict.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIlD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,+
|
|
1
|
+
{"version":3,"file":"status-verdict.d.ts","sourceRoot":"","sources":["../../src/theme/status-verdict.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIlD,MAAM,MAAM,kBAAkB,GAAG,WAAW,GAAG;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BAc1F"}
|
|
@@ -5,7 +5,15 @@ import classes from "./status-verdict.module.css";
|
|
|
5
5
|
function StatusVerdict({ color, word, phrase, className, style }) {
|
|
6
6
|
return /* @__PURE__ */ jsxs("span", { className: cx(classes.verdict, className), ...style !== void 0 && { style }, children: [
|
|
7
7
|
/* @__PURE__ */ jsx(StatusDot, { color }),
|
|
8
|
-
/* @__PURE__ */ jsx(
|
|
8
|
+
/* @__PURE__ */ jsx(
|
|
9
|
+
"span",
|
|
10
|
+
{
|
|
11
|
+
"data-verdict-word": "",
|
|
12
|
+
title: phrase ?? word,
|
|
13
|
+
...phrase !== void 0 && { "aria-hidden": true },
|
|
14
|
+
children: word
|
|
15
|
+
}
|
|
16
|
+
),
|
|
9
17
|
phrase !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.hidden, children: phrase })
|
|
10
18
|
] });
|
|
11
19
|
}
|
package/dist/tokens/core.d.ts
CHANGED
|
@@ -46,7 +46,6 @@ export declare const VX: {
|
|
|
46
46
|
readonly dotR: number;
|
|
47
47
|
readonly dashArray: "6 4";
|
|
48
48
|
readonly legendGap: number;
|
|
49
|
-
readonly legendFontSize: 13;
|
|
50
49
|
readonly text: {
|
|
51
50
|
readonly nano: 10;
|
|
52
51
|
readonly micro: 11;
|
|
@@ -113,6 +112,8 @@ export declare const VX: {
|
|
|
113
112
|
readonly bg: "var(--vx-surface-bg)";
|
|
114
113
|
readonly panel: "var(--vx-surface-panel)";
|
|
115
114
|
readonly panelHover: "var(--vx-surface-panel-hover)";
|
|
115
|
+
readonly rowHover: "var(--vx-surface-row-hover)";
|
|
116
|
+
readonly rowSelected: "var(--vx-surface-row-selected)";
|
|
116
117
|
readonly elevated: "var(--vx-surface-elevated)";
|
|
117
118
|
readonly subtle: "var(--vx-surface-subtle)";
|
|
118
119
|
readonly overlay: "var(--vx-surface-overlay)";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/tokens/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAUvE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAMjC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM5D,OAAO,EAAE,YAAY,EAAE,MAAM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E,WAAgC,GACrC,MAAM,CAoER;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AASD;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,GAAG,MAAM,CAkB1E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CASvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAMtE"}
|
package/dist/tokens/core.js
CHANGED
|
@@ -69,7 +69,6 @@ const VX = {
|
|
|
69
69
|
// "dev slider/production JS defaultProps" gap as Timeline's `bulletSize` — see `deriveSpacing`'s
|
|
70
70
|
// doc in tokens/palette.ts).
|
|
71
71
|
legendGap: SPACE_STEP.chartLegendGap,
|
|
72
|
-
legendFontSize: TEXT.sm,
|
|
73
72
|
// The type scale (px numbers — see TEXT above). Use in inline styles and visx SVG props;
|
|
74
73
|
// use `var(--vx-text-*)` in CSS modules.
|
|
75
74
|
text: TEXT,
|
|
@@ -162,6 +161,10 @@ const VX = {
|
|
|
162
161
|
bg: "var(--vx-surface-bg)",
|
|
163
162
|
panel: "var(--vx-surface-panel)",
|
|
164
163
|
panelHover: "var(--vx-surface-panel-hover)",
|
|
164
|
+
rowHover: "var(--vx-surface-row-hover)",
|
|
165
|
+
// a hovered row on a panel, visible in both schemes
|
|
166
|
+
rowSelected: "var(--vx-surface-row-selected)",
|
|
167
|
+
// a selected row on a panel
|
|
165
168
|
elevated: "var(--vx-surface-elevated)",
|
|
166
169
|
subtle: "var(--vx-surface-subtle)",
|
|
167
170
|
overlay: "var(--vx-surface-overlay)",
|
|
@@ -259,6 +262,8 @@ function frameworkPrimitives(side, data) {
|
|
|
259
262
|
decl("surface-bg", su.bg[side]),
|
|
260
263
|
decl("surface-panel", su.panel[side]),
|
|
261
264
|
decl("surface-panel-hover", su.panelHover[side]),
|
|
265
|
+
decl("surface-row-hover", su.rowHover[side]),
|
|
266
|
+
decl("surface-row-selected", su.rowSelected[side]),
|
|
262
267
|
decl("surface-elevated", su.elevated[side]),
|
|
263
268
|
decl("surface-subtle", su.subtle[side]),
|
|
264
269
|
decl("surface-overlay", su.overlay[side]),
|
package/dist/tokens/derive.d.ts
CHANGED
|
@@ -50,7 +50,9 @@ export declare function resolveDeriveConfig(partial?: Partial<DeriveConfig>): De
|
|
|
50
50
|
*/
|
|
51
51
|
export declare function isDefaultDeriveConfig(config: DeriveConfig): boolean;
|
|
52
52
|
export type FillFamily = 'gray' | 'red' | 'pink' | 'grape' | 'violet' | 'indigo' | 'cyan' | 'teal' | 'green' | 'lime' | 'yellow' | 'orange';
|
|
53
|
-
export type SurfaceKey = 'bg' | 'panel' | 'panelHover' | 'elevated' | 'subtle' | 'field' | 'border' | 'hairline';
|
|
53
|
+
export type SurfaceKey = 'bg' | 'panel' | 'panelHover' | 'elevated' | 'subtle' | 'field' | 'border' | 'hairline' | RowSurfaceKey;
|
|
54
|
+
/** The row surfaces: the panel mixed toward the ink, not a tone stop of their own. */
|
|
55
|
+
export type RowSurfaceKey = 'rowHover' | 'rowSelected';
|
|
54
56
|
export type InkKey = 'ink' | 'ink2' | 'muted' | 'faint';
|
|
55
57
|
export type StatusKey = 'good' | 'warn' | 'bad';
|
|
56
58
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive.d.ts","sourceRoot":"","sources":["../../src/tokens/derive.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAEvC,MAAM,MAAM,YAAY,GAAG;IACzB;;;;;;;;OAQG;IACH,MAAM,EAAE,MAAM,CAAA;IACd,sEAAsE;IACtE,OAA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AA;IAC1B,QAAQ,EAAE,SAAS,CAAA;IACnB,IAAI,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;IACnC,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,SAAS,CAAC,CAAA;IACtC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;IAC9B,MAAM,EAAE,MAAM,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;CACrC,CAAA;AAED,kFAAkF;AAClF,eAAO,MAAM,kBAAkB;;;CAA+B,CAAA;AAM9D;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,cAAc,CAUjE;AAED,gGAAgG;AAChG,wBAAgB,eAAe,CAC7B,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,QAAQ,GAAG,SAAS,CAAC,EAChD,MAAM,EAAE,YAAY,GACnB,cAAc,CAyGhB"}
|
package/dist/tokens/derive.js
CHANGED
|
@@ -127,11 +127,20 @@ const SURFACE_TONE = {
|
|
|
127
127
|
hairline: 31.29
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
|
+
const ROW_INK_MIX = {
|
|
131
|
+
rowHover: { light: 0.05, dark: 0.07 },
|
|
132
|
+
rowSelected: { light: 0.075, dark: 0.09 }
|
|
133
|
+
};
|
|
134
|
+
function mixHex(a, b, t) {
|
|
135
|
+
const channel = (hex, i) => Number.parseInt(hex.slice(1 + 2 * i, 3 + 2 * i), 16);
|
|
136
|
+
const out = [0, 1, 2].map((i) => Math.round(channel(a, i) * (1 - t) + channel(b, i) * t));
|
|
137
|
+
return `#${out.map((c) => c.toString(16).padStart(2, "0")).join("")}`;
|
|
138
|
+
}
|
|
130
139
|
const INK_TONE = {
|
|
131
140
|
// light `faint` is tone 44.5 so tertiary text clears WCAG AA (4.5:1) on every text surface
|
|
132
141
|
// (bg / panel / subtle / field); 48.44 landed at 4.23–4.31:1 on bg and subtle.
|
|
133
142
|
light: { ink: 15.16, ink2: 27.09, muted: 34.88, faint: 44.5 },
|
|
134
|
-
dark: { ink: 90.94, ink2: 88.12, muted: 84.91, faint:
|
|
143
|
+
dark: { ink: 90.94, ink2: 88.12, muted: 84.91, faint: 68.5 }
|
|
135
144
|
};
|
|
136
145
|
const DERIVE_LEVEL_RANGE = { min: -5, max: 5 };
|
|
137
146
|
function clampLevel(level) {
|
|
@@ -214,6 +223,12 @@ function deriveTokensRaw(config, params) {
|
|
|
214
223
|
dark: hctToHex({ hue: neutral.hue, chroma: neutral.chroma, tone: INK_TONE.dark[key] })
|
|
215
224
|
};
|
|
216
225
|
}
|
|
226
|
+
for (const key of Object.keys(ROW_INK_MIX)) {
|
|
227
|
+
surface[key] = {
|
|
228
|
+
light: mixHex(surface.panel.light, ink.ink.light, ROW_INK_MIX[key].light),
|
|
229
|
+
dark: mixHex(surface.panel.dark, ink.ink.dark, ROW_INK_MIX[key].dark)
|
|
230
|
+
};
|
|
231
|
+
}
|
|
217
232
|
const status = deriveStatusHexes(surface);
|
|
218
233
|
return {
|
|
219
234
|
accent: { light: accentFill, dark: accentInkDark },
|