basalt-ui 2.27.2 → 2.28.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 +99 -0
- package/MIGRATING.md +168 -12
- package/agent/rules/basalt-batteries.md +1 -1
- package/agent/rules/basalt-mantine.md +1 -1
- package/agent/rules/basalt-tokens.md +2 -2
- package/agent/skills/basalt-design/SKILL.md +1 -1
- package/agent/skills/basalt-design/references/catalogue.md +40 -36
- package/agent/skills/basalt-design/references/recipes.md +47 -0
- package/configs/oxlint-basalt.json +2 -1
- package/configs/oxlint-plugin.js +110 -2
- package/configs/oxlint-plugin.test.ts +99 -4
- package/dist/agent/chat/thread-message.d.ts +1 -160
- package/dist/agent/chat/thread-message.d.ts.map +1 -1
- package/dist/agent/chat/thread-message.js +7 -162
- package/dist/agent/chat/virtualize.d.ts +5 -5
- package/dist/charts/ChartCard.d.ts +5 -2
- package/dist/charts/ChartCard.d.ts.map +1 -1
- package/dist/charts/ChartCard.js +46 -13
- package/dist/charts/Lines.d.ts.map +1 -1
- package/dist/charts/Lines.js +11 -4
- package/dist/charts/Sparkline.d.ts +9 -2
- package/dist/charts/Sparkline.d.ts.map +1 -1
- package/dist/charts/Sparkline.js +104 -41
- package/dist/charts/chart-box.module.css +50 -0
- package/dist/charts/chart-box.module.css.d.ts +5 -0
- package/dist/charts/chart-card.module.css +12 -4
- package/dist/charts/chart-card.module.css.d.ts +1 -0
- package/dist/charts/compile.d.ts.map +1 -1
- package/dist/charts/compile.js +20 -18
- package/dist/charts/labels.d.ts +13 -3
- package/dist/charts/labels.d.ts.map +1 -1
- package/dist/charts/labels.js +131 -20
- package/dist/charts/legend.d.ts.map +1 -1
- package/dist/charts/legend.js +1 -1
- package/dist/charts/ref-label.d.ts +31 -8
- package/dist/charts/ref-label.d.ts.map +1 -1
- package/dist/charts/ref-label.js +40 -9
- package/dist/charts/sparkline.module.css +6 -0
- package/dist/charts/state.d.ts +3 -3
- package/dist/charts/state.d.ts.map +1 -1
- package/dist/charts/state.js +20 -2
- package/dist/cli/shot/capture.d.ts +6 -1
- package/dist/cli/shot/capture.d.ts.map +1 -1
- package/dist/cli/shot/capture.js +18 -5
- package/dist/common/empty-copy.d.ts +16 -0
- package/dist/common/empty-copy.d.ts.map +1 -0
- package/dist/common/empty-copy.js +9 -0
- package/dist/common/virtual-rows.d.ts +196 -0
- package/dist/common/virtual-rows.d.ts.map +1 -0
- package/dist/common/virtual-rows.js +290 -0
- package/dist/controls/controls.module.css +33 -1
- package/dist/controls/controls.module.css.d.ts +2 -0
- package/dist/controls/enum-filter.d.ts.map +1 -1
- package/dist/controls/enum-filter.js +8 -2
- package/dist/controls/filter-pill.d.ts +27 -3
- package/dist/controls/filter-pill.d.ts.map +1 -1
- package/dist/controls/filter-pill.js +15 -4
- package/dist/controls/form-layout.d.ts +9 -3
- package/dist/controls/form-layout.d.ts.map +1 -1
- package/dist/controls/form-layout.js +74 -12
- package/dist/controls/form-layout.module.css +112 -7
- package/dist/controls/form-layout.module.css.d.ts +1 -0
- package/dist/controls/multi-select-filter.d.ts +2 -2
- package/dist/controls/multi-select-filter.d.ts.map +1 -1
- package/dist/controls/multi-select-filter.js +12 -6
- package/dist/controls/range-filter.d.ts +1 -1
- package/dist/controls/range-filter.d.ts.map +1 -1
- package/dist/controls/range-filter.js +8 -2
- package/dist/dashboard/bar-list.d.ts +1 -1
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +6 -2
- package/dist/dashboard/bar-list.module.css +0 -2
- package/dist/dashboard/board-nav.d.ts +22 -0
- package/dist/dashboard/board-nav.d.ts.map +1 -0
- package/dist/dashboard/board-nav.js +49 -0
- package/dist/dashboard/board.d.ts +52 -0
- package/dist/dashboard/board.d.ts.map +1 -0
- package/dist/dashboard/board.js +228 -0
- package/dist/dashboard/board.module.css +160 -0
- package/dist/dashboard/board.module.css.d.ts +26 -0
- package/dist/dashboard/empty-state.d.ts +3 -3
- package/dist/dashboard/empty-state.d.ts.map +1 -1
- package/dist/dashboard/empty-state.js +13 -6
- package/dist/dashboard/event-list-model.d.ts +51 -0
- package/dist/dashboard/event-list-model.d.ts.map +1 -0
- package/dist/dashboard/event-list-model.js +72 -0
- package/dist/dashboard/event-list-rows.d.ts +23 -0
- package/dist/dashboard/event-list-rows.d.ts.map +1 -0
- package/dist/dashboard/event-list-rows.js +93 -0
- package/dist/dashboard/event-list-scroll.d.ts +27 -0
- package/dist/dashboard/event-list-scroll.d.ts.map +1 -0
- package/dist/dashboard/event-list-scroll.js +103 -0
- package/dist/dashboard/event-list-skeleton.d.ts +10 -0
- package/dist/dashboard/event-list-skeleton.d.ts.map +1 -0
- package/dist/dashboard/event-list-skeleton.js +36 -0
- package/dist/dashboard/event-list.d.ts +65 -0
- package/dist/dashboard/event-list.d.ts.map +1 -0
- package/dist/dashboard/event-list.js +178 -0
- package/dist/dashboard/event-list.module.css +283 -0
- package/dist/dashboard/event-list.module.css.d.ts +33 -0
- package/dist/dashboard/index.d.ts +2 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +4 -0
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +5 -3
- package/dist/dashboard/meter.module.css +2 -1
- package/dist/dashboard/query-state.js +1 -1
- package/dist/dashboard/settings-section.d.ts +4 -1
- package/dist/dashboard/settings-section.d.ts.map +1 -1
- package/dist/dashboard/settings-section.js +1 -1
- package/dist/dashboard/settings-section.module.css +19 -4
- package/dist/dashboard/stat-card-parts.d.ts +5 -1
- package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
- package/dist/dashboard/stat-card-parts.js +8 -3
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +25 -6
- package/dist/dashboard/stat-card.module.css +31 -7
- package/dist/dashboard/stat-card.module.css.d.ts +3 -0
- package/dist/dashboard/stat-strip.module.css +4 -1
- package/dist/dashboard/widget-header.module.css +17 -1
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/shell/app-main.module.css +18 -0
- package/dist/styles.css +46 -0
- package/dist/surfaces.d.ts +2 -2
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +8 -2
- package/dist/table/cell-kinds.d.ts +44 -0
- package/dist/table/cell-kinds.d.ts.map +1 -0
- package/dist/table/cell-kinds.js +169 -0
- package/dist/table/cell-kinds.module.css +55 -0
- package/dist/table/cell-kinds.module.css.d.ts +15 -0
- package/dist/table/data-table-fold.d.ts +147 -0
- package/dist/table/data-table-fold.d.ts.map +1 -0
- package/dist/table/data-table-fold.js +288 -0
- package/dist/table/data-table-state.d.ts +10 -3
- package/dist/table/data-table-state.d.ts.map +1 -1
- package/dist/table/data-table-state.js +11 -6
- package/dist/table/data-table.d.ts +11 -26
- package/dist/table/data-table.d.ts.map +1 -1
- package/dist/table/data-table.js +354 -254
- package/dist/table/data-table.module.css +210 -3
- package/dist/table/data-table.module.css.d.ts +12 -0
- package/dist/table/table-features.d.ts +34 -4
- package/dist/table/table-features.d.ts.map +1 -1
- package/dist/table/table-features.js +10 -0
- package/dist/theme/card-inset.module.css +35 -0
- package/dist/theme/controls.module.css +32 -0
- package/dist/theme/ctl-theme.d.ts.map +1 -1
- package/dist/theme/ctl-theme.js +5 -0
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +14 -10
- package/dist/tokens/core.d.ts +1 -0
- package/dist/tokens/core.d.ts.map +1 -1
- package/dist/tokens/core.js +1 -0
- package/dist/tokens/derive.js +1 -1
- package/dist/tokens/palette.d.ts +2 -1
- package/dist/tokens/palette.d.ts.map +1 -1
- package/llms.txt +34 -5
- package/package.json +1 -1
- package/src/agent/chat/thread-message.tsx +10 -403
- package/src/agent/chat/virtualize.ts +5 -5
- package/src/charts/ChartCard.tsx +79 -17
- package/src/charts/Lines.tsx +13 -4
- package/src/charts/Sparkline.tsx +131 -45
- package/src/charts/chart-box.module.css +50 -0
- package/src/charts/chart-box.module.css.d.ts +5 -0
- package/src/charts/chart-card.module.css +12 -4
- package/src/charts/chart-card.module.css.d.ts +1 -0
- package/src/charts/compile.ts +22 -18
- package/src/charts/labels.ts +175 -24
- package/src/charts/legend.tsx +3 -2
- package/src/charts/ref-label.ts +86 -17
- package/src/charts/sparkline.module.css +6 -0
- package/src/charts/state.tsx +36 -7
- package/src/cli/shot/capture.ts +29 -6
- package/src/common/empty-copy.ts +17 -0
- package/src/common/virtual-rows.tsx +682 -0
- package/src/controls/controls.module.css +33 -1
- package/src/controls/controls.module.css.d.ts +2 -0
- package/src/controls/enum-filter.tsx +8 -2
- package/src/controls/filter-pill.tsx +80 -27
- package/src/controls/form-layout.module.css +112 -7
- package/src/controls/form-layout.module.css.d.ts +1 -0
- package/src/controls/form-layout.tsx +115 -22
- package/src/controls/multi-select-filter.tsx +22 -11
- package/src/controls/range-filter.tsx +9 -3
- package/src/dashboard/bar-list.module.css +0 -2
- package/src/dashboard/bar-list.tsx +8 -5
- package/src/dashboard/board-nav.ts +67 -0
- package/src/dashboard/board.module.css +160 -0
- package/src/dashboard/board.module.css.d.ts +26 -0
- package/src/dashboard/board.tsx +394 -0
- package/src/dashboard/empty-state.tsx +16 -9
- package/src/dashboard/event-list-model.ts +113 -0
- package/src/dashboard/event-list-rows.tsx +120 -0
- package/src/dashboard/event-list-scroll.ts +145 -0
- package/src/dashboard/event-list-skeleton.tsx +58 -0
- package/src/dashboard/event-list.module.css +283 -0
- package/src/dashboard/event-list.module.css.d.ts +33 -0
- package/src/dashboard/event-list.tsx +309 -0
- package/src/dashboard/index.ts +2 -0
- package/src/dashboard/meter-parts.tsx +9 -2
- package/src/dashboard/meter.module.css +2 -1
- package/src/dashboard/query-state.tsx +1 -1
- package/src/dashboard/settings-section.module.css +19 -4
- package/src/dashboard/settings-section.tsx +7 -2
- package/src/dashboard/stat-card-parts.tsx +20 -3
- package/src/dashboard/stat-card.module.css +31 -7
- package/src/dashboard/stat-card.module.css.d.ts +3 -0
- package/src/dashboard/stat-card.tsx +24 -5
- package/src/dashboard/stat-strip.module.css +4 -1
- package/src/dashboard/widget-header.module.css +17 -1
- package/src/guard/index.ts +2 -0
- package/src/index.ts +4 -0
- package/src/shell/app-main.module.css +18 -0
- package/src/styles.css +46 -0
- package/src/surfaces.ts +7 -1
- package/src/table/cell-kinds.module.css +55 -0
- package/src/table/cell-kinds.module.css.d.ts +15 -0
- package/src/table/cell-kinds.tsx +234 -0
- package/src/table/data-table-fold.tsx +514 -0
- package/src/table/data-table-state.ts +24 -13
- package/src/table/data-table.module.css +210 -3
- package/src/table/data-table.module.css.d.ts +12 -0
- package/src/table/data-table.tsx +406 -359
- package/src/table/table-features.ts +44 -4
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +2 -66
- package/src/theme/card-inset.module.css +35 -0
- package/src/theme/controls.module.css +32 -0
- package/src/theme/ctl-theme.tsx +8 -0
- package/src/theme/index.ts +12 -8
- package/src/tokens/core.ts +1 -0
- package/src/tokens/derive.ts +1 -1
- package/src/tokens/palette.ts +4 -1
|
@@ -30,6 +30,23 @@ import type { ColumnDef, ColumnHelper, RowData } from '@tanstack/react-table'
|
|
|
30
30
|
/** Horizontal alignment of a column's header AND its cells. */
|
|
31
31
|
export type DataTableAlign = 'left' | 'center' | 'right'
|
|
32
32
|
|
|
33
|
+
/** The one list of cell kinds: the type, the runtime check and its error text derive from it. */
|
|
34
|
+
export const DATA_TABLE_COLUMN_KINDS = [
|
|
35
|
+
'entity',
|
|
36
|
+
'status',
|
|
37
|
+
'number',
|
|
38
|
+
'money',
|
|
39
|
+
'relative-time',
|
|
40
|
+
'meter',
|
|
41
|
+
'text',
|
|
42
|
+
] as const
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The cell kinds `meta.kind` names (`docs/waves/design-parity/SPEC.md` § 6.6). Unset keeps the
|
|
46
|
+
* table's plain cell. The chrome and the content each kind supplies live in `cell-kinds.tsx`.
|
|
47
|
+
*/
|
|
48
|
+
export type DataTableColumnKind = (typeof DATA_TABLE_COLUMN_KINDS)[number]
|
|
49
|
+
|
|
33
50
|
/**
|
|
34
51
|
* What a column def's `meta` may carry. Registered per table through `columnMeta: metaHelper<…>()`
|
|
35
52
|
* rather than a global `declare module '@tanstack/react-table'`, so `meta: { aling: 'right' }` is a
|
|
@@ -39,10 +56,10 @@ export type DataTableAlign = 'left' | 'center' | 'right'
|
|
|
39
56
|
export type BasaltColumnMeta = {
|
|
40
57
|
align?: DataTableAlign
|
|
41
58
|
/**
|
|
42
|
-
* Opt OUT of the automatic
|
|
43
|
-
* raw value is a number — which is right for a plain
|
|
44
|
-
* whose `cell` renders its own chrome (a coloured `Text`,
|
|
45
|
-
* `<td>`'s
|
|
59
|
+
* Opt OUT of the automatic numeral cell style (proportional sans with `tabular-nums`, SPEC D33).
|
|
60
|
+
* The table applies it whenever the cell's raw value is a number — which is right for a plain
|
|
61
|
+
* figure and wrong for a numeric accessor whose `cell` renders its own chrome (a coloured `Text`,
|
|
62
|
+
* a `Badge`, a sparkline), because the `<td>`'s numeral style then overrides what the cell asked for.
|
|
46
63
|
*/
|
|
47
64
|
numeral?: boolean
|
|
48
65
|
/**
|
|
@@ -53,6 +70,29 @@ export type BasaltColumnMeta = {
|
|
|
53
70
|
* LAST column first — nothing regresses with no `meta.priority` set anywhere. See `foldOrder`.
|
|
54
71
|
*/
|
|
55
72
|
priority?: number
|
|
73
|
+
/**
|
|
74
|
+
* The cell's kind: chrome always, content only when the column has no `cell` renderer of its own
|
|
75
|
+
* (a `cell` still supplies the content). Unset renders exactly the plain cell. A wrong value
|
|
76
|
+
* throws at render, like `align`.
|
|
77
|
+
*
|
|
78
|
+
* - `entity`: never wraps, ink, weight 500; the column's `cell` (glyph + name) or the raw value.
|
|
79
|
+
* - `status`: the status chip; colour from `statusColor`, default `gray`. Never wraps.
|
|
80
|
+
* - `number` / `money`: proportional tabular numerals (SPEC D33, not mono), right-aligned (an explicit `align` wins). Without a
|
|
81
|
+
* `cell` the raw number is formatted (`integer`; `money` grouped to `currency`'s minor digits, no symbol), null as a muted dash.
|
|
82
|
+
* The UNIT belongs in the header (`Volume (kg)`, `Salary (USD / yr)`), never in the cell.
|
|
83
|
+
* - `relative-time`: mono, muted; a raw `Date | number | string` renders as `3 hours ago` in a
|
|
84
|
+
* `<time>`, the full date in a tooltip and as its accessible name.
|
|
85
|
+
* - `meter`: the inline `Meter` bar for the value against `meterMax`.
|
|
86
|
+
* - `text`: plain `sm` ink that MAY wrap — the only kind that does. Every other body cell holds one line, so
|
|
87
|
+
* the fold measures natural widths and folds or pins instead of fitting by wrapping.
|
|
88
|
+
*/
|
|
89
|
+
kind?: DataTableColumnKind
|
|
90
|
+
/** `status`: the chip colour for a cell value — a theme colour name or a CSS var. Default `gray`. */
|
|
91
|
+
statusColor?(value: unknown): string
|
|
92
|
+
/** `meter`: the value that fills the bar. Default 1 (a ratio). */
|
|
93
|
+
meterMax?: number
|
|
94
|
+
/** `money` without a `cell`: the ISO 4217 code that sets the minor digits (the header names it). Default `USD`. */
|
|
95
|
+
currency?: string
|
|
56
96
|
}
|
|
57
97
|
|
|
58
98
|
/**
|
|
@@ -755,37 +755,7 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
755
755
|
"size": "md",
|
|
756
756
|
},
|
|
757
757
|
},
|
|
758
|
-
"Pagination": {
|
|
759
|
-
"vars": {
|
|
760
|
-
"fn":
|
|
761
|
-
"(theme, props) => ({
|
|
762
|
-
root: { "--pagination-active-color": onColorFor(theme, props) }
|
|
763
|
-
})"
|
|
764
|
-
,
|
|
765
|
-
"outputs": [
|
|
766
|
-
{
|
|
767
|
-
"probes": 772,
|
|
768
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-blue)"}}",
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
"probes": 384,
|
|
772
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-red)"}}",
|
|
773
|
-
},
|
|
774
|
-
{
|
|
775
|
-
"probes": 384,
|
|
776
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-gray)"}}",
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
"probes": 384,
|
|
780
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-dark)"}}",
|
|
781
|
-
},
|
|
782
|
-
{
|
|
783
|
-
"probes": 384,
|
|
784
|
-
"result": "{"root":{}}",
|
|
785
|
-
},
|
|
786
|
-
],
|
|
787
|
-
},
|
|
788
|
-
},
|
|
758
|
+
"Pagination": {},
|
|
789
759
|
"PaginationControl": {
|
|
790
760
|
"defaultProps": {
|
|
791
761
|
"data-basalt-hit": true,
|
|
@@ -798,7 +768,6 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
798
768
|
"styles": {
|
|
799
769
|
"root": {
|
|
800
770
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
801
|
-
"borderRadius": "var(--vx-radius-card)",
|
|
802
771
|
"boxShadow": "var(--vx-shadow-card)",
|
|
803
772
|
},
|
|
804
773
|
},
|
|
@@ -978,7 +947,6 @@ exports[`createBasaltTheme() shape and resolver output default 1`] = `
|
|
|
978
947
|
"height": 40,
|
|
979
948
|
},
|
|
980
949
|
"th": {
|
|
981
|
-
"color": "var(--vx-faint)",
|
|
982
950
|
"fontFamily": "var(--basalt-font-mono)",
|
|
983
951
|
"fontSize": 11,
|
|
984
952
|
"fontWeight": 500,
|
|
@@ -2088,37 +2056,7 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
2088
2056
|
"size": "md",
|
|
2089
2057
|
},
|
|
2090
2058
|
},
|
|
2091
|
-
"Pagination": {
|
|
2092
|
-
"vars": {
|
|
2093
|
-
"fn":
|
|
2094
|
-
"(theme, props) => ({
|
|
2095
|
-
root: { "--pagination-active-color": onColorFor(theme, props) }
|
|
2096
|
-
})"
|
|
2097
|
-
,
|
|
2098
|
-
"outputs": [
|
|
2099
|
-
{
|
|
2100
|
-
"probes": 772,
|
|
2101
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-blue)"}}",
|
|
2102
|
-
},
|
|
2103
|
-
{
|
|
2104
|
-
"probes": 384,
|
|
2105
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-red)"}}",
|
|
2106
|
-
},
|
|
2107
|
-
{
|
|
2108
|
-
"probes": 384,
|
|
2109
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-gray)"}}",
|
|
2110
|
-
},
|
|
2111
|
-
{
|
|
2112
|
-
"probes": 384,
|
|
2113
|
-
"result": "{"root":{"--pagination-active-color":"var(--vx-on-dark)"}}",
|
|
2114
|
-
},
|
|
2115
|
-
{
|
|
2116
|
-
"probes": 384,
|
|
2117
|
-
"result": "{"root":{}}",
|
|
2118
|
-
},
|
|
2119
|
-
],
|
|
2120
|
-
},
|
|
2121
|
-
},
|
|
2059
|
+
"Pagination": {},
|
|
2122
2060
|
"PaginationControl": {
|
|
2123
2061
|
"defaultProps": {
|
|
2124
2062
|
"data-basalt-hit": true,
|
|
@@ -2131,7 +2069,6 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
2131
2069
|
"styles": {
|
|
2132
2070
|
"root": {
|
|
2133
2071
|
"backgroundColor": "var(--vx-surface-panel)",
|
|
2134
|
-
"borderRadius": "var(--vx-radius-card)",
|
|
2135
2072
|
"boxShadow": "var(--vx-shadow-card)",
|
|
2136
2073
|
},
|
|
2137
2074
|
},
|
|
@@ -2311,7 +2248,6 @@ exports[`createBasaltTheme() shape and resolver output all knobs 1`] = `
|
|
|
2311
2248
|
"height": 32,
|
|
2312
2249
|
},
|
|
2313
2250
|
"th": {
|
|
2314
|
-
"color": "var(--vx-faint)",
|
|
2315
2251
|
"fontFamily": "var(--basalt-font-mono)",
|
|
2316
2252
|
"fontSize": 11,
|
|
2317
2253
|
"fontWeight": 500,
|
|
@@ -29,6 +29,41 @@
|
|
|
29
29
|
padding: 0;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/* The card radius tier. Paper's lives here rather than in the theme's inline `styles` so the rule
|
|
33
|
+
below can step it down; a Card keeps its inline value, which this one equals. */
|
|
34
|
+
.inset {
|
|
35
|
+
border-radius: var(--vx-radius-card);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
* A `Paper` floating over a flush card (a scrubber or key over a map canvas) is a nested surface:
|
|
40
|
+
* sharing the card's radius fails `craft-1/nested-radius-step` (< 3 px apart). It steps DOWN to the
|
|
41
|
+
* control tier, which is always a scale step and 4 px under the card at every radius level (`card =
|
|
42
|
+
* 10 + level`, `ctrl = 6 + level`), the same snap-down law as the Wave 38 nested radii.
|
|
43
|
+
*
|
|
44
|
+
* An explicit `radius` prop still wins: Mantine writes it inline as `--paper-radius`, which beats
|
|
45
|
+
* this rule's `initial` reset; unset, Mantine's own class value (the theme default radius) is
|
|
46
|
+
* reset away so the `var()` falls through to the control tier.
|
|
47
|
+
*
|
|
48
|
+
* Excluded: Mantine's own floating surfaces, which are Papers too but are not panels over the
|
|
49
|
+
* canvas, and a `withinPortal={false}` one renders INSIDE the card. Every `mantine-*-dropdown`
|
|
50
|
+
* part (Popover, Menu, HoverCard, Combobox and the Selects built on it) and Modal / Drawer / Dialog
|
|
51
|
+
* content keep their own radius. What still matches is any other Paper under the flush card, at any
|
|
52
|
+
* depth: a Paper used as an inner card steps down too, which is the nested-step law's intent.
|
|
53
|
+
*/
|
|
54
|
+
.inset[data-variant='flush']
|
|
55
|
+
.inset:where(
|
|
56
|
+
:not(
|
|
57
|
+
[class*='mantine-'][class*='-dropdown'],
|
|
58
|
+
[class*='mantine-Modal-'],
|
|
59
|
+
[class*='mantine-Drawer-'],
|
|
60
|
+
[class*='mantine-Dialog-']
|
|
61
|
+
)
|
|
62
|
+
) {
|
|
63
|
+
--paper-radius: initial;
|
|
64
|
+
border-radius: var(--paper-radius, var(--vx-radius-ctrl));
|
|
65
|
+
}
|
|
66
|
+
|
|
32
67
|
.inset:where(
|
|
33
68
|
:not(
|
|
34
69
|
[data-variant='flush'],
|
|
@@ -309,6 +309,38 @@ html .tableRoot {
|
|
|
309
309
|
--table-border-color: var(--vx-surface-hairline);
|
|
310
310
|
}
|
|
311
311
|
|
|
312
|
+
/*
|
|
313
|
+
* The header is a faint micro-label on the body's own fill (no band; the hairline below the head row
|
|
314
|
+
* is its only divider). The SORTED column steps up to ink — its arrow inherits it; unsorted sortable
|
|
315
|
+
* headers stay faint. `aria-sort` is the state the table already writes, so no extra class.
|
|
316
|
+
*/
|
|
317
|
+
html .tableRoot th {
|
|
318
|
+
color: var(--vx-faint);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
html .tableRoot th[aria-sort='ascending'],
|
|
322
|
+
html .tableRoot th[aria-sort='descending'] {
|
|
323
|
+
color: var(--vx-ink);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/*
|
|
327
|
+
* The current page is selection state, so it is an ink-mixed fill with an ink label, the `pills` Tab's
|
|
328
|
+
* step (SPEC § 6.12). This is its one home: there is no `Pagination` vars entry in `theme/index.ts`.
|
|
329
|
+
* Mantine writes `--pagination-active-bg` inline only for an explicit `color=`, which therefore keeps
|
|
330
|
+
* its accent fill and Mantine's own label contrast.
|
|
331
|
+
*/
|
|
332
|
+
html :global(.mantine-Pagination-root):not([style*='--pagination-active-bg']) {
|
|
333
|
+
--pagination-active-bg: color-mix(in srgb, var(--vx-ink) 12%, var(--vx-surface-panel));
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/* The label is set on the control: Mantine writes `--pagination-active-color` inline (white), which a
|
|
337
|
+
rule on the root cannot outrank. */
|
|
338
|
+
html
|
|
339
|
+
:global(.mantine-Pagination-root):not([style*='--pagination-active-bg'])
|
|
340
|
+
:global(.mantine-Pagination-control)[data-active] {
|
|
341
|
+
color: var(--vx-ink);
|
|
342
|
+
}
|
|
343
|
+
|
|
312
344
|
/*
|
|
313
345
|
* The LAST row's separator is dropped — exactly the rule (and exactly the reasoning) the Accordion
|
|
314
346
|
* above already carries: a separator BETWEEN items is information, and the same line drawn after the
|
package/src/theme/ctl-theme.tsx
CHANGED
|
@@ -40,10 +40,13 @@ import type {
|
|
|
40
40
|
MantineThemeOverride,
|
|
41
41
|
MultiSelect,
|
|
42
42
|
NativeSelect,
|
|
43
|
+
NumberInput,
|
|
44
|
+
PasswordInput,
|
|
43
45
|
Radio,
|
|
44
46
|
SegmentedControl,
|
|
45
47
|
Select,
|
|
46
48
|
Switch,
|
|
49
|
+
Textarea,
|
|
47
50
|
TextInput,
|
|
48
51
|
} from '@mantine/core'
|
|
49
52
|
import type { ReactNode } from 'react'
|
|
@@ -68,6 +71,11 @@ export const CTL_THEME: MantineThemeOverride = {
|
|
|
68
71
|
MultiSelect: ext<typeof MultiSelect>({ defaultProps: { size: 'ctl' } }),
|
|
69
72
|
SegmentedControl: ext<typeof SegmentedControl>({ defaultProps: { size: 'ctl' } }),
|
|
70
73
|
NativeSelect: ext<typeof NativeSelect>({ defaultProps: { size: 'ctl' } }),
|
|
74
|
+
// The form fields a `FormRow` / `SettingsRow` hosts (SPEC § 6.13): the 32 px field without a
|
|
75
|
+
// per-call `size`. `theme/index.ts` already carries the `ctl` stepper column for NumberInput.
|
|
76
|
+
NumberInput: ext<typeof NumberInput>({ defaultProps: { size: 'ctl' } }),
|
|
77
|
+
PasswordInput: ext<typeof PasswordInput>({ defaultProps: { size: 'ctl' } }),
|
|
78
|
+
Textarea: ext<typeof Textarea>({ defaultProps: { size: 'ctl' } }),
|
|
71
79
|
// The theme keys are the component names Mantine's own `useProps` looks up — `RadioGroup`, not
|
|
72
80
|
// `Radio.Group` (`RadioGroup.mjs`: `useProps("RadioGroup", …)`).
|
|
73
81
|
Radio: ext<typeof Radio>({
|
package/src/theme/index.ts
CHANGED
|
@@ -496,11 +496,12 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
496
496
|
}),
|
|
497
497
|
Paper: ext<typeof Paper>({
|
|
498
498
|
classNames: { root: cardInsetClasses.inset },
|
|
499
|
+
// The radius is in `card-inset.module.css`, not inline: an inline value cannot be stepped
|
|
500
|
+
// down for a Paper floating over a flush card.
|
|
499
501
|
styles: {
|
|
500
502
|
root: {
|
|
501
503
|
backgroundColor: 'var(--vx-surface-panel)',
|
|
502
504
|
boxShadow: 'var(--vx-shadow-card)',
|
|
503
|
-
borderRadius: 'var(--vx-radius-card)',
|
|
504
505
|
},
|
|
505
506
|
},
|
|
506
507
|
}),
|
|
@@ -1049,7 +1050,9 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
1049
1050
|
},
|
|
1050
1051
|
},
|
|
1051
1052
|
}),
|
|
1052
|
-
// Header cells become a micro-label (mono, uppercase
|
|
1053
|
+
// Header cells become a micro-label (mono, uppercase; the colour — faint, ink when sorted — is
|
|
1054
|
+
// `.tableRoot th` in controls.module.css, since an inline colour here could not be overridden by
|
|
1055
|
+
// the sorted state). The head shares the body's fill: no band, only the hairline. Numeral/tabular styling for
|
|
1053
1056
|
// body cells is a per-table call-site concern, left to consumers. `--table-border-color`
|
|
1054
1057
|
// drives row separators AND the opt-in `withTableBorder` outer border — both drop to the
|
|
1055
1058
|
// hairline (Mantine's default reads gray-3/dark-4 = the STRONG line, too heavy in a card).
|
|
@@ -1068,7 +1071,6 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
1068
1071
|
fontWeight: 500,
|
|
1069
1072
|
letterSpacing: '0.06em',
|
|
1070
1073
|
textTransform: 'uppercase',
|
|
1071
|
-
color: 'var(--vx-faint)',
|
|
1072
1074
|
},
|
|
1073
1075
|
td: { height: spacing.step.tableRowHeight, fontSize: VX.text.sm },
|
|
1074
1076
|
},
|
|
@@ -1121,11 +1123,9 @@ function buildTheme(data: PaletteData, options: BuildThemeOptions = {}): Mantine
|
|
|
1121
1123
|
},
|
|
1122
1124
|
}),
|
|
1123
1125
|
}),
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
}),
|
|
1128
|
-
}),
|
|
1126
|
+
// The current page is ink (SPEC § 6.12); its one home is `controls.module.css`, so this entry only
|
|
1127
|
+
// registers the component for the border-coverage gate.
|
|
1128
|
+
Pagination: ext<typeof Pagination>({}),
|
|
1129
1129
|
// `Pagination`'s own controls (prev/next/page buttons) resolve `PaginationControl`'s
|
|
1130
1130
|
// defaultProps independently of the parent — `data-basalt-hit` here is what closes the
|
|
1131
1131
|
// gap Switch/Checkbox/Radio already close at their own theme entries.
|
|
@@ -1406,6 +1406,10 @@ function ctlSizeVars(): Record<string, string> & Record<CtlHeightVar, string> {
|
|
|
1406
1406
|
'--combobox-chevron-size-ctl': pxRem(CTL_CHEVRON_SIZE),
|
|
1407
1407
|
'--ni-chevron-size-ctl': pxRem(CTL_NUMBER_CHEVRON_SIZE),
|
|
1408
1408
|
'--ni-right-section-width-ctl': `calc(${pxRem(CTL_NUMBER_RIGHT_SECTION_WIDTH)} * var(--mantine-scale))`,
|
|
1409
|
+
// PasswordInput's visibility toggle: Mantine's own `xs` pair (22 px button, 16 px icon), the tier
|
|
1410
|
+
// whose input height already equals `ctl`; undeclared, `size="ctl"` left the toggle unsized.
|
|
1411
|
+
'--psi-button-size-ctl': 'calc(1.375rem * var(--mantine-scale))',
|
|
1412
|
+
'--psi-icon-size-ctl': 'calc(1rem * var(--mantine-scale))',
|
|
1409
1413
|
'--badge-padding-x-ctl': `calc(${pxRem(CTL_PADDING_X)} * var(--mantine-scale))`,
|
|
1410
1414
|
'--badge-fz-ctl': `calc(${pxRem(VX.text.xs)} * var(--mantine-scale))`,
|
|
1411
1415
|
// `= VX.text.sm` per `docs/CONTROLS-SPEC.md` §5 — same `calc(<rem> * var(--mantine-scale))`
|
package/src/tokens/core.ts
CHANGED
|
@@ -284,6 +284,7 @@ export const VX = {
|
|
|
284
284
|
|
|
285
285
|
// Score / zone status scale (excellent → poor)
|
|
286
286
|
status: {
|
|
287
|
+
/** FILL-ONLY: zones, bands, heatmap cells. Not AA as text (~3:1 on a light card) — text uses `good`. */
|
|
287
288
|
excellent: 'var(--vx-status-excellent)',
|
|
288
289
|
good: 'var(--vx-status-good)',
|
|
289
290
|
warn: 'var(--vx-status-warn)',
|
package/src/tokens/derive.ts
CHANGED
|
@@ -114,7 +114,7 @@ const FILL_LUMINANCE = 0.165
|
|
|
114
114
|
|
|
115
115
|
// ── Accent family ────────────────────────────────────────────────────────────────────────────
|
|
116
116
|
// Fill hover: fillTone - FILL_HOVER_TONE_DELTA, fillChroma + FILL_HOVER_CHROMA_DELTA.
|
|
117
|
-
const FILL_HOVER_TONE_DELTA =
|
|
117
|
+
const FILL_HOVER_TONE_DELTA = 10
|
|
118
118
|
const FILL_HOVER_CHROMA_DELTA = -3.6
|
|
119
119
|
// Dark-mode accent-as-INK: lighter tone, chroma pulled back off the fill's saturation so it reads
|
|
120
120
|
// as an ink color rather than a second fill.
|
package/src/tokens/palette.ts
CHANGED
|
@@ -1190,6 +1190,8 @@ function buildPaletteDataUncached(config: DeriveConfig) {
|
|
|
1190
1190
|
* success/warning/danger pairs as `SEMANTIC` (also the direct source for Badge/Notification/delta
|
|
1191
1191
|
* -badge status-tint idioms in the theme — one set of hexes, several consumers). `excellent`
|
|
1192
1192
|
* (top-of-scale grade) and `neutral` keep their prior chart-only families (unchanged BP families).
|
|
1193
|
+
* `excellent` is FILL-ONLY (zones, bands, heatmap cells): about 3:1 on a light card, so text uses
|
|
1194
|
+
* `good`, which the status-text solver holds to AA. `basalt/status-fill-as-text` guards it.
|
|
1193
1195
|
*/
|
|
1194
1196
|
const STATUS = {
|
|
1195
1197
|
excellent: p(BP.forest),
|
|
@@ -1412,7 +1414,8 @@ export const SEMANTIC = STATIC_PALETTE_DATA.SEMANTIC
|
|
|
1412
1414
|
|
|
1413
1415
|
/**
|
|
1414
1416
|
* Score / zone status scale (excellent → poor). `good`/`warn`/`bad` are the SAME spec
|
|
1415
|
-
* success/warning/danger pairs as `SEMANTIC`.
|
|
1417
|
+
* success/warning/danger pairs as `SEMANTIC`. `excellent` is fill-only (not AA as text); use `good`
|
|
1418
|
+
* for text. GENERATED — see `buildPaletteData` above.
|
|
1416
1419
|
*/
|
|
1417
1420
|
export const STATUS = STATIC_PALETTE_DATA.STATUS
|
|
1418
1421
|
|