@godxjp/ui 19.1.0 → 19.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 (436) hide show
  1. package/README.md +25 -128
  2. package/dist/app/theme-axes.d.ts +4 -15
  3. package/dist/app/timezones.d.ts +1 -4
  4. package/dist/components/charts/area-chart.d.ts +2 -3
  5. package/dist/components/charts/bar-chart.d.ts +2 -3
  6. package/dist/components/charts/chart-frame.d.ts +7 -16
  7. package/dist/components/charts/chart-summary.d.ts +2 -2
  8. package/dist/components/charts/compact-bar-trend.d.ts +9 -24
  9. package/dist/components/charts/index.d.ts +1 -6
  10. package/dist/components/data-display/badge.d.ts +2 -12
  11. package/dist/components/data-display/card.d.ts +21 -41
  12. package/dist/components/data-display/carousel.d.ts +1 -2
  13. package/dist/components/data-display/code-block.d.ts +4 -0
  14. package/dist/components/data-display/code-block.js +24 -0
  15. package/dist/components/data-display/data-table.d.ts +15 -37
  16. package/dist/components/data-display/data-table.js +1 -3
  17. package/dist/components/data-display/descriptions.d.ts +2 -6
  18. package/dist/components/data-display/descriptions.js +0 -2
  19. package/dist/components/data-display/index.d.ts +4 -0
  20. package/dist/components/data-display/index.js +4 -0
  21. package/dist/components/data-display/list-row.d.ts +3 -22
  22. package/dist/components/data-display/permission-matrix.d.ts +7 -20
  23. package/dist/components/data-display/progress.d.ts +1 -1
  24. package/dist/components/data-display/prose.d.ts +4 -0
  25. package/dist/components/data-display/prose.js +20 -0
  26. package/dist/components/data-display/service-launcher-card.d.ts +3 -10
  27. package/dist/components/data-display/table.d.ts +20 -80
  28. package/dist/components/data-display/table.js +0 -3
  29. package/dist/components/data-display/timeline.d.ts +3 -5
  30. package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
  31. package/dist/components/data-entry/branch-scope-picker.js +0 -1
  32. package/dist/components/data-entry/calendar.d.ts +3 -2
  33. package/dist/components/data-entry/calendar.js +58 -3
  34. package/dist/components/data-entry/command-palette.d.ts +8 -22
  35. package/dist/components/data-entry/date-picker.d.ts +4 -5
  36. package/dist/components/data-entry/date-picker.js +6 -1
  37. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  38. package/dist/components/data-entry/date-range-picker.js +8 -3
  39. package/dist/components/data-entry/form-errors.d.ts +7 -18
  40. package/dist/components/data-entry/form-field.js +1 -5
  41. package/dist/components/data-entry/form.d.ts +1 -9
  42. package/dist/components/data-entry/input.d.ts +16 -14
  43. package/dist/components/data-entry/input.js +3 -0
  44. package/dist/components/data-entry/month-picker.js +2 -2
  45. package/dist/components/data-entry/month-range-picker.d.ts +4 -6
  46. package/dist/components/data-entry/month-range-picker.js +2 -2
  47. package/dist/components/data-entry/number-input.d.ts +1 -5
  48. package/dist/components/data-entry/number-input.js +1 -0
  49. package/dist/components/data-entry/radio.js +0 -1
  50. package/dist/components/data-entry/search-select.d.ts +2 -4
  51. package/dist/components/data-entry/select.d.ts +11 -6
  52. package/dist/components/data-entry/select.js +4 -2
  53. package/dist/components/data-entry/switch.js +0 -1
  54. package/dist/components/data-entry/textarea.d.ts +10 -16
  55. package/dist/components/data-entry/time-picker.d.ts +3 -5
  56. package/dist/components/data-entry/upload-types.d.ts +1 -5
  57. package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
  58. package/dist/components/feedback/dialog.d.ts +6 -15
  59. package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
  60. package/dist/components/feedback/sheet.d.ts +3 -10
  61. package/dist/components/feedback/sheet.js +1 -1
  62. package/dist/components/feedback/sonner.js +2 -3
  63. package/dist/components/general/activity.d.ts +4 -30
  64. package/dist/components/general/button.js +1 -10
  65. package/dist/components/general/logo.d.ts +6 -28
  66. package/dist/components/general/reveal.d.ts +3 -9
  67. package/dist/components/general/typography.d.ts +1 -3
  68. package/dist/components/layout/account-chip.d.ts +8 -0
  69. package/dist/components/layout/account-chip.js +45 -0
  70. package/dist/components/layout/auth-divider.d.ts +2 -9
  71. package/dist/components/layout/auth-shell.d.ts +1 -14
  72. package/dist/components/layout/breadcrumb.d.ts +1 -5
  73. package/dist/components/layout/centered-shell.d.ts +4 -18
  74. package/dist/components/layout/error-surface.d.ts +11 -28
  75. package/dist/components/layout/error-surface.js +4 -1
  76. package/dist/components/layout/index.d.ts +2 -0
  77. package/dist/components/layout/index.js +2 -0
  78. package/dist/components/layout/legal-document-shell.d.ts +5 -28
  79. package/dist/components/layout/master-detail.d.ts +2 -18
  80. package/dist/components/layout/page-container.js +0 -1
  81. package/dist/components/layout/responsive-grid.d.ts +6 -1
  82. package/dist/components/layout/responsive-grid.js +9 -2
  83. package/dist/components/layout/service-role-panel.d.ts +7 -19
  84. package/dist/components/layout/sidebar.d.ts +5 -27
  85. package/dist/components/layout/sidebar.js +0 -1
  86. package/dist/components/layout/split-pane.d.ts +0 -7
  87. package/dist/components/layout/topbar.d.ts +1 -14
  88. package/dist/components/navigation/app-setting-picker.js +1 -3
  89. package/dist/components/navigation/filter-bar.d.ts +1 -6
  90. package/dist/components/navigation/pagination-utils.d.ts +2 -12
  91. package/dist/components/navigation/tabs-scroll.d.ts +2 -36
  92. package/dist/components/navigation/tabs.js +4 -8
  93. package/dist/components/query/data-state.d.ts +2 -2
  94. package/dist/components/ui/credential-reveal.d.ts +1 -4
  95. package/dist/components/ui/hover-card.d.ts +1 -2
  96. package/dist/components/ui/separator.d.ts +2 -15
  97. package/dist/components/ui/toggle-group.d.ts +1 -5
  98. package/dist/components/ui/toggle.d.ts +6 -31
  99. package/dist/email/brand-mark.d.ts +6 -34
  100. package/dist/email/color.d.ts +7 -17
  101. package/dist/email/geometry.d.ts +4 -8
  102. package/dist/email/index.d.ts +4 -48
  103. package/dist/email/inline-style.d.ts +3 -9
  104. package/dist/email/urgency.d.ts +2 -7
  105. package/dist/form/form-context.d.ts +2 -5
  106. package/dist/form/form-root.d.ts +1 -2
  107. package/dist/i18n/messages/en.json +4 -0
  108. package/dist/i18n/messages/ja.json +4 -0
  109. package/dist/i18n/messages/vi.json +4 -0
  110. package/dist/inertia/index.d.ts +2 -10
  111. package/dist/lib/control-styles.d.ts +10 -21
  112. package/dist/lib/control-styles.js +4 -6
  113. package/dist/lib/datetime/format-date.d.ts +1 -4
  114. package/dist/lib/field-a11y.d.ts +11 -68
  115. package/dist/lib/field-a11y.js +0 -1
  116. package/dist/lib/format.d.ts +4 -8
  117. package/dist/lib/hooks.d.ts +6 -12
  118. package/dist/lib/permission-grid.d.ts +3 -18
  119. package/dist/lib/query-error.d.ts +3 -3
  120. package/dist/props/components/app.prop.d.ts +15 -38
  121. package/dist/props/components/charts.prop.d.ts +2 -3
  122. package/dist/props/components/data-display.prop.d.ts +48 -72
  123. package/dist/props/components/data-entry.prop.d.ts +35 -40
  124. package/dist/props/components/form.prop.d.ts +2 -6
  125. package/dist/props/components/general.prop.d.ts +11 -27
  126. package/dist/props/components/layout.prop.d.ts +89 -260
  127. package/dist/props/components/navigation.prop.d.ts +27 -42
  128. package/dist/props/registry.d.ts +31 -0
  129. package/dist/props/registry.js +33 -0
  130. package/dist/props/vocabulary/data.prop.d.ts +18 -49
  131. package/dist/props/vocabulary/index.d.ts +1 -1
  132. package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
  133. package/dist/props/vocabulary/layout.prop.d.ts +8 -30
  134. package/dist/props/vocabulary/shared.prop.d.ts +3 -2
  135. package/dist/styles/alert-layout.css +1 -32
  136. package/dist/styles/badge-layout.css +4 -18
  137. package/dist/styles/base.css +14 -113
  138. package/dist/styles/card-layout.css +6 -128
  139. package/dist/styles/chart-layout.css +2 -17
  140. package/dist/styles/control.css +380 -458
  141. package/dist/styles/core.css +21 -0
  142. package/dist/styles/data-display-layout.css +175 -94
  143. package/dist/styles/data-entry-layout.css +0 -45
  144. package/dist/styles/density.css +1 -30
  145. package/dist/styles/dialog-layout.css +5 -69
  146. package/dist/styles/focus-ring.css +13 -87
  147. package/dist/styles/fonts.css +1 -31
  148. package/dist/styles/form-layout.css +7 -91
  149. package/dist/styles/index.css +2 -20
  150. package/dist/styles/layout.css +38 -456
  151. package/dist/styles/logo-layout.css +1 -35
  152. package/dist/styles/motion.css +3 -42
  153. package/dist/styles/navigation-layout.css +3 -50
  154. package/dist/styles/shell-layout.css +37 -403
  155. package/dist/styles/table-layout.css +16 -274
  156. package/dist/styles/text-layout.css +7 -21
  157. package/dist/styles/toggle.css +1 -23
  158. package/dist/theme/dxs.canonical.css +1 -55
  159. package/dist/theme/example.service.css +1 -26
  160. package/dist/theme/famgia.service.css +5 -15
  161. package/dist/tokens/axes.css +3 -40
  162. package/dist/tokens/base.css +1 -4
  163. package/dist/tokens/components/activity.css +6 -42
  164. package/dist/tokens/components/badge.css +4 -13
  165. package/dist/tokens/components/banner.css +4 -9
  166. package/dist/tokens/components/card.css +32 -88
  167. package/dist/tokens/components/chart.css +9 -26
  168. package/dist/tokens/components/control.css +37 -222
  169. package/dist/tokens/components/data-display.css +28 -79
  170. package/dist/tokens/components/data-entry.css +5 -19
  171. package/dist/tokens/components/descriptions.css +7 -27
  172. package/dist/tokens/components/email.css +38 -84
  173. package/dist/tokens/components/error-surface.css +2 -18
  174. package/dist/tokens/components/feedback.css +27 -124
  175. package/dist/tokens/components/form.css +13 -45
  176. package/dist/tokens/components/legal-document.css +16 -41
  177. package/dist/tokens/components/list-row.css +11 -36
  178. package/dist/tokens/components/logo.css +2 -57
  179. package/dist/tokens/components/navigation.css +16 -94
  180. package/dist/tokens/components/scroll-area.css +2 -18
  181. package/dist/tokens/components/separator.css +8 -30
  182. package/dist/tokens/components/sheet.css +3 -14
  183. package/dist/tokens/components/shell.css +53 -307
  184. package/dist/tokens/components/sidebar.css +5 -22
  185. package/dist/tokens/components/table.css +19 -140
  186. package/dist/tokens/components/toggle.css +3 -65
  187. package/dist/tokens/components/upload.css +7 -43
  188. package/dist/tokens/foundation.css +108 -383
  189. package/dist/tokens/semantic/layout.css +33 -207
  190. package/docs/CANONICAL-CONTRACTS.md +206 -0
  191. package/docs/COMPONENTS.md +157 -0
  192. package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
  193. package/docs/CONSUMER-RULES.md +14 -0
  194. package/docs/CUSTOMER-THEMING.md +162 -0
  195. package/docs/DATETIME.md +69 -0
  196. package/docs/DEVELOPMENT.md +173 -0
  197. package/docs/FORMS.md +143 -0
  198. package/docs/FRAME-A11Y-CI.md +267 -0
  199. package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
  200. package/docs/FRAME-COVERAGE-REPORT.md +140 -0
  201. package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
  202. package/docs/FRAME-COVERAGE.md +29 -0
  203. package/docs/PROPS-REGISTRY.md +61 -0
  204. package/docs/PROPS-VOCABULARY.md +100 -0
  205. package/docs/README.md +60 -0
  206. package/docs/REGISTRY.md +70 -0
  207. package/docs/SPACING.md +56 -0
  208. package/docs/STANDARDS-vocabulary-tokens.md +48 -0
  209. package/docs/TESTING.md +98 -0
  210. package/docs/TOKENS.md +347 -0
  211. package/docs/asset-modules.d.ts +46 -0
  212. package/docs/assets/cover-terrain.svg +6 -0
  213. package/docs/assets/portrait-amber.svg +5 -0
  214. package/docs/assets/portrait-clay.svg +5 -0
  215. package/docs/assets/portrait-indigo.svg +5 -0
  216. package/docs/assets/portrait-iris.svg +5 -0
  217. package/docs/assets/portrait-moss.svg +5 -0
  218. package/docs/assets/portrait-plum.svg +5 -0
  219. package/docs/assets/portrait-slate.svg +5 -0
  220. package/docs/charts/compact-bar-trend.tsx +328 -0
  221. package/docs/charts/size-tiers.tsx +192 -0
  222. package/docs/data-display/accordion.tsx +99 -0
  223. package/docs/data-display/avatar.tsx +355 -0
  224. package/docs/data-display/badge.tsx +247 -0
  225. package/docs/data-display/card/examples/detail-panel.tsx +106 -0
  226. package/docs/data-display/card/index.md +3 -0
  227. package/docs/data-display/card/index.tsx +285 -0
  228. package/docs/data-display/carousel.tsx +156 -0
  229. package/docs/data-display/charts.tsx +198 -0
  230. package/docs/data-display/code-block.tsx +90 -0
  231. package/docs/data-display/collapsible.tsx +162 -0
  232. package/docs/data-display/credential-reveal.tsx +145 -0
  233. package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
  234. package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
  235. package/docs/data-display/data-table/examples/list-page.tsx +175 -0
  236. package/docs/data-display/data-table/index.md +5 -0
  237. package/docs/data-display/data-table/index.tsx +295 -0
  238. package/docs/data-display/descriptions.tsx +143 -0
  239. package/docs/data-display/empty-state.tsx +164 -0
  240. package/docs/data-display/hover-card.tsx +181 -0
  241. package/docs/data-display/list-row.tsx +420 -0
  242. package/docs/data-display/permission-matrix.tsx +184 -0
  243. package/docs/data-display/popover-touch.tsx +27 -0
  244. package/docs/data-display/popover.tsx +245 -0
  245. package/docs/data-display/progress.tsx +84 -0
  246. package/docs/data-display/prose.tsx +105 -0
  247. package/docs/data-display/qr-code.tsx +68 -0
  248. package/docs/data-display/scroll-area.tsx +271 -0
  249. package/docs/data-display/service-launcher-card.tsx +145 -0
  250. package/docs/data-display/stat-card.tsx +99 -0
  251. package/docs/data-display/table.tsx +251 -0
  252. package/docs/data-display/timeline.tsx +112 -0
  253. package/docs/data-display/touch-actions.tsx +36 -0
  254. package/docs/data-display/tree-list.tsx +107 -0
  255. package/docs/data-entry/branch-scope-picker.tsx +123 -0
  256. package/docs/data-entry/calendar.tsx +180 -0
  257. package/docs/data-entry/cascader.tsx +378 -0
  258. package/docs/data-entry/checkbox.tsx +256 -0
  259. package/docs/data-entry/color-picker.tsx +117 -0
  260. package/docs/data-entry/command-palette.tsx +179 -0
  261. package/docs/data-entry/command.tsx +262 -0
  262. package/docs/data-entry/country-picker-recipe.tsx +170 -0
  263. package/docs/data-entry/date-picker.tsx +191 -0
  264. package/docs/data-entry/date-range-picker.tsx +149 -0
  265. package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
  266. package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
  267. package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
  268. package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
  269. package/docs/data-entry/form-field/index.md +8 -0
  270. package/docs/data-entry/form-field/index.tsx +326 -0
  271. package/docs/data-entry/form-inertia.tsx +80 -0
  272. package/docs/data-entry/form-root.tsx +102 -0
  273. package/docs/data-entry/form.tsx +724 -0
  274. package/docs/data-entry/input-otp.tsx +231 -0
  275. package/docs/data-entry/input.tsx +114 -0
  276. package/docs/data-entry/label.tsx +100 -0
  277. package/docs/data-entry/month-picker.tsx +101 -0
  278. package/docs/data-entry/month-range-picker.tsx +115 -0
  279. package/docs/data-entry/number-input.tsx +240 -0
  280. package/docs/data-entry/password-input.tsx +106 -0
  281. package/docs/data-entry/password-strength.tsx +97 -0
  282. package/docs/data-entry/radio-group.tsx +95 -0
  283. package/docs/data-entry/rating.tsx +87 -0
  284. package/docs/data-entry/search-input.tsx +120 -0
  285. package/docs/data-entry/select-async-contracts.tsx +108 -0
  286. package/docs/data-entry/select-matrix.tsx +204 -0
  287. package/docs/data-entry/select.tsx +369 -0
  288. package/docs/data-entry/slider.tsx +130 -0
  289. package/docs/data-entry/switch.tsx +67 -0
  290. package/docs/data-entry/tag-input.tsx +108 -0
  291. package/docs/data-entry/textarea.tsx +209 -0
  292. package/docs/data-entry/time-picker.tsx +99 -0
  293. package/docs/data-entry/toggle-count.tsx +293 -0
  294. package/docs/data-entry/toggle-group.tsx +225 -0
  295. package/docs/data-entry/toggle.tsx +127 -0
  296. package/docs/data-entry/transfer.tsx +97 -0
  297. package/docs/data-entry/tree-select.tsx +204 -0
  298. package/docs/data-entry/upload.tsx +184 -0
  299. package/docs/feedback/alert-dialog.tsx +270 -0
  300. package/docs/feedback/alert.tsx +248 -0
  301. package/docs/feedback/banner.tsx +183 -0
  302. package/docs/feedback/danger-confirm.tsx +88 -0
  303. package/docs/feedback/dialog-touch.tsx +24 -0
  304. package/docs/feedback/dialog.tsx +193 -0
  305. package/docs/feedback/sheet.tsx +410 -0
  306. package/docs/feedback/skeleton.tsx +111 -0
  307. package/docs/feedback/toast.tsx +135 -0
  308. package/docs/feedback/tooltip.tsx +171 -0
  309. package/docs/feedback/two-factor-setup.tsx +68 -0
  310. package/docs/foundation/_email-specimen.ts +274 -0
  311. package/docs/foundation/colors.tsx +202 -0
  312. package/docs/foundation/density.tsx +232 -0
  313. package/docs/foundation/email-tokens.tsx +306 -0
  314. package/docs/foundation/radius-shadow.tsx +152 -0
  315. package/docs/foundation/spacing.tsx +211 -0
  316. package/docs/foundation/typography.tsx +147 -0
  317. package/docs/general/activity.tsx +224 -0
  318. package/docs/general/button/examples/destructive-confirm.tsx +90 -0
  319. package/docs/general/button/examples/form-actions.tsx +85 -0
  320. package/docs/general/button/examples/toolbar.tsx +160 -0
  321. package/docs/general/button/index.md +12 -0
  322. package/docs/general/button/index.tsx +211 -0
  323. package/docs/general/logo.tsx +131 -0
  324. package/docs/general/reveal.tsx +41 -0
  325. package/docs/general/typography.tsx +152 -0
  326. package/docs/layout/account-chip.tsx +72 -0
  327. package/docs/layout/admin-collection.tsx +122 -0
  328. package/docs/layout/app-shell.tsx +374 -0
  329. package/docs/layout/aspect-ratio.tsx +119 -0
  330. package/docs/layout/auth-account-summary.tsx +103 -0
  331. package/docs/layout/auth-divider.tsx +28 -0
  332. package/docs/layout/auth-footer.tsx +37 -0
  333. package/docs/layout/auth-identity.tsx +36 -0
  334. package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
  335. package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
  336. package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
  337. package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
  338. package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
  339. package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
  340. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
  341. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
  342. package/docs/layout/auth-recovery/index.md +140 -0
  343. package/docs/layout/auth-recovery/index.tsx +96 -0
  344. package/docs/layout/auth-shell-context.tsx +103 -0
  345. package/docs/layout/auth-shell-device.tsx +112 -0
  346. package/docs/layout/auth-shell-registration.tsx +335 -0
  347. package/docs/layout/auth-shell-variants.tsx +139 -0
  348. package/docs/layout/auth-shell.tsx +59 -0
  349. package/docs/layout/auth-stack.tsx +40 -0
  350. package/docs/layout/centered-shell.tsx +102 -0
  351. package/docs/layout/error-surface/examples/application-403.tsx +84 -0
  352. package/docs/layout/error-surface/examples/application-404.tsx +77 -0
  353. package/docs/layout/error-surface/examples/system-500.tsx +47 -0
  354. package/docs/layout/error-surface/examples/system-503.tsx +48 -0
  355. package/docs/layout/error-surface/index.md +153 -0
  356. package/docs/layout/error-surface/index.tsx +239 -0
  357. package/docs/layout/flex.tsx +262 -0
  358. package/docs/layout/legal-document-shell/_data.ts +110 -0
  359. package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
  360. package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
  361. package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
  362. package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
  363. package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
  364. package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
  365. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
  366. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
  367. package/docs/layout/legal-document-shell/index.md +51 -0
  368. package/docs/layout/legal-document-shell/index.tsx +101 -0
  369. package/docs/layout/master-detail.tsx +387 -0
  370. package/docs/layout/org-switcher.tsx +131 -0
  371. package/docs/layout/page-container.tsx +946 -0
  372. package/docs/layout/resizable-panel.tsx +419 -0
  373. package/docs/layout/responsive-grid.tsx +235 -0
  374. package/docs/layout/separator.tsx +327 -0
  375. package/docs/layout/service-role-panel.tsx +144 -0
  376. package/docs/layout/sidebar.tsx +586 -0
  377. package/docs/layout/split-pane.tsx +451 -0
  378. package/docs/layout/topbar.tsx +347 -0
  379. package/docs/navigation/app-setting-picker.tsx +141 -0
  380. package/docs/navigation/breadcrumb.tsx +128 -0
  381. package/docs/navigation/context-menu.tsx +117 -0
  382. package/docs/navigation/dropdown-menu.tsx +213 -0
  383. package/docs/navigation/filter-bar.tsx +227 -0
  384. package/docs/navigation/menubar.tsx +141 -0
  385. package/docs/navigation/navigation-menu.tsx +165 -0
  386. package/docs/navigation/pagination.tsx +241 -0
  387. package/docs/navigation/steps.tsx +263 -0
  388. package/docs/navigation/tabs-rtl.tsx +28 -0
  389. package/docs/navigation/tabs.tsx +308 -0
  390. package/docs/navigation/toolbar.tsx +339 -0
  391. package/docs/providers/app-provider.tsx +191 -0
  392. package/docs/providers/format-date.tsx +230 -0
  393. package/docs/query/button-refetch.tsx +160 -0
  394. package/docs/query/data-state.tsx +192 -0
  395. package/docs/query/infinite-query-state.tsx +93 -0
  396. package/docs/query/mutation-feedback.tsx +70 -0
  397. package/docs/query/prefetch-link.tsx +262 -0
  398. package/docs/query/touch-actions.tsx +68 -0
  399. package/docs/showcase/acme-portal.tsx +441 -0
  400. package/docs/showcase/acme-website.tsx +455 -0
  401. package/docs/showcase/case1-warehouse-dashboard.tsx +343 -0
  402. package/docs/showcase/case2-employee-me.tsx +441 -0
  403. package/docs/showcase/case3-approval-workflow.tsx +527 -0
  404. package/docs/showcase/case4-login.tsx +307 -0
  405. package/docs/showcase/case5-shift-calendar.tsx +795 -0
  406. package/docs/showcase/case6-agency-handy.tsx +1072 -0
  407. package/docs/showcase/futurelastic-web.tsx +390 -0
  408. package/docs/showcase/org-switcher.tsx +313 -0
  409. package/docs/showcase/permission-matrix.tsx +343 -0
  410. package/docs/showcase/public-landing.tsx +210 -0
  411. package/docs/showcase/settings-account-sections.tsx +559 -0
  412. package/docs/showcase/settings-security-mfa.tsx +145 -0
  413. package/docs/showcase/table-approval-queue.tsx +199 -0
  414. package/docs/showcase/table-bulk-actions.tsx +460 -0
  415. package/docs/showcase/table-compact-kintone.tsx +438 -0
  416. package/docs/showcase/table-conditional-format.tsx +367 -0
  417. package/docs/showcase/table-crud-list.tsx +544 -0
  418. package/docs/showcase/table-density.tsx +340 -0
  419. package/docs/showcase/table-expandable-rows.tsx +471 -0
  420. package/docs/showcase/table-filter-chips.tsx +461 -0
  421. package/docs/showcase/table-footer-totals.tsx +311 -0
  422. package/docs/showcase/table-grouped-subtotals.tsx +388 -0
  423. package/docs/showcase/table-master-detail.tsx +479 -0
  424. package/docs/showcase/table-pagination.tsx +320 -0
  425. package/docs/showcase/table-states.tsx +363 -0
  426. package/docs/showcase/table-sticky-columns.tsx +373 -0
  427. package/docs/showcase/table-tree-rows.tsx +444 -0
  428. package/docs/showcase/table-view-tabs.tsx +488 -0
  429. package/package.json +9 -11
  430. package/scripts/_agent-setup.mjs +16 -2
  431. package/scripts/audit-hook.mjs +3 -13
  432. package/scripts/init-agent-kit.mjs +1 -14
  433. package/scripts/postinstall.mjs +12 -12
  434. package/scripts/ui-audit.mjs +93 -31
  435. package/scripts/visual-audit-rules.mjs +51 -7
  436. package/scripts/visual-audit.mjs +118 -47
@@ -0,0 +1,145 @@
1
+ import * as React from "react";
2
+ import {
3
+ Card,
4
+ CardContent,
5
+ CardDescription,
6
+ CardHeader,
7
+ CardTitle,
8
+ CredentialReveal,
9
+ } from "@godxjp/ui/data-display";
10
+ import { Button } from "@godxjp/ui/general";
11
+ import { Flex, PageContainer } from "@godxjp/ui/layout";
12
+ import {
13
+ Dialog,
14
+ DialogContent,
15
+ DialogDescription,
16
+ DialogHeader,
17
+ DialogTitle,
18
+ } from "@godxjp/ui/feedback";
19
+
20
+ const API_KEY = "gxp_live_8Fh2kQ9wR7nZ1xV4bT6mL0cD3pS5yJ";
21
+ const CLIENT_SECRET = "cs_9aE2rT4uY6iO8pA1sD3fG5hJ7kL9zX";
22
+
23
+ /**
24
+ * CredentialReveal — the one-time secret pattern (device credential / API key / service-account
25
+ * secret). Masked by default, a show/hide toggle, a copy button that confirms the copy, an optional
26
+ * download, and an acknowledge action to pair with a Dialog. Composed only from real @godxjp/ui.
27
+ */
28
+ export default function Demo() {
29
+ const [open, setOpen] = React.useState(false);
30
+
31
+ return (
32
+ <PageContainer
33
+ title="CredentialReveal"
34
+ subtitle="一度だけ表示するシークレット · マスク解除 + コピー + 期限警告"
35
+ >
36
+ <Flex direction="col" gap="lg">
37
+ <Card>
38
+ <CardHeader>
39
+ <CardTitle level={2}>Dialog に組み込む(推奨)</CardTitle>
40
+ <CardDescription>
41
+ APIキー発行直後の一度きり表示。onAcknowledge で「保存しました」を押すまで閉じません。
42
+ </CardDescription>
43
+ </CardHeader>
44
+ <CardContent>
45
+ <Button onClick={() => setOpen(true)}>APIキーを発行</Button>
46
+ <Dialog open={open} onOpenChange={setOpen}>
47
+ <DialogContent>
48
+ <DialogHeader>
49
+ <DialogTitle>APIキーを発行しました</DialogTitle>
50
+ <DialogDescription>
51
+ このキーはこの画面でのみ表示されます。安全な場所に保管してください。
52
+ </DialogDescription>
53
+ </DialogHeader>
54
+ <CredentialReveal
55
+ label="APIキー"
56
+ secret={API_KEY}
57
+ downloadable
58
+ onAcknowledge={() => setOpen(false)}
59
+ />
60
+ </DialogContent>
61
+ </Dialog>
62
+ </CardContent>
63
+ </Card>
64
+
65
+ <Card>
66
+ <CardHeader>
67
+ <CardTitle level={2}>インライン(マスク解除 + コピー)</CardTitle>
68
+ <CardDescription>
69
+ 既定はマスク表示。目のトグルで表示、コピーボタンは成功を aria-live で通知します。
70
+ </CardDescription>
71
+ </CardHeader>
72
+ <CardContent>
73
+ <CredentialReveal label="クライアントシークレット" secret={CLIENT_SECRET} />
74
+ </CardContent>
75
+ </Card>
76
+
77
+ <Card>
78
+ <CardHeader>
79
+ <CardTitle level={2}>ダウンロード付き</CardTitle>
80
+ <CardDescription>
81
+ downloadable でファイル保存を提供。復旧コードやブートストラップ資格情報向け。
82
+ </CardDescription>
83
+ </CardHeader>
84
+ <CardContent>
85
+ <CredentialReveal
86
+ label="リカバリーコード"
87
+ secret="8QF2-K9WR-7NZ1-XV4B-T6ML"
88
+ downloadable
89
+ downloadFileName="recovery-code.txt"
90
+ />
91
+ </CardContent>
92
+ </Card>
93
+
94
+ <Card>
95
+ <CardHeader>
96
+ <CardTitle level={2}>Tone</CardTitle>
97
+ <CardDescription>
98
+ 警告帯の severity は tone。warning(既定)は保管を促す通常の一度きり表示、destructive
99
+ は失効・再発行が必要な重大な扱い、info は運用上の補足に使います。
100
+ </CardDescription>
101
+ </CardHeader>
102
+ <CardContent>
103
+ <Flex direction="col" gap="md">
104
+ <CredentialReveal
105
+ label="サービスアカウント鍵"
106
+ secret="svc_3pS5yJ8Fh2kQ9wR7nZ1xV4bT"
107
+ tone="warning"
108
+ />
109
+ <CredentialReveal
110
+ label="デバイス資格情報"
111
+ secret="dev_7h2K9wR7nZ1xV4bT6mL0cD"
112
+ tone="destructive"
113
+ />
114
+ <CredentialReveal
115
+ label="Webhook 署名シークレット"
116
+ secret="whsec_1xV4bT6mL0cD3pS5yJ8Fh2kQ"
117
+ tone="info"
118
+ warning="このシークレットは Webhook 署名の検証にのみ使用します。"
119
+ />
120
+ </Flex>
121
+ </CardContent>
122
+ </Card>
123
+
124
+ <Card>
125
+ <CardHeader>
126
+ <CardTitle level={2}>Size</CardTitle>
127
+ <CardDescription>
128
+ size は資格情報行の高さと操作ボタンの寸法を決めます。xs / sm
129
+ は明細行や設定表の中に、md (既定)は単独のカードに、lg
130
+ は発行直後のダイアログで使います。
131
+ </CardDescription>
132
+ </CardHeader>
133
+ <CardContent>
134
+ <Flex direction="col" gap="md">
135
+ <CredentialReveal label="xs" secret="key_xs_9wR7nZ1xV4bT6mL0cD" size="xs" />
136
+ <CredentialReveal label="sm" secret="key_sm_9wR7nZ1xV4bT6mL0cD" size="sm" />
137
+ <CredentialReveal label="md(既定)" secret="key_md_9wR7nZ1xV4bT6mL0cD" size="md" />
138
+ <CredentialReveal label="lg" secret="key_lg_9wR7nZ1xV4bT6mL0cD" size="lg" />
139
+ </Flex>
140
+ </CardContent>
141
+ </Card>
142
+ </Flex>
143
+ </PageContainer>
144
+ );
145
+ }
@@ -0,0 +1,212 @@
1
+ import { useState } from "react";
2
+
3
+ import { Badge, Card, CardContent, DataTable, type ColumnDef } from "@godxjp/ui/data-display";
4
+ import { Button, Text } from "@godxjp/ui/general";
5
+ import {
6
+ AppShell,
7
+ Flex,
8
+ PageContainer,
9
+ Sidebar,
10
+ type SidebarSectionProp,
11
+ Topbar,
12
+ } from "@godxjp/ui/layout";
13
+ import {
14
+ DropdownMenu,
15
+ DropdownMenuContent,
16
+ DropdownMenuItem,
17
+ DropdownMenuTrigger,
18
+ } from "@godxjp/ui/navigation";
19
+ import { ClipboardCheck, LayoutDashboard, MoreHorizontal, ScrollText } from "lucide-react";
20
+
21
+ /**
22
+ * Access-approval queue (SCR-105 / gh#253) — the canonical five-column approval collection driven
23
+ * by the TanStack-powered DataTable, at 1440 · 1024 · 390 with ONLY public API.
24
+ *
25
+ * The whole responsive contract is two props: `preset="action-collection"` on the DataTable and a
26
+ * `priority` on each `ColumnDef`. Below the collapse step the package swaps the desktop intrinsic
27
+ * column widths for the token-owned priority measures (`--table-action-collection-*`) under
28
+ * `table-layout: fixed`, lets cells wrap, and releases the surface's
29
+ * `--table-surface-min-inline-size` floor — so 申請者 · 対象 · 理由 · 申請日時 · 操作 all stay
30
+ * inside the initial 390px frame. No page-local CSS, no consumer width, no hidden column, no
31
+ * horizontal scroll.
32
+ *
33
+ * It stays a REAL table at every width — `<thead>` / `<th scope>` / `<tr>` / `<td>` are untouched,
34
+ * sorting keeps `aria-sort`, and the row-action affordance is the column whose measure is reserved
35
+ * first, so it can never be pushed outside the viewport. Content is JA + EN + VI, including a
36
+ * deliberately long reason and a long resource path.
37
+ */
38
+ type AccessRequest = {
39
+ id: string;
40
+ requester: string;
41
+ requesterMail: string;
42
+ target: string;
43
+ reason: string;
44
+ requestedAt: string;
45
+ state: "pending" | "escalated";
46
+ };
47
+
48
+ const requests: AccessRequest[] = [
49
+ {
50
+ id: "req-1041",
51
+ requester: "田中 太郎",
52
+ requesterMail: "taro.tanaka@example.co.jp",
53
+ target: "会計 / 請求書エクスポート",
54
+ reason: "月次決算のため請求データの一括出力権限が必要です。",
55
+ requestedAt: "2026-08-03T09:12:00+09:00",
56
+ state: "pending",
57
+ },
58
+ {
59
+ id: "req-1042",
60
+ requester: "Nguyễn Thị Hồng Ánh",
61
+ requesterMail: "hong.anh.nguyen@example.vn",
62
+ target: "Kho vận / Quản trị phiếu xuất kho khu vực miền Nam",
63
+ reason:
64
+ "Cần quyền quản trị để xử lý phiếu xuất kho tồn đọng của chi nhánh miền Nam trong kỳ kiểm kê quý III.",
65
+ requestedAt: "2026-08-03T11:47:00+09:00",
66
+ state: "escalated",
67
+ },
68
+ {
69
+ id: "req-1043",
70
+ requester: "Margaret Whitmore-Ashcombe",
71
+ requesterMail: "margaret.whitmore@example.com",
72
+ target: "Identity / Service account administration",
73
+ reason: "Rotating the service-account credentials scheduled for the August maintenance window.",
74
+ requestedAt: "2026-08-04T02:05:00+09:00",
75
+ state: "pending",
76
+ },
77
+ {
78
+ id: "req-1044",
79
+ requester: "佐藤 花子",
80
+ requesterMail: "hanako.sato@example.co.jp",
81
+ target: "勤怠 / 部門レポート",
82
+ reason: "部門別の残業集計を確認するため。",
83
+ requestedAt: "2026-08-04T08:30:00+09:00",
84
+ state: "pending",
85
+ },
86
+ ];
87
+
88
+ // ISO-8601 input → locale/timezone-aware display via Intl (never hand-built).
89
+ const requestedAtFormat = new Intl.DateTimeFormat("ja-JP", {
90
+ dateStyle: "short",
91
+ timeStyle: "short",
92
+ timeZone: "Asia/Tokyo",
93
+ });
94
+
95
+ const sections: SidebarSectionProp[] = [
96
+ {
97
+ label: "運用",
98
+ items: [
99
+ { id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
100
+ { id: "approvals", label: "アクセス承認", icon: ClipboardCheck },
101
+ { id: "audit", label: "監査ログ", icon: ScrollText },
102
+ ],
103
+ },
104
+ ];
105
+
106
+ // `priority` is the column-priority contract: primary = the row's subject, secondary = its target,
107
+ // meta = a low-priority stamp, actions = the affordance whose measure is reserved first. The
108
+ // free-text 理由 column is deliberately UNMARKED — it takes whatever space is left.
109
+ const columns: ColumnDef<AccessRequest>[] = [
110
+ {
111
+ key: "requester",
112
+ header: "申請者",
113
+ priority: "primary",
114
+ sortable: true,
115
+ render: (row) => (
116
+ <Flex direction="col" gap="xs" align="start">
117
+ <Text size="sm">{row.requester}</Text>
118
+ <Text size="xs" tone="muted">
119
+ {row.requesterMail}
120
+ </Text>
121
+ </Flex>
122
+ ),
123
+ },
124
+ {
125
+ key: "target",
126
+ header: "対象",
127
+ priority: "secondary",
128
+ render: (row) => (
129
+ <Flex direction="col" gap="xs" align="start">
130
+ <Text size="sm">{row.target}</Text>
131
+ {row.state === "escalated" && <Badge tone="warning">エスカレーション</Badge>}
132
+ </Flex>
133
+ ),
134
+ },
135
+ {
136
+ key: "reason",
137
+ header: "理由",
138
+ render: (row) => <Text size="sm">{row.reason}</Text>,
139
+ },
140
+ {
141
+ key: "requestedAt",
142
+ header: "申請日時",
143
+ priority: "meta",
144
+ sortable: true,
145
+ render: (row) => (
146
+ <Text size="xs" tone="muted">
147
+ <time dateTime={row.requestedAt}>
148
+ {requestedAtFormat.format(new Date(row.requestedAt))}
149
+ </time>
150
+ </Text>
151
+ ),
152
+ },
153
+ {
154
+ key: "actions",
155
+ header: "",
156
+ ariaLabel: "操作",
157
+ priority: "actions",
158
+ enableHiding: false,
159
+ render: (row) => (
160
+ <DropdownMenu>
161
+ <DropdownMenuTrigger asChild>
162
+ <Button variant="ghost" size="xs" aria-label={`${row.requester} の申請の操作`}>
163
+ <MoreHorizontal aria-hidden="true" />
164
+ </Button>
165
+ </DropdownMenuTrigger>
166
+ <DropdownMenuContent align="end">
167
+ <DropdownMenuItem>承認する</DropdownMenuItem>
168
+ <DropdownMenuItem>却下する</DropdownMenuItem>
169
+ <DropdownMenuItem>詳細を表示</DropdownMenuItem>
170
+ </DropdownMenuContent>
171
+ </DropdownMenu>
172
+ ),
173
+ },
174
+ ];
175
+
176
+ export default function DataTableApprovalQueue() {
177
+ const [selected, setSelected] = useState<Set<string>>(new Set());
178
+
179
+ return (
180
+ <AppShell
181
+ sidebar={
182
+ <Sidebar
183
+ product={{ name: "GodX Platform", role: "運用管理" }}
184
+ activeId="approvals"
185
+ sections={sections}
186
+ />
187
+ }
188
+ topbar={<Topbar start={<Text weight="medium">アクセス承認</Text>} />}
189
+ >
190
+ <PageContainer
191
+ title="アクセス承認"
192
+ subtitle="Access approval · Phê duyệt truy cập"
193
+ density="compact"
194
+ variant="flush"
195
+ >
196
+ <Card>
197
+ <CardContent flush>
198
+ <DataTable
199
+ data={requests}
200
+ columns={columns}
201
+ getRowId={(row) => row.id}
202
+ preset="action-collection"
203
+ collapseBelow="sm"
204
+ selected={selected}
205
+ onSelectChange={setSelected}
206
+ />
207
+ </CardContent>
208
+ </Card>
209
+ </PageContainer>
210
+ </AppShell>
211
+ );
212
+ }
@@ -0,0 +1,158 @@
1
+ import { useState } from "react";
2
+
3
+ import { Card, CardContent, Badge, DataTable, type ColumnDef } from "@godxjp/ui/data-display";
4
+ import { Button, Text } from "@godxjp/ui/general";
5
+ import { Flex, PageContainer } from "@godxjp/ui/layout";
6
+ import { Download, CheckCircle2 } from "lucide-react";
7
+
8
+ /**
9
+ * DataTable — full TanStack feature set (the former DataGrid). One unified
10
+ * DataTable now drives column sort, global search, column visibility ("set
11
+ * view"), per-page + numbered pagination, row selection + bulk actions, and
12
+ * density — all on the lean `data` + `columns` API. This demo runs CLIENT mode
13
+ * (manual* flags default to false) so it sorts/filters/paginates in-browser on
14
+ * the sample rows. Composed only from real @godxjp/ui components.
15
+ */
16
+ type Invoice = {
17
+ id: string;
18
+ partner: string;
19
+ amount: number;
20
+ status: "active" | "pending" | "failed" | "draft";
21
+ date: string;
22
+ };
23
+
24
+ const STATUS_TONE = {
25
+ active: "success",
26
+ pending: "warning",
27
+ failed: "destructive",
28
+ draft: "neutral",
29
+ } as const;
30
+
31
+ const STATUS_LABEL = {
32
+ active: "有効",
33
+ pending: "保留",
34
+ failed: "失敗",
35
+ draft: "下書き",
36
+ } as const;
37
+
38
+ const ROWS: Invoice[] = [
39
+ {
40
+ id: "INV-0312",
41
+ partner: "株式会社ベトヤ",
42
+ amount: 482000,
43
+ status: "active",
44
+ date: "2024-04-12",
45
+ },
46
+ { id: "INV-0311", partner: "ハノイ物流", amount: 128400, status: "pending", date: "2024-04-11" },
47
+ { id: "INV-0310", partner: "GMO決済", amount: 64800, status: "draft", date: "2024-04-10" },
48
+ { id: "INV-0309", partner: "東京ロジ", amount: 312000, status: "failed", date: "2024-04-09" },
49
+ { id: "INV-0308", partner: "大阪商事", amount: 905000, status: "active", date: "2024-04-08" },
50
+ { id: "INV-0307", partner: "名古屋運輸", amount: 47300, status: "active", date: "2024-04-07" },
51
+ {
52
+ id: "INV-0306",
53
+ partner: "福岡トレード",
54
+ amount: 218900,
55
+ status: "pending",
56
+ date: "2024-04-06",
57
+ },
58
+ { id: "INV-0305", partner: "札幌興業", amount: 73200, status: "draft", date: "2024-04-05" },
59
+ { id: "INV-0304", partner: "横浜物産", amount: 564000, status: "active", date: "2024-04-04" },
60
+ { id: "INV-0303", partner: "京都製作所", amount: 99800, status: "failed", date: "2024-04-03" },
61
+ { id: "INV-0302", partner: "神戸海運", amount: 341500, status: "active", date: "2024-04-02" },
62
+ { id: "INV-0301", partner: "仙台流通", amount: 28600, status: "pending", date: "2024-04-01" },
63
+ ];
64
+
65
+ const currencyFormatter = new Intl.NumberFormat("ja-JP", {
66
+ style: "currency",
67
+ currency: "JPY",
68
+ maximumFractionDigits: 0,
69
+ });
70
+ const yen = (n: number) => currencyFormatter.format(n);
71
+
72
+ const columns: ColumnDef<Invoice>[] = [
73
+ { key: "id", header: "請求書番号", enableHiding: false },
74
+ { key: "partner", header: "取引先", sortable: true },
75
+ {
76
+ key: "amount",
77
+ header: "金額",
78
+ align: "right",
79
+ sortable: true,
80
+ render: (row) => (
81
+ <Text as="div" weight="medium" tabular className="text-end">
82
+ {yen(row.amount)}
83
+ </Text>
84
+ ),
85
+ },
86
+ {
87
+ key: "status",
88
+ header: "状態",
89
+ render: (row) => <Badge tone={STATUS_TONE[row.status]}>{STATUS_LABEL[row.status]}</Badge>,
90
+ },
91
+ {
92
+ key: "date",
93
+ header: "発行日",
94
+ align: "right",
95
+ render: (row) => (
96
+ <Text as="div" tabular className="text-end">
97
+ {row.date}
98
+ </Text>
99
+ ),
100
+ },
101
+ ];
102
+
103
+ export default function Demo() {
104
+ const [lastClicked, setLastClicked] = useState<string>();
105
+
106
+ return (
107
+ <PageContainer
108
+ title="DataTable · グリッド機能"
109
+ subtitle="TanStack Table 駆動 · 並べ替え・検索・列の表示切替・ページング・選択(@godxjp/ui/data-display)"
110
+ >
111
+ <Card>
112
+ <CardContent flush>
113
+ <DataTable
114
+ columns={columns}
115
+ data={ROWS}
116
+ getRowId={(r) => r.id}
117
+ selectable
118
+ onRowClick={(r) => setLastClicked(r.id)}
119
+ >
120
+ <DataTable.Toolbar>
121
+ <DataTable.BulkActions>
122
+ {(count) => (
123
+ <Flex direction="row" align="center" gap="sm">
124
+ <Text weight="medium" tabular>
125
+ {count} 件選択
126
+ </Text>
127
+ <Button variant="outline" size="sm">
128
+ <Download className="size-4" aria-hidden="true" />
129
+ エクスポート
130
+ </Button>
131
+ <Button size="sm">
132
+ <CheckCircle2 className="size-4" aria-hidden="true" />
133
+ 入金消込
134
+ </Button>
135
+ </Flex>
136
+ )}
137
+ </DataTable.BulkActions>
138
+ <Flex direction="row" align="center" gap="sm" wrap className="ms-auto">
139
+ <DataTable.Search />
140
+ <DataTable.ViewOptions />
141
+ <DataTable.DensityToggle />
142
+ </Flex>
143
+ </DataTable.Toolbar>
144
+
145
+ <DataTable.Content />
146
+ <DataTable.Pagination pageSizeOptions={[5, 10, 20]} />
147
+ </DataTable>
148
+ </CardContent>
149
+ </Card>
150
+
151
+ {lastClicked ? (
152
+ <Text as="p" tone="muted" className="mt-3">
153
+ 行クリック: {lastClicked}
154
+ </Text>
155
+ ) : null}
156
+ </PageContainer>
157
+ );
158
+ }
@@ -0,0 +1,175 @@
1
+ import { useState } from "react";
2
+
3
+ import {
4
+ Badge,
5
+ Card,
6
+ CardContent,
7
+ DataTable,
8
+ type ColumnDef,
9
+ Avatar,
10
+ AvatarFallback,
11
+ } from "@godxjp/ui/data-display";
12
+ import { Button } from "@godxjp/ui/general";
13
+ import {
14
+ AppShell,
15
+ Flex,
16
+ PageContainer,
17
+ Sidebar,
18
+ type SidebarSectionProp,
19
+ Topbar,
20
+ } from "@godxjp/ui/layout";
21
+ import {
22
+ BookOpen,
23
+ Download,
24
+ FileText,
25
+ LayoutDashboard,
26
+ Plus,
27
+ ReceiptText,
28
+ Users,
29
+ } from "lucide-react";
30
+
31
+ /**
32
+ * List-page screen — the DataTable sits inside a Card (CardContent flush) within
33
+ * a default, padded PageContainer, so the table aligns with the page header on the
34
+ * same gutters instead of tearing to the viewport edges. The page title + "新規"
35
+ * action are the header; bulk actions appear only when rows are selected. A
36
+ * complete, real admin list mirroring the reference-design PageContent → Card → Table shape.
37
+ */
38
+ const sections: SidebarSectionProp[] = [
39
+ {
40
+ label: "会計",
41
+ items: [
42
+ { id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
43
+ { id: "journal", label: "仕訳", icon: FileText },
44
+ { id: "invoices", label: "請求書", icon: ReceiptText },
45
+ { id: "partners", label: "取引先", icon: BookOpen },
46
+ ],
47
+ },
48
+ { label: "管理", items: [{ id: "users", label: "ユーザー", icon: Users }] },
49
+ ];
50
+
51
+ type Invoice = {
52
+ id: string;
53
+ partner: string;
54
+ amount: number;
55
+ status: "active" | "pending" | "draft" | "failed";
56
+ date: string;
57
+ };
58
+
59
+ const invoices: Invoice[] = [
60
+ {
61
+ id: "INV-2024-0312",
62
+ partner: "株式会社ベトヤ",
63
+ amount: 482000,
64
+ status: "active",
65
+ date: "2024-04-12",
66
+ },
67
+ {
68
+ id: "INV-2024-0311",
69
+ partner: "ハノイ物流",
70
+ amount: 128400,
71
+ status: "pending",
72
+ date: "2024-04-11",
73
+ },
74
+ { id: "INV-2024-0310", partner: "GMO決済", amount: 64800, status: "draft", date: "2024-04-10" },
75
+ {
76
+ id: "INV-2024-0309",
77
+ partner: "東京ロジ",
78
+ amount: 312000,
79
+ status: "failed",
80
+ date: "2024-04-09",
81
+ },
82
+ { id: "INV-2024-0308", partner: "大阪商事", amount: 96250, status: "active", date: "2024-04-08" },
83
+ ];
84
+
85
+ const yen = new Intl.NumberFormat("ja-JP", {
86
+ style: "currency",
87
+ currency: "JPY",
88
+ maximumFractionDigits: 0,
89
+ });
90
+
91
+ const columns: ColumnDef<Invoice>[] = [
92
+ { key: "id", header: "請求書番号", width: "w-40" },
93
+ { key: "partner", header: "取引先", sortable: true },
94
+ {
95
+ key: "amount",
96
+ header: "金額",
97
+ align: "right",
98
+ sortable: true,
99
+ render: (row) => <span className="tabular-nums">{yen.format(row.amount)}</span>,
100
+ },
101
+ { key: "status", header: "状態", render: (row) => <Badge status={row.status} /> },
102
+ { key: "date", header: "発行日", align: "right", hiddenOnMobile: true },
103
+ ];
104
+
105
+ export default function Demo() {
106
+ const [selected, setSelected] = useState<Set<string>>(new Set());
107
+
108
+ return (
109
+ <AppShell
110
+ sidebar={
111
+ <Sidebar
112
+ activeId="invoices"
113
+ sections={sections}
114
+ onSelect={() => {}}
115
+ product={{ name: "CoreBooks", role: "管理コンソール", color: "hsl(var(--primary))" }}
116
+ />
117
+ }
118
+ topbar={
119
+ <Topbar
120
+ start={
121
+ <Avatar className="rounded-md">
122
+ <AvatarFallback className="bg-primary text-primary-foreground font-bold">
123
+ C
124
+ </AvatarFallback>
125
+ </Avatar>
126
+ }
127
+ />
128
+ }
129
+ >
130
+ <PageContainer
131
+ title="請求書 一覧"
132
+ subtitle="直近30日間の受注データ"
133
+ breadcrumb={[{ label: "請求書" }]}
134
+ extra={
135
+ <Flex direction="row" wrap align="center" gap="sm">
136
+ <Button variant="outline" size="sm">
137
+ <Download />
138
+ エクスポート
139
+ </Button>
140
+ <Button size="sm">
141
+ <Plus />
142
+ 新規請求書
143
+ </Button>
144
+ </Flex>
145
+ }
146
+ >
147
+ <Card>
148
+ <CardContent flush>
149
+ <DataTable
150
+ data={invoices}
151
+ columns={columns}
152
+ getRowId={(row) => row.id}
153
+ selectable
154
+ selected={selected}
155
+ onSelectChange={setSelected}
156
+ onRowClick={() => {}}
157
+ >
158
+ <DataTable.Toolbar>
159
+ <DataTable.BulkActions>
160
+ <Button size="sm" variant="outline">
161
+ 入金消込
162
+ </Button>
163
+ <Button size="sm" variant="outline">
164
+ エクスポート
165
+ </Button>
166
+ </DataTable.BulkActions>
167
+ <DataTable.DensityToggle />
168
+ </DataTable.Toolbar>
169
+ </DataTable>
170
+ </CardContent>
171
+ </Card>
172
+ </PageContainer>
173
+ </AppShell>
174
+ );
175
+ }
@@ -0,0 +1,5 @@
1
+ --- title: Overview ---
2
+
3
+ The admin list primitive — sticky header, sorting, bulk selection, density toggle, cursor pagination, and a built-in empty/loading state. Never wrap it in a `data.length === 0` guard; the empty state renders itself. See Examples for a full list-page screen.
4
+
5
+ See the "Approval queue" example.