@luxfi/ui 7.4.11 → 7.4.13

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.
Files changed (84) hide show
  1. package/dist/alert.cjs +68 -46
  2. package/dist/alert.js +69 -46
  3. package/dist/avatar.cjs +49 -47
  4. package/dist/avatar.js +52 -49
  5. package/dist/badge.cjs +82 -49
  6. package/dist/badge.js +83 -50
  7. package/dist/checkbox.cjs +42 -75
  8. package/dist/checkbox.js +43 -76
  9. package/dist/chrome.cjs +3 -7
  10. package/dist/chrome.js +3 -7
  11. package/dist/close-button.cjs +3 -7
  12. package/dist/close-button.js +3 -7
  13. package/dist/dialog.cjs +3 -7
  14. package/dist/dialog.js +3 -7
  15. package/dist/drawer.cjs +3 -7
  16. package/dist/drawer.js +3 -7
  17. package/dist/empty-state.cjs +13 -13
  18. package/dist/empty-state.js +13 -13
  19. package/dist/expiration-selector.cjs +58 -63
  20. package/dist/expiration-selector.js +58 -63
  21. package/dist/greeks-display.cjs +48 -39
  22. package/dist/greeks-display.js +48 -39
  23. package/dist/index.cjs +1053 -888
  24. package/dist/index.js +1054 -889
  25. package/dist/input-group.cjs +36 -19
  26. package/dist/input-group.js +37 -19
  27. package/dist/option-chain.cjs +89 -67
  28. package/dist/option-chain.js +89 -67
  29. package/dist/option-position.cjs +88 -85
  30. package/dist/option-position.js +88 -85
  31. package/dist/pin-input.cjs +30 -29
  32. package/dist/pin-input.js +30 -29
  33. package/dist/pnl-diagram.cjs +20 -20
  34. package/dist/pnl-diagram.js +20 -20
  35. package/dist/popover.cjs +3 -7
  36. package/dist/popover.js +3 -7
  37. package/dist/progress-circle.cjs +40 -22
  38. package/dist/progress-circle.d.cts +5 -5
  39. package/dist/progress-circle.d.ts +5 -5
  40. package/dist/progress-circle.js +41 -22
  41. package/dist/progress.cjs +15 -22
  42. package/dist/progress.d.cts +6 -6
  43. package/dist/progress.d.ts +6 -6
  44. package/dist/progress.js +15 -22
  45. package/dist/radio.cjs +35 -68
  46. package/dist/radio.d.cts +18 -18
  47. package/dist/radio.d.ts +18 -18
  48. package/dist/radio.js +36 -69
  49. package/dist/rating.cjs +15 -17
  50. package/dist/rating.js +15 -17
  51. package/dist/slider.cjs +33 -50
  52. package/dist/slider.js +34 -51
  53. package/dist/strategy-builder.cjs +194 -115
  54. package/dist/strategy-builder.js +194 -115
  55. package/dist/switch.cjs +48 -55
  56. package/dist/switch.js +49 -56
  57. package/dist/tag.cjs +115 -69
  58. package/dist/tag.js +116 -69
  59. package/dist/tooltip.cjs +28 -17
  60. package/dist/tooltip.js +30 -18
  61. package/package.json +1 -1
  62. package/src/alert.tsx +78 -45
  63. package/src/avatar.tsx +54 -38
  64. package/src/badge.tsx +65 -44
  65. package/src/checkbox.tsx +70 -89
  66. package/src/close-button.tsx +3 -8
  67. package/src/empty-state.tsx +21 -17
  68. package/src/expiration-selector.tsx +84 -66
  69. package/src/greeks-display.tsx +59 -51
  70. package/src/input-group.tsx +38 -24
  71. package/src/option-chain.tsx +154 -104
  72. package/src/option-position.tsx +143 -114
  73. package/src/pin-input.tsx +37 -29
  74. package/src/pnl-diagram.tsx +36 -28
  75. package/src/progress-circle.tsx +52 -28
  76. package/src/progress.tsx +17 -21
  77. package/src/radio.tsx +56 -76
  78. package/src/rating.tsx +22 -20
  79. package/src/slider.tsx +43 -45
  80. package/src/strategy-builder.tsx +260 -162
  81. package/src/switch.tsx +63 -64
  82. package/src/tag.tsx +89 -51
  83. package/src/tooltip.tsx +21 -13
  84. package/tokens.css +18 -0
package/dist/index.cjs CHANGED
@@ -563,23 +563,19 @@ var CloseButtonFrame = gui.styled(gui.View, {
563
563
  }
564
564
  }
565
565
  });
566
- var CLOSE_BUTTON_CLASSES = [
567
- "text-[var(--closeButton-fg,currentColor)]",
568
- "hover:text-[var(--hover-color,currentColor)]",
569
- "disabled:opacity-40"
570
- ].join(" ");
571
566
  var CloseButton = React32__namespace.forwardRef(function CloseButton2(props, ref) {
572
567
  const { variant: _variant, size: _size, className, children, ...rest } = props;
573
568
  return /* @__PURE__ */ jsxRuntime.jsx(
574
569
  CloseButtonFrame,
575
570
  {
576
571
  ref,
577
- className: [CLOSE_BUTTON_CLASSES, className].filter(Boolean).join(" "),
572
+ className,
578
573
  ...rest,
579
574
  children: children ?? /* @__PURE__ */ jsxRuntime.jsx(
580
575
  "svg",
581
576
  {
582
- className: "size-5",
577
+ width: 20,
578
+ height: 20,
583
579
  viewBox: "0 0 20 20",
584
580
  fill: "none",
585
581
  "aria-hidden": "true",
@@ -1477,22 +1473,30 @@ function LoadingBar({ loading = true }) {
1477
1473
  if (!loading) return null;
1478
1474
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "lux-loading", role: "progressbar", "aria-busy": "true", "aria-label": "Loading" });
1479
1475
  }
1480
- var IndicatorIcon2 = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 10a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0v-3z" }) });
1481
- var ALERT_BASE = "w-full flex items-start relative rounded text-[var(--color-alert-fg)]";
1482
- var STATUS_CLASSES = {
1483
- info: "bg-[var(--color-alert-bg-info)]",
1484
- warning: "bg-[var(--color-alert-bg-warning)]",
1485
- warning_table: "bg-[var(--color-alert-bg-warning-table)]",
1486
- success: "bg-[var(--color-alert-bg-success)]",
1487
- error: "bg-[var(--color-alert-bg-error)]"
1476
+ var IndicatorIcon2 = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-11.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zM9.25 10a.75.75 0 011.5 0v3a.75.75 0 01-1.5 0v-3z" }) });
1477
+ var ALERT_BASE = {
1478
+ width: "100%",
1479
+ position: "relative",
1480
+ alignItems: "flex-start",
1481
+ borderRadius: 4,
1482
+ gap: 8,
1483
+ paddingVertical: 8
1488
1484
  };
1489
- var SIZE_CLASSES = {
1490
- sm: "gap-2 px-2 py-2 text-xs",
1491
- md: "gap-2 px-3 py-2 text-base"
1485
+ var ALERT_FG = "var(--color-alert-fg)";
1486
+ var STATUS_BG = {
1487
+ info: "var(--color-alert-bg-info)",
1488
+ warning: "var(--color-alert-bg-warning)",
1489
+ warning_table: "var(--color-alert-bg-warning-table)",
1490
+ success: "var(--color-alert-bg-success)",
1491
+ error: "var(--color-alert-bg-error)"
1492
+ };
1493
+ var SIZE = {
1494
+ sm: { paddingHorizontal: 8, fontSize: 12 },
1495
+ md: { paddingHorizontal: 12, fontSize: 16 }
1492
1496
  };
1493
- var INDICATOR_SIZE_CLASSES = {
1494
- sm: "w-5 h-5 my-0",
1495
- md: "w-5 h-5 my-[2px]"
1497
+ var INDICATOR_SIZE = {
1498
+ sm: { marginVertical: 0 },
1499
+ md: { marginVertical: 2 }
1496
1500
  };
1497
1501
  var Alert = React32__namespace.forwardRef(
1498
1502
  function Alert2(props, ref) {
@@ -1521,7 +1525,8 @@ var Alert = React32__namespace.forwardRef(
1521
1525
  const alertStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
1522
1526
  const [isOpen, setIsOpen] = React32__namespace.useState(true);
1523
1527
  const resolvedSize = size ?? "md";
1524
- const defaultIcon = /* @__PURE__ */ jsxRuntime.jsx(IndicatorIcon2, { className: "w-5 h-5" });
1528
+ const fontSize = SIZE[resolvedSize].fontSize;
1529
+ const defaultIcon = /* @__PURE__ */ jsxRuntime.jsx(IndicatorIcon2, {});
1525
1530
  const iconElement = (() => {
1526
1531
  if (startElement !== void 0) {
1527
1532
  return startElement;
@@ -1529,10 +1534,20 @@ var Alert = React32__namespace.forwardRef(
1529
1534
  if (!showIcon && icon === void 0) {
1530
1535
  return null;
1531
1536
  }
1532
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
1533
- "inline-flex items-center justify-center shrink-0 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full",
1534
- INDICATOR_SIZE_CLASSES[resolvedSize]
1535
- ), children: icon || defaultIcon });
1537
+ return /* @__PURE__ */ jsxRuntime.jsx(
1538
+ gui.XStack,
1539
+ {
1540
+ alignItems: "center",
1541
+ justifyContent: "center",
1542
+ flexShrink: 0,
1543
+ width: 20,
1544
+ height: 20,
1545
+ ...INDICATOR_SIZE[resolvedSize],
1546
+ className: "lux-icon",
1547
+ style: { color: ALERT_FG },
1548
+ children: icon || defaultIcon
1549
+ }
1550
+ );
1536
1551
  })();
1537
1552
  const handleClose = React32__namespace.useCallback(() => {
1538
1553
  setIsOpen(false);
@@ -1561,52 +1576,57 @@ var Alert = React32__namespace.forwardRef(
1561
1576
  ...descRowGap !== void 0 ? { rowGap: typeof descRowGap === "number" ? `${descRowGap * 4}px` : descRowGap } : {},
1562
1577
  ...descColumnGap !== void 0 ? { columnGap: typeof descColumnGap === "number" ? `${descColumnGap * 4}px` : descColumnGap } : {}
1563
1578
  };
1579
+ const ContentFrame = inline ? gui.XStack : gui.YStack;
1564
1580
  return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { loading, children: /* @__PURE__ */ jsxRuntime.jsxs(
1565
- "div",
1581
+ gui.XStack,
1566
1582
  {
1567
1583
  ref,
1568
- className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
1584
+ ...ALERT_BASE,
1585
+ paddingHorizontal: SIZE[resolvedSize].paddingHorizontal,
1586
+ backgroundColor: STATUS_BG[status],
1587
+ className,
1569
1588
  style: alertStyle,
1570
1589
  ...alertRest,
1571
1590
  children: [
1572
1591
  iconElement,
1573
- children ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-1", inline ? "inline-flex flex-row items-center" : "flex flex-col"), children: [
1574
- title && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold", children: title }),
1592
+ children ? /* @__PURE__ */ jsxRuntime.jsxs(ContentFrame, { flex: 1, alignItems: inline ? "center" : void 0, children: [
1593
+ title && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontWeight: "600", fontSize, color: ALERT_FG, children: title }),
1575
1594
  /* @__PURE__ */ jsxRuntime.jsx(
1576
- "div",
1595
+ gui.XStack,
1577
1596
  {
1578
- className: cn("inline-flex flex-wrap", descClassName),
1597
+ flexWrap: "wrap",
1598
+ className: descClassName,
1579
1599
  style: Object.keys(descStyle).length > 0 ? descStyle : void 0,
1580
1600
  ...descRest,
1581
- children
1601
+ children: ink(children, void 0, { fontSize, color: ALERT_FG })
1582
1602
  }
1583
1603
  )
1584
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-semibold flex-1", children: title }),
1604
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { flex: 1, fontWeight: "600", fontSize, color: ALERT_FG, children: title }),
1585
1605
  endElement,
1586
- closable && /* @__PURE__ */ jsxRuntime.jsx(
1587
- CloseButton,
1588
- {
1589
- className: "relative self-start",
1590
- onClick: handleClose
1591
- }
1592
- )
1606
+ closable && /* @__PURE__ */ jsxRuntime.jsx(gui.View, { position: "relative", alignSelf: "flex-start", children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: handleClose }) })
1593
1607
  ]
1594
1608
  }
1595
1609
  ) });
1596
1610
  }
1597
1611
  );
1598
- var SIZE_CLASSES2 = {
1599
- xs: "h-6 w-6 text-[10px]",
1600
- sm: "h-8 w-8 text-xs",
1601
- md: "h-10 w-10 text-sm",
1602
- lg: "h-12 w-12 text-base",
1603
- xl: "h-16 w-16 text-lg",
1604
- "2xl": "h-20 w-20 text-xl"
1612
+ var SIZE2 = {
1613
+ xs: { width: 24, height: 24, fontSize: 10 },
1614
+ sm: { width: 32, height: 32, fontSize: 12 },
1615
+ md: { width: 40, height: 40, fontSize: 14 },
1616
+ lg: { width: 48, height: 48, fontSize: 16 },
1617
+ xl: { width: 64, height: 64, fontSize: 18 },
1618
+ "2xl": { width: 80, height: 80, fontSize: 20 }
1605
1619
  };
1606
- var VARIANT_CLASSES = {
1607
- solid: "bg-gray-500 text-white",
1608
- subtle: "bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-200",
1609
- outline: "border-2 border-gray-300 bg-transparent text-gray-700 dark:border-gray-600 dark:text-gray-200"
1620
+ var RING = "var(--color-bg-body)";
1621
+ var VARIANT = {
1622
+ solid: { backgroundColor: "var(--color-gray-500)", color: "var(--color-white)" },
1623
+ subtle: { backgroundColor: "var(--color-badge-gray-bg)", color: "var(--color-badge-gray-fg)" },
1624
+ outline: {
1625
+ borderWidth: 2,
1626
+ borderColor: "var(--color-input-border)",
1627
+ backgroundColor: "transparent",
1628
+ color: "var(--color-text-secondary)"
1629
+ }
1610
1630
  };
1611
1631
  var DEFAULT_SIZE = "md";
1612
1632
  var DEFAULT_VARIANT = "subtle";
@@ -1625,7 +1645,6 @@ var Avatar = React32__namespace.forwardRef(
1625
1645
  icon,
1626
1646
  fallback,
1627
1647
  children,
1628
- className,
1629
1648
  size: sizeProp,
1630
1649
  variant: variantProp,
1631
1650
  borderless,
@@ -1638,21 +1657,26 @@ var Avatar = React32__namespace.forwardRef(
1638
1657
  gui.Avatar,
1639
1658
  {
1640
1659
  ref,
1641
- unstyled: true,
1642
- className: cn(
1643
- "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle",
1644
- SIZE_CLASSES2[size],
1645
- VARIANT_CLASSES[variant],
1646
- !isBorderless && "ring-2 ring-white dark:ring-gray-900",
1647
- className
1648
- ),
1660
+ position: "relative",
1661
+ display: "inline-flex",
1662
+ flexShrink: 0,
1663
+ alignItems: "center",
1664
+ justifyContent: "center",
1665
+ overflow: "hidden",
1666
+ borderRadius: 9999,
1667
+ ...SIZE2[size],
1668
+ ...VARIANT[variant],
1669
+ boxShadow: isBorderless ? void 0 : `0 0 0 2px ${RING}`,
1649
1670
  ...rest,
1650
1671
  children: [
1651
1672
  /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { name, icon, children: fallback }),
1652
1673
  src != null && /* @__PURE__ */ jsxRuntime.jsx(
1653
1674
  gui.Avatar.Image,
1654
1675
  {
1655
- className: "h-full w-full rounded-[inherit] object-cover",
1676
+ width: "100%",
1677
+ height: "100%",
1678
+ borderRadius: 9999,
1679
+ objectFit: "cover",
1656
1680
  src,
1657
1681
  srcSet,
1658
1682
  loading,
@@ -1667,22 +1691,18 @@ var Avatar = React32__namespace.forwardRef(
1667
1691
  );
1668
1692
  var AvatarFallback = React32__namespace.forwardRef(
1669
1693
  function AvatarFallback2(props, ref) {
1670
- const { name, icon, children, className, ...rest } = props;
1671
- return /* @__PURE__ */ jsxRuntime.jsxs(
1694
+ const { name, icon, children, ...rest } = props;
1695
+ return /* @__PURE__ */ jsxRuntime.jsx(
1672
1696
  gui.Avatar.Fallback,
1673
1697
  {
1674
1698
  ref,
1675
- unstyled: true,
1676
- className: cn(
1677
- "flex h-full w-full items-center justify-center font-medium",
1678
- className
1679
- ),
1699
+ display: "flex",
1700
+ width: "100%",
1701
+ height: "100%",
1702
+ alignItems: "center",
1703
+ justifyContent: "center",
1680
1704
  ...rest,
1681
- children: [
1682
- children,
1683
- name != null && children == null && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: getInitials(name) }),
1684
- name == null && children == null && icon
1685
- ]
1705
+ children: ink(children ?? (name != null ? getInitials(name) : icon), void 0, { fontWeight: "500" })
1686
1706
  }
1687
1707
  );
1688
1708
  }
@@ -1695,19 +1715,12 @@ function getInitials(name) {
1695
1715
  }
1696
1716
  var AvatarGroup = React32__namespace.forwardRef(
1697
1717
  function AvatarGroup2(props, ref) {
1698
- const { size, variant, borderless, className, ...rest } = props;
1718
+ const { size, variant, borderless, children, ...rest } = props;
1699
1719
  const contextValue = React32__namespace.useMemo(
1700
1720
  () => ({ size, variant, borderless }),
1701
1721
  [size, variant, borderless]
1702
1722
  );
1703
- return /* @__PURE__ */ jsxRuntime.jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(
1704
- "div",
1705
- {
1706
- ref,
1707
- className: cn("flex -space-x-3", className),
1708
- ...rest
1709
- }
1710
- ) });
1723
+ return /* @__PURE__ */ jsxRuntime.jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ref, ...rest, children: React32__namespace.Children.map(children, (child, index) => index === 0 || !React32__namespace.isValidElement(child) ? child : React32__namespace.cloneElement(child, { marginLeft: -12 })) }) });
1711
1724
  }
1712
1725
  );
1713
1726
  function mapPlacement(p) {
@@ -1801,14 +1814,21 @@ var Tooltip = React32__namespace.forwardRef(
1801
1814
  {
1802
1815
  ref,
1803
1816
  unstyled: true,
1804
- className: cn(
1805
- "z-[9999] overflow-hidden rounded-lg px-3 py-2 text-sm",
1806
- "animate-in fade-in-0 zoom-in-95",
1807
- isPopover && "bg-[var(--color-popover-bg)] text-[var(--color-text-primary)]",
1808
- isPopover && "shadow-[var(--shadow-popover)] border border-[var(--color-border-divider)] max-w-sm",
1809
- !isPopover && "bg-[var(--color-tooltip-bg)] text-[var(--color-tooltip-fg)] max-w-xs",
1810
- contentProps?.className
1811
- ),
1817
+ zIndex: 9999,
1818
+ overflow: "hidden",
1819
+ borderRadius: 8,
1820
+ paddingHorizontal: 12,
1821
+ paddingVertical: 8,
1822
+ maxWidth: isPopover ? 384 : 320,
1823
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)",
1824
+ transition: "quick",
1825
+ enterStyle: { opacity: 0, scale: 0.95 },
1826
+ exitStyle: { opacity: 0, scale: 0.95 },
1827
+ ...isPopover ? {
1828
+ borderWidth: 1,
1829
+ borderColor: "var(--color-border-divider)",
1830
+ shadowColor: "var(--shadow-popover)"
1831
+ } : {},
1812
1832
  onClick: interactive ? handleContentClick : void 0,
1813
1833
  ...selected ? { "data-selected": true } : {},
1814
1834
  ...contentProps,
@@ -1817,12 +1837,13 @@ var Tooltip = React32__namespace.forwardRef(
1817
1837
  gui.Tooltip.Arrow,
1818
1838
  {
1819
1839
  unstyled: true,
1820
- className: cn(
1821
- isPopover ? "fill-[var(--color-popover-bg)]" : "fill-[var(--color-tooltip-bg)]"
1822
- )
1840
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)"
1823
1841
  }
1824
1842
  ),
1825
- content
1843
+ ink(content, void 0, {
1844
+ fontSize: 14,
1845
+ color: isPopover ? "var(--color-text-primary)" : "var(--color-tooltip-fg)"
1846
+ })
1826
1847
  ]
1827
1848
  }
1828
1849
  )
@@ -1834,35 +1855,39 @@ var Tooltip = React32__namespace.forwardRef(
1834
1855
  function TruncatedTextTooltip({ label, children }) {
1835
1856
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
1836
1857
  }
1837
- var BASE_CLASSES = "inline-flex items-center rounded-sm gap-1 font-medium w-fit max-w-full whitespace-nowrap select-text";
1838
- var SIZE_CLASSES3 = {
1839
- sm: "text-xs p-1 h-[18px] min-h-[18px]",
1840
- md: "text-sm px-1 py-0.5 min-h-6",
1841
- lg: "text-sm px-2 py-1 min-h-7 font-semibold"
1858
+ var SIZE3 = {
1859
+ sm: { padding: 4, height: 18, minHeight: 18 },
1860
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24 },
1861
+ lg: { paddingHorizontal: 8, paddingVertical: 4, minHeight: 28 }
1842
1862
  };
1843
- var COLOR_PALETTE_CLASSES = {
1844
- gray: "bg-badge-gray-bg text-badge-gray-fg",
1845
- green: "bg-badge-green-bg text-badge-green-fg",
1846
- red: "bg-badge-red-bg text-badge-red-fg",
1847
- purple: "bg-badge-purple-bg text-badge-purple-fg",
1848
- orange: "bg-badge-orange-bg text-badge-orange-fg",
1849
- blue: "bg-badge-blue-bg text-badge-blue-fg",
1850
- yellow: "bg-badge-yellow-bg text-badge-yellow-fg",
1851
- teal: "bg-badge-teal-bg text-badge-teal-fg",
1852
- cyan: "bg-badge-cyan-bg text-badge-cyan-fg",
1853
- pink: "bg-badge-pink-bg text-badge-pink-fg",
1854
- purple_alt: "bg-badge-purple-alt-bg text-badge-purple-alt-fg",
1855
- blue_alt: "bg-badge-blue-alt-bg text-badge-blue-alt-fg",
1856
- bright_gray: "bg-badge-bright-gray-bg text-badge-bright-gray-fg",
1857
- bright_green: "bg-badge-bright-green-bg text-badge-bright-green-fg",
1858
- bright_red: "bg-badge-bright-red-bg text-badge-bright-red-fg",
1859
- bright_blue: "bg-badge-bright-blue-bg text-badge-bright-blue-fg",
1860
- bright_yellow: "bg-badge-bright-yellow-bg text-badge-bright-yellow-fg",
1861
- bright_teal: "bg-badge-bright-teal-bg text-badge-bright-teal-fg",
1862
- bright_cyan: "bg-badge-bright-cyan-bg text-badge-bright-cyan-fg",
1863
- bright_orange: "bg-badge-bright-orange-bg text-badge-bright-orange-fg",
1864
- bright_purple: "bg-badge-bright-purple-bg text-badge-bright-purple-fg",
1865
- bright_pink: "bg-badge-bright-pink-bg text-badge-bright-pink-fg"
1863
+ var SIZE_TEXT = {
1864
+ sm: { fontSize: 12, fontWeight: "500" },
1865
+ md: { fontSize: 14, fontWeight: "500" },
1866
+ lg: { fontSize: 14, fontWeight: "600" }
1867
+ };
1868
+ var COLOR_PALETTE = {
1869
+ gray: { bg: "var(--color-badge-gray-bg)", fg: "var(--color-badge-gray-fg)" },
1870
+ green: { bg: "var(--color-badge-green-bg)", fg: "var(--color-badge-green-fg)" },
1871
+ red: { bg: "var(--color-badge-red-bg)", fg: "var(--color-badge-red-fg)" },
1872
+ purple: { bg: "var(--color-badge-purple-bg)", fg: "var(--color-badge-purple-fg)" },
1873
+ orange: { bg: "var(--color-badge-orange-bg)", fg: "var(--color-badge-orange-fg)" },
1874
+ blue: { bg: "var(--color-badge-blue-bg)", fg: "var(--color-badge-blue-fg)" },
1875
+ yellow: { bg: "var(--color-badge-yellow-bg)", fg: "var(--color-badge-yellow-fg)" },
1876
+ teal: { bg: "var(--color-badge-teal-bg)", fg: "var(--color-badge-teal-fg)" },
1877
+ cyan: { bg: "var(--color-badge-cyan-bg)", fg: "var(--color-badge-cyan-fg)" },
1878
+ pink: { bg: "var(--color-badge-pink-bg)", fg: "var(--color-badge-pink-fg)" },
1879
+ purple_alt: { bg: "var(--color-badge-purple-alt-bg)", fg: "var(--color-badge-purple-alt-fg)" },
1880
+ blue_alt: { bg: "var(--color-badge-blue-alt-bg)", fg: "var(--color-badge-blue-alt-fg)" },
1881
+ bright_gray: { bg: "var(--color-badge-bright-gray-bg)", fg: "var(--color-badge-bright-gray-fg)" },
1882
+ bright_green: { bg: "var(--color-badge-bright-green-bg)", fg: "var(--color-badge-bright-green-fg)" },
1883
+ bright_red: { bg: "var(--color-badge-bright-red-bg)", fg: "var(--color-badge-bright-red-fg)" },
1884
+ bright_blue: { bg: "var(--color-badge-bright-blue-bg)", fg: "var(--color-badge-bright-blue-fg)" },
1885
+ bright_yellow: { bg: "var(--color-badge-bright-yellow-bg)", fg: "var(--color-badge-bright-yellow-fg)" },
1886
+ bright_teal: { bg: "var(--color-badge-bright-teal-bg)", fg: "var(--color-badge-bright-teal-fg)" },
1887
+ bright_cyan: { bg: "var(--color-badge-bright-cyan-bg)", fg: "var(--color-badge-bright-cyan-fg)" },
1888
+ bright_orange: { bg: "var(--color-badge-bright-orange-bg)", fg: "var(--color-badge-bright-orange-fg)" },
1889
+ bright_purple: { bg: "var(--color-badge-bright-purple-bg)", fg: "var(--color-badge-bright-purple-fg)" },
1890
+ bright_pink: { bg: "var(--color-badge-bright-pink-bg)", fg: "var(--color-badge-bright-pink-fg)" }
1866
1891
  };
1867
1892
  var S2 = 4;
1868
1893
  var Badge = React32__namespace.default.forwardRef(
@@ -1897,18 +1922,31 @@ var Badge = React32__namespace.default.forwardRef(
1897
1922
  }
1898
1923
  if (_mr !== void 0) shimStyle.marginRight = typeof _mr === "number" ? `${_mr * S2}px` : _mr;
1899
1924
  const badgeStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
1900
- const child = children ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "overflow-hidden text-ellipsis", children }) : null;
1925
+ const palette = COLOR_PALETTE[colorPalette];
1926
+ const child = children ? (
1927
+ // `ellipsis` is gui Text's own built-in variant for single-line
1928
+ // truncation — it expands to the same overflow/text-overflow/
1929
+ // white-space/max-width rule Tailwind's `text-ellipsis` did, but
1930
+ // through the component's own variants (guaranteed to compile),
1931
+ // rather than naming each longhand as a separate style prop.
1932
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { ellipsis: true, ...SIZE_TEXT[size], color: palette.fg, children })
1933
+ ) : null;
1901
1934
  const childrenElement = truncated ? /* @__PURE__ */ jsxRuntime.jsx(TruncatedTextTooltip, { label: children, children: child }) : child;
1902
1935
  const badgeElement = /* @__PURE__ */ jsxRuntime.jsxs(
1903
- "span",
1936
+ gui.XStack,
1904
1937
  {
1905
1938
  ref,
1906
- className: cn(
1907
- BASE_CLASSES,
1908
- SIZE_CLASSES3[size],
1909
- COLOR_PALETTE_CLASSES[colorPalette],
1910
- className
1911
- ),
1939
+ render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1940
+ display: "inline-flex",
1941
+ alignItems: "center",
1942
+ alignSelf: "flex-start",
1943
+ borderRadius: 2,
1944
+ gap: 4,
1945
+ maxWidth: "100%",
1946
+ userSelect: "text",
1947
+ ...SIZE3[size],
1948
+ backgroundColor: palette.bg,
1949
+ className,
1912
1950
  style: badgeStyle,
1913
1951
  ...rest,
1914
1952
  children: [
@@ -1982,7 +2020,7 @@ var ButtonFrame = gui.styled(gui.View, {
1982
2020
  size: "md"
1983
2021
  }
1984
2022
  });
1985
- var VARIANT_CLASSES2 = {
2023
+ var VARIANT_CLASSES = {
1986
2024
  solid: [
1987
2025
  "bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
1988
2026
  "hover:bg-[var(--color-hover)]",
@@ -2082,7 +2120,7 @@ var VARIANT_CLASSES2 = {
2082
2120
  "data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
2083
2121
  ].join(" ")
2084
2122
  };
2085
- var BASE_CLASSES2 = "font-semibold whitespace-nowrap transition-colors duration-150";
2123
+ var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
2086
2124
  var SP = 4;
2087
2125
  function buildShimStyle(props) {
2088
2126
  const s = { ...props.style };
@@ -2183,8 +2221,8 @@ var Button = React32__namespace.forwardRef(
2183
2221
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
2184
2222
  loadingText != null && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: 8 }, children: loadingText })
2185
2223
  ] }) : children;
2186
- const variantClass = VARIANT_CLASSES2[variant] ?? VARIANT_CLASSES2.solid;
2187
- const combinedClassName = [BASE_CLASSES2, variantClass, className].filter(Boolean).join(" ");
2224
+ const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
2225
+ const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
2188
2226
  const button = /* @__PURE__ */ jsxRuntime.jsx(
2189
2227
  ButtonFrame,
2190
2228
  {
@@ -2205,7 +2243,7 @@ var Button = React32__namespace.forwardRef(
2205
2243
  return button;
2206
2244
  }
2207
2245
  );
2208
- var SIZE_CLASSES4 = {
2246
+ var SIZE_CLASSES = {
2209
2247
  "2xs": "px-2 h-5 min-w-5 text-xs rounded-sm gap-1",
2210
2248
  xs: "px-2 h-6 min-w-6 text-sm rounded-sm gap-1",
2211
2249
  sm: "px-3 h-8 min-w-8 text-sm rounded-md gap-1",
@@ -2214,7 +2252,7 @@ var SIZE_CLASSES4 = {
2214
2252
  function buttonVariants(opts) {
2215
2253
  const v = opts?.variant ?? "solid";
2216
2254
  const s = opts?.size ?? "md";
2217
- return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES4[s] ?? ""].filter(Boolean).join(" ");
2255
+ return [BASE_CLASSES, VARIANT_CLASSES[v] ?? "", SIZE_CLASSES[s] ?? ""].filter(Boolean).join(" ");
2218
2256
  }
2219
2257
  var ButtonGroup = React32__namespace.forwardRef(
2220
2258
  function ButtonGroup2(props, ref) {
@@ -2292,7 +2330,6 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2292
2330
  onValueChange,
2293
2331
  orientation = "vertical",
2294
2332
  name: _name,
2295
- className,
2296
2333
  ...rest
2297
2334
  } = props;
2298
2335
  const [uncontrolledValue, setUncontrolledValue] = React32__namespace.useState(defaultValue ?? []);
@@ -2315,15 +2352,13 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2315
2352
  }, [isControlled, controlledValue]);
2316
2353
  const ctx = React32__namespace.useMemo(() => ({ value, toggle }), [value, toggle]);
2317
2354
  return /* @__PURE__ */ jsxRuntime.jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
2318
- "div",
2355
+ gui.View,
2319
2356
  {
2320
2357
  ref,
2321
2358
  role: "group",
2322
- className: cn(
2323
- "flex",
2324
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-8",
2325
- className
2326
- ),
2359
+ display: "flex",
2360
+ flexDirection: orientation === "vertical" ? "column" : "row",
2361
+ gap: orientation === "vertical" ? 12 : 32,
2327
2362
  ...rest,
2328
2363
  children
2329
2364
  }
@@ -2331,46 +2366,22 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2331
2366
  }
2332
2367
  );
2333
2368
  var CheckboxGroup2 = CheckboxGroupBase;
2334
- var SIZE_CLASSES5 = {
2335
- sm: {
2336
- root: "gap-1.5",
2337
- control: "h-3.5 w-3.5 rounded-sm",
2338
- label: "text-xs",
2339
- icon: "h-3 w-3"
2340
- },
2341
- md: {
2342
- root: "gap-2",
2343
- control: "h-4 w-4 rounded",
2344
- label: "text-sm",
2345
- icon: "h-3.5 w-3.5"
2346
- }
2369
+ var SIZE4 = {
2370
+ sm: { rootGap: 6, control: 14, radius: 2, label: 12, icon: 12 },
2371
+ md: { rootGap: 8, control: 16, radius: 4, label: 14, icon: 14 }
2347
2372
  };
2348
- var CheckIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
2349
- "svg",
2373
+ var INK = "var(--color-text-primary)";
2374
+ var ON_INK = "var(--color-bg-body)";
2375
+ var RESTING_BORDER = "var(--color-input-border)";
2376
+ var OUTLINE = "var(--color-gray-500)";
2377
+ var CheckIcon = ({ size, color }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx(
2378
+ "path",
2350
2379
  {
2351
- className,
2352
- viewBox: "0 0 12 10",
2353
- fill: "none",
2354
- xmlns: "http://www.w3.org/2000/svg",
2355
- children: /* @__PURE__ */ jsxRuntime.jsx(
2356
- "path",
2357
- {
2358
- d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
2359
- fill: "currentColor"
2360
- }
2361
- )
2380
+ d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
2381
+ fill: color
2362
2382
  }
2363
- );
2364
- var IndeterminateIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
2365
- "svg",
2366
- {
2367
- className,
2368
- viewBox: "0 0 12 2",
2369
- fill: "none",
2370
- xmlns: "http://www.w3.org/2000/svg",
2371
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H12V2H0V0Z", fill: "currentColor" })
2372
- }
2373
- );
2383
+ ) });
2384
+ var IndeterminateIcon = ({ size, color }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: size, height: size, viewBox: "0 0 12 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M0 0H12V2H0V0Z", fill: color }) });
2374
2385
  var CheckboxBase = React32__namespace.forwardRef(
2375
2386
  function Checkbox(props, ref) {
2376
2387
  const {
@@ -2388,7 +2399,6 @@ var CheckboxBase = React32__namespace.forwardRef(
2388
2399
  size = "md",
2389
2400
  name,
2390
2401
  required,
2391
- className,
2392
2402
  ...rest
2393
2403
  } = props;
2394
2404
  const group = useCheckboxGroupContext();
@@ -2441,18 +2451,19 @@ var CheckboxBase = React32__namespace.forwardRef(
2441
2451
  },
2442
2452
  [readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
2443
2453
  );
2444
- const sizeClasses2 = SIZE_CLASSES5[size];
2454
+ const s = SIZE4[size];
2455
+ const isChecked = checkedState !== false;
2445
2456
  return /* @__PURE__ */ jsxRuntime.jsxs(
2446
- "label",
2457
+ gui.Label,
2447
2458
  {
2448
2459
  ref: rootRef,
2449
- className: cn(
2450
- "inline-flex items-center cursor-pointer select-none",
2451
- sizeClasses2.root,
2452
- disabled && "opacity-50 cursor-not-allowed",
2453
- readOnly && "cursor-default",
2454
- className
2455
- ),
2460
+ unstyled: true,
2461
+ flexDirection: "row",
2462
+ alignItems: "center",
2463
+ gap: s.rootGap,
2464
+ cursor: disabled ? "not-allowed" : readOnly ? "default" : "pointer",
2465
+ userSelect: "none",
2466
+ opacity: disabled ? 0.5 : 1,
2456
2467
  onChange,
2457
2468
  "data-disabled": disabled || void 0,
2458
2469
  "data-readonly": readOnly || void 0,
@@ -2468,26 +2479,25 @@ var CheckboxBase = React32__namespace.forwardRef(
2468
2479
  name,
2469
2480
  value,
2470
2481
  required,
2471
- className: cn(
2472
- "inline-flex items-center justify-center shrink-0",
2473
- "border-2 border-current/30",
2474
- "data-[state=checked]:bg-gray-800 data-[state=checked]:text-white",
2475
- "dark:data-[state=checked]:bg-white dark:data-[state=checked]:text-black",
2476
- "data-[state=indeterminate]:bg-gray-800 data-[state=indeterminate]:text-white",
2477
- "dark:data-[state=indeterminate]:bg-white dark:data-[state=indeterminate]:text-black",
2478
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
2479
- "transition-colors duration-150",
2480
- sizeClasses2.control
2481
- ),
2482
- children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(gui.Checkbox.Indicator, { className: cn("flex items-center justify-center", sizeClasses2.icon), children: checkedState === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, { className: sizeClasses2.icon }) : /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { className: sizeClasses2.icon }) })
2482
+ flexShrink: 0,
2483
+ alignItems: "center",
2484
+ justifyContent: "center",
2485
+ width: s.control,
2486
+ height: s.control,
2487
+ borderRadius: s.radius,
2488
+ borderWidth: 2,
2489
+ borderColor: isChecked ? INK : RESTING_BORDER,
2490
+ backgroundColor: isChecked ? INK : "transparent",
2491
+ transition: "quicker",
2492
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE, outlineOffset: 2 },
2493
+ children: icon ?? /* @__PURE__ */ jsxRuntime.jsx(gui.Checkbox.Indicator, { alignItems: "center", justifyContent: "center", width: s.icon, height: s.icon, children: checkedState === "indeterminate" ? /* @__PURE__ */ jsxRuntime.jsx(IndeterminateIcon, { size: s.icon, color: ON_INK }) : /* @__PURE__ */ jsxRuntime.jsx(CheckIcon, { size: s.icon, color: ON_INK }) })
2483
2494
  }
2484
2495
  ),
2485
- /* @__PURE__ */ jsxRuntime.jsx(
2496
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
2486
2497
  "input",
2487
2498
  {
2488
2499
  ref: setHiddenInputRef,
2489
2500
  type: "checkbox",
2490
- className: "sr-only",
2491
2501
  checked: checkedState === true,
2492
2502
  disabled,
2493
2503
  readOnly,
@@ -2498,8 +2508,8 @@ var CheckboxBase = React32__namespace.forwardRef(
2498
2508
  onChange: NOOP,
2499
2509
  ...inputProps
2500
2510
  }
2501
- ),
2502
- children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(sizeClasses2.label), children })
2511
+ ) }),
2512
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: s.label, children })
2503
2513
  ]
2504
2514
  }
2505
2515
  );
@@ -2518,7 +2528,7 @@ function stripUtmParams(url) {
2518
2528
  return url;
2519
2529
  }
2520
2530
  }
2521
- var VARIANT_CLASSES3 = {
2531
+ var VARIANT_CLASSES2 = {
2522
2532
  primary: cn(
2523
2533
  "text-[var(--color-link-primary)]",
2524
2534
  "hover:no-underline hover:text-[var(--color-link-primary-hover)]",
@@ -2558,7 +2568,7 @@ var VARIANT_CLASSES3 = {
2558
2568
  "data-[hover]:no-underline"
2559
2569
  )
2560
2570
  };
2561
- var BASE_CLASSES3 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2571
+ var BASE_CLASSES2 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2562
2572
  var LinkExternalIcon = ({ color }) => /* @__PURE__ */ jsxRuntime.jsx(
2563
2573
  ArrowIcon,
2564
2574
  {
@@ -2627,7 +2637,7 @@ var Link = React32__namespace.default.forwardRef(
2627
2637
  if (_minW !== void 0) shimStyle.minWidth = typeof _minW === "number" ? `${_minW * SPACING}px` : _minW;
2628
2638
  if (_justifyContent) shimStyle.justifyContent = _justifyContent;
2629
2639
  if (_position) shimStyle.position = _position;
2630
- const linkClasses = cn(BASE_CLASSES3, VARIANT_CLASSES3[variant], className);
2640
+ const linkClasses = cn(BASE_CLASSES2, VARIANT_CLASSES2[variant], className);
2631
2641
  const linkStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
2632
2642
  if (external) {
2633
2643
  const processedHref = typeof href === "string" ? stripUtmParams(href) : href;
@@ -2716,8 +2726,8 @@ var LinkOverlay = React32__namespace.default.forwardRef(
2716
2726
  ...rest
2717
2727
  } = props;
2718
2728
  const overlayClasses = cn(
2719
- BASE_CLASSES3,
2720
- VARIANT_CLASSES3[variant],
2729
+ BASE_CLASSES2,
2730
+ VARIANT_CLASSES2[variant],
2721
2731
  // Static positioning with a ::before pseudo-element that covers the LinkBox
2722
2732
  "static",
2723
2733
  'before:absolute before:inset-0 before:z-0 before:content-[""]',
@@ -3105,6 +3115,7 @@ function upperFirst(str) {
3105
3115
  return str.charAt(0).toUpperCase() + str.slice(1);
3106
3116
  }
3107
3117
  var ICONS = {};
3118
+ var MUTED = "var(--color-text-secondary)";
3108
3119
  var EmptyState = React32__namespace.forwardRef(
3109
3120
  function EmptyState2(props, ref) {
3110
3121
  const { title, description, term, type = "query", icon, children, className, ...rest } = props;
@@ -3142,17 +3153,20 @@ var EmptyState = React32__namespace.forwardRef(
3142
3153
  return icon;
3143
3154
  })();
3144
3155
  return /* @__PURE__ */ jsxRuntime.jsx(
3145
- "div",
3156
+ gui.XStack,
3146
3157
  {
3147
3158
  ref,
3148
- className: cn("flex items-center justify-center py-10", className),
3159
+ alignItems: "center",
3160
+ justifyContent: "center",
3161
+ paddingVertical: 40,
3162
+ className,
3149
3163
  ...rest,
3150
- children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-5", children: [
3151
- iconContent && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center", children: iconContent }),
3152
- descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
3153
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
3154
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary", children: descriptionContent })
3155
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
3164
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 20, children: [
3165
+ iconContent && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", justifyContent: "center", children: iconContent }),
3166
+ descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 8, children: [
3167
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3168
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, textAlign: "center", color: MUTED, children: descriptionContent })
3169
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3156
3170
  children
3157
3171
  ] })
3158
3172
  }
@@ -3166,10 +3180,10 @@ function getComponentDisplayName(type) {
3166
3180
  return void 0;
3167
3181
  }
3168
3182
  var ERROR = "var(--color-text-error)";
3169
- var MUTED = "var(--color-text-secondary)";
3183
+ var MUTED2 = "var(--color-text-secondary)";
3170
3184
  var Marks = ({ required, optionalText, errorText }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3171
3185
  required && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { color: ERROR, "aria-hidden": true, children: "*" }),
3172
- !required && optionalText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, color: MUTED, children: optionalText }),
3186
+ !required && optionalText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, color: MUTED2, children: optionalText }),
3173
3187
  errorText && /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 14, color: ERROR, children: [
3174
3188
  "-",
3175
3189
  space,
@@ -3220,7 +3234,7 @@ var Field = React32__namespace.forwardRef(
3220
3234
  ]
3221
3235
  }
3222
3236
  );
3223
- const helperTextElement = helperText ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 6, fontSize: 12, color: MUTED, children: helperText }) : null;
3237
+ const helperTextElement = helperText ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 6, fontSize: 12, color: MUTED2, children: helperText }) : null;
3224
3238
  const child2 = React32__namespace.Children.only(children);
3225
3239
  const isInputGroup = getComponentDisplayName(child2.type) === "InputGroup";
3226
3240
  if (isInputGroup) {
@@ -3258,7 +3272,7 @@ var Field = React32__namespace.forwardRef(
3258
3272
  }
3259
3273
  ),
3260
3274
  React32__namespace.cloneElement(child, { size }),
3261
- helperText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: MUTED, children: helperText }),
3275
+ helperText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: MUTED2, children: helperText }),
3262
3276
  errorText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: ERROR, children: errorText })
3263
3277
  ] });
3264
3278
  }
@@ -3312,7 +3326,7 @@ var IconButtonFrame = gui.styled(gui.View, {
3312
3326
  var HOVER = "var(--color-hover)";
3313
3327
  var SELECTED_BG = "var(--color-selected-control-bg)";
3314
3328
  var SELECTED_FG = "var(--color-selected-control-text)";
3315
- var VARIANT = {
3329
+ var VARIANT2 = {
3316
3330
  plain: {
3317
3331
  rest: { backgroundColor: "transparent", hoverStyle: { backgroundColor: "transparent" } }
3318
3332
  },
@@ -3387,7 +3401,7 @@ var IconButton = React32__namespace.forwardRef(
3387
3401
  style: styleProp,
3388
3402
  ...rest
3389
3403
  } = props;
3390
- const look = VARIANT[variant] ?? VARIANT.plain;
3404
+ const look = VARIANT2[variant] ?? VARIANT2.plain;
3391
3405
  const iconSize = size ? ICON_SIZE[size] : void 0;
3392
3406
  const button = /* @__PURE__ */ jsxRuntime.jsx(
3393
3407
  IconButtonFrame,
@@ -3634,14 +3648,14 @@ var Image = React32__namespace.default.forwardRef(
3634
3648
  ] });
3635
3649
  }
3636
3650
  );
3637
- var SIZE = {
3651
+ var SIZE5 = {
3638
3652
  xs: { height: 24, paddingHorizontal: 8, fontSize: 12, borderRadius: 4 },
3639
3653
  sm: { height: 32, paddingHorizontal: 12, fontSize: 14, borderRadius: 6 },
3640
3654
  md: { height: 40, paddingHorizontal: 16, fontSize: 16, borderRadius: 6 },
3641
3655
  lg: { height: 48, paddingHorizontal: 16, fontSize: 18, borderRadius: 8 },
3642
3656
  "2xl": { height: 56, paddingHorizontal: 16, fontSize: 20, borderRadius: 8 }
3643
3657
  };
3644
- var VARIANT2 = {
3658
+ var VARIANT3 = {
3645
3659
  outline: { borderWidth: 1, borderStyle: "solid" },
3646
3660
  filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
3647
3661
  unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
@@ -3672,8 +3686,8 @@ var Input = React32__namespace.default.forwardRef(
3672
3686
  unstyled: true,
3673
3687
  className: className ? `lux-control ${className}` : "lux-control",
3674
3688
  ...CONTROL,
3675
- ...SIZE[size],
3676
- ...VARIANT2[variant],
3689
+ ...SIZE5[size],
3690
+ ...VARIANT3[variant],
3677
3691
  ...rest,
3678
3692
  onChange: handleChange
3679
3693
  }
@@ -3749,22 +3763,30 @@ var InputGroup = React32__namespace.forwardRef(
3749
3763
  const { className: startClassName, ...startRest } = startElementProps ?? {};
3750
3764
  const { className: endClassName, ...endRest } = endElementProps ?? {};
3751
3765
  return /* @__PURE__ */ jsxRuntime.jsxs(
3752
- "div",
3766
+ gui.XStack,
3753
3767
  {
3754
3768
  ref: combinedRef,
3755
- className: cn("relative flex w-full items-center", className),
3769
+ position: "relative",
3770
+ width: "100%",
3771
+ alignItems: "center",
3772
+ className,
3756
3773
  ...rest,
3757
3774
  children: [
3758
3775
  startElement && /* @__PURE__ */ jsxRuntime.jsx(
3759
- "div",
3776
+ gui.XStack,
3760
3777
  {
3761
3778
  ref: startElementRef,
3762
- className: cn(
3763
- "pointer-events-none absolute inset-y-0 left-0 z-[1] flex items-center text-[var(--chakra-colors-input-element)]",
3764
- startClassName
3765
- ),
3779
+ position: "absolute",
3780
+ top: 0,
3781
+ bottom: 0,
3782
+ left: 0,
3783
+ zIndex: 1,
3784
+ alignItems: "center",
3785
+ pointerEvents: "none",
3786
+ style: { color: "var(--color-icon-secondary)" },
3787
+ className: startClassName,
3766
3788
  ...startRest,
3767
- children: startElement
3789
+ children: ink(startElement)
3768
3790
  }
3769
3791
  ),
3770
3792
  React32__namespace.Children.map(children, (child) => {
@@ -3783,15 +3805,20 @@ var InputGroup = React32__namespace.forwardRef(
3783
3805
  });
3784
3806
  }),
3785
3807
  endElement && /* @__PURE__ */ jsxRuntime.jsx(
3786
- "div",
3808
+ gui.XStack,
3787
3809
  {
3788
3810
  ref: endElementRef,
3789
- className: cn(
3790
- "pointer-events-none absolute inset-y-0 right-0 z-[1] flex items-center text-[var(--chakra-colors-input-element)]",
3791
- endClassName
3792
- ),
3811
+ position: "absolute",
3812
+ top: 0,
3813
+ bottom: 0,
3814
+ right: 0,
3815
+ zIndex: 1,
3816
+ alignItems: "center",
3817
+ pointerEvents: "none",
3818
+ style: { color: "var(--color-icon-secondary)" },
3819
+ className: endClassName,
3793
3820
  ...endRest,
3794
- children: endElement
3821
+ children: ink(endElement)
3795
3822
  }
3796
3823
  )
3797
3824
  ]
@@ -3800,20 +3827,26 @@ var InputGroup = React32__namespace.forwardRef(
3800
3827
  }
3801
3828
  );
3802
3829
  InputGroup.displayName = "InputGroup";
3803
- var INPUT_BASE = [
3804
- "w-10 h-10",
3805
- "text-center text-sm font-medium",
3806
- "border-2 rounded-md",
3807
- "outline-none appearance-none",
3808
- "bg-[var(--color-input-bg)] text-[var(--color-input-fg)]",
3809
- "border-[var(--color-input-border)]",
3810
- "placeholder:text-[var(--color-input-placeholder)]",
3811
- "hover:border-[var(--color-input-border-hover)]",
3812
- "focus:border-[var(--color-input-border-focus)] focus:shadow-md",
3813
- "disabled:opacity-40"
3814
- ].join(" ");
3815
- var INPUT_FILLED = "border-[var(--color-input-border)]";
3816
- var INPUT_INVALID = "border-[var(--color-border-error)] hover:border-[var(--color-border-error)]";
3830
+ var BOX = {
3831
+ width: 40,
3832
+ height: 40,
3833
+ textAlign: "center",
3834
+ fontSize: 14,
3835
+ fontWeight: 500,
3836
+ borderRadius: 6,
3837
+ borderWidth: 2,
3838
+ borderStyle: "solid",
3839
+ outlineWidth: 0,
3840
+ backgroundColor: "var(--color-input-bg)",
3841
+ color: "var(--color-input-fg)",
3842
+ borderColor: "var(--color-input-border)",
3843
+ hoverStyle: { borderColor: "var(--color-input-border-hover)" },
3844
+ focusStyle: {
3845
+ borderColor: "var(--color-input-border-focus)",
3846
+ boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
3847
+ },
3848
+ disabledStyle: { opacity: 0.4 }
3849
+ };
3817
3850
  var PinInput = React32__namespace.forwardRef(
3818
3851
  function PinInput2(props, ref) {
3819
3852
  const {
@@ -3905,8 +3938,8 @@ var PinInput = React32__namespace.forwardRef(
3905
3938
  const onKeyDownAtIndex = React32__namespace.useCallback((index) => (e) => {
3906
3939
  handleKeyDown(index, e);
3907
3940
  }, [handleKeyDown]);
3908
- const bgStyle = bgColor ? { backgroundColor: `var(--color-${bgColor.replace(/\./g, "-")})` } : void 0;
3909
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: rootRef, className: cn("inline-flex items-center", attached ? "gap-0" : "gap-2", className), children: [
3941
+ const boxBackground = bgColor ? `var(--color-${bgColor.replace(/\./g, "-")})` : BOX.backgroundColor;
3942
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { ref: rootRef, alignItems: "center", gap: attached ? 0 : 8, className, children: [
3910
3943
  /* @__PURE__ */ jsxRuntime.jsx(
3911
3944
  "input",
3912
3945
  {
@@ -3918,9 +3951,10 @@ var PinInput = React32__namespace.forwardRef(
3918
3951
  }
3919
3952
  ),
3920
3953
  Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
3921
- "input",
3954
+ gui.Input,
3922
3955
  {
3923
3956
  ref: setInputRef(index),
3957
+ unstyled: true,
3924
3958
  type: "text",
3925
3959
  inputMode: "numeric",
3926
3960
  autoComplete: otp ? "one-time-code" : "off",
@@ -3929,14 +3963,12 @@ var PinInput = React32__namespace.forwardRef(
3929
3963
  placeholder,
3930
3964
  disabled,
3931
3965
  "aria-invalid": invalid || void 0,
3966
+ "data-invalid": invalid || void 0,
3932
3967
  value: values[index] || "",
3933
- className: cn(
3934
- INPUT_BASE,
3935
- values[index] && INPUT_FILLED,
3936
- invalid && INPUT_INVALID,
3937
- attached && index > 0 && "-ml-0.5"
3938
- ),
3939
- style: bgStyle,
3968
+ className: "lux-control",
3969
+ ...BOX,
3970
+ backgroundColor: boxBackground,
3971
+ marginLeft: attached && index > 0 ? -2 : void 0,
3940
3972
  onInput: onInputAtIndex(index),
3941
3973
  onKeyDown: onKeyDownAtIndex(index),
3942
3974
  onPaste: handlePaste,
@@ -4182,11 +4214,11 @@ var PopoverDescription = React32__namespace.forwardRef(function PopoverDescripti
4182
4214
  }
4183
4215
  );
4184
4216
  });
4185
- var SIZE_CLASSES6 = {
4186
- sm: "h-1",
4187
- md: "h-2",
4188
- lg: "h-3",
4189
- xl: "h-4"
4217
+ var SIZE6 = {
4218
+ sm: 4,
4219
+ md: 8,
4220
+ lg: 12,
4221
+ xl: 16
4190
4222
  };
4191
4223
  function normalizeValue(value, min, max) {
4192
4224
  if (value == null) return 0;
@@ -4202,7 +4234,6 @@ var Progress = React32__namespace.forwardRef(
4202
4234
  size = "md",
4203
4235
  color,
4204
4236
  trackProps,
4205
- className,
4206
4237
  style,
4207
4238
  w,
4208
4239
  flex,
@@ -4221,6 +4252,7 @@ var Progress = React32__namespace.forwardRef(
4221
4252
  }
4222
4253
  };
4223
4254
  const rootStyle = {
4255
+ position: "relative",
4224
4256
  ...style,
4225
4257
  ...w !== void 0 && { width: w === "full" ? "100%" : w },
4226
4258
  ...flex !== void 0 && { flex }
@@ -4229,7 +4261,6 @@ var Progress = React32__namespace.forwardRef(
4229
4261
  "div",
4230
4262
  {
4231
4263
  ref,
4232
- className: cn("relative", className),
4233
4264
  style: rootStyle,
4234
4265
  ...rest,
4235
4266
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4238,22 +4269,21 @@ var Progress = React32__namespace.forwardRef(
4238
4269
  value: percent,
4239
4270
  max: 100,
4240
4271
  unstyled: true,
4241
- className: cn(
4242
- "w-full overflow-hidden rounded-full",
4243
- "bg-[var(--color-progress-track)]",
4244
- SIZE_CLASSES6[size],
4245
- trackProps?.className
4246
- ),
4272
+ className: trackProps?.className,
4273
+ width: "100%",
4274
+ overflow: "hidden",
4275
+ borderRadius: 9999,
4276
+ height: SIZE6[size],
4277
+ backgroundColor: "var(--color-progress-track)",
4247
4278
  style: trackStyle,
4248
4279
  children: /* @__PURE__ */ jsxRuntime.jsx(
4249
4280
  gui.Progress.Indicator,
4250
4281
  {
4251
4282
  unstyled: true,
4252
4283
  transition: "slow",
4253
- className: cn(
4254
- "h-full rounded-full",
4255
- !color && "bg-[var(--color-progress-indicator)]"
4256
- ),
4284
+ height: "100%",
4285
+ borderRadius: 9999,
4286
+ backgroundColor: color ? void 0 : "var(--color-progress-indicator)",
4257
4287
  style: {
4258
4288
  ...color && { backgroundColor: `var(--color-${color.replace(".", "-")}, ${color})` }
4259
4289
  }
@@ -4266,11 +4296,11 @@ var Progress = React32__namespace.forwardRef(
4266
4296
  }
4267
4297
  );
4268
4298
  var SIZE_MAP = {
4269
- xs: { size: 24, thickness: 4, textClass: "text-[10px]" },
4270
- sm: { size: 32, thickness: 5, textClass: "text-[10px]" },
4271
- md: { size: 40, thickness: 6, textClass: "text-xs" },
4272
- lg: { size: 48, thickness: 7, textClass: "text-sm" },
4273
- xl: { size: 64, thickness: 8, textClass: "text-sm" }
4299
+ xs: { size: 24, thickness: 4, fontSize: 10 },
4300
+ sm: { size: 32, thickness: 5, fontSize: 10 },
4301
+ md: { size: 40, thickness: 6, fontSize: 12 },
4302
+ lg: { size: 48, thickness: 7, fontSize: 14 },
4303
+ xl: { size: 64, thickness: 8, fontSize: 14 }
4274
4304
  };
4275
4305
  var Ctx = React32__namespace.createContext({
4276
4306
  value: 0,
@@ -4291,16 +4321,18 @@ var ProgressCircleRoot = React32__namespace.forwardRef(function ProgressCircleRo
4291
4321
  [value, size, colorPalette]
4292
4322
  );
4293
4323
  return /* @__PURE__ */ jsxRuntime.jsx(Ctx.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
4294
- "div",
4324
+ gui.View,
4295
4325
  {
4296
4326
  ref,
4297
4327
  role: "progressbar",
4298
4328
  "aria-valuenow": value ?? void 0,
4299
4329
  "aria-valuemin": 0,
4300
4330
  "aria-valuemax": 100,
4301
- className: cn("relative inline-flex text-sm", className),
4331
+ position: "relative",
4332
+ style: { display: "inline-flex", fontSize: 14 },
4333
+ className,
4302
4334
  ...rest,
4303
- children
4335
+ children: ink(children)
4304
4336
  }
4305
4337
  ) });
4306
4338
  });
@@ -4319,10 +4351,7 @@ var ProgressCircleRing = React32__namespace.forwardRef(function ProgressCircleRi
4319
4351
  width: size,
4320
4352
  height: size,
4321
4353
  viewBox: `0 0 ${size} ${size}`,
4322
- className: cn(
4323
- value === null && "animate-spin",
4324
- className
4325
- ),
4354
+ className: value === null ? cn("lux-spin", className) : className,
4326
4355
  ...rest,
4327
4356
  children: [
4328
4357
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4334,7 +4363,7 @@ var ProgressCircleRing = React32__namespace.forwardRef(function ProgressCircleRi
4334
4363
  fill: "transparent",
4335
4364
  strokeWidth: thickness,
4336
4365
  stroke: trackColor ?? "currentColor",
4337
- className: !trackColor ? "opacity-20" : void 0
4366
+ opacity: !trackColor ? 0.2 : void 0
4338
4367
  }
4339
4368
  ),
4340
4369
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -4364,49 +4393,42 @@ var ProgressCircleRing = React32__namespace.forwardRef(function ProgressCircleRi
4364
4393
  var ProgressCircleValueText = React32__namespace.forwardRef(function ProgressCircleValueText2(props, ref) {
4365
4394
  const { className, children, ...rest } = props;
4366
4395
  const { value, size: sizeKey } = React32__namespace.useContext(Ctx);
4367
- const { textClass } = SIZE_MAP[sizeKey];
4396
+ const { fontSize } = SIZE_MAP[sizeKey];
4368
4397
  return /* @__PURE__ */ jsxRuntime.jsx(
4369
- "div",
4398
+ gui.View,
4370
4399
  {
4371
4400
  ref,
4372
4401
  "aria-live": "polite",
4373
- className: cn(
4374
- "absolute inset-0 flex items-center justify-center",
4375
- "font-medium tracking-tight tabular-nums leading-none",
4376
- textClass,
4377
- className
4378
- ),
4402
+ position: "absolute",
4403
+ top: 0,
4404
+ left: 0,
4405
+ right: 0,
4406
+ bottom: 0,
4407
+ display: "flex",
4408
+ alignItems: "center",
4409
+ justifyContent: "center",
4410
+ style: {
4411
+ fontWeight: 500,
4412
+ fontSize,
4413
+ lineHeight: `${fontSize}px`,
4414
+ letterSpacing: fontSize * -0.025,
4415
+ fontVariantNumeric: "tabular-nums"
4416
+ },
4417
+ className,
4379
4418
  ...rest,
4380
- children: children ?? `${Math.round(value ?? 0)}%`
4419
+ children: ink(children ?? `${Math.round(value ?? 0)}%`)
4381
4420
  }
4382
4421
  );
4383
4422
  });
4384
- var SIZE_CLASSES7 = {
4385
- xs: {
4386
- root: "gap-1.5",
4387
- control: "h-3 w-3",
4388
- indicator: "h-1.5 w-1.5",
4389
- label: "text-xs"
4390
- },
4391
- sm: {
4392
- root: "gap-1.5",
4393
- control: "h-3.5 w-3.5",
4394
- indicator: "h-1.5 w-1.5",
4395
- label: "text-xs"
4396
- },
4397
- md: {
4398
- root: "gap-2",
4399
- control: "h-4 w-4",
4400
- indicator: "h-2 w-2",
4401
- label: "text-sm"
4402
- },
4403
- lg: {
4404
- root: "gap-2.5",
4405
- control: "h-5 w-5",
4406
- indicator: "h-2.5 w-2.5",
4407
- label: "text-base"
4408
- }
4423
+ var SIZE7 = {
4424
+ xs: { rootGap: 6, control: 12, indicator: 6, label: 12 },
4425
+ sm: { rootGap: 6, control: 14, indicator: 6, label: 12 },
4426
+ md: { rootGap: 8, control: 16, indicator: 8, label: 14 },
4427
+ lg: { rootGap: 10, control: 20, indicator: 10, label: 16 }
4409
4428
  };
4429
+ var INK2 = "var(--color-text-primary)";
4430
+ var RESTING_BORDER2 = "var(--color-input-border)";
4431
+ var OUTLINE2 = "var(--color-gray-500)";
4410
4432
  var RadioSizeContext = React32__namespace.createContext("md");
4411
4433
  var RadioGroupBase = React32__namespace.forwardRef(
4412
4434
  function RadioGroup(props, ref) {
@@ -4423,7 +4445,6 @@ var RadioGroupBase = React32__namespace.forwardRef(
4423
4445
  value,
4424
4446
  onValueChange,
4425
4447
  size = "md",
4426
- className,
4427
4448
  ...rest
4428
4449
  } = props;
4429
4450
  const handleValueChange = React32__namespace.useCallback(
@@ -4437,7 +4458,6 @@ var RadioGroupBase = React32__namespace.forwardRef(
4437
4458
  gui.RadioGroup,
4438
4459
  {
4439
4460
  ref,
4440
- unstyled: true,
4441
4461
  name,
4442
4462
  required,
4443
4463
  disabled: disabled || readOnly,
@@ -4445,11 +4465,9 @@ var RadioGroupBase = React32__namespace.forwardRef(
4445
4465
  defaultValue,
4446
4466
  value: value ?? void 0,
4447
4467
  onValueChange: handleValueChange,
4448
- className: cn(
4449
- "flex",
4450
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-6",
4451
- className
4452
- ),
4468
+ display: "flex",
4469
+ flexDirection: orientation === "vertical" ? "column" : "row",
4470
+ gap: orientation === "vertical" ? 12 : 24,
4453
4471
  ...rest,
4454
4472
  children
4455
4473
  }
@@ -4461,19 +4479,20 @@ var NOOP2 = () => {
4461
4479
  };
4462
4480
  var RadioBase = React32__namespace.forwardRef(
4463
4481
  function Radio(props, ref) {
4464
- const { children, inputProps, rootRef, value, disabled, className, ...rest } = props;
4482
+ const { children, inputProps, rootRef, value, disabled, ...rest } = props;
4465
4483
  const size = React32__namespace.useContext(RadioSizeContext);
4466
- const sizeClasses2 = SIZE_CLASSES7[size];
4484
+ const s = SIZE7[size];
4467
4485
  return /* @__PURE__ */ jsxRuntime.jsxs(
4468
- "label",
4486
+ gui.Label,
4469
4487
  {
4470
4488
  ref: rootRef,
4471
- className: cn(
4472
- "inline-flex items-center cursor-pointer select-none",
4473
- sizeClasses2.root,
4474
- disabled && "opacity-50 cursor-not-allowed",
4475
- className
4476
- ),
4489
+ unstyled: true,
4490
+ flexDirection: "row",
4491
+ alignItems: "center",
4492
+ gap: s.rootGap,
4493
+ cursor: disabled ? "not-allowed" : "pointer",
4494
+ userSelect: "none",
4495
+ opacity: disabled ? 0.5 : 1,
4477
4496
  "data-disabled": disabled || void 0,
4478
4497
  ...rest,
4479
4498
  children: [
@@ -4483,32 +4502,24 @@ var RadioBase = React32__namespace.forwardRef(
4483
4502
  unstyled: true,
4484
4503
  value,
4485
4504
  disabled,
4486
- className: cn(
4487
- "inline-flex items-center justify-center shrink-0 rounded-full",
4488
- "border-2 border-current/30",
4489
- "data-[state=checked]:border-gray-800 dark:border-white",
4490
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
4491
- "transition-colors duration-150",
4492
- sizeClasses2.control
4493
- ),
4494
- children: /* @__PURE__ */ jsxRuntime.jsx(
4495
- gui.RadioGroup.Indicator,
4496
- {
4497
- unstyled: true,
4498
- className: cn(
4499
- "block rounded-full bg-gray-800 dark:bg-white",
4500
- sizeClasses2.indicator
4501
- )
4502
- }
4503
- )
4505
+ flexShrink: 0,
4506
+ alignItems: "center",
4507
+ justifyContent: "center",
4508
+ width: s.control,
4509
+ height: s.control,
4510
+ borderRadius: 9999,
4511
+ borderWidth: 2,
4512
+ borderColor: RESTING_BORDER2,
4513
+ transition: "quicker",
4514
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE2, outlineOffset: 2 },
4515
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.RadioGroup.Indicator, { unstyled: true, borderRadius: 9999, width: s.indicator, height: s.indicator, backgroundColor: INK2 })
4504
4516
  }
4505
4517
  ),
4506
- /* @__PURE__ */ jsxRuntime.jsx(
4518
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
4507
4519
  "input",
4508
4520
  {
4509
4521
  ref,
4510
4522
  type: "radio",
4511
- className: "sr-only",
4512
4523
  value,
4513
4524
  disabled,
4514
4525
  tabIndex: -1,
@@ -4516,16 +4527,16 @@ var RadioBase = React32__namespace.forwardRef(
4516
4527
  onChange: NOOP2,
4517
4528
  ...inputProps
4518
4529
  }
4519
- ),
4520
- children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: sizeClasses2.label, children })
4530
+ ) }),
4531
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: s.label, children })
4521
4532
  ]
4522
4533
  }
4523
4534
  );
4524
4535
  }
4525
4536
  );
4526
4537
  var Radio2 = RadioBase;
4527
- var StarFilledIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
4528
- var StarOutlineIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z", strokeWidth: "1.5" }) });
4538
+ var StarFilledIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
4539
+ var StarOutlineIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z", strokeWidth: "1.5" }) });
4529
4540
  var Rating = React32__namespace.forwardRef(
4530
4541
  function Rating2(props, ref) {
4531
4542
  const { count = 5, label: labelProp, defaultValue = 0, onValueChange, readOnly, className, ...rest } = props;
@@ -4545,28 +4556,30 @@ var Rating = React32__namespace.forwardRef(
4545
4556
  const handleMouseLeave = React32__namespace.useCallback(() => {
4546
4557
  setHoveredIndex(-1);
4547
4558
  }, []);
4548
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("inline-flex items-center gap-1", className), ...rest, children: [
4549
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex items-center", onMouseLeave: handleMouseLeave, children: Array.from({ length: count }).map((_, index) => {
4559
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { ref, display: "inline-flex", alignItems: "center", gap: 4, className, ...rest, children: [
4560
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { display: "inline-flex", alignItems: "center", onMouseLeave: handleMouseLeave, children: Array.from({ length: count }).map((_, index) => {
4550
4561
  const filled = index < highlightedIndex;
4551
4562
  const starIndex = index + 1;
4552
4563
  return /* @__PURE__ */ jsxRuntime.jsx(
4553
- "button",
4564
+ gui.View,
4554
4565
  {
4555
- type: "button",
4566
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
4556
4567
  tabIndex: readOnly ? -1 : 0,
4557
4568
  "aria-label": `Rate ${starIndex} of ${count}`,
4558
- className: cn(
4559
- "inline-flex items-center justify-center w-5 h-5 text-current",
4560
- readOnly ? "cursor-default" : "cursor-pointer"
4561
- ),
4569
+ display: "inline-flex",
4570
+ alignItems: "center",
4571
+ justifyContent: "center",
4572
+ width: 20,
4573
+ height: 20,
4574
+ cursor: readOnly ? "default" : "pointer",
4562
4575
  onClick: handleClick(starIndex),
4563
4576
  onMouseEnter: handleMouseEnter(index),
4564
- children: filled ? /* @__PURE__ */ jsxRuntime.jsx(StarFilledIcon, { className: "w-5 h-5" }) : /* @__PURE__ */ jsxRuntime.jsx(StarOutlineIcon, { className: "w-5 h-5" })
4577
+ children: filled ? /* @__PURE__ */ jsxRuntime.jsx(StarFilledIcon, {}) : /* @__PURE__ */ jsxRuntime.jsx(StarOutlineIcon, {})
4565
4578
  },
4566
4579
  index
4567
4580
  );
4568
4581
  }) }),
4569
- label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm", children: label })
4582
+ label && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, children: label })
4570
4583
  ] });
4571
4584
  }
4572
4585
  );
@@ -5002,6 +5015,11 @@ var Separator = React32__namespace.default.forwardRef(
5002
5015
  );
5003
5016
  }
5004
5017
  );
5018
+ var MUTED3 = "var(--color-text-secondary)";
5019
+ var TRACK = "var(--color-border-divider)";
5020
+ var ACTIVE = "var(--color-link-primary)";
5021
+ var ACTIVE_HOVER = "var(--color-link-primary-hover)";
5022
+ var WHITE = "var(--color-white)";
5005
5023
  var Slider = React32__namespace.forwardRef(
5006
5024
  function Slider2(props, ref) {
5007
5025
  const {
@@ -5034,21 +5052,22 @@ var Slider = React32__namespace.forwardRef(
5034
5052
  const handleSlideEnd = React32__namespace.useCallback(() => {
5035
5053
  onValueCommit?.(latest.current);
5036
5054
  }, [onValueCommit]);
5037
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
5038
- label && !showValue && /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-text-secondary", children: label }),
5039
- label && showValue && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
5040
- /* @__PURE__ */ jsxRuntime.jsx("label", { className: "text-sm font-medium text-text-secondary", children: label }),
5041
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-text-secondary", children: (value ?? defaultValue ?? [])?.join(", ") })
5055
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { className, gap: 4, children: [
5056
+ label && !showValue && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5057
+ label && showValue && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", children: [
5058
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5059
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, color: MUTED3, children: (value ?? defaultValue ?? [])?.join(", ") })
5042
5060
  ] }),
5043
5061
  /* @__PURE__ */ jsxRuntime.jsxs(
5044
5062
  gui.Slider,
5045
5063
  {
5046
5064
  ref,
5047
- unstyled: true,
5048
- className: cn(
5049
- "relative flex w-full touch-none select-none items-center",
5050
- hasMarkLabel && "mb-6"
5051
- ),
5065
+ position: "relative",
5066
+ flexDirection: "row",
5067
+ width: "100%",
5068
+ userSelect: "none",
5069
+ alignItems: "center",
5070
+ marginBottom: hasMarkLabel ? 24 : 0,
5052
5071
  value,
5053
5072
  defaultValue,
5054
5073
  min,
@@ -5060,33 +5079,23 @@ var Slider = React32__namespace.forwardRef(
5060
5079
  onValueChange: handleValueChange,
5061
5080
  onSlideEnd: handleSlideEnd,
5062
5081
  children: [
5063
- /* @__PURE__ */ jsxRuntime.jsx(
5064
- gui.Slider.Track,
5065
- {
5066
- unstyled: true,
5067
- className: "relative grow h-1.5 rounded-full bg-border-divider",
5068
- children: /* @__PURE__ */ jsxRuntime.jsx(
5069
- gui.Slider.TrackActive,
5070
- {
5071
- unstyled: true,
5072
- className: "absolute h-full rounded-full bg-link-primary"
5073
- }
5074
- )
5075
- }
5076
- ),
5082
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Slider.Track, { unstyled: true, position: "relative", flexGrow: 1, height: 6, borderRadius: 9999, backgroundColor: TRACK, children: /* @__PURE__ */ jsxRuntime.jsx(gui.Slider.TrackActive, { unstyled: true, position: "absolute", height: "100%", borderRadius: 9999, backgroundColor: ACTIVE }) }),
5077
5083
  resolvedValue?.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
5078
5084
  gui.Slider.Thumb,
5079
5085
  {
5080
5086
  index,
5081
5087
  unstyled: true,
5082
- className: cn(
5083
- "block h-5 w-5",
5084
- "rounded-full border-2 border-link-primary bg-white",
5085
- "shadow-sm transition-colors",
5086
- "hover:border-link-primary-hover",
5087
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-link-primary focus-visible:ring-offset-2",
5088
- "disabled:pointer-events-none disabled:opacity-50"
5089
- )
5088
+ width: 20,
5089
+ height: 20,
5090
+ borderRadius: 9999,
5091
+ borderWidth: 2,
5092
+ borderColor: ACTIVE,
5093
+ backgroundColor: WHITE,
5094
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5095
+ transition: "quick",
5096
+ hoverStyle: { borderColor: ACTIVE_HOVER },
5097
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: ACTIVE, outlineOffset: 2 },
5098
+ disabledStyle: { pointerEvents: "none", opacity: 0.5 }
5090
5099
  },
5091
5100
  index
5092
5101
  ))
@@ -5101,41 +5110,25 @@ function SliderMarks(props) {
5101
5110
  const { marks, min, max } = props;
5102
5111
  if (!marks?.length) return null;
5103
5112
  const range = max - min;
5104
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-4", children: marks.map((mark, index) => {
5113
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.View, { position: "relative", width: "100%", height: 16, children: marks.map((mark, index) => {
5105
5114
  const percent = (mark.value - min) / range * 100;
5106
- return /* @__PURE__ */ jsxRuntime.jsxs(
5107
- "div",
5108
- {
5109
- className: "absolute flex flex-col items-center -translate-x-1/2",
5110
- style: { left: `${percent}%` },
5111
- children: [
5112
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-0.5 bg-border-divider" }),
5113
- mark.label != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mt-0.5 text-xs text-text-secondary whitespace-nowrap", children: mark.label })
5114
- ]
5115
- },
5116
- index
5117
- );
5115
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { position: "absolute", left: `${percent}%`, alignItems: "center", children: [
5116
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { width: 2, height: 6, backgroundColor: TRACK }),
5117
+ mark.label != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 2, fontSize: 12, color: MUTED3, children: mark.label })
5118
+ ] }, index);
5118
5119
  }) });
5119
5120
  }
5120
5121
  var NOOP3 = () => {
5121
5122
  };
5122
- var SIZE_CLASSES8 = {
5123
- sm: {
5124
- root: "h-4 w-7",
5125
- thumb: "h-3 w-3",
5126
- label: "text-xs"
5127
- },
5128
- md: {
5129
- root: "h-5 w-9",
5130
- thumb: "h-4 w-4",
5131
- label: "text-sm"
5132
- },
5133
- lg: {
5134
- root: "h-6 w-11",
5135
- thumb: "h-5 w-5",
5136
- label: "text-base"
5137
- }
5123
+ var SIZE8 = {
5124
+ sm: { width: 28, height: 16, thumb: 12, label: 12 },
5125
+ md: { width: 36, height: 20, thumb: 16, label: 14 },
5126
+ lg: { width: 44, height: 24, thumb: 20, label: 16 }
5138
5127
  };
5128
+ var TRACK_ON = "var(--color-text-primary)";
5129
+ var TRACK_OFF = "var(--color-switch-bg)";
5130
+ var OUTLINE3 = "var(--color-gray-500)";
5131
+ var WHITE2 = "var(--color-white)";
5139
5132
  var SwitchBase = React32__namespace.forwardRef(
5140
5133
  function Switch(props, ref) {
5141
5134
  const {
@@ -5152,7 +5145,6 @@ var SwitchBase = React32__namespace.forwardRef(
5152
5145
  disabled = false,
5153
5146
  size = "md",
5154
5147
  direction,
5155
- className,
5156
5148
  ...rest
5157
5149
  } = props;
5158
5150
  const [internalChecked, setInternalChecked] = React32__namespace.useState(defaultChecked ?? false);
@@ -5167,18 +5159,19 @@ var SwitchBase = React32__namespace.forwardRef(
5167
5159
  },
5168
5160
  [isControlled, onCheckedChange]
5169
5161
  );
5170
- const sizeClasses2 = SIZE_CLASSES8[size];
5162
+ const s = SIZE8[size];
5171
5163
  const isRtl = direction === "rtl";
5172
5164
  return /* @__PURE__ */ jsxRuntime.jsxs(
5173
- "label",
5165
+ gui.Label,
5174
5166
  {
5175
5167
  ref: rootRef,
5176
- className: cn(
5177
- "inline-flex items-center cursor-pointer select-none gap-2",
5178
- isRtl && "flex-row-reverse",
5179
- disabled && "opacity-50 cursor-not-allowed",
5180
- className
5181
- ),
5168
+ unstyled: true,
5169
+ flexDirection: isRtl ? "row-reverse" : "row",
5170
+ alignItems: "center",
5171
+ gap: 8,
5172
+ cursor: disabled ? "not-allowed" : "pointer",
5173
+ userSelect: "none",
5174
+ opacity: disabled ? 0.5 : 1,
5182
5175
  onChange,
5183
5176
  "data-disabled": disabled || void 0,
5184
5177
  ...rest,
@@ -5190,38 +5183,51 @@ var SwitchBase = React32__namespace.forwardRef(
5190
5183
  checked: checkedState,
5191
5184
  onCheckedChange: handleCheckedChange,
5192
5185
  disabled,
5193
- className: cn(
5194
- "relative inline-flex shrink-0 items-center rounded-full",
5195
- "bg-gray-300 dark:bg-gray-600",
5196
- "data-[state=checked]:bg-gray-800 dark:bg-white",
5197
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
5198
- "transition-colors duration-200",
5199
- sizeClasses2.root
5200
- ),
5186
+ position: "relative",
5187
+ flexShrink: 0,
5188
+ alignItems: "center",
5189
+ width: s.width,
5190
+ height: s.height,
5191
+ borderRadius: 9999,
5192
+ backgroundColor: checkedState ? TRACK_ON : TRACK_OFF,
5193
+ transition: "quick",
5194
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE3, outlineOffset: 2 },
5201
5195
  children: [
5202
- trackLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 flex items-center justify-center text-[8px] font-bold text-white pointer-events-none", children: checkedState ? trackLabel.on : trackLabel.off }),
5196
+ trackLabel && /* @__PURE__ */ jsxRuntime.jsx(
5197
+ gui.Text,
5198
+ {
5199
+ position: "absolute",
5200
+ width: "100%",
5201
+ textAlign: "center",
5202
+ fontSize: 8,
5203
+ fontWeight: "700",
5204
+ color: WHITE2,
5205
+ pointerEvents: "none",
5206
+ children: checkedState ? trackLabel.on : trackLabel.off
5207
+ }
5208
+ ),
5203
5209
  /* @__PURE__ */ jsxRuntime.jsx(
5204
5210
  gui.Switch.Thumb,
5205
5211
  {
5206
5212
  unstyled: true,
5207
5213
  "data-thumb": true,
5208
5214
  transition: "quicker",
5209
- className: cn(
5210
- "block rounded-full bg-white shadow-sm",
5211
- sizeClasses2.thumb
5212
- ),
5213
- children: thumbLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center h-full w-full text-[8px]", children: checkedState ? thumbLabel.on : thumbLabel.off })
5215
+ width: s.thumb,
5216
+ height: s.thumb,
5217
+ borderRadius: 9999,
5218
+ backgroundColor: WHITE2,
5219
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5220
+ children: thumbLabel && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { width: "100%", height: "100%", textAlign: "center", fontSize: 8, children: checkedState ? thumbLabel.on : thumbLabel.off })
5214
5221
  }
5215
5222
  )
5216
5223
  ]
5217
5224
  }
5218
5225
  ),
5219
- /* @__PURE__ */ jsxRuntime.jsx(
5226
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
5220
5227
  "input",
5221
5228
  {
5222
5229
  ref,
5223
5230
  type: "checkbox",
5224
- className: "sr-only",
5225
5231
  checked: checkedState,
5226
5232
  disabled,
5227
5233
  tabIndex: -1,
@@ -5229,15 +5235,8 @@ var SwitchBase = React32__namespace.forwardRef(
5229
5235
  onChange: NOOP3,
5230
5236
  ...inputProps
5231
5237
  }
5232
- ),
5233
- children != null && /* @__PURE__ */ jsxRuntime.jsx(
5234
- "span",
5235
- {
5236
- ...labelProps,
5237
- className: cn(sizeClasses2.label, labelProps?.className),
5238
- children
5239
- }
5240
- )
5238
+ ) }),
5239
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { ...labelProps, fontSize: s.label, children })
5241
5240
  ]
5242
5241
  }
5243
5242
  );
@@ -5655,14 +5654,14 @@ var Shape = React32__namespace.createContext({
5655
5654
  size: "md",
5656
5655
  fitted: false
5657
5656
  });
5658
- var SIZE2 = {
5657
+ var SIZE9 = {
5659
5658
  sm: { height: 32, minWidth: 32, paddingVertical: 4, paddingHorizontal: 12, fontSize: 14 },
5660
5659
  md: { height: 40, minWidth: 40, paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },
5661
5660
  free: {}
5662
5661
  };
5663
5662
  var SELECTED_BG2 = "var(--color-selected-control-bg)";
5664
5663
  var SELECTED_FG2 = "var(--color-selected-control-text)";
5665
- var VARIANT3 = {
5664
+ var VARIANT4 = {
5666
5665
  solid: {
5667
5666
  rest: {
5668
5667
  fontWeight: "600",
@@ -5731,7 +5730,7 @@ var TabsList = (props) => {
5731
5730
  };
5732
5731
  var TabsTrigger = ({ children, ...props }) => {
5733
5732
  const { variant, size, fitted } = React32__namespace.useContext(Shape);
5734
- const { rest, active } = VARIANT3[variant];
5733
+ const { rest, active } = VARIANT4[variant];
5735
5734
  const selected = gui.useTabsContext().value === props.value;
5736
5735
  return /* @__PURE__ */ jsxRuntime.jsx(
5737
5736
  gui.Tabs.Tab,
@@ -5744,7 +5743,7 @@ var TabsTrigger = ({ children, ...props }) => {
5744
5743
  cursor: "pointer",
5745
5744
  gap: 8,
5746
5745
  borderWidth: 0,
5747
- ...SIZE2[size],
5746
+ ...SIZE9[size],
5748
5747
  ...rest,
5749
5748
  ...selected ? active : null,
5750
5749
  ...fitted ? { flex: 1 } : null,
@@ -5763,25 +5762,24 @@ var nbsp = String.fromCharCode(160);
5763
5762
  function TruncatedTextTooltip2({ label, children }) {
5764
5763
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
5765
5764
  }
5766
- var TAG_BASE = "inline-flex items-center align-top max-w-full select-text rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500";
5767
- var TAG_VARIANT_CLASSES = {
5768
- subtle: "bg-[var(--color-tag-subtle-bg)] text-[var(--color-tag-subtle-fg)]",
5769
- clickable: "cursor-pointer bg-[var(--color-tag-clickable-bg)] text-[var(--color-tag-clickable-fg)] hover:opacity-76",
5770
- filter: "bg-[var(--color-tag-filter-bg)]",
5771
- select: "cursor-pointer bg-[var(--color-tag-select-bg)] text-[var(--color-tag-select-fg)] hover:text-[var(--color-hover)] hover:opacity-76"
5765
+ var TAG_VARIANT = {
5766
+ subtle: { backgroundColor: "var(--color-tag-subtle-bg)" },
5767
+ clickable: { backgroundColor: "var(--color-tag-clickable-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } },
5768
+ filter: { backgroundColor: "var(--color-tag-filter-bg)" },
5769
+ select: { backgroundColor: "var(--color-tag-select-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } }
5770
+ };
5771
+ var TAG_VARIANT_FG = {
5772
+ subtle: "var(--color-tag-subtle-fg)",
5773
+ clickable: "var(--color-tag-clickable-fg)",
5774
+ filter: void 0,
5775
+ select: "var(--color-tag-select-fg)"
5772
5776
  };
5773
- var TAG_SIZE_CLASSES = {
5774
- sm: "px-1 py-0.5 min-h-5 gap-1 text-xs",
5775
- md: "px-1 py-0.5 min-h-6 gap-1 text-sm",
5776
- lg: "px-1.5 py-1.5 min-h-8 min-w-8 gap-1 text-sm"
5777
+ var TAG_SIZE = {
5778
+ sm: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 20, gap: 4 },
5779
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24, gap: 4 },
5780
+ lg: { paddingHorizontal: 6, paddingVertical: 6, minHeight: 32, minWidth: 32, gap: 4 }
5777
5781
  };
5778
- var TAG_SELECTED_CLASSES = [
5779
- "bg-[var(--color-tag-select-selected-bg)]",
5780
- "text-[var(--color-tag-select-selected-fg)]",
5781
- "hover:text-[var(--color-tag-select-selected-fg)]",
5782
- "hover:opacity-76"
5783
- ].join(" ");
5784
- var TAG_DISABLED_CLASSES = "opacity-40 pointer-events-none cursor-not-allowed";
5782
+ var TAG_SIZE_FONT = { sm: 12, md: 14, lg: 14 };
5785
5783
  var Tag = React32__namespace.forwardRef(
5786
5784
  function Tag2(props, ref) {
5787
5785
  const {
@@ -5801,52 +5799,87 @@ var Tag = React32__namespace.forwardRef(
5801
5799
  className,
5802
5800
  ...rest
5803
5801
  } = props;
5804
- const labelElement = label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[var(--color-text-secondary)]", children: [
5802
+ const resolvedVariant = variant ?? "subtle";
5803
+ const resolvedSize = size ?? "md";
5804
+ const isSelected = Boolean(selected) && !loading;
5805
+ const backgroundColor = isSelected ? "var(--color-tag-select-selected-bg)" : TAG_VARIANT[resolvedVariant].backgroundColor;
5806
+ const color = isSelected ? "var(--color-tag-select-selected-fg)" : TAG_VARIANT_FG[resolvedVariant];
5807
+ const hoverStyle = isSelected ? { opacity: 0.76 } : TAG_VARIANT[resolvedVariant].hoverStyle;
5808
+ const textHoverColor = !isSelected && resolvedVariant === "select" ? "var(--color-hover)" : void 0;
5809
+ const labelElement = label ? /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: TAG_SIZE_FONT[resolvedSize], fontWeight: "500", color: "var(--color-text-secondary)", children: [
5805
5810
  label,
5806
5811
  ":",
5807
5812
  nbsp
5808
5813
  ] }) : null;
5809
- const labelSpan = /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "line-clamp-1 whitespace-nowrap text-ellipsis font-medium inline", children: [
5810
- labelElement,
5811
- children
5812
- ] });
5814
+ const labelSpan = (
5815
+ // `ellipsis` is Text's own built-in single-line-truncation variant —
5816
+ // the same rule Tailwind's `line-clamp-1`/`text-ellipsis` drew, through
5817
+ // the component's variants rather than three separate style props.
5818
+ /* @__PURE__ */ jsxRuntime.jsxs(
5819
+ gui.Text,
5820
+ {
5821
+ ellipsis: true,
5822
+ fontWeight: "500",
5823
+ fontSize: TAG_SIZE_FONT[resolvedSize],
5824
+ color,
5825
+ hoverStyle: textHoverColor ? { color: textHoverColor } : void 0,
5826
+ children: [
5827
+ labelElement,
5828
+ children
5829
+ ]
5830
+ }
5831
+ )
5832
+ );
5813
5833
  const contentElement = truncated ? /* @__PURE__ */ jsxRuntime.jsx(TruncatedTextTooltip2, { label: children, children: labelSpan }) : labelSpan;
5814
5834
  return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { loading, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
5815
- "span",
5835
+ gui.XStack,
5816
5836
  {
5817
5837
  ref,
5818
- className: cn(
5819
- TAG_BASE,
5820
- TAG_VARIANT_CLASSES[variant ?? "subtle"],
5821
- TAG_SIZE_CLASSES[size ?? "md"],
5822
- selected && !loading && TAG_SELECTED_CLASSES,
5823
- disabled && TAG_DISABLED_CLASSES,
5824
- className
5825
- ),
5826
- ...selected && !loading && { "data-selected": true },
5838
+ render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
5839
+ display: "inline-flex",
5840
+ alignItems: "center",
5841
+ verticalAlign: "top",
5842
+ maxWidth: "100%",
5843
+ userSelect: "text",
5844
+ ...TAG_SIZE[resolvedSize],
5845
+ backgroundColor,
5846
+ hoverStyle,
5847
+ focusVisibleStyle: {
5848
+ outlineWidth: 2,
5849
+ outlineOffset: 2,
5850
+ outlineColor: "var(--color-gray-500)",
5851
+ outlineStyle: "solid"
5852
+ },
5853
+ cursor: disabled ? "not-allowed" : TAG_VARIANT[resolvedVariant].cursor,
5854
+ ...disabled ? { opacity: 0.4, pointerEvents: "none" } : {},
5855
+ ...isSelected && { "data-selected": true },
5827
5856
  ...disabled && { "data-disabled": true },
5857
+ className,
5828
5858
  ...rest,
5829
5859
  children: [
5830
- startElement && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 inline-flex items-center justify-center empty:hidden", children: startElement }),
5860
+ startElement && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: startElement }),
5831
5861
  contentElement,
5832
- endElement && /* @__PURE__ */ jsxRuntime.jsx(
5833
- "span",
5834
- {
5835
- ...endElementProps,
5836
- className: cn(
5837
- "shrink-0 inline-flex items-center justify-center",
5838
- endElementProps?.className
5839
- ),
5840
- children: endElement
5841
- }
5842
- ),
5843
- closable && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 inline-flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose }) })
5862
+ endElement && (() => {
5863
+ const { className: endClassName, ...endElementRest } = endElementProps ?? {};
5864
+ return /* @__PURE__ */ jsxRuntime.jsx(
5865
+ gui.XStack,
5866
+ {
5867
+ ...endElementRest,
5868
+ flexShrink: 0,
5869
+ alignItems: "center",
5870
+ justifyContent: "center",
5871
+ className: endClassName,
5872
+ children: endElement
5873
+ }
5874
+ );
5875
+ })(),
5876
+ closable && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose }) })
5844
5877
  ]
5845
5878
  }
5846
5879
  ) });
5847
5880
  }
5848
5881
  );
5849
- var SIZE3 = {
5882
+ var SIZE10 = {
5850
5883
  xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, borderRadius: 4 },
5851
5884
  sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, borderRadius: 6 },
5852
5885
  md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: 16, borderRadius: 6 },
@@ -5869,8 +5902,8 @@ var Textarea = React32__namespace.default.forwardRef(
5869
5902
  unstyled: true,
5870
5903
  className: className ? `lux-control ${className}` : "lux-control",
5871
5904
  ...CONTROL,
5872
- ...SIZE3[size],
5873
- ...VARIANT2[variant],
5905
+ ...SIZE10[size],
5906
+ ...VARIANT3[variant],
5874
5907
  ...rest,
5875
5908
  onChange: handleChange
5876
5909
  }
@@ -5979,20 +6012,55 @@ function fmtPct(n) {
5979
6012
  if (n === void 0 || n === null) return "-";
5980
6013
  return `${(n * 100).toFixed(1)}%`;
5981
6014
  }
6015
+ var justify = (align) => align === "right" ? "flex-end" : align === "left" ? "flex-start" : "center";
5982
6016
  function QuoteCell({ value, highlight, align = "right", onClick, className }) {
5983
6017
  return /* @__PURE__ */ jsxRuntime.jsx(
5984
- "td",
6018
+ gui.View,
5985
6019
  {
5986
- className: cn(
5987
- "px-1.5 py-1 font-mono tabular-nums text-xs whitespace-nowrap",
5988
- align === "right" ? "text-right" : "text-left",
5989
- highlight && "text-zinc-100",
5990
- !highlight && "text-zinc-400",
5991
- onClick && "cursor-pointer hover:bg-zinc-700/50 transition-colors",
5992
- className
5993
- ),
6020
+ unstyled: true,
6021
+ render: /* @__PURE__ */ jsxRuntime.jsx("td", {}),
5994
6022
  onClick,
5995
- children: value
6023
+ paddingHorizontal: 6,
6024
+ paddingVertical: 4,
6025
+ cursor: onClick ? "pointer" : void 0,
6026
+ transition: "quick",
6027
+ hoverStyle: onClick ? { backgroundColor: "var(--color-popover-item-hover)" } : void 0,
6028
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6029
+ className,
6030
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6031
+ gui.Text,
6032
+ {
6033
+ fontSize: 12,
6034
+ style: { fontFamily: "monospace", whiteSpace: "nowrap" },
6035
+ fontVariant: ["tabular-nums"],
6036
+ color: highlight ? "var(--color-text-primary)" : "var(--color-text-secondary)",
6037
+ children: value
6038
+ }
6039
+ )
6040
+ }
6041
+ );
6042
+ }
6043
+ function HeadCell({ children, colSpan, align = "center", size = "column", color }) {
6044
+ return /* @__PURE__ */ jsxRuntime.jsx(
6045
+ gui.View,
6046
+ {
6047
+ unstyled: true,
6048
+ render: colSpan ? /* @__PURE__ */ jsxRuntime.jsx("th", { colSpan }) : /* @__PURE__ */ jsxRuntime.jsx("th", {}),
6049
+ paddingHorizontal: size === "group" ? 8 : 6,
6050
+ paddingVertical: size === "group" ? 6 : 4,
6051
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6052
+ children: children != null && /* @__PURE__ */ jsxRuntime.jsx(
6053
+ gui.Text,
6054
+ {
6055
+ fontSize: 10,
6056
+ fontWeight: size === "group" ? "600" : "500",
6057
+ textTransform: "uppercase",
6058
+ letterSpacing: 0.5,
6059
+ style: { whiteSpace: "nowrap" },
6060
+ color: color ?? "var(--color-text-secondary)",
6061
+ children
6062
+ }
6063
+ )
5996
6064
  }
5997
6065
  );
5998
6066
  }
@@ -6023,71 +6091,51 @@ var OptionChain = React32__namespace.forwardRef(
6023
6091
  [onSelectContract]
6024
6092
  );
6025
6093
  return /* @__PURE__ */ jsxRuntime.jsx(
6026
- "div",
6094
+ gui.View,
6027
6095
  {
6028
6096
  ref,
6029
- className: cn("w-full overflow-x-auto", className),
6097
+ unstyled: true,
6098
+ width: "100%",
6099
+ overflowX: "auto",
6100
+ className,
6030
6101
  ...rest,
6031
- children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full border-collapse text-xs", children: [
6032
- /* @__PURE__ */ jsxRuntime.jsxs("thead", { children: [
6033
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-zinc-800", children: [
6034
- /* @__PURE__ */ jsxRuntime.jsx(
6035
- "th",
6036
- {
6037
- colSpan: CALL_HEADERS.length,
6038
- className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-emerald-400",
6039
- children: "Calls"
6040
- }
6041
- ),
6042
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-zinc-500", children: "Strike" }),
6043
- /* @__PURE__ */ jsxRuntime.jsx(
6044
- "th",
6045
- {
6046
- colSpan: PUT_HEADERS.length,
6047
- className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-red-400",
6048
- children: "Puts"
6049
- }
6050
- )
6102
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("table", {}), width: "100%", style: { borderCollapse: "collapse" }, children: [
6103
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("thead", {}), children: [
6104
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-border-divider)", children: [
6105
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { colSpan: CALL_HEADERS.length, size: "group", color: "var(--color-status-good)", children: "Calls" }),
6106
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { size: "group", children: "Strike" }),
6107
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { colSpan: PUT_HEADERS.length, size: "group", color: "var(--color-status-bad)", children: "Puts" })
6051
6108
  ] }),
6052
- /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "border-b border-zinc-800/60", children: [
6053
- CALL_HEADERS.map((h) => /* @__PURE__ */ jsxRuntime.jsx(
6054
- "th",
6055
- {
6056
- className: "px-1.5 py-1 text-right text-[10px] font-medium uppercase tracking-wider text-zinc-500",
6057
- children: h
6058
- },
6059
- `call-${h}`
6060
- )),
6061
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "px-2 py-1 text-center text-[10px] font-medium uppercase tracking-wider text-zinc-500" }),
6109
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-popover-item-hover)", children: [
6110
+ CALL_HEADERS.map((h) => /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { align: "right", children: h }, `call-${h}`)),
6111
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, {}),
6062
6112
  PUT_HEADERS.map((h) => /* @__PURE__ */ jsxRuntime.jsx(
6063
- "th",
6113
+ HeadCell,
6064
6114
  {
6065
- className: cn(
6066
- "px-1.5 py-1 text-[10px] font-medium uppercase tracking-wider text-zinc-500",
6067
- h === "Bid" || h === "Ask" || h === "Last" ? "text-left" : "text-right"
6068
- ),
6115
+ align: h === "Bid" || h === "Ask" || h === "Last" ? "left" : "right",
6069
6116
  children: h
6070
6117
  },
6071
6118
  `put-${h}`
6072
6119
  ))
6073
6120
  ] })
6074
6121
  ] }),
6075
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: strikes.map((row) => {
6122
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tbody", {}), children: strikes.map((row) => {
6076
6123
  const isATM = Math.abs(row.strike - spotPrice) <= (strikes.length > 1 ? Math.abs((strikes[1]?.strike ?? 0) - (strikes[0]?.strike ?? 0)) / 2 : 0.5);
6077
6124
  const callITM = row.strike < spotPrice;
6078
6125
  const putITM = row.strike > spotPrice;
6079
6126
  const c = row.call;
6080
6127
  const p = row.put;
6128
+ const rowBg = isATM ? "var(--secondary)" : callITM ? "color-mix(in srgb, var(--color-status-good) 12%, transparent)" : putITM ? "color-mix(in srgb, var(--color-status-bad) 12%, transparent)" : "transparent";
6081
6129
  return /* @__PURE__ */ jsxRuntime.jsxs(
6082
- "tr",
6130
+ gui.View,
6083
6131
  {
6084
- className: cn(
6085
- "border-b border-zinc-800/30 transition-colors",
6086
- isATM && "bg-zinc-800/60",
6087
- !isATM && callITM && "bg-emerald-950/20",
6088
- !isATM && putITM && "bg-red-950/20",
6089
- !isATM && !callITM && !putITM && "hover:bg-zinc-800/30"
6090
- ),
6132
+ unstyled: true,
6133
+ render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}),
6134
+ borderBottomWidth: 1,
6135
+ borderColor: "color-mix(in srgb, var(--color-border-divider) 50%, transparent)",
6136
+ transition: "quick",
6137
+ backgroundColor: rowBg,
6138
+ hoverStyle: isATM || callITM || putITM ? void 0 : { backgroundColor: "var(--color-popover-item-hover)" },
6091
6139
  children: [
6092
6140
  /* @__PURE__ */ jsxRuntime.jsx(
6093
6141
  QuoteCell,
@@ -6111,13 +6159,24 @@ var OptionChain = React32__namespace.forwardRef(
6111
6159
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmtPct(c?.iv) }),
6112
6160
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmt(c?.delta, 3) }),
6113
6161
  /* @__PURE__ */ jsxRuntime.jsx(
6114
- "td",
6162
+ gui.View,
6115
6163
  {
6116
- className: cn(
6117
- "px-2 py-1 text-center font-mono tabular-nums text-xs font-semibold",
6118
- isATM ? "text-[var(--foreground)] bg-[var(--secondary)]" : "text-[var(--muted-foreground)]"
6119
- ),
6120
- children: fmt(row.strike)
6164
+ unstyled: true,
6165
+ render: /* @__PURE__ */ jsxRuntime.jsx("td", {}),
6166
+ paddingHorizontal: 8,
6167
+ paddingVertical: 4,
6168
+ style: { display: "flex", alignItems: "center", justifyContent: "center" },
6169
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6170
+ gui.Text,
6171
+ {
6172
+ fontSize: 12,
6173
+ fontWeight: "600",
6174
+ style: { fontFamily: "monospace" },
6175
+ fontVariant: ["tabular-nums"],
6176
+ color: isATM ? "var(--foreground)" : "var(--muted-foreground)",
6177
+ children: fmt(row.strike)
6178
+ }
6179
+ )
6121
6180
  }
6122
6181
  ),
6123
6182
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmt(p?.delta, 3), align: "right" }),
@@ -6154,40 +6213,54 @@ var OptionChain = React32__namespace.forwardRef(
6154
6213
  }
6155
6214
  );
6156
6215
  var GREEKS = [
6157
- { key: "delta", label: "Delta", symbol: "\u0394", color: "text-[var(--foreground)]", barColor: "bg-[var(--foreground)]", decimals: 4, maxMagnitude: 1 },
6158
- { key: "gamma", label: "Gamma", symbol: "\u0393", color: "text-[var(--chart-1)]", barColor: "bg-[var(--chart-1)]", decimals: 4, maxMagnitude: 0.1 },
6159
- { key: "theta", label: "Theta", symbol: "\u0398", color: "text-[var(--chart-4)]", barColor: "bg-[var(--chart-4)]", decimals: 4, maxMagnitude: 1 },
6160
- { key: "vega", label: "Vega", symbol: "\u03BD", color: "text-[var(--chart-2)]", barColor: "bg-[var(--chart-2)]", decimals: 4, maxMagnitude: 1 },
6161
- { key: "rho", label: "Rho", symbol: "\u03C1", color: "text-[var(--chart-3)]", barColor: "bg-[var(--chart-3)]", decimals: 4, maxMagnitude: 1 },
6162
- { key: "iv", label: "IV", symbol: "\u03C3", color: "text-[var(--chart-5)]", barColor: "bg-[var(--chart-5)]", decimals: 1, maxMagnitude: 100 }
6216
+ { key: "delta", label: "Delta", symbol: "\u0394", color: "var(--foreground)", barColor: "var(--foreground)", decimals: 4, maxMagnitude: 1 },
6217
+ { key: "gamma", label: "Gamma", symbol: "\u0393", color: "var(--chart-1)", barColor: "var(--chart-1)", decimals: 4, maxMagnitude: 0.1 },
6218
+ { key: "theta", label: "Theta", symbol: "\u0398", color: "var(--chart-4)", barColor: "var(--chart-4)", decimals: 4, maxMagnitude: 1 },
6219
+ { key: "vega", label: "Vega", symbol: "\u03BD", color: "var(--chart-2)", barColor: "var(--chart-2)", decimals: 4, maxMagnitude: 1 },
6220
+ { key: "rho", label: "Rho", symbol: "\u03C1", color: "var(--chart-3)", barColor: "var(--chart-3)", decimals: 4, maxMagnitude: 1 },
6221
+ { key: "iv", label: "IV", symbol: "\u03C3", color: "var(--chart-5)", barColor: "var(--chart-5)", decimals: 1, maxMagnitude: 100 }
6163
6222
  ];
6164
6223
  function GreekItem({ def, value, compact }) {
6165
6224
  const magnitude = Math.min(Math.abs(value) / def.maxMagnitude, 1);
6166
6225
  const displayValue = def.key === "iv" ? `${(value * 100).toFixed(def.decimals)}%` : value.toFixed(def.decimals);
6167
- return /* @__PURE__ */ jsxRuntime.jsxs(
6168
- "div",
6169
- {
6170
- className: cn(
6171
- "flex items-center gap-1.5",
6172
- compact ? "min-w-0" : "min-w-[100px]"
6173
- ),
6174
- children: [
6175
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] font-semibold shrink-0", def.color), children: def.symbol }),
6176
- !compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-zinc-500 shrink-0 w-[34px]", children: def.label }),
6177
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
6178
- "font-mono tabular-nums text-xs text-zinc-200 shrink-0",
6179
- value < 0 && "text-red-400"
6180
- ), children: displayValue }),
6181
- !compact && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-1 rounded-full bg-zinc-800 min-w-[24px] max-w-[48px] overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
6182
- "div",
6226
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, minWidth: compact ? 0 : 100, children: [
6227
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, fontWeight: "600", flexShrink: 0, color: def.color, children: def.symbol }),
6228
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, flexShrink: 0, width: 34, color: "var(--color-text-secondary)", children: def.label }),
6229
+ /* @__PURE__ */ jsxRuntime.jsx(
6230
+ gui.Text,
6231
+ {
6232
+ fontSize: 12,
6233
+ flexShrink: 0,
6234
+ style: { fontFamily: "monospace" },
6235
+ fontVariant: ["tabular-nums"],
6236
+ color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-primary)",
6237
+ children: displayValue
6238
+ }
6239
+ ),
6240
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(
6241
+ gui.View,
6242
+ {
6243
+ flex: 1,
6244
+ height: 4,
6245
+ borderRadius: 9999,
6246
+ minWidth: 24,
6247
+ maxWidth: 48,
6248
+ overflow: "hidden",
6249
+ backgroundColor: "var(--color-progress-track)",
6250
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6251
+ gui.View,
6183
6252
  {
6184
- className: cn("h-full rounded-full transition-all", def.barColor),
6185
- style: { width: `${magnitude * 100}%`, opacity: 0.7 }
6253
+ height: "100%",
6254
+ borderRadius: 9999,
6255
+ transition: "quick",
6256
+ width: `${magnitude * 100}%`,
6257
+ opacity: 0.7,
6258
+ backgroundColor: def.barColor
6186
6259
  }
6187
- ) })
6188
- ]
6189
- }
6190
- );
6260
+ )
6261
+ }
6262
+ )
6263
+ ] });
6191
6264
  }
6192
6265
  var GreeksDisplay = React32__namespace.forwardRef(
6193
6266
  function GreeksDisplay2(props, ref) {
@@ -6212,14 +6285,13 @@ var GreeksDisplay = React32__namespace.forwardRef(
6212
6285
  };
6213
6286
  const activeGreeks = GREEKS.filter((g) => values[g.key] !== void 0);
6214
6287
  return /* @__PURE__ */ jsxRuntime.jsx(
6215
- "div",
6288
+ gui.XStack,
6216
6289
  {
6217
6290
  ref,
6218
- className: cn(
6219
- "flex flex-wrap items-center",
6220
- compact ? "gap-3" : "gap-4",
6221
- className
6222
- ),
6291
+ flexWrap: "wrap",
6292
+ alignItems: "center",
6293
+ gap: compact ? 12 : 16,
6294
+ className,
6223
6295
  ...rest,
6224
6296
  children: activeGreeks.map((g) => /* @__PURE__ */ jsxRuntime.jsx(
6225
6297
  GreekItem,
@@ -6342,84 +6414,145 @@ var STRATEGY_PRESETS = [
6342
6414
  ]
6343
6415
  }
6344
6416
  ];
6417
+ var MONO = "monospace";
6418
+ var CONTROL_BOX = {
6419
+ backgroundColor: "var(--color-input-bg)",
6420
+ borderWidth: 1,
6421
+ borderColor: "var(--color-input-border)",
6422
+ outlineWidth: 0,
6423
+ focusStyle: { borderColor: "var(--color-input-border-focus)" }
6424
+ };
6425
+ var CONTROL_INK = { color: "var(--color-input-fg)" };
6345
6426
  function LegRow({ leg, index, strikes, expirations, removable, onChange, onRemove }) {
6346
6427
  const update2 = (patch) => {
6347
6428
  onChange(index, { ...leg, ...patch });
6348
6429
  };
6349
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 rounded-md bg-zinc-800/50 px-2 py-1.5", children: [
6350
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-mono text-zinc-500 w-4 shrink-0", children: index + 1 }),
6351
- /* @__PURE__ */ jsxRuntime.jsx(
6352
- "button",
6353
- {
6354
- type: "button",
6355
- className: cn(
6356
- "px-2 py-0.5 rounded text-xs font-semibold transition-colors",
6357
- leg.action === "buy" ? "bg-emerald-900/60 text-emerald-400" : "bg-red-900/60 text-red-400"
6430
+ return /* @__PURE__ */ jsxRuntime.jsxs(
6431
+ gui.XStack,
6432
+ {
6433
+ alignItems: "center",
6434
+ gap: 8,
6435
+ borderRadius: 6,
6436
+ backgroundColor: "var(--color-tag-subtle-bg)",
6437
+ paddingHorizontal: 8,
6438
+ paddingVertical: 6,
6439
+ children: [
6440
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, style: { fontFamily: MONO }, flexShrink: 0, width: 16, color: "var(--color-text-secondary)", children: index + 1 }),
6441
+ /* @__PURE__ */ jsxRuntime.jsx(
6442
+ gui.XStack,
6443
+ {
6444
+ unstyled: true,
6445
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
6446
+ onClick: () => update2({ action: leg.action === "buy" ? "sell" : "buy" }),
6447
+ paddingHorizontal: 8,
6448
+ paddingVertical: 2,
6449
+ borderRadius: 4,
6450
+ borderWidth: 0,
6451
+ cursor: "pointer",
6452
+ transition: "quick",
6453
+ backgroundColor: leg.action === "buy" ? "color-mix(in srgb, var(--color-status-good) 20%, transparent)" : "color-mix(in srgb, var(--color-status-bad) 20%, transparent)",
6454
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", color: leg.action === "buy" ? "var(--color-status-good)" : "var(--color-status-bad)", children: leg.action === "buy" ? "BUY" : "SELL" })
6455
+ }
6358
6456
  ),
6359
- onClick: () => update2({ action: leg.action === "buy" ? "sell" : "buy" }),
6360
- children: leg.action === "buy" ? "BUY" : "SELL"
6361
- }
6362
- ),
6363
- /* @__PURE__ */ jsxRuntime.jsx(
6364
- "button",
6365
- {
6366
- type: "button",
6367
- className: cn(
6368
- "px-2 py-0.5 rounded text-xs font-medium transition-colors",
6369
- // Call vs put is a rank difference, not a hue difference.
6370
- leg.type === "call" ? "bg-[var(--secondary)] text-[var(--foreground)]" : "bg-[var(--muted)] text-[var(--muted-foreground)]"
6457
+ /* @__PURE__ */ jsxRuntime.jsx(
6458
+ gui.XStack,
6459
+ {
6460
+ unstyled: true,
6461
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
6462
+ onClick: () => update2({ type: leg.type === "call" ? "put" : "call" }),
6463
+ paddingHorizontal: 8,
6464
+ paddingVertical: 2,
6465
+ borderRadius: 4,
6466
+ borderWidth: 0,
6467
+ cursor: "pointer",
6468
+ transition: "quick",
6469
+ backgroundColor: leg.type === "call" ? "var(--secondary)" : "var(--muted)",
6470
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "500", color: leg.type === "call" ? "var(--foreground)" : "var(--muted-foreground)", children: leg.type === "call" ? "CALL" : "PUT" })
6471
+ }
6371
6472
  ),
6372
- onClick: () => update2({ type: leg.type === "call" ? "put" : "call" }),
6373
- children: leg.type === "call" ? "CALL" : "PUT"
6374
- }
6375
- ),
6376
- /* @__PURE__ */ jsxRuntime.jsx(
6377
- "select",
6378
- {
6379
- value: leg.strike,
6380
- onChange: (e) => update2({ strike: Number(e.target.value) }),
6381
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs font-mono text-zinc-200 outline-none focus:border-zinc-500 min-w-[72px]",
6382
- children: strikes.map((s) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: s, children: s.toFixed(2) }, s))
6383
- }
6384
- ),
6385
- /* @__PURE__ */ jsxRuntime.jsx(
6386
- "select",
6387
- {
6388
- value: leg.expiration,
6389
- onChange: (e) => update2({ expiration: e.target.value }),
6390
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs text-zinc-200 outline-none focus:border-zinc-500 min-w-[80px]",
6391
- children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: exp, children: exp }, exp))
6392
- }
6393
- ),
6394
- /* @__PURE__ */ jsxRuntime.jsx(
6395
- "input",
6396
- {
6397
- type: "number",
6398
- min: 1,
6399
- max: 999,
6400
- value: leg.quantity,
6401
- onChange: (e) => update2({ quantity: Math.max(1, parseInt(e.target.value, 10) || 1) }),
6402
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs font-mono text-zinc-200 outline-none focus:border-zinc-500 w-[48px] text-center"
6403
- }
6404
- ),
6405
- leg.premium !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
6406
- "font-mono tabular-nums text-xs ml-auto",
6407
- leg.premium >= 0 ? "text-emerald-400" : "text-red-400"
6408
- ), children: [
6409
- leg.premium >= 0 ? "+" : "",
6410
- leg.premium.toFixed(2)
6411
- ] }),
6412
- removable && /* @__PURE__ */ jsxRuntime.jsx(
6413
- "button",
6414
- {
6415
- type: "button",
6416
- onClick: () => onRemove(index),
6417
- className: "ml-auto p-0.5 text-zinc-500 hover:text-red-400 transition-colors",
6418
- "aria-label": "Remove leg",
6419
- children: /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
6420
- }
6421
- )
6422
- ] });
6473
+ /* @__PURE__ */ jsxRuntime.jsx(
6474
+ gui.View,
6475
+ {
6476
+ unstyled: true,
6477
+ render: /* @__PURE__ */ jsxRuntime.jsx("select", { value: leg.strike, onChange: (e) => update2({ strike: Number(e.target.value) }) }),
6478
+ ...CONTROL_BOX,
6479
+ borderRadius: 4,
6480
+ paddingHorizontal: 6,
6481
+ paddingVertical: 2,
6482
+ minWidth: 72,
6483
+ style: { ...CONTROL_INK, fontFamily: MONO, fontSize: 12 },
6484
+ children: strikes.map((s) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: s, children: s.toFixed(2) }, s))
6485
+ }
6486
+ ),
6487
+ /* @__PURE__ */ jsxRuntime.jsx(
6488
+ gui.View,
6489
+ {
6490
+ unstyled: true,
6491
+ render: /* @__PURE__ */ jsxRuntime.jsx("select", { value: leg.expiration, onChange: (e) => update2({ expiration: e.target.value }) }),
6492
+ ...CONTROL_BOX,
6493
+ borderRadius: 4,
6494
+ paddingHorizontal: 6,
6495
+ paddingVertical: 2,
6496
+ minWidth: 80,
6497
+ style: { ...CONTROL_INK, fontSize: 12 },
6498
+ children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: exp, children: exp }, exp))
6499
+ }
6500
+ ),
6501
+ /* @__PURE__ */ jsxRuntime.jsx(
6502
+ gui.View,
6503
+ {
6504
+ unstyled: true,
6505
+ render: /* @__PURE__ */ jsxRuntime.jsx(
6506
+ "input",
6507
+ {
6508
+ type: "number",
6509
+ min: 1,
6510
+ max: 999,
6511
+ value: leg.quantity,
6512
+ onChange: (e) => update2({ quantity: Math.max(1, parseInt(e.target.value, 10) || 1) })
6513
+ }
6514
+ ),
6515
+ ...CONTROL_BOX,
6516
+ borderRadius: 4,
6517
+ paddingHorizontal: 6,
6518
+ paddingVertical: 2,
6519
+ width: 48,
6520
+ style: { ...CONTROL_INK, fontFamily: MONO, fontSize: 12, textAlign: "center" }
6521
+ }
6522
+ ),
6523
+ leg.premium !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(
6524
+ gui.Text,
6525
+ {
6526
+ fontSize: 12,
6527
+ style: { fontFamily: MONO },
6528
+ fontVariant: ["tabular-nums"],
6529
+ marginLeft: "auto",
6530
+ color: leg.premium >= 0 ? "var(--color-status-good)" : "var(--color-status-bad)",
6531
+ children: [
6532
+ leg.premium >= 0 ? "+" : "",
6533
+ leg.premium.toFixed(2)
6534
+ ]
6535
+ }
6536
+ ),
6537
+ removable && /* @__PURE__ */ jsxRuntime.jsx(
6538
+ gui.XStack,
6539
+ {
6540
+ unstyled: true,
6541
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", "aria-label": "Remove leg" }),
6542
+ onClick: () => onRemove(index),
6543
+ marginLeft: "auto",
6544
+ padding: 2,
6545
+ borderWidth: 0,
6546
+ cursor: "pointer",
6547
+ transition: "quick",
6548
+ style: { color: "var(--color-text-secondary)" },
6549
+ hoverStyle: { opacity: 0.7 },
6550
+ children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
6551
+ }
6552
+ )
6553
+ ]
6554
+ }
6555
+ );
6423
6556
  }
6424
6557
  var StrategyBuilder = React32__namespace.forwardRef(
6425
6558
  function StrategyBuilder2(props, ref) {
@@ -6489,37 +6622,46 @@ var StrategyBuilder = React32__namespace.forwardRef(
6489
6622
  });
6490
6623
  }, [onSubmit, strategyType, legs, netPremium]);
6491
6624
  const currentPreset = STRATEGY_PRESETS.find((p) => p.value === strategyType);
6625
+ const netColor = netPremium > 0 ? "var(--color-status-good)" : netPremium < 0 ? "var(--color-status-bad)" : "var(--color-text-secondary)";
6492
6626
  return /* @__PURE__ */ jsxRuntime.jsxs(
6493
- "div",
6627
+ gui.YStack,
6494
6628
  {
6495
6629
  ref,
6496
- className: cn(
6497
- "flex flex-col gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",
6498
- className
6499
- ),
6630
+ gap: 12,
6631
+ borderRadius: 8,
6632
+ borderWidth: 1,
6633
+ borderColor: "var(--color-border-divider)",
6634
+ backgroundColor: "var(--card)",
6635
+ padding: 12,
6636
+ className,
6500
6637
  ...rest,
6501
6638
  children: [
6502
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-3", children: [
6503
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6504
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold uppercase tracking-wider text-zinc-500", children: "Strategy" }),
6505
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-zinc-200", children: underlying })
6639
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", gap: 12, children: [
6640
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 8, children: [
6641
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", textTransform: "uppercase", letterSpacing: 0.6, color: "var(--color-text-secondary)", children: "Strategy" }),
6642
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, fontWeight: "500", color: "var(--color-text-primary)", children: underlying })
6506
6643
  ] }),
6507
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-zinc-500", children: [
6644
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6508
6645
  "Spot: ",
6509
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono tabular-nums text-zinc-300", children: spotPrice.toFixed(2) })
6646
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { style: { fontFamily: MONO }, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: spotPrice.toFixed(2) })
6510
6647
  ] })
6511
6648
  ] }),
6512
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx(
6513
- "select",
6649
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", gap: 8, children: /* @__PURE__ */ jsxRuntime.jsx(
6650
+ gui.View,
6514
6651
  {
6515
- value: strategyType,
6516
- onChange: handleStrategyChange,
6517
- className: "flex-1 bg-zinc-900 border border-zinc-700 rounded-md px-2.5 py-1.5 text-sm text-zinc-200 outline-none focus:border-zinc-500",
6652
+ unstyled: true,
6653
+ render: /* @__PURE__ */ jsxRuntime.jsx("select", { value: strategyType, onChange: handleStrategyChange }),
6654
+ flex: 1,
6655
+ ...CONTROL_BOX,
6656
+ borderRadius: 6,
6657
+ paddingHorizontal: 10,
6658
+ paddingVertical: 6,
6659
+ style: { ...CONTROL_INK, fontSize: 14 },
6518
6660
  children: STRATEGY_PRESETS.map((preset) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: preset.value, children: preset.label }, preset.value))
6519
6661
  }
6520
6662
  ) }),
6521
- currentPreset && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[11px] text-zinc-500 -mt-1", children: currentPreset.description }),
6522
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5", children: legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsx(
6663
+ currentPreset && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, marginTop: -4, color: "var(--color-text-secondary)", children: currentPreset.description }),
6664
+ /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { gap: 6, children: legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsx(
6523
6665
  LegRow,
6524
6666
  {
6525
6667
  leg,
@@ -6533,40 +6675,53 @@ var StrategyBuilder = React32__namespace.forwardRef(
6533
6675
  i
6534
6676
  )) }),
6535
6677
  strategyType === "custom" && legs.length < 4 && /* @__PURE__ */ jsxRuntime.jsxs(
6536
- "button",
6678
+ gui.XStack,
6537
6679
  {
6538
- type: "button",
6680
+ unstyled: true,
6681
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
6539
6682
  onClick: handleAddLeg,
6540
- className: "flex items-center justify-center gap-1 rounded-md border border-dashed border-zinc-700 py-1 text-xs text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",
6683
+ alignItems: "center",
6684
+ justifyContent: "center",
6685
+ gap: 4,
6686
+ borderRadius: 6,
6687
+ borderWidth: 1,
6688
+ paddingVertical: 4,
6689
+ cursor: "pointer",
6690
+ transition: "quick",
6691
+ borderColor: "var(--color-border-divider)",
6692
+ hoverStyle: { borderColor: "var(--color-hover)" },
6693
+ style: { color: "var(--color-text-secondary)", borderStyle: "dashed" },
6541
6694
  children: [
6542
- /* @__PURE__ */ jsxRuntime.jsx("svg", { className: "h-3 w-3", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }),
6543
- "Add Leg"
6695
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: 12, height: 12, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }),
6696
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "var(--color-text-secondary)", children: "Add Leg" })
6544
6697
  ]
6545
6698
  }
6546
6699
  ),
6547
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1 border-t border-zinc-800", children: [
6548
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
6549
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-zinc-500", children: "Net:" }),
6550
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
6551
- "font-mono tabular-nums text-sm font-semibold",
6552
- netPremium > 0 ? "text-emerald-400" : netPremium < 0 ? "text-red-400" : "text-zinc-400"
6553
- ), children: [
6700
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", paddingTop: 4, borderTopWidth: 1, borderColor: "var(--color-border-divider)", children: [
6701
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 8, children: [
6702
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: "var(--color-text-secondary)", children: "Net:" }),
6703
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 14, fontWeight: "600", style: { fontFamily: MONO }, fontVariant: ["tabular-nums"], color: netColor, children: [
6554
6704
  netPremium > 0 ? "Credit " : netPremium < 0 ? "Debit " : "",
6555
6705
  netPremium !== 0 ? `$${Math.abs(netPremium).toFixed(2)}` : "-"
6556
6706
  ] })
6557
6707
  ] }),
6558
6708
  /* @__PURE__ */ jsxRuntime.jsx(
6559
- "button",
6709
+ gui.XStack,
6560
6710
  {
6561
- type: "button",
6711
+ unstyled: true,
6712
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
6562
6713
  onClick: handleSubmit,
6563
6714
  disabled: legs.length === 0,
6564
- className: cn(
6565
- "px-4 py-1.5 rounded-md text-xs font-semibold transition-colors",
6566
- "bg-blue-600 text-white hover:bg-blue-500",
6567
- "disabled:opacity-40 disabled:cursor-not-allowed"
6568
- ),
6569
- children: "Review Order"
6715
+ paddingHorizontal: 16,
6716
+ paddingVertical: 6,
6717
+ borderRadius: 6,
6718
+ borderWidth: 0,
6719
+ cursor: "pointer",
6720
+ transition: "quick",
6721
+ backgroundColor: "var(--color-button-solid-bg)",
6722
+ hoverStyle: { backgroundColor: "var(--color-hover)" },
6723
+ disabledStyle: { opacity: 0.4, cursor: "not-allowed" },
6724
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", color: "var(--color-button-solid-text)", children: "Review Order" })
6570
6725
  }
6571
6726
  )
6572
6727
  ] })
@@ -6706,19 +6861,21 @@ var PnlDiagram = React32__namespace.forwardRef(
6706
6861
  chartH
6707
6862
  );
6708
6863
  return /* @__PURE__ */ jsxRuntime.jsxs(
6709
- "div",
6864
+ gui.View,
6710
6865
  {
6711
6866
  ref,
6712
- className: cn("w-full", className),
6867
+ unstyled: true,
6868
+ width: "100%",
6869
+ className,
6713
6870
  ...rest,
6714
6871
  children: [
6715
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: "w-full h-full min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsxs(
6872
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { unstyled: true, ref: containerRef, width: "100%", height: "100%", minHeight: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(
6716
6873
  "svg",
6717
6874
  {
6718
6875
  width,
6719
6876
  height,
6720
6877
  viewBox: `0 0 ${width} ${height}`,
6721
- className: "select-none",
6878
+ style: { userSelect: "none" },
6722
6879
  onMouseMove: handleMouseMove,
6723
6880
  onMouseLeave: handleMouseLeave,
6724
6881
  children: [
@@ -6957,16 +7114,18 @@ var PnlDiagram = React32__namespace.forwardRef(
6957
7114
  ]
6958
7115
  }
6959
7116
  ) }),
6960
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-4 px-2 pt-1", children: [
6961
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
6962
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-0.5 w-4 bg-zinc-200 rounded" }),
6963
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-zinc-400", children: "Combined" })
7117
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { flexWrap: "wrap", alignItems: "center", gap: 16, paddingHorizontal: 8, paddingTop: 4, children: [
7118
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
7119
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { height: 2, width: 16, borderRadius: 4, backgroundColor: "var(--color-gray-200)" }),
7120
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: "Combined" })
6964
7121
  ] }),
6965
- legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
7122
+ legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
6966
7123
  /* @__PURE__ */ jsxRuntime.jsx(
6967
- "div",
7124
+ gui.View,
6968
7125
  {
6969
- className: "h-0.5 w-4 rounded",
7126
+ height: 2,
7127
+ width: 16,
7128
+ borderRadius: 4,
6970
7129
  style: {
6971
7130
  backgroundColor: LEG_COLORS[i % LEG_COLORS.length],
6972
7131
  opacity: 0.6,
@@ -6974,7 +7133,7 @@ var PnlDiagram = React32__namespace.forwardRef(
6974
7133
  }
6975
7134
  }
6976
7135
  ),
6977
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-zinc-500", children: [
7136
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6978
7137
  leg.action === "buy" ? "B" : "S",
6979
7138
  " ",
6980
7139
  leg.quantity,
@@ -6984,9 +7143,9 @@ var PnlDiagram = React32__namespace.forwardRef(
6984
7143
  leg.type === "call" ? "C" : "P"
6985
7144
  ] })
6986
7145
  ] }, i)),
6987
- breakevens.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
6988
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-1.5 w-1.5 rounded-full", style: { background: BREAKEVEN_COLOR } }),
6989
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-zinc-500", children: [
7146
+ breakevens.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
7147
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { width: 6, height: 6, borderRadius: 9999, style: { background: BREAKEVEN_COLOR } }),
7148
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6990
7149
  "BE: ",
6991
7150
  breakevens.map((b) => b.toFixed(1)).join(", ")
6992
7151
  ] })
@@ -7001,6 +7160,7 @@ function formatDate(date) {
7001
7160
  const d = new Date(date);
7002
7161
  return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
7003
7162
  }
7163
+ var MONO2 = { fontFamily: "monospace" };
7004
7164
  var OptionPositionCard = React32__namespace.forwardRef(
7005
7165
  function OptionPositionCard2(props, ref) {
7006
7166
  const {
@@ -7014,64 +7174,76 @@ var OptionPositionCard = React32__namespace.forwardRef(
7014
7174
  const isLong = position.quantity > 0;
7015
7175
  const isCall = position.type === "call";
7016
7176
  const isProfitable = position.pnl >= 0;
7177
+ const pnlColor = isProfitable ? "var(--color-status-good)" : "var(--color-status-bad)";
7017
7178
  return /* @__PURE__ */ jsxRuntime.jsxs(
7018
- "div",
7179
+ gui.YStack,
7019
7180
  {
7020
7181
  ref,
7021
- className: cn(
7022
- "flex flex-col gap-2 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",
7023
- className
7024
- ),
7182
+ gap: 8,
7183
+ borderRadius: 8,
7184
+ borderWidth: 1,
7185
+ borderColor: "var(--color-border-divider)",
7186
+ backgroundColor: "var(--card)",
7187
+ padding: 12,
7188
+ className,
7025
7189
  ...rest,
7026
7190
  children: [
7027
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
7028
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
7029
- "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-semibold",
7030
- // Call vs put is a rank difference, not a hue difference.
7031
- isCall ? "bg-[var(--secondary)] text-[var(--foreground)]" : "bg-[var(--muted)] text-[var(--muted-foreground)]"
7032
- ), children: [
7033
- position.underlying,
7034
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono tabular-nums", children: position.strike }),
7035
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "uppercase", children: position.type === "call" ? "C" : "P" }),
7036
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-zinc-500 font-normal", children: formatDate(position.expiration) })
7037
- ] }) }),
7038
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
7039
- "text-xs font-semibold font-mono tabular-nums",
7040
- isLong ? "text-emerald-400" : "text-red-400"
7041
- ), children: [
7042
- isLong ? "+" : "",
7043
- position.quantity
7044
- ] })
7191
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", children: [
7192
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", gap: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(
7193
+ gui.XStack,
7194
+ {
7195
+ alignItems: "center",
7196
+ gap: 4,
7197
+ borderRadius: 4,
7198
+ paddingHorizontal: 6,
7199
+ paddingVertical: 2,
7200
+ backgroundColor: isCall ? "var(--secondary)" : "var(--muted)",
7201
+ children: [
7202
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.underlying }),
7203
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", style: MONO2, fontVariant: ["tabular-nums"], color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.strike }),
7204
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", textTransform: "uppercase", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.type === "call" ? "C" : "P" }),
7205
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "400", color: "var(--color-text-secondary)", children: formatDate(position.expiration) })
7206
+ ]
7207
+ }
7208
+ ) }),
7209
+ /* @__PURE__ */ jsxRuntime.jsxs(
7210
+ gui.Text,
7211
+ {
7212
+ fontSize: 12,
7213
+ fontWeight: "600",
7214
+ style: MONO2,
7215
+ fontVariant: ["tabular-nums"],
7216
+ color: isLong ? "var(--color-status-good)" : "var(--color-status-bad)",
7217
+ children: [
7218
+ isLong ? "+" : "",
7219
+ position.quantity
7220
+ ]
7221
+ }
7222
+ )
7045
7223
  ] }),
7046
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 gap-3", children: [
7047
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
7048
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "Avg Cost" }),
7049
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono tabular-nums text-xs text-zinc-300", children: [
7224
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: 12, children: [
7225
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, children: [
7226
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Avg Cost" }),
7227
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, style: MONO2, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7050
7228
  "$",
7051
7229
  position.avgCost.toFixed(2)
7052
7230
  ] })
7053
7231
  ] }),
7054
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
7055
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "Value" }),
7056
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "font-mono tabular-nums text-xs text-zinc-300", children: [
7232
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, children: [
7233
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Value" }),
7234
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, style: MONO2, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7057
7235
  "$",
7058
7236
  position.currentValue.toFixed(2)
7059
7237
  ] })
7060
7238
  ] }),
7061
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end", children: [
7062
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "P/L" }),
7063
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
7064
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
7065
- "font-mono tabular-nums text-xs font-semibold",
7066
- isProfitable ? "text-emerald-400" : "text-red-400"
7067
- ), children: [
7239
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, alignItems: "flex-end", children: [
7240
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "P/L" }),
7241
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 4, children: [
7242
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, fontWeight: "600", style: MONO2, fontVariant: ["tabular-nums"], color: pnlColor, children: [
7068
7243
  isProfitable ? "+" : "",
7069
7244
  position.pnl.toFixed(2)
7070
7245
  ] }),
7071
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
7072
- "font-mono tabular-nums text-[10px]",
7073
- isProfitable ? "text-emerald-500/70" : "text-red-500/70"
7074
- ), children: [
7246
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, style: MONO2, fontVariant: ["tabular-nums"], color: pnlColor, opacity: 0.7, children: [
7075
7247
  "(",
7076
7248
  isProfitable ? "+" : "",
7077
7249
  position.pnlPercent.toFixed(1),
@@ -7080,53 +7252,47 @@ var OptionPositionCard = React32__namespace.forwardRef(
7080
7252
  ] })
7081
7253
  ] })
7082
7254
  ] }),
7083
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 border-t border-zinc-800/60 pt-2", children: [
7084
- /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0394", value: position.greeks.delta, color: "text-blue-400" }),
7085
- /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0393", value: position.greeks.gamma, color: "text-purple-400" }),
7086
- /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0398", value: position.greeks.theta, color: "text-red-400" }),
7087
- /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u03BD", value: position.greeks.vega, color: "text-emerald-400" })
7255
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 12, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7256
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0394", value: position.greeks.delta, color: "var(--foreground)" }),
7257
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0393", value: position.greeks.gamma, color: "var(--chart-1)" }),
7258
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0398", value: position.greeks.theta, color: "var(--chart-4)" }),
7259
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u03BD", value: position.greeks.vega, color: "var(--chart-2)" })
7088
7260
  ] }),
7089
- (onClose || onExercise || onRoll) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 border-t border-zinc-800/60 pt-2", children: [
7090
- onClose && /* @__PURE__ */ jsxRuntime.jsx(
7091
- "button",
7092
- {
7093
- type: "button",
7094
- onClick: () => onClose(position),
7095
- className: "flex-1 rounded-md bg-zinc-800 px-2 py-1 text-xs font-medium text-zinc-300 hover:bg-zinc-700 hover:text-zinc-100 transition-colors",
7096
- children: "Close"
7097
- }
7098
- ),
7099
- onExercise && /* @__PURE__ */ jsxRuntime.jsx(
7100
- "button",
7101
- {
7102
- type: "button",
7103
- onClick: () => onExercise(position),
7104
- className: "flex-1 rounded-md bg-zinc-800 px-2 py-1 text-xs font-medium text-zinc-300 hover:bg-zinc-700 hover:text-zinc-100 transition-colors",
7105
- children: "Exercise"
7106
- }
7107
- ),
7108
- onRoll && /* @__PURE__ */ jsxRuntime.jsx(
7109
- "button",
7110
- {
7111
- type: "button",
7112
- onClick: () => onRoll(position),
7113
- className: "flex-1 rounded-md bg-zinc-800 px-2 py-1 text-xs font-medium text-zinc-300 hover:bg-zinc-700 hover:text-zinc-100 transition-colors",
7114
- children: "Roll"
7115
- }
7116
- )
7261
+ (onClose || onExercise || onRoll) && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 8, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7262
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onClose(position), children: "Close" }),
7263
+ onExercise && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onExercise(position), children: "Exercise" }),
7264
+ onRoll && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onRoll(position), children: "Roll" })
7117
7265
  ] })
7118
7266
  ]
7119
7267
  }
7120
7268
  );
7121
7269
  }
7122
7270
  );
7271
+ function ActionButton({ onClick, children }) {
7272
+ return /* @__PURE__ */ jsxRuntime.jsx(
7273
+ gui.XStack,
7274
+ {
7275
+ unstyled: true,
7276
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
7277
+ onClick,
7278
+ flex: 1,
7279
+ alignItems: "center",
7280
+ justifyContent: "center",
7281
+ borderRadius: 6,
7282
+ borderWidth: 0,
7283
+ paddingHorizontal: 8,
7284
+ paddingVertical: 4,
7285
+ backgroundColor: "var(--color-button-subtle-bg)",
7286
+ cursor: "pointer",
7287
+ hoverStyle: { color: "var(--color-hover)" },
7288
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "500", color: "var(--color-button-subtle-fg)", children })
7289
+ }
7290
+ );
7291
+ }
7123
7292
  function GreekPill({ label, value, color }) {
7124
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
7125
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("text-[10px] font-semibold", color), children: label }),
7126
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
7127
- "font-mono tabular-nums text-[11px]",
7128
- value < 0 ? "text-red-400" : "text-zinc-400"
7129
- ), children: value.toFixed(4) })
7293
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 4, children: [
7294
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, fontWeight: "600", color, children: label }),
7295
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, style: MONO2, fontVariant: ["tabular-nums"], color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-secondary)", children: value.toFixed(4) })
7130
7296
  ] });
7131
7297
  }
7132
7298
  function formatExpDate(date) {
@@ -7139,28 +7305,53 @@ var GROUP_LABELS = {
7139
7305
  monthly: "Monthly",
7140
7306
  quarterly: "Quarterly"
7141
7307
  };
7308
+ var SHAPE = {
7309
+ selected: {
7310
+ borderColor: "transparent",
7311
+ backgroundColor: "var(--color-selected-control-bg)",
7312
+ color: "var(--color-selected-control-text)"
7313
+ },
7314
+ resting: {
7315
+ borderColor: "var(--color-border-divider)",
7316
+ backgroundColor: "var(--card)",
7317
+ color: "var(--color-text-secondary)",
7318
+ hoverStyle: { borderColor: "var(--color-hover)", color: "var(--color-hover)" }
7319
+ }
7320
+ };
7142
7321
  function ExpirationPill({ exp, isSelected, onClick }) {
7322
+ const shape = isSelected ? SHAPE.selected : SHAPE.resting;
7323
+ const dteColor = exp.dte <= 7 && !isSelected ? "var(--color-status-warn)" : isSelected ? "var(--color-selected-control-text)" : "var(--muted-foreground)";
7143
7324
  return /* @__PURE__ */ jsxRuntime.jsxs(
7144
- "button",
7325
+ gui.YStack,
7145
7326
  {
7146
- type: "button",
7327
+ unstyled: true,
7328
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
7147
7329
  onClick,
7148
- className: cn(
7149
- "flex flex-col items-center gap-0.5 rounded-md px-3 py-1.5 transition-colors shrink-0",
7150
- "border text-xs",
7151
- isSelected ? "border-blue-500/60 bg-blue-900/30 text-blue-300" : "border-zinc-800 bg-zinc-900/50 text-zinc-400 hover:border-zinc-600 hover:text-zinc-200"
7152
- ),
7330
+ alignItems: "center",
7331
+ gap: 2,
7332
+ borderRadius: 6,
7333
+ paddingHorizontal: 12,
7334
+ paddingVertical: 6,
7335
+ flexShrink: 0,
7336
+ borderWidth: 1,
7337
+ borderStyle: "solid",
7338
+ cursor: "pointer",
7339
+ ...shape,
7153
7340
  children: [
7154
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium whitespace-nowrap", children: formatExpDate(exp.date) }),
7155
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn(
7156
- "font-mono tabular-nums text-[10px]",
7157
- isSelected ? "text-[var(--foreground)]" : "text-[var(--muted-foreground)]",
7158
- // Near expiry is a notice, and a notice in Lux is the loudest neutral.
7159
- exp.dte <= 7 && !isSelected && "text-[var(--color-status-warn)]"
7160
- ), children: [
7161
- exp.dte,
7162
- "d"
7163
- ] })
7341
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { unstyled: true, fontSize: 12, fontWeight: "500", style: { whiteSpace: "nowrap" }, children: formatExpDate(exp.date) }),
7342
+ /* @__PURE__ */ jsxRuntime.jsxs(
7343
+ gui.Text,
7344
+ {
7345
+ fontVariant: ["tabular-nums"],
7346
+ style: { fontFamily: "monospace" },
7347
+ fontSize: 10,
7348
+ color: dteColor,
7349
+ children: [
7350
+ exp.dte,
7351
+ "d"
7352
+ ]
7353
+ }
7354
+ )
7164
7355
  ]
7165
7356
  }
7166
7357
  );
@@ -7190,49 +7381,23 @@ var ExpirationSelector = React32__namespace.forwardRef(
7190
7381
  label: GROUP_LABELS[type],
7191
7382
  items: expirations.filter((e) => e.type === type)
7192
7383
  })).filter((g) => g.items.length > 0);
7193
- return /* @__PURE__ */ jsxRuntime.jsx(
7194
- "div",
7195
- {
7196
- ref,
7197
- className: cn("flex flex-col gap-2", className),
7198
- ...rest,
7199
- children: grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
7200
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-zinc-600 px-1", children: group.label }),
7201
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex gap-1.5 overflow-x-auto no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
7202
- ExpirationPill,
7203
- {
7204
- exp,
7205
- isSelected: exp.date === selected,
7206
- onClick: () => onSelect(exp.date)
7207
- }
7208
- ) }, exp.date)) })
7209
- ] }, group.type))
7210
- }
7211
- );
7212
- }
7213
- return /* @__PURE__ */ jsxRuntime.jsx(
7214
- "div",
7215
- {
7216
- ref,
7217
- className: cn("flex items-center gap-1", className),
7218
- ...rest,
7219
- children: /* @__PURE__ */ jsxRuntime.jsx(
7220
- "div",
7384
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { ref, gap: 8, className, ...rest, children: grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: 4, children: [
7385
+ /* @__PURE__ */ jsxRuntime.jsx(
7386
+ gui.Text,
7221
7387
  {
7222
- ref: scrollRef,
7223
- className: "flex gap-1.5 overflow-x-auto no-scrollbar",
7224
- children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
7225
- ExpirationPill,
7226
- {
7227
- exp,
7228
- isSelected: exp.date === selected,
7229
- onClick: () => onSelect(exp.date)
7230
- }
7231
- ) }, exp.date))
7388
+ fontSize: 10,
7389
+ fontWeight: "600",
7390
+ textTransform: "uppercase",
7391
+ letterSpacing: 0.5,
7392
+ paddingHorizontal: 4,
7393
+ color: "var(--color-text-secondary)",
7394
+ children: group.label
7232
7395
  }
7233
- )
7234
- }
7235
- );
7396
+ ),
7397
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) })
7398
+ ] }, group.type)) });
7399
+ }
7400
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ref, alignItems: "center", gap: 4, className, ...rest, children: /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { ref: scrollRef, gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: expirations.map((exp) => /* @__PURE__ */ jsxRuntime.jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsxRuntime.jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) }) });
7236
7401
  }
7237
7402
  );
7238
7403
  var bankColors = {