@godxjp/ui 33.20.0 → 33.22.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/agent/START-HERE.md +7 -7
- package/agent/components/AppSettingPicker.json +0 -1
- package/agent/components/AppShell.json +11 -1
- package/agent/components/BlockEditor.json +6 -1
- package/agent/components/Button.json +1 -1
- package/agent/components/CardShowcase.json +44 -0
- package/agent/components/CatalogCard.json +83 -0
- package/agent/components/CatalogDetail.json +76 -0
- package/agent/components/CatalogDetailSection.json +52 -0
- package/agent/components/CatalogDetailTag.json +27 -0
- package/agent/components/EditorialArticle.json +53 -0
- package/agent/components/EditorialAuth.json +53 -0
- package/agent/components/EditorialAuthCard.json +52 -0
- package/agent/components/EditorialBanner.json +53 -0
- package/agent/components/EditorialBreadcrumb.json +38 -0
- package/agent/components/EditorialCard.json +70 -0
- package/agent/components/EditorialEmptyPanel.json +57 -0
- package/agent/components/EditorialFilterBar.json +51 -0
- package/agent/components/EditorialFilterField.json +39 -0
- package/agent/components/EditorialFilterPanel.json +46 -0
- package/agent/components/EditorialFooter.json +54 -0
- package/agent/components/EditorialFootnote.json +36 -0
- package/agent/components/EditorialHero.json +52 -0
- package/agent/components/EditorialInlineSearch.json +54 -0
- package/agent/components/EditorialMasthead.json +52 -0
- package/agent/components/EditorialMetaBar.json +37 -0
- package/agent/components/EditorialPageHeader.json +73 -0
- package/agent/components/EditorialPanel.json +48 -0
- package/agent/components/EditorialPillNav.json +41 -0
- package/agent/components/EditorialPrompt.json +54 -0
- package/agent/components/EditorialSearch.json +112 -0
- package/agent/components/EditorialSection.json +68 -0
- package/agent/components/EditorialSectionHead.json +62 -0
- package/agent/components/EditorialStats.json +32 -0
- package/agent/components/EditorialTextButton.json +47 -0
- package/agent/components/EditorialToggleGroup.json +52 -0
- package/agent/components/EditorialToolbar.json +45 -0
- package/agent/components/Eyebrow.json +39 -0
- package/agent/components/HoldingCard.json +69 -0
- package/agent/components/HoldingCardAction.json +51 -0
- package/agent/components/HoldingGrid.json +37 -0
- package/agent/components/Markdown.json +6 -0
- package/agent/components/NumberInput.json +5 -0
- package/agent/components/PriceSummary.json +32 -0
- package/agent/components/SettingsLayout.json +31 -0
- package/agent/components/SettingsPanel.json +53 -0
- package/agent/components/ThemePicker.json +54 -0
- package/agent/components/TopbarItem.json +5 -0
- package/agent/components-index.json +292 -98
- package/agent/components.json +2059 -4
- package/agent/index.json +7 -7
- package/agent/llms.txt +8 -8
- package/agent/tokens.json +5640 -132
- package/dist/components/data-display/badge.js +4 -2
- package/dist/components/data-display/image.js +6 -0
- package/dist/components/data-entry/form-field.js +2 -2
- package/dist/components/data-entry/number-input.d.ts +1 -0
- package/dist/components/data-entry/number-input.js +8 -0
- package/dist/components/data-entry/select.js +24 -2
- package/dist/components/general/button.js +14 -1
- package/dist/components/general/typography.d.ts +1 -1
- package/dist/components/layout/app-shell.d.ts +1 -1
- package/dist/components/layout/app-shell.js +28 -2
- package/dist/components/layout/centered-shell.js +4 -0
- package/dist/components/layout/editorial-account.d.ts +51 -0
- package/dist/components/layout/editorial-account.js +466 -0
- package/dist/components/layout/editorial-catalog.d.ts +18 -0
- package/dist/components/layout/editorial-catalog.js +164 -0
- package/dist/components/layout/editorial.d.ts +56 -0
- package/dist/components/layout/editorial.js +867 -0
- package/dist/components/layout/index.d.ts +6 -0
- package/dist/components/layout/index.js +98 -0
- package/dist/components/layout/mobile-shell.d.ts +2 -0
- package/dist/components/layout/mobile-shell.js +18 -11
- package/dist/components/layout/responsive-grid.js +9 -1
- package/dist/components/layout/topbar-item.d.ts +1 -0
- package/dist/components/layout/topbar-item.js +2 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/lab/legal-document-shell.js +61 -51
- package/dist/lib/toast-clearance.js +1 -1
- package/dist/props/components/data-display.prop.d.ts +2 -0
- package/dist/props/components/data-entry.prop.d.ts +9 -0
- package/dist/props/components/editorial-account.prop.d.ts +249 -0
- package/dist/props/components/editorial-account.prop.js +0 -0
- package/dist/props/components/general.prop.d.ts +6 -2
- package/dist/props/components/layout.prop.d.ts +602 -2
- package/dist/props/registry.d.ts +1124 -0
- package/dist/props/registry.js +792 -0
- package/dist/styles/badge-layout.css +2 -0
- package/dist/styles/control.css +60 -13
- package/dist/styles/core.css +1 -0
- package/dist/styles/data-display-layout.css +9 -3
- package/dist/styles/editorial-account-layout.css +1130 -0
- package/dist/styles/focus-ring.css +33 -10
- package/dist/styles/form-layout.css +8 -1
- package/dist/styles/index.css +1 -0
- package/dist/styles/layers.json +248 -1
- package/dist/styles/layout.css +2031 -0
- package/dist/styles/logo-layout.css +27 -0
- package/dist/styles/shell-layout.css +101 -3
- package/dist/styles/table-layout.css +25 -13
- package/dist/styles/text-layout.css +6 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/base.css +2 -0
- package/dist/tokens/components/badge.css +3 -0
- package/dist/tokens/components/control.css +9 -0
- package/dist/tokens/components/editorial-account.css +393 -0
- package/dist/tokens/components/editorial.css +721 -0
- package/dist/tokens/components/form.css +4 -0
- package/dist/tokens/components/logo.css +2 -0
- package/dist/tokens/components/shell.css +23 -0
- package/dist/tokens/components/table.css +1 -1
- package/docs/TOKENS.md +26 -0
- package/package.json +2 -2
- package/scripts/ui-audit.mjs +3 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npm i @godxjp/ui
|
|
|
18
18
|
|
|
19
19
|
<!-- agent-catalog-counts:start -->
|
|
20
20
|
|
|
21
|
-
The catalog —
|
|
21
|
+
The catalog — 210 components, 3184 tokens, 44 cardinal rules — is published in two forms from one
|
|
22
22
|
source. **Entry point for either: [`AGENTS.md`](AGENTS.md).**
|
|
23
23
|
<!-- agent-catalog-counts:end -->
|
|
24
24
|
|
|
@@ -53,10 +53,10 @@ static files straight from this public repo — no hosting, no deploy step:
|
|
|
53
53
|
| [`agent/llms.txt`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/llms.txt) | 3 KB | the [llms.txt](https://llmstxt.org/) entry point |
|
|
54
54
|
| [`agent/DESIGN.md`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/DESIGN.md) | 18 KB | the visual spec: tokens, colour scarcity, admin screen anatomy, do/don't |
|
|
55
55
|
| [`agent/index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json) | 3 KB | manifest: version, counts, every file's URL |
|
|
56
|
-
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) |
|
|
56
|
+
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) | 46 KB | all 210 as name + group + tagline — **fetch this first** |
|
|
57
57
|
| [`agent/components/<Name>.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json) | 1 KB–38 KB | one file per component, each with its `importPath` — **this is the route to take** |
|
|
58
|
-
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.
|
|
59
|
-
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) |
|
|
58
|
+
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.4 MB | all 210 entries in one file — most URL fetchers truncate this silently; prefer the per-component files |
|
|
59
|
+
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) | 1.4 MB | all 3184 design tokens, their values and why they exist |
|
|
60
60
|
| [`agent/vocabulary.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json) | 7 KB | the controlled prop vocabulary |
|
|
61
61
|
| [`agent/rules.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json) | 23 KB | the 44 cardinal rules |
|
|
62
62
|
<!-- prettier-ignore-end -->
|
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 33.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 33.22.1.** If the project you are editing has a different
|
|
7
7
|
version in its `package.json`, read the pinned catalog for THAT version instead
|
|
8
8
|
(`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
|
|
9
9
|
not exist yet; older, and it hides props that do. Neither failure announces itself.
|
|
@@ -52,24 +52,24 @@ screen anatomy, the visual target the rules below do not give you. Then fetch in
|
|
|
52
52
|
task is a task** — "build a settings page", "confirm a destructive delete", "a list page with
|
|
53
53
|
filters" — start HERE, not at the components. Then fetch `patterns/<name>.json` for complete,
|
|
54
54
|
copy-paste-ready code. A component index answers "does X exist"; it cannot answer "build Y".
|
|
55
|
-
1. `components-index.json` —
|
|
55
|
+
1. `components-index.json` — 46 KB, all 210 components as name + group +
|
|
56
56
|
tagline. Read this when you already know the SHAPE you need. Each entry may carry `absorbed`:
|
|
57
57
|
names that **do not exist** and map to it — `Combobox`, `Autocomplete`, `CountrySelect` and
|
|
58
58
|
`SearchSelect` are all `Select`. If you are about to hand-roll something, search this field
|
|
59
59
|
first; it exists because that is the mistake.
|
|
60
|
-
2. `components/<Name>.json` — one file per component (1 KB–38 KB, median
|
|
60
|
+
2. `components/<Name>.json` — one file per component (1 KB–38 KB, median 5 KB), carrying its props,
|
|
61
61
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
62
62
|
3. `rules.json` — 44 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
63
63
|
style advice.
|
|
64
|
-
4. `tokens.json` —
|
|
64
|
+
4. `tokens.json` — 3184 design tokens, each tagged with its `tier`. **If you were handed a
|
|
65
65
|
brand, read the 220 `foundation` entries first** — `--primary`, `--background`,
|
|
66
66
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
67
|
-
|
|
67
|
+
2851 `component` entries are per-part knobs; reach for one only when a role is
|
|
68
68
|
right everywhere except one component.
|
|
69
69
|
5. `anti-ai-tells.json` — 35 shapes that make generated UI look generated, each with the
|
|
70
70
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
71
71
|
|
|
72
|
-
**Do not fetch `components.json`.** It is 1.
|
|
72
|
+
**Do not fetch `components.json`.** It is 1.4 MB, and most URL fetchers truncate a
|
|
73
73
|
response that size and return the head without telling you. You get the first few entries, believe
|
|
74
74
|
you read the catalog, and answer the rest from memory — which is the failure this file exists to
|
|
75
75
|
prevent. The per-component files say the same thing without the cliff.
|
|
@@ -150,7 +150,7 @@ has stopped following the brand.
|
|
|
150
150
|
|---|---|---|---|
|
|
151
151
|
| `foundation` | 220 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** The default `--primary` is a neutral placeholder: set it (`:root { --primary: <H> <S>% <L>%; }`, HSL components, no `hsl()` wrapper) or import a theme preset such as `@godxjp/ui/themes/godx.css` |
|
|
152
152
|
| `semantic` | 113 | named roles that follow the seeds — `--ring`, `--text-link`, `--primary-hover`, `--overlay-background` | only when the seed is right and ONE role must differ. That role then stops following a later brand change |
|
|
153
|
-
| `component` |
|
|
153
|
+
| `component` | 2851 | per-part knobs, `--{component}-{part}-{property}` | rarely. Most are declared `initial` with the real default at the call site — deliberate, so a scoped override re-resolves instead of freezing at `:root` |
|
|
154
154
|
|
|
155
155
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
156
156
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
"importPath": "@godxjp/ui/layout",
|
|
5
5
|
"name": "AppShell",
|
|
6
6
|
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Phone-only destinations in drawer mode (<=900px). Reuses MobileShell tabBar: equal-width children, safe-area insets, aria-current=page. Reserve the measured band outside the scrolling main; the app footer flows at the end of main, leaving only this bottom navigation persistent; publishes --app-shell-mobile-tab-bar-block-size on the shell and --toast-sticky-bar-height on html. Omit/null/false for none; responsiveNavigation=none disables it. Use 3–5 Button asChild links; native Tab/Shift+Tab and Enter. Hidden on desktop and in print. External dock: reserve --app-shell-viewport-inset; bar stays inside the remaining shell viewport.",
|
|
9
|
+
"name": "mobileTabBar",
|
|
10
|
+
"type": "ReactNode"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Navigation landmark name; defaults to the shared localized primary-navigation label (ja/en/vi).",
|
|
14
|
+
"name": "mobileTabBarLabel",
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
7
17
|
{
|
|
8
18
|
"description": "Optional sidebar node, typically a Sidebar. Omit or pass null/false to remove its landmark and grid track. Logo remains in the topbar; navRail is independent.",
|
|
9
19
|
"name": "sidebar",
|
|
@@ -86,7 +96,7 @@
|
|
|
86
96
|
"type": "string"
|
|
87
97
|
},
|
|
88
98
|
{
|
|
89
|
-
"description": "App-level footer
|
|
99
|
+
"description": "App-level footer with page keyline insets (--space-page-x, --space-page-compact-x on phones). Outside main on desktop; when mobileTabBar is visible, flows at the end of the scrolling main instead of reserving persistent chrome.",
|
|
90
100
|
"name": "footer",
|
|
91
101
|
"type": "ReactNode"
|
|
92
102
|
},
|
|
@@ -57,10 +57,15 @@
|
|
|
57
57
|
"type": "\"framed\" | \"plain\""
|
|
58
58
|
},
|
|
59
59
|
{
|
|
60
|
-
"description": "Extra `/` rows ({ key, label, icon, keywords?, run(api) }) — `api.insertMarkdown` inserts through the codec.",
|
|
60
|
+
"description": "Extra `/` rows ({ key, label, icon, keywords?, run(api) }) — `api.insertMarkdown` inserts through the codec, so a directive skeleton (`:::poll[Q]{id=x}\\n- A\\n- B\\n:::`) lands as a directive block.",
|
|
61
61
|
"name": "actions",
|
|
62
62
|
"type": "BlockEditorAction[]"
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
"description": "Editor previews for directive blocks, by name. A container directive the kit does not model (`:::poll[…]{…}`) is one atomic block — dragged, deleted and inserted whole, its source edited behind Edit source; the preview gets `{ name, label, attributes, source, body }` (canonical). No renderer, or `undefined`: the block shows its source.",
|
|
66
|
+
"name": "directives",
|
|
67
|
+
"type": "Record<string, (block: DirectiveBlock) => ReactNode | undefined>"
|
|
68
|
+
},
|
|
64
69
|
{
|
|
65
70
|
"description": "Override any string (defaults: kit ja / en / vi).",
|
|
66
71
|
"name": "labels",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
"defaultValue": "false",
|
|
62
|
-
"description": "In-flight state — shows a leading `Loader2` spinner (replaces a leading icon if present), sets `aria-busy=\"true\"`, and blocks activation (
|
|
62
|
+
"description": "In-flight state — shows a leading `Loader2` spinner (replaces a leading icon if present), sets `aria-busy=\"true\"` and `aria-disabled=\"true\"`, and blocks activation (click, Enter/Space and a `type=\"submit\"` form submission are swallowed; pointer-events disabled) while keeping the label visible so the width doesn't jump. It never sets native `disabled`, so the button keeps focus while the request runs — a disabled element drops focus to <body>, which strands a keyboard user outside a dialog after a failed save. Prefer this over a hand-rolled `<Loader2 className=\"animate-spin\">` inside the button. Ignored when `asChild` (Slot requires a single child).",
|
|
63
63
|
"name": "loading",
|
|
64
64
|
"type": "boolean"
|
|
65
65
|
},
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CardShowcase } from \"@godxjp/ui/layout\";\n\n<CardShowcase preset=\"fan\" label=\"ONE PLACE. MANY WORLDS.\" caption={{ overline: \"A whole world in your hands.\", title: \"Find your next favourite.\" }} items={cards.map((c) => <a key={c.id} href={c.href} aria-label={c.name}><img src={c.image} alt={c.name} /></a>)} />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "CardShowcase",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Composition.",
|
|
9
|
+
"name": "preset",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "\"fan\" | \"binder\""
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "Pictures in reading order (links wrapping an img, or imgs).",
|
|
15
|
+
"name": "items",
|
|
16
|
+
"required": true,
|
|
17
|
+
"type": "ReactNode[]"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"description": "fan: corner label.",
|
|
21
|
+
"name": "label",
|
|
22
|
+
"type": "ReactNode"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"description": "fan: caption card.",
|
|
26
|
+
"name": "caption",
|
|
27
|
+
"type": "{ icon?: ReactNode; overline?: ReactNode; title: ReactNode }"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"related": [
|
|
31
|
+
"EditorialHero — the `media` slot.",
|
|
32
|
+
"EditorialBanner — the `media` slot (binder)."
|
|
33
|
+
],
|
|
34
|
+
"rules": [
|
|
35
|
+
2,
|
|
36
|
+
6,
|
|
37
|
+
44,
|
|
38
|
+
45
|
|
39
|
+
],
|
|
40
|
+
"tagline": "A staged composition of product pictures (gh#1435). `preset=\"fan\"`: three cards fanned (start, centre, end) over ornament orbits, stars and a glow, with a corner `label` and a `caption` card. `preset=\"binder\"`: a tilted binder page of up to six pockets. Decorations are aria-hidden; each item keeps its own accessible name. Geometry: `--editorial-showcase-*`, `--editorial-binder-*`.",
|
|
41
|
+
"usage": [
|
|
42
|
+
"DO give each linked picture an accessible name; the stage itself is decoration."
|
|
43
|
+
]
|
|
44
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CatalogCard, CatalogCardTag } from \"@godxjp/ui/layout\";\n\n<CatalogCard media={<a href={href} tabIndex={-1} aria-hidden><img src={img} alt=\"\" /></a>} favorite={{ pressed: saved, onPressedChange: setSaved, label: saveLabel }} overline=\"Pokémon\" title={<a href={href}>{name}</a>} meta={<><span>132/106</span><CatalogCardTag>SAR</CatalogCardTag></>} price=\"¥12,800\" change=\"↓ −4.2%\" />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "CatalogCard",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "The picture (a link, tabIndex -1 + aria-hidden, wrapping an img).",
|
|
9
|
+
"name": "media",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "ReactNode"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "The item link.",
|
|
15
|
+
"name": "title",
|
|
16
|
+
"required": true,
|
|
17
|
+
"type": "ReactNode"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"defaultValue": "\"card\"",
|
|
21
|
+
"description": "Picture frame.",
|
|
22
|
+
"name": "variant",
|
|
23
|
+
"type": "\"card\" | \"sealed\""
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"description": "Overlaid toggle; disabled while the saved state is loading.",
|
|
27
|
+
"name": "favorite",
|
|
28
|
+
"type": "{ pressed: boolean; onPressedChange: (pressed: boolean) => void; label: string; disabled?: boolean }"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"description": "Line above the title.",
|
|
32
|
+
"name": "overline",
|
|
33
|
+
"type": "ReactNode"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"defaultValue": "3",
|
|
37
|
+
"description": "Heading level.",
|
|
38
|
+
"name": "level",
|
|
39
|
+
"type": "2 | 3 | 4"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"description": "Metadata row.",
|
|
43
|
+
"name": "meta",
|
|
44
|
+
"type": "ReactNode"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"description": "Price caption.",
|
|
48
|
+
"name": "priceLabel",
|
|
49
|
+
"type": "ReactNode"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"description": "Price figure.",
|
|
53
|
+
"name": "price",
|
|
54
|
+
"type": "ReactNode"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"description": "Price change.",
|
|
58
|
+
"name": "change",
|
|
59
|
+
"type": "ReactNode"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"description": "Bottom row (links inside get the row's link style).",
|
|
63
|
+
"name": "footer",
|
|
64
|
+
"type": "ReactNode"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"related": [
|
|
68
|
+
"ResponsiveGrid — `preset=\"catalog\"`."
|
|
69
|
+
],
|
|
70
|
+
"rules": [
|
|
71
|
+
2,
|
|
72
|
+
6,
|
|
73
|
+
44,
|
|
74
|
+
45
|
|
75
|
+
],
|
|
76
|
+
"subParts": [
|
|
77
|
+
"CatalogCardTag"
|
|
78
|
+
],
|
|
79
|
+
"tagline": "A catalog tile (gh#1435): the framed picture with an overlaid circular favourite toggle, then an overline, the title (a heading wrapping the item link, clamped to two lines), a metadata row with `CatalogCardTag`s, a price caption and line (price + change), and a footer row. `variant=\"sealed\"` frames a wider, unshadowed product picture. Geometry: `--editorial-catalog-card-*`.",
|
|
80
|
+
"usage": [
|
|
81
|
+
"DO lay tiles out with `ResponsiveGrid preset=\"catalog\"`."
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CatalogDetail, CatalogDetailTag, Eyebrow } from \"@godxjp/ui/layout\";\n\n<CatalogDetail media={<img src={src} alt={name} />} overline={<Eyebrow>Pokémon</Eyebrow>} title={name} meta={<CatalogDetailTag>SAR</CatalogDetailTag>} summary={{ label: \"Market\", price: \"¥32,800\" }} facts={[{ key: \"set\", label: \"Expansion\", value: \"151\" }]} />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "CatalogDetail",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"defaultValue": "\"card\"",
|
|
9
|
+
"description": "Frame for a card or a sealed package.",
|
|
10
|
+
"name": "variant",
|
|
11
|
+
"type": "\"card\" | \"sealed\""
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "The picture.",
|
|
15
|
+
"name": "media",
|
|
16
|
+
"required": true,
|
|
17
|
+
"type": "ReactNode"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"description": "Save toggle over the frame.",
|
|
21
|
+
"name": "favorite",
|
|
22
|
+
"type": "{ pressed; onPressedChange; label; disabled? }"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"description": "Line under the frame.",
|
|
26
|
+
"name": "mediaCaption",
|
|
27
|
+
"type": "ReactNode"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"description": "Kicker (an Eyebrow).",
|
|
31
|
+
"name": "overline",
|
|
32
|
+
"type": "ReactNode"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"description": "The h1.",
|
|
36
|
+
"name": "title",
|
|
37
|
+
"required": true,
|
|
38
|
+
"type": "ReactNode"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"description": "CatalogDetailTags.",
|
|
42
|
+
"name": "meta",
|
|
43
|
+
"type": "ReactNode"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"description": "Summary price block.",
|
|
47
|
+
"name": "summary",
|
|
48
|
+
"type": "{ label?; price; note? }"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Actions under the summary.",
|
|
52
|
+
"name": "actions",
|
|
53
|
+
"type": "ReactNode"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"description": "Facts, two columns.",
|
|
57
|
+
"name": "facts",
|
|
58
|
+
"type": "{ key; label; value }[]"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"related": [
|
|
62
|
+
"CatalogCard — the item in a grid.",
|
|
63
|
+
"CatalogDetailSection — the bands under it."
|
|
64
|
+
],
|
|
65
|
+
"rules": [
|
|
66
|
+
2,
|
|
67
|
+
6,
|
|
68
|
+
44,
|
|
69
|
+
45
|
|
70
|
+
],
|
|
71
|
+
"tagline": "The head of a catalog item's page (gh#1438): a framed picture with the save toggle over its corner and a caption, beside the kicker, the page's h1, a row of CatalogDetailTags, a summary price between hairlines, actions and a two-column facts list. Geometry: `--editorial-catalog-detail-*`.",
|
|
72
|
+
"usage": [
|
|
73
|
+
"DO pass the item's one h1 as title; the page has no other h1.",
|
|
74
|
+
"DO use CatalogCard for the same item in a grid."
|
|
75
|
+
]
|
|
76
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CatalogDetailSection } from \"@godxjp/ui/layout\";\n\n<CatalogDetailSection titleId=\"info\" title=\"Card information\" description=\"From the catalogue.\" />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "CatalogDetailSection",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"defaultValue": "\"band\"",
|
|
9
|
+
"description": "Hairlined band, or a page module (no hairline, module rhythm).",
|
|
10
|
+
"name": "variant",
|
|
11
|
+
"type": "\"band\" | \"module\""
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "Id on the section (in-page link target).",
|
|
15
|
+
"name": "id",
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "The h2.",
|
|
20
|
+
"name": "title",
|
|
21
|
+
"type": "ReactNode"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Muted paragraph.",
|
|
25
|
+
"name": "description",
|
|
26
|
+
"type": "ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "Anything after.",
|
|
30
|
+
"name": "children",
|
|
31
|
+
"type": "ReactNode"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"description": "Id on the h2 (names the section).",
|
|
35
|
+
"name": "titleId",
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"related": [
|
|
40
|
+
"EditorialSection — a full-width band of a sections page."
|
|
41
|
+
],
|
|
42
|
+
"rules": [
|
|
43
|
+
2,
|
|
44
|
+
6,
|
|
45
|
+
44,
|
|
46
|
+
45
|
|
47
|
+
],
|
|
48
|
+
"tagline": "One band of an item page under its head (gh#1438): a top hairline, an h2, a muted paragraph, then anything else. Geometry: `--editorial-catalog-detail-section-*`.",
|
|
49
|
+
"usage": [
|
|
50
|
+
"DO pass titleId so the section is a named region."
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CatalogDetailTag } from \"@godxjp/ui/layout\";\n\n<CatalogDetailTag>SV8 132/106</CatalogDetailTag>",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "CatalogDetailTag",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Tag text.",
|
|
9
|
+
"name": "children",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "ReactNode"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"related": [
|
|
15
|
+
"CatalogCardTag — the tag of a grid tile."
|
|
16
|
+
],
|
|
17
|
+
"rules": [
|
|
18
|
+
2,
|
|
19
|
+
6,
|
|
20
|
+
44,
|
|
21
|
+
45
|
|
22
|
+
],
|
|
23
|
+
"tagline": "One outlined tag (number, rarity, printed language) in a CatalogDetail meta row (gh#1438).",
|
|
24
|
+
"usage": [
|
|
25
|
+
"DO keep it to a short code or word."
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { EditorialArticle, EditorialArticleSection, EditorialNote, Eyebrow } from \"@godxjp/ui/layout\";\n\n<EditorialArticle eyebrow={<Eyebrow>PRICE GUIDE</Eyebrow>} title=\"A fair comparison starts with the details.\" intro=\"A matching card name is only the beginning.\">\n <EditorialArticleSection title=\"Check it is the same card\" paragraphs={[\"Confirm the game, card number and set.\"]} />\n <EditorialNote>An original guide, not a price forecast.</EditorialNote>\n</EditorialArticle>",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "EditorialArticle",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "The page's h1.",
|
|
9
|
+
"name": "title",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "ReactNode"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "Kicker above it (an Eyebrow).",
|
|
15
|
+
"name": "eyebrow",
|
|
16
|
+
"type": "ReactNode"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Lead paragraph under it.",
|
|
20
|
+
"name": "intro",
|
|
21
|
+
"type": "ReactNode"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Sections, note, link.",
|
|
25
|
+
"name": "children",
|
|
26
|
+
"type": "ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "Id on the h1.",
|
|
30
|
+
"name": "titleId",
|
|
31
|
+
"type": "string"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"related": [
|
|
35
|
+
"EditorialBreadcrumb, EditorialTextLink, LegalDocumentShell."
|
|
36
|
+
],
|
|
37
|
+
"rules": [
|
|
38
|
+
2,
|
|
39
|
+
6,
|
|
40
|
+
44,
|
|
41
|
+
45
|
|
42
|
+
],
|
|
43
|
+
"subParts": [
|
|
44
|
+
"EditorialArticleSection",
|
|
45
|
+
"EditorialNote"
|
|
46
|
+
],
|
|
47
|
+
"tagline": "The reading column of a long-form editorial page (gh#1440): the ruled kicker, the page's one h1, an intro set off by a rule, then `EditorialArticleSection`s (an h2 and paragraphs at the reading leading), an `EditorialNote` and a trailing `EditorialTextLink`. Block flow with collapsing margins, so the design's rhythm holds. Geometry: `--editorial-article-*`, `--editorial-note-*`.",
|
|
48
|
+
"usage": [
|
|
49
|
+
"DO put it in an EditorialSection after an EditorialBreadcrumb on a `flow=\"sections\"` page.",
|
|
50
|
+
"DO pass each prose paragraph in `EditorialArticleSection paragraphs`, not raw `<p>`.",
|
|
51
|
+
"DON'T use it for a versioned legal/admin document — that is LegalDocumentShell."
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { EditorialAuth, EditorialAuthCard, Eyebrow } from \"@godxjp/ui/layout\";\n\n<EditorialAuth eyebrow={<Eyebrow>YOUR COLLECTION STARTS HERE</Eyebrow>} title=\"Make room for what you love.\" benefits={[\"A collection of your own\"]}><EditorialAuthCard title=\"Welcome back.\" /></EditorialAuth>",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "EditorialAuth",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Kicker.",
|
|
9
|
+
"name": "eyebrow",
|
|
10
|
+
"type": "ReactNode"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Display title (h1).",
|
|
14
|
+
"name": "title",
|
|
15
|
+
"required": true,
|
|
16
|
+
"type": "ReactNode"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Copy.",
|
|
20
|
+
"name": "description",
|
|
21
|
+
"type": "ReactNode"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Picture on the front card.",
|
|
25
|
+
"name": "art",
|
|
26
|
+
"type": "ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "Benefit lines.",
|
|
30
|
+
"name": "benefits",
|
|
31
|
+
"type": "ReactNode[]"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"description": "EditorialAuthCard.",
|
|
35
|
+
"name": "children",
|
|
36
|
+
"type": "ReactNode"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"related": [
|
|
40
|
+
"EditorialAuthCard — the card.",
|
|
41
|
+
"CenteredShell — use variant=\"auth\" for the application sign-in shell."
|
|
42
|
+
],
|
|
43
|
+
"rules": [
|
|
44
|
+
2,
|
|
45
|
+
6,
|
|
46
|
+
44,
|
|
47
|
+
45
|
|
48
|
+
],
|
|
49
|
+
"tagline": "A sign-in / sign-up page (gh#1439): a story column (kicker, display title — line breaks kept —, copy, a decorative card pair carrying `art`, benefit lines with a check) beside the form card (`children`, default 460px). Geometry: `--editorial-auth-*`.",
|
|
50
|
+
"usage": [
|
|
51
|
+
"DO keep the form in an EditorialAuthCard with Form + FormField."
|
|
52
|
+
]
|
|
53
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { EditorialAuthCard } from \"@godxjp/ui/layout\";\n\n<EditorialAuthCard title=\"Welcome back.\" description=\"Sign in to see your collection.\" footer=\"New here?\" />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "EditorialAuthCard",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Badge slot.",
|
|
9
|
+
"name": "badge",
|
|
10
|
+
"type": "ReactNode"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Title.",
|
|
14
|
+
"name": "title",
|
|
15
|
+
"required": true,
|
|
16
|
+
"type": "ReactNode"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Heading level. Default: 2.",
|
|
20
|
+
"name": "level",
|
|
21
|
+
"type": "2 | 3"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Copy.",
|
|
25
|
+
"name": "description",
|
|
26
|
+
"type": "ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "The form.",
|
|
30
|
+
"name": "children",
|
|
31
|
+
"type": "ReactNode"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"description": "Ruled footer line.",
|
|
35
|
+
"name": "footer",
|
|
36
|
+
"type": "ReactNode"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"related": [
|
|
40
|
+
"EditorialAuth — the page."
|
|
41
|
+
],
|
|
42
|
+
"rules": [
|
|
43
|
+
2,
|
|
44
|
+
6,
|
|
45
|
+
44,
|
|
46
|
+
45
|
|
47
|
+
],
|
|
48
|
+
"tagline": "The form card of EditorialAuth (gh#1439): badge, title, copy, the form (`children`) and a ruled footer line (\"New to the site? Create an account\").",
|
|
49
|
+
"usage": [
|
|
50
|
+
"DO keep one form per card."
|
|
51
|
+
]
|
|
52
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { CardShowcase, EditorialBanner, Eyebrow } from \"@godxjp/ui/layout\";\nimport { Button } from \"@godxjp/ui/general\";\n\n<EditorialBanner eyebrow={<Eyebrow>YOUR COLLECTION HAS A STORY.</Eyebrow>} title=\"A home for the cards that matter.\" action={<Button asChild><a href=\"/collection/\">Start your collection</a></Button>} media={<CardShowcase preset=\"binder\" items={pockets} />} />",
|
|
3
|
+
"group": "layout",
|
|
4
|
+
"importPath": "@godxjp/ui/layout",
|
|
5
|
+
"name": "EditorialBanner",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "The heading.",
|
|
9
|
+
"name": "title",
|
|
10
|
+
"required": true,
|
|
11
|
+
"type": "ReactNode"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"description": "Kicker.",
|
|
15
|
+
"name": "eyebrow",
|
|
16
|
+
"type": "ReactNode"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"description": "Paragraph.",
|
|
20
|
+
"name": "description",
|
|
21
|
+
"type": "ReactNode"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"description": "Call to action (a kit Button).",
|
|
25
|
+
"name": "action",
|
|
26
|
+
"type": "ReactNode"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"description": "Media column (a CardShowcase preset=\"binder\").",
|
|
30
|
+
"name": "media",
|
|
31
|
+
"type": "ReactNode"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"defaultValue": "2",
|
|
35
|
+
"description": "Heading level.",
|
|
36
|
+
"name": "level",
|
|
37
|
+
"type": "2 | 3"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"related": [
|
|
41
|
+
"CardShowcase."
|
|
42
|
+
],
|
|
43
|
+
"rules": [
|
|
44
|
+
2,
|
|
45
|
+
6,
|
|
46
|
+
44,
|
|
47
|
+
45
|
|
48
|
+
],
|
|
49
|
+
"tagline": "A rounded brand panel inside the column (gh#1435): kicker, title, description and a call to action beside a media slot, in the inverse palette. The kit Button in `action` is re-pointed to the inverse roles. Colours and geometry: `--editorial-banner-*`.",
|
|
50
|
+
"usage": [
|
|
51
|
+
"DO put it in an EditorialSection with spacing=\"section\"."
|
|
52
|
+
]
|
|
53
|
+
}
|