@trading-game/design-intelligence-layer 0.16.9 → 0.17.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/README.md +26 -2
- package/dist/index.cjs +31 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -18
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +3 -3
- package/package.json +1 -1
|
@@ -594,15 +594,15 @@ These are styling behaviors you can't discover from TypeScript types alone:
|
|
|
594
594
|
| 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. |
|
|
595
595
|
| 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]`. |
|
|
596
596
|
| 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`. |
|
|
597
|
-
| Tooltip | Bubble: `bg-
|
|
598
|
-
| Sidebar |
|
|
597
|
+
| Tooltip | Bubble (default variant): `bg-prominent-inverse` + `text-on-prominent-inverse` (black surface, white text). `inverse` variant: `bg-prominent` + `text-on-prominent` (white surface for use over saturated coloured surfaces). Default primitive includes `max-w-xs` + `whitespace-normal` so consumers don't need to pass them. When a `Kbd` is detected inside via `:has([data-slot=kbd])`, padding bumps to `px-3.5 py-2` and siblings get `space-y-1.5` for breathing room. Always wrap in `<TooltipProvider>`. |
|
|
598
|
+
| Sidebar | `SidebarHeader` / `SidebarFooter` / `SidebarGroup` use `px-layout-margin-inline py-2` (16 px horizontal via `--semantic-layout-margin-inline`), with `group-data-[collapsible=icon]:px-2` so the icon-collapsed rail tightens to 8 px. Menu buttons: `rounded-sm`. Selection: `bg-primary/10` + `text-primary` + `font-semibold`. `lg`-size buttons get `group-data-[collapsible=icon]:p-0! group-data-[collapsible=icon]:justify-center` so a 32-px brand block fills the collapsed rail and a 16-px lucide icon still centers in the same row. |
|
|
599
599
|
| Breadcrumb | Active page: `text-primary font-medium`. Links: `text-on-subtle` |
|
|
600
600
|
| 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`. |
|
|
601
601
|
| 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`. |
|
|
602
602
|
| Progress | Track: `bg-primary/20`. Indicator: `bg-primary`. Radius: `rounded-2xs` |
|
|
603
603
|
| Spinner | Inherits parent text color. **Always pass `text-primary` for standalone use** |
|
|
604
604
|
| 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. |
|
|
605
|
-
| Switch | Checked track: `bg-
|
|
605
|
+
| Switch | Pill track (`rounded-full`) with a circle knob (`rounded-full`). Checked track: `bg-primary`. Unchecked track: `bg-input`. Thumb is always `bg-prominent` (white) in both states. Sizes: `default` (h-6 w-11, 18 px knob) / `sm` (h-5 w-9, 14 px knob). |
|
|
606
606
|
| Slider | Thumb: square `rounded-[4px]`, `bg-primary`. Track range: `bg-slider-range` |
|
|
607
607
|
| Dialog/Sheet | Footer buttons should use `size="md"`. Overlay: `bg-overlay` |
|
|
608
608
|
| Menubar | Hover: `bg-primary/[0.08]`. Open state: `bg-primary/10` |
|
package/package.json
CHANGED