basalt-ui 1.36.1 → 1.37.1
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 +20 -0
- package/MIGRATING.md +24 -16
- package/configs/oxlint-plugin.js +7 -7
- package/configs/oxlint-plugin.test.ts +2 -2
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/actions.js +8 -1
- package/dist/dashboard/widget-header.module.css +7 -1
- package/dist/forms/index.d.ts +15 -15
- package/dist/shell/app-mobile-nav.d.ts.map +1 -1
- package/dist/shell/app-mobile-nav.js +3 -0
- package/dist/shell/app-sidebar.d.ts.map +1 -1
- package/dist/shell/app-sidebar.js +4 -2
- package/dist/shell/index.d.ts +7 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/nav-types.d.ts +2 -1
- package/dist/shell/nav-types.d.ts.map +1 -1
- package/llms.txt +2 -2
- package/package.json +1 -1
- package/src/controls/actions.tsx +13 -1
- package/src/controls/form-layout.tsx +1 -1
- package/src/controls/index.ts +1 -1
- package/src/dashboard/widget-header.module.css +7 -1
- package/src/forms/index.ts +16 -16
- package/src/shell/app-mobile-nav.tsx +6 -0
- package/src/shell/app-sidebar.tsx +4 -2
- package/src/shell/index.tsx +6 -0
- package/src/shell/nav-types.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## [1.37.1](https://github.com/jkrumm/basalt-ui/compare/v1.37.0...v1.37.1) (2026-10-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* stop the measured fold folding a row that fits to the sub-pixel ([67aebae](https://github.com/jkrumm/basalt-ui/commit/67aebae33ee966acca555fc98cb609df33a81a6c))
|
|
7
|
+
|
|
8
|
+
# [1.37.0](https://github.com/jkrumm/basalt-ui/compare/v1.36.1...v1.37.0) (2026-10-02)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* give the widget info glyph a real 24px target (WCAG 2.5.8) ([70451f8](https://github.com/jkrumm/basalt-ui/commit/70451f8cb24fbf4eb1dcec8dc32575dc5fd9b4a9))
|
|
14
|
+
* re-date the forms layout deprecations to 1.38.0 ([da1a4a1](https://github.com/jkrumm/basalt-ui/commit/da1a4a146f7ad8467819b953895f7e837c06fd4f))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* let a settings menu entry render as the router link ([55d4023](https://github.com/jkrumm/basalt-ui/commit/55d402360347cf74703530bd843b0c2eae765f6b))
|
|
20
|
+
|
|
1
21
|
## [1.36.1](https://github.com/jkrumm/basalt-ui/compare/v1.36.0...v1.36.1) (2026-10-01)
|
|
2
22
|
|
|
3
23
|
|
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 | 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) | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — |
|
|
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()`) | — | — |
|
|
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) | — | — |
|
|
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) | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — |
|
|
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 | 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) | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — |
|
|
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()`) | — | — | — | — |
|
|
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) | — | — | — | — |
|
|
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) | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — | — | — | — | — | — | — | — | — | — | — | — |
|
|
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) | — | — | — | — |
|
|
81
81
|
|
|
82
82
|
---
|
|
83
83
|
|
|
@@ -86,6 +86,14 @@ consumer read this index, found nothing, and diffed a KPI row that had silently
|
|
|
86
86
|
_Nothing yet. Author the next section under this heading as `## Unreleased — <title>`; the
|
|
87
87
|
release renames it and opens a new one here._
|
|
88
88
|
|
|
89
|
+
## 1.37.1
|
|
90
|
+
|
|
91
|
+
_Nothing to migrate in this release._
|
|
92
|
+
|
|
93
|
+
## 1.37.0
|
|
94
|
+
|
|
95
|
+
_Nothing to migrate in this release._
|
|
96
|
+
|
|
89
97
|
## 1.36.1
|
|
90
98
|
|
|
91
99
|
_Nothing to migrate in this release._
|
|
@@ -125,15 +133,15 @@ import. `FormRow`/`FormGroup` stay law C1's form-row home from either subpath.
|
|
|
125
133
|
|
|
126
134
|
| Was (`basalt-ui/forms`) | Now | Removed in |
|
|
127
135
|
| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | ---------- |
|
|
128
|
-
| `FormSection`, `FormRow`, `FormGroup`, `FormActions` (+ their `*Props`/`*Slot` types) | the same names from `basalt-ui/controls` | 1.
|
|
129
|
-
| `useForm`, `schemaResolver`, `UseFormReturnType`, `UseFormInput` | `@mantine/form` directly (zero consumers imported them from basalt) | 1.
|
|
136
|
+
| `FormSection`, `FormRow`, `FormGroup`, `FormActions` (+ their `*Props`/`*Slot` types) | the same names from `basalt-ui/controls` | 1.38.0 |
|
|
137
|
+
| `useForm`, `schemaResolver`, `UseFormReturnType`, `UseFormInput` | `@mantine/form` directly (zero consumers imported them from basalt) | 1.38.0 |
|
|
130
138
|
|
|
131
|
-
**Grace:** every old import still resolves in 1.36.x. `basalt/deprecated-export` warns on the six
|
|
139
|
+
**Grace:** every old import still resolves in 1.36.x and 1.37.x (re-dated from 1.37.0: consumers still import them). `basalt/deprecated-export` warns on the six
|
|
132
140
|
values, but the rows are `fix: false` — the autofix rewrites a specifier inside its own import
|
|
133
141
|
statement and cannot change the module — so move the import by hand
|
|
134
142
|
(`import { FormRow } from 'basalt-ui/controls'`). Both subpaths are homes for
|
|
135
143
|
`control-outside-home`/`raw-selection-control` throughout. The `public symbols` budget runs at 401
|
|
136
|
-
during the grace minor; 1.
|
|
144
|
+
during the grace minor; 1.38.0 removes six.
|
|
137
145
|
|
|
138
146
|
### `useCoarsePointer()` — the pointer class in JS
|
|
139
147
|
|
package/configs/oxlint-plugin.js
CHANGED
|
@@ -2049,7 +2049,7 @@ const CONTROL_OWNER_NAMES = new Set([
|
|
|
2049
2049
|
* `control-outside-home` treating it as a home is the whole of the enforcement a settings page
|
|
2050
2050
|
* gets, and the two tier rules deliberately do not reach inside it (see {@link SLOT_ATTRS}).
|
|
2051
2051
|
* `FormRow`/`FormGroup` (`basalt-ui/controls`, `src/controls/form-layout.tsx`; `basalt-ui/forms`
|
|
2052
|
-
* re-exports them until 1.
|
|
2052
|
+
* re-exports them until 1.38.0 — the set is NAME-matched, so both subpaths are homes) are the SAME
|
|
2053
2053
|
* home written for a `<form>` rather than a settings page — a `TextInput` bound to a field is read and typed
|
|
2054
2054
|
* into at Mantine's own tier, not a 30px chrome affordance — so they are added here rather than
|
|
2055
2055
|
* given a second walk.
|
|
@@ -3671,42 +3671,42 @@ export const DEPRECATED_EXPORTS = [
|
|
|
3671
3671
|
subpath: 'basalt-ui/forms',
|
|
3672
3672
|
name: 'FormSection',
|
|
3673
3673
|
replacement: "FormSection from 'basalt-ui/controls'",
|
|
3674
|
-
removeIn: '1.
|
|
3674
|
+
removeIn: '1.38.0',
|
|
3675
3675
|
fix: false,
|
|
3676
3676
|
},
|
|
3677
3677
|
{
|
|
3678
3678
|
subpath: 'basalt-ui/forms',
|
|
3679
3679
|
name: 'FormRow',
|
|
3680
3680
|
replacement: "FormRow from 'basalt-ui/controls'",
|
|
3681
|
-
removeIn: '1.
|
|
3681
|
+
removeIn: '1.38.0',
|
|
3682
3682
|
fix: false,
|
|
3683
3683
|
},
|
|
3684
3684
|
{
|
|
3685
3685
|
subpath: 'basalt-ui/forms',
|
|
3686
3686
|
name: 'FormGroup',
|
|
3687
3687
|
replacement: "FormGroup from 'basalt-ui/controls'",
|
|
3688
|
-
removeIn: '1.
|
|
3688
|
+
removeIn: '1.38.0',
|
|
3689
3689
|
fix: false,
|
|
3690
3690
|
},
|
|
3691
3691
|
{
|
|
3692
3692
|
subpath: 'basalt-ui/forms',
|
|
3693
3693
|
name: 'FormActions',
|
|
3694
3694
|
replacement: "FormActions from 'basalt-ui/controls'",
|
|
3695
|
-
removeIn: '1.
|
|
3695
|
+
removeIn: '1.38.0',
|
|
3696
3696
|
fix: false,
|
|
3697
3697
|
},
|
|
3698
3698
|
{
|
|
3699
3699
|
subpath: 'basalt-ui/forms',
|
|
3700
3700
|
name: 'useForm',
|
|
3701
3701
|
replacement: "useForm from '@mantine/form'",
|
|
3702
|
-
removeIn: '1.
|
|
3702
|
+
removeIn: '1.38.0',
|
|
3703
3703
|
fix: false,
|
|
3704
3704
|
},
|
|
3705
3705
|
{
|
|
3706
3706
|
subpath: 'basalt-ui/forms',
|
|
3707
3707
|
name: 'schemaResolver',
|
|
3708
3708
|
replacement: "schemaResolver from '@mantine/form'",
|
|
3709
|
-
removeIn: '1.
|
|
3709
|
+
removeIn: '1.38.0',
|
|
3710
3710
|
fix: false,
|
|
3711
3711
|
},
|
|
3712
3712
|
{
|
|
@@ -1923,7 +1923,7 @@ describe('basalt/control-outside-home', () => {
|
|
|
1923
1923
|
},
|
|
1924
1924
|
)
|
|
1925
1925
|
|
|
1926
|
-
// FormRow/FormGroup (`basalt-ui/controls`, still re-exported from `basalt-ui/forms` until 1.
|
|
1926
|
+
// FormRow/FormGroup (`basalt-ui/controls`, still re-exported from `basalt-ui/forms` until 1.38.0)
|
|
1927
1927
|
// are law C1's third home written for a `<form>` rather than a settings page — the same non-home
|
|
1928
1928
|
// treatment SettingsRow gets, via the same CONTROL_HOST_TAGS ancestry walk, which matches by NAME
|
|
1929
1929
|
// so either subpath is a home.
|
|
@@ -3393,7 +3393,7 @@ describe('basalt/deprecated-export — the form layout move', () => {
|
|
|
3393
3393
|
)
|
|
3394
3394
|
expect(rules).toContain('deprecated-export')
|
|
3395
3395
|
expect(output).toContain(`'basalt-ui/controls'`)
|
|
3396
|
-
expect(output).toContain('removed in 1.
|
|
3396
|
+
expect(output).toContain('removed in 1.38.0')
|
|
3397
3397
|
},
|
|
3398
3398
|
)
|
|
3399
3399
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/controls/actions.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAKxD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,MAAM,CAAC,EAAE,SAAS,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,IA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AAK,GACN,EAAE,iBAAiB,GAAG,SAAS,CAqJ/B;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,CAE9D;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,WAAW,GAAG,SAAS,EAAE,GAAG,SAAS,CAAA;AAEjD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,IAAI,SAAS,EAAE,CAW5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,GAAG,SAAS,CAG9E"}
|
package/dist/controls/actions.js
CHANGED
|
@@ -193,6 +193,7 @@ function joinRuns(actions, opts) {
|
|
|
193
193
|
}
|
|
194
194
|
return runs;
|
|
195
195
|
}
|
|
196
|
+
const SUBPIXEL_SLACK = 1;
|
|
196
197
|
const MORE_WIDTH = 80;
|
|
197
198
|
function planBarFold(input) {
|
|
198
199
|
const { room, fixed, gap, hasMenus, items } = input;
|
|
@@ -274,7 +275,13 @@ function useMeasuredFold(input) {
|
|
|
274
275
|
const rendered = elements.reduce((sum, el) => sum + el.offsetWidth + BAR_GAP, 0);
|
|
275
276
|
const moreNow = hasMenus || Object.values(foldsRef.current).includes("overflow");
|
|
276
277
|
const fixed = used - rendered - (moreNow ? MORE_WIDTH + BAR_GAP : 0);
|
|
277
|
-
const next = planBarFold({
|
|
278
|
+
const next = planBarFold({
|
|
279
|
+
room: row.clientWidth + SUBPIXEL_SLACK,
|
|
280
|
+
fixed,
|
|
281
|
+
gap: BAR_GAP,
|
|
282
|
+
hasMenus,
|
|
283
|
+
items
|
|
284
|
+
});
|
|
278
285
|
const prev = foldsRef.current;
|
|
279
286
|
const same = Object.keys(next).length === Object.keys(prev).length && Object.entries(next).every(([key, step]) => prev[key] === step);
|
|
280
287
|
if (!same) setFolds(next);
|
|
@@ -243,11 +243,17 @@
|
|
|
243
243
|
align-items: center;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/* WCAG 2.5.8 (target-size, AA): the 11px glyph button is a real 24x24 box, not just a `::after`
|
|
247
|
+
* overlay — axe and assistive tech measure the element. The negative margin hands the extra
|
|
248
|
+
* (24 - 11) / 2 back on every side, so the glyph and the row around it keep their drawn size. */
|
|
246
249
|
.infoTrigger {
|
|
247
250
|
display: inline-flex;
|
|
248
251
|
align-items: center;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
min-width: 24px;
|
|
254
|
+
min-height: 24px;
|
|
255
|
+
margin: calc((11px - 24px) / 2);
|
|
249
256
|
appearance: none;
|
|
250
|
-
margin: 0;
|
|
251
257
|
padding: 0;
|
|
252
258
|
border: none;
|
|
253
259
|
background: none;
|
package/dist/forms/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* (`useFormSubmit` + `FormStateProvider`), the list field (`useFieldArray`) and the draft
|
|
11
11
|
* (`useFormDraft`). The layout (`FormSection` / `FormRow` / `FormGroup` / `FormActions`) moved to
|
|
12
12
|
* `basalt-ui/controls` in 1.36.0 — it needs no `@mantine/form` — and stays here as deprecated
|
|
13
|
-
* aliases until 1.
|
|
13
|
+
* aliases until 1.38.0, as do the `useForm`/`schemaResolver` re-exports (import from
|
|
14
14
|
* `@mantine/form`).
|
|
15
15
|
*
|
|
16
16
|
* Optional peer: @mantine/form ^9.3.0 — install with: bun add @mantine/form
|
|
@@ -19,26 +19,26 @@ export { useBasaltForm } from './create-form.js';
|
|
|
19
19
|
export type { UseBasaltFormOptions } from './create-form.js';
|
|
20
20
|
export { inputProps, fieldKey } from './field.js';
|
|
21
21
|
export {
|
|
22
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
22
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
23
23
|
FormSection,
|
|
24
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
24
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
25
25
|
FormRow,
|
|
26
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
26
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
27
27
|
FormGroup,
|
|
28
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
28
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
29
29
|
FormActions, } from '../controls/form-layout.js';
|
|
30
30
|
export type {
|
|
31
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
31
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
32
32
|
FormSectionProps,
|
|
33
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
33
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
34
34
|
FormSectionSlot,
|
|
35
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
35
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
36
36
|
FormRowProps,
|
|
37
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
37
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
38
38
|
FormRowSlot,
|
|
39
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
39
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
40
40
|
FormGroupProps,
|
|
41
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
41
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
42
42
|
FormActionsProps, } from '../controls/form-layout.js';
|
|
43
43
|
export { useFormSubmit, isFieldErrorEnvelope } from './use-form-submit.js';
|
|
44
44
|
export type { FormFieldErrors, UseFormSubmitOptions, UseFormSubmitReturn } from './use-form-submit.js';
|
|
@@ -51,13 +51,13 @@ export type { FormErrorSummaryProps } from './FormErrorSummary.js';
|
|
|
51
51
|
export { useFormDraft, DEFAULT_AUTOSAVE_DEBOUNCE_MS } from './use-form-draft.js';
|
|
52
52
|
export type { UseFormDraftOptions, UseFormDraftReturn } from './use-form-draft.js';
|
|
53
53
|
export {
|
|
54
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
54
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
55
55
|
useForm,
|
|
56
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
56
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
57
57
|
schemaResolver, } from '@mantine/form';
|
|
58
58
|
export type {
|
|
59
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
59
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
60
60
|
UseFormReturnType,
|
|
61
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
61
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
62
62
|
UseFormInput, } from '@mantine/form';
|
|
63
63
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mobile-nav.d.ts","sourceRoot":"","sources":["../../src/shell/app-mobile-nav.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAc,YAAY,EAAa,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,
|
|
1
|
+
{"version":3,"file":"app-mobile-nav.d.ts","sourceRoot":"","sources":["../../src/shell/app-mobile-nav.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAc,YAAY,EAAa,MAAM,OAAO,CAAA;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAGlD,OAAO,KAAK,EACV,eAAe,EAEf,cAAc,EAGd,YAAY,EAMb,MAAM,aAAa,CAAA;AACpB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAqB/C,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IACzC,kFAAkF;IAClF,KAAK,EAAE,cAAc,CAAA;IACrB,MAAM,CAAC,EAAE,eAAe,GAAG,SAAS,CAAA;IACpC;;wEAEoE;IACpE,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACxC,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAA;IAClD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAA;CACpC,CAAA;AAkHD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,kBAAkB,GAAG,SAAS,GAAG,MAAM,CAE/E;AAgFD,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,MAAM,EACN,SAAS,EACT,KAAK,GACN,EAAE,cAAc,GAAG,YAAY,CAwiB/B"}
|
|
@@ -108,6 +108,7 @@ function settingsRows(items) {
|
|
|
108
108
|
label: item.label,
|
|
109
109
|
icon: item.icon,
|
|
110
110
|
onClick: item.onClick,
|
|
111
|
+
...item.Anchor !== void 0 && { Anchor: item.Anchor },
|
|
111
112
|
...item.active !== void 0 && { active: item.active },
|
|
112
113
|
...item.current !== void 0 && { current: item.current }
|
|
113
114
|
}));
|
|
@@ -136,6 +137,7 @@ const menuActionRow = (row, sectionStart = false) => /* @__PURE__ */ jsx(
|
|
|
136
137
|
leftSection: row.icon,
|
|
137
138
|
rightSection: row.active && row.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
138
139
|
...row.danger ? { color: "red" } : {},
|
|
140
|
+
...row.Anchor && { component: row.Anchor },
|
|
139
141
|
onClick: (event) => row.onClick?.(event),
|
|
140
142
|
"aria-current": rowCurrent(row),
|
|
141
143
|
children: row.label
|
|
@@ -360,6 +362,7 @@ function MobileNav({
|
|
|
360
362
|
leftSection: row.icon,
|
|
361
363
|
rightSection: row.active && row.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
362
364
|
...row.danger ? { color: "red" } : {},
|
|
365
|
+
...row.Anchor && { component: row.Anchor },
|
|
363
366
|
onClick: (event) => {
|
|
364
367
|
row.onClick?.(event);
|
|
365
368
|
close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../src/shell/app-sidebar.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5E,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAgBjF,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C;;;;OAIG;IACH,KAAK,EAAE,WAAW,GAAG;QAAE,IAAI,CAAC,EAAE,eAAe,EAAE,CAAA;KAAE,CAAA;IACjD,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;;;;;;;;;OAgBG;IACH,YAAY,CAAC,EAAE,MAAM,G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OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,EAAE,CAAA;CACxB,CAAA;AAmTD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BA2KhD"}
|
|
@@ -269,7 +269,8 @@ function AppSidebar(props) {
|
|
|
269
269
|
UnstyledButton,
|
|
270
270
|
{
|
|
271
271
|
className: classes.footerBtn,
|
|
272
|
-
|
|
272
|
+
...entry.Anchor && { component: entry.Anchor },
|
|
273
|
+
...entry.onClick && { onClick: entry.onClick },
|
|
273
274
|
"aria-label": entry.label,
|
|
274
275
|
"aria-current": settingsCurrent(entry),
|
|
275
276
|
children: [
|
|
@@ -293,9 +294,10 @@ function AppSidebar(props) {
|
|
|
293
294
|
Menu.Item,
|
|
294
295
|
{
|
|
295
296
|
className: classes.settingsMenuItem,
|
|
297
|
+
...entry.Anchor && { component: entry.Anchor },
|
|
296
298
|
leftSection: entry.icon,
|
|
297
299
|
rightSection: entry.active && entry.current !== "page" ? /* @__PURE__ */ jsx(IconCheck, {}) : void 0,
|
|
298
|
-
onClick: entry.onClick,
|
|
300
|
+
...entry.onClick && { onClick: entry.onClick },
|
|
299
301
|
"aria-current": settingsCurrent(entry),
|
|
300
302
|
children: entry.label
|
|
301
303
|
},
|
package/dist/shell/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { BasaltProps } from '../common/props.js';
|
|
|
3
3
|
import type { GlobalAction } from '../controls/actions.js';
|
|
4
4
|
import type { AccountMenuItem, BasaltAccountProps } from './account-types.js';
|
|
5
5
|
import type { SidebarSearchActions, SidebarSearchConfig } from './sidebar-search.js';
|
|
6
|
-
import type { MobileNavConfig, SidebarBlock, SidebarSection } from './nav-types.js';
|
|
6
|
+
import type { MobileNavConfig, NavAnchor, SidebarBlock, SidebarSection } from './nav-types.js';
|
|
7
7
|
export { AppSidebar, type AppSidebarProps } from './app-sidebar.js';
|
|
8
8
|
export { NavCountBadge, type NavCountBadgeProps } from './nav-count-badge.js';
|
|
9
9
|
export { SidebarSearch, type SidebarSearchProps, type SidebarSearchConfig, type SidebarSearchActions, } from './sidebar-search.js';
|
|
@@ -39,6 +39,12 @@ export type SettingsMenuItem = {
|
|
|
39
39
|
label: string;
|
|
40
40
|
icon?: ReactNode;
|
|
41
41
|
onClick?: (e: MouseEvent) => void;
|
|
42
|
+
/**
|
|
43
|
+
* The router seam, same as `SidebarItem.Anchor`: the row renders AS this link (a real `<a>`
|
|
44
|
+
* with the router's own `href`), in every form — flat footer row, gear `Menu.Item`, the mobile
|
|
45
|
+
* More surface. Pair with `current: 'page'` for a router-backed settings destination.
|
|
46
|
+
*/
|
|
47
|
+
Anchor?: NavAnchor;
|
|
42
48
|
/** This entry is the current one (e.g. the active theme radio, the open dev tool, the open
|
|
43
49
|
* settings page) — how it shows is `current`. */
|
|
44
50
|
active?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAiB,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAYlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACjF,OAAO,KAAK,EACV,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shell/index.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAiB,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGjE,OAAO,K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G;IACH,SAAS,CAAC,EAAE,eAAe,CAAA;IAC3B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,gBAAgB,EAAE,CAAA;IACtC;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;;OAIG;IACH,MAAM,CAAC,EAAE,mBAAmB,GAAG;QAAE,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAE,CAAA;IACjE;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAA;IAChD,oBAAoB;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB,CAAA;AAgFD;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,+BASlD"}
|
|
@@ -16,7 +16,8 @@ export type NavAnchorProps = {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
children?: ReactNode;
|
|
18
18
|
onClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
19
|
-
|
|
19
|
+
/** `'true'` only reaches a `SettingsMenuItem.Anchor` row marked a selection, never a nav item. */
|
|
20
|
+
'aria-current'?: 'page' | 'true' | undefined;
|
|
20
21
|
'aria-label'?: string;
|
|
21
22
|
};
|
|
22
23
|
export type NavAnchor = (props: NavAnchorProps) => ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-types.d.ts","sourceRoot":"","sources":["../../src/shell/nav-types.ts"],"names":[],"mappings":"AAAA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MAAM,EAAE,OAAO,CAAA;CAChB,CAAA;AAEL,6EAA6E;AAC7E,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CAAA;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC5B,wFAAwF;IACxF,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,WAAW,GAAG,IAAI,CAAA;CAC5C,CAAA"}
|
package/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# basalt-ui v1.
|
|
1
|
+
# basalt-ui v1.37.1
|
|
2
2
|
# Opinionated framework for Mantine-based React apps — theme, app shell, visx charts, toolchain presets
|
|
3
3
|
#
|
|
4
4
|
# basalt-ui is an opinionated framework for Mantine-based React apps.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
# ./tokens.css subpath. Guide: docs/FRAMEWORK-FREE.md in the repo.
|
|
20
20
|
|
|
21
21
|
Package: basalt-ui
|
|
22
|
-
Version: 1.
|
|
22
|
+
Version: 1.37.1
|
|
23
23
|
|
|
24
24
|
## basalt-ui
|
|
25
25
|
Import: import { ... } from 'basalt-ui'
|
package/package.json
CHANGED
package/src/controls/actions.tsx
CHANGED
|
@@ -477,6 +477,9 @@ function joinRuns<T extends BarAction>(
|
|
|
477
477
|
|
|
478
478
|
type FoldStep = 'icon' | 'overflow'
|
|
479
479
|
|
|
480
|
+
/** `clientWidth` rounds to a whole pixel; the measured boxes do not — see `useMeasuredFold`. */
|
|
481
|
+
const SUBPIXEL_SLACK = 1
|
|
482
|
+
|
|
480
483
|
/** The `More` trigger's estimated width — reserved only once something has folded (cf. `FOLD_PILL_WIDTH`). */
|
|
481
484
|
const MORE_WIDTH = 80
|
|
482
485
|
|
|
@@ -612,7 +615,16 @@ function useMeasuredFold(input: {
|
|
|
612
615
|
const rendered = elements.reduce((sum, el) => sum + el.offsetWidth + BAR_GAP, 0)
|
|
613
616
|
const moreNow = hasMenus || Object.values(foldsRef.current).includes('overflow')
|
|
614
617
|
const fixed = used - rendered - (moreNow ? MORE_WIDTH + BAR_GAP : 0)
|
|
615
|
-
|
|
618
|
+
// `clientWidth` is a rounded integer, the rects above are fractional: a row that is exactly as
|
|
619
|
+
// wide as its content (a `slot` host's shrink-wrapped `Group`, measured against itself) would
|
|
620
|
+
// read 123.4px of content in 123px of room and fold a button that fits.
|
|
621
|
+
const next = planBarFold({
|
|
622
|
+
room: row.clientWidth + SUBPIXEL_SLACK,
|
|
623
|
+
fixed,
|
|
624
|
+
gap: BAR_GAP,
|
|
625
|
+
hasMenus,
|
|
626
|
+
items,
|
|
627
|
+
})
|
|
616
628
|
const prev = foldsRef.current
|
|
617
629
|
const same =
|
|
618
630
|
Object.keys(next).length === Object.keys(prev).length &&
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* ./controls — the form layout primitives: `FormSection`, `FormRow`, `FormGroup`, `FormActions`.
|
|
3
3
|
* Mantine-coupled. They need no `@mantine/form` (layout only), which is why they live here and not
|
|
4
4
|
* in `./forms`, whose barrel value-imports it: importing a row from there made a consumer install a
|
|
5
|
-
* peer it never used. `./forms` re-exports them as deprecated aliases until 1.
|
|
5
|
+
* peer it never used. `./forms` re-exports them as deprecated aliases until 1.38.0.
|
|
6
6
|
*
|
|
7
7
|
* The gap they close (audit B #5 / §4): `./forms` shipped no layout at all, so the only row
|
|
8
8
|
* primitive in the package was `SettingsRow` over in `./dashboard` — which is the SETTINGS-page
|
package/src/controls/index.ts
CHANGED
|
@@ -56,7 +56,7 @@ export { SliderControl, type SliderControlProps } from './slider-control'
|
|
|
56
56
|
|
|
57
57
|
// ── The form layout (moved from ./forms in 1.36.0) ────────────────────────────────────────────
|
|
58
58
|
// Layout needs no `@mantine/form`, and `./forms`' barrel value-imports it — so a consumer rendering
|
|
59
|
-
// a `FormRow` had to install a peer it never used. `./forms` re-exports these until 1.
|
|
59
|
+
// a `FormRow` had to install a peer it never used. `./forms` re-exports these until 1.38.0.
|
|
60
60
|
export {
|
|
61
61
|
FormSection,
|
|
62
62
|
FormRow,
|
|
@@ -243,11 +243,17 @@
|
|
|
243
243
|
align-items: center;
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
/* WCAG 2.5.8 (target-size, AA): the 11px glyph button is a real 24x24 box, not just a `::after`
|
|
247
|
+
* overlay — axe and assistive tech measure the element. The negative margin hands the extra
|
|
248
|
+
* (24 - 11) / 2 back on every side, so the glyph and the row around it keep their drawn size. */
|
|
246
249
|
.infoTrigger {
|
|
247
250
|
display: inline-flex;
|
|
248
251
|
align-items: center;
|
|
252
|
+
justify-content: center;
|
|
253
|
+
min-width: 24px;
|
|
254
|
+
min-height: 24px;
|
|
255
|
+
margin: calc((11px - 24px) / 2);
|
|
249
256
|
appearance: none;
|
|
250
|
-
margin: 0;
|
|
251
257
|
padding: 0;
|
|
252
258
|
border: none;
|
|
253
259
|
background: none;
|
package/src/forms/index.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* (`useFormSubmit` + `FormStateProvider`), the list field (`useFieldArray`) and the draft
|
|
11
11
|
* (`useFormDraft`). The layout (`FormSection` / `FormRow` / `FormGroup` / `FormActions`) moved to
|
|
12
12
|
* `basalt-ui/controls` in 1.36.0 — it needs no `@mantine/form` — and stays here as deprecated
|
|
13
|
-
* aliases until 1.
|
|
13
|
+
* aliases until 1.38.0, as do the `useForm`/`schemaResolver` re-exports (import from
|
|
14
14
|
* `@mantine/form`).
|
|
15
15
|
*
|
|
16
16
|
* Optional peer: @mantine/form ^9.3.0 — install with: bun add @mantine/form
|
|
@@ -24,29 +24,29 @@ export type { UseBasaltFormOptions } from './create-form'
|
|
|
24
24
|
// Two calls, never one object: `key` inside a spread is a React 19 warning. See field.ts.
|
|
25
25
|
export { inputProps, fieldKey } from './field'
|
|
26
26
|
|
|
27
|
-
// ── layout — moved to ./controls (1.36.0), deprecated aliases until 1.
|
|
27
|
+
// ── layout — moved to ./controls (1.36.0), deprecated aliases until 1.38.0 ─────
|
|
28
28
|
export {
|
|
29
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
29
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
30
30
|
FormSection,
|
|
31
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
31
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
32
32
|
FormRow,
|
|
33
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
33
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
34
34
|
FormGroup,
|
|
35
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
35
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
36
36
|
FormActions,
|
|
37
37
|
} from '../controls/form-layout'
|
|
38
38
|
export type {
|
|
39
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
39
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
40
40
|
FormSectionProps,
|
|
41
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
41
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
42
42
|
FormSectionSlot,
|
|
43
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
43
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
44
44
|
FormRowProps,
|
|
45
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
45
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
46
46
|
FormRowSlot,
|
|
47
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
47
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
48
48
|
FormGroupProps,
|
|
49
|
-
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.
|
|
49
|
+
/** @deprecated Import from 'basalt-ui/controls' — removed in 1.38.0. */
|
|
50
50
|
FormActionsProps,
|
|
51
51
|
} from '../controls/form-layout'
|
|
52
52
|
|
|
@@ -70,14 +70,14 @@ export type { UseFormDraftOptions, UseFormDraftReturn } from './use-form-draft'
|
|
|
70
70
|
|
|
71
71
|
// ── @mantine/form re-exports — deprecated, zero consumers import them from here ──
|
|
72
72
|
export {
|
|
73
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
73
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
74
74
|
useForm,
|
|
75
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
75
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
76
76
|
schemaResolver,
|
|
77
77
|
} from '@mantine/form'
|
|
78
78
|
export type {
|
|
79
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
79
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
80
80
|
UseFormReturnType,
|
|
81
|
-
/** @deprecated Import from '@mantine/form' — removed in 1.
|
|
81
|
+
/** @deprecated Import from '@mantine/form' — removed in 1.38.0. */
|
|
82
82
|
UseFormInput,
|
|
83
83
|
} from '@mantine/form'
|
|
@@ -30,6 +30,7 @@ import type {
|
|
|
30
30
|
MobileNavGroup,
|
|
31
31
|
MobileNavModel,
|
|
32
32
|
MobileNavSlot,
|
|
33
|
+
NavAnchor,
|
|
33
34
|
SidebarBlock,
|
|
34
35
|
SidebarBlockItem,
|
|
35
36
|
SidebarItem,
|
|
@@ -126,6 +127,8 @@ type ActionRow = {
|
|
|
126
127
|
icon?: ReactNode
|
|
127
128
|
danger?: boolean
|
|
128
129
|
onClick?: ((e: MouseEvent<HTMLElement>) => void) | undefined
|
|
130
|
+
/** Mirrors `SettingsMenuItem.Anchor` — the row renders as the consumer's router link. */
|
|
131
|
+
Anchor?: NavAnchor | undefined
|
|
129
132
|
/** Mirrors `SettingsMenuItem.active` — a trailing check + `aria-current` in every row form. */
|
|
130
133
|
active?: boolean
|
|
131
134
|
/** Mirrors `SettingsMenuItem.current` — `'page'` swaps the check for the nav active style. */
|
|
@@ -206,6 +209,7 @@ function settingsRows(items: SettingsMenuItem[] | undefined): ActionRow[] {
|
|
|
206
209
|
label: item.label,
|
|
207
210
|
icon: item.icon,
|
|
208
211
|
onClick: item.onClick,
|
|
212
|
+
...(item.Anchor !== undefined && { Anchor: item.Anchor }),
|
|
209
213
|
...(item.active !== undefined && { active: item.active }),
|
|
210
214
|
...(item.current !== undefined && { current: item.current }),
|
|
211
215
|
}))
|
|
@@ -260,6 +264,7 @@ const menuActionRow = (row: ActionRow, sectionStart = false) => (
|
|
|
260
264
|
leftSection={row.icon}
|
|
261
265
|
rightSection={row.active && row.current !== 'page' ? <IconCheck /> : undefined}
|
|
262
266
|
{...(row.danger ? { color: 'red' } : {})}
|
|
267
|
+
{...(row.Anchor && { component: row.Anchor })}
|
|
263
268
|
onClick={(event: MouseEvent<HTMLElement>) => row.onClick?.(event)}
|
|
264
269
|
aria-current={rowCurrent(row)}
|
|
265
270
|
>
|
|
@@ -627,6 +632,7 @@ export function MobileNav({
|
|
|
627
632
|
leftSection={row.icon}
|
|
628
633
|
rightSection={row.active && row.current !== 'page' ? <IconCheck /> : undefined}
|
|
629
634
|
{...(row.danger ? { color: 'red' } : {})}
|
|
635
|
+
{...(row.Anchor && { component: row.Anchor })}
|
|
630
636
|
onClick={(event: MouseEvent<HTMLElement>) => {
|
|
631
637
|
row.onClick?.(event)
|
|
632
638
|
close()
|
|
@@ -492,7 +492,8 @@ export function AppSidebar(props: AppSidebarProps) {
|
|
|
492
492
|
<UnstyledButton
|
|
493
493
|
key={entry.key}
|
|
494
494
|
className={classes.footerBtn}
|
|
495
|
-
|
|
495
|
+
{...(entry.Anchor && { component: entry.Anchor })}
|
|
496
|
+
{...(entry.onClick && { onClick: entry.onClick })}
|
|
496
497
|
aria-label={entry.label}
|
|
497
498
|
aria-current={settingsCurrent(entry)}
|
|
498
499
|
>
|
|
@@ -533,9 +534,10 @@ export function AppSidebar(props: AppSidebarProps) {
|
|
|
533
534
|
<Menu.Item
|
|
534
535
|
key={entry.key}
|
|
535
536
|
className={classes.settingsMenuItem}
|
|
537
|
+
{...(entry.Anchor && { component: entry.Anchor })}
|
|
536
538
|
leftSection={entry.icon}
|
|
537
539
|
rightSection={entry.active && entry.current !== 'page' ? <IconCheck /> : undefined}
|
|
538
|
-
onClick
|
|
540
|
+
{...(entry.onClick && { onClick: entry.onClick })}
|
|
539
541
|
aria-current={settingsCurrent(entry)}
|
|
540
542
|
>
|
|
541
543
|
{entry.label}
|
package/src/shell/index.tsx
CHANGED
|
@@ -130,6 +130,12 @@ export type SettingsMenuItem = {
|
|
|
130
130
|
label: string
|
|
131
131
|
icon?: ReactNode
|
|
132
132
|
onClick?: (e: MouseEvent) => void
|
|
133
|
+
/**
|
|
134
|
+
* The router seam, same as `SidebarItem.Anchor`: the row renders AS this link (a real `<a>`
|
|
135
|
+
* with the router's own `href`), in every form — flat footer row, gear `Menu.Item`, the mobile
|
|
136
|
+
* More surface. Pair with `current: 'page'` for a router-backed settings destination.
|
|
137
|
+
*/
|
|
138
|
+
Anchor?: NavAnchor
|
|
133
139
|
/** This entry is the current one (e.g. the active theme radio, the open dev tool, the open
|
|
134
140
|
* settings page) — how it shows is `current`. */
|
|
135
141
|
active?: boolean
|
package/src/shell/nav-types.ts
CHANGED
|
@@ -18,7 +18,8 @@ export type NavAnchorProps = {
|
|
|
18
18
|
className?: string
|
|
19
19
|
children?: ReactNode
|
|
20
20
|
onClick?: (e: MouseEvent<HTMLElement>) => void
|
|
21
|
-
|
|
21
|
+
/** `'true'` only reaches a `SettingsMenuItem.Anchor` row marked a selection, never a nav item. */
|
|
22
|
+
'aria-current'?: 'page' | 'true' | undefined
|
|
22
23
|
'aria-label'?: string
|
|
23
24
|
}
|
|
24
25
|
export type NavAnchor = (props: NavAnchorProps) => ReactNode
|