@godxjp/ui 31.28.4 → 31.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/START-HERE.md +5 -5
- package/agent/components/AppLauncher.json +5 -0
- package/agent/components/Avatar.json +1 -0
- package/agent/components/Dialog.json +3 -1
- package/agent/components/Legend.json +1 -1
- package/agent/components/PasswordStrength.json +2 -2
- package/agent/components/RangeTimeline.json +28 -1
- package/agent/components/ResponsiveGrid.json +7 -0
- package/agent/components/Sidebar.json +5 -0
- package/agent/components/SortableList.json +78 -0
- package/agent/components/TopbarItem.json +1 -1
- package/agent/components-index.json +5 -0
- package/agent/components.json +131 -6
- package/agent/index.json +6 -6
- package/agent/llms.txt +6 -6
- package/agent/tokens.json +122 -2
- package/dist/components/data-display/legend.d.ts +3 -2
- package/dist/components/data-display/legend.js +10 -1
- package/dist/components/data-display/range-timeline.d.ts +93 -2
- package/dist/components/data-display/range-timeline.js +220 -58
- package/dist/components/data-entry/index.d.ts +2 -0
- package/dist/components/data-entry/index.js +2 -0
- package/dist/components/data-entry/password-strength.d.ts +15 -3
- package/dist/components/data-entry/password-strength.js +16 -34
- package/dist/components/data-entry/sortable-list.d.ts +10 -0
- package/dist/components/data-entry/sortable-list.js +237 -0
- package/dist/components/feedback/dialog.d.ts +8 -2
- package/dist/components/feedback/dialog.js +8 -1
- package/dist/components/feedback/sheet.js +1 -1
- package/dist/components/layout/app-launcher.d.ts +1 -1
- package/dist/components/layout/app-launcher.js +18 -14
- package/dist/components/layout/responsive-grid.d.ts +17 -2
- package/dist/components/layout/responsive-grid.js +17 -4
- package/dist/components/layout/sidebar.d.ts +1 -1
- package/dist/components/layout/sidebar.js +3 -0
- package/dist/components/layout/topbar-item.js +8 -2
- package/dist/components/ui/avatar.d.ts +3 -1
- package/dist/components/ui/avatar.js +2 -1
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +31 -1
- package/dist/i18n/messages/ja.json +31 -1
- package/dist/i18n/messages/vi.json +31 -1
- package/dist/props/components/data-display.prop.d.ts +18 -0
- package/dist/props/components/data-entry.prop.d.ts +34 -0
- package/dist/props/components/feedback.prop.d.ts +6 -1
- package/dist/props/components/layout.prop.d.ts +22 -0
- package/dist/props/registry.d.ts +33 -2
- package/dist/props/registry.js +44 -1
- package/dist/styles/control.css +50 -0
- package/dist/styles/data-display-layout.css +139 -2
- package/dist/styles/dialog-layout.css +14 -1
- package/dist/styles/layers.json +6 -1
- package/dist/styles/layout.css +29 -7
- package/dist/styles/shell-layout.css +26 -0
- package/dist/tokens/components/control.css +5 -0
- package/dist/tokens/components/data-display.css +12 -0
- package/dist/tokens/components/feedback.css +6 -0
- package/dist/tokens/components/shell.css +6 -0
- package/dist/tokens/semantic/layout.css +1 -4
- package/docs/FRAME-COVERAGE-REPORT.md +4 -3
- package/docs/data-display/avatar.tsx +32 -0
- package/docs/data-display/timeline.tsx +84 -1
- package/docs/data-entry/sortable-list.tsx +76 -0
- package/docs/feedback/dialog.tsx +37 -1
- package/docs/i18n/messages/en.json +62 -0
- package/docs/i18n/messages/ja.json +62 -0
- package/docs/i18n/messages/vi.json +62 -0
- package/docs/layout/app-launcher.tsx +17 -1
- package/docs/layout/responsive-grid.tsx +23 -0
- package/docs/layout/sidebar.tsx +24 -0
- package/docs/layout/topbar-item.tsx +11 -0
- package/package.json +2 -2
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` 31.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 31.30.0.** 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.
|
|
@@ -47,7 +47,7 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
47
47
|
task is a task** — "build a settings page", "confirm a destructive delete", "a list page with
|
|
48
48
|
filters" — start HERE, not at the components. Then fetch `patterns/<name>.json` for complete,
|
|
49
49
|
copy-paste-ready code. A component index answers "does X exist"; it cannot answer "build Y".
|
|
50
|
-
1. `components-index.json` — 51 KB, all
|
|
50
|
+
1. `components-index.json` — 51 KB, all 185 components as name + group +
|
|
51
51
|
tagline. Read this when you already know the SHAPE you need. Each entry may carry `absorbed`:
|
|
52
52
|
names that **do not exist** and map to it — `Combobox`, `Autocomplete`, `CountrySelect` and
|
|
53
53
|
`SearchSelect` are all `Select`. If you are about to hand-roll something, search this field
|
|
@@ -56,10 +56,10 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
56
56
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
57
57
|
3. `rules.json` — 50 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
58
58
|
style advice.
|
|
59
|
-
4. `tokens.json` —
|
|
59
|
+
4. `tokens.json` — 2176 design tokens, each tagged with its `tier`. **If you were handed a
|
|
60
60
|
brand, read the 211 `foundation` entries first** — `--primary`, `--background`,
|
|
61
61
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
62
|
-
|
|
62
|
+
1853 `component` entries are per-part knobs; reach for one only when a role is
|
|
63
63
|
right everywhere except one component.
|
|
64
64
|
5. `anti-ai-tells.json` — 26 shapes that make generated UI look generated, each with the
|
|
65
65
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
@@ -145,7 +145,7 @@ has stopped following the brand.
|
|
|
145
145
|
|---|---|---|---|
|
|
146
146
|
| `foundation` | 211 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** Handed a brand colour, this is where it goes: `:root { --primary: <H> <S>% <L>%; }` (HSL components, no `hsl()` wrapper) |
|
|
147
147
|
| `semantic` | 112 | 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 |
|
|
148
|
-
| `component` |
|
|
148
|
+
| `component` | 1853 | 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` |
|
|
149
149
|
|
|
150
150
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
151
151
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -79,6 +79,11 @@
|
|
|
79
79
|
"description": "Open-state callback.",
|
|
80
80
|
"name": "onOpenChange",
|
|
81
81
|
"type": "(open: boolean) => void"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"description": "Secondary links under the grid — \"Request access\", \"All apps\" (the Workspace / Okta / My Apps row, gh#1172). Pass the links; the launcher draws the row (hairline above, small type, --app-launcher-footer-*) outside the scrolling grid, after the tiles in focus order, in every state including empty/loading/error. Not a tile: never fake it as a one-tile group.",
|
|
85
|
+
"name": "footer",
|
|
86
|
+
"type": "ReactNode"
|
|
82
87
|
}
|
|
83
88
|
],
|
|
84
89
|
"related": [
|
|
@@ -69,6 +69,7 @@
|
|
|
69
69
|
"tagline": "Radix Avatar wrapper with image and fallback slots for users, teams, and entities.",
|
|
70
70
|
"usage": [
|
|
71
71
|
"DO compose Avatar > AvatarImage + AvatarFallback so broken or missing images still show a readable fallback.",
|
|
72
|
+
"DO pass `fit=\"contain\"` on AvatarImage for a logo or app icon that is wide, transparent or off-centre — the default `cover` crops to fill, right for a face (gh#1176). A full-bleed square icon (the GoDX service icon set) keeps the default.",
|
|
72
73
|
"DO use `presence` for who is reachable RIGHT NOW — a chat member list, a DM row, a message-stream author, the topbar account mark. It is the only supported way to put a status dot on an avatar: the dot's inset is a function of the mark's own --avatar-* radius/size and of the root's clip, neither of which a page can read, which is why the hand-rolled `<span className=\"relative\"><Avatar/><span className=\"absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full bg-green-500 ring-2 ring-background\"/></span>` wrapper can never be got right from outside (and fails the DS audit on the raw palette).",
|
|
73
74
|
"DON'T announce a presence CHANGE from the avatar — it carries no aria-live on purpose. A roster of 40 marks resyncing over a socket would flood a screen reader; announce the change in the consumer's own live region if the product wants it.",
|
|
74
75
|
"DON'T reach for `Badge status` for presence, or `presence` for lifecycle. Presence is volatile, per-person and realtime and renders as a dot; a lifecycle status is a record's state and renders as a labelled chip.",
|
|
@@ -67,7 +67,9 @@
|
|
|
67
67
|
"DO always control open state via `open` + `onOpenChange`. Dialog has no uncontrolled shortcut — omitting `open` means the trigger alone drives state, which is fine for simple trigger-only cases, but any async submission flow must use controlled state so you can hold the dialog open while `pending=true` and close it only on success.",
|
|
68
68
|
"DO include `DialogHeader` with `DialogTitle` (and optionally `DialogDescription`) inside every `DialogContent`. Radix requires an accessible title for screen readers; omitting it triggers a console warning and breaks a11y.",
|
|
69
69
|
"DO wrap tall/scrolling content in `DialogBody` (the ring-safe scroll slot, max-height ~60vh). It insets the content to match the dialog padding so a full-width control's focus ring never clips against the scroll container — mirror of SheetBody.",
|
|
70
|
-
"DO set `modal={false}` when the user must keep working on the page behind an open dialog (edit a list while a payment or detail dialog stays open). Control `open` yourself: an outside press no longer closes it, so give it a visible close action. Escape closes it only while focus is inside the dialog."
|
|
70
|
+
"DO set `modal={false}` when the user must keep working on the page behind an open dialog (edit a list while a payment or detail dialog stays open). Control `open` yourself: an outside press no longer closes it, so give it a visible close action. Escape closes it only while focus is inside the dialog.",
|
|
71
|
+
"DO pass `width` on `DialogContent` for a wide dialog (an overview grid, a comparison): `<DialogContent width=\"60rem\">` (number = px, string = any CSS length; antd Modal `width`, same vocabulary as SheetContent `width`). It is capped at the viewport minus --dialog-viewport-inset, so it never leaves a phone screen. Default 32rem (--dialog-width-default). Do NOT switch to a full-width Sheet to get room (gh#1174).",
|
|
72
|
+
"Enter/exit timing is a token: --dialog-motion-duration (and --sheet-enter-duration / --sheet-exit-duration on Sheet), default var(--duration-fast) = 150ms. Under prefers-reduced-motion both surfaces do not animate at all (gh#1178)."
|
|
71
73
|
],
|
|
72
74
|
"useCases": [
|
|
73
75
|
"Inline form dialog — create or edit a record (invoice line, supplier, coupon) without navigating away. Place `FormField`/`Input`/`Select` inside `DialogContent`, wire the submit button to your mutation, and hold `open` while `pending` to prevent double-submit.",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"name": "Legend",
|
|
6
6
|
"props": [
|
|
7
7
|
{
|
|
8
|
-
"description": "The keys, in the order the marks they explain appear. `label` is required and cannot be omitted: colour alone never carries meaning (WCAG 1.4.1), so a wordless key would be the exact failure the component prevents.",
|
|
8
|
+
"description": "The keys, in the order the marks they explain appear. `label` is required and cannot be omitted: colour alone never carries meaning (WCAG 1.4.1), so a wordless key would be the exact failure the component prevents. Each item is `{ tone, label }` or `{ color, label }`: `color` is a hex from data (user-chosen status colours, the same contract as Badge color and RangeTimelineRow color, gh#1189).",
|
|
9
9
|
"name": "items",
|
|
10
10
|
"required": true,
|
|
11
11
|
"type": "{ tone: \"default\" | \"success\" | \"warning\" | \"destructive\" | \"info\" | \"muted\" | \"neutral\"; label: ReactNode }[]"
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"type": "boolean"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
"description": "
|
|
25
|
+
"description": "Every visible and screen-reader string, each optional (gh#1191). Unset entries come from the kit's own ja / en / vi catalogue for the active locale, so most apps pass nothing: the score words, the checklist line per rule (length / upper / lower / number / symbol), the sr-only passed / failed prefixes, and the polite live-region sentence (`announcement(strength)`). Pass only the ones your product words differently.",
|
|
26
26
|
"name": "labels",
|
|
27
|
-
"type": "{ weak
|
|
27
|
+
"type": "{ weak?: string; fair?: string; strong?: string; rules?: Partial<Record<PasswordRule, string>>; passed?: string; failed?: string; announcement?: (strength: string) => string }"
|
|
28
28
|
}
|
|
29
29
|
],
|
|
30
30
|
"related": [
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"type": "{ label: string; units: number }[]"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
|
-
"description": "Each row has id, label, inclusive start/end unit offsets, and localized startLabel/endLabel including current values. Optional `depth` (0 = top level) nests rows: pass them flat and depth-first (a parent, then its descendants); a row is a parent when the row after it is deeper. The component indents the label cell by `--range-timeline-indent-width` per level (logical padding, so RTL indents from the right; the label column keeps its width) and gives each parent a disclosure button. With no `depth > 0` anywhere the markup is unchanged.",
|
|
26
|
+
"description": "Each row has id, label, inclusive start/end unit offsets (`null` for either = the row has no dates: no bar, no handles, a muted \"no dates\" hint, gh#1189), optional `color` (hex from data, e.g. a status colour; grip ink flips black/white by luminance; non-hex keeps the default ink), `muted` (a done row recedes, --range-timeline-bar-muted-alpha), `overdue` (destructive inline-end edge that keeps the colour, plus a localized sr-only \"overdue\"), `tooltip` (ReactNode on hover and keyboard focus of a focusable bar layer named by the row label, beside the grips, never around them), `plan` ({ start, end } | null — the PLANNED range 予定, a dashed ghost bar behind the solid ACTUAL bar 実績; past the planned end a destructive overrun segment with a localized \"+N日\" label (override with `varianceLabel`, `false` hides it); ending before it a small success early marker; both also spoken; the ghost is never draggable), `planNote` (muted text after the bar for a row WITHOUT a plan, e.g. \"baseline後に追加\"), `editable` (true | false | { start?, end? }: which grips a row offers when onRangeChange is set; a started-but-open issue whose end is \"today\" passes { end: false }), and localized startLabel/endLabel including current values. Optional `depth` (0 = top level) nests rows: pass them flat and depth-first (a parent, then its descendants); a row is a parent when the row after it is deeper. The component indents the label cell by `--range-timeline-indent-width` per level (logical padding, so RTL indents from the right; the label column keeps its width) and gives each parent a disclosure button. With no `depth > 0` anywhere the markup is unchanged.",
|
|
27
27
|
"name": "rows",
|
|
28
28
|
"required": true,
|
|
29
29
|
"type": "RangeTimelineRow[]"
|
|
@@ -70,6 +70,33 @@
|
|
|
70
70
|
"description": "antd Table `sticky` — keep the axis header (bands + ticks) on screen while the PAGE scrolls a long schedule. `offsetHeader` is px from the top of the scrolling viewport (the height of a fixed app topbar). The header moves out of the horizontal scroller and follows its scrollLeft; the section becomes `overflow: clip` and the body scroller takes the keyboard tab stop. Like antd, it needs no clipping ancestor between the timeline and the page scroller: `Card` is `overflow: hidden`, so a sticky timeline goes in the page as its own section, not inside a Card. antd's `offsetScroll` / `getContainer` (sticky horizontal scrollbar) are not ported.",
|
|
71
71
|
"name": "sticky",
|
|
72
72
|
"type": "boolean | { offsetHeader?: number }"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"defaultValue": "false",
|
|
76
|
+
"description": "Let the user resize the label column by dragging a divider on its inline-end edge in the header (gh#1189): role=separator, aria-orientation vertical, aria-valuenow/min/max, ArrowLeft/Right (Shift = 32px step, else 8px), Home/End to min/max, RTL-aware, pointer drag. `true` = min 160 / max 640 px. The width lands on --range-timeline-label-width, so the token stays the default until the user drags.",
|
|
77
|
+
"name": "resizableLabel",
|
|
78
|
+
"type": "boolean | { min?: number; max?: number }"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"description": "Controlled label-column width in px. Persist it per user from onLabelWidthChange.",
|
|
82
|
+
"name": "labelWidth",
|
|
83
|
+
"type": "number"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"description": "Uncontrolled initial label-column width in px. Omitted: the token's width.",
|
|
87
|
+
"name": "defaultLabelWidth",
|
|
88
|
+
"type": "number"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"description": "Fires with the next label-column width (px, clamped) while dragging and on every key step.",
|
|
92
|
+
"name": "onLabelWidthChange",
|
|
93
|
+
"type": "(width: number) => void"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"defaultValue": "false",
|
|
97
|
+
"description": "A new range is loading while the previous rows stay on screen: dims the body (--range-timeline-busy-body-alpha), draws an indeterminate line under the header (static under prefers-reduced-motion) and sets aria-busy.",
|
|
98
|
+
"name": "busy",
|
|
99
|
+
"type": "boolean"
|
|
73
100
|
}
|
|
74
101
|
],
|
|
75
102
|
"rules": [],
|
|
@@ -37,6 +37,12 @@
|
|
|
37
37
|
"name": "gap",
|
|
38
38
|
"type": "\"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\""
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"defaultValue": "false",
|
|
42
|
+
"description": "Dense packing (grid-auto-flow: row dense): later small cells back-fill the holes a wide or tall cell leaves — a widget board of 1×1 / 2×1 / 1×2 cells (gh#1175). Visual order only; DOM and focus order stay as written, so use it for independent widgets/tiles, not reading order. Ignored under flow=\"columns\".",
|
|
43
|
+
"name": "dense",
|
|
44
|
+
"type": "boolean"
|
|
45
|
+
},
|
|
40
46
|
{
|
|
41
47
|
"description": "Grid items — typically Card or StatCard.",
|
|
42
48
|
"name": "children",
|
|
@@ -58,6 +64,7 @@
|
|
|
58
64
|
"tagline": "Container-responsive card grid with configurable base, sm, md and lg columns.",
|
|
59
65
|
"usage": [
|
|
60
66
|
"ResponsiveGrid.Item span={2} owns a responsive column span; an object {base:1,lg:2} sets explicit steps, clamped to the parent columns.",
|
|
67
|
+
"ResponsiveGrid.Item rowSpan={2} spans two rows — the tall (1×2) widget (gh#1175). Same shape as span: a number applies from sm up and is 1 at base (the single stacked column), an object sets each step. Pair with `dense` so the cells after it fill the space beside it.",
|
|
61
68
|
"KANBAN LANES: <ScrollArea orientation=\"horizontal\"><ResponsiveGrid flow=\"columns\" align=\"stretch\">{lanes.map(lane => <Card onDragOver onDrop>…<Card draggable>…</Card></Card>)}</ResponsiveGrid></ScrollArea>. align=\"stretch\" keeps an empty lane as tall as the fullest one, so it stays a full-height drop target; a Select inside a draggable card does not enlarge the drag image.",
|
|
62
69
|
"DO place StatCard tiles directly as immediate children — StatCard IS already a bordered card; never wrap it in an extra <Card><CardContent>. The canonical pattern is <ResponsiveGrid columns={4}><StatCard .../><StatCard .../></ResponsiveGrid>.",
|
|
63
70
|
"DO use columns={2|3|4} to declare the target desktop column count — the grid collapses automatically to 1 column on narrow containers (mobile-first via CSS container queries), via 2-column intermediate at ≥640px, then full target count at ≥1024px. Use columns={{ base: 2, sm: 4 }} for two mobile columns and four wider-container columns; no consumer CSS is needed.",
|
|
@@ -52,6 +52,11 @@
|
|
|
52
52
|
"name": "brand",
|
|
53
53
|
"type": "ReactNode | ((collapsed: boolean) => ReactNode)"
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
"description": "The rail's ONE primary action (Linear \"New issue\", Jira \"+ Create\", Notion \"New page\"), rendered between the brand header and the scrolling nav and never scrolling with it (gh#1185). Put exactly one primary control here: a Button full width (fullWidth) when expanded, icon-only with aria-label + Tooltip when collapsed. PASS A FUNCTION for the same reason brand and footer take one: it receives the EFFECTIVE collapsed value, so AppShell's mobile drawer (which never collapses) gets the full button from the same Sidebar node. Inset: --sidebar-action-padding (inline matches the nav rows). Do NOT put the action in `brand` - that slot is the product lockup.",
|
|
57
|
+
"name": "action",
|
|
58
|
+
"type": "ReactNode | ((collapsed: boolean) => ReactNode)"
|
|
59
|
+
},
|
|
55
60
|
{
|
|
56
61
|
"description": "Slot pinned to the bottom of the sidebar below the scrollable nav area. Commonly used for user identity, online status, or a mode switch. PASS A FUNCTION for the same reason brand takes one, and it is the same reason twice: both slots sit INSIDE the collapsible rail, so both need the EFFECTIVE collapsed value, which a node built outside the component cannot see. Reading your own `collapsed` boolean renders a glyph-only footer inside AppShell's full-width drawer (the drawer un-collapses the rail); building a second Sidebar for AppShell's `mobileNav` is exactly the override that switches railInDrawer off; doing neither leaves the expanded footer to reflow inside a 64px rail (measured: a two-line identity block went 255x66 docked to 63x111 collapsed, wrapping the name over three lines). A plain ReactNode still works unchanged.",
|
|
57
62
|
"name": "footer",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"docPath": "docs/data-entry/sortable-list.tsx",
|
|
3
|
+
"example": "import { SortableList } from \"@godxjp/ui/data-entry\";\n\n<SortableList\n aria-label=\"Widgets\"\n items={[{ value: \"cal\", label: \"Calendar\" }, { value: \"mail\", label: \"Mail\" }]}\n value={order}\n onValueChange={setOrder}\n/>",
|
|
4
|
+
"group": "data-entry",
|
|
5
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
6
|
+
"name": "SortableList",
|
|
7
|
+
"props": [
|
|
8
|
+
{
|
|
9
|
+
"description": "The rows to order. `label` is spoken in the grip's name and the announcements; a disabled item's grip is inert.",
|
|
10
|
+
"name": "items",
|
|
11
|
+
"required": true,
|
|
12
|
+
"type": "{ value: string; label: string; disabled?: boolean }[]"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"description": "The item keys in order (controlled with onValueChange).",
|
|
16
|
+
"name": "value",
|
|
17
|
+
"type": "string[]"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"description": "Uncontrolled initial order.",
|
|
21
|
+
"name": "defaultValue",
|
|
22
|
+
"type": "string[]"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"description": "Called ONCE per drop with the new order — not on every preview step.",
|
|
26
|
+
"name": "onValueChange",
|
|
27
|
+
"type": "(keys: string[]) => void"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"description": "Draws an item's content beside its grip. Default: the label.",
|
|
31
|
+
"name": "renderItem",
|
|
32
|
+
"type": "(item, { index, dragging }) => ReactNode"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"defaultValue": "\"list\"",
|
|
36
|
+
"description": "Stacked rows, or tiles auto-filled into columns (--sortable-list-grid-item-min-inline-size). The keyboard order is the same either way.",
|
|
37
|
+
"name": "layout",
|
|
38
|
+
"type": "\"list\" | \"grid\""
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"description": "Every grip is inert.",
|
|
42
|
+
"name": "disabled",
|
|
43
|
+
"type": "boolean"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"description": "Accessible name of the list.",
|
|
47
|
+
"name": "aria-label",
|
|
48
|
+
"type": "string"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"description": "Id on the root.",
|
|
52
|
+
"name": "id",
|
|
53
|
+
"type": "string"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"description": "Class on the root.",
|
|
57
|
+
"name": "className",
|
|
58
|
+
"type": "string"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"related": [
|
|
62
|
+
"Tree — `draggable` for moving nodes within a hierarchy.",
|
|
63
|
+
"Transfer — choose items, not order them."
|
|
64
|
+
],
|
|
65
|
+
"rules": [],
|
|
66
|
+
"storyPath": "data-entry/sortable-list.tsx",
|
|
67
|
+
"tagline": "Reorder a flat list or a grid of tiles (gh#1173). Each item has a grip: drag it with a pointer (touch included — the grip sets touch-action: none), or focus it and press Space/Enter to lift, the arrows (Home / End) to move, Space/Enter to drop, Esc to cancel. Every step is spoken in a polite live region (\"2 of 3\"). The order is the value.",
|
|
68
|
+
"usage": [
|
|
69
|
+
"DO persist the order in onValueChange — it fires once per drop, so it is safe to save there.",
|
|
70
|
+
"DO give every item a human `label`: a screen reader hears it on lift, every move and drop.",
|
|
71
|
+
"DON'T nest SortableList, and don't put another drag gesture inside an item: the grip is the one drag surface.",
|
|
72
|
+
"Hierarchy (move INTO another node) is Tree `draggable`, not SortableList — this orders a flat list."
|
|
73
|
+
],
|
|
74
|
+
"useCases": [
|
|
75
|
+
"Desktop / dashboard editor: reorder widget tiles (layout=\"grid\").",
|
|
76
|
+
"Settings: order of tabs, columns, menu entries."
|
|
77
|
+
]
|
|
78
|
+
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "BreakpointProp"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
"description": "Overlaid count; does not change the bar cell width.
|
|
23
|
+
"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.",
|
|
24
24
|
"name": "badge",
|
|
25
25
|
"type": "ReactNode"
|
|
26
26
|
},
|
|
@@ -806,6 +806,11 @@
|
|
|
806
806
|
"name": "EmojiPicker",
|
|
807
807
|
"tagline": "Page icon / reaction picker in a Popover (gh#1164): search by the active language's CLDR keywords (ja / en / vi — emojibase-data, loaded lazily for that locale only), categories, per-user recents, a WAI-ARIA grid (one tab stop, arrows, Home / End, Enter), and \"remove icon\". No skin tones."
|
|
808
808
|
},
|
|
809
|
+
{
|
|
810
|
+
"group": "data-entry",
|
|
811
|
+
"name": "SortableList",
|
|
812
|
+
"tagline": "Reorder a flat list or a grid of tiles (gh#1173). Each item has a grip: drag it with a pointer (touch included — the grip sets touch-action: none), or focus it and press Space/Enter to lift, the arrows (Home / End) to move, Space/Enter to drop, Esc to cancel. Every step is spoken in a polite live region (\"2 of 3\"). The order is the value."
|
|
813
|
+
},
|
|
809
814
|
{
|
|
810
815
|
"group": "feedback",
|
|
811
816
|
"name": "TwoFactorSetup",
|
package/agent/components.json
CHANGED
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
"type": "{ label: string; units: number }[]"
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
|
-
"description": "Each row has id, label, inclusive start/end unit offsets, and localized startLabel/endLabel including current values. Optional `depth` (0 = top level) nests rows: pass them flat and depth-first (a parent, then its descendants); a row is a parent when the row after it is deeper. The component indents the label cell by `--range-timeline-indent-width` per level (logical padding, so RTL indents from the right; the label column keeps its width) and gives each parent a disclosure button. With no `depth > 0` anywhere the markup is unchanged.",
|
|
552
|
+
"description": "Each row has id, label, inclusive start/end unit offsets (`null` for either = the row has no dates: no bar, no handles, a muted \"no dates\" hint, gh#1189), optional `color` (hex from data, e.g. a status colour; grip ink flips black/white by luminance; non-hex keeps the default ink), `muted` (a done row recedes, --range-timeline-bar-muted-alpha), `overdue` (destructive inline-end edge that keeps the colour, plus a localized sr-only \"overdue\"), `tooltip` (ReactNode on hover and keyboard focus of a focusable bar layer named by the row label, beside the grips, never around them), `plan` ({ start, end } | null — the PLANNED range 予定, a dashed ghost bar behind the solid ACTUAL bar 実績; past the planned end a destructive overrun segment with a localized \"+N日\" label (override with `varianceLabel`, `false` hides it); ending before it a small success early marker; both also spoken; the ghost is never draggable), `planNote` (muted text after the bar for a row WITHOUT a plan, e.g. \"baseline後に追加\"), `editable` (true | false | { start?, end? }: which grips a row offers when onRangeChange is set; a started-but-open issue whose end is \"today\" passes { end: false }), and localized startLabel/endLabel including current values. Optional `depth` (0 = top level) nests rows: pass them flat and depth-first (a parent, then its descendants); a row is a parent when the row after it is deeper. The component indents the label cell by `--range-timeline-indent-width` per level (logical padding, so RTL indents from the right; the label column keeps its width) and gives each parent a disclosure button. With no `depth > 0` anywhere the markup is unchanged.",
|
|
553
553
|
"name": "rows",
|
|
554
554
|
"required": true,
|
|
555
555
|
"type": "RangeTimelineRow[]"
|
|
@@ -596,6 +596,33 @@
|
|
|
596
596
|
"description": "antd Table `sticky` — keep the axis header (bands + ticks) on screen while the PAGE scrolls a long schedule. `offsetHeader` is px from the top of the scrolling viewport (the height of a fixed app topbar). The header moves out of the horizontal scroller and follows its scrollLeft; the section becomes `overflow: clip` and the body scroller takes the keyboard tab stop. Like antd, it needs no clipping ancestor between the timeline and the page scroller: `Card` is `overflow: hidden`, so a sticky timeline goes in the page as its own section, not inside a Card. antd's `offsetScroll` / `getContainer` (sticky horizontal scrollbar) are not ported.",
|
|
597
597
|
"name": "sticky",
|
|
598
598
|
"type": "boolean | { offsetHeader?: number }"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"defaultValue": "false",
|
|
602
|
+
"description": "Let the user resize the label column by dragging a divider on its inline-end edge in the header (gh#1189): role=separator, aria-orientation vertical, aria-valuenow/min/max, ArrowLeft/Right (Shift = 32px step, else 8px), Home/End to min/max, RTL-aware, pointer drag. `true` = min 160 / max 640 px. The width lands on --range-timeline-label-width, so the token stays the default until the user drags.",
|
|
603
|
+
"name": "resizableLabel",
|
|
604
|
+
"type": "boolean | { min?: number; max?: number }"
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
"description": "Controlled label-column width in px. Persist it per user from onLabelWidthChange.",
|
|
608
|
+
"name": "labelWidth",
|
|
609
|
+
"type": "number"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"description": "Uncontrolled initial label-column width in px. Omitted: the token's width.",
|
|
613
|
+
"name": "defaultLabelWidth",
|
|
614
|
+
"type": "number"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"description": "Fires with the next label-column width (px, clamped) while dragging and on every key step.",
|
|
618
|
+
"name": "onLabelWidthChange",
|
|
619
|
+
"type": "(width: number) => void"
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
"defaultValue": "false",
|
|
623
|
+
"description": "A new range is loading while the previous rows stay on screen: dims the body (--range-timeline-busy-body-alpha), draws an indeterminate line under the header (static under prefers-reduced-motion) and sets aria-busy.",
|
|
624
|
+
"name": "busy",
|
|
625
|
+
"type": "boolean"
|
|
599
626
|
}
|
|
600
627
|
],
|
|
601
628
|
"rules": [],
|
|
@@ -1134,6 +1161,12 @@
|
|
|
1134
1161
|
"name": "gap",
|
|
1135
1162
|
"type": "\"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\""
|
|
1136
1163
|
},
|
|
1164
|
+
{
|
|
1165
|
+
"defaultValue": "false",
|
|
1166
|
+
"description": "Dense packing (grid-auto-flow: row dense): later small cells back-fill the holes a wide or tall cell leaves — a widget board of 1×1 / 2×1 / 1×2 cells (gh#1175). Visual order only; DOM and focus order stay as written, so use it for independent widgets/tiles, not reading order. Ignored under flow=\"columns\".",
|
|
1167
|
+
"name": "dense",
|
|
1168
|
+
"type": "boolean"
|
|
1169
|
+
},
|
|
1137
1170
|
{
|
|
1138
1171
|
"description": "Grid items — typically Card or StatCard.",
|
|
1139
1172
|
"name": "children",
|
|
@@ -1155,6 +1188,7 @@
|
|
|
1155
1188
|
"tagline": "Container-responsive card grid with configurable base, sm, md and lg columns.",
|
|
1156
1189
|
"usage": [
|
|
1157
1190
|
"ResponsiveGrid.Item span={2} owns a responsive column span; an object {base:1,lg:2} sets explicit steps, clamped to the parent columns.",
|
|
1191
|
+
"ResponsiveGrid.Item rowSpan={2} spans two rows — the tall (1×2) widget (gh#1175). Same shape as span: a number applies from sm up and is 1 at base (the single stacked column), an object sets each step. Pair with `dense` so the cells after it fill the space beside it.",
|
|
1158
1192
|
"KANBAN LANES: <ScrollArea orientation=\"horizontal\"><ResponsiveGrid flow=\"columns\" align=\"stretch\">{lanes.map(lane => <Card onDragOver onDrop>…<Card draggable>…</Card></Card>)}</ResponsiveGrid></ScrollArea>. align=\"stretch\" keeps an empty lane as tall as the fullest one, so it stays a full-height drop target; a Select inside a draggable card does not enlarge the drag image.",
|
|
1159
1193
|
"DO place StatCard tiles directly as immediate children — StatCard IS already a bordered card; never wrap it in an extra <Card><CardContent>. The canonical pattern is <ResponsiveGrid columns={4}><StatCard .../><StatCard .../></ResponsiveGrid>.",
|
|
1160
1194
|
"DO use columns={2|3|4} to declare the target desktop column count — the grid collapses automatically to 1 column on narrow containers (mobile-first via CSS container queries), via 2-column intermediate at ≥640px, then full target count at ≥1024px. Use columns={{ base: 2, sm: 4 }} for two mobile columns and four wider-container columns; no consumer CSS is needed.",
|
|
@@ -1644,6 +1678,11 @@
|
|
|
1644
1678
|
"name": "brand",
|
|
1645
1679
|
"type": "ReactNode | ((collapsed: boolean) => ReactNode)"
|
|
1646
1680
|
},
|
|
1681
|
+
{
|
|
1682
|
+
"description": "The rail's ONE primary action (Linear \"New issue\", Jira \"+ Create\", Notion \"New page\"), rendered between the brand header and the scrolling nav and never scrolling with it (gh#1185). Put exactly one primary control here: a Button full width (fullWidth) when expanded, icon-only with aria-label + Tooltip when collapsed. PASS A FUNCTION for the same reason brand and footer take one: it receives the EFFECTIVE collapsed value, so AppShell's mobile drawer (which never collapses) gets the full button from the same Sidebar node. Inset: --sidebar-action-padding (inline matches the nav rows). Do NOT put the action in `brand` - that slot is the product lockup.",
|
|
1683
|
+
"name": "action",
|
|
1684
|
+
"type": "ReactNode | ((collapsed: boolean) => ReactNode)"
|
|
1685
|
+
},
|
|
1647
1686
|
{
|
|
1648
1687
|
"description": "Slot pinned to the bottom of the sidebar below the scrollable nav area. Commonly used for user identity, online status, or a mode switch. PASS A FUNCTION for the same reason brand takes one, and it is the same reason twice: both slots sit INSIDE the collapsible rail, so both need the EFFECTIVE collapsed value, which a node built outside the component cannot see. Reading your own `collapsed` boolean renders a glyph-only footer inside AppShell's full-width drawer (the drawer un-collapses the rail); building a second Sidebar for AppShell's `mobileNav` is exactly the override that switches railInDrawer off; doing neither leaves the expanded footer to reflow inside a 64px rail (measured: a two-line identity block went 255x66 docked to 63x111 collapsed, wrapping the name over three lines). A plain ReactNode still works unchanged.",
|
|
1649
1688
|
"name": "footer",
|
|
@@ -1819,7 +1858,7 @@
|
|
|
1819
1858
|
"type": "BreakpointProp"
|
|
1820
1859
|
},
|
|
1821
1860
|
{
|
|
1822
|
-
"description": "Overlaid count; does not change the bar cell width.
|
|
1861
|
+
"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.",
|
|
1823
1862
|
"name": "badge",
|
|
1824
1863
|
"type": "ReactNode"
|
|
1825
1864
|
},
|
|
@@ -4238,7 +4277,7 @@
|
|
|
4238
4277
|
"name": "Legend",
|
|
4239
4278
|
"props": [
|
|
4240
4279
|
{
|
|
4241
|
-
"description": "The keys, in the order the marks they explain appear. `label` is required and cannot be omitted: colour alone never carries meaning (WCAG 1.4.1), so a wordless key would be the exact failure the component prevents.",
|
|
4280
|
+
"description": "The keys, in the order the marks they explain appear. `label` is required and cannot be omitted: colour alone never carries meaning (WCAG 1.4.1), so a wordless key would be the exact failure the component prevents. Each item is `{ tone, label }` or `{ color, label }`: `color` is a hex from data (user-chosen status colours, the same contract as Badge color and RangeTimelineRow color, gh#1189).",
|
|
4242
4281
|
"name": "items",
|
|
4243
4282
|
"required": true,
|
|
4244
4283
|
"type": "{ tone: \"default\" | \"success\" | \"warning\" | \"destructive\" | \"info\" | \"muted\" | \"neutral\"; label: ReactNode }[]"
|
|
@@ -7828,7 +7867,9 @@
|
|
|
7828
7867
|
"DO always control open state via `open` + `onOpenChange`. Dialog has no uncontrolled shortcut — omitting `open` means the trigger alone drives state, which is fine for simple trigger-only cases, but any async submission flow must use controlled state so you can hold the dialog open while `pending=true` and close it only on success.",
|
|
7829
7868
|
"DO include `DialogHeader` with `DialogTitle` (and optionally `DialogDescription`) inside every `DialogContent`. Radix requires an accessible title for screen readers; omitting it triggers a console warning and breaks a11y.",
|
|
7830
7869
|
"DO wrap tall/scrolling content in `DialogBody` (the ring-safe scroll slot, max-height ~60vh). It insets the content to match the dialog padding so a full-width control's focus ring never clips against the scroll container — mirror of SheetBody.",
|
|
7831
|
-
"DO set `modal={false}` when the user must keep working on the page behind an open dialog (edit a list while a payment or detail dialog stays open). Control `open` yourself: an outside press no longer closes it, so give it a visible close action. Escape closes it only while focus is inside the dialog."
|
|
7870
|
+
"DO set `modal={false}` when the user must keep working on the page behind an open dialog (edit a list while a payment or detail dialog stays open). Control `open` yourself: an outside press no longer closes it, so give it a visible close action. Escape closes it only while focus is inside the dialog.",
|
|
7871
|
+
"DO pass `width` on `DialogContent` for a wide dialog (an overview grid, a comparison): `<DialogContent width=\"60rem\">` (number = px, string = any CSS length; antd Modal `width`, same vocabulary as SheetContent `width`). It is capped at the viewport minus --dialog-viewport-inset, so it never leaves a phone screen. Default 32rem (--dialog-width-default). Do NOT switch to a full-width Sheet to get room (gh#1174).",
|
|
7872
|
+
"Enter/exit timing is a token: --dialog-motion-duration (and --sheet-enter-duration / --sheet-exit-duration on Sheet), default var(--duration-fast) = 150ms. Under prefers-reduced-motion both surfaces do not animate at all (gh#1178)."
|
|
7832
7873
|
],
|
|
7833
7874
|
"useCases": [
|
|
7834
7875
|
"Inline form dialog — create or edit a record (invoice line, supplier, coupon) without navigating away. Place `FormField`/`Input`/`Select` inside `DialogContent`, wire the submit button to your mutation, and hold `open` while `pending` to prevent double-submit.",
|
|
@@ -11970,6 +12011,7 @@
|
|
|
11970
12011
|
"tagline": "Radix Avatar wrapper with image and fallback slots for users, teams, and entities.",
|
|
11971
12012
|
"usage": [
|
|
11972
12013
|
"DO compose Avatar > AvatarImage + AvatarFallback so broken or missing images still show a readable fallback.",
|
|
12014
|
+
"DO pass `fit=\"contain\"` on AvatarImage for a logo or app icon that is wide, transparent or off-centre — the default `cover` crops to fill, right for a face (gh#1176). A full-bleed square icon (the GoDX service icon set) keeps the default.",
|
|
11973
12015
|
"DO use `presence` for who is reachable RIGHT NOW — a chat member list, a DM row, a message-stream author, the topbar account mark. It is the only supported way to put a status dot on an avatar: the dot's inset is a function of the mark's own --avatar-* radius/size and of the root's clip, neither of which a page can read, which is why the hand-rolled `<span className=\"relative\"><Avatar/><span className=\"absolute -end-0.5 -bottom-0.5 size-2.5 rounded-full bg-green-500 ring-2 ring-background\"/></span>` wrapper can never be got right from outside (and fails the DS audit on the raw palette).",
|
|
11974
12016
|
"DON'T announce a presence CHANGE from the avatar — it carries no aria-live on purpose. A roster of 40 marks resyncing over a socket would flood a screen reader; announce the change in the consumer's own live region if the product wants it.",
|
|
11975
12017
|
"DON'T reach for `Badge status` for presence, or `presence` for lifecycle. Presence is volatile, per-person and realtime and renders as a dot; a lifecycle status is a record's state and renders as a labelled chip.",
|
|
@@ -12996,9 +13038,9 @@
|
|
|
12996
13038
|
"type": "boolean"
|
|
12997
13039
|
},
|
|
12998
13040
|
{
|
|
12999
|
-
"description": "
|
|
13041
|
+
"description": "Every visible and screen-reader string, each optional (gh#1191). Unset entries come from the kit's own ja / en / vi catalogue for the active locale, so most apps pass nothing: the score words, the checklist line per rule (length / upper / lower / number / symbol), the sr-only passed / failed prefixes, and the polite live-region sentence (`announcement(strength)`). Pass only the ones your product words differently.",
|
|
13000
13042
|
"name": "labels",
|
|
13001
|
-
"type": "{ weak
|
|
13043
|
+
"type": "{ weak?: string; fair?: string; strong?: string; rules?: Partial<Record<PasswordRule, string>>; passed?: string; failed?: string; announcement?: (strength: string) => string }"
|
|
13002
13044
|
}
|
|
13003
13045
|
],
|
|
13004
13046
|
"related": [
|
|
@@ -14536,6 +14578,84 @@
|
|
|
14536
14578
|
"The data loads on first open (one locale, ~100 KB gzip); nothing ships in your main bundle."
|
|
14537
14579
|
]
|
|
14538
14580
|
},
|
|
14581
|
+
{
|
|
14582
|
+
"docPath": "docs/data-entry/sortable-list.tsx",
|
|
14583
|
+
"example": "import { SortableList } from \"@godxjp/ui/data-entry\";\n\n<SortableList\n aria-label=\"Widgets\"\n items={[{ value: \"cal\", label: \"Calendar\" }, { value: \"mail\", label: \"Mail\" }]}\n value={order}\n onValueChange={setOrder}\n/>",
|
|
14584
|
+
"group": "data-entry",
|
|
14585
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
14586
|
+
"name": "SortableList",
|
|
14587
|
+
"props": [
|
|
14588
|
+
{
|
|
14589
|
+
"description": "The rows to order. `label` is spoken in the grip's name and the announcements; a disabled item's grip is inert.",
|
|
14590
|
+
"name": "items",
|
|
14591
|
+
"required": true,
|
|
14592
|
+
"type": "{ value: string; label: string; disabled?: boolean }[]"
|
|
14593
|
+
},
|
|
14594
|
+
{
|
|
14595
|
+
"description": "The item keys in order (controlled with onValueChange).",
|
|
14596
|
+
"name": "value",
|
|
14597
|
+
"type": "string[]"
|
|
14598
|
+
},
|
|
14599
|
+
{
|
|
14600
|
+
"description": "Uncontrolled initial order.",
|
|
14601
|
+
"name": "defaultValue",
|
|
14602
|
+
"type": "string[]"
|
|
14603
|
+
},
|
|
14604
|
+
{
|
|
14605
|
+
"description": "Called ONCE per drop with the new order — not on every preview step.",
|
|
14606
|
+
"name": "onValueChange",
|
|
14607
|
+
"type": "(keys: string[]) => void"
|
|
14608
|
+
},
|
|
14609
|
+
{
|
|
14610
|
+
"description": "Draws an item's content beside its grip. Default: the label.",
|
|
14611
|
+
"name": "renderItem",
|
|
14612
|
+
"type": "(item, { index, dragging }) => ReactNode"
|
|
14613
|
+
},
|
|
14614
|
+
{
|
|
14615
|
+
"defaultValue": "\"list\"",
|
|
14616
|
+
"description": "Stacked rows, or tiles auto-filled into columns (--sortable-list-grid-item-min-inline-size). The keyboard order is the same either way.",
|
|
14617
|
+
"name": "layout",
|
|
14618
|
+
"type": "\"list\" | \"grid\""
|
|
14619
|
+
},
|
|
14620
|
+
{
|
|
14621
|
+
"description": "Every grip is inert.",
|
|
14622
|
+
"name": "disabled",
|
|
14623
|
+
"type": "boolean"
|
|
14624
|
+
},
|
|
14625
|
+
{
|
|
14626
|
+
"description": "Accessible name of the list.",
|
|
14627
|
+
"name": "aria-label",
|
|
14628
|
+
"type": "string"
|
|
14629
|
+
},
|
|
14630
|
+
{
|
|
14631
|
+
"description": "Id on the root.",
|
|
14632
|
+
"name": "id",
|
|
14633
|
+
"type": "string"
|
|
14634
|
+
},
|
|
14635
|
+
{
|
|
14636
|
+
"description": "Class on the root.",
|
|
14637
|
+
"name": "className",
|
|
14638
|
+
"type": "string"
|
|
14639
|
+
}
|
|
14640
|
+
],
|
|
14641
|
+
"related": [
|
|
14642
|
+
"Tree — `draggable` for moving nodes within a hierarchy.",
|
|
14643
|
+
"Transfer — choose items, not order them."
|
|
14644
|
+
],
|
|
14645
|
+
"rules": [],
|
|
14646
|
+
"storyPath": "data-entry/sortable-list.tsx",
|
|
14647
|
+
"tagline": "Reorder a flat list or a grid of tiles (gh#1173). Each item has a grip: drag it with a pointer (touch included — the grip sets touch-action: none), or focus it and press Space/Enter to lift, the arrows (Home / End) to move, Space/Enter to drop, Esc to cancel. Every step is spoken in a polite live region (\"2 of 3\"). The order is the value.",
|
|
14648
|
+
"usage": [
|
|
14649
|
+
"DO persist the order in onValueChange — it fires once per drop, so it is safe to save there.",
|
|
14650
|
+
"DO give every item a human `label`: a screen reader hears it on lift, every move and drop.",
|
|
14651
|
+
"DON'T nest SortableList, and don't put another drag gesture inside an item: the grip is the one drag surface.",
|
|
14652
|
+
"Hierarchy (move INTO another node) is Tree `draggable`, not SortableList — this orders a flat list."
|
|
14653
|
+
],
|
|
14654
|
+
"useCases": [
|
|
14655
|
+
"Desktop / dashboard editor: reorder widget tiles (layout=\"grid\").",
|
|
14656
|
+
"Settings: order of tabs, columns, menu entries."
|
|
14657
|
+
]
|
|
14658
|
+
},
|
|
14539
14659
|
{
|
|
14540
14660
|
"example": "import { TwoFactorSetup } from \"@godxjp/ui/feedback\";\n\n<TwoFactorSetup\n open={open}\n onOpenChange={setOpen}\n qrValue={enrollment.qr}\n manualKey={enrollment.secret}\n code={code}\n onCodeChange={setCode}\n onConfirm={verify}\n recoveryCodes={recoveryCodes}\n onAcknowledge={finish}\n labels={labels}\n/>",
|
|
14541
14661
|
"group": "feedback",
|
|
@@ -15054,6 +15174,11 @@
|
|
|
15054
15174
|
"description": "Open-state callback.",
|
|
15055
15175
|
"name": "onOpenChange",
|
|
15056
15176
|
"type": "(open: boolean) => void"
|
|
15177
|
+
},
|
|
15178
|
+
{
|
|
15179
|
+
"description": "Secondary links under the grid — \"Request access\", \"All apps\" (the Workspace / Okta / My Apps row, gh#1172). Pass the links; the launcher draws the row (hairline above, small type, --app-launcher-footer-*) outside the scrolling grid, after the tiles in focus order, in every state including empty/loading/error. Not a tile: never fake it as a one-tile group.",
|
|
15180
|
+
"name": "footer",
|
|
15181
|
+
"type": "ReactNode"
|
|
15057
15182
|
}
|
|
15058
15183
|
],
|
|
15059
15184
|
"related": [
|
package/agent/index.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"counts": {
|
|
3
3
|
"anti-ai-tells": 26,
|
|
4
|
-
"components":
|
|
4
|
+
"components": 185,
|
|
5
5
|
"patterns": 21,
|
|
6
6
|
"rules": 50,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2176,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"file": "components-index.json",
|
|
13
|
-
"note": "51 KB — name + group + tagline for all
|
|
13
|
+
"note": "51 KB — name + group + tagline for all 185. FETCH THIS FIRST, then fetch only the components you chose.",
|
|
14
14
|
"url": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
|
|
49
49
|
"read": {
|
|
50
50
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
51
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.30.0/agent/index.json"
|
|
52
52
|
},
|
|
53
53
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
54
54
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
55
55
|
"tokenTiers": {
|
|
56
56
|
"component": "per-part knobs, --{component}-{part}-{property}; usually leave these alone",
|
|
57
57
|
"counts": {
|
|
58
|
-
"component":
|
|
58
|
+
"component": 1853,
|
|
59
59
|
"foundation": 211,
|
|
60
60
|
"semantic": 112
|
|
61
61
|
},
|
|
62
62
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
63
63
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
64
64
|
},
|
|
65
|
-
"version": "31.
|
|
65
|
+
"version": "31.30.0"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system:
|
|
4
|
-
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.
|
|
3
|
+
> A Japanese-enterprise React design system: 185 components, 2176 design tokens,
|
|
4
|
+
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.30.0.
|
|
5
5
|
|
|
6
6
|
If your client can run a process, do not read these files — run the MCP server instead
|
|
7
|
-
(`npx @godxjp/ui-mcp@31.
|
|
7
|
+
(`npx @godxjp/ui-mcp@31.30.0`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -15,10 +15,10 @@ that can only fetch URLs.
|
|
|
15
15
|
## Catalog
|
|
16
16
|
|
|
17
17
|
- [patterns-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/patterns-index.json): 21 whole-task patterns (name, tagline, tags). Start here when the task is a TASK — "build a settings page" — then fetch `patterns/<name>.json` for complete code.
|
|
18
|
-
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 51 KB — all
|
|
18
|
+
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 51 KB — all 185 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
|
|
19
19
|
- [components/<Name>.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–36 KB, median 6 KB). Read the index, then fetch only the ones you chose — this is the selective route, and the reason you do not need the blob.
|
|
20
20
|
- [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.3 MB — every entry in one file. Most URL fetchers truncate a response this size without saying so; prefer the per-component files.
|
|
21
|
-
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 112 `semantic` roles,
|
|
21
|
+
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 112 `semantic` roles, 1853 `component` knobs.
|
|
22
22
|
- [vocabulary.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json): the controlled prop vocabulary — which prop name means what, across every component.
|
|
23
23
|
- [rules.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json): 50 cardinal rules.
|
|
24
24
|
- [anti-ai-tells.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/anti-ai-tells.json): 26 shapes that make generated UI look generated, each with its fix.
|
|
@@ -26,7 +26,7 @@ that can only fetch URLs.
|
|
|
26
26
|
## Pinning
|
|
27
27
|
|
|
28
28
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
29
|
-
the tag: `.../godx-jp/godxjp-ui/v31.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v31.30.0/agent/...`. A catalog that does not match the installed
|
|
30
30
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
31
31
|
|
|
32
32
|
Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
|