@godxjp/ui 33.12.2 → 33.12.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/START-HERE.md +1 -1
- package/agent/index.json +2 -2
- package/agent/llms.txt +3 -3
- package/agent/tokens.json +2 -2
- package/dist/components/data-entry/input.js +6 -6
- package/dist/components/data-entry/textarea.js +6 -6
- package/dist/contracts/measurement.json +1 -1
- package/dist/lib/focus-reveal.js +18 -0
- package/dist/styles/data-display-layout.css +0 -1
- package/dist/styles/data-entry-layout.css +0 -1
- package/dist/styles/focus-ring.css +48 -0
- package/dist/styles/layers.json +1 -1
- package/dist/styles/layout.css +0 -3
- package/dist/styles/navigation-layout.css +0 -2
- package/dist/styles/shell-layout.css +0 -12
- package/dist/styles/table-layout.css +0 -2
- package/dist/styles.css +1 -1
- package/dist/tokens/components/resizable.css +1 -1
- package/docs/TOKENS.md +2 -2
- package/package.json +2 -2
package/agent/START-HERE.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
You are about to write code against a design system you did not author. This file is the whole
|
|
4
4
|
contract. Read it before you write JSX.
|
|
5
5
|
|
|
6
|
-
**This catalog describes `@godxjp/ui` 33.12.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 33.12.5.** 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.
|
package/agent/index.json
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
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.12.
|
|
57
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v33.12.5/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",
|
|
@@ -68,5 +68,5 @@
|
|
|
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.12.
|
|
71
|
+
"version": "33.12.5"
|
|
72
72
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
3
|
> A Japanese-enterprise React design system: 169 components, 2241 design tokens,
|
|
4
|
-
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.12.
|
|
4
|
+
> 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.12.5.
|
|
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.12.
|
|
7
|
+
(`npx @godxjp/ui-mcp@33.12.5`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -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.12.
|
|
30
|
+
the tag: `.../godx-jp/godxjp-ui/v33.12.5/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
|
@@ -10074,10 +10074,10 @@
|
|
|
10074
10074
|
"value": "var(--space-2)"
|
|
10075
10075
|
},
|
|
10076
10076
|
{
|
|
10077
|
-
"description": "
|
|
10077
|
+
"description": "Separator layout thickness; focus paint must not reserve extra space.",
|
|
10078
10078
|
"name": "--resizable-handle-size",
|
|
10079
10079
|
"tier": "component",
|
|
10080
|
-
"value": "var(--
|
|
10080
|
+
"value": "var(--control-border-width, var(--stroke-hairline))"
|
|
10081
10081
|
},
|
|
10082
10082
|
{
|
|
10083
10083
|
"description": "`thin` reproduces the old 10px rail closely on the platforms that draw a classic scrollbar; `auto` gives the full-width platform bar, which is what a touch/coarse-pointer console wants. Only `auto | thin | none` are valid — a length is not (that is the standard property's whole bargain, and the reason `--scroll-area-bar-size` could not survive as a rem).",
|
|
@@ -87,13 +87,13 @@ const Input = React.forwardRef(
|
|
|
87
87
|
wrapper.style.removeProperty("--input-trailing-measured-size");
|
|
88
88
|
};
|
|
89
89
|
}, []);
|
|
90
|
-
const [
|
|
90
|
+
const [uncontrolledText, setUncontrolledText] = React.useState(
|
|
91
|
+
() => String(defaultValue ?? "")
|
|
92
|
+
);
|
|
93
|
+
const text = value !== void 0 ? String(value) : uncontrolledText;
|
|
91
94
|
const hasText = text.length > 0;
|
|
92
|
-
React.useEffect(() => {
|
|
93
|
-
if (value !== void 0) setText(String(value));
|
|
94
|
-
}, [value]);
|
|
95
95
|
const handleChange = (event) => {
|
|
96
|
-
if (value === void 0)
|
|
96
|
+
if (value === void 0) setUncontrolledText(event.target.value);
|
|
97
97
|
onChange?.(event);
|
|
98
98
|
if (onChange !== onValueChange) onValueChange?.(event.target.value);
|
|
99
99
|
};
|
|
@@ -108,7 +108,7 @@ const Input = React.forwardRef(
|
|
|
108
108
|
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
109
109
|
el.focus();
|
|
110
110
|
}
|
|
111
|
-
|
|
111
|
+
setUncontrolledText("");
|
|
112
112
|
onClear?.();
|
|
113
113
|
};
|
|
114
114
|
const clearControl = resolveAllowClear(allowClear, false, t("common.clear") ?? "Clear");
|
|
@@ -65,11 +65,11 @@ const Textarea = React.forwardRef(
|
|
|
65
65
|
},
|
|
66
66
|
[ref]
|
|
67
67
|
);
|
|
68
|
-
const [
|
|
68
|
+
const [uncontrolledText, setUncontrolledText] = React.useState(
|
|
69
|
+
() => String(defaultValue ?? "")
|
|
70
|
+
);
|
|
71
|
+
const text = value !== void 0 ? String(value) : uncontrolledText;
|
|
69
72
|
const hasText = text.length > 0;
|
|
70
|
-
React.useEffect(() => {
|
|
71
|
-
if (value !== void 0) setText(String(value));
|
|
72
|
-
}, [value]);
|
|
73
73
|
const [mirror, setMirror] = React.useState(() => String(value ?? defaultValue ?? ""));
|
|
74
74
|
const composing = React.useRef(false);
|
|
75
75
|
const syncMirror = React.useCallback(() => {
|
|
@@ -90,7 +90,7 @@ const Textarea = React.forwardRef(
|
|
|
90
90
|
return () => form.removeEventListener("reset", onReset);
|
|
91
91
|
}, [growing, syncMirror]);
|
|
92
92
|
const handleChange = (event) => {
|
|
93
|
-
if (value === void 0)
|
|
93
|
+
if (value === void 0) setUncontrolledText(event.target.value);
|
|
94
94
|
if (growing && !composing.current) setMirror(event.target.value);
|
|
95
95
|
onChange?.(event);
|
|
96
96
|
if (onChange !== onValueChange) onValueChange?.(event.target.value);
|
|
@@ -115,7 +115,7 @@ const Textarea = React.forwardRef(
|
|
|
115
115
|
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
116
116
|
el.focus();
|
|
117
117
|
}
|
|
118
|
-
|
|
118
|
+
setUncontrolledText("");
|
|
119
119
|
if (growing) setMirror("");
|
|
120
120
|
onClear?.();
|
|
121
121
|
};
|
|
@@ -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.12.
|
|
3
|
+
"version": "33.12.5",
|
|
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/lib/focus-reveal.js
CHANGED
|
@@ -22,6 +22,24 @@ function revealKeyboardFocus(event, viewport = event.currentTarget) {
|
|
|
22
22
|
const outsideY = /auto|scroll/.test(style.overflowY) && box.height <= viewport.clientHeight && (box.top < top || box.bottom > top + viewport.clientHeight);
|
|
23
23
|
if (outsideX || outsideY)
|
|
24
24
|
carrier.scrollIntoView?.({ block: "nearest", inline: "nearest", behavior: "instant" });
|
|
25
|
+
if (carrier.matches(".ui-button")) {
|
|
26
|
+
const containAtEdge = () => {
|
|
27
|
+
if (!carrier.matches(":focus-visible")) return;
|
|
28
|
+
const r = carrier.getBoundingClientRect();
|
|
29
|
+
const f = viewport.getBoundingClientRect();
|
|
30
|
+
const x = f.left + viewport.clientLeft, y = f.top + viewport.clientTop;
|
|
31
|
+
if (/auto|scroll|hidden/.test(style.overflowX) && (r.left - extent < x || r.right + extent > x + viewport.clientWidth) || /auto|scroll|hidden/.test(style.overflowY) && (r.top - extent < y || r.bottom + extent > y + viewport.clientHeight)) {
|
|
32
|
+
if (!carrier.hasAttribute("data-focus-contained")) {
|
|
33
|
+
carrier.setAttribute("data-focus-contained", "");
|
|
34
|
+
carrier.addEventListener("blur", () => carrier.removeAttribute("data-focus-contained"), {
|
|
35
|
+
once: true
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
containAtEdge();
|
|
41
|
+
requestAnimationFrame(containAtEdge);
|
|
42
|
+
}
|
|
25
43
|
}
|
|
26
44
|
export {
|
|
27
45
|
revealKeyboardFocus
|
|
@@ -1108,7 +1108,6 @@
|
|
|
1108
1108
|
@layer components {
|
|
1109
1109
|
|
|
1110
1110
|
.ui-scroll-area {
|
|
1111
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1112
1111
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1113
1112
|
position: relative;
|
|
1114
1113
|
scrollbar-width: var(--scroll-area-scrollbar-width);
|
|
@@ -700,7 +700,6 @@
|
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
.ui-branch-scope-picker-list {
|
|
703
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
704
703
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
705
704
|
max-block-size: var(--branch-scope-picker-list-max-height);
|
|
706
705
|
overflow-y: auto;
|
|
@@ -225,6 +225,7 @@
|
|
|
225
225
|
--focus-ring-opacity: var(--topbar-icon-focus-ring-alpha);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
+
.ui-scroll-area [data-slot="anchor-link"],
|
|
228
229
|
a.ui-list-row,
|
|
229
230
|
tr.ui-focus-ring,
|
|
230
231
|
.sb-nav-item,
|
|
@@ -234,6 +235,14 @@
|
|
|
234
235
|
}
|
|
235
236
|
|
|
236
237
|
:is(
|
|
238
|
+
.ui-topbar .ui-button--ghost,
|
|
239
|
+
.ui-topbar .ui-app-setting-picker-icon,
|
|
240
|
+
.ui-legal-document-rail .ui-button,
|
|
241
|
+
.ui-pagination-link,
|
|
242
|
+
.ui-pagination .ui-button,
|
|
243
|
+
.ui-pagination .ui-control,
|
|
244
|
+
.ui-pagination .ui-input,
|
|
245
|
+
.ui-topbar .ui-search-input-control,
|
|
237
246
|
.ui-mobile-shell-tabbar .ui-button--ghost,
|
|
238
247
|
[data-slot="tabs-list"] [role="tab"],
|
|
239
248
|
[data-slot="tabs-list"] .ui-tabs-add,
|
|
@@ -253,6 +262,45 @@
|
|
|
253
262
|
--focus-ring-contained-offset: var(--focus-ring-inset-offset);
|
|
254
263
|
}
|
|
255
264
|
|
|
265
|
+
:root:not([data-focus-outline="off"]) .ui-button[data-focus-contained]:focus-visible,
|
|
266
|
+
:root:not([data-focus-outline="off"]) .ui-pagination-link:focus-visible,
|
|
267
|
+
:root:not([data-focus-outline="off"])
|
|
268
|
+
.ui-branch-scope-picker-list
|
|
269
|
+
.ui-checkbox[data-focus-visible] {
|
|
270
|
+
--focus-ring-contained-offset: calc(-1 * var(--focus-ring-width));
|
|
271
|
+
--focus-field-shadow: inset 0 0 0 calc(var(--focus-ring-width) + var(--focus-outline-offset))
|
|
272
|
+
hsl(var(--background));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
:root:not([data-focus-outline="off"])
|
|
276
|
+
.ui-anchor[data-direction="horizontal"]
|
|
277
|
+
[data-slot="anchor-link"]:focus-visible,
|
|
278
|
+
:root:not([data-focus-outline="off"])
|
|
279
|
+
.ui-topbar
|
|
280
|
+
.ui-button:has([data-slot="avatar"]):focus-visible {
|
|
281
|
+
outline-style: none;
|
|
282
|
+
box-shadow:
|
|
283
|
+
inset 0 var(--focus-ring-width) 0
|
|
284
|
+
hsl(
|
|
285
|
+
var(--focus-outline-color, var(--focus-ring-color, var(--ring))) /
|
|
286
|
+
var(--focus-ring-opacity, 1)
|
|
287
|
+
),
|
|
288
|
+
inset 0 calc(-1 * var(--focus-ring-width)) 0
|
|
289
|
+
hsl(
|
|
290
|
+
var(--focus-outline-color, var(--focus-ring-color, var(--ring))) /
|
|
291
|
+
var(--focus-ring-opacity, 1)
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
:root:not([data-focus-outline="off"]) .ui-resizable-handle[role="separator"]:focus-visible {
|
|
296
|
+
outline-style: none;
|
|
297
|
+
box-shadow: inset 0 0 0 var(--focus-ring-width)
|
|
298
|
+
hsl(
|
|
299
|
+
var(--focus-outline-color, var(--focus-ring-color, var(--ring))) /
|
|
300
|
+
var(--focus-ring-opacity, 1)
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
|
|
256
304
|
.ui-accordion-trigger {
|
|
257
305
|
--focus-ring-offset: var(--accordion-focus-ring-offset);
|
|
258
306
|
}
|
package/dist/styles/layers.json
CHANGED
package/dist/styles/layout.css
CHANGED
|
@@ -642,7 +642,6 @@
|
|
|
642
642
|
}
|
|
643
643
|
|
|
644
644
|
.ui-resizable-panel {
|
|
645
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
646
645
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
647
646
|
min-height: 0;
|
|
648
647
|
min-width: 0;
|
|
@@ -1387,7 +1386,6 @@
|
|
|
1387
1386
|
}
|
|
1388
1387
|
|
|
1389
1388
|
.ui-pagination-list {
|
|
1390
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1391
1389
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1392
1390
|
display: flex;
|
|
1393
1391
|
min-width: 0;
|
|
@@ -1705,7 +1703,6 @@
|
|
|
1705
1703
|
}
|
|
1706
1704
|
|
|
1707
1705
|
.ui-legal-document-rail {
|
|
1708
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1709
1706
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1710
1707
|
display: flex;
|
|
1711
1708
|
flex-direction: column;
|
|
@@ -493,7 +493,6 @@
|
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
.ui-pagination {
|
|
496
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
497
496
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
498
497
|
max-inline-size: 100%;
|
|
499
498
|
overflow-x: auto;
|
|
@@ -1404,7 +1403,6 @@
|
|
|
1404
1403
|
}
|
|
1405
1404
|
|
|
1406
1405
|
.ui-anchor[data-direction="horizontal"] .ui-anchor-list {
|
|
1407
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1408
1406
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
1409
1407
|
display: flex;
|
|
1410
1408
|
gap: var(--anchor-gap);
|
|
@@ -277,8 +277,6 @@
|
|
|
277
277
|
}
|
|
278
278
|
|
|
279
279
|
.app-main {
|
|
280
|
-
|
|
281
|
-
padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
282
280
|
scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
283
281
|
grid-area: main;
|
|
284
282
|
min-width: 0;
|
|
@@ -2241,21 +2239,11 @@
|
|
|
2241
2239
|
}
|
|
2242
2240
|
|
|
2243
2241
|
.ui-topbar[data-overflow="scroll"] {
|
|
2244
|
-
|
|
2245
|
-
margin-inline: calc(-1 * (var(--focus-ring-weight) + var(--focus-outline-offset)));
|
|
2246
|
-
max-width: calc(100% + 2 * (var(--focus-ring-weight) + var(--focus-outline-offset)));
|
|
2247
|
-
padding-inline: calc(
|
|
2248
|
-
var(--topbar-inset) + var(--focus-ring-weight) + var(--focus-outline-offset)
|
|
2249
|
-
);
|
|
2250
2242
|
overflow-x: auto;
|
|
2251
2243
|
overscroll-behavior-inline: contain;
|
|
2252
2244
|
scrollbar-width: none;
|
|
2253
2245
|
}
|
|
2254
2246
|
|
|
2255
|
-
.ui-topbar[data-overflow="scroll"]:not([data-height]):not(.app-topbar .ui-topbar) {
|
|
2256
|
-
padding-block: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
2257
|
-
}
|
|
2258
|
-
|
|
2259
2247
|
.ui-topbar[data-overflow="scroll"]::-webkit-scrollbar {
|
|
2260
2248
|
display: none;
|
|
2261
2249
|
}
|
|
@@ -471,8 +471,6 @@
|
|
|
471
471
|
overflow-x: auto;
|
|
472
472
|
margin-inline: calc(-1 * var(--space-page-active-x));
|
|
473
473
|
padding-inline: var(--space-page-active-x);
|
|
474
|
-
|
|
475
|
-
padding-block: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
476
474
|
scroll-padding-block: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
|
|
477
475
|
}
|
|
478
476
|
|