@cytario/design 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +46 -5
- package/dist/index.js +360 -213
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -837,12 +837,26 @@ var variantConfig = {
|
|
|
837
837
|
iconClass: "text-[var(--color-text-info)]"
|
|
838
838
|
}
|
|
839
839
|
};
|
|
840
|
+
var PlacementContext = createContext2("bottom-right");
|
|
841
|
+
var exitAnimationByPlacement = {
|
|
842
|
+
"top-center": "-translate-y-full opacity-0",
|
|
843
|
+
"top-right": "translate-x-full opacity-0",
|
|
844
|
+
"bottom-center": "translate-y-full opacity-0",
|
|
845
|
+
"bottom-right": "translate-x-full opacity-0"
|
|
846
|
+
};
|
|
847
|
+
var enterAnimationByPlacement = {
|
|
848
|
+
"top-center": "translate-y-0 opacity-100 animate-in slide-in-from-top",
|
|
849
|
+
"top-right": "translate-x-0 opacity-100 animate-in slide-in-from-right",
|
|
850
|
+
"bottom-center": "translate-y-0 opacity-100 animate-in slide-in-from-bottom",
|
|
851
|
+
"bottom-right": "translate-x-0 opacity-100 animate-in slide-in-from-right"
|
|
852
|
+
};
|
|
840
853
|
function ToastItem({
|
|
841
854
|
toast,
|
|
842
855
|
onRemove
|
|
843
856
|
}) {
|
|
844
857
|
const [isExiting, setIsExiting] = useState(false);
|
|
845
858
|
const timerRef = useRef(null);
|
|
859
|
+
const placement = useContext2(PlacementContext);
|
|
846
860
|
const config = variantConfig[toast.variant];
|
|
847
861
|
const IconComponent = config.icon;
|
|
848
862
|
const dismiss = useCallback(() => {
|
|
@@ -865,7 +879,7 @@ function ToastItem({
|
|
|
865
879
|
"flex items-start gap-[var(--spacing-3)] rounded-[var(--border-radius-lg)] border px-[var(--spacing-4)] py-[var(--spacing-3)] shadow-md",
|
|
866
880
|
"min-w-[320px] max-w-[420px]",
|
|
867
881
|
"transition-all duration-200",
|
|
868
|
-
isExiting ?
|
|
882
|
+
isExiting ? exitAnimationByPlacement[placement] : enterAnimationByPlacement[placement],
|
|
869
883
|
config.containerClass
|
|
870
884
|
].join(" "),
|
|
871
885
|
children: [
|
|
@@ -885,10 +899,20 @@ function ToastItem({
|
|
|
885
899
|
}
|
|
886
900
|
);
|
|
887
901
|
}
|
|
888
|
-
|
|
902
|
+
var containerPositionStyles = {
|
|
903
|
+
"top-center": "fixed top-4 left-1/2 -translate-x-1/2 z-50 flex flex-col-reverse gap-2 items-center",
|
|
904
|
+
"top-right": "fixed top-4 right-4 z-50 flex flex-col-reverse gap-2",
|
|
905
|
+
"bottom-center": "fixed bottom-4 left-1/2 -translate-x-1/2 z-50 flex flex-col gap-2 items-center",
|
|
906
|
+
"bottom-right": "fixed bottom-4 right-4 z-50 flex flex-col gap-2"
|
|
907
|
+
};
|
|
908
|
+
function ToastContainer({
|
|
909
|
+
toasts,
|
|
910
|
+
removeToast,
|
|
911
|
+
placement = "bottom-right"
|
|
912
|
+
}) {
|
|
889
913
|
if (toasts.length === 0) return null;
|
|
890
914
|
return createPortal(
|
|
891
|
-
/* @__PURE__ */ jsx10(
|
|
915
|
+
/* @__PURE__ */ jsx10(PlacementContext.Provider, { value: placement, children: /* @__PURE__ */ jsx10("div", { className: containerPositionStyles[placement], children: toasts.map((toast) => /* @__PURE__ */ jsx10(ToastItem, { toast, onRemove: removeToast }, toast.id)) }) }),
|
|
892
916
|
document.body
|
|
893
917
|
);
|
|
894
918
|
}
|
|
@@ -906,7 +930,7 @@ function createToastBridge() {
|
|
|
906
930
|
}
|
|
907
931
|
};
|
|
908
932
|
}
|
|
909
|
-
function ToastProvider({ children, bridge }) {
|
|
933
|
+
function ToastProvider({ children, bridge, placement = "bottom-right" }) {
|
|
910
934
|
const [toasts, setToasts] = useState([]);
|
|
911
935
|
const addToast = useCallback((toast) => {
|
|
912
936
|
const id = `toast-${++toastCounter}`;
|
|
@@ -921,7 +945,7 @@ function ToastProvider({ children, bridge }) {
|
|
|
921
945
|
}, [bridge, addToast]);
|
|
922
946
|
return /* @__PURE__ */ jsxs8(ToastContext.Provider, { value: { toasts, addToast, removeToast }, children: [
|
|
923
947
|
children,
|
|
924
|
-
/* @__PURE__ */ jsx10(ToastContainer, { toasts, removeToast })
|
|
948
|
+
/* @__PURE__ */ jsx10(ToastContainer, { toasts, removeToast, placement })
|
|
925
949
|
] });
|
|
926
950
|
}
|
|
927
951
|
function useToast() {
|
|
@@ -1592,6 +1616,78 @@ function ToggleButton({
|
|
|
1592
1616
|
);
|
|
1593
1617
|
}
|
|
1594
1618
|
|
|
1619
|
+
// src/components/ToggleButtonGroup/ToggleButtonGroup.tsx
|
|
1620
|
+
import { createContext as createContext3, useContext as useContext3 } from "react";
|
|
1621
|
+
import { twMerge as twMerge5 } from "tailwind-merge";
|
|
1622
|
+
import {
|
|
1623
|
+
RadioGroup as AriaRadioGroup2,
|
|
1624
|
+
Radio as AriaRadio2
|
|
1625
|
+
} from "react-aria-components";
|
|
1626
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1627
|
+
var ToggleButtonGroupContext = createContext3({
|
|
1628
|
+
size: "md"
|
|
1629
|
+
});
|
|
1630
|
+
var sizeStyles5 = {
|
|
1631
|
+
sm: "px-2.5 py-1 text-xs gap-1",
|
|
1632
|
+
md: "px-3 py-1.5 text-sm gap-1.5",
|
|
1633
|
+
lg: "px-4 py-2 text-base gap-2"
|
|
1634
|
+
};
|
|
1635
|
+
var iconOnlySizeStyles = {
|
|
1636
|
+
sm: "p-1",
|
|
1637
|
+
md: "p-1.5",
|
|
1638
|
+
lg: "p-2"
|
|
1639
|
+
};
|
|
1640
|
+
function ToggleButtonGroup({
|
|
1641
|
+
size = "md",
|
|
1642
|
+
className,
|
|
1643
|
+
children,
|
|
1644
|
+
...props
|
|
1645
|
+
}) {
|
|
1646
|
+
return /* @__PURE__ */ jsx25(ToggleButtonGroupContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx25(
|
|
1647
|
+
AriaRadioGroup2,
|
|
1648
|
+
{
|
|
1649
|
+
...props,
|
|
1650
|
+
orientation: "horizontal",
|
|
1651
|
+
className: twMerge5(
|
|
1652
|
+
"inline-flex items-center rounded-[var(--border-radius-lg)] border border-[var(--color-border-default)] bg-[var(--color-surface-muted)] p-0.5 gap-0.5",
|
|
1653
|
+
className
|
|
1654
|
+
),
|
|
1655
|
+
children
|
|
1656
|
+
}
|
|
1657
|
+
) });
|
|
1658
|
+
}
|
|
1659
|
+
function ToggleButtonGroupItem({
|
|
1660
|
+
children,
|
|
1661
|
+
isIconOnly,
|
|
1662
|
+
className,
|
|
1663
|
+
...props
|
|
1664
|
+
}) {
|
|
1665
|
+
const { size } = useContext3(ToggleButtonGroupContext);
|
|
1666
|
+
return /* @__PURE__ */ jsx25(
|
|
1667
|
+
AriaRadio2,
|
|
1668
|
+
{
|
|
1669
|
+
...props,
|
|
1670
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge5(
|
|
1671
|
+
// Base layout
|
|
1672
|
+
"inline-flex items-center justify-center",
|
|
1673
|
+
"rounded-[var(--border-radius-md)]",
|
|
1674
|
+
"font-[var(--font-weight-medium)]",
|
|
1675
|
+
"outline-none transition-colors cursor-pointer",
|
|
1676
|
+
// Focus ring
|
|
1677
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-1",
|
|
1678
|
+
// Disabled
|
|
1679
|
+
isDisabled && "opacity-50 pointer-events-none",
|
|
1680
|
+
// Size
|
|
1681
|
+
isIconOnly ? iconOnlySizeStyles[size] : sizeStyles5[size],
|
|
1682
|
+
// Selected state
|
|
1683
|
+
isSelected ? "bg-[var(--color-surface-default)] text-[var(--color-text-primary)] shadow-sm font-[var(--font-weight-semibold)]" : isPressed ? "bg-[var(--color-surface-subtle)] text-[var(--color-text-primary)]" : isHovered ? "bg-[var(--color-surface-subtle)] text-[var(--color-text-primary)]" : "bg-transparent text-[var(--color-text-secondary)]",
|
|
1684
|
+
className
|
|
1685
|
+
),
|
|
1686
|
+
children
|
|
1687
|
+
}
|
|
1688
|
+
);
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1595
1691
|
// src/components/Menu/Menu.tsx
|
|
1596
1692
|
import {
|
|
1597
1693
|
MenuTrigger,
|
|
@@ -1599,7 +1695,7 @@ import {
|
|
|
1599
1695
|
MenuItem as AriaMenuItem,
|
|
1600
1696
|
Popover as Popover2
|
|
1601
1697
|
} from "react-aria-components";
|
|
1602
|
-
import { jsx as
|
|
1698
|
+
import { jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1603
1699
|
var popoverStyles = [
|
|
1604
1700
|
"bg-[var(--color-surface-default)] rounded-[var(--border-radius-md)]",
|
|
1605
1701
|
"shadow-lg border border-[var(--color-border-default)]",
|
|
@@ -1607,14 +1703,25 @@ var popoverStyles = [
|
|
|
1607
1703
|
"entering:animate-in entering:fade-in entering:zoom-in-95",
|
|
1608
1704
|
"exiting:animate-out exiting:fade-out exiting:zoom-out-95"
|
|
1609
1705
|
].join(" ");
|
|
1610
|
-
function Menu({
|
|
1706
|
+
function Menu({
|
|
1707
|
+
items,
|
|
1708
|
+
content,
|
|
1709
|
+
children,
|
|
1710
|
+
onAction,
|
|
1711
|
+
selectionMode,
|
|
1712
|
+
selectedKeys,
|
|
1713
|
+
defaultSelectedKeys,
|
|
1714
|
+
onSelectionChange,
|
|
1715
|
+
className
|
|
1716
|
+
}) {
|
|
1717
|
+
const selectionProps = selectionMode && selectionMode !== "none" ? { selectionMode, selectedKeys, defaultSelectedKeys, onSelectionChange } : {};
|
|
1611
1718
|
return /* @__PURE__ */ jsxs18(MenuTrigger, { children: [
|
|
1612
1719
|
children,
|
|
1613
|
-
/* @__PURE__ */
|
|
1720
|
+
/* @__PURE__ */ jsx26(
|
|
1614
1721
|
Popover2,
|
|
1615
1722
|
{
|
|
1616
1723
|
className: [popoverStyles, className].filter(Boolean).join(" "),
|
|
1617
|
-
children: items ? /* @__PURE__ */
|
|
1724
|
+
children: items ? /* @__PURE__ */ jsx26(
|
|
1618
1725
|
AriaMenu,
|
|
1619
1726
|
{
|
|
1620
1727
|
items,
|
|
@@ -1623,6 +1730,7 @@ function Menu({ items, content, children, onAction, className }) {
|
|
|
1623
1730
|
item?.onAction?.();
|
|
1624
1731
|
onAction?.(key);
|
|
1625
1732
|
},
|
|
1733
|
+
...selectionProps,
|
|
1626
1734
|
className: "outline-none",
|
|
1627
1735
|
children: (item) => /* @__PURE__ */ jsxs18(
|
|
1628
1736
|
AriaMenuItem,
|
|
@@ -1640,17 +1748,18 @@ function Menu({ items, content, children, onAction, className }) {
|
|
|
1640
1748
|
item.isDanger ? "text-[var(--color-text-danger)]" : "text-[var(--color-text-primary)]"
|
|
1641
1749
|
].filter(Boolean).join(" "),
|
|
1642
1750
|
children: [
|
|
1643
|
-
item.icon && /* @__PURE__ */
|
|
1644
|
-
/* @__PURE__ */
|
|
1645
|
-
item.endContent && /* @__PURE__ */
|
|
1751
|
+
item.icon && /* @__PURE__ */ jsx26(Icon, { icon: item.icon, size: "sm" }),
|
|
1752
|
+
/* @__PURE__ */ jsx26("span", { className: "flex-1", children: item.label }),
|
|
1753
|
+
item.endContent && /* @__PURE__ */ jsx26("span", { className: "ml-auto flex items-center", children: item.endContent })
|
|
1646
1754
|
]
|
|
1647
1755
|
}
|
|
1648
1756
|
)
|
|
1649
1757
|
}
|
|
1650
|
-
) : /* @__PURE__ */
|
|
1758
|
+
) : /* @__PURE__ */ jsx26(
|
|
1651
1759
|
AriaMenu,
|
|
1652
1760
|
{
|
|
1653
1761
|
onAction: (key) => onAction?.(key),
|
|
1762
|
+
...selectionProps,
|
|
1654
1763
|
className: "outline-none",
|
|
1655
1764
|
children: content
|
|
1656
1765
|
}
|
|
@@ -1662,7 +1771,7 @@ function Menu({ items, content, children, onAction, className }) {
|
|
|
1662
1771
|
|
|
1663
1772
|
// src/components/Menu/MenuItem.tsx
|
|
1664
1773
|
import { MenuItem as AriaMenuItem2 } from "react-aria-components";
|
|
1665
|
-
import { jsx as
|
|
1774
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1666
1775
|
function MenuItem({
|
|
1667
1776
|
id,
|
|
1668
1777
|
children,
|
|
@@ -1695,28 +1804,63 @@ function MenuItem({
|
|
|
1695
1804
|
className
|
|
1696
1805
|
].filter(Boolean).join(" "),
|
|
1697
1806
|
children: [
|
|
1698
|
-
icon && /* @__PURE__ */
|
|
1699
|
-
/* @__PURE__ */
|
|
1700
|
-
endContent && /* @__PURE__ */
|
|
1807
|
+
icon && /* @__PURE__ */ jsx27(Icon, { icon, size: "sm" }),
|
|
1808
|
+
/* @__PURE__ */ jsx27("span", { className: "flex-1", children }),
|
|
1809
|
+
endContent && /* @__PURE__ */ jsx27("span", { className: "ml-auto flex items-center", children: endContent })
|
|
1701
1810
|
]
|
|
1702
1811
|
}
|
|
1703
1812
|
);
|
|
1704
1813
|
}
|
|
1705
1814
|
|
|
1815
|
+
// src/components/Menu/MenuCheckboxItem.tsx
|
|
1816
|
+
import { MenuItem as AriaMenuItem3 } from "react-aria-components";
|
|
1817
|
+
import { Check as Check2 } from "lucide-react";
|
|
1818
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1819
|
+
function MenuCheckboxItem({
|
|
1820
|
+
id,
|
|
1821
|
+
children,
|
|
1822
|
+
textValue,
|
|
1823
|
+
isDisabled,
|
|
1824
|
+
className
|
|
1825
|
+
}) {
|
|
1826
|
+
return /* @__PURE__ */ jsx28(
|
|
1827
|
+
AriaMenuItem3,
|
|
1828
|
+
{
|
|
1829
|
+
id,
|
|
1830
|
+
textValue,
|
|
1831
|
+
isDisabled,
|
|
1832
|
+
className: ({ isSelected }) => [
|
|
1833
|
+
"flex items-center gap-2 px-3 py-2 text-sm outline-none cursor-default",
|
|
1834
|
+
"transition-colors",
|
|
1835
|
+
"focus:bg-[var(--color-surface-muted)]",
|
|
1836
|
+
"hover:bg-[var(--color-surface-muted)]",
|
|
1837
|
+
"disabled:opacity-50 disabled:pointer-events-none",
|
|
1838
|
+
"text-[var(--color-text-primary)]",
|
|
1839
|
+
isSelected ? "font-[number:var(--font-weight-medium)]" : "",
|
|
1840
|
+
className
|
|
1841
|
+
].filter(Boolean).join(" "),
|
|
1842
|
+
children: ({ isSelected }) => /* @__PURE__ */ jsxs20(Fragment7, { children: [
|
|
1843
|
+
/* @__PURE__ */ jsx28("span", { className: "flex items-center justify-center w-4 h-4 shrink-0", children: isSelected && /* @__PURE__ */ jsx28(Check2, { size: 14, className: "text-[var(--color-action-primary)]", "aria-hidden": "true" }) }),
|
|
1844
|
+
/* @__PURE__ */ jsx28("span", { className: "flex-1", children })
|
|
1845
|
+
] })
|
|
1846
|
+
}
|
|
1847
|
+
);
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1706
1850
|
// src/components/Menu/MenuSection.tsx
|
|
1707
1851
|
import {
|
|
1708
1852
|
MenuSection as AriaMenuSection,
|
|
1709
1853
|
Header
|
|
1710
1854
|
} from "react-aria-components";
|
|
1711
|
-
import { jsx as
|
|
1855
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1712
1856
|
function MenuSection({
|
|
1713
1857
|
header,
|
|
1714
1858
|
children,
|
|
1715
1859
|
"aria-label": ariaLabel,
|
|
1716
1860
|
className
|
|
1717
1861
|
}) {
|
|
1718
|
-
return /* @__PURE__ */
|
|
1719
|
-
header && /* @__PURE__ */
|
|
1862
|
+
return /* @__PURE__ */ jsxs21(AriaMenuSection, { className, "aria-label": ariaLabel, children: [
|
|
1863
|
+
header && /* @__PURE__ */ jsx29(
|
|
1720
1864
|
Header,
|
|
1721
1865
|
{
|
|
1722
1866
|
className: [
|
|
@@ -1735,16 +1879,16 @@ function MenuSection({
|
|
|
1735
1879
|
|
|
1736
1880
|
// src/components/Menu/MenuHeader.tsx
|
|
1737
1881
|
import { Header as Header2 } from "react-aria-components";
|
|
1738
|
-
import { jsx as
|
|
1882
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1739
1883
|
function MenuHeader({ children, className }) {
|
|
1740
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ jsx30(Header2, { className, children });
|
|
1741
1885
|
}
|
|
1742
1886
|
|
|
1743
1887
|
// src/components/Menu/MenuSeparator.tsx
|
|
1744
1888
|
import { Separator } from "react-aria-components";
|
|
1745
|
-
import { jsx as
|
|
1889
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1746
1890
|
function MenuSeparator({ className }) {
|
|
1747
|
-
return /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsx31(
|
|
1748
1892
|
Separator,
|
|
1749
1893
|
{
|
|
1750
1894
|
className: [
|
|
@@ -1762,12 +1906,12 @@ import {
|
|
|
1762
1906
|
Dialog as AriaDialog2,
|
|
1763
1907
|
Button as AriaButton3
|
|
1764
1908
|
} from "react-aria-components";
|
|
1765
|
-
import { Fragment as
|
|
1909
|
+
import { Fragment as Fragment8, jsx as jsx32 } from "react/jsx-runtime";
|
|
1766
1910
|
function Popover3({ children, isOpen, onOpenChange }) {
|
|
1767
|
-
return /* @__PURE__ */
|
|
1911
|
+
return /* @__PURE__ */ jsx32(DialogTrigger, { isOpen, onOpenChange, children });
|
|
1768
1912
|
}
|
|
1769
1913
|
function PopoverTrigger({ children, className }) {
|
|
1770
|
-
return /* @__PURE__ */
|
|
1914
|
+
return /* @__PURE__ */ jsx32(
|
|
1771
1915
|
AriaButton3,
|
|
1772
1916
|
{
|
|
1773
1917
|
className: [
|
|
@@ -1785,7 +1929,7 @@ function PopoverContent({
|
|
|
1785
1929
|
className,
|
|
1786
1930
|
children
|
|
1787
1931
|
}) {
|
|
1788
|
-
return /* @__PURE__ */
|
|
1932
|
+
return /* @__PURE__ */ jsx32(
|
|
1789
1933
|
AriaPopover,
|
|
1790
1934
|
{
|
|
1791
1935
|
placement,
|
|
@@ -1802,26 +1946,26 @@ function PopoverContent({
|
|
|
1802
1946
|
"entering:placement-right:slide-in-from-left-1",
|
|
1803
1947
|
className
|
|
1804
1948
|
].filter(Boolean).join(" "),
|
|
1805
|
-
children: /* @__PURE__ */
|
|
1949
|
+
children: /* @__PURE__ */ jsx32(AriaDialog2, { className: "outline-none", children: ({ close }) => /* @__PURE__ */ jsx32(Fragment8, { children: typeof children === "function" ? children({ close }) : children }) })
|
|
1806
1950
|
}
|
|
1807
1951
|
);
|
|
1808
1952
|
}
|
|
1809
1953
|
|
|
1810
1954
|
// src/components/Tabs/Tabs.tsx
|
|
1811
|
-
import { createContext as
|
|
1812
|
-
import { twMerge as
|
|
1955
|
+
import { createContext as createContext4, useContext as useContext4 } from "react";
|
|
1956
|
+
import { twMerge as twMerge6 } from "tailwind-merge";
|
|
1813
1957
|
import {
|
|
1814
1958
|
Tabs as AriaTabs,
|
|
1815
1959
|
TabList as AriaTabList,
|
|
1816
1960
|
Tab as AriaTab,
|
|
1817
1961
|
TabPanel as AriaTabPanel
|
|
1818
1962
|
} from "react-aria-components";
|
|
1819
|
-
import { jsx as
|
|
1820
|
-
var TabsContext =
|
|
1963
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1964
|
+
var TabsContext = createContext4({
|
|
1821
1965
|
variant: "underline",
|
|
1822
1966
|
size: "md"
|
|
1823
1967
|
});
|
|
1824
|
-
var
|
|
1968
|
+
var sizeStyles6 = {
|
|
1825
1969
|
sm: "px-3 py-1.5 text-sm",
|
|
1826
1970
|
md: "px-4 py-2 text-base",
|
|
1827
1971
|
lg: "px-6 py-3 text-lg"
|
|
@@ -1834,12 +1978,12 @@ function Tabs({
|
|
|
1834
1978
|
children,
|
|
1835
1979
|
...props
|
|
1836
1980
|
}) {
|
|
1837
|
-
return /* @__PURE__ */
|
|
1981
|
+
return /* @__PURE__ */ jsx33(TabsContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx33(
|
|
1838
1982
|
AriaTabs,
|
|
1839
1983
|
{
|
|
1840
1984
|
...props,
|
|
1841
1985
|
orientation,
|
|
1842
|
-
className:
|
|
1986
|
+
className: twMerge6(
|
|
1843
1987
|
orientation === "vertical" ? "flex" : "",
|
|
1844
1988
|
className
|
|
1845
1989
|
),
|
|
@@ -1851,14 +1995,14 @@ function TabList({
|
|
|
1851
1995
|
className,
|
|
1852
1996
|
...props
|
|
1853
1997
|
}) {
|
|
1854
|
-
const { variant } =
|
|
1998
|
+
const { variant } = useContext4(TabsContext);
|
|
1855
1999
|
const baseStyles = variant === "unstyled" ? "flex items-center" : variant === "underline" ? "flex items-center border-b border-[var(--color-border-default)]" : "inline-flex items-center bg-[var(--color-surface-muted)] rounded-[var(--border-radius-lg)] p-1 gap-1";
|
|
1856
2000
|
const verticalStyles = variant === "unstyled" ? "flex-col" : variant === "underline" ? "flex-col border-b-0 border-r border-[var(--color-border-default)]" : "flex-col";
|
|
1857
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ jsx33(
|
|
1858
2002
|
AriaTabList,
|
|
1859
2003
|
{
|
|
1860
2004
|
...props,
|
|
1861
|
-
className: ({ orientation }) =>
|
|
2005
|
+
className: ({ orientation }) => twMerge6(
|
|
1862
2006
|
baseStyles,
|
|
1863
2007
|
orientation === "vertical" ? verticalStyles : "",
|
|
1864
2008
|
className
|
|
@@ -1867,21 +2011,21 @@ function TabList({
|
|
|
1867
2011
|
);
|
|
1868
2012
|
}
|
|
1869
2013
|
function Tab({ className, ...props }) {
|
|
1870
|
-
const { variant, size } =
|
|
1871
|
-
return /* @__PURE__ */
|
|
2014
|
+
const { variant, size } = useContext4(TabsContext);
|
|
2015
|
+
return /* @__PURE__ */ jsx33(
|
|
1872
2016
|
AriaTab,
|
|
1873
2017
|
{
|
|
1874
2018
|
...props,
|
|
1875
2019
|
className: ({ isSelected, isDisabled, isHovered, isPressed }) => {
|
|
1876
2020
|
if (variant === "unstyled") {
|
|
1877
|
-
return
|
|
2021
|
+
return twMerge6(
|
|
1878
2022
|
"cursor-pointer outline-none",
|
|
1879
2023
|
"focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-2",
|
|
1880
2024
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
1881
2025
|
className
|
|
1882
2026
|
);
|
|
1883
2027
|
}
|
|
1884
|
-
return
|
|
2028
|
+
return twMerge6(
|
|
1885
2029
|
// Base
|
|
1886
2030
|
"cursor-pointer outline-none transition-colors",
|
|
1887
2031
|
"font-[var(--font-weight-medium)]",
|
|
@@ -1890,7 +2034,7 @@ function Tab({ className, ...props }) {
|
|
|
1890
2034
|
// Disabled
|
|
1891
2035
|
isDisabled ? "opacity-50 pointer-events-none" : "",
|
|
1892
2036
|
// Size
|
|
1893
|
-
|
|
2037
|
+
sizeStyles6[size],
|
|
1894
2038
|
...getTabVariantStyles(variant, {
|
|
1895
2039
|
isSelected,
|
|
1896
2040
|
isHovered,
|
|
@@ -1924,12 +2068,12 @@ function getTabVariantStyles(variant, state) {
|
|
|
1924
2068
|
];
|
|
1925
2069
|
}
|
|
1926
2070
|
function TabPanel({ className, ...props }) {
|
|
1927
|
-
const { variant } =
|
|
1928
|
-
return /* @__PURE__ */
|
|
2071
|
+
const { variant } = useContext4(TabsContext);
|
|
2072
|
+
return /* @__PURE__ */ jsx33(
|
|
1929
2073
|
AriaTabPanel,
|
|
1930
2074
|
{
|
|
1931
2075
|
...props,
|
|
1932
|
-
className:
|
|
2076
|
+
className: twMerge6(
|
|
1933
2077
|
variant === "unstyled" ? "outline-none" : "mt-4 outline-none",
|
|
1934
2078
|
className
|
|
1935
2079
|
)
|
|
@@ -1949,8 +2093,8 @@ import {
|
|
|
1949
2093
|
import { useCallback as useCallback2, useImperativeHandle, useRef as useRef2, useState as useState2 } from "react";
|
|
1950
2094
|
import { Tree as ArboristTree } from "react-arborist";
|
|
1951
2095
|
import { ChevronRight as ChevronRight2, Folder, File } from "lucide-react";
|
|
1952
|
-
import { Check as
|
|
1953
|
-
import { jsx as
|
|
2096
|
+
import { Check as Check3 } from "lucide-react";
|
|
2097
|
+
import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1954
2098
|
var rowHeightMap = {
|
|
1955
2099
|
compact: 32,
|
|
1956
2100
|
comfortable: 40
|
|
@@ -1973,7 +2117,7 @@ function NodeRenderer({
|
|
|
1973
2117
|
const isSelected = node.isSelected && !isCheckbox;
|
|
1974
2118
|
const isCompact = size === "compact";
|
|
1975
2119
|
const IconComponent = data.icon ? data.icon : node.isInternal ? Folder : File;
|
|
1976
|
-
return /* @__PURE__ */
|
|
2120
|
+
return /* @__PURE__ */ jsxs22(
|
|
1977
2121
|
"div",
|
|
1978
2122
|
{
|
|
1979
2123
|
ref: dragHandle,
|
|
@@ -2008,7 +2152,7 @@ function NodeRenderer({
|
|
|
2008
2152
|
}
|
|
2009
2153
|
},
|
|
2010
2154
|
children: [
|
|
2011
|
-
/* @__PURE__ */
|
|
2155
|
+
/* @__PURE__ */ jsx34(
|
|
2012
2156
|
"button",
|
|
2013
2157
|
{
|
|
2014
2158
|
type: "button",
|
|
@@ -2026,7 +2170,7 @@ function NodeRenderer({
|
|
|
2026
2170
|
},
|
|
2027
2171
|
tabIndex: -1,
|
|
2028
2172
|
"aria-label": node.isOpen ? "Collapse" : "Expand",
|
|
2029
|
-
children: /* @__PURE__ */
|
|
2173
|
+
children: /* @__PURE__ */ jsx34(
|
|
2030
2174
|
ChevronRight2,
|
|
2031
2175
|
{
|
|
2032
2176
|
size: 14,
|
|
@@ -2038,7 +2182,7 @@ function NodeRenderer({
|
|
|
2038
2182
|
)
|
|
2039
2183
|
}
|
|
2040
2184
|
),
|
|
2041
|
-
isCheckbox && /* @__PURE__ */
|
|
2185
|
+
isCheckbox && /* @__PURE__ */ jsx34(
|
|
2042
2186
|
"div",
|
|
2043
2187
|
{
|
|
2044
2188
|
className: [
|
|
@@ -2049,8 +2193,8 @@ function NodeRenderer({
|
|
|
2049
2193
|
role: "checkbox",
|
|
2050
2194
|
"aria-checked": isChecked,
|
|
2051
2195
|
"aria-label": `Select ${data.name}`,
|
|
2052
|
-
children: isChecked && /* @__PURE__ */
|
|
2053
|
-
|
|
2196
|
+
children: isChecked && /* @__PURE__ */ jsx34(
|
|
2197
|
+
Check3,
|
|
2054
2198
|
{
|
|
2055
2199
|
className: "w-3 h-3 text-[var(--color-text-inverse)]",
|
|
2056
2200
|
strokeWidth: 3
|
|
@@ -2058,7 +2202,7 @@ function NodeRenderer({
|
|
|
2058
2202
|
)
|
|
2059
2203
|
}
|
|
2060
2204
|
),
|
|
2061
|
-
/* @__PURE__ */
|
|
2205
|
+
/* @__PURE__ */ jsx34(
|
|
2062
2206
|
IconComponent,
|
|
2063
2207
|
{
|
|
2064
2208
|
size: 16,
|
|
@@ -2066,7 +2210,7 @@ function NodeRenderer({
|
|
|
2066
2210
|
"aria-hidden": "true"
|
|
2067
2211
|
}
|
|
2068
2212
|
),
|
|
2069
|
-
/* @__PURE__ */
|
|
2213
|
+
/* @__PURE__ */ jsx34("span", { className: "truncate", children: data.name })
|
|
2070
2214
|
]
|
|
2071
2215
|
}
|
|
2072
2216
|
);
|
|
@@ -2132,13 +2276,13 @@ function Tree({
|
|
|
2132
2276
|
);
|
|
2133
2277
|
const arboristSearchMatch = searchMatch ? (node, term) => searchMatch(node.data, term) : void 0;
|
|
2134
2278
|
const selectionProp = selectionMode === "single" && selectedIds && selectedIds.size > 0 ? [...selectedIds][0] : void 0;
|
|
2135
|
-
return /* @__PURE__ */
|
|
2279
|
+
return /* @__PURE__ */ jsx34(
|
|
2136
2280
|
"div",
|
|
2137
2281
|
{
|
|
2138
2282
|
role: "tree",
|
|
2139
2283
|
"aria-label": ariaLabel,
|
|
2140
2284
|
className: ["outline-none overflow-hidden", className].filter(Boolean).join(" "),
|
|
2141
|
-
children: /* @__PURE__ */
|
|
2285
|
+
children: /* @__PURE__ */ jsx34(
|
|
2142
2286
|
ArboristTree,
|
|
2143
2287
|
{
|
|
2144
2288
|
ref: internalRef,
|
|
@@ -2157,7 +2301,7 @@ function Tree({
|
|
|
2157
2301
|
onSelect: handleSelect,
|
|
2158
2302
|
onActivate: handleActivate,
|
|
2159
2303
|
disableEdit: true,
|
|
2160
|
-
children: (props) => /* @__PURE__ */
|
|
2304
|
+
children: (props) => /* @__PURE__ */ jsx34(
|
|
2161
2305
|
NodeRenderer,
|
|
2162
2306
|
{
|
|
2163
2307
|
...props,
|
|
@@ -2176,17 +2320,17 @@ function Tree({
|
|
|
2176
2320
|
}
|
|
2177
2321
|
|
|
2178
2322
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
2179
|
-
import { createContext as
|
|
2180
|
-
import { twMerge as
|
|
2323
|
+
import { createContext as createContext5, useContext as useContext5 } from "react";
|
|
2324
|
+
import { twMerge as twMerge7 } from "tailwind-merge";
|
|
2181
2325
|
import {
|
|
2182
2326
|
ToggleButtonGroup as AriaToggleButtonGroup,
|
|
2183
2327
|
ToggleButton as AriaToggleButton2
|
|
2184
2328
|
} from "react-aria-components";
|
|
2185
|
-
import { jsx as
|
|
2186
|
-
var SegmentedControlContext =
|
|
2329
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2330
|
+
var SegmentedControlContext = createContext5({
|
|
2187
2331
|
size: "md"
|
|
2188
2332
|
});
|
|
2189
|
-
var
|
|
2333
|
+
var sizeStyles7 = {
|
|
2190
2334
|
sm: "px-2.5 py-1 text-xs",
|
|
2191
2335
|
md: "px-3 py-1.5 text-sm",
|
|
2192
2336
|
lg: "px-4 py-2 text-base"
|
|
@@ -2202,7 +2346,7 @@ function SegmentedControl({
|
|
|
2202
2346
|
...props
|
|
2203
2347
|
}) {
|
|
2204
2348
|
const isNoneMode = selectionMode === "none";
|
|
2205
|
-
return /* @__PURE__ */
|
|
2349
|
+
return /* @__PURE__ */ jsx35(SegmentedControlContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx35(
|
|
2206
2350
|
AriaToggleButtonGroup,
|
|
2207
2351
|
{
|
|
2208
2352
|
...props,
|
|
@@ -2210,7 +2354,7 @@ function SegmentedControl({
|
|
|
2210
2354
|
selectedKeys: isNoneMode ? /* @__PURE__ */ new Set() : selectedKeys,
|
|
2211
2355
|
defaultSelectedKeys: isNoneMode ? void 0 : defaultSelectedKeys,
|
|
2212
2356
|
onSelectionChange: isNoneMode ? void 0 : onSelectionChange,
|
|
2213
|
-
className:
|
|
2357
|
+
className: twMerge7(
|
|
2214
2358
|
"inline-flex items-center rounded-[var(--border-radius-lg)] border border-[var(--color-border-default)] bg-[var(--color-surface-muted)] p-0.5 gap-0.5",
|
|
2215
2359
|
className
|
|
2216
2360
|
),
|
|
@@ -2222,12 +2366,12 @@ function SegmentedControlItem({
|
|
|
2222
2366
|
className,
|
|
2223
2367
|
...props
|
|
2224
2368
|
}) {
|
|
2225
|
-
const { size } =
|
|
2226
|
-
return /* @__PURE__ */
|
|
2369
|
+
const { size } = useContext5(SegmentedControlContext);
|
|
2370
|
+
return /* @__PURE__ */ jsx35(
|
|
2227
2371
|
AriaToggleButton2,
|
|
2228
2372
|
{
|
|
2229
2373
|
...props,
|
|
2230
|
-
className: ({ isSelected, isHovered, isPressed, isDisabled }) =>
|
|
2374
|
+
className: ({ isSelected, isHovered, isPressed, isDisabled }) => twMerge7(
|
|
2231
2375
|
// Base layout
|
|
2232
2376
|
"inline-flex items-center justify-center",
|
|
2233
2377
|
"rounded-[var(--border-radius-md)]",
|
|
@@ -2238,7 +2382,7 @@ function SegmentedControlItem({
|
|
|
2238
2382
|
// Disabled
|
|
2239
2383
|
isDisabled && "opacity-50 pointer-events-none",
|
|
2240
2384
|
// Size
|
|
2241
|
-
|
|
2385
|
+
sizeStyles7[size],
|
|
2242
2386
|
// Selected state
|
|
2243
2387
|
isSelected ? "bg-[var(--color-surface-default)] text-[var(--color-text-primary)] shadow-sm font-[var(--font-weight-semibold)]" : isPressed ? "bg-[var(--color-surface-subtle)] text-[var(--color-text-primary)]" : isHovered ? "bg-[var(--color-surface-subtle)] text-[var(--color-text-primary)]" : "bg-transparent text-[var(--color-text-secondary)]",
|
|
2244
2388
|
className
|
|
@@ -2257,7 +2401,7 @@ import {
|
|
|
2257
2401
|
Info as Info2,
|
|
2258
2402
|
Microscope
|
|
2259
2403
|
} from "lucide-react";
|
|
2260
|
-
import { Fragment as
|
|
2404
|
+
import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2261
2405
|
function getFileIcon(type, extension) {
|
|
2262
2406
|
if (type === "directory") return Folder2;
|
|
2263
2407
|
const ext = (extension ?? "").toLowerCase();
|
|
@@ -2283,7 +2427,7 @@ function FileIcon({
|
|
|
2283
2427
|
size = 16
|
|
2284
2428
|
}) {
|
|
2285
2429
|
const IconComponent = getFileIcon(type, extension);
|
|
2286
|
-
return /* @__PURE__ */
|
|
2430
|
+
return /* @__PURE__ */ jsx36(
|
|
2287
2431
|
IconComponent,
|
|
2288
2432
|
{
|
|
2289
2433
|
size,
|
|
@@ -2328,14 +2472,14 @@ function FileCard({
|
|
|
2328
2472
|
},
|
|
2329
2473
|
[onPress]
|
|
2330
2474
|
);
|
|
2331
|
-
const cardContent = /* @__PURE__ */
|
|
2332
|
-
/* @__PURE__ */
|
|
2475
|
+
const cardContent = /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2476
|
+
/* @__PURE__ */ jsxs23(
|
|
2333
2477
|
"div",
|
|
2334
2478
|
{
|
|
2335
2479
|
className: `shrink-0 relative overflow-hidden bg-[var(--color-neutral-900)] ${thumbnailClass}`,
|
|
2336
2480
|
children: [
|
|
2337
|
-
children ? /* @__PURE__ */
|
|
2338
|
-
onInfo && /* @__PURE__ */
|
|
2481
|
+
children ? /* @__PURE__ */ jsx36("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx36("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx36(IconComponent, { size: iconSize, className: iconColor }) }),
|
|
2482
|
+
onInfo && /* @__PURE__ */ jsx36(
|
|
2339
2483
|
"div",
|
|
2340
2484
|
{
|
|
2341
2485
|
className: [
|
|
@@ -2343,7 +2487,7 @@ function FileCard({
|
|
|
2343
2487
|
"transition-opacity duration-150",
|
|
2344
2488
|
compact ? "bottom-1.5 right-1.5" : "bottom-2 right-2"
|
|
2345
2489
|
].join(" "),
|
|
2346
|
-
children: /* @__PURE__ */
|
|
2490
|
+
children: /* @__PURE__ */ jsx36(
|
|
2347
2491
|
"span",
|
|
2348
2492
|
{
|
|
2349
2493
|
onClick: handleInfoClick,
|
|
@@ -2353,7 +2497,7 @@ function FileCard({
|
|
|
2353
2497
|
}
|
|
2354
2498
|
},
|
|
2355
2499
|
role: "presentation",
|
|
2356
|
-
children: /* @__PURE__ */
|
|
2500
|
+
children: /* @__PURE__ */ jsx36(
|
|
2357
2501
|
IconButton,
|
|
2358
2502
|
{
|
|
2359
2503
|
icon: Info2,
|
|
@@ -2371,7 +2515,7 @@ function FileCard({
|
|
|
2371
2515
|
]
|
|
2372
2516
|
}
|
|
2373
2517
|
),
|
|
2374
|
-
/* @__PURE__ */
|
|
2518
|
+
/* @__PURE__ */ jsx36(
|
|
2375
2519
|
"div",
|
|
2376
2520
|
{
|
|
2377
2521
|
className: [
|
|
@@ -2379,12 +2523,12 @@ function FileCard({
|
|
|
2379
2523
|
"bg-[var(--color-surface-default)]",
|
|
2380
2524
|
compact ? "px-2 py-1.5 rounded-b-[var(--border-radius-md)]" : "gap-0.5 px-3 py-2 rounded-b-[var(--border-radius-lg)]"
|
|
2381
2525
|
].join(" "),
|
|
2382
|
-
children: compact ? /* @__PURE__ */
|
|
2383
|
-
/* @__PURE__ */
|
|
2384
|
-
/* @__PURE__ */
|
|
2385
|
-
/* @__PURE__ */
|
|
2526
|
+
children: compact ? /* @__PURE__ */ jsx36("span", { className: "text-xs font-medium text-[var(--color-text-primary)] truncate", children: name }) : /* @__PURE__ */ jsxs23(Fragment9, { children: [
|
|
2527
|
+
/* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1.5", children: [
|
|
2528
|
+
/* @__PURE__ */ jsx36(FileIcon, { type, extension, size: 16 }),
|
|
2529
|
+
/* @__PURE__ */ jsx36("span", { className: "text-sm font-medium text-[var(--color-text-primary)] truncate", children: name })
|
|
2386
2530
|
] }),
|
|
2387
|
-
size && /* @__PURE__ */
|
|
2531
|
+
size && /* @__PURE__ */ jsx36("span", { className: "text-xs text-[var(--color-text-secondary)] tabular-nums pl-[22px]", children: size })
|
|
2388
2532
|
] })
|
|
2389
2533
|
}
|
|
2390
2534
|
)
|
|
@@ -2400,7 +2544,7 @@ function FileCard({
|
|
|
2400
2544
|
className
|
|
2401
2545
|
].filter(Boolean).join(" ");
|
|
2402
2546
|
if (href) {
|
|
2403
|
-
return /* @__PURE__ */
|
|
2547
|
+
return /* @__PURE__ */ jsx36(
|
|
2404
2548
|
"a",
|
|
2405
2549
|
{
|
|
2406
2550
|
href,
|
|
@@ -2411,7 +2555,7 @@ function FileCard({
|
|
|
2411
2555
|
);
|
|
2412
2556
|
}
|
|
2413
2557
|
if (onPress) {
|
|
2414
|
-
return /* @__PURE__ */
|
|
2558
|
+
return /* @__PURE__ */ jsx36(
|
|
2415
2559
|
"div",
|
|
2416
2560
|
{
|
|
2417
2561
|
role: "button",
|
|
@@ -2424,17 +2568,17 @@ function FileCard({
|
|
|
2424
2568
|
}
|
|
2425
2569
|
);
|
|
2426
2570
|
}
|
|
2427
|
-
return /* @__PURE__ */
|
|
2571
|
+
return /* @__PURE__ */ jsx36("div", { className: baseStyles, children: cardContent });
|
|
2428
2572
|
}
|
|
2429
2573
|
|
|
2430
2574
|
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
2431
2575
|
import { useCallback as useCallback4 } from "react";
|
|
2432
2576
|
import { AlertCircle, Database, Info as Info3 } from "lucide-react";
|
|
2433
|
-
import { twMerge as
|
|
2577
|
+
import { twMerge as twMerge10 } from "tailwind-merge";
|
|
2434
2578
|
|
|
2435
2579
|
// src/components/Pill/Pill.tsx
|
|
2436
|
-
import { twMerge as
|
|
2437
|
-
import { jsx as
|
|
2580
|
+
import { twMerge as twMerge8 } from "tailwind-merge";
|
|
2581
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
2438
2582
|
var HASH_PALETTE = [
|
|
2439
2583
|
"teal",
|
|
2440
2584
|
// sky
|
|
@@ -2485,10 +2629,10 @@ function resolveColor(color, name) {
|
|
|
2485
2629
|
}
|
|
2486
2630
|
function Pill({ children, color, name, className }) {
|
|
2487
2631
|
const resolved = resolveColor(color, name);
|
|
2488
|
-
return /* @__PURE__ */
|
|
2632
|
+
return /* @__PURE__ */ jsx37(
|
|
2489
2633
|
"span",
|
|
2490
2634
|
{
|
|
2491
|
-
className:
|
|
2635
|
+
className: twMerge8(
|
|
2492
2636
|
"inline-flex items-center rounded-full",
|
|
2493
2637
|
"px-2 py-0.5",
|
|
2494
2638
|
"text-[length:var(--font-size-xs)] font-[number:var(--font-weight-medium)] leading-[var(--line-height-tight)]",
|
|
@@ -2501,8 +2645,8 @@ function Pill({ children, color, name, className }) {
|
|
|
2501
2645
|
}
|
|
2502
2646
|
|
|
2503
2647
|
// src/components/Pill/GroupPill.tsx
|
|
2504
|
-
import { twMerge as
|
|
2505
|
-
import { jsx as
|
|
2648
|
+
import { twMerge as twMerge9 } from "tailwind-merge";
|
|
2649
|
+
import { jsx as jsx38, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2506
2650
|
function GroupPill({
|
|
2507
2651
|
path,
|
|
2508
2652
|
visibleCount = 3,
|
|
@@ -2513,10 +2657,10 @@ function GroupPill({
|
|
|
2513
2657
|
const hiddenCount = Math.max(0, segments.length - visibleCount);
|
|
2514
2658
|
const hiddenSegments = segments.slice(0, hiddenCount);
|
|
2515
2659
|
const visibleSegments = segments.slice(hiddenCount);
|
|
2516
|
-
return /* @__PURE__ */
|
|
2660
|
+
return /* @__PURE__ */ jsxs24(
|
|
2517
2661
|
"span",
|
|
2518
2662
|
{
|
|
2519
|
-
className:
|
|
2663
|
+
className: twMerge9(
|
|
2520
2664
|
"inline-flex items-center gap-1",
|
|
2521
2665
|
className
|
|
2522
2666
|
),
|
|
@@ -2524,10 +2668,10 @@ function GroupPill({
|
|
|
2524
2668
|
children: [
|
|
2525
2669
|
hiddenSegments.map((segment, index) => {
|
|
2526
2670
|
const color = pillColorFromName(segment);
|
|
2527
|
-
return /* @__PURE__ */
|
|
2671
|
+
return /* @__PURE__ */ jsx38(
|
|
2528
2672
|
"span",
|
|
2529
2673
|
{
|
|
2530
|
-
className:
|
|
2674
|
+
className: twMerge9(
|
|
2531
2675
|
"inline-block size-2 shrink-0 rounded-full",
|
|
2532
2676
|
dotColorStyles[color]
|
|
2533
2677
|
),
|
|
@@ -2537,14 +2681,14 @@ function GroupPill({
|
|
|
2537
2681
|
`dot-${index}-${segment}`
|
|
2538
2682
|
);
|
|
2539
2683
|
}),
|
|
2540
|
-
visibleSegments.map((segment, index) => /* @__PURE__ */
|
|
2684
|
+
visibleSegments.map((segment, index) => /* @__PURE__ */ jsx38(Pill, { name: segment, children: segment }, `pill-${index}-${segment}`))
|
|
2541
2685
|
]
|
|
2542
2686
|
}
|
|
2543
2687
|
);
|
|
2544
2688
|
}
|
|
2545
2689
|
|
|
2546
2690
|
// src/components/StorageConnectionCard/StorageConnectionCard.tsx
|
|
2547
|
-
import { Fragment as
|
|
2691
|
+
import { Fragment as Fragment10, jsx as jsx39, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2548
2692
|
var statusDotStyles = {
|
|
2549
2693
|
connected: "bg-[var(--color-status-success)]",
|
|
2550
2694
|
error: "border-2 border-[var(--color-status-danger)] bg-transparent",
|
|
@@ -2560,7 +2704,7 @@ function ProviderBadge({ provider }) {
|
|
|
2560
2704
|
const config = providerConfig[provider.toLowerCase()];
|
|
2561
2705
|
const label = config?.label ?? provider;
|
|
2562
2706
|
const color = config?.color ?? "neutral";
|
|
2563
|
-
return /* @__PURE__ */
|
|
2707
|
+
return /* @__PURE__ */ jsx39(Pill, { color, children: label });
|
|
2564
2708
|
}
|
|
2565
2709
|
function PreviewArea({
|
|
2566
2710
|
status = "connected",
|
|
@@ -2568,11 +2712,11 @@ function PreviewArea({
|
|
|
2568
2712
|
children
|
|
2569
2713
|
}) {
|
|
2570
2714
|
if (status === "loading") {
|
|
2571
|
-
return /* @__PURE__ */
|
|
2715
|
+
return /* @__PURE__ */ jsx39("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx39(Spinner, { size: "lg", "aria-label": "Loading connection" }) });
|
|
2572
2716
|
}
|
|
2573
2717
|
if (status === "error") {
|
|
2574
|
-
return /* @__PURE__ */
|
|
2575
|
-
/* @__PURE__ */
|
|
2718
|
+
return /* @__PURE__ */ jsxs25("div", { className: "flex h-full flex-col items-center justify-center gap-2 bg-[var(--color-surface-danger)] px-4", children: [
|
|
2719
|
+
/* @__PURE__ */ jsx39(
|
|
2576
2720
|
Icon,
|
|
2577
2721
|
{
|
|
2578
2722
|
icon: AlertCircle,
|
|
@@ -2580,13 +2724,13 @@ function PreviewArea({
|
|
|
2580
2724
|
className: "text-[var(--color-text-danger)]"
|
|
2581
2725
|
}
|
|
2582
2726
|
),
|
|
2583
|
-
errorMessage && /* @__PURE__ */
|
|
2727
|
+
errorMessage && /* @__PURE__ */ jsx39("p", { className: "text-center text-xs text-[var(--color-text-danger)]", children: errorMessage })
|
|
2584
2728
|
] });
|
|
2585
2729
|
}
|
|
2586
2730
|
if (children) {
|
|
2587
|
-
return /* @__PURE__ */
|
|
2731
|
+
return /* @__PURE__ */ jsx39("div", { className: "h-full w-full overflow-hidden", children });
|
|
2588
2732
|
}
|
|
2589
|
-
return /* @__PURE__ */
|
|
2733
|
+
return /* @__PURE__ */ jsx39("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ jsx39(
|
|
2590
2734
|
Icon,
|
|
2591
2735
|
{
|
|
2592
2736
|
icon: Database,
|
|
@@ -2628,22 +2772,22 @@ function StorageConnectionCard({
|
|
|
2628
2772
|
},
|
|
2629
2773
|
[onPress]
|
|
2630
2774
|
);
|
|
2631
|
-
const cardContent = /* @__PURE__ */
|
|
2632
|
-
/* @__PURE__ */
|
|
2633
|
-
/* @__PURE__ */
|
|
2634
|
-
/* @__PURE__ */
|
|
2635
|
-
status && /* @__PURE__ */
|
|
2775
|
+
const cardContent = /* @__PURE__ */ jsxs25(Fragment10, { children: [
|
|
2776
|
+
/* @__PURE__ */ jsx39("div", { className: "aspect-[4/3] bg-[var(--color-neutral-900)] overflow-hidden rounded-t-[var(--border-radius-lg)]", children: /* @__PURE__ */ jsx39(PreviewArea, { status, errorMessage, children }) }),
|
|
2777
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1.5 border-t border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2.5 rounded-b-[var(--border-radius-lg)]", children: [
|
|
2778
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-start gap-2", children: [
|
|
2779
|
+
status && /* @__PURE__ */ jsx39(
|
|
2636
2780
|
"span",
|
|
2637
2781
|
{
|
|
2638
|
-
className:
|
|
2782
|
+
className: twMerge10(
|
|
2639
2783
|
"mt-1.5 h-2 w-2 shrink-0 rounded-full",
|
|
2640
2784
|
statusDotStyles[status]
|
|
2641
2785
|
),
|
|
2642
2786
|
"aria-label": `Status: ${status}`
|
|
2643
2787
|
}
|
|
2644
2788
|
),
|
|
2645
|
-
/* @__PURE__ */
|
|
2646
|
-
onInfo && /* @__PURE__ */
|
|
2789
|
+
/* @__PURE__ */ jsx39("span", { className: "min-w-0 flex-1 line-clamp-2 text-sm font-medium text-[var(--color-text-primary)]", children: name }),
|
|
2790
|
+
onInfo && /* @__PURE__ */ jsx39(
|
|
2647
2791
|
"span",
|
|
2648
2792
|
{
|
|
2649
2793
|
onClick: handleInfoPress,
|
|
@@ -2653,7 +2797,7 @@ function StorageConnectionCard({
|
|
|
2653
2797
|
}
|
|
2654
2798
|
},
|
|
2655
2799
|
role: "presentation",
|
|
2656
|
-
children: /* @__PURE__ */
|
|
2800
|
+
children: /* @__PURE__ */ jsx39(
|
|
2657
2801
|
IconButton,
|
|
2658
2802
|
{
|
|
2659
2803
|
icon: Info3,
|
|
@@ -2667,10 +2811,10 @@ function StorageConnectionCard({
|
|
|
2667
2811
|
}
|
|
2668
2812
|
)
|
|
2669
2813
|
] }),
|
|
2670
|
-
(provider || imageCount != null && (!status || status === "connected")) && /* @__PURE__ */
|
|
2671
|
-
provider && /* @__PURE__ */
|
|
2672
|
-
provider && region && /* @__PURE__ */
|
|
2673
|
-
imageCount != null && (!status || status === "connected") && /* @__PURE__ */
|
|
2814
|
+
(provider || imageCount != null && (!status || status === "connected")) && /* @__PURE__ */ jsxs25("div", { className: twMerge10("flex items-center gap-2", status && "pl-4"), children: [
|
|
2815
|
+
provider && /* @__PURE__ */ jsx39(ProviderBadge, { provider }),
|
|
2816
|
+
provider && region && /* @__PURE__ */ jsx39("span", { className: "shrink-0 text-xs text-[var(--color-text-secondary)]", children: region }),
|
|
2817
|
+
imageCount != null && (!status || status === "connected") && /* @__PURE__ */ jsxs25("span", { className: "ml-auto shrink-0 text-xs tabular-nums text-[var(--color-text-secondary)]", children: [
|
|
2674
2818
|
imageCount,
|
|
2675
2819
|
" ",
|
|
2676
2820
|
imageCount === 1 ? "image" : "images"
|
|
@@ -2678,7 +2822,7 @@ function StorageConnectionCard({
|
|
|
2678
2822
|
] })
|
|
2679
2823
|
] })
|
|
2680
2824
|
] });
|
|
2681
|
-
const baseStyles =
|
|
2825
|
+
const baseStyles = twMerge10(
|
|
2682
2826
|
"flex flex-col overflow-hidden rounded-[var(--border-radius-lg)]",
|
|
2683
2827
|
"border border-[var(--color-border-default)]",
|
|
2684
2828
|
"shadow-sm transition-all",
|
|
@@ -2687,10 +2831,10 @@ function StorageConnectionCard({
|
|
|
2687
2831
|
className
|
|
2688
2832
|
);
|
|
2689
2833
|
if (href) {
|
|
2690
|
-
return /* @__PURE__ */
|
|
2834
|
+
return /* @__PURE__ */ jsx39("a", { href, className: twMerge10(baseStyles, "no-underline"), children: cardContent });
|
|
2691
2835
|
}
|
|
2692
2836
|
if (onPress) {
|
|
2693
|
-
return /* @__PURE__ */
|
|
2837
|
+
return /* @__PURE__ */ jsx39(
|
|
2694
2838
|
"div",
|
|
2695
2839
|
{
|
|
2696
2840
|
role: "button",
|
|
@@ -2702,12 +2846,12 @@ function StorageConnectionCard({
|
|
|
2702
2846
|
}
|
|
2703
2847
|
);
|
|
2704
2848
|
}
|
|
2705
|
-
return /* @__PURE__ */
|
|
2849
|
+
return /* @__PURE__ */ jsx39("div", { className: baseStyles, children: cardContent });
|
|
2706
2850
|
}
|
|
2707
2851
|
|
|
2708
2852
|
// src/components/Badge/Badge.tsx
|
|
2709
|
-
import { twMerge as
|
|
2710
|
-
import { jsx as
|
|
2853
|
+
import { twMerge as twMerge11 } from "tailwind-merge";
|
|
2854
|
+
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2711
2855
|
var variantStyles4 = {
|
|
2712
2856
|
neutral: "bg-[var(--color-badge-neutral-bg)] text-[var(--color-badge-neutral-text)]",
|
|
2713
2857
|
purple: "bg-[var(--color-badge-purple-bg)] text-[var(--color-badge-purple-text)]",
|
|
@@ -2717,7 +2861,7 @@ var variantStyles4 = {
|
|
|
2717
2861
|
green: "bg-[var(--color-badge-green-bg)] text-[var(--color-badge-green-text)]",
|
|
2718
2862
|
amber: "bg-[var(--color-badge-amber-bg)] text-[var(--color-badge-amber-text)]"
|
|
2719
2863
|
};
|
|
2720
|
-
var
|
|
2864
|
+
var sizeStyles8 = {
|
|
2721
2865
|
sm: "px-1.5 py-0.5",
|
|
2722
2866
|
md: "px-2 py-0.5"
|
|
2723
2867
|
};
|
|
@@ -2732,18 +2876,18 @@ function Badge({
|
|
|
2732
2876
|
icon: IconComponent,
|
|
2733
2877
|
className
|
|
2734
2878
|
}) {
|
|
2735
|
-
return /* @__PURE__ */
|
|
2879
|
+
return /* @__PURE__ */ jsxs26(
|
|
2736
2880
|
"span",
|
|
2737
2881
|
{
|
|
2738
|
-
className:
|
|
2882
|
+
className: twMerge11(
|
|
2739
2883
|
"inline-flex items-center gap-1 rounded-[var(--border-radius-full)]",
|
|
2740
2884
|
"text-[length:var(--font-size-xs)] font-[number:var(--font-weight-medium)] leading-[var(--line-height-tight)]",
|
|
2741
2885
|
variantStyles4[variant],
|
|
2742
|
-
|
|
2886
|
+
sizeStyles8[size],
|
|
2743
2887
|
className
|
|
2744
2888
|
),
|
|
2745
2889
|
children: [
|
|
2746
|
-
IconComponent && /* @__PURE__ */
|
|
2890
|
+
IconComponent && /* @__PURE__ */ jsx40(IconComponent, { size: iconSizeMap4[size], "aria-hidden": "true" }),
|
|
2747
2891
|
children
|
|
2748
2892
|
]
|
|
2749
2893
|
}
|
|
@@ -2752,8 +2896,8 @@ function Badge({
|
|
|
2752
2896
|
|
|
2753
2897
|
// src/components/Card/Card.tsx
|
|
2754
2898
|
import { useCallback as useCallback5 } from "react";
|
|
2755
|
-
import { twMerge as
|
|
2756
|
-
import { Fragment as
|
|
2899
|
+
import { twMerge as twMerge12 } from "tailwind-merge";
|
|
2900
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2757
2901
|
var paddingStyles = {
|
|
2758
2902
|
none: "p-0",
|
|
2759
2903
|
sm: "p-3",
|
|
@@ -2771,7 +2915,7 @@ function Card({
|
|
|
2771
2915
|
className
|
|
2772
2916
|
}) {
|
|
2773
2917
|
const isInteractive = interactive || !!href || !!onPress;
|
|
2774
|
-
const containerClass =
|
|
2918
|
+
const containerClass = twMerge12(
|
|
2775
2919
|
"bg-[var(--color-surface-default)] border border-[var(--color-border-default)] rounded-[var(--border-radius-lg)] overflow-hidden shadow-sm",
|
|
2776
2920
|
isInteractive && "transition-all hover:shadow-md hover:border-[var(--color-border-focus)] cursor-pointer",
|
|
2777
2921
|
(href || onPress) && "block focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-2 outline-none",
|
|
@@ -2786,22 +2930,22 @@ function Card({
|
|
|
2786
2930
|
},
|
|
2787
2931
|
[onPress]
|
|
2788
2932
|
);
|
|
2789
|
-
const content = /* @__PURE__ */
|
|
2790
|
-
header && /* @__PURE__ */
|
|
2933
|
+
const content = /* @__PURE__ */ jsxs27(Fragment11, { children: [
|
|
2934
|
+
header && /* @__PURE__ */ jsx41(
|
|
2791
2935
|
"div",
|
|
2792
2936
|
{
|
|
2793
|
-
className:
|
|
2937
|
+
className: twMerge12(
|
|
2794
2938
|
"border-b border-[var(--color-border-default)]",
|
|
2795
2939
|
paddingStyles[padding]
|
|
2796
2940
|
),
|
|
2797
2941
|
children: header
|
|
2798
2942
|
}
|
|
2799
2943
|
),
|
|
2800
|
-
/* @__PURE__ */
|
|
2801
|
-
footer && /* @__PURE__ */
|
|
2944
|
+
/* @__PURE__ */ jsx41("div", { className: paddingStyles[padding], children }),
|
|
2945
|
+
footer && /* @__PURE__ */ jsx41(
|
|
2802
2946
|
"div",
|
|
2803
2947
|
{
|
|
2804
|
-
className:
|
|
2948
|
+
className: twMerge12(
|
|
2805
2949
|
"border-t border-[var(--color-border-default)]",
|
|
2806
2950
|
paddingStyles[padding]
|
|
2807
2951
|
),
|
|
@@ -2810,10 +2954,10 @@ function Card({
|
|
|
2810
2954
|
)
|
|
2811
2955
|
] });
|
|
2812
2956
|
if (href) {
|
|
2813
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx41("a", { href, className: containerClass, children: content });
|
|
2814
2958
|
}
|
|
2815
2959
|
if (onPress) {
|
|
2816
|
-
return /* @__PURE__ */
|
|
2960
|
+
return /* @__PURE__ */ jsx41(
|
|
2817
2961
|
"div",
|
|
2818
2962
|
{
|
|
2819
2963
|
role: "button",
|
|
@@ -2825,13 +2969,13 @@ function Card({
|
|
|
2825
2969
|
}
|
|
2826
2970
|
);
|
|
2827
2971
|
}
|
|
2828
|
-
return /* @__PURE__ */
|
|
2972
|
+
return /* @__PURE__ */ jsx41("div", { className: containerClass, children: content });
|
|
2829
2973
|
}
|
|
2830
2974
|
|
|
2831
2975
|
// src/components/DeltaIndicator/DeltaIndicator.tsx
|
|
2832
2976
|
import { ArrowUp, ArrowDown, Minus } from "lucide-react";
|
|
2833
|
-
import { twMerge as
|
|
2834
|
-
import { jsx as
|
|
2977
|
+
import { twMerge as twMerge13 } from "tailwind-merge";
|
|
2978
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2835
2979
|
function getDirection(current, previous) {
|
|
2836
2980
|
const diff = current - previous;
|
|
2837
2981
|
if (diff > 0) return "increase";
|
|
@@ -2884,16 +3028,16 @@ function DeltaIndicator({
|
|
|
2884
3028
|
className
|
|
2885
3029
|
}) {
|
|
2886
3030
|
if (unavailable) {
|
|
2887
|
-
return /* @__PURE__ */
|
|
3031
|
+
return /* @__PURE__ */ jsxs28(
|
|
2888
3032
|
"span",
|
|
2889
3033
|
{
|
|
2890
|
-
className:
|
|
3034
|
+
className: twMerge13(
|
|
2891
3035
|
"inline-flex items-center gap-1 font-[number:var(--font-weight-medium)]",
|
|
2892
3036
|
"text-[var(--color-text-tertiary)]",
|
|
2893
3037
|
className
|
|
2894
3038
|
),
|
|
2895
3039
|
children: [
|
|
2896
|
-
label && /* @__PURE__ */
|
|
3040
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-[length:var(--font-size-sm)] text-[var(--color-text-secondary)] mr-1", children: label }),
|
|
2897
3041
|
unavailableText
|
|
2898
3042
|
]
|
|
2899
3043
|
}
|
|
@@ -2923,10 +3067,10 @@ function DeltaIndicator({
|
|
|
2923
3067
|
}
|
|
2924
3068
|
}
|
|
2925
3069
|
const isPill = mode === "pill";
|
|
2926
|
-
return /* @__PURE__ */
|
|
3070
|
+
return /* @__PURE__ */ jsxs28(
|
|
2927
3071
|
"span",
|
|
2928
3072
|
{
|
|
2929
|
-
className:
|
|
3073
|
+
className: twMerge13(
|
|
2930
3074
|
"inline-flex items-center gap-1 font-[number:var(--font-weight-medium)]",
|
|
2931
3075
|
colorStyles2,
|
|
2932
3076
|
isPill && [
|
|
@@ -2937,8 +3081,8 @@ function DeltaIndicator({
|
|
|
2937
3081
|
className
|
|
2938
3082
|
),
|
|
2939
3083
|
children: [
|
|
2940
|
-
label && /* @__PURE__ */
|
|
2941
|
-
/* @__PURE__ */
|
|
3084
|
+
label && /* @__PURE__ */ jsx42("span", { className: "text-[length:var(--font-size-sm)] text-[var(--color-text-secondary)] mr-1", children: label }),
|
|
3085
|
+
/* @__PURE__ */ jsx42(IconComponent, { size: 14, "aria-hidden": true }),
|
|
2942
3086
|
valueText
|
|
2943
3087
|
]
|
|
2944
3088
|
}
|
|
@@ -2946,8 +3090,8 @@ function DeltaIndicator({
|
|
|
2946
3090
|
}
|
|
2947
3091
|
|
|
2948
3092
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
2949
|
-
import { twMerge as
|
|
2950
|
-
import { jsx as
|
|
3093
|
+
import { twMerge as twMerge14 } from "tailwind-merge";
|
|
3094
|
+
import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2951
3095
|
var fillStyles = {
|
|
2952
3096
|
brand: "bg-[var(--color-progress-fill)]",
|
|
2953
3097
|
success: "bg-[var(--color-progress-fill-success)]",
|
|
@@ -2955,7 +3099,7 @@ var fillStyles = {
|
|
|
2955
3099
|
danger: "bg-[var(--color-progress-fill-danger)]",
|
|
2956
3100
|
neutral: "bg-[var(--color-text-secondary)]"
|
|
2957
3101
|
};
|
|
2958
|
-
var
|
|
3102
|
+
var sizeStyles9 = {
|
|
2959
3103
|
sm: "h-1.5",
|
|
2960
3104
|
md: "h-3",
|
|
2961
3105
|
lg: "h-4"
|
|
@@ -2970,12 +3114,12 @@ function ProgressBar({
|
|
|
2970
3114
|
className
|
|
2971
3115
|
}) {
|
|
2972
3116
|
const clampedValue = Math.min(100, Math.max(0, value));
|
|
2973
|
-
return /* @__PURE__ */
|
|
2974
|
-
(label || description || showValue) && /* @__PURE__ */
|
|
2975
|
-
/* @__PURE__ */
|
|
2976
|
-
/* @__PURE__ */
|
|
3117
|
+
return /* @__PURE__ */ jsxs29("div", { className: twMerge14("w-full", className), children: [
|
|
3118
|
+
(label || description || showValue) && /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between mb-2", children: [
|
|
3119
|
+
/* @__PURE__ */ jsx43("span", { className: "text-[length:var(--font-size-sm)] font-[number:var(--font-weight-medium)] text-[var(--color-text-primary)]", children: label }),
|
|
3120
|
+
/* @__PURE__ */ jsx43("span", { className: "text-[length:var(--font-size-sm)] text-[var(--color-text-secondary)]", children: description ?? (showValue ? `${clampedValue}%` : null) })
|
|
2977
3121
|
] }),
|
|
2978
|
-
/* @__PURE__ */
|
|
3122
|
+
/* @__PURE__ */ jsx43(
|
|
2979
3123
|
"div",
|
|
2980
3124
|
{
|
|
2981
3125
|
role: "progressbar",
|
|
@@ -2983,14 +3127,14 @@ function ProgressBar({
|
|
|
2983
3127
|
"aria-valuemin": 0,
|
|
2984
3128
|
"aria-valuemax": 100,
|
|
2985
3129
|
"aria-label": label ?? "Progress",
|
|
2986
|
-
className:
|
|
3130
|
+
className: twMerge14(
|
|
2987
3131
|
"w-full rounded-[var(--border-radius-full)] bg-[var(--color-progress-track)]",
|
|
2988
|
-
|
|
3132
|
+
sizeStyles9[size]
|
|
2989
3133
|
),
|
|
2990
|
-
children: /* @__PURE__ */
|
|
3134
|
+
children: /* @__PURE__ */ jsx43(
|
|
2991
3135
|
"div",
|
|
2992
3136
|
{
|
|
2993
|
-
className:
|
|
3137
|
+
className: twMerge14(
|
|
2994
3138
|
"h-full rounded-[var(--border-radius-full)] transition-all duration-300",
|
|
2995
3139
|
fillStyles[variant]
|
|
2996
3140
|
),
|
|
@@ -3011,8 +3155,8 @@ import {
|
|
|
3011
3155
|
CheckCircle2,
|
|
3012
3156
|
X as X3
|
|
3013
3157
|
} from "lucide-react";
|
|
3014
|
-
import { twMerge as
|
|
3015
|
-
import { jsx as
|
|
3158
|
+
import { twMerge as twMerge15 } from "tailwind-merge";
|
|
3159
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3016
3160
|
var variantConfig2 = {
|
|
3017
3161
|
info: {
|
|
3018
3162
|
icon: Info4,
|
|
@@ -3056,40 +3200,40 @@ function Banner({
|
|
|
3056
3200
|
setDismissed(true);
|
|
3057
3201
|
onDismiss?.();
|
|
3058
3202
|
};
|
|
3059
|
-
return /* @__PURE__ */
|
|
3203
|
+
return /* @__PURE__ */ jsxs30(
|
|
3060
3204
|
"div",
|
|
3061
3205
|
{
|
|
3062
3206
|
role: config.role,
|
|
3063
|
-
className:
|
|
3207
|
+
className: twMerge15(
|
|
3064
3208
|
"flex items-start gap-[var(--spacing-3)] rounded-[var(--border-radius-lg)] border px-[var(--spacing-4)] py-[var(--spacing-3)]",
|
|
3065
3209
|
"text-[length:var(--font-size-sm)]",
|
|
3066
3210
|
config.containerClass,
|
|
3067
3211
|
className
|
|
3068
3212
|
),
|
|
3069
3213
|
children: [
|
|
3070
|
-
/* @__PURE__ */
|
|
3214
|
+
/* @__PURE__ */ jsx44(
|
|
3071
3215
|
IconComponent,
|
|
3072
3216
|
{
|
|
3073
3217
|
size: 20,
|
|
3074
|
-
className:
|
|
3218
|
+
className: twMerge15("shrink-0 mt-0.5", config.iconClass),
|
|
3075
3219
|
"aria-hidden": "true"
|
|
3076
3220
|
}
|
|
3077
3221
|
),
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
title && /* @__PURE__ */
|
|
3222
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex-1", children: [
|
|
3223
|
+
title && /* @__PURE__ */ jsxs30("span", { className: "font-[number:var(--font-weight-medium)]", children: [
|
|
3080
3224
|
title,
|
|
3081
3225
|
" \u2014 "
|
|
3082
3226
|
] }),
|
|
3083
3227
|
children
|
|
3084
3228
|
] }),
|
|
3085
|
-
dismissible && /* @__PURE__ */
|
|
3229
|
+
dismissible && /* @__PURE__ */ jsx44(
|
|
3086
3230
|
"button",
|
|
3087
3231
|
{
|
|
3088
3232
|
type: "button",
|
|
3089
3233
|
onClick: handleDismiss,
|
|
3090
3234
|
className: "shrink-0 rounded-[var(--border-radius-sm)] p-0.5 opacity-70 hover:opacity-100 transition-opacity outline-none focus-visible:ring-2 focus-visible:ring-current",
|
|
3091
3235
|
"aria-label": "Dismiss",
|
|
3092
|
-
children: /* @__PURE__ */
|
|
3236
|
+
children: /* @__PURE__ */ jsx44(X3, { size: 16, "aria-hidden": "true" })
|
|
3093
3237
|
}
|
|
3094
3238
|
)
|
|
3095
3239
|
]
|
|
@@ -3098,8 +3242,8 @@ function Banner({
|
|
|
3098
3242
|
}
|
|
3099
3243
|
|
|
3100
3244
|
// src/components/MetricCard/MetricCard.tsx
|
|
3101
|
-
import { twMerge as
|
|
3102
|
-
import { Fragment as
|
|
3245
|
+
import { twMerge as twMerge16 } from "tailwind-merge";
|
|
3246
|
+
import { Fragment as Fragment12, jsx as jsx45, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3103
3247
|
var sizeConfig = {
|
|
3104
3248
|
sm: {
|
|
3105
3249
|
padding: "p-3",
|
|
@@ -3121,59 +3265,59 @@ function MetricCard({
|
|
|
3121
3265
|
className
|
|
3122
3266
|
}) {
|
|
3123
3267
|
const config = sizeConfig[size];
|
|
3124
|
-
const containerClass =
|
|
3268
|
+
const containerClass = twMerge16(
|
|
3125
3269
|
"bg-[var(--color-surface-default)] border border-[var(--color-border-default)] rounded-[var(--border-radius-lg)] shadow-sm",
|
|
3126
3270
|
config.padding,
|
|
3127
3271
|
href && "block transition-shadow hover:shadow-md hover:border-[var(--color-border-focus)] focus-visible:ring-2 focus-visible:ring-[var(--color-border-focus)] focus-visible:ring-offset-2 outline-none",
|
|
3128
3272
|
className
|
|
3129
3273
|
);
|
|
3130
|
-
const content = /* @__PURE__ */
|
|
3131
|
-
/* @__PURE__ */
|
|
3132
|
-
/* @__PURE__ */
|
|
3274
|
+
const content = /* @__PURE__ */ jsxs31(Fragment12, { children: [
|
|
3275
|
+
/* @__PURE__ */ jsx45("div", { className: twMerge16(config.labelClass, "text-[var(--color-text-secondary)]"), children: label }),
|
|
3276
|
+
/* @__PURE__ */ jsx45(
|
|
3133
3277
|
"div",
|
|
3134
3278
|
{
|
|
3135
|
-
className:
|
|
3279
|
+
className: twMerge16(
|
|
3136
3280
|
config.valueClass,
|
|
3137
3281
|
"font-[number:var(--font-weight-semibold)] text-[var(--color-text-primary)] mt-1 tabular-nums"
|
|
3138
3282
|
),
|
|
3139
3283
|
children: value
|
|
3140
3284
|
}
|
|
3141
3285
|
),
|
|
3142
|
-
secondary && /* @__PURE__ */
|
|
3286
|
+
secondary && /* @__PURE__ */ jsx45("div", { className: "mt-1 text-sm", children: secondary })
|
|
3143
3287
|
] });
|
|
3144
3288
|
if (href) {
|
|
3145
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ jsx45("a", { href, className: containerClass, children: content });
|
|
3146
3290
|
}
|
|
3147
|
-
return /* @__PURE__ */
|
|
3291
|
+
return /* @__PURE__ */ jsx45("div", { className: containerClass, children: content });
|
|
3148
3292
|
}
|
|
3149
3293
|
|
|
3150
3294
|
// src/components/SectionHeader/SectionHeader.tsx
|
|
3151
|
-
import { twMerge as
|
|
3152
|
-
import { jsx as
|
|
3295
|
+
import { twMerge as twMerge17 } from "tailwind-merge";
|
|
3296
|
+
import { jsx as jsx46, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3153
3297
|
function SectionHeader({
|
|
3154
3298
|
title,
|
|
3155
3299
|
children,
|
|
3156
3300
|
className
|
|
3157
3301
|
}) {
|
|
3158
|
-
return /* @__PURE__ */
|
|
3302
|
+
return /* @__PURE__ */ jsxs32(
|
|
3159
3303
|
"div",
|
|
3160
3304
|
{
|
|
3161
|
-
className:
|
|
3305
|
+
className: twMerge17(
|
|
3162
3306
|
"flex flex-wrap items-center gap-[var(--spacing-3)] py-[var(--spacing-4)]",
|
|
3163
3307
|
className
|
|
3164
3308
|
),
|
|
3165
3309
|
children: [
|
|
3166
|
-
/* @__PURE__ */
|
|
3167
|
-
children && /* @__PURE__ */
|
|
3310
|
+
/* @__PURE__ */ jsx46(H2, { children: title }),
|
|
3311
|
+
children && /* @__PURE__ */ jsx46("div", { className: "ml-auto flex flex-wrap items-center gap-[var(--spacing-2)]", children })
|
|
3168
3312
|
]
|
|
3169
3313
|
}
|
|
3170
3314
|
);
|
|
3171
3315
|
}
|
|
3172
3316
|
|
|
3173
3317
|
// src/components/FormWizard/FormWizard.tsx
|
|
3174
|
-
import { createContext as
|
|
3175
|
-
import { jsx as
|
|
3176
|
-
var FormWizardContext =
|
|
3318
|
+
import { createContext as createContext6, useContext as useContext6, useCallback as useCallback6, useMemo } from "react";
|
|
3319
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
3320
|
+
var FormWizardContext = createContext6({
|
|
3177
3321
|
currentStep: 0,
|
|
3178
3322
|
totalSteps: 1,
|
|
3179
3323
|
canGoBack: false,
|
|
@@ -3182,7 +3326,7 @@ var FormWizardContext = createContext5({
|
|
|
3182
3326
|
isLastStep: true
|
|
3183
3327
|
});
|
|
3184
3328
|
function useFormWizard() {
|
|
3185
|
-
return
|
|
3329
|
+
return useContext6(FormWizardContext);
|
|
3186
3330
|
}
|
|
3187
3331
|
function FormWizard({
|
|
3188
3332
|
currentStep,
|
|
@@ -3207,13 +3351,13 @@ function FormWizard({
|
|
|
3207
3351
|
}),
|
|
3208
3352
|
[currentStep, totalSteps, canGoBack, goBack, isLastStep]
|
|
3209
3353
|
);
|
|
3210
|
-
return /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx47(FormWizardContext.Provider, { value, children });
|
|
3211
3355
|
}
|
|
3212
3356
|
|
|
3213
3357
|
// src/components/FormWizard/FormWizardProgress.tsx
|
|
3214
|
-
import { jsx as
|
|
3358
|
+
import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3215
3359
|
function CheckIcon2() {
|
|
3216
|
-
return /* @__PURE__ */
|
|
3360
|
+
return /* @__PURE__ */ jsx48(
|
|
3217
3361
|
"svg",
|
|
3218
3362
|
{
|
|
3219
3363
|
"aria-hidden": "true",
|
|
@@ -3224,24 +3368,24 @@ function CheckIcon2() {
|
|
|
3224
3368
|
strokeWidth: "2",
|
|
3225
3369
|
strokeLinecap: "round",
|
|
3226
3370
|
strokeLinejoin: "round",
|
|
3227
|
-
children: /* @__PURE__ */
|
|
3371
|
+
children: /* @__PURE__ */ jsx48("path", { d: "M3 8.5l3.5 3.5 6.5-7" })
|
|
3228
3372
|
}
|
|
3229
3373
|
);
|
|
3230
3374
|
}
|
|
3231
3375
|
function FormWizardProgress({ labels }) {
|
|
3232
3376
|
const { currentStep, totalSteps } = useFormWizard();
|
|
3233
|
-
return /* @__PURE__ */
|
|
3377
|
+
return /* @__PURE__ */ jsx48("nav", { "aria-label": "Form progress", children: /* @__PURE__ */ jsx48("ol", { className: "flex items-start", role: "list", children: labels.map((label, index) => {
|
|
3234
3378
|
const isCompleted = index < currentStep;
|
|
3235
3379
|
const isCurrent = index === currentStep;
|
|
3236
3380
|
const isFuture = index > currentStep;
|
|
3237
|
-
return /* @__PURE__ */
|
|
3381
|
+
return /* @__PURE__ */ jsxs33(
|
|
3238
3382
|
"li",
|
|
3239
3383
|
{
|
|
3240
3384
|
className: "flex flex-1 flex-col items-center",
|
|
3241
3385
|
"aria-current": isCurrent ? "step" : void 0,
|
|
3242
3386
|
children: [
|
|
3243
|
-
/* @__PURE__ */
|
|
3244
|
-
index > 0 ? /* @__PURE__ */
|
|
3387
|
+
/* @__PURE__ */ jsxs33("div", { className: "flex w-full items-center", children: [
|
|
3388
|
+
index > 0 ? /* @__PURE__ */ jsx48(
|
|
3245
3389
|
"div",
|
|
3246
3390
|
{
|
|
3247
3391
|
"aria-hidden": "true",
|
|
@@ -3250,8 +3394,8 @@ function FormWizardProgress({ labels }) {
|
|
|
3250
3394
|
index <= currentStep ? "bg-[var(--color-brand-primary)]" : "bg-[var(--color-border-default)]"
|
|
3251
3395
|
].join(" ")
|
|
3252
3396
|
}
|
|
3253
|
-
) : /* @__PURE__ */
|
|
3254
|
-
/* @__PURE__ */
|
|
3397
|
+
) : /* @__PURE__ */ jsx48("div", { className: "flex-1", "aria-hidden": "true" }),
|
|
3398
|
+
/* @__PURE__ */ jsx48(
|
|
3255
3399
|
"div",
|
|
3256
3400
|
{
|
|
3257
3401
|
className: [
|
|
@@ -3263,10 +3407,10 @@ function FormWizardProgress({ labels }) {
|
|
|
3263
3407
|
isFuture ? "border-2 border-[var(--color-border-default)] bg-[var(--color-surface-default)] text-[var(--color-text-tertiary)]" : ""
|
|
3264
3408
|
].join(" "),
|
|
3265
3409
|
"aria-hidden": "true",
|
|
3266
|
-
children: isCompleted ? /* @__PURE__ */
|
|
3410
|
+
children: isCompleted ? /* @__PURE__ */ jsx48(CheckIcon2, {}) : index + 1
|
|
3267
3411
|
}
|
|
3268
3412
|
),
|
|
3269
|
-
index < totalSteps - 1 ? /* @__PURE__ */
|
|
3413
|
+
index < totalSteps - 1 ? /* @__PURE__ */ jsx48(
|
|
3270
3414
|
"div",
|
|
3271
3415
|
{
|
|
3272
3416
|
"aria-hidden": "true",
|
|
@@ -3275,9 +3419,9 @@ function FormWizardProgress({ labels }) {
|
|
|
3275
3419
|
index < currentStep ? "bg-[var(--color-brand-primary)]" : "bg-[var(--color-border-default)]"
|
|
3276
3420
|
].join(" ")
|
|
3277
3421
|
}
|
|
3278
|
-
) : /* @__PURE__ */
|
|
3422
|
+
) : /* @__PURE__ */ jsx48("div", { className: "flex-1", "aria-hidden": "true" })
|
|
3279
3423
|
] }),
|
|
3280
|
-
/* @__PURE__ */
|
|
3424
|
+
/* @__PURE__ */ jsx48(
|
|
3281
3425
|
"span",
|
|
3282
3426
|
{
|
|
3283
3427
|
className: [
|
|
@@ -3295,15 +3439,15 @@ function FormWizardProgress({ labels }) {
|
|
|
3295
3439
|
}
|
|
3296
3440
|
|
|
3297
3441
|
// src/components/FormWizard/FormWizardNav.tsx
|
|
3298
|
-
import { jsx as
|
|
3442
|
+
import { jsx as jsx49, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3299
3443
|
function FormWizardNav({
|
|
3300
3444
|
onNext,
|
|
3301
3445
|
isSubmitting = false,
|
|
3302
3446
|
submitLabel = "Submit"
|
|
3303
3447
|
}) {
|
|
3304
3448
|
const { canGoBack, goBack, isLastStep } = useFormWizard();
|
|
3305
|
-
return /* @__PURE__ */
|
|
3306
|
-
canGoBack && /* @__PURE__ */
|
|
3449
|
+
return /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-end gap-[var(--spacing-3)]", children: [
|
|
3450
|
+
canGoBack && /* @__PURE__ */ jsx49(
|
|
3307
3451
|
Button,
|
|
3308
3452
|
{
|
|
3309
3453
|
variant: "secondary",
|
|
@@ -3313,7 +3457,7 @@ function FormWizardNav({
|
|
|
3313
3457
|
children: "Back"
|
|
3314
3458
|
}
|
|
3315
3459
|
),
|
|
3316
|
-
/* @__PURE__ */
|
|
3460
|
+
/* @__PURE__ */ jsx49(
|
|
3317
3461
|
Button,
|
|
3318
3462
|
{
|
|
3319
3463
|
variant: "primary",
|
|
@@ -3758,6 +3902,7 @@ export {
|
|
|
3758
3902
|
LineHeightTight,
|
|
3759
3903
|
Link,
|
|
3760
3904
|
Menu,
|
|
3905
|
+
MenuCheckboxItem,
|
|
3761
3906
|
MenuHeader,
|
|
3762
3907
|
MenuItem,
|
|
3763
3908
|
MenuSection,
|
|
@@ -3797,6 +3942,8 @@ export {
|
|
|
3797
3942
|
Tabs,
|
|
3798
3943
|
ToastProvider,
|
|
3799
3944
|
ToggleButton,
|
|
3945
|
+
ToggleButtonGroup,
|
|
3946
|
+
ToggleButtonGroupItem,
|
|
3800
3947
|
Tooltip,
|
|
3801
3948
|
Tree,
|
|
3802
3949
|
Tab2 as UnstyledTab,
|