@trading-game/design-intelligence-layer 1.0.1 → 1.0.3

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 CHANGED
@@ -7,7 +7,7 @@ Rules of engagement for AI agents building with `@trading-game/design-intelligen
7
7
  1. **Semantic colour tokens only.** Classes like `bg-background-brand-default`, `text-text-subtle-default`, `border-border-default-default`. Never hex, never `bg-blue-500`, never primitives — except alpha primitives for glazes/glass (`bg-(--primitive-white-alpha-24)`).
8
8
  2. **Never use deprecated aliases** (`bg-prominent`, `text-on-subtle`, `border-subtle`, `bg-primary`, `text-primary`, `ring-ring`, `bg-subtle`, `secondary-hover`, `destructive`, mono-alpha). They exist only for un-migrated external consumers and die at v1.0.
9
9
  3. **No bold.** Semibold (600) is the maximum weight in any component or component-adjacent UI. 700/800 belong to the foundation heading scale only.
10
- 4. **No shadows** on inline components — elevation = hairline borders + surface steps. One sanctioned exception: **floating mobile chrome** (Bottom Navigation) carries the soft ambient `shadow-chrome-default` lift, per the Refined Mobile spec. Never add any other shadow.
10
+ 4. **No shadows** on inline components — elevation = hairline borders + surface steps. Exactly **two** sanctioned exceptions, both named tokens: **floating mobile chrome** (Bottom Navigation) carries the soft ambient `shadow-chrome-default` lift, and the **Slide to Confirm handle** carries `shadow-brand-glow` so a committed money action reads as liftable off its track. Both come from the Refined spec. Never add any other shadow, and never reuse these two tokens elsewhere.
11
11
  5. **Surfaces are solid.** Alpha is only for state layers on top of a solid base: hover/pressed glazes, glass, scrims, selection washes (light theme only).
12
12
  6. **Selection states use the selected family**: `bg-background-brand-selected` + `text-text-brand-selected` + `border-border-brand-selected`. Never `brand-default/10` washes, never `text-brand-default` as selected ink — those fail in dark.
13
13
  7. **Dark is not a mirror.** Never build a light-theme construction and assume it inverts. If a token pair doesn't exist for what you need, stop and ask — don't improvise per-theme values in a component.
@@ -49,7 +49,7 @@ Docs: `docs/components/<kebab-name>.md` for every entry.
49
49
  | Breadcrumb | Hierarchical location trail |
50
50
  | Button | All actions; variants primary / secondary / tertiary / on-brand family / frosted + frosted-on-brand; `shimmer` modifier for headline CTAs |
51
51
  | Calendar | Date and range picking with themed dropdown month/year navigation |
52
- | Card | Content shells (`default`, `frosted-on-brand`, `interactive` hover-lift); blank by design, slots supply content |
52
+ | Card | Content shells (`default`, `frosted` tint for page surfaces, `frosted-on-brand` for art/brand, `interactive` hover-lift); blank by design, slots supply content |
53
53
  | Carousel | Horizontally scrolling content (mobile catalogue) |
54
54
  | Chip | Compact choice pills: quick amounts, single-select filters, outline error-recovery |
55
55
  | Checkbox | Boolean form input |
@@ -69,7 +69,7 @@ Docs: `docs/components/<kebab-name>.md` for every entry.
69
69
  | Link | Inline/standalone links — quiet at rest, underline + darker ink on hover; `tone="on-brand"` |
70
70
  | Menubar | Horizontal app menu bar (menu family) |
71
71
  | Native Select | Styled native `<select>` for OS-native picking; same rail as Input |
72
- | Navigation Button | Circular icon-only nav control; `frosted-on-brand` variant for art surfaces |
72
+ | Navigation Button | Circular icon-only nav control — tinted at rest, one step darker on hover; `frosted-on-brand` variant for art surfaces. Dialog and Sheet close buttons compose it rather than hand-rolling a circle |
73
73
  | Navigation Menu | Marketing-style nav with dropdown panels (menu family type) |
74
74
  | Numpad | Mobile amount-entry tray: bare 3×4 grid, emits keys, long-press backspace clears |
75
75
  | Pagination | Page navigation; circular cells, brand-selected active page |
@@ -87,13 +87,15 @@ Docs: `docs/components/<kebab-name>.md` for every entry.
87
87
  | Skeleton | Loading placeholders (solid secondary surface, pulse) |
88
88
  | Slider | Value selection on a track; circular brand thumb |
89
89
  | Spinner | Loading indicator (currentColor, 8-blade fade) |
90
- | Stepper | Numeric +/− input built on Input Group |
90
+ | Slide to Confirm | Swipe-to-commit for irreversible money actions (withdraw, transfer) |
91
+ | Stepper | The mobile amount tray — frosted −/+ circles around a centred editable amount |
92
+ | Steps | Progress rail: numbered / onboarding / status timelines; circle or square, horizontal or vertical |
91
93
  | Switch | On/off toggle; brand track when checked, static white thumb |
92
94
  | Table | Data tables; 14px cells, medium heads, hover glaze rows |
93
95
  | Tabs | Segmented control (`default` pill-on-track) or underline (`line`) |
94
96
  | Textarea | Multi-line text (mirrors Input md) |
95
97
  | Toast | Transient notifications (sonner, inverse surface) |
96
- | Toggle / Toggle Group | Pressed-state buttons and grouped segmented toggles |
98
+ | Toggle / Toggle Group | Chip-treatment pressed buttons; the group joins them into segmented sets — one docs page (`toggle.md`) |
97
99
  | Tooltip | Hover hints; inverse surface default, bordered-white `inverse` variant; renders as a Drawer on mobile |
98
100
 
99
101
  **Blocks** (`components/blocks/`: NavBar, Hero, Auth, FAQ, Header Navigation, Open Positions, Result, Game Loading) are pre-composed sections — currently awaiting their token-migration pass; prefer components until then.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Champion Trade Design System
2
2
 
3
- The component library and token architecture for **Champion Trade** (formerly Trading Game) — a Tailwind CSS v4 + React design system with a strict semantic token layer, per-component typography tokens, light and dark themes, and 57 production components.
3
+ The component library and token architecture for **Champion Trade** (formerly Trading Game) — a Tailwind CSS v4 + React design system with a strict semantic token layer, per-component typography tokens, light and dark themes, and 59 production components.
4
4
 
5
5
  > **Package name:** published as `@trading-game/design-intelligence-layer`. The Champion Trade npm scope rename is parked for a future major — install and import under the current name below.
6
6
 
@@ -74,15 +74,15 @@ React 18+, ReactDOM, Tailwind CSS v4+.
74
74
 
75
75
  ## What's inside
76
76
 
77
- - **57 components** — forms, overlays, menus, navigation, data display, plus trading-specific pieces (Numpad, Bottom Navigation with its liquid selection bubble + AI circle, Profile Photo, Stepper)
77
+ - **59 components** — forms, overlays, menus, navigation, data display, plus trading-specific pieces (Numpad, the Stepper amount tray, Slide to Confirm, Steps timelines, Bottom Navigation with its liquid selection bubble + AI circle, Profile Photo)
78
78
  - **Three-layer token architecture** — primitives → semantics → component type tokens; components consume semantic colour tokens only, and `npm run check:tokens` fails the build on any drift (undocumented tokens, primitives in components, alpha-modified colour constructions)
79
79
  - **Three-layer motion system** — duration/easing primitives → semantic roles (hover, press, surface, overlay) → named signature moves (the liquid travel spring, the arrival pop); overlay animations ship with the package
80
- - **Light + dark themes** — dark is designed, not mirrored: its own surface mixes, selection fills, and ink steps
80
+ - **Light + dark themes** — dark is designed, not mirrored: its own surface mixes, selection fills, and ink steps; every selected/current-state marker (calendar today, breadcrumb page, links, radio, nav bubble) speaks the brand-selected ink family in dark
81
81
  - **Tinted canvas** — the signature screen background (`--background-tinted-canvas`): a blue aurora melting into the canvas, pure token math, applied once on the page root
82
82
  - **The frosted family** — `variant="frosted"` (brand-tinted glass on page surfaces) and `variant="frosted-on-brand"` (white frost on art) across Button, NavigationButton, and Card
83
- - **No shadows** — elevation is hairlines and surface steps, with one sanctioned exception: the Bottom Navigation's floating-chrome lift
83
+ - **No shadows** — elevation is hairlines and surface steps, with two sanctioned exceptions: the Bottom Navigation's floating-chrome lift and the Slide to Confirm handle's brand glow
84
84
  - **Pill shape system** — buttons and chips are pills, icon buttons are circles, cards 18px, menus 10px, form fields 4px; every control on the 32/40/48 rail
85
- - **AI-readable in `node_modules`** — AGENTS.md, all 57 component pages, foundations, and patterns ship inside the npm tarball
85
+ - **AI-readable in `node_modules`** — AGENTS.md, all 58 component pages (Toggle and Toggle Group share one), foundations, and patterns ship inside the npm tarball
86
86
  - **TypeScript, ESM + CJS**
87
87
 
88
88
  ## Documentation