@luxfi/ui 7.4.11 → 7.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/alert.cjs +68 -46
  2. package/dist/alert.js +69 -46
  3. package/dist/avatar.cjs +49 -47
  4. package/dist/avatar.js +52 -49
  5. package/dist/badge.cjs +82 -49
  6. package/dist/badge.js +83 -50
  7. package/dist/checkbox.cjs +42 -75
  8. package/dist/checkbox.js +43 -76
  9. package/dist/chrome.cjs +3 -7
  10. package/dist/chrome.js +3 -7
  11. package/dist/close-button.cjs +3 -7
  12. package/dist/close-button.js +3 -7
  13. package/dist/dialog.cjs +3 -7
  14. package/dist/dialog.js +3 -7
  15. package/dist/drawer.cjs +3 -7
  16. package/dist/drawer.js +3 -7
  17. package/dist/empty-state.cjs +13 -13
  18. package/dist/empty-state.js +13 -13
  19. package/dist/expiration-selector.cjs +58 -63
  20. package/dist/expiration-selector.js +58 -63
  21. package/dist/greeks-display.cjs +48 -39
  22. package/dist/greeks-display.js +48 -39
  23. package/dist/index.cjs +1053 -888
  24. package/dist/index.js +1054 -889
  25. package/dist/input-group.cjs +36 -19
  26. package/dist/input-group.js +37 -19
  27. package/dist/option-chain.cjs +89 -67
  28. package/dist/option-chain.js +89 -67
  29. package/dist/option-position.cjs +88 -85
  30. package/dist/option-position.js +88 -85
  31. package/dist/pin-input.cjs +30 -29
  32. package/dist/pin-input.js +30 -29
  33. package/dist/pnl-diagram.cjs +20 -20
  34. package/dist/pnl-diagram.js +20 -20
  35. package/dist/popover.cjs +3 -7
  36. package/dist/popover.js +3 -7
  37. package/dist/progress-circle.cjs +40 -22
  38. package/dist/progress-circle.d.cts +5 -5
  39. package/dist/progress-circle.d.ts +5 -5
  40. package/dist/progress-circle.js +41 -22
  41. package/dist/progress.cjs +15 -22
  42. package/dist/progress.d.cts +6 -6
  43. package/dist/progress.d.ts +6 -6
  44. package/dist/progress.js +15 -22
  45. package/dist/radio.cjs +35 -68
  46. package/dist/radio.d.cts +18 -18
  47. package/dist/radio.d.ts +18 -18
  48. package/dist/radio.js +36 -69
  49. package/dist/rating.cjs +15 -17
  50. package/dist/rating.js +15 -17
  51. package/dist/slider.cjs +33 -50
  52. package/dist/slider.js +34 -51
  53. package/dist/strategy-builder.cjs +194 -115
  54. package/dist/strategy-builder.js +194 -115
  55. package/dist/switch.cjs +48 -55
  56. package/dist/switch.js +49 -56
  57. package/dist/tag.cjs +115 -69
  58. package/dist/tag.js +116 -69
  59. package/dist/tooltip.cjs +28 -17
  60. package/dist/tooltip.js +30 -18
  61. package/package.json +1 -1
  62. package/src/alert.tsx +78 -45
  63. package/src/avatar.tsx +54 -38
  64. package/src/badge.tsx +65 -44
  65. package/src/checkbox.tsx +70 -89
  66. package/src/close-button.tsx +3 -8
  67. package/src/empty-state.tsx +21 -17
  68. package/src/expiration-selector.tsx +84 -66
  69. package/src/greeks-display.tsx +59 -51
  70. package/src/input-group.tsx +38 -24
  71. package/src/option-chain.tsx +154 -104
  72. package/src/option-position.tsx +143 -114
  73. package/src/pin-input.tsx +37 -29
  74. package/src/pnl-diagram.tsx +36 -28
  75. package/src/progress-circle.tsx +52 -28
  76. package/src/progress.tsx +17 -21
  77. package/src/radio.tsx +56 -76
  78. package/src/rating.tsx +22 -20
  79. package/src/slider.tsx +43 -45
  80. package/src/strategy-builder.tsx +260 -162
  81. package/src/switch.tsx +63 -64
  82. package/src/tag.tsx +89 -51
  83. package/src/tooltip.tsx +21 -13
  84. package/tokens.css +18 -0
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { createGui, styled, View, Sheet, Dialog, Avatar as Avatar$1, TooltipGroup, Tooltip as Tooltip$1, Checkbox, YStack, Label, Text, H3, H2, H1, Input as Input$1, Popover, Progress as Progress$1, RadioGroup, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Switch, TextArea, GuiProvider, XStack, Menu, Accordion, Collapsible, Tabs, useTabsContext, ToastProvider, ToastViewport, Toast } from '@hanzo/gui';
2
+ import { createGui, styled, View, Sheet, Dialog, XStack, YStack, Text, Avatar as Avatar$1, TooltipGroup, Tooltip as Tooltip$1, Label, Checkbox, VisuallyHidden, H3, H2, H1, Input as Input$1, Popover, Progress as Progress$1, RadioGroup, Select as Select$1, Separator as Separator$1, Slider as Slider$1, Switch, TextArea, GuiProvider, Menu, Accordion, Collapsible, Tabs, useTabsContext, ToastProvider, ToastViewport, Toast } from '@hanzo/gui';
3
3
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
4
4
  import * as React32 from 'react';
5
5
  import React32__default, { Children, createElement } from 'react';
@@ -542,23 +542,19 @@ var CloseButtonFrame = styled(View, {
542
542
  }
543
543
  }
544
544
  });
545
- var CLOSE_BUTTON_CLASSES = [
546
- "text-[var(--closeButton-fg,currentColor)]",
547
- "hover:text-[var(--hover-color,currentColor)]",
548
- "disabled:opacity-40"
549
- ].join(" ");
550
545
  var CloseButton = React32.forwardRef(function CloseButton2(props, ref) {
551
546
  const { variant: _variant, size: _size, className, children, ...rest } = props;
552
547
  return /* @__PURE__ */ jsx(
553
548
  CloseButtonFrame,
554
549
  {
555
550
  ref,
556
- className: [CLOSE_BUTTON_CLASSES, className].filter(Boolean).join(" "),
551
+ className,
557
552
  ...rest,
558
553
  children: children ?? /* @__PURE__ */ jsx(
559
554
  "svg",
560
555
  {
561
- className: "size-5",
556
+ width: 20,
557
+ height: 20,
562
558
  viewBox: "0 0 20 20",
563
559
  fill: "none",
564
560
  "aria-hidden": "true",
@@ -1456,22 +1452,30 @@ function LoadingBar({ loading = true }) {
1456
1452
  if (!loading) return null;
1457
1453
  return /* @__PURE__ */ jsx("div", { className: "lux-loading", role: "progressbar", "aria-busy": "true", "aria-label": "Loading" });
1458
1454
  }
1459
- var IndicatorIcon2 = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ 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" }) });
1460
- var ALERT_BASE = "w-full flex items-start relative rounded text-[var(--color-alert-fg)]";
1461
- var STATUS_CLASSES = {
1462
- info: "bg-[var(--color-alert-bg-info)]",
1463
- warning: "bg-[var(--color-alert-bg-warning)]",
1464
- warning_table: "bg-[var(--color-alert-bg-warning-table)]",
1465
- success: "bg-[var(--color-alert-bg-success)]",
1466
- error: "bg-[var(--color-alert-bg-error)]"
1455
+ var IndicatorIcon2 = () => /* @__PURE__ */ jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ 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" }) });
1456
+ var ALERT_BASE = {
1457
+ width: "100%",
1458
+ position: "relative",
1459
+ alignItems: "flex-start",
1460
+ borderRadius: 4,
1461
+ gap: 8,
1462
+ paddingVertical: 8
1467
1463
  };
1468
- var SIZE_CLASSES = {
1469
- sm: "gap-2 px-2 py-2 text-xs",
1470
- md: "gap-2 px-3 py-2 text-base"
1464
+ var ALERT_FG = "var(--color-alert-fg)";
1465
+ var STATUS_BG = {
1466
+ info: "var(--color-alert-bg-info)",
1467
+ warning: "var(--color-alert-bg-warning)",
1468
+ warning_table: "var(--color-alert-bg-warning-table)",
1469
+ success: "var(--color-alert-bg-success)",
1470
+ error: "var(--color-alert-bg-error)"
1471
+ };
1472
+ var SIZE = {
1473
+ sm: { paddingHorizontal: 8, fontSize: 12 },
1474
+ md: { paddingHorizontal: 12, fontSize: 16 }
1471
1475
  };
1472
- var INDICATOR_SIZE_CLASSES = {
1473
- sm: "w-5 h-5 my-0",
1474
- md: "w-5 h-5 my-[2px]"
1476
+ var INDICATOR_SIZE = {
1477
+ sm: { marginVertical: 0 },
1478
+ md: { marginVertical: 2 }
1475
1479
  };
1476
1480
  var Alert = React32.forwardRef(
1477
1481
  function Alert2(props, ref) {
@@ -1500,7 +1504,8 @@ var Alert = React32.forwardRef(
1500
1504
  const alertStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
1501
1505
  const [isOpen, setIsOpen] = React32.useState(true);
1502
1506
  const resolvedSize = size ?? "md";
1503
- const defaultIcon = /* @__PURE__ */ jsx(IndicatorIcon2, { className: "w-5 h-5" });
1507
+ const fontSize = SIZE[resolvedSize].fontSize;
1508
+ const defaultIcon = /* @__PURE__ */ jsx(IndicatorIcon2, {});
1504
1509
  const iconElement = (() => {
1505
1510
  if (startElement !== void 0) {
1506
1511
  return startElement;
@@ -1508,10 +1513,20 @@ var Alert = React32.forwardRef(
1508
1513
  if (!showIcon && icon === void 0) {
1509
1514
  return null;
1510
1515
  }
1511
- return /* @__PURE__ */ jsx("span", { className: cn(
1512
- "inline-flex items-center justify-center shrink-0 text-[var(--color-alert-fg)] [&>svg]:w-full [&>svg]:h-full",
1513
- INDICATOR_SIZE_CLASSES[resolvedSize]
1514
- ), children: icon || defaultIcon });
1516
+ return /* @__PURE__ */ jsx(
1517
+ XStack,
1518
+ {
1519
+ alignItems: "center",
1520
+ justifyContent: "center",
1521
+ flexShrink: 0,
1522
+ width: 20,
1523
+ height: 20,
1524
+ ...INDICATOR_SIZE[resolvedSize],
1525
+ className: "lux-icon",
1526
+ style: { color: ALERT_FG },
1527
+ children: icon || defaultIcon
1528
+ }
1529
+ );
1515
1530
  })();
1516
1531
  const handleClose = React32.useCallback(() => {
1517
1532
  setIsOpen(false);
@@ -1540,52 +1555,57 @@ var Alert = React32.forwardRef(
1540
1555
  ...descRowGap !== void 0 ? { rowGap: typeof descRowGap === "number" ? `${descRowGap * 4}px` : descRowGap } : {},
1541
1556
  ...descColumnGap !== void 0 ? { columnGap: typeof descColumnGap === "number" ? `${descColumnGap * 4}px` : descColumnGap } : {}
1542
1557
  };
1558
+ const ContentFrame = inline ? XStack : YStack;
1543
1559
  return /* @__PURE__ */ jsx(Skeleton, { loading, children: /* @__PURE__ */ jsxs(
1544
- "div",
1560
+ XStack,
1545
1561
  {
1546
1562
  ref,
1547
- className: cn(ALERT_BASE, STATUS_CLASSES[status], SIZE_CLASSES[resolvedSize], className),
1563
+ ...ALERT_BASE,
1564
+ paddingHorizontal: SIZE[resolvedSize].paddingHorizontal,
1565
+ backgroundColor: STATUS_BG[status],
1566
+ className,
1548
1567
  style: alertStyle,
1549
1568
  ...alertRest,
1550
1569
  children: [
1551
1570
  iconElement,
1552
- children ? /* @__PURE__ */ jsxs("div", { className: cn("flex flex-1", inline ? "inline-flex flex-row items-center" : "flex flex-col"), children: [
1553
- title && /* @__PURE__ */ jsx("div", { className: "font-semibold", children: title }),
1571
+ children ? /* @__PURE__ */ jsxs(ContentFrame, { flex: 1, alignItems: inline ? "center" : void 0, children: [
1572
+ title && /* @__PURE__ */ jsx(Text, { fontWeight: "600", fontSize, color: ALERT_FG, children: title }),
1554
1573
  /* @__PURE__ */ jsx(
1555
- "div",
1574
+ XStack,
1556
1575
  {
1557
- className: cn("inline-flex flex-wrap", descClassName),
1576
+ flexWrap: "wrap",
1577
+ className: descClassName,
1558
1578
  style: Object.keys(descStyle).length > 0 ? descStyle : void 0,
1559
1579
  ...descRest,
1560
- children
1580
+ children: ink(children, void 0, { fontSize, color: ALERT_FG })
1561
1581
  }
1562
1582
  )
1563
- ] }) : /* @__PURE__ */ jsx("div", { className: "font-semibold flex-1", children: title }),
1583
+ ] }) : /* @__PURE__ */ jsx(Text, { flex: 1, fontWeight: "600", fontSize, color: ALERT_FG, children: title }),
1564
1584
  endElement,
1565
- closable && /* @__PURE__ */ jsx(
1566
- CloseButton,
1567
- {
1568
- className: "relative self-start",
1569
- onClick: handleClose
1570
- }
1571
- )
1585
+ closable && /* @__PURE__ */ jsx(View, { position: "relative", alignSelf: "flex-start", children: /* @__PURE__ */ jsx(CloseButton, { onClick: handleClose }) })
1572
1586
  ]
1573
1587
  }
1574
1588
  ) });
1575
1589
  }
1576
1590
  );
1577
- var SIZE_CLASSES2 = {
1578
- xs: "h-6 w-6 text-[10px]",
1579
- sm: "h-8 w-8 text-xs",
1580
- md: "h-10 w-10 text-sm",
1581
- lg: "h-12 w-12 text-base",
1582
- xl: "h-16 w-16 text-lg",
1583
- "2xl": "h-20 w-20 text-xl"
1591
+ var SIZE2 = {
1592
+ xs: { width: 24, height: 24, fontSize: 10 },
1593
+ sm: { width: 32, height: 32, fontSize: 12 },
1594
+ md: { width: 40, height: 40, fontSize: 14 },
1595
+ lg: { width: 48, height: 48, fontSize: 16 },
1596
+ xl: { width: 64, height: 64, fontSize: 18 },
1597
+ "2xl": { width: 80, height: 80, fontSize: 20 }
1584
1598
  };
1585
- var VARIANT_CLASSES = {
1586
- solid: "bg-gray-500 text-white",
1587
- subtle: "bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-200",
1588
- outline: "border-2 border-gray-300 bg-transparent text-gray-700 dark:border-gray-600 dark:text-gray-200"
1599
+ var RING = "var(--color-bg-body)";
1600
+ var VARIANT = {
1601
+ solid: { backgroundColor: "var(--color-gray-500)", color: "var(--color-white)" },
1602
+ subtle: { backgroundColor: "var(--color-badge-gray-bg)", color: "var(--color-badge-gray-fg)" },
1603
+ outline: {
1604
+ borderWidth: 2,
1605
+ borderColor: "var(--color-input-border)",
1606
+ backgroundColor: "transparent",
1607
+ color: "var(--color-text-secondary)"
1608
+ }
1589
1609
  };
1590
1610
  var DEFAULT_SIZE = "md";
1591
1611
  var DEFAULT_VARIANT = "subtle";
@@ -1604,7 +1624,6 @@ var Avatar = React32.forwardRef(
1604
1624
  icon,
1605
1625
  fallback,
1606
1626
  children,
1607
- className,
1608
1627
  size: sizeProp,
1609
1628
  variant: variantProp,
1610
1629
  borderless,
@@ -1617,21 +1636,26 @@ var Avatar = React32.forwardRef(
1617
1636
  Avatar$1,
1618
1637
  {
1619
1638
  ref,
1620
- unstyled: true,
1621
- className: cn(
1622
- "relative inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full align-middle",
1623
- SIZE_CLASSES2[size],
1624
- VARIANT_CLASSES[variant],
1625
- !isBorderless && "ring-2 ring-white dark:ring-gray-900",
1626
- className
1627
- ),
1639
+ position: "relative",
1640
+ display: "inline-flex",
1641
+ flexShrink: 0,
1642
+ alignItems: "center",
1643
+ justifyContent: "center",
1644
+ overflow: "hidden",
1645
+ borderRadius: 9999,
1646
+ ...SIZE2[size],
1647
+ ...VARIANT[variant],
1648
+ boxShadow: isBorderless ? void 0 : `0 0 0 2px ${RING}`,
1628
1649
  ...rest,
1629
1650
  children: [
1630
1651
  /* @__PURE__ */ jsx(AvatarFallback, { name, icon, children: fallback }),
1631
1652
  src != null && /* @__PURE__ */ jsx(
1632
1653
  Avatar$1.Image,
1633
1654
  {
1634
- className: "h-full w-full rounded-[inherit] object-cover",
1655
+ width: "100%",
1656
+ height: "100%",
1657
+ borderRadius: 9999,
1658
+ objectFit: "cover",
1635
1659
  src,
1636
1660
  srcSet,
1637
1661
  loading,
@@ -1646,22 +1670,18 @@ var Avatar = React32.forwardRef(
1646
1670
  );
1647
1671
  var AvatarFallback = React32.forwardRef(
1648
1672
  function AvatarFallback2(props, ref) {
1649
- const { name, icon, children, className, ...rest } = props;
1650
- return /* @__PURE__ */ jsxs(
1673
+ const { name, icon, children, ...rest } = props;
1674
+ return /* @__PURE__ */ jsx(
1651
1675
  Avatar$1.Fallback,
1652
1676
  {
1653
1677
  ref,
1654
- unstyled: true,
1655
- className: cn(
1656
- "flex h-full w-full items-center justify-center font-medium",
1657
- className
1658
- ),
1678
+ display: "flex",
1679
+ width: "100%",
1680
+ height: "100%",
1681
+ alignItems: "center",
1682
+ justifyContent: "center",
1659
1683
  ...rest,
1660
- children: [
1661
- children,
1662
- name != null && children == null && /* @__PURE__ */ jsx(Fragment, { children: getInitials(name) }),
1663
- name == null && children == null && icon
1664
- ]
1684
+ children: ink(children ?? (name != null ? getInitials(name) : icon), void 0, { fontWeight: "500" })
1665
1685
  }
1666
1686
  );
1667
1687
  }
@@ -1674,19 +1694,12 @@ function getInitials(name) {
1674
1694
  }
1675
1695
  var AvatarGroup = React32.forwardRef(
1676
1696
  function AvatarGroup2(props, ref) {
1677
- const { size, variant, borderless, className, ...rest } = props;
1697
+ const { size, variant, borderless, children, ...rest } = props;
1678
1698
  const contextValue = React32.useMemo(
1679
1699
  () => ({ size, variant, borderless }),
1680
1700
  [size, variant, borderless]
1681
1701
  );
1682
- return /* @__PURE__ */ jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(
1683
- "div",
1684
- {
1685
- ref,
1686
- className: cn("flex -space-x-3", className),
1687
- ...rest
1688
- }
1689
- ) });
1702
+ return /* @__PURE__ */ jsx(AvatarGroupContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx(XStack, { ref, ...rest, children: React32.Children.map(children, (child, index) => index === 0 || !React32.isValidElement(child) ? child : React32.cloneElement(child, { marginLeft: -12 })) }) });
1690
1703
  }
1691
1704
  );
1692
1705
  function mapPlacement(p) {
@@ -1780,14 +1793,21 @@ var Tooltip = React32.forwardRef(
1780
1793
  {
1781
1794
  ref,
1782
1795
  unstyled: true,
1783
- className: cn(
1784
- "z-[9999] overflow-hidden rounded-lg px-3 py-2 text-sm",
1785
- "animate-in fade-in-0 zoom-in-95",
1786
- isPopover && "bg-[var(--color-popover-bg)] text-[var(--color-text-primary)]",
1787
- isPopover && "shadow-[var(--shadow-popover)] border border-[var(--color-border-divider)] max-w-sm",
1788
- !isPopover && "bg-[var(--color-tooltip-bg)] text-[var(--color-tooltip-fg)] max-w-xs",
1789
- contentProps?.className
1790
- ),
1796
+ zIndex: 9999,
1797
+ overflow: "hidden",
1798
+ borderRadius: 8,
1799
+ paddingHorizontal: 12,
1800
+ paddingVertical: 8,
1801
+ maxWidth: isPopover ? 384 : 320,
1802
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)",
1803
+ transition: "quick",
1804
+ enterStyle: { opacity: 0, scale: 0.95 },
1805
+ exitStyle: { opacity: 0, scale: 0.95 },
1806
+ ...isPopover ? {
1807
+ borderWidth: 1,
1808
+ borderColor: "var(--color-border-divider)",
1809
+ shadowColor: "var(--shadow-popover)"
1810
+ } : {},
1791
1811
  onClick: interactive ? handleContentClick : void 0,
1792
1812
  ...selected ? { "data-selected": true } : {},
1793
1813
  ...contentProps,
@@ -1796,12 +1816,13 @@ var Tooltip = React32.forwardRef(
1796
1816
  Tooltip$1.Arrow,
1797
1817
  {
1798
1818
  unstyled: true,
1799
- className: cn(
1800
- isPopover ? "fill-[var(--color-popover-bg)]" : "fill-[var(--color-tooltip-bg)]"
1801
- )
1819
+ backgroundColor: isPopover ? "var(--color-popover-bg)" : "var(--color-tooltip-bg)"
1802
1820
  }
1803
1821
  ),
1804
- content
1822
+ ink(content, void 0, {
1823
+ fontSize: 14,
1824
+ color: isPopover ? "var(--color-text-primary)" : "var(--color-tooltip-fg)"
1825
+ })
1805
1826
  ]
1806
1827
  }
1807
1828
  )
@@ -1813,35 +1834,39 @@ var Tooltip = React32.forwardRef(
1813
1834
  function TruncatedTextTooltip({ label, children }) {
1814
1835
  return /* @__PURE__ */ jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
1815
1836
  }
1816
- var BASE_CLASSES = "inline-flex items-center rounded-sm gap-1 font-medium w-fit max-w-full whitespace-nowrap select-text";
1817
- var SIZE_CLASSES3 = {
1818
- sm: "text-xs p-1 h-[18px] min-h-[18px]",
1819
- md: "text-sm px-1 py-0.5 min-h-6",
1820
- lg: "text-sm px-2 py-1 min-h-7 font-semibold"
1837
+ var SIZE3 = {
1838
+ sm: { padding: 4, height: 18, minHeight: 18 },
1839
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24 },
1840
+ lg: { paddingHorizontal: 8, paddingVertical: 4, minHeight: 28 }
1821
1841
  };
1822
- var COLOR_PALETTE_CLASSES = {
1823
- gray: "bg-badge-gray-bg text-badge-gray-fg",
1824
- green: "bg-badge-green-bg text-badge-green-fg",
1825
- red: "bg-badge-red-bg text-badge-red-fg",
1826
- purple: "bg-badge-purple-bg text-badge-purple-fg",
1827
- orange: "bg-badge-orange-bg text-badge-orange-fg",
1828
- blue: "bg-badge-blue-bg text-badge-blue-fg",
1829
- yellow: "bg-badge-yellow-bg text-badge-yellow-fg",
1830
- teal: "bg-badge-teal-bg text-badge-teal-fg",
1831
- cyan: "bg-badge-cyan-bg text-badge-cyan-fg",
1832
- pink: "bg-badge-pink-bg text-badge-pink-fg",
1833
- purple_alt: "bg-badge-purple-alt-bg text-badge-purple-alt-fg",
1834
- blue_alt: "bg-badge-blue-alt-bg text-badge-blue-alt-fg",
1835
- bright_gray: "bg-badge-bright-gray-bg text-badge-bright-gray-fg",
1836
- bright_green: "bg-badge-bright-green-bg text-badge-bright-green-fg",
1837
- bright_red: "bg-badge-bright-red-bg text-badge-bright-red-fg",
1838
- bright_blue: "bg-badge-bright-blue-bg text-badge-bright-blue-fg",
1839
- bright_yellow: "bg-badge-bright-yellow-bg text-badge-bright-yellow-fg",
1840
- bright_teal: "bg-badge-bright-teal-bg text-badge-bright-teal-fg",
1841
- bright_cyan: "bg-badge-bright-cyan-bg text-badge-bright-cyan-fg",
1842
- bright_orange: "bg-badge-bright-orange-bg text-badge-bright-orange-fg",
1843
- bright_purple: "bg-badge-bright-purple-bg text-badge-bright-purple-fg",
1844
- bright_pink: "bg-badge-bright-pink-bg text-badge-bright-pink-fg"
1842
+ var SIZE_TEXT = {
1843
+ sm: { fontSize: 12, fontWeight: "500" },
1844
+ md: { fontSize: 14, fontWeight: "500" },
1845
+ lg: { fontSize: 14, fontWeight: "600" }
1846
+ };
1847
+ var COLOR_PALETTE = {
1848
+ gray: { bg: "var(--color-badge-gray-bg)", fg: "var(--color-badge-gray-fg)" },
1849
+ green: { bg: "var(--color-badge-green-bg)", fg: "var(--color-badge-green-fg)" },
1850
+ red: { bg: "var(--color-badge-red-bg)", fg: "var(--color-badge-red-fg)" },
1851
+ purple: { bg: "var(--color-badge-purple-bg)", fg: "var(--color-badge-purple-fg)" },
1852
+ orange: { bg: "var(--color-badge-orange-bg)", fg: "var(--color-badge-orange-fg)" },
1853
+ blue: { bg: "var(--color-badge-blue-bg)", fg: "var(--color-badge-blue-fg)" },
1854
+ yellow: { bg: "var(--color-badge-yellow-bg)", fg: "var(--color-badge-yellow-fg)" },
1855
+ teal: { bg: "var(--color-badge-teal-bg)", fg: "var(--color-badge-teal-fg)" },
1856
+ cyan: { bg: "var(--color-badge-cyan-bg)", fg: "var(--color-badge-cyan-fg)" },
1857
+ pink: { bg: "var(--color-badge-pink-bg)", fg: "var(--color-badge-pink-fg)" },
1858
+ purple_alt: { bg: "var(--color-badge-purple-alt-bg)", fg: "var(--color-badge-purple-alt-fg)" },
1859
+ blue_alt: { bg: "var(--color-badge-blue-alt-bg)", fg: "var(--color-badge-blue-alt-fg)" },
1860
+ bright_gray: { bg: "var(--color-badge-bright-gray-bg)", fg: "var(--color-badge-bright-gray-fg)" },
1861
+ bright_green: { bg: "var(--color-badge-bright-green-bg)", fg: "var(--color-badge-bright-green-fg)" },
1862
+ bright_red: { bg: "var(--color-badge-bright-red-bg)", fg: "var(--color-badge-bright-red-fg)" },
1863
+ bright_blue: { bg: "var(--color-badge-bright-blue-bg)", fg: "var(--color-badge-bright-blue-fg)" },
1864
+ bright_yellow: { bg: "var(--color-badge-bright-yellow-bg)", fg: "var(--color-badge-bright-yellow-fg)" },
1865
+ bright_teal: { bg: "var(--color-badge-bright-teal-bg)", fg: "var(--color-badge-bright-teal-fg)" },
1866
+ bright_cyan: { bg: "var(--color-badge-bright-cyan-bg)", fg: "var(--color-badge-bright-cyan-fg)" },
1867
+ bright_orange: { bg: "var(--color-badge-bright-orange-bg)", fg: "var(--color-badge-bright-orange-fg)" },
1868
+ bright_purple: { bg: "var(--color-badge-bright-purple-bg)", fg: "var(--color-badge-bright-purple-fg)" },
1869
+ bright_pink: { bg: "var(--color-badge-bright-pink-bg)", fg: "var(--color-badge-bright-pink-fg)" }
1845
1870
  };
1846
1871
  var S2 = 4;
1847
1872
  var Badge = React32__default.forwardRef(
@@ -1876,18 +1901,31 @@ var Badge = React32__default.forwardRef(
1876
1901
  }
1877
1902
  if (_mr !== void 0) shimStyle.marginRight = typeof _mr === "number" ? `${_mr * S2}px` : _mr;
1878
1903
  const badgeStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
1879
- const child = children ? /* @__PURE__ */ jsx("span", { className: "overflow-hidden text-ellipsis", children }) : null;
1904
+ const palette = COLOR_PALETTE[colorPalette];
1905
+ const child = children ? (
1906
+ // `ellipsis` is gui Text's own built-in variant for single-line
1907
+ // truncation — it expands to the same overflow/text-overflow/
1908
+ // white-space/max-width rule Tailwind's `text-ellipsis` did, but
1909
+ // through the component's own variants (guaranteed to compile),
1910
+ // rather than naming each longhand as a separate style prop.
1911
+ /* @__PURE__ */ jsx(Text, { ellipsis: true, ...SIZE_TEXT[size], color: palette.fg, children })
1912
+ ) : null;
1880
1913
  const childrenElement = truncated ? /* @__PURE__ */ jsx(TruncatedTextTooltip, { label: children, children: child }) : child;
1881
1914
  const badgeElement = /* @__PURE__ */ jsxs(
1882
- "span",
1915
+ XStack,
1883
1916
  {
1884
1917
  ref,
1885
- className: cn(
1886
- BASE_CLASSES,
1887
- SIZE_CLASSES3[size],
1888
- COLOR_PALETTE_CLASSES[colorPalette],
1889
- className
1890
- ),
1918
+ render: /* @__PURE__ */ jsx("span", {}),
1919
+ display: "inline-flex",
1920
+ alignItems: "center",
1921
+ alignSelf: "flex-start",
1922
+ borderRadius: 2,
1923
+ gap: 4,
1924
+ maxWidth: "100%",
1925
+ userSelect: "text",
1926
+ ...SIZE3[size],
1927
+ backgroundColor: palette.bg,
1928
+ className,
1891
1929
  style: badgeStyle,
1892
1930
  ...rest,
1893
1931
  children: [
@@ -1961,7 +1999,7 @@ var ButtonFrame = styled(View, {
1961
1999
  size: "md"
1962
2000
  }
1963
2001
  });
1964
- var VARIANT_CLASSES2 = {
2002
+ var VARIANT_CLASSES = {
1965
2003
  solid: [
1966
2004
  "bg-[var(--color-button-solid-bg)] text-[var(--color-button-solid-text)]",
1967
2005
  "hover:bg-[var(--color-hover)]",
@@ -2061,7 +2099,7 @@ var VARIANT_CLASSES2 = {
2061
2099
  "data-[selected]:hover:text-[var(--color-selected-control-text)] data-[selected]:hover:border-transparent"
2062
2100
  ].join(" ")
2063
2101
  };
2064
- var BASE_CLASSES2 = "font-semibold whitespace-nowrap transition-colors duration-150";
2102
+ var BASE_CLASSES = "font-semibold whitespace-nowrap transition-colors duration-150";
2065
2103
  var SP = 4;
2066
2104
  function buildShimStyle(props) {
2067
2105
  const s = { ...props.style };
@@ -2162,8 +2200,8 @@ var Button = React32.forwardRef(
2162
2200
  /* @__PURE__ */ jsx(Spinner, {}),
2163
2201
  loadingText != null && /* @__PURE__ */ jsx("span", { style: { marginLeft: 8 }, children: loadingText })
2164
2202
  ] }) : children;
2165
- const variantClass = VARIANT_CLASSES2[variant] ?? VARIANT_CLASSES2.solid;
2166
- const combinedClassName = [BASE_CLASSES2, variantClass, className].filter(Boolean).join(" ");
2203
+ const variantClass = VARIANT_CLASSES[variant] ?? VARIANT_CLASSES.solid;
2204
+ const combinedClassName = [BASE_CLASSES, variantClass, className].filter(Boolean).join(" ");
2167
2205
  const button = /* @__PURE__ */ jsx(
2168
2206
  ButtonFrame,
2169
2207
  {
@@ -2184,7 +2222,7 @@ var Button = React32.forwardRef(
2184
2222
  return button;
2185
2223
  }
2186
2224
  );
2187
- var SIZE_CLASSES4 = {
2225
+ var SIZE_CLASSES = {
2188
2226
  "2xs": "px-2 h-5 min-w-5 text-xs rounded-sm gap-1",
2189
2227
  xs: "px-2 h-6 min-w-6 text-sm rounded-sm gap-1",
2190
2228
  sm: "px-3 h-8 min-w-8 text-sm rounded-md gap-1",
@@ -2193,7 +2231,7 @@ var SIZE_CLASSES4 = {
2193
2231
  function buttonVariants(opts) {
2194
2232
  const v = opts?.variant ?? "solid";
2195
2233
  const s = opts?.size ?? "md";
2196
- return [BASE_CLASSES2, VARIANT_CLASSES2[v] ?? "", SIZE_CLASSES4[s] ?? ""].filter(Boolean).join(" ");
2234
+ return [BASE_CLASSES, VARIANT_CLASSES[v] ?? "", SIZE_CLASSES[s] ?? ""].filter(Boolean).join(" ");
2197
2235
  }
2198
2236
  var ButtonGroup = React32.forwardRef(
2199
2237
  function ButtonGroup2(props, ref) {
@@ -2271,7 +2309,6 @@ var CheckboxGroupBase = React32.forwardRef(
2271
2309
  onValueChange,
2272
2310
  orientation = "vertical",
2273
2311
  name: _name,
2274
- className,
2275
2312
  ...rest
2276
2313
  } = props;
2277
2314
  const [uncontrolledValue, setUncontrolledValue] = React32.useState(defaultValue ?? []);
@@ -2294,15 +2331,13 @@ var CheckboxGroupBase = React32.forwardRef(
2294
2331
  }, [isControlled, controlledValue]);
2295
2332
  const ctx = React32.useMemo(() => ({ value, toggle }), [value, toggle]);
2296
2333
  return /* @__PURE__ */ jsx(CheckboxGroupContext.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
2297
- "div",
2334
+ View,
2298
2335
  {
2299
2336
  ref,
2300
2337
  role: "group",
2301
- className: cn(
2302
- "flex",
2303
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-8",
2304
- className
2305
- ),
2338
+ display: "flex",
2339
+ flexDirection: orientation === "vertical" ? "column" : "row",
2340
+ gap: orientation === "vertical" ? 12 : 32,
2306
2341
  ...rest,
2307
2342
  children
2308
2343
  }
@@ -2310,46 +2345,22 @@ var CheckboxGroupBase = React32.forwardRef(
2310
2345
  }
2311
2346
  );
2312
2347
  var CheckboxGroup2 = CheckboxGroupBase;
2313
- var SIZE_CLASSES5 = {
2314
- sm: {
2315
- root: "gap-1.5",
2316
- control: "h-3.5 w-3.5 rounded-sm",
2317
- label: "text-xs",
2318
- icon: "h-3 w-3"
2319
- },
2320
- md: {
2321
- root: "gap-2",
2322
- control: "h-4 w-4 rounded",
2323
- label: "text-sm",
2324
- icon: "h-3.5 w-3.5"
2325
- }
2348
+ var SIZE4 = {
2349
+ sm: { rootGap: 6, control: 14, radius: 2, label: 12, icon: 12 },
2350
+ md: { rootGap: 8, control: 16, radius: 4, label: 14, icon: 14 }
2326
2351
  };
2327
- var CheckIcon = ({ className }) => /* @__PURE__ */ jsx(
2328
- "svg",
2352
+ var INK = "var(--color-text-primary)";
2353
+ var ON_INK = "var(--color-bg-body)";
2354
+ var RESTING_BORDER = "var(--color-input-border)";
2355
+ var OUTLINE = "var(--color-gray-500)";
2356
+ var CheckIcon = ({ size, color }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 12 10", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx(
2357
+ "path",
2329
2358
  {
2330
- className,
2331
- viewBox: "0 0 12 10",
2332
- fill: "none",
2333
- xmlns: "http://www.w3.org/2000/svg",
2334
- children: /* @__PURE__ */ jsx(
2335
- "path",
2336
- {
2337
- d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
2338
- fill: "currentColor"
2339
- }
2340
- )
2359
+ d: "M10.59 0.59L4 7.17L1.41 4.59L0 6L4 10L12 2L10.59 0.59Z",
2360
+ fill: color
2341
2361
  }
2342
- );
2343
- var IndeterminateIcon = ({ className }) => /* @__PURE__ */ jsx(
2344
- "svg",
2345
- {
2346
- className,
2347
- viewBox: "0 0 12 2",
2348
- fill: "none",
2349
- xmlns: "http://www.w3.org/2000/svg",
2350
- children: /* @__PURE__ */ jsx("path", { d: "M0 0H12V2H0V0Z", fill: "currentColor" })
2351
- }
2352
- );
2362
+ ) });
2363
+ var IndeterminateIcon = ({ size, color }) => /* @__PURE__ */ jsx("svg", { width: size, height: size, viewBox: "0 0 12 2", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M0 0H12V2H0V0Z", fill: color }) });
2353
2364
  var CheckboxBase = React32.forwardRef(
2354
2365
  function Checkbox$1(props, ref) {
2355
2366
  const {
@@ -2367,7 +2378,6 @@ var CheckboxBase = React32.forwardRef(
2367
2378
  size = "md",
2368
2379
  name,
2369
2380
  required,
2370
- className,
2371
2381
  ...rest
2372
2382
  } = props;
2373
2383
  const group = useCheckboxGroupContext();
@@ -2420,18 +2430,19 @@ var CheckboxBase = React32.forwardRef(
2420
2430
  },
2421
2431
  [readOnly, isControlled, isInGroup, group, value, onCheckedChange, onChange]
2422
2432
  );
2423
- const sizeClasses2 = SIZE_CLASSES5[size];
2433
+ const s = SIZE4[size];
2434
+ const isChecked = checkedState !== false;
2424
2435
  return /* @__PURE__ */ jsxs(
2425
- "label",
2436
+ Label,
2426
2437
  {
2427
2438
  ref: rootRef,
2428
- className: cn(
2429
- "inline-flex items-center cursor-pointer select-none",
2430
- sizeClasses2.root,
2431
- disabled && "opacity-50 cursor-not-allowed",
2432
- readOnly && "cursor-default",
2433
- className
2434
- ),
2439
+ unstyled: true,
2440
+ flexDirection: "row",
2441
+ alignItems: "center",
2442
+ gap: s.rootGap,
2443
+ cursor: disabled ? "not-allowed" : readOnly ? "default" : "pointer",
2444
+ userSelect: "none",
2445
+ opacity: disabled ? 0.5 : 1,
2435
2446
  onChange,
2436
2447
  "data-disabled": disabled || void 0,
2437
2448
  "data-readonly": readOnly || void 0,
@@ -2447,26 +2458,25 @@ var CheckboxBase = React32.forwardRef(
2447
2458
  name,
2448
2459
  value,
2449
2460
  required,
2450
- className: cn(
2451
- "inline-flex items-center justify-center shrink-0",
2452
- "border-2 border-current/30",
2453
- "data-[state=checked]:bg-gray-800 data-[state=checked]:text-white",
2454
- "dark:data-[state=checked]:bg-white dark:data-[state=checked]:text-black",
2455
- "data-[state=indeterminate]:bg-gray-800 data-[state=indeterminate]:text-white",
2456
- "dark:data-[state=indeterminate]:bg-white dark:data-[state=indeterminate]:text-black",
2457
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
2458
- "transition-colors duration-150",
2459
- sizeClasses2.control
2460
- ),
2461
- children: icon ?? /* @__PURE__ */ jsx(Checkbox.Indicator, { className: cn("flex items-center justify-center", sizeClasses2.icon), children: checkedState === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { className: sizeClasses2.icon }) : /* @__PURE__ */ jsx(CheckIcon, { className: sizeClasses2.icon }) })
2461
+ flexShrink: 0,
2462
+ alignItems: "center",
2463
+ justifyContent: "center",
2464
+ width: s.control,
2465
+ height: s.control,
2466
+ borderRadius: s.radius,
2467
+ borderWidth: 2,
2468
+ borderColor: isChecked ? INK : RESTING_BORDER,
2469
+ backgroundColor: isChecked ? INK : "transparent",
2470
+ transition: "quicker",
2471
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE, outlineOffset: 2 },
2472
+ children: icon ?? /* @__PURE__ */ jsx(Checkbox.Indicator, { alignItems: "center", justifyContent: "center", width: s.icon, height: s.icon, children: checkedState === "indeterminate" ? /* @__PURE__ */ jsx(IndeterminateIcon, { size: s.icon, color: ON_INK }) : /* @__PURE__ */ jsx(CheckIcon, { size: s.icon, color: ON_INK }) })
2462
2473
  }
2463
2474
  ),
2464
- /* @__PURE__ */ jsx(
2475
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
2465
2476
  "input",
2466
2477
  {
2467
2478
  ref: setHiddenInputRef,
2468
2479
  type: "checkbox",
2469
- className: "sr-only",
2470
2480
  checked: checkedState === true,
2471
2481
  disabled,
2472
2482
  readOnly,
@@ -2477,8 +2487,8 @@ var CheckboxBase = React32.forwardRef(
2477
2487
  onChange: NOOP,
2478
2488
  ...inputProps
2479
2489
  }
2480
- ),
2481
- children != null && /* @__PURE__ */ jsx("span", { className: cn(sizeClasses2.label), children })
2490
+ ) }),
2491
+ children != null && /* @__PURE__ */ jsx(Text, { fontSize: s.label, children })
2482
2492
  ]
2483
2493
  }
2484
2494
  );
@@ -2497,7 +2507,7 @@ function stripUtmParams(url) {
2497
2507
  return url;
2498
2508
  }
2499
2509
  }
2500
- var VARIANT_CLASSES3 = {
2510
+ var VARIANT_CLASSES2 = {
2501
2511
  primary: cn(
2502
2512
  "text-[var(--color-link-primary)]",
2503
2513
  "hover:no-underline hover:text-[var(--color-link-primary-hover)]",
@@ -2537,7 +2547,7 @@ var VARIANT_CLASSES3 = {
2537
2547
  "data-[hover]:no-underline"
2538
2548
  )
2539
2549
  };
2540
- var BASE_CLASSES3 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2550
+ var BASE_CLASSES2 = "inline-flex items-center gap-0 cursor-pointer data-[disabled]:cursor-not-allowed";
2541
2551
  var LinkExternalIcon = ({ color }) => /* @__PURE__ */ jsx(
2542
2552
  ArrowIcon,
2543
2553
  {
@@ -2606,7 +2616,7 @@ var Link = React32__default.forwardRef(
2606
2616
  if (_minW !== void 0) shimStyle.minWidth = typeof _minW === "number" ? `${_minW * SPACING}px` : _minW;
2607
2617
  if (_justifyContent) shimStyle.justifyContent = _justifyContent;
2608
2618
  if (_position) shimStyle.position = _position;
2609
- const linkClasses = cn(BASE_CLASSES3, VARIANT_CLASSES3[variant], className);
2619
+ const linkClasses = cn(BASE_CLASSES2, VARIANT_CLASSES2[variant], className);
2610
2620
  const linkStyle = Object.keys(shimStyle).length > 0 ? shimStyle : void 0;
2611
2621
  if (external) {
2612
2622
  const processedHref = typeof href === "string" ? stripUtmParams(href) : href;
@@ -2695,8 +2705,8 @@ var LinkOverlay = React32__default.forwardRef(
2695
2705
  ...rest
2696
2706
  } = props;
2697
2707
  const overlayClasses = cn(
2698
- BASE_CLASSES3,
2699
- VARIANT_CLASSES3[variant],
2708
+ BASE_CLASSES2,
2709
+ VARIANT_CLASSES2[variant],
2700
2710
  // Static positioning with a ::before pseudo-element that covers the LinkBox
2701
2711
  "static",
2702
2712
  'before:absolute before:inset-0 before:z-0 before:content-[""]',
@@ -3084,6 +3094,7 @@ function upperFirst(str) {
3084
3094
  return str.charAt(0).toUpperCase() + str.slice(1);
3085
3095
  }
3086
3096
  var ICONS = {};
3097
+ var MUTED = "var(--color-text-secondary)";
3087
3098
  var EmptyState = React32.forwardRef(
3088
3099
  function EmptyState2(props, ref) {
3089
3100
  const { title, description, term, type = "query", icon, children, className, ...rest } = props;
@@ -3121,17 +3132,20 @@ var EmptyState = React32.forwardRef(
3121
3132
  return icon;
3122
3133
  })();
3123
3134
  return /* @__PURE__ */ jsx(
3124
- "div",
3135
+ XStack,
3125
3136
  {
3126
3137
  ref,
3127
- className: cn("flex items-center justify-center py-10", className),
3138
+ alignItems: "center",
3139
+ justifyContent: "center",
3140
+ paddingVertical: 40,
3141
+ className,
3128
3142
  ...rest,
3129
- children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5", children: [
3130
- iconContent && /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center", children: iconContent }),
3131
- descriptionContent ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2 text-center", children: [
3132
- /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
3133
- /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary", children: descriptionContent })
3134
- ] }) : /* @__PURE__ */ jsx("span", { className: "text-lg font-semibold text-text-secondary", children: titleContent }),
3143
+ children: /* @__PURE__ */ jsxs(YStack, { alignItems: "center", gap: 20, children: [
3144
+ iconContent && /* @__PURE__ */ jsx(XStack, { alignItems: "center", justifyContent: "center", children: iconContent }),
3145
+ descriptionContent ? /* @__PURE__ */ jsxs(YStack, { alignItems: "center", gap: 8, children: [
3146
+ /* @__PURE__ */ jsx(Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3147
+ /* @__PURE__ */ jsx(Text, { fontSize: 14, textAlign: "center", color: MUTED, children: descriptionContent })
3148
+ ] }) : /* @__PURE__ */ jsx(Text, { fontSize: 18, fontWeight: "600", textAlign: "center", color: MUTED, children: titleContent }),
3135
3149
  children
3136
3150
  ] })
3137
3151
  }
@@ -3145,10 +3159,10 @@ function getComponentDisplayName(type) {
3145
3159
  return void 0;
3146
3160
  }
3147
3161
  var ERROR = "var(--color-text-error)";
3148
- var MUTED = "var(--color-text-secondary)";
3162
+ var MUTED2 = "var(--color-text-secondary)";
3149
3163
  var Marks = ({ required, optionalText, errorText }) => /* @__PURE__ */ jsxs(Fragment, { children: [
3150
3164
  required && /* @__PURE__ */ jsx(Text, { color: ERROR, "aria-hidden": true, children: "*" }),
3151
- !required && optionalText && /* @__PURE__ */ jsx(Text, { fontSize: 14, color: MUTED, children: optionalText }),
3165
+ !required && optionalText && /* @__PURE__ */ jsx(Text, { fontSize: 14, color: MUTED2, children: optionalText }),
3152
3166
  errorText && /* @__PURE__ */ jsxs(Text, { fontSize: 14, color: ERROR, children: [
3153
3167
  "-",
3154
3168
  space,
@@ -3199,7 +3213,7 @@ var Field = React32.forwardRef(
3199
3213
  ]
3200
3214
  }
3201
3215
  );
3202
- const helperTextElement = helperText ? /* @__PURE__ */ jsx(Text, { marginTop: 6, fontSize: 12, color: MUTED, children: helperText }) : null;
3216
+ const helperTextElement = helperText ? /* @__PURE__ */ jsx(Text, { marginTop: 6, fontSize: 12, color: MUTED2, children: helperText }) : null;
3203
3217
  const child2 = React32.Children.only(children);
3204
3218
  const isInputGroup = getComponentDisplayName(child2.type) === "InputGroup";
3205
3219
  if (isInputGroup) {
@@ -3237,7 +3251,7 @@ var Field = React32.forwardRef(
3237
3251
  }
3238
3252
  ),
3239
3253
  React32.cloneElement(child, { size }),
3240
- helperText && /* @__PURE__ */ jsx(Text, { fontSize: 12, color: MUTED, children: helperText }),
3254
+ helperText && /* @__PURE__ */ jsx(Text, { fontSize: 12, color: MUTED2, children: helperText }),
3241
3255
  errorText && /* @__PURE__ */ jsx(Text, { fontSize: 12, color: ERROR, children: errorText })
3242
3256
  ] });
3243
3257
  }
@@ -3291,7 +3305,7 @@ var IconButtonFrame = styled(View, {
3291
3305
  var HOVER = "var(--color-hover)";
3292
3306
  var SELECTED_BG = "var(--color-selected-control-bg)";
3293
3307
  var SELECTED_FG = "var(--color-selected-control-text)";
3294
- var VARIANT = {
3308
+ var VARIANT2 = {
3295
3309
  plain: {
3296
3310
  rest: { backgroundColor: "transparent", hoverStyle: { backgroundColor: "transparent" } }
3297
3311
  },
@@ -3366,7 +3380,7 @@ var IconButton = React32.forwardRef(
3366
3380
  style: styleProp,
3367
3381
  ...rest
3368
3382
  } = props;
3369
- const look = VARIANT[variant] ?? VARIANT.plain;
3383
+ const look = VARIANT2[variant] ?? VARIANT2.plain;
3370
3384
  const iconSize = size ? ICON_SIZE[size] : void 0;
3371
3385
  const button = /* @__PURE__ */ jsx(
3372
3386
  IconButtonFrame,
@@ -3613,14 +3627,14 @@ var Image = React32__default.forwardRef(
3613
3627
  ] });
3614
3628
  }
3615
3629
  );
3616
- var SIZE = {
3630
+ var SIZE5 = {
3617
3631
  xs: { height: 24, paddingHorizontal: 8, fontSize: 12, borderRadius: 4 },
3618
3632
  sm: { height: 32, paddingHorizontal: 12, fontSize: 14, borderRadius: 6 },
3619
3633
  md: { height: 40, paddingHorizontal: 16, fontSize: 16, borderRadius: 6 },
3620
3634
  lg: { height: 48, paddingHorizontal: 16, fontSize: 18, borderRadius: 8 },
3621
3635
  "2xl": { height: 56, paddingHorizontal: 16, fontSize: 20, borderRadius: 8 }
3622
3636
  };
3623
- var VARIANT2 = {
3637
+ var VARIANT3 = {
3624
3638
  outline: { borderWidth: 1, borderStyle: "solid" },
3625
3639
  filled: { borderWidth: 0, backgroundColor: "var(--color-input-filled-bg)" },
3626
3640
  unstyled: { borderWidth: 0, backgroundColor: "transparent", padding: 0, height: "auto" }
@@ -3651,8 +3665,8 @@ var Input = React32__default.forwardRef(
3651
3665
  unstyled: true,
3652
3666
  className: className ? `lux-control ${className}` : "lux-control",
3653
3667
  ...CONTROL,
3654
- ...SIZE[size],
3655
- ...VARIANT2[variant],
3668
+ ...SIZE5[size],
3669
+ ...VARIANT3[variant],
3656
3670
  ...rest,
3657
3671
  onChange: handleChange
3658
3672
  }
@@ -3728,22 +3742,30 @@ var InputGroup = React32.forwardRef(
3728
3742
  const { className: startClassName, ...startRest } = startElementProps ?? {};
3729
3743
  const { className: endClassName, ...endRest } = endElementProps ?? {};
3730
3744
  return /* @__PURE__ */ jsxs(
3731
- "div",
3745
+ XStack,
3732
3746
  {
3733
3747
  ref: combinedRef,
3734
- className: cn("relative flex w-full items-center", className),
3748
+ position: "relative",
3749
+ width: "100%",
3750
+ alignItems: "center",
3751
+ className,
3735
3752
  ...rest,
3736
3753
  children: [
3737
3754
  startElement && /* @__PURE__ */ jsx(
3738
- "div",
3755
+ XStack,
3739
3756
  {
3740
3757
  ref: startElementRef,
3741
- className: cn(
3742
- "pointer-events-none absolute inset-y-0 left-0 z-[1] flex items-center text-[var(--chakra-colors-input-element)]",
3743
- startClassName
3744
- ),
3758
+ position: "absolute",
3759
+ top: 0,
3760
+ bottom: 0,
3761
+ left: 0,
3762
+ zIndex: 1,
3763
+ alignItems: "center",
3764
+ pointerEvents: "none",
3765
+ style: { color: "var(--color-icon-secondary)" },
3766
+ className: startClassName,
3745
3767
  ...startRest,
3746
- children: startElement
3768
+ children: ink(startElement)
3747
3769
  }
3748
3770
  ),
3749
3771
  React32.Children.map(children, (child) => {
@@ -3762,15 +3784,20 @@ var InputGroup = React32.forwardRef(
3762
3784
  });
3763
3785
  }),
3764
3786
  endElement && /* @__PURE__ */ jsx(
3765
- "div",
3787
+ XStack,
3766
3788
  {
3767
3789
  ref: endElementRef,
3768
- className: cn(
3769
- "pointer-events-none absolute inset-y-0 right-0 z-[1] flex items-center text-[var(--chakra-colors-input-element)]",
3770
- endClassName
3771
- ),
3790
+ position: "absolute",
3791
+ top: 0,
3792
+ bottom: 0,
3793
+ right: 0,
3794
+ zIndex: 1,
3795
+ alignItems: "center",
3796
+ pointerEvents: "none",
3797
+ style: { color: "var(--color-icon-secondary)" },
3798
+ className: endClassName,
3772
3799
  ...endRest,
3773
- children: endElement
3800
+ children: ink(endElement)
3774
3801
  }
3775
3802
  )
3776
3803
  ]
@@ -3779,20 +3806,26 @@ var InputGroup = React32.forwardRef(
3779
3806
  }
3780
3807
  );
3781
3808
  InputGroup.displayName = "InputGroup";
3782
- var INPUT_BASE = [
3783
- "w-10 h-10",
3784
- "text-center text-sm font-medium",
3785
- "border-2 rounded-md",
3786
- "outline-none appearance-none",
3787
- "bg-[var(--color-input-bg)] text-[var(--color-input-fg)]",
3788
- "border-[var(--color-input-border)]",
3789
- "placeholder:text-[var(--color-input-placeholder)]",
3790
- "hover:border-[var(--color-input-border-hover)]",
3791
- "focus:border-[var(--color-input-border-focus)] focus:shadow-md",
3792
- "disabled:opacity-40"
3793
- ].join(" ");
3794
- var INPUT_FILLED = "border-[var(--color-input-border)]";
3795
- var INPUT_INVALID = "border-[var(--color-border-error)] hover:border-[var(--color-border-error)]";
3809
+ var BOX = {
3810
+ width: 40,
3811
+ height: 40,
3812
+ textAlign: "center",
3813
+ fontSize: 14,
3814
+ fontWeight: 500,
3815
+ borderRadius: 6,
3816
+ borderWidth: 2,
3817
+ borderStyle: "solid",
3818
+ outlineWidth: 0,
3819
+ backgroundColor: "var(--color-input-bg)",
3820
+ color: "var(--color-input-fg)",
3821
+ borderColor: "var(--color-input-border)",
3822
+ hoverStyle: { borderColor: "var(--color-input-border-hover)" },
3823
+ focusStyle: {
3824
+ borderColor: "var(--color-input-border-focus)",
3825
+ boxShadow: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
3826
+ },
3827
+ disabledStyle: { opacity: 0.4 }
3828
+ };
3796
3829
  var PinInput = React32.forwardRef(
3797
3830
  function PinInput2(props, ref) {
3798
3831
  const {
@@ -3884,8 +3917,8 @@ var PinInput = React32.forwardRef(
3884
3917
  const onKeyDownAtIndex = React32.useCallback((index) => (e) => {
3885
3918
  handleKeyDown(index, e);
3886
3919
  }, [handleKeyDown]);
3887
- const bgStyle = bgColor ? { backgroundColor: `var(--color-${bgColor.replace(/\./g, "-")})` } : void 0;
3888
- return /* @__PURE__ */ jsxs("div", { ref: rootRef, className: cn("inline-flex items-center", attached ? "gap-0" : "gap-2", className), children: [
3920
+ const boxBackground = bgColor ? `var(--color-${bgColor.replace(/\./g, "-")})` : BOX.backgroundColor;
3921
+ return /* @__PURE__ */ jsxs(XStack, { ref: rootRef, alignItems: "center", gap: attached ? 0 : 8, className, children: [
3889
3922
  /* @__PURE__ */ jsx(
3890
3923
  "input",
3891
3924
  {
@@ -3897,9 +3930,10 @@ var PinInput = React32.forwardRef(
3897
3930
  }
3898
3931
  ),
3899
3932
  Array.from({ length: count }).map((_, index) => /* @__PURE__ */ jsx(
3900
- "input",
3933
+ Input$1,
3901
3934
  {
3902
3935
  ref: setInputRef(index),
3936
+ unstyled: true,
3903
3937
  type: "text",
3904
3938
  inputMode: "numeric",
3905
3939
  autoComplete: otp ? "one-time-code" : "off",
@@ -3908,14 +3942,12 @@ var PinInput = React32.forwardRef(
3908
3942
  placeholder,
3909
3943
  disabled,
3910
3944
  "aria-invalid": invalid || void 0,
3945
+ "data-invalid": invalid || void 0,
3911
3946
  value: values[index] || "",
3912
- className: cn(
3913
- INPUT_BASE,
3914
- values[index] && INPUT_FILLED,
3915
- invalid && INPUT_INVALID,
3916
- attached && index > 0 && "-ml-0.5"
3917
- ),
3918
- style: bgStyle,
3947
+ className: "lux-control",
3948
+ ...BOX,
3949
+ backgroundColor: boxBackground,
3950
+ marginLeft: attached && index > 0 ? -2 : void 0,
3919
3951
  onInput: onInputAtIndex(index),
3920
3952
  onKeyDown: onKeyDownAtIndex(index),
3921
3953
  onPaste: handlePaste,
@@ -4161,11 +4193,11 @@ var PopoverDescription = React32.forwardRef(function PopoverDescription2(props,
4161
4193
  }
4162
4194
  );
4163
4195
  });
4164
- var SIZE_CLASSES6 = {
4165
- sm: "h-1",
4166
- md: "h-2",
4167
- lg: "h-3",
4168
- xl: "h-4"
4196
+ var SIZE6 = {
4197
+ sm: 4,
4198
+ md: 8,
4199
+ lg: 12,
4200
+ xl: 16
4169
4201
  };
4170
4202
  function normalizeValue(value, min, max) {
4171
4203
  if (value == null) return 0;
@@ -4181,7 +4213,6 @@ var Progress = React32.forwardRef(
4181
4213
  size = "md",
4182
4214
  color,
4183
4215
  trackProps,
4184
- className,
4185
4216
  style,
4186
4217
  w,
4187
4218
  flex,
@@ -4200,6 +4231,7 @@ var Progress = React32.forwardRef(
4200
4231
  }
4201
4232
  };
4202
4233
  const rootStyle = {
4234
+ position: "relative",
4203
4235
  ...style,
4204
4236
  ...w !== void 0 && { width: w === "full" ? "100%" : w },
4205
4237
  ...flex !== void 0 && { flex }
@@ -4208,7 +4240,6 @@ var Progress = React32.forwardRef(
4208
4240
  "div",
4209
4241
  {
4210
4242
  ref,
4211
- className: cn("relative", className),
4212
4243
  style: rootStyle,
4213
4244
  ...rest,
4214
4245
  children: /* @__PURE__ */ jsx(
@@ -4217,22 +4248,21 @@ var Progress = React32.forwardRef(
4217
4248
  value: percent,
4218
4249
  max: 100,
4219
4250
  unstyled: true,
4220
- className: cn(
4221
- "w-full overflow-hidden rounded-full",
4222
- "bg-[var(--color-progress-track)]",
4223
- SIZE_CLASSES6[size],
4224
- trackProps?.className
4225
- ),
4251
+ className: trackProps?.className,
4252
+ width: "100%",
4253
+ overflow: "hidden",
4254
+ borderRadius: 9999,
4255
+ height: SIZE6[size],
4256
+ backgroundColor: "var(--color-progress-track)",
4226
4257
  style: trackStyle,
4227
4258
  children: /* @__PURE__ */ jsx(
4228
4259
  Progress$1.Indicator,
4229
4260
  {
4230
4261
  unstyled: true,
4231
4262
  transition: "slow",
4232
- className: cn(
4233
- "h-full rounded-full",
4234
- !color && "bg-[var(--color-progress-indicator)]"
4235
- ),
4263
+ height: "100%",
4264
+ borderRadius: 9999,
4265
+ backgroundColor: color ? void 0 : "var(--color-progress-indicator)",
4236
4266
  style: {
4237
4267
  ...color && { backgroundColor: `var(--color-${color.replace(".", "-")}, ${color})` }
4238
4268
  }
@@ -4245,11 +4275,11 @@ var Progress = React32.forwardRef(
4245
4275
  }
4246
4276
  );
4247
4277
  var SIZE_MAP = {
4248
- xs: { size: 24, thickness: 4, textClass: "text-[10px]" },
4249
- sm: { size: 32, thickness: 5, textClass: "text-[10px]" },
4250
- md: { size: 40, thickness: 6, textClass: "text-xs" },
4251
- lg: { size: 48, thickness: 7, textClass: "text-sm" },
4252
- xl: { size: 64, thickness: 8, textClass: "text-sm" }
4278
+ xs: { size: 24, thickness: 4, fontSize: 10 },
4279
+ sm: { size: 32, thickness: 5, fontSize: 10 },
4280
+ md: { size: 40, thickness: 6, fontSize: 12 },
4281
+ lg: { size: 48, thickness: 7, fontSize: 14 },
4282
+ xl: { size: 64, thickness: 8, fontSize: 14 }
4253
4283
  };
4254
4284
  var Ctx = React32.createContext({
4255
4285
  value: 0,
@@ -4270,16 +4300,18 @@ var ProgressCircleRoot = React32.forwardRef(function ProgressCircleRoot2(props,
4270
4300
  [value, size, colorPalette]
4271
4301
  );
4272
4302
  return /* @__PURE__ */ jsx(Ctx.Provider, { value: ctx, children: /* @__PURE__ */ jsx(
4273
- "div",
4303
+ View,
4274
4304
  {
4275
4305
  ref,
4276
4306
  role: "progressbar",
4277
4307
  "aria-valuenow": value ?? void 0,
4278
4308
  "aria-valuemin": 0,
4279
4309
  "aria-valuemax": 100,
4280
- className: cn("relative inline-flex text-sm", className),
4310
+ position: "relative",
4311
+ style: { display: "inline-flex", fontSize: 14 },
4312
+ className,
4281
4313
  ...rest,
4282
- children
4314
+ children: ink(children)
4283
4315
  }
4284
4316
  ) });
4285
4317
  });
@@ -4298,10 +4330,7 @@ var ProgressCircleRing = React32.forwardRef(function ProgressCircleRing2(props,
4298
4330
  width: size,
4299
4331
  height: size,
4300
4332
  viewBox: `0 0 ${size} ${size}`,
4301
- className: cn(
4302
- value === null && "animate-spin",
4303
- className
4304
- ),
4333
+ className: value === null ? cn("lux-spin", className) : className,
4305
4334
  ...rest,
4306
4335
  children: [
4307
4336
  /* @__PURE__ */ jsx(
@@ -4313,7 +4342,7 @@ var ProgressCircleRing = React32.forwardRef(function ProgressCircleRing2(props,
4313
4342
  fill: "transparent",
4314
4343
  strokeWidth: thickness,
4315
4344
  stroke: trackColor ?? "currentColor",
4316
- className: !trackColor ? "opacity-20" : void 0
4345
+ opacity: !trackColor ? 0.2 : void 0
4317
4346
  }
4318
4347
  ),
4319
4348
  /* @__PURE__ */ jsx(
@@ -4343,49 +4372,42 @@ var ProgressCircleRing = React32.forwardRef(function ProgressCircleRing2(props,
4343
4372
  var ProgressCircleValueText = React32.forwardRef(function ProgressCircleValueText2(props, ref) {
4344
4373
  const { className, children, ...rest } = props;
4345
4374
  const { value, size: sizeKey } = React32.useContext(Ctx);
4346
- const { textClass } = SIZE_MAP[sizeKey];
4375
+ const { fontSize } = SIZE_MAP[sizeKey];
4347
4376
  return /* @__PURE__ */ jsx(
4348
- "div",
4377
+ View,
4349
4378
  {
4350
4379
  ref,
4351
4380
  "aria-live": "polite",
4352
- className: cn(
4353
- "absolute inset-0 flex items-center justify-center",
4354
- "font-medium tracking-tight tabular-nums leading-none",
4355
- textClass,
4356
- className
4357
- ),
4381
+ position: "absolute",
4382
+ top: 0,
4383
+ left: 0,
4384
+ right: 0,
4385
+ bottom: 0,
4386
+ display: "flex",
4387
+ alignItems: "center",
4388
+ justifyContent: "center",
4389
+ style: {
4390
+ fontWeight: 500,
4391
+ fontSize,
4392
+ lineHeight: `${fontSize}px`,
4393
+ letterSpacing: fontSize * -0.025,
4394
+ fontVariantNumeric: "tabular-nums"
4395
+ },
4396
+ className,
4358
4397
  ...rest,
4359
- children: children ?? `${Math.round(value ?? 0)}%`
4398
+ children: ink(children ?? `${Math.round(value ?? 0)}%`)
4360
4399
  }
4361
4400
  );
4362
4401
  });
4363
- var SIZE_CLASSES7 = {
4364
- xs: {
4365
- root: "gap-1.5",
4366
- control: "h-3 w-3",
4367
- indicator: "h-1.5 w-1.5",
4368
- label: "text-xs"
4369
- },
4370
- sm: {
4371
- root: "gap-1.5",
4372
- control: "h-3.5 w-3.5",
4373
- indicator: "h-1.5 w-1.5",
4374
- label: "text-xs"
4375
- },
4376
- md: {
4377
- root: "gap-2",
4378
- control: "h-4 w-4",
4379
- indicator: "h-2 w-2",
4380
- label: "text-sm"
4381
- },
4382
- lg: {
4383
- root: "gap-2.5",
4384
- control: "h-5 w-5",
4385
- indicator: "h-2.5 w-2.5",
4386
- label: "text-base"
4387
- }
4402
+ var SIZE7 = {
4403
+ xs: { rootGap: 6, control: 12, indicator: 6, label: 12 },
4404
+ sm: { rootGap: 6, control: 14, indicator: 6, label: 12 },
4405
+ md: { rootGap: 8, control: 16, indicator: 8, label: 14 },
4406
+ lg: { rootGap: 10, control: 20, indicator: 10, label: 16 }
4388
4407
  };
4408
+ var INK2 = "var(--color-text-primary)";
4409
+ var RESTING_BORDER2 = "var(--color-input-border)";
4410
+ var OUTLINE2 = "var(--color-gray-500)";
4389
4411
  var RadioSizeContext = React32.createContext("md");
4390
4412
  var RadioGroupBase = React32.forwardRef(
4391
4413
  function RadioGroup$1(props, ref) {
@@ -4402,7 +4424,6 @@ var RadioGroupBase = React32.forwardRef(
4402
4424
  value,
4403
4425
  onValueChange,
4404
4426
  size = "md",
4405
- className,
4406
4427
  ...rest
4407
4428
  } = props;
4408
4429
  const handleValueChange = React32.useCallback(
@@ -4416,7 +4437,6 @@ var RadioGroupBase = React32.forwardRef(
4416
4437
  RadioGroup,
4417
4438
  {
4418
4439
  ref,
4419
- unstyled: true,
4420
4440
  name,
4421
4441
  required,
4422
4442
  disabled: disabled || readOnly,
@@ -4424,11 +4444,9 @@ var RadioGroupBase = React32.forwardRef(
4424
4444
  defaultValue,
4425
4445
  value: value ?? void 0,
4426
4446
  onValueChange: handleValueChange,
4427
- className: cn(
4428
- "flex",
4429
- orientation === "vertical" ? "flex-col gap-3" : "flex-row gap-6",
4430
- className
4431
- ),
4447
+ display: "flex",
4448
+ flexDirection: orientation === "vertical" ? "column" : "row",
4449
+ gap: orientation === "vertical" ? 12 : 24,
4432
4450
  ...rest,
4433
4451
  children
4434
4452
  }
@@ -4440,19 +4458,20 @@ var NOOP2 = () => {
4440
4458
  };
4441
4459
  var RadioBase = React32.forwardRef(
4442
4460
  function Radio(props, ref) {
4443
- const { children, inputProps, rootRef, value, disabled, className, ...rest } = props;
4461
+ const { children, inputProps, rootRef, value, disabled, ...rest } = props;
4444
4462
  const size = React32.useContext(RadioSizeContext);
4445
- const sizeClasses2 = SIZE_CLASSES7[size];
4463
+ const s = SIZE7[size];
4446
4464
  return /* @__PURE__ */ jsxs(
4447
- "label",
4465
+ Label,
4448
4466
  {
4449
4467
  ref: rootRef,
4450
- className: cn(
4451
- "inline-flex items-center cursor-pointer select-none",
4452
- sizeClasses2.root,
4453
- disabled && "opacity-50 cursor-not-allowed",
4454
- className
4455
- ),
4468
+ unstyled: true,
4469
+ flexDirection: "row",
4470
+ alignItems: "center",
4471
+ gap: s.rootGap,
4472
+ cursor: disabled ? "not-allowed" : "pointer",
4473
+ userSelect: "none",
4474
+ opacity: disabled ? 0.5 : 1,
4456
4475
  "data-disabled": disabled || void 0,
4457
4476
  ...rest,
4458
4477
  children: [
@@ -4462,32 +4481,24 @@ var RadioBase = React32.forwardRef(
4462
4481
  unstyled: true,
4463
4482
  value,
4464
4483
  disabled,
4465
- className: cn(
4466
- "inline-flex items-center justify-center shrink-0 rounded-full",
4467
- "border-2 border-current/30",
4468
- "data-[state=checked]:border-gray-800 dark:border-white",
4469
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
4470
- "transition-colors duration-150",
4471
- sizeClasses2.control
4472
- ),
4473
- children: /* @__PURE__ */ jsx(
4474
- RadioGroup.Indicator,
4475
- {
4476
- unstyled: true,
4477
- className: cn(
4478
- "block rounded-full bg-gray-800 dark:bg-white",
4479
- sizeClasses2.indicator
4480
- )
4481
- }
4482
- )
4484
+ flexShrink: 0,
4485
+ alignItems: "center",
4486
+ justifyContent: "center",
4487
+ width: s.control,
4488
+ height: s.control,
4489
+ borderRadius: 9999,
4490
+ borderWidth: 2,
4491
+ borderColor: RESTING_BORDER2,
4492
+ transition: "quicker",
4493
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE2, outlineOffset: 2 },
4494
+ children: /* @__PURE__ */ jsx(RadioGroup.Indicator, { unstyled: true, borderRadius: 9999, width: s.indicator, height: s.indicator, backgroundColor: INK2 })
4483
4495
  }
4484
4496
  ),
4485
- /* @__PURE__ */ jsx(
4497
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
4486
4498
  "input",
4487
4499
  {
4488
4500
  ref,
4489
4501
  type: "radio",
4490
- className: "sr-only",
4491
4502
  value,
4492
4503
  disabled,
4493
4504
  tabIndex: -1,
@@ -4495,16 +4506,16 @@ var RadioBase = React32.forwardRef(
4495
4506
  onChange: NOOP2,
4496
4507
  ...inputProps
4497
4508
  }
4498
- ),
4499
- children != null && /* @__PURE__ */ jsx("span", { className: sizeClasses2.label, children })
4509
+ ) }),
4510
+ children != null && /* @__PURE__ */ jsx(Text, { fontSize: s.label, children })
4500
4511
  ]
4501
4512
  }
4502
4513
  );
4503
4514
  }
4504
4515
  );
4505
4516
  var Radio2 = RadioBase;
4506
- var StarFilledIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
4507
- var StarOutlineIcon = ({ className }) => /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z", strokeWidth: "1.5" }) });
4517
+ var StarFilledIcon = () => /* @__PURE__ */ jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z" }) });
4518
+ var StarOutlineIcon = () => /* @__PURE__ */ jsx("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", stroke: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ jsx("path", { d: "M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z", strokeWidth: "1.5" }) });
4508
4519
  var Rating = React32.forwardRef(
4509
4520
  function Rating2(props, ref) {
4510
4521
  const { count = 5, label: labelProp, defaultValue = 0, onValueChange, readOnly, className, ...rest } = props;
@@ -4524,28 +4535,30 @@ var Rating = React32.forwardRef(
4524
4535
  const handleMouseLeave = React32.useCallback(() => {
4525
4536
  setHoveredIndex(-1);
4526
4537
  }, []);
4527
- return /* @__PURE__ */ jsxs("div", { ref, className: cn("inline-flex items-center gap-1", className), ...rest, children: [
4528
- /* @__PURE__ */ jsx("div", { className: "inline-flex items-center", onMouseLeave: handleMouseLeave, children: Array.from({ length: count }).map((_, index) => {
4538
+ return /* @__PURE__ */ jsxs(XStack, { ref, display: "inline-flex", alignItems: "center", gap: 4, className, ...rest, children: [
4539
+ /* @__PURE__ */ jsx(XStack, { display: "inline-flex", alignItems: "center", onMouseLeave: handleMouseLeave, children: Array.from({ length: count }).map((_, index) => {
4529
4540
  const filled = index < highlightedIndex;
4530
4541
  const starIndex = index + 1;
4531
4542
  return /* @__PURE__ */ jsx(
4532
- "button",
4543
+ View,
4533
4544
  {
4534
- type: "button",
4545
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
4535
4546
  tabIndex: readOnly ? -1 : 0,
4536
4547
  "aria-label": `Rate ${starIndex} of ${count}`,
4537
- className: cn(
4538
- "inline-flex items-center justify-center w-5 h-5 text-current",
4539
- readOnly ? "cursor-default" : "cursor-pointer"
4540
- ),
4548
+ display: "inline-flex",
4549
+ alignItems: "center",
4550
+ justifyContent: "center",
4551
+ width: 20,
4552
+ height: 20,
4553
+ cursor: readOnly ? "default" : "pointer",
4541
4554
  onClick: handleClick(starIndex),
4542
4555
  onMouseEnter: handleMouseEnter(index),
4543
- children: filled ? /* @__PURE__ */ jsx(StarFilledIcon, { className: "w-5 h-5" }) : /* @__PURE__ */ jsx(StarOutlineIcon, { className: "w-5 h-5" })
4556
+ children: filled ? /* @__PURE__ */ jsx(StarFilledIcon, {}) : /* @__PURE__ */ jsx(StarOutlineIcon, {})
4544
4557
  },
4545
4558
  index
4546
4559
  );
4547
4560
  }) }),
4548
- label && /* @__PURE__ */ jsx("span", { className: "text-sm", children: label })
4561
+ label && /* @__PURE__ */ jsx(Text, { fontSize: 14, children: label })
4549
4562
  ] });
4550
4563
  }
4551
4564
  );
@@ -4981,6 +4994,11 @@ var Separator = React32__default.forwardRef(
4981
4994
  );
4982
4995
  }
4983
4996
  );
4997
+ var MUTED3 = "var(--color-text-secondary)";
4998
+ var TRACK = "var(--color-border-divider)";
4999
+ var ACTIVE = "var(--color-link-primary)";
5000
+ var ACTIVE_HOVER = "var(--color-link-primary-hover)";
5001
+ var WHITE = "var(--color-white)";
4984
5002
  var Slider = React32.forwardRef(
4985
5003
  function Slider2(props, ref) {
4986
5004
  const {
@@ -5013,21 +5031,22 @@ var Slider = React32.forwardRef(
5013
5031
  const handleSlideEnd = React32.useCallback(() => {
5014
5032
  onValueCommit?.(latest.current);
5015
5033
  }, [onValueCommit]);
5016
- return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-1", className), children: [
5017
- label && !showValue && /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-text-secondary", children: label }),
5018
- label && showValue && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
5019
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium text-text-secondary", children: label }),
5020
- /* @__PURE__ */ jsx("span", { className: "text-sm text-text-secondary", children: (value ?? defaultValue ?? [])?.join(", ") })
5034
+ return /* @__PURE__ */ jsxs(YStack, { className, gap: 4, children: [
5035
+ label && !showValue && /* @__PURE__ */ jsx(Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5036
+ label && showValue && /* @__PURE__ */ jsxs(XStack, { alignItems: "center", justifyContent: "space-between", children: [
5037
+ /* @__PURE__ */ jsx(Text, { fontSize: 14, fontWeight: "500", color: MUTED3, children: label }),
5038
+ /* @__PURE__ */ jsx(Text, { fontSize: 14, color: MUTED3, children: (value ?? defaultValue ?? [])?.join(", ") })
5021
5039
  ] }),
5022
5040
  /* @__PURE__ */ jsxs(
5023
5041
  Slider$1,
5024
5042
  {
5025
5043
  ref,
5026
- unstyled: true,
5027
- className: cn(
5028
- "relative flex w-full touch-none select-none items-center",
5029
- hasMarkLabel && "mb-6"
5030
- ),
5044
+ position: "relative",
5045
+ flexDirection: "row",
5046
+ width: "100%",
5047
+ userSelect: "none",
5048
+ alignItems: "center",
5049
+ marginBottom: hasMarkLabel ? 24 : 0,
5031
5050
  value,
5032
5051
  defaultValue,
5033
5052
  min,
@@ -5039,33 +5058,23 @@ var Slider = React32.forwardRef(
5039
5058
  onValueChange: handleValueChange,
5040
5059
  onSlideEnd: handleSlideEnd,
5041
5060
  children: [
5042
- /* @__PURE__ */ jsx(
5043
- Slider$1.Track,
5044
- {
5045
- unstyled: true,
5046
- className: "relative grow h-1.5 rounded-full bg-border-divider",
5047
- children: /* @__PURE__ */ jsx(
5048
- Slider$1.TrackActive,
5049
- {
5050
- unstyled: true,
5051
- className: "absolute h-full rounded-full bg-link-primary"
5052
- }
5053
- )
5054
- }
5055
- ),
5061
+ /* @__PURE__ */ jsx(Slider$1.Track, { unstyled: true, position: "relative", flexGrow: 1, height: 6, borderRadius: 9999, backgroundColor: TRACK, children: /* @__PURE__ */ jsx(Slider$1.TrackActive, { unstyled: true, position: "absolute", height: "100%", borderRadius: 9999, backgroundColor: ACTIVE }) }),
5056
5062
  resolvedValue?.map((_, index) => /* @__PURE__ */ jsx(
5057
5063
  Slider$1.Thumb,
5058
5064
  {
5059
5065
  index,
5060
5066
  unstyled: true,
5061
- className: cn(
5062
- "block h-5 w-5",
5063
- "rounded-full border-2 border-link-primary bg-white",
5064
- "shadow-sm transition-colors",
5065
- "hover:border-link-primary-hover",
5066
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-link-primary focus-visible:ring-offset-2",
5067
- "disabled:pointer-events-none disabled:opacity-50"
5068
- )
5067
+ width: 20,
5068
+ height: 20,
5069
+ borderRadius: 9999,
5070
+ borderWidth: 2,
5071
+ borderColor: ACTIVE,
5072
+ backgroundColor: WHITE,
5073
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5074
+ transition: "quick",
5075
+ hoverStyle: { borderColor: ACTIVE_HOVER },
5076
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: ACTIVE, outlineOffset: 2 },
5077
+ disabledStyle: { pointerEvents: "none", opacity: 0.5 }
5069
5078
  },
5070
5079
  index
5071
5080
  ))
@@ -5080,41 +5089,25 @@ function SliderMarks(props) {
5080
5089
  const { marks, min, max } = props;
5081
5090
  if (!marks?.length) return null;
5082
5091
  const range = max - min;
5083
- return /* @__PURE__ */ jsx("div", { className: "relative w-full h-4", children: marks.map((mark, index) => {
5092
+ return /* @__PURE__ */ jsx(View, { position: "relative", width: "100%", height: 16, children: marks.map((mark, index) => {
5084
5093
  const percent = (mark.value - min) / range * 100;
5085
- return /* @__PURE__ */ jsxs(
5086
- "div",
5087
- {
5088
- className: "absolute flex flex-col items-center -translate-x-1/2",
5089
- style: { left: `${percent}%` },
5090
- children: [
5091
- /* @__PURE__ */ jsx("div", { className: "h-1.5 w-0.5 bg-border-divider" }),
5092
- mark.label != null && /* @__PURE__ */ jsx("span", { className: "mt-0.5 text-xs text-text-secondary whitespace-nowrap", children: mark.label })
5093
- ]
5094
- },
5095
- index
5096
- );
5094
+ return /* @__PURE__ */ jsxs(View, { position: "absolute", left: `${percent}%`, alignItems: "center", children: [
5095
+ /* @__PURE__ */ jsx(View, { width: 2, height: 6, backgroundColor: TRACK }),
5096
+ mark.label != null && /* @__PURE__ */ jsx(Text, { marginTop: 2, fontSize: 12, color: MUTED3, children: mark.label })
5097
+ ] }, index);
5097
5098
  }) });
5098
5099
  }
5099
5100
  var NOOP3 = () => {
5100
5101
  };
5101
- var SIZE_CLASSES8 = {
5102
- sm: {
5103
- root: "h-4 w-7",
5104
- thumb: "h-3 w-3",
5105
- label: "text-xs"
5106
- },
5107
- md: {
5108
- root: "h-5 w-9",
5109
- thumb: "h-4 w-4",
5110
- label: "text-sm"
5111
- },
5112
- lg: {
5113
- root: "h-6 w-11",
5114
- thumb: "h-5 w-5",
5115
- label: "text-base"
5116
- }
5102
+ var SIZE8 = {
5103
+ sm: { width: 28, height: 16, thumb: 12, label: 12 },
5104
+ md: { width: 36, height: 20, thumb: 16, label: 14 },
5105
+ lg: { width: 44, height: 24, thumb: 20, label: 16 }
5117
5106
  };
5107
+ var TRACK_ON = "var(--color-text-primary)";
5108
+ var TRACK_OFF = "var(--color-switch-bg)";
5109
+ var OUTLINE3 = "var(--color-gray-500)";
5110
+ var WHITE2 = "var(--color-white)";
5118
5111
  var SwitchBase = React32.forwardRef(
5119
5112
  function Switch$1(props, ref) {
5120
5113
  const {
@@ -5131,7 +5124,6 @@ var SwitchBase = React32.forwardRef(
5131
5124
  disabled = false,
5132
5125
  size = "md",
5133
5126
  direction,
5134
- className,
5135
5127
  ...rest
5136
5128
  } = props;
5137
5129
  const [internalChecked, setInternalChecked] = React32.useState(defaultChecked ?? false);
@@ -5146,18 +5138,19 @@ var SwitchBase = React32.forwardRef(
5146
5138
  },
5147
5139
  [isControlled, onCheckedChange]
5148
5140
  );
5149
- const sizeClasses2 = SIZE_CLASSES8[size];
5141
+ const s = SIZE8[size];
5150
5142
  const isRtl = direction === "rtl";
5151
5143
  return /* @__PURE__ */ jsxs(
5152
- "label",
5144
+ Label,
5153
5145
  {
5154
5146
  ref: rootRef,
5155
- className: cn(
5156
- "inline-flex items-center cursor-pointer select-none gap-2",
5157
- isRtl && "flex-row-reverse",
5158
- disabled && "opacity-50 cursor-not-allowed",
5159
- className
5160
- ),
5147
+ unstyled: true,
5148
+ flexDirection: isRtl ? "row-reverse" : "row",
5149
+ alignItems: "center",
5150
+ gap: 8,
5151
+ cursor: disabled ? "not-allowed" : "pointer",
5152
+ userSelect: "none",
5153
+ opacity: disabled ? 0.5 : 1,
5161
5154
  onChange,
5162
5155
  "data-disabled": disabled || void 0,
5163
5156
  ...rest,
@@ -5169,38 +5162,51 @@ var SwitchBase = React32.forwardRef(
5169
5162
  checked: checkedState,
5170
5163
  onCheckedChange: handleCheckedChange,
5171
5164
  disabled,
5172
- className: cn(
5173
- "relative inline-flex shrink-0 items-center rounded-full",
5174
- "bg-gray-300 dark:bg-gray-600",
5175
- "data-[state=checked]:bg-gray-800 dark:bg-white",
5176
- "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-gray-500",
5177
- "transition-colors duration-200",
5178
- sizeClasses2.root
5179
- ),
5165
+ position: "relative",
5166
+ flexShrink: 0,
5167
+ alignItems: "center",
5168
+ width: s.width,
5169
+ height: s.height,
5170
+ borderRadius: 9999,
5171
+ backgroundColor: checkedState ? TRACK_ON : TRACK_OFF,
5172
+ transition: "quick",
5173
+ focusStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: OUTLINE3, outlineOffset: 2 },
5180
5174
  children: [
5181
- trackLabel && /* @__PURE__ */ 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 }),
5175
+ trackLabel && /* @__PURE__ */ jsx(
5176
+ Text,
5177
+ {
5178
+ position: "absolute",
5179
+ width: "100%",
5180
+ textAlign: "center",
5181
+ fontSize: 8,
5182
+ fontWeight: "700",
5183
+ color: WHITE2,
5184
+ pointerEvents: "none",
5185
+ children: checkedState ? trackLabel.on : trackLabel.off
5186
+ }
5187
+ ),
5182
5188
  /* @__PURE__ */ jsx(
5183
5189
  Switch.Thumb,
5184
5190
  {
5185
5191
  unstyled: true,
5186
5192
  "data-thumb": true,
5187
5193
  transition: "quicker",
5188
- className: cn(
5189
- "block rounded-full bg-white shadow-sm",
5190
- sizeClasses2.thumb
5191
- ),
5192
- children: thumbLabel && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center h-full w-full text-[8px]", children: checkedState ? thumbLabel.on : thumbLabel.off })
5194
+ width: s.thumb,
5195
+ height: s.thumb,
5196
+ borderRadius: 9999,
5197
+ backgroundColor: WHITE2,
5198
+ boxShadow: "0 1px 2px 0 rgba(0,0,0,0.05)",
5199
+ children: thumbLabel && /* @__PURE__ */ jsx(Text, { width: "100%", height: "100%", textAlign: "center", fontSize: 8, children: checkedState ? thumbLabel.on : thumbLabel.off })
5193
5200
  }
5194
5201
  )
5195
5202
  ]
5196
5203
  }
5197
5204
  ),
5198
- /* @__PURE__ */ jsx(
5205
+ /* @__PURE__ */ jsx(VisuallyHidden, { children: /* @__PURE__ */ jsx(
5199
5206
  "input",
5200
5207
  {
5201
5208
  ref,
5202
5209
  type: "checkbox",
5203
- className: "sr-only",
5204
5210
  checked: checkedState,
5205
5211
  disabled,
5206
5212
  tabIndex: -1,
@@ -5208,15 +5214,8 @@ var SwitchBase = React32.forwardRef(
5208
5214
  onChange: NOOP3,
5209
5215
  ...inputProps
5210
5216
  }
5211
- ),
5212
- children != null && /* @__PURE__ */ jsx(
5213
- "span",
5214
- {
5215
- ...labelProps,
5216
- className: cn(sizeClasses2.label, labelProps?.className),
5217
- children
5218
- }
5219
- )
5217
+ ) }),
5218
+ children != null && /* @__PURE__ */ jsx(Text, { ...labelProps, fontSize: s.label, children })
5220
5219
  ]
5221
5220
  }
5222
5221
  );
@@ -5634,14 +5633,14 @@ var Shape = React32.createContext({
5634
5633
  size: "md",
5635
5634
  fitted: false
5636
5635
  });
5637
- var SIZE2 = {
5636
+ var SIZE9 = {
5638
5637
  sm: { height: 32, minWidth: 32, paddingVertical: 4, paddingHorizontal: 12, fontSize: 14 },
5639
5638
  md: { height: 40, minWidth: 40, paddingVertical: 8, paddingHorizontal: 16, fontSize: 16 },
5640
5639
  free: {}
5641
5640
  };
5642
5641
  var SELECTED_BG2 = "var(--color-selected-control-bg)";
5643
5642
  var SELECTED_FG2 = "var(--color-selected-control-text)";
5644
- var VARIANT3 = {
5643
+ var VARIANT4 = {
5645
5644
  solid: {
5646
5645
  rest: {
5647
5646
  fontWeight: "600",
@@ -5710,7 +5709,7 @@ var TabsList = (props) => {
5710
5709
  };
5711
5710
  var TabsTrigger = ({ children, ...props }) => {
5712
5711
  const { variant, size, fitted } = React32.useContext(Shape);
5713
- const { rest, active } = VARIANT3[variant];
5712
+ const { rest, active } = VARIANT4[variant];
5714
5713
  const selected = useTabsContext().value === props.value;
5715
5714
  return /* @__PURE__ */ jsx(
5716
5715
  Tabs.Tab,
@@ -5723,7 +5722,7 @@ var TabsTrigger = ({ children, ...props }) => {
5723
5722
  cursor: "pointer",
5724
5723
  gap: 8,
5725
5724
  borderWidth: 0,
5726
- ...SIZE2[size],
5725
+ ...SIZE9[size],
5727
5726
  ...rest,
5728
5727
  ...selected ? active : null,
5729
5728
  ...fitted ? { flex: 1 } : null,
@@ -5742,25 +5741,24 @@ var nbsp = String.fromCharCode(160);
5742
5741
  function TruncatedTextTooltip2({ label, children }) {
5743
5742
  return /* @__PURE__ */ jsx(Tooltip, { content: label, positioning: { placement: "top" }, children });
5744
5743
  }
5745
- 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";
5746
- var TAG_VARIANT_CLASSES = {
5747
- subtle: "bg-[var(--color-tag-subtle-bg)] text-[var(--color-tag-subtle-fg)]",
5748
- clickable: "cursor-pointer bg-[var(--color-tag-clickable-bg)] text-[var(--color-tag-clickable-fg)] hover:opacity-76",
5749
- filter: "bg-[var(--color-tag-filter-bg)]",
5750
- select: "cursor-pointer bg-[var(--color-tag-select-bg)] text-[var(--color-tag-select-fg)] hover:text-[var(--color-hover)] hover:opacity-76"
5744
+ var TAG_VARIANT = {
5745
+ subtle: { backgroundColor: "var(--color-tag-subtle-bg)" },
5746
+ clickable: { backgroundColor: "var(--color-tag-clickable-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } },
5747
+ filter: { backgroundColor: "var(--color-tag-filter-bg)" },
5748
+ select: { backgroundColor: "var(--color-tag-select-bg)", cursor: "pointer", hoverStyle: { opacity: 0.76 } }
5749
+ };
5750
+ var TAG_VARIANT_FG = {
5751
+ subtle: "var(--color-tag-subtle-fg)",
5752
+ clickable: "var(--color-tag-clickable-fg)",
5753
+ filter: void 0,
5754
+ select: "var(--color-tag-select-fg)"
5751
5755
  };
5752
- var TAG_SIZE_CLASSES = {
5753
- sm: "px-1 py-0.5 min-h-5 gap-1 text-xs",
5754
- md: "px-1 py-0.5 min-h-6 gap-1 text-sm",
5755
- lg: "px-1.5 py-1.5 min-h-8 min-w-8 gap-1 text-sm"
5756
+ var TAG_SIZE = {
5757
+ sm: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 20, gap: 4 },
5758
+ md: { paddingHorizontal: 4, paddingVertical: 2, minHeight: 24, gap: 4 },
5759
+ lg: { paddingHorizontal: 6, paddingVertical: 6, minHeight: 32, minWidth: 32, gap: 4 }
5756
5760
  };
5757
- var TAG_SELECTED_CLASSES = [
5758
- "bg-[var(--color-tag-select-selected-bg)]",
5759
- "text-[var(--color-tag-select-selected-fg)]",
5760
- "hover:text-[var(--color-tag-select-selected-fg)]",
5761
- "hover:opacity-76"
5762
- ].join(" ");
5763
- var TAG_DISABLED_CLASSES = "opacity-40 pointer-events-none cursor-not-allowed";
5761
+ var TAG_SIZE_FONT = { sm: 12, md: 14, lg: 14 };
5764
5762
  var Tag = React32.forwardRef(
5765
5763
  function Tag2(props, ref) {
5766
5764
  const {
@@ -5780,52 +5778,87 @@ var Tag = React32.forwardRef(
5780
5778
  className,
5781
5779
  ...rest
5782
5780
  } = props;
5783
- const labelElement = label ? /* @__PURE__ */ jsxs("span", { className: "text-[var(--color-text-secondary)]", children: [
5781
+ const resolvedVariant = variant ?? "subtle";
5782
+ const resolvedSize = size ?? "md";
5783
+ const isSelected = Boolean(selected) && !loading;
5784
+ const backgroundColor = isSelected ? "var(--color-tag-select-selected-bg)" : TAG_VARIANT[resolvedVariant].backgroundColor;
5785
+ const color = isSelected ? "var(--color-tag-select-selected-fg)" : TAG_VARIANT_FG[resolvedVariant];
5786
+ const hoverStyle = isSelected ? { opacity: 0.76 } : TAG_VARIANT[resolvedVariant].hoverStyle;
5787
+ const textHoverColor = !isSelected && resolvedVariant === "select" ? "var(--color-hover)" : void 0;
5788
+ const labelElement = label ? /* @__PURE__ */ jsxs(Text, { fontSize: TAG_SIZE_FONT[resolvedSize], fontWeight: "500", color: "var(--color-text-secondary)", children: [
5784
5789
  label,
5785
5790
  ":",
5786
5791
  nbsp
5787
5792
  ] }) : null;
5788
- const labelSpan = /* @__PURE__ */ jsxs("span", { className: "line-clamp-1 whitespace-nowrap text-ellipsis font-medium inline", children: [
5789
- labelElement,
5790
- children
5791
- ] });
5793
+ const labelSpan = (
5794
+ // `ellipsis` is Text's own built-in single-line-truncation variant —
5795
+ // the same rule Tailwind's `line-clamp-1`/`text-ellipsis` drew, through
5796
+ // the component's variants rather than three separate style props.
5797
+ /* @__PURE__ */ jsxs(
5798
+ Text,
5799
+ {
5800
+ ellipsis: true,
5801
+ fontWeight: "500",
5802
+ fontSize: TAG_SIZE_FONT[resolvedSize],
5803
+ color,
5804
+ hoverStyle: textHoverColor ? { color: textHoverColor } : void 0,
5805
+ children: [
5806
+ labelElement,
5807
+ children
5808
+ ]
5809
+ }
5810
+ )
5811
+ );
5792
5812
  const contentElement = truncated ? /* @__PURE__ */ jsx(TruncatedTextTooltip2, { label: children, children: labelSpan }) : labelSpan;
5793
5813
  return /* @__PURE__ */ jsx(Skeleton, { loading, asChild: true, children: /* @__PURE__ */ jsxs(
5794
- "span",
5814
+ XStack,
5795
5815
  {
5796
5816
  ref,
5797
- className: cn(
5798
- TAG_BASE,
5799
- TAG_VARIANT_CLASSES[variant ?? "subtle"],
5800
- TAG_SIZE_CLASSES[size ?? "md"],
5801
- selected && !loading && TAG_SELECTED_CLASSES,
5802
- disabled && TAG_DISABLED_CLASSES,
5803
- className
5804
- ),
5805
- ...selected && !loading && { "data-selected": true },
5817
+ render: /* @__PURE__ */ jsx("span", {}),
5818
+ display: "inline-flex",
5819
+ alignItems: "center",
5820
+ verticalAlign: "top",
5821
+ maxWidth: "100%",
5822
+ userSelect: "text",
5823
+ ...TAG_SIZE[resolvedSize],
5824
+ backgroundColor,
5825
+ hoverStyle,
5826
+ focusVisibleStyle: {
5827
+ outlineWidth: 2,
5828
+ outlineOffset: 2,
5829
+ outlineColor: "var(--color-gray-500)",
5830
+ outlineStyle: "solid"
5831
+ },
5832
+ cursor: disabled ? "not-allowed" : TAG_VARIANT[resolvedVariant].cursor,
5833
+ ...disabled ? { opacity: 0.4, pointerEvents: "none" } : {},
5834
+ ...isSelected && { "data-selected": true },
5806
5835
  ...disabled && { "data-disabled": true },
5836
+ className,
5807
5837
  ...rest,
5808
5838
  children: [
5809
- startElement && /* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center justify-center empty:hidden", children: startElement }),
5839
+ startElement && /* @__PURE__ */ jsx(XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: startElement }),
5810
5840
  contentElement,
5811
- endElement && /* @__PURE__ */ jsx(
5812
- "span",
5813
- {
5814
- ...endElementProps,
5815
- className: cn(
5816
- "shrink-0 inline-flex items-center justify-center",
5817
- endElementProps?.className
5818
- ),
5819
- children: endElement
5820
- }
5821
- ),
5822
- closable && /* @__PURE__ */ jsx("span", { className: "shrink-0 inline-flex items-center justify-center", children: /* @__PURE__ */ jsx(CloseButton, { onClick: onClose }) })
5841
+ endElement && (() => {
5842
+ const { className: endClassName, ...endElementRest } = endElementProps ?? {};
5843
+ return /* @__PURE__ */ jsx(
5844
+ XStack,
5845
+ {
5846
+ ...endElementRest,
5847
+ flexShrink: 0,
5848
+ alignItems: "center",
5849
+ justifyContent: "center",
5850
+ className: endClassName,
5851
+ children: endElement
5852
+ }
5853
+ );
5854
+ })(),
5855
+ closable && /* @__PURE__ */ jsx(XStack, { flexShrink: 0, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx(CloseButton, { onClick: onClose }) })
5823
5856
  ]
5824
5857
  }
5825
5858
  ) });
5826
5859
  }
5827
5860
  );
5828
- var SIZE3 = {
5861
+ var SIZE10 = {
5829
5862
  xs: { paddingHorizontal: 8, paddingVertical: 4, fontSize: 12, borderRadius: 4 },
5830
5863
  sm: { paddingHorizontal: 12, paddingVertical: 8, fontSize: 14, borderRadius: 6 },
5831
5864
  md: { paddingHorizontal: 16, paddingVertical: 8, fontSize: 16, borderRadius: 6 },
@@ -5848,8 +5881,8 @@ var Textarea = React32__default.forwardRef(
5848
5881
  unstyled: true,
5849
5882
  className: className ? `lux-control ${className}` : "lux-control",
5850
5883
  ...CONTROL,
5851
- ...SIZE3[size],
5852
- ...VARIANT2[variant],
5884
+ ...SIZE10[size],
5885
+ ...VARIANT3[variant],
5853
5886
  ...rest,
5854
5887
  onChange: handleChange
5855
5888
  }
@@ -5958,20 +5991,55 @@ function fmtPct(n) {
5958
5991
  if (n === void 0 || n === null) return "-";
5959
5992
  return `${(n * 100).toFixed(1)}%`;
5960
5993
  }
5994
+ var justify = (align) => align === "right" ? "flex-end" : align === "left" ? "flex-start" : "center";
5961
5995
  function QuoteCell({ value, highlight, align = "right", onClick, className }) {
5962
5996
  return /* @__PURE__ */ jsx(
5963
- "td",
5997
+ View,
5964
5998
  {
5965
- className: cn(
5966
- "px-1.5 py-1 font-mono tabular-nums text-xs whitespace-nowrap",
5967
- align === "right" ? "text-right" : "text-left",
5968
- highlight && "text-zinc-100",
5969
- !highlight && "text-zinc-400",
5970
- onClick && "cursor-pointer hover:bg-zinc-700/50 transition-colors",
5971
- className
5972
- ),
5999
+ unstyled: true,
6000
+ render: /* @__PURE__ */ jsx("td", {}),
5973
6001
  onClick,
5974
- children: value
6002
+ paddingHorizontal: 6,
6003
+ paddingVertical: 4,
6004
+ cursor: onClick ? "pointer" : void 0,
6005
+ transition: "quick",
6006
+ hoverStyle: onClick ? { backgroundColor: "var(--color-popover-item-hover)" } : void 0,
6007
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6008
+ className,
6009
+ children: /* @__PURE__ */ jsx(
6010
+ Text,
6011
+ {
6012
+ fontSize: 12,
6013
+ style: { fontFamily: "monospace", whiteSpace: "nowrap" },
6014
+ fontVariant: ["tabular-nums"],
6015
+ color: highlight ? "var(--color-text-primary)" : "var(--color-text-secondary)",
6016
+ children: value
6017
+ }
6018
+ )
6019
+ }
6020
+ );
6021
+ }
6022
+ function HeadCell({ children, colSpan, align = "center", size = "column", color }) {
6023
+ return /* @__PURE__ */ jsx(
6024
+ View,
6025
+ {
6026
+ unstyled: true,
6027
+ render: colSpan ? /* @__PURE__ */ jsx("th", { colSpan }) : /* @__PURE__ */ jsx("th", {}),
6028
+ paddingHorizontal: size === "group" ? 8 : 6,
6029
+ paddingVertical: size === "group" ? 6 : 4,
6030
+ style: { display: "flex", alignItems: "center", justifyContent: justify(align) },
6031
+ children: children != null && /* @__PURE__ */ jsx(
6032
+ Text,
6033
+ {
6034
+ fontSize: 10,
6035
+ fontWeight: size === "group" ? "600" : "500",
6036
+ textTransform: "uppercase",
6037
+ letterSpacing: 0.5,
6038
+ style: { whiteSpace: "nowrap" },
6039
+ color: color ?? "var(--color-text-secondary)",
6040
+ children
6041
+ }
6042
+ )
5975
6043
  }
5976
6044
  );
5977
6045
  }
@@ -6002,71 +6070,51 @@ var OptionChain = React32.forwardRef(
6002
6070
  [onSelectContract]
6003
6071
  );
6004
6072
  return /* @__PURE__ */ jsx(
6005
- "div",
6073
+ View,
6006
6074
  {
6007
6075
  ref,
6008
- className: cn("w-full overflow-x-auto", className),
6076
+ unstyled: true,
6077
+ width: "100%",
6078
+ overflowX: "auto",
6079
+ className,
6009
6080
  ...rest,
6010
- children: /* @__PURE__ */ jsxs("table", { className: "w-full border-collapse text-xs", children: [
6011
- /* @__PURE__ */ jsxs("thead", { children: [
6012
- /* @__PURE__ */ jsxs("tr", { className: "border-b border-zinc-800", children: [
6013
- /* @__PURE__ */ jsx(
6014
- "th",
6015
- {
6016
- colSpan: CALL_HEADERS.length,
6017
- className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-emerald-400",
6018
- children: "Calls"
6019
- }
6020
- ),
6021
- /* @__PURE__ */ jsx("th", { className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-zinc-500", children: "Strike" }),
6022
- /* @__PURE__ */ jsx(
6023
- "th",
6024
- {
6025
- colSpan: PUT_HEADERS.length,
6026
- className: "px-2 py-1.5 text-center text-[10px] font-semibold uppercase tracking-wider text-red-400",
6027
- children: "Puts"
6028
- }
6029
- )
6081
+ children: /* @__PURE__ */ jsxs(View, { unstyled: true, render: /* @__PURE__ */ jsx("table", {}), width: "100%", style: { borderCollapse: "collapse" }, children: [
6082
+ /* @__PURE__ */ jsxs(View, { unstyled: true, render: /* @__PURE__ */ jsx("thead", {}), children: [
6083
+ /* @__PURE__ */ jsxs(View, { unstyled: true, render: /* @__PURE__ */ jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-border-divider)", children: [
6084
+ /* @__PURE__ */ jsx(HeadCell, { colSpan: CALL_HEADERS.length, size: "group", color: "var(--color-status-good)", children: "Calls" }),
6085
+ /* @__PURE__ */ jsx(HeadCell, { size: "group", children: "Strike" }),
6086
+ /* @__PURE__ */ jsx(HeadCell, { colSpan: PUT_HEADERS.length, size: "group", color: "var(--color-status-bad)", children: "Puts" })
6030
6087
  ] }),
6031
- /* @__PURE__ */ jsxs("tr", { className: "border-b border-zinc-800/60", children: [
6032
- CALL_HEADERS.map((h) => /* @__PURE__ */ jsx(
6033
- "th",
6034
- {
6035
- className: "px-1.5 py-1 text-right text-[10px] font-medium uppercase tracking-wider text-zinc-500",
6036
- children: h
6037
- },
6038
- `call-${h}`
6039
- )),
6040
- /* @__PURE__ */ jsx("th", { className: "px-2 py-1 text-center text-[10px] font-medium uppercase tracking-wider text-zinc-500" }),
6088
+ /* @__PURE__ */ jsxs(View, { unstyled: true, render: /* @__PURE__ */ jsx("tr", {}), borderBottomWidth: 1, borderColor: "var(--color-popover-item-hover)", children: [
6089
+ CALL_HEADERS.map((h) => /* @__PURE__ */ jsx(HeadCell, { align: "right", children: h }, `call-${h}`)),
6090
+ /* @__PURE__ */ jsx(HeadCell, {}),
6041
6091
  PUT_HEADERS.map((h) => /* @__PURE__ */ jsx(
6042
- "th",
6092
+ HeadCell,
6043
6093
  {
6044
- className: cn(
6045
- "px-1.5 py-1 text-[10px] font-medium uppercase tracking-wider text-zinc-500",
6046
- h === "Bid" || h === "Ask" || h === "Last" ? "text-left" : "text-right"
6047
- ),
6094
+ align: h === "Bid" || h === "Ask" || h === "Last" ? "left" : "right",
6048
6095
  children: h
6049
6096
  },
6050
6097
  `put-${h}`
6051
6098
  ))
6052
6099
  ] })
6053
6100
  ] }),
6054
- /* @__PURE__ */ jsx("tbody", { children: strikes.map((row) => {
6101
+ /* @__PURE__ */ jsx(View, { unstyled: true, render: /* @__PURE__ */ jsx("tbody", {}), children: strikes.map((row) => {
6055
6102
  const isATM = Math.abs(row.strike - spotPrice) <= (strikes.length > 1 ? Math.abs((strikes[1]?.strike ?? 0) - (strikes[0]?.strike ?? 0)) / 2 : 0.5);
6056
6103
  const callITM = row.strike < spotPrice;
6057
6104
  const putITM = row.strike > spotPrice;
6058
6105
  const c = row.call;
6059
6106
  const p = row.put;
6107
+ 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";
6060
6108
  return /* @__PURE__ */ jsxs(
6061
- "tr",
6109
+ View,
6062
6110
  {
6063
- className: cn(
6064
- "border-b border-zinc-800/30 transition-colors",
6065
- isATM && "bg-zinc-800/60",
6066
- !isATM && callITM && "bg-emerald-950/20",
6067
- !isATM && putITM && "bg-red-950/20",
6068
- !isATM && !callITM && !putITM && "hover:bg-zinc-800/30"
6069
- ),
6111
+ unstyled: true,
6112
+ render: /* @__PURE__ */ jsx("tr", {}),
6113
+ borderBottomWidth: 1,
6114
+ borderColor: "color-mix(in srgb, var(--color-border-divider) 50%, transparent)",
6115
+ transition: "quick",
6116
+ backgroundColor: rowBg,
6117
+ hoverStyle: isATM || callITM || putITM ? void 0 : { backgroundColor: "var(--color-popover-item-hover)" },
6070
6118
  children: [
6071
6119
  /* @__PURE__ */ jsx(
6072
6120
  QuoteCell,
@@ -6090,13 +6138,24 @@ var OptionChain = React32.forwardRef(
6090
6138
  /* @__PURE__ */ jsx(QuoteCell, { value: fmtPct(c?.iv) }),
6091
6139
  /* @__PURE__ */ jsx(QuoteCell, { value: fmt(c?.delta, 3) }),
6092
6140
  /* @__PURE__ */ jsx(
6093
- "td",
6141
+ View,
6094
6142
  {
6095
- className: cn(
6096
- "px-2 py-1 text-center font-mono tabular-nums text-xs font-semibold",
6097
- isATM ? "text-[var(--foreground)] bg-[var(--secondary)]" : "text-[var(--muted-foreground)]"
6098
- ),
6099
- children: fmt(row.strike)
6143
+ unstyled: true,
6144
+ render: /* @__PURE__ */ jsx("td", {}),
6145
+ paddingHorizontal: 8,
6146
+ paddingVertical: 4,
6147
+ style: { display: "flex", alignItems: "center", justifyContent: "center" },
6148
+ children: /* @__PURE__ */ jsx(
6149
+ Text,
6150
+ {
6151
+ fontSize: 12,
6152
+ fontWeight: "600",
6153
+ style: { fontFamily: "monospace" },
6154
+ fontVariant: ["tabular-nums"],
6155
+ color: isATM ? "var(--foreground)" : "var(--muted-foreground)",
6156
+ children: fmt(row.strike)
6157
+ }
6158
+ )
6100
6159
  }
6101
6160
  ),
6102
6161
  /* @__PURE__ */ jsx(QuoteCell, { value: fmt(p?.delta, 3), align: "right" }),
@@ -6133,40 +6192,54 @@ var OptionChain = React32.forwardRef(
6133
6192
  }
6134
6193
  );
6135
6194
  var GREEKS = [
6136
- { key: "delta", label: "Delta", symbol: "\u0394", color: "text-[var(--foreground)]", barColor: "bg-[var(--foreground)]", decimals: 4, maxMagnitude: 1 },
6137
- { key: "gamma", label: "Gamma", symbol: "\u0393", color: "text-[var(--chart-1)]", barColor: "bg-[var(--chart-1)]", decimals: 4, maxMagnitude: 0.1 },
6138
- { key: "theta", label: "Theta", symbol: "\u0398", color: "text-[var(--chart-4)]", barColor: "bg-[var(--chart-4)]", decimals: 4, maxMagnitude: 1 },
6139
- { key: "vega", label: "Vega", symbol: "\u03BD", color: "text-[var(--chart-2)]", barColor: "bg-[var(--chart-2)]", decimals: 4, maxMagnitude: 1 },
6140
- { key: "rho", label: "Rho", symbol: "\u03C1", color: "text-[var(--chart-3)]", barColor: "bg-[var(--chart-3)]", decimals: 4, maxMagnitude: 1 },
6141
- { key: "iv", label: "IV", symbol: "\u03C3", color: "text-[var(--chart-5)]", barColor: "bg-[var(--chart-5)]", decimals: 1, maxMagnitude: 100 }
6195
+ { key: "delta", label: "Delta", symbol: "\u0394", color: "var(--foreground)", barColor: "var(--foreground)", decimals: 4, maxMagnitude: 1 },
6196
+ { key: "gamma", label: "Gamma", symbol: "\u0393", color: "var(--chart-1)", barColor: "var(--chart-1)", decimals: 4, maxMagnitude: 0.1 },
6197
+ { key: "theta", label: "Theta", symbol: "\u0398", color: "var(--chart-4)", barColor: "var(--chart-4)", decimals: 4, maxMagnitude: 1 },
6198
+ { key: "vega", label: "Vega", symbol: "\u03BD", color: "var(--chart-2)", barColor: "var(--chart-2)", decimals: 4, maxMagnitude: 1 },
6199
+ { key: "rho", label: "Rho", symbol: "\u03C1", color: "var(--chart-3)", barColor: "var(--chart-3)", decimals: 4, maxMagnitude: 1 },
6200
+ { key: "iv", label: "IV", symbol: "\u03C3", color: "var(--chart-5)", barColor: "var(--chart-5)", decimals: 1, maxMagnitude: 100 }
6142
6201
  ];
6143
6202
  function GreekItem({ def, value, compact }) {
6144
6203
  const magnitude = Math.min(Math.abs(value) / def.maxMagnitude, 1);
6145
6204
  const displayValue = def.key === "iv" ? `${(value * 100).toFixed(def.decimals)}%` : value.toFixed(def.decimals);
6146
- return /* @__PURE__ */ jsxs(
6147
- "div",
6148
- {
6149
- className: cn(
6150
- "flex items-center gap-1.5",
6151
- compact ? "min-w-0" : "min-w-[100px]"
6152
- ),
6153
- children: [
6154
- /* @__PURE__ */ jsx("span", { className: cn("text-[10px] font-semibold shrink-0", def.color), children: def.symbol }),
6155
- !compact && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-zinc-500 shrink-0 w-[34px]", children: def.label }),
6156
- /* @__PURE__ */ jsx("span", { className: cn(
6157
- "font-mono tabular-nums text-xs text-zinc-200 shrink-0",
6158
- value < 0 && "text-red-400"
6159
- ), children: displayValue }),
6160
- !compact && /* @__PURE__ */ jsx("div", { className: "flex-1 h-1 rounded-full bg-zinc-800 min-w-[24px] max-w-[48px] overflow-hidden", children: /* @__PURE__ */ jsx(
6161
- "div",
6205
+ return /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 6, minWidth: compact ? 0 : 100, children: [
6206
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, fontWeight: "600", flexShrink: 0, color: def.color, children: def.symbol }),
6207
+ !compact && /* @__PURE__ */ jsx(Text, { fontSize: 10, flexShrink: 0, width: 34, color: "var(--color-text-secondary)", children: def.label }),
6208
+ /* @__PURE__ */ jsx(
6209
+ Text,
6210
+ {
6211
+ fontSize: 12,
6212
+ flexShrink: 0,
6213
+ style: { fontFamily: "monospace" },
6214
+ fontVariant: ["tabular-nums"],
6215
+ color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-primary)",
6216
+ children: displayValue
6217
+ }
6218
+ ),
6219
+ !compact && /* @__PURE__ */ jsx(
6220
+ View,
6221
+ {
6222
+ flex: 1,
6223
+ height: 4,
6224
+ borderRadius: 9999,
6225
+ minWidth: 24,
6226
+ maxWidth: 48,
6227
+ overflow: "hidden",
6228
+ backgroundColor: "var(--color-progress-track)",
6229
+ children: /* @__PURE__ */ jsx(
6230
+ View,
6162
6231
  {
6163
- className: cn("h-full rounded-full transition-all", def.barColor),
6164
- style: { width: `${magnitude * 100}%`, opacity: 0.7 }
6232
+ height: "100%",
6233
+ borderRadius: 9999,
6234
+ transition: "quick",
6235
+ width: `${magnitude * 100}%`,
6236
+ opacity: 0.7,
6237
+ backgroundColor: def.barColor
6165
6238
  }
6166
- ) })
6167
- ]
6168
- }
6169
- );
6239
+ )
6240
+ }
6241
+ )
6242
+ ] });
6170
6243
  }
6171
6244
  var GreeksDisplay = React32.forwardRef(
6172
6245
  function GreeksDisplay2(props, ref) {
@@ -6191,14 +6264,13 @@ var GreeksDisplay = React32.forwardRef(
6191
6264
  };
6192
6265
  const activeGreeks = GREEKS.filter((g) => values[g.key] !== void 0);
6193
6266
  return /* @__PURE__ */ jsx(
6194
- "div",
6267
+ XStack,
6195
6268
  {
6196
6269
  ref,
6197
- className: cn(
6198
- "flex flex-wrap items-center",
6199
- compact ? "gap-3" : "gap-4",
6200
- className
6201
- ),
6270
+ flexWrap: "wrap",
6271
+ alignItems: "center",
6272
+ gap: compact ? 12 : 16,
6273
+ className,
6202
6274
  ...rest,
6203
6275
  children: activeGreeks.map((g) => /* @__PURE__ */ jsx(
6204
6276
  GreekItem,
@@ -6321,84 +6393,145 @@ var STRATEGY_PRESETS = [
6321
6393
  ]
6322
6394
  }
6323
6395
  ];
6396
+ var MONO = "monospace";
6397
+ var CONTROL_BOX = {
6398
+ backgroundColor: "var(--color-input-bg)",
6399
+ borderWidth: 1,
6400
+ borderColor: "var(--color-input-border)",
6401
+ outlineWidth: 0,
6402
+ focusStyle: { borderColor: "var(--color-input-border-focus)" }
6403
+ };
6404
+ var CONTROL_INK = { color: "var(--color-input-fg)" };
6324
6405
  function LegRow({ leg, index, strikes, expirations, removable, onChange, onRemove }) {
6325
6406
  const update2 = (patch) => {
6326
6407
  onChange(index, { ...leg, ...patch });
6327
6408
  };
6328
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 rounded-md bg-zinc-800/50 px-2 py-1.5", children: [
6329
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-mono text-zinc-500 w-4 shrink-0", children: index + 1 }),
6330
- /* @__PURE__ */ jsx(
6331
- "button",
6332
- {
6333
- type: "button",
6334
- className: cn(
6335
- "px-2 py-0.5 rounded text-xs font-semibold transition-colors",
6336
- leg.action === "buy" ? "bg-emerald-900/60 text-emerald-400" : "bg-red-900/60 text-red-400"
6409
+ return /* @__PURE__ */ jsxs(
6410
+ XStack,
6411
+ {
6412
+ alignItems: "center",
6413
+ gap: 8,
6414
+ borderRadius: 6,
6415
+ backgroundColor: "var(--color-tag-subtle-bg)",
6416
+ paddingHorizontal: 8,
6417
+ paddingVertical: 6,
6418
+ children: [
6419
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, style: { fontFamily: MONO }, flexShrink: 0, width: 16, color: "var(--color-text-secondary)", children: index + 1 }),
6420
+ /* @__PURE__ */ jsx(
6421
+ XStack,
6422
+ {
6423
+ unstyled: true,
6424
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
6425
+ onClick: () => update2({ action: leg.action === "buy" ? "sell" : "buy" }),
6426
+ paddingHorizontal: 8,
6427
+ paddingVertical: 2,
6428
+ borderRadius: 4,
6429
+ borderWidth: 0,
6430
+ cursor: "pointer",
6431
+ transition: "quick",
6432
+ backgroundColor: leg.action === "buy" ? "color-mix(in srgb, var(--color-status-good) 20%, transparent)" : "color-mix(in srgb, var(--color-status-bad) 20%, transparent)",
6433
+ children: /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", color: leg.action === "buy" ? "var(--color-status-good)" : "var(--color-status-bad)", children: leg.action === "buy" ? "BUY" : "SELL" })
6434
+ }
6337
6435
  ),
6338
- onClick: () => update2({ action: leg.action === "buy" ? "sell" : "buy" }),
6339
- children: leg.action === "buy" ? "BUY" : "SELL"
6340
- }
6341
- ),
6342
- /* @__PURE__ */ jsx(
6343
- "button",
6344
- {
6345
- type: "button",
6346
- className: cn(
6347
- "px-2 py-0.5 rounded text-xs font-medium transition-colors",
6348
- // Call vs put is a rank difference, not a hue difference.
6349
- leg.type === "call" ? "bg-[var(--secondary)] text-[var(--foreground)]" : "bg-[var(--muted)] text-[var(--muted-foreground)]"
6436
+ /* @__PURE__ */ jsx(
6437
+ XStack,
6438
+ {
6439
+ unstyled: true,
6440
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
6441
+ onClick: () => update2({ type: leg.type === "call" ? "put" : "call" }),
6442
+ paddingHorizontal: 8,
6443
+ paddingVertical: 2,
6444
+ borderRadius: 4,
6445
+ borderWidth: 0,
6446
+ cursor: "pointer",
6447
+ transition: "quick",
6448
+ backgroundColor: leg.type === "call" ? "var(--secondary)" : "var(--muted)",
6449
+ children: /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "500", color: leg.type === "call" ? "var(--foreground)" : "var(--muted-foreground)", children: leg.type === "call" ? "CALL" : "PUT" })
6450
+ }
6350
6451
  ),
6351
- onClick: () => update2({ type: leg.type === "call" ? "put" : "call" }),
6352
- children: leg.type === "call" ? "CALL" : "PUT"
6353
- }
6354
- ),
6355
- /* @__PURE__ */ jsx(
6356
- "select",
6357
- {
6358
- value: leg.strike,
6359
- onChange: (e) => update2({ strike: Number(e.target.value) }),
6360
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs font-mono text-zinc-200 outline-none focus:border-zinc-500 min-w-[72px]",
6361
- children: strikes.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: s.toFixed(2) }, s))
6362
- }
6363
- ),
6364
- /* @__PURE__ */ jsx(
6365
- "select",
6366
- {
6367
- value: leg.expiration,
6368
- onChange: (e) => update2({ expiration: e.target.value }),
6369
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs text-zinc-200 outline-none focus:border-zinc-500 min-w-[80px]",
6370
- children: expirations.map((exp) => /* @__PURE__ */ jsx("option", { value: exp, children: exp }, exp))
6371
- }
6372
- ),
6373
- /* @__PURE__ */ jsx(
6374
- "input",
6375
- {
6376
- type: "number",
6377
- min: 1,
6378
- max: 999,
6379
- value: leg.quantity,
6380
- onChange: (e) => update2({ quantity: Math.max(1, parseInt(e.target.value, 10) || 1) }),
6381
- className: "bg-zinc-900 border border-zinc-700 rounded px-1.5 py-0.5 text-xs font-mono text-zinc-200 outline-none focus:border-zinc-500 w-[48px] text-center"
6382
- }
6383
- ),
6384
- leg.premium !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn(
6385
- "font-mono tabular-nums text-xs ml-auto",
6386
- leg.premium >= 0 ? "text-emerald-400" : "text-red-400"
6387
- ), children: [
6388
- leg.premium >= 0 ? "+" : "",
6389
- leg.premium.toFixed(2)
6390
- ] }),
6391
- removable && /* @__PURE__ */ jsx(
6392
- "button",
6393
- {
6394
- type: "button",
6395
- onClick: () => onRemove(index),
6396
- className: "ml-auto p-0.5 text-zinc-500 hover:text-red-400 transition-colors",
6397
- "aria-label": "Remove leg",
6398
- children: /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
6399
- }
6400
- )
6401
- ] });
6452
+ /* @__PURE__ */ jsx(
6453
+ View,
6454
+ {
6455
+ unstyled: true,
6456
+ render: /* @__PURE__ */ jsx("select", { value: leg.strike, onChange: (e) => update2({ strike: Number(e.target.value) }) }),
6457
+ ...CONTROL_BOX,
6458
+ borderRadius: 4,
6459
+ paddingHorizontal: 6,
6460
+ paddingVertical: 2,
6461
+ minWidth: 72,
6462
+ style: { ...CONTROL_INK, fontFamily: MONO, fontSize: 12 },
6463
+ children: strikes.map((s) => /* @__PURE__ */ jsx("option", { value: s, children: s.toFixed(2) }, s))
6464
+ }
6465
+ ),
6466
+ /* @__PURE__ */ jsx(
6467
+ View,
6468
+ {
6469
+ unstyled: true,
6470
+ render: /* @__PURE__ */ jsx("select", { value: leg.expiration, onChange: (e) => update2({ expiration: e.target.value }) }),
6471
+ ...CONTROL_BOX,
6472
+ borderRadius: 4,
6473
+ paddingHorizontal: 6,
6474
+ paddingVertical: 2,
6475
+ minWidth: 80,
6476
+ style: { ...CONTROL_INK, fontSize: 12 },
6477
+ children: expirations.map((exp) => /* @__PURE__ */ jsx("option", { value: exp, children: exp }, exp))
6478
+ }
6479
+ ),
6480
+ /* @__PURE__ */ jsx(
6481
+ View,
6482
+ {
6483
+ unstyled: true,
6484
+ render: /* @__PURE__ */ jsx(
6485
+ "input",
6486
+ {
6487
+ type: "number",
6488
+ min: 1,
6489
+ max: 999,
6490
+ value: leg.quantity,
6491
+ onChange: (e) => update2({ quantity: Math.max(1, parseInt(e.target.value, 10) || 1) })
6492
+ }
6493
+ ),
6494
+ ...CONTROL_BOX,
6495
+ borderRadius: 4,
6496
+ paddingHorizontal: 6,
6497
+ paddingVertical: 2,
6498
+ width: 48,
6499
+ style: { ...CONTROL_INK, fontFamily: MONO, fontSize: 12, textAlign: "center" }
6500
+ }
6501
+ ),
6502
+ leg.premium !== void 0 && /* @__PURE__ */ jsxs(
6503
+ Text,
6504
+ {
6505
+ fontSize: 12,
6506
+ style: { fontFamily: MONO },
6507
+ fontVariant: ["tabular-nums"],
6508
+ marginLeft: "auto",
6509
+ color: leg.premium >= 0 ? "var(--color-status-good)" : "var(--color-status-bad)",
6510
+ children: [
6511
+ leg.premium >= 0 ? "+" : "",
6512
+ leg.premium.toFixed(2)
6513
+ ]
6514
+ }
6515
+ ),
6516
+ removable && /* @__PURE__ */ jsx(
6517
+ XStack,
6518
+ {
6519
+ unstyled: true,
6520
+ render: /* @__PURE__ */ jsx("button", { type: "button", "aria-label": "Remove leg" }),
6521
+ onClick: () => onRemove(index),
6522
+ marginLeft: "auto",
6523
+ padding: 2,
6524
+ borderWidth: 0,
6525
+ cursor: "pointer",
6526
+ transition: "quick",
6527
+ style: { color: "var(--color-text-secondary)" },
6528
+ hoverStyle: { opacity: 0.7 },
6529
+ children: /* @__PURE__ */ jsx("svg", { width: 14, height: 14, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M18 6L6 18M6 6l12 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) })
6530
+ }
6531
+ )
6532
+ ]
6533
+ }
6534
+ );
6402
6535
  }
6403
6536
  var StrategyBuilder = React32.forwardRef(
6404
6537
  function StrategyBuilder2(props, ref) {
@@ -6468,37 +6601,46 @@ var StrategyBuilder = React32.forwardRef(
6468
6601
  });
6469
6602
  }, [onSubmit, strategyType, legs, netPremium]);
6470
6603
  const currentPreset = STRATEGY_PRESETS.find((p) => p.value === strategyType);
6604
+ const netColor = netPremium > 0 ? "var(--color-status-good)" : netPremium < 0 ? "var(--color-status-bad)" : "var(--color-text-secondary)";
6471
6605
  return /* @__PURE__ */ jsxs(
6472
- "div",
6606
+ YStack,
6473
6607
  {
6474
6608
  ref,
6475
- className: cn(
6476
- "flex flex-col gap-3 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",
6477
- className
6478
- ),
6609
+ gap: 12,
6610
+ borderRadius: 8,
6611
+ borderWidth: 1,
6612
+ borderColor: "var(--color-border-divider)",
6613
+ backgroundColor: "var(--card)",
6614
+ padding: 12,
6615
+ className,
6479
6616
  ...rest,
6480
6617
  children: [
6481
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
6482
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6483
- /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold uppercase tracking-wider text-zinc-500", children: "Strategy" }),
6484
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-zinc-200", children: underlying })
6618
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", justifyContent: "space-between", gap: 12, children: [
6619
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 8, children: [
6620
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", textTransform: "uppercase", letterSpacing: 0.6, color: "var(--color-text-secondary)", children: "Strategy" }),
6621
+ /* @__PURE__ */ jsx(Text, { fontSize: 14, fontWeight: "500", color: "var(--color-text-primary)", children: underlying })
6485
6622
  ] }),
6486
- /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-zinc-500", children: [
6623
+ /* @__PURE__ */ jsxs(Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6487
6624
  "Spot: ",
6488
- /* @__PURE__ */ jsx("span", { className: "font-mono tabular-nums text-zinc-300", children: spotPrice.toFixed(2) })
6625
+ /* @__PURE__ */ jsx(Text, { style: { fontFamily: MONO }, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: spotPrice.toFixed(2) })
6489
6626
  ] })
6490
6627
  ] }),
6491
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(
6492
- "select",
6628
+ /* @__PURE__ */ jsx(XStack, { alignItems: "center", gap: 8, children: /* @__PURE__ */ jsx(
6629
+ View,
6493
6630
  {
6494
- value: strategyType,
6495
- onChange: handleStrategyChange,
6496
- className: "flex-1 bg-zinc-900 border border-zinc-700 rounded-md px-2.5 py-1.5 text-sm text-zinc-200 outline-none focus:border-zinc-500",
6631
+ unstyled: true,
6632
+ render: /* @__PURE__ */ jsx("select", { value: strategyType, onChange: handleStrategyChange }),
6633
+ flex: 1,
6634
+ ...CONTROL_BOX,
6635
+ borderRadius: 6,
6636
+ paddingHorizontal: 10,
6637
+ paddingVertical: 6,
6638
+ style: { ...CONTROL_INK, fontSize: 14 },
6497
6639
  children: STRATEGY_PRESETS.map((preset) => /* @__PURE__ */ jsx("option", { value: preset.value, children: preset.label }, preset.value))
6498
6640
  }
6499
6641
  ) }),
6500
- currentPreset && /* @__PURE__ */ jsx("p", { className: "text-[11px] text-zinc-500 -mt-1", children: currentPreset.description }),
6501
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1.5", children: legs.map((leg, i) => /* @__PURE__ */ jsx(
6642
+ currentPreset && /* @__PURE__ */ jsx(Text, { fontSize: 11, marginTop: -4, color: "var(--color-text-secondary)", children: currentPreset.description }),
6643
+ /* @__PURE__ */ jsx(YStack, { gap: 6, children: legs.map((leg, i) => /* @__PURE__ */ jsx(
6502
6644
  LegRow,
6503
6645
  {
6504
6646
  leg,
@@ -6512,40 +6654,53 @@ var StrategyBuilder = React32.forwardRef(
6512
6654
  i
6513
6655
  )) }),
6514
6656
  strategyType === "custom" && legs.length < 4 && /* @__PURE__ */ jsxs(
6515
- "button",
6657
+ XStack,
6516
6658
  {
6517
- type: "button",
6659
+ unstyled: true,
6660
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
6518
6661
  onClick: handleAddLeg,
6519
- className: "flex items-center justify-center gap-1 rounded-md border border-dashed border-zinc-700 py-1 text-xs text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",
6662
+ alignItems: "center",
6663
+ justifyContent: "center",
6664
+ gap: 4,
6665
+ borderRadius: 6,
6666
+ borderWidth: 1,
6667
+ paddingVertical: 4,
6668
+ cursor: "pointer",
6669
+ transition: "quick",
6670
+ borderColor: "var(--color-border-divider)",
6671
+ hoverStyle: { borderColor: "var(--color-hover)" },
6672
+ style: { color: "var(--color-text-secondary)", borderStyle: "dashed" },
6520
6673
  children: [
6521
- /* @__PURE__ */ jsx("svg", { className: "h-3 w-3", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }),
6522
- "Add Leg"
6674
+ /* @__PURE__ */ jsx("svg", { width: 12, height: 12, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M12 5v14M5 12h14", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round" }) }),
6675
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "var(--color-text-secondary)", children: "Add Leg" })
6523
6676
  ]
6524
6677
  }
6525
6678
  ),
6526
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between pt-1 border-t border-zinc-800", children: [
6527
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
6528
- /* @__PURE__ */ jsx("span", { className: "text-xs text-zinc-500", children: "Net:" }),
6529
- /* @__PURE__ */ jsxs("span", { className: cn(
6530
- "font-mono tabular-nums text-sm font-semibold",
6531
- netPremium > 0 ? "text-emerald-400" : netPremium < 0 ? "text-red-400" : "text-zinc-400"
6532
- ), children: [
6679
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", justifyContent: "space-between", paddingTop: 4, borderTopWidth: 1, borderColor: "var(--color-border-divider)", children: [
6680
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 8, children: [
6681
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, color: "var(--color-text-secondary)", children: "Net:" }),
6682
+ /* @__PURE__ */ jsxs(Text, { fontSize: 14, fontWeight: "600", style: { fontFamily: MONO }, fontVariant: ["tabular-nums"], color: netColor, children: [
6533
6683
  netPremium > 0 ? "Credit " : netPremium < 0 ? "Debit " : "",
6534
6684
  netPremium !== 0 ? `$${Math.abs(netPremium).toFixed(2)}` : "-"
6535
6685
  ] })
6536
6686
  ] }),
6537
6687
  /* @__PURE__ */ jsx(
6538
- "button",
6688
+ XStack,
6539
6689
  {
6540
- type: "button",
6690
+ unstyled: true,
6691
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
6541
6692
  onClick: handleSubmit,
6542
6693
  disabled: legs.length === 0,
6543
- className: cn(
6544
- "px-4 py-1.5 rounded-md text-xs font-semibold transition-colors",
6545
- "bg-blue-600 text-white hover:bg-blue-500",
6546
- "disabled:opacity-40 disabled:cursor-not-allowed"
6547
- ),
6548
- children: "Review Order"
6694
+ paddingHorizontal: 16,
6695
+ paddingVertical: 6,
6696
+ borderRadius: 6,
6697
+ borderWidth: 0,
6698
+ cursor: "pointer",
6699
+ transition: "quick",
6700
+ backgroundColor: "var(--color-button-solid-bg)",
6701
+ hoverStyle: { backgroundColor: "var(--color-hover)" },
6702
+ disabledStyle: { opacity: 0.4, cursor: "not-allowed" },
6703
+ children: /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", color: "var(--color-button-solid-text)", children: "Review Order" })
6549
6704
  }
6550
6705
  )
6551
6706
  ] })
@@ -6685,19 +6840,21 @@ var PnlDiagram = React32.forwardRef(
6685
6840
  chartH
6686
6841
  );
6687
6842
  return /* @__PURE__ */ jsxs(
6688
- "div",
6843
+ View,
6689
6844
  {
6690
6845
  ref,
6691
- className: cn("w-full", className),
6846
+ unstyled: true,
6847
+ width: "100%",
6848
+ className,
6692
6849
  ...rest,
6693
6850
  children: [
6694
- /* @__PURE__ */ jsx("div", { ref: containerRef, className: "w-full h-full min-h-[200px]", children: /* @__PURE__ */ jsxs(
6851
+ /* @__PURE__ */ jsx(View, { unstyled: true, ref: containerRef, width: "100%", height: "100%", minHeight: 200, children: /* @__PURE__ */ jsxs(
6695
6852
  "svg",
6696
6853
  {
6697
6854
  width,
6698
6855
  height,
6699
6856
  viewBox: `0 0 ${width} ${height}`,
6700
- className: "select-none",
6857
+ style: { userSelect: "none" },
6701
6858
  onMouseMove: handleMouseMove,
6702
6859
  onMouseLeave: handleMouseLeave,
6703
6860
  children: [
@@ -6936,16 +7093,18 @@ var PnlDiagram = React32.forwardRef(
6936
7093
  ]
6937
7094
  }
6938
7095
  ) }),
6939
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-4 px-2 pt-1", children: [
6940
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
6941
- /* @__PURE__ */ jsx("div", { className: "h-0.5 w-4 bg-zinc-200 rounded" }),
6942
- /* @__PURE__ */ jsx("span", { className: "text-[10px] text-zinc-400", children: "Combined" })
7096
+ /* @__PURE__ */ jsxs(XStack, { flexWrap: "wrap", alignItems: "center", gap: 16, paddingHorizontal: 8, paddingTop: 4, children: [
7097
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 6, children: [
7098
+ /* @__PURE__ */ jsx(View, { height: 2, width: 16, borderRadius: 4, backgroundColor: "var(--color-gray-200)" }),
7099
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, color: "var(--color-text-secondary)", children: "Combined" })
6943
7100
  ] }),
6944
- legs.map((leg, i) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
7101
+ legs.map((leg, i) => /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 6, children: [
6945
7102
  /* @__PURE__ */ jsx(
6946
- "div",
7103
+ View,
6947
7104
  {
6948
- className: "h-0.5 w-4 rounded",
7105
+ height: 2,
7106
+ width: 16,
7107
+ borderRadius: 4,
6949
7108
  style: {
6950
7109
  backgroundColor: LEG_COLORS[i % LEG_COLORS.length],
6951
7110
  opacity: 0.6,
@@ -6953,7 +7112,7 @@ var PnlDiagram = React32.forwardRef(
6953
7112
  }
6954
7113
  }
6955
7114
  ),
6956
- /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-zinc-500", children: [
7115
+ /* @__PURE__ */ jsxs(Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6957
7116
  leg.action === "buy" ? "B" : "S",
6958
7117
  " ",
6959
7118
  leg.quantity,
@@ -6963,9 +7122,9 @@ var PnlDiagram = React32.forwardRef(
6963
7122
  leg.type === "call" ? "C" : "P"
6964
7123
  ] })
6965
7124
  ] }, i)),
6966
- breakevens.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
6967
- /* @__PURE__ */ jsx("div", { className: "h-1.5 w-1.5 rounded-full", style: { background: BREAKEVEN_COLOR } }),
6968
- /* @__PURE__ */ jsxs("span", { className: "text-[10px] text-zinc-500", children: [
7125
+ breakevens.length > 0 && /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 6, children: [
7126
+ /* @__PURE__ */ jsx(View, { width: 6, height: 6, borderRadius: 9999, style: { background: BREAKEVEN_COLOR } }),
7127
+ /* @__PURE__ */ jsxs(Text, { fontSize: 10, color: "var(--color-text-secondary)", children: [
6969
7128
  "BE: ",
6970
7129
  breakevens.map((b) => b.toFixed(1)).join(", ")
6971
7130
  ] })
@@ -6980,6 +7139,7 @@ function formatDate(date) {
6980
7139
  const d = new Date(date);
6981
7140
  return d.toLocaleDateString("en-US", { month: "short", day: "numeric" });
6982
7141
  }
7142
+ var MONO2 = { fontFamily: "monospace" };
6983
7143
  var OptionPositionCard = React32.forwardRef(
6984
7144
  function OptionPositionCard2(props, ref) {
6985
7145
  const {
@@ -6993,64 +7153,76 @@ var OptionPositionCard = React32.forwardRef(
6993
7153
  const isLong = position.quantity > 0;
6994
7154
  const isCall = position.type === "call";
6995
7155
  const isProfitable = position.pnl >= 0;
7156
+ const pnlColor = isProfitable ? "var(--color-status-good)" : "var(--color-status-bad)";
6996
7157
  return /* @__PURE__ */ jsxs(
6997
- "div",
7158
+ YStack,
6998
7159
  {
6999
7160
  ref,
7000
- className: cn(
7001
- "flex flex-col gap-2 rounded-lg border border-zinc-800 bg-zinc-900/50 p-3",
7002
- className
7003
- ),
7161
+ gap: 8,
7162
+ borderRadius: 8,
7163
+ borderWidth: 1,
7164
+ borderColor: "var(--color-border-divider)",
7165
+ backgroundColor: "var(--card)",
7166
+ padding: 12,
7167
+ className,
7004
7168
  ...rest,
7005
7169
  children: [
7006
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
7007
- /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxs("span", { className: cn(
7008
- "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-xs font-semibold",
7009
- // Call vs put is a rank difference, not a hue difference.
7010
- isCall ? "bg-[var(--secondary)] text-[var(--foreground)]" : "bg-[var(--muted)] text-[var(--muted-foreground)]"
7011
- ), children: [
7012
- position.underlying,
7013
- /* @__PURE__ */ jsx("span", { className: "font-mono tabular-nums", children: position.strike }),
7014
- /* @__PURE__ */ jsx("span", { className: "uppercase", children: position.type === "call" ? "C" : "P" }),
7015
- /* @__PURE__ */ jsx("span", { className: "text-zinc-500 font-normal", children: formatDate(position.expiration) })
7016
- ] }) }),
7017
- /* @__PURE__ */ jsxs("span", { className: cn(
7018
- "text-xs font-semibold font-mono tabular-nums",
7019
- isLong ? "text-emerald-400" : "text-red-400"
7020
- ), children: [
7021
- isLong ? "+" : "",
7022
- position.quantity
7023
- ] })
7170
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", justifyContent: "space-between", children: [
7171
+ /* @__PURE__ */ jsx(XStack, { alignItems: "center", gap: 8, children: /* @__PURE__ */ jsxs(
7172
+ XStack,
7173
+ {
7174
+ alignItems: "center",
7175
+ gap: 4,
7176
+ borderRadius: 4,
7177
+ paddingHorizontal: 6,
7178
+ paddingVertical: 2,
7179
+ backgroundColor: isCall ? "var(--secondary)" : "var(--muted)",
7180
+ children: [
7181
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.underlying }),
7182
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", style: MONO2, fontVariant: ["tabular-nums"], color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.strike }),
7183
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "600", textTransform: "uppercase", color: isCall ? "var(--foreground)" : "var(--muted-foreground)", children: position.type === "call" ? "C" : "P" }),
7184
+ /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "400", color: "var(--color-text-secondary)", children: formatDate(position.expiration) })
7185
+ ]
7186
+ }
7187
+ ) }),
7188
+ /* @__PURE__ */ jsxs(
7189
+ Text,
7190
+ {
7191
+ fontSize: 12,
7192
+ fontWeight: "600",
7193
+ style: MONO2,
7194
+ fontVariant: ["tabular-nums"],
7195
+ color: isLong ? "var(--color-status-good)" : "var(--color-status-bad)",
7196
+ children: [
7197
+ isLong ? "+" : "",
7198
+ position.quantity
7199
+ ]
7200
+ }
7201
+ )
7024
7202
  ] }),
7025
- /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-3 gap-3", children: [
7026
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
7027
- /* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "Avg Cost" }),
7028
- /* @__PURE__ */ jsxs("span", { className: "font-mono tabular-nums text-xs text-zinc-300", children: [
7203
+ /* @__PURE__ */ jsxs(XStack, { gap: 12, children: [
7204
+ /* @__PURE__ */ jsxs(YStack, { flex: 1, gap: 2, children: [
7205
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Avg Cost" }),
7206
+ /* @__PURE__ */ jsxs(Text, { fontSize: 12, style: MONO2, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7029
7207
  "$",
7030
7208
  position.avgCost.toFixed(2)
7031
7209
  ] })
7032
7210
  ] }),
7033
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
7034
- /* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "Value" }),
7035
- /* @__PURE__ */ jsxs("span", { className: "font-mono tabular-nums text-xs text-zinc-300", children: [
7211
+ /* @__PURE__ */ jsxs(YStack, { flex: 1, gap: 2, children: [
7212
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "Value" }),
7213
+ /* @__PURE__ */ jsxs(Text, { fontSize: 12, style: MONO2, fontVariant: ["tabular-nums"], color: "var(--color-text-primary)", children: [
7036
7214
  "$",
7037
7215
  position.currentValue.toFixed(2)
7038
7216
  ] })
7039
7217
  ] }),
7040
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end", children: [
7041
- /* @__PURE__ */ jsx("span", { className: "text-[10px] uppercase tracking-wider text-zinc-500", children: "P/L" }),
7042
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
7043
- /* @__PURE__ */ jsxs("span", { className: cn(
7044
- "font-mono tabular-nums text-xs font-semibold",
7045
- isProfitable ? "text-emerald-400" : "text-red-400"
7046
- ), children: [
7218
+ /* @__PURE__ */ jsxs(YStack, { flex: 1, gap: 2, alignItems: "flex-end", children: [
7219
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, textTransform: "uppercase", letterSpacing: 0.5, color: "var(--color-text-secondary)", children: "P/L" }),
7220
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 4, children: [
7221
+ /* @__PURE__ */ jsxs(Text, { fontSize: 12, fontWeight: "600", style: MONO2, fontVariant: ["tabular-nums"], color: pnlColor, children: [
7047
7222
  isProfitable ? "+" : "",
7048
7223
  position.pnl.toFixed(2)
7049
7224
  ] }),
7050
- /* @__PURE__ */ jsxs("span", { className: cn(
7051
- "font-mono tabular-nums text-[10px]",
7052
- isProfitable ? "text-emerald-500/70" : "text-red-500/70"
7053
- ), children: [
7225
+ /* @__PURE__ */ jsxs(Text, { fontSize: 10, style: MONO2, fontVariant: ["tabular-nums"], color: pnlColor, opacity: 0.7, children: [
7054
7226
  "(",
7055
7227
  isProfitable ? "+" : "",
7056
7228
  position.pnlPercent.toFixed(1),
@@ -7059,53 +7231,47 @@ var OptionPositionCard = React32.forwardRef(
7059
7231
  ] })
7060
7232
  ] })
7061
7233
  ] }),
7062
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 border-t border-zinc-800/60 pt-2", children: [
7063
- /* @__PURE__ */ jsx(GreekPill, { label: "\u0394", value: position.greeks.delta, color: "text-blue-400" }),
7064
- /* @__PURE__ */ jsx(GreekPill, { label: "\u0393", value: position.greeks.gamma, color: "text-purple-400" }),
7065
- /* @__PURE__ */ jsx(GreekPill, { label: "\u0398", value: position.greeks.theta, color: "text-red-400" }),
7066
- /* @__PURE__ */ jsx(GreekPill, { label: "\u03BD", value: position.greeks.vega, color: "text-emerald-400" })
7234
+ /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 12, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7235
+ /* @__PURE__ */ jsx(GreekPill, { label: "\u0394", value: position.greeks.delta, color: "var(--foreground)" }),
7236
+ /* @__PURE__ */ jsx(GreekPill, { label: "\u0393", value: position.greeks.gamma, color: "var(--chart-1)" }),
7237
+ /* @__PURE__ */ jsx(GreekPill, { label: "\u0398", value: position.greeks.theta, color: "var(--chart-4)" }),
7238
+ /* @__PURE__ */ jsx(GreekPill, { label: "\u03BD", value: position.greeks.vega, color: "var(--chart-2)" })
7067
7239
  ] }),
7068
- (onClose || onExercise || onRoll) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 border-t border-zinc-800/60 pt-2", children: [
7069
- onClose && /* @__PURE__ */ jsx(
7070
- "button",
7071
- {
7072
- type: "button",
7073
- onClick: () => onClose(position),
7074
- 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",
7075
- children: "Close"
7076
- }
7077
- ),
7078
- onExercise && /* @__PURE__ */ jsx(
7079
- "button",
7080
- {
7081
- type: "button",
7082
- onClick: () => onExercise(position),
7083
- 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",
7084
- children: "Exercise"
7085
- }
7086
- ),
7087
- onRoll && /* @__PURE__ */ jsx(
7088
- "button",
7089
- {
7090
- type: "button",
7091
- onClick: () => onRoll(position),
7092
- 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",
7093
- children: "Roll"
7094
- }
7095
- )
7240
+ (onClose || onExercise || onRoll) && /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 8, borderTopWidth: 1, borderColor: "var(--color-border-divider)", paddingTop: 8, children: [
7241
+ onClose && /* @__PURE__ */ jsx(ActionButton, { onClick: () => onClose(position), children: "Close" }),
7242
+ onExercise && /* @__PURE__ */ jsx(ActionButton, { onClick: () => onExercise(position), children: "Exercise" }),
7243
+ onRoll && /* @__PURE__ */ jsx(ActionButton, { onClick: () => onRoll(position), children: "Roll" })
7096
7244
  ] })
7097
7245
  ]
7098
7246
  }
7099
7247
  );
7100
7248
  }
7101
7249
  );
7250
+ function ActionButton({ onClick, children }) {
7251
+ return /* @__PURE__ */ jsx(
7252
+ XStack,
7253
+ {
7254
+ unstyled: true,
7255
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
7256
+ onClick,
7257
+ flex: 1,
7258
+ alignItems: "center",
7259
+ justifyContent: "center",
7260
+ borderRadius: 6,
7261
+ borderWidth: 0,
7262
+ paddingHorizontal: 8,
7263
+ paddingVertical: 4,
7264
+ backgroundColor: "var(--color-button-subtle-bg)",
7265
+ cursor: "pointer",
7266
+ hoverStyle: { color: "var(--color-hover)" },
7267
+ children: /* @__PURE__ */ jsx(Text, { fontSize: 12, fontWeight: "500", color: "var(--color-button-subtle-fg)", children })
7268
+ }
7269
+ );
7270
+ }
7102
7271
  function GreekPill({ label, value, color }) {
7103
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
7104
- /* @__PURE__ */ jsx("span", { className: cn("text-[10px] font-semibold", color), children: label }),
7105
- /* @__PURE__ */ jsx("span", { className: cn(
7106
- "font-mono tabular-nums text-[11px]",
7107
- value < 0 ? "text-red-400" : "text-zinc-400"
7108
- ), children: value.toFixed(4) })
7272
+ return /* @__PURE__ */ jsxs(XStack, { alignItems: "center", gap: 4, children: [
7273
+ /* @__PURE__ */ jsx(Text, { fontSize: 10, fontWeight: "600", color, children: label }),
7274
+ /* @__PURE__ */ jsx(Text, { fontSize: 11, style: MONO2, fontVariant: ["tabular-nums"], color: value < 0 ? "var(--color-status-bad)" : "var(--color-text-secondary)", children: value.toFixed(4) })
7109
7275
  ] });
7110
7276
  }
7111
7277
  function formatExpDate(date) {
@@ -7118,28 +7284,53 @@ var GROUP_LABELS = {
7118
7284
  monthly: "Monthly",
7119
7285
  quarterly: "Quarterly"
7120
7286
  };
7287
+ var SHAPE = {
7288
+ selected: {
7289
+ borderColor: "transparent",
7290
+ backgroundColor: "var(--color-selected-control-bg)",
7291
+ color: "var(--color-selected-control-text)"
7292
+ },
7293
+ resting: {
7294
+ borderColor: "var(--color-border-divider)",
7295
+ backgroundColor: "var(--card)",
7296
+ color: "var(--color-text-secondary)",
7297
+ hoverStyle: { borderColor: "var(--color-hover)", color: "var(--color-hover)" }
7298
+ }
7299
+ };
7121
7300
  function ExpirationPill({ exp, isSelected, onClick }) {
7301
+ const shape = isSelected ? SHAPE.selected : SHAPE.resting;
7302
+ const dteColor = exp.dte <= 7 && !isSelected ? "var(--color-status-warn)" : isSelected ? "var(--color-selected-control-text)" : "var(--muted-foreground)";
7122
7303
  return /* @__PURE__ */ jsxs(
7123
- "button",
7304
+ YStack,
7124
7305
  {
7125
- type: "button",
7306
+ unstyled: true,
7307
+ render: /* @__PURE__ */ jsx("button", { type: "button" }),
7126
7308
  onClick,
7127
- className: cn(
7128
- "flex flex-col items-center gap-0.5 rounded-md px-3 py-1.5 transition-colors shrink-0",
7129
- "border text-xs",
7130
- 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"
7131
- ),
7309
+ alignItems: "center",
7310
+ gap: 2,
7311
+ borderRadius: 6,
7312
+ paddingHorizontal: 12,
7313
+ paddingVertical: 6,
7314
+ flexShrink: 0,
7315
+ borderWidth: 1,
7316
+ borderStyle: "solid",
7317
+ cursor: "pointer",
7318
+ ...shape,
7132
7319
  children: [
7133
- /* @__PURE__ */ jsx("span", { className: "font-medium whitespace-nowrap", children: formatExpDate(exp.date) }),
7134
- /* @__PURE__ */ jsxs("span", { className: cn(
7135
- "font-mono tabular-nums text-[10px]",
7136
- isSelected ? "text-[var(--foreground)]" : "text-[var(--muted-foreground)]",
7137
- // Near expiry is a notice, and a notice in Lux is the loudest neutral.
7138
- exp.dte <= 7 && !isSelected && "text-[var(--color-status-warn)]"
7139
- ), children: [
7140
- exp.dte,
7141
- "d"
7142
- ] })
7320
+ /* @__PURE__ */ jsx(Text, { unstyled: true, fontSize: 12, fontWeight: "500", style: { whiteSpace: "nowrap" }, children: formatExpDate(exp.date) }),
7321
+ /* @__PURE__ */ jsxs(
7322
+ Text,
7323
+ {
7324
+ fontVariant: ["tabular-nums"],
7325
+ style: { fontFamily: "monospace" },
7326
+ fontSize: 10,
7327
+ color: dteColor,
7328
+ children: [
7329
+ exp.dte,
7330
+ "d"
7331
+ ]
7332
+ }
7333
+ )
7143
7334
  ]
7144
7335
  }
7145
7336
  );
@@ -7169,49 +7360,23 @@ var ExpirationSelector = React32.forwardRef(
7169
7360
  label: GROUP_LABELS[type],
7170
7361
  items: expirations.filter((e) => e.type === type)
7171
7362
  })).filter((g) => g.items.length > 0);
7172
- return /* @__PURE__ */ jsx(
7173
- "div",
7174
- {
7175
- ref,
7176
- className: cn("flex flex-col gap-2", className),
7177
- ...rest,
7178
- children: grouped.map((group) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1", children: [
7179
- /* @__PURE__ */ jsx("span", { className: "text-[10px] font-semibold uppercase tracking-wider text-zinc-600 px-1", children: group.label }),
7180
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 overflow-x-auto no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(
7181
- ExpirationPill,
7182
- {
7183
- exp,
7184
- isSelected: exp.date === selected,
7185
- onClick: () => onSelect(exp.date)
7186
- }
7187
- ) }, exp.date)) })
7188
- ] }, group.type))
7189
- }
7190
- );
7191
- }
7192
- return /* @__PURE__ */ jsx(
7193
- "div",
7194
- {
7195
- ref,
7196
- className: cn("flex items-center gap-1", className),
7197
- ...rest,
7198
- children: /* @__PURE__ */ jsx(
7199
- "div",
7363
+ return /* @__PURE__ */ jsx(YStack, { ref, gap: 8, className, ...rest, children: grouped.map((group) => /* @__PURE__ */ jsxs(YStack, { gap: 4, children: [
7364
+ /* @__PURE__ */ jsx(
7365
+ Text,
7200
7366
  {
7201
- ref: scrollRef,
7202
- className: "flex gap-1.5 overflow-x-auto no-scrollbar",
7203
- children: expirations.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(
7204
- ExpirationPill,
7205
- {
7206
- exp,
7207
- isSelected: exp.date === selected,
7208
- onClick: () => onSelect(exp.date)
7209
- }
7210
- ) }, exp.date))
7367
+ fontSize: 10,
7368
+ fontWeight: "600",
7369
+ textTransform: "uppercase",
7370
+ letterSpacing: 0.5,
7371
+ paddingHorizontal: 4,
7372
+ color: "var(--color-text-secondary)",
7373
+ children: group.label
7211
7374
  }
7212
- )
7213
- }
7214
- );
7375
+ ),
7376
+ /* @__PURE__ */ jsx(XStack, { gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: group.items.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) })
7377
+ ] }, group.type)) });
7378
+ }
7379
+ return /* @__PURE__ */ jsx(XStack, { ref, alignItems: "center", gap: 4, className, ...rest, children: /* @__PURE__ */ jsx(XStack, { ref: scrollRef, gap: 6, overflowX: "auto", overflowY: "hidden", className: "lux-no-scrollbar", children: expirations.map((exp) => /* @__PURE__ */ jsx("div", { "data-selected": exp.date === selected || void 0, children: /* @__PURE__ */ jsx(ExpirationPill, { exp, isSelected: exp.date === selected, onClick: () => onSelect(exp.date) }) }, exp.date)) }) });
7215
7380
  }
7216
7381
  );
7217
7382
  var bankColors = {