@trading-game/design-intelligence-layer 0.17.4 → 1.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/AGENTS.md +105 -231
- package/README.md +50 -746
- package/dist/index.cjs +2753 -2986
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +247 -261
- package/dist/index.d.ts +247 -261
- package/dist/index.js +2648 -2856
- package/dist/index.js.map +1 -1
- package/docs/components/accordion.md +85 -0
- package/docs/components/alert-dialog.md +98 -0
- package/docs/components/aspect-ratio.md +55 -0
- package/docs/components/avatar.md +88 -0
- package/docs/components/badge.md +75 -0
- package/docs/components/banner.md +84 -0
- package/docs/components/bottom-navigation.md +90 -0
- package/docs/components/breadcrumb.md +85 -0
- package/docs/components/button.md +94 -0
- package/docs/components/calendar.md +74 -0
- package/docs/components/card.md +79 -0
- package/docs/components/carousel.md +82 -0
- package/docs/components/checkbox.md +66 -0
- package/docs/components/chip.md +72 -0
- package/docs/components/command.md +86 -0
- package/docs/components/context-menu.md +90 -0
- package/docs/components/dialog.md +95 -0
- package/docs/components/drawer.md +97 -0
- package/docs/components/dropdown-menu.md +92 -0
- package/docs/components/empty.md +87 -0
- package/docs/components/field.md +117 -0
- package/docs/components/hover-card.md +77 -0
- package/docs/components/input-group.md +105 -0
- package/docs/components/input-otp.md +87 -0
- package/docs/components/input.md +71 -0
- package/docs/components/item.md +105 -0
- package/docs/components/label.md +56 -0
- package/docs/components/link.md +66 -0
- package/docs/components/menubar.md +102 -0
- package/docs/components/native-select.md +71 -0
- package/docs/components/navigation-button.md +68 -0
- package/docs/components/navigation-menu.md +99 -0
- package/docs/components/numpad.md +78 -0
- package/docs/components/pagination.md +84 -0
- package/docs/components/popover.md +89 -0
- package/docs/components/profile-photo.md +81 -0
- package/docs/components/progress.md +60 -0
- package/docs/components/radio-group.md +82 -0
- package/docs/components/resizable.md +79 -0
- package/docs/components/scroll-area.md +66 -0
- package/docs/components/section-message.md +99 -0
- package/docs/components/select.md +105 -0
- package/docs/components/separator.md +55 -0
- package/docs/components/sheet.md +91 -0
- package/docs/components/sidebar.md +125 -0
- package/docs/components/skeleton.md +51 -0
- package/docs/components/slider.md +61 -0
- package/docs/components/spinner.md +52 -0
- package/docs/components/stepper.md +68 -0
- package/docs/components/switch.md +57 -0
- package/docs/components/table.md +86 -0
- package/docs/components/tabs.md +95 -0
- package/docs/components/textarea.md +58 -0
- package/docs/components/toast.md +66 -0
- package/docs/components/toggle-group.md +77 -0
- package/docs/components/toggle.md +60 -0
- package/docs/components/tooltip.md +83 -0
- package/docs/foundations/colors.md +110 -0
- package/docs/foundations/motion.md +63 -0
- package/docs/foundations/shape-layout.md +56 -0
- package/docs/foundations/typography.md +83 -0
- package/docs/patterns/forms.md +70 -0
- package/docs/patterns/menus.md +50 -0
- package/docs/patterns/on-brand.md +43 -0
- package/guides/audits/design-system-audit-2026-07.md +135 -0
- package/guides/rules/design-system-consuming-project.mdc +56 -0
- package/package.json +5 -6
- package/src/styles.css +1634 -252
- package/guides/design-system-guide/trading-game-ds-guide.md +0 -933
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Design System Audit — July 2026
|
|
2
|
+
|
|
3
|
+
> **Who this is for:** the design owner of `@trading-game/design-intelligence-layer`.
|
|
4
|
+
> **How to read it:** written in design language. Think of **tokens as Figma variables**, **semantic tokens as variable aliases**, and **components as your published library**. Code references appear in small print for whoever implements the fixes.
|
|
5
|
+
> **How it was done:** three deep scans — the token files line-by-line, all 61 UI components, all 7 blocks — plus cross-checks of heights, corner radii, focus rings, icon sizes, and spacing.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 1 — Scorecard
|
|
10
|
+
|
|
11
|
+
| Category | Grade | Verdict |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| Token architecture | 🟡 B− | Right 3-layer structure (primitives → semantics → components), but several variables skip the chain and hold raw values. |
|
|
14
|
+
| Semantic naming | 🟡 C+ | Two naming languages coexist: your custom `on-*` system and leftover shadcn `*-foreground` names. |
|
|
15
|
+
| Color usage in components | 🔴 C− | ~13 components point at color variables that **don't exist** — error states and some separators render with no color. |
|
|
16
|
+
| Sizing (control heights) | 🟢 A− | Core family (Button, Input, Select…) perfectly consistent at 24/32/40/48px. Three strays (Toggle, native select, Combobox) sit at an orphan 36px. |
|
|
17
|
+
| Spacing & gaps | 🟢 B+ | Mostly on the 4/8-pt grid; a handful of odd one-off values (14px paddings, 18px badges). |
|
|
18
|
+
| Typography | 🟡 B− | New scale is well-designed and documented — but it has **no variables underneath** (numbers are baked into the styles) and none of the 7 blocks use it yet. |
|
|
19
|
+
| Theming | 🟡 B | Light-only by decision (no dark mode planned). Inverse tokens cover coloured surfaces. Fine as a policy — documented here so it's deliberate. |
|
|
20
|
+
| Motion | 🟢 A | Fully tokenized durations and easings, primitive → semantic chain. The strongest category. |
|
|
21
|
+
| Single source of truth | 🔴 D | Two copies of the token file exist (demo vs npm) and they have **drifted apart** — the demo doesn't show what consumers get. |
|
|
22
|
+
| Docs & AI-readiness | 🟢 B+ | Guide, agent rules, and typography docs are current; missing a machine-readable token export. |
|
|
23
|
+
|
|
24
|
+
**Overall: B−.** Strong bones, excellent consistency where migration was finished, undermined by leftover shadcn wiring and the two-file drift.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 2 — The Good 🟢
|
|
29
|
+
|
|
30
|
+
Things that already meet universal design-system standards:
|
|
31
|
+
|
|
32
|
+
1. **Real 3-layer token architecture.** Raw palette → semantic meaning → component use, exactly how mature systems (Material, Polaris) structure variables. Primitives are in modern OKLCH color space.
|
|
33
|
+
2. **The migrated control family is genuinely consistent.** Button, Input, Select, InputGroup, Chip, NavigationButton all share the same height ladder (24/32/40/48px), the same 4px corners, and the same 3px focus ring. This is the hardest thing to get right and it's right.
|
|
34
|
+
3. **Motion is fully tokenized.** Durations and easings exist as primitives, get semantic names (`interactive`, `surface`, `overlay`), and components consume them. Rare even in professional systems.
|
|
35
|
+
4. **31 of 61 components are completely clean.** No hardcoded colors, no off-token values.
|
|
36
|
+
5. **Blocks use color tokens well.** Hero, FAQ, NavBar etc. consistently use `bg-prominent`, `text-on-subtle`, layout gutter tokens — no rogue hex colors (except deliberate third-party brand marks, see §6).
|
|
37
|
+
6. **Dead shadcn tokens were deleted from the theme.** `muted`, `accent`, `destructive`, `chart-*` were correctly removed as theme variables. (The bug is that components still *reference* some of them — see The Worst.)
|
|
38
|
+
7. **The new typography scale is well-designed** — sentence case, weight-led hierarchy, tightening tracking, fluid scaling — and it's documented for humans *and* AI agents.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 3 — The Worst 🔴 (fix these first)
|
|
43
|
+
|
|
44
|
+
### 3.1 — Invisible error states: components point at variables that don't exist
|
|
45
|
+
|
|
46
|
+
**What it is.** When the system was customized from shadcn, the `destructive` (error red) and bare `border` color variables were deleted from the theme — but **~13 components still reference each**. In Figma terms: the variable was deleted from the library, but layers still point at the dead reference.
|
|
47
|
+
|
|
48
|
+
**What this means for your design.** When a form field is invalid, the red border/ring **silently doesn't render**. Form error text, menu "delete" items, some separators, scrollbars, and keyboard-key chips can draw with no color. Users can miss errors entirely — this is a real usability bug, not a cosmetic one.
|
|
49
|
+
|
|
50
|
+
**Affected:** error styling in Button, Input, Textarea, Select, InputGroup, InputOTP, RadioGroup, Toggle, Combobox, Form, Field, Menubar, DropdownMenu, ContextMenu; separator color in Separator, ScrollArea, Resizable, Kbd, Command, Chart, and menus. Also stragglers: `muted`/`accent` in Chart & Dialog & ContextMenu, bare `secondary` in Sheet, `foreground` in InputOTP.
|
|
51
|
+
|
|
52
|
+
**The fix (safe, one-day).** Re-point the dead names at your existing variables: error red → your **Loss Red** (`--semantic-loss`), border → your **Border Subtle**. One change in the token file makes every error state visible again — no component edits needed. Then optionally sweep components later to use the proper names directly.
|
|
53
|
+
<sub>`button.tsx:9`, `form.tsx:100,150`, `separator.tsx:20`, `kbd.tsx:10`, `scroll-area.tsx:52`, `command.tsx:136`, `sheet.tsx:78`, `input-otp.tsx:62`, `dialog.tsx:73`, `context-menu.tsx:69,129,147,172`, `chart.tsx:58` + ~10 more files.</sub>
|
|
54
|
+
|
|
55
|
+
### 3.2 — Two drifted copies of your library
|
|
56
|
+
|
|
57
|
+
**What it is.** Your tokens live in two files: one the demo site uses (`app/globals.css`), one that ships to npm (`src/styles.css`). They were meant to be identical mirrors. They aren't anymore — like two copies of the same Figma library where different edits landed in each.
|
|
58
|
+
|
|
59
|
+
**What this means for your design.** The demo — your visual source of truth — **does not show what consumers actually get**. Concretely: the ticket-card shimmer animation is *defined differently* in each file (demo has the richer version); the shipped version sets base font smoothing the demo doesn't; a pulse animation exists only in the demo; the result-card motion exists only in the shipped file (so the demo never tests it); a few tokens (`avatar-size-xl`, `tracking-wide`) exist only in the demo, so consumers can't use them at all.
|
|
60
|
+
|
|
61
|
+
**The fix (small build change).** Make the demo import the exact shipped file, keeping only demo-specific extras separate. One library, drift becomes impossible. Reconcile the current differences deliberately (keep the richer shimmer, adopt the shipped body rule, move demo-only tokens into the shipped file).
|
|
62
|
+
<sub>`stub-shimmer`: globals:430-448 vs styles:429-432 · `body`: globals:483 vs styles:424 · `cta-pulse`: globals-only 417-427 · `results-motion`: styles-only 570-590 · `--avatar-size-xl` globals:111 · `--tracking-wide` globals:109.</sub>
|
|
63
|
+
|
|
64
|
+
### 3.3 — Brand blue hardcoded inside the Button shimmer
|
|
65
|
+
|
|
66
|
+
**What it is.** The `primary-inverse-shimmer` button variant paints its gleam with a literal `rgba(35,35,255,…)` — your brand blue **written out as a raw number** instead of referencing the primary token.
|
|
67
|
+
|
|
68
|
+
**What this means for your design.** If you ever adjust your primary blue, every button follows the token — except this shimmer, which stays the old blue. Classic AI-hardcoding artifact.
|
|
69
|
+
|
|
70
|
+
**The fix (30 min).** Derive the gradient from the primary variable.
|
|
71
|
+
<sub>`button.tsx:86-88`.</sub>
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 4 — The Bad 🟡 (plan these)
|
|
76
|
+
|
|
77
|
+
### 4.1 — Typography has no variables underneath
|
|
78
|
+
Your new type scale exists as ready-made text styles (`display`, `heading-xl`…`overline`) — the equivalent of Figma text styles. But the numbers inside (56px, 64px line-height, -0.03em…) are **baked in**. There are no size/line-height/weight/tracking variables, and no desktop/mobile semantic layer (Figma variable modes equivalent).
|
|
79
|
+
**Fix:** create type primitives (`--font-size-display`, `--line-height-display`, `--font-weight-display`, `--tracking-display`, etc.) with desktop and mobile values, rebuild the text styles from them. AI tools can then read your typography as data instead of parsing CSS.
|
|
80
|
+
|
|
81
|
+
### 4.2 — All 7 blocks ignore the new type scale
|
|
82
|
+
Every block heading hand-builds its typography (`text-5xl` + bold + tight tracking) instead of using your text styles — FAQ even re-creates your `overline` style from scratch, and Result-card headings skip the display font entirely.
|
|
83
|
+
**What it means:** change the type scale, and none of your marketing/product blocks follow. Two sources of typographic truth.
|
|
84
|
+
**Fix:** migrate all block headings/body text to the scale classes. Visible change — review each block after.
|
|
85
|
+
<sub>hero:47,68 · faq:56,57,80,107-114 · auth:51 · result:64,67,91,123 · open-positions:66,85,193 · header-nav:44.</sub>
|
|
86
|
+
|
|
87
|
+
### 4.3 — Three controls never joined the family
|
|
88
|
+
Toggle, native Select, and Combobox still wear shadcn defaults: **36px height** (your ladder is 32/40/48) and **8px corners** (your controls use 4px). Two "select" controls exist with different heights and corners. A few more leftovers (Command, Menubar, NavigationMenu, InputOTP, Sidebar) use the orphan 36px/28px rungs.
|
|
89
|
+
**Fix:** re-size to the family ladder and 4px corners. Visible change — verify side-by-side.
|
|
90
|
+
<sub>toggle.tsx:10,19 · native-select.tsx:20 · combobox.tsx:236 · command:70 · menubar:17 · navigation-menu:62 · input-otp:54 · sidebar:496,696.</sub>
|
|
91
|
+
|
|
92
|
+
### 4.4 — Broken variable chains inside the token file
|
|
93
|
+
Several semantic variables hold raw color values instead of referencing a primitive — including a mystery near-black with a green tint (`oklch(0.07 0.012 165)`) repeated in three places that matches nothing in your palette, and a slider color that hand-copies a primitive's value instead of referencing it.
|
|
94
|
+
**What it means:** edit the primitive palette and these won't follow — silent inconsistencies later.
|
|
95
|
+
**Fix:** re-point each to the primitive it should come from; add a primitive where none exists.
|
|
96
|
+
<sub>--subtle, --on-subtle, --border-subtle, --card-foreground, --popover-foreground, --sidebar-foreground, --sidebar-accent(-foreground), --slider-range (≡ --primitive-blue-alpha-40), --input-inverse-surface, --semantic-boost-surface.</sub>
|
|
97
|
+
|
|
98
|
+
### 4.5 — Two naming languages
|
|
99
|
+
Your custom convention says "text on X" = `on-*` (`on-primary`, `on-subtle`). The un-renamed shadcn sidebar/card/popover block still says `*-foreground`. Same concept, two names — confusing for humans and AI alike. Also an orphan: `secondary-hover` exists with no `secondary`.
|
|
100
|
+
**Fix:** rename the leftovers into the `on-*` convention (keep old names as aliases during transition).
|
|
101
|
+
|
|
102
|
+
### 4.6 — Missing variable categories
|
|
103
|
+
No spacing scale variables, no elevation/shadow variables, no z-index (layer order) variables; breakpoints are magic numbers (320/600/1136). Universal systems tokenize all four. Motion, again, is the model to copy.
|
|
104
|
+
|
|
105
|
+
### 4.7 — Odd one-off values in core components
|
|
106
|
+
A frosted `white/5` fill in 4 input components (should be a surface token); off-scale text sizes in Alert (13px/11px), TicketCard (20px), Calendar (0.8rem); Button's large size uses a 14px vertical pad (off-grid) and a 14px icon written as an arbitrary value; a notification badge hand-built from three arbitrary values (18×18px, 10px text); off-token corner radii (Checkbox 2px, Slider 4px-arbitrary, InputGroup "radius minus 5px", Textarea 6px vs Input's 4px).
|
|
107
|
+
|
|
108
|
+
### 4.8 — Small consistency drifts
|
|
109
|
+
NavigationButton's focus ring omits the border tint others have; Sidebar uses a 2px ring (standard is 3px); NavigationMenu adds an outline on top; icon-to-box ratios differ between Button and NavigationButton at identical sizes; blocks split between two responsive strategies (`min-[600px]` media queries vs `@[600px]` container queries).
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## 5 — Fix roadmap (gradual batches — each one you verify in the demo before it ships)
|
|
114
|
+
|
|
115
|
+
| Batch | Contents | Effort | What you visually verify |
|
|
116
|
+
|---|---|---|---|
|
|
117
|
+
| **1 — Stop the bleeding** | Re-point dead `destructive`/`border` variables; fix shimmer blue; merge the two token files into one source | **S** (≈1 day) | Invalid inputs show a red border; separators/kbd chips visible; shimmer looks identical; demo pixel-identical otherwise |
|
|
118
|
+
| **2 — Typography becomes variables** | Type primitives + desktop/mobile semantic layer; text styles rebuilt from variables; all 7 blocks adopt the scale | **M** | Typography page unchanged; every block heading matches the scale spec; resize = smooth scaling |
|
|
119
|
+
| **3 — Bring strays into the family** | Toggle/native-select/Combobox to 32/40/48 + 4px corners; radius strays; leftover 36px rungs; focus-ring stragglers; `white/5` → token | **M** | Controls side-by-side: equal heights, equal corners, one focus style |
|
|
120
|
+
| **4 — AI-ready polish** | Spacing/elevation/z-index variables; off-grid paddings; icon ratios; one responsive strategy; machine-readable `tokens.json` export | **M–L** | Spacing rhythm audit passes; AI tools can read tokens as data |
|
|
121
|
+
|
|
122
|
+
Batch 1 has **zero intentional visual change** (it only repairs broken styling). Batches 2–3 change visible design on purpose — each ships as its own minor version so consuming projects upgrade deliberately.
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## 6 — Accepted exceptions (policy — don't re-flag these)
|
|
127
|
+
|
|
128
|
+
1. **Third-party brand colors** — Google's four-color G and Telegram blue in the sign-in buttons are brand marks and stay hardcoded by design. <sub>auth-block.tsx:100-124.</sub>
|
|
129
|
+
2. **Numeric displays** — P&L amounts and balances use `tabular-nums` with bespoke sizing for alignment; they are data displays, not headings, and may stay off the heading scale. <sub>result-block.tsx:67, header-navigation-block.tsx:44, open-positions-block.tsx:178.</sub>
|
|
130
|
+
3. **Toast styling workaround** — the toast library (Sonner) requires `!important`-style overrides; they reference real tokens, just in an unusual syntax. Acceptable. <sub>toast.tsx:34-37.</sub>
|
|
131
|
+
4. **Light-only theming** — a deliberate product decision (no dark mode planned). The inverse-token family covers dark surfaces where needed.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
*Audit date: 14 Jul 2026 · Scope: `src/styles.css`, `app/globals.css`, 61 files in `components/ui/`, 7 files in `components/blocks/` · Method: exhaustive automated scans + manual verification of every flagged line.*
|
|
@@ -122,6 +122,62 @@ Token rules apply **only** to: color (bg, text, border, ring, shadow color), bor
|
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
125
|
+
## Rule 3.5 — Typography: use the type scale, never hand-written sizes
|
|
126
|
+
|
|
127
|
+
**MANDATORY decision procedure for ANY text you render.** Do not choose font sizes. Every piece of text gets its size, line-height, and weight from one of the 13 scale classes below — this is what keeps every screen's hierarchy identical.
|
|
128
|
+
|
|
129
|
+
### Step 1 — Is there a component for it?
|
|
130
|
+
|
|
131
|
+
If the text lives in a component slot, USE THE COMPONENT — every component carries its own typography internally (via private component tokens or a built-in scale class):
|
|
132
|
+
`DialogTitle` / `AlertDialogTitle` / `SheetTitle` / `DrawerTitle` / `EmptyTitle`, `CardTitle`, every `*Description` slot, `Label` / `FieldLabel` / `FieldTitle` / `ItemTitle`, `AccordionTrigger` / `AccordionContent`, `Button` — never hand-style any component's text.
|
|
133
|
+
|
|
134
|
+
### Step 2 — Freeform text: pick from the scale
|
|
135
|
+
|
|
136
|
+
| Class | Size / line | Weight | Use for |
|
|
137
|
+
| ------------ | ----------- | ------------- | ------------------------------------------------------ |
|
|
138
|
+
| `display` | 36→56 fluid | ExtraBold 800 | Hero statement on a landing/marketing page |
|
|
139
|
+
| `h1` | 30→40 fluid | Bold 700 | The single main title of a page/screen (ONE per page) |
|
|
140
|
+
| `h2` | 26→32 fluid | Bold 700 | A major section heading |
|
|
141
|
+
| `h3` | 22→24 fluid | SemiBold 600 | A sub-group heading inside a section |
|
|
142
|
+
| `h4` | 20 / 28 | SemiBold 600 | A dashboard panel / large feature-card header |
|
|
143
|
+
| `h5` | 18 / 24 | SemiBold 600 | Dialog, sheet, and drawer titles (freeform) |
|
|
144
|
+
| `h6` | 16 / 24 | SemiBold 600 | A card / compact panel title (freeform) |
|
|
145
|
+
| `body-lg` | 18 / 28 | Regular 400 | Intro / lead paragraph |
|
|
146
|
+
| `body-md` | 16 / 24 | Regular 400 | Default body text |
|
|
147
|
+
| `body-sm` | 14 / 20 | Regular 400 | Description under a title, helper copy |
|
|
148
|
+
| `label-text` | 14 / 20 | Medium 500 | Form label, list-item title, table header (freeform) |
|
|
149
|
+
| `caption` | 12 / 16 | Medium 500 | Metadata, timestamps, fine print |
|
|
150
|
+
| `overline` | 12 / 16 | SemiBold 600 | Eyebrow above a heading, tag (uppercases itself) |
|
|
151
|
+
|
|
152
|
+
**`h1`–`h6` are STYLE names, not HTML tags.** Put the class on whatever element the document outline needs — `<h2 className="h4">` is correct and normal when heading level and visual size legitimately differ. Never let the class name pick the tag for you.
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
✅ <h1 className="h1 text-on-prominent">Account settings</h1>
|
|
156
|
+
✅ <h2 className="h2 text-on-prominent">Security</h2>
|
|
157
|
+
✅ <p className="body-sm text-on-subtle">Manage your sign-in methods.</p>
|
|
158
|
+
✅ <span className="overline text-primary">New</span> {/* uppercases itself */}
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Hard rules
|
|
162
|
+
```
|
|
163
|
+
❌ NEVER hand-build titles/body from utilities (text-2xl font-bold tracking-tight, text-[13px]…)
|
|
164
|
+
❌ NEVER uppercase a heading — the system is sentence-case; only `overline` uppercases (automatically)
|
|
165
|
+
❌ NEVER add responsive size overrides (md:text-*, sm:text-*) to a scale class — display and
|
|
166
|
+
h1–h3 already scale desktop→mobile via their tokens. A class NEVER changes between
|
|
167
|
+
breakpoints: h2 on desktop is h2 on mobile.
|
|
168
|
+
❌ NEVER use more than one h1 per page; never skip more than one hierarchy level
|
|
169
|
+
❌ NEVER tweak a scale class with utilities (h5 font-medium does nothing — scale classes are
|
|
170
|
+
unlayered CSS and beat utilities). Need something different? Use a different class.
|
|
171
|
+
✅ Emphasis inside body text: <b>/<span> + font-semibold on that span — never a bigger size
|
|
172
|
+
✅ Numeric data displays (P&L, balances) are the accepted exception: bespoke size + tabular-nums
|
|
173
|
+
✅ A SMALLER class passed via className overrides a component's built-in one (stylesheet is
|
|
174
|
+
ordered largest→smallest), e.g. <EmptyTitle className="h6"> for compact contexts
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
> Naming notes: `overline` is also a Tailwind text-decoration utility — the package's class wins and clears the line. The label class is `label-text` (not `label`) to avoid confusion with the `Label` component.
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
125
181
|
## Rule 4 — Do NOT install or configure these separately
|
|
126
182
|
|
|
127
183
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trading-game/design-intelligence-layer",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Trading Game Design System — shadcn/ui components with Tailwind CSS v4",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -29,11 +29,13 @@
|
|
|
29
29
|
"build:next": "next build",
|
|
30
30
|
"start": "next start",
|
|
31
31
|
"lint": "eslint",
|
|
32
|
-
"prepublishOnly": "npm run build"
|
|
32
|
+
"prepublishOnly": "npm run build",
|
|
33
|
+
"check:tokens": "node scripts/check-token-docs.mjs"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"dist/",
|
|
36
37
|
"src/styles.css",
|
|
38
|
+
"docs/",
|
|
37
39
|
"guides/",
|
|
38
40
|
"AGENTS.md"
|
|
39
41
|
],
|
|
@@ -46,7 +48,6 @@
|
|
|
46
48
|
"tailwindcss": ">=4"
|
|
47
49
|
},
|
|
48
50
|
"dependencies": {
|
|
49
|
-
"@base-ui/react": "^1.2.0",
|
|
50
51
|
"@hookform/resolvers": "^5.2.2",
|
|
51
52
|
"class-variance-authority": "^0.7.1",
|
|
52
53
|
"clsx": "^2.1.1",
|
|
@@ -57,11 +58,10 @@
|
|
|
57
58
|
"lucide-react": "^0.577.0",
|
|
58
59
|
"radix-ui": "^1.4.3",
|
|
59
60
|
"react-day-picker": "^9.14.0",
|
|
60
|
-
"react-hook-form": "^7.71.2",
|
|
61
61
|
"react-resizable-panels": "^4.7.1",
|
|
62
|
-
"recharts": "^2.15.4",
|
|
63
62
|
"sonner": "^2.0.7",
|
|
64
63
|
"tailwind-merge": "^3.5.0",
|
|
64
|
+
"tw-animate-css": "^1.4.0",
|
|
65
65
|
"vaul": "^1.1.2",
|
|
66
66
|
"zod": "^4.3.6"
|
|
67
67
|
},
|
|
@@ -79,7 +79,6 @@
|
|
|
79
79
|
"shadcn": "^3.8.5",
|
|
80
80
|
"tailwindcss": "^4",
|
|
81
81
|
"tsup": "^8.5.1",
|
|
82
|
-
"tw-animate-css": "^1.4.0",
|
|
83
82
|
"typescript": "^5"
|
|
84
83
|
}
|
|
85
84
|
}
|