@godxjp/ui 33.6.1 → 33.7.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/README.md +2 -2
- package/agent/START-HERE.md +4 -4
- package/agent/components/Button.json +2 -2
- package/agent/components/RadioGroup.json +6 -0
- package/agent/components/Segmented.json +2 -2
- package/agent/components/Toggle.json +2 -2
- package/agent/components/ToggleGroup.json +2 -2
- package/agent/components.json +14 -8
- package/agent/index.json +4 -4
- package/agent/llms.txt +5 -5
- package/agent/tokens.json +18 -0
- package/dist/components/data-display/descriptions.js +1 -1
- package/dist/components/data-entry/date-picker.js +1 -1
- package/dist/components/data-entry/form-field.js +1 -1
- package/dist/components/data-entry/radio.d.ts +1 -1
- package/dist/components/data-entry/radio.js +2 -0
- package/dist/components/data-entry/search-select.js +26 -25
- package/dist/components/data-entry/segmented.d.ts +3 -2
- package/dist/components/data-entry/toggle.d.ts +2 -2
- package/dist/components/data-entry/toggle.js +4 -1
- package/dist/components/general/button.d.ts +1 -1
- package/dist/components/general/button.js +3 -1
- package/dist/contracts/measurement.json +1 -1
- package/dist/props/components/data-entry.prop.d.ts +7 -1
- package/dist/props/registry.d.ts +1 -1
- package/dist/props/registry.js +1 -1
- package/dist/props/vocabulary/interaction.prop.d.ts +7 -2
- package/dist/styles/control.css +42 -0
- package/dist/styles/layers.json +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokens/components/control.css +6 -0
- package/package.json +2 -2
- package/scripts/ui-audit.mjs +6 -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 — 166 components,
|
|
21
|
+
The catalog — 166 components, 2235 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
|
|
|
@@ -56,7 +56,7 @@ static files straight from this public repo — no hosting, no deploy step:
|
|
|
56
56
|
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) | 50 KB | all 166 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
58
|
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.3 MB | all 166 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) |
|
|
59
|
+
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) | 859 KB | all 2235 design tokens, their values and why they exist |
|
|
60
60
|
| [`agent/vocabulary.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json) | 7 KB | the controlled prop vocabulary |
|
|
61
61
|
| [`agent/rules.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json) | 23 KB | the 44 cardinal rules |
|
|
62
62
|
<!-- prettier-ignore-end -->
|
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 33.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 33.7.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.
|
|
@@ -61,10 +61,10 @@ 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` — 2235 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
|
+
1906 `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.
|
|
@@ -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` | 1906 | 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.
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
14
|
"defaultValue": "\"default\"",
|
|
15
|
-
"description": "Size preset (height, padding, icon dims).",
|
|
15
|
+
"description": "Size preset (height, padding, icon dims). `touch` (gh#1304) is the glove step for wet or gloved hands — food-production stations, a HACCP 良/否 verdict: 56px tall (`--control-height-touch`) and never narrower than it is tall, under a mouse as well as a finger. Button owns no siblings, so lay a row of touch Buttons out with a gap of at least `--control-touch-gap` (8px), e.g. `Flex direction=\"row\" gap=\"sm\"` (8px); pair with `fullWidth` for a full-width bar.",
|
|
16
16
|
"name": "size",
|
|
17
|
-
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\""
|
|
17
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\" | \"touch\""
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"defaultValue": "\"default\"",
|
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"name": "buttonStyle",
|
|
17
17
|
"type": "\"outline\" | \"solid\""
|
|
18
18
|
},
|
|
19
|
+
{
|
|
20
|
+
"defaultValue": "\"md\"",
|
|
21
|
+
"description": "Button-bar size while `optionType=\"button\"`. `touch` (gh#1304) is the glove step: every button at least 56×56 CSS px (`--control-height-touch`) and the bar un-welded into separate buttons `--control-touch-gap` (8px) apart, for wet or gloved hands. Inert on radio dots.",
|
|
22
|
+
"name": "size",
|
|
23
|
+
"type": "\"md\" | \"touch\""
|
|
24
|
+
},
|
|
19
25
|
{
|
|
20
26
|
"description": "Id của nhóm; `FormField` tự truyền xuống để nối nhãn ↔ control.",
|
|
21
27
|
"name": "id",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"defaultValue": "\"md\"",
|
|
21
|
-
"description": "Control height tier — reads the shared `--control-height` ladder: xs 24px · sm 28px · md 32px · lg 36px. The TRACK measures exactly one control height, so the bar sits level with an Input, a Button or a ToggleGroup of the same step on the same row. Pick the step the ROW already has: xs (gh#719) is the one that fits a 24px-dense toolbar or audit-log row — before it, that row could only get a hand-rolled set of Buttons, which loses the radiogroup semantics and the arrow keys. xs is the DENSE step, not a smaller default: the track spends its 2px inset at every step, so the individual SEGMENT measures 20px and clears WCAG 2.2 SC 2.5.8 through the Spacing exception (adjacent segments 26.47px apart for a one-glyph label) rather than the 24px minimum. Keep labels at a glyph or more, and stay on sm or md wherever the row height is yours to choose.",
|
|
21
|
+
"description": "Control height tier — reads the shared `--control-height` ladder: xs 24px · sm 28px · md 32px · lg 36px. `touch` (gh#1304) is the glove step and the one exception to the track rule below: every SEGMENT is at least 56×56 CSS px (`--control-height-touch`), segments stand `--control-touch-gap` (8px) apart, and the track grows around them — pair with `block` for full-width pass/fail bars. The TRACK measures exactly one control height, so the bar sits level with an Input, a Button or a ToggleGroup of the same step on the same row. Pick the step the ROW already has: xs (gh#719) is the one that fits a 24px-dense toolbar or audit-log row — before it, that row could only get a hand-rolled set of Buttons, which loses the radiogroup semantics and the arrow keys. xs is the DENSE step, not a smaller default: the track spends its 2px inset at every step, so the individual SEGMENT measures 20px and clears WCAG 2.2 SC 2.5.8 through the Spacing exception (adjacent segments 26.47px apart for a one-glyph label) rather than the 24px minimum. Keep labels at a glyph or more, and stay on sm or md wherever the row height is yours to choose.",
|
|
22
22
|
"name": "size",
|
|
23
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
23
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"description": "The closed set of choices, in reading order. `label` is the visible content AND the item's accessible name. Use `count` for a filter total — do not nest `Badge` in `label` (gh#602).",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"defaultValue": "\"md\"",
|
|
25
|
-
"description": "Control size on the --control-height tier: xs 24px · sm 28px · md 32px · lg 36px. Pick the step the ROW already has — an xs chip is what lets a 24px-dense row carry a pressed/segmented control instead of someone hand-rolling one out of Buttons (gh#716). Every step clears the WCAG 2.2 SC 2.5.8 24px target floor, xs exactly.",
|
|
25
|
+
"description": "Control size on the --control-height tier: xs 24px · sm 28px · md 32px · lg 36px · touch ≥56×56 (gh#1304, the glove step, `--control-height-touch`). Pick the step the ROW already has — an xs chip is what lets a 24px-dense row carry a pressed/segmented control instead of someone hand-rolling one out of Buttons (gh#716). Every step clears the WCAG 2.2 SC 2.5.8 24px target floor, xs exactly.",
|
|
26
26
|
"name": "size",
|
|
27
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
27
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
"defaultValue": "\"default\"",
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
41
|
"defaultValue": "\"md\"",
|
|
42
|
-
"description": "Control size, PROVIDED TO EVERY ITEM via context — set it once on the group. An explicit `size` on an item still wins. Heights come from the --control-height tier (xs 24px · sm 28px · md 32px · lg 36px). Pick the step the ROW already has: xs is the one that fits a 24px-dense row (gh#716).",
|
|
42
|
+
"description": "Control size, PROVIDED TO EVERY ITEM via context — set it once on the group. An explicit `size` on an item still wins. Heights come from the --control-height tier (xs 24px · sm 28px · md 32px · lg 36px). Pick the step the ROW already has: xs is the one that fits a 24px-dense row (gh#716). `touch` (gh#1304) is the glove step: every item at least 56×56 CSS px and the items spaced `--control-touch-gap` (8px) apart, for wet or gloved hands.",
|
|
43
43
|
"name": "size",
|
|
44
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
44
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"description": "Disables the whole group; individual items also accept `disabled`.",
|
package/agent/components.json
CHANGED
|
@@ -2636,9 +2636,9 @@
|
|
|
2636
2636
|
},
|
|
2637
2637
|
{
|
|
2638
2638
|
"defaultValue": "\"default\"",
|
|
2639
|
-
"description": "Size preset (height, padding, icon dims).",
|
|
2639
|
+
"description": "Size preset (height, padding, icon dims). `touch` (gh#1304) is the glove step for wet or gloved hands — food-production stations, a HACCP 良/否 verdict: 56px tall (`--control-height-touch`) and never narrower than it is tall, under a mouse as well as a finger. Button owns no siblings, so lay a row of touch Buttons out with a gap of at least `--control-touch-gap` (8px), e.g. `Flex direction=\"row\" gap=\"sm\"` (8px); pair with `fullWidth` for a full-width bar.",
|
|
2640
2640
|
"name": "size",
|
|
2641
|
-
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\""
|
|
2641
|
+
"type": "\"default\" | \"xs\" | \"sm\" | \"lg\" | \"icon\" | \"icon-xs\" | \"icon-sm\" | \"icon-lg\" | \"touch\""
|
|
2642
2642
|
},
|
|
2643
2643
|
{
|
|
2644
2644
|
"defaultValue": "\"default\"",
|
|
@@ -7438,6 +7438,12 @@
|
|
|
7438
7438
|
"name": "buttonStyle",
|
|
7439
7439
|
"type": "\"outline\" | \"solid\""
|
|
7440
7440
|
},
|
|
7441
|
+
{
|
|
7442
|
+
"defaultValue": "\"md\"",
|
|
7443
|
+
"description": "Button-bar size while `optionType=\"button\"`. `touch` (gh#1304) is the glove step: every button at least 56×56 CSS px (`--control-height-touch`) and the bar un-welded into separate buttons `--control-touch-gap` (8px) apart, for wet or gloved hands. Inert on radio dots.",
|
|
7444
|
+
"name": "size",
|
|
7445
|
+
"type": "\"md\" | \"touch\""
|
|
7446
|
+
},
|
|
7441
7447
|
{
|
|
7442
7448
|
"description": "Id của nhóm; `FormField` tự truyền xuống để nối nhãn ↔ control.",
|
|
7443
7449
|
"name": "id",
|
|
@@ -12193,9 +12199,9 @@
|
|
|
12193
12199
|
},
|
|
12194
12200
|
{
|
|
12195
12201
|
"defaultValue": "\"md\"",
|
|
12196
|
-
"description": "Control size on the --control-height tier: xs 24px · sm 28px · md 32px · lg 36px. Pick the step the ROW already has — an xs chip is what lets a 24px-dense row carry a pressed/segmented control instead of someone hand-rolling one out of Buttons (gh#716). Every step clears the WCAG 2.2 SC 2.5.8 24px target floor, xs exactly.",
|
|
12202
|
+
"description": "Control size on the --control-height tier: xs 24px · sm 28px · md 32px · lg 36px · touch ≥56×56 (gh#1304, the glove step, `--control-height-touch`). Pick the step the ROW already has — an xs chip is what lets a 24px-dense row carry a pressed/segmented control instead of someone hand-rolling one out of Buttons (gh#716). Every step clears the WCAG 2.2 SC 2.5.8 24px target floor, xs exactly.",
|
|
12197
12203
|
"name": "size",
|
|
12198
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
12204
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
12199
12205
|
},
|
|
12200
12206
|
{
|
|
12201
12207
|
"defaultValue": "\"default\"",
|
|
@@ -12301,9 +12307,9 @@
|
|
|
12301
12307
|
},
|
|
12302
12308
|
{
|
|
12303
12309
|
"defaultValue": "\"md\"",
|
|
12304
|
-
"description": "Control size, PROVIDED TO EVERY ITEM via context — set it once on the group. An explicit `size` on an item still wins. Heights come from the --control-height tier (xs 24px · sm 28px · md 32px · lg 36px). Pick the step the ROW already has: xs is the one that fits a 24px-dense row (gh#716).",
|
|
12310
|
+
"description": "Control size, PROVIDED TO EVERY ITEM via context — set it once on the group. An explicit `size` on an item still wins. Heights come from the --control-height tier (xs 24px · sm 28px · md 32px · lg 36px). Pick the step the ROW already has: xs is the one that fits a 24px-dense row (gh#716). `touch` (gh#1304) is the glove step: every item at least 56×56 CSS px and the items spaced `--control-touch-gap` (8px) apart, for wet or gloved hands.",
|
|
12305
12311
|
"name": "size",
|
|
12306
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
12312
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
12307
12313
|
},
|
|
12308
12314
|
{
|
|
12309
12315
|
"description": "Disables the whole group; individual items also accept `disabled`.",
|
|
@@ -12851,9 +12857,9 @@
|
|
|
12851
12857
|
},
|
|
12852
12858
|
{
|
|
12853
12859
|
"defaultValue": "\"md\"",
|
|
12854
|
-
"description": "Control height tier — reads the shared `--control-height` ladder: xs 24px · sm 28px · md 32px · lg 36px. The TRACK measures exactly one control height, so the bar sits level with an Input, a Button or a ToggleGroup of the same step on the same row. Pick the step the ROW already has: xs (gh#719) is the one that fits a 24px-dense toolbar or audit-log row — before it, that row could only get a hand-rolled set of Buttons, which loses the radiogroup semantics and the arrow keys. xs is the DENSE step, not a smaller default: the track spends its 2px inset at every step, so the individual SEGMENT measures 20px and clears WCAG 2.2 SC 2.5.8 through the Spacing exception (adjacent segments 26.47px apart for a one-glyph label) rather than the 24px minimum. Keep labels at a glyph or more, and stay on sm or md wherever the row height is yours to choose.",
|
|
12860
|
+
"description": "Control height tier — reads the shared `--control-height` ladder: xs 24px · sm 28px · md 32px · lg 36px. `touch` (gh#1304) is the glove step and the one exception to the track rule below: every SEGMENT is at least 56×56 CSS px (`--control-height-touch`), segments stand `--control-touch-gap` (8px) apart, and the track grows around them — pair with `block` for full-width pass/fail bars. The TRACK measures exactly one control height, so the bar sits level with an Input, a Button or a ToggleGroup of the same step on the same row. Pick the step the ROW already has: xs (gh#719) is the one that fits a 24px-dense toolbar or audit-log row — before it, that row could only get a hand-rolled set of Buttons, which loses the radiogroup semantics and the arrow keys. xs is the DENSE step, not a smaller default: the track spends its 2px inset at every step, so the individual SEGMENT measures 20px and clears WCAG 2.2 SC 2.5.8 through the Spacing exception (adjacent segments 26.47px apart for a one-glyph label) rather than the 24px minimum. Keep labels at a glyph or more, and stay on sm or md wherever the row height is yours to choose.",
|
|
12855
12861
|
"name": "size",
|
|
12856
|
-
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\""
|
|
12862
|
+
"type": "\"xs\" | \"sm\" | \"md\" | \"lg\" | \"touch\""
|
|
12857
12863
|
},
|
|
12858
12864
|
{
|
|
12859
12865
|
"description": "The closed set of choices, in reading order. `label` is the visible content AND the item's accessible name. Use `count` for a filter total — do not nest `Badge` in `label` (gh#602).",
|
package/agent/index.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"components": 166,
|
|
5
5
|
"patterns": 28,
|
|
6
6
|
"rules": 44,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2235,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"design": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/DESIGN.md",
|
|
@@ -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.7.0/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": 1906,
|
|
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.7.0"
|
|
72
72
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system: 166 components,
|
|
4
|
-
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.
|
|
3
|
+
> A Japanese-enterprise React design system: 166 components, 2235 design tokens,
|
|
4
|
+
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.7.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@33.
|
|
7
|
+
(`npx @godxjp/ui-mcp@33.7.0`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -19,7 +19,7 @@ that can only fetch URLs.
|
|
|
19
19
|
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 50 KB — all 166 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
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,
|
|
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, 1906 `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.7.0/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
|
@@ -3203,6 +3203,12 @@
|
|
|
3203
3203
|
"tier": "component",
|
|
3204
3204
|
"value": "calc(var(--control-height) - calc(0.5rem * var(--scaling)))"
|
|
3205
3205
|
},
|
|
3206
|
+
{
|
|
3207
|
+
"description": "THE GLOVE TIER (gh#1304) — `size=\"touch\"` on Button, Segmented, Toggle/ToggleGroup and `RadioGroup optionType=\"button\"`. 56px: wet or gloved hands at a food-production station need more than the 44px WCAG 2.2 SC 2.5.5 target, so this sits one band above `--number-input-touch-height`. A band, NOT derived from `--control-height` — not by density, not by a shell's tier — because the floor is the hand's, not the layout's.",
|
|
3208
|
+
"name": "--control-height-touch",
|
|
3209
|
+
"tier": "component",
|
|
3210
|
+
"value": "var(--band-height-3xl)"
|
|
3211
|
+
},
|
|
3206
3212
|
{
|
|
3207
3213
|
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
3208
3214
|
"name": "--control-padding-x",
|
|
@@ -3341,6 +3347,18 @@
|
|
|
3341
3347
|
"tier": "component",
|
|
3342
3348
|
"value": "var(--band-height-2xl)"
|
|
3343
3349
|
},
|
|
3350
|
+
{
|
|
3351
|
+
"description": "`size=\"touch\"` (gh#1304). The SPACE between two glove targets: ToggleGroup items, Segmented segments and the buttons of a `RadioGroup optionType=\"button\"` bar stand this far apart at the touch step (8px), so a gloved press on one edge cannot land on the neighbour. Button has no siblings of its own — lay a row of touch Buttons out with a gap of at least this.",
|
|
3352
|
+
"name": "--control-touch-gap",
|
|
3353
|
+
"tier": "component",
|
|
3354
|
+
"value": "var(--space-2)"
|
|
3355
|
+
},
|
|
3356
|
+
{
|
|
3357
|
+
"description": "Button's inline inset at the touch step — one rung under `lg`'s, because a touch Button is usually a short verdict (良 / 否) and its 56px min-inline-size already makes the box.",
|
|
3358
|
+
"name": "--button-touch-space-inline",
|
|
3359
|
+
"tier": "component",
|
|
3360
|
+
"value": "var(--space-6)"
|
|
3361
|
+
},
|
|
3344
3362
|
{
|
|
3345
3363
|
"description": "CHROME VARIANT — antd's `variant` axis. `outlined` needs no token: it is what a field already draws. `filled` swaps the boundary for a tinted surface; `borderless` drops both. Kept as knobs so a service theme can retune the dense-form treatment once, globally.",
|
|
3346
3364
|
"name": "--control-variant-filled-background",
|
|
@@ -120,7 +120,7 @@ function DescriptionsItem({ label, mono, span, className, children }) {
|
|
|
120
120
|
"data-slot": "descriptions-value",
|
|
121
121
|
"data-mono": mono ? "" : void 0,
|
|
122
122
|
className: cn(
|
|
123
|
-
"text-[length:var(--descriptions-value-font-size)] leading-[var(--descriptions-value-line-height)]
|
|
123
|
+
"text-[length:var(--descriptions-value-font-size)] leading-[var(--descriptions-value-line-height)] [overflow-wrap:anywhere]",
|
|
124
124
|
mono && "font-mono"
|
|
125
125
|
),
|
|
126
126
|
children
|
|
@@ -717,7 +717,7 @@ function DatePicker(props) {
|
|
|
717
717
|
onBlur: (event) => {
|
|
718
718
|
const parsed = parse(event.target.value);
|
|
719
719
|
const accepted = parsed && allowed(parsed) && timeAllowed(parsed) ? parsed : void 0;
|
|
720
|
-
if (accepted && !multiple &&
|
|
720
|
+
if (accepted && !multiple && +periodDate(accepted) !== +(committedSingle ?? NaN))
|
|
721
721
|
emit(periodDate(accepted));
|
|
722
722
|
if (!preserveInvalidOnBlur)
|
|
723
723
|
setText(accepted ? display(accepted) : displayAll(committedSingle));
|
|
@@ -81,7 +81,7 @@ function FormField({
|
|
|
81
81
|
const childWithA11y = isStatic ? (
|
|
82
82
|
// read-only FormField row and a Descriptions value are indistinguishable when mixed. That
|
|
83
83
|
// cannot drift. --descriptions-value-line-height is the mandatory companion: `text-sm` also
|
|
84
|
-
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--descriptions-value-font-size)] leading-[var(--descriptions-value-line-height)]
|
|
84
|
+
/* @__PURE__ */ jsx("span", { className: "text-[length:var(--descriptions-value-font-size)] leading-[var(--descriptions-value-line-height)] [overflow-wrap:anywhere]", children: staticText })
|
|
85
85
|
) : React.isValidElement(children) ? React.cloneElement(children, {
|
|
86
86
|
// The label is associated via aria-labelledby (not <label for>): composite
|
|
87
87
|
// controls (Radio.Group, checkbox lists, range pairs) have no labelable root,
|
|
@@ -13,7 +13,7 @@ declare const RadioGroupRoot: React.ForwardRefExoticComponent<Omit<Omit<React.De
|
|
|
13
13
|
declare const RadioItem: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "value"> & {
|
|
14
14
|
value: string;
|
|
15
15
|
} & React.RefAttributes<HTMLLabelElement>>;
|
|
16
|
-
declare function RadioGroupOptions({ value, defaultValue, onValueChange, options, orientation, optionType, buttonStyle, disabled, name, id, className, children, ...ariaProps }: RadioGroupProp): React.JSX.Element;
|
|
16
|
+
declare function RadioGroupOptions({ value, defaultValue, onValueChange, options, orientation, optionType, buttonStyle, size, disabled, name, id, className, children, ...ariaProps }: RadioGroupProp): React.JSX.Element;
|
|
17
17
|
/** Single radio — use inside `Radio.Group` / `RadioGroupRoot`, or via `options` API. */
|
|
18
18
|
export declare const Radio: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "value"> & {
|
|
19
19
|
value: string;
|
|
@@ -116,6 +116,7 @@ function RadioGroupOptions({
|
|
|
116
116
|
orientation = "vertical",
|
|
117
117
|
optionType = "default",
|
|
118
118
|
buttonStyle = "outline",
|
|
119
|
+
size,
|
|
119
120
|
disabled,
|
|
120
121
|
name,
|
|
121
122
|
id,
|
|
@@ -145,6 +146,7 @@ function RadioGroupOptions({
|
|
|
145
146
|
"data-orientation": orientation,
|
|
146
147
|
"data-option-type": optionType === "default" ? void 0 : optionType,
|
|
147
148
|
"data-button-style": optionType === "button" ? buttonStyle : void 0,
|
|
149
|
+
"data-size": optionType === "button" && size === "touch" ? size : void 0,
|
|
148
150
|
className: cn(
|
|
149
151
|
optionType === "button" ? "ui-radio-button-bar" : choiceGroupClassName(orientation),
|
|
150
152
|
className
|
|
@@ -178,29 +178,25 @@ function SearchSelect(props) {
|
|
|
178
178
|
},
|
|
179
179
|
[filterOption, optionFilterProp, fold]
|
|
180
180
|
);
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
hasMore: false
|
|
189
|
-
};
|
|
190
|
-
}),
|
|
191
|
-
[loadOptions, staticOptions, matchesQuery, filterSort]
|
|
192
|
-
);
|
|
181
|
+
const typedText = query.trim();
|
|
182
|
+
const staticListed = React.useMemo(() => {
|
|
183
|
+
if (loadOptions) return [];
|
|
184
|
+
const list = staticOptions ?? [];
|
|
185
|
+
const kept = typedText ? list.filter((option) => matchesQuery(option, typedText)) : list;
|
|
186
|
+
return filterSort ? [...kept].sort((a, b) => filterSort(a, b, { searchValue: typedText })) : kept;
|
|
187
|
+
}, [loadOptions, staticOptions, typedText, matchesQuery, filterSort]);
|
|
193
188
|
React.useEffect(() => {
|
|
194
189
|
const handle = window.setTimeout(() => setDebouncedQuery(query.trim()), DEBOUNCE_MS);
|
|
195
190
|
return () => window.clearTimeout(handle);
|
|
196
191
|
}, [query]);
|
|
197
192
|
const fetchPage = React.useCallback(
|
|
198
193
|
async (nextPage, search, append) => {
|
|
194
|
+
if (!loadOptions) return;
|
|
199
195
|
const ticket = ++reqId.current;
|
|
200
196
|
setLoading(true);
|
|
201
197
|
if (!append) setError(false);
|
|
202
198
|
try {
|
|
203
|
-
const result = await
|
|
199
|
+
const result = await loadOptions({ query: search, page: nextPage });
|
|
204
200
|
if (ticket !== reqId.current) return;
|
|
205
201
|
setLoaded((prev) => append ? [...prev, ...result.options] : result.options);
|
|
206
202
|
if (!append) setFreshPage((tick) => tick + 1);
|
|
@@ -215,17 +211,22 @@ function SearchSelect(props) {
|
|
|
215
211
|
if (ticket === reqId.current) setLoading(false);
|
|
216
212
|
}
|
|
217
213
|
},
|
|
218
|
-
[
|
|
214
|
+
[loadOptions]
|
|
219
215
|
);
|
|
216
|
+
const remoteQuery = loadOptions ? debouncedQuery : null;
|
|
220
217
|
React.useEffect(() => {
|
|
221
218
|
if (!open) return;
|
|
222
219
|
setActiveIndex(0);
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
220
|
+
if (remoteQuery === null) {
|
|
221
|
+
setFreshPage((tick) => tick + 1);
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
void fetchPage(1, remoteQuery, false);
|
|
225
|
+
}, [open, remoteQuery, fetchPage]);
|
|
226
|
+
const listed = loadOptions ? loaded : staticListed;
|
|
226
227
|
const { displayOptions, createOption } = React.useMemo(() => {
|
|
227
|
-
if (!tagsMode) return { displayOptions:
|
|
228
|
-
const known = new Set(
|
|
228
|
+
if (!tagsMode) return { displayOptions: listed, createOption: void 0 };
|
|
229
|
+
const known = new Set(listed.map((option) => option.value));
|
|
229
230
|
const extras = [];
|
|
230
231
|
for (const entry of working) {
|
|
231
232
|
if (known.has(entry)) continue;
|
|
@@ -234,21 +235,21 @@ function SearchSelect(props) {
|
|
|
234
235
|
if (!typedText || matchesQuery(held, typedText)) extras.push(held);
|
|
235
236
|
}
|
|
236
237
|
const typed = fold(typedText);
|
|
237
|
-
const exists = [...known].some((entry) => fold(entry) === typed) || [...staticOptions ?? [], ...
|
|
238
|
+
const exists = [...known].some((entry) => fold(entry) === typed) || [...staticOptions ?? [], ...listed].some(
|
|
238
239
|
(option) => fold(option.value) === typed || fold(option.label) === typed
|
|
239
240
|
);
|
|
240
241
|
const create = typedText && !exists && canCreate(typedText) ? { value: typedText, label: typedText } : void 0;
|
|
241
|
-
const exact = typedText ?
|
|
242
|
+
const exact = typedText ? listed.find(
|
|
242
243
|
(option) => !working.includes(option.value) && (fold(option.value) === typed || fold(option.label) === typed)
|
|
243
244
|
) : void 0;
|
|
244
|
-
const rest = exact ?
|
|
245
|
+
const rest = exact ? listed.filter((option) => option !== exact) : listed;
|
|
245
246
|
return {
|
|
246
|
-
displayOptions: create || exact || extras.length ? [...create ? [create] : [], ...exact ? [exact] : [], ...rest, ...extras] :
|
|
247
|
+
displayOptions: create || exact || extras.length ? [...create ? [create] : [], ...exact ? [exact] : [], ...rest, ...extras] : listed,
|
|
247
248
|
createOption: create
|
|
248
249
|
};
|
|
249
250
|
}, [
|
|
250
251
|
tagsMode,
|
|
251
|
-
|
|
252
|
+
listed,
|
|
252
253
|
working,
|
|
253
254
|
typedText,
|
|
254
255
|
pickedOptions,
|
|
@@ -290,7 +291,7 @@ function SearchSelect(props) {
|
|
|
290
291
|
setActiveIndex(firstEnabled >= 0 ? firstEnabled : 0);
|
|
291
292
|
}, [flatOrdered, typedText, freshPage]);
|
|
292
293
|
const resolvedPlaceholder = placeholder ?? t("dataEntry.searchSelect.placeholder");
|
|
293
|
-
const optionFor = (optionValue) => pickedOptions[optionValue] ?? (staticOptions ?? []).find((option) => option.value === optionValue) ??
|
|
294
|
+
const optionFor = (optionValue) => pickedOptions[optionValue] ?? (staticOptions ?? []).find((option) => option.value === optionValue) ?? listed.find((option) => option.value === optionValue) ?? null;
|
|
294
295
|
const selectedOption = value ? optionFor(value) : null;
|
|
295
296
|
const currentLabel = value ? selectedOption?.label ?? selectedLabel ?? value : resolvedPlaceholder;
|
|
296
297
|
const currentIcon = value ? selectedOption?.icon ?? selectedIcon : null;
|
|
@@ -46,9 +46,10 @@ export type SegmentedProp = {
|
|
|
46
46
|
* Control height tier: `md` (default), `xs`, `sm` or `lg` — the same `--control-height-*` tier
|
|
47
47
|
* every other control reads. `xs` is the fourth step (gh#719, the one Toggle/ToggleGroup took in
|
|
48
48
|
* gh#716): a 24px-dense row can carry a real segmented control instead of a hand-rolled row of
|
|
49
|
-
* Buttons.
|
|
49
|
+
* Buttons. `touch` (gh#1304) is the glove step: every segment at least 56×56 CSS px, standing
|
|
50
|
+
* `--control-touch-gap` (8px) apart — pair it with `block` for full-width pass/fail bars.
|
|
50
51
|
*/
|
|
51
|
-
size?: "xs" | "sm" | "md" | "lg";
|
|
52
|
+
size?: "xs" | "sm" | "md" | "lg" | "touch";
|
|
52
53
|
/** Disable the whole group. */
|
|
53
54
|
disabled?: boolean;
|
|
54
55
|
/** Form field name — submits the selected value with the form. */
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const toggleVariants: (props?: ({
|
|
4
4
|
variant?: "default" | "outline" | "quiet" | "soft" | null | undefined;
|
|
5
|
-
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
5
|
+
size?: "lg" | "md" | "sm" | "touch" | "xs" | null | undefined;
|
|
6
6
|
shape?: "default" | "pill" | "sharp" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
/**
|
|
@@ -83,7 +83,7 @@ export type ToggleProp = React.ComponentPropsWithoutRef<"button"> & TogglePresse
|
|
|
83
83
|
export type ToggleProps = ToggleProp;
|
|
84
84
|
export declare const Toggle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & TogglePressedFields & VariantProps<(props?: ({
|
|
85
85
|
variant?: "default" | "outline" | "quiet" | "soft" | null | undefined;
|
|
86
|
-
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
86
|
+
size?: "lg" | "md" | "sm" | "touch" | "xs" | null | undefined;
|
|
87
87
|
shape?: "default" | "pill" | "sharp" | null | undefined;
|
|
88
88
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & ToggleCountFields & React.RefAttributes<HTMLButtonElement>>;
|
|
89
89
|
export { toggleVariants, useCounterPill, restoreDomProps };
|
|
@@ -31,7 +31,10 @@ const toggleVariants = cva("ui-toggle", {
|
|
|
31
31
|
xs: "ui-toggle-xs",
|
|
32
32
|
sm: "ui-toggle-sm",
|
|
33
33
|
md: "ui-toggle-default-size",
|
|
34
|
-
lg: "ui-toggle-lg"
|
|
34
|
+
lg: "ui-toggle-lg",
|
|
35
|
+
// The glove step (gh#1304): ≥56×56, `--control-height-touch`; a ToggleGroup at this step
|
|
36
|
+
// also spaces its items `--control-touch-gap` (8px) apart.
|
|
37
|
+
touch: "ui-toggle-touch"
|
|
35
38
|
},
|
|
36
39
|
// Corner shape at parity with `Button` and `Badge` — the same three values mapped to the same
|
|
37
40
|
// two radius tokens, so `shape="pill"` means one thing across the library. `default` is empty
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
3
|
variant?: "bare" | "dashed" | "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
|
|
4
|
-
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
4
|
+
size?: "default" | "icon" | "icon-lg" | "icon-sm" | "icon-xs" | "lg" | "md" | "sm" | "touch" | "xs" | null | undefined;
|
|
5
5
|
shape?: "default" | "pill" | "sharp" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
7
|
export type { ButtonProp, ButtonProp as ButtonProps } from "../../props/components/general.prop.js";
|
|
@@ -60,7 +60,9 @@ const buttonVariants = cva("ui-button", {
|
|
|
60
60
|
icon: "ui-button--icon",
|
|
61
61
|
"icon-xs": "ui-button--icon-xs [&_svg]:size-[var(--button-xs-icon-size)] [&_svg]:shrink-0",
|
|
62
62
|
"icon-sm": "ui-button--icon-sm",
|
|
63
|
-
"icon-lg": "ui-button--icon-lg"
|
|
63
|
+
"icon-lg": "ui-button--icon-lg",
|
|
64
|
+
// The glove step (gh#1304): ≥56×56, `--control-height-touch`.
|
|
65
|
+
touch: "ui-button--touch"
|
|
64
66
|
},
|
|
65
67
|
// Single source of corner radius (deterministic — no competing rounded-* utility): default uses
|
|
66
68
|
// pill is fully rounded, sharp is square.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "AUTO-GENERATED by scripts/gen-measurement-contract.mjs — do not edit. Read this instead of guessing: docs/MEASUREMENT-CONTRACT.md.",
|
|
3
|
-
"version": "33.
|
|
3
|
+
"version": "33.7.0",
|
|
4
4
|
"targetSize": {
|
|
5
5
|
"standard": "WCAG 2.2 SC 2.5.8 Target Size (Minimum), level AA — 24×24 CSS px",
|
|
6
6
|
"min": 24,
|
|
@@ -350,7 +350,7 @@ export type FormProp = React.FormHTMLAttributes<HTMLFormElement> & {
|
|
|
350
350
|
/**
|
|
351
351
|
* @see FormField — exactly one of `children` (an interactive control) or `staticText`:
|
|
352
352
|
* a read-only VALUE row inside the same Form, styled to match `Descriptions.Item`'s value
|
|
353
|
-
* typography (
|
|
353
|
+
* typography (the `--descriptions-value-*` tokens, wrapping only where a word would overflow) byte-for-byte. This is the "mixed read-only + editable fields
|
|
354
354
|
* on one form" case (an immutable name/email row above an editable role Select, for example) —
|
|
355
355
|
* putting the read-only rows through FormField itself, not a separate `Descriptions` composed
|
|
356
356
|
* alongside it, gets perfect layout/labelAlign/row-gap sync FOR FREE because it IS the same
|
|
@@ -598,6 +598,12 @@ export type RadioGroupProp = FieldA11yProps & {
|
|
|
598
598
|
optionType?: RadioOptionTypeProp;
|
|
599
599
|
/** antd `buttonStyle` — fill of the selected choice while `optionType="button"`. */
|
|
600
600
|
buttonStyle?: RadioButtonStyleProp;
|
|
601
|
+
/**
|
|
602
|
+
* Button-bar size while `optionType="button"`: `md` (default, the control band) or `touch`
|
|
603
|
+
* (gh#1304) — every button at least 56×56 CSS px, the bar un-welded into buttons standing
|
|
604
|
+
* `--control-touch-gap` (8px) apart, for wet or gloved hands. No effect on radio dots.
|
|
605
|
+
*/
|
|
606
|
+
size?: Extract<SizeProp, "md"> | "touch";
|
|
601
607
|
};
|
|
602
608
|
/** antd `RadioGroupOptionType` — a radio group drawn as dots or as a welded button bar. */
|
|
603
609
|
export type RadioOptionTypeProp = "default" | "button";
|
package/dist/props/registry.d.ts
CHANGED
|
@@ -412,7 +412,7 @@ export declare const VOCABULARY_REGISTRY: {
|
|
|
412
412
|
readonly ButtonSizeProp: {
|
|
413
413
|
readonly file: "vocabulary/interaction.prop.ts";
|
|
414
414
|
readonly category: "interaction";
|
|
415
|
-
readonly description: "Button size preset; includes documented icon-only subset";
|
|
415
|
+
readonly description: "Button size preset; includes documented icon-only subset and the 56px glove step `touch` (gh#1304)";
|
|
416
416
|
};
|
|
417
417
|
readonly BadgeVariantProp: {
|
|
418
418
|
readonly file: "vocabulary/interaction.prop.ts";
|
package/dist/props/registry.js
CHANGED
|
@@ -411,7 +411,7 @@ const VOCABULARY_REGISTRY = {
|
|
|
411
411
|
ButtonSizeProp: {
|
|
412
412
|
file: "vocabulary/interaction.prop.ts",
|
|
413
413
|
category: "interaction",
|
|
414
|
-
description: "Button size preset; includes documented icon-only subset"
|
|
414
|
+
description: "Button size preset; includes documented icon-only subset and the 56px glove step `touch` (gh#1304)"
|
|
415
415
|
},
|
|
416
416
|
BadgeVariantProp: {
|
|
417
417
|
file: "vocabulary/interaction.prop.ts",
|
|
@@ -251,8 +251,13 @@ export type AppSettingPickerAppearanceProp = "labeled" | "icon" | "bar" | "inlin
|
|
|
251
251
|
export type AppSettingCycleAppearanceProp = "bar" | "icon";
|
|
252
252
|
/** Button size preset. */
|
|
253
253
|
export type SizeProp = "xs" | "sm" | "md" | "lg";
|
|
254
|
-
/**
|
|
255
|
-
|
|
254
|
+
/**
|
|
255
|
+
* Button size preset; icon-only sizes are a documented Button subset. `touch` (gh#1304) is the
|
|
256
|
+
* glove step — at least 56×56 CSS px (`--control-height-touch`) for wet or gloved hands; it is
|
|
257
|
+
* shared with Segmented, Toggle/ToggleGroup and `RadioGroup optionType="button"`, and is NOT a
|
|
258
|
+
* member of `SizeProp`, so a control that cannot honour it does not type-check it.
|
|
259
|
+
*/
|
|
260
|
+
export type ButtonSizeProp = SizeProp | "default" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | "touch";
|
|
256
261
|
/**
|
|
257
262
|
* Validation state a data-entry control PAINTS — Ant Design's `status` axis, which
|
|
258
263
|
* docs/DESIGN-AUTHORITY.md names the taxonomy authority for this library.
|