@luxfi/ui 7.4.11 → 7.4.12

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 (70) hide show
  1. package/dist/alert.cjs +68 -46
  2. package/dist/alert.js +69 -46
  3. package/dist/avatar.cjs +49 -46
  4. package/dist/avatar.js +52 -48
  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 +756 -703
  24. package/dist/index.js +757 -704
  25. package/dist/option-chain.cjs +89 -67
  26. package/dist/option-chain.js +89 -67
  27. package/dist/option-position.cjs +88 -85
  28. package/dist/option-position.js +88 -85
  29. package/dist/pnl-diagram.cjs +20 -20
  30. package/dist/pnl-diagram.js +20 -20
  31. package/dist/popover.cjs +3 -7
  32. package/dist/popover.js +3 -7
  33. package/dist/progress.cjs +15 -22
  34. package/dist/progress.d.cts +6 -6
  35. package/dist/progress.d.ts +6 -6
  36. package/dist/progress.js +15 -22
  37. package/dist/radio.cjs +35 -67
  38. package/dist/radio.d.cts +18 -18
  39. package/dist/radio.d.ts +18 -18
  40. package/dist/radio.js +36 -68
  41. package/dist/slider.cjs +33 -49
  42. package/dist/slider.js +34 -50
  43. package/dist/switch.cjs +48 -55
  44. package/dist/switch.js +49 -56
  45. package/dist/tag.cjs +112 -69
  46. package/dist/tag.js +113 -69
  47. package/dist/tooltip.cjs +28 -17
  48. package/dist/tooltip.js +30 -18
  49. package/package.json +1 -1
  50. package/src/alert.tsx +78 -45
  51. package/src/avatar.tsx +54 -37
  52. package/src/badge.tsx +65 -44
  53. package/src/checkbox.tsx +70 -89
  54. package/src/close-button.tsx +3 -8
  55. package/src/empty-state.tsx +21 -17
  56. package/src/expiration-selector.tsx +84 -66
  57. package/src/greeks-display.tsx +59 -51
  58. package/src/input-group.tsx +38 -24
  59. package/src/option-chain.tsx +154 -104
  60. package/src/option-position.tsx +136 -114
  61. package/src/pin-input.tsx +37 -29
  62. package/src/pnl-diagram.tsx +36 -28
  63. package/src/progress.tsx +17 -21
  64. package/src/radio.tsx +56 -75
  65. package/src/slider.tsx +43 -44
  66. package/src/strategy-builder.tsx +245 -156
  67. package/src/switch.tsx +63 -64
  68. package/src/tag.tsx +89 -51
  69. package/src/tooltip.tsx +21 -13
  70. 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,
@@ -1639,20 +1658,26 @@ var Avatar = React32__namespace.forwardRef(
1639
1658
  {
1640
1659
  ref,
1641
1660
  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
- ),
1661
+ position: "relative",
1662
+ display: "inline-flex",
1663
+ flexShrink: 0,
1664
+ alignItems: "center",
1665
+ justifyContent: "center",
1666
+ overflow: "hidden",
1667
+ borderRadius: 9999,
1668
+ ...SIZE2[size],
1669
+ ...VARIANT[variant],
1670
+ boxShadow: isBorderless ? void 0 : `0 0 0 2px ${RING}`,
1649
1671
  ...rest,
1650
1672
  children: [
1651
1673
  /* @__PURE__ */ jsxRuntime.jsx(AvatarFallback, { name, icon, children: fallback }),
1652
1674
  src != null && /* @__PURE__ */ jsxRuntime.jsx(
1653
1675
  gui.Avatar.Image,
1654
1676
  {
1655
- className: "h-full w-full rounded-[inherit] object-cover",
1677
+ width: "100%",
1678
+ height: "100%",
1679
+ borderRadius: 9999,
1680
+ objectFit: "cover",
1656
1681
  src,
1657
1682
  srcSet,
1658
1683
  loading,
@@ -1667,22 +1692,18 @@ var Avatar = React32__namespace.forwardRef(
1667
1692
  );
1668
1693
  var AvatarFallback = React32__namespace.forwardRef(
1669
1694
  function AvatarFallback2(props, ref) {
1670
- const { name, icon, children, className, ...rest } = props;
1671
- return /* @__PURE__ */ jsxRuntime.jsxs(
1695
+ const { name, icon, children, ...rest } = props;
1696
+ return /* @__PURE__ */ jsxRuntime.jsx(
1672
1697
  gui.Avatar.Fallback,
1673
1698
  {
1674
1699
  ref,
1675
- unstyled: true,
1676
- className: cn(
1677
- "flex h-full w-full items-center justify-center font-medium",
1678
- className
1679
- ),
1700
+ display: "flex",
1701
+ width: "100%",
1702
+ height: "100%",
1703
+ alignItems: "center",
1704
+ justifyContent: "center",
1680
1705
  ...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
- ]
1706
+ children: ink(children ?? (name != null ? getInitials(name) : icon), void 0, { fontWeight: "500" })
1686
1707
  }
1687
1708
  );
1688
1709
  }
@@ -1695,19 +1716,12 @@ function getInitials(name) {
1695
1716
  }
1696
1717
  var AvatarGroup = React32__namespace.forwardRef(
1697
1718
  function AvatarGroup2(props, ref) {
1698
- const { size, variant, borderless, className, ...rest } = props;
1719
+ const { size, variant, borderless, children, ...rest } = props;
1699
1720
  const contextValue = React32__namespace.useMemo(
1700
1721
  () => ({ size, variant, borderless }),
1701
1722
  [size, variant, borderless]
1702
1723
  );
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
- ) });
1724
+ 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
1725
  }
1712
1726
  );
1713
1727
  function mapPlacement(p) {
@@ -1801,14 +1815,21 @@ var Tooltip = React32__namespace.forwardRef(
1801
1815
  {
1802
1816
  ref,
1803
1817
  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
- ),
1818
+ zIndex: 9999,
1819
+ overflow: "hidden",
1820
+ borderRadius: 8,
1821
+ paddingHorizontal: 12,
1822
+ paddingVertical: 8,
1823
+ maxWidth: isPopover ? 384 : 320,
1824
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)",
1825
+ transition: "quick",
1826
+ enterStyle: { opacity: 0, scale: 0.95 },
1827
+ exitStyle: { opacity: 0, scale: 0.95 },
1828
+ ...isPopover ? {
1829
+ borderWidth: 1,
1830
+ borderColor: "var(--color-border-divider)",
1831
+ shadowColor: "var(--shadow-popover)"
1832
+ } : {},
1812
1833
  onClick: interactive ? handleContentClick : void 0,
1813
1834
  ...selected ? { "data-selected": true } : {},
1814
1835
  ...contentProps,
@@ -1817,12 +1838,13 @@ var Tooltip = React32__namespace.forwardRef(
1817
1838
  gui.Tooltip.Arrow,
1818
1839
  {
1819
1840
  unstyled: true,
1820
- className: cn(
1821
- isPopover ? "fill-[var(--color-popover-bg)]" : "fill-[var(--color-tooltip-bg)]"
1822
- )
1841
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)"
1823
1842
  }
1824
1843
  ),
1825
- content
1844
+ ink(content, void 0, {
1845
+ fontSize: 14,
1846
+ color: isPopover ? "var(--color-text-primary)" : "var(--color-tooltip-fg)"
1847
+ })
1826
1848
  ]
1827
1849
  }
1828
1850
  )
@@ -1834,35 +1856,39 @@ var Tooltip = React32__namespace.forwardRef(
1834
1856
  function TruncatedTextTooltip({ label, children }) {
1835
1857
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
1836
1858
  }
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"
1859
+ var SIZE3 = {
1860
+ sm: { padding: 4, height: 18, minHeight: 18 },
1861
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24 },
1862
+ lg: { paddingHorizontal: 8, paddingVertical: 4, minHeight: 28 }
1842
1863
  };
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"
1864
+ var SIZE_TEXT = {
1865
+ sm: { fontSize: 12, fontWeight: "500" },
1866
+ md: { fontSize: 14, fontWeight: "500" },
1867
+ lg: { fontSize: 14, fontWeight: "600" }
1868
+ };
1869
+ var COLOR_PALETTE = {
1870
+ gray: { bg: "var(--color-badge-gray-bg)", fg: "var(--color-badge-gray-fg)" },
1871
+ green: { bg: "var(--color-badge-green-bg)", fg: "var(--color-badge-green-fg)" },
1872
+ red: { bg: "var(--color-badge-red-bg)", fg: "var(--color-badge-red-fg)" },
1873
+ purple: { bg: "var(--color-badge-purple-bg)", fg: "var(--color-badge-purple-fg)" },
1874
+ orange: { bg: "var(--color-badge-orange-bg)", fg: "var(--color-badge-orange-fg)" },
1875
+ blue: { bg: "var(--color-badge-blue-bg)", fg: "var(--color-badge-blue-fg)" },
1876
+ yellow: { bg: "var(--color-badge-yellow-bg)", fg: "var(--color-badge-yellow-fg)" },
1877
+ teal: { bg: "var(--color-badge-teal-bg)", fg: "var(--color-badge-teal-fg)" },
1878
+ cyan: { bg: "var(--color-badge-cyan-bg)", fg: "var(--color-badge-cyan-fg)" },
1879
+ pink: { bg: "var(--color-badge-pink-bg)", fg: "var(--color-badge-pink-fg)" },
1880
+ purple_alt: { bg: "var(--color-badge-purple-alt-bg)", fg: "var(--color-badge-purple-alt-fg)" },
1881
+ blue_alt: { bg: "var(--color-badge-blue-alt-bg)", fg: "var(--color-badge-blue-alt-fg)" },
1882
+ bright_gray: { bg: "var(--color-badge-bright-gray-bg)", fg: "var(--color-badge-bright-gray-fg)" },
1883
+ bright_green: { bg: "var(--color-badge-bright-green-bg)", fg: "var(--color-badge-bright-green-fg)" },
1884
+ bright_red: { bg: "var(--color-badge-bright-red-bg)", fg: "var(--color-badge-bright-red-fg)" },
1885
+ bright_blue: { bg: "var(--color-badge-bright-blue-bg)", fg: "var(--color-badge-bright-blue-fg)" },
1886
+ bright_yellow: { bg: "var(--color-badge-bright-yellow-bg)", fg: "var(--color-badge-bright-yellow-fg)" },
1887
+ bright_teal: { bg: "var(--color-badge-bright-teal-bg)", fg: "var(--color-badge-bright-teal-fg)" },
1888
+ bright_cyan: { bg: "var(--color-badge-bright-cyan-bg)", fg: "var(--color-badge-bright-cyan-fg)" },
1889
+ bright_orange: { bg: "var(--color-badge-bright-orange-bg)", fg: "var(--color-badge-bright-orange-fg)" },
1890
+ bright_purple: { bg: "var(--color-badge-bright-purple-bg)", fg: "var(--color-badge-bright-purple-fg)" },
1891
+ bright_pink: { bg: "var(--color-badge-bright-pink-bg)", fg: "var(--color-badge-bright-pink-fg)" }
1866
1892
  };
1867
1893
  var S2 = 4;
1868
1894
  var Badge = React32__namespace.default.forwardRef(
@@ -1897,18 +1923,31 @@ var Badge = React32__namespace.default.forwardRef(
1897
1923
  }
1898
1924
  if (_mr !== void 0) shimStyle.marginRight = typeof _mr === "number" ? `${_mr * S2}px` : _mr;
1899
1925
  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;
1926
+ const palette = COLOR_PALETTE[colorPalette];
1927
+ const child = children ? (
1928
+ // `ellipsis` is gui Text's own built-in variant for single-line
1929
+ // truncation — it expands to the same overflow/text-overflow/
1930
+ // white-space/max-width rule Tailwind's `text-ellipsis` did, but
1931
+ // through the component's own variants (guaranteed to compile),
1932
+ // rather than naming each longhand as a separate style prop.
1933
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { ellipsis: true, ...SIZE_TEXT[size], color: palette.fg, children })
1934
+ ) : null;
1901
1935
  const childrenElement = truncated ? /* @__PURE__ */ jsxRuntime.jsx(TruncatedTextTooltip, { label: children, children: child }) : child;
1902
1936
  const badgeElement = /* @__PURE__ */ jsxRuntime.jsxs(
1903
- "span",
1937
+ gui.XStack,
1904
1938
  {
1905
1939
  ref,
1906
- className: cn(
1907
- BASE_CLASSES,
1908
- SIZE_CLASSES3[size],
1909
- COLOR_PALETTE_CLASSES[colorPalette],
1910
- className
1911
- ),
1940
+ render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
1941
+ display: "inline-flex",
1942
+ alignItems: "center",
1943
+ alignSelf: "flex-start",
1944
+ borderRadius: 2,
1945
+ gap: 4,
1946
+ maxWidth: "100%",
1947
+ userSelect: "text",
1948
+ ...SIZE3[size],
1949
+ backgroundColor: palette.bg,
1950
+ className,
1912
1951
  style: badgeStyle,
1913
1952
  ...rest,
1914
1953
  children: [
@@ -1982,7 +2021,7 @@ var ButtonFrame = gui.styled(gui.View, {
1982
2021
  size: "md"
1983
2022
  }
1984
2023
  });
1985
- var VARIANT_CLASSES2 = {
2024
+ var VARIANT_CLASSES = {
1986
2025
  solid: [
1987
2026
  "bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
1988
2027
  "hover:bg-[var(--color-hover)]",
@@ -2082,7 +2121,7 @@ var VARIANT_CLASSES2 = {
2082
2121
  "data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
2083
2122
  ].join(" ")
2084
2123
  };
2085
- var BASE_CLASSES2 = "font-semibold whitespace-nowrap transition-colors duration-150";
2124
+ var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
2086
2125
  var SP = 4;
2087
2126
  function buildShimStyle(props) {
2088
2127
  const s = { ...props.style };
@@ -2183,8 +2222,8 @@ var Button = React32__namespace.forwardRef(
2183
2222
  /* @__PURE__ */ jsxRuntime.jsx(Spinner, {}),
2184
2223
  loadingText != null && /* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: 8 }, children: loadingText })
2185
2224
  ] }) : children;
2186
- const variantClass = VARIANT_CLASSES2[variant] ?? VARIANT_CLASSES2.solid;
2187
- const combinedClassName = [BASE_CLASSES2, variantClass, className].filter(Boolean).join(" ");
2225
+ const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
2226
+ const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
2188
2227
  const button = /* @__PURE__ */ jsxRuntime.jsx(
2189
2228
  ButtonFrame,
2190
2229
  {
@@ -2205,7 +2244,7 @@ var Button = React32__namespace.forwardRef(
2205
2244
  return button;
2206
2245
  }
2207
2246
  );
2208
- var SIZE_CLASSES4 = {
2247
+ var SIZE_CLASSES = {
2209
2248
  "2xs": "px-2 h-5 min-w-5 text-xs rounded-sm gap-1",
2210
2249
  xs: "px-2 h-6 min-w-6 text-sm rounded-sm gap-1",
2211
2250
  sm: "px-3 h-8 min-w-8 text-sm rounded-md gap-1",
@@ -2214,7 +2253,7 @@ var SIZE_CLASSES4 = {
2214
2253
  function buttonVariants(opts) {
2215
2254
  const v = opts?.variant ?? "solid";
2216
2255
  const s = opts?.size ?? "md";
2217
- return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES4[s] ?? ""].filter(Boolean).join(" ");
2256
+ return [BASE_CLASSES, VARIANT_CLASSES[v] ?? "", SIZE_CLASSES[s] ?? ""].filter(Boolean).join(" ");
2218
2257
  }
2219
2258
  var ButtonGroup = React32__namespace.forwardRef(
2220
2259
  function ButtonGroup2(props, ref) {
@@ -2292,7 +2331,6 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2292
2331
  onValueChange,
2293
2332
  orientation = "vertical",
2294
2333
  name: _name,
2295
- className,
2296
2334
  ...rest
2297
2335
  } = props;
2298
2336
  const [uncontrolledValue, setUncontrolledValue] = React32__namespace.useState(defaultValue ?? []);
@@ -2315,15 +2353,13 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2315
2353
  }, [isControlled, controlledValue]);
2316
2354
  const ctx = React32__namespace.useMemo(() => ({ value, toggle }), [value, toggle]);
2317
2355
  return /* @__PURE__ */ jsxRuntime.jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsxRuntime.jsx(
2318
- "div",
2356
+ gui.View,
2319
2357
  {
2320
2358
  ref,
2321
2359
  role: "group",
2322
- className: cn(
2323
- "flex",
2324
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-8",
2325
- className
2326
- ),
2360
+ display: "flex",
2361
+ flexDirection: orientation === "vertical" ? "column" : "row",
2362
+ gap: orientation === "vertical" ? 12 : 32,
2327
2363
  ...rest,
2328
2364
  children
2329
2365
  }
@@ -2331,46 +2367,22 @@ var CheckboxGroupBase = React32__namespace.forwardRef(
2331
2367
  }
2332
2368
  );
2333
2369
  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
- }
2370
+ var SIZE4 = {
2371
+ sm: { rootGap: 6, control: 14, radius: 2, label: 12, icon: 12 },
2372
+ md: { rootGap: 8, control: 16, radius: 4, label: 14, icon: 14 }
2347
2373
  };
2348
- var CheckIcon = ({ className }) => /* @__PURE__ */ jsxRuntime.jsx(
2349
- "svg",
2374
+ var INK = "var(--color-text-primary)";
2375
+ var ON_INK = "var(--color-bg-body)";
2376
+ var RESTING_BORDER = "var(--color-input-border)";
2377
+ var OUTLINE = "var(--color-gray-500)";
2378
+ 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(
2379
+ "path",
2350
2380
  {
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
- )
2362
- }
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" })
2381
+ d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
2382
+ fill: color
2372
2383
  }
2373
- );
2384
+ ) });
2385
+ 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
2386
  var CheckboxBase = React32__namespace.forwardRef(
2375
2387
  function Checkbox(props, ref) {
2376
2388
  const {
@@ -2388,7 +2400,6 @@ var CheckboxBase = React32__namespace.forwardRef(
2388
2400
  size = "md",
2389
2401
  name,
2390
2402
  required,
2391
- className,
2392
2403
  ...rest
2393
2404
  } = props;
2394
2405
  const group = useCheckboxGroupContext();
@@ -2441,18 +2452,19 @@ var CheckboxBase = React32__namespace.forwardRef(
2441
2452
  },
2442
2453
  [readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
2443
2454
  );
2444
- const sizeClasses2 = SIZE_CLASSES5[size];
2455
+ const s = SIZE4[size];
2456
+ const isChecked = checkedState !== false;
2445
2457
  return /* @__PURE__ */ jsxRuntime.jsxs(
2446
- "label",
2458
+ gui.Label,
2447
2459
  {
2448
2460
  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
- ),
2461
+ unstyled: true,
2462
+ flexDirection: "row",
2463
+ alignItems: "center",
2464
+ gap: s.rootGap,
2465
+ cursor: disabled ? "not-allowed" : readOnly ? "default" : "pointer",
2466
+ userSelect: "none",
2467
+ opacity: disabled ? 0.5 : 1,
2456
2468
  onChange,
2457
2469
  "data-disabled": disabled || void 0,
2458
2470
  "data-readonly": readOnly || void 0,
@@ -2468,26 +2480,25 @@ var CheckboxBase = React32__namespace.forwardRef(
2468
2480
  name,
2469
2481
  value,
2470
2482
  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 }) })
2483
+ flexShrink: 0,
2484
+ alignItems: "center",
2485
+ justifyContent: "center",
2486
+ width: s.control,
2487
+ height: s.control,
2488
+ borderRadius: s.radius,
2489
+ borderWidth: 2,
2490
+ borderColor: isChecked ? INK : RESTING_BORDER,
2491
+ backgroundColor: isChecked ? INK : "transparent",
2492
+ transition: "quicker",
2493
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE, outlineOffset: 2 },
2494
+ 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
2495
  }
2484
2496
  ),
2485
- /* @__PURE__ */ jsxRuntime.jsx(
2497
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
2486
2498
  "input",
2487
2499
  {
2488
2500
  ref: setHiddenInputRef,
2489
2501
  type: "checkbox",
2490
- className: "sr-only",
2491
2502
  checked: checkedState === true,
2492
2503
  disabled,
2493
2504
  readOnly,
@@ -2498,8 +2509,8 @@ var CheckboxBase = React32__namespace.forwardRef(
2498
2509
  onChange: NOOP,
2499
2510
  ...inputProps
2500
2511
  }
2501
- ),
2502
- children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(sizeClasses2.label), children })
2512
+ ) }),
2513
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: s.label, children })
2503
2514
  ]
2504
2515
  }
2505
2516
  );
@@ -2518,7 +2529,7 @@ function stripUtmParams(url) {
2518
2529
  return url;
2519
2530
  }
2520
2531
  }
2521
- var VARIANT_CLASSES3 = {
2532
+ var VARIANT_CLASSES2 = {
2522
2533
  primary: cn(
2523
2534
  "text-[var(--color-link-primary)]",
2524
2535
  "hover:no-underline hover:text-[var(--color-link-primary-hover)]",
@@ -2558,7 +2569,7 @@ var VARIANT_CLASSES3 = {
2558
2569
  "data-[hover]:no-underline"
2559
2570
  )
2560
2571
  };
2561
- var BASE_CLASSES3 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2572
+ var BASE_CLASSES2 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2562
2573
  var LinkExternalIcon = ({ color }) => /* @__PURE__ */ jsxRuntime.jsx(
2563
2574
  ArrowIcon,
2564
2575
  {
@@ -2627,7 +2638,7 @@ var Link = React32__namespace.default.forwardRef(
2627
2638
  if (_minW !== void 0) shimStyle.minWidth = typeof _minW === "number" ? `${_minW * SPACING}px` : _minW;
2628
2639
  if (_justifyContent) shimStyle.justifyContent = _justifyContent;
2629
2640
  if (_position) shimStyle.position = _position;
2630
- const linkClasses = cn(BASE_CLASSES3, VARIANT_CLASSES3[variant], className);
2641
+ const linkClasses = cn(BASE_CLASSES2, VARIANT_CLASSES2[variant], className);
2631
2642
  const linkStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
2632
2643
  if (external) {
2633
2644
  const processedHref = typeof href === "string" ? stripUtmParams(href) : href;
@@ -2716,8 +2727,8 @@ var LinkOverlay = React32__namespace.default.forwardRef(
2716
2727
  ...rest
2717
2728
  } = props;
2718
2729
  const overlayClasses = cn(
2719
- BASE_CLASSES3,
2720
- VARIANT_CLASSES3[variant],
2730
+ BASE_CLASSES2,
2731
+ VARIANT_CLASSES2[variant],
2721
2732
  // Static positioning with a ::before pseudo-element that covers the LinkBox
2722
2733
  "static",
2723
2734
  'before:absolute before:inset-0 before:z-0 before:content-[""]',
@@ -3105,6 +3116,7 @@ function upperFirst(str) {
3105
3116
  return str.charAt(0).toUpperCase() + str.slice(1);
3106
3117
  }
3107
3118
  var ICONS = {};
3119
+ var MUTED = "var(--color-text-secondary)";
3108
3120
  var EmptyState = React32__namespace.forwardRef(
3109
3121
  function EmptyState2(props, ref) {
3110
3122
  const { title, description, term, type = "query", icon, children, className, ...rest } = props;
@@ -3142,17 +3154,20 @@ var EmptyState = React32__namespace.forwardRef(
3142
3154
  return icon;
3143
3155
  })();
3144
3156
  return /* @__PURE__ */ jsxRuntime.jsx(
3145
- "div",
3157
+ gui.XStack,
3146
3158
  {
3147
3159
  ref,
3148
- className: cn("flex items-center justify-center py-10", className),
3160
+ alignItems: "center",
3161
+ justifyContent: "center",
3162
+ paddingVertical: 40,
3163
+ className,
3149
3164
  ...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 }),
3165
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 20, children: [
3166
+ iconContent && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", justifyContent: "center", children: iconContent }),
3167
+ descriptionContent ? /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { alignItems: "center", gap: 8, children: [
3168
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3169
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, textAlign: "center", color: MUTED, children: descriptionContent })
3170
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3156
3171
  children
3157
3172
  ] })
3158
3173
  }
@@ -3166,10 +3181,10 @@ function getComponentDisplayName(type) {
3166
3181
  return void 0;
3167
3182
  }
3168
3183
  var ERROR = "var(--color-text-error)";
3169
- var MUTED = "var(--color-text-secondary)";
3184
+ var MUTED2 = "var(--color-text-secondary)";
3170
3185
  var Marks = ({ required, optionalText, errorText }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3171
3186
  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 }),
3187
+ !required && optionalText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, color: MUTED2, children: optionalText }),
3173
3188
  errorText && /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 14, color: ERROR, children: [
3174
3189
  "-",
3175
3190
  space,
@@ -3220,7 +3235,7 @@ var Field = React32__namespace.forwardRef(
3220
3235
  ]
3221
3236
  }
3222
3237
  );
3223
- const helperTextElement = helperText ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 6, fontSize: 12, color: MUTED, children: helperText }) : null;
3238
+ const helperTextElement = helperText ? /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 6, fontSize: 12, color: MUTED2, children: helperText }) : null;
3224
3239
  const child2 = React32__namespace.Children.only(children);
3225
3240
  const isInputGroup = getComponentDisplayName(child2.type) === "InputGroup";
3226
3241
  if (isInputGroup) {
@@ -3258,7 +3273,7 @@ var Field = React32__namespace.forwardRef(
3258
3273
  }
3259
3274
  ),
3260
3275
  React32__namespace.cloneElement(child, { size }),
3261
- helperText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: MUTED, children: helperText }),
3276
+ helperText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: MUTED2, children: helperText }),
3262
3277
  errorText && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, color: ERROR, children: errorText })
3263
3278
  ] });
3264
3279
  }
@@ -3312,7 +3327,7 @@ var IconButtonFrame = gui.styled(gui.View, {
3312
3327
  var HOVER = "var(--color-hover)";
3313
3328
  var SELECTED_BG = "var(--color-selected-control-bg)";
3314
3329
  var SELECTED_FG = "var(--color-selected-control-text)";
3315
- var VARIANT = {
3330
+ var VARIANT2 = {
3316
3331
  plain: {
3317
3332
  rest: { backgroundColor: "transparent", hoverStyle: { backgroundColor: "transparent" } }
3318
3333
  },
@@ -3387,7 +3402,7 @@ var IconButton = React32__namespace.forwardRef(
3387
3402
  style: styleProp,
3388
3403
  ...rest
3389
3404
  } = props;
3390
- const look = VARIANT[variant] ?? VARIANT.plain;
3405
+ const look = VARIANT2[variant] ?? VARIANT2.plain;
3391
3406
  const iconSize = size ? ICON_SIZE[size] : void 0;
3392
3407
  const button = /* @__PURE__ */ jsxRuntime.jsx(
3393
3408
  IconButtonFrame,
@@ -3634,14 +3649,14 @@ var Image = React32__namespace.default.forwardRef(
3634
3649
  ] });
3635
3650
  }
3636
3651
  );
3637
- var SIZE = {
3652
+ var SIZE5 = {
3638
3653
  xs: { height: 24, paddingHorizontal: 8, fontSize: 12, borderRadius: 4 },
3639
3654
  sm: { height: 32, paddingHorizontal: 12, fontSize: 14, borderRadius: 6 },
3640
3655
  md: { height: 40, paddingHorizontal: 16, fontSize: 16, borderRadius: 6 },
3641
3656
  lg: { height: 48, paddingHorizontal: 16, fontSize: 18, borderRadius: 8 },
3642
3657
  "2xl": { height: 56, paddingHorizontal: 16, fontSize: 20, borderRadius: 8 }
3643
3658
  };
3644
- var VARIANT2 = {
3659
+ var VARIANT3 = {
3645
3660
  outline: { borderWidth: 1, borderStyle: "solid" },
3646
3661
  filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
3647
3662
  unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
@@ -3672,8 +3687,8 @@ var Input = React32__namespace.default.forwardRef(
3672
3687
  unstyled: true,
3673
3688
  className: className ? `lux-control ${className}` : "lux-control",
3674
3689
  ...CONTROL,
3675
- ...SIZE[size],
3676
- ...VARIANT2[variant],
3690
+ ...SIZE5[size],
3691
+ ...VARIANT3[variant],
3677
3692
  ...rest,
3678
3693
  onChange: handleChange
3679
3694
  }
@@ -4182,11 +4197,11 @@ var PopoverDescription = React32__namespace.forwardRef(function PopoverDescripti
4182
4197
  }
4183
4198
  );
4184
4199
  });
4185
- var SIZE_CLASSES6 = {
4186
- sm: "h-1",
4187
- md: "h-2",
4188
- lg: "h-3",
4189
- xl: "h-4"
4200
+ var SIZE6 = {
4201
+ sm: 4,
4202
+ md: 8,
4203
+ lg: 12,
4204
+ xl: 16
4190
4205
  };
4191
4206
  function normalizeValue(value, min, max) {
4192
4207
  if (value == null) return 0;
@@ -4202,7 +4217,6 @@ var Progress = React32__namespace.forwardRef(
4202
4217
  size = "md",
4203
4218
  color,
4204
4219
  trackProps,
4205
- className,
4206
4220
  style,
4207
4221
  w,
4208
4222
  flex,
@@ -4221,6 +4235,7 @@ var Progress = React32__namespace.forwardRef(
4221
4235
  }
4222
4236
  };
4223
4237
  const rootStyle = {
4238
+ position: "relative",
4224
4239
  ...style,
4225
4240
  ...w !== void 0 && { width: w === "full" ? "100%" : w },
4226
4241
  ...flex !== void 0 && { flex }
@@ -4229,7 +4244,6 @@ var Progress = React32__namespace.forwardRef(
4229
4244
  "div",
4230
4245
  {
4231
4246
  ref,
4232
- className: cn("relative", className),
4233
4247
  style: rootStyle,
4234
4248
  ...rest,
4235
4249
  children: /* @__PURE__ */ jsxRuntime.jsx(
@@ -4238,22 +4252,21 @@ var Progress = React32__namespace.forwardRef(
4238
4252
  value: percent,
4239
4253
  max: 100,
4240
4254
  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
- ),
4255
+ className: trackProps?.className,
4256
+ width: "100%",
4257
+ overflow: "hidden",
4258
+ borderRadius: 9999,
4259
+ height: SIZE6[size],
4260
+ backgroundColor: "var(--color-progress-track)",
4247
4261
  style: trackStyle,
4248
4262
  children: /* @__PURE__ */ jsxRuntime.jsx(
4249
4263
  gui.Progress.Indicator,
4250
4264
  {
4251
4265
  unstyled: true,
4252
4266
  transition: "slow",
4253
- className: cn(
4254
- "h-full rounded-full",
4255
- !color && "bg-[var(--color-progress-indicator)]"
4256
- ),
4267
+ height: "100%",
4268
+ borderRadius: 9999,
4269
+ backgroundColor: color ? void 0 : "var(--color-progress-indicator)",
4257
4270
  style: {
4258
4271
  ...color && { backgroundColor: `var(--color-${color.replace(".", "-")}, ${color})` }
4259
4272
  }
@@ -4381,32 +4394,15 @@ var ProgressCircleValueText = React32__namespace.forwardRef(function ProgressCir
4381
4394
  }
4382
4395
  );
4383
4396
  });
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
- }
4397
+ var SIZE7 = {
4398
+ xs: { rootGap: 6, control: 12, indicator: 6, label: 12 },
4399
+ sm: { rootGap: 6, control: 14, indicator: 6, label: 12 },
4400
+ md: { rootGap: 8, control: 16, indicator: 8, label: 14 },
4401
+ lg: { rootGap: 10, control: 20, indicator: 10, label: 16 }
4409
4402
  };
4403
+ var INK2 = "var(--color-text-primary)";
4404
+ var RESTING_BORDER2 = "var(--color-input-border)";
4405
+ var OUTLINE2 = "var(--color-gray-500)";
4410
4406
  var RadioSizeContext = React32__namespace.createContext("md");
4411
4407
  var RadioGroupBase = React32__namespace.forwardRef(
4412
4408
  function RadioGroup(props, ref) {
@@ -4423,7 +4419,6 @@ var RadioGroupBase = React32__namespace.forwardRef(
4423
4419
  value,
4424
4420
  onValueChange,
4425
4421
  size = "md",
4426
- className,
4427
4422
  ...rest
4428
4423
  } = props;
4429
4424
  const handleValueChange = React32__namespace.useCallback(
@@ -4445,11 +4440,9 @@ var RadioGroupBase = React32__namespace.forwardRef(
4445
4440
  defaultValue,
4446
4441
  value: value ?? void 0,
4447
4442
  onValueChange: handleValueChange,
4448
- className: cn(
4449
- "flex",
4450
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-6",
4451
- className
4452
- ),
4443
+ display: "flex",
4444
+ flexDirection: orientation === "vertical" ? "column" : "row",
4445
+ gap: orientation === "vertical" ? 12 : 24,
4453
4446
  ...rest,
4454
4447
  children
4455
4448
  }
@@ -4461,19 +4454,20 @@ var NOOP2 = () => {
4461
4454
  };
4462
4455
  var RadioBase = React32__namespace.forwardRef(
4463
4456
  function Radio(props, ref) {
4464
- const { children, inputProps, rootRef, value, disabled, className, ...rest } = props;
4457
+ const { children, inputProps, rootRef, value, disabled, ...rest } = props;
4465
4458
  const size = React32__namespace.useContext(RadioSizeContext);
4466
- const sizeClasses2 = SIZE_CLASSES7[size];
4459
+ const s = SIZE7[size];
4467
4460
  return /* @__PURE__ */ jsxRuntime.jsxs(
4468
- "label",
4461
+ gui.Label,
4469
4462
  {
4470
4463
  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
- ),
4464
+ unstyled: true,
4465
+ flexDirection: "row",
4466
+ alignItems: "center",
4467
+ gap: s.rootGap,
4468
+ cursor: disabled ? "not-allowed" : "pointer",
4469
+ userSelect: "none",
4470
+ opacity: disabled ? 0.5 : 1,
4477
4471
  "data-disabled": disabled || void 0,
4478
4472
  ...rest,
4479
4473
  children: [
@@ -4483,32 +4477,24 @@ var RadioBase = React32__namespace.forwardRef(
4483
4477
  unstyled: true,
4484
4478
  value,
4485
4479
  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
- )
4480
+ flexShrink: 0,
4481
+ alignItems: "center",
4482
+ justifyContent: "center",
4483
+ width: s.control,
4484
+ height: s.control,
4485
+ borderRadius: 9999,
4486
+ borderWidth: 2,
4487
+ borderColor: RESTING_BORDER2,
4488
+ transition: "quicker",
4489
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE2, outlineOffset: 2 },
4490
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.RadioGroup.Indicator, { unstyled: true, borderRadius: 9999, width: s.indicator, height: s.indicator, backgroundColor: INK2 })
4504
4491
  }
4505
4492
  ),
4506
- /* @__PURE__ */ jsxRuntime.jsx(
4493
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
4507
4494
  "input",
4508
4495
  {
4509
4496
  ref,
4510
4497
  type: "radio",
4511
- className: "sr-only",
4512
4498
  value,
4513
4499
  disabled,
4514
4500
  tabIndex: -1,
@@ -4516,8 +4502,8 @@ var RadioBase = React32__namespace.forwardRef(
4516
4502
  onChange: NOOP2,
4517
4503
  ...inputProps
4518
4504
  }
4519
- ),
4520
- children != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: sizeClasses2.label, children })
4505
+ ) }),
4506
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: s.label, children })
4521
4507
  ]
4522
4508
  }
4523
4509
  );
@@ -5002,6 +4988,11 @@ var Separator = React32__namespace.default.forwardRef(
5002
4988
  );
5003
4989
  }
5004
4990
  );
4991
+ var MUTED3 = "var(--color-text-secondary)";
4992
+ var TRACK = "var(--color-border-divider)";
4993
+ var ACTIVE = "var(--color-link-primary)";
4994
+ var ACTIVE_HOVER = "var(--color-link-primary-hover)";
4995
+ var WHITE = "var(--color-white)";
5005
4996
  var Slider = React32__namespace.forwardRef(
5006
4997
  function Slider2(props, ref) {
5007
4998
  const {
@@ -5034,21 +5025,23 @@ var Slider = React32__namespace.forwardRef(
5034
5025
  const handleSlideEnd = React32__namespace.useCallback(() => {
5035
5026
  onValueCommit?.(latest.current);
5036
5027
  }, [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(", ") })
5028
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { className, gap: 4, children: [
5029
+ label && !showValue && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5030
+ label && showValue && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", children: [
5031
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5032
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 14, color: MUTED3, children: (value ?? defaultValue ?? [])?.join(", ") })
5042
5033
  ] }),
5043
5034
  /* @__PURE__ */ jsxRuntime.jsxs(
5044
5035
  gui.Slider,
5045
5036
  {
5046
5037
  ref,
5047
5038
  unstyled: true,
5048
- className: cn(
5049
- "relative flex w-full touch-none select-none items-center",
5050
- hasMarkLabel && "mb-6"
5051
- ),
5039
+ position: "relative",
5040
+ flexDirection: "row",
5041
+ width: "100%",
5042
+ userSelect: "none",
5043
+ alignItems: "center",
5044
+ marginBottom: hasMarkLabel ? 24 : 0,
5052
5045
  value,
5053
5046
  defaultValue,
5054
5047
  min,
@@ -5060,33 +5053,23 @@ var Slider = React32__namespace.forwardRef(
5060
5053
  onValueChange: handleValueChange,
5061
5054
  onSlideEnd: handleSlideEnd,
5062
5055
  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
- ),
5056
+ /* @__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
5057
  resolvedValue?.map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
5078
5058
  gui.Slider.Thumb,
5079
5059
  {
5080
5060
  index,
5081
5061
  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
- )
5062
+ width: 20,
5063
+ height: 20,
5064
+ borderRadius: 9999,
5065
+ borderWidth: 2,
5066
+ borderColor: ACTIVE,
5067
+ backgroundColor: WHITE,
5068
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5069
+ transition: "quick",
5070
+ hoverStyle: { borderColor: ACTIVE_HOVER },
5071
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: ACTIVE, outlineOffset: 2 },
5072
+ disabledStyle: { pointerEvents: "none", opacity: 0.5 }
5090
5073
  },
5091
5074
  index
5092
5075
  ))
@@ -5101,41 +5084,25 @@ function SliderMarks(props) {
5101
5084
  const { marks, min, max } = props;
5102
5085
  if (!marks?.length) return null;
5103
5086
  const range = max - min;
5104
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-4", children: marks.map((mark, index) => {
5087
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.View, { position: "relative", width: "100%", height: 16, children: marks.map((mark, index) => {
5105
5088
  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
- );
5089
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { position: "absolute", left: `${percent}%`, alignItems: "center", children: [
5090
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { width: 2, height: 6, backgroundColor: TRACK }),
5091
+ mark.label != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { marginTop: 2, fontSize: 12, color: MUTED3, children: mark.label })
5092
+ ] }, index);
5118
5093
  }) });
5119
5094
  }
5120
5095
  var NOOP3 = () => {
5121
5096
  };
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
- }
5097
+ var SIZE8 = {
5098
+ sm: { width: 28, height: 16, thumb: 12, label: 12 },
5099
+ md: { width: 36, height: 20, thumb: 16, label: 14 },
5100
+ lg: { width: 44, height: 24, thumb: 20, label: 16 }
5138
5101
  };
5102
+ var TRACK_ON = "var(--color-text-primary)";
5103
+ var TRACK_OFF = "var(--color-switch-bg)";
5104
+ var OUTLINE3 = "var(--color-gray-500)";
5105
+ var WHITE2 = "var(--color-white)";
5139
5106
  var SwitchBase = React32__namespace.forwardRef(
5140
5107
  function Switch(props, ref) {
5141
5108
  const {
@@ -5152,7 +5119,6 @@ var SwitchBase = React32__namespace.forwardRef(
5152
5119
  disabled = false,
5153
5120
  size = "md",
5154
5121
  direction,
5155
- className,
5156
5122
  ...rest
5157
5123
  } = props;
5158
5124
  const [internalChecked, setInternalChecked] = React32__namespace.useState(defaultChecked ?? false);
@@ -5167,18 +5133,19 @@ var SwitchBase = React32__namespace.forwardRef(
5167
5133
  },
5168
5134
  [isControlled, onCheckedChange]
5169
5135
  );
5170
- const sizeClasses2 = SIZE_CLASSES8[size];
5136
+ const s = SIZE8[size];
5171
5137
  const isRtl = direction === "rtl";
5172
5138
  return /* @__PURE__ */ jsxRuntime.jsxs(
5173
- "label",
5139
+ gui.Label,
5174
5140
  {
5175
5141
  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
- ),
5142
+ unstyled: true,
5143
+ flexDirection: isRtl ? "row-reverse" : "row",
5144
+ alignItems: "center",
5145
+ gap: 8,
5146
+ cursor: disabled ? "not-allowed" : "pointer",
5147
+ userSelect: "none",
5148
+ opacity: disabled ? 0.5 : 1,
5182
5149
  onChange,
5183
5150
  "data-disabled": disabled || void 0,
5184
5151
  ...rest,
@@ -5190,38 +5157,51 @@ var SwitchBase = React32__namespace.forwardRef(
5190
5157
  checked: checkedState,
5191
5158
  onCheckedChange: handleCheckedChange,
5192
5159
  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
- ),
5160
+ position: "relative",
5161
+ flexShrink: 0,
5162
+ alignItems: "center",
5163
+ width: s.width,
5164
+ height: s.height,
5165
+ borderRadius: 9999,
5166
+ backgroundColor: checkedState ? TRACK_ON : TRACK_OFF,
5167
+ transition: "quick",
5168
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE3, outlineOffset: 2 },
5201
5169
  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 }),
5170
+ trackLabel && /* @__PURE__ */ jsxRuntime.jsx(
5171
+ gui.Text,
5172
+ {
5173
+ position: "absolute",
5174
+ width: "100%",
5175
+ textAlign: "center",
5176
+ fontSize: 8,
5177
+ fontWeight: "700",
5178
+ color: WHITE2,
5179
+ pointerEvents: "none",
5180
+ children: checkedState ? trackLabel.on : trackLabel.off
5181
+ }
5182
+ ),
5203
5183
  /* @__PURE__ */ jsxRuntime.jsx(
5204
5184
  gui.Switch.Thumb,
5205
5185
  {
5206
5186
  unstyled: true,
5207
5187
  "data-thumb": true,
5208
5188
  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 })
5189
+ width: s.thumb,
5190
+ height: s.thumb,
5191
+ borderRadius: 9999,
5192
+ backgroundColor: WHITE2,
5193
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5194
+ children: thumbLabel && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { width: "100%", height: "100%", textAlign: "center", fontSize: 8, children: checkedState ? thumbLabel.on : thumbLabel.off })
5214
5195
  }
5215
5196
  )
5216
5197
  ]
5217
5198
  }
5218
5199
  ),
5219
- /* @__PURE__ */ jsxRuntime.jsx(
5200
+ /* @__PURE__ */ jsxRuntime.jsx(gui.VisuallyHidden, { children: /* @__PURE__ */ jsxRuntime.jsx(
5220
5201
  "input",
5221
5202
  {
5222
5203
  ref,
5223
5204
  type: "checkbox",
5224
- className: "sr-only",
5225
5205
  checked: checkedState,
5226
5206
  disabled,
5227
5207
  tabIndex: -1,
@@ -5229,15 +5209,8 @@ var SwitchBase = React32__namespace.forwardRef(
5229
5209
  onChange: NOOP3,
5230
5210
  ...inputProps
5231
5211
  }
5232
- ),
5233
- children != null && /* @__PURE__ */ jsxRuntime.jsx(
5234
- "span",
5235
- {
5236
- ...labelProps,
5237
- className: cn(sizeClasses2.label, labelProps?.className),
5238
- children
5239
- }
5240
- )
5212
+ ) }),
5213
+ children != null && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { ...labelProps, fontSize: s.label, children })
5241
5214
  ]
5242
5215
  }
5243
5216
  );
@@ -5655,14 +5628,14 @@ var Shape = React32__namespace.createContext({
5655
5628
  size: "md",
5656
5629
  fitted: false
5657
5630
  });
5658
- var SIZE2 = {
5631
+ var SIZE9 = {
5659
5632
  sm: { height: 32, minWidth: 32, paddingVertical: 4, paddingHorizontal: 12, fontSize: 14 },
5660
5633
  md: { height: 40, minWidth: 40, paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },
5661
5634
  free: {}
5662
5635
  };
5663
5636
  var SELECTED_BG2 = "var(--color-selected-control-bg)";
5664
5637
  var SELECTED_FG2 = "var(--color-selected-control-text)";
5665
- var VARIANT3 = {
5638
+ var VARIANT4 = {
5666
5639
  solid: {
5667
5640
  rest: {
5668
5641
  fontWeight: "600",
@@ -5731,7 +5704,7 @@ var TabsList = (props) => {
5731
5704
  };
5732
5705
  var TabsTrigger = ({ children, ...props }) => {
5733
5706
  const { variant, size, fitted } = React32__namespace.useContext(Shape);
5734
- const { rest, active } = VARIANT3[variant];
5707
+ const { rest, active } = VARIANT4[variant];
5735
5708
  const selected = gui.useTabsContext().value === props.value;
5736
5709
  return /* @__PURE__ */ jsxRuntime.jsx(
5737
5710
  gui.Tabs.Tab,
@@ -5744,7 +5717,7 @@ var TabsTrigger = ({ children, ...props }) => {
5744
5717
  cursor: "pointer",
5745
5718
  gap: 8,
5746
5719
  borderWidth: 0,
5747
- ...SIZE2[size],
5720
+ ...SIZE9[size],
5748
5721
  ...rest,
5749
5722
  ...selected ? active : null,
5750
5723
  ...fitted ? { flex: 1 } : null,
@@ -5763,25 +5736,24 @@ var nbsp = String.fromCharCode(160);
5763
5736
  function TruncatedTextTooltip2({ label, children }) {
5764
5737
  return /* @__PURE__ */ jsxRuntime.jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
5765
5738
  }
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"
5739
+ var TAG_VARIANT = {
5740
+ subtle: { backgroundColor: "var(--color-tag-subtle-bg)" },
5741
+ clickable: { backgroundColor: "var(--color-tag-clickable-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } },
5742
+ filter: { backgroundColor: "var(--color-tag-filter-bg)" },
5743
+ select: { backgroundColor: "var(--color-tag-select-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } }
5772
5744
  };
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"
5745
+ var TAG_VARIANT_FG = {
5746
+ subtle: "var(--color-tag-subtle-fg)",
5747
+ clickable: "var(--color-tag-clickable-fg)",
5748
+ filter: void 0,
5749
+ select: "var(--color-tag-select-fg)"
5777
5750
  };
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";
5751
+ var TAG_SIZE = {
5752
+ sm: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 20, gap: 4 },
5753
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24, gap: 4 },
5754
+ lg: { paddingHorizontal: 6, paddingVertical: 6, minHeight: 32, minWidth: 32, gap: 4 }
5755
+ };
5756
+ var TAG_SIZE_FONT = { sm: 12, md: 14, lg: 14 };
5785
5757
  var Tag = React32__namespace.forwardRef(
5786
5758
  function Tag2(props, ref) {
5787
5759
  const {
@@ -5801,52 +5773,84 @@ var Tag = React32__namespace.forwardRef(
5801
5773
  className,
5802
5774
  ...rest
5803
5775
  } = props;
5804
- const labelElement = label ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[var(--color-text-secondary)]", children: [
5776
+ const resolvedVariant = variant ?? "subtle";
5777
+ const resolvedSize = size ?? "md";
5778
+ const isSelected = Boolean(selected) && !loading;
5779
+ const backgroundColor = isSelected ? "var(--color-tag-select-selected-bg)" : TAG_VARIANT[resolvedVariant].backgroundColor;
5780
+ const color = isSelected ? "var(--color-tag-select-selected-fg)" : TAG_VARIANT_FG[resolvedVariant];
5781
+ const hoverStyle = isSelected ? { opacity: 0.76 } : TAG_VARIANT[resolvedVariant].hoverStyle;
5782
+ const textHoverColor = !isSelected && resolvedVariant === "select" ? "var(--color-hover)" : void 0;
5783
+ const labelElement = label ? /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: TAG_SIZE_FONT[resolvedSize], fontWeight: "500", color: "var(--color-text-secondary)", children: [
5805
5784
  label,
5806
5785
  ":",
5807
5786
  nbsp
5808
5787
  ] }) : 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
- ] });
5788
+ const labelSpan = /* @__PURE__ */ jsxRuntime.jsxs(
5789
+ gui.Text,
5790
+ {
5791
+ overflow: "hidden",
5792
+ textOverflow: "ellipsis",
5793
+ whiteSpace: "nowrap",
5794
+ fontWeight: "500",
5795
+ fontSize: TAG_SIZE_FONT[resolvedSize],
5796
+ color,
5797
+ hoverStyle: textHoverColor ? { color: textHoverColor } : void 0,
5798
+ children: [
5799
+ labelElement,
5800
+ children
5801
+ ]
5802
+ }
5803
+ );
5813
5804
  const contentElement = truncated ? /* @__PURE__ */ jsxRuntime.jsx(TruncatedTextTooltip2, { label: children, children: labelSpan }) : labelSpan;
5814
5805
  return /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { loading, asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
5815
- "span",
5806
+ gui.XStack,
5816
5807
  {
5817
5808
  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 },
5809
+ render: /* @__PURE__ */ jsxRuntime.jsx("span", {}),
5810
+ display: "inline-flex",
5811
+ alignItems: "center",
5812
+ verticalAlign: "top",
5813
+ maxWidth: "100%",
5814
+ userSelect: "text",
5815
+ ...TAG_SIZE[resolvedSize],
5816
+ backgroundColor,
5817
+ hoverStyle,
5818
+ focusVisibleStyle: {
5819
+ outlineWidth: 2,
5820
+ outlineOffset: 2,
5821
+ outlineColor: "var(--color-gray-500)",
5822
+ outlineStyle: "solid"
5823
+ },
5824
+ cursor: disabled ? "not-allowed" : TAG_VARIANT[resolvedVariant].cursor,
5825
+ ...disabled ? { opacity: 0.4, pointerEvents: "none" } : {},
5826
+ ...isSelected && { "data-selected": true },
5827
5827
  ...disabled && { "data-disabled": true },
5828
+ className,
5828
5829
  ...rest,
5829
5830
  children: [
5830
- startElement && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 inline-flex items-center justify-center empty:hidden", children: startElement }),
5831
+ startElement && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: startElement }),
5831
5832
  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 }) })
5833
+ endElement && (() => {
5834
+ const { className: endClassName, ...endElementRest } = endElementProps ?? {};
5835
+ return /* @__PURE__ */ jsxRuntime.jsx(
5836
+ gui.XStack,
5837
+ {
5838
+ ...endElementRest,
5839
+ flexShrink: 0,
5840
+ alignItems: "center",
5841
+ justifyContent: "center",
5842
+ className: endClassName,
5843
+ children: endElement
5844
+ }
5845
+ );
5846
+ })(),
5847
+ closable && /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { onClick: onClose }) })
5844
5848
  ]
5845
5849
  }
5846
5850
  ) });
5847
5851
  }
5848
5852
  );
5849
- var SIZE3 = {
5853
+ var SIZE10 = {
5850
5854
  xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, borderRadius: 4 },
5851
5855
  sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, borderRadius: 6 },
5852
5856
  md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: 16, borderRadius: 6 },
@@ -5869,8 +5873,8 @@ var Textarea = React32__namespace.default.forwardRef(
5869
5873
  unstyled: true,
5870
5874
  className: className ? `lux-control ${className}` : "lux-control",
5871
5875
  ...CONTROL,
5872
- ...SIZE3[size],
5873
- ...VARIANT2[variant],
5876
+ ...SIZE10[size],
5877
+ ...VARIANT3[variant],
5874
5878
  ...rest,
5875
5879
  onChange: handleChange
5876
5880
  }
@@ -5979,20 +5983,55 @@ function fmtPct(n) {
5979
5983
  if (n === void 0 || n === null) return "-";
5980
5984
  return `${(n * 100).toFixed(1)}%`;
5981
5985
  }
5986
+ var justify = (align) => align === "right" ? "flex-end" : align === "left" ? "flex-start" : "center";
5982
5987
  function QuoteCell({ value, highlight, align = "right", onClick, className }) {
5983
5988
  return /* @__PURE__ */ jsxRuntime.jsx(
5984
- "td",
5989
+ gui.View,
5985
5990
  {
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
- ),
5991
+ unstyled: true,
5992
+ render: /* @__PURE__ */ jsxRuntime.jsx("td", {}),
5994
5993
  onClick,
5995
- children: value
5994
+ paddingHorizontal: 6,
5995
+ paddingVertical: 4,
5996
+ cursor: onClick ? "pointer" : void 0,
5997
+ transition: "quick",
5998
+ hoverStyle: onClick ? { backgroundColor: "var(--color-popover-item-hover)" } : void 0,
5999
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6000
+ className,
6001
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6002
+ gui.Text,
6003
+ {
6004
+ fontSize: 12,
6005
+ style: { fontFamily: "monospace", whiteSpace: "nowrap" },
6006
+ fontVariant: ["tabular-nums"],
6007
+ color: highlight ? "var(--color-text-primary)" : "var(--color-text-secondary)",
6008
+ children: value
6009
+ }
6010
+ )
6011
+ }
6012
+ );
6013
+ }
6014
+ function HeadCell({ children, colSpan, align = "center", size = "column", color }) {
6015
+ return /* @__PURE__ */ jsxRuntime.jsx(
6016
+ gui.View,
6017
+ {
6018
+ unstyled: true,
6019
+ render: colSpan ? /* @__PURE__ */ jsxRuntime.jsx("th", { colSpan }) : /* @__PURE__ */ jsxRuntime.jsx("th", {}),
6020
+ paddingHorizontal: size === "group" ? 8 : 6,
6021
+ paddingVertical: size === "group" ? 6 : 4,
6022
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6023
+ children: children != null && /* @__PURE__ */ jsxRuntime.jsx(
6024
+ gui.Text,
6025
+ {
6026
+ fontSize: 10,
6027
+ fontWeight: size === "group" ? "600" : "500",
6028
+ textTransform: "uppercase",
6029
+ letterSpacing: 0.5,
6030
+ style: { whiteSpace: "nowrap" },
6031
+ color: color ?? "var(--color-text-secondary)",
6032
+ children
6033
+ }
6034
+ )
5996
6035
  }
5997
6036
  );
5998
6037
  }
@@ -6023,71 +6062,51 @@ var OptionChain = React32__namespace.forwardRef(
6023
6062
  [onSelectContract]
6024
6063
  );
6025
6064
  return /* @__PURE__ */ jsxRuntime.jsx(
6026
- "div",
6065
+ gui.View,
6027
6066
  {
6028
6067
  ref,
6029
- className: cn("w-full overflow-x-auto", className),
6068
+ unstyled: true,
6069
+ width: "100%",
6070
+ overflowX: "auto",
6071
+ className,
6030
6072
  ...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
- )
6073
+ children: /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("table", {}), width: "100%", style: { borderCollapse: "collapse" }, children: [
6074
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("thead", {}), children: [
6075
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-border-divider)", children: [
6076
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { colSpan: CALL_HEADERS.length, size: "group", color: "var(--color-status-good)", children: "Calls" }),
6077
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { size: "group", children: "Strike" }),
6078
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { colSpan: PUT_HEADERS.length, size: "group", color: "var(--color-status-bad)", children: "Puts" })
6051
6079
  ] }),
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" }),
6080
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-popover-item-hover)", children: [
6081
+ CALL_HEADERS.map((h) => /* @__PURE__ */ jsxRuntime.jsx(HeadCell, { align: "right", children: h }, `call-${h}`)),
6082
+ /* @__PURE__ */ jsxRuntime.jsx(HeadCell, {}),
6062
6083
  PUT_HEADERS.map((h) => /* @__PURE__ */ jsxRuntime.jsx(
6063
- "th",
6084
+ HeadCell,
6064
6085
  {
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
- ),
6086
+ align: h === "Bid" || h === "Ask" || h === "Last" ? "left" : "right",
6069
6087
  children: h
6070
6088
  },
6071
6089
  `put-${h}`
6072
6090
  ))
6073
6091
  ] })
6074
6092
  ] }),
6075
- /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: strikes.map((row) => {
6093
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { unstyled: true, render: /* @__PURE__ */ jsxRuntime.jsx("tbody", {}), children: strikes.map((row) => {
6076
6094
  const isATM = Math.abs(row.strike - spotPrice) <= (strikes.length > 1 ? Math.abs((strikes[1]?.strike ?? 0) - (strikes[0]?.strike ?? 0)) / 2 : 0.5);
6077
6095
  const callITM = row.strike < spotPrice;
6078
6096
  const putITM = row.strike > spotPrice;
6079
6097
  const c = row.call;
6080
6098
  const p = row.put;
6099
+ 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
6100
  return /* @__PURE__ */ jsxRuntime.jsxs(
6082
- "tr",
6101
+ gui.View,
6083
6102
  {
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
- ),
6103
+ unstyled: true,
6104
+ render: /* @__PURE__ */ jsxRuntime.jsx("tr", {}),
6105
+ borderBottomWidth: 1,
6106
+ borderColor: "color-mix(in srgb, var(--color-border-divider) 50%, transparent)",
6107
+ transition: "quick",
6108
+ backgroundColor: rowBg,
6109
+ hoverStyle: isATM || callITM || putITM ? void 0 : { backgroundColor: "var(--color-popover-item-hover)" },
6091
6110
  children: [
6092
6111
  /* @__PURE__ */ jsxRuntime.jsx(
6093
6112
  QuoteCell,
@@ -6111,13 +6130,24 @@ var OptionChain = React32__namespace.forwardRef(
6111
6130
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmtPct(c?.iv) }),
6112
6131
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmt(c?.delta, 3) }),
6113
6132
  /* @__PURE__ */ jsxRuntime.jsx(
6114
- "td",
6133
+ gui.View,
6115
6134
  {
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)
6135
+ unstyled: true,
6136
+ render: /* @__PURE__ */ jsxRuntime.jsx("td", {}),
6137
+ paddingHorizontal: 8,
6138
+ paddingVertical: 4,
6139
+ style: { display: "flex", alignItems: "center", justifyContent: "center" },
6140
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6141
+ gui.Text,
6142
+ {
6143
+ fontSize: 12,
6144
+ fontWeight: "600",
6145
+ style: { fontFamily: "monospace" },
6146
+ fontVariant: ["tabular-nums"],
6147
+ color: isATM ? "var(--foreground)" : "var(--muted-foreground)",
6148
+ children: fmt(row.strike)
6149
+ }
6150
+ )
6121
6151
  }
6122
6152
  ),
6123
6153
  /* @__PURE__ */ jsxRuntime.jsx(QuoteCell, { value: fmt(p?.delta, 3), align: "right" }),
@@ -6154,40 +6184,54 @@ var OptionChain = React32__namespace.forwardRef(
6154
6184
  }
6155
6185
  );
6156
6186
  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 }
6187
+ { key: "delta", label: "Delta", symbol: "\u0394", color: "var(--foreground)", barColor: "var(--foreground)", decimals: 4, maxMagnitude: 1 },
6188
+ { key: "gamma", label: "Gamma", symbol: "\u0393", color: "var(--chart-1)", barColor: "var(--chart-1)", decimals: 4, maxMagnitude: 0.1 },
6189
+ { key: "theta", label: "Theta", symbol: "\u0398", color: "var(--chart-4)", barColor: "var(--chart-4)", decimals: 4, maxMagnitude: 1 },
6190
+ { key: "vega", label: "Vega", symbol: "\u03BD", color: "var(--chart-2)", barColor: "var(--chart-2)", decimals: 4, maxMagnitude: 1 },
6191
+ { key: "rho", label: "Rho", symbol: "\u03C1", color: "var(--chart-3)", barColor: "var(--chart-3)", decimals: 4, maxMagnitude: 1 },
6192
+ { key: "iv", label: "IV", symbol: "\u03C3", color: "var(--chart-5)", barColor: "var(--chart-5)", decimals: 1, maxMagnitude: 100 }
6163
6193
  ];
6164
6194
  function GreekItem({ def, value, compact }) {
6165
6195
  const magnitude = Math.min(Math.abs(value) / def.maxMagnitude, 1);
6166
6196
  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",
6197
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, minWidth: compact ? 0 : 100, children: [
6198
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, fontWeight: "600", flexShrink: 0, color: def.color, children: def.symbol }),
6199
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, flexShrink: 0, width: 34, color: "var(--color-text-secondary)", children: def.label }),
6200
+ /* @__PURE__ */ jsxRuntime.jsx(
6201
+ gui.Text,
6202
+ {
6203
+ fontSize: 12,
6204
+ flexShrink: 0,
6205
+ style: { fontFamily: "monospace" },
6206
+ fontVariant: ["tabular-nums"],
6207
+ color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-primary)",
6208
+ children: displayValue
6209
+ }
6210
+ ),
6211
+ !compact && /* @__PURE__ */ jsxRuntime.jsx(
6212
+ gui.View,
6213
+ {
6214
+ flex: 1,
6215
+ height: 4,
6216
+ borderRadius: 9999,
6217
+ minWidth: 24,
6218
+ maxWidth: 48,
6219
+ overflow: "hidden",
6220
+ backgroundColor: "var(--color-progress-track)",
6221
+ children: /* @__PURE__ */ jsxRuntime.jsx(
6222
+ gui.View,
6183
6223
  {
6184
- className: cn("h-full rounded-full transition-all", def.barColor),
6185
- style: { width: `${magnitude * 100}%`, opacity: 0.7 }
6224
+ height: "100%",
6225
+ borderRadius: 9999,
6226
+ transition: "quick",
6227
+ width: `${magnitude * 100}%`,
6228
+ opacity: 0.7,
6229
+ backgroundColor: def.barColor
6186
6230
  }
6187
- ) })
6188
- ]
6189
- }
6190
- );
6231
+ )
6232
+ }
6233
+ )
6234
+ ] });
6191
6235
  }
6192
6236
  var GreeksDisplay = React32__namespace.forwardRef(
6193
6237
  function GreeksDisplay2(props, ref) {
@@ -6212,14 +6256,13 @@ var GreeksDisplay = React32__namespace.forwardRef(
6212
6256
  };
6213
6257
  const activeGreeks = GREEKS.filter((g) => values[g.key] !== void 0);
6214
6258
  return /* @__PURE__ */ jsxRuntime.jsx(
6215
- "div",
6259
+ gui.XStack,
6216
6260
  {
6217
6261
  ref,
6218
- className: cn(
6219
- "flex flex-wrap items-center",
6220
- compact ? "gap-3" : "gap-4",
6221
- className
6222
- ),
6262
+ flexWrap: "wrap",
6263
+ alignItems: "center",
6264
+ gap: compact ? 12 : 16,
6265
+ className,
6223
6266
  ...rest,
6224
6267
  children: activeGreeks.map((g) => /* @__PURE__ */ jsxRuntime.jsx(
6225
6268
  GreekItem,
@@ -6706,19 +6749,21 @@ var PnlDiagram = React32__namespace.forwardRef(
6706
6749
  chartH
6707
6750
  );
6708
6751
  return /* @__PURE__ */ jsxRuntime.jsxs(
6709
- "div",
6752
+ gui.View,
6710
6753
  {
6711
6754
  ref,
6712
- className: cn("w-full", className),
6755
+ unstyled: true,
6756
+ width: "100%",
6757
+ className,
6713
6758
  ...rest,
6714
6759
  children: [
6715
- /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: "w-full h-full min-h-[200px]", children: /* @__PURE__ */ jsxRuntime.jsxs(
6760
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { unstyled: true, ref: containerRef, width: "100%", height: "100%", minHeight: 200, children: /* @__PURE__ */ jsxRuntime.jsxs(
6716
6761
  "svg",
6717
6762
  {
6718
6763
  width,
6719
6764
  height,
6720
6765
  viewBox: `0 0 ${width} ${height}`,
6721
- className: "select-none",
6766
+ style: { userSelect: "none" },
6722
6767
  onMouseMove: handleMouseMove,
6723
6768
  onMouseLeave: handleMouseLeave,
6724
6769
  children: [
@@ -6957,16 +7002,18 @@ var PnlDiagram = React32__namespace.forwardRef(
6957
7002
  ]
6958
7003
  }
6959
7004
  ) }),
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" })
7005
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { flexWrap: "wrap", alignItems: "center", gap: 16, paddingHorizontal: 8, paddingTop: 4, children: [
7006
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
7007
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { height: 2, width: 16, borderRadius: 4, backgroundColor: "var(--color-gray-200)" }),
7008
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: "Combined" })
6964
7009
  ] }),
6965
- legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1.5", children: [
7010
+ legs.map((leg, i) => /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
6966
7011
  /* @__PURE__ */ jsxRuntime.jsx(
6967
- "div",
7012
+ gui.View,
6968
7013
  {
6969
- className: "h-0.5 w-4 rounded",
7014
+ height: 2,
7015
+ width: 16,
7016
+ borderRadius: 4,
6970
7017
  style: {
6971
7018
  backgroundColor: LEG_COLORS[i % LEG_COLORS.length],
6972
7019
  opacity: 0.6,
@@ -6974,7 +7021,7 @@ var PnlDiagram = React32__namespace.forwardRef(
6974
7021
  }
6975
7022
  }
6976
7023
  ),
6977
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[10px] text-zinc-500", children: [
7024
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6978
7025
  leg.action === "buy" ? "B" : "S",
6979
7026
  " ",
6980
7027
  leg.quantity,
@@ -6984,9 +7031,9 @@ var PnlDiagram = React32__namespace.forwardRef(
6984
7031
  leg.type === "call" ? "C" : "P"
6985
7032
  ] })
6986
7033
  ] }, 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: [
7034
+ breakevens.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 6, children: [
7035
+ /* @__PURE__ */ jsxRuntime.jsx(gui.View, { width: 6, height: 6, borderRadius: 9999, style: { background: BREAKEVEN_COLOR } }),
7036
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6990
7037
  "BE: ",
6991
7038
  breakevens.map((b) => b.toFixed(1)).join(", ")
6992
7039
  ] })
@@ -7001,6 +7048,7 @@ function formatDate(date) {
7001
7048
  const d = new Date(date);
7002
7049
  return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
7003
7050
  }
7051
+ var MONO = { fontFamily: "monospace" };
7004
7052
  var OptionPositionCard = React32__namespace.forwardRef(
7005
7053
  function OptionPositionCard2(props, ref) {
7006
7054
  const {
@@ -7014,64 +7062,76 @@ var OptionPositionCard = React32__namespace.forwardRef(
7014
7062
  const isLong = position.quantity > 0;
7015
7063
  const isCall = position.type === "call";
7016
7064
  const isProfitable = position.pnl >= 0;
7065
+ const pnlColor = isProfitable ? "var(--color-status-good)" : "var(--color-status-bad)";
7017
7066
  return /* @__PURE__ */ jsxRuntime.jsxs(
7018
- "div",
7067
+ gui.YStack,
7019
7068
  {
7020
7069
  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
- ),
7070
+ gap: 8,
7071
+ borderRadius: 8,
7072
+ borderWidth: 1,
7073
+ borderColor: "var(--color-border-divider)",
7074
+ backgroundColor: "var(--card)",
7075
+ padding: 12,
7076
+ className,
7025
7077
  ...rest,
7026
7078
  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
- ] })
7079
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", justifyContent: "space-between", children: [
7080
+ /* @__PURE__ */ jsxRuntime.jsx(gui.XStack, { alignItems: "center", gap: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(
7081
+ gui.XStack,
7082
+ {
7083
+ alignItems: "center",
7084
+ gap: 4,
7085
+ borderRadius: 4,
7086
+ paddingHorizontal: 6,
7087
+ paddingVertical: 2,
7088
+ backgroundColor: isCall ? "var(--secondary)" : "var(--muted)",
7089
+ children: [
7090
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.underlying }),
7091
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", style: MONO, fontVariant: ["tabular-nums"], color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.strike }),
7092
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "600", textTransform: "uppercase", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.type === "call" ? "C" : "P" }),
7093
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "400", color: "var(--color-text-secondary)", children: formatDate(position.expiration) })
7094
+ ]
7095
+ }
7096
+ ) }),
7097
+ /* @__PURE__ */ jsxRuntime.jsxs(
7098
+ gui.Text,
7099
+ {
7100
+ fontSize: 12,
7101
+ fontWeight: "600",
7102
+ style: MONO,
7103
+ fontVariant: ["tabular-nums"],
7104
+ color: isLong ? "var(--color-status-good)" : "var(--color-status-bad)",
7105
+ children: [
7106
+ isLong ? "+" : "",
7107
+ position.quantity
7108
+ ]
7109
+ }
7110
+ )
7045
7111
  ] }),
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: [
7112
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { gap: 12, children: [
7113
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, children: [
7114
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Avg Cost" }),
7115
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, style: MONO, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7050
7116
  "$",
7051
7117
  position.avgCost.toFixed(2)
7052
7118
  ] })
7053
7119
  ] }),
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: [
7120
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, children: [
7121
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Value" }),
7122
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, style: MONO, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7057
7123
  "$",
7058
7124
  position.currentValue.toFixed(2)
7059
7125
  ] })
7060
7126
  ] }),
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: [
7127
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { flex: 1, gap: 2, alignItems: "flex-end", children: [
7128
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "P/L" }),
7129
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 4, children: [
7130
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 12, fontWeight: "600", style: MONO, fontVariant: ["tabular-nums"], color: pnlColor, children: [
7068
7131
  isProfitable ? "+" : "",
7069
7132
  position.pnl.toFixed(2)
7070
7133
  ] }),
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: [
7134
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.Text, { fontSize: 10, style: MONO, fontVariant: ["tabular-nums"], color: pnlColor, opacity: 0.7, children: [
7075
7135
  "(",
7076
7136
  isProfitable ? "+" : "",
7077
7137
  position.pnlPercent.toFixed(1),
@@ -7080,53 +7140,47 @@ var OptionPositionCard = React32__namespace.forwardRef(
7080
7140
  ] })
7081
7141
  ] })
7082
7142
  ] }),
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" })
7143
+ /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 12, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7144
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0394", value: position.greeks.delta, color: "var(--foreground)" }),
7145
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0393", value: position.greeks.gamma, color: "var(--chart-1)" }),
7146
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u0398", value: position.greeks.theta, color: "var(--chart-4)" }),
7147
+ /* @__PURE__ */ jsxRuntime.jsx(GreekPill, { label: "\u03BD", value: position.greeks.vega, color: "var(--chart-2)" })
7088
7148
  ] }),
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
- )
7149
+ (onClose || onExercise || onRoll) && /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 8, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7150
+ onClose && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onClose(position), children: "Close" }),
7151
+ onExercise && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onExercise(position), children: "Exercise" }),
7152
+ onRoll && /* @__PURE__ */ jsxRuntime.jsx(ActionButton, { onClick: () => onRoll(position), children: "Roll" })
7117
7153
  ] })
7118
7154
  ]
7119
7155
  }
7120
7156
  );
7121
7157
  }
7122
7158
  );
7159
+ function ActionButton({ onClick, children }) {
7160
+ return /* @__PURE__ */ jsxRuntime.jsx(
7161
+ gui.XStack,
7162
+ {
7163
+ unstyled: true,
7164
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
7165
+ onClick,
7166
+ flex: 1,
7167
+ alignItems: "center",
7168
+ justifyContent: "center",
7169
+ borderRadius: 6,
7170
+ borderWidth: 0,
7171
+ paddingHorizontal: 8,
7172
+ paddingVertical: 4,
7173
+ backgroundColor: "var(--color-button-subtle-bg)",
7174
+ cursor: "pointer",
7175
+ hoverStyle: { color: "var(--color-hover)" },
7176
+ children: /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 12, fontWeight: "500", color: "var(--color-button-subtle-fg)", children })
7177
+ }
7178
+ );
7179
+ }
7123
7180
  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) })
7181
+ return /* @__PURE__ */ jsxRuntime.jsxs(gui.XStack, { alignItems: "center", gap: 4, children: [
7182
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 10, fontWeight: "600", color, children: label }),
7183
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { fontSize: 11, style: MONO, fontVariant: ["tabular-nums"], color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-secondary)", children: value.toFixed(4) })
7130
7184
  ] });
7131
7185
  }
7132
7186
  function formatExpDate(date) {
@@ -7139,28 +7193,53 @@ var GROUP_LABELS = {
7139
7193
  monthly: "Monthly",
7140
7194
  quarterly: "Quarterly"
7141
7195
  };
7196
+ var SHAPE = {
7197
+ selected: {
7198
+ borderColor: "transparent",
7199
+ backgroundColor: "var(--color-selected-control-bg)",
7200
+ color: "var(--color-selected-control-text)"
7201
+ },
7202
+ resting: {
7203
+ borderColor: "var(--color-border-divider)",
7204
+ backgroundColor: "var(--card)",
7205
+ color: "var(--color-text-secondary)",
7206
+ hoverStyle: { borderColor: "var(--color-hover)", color: "var(--color-hover)" }
7207
+ }
7208
+ };
7142
7209
  function ExpirationPill({ exp, isSelected, onClick }) {
7210
+ const shape = isSelected ? SHAPE.selected : SHAPE.resting;
7211
+ const dteColor = exp.dte <= 7 && !isSelected ? "var(--color-status-warn)" : isSelected ? "var(--color-selected-control-text)" : "var(--muted-foreground)";
7143
7212
  return /* @__PURE__ */ jsxRuntime.jsxs(
7144
- "button",
7213
+ gui.YStack,
7145
7214
  {
7146
- type: "button",
7215
+ unstyled: true,
7216
+ render: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button" }),
7147
7217
  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
- ),
7218
+ alignItems: "center",
7219
+ gap: 2,
7220
+ borderRadius: 6,
7221
+ paddingHorizontal: 12,
7222
+ paddingVertical: 6,
7223
+ flexShrink: 0,
7224
+ borderWidth: 1,
7225
+ borderStyle: "solid",
7226
+ cursor: "pointer",
7227
+ ...shape,
7153
7228
  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
- ] })
7229
+ /* @__PURE__ */ jsxRuntime.jsx(gui.Text, { unstyled: true, fontSize: 12, fontWeight: "500", style: { whiteSpace: "nowrap" }, children: formatExpDate(exp.date) }),
7230
+ /* @__PURE__ */ jsxRuntime.jsxs(
7231
+ gui.Text,
7232
+ {
7233
+ fontVariant: ["tabular-nums"],
7234
+ style: { fontFamily: "monospace" },
7235
+ fontSize: 10,
7236
+ color: dteColor,
7237
+ children: [
7238
+ exp.dte,
7239
+ "d"
7240
+ ]
7241
+ }
7242
+ )
7164
7243
  ]
7165
7244
  }
7166
7245
  );
@@ -7190,49 +7269,23 @@ var ExpirationSelector = React32__namespace.forwardRef(
7190
7269
  label: GROUP_LABELS[type],
7191
7270
  items: expirations.filter((e) => e.type === type)
7192
7271
  })).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",
7272
+ return /* @__PURE__ */ jsxRuntime.jsx(gui.YStack, { ref, gap: 8, className, ...rest, children: grouped.map((group) => /* @__PURE__ */ jsxRuntime.jsxs(gui.YStack, { gap: 4, children: [
7273
+ /* @__PURE__ */ jsxRuntime.jsx(
7274
+ gui.Text,
7221
7275
  {
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))
7276
+ fontSize: 10,
7277
+ fontWeight: "600",
7278
+ textTransform: "uppercase",
7279
+ letterSpacing: 0.5,
7280
+ paddingHorizontal: 4,
7281
+ color: "var(--color-text-secondary)",
7282
+ children: group.label
7232
7283
  }
7233
- )
7234
- }
7235
- );
7284
+ ),
7285
+ /* @__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)) })
7286
+ ] }, group.type)) });
7287
+ }
7288
+ 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
7289
  }
7237
7290
  );
7238
7291
  var bankColors = {