@godxjp/ui 5.0.2 → 6.0.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 (298) hide show
  1. package/README.md +101 -142
  2. package/package.json +124 -128
  3. package/scripts/ui-audit.mjs +179 -0
  4. package/src/app/__tests__/app-provider.test.tsx +232 -0
  5. package/src/app/__tests__/date-format-labels.test.ts +36 -0
  6. package/src/app/__tests__/date-formats.test.ts +44 -0
  7. package/src/app/__tests__/timezones.test.ts +65 -0
  8. package/src/app/app-provider.tsx +227 -0
  9. package/src/app/date-format-labels.ts +21 -0
  10. package/src/app/date-formats.ts +30 -0
  11. package/src/app/index.ts +40 -0
  12. package/src/app/locales.ts +32 -0
  13. package/src/app/request-headers.ts +31 -0
  14. package/src/app/storage.ts +44 -0
  15. package/src/app/time-format-labels.ts +19 -0
  16. package/src/app/time-formats.ts +15 -0
  17. package/src/app/timezones.ts +208 -0
  18. package/src/app/types.ts +39 -0
  19. package/src/app/use-formatting.ts +47 -0
  20. package/src/components/__tests__/accessibility-primitives.test.tsx +65 -0
  21. package/src/components/__tests__/docs-parity.test.ts +41 -0
  22. package/src/components/__tests__/shadcn-release-guardrails.test.ts +71 -0
  23. package/src/components/__tests__/theme-axes-integration.test.tsx +242 -0
  24. package/src/components/admin/index.ts +76 -0
  25. package/src/components/data-display/__tests__/card-table.test.tsx +328 -0
  26. package/src/components/data-display/__tests__/data-display.test.tsx +73 -0
  27. package/src/components/data-display/__tests__/data-table.test.tsx +84 -0
  28. package/src/components/data-display/__tests__/popover.test.tsx +92 -0
  29. package/src/components/data-display/__tests__/scroll-area-collapsible.test.tsx +66 -0
  30. package/src/components/data-display/badge.tsx +27 -0
  31. package/src/components/data-display/card.tsx +194 -0
  32. package/src/components/data-display/code-badge.tsx +28 -0
  33. package/src/components/data-display/collapsible.tsx +5 -0
  34. package/src/components/data-display/data-table.tsx +476 -0
  35. package/src/components/data-display/empty-state.tsx +22 -0
  36. package/src/components/data-display/index.ts +41 -0
  37. package/src/components/data-display/key-value-grid.tsx +46 -0
  38. package/src/components/data-display/popover.tsx +62 -0
  39. package/src/components/data-display/progress-meter.tsx +20 -0
  40. package/src/components/data-display/scan-panel.tsx +16 -0
  41. package/src/components/data-display/scroll-area.tsx +42 -0
  42. package/src/components/data-display/status-badge.tsx +83 -0
  43. package/src/components/data-display/table.tsx +59 -0
  44. package/src/components/data-display/timeline.tsx +42 -0
  45. package/src/components/data-display/tree-list.tsx +42 -0
  46. package/src/components/data-entry/__fixtures__/tree-options.ts +80 -0
  47. package/src/components/data-entry/__tests__/cascader-tree-transfer.test.tsx +417 -0
  48. package/src/components/data-entry/__tests__/checkbox-group.test.tsx +40 -0
  49. package/src/components/data-entry/__tests__/checkbox.test.tsx +20 -0
  50. package/src/components/data-entry/__tests__/date-autocomplete.test.tsx +94 -0
  51. package/src/components/data-entry/__tests__/form-field.test.tsx +49 -0
  52. package/src/components/data-entry/__tests__/input-textarea.test.tsx +38 -0
  53. package/src/components/data-entry/__tests__/label-select.test.tsx +62 -0
  54. package/src/components/data-entry/__tests__/pickers.test.tsx +74 -0
  55. package/src/components/data-entry/__tests__/radio.test.tsx +46 -0
  56. package/src/components/data-entry/__tests__/search-input.test.tsx +32 -0
  57. package/src/components/data-entry/__tests__/switch-field.test.tsx +52 -0
  58. package/src/components/data-entry/__tests__/upload.test.tsx +125 -0
  59. package/src/components/data-entry/autocomplete.tsx +91 -0
  60. package/src/components/data-entry/calendar.tsx +90 -0
  61. package/src/components/data-entry/cascader.tsx +305 -0
  62. package/src/components/data-entry/checkbox-group.tsx +90 -0
  63. package/src/components/data-entry/checkbox.tsx +30 -0
  64. package/src/components/data-entry/choice-field.tsx +27 -0
  65. package/src/components/data-entry/choice-option.ts +20 -0
  66. package/src/components/data-entry/color-picker.tsx +75 -0
  67. package/src/components/data-entry/command.tsx +56 -0
  68. package/src/components/data-entry/country-select.tsx +88 -0
  69. package/src/components/data-entry/date-picker.tsx +69 -0
  70. package/src/components/data-entry/date-range-picker.tsx +75 -0
  71. package/src/components/data-entry/form-field.tsx +59 -0
  72. package/src/components/data-entry/index.ts +62 -0
  73. package/src/components/data-entry/input.tsx +26 -0
  74. package/src/components/data-entry/label.tsx +25 -0
  75. package/src/components/data-entry/radio.tsx +109 -0
  76. package/src/components/data-entry/search-input.tsx +103 -0
  77. package/src/components/data-entry/select.tsx +149 -0
  78. package/src/components/data-entry/slider.tsx +38 -0
  79. package/src/components/data-entry/switch-field.tsx +91 -0
  80. package/src/components/data-entry/switch.tsx +24 -0
  81. package/src/components/data-entry/textarea.tsx +12 -0
  82. package/src/components/data-entry/time-picker.tsx +214 -0
  83. package/src/components/data-entry/transfer.tsx +231 -0
  84. package/src/components/data-entry/tree-select-strategy.ts +6 -0
  85. package/src/components/data-entry/tree-select.tsx +279 -0
  86. package/src/components/data-entry/tree-utils.ts +221 -0
  87. package/src/components/data-entry/upload-crop-dialog.tsx +109 -0
  88. package/src/components/data-entry/upload-types.ts +86 -0
  89. package/src/components/data-entry/upload.tsx +498 -0
  90. package/src/components/data-entry/use-upload-draft.ts +93 -0
  91. package/src/components/feedback/__tests__/alert.test.tsx +127 -0
  92. package/src/components/feedback/__tests__/dialog.test.tsx +290 -0
  93. package/src/components/feedback/__tests__/sheet.test.tsx +94 -0
  94. package/src/components/feedback/__tests__/skeleton.test.tsx +25 -0
  95. package/src/components/feedback/__tests__/toast.test.tsx +52 -0
  96. package/src/components/feedback/alert.tsx +167 -0
  97. package/src/components/feedback/dialog.tsx +325 -0
  98. package/src/components/feedback/index.ts +53 -0
  99. package/src/components/feedback/sheet.tsx +130 -0
  100. package/src/components/feedback/skeleton.tsx +95 -0
  101. package/src/components/feedback/sonner.tsx +54 -0
  102. package/src/components/feedback/toaster.tsx +1 -0
  103. package/src/components/feedback/use-toast.ts +62 -0
  104. package/src/components/general/__tests__/button.test.tsx +71 -0
  105. package/src/components/general/button.tsx +61 -0
  106. package/src/components/general/index.ts +2 -0
  107. package/src/components/layout/__tests__/page-container.test.tsx +69 -0
  108. package/src/components/layout/__tests__/page-inset.test.tsx +14 -0
  109. package/src/components/layout/__tests__/stack-inline.test.tsx +39 -0
  110. package/src/components/layout/app-shell.tsx +42 -0
  111. package/src/components/layout/breadcrumb.tsx +35 -0
  112. package/src/components/layout/index.ts +31 -0
  113. package/src/components/layout/inline.tsx +13 -0
  114. package/src/components/layout/menu.tsx +34 -0
  115. package/src/components/layout/mobile-frame.tsx +57 -0
  116. package/src/components/layout/page-container.tsx +81 -0
  117. package/src/components/layout/page-inset.tsx +16 -0
  118. package/src/components/layout/responsive-grid.tsx +14 -0
  119. package/src/components/layout/shell-app.tsx +30 -0
  120. package/src/components/layout/sidebar.tsx +98 -0
  121. package/src/components/layout/split-pane.tsx +16 -0
  122. package/src/components/layout/stack.tsx +13 -0
  123. package/src/components/layout/topbar.tsx +108 -0
  124. package/src/components/navigation/__tests__/app-pickers.test.tsx +118 -0
  125. package/src/components/navigation/__tests__/dropdown-menu.test.tsx +104 -0
  126. package/src/components/navigation/__tests__/navigation.test.tsx +61 -0
  127. package/src/components/navigation/__tests__/pagination-steps-tabs.test.tsx +76 -0
  128. package/src/components/navigation/date-format-picker.tsx +55 -0
  129. package/src/components/navigation/dropdown-menu.tsx +190 -0
  130. package/src/components/navigation/filter-bar.tsx +38 -0
  131. package/src/components/navigation/index.ts +28 -0
  132. package/src/components/navigation/locale-picker.tsx +49 -0
  133. package/src/components/navigation/page-header.tsx +50 -0
  134. package/src/components/navigation/pagination-utils.ts +35 -0
  135. package/src/components/navigation/pagination.tsx +168 -0
  136. package/src/components/navigation/steps.tsx +163 -0
  137. package/src/components/navigation/tabs-items.tsx +69 -0
  138. package/src/components/navigation/tabs.tsx +67 -0
  139. package/src/components/navigation/time-format-picker.tsx +55 -0
  140. package/src/components/navigation/timezone-picker.tsx +63 -0
  141. package/src/components/query/__tests__/data-state.test.tsx +214 -0
  142. package/src/components/query/__tests__/infinite-prefetch.test.tsx +105 -0
  143. package/src/components/query/__tests__/query-helpers.test.tsx +61 -0
  144. package/src/components/query/data-state.tsx +58 -0
  145. package/src/components/query/index.ts +10 -0
  146. package/src/components/query/infinite-query-state.tsx +99 -0
  147. package/src/components/query/mutation-feedback.tsx +31 -0
  148. package/src/components/query/prefetch-link.tsx +45 -0
  149. package/src/components/query/query-refetch-button.tsx +41 -0
  150. package/src/components/ui/alert-dialog.tsx +1 -0
  151. package/src/components/ui/alert.tsx +1 -0
  152. package/src/components/ui/autocomplete.tsx +1 -0
  153. package/src/components/ui/badge.tsx +1 -0
  154. package/src/components/ui/button.tsx +1 -0
  155. package/src/components/ui/calendar.tsx +1 -0
  156. package/src/components/ui/card.tsx +1 -0
  157. package/src/components/ui/checkbox.tsx +1 -0
  158. package/src/components/ui/color-picker.tsx +1 -0
  159. package/src/components/ui/command.tsx +1 -0
  160. package/src/components/ui/date-picker.tsx +1 -0
  161. package/src/components/ui/date-range-picker.tsx +1 -0
  162. package/src/components/ui/dialog.tsx +1 -0
  163. package/src/components/ui/dropdown-menu.tsx +1 -0
  164. package/src/components/ui/index.tsx +31 -0
  165. package/src/components/ui/input.tsx +1 -0
  166. package/src/components/ui/label.tsx +1 -0
  167. package/src/components/ui/pagination.tsx +1 -0
  168. package/src/components/ui/popover.tsx +1 -0
  169. package/src/components/ui/radio.tsx +1 -0
  170. package/src/components/ui/scroll-area.tsx +1 -0
  171. package/src/components/ui/select.tsx +1 -0
  172. package/src/components/ui/sheet.tsx +1 -0
  173. package/src/components/ui/slider.tsx +1 -0
  174. package/src/components/ui/sonner.tsx +1 -0
  175. package/src/components/ui/switch.tsx +1 -0
  176. package/src/components/ui/table.tsx +1 -0
  177. package/src/components/ui/tabs-items.tsx +1 -0
  178. package/src/components/ui/tabs.tsx +1 -0
  179. package/src/components/ui/textarea.tsx +1 -0
  180. package/src/components/ui/time-picker.tsx +1 -0
  181. package/src/components/ui/upload.tsx +1 -0
  182. package/src/form/__tests__/use-zod-form.test.tsx +97 -0
  183. package/src/form/form-field-control.tsx +44 -0
  184. package/src/form/form-root.tsx +29 -0
  185. package/src/form/index.ts +7 -0
  186. package/src/form/use-zod-form.ts +29 -0
  187. package/src/i18n/__tests__/translate.test.ts +23 -0
  188. package/src/i18n/index.ts +9 -0
  189. package/src/i18n/messages/en.json +171 -0
  190. package/src/i18n/messages/ja.json +171 -0
  191. package/src/i18n/messages/vi.json +171 -0
  192. package/src/i18n/translate.ts +74 -0
  193. package/src/i18n/use-translation.ts +53 -0
  194. package/src/index.ts +3 -0
  195. package/src/lib/__tests__/control-styles.test.ts +78 -0
  196. package/src/lib/__tests__/datetime.test.ts +77 -0
  197. package/src/lib/__tests__/format-date.test.ts +97 -0
  198. package/src/lib/__tests__/format.test.ts +62 -0
  199. package/src/lib/__tests__/theme-tokens-audit.test.ts +176 -0
  200. package/src/lib/__tests__/theme-tokens-css.test.ts +118 -0
  201. package/src/lib/__tests__/token-governance.test.ts +191 -0
  202. package/src/lib/__tests__/variants.test.ts +18 -0
  203. package/src/lib/control-styles.ts +33 -0
  204. package/src/lib/datetime/detect.ts +25 -0
  205. package/src/lib/datetime/format-date.ts +100 -0
  206. package/src/lib/datetime/format.ts +140 -0
  207. package/src/lib/datetime/index.ts +25 -0
  208. package/src/lib/datetime/parse.ts +51 -0
  209. package/src/lib/datetime/sync.ts +48 -0
  210. package/src/lib/format.ts +114 -0
  211. package/src/lib/hooks.ts +54 -0
  212. package/src/lib/utils.ts +6 -0
  213. package/src/lib/variants.ts +40 -0
  214. package/src/props/components/app.prop.ts +99 -0
  215. package/src/props/components/data-display.prop.ts +73 -0
  216. package/src/props/components/data-entry.prop.ts +334 -0
  217. package/src/props/components/feedback.prop.ts +80 -0
  218. package/src/props/components/form.prop.ts +46 -0
  219. package/src/props/components/general.prop.ts +18 -0
  220. package/src/props/components/index.ts +99 -0
  221. package/src/props/components/layout.prop.ts +130 -0
  222. package/src/props/components/navigation.prop.ts +88 -0
  223. package/src/props/components/query.prop.ts +94 -0
  224. package/src/props/index.ts +17 -0
  225. package/src/props/registry.ts +603 -0
  226. package/src/props/vocabulary/content.prop.ts +35 -0
  227. package/src/props/vocabulary/data.prop.ts +46 -0
  228. package/src/props/vocabulary/index.ts +73 -0
  229. package/src/props/vocabulary/interaction.prop.ts +42 -0
  230. package/src/props/vocabulary/layout.prop.ts +25 -0
  231. package/src/props/vocabulary/navigation.prop.ts +19 -0
  232. package/src/props/vocabulary/shared.prop.ts +59 -0
  233. package/src/styles/alert-layout.css +191 -0
  234. package/src/styles/badge-layout.css +22 -0
  235. package/src/styles/card-layout.css +373 -0
  236. package/src/styles/control.css +504 -0
  237. package/src/styles/data-display-layout.css +246 -0
  238. package/src/styles/density.css +43 -0
  239. package/src/styles/dialog-layout.css +84 -0
  240. package/src/styles/index.css +105 -0
  241. package/src/styles/layout.css +479 -0
  242. package/src/styles/shell-layout.css +604 -0
  243. package/src/styles/table-layout.css +109 -0
  244. package/src/test/__tests__/render-loop-guard.test.tsx +38 -0
  245. package/src/test/jest-dom.d.ts +4 -0
  246. package/src/test/render-loop-guard.tsx +50 -0
  247. package/src/test/render.tsx +29 -0
  248. package/src/test/theme-globals.test.ts +77 -0
  249. package/src/test/theme-globals.ts +134 -0
  250. package/src/test/theme-test-utils.tsx +67 -0
  251. package/src/theme/example.service.css +37 -0
  252. package/src/tokens/base.css +13 -0
  253. package/src/tokens/foundation.css +151 -0
  254. package/src/tokens/primitives/badge.css +13 -0
  255. package/src/tokens/primitives/card.css +29 -0
  256. package/src/tokens/primitives/control.css +55 -0
  257. package/src/tokens/primitives/feedback.css +17 -0
  258. package/src/tokens/primitives/layout.css +20 -0
  259. package/src/tokens/primitives/navigation.css +13 -0
  260. package/src/tokens/primitives/table.css +10 -0
  261. package/BRAND.md +0 -296
  262. package/CHANGELOG.md +0 -668
  263. package/config/eslint.js +0 -54
  264. package/config/prettier.cjs +0 -20
  265. package/config/tsconfig.base.json +0 -22
  266. package/config/vitest.base.ts +0 -26
  267. package/dist/MiniMonth-YAmPGEpC.d.ts +0 -143
  268. package/dist/Table.types-BbsxoIYE.d.ts +0 -352
  269. package/dist/color-DO0qqUAb.d.ts +0 -38
  270. package/dist/components/composites.d.ts +0 -963
  271. package/dist/components/composites.js +0 -7343
  272. package/dist/components/composites.js.map +0 -1
  273. package/dist/components/primitives.d.ts +0 -2744
  274. package/dist/components/primitives.js +0 -7356
  275. package/dist/components/primitives.js.map +0 -1
  276. package/dist/components/shell.d.ts +0 -182
  277. package/dist/components/shell.js +0 -774
  278. package/dist/components/shell.js.map +0 -1
  279. package/dist/hooks.d.ts +0 -100
  280. package/dist/hooks.js +0 -558
  281. package/dist/hooks.js.map +0 -1
  282. package/dist/i18n.d.ts +0 -61
  283. package/dist/i18n.js +0 -860
  284. package/dist/i18n.js.map +0 -1
  285. package/dist/index.d.ts +0 -33
  286. package/dist/index.js +0 -13062
  287. package/dist/index.js.map +0 -1
  288. package/dist/padding-DY0JV5Ja.d.ts +0 -16
  289. package/dist/preferences.d.ts +0 -132
  290. package/dist/preferences.js +0 -262
  291. package/dist/preferences.js.map +0 -1
  292. package/dist/props.d.ts +0 -86
  293. package/dist/props.js +0 -16
  294. package/dist/props.js.map +0 -1
  295. package/dist/size-CQwNvOWd.d.ts +0 -19
  296. package/dist/types-LTj-2bl-.d.ts +0 -30
  297. package/dist/useTableViews-D5NIAJ7h.d.ts +0 -154
  298. package/src/tokens/tailwind.css +0 -158
package/CHANGELOG.md DELETED
@@ -1,668 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to `@godxjp/ui`. Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
4
- and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
-
6
- ## [5.0.2] — 2026-05-19
7
-
8
- ### Added
9
-
10
- - **`<Popover anchor>` prop** — positioning-only anchor for the
11
- combobox / typeahead / focus-managed pattern. Unlike `trigger`,
12
- `anchor` does NOT register a click toggle handler. Parent controls
13
- `open` directly.
14
-
15
- ### Fixed
16
-
17
- - **`<AutoComplete>` no longer closes the instant it opens.** The
18
- primitive opened on `input.onFocus` AND was wrapped in a Radix
19
- `PopoverTrigger` that toggled on click. A single click fired both
20
- paths — open via focus, then close via trigger toggle. Switched to
21
- the new `<Popover anchor={input}>` shape so focus-managed open/close
22
- stays authoritative.
23
-
24
- ## [5.0.1] — 2026-05-18
25
-
26
- ### Fixed
27
-
28
- - **`<Col>` no longer wipes `flex-basis` on default-span renders.** React
29
- 19 serializes `flex: undefined` as `element.style.flex = ""`, and
30
- because `flex` is a CSS shorthand it clears the `flex-basis: ${span}%`
31
- longhand set on the line above. Result: every `<Row gutter><Col xs=
32
- {24} md={12}>` was collapsing to content width instead of the
33
- half-width the API promised. Conditional spread keeps the `flex` key
34
- out of the style object unless actually defined (#70).
35
-
36
- ## [5.0.0] — 2026-05-18
37
-
38
- ### BREAKING CHANGES
39
-
40
- - **`<Table>` chrome props removed.** The legacy "data-table page"
41
- props moved off the primitive into the `<DataTable>` composite.
42
- TypeScript compilation will fail for any call site that passes:
43
- `toolbar`, `views`, `batchActions`, `filters`, `onFiltersChange`,
44
- `filterBar`, `onResetFilters`, `pagination`, `tableKey`. See
45
- ADR-0007 and `docs/how-to/migrate-to-data-table.md` for the
46
- required migration (1:1 prop-to-hook diff for every removed prop).
47
- - **`<Table batchActions>` → `<Table selection>`.** Consumers that
48
- used the primitive's batch-actions config strictly for the
49
- checkbox column switch to the slimmer `selection` prop. Same
50
- `selectedRowKeys` / `onSelectedRowKeysChange` /
51
- `getCheckboxDisabled` shape; the batch action band UI moves to
52
- the composite.
53
- - **`Table.persistence.ts` relocated** to
54
- `src/components/composites/data-table/persistence.ts`. The slim
55
- primitive no longer reads or writes localStorage; the composite
56
- threads persistence through `useDataTable`.
57
-
58
- ### Changed
59
-
60
- - **`Table.tsx`: 1,842 → 901 lines** (~51% reduction). Forking the
61
- primitive in place (rule 4) is achievable again.
62
- - **`DataTable.tsx`: 86 → ~280 lines.** The composite renders view
63
- tabs, toolbar bar, batch action band, filter chip bar, pagination
64
- band, column manager Sheet, and save-view Dialog directly.
65
- TanStack `useReactTable` lives in `useDataTable`; the primitive
66
- accepts the instance via a new `instance?` prop and falls back to
67
- a local hook only when standalone.
68
- - **CSS split** — chrome rules moved from
69
- `src/styles/shell/40-table.css` into a new
70
- `src/styles/shell/41-data-table.css`. `shell.css` imports the new
71
- file directly after the old one so cascade order is unchanged.
72
- - **Story migration** — `WithToolbar`, `InteractionRegression`,
73
- `Pagination_Numbered`, `Pagination_LoadMore`, `Pagination_Cursor`
74
- moved from `data-display/Table.stories.tsx` to
75
- `composites/DataTable.stories.tsx`. Bare-primitive stories that
76
- passed chrome props (`StickyColumns`) updated to drop them.
77
- `Table.stories::BulkActions` deleted (covered by the composite
78
- story of the same name).
79
-
80
- ### Migration
81
-
82
- - See [`docs/how-to/migrate-to-data-table.md`](docs/how-to/migrate-to-data-table.md)
83
- for the required v5 codemod. Each removed prop has a 1:1
84
- composite + hook equivalent — there is no functionality loss.
85
- - Consumers on v4 that still pass chrome props see a once-per-prop
86
- `console.warn` from the primitive (introduced in
87
- 4.0.x → 5.0.0-prep). The warning text links to the migration guide.
88
-
89
- ## [Unreleased]
90
-
91
- ### Added
92
-
93
- - **`<DataTable>` composite + table hooks** (ADR-0006). New
94
- ergonomic surface for the "data-table page" pattern. Pairs the
95
- `<Table>` primitive with hook-based state slices:
96
- - `useTablePagination` — page + pageSize slice with unified
97
- `onChange`, `resetPage`, `reset`.
98
- - `useTableSelection` — row selection with single / multiple mode +
99
- `toggle` / `select` / `deselect` / `clear` helpers.
100
- - `useTableViews` — saved-view state for tabbed table headers;
101
- optional localStorage persistence via `storageKey`.
102
- - `useTableState` — versioned localStorage useState (storageKey,
103
- version, migrate, custom storage adapter). The canonical
104
- persistence helper — industry-standard pattern (TanStack / MRT /
105
- MantineRT).
106
- - `useDataTable` — composite-level config builder that threads the
107
- slices into a typed instance ready for `<DataTable table={…}>`.
108
- Exported from `@godxjp/ui` (hooks) and `@godxjp/ui/components/composites`
109
- (composite). See [`docs/reference/composites/DataTable.md`](docs/reference/composites/DataTable.md)
110
- and [`docs/how-to/migrate-to-data-table.md`](docs/how-to/migrate-to-data-table.md).
111
- - **`<Pagination variant="embedded">`** — table-footer layout
112
- (info + page-size changer + numeric pager with optional first / last
113
- chevron buttons). Reused inside `<Table pagination=…>`. New props on
114
- the existing `<Pagination>`: `defaultPageSize` / `onPageSizeChange`,
115
- `pageSizeOptions`, `showSizeChanger`, `showFirstLast`,
116
- `hideOnSinglePage`, `boundary`, `firstPageLabel` / `previousPageLabel`
117
- / `nextPageLabel` / `lastPageLabel` / `pageSizeLabel`. Exported
118
- helper `computePageRange(current, total, sibling, boundary)`.
119
- - **i18n key `table.lastPage`** added to all four locales
120
- (ja / en / vi / fil) for the new last-page button.
121
- - **ADR-0006** documenting the Table primitive vs DataTable
122
- composite split.
123
-
124
- ### Changed
125
-
126
- - **`<Table>` file split** — extracted types + ColumnMeta
127
- augmentation into `Table.types.ts` and localStorage helpers into
128
- `Table.persistence.ts`. Public API unchanged; existing
129
- `from "@godxjp/ui"` imports of any Table-related symbol continue
130
- to resolve. Source file dropped from 2,353 → 1,838 lines (~22%).
131
- - **`<Pagination>` is now the single pagination primitive** —
132
- the inline numbered renderer that lived inside `<Table>` is gone;
133
- `<Table pagination={{ type: "numbered", … }}>` now renders
134
- `<Pagination variant="embedded">` under the hood. Cardinal rule 32
135
- (no redundant components) is now satisfied.
136
- - **`.tbl-pagination` numbered styles** migrated to
137
- `.pagination[data-variant="embedded"]` in `90-navigation.css`.
138
- `.tbl-pagination` remains the layout wrapper for the load-more and
139
- cursor pagination variants only.
140
- - **Lucide icons** replace the inline SVG chevrons inside
141
- `<Pagination>` (rule 14 — locked stack).
142
- - **`<Select>` gained `searchable`** + `searchPlaceholder`, `emptyLabel`,
143
- `loading`, `loadingLabel` props. When `searchable` is set the
144
- primitive flips from Radix Select to a cmdk + Popover render tree
145
- with a filter input above the list; value semantics stay constrained
146
- to `options[i].value`.
147
- - **Docs consolidation** — moved the five canonical specs from
148
- `new-docs/` to `docs/specs/` so the framework ships ONE
149
- documentation tree. The umbrella binding table, CLAUDE.md
150
- trigger table, AGENTS.md routing table, and every doc /
151
- story / source comment that referenced `new-docs/*` now
152
- cite `docs/specs/*`. Pruned outdated `docs/explanation/`
153
- pages (brand-bible, compatibility, versioning,
154
- tokens-architecture) that duplicated specs/BRAND.md/CLAUDE.md.
155
-
156
- ### Fixed
157
-
158
- - **Tour spotlight cutout** — the target area now uses an SVG mask
159
- cutout so the active element stays undimmed while the rest of the
160
- viewport is subdued.
161
- - **Tree React Aria foundation** — `Tree` now delegates ARIA tree
162
- keyboard navigation, selection, expansion, and disabled state to
163
- `react-aria-components` while preserving the single public `Tree`
164
- primitive. Row content customization now goes through `renderItem`;
165
- local row spacing uses the shared `density` vocabulary, and
166
- connector lines are rendered from tree structure instead of guessed
167
- from the flattened React Aria DOM.
168
-
169
- ### Added
170
-
171
- - **Table A5 — sort + resize** — `sort` accepts
172
- `TableSort | TableSort[] | null`; shift-click on a sortable header
173
- extends the multi-sort list and the header renders a numbered
174
- priority badge (1 / 2 / 3) at the right edge. `resizable` enables
175
- a 4px right-edge grip on each header; double-click auto-fits via
176
- TanStack `column.resetSize()`.
177
- - **Table A6 — expand row** — `expandable` adds a 32px first cell
178
- with a ▶ toggle; the detail panel sits in a full-width row with
179
- the canonical 3px primary left border. Exclusive by default;
180
- `allowMultiple` keeps prior opens.
181
- - **Table A7 — inline editing** — `editing` carries `rowId` (current
182
- editing row), `dirtyRowIds` / `dirtyCellIds` (warning-dot
183
- tracking), `renderEditCell`, `isRowReadOnly`, and a built-in
184
- footer banner (`.tbl-footer[data-state="dirty"]`) with Save-all /
185
- Cancel-all when any row is dirty. Confirmed rows are read-only
186
- via `isRowReadOnly` — double-click is suppressed.
187
- - **Table A8 — grouped + tree rows** — `groupBy` buckets rows by
188
- key, emits a full-width `.group-row` header with title + count
189
- badge + right-floated total. `tree.children` walks data
190
- recursively, emitting 14px / level indent and a twirl button on
191
- parent rows.
192
- - **Table A9 — column-manager lock toggle** — the column-manager
193
- Sheet renders a 🔒 / 🔓 button next to each row to pin / unpin
194
- columns at runtime; changes fire through `onColumnPinningChange`
195
- (TanStack-canonical `ColumnPinningState`).
196
- - **Table A10 — pagination variants** — `TablePaginationVariantConfig`
197
- discriminates on `type`: `numbered` (default + back-compat),
198
- `load-more` (feed lists with `hasMore` + `onLoadMore`), and
199
- `cursor` (time-series jump-to-month via `value` + `inputType`).
200
- - **Table A11 — Import / Export composite** — new
201
- `TableImportFlow` (4-step stepper + file card + error preview)
202
- and `TableExportDialog` (format / range / hidden-column toggles)
203
- in `@godxjp/ui/components/composites`. Separate from the Table
204
- primitive per cardinal rule 32 (no redundant props on Table).
205
- - **Table saved views** — `TableViewsConfig` now lets saved-view tabs
206
- apply `filters`, `sort`, and `columnVisibility` snapshots while
207
- keeping persistence in consumer state. The Table story opens a
208
- naming dialog before saving and warns when another view already
209
- has the same filters and column visibility. Views can opt into
210
- deletion with `deletable` + `onDeleteView`, while built-in views
211
- remain protected by default. `getTableViewsStorageKey` provides
212
- the localStorage namespace next to column visibility.
213
- - **`GodxConfigProvider` + format helpers** — canonical alias of
214
- `PreferencesProvider` per ADR 0005. The provider now wraps
215
- children in React Aria's `<I18nProvider>` so every date / time /
216
- number primitive picks up the locale automatically. Three thin
217
- helper files (`src/i18n/format.ts`, `src/i18n/relative.ts`,
218
- `src/hooks/useFormatters.ts`) wrap native `Intl` APIs +
219
- `@internationalized/date` values; no new runtime dependency. The
220
- legacy `PreferencesProvider` / `usePreferences` names remain as
221
- deprecated aliases until v4.0.0.
222
- - **`currency` preference + `setCurrency`** — `Preferences.currency`
223
- carries an ISO 4217 default for `formatCurrency()`. Persisted to
224
- the same storage backend as locale / timezone.
225
- - **Timeline `time` accepts temporal values** — `time` now takes
226
- `Date | CalendarDate | CalendarDateTime | ZonedDateTime` (in
227
- addition to `ReactNode`). The active provider's locale + timezone
228
- format it via `useFormatters` per the new `timeFormat` prop
229
- (`"relative" | "datetime" | "date" | "time"`, default
230
- `"relative"` for `feed`, `"datetime"` elsewhere).
231
- - **Separator labels** — horizontal `Separator` now accepts
232
- `children`, `titlePlacement`, `orientationMargin`, and `variant`
233
- for Ant Design-style labeled dividers, replacing manual Flex +
234
- two-separator composition. Prop vocabulary docs and the
235
- Storybook vocabulary catalogue now include those concepts.
236
- - **Descriptions data API** — `Descriptions` now renders from
237
- `items` and supports `renderItem` for custom rows. The
238
- `Descriptions.Item` sub-component shape was removed so consumers
239
- use one component consistently.
240
- - **Table data API** — `Table` is now a single-component TanStack
241
- Table wrapper. Legacy table subcomponent exports were removed
242
- from the public surface; use `columns`, `data`, `ColumnDef.cell`,
243
- and the `toolbar` prop.
244
- - **Statistic loading + animation** — `loading` renders skeleton
245
- placeholders with `aria-busy`, while `animated` /
246
- `animationDuration` count finite numeric values from zero /
247
- previous value and respect `prefers-reduced-motion`.
248
- - **Cardinal rule 32 — no redundant props.** A new top-level prop /
249
- item field / variant is rejected at review if an existing prop /
250
- item field / variant already covers the use case. Lifted from the
251
- Timeline `pending` audit; future PRs must justify every new prop
252
- against the existing surface.
253
- - **Timeline `connector` prop** — `boolean`, default `true`. Toggles
254
- the vertical line that joins markers in `list` + `branching`
255
- variants. `feed` variant has no connector by design.
256
- - **Timeline per-item `animate` field** — `TimelineItem.animate:
257
- boolean` adds a pulsing ring around the marker dot for that single
258
- item, replacing the previous top-level `animate` Timeline-level
259
- prop (now removed — animate is a per-item concept). Honours
260
- `prefers-reduced-motion`.
261
- - **Storybook test gate** — `@storybook/addon-vitest` wired with
262
- Playwright (browser-mode Chromium) so every `play()` runs as a
263
- Vitest test. `pnpm test:stories` → 419 tests / 89 files / ~7s.
264
- Interactive primitives now ship with regression-pinned focus, click,
265
- hover, type, open/close flows (PR #18 + extended in #19, #20).
266
- - **Code panel default on Story view** — `@storybook/addon-docs`
267
- `parameters.docs.codePanel: true` so consumers see runnable JSX
268
- beside Controls / Actions / Interactions without click-through.
269
- - **Actions panel auto-spy** — `parameters.actions.argTypesRegex:
270
- "^on[A-Z].*"` logs every `on*` callback invocation globally.
271
- - **Cardinal rule 30** — story `render` must return JSX directly. No
272
- `<XyzDemo />` wrapper components, no parameterised helpers. Storybook
273
- source view stays copy-pasteable.
274
- - **Parity scripts + pre-commit gate** —
275
- `scripts/check-stories-parity.mjs` (rule 17) +
276
- `scripts/check-docs-parity.mjs` (rule 18). Husky pre-commit runs
277
- `lint:tokens` + both parity checks + `sync:skills` + `type-check`
278
- in ~5s; CI re-runs them on push.
279
- - **DatePicker stories** — `Placeholder`, `Granularity_DateTime`
280
- (hour / minute via `granularity` + `hourCycle`), `MinMaxConstrained`,
281
- `Format_Locales` (ja-JP / en-US / de-DE segment order via
282
- `I18nProvider`).
283
- - **`Select` `options` prop** — Ant / MUI / Mantine canonical
284
- data-driven API. `<Select options={[{value,label}]} />`. Children
285
- API remains for advanced layouts (groups / dividers / custom item
286
- rendering).
287
- - **40 reference doc stubs** — `docs/reference/<group>/<Name>.md`
288
- draft scaffold for the previously undocumented primitives (Flex,
289
- Form, Transfer, Field, LocaleTabs, Checklist, Spinner, IconButton,
290
- PageHeader, SegmentedControl, Statistic, Empty, Tag, Alert, Result,
291
- Typography, Descriptions, Radio, Slider, Watermark, Popconfirm,
292
- Anchor, Menu, Pagination, Steps, Progress, DatePicker,
293
- AutoComplete, Cascader, Tree, ColorPicker, Rate, Carousel, Collapse,
294
- List, Image, QRCode, Tooltip, Timeline, Tour). `check:docs-parity`
295
- now exits clean at 63/63.
296
-
297
- ### Fixed
298
-
299
- - **Separator vertical styling** — vertical separators now render via
300
- `.divider-vertical` instead of inline style, so Card divider stories
301
- can compose the Separator primitive without raw `<hr>` elements.
302
- - **Skeleton default animation** — ported Ant Design's active
303
- skeleton gradient pattern (`25% / 37% / 63%`, `400% 100%`,
304
- `1.4s ease`) to godx tokens, with reduced-motion fallback.
305
- - **Skeleton shape atoms** — `.sk-line` / `.sk-block` now have
306
- explicit full-width defaults and `.sk-circle` keeps its 34px
307
- width in flex rows, fixing list/table loading stories.
308
- - **Sidebar collapsed labels** — collapsed mode now omits nav label
309
- and badge nodes from the DOM while preserving `aria-label` /
310
- `title`, so standalone Sidebar stories cannot leak clipped text
311
- when the wrapper selector changes.
312
- - **SegmentedControl WAI-ARIA roving-tabindex** — radiogroup now ships
313
- the APG-compliant keyboard pattern: only the active radio carries
314
- `tabIndex={0}`; Arrow keys (Left/Right or Up/Down per the new
315
- `orientation` prop) move focus + selection; Home / End jump to
316
- first / last enabled item; disabled items are skipped. Root reflects
317
- `aria-orientation`. Replaces the previous native-Tab-order fallback
318
- that the docs claimed but didn't implement.
319
- - **IconButton accessible-name warn** — dev-mode `console.warn` when
320
- none of `aria-label` / `aria-labelledby` / `title` is supplied
321
- (`process.env.NODE_ENV !== "production"` only — production bundles
322
- strip the check). Catches the most common a11y regression on
323
- icon-only controls without forcing a breaking TS signature.
324
- - **Tooltip nested-provider double-wrap** — data-driven `<Tooltip>`
325
- detects an ancestor `<TooltipProvider>` (via a private React
326
- marker context the framework's Provider populates) and skips its
327
- inner Provider so the outer `delayDuration` / other Provider
328
- config is no longer silently overridden. Falls back to the
329
- previous double-wrap when the ancestor is Radix's Provider imported
330
- directly (not the framework's re-export) — documented in the
331
- Tooltip reference doc.
332
- - **AutoComplete focus closing the dropdown** —
333
- `onFocusOutside={preventDefault}` so opening on focus survives the
334
- focus-leaves-anchor lifecycle.
335
- - **AutoComplete label vs value** — input shows the selected option's
336
- `label`; `onValueChange` reports the option's `value` (Ant / shadcn
337
- convention).
338
- - **`<List>` and `<Menu>` nested `<li>`** — `List` renderItem no
339
- longer wraps in an extra `<li>`; `Menu` switched from
340
- `<li role="none">` to `<div role="group">` (ARIA-compliant).
341
- - **`Collapse` Tailwind utility collision** — root class renamed
342
- `.collapse` → `.collapse-root` so Tailwind v4's
343
- `.collapse { visibility: collapse }` utility no longer hides the
344
- subtree.
345
- - **Carousel vertical** — `height: 100%` cascades through `.carousel`
346
- / `-viewport` / `-track`, clipping to one slide at a time.
347
- - **Card banner double-border + radius** (B3 / C1) — `.ph.striped`
348
- resets the inherited `.ph` chrome (border / radius / margin-bottom).
349
- - **Card B3 stats footer** — uses `.card-footer-block` primitive class
350
- instead of inline `borderTop` + manual padding.
351
- - **Card H8 tabs underline rounding** — `<button>` instead of
352
- `<Button>` for tab elements + `border-radius: 0` explicit on
353
- `.card-header-tabs .tab` so an accidental `<Button>` doesn't
354
- contaminate the underline.
355
- - **Card H13 / H14 / H17 stories** — `<div className="card-body-block">` /
356
- `<Card footer block>` sub-component pattern instead of raw
357
- `<div className="card-body">` (rule 29).
358
- - **Card H17 sticky-shadow scroll** — `max-height: 140 + overflow-y:
359
- auto` instead of `height: 80 + overflow: hidden` so the story
360
- actually demonstrates scrolling.
361
- - **Descriptions bordered title overflow** — gap-as-border trick (1px
362
- body bg) so the outer frame wraps the body only, title sits above.
363
- - **Checkbox + Radio sizing** — 1rem (16px @ base) matching
364
- shadcn / Ant / Tailwind canon, not the density-element scale
365
- intended for full-height controls.
366
- - **Checkbox glyph stroke** — `strokeWidth=3` +
367
- `absoluteStrokeWidth` so the check / minus glyphs read at 12px.
368
- - **Image fallback visible** — fills wrapper 100% with secondary bg
369
- - border instead of 64×64 inline-flex chip against near-white body.
370
- - **PageHeader `padding` prop** — vocabulary aligned with Card per
371
- rule 23 §B (`tight` / `default` / `cozy` / `none`). Stacked variant
372
- releases the fixed `--header-height` so breadcrumb + title get
373
- vertical room.
374
- - **Slider / InputSearch / Textarea controlled-uncontrolled props** —
375
- conditional spread so the inner `<input>` never receives both
376
- `value` and `defaultValue`.
377
- - **TweaksPanel Dialog a11y** — `aria-describedby={undefined}` on
378
- `Dialog.Content` since the panel doesn't use `Dialog.Description`.
379
- - **Drawer Left story** — added `<DrawerDescription>` for a11y.
380
- - **Sidebar collapsed text overflow** — CSS selectors broadened from
381
- `.app-root[data-collapsed]` to `[data-collapsed]`, and Sidebar
382
- wraps children in `<div data-collapsed style="display: contents">`
383
- so the collapsed-state rules apply in both AppShell and standalone
384
- contexts.
385
- - **Storybook Docs source chip rendering** — `preview.css` forces
386
- `.prismjs .token { display: inline; border: 0 }` to defeat
387
- Storybook 10's per-token-pill style; consumers now see plain
388
- syntax-highlighted JSX.
389
- - **Storybook Docs canvas height** — `.sb-stage` no longer
390
- `min-height: 100vh` so each story preview shrinks to content
391
- instead of 707px frames.
392
- - **Build warnings** — removed broken `banner: { js: '"use client"' }`
393
- from `tsup.config.ts` (never reached output, only produced 7×
394
- "module-level directive ignored" warnings per build). Posture now
395
- matches MUI / Radix / shadcn (consumers mark App Router boundary
396
- themselves).
397
-
398
- ### Changed
399
-
400
- - **Card story display names** — stripped section-code prefixes
401
- (`A1·`, `B3·`, `H13·`, etc.) from 50 `name:` fields. URL slug
402
- (const name) still carries the code for dev reference.
403
- - **Story render demos inlined** — sweep of 14 stories in
404
- `data-entry/` that wrapped their body in `<XyzDemo />` (DefaultDemo
405
- / ControlledDemo / ValidatedDemo / PrefectureDemo / etc.) — bodies
406
- now inline in `render: function StoryName() {…}` so Storybook's
407
- dynamic source shows real JSX. `<ExampleForm disabled />` exemption
408
- also removed.
409
- - **`Card.stories.tsx` raw card-body / card-footer divs** —
410
- ~27 occurrences replaced with `<div className="card-body-block">` / `<Card footer
411
- block>` React sub-components per rule 29.
412
- - **`docs.source.type`** — `"dynamic"` (was `"code"`) so the source
413
- view renders the JSX, not the wrapping story object.
414
- - **`docs.canvas.sourceState`** — `"hidden"` (was attempted `"shown"`)
415
- so the Docs view doesn't auto-expand every story's source
416
- (bloated 5-story pages to thousands of px).
417
-
418
- ### Removed
419
-
420
- - **Dialog legacy compositional API** — removed the multi-part modal
421
- surface. `Dialog` is now the single public component with `trigger`,
422
- `title`, `description`, `children`, `footer`, and optional `form`
423
- props.
424
- - **`Timeline pending` prop** — removed. The trailing "ongoing"
425
- marker is now expressed as a regular item with
426
- `{ animate: true, color: "primary", title: "…" }`. Per cardinal
427
- rule 32 (no redundant props), a separate top-level prop was a
428
- duplicate of the items-array shape.
429
- - **`Timeline animate` Timeline-level prop** — removed. `animate`
430
- is a per-item concept: set `items[i].animate = true` on the items
431
- that should pulse. The previous Timeline-level prop animated only
432
- the `current` item, which couldn't express trailing-pending
433
- markers or multi-item indication.
434
- - **`docs/reference/primitives` advisory drift** — 40 stubs landed,
435
- parity now strict at 63/63.
436
- - **`<Step color>` prop + `StepColor` type** — the prop was declared
437
- but never read; per-step state is locked to the dxs-kintai canon
438
- (`done` → `--success`, `cur` → `--primary`, future → `--muted-foreground`)
439
- and not overridable. Consumers needing per-event colour should use
440
- `<Timeline>` instead. No release migration needed — the prop had no
441
- runtime effect.
442
-
443
- ## [3.0.0] — 2026-05-16
444
-
445
- `@godxjp/ui` v3 is a clean-break major that fulfils the **zero-config professional
446
- framework** promise described in the umbrella's frontend-architecture spec. Services
447
- upgrading from 2.x gain a complete toolchain preset and a fourth mandatory locale
448
- (`fil`) with no API removals beyond the deprecated symbol renames below.
449
-
450
- ### Added
451
-
452
- - **Filipino (`fil`) locale** — `src/i18n/locales/fil.ts`. Full key parity with
453
- `ja`. Mandatory per the umbrella frontend-architecture spec §6 (all four
454
- locales: `ja`, `en`, `vi`, `fil`).
455
- - **`GodxLocale` type** — replaces the Forge-branded `ForgeLocale`. Both are
456
- exported; `ForgeLocale` is `@deprecated` but still resolves to the same type so
457
- existing consumers compile without changes.
458
- - **`GODX_LOCALE_STORAGE_KEY`** — replaces `FORGE_LOCALE_STORAGE_KEY`. Old name
459
- re-exported as deprecated alias.
460
- - **Zero-config toolchain presets** under `config/` — consumed via sub-path exports:
461
- - `@godxjp/ui/eslint-config` → ESLint 9 flat config (typescript-eslint strict,
462
- jsx-a11y, react-hooks rules). Service `eslint.config.js` = one line.
463
- - `@godxjp/ui/prettier-config` → Prettier 3 config. Service `.prettierrc` = one
464
- string.
465
- - `@godxjp/ui/tsconfig` → TypeScript 6 strict base (`exactOptionalPropertyTypes`,
466
- `noUncheckedIndexedAccess`, `verbatimModuleSyntax`).
467
- - `@godxjp/ui/vitest-config` → Vitest 4 base with `jsdom` + 75%/70% coverage
468
- thresholds.
469
- - **Vitest test runner** added to devDependencies. `pnpm test` now works in the
470
- package itself.
471
- - **Locale parity smoke test** at `src/i18n/__tests__/locales.test.ts` — ensures
472
- every key in `ja` is present in `en`, `vi`, and `fil` (test ID: GDXUI-I-LOCALE-001).
473
- - **`ForgeProduct.tenant` type broadened** from a closed literal union to `string`
474
- — makes the framework deployable by operators who define their own tenant slugs
475
- without forking the package. The four built-in PRODUCTS fixtures remain unchanged.
476
-
477
- ### Changed
478
-
479
- - **package.json `description`** updated from Forge-specific wording to generic
480
- professional framework copy.
481
- - **`useTweaks` storage key** changed from `"forge.tweaks"` to `"godx.tweaks"`.
482
- On first load after upgrade, the stored tweaks key is not found and falls back
483
- to defaults (density/theme/tenant reset to defaults). User-visible tweaks
484
- (density, theme, tenant) persist again on next save.
485
- - **`initI18n` detection key** changed from `"forge.locale"` to `"godx.locale"`.
486
- User locale preference is reset to browser/navigator default on first load after
487
- upgrade. User re-selects locale via TweaksPanel and it persists under new key.
488
- - **README** rewritten as professional framework intro (≥300 words) with import
489
- surface table, primitives table with a11y column, adoption tracker, zero-config
490
- quick start, and npm/license/types badges.
491
- - **`sideEffects`** in `package.json` already `["**/*.css"]` — confirmed correct.
492
- JS entries remain tree-shakable.
493
-
494
- ### Deprecated
495
-
496
- - `ForgeLocale` — use `GodxLocale`. Will be removed in v4.
497
- - `FORGE_LOCALE_STORAGE_KEY` — use `GODX_LOCALE_STORAGE_KEY`. Will be removed in v4.
498
-
499
- ### Migration guide (2.x → 3.0.0)
500
-
501
- 1. **Locale storage key reset (non-breaking but visible):** The first page load
502
- after upgrade will not find the old `"forge.tweaks"` key and will reset tweaks
503
- to defaults. This is a one-time reset; the user re-selects density/theme/tenant
504
- once and the new key persists.
505
-
506
- 2. **`ForgeLocale` → `GodxLocale`:** No compile error — `ForgeLocale` still
507
- exports. Update to `GodxLocale` at your own pace; it will be removed in v4.
508
- Search and replace: `ForgeLocale` → `GodxLocale`.
509
-
510
- 3. **`FORGE_LOCALE_STORAGE_KEY` → `GODX_LOCALE_STORAGE_KEY`:** Same pattern.
511
- The old name still re-exports the same string constant.
512
-
513
- 4. **Add `fil` locale to service `addResourceBundle` calls:** If your service
514
- uses `i18n.addResourceBundle(locale, "my-ns", {…})` for all four locales,
515
- add `fil`. Missing `addResourceBundle` calls for `fil` produce a silent fallback
516
- to the base `fil` dictionary; no crash.
517
-
518
- 5. **Zero-config toolchain (optional, strongly recommended):**
519
- Adopt the new preset exports to reduce per-service boilerplate:
520
-
521
- ```bash
522
- # eslint.config.js — replace existing content with:
523
- # export { default } from "@godxjp/ui/eslint-config"
524
- #
525
- # .prettierrc.json — replace with:
526
- # "@godxjp/ui/prettier-config"
527
- #
528
- # tsconfig.json — extend:
529
- # { "extends": "@godxjp/ui/tsconfig", "compilerOptions": { "paths": {...} } }
530
- ```
531
-
532
- 6. **`ForgeProduct.tenant` type:** If you were using the closed literal union
533
- `"godx" | "kintai" | "tempo" | "betoya" | "restaurant"` for type narrowing,
534
- the type is now `string`. Add your own type guard if needed:
535
- ```ts
536
- const KNOWN_TENANTS = ["godx", "kintai", "tempo", "betoya"] as const;
537
- type KnownTenant = (typeof KNOWN_TENANTS)[number];
538
- function isKnownTenant(t: string): t is KnownTenant {
539
- return KNOWN_TENANTS.includes(t as KnownTenant);
540
- }
541
- ```
542
-
543
- ## [2.4.0] — 2026-05-16
544
-
545
- ### Added
546
-
547
- - **Toaster** + **`toast`** — thin wrapper around `sonner` with token
548
- class names (default `unstyled` so chrome comes from `.toast*` in
549
- `tokens.css`). Optional **`@godxjp/ui/sonner.css`** import (after
550
- tokens) pulls in sonner’s stacking / motion stylesheet and resets
551
- toaster `font-family` to inherit.
552
- - New `.combobox-*` atoms in `tokens.css` (filter list / item / empty
553
- styles shared by `AutoComplete`, `Cascader`, `TreeSelect`).
554
- - Dependency: **`sonner`** (`cmdk` already present).
555
-
556
- ## [2.3.0] — 2026-05-16
557
-
558
- ### Added
559
-
560
- - **Dialog** family — Radix Dialog + `.dialog-*` in `tokens.css`.
561
- - **Sheet** family (Radix Dialog; `Sheet` with `side` + `.sheet-*`
562
- animation tokens).
563
- - **AlertDialog** family (`AlertDialog*`, `AlertDialog` / `Cancel`
564
- use `.btn` / `.btn-primary` / `.btn-secondary`).
565
- - **Select** family (`Select*`, `SelectPortal`, scroll buttons, separator).
566
- - **Switch**, **Checkbox** (Radix) with `.switch-*` / `.checkbox-*`.
567
- - **Table** data display primitive using the `.table` atom.
568
- - Dependencies: `@radix-ui/react-alert-dialog`, `@radix-ui/react-checkbox`.
569
-
570
- ### Fixed
571
-
572
- - Removed invalid `composes:` from `.popover-content` in `tokens.css`
573
- (plain CSS does not support CSS-modules `composes`).
574
-
575
- ## [2.1.0] — 2026-05-13
576
-
577
- ### Added
578
-
579
- - **Popover** primitive (`Popover`, `Popover`, `Popover`,
580
- `Popover`) wrapping `@radix-ui/react-popover`. Visual contract
581
- in the new `.popover-content` class in `tokens.css` — brand-tokenised
582
- surface (`--popover`), border, and elevation.
583
- - **DropdownMenu** primitive (`DropdownMenu`, `DropdownMenu`,
584
- `DropdownMenu`, `DropdownMenu`, `DropdownMenu`,
585
- `DropdownMenu`, `DropdownMenu`, `DropdownMenu`,
586
- `DropdownMenu`, `DropdownMenu`, `DropdownMenu`)
587
- wrapping `@radix-ui/react-dropdown-menu`. `<DropdownMenu>`
588
- supports `variant="destructive"` + `inset` matching the public v0.2
589
- surface so call sites migrate by dep bump only.
590
- - **Calendar** primitive — `react-day-picker` themed via the new
591
- `.calendar` class in `tokens.css` (primary / surface / ring tokens).
592
- - **TimeInput** primitive — narrow `HH:mm` text input with on-blur
593
- normalisation (accepts `HHmm`, `H:mm`, etc.). Surfaces
594
- `aria-invalid` when the draft doesn't parse.
595
- - New CSS classes in `tokens.css`: `.popover-content`,
596
- `.dropdown-menu-content`, `.dropdown-menu-item`,
597
- `.dropdown-menu-separator`, `.dropdown-menu-label`,
598
- `.dropdown-menu-shortcut`, `.calendar`, `.time-input`.
599
- - `react-day-picker` added as a dependency.
600
-
601
- ### Notes
602
-
603
- - This release fills the gap that blocked
604
- `services/forge-service/frontend/` from migrating off the public
605
- TempoFast `@godxjp/ui@0.2.0`. After 2.1.0 every primitive forge
606
- imports (`Badge`, `Button`, `Tabs*`, `Popover*`, `DropdownMenu*`,
607
- `Calendar`, `TimeInput`) is brand-tokenised by default.
608
-
609
- ## [2.0.0] — 2026-05-13
610
-
611
- **Major version bump.** `@godxjp/ui` (the npm package owned by godx-jp / TempoFast) is now the GoDX brand bible. The previous public 0.2.0 — TempoFast's existing component library — stays consumable for legacy callers until TempoFast itself migrates onto 2.0+. SemVer signals the breaking change so dependents pin explicitly.
612
-
613
- ### Breaking
614
-
615
- - Package surface re-anchored on the Claude Design handoff 2026-05-13.
616
- Color tokens use OKLCH (not hex literals), font scale tightened
617
- (text-2xs..text-4xl), density modes added, four tenants pinned.
618
- `<Badge>` / `<Button>` etc. now wrap canonical CSS classes from
619
- `tokens.css` rather than shadcn-default Tailwind utilities.
620
- - Token files merged: `tokens.css` + `tokens-ext.css` →
621
- single `tokens.css` (635 lines). Consumers do
622
- `import "@godxjp/ui/tokens"` once.
623
- - `src/primitives/` moved to `src/components/primitives/` —
624
- `@godxjp/ui/primitives` alias preserved in the exports map for
625
- backwards compatibility, but new code should import from
626
- `@godxjp/ui` (top-level barrel re-exports everything).
627
-
628
- ### Added
629
-
630
- ### Added
631
-
632
- - **BRAND.md** — the brand bible (locked 2026-05-13 from Claude Design
633
- handoff bundle). Spells out the 渋み / 間 / 簡素 design philosophy
634
- and lists the forbidden patterns reviewers reject.
635
- - **`design/source-2026-05-13/`** — full design handoff preserved
636
- verbatim (README, chat transcripts, every JSX + HTML prototype).
637
- - **`design/godx-admin-2026-05-13.tar.gz`** — original archive from
638
- `api.anthropic.com/v1/design/h/7Ya1OxEEfiaI2SWojzuP9A`. Kept so the
639
- brand can be re-extracted on any fresh checkout.
640
- - **Atomic primitives**: `Badge`, `Button`, `Card` (+ `Card header`,
641
- `Card title`, `Card subtitle`, `Card content`), `Input`, `Textarea`,
642
- `Label`, `Tabs` (+ `Tabs`, `Tabs`, `Tabs`),
643
- `Avatar`, `Separator`. Each maps onto a canonical CSS class from
644
- `tokens.css` — no Tailwind utility re-encoding.
645
- - **`./components/primitives` export path** for explicit imports.
646
-
647
- ### Changed
648
-
649
- - **`tokens.css` is now the single CSS entry point.** The handoff's
650
- `tokens.css` + `tokens-ext.css` were merged so consumers do one
651
- import (`@godxjp/ui/tokens`). The split is preserved verbatim under
652
- `design/source-2026-05-13/` as an audit trail.
653
- - **`src/primitives/` → `src/components/primitives/`** for consistency
654
- with international design-system conventions (atomic primitives
655
- alongside shell + screens under `components/`). Top-level
656
- `@godxjp/ui` import paths unchanged.
657
- - **`src/index.ts`** now re-exports primitives by default so
658
- consumers can `import { Badge, Button } from "@godxjp/ui"`.
659
-
660
- ### Removed
661
-
662
- - `src/tokens/tokens-ext.css` (merged into `tokens.css`).
663
- - `src/tokens/index.css` (no longer needed — `tokens.css` is the entry).
664
-
665
- ## [0.1.0] — 2026-05-10
666
-
667
- Initial scaffold: tokens, hooks, i18n, data, shell components, screen
668
- components.