@vegastack/design 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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.0",
|
|
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,7 +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
|
|
112
|
+
- **The user menu is one standard**: the footer trigger shows avatar, name
|
|
114
113
|
and role; the menu header repeats avatar + name with the email instead of the role; then Profile
|
|
115
114
|
and Settings, a Theme `DropdownMenuSub` whose `DropdownMenuRadioGroup` (Light · Dark · System, with
|
|
116
115
|
Sun · Moon · Monitor icons) is bound to `theme`/`setTheme` from `useVegaStackTheme()`, Keyboard
|
|
@@ -151,7 +150,7 @@ A component's name undersells it. Before composing something by hand, check this
|
|
|
151
150
|
|
|
152
151
|
### Which component for X
|
|
153
152
|
|
|
154
|
-
- **A page** → `
|
|
153
|
+
- **A page** → `Shell` › `ShellMain` › `ShellPage` (`size`: `prose` for forms and
|
|
155
154
|
settings, `default` for lists and record pages, `full` for boards and canvases — picked per route
|
|
156
155
|
from one `definePageWidths` map, never a `max-w-*` or padding class; see
|
|
157
156
|
<https://design.vegastack.com/docs/foundations/page-layout>) › `PageHeader` › `ListToolbar` (with its `FilterRow`) › `DataList` (or
|
|
@@ -217,8 +216,8 @@ source })}` — never a hand-rolled card. The board fills the viewport below the
|
|
|
217
216
|
A block is a page you copy once and then own (`shadcn add @vegastack/<name>`). Start from the
|
|
218
217
|
closest one rather than composing the page from nothing:
|
|
219
218
|
|
|
220
|
-
- **`
|
|
221
|
-
|
|
219
|
+
- **`shell-01`** — the shell: the module rail, a column, the top bar, a list, and a record opening
|
|
220
|
+
in the panel beside it.
|
|
222
221
|
- **`list-page-01`** — one kind of record: a `DataList` with a `ListToolbar` (search, a `FilterRow`
|
|
223
222
|
of facets, the Grid | List Layout tool), Mine | Team scope tabs, grouped by industry, Load more and three
|
|
224
223
|
empty tiers.
|
|
@@ -280,7 +279,7 @@ opaque `hover:bg-muted`/`hover:bg-accent` (lint rejects it):
|
|
|
280
279
|
```
|
|
281
280
|
|
|
282
281
|
Keyboard focus is base.css's soft info-hue tint (`--state-focus`), never restated. Text entry
|
|
283
|
-
already shows hover (darker border), focus (`
|
|
282
|
+
already shows hover (darker border), focus (`input-focus` border, no ring or glow) and read-only
|
|
284
283
|
(`readonly` fill) in the DS components. A list of rows inside a card is `ItemGroup variant="flush"`
|
|
285
284
|
(fills sit 8px inside the card); never hand-write `-mx-*` for it.
|
|
286
285
|
|
|
@@ -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
|
+
**225 components**, plus 467 animated-icon items, 17 hooks (`use-animation-replay`, `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`) — 816 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
|
|
@@ -16,6 +16,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
16
16
|
- **`copy-button`** — Copy a value to the clipboard with transient check feedback — a ghost icon button that swaps Copy → Check and fires onCopied.
|
|
17
17
|
- **`toggle`** — A two-state button that can be pressed on or off, with a loading state (API-5).
|
|
18
18
|
- **`toggle-group`** — Toggle buttons sharing one selection — single or multiple, horizontal or vertical.
|
|
19
|
+
- **`tool-group`** — A run of icon tools — 28px ghost icon buttons two pixels apart, each named by its tooltip, with ⋯ as the one More.
|
|
19
20
|
|
|
20
21
|
## Form
|
|
21
22
|
|
|
@@ -27,7 +28,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
27
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.
|
|
28
29
|
- **`color-picker`** — A swatch-triggered popover presenting a grid of preset colors — pick one, fire onValueChange, mark the selection.
|
|
29
30
|
- **`combobox`** — A filterable listbox behind a text input — grouped items, an announced empty state and a chips mode.
|
|
30
|
-
- **`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.
|
|
31
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.
|
|
32
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.
|
|
33
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.
|
|
@@ -47,7 +47,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
47
47
|
- **`radio-group`** — Mutually-exclusive options with arrow-key navigation and a 24px invisible hit area (A11Y-2).
|
|
48
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.
|
|
49
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.
|
|
50
|
-
- **`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.
|
|
51
50
|
- **`search-input`** — A token-safe search field with a consistent clear action and controlled or uncontrolled native input semantics.
|
|
52
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.
|
|
53
52
|
- **`select`** — A dropdown for one value — trigger, grouped scrollable popup and item-aligned positioning.
|
|
@@ -76,7 +75,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
76
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.
|
|
77
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.
|
|
78
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.
|
|
79
|
-
- **`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.
|
|
80
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.
|
|
81
79
|
- **`record-header`** — One head for every record, on its page and in a peek.
|
|
82
80
|
- **`stat`** — A labelled value block — muted label over a value, honest faint empty state, optional delta line. Two scales.
|
|
@@ -88,7 +86,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
88
86
|
## Data display
|
|
89
87
|
|
|
90
88
|
- **`accordion`** — A vertically stacked set of interactive headings that each reveal a section of content — one open at a time, or several.
|
|
91
|
-
- **`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.
|
|
92
89
|
- **`avatar`** — A circular user or entity image with a fallback, a badge, and an overlapping group.
|
|
93
90
|
- **`badge`** — A compact label or status chip — upstream's six variants plus our four status tones (COL-12).
|
|
94
91
|
- **`card`** — A content surface with composable header, content, footer and action parts.
|
|
@@ -105,7 +102,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
105
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.
|
|
106
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.
|
|
107
104
|
- **`table`** — A responsive table component — caption, header, body, footer, row, head and cell parts over semantic table markup.
|
|
108
|
-
- **`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.
|
|
109
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.
|
|
110
106
|
|
|
111
107
|
## Data
|
|
@@ -116,6 +112,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
116
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.
|
|
117
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.
|
|
118
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.
|
|
119
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.
|
|
120
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.
|
|
121
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.
|
|
@@ -137,7 +134,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
137
134
|
|
|
138
135
|
## Overlay
|
|
139
136
|
|
|
140
|
-
- **`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.
|
|
141
137
|
- **`alert-dialog`** — A modal that interrupts for a decision — an optional media slot, two sizes and an action/cancel footer.
|
|
142
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.
|
|
143
139
|
- **`context-menu`** — The same menu vocabulary opened by right-click, positioned at the pointer.
|
|
@@ -152,7 +148,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
152
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.
|
|
153
149
|
- **`picker-panel`** — A searchable, selectable item in an internal picker panel.
|
|
154
150
|
- **`popover`** — An anchored, dismissible surface for secondary content, with a header, title and description.
|
|
155
|
-
- **`record-peek`** — A record opened beside its list: non-modal, resizable, ↑/↓ J/K walk, ⌘↵ full page.
|
|
156
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.
|
|
157
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.
|
|
158
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 ×; a left sheet can dock beside the sidebar rail (beside).
|
|
@@ -175,7 +170,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
175
170
|
- **`pagination`** — Page navigation — previous/next, numbered page links, an ellipsis for long ranges, and the active page.
|
|
176
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.
|
|
177
172
|
- **`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.
|
|
178
|
-
- **`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.
|
|
179
173
|
- **`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.
|
|
180
174
|
- **`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.
|
|
181
175
|
- **`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.
|
|
@@ -193,7 +187,6 @@ starts with `icon-` is a component and never an icon.
|
|
|
193
187
|
|
|
194
188
|
## Layout
|
|
195
189
|
|
|
196
|
-
- **`app-shell`** — The shared dashboard layout — a skip-linked sidebar + header + scrollable main region, composing Sidebar/SidebarTrigger into one reusable, hash-tracked shell.
|
|
197
190
|
- **`aspect-ratio`** — Constrains its children to a given width-to-height ratio.
|
|
198
191
|
- **`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.
|
|
199
192
|
- **`direction`** — Base UI's DirectionProvider and useDirection — the text-direction context components read.
|
|
@@ -202,8 +195,9 @@ starts with `icon-` is a component and never an icon.
|
|
|
202
195
|
- **`resizable`** — Accessible resizable panel groups and layouts with keyboard support — horizontal or vertical, nestable, with an optional visible grip.
|
|
203
196
|
- **`scroll-area`** — Augments native scroll functionality for custom, cross-browser styling — a viewport, an auto-hiding scrollbar, and a corner.
|
|
204
197
|
- **`separator`** — A thin rule dividing content — horizontal or vertical, built on Base UI.
|
|
205
|
-
- **`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.
|
|
206
198
|
- **`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.
|
|
199
|
+
- **`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.
|
|
200
|
+
- **`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.
|
|
207
201
|
|
|
208
202
|
## Media
|
|
209
203
|
|
|
@@ -212,14 +206,12 @@ starts with `icon-` is a component and never an icon.
|
|
|
212
206
|
- **`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).
|
|
213
207
|
- **`image`** — A presentational framed image with aspect-ratio, rounding, a loading skeleton, and an error fallback.
|
|
214
208
|
- **`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.
|
|
215
|
-
- **`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.
|
|
216
209
|
- **`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.
|
|
217
210
|
- **`notification-bell`** — A bell icon button with an unread-count badge overlay, plus the shared NotificationDot unread marker. Presentational — the app supplies the count.
|
|
218
211
|
- **`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.
|
|
219
212
|
|
|
220
213
|
## Rich text
|
|
221
214
|
|
|
222
|
-
- **`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.
|
|
223
215
|
- **`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.
|
|
224
216
|
- **`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.
|
|
225
217
|
|
|
@@ -257,6 +249,7 @@ starts with `icon-` is a component and never an icon.
|
|
|
257
249
|
- **`request-card`** — One card for every question an agent asks before it acts — Allow once · Always allow (one step wider from its menu) · Decline (with a note, or Never allow this) — its settled line in the same words on every channel, and What I've allowed with uses and Revoke.
|
|
258
250
|
- **`resource-pill`** — The person's own thing in an answer — its type icon and real title as an inline chip — never a numbered source.
|
|
259
251
|
- **`run-usage`** — What one agent run used: a chip under the answer (steps, context, cache, optional money), a panel by model with cache per step and Subagents, and a table with one row per model call.
|
|
252
|
+
- **`shell-assistant`** — The floating "Ask {name}" pill at the page area's corner and the compact assistant card it opens.
|
|
260
253
|
- **`source-list`** — The web pages an answer cites: a quiet Sources fold of one-line numbered rows, the citation card and the MarkdownView wiring.
|
|
261
254
|
- **`status-glyph`** — One glyph per state in agent UI: ✓ done in the blue accent, ◌ not started, ◐ running (still), ⊘ skipped, ✗ failed, ⚠ needs you.
|
|
262
255
|
- **`suggestion-card`** — An agent offers one person a next step, in a card only they see: items with optional ticks, the host's own buttons, a menu, a footnote, its outcomes and a compact row.
|
|
@@ -276,15 +269,12 @@ starts with `icon-` is a component and never an icon.
|
|
|
276
269
|
|
|
277
270
|
## Marketing
|
|
278
271
|
|
|
279
|
-
- **`announcement-banner`** — A dismissible one-line announcement — the full-width inverse page-top band (in-content notices use Alert variant=strip).
|
|
280
272
|
- **`terminal`** — A dark mono command block with a phosphor prompt glyph and a composed copy button.
|
|
281
273
|
|
|
282
274
|
## forms
|
|
283
275
|
|
|
284
276
|
- **`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.
|
|
285
277
|
- **`destination-picker`** — Choose where something goes — spaces, their folders, recents, search, refusals with a reason.
|
|
286
|
-
- **`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).
|
|
287
278
|
- **`field-type-picker`** — A searchable, grouped list of field types with icons, and an optional second step.
|
|
288
279
|
- **`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.
|
|
289
|
-
- **`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.
|
|
290
280
|
- **`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.
|