@godxjp/ui 32.1.2 → 32.2.0

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.2.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 32.2.0.** 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>[]"
@@ -37,6 +37,11 @@
37
37
  "name": "mouseLeaveDelay",
38
38
  "type": "number"
39
39
  },
40
+ {
41
+ "description": "On the ROOT. A page-level key that OPENS the menu — `\"f\"` for a filter menu, `\"mod+shift+v\"` for a view menu (gh#1264). Same combo syntax and guard as SearchInput/CommandPalette: a bare key is ignored while focus is in an editable element or an IME is composing. Off by default; ignored while `disabled`. Show the key in the trigger (e.g. with `DropdownMenuShortcut`) so it is discoverable.",
42
+ "name": "shortcut",
43
+ "type": "string"
44
+ },
40
45
  {
41
46
  "description": "Open-state change handler (Ant Design `onOpenChange`).",
42
47
  "name": "onOpenChange",
@@ -70,7 +70,7 @@
70
70
  },
71
71
  {
72
72
  "defaultValue": "false",
73
- "description": "A global shortcut that FOCUSES the field (gh#1250). `false` (default) binds none — two search boxes on one page must not fight over one key; `true` is ⌘K on Apple platforms and Ctrl+K elsewhere (never both, so Ctrl+K keeps its editing meaning on a Mac); a combo string (`\"mod+/\"`, `\"mod+shift+f\"`) is read exactly as CommandPalette `shortcut`. A trailing aria-hidden key cap shows the combo while the field is empty — the clear ✕ takes the slot once there is text. Never fires during IME composition, nor while `disabled`.",
73
+ "description": "A global shortcut that FOCUSES the field (gh#1250). `false` (default) binds none — two search boxes on one page must not fight over one key; `true` is ⌘K on Apple platforms and Ctrl+K elsewhere (never both, so Ctrl+K keeps its editing meaning on a Mac); a combo string (`\"mod+/\"`, `\"mod+shift+f\"`) is read exactly as CommandPalette `shortcut`. A trailing aria-hidden key cap shows the combo while the field is empty — the clear ✕ takes the slot once there is text. Never fires during IME composition, nor while `disabled`. A BARE key (`\"/\"`) is ignored while focus is in an editable element or an IME is composing, so it stays text there; a modified combo (`mod+k`) still fires from a field (gh#1264).",
74
74
  "name": "shortcut",
75
75
  "type": "boolean | string"
76
76
  },
@@ -79,6 +79,17 @@
79
79
  "name": "error",
80
80
  "type": "ReactNode"
81
81
  },
82
+ {
83
+ "defaultValue": "\"label\"",
84
+ "description": "How the clear-all button shows itself (gh#1264). `label` is ✕ + the localized \"Clear filters\"; `icon` is the ✕ alone — same accessible name, a tooltip with the text, a control-height square instead of ~150px — so a bar with a few active filters keeps one row.",
85
+ "name": "clearDisplay",
86
+ "type": "\"label\" | \"icon\""
87
+ },
88
+ {
89
+ "description": "Typed model — the saved-VIEW switcher rendered ABOVE the filter strip (e.g. `<Tabs>` of Open / Mine / All), the GitHub/Linear layout (gh#1264). A view selects a whole filter set, so it is not one more filter inside the strip; do not pass view tabs as children.",
90
+ "name": "views",
91
+ "type": "ReactNode"
92
+ },
82
93
  {
83
94
  "description": "Extra classes on the root element.",
84
95
  "name": "className",
@@ -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>[]"
@@ -6245,7 +6245,7 @@
6245
6245
  },
6246
6246
  {
6247
6247
  "defaultValue": "false",
6248
- "description": "A global shortcut that FOCUSES the field (gh#1250). `false` (default) binds none — two search boxes on one page must not fight over one key; `true` is ⌘K on Apple platforms and Ctrl+K elsewhere (never both, so Ctrl+K keeps its editing meaning on a Mac); a combo string (`\"mod+/\"`, `\"mod+shift+f\"`) is read exactly as CommandPalette `shortcut`. A trailing aria-hidden key cap shows the combo while the field is empty — the clear ✕ takes the slot once there is text. Never fires during IME composition, nor while `disabled`.",
6248
+ "description": "A global shortcut that FOCUSES the field (gh#1250). `false` (default) binds none — two search boxes on one page must not fight over one key; `true` is ⌘K on Apple platforms and Ctrl+K elsewhere (never both, so Ctrl+K keeps its editing meaning on a Mac); a combo string (`\"mod+/\"`, `\"mod+shift+f\"`) is read exactly as CommandPalette `shortcut`. A trailing aria-hidden key cap shows the combo while the field is empty — the clear ✕ takes the slot once there is text. Never fires during IME composition, nor while `disabled`. A BARE key (`\"/\"`) is ignored while focus is in an editable element or an IME is composing, so it stays text there; a modified combo (`mod+k`) still fires from a field (gh#1264).",
6249
6249
  "name": "shortcut",
6250
6250
  "type": "boolean | string"
6251
6251
  },
@@ -8300,6 +8300,11 @@
8300
8300
  "name": "mouseLeaveDelay",
8301
8301
  "type": "number"
8302
8302
  },
8303
+ {
8304
+ "description": "On the ROOT. A page-level key that OPENS the menu — `\"f\"` for a filter menu, `\"mod+shift+v\"` for a view menu (gh#1264). Same combo syntax and guard as SearchInput/CommandPalette: a bare key is ignored while focus is in an editable element or an IME is composing. Off by default; ignored while `disabled`. Show the key in the trigger (e.g. with `DropdownMenuShortcut`) so it is discoverable.",
8305
+ "name": "shortcut",
8306
+ "type": "string"
8307
+ },
8303
8308
  {
8304
8309
  "description": "Open-state change handler (Ant Design `onOpenChange`).",
8305
8310
  "name": "onOpenChange",
@@ -8544,6 +8549,17 @@
8544
8549
  "name": "error",
8545
8550
  "type": "ReactNode"
8546
8551
  },
8552
+ {
8553
+ "defaultValue": "\"label\"",
8554
+ "description": "How the clear-all button shows itself (gh#1264). `label` is ✕ + the localized \"Clear filters\"; `icon` is the ✕ alone — same accessible name, a tooltip with the text, a control-height square instead of ~150px — so a bar with a few active filters keeps one row.",
8555
+ "name": "clearDisplay",
8556
+ "type": "\"label\" | \"icon\""
8557
+ },
8558
+ {
8559
+ "description": "Typed model — the saved-VIEW switcher rendered ABOVE the filter strip (e.g. `<Tabs>` of Open / Mine / All), the GitHub/Linear layout (gh#1264). A view selects a whole filter set, so it is not one more filter inside the strip; do not pass view tabs as children.",
8560
+ "name": "views",
8561
+ "type": "ReactNode"
8562
+ },
8547
8563
  {
8548
8564
  "description": "Extra classes on the root element.",
8549
8565
  "name": "className",
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.2/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.2.0/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.2"
65
+ "version": "32.2.0"
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.2.
4
+ > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.2.0.
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.2`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@32.2.0`). 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.2/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v32.2.0/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
@@ -13,8 +13,7 @@ import {
13
13
  CommandList
14
14
  } from "./command.js";
15
15
  import { useTranslation } from "../../i18n/use-translation.js";
16
- import { isImeComposing } from "../../lib/ime.js";
17
- import { parseShortcut, shortcutHint, shortcutMatches } from "../../lib/shortcut.js";
16
+ import { parseShortcut, shortcutHint, shouldHandleShortcut } from "../../lib/shortcut.js";
18
17
  const modifiersOf = (event) => ({
19
18
  metaKey: event.metaKey,
20
19
  ctrlKey: event.ctrlKey,
@@ -80,7 +79,7 @@ function CommandPalette({
80
79
  React.useEffect(() => {
81
80
  if (!shortcutSpec) return;
82
81
  const handleKeyDown = (event) => {
83
- if (!isImeComposing(event) && shortcutMatches(shortcutSpec, event)) {
82
+ if (shouldHandleShortcut(shortcutSpec, event)) {
84
83
  event.preventDefault();
85
84
  if (!open && document.activeElement instanceof HTMLElement) {
86
85
  shortcutRestoreFocusRef.current = document.activeElement;
@@ -8,8 +8,7 @@ import { Label } from "../data-entry/label.js";
8
8
  import { cn } from "../../lib/utils.js";
9
9
  import { resolveFieldA11y } from "../../lib/field-a11y.js";
10
10
  import { useDebouncedValue } from "../../lib/hooks.js";
11
- import { isImeComposing } from "../../lib/ime.js";
12
- import { parseShortcut, shortcutHint, shortcutMatches } from "../../lib/shortcut.js";
11
+ import { parseShortcut, shortcutHint, shouldHandleShortcut } from "../../lib/shortcut.js";
13
12
  function SearchInput({
14
13
  value: controlledValue,
15
14
  defaultValue = "",
@@ -56,7 +55,7 @@ function SearchInput({
56
55
  React.useEffect(() => {
57
56
  if (!shortcutSpec || disabled) return;
58
57
  const handleKeyDown = (event) => {
59
- if (isImeComposing(event) || !shortcutMatches(shortcutSpec, event)) return;
58
+ if (!shouldHandleShortcut(shortcutSpec, event)) return;
60
59
  event.preventDefault();
61
60
  inputRef.current?.focus();
62
61
  };
@@ -55,9 +55,16 @@ interface DropdownMenuPropsOwn {
55
55
  mouseEnterDelay?: number;
56
56
  /** Ant Design `mouseLeaveDelay`, in SECONDS. Default 0.1 — long enough to cross the gap. */
57
57
  mouseLeaveDelay?: number;
58
+ /**
59
+ * A page-level key that OPENS the menu — `"f"` for a filter menu, `"mod+shift+v"` for a view
60
+ * menu (gh#1264). The same combo syntax and the same guard as `SearchInput`/`CommandPalette`: a
61
+ * bare key is ignored while focus is in an editable element or an IME is composing. Off by
62
+ * default; ignored while `disabled`. Show the key in the trigger with `DropdownMenuShortcut`.
63
+ */
64
+ shortcut?: string;
58
65
  }
59
66
  type DropdownMenuProps = React.PropsWithChildren<DropdownMenuPropsOwn>;
60
- export declare function DropdownMenu({ children, open, defaultOpen, onOpenChange, modal, dir, trigger, disabled, mouseEnterDelay, mouseLeaveDelay, }: DropdownMenuProps): React.JSX.Element;
67
+ export declare function DropdownMenu({ children, open, defaultOpen, onOpenChange, modal, dir, trigger, disabled, mouseEnterDelay, mouseLeaveDelay, shortcut, }: DropdownMenuProps): React.JSX.Element;
61
68
  interface DropdownMenuTriggerProps extends React.ComponentPropsWithoutRef<"button"> {
62
69
  /** Giao hành vi mở cho phần tử con thay vì `<button>` mặc định — như Radix. */
63
70
  asChild?: boolean;
@@ -20,6 +20,7 @@ import {
20
20
  useLocale
21
21
  } from "react-aria-components";
22
22
  import { Check, ChevronRight } from "lucide-react";
23
+ import { parseShortcut, shouldHandleShortcut } from "../../lib/shortcut.js";
23
24
  import { cn } from "../../lib/utils.js";
24
25
  import { Slot } from "../../lib/slot.js";
25
26
  const DROPDOWN_MENU_PLACEMENT = {
@@ -117,7 +118,8 @@ function DropdownMenu({
117
118
  trigger = DROPDOWN_MENU_DEFAULT_TRIGGER,
118
119
  disabled = false,
119
120
  mouseEnterDelay = DROPDOWN_MENU_MOUSE_ENTER_DELAY,
120
- mouseLeaveDelay = DROPDOWN_MENU_MOUSE_LEAVE_DELAY
121
+ mouseLeaveDelay = DROPDOWN_MENU_MOUSE_LEAVE_DELAY,
122
+ shortcut
121
123
  }) {
122
124
  void dir;
123
125
  const wantsHover = !disabled && trigger.includes("hover");
@@ -139,6 +141,17 @@ function DropdownMenu({
139
141
  },
140
142
  [disabled, open, onOpenChange]
141
143
  );
144
+ const shortcutSpec = React.useMemo(() => shortcut ? parseShortcut(shortcut) : null, [shortcut]);
145
+ React.useEffect(() => {
146
+ if (!shortcutSpec || disabled) return;
147
+ const handleKeyDown = (event) => {
148
+ if (isOpenRef.current || !shouldHandleShortcut(shortcutSpec, event)) return;
149
+ event.preventDefault();
150
+ setOpen(true);
151
+ };
152
+ document.addEventListener("keydown", handleKeyDown);
153
+ return () => document.removeEventListener("keydown", handleKeyDown);
154
+ }, [shortcutSpec, disabled, setOpen]);
142
155
  const enterTimer = React.useRef(null);
143
156
  const leaveTimer = React.useRef(null);
144
157
  React.useEffect(
@@ -1,6 +1,6 @@
1
1
  import type { ToolbarGroupProp, ToolbarProp } from "../../props/components/navigation.prop.js";
2
2
  export type { FilterBarChipProp, FilterBarChipProp as FilterBarChipProps, FilterBarFilterProp, FilterBarFilterProp as FilterBarFilterProps, FilterBarOverflowProp, FilterBarSearchProp, FilterBarSearchProp as FilterBarSearchProps, ToolbarGroupProp, ToolbarGroupProp as ToolbarGroupProps, ToolbarGroupProp as FilterBarGroupProp, ToolbarGroupProp as FilterBarGroupProps, ToolbarProp, ToolbarProp as ToolbarProps, ToolbarProp as FilterBarProp, ToolbarProp as FilterBarProps, } from "../../props/components/navigation.prop.js";
3
- export declare function Toolbar({ onClear, hasActiveFilters, sticky, overflow, search, filters, chips, onChipRemove, actions, resultCount, loading, disabled, error, className, children, }: ToolbarProp): import("react").JSX.Element;
3
+ export declare function Toolbar({ onClear, hasActiveFilters, sticky, overflow, search, filters, chips, onChipRemove, actions, resultCount, loading, disabled, error, clearDisplay, views, className, children, }: ToolbarProp): import("react").JSX.Element;
4
4
  export declare function ToolbarGroup({ label, controlId, className, children }: ToolbarGroupProp): import("react").JSX.Element;
5
5
  /** Canonical list-page filter strip. `Toolbar` remains available for backwards compatibility. */
6
6
  export declare const FilterBar: typeof Toolbar;
@@ -7,6 +7,7 @@ import { Button } from "../general/button.js";
7
7
  import { Badge } from "../data-display/badge.js";
8
8
  import { SearchInput } from "../data-entry/search-input.js";
9
9
  import { Select } from "../data-entry/select.js";
10
+ import { Tooltip, TooltipContent, TooltipTrigger } from "../feedback/tooltip.js";
10
11
  import { cn } from "../../lib/utils.js";
11
12
  function Toolbar({
12
13
  onClear,
@@ -22,12 +23,49 @@ function Toolbar({
22
23
  loading,
23
24
  disabled,
24
25
  error,
26
+ clearDisplay = "label",
27
+ views,
25
28
  className,
26
29
  children
27
30
  }) {
28
31
  const { t } = useTranslation();
29
32
  const reactId = useId();
30
- const hasModel = search !== void 0 || filters !== void 0 || chips !== void 0 || onChipRemove !== void 0 || actions !== void 0 || resultCount !== void 0 || loading !== void 0 || disabled !== void 0 || error !== void 0;
33
+ const hasModel = search !== void 0 || filters !== void 0 || chips !== void 0 || onChipRemove !== void 0 || actions !== void 0 || resultCount !== void 0 || loading !== void 0 || disabled !== void 0 || error !== void 0 || views !== void 0;
34
+ const clearButton = (isDisabled) => {
35
+ const label = t("common.clearFilters");
36
+ if (clearDisplay === "icon") {
37
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
38
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
39
+ Button,
40
+ {
41
+ variant: "ghost",
42
+ size: "icon-sm",
43
+ onClick: onClear,
44
+ disabled: isDisabled,
45
+ "aria-label": label,
46
+ className: "ui-toolbar-clear",
47
+ "data-display": "icon",
48
+ children: /* @__PURE__ */ jsx(X, { "aria-hidden": "true" })
49
+ }
50
+ ) }),
51
+ /* @__PURE__ */ jsx(TooltipContent, { children: label })
52
+ ] });
53
+ }
54
+ return /* @__PURE__ */ jsxs(
55
+ Button,
56
+ {
57
+ variant: "ghost",
58
+ size: "sm",
59
+ onClick: onClear,
60
+ disabled: isDisabled,
61
+ className: "ui-toolbar-clear",
62
+ children: [
63
+ /* @__PURE__ */ jsx(X, { "aria-hidden": "true" }),
64
+ label
65
+ ]
66
+ }
67
+ );
68
+ };
31
69
  if (!hasModel) {
32
70
  return /* @__PURE__ */ jsxs(
33
71
  "div",
@@ -38,10 +76,7 @@ function Toolbar({
38
76
  className: cn("ui-toolbar", sticky && "ui-toolbar-sticky", className),
39
77
  children: [
40
78
  children,
41
- onClear && hasActiveFilters && /* @__PURE__ */ jsxs(Button, { variant: "ghost", size: "sm", onClick: onClear, className: "ui-toolbar-clear", children: [
42
- /* @__PURE__ */ jsx(X, { "aria-hidden": "true" }),
43
- t("common.clearFilters")
44
- ] })
79
+ onClear && hasActiveFilters && clearButton()
45
80
  ]
46
81
  }
47
82
  );
@@ -55,6 +90,7 @@ function Toolbar({
55
90
  className: cn("ui-filter-bar", sticky && "ui-toolbar-sticky", className),
56
91
  "data-loading": loading || void 0,
57
92
  children: [
93
+ views != null && /* @__PURE__ */ jsx("div", { className: "ui-filter-bar-views", children: views }),
58
94
  /* @__PURE__ */ jsxs(
59
95
  "div",
60
96
  {
@@ -107,20 +143,7 @@ function Toolbar({
107
143
  }),
108
144
  children,
109
145
  (showClear || actions != null) && /* @__PURE__ */ jsxs("div", { className: "ui-filter-bar-end", children: [
110
- showClear && /* @__PURE__ */ jsxs(
111
- Button,
112
- {
113
- variant: "ghost",
114
- size: "sm",
115
- onClick: onClear,
116
- disabled,
117
- className: "ui-toolbar-clear",
118
- children: [
119
- /* @__PURE__ */ jsx(X, { "aria-hidden": "true" }),
120
- t("common.clearFilters")
121
- ]
122
- }
123
- ),
146
+ showClear && clearButton(disabled),
124
147
  actions != null && /* @__PURE__ */ jsx("div", { className: "ui-filter-bar-actions", children: actions })
125
148
  ] })
126
149
  ]
@@ -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.2",
3
+ "version": "32.2.0",
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,
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * A global keyboard shortcut, parsed from a combo string. Shared by `CommandPalette` (toggles the
3
- * dialog) and `SearchInput` (focuses the field) so both read `"mod+k"` the same way (gh#1250).
3
+ * dialog), `SearchInput` (focuses the field) and `DropdownMenu` (opens the menu) so all three read
4
+ * `"mod+k"` the same way (gh#1250).
4
5
  */
5
6
  export type ShortcutSpec = {
6
7
  key: string;
@@ -15,3 +16,18 @@ export declare function parseShortcut(shortcut: boolean | string): ShortcutSpec
15
16
  export declare function shortcutMatches(spec: ShortcutSpec, event: KeyboardEvent): boolean;
16
17
  /** The hint a trigger shows: `mod+shift+p` → `⌘⇧P`. */
17
18
  export declare function shortcutHint(spec: ShortcutSpec): string;
19
+ /**
20
+ * Is focus somewhere the user is TYPING — an input, a textarea, a select, a contenteditable or an
21
+ * ARIA textbox/combobox? A bare key is text there: `"/"` typed into a dialog field is a slash,
22
+ * not "focus the search box" (gh#1264, measured: typing `a/b` lost the `/`).
23
+ */
24
+ export declare function isEditableTarget(target: EventTarget | null): boolean;
25
+ /**
26
+ * Should this keydown run the shortcut? The ONE gate every global shortcut goes through:
27
+ * - never during IME composition (the key belongs to the conversion, gh#1054);
28
+ * - the combo must match;
29
+ * - a shortcut with NO command modifier (`"/"`, `"f"`, `"shift+?"`) is ignored while focus is in
30
+ * an editable element, where that key is text. A modified one (`"mod+k"`) still fires there —
31
+ * no text field types ⌘K — which is how GitHub's and Linear's palettes behave.
32
+ */
33
+ export declare function shouldHandleShortcut(spec: ShortcutSpec, event: KeyboardEvent): boolean;
@@ -1,3 +1,4 @@
1
+ import { isImeComposing } from "./ime.js";
1
2
  import { isApplePlatform } from "./platform.js";
2
3
  function parseShortcut(shortcut) {
3
4
  if (shortcut === false) return null;
@@ -30,8 +31,35 @@ function shortcutHint(spec) {
30
31
  spec.key.length === 1 ? spec.key.toUpperCase() : spec.key
31
32
  ].join("");
32
33
  }
34
+ function isEditableTarget(target) {
35
+ if (!(target instanceof HTMLElement)) return false;
36
+ if (target.isContentEditable) return true;
37
+ if (target instanceof HTMLTextAreaElement || target instanceof HTMLSelectElement) return true;
38
+ if (target instanceof HTMLInputElement) {
39
+ return ![
40
+ "button",
41
+ "checkbox",
42
+ "radio",
43
+ "range",
44
+ "reset",
45
+ "submit",
46
+ "color",
47
+ "file",
48
+ "image"
49
+ ].includes(target.type);
50
+ }
51
+ const role = target.getAttribute("role");
52
+ return role === "textbox" || role === "combobox" || role === "searchbox";
53
+ }
54
+ function shouldHandleShortcut(spec, event) {
55
+ if (isImeComposing(event) || !shortcutMatches(spec, event)) return false;
56
+ const commandModifier = spec.mod || spec.meta || spec.ctrl || spec.alt;
57
+ return commandModifier || !isEditableTarget(event.target);
58
+ }
33
59
  export {
60
+ isEditableTarget,
34
61
  parseShortcut,
35
62
  shortcutHint,
36
- shortcutMatches
63
+ shortcutMatches,
64
+ shouldHandleShortcut
37
65
  };
@@ -100,9 +100,23 @@ export type ToolbarProp = {
100
100
  disabled?: DisabledProp;
101
101
  /** Typed model — consumer error content, announced via `role="alert"` in place of the count. */
102
102
  error?: ErrorProp;
103
+ /**
104
+ * How the clear-all button shows itself (gh#1264). `label` (default) is the ✕ plus the localized
105
+ * "Clear filters" text; `icon` is the ✕ alone — the same accessible name, a tooltip with the text,
106
+ * and a control-height square instead of ~150px, so a bar with a few active filters keeps one row.
107
+ */
108
+ clearDisplay?: FilterBarClearDisplayProp;
109
+ /**
110
+ * Typed model — the saved-VIEW switcher above the filter strip (e.g. `<Tabs>` of "Open / Mine /
111
+ * All"), as GitHub and Linear put view tabs over their filters (gh#1264). A view selects a whole
112
+ * filter set, so it is not one more filter in the strip.
113
+ */
114
+ views?: React.ReactNode;
103
115
  className?: ClassNameProp;
104
116
  children?: ChildrenProp;
105
117
  };
118
+ /** @see ToolbarProp.clearDisplay */
119
+ export type FilterBarClearDisplayProp = "label" | "icon";
106
120
  /** @see ToolbarGroup */
107
121
  export type ToolbarGroupProp = {
108
122
  label: LabelProp;
@@ -2591,6 +2591,11 @@ export declare const COMPONENT_PROP_REGISTRY: {
2591
2591
  readonly file: "components/navigation.prop.ts";
2592
2592
  readonly vocabulary: readonly ["OnClearFiltersProp", "HasActiveFiltersProp", "StickyProp", "ActionsProp", "PendingProp", "DisabledProp", "ErrorProp", "ClassNameProp", "ChildrenProp"];
2593
2593
  };
2594
+ readonly FilterBarClearDisplayProp: {
2595
+ readonly group: "navigation";
2596
+ readonly file: "components/navigation.prop.ts";
2597
+ readonly vocabulary: readonly [];
2598
+ };
2594
2599
  readonly FilterBarOverflowProp: {
2595
2600
  readonly group: "navigation";
2596
2601
  readonly file: "components/navigation.prop.ts";
@@ -3023,6 +3023,11 @@ const COMPONENT_PROP_REGISTRY = {
3023
3023
  "ChildrenProp"
3024
3024
  ]
3025
3025
  },
3026
+ FilterBarClearDisplayProp: {
3027
+ group: "navigation",
3028
+ file: "components/navigation.prop.ts",
3029
+ vocabulary: []
3030
+ },
3026
3031
  FilterBarOverflowProp: {
3027
3032
  group: "navigation",
3028
3033
  file: "components/navigation.prop.ts",
@@ -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.2",
2
+ "version": "32.2.0",
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",