@godxjp/ui 32.1.0 → 32.1.2
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/Calendar.json +1 -1
- package/agent/components/ListRow.json +2 -1
- package/agent/components/Select.json +2 -2
- package/agent/components/Toggle.json +3 -2
- package/agent/components/ToggleGroup.json +1 -1
- package/agent/components.json +9 -7
- package/agent/index.json +4 -4
- package/agent/llms.txt +5 -5
- package/agent/tokens.json +42 -0
- package/dist/components/data-entry/search-select.js +5 -2
- package/dist/components/data-entry/toggle.d.ts +2 -2
- package/dist/components/data-entry/toggle.js +5 -1
- package/dist/contracts/measurement.json +1 -1
- package/dist/styles/control.css +12 -3
- package/dist/styles/data-display-layout.css +7 -0
- package/dist/styles/layers.json +1 -1
- package/dist/styles/toggle.css +14 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/components/control.css +10 -0
- package/package.json +2 -2
- package/scripts/ui-audit.mjs +83 -4
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 — 161 components,
|
|
21
|
+
The catalog — 161 components, 2193 tokens, 43 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
|
|
|
@@ -55,7 +55,7 @@ static files straight from this public repo — no hosting, no deploy step:
|
|
|
55
55
|
| [`agent/components-index.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json) | 47 KB | all 161 as name + group + tagline — **fetch this first** |
|
|
56
56
|
| [`agent/components/<Name>.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json) | 1 KB–36 KB | one file per component, each with its `importPath` — **this is the route to take** |
|
|
57
57
|
| [`agent/components.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json) | 1.2 MB | all 161 entries in one file — most URL fetchers truncate this silently; prefer the per-component files |
|
|
58
|
-
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) |
|
|
58
|
+
| [`agent/tokens.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json) | 845 KB | all 2193 design tokens, their values and why they exist |
|
|
59
59
|
| [`agent/vocabulary.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json) | 7 KB | the controlled prop vocabulary |
|
|
60
60
|
| [`agent/rules.json`](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json) | 21 KB | the 43 cardinal rules |
|
|
61
61
|
<!-- 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` 32.1.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 32.1.2.** 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.
|
|
@@ -56,10 +56,10 @@ Then ask it: `search_components`, `get_component`, `get_tokens`, `get_rule`, `li
|
|
|
56
56
|
its `importPath`, and its examples. Fetch only the handful you picked in step 1.
|
|
57
57
|
3. `rules.json` — 43 cardinal rules. The ones about raw HTML and hardcoded colour are not
|
|
58
58
|
style advice.
|
|
59
|
-
4. `tokens.json` —
|
|
59
|
+
4. `tokens.json` — 2193 design tokens, each tagged with its `tier`. **If you were handed a
|
|
60
60
|
brand, read the 211 `foundation` entries first** — `--primary`, `--background`,
|
|
61
61
|
`--radius`, `--font-size-base` are the handful everything else derives from. The
|
|
62
|
-
|
|
62
|
+
1870 `component` entries are per-part knobs; reach for one only when a role is
|
|
63
63
|
right everywhere except one component.
|
|
64
64
|
5. `anti-ai-tells.json` — 26 shapes that make generated UI look generated, each with the
|
|
65
65
|
fix. Read before you reach for a gradient hero or a wall of coloured chips.
|
|
@@ -145,7 +145,7 @@ has stopped following the brand.
|
|
|
145
145
|
|---|---|---|---|
|
|
146
146
|
| `foundation` | 211 | the seeds — `--primary`, `--background`, `--foreground`, `--radius`, `--font-size-base`, `--shadow-color`. Everything below is derived from these | **yes — this is the main road.** Handed a brand colour, this is where it goes: `:root { --primary: <H> <S>% <L>%; }` (HSL components, no `hsl()` wrapper) |
|
|
147
147
|
| `semantic` | 112 | named roles that follow the seeds — `--ring`, `--text-link`, `--primary-hover`, `--overlay-background` | only when the seed is right and ONE role must differ. That role then stops following a later brand change |
|
|
148
|
-
| `component` |
|
|
148
|
+
| `component` | 1870 | per-part knobs, `--{component}-{part}-{property}` | rarely. Most are declared `initial` with the real default at the call site — deliberate, so a scoped override re-resolves instead of freezing at `:root` |
|
|
149
149
|
|
|
150
150
|
A token whose `value` is `initial` is not empty and not broken: `initial` is the guaranteed-invalid
|
|
151
151
|
value, so the real default is computed where the element paints it. Set it and yours wins.
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"defaultValue": "\"auto\"",
|
|
25
|
-
"description": "How the grid claims horizontal space. `auto` (default) shrink-wraps to seven fixed day columns — the shape a picker popover needs, because the panel is shrink-to-fit and takes ITS width from the calendar inside it. Use `full` for an EMBEDDED calendar (a shift board, a booking month) that is the content of a Card rather than a dropdown: it stacks the months and lets the day cells share the row. Measured at a 1200px container: auto → root 248px / cells 32px; full → root 1200px / cells 168px; the DatePicker popover stays 250px either way. Do NOT reach for `className=\"w-full\"` instead — it widens the root and leaves the grid at 224px pinned left.",
|
|
25
|
+
"description": "How the grid claims horizontal space. `auto` (default) shrink-wraps to seven fixed day columns — the shape a picker popover needs, because the panel is shrink-to-fit and takes ITS width from the calendar inside it. Use `full` for an EMBEDDED calendar (a shift board, a booking month) that is the content of a Card rather than a dropdown: it stacks the months and lets the day cells share the row, each reading from the start edge with an inset (`--calendar-full-day-padding-inline` / `-block`, default --space-2 / --space-1, so the numeral clears the `text-edge-inset` audit; gh#1258). Measured at a 1200px container: auto → root 248px / cells 32px; full → root 1200px / cells 168px; the DatePicker popover stays 250px either way. Do NOT reach for `className=\"w-full\"` instead — it widens the root and leaves the grid at 224px pinned left.",
|
|
26
26
|
"name": "width",
|
|
27
27
|
"type": "\"auto\" | \"full\""
|
|
28
28
|
},
|
|
@@ -81,7 +81,8 @@
|
|
|
81
81
|
"DO put the row's action in `trailing` (a `ghost`/`outline` Button, a DropdownMenu trigger, a Switch, or a status Badge). DO pass `as=\"li\"` when the rows live inside a semantic list, and build that list as `<Flex as=\"ul\" marker=\"none\">` — `ui-audit` flags a raw `<ul>`/`role=\"list\"` as `no-hand-rolled-list`.",
|
|
82
82
|
"DO use `unread` for a notification list — the dot is a SHAPE with localized `sr-only` text (\"Unread\"/\"Read\"), so it never reads as colour alone, and the row surface reads `--list-row-unread-background` (default `hsl(var(--muted))` — chosen so the xs muted description line stays WCAG AA on the emphasized surface; `--accent` would drop it to 4.23:1). DON'T substitute a `Badge` — that renders a labelled pill, not a compact status dot.",
|
|
83
83
|
"DO pass `density=\"compact\"` for the canonical invitation / history row — an Avatar, a title (+ description) and one or two small trailing Buttons that must read as ONE line inside a narrow card (≈326px content at 390px), or a history row whose status Badge + ISO-8601 date belongs beside the title. Measured at 390px: 62px tall vs 126px at the default density (where the actions wrapped), history row 41px vs 114px. DON'T reach for it just to \"make things tighter\" on a roomy page — the default density is the entity-row measure.",
|
|
84
|
-
"DON'T add one-off `min-width`/wrapping CSS in the consumer app for a long title + two trailing Buttons. The row already shrinks and WRAPS: the content column keeps only `min(var(--list-row-body-min-width), 100%)` and the trailing actions drop onto their own line below the threshold. Retune the threshold with `--list-row-body-min-width` (default 12rem) and the action gap with `--list-row-trailing-gap`; pass `overflow=\"wrap\"` (usually with `align=\"start\"`) when the title must stay fully readable at 390px instead of truncating."
|
|
84
|
+
"DON'T add one-off `min-width`/wrapping CSS in the consumer app for a long title + two trailing Buttons. The row already shrinks and WRAPS: the content column keeps only `min(var(--list-row-body-min-width), 100%)` and the trailing actions drop onto their own line below the threshold. Retune the threshold with `--list-row-body-min-width` (default 12rem) and the action gap with `--list-row-trailing-gap`; pass `overflow=\"wrap\"` (usually with `align=\"start\"`) when the title must stay fully readable at 390px instead of truncating.",
|
|
85
|
+
"DO expect rows placed DIRECTLY in a padded (non-flush) `CardContent` — or in a `Flex as=\"ul\"` there — to drop their own inline padding: the card already holds the inset, so the row text lines up with the CardTitle instead of sitting 16px inside it. Inside `CardContent flush` (the documented home, with edge-to-edge dividers) the row keeps `--list-row-padding-x`."
|
|
85
86
|
],
|
|
86
87
|
"useCases": [
|
|
87
88
|
"Account security page — a list of active sessions (device + last-seen as title/description, a destructive 'Revoke' Button in trailing).",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"type": "number"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
"description": "Collapse extra selected labels.",
|
|
27
|
+
"description": "Collapse extra selected labels into a \"+N\" chip. Without it (mode=\"multiple\"/\"tags\"), the chips WRAP and the trigger grows to hold them, antd's default — a chip is never clipped out of sight. Set it when the trigger must stay one line (a dense rail or table cell).",
|
|
28
28
|
"name": "maxTagCount",
|
|
29
29
|
"type": "number"
|
|
30
30
|
},
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
"type": "React.ReactNode"
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
|
-
"description": "antd `suffixIcon` — replaces the trailing chevron; `null` removes the indicator entirely (antd's own replacement for the deprecated showArrow). While a value is clearable the ✕ owns that seat, as in antd.",
|
|
291
|
+
"description": "antd `suffixIcon` — replaces the trailing chevron; `null` removes the indicator entirely (antd's own replacement for the deprecated showArrow) — and, with no clear and no loading, the trigger stops reserving the chevron's end padding, so a `width=\"auto\"` trigger ends at its value. While a value is clearable the ✕ owns that seat, as in antd.",
|
|
292
292
|
"name": "suffixIcon",
|
|
293
293
|
"type": "React.ReactNode"
|
|
294
294
|
},
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"defaultValue": "\"default\"",
|
|
19
|
-
"description": "Visual style. `default` is a 1px TRANSPARENT border (a toolbar affordance — no resting surface at all), `outline` a hairline on --background, and `soft` (gh#734) the REST FILL a chip needs: hsl(var(--secondary)), byte-identical to the fill `Badge variant=\"secondary\"` and `Button variant=\"secondary\"` already paint, so a chip, a badge and a button on one row are one family. `soft` is antd Tag's resting surface and is what makes a FILTER CHIP legible before it is pressed — with `default` or `outline` the chip reads as transparent, which is the reported defect. Hover is the opaque --secondary-hover (not a translucent tint, which would shift between a page and a Card); pressed still wins over both.",
|
|
19
|
+
"description": "Visual style. `default` is a 1px TRANSPARENT border (a toolbar affordance — no resting surface at all), `outline` a hairline on --background, and `soft` (gh#734) the REST FILL a chip needs: hsl(var(--secondary)), byte-identical to the fill `Badge variant=\"secondary\"` and `Button variant=\"secondary\"` already paint, so a chip, a badge and a button on one row are one family. `soft` is antd Tag's resting surface and is what makes a FILTER CHIP legible before it is pressed — with `default` or `outline` the chip reads as transparent, which is the reported defect. Hover is the opaque --secondary-hover (not a translucent tint, which would shift between a page and a Card); pressed still wins over both. `quiet` (gh#1257) is the LOW-KEY pressed state for a mark beside content (a comment star, a reaction): the transparent rest of `default`, and pressed as a --secondary fill with --foreground text and the primary hairline, instead of a solid primary block; knobs `--toggle-quiet-on-{background,color,count-background,count-color}`.",
|
|
20
20
|
"name": "variant",
|
|
21
|
-
"type": "\"default\" | \"outline\" | \"soft\""
|
|
21
|
+
"type": "\"default\" | \"outline\" | \"soft\" | \"quiet\""
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
"defaultValue": "\"md\"",
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
"storyPath": "data-entry/toggle.tsx",
|
|
69
69
|
"tagline": "React Aria toggle button with default/outline/soft variants and tokenized sizes.",
|
|
70
70
|
"usage": [
|
|
71
|
+
"DO use `variant=\"quiet\"` for a pressed state that should stay LOW-KEY — a comment star, a like/reaction, a pin beside a row. The solid primary fill is for a selected filter or mode; on a mark beside content it reads as the loudest thing on the screen. No app CSS needed (gh#1257).",
|
|
71
72
|
"DO provide an accessible label when the toggle only contains an icon.",
|
|
72
73
|
"DON'T use Toggle for multi-option selection; use ToggleGroup.",
|
|
73
74
|
"DO reach for `count` for a faceted filter chip, a counted segmented toggle or a reaction chip — Toggle is the primitive that owns BOTH the count and the pressed state.",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"defaultValue": "\"default\"",
|
|
30
30
|
"description": "Visual style, PROVIDED TO EVERY ITEM via context — set it once on the group, not on each ToggleGroupItem. An explicit `variant` on an item still wins. The default is applied per item by toggleVariants, so an unset group emits no `data-variant` at all. `soft` (gh#734) is the chip fill: use it for a tag-filter panel, where `default`/`outline` leave the unselected chips reading as transparent.",
|
|
31
31
|
"name": "variant",
|
|
32
|
-
"type": "\"default\" | \"outline\" | \"soft\""
|
|
32
|
+
"type": "\"default\" | \"outline\" | \"soft\" | \"quiet\""
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"defaultValue": "\"default\"",
|
package/agent/components.json
CHANGED
|
@@ -4353,7 +4353,8 @@
|
|
|
4353
4353
|
"DO put the row's action in `trailing` (a `ghost`/`outline` Button, a DropdownMenu trigger, a Switch, or a status Badge). DO pass `as=\"li\"` when the rows live inside a semantic list, and build that list as `<Flex as=\"ul\" marker=\"none\">` — `ui-audit` flags a raw `<ul>`/`role=\"list\"` as `no-hand-rolled-list`.",
|
|
4354
4354
|
"DO use `unread` for a notification list — the dot is a SHAPE with localized `sr-only` text (\"Unread\"/\"Read\"), so it never reads as colour alone, and the row surface reads `--list-row-unread-background` (default `hsl(var(--muted))` — chosen so the xs muted description line stays WCAG AA on the emphasized surface; `--accent` would drop it to 4.23:1). DON'T substitute a `Badge` — that renders a labelled pill, not a compact status dot.",
|
|
4355
4355
|
"DO pass `density=\"compact\"` for the canonical invitation / history row — an Avatar, a title (+ description) and one or two small trailing Buttons that must read as ONE line inside a narrow card (≈326px content at 390px), or a history row whose status Badge + ISO-8601 date belongs beside the title. Measured at 390px: 62px tall vs 126px at the default density (where the actions wrapped), history row 41px vs 114px. DON'T reach for it just to \"make things tighter\" on a roomy page — the default density is the entity-row measure.",
|
|
4356
|
-
"DON'T add one-off `min-width`/wrapping CSS in the consumer app for a long title + two trailing Buttons. The row already shrinks and WRAPS: the content column keeps only `min(var(--list-row-body-min-width), 100%)` and the trailing actions drop onto their own line below the threshold. Retune the threshold with `--list-row-body-min-width` (default 12rem) and the action gap with `--list-row-trailing-gap`; pass `overflow=\"wrap\"` (usually with `align=\"start\"`) when the title must stay fully readable at 390px instead of truncating."
|
|
4356
|
+
"DON'T add one-off `min-width`/wrapping CSS in the consumer app for a long title + two trailing Buttons. The row already shrinks and WRAPS: the content column keeps only `min(var(--list-row-body-min-width), 100%)` and the trailing actions drop onto their own line below the threshold. Retune the threshold with `--list-row-body-min-width` (default 12rem) and the action gap with `--list-row-trailing-gap`; pass `overflow=\"wrap\"` (usually with `align=\"start\"`) when the title must stay fully readable at 390px instead of truncating.",
|
|
4357
|
+
"DO expect rows placed DIRECTLY in a padded (non-flush) `CardContent` — or in a `Flex as=\"ul\"` there — to drop their own inline padding: the card already holds the inset, so the row text lines up with the CardTitle instead of sitting 16px inside it. Inside `CardContent flush` (the documented home, with edge-to-edge dividers) the row keeps `--list-row-padding-x`."
|
|
4357
4358
|
],
|
|
4358
4359
|
"useCases": [
|
|
4359
4360
|
"Account security page — a list of active sessions (device + last-seen as title/description, a destructive 'Revoke' Button in trailing).",
|
|
@@ -6431,7 +6432,7 @@
|
|
|
6431
6432
|
"type": "number"
|
|
6432
6433
|
},
|
|
6433
6434
|
{
|
|
6434
|
-
"description": "Collapse extra selected labels.",
|
|
6435
|
+
"description": "Collapse extra selected labels into a \"+N\" chip. Without it (mode=\"multiple\"/\"tags\"), the chips WRAP and the trigger grows to hold them, antd's default — a chip is never clipped out of sight. Set it when the trigger must stay one line (a dense rail or table cell).",
|
|
6435
6436
|
"name": "maxTagCount",
|
|
6436
6437
|
"type": "number"
|
|
6437
6438
|
},
|
|
@@ -6695,7 +6696,7 @@
|
|
|
6695
6696
|
"type": "React.ReactNode"
|
|
6696
6697
|
},
|
|
6697
6698
|
{
|
|
6698
|
-
"description": "antd `suffixIcon` — replaces the trailing chevron; `null` removes the indicator entirely (antd's own replacement for the deprecated showArrow). While a value is clearable the ✕ owns that seat, as in antd.",
|
|
6699
|
+
"description": "antd `suffixIcon` — replaces the trailing chevron; `null` removes the indicator entirely (antd's own replacement for the deprecated showArrow) — and, with no clear and no loading, the trigger stops reserving the chevron's end padding, so a `width=\"auto\"` trigger ends at its value. While a value is clearable the ✕ owns that seat, as in antd.",
|
|
6699
6700
|
"name": "suffixIcon",
|
|
6700
6701
|
"type": "React.ReactNode"
|
|
6701
6702
|
},
|
|
@@ -10200,7 +10201,7 @@
|
|
|
10200
10201
|
},
|
|
10201
10202
|
{
|
|
10202
10203
|
"defaultValue": "\"auto\"",
|
|
10203
|
-
"description": "How the grid claims horizontal space. `auto` (default) shrink-wraps to seven fixed day columns — the shape a picker popover needs, because the panel is shrink-to-fit and takes ITS width from the calendar inside it. Use `full` for an EMBEDDED calendar (a shift board, a booking month) that is the content of a Card rather than a dropdown: it stacks the months and lets the day cells share the row. Measured at a 1200px container: auto → root 248px / cells 32px; full → root 1200px / cells 168px; the DatePicker popover stays 250px either way. Do NOT reach for `className=\"w-full\"` instead — it widens the root and leaves the grid at 224px pinned left.",
|
|
10204
|
+
"description": "How the grid claims horizontal space. `auto` (default) shrink-wraps to seven fixed day columns — the shape a picker popover needs, because the panel is shrink-to-fit and takes ITS width from the calendar inside it. Use `full` for an EMBEDDED calendar (a shift board, a booking month) that is the content of a Card rather than a dropdown: it stacks the months and lets the day cells share the row, each reading from the start edge with an inset (`--calendar-full-day-padding-inline` / `-block`, default --space-2 / --space-1, so the numeral clears the `text-edge-inset` audit; gh#1258). Measured at a 1200px container: auto → root 248px / cells 32px; full → root 1200px / cells 168px; the DatePicker popover stays 250px either way. Do NOT reach for `className=\"w-full\"` instead — it widens the root and leaves the grid at 224px pinned left.",
|
|
10204
10205
|
"name": "width",
|
|
10205
10206
|
"type": "\"auto\" | \"full\""
|
|
10206
10207
|
},
|
|
@@ -11770,9 +11771,9 @@
|
|
|
11770
11771
|
},
|
|
11771
11772
|
{
|
|
11772
11773
|
"defaultValue": "\"default\"",
|
|
11773
|
-
"description": "Visual style. `default` is a 1px TRANSPARENT border (a toolbar affordance — no resting surface at all), `outline` a hairline on --background, and `soft` (gh#734) the REST FILL a chip needs: hsl(var(--secondary)), byte-identical to the fill `Badge variant=\"secondary\"` and `Button variant=\"secondary\"` already paint, so a chip, a badge and a button on one row are one family. `soft` is antd Tag's resting surface and is what makes a FILTER CHIP legible before it is pressed — with `default` or `outline` the chip reads as transparent, which is the reported defect. Hover is the opaque --secondary-hover (not a translucent tint, which would shift between a page and a Card); pressed still wins over both.",
|
|
11774
|
+
"description": "Visual style. `default` is a 1px TRANSPARENT border (a toolbar affordance — no resting surface at all), `outline` a hairline on --background, and `soft` (gh#734) the REST FILL a chip needs: hsl(var(--secondary)), byte-identical to the fill `Badge variant=\"secondary\"` and `Button variant=\"secondary\"` already paint, so a chip, a badge and a button on one row are one family. `soft` is antd Tag's resting surface and is what makes a FILTER CHIP legible before it is pressed — with `default` or `outline` the chip reads as transparent, which is the reported defect. Hover is the opaque --secondary-hover (not a translucent tint, which would shift between a page and a Card); pressed still wins over both. `quiet` (gh#1257) is the LOW-KEY pressed state for a mark beside content (a comment star, a reaction): the transparent rest of `default`, and pressed as a --secondary fill with --foreground text and the primary hairline, instead of a solid primary block; knobs `--toggle-quiet-on-{background,color,count-background,count-color}`.",
|
|
11774
11775
|
"name": "variant",
|
|
11775
|
-
"type": "\"default\" | \"outline\" | \"soft\""
|
|
11776
|
+
"type": "\"default\" | \"outline\" | \"soft\" | \"quiet\""
|
|
11776
11777
|
},
|
|
11777
11778
|
{
|
|
11778
11779
|
"defaultValue": "\"md\"",
|
|
@@ -11822,6 +11823,7 @@
|
|
|
11822
11823
|
"storyPath": "data-entry/toggle.tsx",
|
|
11823
11824
|
"tagline": "React Aria toggle button with default/outline/soft variants and tokenized sizes.",
|
|
11824
11825
|
"usage": [
|
|
11826
|
+
"DO use `variant=\"quiet\"` for a pressed state that should stay LOW-KEY — a comment star, a like/reaction, a pin beside a row. The solid primary fill is for a selected filter or mode; on a mark beside content it reads as the loudest thing on the screen. No app CSS needed (gh#1257).",
|
|
11825
11827
|
"DO provide an accessible label when the toggle only contains an icon.",
|
|
11826
11828
|
"DON'T use Toggle for multi-option selection; use ToggleGroup.",
|
|
11827
11829
|
"DO reach for `count` for a faceted filter chip, a counted segmented toggle or a reaction chip — Toggle is the primitive that owns BOTH the count and the pressed state.",
|
|
@@ -11873,7 +11875,7 @@
|
|
|
11873
11875
|
"defaultValue": "\"default\"",
|
|
11874
11876
|
"description": "Visual style, PROVIDED TO EVERY ITEM via context — set it once on the group, not on each ToggleGroupItem. An explicit `variant` on an item still wins. The default is applied per item by toggleVariants, so an unset group emits no `data-variant` at all. `soft` (gh#734) is the chip fill: use it for a tag-filter panel, where `default`/`outline` leave the unselected chips reading as transparent.",
|
|
11875
11877
|
"name": "variant",
|
|
11876
|
-
"type": "\"default\" | \"outline\" | \"soft\""
|
|
11878
|
+
"type": "\"default\" | \"outline\" | \"soft\" | \"quiet\""
|
|
11877
11879
|
},
|
|
11878
11880
|
{
|
|
11879
11881
|
"defaultValue": "\"default\"",
|
package/agent/index.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"components": 161,
|
|
5
5
|
"patterns": 24,
|
|
6
6
|
"rules": 43,
|
|
7
|
-
"tokens":
|
|
7
|
+
"tokens": 2193,
|
|
8
8
|
"vocabulary": 14
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"note": "Pin to the tag that matches the @godxjp/ui version you installed. A catalog newer than your package describes props you do not have; older, and it hides props you do.",
|
|
49
49
|
"read": {
|
|
50
50
|
"live": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/index.json",
|
|
51
|
-
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.1.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.1.2/agent/index.json"
|
|
52
52
|
},
|
|
53
53
|
"source": "mcp/src/data — the same data @godxjp/ui-mcp serves — plus the foundation and semantic token tiers, read from src/tokens/*.css",
|
|
54
54
|
"start": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/START-HERE.md",
|
|
55
55
|
"tokenTiers": {
|
|
56
56
|
"component": "per-part knobs, --{component}-{part}-{property}; usually leave these alone",
|
|
57
57
|
"counts": {
|
|
58
|
-
"component":
|
|
58
|
+
"component": 1870,
|
|
59
59
|
"foundation": 211,
|
|
60
60
|
"semantic": 112
|
|
61
61
|
},
|
|
62
62
|
"foundation": "the seeds a consumer is invited to set — --primary, --background, --radius",
|
|
63
63
|
"semantic": "named roles that follow the seeds — --ring, --text-link, --overlay-background"
|
|
64
64
|
},
|
|
65
|
-
"version": "32.1.
|
|
65
|
+
"version": "32.1.2"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
|
-
> A Japanese-enterprise React design system: 161 components,
|
|
4
|
-
> 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.1.
|
|
3
|
+
> A Japanese-enterprise React design system: 161 components, 2193 design tokens,
|
|
4
|
+
> 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.1.2.
|
|
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@32.1.
|
|
7
|
+
(`npx @godxjp/ui-mcp@32.1.2`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -18,7 +18,7 @@ that can only fetch URLs.
|
|
|
18
18
|
- [components-index.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components-index.json): 47 KB — all 161 components as name, group, tagline, plus `absorbed`: the names that do NOT exist and map to it (`Combobox` → `Select`).
|
|
19
19
|
- [components/<Name>.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components/Select.json): one file per component (1 KB–36 KB, median 6 KB). Read the index, then fetch only the ones you chose — this is the selective route, and the reason you do not need the blob.
|
|
20
20
|
- [components.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/components.json): 1.2 MB — every entry in one file. Most URL fetchers truncate a response this size without saying so; prefer the per-component files.
|
|
21
|
-
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 112 `semantic` roles,
|
|
21
|
+
- [tokens.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/tokens.json): every design token with its value, the reason it exists, and its `tier` — 211 `foundation` seeds (`--primary`, `--background`, `--radius`: set these when you are handed a brand), 112 `semantic` roles, 1870 `component` knobs.
|
|
22
22
|
- [vocabulary.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/vocabulary.json): the controlled prop vocabulary — which prop name means what, across every component.
|
|
23
23
|
- [rules.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/rules.json): 43 cardinal rules.
|
|
24
24
|
- [anti-ai-tells.json](https://raw.githubusercontent.com/godx-jp/godxjp-ui/main/agent/anti-ai-tells.json): 26 shapes that make generated UI look generated, each with its fix.
|
|
@@ -26,7 +26,7 @@ that can only fetch URLs.
|
|
|
26
26
|
## Pinning
|
|
27
27
|
|
|
28
28
|
Every URL above tracks `main`. To pin to the release a project actually installed, swap `main` for
|
|
29
|
-
the tag: `.../godx-jp/godxjp-ui/v32.1.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v32.1.2/agent/...`. A catalog that does not match the installed
|
|
30
30
|
package describes props that are absent, or hides props that are present, and says nothing either way.
|
|
31
31
|
|
|
32
32
|
Pinned catalogs only exist for releases whose tag actually contains `agent/`. If `…/v<version>/agent/index.json` returns 404, that release predates this catalog: read `…/main/…` instead and compare `index.json` → `version` against the package you have, so you at least know which way it drifted.
|
package/agent/tokens.json
CHANGED
|
@@ -3659,6 +3659,36 @@
|
|
|
3659
3659
|
"tier": "component",
|
|
3660
3660
|
"value": "initial"
|
|
3661
3661
|
},
|
|
3662
|
+
{
|
|
3663
|
+
"description": "Pressed Toggle LABEL colour — the pair to --toggle-on-background, `initial` like it (default hsl(var(--primary-foreground)) at the call site). Without it a service that quietened the pressed fill to a pale tint was left with white text on it.",
|
|
3664
|
+
"name": "--toggle-on-color",
|
|
3665
|
+
"tier": "component",
|
|
3666
|
+
"value": "initial"
|
|
3667
|
+
},
|
|
3668
|
+
{
|
|
3669
|
+
"description": "`Toggle variant=\"quiet\"` pressed state (gh#1257) — role-mirror knobs, `initial`; defaults at the call site: fill hsl(var(--secondary)), label hsl(var(--foreground)), counter hsl(var(--background)) / hsl(var(--foreground)).",
|
|
3670
|
+
"name": "--toggle-quiet-on-background",
|
|
3671
|
+
"tier": "component",
|
|
3672
|
+
"value": "initial"
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
3676
|
+
"name": "--toggle-quiet-on-color",
|
|
3677
|
+
"tier": "component",
|
|
3678
|
+
"value": "initial"
|
|
3679
|
+
},
|
|
3680
|
+
{
|
|
3681
|
+
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
3682
|
+
"name": "--toggle-quiet-on-count-background",
|
|
3683
|
+
"tier": "component",
|
|
3684
|
+
"value": "initial"
|
|
3685
|
+
},
|
|
3686
|
+
{
|
|
3687
|
+
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
3688
|
+
"name": "--toggle-quiet-on-count-color",
|
|
3689
|
+
"tier": "component",
|
|
3690
|
+
"value": "initial"
|
|
3691
|
+
},
|
|
3662
3692
|
{
|
|
3663
3693
|
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
3664
3694
|
"name": "--slider-track-background",
|
|
@@ -4475,6 +4505,18 @@
|
|
|
4475
4505
|
"tier": "component",
|
|
4476
4506
|
"value": "var(--space-1)"
|
|
4477
4507
|
},
|
|
4508
|
+
{
|
|
4509
|
+
"description": "Text inset of a `width=\"full\"` day cell (gh#1258). The full cell reads from the start edge so a number can sit above badges, and with the unruled cell's `padding: 0` the numeral touched the cell edge — 0px left, 3px top, flagged by the library's own `text-edge-inset` rule (cell: >= 8px inline, >= 4px block). `initial` so the density-scaled defaults (var(--space-2) inline, var(--space-1) block) resolve at the call site, not frozen at the :root density. A shift board that wants a tighter or roomier cell sets these.",
|
|
4510
|
+
"name": "--calendar-full-day-padding-inline",
|
|
4511
|
+
"tier": "component",
|
|
4512
|
+
"value": "initial"
|
|
4513
|
+
},
|
|
4514
|
+
{
|
|
4515
|
+
"description": "Control primitive tokens: heights, horizontal padding, adjacent control sizes.",
|
|
4516
|
+
"name": "--calendar-full-day-padding-block",
|
|
4517
|
+
"tier": "component",
|
|
4518
|
+
"value": "initial"
|
|
4519
|
+
},
|
|
4478
4520
|
{
|
|
4479
4521
|
"description": "Colour of the day-grid ruling (`Calendar bordered`, on by default). `initial` on purpose: the role default is read at the call site as `var(--calendar-grid-border-color, hsl(var(--border)))` so it follows a scoped theme. The --border tier: L* 93.80 / 1.149:1 on the popover in light, L* 20.76 / 1.270:1 in dark — a rule exactly as heavy as a Card edge or a DataTable row rule. Asked for three times: 25.3.0 drew the grid at all, 27.6.0 lightened the full --input (3.47 / 3.88) to --input/0.5 (1.74 / 1.95, L* 78.67), and gh#730 measured that still darker than the --border every card and table uses and asked for the --border tier itself. Same tier as the RangeTimeline grid. Set any colour to retint, e.g. `hsl(var(--input) / 0.5)` for the 27.6.0 weight or `hsl(var(--input))` for the heavy line.",
|
|
4480
4522
|
"name": "--calendar-grid-border-color",
|
|
@@ -488,8 +488,11 @@ function SearchSelect(props) {
|
|
|
488
488
|
// order and make that token dead. Same reasoning as SelectTrigger.
|
|
489
489
|
width === "auto" && "w-auto",
|
|
490
490
|
width === "full" && "w-full",
|
|
491
|
-
// Reserve trailing room for the single clear-or-chevron overlay rendered below
|
|
492
|
-
|
|
491
|
+
// Reserve trailing room for the single clear-or-chevron overlay rendered below — only when
|
|
492
|
+
// something can sit there. `suffixIcon={null}` with no clear and no loading renders an empty
|
|
493
|
+
// overlay, and reserving the chevron's room anyway left a dead 2.25rem gap at the end of a
|
|
494
|
+
// `width="auto"` trigger (gh#1257).
|
|
495
|
+
(loadingProp || clearControl.enabled || suffixIcon !== null) && "ui-control-trigger-affixed"
|
|
493
496
|
)
|
|
494
497
|
};
|
|
495
498
|
const chipsRemovable = !disabled && !readOnly;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { type VariantProps } from "class-variance-authority";
|
|
3
3
|
declare const toggleVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "outline" | "soft" | null | undefined;
|
|
4
|
+
variant?: "default" | "outline" | "quiet" | "soft" | null | undefined;
|
|
5
5
|
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
6
6
|
shape?: "default" | "pill" | "sharp" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
@@ -78,7 +78,7 @@ declare function restoreDomProps<P extends {
|
|
|
78
78
|
export type ToggleProp = React.ComponentPropsWithoutRef<"button"> & TogglePressedFields & VariantProps<typeof toggleVariants> & ToggleCountFields;
|
|
79
79
|
export type ToggleProps = ToggleProp;
|
|
80
80
|
export declare const Toggle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & TogglePressedFields & VariantProps<(props?: ({
|
|
81
|
-
variant?: "default" | "outline" | "soft" | null | undefined;
|
|
81
|
+
variant?: "default" | "outline" | "quiet" | "soft" | null | undefined;
|
|
82
82
|
size?: "lg" | "md" | "sm" | "xs" | null | undefined;
|
|
83
83
|
shape?: "default" | "pill" | "sharp" | null | undefined;
|
|
84
84
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & ToggleCountFields & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -18,7 +18,11 @@ const toggleVariants = cva("ui-toggle", {
|
|
|
18
18
|
// no pressed state at all. `soft` is antd `Tag`'s resting surface, on the SAME
|
|
19
19
|
// `hsl(var(--secondary))` fill `Badge variant="secondary"` and `Button variant="secondary"`
|
|
20
20
|
// already paint, so a chip, a badge and a button on one row are one family.
|
|
21
|
-
soft: "ui-toggle-soft"
|
|
21
|
+
soft: "ui-toggle-soft",
|
|
22
|
+
// A LOW-KEY pressed state (gh#1257): the `default` rest, and pressed as a --secondary fill with
|
|
23
|
+
// --foreground text and the primary hairline instead of a solid primary block — for a comment
|
|
24
|
+
// star or a reaction, where a pressed toggle is a mark beside content, not a selected filter.
|
|
25
|
+
quiet: "ui-toggle-quiet"
|
|
22
26
|
},
|
|
23
27
|
size: {
|
|
24
28
|
// The fourth step of the shared control ladder (gh#716): 24px, `--control-height-xs`, the
|
|
@@ -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": "32.1.
|
|
3
|
+
"version": "32.1.2",
|
|
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,
|
package/dist/styles/control.css
CHANGED
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
.ui-toggle[data-state="on"] {
|
|
71
71
|
background: var(--toggle-on-background, hsl(var(--primary)));
|
|
72
|
-
color: hsl(var(--primary-foreground));
|
|
72
|
+
color: var(--toggle-on-color, hsl(var(--primary-foreground)));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.ui-toggle:disabled,
|
|
@@ -1970,11 +1970,17 @@
|
|
|
1970
1970
|
display: flex;
|
|
1971
1971
|
min-inline-size: 0;
|
|
1972
1972
|
flex: 1 1 0%;
|
|
1973
|
+
flex-wrap: wrap;
|
|
1973
1974
|
align-items: center;
|
|
1974
1975
|
gap: var(--search-select-option-space-gap);
|
|
1975
1976
|
overflow: hidden;
|
|
1976
1977
|
}
|
|
1977
1978
|
|
|
1979
|
+
.ui-control-trigger[data-mode="multiple"]:has(.ui-search-select-values) {
|
|
1980
|
+
block-size: auto;
|
|
1981
|
+
min-block-size: var(--control-height);
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1978
1984
|
.ui-search-select-value {
|
|
1979
1985
|
display: inline-flex;
|
|
1980
1986
|
max-inline-size: 100%;
|
|
@@ -2759,6 +2765,9 @@
|
|
|
2759
2765
|
justify-content: flex-start;
|
|
2760
2766
|
text-align: start;
|
|
2761
2767
|
white-space: normal;
|
|
2768
|
+
|
|
2769
|
+
padding-inline: var(--calendar-full-day-padding-inline, var(--space-2));
|
|
2770
|
+
padding-block: var(--calendar-full-day-padding-block, var(--space-1));
|
|
2762
2771
|
}
|
|
2763
2772
|
|
|
2764
2773
|
.ui-calendar-month {
|
|
@@ -3180,8 +3189,8 @@
|
|
|
3180
3189
|
}
|
|
3181
3190
|
|
|
3182
3191
|
.ui-button--secondary .ui-button-count {
|
|
3183
|
-
background: var(--button-count-secondary-background, hsl(var(--
|
|
3184
|
-
color: var(--button-count-secondary-color, hsl(var(--
|
|
3192
|
+
background: var(--button-count-secondary-background, hsl(var(--background)));
|
|
3193
|
+
color: var(--button-count-secondary-color, hsl(var(--foreground)));
|
|
3185
3194
|
}
|
|
3186
3195
|
}
|
|
3187
3196
|
|
|
@@ -905,6 +905,13 @@
|
|
|
905
905
|
padding: var(--list-row-compact-padding-y, var(--space-2))
|
|
906
906
|
var(--list-row-compact-padding-x, var(--list-row-padding-x));
|
|
907
907
|
}
|
|
908
|
+
|
|
909
|
+
[data-slot="card-content"]:not([data-flush]) > [data-slot="list-row"],
|
|
910
|
+
[data-slot="card-content"]:not([data-flush])
|
|
911
|
+
> :is(ul, ol, [role="list"])
|
|
912
|
+
> [data-slot="list-row"] {
|
|
913
|
+
padding-inline: 0;
|
|
914
|
+
}
|
|
908
915
|
[data-slot="list-row"][data-density="compact"] [data-slot="list-row-body"] {
|
|
909
916
|
min-inline-size: min(var(--list-row-compact-body-min-width, 6rem), 100%);
|
|
910
917
|
flex-basis: var(--list-row-compact-body-min-width, 6rem);
|
package/dist/styles/layers.json
CHANGED
package/dist/styles/toggle.css
CHANGED
|
@@ -36,6 +36,20 @@
|
|
|
36
36
|
color: var(--toggle-pressed-count-color, hsl(var(--primary)));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.ui-toggle-quiet {
|
|
40
|
+
border: var(--stroke-hairline) solid transparent;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ui-toggle.ui-toggle-quiet[data-state="on"] {
|
|
44
|
+
background: var(--toggle-quiet-on-background, hsl(var(--secondary)));
|
|
45
|
+
color: var(--toggle-quiet-on-color, hsl(var(--foreground)));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ui-toggle.ui-toggle-quiet[data-state="on"] .ui-toggle-count {
|
|
49
|
+
background: var(--toggle-quiet-on-count-background, hsl(var(--background)));
|
|
50
|
+
color: var(--toggle-quiet-on-count-color, hsl(var(--foreground)));
|
|
51
|
+
}
|
|
52
|
+
|
|
39
53
|
@media (forced-colors: active) {
|
|
40
54
|
.ui-toggle[data-state="on"] {
|
|
41
55
|
border-color: Highlight;
|