basalt-ui 2.18.0 → 2.19.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 +40 -0
- package/MIGRATING.md +76 -12
- package/agent/agents/basalt-design-reviewer.md +2 -2
- package/dist/commands/notifications/center.d.ts.map +1 -1
- package/dist/commands/notifications/center.js +18 -26
- package/dist/content/callout.d.ts +1 -1
- package/dist/content/callout.d.ts.map +1 -1
- package/dist/content/callout.js +10 -1
- package/dist/content/callout.module.css +15 -3
- package/dist/content/callout.module.css.d.ts +1 -0
- package/dist/dashboard/bar-list.d.ts.map +1 -1
- package/dist/dashboard/bar-list.js +31 -18
- package/dist/dashboard/bar-list.module.css +33 -15
- package/dist/dashboard/bar-list.module.css.d.ts +1 -0
- package/dist/dashboard/meter-model.d.ts +49 -1
- package/dist/dashboard/meter-model.d.ts.map +1 -1
- package/dist/dashboard/meter-model.js +47 -3
- package/dist/dashboard/meter-parts.d.ts.map +1 -1
- package/dist/dashboard/meter-parts.js +143 -9
- package/dist/dashboard/meter.d.ts +16 -5
- package/dist/dashboard/meter.d.ts.map +1 -1
- package/dist/dashboard/meter.module.css +127 -9
- package/dist/dashboard/meter.module.css.d.ts +11 -0
- package/dist/dashboard/stat-card-parts.d.ts +3 -1
- package/dist/dashboard/stat-card-parts.d.ts.map +1 -1
- package/dist/dashboard/stat-card-parts.js +18 -3
- package/dist/dashboard/stat-card.d.ts +6 -5
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +48 -77
- package/dist/dashboard/stat-card.module.css +27 -7
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +2 -1
- package/dist/dashboard/widget-header.module.css +28 -1
- package/dist/theme/chrome-vars.d.ts +29 -17
- package/dist/theme/chrome-vars.d.ts.map +1 -1
- package/dist/theme/chrome-vars.js +18 -8
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +9 -5
- package/dist/theme/status-dot.d.ts +6 -0
- package/dist/theme/status-dot.d.ts.map +1 -0
- package/dist/theme/status-dot.js +9 -0
- package/dist/theme/status-dot.module.css +9 -0
- package/dist/theme/status-dot.module.css.d.ts +8 -0
- package/dist/theme/status-verdict.d.ts +9 -0
- package/dist/theme/status-verdict.d.ts.map +1 -0
- package/dist/theme/status-verdict.js +13 -0
- package/dist/theme/status-verdict.module.css +23 -0
- package/dist/theme/status-verdict.module.css.d.ts +9 -0
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/commands/notifications/center.tsx +29 -32
- package/src/content/callout.module.css +15 -3
- package/src/content/callout.module.css.d.ts +1 -0
- package/src/content/callout.tsx +15 -2
- package/src/dashboard/bar-list.module.css +33 -15
- package/src/dashboard/bar-list.module.css.d.ts +1 -0
- package/src/dashboard/bar-list.tsx +29 -16
- package/src/dashboard/meter-model.ts +97 -4
- package/src/dashboard/meter-parts.tsx +195 -11
- package/src/dashboard/meter.module.css +127 -9
- package/src/dashboard/meter.module.css.d.ts +11 -0
- package/src/dashboard/meter.tsx +16 -5
- package/src/dashboard/stat-card-parts.tsx +22 -2
- package/src/dashboard/stat-card.module.css +27 -7
- package/src/dashboard/stat-card.tsx +18 -52
- package/src/dashboard/widget-header.module.css +28 -1
- package/src/dashboard/widget-header.tsx +4 -1
- package/src/theme/__snapshots__/plain-theme.test.ts.snap +88 -16
- package/src/theme/chrome-vars.ts +48 -23
- package/src/theme/index.ts +10 -6
- package/src/theme/status-dot.module.css +9 -0
- package/src/theme/status-dot.module.css.d.ts +8 -0
- package/src/theme/status-dot.tsx +19 -0
- package/src/theme/status-verdict.module.css +23 -0
- package/src/theme/status-verdict.module.css.d.ts +9 -0
- package/src/theme/status-verdict.tsx +27 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,43 @@
|
|
|
1
|
+
# [2.19.0](https://github.com/jkrumm/basalt-ui/compare/v2.18.0...v2.19.0) (2026-10-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* address round 1 on the S2 and S4 scenarios ([8ebc318](https://github.com/jkrumm/basalt-ui/commit/8ebc318b93c4ef1971705752c31378b943842667))
|
|
7
|
+
* address round 2 on the S2 and S4 scenarios ([48e992c](https://github.com/jkrumm/basalt-ui/commit/48e992cc8c65304ae87080b477a40974915185d2))
|
|
8
|
+
* anchor the zone reading at its marker and inset skeletons ([0f734ae](https://github.com/jkrumm/basalt-ui/commit/0f734ae56fabc5600d0c9e1e45330b650e983b63))
|
|
9
|
+
* caption Meter segments, wrap captions, size Meter in StatCard ([8125541](https://github.com/jkrumm/basalt-ui/commit/81255416395fbb01062a830a87114b5f1e6c9592))
|
|
10
|
+
* centre the zone reading logically and pin it in RTL ([6176606](https://github.com/jkrumm/basalt-ui/commit/61766066b3bd6f0c8ab58cc4e2720d9007908d8b))
|
|
11
|
+
* close review round 2 on Meter captions and the StatCard slot ([421ac71](https://github.com/jkrumm/basalt-ui/commit/421ac7144518a80b11e0f7f0a846d19be798500d))
|
|
12
|
+
* draw the info focus ring on a glyph-sized pseudo-element ([f11bf1c](https://github.com/jkrumm/basalt-ui/commit/f11bf1cc1a6ed03e28b7987d61be06839510a657))
|
|
13
|
+
* drop the shot hover from sparkline wrappers ([a2e2f5c](https://github.com/jkrumm/basalt-ui/commit/a2e2f5cf914ec6b08fb16afbf010b6562d85fd02))
|
|
14
|
+
* harden Meter caption modes and pin the layout in a browser ([0ab822d](https://github.com/jkrumm/basalt-ui/commit/0ab822ddc38ea62085dd2664edcc0fdcf28ec78c))
|
|
15
|
+
* keep the BarList bar inside the label column ([a227c53](https://github.com/jkrumm/basalt-ui/commit/a227c53be55e7692f1312367f63dfe3d0d1b406a))
|
|
16
|
+
* keep the fixture month labels independent of ICU data ([a226543](https://github.com/jkrumm/basalt-ui/commit/a226543d6f5b5bb1b3d91b582bfee77e6f356180))
|
|
17
|
+
* keep the info glyph focus ring off the caption text ([d66d178](https://github.com/jkrumm/basalt-ui/commit/d66d1782d479520edd1b6cd1267189f5f516368a))
|
|
18
|
+
* keep the loading skeleton inset in the narrow right slot ([cda6c98](https://github.com/jkrumm/basalt-ui/commit/cda6c98da806f61a88259783d81d1a1b1cc65579))
|
|
19
|
+
* key the Meter zone fit on the holding zone and test fonts ([7854b74](https://github.com/jkrumm/basalt-ui/commit/7854b74aa6eed8a9034d3f9fa7f41bd6686f2336))
|
|
20
|
+
* name the info glyph ring knobs and harden its layout test ([c7fb542](https://github.com/jkrumm/basalt-ui/commit/c7fb5428b68fa1805d1ae03eab497b937074d0d1))
|
|
21
|
+
* name the Meter zones on the band ([b321399](https://github.com/jkrumm/basalt-ui/commit/b321399230b86f6f4ae5160fc5bed401606374c1))
|
|
22
|
+
* name the S2 pace unit and hover specimens on /components ([d0a014d](https://github.com/jkrumm/basalt-ui/commit/d0a014d056c782a2ba5349629c116a3b6ab02136))
|
|
23
|
+
* name the status in words and share one StatusDot ([d3a16b8](https://github.com/jkrumm/basalt-ui/commit/d3a16b867037468296d07e435f638ec8c913f8c5))
|
|
24
|
+
* name the window under the S4 month-to-date sparkline ([67b59d0](https://github.com/jkrumm/basalt-ui/commit/67b59d0b981aa36b56155dbaace61bb2513a82d6))
|
|
25
|
+
* put the Meter ring padding on a spacing token ([ed28b4a](https://github.com/jkrumm/basalt-ui/commit/ed28b4a106170fa2179bfe56721b4d6fe9e82c36))
|
|
26
|
+
* re-measure Meter zone names on font load and prove the fit ([2390900](https://github.com/jkrumm/basalt-ui/commit/23909008a1aa6536d18a6314d46c37607225ca85))
|
|
27
|
+
* render the sparkline directly in the StatCard slot ([1c56983](https://github.com/jkrumm/basalt-ui/commit/1c56983f62d2c15e31a175efa0a7ca2c729a6fc4))
|
|
28
|
+
* show the notification intent word and share StatusVerdict ([64bb580](https://github.com/jkrumm/basalt-ui/commit/64bb5809a7ddef74afcf26c6e4f009ed8c6ade2d))
|
|
29
|
+
* treat an empty or null color as unnamed for ink vars ([4930bda](https://github.com/jkrumm/basalt-ui/commit/4930bdaff6f05d94aa359f5b174bbc05ab30390d))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Features
|
|
33
|
+
|
|
34
|
+
* build the S2 training-log scenario ([94a7f91](https://github.com/jkrumm/basalt-ui/commit/94a7f9122ef47d5272889c6f7acd484ade06c69b))
|
|
35
|
+
* ink the light button on the subtle surface and add edge tests ([6fe99fa](https://github.com/jkrumm/basalt-ui/commit/6fe99fa2194337d4a7bb36993c5d59ea0c8c31f1))
|
|
36
|
+
* name the Callout and notification-center edges in MIGRATING ([2da8c8d](https://github.com/jkrumm/basalt-ui/commit/2da8c8d9ba2836ba3094efe497c02c3cc61c0813))
|
|
37
|
+
* paint light and outline buttons in ink by default ([47d566b](https://github.com/jkrumm/basalt-ui/commit/47d566b9b8b79351a0218a9f14ac53a2196a6090))
|
|
38
|
+
* put the S4 spend scenario on Meter and BarList ([37530a9](https://github.com/jkrumm/basalt-ui/commit/37530a9a54f6ed353c8e2a3faf0fcdbb1de22875))
|
|
39
|
+
* state a StatCard verdict as a dot and a word, not a rail ([1a4085d](https://github.com/jkrumm/basalt-ui/commit/1a4085db453aa05fd3195adf9436c7b3edecb0cc))
|
|
40
|
+
|
|
1
41
|
# [2.18.0](https://github.com/jkrumm/basalt-ui/compare/v2.17.0...v2.18.0) (2026-10-17)
|
|
2
42
|
|
|
3
43
|
|
package/MIGRATING.md
CHANGED
|
@@ -66,18 +66,18 @@ There is one row per SURFACE, not per export, and a surface earns a row once any
|
|
|
66
66
|
shipped lefthook preset both changed in 1.30.0 with no row that owned them — which is how a
|
|
67
67
|
consumer read this index, found nothing, and diffed a KPI row that had silently gone 4-up → 2-up.
|
|
68
68
|
|
|
69
|
-
| Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | Unreleased |
|
|
70
|
-
| ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
71
|
-
| **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — |
|
|
72
|
-
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
73
|
-
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | — |
|
|
74
|
-
| **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — |
|
|
75
|
-
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
76
|
-
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
77
|
-
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | — |
|
|
78
|
-
| **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
79
|
-
| **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
80
|
-
| **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — |
|
|
69
|
+
| Surface | 1.27.0 | 1.28.0 | 1.29.0 | 1.30.0 | 1.30.1 | 1.30.2 | 1.31.0 | 1.32.0 | 1.32.1 | 1.33.0 | 1.34.0 | 1.34.1 | 1.35.0 | 1.36.0 | 1.36.1 | 1.37.0 | 1.37.1 | 1.38.0 | 1.38.1 | 1.39.0 | 1.40.0 | 1.40.1 | 1.40.2 | 1.40.3 | 1.41.0 | 2.0.0 | 2.0.1 | 2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.1.0 | 2.2.0 | 2.3.0 | 2.4.0 | 2.5.0 | 2.6.0 | 2.6.1 | 2.7.0 | 2.7.1 | 2.7.2 | 2.7.3 | 2.8.0 | 2.8.1 | 2.9.0 | 2.9.1 | 2.10.0 | 2.11.0 | 2.11.1 | 2.12.0 | 2.13.0 | 2.13.1 | 2.13.2 | 2.13.3 | 2.14.0 | 2.15.0 | 2.16.0 | 2.17.0 | 2.18.0 | 2.19.0 | Unreleased |
|
|
70
|
+
| ----------------------------- | ------------------------------------------------------------ | -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------- | ------ | ------ | -------------------------------------------------------------------------------------------- | ------ | ------ | ------ | ------ | ------ | ----------------------------------------------- | ------ | ------ | ------ | ------ | ------------------------------------------------------------ | ---------- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
|
71
|
+
| **tokens** (`./tokens`) | — | `--vx-divider` → `rgba()` on both schemes (§ Shell) | `--vx-space-touch-target` added (§ Additions) | eight spacing numbers (§ Chrome) | — | — | `--vx-hit` replaces the touch vars; `SIZE_CLASSES` (§ 1.31.0) | — | `SIZE_CLASSES`/`CONTAINER_CLASSES` actually exported (§ Fixes) | `CONTAINER_GRID_BREAKPOINTS`; `raw-breakpoint` trusts it (§ 1.33.0) | `CONTAINER_KEYS` (§ 1.34.0) | — | — | — | — | — | — | — | | `appShellInset` 20 → 16 (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | spacing, radius, type and the dense tier (§ 2.16.0) | — | — | — | — |
|
|
72
|
+
| **charts** (`./charts`) | — | phone tier, `curve`, formatters, `state`, log axis (§ preamble) | `ChartState.empty: string`, `AxisBottomNumeric` (§ Additions) | responsive `height`, `legend.maxRows` (§ Charts) | `height` reaches the kinds; `maxRows` beats the `fill` fit (§ Charts) | — | container-class tier + `height` keys (§ 1.31.0) | — | `ResponsiveChartHeight` `sm` → key (§ Container recipes) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BandSpan.absentFraction` + `absentState` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
73
|
+
| **shell** (`.`) | — | scrollport, region seams, **the brand left the sidebar** (§§ scrollport, brand, Shell) | `PageTitle`, `BasaltDevDock`, `useBreakpoint` (§ Additions) | More popover, aside pill, the responsive gutter, `useBasaltSpacing` (§ Chrome) | — | — | `theme.breakpoints` derived, `useSizeClass`, `data-basalt-host`, `useBreakpoint` on notice (§ 1.31.0) | `useBreakpoint` removal → 1.33.0; `useSizeClass` is shell-only (§ 1.32.0) | shell-less `shell/` gutter, `AppShell` breakpoints, `useSizeClass` for overlays (§§ Shell-less, `useSizeClass`) | — | `useBreakpoint` removed (§ 1.34.0) | — | — | `useCoarsePointer()` (§ `useCoarsePointer()`) | — | — | — | — | | content gutter 16, block 8 from `sm` (§ 1.38.1) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltProvider` embedded mode, `spotlight` (§ 2.8.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | expanded gutter 24 (§ 2.16.0) | — | — | light/outline Buttons ink, no status edges (§ 2.19.0) | — |
|
|
74
|
+
| **controls** (`./controls`) | `NumberFilter`, `field.number` (§ Controls) | sheet renders panel rows; `PanelRow`, `SliderControl` (§ `basalt-ui/controls`) | — | — | — | — | — | — | — | `NumberFilter clearable`; `createSearchStore` `resets` (§ State and controls) | — | — | — | `FormSection`/`FormRow`/`FormGroup`/`FormActions` move here (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | dense 28 tier at a fine pointer (§ 2.16.0) | — | — | — | — |
|
|
75
|
+
| **forms** (`./forms`) | — | `field` → `inputProps`, **`inputProps` drops `key`**, the layout tier (§ `inputProps`) | `field` DELETED — and the `--fix` recipe no longer works (§ Consolidation) | — | — | — | — | — | `FormGroup` row no longer stretches (§ Fixes) | — | — | — | — | the layout + `useForm`/`schemaResolver` deprecated, removed 1.37.0 (§ The form layout moves) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
76
|
+
| **data** (`./data/table`) | — | root is a `<div>`, row selection, `getItemKey` required (§ `basalt-ui/data`) | `./data` + `./query` + `./connectivity` dropped (§ Consolidation) | — | — | — | — | — | `renderCard` documented (§ `renderCard`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
77
|
+
| **dashboard** (`.`) | `StatCard`: `unit`, `breakdown`, delta format (§ `StatCard`) | `StatGroup`, `WidgetGrid`, query-aware `StatCard` — additive | — | **the column law keys on the CONTAINER; `cols={4}` is 2-up at `sm`** (§ Dashboard) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | card inset 12/16, `kpi` 22 / 500 (§ 2.16.0) | — | — | StatCard status dot, Meter/BarList refinements (§ 2.19.0) | — |
|
|
78
|
+
| **toolchain** (`./configs/*`) | — | — | the shipped lefthook preset's `check-theme` BROKE — the CLI resolver stopped ascending (§ CLI) | the preset's default bin, and the `root:` recipe (§ Toolchain) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
79
|
+
| **CLI** (`basalt-ui`) | — | — | **resolver stops relocating; `doctor` loses 6 of 10 checks** (§ CLI) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | the managed block moves `CLAUDE.md` → `AGENTS.md` (§ 1.41.0) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `doctor`: CSS + forced dropped subpaths, `oxlint-floor`, Start wiring (§ 2.8.0) | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
80
|
+
| **guards** | five rules → `error` (§ Guards) | six new ids at `warn` (§ preamble) | `query-dual-import` retired in 1.29.1 (§ Guards) | four rules → `error` (§ Guards) | — | — | — | `raw-breakpoint`: the container-grid answer, `error` at 1.33.0 (§ 1.32.0) | `FormRow`/`FormGroup` homes in both lanes; `basalt-main` dropped (§ Fixes) | C1 + breakpoint pairs → `error`; `unknown-vx-token` `warn` (§ Guards) | — | — | — | `unknown-vx-token` → `error`; the token factories throw (§ Guards) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | § 1.x compatibility layer removed | — | — | — | — | — | — | — | — | — | — | — | `inline-spacing` steps, `card-inset` accepts both pairs (§ 2.16.0) | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -1046,6 +1046,70 @@ The `basalt-ui/router-tanstack` subpath is **removed** in 2.x, not moved: an imp
|
|
|
1046
1046
|
_Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
|
|
1047
1047
|
release renames it and opens a new one here._
|
|
1048
1048
|
|
|
1049
|
+
## 2.19.0 — the status dot, ink buttons and Meter refinements
|
|
1050
|
+
|
|
1051
|
+
### Status is a dot and a word, not an edge stripe (`StatCard`, `Callout`, notification centre)
|
|
1052
|
+
|
|
1053
|
+
Wave 34. `StatCard`'s `tone` no longer draws a 3 px coloured rail down the card's leading edge. It
|
|
1054
|
+
now puts a 6 px status dot and a short word on the caption row, after the title and `info` glyph:
|
|
1055
|
+
`good` → `OK`, `warn` → `Watch`, `bad` → `Over`. The dot carries the colour (`VX.status[tone]`);
|
|
1056
|
+
the word is muted ink and carries the meaning, so the verdict no longer rides on colour alone. Screen
|
|
1057
|
+
readers still hear the full phrase ("Past the severe threshold") from a visually hidden sibling, not a
|
|
1058
|
+
bare "Over".
|
|
1059
|
+
|
|
1060
|
+
Two other shipped status edges went the same way, each visible without any prop change:
|
|
1061
|
+
|
|
1062
|
+
- **`Callout`** loses its 2 px coloured left border. The tint, icon and title still carry the kind's
|
|
1063
|
+
colour (`info` / `good` / `warn` / `bad`), and a visually hidden kind word ("Info", "Success",
|
|
1064
|
+
"Warning", "Error") means a title-less callout is never tint-only. A consumer's CSS that restyled
|
|
1065
|
+
the border has nothing to target.
|
|
1066
|
+
- **Notification-centre rows** (`NotificationCenter`) lose their 3 px coloured leading border and show
|
|
1067
|
+
a 6 px status dot plus the intent as a visible muted word ("Success", "Error", "Warning", "Info")
|
|
1068
|
+
before the title, or before the message on an untitled row. The `info` dot is neutral ink, not the
|
|
1069
|
+
accent.
|
|
1070
|
+
|
|
1071
|
+
`tone?: 'good' | 'warn' | 'bad'` keeps its API, and omitting it still renders neither dot nor word.
|
|
1072
|
+
There is no opt-out: a coloured edge for status is retired (owner decision). A consumer's own
|
|
1073
|
+
`[data-tone]` CSS that targeted the rail element should target the card (`[data-tone]` stays on the
|
|
1074
|
+
root) or drop the rule.
|
|
1075
|
+
|
|
1076
|
+
The shipped `basalt-design-reviewer` now fails a status drawn as a coloured edge stripe (Craft 4,
|
|
1077
|
+
Expression 3), so boards that passed before this release can fail now: re-score them. The verdict
|
|
1078
|
+
words (`OK`, `Watch`, `Over`, and the phrases screen readers hear) are fixed English; for i18n, omit
|
|
1079
|
+
`tone` and render your own dot and word.
|
|
1080
|
+
|
|
1081
|
+
### Light and outline Buttons are ink
|
|
1082
|
+
|
|
1083
|
+
A `Button` or `ActionIcon` with `variant="light"` or `variant="outline"` and no `color` used to paint
|
|
1084
|
+
the primary (accent) colour. It is now ink: `light` takes the subtle surface (hover one ink step) with
|
|
1085
|
+
an ink label; `outline` takes the surface border with an ink label and the subtle-surface hover.
|
|
1086
|
+
Only `variant="filled"` and any explicit `color=` carry the accent. `default`, `filled`,
|
|
1087
|
+
`transparent` and `white` are unchanged, as are disabled, loading and focus-ring behaviour.
|
|
1088
|
+
|
|
1089
|
+
An empty or `null` `color` now counts as unnamed everywhere, matching Mantine's own
|
|
1090
|
+
`color || primaryColor`: `subtle` Buttons and ActionIcons and the `Tabs` underline with `color=""` or
|
|
1091
|
+
`color={null}` take ink too, where they kept the accent before.
|
|
1092
|
+
|
|
1093
|
+
Opt out: name the primary colour explicitly — `color="<primary>"`, your theme's `primaryColor` name.
|
|
1094
|
+
Omitting `color`, or passing `""` or `null`, does not restore the accent.
|
|
1095
|
+
|
|
1096
|
+
### `Meter` and `BarList` refinements since 2.18.0
|
|
1097
|
+
|
|
1098
|
+
No export, prop or type changes; the rendering moved after the Wave 34 board rounds:
|
|
1099
|
+
|
|
1100
|
+
- **`Meter` categorical `segments`** (no forecast part) caption every part under the track (swatch, name,
|
|
1101
|
+
value) and drop the default start caption that stated the total; pass `startCaption` to keep a total.
|
|
1102
|
+
- **`Meter` zones** name every zone on the band (the holding zone in ink and a weight step, a wrapped list
|
|
1103
|
+
when the names would collide) and anchor the reading at the marker; the start caption is the bare reading,
|
|
1104
|
+
no longer `Zone · reading`.
|
|
1105
|
+
- **`Meter` captions** wrap and never truncate; the ring value is on the hero type role and the ring grows
|
|
1106
|
+
square when the value is wider than its inner circle; ticks and the marker take the `fine` radius.
|
|
1107
|
+
- **`Meter` in a `StatCard` visual (`sparkline`) slot** sizes to its content and keeps the card inset
|
|
1108
|
+
instead of a 22 px bleed. The slot's loading skeleton keeps the card inset on both sides.
|
|
1109
|
+
- **`BarList`**: the bar spans the label column only, so a full-scale bar ends before its value; value and
|
|
1110
|
+
secondary are shared grid columns, and the secondary is `sm`.
|
|
1111
|
+
- A selector that targeted the old markup (`li > span[aria-hidden]` for a BarList bar) needs `[data-bar-track]`.
|
|
1112
|
+
|
|
1049
1113
|
## 2.18.0
|
|
1050
1114
|
|
|
1051
1115
|
### Status text derived per surface
|
|
@@ -35,7 +35,7 @@ Score per component, then add one line per page for the page items (Communicatio
|
|
|
35
35
|
1. **[measured]** Every inset, gap and radius is a step in `metrics.json` `scale`; nested surfaces step by at least 3 px of radius. No `scale` → `unverified`. Never invent steps.
|
|
36
36
|
2. **[measured]** No more than three font sizes inside one component: `fontSizes` with more than 3 distinct values fails.
|
|
37
37
|
3. No empty region of 40 % or more of the component's height — **[measured]**: `emptyRatio` ≥ 0.4 fails; no dense-list row wraps at 390 — judged from the 390 crop.
|
|
38
|
-
4. One ring per surface, no bare hairline borders on cards, no accent on chrome: look at every crop for an accent hue on a tab underline, a selected row, a secondary button, a card ring or a solid-filled badge. The accent sites are the primary data series, active-nav icons and active child labels, links, primary buttons, focus rings and the leader bar in meters; chrome (borders, inactive states, backgrounds, general icons) stays neutral, and selection state (active nav row, selected tab) never takes the accent. A
|
|
38
|
+
4. One ring per surface, no bare hairline borders on cards, no accent on chrome: look at every crop for an accent hue on a tab underline, a selected row, a secondary button, a card ring or a solid-filled badge. The accent sites are the primary data series, active-nav icons and active child labels, links, primary buttons, focus rings and the leader bar in meters; chrome (borders, inactive states, backgrounds, general icons) stays neutral, and selection state (active nav row, selected tab) never takes the accent. A status is a dot plus a word, or the value's own ink; a coloured edge stripe or rail down a card, row or callout for status fails here (Craft 4), and a card's `tone` dot-and-word verdict passes.
|
|
39
39
|
5. **[measured]** Text and meaningful marks meet contrast in both schemes (a non-empty `contrast.failures` fails); nothing is told apart only by colour.
|
|
40
40
|
6. Nothing overflows, clips or truncates a value at 1440 or 390.
|
|
41
41
|
7. Hover, focus and tooltip states are present in the shots; focus is the 2 px outline.
|
|
@@ -44,7 +44,7 @@ Score per component, then add one line per page for the page items (Communicatio
|
|
|
44
44
|
|
|
45
45
|
1. Name the data's shape and the encoding used; both must match a row of the encoding table (the catalogue) in the `/basalt-design` skill.
|
|
46
46
|
2. Every visual answers the question its caption names; a decorative visual fails.
|
|
47
|
-
3. A hue appears only for a trend, a status or a category; a single metric is neutral. A delta is text in its trend colour with a direction glyph and no fill: a fill or a badge on a delta fails here and Craft 4.
|
|
47
|
+
3. A hue appears only for a trend, a status or a category; a single metric is neutral. A delta is text in its trend colour with a direction glyph and no fill: a fill or a badge on a delta fails here and Craft 4. A status drawn as a coloured leading-edge stripe fails here too: it is decoration, where the dot and the word carry the verdict in shape and text.
|
|
48
48
|
4. A number with a target shows the target; a number with a history shows it; a whole with parts shows the parts.
|
|
49
49
|
5. No axis repeats a label; ticks fit the span.
|
|
50
50
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../../src/commands/notifications/center.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../../src/commands/notifications/center.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAqBrD;;4CAE4C;AAC5C,eAAO,MAAM,0BAA0B,MAAM,CAAA;AA6F7C,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG;IAClD,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC5B,CAAA;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAe,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,uBAAuB,+BA4EhG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from "react";
|
|
3
3
|
import {
|
|
4
4
|
Box,
|
|
@@ -12,20 +12,15 @@ import {
|
|
|
12
12
|
} from "@mantine/core";
|
|
13
13
|
import { cx } from "../../common/props.js";
|
|
14
14
|
import { relativeTime } from "../../format/index.js";
|
|
15
|
+
import { StatusVerdict } from "../../theme/status-verdict.js";
|
|
15
16
|
import { VX } from "../../tokens/index.js";
|
|
16
17
|
import { resolveAction } from "./define-notifications.js";
|
|
17
18
|
import { useNotificationHistory } from "./store.js";
|
|
18
|
-
const
|
|
19
|
-
success: "green",
|
|
20
|
-
error: "red",
|
|
21
|
-
warning: "yellow",
|
|
22
|
-
info: "blue"
|
|
23
|
-
};
|
|
24
|
-
const INTENT_STATUS = {
|
|
25
|
-
success: VX.status.good,
|
|
26
|
-
error: VX.status.bad,
|
|
27
|
-
warning: VX.status.warn,
|
|
28
|
-
info: VX.accent
|
|
19
|
+
const INTENT_META = {
|
|
20
|
+
success: { color: "green", dot: VX.status.good, word: "Success" },
|
|
21
|
+
error: { color: "red", dot: VX.status.bad, word: "Error" },
|
|
22
|
+
warning: { color: "yellow", dot: VX.status.warn, word: "Warning" },
|
|
23
|
+
info: { color: "blue", dot: VX.muted, word: "Info" }
|
|
29
24
|
};
|
|
30
25
|
const NOTIFICATION_POPOVER_WIDTH = 320;
|
|
31
26
|
function NotificationItem({
|
|
@@ -37,8 +32,7 @@ function NotificationItem({
|
|
|
37
32
|
}) {
|
|
38
33
|
const isUnread = item.readAt === void 0;
|
|
39
34
|
const isDismissed = item.dismissedAt !== void 0;
|
|
40
|
-
const color =
|
|
41
|
-
const statusAccent = INTENT_STATUS[item.intent];
|
|
35
|
+
const { color, dot, word } = INTENT_META[item.intent];
|
|
42
36
|
const resolved = item.action !== void 0 ? resolveAction(item.action) : void 0;
|
|
43
37
|
function handleAction(e) {
|
|
44
38
|
e.stopPropagation();
|
|
@@ -57,24 +51,22 @@ function NotificationItem({
|
|
|
57
51
|
onClick: isUnread ? () => onMarkRead(item.id) : void 0,
|
|
58
52
|
style: {
|
|
59
53
|
cursor: isUnread ? "pointer" : "default",
|
|
60
|
-
borderInlineStart: `3px solid ${statusAccent}`,
|
|
61
54
|
borderRadius: "var(--mantine-radius-sm)",
|
|
62
55
|
background: isUnread ? "var(--mantine-color-default-hover)" : "transparent",
|
|
63
56
|
opacity: isDismissed ? 0.55 : 1
|
|
64
57
|
},
|
|
65
58
|
children: /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "flex-start", wrap: "nowrap", children: [
|
|
66
59
|
/* @__PURE__ */ jsxs(Stack, { gap: 2, style: { minWidth: 0, flex: 1 }, children: [
|
|
67
|
-
item.title !== void 0
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
),
|
|
60
|
+
item.title !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", wrap: "nowrap", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(StatusVerdict, { color: dot, word }),
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", fw: isUnread ? 600 : 500, lh: 1.2, miw: 0, truncate: "end", children: item.title })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", lh: 1.3, c: "dimmed", style: { wordBreak: "break-word" }, children: item.message })
|
|
66
|
+
] }) : /* @__PURE__ */ jsxs(Group, { gap: "xs", align: "flex-start", wrap: "nowrap", children: [
|
|
67
|
+
/* @__PURE__ */ jsx(StatusVerdict, { color: dot, word }),
|
|
68
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", lh: 1.3, miw: 0, style: { wordBreak: "break-word" }, children: item.message })
|
|
69
|
+
] }),
|
|
78
70
|
/* @__PURE__ */ jsxs(Group, { gap: "xs", align: "center", mt: 2, wrap: "nowrap", children: [
|
|
79
71
|
/* @__PURE__ */ jsx(Text, { ff: "monospace", c: "var(--vx-faint)", style: { fontSize: VX.text.micro }, children: relativeTime(item.createdAt, { style: "short" }) }),
|
|
80
72
|
resolved !== void 0 && /* @__PURE__ */ jsx(Button, { variant: "light", color, size: "compact-xs", onClick: handleAction, children: resolved.label })
|
|
@@ -17,7 +17,7 @@ import type { BasaltProps } from '../common/props.js';
|
|
|
17
17
|
*/
|
|
18
18
|
export type CalloutKind = 'info' | 'good' | 'warn' | 'bad';
|
|
19
19
|
export type CalloutProps = BasaltProps & {
|
|
20
|
-
/** Semantic kind — drives the
|
|
20
|
+
/** Semantic kind — drives the tint color and the default icon. Default `'info'`. */
|
|
21
21
|
readonly kind?: CalloutKind;
|
|
22
22
|
readonly title?: string;
|
|
23
23
|
/** Overrides the default per-kind icon. Only rendered alongside a `title`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/content/callout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;AAE1D,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,
|
|
1
|
+
{"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../src/content/callout.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;AAE1D,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,oFAAoF;IACpF,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAA;IAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAA;CAC7B,CAAA;AAiED,wBAAgB,OAAO,CAAC,EAAE,IAAa,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,YAAY,+BAoB/F"}
|
package/dist/content/callout.js
CHANGED
|
@@ -39,6 +39,12 @@ function BadGlyph() {
|
|
|
39
39
|
/* @__PURE__ */ jsx("path", { d: "M9.5 9.5l5 5M14.5 9.5l-5 5", strokeWidth: 2, strokeLinecap: "round" })
|
|
40
40
|
] });
|
|
41
41
|
}
|
|
42
|
+
const KIND_WORD = {
|
|
43
|
+
info: "Info",
|
|
44
|
+
good: "Success",
|
|
45
|
+
warn: "Warning",
|
|
46
|
+
bad: "Error"
|
|
47
|
+
};
|
|
42
48
|
const DEFAULT_ICON = {
|
|
43
49
|
info: /* @__PURE__ */ jsx(InfoGlyph, {}),
|
|
44
50
|
good: /* @__PURE__ */ jsx(GoodGlyph, {}),
|
|
@@ -56,7 +62,10 @@ function Callout({ kind = "info", title, icon, children, className, style }) {
|
|
|
56
62
|
/* @__PURE__ */ jsx("span", { className: classes.icon, children: icon ?? DEFAULT_ICON[kind] }),
|
|
57
63
|
/* @__PURE__ */ jsx("span", { className: classes.title, children: title })
|
|
58
64
|
] }),
|
|
59
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: classes.body, children: [
|
|
66
|
+
/* @__PURE__ */ jsx("span", { className: classes.kindWord, "data-callout-kind-word": "", children: KIND_WORD[kind] }),
|
|
67
|
+
children
|
|
68
|
+
] })
|
|
60
69
|
]
|
|
61
70
|
}
|
|
62
71
|
);
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Callout — a soft tinted panel
|
|
3
|
-
* `--callout-ink` is set per kind below and consumed by both the
|
|
2
|
+
* Callout — a soft tinted panel, keyed to one of the four semantic tokens.
|
|
3
|
+
* `--callout-ink` is set per kind below and consumed by both the bg tint and the title/icon
|
|
4
4
|
* color — one custom property, no per-kind duplication.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
.root {
|
|
8
8
|
border-radius: var(--vx-radius-card);
|
|
9
9
|
padding: var(--vx-space-callout-inset-y) var(--vx-space-callout-inset-x);
|
|
10
|
-
border-left: 2px solid var(--callout-ink);
|
|
11
10
|
background: color-mix(in srgb, var(--callout-ink) 8%, transparent);
|
|
12
11
|
}
|
|
13
12
|
|
|
@@ -56,6 +55,7 @@
|
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
.body {
|
|
58
|
+
position: relative;
|
|
59
59
|
font-size: var(--vx-text-md);
|
|
60
60
|
color: var(--vx-ink2);
|
|
61
61
|
}
|
|
@@ -75,3 +75,15 @@
|
|
|
75
75
|
.body p {
|
|
76
76
|
margin: 0 0 var(--vx-space-stack-sm);
|
|
77
77
|
}
|
|
78
|
+
|
|
79
|
+
/* The kind as a word for assistive tech; visually hidden. */
|
|
80
|
+
.kindWord {
|
|
81
|
+
position: absolute;
|
|
82
|
+
width: 1px;
|
|
83
|
+
height: 1px;
|
|
84
|
+
margin: -1px;
|
|
85
|
+
padding: 0;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
clip-path: inset(50%);
|
|
88
|
+
white-space: nowrap;
|
|
89
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bar-list.d.ts","sourceRoot":"","sources":["../../src/dashboard/bar-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bar-list.d.ts","sourceRoot":"","sources":["../../src/dashboard/bar-list.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAIlD,KAAK,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAExF,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG;IACvC,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAA;IACb,6EAA6E;IAC7E,KAAK,EAAE,SAAS,WAAW,EAAE,CAAA;IAC7B,0DAA0D;IAC1D,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IAClC,iEAAiE;IACjE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,oCAAoC;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAMD,wBAAgB,OAAO,CAAC,EACtB,KAAK,EACL,KAAK,EACL,MAAe,EACf,GAAG,EACH,YAAoB,EACpB,OAAe,EACf,WAAe,EACf,SAAqB,EACrB,SAAS,EACT,KAAK,GACN,EAAE,YAAY,+BA0Dd"}
|
|
@@ -3,6 +3,7 @@ import { Skeleton, VisuallyHidden } from "@mantine/core";
|
|
|
3
3
|
import { cx } from "../common/props.js";
|
|
4
4
|
import classes from "./bar-list.module.css";
|
|
5
5
|
import { asText, barPercent } from "./scale.js";
|
|
6
|
+
const hasContent = (node) => node !== void 0 && node !== null && typeof node !== "boolean";
|
|
6
7
|
function BarList({
|
|
7
8
|
label,
|
|
8
9
|
items,
|
|
@@ -25,26 +26,38 @@ function BarList({
|
|
|
25
26
|
return /* @__PURE__ */ jsx("output", { className: cx(classes.root, className), style, "aria-label": label, children: /* @__PURE__ */ jsx("span", { className: classes.empty, children: emptyText }) });
|
|
26
27
|
}
|
|
27
28
|
const scale = max ?? items.reduce((top, i) => Number.isFinite(i.value) ? Math.max(top, i.value) : top, 0);
|
|
29
|
+
const hasSecondary = items.some((i) => hasContent(i.secondary));
|
|
28
30
|
return (
|
|
29
31
|
// The explicit role is deliberate: `list-style: none` makes Safari/VoiceOver drop the implicit one.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
/* @__PURE__ */ jsx(
|
|
33
|
+
"ul",
|
|
34
|
+
{
|
|
35
|
+
className: cx(classes.root, className),
|
|
36
|
+
style,
|
|
37
|
+
role: "list",
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
"data-secondary": hasSecondary ? "" : void 0,
|
|
40
|
+
children: items.map((item, i) => {
|
|
41
|
+
const isLeader = accentLeader && i === 0;
|
|
42
|
+
return /* @__PURE__ */ jsxs("li", { className: classes.row, children: [
|
|
43
|
+
/* @__PURE__ */ jsxs("span", { className: classes.track, "data-bar-track": true, children: [
|
|
44
|
+
/* @__PURE__ */ jsx(
|
|
45
|
+
"span",
|
|
46
|
+
{
|
|
47
|
+
className: cx(classes.bar, isLeader && classes.leader),
|
|
48
|
+
style: { width: `${barPercent(item.value, scale)}%` },
|
|
49
|
+
"data-bar-leader": isLeader ? "" : void 0,
|
|
50
|
+
"aria-hidden": true
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: classes.label, title: item.label, children: item.label })
|
|
54
|
+
] }),
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: classes.value, children: Number.isFinite(item.value) ? format(item.value) : "\u2014" }),
|
|
56
|
+
hasSecondary && /* @__PURE__ */ jsx("span", { className: classes.secondary, children: item.secondary })
|
|
57
|
+
] }, item.key ?? `${item.label}-${i}`);
|
|
58
|
+
})
|
|
59
|
+
}
|
|
60
|
+
)
|
|
48
61
|
);
|
|
49
62
|
}
|
|
50
63
|
export {
|
|
@@ -1,30 +1,46 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* BarList — ranked rows on one shared scale (docs/waves/design-parity/SPEC.md § 6.4). The bar
|
|
3
|
-
*
|
|
2
|
+
* BarList — ranked rows on one shared scale (docs/waves/design-parity/SPEC.md § 6.4). The bar track
|
|
3
|
+
* is the LABEL column only; the value (and secondary) columns sit outside it, so a full-scale bar ends
|
|
4
|
+
* before the value. The columns are shared by every row (subgrid), which is what keeps one scale. The
|
|
5
|
+
* row never wraps: the label truncates, the value is nowrap.
|
|
4
6
|
*/
|
|
5
7
|
|
|
6
8
|
.root {
|
|
7
|
-
display:
|
|
8
|
-
|
|
9
|
-
gap: var(--vx-space-
|
|
9
|
+
display: grid;
|
|
10
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
11
|
+
column-gap: var(--vx-space-control-gap, 0.375rem);
|
|
12
|
+
row-gap: var(--vx-space-stack-xs, 0.25rem);
|
|
10
13
|
margin: 0;
|
|
11
14
|
padding: 0;
|
|
12
15
|
list-style: none;
|
|
13
16
|
min-width: 0;
|
|
14
17
|
}
|
|
15
18
|
|
|
19
|
+
.root[data-secondary] {
|
|
20
|
+
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
.row {
|
|
17
|
-
|
|
18
|
-
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-column: 1 / -1;
|
|
26
|
+
grid-template-columns: subgrid;
|
|
19
27
|
align-items: center;
|
|
20
|
-
gap: var(--vx-space-control-gap, 0.375rem);
|
|
21
28
|
min-width: 0;
|
|
22
29
|
min-height: calc(var(--vx-space-control-height-widget, 1.5rem) * var(--mantine-scale, 1));
|
|
23
|
-
padding-inline: var(--vx-space-stack-sm);
|
|
24
30
|
font-size: var(--vx-text-sm);
|
|
25
31
|
color: var(--vx-ink);
|
|
26
32
|
}
|
|
27
33
|
|
|
34
|
+
/* The bar's scale: `.bar` is a percentage of THIS box, never of the row. */
|
|
35
|
+
.track {
|
|
36
|
+
position: relative;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
align-self: stretch;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
padding-inline: var(--vx-space-stack-sm);
|
|
42
|
+
}
|
|
43
|
+
|
|
28
44
|
.bar {
|
|
29
45
|
position: absolute;
|
|
30
46
|
inset-block: 0;
|
|
@@ -39,7 +55,6 @@
|
|
|
39
55
|
|
|
40
56
|
.label {
|
|
41
57
|
position: relative;
|
|
42
|
-
flex: 1 1 0;
|
|
43
58
|
min-width: 0;
|
|
44
59
|
overflow: hidden;
|
|
45
60
|
text-overflow: ellipsis;
|
|
@@ -47,27 +62,30 @@
|
|
|
47
62
|
}
|
|
48
63
|
|
|
49
64
|
.value {
|
|
50
|
-
position: relative;
|
|
51
|
-
flex: none;
|
|
52
65
|
font-family: var(--basalt-font-mono);
|
|
53
66
|
text-align: end;
|
|
54
67
|
white-space: nowrap;
|
|
55
68
|
}
|
|
56
69
|
|
|
70
|
+
.value:last-child,
|
|
71
|
+
.secondary:last-child {
|
|
72
|
+
padding-inline-end: var(--vx-space-stack-sm);
|
|
73
|
+
}
|
|
74
|
+
|
|
57
75
|
.secondary {
|
|
58
|
-
position: relative;
|
|
59
|
-
flex: none;
|
|
60
76
|
font-family: var(--basalt-font-mono);
|
|
61
|
-
font-size: var(--vx-text-
|
|
77
|
+
font-size: var(--vx-text-sm);
|
|
62
78
|
color: var(--vx-muted);
|
|
63
79
|
white-space: nowrap;
|
|
64
80
|
}
|
|
65
81
|
|
|
66
82
|
.empty {
|
|
83
|
+
grid-column: 1 / -1;
|
|
67
84
|
font-size: var(--vx-text-sm);
|
|
68
85
|
color: var(--vx-muted);
|
|
69
86
|
}
|
|
70
87
|
|
|
71
88
|
.skeletonRow {
|
|
89
|
+
grid-column: 1 / -1;
|
|
72
90
|
height: calc(var(--vx-space-control-height-widget, 1.5rem) * var(--mantine-scale, 1));
|
|
73
91
|
}
|