adminium 1.0.1-beta.2 → 1.0.1-beta.3
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.cjs +272 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -1
- package/dist/index.d.ts +20 -1
- package/dist/index.js +268 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1608,6 +1608,272 @@ function DropdownMenuSub({
|
|
|
1608
1608
|
}) {
|
|
1609
1609
|
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
1610
1610
|
}
|
|
1611
|
+
var alertVariants = classVarianceAuthority.cva(
|
|
1612
|
+
"flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",
|
|
1613
|
+
{
|
|
1614
|
+
variants: {
|
|
1615
|
+
variant: {
|
|
1616
|
+
secondary: "",
|
|
1617
|
+
primary: "",
|
|
1618
|
+
destructive: "",
|
|
1619
|
+
success: "",
|
|
1620
|
+
info: "",
|
|
1621
|
+
mono: "",
|
|
1622
|
+
warning: ""
|
|
1623
|
+
},
|
|
1624
|
+
icon: {
|
|
1625
|
+
primary: "",
|
|
1626
|
+
destructive: "",
|
|
1627
|
+
success: "",
|
|
1628
|
+
info: "",
|
|
1629
|
+
warning: ""
|
|
1630
|
+
},
|
|
1631
|
+
appearance: {
|
|
1632
|
+
solid: "",
|
|
1633
|
+
outline: "",
|
|
1634
|
+
light: "",
|
|
1635
|
+
stroke: "text-foreground"
|
|
1636
|
+
},
|
|
1637
|
+
size: {
|
|
1638
|
+
lg: "rounded-lg p-4 gap-3 text-base [&>[data-slot=alert-icon]>svg]:size-6 [&_[data-slot=alert-icon]]:mt-0.5 [&_[data-slot=alert-close]]:mt-1",
|
|
1639
|
+
md: "rounded-lg p-3.5 gap-2.5 text-sm [&>[data-slot=alert-icon]>svg]:size-5 [&_[data-slot=alert-icon]]:mt-0 [&_[data-slot=alert-close]]:mt-0.5",
|
|
1640
|
+
sm: "rounded-md px-3 py-2.5 gap-2 text-xs [&>[data-slot=alert-icon]>svg]:size-4 [&_[data-alert-icon]]:mt-0.5 [&_[data-slot=alert-close]]:mt-0.25 [&_[data-slot=alert-close]_svg]:size-3.5"
|
|
1641
|
+
}
|
|
1642
|
+
},
|
|
1643
|
+
compoundVariants: [
|
|
1644
|
+
/* Solid */
|
|
1645
|
+
{
|
|
1646
|
+
variant: "secondary",
|
|
1647
|
+
appearance: "solid",
|
|
1648
|
+
className: "bg-muted text-foreground"
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
variant: "primary",
|
|
1652
|
+
appearance: "solid",
|
|
1653
|
+
className: "bg-primary text-primary-foreground"
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
variant: "destructive",
|
|
1657
|
+
appearance: "solid",
|
|
1658
|
+
className: "bg-destructive text-destructive-foreground"
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
variant: "success",
|
|
1662
|
+
appearance: "solid",
|
|
1663
|
+
className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
variant: "info",
|
|
1667
|
+
appearance: "solid",
|
|
1668
|
+
className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
variant: "warning",
|
|
1672
|
+
appearance: "solid",
|
|
1673
|
+
className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
variant: "mono",
|
|
1677
|
+
appearance: "solid",
|
|
1678
|
+
className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black [&_[data-slot=alert-close]]:text-white"
|
|
1679
|
+
},
|
|
1680
|
+
/* Outline */
|
|
1681
|
+
{
|
|
1682
|
+
variant: "secondary",
|
|
1683
|
+
appearance: "outline",
|
|
1684
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
variant: "primary",
|
|
1688
|
+
appearance: "outline",
|
|
1689
|
+
className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
|
|
1690
|
+
},
|
|
1691
|
+
{
|
|
1692
|
+
variant: "destructive",
|
|
1693
|
+
appearance: "outline",
|
|
1694
|
+
className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
|
|
1695
|
+
},
|
|
1696
|
+
{
|
|
1697
|
+
variant: "success",
|
|
1698
|
+
appearance: "outline",
|
|
1699
|
+
className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
1700
|
+
},
|
|
1701
|
+
{
|
|
1702
|
+
variant: "info",
|
|
1703
|
+
appearance: "outline",
|
|
1704
|
+
className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
variant: "warning",
|
|
1708
|
+
appearance: "outline",
|
|
1709
|
+
className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
|
|
1710
|
+
},
|
|
1711
|
+
{
|
|
1712
|
+
variant: "mono",
|
|
1713
|
+
appearance: "outline",
|
|
1714
|
+
className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
|
|
1715
|
+
},
|
|
1716
|
+
/* Light */
|
|
1717
|
+
{
|
|
1718
|
+
variant: "secondary",
|
|
1719
|
+
appearance: "light",
|
|
1720
|
+
className: "bg-muted border border-border text-foreground"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
variant: "primary",
|
|
1724
|
+
appearance: "light",
|
|
1725
|
+
className: "text-foreground bg-[var(--color-primary-soft,var(--color-blue-50))] border border-[var(--color-primary-alpha,var(--color-blue-100))] [&_[data-slot=alert-icon]]:text-primary dark:bg-[var(--color-primary-soft,var(--color-blue-950))] dark:border-[var(--color-primary-alpha,var(--color-blue-900))]"
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
variant: "destructive",
|
|
1729
|
+
appearance: "light",
|
|
1730
|
+
className: "bg-[var(--color-destructive-soft,var(--color-red-50))] border border-[var(--color-destructive-alpha,var(--color-red-100))] text-foreground [&_[data-slot=alert-icon]]:text-destructive dark:bg-[var(--color-destructive-soft,var(--color-red-950))] dark:border-[var(--color-destructive-alpha,var(--color-red-900))] "
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
variant: "success",
|
|
1734
|
+
appearance: "light",
|
|
1735
|
+
className: "bg-[var(--color-success-soft,var(--color-green-50))] border border-[var(--color-success-alpha,var(--color-green-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))] dark:bg-[var(--color-success-soft,var(--color-green-950))] dark:border-[var(--color-success-alpha,var(--color-green-900))]"
|
|
1736
|
+
},
|
|
1737
|
+
{
|
|
1738
|
+
variant: "info",
|
|
1739
|
+
appearance: "light",
|
|
1740
|
+
className: "bg-[var(--color-info-soft,var(--color-violet-50))] border border-[var(--color-info-alpha,var(--color-violet-100))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))] dark:bg-[var(--color-info-soft,var(--color-violet-950))] dark:border-[var(--color-info-alpha,var(--color-violet-900))]"
|
|
1741
|
+
},
|
|
1742
|
+
{
|
|
1743
|
+
variant: "warning",
|
|
1744
|
+
appearance: "light",
|
|
1745
|
+
className: "bg-[var(--color-warning-soft,var(--color-yellow-50))] border border-[var(--color-warning-alpha,var(--color-yellow-200))] text-foreground [&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))] dark:bg-[var(--color-warning-soft,var(--color-yellow-950))] dark:border-[var(--color-warning-alpha,var(--color-yellow-900))]"
|
|
1746
|
+
},
|
|
1747
|
+
/* Mono */
|
|
1748
|
+
{
|
|
1749
|
+
variant: "mono",
|
|
1750
|
+
icon: "primary",
|
|
1751
|
+
className: "[&_[data-slot=alert-icon]]:text-primary"
|
|
1752
|
+
},
|
|
1753
|
+
{
|
|
1754
|
+
variant: "mono",
|
|
1755
|
+
icon: "warning",
|
|
1756
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
variant: "mono",
|
|
1760
|
+
icon: "success",
|
|
1761
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
variant: "mono",
|
|
1765
|
+
icon: "destructive",
|
|
1766
|
+
className: "[&_[data-slot=alert-icon]]:text-destructive"
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
variant: "mono",
|
|
1770
|
+
icon: "info",
|
|
1771
|
+
className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
defaultVariants: {
|
|
1775
|
+
variant: "secondary",
|
|
1776
|
+
appearance: "solid",
|
|
1777
|
+
size: "md"
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
);
|
|
1781
|
+
function Alert({
|
|
1782
|
+
className,
|
|
1783
|
+
variant,
|
|
1784
|
+
size,
|
|
1785
|
+
icon,
|
|
1786
|
+
appearance,
|
|
1787
|
+
close = false,
|
|
1788
|
+
onClose,
|
|
1789
|
+
children,
|
|
1790
|
+
...props
|
|
1791
|
+
}) {
|
|
1792
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1793
|
+
"div",
|
|
1794
|
+
{
|
|
1795
|
+
"data-slot": "alert",
|
|
1796
|
+
role: "alert",
|
|
1797
|
+
className: cn(
|
|
1798
|
+
alertVariants({ variant, size, icon, appearance }),
|
|
1799
|
+
className
|
|
1800
|
+
),
|
|
1801
|
+
...props,
|
|
1802
|
+
children: [
|
|
1803
|
+
children,
|
|
1804
|
+
close && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1805
|
+
Button,
|
|
1806
|
+
{
|
|
1807
|
+
size: "sm",
|
|
1808
|
+
variant: "inverse",
|
|
1809
|
+
mode: "icon",
|
|
1810
|
+
onClick: onClose,
|
|
1811
|
+
"aria-label": "Dismiss",
|
|
1812
|
+
"data-slot": "alert-close",
|
|
1813
|
+
className: cn("group shrink-0 size-4"),
|
|
1814
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "opacity-60 group-hover:opacity-100 size-4" })
|
|
1815
|
+
}
|
|
1816
|
+
)
|
|
1817
|
+
]
|
|
1818
|
+
}
|
|
1819
|
+
);
|
|
1820
|
+
}
|
|
1821
|
+
function AlertTitle({
|
|
1822
|
+
className,
|
|
1823
|
+
...props
|
|
1824
|
+
}) {
|
|
1825
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1826
|
+
"div",
|
|
1827
|
+
{
|
|
1828
|
+
"data-slot": "alert-title",
|
|
1829
|
+
className: cn("grow tracking-tight", className),
|
|
1830
|
+
...props
|
|
1831
|
+
}
|
|
1832
|
+
);
|
|
1833
|
+
}
|
|
1834
|
+
function AlertIcon({ children, className, ...props }) {
|
|
1835
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1836
|
+
"div",
|
|
1837
|
+
{
|
|
1838
|
+
"data-slot": "alert-icon",
|
|
1839
|
+
className: cn("shrink-0", className),
|
|
1840
|
+
...props,
|
|
1841
|
+
children
|
|
1842
|
+
}
|
|
1843
|
+
);
|
|
1844
|
+
}
|
|
1845
|
+
function AlertToolbar({ children, className, ...props }) {
|
|
1846
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
|
|
1847
|
+
}
|
|
1848
|
+
function AlertDescription({
|
|
1849
|
+
className,
|
|
1850
|
+
...props
|
|
1851
|
+
}) {
|
|
1852
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1853
|
+
"div",
|
|
1854
|
+
{
|
|
1855
|
+
"data-slot": "alert-description",
|
|
1856
|
+
className: cn("text-sm [&_p]:leading-relaxed [&_p]:mb-2", className),
|
|
1857
|
+
...props
|
|
1858
|
+
}
|
|
1859
|
+
);
|
|
1860
|
+
}
|
|
1861
|
+
function AlertContent({
|
|
1862
|
+
className,
|
|
1863
|
+
...props
|
|
1864
|
+
}) {
|
|
1865
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1866
|
+
"div",
|
|
1867
|
+
{
|
|
1868
|
+
"data-slot": "alert-content",
|
|
1869
|
+
className: cn(
|
|
1870
|
+
"space-y-2 [&_[data-slot=alert-title]]:font-semibold",
|
|
1871
|
+
className
|
|
1872
|
+
),
|
|
1873
|
+
...props
|
|
1874
|
+
}
|
|
1875
|
+
);
|
|
1876
|
+
}
|
|
1611
1877
|
var MOBILE_BREAKPOINT = 992;
|
|
1612
1878
|
function useIsMobile() {
|
|
1613
1879
|
const [isMobile, setIsMobile] = React__namespace.useState(
|
|
@@ -1654,6 +1920,12 @@ function useMounted() {
|
|
|
1654
1920
|
return mounted;
|
|
1655
1921
|
}
|
|
1656
1922
|
|
|
1923
|
+
exports.Alert = Alert;
|
|
1924
|
+
exports.AlertContent = AlertContent;
|
|
1925
|
+
exports.AlertDescription = AlertDescription;
|
|
1926
|
+
exports.AlertIcon = AlertIcon;
|
|
1927
|
+
exports.AlertTitle = AlertTitle;
|
|
1928
|
+
exports.AlertToolbar = AlertToolbar;
|
|
1657
1929
|
exports.Avatar = Avatar;
|
|
1658
1930
|
exports.AvatarFallback = AvatarFallback;
|
|
1659
1931
|
exports.AvatarImage = AvatarImage;
|