@trading-game/design-intelligence-layer 0.15.3 → 0.16.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.
@@ -520,7 +520,7 @@ import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
520
520
  | Component | Tag | Sub-components |
521
521
  |-----------|-----|----------------|
522
522
  | Accordion | [composed] | AccordionItem, AccordionTrigger, AccordionContent |
523
- | Alert | [composed] | AlertTitle, AlertDescription |
523
+ | Alert | [simple] | — (flat-prop API: `variant`, `layout`, `title`, `description`, `icon`, `action`, `actions`, `onDismiss`, `dismissLabel`) |
524
524
  | AlertDialog | [complex] | AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, AlertDialogMedia |
525
525
  | AspectRatio | [simple] | — |
526
526
  | Avatar | [composed] | AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount |
@@ -604,6 +604,7 @@ These are styling behaviors you can't discover from TypeScript types alone:
604
604
  | Slider | Thumb: square `rounded-[4px]`, `bg-primary`. Track range: `bg-slider-range` |
605
605
  | Dialog/Sheet | Footer buttons should use `size="md"`. Overlay: `bg-overlay` |
606
606
  | Menubar | Hover: `bg-primary/[0.08]`. Open state: `bg-primary/10` |
607
+ | Alert | Dismissible in-page notification. Flat-prop API — pass `title` / `description` / `icon` / `action` / `actions` / `onDismiss` directly; no sub-components. **Variants:** `default` (white surface + `border-border-subtle`), `brand` (solid `bg-primary`, white text), `info` (`bg-semantic-info/10`), `warning` (`bg-semantic-warning/10`), `danger` (`bg-semantic-error/10`), `success` (`bg-semantic-win/10`). **Layouts:** `inline` (single row: icon · body · optional action · close X) and `card` (icon · body · close X top-right; up to 2 buttons at bottom-left). **Buttons:** `action` (inline, max 1) and `actions` (card, max 2). Strings get wrapped automatically; React elements pass through. Brand uses `Button variant="primary-inverse"`; every other variant uses `Button variant="secondary"` at `size="sm"`. **Title colour:** `text-on-prominent` for every variant except `brand` (uses `text-on-primary`). **Icon colour:** the variant accent (`text-semantic-info` etc.) so the icon carries the severity signal; pass `icon={null}` to omit, or any `ReactNode` to override the per-variant default (`Info`, `Sparkles`, `Info`, `AlertTriangle`, `XCircle`, `CheckCircle2`). **Single-line height:** `h-12` (48px) fixed, all elements centered when only `title` or only `description` is provided in inline layout. **Dismiss:** controlled — `onDismiss` callback; parent owns visibility. **A11y:** `role="alert"` + `aria-live="assertive"` for `danger`/`warning`; `role="status"` + `aria-live="polite"` for the rest. |
607
608
  | Badge | Variants: `default` (solid blue), `default-success`, `default-fail`, `default-warning` (all use `bg-semantic-*` + matching `text-on-semantic-*` foreground); `fill` (blue tint), `fill-success`, `fill-fail`, `fill-warning`; `fill-boost` (amber-orange tint — `bg-semantic-boost/16` bg + `text-on-semantic-boost` foreground — use for boost/bonus labels, always pair with a `Rocket` icon); `outline`; `ghost`, `ghost-success`, `ghost-fail`. Base class no longer applies `tracking-wide` — letter spacing is default. |
608
609
  | TicketCard | **Icon:** pass any `ReactNode` via `icon`. Icon container: `size-10` rounded-full, `border-2 border-primary`, `text-primary`. **Labels:** `label` (above value) and `stubLabel` (stub button) render in sentence case — do NOT apply `uppercase` or `tracking-widest`. Stub: `w-[100px]` `bg-primary` button, `text-on-primary`, shimmer sweep animation. Disabled stub: `opacity-50`, `cursor-not-allowed`. Perforation notches sit outside the card box — do NOT put `overflow-hidden` on the card wrapper. **`compact`** (default `false`): `true` = mobile layout — reduces left-content horizontal padding from `px-4 gap-4` to `px-2 gap-2`. **For boost use cases:** use `BoostTicketCard` instead — it renders a `<Badge variant="fill-boost">` inline below the value. |
609
610
  | BoostTicketCard | Same visual shell as `TicketCard` (perforation notches, tear-line, shimmer stub). The card height is **variable** (grows with content via `py-4`) rather than fixed at `h-20`. The boost is displayed as an inline `<Badge variant="fill-boost" size="sm">` with a leading `Rocket` icon and a trailing `Info` icon: *"Boost: {boostAmount} {boostCurrency}"*. Tokens used: `bg-subtle`, `bg-primary`, `bg-primary-hover`, `text-on-primary`, `bg-semantic-boost/16`, `text-on-semantic-boost`. Supports `compact` prop for mobile layout (same padding reduction as `TicketCard`). |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trading-game/design-intelligence-layer",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "description": "Trading Game Design System — shadcn/ui components with Tailwind CSS v4",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
package/src/styles.css CHANGED
@@ -57,6 +57,7 @@
57
57
  --color-semantic-win: var(--semantic-win);
58
58
  --color-semantic-loss: var(--semantic-loss);
59
59
  --color-semantic-warning: var(--semantic-warning);
60
+ --color-semantic-error: var(--semantic-error);
60
61
  --color-semantic-boost: var(--semantic-boost);
61
62
  --color-semantic-boost-surface: var(--semantic-boost-surface);
62
63
  --color-alert-info-text: var(--alert-info-text);
@@ -158,7 +159,7 @@
158
159
  /* #008832 */
159
160
 
160
161
  /* ── Sky ── */
161
- --primitive-sky-600: #3DAAFF;
162
+ --primitive-sky-600: oklch(0.6 0.18 245);
162
163
  /* #3DAAFF */
163
164
 
164
165
  /* ── Red ── */
@@ -185,6 +186,10 @@
185
186
  --primitive-amber-800: oklch(0.40 0.10 52);
186
187
  /* #713813 — dark amber/brown; ticket boost label text */
187
188
 
189
+ /* ── Yellow ── */
190
+ --primitive-yellow-500: oklch(0.65 0.16 82);
191
+ /* #E0AE00 — golden warning yellow; clearly distinct from orange/red */
192
+
188
193
  /* ── Violet ── */
189
194
  --primitive-violet-500: oklch(0.601 0.263 301.6);
190
195
  /* #A040FF */
@@ -297,7 +302,7 @@
297
302
  /* #FFFFFF — text/icon color for use on semantic-loss surfaces */
298
303
  --semantic-info: var(--primitive-sky-600);
299
304
  --semantic-error: var(--primitive-red-600);
300
- --semantic-warning: var(--primitive-orange-500);
305
+ --semantic-warning: var(--primitive-yellow-500);
301
306
  --on-semantic-warning: var(--primitive-mono-50);
302
307
  /* #FFFFFF — text/icon color for use on semantic-warning surfaces */
303
308
  --semantic-boost: var(--primitive-amber-600);