@quarklab/rad-ui 0.1.5 → 0.3.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.
@@ -0,0 +1,44 @@
1
+ import * as React from "react";
2
+ import { Loader } from "lucide-react";
3
+ import { cva, type VariantProps } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+
6
+ const spinnerVariants = cva("animate-spin", {
7
+ variants: {
8
+ size: {
9
+ sm: "size-4",
10
+ default: "size-6",
11
+ lg: "size-8",
12
+ xl: "size-12",
13
+ },
14
+ },
15
+ defaultVariants: {
16
+ size: "default",
17
+ },
18
+ });
19
+
20
+ export interface SpinnerProps
21
+ extends React.SVGProps<SVGSVGElement>,
22
+ VariantProps<typeof spinnerVariants> {
23
+ srText?: string;
24
+ }
25
+
26
+ const Spinner = React.forwardRef<SVGSVGElement, SpinnerProps>(
27
+ ({ className, size, srText = "Loading...", ...props }, ref) => {
28
+ return (
29
+ <>
30
+ <Loader
31
+ ref={ref}
32
+ className={cn(spinnerVariants({ size }), className)}
33
+ role="status"
34
+ aria-label={srText}
35
+ {...props}
36
+ />
37
+ <span className="sr-only">{srText}</span>
38
+ </>
39
+ );
40
+ }
41
+ );
42
+ Spinner.displayName = "Spinner";
43
+
44
+ export { Spinner, spinnerVariants };
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ import { cn } from "../lib/utils";
4
+
5
+ const Switch = React.forwardRef<
6
+ React.ElementRef<typeof SwitchPrimitives.Root>,
7
+ React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>
8
+ >(({ className, ...props }, ref) => (
9
+ <SwitchPrimitives.Root
10
+ className={cn(
11
+ "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors",
12
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-background",
13
+ "disabled:cursor-not-allowed disabled:opacity-50",
14
+ "data-[state=checked]:bg-primary data-[state=unchecked]:bg-gray-200",
15
+ className
16
+ )}
17
+ {...props}
18
+ ref={ref}
19
+ >
20
+ <SwitchPrimitives.Thumb
21
+ className={cn(
22
+ "pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform",
23
+ "data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
24
+ "rtl:data-[state=checked]:-translate-x-5 rtl:data-[state=unchecked]:translate-x-0"
25
+ )}
26
+ />
27
+ </SwitchPrimitives.Root>
28
+ ));
29
+
30
+ Switch.displayName = SwitchPrimitives.Root.displayName;
31
+
32
+ export { Switch };
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import { cn } from "../lib/utils";
3
+
4
+ export interface TextareaProps
5
+ extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}
6
+
7
+ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
8
+ ({ className, ...props }, ref) => {
9
+ return (
10
+ <textarea
11
+ className={cn(
12
+ "flex min-h-[60px] w-full rounded-md border border-border bg-background px-3 py-2 text-sm shadow-sm transition-colors",
13
+ "placeholder:text-muted-foreground",
14
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
15
+ "disabled:cursor-not-allowed disabled:opacity-50",
16
+ "resize-y",
17
+ className
18
+ )}
19
+ ref={ref}
20
+ {...props}
21
+ />
22
+ );
23
+ }
24
+ );
25
+
26
+ Textarea.displayName = "Textarea";
27
+
28
+ export { Textarea };
@@ -0,0 +1,58 @@
1
+ import * as React from "react";
2
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+ import { toggleVariants } from "./toggle";
6
+
7
+ const ToggleGroupContext = React.createContext<
8
+ VariantProps<typeof toggleVariants>
9
+ >({
10
+ size: "md",
11
+ variant: "default",
12
+ });
13
+
14
+ const ToggleGroup = React.forwardRef<
15
+ React.ElementRef<typeof ToggleGroupPrimitive.Root>,
16
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
17
+ VariantProps<typeof toggleVariants>
18
+ >(({ className, variant, size, children, ...props }, ref) => (
19
+ <ToggleGroupPrimitive.Root
20
+ ref={ref}
21
+ className={cn("flex items-center justify-center gap-1", className)}
22
+ {...props}
23
+ >
24
+ <ToggleGroupContext.Provider value={{ variant, size }}>
25
+ {children}
26
+ </ToggleGroupContext.Provider>
27
+ </ToggleGroupPrimitive.Root>
28
+ ));
29
+
30
+ ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
31
+
32
+ const ToggleGroupItem = React.forwardRef<
33
+ React.ElementRef<typeof ToggleGroupPrimitive.Item>,
34
+ React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
35
+ VariantProps<typeof toggleVariants>
36
+ >(({ className, children, variant, size, ...props }, ref) => {
37
+ const context = React.useContext(ToggleGroupContext);
38
+
39
+ return (
40
+ <ToggleGroupPrimitive.Item
41
+ ref={ref}
42
+ className={cn(
43
+ toggleVariants({
44
+ variant: context.variant || variant,
45
+ size: context.size || size,
46
+ }),
47
+ className
48
+ )}
49
+ {...props}
50
+ >
51
+ {children}
52
+ </ToggleGroupPrimitive.Item>
53
+ );
54
+ });
55
+
56
+ ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
57
+
58
+ export { ToggleGroup, ToggleGroupItem };
@@ -0,0 +1,45 @@
1
+ import * as React from "react";
2
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
3
+ import { type VariantProps, cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+
6
+ const toggleVariants = cva(
7
+ "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",
8
+ {
9
+ variants: {
10
+ variant: {
11
+ default: "bg-transparent",
12
+ outline:
13
+ "border border-border bg-transparent hover:bg-muted hover:text-foreground",
14
+ },
15
+ size: {
16
+ sm: "h-9 px-2.5 min-w-9 text-xs",
17
+ md: "h-10 px-3 min-w-10",
18
+ lg: "h-11 px-5 min-w-11 text-base",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ size: "md",
24
+ },
25
+ }
26
+ );
27
+
28
+ export interface ToggleProps
29
+ extends React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root>,
30
+ VariantProps<typeof toggleVariants> {}
31
+
32
+ const Toggle = React.forwardRef<
33
+ React.ElementRef<typeof TogglePrimitive.Root>,
34
+ ToggleProps
35
+ >(({ className, variant, size, ...props }, ref) => (
36
+ <TogglePrimitive.Root
37
+ ref={ref}
38
+ className={cn(toggleVariants({ variant, size, className }))}
39
+ {...props}
40
+ />
41
+ ));
42
+
43
+ Toggle.displayName = TogglePrimitive.Root.displayName;
44
+
45
+ export { Toggle, toggleVariants };
package/README.md DELETED
@@ -1,62 +0,0 @@
1
- # @quarklab/rad-ui
2
-
3
- A set of high-quality React components built with Radix UI and Tailwind CSS.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @quarklab/rad-ui
9
- ```
10
-
11
- ## Usage
12
-
13
- Import components directly:
14
-
15
- ```tsx
16
- import { Button } from "@quarklab/rad-ui";
17
-
18
- export default function Home() {
19
- return <Button>Click me</Button>;
20
- }
21
- ```
22
-
23
- ## Tailwind Setup
24
-
25
- To use the components, you need to configure Tailwind CSS to scan the package's files and use the custom plugin.
26
-
27
- 1. Add the package's paths to your `tailwind.config.js` `content` array so Tailwind scans the library.
28
- 2. Add the `raduiPlugin` to your `plugins` array to include the custom theme and variables.
29
-
30
- ```js
31
- // tailwind.config.js
32
- const { raduiPlugin } = require("@quarklab/rad-ui");
33
-
34
- module.exports = {
35
- content: [
36
- // ... your other content paths
37
- "./node_modules/@quarklab/rad-ui/dist/**/*.js",
38
- ],
39
- theme: {
40
- extend: {},
41
- },
42
- plugins: [
43
- raduiPlugin,
44
- ],
45
- };
46
- ```
47
-
48
- If you are using TypeScript (`tailwind.config.ts`):
49
-
50
- ```ts
51
- import { raduiPlugin } from "@quarklab/rad-ui";
52
-
53
- export default {
54
- content: [
55
- // ...
56
- "./node_modules/@quarklab/rad-ui/dist/**/*.js",
57
- ],
58
- plugins: [
59
- raduiPlugin,
60
- ],
61
- }
62
- ```
package/dist/index.css DELETED
@@ -1 +0,0 @@
1
- *{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-family:var(--font-vazirmatn),var(--font-inter),sans-serif}
package/dist/index.d.mts DELETED
@@ -1,62 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React$1 from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
6
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
7
- import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
8
- import * as react_jsx_runtime from 'react/jsx-runtime';
9
- import * as LabelPrimitive from '@radix-ui/react-label';
10
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
11
-
12
- declare function cn(...inputs: ClassValue[]): string;
13
-
14
- declare const buttonVariants: (props?: ({
15
- variant?: "default" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
16
- size?: "sm" | "md" | "lg" | null | undefined;
17
- } & class_variance_authority_types.ClassProp) | undefined) => string;
18
- interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
19
- asChild?: boolean;
20
- }
21
- declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
22
-
23
- declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
24
-
25
- declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
26
- declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
27
- declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
28
-
29
- declare const AspectRatio: React$1.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React$1.RefAttributes<HTMLDivElement>>;
30
-
31
- interface KbdProps extends React$1.HTMLAttributes<HTMLElement> {
32
- }
33
- declare const Kbd: React$1.ForwardRefExoticComponent<KbdProps & React$1.RefAttributes<HTMLElement>>;
34
- interface KbdGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
35
- }
36
- declare const KbdGroup: React$1.ForwardRefExoticComponent<KbdGroupProps & React$1.RefAttributes<HTMLDivElement>>;
37
-
38
- declare const badgeVariants: (props?: ({
39
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
40
- } & class_variance_authority_types.ClassProp) | undefined) => string;
41
- interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
42
- }
43
- declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
44
-
45
- declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
46
-
47
- declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
48
-
49
- declare const spinnerVariants: (props?: ({
50
- size?: "default" | "sm" | "lg" | "xl" | null | undefined;
51
- } & class_variance_authority_types.ClassProp) | undefined) => string;
52
- interface SpinnerProps extends React$1.SVGProps<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
53
- srText?: string;
54
- }
55
- declare const Spinner: React$1.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React$1.RefAttributes<SVGSVGElement>>;
56
-
57
- declare const raduiPlugin: {
58
- handler: tailwindcss_types_config.PluginCreator;
59
- config?: Partial<tailwindcss_types_config.Config>;
60
- };
61
-
62
- export { AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, Separator, Skeleton, Spinner, type SpinnerProps, badgeVariants, buttonVariants, cn, raduiPlugin, spinnerVariants };
package/dist/index.d.ts DELETED
@@ -1,62 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as React$1 from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as SeparatorPrimitive from '@radix-ui/react-separator';
6
- import * as AvatarPrimitive from '@radix-ui/react-avatar';
7
- import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
8
- import * as react_jsx_runtime from 'react/jsx-runtime';
9
- import * as LabelPrimitive from '@radix-ui/react-label';
10
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
11
-
12
- declare function cn(...inputs: ClassValue[]): string;
13
-
14
- declare const buttonVariants: (props?: ({
15
- variant?: "default" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
16
- size?: "sm" | "md" | "lg" | null | undefined;
17
- } & class_variance_authority_types.ClassProp) | undefined) => string;
18
- interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
19
- asChild?: boolean;
20
- }
21
- declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
22
-
23
- declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
24
-
25
- declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
26
- declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
27
- declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
28
-
29
- declare const AspectRatio: React$1.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React$1.RefAttributes<HTMLDivElement>>;
30
-
31
- interface KbdProps extends React$1.HTMLAttributes<HTMLElement> {
32
- }
33
- declare const Kbd: React$1.ForwardRefExoticComponent<KbdProps & React$1.RefAttributes<HTMLElement>>;
34
- interface KbdGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
35
- }
36
- declare const KbdGroup: React$1.ForwardRefExoticComponent<KbdGroupProps & React$1.RefAttributes<HTMLDivElement>>;
37
-
38
- declare const badgeVariants: (props?: ({
39
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
40
- } & class_variance_authority_types.ClassProp) | undefined) => string;
41
- interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
42
- }
43
- declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
44
-
45
- declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & React$1.RefAttributes<HTMLLabelElement>>;
46
-
47
- declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
48
-
49
- declare const spinnerVariants: (props?: ({
50
- size?: "default" | "sm" | "lg" | "xl" | null | undefined;
51
- } & class_variance_authority_types.ClassProp) | undefined) => string;
52
- interface SpinnerProps extends React$1.SVGProps<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
53
- srText?: string;
54
- }
55
- declare const Spinner: React$1.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React$1.RefAttributes<SVGSVGElement>>;
56
-
57
- declare const raduiPlugin: {
58
- handler: tailwindcss_types_config.PluginCreator;
59
- config?: Partial<tailwindcss_types_config.Config>;
60
- };
61
-
62
- export { AspectRatio, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Button, type ButtonProps, Kbd, KbdGroup, type KbdGroupProps, type KbdProps, Label, Separator, Skeleton, Spinner, type SpinnerProps, badgeVariants, buttonVariants, cn, raduiPlugin, spinnerVariants };
package/dist/index.mjs DELETED
@@ -1,14 +0,0 @@
1
- import{clsx as W}from"clsx";import{twMerge as N}from"tailwind-merge";function o(...e){return N(W(e))}import*as L from"react";import{cva as X}from"class-variance-authority";import{jsx as K}from"react/jsx-runtime";var x=X("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 active:bg-primary/80",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",outline:"border border-border bg-background hover:bg-muted hover:text-foreground active:bg-muted/80",ghost:"hover:bg-muted hover:text-foreground active:bg-muted/80",link:"text-primary underline-offset-4 hover:underline active:text-primary/80"},size:{sm:"h-9 px-3 text-xs rounded-md",md:"h-10 px-4 py-2",lg:"h-11 px-8 text-base rounded-lg"}},defaultVariants:{variant:"default",size:"md"}}),I=L.forwardRef(({className:e,variant:a,size:t,...l},u)=>K("button",{className:o(x({variant:a,size:t,className:e})),ref:u,...l}));I.displayName="Button";import*as C from"react";import*as i from"@radix-ui/react-separator";import{jsx as Z}from"react/jsx-runtime";var g=C.forwardRef(({className:e,orientation:a="horizontal",decorative:t=!0,...l},u)=>Z(i.Root,{ref:u,decorative:t,orientation:a,className:o("shrink-0 bg-border",a==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...l}));g.displayName=i.Root.displayName;import*as r from"react";import*as d from"@radix-ui/react-avatar";import{jsx as c}from"react/jsx-runtime";var h=r.forwardRef(({className:e,...a},t)=>c(d.Root,{ref:t,className:o("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...a}));h.displayName=d.Root.displayName;var S=r.forwardRef(({className:e,...a},t)=>c(d.Image,{ref:t,className:o("aspect-square h-full w-full",e),...a}));S.displayName=d.Image.displayName;var k=r.forwardRef(({className:e,...a},t)=>c(d.Fallback,{ref:t,className:o("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...a}));k.displayName=d.Fallback.displayName;import*as P from"@radix-ui/react-aspect-ratio";var J=P.Root;import*as n from"react";import{jsx as A}from"react/jsx-runtime";var w=n.forwardRef(({className:e,...a},t)=>A("kbd",{ref:t,className:o("pointer-events-none inline-flex h-6 select-none items-center gap-1 rounded border border-border bg-muted px-1.5 font-mono text-[10px] font-medium text-muted-foreground shadow-sm",e),...a}));w.displayName="Kbd";var B=n.forwardRef(({className:e,...a},t)=>A("div",{ref:t,className:o("inline-flex items-center gap-1",e),...a}));B.displayName="KbdGroup";import{cva as Q}from"class-variance-authority";import{jsx as $}from"react/jsx-runtime";var F=Q("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Y({className:e,variant:a,...t}){return $("div",{className:o(F({variant:a}),e),...t})}import*as D from"react";import*as p from"@radix-ui/react-label";import{cva as j}from"class-variance-authority";import{jsx as ee}from"react/jsx-runtime";var _=j("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),M=D.forwardRef(({className:e,...a},t)=>ee(p.Root,{ref:t,className:o(_(),e),...a}));M.displayName=p.Root.displayName;import{jsx as te}from"react/jsx-runtime";function ae({className:e,...a}){return te("div",{className:o("animate-pulse rounded-md bg-muted",e),...a})}import*as v from"react";import{forwardRef as oe,createElement as y}from"react";var R={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var ue=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),b=(e,a)=>{let t=oe(({color:l="currentColor",size:u=24,strokeWidth:m=2,absoluteStrokeWidth:H,className:O="",children:s,...G},V)=>y("svg",{ref:V,...R,width:u,height:u,stroke:l,strokeWidth:H?Number(m)*24/Number(u):m,className:["lucide",`lucide-${ue(e)}`,O].join(" "),...G},[...a.map(([z,E])=>y(z,E)),...Array.isArray(s)?s:[s]]));return t.displayName=`${e}`,t};var f=b("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);import{cva as de}from"class-variance-authority";import{Fragment as le,jsx as T,jsxs as fe}from"react/jsx-runtime";var U=de("animate-spin",{variants:{size:{sm:"size-4",default:"size-6",lg:"size-8",xl:"size-12"}},defaultVariants:{size:"default"}}),q=v.forwardRef(({className:e,size:a,srText:t="Loading...",...l},u)=>fe(le,{children:[T(f,{ref:u,className:o(U({size:a}),e),role:"status","aria-label":t,...l}),T("span",{className:"sr-only",children:t})]}));q.displayName="Spinner";import re from"tailwindcss/plugin";var _e=re(function({addBase:e}){e({":root":{"--background":"40 20% 98%","--foreground":"220 15% 15%","--primary":"175 100% 31%","--primary-foreground":"0 0% 100%","--secondary":"40 10% 92%","--secondary-foreground":"220 15% 15%","--destructive":"0 84% 60%","--destructive-foreground":"0 0% 100%","--card":"40 20% 96%","--card-foreground":"220 15% 15%","--border":"40 10% 88%","--muted":"40 10% 92%","--muted-foreground":"220 10% 40%","--ring":"175 100% 31%","--radius":"0.5rem"},".dark":{"--background":"222 47% 11%","--foreground":"210 40% 98%","--primary":"170 65% 50%","--primary-foreground":"222 47% 11%","--secondary":"217 33% 17%","--secondary-foreground":"210 40% 98%","--destructive":"0 63% 31%","--destructive-foreground":"210 40% 98%","--card":"222 47% 13%","--card-foreground":"210 40% 98%","--border":"217 33% 20%","--muted":"217 33% 17%","--muted-foreground":"210 20% 70%","--ring":"170 65% 50%"}})},{theme:{extend:{colors:{background:"hsl(var(--background))",foreground:"hsl(var(--foreground))",primary:{DEFAULT:"hsl(var(--primary))",foreground:"hsl(var(--primary-foreground))"},secondary:{DEFAULT:"hsl(var(--secondary))",foreground:"hsl(var(--secondary-foreground))"},destructive:{DEFAULT:"hsl(var(--destructive))",foreground:"hsl(var(--destructive-foreground))"},card:{DEFAULT:"hsl(var(--card))",foreground:"hsl(var(--card-foreground))"},border:"hsl(var(--border))",muted:{DEFAULT:"hsl(var(--muted))",foreground:"hsl(var(--muted-foreground))"},ring:"hsl(var(--ring))"},borderRadius:{lg:"var(--radius)",md:"calc(var(--radius) - 2px)",sm:"calc(var(--radius) - 4px)"}}}});export{J as AspectRatio,h as Avatar,k as AvatarFallback,S as AvatarImage,Y as Badge,I as Button,w as Kbd,B as KbdGroup,M as Label,g as Separator,ae as Skeleton,q as Spinner,F as badgeVariants,x as buttonVariants,o as cn,_e as raduiPlugin,U as spinnerVariants};
2
- /*! Bundled license information:
3
-
4
- lucide-react/dist/esm/defaultAttributes.js:
5
- lucide-react/dist/esm/createLucideIcon.js:
6
- lucide-react/dist/esm/icons/loader.js:
7
- lucide-react/dist/esm/lucide-react.js:
8
- (**
9
- * @license lucide-react v0.309.0 - ISC
10
- *
11
- * This source code is licensed under the ISC license.
12
- * See the LICENSE file in the root directory of this source tree.
13
- *)
14
- */