@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,586 @@
1
+ import { useState, type CSSProperties } from "react";
2
+ import { Link } from "react-router-dom";
3
+ import {
4
+ AppShell,
5
+ Flex,
6
+ PageContainer,
7
+ Sidebar,
8
+ SidebarHeader,
9
+ SidebarItem,
10
+ SidebarSection,
11
+ Topbar,
12
+ createSidebarLink,
13
+ } from "@godxjp/ui/layout";
14
+ import type { SidebarItemData, SidebarRenderItemProp, SidebarSectionProp } from "@godxjp/ui/layout";
15
+ import {
16
+ Card,
17
+ CardContent,
18
+ CardDescription,
19
+ CardHeader,
20
+ CardTitle,
21
+ Badge,
22
+ Avatar,
23
+ AvatarFallback,
24
+ } from "@godxjp/ui/data-display";
25
+ import { Button, Text } from "@godxjp/ui/general";
26
+ import {
27
+ LayoutDashboard,
28
+ FileText,
29
+ Receipt,
30
+ Users,
31
+ BookOpen,
32
+ Building2,
33
+ ShieldCheck,
34
+ CreditCard,
35
+ Plus,
36
+ Boxes,
37
+ Star,
38
+ Settings,
39
+ PanelLeftClose,
40
+ PanelLeftOpen,
41
+ Search,
42
+ } from "lucide-react";
43
+
44
+ /**
45
+ * Sidebar · data-driven vertical nav rail.
46
+ * Focus: every public prop · sections, groups with children[], product chip,
47
+ * brand header, linkComponent (router links) + SidebarItem asChild, the
48
+ * deprecated renderItem escape hatch, children composition, footer, active
49
+ * item, collapsed icon-only mode.
50
+ * Composed only from real @godxjp/ui components inside an AppShell frame.
51
+ */
52
+
53
+ const FULL_SECTIONS: SidebarSectionProp[] = [
54
+ {
55
+ label: "会計",
56
+ items: [
57
+ { id: "dashboard", label: "ダッシュボード", icon: LayoutDashboard },
58
+ {
59
+ id: "ledger",
60
+ label: "元帳",
61
+ icon: BookOpen,
62
+ children: [
63
+ { id: "journal", label: "仕訳入力", icon: FileText },
64
+ { id: "recurring", label: "定期仕訳", icon: Receipt },
65
+ { id: "coa", label: "勘定科目", icon: CreditCard },
66
+ ],
67
+ },
68
+ { id: "invoices", label: "請求書", icon: Receipt, badge: 3 },
69
+ { id: "bills", label: "仕入請求書", icon: FileText },
70
+ ],
71
+ },
72
+ {
73
+ label: "マスタ",
74
+ items: [
75
+ { id: "partners", label: "取引先", icon: Building2 },
76
+ { id: "items", label: "品目", icon: CreditCard },
77
+ ],
78
+ },
79
+ {
80
+ label: "管理",
81
+ items: [
82
+ { id: "users", label: "ユーザー", icon: Users },
83
+ { id: "roles", label: "権限", icon: ShieldCheck, disabled: true },
84
+ ],
85
+ },
86
+ ];
87
+
88
+ const BRAND_SECTIONS: SidebarSectionProp[] = [
89
+ {
90
+ label: "アプリ",
91
+ items: [
92
+ { id: "home", label: "ホーム", icon: LayoutDashboard },
93
+ { id: "projects", label: "プロジェクト", icon: Boxes },
94
+ { id: "settings", label: "設定", icon: Settings },
95
+ ],
96
+ },
97
+ ];
98
+
99
+ const FAVOURITE_SECTIONS: SidebarSectionProp[] = [
100
+ {
101
+ label: "ナビゲーション",
102
+ items: [
103
+ { id: "overview", label: "概要", icon: LayoutDashboard },
104
+ { id: "reports", label: "レポート", icon: FileText },
105
+ { id: "members", label: "メンバー", icon: Users },
106
+ ],
107
+ },
108
+ ];
109
+
110
+ const FAVOURITE_IDS = new Set(["overview", "members"]);
111
+
112
+ /**
113
+ * badgeTone · what a count MEANS, not what colour it is. `neutral`(既定)は「未読」、
114
+ * `destructive` は「自分宛て」(メンション・DM)。`badge` には数値や文字列だけを渡します ·
115
+ * ここに <Badge> を入れると .sb-badge の中にもう一枚ピルが入り、二重の丸が出ます。
116
+ */
117
+ const MENTION_SECTIONS: SidebarSectionProp[] = [
118
+ {
119
+ label: "チャンネル",
120
+ items: [
121
+ { id: "general", label: "general", icon: Boxes, badge: 12 },
122
+ { id: "accounting", label: "経理", icon: Receipt, badge: 3, badgeTone: "destructive" },
123
+ { id: "design", label: "design", icon: Star, badge: "9+", badgeTone: "neutral" },
124
+ { id: "random", label: "random", icon: LayoutDashboard },
125
+ ],
126
+ },
127
+ ];
128
+
129
+ /**
130
+ * gh#228 · nav row and nav icon read SEPARATE colour tokens. A service normally sets these once in
131
+ * its theme.css (`:root` or a scoped `[data-tenant] .app-sidebar`); here they are scoped to one
132
+ * demo frame so the default rail can sit next to the themed one. Icons only — geometry (16px icon,
133
+ * 32px row, 10px gap) is untouched.
134
+ */
135
+ const CANONICAL_NAV_TOKENS = {
136
+ "--sidebar-nav-icon-foreground": "hsl(var(--foreground))",
137
+ "--sidebar-nav-icon-active-foreground": "hsl(var(--primary))",
138
+ } as CSSProperties;
139
+
140
+ /**
141
+ * gh#213 · THE router-link contract. `createSidebarLink` adapts any router `Link` — React Router /
142
+ * TanStack use `to`, Inertia and Next.js use `href` (the default, and
143
+ * `inertiaSidebarLink(Link)` from `@godxjp/ui/inertia` is the same thing pre-bound). The consumer
144
+ * writes NO row markup: the Sidebar composes the icon slot, the label, the badge, the active state
145
+ * and the collapsed rail, and hands them to the link as `children`.
146
+ */
147
+ const RouterLink = createSidebarLink(Link, "to");
148
+
149
+ /** Router-driven rows — each carries an `href`, which is what the link adapter navigates to. */
150
+ const ROUTED_SECTIONS: SidebarSectionProp[] = [
151
+ {
152
+ label: "ナビゲーション",
153
+ items: [
154
+ { id: "overview", label: "概要", icon: LayoutDashboard, href: "/overview" },
155
+ {
156
+ id: "reports",
157
+ label: "レポート",
158
+ icon: FileText,
159
+ href: "/reports",
160
+ badge: 5,
161
+ },
162
+ {
163
+ id: "ledger",
164
+ label: "元帳",
165
+ icon: BookOpen,
166
+ children: [{ id: "journal-2", label: "仕訳入力", icon: Receipt, href: "/journal" }],
167
+ },
168
+ { id: "members", label: "メンバー", icon: Users, href: "/members", disabled: true },
169
+ ],
170
+ },
171
+ ];
172
+
173
+ /**
174
+ * renderItem · DEPRECATED (gh#213) — kept working for existing consumers. It leaves the row CONTENT
175
+ * to the caller, which is how a `<Link>{item.label}</Link>` silently dropped every icon in
176
+ * production. `rowProps` now carries the library-composed `children`, so spreading it (or rendering
177
+ * `rowProps.children`) restores the canonical row; the star is a decorative, non-interactive affix.
178
+ * Prefer `linkComponent` (above) or `SidebarItem asChild` for new code.
179
+ */
180
+ function renderFavouriteRow(
181
+ item: SidebarItemData,
182
+ rowProps: SidebarRenderItemProp,
183
+ onSelect: (id: string) => void,
184
+ ) {
185
+ return (
186
+ <a
187
+ href={`#${item.id}`}
188
+ onClick={(event) => {
189
+ event.preventDefault();
190
+ onSelect(item.id);
191
+ }}
192
+ >
193
+ {/* The icon + label come from the LIBRARY, not from hand-written .sb-icon / .sb-label spans. */}
194
+ {rowProps.children}
195
+ {FAVOURITE_IDS.has(item.id) ? (
196
+ <Star className="text-attention size-4 shrink-0 fill-current" aria-label="お気に入り" />
197
+ ) : null}
198
+ </a>
199
+ );
200
+ }
201
+
202
+ const COMPOSED_ITEMS: SidebarItemData[] = [
203
+ { id: "starred-1", label: "月次決算", icon: Star, href: "/close" },
204
+ { id: "starred-2", label: "売掛金一覧", icon: Receipt, href: "/receivables" },
205
+ { id: "starred-3", label: "取引先マスタ", icon: Building2, href: "/partners" },
206
+ ];
207
+
208
+ export default function Demo() {
209
+ const [activeId, setActiveId] = useState("journal");
210
+ const [collapsed, setCollapsed] = useState(false);
211
+ const [brandActiveId, setBrandActiveId] = useState("projects");
212
+ const [renderActiveId, setRenderActiveId] = useState("overview");
213
+ const [routedActiveId, setRoutedActiveId] = useState("reports");
214
+ const [composedActiveId, setComposedActiveId] = useState("starred-1");
215
+ const [tokenActiveId, setTokenActiveId] = useState("overview");
216
+ const [mentionActiveId, setMentionActiveId] = useState("general");
217
+
218
+ const sidebar = (
219
+ <Sidebar
220
+ ariaLabel="会計アプリのメインナビゲーション"
221
+ activeId={activeId}
222
+ collapsed={collapsed}
223
+ onSelect={setActiveId}
224
+ sections={FULL_SECTIONS}
225
+ aria-label="ドッキングサイドバーのナビゲーション"
226
+ product={{
227
+ name: "CoreBooks",
228
+ role: "株式会社アクメ",
229
+ color: "hsl(var(--primary))",
230
+ }}
231
+ onProductClick={() => undefined}
232
+ footer={
233
+ <Flex direction="col" gap="xs">
234
+ <Text as="div" weight="medium">
235
+ 山田 太郎
236
+ </Text>
237
+ <Flex align="center" gap="xs">
238
+ <span className="bg-success size-1.5 rounded-full" />
239
+ <Text size="xs" tone="muted">
240
+ オンライン
241
+ </Text>
242
+ </Flex>
243
+ </Flex>
244
+ }
245
+ />
246
+ );
247
+
248
+ const topbar = (
249
+ <Topbar
250
+ start={
251
+ <>
252
+ <Button
253
+ variant="ghost"
254
+ size="icon-sm"
255
+ aria-label={collapsed ? "サイドバーを展開" : "サイドバーを折りたたむ"}
256
+ aria-pressed={collapsed}
257
+ onClick={() => setCollapsed((c) => !c)}
258
+ >
259
+ {collapsed ? <PanelLeftOpen /> : <PanelLeftClose />}
260
+ </Button>
261
+ <Avatar className="rounded-md">
262
+ <AvatarFallback className="bg-primary text-primary-foreground font-bold">
263
+ C
264
+ </AvatarFallback>
265
+ </Avatar>
266
+ </>
267
+ }
268
+ center={
269
+ <Button
270
+ variant="outline"
271
+ size="sm"
272
+ className="text-muted-foreground w-full max-w-sm justify-start"
273
+ >
274
+ <Search />
275
+ 検索…
276
+ </Button>
277
+ }
278
+ />
279
+ );
280
+
281
+ return (
282
+ <AppShell sidebar={sidebar} topbar={topbar} sidebarCollapsed={collapsed}>
283
+ <PageContainer
284
+ title="Sidebar デモ"
285
+ subtitle="sections / groups / product chip / footer / active item"
286
+ breadcrumb={[{ label: "ホーム", to: "/" }, { label: "Sidebar デモ" }]}
287
+ extra={
288
+ <Button size="sm" variant="outline" onClick={() => setCollapsed((c) => !c)}>
289
+ {collapsed ? "サイドバーを展開" : "サイドバーを折りたたむ"}
290
+ </Button>
291
+ }
292
+ >
293
+ <Flex direction="col" gap="lg">
294
+ <Card>
295
+ <CardHeader>
296
+ <CardTitle level={2}>現在の状態</CardTitle>
297
+ <CardDescription>
298
+ 左のレールに渡している sections prop の現在のアクティブ項目
299
+ </CardDescription>
300
+ </CardHeader>
301
+ <CardContent>
302
+ <Badge variant="secondary">{activeId}</Badge>
303
+ </CardContent>
304
+ </Card>
305
+
306
+ {/* brand prop · replaces the product chip with a fully custom header (SidebarHeader). */}
307
+ <Card>
308
+ <CardHeader>
309
+ <CardTitle level={2}>brand プロップ</CardTitle>
310
+ <CardDescription>
311
+ product チップの代わりに SidebarHeader で完全に自作したヘッダーを差し込みます。
312
+ brand と product は排他です。
313
+ </CardDescription>
314
+ </CardHeader>
315
+ <CardContent>
316
+ <Flex direction="col" className="bg-card h-80 w-64 overflow-hidden rounded-lg border">
317
+ <Sidebar
318
+ ariaLabel="ブランド例のナビゲーション"
319
+ activeId={brandActiveId}
320
+ onSelect={setBrandActiveId}
321
+ sections={BRAND_SECTIONS}
322
+ aria-label="brand プロップ例のナビゲーション"
323
+ brand={
324
+ <SidebarHeader>
325
+ <span className="bg-primary text-primary-foreground grid size-7 shrink-0 place-items-center rounded-md">
326
+ <Boxes className="size-4" aria-hidden="true" />
327
+ </span>
328
+ <span className="flex min-w-0 flex-col">
329
+ <Text weight="bold" truncate>
330
+ Acme Suite
331
+ </Text>
332
+ <Text size="xs" tone="muted" truncate>
333
+ v7.0 Enterprise
334
+ </Text>
335
+ </span>
336
+ </SidebarHeader>
337
+ }
338
+ />
339
+ </Flex>
340
+ </CardContent>
341
+ </Card>
342
+
343
+ {/* linkComponent prop · THE router-link contract (gh#213) — library composes the row. */}
344
+ <Card>
345
+ <CardHeader>
346
+ <CardTitle level={2}>linkComponent プロップ(ルーターリンク)</CardTitle>
347
+ <CardDescription>
348
+ フレームワークのルーター Link を渡すだけ。行の中身(アイコン・ラベル・バッジ・
349
+ アクティブ状態・折りたたみレール)は ライブラリ側が組み立てて children
350
+ として渡すので、 利用側が行マークアップを再実装することはありません。React Router /
351
+ TanStack は createSidebarLink(Link, &quot;to&quot;)、Inertia / Next.js は
352
+ createSidebarLink(Link)(または @godxjp/ui/inertia の
353
+ inertiaSidebarLink(Link))を使います。 左は展開、右は折りたたみレールです。
354
+ どちらも同じ Link のままアイコンが残ります。
355
+ </CardDescription>
356
+ </CardHeader>
357
+ <CardContent>
358
+ <Flex gap="md" wrap>
359
+ <Flex
360
+ direction="col"
361
+ className="bg-card h-72 w-64 overflow-hidden rounded-lg border"
362
+ >
363
+ <Sidebar
364
+ ariaLabel="ルーターリンク行のナビゲーション"
365
+ activeId={routedActiveId}
366
+ onSelect={setRoutedActiveId}
367
+ sections={ROUTED_SECTIONS}
368
+ linkComponent={RouterLink}
369
+ aria-label="linkComponent プロップ例のナビゲーション(展開)"
370
+ />
371
+ </Flex>
372
+ <Flex
373
+ direction="col"
374
+ className="bg-card h-72 w-16 overflow-hidden rounded-lg border"
375
+ >
376
+ <Sidebar
377
+ ariaLabel="折りたたみレールのルーターリンク"
378
+ activeId={routedActiveId}
379
+ onSelect={setRoutedActiveId}
380
+ sections={ROUTED_SECTIONS}
381
+ linkComponent={RouterLink}
382
+ collapsed
383
+ aria-label="linkComponent プロップ例のナビゲーション(折りたたみ)"
384
+ />
385
+ </Flex>
386
+ </Flex>
387
+ </CardContent>
388
+ </Card>
389
+
390
+ {/* renderItem prop · DEPRECATED escape hatch (gh#213) — kept for back-compat. */}
391
+ <Card>
392
+ <CardHeader>
393
+ <CardTitle level={2}>renderItem プロップ(非推奨)</CardTitle>
394
+ <CardDescription>
395
+ 行の中身まで利用側が書く旧エスケープハッチ。これが原因で
396
+ <code>&lt;Link&gt;{"{item.label}"}&lt;/Link&gt;</code>
397
+ がアイコンを全て落とす回帰が発生しました(gh#213)。 現在は rowProps.children
398
+ にライブラリ製の行内容が入るので、それを描画すれば 正規の行が復元されます(ここでは
399
+ その右にお気に入りスターを添えています)。 新規コードでは linkComponent か
400
+ SidebarItem asChild を使ってください。
401
+ </CardDescription>
402
+ </CardHeader>
403
+ <CardContent>
404
+ <Flex direction="col" className="bg-card h-72 w-64 overflow-hidden rounded-lg border">
405
+ <Sidebar
406
+ ariaLabel="カスタム行例のナビゲーション"
407
+ activeId={renderActiveId}
408
+ onSelect={setRenderActiveId}
409
+ sections={FAVOURITE_SECTIONS}
410
+ renderItem={(item, rowProps) =>
411
+ renderFavouriteRow(item, rowProps, setRenderActiveId)
412
+ }
413
+ aria-label="renderItem プロップ例のナビゲーション"
414
+ />
415
+ </Flex>
416
+ </CardContent>
417
+ </Card>
418
+
419
+ {/* children prop · full nav override: compose SidebarSection / SidebarItem directly. */}
420
+ <Card>
421
+ <CardHeader>
422
+ <CardTitle level={2}>children プロップ(ナビ全体の差し替え)</CardTitle>
423
+ <CardDescription>
424
+ sections を使わず SidebarSection / SidebarItem を直接組み立てて、
425
+ ナビゲーション全体を 自前で構成します。右は同じ構成に SidebarItem の asChild
426
+ を足したものです。子として ルーターの Link
427
+ を「要素だけ」渡すと、アイコン・ラベル・バッジは ライブラリが差し込みます(gh#213。
428
+ children は書きません)。
429
+ </CardDescription>
430
+ </CardHeader>
431
+ <CardContent>
432
+ <Flex gap="md" wrap>
433
+ <Flex
434
+ direction="col"
435
+ className="bg-card h-64 w-64 overflow-hidden rounded-lg border"
436
+ >
437
+ <Sidebar
438
+ ariaLabel="構成可能な例のナビゲーション"
439
+ activeId={composedActiveId}
440
+ onSelect={setComposedActiveId}
441
+ >
442
+ <SidebarSection label="お気に入り">
443
+ {COMPOSED_ITEMS.map((item) => (
444
+ <SidebarItem
445
+ key={item.id}
446
+ item={item}
447
+ active={composedActiveId === item.id}
448
+ onActivate={setComposedActiveId}
449
+ />
450
+ ))}
451
+ </SidebarSection>
452
+ </Sidebar>
453
+ </Flex>
454
+ <Flex
455
+ direction="col"
456
+ className="bg-card h-64 w-64 overflow-hidden rounded-lg border"
457
+ >
458
+ <Sidebar
459
+ ariaLabel="asChild 例のナビゲーション"
460
+ activeId={composedActiveId}
461
+ onSelect={setComposedActiveId}
462
+ aria-label="SidebarItem asChild 例のナビゲーション"
463
+ >
464
+ <SidebarSection label="お気に入り(asChild)">
465
+ {COMPOSED_ITEMS.map((item) => (
466
+ <SidebarItem
467
+ key={item.id}
468
+ item={item}
469
+ active={composedActiveId === item.id}
470
+ onActivate={setComposedActiveId}
471
+ asChild
472
+ >
473
+ <Link to={item.href ?? "/"} />
474
+ </SidebarItem>
475
+ ))}
476
+ </SidebarSection>
477
+ </Sidebar>
478
+ </Flex>
479
+ </Flex>
480
+ </CardContent>
481
+ </Card>
482
+
483
+ {/* badgeTone · 未読(中立)と「自分宛て」(強調)を一本の軸で分ける。 */}
484
+ <Card>
485
+ <CardHeader>
486
+ <CardTitle level={2}>badgeTone プロップ(未読と自分宛ての区別)</CardTitle>
487
+ <CardDescription>
488
+ 行のカウントが「未読」なのか「自分宛て(メンション・DM)」なのかを badgeTone
489
+ で表します。既定の neutral は従来のピルとバイト単位で同一で、
490
+ 属性すら出しません。destructive のときだけ data-tone が付き、
491
+ --sidebar-badge-destructive-background / -foreground を読みます。 badge
492
+ には数値や文字列だけを渡してください · そこに &lt;Badge&gt; を入れると .sb-badge
493
+ の中にもう一枚ピルが入って丸が二重になります(実測 37.11×19.14 の 中に
494
+ 25.11×19.14)。 色は 2 トークンだけが動き、ピルの高さも角丸も左右余白も
495
+ 共通なので、未読行とメンション行は同じ列に揃ったままです。
496
+ </CardDescription>
497
+ </CardHeader>
498
+ <CardContent>
499
+ <Flex direction="col" className="bg-card h-64 w-64 overflow-hidden rounded-lg border">
500
+ <Sidebar
501
+ ariaLabel="チャンネル一覧のナビゲーション"
502
+ activeId={mentionActiveId}
503
+ onSelect={setMentionActiveId}
504
+ sections={MENTION_SECTIONS}
505
+ aria-label="badgeTone 例のナビゲーション"
506
+ />
507
+ </Flex>
508
+ </CardContent>
509
+ </Card>
510
+
511
+ {/* Nav colour tokens · icon and label are themed SEPARATELY (gh#228). */}
512
+ <Card>
513
+ <CardHeader>
514
+ <CardTitle level={2}>ナビの配色トークン(アイコンとラベルを別々に)</CardTitle>
515
+ <CardDescription>
516
+ 行(ラベル)は --sidebar-nav-item-foreground、アイコンは
517
+ --sidebar-nav-icon-foreground を読みます。 既定値は従来どおり(どちらも
518
+ --muted-foreground)。 テーマ側でアイコンだけ濃くすれば、muted
519
+ テキスト全体の色を変えずに キャンバス基準の 16px
520
+ アイコンに揃えられます(ホバー/アクティブ/無効の各状態にも 対応トークンあり)。
521
+ </CardDescription>
522
+ </CardHeader>
523
+ <CardContent>
524
+ <Flex gap="md" wrap>
525
+ <Flex
526
+ direction="col"
527
+ className="bg-card h-64 w-64 overflow-hidden rounded-lg border"
528
+ >
529
+ <Sidebar
530
+ ariaLabel="既定の配色のナビゲーション"
531
+ activeId={tokenActiveId}
532
+ onSelect={setTokenActiveId}
533
+ sections={FAVOURITE_SECTIONS}
534
+ aria-label="既定の配色(アイコンは行の色を継承)"
535
+ />
536
+ </Flex>
537
+ <Flex
538
+ direction="col"
539
+ className="bg-card h-64 w-64 overflow-hidden rounded-lg border"
540
+ style={CANONICAL_NAV_TOKENS}
541
+ >
542
+ <Sidebar
543
+ ariaLabel="アイコンを濃くしたナビゲーション"
544
+ activeId={tokenActiveId}
545
+ onSelect={setTokenActiveId}
546
+ sections={FAVOURITE_SECTIONS}
547
+ aria-label="トークン上書き(アイコンのみ --foreground)"
548
+ />
549
+ </Flex>
550
+ </Flex>
551
+ </CardContent>
552
+ </Card>
553
+
554
+ {/* Feature notes */}
555
+ <Card>
556
+ <CardHeader>
557
+ <CardTitle level={2}>主な機能</CardTitle>
558
+ </CardHeader>
559
+ <CardContent>
560
+ <Flex direction="col" gap="sm" className="text-sm">
561
+ {[
562
+ "product chip · name / role(エンティティ名)/ color",
563
+ "collapsed=true でアイコンのみのレール表示に切替",
564
+ "children[] を持つ item は自動で折りたたみグループになる",
565
+ "activeId が子孫にマッチすると親グループが自動展開",
566
+ "badge prop で件数バッジをアイテムに付与可能(中身は数値・文字列のみ)",
567
+ "badgeTone で未読(neutral)と自分宛て(destructive)を色だけで区別",
568
+ "disabled=true で項目を非活性化(クリック不可)",
569
+ "footer prop でスクロール外にユーザー情報を固定",
570
+ "linkComponent · ルーター Link は「要素だけ」渡す。行の中身はライブラリが組み立てる(gh#213)",
571
+ "linkComponent は葉・サブメニュー・折りたたみレール・フライアウトの全てに適用される",
572
+ "グループのトリガーは aria-expanded を持つ開閉ボタンのままなので linkComponent は適用されない",
573
+ ].map((note) => (
574
+ <Flex key={note} align="center" gap="sm">
575
+ <Plus className="text-primary size-3 shrink-0" />
576
+ <span>{note}</span>
577
+ </Flex>
578
+ ))}
579
+ </Flex>
580
+ </CardContent>
581
+ </Card>
582
+ </Flex>
583
+ </PageContainer>
584
+ </AppShell>
585
+ );
586
+ }