@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.
Files changed (116) hide show
  1. package/README.md +4 -4
  2. package/agent/START-HERE.md +7 -7
  3. package/agent/components/AppSettingPicker.json +0 -1
  4. package/agent/components/AppShell.json +11 -1
  5. package/agent/components/BlockEditor.json +6 -1
  6. package/agent/components/Button.json +1 -1
  7. package/agent/components/CardShowcase.json +44 -0
  8. package/agent/components/CatalogCard.json +83 -0
  9. package/agent/components/CatalogDetail.json +76 -0
  10. package/agent/components/CatalogDetailSection.json +52 -0
  11. package/agent/components/CatalogDetailTag.json +27 -0
  12. package/agent/components/EditorialArticle.json +53 -0
  13. package/agent/components/EditorialAuth.json +53 -0
  14. package/agent/components/EditorialAuthCard.json +52 -0
  15. package/agent/components/EditorialBanner.json +53 -0
  16. package/agent/components/EditorialBreadcrumb.json +38 -0
  17. package/agent/components/EditorialCard.json +70 -0
  18. package/agent/components/EditorialEmptyPanel.json +57 -0
  19. package/agent/components/EditorialFilterBar.json +51 -0
  20. package/agent/components/EditorialFilterField.json +39 -0
  21. package/agent/components/EditorialFilterPanel.json +46 -0
  22. package/agent/components/EditorialFooter.json +54 -0
  23. package/agent/components/EditorialFootnote.json +36 -0
  24. package/agent/components/EditorialHero.json +52 -0
  25. package/agent/components/EditorialInlineSearch.json +54 -0
  26. package/agent/components/EditorialMasthead.json +52 -0
  27. package/agent/components/EditorialMetaBar.json +37 -0
  28. package/agent/components/EditorialPageHeader.json +73 -0
  29. package/agent/components/EditorialPanel.json +48 -0
  30. package/agent/components/EditorialPillNav.json +41 -0
  31. package/agent/components/EditorialPrompt.json +54 -0
  32. package/agent/components/EditorialSearch.json +112 -0
  33. package/agent/components/EditorialSection.json +68 -0
  34. package/agent/components/EditorialSectionHead.json +62 -0
  35. package/agent/components/EditorialStats.json +32 -0
  36. package/agent/components/EditorialTextButton.json +47 -0
  37. package/agent/components/EditorialToggleGroup.json +52 -0
  38. package/agent/components/EditorialToolbar.json +45 -0
  39. package/agent/components/Eyebrow.json +39 -0
  40. package/agent/components/HoldingCard.json +69 -0
  41. package/agent/components/HoldingCardAction.json +51 -0
  42. package/agent/components/HoldingGrid.json +37 -0
  43. package/agent/components/Markdown.json +6 -0
  44. package/agent/components/NumberInput.json +5 -0
  45. package/agent/components/PriceSummary.json +32 -0
  46. package/agent/components/SettingsLayout.json +31 -0
  47. package/agent/components/SettingsPanel.json +53 -0
  48. package/agent/components/ThemePicker.json +54 -0
  49. package/agent/components/TopbarItem.json +5 -0
  50. package/agent/components-index.json +292 -98
  51. package/agent/components.json +2059 -4
  52. package/agent/index.json +7 -7
  53. package/agent/llms.txt +8 -8
  54. package/agent/tokens.json +5640 -132
  55. package/dist/components/data-display/badge.js +4 -2
  56. package/dist/components/data-display/image.js +6 -0
  57. package/dist/components/data-entry/form-field.js +2 -2
  58. package/dist/components/data-entry/number-input.d.ts +1 -0
  59. package/dist/components/data-entry/number-input.js +8 -0
  60. package/dist/components/data-entry/select.js +24 -2
  61. package/dist/components/general/button.js +14 -1
  62. package/dist/components/general/typography.d.ts +1 -1
  63. package/dist/components/layout/app-shell.d.ts +1 -1
  64. package/dist/components/layout/app-shell.js +28 -2
  65. package/dist/components/layout/centered-shell.js +4 -0
  66. package/dist/components/layout/editorial-account.d.ts +51 -0
  67. package/dist/components/layout/editorial-account.js +466 -0
  68. package/dist/components/layout/editorial-catalog.d.ts +18 -0
  69. package/dist/components/layout/editorial-catalog.js +164 -0
  70. package/dist/components/layout/editorial.d.ts +56 -0
  71. package/dist/components/layout/editorial.js +867 -0
  72. package/dist/components/layout/index.d.ts +6 -0
  73. package/dist/components/layout/index.js +98 -0
  74. package/dist/components/layout/mobile-shell.d.ts +2 -0
  75. package/dist/components/layout/mobile-shell.js +18 -11
  76. package/dist/components/layout/responsive-grid.js +9 -1
  77. package/dist/components/layout/topbar-item.d.ts +1 -0
  78. package/dist/components/layout/topbar-item.js +2 -0
  79. package/dist/contracts/measurement.json +1 -1
  80. package/dist/lab/legal-document-shell.js +61 -51
  81. package/dist/lib/toast-clearance.js +1 -1
  82. package/dist/props/components/data-display.prop.d.ts +2 -0
  83. package/dist/props/components/data-entry.prop.d.ts +9 -0
  84. package/dist/props/components/editorial-account.prop.d.ts +249 -0
  85. package/dist/props/components/editorial-account.prop.js +0 -0
  86. package/dist/props/components/general.prop.d.ts +6 -2
  87. package/dist/props/components/layout.prop.d.ts +602 -2
  88. package/dist/props/registry.d.ts +1124 -0
  89. package/dist/props/registry.js +792 -0
  90. package/dist/styles/badge-layout.css +2 -0
  91. package/dist/styles/control.css +60 -13
  92. package/dist/styles/core.css +1 -0
  93. package/dist/styles/data-display-layout.css +9 -3
  94. package/dist/styles/editorial-account-layout.css +1130 -0
  95. package/dist/styles/focus-ring.css +33 -10
  96. package/dist/styles/form-layout.css +8 -1
  97. package/dist/styles/index.css +1 -0
  98. package/dist/styles/layers.json +248 -1
  99. package/dist/styles/layout.css +2031 -0
  100. package/dist/styles/logo-layout.css +27 -0
  101. package/dist/styles/shell-layout.css +101 -3
  102. package/dist/styles/table-layout.css +25 -13
  103. package/dist/styles/text-layout.css +6 -0
  104. package/dist/styles.css +1 -1
  105. package/dist/tokens/base.css +2 -0
  106. package/dist/tokens/components/badge.css +3 -0
  107. package/dist/tokens/components/control.css +9 -0
  108. package/dist/tokens/components/editorial-account.css +393 -0
  109. package/dist/tokens/components/editorial.css +721 -0
  110. package/dist/tokens/components/form.css +4 -0
  111. package/dist/tokens/components/logo.css +2 -0
  112. package/dist/tokens/components/shell.css +23 -0
  113. package/dist/tokens/components/table.css +1 -1
  114. package/docs/TOKENS.md +26 -0
  115. package/package.json +2 -2
  116. package/scripts/ui-audit.mjs +3 -2
@@ -0,0 +1,69 @@
1
+ {
2
+ "example": "import { HoldingCard, HoldingCardAction } from \"@godxjp/ui/layout\";\nimport { Trash2 } from \"lucide-react\";\n\n<HoldingCard media={<a href=\"/cards/1/\"><img src=\"/card.png\" alt=\"\" /></a>} overline=\"Single card\" title={<a href=\"/cards/1/\">Pikachu</a>} meta=\"025/165\" tags={[\"NM\", \"× 2\"]} purchase={{ label: \"Purchase / item\", value: \"¥1,200\" }} actions={<HoldingCardAction icon={<Trash2 />} onClick={remove}>Remove</HoldingCardAction>} />",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "HoldingCard",
6
+ "props": [
7
+ {
8
+ "description": "Link around the image (the picture ground).",
9
+ "name": "media",
10
+ "required": true,
11
+ "type": "ReactNode"
12
+ },
13
+ {
14
+ "description": "Line above the title.",
15
+ "name": "overline",
16
+ "type": "ReactNode"
17
+ },
18
+ {
19
+ "description": "Title (a link).",
20
+ "name": "title",
21
+ "required": true,
22
+ "type": "ReactNode"
23
+ },
24
+ {
25
+ "description": "Heading level. Default: 2.",
26
+ "name": "level",
27
+ "type": "2 | 3"
28
+ },
29
+ {
30
+ "description": "Meta line.",
31
+ "name": "meta",
32
+ "type": "ReactNode"
33
+ },
34
+ {
35
+ "description": "Outlined tags.",
36
+ "name": "tags",
37
+ "type": "ReactNode[]"
38
+ },
39
+ {
40
+ "description": "Purchase line.",
41
+ "name": "purchase",
42
+ "type": "{ label: ReactNode; value: ReactNode }"
43
+ },
44
+ {
45
+ "description": "Date line.",
46
+ "name": "date",
47
+ "type": "ReactNode"
48
+ },
49
+ {
50
+ "description": "HoldingCardAction elements.",
51
+ "name": "actions",
52
+ "type": "ReactNode"
53
+ }
54
+ ],
55
+ "related": [
56
+ "HoldingGrid — the track.",
57
+ "HoldingCardAction — its actions."
58
+ ],
59
+ "rules": [
60
+ 2,
61
+ 6,
62
+ 44,
63
+ 45
64
+ ],
65
+ "tagline": "One owned item (gh#1439): a picture ground (the consumer's link around an image), overline, title, meta, outlined tags (the last set apart), the purchase line, a date and HoldingCardActions. Its geometry follows the enclosing HoldingGrid view. Geometry: `--editorial-holding-card-*`.",
66
+ "usage": [
67
+ "DO keep the owner's purchase price apart from reference prices."
68
+ ]
69
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "example": "import { HoldingCardAction } from \"@godxjp/ui/layout\";\nimport { Pencil } from \"lucide-react\";\n\n<HoldingCardAction icon={<Pencil />} asChild><a href=\"/collection/1/edit/\">Edit</a></HoldingCardAction>",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "HoldingCardAction",
6
+ "props": [
7
+ {
8
+ "description": "Leading glyph.",
9
+ "name": "icon",
10
+ "type": "ReactNode"
11
+ },
12
+ {
13
+ "description": "Label.",
14
+ "name": "children",
15
+ "type": "ReactNode"
16
+ },
17
+ {
18
+ "description": "Render the child link as the action.",
19
+ "name": "asChild",
20
+ "type": "boolean"
21
+ },
22
+ {
23
+ "description": "Activation handler.",
24
+ "name": "onClick",
25
+ "type": "() => void"
26
+ },
27
+ {
28
+ "description": "Native disabled.",
29
+ "name": "disabled",
30
+ "type": "boolean"
31
+ },
32
+ {
33
+ "description": "Accessible name when the label is not enough.",
34
+ "name": "aria-label",
35
+ "type": "string"
36
+ }
37
+ ],
38
+ "related": [
39
+ "HoldingCard — its card."
40
+ ],
41
+ "rules": [
42
+ 2,
43
+ 6,
44
+ 44,
45
+ 45
46
+ ],
47
+ "tagline": "A quiet glyph + label action of a HoldingCard (gh#1439): edit, remove. A `<button>` by default; `asChild` turns a router link into it.",
48
+ "usage": [
49
+ "DO name a destructive action with the item (\"Remove Pikachu\") through aria-label."
50
+ ]
51
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "example": "import { HoldingCard, HoldingGrid } from \"@godxjp/ui/layout\";\n\n<HoldingGrid view=\"grid\" aria-label=\"Your collection\"><HoldingCard media={<a href=\"/cards/1/\"><img src=\"/card.png\" alt=\"\" /></a>} title={<a href=\"/cards/1/\">Pikachu</a>} /></HoldingGrid>",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "HoldingGrid",
6
+ "props": [
7
+ {
8
+ "description": "Tiles or rows. Default: \"grid\".",
9
+ "name": "view",
10
+ "type": "\"grid\" | \"list\""
11
+ },
12
+ {
13
+ "description": "Name of the list.",
14
+ "name": "aria-label",
15
+ "type": "string"
16
+ },
17
+ {
18
+ "description": "HoldingCards.",
19
+ "name": "children",
20
+ "type": "ReactNode"
21
+ }
22
+ ],
23
+ "related": [
24
+ "HoldingCard — its items.",
25
+ "CatalogCard — a catalogue tile."
26
+ ],
27
+ "rules": [
28
+ 2,
29
+ 6,
30
+ 44,
31
+ 45
32
+ ],
33
+ "tagline": "The track of HoldingCards (gh#1439): `view=\"grid\"` lays tiles on `--editorial-holding-grid-track-size` (default four columns); `view=\"list\"` turns the same cards into wide rows (`140px 1fr`, body on `1.5fr 1fr 140px`). A list (`ul`) of the cards.",
34
+ "usage": [
35
+ "DO switch the view with an EditorialToggleGroup variant=\"icon\"; never swap to a data table."
36
+ ]
37
+ }
@@ -78,6 +78,11 @@
78
78
  "description": "Fenced code in a known language is tokenised at parse time as `<span data-code-token>` with the kit's twelve names, which Prose colours (renderer v6). `false` leaves plain text for a host `pre` with its own highlighter.",
79
79
  "name": "highlight",
80
80
  "type": "boolean"
81
+ },
82
+ {
83
+ "description": "Host renderers for container directives the kit does not model, by name (`{ poll: (b) => <PollCard … /> }`). Each gets `{ name, label, attributes, source, body, children }` — label / source / body as written, `children` the rendered body without the label (a `::::form`'s `:::poll` cards). Return `undefined` to render the block as an unknown directive (its content in `div.ui-prose-directive`), which is also what an unregistered name renders. `toggle` / `columns` / `column` cannot be overridden.",
84
+ "name": "directives",
85
+ "type": "Record<string, (block: DirectiveRenderProps) => ReactNode | undefined>"
81
86
  }
82
87
  ],
83
88
  "related": [
@@ -94,6 +99,7 @@
94
99
  "DO `<Prose><Markdown>{body}</Markdown></Prose>` for every rendered body (wiki page, issue, mail).",
95
100
  "DO record `MARKDOWN_FORMAT` and `RENDERER_VERSION` on stored versions.",
96
101
  "DO `import \"@godxjp/markdown/katex.css\"` once in the app: `$…$`, `$$…$$` and ```math are drawn by KaTeX at parse time (trust: false, renderer v6) and need its stylesheet and fonts. A single `$` follows Pandoc's rule, so `$5 and $10` stays text.",
102
+ "DO import `Markdown` from `@godxjp/markdown/lazy` in a client-rendered app: KaTeX (+ its stylesheet, no global katex.css import needed) and highlight.js load only when a body has math or a fence with a language, then the body re-renders. The default entry stays eager because a server or Worker render is synchronous; a server or a hydrating client using `/lazy` awaits `preloadMarkdownRuntime(body)` first.",
97
103
  "DON'T assemble react-markdown + rehype-sanitize per app, add rehype-raw, or render Mermaid yourself — `checkMermaidSvg` is the gate."
98
104
  ]
99
105
  }
@@ -111,6 +111,11 @@
111
111
  "name": "suffix",
112
112
  "type": "React.ReactNode"
113
113
  },
114
+ {
115
+ "description": "How the field takes its inline space, as `Select` and the pickers mean it (gh#1448). `full` fills the line; `auto` is sized to the widest value the bounds allow (formatted `min` / `max`, 6 characters when unbounded) plus the steppers — a quantity stepper outside a FormField, e.g. in a `ListRow` trailing slot; `bounded` holds `--control-bounded-width`. Inside a FormField, `controlWidth` still sizes it. Default: \"full\".",
116
+ "name": "width",
117
+ "type": "\"full\" | \"auto\" | \"bounded\""
118
+ },
114
119
  {
115
120
  "description": "Form field name — submits its value natively.",
116
121
  "name": "name",
@@ -0,0 +1,32 @@
1
+ {
2
+ "example": "import { PriceSummary } from \"@godxjp/ui/layout\";\n\n<PriceSummary items={[{ key: \"sell\", label: \"Asking\", value: \"¥32,800\", caption: \"Japan · JPY\" }]} context={{ label: \"Compared\", value: \"JP · NM · Raw\" }} />",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "PriceSummary",
6
+ "props": [
7
+ {
8
+ "description": "Figure cells.",
9
+ "name": "items",
10
+ "required": true,
11
+ "type": "{ key; label; value; caption? }[]"
12
+ },
13
+ {
14
+ "description": "Context cell (conditions compared).",
15
+ "name": "context",
16
+ "type": "{ label; value; caption? }"
17
+ }
18
+ ],
19
+ "related": [
20
+ "Statistic — one KPI in a dashboard."
21
+ ],
22
+ "rules": [
23
+ 2,
24
+ 6,
25
+ 44,
26
+ 45
27
+ ],
28
+ "tagline": "A joined strip of headline figures (gh#1438): one bordered surface split by hairlines, each cell a label, a figure in the number face and a caption, with an optional wider context cell on the subtle ground. Geometry: `--editorial-price-summary-*`.",
29
+ "usage": [
30
+ "DO keep each value one formatted figure; put the source and date in caption."
31
+ ]
32
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "example": "import { SettingsLayout, SettingsPanel } from \"@godxjp/ui/layout\";\n\n<SettingsLayout aside={<p>Preferences are saved in this browser.</p>}><SettingsPanel number=\"01\" title=\"Language\" /></SettingsLayout>",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "SettingsLayout",
6
+ "props": [
7
+ {
8
+ "description": "Sticky rail.",
9
+ "name": "aside",
10
+ "type": "ReactNode"
11
+ },
12
+ {
13
+ "description": "SettingsPanels.",
14
+ "name": "children",
15
+ "type": "ReactNode"
16
+ }
17
+ ],
18
+ "related": [
19
+ "SettingsPanel — the panels."
20
+ ],
21
+ "rules": [
22
+ 2,
23
+ 6,
24
+ 44,
25
+ 45
26
+ ],
27
+ "tagline": "A settings page (gh#1439): a sticky rail (`aside`, default 260px, `--editorial-settings-layout-aside-inset` from the top) beside the panels, gap 64px. A theme hides the rail on narrow screens with `--editorial-settings-layout-aside-display: none` and one track.",
28
+ "usage": [
29
+ "DO put a short note and one link in the rail, never controls."
30
+ ]
31
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "example": "import { SettingsPanel } from \"@godxjp/ui/layout\";\n\n<SettingsPanel number=\"02\" title=\"Appearance\" description=\"Card artwork keeps its colours.\" />",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "SettingsPanel",
6
+ "props": [
7
+ {
8
+ "description": "Section number.",
9
+ "name": "number",
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": "Fields.",
30
+ "name": "children",
31
+ "type": "ReactNode"
32
+ },
33
+ {
34
+ "description": "id of the title (names the section).",
35
+ "name": "titleId",
36
+ "type": "string"
37
+ }
38
+ ],
39
+ "related": [
40
+ "SettingsLayout — the page.",
41
+ "EditorialPanel — a reading-page panel."
42
+ ],
43
+ "rules": [
44
+ 2,
45
+ 6,
46
+ 44,
47
+ 45
48
+ ],
49
+ "tagline": "One bordered settings section (gh#1439): a number in the figure face beside the title and its description, then the fields (a Form). Geometry: `--editorial-settings-panel-*`.",
50
+ "usage": [
51
+ "DO put the fields in a Form (columns={2} for paired fields)."
52
+ ]
53
+ }
@@ -0,0 +1,54 @@
1
+ {
2
+ "example": "import { ThemePicker } from \"@godxjp/ui/layout\";\nimport { Moon, Sun } from \"lucide-react\";\n\n<ThemePicker legend=\"Choose a theme\" value={theme} onValueChange={setTheme} options={[{ value: \"light\", label: \"Light\", icon: <Sun />, preview: \"light\" }, { value: \"dark\", label: \"Dark\", icon: <Moon />, preview: \"dark\" }]} />",
3
+ "group": "layout",
4
+ "importPath": "@godxjp/ui/layout",
5
+ "name": "ThemePicker",
6
+ "props": [
7
+ {
8
+ "description": "Name of the group (visually hidden).",
9
+ "name": "legend",
10
+ "required": true,
11
+ "type": "string"
12
+ },
13
+ {
14
+ "description": "The choices.",
15
+ "name": "options",
16
+ "required": true,
17
+ "type": "{ value: string; label: string; icon?: ReactNode; preview: \"light\" | \"dark\" | \"system\" }[]"
18
+ },
19
+ {
20
+ "description": "Controlled value.",
21
+ "name": "value",
22
+ "type": "string"
23
+ },
24
+ {
25
+ "description": "Uncontrolled initial value.",
26
+ "name": "defaultValue",
27
+ "type": "string"
28
+ },
29
+ {
30
+ "description": "Change handler.",
31
+ "name": "onValueChange",
32
+ "type": "(value: string) => void"
33
+ },
34
+ {
35
+ "description": "Name of the radio inputs.",
36
+ "name": "name",
37
+ "type": "string"
38
+ }
39
+ ],
40
+ "related": [
41
+ "AppSettingPicker kind=\"theme\" — a compact select.",
42
+ "Radio — plain radios."
43
+ ],
44
+ "rules": [
45
+ 2,
46
+ 6,
47
+ 44,
48
+ 45
49
+ ],
50
+ "tagline": "An illustrated radio group for the colour theme (gh#1439): each choice is a painted preview of the interface — light, dark, or the system split — over its glyph and label. Native radios in a fieldset (arrow keys move), the checked preview ringed in the primary tone. Geometry: `--editorial-theme-picker-*`.",
51
+ "usage": [
52
+ "DO apply the theme at once; no Save button."
53
+ ]
54
+ }
@@ -25,6 +25,11 @@
25
25
  "name": "labelHideBelow",
26
26
  "type": "BreakpointProp"
27
27
  },
28
+ {
29
+ "description": "Remove the whole cell FROM a breakpoint step upwards (Flex hideFrom's contract) — a phone-only cell such as the menu trigger that opens the same navigation in a sheet (gh#1428).",
30
+ "name": "hideFrom",
31
+ "type": "BreakpointProp"
32
+ },
28
33
  {
29
34
  "description": "Overlaid count; does not change the bar cell width. Rendered under asChild too (gh#1171): the pill goes inside the child element after its children, so `<TopbarItem asChild badge={3}><a href=\"/notifications\">…</a></TopbarItem>` keeps its count. Nothing renders for `undefined`, `\"\"` or the number `0` (gh#1341) — pass the count as it is, never `count === 0 ? undefined : count`; pass the string `\"0\"` to show a zero on purpose.",
30
35
  "name": "badge",