@trading-game/design-intelligence-layer 0.10.1 → 0.11.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.
@@ -151,6 +151,7 @@ import { Button, Card, Badge } from "@trading-game/design-intelligence-layer"
151
151
  | `--on-prominent` | `text-on-prominent` | Primary text (headings, body) |
152
152
  | `--on-prominent-static-inverse` | `text-on-prominent-static-inverse` | Always-white text (e.g. on primary blue buttons) |
153
153
  | `--on-subtle` | `text-on-subtle` | Secondary text (descriptions, labels) |
154
+ | `--on-disabled` | `text-on-disabled` | Disabled text (inactive controls, placeholders) |
154
155
 
155
156
  ### 2.5 — Borders & Inputs
156
157
 
@@ -281,6 +282,7 @@ import { Button, Card, Badge } from "@trading-game/design-intelligence-layer"
281
282
  | Write primary heading text | `text-on-prominent` | Pure white, raw hex colors |
282
283
  | Write body / description text | `text-on-subtle` | `text-on-prominent` for descriptions |
283
284
  | Write a subtle label | `text-on-subtle` | Raw gray values |
285
+ | Write disabled / inactive text | `text-on-disabled` | `text-gray-300`, raw light hex values |
284
286
  | Add a default border | `border-border-subtle` | Solid black borders, `border-border` |
285
287
  | Add a strong border | `border-border-prominent` | — |
286
288
  | Style an input (resting) | `border-input` | Solid colored backgrounds |
@@ -529,6 +531,7 @@ import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
529
531
  | Label | [simple] | — |
530
532
  | Link | [simple] | — |
531
533
  | Menubar | [complex] | MenubarMenu, MenubarTrigger, MenubarContent, MenubarItem, MenubarSeparator, MenubarLabel, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, MenubarShortcut |
534
+ | NavigationButton | [simple] | — |
532
535
  | NavigationMenu | [complex] | NavigationMenuList, NavigationMenuItem, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuLink, NavigationMenuIndicator, NavigationMenuViewport, navigationMenuTriggerStyle |
533
536
  | NativeSelect | [simple] | NativeSelectOption, NativeSelectOptGroup |
534
537
  | Pagination | [composed] | PaginationContent, PaginationItem, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis |
@@ -537,7 +540,7 @@ import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
537
540
  | RadioGroup | [composed] | RadioGroupItem |
538
541
  | Resizable | [complex] | ResizablePanelGroup, ResizablePanel, ResizableHandle |
539
542
  | ScrollArea | [simple] | ScrollBar |
540
- | Select | [composed] | SelectTrigger, SelectValue, SelectContent, SelectGroup, SelectLabel, SelectItem, SelectSeparator |
543
+ | Select | [composed] | SelectTrigger (`size`: sm/md/lg, default md), SelectValue, SelectContent, SelectGroup, SelectLabel, SelectItem, SelectSeparator |
541
544
  | Separator | [simple] | — |
542
545
  | Sheet | [complex] | SheetTrigger, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, SheetClose |
543
546
  | Sidebar | [complex] | SidebarProvider, SidebarTrigger, SidebarInset, SidebarHeader, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarRail, useSidebar |
@@ -550,7 +553,7 @@ import { Dialog, DialogTrigger, DialogContent, DialogHeader, DialogTitle, Dialog
550
553
  | Table | [composed] | TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption |
551
554
  | Tabs | [composed] | TabsList (`variant`: default/line, `size`: sm/md/lg), TabsTrigger (`iconPosition`: inline/top), TabsContent. Root accepts `orientation`: horizontal/vertical. |
552
555
  | Textarea | [simple] | — |
553
- | TicketCard | [composed] | — |
556
+ | TicketCard | [composed] | — (`icon`, `label`, `value`, `currency`, `stubLabel`, `onStubClick`, `stubDisabled`, `welcomeCredit`, `creditUsed`, `creditTotal`, `creditCurrency`, `creditLabel`, `creditFullWidth`, `freeCredit` *(deprecated)*) |
554
557
  | Toggle | [simple] | — |
555
558
  | ToggleGroup | [composed] | ToggleGroupItem |
556
559
  | Tooltip | [composed] | TooltipTrigger, TooltipContent, TooltipProvider |
@@ -566,11 +569,12 @@ These are styling behaviors you can't discover from TypeScript types alone:
566
569
  | Input | Resting: `border-input`. Focus: `border-ring` + `ring-[3px] ring-ring/50`. Radius: `rounded-sm` (6px) |
567
570
  | InputGroup | Wraps `Input` with inline addons (icons, buttons, text). **Sizes:** `sm` (h-8) / `md` (h-10, default) / `lg` (h-12) — pass `size` to `InputGroup`, it flows to `InputGroupInput` via context. **Padding:** when any `inline-start` or `inline-end` addon is present, input text gets equal `pl-2 pr-2` (8px) on both sides for visual symmetry. Without addons, Input's default `px-3`/`px-4` applies. |
568
571
  | InputOTP | **Variants:** OTP 4 digits (single group, 4 slots), OTP 6 digits (single group, 6 slots), OTP 6 split (two groups of 3 with `InputOTPSeparator`), OTP 8 digits (single group, 8 slots), OTP 6 separated (each slot in its own `InputOTPGroup` for individually spaced boxes). Slot: `h-9 w-9`, `border-border-subtle`, `rounded-sm` on first/last. Focus: `border-primary` + `ring-primary/[0.08]`. |
572
+ | NavigationButton | Icon-only tertiary button for navigation. `text-on-prominent` (black icons), `hover:bg-secondary-hover`. **Sizes (8-point grid):** `lg` 48px / 24px icon, `md` 40px / 20px icon, `sm` 32px / 20px icon, `xs` 24px / 16px icon. States: focus `ring-ring/50`, active `opacity-60`, disabled `opacity-24`. Supports `asChild`. |
569
573
  | Tooltip | Bubble: `bg-primary` + `text-on-prominent-static-inverse` (not `bg-popover`). Always wrap in `<TooltipProvider>` |
570
574
  | Sidebar | Menu buttons use `rounded-sm`. Selection: `bg-secondary-hover` + `text-primary` + `font-semibold` |
571
575
  | Breadcrumb | Active page: `text-primary font-medium`. Links: `text-on-subtle` |
572
576
  | Tabs | **Variants:** `default` (pill, `bg-tabs`) and `line` (underline, transparent bg). **Sizes:** `sm` (h-8, text-xs), `md` (h-10, text-sm, default), `lg` (h-12, text-base). **Icon position:** `inline` (default) or `top` (stacks icon above label). **Orientation:** `horizontal` (default) or `vertical` (line variant renders left-edge indicator). Hover: `bg-secondary-hover` (default) / `text-primary` (line). Selected: `bg-tabs-active` + `text-primary font-semibold`. Line variant underline: `bg-primary`. |
573
- | Select | Item hover: `bg-primary/[0.08]`. Selected: `text-primary font-medium` + checkmark. `SelectTrigger` accepts `readOnly` prop: blocks interaction, retains full default appearance, chevron renders at `opacity-30` |
577
+ | Select | **Sizes:** `SelectTrigger` accepts `size` prop: `"sm"` (h-8, text-xs) / `"md"` (h-10, text-sm, **default**) / `"lg"` (h-12, text-base) — matches `Input` and `InputGroup` height scale. Item hover: `bg-primary/[0.08]`. Selected: `text-primary font-medium` + checkmark. `SelectTrigger` also accepts `readOnly` prop: blocks interaction, retains full default appearance, chevron renders at `opacity-30`. |
574
578
  | Progress | Track: `bg-primary/20`. Indicator: `bg-primary`. Radius: `rounded-2xs` |
575
579
  | Spinner | Inherits parent text color. **Always pass `text-primary` for standalone use** |
576
580
  | Stepper | Numeric input flanked by `−` / `+` `secondary` `icon-xs` buttons. Composes `InputGroup` internally. Props: `value`, `defaultValue`, `onValueChange`, `min`, `max`, `step` (default 1), `size` (`"sm" \| "md" \| "lg"`, default `"md"`), `disabled`, `placeholder`. **Sizes:** `sm` — h-8 (32px), `icon-xs` buttons, `size-3` icons; `md` — h-10 (40px), `icon-xs` buttons, `size-3.5` icons; `lg` — h-12 (48px), `icon-sm` buttons, `size-4` icons. Matches `Input` and `InputGroup` height scale exactly. Supports controlled & uncontrolled modes, keyboard Arrow Up/Down, and floating-point steps. Default width: `w-32`. An `InputGroupText` unit label (e.g. `USDT`) can be placed in the `inline-end` addon alongside the `+` button — use `font-normal text-on-subtle` for regular weight and subtle colour. Exports `StepperSize` type. |
@@ -578,6 +582,7 @@ These are styling behaviors you can't discover from TypeScript types alone:
578
582
  | Slider | Thumb: square `rounded-[4px]`, `bg-primary`. Track range: `bg-slider-range` |
579
583
  | Dialog/Sheet | Footer buttons should use `size="md"`. Overlay: `bg-overlay` |
580
584
  | Menubar | Hover: `bg-primary/[0.08]`. Open state: `bg-primary/10` |
585
+ | 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-prominent-static-inverse`, 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. **Welcome credit bar:** enabled via `welcomeCredit` prop. Colors are hardcoded per Figma spec — icon + label text `#713813` (dark amber), progress bar fill `#ef9f00` (golden amber). Padding: `p-2` (8px). **`creditFullWidth`** (default `false`): `false` = desktop, bar is `calc(100% - 112px)` wide (stops flush with stub left edge); `true` = mobile, bar is `w-full`. Customise bar copy via `creditUsed`, `creditTotal`, `creditCurrency`, `creditLabel`. `freeCredit` is a deprecated alias for `welcomeCredit`. |
581
586
  | Toggle | Pressed: `bg-primary/10` + `border-primary` + `text-primary` |
582
587
  | Calendar | Selected: `bg-secondary-hover` + `text-primary font-bold`. Today: primary dot below date |
583
588
 
@@ -641,6 +646,7 @@ Landing page hero sections in multiple layout types.
641
646
  | Installing `lucide-react` separately | Already bundled — import icons directly |
642
647
  | Adding `tailwind.config.js` | Tailwind v4 uses CSS config via the package |
643
648
  | Using `bg-gray-*`, `text-zinc-*`, etc. | Use semantic tokens only |
649
+ | Using `text-gray-400` for disabled text | Use `text-on-disabled` |
644
650
 
645
651
  ---
646
652
 
@@ -12,7 +12,7 @@ alwaysApply: true
12
12
 
13
13
  ### Available components (check this list first)
14
14
 
15
- Accordion, Alert, AlertDialog, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Chart, Checkbox, Collapsible, Combobox, Command, ContextMenu, Dialog, Drawer, DropdownMenu, EmptyState, Field, Form, HoverCard, Input, InputGroup, InputOTP, Item, Kbd, Label, Menubar, NativeSelect, NavigationMenu, Pagination, Popover, Progress, RadioGroup, Resizable, ScrollArea, Select, Separator, Sheet, Sidebar, Skeleton, Slider, Spinner, Switch, Table, Tabs, Textarea, Toast/Toaster, Toggle, ToggleGroup, Tooltip
15
+ Accordion, Alert, AlertDialog, Avatar, AvatarGroup, Badge, Breadcrumb, Button, Calendar, Card, Carousel, Chart, Checkbox, Collapsible, Combobox, Command, ContextMenu, Dialog, Drawer, DropdownMenu, EmptyState, Field, Form, HoverCard, Input, InputGroup, InputOTP, Item, Kbd, Label, Menubar, NativeSelect, NavigationButton, NavigationMenu, Pagination, Popover, Progress, RadioGroup, Resizable, ScrollArea, Select, Separator, Sheet, Sidebar, Skeleton, Slider, Spinner, Switch, Table, Tabs, Textarea, Toast/Toaster, Toggle, ToggleGroup, Tooltip
16
16
 
17
17
  ### Decision flow
18
18
 
@@ -70,6 +70,7 @@ import { Button, Card, Badge } from "@trading-game/design-intelligence-layer"
70
70
  ✅ text-on-prominent — primary text (black #000000)
71
71
  ✅ text-on-prominent-static-inverse — always white — for text on dark/primary bg
72
72
  ✅ text-on-subtle — secondary text (mid grey)
73
+ ✅ text-on-disabled — disabled / inactive text (light grey ~#BBBBBB)
73
74
 
74
75
  ✅ text-primary — brand blue #2323FF
75
76
  ✅ text-semantic-win — green — profit/positive
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trading-game/design-intelligence-layer",
3
- "version": "0.10.1",
3
+ "version": "0.11.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",
package/src/styles.css CHANGED
@@ -37,6 +37,7 @@
37
37
  --color-border-prominent: var(--border-prominent);
38
38
  --color-secondary-hover: var(--secondary-hover);
39
39
  --color-on-subtle: var(--on-subtle);
40
+ --color-on-disabled: var(--on-disabled);
40
41
  --color-subtle: var(--subtle);
41
42
  --color-primary: var(--primary);
42
43
  --color-primary-hover: var(--primary-hover);
@@ -163,6 +164,12 @@
163
164
  --primitive-orange-400: oklch(0.751 0.179 58.3);
164
165
  /* #FF8C00 */
165
166
 
167
+ /* ── Amber ── */
168
+ --primitive-amber-500: oklch(0.74 0.18 72);
169
+ /* #ef9f00 — golden amber; ticket credit progress fill */
170
+ --primitive-amber-800: oklch(0.40 0.10 52);
171
+ /* #713813 — dark amber/brown; ticket credit label text */
172
+
166
173
  /* ── Violet ── */
167
174
  --primitive-violet-500: oklch(0.601 0.263 301.6);
168
175
  /* #A040FF */
@@ -242,6 +249,7 @@
242
249
  --primary-hover: oklch(0.403 0.251 267.5);
243
250
  --subtle: oklch(0.96 0 0);
244
251
  --on-subtle: oklch(0.52 0 0);
252
+ --on-disabled: var(--primitive-mono-400);
245
253
 
246
254
  --border-subtle: oklch(0.92 0 0);
247
255
  --border: var(--border-subtle);
@@ -259,6 +267,7 @@
259
267
  --semantic-warning: var(--primitive-orange-500);
260
268
  --tabs: var(--primitive-mono-alpha-4);
261
269
  --tabs-active: var(--primitive-mono-50);
270
+
262
271
  --semantic-layout-diagram-max-default: var(--primitive-layout-diagram-max-default);
263
272
  --semantic-layout-diagram-max-small: var(--primitive-layout-diagram-max-small);
264
273
  --semantic-layout-diagram-max-medium: var(--primitive-layout-diagram-max-medium);
@@ -355,6 +364,12 @@
355
364
  }
356
365
  }
357
366
 
367
+ /* Ticket card stub — shimmer sweep across deposit/action button */
368
+ @keyframes stub-shimmer {
369
+ 0% { transform: translateX(-100%); }
370
+ 100% { transform: translateX(100%); }
371
+ }
372
+
358
373
  /* Spinner — pill-style activity indicator */
359
374
  @keyframes spinner-fade {
360
375
  0% {