@godxjp/ui 33.12.1 → 33.12.4

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.
@@ -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.1.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 33.12.4.** 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.1/agent/index.json"
57
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v33.12.4/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.1"
71
+ "version": "33.12.4"
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.1.
4
+ > 44 cardinal rules. This file is the entry point for AI agents. Catalog version 33.12.4.
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.1`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@33.12.4`). 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.1/agent/...`. A catalog that does not match the installed
30
+ the tag: `.../godx-jp/godxjp-ui/v33.12.4/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
@@ -666,7 +666,7 @@
666
666
  "value": "var(--focus-outline-offset)"
667
667
  },
668
668
  {
669
- "description": "Inside clipping surfaces, preserve the mark and gap without changing layout.",
669
+ "description": "Opt-in for individual clipped focus carriers, never inherited from containers.",
670
670
  "name": "--focus-ring-inset-offset",
671
671
  "tier": "foundation",
672
672
  "value": "calc(-1 * (var(--focus-ring-width) + var(--focus-outline-offset)))"
@@ -10074,10 +10074,10 @@
10074
10074
  "value": "var(--space-2)"
10075
10075
  },
10076
10076
  {
10077
- "description": "Room for the shared inset focus mark and gap, including handles without a grip.",
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(--space-2)"
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).",
@@ -4,7 +4,7 @@ export declare function ResizablePanelGroup({ className, ...props }: React.Compo
4
4
  export declare namespace ResizablePanelGroup {
5
5
  var displayName: string;
6
6
  }
7
- export declare function ResizablePanel({ className, elementRef, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Panel>): React.JSX.Element;
7
+ export declare function ResizablePanel({ className, elementRef, onFocusCapture, ...props }: React.ComponentPropsWithoutRef<typeof ResizablePrimitive.Panel>): React.JSX.Element;
8
8
  export declare namespace ResizablePanel {
9
9
  var displayName: string;
10
10
  }
@@ -2,6 +2,7 @@
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import * as ResizablePrimitive from "react-resizable-panels";
5
+ import { revealKeyboardFocus } from "../../lib/focus-reveal.js";
5
6
  import { cn } from "../../lib/utils.js";
6
7
  import { useScrollableRegionTabIndex } from "../../lib/hooks.js";
7
8
  const ResizablePanelGroup = ({
@@ -19,6 +20,7 @@ ResizablePanelGroup.displayName = "ResizablePanelGroup";
19
20
  const ResizablePanel = ({
20
21
  className,
21
22
  elementRef,
23
+ onFocusCapture,
22
24
  ...props
23
25
  }) => {
24
26
  const [scrollRegion, setScrollRegion] = React.useState(null);
@@ -39,7 +41,11 @@ const ResizablePanel = ({
39
41
  "data-slot": "resizable-panel",
40
42
  className: cn("ui-resizable-panel", className),
41
43
  elementRef: setRootElement,
42
- ...props
44
+ ...props,
45
+ onFocusCapture: (event) => {
46
+ revealKeyboardFocus(event, scrollRegion ?? event.currentTarget);
47
+ onFocusCapture?.(event);
48
+ }
43
49
  }
44
50
  );
45
51
  };
@@ -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.1",
3
+ "version": "33.12.4",
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,
@@ -2,4 +2,4 @@ import type { FocusEvent } from "react";
2
2
  /** Native Tab scrolling can leave a partially visible control clipped (Chromium).
3
3
  * Reveal keyboard targets that fit inside a scroll viewport, without moving oversized
4
4
  * rows, changing layout, or scrolling on pointer focus. */
5
- export declare function revealKeyboardFocus(event: FocusEvent<HTMLElement>): void;
5
+ export declare function revealKeyboardFocus(event: FocusEvent<HTMLElement>, viewport?: EventTarget & HTMLElement): void;
@@ -1,10 +1,19 @@
1
- function revealKeyboardFocus(event) {
2
- const viewport = event.currentTarget;
1
+ function revealKeyboardFocus(event, viewport = event.currentTarget) {
3
2
  const target = event.target;
4
3
  if (!(target instanceof HTMLElement) || target === viewport || !viewport.contains(target) || !target.matches(":focus-visible"))
5
4
  return;
6
5
  const carrier = target.closest(".ui-tag-input,.ui-control-composite-field") ?? target;
7
- const box = carrier.getBoundingClientRect();
6
+ const rect = carrier.getBoundingClientRect();
7
+ const focus = getComputedStyle(carrier);
8
+ const extent = focus.outlineStyle === "none" ? 0 : Math.max(0, parseFloat(focus.outlineWidth) + parseFloat(focus.outlineOffset));
9
+ const box = {
10
+ left: rect.left - extent,
11
+ right: rect.right + extent,
12
+ top: rect.top - extent,
13
+ bottom: rect.bottom + extent,
14
+ width: rect.width + 2 * extent,
15
+ height: rect.height + 2 * extent
16
+ };
8
17
  const frame = viewport.getBoundingClientRect();
9
18
  const left = frame.left + viewport.clientLeft;
10
19
  const top = frame.top + viewport.clientTop;
@@ -13,6 +22,24 @@ function revealKeyboardFocus(event) {
13
22
  const outsideY = /auto|scroll/.test(style.overflowY) && box.height <= viewport.clientHeight && (box.top < top || box.bottom > top + viewport.clientHeight);
14
23
  if (outsideX || outsideY)
15
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
+ }
16
43
  }
17
44
  export {
18
45
  revealKeyboardFocus
@@ -28,6 +28,19 @@
28
28
  overflow: hidden;
29
29
  }
30
30
 
31
+ [data-slot="card"]:focus-within,
32
+ [data-slot="card"]:has([data-slot="card-header"][data-banded]):focus-within {
33
+ overflow: clip;
34
+ overflow-clip-margin: var(--focus-ring-clip-margin);
35
+ }
36
+
37
+ @supports not (overflow-clip-margin: 1px) {
38
+ [data-slot="card"]:focus-within,
39
+ [data-slot="card"]:has([data-slot="card-header"][data-banded]):focus-within {
40
+ overflow: visible;
41
+ }
42
+ }
43
+
31
44
  button[data-slot="card"] {
32
45
  text-align: inherit;
33
46
  }
@@ -1108,6 +1108,7 @@
1108
1108
  @layer components {
1109
1109
 
1110
1110
  .ui-scroll-area {
1111
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
1111
1112
  position: relative;
1112
1113
  scrollbar-width: var(--scroll-area-scrollbar-width);
1113
1114
  scrollbar-color: var(--scroll-area-thumb-color, hsl(var(--border)))
@@ -700,6 +700,7 @@
700
700
  }
701
701
 
702
702
  .ui-branch-scope-picker-list {
703
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
703
704
  max-block-size: var(--branch-scope-picker-list-max-height);
704
705
  overflow-y: auto;
705
706
  }
@@ -101,6 +101,7 @@
101
101
  var(--focus-ring-opacity, 1)
102
102
  );
103
103
  outline-offset: var(--focus-ring-contained-offset, var(--focus-ring-offset));
104
+ scroll-margin: calc(var(--focus-ring-width) + var(--focus-outline-offset));
104
105
 
105
106
  transition:
106
107
  outline-offset 0s,
@@ -224,35 +225,80 @@
224
225
  --focus-ring-opacity: var(--topbar-icon-focus-ring-alpha);
225
226
  }
226
227
 
228
+ .ui-scroll-area [data-slot="anchor-link"],
227
229
  a.ui-list-row,
228
230
  tr.ui-focus-ring,
229
231
  .sb-nav-item,
230
232
  .ui-app-setting-picker-icon[data-appearance="bar"],
231
- .ui-legal-document-toc-link,
232
- [data-slot="anchor-link"] {
233
+ .ui-legal-document-toc-link {
233
234
  --focus-ring-offset: calc(-1 * var(--focus-ring-width));
234
235
  }
235
236
 
236
237
  :is(
237
- .ui-pagination,
238
- .ui-pagination-list,
239
- [data-slot="card"],
240
- [data-slot="tabs-list"],
241
- .ui-topbar,
242
- .app-topbar,
243
- .ui-anchor-list,
244
- .app-main,
245
- .ui-data-table-scroll,
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,
246
+ .ui-mobile-shell-tabbar .ui-button--ghost,
247
+ [data-slot="tabs-list"] [role="tab"],
248
+ [data-slot="tabs-list"] .ui-tabs-add,
249
+ .ui-app-setting-picker-icon[data-appearance="bar"],
250
+ .ui-legal-document-rail .ui-legal-document-toc-link,
251
+ .ui-table-scroll [data-slot="table-cell"] .ui-button--ghost,
252
+ .ui-data-table-scroll [data-slot="table-cell"] .ui-button--ghost,
253
+ .ui-search-select-value-remove,
254
+ .ui-table-scroll tr.ui-focus-ring,
255
+ .ui-data-table-scroll tr.ui-focus-ring,
256
+ .ui-resizable-handle,
246
257
  .ui-scroll-area,
247
258
  .ui-table-scroll,
248
- .ui-mobile-shell,
249
- .ui-resizable-panel-group,
250
- .ui-legal-document-rail,
251
- .ui-command-input-wrapper,
252
- .ui-attachments
253
- ) {
259
+ .ui-data-table-scroll,
260
+ .ui-resizable-panel
261
+ ):focus-visible {
254
262
  --focus-ring-contained-offset: var(--focus-ring-inset-offset);
263
+ }
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
+ }
255
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
+ );
256
302
  }
257
303
 
258
304
  .ui-accordion-trigger {
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "33.12.1",
2
+ "version": "33.12.4",
3
3
  "generatedBy": "scripts/gen-style-layers.mjs — do not edit by hand; run `pnpm gen:style-layers`",
4
4
  "base": "base.css",
5
5
  "fonts": "fonts.css",
@@ -642,6 +642,7 @@
642
642
  }
643
643
 
644
644
  .ui-resizable-panel {
645
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
645
646
  min-height: 0;
646
647
  min-width: 0;
647
648
  }
@@ -1385,6 +1386,7 @@
1385
1386
  }
1386
1387
 
1387
1388
  .ui-pagination-list {
1389
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
1388
1390
  display: flex;
1389
1391
  min-width: 0;
1390
1392
  align-items: center;
@@ -1701,6 +1703,7 @@
1701
1703
  }
1702
1704
 
1703
1705
  .ui-legal-document-rail {
1706
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
1704
1707
  display: flex;
1705
1708
  flex-direction: column;
1706
1709
  gap: var(--legal-document-nav-gap);
@@ -493,6 +493,7 @@
493
493
  }
494
494
 
495
495
  .ui-pagination {
496
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
496
497
  max-inline-size: 100%;
497
498
  overflow-x: auto;
498
499
  scrollbar-width: thin;
@@ -1402,6 +1403,7 @@
1402
1403
  }
1403
1404
 
1404
1405
  .ui-anchor[data-direction="horizontal"] .ui-anchor-list {
1406
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
1405
1407
  display: flex;
1406
1408
  gap: var(--anchor-gap);
1407
1409
 
@@ -277,6 +277,7 @@
277
277
  }
278
278
 
279
279
  .app-main {
280
+ scroll-padding: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
280
281
  grid-area: main;
281
282
  min-width: 0;
282
283
  overflow: auto;
@@ -358,6 +358,17 @@
358
358
  saturate(var(--surface-backdrop-saturate, 160%));
359
359
  }
360
360
 
361
+ .ui-data-table-surface:focus-within {
362
+ overflow: clip;
363
+ overflow-clip-margin: var(--focus-ring-clip-margin);
364
+ }
365
+
366
+ @supports not (overflow-clip-margin: 1px) {
367
+ .ui-data-table-surface:focus-within {
368
+ overflow: visible;
369
+ }
370
+ }
371
+
361
372
  .ui-data-table-surface[data-preset="action-collection"] {
362
373
  min-inline-size: 0;
363
374
  }
@@ -460,6 +471,7 @@
460
471
  overflow-x: auto;
461
472
  margin-inline: calc(-1 * var(--space-page-active-x));
462
473
  padding-inline: var(--space-page-active-x);
474
+ scroll-padding-block: calc(var(--focus-ring-weight) + var(--focus-outline-offset));
463
475
  }
464
476
 
465
477
  .ui-data-table-scroll::after {