@trading-game/design-intelligence-layer 0.17.2 → 0.17.4
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 +18 -2
- package/dist/index.cjs +84 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +84 -35
- package/dist/index.js.map +1 -1
- package/guides/design-system-guide/trading-game-ds-guide.md +22 -5
- package/package.json +2 -2
- package/src/styles.css +6 -0
package/README.md
CHANGED
|
@@ -123,8 +123,8 @@ npm install react react-dom tailwindcss
|
|
|
123
123
|
| Field | `Field, FieldLabel, FieldDescription, FieldError, FieldGroup` |
|
|
124
124
|
| Form | `Form, FormItem, FormLabel, FormControl, FormField, FormMessage` |
|
|
125
125
|
| Hover Card | `HoverCard, HoverCardTrigger, HoverCardContent` |
|
|
126
|
-
| Input | `Input` |
|
|
127
|
-
| Input Group | `InputGroup, InputGroupAddon, InputGroupButton, InputGroupText` |
|
|
126
|
+
| Input | `Input` — variants: `default` (light surfaces), `inverse` (dark sunken fill + white text, for use on `bg-primary` / brand-coloured surfaces). |
|
|
127
|
+
| Input Group | `InputGroup, InputGroupAddon, InputGroupButton, InputGroupText` — variants: `default`, `inverse` (propagates to nested `InputGroupInput` / `InputGroupAddon` / `InputGroupText` via context). |
|
|
128
128
|
| Input OTP | `InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator` — Variants: OTP 4 digits, OTP 6 digits, OTP 6 split, OTP 8 digits, OTP 6 separated |
|
|
129
129
|
| Item | `Item, ItemMedia, ItemContent, ItemTitle, ItemDescription` |
|
|
130
130
|
| Kbd | `Kbd, KbdGroup` |
|
|
@@ -193,6 +193,7 @@ See [`AGENTS.md`](./AGENTS.md#blocks) for full usage examples per block.
|
|
|
193
193
|
<Button variant="secondary" /> // Black outline — secondary actions (light surfaces)
|
|
194
194
|
<Button variant="secondary-inverse" /> // White outline + white text — secondary actions on dark/coloured surfaces
|
|
195
195
|
<Button variant="tertiary" /> // Text only — minimal (light surfaces)
|
|
196
|
+
<Button variant="tertiary-inverse" /> // Text only + white text — minimal on dark/coloured surfaces
|
|
196
197
|
|
|
197
198
|
// Sizes
|
|
198
199
|
<Button size="lg" /> // 48px height (default)
|
|
@@ -714,6 +715,17 @@ Design tokens are managed in Figma and exported as CSS variables. To update:
|
|
|
714
715
|
## Changelog
|
|
715
716
|
|
|
716
717
|
### Unreleased
|
|
718
|
+
- **Button — new `tertiary-inverse` variant:** mirror of `tertiary` (transparent + text-only) but recoloured for use on dark / brand-coloured surfaces — `bg-transparent text-on-primary hover:bg-on-primary/[0.10]`. Pair with any size including `icon-*` (icon-only square). Same `variant` × `size` orthogonality as every other Button variant.
|
|
719
|
+
- **Input — new `variant="inverse"`:** sunken dark fill + white text recipe for use on `bg-primary` (and other coloured surfaces) where the default frosted-white fill blends into the chrome. 25 %-white border, `bg-input-inverse-surface` fill (35 % black), white text, 45 %-white placeholder, white selection. On focus the border solidifies to 100 % white with a 40 %-white ring. `variant="default"` (the existing look) is unchanged — no existing call site moves visually.
|
|
720
|
+
- **InputGroup — new `variant="inverse"`:** mirrors the Input variant. A new `InputGroupVariantContext` propagates the variant down so `InputGroupInput`, `InputGroupAddon`, and `InputGroupText` all pick up the inverse styling automatically (addon icons / suffix text swap to `text-on-primary/70`). Override per-instance via `className` (e.g. `border-transparent` for the borderless wallet-address treatment).
|
|
721
|
+
- **New token — `--input-inverse-surface`:** added in both `src/styles.css` and `app/globals.css` (component-token layer, references the existing primitive palette). Mapped via `@theme inline` to `--color-input-inverse-surface` so it's exposed as `bg-input-inverse-surface` to consumers. Tune the dark-fill shade once, propagates everywhere.
|
|
722
|
+
- **Form-control consistency pass — radius unified to `rounded-xs` (4 px):** `Input`, `InputGroup`, and `Select` (trigger) moved from `rounded-sm` (6 px) → `rounded-xs` (4 px), matching `Button` across every size. Form controls placed in a row (`<Input>` + `<Select>` + `<Button>`) now share identical heights *and* identical corner radii.
|
|
723
|
+
- **Form-control consistency pass — resting shadows removed:** `Input` and `InputGroup` dropped their `shadow-xs` resting drop-shadow so they sit flat alongside the shadowless `Select` and `Button`. Overlay shadows (Dialog, Popover, Tooltip, etc.) are untouched — only the skeuomorphic raised-surface shadow on form inputs is gone.
|
|
724
|
+
- **InputGroup — addon-side padding no longer mirrors:** previously, an inline-end addon would also reduce the input's *left* padding to `pl-2` "for visual symmetry," squeezing text to the field's left edge. Now only the side an addon is attached to reduces its inset; the opposite side keeps the natural Input `pl-3` / `pr-3` (12 px). Fixes the suffix-text input ("0.00 ... USD") looking flush-left compared to the prefix-icon row.
|
|
725
|
+
- **Component playground — Button section split into two columns:** the showcase Button page now renders default-surface variants on the left and `bg-primary`-surface inverse variants on the right, side-by-side, with row-by-row alignment so each (regular ↔ inverse) pair sits on the same y-line. Stacks vertically below `lg:` (1024 px) with the inverse half dropping below the default half. Inverse rows previously sat in individual `bg-primary` wrappers — now a single shared blue panel.
|
|
726
|
+
- **Component playground — Input / InputGroup inverse showcases:** both sections gain a `variant="inverse"` row demonstrating the new variant on `bg-primary`. Plus a standalone `/input-on-blue` route with longer-form exploration (default vs inverse; borderless wallet-address mock; real-world sign-in row).
|
|
727
|
+
- **Component playground — `/tertiary-inverse` route:** standalone page demonstrating the new Button `tertiary-inverse` variant at every `icon-*` size and labeled size on a brand-blue surface.
|
|
728
|
+
- **OpenPositionsBlock — double-divider fix:** the block was rendering both its own manual `<div className="h-px ...">` between rows AND the new ItemGroup `::after` auto-divider, producing two hairlines per gap. The manual divs are removed; the ItemGroup auto-divider now handles spacing. _Migration note for consumers:_ if you wrap your own `<Item>` rows in an `<ItemGroup>` and were manually injecting dividers between them, drop the manual dividers — or pass `divider={false}` on the `<ItemGroup>` to opt out and keep your own. The same cleanup landed in the demo app's Sheet "List" showcase.
|
|
717
729
|
- **Button — two new shimmer variants for headline CTAs:** `primary-shimmer` and `primary-inverse-shimmer`. Same surface tokens as their non-shimmer cousins, plus `relative overflow-hidden` to anchor an absolutely-positioned shimmer overlay. The overlay sweeps a diagonal (`110deg`) gradient driven by a new `button-shimmer` keyframe — two quick back-to-back sweeps every cycle, then a ~3 s pause off-screen, so it reads as an occasional glint rather than a continuous loader. Peak opacity is tuned per-surface (white at 32 % over brand blue; brand-blue at 22 % over white) and falls off into transparent edges. Suppressed automatically when the button is `loading` or `disabled`.
|
|
718
730
|
- **Button — `button-shimmer` keyframe:** new `@keyframes button-shimmer` in both `src/styles.css` and `app/globals.css`. Pattern: `0%, 10% → 30%, 100%` translateX, with an opacity fade at the seam between the two sweeps so the reset between flashes is invisible.
|
|
719
731
|
- **Badge — `fill-credit` is now a frosted glass chip:** `bg-semantic-boost-surface` was repurposed from the old peach (`#FDCA8A`) to `oklch(1 0 0 / 0.22)` — a translucent white surface that composes over whatever sits behind it. Paired with `backdrop-blur-md` and `text-on-primary` (white). Custom `!font-bold` / `!text-xs` overrides removed — the variant now only sets surface tokens, so font weight / size match every other badge (`font-semibold`, `text-xs` from the base). Border override removed too. The variant is intentionally invisible on white surfaces — designed to live on coloured surfaces (e.g. a brand-blue hero card / wallet card), matching the wallet mock's `.c-hero-wc`.
|
|
@@ -726,6 +738,10 @@ Design tokens are managed in Figma and exported as CSS variables. To update:
|
|
|
726
738
|
- **Banner — close X corner anchor:** the close `X` stays grid-centred on single-line banners but pins to `absolute top-3 right-3` whenever `description` is set or `layout="card"` — so it reads as a true corner dismiss instead of floating mid-body.
|
|
727
739
|
- **Button — instant bg-color hover:** the button base now uses `transition-[color,border-color,opacity,box-shadow,transform]` instead of `transition-all`. `background-color` flips instantly on hover so the brief partially-transparent fade phase (which let surrounding surface tints bleed through a hovered secondary button) is gone.
|
|
728
740
|
|
|
741
|
+
### v0.17.4
|
|
742
|
+
- **Button — `tertiary` variant text color changed to black:** `text-primary` (brand blue) → `text-on-prominent` (black). Hover changed from `bg-primary/[0.08]` to `bg-secondary-hover`. Use `tertiary-inverse` for white text on dark/coloured surfaces (unchanged). **Migration:** if you were relying on the blue text of `tertiary` for visual hierarchy, switch to `variant="tertiary-inverse"` on coloured surfaces, or keep a local className override.
|
|
743
|
+
- **Input — `readOnly` state:** passing the native HTML `readOnly` prop now renders the input with `border-transparent`, `bg-subtle/60`, and `pointer-events-none` — a distinct non-interactive display state. Clearly distinguishable from `disabled` (which uses `opacity-50` + greyed text) and from the default editable state (solid border). No API change — use the standard `readOnly` HTML attribute.
|
|
744
|
+
|
|
729
745
|
### v0.16.7
|
|
730
746
|
- **Credit badge readability pass:** `<Badge variant="fill-credit">` and the credit pill inside `CreditTicketCard` now sit on a deeper peach surface and use a bold deep-amber text for crisper read on the grey `bg-subtle` ticket card and on white / brand-blue surfaces alike. Token chain: `--primitive-amber-100` (#FEEBD9) → `--primitive-amber-300` (#FDCA8A) and `--primitive-amber-800` (#713813) → `--primitive-amber-900` (#521900). `--semantic-boost-surface` and `--on-semantic-boost` are repointed automatically. Variant class also bumps to `!font-bold`.
|
|
731
747
|
- **CreditTicketCard — responsive compact layout:** Compact variant now keeps the credit badge inline next to the value when there's room and only wraps to a second line when balance + badge would overflow into the deposit stub (`flex-wrap` on the value/badge row, with `whitespace-nowrap` on the value so the number itself never splits). Non-compact keeps the existing inline behavior.
|
package/dist/index.cjs
CHANGED
|
@@ -541,7 +541,9 @@ var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
|
541
541
|
secondary: "bg-transparent border-[1.5px] border-border-prominent text-on-prominent hover:bg-secondary-hover",
|
|
542
542
|
// Secondary Inverse — white border + white text; for use on dark/coloured surfaces
|
|
543
543
|
"secondary-inverse": "bg-transparent border-[1.5px] border-primary-inverse text-on-prominent-inverse hover:bg-primary-inverse/10",
|
|
544
|
-
tertiary: "bg-transparent text-
|
|
544
|
+
tertiary: "bg-transparent text-on-prominent hover:bg-secondary-hover",
|
|
545
|
+
// Tertiary Inverse — transparent + white text/icon; for use on dark/coloured surfaces
|
|
546
|
+
"tertiary-inverse": "bg-transparent text-on-primary hover:bg-on-primary/[0.10]"
|
|
545
547
|
},
|
|
546
548
|
size: {
|
|
547
549
|
lg: "h-12 w-fit gap-3 rounded-xs px-6 py-[14px] text-base [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -1205,7 +1207,7 @@ var import_lucide_react3 = require("lucide-react");
|
|
|
1205
1207
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1206
1208
|
var SURFACE_CLASSES = "w-full rounded-sm border border-primary/[0.16] bg-primary/[0.08] px-4 py-3.5";
|
|
1207
1209
|
function IconBadge({ glyph }) {
|
|
1208
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-
|
|
1210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-10 shrink-0 items-center justify-center rounded-full bg-primary text-on-primary", children: glyph });
|
|
1209
1211
|
}
|
|
1210
1212
|
function Banner(_a) {
|
|
1211
1213
|
var _b = _a, {
|
|
@@ -2301,16 +2303,32 @@ var import_class_variance_authority5 = require("class-variance-authority");
|
|
|
2301
2303
|
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
2302
2304
|
var inputVariants = (0, import_class_variance_authority5.cva)(
|
|
2303
2305
|
[
|
|
2304
|
-
"w-full min-w-0 rounded-
|
|
2305
|
-
"
|
|
2306
|
-
"selection:bg-primary selection:text-on-primary",
|
|
2307
|
-
"file:inline-flex file:border-0 file:bg-transparent file:font-medium file:text-on-prominent",
|
|
2308
|
-
"placeholder:text-on-subtle",
|
|
2306
|
+
"w-full min-w-0 rounded-xs border font-body transition-[color,box-shadow] outline-none",
|
|
2307
|
+
"file:inline-flex file:border-0 file:bg-transparent file:font-medium",
|
|
2309
2308
|
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
2310
|
-
"
|
|
2309
|
+
"read-only:pointer-events-none read-only:border-transparent read-only:bg-subtle/60",
|
|
2310
|
+
"focus-visible:ring-[3px]"
|
|
2311
2311
|
].join(" "),
|
|
2312
2312
|
{
|
|
2313
2313
|
variants: {
|
|
2314
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
2315
|
+
// dark-fill treatment for coloured surfaces (e.g. bg-primary).
|
|
2316
|
+
variant: {
|
|
2317
|
+
default: [
|
|
2318
|
+
"border-border-subtle bg-white/5 text-on-prominent",
|
|
2319
|
+
"file:text-on-prominent",
|
|
2320
|
+
"placeholder:text-on-subtle",
|
|
2321
|
+
"selection:bg-primary selection:text-on-primary",
|
|
2322
|
+
"focus-visible:border-primary focus-visible:ring-primary/[0.08]"
|
|
2323
|
+
].join(" "),
|
|
2324
|
+
inverse: [
|
|
2325
|
+
"border-on-primary/25 bg-input-inverse-surface text-on-primary",
|
|
2326
|
+
"file:text-on-primary",
|
|
2327
|
+
"placeholder:text-on-primary/45",
|
|
2328
|
+
"selection:bg-on-primary selection:text-primary",
|
|
2329
|
+
"focus-visible:border-on-primary focus-visible:ring-on-primary/40"
|
|
2330
|
+
].join(" ")
|
|
2331
|
+
},
|
|
2314
2332
|
size: {
|
|
2315
2333
|
sm: "h-8 px-3 py-1 text-xs file:h-6 file:text-xs",
|
|
2316
2334
|
md: "h-10 px-3 py-1 text-sm file:h-7 file:text-sm",
|
|
@@ -2318,6 +2336,7 @@ var inputVariants = (0, import_class_variance_authority5.cva)(
|
|
|
2318
2336
|
}
|
|
2319
2337
|
},
|
|
2320
2338
|
defaultVariants: {
|
|
2339
|
+
variant: "default",
|
|
2321
2340
|
size: "md"
|
|
2322
2341
|
}
|
|
2323
2342
|
}
|
|
@@ -2326,10 +2345,12 @@ function Input(_a) {
|
|
|
2326
2345
|
var _b = _a, {
|
|
2327
2346
|
className,
|
|
2328
2347
|
type,
|
|
2348
|
+
variant = "default",
|
|
2329
2349
|
size = "md"
|
|
2330
2350
|
} = _b, props = __objRest(_b, [
|
|
2331
2351
|
"className",
|
|
2332
2352
|
"type",
|
|
2353
|
+
"variant",
|
|
2333
2354
|
"size"
|
|
2334
2355
|
]);
|
|
2335
2356
|
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
@@ -2337,8 +2358,9 @@ function Input(_a) {
|
|
|
2337
2358
|
__spreadValues({
|
|
2338
2359
|
type,
|
|
2339
2360
|
"data-slot": "input",
|
|
2361
|
+
"data-variant": variant,
|
|
2340
2362
|
"data-size": size,
|
|
2341
|
-
className: cn(inputVariants({ size }), className)
|
|
2363
|
+
className: cn(inputVariants({ variant, size }), className)
|
|
2342
2364
|
}, props)
|
|
2343
2365
|
);
|
|
2344
2366
|
}
|
|
@@ -2362,24 +2384,36 @@ function Textarea(_a) {
|
|
|
2362
2384
|
// components/ui/input-group.tsx
|
|
2363
2385
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2364
2386
|
var InputGroupSizeContext = React6.createContext("md");
|
|
2387
|
+
var InputGroupVariantContext = React6.createContext("default");
|
|
2365
2388
|
var inputGroupVariants = (0, import_class_variance_authority6.cva)(
|
|
2366
2389
|
[
|
|
2367
|
-
"group/input-group relative flex w-full items-center rounded-
|
|
2368
|
-
"
|
|
2369
|
-
// Reduce input padding on the
|
|
2390
|
+
"group/input-group relative flex w-full items-center rounded-xs border",
|
|
2391
|
+
"transition-[color,box-shadow] outline-none min-w-0 has-[>textarea]:h-auto",
|
|
2392
|
+
// Reduce input padding only on the side an addon is attached to; the
|
|
2393
|
+
// opposite side keeps the natural Input padding (pl-3 / pr-3 = 12 px).
|
|
2370
2394
|
"has-[>[data-align=inline-start]]:[&>input]:pl-2",
|
|
2371
|
-
"has-[>[data-align=inline-start]]:[&>input]:pr-2",
|
|
2372
2395
|
"has-[>[data-align=inline-end]]:[&>input]:pr-2",
|
|
2373
|
-
"has-[>[data-align=inline-end]]:[&>input]:pl-2",
|
|
2374
2396
|
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
2375
2397
|
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3",
|
|
2376
|
-
// Focus
|
|
2377
|
-
"has-[[data-slot=input-group-control]:focus-visible]:
|
|
2398
|
+
// Focus ring (size; colour comes from the variant).
|
|
2399
|
+
"has-[[data-slot=input-group-control]:focus-visible]:ring-[3px]",
|
|
2378
2400
|
// Error state.
|
|
2379
2401
|
"has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20"
|
|
2380
2402
|
].join(" "),
|
|
2381
2403
|
{
|
|
2382
2404
|
variants: {
|
|
2405
|
+
// `default` is the light-surface treatment; `inverse` is the sunken
|
|
2406
|
+
// dark-fill treatment for coloured surfaces (mirrors `Input`).
|
|
2407
|
+
variant: {
|
|
2408
|
+
default: [
|
|
2409
|
+
"border-border-subtle bg-white/5",
|
|
2410
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-primary has-[[data-slot=input-group-control]:focus-visible]:ring-primary/[0.08]"
|
|
2411
|
+
].join(" "),
|
|
2412
|
+
inverse: [
|
|
2413
|
+
"border-on-primary/25 bg-input-inverse-surface",
|
|
2414
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-on-primary has-[[data-slot=input-group-control]:focus-visible]:ring-on-primary/40"
|
|
2415
|
+
].join(" ")
|
|
2416
|
+
},
|
|
2383
2417
|
size: {
|
|
2384
2418
|
sm: "h-8",
|
|
2385
2419
|
md: "h-10",
|
|
@@ -2387,6 +2421,7 @@ var inputGroupVariants = (0, import_class_variance_authority6.cva)(
|
|
|
2387
2421
|
}
|
|
2388
2422
|
},
|
|
2389
2423
|
defaultVariants: {
|
|
2424
|
+
variant: "default",
|
|
2390
2425
|
size: "md"
|
|
2391
2426
|
}
|
|
2392
2427
|
}
|
|
@@ -2394,24 +2429,35 @@ var inputGroupVariants = (0, import_class_variance_authority6.cva)(
|
|
|
2394
2429
|
function InputGroup(_a) {
|
|
2395
2430
|
var _b = _a, {
|
|
2396
2431
|
className,
|
|
2432
|
+
variant = "default",
|
|
2397
2433
|
size = "md"
|
|
2398
2434
|
} = _b, props = __objRest(_b, [
|
|
2399
2435
|
"className",
|
|
2436
|
+
"variant",
|
|
2400
2437
|
"size"
|
|
2401
2438
|
]);
|
|
2402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2440
|
+
InputGroupVariantContext.Provider,
|
|
2441
|
+
{
|
|
2442
|
+
value: variant,
|
|
2443
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(InputGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2444
|
+
"div",
|
|
2445
|
+
__spreadValues({
|
|
2446
|
+
"data-slot": "input-group",
|
|
2447
|
+
"data-variant": variant,
|
|
2448
|
+
"data-size": size,
|
|
2449
|
+
role: "group",
|
|
2450
|
+
className: cn(inputGroupVariants({ variant, size }), className)
|
|
2451
|
+
}, props)
|
|
2452
|
+
) })
|
|
2453
|
+
}
|
|
2454
|
+
);
|
|
2411
2455
|
}
|
|
2412
2456
|
var inputGroupAddonVariants = (0, import_class_variance_authority6.cva)(
|
|
2413
2457
|
[
|
|
2414
2458
|
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 font-medium text-on-subtle select-none",
|
|
2459
|
+
// Swap addon text/icon colour when inside an inverse group.
|
|
2460
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2415
2461
|
"group-data-[disabled=true]/input-group:opacity-50",
|
|
2416
2462
|
"[&>kbd]:rounded-[calc(var(--radius)-5px)]",
|
|
2417
2463
|
// Size-responsive text and icon sizing.
|
|
@@ -2506,6 +2552,8 @@ function InputGroupText(_a) {
|
|
|
2506
2552
|
__spreadValues({
|
|
2507
2553
|
className: cn(
|
|
2508
2554
|
"flex items-center gap-2 text-on-subtle",
|
|
2555
|
+
// Swap text/icon colour when inside an inverse group.
|
|
2556
|
+
"group-data-[variant=inverse]/input-group:text-on-primary/70",
|
|
2509
2557
|
"group-data-[size=sm]/input-group:text-xs group-data-[size=sm]/input-group:[&_svg:not([class*='size-'])]:size-3.5",
|
|
2510
2558
|
"group-data-[size=md]/input-group:text-sm group-data-[size=md]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
2511
2559
|
"group-data-[size=lg]/input-group:text-sm group-data-[size=lg]/input-group:[&_svg:not([class*='size-'])]:size-4",
|
|
@@ -2518,18 +2566,23 @@ function InputGroupText(_a) {
|
|
|
2518
2566
|
function InputGroupInput(_a) {
|
|
2519
2567
|
var _b = _a, {
|
|
2520
2568
|
className,
|
|
2521
|
-
size: sizeProp
|
|
2569
|
+
size: sizeProp,
|
|
2570
|
+
variant: variantProp
|
|
2522
2571
|
} = _b, props = __objRest(_b, [
|
|
2523
2572
|
"className",
|
|
2524
|
-
"size"
|
|
2573
|
+
"size",
|
|
2574
|
+
"variant"
|
|
2525
2575
|
]);
|
|
2526
2576
|
const groupSize = React6.useContext(InputGroupSizeContext);
|
|
2577
|
+
const groupVariant = React6.useContext(InputGroupVariantContext);
|
|
2527
2578
|
const size = sizeProp != null ? sizeProp : groupSize;
|
|
2579
|
+
const variant = variantProp != null ? variantProp : groupVariant;
|
|
2528
2580
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2529
2581
|
Input,
|
|
2530
2582
|
__spreadValues({
|
|
2531
2583
|
"data-slot": "input-group-control",
|
|
2532
2584
|
size,
|
|
2585
|
+
variant,
|
|
2533
2586
|
className: cn(
|
|
2534
2587
|
"h-full flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0",
|
|
2535
2588
|
className
|
|
@@ -4434,8 +4487,8 @@ var itemMediaVariants = (0, import_class_variance_authority9.cva)(
|
|
|
4434
4487
|
variants: {
|
|
4435
4488
|
variant: {
|
|
4436
4489
|
default: "bg-transparent",
|
|
4437
|
-
icon: "size-8 rounded-
|
|
4438
|
-
image: "size-10 overflow-hidden rounded-
|
|
4490
|
+
icon: "size-8 rounded-full border bg-subtle [&_svg:not([class*='size-'])]:size-4",
|
|
4491
|
+
image: "size-10 overflow-hidden rounded-full [&_img]:size-full [&_img]:object-cover"
|
|
4439
4492
|
}
|
|
4440
4493
|
},
|
|
4441
4494
|
defaultVariants: {
|
|
@@ -5528,7 +5581,7 @@ function SelectTrigger(_a) {
|
|
|
5528
5581
|
"data-readonly": readOnly ? "" : void 0,
|
|
5529
5582
|
disabled: readOnly || props.disabled,
|
|
5530
5583
|
className: cn(
|
|
5531
|
-
"flex w-fit items-center justify-between gap-2 rounded-
|
|
5584
|
+
"flex w-fit items-center justify-between gap-2 rounded-xs border border-input bg-prominent appearance-none whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-on-subtle data-[size=sm]:h-8 data-[size=sm]:px-3 data-[size=sm]:py-1 data-[size=sm]:text-xs data-[size=md]:h-10 data-[size=md]:px-3 data-[size=md]:py-1 data-[size=md]:text-sm data-[size=lg]:h-12 data-[size=lg]:px-4 data-[size=lg]:py-2 data-[size=lg]:text-base *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-on-subtle data-[readonly]:cursor-default data-[readonly]:opacity-100",
|
|
5532
5585
|
className
|
|
5533
5586
|
)
|
|
5534
5587
|
}, props), {
|
|
@@ -7839,7 +7892,6 @@ function NavBarBlock({ brand, links, signIn, signUp }) {
|
|
|
7839
7892
|
}
|
|
7840
7893
|
|
|
7841
7894
|
// components/blocks/open-positions-block.tsx
|
|
7842
|
-
var React18 = __toESM(require("react"), 1);
|
|
7843
7895
|
var import_lucide_react30 = require("lucide-react");
|
|
7844
7896
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7845
7897
|
function OpenPositionsBlock({
|
|
@@ -7881,10 +7933,7 @@ function PositionsList({
|
|
|
7881
7933
|
onViewHistory
|
|
7882
7934
|
}) {
|
|
7883
7935
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex flex-col flex-1 min-h-0", children: [
|
|
7884
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ItemGroup, { className: "min-h-0 overflow-y-auto", children: positions.map((pos, i) => /* @__PURE__ */ (0, import_jsx_runtime68.
|
|
7885
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PositionRow, { position: pos }),
|
|
7886
|
-
i < positions.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "h-px mx-4 bg-border-subtle" })
|
|
7887
|
-
] }, i)) }),
|
|
7936
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ItemGroup, { className: "min-h-0 overflow-y-auto", children: positions.map((pos, i) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(PositionRow, { position: pos }, i)) }),
|
|
7888
7937
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Separator, {}),
|
|
7889
7938
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "shrink-0 flex justify-center py-4", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "tertiary", size: "md", onClick: onViewHistory, children: "View trade history" }) })
|
|
7890
7939
|
] });
|