@godxjp/ui 32.1.1 → 32.1.3

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` 32.1.1.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 32.1.3.** 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.
@@ -14,7 +14,7 @@
14
14
  "type": "T[]"
15
15
  },
16
16
  {
17
- "description": "Lean column definitions (adapted to TanStack internally — `meta.lean` is the declared home for every custom column option, so `priority` needs no second TanStack channel). Each column: { key: string; header: ReactNode; ariaLabel?: string; render?: (row: T) => ReactNode; sortable?: boolean; width?: string; align?: 'left'|'center'|'right'; hideBelow?: 'sm'|'md'|'lg'|'xl' (same contract as Flex hideBelow — stamped as data-hide-below on th/td); hiddenOnMobile?: boolean (alias for hideBelow:'md'); enableHiding?: boolean; pin?: 'end'; priority?: 'primary'|'secondary'|'meta'|'actions'; flush?: boolean }. flush (gh#1016 — the same word as TableCell flush / CardContent flush) drops the column's BODY cell padding so a self-padded row primitive owns the inset: a selectable list whose single column renders a `ListRow` writes `{ key: 'row', header: '', ariaLabel: …, flush: true, render: (m) => <ListRow asChild …><a/></ListRow> }` — the ListRow then sits 16px from the checkbox (not 32px) and the row is ListRow's own height; an unread ListRow in a flush cell paints `--list-row-unread-background` across the whole table row (checkbox cell included). The header keeps its padding, so the header label sits on the ListRow's inset. Never zero the cell with a className instead. priority is the column-priority contract read by preset=\"action-collection\" — DataTable stamps it as data-priority on the <th> AND every <td> of the column, so the preset can allocate the narrow-frame measure; leave the free-text column unmarked (it takes the remaining space), and prefer priority over width under the preset because an explicit width utility wins the cascade and defeats the measure. If render is omitted, the raw value at row[key] is rendered as a string. sortable opts the column into the sort cycle (client-side by default, or server-side via sort+onSortChange). enableHiding (default true) lists the column in DataTable.ViewOptions; set false to keep a key/actions column always visible. pin:'end' sticks the column (typically row actions) to the inline-end edge on horizontal scroll with a separating shadow — pin at most one column. ariaLabel gives a VISUALLY-EMPTY header (header='' — an action or selection column) a screen-reader name (e.g. 'Actions'/'Select'): it renders as an sr-only label inside the <th> so the column is never nameless (axe: empty-table-header). ANT DESIGN PARITY on the same column: fixed:'start'|'end' freezes the column against a scroll edge (logical, so it mirrors in RTL; the stacking offsets are MEASURED from the rendered header, so several adjacent frozen columns are correct at any width — pin:'end' is the older spelling of fixed:'end'). ellipsis holds the cell to one line and keeps the full value as its title (it also switches the table to table-layout: fixed, without which no ellipsis truncates anything). sorter is antd's richer `sortable`: true | (a, b) => number | { compare, multiple }, where multiple is the MULTI-column sort priority (highest sorts first). sortOrder / defaultSortOrder / sortDirections control and shape the cycle per column, and showSorterTooltip explains the next step. filters + onFilter + filteredValue / defaultFilteredValue / filterMultiple add a real filter menu to the header (filterMultiple: false makes it single-choice); omit onFilter for a server filter and drive it from the table's onFilterChange.",
17
+ "description": "Lean column definitions (adapted to TanStack internally — `meta.lean` is the declared home for every custom column option, so `priority` needs no second TanStack channel). Each column: { key: string; header: ReactNode; ariaLabel?: string; render?: (row: T) => ReactNode; sortable?: boolean; width?: string; align?: 'left'|'center'|'right'; hideBelow?: 'sm'|'md'|'lg'|'xl' (same contract as Flex hideBelow — stamped as data-hide-below on th/td); hiddenOnMobile?: boolean (alias for hideBelow:'md'); enableHiding?: boolean; pin?: 'end'; priority?: 'primary'|'secondary'|'meta'|'actions'; flush?: boolean }. flush (gh#1016 — the same word as TableCell flush / CardContent flush) drops the column's BODY cell padding so a self-padded row primitive owns the inset: a selectable list whose single column renders a `ListRow` writes `{ key: 'row', header: '', ariaLabel: …, flush: true, render: (m) => <ListRow asChild …><a/></ListRow> }` — the ListRow then sits 16px from the checkbox (not 32px) and the row is ListRow's own height; an unread ListRow in a flush cell paints `--list-row-unread-background` across the whole table row (checkbox cell included). The header keeps its padding, so the header label sits on the ListRow's inset. Never zero the cell with a className instead. priority is the column-priority contract read by preset=\"action-collection\" — DataTable stamps it as data-priority on the <th> AND every <td> of the column, so the preset can allocate the narrow-frame measure; leave the free-text column unmarked (it takes the remaining space), and prefer priority over width under the preset because an explicit width utility wins the cascade and defeats the measure. If render is omitted, the raw value at row[key] is rendered as a string. sortable opts the column into the sort cycle (client-side by default, or server-side via sort+onSortChange). enableHiding (default true) lists the column in DataTable.ViewOptions; set false to keep a key/actions column always visible. pin:'end' sticks the column (typically row actions) to the inline-end edge on horizontal scroll with a separating shadow — pin at most one column. ariaLabel gives a VISUALLY-EMPTY header (header='' — an action or selection column) a screen-reader name (e.g. 'Actions'/'Select'): it renders as an sr-only label inside the <th> so the column is never nameless (axe: empty-table-header). ANT DESIGN PARITY on the same column: fixed:'start'|'end' freezes the column against a scroll edge (logical, so it mirrors in RTL; the stacking offsets are MEASURED from the rendered header, so several adjacent frozen columns are correct at any width — pin:'end' is the older spelling of fixed:'end'). ellipsis holds the cell to one line (it also switches the table to table-layout: fixed, without which no ellipsis truncates anything); a cell that IS truncated — rendered cells too — gets a title from its text and a tab stop whose keyboard focus unfolds the text (PatternFly Truncate), and an ellipsis column's HEADER wraps instead of truncating (gh#1262). headerWrap lets any column's header wrap (default true with ellipsis, false otherwise). sorter is antd's richer `sortable`: true | (a, b) => number | { compare, multiple }, where multiple is the MULTI-column sort priority (highest sorts first). sortOrder / defaultSortOrder / sortDirections control and shape the cycle per column, and showSorterTooltip explains the next step. filters + onFilter + filteredValue / defaultFilteredValue / filterMultiple add a real filter menu to the header (filterMultiple: false makes it single-choice); omit onFilter for a server filter and drive it from the table's onFilterChange.",
18
18
  "name": "columns",
19
19
  "required": true,
20
20
  "type": "ColumnDef<T>[]"
@@ -3326,7 +3326,7 @@
3326
3326
  "type": "T[]"
3327
3327
  },
3328
3328
  {
3329
- "description": "Lean column definitions (adapted to TanStack internally — `meta.lean` is the declared home for every custom column option, so `priority` needs no second TanStack channel). Each column: { key: string; header: ReactNode; ariaLabel?: string; render?: (row: T) => ReactNode; sortable?: boolean; width?: string; align?: 'left'|'center'|'right'; hideBelow?: 'sm'|'md'|'lg'|'xl' (same contract as Flex hideBelow — stamped as data-hide-below on th/td); hiddenOnMobile?: boolean (alias for hideBelow:'md'); enableHiding?: boolean; pin?: 'end'; priority?: 'primary'|'secondary'|'meta'|'actions'; flush?: boolean }. flush (gh#1016 — the same word as TableCell flush / CardContent flush) drops the column's BODY cell padding so a self-padded row primitive owns the inset: a selectable list whose single column renders a `ListRow` writes `{ key: 'row', header: '', ariaLabel: …, flush: true, render: (m) => <ListRow asChild …><a/></ListRow> }` — the ListRow then sits 16px from the checkbox (not 32px) and the row is ListRow's own height; an unread ListRow in a flush cell paints `--list-row-unread-background` across the whole table row (checkbox cell included). The header keeps its padding, so the header label sits on the ListRow's inset. Never zero the cell with a className instead. priority is the column-priority contract read by preset=\"action-collection\" — DataTable stamps it as data-priority on the <th> AND every <td> of the column, so the preset can allocate the narrow-frame measure; leave the free-text column unmarked (it takes the remaining space), and prefer priority over width under the preset because an explicit width utility wins the cascade and defeats the measure. If render is omitted, the raw value at row[key] is rendered as a string. sortable opts the column into the sort cycle (client-side by default, or server-side via sort+onSortChange). enableHiding (default true) lists the column in DataTable.ViewOptions; set false to keep a key/actions column always visible. pin:'end' sticks the column (typically row actions) to the inline-end edge on horizontal scroll with a separating shadow — pin at most one column. ariaLabel gives a VISUALLY-EMPTY header (header='' — an action or selection column) a screen-reader name (e.g. 'Actions'/'Select'): it renders as an sr-only label inside the <th> so the column is never nameless (axe: empty-table-header). ANT DESIGN PARITY on the same column: fixed:'start'|'end' freezes the column against a scroll edge (logical, so it mirrors in RTL; the stacking offsets are MEASURED from the rendered header, so several adjacent frozen columns are correct at any width — pin:'end' is the older spelling of fixed:'end'). ellipsis holds the cell to one line and keeps the full value as its title (it also switches the table to table-layout: fixed, without which no ellipsis truncates anything). sorter is antd's richer `sortable`: true | (a, b) => number | { compare, multiple }, where multiple is the MULTI-column sort priority (highest sorts first). sortOrder / defaultSortOrder / sortDirections control and shape the cycle per column, and showSorterTooltip explains the next step. filters + onFilter + filteredValue / defaultFilteredValue / filterMultiple add a real filter menu to the header (filterMultiple: false makes it single-choice); omit onFilter for a server filter and drive it from the table's onFilterChange.",
3329
+ "description": "Lean column definitions (adapted to TanStack internally — `meta.lean` is the declared home for every custom column option, so `priority` needs no second TanStack channel). Each column: { key: string; header: ReactNode; ariaLabel?: string; render?: (row: T) => ReactNode; sortable?: boolean; width?: string; align?: 'left'|'center'|'right'; hideBelow?: 'sm'|'md'|'lg'|'xl' (same contract as Flex hideBelow — stamped as data-hide-below on th/td); hiddenOnMobile?: boolean (alias for hideBelow:'md'); enableHiding?: boolean; pin?: 'end'; priority?: 'primary'|'secondary'|'meta'|'actions'; flush?: boolean }. flush (gh#1016 — the same word as TableCell flush / CardContent flush) drops the column's BODY cell padding so a self-padded row primitive owns the inset: a selectable list whose single column renders a `ListRow` writes `{ key: 'row', header: '', ariaLabel: …, flush: true, render: (m) => <ListRow asChild …><a/></ListRow> }` — the ListRow then sits 16px from the checkbox (not 32px) and the row is ListRow's own height; an unread ListRow in a flush cell paints `--list-row-unread-background` across the whole table row (checkbox cell included). The header keeps its padding, so the header label sits on the ListRow's inset. Never zero the cell with a className instead. priority is the column-priority contract read by preset=\"action-collection\" — DataTable stamps it as data-priority on the <th> AND every <td> of the column, so the preset can allocate the narrow-frame measure; leave the free-text column unmarked (it takes the remaining space), and prefer priority over width under the preset because an explicit width utility wins the cascade and defeats the measure. If render is omitted, the raw value at row[key] is rendered as a string. sortable opts the column into the sort cycle (client-side by default, or server-side via sort+onSortChange). enableHiding (default true) lists the column in DataTable.ViewOptions; set false to keep a key/actions column always visible. pin:'end' sticks the column (typically row actions) to the inline-end edge on horizontal scroll with a separating shadow — pin at most one column. ariaLabel gives a VISUALLY-EMPTY header (header='' — an action or selection column) a screen-reader name (e.g. 'Actions'/'Select'): it renders as an sr-only label inside the <th> so the column is never nameless (axe: empty-table-header). ANT DESIGN PARITY on the same column: fixed:'start'|'end' freezes the column against a scroll edge (logical, so it mirrors in RTL; the stacking offsets are MEASURED from the rendered header, so several adjacent frozen columns are correct at any width — pin:'end' is the older spelling of fixed:'end'). ellipsis holds the cell to one line (it also switches the table to table-layout: fixed, without which no ellipsis truncates anything); a cell that IS truncated — rendered cells too — gets a title from its text and a tab stop whose keyboard focus unfolds the text (PatternFly Truncate), and an ellipsis column's HEADER wraps instead of truncating (gh#1262). headerWrap lets any column's header wrap (default true with ellipsis, false otherwise). sorter is antd's richer `sortable`: true | (a, b) => number | { compare, multiple }, where multiple is the MULTI-column sort priority (highest sorts first). sortOrder / defaultSortOrder / sortDirections control and shape the cycle per column, and showSorterTooltip explains the next step. filters + onFilter + filteredValue / defaultFilteredValue / filterMultiple add a real filter menu to the header (filterMultiple: false makes it single-choice); omit onFilter for a server filter and drive it from the table's onFilterChange.",
3330
3330
  "name": "columns",
3331
3331
  "required": true,
3332
3332
  "type": "ColumnDef<T>[]"
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/v32.1.1/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.1.3/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": "32.1.1"
65
+ "version": "32.1.3"
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: 161 components, 2193 design tokens,
4
- > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.1.1.
4
+ > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.1.3.
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.1`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@32.1.3`). 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/v32.1.1/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v32.1.3/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.
@@ -728,6 +728,7 @@ DataTable.DensityToggle.displayName = "DataTable.DensityToggle";
728
728
  function fixedEdge(col) {
729
729
  return col.fixed ?? (col.pin === "end" ? "end" : void 0);
730
730
  }
731
+ const TRUNCATED_CELL_FOCUSABLE = 'a[href], button, input, select, textarea, [tabindex]:not([tabindex="-1"]), [contenteditable="true"]';
731
732
  function sameOffsets(a, b) {
732
733
  const keys = Object.keys(a);
733
734
  if (keys.length !== Object.keys(b).length) return false;
@@ -910,15 +911,55 @@ DataTable.Content = function DataTableContent() {
910
911
  observer.disconnect();
911
912
  };
912
913
  }, [fixedSignature]);
914
+ const hasEllipsis = !stacked && visibleColumns.some((col) => col.ellipsis);
915
+ const markTruncated = React.useCallback(() => {
916
+ const el = scrollRef.current;
917
+ if (!el) return;
918
+ for (const cell of el.querySelectorAll("tbody td.ui-data-table-ellipsis")) {
919
+ if (cell === document.activeElement) continue;
920
+ const ownTitle = cell.dataset.truncatedTitle !== void 0;
921
+ if (cell.scrollWidth - cell.clientWidth > 1) {
922
+ cell.dataset.truncated = "";
923
+ if (!cell.title || ownTitle) {
924
+ cell.title = (cell.textContent ?? "").replace(/\s+/g, " ").trim();
925
+ cell.dataset.truncatedTitle = "";
926
+ }
927
+ if (!cell.querySelector(TRUNCATED_CELL_FOCUSABLE)) cell.tabIndex = 0;
928
+ } else if (cell.dataset.truncated !== void 0) {
929
+ delete cell.dataset.truncated;
930
+ if (ownTitle) {
931
+ cell.removeAttribute("title");
932
+ delete cell.dataset.truncatedTitle;
933
+ }
934
+ cell.removeAttribute("tabindex");
935
+ }
936
+ }
937
+ }, []);
938
+ React.useEffect(() => {
939
+ if (hasEllipsis) markTruncated();
940
+ });
941
+ React.useEffect(() => {
942
+ const el = scrollRef.current;
943
+ if (!hasEllipsis || !el) return;
944
+ const observer = new ResizeObserver(markTruncated);
945
+ observer.observe(el);
946
+ if (el.firstElementChild) observer.observe(el.firstElementChild);
947
+ const refold = () => requestAnimationFrame(markTruncated);
948
+ el.addEventListener("focusout", refold);
949
+ return () => {
950
+ observer.disconnect();
951
+ el.removeEventListener("focusout", refold);
952
+ };
953
+ }, [hasEllipsis, markTruncated]);
913
954
  const fixedCellProps = (key, edge) => edge ? { "data-column-key": key, "data-fixed": edge } : { "data-column-key": key };
914
955
  const leadingFixedStyle = (key) => leadingFixed ? { "--table-fixed-offset": fixedOffsets[key] ?? 0 } : void 0;
915
- const columnCellClass = (col) => {
956
+ const columnCellClass = (col, part = "body") => {
916
957
  const edge = fixedEdge(col);
917
958
  return cn(
918
959
  columnWidth(col.width).className,
919
960
  col.align === "right" && "text-end",
920
961
  col.align === "center" && "text-center",
921
- col.ellipsis && "ui-data-table-ellipsis",
962
+ part === "body" && col.ellipsis && "ui-data-table-ellipsis",
922
963
  edge === "end" && "ui-data-table-pin-end",
923
964
  edge === "start" && "ui-data-table-pin-start"
924
965
  );
@@ -1071,8 +1112,9 @@ DataTable.Content = function DataTableContent() {
1071
1112
  ...fixedCellProps(col.key, fixedEdge(col)),
1072
1113
  ...columnHideBelowProps(col),
1073
1114
  style: columnCellStyle(col),
1115
+ wrap: col.headerWrap ?? Boolean(col.ellipsis),
1074
1116
  className: cn(
1075
- columnCellClass(col),
1117
+ columnCellClass(col, "header"),
1076
1118
  // `headerAlign` when the heading differs from the rows,
1077
1119
  // `align` otherwise. A table wanting centred headings
1078
1120
  // over start-aligned text could not say so before, and
@@ -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.1",
3
+ "version": "32.1.3",
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,
@@ -79,10 +79,18 @@ export type ColumnDefProp<T> = {
79
79
  */
80
80
  fixed?: ColumnFixedProp;
81
81
  /**
82
- * Hold the cell to ONE line and truncate the overflow (antd `ColumnType.ellipsis`). The full text
83
- * is kept reachable as the cell's `title`, so nothing is silently lost.
82
+ * Hold the cell to ONE line and truncate the overflow (antd `ColumnType.ellipsis`). A cell that
83
+ * IS truncated keeps its full text reachable: as its `title` (rendered cells too, from the
84
+ * cell's text — antd `ellipsis.showTitle`), and as a tab stop that unfolds the text on keyboard
85
+ * focus (PatternFly `Truncate`). The header is never truncated: it wraps (see `headerWrap`).
84
86
  */
85
87
  ellipsis?: boolean;
88
+ /**
89
+ * Let the column HEADER wrap onto further lines instead of holding one (`TableHead wrap`).
90
+ * Defaults to `true` for an `ellipsis` column — a narrow column's heading must stay readable —
91
+ * and `false` otherwise, where headings keep one line.
92
+ */
93
+ headerWrap?: boolean;
86
94
  /**
87
95
  * The cell's CONTENT owns its inset (the same contract as `TableCell flush`): the column's body
88
96
  * cells drop their padding so a self-padded row primitive — a `ListRow` in a selectable list —
@@ -6,6 +6,7 @@
6
6
  .ui-focus-ring-outline,
7
7
  [data-interactive] > [data-slot="table-cell"] a[href],
8
8
  [data-interactive] > [data-slot="table-cell"] button,
9
+ .ui-data-table-ellipsis[data-truncated],
9
10
  .ui-input,
10
11
  .ui-control,
11
12
  .ui-control-multiline,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "32.1.1",
2
+ "version": "32.1.3",
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",
@@ -529,11 +529,17 @@
529
529
  }
530
530
 
531
531
  .ui-data-table-ellipsis {
532
- overflow: hidden;
532
+ overflow: clip;
533
+ overflow-clip-margin: var(--focus-ring-clip-margin);
533
534
  text-overflow: ellipsis;
534
535
  white-space: nowrap;
535
536
  }
536
537
 
538
+ .ui-data-table-ellipsis[data-truncated]:focus-visible {
539
+ white-space: normal;
540
+ overflow-wrap: anywhere;
541
+ }
542
+
537
543
  .ui-data-table-surface[data-table-layout="fixed"] [data-slot="table"] {
538
544
  table-layout: fixed;
539
545
  }