@godxjp/ui 31.31.4 → 31.31.6
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-display/popover.js +25 -1
- package/dist/components/data-display/table.js +11 -2
- package/dist/components/data-entry/search-select.js +0 -1
- package/dist/contracts/measurement.json +1 -1
- package/dist/styles/layers.json +1 -1
- package/dist/styles/table-layout.css +32 -4
- package/dist/tokens/components/table.css +1 -1
- 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` 31.31.
|
|
6
|
+
**This catalog describes `@godxjp/ui` 31.31.6.** 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
|
@@ -48,7 +48,7 @@
|
|
|
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/v31.31.
|
|
51
|
+
"pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v31.31.6/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",
|
|
@@ -62,5 +62,5 @@
|
|
|
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": "31.31.
|
|
65
|
+
"version": "31.31.6"
|
|
66
66
|
}
|
package/agent/llms.txt
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @godxjp/ui
|
|
2
2
|
|
|
3
3
|
> A Japanese-enterprise React design system: 185 components, 2188 design tokens,
|
|
4
|
-
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.31.
|
|
4
|
+
> 50 cardinal rules. This file is the entry point for AI agents. Catalog version 31.31.6.
|
|
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@31.31.
|
|
7
|
+
(`npx @godxjp/ui-mcp@31.31.6`). It is searchable and version-locked. These files exist for agents
|
|
8
8
|
that can only fetch URLs.
|
|
9
9
|
|
|
10
10
|
## Start
|
|
@@ -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/v31.31.
|
|
29
|
+
the tag: `.../godx-jp/godxjp-ui/v31.31.6/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
|
@@ -12204,10 +12204,10 @@
|
|
|
12204
12204
|
"value": "var(--table-row-height-compact)"
|
|
12205
12205
|
},
|
|
12206
12206
|
{
|
|
12207
|
-
"description": "Compact-tier LEGIBILITY FLOOR — the measure below which the preset stops fitting the table to its container and lets the scroll region it already owns take over. The percentage budget above is sized for ONE column per priority tier plus one free-text column. A queue that repeats a tier — two `secondary` columns, three `meta` columns, or an unmarked column beside them — asks for more than 100%, and under `table-layout: fixed` the surplus is taken out of the columns rather than out of the table: measured on a seven-column Japanese admin queue at 390, every column landed at 44–59px and CJK labels wrapped at ONE to TWO characters per line (dxs-platform/platform#680). That is a WCAG 2.2 SC 1.4.10 Reflow (AA) failure, and it is the failure mode this floor removes. Scrolling is the correct escape, not a concession: SC 1.4.10 exempts \"parts of the content which require two-dimensional layout for usage or meaning\", and its own note names data tables as the example. A table that scrolls horizontally inside its card conforms; a table whose cells are one character wide does not. Default `0` so nothing changes for any existing consumer: a queue that fits its priority budget keeps fitting. A consumer whose queue carries more columns than the budget sets this to the measure at which its narrowest column is still readable (roughly 5rem per column for Japanese at the compact type tier) and the table scrolls instead of crushing.",
|
|
12207
|
+
"description": "Compact-tier LEGIBILITY FLOOR — the measure below which the preset stops fitting the table to its container and lets the scroll region it already owns take over. The percentage budget above is sized for ONE column per priority tier plus one free-text column. A queue that repeats a tier — two `secondary` columns, three `meta` columns, or an unmarked column beside them — asks for more than 100%, and under `table-layout: fixed` the surplus is taken out of the columns rather than out of the table: measured on a seven-column Japanese admin queue at 390, every column landed at 44–59px and CJK labels wrapped at ONE to TWO characters per line (dxs-platform/platform#680). That is a WCAG 2.2 SC 1.4.10 Reflow (AA) failure, and it is the failure mode this floor removes. Scrolling is the correct escape, not a concession: SC 1.4.10 exempts \"parts of the content which require two-dimensional layout for usage or meaning\", and its own note names data tables as the example. A table that scrolls horizontally inside its card conforms; a table whose cells are one character wide does not. Default `0` so nothing changes for any existing consumer: a queue that fits its priority budget keeps fitting. A consumer whose queue carries more columns than the budget sets this to the measure at which its narrowest column is still readable (roughly 5rem per column for Japanese at the compact type tier) and the table scrolls instead of crushing. A LENGTH (`0px`, not `0`): the stylesheet adds a measured actions width to it (gh#1207), and `calc(0 + 34px)` is invalid.",
|
|
12208
12208
|
"name": "--table-action-collection-min-inline-size-compact",
|
|
12209
12209
|
"tier": "component",
|
|
12210
|
-
"value": "
|
|
12210
|
+
"value": "0px"
|
|
12211
12211
|
},
|
|
12212
12212
|
{
|
|
12213
12213
|
"description": "Table · stacked-record-collection preset (gh#293 restore — SCR-215) — the canonical WIDE, heterogeneous record collection. Below the collapse step every `<tr>` becomes a bordered key-value card; these tokens own the card's own geometry (unlike action-collection, there is no column-priority measure to retune — the whole row becomes one block).",
|
|
@@ -157,6 +157,30 @@ function PopoverContent({
|
|
|
157
157
|
const openAutoFocusRef = React.useRef(onOpenAutoFocus);
|
|
158
158
|
openAutoFocusRef.current = onOpenAutoFocus;
|
|
159
159
|
useOverlayCloseFocus(root.open, onCloseAutoFocus, contentRef);
|
|
160
|
+
const scrollAtOpenRef = React.useRef(/* @__PURE__ */ new Map());
|
|
161
|
+
const { open: isOpen, triggerRef: openTriggerRef, anchorRef: openAnchorRef } = root;
|
|
162
|
+
React.useLayoutEffect(() => {
|
|
163
|
+
const offsets = scrollAtOpenRef.current;
|
|
164
|
+
offsets.clear();
|
|
165
|
+
if (!isOpen) return;
|
|
166
|
+
const start = (root.anchored ? openAnchorRef : openTriggerRef).current;
|
|
167
|
+
for (let el = start ?? null; el; el = el.parentElement) {
|
|
168
|
+
offsets.set(el, [el.scrollTop, el.scrollLeft]);
|
|
169
|
+
}
|
|
170
|
+
const page = document.scrollingElement;
|
|
171
|
+
if (page) offsets.set(page, [page.scrollTop, page.scrollLeft]);
|
|
172
|
+
}, [isOpen, root.anchored, openAnchorRef, openTriggerRef]);
|
|
173
|
+
const onAriaOpenChange = (next) => {
|
|
174
|
+
const event = typeof window === "undefined" ? void 0 : window.event;
|
|
175
|
+
if (!next && event?.type === "scroll") {
|
|
176
|
+
const target = event.target === document ? document.scrollingElement : event.target;
|
|
177
|
+
const at = target instanceof Element ? scrollAtOpenRef.current.get(target) : void 0;
|
|
178
|
+
if (at && target instanceof Element && target.scrollTop === at[0] && target.scrollLeft === at[1]) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
root.setOpen(next);
|
|
183
|
+
};
|
|
160
184
|
React.useEffect(() => {
|
|
161
185
|
if (!root.open) return;
|
|
162
186
|
const node = contentRef.current;
|
|
@@ -191,7 +215,7 @@ function PopoverContent({
|
|
|
191
215
|
{
|
|
192
216
|
UNSTABLE_portalContainer: overlayPortalContainer,
|
|
193
217
|
isOpen: root.open,
|
|
194
|
-
onOpenChange:
|
|
218
|
+
onOpenChange: onAriaOpenChange,
|
|
195
219
|
isNonModal: root.isNonModal,
|
|
196
220
|
triggerRef: root.anchored ? root.anchorRef : root.triggerRef,
|
|
197
221
|
placement: toPlacement(side, align),
|
|
@@ -23,8 +23,17 @@ function useActionsColumnFit(ref, enabled) {
|
|
|
23
23
|
if (!cell) return;
|
|
24
24
|
const style = getComputedStyle(cell);
|
|
25
25
|
const inset = parseFloat(style.paddingInlineStart) + parseFloat(style.paddingInlineEnd);
|
|
26
|
-
const
|
|
27
|
-
measuredWidths.set(content, width);
|
|
26
|
+
const rect = content.getBoundingClientRect();
|
|
27
|
+
measuredWidths.set(content, rect.width);
|
|
28
|
+
let start = rect.left;
|
|
29
|
+
let end = rect.right;
|
|
30
|
+
content.querySelectorAll("*").forEach((child) => {
|
|
31
|
+
const r = child.getBoundingClientRect();
|
|
32
|
+
if (r.width === 0) return;
|
|
33
|
+
start = Math.min(start, r.left);
|
|
34
|
+
end = Math.max(end, r.right);
|
|
35
|
+
});
|
|
36
|
+
const width = end - start;
|
|
28
37
|
if (width <= cell.clientWidth + 0.5) return;
|
|
29
38
|
const edges = style.boxSizing === "border-box" ? inset + parseFloat(style.borderInlineStartWidth) + parseFloat(style.borderInlineEndWidth) : 0;
|
|
30
39
|
needed = Math.max(needed, Math.ceil(width + edges));
|
|
@@ -571,7 +571,6 @@ function SearchSelect(props) {
|
|
|
571
571
|
/* @__PURE__ */ jsx("div", { className: "ui-search-select-search", children: /* @__PURE__ */ jsx(
|
|
572
572
|
Input,
|
|
573
573
|
{
|
|
574
|
-
autoFocus: true,
|
|
575
574
|
"aria-controls": listId,
|
|
576
575
|
"aria-autocomplete": "list",
|
|
577
576
|
"aria-activedescendant": activeOptionId,
|
|
@@ -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": "31.31.
|
|
3
|
+
"version": "31.31.6",
|
|
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/layers.json
CHANGED
|
@@ -756,7 +756,14 @@
|
|
|
756
756
|
--table-cell-padding-y: var(--table-action-collection-cell-padding-y-compact);
|
|
757
757
|
font-size: var(--table-action-collection-font-size-compact);
|
|
758
758
|
|
|
759
|
-
min-inline-size:
|
|
759
|
+
min-inline-size: calc(
|
|
760
|
+
var(--table-action-collection-min-inline-size-compact) +
|
|
761
|
+
max(
|
|
762
|
+
0px,
|
|
763
|
+
var(--table-action-collection-actions-content-width, 0px) -
|
|
764
|
+
var(--table-action-collection-actions-width)
|
|
765
|
+
)
|
|
766
|
+
);
|
|
760
767
|
}
|
|
761
768
|
|
|
762
769
|
[data-collapse-below="sm"] [data-slot="table-cell"] * {
|
|
@@ -795,7 +802,14 @@
|
|
|
795
802
|
--table-cell-padding-y: var(--table-action-collection-cell-padding-y-compact);
|
|
796
803
|
font-size: var(--table-action-collection-font-size-compact);
|
|
797
804
|
|
|
798
|
-
min-inline-size:
|
|
805
|
+
min-inline-size: calc(
|
|
806
|
+
var(--table-action-collection-min-inline-size-compact) +
|
|
807
|
+
max(
|
|
808
|
+
0px,
|
|
809
|
+
var(--table-action-collection-actions-content-width, 0px) -
|
|
810
|
+
var(--table-action-collection-actions-width)
|
|
811
|
+
)
|
|
812
|
+
);
|
|
799
813
|
}
|
|
800
814
|
|
|
801
815
|
[data-collapse-below="md"] [data-slot="table-cell"] * {
|
|
@@ -834,7 +848,14 @@
|
|
|
834
848
|
--table-cell-padding-y: var(--table-action-collection-cell-padding-y-compact);
|
|
835
849
|
font-size: var(--table-action-collection-font-size-compact);
|
|
836
850
|
|
|
837
|
-
min-inline-size:
|
|
851
|
+
min-inline-size: calc(
|
|
852
|
+
var(--table-action-collection-min-inline-size-compact) +
|
|
853
|
+
max(
|
|
854
|
+
0px,
|
|
855
|
+
var(--table-action-collection-actions-content-width, 0px) -
|
|
856
|
+
var(--table-action-collection-actions-width)
|
|
857
|
+
)
|
|
858
|
+
);
|
|
838
859
|
}
|
|
839
860
|
|
|
840
861
|
[data-collapse-below="lg"] [data-slot="table-cell"] * {
|
|
@@ -873,7 +894,14 @@
|
|
|
873
894
|
--table-cell-padding-y: var(--table-action-collection-cell-padding-y-compact);
|
|
874
895
|
font-size: var(--table-action-collection-font-size-compact);
|
|
875
896
|
|
|
876
|
-
min-inline-size:
|
|
897
|
+
min-inline-size: calc(
|
|
898
|
+
var(--table-action-collection-min-inline-size-compact) +
|
|
899
|
+
max(
|
|
900
|
+
0px,
|
|
901
|
+
var(--table-action-collection-actions-content-width, 0px) -
|
|
902
|
+
var(--table-action-collection-actions-width)
|
|
903
|
+
)
|
|
904
|
+
);
|
|
877
905
|
}
|
|
878
906
|
|
|
879
907
|
[data-collapse-below="xl"] [data-slot="table-cell"] * {
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
--table-action-collection-cell-padding-y-compact: var(--space-2);
|
|
80
80
|
--table-action-collection-row-height-compact: var(--table-row-height-compact);
|
|
81
81
|
|
|
82
|
-
--table-action-collection-min-inline-size-compact:
|
|
82
|
+
--table-action-collection-min-inline-size-compact: 0px;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
:root {
|