@godxjp/ui 33.1.1 → 33.2.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 +6 -6
- package/agent/components/Command.json +9 -1
- package/agent/components/TranslatableInput.json +92 -0
- package/agent/components/TranslatableTextarea.json +84 -0
- package/agent/components-index.json +10 -0
- package/agent/components.json +185 -1
- package/agent/index.json +7 -7
- package/agent/llms.txt +7 -7
- package/agent/tokens.json +12 -0
- package/dist/components/data-entry/command.d.ts +22 -1
- package/dist/components/data-entry/command.js +14 -1
- package/dist/components/data-entry/form-field.js +10 -4
- package/dist/components/data-entry/index.d.ts +4 -2
- package/dist/components/data-entry/index.js +6 -1
- package/dist/components/data-entry/translatable-input.d.ts +29 -0
- package/dist/components/data-entry/translatable-input.js +184 -0
- package/dist/contracts/measurement.json +1 -1
- package/dist/i18n/messages/en.json +4 -0
- package/dist/i18n/messages/ja.json +4 -0
- package/dist/i18n/messages/vi.json +4 -0
- package/dist/lib/field-a11y.d.ts +15 -0
- package/dist/lib/field-a11y.js +13 -1
- package/dist/lib/intl-cache.d.ts +1 -0
- package/dist/lib/intl-cache.js +4 -0
- package/dist/props/components/data-entry.prop.d.ts +46 -0
- package/dist/props/components/index.d.ts +1 -1
- package/dist/props/registry.d.ts +51 -0
- package/dist/props/registry.js +79 -0
- package/dist/styles/control.css +15 -0
- package/dist/styles/data-entry-layout.css +25 -0
- package/dist/styles/layers.json +19 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/components/data-entry.css +4 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ npm i @godxjp/ui
|
|
|
18
18
|
|
|
19
19
|
<!-- agent-catalog-counts:start -->
|
|
20
20
|
|
|
21
|
-
The catalog —
|
|
21
|
+
The catalog — 165 components, 2230 tokens, 44 cardinal rules — is published in two forms from one
|
|
22
22
|
source. **Entry point for either: [`AGENTS.md`](AGENTS.md).**
|
|
23
23
|
<!-- agent-catalog-counts:end -->
|
|
24
24
|
|
|
@@ -53,10 +53,10 @@ static files straight from this public repo — no hosting, no deploy step:
|
|
|
53
53
|
| [`agent/llms.txt`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/llms.txt) | 3 KB | the [llms.txt](https://llmstxt.org/) entry point |
|
|
54
54
|
| [`agent/DESIGN.md`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/DESIGN.md) | 17 KB | the visual spec: tokens, colour scarcity, admin screen anatomy, do/don't |
|
|
55
55
|
| [`agent/index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json) | 3 KB | manifest: version, counts, every file's URL |
|
|
56
|
-
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) | 49 KB | all
|
|
56
|
+
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) | 49 KB | all 165 as name + group + tagline — **fetch this first** |
|
|
57
57
|
| [`agent/components/<Name>.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json) | 1 KB–37 KB | one file per component, each with its `importPath` — **this is the route to take** |
|
|
58
|
-
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.
|
|
59
|
-
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) | 857 KB | all
|
|
58
|
+
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.3 MB | all 165 entries in one file — most URL fetchers truncate this silently; prefer the per-component files |
|
|
59
|
+
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) | 857 KB | all 2230 design tokens, their values and why they exist |
|
|
60
60
|
| [`agent/vocabulary.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json) | 7 KB | the controlled prop vocabulary |
|
|
61
61
|
| [`agent/rules.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json) | 22 KB | the 44 cardinal rules |
|
|
62
62
|
<!-- prettier-ignore-end -->
|
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 33.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 33.2.1.** If the project you are editing has a different
|
|
7
7
|
version in its `package.json`, read the pinned catalog for THAT version instead
|
|
8
8
|
(`…/v<their-version>/agent/…`). A catalog newer than the installed package describes props that do
|
|
9
9
|
not exist yet; older, and it hides props that do. Neither failure announces itself.
|
|
@@ -52,7 +52,7 @@ screen anatomy, the visual target the rules below do not give you. Then fetch in
|
|
|
52
52
|
task is a task** — "build a settings page", "confirm a destructive delete", "a list page with
|
|
53
53
|
filters" — start HERE, not at the components. Then fetch `patterns/<name>.json` for complete,
|
|
54
54
|
copy-paste-ready code. A component index answers "does X exist"; it cannot answer "build Y".
|
|
55
|
-
1. `components-index.json` — 49 KB, all
|
|
55
|
+
1. `components-index.json` — 49 KB, all 165 components as name + group +
|
|
56
56
|
tagline. Read this when you already know the SHAPE you need. Each entry may carry `absorbed`:
|
|
57
57
|
names that **do not exist** and map to it — `Combobox`, `Autocomplete`, `CountrySelect` and
|
|
58
58
|
`SearchSelect` are all `Select`. If you are about to hand-roll something, search this field
|
|
@@ -61,15 +61,15 @@ screen anatomy, the visual target the rules below do not give you. Then fetch in
|
|
|
61
61
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
62
62
|
3. `rules.json` — 44 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
63
63
|
style advice.
|
|
64
|
-
4. `tokens.json` —
|
|
64
|
+
4. `tokens.json` — 2230 design tokens, each tagged with its `tier`. **If you were handed a
|
|
65
65
|
brand, read the 216 `foundation` entries first** — `--primary`, `--background`,
|
|
66
66
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
67
|
-
|
|
67
|
+
1901 `component` entries are per-part knobs; reach for one only when a role is
|
|
68
68
|
right everywhere except one component.
|
|
69
69
|
5. `anti-ai-tells.json` — 35 shapes that make generated UI look generated, each with the
|
|
70
70
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
71
71
|
|
|
72
|
-
**Do not fetch `components.json`.** It is 1.
|
|
72
|
+
**Do not fetch `components.json`.** It is 1.3 MB, and most URL fetchers truncate a
|
|
73
73
|
response that size and return the head without telling you. You get the first few entries, believe
|
|
74
74
|
you read the catalog, and answer the rest from memory — which is the failure this file exists to
|
|
75
75
|
prevent. The per-component files say the same thing without the cliff.
|
|
@@ -150,7 +150,7 @@ has stopped following the brand.
|
|
|
150
150
|
|---|---|---|---|
|
|
151
151
|
| `foundation` | 216 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** The default `--primary` is a neutral placeholder: set it (`:root { --primary: <H> <S>% <L>%; }`, HSL components, no `hsl()` wrapper) or import a theme preset such as `@godxjp/ui/themes/godx.css` |
|
|
152
152
|
| `semantic` | 113 | named roles that follow the seeds — `--ring`, `--text-link`, `--primary-hover`, `--overlay-background` | only when the seed is right and ONE role must differ. That role then stops following a later brand change |
|
|
153
|
-
| `component` |
|
|
153
|
+
| `component` | 1901 | per-part knobs, `--{component}-{part}-{property}` | rarely. Most are declared `initial` with the real default at the call site — deliberate, so a scoped override re-resolves instead of freezing at `:root` |
|
|
154
154
|
|
|
155
155
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
156
156
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -126,6 +126,12 @@
|
|
|
126
126
|
"description": "Renders automatically only when there are no matching results. Place inside CommandList.",
|
|
127
127
|
"name": "CommandEmpty",
|
|
128
128
|
"type": "React.ReactNode (children)"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"defaultValue": "true",
|
|
132
|
+
"description": "CommandSeparator is cmdk's Command.Separator (data-slot=\"command-separator\", ref forwarded, className merged): a hairline between two groups of one list. Default true — the OPPOSITE of cmdk, which drops the separator once the search is non-empty; a `+ Create \"<q>\"` group only exists while the user types, so the rule above it must stay. Pass false for cmdk's palette behaviour. Hidden automatically beside a group cmdk has hidden (no matching rows) and under `split` (which already rules group boundaries). aria-hidden: decorative, since a separator is not an allowed listbox child. Tokens: --command-item-divider-width / --command-item-divider-color (→ --stroke-hairline / --border), margin-block --command-group-padding.",
|
|
133
|
+
"name": "CommandSeparator.alwaysRender",
|
|
134
|
+
"type": "boolean"
|
|
129
135
|
}
|
|
130
136
|
],
|
|
131
137
|
"related": [
|
|
@@ -146,7 +152,8 @@
|
|
|
146
152
|
"CommandGroup",
|
|
147
153
|
"CommandInput",
|
|
148
154
|
"CommandItem",
|
|
149
|
-
"CommandList"
|
|
155
|
+
"CommandList",
|
|
156
|
+
"CommandSeparator"
|
|
150
157
|
],
|
|
151
158
|
"tagline": "Accessible, keyboard-navigable command palette / combobox list built on cmdk — always pair CommandInput inside its own wrapper div, never render items outside CommandList.",
|
|
152
159
|
"usage": [
|
|
@@ -155,6 +162,7 @@
|
|
|
155
162
|
"DO always provide a stable explicit value prop on CommandItem when the item's text content can change between renders — relying on inferred textContent with dynamic labels causes selection bugs.",
|
|
156
163
|
"DO include CommandEmpty inside CommandList to show a no-results message. It renders automatically only when the filtered count is zero; do not conditionally render it yourself.",
|
|
157
164
|
"DO use split for checkbox/option lists (a filter facet, a picker: Popover + PopoverContent flush + Command split) — rows get a divider between them and 0 list padding, so they read as one box. Keep the default (unsplit) for a command palette. Never re-create the look with page CSS (border on items, padding 0 on the group): retune --command-item-divider-color / --command-item-divider-width instead.",
|
|
165
|
+
"DO divide a result group from an action group with CommandSeparator — matches, then `<CommandSeparator />`, then `<CommandGroup forceMount><CommandItem forceMount value={`__create__${q}`}>+ Create \"{q}\"</CommandItem></CommandGroup>` rendered only while the query has no exact match. Give the create item an explicit value (never inferred from its changing text) and forceMount both it and its group so the filter cannot hide it. Never keep a local copy of the Command family for the divider — a compound must come from one cmdk instance.",
|
|
158
166
|
"DON'T use CommandInput as a standalone search input — it is only meaningful inside a Command root (the root manages shared filter state). For a standalone search field use SearchInput instead.",
|
|
159
167
|
"DON'T hand-roll keyboard navigation on a list of items; Command handles arrow keys, Enter, Escape, Home/End, and vim bindings. Adding your own keyDown handlers on top creates conflicts — use onSelect on CommandItem for selection logic."
|
|
160
168
|
],
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { FormField, TranslatableInput, TranslatableTextarea, type TranslatableValue } from \"@godxjp/ui/data-entry\";\n\nconst [productName, setProductName] = React.useState<TranslatableValue>({ ja: \"醤油ラーメン\" });\nconst [description, setDescription] = React.useState<TranslatableValue>({});\n\n<FormField label=\"商品名\" required>\n <TranslatableInput\n locales={[\"ja\", \"en\", \"vi\"]}\n fallbackLocale=\"ja\"\n value={productName}\n onValueChange={setProductName}\n errors={{ en: \"英語名を入力してください\" }}\n />\n</FormField>\n\n<FormField label=\"説明\">\n <TranslatableTextarea locales={[\"ja\", \"en\", \"vi\"]} value={description} onValueChange={setDescription} rows={3} />\n</FormField>",
|
|
3
|
+
"group": "data-entry",
|
|
4
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
5
|
+
"name": "TranslatableInput",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Controlled per-locale values — `Partial<Record<string, string>>` keyed by BCP-47 tag. A missing key or `\"\"` is an empty locale.",
|
|
9
|
+
"name": "value",
|
|
10
|
+
"type": "TranslatableValue"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Uncontrolled initial per-locale values.",
|
|
14
|
+
"name": "defaultValue",
|
|
15
|
+
"type": "TranslatableValue"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"description": "The WHOLE map after an edit: only the active locale's key changes, every other locale is carried over untouched. The ✕ of `allowClear` empties the active locale only.",
|
|
19
|
+
"name": "onValueChange",
|
|
20
|
+
"type": "(value: TranslatableValue) => void"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"description": "The BCP-47 tags the field edits, in tab order. Default: every locale registered with the app (`getRegisteredLocales()` — built-in `vi`/`en`/`ja` plus `registerLocale`). Tabs are named by `Intl.DisplayNames` in the reader's UI language; the tags stay the keys.",
|
|
24
|
+
"name": "locales",
|
|
25
|
+
"type": "readonly string[]"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"description": "The locale tab selected first. Default: the AppProvider's active locale when it is in `locales`, else the fallback locale.",
|
|
29
|
+
"name": "defaultLocale",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"description": "The locale whose text an EMPTY locale shows as its placeholder. Default: the AppProvider's `fallbackLocale`, or the first of `locales` when that is not one of them.",
|
|
34
|
+
"name": "fallbackLocale",
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"description": "Per-locale validation messages. Each locale that has one gets an error mark on its tab — a glyph plus screen-reader text («Vietnamese, has an error»), never colour alone. The ACTIVE locale's message sets `aria-invalid` and is shown in the enclosing FormField's own error line (wired by `aria-errormessage`); without a FormField it is shown under the field.",
|
|
39
|
+
"name": "errors",
|
|
40
|
+
"type": "Partial<Record<string, ReactNode>>"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"defaultValue": "\"md\"",
|
|
44
|
+
"description": "The field's control tier, as on Input. The tab strip uses the Tabs `sm` tier (`md` for an `lg` field).",
|
|
45
|
+
"name": "size",
|
|
46
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"description": "Shown while the active locale is empty and there is no fallback text to show (the fallback locale itself, or an empty fallback).",
|
|
50
|
+
"name": "placeholder",
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "Disables the control; the locale tabs stay operable so every locale can still be read.",
|
|
55
|
+
"name": "disabled",
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"description": "Lands on the control, so a FormField label click focuses it.",
|
|
60
|
+
"name": "id",
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"description": "Root (strip + field) class override.",
|
|
65
|
+
"name": "className",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"related": [
|
|
70
|
+
"TranslatableTextarea — the same contract over a Textarea.",
|
|
71
|
+
"Input — the control it composes; every Input prop applies.",
|
|
72
|
+
"FormField — the label / helper / error wiring it reports into.",
|
|
73
|
+
"Tabs — the switcher it composes (strip-only, `controls` → the field's panel).",
|
|
74
|
+
"AppSettingPicker kind=\"locale\" — chooses the UI language, not per-locale content."
|
|
75
|
+
],
|
|
76
|
+
"rules": [],
|
|
77
|
+
"storyPath": "data-entry/translatable-input.tsx",
|
|
78
|
+
"tagline": "ONE text field holding a value per locale (`{ ja, en, vi }`), switched by locale tabs above it (gh#1336). For user content stored per locale — a product name, a category label, a menu description (Astrotomic / Spatie `*_translations`). Locales, first tab and fallback come from AppProvider; an empty locale shows the fallback locale's text as its placeholder; a locale with an error is marked on its tab. Every other `Input` prop applies to the one control.",
|
|
79
|
+
"usage": [
|
|
80
|
+
"DO wrap it in FormField: the label names the control together with the active locale («商品名 English») and names the tab strip («商品名 Language»), `required`/`helper` reach the control, and the active locale's error renders in FormField's error line.",
|
|
81
|
+
"DO pass the per-locale error map from your validator as `errors` (e.g. Laravel `name.ja` → `errors.ja`). Don't pass the same message to FormField `error` as well: FormField's own `error` wins over the reported one, and it would mark the field invalid on every locale.",
|
|
82
|
+
"DO set `fallbackLocale` to the content's SOURCE language (often `ja`) when it differs from the AppProvider's UI fallback — the placeholder of an untranslated locale then shows the source text to translate from.",
|
|
83
|
+
"DON'T build a local wrapper of Tabs + Input for this: the tab↔panel ARIA, the lang attribute, the error marks and the FormField wiring are what this component exists for.",
|
|
84
|
+
"DON'T use it for a choice of language that IS the form's value (a user's preferred language): that is `AppSettingPicker kind=\"locale\"` or a Select.",
|
|
85
|
+
"The locale switcher is the WAI-ARIA APG tabs pattern (tablist → one tabpanel holding the field), not a Segmented radio group: the locale is not form state — every locale is submitted together — the tab only chooses which locale the one field shows."
|
|
86
|
+
],
|
|
87
|
+
"useCases": [
|
|
88
|
+
"Product / menu item name in ja, en and vi on an admin edit form",
|
|
89
|
+
"Category or section label stored per locale (Astrotomic `*_translations`)",
|
|
90
|
+
"Translated description or recipe text (TranslatableTextarea)"
|
|
91
|
+
]
|
|
92
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"example": "import { FormField, TranslatableTextarea } from \"@godxjp/ui/data-entry\";\n\n<FormField label=\"説明\">\n <TranslatableTextarea locales={[\"ja\", \"en\", \"vi\"]} value={description} onValueChange={setDescription} autoGrow minRows={3} />\n</FormField>",
|
|
3
|
+
"group": "data-entry",
|
|
4
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
5
|
+
"name": "TranslatableTextarea",
|
|
6
|
+
"props": [
|
|
7
|
+
{
|
|
8
|
+
"description": "Controlled per-locale values, keyed by BCP-47 tag.",
|
|
9
|
+
"name": "value",
|
|
10
|
+
"type": "TranslatableValue"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"description": "Uncontrolled initial per-locale values.",
|
|
14
|
+
"name": "defaultValue",
|
|
15
|
+
"type": "TranslatableValue"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"description": "The whole map after an edit; only the active locale's key changes.",
|
|
19
|
+
"name": "onValueChange",
|
|
20
|
+
"type": "(value: TranslatableValue) => void"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"description": "The BCP-47 tags the field edits, in tab order. Default: the app's registered locales.",
|
|
24
|
+
"name": "locales",
|
|
25
|
+
"type": "readonly string[]"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"description": "The locale tab selected first. Default: the AppProvider's active locale.",
|
|
29
|
+
"name": "defaultLocale",
|
|
30
|
+
"type": "string"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"description": "The locale whose text an empty locale shows as its placeholder. Default: the AppProvider's `fallbackLocale`.",
|
|
34
|
+
"name": "fallbackLocale",
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"description": "Per-locale messages: tab marks for each, `aria-invalid` + FormField's error line for the active one.",
|
|
39
|
+
"name": "errors",
|
|
40
|
+
"type": "Partial<Record<string, ReactNode>>"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"defaultValue": "\"md\"",
|
|
44
|
+
"description": "The field's control tier, as on Textarea.",
|
|
45
|
+
"name": "size",
|
|
46
|
+
"type": "\"sm\" | \"md\" | \"lg\""
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"description": "Shown while the active locale is empty and there is no fallback text.",
|
|
50
|
+
"name": "placeholder",
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"description": "Disables the control; the locale tabs stay operable.",
|
|
55
|
+
"name": "disabled",
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"description": "Lands on the control.",
|
|
60
|
+
"name": "id",
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"description": "Root class override.",
|
|
65
|
+
"name": "className",
|
|
66
|
+
"type": "string"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"related": [
|
|
70
|
+
"TranslatableInput — the single-line form and the full contract.",
|
|
71
|
+
"Textarea — the control it composes."
|
|
72
|
+
],
|
|
73
|
+
"rules": [],
|
|
74
|
+
"storyPath": "data-entry/translatable-input.tsx",
|
|
75
|
+
"tagline": "TranslatableInput over a Textarea (gh#1336): one multi-line field holding a value per locale, switched by locale tabs. Same locale, fallback-placeholder, error-mark and FormField contract; every Textarea prop (rows, autoGrow, count…) applies to the one control.",
|
|
76
|
+
"usage": [
|
|
77
|
+
"DO use it for per-locale multi-line content (a description, a recipe); for a single line use TranslatableInput.",
|
|
78
|
+
"DO wrap it in FormField, exactly as TranslatableInput."
|
|
79
|
+
],
|
|
80
|
+
"useCases": [
|
|
81
|
+
"Menu item description in ja, en and vi",
|
|
82
|
+
"Recipe or notice body stored per locale"
|
|
83
|
+
]
|
|
84
|
+
}
|
|
@@ -408,6 +408,16 @@
|
|
|
408
408
|
"name": "Textarea",
|
|
409
409
|
"tagline": "Styled wrapper around native <textarea>. Pair with FormField for labelled fields. For a Markdown body (wiki page, issue description, mail) use the sibling package `@godxjp/editor` `MarkdownEditor` — this Textarea plus a formatting toolbar, preview through `@godxjp/markdown`, and paste/drop upload through a host `upload` function (gh#1109)."
|
|
410
410
|
},
|
|
411
|
+
{
|
|
412
|
+
"group": "data-entry",
|
|
413
|
+
"name": "TranslatableInput",
|
|
414
|
+
"tagline": "ONE text field holding a value per locale (`{ ja, en, vi }`), switched by locale tabs above it (gh#1336). For user content stored per locale — a product name, a category label, a menu description (Astrotomic / Spatie `*_translations`). Locales, first tab and fallback come from AppProvider; an empty locale shows the fallback locale's text as its placeholder; a locale with an error is marked on its tab. Every other `Input` prop applies to the one control."
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"group": "data-entry",
|
|
418
|
+
"name": "TranslatableTextarea",
|
|
419
|
+
"tagline": "TranslatableInput over a Textarea (gh#1336): one multi-line field holding a value per locale, switched by locale tabs. Same locale, fallback-placeholder, error-mark and FormField contract; every Textarea prop (rows, autoGrow, count…) applies to the one control."
|
|
420
|
+
},
|
|
411
421
|
{
|
|
412
422
|
"group": "data-entry",
|
|
413
423
|
"name": "Label",
|
package/agent/components.json
CHANGED
|
@@ -7126,6 +7126,182 @@
|
|
|
7126
7126
|
"Audit log annotation — allowing an accountant to attach a plain-text explanation to a manual journal entry or adjustment record."
|
|
7127
7127
|
]
|
|
7128
7128
|
},
|
|
7129
|
+
{
|
|
7130
|
+
"example": "import { FormField, TranslatableInput, TranslatableTextarea, type TranslatableValue } from \"@godxjp/ui/data-entry\";\n\nconst [productName, setProductName] = React.useState<TranslatableValue>({ ja: \"醤油ラーメン\" });\nconst [description, setDescription] = React.useState<TranslatableValue>({});\n\n<FormField label=\"商品名\" required>\n <TranslatableInput\n locales={[\"ja\", \"en\", \"vi\"]}\n fallbackLocale=\"ja\"\n value={productName}\n onValueChange={setProductName}\n errors={{ en: \"英語名を入力してください\" }}\n />\n</FormField>\n\n<FormField label=\"説明\">\n <TranslatableTextarea locales={[\"ja\", \"en\", \"vi\"]} value={description} onValueChange={setDescription} rows={3} />\n</FormField>",
|
|
7131
|
+
"group": "data-entry",
|
|
7132
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
7133
|
+
"name": "TranslatableInput",
|
|
7134
|
+
"props": [
|
|
7135
|
+
{
|
|
7136
|
+
"description": "Controlled per-locale values — `Partial<Record<string, string>>` keyed by BCP-47 tag. A missing key or `\"\"` is an empty locale.",
|
|
7137
|
+
"name": "value",
|
|
7138
|
+
"type": "TranslatableValue"
|
|
7139
|
+
},
|
|
7140
|
+
{
|
|
7141
|
+
"description": "Uncontrolled initial per-locale values.",
|
|
7142
|
+
"name": "defaultValue",
|
|
7143
|
+
"type": "TranslatableValue"
|
|
7144
|
+
},
|
|
7145
|
+
{
|
|
7146
|
+
"description": "The WHOLE map after an edit: only the active locale's key changes, every other locale is carried over untouched. The ✕ of `allowClear` empties the active locale only.",
|
|
7147
|
+
"name": "onValueChange",
|
|
7148
|
+
"type": "(value: TranslatableValue) => void"
|
|
7149
|
+
},
|
|
7150
|
+
{
|
|
7151
|
+
"description": "The BCP-47 tags the field edits, in tab order. Default: every locale registered with the app (`getRegisteredLocales()` — built-in `vi`/`en`/`ja` plus `registerLocale`). Tabs are named by `Intl.DisplayNames` in the reader's UI language; the tags stay the keys.",
|
|
7152
|
+
"name": "locales",
|
|
7153
|
+
"type": "readonly string[]"
|
|
7154
|
+
},
|
|
7155
|
+
{
|
|
7156
|
+
"description": "The locale tab selected first. Default: the AppProvider's active locale when it is in `locales`, else the fallback locale.",
|
|
7157
|
+
"name": "defaultLocale",
|
|
7158
|
+
"type": "string"
|
|
7159
|
+
},
|
|
7160
|
+
{
|
|
7161
|
+
"description": "The locale whose text an EMPTY locale shows as its placeholder. Default: the AppProvider's `fallbackLocale`, or the first of `locales` when that is not one of them.",
|
|
7162
|
+
"name": "fallbackLocale",
|
|
7163
|
+
"type": "string"
|
|
7164
|
+
},
|
|
7165
|
+
{
|
|
7166
|
+
"description": "Per-locale validation messages. Each locale that has one gets an error mark on its tab — a glyph plus screen-reader text («Vietnamese, has an error»), never colour alone. The ACTIVE locale's message sets `aria-invalid` and is shown in the enclosing FormField's own error line (wired by `aria-errormessage`); without a FormField it is shown under the field.",
|
|
7167
|
+
"name": "errors",
|
|
7168
|
+
"type": "Partial<Record<string, ReactNode>>"
|
|
7169
|
+
},
|
|
7170
|
+
{
|
|
7171
|
+
"defaultValue": "\"md\"",
|
|
7172
|
+
"description": "The field's control tier, as on Input. The tab strip uses the Tabs `sm` tier (`md` for an `lg` field).",
|
|
7173
|
+
"name": "size",
|
|
7174
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
7175
|
+
},
|
|
7176
|
+
{
|
|
7177
|
+
"description": "Shown while the active locale is empty and there is no fallback text to show (the fallback locale itself, or an empty fallback).",
|
|
7178
|
+
"name": "placeholder",
|
|
7179
|
+
"type": "string"
|
|
7180
|
+
},
|
|
7181
|
+
{
|
|
7182
|
+
"description": "Disables the control; the locale tabs stay operable so every locale can still be read.",
|
|
7183
|
+
"name": "disabled",
|
|
7184
|
+
"type": "boolean"
|
|
7185
|
+
},
|
|
7186
|
+
{
|
|
7187
|
+
"description": "Lands on the control, so a FormField label click focuses it.",
|
|
7188
|
+
"name": "id",
|
|
7189
|
+
"type": "string"
|
|
7190
|
+
},
|
|
7191
|
+
{
|
|
7192
|
+
"description": "Root (strip + field) class override.",
|
|
7193
|
+
"name": "className",
|
|
7194
|
+
"type": "string"
|
|
7195
|
+
}
|
|
7196
|
+
],
|
|
7197
|
+
"related": [
|
|
7198
|
+
"TranslatableTextarea — the same contract over a Textarea.",
|
|
7199
|
+
"Input — the control it composes; every Input prop applies.",
|
|
7200
|
+
"FormField — the label / helper / error wiring it reports into.",
|
|
7201
|
+
"Tabs — the switcher it composes (strip-only, `controls` → the field's panel).",
|
|
7202
|
+
"AppSettingPicker kind=\"locale\" — chooses the UI language, not per-locale content."
|
|
7203
|
+
],
|
|
7204
|
+
"rules": [],
|
|
7205
|
+
"storyPath": "data-entry/translatable-input.tsx",
|
|
7206
|
+
"tagline": "ONE text field holding a value per locale (`{ ja, en, vi }`), switched by locale tabs above it (gh#1336). For user content stored per locale — a product name, a category label, a menu description (Astrotomic / Spatie `*_translations`). Locales, first tab and fallback come from AppProvider; an empty locale shows the fallback locale's text as its placeholder; a locale with an error is marked on its tab. Every other `Input` prop applies to the one control.",
|
|
7207
|
+
"usage": [
|
|
7208
|
+
"DO wrap it in FormField: the label names the control together with the active locale («商品名 English») and names the tab strip («商品名 Language»), `required`/`helper` reach the control, and the active locale's error renders in FormField's error line.",
|
|
7209
|
+
"DO pass the per-locale error map from your validator as `errors` (e.g. Laravel `name.ja` → `errors.ja`). Don't pass the same message to FormField `error` as well: FormField's own `error` wins over the reported one, and it would mark the field invalid on every locale.",
|
|
7210
|
+
"DO set `fallbackLocale` to the content's SOURCE language (often `ja`) when it differs from the AppProvider's UI fallback — the placeholder of an untranslated locale then shows the source text to translate from.",
|
|
7211
|
+
"DON'T build a local wrapper of Tabs + Input for this: the tab↔panel ARIA, the lang attribute, the error marks and the FormField wiring are what this component exists for.",
|
|
7212
|
+
"DON'T use it for a choice of language that IS the form's value (a user's preferred language): that is `AppSettingPicker kind=\"locale\"` or a Select.",
|
|
7213
|
+
"The locale switcher is the WAI-ARIA APG tabs pattern (tablist → one tabpanel holding the field), not a Segmented radio group: the locale is not form state — every locale is submitted together — the tab only chooses which locale the one field shows."
|
|
7214
|
+
],
|
|
7215
|
+
"useCases": [
|
|
7216
|
+
"Product / menu item name in ja, en and vi on an admin edit form",
|
|
7217
|
+
"Category or section label stored per locale (Astrotomic `*_translations`)",
|
|
7218
|
+
"Translated description or recipe text (TranslatableTextarea)"
|
|
7219
|
+
]
|
|
7220
|
+
},
|
|
7221
|
+
{
|
|
7222
|
+
"example": "import { FormField, TranslatableTextarea } from \"@godxjp/ui/data-entry\";\n\n<FormField label=\"説明\">\n <TranslatableTextarea locales={[\"ja\", \"en\", \"vi\"]} value={description} onValueChange={setDescription} autoGrow minRows={3} />\n</FormField>",
|
|
7223
|
+
"group": "data-entry",
|
|
7224
|
+
"importPath": "@godxjp/ui/data-entry",
|
|
7225
|
+
"name": "TranslatableTextarea",
|
|
7226
|
+
"props": [
|
|
7227
|
+
{
|
|
7228
|
+
"description": "Controlled per-locale values, keyed by BCP-47 tag.",
|
|
7229
|
+
"name": "value",
|
|
7230
|
+
"type": "TranslatableValue"
|
|
7231
|
+
},
|
|
7232
|
+
{
|
|
7233
|
+
"description": "Uncontrolled initial per-locale values.",
|
|
7234
|
+
"name": "defaultValue",
|
|
7235
|
+
"type": "TranslatableValue"
|
|
7236
|
+
},
|
|
7237
|
+
{
|
|
7238
|
+
"description": "The whole map after an edit; only the active locale's key changes.",
|
|
7239
|
+
"name": "onValueChange",
|
|
7240
|
+
"type": "(value: TranslatableValue) => void"
|
|
7241
|
+
},
|
|
7242
|
+
{
|
|
7243
|
+
"description": "The BCP-47 tags the field edits, in tab order. Default: the app's registered locales.",
|
|
7244
|
+
"name": "locales",
|
|
7245
|
+
"type": "readonly string[]"
|
|
7246
|
+
},
|
|
7247
|
+
{
|
|
7248
|
+
"description": "The locale tab selected first. Default: the AppProvider's active locale.",
|
|
7249
|
+
"name": "defaultLocale",
|
|
7250
|
+
"type": "string"
|
|
7251
|
+
},
|
|
7252
|
+
{
|
|
7253
|
+
"description": "The locale whose text an empty locale shows as its placeholder. Default: the AppProvider's `fallbackLocale`.",
|
|
7254
|
+
"name": "fallbackLocale",
|
|
7255
|
+
"type": "string"
|
|
7256
|
+
},
|
|
7257
|
+
{
|
|
7258
|
+
"description": "Per-locale messages: tab marks for each, `aria-invalid` + FormField's error line for the active one.",
|
|
7259
|
+
"name": "errors",
|
|
7260
|
+
"type": "Partial<Record<string, ReactNode>>"
|
|
7261
|
+
},
|
|
7262
|
+
{
|
|
7263
|
+
"defaultValue": "\"md\"",
|
|
7264
|
+
"description": "The field's control tier, as on Textarea.",
|
|
7265
|
+
"name": "size",
|
|
7266
|
+
"type": "\"sm\" | \"md\" | \"lg\""
|
|
7267
|
+
},
|
|
7268
|
+
{
|
|
7269
|
+
"description": "Shown while the active locale is empty and there is no fallback text.",
|
|
7270
|
+
"name": "placeholder",
|
|
7271
|
+
"type": "string"
|
|
7272
|
+
},
|
|
7273
|
+
{
|
|
7274
|
+
"description": "Disables the control; the locale tabs stay operable.",
|
|
7275
|
+
"name": "disabled",
|
|
7276
|
+
"type": "boolean"
|
|
7277
|
+
},
|
|
7278
|
+
{
|
|
7279
|
+
"description": "Lands on the control.",
|
|
7280
|
+
"name": "id",
|
|
7281
|
+
"type": "string"
|
|
7282
|
+
},
|
|
7283
|
+
{
|
|
7284
|
+
"description": "Root class override.",
|
|
7285
|
+
"name": "className",
|
|
7286
|
+
"type": "string"
|
|
7287
|
+
}
|
|
7288
|
+
],
|
|
7289
|
+
"related": [
|
|
7290
|
+
"TranslatableInput — the single-line form and the full contract.",
|
|
7291
|
+
"Textarea — the control it composes."
|
|
7292
|
+
],
|
|
7293
|
+
"rules": [],
|
|
7294
|
+
"storyPath": "data-entry/translatable-input.tsx",
|
|
7295
|
+
"tagline": "TranslatableInput over a Textarea (gh#1336): one multi-line field holding a value per locale, switched by locale tabs. Same locale, fallback-placeholder, error-mark and FormField contract; every Textarea prop (rows, autoGrow, count…) applies to the one control.",
|
|
7296
|
+
"usage": [
|
|
7297
|
+
"DO use it for per-locale multi-line content (a description, a recipe); for a single line use TranslatableInput.",
|
|
7298
|
+
"DO wrap it in FormField, exactly as TranslatableInput."
|
|
7299
|
+
],
|
|
7300
|
+
"useCases": [
|
|
7301
|
+
"Menu item description in ja, en and vi",
|
|
7302
|
+
"Recipe or notice body stored per locale"
|
|
7303
|
+
]
|
|
7304
|
+
},
|
|
7129
7305
|
{
|
|
7130
7306
|
"example": "import { Label } from \"@godxjp/ui/data-entry\";\n\n<Label htmlFor=\"stackable\">併用を許可</Label>",
|
|
7131
7307
|
"group": "data-entry",
|
|
@@ -10669,6 +10845,12 @@
|
|
|
10669
10845
|
"description": "Renders automatically only when there are no matching results. Place inside CommandList.",
|
|
10670
10846
|
"name": "CommandEmpty",
|
|
10671
10847
|
"type": "React.ReactNode (children)"
|
|
10848
|
+
},
|
|
10849
|
+
{
|
|
10850
|
+
"defaultValue": "true",
|
|
10851
|
+
"description": "CommandSeparator is cmdk's Command.Separator (data-slot=\"command-separator\", ref forwarded, className merged): a hairline between two groups of one list. Default true — the OPPOSITE of cmdk, which drops the separator once the search is non-empty; a `+ Create \"<q>\"` group only exists while the user types, so the rule above it must stay. Pass false for cmdk's palette behaviour. Hidden automatically beside a group cmdk has hidden (no matching rows) and under `split` (which already rules group boundaries). aria-hidden: decorative, since a separator is not an allowed listbox child. Tokens: --command-item-divider-width / --command-item-divider-color (→ --stroke-hairline / --border), margin-block --command-group-padding.",
|
|
10852
|
+
"name": "CommandSeparator.alwaysRender",
|
|
10853
|
+
"type": "boolean"
|
|
10672
10854
|
}
|
|
10673
10855
|
],
|
|
10674
10856
|
"related": [
|
|
@@ -10689,7 +10871,8 @@
|
|
|
10689
10871
|
"CommandGroup",
|
|
10690
10872
|
"CommandInput",
|
|
10691
10873
|
"CommandItem",
|
|
10692
|
-
"CommandList"
|
|
10874
|
+
"CommandList",
|
|
10875
|
+
"CommandSeparator"
|
|
10693
10876
|
],
|
|
10694
10877
|
"tagline": "Accessible, keyboard-navigable command palette / combobox list built on cmdk — always pair CommandInput inside its own wrapper div, never render items outside CommandList.",
|
|
10695
10878
|
"usage": [
|
|
@@ -10698,6 +10881,7 @@
|
|
|
10698
10881
|
"DO always provide a stable explicit value prop on CommandItem when the item's text content can change between renders — relying on inferred textContent with dynamic labels causes selection bugs.",
|
|
10699
10882
|
"DO include CommandEmpty inside CommandList to show a no-results message. It renders automatically only when the filtered count is zero; do not conditionally render it yourself.",
|
|
10700
10883
|
"DO use split for checkbox/option lists (a filter facet, a picker: Popover + PopoverContent flush + Command split) — rows get a divider between them and 0 list padding, so they read as one box. Keep the default (unsplit) for a command palette. Never re-create the look with page CSS (border on items, padding 0 on the group): retune --command-item-divider-color / --command-item-divider-width instead.",
|
|
10884
|
+
"DO divide a result group from an action group with CommandSeparator — matches, then `<CommandSeparator />`, then `<CommandGroup forceMount><CommandItem forceMount value={`__create__${q}`}>+ Create \"{q}\"</CommandItem></CommandGroup>` rendered only while the query has no exact match. Give the create item an explicit value (never inferred from its changing text) and forceMount both it and its group so the filter cannot hide it. Never keep a local copy of the Command family for the divider — a compound must come from one cmdk instance.",
|
|
10701
10885
|
"DON'T use CommandInput as a standalone search input — it is only meaningful inside a Command root (the root manages shared filter state). For a standalone search field use SearchInput instead.",
|
|
10702
10886
|
"DON'T hand-roll keyboard navigation on a list of items; Command handles arrow keys, Enter, Escape, Home/End, and vim bindings. Adding your own keyDown handlers on top creates conflicts — use onSelect on CommandItem for selection logic."
|
|
10703
10887
|
],
|
package/agent/index.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"counts": {
|
|
3
3
|
"anti-ai-tells": 35,
|
|
4
|
-
"components":
|
|
4
|
+
"components": 165,
|
|
5
5
|
"patterns": 25,
|
|
6
6
|
"rules": 44,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2230,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"design": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/DESIGN.md",
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"file": "components-index.json",
|
|
19
|
-
"note": "49 KB — name + group + tagline for all
|
|
19
|
+
"note": "49 KB — name + group + tagline for all 165. FETCH THIS FIRST, then fetch only the components you chose.",
|
|
20
20
|
"url": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"file": "components/<Name>.json",
|
|
24
|
-
"note": "One file per component (1 KB–37 KB, median 6 KB), each carrying its importPath. This is the selective route: read the index, then fetch only what you need instead of the 1.
|
|
24
|
+
"note": "One file per component (1 KB–37 KB, median 6 KB), each carrying its importPath. This is the selective route: read the index, then fetch only what you need instead of the 1.3 MB blob.",
|
|
25
25
|
"url": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/<Name>.json"
|
|
26
26
|
},
|
|
27
27
|
{
|
|
@@ -54,19 +54,19 @@
|
|
|
54
54
|
"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.",
|
|
55
55
|
"read": {
|
|
56
56
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
57
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v33.
|
|
57
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v33.2.1/agent/index.json"
|
|
58
58
|
},
|
|
59
59
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
60
60
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
61
61
|
"tokenTiers": {
|
|
62
62
|
"component": "per-part knobs, --{component}-{part}-{property}; usually leave these alone",
|
|
63
63
|
"counts": {
|
|
64
|
-
"component":
|
|
64
|
+
"component": 1901,
|
|
65
65
|
"foundation": 216,
|
|
66
66
|
"semantic": 113
|
|
67
67
|
},
|
|
68
68
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
69
69
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
70
70
|
},
|
|
71
|
-
"version": "33.
|
|
71
|
+
"version": "33.2.1"
|
|
72
72
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system:
|
|
4
|
-
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.
|
|
3
|
+
> A Japanese-enterprise React design system: 165 components, 2230 design tokens,
|
|
4
|
+
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.2.1.
|
|
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@33.
|
|
7
|
+
(`npx @godxjp/ui-mcp@33.2.1`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -16,10 +16,10 @@ that can only fetch URLs.
|
|
|
16
16
|
## Catalog
|
|
17
17
|
|
|
18
18
|
- [patterns-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/patterns-index.json): 25 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.
|
|
19
|
-
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 49 KB — all
|
|
19
|
+
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 49 KB — all 165 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
|
|
20
20
|
- [components/<Name>.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–37 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.
|
|
21
|
-
- [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.
|
|
22
|
-
- [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` — 216 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 113 `semantic` roles,
|
|
21
|
+
- [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.
|
|
22
|
+
- [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` — 216 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 113 `semantic` roles, 1901 `component` knobs.
|
|
23
23
|
- [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.
|
|
24
24
|
- [rules.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json): 44 cardinal rules.
|
|
25
25
|
- [anti-ai-tells.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/anti-ai-tells.json): 35 shapes that make generated UI look generated, each with its fix.
|
|
@@ -27,7 +27,7 @@ that can only fetch URLs.
|
|
|
27
27
|
## Pinning
|
|
28
28
|
|
|
29
29
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
30
|
-
the tag: `.../godx-jp/godxjp-ui/v33.
|
|
30
|
+
the tag: `.../godx-jp/godxjp-ui/v33.2.1/agent/...`. A catalog that does not match the installed
|
|
31
31
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
32
32
|
|
|
33
33
|
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.
|
package/agent/tokens.json
CHANGED
|
@@ -6503,6 +6503,18 @@
|
|
|
6503
6503
|
"tier": "component",
|
|
6504
6504
|
"value": "16rem"
|
|
6505
6505
|
},
|
|
6506
|
+
{
|
|
6507
|
+
"description": "TranslatableInput / TranslatableTextarea (gh#1336). The rhythm between the locale tab strip and the field it switches — a service aligning its forms to a tighter grid sets it once. 4px",
|
|
6508
|
+
"name": "--translatable-field-gap",
|
|
6509
|
+
"tier": "component",
|
|
6510
|
+
"value": "var(--space-1)"
|
|
6511
|
+
},
|
|
6512
|
+
{
|
|
6513
|
+
"description": "The error mark beside a locale's name on its tab. The ICON scale one step below the tab's own 14px text, so it reads as a mark on the label rather than a second word. 12px",
|
|
6514
|
+
"name": "--translatable-field-error-icon-size",
|
|
6515
|
+
"tier": "component",
|
|
6516
|
+
"value": "var(--icon-size-xs)"
|
|
6517
|
+
},
|
|
6506
6518
|
{
|
|
6507
6519
|
"description": "Width of the label column when <Descriptions layout=\"horizontal\">. Labels align to this shared column so the values line up (the horizontal-detail look, mirroring <Form layout>). A rem value gives a fixed aligned column; set `max-content` to size each label to its text. (rule #44/#45 — a service theme tunes it here instead of forking CSS.)",
|
|
6508
6520
|
"name": "--descriptions-label-width",
|