@godxjp/ui 2.1.0 → 5.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.
- package/BRAND.md +39 -29
- package/CHANGELOG.md +554 -10
- package/README.md +143 -168
- package/config/eslint.js +54 -0
- package/config/prettier.cjs +20 -0
- package/config/tsconfig.base.json +22 -0
- package/config/vitest.base.ts +26 -0
- package/dist/MiniMonth-YAmPGEpC.d.ts +143 -0
- package/dist/Table.types-BbsxoIYE.d.ts +352 -0
- package/dist/color-DO0qqUAb.d.ts +38 -0
- package/dist/components/composites.d.ts +963 -0
- package/dist/components/composites.js +7340 -0
- package/dist/components/composites.js.map +1 -0
- package/dist/components/primitives.d.ts +2633 -163
- package/dist/components/primitives.js +7264 -165
- package/dist/components/primitives.js.map +1 -1
- package/dist/components/shell.d.ts +82 -12
- package/dist/components/shell.js +168 -162
- package/dist/components/shell.js.map +1 -1
- package/dist/hooks.d.ts +83 -8
- package/dist/hooks.js +497 -83
- package/dist/hooks.js.map +1 -1
- package/dist/i18n.d.ts +55 -3
- package/dist/i18n.js +456 -5
- package/dist/i18n.js.map +1 -1
- package/dist/index.d.ts +24 -5
- package/dist/index.js +12522 -267
- package/dist/index.js.map +1 -1
- package/dist/padding-DY0JV5Ja.d.ts +16 -0
- package/dist/preferences.d.ts +132 -0
- package/dist/preferences.js +262 -0
- package/dist/preferences.js.map +1 -0
- package/dist/props.d.ts +86 -0
- package/dist/props.js +16 -0
- package/dist/props.js.map +1 -0
- package/dist/size-CQwNvOWd.d.ts +19 -0
- package/dist/{data.d.ts → types-LTj-2bl-.d.ts} +7 -12
- package/dist/useTableViews-D5NIAJ7h.d.ts +154 -0
- package/package.json +92 -34
- package/src/tokens/tailwind.css +158 -0
- package/dist/components/screens.d.ts +0 -51
- package/dist/components/screens.js +0 -806
- package/dist/components/screens.js.map +0 -1
- package/dist/data.js +0 -93
- package/dist/data.js.map +0 -1
- package/src/tokens/tokens.css +0 -765
package/BRAND.md
CHANGED
|
@@ -15,33 +15,40 @@ import "./app.tsx";
|
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
That single import wires:
|
|
18
|
-
- type scale, color palette, OKLCH dark mode, four
|
|
19
|
-
(
|
|
20
|
-
shadows,
|
|
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
|
|
21
22
|
- all application-shell CSS classes (`.app-root`, `.sb-*`, `.tb-*`,
|
|
22
23
|
`.btn`, `.badge`, `.card`, `.kanban`, `.diff`, `.prose`,
|
|
23
24
|
`.auth-shell`, …)
|
|
24
25
|
|
|
25
|
-
For React: also pull pre-built primitives +
|
|
26
|
+
For React: also pull pre-built primitives + shell:
|
|
26
27
|
|
|
27
28
|
```tsx
|
|
28
29
|
import { AppShell, Sidebar, Topbar, TweaksPanel } from "@godxjp/ui/components/shell";
|
|
29
|
-
import {
|
|
30
|
+
import { Button, Card, Input, Field } from "@godxjp/ui/components/primitives";
|
|
30
31
|
import { useTweaks } from "@godxjp/ui/hooks";
|
|
31
32
|
import { initI18n } from "@godxjp/ui/i18n";
|
|
32
33
|
```
|
|
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
|
+
|
|
34
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.
|
|
35
41
|
|
|
36
42
|
## Optional service-local overlay
|
|
37
43
|
|
|
38
|
-
If — and only if — a service has a **brand-approved** deviation
|
|
39
|
-
|
|
40
|
-
|
|
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):
|
|
41
48
|
|
|
42
49
|
```css
|
|
43
50
|
/* services/<svc>/frontend/src/theme.css */
|
|
44
|
-
[data-
|
|
51
|
+
[data-accent="my-svc"] {
|
|
45
52
|
--primary: oklch(56% 0.15 200); /* still chroma ≤ 0.18 */
|
|
46
53
|
--ring: oklch(56% 0.15 200);
|
|
47
54
|
}
|
|
@@ -54,8 +61,8 @@ import "@godxjp/ui/tokens";
|
|
|
54
61
|
import "./theme.css"; // overlay
|
|
55
62
|
```
|
|
56
63
|
|
|
57
|
-
The overlay can **only** redeclare brand-token CSS variables under
|
|
58
|
-
`[data-
|
|
64
|
+
The overlay can **only** redeclare brand-token CSS variables under
|
|
65
|
+
a `[data-accent]` or `[data-theme]` attribute selector. Editing
|
|
59
66
|
foundational variables on `:root`, redefining the type scale, or
|
|
60
67
|
overriding shell classes is forbidden and a review-block.
|
|
61
68
|
|
|
@@ -85,11 +92,13 @@ enterprise aesthetics):
|
|
|
85
92
|
These are NOT taste choices — they're brand contracts. Any visual
|
|
86
93
|
direction that breaks them needs operator sign-off in advance.
|
|
87
94
|
|
|
88
|
-
## Token surface (read from `src/
|
|
95
|
+
## Token surface (read from `src/styles/theme.css`)
|
|
89
96
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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`
|
|
93
102
|
for portability to Figma / theme tools — that split is preserved
|
|
94
103
|
verbatim under `design/source-2026-05-13/` as an audit trail; the
|
|
95
104
|
consumable artefact in `src/tokens/` is intentionally merged.
|
|
@@ -124,10 +133,11 @@ enterprise vibe: `--heading-h1 = 20px`, `--heading-h2 = 18px`,
|
|
|
124
133
|
|
|
125
134
|
### Color — OKLCH only
|
|
126
135
|
|
|
127
|
-
Primary palette mastered in OKLCH so dark mode +
|
|
136
|
+
Primary palette mastered in OKLCH so dark mode + accent overrides are
|
|
128
137
|
mechanical. Never override `--primary` / `--foreground` /
|
|
129
138
|
`--background` / `--card` / `--muted` in app code; switch via
|
|
130
|
-
`[data-
|
|
139
|
+
`[data-accent="<palette>"]` or `[data-theme="dark"]` attributes
|
|
140
|
+
(per cardinal rule 19 — `[data-tenant]` is removed).
|
|
131
141
|
|
|
132
142
|
```
|
|
133
143
|
--background warm off-white oklch(99% 0.002 60)
|
|
@@ -148,20 +158,19 @@ as a button color; use `--destructive`). The palette:
|
|
|
148
158
|
`--wa-moegi` `--wa-yamabuki` `--wa-shu` `--wa-akane` `--wa-enji`
|
|
149
159
|
`--wa-sakura` `--wa-sumi` `--wa-nezu`.
|
|
150
160
|
|
|
151
|
-
###
|
|
152
|
-
|
|
153
|
-
Brand palette swaps via `[data-tenant="<slug>"]` at `<html>` or any
|
|
154
|
-
ancestor. Defined slugs:
|
|
161
|
+
### Accent overrides
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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.
|
|
160
169
|
|
|
161
170
|
### Dark mode
|
|
162
171
|
|
|
163
|
-
`[data-theme="dark"]` flips every surface +
|
|
164
|
-
`
|
|
172
|
+
`[data-theme="dark"]` flips every surface + accent. Already wired
|
|
173
|
+
in `src/styles/shell.css`.
|
|
165
174
|
|
|
166
175
|
### Density
|
|
167
176
|
|
|
@@ -272,8 +281,9 @@ and match its visual rhythm. Don't redesign solo without a precedent.
|
|
|
272
281
|
|
|
273
282
|
When the operator approves a brand change:
|
|
274
283
|
|
|
275
|
-
1. Update `src/
|
|
276
|
-
`
|
|
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`.
|
|
277
287
|
2. Bump the package version.
|
|
278
288
|
3. Bump the submodule pointer in `godx-admin` umbrella.
|
|
279
289
|
4. Each portal pulls the new submodule SHA in a follow-up PR.
|