@nadicodeai/ui 12.1.176 → 12.1.177
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/dist/components/catalog-categories.d.ts +9 -0
- package/dist/components/catalog-categories.d.ts.map +1 -0
- package/dist/components/catalog-categories.js +36 -0
- package/dist/components/catalog-category.d.ts +16 -0
- package/dist/components/catalog-category.d.ts.map +1 -0
- package/dist/components/catalog-category.js +40 -0
- package/dist/components/catalog-entry.d.ts +1 -1
- package/dist/components/catalog-row.d.ts +61 -0
- package/dist/components/catalog-row.d.ts.map +1 -0
- package/dist/components/catalog-row.js +86 -0
- package/dist/components/collection-page.d.ts +1 -1
- package/dist/components/collection-page.d.ts.map +1 -1
- package/dist/components/collection-page.js +6 -3
- package/dist/components/identity-mark.d.ts +2 -2
- package/dist/components/identity-mark.d.ts.map +1 -1
- package/dist/components/identity-mark.js +1 -2
- package/dist/components/page-actions.d.ts +9 -1
- package/dist/components/page-actions.d.ts.map +1 -1
- package/dist/components/page-actions.js +12 -5
- package/dist/components/page-header.d.ts +6 -1
- package/dist/components/page-header.d.ts.map +1 -1
- package/dist/components/page-header.js +4 -1
- package/dist/components/record-list.d.ts +1 -1
- package/dist/components/record-list.d.ts.map +1 -1
- package/dist/components/record-list.js +7 -2
- package/dist/components/tag.d.ts +9 -4
- package/dist/components/tag.d.ts.map +1 -1
- package/dist/components/tag.js +24 -4
- package/dist/showcase/specimens/compositions.d.ts +2 -0
- package/dist/showcase/specimens/compositions.d.ts.map +1 -1
- package/dist/showcase/specimens/compositions.js +36 -1
- package/dist/showcase/specimens/index.d.ts +2 -0
- package/dist/showcase/specimens/index.d.ts.map +1 -1
- package/dist/showcase/specimens/status.d.ts +1 -0
- package/dist/showcase/specimens/status.d.ts.map +1 -1
- package/dist/showcase/specimens/status.js +2 -0
- package/dist/showcase/usage.generated.d.ts +1 -1
- package/dist/showcase/usage.generated.d.ts.map +1 -1
- package/dist/showcase/usage.generated.js +26 -4
- package/package.json +2 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CatalogIconName } from "./catalog-icons.js";
|
|
2
|
+
/** The categories a hub card names, in the order a filter offers them. */
|
|
3
|
+
export declare const CATALOG_CATEGORIES: readonly ["sales", "finance", "office", "email", "calendar", "documents", "people", "legal", "messaging", "voice", "web", "other"];
|
|
4
|
+
export type CatalogCategory = (typeof CATALOG_CATEGORIES)[number];
|
|
5
|
+
/** Whether a word a hub card wrote is one of the categories, so a card read without the Portal's check draws no label it does not know. */
|
|
6
|
+
export declare function isCatalogCategory(value: string | null | undefined): value is CatalogCategory;
|
|
7
|
+
/** The icon a category names, or null for one with none of its own ("other"). */
|
|
8
|
+
export declare function categoryIconName(category: CatalogCategory): CatalogIconName | null;
|
|
9
|
+
//# sourceMappingURL=catalog-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-categories.d.ts","sourceRoot":"","sources":["../../src/components/catalog-categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,0EAA0E;AAC1E,eAAO,MAAM,kBAAkB,oIAarB,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAElE,2IAA2I;AAC3I,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,eAAe,CAE5F;AAgBD,iFAAiF;AACjF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,eAAe,GAAG,IAAI,CAElF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** The categories a hub card names, in the order a filter offers them. */
|
|
2
|
+
export const CATALOG_CATEGORIES = [
|
|
3
|
+
"sales",
|
|
4
|
+
"finance",
|
|
5
|
+
"office",
|
|
6
|
+
"email",
|
|
7
|
+
"calendar",
|
|
8
|
+
"documents",
|
|
9
|
+
"people",
|
|
10
|
+
"legal",
|
|
11
|
+
"messaging",
|
|
12
|
+
"voice",
|
|
13
|
+
"web",
|
|
14
|
+
"other",
|
|
15
|
+
];
|
|
16
|
+
/** Whether a word a hub card wrote is one of the categories, so a card read without the Portal's check draws no label it does not know. */
|
|
17
|
+
export function isCatalogCategory(value) {
|
|
18
|
+
return CATALOG_CATEGORIES.some((category) => category === value);
|
|
19
|
+
}
|
|
20
|
+
const CATEGORY_ICON = {
|
|
21
|
+
sales: "briefcase",
|
|
22
|
+
finance: "receipt",
|
|
23
|
+
office: "list-checks",
|
|
24
|
+
email: "mail",
|
|
25
|
+
calendar: "calendar",
|
|
26
|
+
documents: "file-text",
|
|
27
|
+
people: "users",
|
|
28
|
+
legal: "scale",
|
|
29
|
+
messaging: "message-circle",
|
|
30
|
+
voice: "mic",
|
|
31
|
+
web: "globe",
|
|
32
|
+
};
|
|
33
|
+
/** The icon a category names, or null for one with none of its own ("other"). */
|
|
34
|
+
export function categoryIconName(category) {
|
|
35
|
+
return CATEGORY_ICON[category] ?? null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type CatalogCategory } from "./catalog-categories.js";
|
|
2
|
+
/**
|
|
3
|
+
* A skill's or a plugin's category, as the label on its row.
|
|
4
|
+
*
|
|
5
|
+
* @family Status
|
|
6
|
+
* @when The category a hub card names, on every row that shows a skill or a plugin: the Portal's Library and an Agent's Skills and Plugins, and Nadia's Edit Agent and company skills, so one category reads the same everywhere.
|
|
7
|
+
* @instead A state is a `StatusBadge`; another categorical fact, such as who it is for, is a `Tag` of its own.
|
|
8
|
+
* @behaviour A vivid `Tag` in the category's own tone with the category's icon, the same pair on every surface: sales and web blue, finance green, office purple, email and messaging teal, calendar orange, documents yellow, people and voice pink, legal red, other neutral with no icon.
|
|
9
|
+
* @words The category's name in the product's language, as its filter writes it: "Finance".
|
|
10
|
+
* @access Text; the icon is decorative.
|
|
11
|
+
*/
|
|
12
|
+
export declare function CategoryTag({ category, label }: {
|
|
13
|
+
category: CatalogCategory;
|
|
14
|
+
label: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=catalog-category.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-category.d.ts","sourceRoot":"","sources":["../../src/components/catalog-category.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,eAAe,EAErB,MAAM,iCAAiC,CAAC;AA2BzC;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;IAAE,QAAQ,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,+BAO5F"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CATALOG_CATEGORIES, categoryIconName, } from "./catalog-categories.js";
|
|
3
|
+
import { catalogIcon } from "./catalog-entry.js";
|
|
4
|
+
import { Tag } from "./tag.js";
|
|
5
|
+
const CATEGORY_TONE = {
|
|
6
|
+
sales: "blue",
|
|
7
|
+
finance: "green",
|
|
8
|
+
office: "purple",
|
|
9
|
+
email: "teal",
|
|
10
|
+
calendar: "orange",
|
|
11
|
+
documents: "yellow",
|
|
12
|
+
people: "pink",
|
|
13
|
+
legal: "red",
|
|
14
|
+
messaging: "teal",
|
|
15
|
+
voice: "pink",
|
|
16
|
+
web: "blue",
|
|
17
|
+
other: "neutral",
|
|
18
|
+
};
|
|
19
|
+
const CATEGORY_MARK = {};
|
|
20
|
+
for (const category of CATALOG_CATEGORIES) {
|
|
21
|
+
const icon = categoryIconName(category);
|
|
22
|
+
if (!icon)
|
|
23
|
+
continue;
|
|
24
|
+
const Icon = catalogIcon(icon, "skill");
|
|
25
|
+
CATEGORY_MARK[category] = _jsx(Icon, { "aria-hidden": "true" });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A skill's or a plugin's category, as the label on its row.
|
|
29
|
+
*
|
|
30
|
+
* @family Status
|
|
31
|
+
* @when The category a hub card names, on every row that shows a skill or a plugin: the Portal's Library and an Agent's Skills and Plugins, and Nadia's Edit Agent and company skills, so one category reads the same everywhere.
|
|
32
|
+
* @instead A state is a `StatusBadge`; another categorical fact, such as who it is for, is a `Tag` of its own.
|
|
33
|
+
* @behaviour A vivid `Tag` in the category's own tone with the category's icon, the same pair on every surface: sales and web blue, finance green, office purple, email and messaging teal, calendar orange, documents yellow, people and voice pink, legal red, other neutral with no icon.
|
|
34
|
+
* @words The category's name in the product's language, as its filter writes it: "Finance".
|
|
35
|
+
* @access Text; the icon is decorative.
|
|
36
|
+
*/
|
|
37
|
+
export function CategoryTag({ category, label }) {
|
|
38
|
+
const mark = CATEGORY_MARK[category];
|
|
39
|
+
return (_jsx(Tag, { ...(mark ? { mark } : {}), tone: CATEGORY_TONE[category], vivid: true, children: label }));
|
|
40
|
+
}
|
|
@@ -24,7 +24,7 @@ export type CatalogEntryAdd = PageCommand & {
|
|
|
24
24
|
* @family Data
|
|
25
25
|
* @when A reusable thing a person can add: a skill, a plugin or an app, on a Library shelf (`LibraryShelf`) or in the drawer that adds one to an Agent (`CatalogDrawer`).
|
|
26
26
|
* @instead A record the person already holds is a row of its collection (`CollectionPage`). An Agent template is its `AgentCard`. Figures compared across entries are a `DataTable`.
|
|
27
|
-
* @behaviour The kind's tile at 40: a skill's own icon on the neutral ringed tile,
|
|
27
|
+
* @behaviour The kind's tile at 40: a skill's or a plugin's own icon on the neutral ringed tile, an app's own logo. The name is the link to its own page. One Add control, outline with a leading plus; once held, a muted check and `added`'s word take its place. A menu of one command that is not destructive, with no Add, is that command's outline button; otherwise the three dots. A failed or refused add puts its message in the line's place, with its retry before the entry's own controls.
|
|
28
28
|
* @words The name as the catalogue gives it; one line saying what it does, a sentence: "Classifies incoming requests and prepares the next step." The control is a verb: "Add".
|
|
29
29
|
* @access The tile is decorative; the name is the link's text. A failed add's message is announced as an alert.
|
|
30
30
|
*/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type CatalogCategory } from "./catalog-categories.js";
|
|
2
|
+
import type { CollectionFilterCopy, CollectionFiltersProps } from "./collection-filters.js";
|
|
3
|
+
import type { RecordFact, RecordFacts, RecordName } from "./record-list.js";
|
|
4
|
+
/** What a skill, a plugin or an MCP server is drawn from: the facts its screen reads, never how they are laid out. */
|
|
5
|
+
export type CatalogRow = {
|
|
6
|
+
name: string;
|
|
7
|
+
/** What it does, as its catalog card says it, or what it is (a server's address); left out when nothing says it. */
|
|
8
|
+
detail?: string | undefined;
|
|
9
|
+
/** The icon its catalog card names; none draws its kind's own. A server always draws the server icon. */
|
|
10
|
+
icon?: string | null | undefined;
|
|
11
|
+
/** The category its catalog card names; none draws no label. */
|
|
12
|
+
category?: CatalogCategory | null | undefined;
|
|
13
|
+
/** Where it came from, in the product's words: "From the Library", "Added in Nadia". */
|
|
14
|
+
source: string;
|
|
15
|
+
};
|
|
16
|
+
export type CatalogRowKind = "skill" | "plugin" | "server";
|
|
17
|
+
/** The product's words for the row's columns and its category filter. */
|
|
18
|
+
export type CatalogRowWords = {
|
|
19
|
+
category: string;
|
|
20
|
+
allCategories: string;
|
|
21
|
+
categoryName: (category: CatalogCategory) => string;
|
|
22
|
+
source: string;
|
|
23
|
+
filter: CollectionFilterCopy;
|
|
24
|
+
};
|
|
25
|
+
/** The shared row's parts a screen spreads into its `CollectionPage`. */
|
|
26
|
+
export type CatalogRows<TRecord> = {
|
|
27
|
+
list: {
|
|
28
|
+
name: (record: TRecord) => RecordName;
|
|
29
|
+
facts: RecordFacts<TRecord>;
|
|
30
|
+
wraps: true;
|
|
31
|
+
};
|
|
32
|
+
filters: CollectionFiltersProps | undefined;
|
|
33
|
+
keep: (rows: readonly TRecord[]) => TRecord[];
|
|
34
|
+
narrowed: boolean;
|
|
35
|
+
clear: () => void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* One row for every skill, plugin and MCP server a person meets, in the Portal's Library and an Agent's pages and in
|
|
39
|
+
* Nadia's Edit Agent and company skills: the screen says what each record is, this draws it, and the screen keeps its own
|
|
40
|
+
* commands, menu, status and editor.
|
|
41
|
+
*
|
|
42
|
+
* @family Compositions
|
|
43
|
+
* @when A `CollectionPage` of skills, plugins or MCP servers. The screen calls it with its records, what each one is
|
|
44
|
+
* (`CatalogRow`) and its words, spreads `list` into the page, passes `filters` as the page's filters and lists `keep`'s
|
|
45
|
+
* rows; a new screen of the same things gets the same row by the same call.
|
|
46
|
+
* @instead Any other record is the page's own `RecordList` row. The Library's add-from drawer is `CatalogDrawer`; a
|
|
47
|
+
* category on its own is `CategoryTag`.
|
|
48
|
+
* @behaviour The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the
|
|
49
|
+
* server icon for a server; the name; under it the detail, wrapping in full. Then two facts: the category label
|
|
50
|
+
* (`CategoryTag`), standing only while a row has a category, and where it came from, wrapping in full. The category filter stands after
|
|
51
|
+
* the search only while the rows hold more than one category; `keep` narrows rows to the chosen one, and a choice the
|
|
52
|
+
* rows no longer hold narrows nothing. `narrowed` says a category is chosen, for the page's no match, and `clear`
|
|
53
|
+
* unsets it.
|
|
54
|
+
* @words Every string is the product's: the source in the same words wherever it means the same ("From the Library",
|
|
55
|
+
* "Added in Nadia", "From the {plugin} plugin"), the category's name as its filter writes it.
|
|
56
|
+
* @access The columns are named by `words.category` and `words.source`; the category's icon is decorative.
|
|
57
|
+
*/
|
|
58
|
+
export declare function useCatalogRows<TRecord>(kind: CatalogRowKind, records: readonly TRecord[] | undefined, rowOf: (record: TRecord) => CatalogRow, words: CatalogRowWords,
|
|
59
|
+
/** One more column a screen owns after the source, such as which of the viewer's Agents have it. */
|
|
60
|
+
extra?: RecordFact<TRecord>): CatalogRows<TRecord>;
|
|
61
|
+
//# sourceMappingURL=catalog-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog-row.d.ts","s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S,OAAO,EAAE,KAAK,OAAO,EAAE,CAAC;IAC9C,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EACpC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,EACvC,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,UAAU,EACtC,KAAK,EAAE,eAAe;AACtB,oGAAoG;AACpG,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,GAC1B,WAAW,CAAC,OAAO,CAAC,CA0DtB"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Server } from "lucide-react";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { CATALOG_CATEGORIES } from "./catalog-categories.js";
|
|
6
|
+
import { CategoryTag } from "./catalog-category.js";
|
|
7
|
+
import { catalogIcon } from "./catalog-entry.js";
|
|
8
|
+
/**
|
|
9
|
+
* One row for every skill, plugin and MCP server a person meets, in the Portal's Library and an Agent's pages and in
|
|
10
|
+
* Nadia's Edit Agent and company skills: the screen says what each record is, this draws it, and the screen keeps its own
|
|
11
|
+
* commands, menu, status and editor.
|
|
12
|
+
*
|
|
13
|
+
* @family Compositions
|
|
14
|
+
* @when A `CollectionPage` of skills, plugins or MCP servers. The screen calls it with its records, what each one is
|
|
15
|
+
* (`CatalogRow`) and its words, spreads `list` into the page, passes `filters` as the page's filters and lists `keep`'s
|
|
16
|
+
* rows; a new screen of the same things gets the same row by the same call.
|
|
17
|
+
* @instead Any other record is the page's own `RecordList` row. The Library's add-from drawer is `CatalogDrawer`; a
|
|
18
|
+
* category on its own is `CategoryTag`.
|
|
19
|
+
* @behaviour The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the
|
|
20
|
+
* server icon for a server; the name; under it the detail, wrapping in full. Then two facts: the category label
|
|
21
|
+
* (`CategoryTag`), standing only while a row has a category, and where it came from, wrapping in full. The category filter stands after
|
|
22
|
+
* the search only while the rows hold more than one category; `keep` narrows rows to the chosen one, and a choice the
|
|
23
|
+
* rows no longer hold narrows nothing. `narrowed` says a category is chosen, for the page's no match, and `clear`
|
|
24
|
+
* unsets it.
|
|
25
|
+
* @words Every string is the product's: the source in the same words wherever it means the same ("From the Library",
|
|
26
|
+
* "Added in Nadia", "From the {plugin} plugin"), the category's name as its filter writes it.
|
|
27
|
+
* @access The columns are named by `words.category` and `words.source`; the category's icon is decorative.
|
|
28
|
+
*/
|
|
29
|
+
export function useCatalogRows(kind, records, rowOf, words,
|
|
30
|
+
/** One more column a screen owns after the source, such as which of the viewer's Agents have it. */
|
|
31
|
+
extra) {
|
|
32
|
+
const [category, setCategory] = useState("");
|
|
33
|
+
const held = CATALOG_CATEGORIES.filter((each) => records?.some((record) => rowOf(record).category === each) ?? false);
|
|
34
|
+
const chosen = held.find((each) => each === category) ?? "";
|
|
35
|
+
const narrowed = held.length > 1 && chosen !== "";
|
|
36
|
+
const filters = held.length > 1
|
|
37
|
+
? {
|
|
38
|
+
copy: words.filter,
|
|
39
|
+
facets: [
|
|
40
|
+
{
|
|
41
|
+
label: words.category,
|
|
42
|
+
allLabel: words.allCategories,
|
|
43
|
+
value: chosen,
|
|
44
|
+
onValueChange: setCategory,
|
|
45
|
+
options: held.map((value) => ({ value, label: words.categoryName(value) })),
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
}
|
|
49
|
+
: undefined;
|
|
50
|
+
const name = (record) => {
|
|
51
|
+
const row = rowOf(record);
|
|
52
|
+
const shown = {
|
|
53
|
+
name: row.name,
|
|
54
|
+
mark: { kind: "record", icon: kind === "server" ? Server : catalogIcon(row.icon, kind) },
|
|
55
|
+
};
|
|
56
|
+
if (row.detail)
|
|
57
|
+
shown.detail = row.detail;
|
|
58
|
+
return shown;
|
|
59
|
+
};
|
|
60
|
+
const shared = [
|
|
61
|
+
{
|
|
62
|
+
id: "category",
|
|
63
|
+
label: words.category,
|
|
64
|
+
of: (record) => {
|
|
65
|
+
const shown = rowOf(record).category;
|
|
66
|
+
return shown ? _jsx(CategoryTag, { category: shown, label: words.categoryName(shown) }) : null;
|
|
67
|
+
},
|
|
68
|
+
size: 168,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "source",
|
|
72
|
+
label: words.source,
|
|
73
|
+
of: (record) => rowOf(record).source,
|
|
74
|
+
size: 200,
|
|
75
|
+
wraps: true,
|
|
76
|
+
},
|
|
77
|
+
];
|
|
78
|
+
const facts = extra ? [...shared, extra] : shared;
|
|
79
|
+
return {
|
|
80
|
+
list: { name, facts, wraps: true },
|
|
81
|
+
filters,
|
|
82
|
+
keep: (rows) => narrowed ? rows.filter((row) => rowOf(row).category === chosen) : [...rows],
|
|
83
|
+
narrowed,
|
|
84
|
+
clear: () => setCategory(""),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -52,7 +52,7 @@ export type CollectionPageProps<TRecord extends RowData> = RecordListWithout<TRe
|
|
|
52
52
|
* Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
|
|
53
53
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
54
54
|
* Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.
|
|
55
|
-
* @behaviour With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.
|
|
55
|
+
* @behaviour Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.
|
|
56
56
|
* @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
|
|
57
57
|
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
58
58
|
* @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-page.d.ts","sourceRoot":"","sources":["../../src/components/collection-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,
|
|
1
|
+
{"version":3,"file":"collection-page.d.ts","sourceRoot":"","sources":["../../src/components/collection-page.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,SAA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BAAmB,CAAC;IAC3B,0DAA0D;IAC1D,cAAc,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACnC,iDAAiD;IACjD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,oGAAoG;IACpG,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,CAAC;AAEJ;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,+BA+D1F"}
|
|
@@ -4,7 +4,7 @@ import { CollectionFilters } from "./collection-filters.js";
|
|
|
4
4
|
import { CollectionSearch } from "./collection-search.js";
|
|
5
5
|
import { CollectionSort } from "./collection-sort.js";
|
|
6
6
|
import { CollectionToolbar } from "./collection-toolbar.js";
|
|
7
|
-
import { PageActions, PageActionsHostProvider, } from "./page-actions.js";
|
|
7
|
+
import { CardActionsRow, PageActions, PageActionsHostProvider, usePageTitled, } from "./page-actions.js";
|
|
8
8
|
import { PageHeader } from "./page-header.js";
|
|
9
9
|
import { RecordList } from "./record-list.js";
|
|
10
10
|
import { WaitingLine } from "./waiting-line.js";
|
|
@@ -20,7 +20,7 @@ import { CollectionRailColumn } from "../internal/collection-rail.js";
|
|
|
20
20
|
* Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.
|
|
21
21
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
22
22
|
* Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.
|
|
23
|
-
* @behaviour With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.
|
|
23
|
+
* @behaviour Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.
|
|
24
24
|
* @words “For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state)
|
|
25
25
|
* Ours: every string is the product's, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").
|
|
26
26
|
* @access “After an async filter change, wrap the region in `aria-live="polite"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state)
|
|
@@ -28,8 +28,11 @@ import { CollectionRailColumn } from "../internal/collection-rail.js";
|
|
|
28
28
|
*/
|
|
29
29
|
export function CollectionPage(props) {
|
|
30
30
|
const { title, description, actions, tabs, attention, search, filters, sort, toolbarSurface, noMatch, pending, rail, ...list } = props;
|
|
31
|
+
const hostTitled = usePageTitled();
|
|
32
|
+
const titled = Boolean(title) || hostTitled;
|
|
33
|
+
const toolbarActions = actions && !titled ? _jsx(CardActionsRow, { ...actions }) : null;
|
|
31
34
|
const hasRecords = list.records !== undefined && list.records.length > 0;
|
|
32
35
|
const narrowed = Boolean(search?.value) || (filters?.facets.some((facet) => facet.value) ?? false);
|
|
33
|
-
const page = (_jsxs("div", { className: "grid min-w-0 gap-4", "data-slot": "collection-page", children: [title ? _jsx(PageHeader, { description: description, title: title }) : null, actions ? _jsx(PageActions, { ...actions }) : null, tabs, attention, (search || filters || sort) && (hasRecords || narrowed) ? (_jsx(CollectionToolbar, { actions: filters || sort ? (_jsxs(_Fragment, { children: [filters ? _jsx(CollectionFilters, { ...filters }) : null, sort ? _jsx(CollectionSort, { ...sort }) : null] })) : undefined, "aria-busy": pending ? true : undefined, label: list.label, search: search ? _jsx(CollectionSearch, { ...search }) : undefined, status: _jsx(WaitingLine, { className: "w-24", decorative: true, waiting: pending === true }), surface: toolbarSurface ?? "plain" })) : null, rail ? (_jsxs("div", { className: "grid min-w-0 gap-6 xl:grid-cols-[18.75rem_minmax(0,1fr)] xl:items-start", "data-slot": "collection-columns", children: [_jsx("div", { className: "min-w-0 xl:col-start-2 xl:row-start-1", children: _jsx(RecordList, { ...list, layout: "line", noMatch: narrowed ? noMatch : undefined }) }), _jsx(CollectionRailColumn, { className: "xl:col-start-1 xl:row-start-1", rail: rail })] })) : (_jsx(RecordList, { ...list, noMatch: narrowed ? noMatch : undefined }))] }));
|
|
36
|
+
const page = (_jsxs("div", { className: "grid min-w-0 gap-4", "data-slot": "collection-page", children: [title ? _jsx(PageHeader, { description: description, title: title }) : null, actions && titled ? _jsx(PageActions, { ...actions }) : null, tabs, attention, ((search || filters || sort) && (hasRecords || narrowed)) || toolbarActions ? (_jsx(CollectionToolbar, { actions: filters || sort || toolbarActions ? (_jsxs(_Fragment, { children: [filters && (hasRecords || narrowed) ? _jsx(CollectionFilters, { ...filters }) : null, sort && (hasRecords || narrowed) ? _jsx(CollectionSort, { ...sort }) : null, toolbarActions] })) : undefined, "aria-busy": pending ? true : undefined, label: list.label, search: search && (hasRecords || narrowed) ? _jsx(CollectionSearch, { ...search }) : undefined, status: _jsx(WaitingLine, { className: "w-24", decorative: true, waiting: pending === true }), surface: toolbarSurface ?? "plain" })) : null, rail ? (_jsxs("div", { className: "grid min-w-0 gap-6 xl:grid-cols-[18.75rem_minmax(0,1fr)] xl:items-start", "data-slot": "collection-columns", children: [_jsx("div", { className: "min-w-0 xl:col-start-2 xl:row-start-1", children: _jsx(RecordList, { ...list, layout: "line", noMatch: narrowed ? noMatch : undefined }) }), _jsx(CollectionRailColumn, { className: "xl:col-start-1 xl:row-start-1", rail: rail })] })) : (_jsx(RecordList, { ...list, noMatch: narrowed ? noMatch : undefined }))] }));
|
|
34
37
|
return title ? _jsx(PageActionsHostProvider, { children: page }) : page;
|
|
35
38
|
}
|
|
@@ -45,7 +45,7 @@ export type IdentityMarkProps = {
|
|
|
45
45
|
/** The record's own icon when it names one, as a skill does in its hub card; otherwise its kind's, the one its section has in the navigation: Mail for a mailbox. */
|
|
46
46
|
icon: IconComponent;
|
|
47
47
|
/** A catalogue kind's ground; neutral is the ringed card ground. */
|
|
48
|
-
tone?: "neutral" | "
|
|
48
|
+
tone?: "neutral" | "teal";
|
|
49
49
|
/** The record's own object picture, a transparent image drawn on its kind's ground in place of the icon at 64; smaller marks draw the icon. */
|
|
50
50
|
picture?: string;
|
|
51
51
|
});
|
|
@@ -58,7 +58,7 @@ export type IdentityMarkProps = {
|
|
|
58
58
|
* @family Status
|
|
59
59
|
* @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.
|
|
60
60
|
* @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.
|
|
61
|
-
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin takes the
|
|
61
|
+
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
|
|
62
62
|
* @words None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.
|
|
63
63
|
* @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
|
|
64
64
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity-mark.d.ts","sourceRoot":"","sources":["../../src/components/identity-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEnF,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMnE,MAAM,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE3D,qHAAqH;AACrH,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,4GAA4G;IAC5G,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,4GAA4G;IAC5G,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,CACA;IACE,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IACrF,kGAAkG;IAClG,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,CAAC;CAC1C,GACD,CAAC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,YA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ACE,IAAI,EAAE,OAAO,CAAC;IACd,GAAG,EAAE;QAAE,IAAI,EAAE,cAAc,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,aAAa,CAAA;KAAE,CAAC;IACrF,kGAAkG;IAClG,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,SAAS,CAAC;CAC1C,GACD,CAAC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG,YAAY,CAAC,GAC7C;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GACD;IACE,IAAI,EAAE,OAAO,CAAC;IACd,wFAAwF;IACxF,MAAM,EAAE,MAAM,CAAC;CAChB,GACD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAChD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,qKAAqK;IACrK,IAAI,EAAE,aAAa,CAAC;IACpB,oEAAoE;IACpE,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,+IAA+I;IAC/I,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CACJ,CAAC;AA2DF;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,SAAS,CA6DhE"}
|
|
@@ -15,7 +15,6 @@ const MEASURES = {
|
|
|
15
15
|
};
|
|
16
16
|
const TONES = {
|
|
17
17
|
neutral: "bg-card text-muted-foreground ring-1 ring-border ring-inset",
|
|
18
|
-
plugin: "bg-info-soft text-info-soft-foreground",
|
|
19
18
|
teal: "bg-category-teal text-category-teal-foreground",
|
|
20
19
|
};
|
|
21
20
|
function naming(label) {
|
|
@@ -38,7 +37,7 @@ function RecordTile({ label, size, tone, children, }) {
|
|
|
38
37
|
* @family Status
|
|
39
38
|
* @when The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.
|
|
40
39
|
* @instead An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.
|
|
41
|
-
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin takes the
|
|
40
|
+
* @behaviour Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.
|
|
42
41
|
* @words None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.
|
|
43
42
|
* @access Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.
|
|
44
43
|
*/
|
|
@@ -107,9 +107,17 @@ export declare function PageActionsRow({ period, primary, secondary, menu }: Pag
|
|
|
107
107
|
* server HTML is still streaming makes React render that page again in the
|
|
108
108
|
* browser, beside the server's copy.
|
|
109
109
|
*/
|
|
110
|
-
export declare function PageActionsHostProvider({ children }: {
|
|
110
|
+
export declare function PageActionsHostProvider({ children, titled, }: {
|
|
111
111
|
children: ReactNode;
|
|
112
|
+
/**
|
|
113
|
+
* Whether the product drew a title row above this page. A page that is one plain list of things
|
|
114
|
+
* a person makes has none, as Vercel's Domains and Storage have none, and its actions stand at
|
|
115
|
+
* the end of its search row instead (`CollectionPage`).
|
|
116
|
+
*/
|
|
117
|
+
titled?: boolean;
|
|
112
118
|
}): import("react").JSX.Element;
|
|
119
|
+
/** Whether the page has a title row its actions go on; false outside a host or on an untitled page. */
|
|
120
|
+
export declare function usePageTitled(): boolean;
|
|
113
121
|
/** The element on `PageHeader`'s title row that the page's `PageActions` render into. */
|
|
114
122
|
export declare function PageActionsSlot(): import("react").JSX.Element;
|
|
115
123
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/components/page-actions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"page-actions.d.ts","sourceRoot":"","sources":["../../src/components/page-actions.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAc,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAGpE,MAAM,MAAM,iBAAiB,GACzB;IAAE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE;AACrF;;;GAGG;GACD;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE;AACzD;;;GAGG;GACD;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAC;IAAC,IAAI,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE5D,uGAAuG;AACvG,MAAM,MAAM,WAAW,GACnB;IACE,kGAAkG;IAClG,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;CACtB,GACD;IAAE,OAAO,CAAC,EAAE,KAAK,GAAG,SAA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|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowUpRight } from "lucide-react";
|
|
4
|
-
import { createContext, isValidElement, useContext, useEffect, useId, useState, } from "react";
|
|
4
|
+
import { createContext, isValidElement, useContext, useEffect, useId, useLayoutEffect, useState, } from "react";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
import { createStore, useStore } from "zustand";
|
|
7
7
|
import { MenuCommandRow } from "../internal/record-menu-items.js";
|
|
@@ -55,8 +55,9 @@ export function PageActionsRow({ period, primary, secondary, menu }) {
|
|
|
55
55
|
return null;
|
|
56
56
|
return (_jsxs("div", { "data-slot": "page-actions", className: "flex max-w-full min-w-0 flex-wrap items-center gap-2", children: [period, secondary ? _jsx(PageCommandButton, { command: secondary, variant: "outline" }) : null, primary ? _jsx(PageCommandButton, { command: primary, variant: "default" }) : null, menu ? _jsx(ActionMenu, { ...menu }) : null] }));
|
|
57
57
|
}
|
|
58
|
-
function createHost() {
|
|
58
|
+
function createHost(titled = true) {
|
|
59
59
|
return createStore((set) => ({
|
|
60
|
+
titled,
|
|
60
61
|
element: null,
|
|
61
62
|
owner: null,
|
|
62
63
|
attach: (element) => set({ element }),
|
|
@@ -64,7 +65,7 @@ function createHost() {
|
|
|
64
65
|
release: (owner) => set((state) => (state.owner === owner ? { owner: null } : state)),
|
|
65
66
|
}));
|
|
66
67
|
}
|
|
67
|
-
const unhosted = createHost();
|
|
68
|
+
const unhosted = createHost(false);
|
|
68
69
|
const PageActionsHostContext = createContext(null);
|
|
69
70
|
/**
|
|
70
71
|
* Holds the place on the title's row where the open page puts its actions. The
|
|
@@ -75,10 +76,16 @@ const PageActionsHostContext = createContext(null);
|
|
|
75
76
|
* server HTML is still streaming makes React render that page again in the
|
|
76
77
|
* browser, beside the server's copy.
|
|
77
78
|
*/
|
|
78
|
-
export function PageActionsHostProvider({ children }) {
|
|
79
|
-
const [host] = useState(createHost);
|
|
79
|
+
export function PageActionsHostProvider({ children, titled = true, }) {
|
|
80
|
+
const [host] = useState(() => createHost(titled));
|
|
81
|
+
useLayoutEffect(() => host.setState({ titled }), [host, titled]);
|
|
80
82
|
return _jsx(PageActionsHostContext, { value: host, children: children });
|
|
81
83
|
}
|
|
84
|
+
/** Whether the page has a title row its actions go on; false outside a host or on an untitled page. */
|
|
85
|
+
export function usePageTitled() {
|
|
86
|
+
const host = useContext(PageActionsHostContext);
|
|
87
|
+
return useStore(host ?? unhosted, (state) => state.titled);
|
|
88
|
+
}
|
|
82
89
|
/** The element on `PageHeader`'s title row that the page's `PageActions` render into. */
|
|
83
90
|
export function PageActionsSlot() {
|
|
84
91
|
const host = useContext(PageActionsHostContext);
|
|
@@ -17,11 +17,16 @@ import * as React from "react";
|
|
|
17
17
|
* description is one sentence in the product's words, without a full stop when it ends in a link.
|
|
18
18
|
* @access The title is the page's `h1`; DOM order is visual order.
|
|
19
19
|
*/
|
|
20
|
-
declare function PageHeader({ title, description, headingProps, className, ...props }: Omit<React.ComponentProps<"header">, "title" | "children"> & {
|
|
20
|
+
declare function PageHeader({ title, description, headingProps, className, unseen, ...props }: Omit<React.ComponentProps<"header">, "title" | "children"> & {
|
|
21
21
|
title: React.ReactNode;
|
|
22
22
|
/** One muted line under the title; a link to learn more may end it. */
|
|
23
23
|
description?: React.ReactNode;
|
|
24
24
|
headingProps?: Omit<React.ComponentProps<"h1">, "children">;
|
|
25
|
+
/**
|
|
26
|
+
* A plain list's page draws no title row (`CollectionPage`): the heading stays, read by
|
|
27
|
+
* assistive technology and taking focus after a navigation, and nothing is drawn.
|
|
28
|
+
*/
|
|
29
|
+
unseen?: boolean;
|
|
25
30
|
}): React.JSX.Element;
|
|
26
31
|
export { PageHeader };
|
|
27
32
|
//# sourceMappingURL=page-header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC9D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uEAAuE;IACvE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,MAAc,EACd,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC9D,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,uEAAuE;IACvE,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IAC5D;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,qBAgCA;AAED,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -19,7 +19,10 @@ import { PageActionsSlot } from "./page-actions.js";
|
|
|
19
19
|
* description is one sentence in the product's words, without a full stop when it ends in a link.
|
|
20
20
|
* @access The title is the page's `h1`; DOM order is visual order.
|
|
21
21
|
*/
|
|
22
|
-
function PageHeader({ title, description, headingProps, className, ...props }) {
|
|
22
|
+
function PageHeader({ title, description, headingProps, className, unseen = false, ...props }) {
|
|
23
|
+
if (unseen) {
|
|
24
|
+
return (_jsx("h1", { ...headingProps, className: cn("sr-only", headingProps?.className), children: title }));
|
|
25
|
+
}
|
|
23
26
|
return (_jsxs("header", { "data-slot": "page-header", className: cn("min-w-0", className), ...props, children: [_jsxs("div", { className: "flex min-h-9 min-w-0 flex-wrap items-center justify-between gap-x-6 gap-y-3", children: [_jsx("h1", { ...headingProps, className: cn("min-w-0 flex-1 basis-32 truncate text-heading-md text-foreground outline-none", headingProps?.className), children: title }), _jsx(PageActionsSlot, {})] }), description ? (_jsx("div", { "data-slot": "page-header-description", className: "mt-1 min-w-0 text-body-sm text-muted-foreground", children: description })) : null] }));
|
|
24
27
|
}
|
|
25
28
|
export { PageHeader };
|
|
@@ -187,7 +187,7 @@ export type RecordListWithout<TRecord extends RowData, Key extends PropertyKey>
|
|
|
187
187
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
188
188
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
189
189
|
* Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.
|
|
190
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
190
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; a fact's column likewise stands only while a record in the list has its value; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
191
191
|
* “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state)
|
|
192
192
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
193
193
|
* “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-list.d.ts","sourceRoot":"","sources":["../../src/components/record-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAErD,OAAO,EAAiB,KAAK,YAAY,EAAE,KAAK,SAAS,EA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AAI,CAAC;IACxE,kDAAkD;IAClD,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD;;;OAGG;IACH,OAAO,CAAC,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,+DAA+D;QAC/D,MAAM,CAAC,EAAE,YAAY,CAAC;QACtB,WAAW,CAAC,EAAE,SAAS,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;OAIG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,WAAW,GAAG,SAAS,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,IAAI,CAAC;IACxF,iFAAiF;IACjF,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,UAAU,GAAG,IAAI,CAAC;IAC/C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,OAAO,SAAS,OAAO,EAAE,GAAG,SAAS,WAAW,IAAI,IAAI,CACpF,eAAe,CAAC,OAAO,CAAC,EACxB,GAAG,CACJ,CAAC;AAiWF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,sCAqClF"}
|
|
@@ -120,12 +120,15 @@ function FactCell({ column, row }) {
|
|
|
120
120
|
const facts = useShownList().facts ?? [];
|
|
121
121
|
return _jsx(_Fragment, { children: facts.find((each) => each.id === column.id)?.of(row.original) });
|
|
122
122
|
}
|
|
123
|
+
function hasValue(value) {
|
|
124
|
+
return value !== null && value !== undefined && value !== "";
|
|
125
|
+
}
|
|
123
126
|
function summaryOf(list, record) {
|
|
124
127
|
const facts = list.facts ?? [];
|
|
125
128
|
const status = list.status?.of(record) ?? null;
|
|
126
129
|
const said = facts.flatMap((fact) => {
|
|
127
130
|
const value = fact.of(record);
|
|
128
|
-
return value
|
|
131
|
+
return hasValue(value) ? [{ id: fact.id, value }] : [];
|
|
129
132
|
});
|
|
130
133
|
return status || said.length > 0 ? { status, said } : undefined;
|
|
131
134
|
}
|
|
@@ -205,6 +208,8 @@ function recordColumns(props) {
|
|
|
205
208
|
}
|
|
206
209
|
else {
|
|
207
210
|
for (const fact of facts) {
|
|
211
|
+
if (!props.records.some((record) => hasValue(fact.of(record))))
|
|
212
|
+
continue;
|
|
208
213
|
columns.push({
|
|
209
214
|
id: fact.id,
|
|
210
215
|
header: fact.label,
|
|
@@ -288,7 +293,7 @@ function RecordRows(props) {
|
|
|
288
293
|
* @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
|
|
289
294
|
* “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
|
|
290
295
|
* Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.
|
|
291
|
-
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
296
|
+
* @behaviour One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout="line"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; a fact's column likewise stands only while a record in the list has its value; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list ("Deployment retention is enabled. Learn more", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message.
|
|
292
297
|
* “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state)
|
|
293
298
|
* Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card.
|
|
294
299
|
* “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
-
type TagTone = "neutral" | "blue" | "teal" | "purple" | "pink";
|
|
2
|
+
type TagTone = "neutral" | "blue" | "teal" | "purple" | "pink" | "green" | "orange" | "yellow" | "red";
|
|
3
3
|
type TagProps = Omit<ComponentProps<"span">, "children"> & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
tone?: TagTone;
|
|
6
|
+
/** The tone's hue itself rather than its soft step, for a category label (`CategoryTag`). */
|
|
7
|
+
vivid?: boolean;
|
|
6
8
|
/** A 12px mark at the leading edge. */
|
|
7
9
|
mark?: ReactNode;
|
|
8
10
|
/** A dashed, muted tag, for an absence such as "Direct customer". */
|
|
@@ -18,12 +20,15 @@ type TagProps = Omit<ComponentProps<"span">, "children"> & {
|
|
|
18
20
|
* to. A 24 px pill with its 12 px mark.
|
|
19
21
|
* @instead For a state use `StatusBadge`; a tag never carries one. For a removable filter use
|
|
20
22
|
* `CollectionFilters`. For a way to the thing, a link.
|
|
21
|
-
* @behaviour Static, truncates inside its width.
|
|
22
|
-
*
|
|
23
|
+
* @behaviour Static, truncates inside its width. A tone is one of the palette's eight hues (blue,
|
|
24
|
+
* teal, purple, pink, green, orange, yellow, red) on its soft step with its deep ink, or neutral,
|
|
25
|
+
* and its mark takes the same ink; a vivid tag, a category label's, is the hue itself with the
|
|
26
|
+
* pole that clears AA as its ink. The same category keeps the same tone across a surface and
|
|
27
|
+
* after sorting; a tag is a pill and never a status, which is `StatusBadge`'s shape and word. Dashed and muted when it states an absence.
|
|
23
28
|
* @words The thing's own name. A quiet tag names the absence in two or three words (*Direct
|
|
24
29
|
* customer*); the note says whose (*Your account*).
|
|
25
30
|
* @access Text; the mark is decorative. Never focusable unless wrapped by a real link.
|
|
26
31
|
*/
|
|
27
|
-
declare function Tag({ children, className, mark, note, quiet, tone, ...props }: TagProps): import("react").JSX.Element;
|
|
32
|
+
declare function Tag({ children, className, mark, note, quiet, tone, vivid, ...props }: TagProps): import("react").JSX.Element;
|
|
28
33
|
export { Tag, type TagProps, type TagTone };
|
|
29
34
|
//# sourceMappingURL=tag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/components/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../src/components/tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,KAAK,OAAO,GACR,SAAS,GACT,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,CAAC;AA0BV,KAAK,QAAQ,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6FAA6F;IAC7F,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,uCAAuC;IACvC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,qEAAqE;IACrE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wEAAwE;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,GAAG,CAAC,EACX,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,IAAI,EACJ,KAAa,EACb,IAAgB,EAChB,KAAa,EACb,GAAG,KAAK,EACT,EAAE,QAAQ,+BA8BV;AAED,OAAO,EAAE,GAAG,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,CAAC"}
|
package/dist/components/tag.js
CHANGED
|
@@ -6,6 +6,21 @@ const TONE_CLASS = {
|
|
|
6
6
|
teal: "border-transparent bg-category-teal text-category-teal-foreground",
|
|
7
7
|
purple: "border-transparent bg-category-purple text-category-purple-foreground",
|
|
8
8
|
pink: "border-transparent bg-category-pink text-category-pink-foreground",
|
|
9
|
+
green: "border-transparent bg-category-green text-category-green-foreground",
|
|
10
|
+
orange: "border-transparent bg-category-orange text-category-orange-foreground",
|
|
11
|
+
yellow: "border-transparent bg-category-yellow text-category-yellow-foreground",
|
|
12
|
+
red: "border-transparent bg-category-red text-category-red-foreground",
|
|
13
|
+
};
|
|
14
|
+
const VIVID_CLASS = {
|
|
15
|
+
neutral: TONE_CLASS.neutral,
|
|
16
|
+
blue: "border-transparent bg-label-blue text-label-blue-foreground",
|
|
17
|
+
teal: "border-transparent bg-label-teal text-label-teal-foreground",
|
|
18
|
+
purple: "border-transparent bg-label-purple text-label-purple-foreground",
|
|
19
|
+
pink: "border-transparent bg-label-pink text-label-pink-foreground",
|
|
20
|
+
green: "border-transparent bg-label-green text-label-green-foreground",
|
|
21
|
+
orange: "border-transparent bg-label-orange text-label-orange-foreground",
|
|
22
|
+
yellow: "border-transparent bg-label-yellow text-label-yellow-foreground",
|
|
23
|
+
red: "border-transparent bg-label-red text-label-red-foreground",
|
|
9
24
|
};
|
|
10
25
|
/**
|
|
11
26
|
* One categorical fact in a row, as a pill.
|
|
@@ -15,13 +30,18 @@ const TONE_CLASS = {
|
|
|
15
30
|
* to. A 24 px pill with its 12 px mark.
|
|
16
31
|
* @instead For a state use `StatusBadge`; a tag never carries one. For a removable filter use
|
|
17
32
|
* `CollectionFilters`. For a way to the thing, a link.
|
|
18
|
-
* @behaviour Static, truncates inside its width.
|
|
19
|
-
*
|
|
33
|
+
* @behaviour Static, truncates inside its width. A tone is one of the palette's eight hues (blue,
|
|
34
|
+
* teal, purple, pink, green, orange, yellow, red) on its soft step with its deep ink, or neutral,
|
|
35
|
+
* and its mark takes the same ink; a vivid tag, a category label's, is the hue itself with the
|
|
36
|
+
* pole that clears AA as its ink. The same category keeps the same tone across a surface and
|
|
37
|
+
* after sorting; a tag is a pill and never a status, which is `StatusBadge`'s shape and word. Dashed and muted when it states an absence.
|
|
20
38
|
* @words The thing's own name. A quiet tag names the absence in two or three words (*Direct
|
|
21
39
|
* customer*); the note says whose (*Your account*).
|
|
22
40
|
* @access Text; the mark is decorative. Never focusable unless wrapped by a real link.
|
|
23
41
|
*/
|
|
24
|
-
function Tag({ children, className, mark, note, quiet = false, tone = "neutral", ...props }) {
|
|
25
|
-
return (_jsxs("span", { className: cn("inline-flex h-6 max-w-full min-w-0 shrink-0 items-center gap-1.5 rounded-full border ps-2 pe-2.5 text-xs whitespace-nowrap", quiet
|
|
42
|
+
function Tag({ children, className, mark, note, quiet = false, tone = "neutral", vivid = false, ...props }) {
|
|
43
|
+
return (_jsxs("span", { className: cn("inline-flex h-6 max-w-full min-w-0 shrink-0 items-center gap-1.5 rounded-full border ps-2 pe-2.5 text-xs whitespace-nowrap", quiet
|
|
44
|
+
? "border-dashed border-border text-muted-foreground"
|
|
45
|
+
: (vivid ? VIVID_CLASS : TONE_CLASS)[tone], className), "data-quiet": quiet ? "" : undefined, "data-slot": "tag", ...props, children: [mark ? (_jsx("span", { className: "flex size-3 shrink-0 items-center justify-center [&>svg]:size-3", "data-slot": "tag-mark", children: mark })) : null, _jsx("span", { className: "truncate", children: children }), note ? (_jsx("span", { className: "shrink-0 text-muted-foreground", "data-slot": "tag-note", children: note })) : null] }));
|
|
26
46
|
}
|
|
27
47
|
export { Tag };
|
|
@@ -2,6 +2,7 @@ declare function ActivityFeedSpecimen(): import("react").JSX.Element;
|
|
|
2
2
|
declare function AgentProfileCardSpecimen(): import("react").JSX.Element;
|
|
3
3
|
declare function CatalogDrawerSpecimen(): import("react").JSX.Element;
|
|
4
4
|
declare function CollectionFiltersSpecimen(): import("react").JSX.Element;
|
|
5
|
+
declare function CatalogRowsSpecimen(): import("react").JSX.Element;
|
|
5
6
|
declare function CollectionPageSpecimen(): import("react").JSX.Element;
|
|
6
7
|
declare function CollectionToolbarSpecimen(): import("react").JSX.Element;
|
|
7
8
|
declare function ConfirmDialogSpecimen(): import("react").JSX.Element;
|
|
@@ -22,6 +23,7 @@ export declare const COMPOSITIONS: {
|
|
|
22
23
|
CollectionFilters: typeof CollectionFiltersSpecimen;
|
|
23
24
|
CollectionPage: typeof CollectionPageSpecimen;
|
|
24
25
|
CollectionToolbar: typeof CollectionToolbarSpecimen;
|
|
26
|
+
useCatalogRows: typeof CatalogRowsSpecimen;
|
|
25
27
|
ConfirmDialog: typeof ConfirmDialogSpecimen;
|
|
26
28
|
EntryPicture: typeof EntryPictureSpecimen;
|
|
27
29
|
EntryScene: typeof EntrySceneSpecimen;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compositions.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/compositions.tsx"],"names":[],"mappings":"AAuIA,iBAAS,oBAAoB,gCA+B5B;AAMD,iBAAS,wBAAwB,gCAahC;AAED,iBAAS,qBAAqB,gCA0B7B;AAED,iBAAS,yBAAyB,gCAGjC;AAoBD,iBAAS,mBAAmB,gCAwB3B;AAED,iBAAS,sBAAsB,gCAyD9B;AAED,iBAAS,yBAAyB,gCAUjC;AAED,iBAAS,qBAAqB,gCAwC7B;AAED,iBAAS,kBAAkB,gCAiB1B;AAED,iBAAS,oBAAoB,gCAS5B;AAED,iBAAS,kBAAkB,gCA0B1B;AAED,iBAAS,kBAAkB,gCAuE1B;AAED,iBAAS,kBAAkB,gCAwB1B;AAED,iBAAS,oBAAoB,gCAkD5B;AAED,iBAAS,oBAAoB,gCAqC5B;AAED,iBAAS,mBAAmB,gCA2B3B;AAED,iBAAS,mBAAmB,gCAoB3B;AAwBD,iBAAS,uBAAuB,gCAkD/B;AA+BD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CA6FE,CAAC"}
|
|
@@ -9,6 +9,7 @@ import { AgentProfileCard } from "../../components/agent-profile.js";
|
|
|
9
9
|
import { BrandWordmark } from "../../components/brand.js";
|
|
10
10
|
import { Button } from "../../components/button.js";
|
|
11
11
|
import { CatalogDrawer } from "../../components/catalog-drawer.js";
|
|
12
|
+
import { useCatalogRows } from "../../components/catalog-row.js";
|
|
12
13
|
import { CollectionFilters } from "../../components/collection-filters.js";
|
|
13
14
|
import { CollectionPage } from "../../components/collection-page.js";
|
|
14
15
|
import { CollectionSearch } from "../../components/collection-search.js";
|
|
@@ -73,7 +74,7 @@ const CATALOG = [
|
|
|
73
74
|
},
|
|
74
75
|
{
|
|
75
76
|
id: "weather",
|
|
76
|
-
mark: { kind: "record", icon: Puzzle
|
|
77
|
+
mark: { kind: "record", icon: Puzzle },
|
|
77
78
|
name: "Weather",
|
|
78
79
|
description: "The forecast for each delivery address.",
|
|
79
80
|
add: { label: "Add plugin", onClick: nothing, added: { label: "Added" } },
|
|
@@ -154,6 +155,39 @@ function CollectionFiltersSpecimen() {
|
|
|
154
155
|
const { filters } = useMailboxFilter();
|
|
155
156
|
return _jsx(CollectionFilters, { ...filters });
|
|
156
157
|
}
|
|
158
|
+
const SKILLS = [
|
|
159
|
+
{
|
|
160
|
+
name: "Quote builder",
|
|
161
|
+
detail: "Writes a quote from the price list and the customer's request.",
|
|
162
|
+
icon: "receipt",
|
|
163
|
+
category: "sales",
|
|
164
|
+
source: "From the Library",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "Invoice reminders",
|
|
168
|
+
detail: "Reminds a customer of an invoice past its due date, politely, once a week.",
|
|
169
|
+
icon: "mail",
|
|
170
|
+
category: "finance",
|
|
171
|
+
source: "From the Library",
|
|
172
|
+
},
|
|
173
|
+
{ name: "Price list", detail: "The shop's prices, kept up to date.", source: "Added in Nadia" },
|
|
174
|
+
];
|
|
175
|
+
function CatalogRowsSpecimen() {
|
|
176
|
+
const art = useEmptyArt();
|
|
177
|
+
const rows = useCatalogRows("skill", SKILLS, (skill) => skill, {
|
|
178
|
+
category: "Category",
|
|
179
|
+
allCategories: "All categories",
|
|
180
|
+
categoryName: (category) => category.charAt(0).toUpperCase() + category.slice(1),
|
|
181
|
+
source: "Source",
|
|
182
|
+
filter: FILTER_COPY,
|
|
183
|
+
});
|
|
184
|
+
return (_jsx(CollectionPage, { ...rows.list, ...(rows.filters ? { filters: rows.filters } : {}), empty: {
|
|
185
|
+
kind: "firstUse",
|
|
186
|
+
title: "No skills yet",
|
|
187
|
+
description: "Skills you add from the Library show here.",
|
|
188
|
+
picture: art.mail,
|
|
189
|
+
}, getId: (skill) => skill.name, label: "Skills", records: rows.keep(SKILLS) }));
|
|
190
|
+
}
|
|
157
191
|
function CollectionPageSpecimen() {
|
|
158
192
|
const art = useEmptyArt();
|
|
159
193
|
const { records, search, filters } = useMailboxFilter();
|
|
@@ -381,6 +415,7 @@ export const COMPOSITIONS = {
|
|
|
381
415
|
CollectionFilters: CollectionFiltersSpecimen,
|
|
382
416
|
CollectionPage: CollectionPageSpecimen,
|
|
383
417
|
CollectionToolbar: CollectionToolbarSpecimen,
|
|
418
|
+
useCatalogRows: CatalogRowsSpecimen,
|
|
384
419
|
ConfirmDialog: ConfirmDialogSpecimen,
|
|
385
420
|
EntryPicture: EntryPictureSpecimen,
|
|
386
421
|
EntryScene: EntrySceneSpecimen,
|
|
@@ -113,6 +113,7 @@ export declare const SPECIMENS: {
|
|
|
113
113
|
StatusBadge: () => import("react").JSX.Element;
|
|
114
114
|
ObjectFactValue: () => import("react").JSX.Element;
|
|
115
115
|
Tag: () => import("react").JSX.Element;
|
|
116
|
+
CategoryTag: () => import("react").JSX.Element;
|
|
116
117
|
Checkbox: () => import("react").JSX.Element;
|
|
117
118
|
ChoiceboxGroup: () => import("react").JSX.Element;
|
|
118
119
|
CollectionSort: () => import("react").JSX.Element;
|
|
@@ -155,6 +156,7 @@ export declare const SPECIMENS: {
|
|
|
155
156
|
CollectionFilters: () => import("react").JSX.Element;
|
|
156
157
|
CollectionPage: () => import("react").JSX.Element;
|
|
157
158
|
CollectionToolbar: () => import("react").JSX.Element;
|
|
159
|
+
useCatalogRows: () => import("react").JSX.Element;
|
|
158
160
|
ConfirmDialog: () => import("react").JSX.Element;
|
|
159
161
|
EntryPicture: () => import("react").JSX.Element;
|
|
160
162
|
EntryScene: () => import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/index.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYiB,CAAC"}
|
|
@@ -21,6 +21,7 @@ export declare const STATUS: {
|
|
|
21
21
|
StatusBadge: () => import("react").JSX.Element;
|
|
22
22
|
ObjectFactValue: () => import("react").JSX.Element;
|
|
23
23
|
Tag: () => import("react").JSX.Element;
|
|
24
|
+
CategoryTag: () => import("react").JSX.Element;
|
|
24
25
|
};
|
|
25
26
|
export {};
|
|
26
27
|
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/status.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/showcase/specimens/status.tsx"],"names":[],"mappings":"AA0DA,iBAAS,oBAAoB,gCAiB5B;AAkBD,iBAAS,aAAa,gCA2DrB;AAWD,iBAAS,gBAAgB,gCAkExB;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;CAoQQ,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { AppMark, composioLogo } from "../../components/app-mark.js";
|
|
|
8
8
|
import { Avatar, AvatarFallback, AvatarGroup, AvatarWithIcon } from "../../components/avatar.js";
|
|
9
9
|
import { Badge } from "../../components/badge.js";
|
|
10
10
|
import { Button } from "../../components/button.js";
|
|
11
|
+
import { CategoryTag } from "../../components/catalog-category.js";
|
|
11
12
|
import { BrandMark, BrandWordmark } from "../../components/brand.js";
|
|
12
13
|
import { CheckCounts, CheckState } from "../../components/check-counts.js";
|
|
13
14
|
import { FileTypeIcon } from "../../components/file-type-icon.js";
|
|
@@ -107,4 +108,5 @@ export const STATUS = {
|
|
|
107
108
|
StatusBadge: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(StatusBadge, { label: "Connected", tone: "success" }), _jsx(StatusBadge, { label: "Waiting for you", since: "2h", tone: "warning" }), _jsx(StatusBadge, { label: "Failed", tone: "danger" }), _jsx(StatusBadge, { label: "Running", tone: "info" }), _jsx(StatusBadge, { label: "Paused", tone: "neutral" })] })),
|
|
108
109
|
ObjectFactValue: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(ObjectFactValue, { kind: "agents", children: "5 active" }), _jsx(ObjectFactValue, { kind: "installations", children: "2" }), _jsx(ObjectFactValue, { kind: "customers", children: "12" })] })),
|
|
109
110
|
Tag: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Tag, { tone: "blue", children: "Rossi Ottica" }), _jsx(Tag, { tone: "teal", children: "Partner" }), _jsx(Tag, { note: "Your account", quiet: true, children: "Direct customer" })] })),
|
|
111
|
+
CategoryTag: () => (_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(CategoryTag, { category: "finance", label: "Finance" }), _jsx(CategoryTag, { category: "calendar", label: "Calendar" }), _jsx(CategoryTag, { category: "office", label: "Office" }), _jsx(CategoryTag, { category: "email", label: "Email" }), _jsx(CategoryTag, { category: "documents", label: "Documents" }), _jsx(CategoryTag, { category: "sales", label: "Sales" }), _jsx(CategoryTag, { category: "people", label: "People" }), _jsx(CategoryTag, { category: "legal", label: "Legal" }), _jsx(CategoryTag, { category: "other", label: "Other" })] })),
|
|
110
112
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "Card" | "CardRow" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
|
|
1
|
+
export type UsageName = "ActivityFeed" | "AgentProfileCard" | "CatalogDrawer" | "CollectionFilters" | "CollectionPage" | "CollectionToolbar" | "ConfirmDialog" | "EntryPicture" | "EntryScene" | "FormDialog" | "FormDrawer" | "InviteCard" | "LibraryShelf" | "ObjectPage" | "ObjectSection" | "OverviewPage" | "PageHeader" | "RecordList" | "RecordSheet" | "RowEditForm" | "SettingsPage" | "SettingsSection" | "useCatalogRows" | "Button" | "ButtonGroup" | "ButtonLink" | "CardActionsRow" | "CopyButton" | "LoadMoreButton" | "PageActions" | "Calendar" | "ClearableInput" | "CollectionSearch" | "Field" | "Form" | "Input" | "InputGroup" | "InputOTP" | "Label" | "NativeSelect" | "SettingsField" | "SettingsRows" | "Slider" | "Textarea" | "Checkbox" | "ChoiceboxGroup" | "CollectionSort" | "Combobox" | "ModelSelect" | "MultiSelect" | "RadioGroup" | "SegmentedChoice" | "SegmentedControl" | "Select" | "Switch" | "ThemeModeSegments" | "ThemeModeSwitcher" | "Toggle" | "ToggleGroup" | "ActionStatus" | "AgentOrb" | "AppMark" | "ArchIcon" | "Avatar" | "Badge" | "BrandWordmark" | "CategoryTag" | "CheckCounts" | "FileTypeIcon" | "IdentityMark" | "ModelIdentity" | "ModelMark" | "ObjectFactValue" | "PlatformMark" | "ProgressChecklist" | "RecordIdentity" | "StatusBadge" | "Tag" | "AgentListRow" | "Breadcrumb" | "CommandDialog" | "Footer" | "PortalSidebarFrame" | "ScopeSwitcher" | "Sidebar" | "SidebarBrand" | "SidebarFind" | "SidebarFrame" | "SidebarMenuChevron" | "SidebarSections" | "Tabs" | "TabsNav" | "textLinkVariants" | "AgentCard" | "Card" | "CardRow" | "CodeBlock" | "DataTable" | "DiffCount" | "DisclosureRow" | "FileDiff" | "Gauge" | "Item" | "Kbd" | "MiddleTruncate" | "ObjectFacts" | "PairingCode" | "Progress" | "QrCode" | "RecordTime" | "RunTimeline" | "SettingsFactsSection" | "Snippet" | "Table" | "TableCard" | "TableValue" | "TextWithCopyButton" | "UsageMeter" | "Alert" | "EmptyState" | "EntryProgress" | "EntryStageList" | "HoverCard" | "MessageNotice" | "NoticeBanner" | "PendingLabel" | "Skeleton" | "SkeletonRegion" | "Toaster" | "Tooltip" | "UpdateCard" | "WaitingLine" | "AccountMenu" | "ActionContextMenu" | "ActionMenu" | "AlertDialog" | "ContextMenu" | "Dialog" | "Drawer" | "DropdownMenu" | "GlassControl" | "MenuChoiceRow" | "Popover" | "Sheet" | "SiteMenu" | "ThemeModeMenu" | "ActivityCalendar" | "ChartAreaStacked" | "ChartBarHorizontal" | "ChartBarMultiple" | "ChartBarStacked" | "ChartCard" | "ChartContainer" | "ChartRanking" | "ChartSparkline" | "DateRangeControl" | "KpiCard" | "TrendBadge" | "createEntityColorMap" | "Accordion" | "AspectRatio" | "BrandField" | "Collapsible" | "CompanyCard" | "Disclosure" | "HiveScene" | "NadiaPresence" | "NumberedSteps" | "Prose" | "ReadingColumn" | "ResizablePanelGroup" | "ScrollArea" | "Separator" | "ToolIcon";
|
|
2
2
|
export type UsageFamily = "Compositions" | "Actions" | "Inputs" | "Choices" | "Status" | "Navigation" | "Data" | "Feedback" | "Menus" | "Charts" | "Other";
|
|
3
3
|
export type ComponentUsage = {
|
|
4
4
|
name: UsageName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,GACP,eAAe,GACf,aAAa,GACb,cAAc,GACd,cAAc,GACd,eAAe,GACf,WAAW,GACX,iBAAiB,GACjB,cAAc,GACd,mBAAmB,GACnB,gBAAgB,GAChB,aAAa,GACb,KAAK,GACL,cAAc,GACd,YAAY,GACZ,eAAe,GACf,QAAQ,GACR,oBAAoB,GACpB,eAAe,GACf,SAAS,GACT,cAAc,GACd,aAAa,GACb,cAAc,GACd,oBAAoB,GACpB,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EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAYhD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,
|
|
1
|
+
{"version":3,"file":"usage.generated.d.ts","sourceRoot":"","sources":["../../src/showcase/usage.generated.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,SAAS,GACjB,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,YAAY,GACZ,aAAa,GACb,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,gBAAgB,GAChB,QAAQ,GACR,aAAa,GACb,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,aAAa,GACb,UAAU,GACV,gBAAgB,GAChB,kBAAkB,GAClB,OAAO,GACP,MAAM,GACN,OAAO,GACP,YAAY,GACZ,UAAU,GACV,OAAO,GACP,cAAc,GACd,eAAe,GACf,cAAc,GACd,QAAQ,GACR,UAAU,GACV,UAAU,GACV,gBAAgB,GAChB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,aAAa,GACb,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,QAAQ,GACR,QAAQ,GACR,mBAAmB,GACnB,mBAAmB,GACnB,QAAQ,GACR,aAAa,GACb,cAAc,GACd,UAAU,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,OAAO,G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GACf,qBAAqB,GACrB,YAAY,GACZ,WAAW,GACX,UAAU,CAAC;AAEf,MAAM,MAAM,WAAW,GACnB,cAAc,GACd,SAAS,GACT,QAAQ,GACR,SAAS,GACT,QAAQ,GACR,YAAY,GACZ,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,OAAO,CAAC;AAEZ,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,SAAS,WAAW,EAYhD,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,SAAS,cAAc,EA+hF1C,CAAC"}
|
|
@@ -65,7 +65,7 @@ export const USAGE = [
|
|
|
65
65
|
summary: "A page whose job is a list of records: its title with the page's actions on one row, its sibling collections, one toolbar, then one line per record.",
|
|
66
66
|
when: "“Use `<Entity>` for a row of descriptive content paired with one or two controls (member rows, integration rows, domain rows).” (https://vercel.com/geist/entity) Ours: a list of entity rows a person finds one of, opens and acts on: Customers, Agents, Skills, Apps, MCP servers, Mailboxes, domains, environment variables (a row with an `editor` expands into its form). Its rows are a `RecordList`'s, so a row has a mark, a name over a muted line and at most three facts; anything wider is not this page. “Projects”: Vercel's Projects page stands a column of titled cards (Usage, Alerts, Recent Previews) at the left of its list. (https://vercel.com/dashboard) Ours: Customers and Partners use the full-width list, with actionable attention above the toolbar when present. Business summaries belong on Dashboard and Analytics. A rail remains available for context that belongs to the collection itself, such as the selected Library hub.",
|
|
67
67
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) Ours: records compared across columns, read by their headings, are a `DataTable` under the page's own title and toolbar. A list inside another page's section is a `RecordList` with its `heading`.",
|
|
68
|
-
behaviour: "With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.",
|
|
68
|
+
behaviour: "Title or none, as Vercel decides it: a page that is one plain list of things a person makes, whose concept needs no sentence, such as Vercel's Domains, Storage, Projects and AI Gateway's API Keys, has no title row, and its actions (its create buttons) end its search row, after the filters. A page that needs its one sentence, or whose commands do something other than create, such as Environment Variables, Members, Integrations and Deployments, keeps its title row with the sentence and every action on it. The product says which a page is (`PageActionsHostProvider`'s `titled`, or this composition's own `title`), never what the page shows at the moment, so an issue appearing above the list never moves the actions. With a `rail`, the toolbar spans the page and under it stand two columns from 1280 px: the rail, 300 px, then the records' card, its top level with the rail's first title and named by the page's title alone, never a second heading, and the records' rows are `RecordList`'s `line` rows; below 1280 px the records come first and the rail follows them. Each rail card has its title above it at 16 px, an optional 44 px muted summary row with its one outline button at its end (a button never stands in a row of its own, so a card with an `action` has a `summary`), then its items: a figure is one 36 px row, its title and its number at the trailing edge; a record is its 24 px mark, a title over a muted line that wraps to a second before it is cut, and a figure or a status at its end, the whole item opening its record; a card with no items draws its `empty` inside it as one 44 px row like an item. While the rail's read is in flight a card's `items` are undefined and it holds its place with three placeholder lines, so the two columns stand from the first frame; a rail whose read `failed` is one card saying so, and the records beside it stay. Under the title sits only the `description`, when the collection's kind needs explaining; otherwise nothing. The title row holds at most one secondary, the primary, then the three dots, which open only for two commands or more. The primary stays in the title row whether the collection is empty or not, filled, as Vercel's Flags keeps Create Flag; a first use repeats it as the filled button in its card. One toolbar holds the search, which grows, then the filters, then the sort; it shows while there are records or a search or filter is set, and is glass only where the rows scroll under it. While a new search, filter or sort is read, the toolbar is busy and, after a second, shows the one waiting line, while the last rows stay. The rows, their states and their loading are the RecordList's; no match is offered only while a search or filter is set.",
|
|
69
69
|
words: '“For multi-facet filters use the plural template `No {Items} Match Your Filters` and suggest widening or clearing.” (https://vercel.com/geist/empty-state) Ours: every string is the product\'s, in sentence case. The title names the collection in the plural ("Agents"); the search says what it finds ("Find a skill"); no match says what found nothing and offers to clear it ("Clear search", "Clear filters").',
|
|
70
70
|
access: "“After an async filter change, wrap the region in `aria-live=\"polite\"` so screen readers announce the new state.” (https://vercel.com/geist/empty-state) Ours: the rows' region is the RecordList's, which holds it. The title is the page's h1 when the composition draws it. The toolbar is named by `label` and busy while `pending`; the rows are the RecordList's table, named by `label`.",
|
|
71
71
|
},
|
|
@@ -208,7 +208,7 @@ export const USAGE = [
|
|
|
208
208
|
summary: "Entity rows: objects a person opens or acts on, one line each on one resting card: the identity mark and name over what it is, a few facts, a status only for the exception, when it happened, at most two row commands, and the three dots last.",
|
|
209
209
|
when: "“Use `<Entity>` for a row of descriptive content paired with one or two controls (member rows, integration rows, domain rows).” (https://vercel.com/geist/entity) Ours: the records are things a person opens or acts on and that name themselves: projects, deployments, domains, members, integrations, Agents, Skills, mailboxes. A list inside another page: an Overview's exceptions, an object page's \"Needs attention\". A page whose whole job is the list is a `CollectionPage`, which draws this. Values edited in place (a domain, an environment variable) are the same rows with an `editor`: the row expands into its form. Of the three kinds of list, entity rows and rows edited in place are this; records compared across columns are a `DataTable`.",
|
|
210
210
|
instead: "“For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity) “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity) Ours: Geist's `Table` is a `DataTable`: this list has no visible headings and at most three facts, so a fourth fact is a table, and anything more than a few facts lives on the record's page. A screen gives `RecordList` the records and what each one says, never its own toolbar, table, rows or menus, and nothing else draws a record row. Its `Description` is `ObjectFacts`. Events in time are an `ActivityFeed`. Reusable things a person adds from a catalogue are a `LibraryShelf`. A descriptive row with prose is an `Item`.",
|
|
211
|
-
behaviour: "One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout=\"line\"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list (\"Deployment retention is enabled. Learn more\", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message. “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state) Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card. “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity) Ours: one or two row commands (outline buttons of 32 px) stand before the three dots (36 px), the Dots Menu. “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity) Ours: three still skeleton rows hold the place, in a region that announces what replaces them; then the first that holds: the failed read, no match, the empty state, the rows.",
|
|
211
|
+
behaviour: "One bordered card, a 1 px rule between records and none after the last. A row is 72 px, with 16 px above and below, and its columns stand left to right at the widths the list declares, so a person reads every list the same way: the `select` box (40 px, only when the list is picked from, an optional column), the identity (the rest: the one column without a size), the facts (each its `size`), the status (`status.size`), the time (`time.size`, tabular), the `checklist` ring (52 px, only when the record has steps to be ready) and the commands (as wide as the widest row's buttons, a failed action's next steps and the three dots or the chevron after them need, worked out from their labels, each label at most 8 px a character and a button holding the longer of its label and its pending label, the dots at their 44 px touch target; 64 px for the three dots or the chevron alone; a row that draws a button or next steps is never narrower than a `commandsSize` the caller gives). A `checklist` puts the record's `ProgressChecklist` ring just before its commands, where Vercel ends a project's row with its Production Checklist; the ring opens its own drawer, never the row. Every row has its 32 px mark, its name (600) and, under it, one muted 14 px line; `name` and the mark are required; a record with nothing to say under its name leaves the line out and is the name alone, never a dash. Give every column a `size` in pixels; the name takes the rest. With `layout=\"line\"`, as on Vercel's Projects page, the facts and the status share one muted line, joined by a middle dot, in a column as wide as the name's, and the row stays one line (mark, name over its line, that summary, the time, the ring, the three dots) on a card wide enough for its sized columns and 160 px each for the name and the summary, and on a narrower card the summary and the time move under the name as muted text joined by a middle dot that wraps, the status keeping its mark whole and breaking between its words only when it alone is wider than the line, in the same row, their labels read by assistive technology only. Rows of `columns` follow the same rule once the card is narrower than their columns: the facts and the time leave the row for that muted text, wrapping so every value stays readable, never a labelled list, and the status stands beside the name, which ends in an ellipsis before it, so the exception is never the part a phone's line cuts. `facts` takes at most three. A menu of one command that is not destructive, with no row command, is that command's button, except in a `line` row, which keeps it in the three dots as Vercel's project row does, and the column is as wide as the widest such button, so its label is never cut. The commands never take the name's room: once the row is compact, its commands column holds only the three dots or the chevron, a sole menu command stays in the dots and the row's own buttons stand under the name, beside a failed action's next steps, outside the row's link, so pressing one never opens the record. Status is only for the exception, empty for the usual record, and its column stands only while a record in the list shows one, so the name and its line keep the room; a fact's column likewise stands only while a record in the list has its value; the commands column likewise stands only while a record has a command, a menu or a message, or the rows open, and it widens for a failed action's next steps only while a row shows one. Never the three dots before the button, a decorative icon for the record's mark, a status on every row, or a destructive button on every row: a destructive command stays in the three dots. A `line` row's summary joins only the facts the record has, so it never ends in a dot. A failed or refused action of the record shows as its catalogue message inside its own row, never a notice under the row: it replaces the detail line, with its next steps beside its commands, or under the message on a card too narrow for the row's columns. With `open` the whole row is one target and takes the `accent` hover, and a row that only opens ends in a muted chevron; a row that opens nothing never reacts to hover. With `editor` the record's row opens its form under its line. `empty` is required: `null` is the choice to draw nothing for a list with no records, and any other value is the state it draws. A note about the whole list is `footer.note`: one muted line, an optional *Learn more* after it at the left and one secondary action at the right, in a strip of its own under the count and the paging, as Vercel ends its deployments list (\"Deployment retention is enabled. Learn more\", *View recently deleted*). Colour is neutral, the name in ink and every other cell in the body grey, except the status badge and a failed action's message. “Pick the variant by what the user needs: no-results for a filtered list that returned zero rows, blank slate or informational for a resource the user hasn’t created, cleared for completed work, permission for role or tier denials, error for a failed load.” (https://vercel.com/geist/empty-state) Ours: `failed`, `noMatch` and `empty` are those variants, drawn inside the card. “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity) Ours: one or two row commands (outline buttons of 32 px) stand before the three dots (36 px), the Dots Menu. “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity) Ours: three still skeleton rows hold the place, in a region that announces what replaces them; then the first that holds: the failed read, no match, the empty state, the rows.",
|
|
212
212
|
words: '“Lead the left column with a scannable identifier: an `Avatar` or icon, a Title Case label, then sentence-case secondary metadata (`Member since Mar 14, 2026`).” (https://vercel.com/geist/entity) Ours: the name is the record\'s own and the labels around it are sentence case, not Title Case. “Keep right-column buttons Verb + Noun (`Remove Member`, `Resend Invite`). Bare verbs like `Remove` or `Confirm` lose context once the row scrolls offscreen.” (https://vercel.com/geist/entity) Ours: every string is the product\'s: `label` names the list, a time\'s `phrase` writes its sentence ("Updated {when}"), `missing` is what a screen reader hears for a record with no time, the menu\'s `label` reads "More for {record}". A row command names its result in sentence case ("Edit domain"). A status is the exception\'s word ("Needs attention"), never "Active" on every row.',
|
|
213
213
|
access: '“Wrap the loading region in `aria-busy="true"` and announce completion with `aria-live="polite"` on the destination container, not the skeleton itself.” (https://vercel.com/geist/skeleton) Ours: the loading rows sit in one `SkeletonRegion` that is busy while they stand and announces what replaces them. A table named by `label`, its column headings read by assistive technology only; the commands column\'s is `commandsHeader`, and empty without one, since its controls name themselves, never the list\'s name a second time. The row link carries `open.label`; the three dots carry the menu\'s `label`, and the menu\'s first line names the record. The loading rows are a status named by `loadingLabel`, inside the one live region that announces what replaces them. “For multi-select rows, the leading `Checkbox` carries `aria-label="Select {entity name}"` so the row is selectable without relying on the visual label.” (https://vercel.com/geist/entity) Ours: each box is named by `select.label`, which reads "Select {record}".',
|
|
214
214
|
},
|
|
@@ -256,6 +256,17 @@ export const USAGE = [
|
|
|
256
256
|
words: '"Helper text is sentence case, one sentence with a trailing period, on a sibling element wired through `aria-describedby`." (https://vercel.com/geist/input) Ours: the description is that helper text for the whole card, and no field has its own. "Render an optional one-sentence description as a sibling under the label that explains ON only. Don’t describe OFF; it’s the negation." (https://vercel.com/geist/toggle) Ours: a header-switch card\'s description says what turning it on does. The title names the values ("Personal details"); the description says what changing them does, in one line; the footer line is a Learn more link, a limit ("Use 32 characters at most."), what stays unaffected, or what is blocked and why ("Ask an owner to change this."); Save and Saving come from the product\'s catalogue, and so does the toast a `saved` callback raises; a delete card\'s description opens "Permanently delete".',
|
|
257
257
|
access: "\"Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`.\" (https://vercel.com/geist/toggle) Ours: the title is the section's h2, or an h3 with `headingLevel` inside an ObjectPage's row, and names the form that saves it, and the header switch. The footer's line is one status, announced politely; a failure under a field marks the control invalid and describes it. Locked fields are inert, so the section's title, description and reason are what a screen reader meets.",
|
|
258
258
|
},
|
|
259
|
+
{
|
|
260
|
+
name: "useCatalogRows",
|
|
261
|
+
module: "catalog-row",
|
|
262
|
+
family: "Compositions",
|
|
263
|
+
summary: "One row for every skill, plugin and MCP server a person meets, in the Portal's Library and an Agent's pages and in Nadia's Edit Agent and company skills: the screen says what each record is, this draws it, and the screen keeps its own commands, menu, status and editor.",
|
|
264
|
+
when: "A `CollectionPage` of skills, plugins or MCP servers. The screen calls it with its records, what each one is (`CatalogRow`) and its words, spreads `list` into the page, passes `filters` as the page's filters and lists `keep`'s rows; a new screen of the same things gets the same row by the same call.",
|
|
265
|
+
instead: "Any other record is the page's own `RecordList` row. The Library's add-from drawer is `CatalogDrawer`; a category on its own is `CategoryTag`.",
|
|
266
|
+
behaviour: "The mark is the neutral ringed tile with the card's own icon, its kind's when the card names none, and the server icon for a server; the name; under it the detail, wrapping in full. Then two facts: the category label (`CategoryTag`), standing only while a row has a category, and where it came from, wrapping in full. The category filter stands after the search only while the rows hold more than one category; `keep` narrows rows to the chosen one, and a choice the rows no longer hold narrows nothing. `narrowed` says a category is chosen, for the page's no match, and `clear` unsets it.",
|
|
267
|
+
words: 'Every string is the product\'s: the source in the same words wherever it means the same ("From the Library", "Added in Nadia", "From the {plugin} plugin"), the category\'s name as its filter writes it.',
|
|
268
|
+
access: "The columns are named by `words.category` and `words.source`; the category's icon is decorative.",
|
|
269
|
+
},
|
|
259
270
|
{
|
|
260
271
|
name: "Button",
|
|
261
272
|
module: "button",
|
|
@@ -729,6 +740,17 @@ export const USAGE = [
|
|
|
729
740
|
words: "None beyond its name, *nadicode*, written as the glossary defines it.",
|
|
730
741
|
access: '`role="img"` named *nadicode* by default; pass `alt=""` where the name is already beside it, and it is hidden.',
|
|
731
742
|
},
|
|
743
|
+
{
|
|
744
|
+
name: "CategoryTag",
|
|
745
|
+
module: "catalog-category",
|
|
746
|
+
family: "Status",
|
|
747
|
+
summary: "A skill's or a plugin's category, as the label on its row.",
|
|
748
|
+
when: "The category a hub card names, on every row that shows a skill or a plugin: the Portal's Library and an Agent's Skills and Plugins, and Nadia's Edit Agent and company skills, so one category reads the same everywhere.",
|
|
749
|
+
instead: "A state is a `StatusBadge`; another categorical fact, such as who it is for, is a `Tag` of its own.",
|
|
750
|
+
behaviour: "A vivid `Tag` in the category's own tone with the category's icon, the same pair on every surface: sales and web blue, finance green, office purple, email and messaging teal, calendar orange, documents yellow, people and voice pink, legal red, other neutral with no icon.",
|
|
751
|
+
words: "The category's name in the product's language, as its filter writes it: \"Finance\".",
|
|
752
|
+
access: "Text; the icon is decorative.",
|
|
753
|
+
},
|
|
732
754
|
{
|
|
733
755
|
name: "CheckCounts",
|
|
734
756
|
module: "check-counts",
|
|
@@ -758,7 +780,7 @@ export const USAGE = [
|
|
|
758
780
|
summary: "What says which thing a record is, at a fixed size at the start of its row, its object's head or its feed line: an Agent's orb, an app's logo, a model maker's mark, a company's logo or initials, a person's picture, or a record kind's icon on its tile.",
|
|
759
781
|
when: "The first thing in a record's row (32), at the head of its object page (64), in a feed or a sidebar identity line (24), on a Library entry (40), for the company at the top of Nadia's list (28): wherever it tells a person which thing they are looking at.",
|
|
760
782
|
instead: "An icon beside a card's title, a KPI's label or a section heading only repeats the words and is left out. A picture for a first use or a whole-page moment is the empty state's or the page's own. A model is its `ModelIdentity`; a maker's mark beside a model's name in a list of models is `ModelMark` at 24.",
|
|
761
|
-
behaviour: "Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin takes the
|
|
783
|
+
behaviour: "Static, except an Agent's orb, which moves with her state. An Agent is always her real orb from the orb engine, at the largest orb size not above the mark's, with no tile and no ring, never an avatar or a painted circle, and `frame` lets the product wrap that orb, such as in the transition that carries her to her page; an app keeps its own logo in its bordered tile on the page ground, or its first letter when it has no logo; a record that belongs to a model maker, such as a key held at that maker, is the maker's `ModelMark` at the mark's size, with its initials when LobeHub has no mark for it; a company is its own logo, contained whole in its original colours and proportions on a dark ringed tile, as Vercel shows a project's favicon, and until a logo is found, or when the stored logo does not load, its initials in white on that same tile, so a found logo only replaces the letters; a company's mark is the same whatever its standing and whichever directory opened it, and a Partner is said in words where its standing matters, never by a colour; a person is their picture, then their initials, in a round mark; a record with no picture of its own takes its kind's own icon, the same icon its section has in the navigation (Mail for a mailbox, a server for an MCP server, a key for a password), in a ringed tile on the card ground; a skill takes the icon its hub card names, and the Skills icon when it names none, on that same neutral ringed tile, so the icon alone tells one skill from another and no colour stands for the kind; a plugin likewise takes the icon its hub card names, and the Plugins icon when it names none, on the same neutral ringed tile, since the colour of a Library row is its category label's alone; a record's own object picture, such as a Library skill's or plugin's, is drawn only at 64, at the head of its own page, on its kind's ground in the icon's place, because at a row's size its detail does not read. A record tile takes `{rounded.sm}` (6 px) corners, `{rounded.md}` (8 px) at 40 and 64; a company's tile and an app's tile take `{rounded.md}` at every size.",
|
|
762
784
|
words: "None of its own: the record's name stands beside it. Initials stand for a company or a person: the first letters of the name's first two words. An app with no logo takes the first letter of its name as a monogram, a model maker with no mark the initials of its slug, and no other kind takes letters.",
|
|
763
785
|
access: "Decorative beside the record's name. Alone, as in a narrow rail, `label` names it.",
|
|
764
786
|
},
|
|
@@ -846,7 +868,7 @@ export const USAGE = [
|
|
|
846
868
|
summary: "One categorical fact in a row, as a pill.",
|
|
847
869
|
when: "One categorical fact in a row: the installation, the partner, the company a record belongs to. A 24 px pill with its 12 px mark.",
|
|
848
870
|
instead: "For a state use `StatusBadge`; a tag never carries one. For a removable filter use `CollectionFilters`. For a way to the thing, a link.",
|
|
849
|
-
behaviour: "Static, truncates inside its width. The same category keeps the same tone across a surface and after sorting. Dashed and muted when it states an absence.",
|
|
871
|
+
behaviour: "Static, truncates inside its width. A tone is one of the palette's eight hues (blue, teal, purple, pink, green, orange, yellow, red) on its soft step with its deep ink, or neutral, and its mark takes the same ink; a vivid tag, a category label's, is the hue itself with the pole that clears AA as its ink. The same category keeps the same tone across a surface and after sorting; a tag is a pill and never a status, which is `StatusBadge`'s shape and word. Dashed and muted when it states an absence.",
|
|
850
872
|
words: "The thing's own name. A quiet tag names the absence in two or three words (*Direct customer*); the note says whose (*Your account*).",
|
|
851
873
|
access: "Text; the mark is decorative. Never focusable unless wrapped by a real link.",
|
|
852
874
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nadicodeai/ui",
|
|
3
|
-
"version": "12.1.
|
|
3
|
+
"version": "12.1.177",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"imports": {
|
|
6
6
|
"#jsx": "./src/jsx/index.ts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@base-ui/react": "^1.9.0",
|
|
73
73
|
"@iconify-icons/logos": "^2.0.3",
|
|
74
74
|
"@iconify/react": "^6.0.2",
|
|
75
|
-
"@nadicodeai/design-system": "12.1.
|
|
75
|
+
"@nadicodeai/design-system": "12.1.177",
|
|
76
76
|
"@tanstack/react-table": "^9.3.1",
|
|
77
77
|
"@vgpu/wgsl": "0.6.0",
|
|
78
78
|
"class-variance-authority": "^0.7.1",
|