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.d.cts CHANGED
@@ -149,6 +149,25 @@ declare function DropdownMenuSeparator({ className, ...props }: React$1.Componen
149
149
  declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
150
150
  declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
151
151
 
152
+ declare const alertVariants: (props?: ({
153
+ variant?: "primary" | "secondary" | "success" | "warning" | "info" | "destructive" | "mono" | null | undefined;
154
+ icon?: "primary" | "success" | "warning" | "info" | "destructive" | null | undefined;
155
+ appearance?: "outline" | "light" | "solid" | "stroke" | null | undefined;
156
+ size?: "lg" | "md" | "sm" | null | undefined;
157
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
158
+ interface AlertProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
159
+ close?: boolean;
160
+ onClose?: () => void;
161
+ }
162
+ interface AlertIconProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
163
+ }
164
+ declare function Alert({ className, variant, size, icon, appearance, close, onClose, children, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
165
+ declare function AlertTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
166
+ declare function AlertIcon({ children, className, ...props }: AlertIconProps): react_jsx_runtime.JSX.Element;
167
+ declare function AlertToolbar({ children, className, ...props }: AlertIconProps): react_jsx_runtime.JSX.Element;
168
+ declare function AlertDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
169
+ declare function AlertContent({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
170
+
152
171
  declare function useIsMobile(): boolean;
153
172
 
154
173
  declare function useCopyToClipboard({ timeout, onCopy, }?: {
@@ -169,4 +188,4 @@ declare function useMounted(): boolean;
169
188
  */
170
189
  declare function cn(...inputs: ClassValue[]): string;
171
190
 
172
- export { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
191
+ export { Alert, AlertContent, AlertDescription, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
package/dist/index.d.ts CHANGED
@@ -149,6 +149,25 @@ declare function DropdownMenuSeparator({ className, ...props }: React$1.Componen
149
149
  declare function DropdownMenuShortcut({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
150
150
  declare function DropdownMenuSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
151
151
 
152
+ declare const alertVariants: (props?: ({
153
+ variant?: "primary" | "secondary" | "success" | "warning" | "info" | "destructive" | "mono" | null | undefined;
154
+ icon?: "primary" | "success" | "warning" | "info" | "destructive" | null | undefined;
155
+ appearance?: "outline" | "light" | "solid" | "stroke" | null | undefined;
156
+ size?: "lg" | "md" | "sm" | null | undefined;
157
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
158
+ interface AlertProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
159
+ close?: boolean;
160
+ onClose?: () => void;
161
+ }
162
+ interface AlertIconProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {
163
+ }
164
+ declare function Alert({ className, variant, size, icon, appearance, close, onClose, children, ...props }: AlertProps): react_jsx_runtime.JSX.Element;
165
+ declare function AlertTitle({ className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>): react_jsx_runtime.JSX.Element;
166
+ declare function AlertIcon({ children, className, ...props }: AlertIconProps): react_jsx_runtime.JSX.Element;
167
+ declare function AlertToolbar({ children, className, ...props }: AlertIconProps): react_jsx_runtime.JSX.Element;
168
+ declare function AlertDescription({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
169
+ declare function AlertContent({ className, ...props }: React$1.HTMLAttributes<HTMLParagraphElement>): react_jsx_runtime.JSX.Element;
170
+
152
171
  declare function useIsMobile(): boolean;
153
172
 
154
173
  declare function useCopyToClipboard({ timeout, onCopy, }?: {
@@ -169,4 +188,4 @@ declare function useMounted(): boolean;
169
188
  */
170
189
  declare function cn(...inputs: ClassValue[]): string;
171
190
 
172
- export { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
191
+ export { Alert, AlertContent, AlertDescription, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, type BadgeButtonProps, BadgeDot, type BadgeDotProps, type BadgeProps, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { cva } from 'class-variance-authority';
5
5
  import { Avatar as Avatar$1 } from 'radix-ui';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';
7
7
  import * as SlotPrimitive from '@radix-ui/react-slot';
8
- import { ChevronDown, Check, Minus, ChevronRight, Circle } from 'lucide-react';
8
+ import { ChevronDown, Check, Minus, ChevronRight, Circle, X } from 'lucide-react';
9
9
  import * as React from 'react';
10
10
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
11
11
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
@@ -1583,6 +1583,272 @@ function DropdownMenuSub({
1583
1583
  }) {
1584
1584
  return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1585
1585
  }
1586
+ var alertVariants = cva(
1587
+ "flex items-stretch w-full gap-2 group-[.toaster]:w-(--width)",
1588
+ {
1589
+ variants: {
1590
+ variant: {
1591
+ secondary: "",
1592
+ primary: "",
1593
+ destructive: "",
1594
+ success: "",
1595
+ info: "",
1596
+ mono: "",
1597
+ warning: ""
1598
+ },
1599
+ icon: {
1600
+ primary: "",
1601
+ destructive: "",
1602
+ success: "",
1603
+ info: "",
1604
+ warning: ""
1605
+ },
1606
+ appearance: {
1607
+ solid: "",
1608
+ outline: "",
1609
+ light: "",
1610
+ stroke: "text-foreground"
1611
+ },
1612
+ size: {
1613
+ 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",
1614
+ 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",
1615
+ 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"
1616
+ }
1617
+ },
1618
+ compoundVariants: [
1619
+ /* Solid */
1620
+ {
1621
+ variant: "secondary",
1622
+ appearance: "solid",
1623
+ className: "bg-muted text-foreground"
1624
+ },
1625
+ {
1626
+ variant: "primary",
1627
+ appearance: "solid",
1628
+ className: "bg-primary text-primary-foreground"
1629
+ },
1630
+ {
1631
+ variant: "destructive",
1632
+ appearance: "solid",
1633
+ className: "bg-destructive text-destructive-foreground"
1634
+ },
1635
+ {
1636
+ variant: "success",
1637
+ appearance: "solid",
1638
+ className: "bg-[var(--color-success,var(--color-green-500))] text-[var(--color-success-foreground,var(--color-white))]"
1639
+ },
1640
+ {
1641
+ variant: "info",
1642
+ appearance: "solid",
1643
+ className: "bg-[var(--color-info,var(--color-violet-600))] text-[var(--color-info-foreground,var(--color-white))]"
1644
+ },
1645
+ {
1646
+ variant: "warning",
1647
+ appearance: "solid",
1648
+ className: "bg-[var(--color-warning,var(--color-yellow-500))] text-[var(--color-warning-foreground,var(--color-white))]"
1649
+ },
1650
+ {
1651
+ variant: "mono",
1652
+ appearance: "solid",
1653
+ className: "bg-zinc-950 text-white dark:bg-zinc-300 dark:text-black [&_[data-slot=alert-close]]:text-white"
1654
+ },
1655
+ /* Outline */
1656
+ {
1657
+ variant: "secondary",
1658
+ appearance: "outline",
1659
+ className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
1660
+ },
1661
+ {
1662
+ variant: "primary",
1663
+ appearance: "outline",
1664
+ className: "border border-border bg-background text-primary [&_[data-slot=alert-close]]:text-foreground"
1665
+ },
1666
+ {
1667
+ variant: "destructive",
1668
+ appearance: "outline",
1669
+ className: "border border-border bg-background text-destructive [&_[data-slot=alert-close]]:text-foreground"
1670
+ },
1671
+ {
1672
+ variant: "success",
1673
+ appearance: "outline",
1674
+ className: "border border-border bg-background text-[var(--color-success,var(--color-green-500))] [&_[data-slot=alert-close]]:text-foreground"
1675
+ },
1676
+ {
1677
+ variant: "info",
1678
+ appearance: "outline",
1679
+ className: "border border-border bg-background text-[var(--color-info,var(--color-violet-600))] [&_[data-slot=alert-close]]:text-foreground"
1680
+ },
1681
+ {
1682
+ variant: "warning",
1683
+ appearance: "outline",
1684
+ className: "border border-border bg-background text-[var(--color-warning,var(--color-yellow-500))] [&_[data-slot=alert-close]]:text-foreground"
1685
+ },
1686
+ {
1687
+ variant: "mono",
1688
+ appearance: "outline",
1689
+ className: "border border-border bg-background text-foreground [&_[data-slot=alert-close]]:text-foreground"
1690
+ },
1691
+ /* Light */
1692
+ {
1693
+ variant: "secondary",
1694
+ appearance: "light",
1695
+ className: "bg-muted border border-border text-foreground"
1696
+ },
1697
+ {
1698
+ variant: "primary",
1699
+ appearance: "light",
1700
+ 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))]"
1701
+ },
1702
+ {
1703
+ variant: "destructive",
1704
+ appearance: "light",
1705
+ 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))] "
1706
+ },
1707
+ {
1708
+ variant: "success",
1709
+ appearance: "light",
1710
+ 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))]"
1711
+ },
1712
+ {
1713
+ variant: "info",
1714
+ appearance: "light",
1715
+ 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))]"
1716
+ },
1717
+ {
1718
+ variant: "warning",
1719
+ appearance: "light",
1720
+ 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))]"
1721
+ },
1722
+ /* Mono */
1723
+ {
1724
+ variant: "mono",
1725
+ icon: "primary",
1726
+ className: "[&_[data-slot=alert-icon]]:text-primary"
1727
+ },
1728
+ {
1729
+ variant: "mono",
1730
+ icon: "warning",
1731
+ className: "[&_[data-slot=alert-icon]]:text-[var(--color-warning-foreground,var(--color-yellow-600))]"
1732
+ },
1733
+ {
1734
+ variant: "mono",
1735
+ icon: "success",
1736
+ className: "[&_[data-slot=alert-icon]]:text-[var(--color-success-foreground,var(--color-green-600))]"
1737
+ },
1738
+ {
1739
+ variant: "mono",
1740
+ icon: "destructive",
1741
+ className: "[&_[data-slot=alert-icon]]:text-destructive"
1742
+ },
1743
+ {
1744
+ variant: "mono",
1745
+ icon: "info",
1746
+ className: "[&_[data-slot=alert-icon]]:text-[var(--color-info-foreground,var(--color-violet-600))]"
1747
+ }
1748
+ ],
1749
+ defaultVariants: {
1750
+ variant: "secondary",
1751
+ appearance: "solid",
1752
+ size: "md"
1753
+ }
1754
+ }
1755
+ );
1756
+ function Alert({
1757
+ className,
1758
+ variant,
1759
+ size,
1760
+ icon,
1761
+ appearance,
1762
+ close = false,
1763
+ onClose,
1764
+ children,
1765
+ ...props
1766
+ }) {
1767
+ return /* @__PURE__ */ jsxs(
1768
+ "div",
1769
+ {
1770
+ "data-slot": "alert",
1771
+ role: "alert",
1772
+ className: cn(
1773
+ alertVariants({ variant, size, icon, appearance }),
1774
+ className
1775
+ ),
1776
+ ...props,
1777
+ children: [
1778
+ children,
1779
+ close && /* @__PURE__ */ jsx(
1780
+ Button,
1781
+ {
1782
+ size: "sm",
1783
+ variant: "inverse",
1784
+ mode: "icon",
1785
+ onClick: onClose,
1786
+ "aria-label": "Dismiss",
1787
+ "data-slot": "alert-close",
1788
+ className: cn("group shrink-0 size-4"),
1789
+ children: /* @__PURE__ */ jsx(X, { className: "opacity-60 group-hover:opacity-100 size-4" })
1790
+ }
1791
+ )
1792
+ ]
1793
+ }
1794
+ );
1795
+ }
1796
+ function AlertTitle({
1797
+ className,
1798
+ ...props
1799
+ }) {
1800
+ return /* @__PURE__ */ jsx(
1801
+ "div",
1802
+ {
1803
+ "data-slot": "alert-title",
1804
+ className: cn("grow tracking-tight", className),
1805
+ ...props
1806
+ }
1807
+ );
1808
+ }
1809
+ function AlertIcon({ children, className, ...props }) {
1810
+ return /* @__PURE__ */ jsx(
1811
+ "div",
1812
+ {
1813
+ "data-slot": "alert-icon",
1814
+ className: cn("shrink-0", className),
1815
+ ...props,
1816
+ children
1817
+ }
1818
+ );
1819
+ }
1820
+ function AlertToolbar({ children, className, ...props }) {
1821
+ return /* @__PURE__ */ jsx("div", { "data-slot": "alert-toolbar", className: cn(className), ...props, children });
1822
+ }
1823
+ function AlertDescription({
1824
+ className,
1825
+ ...props
1826
+ }) {
1827
+ return /* @__PURE__ */ jsx(
1828
+ "div",
1829
+ {
1830
+ "data-slot": "alert-description",
1831
+ className: cn("text-sm [&_p]:leading-relaxed [&_p]:mb-2", className),
1832
+ ...props
1833
+ }
1834
+ );
1835
+ }
1836
+ function AlertContent({
1837
+ className,
1838
+ ...props
1839
+ }) {
1840
+ return /* @__PURE__ */ jsx(
1841
+ "div",
1842
+ {
1843
+ "data-slot": "alert-content",
1844
+ className: cn(
1845
+ "space-y-2 [&_[data-slot=alert-title]]:font-semibold",
1846
+ className
1847
+ ),
1848
+ ...props
1849
+ }
1850
+ );
1851
+ }
1586
1852
  var MOBILE_BREAKPOINT = 992;
1587
1853
  function useIsMobile() {
1588
1854
  const [isMobile, setIsMobile] = React.useState(
@@ -1629,6 +1895,6 @@ function useMounted() {
1629
1895
  return mounted;
1630
1896
  }
1631
1897
 
1632
- export { Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
1898
+ export { Alert, AlertContent, AlertDescription, AlertIcon, AlertTitle, AlertToolbar, Avatar, AvatarFallback, AvatarImage, AvatarIndicator, AvatarStatus, Badge, BadgeButton, BadgeDot, Button, ButtonArrow, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTable, CardTitle, CardToolbar, Checkbox, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Icons, Input, InputAddon, InputGroup, InputWrapper, Skeleton, avatarStatusVariants, badgeVariants, buttonVariants, cn, inputAddonVariants, inputVariants, useCopyToClipboard, useIsMobile, useMounted };
1633
1899
  //# sourceMappingURL=index.js.map
1634
1900
  //# sourceMappingURL=index.js.map