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