@godxjp/ui 32.4.2 → 32.5.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.4.2.** If the project you are editing has a different
6
+ **This catalog describes `@godxjp/ui` 32.5.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.
@@ -59,9 +59,9 @@
59
59
  },
60
60
  {
61
61
  "defaultValue": "\"normal\"",
62
- "description": "Where an over-long unbroken token may break. THE prop for a machine identifier — an email address, a coupon code, a login id, a template key — in a DataTable/TableCell or a Descriptions value: `break=\"anywhere\"` emits `overflow-wrap: anywhere` (and releases a table cell's inherited `nowrap`), so the column shrinks to the viewport instead of scrolling the page. Use it INSTEAD of `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`. NOT `whitespace=\"pre-wrap\"`: that is for typed line breaks, and its `break-word` does not lower min-content, so in a table cell it breaks nothing (measured: a 71-char token holds a 320px table at 630px with pre-wrap, 320px with break=\"anywhere\"). Independent of `whitespace` (both may be set); `truncate` wins (dev builds warn); `clamp` composes.",
62
+ "description": "Where an over-long unbroken token may break. THE prop for a machine identifier — an email address, a coupon code, a login id, a template key — in a DataTable/TableCell or a Descriptions value: `break=\"anywhere\"` emits `overflow-wrap: anywhere` (and releases a table cell's inherited `nowrap`), so the column shrinks to the viewport instead of scrolling the page. Use it INSTEAD of `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`. NOT `whitespace=\"pre-wrap\"`: that is for typed line breaks, and its `break-word` does not lower min-content, so in a table cell it breaks nothing (measured: a 71-char token holds a 320px table at 630px with pre-wrap, 320px with break=\"anywhere\"). `break=\"phrase\"` is THE prop for Japanese PROSE in a narrow measure — a trainee's katakana name, an organisation, a status in a DataTable cell: it breaks between phrases (`word-break: auto-phrase`, Chrome 119+) instead of between any two characters, never starts a line with a small kana or 「ー」 (`line-break: strict`), adds `text-wrap: pretty`, and releases the cell's `nowrap` (measured in a 974px 8-column table: 「チャン・ヴァ|ン・ミン」 → 「チャン・|ヴァン・|ミン」, 4 mid-katakana breaks → 0). It keeps every phrase whole, so the column is as wide as its longest phrase: a 20+ character katakana compound scrolls the table rather than being cut. Browsers without `auto-phrase` keep their own CJK breaking. Independent of `whitespace` (both may be set); `truncate` wins (dev builds warn); `clamp` composes.",
63
63
  "name": "break",
64
- "type": "\"normal\" | \"anywhere\""
64
+ "type": "\"normal\" | \"anywhere\" | \"phrase\""
65
65
  },
66
66
  {
67
67
  "description": "Tabular figures for aligned numbers.",
@@ -195,6 +195,7 @@
195
195
  "usage": [
196
196
  "DO use `<Text>` for ALL body / inline / caption text instead of a styled `<span>`/`<p>`. Pick `size` from the scale; never write `text-[13px]`/`text-[11px]` or `font-semibold` by hand.",
197
197
  "DO use `tone` for colour (`muted`/`primary`/semantic), `tabular` for numbers, `mono` for codes — not `className=\"text-muted-foreground font-mono tabular-nums\"`.",
198
+ "DO use `break=\"phrase\"` for Japanese prose (a name, an organisation, a status) in a table cell — never `className=\"[word-break:auto-phrase]\"`; it is not for a machine id, which is `break=\"anywhere\"`.",
198
199
  "DO use `break=\"anywhere\"` for an email, code or id in a table cell or Descriptions value — never `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`, and never `whitespace=\"pre-wrap\"`, which does not shrink a table column.",
199
200
  "DO use `clamp={n}` for a description limited to n lines (card grids) and `truncate` for a one-line ellipsis — never `className=\"line-clamp-2\"` (banned utility). They are mutually exclusive; `clamp` wins.",
200
201
  "For a heading, use `<Heading level>` instead of a large-size `<Text>`.",
@@ -205,6 +206,7 @@
205
206
  "A muted caption under a value: `<Text size=\"xs\" tone=\"muted\">2026年5月度</Text>`.",
206
207
  "A monospace id in a list row: `<Text size=\"xs\" mono tone=\"muted\">RC-204881</Text>`.",
207
208
  "A staff email in a narrow DataTable cell at 320px, wrapping instead of scrolling the page: `<Text size=\"sm\" break=\"anywhere\">{staff.email}</Text>`.",
209
+ "A trainee's katakana name in a DataTable cell, breaking between phrases instead of mid-katakana: `render: (row) => <Text break=\"phrase\">{row.name}</Text>` (pair long-heading columns with `headerWrap: true`).",
208
210
  "An emphasized inline figure: `<Text weight=\"medium\" tabular>¥1,240,000</Text>`.",
209
211
  "A service-card description clamped to 2 lines on a narrow (390px) index: `<Text as=\"p\" size=\"sm\" tone=\"muted\" clamp={2}>{description}</Text>`.",
210
212
  "An issue subject linking out of a table cell, wrapping to two lines: `<Text asChild link truncate={false}><Link href={`/view/${key}`}>{subject}</Link></Text>`.",
@@ -2753,9 +2753,9 @@
2753
2753
  },
2754
2754
  {
2755
2755
  "defaultValue": "\"normal\"",
2756
- "description": "Where an over-long unbroken token may break. THE prop for a machine identifier — an email address, a coupon code, a login id, a template key — in a DataTable/TableCell or a Descriptions value: `break=\"anywhere\"` emits `overflow-wrap: anywhere` (and releases a table cell's inherited `nowrap`), so the column shrinks to the viewport instead of scrolling the page. Use it INSTEAD of `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`. NOT `whitespace=\"pre-wrap\"`: that is for typed line breaks, and its `break-word` does not lower min-content, so in a table cell it breaks nothing (measured: a 71-char token holds a 320px table at 630px with pre-wrap, 320px with break=\"anywhere\"). Independent of `whitespace` (both may be set); `truncate` wins (dev builds warn); `clamp` composes.",
2756
+ "description": "Where an over-long unbroken token may break. THE prop for a machine identifier — an email address, a coupon code, a login id, a template key — in a DataTable/TableCell or a Descriptions value: `break=\"anywhere\"` emits `overflow-wrap: anywhere` (and releases a table cell's inherited `nowrap`), so the column shrinks to the viewport instead of scrolling the page. Use it INSTEAD of `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`. NOT `whitespace=\"pre-wrap\"`: that is for typed line breaks, and its `break-word` does not lower min-content, so in a table cell it breaks nothing (measured: a 71-char token holds a 320px table at 630px with pre-wrap, 320px with break=\"anywhere\"). `break=\"phrase\"` is THE prop for Japanese PROSE in a narrow measure — a trainee's katakana name, an organisation, a status in a DataTable cell: it breaks between phrases (`word-break: auto-phrase`, Chrome 119+) instead of between any two characters, never starts a line with a small kana or 「ー」 (`line-break: strict`), adds `text-wrap: pretty`, and releases the cell's `nowrap` (measured in a 974px 8-column table: 「チャン・ヴァ|ン・ミン」 → 「チャン・|ヴァン・|ミン」, 4 mid-katakana breaks → 0). It keeps every phrase whole, so the column is as wide as its longest phrase: a 20+ character katakana compound scrolls the table rather than being cut. Browsers without `auto-phrase` keep their own CJK breaking. Independent of `whitespace` (both may be set); `truncate` wins (dev builds warn); `clamp` composes.",
2757
2757
  "name": "break",
2758
- "type": "\"normal\" | \"anywhere\""
2758
+ "type": "\"normal\" | \"anywhere\" | \"phrase\""
2759
2759
  },
2760
2760
  {
2761
2761
  "description": "Tabular figures for aligned numbers.",
@@ -2889,6 +2889,7 @@
2889
2889
  "usage": [
2890
2890
  "DO use `<Text>` for ALL body / inline / caption text instead of a styled `<span>`/`<p>`. Pick `size` from the scale; never write `text-[13px]`/`text-[11px]` or `font-semibold` by hand.",
2891
2891
  "DO use `tone` for colour (`muted`/`primary`/semantic), `tabular` for numbers, `mono` for codes — not `className=\"text-muted-foreground font-mono tabular-nums\"`.",
2892
+ "DO use `break=\"phrase\"` for Japanese prose (a name, an organisation, a status) in a table cell — never `className=\"[word-break:auto-phrase]\"`; it is not for a machine id, which is `break=\"anywhere\"`.",
2892
2893
  "DO use `break=\"anywhere\"` for an email, code or id in a table cell or Descriptions value — never `className=\"[overflow-wrap:anywhere] break-words whitespace-normal\"`, and never `whitespace=\"pre-wrap\"`, which does not shrink a table column.",
2893
2894
  "DO use `clamp={n}` for a description limited to n lines (card grids) and `truncate` for a one-line ellipsis — never `className=\"line-clamp-2\"` (banned utility). They are mutually exclusive; `clamp` wins.",
2894
2895
  "For a heading, use `<Heading level>` instead of a large-size `<Text>`.",
@@ -2899,6 +2900,7 @@
2899
2900
  "A muted caption under a value: `<Text size=\"xs\" tone=\"muted\">2026年5月度</Text>`.",
2900
2901
  "A monospace id in a list row: `<Text size=\"xs\" mono tone=\"muted\">RC-204881</Text>`.",
2901
2902
  "A staff email in a narrow DataTable cell at 320px, wrapping instead of scrolling the page: `<Text size=\"sm\" break=\"anywhere\">{staff.email}</Text>`.",
2903
+ "A trainee's katakana name in a DataTable cell, breaking between phrases instead of mid-katakana: `render: (row) => <Text break=\"phrase\">{row.name}</Text>` (pair long-heading columns with `headerWrap: true`).",
2902
2904
  "An emphasized inline figure: `<Text weight=\"medium\" tabular>¥1,240,000</Text>`.",
2903
2905
  "A service-card description clamped to 2 lines on a narrow (390px) index: `<Text as=\"p\" size=\"sm\" tone=\"muted\" clamp={2}>{description}</Text>`.",
2904
2906
  "An issue subject linking out of a table cell, wrapping to two lines: `<Text asChild link truncate={false}><Link href={`/view/${key}`}>{subject}</Link></Text>`.",
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.4.2/agent/index.json"
51
+ "pinned": "https://raw.githubusercontent.com/godx-jp/godxjp-ui/v32.5.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.4.2"
65
+ "version": "32.5.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, 2195 design tokens,
4
- > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.4.2.
4
+ > 43 cardinal rules. This file is the entry point for AI agents. Catalog version 32.5.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.4.2`). It is searchable and version-locked. These files exist for agents
7
+ (`npx @godxjp/ui-mcp@32.5.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.4.2/agent/...`. A catalog that does not match the installed
29
+ the tag: `.../godx-jp/godxjp-ui/v32.5.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.
@@ -102,7 +102,9 @@ function SearchInput({
102
102
  className: cn(
103
103
  "ui-search-input-control !ps-[var(--search-input-start-padding)]",
104
104
  // gh#1250 — while the key cap shows, the text stops before it instead of running under it.
105
- showShortcut ? "!pe-[calc(var(--search-input-edge-inset)+6ch)]" : "!pe-[var(--search-input-end-padding)]",
105
+ // gh#1285 — written FROM --search-input-end-padding (minus the ✕ slot it reserves, plus the
106
+ // cap), so a theme that retunes that token still moves this padding (default: edge inset + 6ch, as before).
107
+ showShortcut ? "!pe-[calc(var(--search-input-end-padding)_-_var(--control-icon-size)_-_var(--control-gap)_+_6ch)]" : "!pe-[var(--search-input-end-padding)]",
106
108
  inputClassName
107
109
  ),
108
110
  disabled
@@ -416,9 +416,9 @@ const TextBase = React.forwardRef((props, ref) => {
416
416
  'Text: `truncate` and `whitespace="pre-wrap"` are mutually exclusive \u2014 `truncate` takes precedence (one line, one ellipsis); use `clamp` to keep preserved line breaks and still bound the height.'
417
417
  );
418
418
  }
419
- if (breakMode === "anywhere" && truncating) {
419
+ if ((breakMode === "anywhere" || breakMode === "phrase") && truncating) {
420
420
  console.warn(
421
- 'Text: `truncate` and `break="anywhere"` are mutually exclusive \u2014 `truncate` takes precedence (one line has nowhere to break to); use `clamp` to split the token and still bound the height.'
421
+ `Text: \`truncate\` and \`break="${breakMode}"\` are mutually exclusive \u2014 \`truncate\` takes precedence (one line has nowhere to break to); use \`clamp\` to keep the breaking and still bound the height.`
422
422
  );
423
423
  }
424
424
  if (ellipsis && (truncate || clamp !== void 0)) {
@@ -450,8 +450,8 @@ const TextBase = React.forwardRef((props, ref) => {
450
450
  // Text inherits, e.g. from a table cell. `truncate` still wins by emitting nothing.
451
451
  "data-whitespace": whitespace && !truncating ? whitespace : void 0,
452
452
  // Same shape and the same precedence as `whitespace`: `normal` is inert, and one line has
453
- // nowhere to break to, so `truncate` simply does not emit it (gh#927).
454
- "data-break": breakMode === "anywhere" && !truncating ? "anywhere" : void 0,
453
+ // nowhere to break to, so `truncate` simply does not emit it (gh#927, and `phrase` likewise).
454
+ "data-break": breakMode && breakMode !== "normal" && !truncating ? breakMode : void 0,
455
455
  style: clampStyle,
456
456
  "data-tabular": tabular ? "" : void 0,
457
457
  "data-decoration": decoration,
@@ -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.4.2",
3
+ "version": "32.5.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,
@@ -75,6 +75,12 @@ export type TextProp = Omit<React.HTMLAttributes<HTMLElement>, "color"> & Omit<T
75
75
  * also releases a `nowrap` it inherited (a table cell's default) back to `normal` — newlines
76
76
  * still collapse, because an identifier's whitespace is not content.
77
77
  *
78
+ * `phrase` is for Japanese PROSE in a narrow measure — a name, an organisation, a status in a
79
+ * table cell: it breaks between phrases (`word-break: auto-phrase`) instead of mid-word, never
80
+ * starts a line with a small kana or 「ー」 (`line-break: strict`), adds `text-wrap: pretty`, and
81
+ * releases an inherited `nowrap` too. Each phrase stays whole, so a column is as wide as its
82
+ * longest phrase. Browsers without `auto-phrase` keep their own CJK breaking.
83
+ *
78
84
  * Independent of `whitespace`: `whitespace="pre-wrap" break="anywhere"` keeps typed line breaks
79
85
  * AND splits a long token. `truncate` WINS (one line has nowhere to break to), so the attribute
80
86
  * is not emitted under it; `clamp` composes.
@@ -477,7 +477,7 @@ export declare const VOCABULARY_REGISTRY: {
477
477
  readonly TextBreakProp: {
478
478
  readonly file: "vocabulary/interaction.prop.ts";
479
479
  readonly category: "interaction";
480
- readonly description: "Where an over-long unbroken token may break normal | anywhere: `anywhere` (overflow-wrap: anywhere) lets a machine identifier (email, code, login id) split to fit a narrow table cell; independent of TextWhitespaceProp, and `truncate` outranks it";
480
+ readonly description: "Where an over-long unbroken token may break normal | anywhere | phrase: `anywhere` (overflow-wrap: anywhere) lets a machine identifier (email, code, login id) split to fit a narrow table cell; `phrase` (word-break: auto-phrase + line-break: strict + text-wrap: pretty) breaks Japanese prose between phrases, never mid-katakana, keeping each phrase whole (the column is as wide as its longest phrase); independent of TextWhitespaceProp, and `truncate` outranks both";
481
481
  };
482
482
  readonly TypographyTypeProp: {
483
483
  readonly file: "vocabulary/interaction.prop.ts";
@@ -476,7 +476,7 @@ const VOCABULARY_REGISTRY = {
476
476
  TextBreakProp: {
477
477
  file: "vocabulary/interaction.prop.ts",
478
478
  category: "interaction",
479
- description: "Where an over-long unbroken token may break normal | anywhere: `anywhere` (overflow-wrap: anywhere) lets a machine identifier (email, code, login id) split to fit a narrow table cell; independent of TextWhitespaceProp, and `truncate` outranks it"
479
+ description: "Where an over-long unbroken token may break normal | anywhere | phrase: `anywhere` (overflow-wrap: anywhere) lets a machine identifier (email, code, login id) split to fit a narrow table cell; `phrase` (word-break: auto-phrase + line-break: strict + text-wrap: pretty) breaks Japanese prose between phrases, never mid-katakana, keeping each phrase whole (the column is as wide as its longest phrase); independent of TextWhitespaceProp, and `truncate` outranks both"
480
480
  },
481
481
  TypographyTypeProp: {
482
482
  file: "vocabulary/interaction.prop.ts",
@@ -108,8 +108,16 @@ export type TextWhitespaceProp = "normal" | "pre-wrap";
108
108
  * typed are content, `break` says whether a machine identifier may be split to fit. Only `anywhere`
109
109
  * — not `break-word` — lowers the box's min-content size (CSS Text 3 §5.5), which is what a table
110
110
  * cell sizes its column from; `break-word` breaks in a block and still holds a `<td>` open.
111
+ *
112
+ * `phrase` (gh#1292) is for PROSE in a narrow measure — a Japanese name, an organisation, a status label in a
113
+ * table cell: lines break between phrases instead of between any two
114
+ * characters (`word-break: auto-phrase`), small kana and the long-vowel mark never start a line
115
+ * (`line-break: strict`), and a paragraph does not end on one short word (`text-wrap: pretty`).
116
+ * Like `anywhere` it releases an inherited `nowrap`. Unlike `anywhere` it does NOT lower min-content:
117
+ * a column is as wide as its longest phrase, so a very long compound scrolls the table instead of
118
+ * being cut. Browsers without `auto-phrase` keep their own CJK breaking.
111
119
  */
112
- export type TextBreakProp = "normal" | "anywhere";
120
+ export type TextBreakProp = "normal" | "anywhere" | "phrase";
113
121
  /**
114
122
  * antd `Typography` `type` — its four-value emphasis axis (`BaseType`).
115
123
  *
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "32.4.2",
2
+ "version": "32.5.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",
@@ -169,10 +169,23 @@
169
169
  overflow-wrap: anywhere;
170
170
  min-inline-size: 0;
171
171
  }
172
- [data-slot="text"][data-break="anywhere"]:not([data-whitespace]) {
172
+ [data-slot="text"][data-break="anywhere"]:not([data-whitespace]),
173
+ [data-slot="text"][data-break="phrase"]:not([data-whitespace]) {
173
174
  white-space: normal;
174
175
  }
175
176
 
177
+ [data-slot="text"][data-break="phrase"] {
178
+ word-break: auto-phrase;
179
+ line-break: strict;
180
+ text-wrap: pretty;
181
+ min-inline-size: 0;
182
+ }
183
+ @supports not (word-break: auto-phrase) {
184
+ [data-slot="text"][data-break="phrase"] {
185
+ overflow-wrap: anywhere;
186
+ }
187
+ }
188
+
176
189
  [data-slot="text"][data-clamp] {
177
190
  display: -webkit-box;
178
191
  -webkit-box-orient: vertical;