@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.
- package/README.md +101 -142
- package/dist/app/index.d.ts +140 -0
- package/dist/app/index.js +38 -0
- package/dist/app.prop-IobwLwaM.d.ts +90 -0
- package/dist/checkbox-NkFkqsQ8.d.ts +13 -0
- package/dist/chunk-2XW7J3EI.js +226 -0
- package/dist/chunk-3F2AKYRD.js +416 -0
- package/dist/chunk-3KPEZ5CF.js +37 -0
- package/dist/chunk-3UGU5TYP.js +89 -0
- package/dist/chunk-6RA3KSVK.js +588 -0
- package/dist/chunk-7NZFVD24.js +122 -0
- package/dist/chunk-7PWBC4BY.js +25 -0
- package/dist/chunk-7S7MYFXE.js +61 -0
- package/dist/chunk-7WRZG2IG.js +71 -0
- package/dist/chunk-B775Y6BE.js +1 -0
- package/dist/chunk-BHV2FUOA.js +111 -0
- package/dist/chunk-BI3HERR7.js +70 -0
- package/dist/chunk-BPSKQUL2.js +68 -0
- package/dist/chunk-CDWPQ5RP.js +187 -0
- package/dist/chunk-CP2LET6N.js +244 -0
- package/dist/chunk-CQBADMFG.js +20 -0
- package/dist/chunk-CRERCLIZ.js +33 -0
- package/dist/chunk-DU6ZYZRP.js +238 -0
- package/dist/chunk-DY5C44UP.js +55 -0
- package/dist/chunk-E4HJNQ62.js +117 -0
- package/dist/chunk-E76QIYSY.js +93 -0
- package/dist/chunk-F7PG4OEV.js +37 -0
- package/dist/chunk-GDSVW62T.js +171 -0
- package/dist/chunk-H2FHJOLU.js +178 -0
- package/dist/chunk-HJEBRCXL.js +55 -0
- package/dist/chunk-ICM6XBST.js +16 -0
- package/dist/chunk-IK7I3ABN.js +88 -0
- package/dist/chunk-L6J44O74.js +144 -0
- package/dist/chunk-LDSLS6HE.js +1 -0
- package/dist/chunk-LVNUHUEZ.js +191 -0
- package/dist/chunk-M64MVRLS.js +92 -0
- package/dist/chunk-NGQW3KEM.js +402 -0
- package/dist/chunk-NZ4FOC5N.js +559 -0
- package/dist/chunk-PIIRNAXA.js +26 -0
- package/dist/chunk-S66TJXJU.js +33 -0
- package/dist/chunk-SMLKNECP.js +133 -0
- package/dist/chunk-TAHBM3F2.js +66 -0
- package/dist/chunk-TO33OY4L.js +150 -0
- package/dist/chunk-TO7URV7U.js +51 -0
- package/dist/chunk-TOO5AEKL.js +81 -0
- package/dist/chunk-U3GHAOIJ.js +299 -0
- package/dist/chunk-U7N2A7A3.js +9 -0
- package/dist/chunk-UX634MYF.js +123 -0
- package/dist/chunk-V6UWJKZF.js +28 -0
- package/dist/chunk-VOHTRR5X.js +28 -0
- package/dist/chunk-WRFKVUPW.js +332 -0
- package/dist/chunk-WXW43RK5.js +24 -0
- package/dist/chunk-XG7XDYIM.js +60 -0
- package/dist/chunk-YFCQKO3B.js +842 -0
- package/dist/chunk-ZDWXGWLY.js +73 -0
- package/dist/chunk-ZLK5SPT6.js +11 -0
- package/dist/chunk-ZS6DTAM2.js +31 -0
- package/dist/chunk-ZT5UEUBO.js +1 -0
- package/dist/components/admin/index.d.ts +80 -0
- package/dist/components/admin/index.js +38 -0
- package/dist/components/data-display/badge.d.ts +12 -0
- package/dist/components/data-display/badge.js +3 -0
- package/dist/components/data-display/card.d.ts +87 -0
- package/dist/components/data-display/card.js +2 -0
- package/dist/components/data-display/index.d.ts +72 -0
- package/dist/components/data-display/index.js +89 -0
- package/dist/components/data-display/popover.d.ts +13 -0
- package/dist/components/data-display/popover.js +2 -0
- package/dist/components/data-display/scroll-area.d.ts +7 -0
- package/dist/components/data-display/scroll-area.js +2 -0
- package/dist/components/data-display/table.d.ts +10 -0
- package/dist/components/data-display/table.js +3 -0
- package/dist/components/data-entry/autocomplete.d.ts +16 -0
- package/dist/components/data-entry/autocomplete.js +8 -0
- package/dist/components/data-entry/calendar.d.ts +16 -0
- package/dist/components/data-entry/calendar.js +4 -0
- package/dist/components/data-entry/cascader.d.ts +32 -0
- package/dist/components/data-entry/cascader.js +13 -0
- package/dist/components/data-entry/checkbox.d.ts +13 -0
- package/dist/components/data-entry/checkbox.js +4 -0
- package/dist/components/data-entry/color-picker.d.ts +16 -0
- package/dist/components/data-entry/color-picker.js +6 -0
- package/dist/components/data-entry/command.d.ts +69 -0
- package/dist/components/data-entry/command.js +3 -0
- package/dist/components/data-entry/date-picker.d.ts +16 -0
- package/dist/components/data-entry/date-picker.js +8 -0
- package/dist/components/data-entry/date-range-picker.d.ts +16 -0
- package/dist/components/data-entry/date-range-picker.js +8 -0
- package/dist/components/data-entry/index.d.ts +53 -0
- package/dist/components/data-entry/index.js +152 -0
- package/dist/components/data-entry/input.d.ts +6 -0
- package/dist/components/data-entry/input.js +2 -0
- package/dist/components/data-entry/label.d.ts +8 -0
- package/dist/components/data-entry/label.js +2 -0
- package/dist/components/data-entry/radio.d.ts +24 -0
- package/dist/components/data-entry/radio.js +4 -0
- package/dist/components/data-entry/select.d.ts +18 -0
- package/dist/components/data-entry/select.js +3 -0
- package/dist/components/data-entry/slider.d.ts +16 -0
- package/dist/components/data-entry/slider.js +2 -0
- package/dist/components/data-entry/switch.d.ts +17 -0
- package/dist/components/data-entry/switch.js +2 -0
- package/dist/components/data-entry/textarea.d.ts +6 -0
- package/dist/components/data-entry/textarea.js +3 -0
- package/dist/components/data-entry/time-picker.d.ts +16 -0
- package/dist/components/data-entry/time-picker.js +7 -0
- package/dist/components/data-entry/transfer.d.ts +17 -0
- package/dist/components/data-entry/transfer.js +11 -0
- package/dist/components/data-entry/tree-select.d.ts +26 -0
- package/dist/components/data-entry/tree-select.js +13 -0
- package/dist/components/data-entry/upload.d.ts +42 -0
- package/dist/components/data-entry/upload.js +11 -0
- package/dist/components/feedback/alert.d.ts +60 -0
- package/dist/components/feedback/alert.js +7 -0
- package/dist/components/feedback/dialog.d.ts +64 -0
- package/dist/components/feedback/dialog.js +7 -0
- package/dist/components/feedback/index.d.ts +16 -0
- package/dist/components/feedback/index.js +14 -0
- package/dist/components/feedback/sheet.d.ts +24 -0
- package/dist/components/feedback/sheet.js +2 -0
- package/dist/components/feedback/sonner.d.ts +6 -0
- package/dist/components/feedback/sonner.js +1 -0
- package/dist/components/general/button.d.ts +20 -0
- package/dist/components/general/button.js +2 -0
- package/dist/components/general/index.d.ts +6 -0
- package/dist/components/general/index.js +2 -0
- package/dist/components/layout/index.d.ts +71 -0
- package/dist/components/layout/index.js +5 -0
- package/dist/components/navigation/dropdown-menu.d.ts +28 -0
- package/dist/components/navigation/dropdown-menu.js +2 -0
- package/dist/components/navigation/index.d.ts +32 -0
- package/dist/components/navigation/index.js +12 -0
- package/dist/components/navigation/pagination.d.ts +11 -0
- package/dist/components/navigation/pagination.js +7 -0
- package/dist/components/navigation/steps.d.ts +12 -0
- package/dist/components/navigation/steps.js +3 -0
- package/dist/components/navigation/tabs-items.d.ts +12 -0
- package/dist/components/navigation/tabs-items.js +3 -0
- package/dist/components/navigation/tabs.d.ts +12 -0
- package/dist/components/navigation/tabs.js +2 -0
- package/dist/components/query/index.d.ts +43 -0
- package/dist/components/query/index.js +8 -0
- package/dist/components/ui/index.d.ts +57 -0
- package/dist/components/ui/index.js +37 -0
- package/dist/content.prop-D1Dd3TAc.d.ts +31 -0
- package/dist/data-display.prop-DNTAzmDy.d.ts +58 -0
- package/dist/data-entry.prop-BEGA1lTq.d.ts +323 -0
- package/dist/data-table-D1u_rKLK.d.ts +83 -0
- package/dist/data.prop-BVvfKC_g.d.ts +41 -0
- package/dist/feedback.prop-BmxUlpAW.d.ts +64 -0
- package/dist/filter-bar-B7OGFO9S.d.ts +10 -0
- package/dist/form/index.d.ts +21 -0
- package/dist/form/index.js +4 -0
- package/dist/form.prop-BHgpuFFm.d.ts +41 -0
- package/dist/format-date-ByyZoqI5.d.ts +51 -0
- package/dist/general.prop-D7brMPNL.d.ts +16 -0
- package/dist/i18n/index.d.ts +217 -0
- package/dist/i18n/index.js +2 -0
- package/dist/index.d.ts +46 -26
- package/dist/index.js +39 -13062
- package/dist/inline-C5u6ptJV.d.ts +10 -0
- package/dist/interaction.prop-Cdn7wOtq.d.ts +25 -0
- package/dist/layout.prop-4TCNvyQZ.d.ts +20 -0
- package/dist/layout.prop-C795F0qg.d.ts +112 -0
- package/dist/lib/datetime/index.d.ts +31 -0
- package/dist/lib/datetime/index.js +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +1 -0
- package/dist/navigation.prop-DpZqcXey.d.ts +78 -0
- package/dist/navigation.prop-DxBiClEH.d.ts +20 -0
- package/dist/props/components/index.d.ts +27 -0
- package/dist/props/components/index.js +1 -0
- package/dist/props/index.d.ts +28 -0
- package/dist/props/index.js +3 -0
- package/dist/props/registry.d.ts +649 -0
- package/dist/props/registry.js +1 -0
- package/dist/props/vocabulary/index.d.ts +7 -0
- package/dist/props/vocabulary/index.js +1 -0
- package/dist/query.prop-hIPrk2zI.d.ts +71 -0
- package/dist/search-input-uP01rY1L.d.ts +22 -0
- package/dist/shared.prop-BNRJc9K0.d.ts +45 -0
- package/dist/styles/alert-layout.css +191 -0
- package/dist/styles/badge-layout.css +22 -0
- package/dist/styles/card-layout.css +373 -0
- package/dist/styles/control.css +504 -0
- package/dist/styles/data-display-layout.css +246 -0
- package/dist/styles/density.css +43 -0
- package/dist/styles/dialog-layout.css +84 -0
- package/dist/styles/index.css +105 -0
- package/dist/styles/layout.css +479 -0
- package/dist/styles/shell-layout.css +604 -0
- package/dist/styles/table-layout.css +109 -0
- package/dist/theme/example.service.css +37 -0
- package/dist/tokens/base.css +13 -0
- package/dist/tokens/foundation.css +151 -0
- package/dist/tokens/primitives/badge.css +13 -0
- package/dist/tokens/primitives/card.css +29 -0
- package/dist/tokens/primitives/control.css +55 -0
- package/dist/tokens/primitives/feedback.css +17 -0
- package/dist/tokens/primitives/layout.css +20 -0
- package/dist/tokens/primitives/navigation.css +13 -0
- package/dist/tokens/primitives/table.css +10 -0
- package/dist/types-mvzYGrma.d.ts +37 -0
- package/dist/use-toast-Dol5bdY3.d.ts +34 -0
- package/package.json +279 -117
- package/scripts/ui-audit.mjs +179 -0
- package/BRAND.md +0 -296
- package/CHANGELOG.md +0 -668
- package/config/eslint.js +0 -54
- package/config/prettier.cjs +0 -20
- package/config/tsconfig.base.json +0 -22
- package/config/vitest.base.ts +0 -26
- package/dist/MiniMonth-YAmPGEpC.d.ts +0 -143
- package/dist/Table.types-BbsxoIYE.d.ts +0 -352
- package/dist/color-DO0qqUAb.d.ts +0 -38
- package/dist/components/composites.d.ts +0 -963
- package/dist/components/composites.js +0 -7343
- package/dist/components/composites.js.map +0 -1
- package/dist/components/primitives.d.ts +0 -2744
- package/dist/components/primitives.js +0 -7356
- package/dist/components/primitives.js.map +0 -1
- package/dist/components/shell.d.ts +0 -182
- package/dist/components/shell.js +0 -774
- package/dist/components/shell.js.map +0 -1
- package/dist/hooks.d.ts +0 -100
- package/dist/hooks.js +0 -558
- package/dist/hooks.js.map +0 -1
- package/dist/i18n.d.ts +0 -61
- package/dist/i18n.js +0 -860
- package/dist/i18n.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/padding-DY0JV5Ja.d.ts +0 -16
- package/dist/preferences.d.ts +0 -132
- package/dist/preferences.js +0 -262
- package/dist/preferences.js.map +0 -1
- package/dist/props.d.ts +0 -86
- package/dist/props.js +0 -16
- package/dist/props.js.map +0 -1
- package/dist/size-CQwNvOWd.d.ts +0 -19
- package/dist/types-LTj-2bl-.d.ts +0 -30
- package/dist/useTableViews-D5NIAJ7h.d.ts +0 -154
- 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`.
|