basalt-ui 2.27.1 → 2.27.2
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 +12 -0
- package/MIGRATING.md +16 -12
- package/dist/charts/chart-box.module.css +19 -3
- package/dist/charts/compile.js +1 -1
- package/dist/dashboard/stat-card.js +1 -1
- package/dist/dashboard/stat-strip.js +1 -1
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +15 -2
- package/dist/styles.css +0 -8
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/charts/chart-box.module.css +19 -3
- package/src/charts/compile.ts +2 -2
- package/src/dashboard/stat-card.tsx +1 -1
- package/src/dashboard/stat-strip.tsx +1 -1
- package/src/dashboard/widget-header.tsx +29 -5
- package/src/styles.css +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [2.27.2](https://github.com/jkrumm/basalt-ui/compare/v2.27.1...v2.27.2) (2026-10-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* clear the whole header block when the bubble slides ([11269b5](https://github.com/jkrumm/basalt-ui/commit/11269b5f896e89455d315726d6e11184ec1fc6fc))
|
|
7
|
+
* keep the info bubble off StatCard and strip-cell headlines ([73f0670](https://github.com/jkrumm/basalt-ui/commit/73f0670fa69580a8b9341cf2ae54b29232329037))
|
|
8
|
+
* measure the marked header block and exact headline text ([04546f2](https://github.com/jkrumm/basalt-ui/commit/04546f27caa7a7befe1d6801837f3ae0721fb66d))
|
|
9
|
+
* one home for the chart ring, tidy the w41 chip test ([b9938a7](https://github.com/jkrumm/basalt-ui/commit/b9938a713f793ae575bda448a3c6797ec96d37ec))
|
|
10
|
+
* open the info bubble below the card's header block ([a5d57cd](https://github.com/jkrumm/basalt-ui/commit/a5d57cd4c4416aa8e95512238560acaf9e659fd9))
|
|
11
|
+
* slotted bars chip clears the plot's focus ring and swatch ([d456c08](https://github.com/jkrumm/basalt-ui/commit/d456c0856f7bb7d270f4263795f42f2fc768ae83))
|
|
12
|
+
|
|
1
13
|
## [2.27.1](https://github.com/jkrumm/basalt-ui/compare/v2.27.0...v2.27.1) (2026-10-19)
|
|
2
14
|
|
|
3
15
|
|
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 | 2.19.0 | 2.20.0 | 2.21.0 | 2.22.0 | 2.23.0 | 2.24.0 | 2.25.0 | 2.26.0 | 2.27.0 | 2.27.1 | 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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `Lines` linear curve, `naming`, no lone-series legend, locale tooltip header, y gutter, `RefLine.labelPosition`, `StackedArea.fillOpacity` (§ Chart chrome) | — | error fallback `The request failed.` (§ State defaults) | — | — | — | — | — |
|
|
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`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltDataTable` error title `Could not load rows` (§ State defaults) | — | — | — | — | — |
|
|
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) | — | plain `Meter` value bar fill muted (`tone="ink"` to opt out); `BarList` default `thin`, `variant="default"` → `inline` (§ 2.21.0) | — | — | `LoadingState` section skeleton, page spinner neutral (§ State defaults) | — | — | — | — | — |
|
|
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) | — | — | — | — | `series-palette` at `warn` (§ 2.21.0) | — | `series-palette` → `error` (§ Guards) | `raw-spacing`, `inline-spacing` → `error` (§ Guards) | — | `basalt/card-inset` → `error` (§ Guards) | — | — | — |
|
|
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 | 2.20.0 | 2.21.0 | 2.22.0 | 2.23.0 | 2.24.0 | 2.25.0 | 2.26.0 | 2.27.0 | 2.27.1 | 2.27.2 | 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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `Lines` linear curve, `naming`, no lone-series legend, locale tooltip header, y gutter, `RefLine.labelPosition`, `StackedArea.fillOpacity` (§ Chart chrome) | — | error fallback `The request failed.` (§ State defaults) | — | — | — | — | — | — |
|
|
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`) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — | `BasaltDataTable` error title `Could not load rows` (§ State defaults) | — | — | — | — | — | — |
|
|
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) | — | plain `Meter` value bar fill muted (`tone="ink"` to opt out); `BarList` default `thin`, `variant="default"` → `inline` (§ 2.21.0) | — | — | `LoadingState` section skeleton, page spinner neutral (§ State defaults) | — | — | — | — | — | — |
|
|
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) | — | — | — | — | `series-palette` at `warn` (§ 2.21.0) | — | `series-palette` → `error` (§ Guards) | `raw-spacing`, `inline-spacing` → `error` (§ Guards) | — | `basalt/card-inset` → `error` (§ Guards) | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -1046,6 +1046,10 @@ 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.27.2
|
|
1050
|
+
|
|
1051
|
+
_Nothing to migrate in this release._
|
|
1052
|
+
|
|
1049
1053
|
## 2.27.1
|
|
1050
1054
|
|
|
1051
1055
|
_Nothing to migrate in this release._
|
|
@@ -167,6 +167,14 @@
|
|
|
167
167
|
var(--vx-surface-elevated) !important;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/* The engine focuses the plot's `svg.ts-chart` (tabindex 0), not the `.basalt-chart` wrapper
|
|
171
|
+
* `styles.css` rings, so the UA's `auto` ring paints (a 5px white double ring in dark): the same
|
|
172
|
+
* 2px accent ring at the same offset, which the slotted chip clears (`SLOT_RING_CLEARANCE`). */
|
|
173
|
+
:global(.basalt-chart .ts-chart:focus-visible) {
|
|
174
|
+
outline: 2px solid var(--vx-accent);
|
|
175
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
176
|
+
}
|
|
177
|
+
|
|
170
178
|
/*
|
|
171
179
|
* A slotted `Bars` (`data-basalt-slot`, set by `compile.ts`) is a micro-visual: its tooltip is the
|
|
172
180
|
* Sparkline's one-line chip, `<value> · <x label>` in the line the host reserves above the plot. The
|
|
@@ -179,15 +187,15 @@
|
|
|
179
187
|
align-items: center;
|
|
180
188
|
box-sizing: border-box;
|
|
181
189
|
width: max-content;
|
|
182
|
-
/* The line the cell reserves (1.125rem) less the focus ring's clearance (2px outline + 0.125rem offset), so
|
|
190
|
+
/* The line the cell reserves (1.125rem) less the focus ring's clearance (2px outline + 0.125rem offset) and 1px of air, so
|
|
183
191
|
* the chip sits clear of the ring and still inside the reserve. */
|
|
184
|
-
block-size: calc(1.125rem - 0.
|
|
192
|
+
block-size: calc(1.125rem - 0.3125rem);
|
|
185
193
|
padding: 0 4px !important;
|
|
186
194
|
overflow: hidden;
|
|
187
195
|
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
188
196
|
font-variant-numeric: lining-nums;
|
|
189
197
|
font-size: var(--vx-text-xs);
|
|
190
|
-
line-height: calc(1.125rem - 0.
|
|
198
|
+
line-height: calc(1.125rem - 0.3125rem - 2px);
|
|
191
199
|
white-space: nowrap !important;
|
|
192
200
|
border-radius: var(--vx-radius-ctrl) !important;
|
|
193
201
|
/* theme-allow css-raw-surface — the chip is flat, like the Sparkline's, not a floating panel */
|
|
@@ -213,6 +221,14 @@
|
|
|
213
221
|
display: none;
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
/* The engine's series swatch is a block above the figure: it stacks the row taller than the chip and the
|
|
225
|
+
* figure's lower half falls under the chip's `overflow: hidden`. `!important`: the engine sets the
|
|
226
|
+
* swatch's `display` with a rule this one cannot out-rank by specificity alone (measured: the swatch
|
|
227
|
+
* stayed `block` under a plain selector). */
|
|
228
|
+
:global(.ts-chart-tooltip[data-basalt-slot] .ts-chart-tooltip__swatch) {
|
|
229
|
+
display: none !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
216
232
|
:global(.ts-chart-tooltip[data-basalt-slot] .ts-chart-tooltip__title) {
|
|
217
233
|
display: block !important;
|
|
218
234
|
flex: 0 1 auto;
|
package/dist/charts/compile.js
CHANGED
|
@@ -607,7 +607,7 @@ const slotAnchor = (points, { plot }) => {
|
|
|
607
607
|
return { x: (Math.min(...xs) + Math.max(...xs)) / 2, y: plot.y };
|
|
608
608
|
};
|
|
609
609
|
const SLOT_TOOLTIP_PLACEMENT = ["top"];
|
|
610
|
-
const SLOT_RING_CLEARANCE = 2 + 2;
|
|
610
|
+
const SLOT_RING_CLEARANCE = 2 + 2 + 1;
|
|
611
611
|
const TIP_CHROME = 30;
|
|
612
612
|
const TIP_ROW = 18;
|
|
613
613
|
const TIP_TOP_AIR = 4;
|
|
@@ -197,7 +197,7 @@ function StatCard({
|
|
|
197
197
|
...pending && { "aria-busy": true },
|
|
198
198
|
children: [
|
|
199
199
|
pending && /* @__PURE__ */ jsx(VisuallyHidden, { children: `Loading ${title}` }),
|
|
200
|
-
/* @__PURE__ */ jsxs("div", { className: cx(classes.header, classNames?.header), children: [
|
|
200
|
+
/* @__PURE__ */ jsxs("div", { className: cx(classes.header, classNames?.header), "data-basalt-header-block": true, children: [
|
|
201
201
|
/* @__PURE__ */ jsx(
|
|
202
202
|
CaptionRow,
|
|
203
203
|
{
|
|
@@ -101,7 +101,7 @@ function StripCell({
|
|
|
101
101
|
...state === void 0 && rows !== void 0 && { "data-strip-has-rows": "" },
|
|
102
102
|
...cell.stale && { "data-stale": "true" },
|
|
103
103
|
children: [
|
|
104
|
-
/* @__PURE__ */ jsxs("div", { className: classes.head, "data-strip-head": true, children: [
|
|
104
|
+
/* @__PURE__ */ jsxs("div", { className: classes.head, "data-strip-head": true, "data-basalt-header-block": true, children: [
|
|
105
105
|
/* @__PURE__ */ jsxs("div", { className: classes.captionLine, children: [
|
|
106
106
|
/* @__PURE__ */ jsxs("div", { className: classes.captionMain, children: [
|
|
107
107
|
/* @__PURE__ */ jsxs("span", { className: classes.lead, children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widget-header.d.ts","sourceRoot":"","sources":["../../src/dashboard/widget-header.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGlD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE7D;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEnE,MAAM,MAAM,iBAAiB,GAAG,WAAW,GACzC,eAAe,CAAC,gBAAgB,CAAC,GAAG;IAClC;;;;gDAI4C;IAC5C,IAAI,EAAE,gBAAgB,CAAA;IACtB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,iGAAiG;IACjG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;wCAEoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;oFACgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;qEACiE;IACjE,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC;4DACwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;yDACqD;IACrD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;2EACuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4FAA4F;IAC5F,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,CAAA;AAEpG;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,CAAC,CAAA;AAE/E;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,iBAAiB,EACjB,OAAO,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,CACzE,CAAA;
|
|
1
|
+
{"version":3,"file":"widget-header.d.ts","sourceRoot":"","sources":["../../src/dashboard/widget-header.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAGjD,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAGlD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAE7D;;;;;;;;;GASG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;AAEnE,MAAM,MAAM,iBAAiB,GAAG,WAAW,GACzC,eAAe,CAAC,gBAAgB,CAAC,GAAG;IAClC;;;;gDAI4C;IAC5C,IAAI,EAAE,gBAAgB,CAAA;IACtB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAA;IACb,iGAAiG;IACjG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;wCAEoC;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;oFACgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;;;;;;;OAWG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,sFAAsF;IACtF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mEAAmE;IACnE,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;qEACiE;IACjE,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B;;;;;;;;;;;;OAYG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;IACvC;4DACwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;yDACqD;IACrD,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;2EACuE;IACvE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,4FAA4F;IAC5F,OAAO,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC,CAAA;AAEpG;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,CAAC,CAAA;AAE/E;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,iBAAiB,EACjB,OAAO,GAAG,aAAa,GAAG,eAAe,GAAG,aAAa,GAAG,YAAY,CACzE,CAAA;AA0HD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,SAA8B,EAC9B,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAA;IACZ,+FAA+F;IAC/F,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;2DAGuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,+BA2EA;AAED,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,KAAK,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,SAAS,EACT,KAAK,EACL,OAAO,EACP,SAAS,EACT,KAAK,EACL,UAAU,GACX,EAAE,iBAAiB,+BAmEnB"}
|
|
@@ -13,6 +13,15 @@ function cardOf(trigger) {
|
|
|
13
13
|
}
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
|
+
const FACTS = "[data-basalt-facts], [data-basalt-facts-skeleton]";
|
|
17
|
+
function headerBlockOf(trigger, card) {
|
|
18
|
+
const marked = trigger.closest("[data-basalt-header-block]");
|
|
19
|
+
if (marked !== null && card.contains(marked)) return [marked];
|
|
20
|
+
const root = trigger.closest("[data-tier]");
|
|
21
|
+
if (root === null || root === card || !card.contains(root)) return [];
|
|
22
|
+
const siblings = [...root.parentElement?.children ?? []];
|
|
23
|
+
return [root, ...siblings.filter((el) => el !== root && el.matches(FACTS))];
|
|
24
|
+
}
|
|
16
25
|
function useBubblePosition(open, triggerRef, bubbleRef) {
|
|
17
26
|
const [pos, setPos] = useState(null);
|
|
18
27
|
useIsomorphicLayoutEffect(() => {
|
|
@@ -28,7 +37,11 @@ function useBubblePosition(open, triggerRef, bubbleRef) {
|
|
|
28
37
|
const b = bubble.getBoundingClientRect();
|
|
29
38
|
const viewW = document.documentElement.clientWidth;
|
|
30
39
|
const viewH = document.documentElement.clientHeight;
|
|
31
|
-
const
|
|
40
|
+
const block = card === null ? [] : headerBlockOf(trigger, card);
|
|
41
|
+
const blockRects = block.map((el) => el.getBoundingClientRect());
|
|
42
|
+
const blockTop = Math.min(t.top, ...blockRects.map((r) => r.top));
|
|
43
|
+
const blockBottom = Math.max(t.bottom, ...blockRects.map((r) => r.bottom));
|
|
44
|
+
const below = blockBottom + BUBBLE_GAP;
|
|
32
45
|
const above = t.top - BUBBLE_GAP - b.height;
|
|
33
46
|
const overflows = below + b.height > viewH - BUBBLE_EDGE;
|
|
34
47
|
const viewportFlip = above >= BUBBLE_EDGE ? above : below;
|
|
@@ -38,7 +51,7 @@ function useBubblePosition(open, triggerRef, bubbleRef) {
|
|
|
38
51
|
if (above >= floor) top = above;
|
|
39
52
|
else if (card !== null) {
|
|
40
53
|
const slid = Math.max(floor, viewH - BUBBLE_EDGE - b.height);
|
|
41
|
-
const covers = slid <
|
|
54
|
+
const covers = slid < blockBottom && slid + b.height > blockTop;
|
|
42
55
|
top = covers ? viewportFlip : slid;
|
|
43
56
|
}
|
|
44
57
|
}
|
package/dist/styles.css
CHANGED
|
@@ -177,14 +177,6 @@
|
|
|
177
177
|
outline-color: var(--vx-accent);
|
|
178
178
|
}
|
|
179
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
|
-
|
|
188
180
|
/* Hubot Sans is a condensed display face — the spec pins it at 88% font-stretch everywhere it
|
|
189
181
|
lands (headings + the Mantine Title component). Read from the knob declared above rather than
|
|
190
182
|
hardcoded here, so a consumer retunes it in one declaration instead of fighting these bare
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v2.27.
|
|
1
|
+
# basalt-ui v2.27.2
|
|
2
2
|
# Opinionated framework for Mantine-based React apps — theme, app shell, TanStack Charts, toolchain presets
|
|
3
3
|
#
|
|
4
4
|
# Entry points: use the exact import specifier below; do not guess.
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# A subpath's `Install:` line is its required peers; `OptionalPeers:` are import()-only, install on use.
|
|
14
14
|
|
|
15
15
|
Package: basalt-ui
|
|
16
|
-
Version: 2.27.
|
|
16
|
+
Version: 2.27.2
|
|
17
17
|
|
|
18
18
|
## basalt-ui
|
|
19
19
|
Import: import { ... } from 'basalt-ui'
|
package/package.json
CHANGED
|
@@ -167,6 +167,14 @@
|
|
|
167
167
|
var(--vx-surface-elevated) !important;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
+
/* The engine focuses the plot's `svg.ts-chart` (tabindex 0), not the `.basalt-chart` wrapper
|
|
171
|
+
* `styles.css` rings, so the UA's `auto` ring paints (a 5px white double ring in dark): the same
|
|
172
|
+
* 2px accent ring at the same offset, which the slotted chip clears (`SLOT_RING_CLEARANCE`). */
|
|
173
|
+
:global(.basalt-chart .ts-chart:focus-visible) {
|
|
174
|
+
outline: 2px solid var(--vx-accent);
|
|
175
|
+
outline-offset: calc(0.125rem * var(--mantine-scale));
|
|
176
|
+
}
|
|
177
|
+
|
|
170
178
|
/*
|
|
171
179
|
* A slotted `Bars` (`data-basalt-slot`, set by `compile.ts`) is a micro-visual: its tooltip is the
|
|
172
180
|
* Sparkline's one-line chip, `<value> · <x label>` in the line the host reserves above the plot. The
|
|
@@ -179,15 +187,15 @@
|
|
|
179
187
|
align-items: center;
|
|
180
188
|
box-sizing: border-box;
|
|
181
189
|
width: max-content;
|
|
182
|
-
/* The line the cell reserves (1.125rem) less the focus ring's clearance (2px outline + 0.125rem offset), so
|
|
190
|
+
/* The line the cell reserves (1.125rem) less the focus ring's clearance (2px outline + 0.125rem offset) and 1px of air, so
|
|
183
191
|
* the chip sits clear of the ring and still inside the reserve. */
|
|
184
|
-
block-size: calc(1.125rem - 0.
|
|
192
|
+
block-size: calc(1.125rem - 0.3125rem);
|
|
185
193
|
padding: 0 4px !important;
|
|
186
194
|
overflow: hidden;
|
|
187
195
|
font-family: var(--basalt-font-numeral, var(--basalt-font-sans));
|
|
188
196
|
font-variant-numeric: lining-nums;
|
|
189
197
|
font-size: var(--vx-text-xs);
|
|
190
|
-
line-height: calc(1.125rem - 0.
|
|
198
|
+
line-height: calc(1.125rem - 0.3125rem - 2px);
|
|
191
199
|
white-space: nowrap !important;
|
|
192
200
|
border-radius: var(--vx-radius-ctrl) !important;
|
|
193
201
|
/* theme-allow css-raw-surface — the chip is flat, like the Sparkline's, not a floating panel */
|
|
@@ -213,6 +221,14 @@
|
|
|
213
221
|
display: none;
|
|
214
222
|
}
|
|
215
223
|
|
|
224
|
+
/* The engine's series swatch is a block above the figure: it stacks the row taller than the chip and the
|
|
225
|
+
* figure's lower half falls under the chip's `overflow: hidden`. `!important`: the engine sets the
|
|
226
|
+
* swatch's `display` with a rule this one cannot out-rank by specificity alone (measured: the swatch
|
|
227
|
+
* stayed `block` under a plain selector). */
|
|
228
|
+
:global(.ts-chart-tooltip[data-basalt-slot] .ts-chart-tooltip__swatch) {
|
|
229
|
+
display: none !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
216
232
|
:global(.ts-chart-tooltip[data-basalt-slot] .ts-chart-tooltip__title) {
|
|
217
233
|
display: block !important;
|
|
218
234
|
flex: 0 1 auto;
|
package/src/charts/compile.ts
CHANGED
|
@@ -1041,8 +1041,8 @@ const slotAnchor = (
|
|
|
1041
1041
|
return { x: (Math.min(...xs) + Math.max(...xs)) / 2, y: plot.y }
|
|
1042
1042
|
}
|
|
1043
1043
|
const SLOT_TOOLTIP_PLACEMENT = ['top'] as const
|
|
1044
|
-
/** The
|
|
1045
|
-
const SLOT_RING_CLEARANCE = 2 + 2
|
|
1044
|
+
/** The plot's focus ring (`svg.ts-chart:focus-visible`, `chart-box.module.css`) is a 2px outline at a 0.125rem offset, and the chip keeps 1px of air above it. Mirrors that CSS ring at `--mantine-scale` 1; the chip's `block-size` in the same file is the reserve less this. */
|
|
1045
|
+
const SLOT_RING_CLEARANCE = 2 + 2 + 1
|
|
1046
1046
|
|
|
1047
1047
|
/** A tooltip's chrome (title row, padding) and each series row, px: the guess the bar anchor reserves. */
|
|
1048
1048
|
const TIP_CHROME = 30
|
|
@@ -525,7 +525,7 @@ export function StatCard({
|
|
|
525
525
|
{...(pending && { 'aria-busy': true })}
|
|
526
526
|
>
|
|
527
527
|
{pending && <VisuallyHidden>{`Loading ${title}`}</VisuallyHidden>}
|
|
528
|
-
<div className={cx(classes.header, classNames?.header)}>
|
|
528
|
+
<div className={cx(classes.header, classNames?.header)} data-basalt-header-block>
|
|
529
529
|
<CaptionRow
|
|
530
530
|
title={title}
|
|
531
531
|
{...(icon !== undefined && { icon })}
|
|
@@ -286,7 +286,7 @@ function StripCell({
|
|
|
286
286
|
{...(state === undefined && rows !== undefined && { 'data-strip-has-rows': '' })}
|
|
287
287
|
{...(cell.stale && { 'data-stale': 'true' })}
|
|
288
288
|
>
|
|
289
|
-
<div className={classes.head} data-strip-head>
|
|
289
|
+
<div className={classes.head} data-strip-head data-basalt-header-block>
|
|
290
290
|
<div className={classes.captionLine}>
|
|
291
291
|
<div className={classes.captionMain}>
|
|
292
292
|
{/* The caption and its info glyph are one unit: the qualifier wraps whole, never between them. */}
|
|
@@ -179,8 +179,26 @@ function cardOf(trigger: Element): Element | null {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
182
|
+
* The card's header block: the `WidgetHeader` root (title row, value, subtitle, sparkline) plus the
|
|
183
|
+
* facts row `ChartCard` renders as its sibling; a host with no `WidgetHeader` (`StatCard`, a strip cell)
|
|
184
|
+
* marks its own block with `data-basalt-header-block`. The bubble opens below THIS, not below the glyph, so
|
|
185
|
+
* it covers the plot and never the headline figures it annotates. Only siblings of the root count —
|
|
186
|
+
* a facts row deeper in the card's body belongs to the body, never to the header.
|
|
187
|
+
*/
|
|
188
|
+
const FACTS = '[data-basalt-facts], [data-basalt-facts-skeleton]'
|
|
189
|
+
function headerBlockOf(trigger: Element, card: Element): Element[] {
|
|
190
|
+
// `StatCard` and strip cells mark the element bounding their headline (caption row + value rows).
|
|
191
|
+
const marked = trigger.closest('[data-basalt-header-block]')
|
|
192
|
+
if (marked !== null && card.contains(marked)) return [marked]
|
|
193
|
+
const root = trigger.closest('[data-tier]')
|
|
194
|
+
if (root === null || root === card || !card.contains(root)) return []
|
|
195
|
+
const siblings = [...(root.parentElement?.children ?? [])]
|
|
196
|
+
return [root, ...siblings.filter((el) => el !== root && el.matches(FACTS))]
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Places the bubble in the VIEWPORT: below the glyph (inside a card, below its header
|
|
201
|
+
* block), flipped above when it would overflow the bottom edge, shifted sideways to stay inside the left and right edges. Re-places on scroll, resize
|
|
184
202
|
* and when the bubble's own box changes while open. The bubble is a top-layer popover and
|
|
185
203
|
* `position: fixed`, so a card's `overflow: hidden` (every basalt card has one) can never clip it —
|
|
186
204
|
* the W32 round 0-3 defect at 390. `clear` forgets the position on close, so a reopen starts hidden.
|
|
@@ -210,7 +228,12 @@ function useBubblePosition(
|
|
|
210
228
|
// The documentElement's client box is the viewport minus classic scrollbars.
|
|
211
229
|
const viewW = document.documentElement.clientWidth
|
|
212
230
|
const viewH = document.documentElement.clientHeight
|
|
213
|
-
|
|
231
|
+
// Re-queried per place: a skeleton -> facts swap replaces the facts node while open.
|
|
232
|
+
const block = card === null ? [] : headerBlockOf(trigger, card)
|
|
233
|
+
const blockRects = block.map((el) => el.getBoundingClientRect())
|
|
234
|
+
const blockTop = Math.min(t.top, ...blockRects.map((r) => r.top))
|
|
235
|
+
const blockBottom = Math.max(t.bottom, ...blockRects.map((r) => r.bottom))
|
|
236
|
+
const below = blockBottom + BUBBLE_GAP
|
|
214
237
|
const above = t.top - BUBBLE_GAP - b.height
|
|
215
238
|
const overflows = below + b.height > viewH - BUBBLE_EDGE
|
|
216
239
|
// Inside a card the bubble never leaves the card's own box upward: above the header is the
|
|
@@ -225,8 +248,9 @@ function useBubblePosition(
|
|
|
225
248
|
if (above >= floor) top = above
|
|
226
249
|
else if (card !== null) {
|
|
227
250
|
const slid = Math.max(floor, viewH - BUBBLE_EDGE - b.height)
|
|
228
|
-
// Never cover the glyph
|
|
229
|
-
|
|
251
|
+
// Never cover the header block (glyph included): when the slid bubble would, take the
|
|
252
|
+
// viewport flip instead.
|
|
253
|
+
const covers = slid < blockBottom && slid + b.height > blockTop
|
|
230
254
|
top = covers ? viewportFlip : slid
|
|
231
255
|
}
|
|
232
256
|
}
|
package/src/styles.css
CHANGED
|
@@ -177,14 +177,6 @@
|
|
|
177
177
|
outline-color: var(--vx-accent);
|
|
178
178
|
}
|
|
179
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
|
-
|
|
188
180
|
/* Hubot Sans is a condensed display face — the spec pins it at 88% font-stretch everywhere it
|
|
189
181
|
lands (headings + the Mantine Title component). Read from the knob declared above rather than
|
|
190
182
|
hardcoded here, so a consumer retunes it in one declaration instead of fighting these bare
|