@classic-homes/theme-react 0.8.1 → 0.8.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/dist/index.js +75 -45
- package/dist/index.mjs +75 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -203,7 +203,8 @@ var badge = recipe({
|
|
|
203
203
|
variant: {
|
|
204
204
|
default: "border-transparent bg-primary text-primary-foreground",
|
|
205
205
|
secondary: "border-secondary-border bg-secondary text-secondary-foreground",
|
|
206
|
-
|
|
206
|
+
// Fern edge (3.81:1 on White): the border is what sets it apart
|
|
207
|
+
outline: "border-outline text-foreground",
|
|
207
208
|
// v2.5 status treatments: choose by what the person needs to do.
|
|
208
209
|
/** Live: available, active or operating normally. */
|
|
209
210
|
live: "border-transparent bg-live text-live-foreground font-bold",
|
|
@@ -261,7 +262,8 @@ var card = recipe({
|
|
|
261
262
|
borderColor: {
|
|
262
263
|
default: "border-border",
|
|
263
264
|
primary: "border-primary",
|
|
264
|
-
|
|
265
|
+
// Soft Linen edge for a card that is not a control (decorative)
|
|
266
|
+
muted: "border-accent"
|
|
265
267
|
},
|
|
266
268
|
variant: {
|
|
267
269
|
default: "border",
|
|
@@ -282,8 +284,8 @@ var cardHeader = recipe({
|
|
|
282
284
|
variant: {
|
|
283
285
|
default: "p-6",
|
|
284
286
|
compact: "p-4",
|
|
285
|
-
bordered: "p-6 border-b",
|
|
286
|
-
shaded: "p-6 bg-muted
|
|
287
|
+
bordered: "p-6 border-b border-border",
|
|
288
|
+
shaded: "p-6 bg-muted"
|
|
287
289
|
}
|
|
288
290
|
},
|
|
289
291
|
defaultVariants: { variant: "default" }
|
|
@@ -322,7 +324,7 @@ var input = recipe({
|
|
|
322
324
|
defaultVariants: { invalid: false }
|
|
323
325
|
});
|
|
324
326
|
var textarea = recipe({
|
|
325
|
-
base: `flex min-h-[80px] w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-base sm:text-sm ${focusRing} placeholder:text-
|
|
327
|
+
base: `flex min-h-[80px] w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-base sm:text-sm ${focusRing} placeholder:text-muted-foreground dark:placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 resize-y`,
|
|
326
328
|
variants: { invalid },
|
|
327
329
|
defaultVariants: { invalid: false }
|
|
328
330
|
});
|
|
@@ -354,10 +356,10 @@ var checkbox = recipe({
|
|
|
354
356
|
defaultVariants: { invalid: false }
|
|
355
357
|
});
|
|
356
358
|
var switchRoot = recipe({
|
|
357
|
-
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
359
|
+
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:border-input data-[state=unchecked]:bg-background"
|
|
358
360
|
});
|
|
359
361
|
var switchThumb = recipe({
|
|
360
|
-
base: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg
|
|
362
|
+
base: "pointer-events-none block h-5 w-5 rounded-full ring-0 transition-transform data-[state=checked]:bg-background data-[state=checked]:shadow-lg data-[state=unchecked]:bg-foreground data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-0.5"
|
|
361
363
|
});
|
|
362
364
|
var tabsList = recipe({
|
|
363
365
|
base: "inline-flex items-center rounded-md bg-muted p-1 text-muted-foreground"
|
|
@@ -365,9 +367,11 @@ var tabsList = recipe({
|
|
|
365
367
|
var tabsTrigger = recipe({
|
|
366
368
|
base: `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ${focusRing}`,
|
|
367
369
|
variants: {
|
|
370
|
+
// Selected is a Heritage Teal fill, not a White pill: White on the Paper
|
|
371
|
+
// track is ~1.1:1, so the current tab was hard to pick out (v2.5).
|
|
368
372
|
active: {
|
|
369
|
-
true: "bg-
|
|
370
|
-
false: "hover:bg-
|
|
373
|
+
true: "bg-primary text-primary-foreground shadow-sm",
|
|
374
|
+
false: "hover:bg-muted-hover hover:text-foreground"
|
|
371
375
|
},
|
|
372
376
|
disabled: { true: "opacity-50 pointer-events-none cursor-not-allowed", false: "" }
|
|
373
377
|
},
|
|
@@ -389,10 +393,10 @@ var avatar = recipe({
|
|
|
389
393
|
});
|
|
390
394
|
var avatarImage = recipe({ base: "aspect-square h-full w-full object-cover" });
|
|
391
395
|
var avatarFallback = recipe({
|
|
392
|
-
base: "flex h-full w-full items-center justify-center rounded-full bg-
|
|
396
|
+
base: "flex h-full w-full items-center justify-center rounded-full bg-accent text-accent-foreground text-sm font-medium"
|
|
393
397
|
});
|
|
394
398
|
var progress = recipe({
|
|
395
|
-
base: "w-full overflow-hidden rounded-full bg-muted",
|
|
399
|
+
base: "w-full overflow-hidden rounded-full bg-muted ring-1 ring-inset ring-outline",
|
|
396
400
|
variants: {
|
|
397
401
|
size: { sm: "h-1", md: "h-2", lg: "h-3" }
|
|
398
402
|
},
|
|
@@ -469,10 +473,12 @@ var emptyStateDescription = recipe({
|
|
|
469
473
|
variants: { size: { sm: "text-xs", md: "text-sm" } },
|
|
470
474
|
defaultVariants: { size: "md" }
|
|
471
475
|
});
|
|
472
|
-
var tableContainer = recipe({
|
|
476
|
+
var tableContainer = recipe({
|
|
477
|
+
base: "relative overflow-x-auto rounded-lg border border-border"
|
|
478
|
+
});
|
|
473
479
|
var table = recipe({ base: "w-full text-sm" });
|
|
474
|
-
var tableHeader = recipe({ base: "border-b bg-accent" });
|
|
475
|
-
var tableBody = recipe({ base: "divide-y" });
|
|
480
|
+
var tableHeader = recipe({ base: "border-b border-border bg-accent" });
|
|
481
|
+
var tableBody = recipe({ base: "divide-y divide-border" });
|
|
476
482
|
var tableRow = recipe({
|
|
477
483
|
base: "bg-card",
|
|
478
484
|
// v2.5: Paper hover on White tables, Linen hover on zebra tables; selection
|
|
@@ -524,7 +530,7 @@ var radioGroupItem = recipe({
|
|
|
524
530
|
});
|
|
525
531
|
var radioGroupIndicator = recipe({ base: "h-2.5 w-2.5 rounded-full bg-primary" });
|
|
526
532
|
var sliderRoot = recipe({
|
|
527
|
-
base: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:flex-col rounded-full bg-muted",
|
|
533
|
+
base: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:flex-col rounded-full bg-muted ring-1 ring-inset ring-outline",
|
|
528
534
|
variants: {
|
|
529
535
|
size: {
|
|
530
536
|
sm: "h-1.5 data-[orientation=vertical]:w-1.5",
|
|
@@ -568,7 +574,7 @@ var segmentedControl = recipe({
|
|
|
568
574
|
defaultVariants: { size: "md" }
|
|
569
575
|
});
|
|
570
576
|
var segmentedControlItem = recipe({
|
|
571
|
-
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background
|
|
577
|
+
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=unchecked]:hover:bg-muted-hover data-[state=unchecked]:hover:text-foreground data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:shadow-sm",
|
|
572
578
|
variants: { size: { md: "h-8", sm: "h-7 px-2.5" } },
|
|
573
579
|
defaultVariants: { size: "md" }
|
|
574
580
|
});
|
|
@@ -595,7 +601,7 @@ var dropdownMenuCheckboxItem = recipe({
|
|
|
595
601
|
var dropdownMenuLabel = recipe({ base: "px-2 py-1.5 text-sm font-semibold" });
|
|
596
602
|
var dropdownMenuSeparator = recipe({ base: "-mx-1 my-1 h-px bg-muted" });
|
|
597
603
|
var collapsibleTrigger = recipe({
|
|
598
|
-
base: "group inline-flex items-center gap-1.5 rounded-md text-sm font-medium text-foreground hover:
|
|
604
|
+
base: "group inline-flex items-center gap-1.5 rounded-md text-sm font-medium text-foreground underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
599
605
|
});
|
|
600
606
|
var collapsibleChevron = recipe({
|
|
601
607
|
base: "shrink-0 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"
|
|
@@ -1624,7 +1630,7 @@ var pageHeaderTitleVariants = (0, import_class_variance_authority7.cva)("text-fo
|
|
|
1624
1630
|
default: "mb-2",
|
|
1625
1631
|
hero: "font-sans text-5xl font-black not-italic uppercase tracking-tight mb-2",
|
|
1626
1632
|
centered: "mb-3",
|
|
1627
|
-
form: "font-sans text-3xl md:text-4xl font-light not-italic tracking-tight text-
|
|
1633
|
+
form: "font-sans text-3xl md:text-4xl font-light not-italic tracking-tight text-primary"
|
|
1628
1634
|
}
|
|
1629
1635
|
},
|
|
1630
1636
|
defaultVariants: {
|
|
@@ -1637,7 +1643,7 @@ var pageHeaderSubtitleVariants = (0, import_class_variance_authority7.cva)("text
|
|
|
1637
1643
|
default: "text-lg",
|
|
1638
1644
|
hero: "text-lg font-serif",
|
|
1639
1645
|
centered: "text-xl max-w-2xl mx-auto",
|
|
1640
|
-
form: "mt-3 text-base md:text-lg text-
|
|
1646
|
+
form: "mt-3 text-base md:text-lg text-foreground"
|
|
1641
1647
|
}
|
|
1642
1648
|
},
|
|
1643
1649
|
defaultVariants: {
|
|
@@ -1721,6 +1727,7 @@ var PATHS = {
|
|
|
1721
1727
|
edit: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",
|
|
1722
1728
|
"wifi-off": "M2 2l20 20M8.5 16.5a5 5 0 0 1 7 0M2 8.82a15 15 0 0 1 4.17-2.65M10.66 5c4.01-.36 8.14.9 11.34 3.76M16.85 11.25a10 10 0 0 1 2.22 1.68M5 13a10 10 0 0 1 5.24-2.76M12 20h.01",
|
|
1723
1729
|
eye: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
1730
|
+
"eye-off": "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24M1 1l22 22",
|
|
1724
1731
|
refresh: "M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5",
|
|
1725
1732
|
list: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",
|
|
1726
1733
|
settings: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",
|
|
@@ -2268,8 +2275,10 @@ function ModeSwitch({
|
|
|
2268
2275
|
onClick: () => onChange(m.value),
|
|
2269
2276
|
onKeyDown: (e) => keyDown(e, i),
|
|
2270
2277
|
className: cn(
|
|
2271
|
-
|
|
2272
|
-
|
|
2278
|
+
// segmentedControlItem look (parity with Svelte's SegmentedControl):
|
|
2279
|
+
// a White pill on the Paper track is 1.12:1, Heritage Teal 11.30:1
|
|
2280
|
+
"inline-flex h-7 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:flex-none",
|
|
2281
|
+
checked ? "bg-primary text-primary-foreground shadow-sm" : "hover:bg-muted-hover hover:text-foreground"
|
|
2273
2282
|
),
|
|
2274
2283
|
children: [
|
|
2275
2284
|
m.icon,
|
|
@@ -2341,7 +2350,7 @@ function StudioBar({
|
|
|
2341
2350
|
value: draft,
|
|
2342
2351
|
"aria-label": "Title",
|
|
2343
2352
|
placeholder: titlePlaceholder,
|
|
2344
|
-
className: "block w-full max-w-md truncate rounded-md border border-transparent bg-transparent px-1.5 py-0.5 text-base font-semibold leading-tight outline-none hover:border-border focus:border-input focus:bg-background focus:ring-2 focus:ring-ring",
|
|
2353
|
+
className: "block w-full max-w-md truncate rounded-md border border-transparent border-b-outline bg-transparent px-1.5 py-0.5 text-base font-semibold leading-tight outline-none hover:border-border focus:border-input focus:bg-background focus:ring-2 focus:ring-ring",
|
|
2345
2354
|
onChange: (e) => {
|
|
2346
2355
|
setDraft(e.target.value);
|
|
2347
2356
|
onTitleInput?.(e.target.value);
|
|
@@ -2461,7 +2470,9 @@ function StudioOutline({
|
|
|
2461
2470
|
"data-outline-id": entry.id,
|
|
2462
2471
|
className: cn(
|
|
2463
2472
|
"group relative flex items-stretch gap-0.5 rounded-md",
|
|
2464
|
-
|
|
2473
|
+
// Selected: Linen + a 3px Heritage Teal edge + bold title (a teal tint
|
|
2474
|
+
// alone is 1.05:1). Linen remaps muted text to Grey 01 (base.css).
|
|
2475
|
+
active ? "bg-accent shadow-[inset_3px_0_0_hsl(var(--primary))]" : "hover:bg-muted"
|
|
2465
2476
|
),
|
|
2466
2477
|
children: [
|
|
2467
2478
|
handle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -2484,8 +2495,7 @@ function StudioOutline({
|
|
|
2484
2495
|
"aria-current": active ? "true" : void 0,
|
|
2485
2496
|
className: cn(
|
|
2486
2497
|
"flex min-w-0 flex-1 flex-col gap-1.5 rounded-md py-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2487
|
-
!handle && "pl-2"
|
|
2488
|
-
entry.muted && "opacity-60"
|
|
2498
|
+
!handle && "pl-2"
|
|
2489
2499
|
),
|
|
2490
2500
|
onClick: () => select(entry.id),
|
|
2491
2501
|
onKeyDown: (e) => rowKeyDown(e, index),
|
|
@@ -2495,11 +2505,20 @@ function StudioOutline({
|
|
|
2495
2505
|
numbered && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "w-5 shrink-0 pt-px text-right text-xs tabular-nums text-muted-foreground", children: index + 1 }),
|
|
2496
2506
|
entry.icon && !renderThumbnail && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "mt-px shrink-0 text-muted-foreground", "aria-hidden": "true", children: entry.icon }),
|
|
2497
2507
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("span", { className: "min-w-0 flex-1", children: [
|
|
2498
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.
|
|
2508
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2499
2509
|
"span",
|
|
2500
2510
|
{
|
|
2501
|
-
className: cn(
|
|
2502
|
-
|
|
2511
|
+
className: cn(
|
|
2512
|
+
"block truncate text-sm",
|
|
2513
|
+
active && "font-semibold",
|
|
2514
|
+
// Hidden entries: muted italic title + an eye-off icon (5.74:1; an
|
|
2515
|
+
// opacity fade was 2.96:1)
|
|
2516
|
+
entry.muted ? "italic text-muted-foreground" : "text-foreground"
|
|
2517
|
+
),
|
|
2518
|
+
children: [
|
|
2519
|
+
entry.muted && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StudioIcon, { name: "eye-off", size: 12, className: "mr-1 inline-block align-[-1px]" }),
|
|
2520
|
+
entry.title || "Untitled"
|
|
2521
|
+
]
|
|
2503
2522
|
}
|
|
2504
2523
|
),
|
|
2505
2524
|
entry.subtitle && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "block truncate text-xs text-muted-foreground", children: entry.subtitle })
|
|
@@ -2562,7 +2581,7 @@ function StudioOutline({
|
|
|
2562
2581
|
{
|
|
2563
2582
|
type: "button",
|
|
2564
2583
|
onClick: onAdd,
|
|
2565
|
-
className: "flex h-9 w-full items-center justify-center gap-2 rounded-md border border-dashed border-border text-sm font-medium text-muted-foreground hover:border-primary hover:bg-
|
|
2584
|
+
className: "flex h-9 w-full items-center justify-center gap-2 rounded-md border border-dashed border-border text-sm font-medium text-muted-foreground hover:border-primary hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2566
2585
|
children: [
|
|
2567
2586
|
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StudioIcon, { name: "plus" }),
|
|
2568
2587
|
addLabel
|
|
@@ -2637,8 +2656,10 @@ function StudioCanvas({
|
|
|
2637
2656
|
onClick: () => setDevice(d),
|
|
2638
2657
|
onKeyDown: (e) => deviceKeyDown(e, i),
|
|
2639
2658
|
className: cn(
|
|
2640
|
-
|
|
2641
|
-
|
|
2659
|
+
// segmentedControlItem look (parity with Svelte's SegmentedControl):
|
|
2660
|
+
// a White pill on the Paper track is 1.12:1, Heritage Teal 11.30:1
|
|
2661
|
+
"inline-flex h-7 items-center gap-1.5 rounded-md px-2.5 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2662
|
+
device === d ? "bg-primary text-primary-foreground shadow-sm" : "hover:bg-muted-hover hover:text-foreground"
|
|
2642
2663
|
),
|
|
2643
2664
|
children: [
|
|
2644
2665
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(StudioIcon, { name: d === "desktop" ? "monitor" : "smartphone" }),
|
|
@@ -2719,7 +2740,7 @@ function StudioCanvasItem({
|
|
|
2719
2740
|
// Problems are a dashed amber outline: with a red brand primary, a red
|
|
2720
2741
|
// ring would read as "selected"
|
|
2721
2742
|
selected ? "ring-2 ring-primary" : "hover:ring-1 hover:ring-border",
|
|
2722
|
-
invalid2 && "-outline-offset-2 outline-dashed outline-2 outline-
|
|
2743
|
+
invalid2 && "-outline-offset-2 outline-dashed outline-2 outline-destructive",
|
|
2723
2744
|
className
|
|
2724
2745
|
),
|
|
2725
2746
|
onPointerDownCapture: (e) => {
|
|
@@ -3052,7 +3073,7 @@ function IssuesButton({
|
|
|
3052
3073
|
"button",
|
|
3053
3074
|
{
|
|
3054
3075
|
type: "button",
|
|
3055
|
-
className: "flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-muted
|
|
3076
|
+
className: "flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-muted focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
3056
3077
|
onClick: () => {
|
|
3057
3078
|
setOpen(false);
|
|
3058
3079
|
onSelect?.(issue);
|
|
@@ -3238,7 +3259,7 @@ function InsertPalette({
|
|
|
3238
3259
|
else all[Math.min(next, all.length - 1)]?.focus();
|
|
3239
3260
|
},
|
|
3240
3261
|
className: cn(
|
|
3241
|
-
"flex h-full w-full gap-3 rounded-md border border-border p-3 text-left hover:border-primary hover:bg-
|
|
3262
|
+
"flex h-full w-full gap-3 rounded-md border border-border p-3 text-left hover:border-primary hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
3242
3263
|
renderThumbnail ? "flex-col" : "items-start"
|
|
3243
3264
|
),
|
|
3244
3265
|
children: [
|
|
@@ -3765,7 +3786,7 @@ function DataPanelCardHeader({
|
|
|
3765
3786
|
showDragHandle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3766
3787
|
"div",
|
|
3767
3788
|
{
|
|
3768
|
-
className: "absolute top-1.5 left-1/2 -translate-x-1/2 w-10 h-1.5 rounded-full bg-
|
|
3789
|
+
className: "absolute top-1.5 left-1/2 -translate-x-1/2 w-10 h-1.5 rounded-full bg-outline cursor-pointer touch-none",
|
|
3769
3790
|
role: "button",
|
|
3770
3791
|
tabIndex: 0,
|
|
3771
3792
|
"aria-label": isExpanded ? "Collapse panel" : "Expand panel",
|
|
@@ -4035,7 +4056,7 @@ var DataPanelTab = React27.forwardRef(
|
|
|
4035
4056
|
{
|
|
4036
4057
|
type: "button",
|
|
4037
4058
|
"aria-label": `Expand ${title} panel`,
|
|
4038
|
-
className: "flex min-w-0 flex-1 flex-col text-left leading-tight hover:
|
|
4059
|
+
className: "flex min-w-0 flex-1 flex-col text-left leading-tight underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
4039
4060
|
onClick: () => {
|
|
4040
4061
|
if (pointerHandledRef.current) {
|
|
4041
4062
|
pointerHandledRef.current = false;
|
|
@@ -5162,7 +5183,7 @@ var DataPanel = React27.forwardRef(
|
|
|
5162
5183
|
"div",
|
|
5163
5184
|
{
|
|
5164
5185
|
className: cn(
|
|
5165
|
-
"fixed z-40 bg-
|
|
5186
|
+
"fixed z-40 bg-accent/50 border-2 border-primary border-dashed transition-all",
|
|
5166
5187
|
snapPreview === "left" && "left-0 top-0 bottom-0 w-80",
|
|
5167
5188
|
snapPreview === "right" && "right-0 top-0 bottom-0 w-80",
|
|
5168
5189
|
snapPreview === "top" && "top-0 left-0 right-0 h-64",
|
|
@@ -5173,7 +5194,7 @@ var DataPanel = React27.forwardRef(
|
|
|
5173
5194
|
variant === "card" && isExpanded && isMobile && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5174
5195
|
"div",
|
|
5175
5196
|
{
|
|
5176
|
-
className: "fixed inset-0 z-40 bg-
|
|
5197
|
+
className: "fixed inset-0 z-40 bg-foreground/60 transition-opacity",
|
|
5177
5198
|
"aria-hidden": "true",
|
|
5178
5199
|
onClick: handleToggleExpand
|
|
5179
5200
|
}
|
|
@@ -5587,7 +5608,7 @@ var LoadingOverlay = React32.forwardRef(
|
|
|
5587
5608
|
}
|
|
5588
5609
|
);
|
|
5589
5610
|
}
|
|
5590
|
-
const bgClass = opaque ? "bg-background" :
|
|
5611
|
+
const bgClass = opaque ? "bg-background" : "bg-background/90";
|
|
5591
5612
|
const positionClass = mode === "fullscreen" ? "fixed inset-0 z-50" : "absolute inset-0 z-10";
|
|
5592
5613
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
|
5593
5614
|
children,
|
|
@@ -6592,7 +6613,7 @@ var ChevronIcon = () => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
|
6592
6613
|
strokeWidth: "2",
|
|
6593
6614
|
strokeLinecap: "round",
|
|
6594
6615
|
strokeLinejoin: "round",
|
|
6595
|
-
className: "h-4 w-4
|
|
6616
|
+
className: "h-4 w-4 text-muted-foreground",
|
|
6596
6617
|
"aria-hidden": "true",
|
|
6597
6618
|
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "m6 9 6 6 6-6" })
|
|
6598
6619
|
}
|
|
@@ -6625,7 +6646,7 @@ function Item3({ option }) {
|
|
|
6625
6646
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CheckIcon, {}) }) }),
|
|
6626
6647
|
option.description ? /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: "flex min-w-0 flex-col", children: [
|
|
6627
6648
|
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectPrimitive.ItemText, { children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate", children: option.label }) }),
|
|
6628
|
-
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate text-xs text-muted-foreground group-data-[highlighted]:text-accent-foreground
|
|
6649
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "truncate text-xs text-muted-foreground group-data-[highlighted]:text-accent-foreground", children: option.description })
|
|
6629
6650
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(SelectPrimitive.ItemText, { children: option.label })
|
|
6630
6651
|
]
|
|
6631
6652
|
}
|
|
@@ -6864,7 +6885,7 @@ function Tabs({
|
|
|
6864
6885
|
{
|
|
6865
6886
|
className: cn(
|
|
6866
6887
|
"min-w-5 rounded-full px-1.5 py-0.5 text-center text-xs font-medium leading-none tabular-nums",
|
|
6867
|
-
active ? "bg-muted text-foreground" : "bg-
|
|
6888
|
+
active ? "bg-muted text-foreground" : "bg-accent text-accent-foreground"
|
|
6868
6889
|
),
|
|
6869
6890
|
"aria-hidden": "true",
|
|
6870
6891
|
"data-tab-badge": "",
|
|
@@ -6876,7 +6897,9 @@ function Tabs({
|
|
|
6876
6897
|
{
|
|
6877
6898
|
className: cn(
|
|
6878
6899
|
"size-2 shrink-0 rounded-full",
|
|
6879
|
-
|
|
6900
|
+
// The selected tab is a teal fill: a teal dot turns White on it, and a
|
|
6901
|
+
// red one gets a White ring (red on teal is too close)
|
|
6902
|
+
extra.dot === "destructive" ? cn("bg-destructive", active && "ring-2 ring-primary-foreground") : active ? "bg-primary-foreground" : "bg-success"
|
|
6880
6903
|
),
|
|
6881
6904
|
"aria-hidden": "true",
|
|
6882
6905
|
"data-tab-indicator": ""
|
|
@@ -7651,7 +7674,14 @@ function ItemContent({ item }) {
|
|
|
7651
7674
|
item.icon && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Icon, { name: item.icon, size: 16, className: "mr-2 shrink-0" }),
|
|
7652
7675
|
item.label,
|
|
7653
7676
|
item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_jsx_runtime51.Fragment, { children: [
|
|
7654
|
-
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7677
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7678
|
+
"span",
|
|
7679
|
+
{
|
|
7680
|
+
className: "ml-auto pl-4 text-xs tracking-widest text-muted-foreground",
|
|
7681
|
+
"aria-hidden": "true",
|
|
7682
|
+
children: item.shortcut
|
|
7683
|
+
}
|
|
7684
|
+
),
|
|
7655
7685
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("span", { className: "sr-only", children: [
|
|
7656
7686
|
", keyboard shortcut ",
|
|
7657
7687
|
item.shortcut
|
|
@@ -7751,7 +7781,7 @@ function DropdownMenu({
|
|
|
7751
7781
|
name: "chevron-down",
|
|
7752
7782
|
size: 16,
|
|
7753
7783
|
className: cn(
|
|
7754
|
-
"ml-1 shrink-0
|
|
7784
|
+
"ml-1 shrink-0 transition-transform duration-200 motion-reduce:transition-none",
|
|
7755
7785
|
open && "rotate-180"
|
|
7756
7786
|
)
|
|
7757
7787
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -46,7 +46,8 @@ var badge = recipe({
|
|
|
46
46
|
variant: {
|
|
47
47
|
default: "border-transparent bg-primary text-primary-foreground",
|
|
48
48
|
secondary: "border-secondary-border bg-secondary text-secondary-foreground",
|
|
49
|
-
|
|
49
|
+
// Fern edge (3.81:1 on White): the border is what sets it apart
|
|
50
|
+
outline: "border-outline text-foreground",
|
|
50
51
|
// v2.5 status treatments: choose by what the person needs to do.
|
|
51
52
|
/** Live: available, active or operating normally. */
|
|
52
53
|
live: "border-transparent bg-live text-live-foreground font-bold",
|
|
@@ -104,7 +105,8 @@ var card = recipe({
|
|
|
104
105
|
borderColor: {
|
|
105
106
|
default: "border-border",
|
|
106
107
|
primary: "border-primary",
|
|
107
|
-
|
|
108
|
+
// Soft Linen edge for a card that is not a control (decorative)
|
|
109
|
+
muted: "border-accent"
|
|
108
110
|
},
|
|
109
111
|
variant: {
|
|
110
112
|
default: "border",
|
|
@@ -125,8 +127,8 @@ var cardHeader = recipe({
|
|
|
125
127
|
variant: {
|
|
126
128
|
default: "p-6",
|
|
127
129
|
compact: "p-4",
|
|
128
|
-
bordered: "p-6 border-b",
|
|
129
|
-
shaded: "p-6 bg-muted
|
|
130
|
+
bordered: "p-6 border-b border-border",
|
|
131
|
+
shaded: "p-6 bg-muted"
|
|
130
132
|
}
|
|
131
133
|
},
|
|
132
134
|
defaultVariants: { variant: "default" }
|
|
@@ -165,7 +167,7 @@ var input = recipe({
|
|
|
165
167
|
defaultVariants: { invalid: false }
|
|
166
168
|
});
|
|
167
169
|
var textarea = recipe({
|
|
168
|
-
base: `flex min-h-[80px] w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-base sm:text-sm ${focusRing} placeholder:text-
|
|
170
|
+
base: `flex min-h-[80px] w-full rounded-md border border-input bg-background text-foreground px-3 py-2 text-base sm:text-sm ${focusRing} placeholder:text-muted-foreground dark:placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 resize-y`,
|
|
169
171
|
variants: { invalid },
|
|
170
172
|
defaultVariants: { invalid: false }
|
|
171
173
|
});
|
|
@@ -197,10 +199,10 @@ var checkbox = recipe({
|
|
|
197
199
|
defaultVariants: { invalid: false }
|
|
198
200
|
});
|
|
199
201
|
var switchRoot = recipe({
|
|
200
|
-
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-
|
|
202
|
+
base: "peer relative inline-flex h-7 w-12 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:border-input data-[state=unchecked]:bg-background"
|
|
201
203
|
});
|
|
202
204
|
var switchThumb = recipe({
|
|
203
|
-
base: "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg
|
|
205
|
+
base: "pointer-events-none block h-5 w-5 rounded-full ring-0 transition-transform data-[state=checked]:bg-background data-[state=checked]:shadow-lg data-[state=unchecked]:bg-foreground data-[state=checked]:translate-x-[22px] data-[state=unchecked]:translate-x-0.5"
|
|
204
206
|
});
|
|
205
207
|
var tabsList = recipe({
|
|
206
208
|
base: "inline-flex items-center rounded-md bg-muted p-1 text-muted-foreground"
|
|
@@ -208,9 +210,11 @@ var tabsList = recipe({
|
|
|
208
210
|
var tabsTrigger = recipe({
|
|
209
211
|
base: `inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ${focusRing}`,
|
|
210
212
|
variants: {
|
|
213
|
+
// Selected is a Heritage Teal fill, not a White pill: White on the Paper
|
|
214
|
+
// track is ~1.1:1, so the current tab was hard to pick out (v2.5).
|
|
211
215
|
active: {
|
|
212
|
-
true: "bg-
|
|
213
|
-
false: "hover:bg-
|
|
216
|
+
true: "bg-primary text-primary-foreground shadow-sm",
|
|
217
|
+
false: "hover:bg-muted-hover hover:text-foreground"
|
|
214
218
|
},
|
|
215
219
|
disabled: { true: "opacity-50 pointer-events-none cursor-not-allowed", false: "" }
|
|
216
220
|
},
|
|
@@ -232,10 +236,10 @@ var avatar = recipe({
|
|
|
232
236
|
});
|
|
233
237
|
var avatarImage = recipe({ base: "aspect-square h-full w-full object-cover" });
|
|
234
238
|
var avatarFallback = recipe({
|
|
235
|
-
base: "flex h-full w-full items-center justify-center rounded-full bg-
|
|
239
|
+
base: "flex h-full w-full items-center justify-center rounded-full bg-accent text-accent-foreground text-sm font-medium"
|
|
236
240
|
});
|
|
237
241
|
var progress = recipe({
|
|
238
|
-
base: "w-full overflow-hidden rounded-full bg-muted",
|
|
242
|
+
base: "w-full overflow-hidden rounded-full bg-muted ring-1 ring-inset ring-outline",
|
|
239
243
|
variants: {
|
|
240
244
|
size: { sm: "h-1", md: "h-2", lg: "h-3" }
|
|
241
245
|
},
|
|
@@ -312,10 +316,12 @@ var emptyStateDescription = recipe({
|
|
|
312
316
|
variants: { size: { sm: "text-xs", md: "text-sm" } },
|
|
313
317
|
defaultVariants: { size: "md" }
|
|
314
318
|
});
|
|
315
|
-
var tableContainer = recipe({
|
|
319
|
+
var tableContainer = recipe({
|
|
320
|
+
base: "relative overflow-x-auto rounded-lg border border-border"
|
|
321
|
+
});
|
|
316
322
|
var table = recipe({ base: "w-full text-sm" });
|
|
317
|
-
var tableHeader = recipe({ base: "border-b bg-accent" });
|
|
318
|
-
var tableBody = recipe({ base: "divide-y" });
|
|
323
|
+
var tableHeader = recipe({ base: "border-b border-border bg-accent" });
|
|
324
|
+
var tableBody = recipe({ base: "divide-y divide-border" });
|
|
319
325
|
var tableRow = recipe({
|
|
320
326
|
base: "bg-card",
|
|
321
327
|
// v2.5: Paper hover on White tables, Linen hover on zebra tables; selection
|
|
@@ -367,7 +373,7 @@ var radioGroupItem = recipe({
|
|
|
367
373
|
});
|
|
368
374
|
var radioGroupIndicator = recipe({ base: "h-2.5 w-2.5 rounded-full bg-primary" });
|
|
369
375
|
var sliderRoot = recipe({
|
|
370
|
-
base: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:flex-col rounded-full bg-muted",
|
|
376
|
+
base: "relative flex w-full touch-none select-none items-center data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-40 data-[orientation=vertical]:flex-col rounded-full bg-muted ring-1 ring-inset ring-outline",
|
|
371
377
|
variants: {
|
|
372
378
|
size: {
|
|
373
379
|
sm: "h-1.5 data-[orientation=vertical]:w-1.5",
|
|
@@ -411,7 +417,7 @@ var segmentedControl = recipe({
|
|
|
411
417
|
defaultVariants: { size: "md" }
|
|
412
418
|
});
|
|
413
419
|
var segmentedControlItem = recipe({
|
|
414
|
-
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background
|
|
420
|
+
base: "inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-3 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=unchecked]:hover:bg-muted-hover data-[state=unchecked]:hover:text-foreground data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:shadow-sm",
|
|
415
421
|
variants: { size: { md: "h-8", sm: "h-7 px-2.5" } },
|
|
416
422
|
defaultVariants: { size: "md" }
|
|
417
423
|
});
|
|
@@ -438,7 +444,7 @@ var dropdownMenuCheckboxItem = recipe({
|
|
|
438
444
|
var dropdownMenuLabel = recipe({ base: "px-2 py-1.5 text-sm font-semibold" });
|
|
439
445
|
var dropdownMenuSeparator = recipe({ base: "-mx-1 my-1 h-px bg-muted" });
|
|
440
446
|
var collapsibleTrigger = recipe({
|
|
441
|
-
base: "group inline-flex items-center gap-1.5 rounded-md text-sm font-medium text-foreground hover:
|
|
447
|
+
base: "group inline-flex items-center gap-1.5 rounded-md text-sm font-medium text-foreground underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
|
|
442
448
|
});
|
|
443
449
|
var collapsibleChevron = recipe({
|
|
444
450
|
base: "shrink-0 transition-transform duration-200 group-data-[state=open]:rotate-90 motion-reduce:transition-none"
|
|
@@ -1467,7 +1473,7 @@ var pageHeaderTitleVariants = cva7("text-foreground", {
|
|
|
1467
1473
|
default: "mb-2",
|
|
1468
1474
|
hero: "font-sans text-5xl font-black not-italic uppercase tracking-tight mb-2",
|
|
1469
1475
|
centered: "mb-3",
|
|
1470
|
-
form: "font-sans text-3xl md:text-4xl font-light not-italic tracking-tight text-
|
|
1476
|
+
form: "font-sans text-3xl md:text-4xl font-light not-italic tracking-tight text-primary"
|
|
1471
1477
|
}
|
|
1472
1478
|
},
|
|
1473
1479
|
defaultVariants: {
|
|
@@ -1480,7 +1486,7 @@ var pageHeaderSubtitleVariants = cva7("text-muted-foreground", {
|
|
|
1480
1486
|
default: "text-lg",
|
|
1481
1487
|
hero: "text-lg font-serif",
|
|
1482
1488
|
centered: "text-xl max-w-2xl mx-auto",
|
|
1483
|
-
form: "mt-3 text-base md:text-lg text-
|
|
1489
|
+
form: "mt-3 text-base md:text-lg text-foreground"
|
|
1484
1490
|
}
|
|
1485
1491
|
},
|
|
1486
1492
|
defaultVariants: {
|
|
@@ -1564,6 +1570,7 @@ var PATHS = {
|
|
|
1564
1570
|
edit: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z",
|
|
1565
1571
|
"wifi-off": "M2 2l20 20M8.5 16.5a5 5 0 0 1 7 0M2 8.82a15 15 0 0 1 4.17-2.65M10.66 5c4.01-.36 8.14.9 11.34 3.76M16.85 11.25a10 10 0 0 1 2.22 1.68M5 13a10 10 0 0 1 5.24-2.76M12 20h.01",
|
|
1566
1572
|
eye: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",
|
|
1573
|
+
"eye-off": "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24M1 1l22 22",
|
|
1567
1574
|
refresh: "M3 12a9 9 0 0 1 15-6.7L21 8M21 3v5h-5M21 12a9 9 0 0 1-15 6.7L3 16M3 21v-5h5",
|
|
1568
1575
|
list: "M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01",
|
|
1569
1576
|
settings: "M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z",
|
|
@@ -2111,8 +2118,10 @@ function ModeSwitch({
|
|
|
2111
2118
|
onClick: () => onChange(m.value),
|
|
2112
2119
|
onKeyDown: (e) => keyDown(e, i),
|
|
2113
2120
|
className: cn(
|
|
2114
|
-
|
|
2115
|
-
|
|
2121
|
+
// segmentedControlItem look (parity with Svelte's SegmentedControl):
|
|
2122
|
+
// a White pill on the Paper track is 1.12:1, Heritage Teal 11.30:1
|
|
2123
|
+
"inline-flex h-7 flex-1 items-center justify-center gap-1.5 whitespace-nowrap rounded-md px-2.5 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 md:flex-none",
|
|
2124
|
+
checked ? "bg-primary text-primary-foreground shadow-sm" : "hover:bg-muted-hover hover:text-foreground"
|
|
2116
2125
|
),
|
|
2117
2126
|
children: [
|
|
2118
2127
|
m.icon,
|
|
@@ -2184,7 +2193,7 @@ function StudioBar({
|
|
|
2184
2193
|
value: draft,
|
|
2185
2194
|
"aria-label": "Title",
|
|
2186
2195
|
placeholder: titlePlaceholder,
|
|
2187
|
-
className: "block w-full max-w-md truncate rounded-md border border-transparent bg-transparent px-1.5 py-0.5 text-base font-semibold leading-tight outline-none hover:border-border focus:border-input focus:bg-background focus:ring-2 focus:ring-ring",
|
|
2196
|
+
className: "block w-full max-w-md truncate rounded-md border border-transparent border-b-outline bg-transparent px-1.5 py-0.5 text-base font-semibold leading-tight outline-none hover:border-border focus:border-input focus:bg-background focus:ring-2 focus:ring-ring",
|
|
2188
2197
|
onChange: (e) => {
|
|
2189
2198
|
setDraft(e.target.value);
|
|
2190
2199
|
onTitleInput?.(e.target.value);
|
|
@@ -2304,7 +2313,9 @@ function StudioOutline({
|
|
|
2304
2313
|
"data-outline-id": entry.id,
|
|
2305
2314
|
className: cn(
|
|
2306
2315
|
"group relative flex items-stretch gap-0.5 rounded-md",
|
|
2307
|
-
|
|
2316
|
+
// Selected: Linen + a 3px Heritage Teal edge + bold title (a teal tint
|
|
2317
|
+
// alone is 1.05:1). Linen remaps muted text to Grey 01 (base.css).
|
|
2318
|
+
active ? "bg-accent shadow-[inset_3px_0_0_hsl(var(--primary))]" : "hover:bg-muted"
|
|
2308
2319
|
),
|
|
2309
2320
|
children: [
|
|
2310
2321
|
handle && /* @__PURE__ */ jsx19(
|
|
@@ -2327,8 +2338,7 @@ function StudioOutline({
|
|
|
2327
2338
|
"aria-current": active ? "true" : void 0,
|
|
2328
2339
|
className: cn(
|
|
2329
2340
|
"flex min-w-0 flex-1 flex-col gap-1.5 rounded-md py-2 text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2330
|
-
!handle && "pl-2"
|
|
2331
|
-
entry.muted && "opacity-60"
|
|
2341
|
+
!handle && "pl-2"
|
|
2332
2342
|
),
|
|
2333
2343
|
onClick: () => select(entry.id),
|
|
2334
2344
|
onKeyDown: (e) => rowKeyDown(e, index),
|
|
@@ -2338,11 +2348,20 @@ function StudioOutline({
|
|
|
2338
2348
|
numbered && /* @__PURE__ */ jsx19("span", { className: "w-5 shrink-0 pt-px text-right text-xs tabular-nums text-muted-foreground", children: index + 1 }),
|
|
2339
2349
|
entry.icon && !renderThumbnail && /* @__PURE__ */ jsx19("span", { className: "mt-px shrink-0 text-muted-foreground", "aria-hidden": "true", children: entry.icon }),
|
|
2340
2350
|
/* @__PURE__ */ jsxs14("span", { className: "min-w-0 flex-1", children: [
|
|
2341
|
-
/* @__PURE__ */
|
|
2351
|
+
/* @__PURE__ */ jsxs14(
|
|
2342
2352
|
"span",
|
|
2343
2353
|
{
|
|
2344
|
-
className: cn(
|
|
2345
|
-
|
|
2354
|
+
className: cn(
|
|
2355
|
+
"block truncate text-sm",
|
|
2356
|
+
active && "font-semibold",
|
|
2357
|
+
// Hidden entries: muted italic title + an eye-off icon (5.74:1; an
|
|
2358
|
+
// opacity fade was 2.96:1)
|
|
2359
|
+
entry.muted ? "italic text-muted-foreground" : "text-foreground"
|
|
2360
|
+
),
|
|
2361
|
+
children: [
|
|
2362
|
+
entry.muted && /* @__PURE__ */ jsx19(StudioIcon, { name: "eye-off", size: 12, className: "mr-1 inline-block align-[-1px]" }),
|
|
2363
|
+
entry.title || "Untitled"
|
|
2364
|
+
]
|
|
2346
2365
|
}
|
|
2347
2366
|
),
|
|
2348
2367
|
entry.subtitle && /* @__PURE__ */ jsx19("span", { className: "block truncate text-xs text-muted-foreground", children: entry.subtitle })
|
|
@@ -2405,7 +2424,7 @@ function StudioOutline({
|
|
|
2405
2424
|
{
|
|
2406
2425
|
type: "button",
|
|
2407
2426
|
onClick: onAdd,
|
|
2408
|
-
className: "flex h-9 w-full items-center justify-center gap-2 rounded-md border border-dashed border-border text-sm font-medium text-muted-foreground hover:border-primary hover:bg-
|
|
2427
|
+
className: "flex h-9 w-full items-center justify-center gap-2 rounded-md border border-dashed border-border text-sm font-medium text-muted-foreground hover:border-primary hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
2409
2428
|
children: [
|
|
2410
2429
|
/* @__PURE__ */ jsx19(StudioIcon, { name: "plus" }),
|
|
2411
2430
|
addLabel
|
|
@@ -2480,8 +2499,10 @@ function StudioCanvas({
|
|
|
2480
2499
|
onClick: () => setDevice(d),
|
|
2481
2500
|
onKeyDown: (e) => deviceKeyDown(e, i),
|
|
2482
2501
|
className: cn(
|
|
2483
|
-
|
|
2484
|
-
|
|
2502
|
+
// segmentedControlItem look (parity with Svelte's SegmentedControl):
|
|
2503
|
+
// a White pill on the Paper track is 1.12:1, Heritage Teal 11.30:1
|
|
2504
|
+
"inline-flex h-7 items-center gap-1.5 rounded-md px-2.5 text-sm font-medium ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2505
|
+
device === d ? "bg-primary text-primary-foreground shadow-sm" : "hover:bg-muted-hover hover:text-foreground"
|
|
2485
2506
|
),
|
|
2486
2507
|
children: [
|
|
2487
2508
|
/* @__PURE__ */ jsx20(StudioIcon, { name: d === "desktop" ? "monitor" : "smartphone" }),
|
|
@@ -2562,7 +2583,7 @@ function StudioCanvasItem({
|
|
|
2562
2583
|
// Problems are a dashed amber outline: with a red brand primary, a red
|
|
2563
2584
|
// ring would read as "selected"
|
|
2564
2585
|
selected ? "ring-2 ring-primary" : "hover:ring-1 hover:ring-border",
|
|
2565
|
-
invalid2 && "-outline-offset-2 outline-dashed outline-2 outline-
|
|
2586
|
+
invalid2 && "-outline-offset-2 outline-dashed outline-2 outline-destructive",
|
|
2566
2587
|
className
|
|
2567
2588
|
),
|
|
2568
2589
|
onPointerDownCapture: (e) => {
|
|
@@ -2895,7 +2916,7 @@ function IssuesButton({
|
|
|
2895
2916
|
"button",
|
|
2896
2917
|
{
|
|
2897
2918
|
type: "button",
|
|
2898
|
-
className: "flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-muted
|
|
2919
|
+
className: "flex w-full items-start gap-2 px-3 py-2 text-left text-sm hover:bg-muted focus-visible:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring",
|
|
2899
2920
|
onClick: () => {
|
|
2900
2921
|
setOpen(false);
|
|
2901
2922
|
onSelect?.(issue);
|
|
@@ -3081,7 +3102,7 @@ function InsertPalette({
|
|
|
3081
3102
|
else all[Math.min(next, all.length - 1)]?.focus();
|
|
3082
3103
|
},
|
|
3083
3104
|
className: cn(
|
|
3084
|
-
"flex h-full w-full gap-3 rounded-md border border-border p-3 text-left hover:border-primary hover:bg-
|
|
3105
|
+
"flex h-full w-full gap-3 rounded-md border border-border p-3 text-left hover:border-primary hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
3085
3106
|
renderThumbnail ? "flex-col" : "items-start"
|
|
3086
3107
|
),
|
|
3087
3108
|
children: [
|
|
@@ -3640,7 +3661,7 @@ function DataPanelCardHeader({
|
|
|
3640
3661
|
showDragHandle && /* @__PURE__ */ jsx26(
|
|
3641
3662
|
"div",
|
|
3642
3663
|
{
|
|
3643
|
-
className: "absolute top-1.5 left-1/2 -translate-x-1/2 w-10 h-1.5 rounded-full bg-
|
|
3664
|
+
className: "absolute top-1.5 left-1/2 -translate-x-1/2 w-10 h-1.5 rounded-full bg-outline cursor-pointer touch-none",
|
|
3644
3665
|
role: "button",
|
|
3645
3666
|
tabIndex: 0,
|
|
3646
3667
|
"aria-label": isExpanded ? "Collapse panel" : "Expand panel",
|
|
@@ -3910,7 +3931,7 @@ var DataPanelTab = React27.forwardRef(
|
|
|
3910
3931
|
{
|
|
3911
3932
|
type: "button",
|
|
3912
3933
|
"aria-label": `Expand ${title} panel`,
|
|
3913
|
-
className: "flex min-w-0 flex-1 flex-col text-left leading-tight hover:
|
|
3934
|
+
className: "flex min-w-0 flex-1 flex-col text-left leading-tight underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3914
3935
|
onClick: () => {
|
|
3915
3936
|
if (pointerHandledRef.current) {
|
|
3916
3937
|
pointerHandledRef.current = false;
|
|
@@ -5037,7 +5058,7 @@ var DataPanel = React27.forwardRef(
|
|
|
5037
5058
|
"div",
|
|
5038
5059
|
{
|
|
5039
5060
|
className: cn(
|
|
5040
|
-
"fixed z-40 bg-
|
|
5061
|
+
"fixed z-40 bg-accent/50 border-2 border-primary border-dashed transition-all",
|
|
5041
5062
|
snapPreview === "left" && "left-0 top-0 bottom-0 w-80",
|
|
5042
5063
|
snapPreview === "right" && "right-0 top-0 bottom-0 w-80",
|
|
5043
5064
|
snapPreview === "top" && "top-0 left-0 right-0 h-64",
|
|
@@ -5048,7 +5069,7 @@ var DataPanel = React27.forwardRef(
|
|
|
5048
5069
|
variant === "card" && isExpanded && isMobile && /* @__PURE__ */ jsx26(
|
|
5049
5070
|
"div",
|
|
5050
5071
|
{
|
|
5051
|
-
className: "fixed inset-0 z-40 bg-
|
|
5072
|
+
className: "fixed inset-0 z-40 bg-foreground/60 transition-opacity",
|
|
5052
5073
|
"aria-hidden": "true",
|
|
5053
5074
|
onClick: handleToggleExpand
|
|
5054
5075
|
}
|
|
@@ -5462,7 +5483,7 @@ var LoadingOverlay = React32.forwardRef(
|
|
|
5462
5483
|
}
|
|
5463
5484
|
);
|
|
5464
5485
|
}
|
|
5465
|
-
const bgClass = opaque ? "bg-background" :
|
|
5486
|
+
const bgClass = opaque ? "bg-background" : "bg-background/90";
|
|
5466
5487
|
const positionClass = mode === "fullscreen" ? "fixed inset-0 z-50" : "absolute inset-0 z-10";
|
|
5467
5488
|
return /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
5468
5489
|
children,
|
|
@@ -6467,7 +6488,7 @@ var ChevronIcon = () => /* @__PURE__ */ jsx41(
|
|
|
6467
6488
|
strokeWidth: "2",
|
|
6468
6489
|
strokeLinecap: "round",
|
|
6469
6490
|
strokeLinejoin: "round",
|
|
6470
|
-
className: "h-4 w-4
|
|
6491
|
+
className: "h-4 w-4 text-muted-foreground",
|
|
6471
6492
|
"aria-hidden": "true",
|
|
6472
6493
|
children: /* @__PURE__ */ jsx41("path", { d: "m6 9 6 6 6-6" })
|
|
6473
6494
|
}
|
|
@@ -6500,7 +6521,7 @@ function Item3({ option }) {
|
|
|
6500
6521
|
/* @__PURE__ */ jsx41("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx41(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx41(CheckIcon, {}) }) }),
|
|
6501
6522
|
option.description ? /* @__PURE__ */ jsxs32("span", { className: "flex min-w-0 flex-col", children: [
|
|
6502
6523
|
/* @__PURE__ */ jsx41(SelectPrimitive.ItemText, { children: /* @__PURE__ */ jsx41("span", { className: "truncate", children: option.label }) }),
|
|
6503
|
-
/* @__PURE__ */ jsx41("span", { className: "truncate text-xs text-muted-foreground group-data-[highlighted]:text-accent-foreground
|
|
6524
|
+
/* @__PURE__ */ jsx41("span", { className: "truncate text-xs text-muted-foreground group-data-[highlighted]:text-accent-foreground", children: option.description })
|
|
6504
6525
|
] }) : /* @__PURE__ */ jsx41(SelectPrimitive.ItemText, { children: option.label })
|
|
6505
6526
|
]
|
|
6506
6527
|
}
|
|
@@ -6739,7 +6760,7 @@ function Tabs({
|
|
|
6739
6760
|
{
|
|
6740
6761
|
className: cn(
|
|
6741
6762
|
"min-w-5 rounded-full px-1.5 py-0.5 text-center text-xs font-medium leading-none tabular-nums",
|
|
6742
|
-
active ? "bg-muted text-foreground" : "bg-
|
|
6763
|
+
active ? "bg-muted text-foreground" : "bg-accent text-accent-foreground"
|
|
6743
6764
|
),
|
|
6744
6765
|
"aria-hidden": "true",
|
|
6745
6766
|
"data-tab-badge": "",
|
|
@@ -6751,7 +6772,9 @@ function Tabs({
|
|
|
6751
6772
|
{
|
|
6752
6773
|
className: cn(
|
|
6753
6774
|
"size-2 shrink-0 rounded-full",
|
|
6754
|
-
|
|
6775
|
+
// The selected tab is a teal fill: a teal dot turns White on it, and a
|
|
6776
|
+
// red one gets a White ring (red on teal is too close)
|
|
6777
|
+
extra.dot === "destructive" ? cn("bg-destructive", active && "ring-2 ring-primary-foreground") : active ? "bg-primary-foreground" : "bg-success"
|
|
6755
6778
|
),
|
|
6756
6779
|
"aria-hidden": "true",
|
|
6757
6780
|
"data-tab-indicator": ""
|
|
@@ -7526,7 +7549,14 @@ function ItemContent({ item }) {
|
|
|
7526
7549
|
item.icon && /* @__PURE__ */ jsx51(Icon, { name: item.icon, size: 16, className: "mr-2 shrink-0" }),
|
|
7527
7550
|
item.label,
|
|
7528
7551
|
item.shortcut && /* @__PURE__ */ jsxs42(Fragment15, { children: [
|
|
7529
|
-
/* @__PURE__ */ jsx51(
|
|
7552
|
+
/* @__PURE__ */ jsx51(
|
|
7553
|
+
"span",
|
|
7554
|
+
{
|
|
7555
|
+
className: "ml-auto pl-4 text-xs tracking-widest text-muted-foreground",
|
|
7556
|
+
"aria-hidden": "true",
|
|
7557
|
+
children: item.shortcut
|
|
7558
|
+
}
|
|
7559
|
+
),
|
|
7530
7560
|
/* @__PURE__ */ jsxs42("span", { className: "sr-only", children: [
|
|
7531
7561
|
", keyboard shortcut ",
|
|
7532
7562
|
item.shortcut
|
|
@@ -7626,7 +7656,7 @@ function DropdownMenu({
|
|
|
7626
7656
|
name: "chevron-down",
|
|
7627
7657
|
size: 16,
|
|
7628
7658
|
className: cn(
|
|
7629
|
-
"ml-1 shrink-0
|
|
7659
|
+
"ml-1 shrink-0 transition-transform duration-200 motion-reduce:transition-none",
|
|
7630
7660
|
open && "rotate-180"
|
|
7631
7661
|
)
|
|
7632
7662
|
}
|