@vegastack/design 0.18.1 → 0.19.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/bin/doctor.mjs
CHANGED
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
// renders as body text. The Regent consumer carried 338 such classes past every other check
|
|
19
19
|
// (2026-09-23), which is why this is a failing check and not a guide section.
|
|
20
20
|
//
|
|
21
|
-
// And it holds pages to the one page layout:
|
|
22
|
-
// (`prose` · `default` · `full`) and pads with the shared page gutter, so a `max-w-*`, `mx-*`,
|
|
21
|
+
// And it holds pages to the one page layout: a `ShellPage` picks its width with `size`
|
|
22
|
+
// (`prose` · `default` · `full` · `form`) and pads with the shared page gutter, so a `max-w-*`, `mx-*`,
|
|
23
23
|
// `w-*` or padding class on one is a page choosing its own width or gutter, and fails.
|
|
24
24
|
//
|
|
25
25
|
// And it warns where code works around a DS part instead of using it — a Tailwind `!` on a ui part,
|
|
26
26
|
// a width class on a popover or menu popup, a hand-written `<header>` inside overlay content, an
|
|
27
|
-
// `
|
|
27
|
+
// `ShellPage size` that disagrees with the route map. Those four warn by default and fail under
|
|
28
28
|
// `--strict`, so a consumer can take the release, fix what they report, and then turn the gate on.
|
|
29
29
|
//
|
|
30
30
|
// Read-only: it never writes, installs, or edits. Exit 0 = all good, 1 = a real problem,
|
|
@@ -60,11 +60,11 @@ Also scans the project's own source (not node_modules, build output, or the comp
|
|
|
60
60
|
\`ui\` alias directory) and reports each finding as file:line:
|
|
61
61
|
|
|
62
62
|
retired vocabulary a utility, token or component the shadcn reset retired (fails)
|
|
63
|
-
page layout
|
|
63
|
+
page layout a ShellPage class that sets the page's width or gutter (fails)
|
|
64
64
|
important on DS parts a Tailwind \`!\` modifier in the className of a ui part (warns)
|
|
65
65
|
popup width w-*/min-w-*/max-w-* on a popover, menu or select popup (warns)
|
|
66
66
|
overlay header a hand-written <header> inside Sheet/Drawer/Dialog content (warns)
|
|
67
|
-
page width vs route map
|
|
67
|
+
page width vs route map a ShellPage size in an App Router page or layout that
|
|
68
68
|
disagrees with the definePageWidths route map (warns)
|
|
69
69
|
|
|
70
70
|
Options:
|
|
@@ -655,20 +655,18 @@ export function scanRetiredVocabulary(
|
|
|
655
655
|
// ---- page layout -----------------------------------------------------------------------------
|
|
656
656
|
|
|
657
657
|
/**
|
|
658
|
-
* A class on
|
|
658
|
+
* A class on a `ShellPage` that picks the page's width or gutter — which `size` and the page
|
|
659
659
|
* gutter own. `pb-*` stays legal: room at the bottom for a docked save bar is not a gutter.
|
|
660
660
|
*/
|
|
661
661
|
const PAGE_OVERRIDE =
|
|
662
662
|
/(?<![\w-])(?:[\w@\[\]()/.:-]*:)?(?:max-w|min-w|w|mx|ms|me|px|ps|pe|p|py|pt)-[^\s"'`]+/g;
|
|
663
663
|
|
|
664
664
|
/**
|
|
665
|
-
* Every `
|
|
666
|
-
*
|
|
667
|
-
*/
|
|
665
|
+
* Every `ShellPage` in the project's own source that sets its own width or gutter (a failure)
|
|
666
|
+
* */
|
|
668
667
|
export function scanPageLayout(root, { skipDirs = [] } = {}) {
|
|
669
668
|
const skip = new Set(skipDirs.map((d) => resolve(d)));
|
|
670
669
|
const findings = [];
|
|
671
|
-
const deprecated = [];
|
|
672
670
|
const walk = (dir) => {
|
|
673
671
|
let entries;
|
|
674
672
|
try {
|
|
@@ -685,9 +683,9 @@ export function scanPageLayout(root, { skipDirs = [] } = {}) {
|
|
|
685
683
|
}
|
|
686
684
|
if (!e.isFile() || !/\.[jt]sx$/.test(e.name)) continue;
|
|
687
685
|
const src = readIfExists(full);
|
|
688
|
-
if (src == null || !src.includes("<
|
|
686
|
+
if (src == null || !src.includes("<ShellPage")) continue;
|
|
689
687
|
const file = relative(root, full).split(sep).join("/");
|
|
690
|
-
for (const tag of src.matchAll(/<
|
|
688
|
+
for (const tag of src.matchAll(/<ShellPage\b(?:[^>{]|\{[^}]*\})*>/g)) {
|
|
691
689
|
const line = src.slice(0, tag.index).split("\n").length;
|
|
692
690
|
const cls = /\bclassName=(?:"([^"]*)"|\{([\s\S]*?)\}(?=\s|\/?>))/.exec(
|
|
693
691
|
tag[0],
|
|
@@ -695,13 +693,11 @@ export function scanPageLayout(root, { skipDirs = [] } = {}) {
|
|
|
695
693
|
const text = cls ? (cls[1] ?? cls[2] ?? "") : "";
|
|
696
694
|
for (const m of text.matchAll(PAGE_OVERRIDE))
|
|
697
695
|
findings.push({ file, line, match: m[0] });
|
|
698
|
-
if (/\bsize=(?:"narrow"|\{\s*["']narrow["']\s*\})/.test(tag[0]))
|
|
699
|
-
deprecated.push({ file, line, match: 'size="narrow"' });
|
|
700
696
|
}
|
|
701
697
|
}
|
|
702
698
|
};
|
|
703
699
|
walk(root);
|
|
704
|
-
return { findings
|
|
700
|
+
return { findings };
|
|
705
701
|
}
|
|
706
702
|
|
|
707
703
|
// ---- composition: DS parts used as designed --------------------------------------------------
|
|
@@ -718,7 +714,7 @@ export function scanPageLayout(root, { skipDirs = [] } = {}) {
|
|
|
718
714
|
// child component's header is not seen); a JSX attribute string ending in a backslash
|
|
719
715
|
// (`title="C:\"`) or spanning lines can desynchronise that tag's scan; route-map rows count only as
|
|
720
716
|
// string literals; a regex literal holding a brace inside a JSX attribute expression can end that
|
|
721
|
-
// expression early; and
|
|
717
|
+
// expression early; and a `ShellPage` outside an App Router page or layout file, or with a
|
|
722
718
|
// `size={…}` expression, is counted rather than compared.
|
|
723
719
|
|
|
724
720
|
/** Popover and menu popups whose width the part owns: `PopoverContent size`, or the longest item. */
|
|
@@ -1144,7 +1140,8 @@ export function widthsForRoute(map, route, pages = []) {
|
|
|
1144
1140
|
return [...seen.values()];
|
|
1145
1141
|
}
|
|
1146
1142
|
|
|
1147
|
-
const ROUTE_ROW =
|
|
1143
|
+
const ROUTE_ROW =
|
|
1144
|
+
/(["'])(\/[^"'\s]*)\1\s*:\s*(["'])(prose|form|default|full)\3/g;
|
|
1148
1145
|
|
|
1149
1146
|
/**
|
|
1150
1147
|
* Route-map rows a source declares: the `"/route": "prose" | "default" | "full"` rows of the
|
|
@@ -1246,7 +1243,7 @@ export function checkIconLocals(src) {
|
|
|
1246
1243
|
/**
|
|
1247
1244
|
* The four composition rules over the project's own source (the ui alias dirs, node_modules and
|
|
1248
1245
|
* build output skipped): `!` on a DS part, a width class on a popover or menu popup, a hand-written
|
|
1249
|
-
* `<header>` inside an overlay panel, and
|
|
1246
|
+
* `<header>` inside an overlay panel, and a `ShellPage size` that disagrees with the route map.
|
|
1250
1247
|
*/
|
|
1251
1248
|
export function scanComposition(root, { skipDirs = [], uiAlias = null } = {}) {
|
|
1252
1249
|
const skip = new Set(skipDirs.map((d) => resolve(d)));
|
|
@@ -1422,7 +1419,7 @@ export function scanComposition(root, { skipDirs = [], uiAlias = null } = {}) {
|
|
|
1422
1419
|
hint: OVERLAY_HEADERS[inside],
|
|
1423
1420
|
});
|
|
1424
1421
|
}
|
|
1425
|
-
const isPage = part === "
|
|
1422
|
+
const isPage = part === "ShellPage" || tag.name === "ShellPage";
|
|
1426
1423
|
if (!part && !isPage) continue;
|
|
1427
1424
|
const attrs = tagAttributes(tag, scan);
|
|
1428
1425
|
if (isPage) {
|
|
@@ -1454,7 +1451,7 @@ export function scanComposition(root, { skipDirs = [], uiAlias = null } = {}) {
|
|
|
1454
1451
|
}
|
|
1455
1452
|
}
|
|
1456
1453
|
|
|
1457
|
-
//
|
|
1454
|
+
// ShellPage size vs the route map: route files only, literal (or absent) sizes only.
|
|
1458
1455
|
const mismatches = [...conflicts];
|
|
1459
1456
|
let compared = 0;
|
|
1460
1457
|
let dynamic = 0;
|
|
@@ -1470,7 +1467,7 @@ export function scanComposition(root, { skipDirs = [], uiAlias = null } = {}) {
|
|
|
1470
1467
|
}
|
|
1471
1468
|
if (map.size === 0) continue;
|
|
1472
1469
|
compared += 1;
|
|
1473
|
-
const size = page.size
|
|
1470
|
+
const size = page.size;
|
|
1474
1471
|
// A page answers for its own route; a layout for every page in its folder and below (a route
|
|
1475
1472
|
// group's layout wraps only its group), or its own route when it wraps none.
|
|
1476
1473
|
const layoutDir = /(?:^|\/)layout\.[jt]sx?$/.test(page.file)
|
|
@@ -1743,27 +1740,18 @@ export function main(argv = []) {
|
|
|
1743
1740
|
});
|
|
1744
1741
|
}
|
|
1745
1742
|
|
|
1746
|
-
// ---- 8. every page takes its width from
|
|
1743
|
+
// ---- 8. every page takes its width from ShellPage's size ------------------------------
|
|
1747
1744
|
const layout = scanPageLayout(root, { skipDirs });
|
|
1748
1745
|
if (layout.findings.length > 0) {
|
|
1749
1746
|
results.push({
|
|
1750
1747
|
level: "fail",
|
|
1751
1748
|
name: "page layout",
|
|
1752
|
-
detail: `${layout.findings.length} class(es) on
|
|
1753
|
-
fix: "delete them — pick the width with size (prose · default · full) from the route map; the gutter is --page-gutter (https://design.vegastack.com/docs/foundations/page-layout)",
|
|
1749
|
+
detail: `${layout.findings.length} class(es) on ShellPage set the page's own width or gutter`,
|
|
1750
|
+
fix: "delete them — pick the width with size (prose · default · full · form) from the route map; the gutter is --page-gutter (https://design.vegastack.com/docs/foundations/page-layout)",
|
|
1754
1751
|
findings: layout.findings.map((f) => `${f.file}:${f.line} ${f.match}`),
|
|
1755
1752
|
});
|
|
1756
1753
|
} else {
|
|
1757
|
-
ok("page layout", "no
|
|
1758
|
-
}
|
|
1759
|
-
if (layout.deprecated.length > 0) {
|
|
1760
|
-
results.push({
|
|
1761
|
-
level: "warn",
|
|
1762
|
-
name: "page width names",
|
|
1763
|
-
detail: `${layout.deprecated.length} AppShellPage(s) still say size="narrow"`,
|
|
1764
|
-
fix: 'rename to size="prose" — narrow is removed in the next minor',
|
|
1765
|
-
findings: layout.deprecated.map((f) => `${f.file}:${f.line} ${f.match}`),
|
|
1766
|
-
});
|
|
1754
|
+
ok("page layout", "no ShellPage sets its own width or gutter");
|
|
1767
1755
|
}
|
|
1768
1756
|
|
|
1769
1757
|
// ---- 9–12. DS parts used as designed ------------------------------------------------------
|
|
@@ -1804,7 +1792,7 @@ export function main(argv = []) {
|
|
|
1804
1792
|
"overlay header",
|
|
1805
1793
|
composition.headers,
|
|
1806
1794
|
"hand-written <header>(s) inside Sheet, Drawer or Dialog content",
|
|
1807
|
-
"use the overlay's own header part (SheetHeader · DrawerHeader · DialogHeader · AlertDialogHeader), or
|
|
1795
|
+
"use the overlay's own header part (SheetHeader · DrawerHeader · DialogHeader · AlertDialogHeader), or ShellPanel for a record panel",
|
|
1808
1796
|
"no overlay content hand-writes a <header> (same-file nesting only)",
|
|
1809
1797
|
);
|
|
1810
1798
|
// A green check is a failure whatever --strict says (COL-25): the rule is the operator's, and a
|
|
@@ -1827,7 +1815,7 @@ export function main(argv = []) {
|
|
|
1827
1815
|
rm.dynamic ? `, ${rm.dynamic} dynamic size={…} skipped` : ""
|
|
1828
1816
|
}${
|
|
1829
1817
|
rm.outside
|
|
1830
|
-
? `, ${rm.outside}
|
|
1818
|
+
? `, ${rm.outside} ShellPage(s) outside page/layout files not checked (this rule reads route files only)`
|
|
1831
1819
|
: ""
|
|
1832
1820
|
}`;
|
|
1833
1821
|
if (rm.rows === 0) {
|
|
@@ -1841,7 +1829,7 @@ export function main(argv = []) {
|
|
|
1841
1829
|
compositionCheck(
|
|
1842
1830
|
"page width vs route map",
|
|
1843
1831
|
rm.mismatches,
|
|
1844
|
-
`
|
|
1832
|
+
`ShellPage size(s) disagree with the route map (${rm.rows} row(s) in ${rm.files.join(", ")}; ${coverage})`,
|
|
1845
1833
|
"set size to the map's width, or change the map's row — a page and its skeleton read the same map (https://design.vegastack.com/docs/foundations/page-layout)",
|
|
1846
1834
|
`${rm.rows} route-map row(s) in ${rm.files.join(", ")}; ${coverage}`,
|
|
1847
1835
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vegastack/design",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "VegaStack design system — cn utility, icon runtime, Tailwind v4 preset, and the vegastack-design CLI (tokens ship separately as @vegastack/design-tokens)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"test": "node test/compare.test.mjs && node test/check-updates.test.mjs && node test/skills-install.test.mjs && node test/doctor.test.mjs && node --test test/merge-refs.test.mjs test/registry-credentials.test.mjs test/registry-fetch.test.mjs"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@vegastack/design-tokens": "^0.
|
|
73
|
+
"@vegastack/design-tokens": "^0.19.0",
|
|
74
74
|
"clsx": "^2.1.1",
|
|
75
75
|
"tailwind-merge": "^3.6.0",
|
|
76
76
|
"tsconfig-paths": "^4.2.0",
|
|
@@ -89,7 +89,7 @@ rg -n '(focus|focus-visible|focus-within|data-focused|popup-open)[^ "]*:border-(
|
|
|
89
89
|
- **a focus border** — a border colour under a focus or open-popup variant (`focus:border-ring/70`,
|
|
90
90
|
`focus-within:border-ring`, `data-popup-open:border-input`, `not-focus:aria-invalid:…`) in app
|
|
91
91
|
code. A border never changes colour on focus or while active (FOC-14) — the DS's own text-entry
|
|
92
|
-
components are the one exception (a subtle `border-
|
|
92
|
+
components are the one exception (a subtle `border-input-focus` focus border, no fill) and carry it
|
|
93
93
|
themselves; only an invalid field's destructive border shows, in every state. **error**
|
|
94
94
|
- a status FILL used as a text ink on that family's own tint — `bg-destructive/10 text-destructive`
|
|
95
95
|
measures 3.98:1. The readable half is `text-destructive-text`. **error**
|
|
@@ -73,14 +73,14 @@ link` (upstream's set, verbatim). `destructive` is a soft tint, not a solid red
|
|
|
73
73
|
what they compose. Four keepers still carry a small private axis over something that is not a
|
|
74
74
|
control height — `Chip` (`sm`/`md`, the inline and control pill scales), `StatusIcon`, `Stat` and
|
|
75
75
|
`Image`'s corner — and they say so on their own pages.
|
|
76
|
-
- **Compose `
|
|
76
|
+
- **Compose `shell`** for the rail, column, top bar, main region and panel — never hand-roll the
|
|
77
|
+
landmarks.
|
|
77
78
|
- **Space a page with the page-rhythm recipe** — gutters `px-4 py-6` / `md:px-8 md:py-8`,
|
|
78
79
|
`gap-6` under `PageHeader`, `gap-8` between sections, `gap-3` from a section heading or a list
|
|
79
80
|
toolbar to its content, `--card-spacing` inside a card, and `FieldGroup`'s own gaps in a form
|
|
80
81
|
(<https://design.vegastack.com/docs/foundations/spacing#page-rhythm>).
|
|
81
82
|
- **`select`** for a short fixed option set; **`searchable-select`** when the list is long enough to
|
|
82
|
-
need a search field (it
|
|
83
|
-
for it before composing `combobox` by hand); **`combobox`** directly only for free text,
|
|
83
|
+
need a search field (reach for it before composing `combobox` by hand); **`combobox`** directly only for free text,
|
|
84
84
|
suggestions or multi-select chips.
|
|
85
85
|
- **One view-switch rule.** Form choices use `radio-group`; toolbar scope switches use default
|
|
86
86
|
`Tabs`, and Grid | List | Board is the `ListToolbar`'s Layout tool. `ToggleGroup` is for
|
|
@@ -101,8 +101,7 @@ overflow="menu"`) left; the search, then the tools — Filter (n), Sort (`SortMe
|
|
|
101
101
|
chips, Clear; people facets take `itemToSecondaryLabel={(p) => p.email}`. Tables are `DataList` with `sortable` columns (`compare`, `sortFirst`,
|
|
102
102
|
`sortMode="client"`) and `rowActions` (the ⋯ column, always last); row links are never underlined.
|
|
103
103
|
- **`alert`** for an in-content notice — `variant` is `default · destructive · success · warning ·
|
|
104
|
-
info`, each an ink on the `card` surface with a required icon
|
|
105
|
-
the full-width inverse strip at the very top of the page.
|
|
104
|
+
info`, each an ink on the `card` surface with a required icon.
|
|
106
105
|
- **`chip` is the ONE pill** — `hue` × `size` (`sm` inline · `md` control-scale) × `active`, with
|
|
107
106
|
`onRemove` giving a real 24×24 remove control. `Tag` and `FilterChip` wrap that primitive; `ComboboxChip` is Base UI's own chip and does not share its geometry
|
|
108
107
|
yet. Never hand-roll a pill with its own height, radius, or a sub-24px `×`. A **`badge`** is the different job: status, never removable, never a selection.
|
|
@@ -110,8 +109,7 @@ info`, each an ink on the `card` surface with a required icon; **`announcement-b
|
|
|
110
109
|
render ONE `Announcer` element per component, mounted for its life. It keeps the region observed from first paint
|
|
111
110
|
and re-keys it per call, so repeating an identical string still announces. Do not hand-roll a
|
|
112
111
|
`role="status"` node with a `{text, seq}` counter.
|
|
113
|
-
- **The user menu is one standard
|
|
114
|
-
and role; the menu header repeats avatar + name with the email instead of the role; then Profile
|
|
112
|
+
- **The user menu is one standard**: the rail footer's avatar opens it; the menu header shows the avatar and name with the email; then Profile
|
|
115
113
|
and Settings, a Theme `DropdownMenuSub` whose `DropdownMenuRadioGroup` (Light · Dark · System, with
|
|
116
114
|
Sun · Moon · Monitor icons) is bound to `theme`/`setTheme` from `useVegaStackTheme()`, Keyboard
|
|
117
115
|
shortcuts, a separator, and Sign out. Every item has an icon. Do not hand-roll a theme toggle button.
|
|
@@ -151,7 +149,7 @@ A component's name undersells it. Before composing something by hand, check this
|
|
|
151
149
|
|
|
152
150
|
### Which component for X
|
|
153
151
|
|
|
154
|
-
- **A page** → `
|
|
152
|
+
- **A page** → `Shell` › `ShellMain` › `ShellPage` (`size`: `prose` for forms and
|
|
155
153
|
settings, `default` for lists and record pages, `full` for boards and canvases — picked per route
|
|
156
154
|
from one `definePageWidths` map, never a `max-w-*` or padding class; see
|
|
157
155
|
<https://design.vegastack.com/docs/foundations/page-layout>) › `PageHeader` › `ListToolbar` (with its `FilterRow`) › `DataList` (or
|
|
@@ -217,8 +215,8 @@ source })}` — never a hand-rolled card. The board fills the viewport below the
|
|
|
217
215
|
A block is a page you copy once and then own (`shadcn add @vegastack/<name>`). Start from the
|
|
218
216
|
closest one rather than composing the page from nothing:
|
|
219
217
|
|
|
220
|
-
- **`
|
|
221
|
-
|
|
218
|
+
- **`shell-01`** — the shell: the module rail, a column, the top bar in its fixed order, a list,
|
|
219
|
+
and a record opening in the panel beside it.
|
|
222
220
|
- **`list-page-01`** — one kind of record: a `DataList` with a `ListToolbar` (search, a `FilterRow`
|
|
223
221
|
of facets, the Grid | List Layout tool), Mine | Team scope tabs, grouped by industry, Load more and three
|
|
224
222
|
empty tiers.
|
|
@@ -280,7 +278,7 @@ opaque `hover:bg-muted`/`hover:bg-accent` (lint rejects it):
|
|
|
280
278
|
```
|
|
281
279
|
|
|
282
280
|
Keyboard focus is base.css's soft info-hue tint (`--state-focus`), never restated. Text entry
|
|
283
|
-
already shows hover (darker border), focus (`
|
|
281
|
+
already shows hover (darker border), focus (`input-focus` border, no ring or glow) and read-only
|
|
284
282
|
(`readonly` fill) in the DS components. A list of rows inside a card is `ItemGroup variant="flush"`
|
|
285
283
|
(fills sit 8px inside the card); never hand-write `-mx-*` for it.
|
|
286
284
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<!-- GENERATED — do not hand-edit. Regenerated from the design system's component contract,
|
|
4
4
|
which is the authority for membership and counts. -->
|
|
5
5
|
|
|
6
|
-
**
|
|
6
|
+
**224 components**, plus 467 animated-icon items, 16 hooks (`use-announcer`, `use-async-search`, `use-drag-reorder`, `use-file-drop`, `use-grid-selection`, `use-inline-edit`, `use-list-nav`, `use-media-query`, `use-mobile`, `use-modal-inert`, `use-overflow-fold`, `use-overflow`, `use-platform`, `use-stick-to-bottom`, `use-tabs-swipe`, `use-view-transition`), 15 starter blocks (`shell-01`, `board-01`, `issue-detail-01`, `page-editor-01`, `command-search-01`, `list-page-01`, `library-01`, `login-01`, `notifications-01`, `review-split-01`, `settings-01`, `settings-02`, `status-pages-01`, `email-kit`, `share-01`), 68 chart blocks across 7 families, and 24 data libs (`code-highlight`, `date-time`, `disclosure-trigger`, `drag-item`, `embed-providers`, `emoji-data`, `file-kind`, `grid-clipboard`, `icon-components`, `icon-data`, `markdown-as-typed`, `media-probe`, `page-layout`, `shell-layout`, `picker-preferences`, `picker-search`, `text-anchor`, `text-anchor-doc`, `text-edit-grammar`, `text-edit-markdown`, `text-edit-schema`, `tile-overlay`, `upload-progress`, `panel-tabs`) — 814 registry items in total.
|
|
7
7
|
|
|
8
8
|
Install any of them with `shadcn add @vegastack/<name>`. Animated icons install as
|
|
9
9
|
`@vegastack/icon-<name>`; the bare name is reserved for components, so a component whose name
|
|
@@ -28,7 +28,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
28
28
|
- **`choice-card`** — A radio option drawn as a card — icon, title, description and the radio — in a group that is two across from @sm and stacked below. A thin wrapper over the Field choice-card pattern.
|
|
29
29
|
- **`color-picker`** — A swatch-triggered popover presenting a grid of preset colors — pick one, fire onValueChange, mark the selection.
|
|
30
30
|
- **`combobox`** — A filterable listbox behind a text input — grouped items, an announced empty state and a chips mode.
|
|
31
|
-
- **`country-select`** — A searchable country picker returning the ISO 3166-1 alpha-2 code, with flag + name. A thin wrapper over SearchableSelect fed by the geo-data item.
|
|
32
31
|
- **`date-picker`** — Pick a single date, a date and a time, or a date range from a calendar popover — token-styled, keyboard-navigable, with optional quick presets.
|
|
33
32
|
- **`dropzone`** — File acquisition surface — drop, click-to-browse, and paste — as a thin shell over use-file-drop; the surface is the named focusable control over a hidden picker-bridge input; data-dragging/data-drag-invalid styling flags.
|
|
34
33
|
- **`editable-cell`** — Inline-editable value whose edit mode looks like view — same box, inherited type, no border — with optimistic saves, a delayed spinner, rollback plus a Retry toast on failure, required, multiline, table-cell and heading variants, and a typed text/select/custom editor registry.
|
|
@@ -48,7 +47,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
48
47
|
- **`radio-group`** — Mutually-exclusive options with arrow-key navigation and a 24px invisible hit area (A11Y-2).
|
|
49
48
|
- **`record-chip`** — A pill that shows the record something belongs to and picks another: icon, name and a chevron as a picker trigger, plus an arrow link to the record.
|
|
50
49
|
- **`recurrence-picker`** — The body of a repeat popover: presets, a custom editor (every n days, weeks, months or years; weekdays; month day; ends; time) and the host's preview of the next dates. Never computes a date.
|
|
51
|
-
- **`region-select`** — A searchable picker of states/provinces for a country, with a free-text fallback for countries with no subdivisions. A thin wrapper over SearchableSelect fed by the geo-data item.
|
|
52
50
|
- **`search-input`** — A token-safe search field with a consistent clear action and controlled or uncontrolled native input semantics.
|
|
53
51
|
- **`searchable-select`** — The Select-shaped Combobox preset: a full-width trigger, an in-panel search field, a tick on the selected row (matched by key, so async options tick too), a standard person option (name plus muted email, both searched) and an optional clear control. Single or multiple, controlled through value/onValueChange.
|
|
54
52
|
- **`select`** — A dropdown for one value — trigger, grouped scrollable popup and item-aligned positioning.
|
|
@@ -77,7 +75,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
77
75
|
- **`mermaid-block`** — A mermaid diagram drawn in the browser with the engine loaded lazily and its configuration pinned (strict security, SVG labels, dagre), in token colours for light and dark, keeping the last diagram that worked on an error — plus renderMermaid, useMermaidSvg and the ready blockViews entry for TextEdit and MarkdownView.
|
|
78
76
|
- **`meta-line`** — An icon + text meta line under a record title: wrapping facts such as type, date and time, duration and owner, in the muted ink.
|
|
79
77
|
- **`qr-code`** — A QR code for a value, drawn as one crisp SVG path — dark modules on a light rounded tile in both themes, with the standard quiet zone — encoded during render (server or client) by uqr; an empty or unencodable value draws the empty tile.
|
|
80
|
-
- **`rating-bars`** — A short qualitative rating: a label, max segments of which value are lit (primary on the muted track) and a word after them; one role=meter named by label with aria-valuetext set to the word. Server-safe, no motion.
|
|
81
78
|
- **`reactions`** — Slack-style emoji reactions: pills with counts that toggle, a hover card naming who reacted, and an add-reaction button with quick reactions.
|
|
82
79
|
- **`record-header`** — One head for every record, on its page and in a peek.
|
|
83
80
|
- **`stat`** — A labelled value block — muted label over a value, honest faint empty state, optional delta line. Two scales.
|
|
@@ -89,7 +86,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
89
86
|
## Data display
|
|
90
87
|
|
|
91
88
|
- **`accordion`** — A vertically stacked set of interactive headings that each reveal a section of content — one open at a time, or several.
|
|
92
|
-
- **`animated-number`** — A number display that tweens from its previous value to a new one on every change — Intl.NumberFormat-aware (currency/percent/compact), instant under reduced motion, the dashboard stat-card counter.
|
|
93
89
|
- **`avatar`** — A circular user or entity image with a fallback, a badge, and an overlapping group.
|
|
94
90
|
- **`badge`** — A compact label or status chip — upstream's six variants plus our four status tones (COL-12).
|
|
95
91
|
- **`card`** — A content surface with composable header, content, footer and action parts.
|
|
@@ -106,7 +102,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
106
102
|
- **`relative-time`** — One Intl-based dates & times module — formatRelative, formatDuration, formatDate, formatDateTime, formatDateRange, formatTimeOfDay, formatDueLabel, groupByDay, time-zone cookie + provider — and the RelativeTime, DateTime, Duration and DueLabel components with absolute-time tooltips.
|
|
107
103
|
- **`status-icon`** — A small workflow status icon in Linear's set — backlog, todo, in progress, in review, done, canceled, duplicate, triage — each a hand-drawn 16-unit glyph in a semantic color.
|
|
108
104
|
- **`table`** — A responsive table component — caption, header, body, footer, row, head and cell parts over semantic table markup.
|
|
109
|
-
- **`timeline`** — Rail geometry for chronological records — a continuous connector with a node per entry. Rows compose Item parts; separators render through Marker; entries carry content-visibility render skipping.
|
|
110
105
|
- **`truncated-text`** — Truncate text to one line or N lines with an ellipsis, revealing the full text in a tooltip only when it overflows — with per-region control over the tab stop.
|
|
111
106
|
|
|
112
107
|
## Data
|
|
@@ -117,6 +112,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
117
112
|
- **`data-grid`** — The full-parity grid — client or host-sorted multi-key sort, frozen, resizable and windowed columns, header reorder, client or host grouping flattened into the row virtualiser, a summary row, cursor paging, and an APG grid keyboard layer with inline cell editing.
|
|
118
113
|
- **`data-list`** — A generic, typed data table — configurable columns, row selection, sortable columns (indicator, custom compare and first direction, client or manual), a standard rowActions ⋯ column always last, untinted-link rows (no underline), loading, and Empty-based emptyState and noResults states.
|
|
119
114
|
- **`data-list-pager`** — A controlled paging footer for DataList — a tabular-numeral range summary, a rows-per-page Select, and a windowed Pagination that hides on a single page.
|
|
115
|
+
- **`data-list-skeleton`** — A DataList and its ListToolbar while they load, in the list's own geometry, without loading the list.
|
|
120
116
|
- **`data-table-parts`** — The chrome DataList and DataGrid share — sort header, selection cells, skeleton rows, the empty row, column class rules, and the selection/sort/controlled-state hooks.
|
|
121
117
|
- **`display-menu`** — The toolbar's Display tool: Layout and Sort once folded in, row height, group by, a Columns drill-in, the Show switches (archived, closed, subtasks) and Reset — one surface, no fills.
|
|
122
118
|
- **`filter-bar-managed`** — The controlled nested and/or filter builder — host-injected field grammar (vocabulary + per-type value editors), depth and condition caps, focus-managed removal, and a removable FilterChip summary.
|
|
@@ -129,7 +125,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
129
125
|
- **`person-hover-card`** — Stacked avatars with a hover card per person — a compact card with a 32px avatar, with the name and muted email beside it — and the rest behind "+N".
|
|
130
126
|
- **`property-list`** — Record-facts rows: an icon+label column beside a value column, as an accessible definition list.
|
|
131
127
|
- **`recent-strip`** — One row of the records a person opened last — compact cards in a sideways strip with edge fades and roving arrow keys, a single line of chips on a phone, collapsible, with a same-shape skeleton.
|
|
132
|
-
- **`record-aside`** — The cards of a record
|
|
128
|
+
- **`record-aside`** — The cards of a record's details — titled sections of inline properties, people, linked records and full-width action rows.
|
|
133
129
|
- **`record-list`** — A numbered list of the records a change affects — a muted record-type icon, the name with a new-tab link after it, a badge and a description line — plus a footer that loads the next rows on scroll and keeps the numbering. For confirmation dialogs.
|
|
134
130
|
- **`sort-menu`** — The one-key sort: the fields, then the two directions worded by field type (Oldest first, A → Z, Low → high), with Reset while not at the page default.
|
|
135
131
|
- **`sortable-list`** — Reorderable rows or tiles on ItemGroup/Item via use-drag-reorder — pointer drag with drop indicators, touch long-press, keyboard move mode, a remove button or a row menu, locked rows, a grid layout with bare tiles for attachments, and server-refusable moves. Controlled; the host owns the order.
|
|
@@ -138,7 +134,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
138
134
|
|
|
139
135
|
## Overlay
|
|
140
136
|
|
|
141
|
-
- **`access-chip`** — How far one record reaches as one focusable chip: the space tile and name, a lock and Only invited, My space, or a space the viewer cannot see (someone's My space, a private space) — with a globe when published and the full sentence in a tooltip. Clicking opens Share.
|
|
142
137
|
- **`alert-dialog`** — A modal that interrupts for a decision — an optional media slot, two sizes and an action/cancel footer.
|
|
143
138
|
- **`command-search`** — The search palette's frame, results first — one row of scope chips with a More menu (and Include archived), results up to min(60dvh, 520px), an in-flight state that dims stale results under an input progress bar, Recent · Create · Places start sections, and a preview pane from 1280px.
|
|
144
139
|
- **`context-menu`** — The same menu vocabulary opened by right-click, positioned at the pointer.
|
|
@@ -153,10 +148,9 @@ starts with `icon-` is a component and never an icon.
|
|
|
153
148
|
- **`permission-menu`** — An access level on a sharing row — a ghost trigger reading the level, a menu of levels with one-line descriptions and a check on the current one, an optional destructive Remove access, and a read-only text mode for built-in rows.
|
|
154
149
|
- **`picker-panel`** — A searchable, selectable item in an internal picker panel.
|
|
155
150
|
- **`popover`** — An anchored, dismissible surface for secondary content, with a header, title and description.
|
|
156
|
-
- **`record-peek`** — A record opened beside its list: non-modal, resizable, ↑/↓ J/K walk, ⌘↵ full page.
|
|
157
151
|
- **`responsive-dialog`** — One overlay API that is a centred Dialog from 768px up and a bottom Sheet with a drag handle and a safe-area footer below it — the same header, body and footer in both.
|
|
158
152
|
- **`share-dialog`** — Share one item — invite people and teams with one access level, people with access and why, the item's space access, and a view-only public link behind a Publish switch; a Dialog on wide screens, a bottom Sheet on phones.
|
|
159
|
-
- **`sheet`** — A panel that slides in from any edge — Dialog semantics with a side, a header and a footer; opens onto the first field, never the close
|
|
153
|
+
- **`sheet`** — A panel that slides in from any edge — Dialog semantics with a side, a header and a footer; opens onto the first field, never the close ×.
|
|
160
154
|
- **`shortcut-overlay`** — The ?-triggered dialog listing keyboard shortcuts, rendered from a declaration registry (keys, label, category, when) — grouped, filterable, platform-aware via use-platform + Kbd.
|
|
161
155
|
- **`suggestion-menu`** — The caret-anchored list an editor opens while you type a trigger (@, /, {{) — shared by TextEdit's slash and mention menus and TemplateEditor's placeholder picker — with rows that read exactly like ComboboxItem's, optional group headings, a status for empty, loading and error, a viewport flip, and one active index the editor's arrow keys and the pointer move.
|
|
162
156
|
- **`tooltip`** — A floating label on hover or focus, portaled inside the theme scope (OVL-13).
|
|
@@ -167,7 +161,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
167
161
|
- **`breadcrumb-cascade`** — Two additions to a breadcrumb trail for a file browser: BreadcrumbDropTarget, a crumb that takes rows dragged from a DataList, and BreadcrumbSiblings, a menu of a segment's siblings.
|
|
168
162
|
- **`command`** — A searchable command palette — filtered, grouped items with keyboard navigation, optionally inside a ⌘K dialog.
|
|
169
163
|
- **`folder-tree`** — A Notion-style navigation tree for a file library — sections of folders, pages and files; folders that load their children on first open with loading, error, empty and Show all rows; one tab stop with tree arrow keys and typeahead; a ⋯ menu per row; pointer drag into a folder or section; and a folders-only picker mode for Move dialogs.
|
|
170
|
-
- **`help-menu`** — The
|
|
164
|
+
- **`help-menu`** — The Help menu behind the shell rail's Help item — What's new (an unread dot), Docs, Keyboard shortcuts and Contact support, and the build version. Links render through your router's link.
|
|
171
165
|
- **`link-provider`** — One rule for every link, set once at the app root: an in-app link opens in place through the host router, a modified click stays the browser's, another origin opens a new tab.
|
|
172
166
|
- **`menubar`** — A persistent horizontal bar of menus — application-style File / Edit / View navigation.
|
|
173
167
|
- **`multi-step-form`** — A guarded, branching flow around a Stepper — conditional steps, sync and async advance guards, locking, reachability-derived deep links and resume, and a phone layout chosen from the same predicate. Owns no fields and no validator.
|
|
@@ -175,8 +169,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
175
169
|
- **`page-header`** — The standardized header at the top of a page — back button, breadcrumb trail, title, description, actions, secondary menu, and a favorite star — plus SectionHeading for in-page section titles (sm and md sizes, a muted eyebrow variant, trailing actions).
|
|
176
170
|
- **`pagination`** — Page navigation — previous/next, numbered page links, an ellipsis for long ranges, and the active page.
|
|
177
171
|
- **`route-tabs`** — Tabs whose panels are pages — a named nav of links drawn as the pill tabs, one URL per tab, with counts, an optimistic current tab while the next page loads, a panel that dims meanwhile, and a sideways-scrolling strip that keeps the current tab in view.
|
|
178
|
-
- **`sidebar`** — A collapsible app navigation rail — header/content/footer, labelled groups, menu items with active and open (menu-trigger) states, and an expand/collapse trigger.
|
|
179
|
-
- **`sidebar-menu-flyout`** — A sidebar row whose entries open in a menu beside it on hover or press — nested lists such as Spaces in the collapsed icon rail, with the row's count kept in sight.
|
|
180
172
|
- **`stepper`** — A bounded linear process as an ordered list — seven step states on a numbered rail that fills in behind you, aria-current=step, orientation chosen from the step count, and a compact summary below a container width.
|
|
181
173
|
- **`table-of-contents`** — The “On this page” outline of a long document — links to its headings with the one the reader has reached marked by a scroll spy; an always-labelled list, a rail of ticks that opens on hover or focus, or a left Sheet from a trigger on narrow screens. Exports useActiveHeading for custom outlines.
|
|
182
174
|
- **`tabs`** — Layered content sections — default (segmented) or line variants, compact size, optional leading icons and counts, horizontal or vertical, full keyboard navigation. Toolbar switches use default Tabs for scope (My tasks | Team tasks); a list's List/Board/Grid switch is ListToolbar's Layout tool. The one component that keeps a focus ring.
|
|
@@ -194,16 +186,14 @@ starts with `icon-` is a component and never an icon.
|
|
|
194
186
|
|
|
195
187
|
## Layout
|
|
196
188
|
|
|
197
|
-
- **`app-shell`** — The shared dashboard layout — a skip-linked sidebar + header + scrollable main region, composing Sidebar/SidebarTrigger into one reusable, hash-tracked shell.
|
|
198
189
|
- **`aspect-ratio`** — Constrains its children to a given width-to-height ratio.
|
|
199
190
|
- **`board`** — Kanban lanes — full-height lanes that scroll their cards inside, sticky headers with a collapse button left of the ⋯ menu, a subtle top-down fade on each lane, + Add after the last card (the empty lane's action when it has none), Nothing here / Drop here empty zones, per-lane skeletons and load-on-scroll paging; live pointer and touch drag (lift, make room, settle, edge auto-scroll), a keyboard pick-up/move/drop model, a per-card ⋯ menu of the card's own actions, optimistic moves with rollback and a toast, and one lane at a time on a phone.
|
|
200
191
|
- **`direction`** — Base UI's DirectionProvider and useDirection — the text-direction context components read.
|
|
201
192
|
- **`document-layout`** — A page read as a document — the title area and its meta lines, a fluid text column, what follows it, a contents rail before it and a comment margin after it — on one grid with five tiers by its own width, plus its skeleton and a tier hook.
|
|
202
|
-
- **`record-layout`** — A record page's main column
|
|
193
|
+
- **`record-layout`** — A record page's one main column — title, status, tabs and their panels; its details open in the shell panel.
|
|
203
194
|
- **`resizable`** — Accessible resizable panel groups and layouts with keyboard support — horizontal or vertical, nestable, with an optional visible grip.
|
|
204
195
|
- **`scroll-area`** — Augments native scroll functionality for custom, cross-browser styling — a viewport, an auto-hiding scrollbar, and a corner.
|
|
205
196
|
- **`separator`** — A thin rule dividing content — horizontal or vertical, built on Base UI.
|
|
206
|
-
- **`settings-layout`** — The two-pane Settings frame — a 220px sticky section nav with current-page marking and counts, and one 960px content column where forms cap at 720px left-aligned and lists fill; on a phone the nav is the first screen and pages push in with a back link.
|
|
207
197
|
- **`settings-row`** — A borders-only settings layout — titled sections, bordered cards, label-plus-control rows whose controls share one width and right edge (controlSize), and a settings × channels switch matrix with its column names once.
|
|
208
198
|
- **`shell`** — The frame every screen sits in — a 64px labelled module rail, the module's resizable column, a 48px top bar with fixed slots, the page, a right panel slot and a phone bottom bar — laid out in CSS before hydration by one rule: the panel docks beside the page while the page keeps its minimum width, else the column folds, else the panel slides over.
|
|
209
199
|
- **`shell-panel`** — The shell's one right-hand panel: a 48px head of tabs (preview, pinned, dots, reorder, menu, overflow), bodies kept alive, a resizable edge, the Escape rule.
|
|
@@ -215,14 +205,12 @@ starts with `icon-` is a component and never an icon.
|
|
|
215
205
|
- **`file-viewer`** — A full-screen dark overlay for stored files — images with a blur-up, zoom and pan; PDFs rendered page by page with a lazily loaded pdf.js over range requests; video and audio in the system players; the first megabyte of text, CSV (a table) and Markdown; Excel workbooks (sheet tabs, the first 500 rows) and Word documents, read by lazily loaded SheetJS and mammoth; app-parsed previews through loadPreview; a file card with a thumbnail and Download for everything else — paged with arrows, side buttons or a swipe — as a full-screen overlay or in place as a file's page, with Share/Watch/menu header slots and a Details · Comments · Activity rail (a bottom sheet on a phone).
|
|
216
206
|
- **`image`** — A presentational framed image with aspect-ratio, rounding, a loading skeleton, and an error fallback.
|
|
217
207
|
- **`inbox`** — The notification Inbox: frame with header actions, For you · Updates · Archived tabs, sticky day groups, full-bleed rows grouped per record (stacked actors, a count that expands to the events), inline Allow / Decline or an answered line, J / K triage with an active row driving a peek, a fixed right column with the time over the hover actions (read toggle and menu), and empty, loading and error states.
|
|
218
|
-
- **`level-meter`** — A segmented live input-level meter for a recording — Web Audio RMS from a MediaStream, or a level you drive — with warning and clipping zones.
|
|
219
208
|
- **`media-player-controls`** — The shared media transport — play/pause, skip, seek, elapsed/duration, mute + volume, playback speed, and one keyboard shortcut map (useMediaShortcuts) — composed by Audio Player and Video Player.
|
|
220
|
-
- **`notification-
|
|
209
|
+
- **`notification-dot`** — The one unread dot: an 8px solid circle, decorative, for unread rows, inbox items and nav items.
|
|
221
210
|
- **`video-player`** — A framed video player with the same grouped custom transport controls as Audio Player — a poster, no autoplay, a "can't play" card with Download, and onSourceExpired to renew an expired signed URL.
|
|
222
211
|
|
|
223
212
|
## Rich text
|
|
224
213
|
|
|
225
|
-
- **`formula-input`** — A calculated field's formula on one line — `{` inserts field chips, * and / read as × and ÷, the first row's result under it and the formula's error in its place.
|
|
226
214
|
- **`template-editor`** — A plain-paragraph editor for text with placeholders: typing @ or {{ opens a searchable list of tokens, the one picked becomes an atomic inline chip, and the value is plain text with {{id}} tokens; optional single-line mode and as-you-type replacements for formulas.
|
|
227
215
|
- **`text-edit`** — A Tiptap-based, markdown-first rich-text editor with no toolbar and no fill — caret-only as a document, or boxed with a subtle focus border: a slash menu for blocks, a bubble menu for marks and block types, GFM tables with a menu and drag grips, block drag handles, callouts and toggles, @ mentions, image and file uploads, a heading outline, comment highlights, portaled menus, and one onCommit path.
|
|
228
216
|
|
|
@@ -280,15 +268,12 @@ starts with `icon-` is a component and never an icon.
|
|
|
280
268
|
|
|
281
269
|
## Marketing
|
|
282
270
|
|
|
283
|
-
- **`announcement-banner`** — A dismissible one-line announcement — the full-width inverse page-top band (in-content notices use Alert variant=strip).
|
|
284
271
|
- **`terminal`** — A dark mono command block with a phosphor prompt glyph and a composed copy button.
|
|
285
272
|
|
|
286
273
|
## forms
|
|
287
274
|
|
|
288
275
|
- **`avatar-picker`** — A person's avatar that opens a dialog to upload, change or remove their photo — the file is staged in a 128px drop circle and saved only on Update.
|
|
289
276
|
- **`destination-picker`** — Choose where something goes — spaces, their folders, recents, search, refusals with a reason.
|
|
290
|
-
- **`field-type-link-step`** — The "Links to" step of FieldTypePicker — grouped kinds of record, each with one line on what a link to it does, and a table choice for a kind that lives in a table (Rows).
|
|
291
277
|
- **`field-type-picker`** — A searchable, grouped list of field types with icons, and an optional second step.
|
|
292
278
|
- **`record-picker`** — Pick records of the kinds the app passes in — search, kind filter, recents, folder browsing, refused rows — in a popover or a dialog.
|
|
293
|
-
- **`upload-dialog`** — The "Add files" modal: a drop zone and the staged files (thumbnail or icon, name, size, remove), then an optional per-file details view the host renders, and Add. It stages files only; the host uploads them.
|
|
294
279
|
- **`upload-panel`** — The uploads card pinned bottom-end: a header naming the batch with time left, file and folder rows with progress rings, failures with Retry, interrupted rows with Choose file and destination links, a done card that dismisses itself, a confirm before cancelling, and a bottom sheet on phones. Controlled; the host engine uploads.
|