basalt-ui 1.30.2 → 1.31.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/AGENTS.md +1 -1
- package/CHANGELOG.md +31 -0
- package/MIGRATING.md +172 -12
- package/agent/rules/basalt-controls.md +19 -19
- package/agent/rules/basalt-mantine.md +1 -1
- package/configs/oxlint-plugin.js +254 -4
- package/configs/oxlint-plugin.test.ts +145 -2
- package/configs/oxlint.json +2 -1
- package/dist/agent-chat/composer.d.ts.map +1 -1
- package/dist/agent-chat/composer.js +41 -43
- package/dist/agent-chat/thread-workspace.d.ts +2 -2
- package/dist/agent-chat/thread-workspace.d.ts.map +1 -1
- package/dist/agent-chat/thread-workspace.js +3 -4
- package/dist/agent-chat/use-keyboard-inset.d.ts +2 -0
- package/dist/agent-chat/use-keyboard-inset.d.ts.map +1 -0
- package/dist/agent-chat/use-keyboard-inset.js +34 -0
- package/dist/charts/cursor/touch-pin.d.ts +45 -0
- package/dist/charts/cursor/touch-pin.d.ts.map +1 -0
- package/dist/charts/cursor/touch-pin.js +79 -0
- package/dist/charts/hooks/use-discrete-cursor.d.ts +66 -0
- package/dist/charts/hooks/use-discrete-cursor.d.ts.map +1 -0
- package/dist/charts/hooks/use-discrete-cursor.js +198 -0
- package/dist/charts/hooks/use-hysteresis.d.ts +18 -0
- package/dist/charts/hooks/use-hysteresis.d.ts.map +1 -0
- package/dist/charts/hooks/use-hysteresis.js +12 -0
- package/dist/charts/hooks/useBandPlot.d.ts +7 -0
- package/dist/charts/hooks/useBandPlot.d.ts.map +1 -1
- package/dist/charts/hooks/useBandPlot.js +62 -18
- package/dist/charts/hooks/useChartCursor.d.ts +40 -11
- package/dist/charts/hooks/useChartCursor.d.ts.map +1 -1
- package/dist/charts/hooks/useChartCursor.js +102 -11
- package/dist/charts/index.d.ts +0 -1
- package/dist/charts/index.d.ts.map +1 -1
- package/dist/charts/index.js +0 -10
- package/dist/charts/kinds/BandStrip.d.ts.map +1 -1
- package/dist/charts/kinds/BandStrip.js +54 -41
- package/dist/charts/kinds/Donut.d.ts +9 -3
- package/dist/charts/kinds/Donut.d.ts.map +1 -1
- package/dist/charts/kinds/Donut.js +110 -48
- package/dist/charts/kinds/DualPanel.d.ts.map +1 -1
- package/dist/charts/kinds/DualPanel.js +145 -131
- package/dist/charts/kinds/Heatmap.d.ts +7 -0
- package/dist/charts/kinds/Heatmap.d.ts.map +1 -1
- package/dist/charts/kinds/Heatmap.js +37 -16
- package/dist/charts/kinds/MirroredBars.d.ts.map +1 -1
- package/dist/charts/kinds/MirroredBars.js +83 -68
- package/dist/charts/kinds/donut-layout.d.ts +47 -0
- package/dist/charts/kinds/donut-layout.d.ts.map +1 -0
- package/dist/charts/kinds/donut-layout.js +52 -0
- package/dist/charts/layout/auto-margin.d.ts +7 -2
- package/dist/charts/layout/auto-margin.d.ts.map +1 -1
- package/dist/charts/layout/auto-margin.js +12 -3
- package/dist/charts/layout/end-labels.d.ts +64 -0
- package/dist/charts/layout/end-labels.d.ts.map +1 -0
- package/dist/charts/layout/end-labels.js +76 -0
- package/dist/charts/primitives/Axes.d.ts +32 -4
- package/dist/charts/primitives/Axes.d.ts.map +1 -1
- package/dist/charts/primitives/Axes.js +62 -16
- package/dist/charts/primitives/CartesianChart.d.ts +7 -6
- package/dist/charts/primitives/CartesianChart.d.ts.map +1 -1
- package/dist/charts/primitives/CartesianChart.js +271 -125
- package/dist/charts/primitives/ChartCard.d.ts +0 -14
- package/dist/charts/primitives/ChartCard.d.ts.map +1 -1
- package/dist/charts/primitives/ChartCard.js +74 -21
- package/dist/charts/primitives/ChartFrame.d.ts +28 -22
- package/dist/charts/primitives/ChartFrame.d.ts.map +1 -1
- package/dist/charts/primitives/ChartFrame.js +133 -34
- package/dist/charts/primitives/ChartLegend.d.ts +19 -15
- package/dist/charts/primitives/ChartLegend.d.ts.map +1 -1
- package/dist/charts/primitives/ChartLegend.js +212 -71
- package/dist/charts/primitives/ChartTooltip.d.ts.map +1 -1
- package/dist/charts/primitives/ChartTooltip.js +4 -3
- package/dist/charts/primitives/Crosshair.js +2 -2
- package/dist/charts/primitives/HoverOverlay.d.ts +6 -1
- package/dist/charts/primitives/HoverOverlay.d.ts.map +1 -1
- package/dist/charts/primitives/HoverOverlay.js +37 -26
- package/dist/charts/primitives/HoverOverlay.module.css +13 -0
- package/dist/charts/primitives/HoverOverlay.module.css.d.ts +8 -0
- package/dist/charts/primitives/chart-card-context.d.ts +29 -0
- package/dist/charts/primitives/chart-card-context.d.ts.map +1 -0
- package/dist/charts/primitives/chart-card-context.js +13 -0
- package/dist/charts/primitives/chart-frame-layout.d.ts +93 -113
- package/dist/charts/primitives/chart-frame-layout.d.ts.map +1 -1
- package/dist/charts/primitives/chart-frame-layout.js +76 -29
- package/dist/charts/primitives/chart-layout.d.ts +112 -0
- package/dist/charts/primitives/chart-layout.d.ts.map +1 -0
- package/dist/charts/primitives/chart-layout.js +175 -0
- package/dist/charts/primitives/chart-tier.d.ts +13 -11
- package/dist/charts/primitives/chart-tier.d.ts.map +1 -1
- package/dist/charts/primitives/chart-tier.js +42 -13
- package/dist/charts/series.d.ts +4 -1
- package/dist/charts/series.d.ts.map +1 -1
- package/dist/charts/utils/ticks.d.ts +27 -8
- package/dist/charts/utils/ticks.d.ts.map +1 -1
- package/dist/charts/utils/ticks.js +35 -11
- package/dist/common/errors.d.ts +11 -1
- package/dist/common/errors.d.ts.map +1 -1
- package/dist/common/errors.js +16 -2
- package/dist/common/hit-floor.d.ts +10 -0
- package/dist/common/hit-floor.d.ts.map +1 -0
- package/dist/common/hit-floor.js +6 -0
- package/dist/{shell → common}/isomorphic-layout-effect.d.ts +4 -3
- package/dist/common/isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/common/use-measured-widths.d.ts +37 -0
- package/dist/common/use-measured-widths.d.ts.map +1 -0
- package/dist/common/use-measured-widths.js +51 -0
- package/dist/common/use-media-query.d.ts +6 -0
- package/dist/common/use-media-query.d.ts.map +1 -0
- package/dist/common/use-media-query.js +40 -0
- package/dist/common/validate.d.ts +9 -0
- package/dist/common/validate.d.ts.map +1 -1
- package/dist/common/validate.js +9 -4
- package/dist/content/article-layout.d.ts +4 -2
- package/dist/content/article-layout.d.ts.map +1 -1
- package/dist/content/article-layout.js +43 -3
- package/dist/content/article-layout.module.css +45 -4
- package/dist/content/article-layout.module.css.d.ts +3 -0
- package/dist/content/code-block.d.ts.map +1 -1
- package/dist/content/code-block.js +40 -2
- package/dist/content/code-block.module.css +32 -2
- package/dist/content/prose.module.css +13 -8
- package/dist/controls/actions.d.ts +29 -6
- package/dist/controls/actions.d.ts.map +1 -1
- package/dist/controls/actions.js +158 -27
- package/dist/controls/actions.module.css +14 -1
- package/dist/controls/actions.module.css.d.ts +1 -0
- package/dist/controls/controls.module.css +8 -31
- package/dist/controls/enum-filter.js +2 -2
- package/dist/controls/filter-context.d.ts +10 -0
- package/dist/controls/filter-context.d.ts.map +1 -1
- package/dist/controls/filter-context.js +2 -0
- package/dist/controls/filter-pill.d.ts.map +1 -1
- package/dist/controls/filter-pill.js +1 -0
- package/dist/controls/index.d.ts +1 -1
- package/dist/controls/index.d.ts.map +1 -1
- package/dist/controls/index.js +0 -2
- package/dist/controls/multi-select-filter.js +2 -2
- package/dist/controls/sync-button.module.css +1 -1
- package/dist/dashboard/section.d.ts.map +1 -1
- package/dist/dashboard/section.js +1 -0
- package/dist/dashboard/section.module.css +1 -26
- package/dist/dashboard/stat-card.d.ts +1 -1
- package/dist/dashboard/stat-card.d.ts.map +1 -1
- package/dist/dashboard/stat-card.js +4 -1
- package/dist/dashboard/stat-card.module.css +6 -9
- package/dist/dashboard/stat-group.module.css +16 -4
- package/dist/dashboard/widget-grid.d.ts.map +1 -1
- package/dist/dashboard/widget-header.d.ts +14 -4
- package/dist/dashboard/widget-header.d.ts.map +1 -1
- package/dist/dashboard/widget-header.js +23 -6
- package/dist/dashboard/widget-header.module.css +145 -133
- package/dist/dashboard/widget-header.module.css.d.ts +2 -0
- package/dist/data/data-table.d.ts +23 -0
- package/dist/data/data-table.d.ts.map +1 -1
- package/dist/data/data-table.js +339 -141
- package/dist/data/data-table.module.css +94 -0
- package/dist/data/data-table.module.css.d.ts +11 -0
- package/dist/data/virtual-list.d.ts.map +1 -1
- package/dist/data/virtual-list.js +10 -0
- package/dist/forms/form-layout.d.ts.map +1 -1
- package/dist/forms/form-layout.js +3 -3
- package/dist/forms/form-layout.module.css +30 -5
- package/dist/forms/form-layout.module.css.d.ts +1 -0
- package/dist/guard/index.d.ts +8 -2
- package/dist/guard/index.d.ts.map +1 -1
- package/dist/guard/index.js +67 -2
- package/dist/guard/types.d.ts +3 -3
- package/dist/guard/types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/provider/index.d.ts +20 -1
- package/dist/provider/index.d.ts.map +1 -1
- package/dist/provider/index.js +22 -2
- package/dist/shell/app-brand.d.ts.map +1 -1
- package/dist/shell/app-brand.js +1 -0
- package/dist/shell/app-brand.module.css +2 -2
- package/dist/shell/app-header.module.css +18 -8
- package/dist/shell/app-main.module.css +54 -3
- package/dist/shell/app-main.module.css.d.ts +1 -0
- package/dist/shell/app-mobile-nav.module.css +16 -4
- package/dist/shell/app-sidebar.module.css +4 -6
- package/dist/shell/index.d.ts +12 -0
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +57 -16
- package/dist/shell/mobile-nav-model.d.ts +1 -1
- package/dist/shell/page-aside.d.ts +22 -3
- package/dist/shell/page-aside.d.ts.map +1 -1
- package/dist/shell/page-aside.js +27 -13
- package/dist/shell/page-bar.d.ts.map +1 -1
- package/dist/shell/page-bar.js +10 -5
- package/dist/shell/page-bar.module.css +10 -34
- package/dist/shell/use-breakpoint.d.ts +3 -4
- package/dist/shell/use-breakpoint.d.ts.map +1 -1
- package/dist/shell/use-breakpoint.js +3 -25
- package/dist/shell/use-size-class.d.ts +6 -0
- package/dist/shell/use-size-class.d.ts.map +1 -0
- package/dist/shell/use-size-class.js +19 -0
- package/dist/state/persisted-or-local.d.ts +4 -1
- package/dist/state/persisted-or-local.d.ts.map +1 -1
- package/dist/state/persisted-or-local.js +4 -3
- package/dist/state/persisted.d.ts +10 -0
- package/dist/state/persisted.d.ts.map +1 -1
- package/dist/state/persisted.js +44 -14
- package/dist/styles.css +41 -0
- package/dist/surfaces.d.ts +4 -4
- package/dist/surfaces.d.ts.map +1 -1
- package/dist/surfaces.js +11 -3
- package/dist/theme/controls.module.css +7 -0
- package/dist/theme/ctl-theme.d.ts +1 -0
- package/dist/theme/ctl-theme.d.ts.map +1 -1
- package/dist/theme/ctl-theme.js +12 -4
- package/dist/theme/floating.module.css +36 -0
- package/dist/theme/floating.module.css.d.ts +3 -0
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/index.d.ts.map +1 -1
- package/dist/theme/index.js +34 -5
- package/dist/theme/nav-link.module.css +7 -0
- package/dist/tokens/index.d.ts +7 -16
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +23 -28
- package/dist/tokens/palette.d.ts +5 -27
- package/dist/tokens/palette.d.ts.map +1 -1
- package/dist/tokens/palette.js +8 -30
- package/dist/tokens/size-classes.d.ts +40 -0
- package/dist/tokens/size-classes.d.ts.map +1 -0
- package/dist/tokens/size-classes.js +29 -0
- package/dist/tokens.css +8 -4
- package/llms.txt +3 -3
- package/package.json +17 -17
- package/src/agent-chat/composer.tsx +74 -47
- package/src/agent-chat/thread-workspace.tsx +8 -11
- package/src/agent-chat/use-keyboard-inset.ts +68 -0
- package/src/charts/cursor/touch-pin.ts +138 -0
- package/src/charts/hooks/use-discrete-cursor.ts +335 -0
- package/src/charts/hooks/use-hysteresis.ts +26 -0
- package/src/charts/hooks/useBandPlot.ts +90 -27
- package/src/charts/hooks/useChartCursor.ts +211 -26
- package/src/charts/index.ts +0 -8
- package/src/charts/kinds/BandStrip.tsx +11 -1
- package/src/charts/kinds/Donut.tsx +153 -62
- package/src/charts/kinds/DualPanel.tsx +19 -4
- package/src/charts/kinds/Heatmap.tsx +61 -22
- package/src/charts/kinds/MirroredBars.tsx +15 -3
- package/src/charts/kinds/donut-layout.ts +82 -0
- package/src/charts/layout/auto-margin.ts +24 -5
- package/src/charts/layout/end-labels.ts +135 -0
- package/src/charts/primitives/Axes.tsx +112 -21
- package/src/charts/primitives/CartesianChart.tsx +282 -68
- package/src/charts/primitives/ChartCard.tsx +141 -48
- package/src/charts/primitives/ChartFrame.tsx +243 -60
- package/src/charts/primitives/ChartLegend.tsx +257 -73
- package/src/charts/primitives/ChartTooltip.tsx +8 -3
- package/src/charts/primitives/Crosshair.tsx +2 -2
- package/src/charts/primitives/HoverOverlay.module.css +13 -0
- package/src/charts/primitives/HoverOverlay.module.css.d.ts +8 -0
- package/src/charts/primitives/HoverOverlay.tsx +15 -4
- package/src/charts/primitives/chart-card-context.ts +37 -0
- package/src/charts/primitives/chart-frame-layout.ts +214 -177
- package/src/charts/primitives/chart-layout.ts +318 -0
- package/src/charts/primitives/chart-tier.tsx +66 -21
- package/src/charts/series.ts +4 -1
- package/src/charts/utils/ticks.ts +95 -19
- package/src/common/errors.ts +25 -1
- package/src/common/hit-floor.ts +9 -0
- package/src/{shell → common}/isomorphic-layout-effect.ts +4 -3
- package/src/common/use-measured-widths.ts +88 -0
- package/src/common/use-media-query.ts +56 -0
- package/src/common/validate.ts +17 -4
- package/src/content/article-layout.module.css +45 -4
- package/src/content/article-layout.module.css.d.ts +3 -0
- package/src/content/article-layout.tsx +60 -5
- package/src/content/code-block.module.css +32 -2
- package/src/content/code-block.tsx +47 -3
- package/src/content/prose.module.css +13 -8
- package/src/controls/actions.module.css +14 -1
- package/src/controls/actions.module.css.d.ts +1 -0
- package/src/controls/actions.tsx +223 -75
- package/src/controls/controls.module.css +8 -31
- package/src/controls/enum-filter.tsx +2 -2
- package/src/controls/filter-context.tsx +11 -0
- package/src/controls/filter-pill.tsx +1 -0
- package/src/controls/index.ts +0 -1
- package/src/controls/multi-select-filter.tsx +2 -2
- package/src/controls/sync-button.module.css +1 -1
- package/src/dashboard/section.module.css +1 -26
- package/src/dashboard/section.tsx +1 -0
- package/src/dashboard/stat-card.module.css +6 -9
- package/src/dashboard/stat-card.tsx +6 -3
- package/src/dashboard/stat-group.module.css +16 -4
- package/src/dashboard/widget-grid.tsx +7 -6
- package/src/dashboard/widget-header.module.css +145 -133
- package/src/dashboard/widget-header.module.css.d.ts +2 -0
- package/src/dashboard/widget-header.tsx +45 -11
- package/src/data/data-table.module.css +94 -0
- package/src/data/data-table.module.css.d.ts +11 -0
- package/src/data/data-table.tsx +503 -164
- package/src/data/virtual-list.tsx +31 -0
- package/src/forms/form-layout.module.css +30 -5
- package/src/forms/form-layout.module.css.d.ts +1 -0
- package/src/forms/form-layout.tsx +12 -10
- package/src/guard/index.ts +183 -3
- package/src/guard/types.ts +3 -2
- package/src/index.ts +2 -0
- package/src/provider/index.tsx +53 -1
- package/src/shell/app-brand.module.css +2 -2
- package/src/shell/app-brand.tsx +1 -0
- package/src/shell/app-header.module.css +18 -8
- package/src/shell/app-main.module.css +54 -3
- package/src/shell/app-main.module.css.d.ts +1 -0
- package/src/shell/app-mobile-nav.module.css +16 -4
- package/src/shell/app-sidebar.module.css +4 -6
- package/src/shell/index.tsx +200 -129
- package/src/shell/mobile-nav-model.ts +1 -1
- package/src/shell/page-aside.tsx +70 -21
- package/src/shell/page-bar.module.css +10 -34
- package/src/shell/page-bar.tsx +10 -5
- package/src/shell/use-breakpoint.ts +9 -45
- package/src/shell/use-size-class.ts +31 -0
- package/src/state/persisted-or-local.ts +10 -4
- package/src/state/persisted.ts +76 -17
- package/src/styles.css +41 -0
- package/src/surfaces.ts +9 -1
- package/src/theme/controls.module.css +7 -0
- package/src/theme/ctl-theme.tsx +15 -3
- package/src/theme/floating.module.css +36 -0
- package/src/theme/floating.module.css.d.ts +3 -0
- package/src/theme/index.ts +46 -8
- package/src/theme/nav-link.module.css +7 -0
- package/src/tokens/index.ts +20 -30
- package/src/tokens/palette.ts +6 -28
- package/src/tokens/size-classes.ts +46 -0
- package/dist/shell/isomorphic-layout-effect.d.ts.map +0 -1
- /package/dist/{shell → common}/isomorphic-layout-effect.js +0 -0
|
@@ -33,3 +33,39 @@
|
|
|
33
33
|
.menuItem[data-menu-active]:not(:disabled):not([data-disabled]) {
|
|
34
34
|
background-color: color-mix(in srgb, var(--vx-ink) 6%, transparent);
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/*
|
|
38
|
+
* Modal as a bottom sheet at the `compact` size class (docs/DESIGN-CORE.md § Layout, elevation,
|
|
39
|
+
* shapes): anchored
|
|
40
|
+
* to the bottom edge, full width, radius on the top corners only, safe-area bottom padding. The
|
|
41
|
+
* literal is `sizeClassMaxEm(SIZE_CLASSES.medium)`, pinned by `breakpoint-literals.test.ts`.
|
|
42
|
+
* `.sheetBody` is the Modal body; it reaches the trailing button row `overlays.confirm`
|
|
43
|
+
* renders (Mantine `Group`), stretching the buttons to full width at the `--vx-hit` floor.
|
|
44
|
+
*/
|
|
45
|
+
@media (max-width: 52.49375em) {
|
|
46
|
+
.sheetInner {
|
|
47
|
+
align-items: flex-end;
|
|
48
|
+
padding: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sheetContent {
|
|
52
|
+
flex: 0 0 100%;
|
|
53
|
+
max-width: 100%;
|
|
54
|
+
/* theme-allow css-raw-surface — top corners only, the shape of a sheet. `!important`: the
|
|
55
|
+
Modal content is a Paper whose theme `styles.root` writes `border-radius` inline. */
|
|
56
|
+
border-radius: var(--vx-radius-card) var(--vx-radius-card) 0 0 !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.sheetBody {
|
|
60
|
+
padding-bottom: calc(var(--mantine-spacing-md) + env(safe-area-inset-bottom, 0px));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.sheetBody > :global(.mantine-Group-root):last-child {
|
|
64
|
+
flex-wrap: nowrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.sheetBody > :global(.mantine-Group-root):last-child > button {
|
|
68
|
+
flex: 1;
|
|
69
|
+
min-height: var(--vx-hit);
|
|
70
|
+
}
|
|
71
|
+
}
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -103,7 +103,7 @@ export type CreateBasaltThemeOptions = {
|
|
|
103
103
|
/**
|
|
104
104
|
* Build the Basalt theme, optionally merged with consumer overrides. Overrides win on conflict
|
|
105
105
|
* (Mantine `mergeThemeOverrides` is last-wins), so a consumer can retune any field without
|
|
106
|
-
* forking the base
|
|
106
|
+
* forking the base — except `breakpoints`, which is always derived from `SIZE_CLASSES`.
|
|
107
107
|
*
|
|
108
108
|
* Pass `{ derive }` to retune the palette identity instead of the shipped default, `{ fonts }` to
|
|
109
109
|
* retune the three-font system, `{ radius }` to retune the two radius anchors, and/or `{ density }`
|
|
@@ -124,5 +124,5 @@ export type CreateBasaltThemeOptions = {
|
|
|
124
124
|
* leaves `other.basaltDerive`/`other.basaltFonts`/`other.basaltRadius`/`other.basaltDensity` intact
|
|
125
125
|
* — it is only lost if a consumer's own `overrides.other` explicitly sets that same key.
|
|
126
126
|
*/
|
|
127
|
-
export declare function createBasaltTheme(overrides?: MantineThemeOverride, options?: CreateBasaltThemeOptions): MantineThemeOverride;
|
|
127
|
+
export declare function createBasaltTheme(overrides?: Omit<MantineThemeOverride, 'breakpoints'>, options?: CreateBasaltThemeOptions): MantineThemeOverride;
|
|
128
128
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/theme/index.ts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EACV,oBAAoB,EAGpB,oBAAoB,EAErB,MAAM,eAAe,CAAA;AAStB,OAAO,KAAK,EAAe,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA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@@ import {
|
|
|
26
26
|
Notification,
|
|
27
27
|
NumberInput,
|
|
28
28
|
Pagination,
|
|
29
|
+
PaginationControl,
|
|
29
30
|
Paper,
|
|
30
31
|
PasswordInput,
|
|
31
32
|
PillsInput,
|
|
@@ -55,11 +56,13 @@ import {
|
|
|
55
56
|
} from "../tokens/palette.js";
|
|
56
57
|
import { DEFAULT_DERIVE_CONFIG, isDefaultDeriveConfig, resolveDeriveConfig } from "../tokens/derive.js";
|
|
57
58
|
import { pxRem, VX } from "../tokens/index.js";
|
|
59
|
+
import { SIZE_CLASS_BREAKPOINTS } from "../tokens/size-classes.js";
|
|
58
60
|
import controlsClasses from "./controls.module.css";
|
|
59
61
|
import floatingClasses from "./floating.module.css";
|
|
60
62
|
import navLinkClasses from "./nav-link.module.css";
|
|
61
63
|
import segmentedControlClasses from "./segmented-control.module.css";
|
|
62
64
|
import timelineClasses from "./timeline.module.css";
|
|
65
|
+
import { HIT_ATTR } from "./ctl-theme.js";
|
|
63
66
|
import { useBasaltSpacing } from "./use-basalt-spacing.js";
|
|
64
67
|
import { CTL_THEME, CtlSlot } from "./ctl-theme.js";
|
|
65
68
|
function hexToRgb(h) {
|
|
@@ -167,6 +170,7 @@ function buildTheme(data, options = {}) {
|
|
|
167
170
|
const { radius = DEFAULT_RADIUS_VALUES, spacing = DEFAULT_SPACE_VALUES } = options;
|
|
168
171
|
const { ACCENT, FILL } = data;
|
|
169
172
|
return createTheme({
|
|
173
|
+
breakpoints: SIZE_CLASS_BREAKPOINTS,
|
|
170
174
|
primaryColor: "blue",
|
|
171
175
|
// ONE shade in both schemes — a filled control is a SURFACE, and the accent surface is the same
|
|
172
176
|
// hex either way (see `ACCENT.accentFill`). The scheme-inverting half of the accent lives in
|
|
@@ -406,6 +410,8 @@ function buildTheme(data, options = {}) {
|
|
|
406
410
|
classNames: { wrapper: controlsClasses.inputWrapper, input: controlsClasses.input }
|
|
407
411
|
}),
|
|
408
412
|
TextInput: TextInput.extend({ defaultProps: { size: "md" } }),
|
|
413
|
+
// The stepper chevrons sit ~15px apart, so neither can own a 44px overlay; the coarse
|
|
414
|
+
// `.input` min-height floor (theme/controls.module.css) is the touch floor.
|
|
409
415
|
NumberInput: NumberInput.extend({ defaultProps: { size: "md" } }),
|
|
410
416
|
PasswordInput: PasswordInput.extend({ defaultProps: { size: "md" } }),
|
|
411
417
|
Select: Select.extend({ defaultProps: { size: "md" } }),
|
|
@@ -712,10 +718,16 @@ function buildTheme(data, options = {}) {
|
|
|
712
718
|
// under it but shows every scrolled row straight through the title once one does (the mobile
|
|
713
719
|
// filter sheet, the shell's "More" nav sheet). The header stays sticky; only its own
|
|
714
720
|
// background moves back to opaque, matching the content box it sits above rather than the page
|
|
715
|
-
// behind it. Title = head font; close button = the ghost idiom (floating.module.css).
|
|
721
|
+
// behind it. Title = head font; close button = the ghost idiom (floating.module.css). Below the
|
|
722
|
+
// `medium` size class the Modal is a bottom sheet (floating.module.css `sheet*`).
|
|
716
723
|
Modal: Modal.extend({
|
|
717
|
-
defaultProps: { radius: radius.floating },
|
|
718
|
-
classNames: {
|
|
724
|
+
defaultProps: { radius: radius.floating, closeButtonProps: { ...HIT_ATTR } },
|
|
725
|
+
classNames: {
|
|
726
|
+
close: floatingClasses.closeButton,
|
|
727
|
+
inner: floatingClasses.sheetInner,
|
|
728
|
+
content: floatingClasses.sheetContent,
|
|
729
|
+
body: floatingClasses.sheetBody
|
|
730
|
+
},
|
|
719
731
|
styles: {
|
|
720
732
|
content: {
|
|
721
733
|
backgroundColor: "var(--vx-surface-overlay)",
|
|
@@ -793,7 +805,15 @@ function buildTheme(data, options = {}) {
|
|
|
793
805
|
// The v9 thumb indicator is a center dot painted in the TRACK color — over the remapped
|
|
794
806
|
// neutral track it read as an artifact, so it's disabled: clean track, plain thumb, accent
|
|
795
807
|
// fill when checked (`--switch-color` defaults to the primary filled shade = the accent).
|
|
796
|
-
|
|
808
|
+
// `track` is the Switch's <label>, so the invisible `--vx-hit` overlay (`data-basalt-hit`)
|
|
809
|
+
// still toggles it. Checkbox/Radio boxes are bare <input>s under a plain <div> — an overlay
|
|
810
|
+
// there would swallow clicks, so only their `label` (a real <label>) carries it.
|
|
811
|
+
Switch: Switch.extend({
|
|
812
|
+
defaultProps: {
|
|
813
|
+
withThumbIndicator: false,
|
|
814
|
+
attributes: { track: HIT_ATTR }
|
|
815
|
+
}
|
|
816
|
+
}),
|
|
797
817
|
// The tab-list bottom rule (and the inactive-tab hover underline) is a layout separator, not
|
|
798
818
|
// control chrome — it reads the divider token instead of the heavy gray-3/dark-4 line
|
|
799
819
|
// (controls.module.css; custom properties are stripped from `styles` objects). The active tab
|
|
@@ -813,6 +833,7 @@ function buildTheme(data, options = {}) {
|
|
|
813
833
|
// `useStyles`), so re-pointing that var here wins on every render path. Without this, a dark-mode
|
|
814
834
|
// Checkbox/Radio paints a white checkmark on the light accent fill — invisible.
|
|
815
835
|
Checkbox: Checkbox.extend({
|
|
836
|
+
defaultProps: { attributes: { label: HIT_ATTR } },
|
|
816
837
|
vars: (theme, props) => ({
|
|
817
838
|
root: {
|
|
818
839
|
// `iconColor` is an explicit call-site override, and `outline` paints the mark in the
|
|
@@ -822,6 +843,7 @@ function buildTheme(data, options = {}) {
|
|
|
822
843
|
})
|
|
823
844
|
}),
|
|
824
845
|
Radio: Radio.extend({
|
|
846
|
+
defaultProps: { attributes: { label: HIT_ATTR } },
|
|
825
847
|
vars: (theme, props) => ({
|
|
826
848
|
root: {
|
|
827
849
|
"--radio-icon-color": props.iconColor || props.variant === "outline" ? void 0 : onColorFor(theme, props)
|
|
@@ -833,6 +855,12 @@ function buildTheme(data, options = {}) {
|
|
|
833
855
|
root: { "--pagination-active-color": onColorFor(theme, props) }
|
|
834
856
|
})
|
|
835
857
|
}),
|
|
858
|
+
// `Pagination`'s own controls (prev/next/page buttons) resolve `PaginationControl`'s
|
|
859
|
+
// defaultProps independently of the parent — `data-basalt-hit` here is what closes the
|
|
860
|
+
// gap Switch/Checkbox/Radio already close at their own theme entries.
|
|
861
|
+
PaginationControl: PaginationControl.extend({
|
|
862
|
+
defaultProps: { ...HIT_ATTR }
|
|
863
|
+
}),
|
|
836
864
|
Stepper: Stepper.extend({
|
|
837
865
|
vars: (theme, props) => ({ root: { "--stepper-icon-color": onColorFor(theme, props) } })
|
|
838
866
|
}),
|
|
@@ -1038,7 +1066,8 @@ function createBasaltTheme(overrides, options) {
|
|
|
1038
1066
|
if (hasFontsConfig(fontsConfig)) {
|
|
1039
1067
|
theme = mergeThemeOverrides(theme, { other: { basaltFonts: fontsConfig } });
|
|
1040
1068
|
}
|
|
1041
|
-
|
|
1069
|
+
if (!overrides) return theme;
|
|
1070
|
+
return { ...mergeThemeOverrides(theme, overrides), breakpoints: SIZE_CLASS_BREAKPOINTS };
|
|
1042
1071
|
}
|
|
1043
1072
|
export {
|
|
1044
1073
|
CTL_THEME,
|
|
@@ -21,6 +21,13 @@
|
|
|
21
21
|
font-weight: 600;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
/* Touch floor: rows are adjacent (1px gap), so an overlay would overlap — the row itself is 44. */
|
|
25
|
+
@media (pointer: coarse) {
|
|
26
|
+
.root {
|
|
27
|
+
min-height: var(--vx-hit);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
24
31
|
/* Active + hover — one step stronger than the resting active fill, so a pointer over the active row
|
|
25
32
|
* still reads as feedback rather than as a flat, unresponsive selection. */
|
|
26
33
|
@media (hover: hover) {
|
package/dist/tokens/index.d.ts
CHANGED
|
@@ -55,12 +55,11 @@ export declare const VX: {
|
|
|
55
55
|
readonly radiusCard: "var(--vx-radius-card)";
|
|
56
56
|
readonly radiusCtrl: "var(--vx-radius-ctrl)";
|
|
57
57
|
readonly radiusPill: "var(--vx-radius-pill)";
|
|
58
|
-
readonly
|
|
58
|
+
readonly hit: "var(--vx-hit)";
|
|
59
59
|
readonly space: {
|
|
60
60
|
readonly controlHeightTag: "var(--vx-space-control-height-tag)";
|
|
61
61
|
readonly controlHeightWidget: "var(--vx-space-control-height-widget)";
|
|
62
62
|
readonly controlHeightCtl: "var(--vx-space-control-height-ctl)";
|
|
63
|
-
readonly touchControlHeight: "var(--vx-space-touch-control-height)";
|
|
64
63
|
readonly pageBarRowHeight: "var(--vx-space-page-bar-row-height)";
|
|
65
64
|
readonly sectionHeaderHeight: "var(--vx-space-section-header-height)";
|
|
66
65
|
readonly widgetHeaderHeight: "var(--vx-space-widget-header-height)";
|
|
@@ -135,18 +134,10 @@ export declare const VX: {
|
|
|
135
134
|
* legend rolls up).
|
|
136
135
|
*/
|
|
137
136
|
readonly minPlotHeight: 120;
|
|
138
|
-
/**
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
|
|
142
|
-
* rollup.
|
|
143
|
-
*
|
|
144
|
-
* Deliberately NOT a media query and NOT a `theme.breakpoints` value. A chart in a two-column
|
|
145
|
-
* grid cell on a 1440px desktop is as narrow as one on a phone, and only the element's own
|
|
146
|
-
* measured box knows that — the viewport does not. It also keeps the chart layer Mantine-free:
|
|
147
|
-
* `theme.breakpoints` lives on the coupled side of the boundary.
|
|
148
|
-
*/
|
|
149
|
-
readonly phoneChartWidth: 480;
|
|
137
|
+
/** Every floating chart overlay portalled to `document.body` — a pinned tooltip, the legend's
|
|
138
|
+
* `All N` disclosure and its backdrop — shares one stacking value, so they always stack the same
|
|
139
|
+
* way relative to page chrome and to each other. */
|
|
140
|
+
readonly zIndexFloating: 9999;
|
|
150
141
|
};
|
|
151
142
|
/**
|
|
152
143
|
* Layout breakpoints, in px, for the places CSS cannot read a custom property.
|
|
@@ -159,13 +150,13 @@ export declare const VX: {
|
|
|
159
150
|
* `styles.floor.test.ts`).
|
|
160
151
|
*
|
|
161
152
|
* Only breakpoints that are genuinely a CSS-authored `@media` belong here. A component that can
|
|
162
|
-
* measure its own box uses the measurement instead (`
|
|
153
|
+
* measure its own box uses the measurement instead (`CONTAINER_CLASSES`), and Mantine chrome uses
|
|
163
154
|
* `theme.breakpoints`.
|
|
164
155
|
*/
|
|
165
156
|
export declare const BREAKPOINTS: {
|
|
166
157
|
/**
|
|
167
158
|
* `content/article-layout.module.css` — below this the TOC rail is dropped and the article
|
|
168
|
-
* collapses to a single centred column. Well above the `sm` (
|
|
159
|
+
* collapses to a single centred column. Well above the `sm` (52.5em/840px) shell breakpoint on
|
|
169
160
|
* purpose: the rail needs the prose measure PLUS its own width plus the column gap, which runs
|
|
170
161
|
* out long before the shell goes mobile.
|
|
171
162
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAYH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAQvE,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAOjC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AACnF,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAM5D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAO7C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAE5C,wFAAwF;AACxF,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,8FAA8F;AAC9F,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AAEjD;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAA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Ac,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CASvE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAMtE"}
|
package/dist/tokens/index.js
CHANGED
|
@@ -5,10 +5,11 @@ import {
|
|
|
5
5
|
ROW_LINE_HEIGHT,
|
|
6
6
|
SHADOW,
|
|
7
7
|
SPACE,
|
|
8
|
-
SPACE_FIXED,
|
|
9
8
|
SPACE_SCALE,
|
|
10
9
|
SPACE_STEP
|
|
11
10
|
} from "./palette.js";
|
|
11
|
+
import { SIZE_CLASSES, sizeClassMaxEm } from "./size-classes.js";
|
|
12
|
+
import { HIT_COARSE, HIT_FINE } from "../common/hit-floor.js";
|
|
12
13
|
import { BP, p } from "./palette.js";
|
|
13
14
|
import { DEFAULT_DERIVE_CONFIG, deriveTokens, resolveDeriveConfig } from "./derive.js";
|
|
14
15
|
import { deriveRadius } from "./palette.js";
|
|
@@ -69,11 +70,9 @@ const VX = {
|
|
|
69
70
|
// Fully-rounded pill affordance (scroll-to-bottom button, chips) — fixed, does not track the
|
|
70
71
|
// radius knob (see `RADIUS_STEP.pill`'s doc in `tokens/palette.ts`).
|
|
71
72
|
radiusPill: "var(--vx-radius-pill)",
|
|
72
|
-
// The
|
|
73
|
-
//
|
|
74
|
-
|
|
75
|
-
// `--vx-space-touch-target` var this resolves to.
|
|
76
|
-
spaceTouchTarget: "var(--vx-space-touch-target)",
|
|
73
|
+
// The pointer-tier hit floor: 44px under `(pointer: coarse)` (WCAG 2.5.5), 24px otherwise
|
|
74
|
+
// (2.5.8). Density-exempt; `[data-basalt-hit]::after` in `styles.css` reads it.
|
|
75
|
+
hit: "var(--vx-hit)",
|
|
77
76
|
// Controls tier sizing (`docs/CONTROLS-SPEC.md` §5) — `var()` refs onto the density-tracking
|
|
78
77
|
// `--vx-space-*` declarations `spaceDecls` emits above (same ref pattern as `radiusCard`/
|
|
79
78
|
// `radiusCtrl`), so a home/control reads ONE source for its tier height whether it's Mantine
|
|
@@ -82,7 +81,6 @@ const VX = {
|
|
|
82
81
|
controlHeightTag: "var(--vx-space-control-height-tag)",
|
|
83
82
|
controlHeightWidget: "var(--vx-space-control-height-widget)",
|
|
84
83
|
controlHeightCtl: "var(--vx-space-control-height-ctl)",
|
|
85
|
-
touchControlHeight: "var(--vx-space-touch-control-height)",
|
|
86
84
|
pageBarRowHeight: "var(--vx-space-page-bar-row-height)",
|
|
87
85
|
sectionHeaderHeight: "var(--vx-space-section-header-height)",
|
|
88
86
|
widgetHeaderHeight: "var(--vx-space-widget-header-height)",
|
|
@@ -190,23 +188,15 @@ const VX = {
|
|
|
190
188
|
* legend rolls up).
|
|
191
189
|
*/
|
|
192
190
|
minPlotHeight: 120,
|
|
193
|
-
/**
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
|
|
197
|
-
* rollup.
|
|
198
|
-
*
|
|
199
|
-
* Deliberately NOT a media query and NOT a `theme.breakpoints` value. A chart in a two-column
|
|
200
|
-
* grid cell on a 1440px desktop is as narrow as one on a phone, and only the element's own
|
|
201
|
-
* measured box knows that — the viewport does not. It also keeps the chart layer Mantine-free:
|
|
202
|
-
* `theme.breakpoints` lives on the coupled side of the boundary.
|
|
203
|
-
*/
|
|
204
|
-
phoneChartWidth: 480
|
|
191
|
+
/** Every floating chart overlay portalled to `document.body` — a pinned tooltip, the legend's
|
|
192
|
+
* `All N` disclosure and its backdrop — shares one stacking value, so they always stack the same
|
|
193
|
+
* way relative to page chrome and to each other. */
|
|
194
|
+
zIndexFloating: 9999
|
|
205
195
|
};
|
|
206
196
|
const BREAKPOINTS = {
|
|
207
197
|
/**
|
|
208
198
|
* `content/article-layout.module.css` — below this the TOC rail is dropped and the article
|
|
209
|
-
* collapses to a single centred column. Well above the `sm` (
|
|
199
|
+
* collapses to a single centred column. Well above the `sm` (52.5em/840px) shell breakpoint on
|
|
210
200
|
* purpose: the rail needs the prose measure PLUS its own width plus the column gap, which runs
|
|
211
201
|
* out long before the shell goes mobile.
|
|
212
202
|
*/
|
|
@@ -328,7 +318,6 @@ function spaceDecls(space) {
|
|
|
328
318
|
decl("space-control-height-tag", pxRem(space.anchors.controlHeightTag)),
|
|
329
319
|
decl("space-control-height-widget", pxRem(space.anchors.controlHeightWidget)),
|
|
330
320
|
decl("space-control-height-ctl", pxRem(space.anchors.controlHeightCtl)),
|
|
331
|
-
decl("space-touch-control-height", pxRem(space.anchors.touchControlHeight)),
|
|
332
321
|
decl("space-stack-xs", `${space.anchors.stackXs}px`),
|
|
333
322
|
decl("space-stack-sm", `${space.anchors.stackSm}px`),
|
|
334
323
|
decl("space-stack-md", `${space.anchors.stackMd}px`),
|
|
@@ -521,10 +510,9 @@ function frameworkDerived(data, only, legacyAliases) {
|
|
|
521
510
|
// only in this static block, never in `buildRadiusCss`'s dynamic override (see
|
|
522
511
|
// `RADIUS_STEP.pill`'s doc).
|
|
523
512
|
decl("radius-pill", `${RADIUS_STEP.pill}px`),
|
|
524
|
-
// The
|
|
525
|
-
//
|
|
526
|
-
|
|
527
|
-
decl("space-touch-target", `${SPACE_FIXED.spaceTouchTarget}px`),
|
|
513
|
+
// The pointer tier's fine default — density-EXEMPT, so it lives only in this static block
|
|
514
|
+
// (same law as `radius-pill` above). `coarseHitBlock` re-points it to 44px.
|
|
515
|
+
decl("hit", `${HIT_FINE}px`),
|
|
528
516
|
...only === "core" ? space.filter(isCoreSpaceDecl) : space,
|
|
529
517
|
// Article-density Prose measure (docs/CONTENT-SPEC.md §5) — theme-independent, like the radii.
|
|
530
518
|
decl("prose-measure", "72ch"),
|
|
@@ -567,7 +555,12 @@ function groupTokens(name, map) {
|
|
|
567
555
|
}
|
|
568
556
|
const MANTINE_SCHEME_ATTRIBUTE = "data-mantine-color-scheme";
|
|
569
557
|
const indent = (block) => block.split("\n").map((line) => line === "" ? line : ` ${line}`).join("\n");
|
|
570
|
-
const MOBILE_MEDIA =
|
|
558
|
+
const MOBILE_MEDIA = `@media (max-width: ${sizeClassMaxEm(SIZE_CLASSES.medium)})`;
|
|
559
|
+
const coarseHitBlock = `@media (pointer: coarse) {
|
|
560
|
+
:root {
|
|
561
|
+
--vx-hit: ${HIT_COARSE}px;
|
|
562
|
+
}
|
|
563
|
+
}`;
|
|
571
564
|
function spaceMobileDecls(space) {
|
|
572
565
|
return [
|
|
573
566
|
decl("space-card-inset-x", `${space.scale.xs}px`),
|
|
@@ -597,10 +590,12 @@ ${extra}` : framework;
|
|
|
597
590
|
};
|
|
598
591
|
const rootBlock = only === "core" ? `:root {
|
|
599
592
|
${derived}
|
|
600
|
-
}
|
|
593
|
+
}
|
|
594
|
+
${coarseHitBlock}` : `:root {
|
|
601
595
|
${derived}
|
|
602
596
|
}
|
|
603
|
-
${mobileLadderBlock(DEFAULT_SPACE_VALUES)}
|
|
597
|
+
${mobileLadderBlock(DEFAULT_SPACE_VALUES)}
|
|
598
|
+
${coarseHitBlock}`;
|
|
604
599
|
if (opts.scheme === void 0 && opts.defaultScheme === void 0 && !opts.mediaFallback) {
|
|
605
600
|
return `${rootBlock}
|
|
606
601
|
:root,
|
package/dist/tokens/palette.d.ts
CHANGED
|
@@ -257,11 +257,6 @@ declare const SPACE_ANCHORS_BASE: {
|
|
|
257
257
|
* and the whole band looked unresolved. 32 lands the entire chrome tier on ONE number, which is
|
|
258
258
|
* also the smallest square that still holds a 16px icon with a 8px surround. */
|
|
259
259
|
readonly controlHeightCtl: 32;
|
|
260
|
-
/** The touch hit-area size (`::before`) every home control expands to below `sm` (C15,
|
|
261
|
-
* `docs/CONTROLS-SPEC.md` §5) — independent of the visible `controlHeightCtl` box, same shape as
|
|
262
|
-
* `mobileNavBarHeight`/`mobileNavRowHeight`'s Apple HIG 44pt / WCAG 2.5.5 floors elsewhere in this
|
|
263
|
-
* table. Floored at 30px in {@link deriveSpacing} (C15's "floor 30 at density −3"). */
|
|
264
|
-
readonly touchControlHeight: 36;
|
|
265
260
|
};
|
|
266
261
|
/**
|
|
267
262
|
* The Mantine `spacing` size-scale (`xs`/`sm`/`md`/`lg`/`xl`) — the app-wide generic rhythm every
|
|
@@ -509,9 +504,8 @@ declare const SPACE_STEP_BASE: {
|
|
|
509
504
|
*
|
|
510
505
|
* 44, down from 48. The band holds ONE `ctl`-tier row (32 since this pass), so 48 left 8px of
|
|
511
506
|
* dead air above and below it — the "too much spacing at the top bar" the header reads as. 44
|
|
512
|
-
* keeps 6px of breathing room a side, still clears `
|
|
513
|
-
*
|
|
514
|
-
* this table already floors its touch targets at. */
|
|
507
|
+
* keeps 6px of breathing room a side, still clears `controlHeight` (42) for a `size="md"`
|
|
508
|
+
* control, and is the 44px touch floor (WCAG 2.5.5). */
|
|
515
509
|
readonly appShellHeaderHeight: 44;
|
|
516
510
|
/** AppShell navbar width, expanded — ONE entry for both the `base` (mobile, where the navbar is
|
|
517
511
|
* permanently collapsed and unused — see `MobileNav`) and the expanded `sm` value: the same
|
|
@@ -585,12 +579,9 @@ declare const SPACE_STEP_BASE: {
|
|
|
585
579
|
readonly mobileNavTabInsetY: 2;
|
|
586
580
|
/** Active-pill inset around the slot icon, horizontal. */
|
|
587
581
|
readonly mobileNavTabInsetX: 12;
|
|
588
|
-
/** Menu/sheet row height.
|
|
589
|
-
*
|
|
590
|
-
|
|
591
|
-
* `sheetRowHeight` still hold to) — the shortest box that still reads as ONE row vocabulary with
|
|
592
|
-
* the sidebar instead of a bespoke touch size. */
|
|
593
|
-
readonly mobileNavRowHeight: 40;
|
|
582
|
+
/** Menu/sheet row height — the WCAG 2.5.5 44px target, floored at 44 in `deriveSpacing` (the
|
|
583
|
+
* pointer tier's `--vx-hit` is the same number under `(pointer: coarse)`). */
|
|
584
|
+
readonly mobileNavRowHeight: 44;
|
|
594
585
|
/** More/group `<Menu width={…}>`. JS-consumed, no var — same rationale as
|
|
595
586
|
* `sidebarSettingsMenuWidth` directly above. */
|
|
596
587
|
readonly mobileNavMenuWidth: 232;
|
|
@@ -711,18 +702,6 @@ export declare const SPACE_FIXED: {
|
|
|
711
702
|
* `[-3, 3]` range can produce) for no compensating benefit, since the two radii it sits between
|
|
712
703
|
* never move independently of each other. */
|
|
713
704
|
readonly segmentedTrackInset: 2;
|
|
714
|
-
/**
|
|
715
|
-
* The WCAG 2.5.5/2.5.8 touch-target floor (44px) for a hit area that has no `ctl`-tier home to
|
|
716
|
-
* size it — a raw CSS-module rule bumping a control's hit area under `@media (pointer: coarse)`
|
|
717
|
-
* (C5 consolidation: argo carried three such rules with a hand-picked 44/46px literal apiece).
|
|
718
|
-
* Density-exempt for the same reason `touchControlHeight`'s FLOOR is: a target this small must
|
|
719
|
-
* never shrink further, whatever the density knob says elsewhere. Unlike the rest of this
|
|
720
|
-
* object, this ONE key IS emitted as a `--vx-*` var (`tokens/index.ts`'s `space-touch-target`) —
|
|
721
|
-
* the others stay JS-only because nothing outside the framework's own components reads them, but
|
|
722
|
-
* this floor's whole purpose is being read by a CONSUMER's own `.module.css`, which cannot
|
|
723
|
-
* import a JS ref at all.
|
|
724
|
-
*/
|
|
725
|
-
readonly spaceTouchTarget: 44;
|
|
726
705
|
};
|
|
727
706
|
/**
|
|
728
707
|
* The resolved shape {@link deriveSpacing} returns — the two anchor/scale base groups above (as
|
|
@@ -921,7 +900,6 @@ export declare const SPACE: {
|
|
|
921
900
|
readonly controlHeightTag: number;
|
|
922
901
|
readonly controlHeightWidget: number;
|
|
923
902
|
readonly controlHeightCtl: number;
|
|
924
|
-
readonly touchControlHeight: number;
|
|
925
903
|
};
|
|
926
904
|
/** The Mantine `spacing` size-scale at the shipped identity — see `SPACE_SCALE_BASE`'s doc.
|
|
927
905
|
* `deriveSpacing(0)`'s `scale`, UNCHANGED from the shipped identity (locked by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../src/tokens/palette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,M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177
177
|
* rowLineHeight * text.md`) — so a `size="ctl"` button sitting beside any of them read 2px short
|
|
178
178
|
* and the whole band looked unresolved. 32 lands the entire chrome tier on ONE number, which is
|
|
179
179
|
* also the smallest square that still holds a 16px icon with a 8px surround. */
|
|
180
|
-
controlHeightCtl: 32
|
|
181
|
-
/** The touch hit-area size (`::before`) every home control expands to below `sm` (C15,
|
|
182
|
-
* `docs/CONTROLS-SPEC.md` §5) — independent of the visible `controlHeightCtl` box, same shape as
|
|
183
|
-
* `mobileNavBarHeight`/`mobileNavRowHeight`'s Apple HIG 44pt / WCAG 2.5.5 floors elsewhere in this
|
|
184
|
-
* table. Floored at 30px in {@link deriveSpacing} (C15's "floor 30 at density −3"). */
|
|
185
|
-
touchControlHeight: 36
|
|
180
|
+
controlHeightCtl: 32
|
|
186
181
|
};
|
|
187
182
|
const SPACE_SCALE_BASE = {
|
|
188
183
|
xs: 11,
|
|
@@ -421,9 +416,8 @@ const SPACE_STEP_BASE = {
|
|
|
421
416
|
*
|
|
422
417
|
* 44, down from 48. The band holds ONE `ctl`-tier row (32 since this pass), so 48 left 8px of
|
|
423
418
|
* dead air above and below it — the "too much spacing at the top bar" the header reads as. 44
|
|
424
|
-
* keeps 6px of breathing room a side, still clears `
|
|
425
|
-
*
|
|
426
|
-
* this table already floors its touch targets at. */
|
|
419
|
+
* keeps 6px of breathing room a side, still clears `controlHeight` (42) for a `size="md"`
|
|
420
|
+
* control, and is the 44px touch floor (WCAG 2.5.5). */
|
|
427
421
|
appShellHeaderHeight: 44,
|
|
428
422
|
/** AppShell navbar width, expanded — ONE entry for both the `base` (mobile, where the navbar is
|
|
429
423
|
* permanently collapsed and unused — see `MobileNav`) and the expanded `sm` value: the same
|
|
@@ -498,12 +492,9 @@ const SPACE_STEP_BASE = {
|
|
|
498
492
|
mobileNavTabInsetY: 2,
|
|
499
493
|
/** Active-pill inset around the slot icon, horizontal. */
|
|
500
494
|
mobileNavTabInsetX: 12,
|
|
501
|
-
/** Menu/sheet row height.
|
|
502
|
-
*
|
|
503
|
-
|
|
504
|
-
* `sheetRowHeight` still hold to) — the shortest box that still reads as ONE row vocabulary with
|
|
505
|
-
* the sidebar instead of a bespoke touch size. */
|
|
506
|
-
mobileNavRowHeight: 40,
|
|
495
|
+
/** Menu/sheet row height — the WCAG 2.5.5 44px target, floored at 44 in `deriveSpacing` (the
|
|
496
|
+
* pointer tier's `--vx-hit` is the same number under `(pointer: coarse)`). */
|
|
497
|
+
mobileNavRowHeight: 44,
|
|
507
498
|
/** More/group `<Menu width={…}>`. JS-consumed, no var — same rationale as
|
|
508
499
|
* `sidebarSettingsMenuWidth` directly above. */
|
|
509
500
|
mobileNavMenuWidth: 232,
|
|
@@ -643,19 +634,7 @@ const SPACE_FIXED = {
|
|
|
643
634
|
* to 1 at density's floor level -3 and 3 at its ceiling level +3 — the widest swing `deriveSpacing`'s
|
|
644
635
|
* `[-3, 3]` range can produce) for no compensating benefit, since the two radii it sits between
|
|
645
636
|
* never move independently of each other. */
|
|
646
|
-
segmentedTrackInset: 2
|
|
647
|
-
/**
|
|
648
|
-
* The WCAG 2.5.5/2.5.8 touch-target floor (44px) for a hit area that has no `ctl`-tier home to
|
|
649
|
-
* size it — a raw CSS-module rule bumping a control's hit area under `@media (pointer: coarse)`
|
|
650
|
-
* (C5 consolidation: argo carried three such rules with a hand-picked 44/46px literal apiece).
|
|
651
|
-
* Density-exempt for the same reason `touchControlHeight`'s FLOOR is: a target this small must
|
|
652
|
-
* never shrink further, whatever the density knob says elsewhere. Unlike the rest of this
|
|
653
|
-
* object, this ONE key IS emitted as a `--vx-*` var (`tokens/index.ts`'s `space-touch-target`) —
|
|
654
|
-
* the others stay JS-only because nothing outside the framework's own components reads them, but
|
|
655
|
-
* this floor's whole purpose is being read by a CONSUMER's own `.module.css`, which cannot
|
|
656
|
-
* import a JS ref at all.
|
|
657
|
-
*/
|
|
658
|
-
spaceTouchTarget: 44
|
|
637
|
+
segmentedTrackInset: 2
|
|
659
638
|
};
|
|
660
639
|
function scaleSpace(value, level, multiplier) {
|
|
661
640
|
if (level === 0) return value;
|
|
@@ -687,11 +666,10 @@ function deriveSpacing(level) {
|
|
|
687
666
|
anchors.controlHeightTag = Math.max(18, anchors.controlHeightTag);
|
|
688
667
|
anchors.controlHeightWidget = Math.max(22, anchors.controlHeightWidget);
|
|
689
668
|
anchors.controlHeightCtl = Math.max(28, anchors.controlHeightCtl);
|
|
690
|
-
anchors.touchControlHeight = Math.max(30, anchors.touchControlHeight);
|
|
691
669
|
const mappedStep = mapSpaceGroup(SPACE_STEP_BASE, level, multiplier);
|
|
692
670
|
mappedStep.sidebarSearchTriggerHeight = Math.max(24, mappedStep.sidebarSearchTriggerHeight);
|
|
693
671
|
mappedStep.mobileNavBarHeight = Math.max(49, mappedStep.mobileNavBarHeight);
|
|
694
|
-
mappedStep.mobileNavRowHeight = Math.max(
|
|
672
|
+
mappedStep.mobileNavRowHeight = Math.max(44, mappedStep.mobileNavRowHeight);
|
|
695
673
|
mappedStep.sheetRowHeight = Math.max(44, mappedStep.sheetRowHeight);
|
|
696
674
|
const step = {
|
|
697
675
|
...mappedStep,
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two responsive tables (`docs/DESIGN-CORE.md` § Layout, elevation, shapes) — pure data, Mantine-free. Each
|
|
3
|
+
* value is the class's minimum width in px.
|
|
4
|
+
*
|
|
5
|
+
* A `@media`/`@container` condition cannot read a custom property, so CSS writes the literal and
|
|
6
|
+
* `breakpoint-literals.test.ts` pins every literal to these tables.
|
|
7
|
+
*/
|
|
8
|
+
/** Viewport classes — shell chrome only (bottom bar / rail / sidebar, aside docking). */
|
|
9
|
+
export declare const SIZE_CLASSES: {
|
|
10
|
+
readonly compact: 0;
|
|
11
|
+
readonly medium: 840;
|
|
12
|
+
readonly expanded: 1200;
|
|
13
|
+
};
|
|
14
|
+
/** A component's own inline size — card chrome, chart tier, forms. No CSS reads it yet. */
|
|
15
|
+
export declare const CONTAINER_CLASSES: {
|
|
16
|
+
readonly micro: 0;
|
|
17
|
+
readonly compact: 240;
|
|
18
|
+
readonly regular: 480;
|
|
19
|
+
readonly wide: 800;
|
|
20
|
+
};
|
|
21
|
+
export type ContainerClass = keyof typeof CONTAINER_CLASSES;
|
|
22
|
+
/** The class a MEASURED inline size falls in (`px` is a min-width boundary, so 240 is `compact`). */
|
|
23
|
+
export declare function resolveContainerClass(px: number): ContainerClass;
|
|
24
|
+
/**
|
|
25
|
+
* `theme.breakpoints`, derived — a consumer cannot retune it. Mantine needs all five keys:
|
|
26
|
+
* `base` (no key) is compact, `xs`/`sm` open the medium class, `md`/`lg`/`xl` the expanded one, so
|
|
27
|
+
* every `visibleFrom`/`hiddenFrom` in the package stays "desktop chrome" from `sm` up.
|
|
28
|
+
*/
|
|
29
|
+
export declare const SIZE_CLASS_BREAKPOINTS: {
|
|
30
|
+
readonly xs: `${number}em`;
|
|
31
|
+
readonly sm: `${number}em`;
|
|
32
|
+
readonly md: `${number}em`;
|
|
33
|
+
readonly lg: `${number}em`;
|
|
34
|
+
readonly xl: `${number}em`;
|
|
35
|
+
};
|
|
36
|
+
/** A px width as the `em` length media queries use (16px root). */
|
|
37
|
+
export declare function toEm(px: number): string;
|
|
38
|
+
/** The `max-width` complement of a class boundary — 0.1px under it, Mantine's own convention. */
|
|
39
|
+
export declare function sizeClassMaxEm(minPx: number): string;
|
|
40
|
+
//# sourceMappingURL=size-classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size-classes.d.ts","sourceRoot":"","sources":["../../src/tokens/size-classes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yFAAyF;AACzF,eAAO,MAAM,YAAY;;;;CAAuD,CAAA;AAEhF,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB;;;;;CAA+D,CAAA;AAE7F,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAE3D,qGAAqG;AACrG,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,CAKhE;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB;;;;;;CAMzB,CAAA;AAEV,mEAAmE;AACnE,wBAAgB,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEvC;AAED,iGAAiG;AACjG,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEpD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const SIZE_CLASSES = { compact: 0, medium: 840, expanded: 1200 };
|
|
2
|
+
const CONTAINER_CLASSES = { micro: 0, compact: 240, regular: 480, wide: 800 };
|
|
3
|
+
function resolveContainerClass(px) {
|
|
4
|
+
if (px >= CONTAINER_CLASSES.wide) return "wide";
|
|
5
|
+
if (px >= CONTAINER_CLASSES.regular) return "regular";
|
|
6
|
+
if (px >= CONTAINER_CLASSES.compact) return "compact";
|
|
7
|
+
return "micro";
|
|
8
|
+
}
|
|
9
|
+
const SIZE_CLASS_BREAKPOINTS = {
|
|
10
|
+
xs: `${SIZE_CLASSES.medium / 16}em`,
|
|
11
|
+
sm: `${SIZE_CLASSES.medium / 16}em`,
|
|
12
|
+
md: `${SIZE_CLASSES.expanded / 16}em`,
|
|
13
|
+
lg: `${SIZE_CLASSES.expanded / 16}em`,
|
|
14
|
+
xl: `${SIZE_CLASSES.expanded / 16}em`
|
|
15
|
+
};
|
|
16
|
+
function toEm(px) {
|
|
17
|
+
return `${Number((px / 16).toFixed(5))}em`;
|
|
18
|
+
}
|
|
19
|
+
function sizeClassMaxEm(minPx) {
|
|
20
|
+
return toEm(minPx - 0.1);
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
CONTAINER_CLASSES,
|
|
24
|
+
SIZE_CLASSES,
|
|
25
|
+
SIZE_CLASS_BREAKPOINTS,
|
|
26
|
+
resolveContainerClass,
|
|
27
|
+
sizeClassMaxEm,
|
|
28
|
+
toEm
|
|
29
|
+
};
|