@godxjp/ui 20.0.0 → 20.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.
Files changed (273) hide show
  1. package/README.md +8 -2
  2. package/dist/app/app-provider.js +37 -21
  3. package/dist/app/index.d.ts +2 -0
  4. package/dist/app/index.js +2 -0
  5. package/dist/app/storage.d.ts +17 -0
  6. package/dist/app/storage.js +28 -0
  7. package/dist/app/theme-axes.d.ts +2 -0
  8. package/dist/app/theme-axes.js +45 -0
  9. package/dist/components/charts/chart-cartesian.d.ts +2 -1
  10. package/dist/components/charts/chart-cartesian.js +52 -3
  11. package/dist/components/charts/chart-category-axis.d.ts +55 -0
  12. package/dist/components/charts/chart-category-axis.js +93 -0
  13. package/dist/components/charts/chart-frame.d.ts +10 -1
  14. package/dist/components/charts/chart-frame.js +19 -3
  15. package/dist/components/charts/compact-bar-trend.d.ts +1 -1
  16. package/dist/components/charts/compact-bar-trend.js +2 -0
  17. package/dist/components/charts/pie-chart.d.ts +1 -1
  18. package/dist/components/charts/pie-chart.js +12 -1
  19. package/dist/components/charts/recharts-peer.d.ts +49 -0
  20. package/dist/components/charts/recharts-peer.js +45 -0
  21. package/dist/components/data-display/card.d.ts +12 -1
  22. package/dist/components/data-display/card.js +22 -4
  23. package/dist/components/data-display/code-block.js +6 -2
  24. package/dist/components/data-display/data-table.d.ts +39 -4
  25. package/dist/components/data-display/data-table.js +802 -270
  26. package/dist/components/data-display/descriptions.d.ts +27 -6
  27. package/dist/components/data-display/descriptions.js +58 -17
  28. package/dist/components/data-display/index.d.ts +2 -0
  29. package/dist/components/data-display/index.js +2 -0
  30. package/dist/components/data-display/list-row.d.ts +10 -1
  31. package/dist/components/data-display/list-row.js +7 -1
  32. package/dist/components/data-display/popover.d.ts +9 -3
  33. package/dist/components/data-display/popover.js +65 -11
  34. package/dist/components/data-display/range-timeline.d.ts +38 -0
  35. package/dist/components/data-display/range-timeline.js +161 -0
  36. package/dist/components/data-display/scroll-area.js +13 -2
  37. package/dist/components/data-display/service-launcher-card.js +14 -12
  38. package/dist/components/data-display/table.d.ts +71 -3
  39. package/dist/components/data-display/table.js +56 -18
  40. package/dist/components/data-display/tree-list.js +4 -9
  41. package/dist/components/data-entry/calendar.d.ts +2 -2
  42. package/dist/components/data-entry/calendar.js +23 -3
  43. package/dist/components/data-entry/cascader.d.ts +1 -1
  44. package/dist/components/data-entry/cascader.js +188 -24
  45. package/dist/components/data-entry/color-picker.d.ts +1 -1
  46. package/dist/components/data-entry/color-picker.js +17 -5
  47. package/dist/components/data-entry/control-appearance.d.ts +64 -0
  48. package/dist/components/data-entry/control-appearance.js +39 -0
  49. package/dist/components/data-entry/control-surface.d.ts +61 -0
  50. package/dist/components/data-entry/control-surface.js +39 -0
  51. package/dist/components/data-entry/date-picker.d.ts +1 -1
  52. package/dist/components/data-entry/date-picker.js +344 -113
  53. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  54. package/dist/components/data-entry/date-range-picker.js +278 -140
  55. package/dist/components/data-entry/form-field.d.ts +1 -1
  56. package/dist/components/data-entry/form-field.js +39 -4
  57. package/dist/components/data-entry/form.d.ts +4 -0
  58. package/dist/components/data-entry/form.js +4 -2
  59. package/dist/components/data-entry/index.d.ts +7 -3
  60. package/dist/components/data-entry/index.js +10 -1
  61. package/dist/components/data-entry/input-otp.d.ts +1 -1
  62. package/dist/components/data-entry/input.d.ts +12 -34
  63. package/dist/components/data-entry/input.js +92 -24
  64. package/dist/components/data-entry/month-picker.d.ts +1 -1
  65. package/dist/components/data-entry/month-picker.js +47 -10
  66. package/dist/components/data-entry/month-range-picker.d.ts +1 -1
  67. package/dist/components/data-entry/month-range-picker.js +51 -11
  68. package/dist/components/data-entry/number-input.d.ts +7 -0
  69. package/dist/components/data-entry/number-input.js +147 -98
  70. package/dist/components/data-entry/password-input.d.ts +1 -1
  71. package/dist/components/data-entry/radio.d.ts +1 -1
  72. package/dist/components/data-entry/radio.js +61 -13
  73. package/dist/components/data-entry/search-input.d.ts +1 -1
  74. package/dist/components/data-entry/search-input.js +16 -2
  75. package/dist/components/data-entry/search-select.d.ts +2 -2
  76. package/dist/components/data-entry/search-select.js +209 -78
  77. package/dist/components/data-entry/select.d.ts +22 -4
  78. package/dist/components/data-entry/select.js +215 -163
  79. package/dist/components/data-entry/slider.d.ts +9 -1
  80. package/dist/components/data-entry/slider.js +87 -9
  81. package/dist/components/data-entry/switch.d.ts +3 -0
  82. package/dist/components/data-entry/switch.js +29 -3
  83. package/dist/components/data-entry/textarea.d.ts +14 -56
  84. package/dist/components/data-entry/textarea.js +80 -33
  85. package/dist/components/data-entry/time-picker.d.ts +2 -2
  86. package/dist/components/data-entry/time-picker.js +333 -109
  87. package/dist/components/data-entry/time-range-picker.d.ts +5 -0
  88. package/dist/components/data-entry/time-range-picker.js +89 -0
  89. package/dist/components/data-entry/transfer.d.ts +1 -1
  90. package/dist/components/data-entry/transfer.js +86 -28
  91. package/dist/components/data-entry/tree-select.d.ts +1 -1
  92. package/dist/components/data-entry/tree-select.js +201 -113
  93. package/dist/components/data-entry/tree-utils.js +7 -14
  94. package/dist/components/data-entry/upload-files.d.ts +2 -0
  95. package/dist/components/data-entry/upload-files.js +31 -0
  96. package/dist/components/data-entry/upload-request.d.ts +4 -0
  97. package/dist/components/data-entry/upload-request.js +53 -0
  98. package/dist/components/data-entry/upload-types.d.ts +28 -0
  99. package/dist/components/data-entry/upload-types.js +2 -0
  100. package/dist/components/data-entry/upload.d.ts +2 -2
  101. package/dist/components/data-entry/upload.js +475 -115
  102. package/dist/components/feedback/dialog.js +19 -19
  103. package/dist/components/feedback/sheet.js +3 -0
  104. package/dist/components/feedback/tooltip.js +3 -0
  105. package/dist/components/general/button.d.ts +2 -1
  106. package/dist/components/general/button.js +7 -1
  107. package/dist/components/general/index.d.ts +1 -0
  108. package/dist/components/general/index.js +2 -0
  109. package/dist/components/general/typography.d.ts +3 -0
  110. package/dist/components/general/typography.js +15 -1
  111. package/dist/components/general/visually-hidden.d.ts +3 -0
  112. package/dist/components/general/visually-hidden.js +9 -0
  113. package/dist/components/layout/app-launcher.d.ts +34 -0
  114. package/dist/components/layout/app-launcher.js +261 -0
  115. package/dist/components/layout/app-shell.d.ts +3 -1
  116. package/dist/components/layout/app-shell.js +34 -14
  117. package/dist/components/layout/auth-shell.d.ts +1 -1
  118. package/dist/components/layout/auth-shell.js +2 -0
  119. package/dist/components/layout/breadcrumb.d.ts +14 -2
  120. package/dist/components/layout/breadcrumb.js +46 -4
  121. package/dist/components/layout/flex.d.ts +1 -1
  122. package/dist/components/layout/flex.js +23 -2
  123. package/dist/components/layout/index.d.ts +3 -0
  124. package/dist/components/layout/index.js +5 -1
  125. package/dist/components/layout/org-switcher.js +20 -1
  126. package/dist/components/layout/page-container.d.ts +1 -1
  127. package/dist/components/layout/page-container.js +5 -3
  128. package/dist/components/layout/responsive-grid.d.ts +16 -2
  129. package/dist/components/layout/responsive-grid.js +29 -2
  130. package/dist/components/layout/sidebar.js +2 -1
  131. package/dist/components/layout/topbar-item.d.ts +3 -0
  132. package/dist/components/layout/topbar-item.js +18 -3
  133. package/dist/components/layout/topbar.d.ts +1 -1
  134. package/dist/components/layout/topbar.js +27 -6
  135. package/dist/components/navigation/dropdown-menu.d.ts +30 -2
  136. package/dist/components/navigation/dropdown-menu.js +73 -11
  137. package/dist/components/navigation/pagination.d.ts +2 -2
  138. package/dist/components/navigation/pagination.js +155 -83
  139. package/dist/components/navigation/steps.d.ts +2 -2
  140. package/dist/components/navigation/steps.js +29 -4
  141. package/dist/components/navigation/tabs.d.ts +5 -33
  142. package/dist/components/navigation/tabs.js +232 -64
  143. package/dist/components/ui/hover-card.js +3 -0
  144. package/dist/components/ui/input-otp.d.ts +26 -28
  145. package/dist/components/ui/input-otp.js +50 -7
  146. package/dist/components/ui/password-input.d.ts +36 -2
  147. package/dist/components/ui/password-input.js +27 -7
  148. package/dist/components/ui/rating.d.ts +25 -0
  149. package/dist/components/ui/rating.js +67 -27
  150. package/dist/components/ui/segmented.d.ts +9 -0
  151. package/dist/components/ui/segmented.js +17 -2
  152. package/dist/components/ui/separator.d.ts +4 -0
  153. package/dist/components/ui/separator.js +13 -0
  154. package/dist/components/ui/tag-input.d.ts +45 -0
  155. package/dist/components/ui/tag-input.js +109 -27
  156. package/dist/form/form-context.d.ts +29 -0
  157. package/dist/form/form-context.js +44 -4
  158. package/dist/form/form-field-array.d.ts +22 -0
  159. package/dist/form/form-field-array.js +50 -0
  160. package/dist/form/form-field-control.d.ts +2 -1
  161. package/dist/form/form-field-control.js +116 -40
  162. package/dist/form/form-root.d.ts +2 -1
  163. package/dist/form/form-root.js +142 -23
  164. package/dist/form/index.d.ts +3 -1
  165. package/dist/form/index.js +12 -1
  166. package/dist/i18n/index.d.ts +1 -1
  167. package/dist/i18n/index.js +3 -1
  168. package/dist/i18n/messages/en.json +59 -6
  169. package/dist/i18n/messages/ja.json +59 -6
  170. package/dist/i18n/messages/vi.json +59 -6
  171. package/dist/i18n/translate.d.ts +19 -0
  172. package/dist/i18n/translate.js +24 -0
  173. package/dist/inertia/index.d.ts +20 -0
  174. package/dist/inertia/index.js +60 -1
  175. package/dist/lib/control-styles.d.ts +25 -3
  176. package/dist/lib/control-styles.js +9 -3
  177. package/dist/lib/datetime/picker-format.d.ts +8 -0
  178. package/dist/lib/datetime/picker-format.js +54 -0
  179. package/dist/lib/overlay-portal.d.ts +18 -0
  180. package/dist/lib/overlay-portal.js +17 -0
  181. package/dist/props/components/app.prop.d.ts +13 -2
  182. package/dist/props/components/charts.prop.d.ts +21 -0
  183. package/dist/props/components/data-display.prop.d.ts +55 -4
  184. package/dist/props/components/data-entry.prop.d.ts +687 -43
  185. package/dist/props/components/form.prop.d.ts +142 -4
  186. package/dist/props/components/general.prop.d.ts +30 -1
  187. package/dist/props/components/index.d.ts +2 -2
  188. package/dist/props/components/layout.prop.d.ts +255 -8
  189. package/dist/props/components/navigation.prop.d.ts +113 -3
  190. package/dist/props/registry.d.ts +376 -10
  191. package/dist/props/registry.js +493 -9
  192. package/dist/props/vocabulary/data.prop.d.ts +179 -1
  193. package/dist/props/vocabulary/index.d.ts +4 -4
  194. package/dist/props/vocabulary/interaction.prop.d.ts +51 -2
  195. package/dist/props/vocabulary/navigation.prop.d.ts +40 -0
  196. package/dist/props/vocabulary/shared.prop.d.ts +33 -0
  197. package/dist/styles/badge-layout.css +2 -1
  198. package/dist/styles/card-layout.css +36 -5
  199. package/dist/styles/chart-layout.css +17 -1
  200. package/dist/styles/control.css +520 -14
  201. package/dist/styles/data-display-layout.css +248 -7
  202. package/dist/styles/data-entry-layout.css +13 -0
  203. package/dist/styles/layout.css +221 -4
  204. package/dist/styles/navigation-layout.css +230 -1
  205. package/dist/styles/shell-layout.css +690 -21
  206. package/dist/styles/table-layout.css +95 -6
  207. package/dist/styles/text-layout.css +5 -0
  208. package/dist/tokens/base.css +1 -0
  209. package/dist/tokens/components/badge.css +1 -0
  210. package/dist/tokens/components/chart.css +6 -0
  211. package/dist/tokens/components/control.css +81 -3
  212. package/dist/tokens/components/data-display.css +9 -0
  213. package/dist/tokens/components/descriptions.css +11 -0
  214. package/dist/tokens/components/flex.css +8 -0
  215. package/dist/tokens/components/navigation.css +55 -0
  216. package/dist/tokens/components/shell.css +100 -5
  217. package/dist/tokens/components/table.css +14 -0
  218. package/dist/tokens/foundation.css +2 -0
  219. package/dist/tokens/semantic/layout.css +9 -0
  220. package/docs/CONSUMER-RULES.md +13 -0
  221. package/docs/DESIGN-AUTHORITY.md +43 -6
  222. package/docs/DEVELOPMENT.md +4 -3
  223. package/docs/FORMS.md +151 -6
  224. package/docs/FRAME-COVERAGE-REPORT.md +29 -16
  225. package/docs/README.md +1 -1
  226. package/docs/STANDARDS-vocabulary-tokens.md +1 -1
  227. package/docs/TESTING.md +15 -6
  228. package/docs/charts/cjk-category-axis.tsx +81 -0
  229. package/docs/data-display/card/index.tsx +22 -0
  230. package/docs/data-display/data-table/examples/antd-parity.tsx +257 -0
  231. package/docs/data-display/data-table/index.tsx +23 -0
  232. package/docs/data-display/descriptions.tsx +41 -0
  233. package/docs/data-display/list-row.tsx +6 -6
  234. package/docs/data-display/scroll-area.tsx +31 -25
  235. package/docs/data-display/table.tsx +104 -45
  236. package/docs/data-display/timeline.tsx +41 -0
  237. package/docs/data-entry/date-picker.tsx +85 -0
  238. package/docs/data-entry/date-range-picker.tsx +26 -0
  239. package/docs/data-entry/form-dynamic-fields.tsx +199 -0
  240. package/docs/data-entry/form.tsx +74 -4
  241. package/docs/data-entry/input-otp.tsx +24 -0
  242. package/docs/data-entry/input.tsx +46 -1
  243. package/docs/data-entry/month-range-picker.tsx +1 -1
  244. package/docs/data-entry/select.tsx +27 -0
  245. package/docs/data-entry/switch.tsx +41 -0
  246. package/docs/data-entry/textarea.tsx +38 -0
  247. package/docs/data-entry/time-picker.tsx +85 -1
  248. package/docs/data-entry/time-range-picker.tsx +55 -0
  249. package/docs/data-entry/transfer.tsx +17 -0
  250. package/docs/data-entry/upload.tsx +56 -12
  251. package/docs/feedback/tooltip.tsx +1 -1
  252. package/docs/general/activity.tsx +2 -2
  253. package/docs/general/button/index.tsx +14 -1
  254. package/docs/general/typography.tsx +14 -1
  255. package/docs/layout/app-launcher.tsx +195 -0
  256. package/docs/layout/app-shell-arrangements.tsx +5 -5
  257. package/docs/layout/app-shell.tsx +11 -0
  258. package/docs/layout/flex.tsx +50 -0
  259. package/docs/layout/responsive-grid.tsx +21 -1
  260. package/docs/layout/topbar.tsx +5 -9
  261. package/docs/navigation/app-setting-picker.tsx +11 -0
  262. package/docs/navigation/breadcrumb.tsx +48 -0
  263. package/docs/navigation/dropdown-menu.tsx +21 -0
  264. package/docs/navigation/pagination.tsx +52 -0
  265. package/docs/navigation/steps.tsx +37 -0
  266. package/docs/navigation/tabs.tsx +97 -1
  267. package/docs/query/button-refetch.tsx +1 -0
  268. package/docs/showcase/settings-security-mfa.tsx +3 -3
  269. package/package.json +24 -4
  270. package/scripts/_agent-setup.mjs +76 -9
  271. package/scripts/init-guinea-pig.mjs +26 -4
  272. package/scripts/ui-audit.mjs +243 -30
  273. package/scripts/visual-audit.mjs +45 -7
@@ -0,0 +1,257 @@
1
+ import { useState } from "react";
2
+
3
+ import {
4
+ Card,
5
+ CardContent,
6
+ Badge,
7
+ DataTable,
8
+ Descriptions,
9
+ TableCell,
10
+ TableRow,
11
+ type ColumnDef,
12
+ } from "@godxjp/ui/data-display";
13
+ import { Text } from "@godxjp/ui/general";
14
+ import { Flex, PageContainer } from "@godxjp/ui/layout";
15
+
16
+ /**
17
+ * DataTable / Descriptions — the Ant Design 6.6.2 parity surface on one screen: frozen columns
18
+ * (`fixed`), truncation (`ellipsis`), multi-column sort (`sorter.multiple`), header filters
19
+ * (`filters` + `onFilter`), the full `rowSelection` object, `expandable` detail rows, a `summary`
20
+ * totals row, a `scroll` envelope and a bordered `Descriptions` on a responsive column ladder.
21
+ *
22
+ * It is also the MEASUREMENT surface: the frozen columns and the scroll envelope are geometry, and
23
+ * geometry is verified against this page in a browser, not by eye.
24
+ */
25
+ type Line = {
26
+ id: string;
27
+ code: string;
28
+ partner: string;
29
+ note: string;
30
+ status: "active" | "pending" | "failed";
31
+ region: string;
32
+ owner: string;
33
+ updated: string;
34
+ amount: number;
35
+ };
36
+
37
+ const STATUS_TONE = { active: "success", pending: "warning", failed: "destructive" } as const;
38
+ const STATUS_LABEL = { active: "有効", pending: "保留", failed: "失敗" } as const;
39
+
40
+ const BASE_ROWS: Line[] = [
41
+ {
42
+ id: "L-1",
43
+ code: "INV-0312",
44
+ partner: "株式会社ベトヤ",
45
+ note: "四月分の請求。検収は完了しているが振込確認が未了のため保留にしている。",
46
+ status: "active",
47
+ region: "関東",
48
+ owner: "田中",
49
+ updated: "2024-04-12",
50
+ amount: 482000,
51
+ },
52
+ {
53
+ id: "L-2",
54
+ code: "INV-0311",
55
+ partner: "ハノイ物流",
56
+ note: "越境輸送分。通関書類の差し替えを依頼済み。",
57
+ status: "pending",
58
+ region: "海外",
59
+ owner: "佐藤",
60
+ updated: "2024-04-11",
61
+ amount: 128400,
62
+ },
63
+ {
64
+ id: "L-3",
65
+ code: "INV-0310",
66
+ partner: "GMO決済",
67
+ note: "決済手数料。月次で自動計上される。",
68
+ status: "active",
69
+ region: "関東",
70
+ owner: "田中",
71
+ updated: "2024-04-10",
72
+ amount: 64800,
73
+ },
74
+ {
75
+ id: "L-4",
76
+ code: "INV-0309",
77
+ partner: "東京ロジ",
78
+ note: "再送分。前回の請求が差し戻されたため再発行している。",
79
+ status: "failed",
80
+ region: "関東",
81
+ owner: "鈴木",
82
+ updated: "2024-04-09",
83
+ amount: 312000,
84
+ },
85
+ {
86
+ id: "L-5",
87
+ code: "INV-0308",
88
+ partner: "大阪商事",
89
+ note: "年間契約の四半期按分。",
90
+ status: "pending",
91
+ region: "関西",
92
+ owner: "鈴木",
93
+ updated: "2024-04-08",
94
+ amount: 900500,
95
+ },
96
+ ];
97
+
98
+ /**
99
+ * Enough rows for the `scroll.y` envelope to actually bite — five rows never reach an 18rem cap,
100
+ * and a cap that never clips proves nothing.
101
+ */
102
+ const ROWS: Line[] = [
103
+ ...BASE_ROWS,
104
+ ...BASE_ROWS.map((row, i) => ({
105
+ ...row,
106
+ id: `${row.id}-b`,
107
+ code: `INV-02${String(10 + i).padStart(2, "0")}`,
108
+ updated: `2024-03-${String(10 + i).padStart(2, "0")}`,
109
+ })),
110
+ ];
111
+
112
+ const yen = new Intl.NumberFormat("ja-JP", {
113
+ style: "currency",
114
+ currency: "JPY",
115
+ maximumFractionDigits: 0,
116
+ });
117
+
118
+ const columns: ColumnDef<Line>[] = [
119
+ // Frozen to the inline start — the identity column stays put while the grid scrolls.
120
+ { key: "code", header: "伝票番号", fixed: "start", width: "150px", sorter: { multiple: 2 } },
121
+ { key: "partner", header: "取引先", width: "220px" },
122
+ // One line, truncated, with the full text kept as the cell's title.
123
+ { key: "note", header: "備考", ellipsis: true, width: "260px" },
124
+ {
125
+ key: "status",
126
+ header: "状態",
127
+ width: "140px",
128
+ filters: [
129
+ { text: "有効", value: "active" },
130
+ { text: "保留", value: "pending" },
131
+ { text: "失敗", value: "failed" },
132
+ ],
133
+ onFilter: (value, row) => row.status === value,
134
+ render: (row) => <Badge tone={STATUS_TONE[row.status]}>{STATUS_LABEL[row.status]}</Badge>,
135
+ },
136
+ {
137
+ key: "region",
138
+ header: "地域",
139
+ width: "140px",
140
+ filters: [
141
+ { text: "関東", value: "関東" },
142
+ { text: "関西", value: "関西" },
143
+ { text: "海外", value: "海外" },
144
+ ],
145
+ filterMultiple: false,
146
+ onFilter: (value, row) => row.region === value,
147
+ },
148
+ { key: "owner", header: "担当", width: "140px", sorter: { multiple: 1 } },
149
+ {
150
+ key: "updated",
151
+ header: "更新日",
152
+ width: "160px",
153
+ sorter: true,
154
+ sortDirections: ["desc", "asc"],
155
+ },
156
+ // Frozen to the inline end — the amount stays readable at any scroll position.
157
+ {
158
+ key: "amount",
159
+ header: "金額",
160
+ align: "right",
161
+ fixed: "end",
162
+ width: "160px",
163
+ sorter: (a, b) => a.amount - b.amount,
164
+ render: (row) => yen.format(row.amount),
165
+ },
166
+ ];
167
+
168
+ export default function AntdParityDemo() {
169
+ const [selected, setSelected] = useState<string[]>([]);
170
+
171
+ return (
172
+ <PageContainer title="Ant Design パリティ" subtitle="DataTable / Descriptions">
173
+ <Flex direction="col" gap="lg">
174
+ <Card>
175
+ <CardContent flush>
176
+ <DataTable
177
+ data={ROWS}
178
+ columns={columns}
179
+ getRowId={(row) => row.id}
180
+ bordered
181
+ showSorterTooltip
182
+ scroll={{ x: 1400, y: "18rem" }}
183
+ sticky
184
+ rowSelection={{
185
+ selectedRowKeys: selected,
186
+ onChange: (keys) => {
187
+ setSelected(keys);
188
+ },
189
+ selections: true,
190
+ getCheckboxProps: (row) => ({ disabled: row.status === "failed" }),
191
+ preserveSelectedRowKeys: true,
192
+ }}
193
+ expandable={{
194
+ expandedRowRender: (row) => (
195
+ <Descriptions bordered columns={{ sm: 2, lg: 3 }} layout="horizontal">
196
+ <Descriptions.Item label="伝票番号" mono>
197
+ {row.code}
198
+ </Descriptions.Item>
199
+ <Descriptions.Item label="担当">{row.owner}</Descriptions.Item>
200
+ <Descriptions.Item label="地域">{row.region}</Descriptions.Item>
201
+ <Descriptions.Item label="備考" span="filled">
202
+ {row.note}
203
+ </Descriptions.Item>
204
+ </Descriptions>
205
+ ),
206
+ rowExpandable: (row) => row.status !== "failed",
207
+ }}
208
+ summary={(rows) => (
209
+ <TableRow>
210
+ <TableCell />
211
+ <TableCell />
212
+ <TableCell>合計</TableCell>
213
+ <TableCell />
214
+ <TableCell />
215
+ <TableCell />
216
+ <TableCell />
217
+ <TableCell />
218
+ <TableCell>
219
+ {yen.format(rows.reduce((sum, row) => sum + row.amount, 0))}
220
+ </TableCell>
221
+ </TableRow>
222
+ )}
223
+ onRow={(row) => ({ "data-row-key": row.id })}
224
+ >
225
+ <DataTable.Toolbar>
226
+ <DataTable.Search />
227
+ <Flex direction="row" gap="sm" align="center">
228
+ <DataTable.ViewOptions />
229
+ <DataTable.DensityToggle />
230
+ </Flex>
231
+ </DataTable.Toolbar>
232
+ <DataTable.Content />
233
+ <DataTable.Pagination />
234
+ </DataTable>
235
+ </CardContent>
236
+ </Card>
237
+
238
+ <Card>
239
+ <CardContent>
240
+ <Text size="sm" tone="muted">
241
+ 選択中: {selected.length} 件
242
+ </Text>
243
+ <Descriptions bordered columns={{ sm: 2, lg: 4 }}>
244
+ <Descriptions.Item label="伝票数">{ROWS.length}</Descriptions.Item>
245
+ <Descriptions.Item label="通貨">JPY</Descriptions.Item>
246
+ <Descriptions.Item label="期間">2024-04-08 ~ 2024-04-12</Descriptions.Item>
247
+ <Descriptions.Item label="ステータス">確定前</Descriptions.Item>
248
+ <Descriptions.Item label="メモ" span="filled">
249
+ Ant Design 6.6.2 の `bordered` と `column` レスポンシブ指定をそのまま受ける。
250
+ </Descriptions.Item>
251
+ </Descriptions>
252
+ </CardContent>
253
+ </Card>
254
+ </Flex>
255
+ </PageContainer>
256
+ );
257
+ }
@@ -117,6 +117,29 @@ export default function Demo() {
117
117
  subtitle="sortable · selectable · bulk actions · row actions · loading · clickable rows · empty state"
118
118
  >
119
119
  <Flex direction="col" gap="lg">
120
+ <Flex direction="col" gap="sm" id="text-action-width">
121
+ <Text weight="medium">日本語の行アクション</Text>
122
+ <DataTable
123
+ preset="action-collection"
124
+ columns={[
125
+ { key: "partner", header: "取引先" },
126
+ { key: "date", header: "期限日", width: "104px" },
127
+ {
128
+ key: "action",
129
+ header: "操作",
130
+ priority: "actions",
131
+ width: "104px",
132
+ render: () => (
133
+ <Button size="sm" variant="ghost">
134
+ 対応する
135
+ </Button>
136
+ ),
137
+ },
138
+ ]}
139
+ data={invoices}
140
+ getRowId={(row) => row.id}
141
+ />
142
+ </Flex>
120
143
  {/* Primary: sorted (amount desc), one row preselected, clickable rows,
121
144
  controlled density (comfortable), kebab row actions, pagination footer. */}
122
145
  <DataTable
@@ -7,6 +7,7 @@ import {
7
7
  CardTitle,
8
8
  Descriptions,
9
9
  } from "@godxjp/ui/data-display";
10
+ import type { CSSProperties } from "react";
10
11
  import { Text } from "@godxjp/ui/general";
11
12
  import { Flex, PageContainer } from "@godxjp/ui/layout";
12
13
 
@@ -137,6 +138,46 @@ export default function Demo() {
137
138
  </Descriptions>
138
139
  </CardContent>
139
140
  </Card>
141
+
142
+ {/* ── The RULED property panel (gh#414) ─────────────────────────────
143
+ Two token knobs, both OFF by default, turn a horizontal Descriptions into the ruled
144
+ panel a detail page usually wants. They exist so a service stops hand-rolling a
145
+ `<Flex className="min-h-10 border-b">` row: the label column, the gaps and the value
146
+ type step were already Descriptions'; only the rule and the band height were missing.
147
+ The row gap goes to 0 in the same declaration — the gap is the space BETWEEN rules, so
148
+ leaving it would draw detached hairlines instead of a ruled list. */}
149
+ <Card>
150
+ <CardHeader>
151
+ <CardTitle level={2}>案件の詳細 · ruled rows</CardTitle>
152
+ <CardDescription>
153
+ 一行ごとに罫線を引いた属性パネル。--descriptions-row-border と
154
+ --descriptions-row-min-height をテーマで一度設定するだけで、コンポーネントは同じです。
155
+ </CardDescription>
156
+ </CardHeader>
157
+ {/* The knobs are declared on the CARD BODY, not on the grid: custom properties inherit,
158
+ so one scope re-tunes every Descriptions inside it — which is how a service theme
159
+ would set them (once, globally), not per call site. */}
160
+ <CardContent
161
+ style={
162
+ {
163
+ "--descriptions-row-border": "1px solid hsl(var(--border))",
164
+ "--descriptions-row-min-height": "var(--band-height-lg)",
165
+ "--descriptions-row-gap": "0px",
166
+ } as CSSProperties
167
+ }
168
+ >
169
+ <Descriptions columns={1} layout="horizontal">
170
+ <Descriptions.Item label="案件名">2026年度 基幹システム更改</Descriptions.Item>
171
+ <Descriptions.Item label="担当">山田 太郎</Descriptions.Item>
172
+ <Descriptions.Item label="状態">
173
+ <Badge status="active" />
174
+ </Descriptions.Item>
175
+ <Descriptions.Item label="契約ID" mono>
176
+ CT-2026-0088
177
+ </Descriptions.Item>
178
+ </Descriptions>
179
+ </CardContent>
180
+ </Card>
140
181
  </Flex>
141
182
  </PageContainer>
142
183
  );
@@ -57,13 +57,13 @@ export default function Demo() {
57
57
  </CardHeader>
58
58
  <CardContent flush>
59
59
  <ListRow
60
- leading={<Smartphone aria-hidden="true" className="size-4" />}
60
+ leading={<Smartphone aria-hidden="true" />}
61
61
  title="iPhone 15 · Tokyo"
62
62
  description="最終アクセス 2分前 · 153.240.x.x"
63
63
  trailing={<Badge status="active" />}
64
64
  />
65
65
  <ListRow
66
- leading={<Laptop aria-hidden="true" className="size-4" />}
66
+ leading={<Laptop aria-hidden="true" />}
67
67
  title="MacBook Pro · Osaka"
68
68
  description="最終アクセス 3日前 · 126.18.x.x"
69
69
  trailing={
@@ -73,7 +73,7 @@ export default function Demo() {
73
73
  }
74
74
  />
75
75
  <ListRow
76
- leading={<Laptop aria-hidden="true" className="size-4" />}
76
+ leading={<Laptop aria-hidden="true" />}
77
77
  title="Windows · Nagoya"
78
78
  description="最終アクセス 先月 · 49.98.x.x"
79
79
  trailing={
@@ -110,7 +110,7 @@ export default function Demo() {
110
110
  />
111
111
  <ListRow
112
112
  as="li"
113
- leading={<KeyRound aria-hidden="true" className="size-4" />}
113
+ leading={<KeyRound aria-hidden="true" />}
114
114
  title="Passkey · iCloud Keychain"
115
115
  description="2026年3月12日に追加"
116
116
  trailing={<Badge tone="neutral">未使用</Badge>}
@@ -362,14 +362,14 @@ export default function Demo() {
362
362
  <CardContent flush>
363
363
  <ListRow
364
364
  density="default"
365
- leading={<Laptop aria-hidden="true" className="size-4" />}
365
+ leading={<Laptop aria-hidden="true" />}
366
366
  title="MacBook Pro · Osaka"
367
367
  description={'density="default" · 最終アクセス 3日前'}
368
368
  trailing={<Badge status="active" />}
369
369
  />
370
370
  <ListRow
371
371
  density="compact"
372
- leading={<Laptop aria-hidden="true" className="size-4" />}
372
+ leading={<Laptop aria-hidden="true" />}
373
373
  title="MacBook Pro · Osaka"
374
374
  description={'density="compact" · 最終アクセス 3日前'}
375
375
  trailing={<Badge status="active" />}
@@ -11,12 +11,12 @@ import {
11
11
  ScrollBar,
12
12
  } from "@godxjp/ui/data-display";
13
13
  import { Button, Text } from "@godxjp/ui/general";
14
- import { Flex, PageContainer } from "@godxjp/ui/layout";
14
+ import { Flex, PageContainer, ResponsiveGrid } from "@godxjp/ui/layout";
15
15
 
16
16
  /**
17
17
  * ScrollArea — custom scrollbar container. ALWAYS set an explicit height/max-height
18
18
  * (vertical) or width (horizontal) on the wrapper or the scrollbar never appears.
19
- * `type` controls when the bar is visible; `ScrollBar orientation="horizontal"`
19
+ * `type` controls when the bar is visible; `ScrollArea orientation="horizontal"`
20
20
  * adds a horizontal bar. Composed only from real @godxjp/ui components.
21
21
  */
22
22
  const entries = Array.from(
@@ -244,31 +244,37 @@ export default function Demo() {
244
244
 
245
245
  <Card>
246
246
  <CardHeader>
247
- <CardTitle level={2}>
248
- 横スクロール(ScrollBar orientation=&quot;horizontal&quot;)
249
- </CardTitle>
250
- <CardDescription>
251
- 横方向のバーは明示的に ScrollBar
252
- を子要素として配置します。中身は幅を指定して溢れさせます。
253
- </CardDescription>
247
+ <CardTitle level={2}>ScrollArea</CardTitle>
248
+ <CardDescription>orientation="horizontal"</CardDescription>
254
249
  </CardHeader>
255
250
  <CardContent>
256
- <Card variant="outline" className="w-full">
257
- <CardContent flush>
258
- <ScrollArea>
259
- <CardContent>
260
- <Flex gap="lg" className="w-max">
261
- {columns.map((c) => (
262
- <div key={c} className="text-sm whitespace-nowrap tabular-nums">
263
- {c}
264
- </div>
265
- ))}
266
- </Flex>
267
- </CardContent>
268
- <ScrollBar orientation="horizontal" />
269
- </ScrollArea>
270
- </CardContent>
271
- </Card>
251
+ <ScrollArea orientation="horizontal" type="always">
252
+ <ResponsiveGrid flow="columns">
253
+ {columns.map((column) => (
254
+ <Card key={column}>
255
+ <CardContent solo>
256
+ <Text tabular>{column}</Text>
257
+ </CardContent>
258
+ </Card>
259
+ ))}
260
+ </ResponsiveGrid>
261
+ </ScrollArea>
262
+ </CardContent>
263
+ </Card>
264
+
265
+ <Card>
266
+ <CardHeader>
267
+ <CardTitle level={2}>個別の ScrollBar を追加する</CardTitle>
268
+ </CardHeader>
269
+ <CardContent>
270
+ <ScrollArea type="always">
271
+ <ResponsiveGrid flow="columns">
272
+ {columns.map((column) => (
273
+ <Text key={column}>{column}</Text>
274
+ ))}
275
+ </ResponsiveGrid>
276
+ <ScrollBar orientation="horizontal" />
277
+ </ScrollArea>
272
278
  </CardContent>
273
279
  </Card>
274
280