@godxjp/ui 5.0.2 → 6.0.1

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 (242) hide show
  1. package/README.md +101 -142
  2. package/dist/app/index.d.ts +140 -0
  3. package/dist/app/index.js +38 -0
  4. package/dist/app.prop-IobwLwaM.d.ts +90 -0
  5. package/dist/checkbox-NkFkqsQ8.d.ts +13 -0
  6. package/dist/chunk-2XW7J3EI.js +226 -0
  7. package/dist/chunk-3F2AKYRD.js +416 -0
  8. package/dist/chunk-3KPEZ5CF.js +37 -0
  9. package/dist/chunk-3UGU5TYP.js +89 -0
  10. package/dist/chunk-6RA3KSVK.js +588 -0
  11. package/dist/chunk-7NZFVD24.js +122 -0
  12. package/dist/chunk-7PWBC4BY.js +25 -0
  13. package/dist/chunk-7S7MYFXE.js +61 -0
  14. package/dist/chunk-7WRZG2IG.js +71 -0
  15. package/dist/chunk-B775Y6BE.js +1 -0
  16. package/dist/chunk-BHV2FUOA.js +111 -0
  17. package/dist/chunk-BI3HERR7.js +70 -0
  18. package/dist/chunk-BPSKQUL2.js +68 -0
  19. package/dist/chunk-CDWPQ5RP.js +187 -0
  20. package/dist/chunk-CP2LET6N.js +244 -0
  21. package/dist/chunk-CQBADMFG.js +20 -0
  22. package/dist/chunk-CRERCLIZ.js +33 -0
  23. package/dist/chunk-DU6ZYZRP.js +238 -0
  24. package/dist/chunk-DY5C44UP.js +55 -0
  25. package/dist/chunk-E4HJNQ62.js +117 -0
  26. package/dist/chunk-E76QIYSY.js +93 -0
  27. package/dist/chunk-F7PG4OEV.js +37 -0
  28. package/dist/chunk-GDSVW62T.js +171 -0
  29. package/dist/chunk-H2FHJOLU.js +178 -0
  30. package/dist/chunk-HJEBRCXL.js +55 -0
  31. package/dist/chunk-ICM6XBST.js +16 -0
  32. package/dist/chunk-IK7I3ABN.js +88 -0
  33. package/dist/chunk-L6J44O74.js +144 -0
  34. package/dist/chunk-LDSLS6HE.js +1 -0
  35. package/dist/chunk-LVNUHUEZ.js +191 -0
  36. package/dist/chunk-M64MVRLS.js +92 -0
  37. package/dist/chunk-NGQW3KEM.js +402 -0
  38. package/dist/chunk-NZ4FOC5N.js +559 -0
  39. package/dist/chunk-PIIRNAXA.js +26 -0
  40. package/dist/chunk-S66TJXJU.js +33 -0
  41. package/dist/chunk-SMLKNECP.js +133 -0
  42. package/dist/chunk-TAHBM3F2.js +66 -0
  43. package/dist/chunk-TO33OY4L.js +150 -0
  44. package/dist/chunk-TO7URV7U.js +51 -0
  45. package/dist/chunk-TOO5AEKL.js +81 -0
  46. package/dist/chunk-U3GHAOIJ.js +299 -0
  47. package/dist/chunk-U7N2A7A3.js +9 -0
  48. package/dist/chunk-UX634MYF.js +123 -0
  49. package/dist/chunk-V6UWJKZF.js +28 -0
  50. package/dist/chunk-VOHTRR5X.js +28 -0
  51. package/dist/chunk-WRFKVUPW.js +332 -0
  52. package/dist/chunk-WXW43RK5.js +24 -0
  53. package/dist/chunk-XG7XDYIM.js +60 -0
  54. package/dist/chunk-YFCQKO3B.js +842 -0
  55. package/dist/chunk-ZDWXGWLY.js +73 -0
  56. package/dist/chunk-ZLK5SPT6.js +11 -0
  57. package/dist/chunk-ZS6DTAM2.js +31 -0
  58. package/dist/chunk-ZT5UEUBO.js +1 -0
  59. package/dist/components/admin/index.d.ts +80 -0
  60. package/dist/components/admin/index.js +38 -0
  61. package/dist/components/data-display/badge.d.ts +12 -0
  62. package/dist/components/data-display/badge.js +3 -0
  63. package/dist/components/data-display/card.d.ts +87 -0
  64. package/dist/components/data-display/card.js +2 -0
  65. package/dist/components/data-display/index.d.ts +72 -0
  66. package/dist/components/data-display/index.js +89 -0
  67. package/dist/components/data-display/popover.d.ts +13 -0
  68. package/dist/components/data-display/popover.js +2 -0
  69. package/dist/components/data-display/scroll-area.d.ts +7 -0
  70. package/dist/components/data-display/scroll-area.js +2 -0
  71. package/dist/components/data-display/table.d.ts +10 -0
  72. package/dist/components/data-display/table.js +3 -0
  73. package/dist/components/data-entry/autocomplete.d.ts +16 -0
  74. package/dist/components/data-entry/autocomplete.js +8 -0
  75. package/dist/components/data-entry/calendar.d.ts +16 -0
  76. package/dist/components/data-entry/calendar.js +4 -0
  77. package/dist/components/data-entry/cascader.d.ts +32 -0
  78. package/dist/components/data-entry/cascader.js +13 -0
  79. package/dist/components/data-entry/checkbox.d.ts +13 -0
  80. package/dist/components/data-entry/checkbox.js +4 -0
  81. package/dist/components/data-entry/color-picker.d.ts +16 -0
  82. package/dist/components/data-entry/color-picker.js +6 -0
  83. package/dist/components/data-entry/command.d.ts +69 -0
  84. package/dist/components/data-entry/command.js +3 -0
  85. package/dist/components/data-entry/date-picker.d.ts +16 -0
  86. package/dist/components/data-entry/date-picker.js +8 -0
  87. package/dist/components/data-entry/date-range-picker.d.ts +16 -0
  88. package/dist/components/data-entry/date-range-picker.js +8 -0
  89. package/dist/components/data-entry/index.d.ts +53 -0
  90. package/dist/components/data-entry/index.js +152 -0
  91. package/dist/components/data-entry/input.d.ts +6 -0
  92. package/dist/components/data-entry/input.js +2 -0
  93. package/dist/components/data-entry/label.d.ts +8 -0
  94. package/dist/components/data-entry/label.js +2 -0
  95. package/dist/components/data-entry/radio.d.ts +24 -0
  96. package/dist/components/data-entry/radio.js +4 -0
  97. package/dist/components/data-entry/select.d.ts +18 -0
  98. package/dist/components/data-entry/select.js +3 -0
  99. package/dist/components/data-entry/slider.d.ts +16 -0
  100. package/dist/components/data-entry/slider.js +2 -0
  101. package/dist/components/data-entry/switch.d.ts +17 -0
  102. package/dist/components/data-entry/switch.js +2 -0
  103. package/dist/components/data-entry/textarea.d.ts +6 -0
  104. package/dist/components/data-entry/textarea.js +3 -0
  105. package/dist/components/data-entry/time-picker.d.ts +16 -0
  106. package/dist/components/data-entry/time-picker.js +7 -0
  107. package/dist/components/data-entry/transfer.d.ts +17 -0
  108. package/dist/components/data-entry/transfer.js +11 -0
  109. package/dist/components/data-entry/tree-select.d.ts +26 -0
  110. package/dist/components/data-entry/tree-select.js +13 -0
  111. package/dist/components/data-entry/upload.d.ts +42 -0
  112. package/dist/components/data-entry/upload.js +11 -0
  113. package/dist/components/feedback/alert.d.ts +60 -0
  114. package/dist/components/feedback/alert.js +7 -0
  115. package/dist/components/feedback/dialog.d.ts +64 -0
  116. package/dist/components/feedback/dialog.js +7 -0
  117. package/dist/components/feedback/index.d.ts +16 -0
  118. package/dist/components/feedback/index.js +14 -0
  119. package/dist/components/feedback/sheet.d.ts +24 -0
  120. package/dist/components/feedback/sheet.js +2 -0
  121. package/dist/components/feedback/sonner.d.ts +6 -0
  122. package/dist/components/feedback/sonner.js +1 -0
  123. package/dist/components/general/button.d.ts +20 -0
  124. package/dist/components/general/button.js +2 -0
  125. package/dist/components/general/index.d.ts +6 -0
  126. package/dist/components/general/index.js +2 -0
  127. package/dist/components/layout/index.d.ts +71 -0
  128. package/dist/components/layout/index.js +5 -0
  129. package/dist/components/navigation/dropdown-menu.d.ts +28 -0
  130. package/dist/components/navigation/dropdown-menu.js +2 -0
  131. package/dist/components/navigation/index.d.ts +32 -0
  132. package/dist/components/navigation/index.js +12 -0
  133. package/dist/components/navigation/pagination.d.ts +11 -0
  134. package/dist/components/navigation/pagination.js +7 -0
  135. package/dist/components/navigation/steps.d.ts +12 -0
  136. package/dist/components/navigation/steps.js +3 -0
  137. package/dist/components/navigation/tabs-items.d.ts +12 -0
  138. package/dist/components/navigation/tabs-items.js +3 -0
  139. package/dist/components/navigation/tabs.d.ts +12 -0
  140. package/dist/components/navigation/tabs.js +2 -0
  141. package/dist/components/query/index.d.ts +43 -0
  142. package/dist/components/query/index.js +8 -0
  143. package/dist/components/ui/index.d.ts +57 -0
  144. package/dist/components/ui/index.js +37 -0
  145. package/dist/content.prop-D1Dd3TAc.d.ts +31 -0
  146. package/dist/data-display.prop-DNTAzmDy.d.ts +58 -0
  147. package/dist/data-entry.prop-BEGA1lTq.d.ts +323 -0
  148. package/dist/data-table-D1u_rKLK.d.ts +83 -0
  149. package/dist/data.prop-BVvfKC_g.d.ts +41 -0
  150. package/dist/feedback.prop-BmxUlpAW.d.ts +64 -0
  151. package/dist/filter-bar-B7OGFO9S.d.ts +10 -0
  152. package/dist/form/index.d.ts +21 -0
  153. package/dist/form/index.js +4 -0
  154. package/dist/form.prop-BHgpuFFm.d.ts +41 -0
  155. package/dist/format-date-ByyZoqI5.d.ts +51 -0
  156. package/dist/general.prop-D7brMPNL.d.ts +16 -0
  157. package/dist/i18n/index.d.ts +217 -0
  158. package/dist/i18n/index.js +2 -0
  159. package/dist/index.d.ts +46 -26
  160. package/dist/index.js +39 -13062
  161. package/dist/inline-C5u6ptJV.d.ts +10 -0
  162. package/dist/interaction.prop-Cdn7wOtq.d.ts +25 -0
  163. package/dist/layout.prop-4TCNvyQZ.d.ts +20 -0
  164. package/dist/layout.prop-C795F0qg.d.ts +112 -0
  165. package/dist/lib/datetime/index.d.ts +31 -0
  166. package/dist/lib/datetime/index.js +1 -0
  167. package/dist/lib/utils.d.ts +5 -0
  168. package/dist/lib/utils.js +1 -0
  169. package/dist/navigation.prop-DpZqcXey.d.ts +78 -0
  170. package/dist/navigation.prop-DxBiClEH.d.ts +20 -0
  171. package/dist/props/components/index.d.ts +27 -0
  172. package/dist/props/components/index.js +1 -0
  173. package/dist/props/index.d.ts +28 -0
  174. package/dist/props/index.js +3 -0
  175. package/dist/props/registry.d.ts +649 -0
  176. package/dist/props/registry.js +1 -0
  177. package/dist/props/vocabulary/index.d.ts +7 -0
  178. package/dist/props/vocabulary/index.js +1 -0
  179. package/dist/query.prop-hIPrk2zI.d.ts +71 -0
  180. package/dist/search-input-uP01rY1L.d.ts +22 -0
  181. package/dist/shared.prop-BNRJc9K0.d.ts +45 -0
  182. package/dist/styles/alert-layout.css +191 -0
  183. package/dist/styles/badge-layout.css +22 -0
  184. package/dist/styles/card-layout.css +373 -0
  185. package/dist/styles/control.css +504 -0
  186. package/dist/styles/data-display-layout.css +246 -0
  187. package/dist/styles/density.css +43 -0
  188. package/dist/styles/dialog-layout.css +84 -0
  189. package/dist/styles/index.css +105 -0
  190. package/dist/styles/layout.css +479 -0
  191. package/dist/styles/shell-layout.css +604 -0
  192. package/dist/styles/table-layout.css +109 -0
  193. package/dist/theme/example.service.css +37 -0
  194. package/dist/tokens/base.css +13 -0
  195. package/dist/tokens/foundation.css +151 -0
  196. package/dist/tokens/primitives/badge.css +13 -0
  197. package/dist/tokens/primitives/card.css +29 -0
  198. package/dist/tokens/primitives/control.css +55 -0
  199. package/dist/tokens/primitives/feedback.css +17 -0
  200. package/dist/tokens/primitives/layout.css +20 -0
  201. package/dist/tokens/primitives/navigation.css +13 -0
  202. package/dist/tokens/primitives/table.css +10 -0
  203. package/dist/types-mvzYGrma.d.ts +37 -0
  204. package/dist/use-toast-Dol5bdY3.d.ts +34 -0
  205. package/package.json +279 -117
  206. package/scripts/ui-audit.mjs +179 -0
  207. package/BRAND.md +0 -296
  208. package/CHANGELOG.md +0 -668
  209. package/config/eslint.js +0 -54
  210. package/config/prettier.cjs +0 -20
  211. package/config/tsconfig.base.json +0 -22
  212. package/config/vitest.base.ts +0 -26
  213. package/dist/MiniMonth-YAmPGEpC.d.ts +0 -143
  214. package/dist/Table.types-BbsxoIYE.d.ts +0 -352
  215. package/dist/color-DO0qqUAb.d.ts +0 -38
  216. package/dist/components/composites.d.ts +0 -963
  217. package/dist/components/composites.js +0 -7343
  218. package/dist/components/composites.js.map +0 -1
  219. package/dist/components/primitives.d.ts +0 -2744
  220. package/dist/components/primitives.js +0 -7356
  221. package/dist/components/primitives.js.map +0 -1
  222. package/dist/components/shell.d.ts +0 -182
  223. package/dist/components/shell.js +0 -774
  224. package/dist/components/shell.js.map +0 -1
  225. package/dist/hooks.d.ts +0 -100
  226. package/dist/hooks.js +0 -558
  227. package/dist/hooks.js.map +0 -1
  228. package/dist/i18n.d.ts +0 -61
  229. package/dist/i18n.js +0 -860
  230. package/dist/i18n.js.map +0 -1
  231. package/dist/index.js.map +0 -1
  232. package/dist/padding-DY0JV5Ja.d.ts +0 -16
  233. package/dist/preferences.d.ts +0 -132
  234. package/dist/preferences.js +0 -262
  235. package/dist/preferences.js.map +0 -1
  236. package/dist/props.d.ts +0 -86
  237. package/dist/props.js +0 -16
  238. package/dist/props.js.map +0 -1
  239. package/dist/size-CQwNvOWd.d.ts +0 -19
  240. package/dist/types-LTj-2bl-.d.ts +0 -30
  241. package/dist/useTableViews-D5NIAJ7h.d.ts +0 -154
  242. package/src/tokens/tailwind.css +0 -158
package/BRAND.md DELETED
@@ -1,296 +0,0 @@
1
- # GoDX brand bible
2
-
3
- **Locked 2026-05-13.** Source: Claude Design handoff bundle —
4
- `design/source-2026-05-13/` (also kept verbatim as
5
- `design/godx-admin-2026-05-13.tar.gz`).
6
-
7
- ## Drop-in / no customization
8
-
9
- `@godxjp/ui` is **turnkey**. A new service does ONE thing to be brand-compliant:
10
-
11
- ```tsx
12
- // services/<svc>/frontend/src/main.tsx
13
- import "@godxjp/ui/tokens"; // <-- this is the entire brand contract
14
- import "./app.tsx";
15
- ```
16
-
17
- That single import wires:
18
- - type scale, color palette, OKLCH dark mode, four canonical theme
19
- axes (`data-theme` / `data-accent` / `data-density` /
20
- `data-font-size` per cardinal rule 21), spacing grid, shadows,
21
- motion
22
- - all application-shell CSS classes (`.app-root`, `.sb-*`, `.tb-*`,
23
- `.btn`, `.badge`, `.card`, `.kanban`, `.diff`, `.prose`,
24
- `.auth-shell`, …)
25
-
26
- For React: also pull pre-built primitives + shell:
27
-
28
- ```tsx
29
- import { AppShell, Sidebar, Topbar, TweaksPanel } from "@godxjp/ui/components/shell";
30
- import { Button, Card, Input, Field } from "@godxjp/ui/components/primitives";
31
- import { useTweaks } from "@godxjp/ui/hooks";
32
- import { initI18n } from "@godxjp/ui/i18n";
33
- ```
34
-
35
- (Page-level example screens — `DashboardScreen`, `PlansScreen`,
36
- etc. — live in Storybook under `src/stories/examples/` only. There
37
- is no `@godxjp/ui/components/screens` export per cardinal rule
38
- 28 §D — copy-paste-and-modify the example screens into your app.)
39
-
40
- **There is no theming step.** No per-service "wire up tokens" boilerplate. If a screen needs more than this provides, the answer is to add the primitive to `@godxjp/ui`, not fork.
41
-
42
- ## Optional service-local overlay
43
-
44
- If — and only if — a service has a **brand-approved** deviation
45
- (e.g. a service-specific accent palette), the service ships a
46
- single overlay file under the `data-accent` axis (per cardinal
47
- rule 19 — the legacy `[data-tenant]` block is removed):
48
-
49
- ```css
50
- /* services/<svc>/frontend/src/theme.css */
51
- [data-accent="my-svc"] {
52
- --primary: oklch(56% 0.15 200); /* still chroma ≤ 0.18 */
53
- --ring: oklch(56% 0.15 200);
54
- }
55
- ```
56
-
57
- Imported AFTER the base tokens:
58
-
59
- ```tsx
60
- import "@godxjp/ui/tokens";
61
- import "./theme.css"; // overlay
62
- ```
63
-
64
- The overlay can **only** redeclare brand-token CSS variables under
65
- a `[data-accent]` or `[data-theme]` attribute selector. Editing
66
- foundational variables on `:root`, redefining the type scale, or
67
- overriding shell classes is forbidden and a review-block.
68
-
69
- > ⚠️ **Never lose the brand.** Every frontend in the GoDX ecosystem
70
- > (admin / forge / console / me / work / knowledge / agent / media /
71
- > chat / reporting / schema-studio / marketing) must:
72
- >
73
- > 1. import `@godxjp/ui/tokens` as the FIRST stylesheet
74
- > 2. consume the variables below as-is — never redefine `--primary`,
75
- > `--foreground`, `--background`, spacing, type, density tokens
76
- > 3. live by the design philosophy (next section)
77
- >
78
- > A PR that hard-codes a color, custom font scale, or off-grid spacing
79
- > gets rejected at review.
80
-
81
- ## Design philosophy (immutable)
82
-
83
- Three principles from the dxs-kintai brand foundation (Japanese
84
- enterprise aesthetics):
85
-
86
- | Term | Meaning | What it enforces |
87
- |---|---|---|
88
- | **渋み** (shibumi) | restrained elegance | Primary chroma ≤ 0.18 in OKLCH. No neon. No gradients on functional UI. |
89
- | **間** (ma) | vertical breathing room | Body `line-height: 1.7`. Generous spacing. Density toggle for compact data tables. |
90
- | **簡素** (kanso) | simplicity | Three font weights total: **400** (body), **500** (heading + emphasis default), **700** (loud emphasis only). No 600 in new code (kept as legacy alias). |
91
-
92
- These are NOT taste choices — they're brand contracts. Any visual
93
- direction that breaks them needs operator sign-off in advance.
94
-
95
- ## Token surface (read from `src/styles/theme.css`)
96
-
97
- Tokens + application-shell classes mastered together so consumers
98
- do `import "@godxjp/ui/tokens"` once and get everything. Variables
99
- live in `src/styles/theme.css` (canonical) + `src/styles/shell.css`
100
- (shell-extension); the design handoff bundle originally split them
101
- into `tokens.css` + `tokens-ext.css`
102
- for portability to Figma / theme tools — that split is preserved
103
- verbatim under `design/source-2026-05-13/` as an audit trail; the
104
- consumable artefact in `src/tokens/` is intentionally merged.
105
-
106
- ### Type
107
-
108
- ```
109
- --font-sans-jp "M PLUS 2" + JP fallback chain + system-ui
110
- --font-weight-normal 400 (body)
111
- --font-weight-medium 500 (headings, buttons, labels)
112
- --font-weight-bold 700 (loud emphasis only)
113
-
114
- --text-2xs 11px fine print
115
- --text-xs 12px caption / label
116
- --text-sm 13px dense table rows
117
- --text-base 14px DEFAULT body (JP density override)
118
- --text-md 16px content-heavy body
119
- --text-lg 18px subheading
120
- --text-xl 20px h3 / page title
121
- --text-2xl 24px h2
122
- --text-3xl 30px
123
- --text-4xl 32px h1 cap
124
-
125
- --leading-tight 1.25 headings
126
- --leading-normal 1.5 dense / single-line UI
127
- --leading-body 1.7 JP body default (ma principle)
128
- ```
129
-
130
- Semantic heading sizes are deliberately small — info-dense JP
131
- enterprise vibe: `--heading-h1 = 20px`, `--heading-h2 = 18px`,
132
- `--heading-h3 = 14px`, `--heading-h4 = 13px`.
133
-
134
- ### Color — OKLCH only
135
-
136
- Primary palette mastered in OKLCH so dark mode + accent overrides are
137
- mechanical. Never override `--primary` / `--foreground` /
138
- `--background` / `--card` / `--muted` in app code; switch via
139
- `[data-accent="<palette>"]` or `[data-theme="dark"]` attributes
140
- (per cardinal rule 19 — `[data-tenant]` is removed).
141
-
142
- ```
143
- --background warm off-white oklch(99% 0.002 60)
144
- --foreground warm off-black oklch(20% 0.006 60) (SmartHR #23221e)
145
- --primary SmartHR blue oklch(56% 0.15 240) (#0077c7)
146
- --destructive 茜 madder oklch(52% 0.18 25) (#b7282e, chroma capped)
147
- --success 若竹 bamboo oklch(72% 0.13 155) (#68be8d)
148
- --warning 山吹 mountain oklch(80% 0.17 85) (#f8b500)
149
- --info 群青 ultramarine oklch(55% 0.12 265) (#4c6cb3)
150
- --attention 朱 vermilion oklch(66% 0.19 45) (#eb6101)
151
- ```
152
-
153
- **和色 (wa-iro) decorative palette** is for charts, accent tags,
154
- illustrations — **never** for role-mapped UI (don't use `--wa-akane`
155
- as a button color; use `--destructive`). The palette:
156
-
157
- `--wa-ai` `--wa-gunjo` `--wa-ruri` `--wa-kon` `--wa-wakatake`
158
- `--wa-moegi` `--wa-yamabuki` `--wa-shu` `--wa-akane` `--wa-enji`
159
- `--wa-sakura` `--wa-sumi` `--wa-nezu`.
160
-
161
- ### Accent overrides
162
-
163
- Brand palette swaps via `[data-accent="<palette>"]` at `<html>` or
164
- any ancestor (per cardinal rule 19 — the legacy `[data-tenant]`
165
- axis was collapsed into `data-accent`). Six framework-shipped
166
- palettes: `blue` (default) · `green` · `violet` · `amber` · `rose`
167
- · `slate`. Consumers register their own palettes in a service
168
- `theme.css` overlay.
169
-
170
- ### Dark mode
171
-
172
- `[data-theme="dark"]` flips every surface + accent. Already wired
173
- in `src/styles/shell.css`.
174
-
175
- ### Density
176
-
177
- `[data-density="compact|default|comfortable"]` rescales every UI
178
- element (button height, padding, row height). Default fits SmartHR /
179
- freee density (32px element). Compact for kintone-style dense tables
180
- (28px). Comfortable for public surfaces (44px — WCAG touch target).
181
-
182
- ### Spacing — 4px grid
183
-
184
- ```
185
- --spacing-0 0 --spacing-1 4px --spacing-2 8px
186
- --spacing-3 12px --spacing-4 16px --spacing-5 20px
187
- --spacing-6 24px --spacing-8 32px --spacing-10 40px
188
- --spacing-12 48px --spacing-16 64px --spacing-20 80px --spacing-24 96px
189
- ```
190
-
191
- Never invent off-grid values (`13px`, `7px`, etc).
192
-
193
- ### Layout invariants
194
-
195
- ```
196
- --header-height 48px
197
- --sidebar-width 256px
198
- --sidebar-collapsed-width 64px
199
- --container-max-width 1280px
200
- --touch-target-min 44px (Digital Agency hard rule, never go below)
201
- ```
202
-
203
- ### Radius / motion
204
-
205
- ```
206
- --radius 6px (base)
207
- --radius-md 4px, --radius-lg 6px, --radius-xl 10px, --radius-full ∞
208
-
209
- --transition-fast 150ms
210
- --transition-base 200ms
211
- --transition-slow 300ms
212
- --ease-in-out cubic-bezier(0.4, 0, 0.2, 1)
213
- ```
214
-
215
- `@media (prefers-reduced-motion: reduce)` honours user preference; the
216
- `.pulse` keyframe self-disables.
217
-
218
- ## Component primitives (read from `src/tokens/tokens-ext.css`)
219
-
220
- Application-shell primitives are mastered as CSS classes (not React
221
- components — those layer on top per portal). Each frontend imports the
222
- tokens and gets these for free:
223
-
224
- | Class | Use |
225
- |---|---|
226
- | `.app-root / .app-sidebar / .app-topbar / .app-main` | three-pane app shell with collapse animation |
227
- | `.sb-product / .sb-section / .sb-nav-item` | sidebar primary nav |
228
- | `.tb-breadcrumb / .tb-chip / .tb-search / .tb-icon-btn` | topbar |
229
- | `.sw-pop` family | command-palette / switcher dropdown |
230
- | `.page / .page-header / .page-title / .page-actions` | page chrome |
231
- | `.card / .card-header / .card-title` | card surface |
232
- | `.btn / .btn-primary / .btn-secondary / .btn-ghost / .btn-danger / .btn-sm / .btn-lg` | buttons |
233
- | `.input / .label / .help` | form primitives |
234
- | `.badge / .badge-success / -warning / -info / -error / -attention / -neutral / -outline` | status badges |
235
- | `.chip` | tag |
236
- | `.table / .num / .mono` | tabular data |
237
- | `.tabs / .tab` | tab strip |
238
- | `.kpi / .kpi-label / .kpi-value / .kpi-delta` | dashboard metric |
239
- | `.log-line` | terminal-style activity feed |
240
- | `.diff / .diff-row.add / .diff-row.del / .diff-row.ctx` | code diff |
241
- | `.kanban / .kanban-col / .issue-card` | kanban board |
242
- | `.wiki-layout / .wiki-toc / .prose` | wiki / doc render |
243
- | `.auth-shell / .auth-card / .auth-art` | login screen |
244
- | `.avatar / .kbd / .dot / .pulse` | utilities |
245
-
246
- Use them directly when building plain HTML. When using React, wrap
247
- each in a small primitive component in your portal's `components/`
248
- directory; do NOT re-create the class names — import the existing CSS.
249
-
250
- ## Reference HTML prototypes
251
-
252
- The bundle ships pixel-canonical HTML prototypes in
253
- `design/source-2026-05-13/project/`:
254
-
255
- | File | What it shows |
256
- |---|---|
257
- | `godx-unified.html` | full admin shell (sidebar + topbar + page) |
258
- | `signin.html` | sign-in flow (email → password → 2FA → done) |
259
- | `device.html` | device-code authorize flow |
260
- | `login.html` | 15-artboard canvas reviewing every login state |
261
- | `design-canvas.jsx` | React canvas showcasing every primitive |
262
- | `shell.jsx`, `ui-kit.jsx`, `tweaks-panel.jsx` | JSX primitives mirroring the CSS classes |
263
- | `screens-*.jsx` | per-screen reference layouts (product / project / detail) |
264
-
265
- When implementing a new screen, **open the closest reference** first
266
- and match its visual rhythm. Don't redesign solo without a precedent.
267
-
268
- ## Forbidden patterns
269
-
270
- - ❌ Hard-coded hex colors in component code (use `var(--primary)` etc).
271
- - ❌ Custom font sizes outside the `--text-*` scale.
272
- - ❌ Spacing values off the 4px grid (`5px`, `7px`, `13px`…).
273
- - ❌ Font weight 300 / 600 / 800 / 900 in new code (only 400 / 500 / 700).
274
- - ❌ Tailwind utility classes that re-encode tokens (e.g. `text-blue-500`
275
- instead of `text-[var(--primary)]`).
276
- - ❌ A new shadow / radius / motion curve "just for this card".
277
- - ❌ Logos, marketing copy, or product-specific imagery in the
278
- `@godxjp/ui` package — those live in the consumer portal.
279
-
280
- ## Updating the brand
281
-
282
- When the operator approves a brand change:
283
-
284
- 1. Update `src/styles/theme.css` (canonical tokens) and/or
285
- `src/styles/shell.css` (shell-extension tokens) here in
286
- `libs/ts/godxjp-ui`.
287
- 2. Bump the package version.
288
- 3. Bump the submodule pointer in `godx-admin` umbrella.
289
- 4. Each portal pulls the new submodule SHA in a follow-up PR.
290
- 5. **Refresh `BRAND.md` if the change moves a foundational rule.**
291
-
292
- Document the change in `design/CHANGELOG.md` (create on first change).
293
-
294
- The current locked snapshot is preserved at
295
- `design/source-2026-05-13/` + the original archive at
296
- `design/godx-admin-2026-05-13.tar.gz`.