@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
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/** Editorial account family prop types (gh#1439) — @see components/layout/editorial-account.tsx */
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { ClassNameProp } from "../vocabulary/index.js";
|
|
4
|
+
/** One choice of an EditorialToggleGroup. `label` is the visible text (text variant) and the
|
|
5
|
+
* accessible name of the button in both variants. */
|
|
6
|
+
export type EditorialToggleGroupItemProp = {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @see EditorialToggleGroup — a named `role="group"` of `aria-pressed` buttons, one pressed at a
|
|
13
|
+
* time: `variant="text"` for a filter ("All · Cards · Sealed"), `variant="icon"` for a framed
|
|
14
|
+
* icon-only switch (grid / list view). Geometry: `--editorial-toggle-group-*`.
|
|
15
|
+
*/
|
|
16
|
+
export type EditorialToggleGroupProp = {
|
|
17
|
+
"aria-label": string;
|
|
18
|
+
items: EditorialToggleGroupItemProp[];
|
|
19
|
+
value: string;
|
|
20
|
+
onValueChange: (value: string) => void;
|
|
21
|
+
/** `text` (default) shows the labels; `icon` shows only the icons, the label is the name. */
|
|
22
|
+
variant?: "text" | "icon";
|
|
23
|
+
className?: ClassNameProp;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @see EditorialMetaBar — a hairline-ruled strip under a page header: a start cluster (a glyph and
|
|
27
|
+
* a line, e.g. "Your private collection") and an end slot (a badge). Stacks on a phone (tokens).
|
|
28
|
+
*/
|
|
29
|
+
export type EditorialMetaBarProp = {
|
|
30
|
+
/** Leading glyph, drawn in the primary tone. */
|
|
31
|
+
icon?: ReactNode;
|
|
32
|
+
start: ReactNode;
|
|
33
|
+
end?: ReactNode;
|
|
34
|
+
className?: ClassNameProp;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* @see EditorialEmptyPanel — a centred panel for a signed-out or an empty state. `variant="guest"`
|
|
38
|
+
* draws a decorative three-card stack above the copy; `variant="empty"` is dashed, with a round
|
|
39
|
+
* icon medallion.
|
|
40
|
+
*/
|
|
41
|
+
export type EditorialEmptyPanelProp = {
|
|
42
|
+
variant?: "guest" | "empty";
|
|
43
|
+
/** A kicker (an `Eyebrow`) above the title. */
|
|
44
|
+
eyebrow?: ReactNode;
|
|
45
|
+
title: ReactNode;
|
|
46
|
+
/** Heading level of the title. Default `2`. */
|
|
47
|
+
level?: 2 | 3;
|
|
48
|
+
description?: ReactNode;
|
|
49
|
+
/** Buttons, centred in a wrapping row. */
|
|
50
|
+
actions?: ReactNode;
|
|
51
|
+
/** The medallion glyph of `variant="empty"`. */
|
|
52
|
+
icon?: ReactNode;
|
|
53
|
+
className?: ClassNameProp;
|
|
54
|
+
};
|
|
55
|
+
/** One tile of an EditorialStats strip. */
|
|
56
|
+
export type EditorialStatsItemProp = {
|
|
57
|
+
label: ReactNode;
|
|
58
|
+
value: ReactNode;
|
|
59
|
+
/** A small unit after the figure ("items"). */
|
|
60
|
+
unit?: ReactNode;
|
|
61
|
+
/** A short line under the figure. */
|
|
62
|
+
note?: ReactNode;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* @see EditorialStats — a strip of figure tiles on unequal tracks; the first tile is the lead
|
|
66
|
+
* (emphasised; on a phone it spans the row with its figure beside the label).
|
|
67
|
+
*/
|
|
68
|
+
export type EditorialStatsProp = {
|
|
69
|
+
items: EditorialStatsItemProp[];
|
|
70
|
+
/** Accessible name of the strip (a list). */
|
|
71
|
+
"aria-label"?: string;
|
|
72
|
+
className?: ClassNameProp;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* @see EditorialToolbar — the row above a collection (gh#1438, gh#1439): an optional `summary`
|
|
76
|
+
* (result count as a polite live region + a short note), a `start` cluster (filters) and an `end`
|
|
77
|
+
* cluster (order `Select`, view switch, primary action), optionally over a hairline (`divider`).
|
|
78
|
+
* With a `summary` it is a listing row: one line whose summary shrinks, the
|
|
79
|
+
* `--editorial-toolbar-summary-*` spacing, never stacked. Without one it is a wrapping bar whose
|
|
80
|
+
* clusters stack when a theme sets `--editorial-toolbar-display: block`. Selects in `end` read the
|
|
81
|
+
* toolbar's control scale (`--editorial-toolbar-control-*`).
|
|
82
|
+
*/
|
|
83
|
+
export type EditorialToolbarProp = {
|
|
84
|
+
/** The listing summary: `count` ("396 results", announced politely) and a `note` under it. */
|
|
85
|
+
summary?: {
|
|
86
|
+
count?: ReactNode;
|
|
87
|
+
note?: ReactNode;
|
|
88
|
+
};
|
|
89
|
+
/** Start cluster — filters. */
|
|
90
|
+
start?: ReactNode;
|
|
91
|
+
/** End cluster — the order `Select`, a view switch, the primary action. */
|
|
92
|
+
end?: ReactNode;
|
|
93
|
+
/** A hairline under the row (`--editorial-toolbar-divider-padding-block-end` above it). */
|
|
94
|
+
divider?: boolean;
|
|
95
|
+
className?: ClassNameProp;
|
|
96
|
+
};
|
|
97
|
+
/** `grid` = tiles; `list` = the same cards as wide rows. */
|
|
98
|
+
export type HoldingViewProp = "grid" | "list";
|
|
99
|
+
/** @see HoldingGrid — the track of HoldingCards in grid or list view. */
|
|
100
|
+
export type HoldingGridProp = {
|
|
101
|
+
view?: HoldingViewProp;
|
|
102
|
+
/** Accessible name of the list. */
|
|
103
|
+
"aria-label"?: string;
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
className?: ClassNameProp;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* @see HoldingCard — one owned item: a picture ground (the consumer's link around an image), then
|
|
109
|
+
* overline, title, meta, tags, the purchase line, a date and actions. Its geometry follows the
|
|
110
|
+
* enclosing HoldingGrid's view.
|
|
111
|
+
*/
|
|
112
|
+
export type HoldingCardProp = {
|
|
113
|
+
/** The picture ground: a link (router Link or `<a>`) whose child is the image. */
|
|
114
|
+
media: ReactNode;
|
|
115
|
+
/** Small line above the title (kind, badges). */
|
|
116
|
+
overline?: ReactNode;
|
|
117
|
+
title: ReactNode;
|
|
118
|
+
/** Heading level of the title. Default `2`. */
|
|
119
|
+
level?: 2 | 3;
|
|
120
|
+
meta?: ReactNode;
|
|
121
|
+
/** Outlined tags (condition, grade, quantity); the last one is set apart. */
|
|
122
|
+
tags?: ReactNode[];
|
|
123
|
+
/** The owner's purchase line: a label and a figure. */
|
|
124
|
+
purchase?: {
|
|
125
|
+
label: ReactNode;
|
|
126
|
+
value: ReactNode;
|
|
127
|
+
};
|
|
128
|
+
/** A date line ("Purchased: 2026-10-01"). */
|
|
129
|
+
date?: ReactNode;
|
|
130
|
+
/** HoldingCardAction elements. */
|
|
131
|
+
actions?: ReactNode;
|
|
132
|
+
className?: ClassNameProp;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* @see HoldingCardAction — a quiet glyph + label action of a HoldingCard (edit, remove). A
|
|
136
|
+
* `<button>` by default; `asChild` turns the consumer's link into the action.
|
|
137
|
+
*/
|
|
138
|
+
export type HoldingCardActionProp = {
|
|
139
|
+
icon?: ReactNode;
|
|
140
|
+
children?: ReactNode;
|
|
141
|
+
asChild?: boolean;
|
|
142
|
+
onClick?: () => void;
|
|
143
|
+
disabled?: boolean;
|
|
144
|
+
"aria-label"?: string;
|
|
145
|
+
className?: ClassNameProp;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* @see SettingsLayout — a settings page: a sticky rail (`aside`) beside the panels. The rail hides
|
|
149
|
+
* on narrow screens through tokens.
|
|
150
|
+
*/
|
|
151
|
+
export type SettingsLayoutProp = {
|
|
152
|
+
aside?: ReactNode;
|
|
153
|
+
children?: ReactNode;
|
|
154
|
+
className?: ClassNameProp;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* @see SettingsPanel — one bordered settings section: a number and a title with a description,
|
|
158
|
+
* then its fields.
|
|
159
|
+
*/
|
|
160
|
+
export type SettingsPanelProp = {
|
|
161
|
+
/** The section number ("01"), set in the figure face. */
|
|
162
|
+
number?: ReactNode;
|
|
163
|
+
title: ReactNode;
|
|
164
|
+
/** Heading level of the title. Default `2`. */
|
|
165
|
+
level?: 2 | 3;
|
|
166
|
+
description?: ReactNode;
|
|
167
|
+
children?: ReactNode;
|
|
168
|
+
/** id of the title, so a group inside can be named by it. */
|
|
169
|
+
titleId?: string;
|
|
170
|
+
className?: ClassNameProp;
|
|
171
|
+
};
|
|
172
|
+
/** A painted preview of the interface in a ThemePicker choice. */
|
|
173
|
+
export type ThemePickerPreviewProp = "light" | "dark" | "system";
|
|
174
|
+
/** One choice of a ThemePicker. */
|
|
175
|
+
export type ThemePickerOptionProp = {
|
|
176
|
+
value: string;
|
|
177
|
+
label: string;
|
|
178
|
+
icon?: ReactNode;
|
|
179
|
+
preview: ThemePickerPreviewProp;
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* @see ThemePicker — an illustrated radio group for the colour theme: each choice is a painted
|
|
183
|
+
* preview of the interface (light / dark / split system) with a glyph and its label.
|
|
184
|
+
*/
|
|
185
|
+
export type ThemePickerProp = {
|
|
186
|
+
/** Accessible name of the radio group (a visually hidden legend). */
|
|
187
|
+
legend: string;
|
|
188
|
+
options: ThemePickerOptionProp[];
|
|
189
|
+
value?: string;
|
|
190
|
+
defaultValue?: string;
|
|
191
|
+
onValueChange?: (value: string) => void;
|
|
192
|
+
/** Name of the radio inputs. */
|
|
193
|
+
name?: string;
|
|
194
|
+
className?: ClassNameProp;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* @see EditorialAuth — a sign-in / sign-up page: a story column (kicker, display title, copy,
|
|
198
|
+
* decorative art, benefits) beside the form card (`children`).
|
|
199
|
+
*/
|
|
200
|
+
export type EditorialAuthProp = {
|
|
201
|
+
eyebrow?: ReactNode;
|
|
202
|
+
title: ReactNode;
|
|
203
|
+
description?: ReactNode;
|
|
204
|
+
/** The picture on the front card of the decorative card pair (e.g. the brand mark). */
|
|
205
|
+
art?: ReactNode;
|
|
206
|
+
/** Short benefit lines, each led by a check glyph. */
|
|
207
|
+
benefits?: ReactNode[];
|
|
208
|
+
children?: ReactNode;
|
|
209
|
+
className?: ClassNameProp;
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* @see EditorialAuthCard — the form card of EditorialAuth: badge, title, copy, the form
|
|
213
|
+
* (`children`) and a ruled footer line ("New here? Create an account").
|
|
214
|
+
*/
|
|
215
|
+
export type EditorialAuthCardProp = {
|
|
216
|
+
badge?: ReactNode;
|
|
217
|
+
title: ReactNode;
|
|
218
|
+
/** Heading level of the title. Default `2`. */
|
|
219
|
+
level?: 2 | 3;
|
|
220
|
+
description?: ReactNode;
|
|
221
|
+
children?: ReactNode;
|
|
222
|
+
footer?: ReactNode;
|
|
223
|
+
className?: ClassNameProp;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* @see EditorialTextButton — an underlined text action in the primary tone ("Reset display
|
|
227
|
+
* preferences", "Your collection →"). A `<button>` by default; `asChild` turns the consumer's link
|
|
228
|
+
* into it. `icon` trails the label.
|
|
229
|
+
*/
|
|
230
|
+
export type EditorialTextButtonProp = {
|
|
231
|
+
children?: ReactNode;
|
|
232
|
+
icon?: ReactNode;
|
|
233
|
+
asChild?: boolean;
|
|
234
|
+
onClick?: () => void;
|
|
235
|
+
disabled?: boolean;
|
|
236
|
+
className?: ClassNameProp;
|
|
237
|
+
};
|
|
238
|
+
/**
|
|
239
|
+
* @see EditorialFootnote — a quiet closing line under a collection or a settings form: a note at the
|
|
240
|
+
* start and an optional action (an EditorialTextButton) at the end. Geometry:
|
|
241
|
+
* `--editorial-footnote-*`.
|
|
242
|
+
*/
|
|
243
|
+
export type EditorialFootnoteProp = {
|
|
244
|
+
children?: ReactNode;
|
|
245
|
+
action?: ReactNode;
|
|
246
|
+
/** Cross-axis alignment of note and action: `start` (default, a multi-line note) or `center`. */
|
|
247
|
+
align?: "start" | "center";
|
|
248
|
+
className?: ClassNameProp;
|
|
249
|
+
};
|
|
File without changes
|
|
@@ -29,8 +29,12 @@ export type TextProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & Omit<T
|
|
|
29
29
|
* so in a table cell it cannot wrap and cannot share the cell's line height.
|
|
30
30
|
*/
|
|
31
31
|
link?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Size from the type scale — never an arbitrary px. Default `sm` (base). `"inherit"` (gh#1434)
|
|
34
|
+
* takes the parent's size, leading and tracking: an emphasised run INSIDE a `Heading` (a hero's
|
|
35
|
+
* second line in the brand tone) keeps the heading's step at every breakpoint.
|
|
36
|
+
*/
|
|
37
|
+
size?: TextSizeProp | "inherit";
|
|
34
38
|
/** Semantic colour intent. Default `default` (foreground). */
|
|
35
39
|
tone?: TextToneProp;
|
|
36
40
|
/** Weight (system 2-weight: 400/500). Default `regular`. */
|