@quarklab/rad-ui 0.1.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/README.md +39 -0
- package/dist/index.d.mts +56 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.js +14 -0
- package/dist/index.mjs +14 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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 add the package's paths to your `tailwind.config.js` `content` array. This ensures that Tailwind generates the necessary CSS classes for the components.
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
// tailwind.config.js
|
|
29
|
+
module.exports = {
|
|
30
|
+
content: [
|
|
31
|
+
// ... your other content paths
|
|
32
|
+
"./node_modules/@quarklab/rad-ui/dist/**/*.js",
|
|
33
|
+
],
|
|
34
|
+
// ... rest of your config
|
|
35
|
+
};
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Make sure you also have the necessary theme variables (colors, border radius, etc.) defined in your CSS to match the design system.
|
|
39
|
+
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
11
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
12
|
+
|
|
13
|
+
declare const buttonVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
|
|
22
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
26
|
+
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
|
|
28
|
+
declare const AspectRatio: React$1.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
|
|
30
|
+
interface KbdProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
31
|
+
}
|
|
32
|
+
declare const Kbd: React$1.ForwardRefExoticComponent<KbdProps & React$1.RefAttributes<HTMLElement>>;
|
|
33
|
+
interface KbdGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
}
|
|
35
|
+
declare const KbdGroup: React$1.ForwardRefExoticComponent<KbdGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
|
|
37
|
+
declare const badgeVariants: (props?: ({
|
|
38
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
39
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
40
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
41
|
+
}
|
|
42
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
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>>;
|
|
45
|
+
|
|
46
|
+
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const spinnerVariants: (props?: ({
|
|
49
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
50
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
+
interface SpinnerProps extends React$1.SVGProps<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
|
|
52
|
+
srText?: string;
|
|
53
|
+
}
|
|
54
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React$1.RefAttributes<SVGSVGElement>>;
|
|
55
|
+
|
|
56
|
+
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, spinnerVariants };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
|
|
11
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
12
|
+
|
|
13
|
+
declare const buttonVariants: (props?: ({
|
|
14
|
+
variant?: "default" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
15
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
17
|
+
interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
|
|
22
|
+
declare const Separator: React$1.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
|
|
24
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
declare const AvatarImage: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React$1.RefAttributes<HTMLImageElement>, "ref"> & React$1.RefAttributes<HTMLImageElement>>;
|
|
26
|
+
declare const AvatarFallback: React$1.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
27
|
+
|
|
28
|
+
declare const AspectRatio: React$1.ForwardRefExoticComponent<AspectRatioPrimitive.AspectRatioProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
|
|
30
|
+
interface KbdProps extends React$1.HTMLAttributes<HTMLElement> {
|
|
31
|
+
}
|
|
32
|
+
declare const Kbd: React$1.ForwardRefExoticComponent<KbdProps & React$1.RefAttributes<HTMLElement>>;
|
|
33
|
+
interface KbdGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
34
|
+
}
|
|
35
|
+
declare const KbdGroup: React$1.ForwardRefExoticComponent<KbdGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
|
|
37
|
+
declare const badgeVariants: (props?: ({
|
|
38
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
39
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
40
|
+
interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
41
|
+
}
|
|
42
|
+
declare function Badge({ className, variant, ...props }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
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>>;
|
|
45
|
+
|
|
46
|
+
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare const spinnerVariants: (props?: ({
|
|
49
|
+
size?: "default" | "sm" | "lg" | "xl" | null | undefined;
|
|
50
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
51
|
+
interface SpinnerProps extends React$1.SVGProps<SVGSVGElement>, VariantProps<typeof spinnerVariants> {
|
|
52
|
+
srText?: string;
|
|
53
|
+
}
|
|
54
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<Omit<SpinnerProps, "ref"> & React$1.RefAttributes<SVGSVGElement>>;
|
|
55
|
+
|
|
56
|
+
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, spinnerVariants };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";var le=Object.create;var c=Object.defineProperty;var fe=Object.getOwnPropertyDescriptor;var re=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ie=Object.prototype.hasOwnProperty;var ce=(e,a)=>{for(var t in a)c(e,t,{get:a[t],enumerable:!0})},b=(e,a,t,d)=>{if(a&&typeof a=="object"||typeof a=="function")for(let u of re(a))!ie.call(e,u)&&u!==t&&c(e,u,{get:()=>a[u],enumerable:!(d=fe(a,u))||d.enumerable});return e};var l=(e,a,t)=>(t=e!=null?le(se(e)):{},b(a||!e||!e.__esModule?c(t,"default",{value:e,enumerable:!0}):t,e)),ne=e=>b(c({},"__esModule",{value:!0}),e);var Le={};ce(Le,{AspectRatio:()=>z,Avatar:()=>g,AvatarFallback:()=>h,AvatarImage:()=>S,Badge:()=>E,Button:()=>x,Kbd:()=>P,KbdGroup:()=>w,Label:()=>D,Separator:()=>C,Skeleton:()=>J,Spinner:()=>R,badgeVariants:()=>A,buttonVariants:()=>L,cn:()=>o,spinnerVariants:()=>M});module.exports=ne(Le);var T=require("clsx"),v=require("tailwind-merge");function o(...e){return(0,v.twMerge)((0,T.clsx)(e))}var U=l(require("react")),q=require("class-variance-authority");var H=require("react/jsx-runtime"),L=(0,q.cva)("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"}}),x=U.forwardRef(({className:e,variant:a,size:t,...d},u)=>(0,H.jsx)("button",{className:o(L({variant:a,size:t,className:e})),ref:u,...d}));x.displayName="Button";var O=l(require("react")),I=l(require("@radix-ui/react-separator"));var G=require("react/jsx-runtime"),C=O.forwardRef(({className:e,orientation:a="horizontal",decorative:t=!0,...d},u)=>(0,G.jsx)(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),...d}));C.displayName=I.Root.displayName;var n=l(require("react")),f=l(require("@radix-ui/react-avatar"));var p=require("react/jsx-runtime"),g=n.forwardRef(({className:e,...a},t)=>(0,p.jsx)(f.Root,{ref:t,className:o("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...a}));g.displayName=f.Root.displayName;var S=n.forwardRef(({className:e,...a},t)=>(0,p.jsx)(f.Image,{ref:t,className:o("aspect-square h-full w-full",e),...a}));S.displayName=f.Image.displayName;var h=n.forwardRef(({className:e,...a},t)=>(0,p.jsx)(f.Fallback,{ref:t,className:o("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...a}));h.displayName=f.Fallback.displayName;var V=l(require("@radix-ui/react-aspect-ratio")),z=V.Root;var k=l(require("react"));var B=require("react/jsx-runtime"),P=k.forwardRef(({className:e,...a},t)=>(0,B.jsx)("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}));P.displayName="Kbd";var w=k.forwardRef(({className:e,...a},t)=>(0,B.jsx)("div",{ref:t,className:o("inline-flex items-center gap-1",e),...a}));w.displayName="KbdGroup";var W=require("class-variance-authority");var N=require("react/jsx-runtime"),A=(0,W.cva)("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 E({className:e,variant:a,...t}){return(0,N.jsx)("div",{className:o(A({variant:a}),e),...t})}var X=l(require("react")),F=l(require("@radix-ui/react-label")),K=require("class-variance-authority");var Z=require("react/jsx-runtime"),pe=(0,K.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=X.forwardRef(({className:e,...a},t)=>(0,Z.jsx)(F.Root,{ref:t,className:o(pe(),e),...a}));D.displayName=F.Root.displayName;var Q=require("react/jsx-runtime");function J({className:e,...a}){return(0,Q.jsx)("div",{className:o("animate-pulse rounded-md bg-muted",e),...a})}var j=l(require("react"));var s=require("react");var Y={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 me=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),$=(e,a)=>{let t=(0,s.forwardRef)(({color:d="currentColor",size:u=24,strokeWidth:y=2,absoluteStrokeWidth:ee,className:ae="",children:m,...te},oe)=>(0,s.createElement)("svg",{ref:oe,...Y,width:u,height:u,stroke:d,strokeWidth:ee?Number(y)*24/Number(u):y,className:["lucide",`lucide-${me(e)}`,ae].join(" "),...te},[...a.map(([ue,de])=>(0,s.createElement)(ue,de)),...Array.isArray(m)?m:[m]]));return t.displayName=`${e}`,t};var i=$("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"}]]);var _=require("class-variance-authority");var r=require("react/jsx-runtime"),M=(0,_.cva)("animate-spin",{variants:{size:{sm:"size-4",default:"size-6",lg:"size-8",xl:"size-12"}},defaultVariants:{size:"default"}}),R=j.forwardRef(({className:e,size:a,srText:t="Loading...",...d},u)=>(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i,{ref:u,className:o(M({size:a}),e),role:"status","aria-label":t,...d}),(0,r.jsx)("span",{className:"sr-only",children:t})]}));R.displayName="Spinner";0&&(module.exports={AspectRatio,Avatar,AvatarFallback,AvatarImage,Badge,Button,Kbd,KbdGroup,Label,Separator,Skeleton,Spinner,badgeVariants,buttonVariants,cn,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
|
+
*/
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import{clsx as E}from"clsx";import{twMerge as N}from"tailwind-merge";function o(...e){return N(E(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 S=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}));S.displayName=d.Root.displayName;var h=r.forwardRef(({className:e,...a},t)=>c(d.Image,{ref:t,className:o("aspect-square h-full w-full",e),...a}));h.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,W])=>y(z,W)),...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";export{J as AspectRatio,S as Avatar,k as AvatarFallback,h 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,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
|
+
*/
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@quarklab/rad-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"lint": "eslint . --max-warnings 0",
|
|
13
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --minify --clean"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
17
|
+
"@radix-ui/react-avatar": "^1.1.11",
|
|
18
|
+
"@radix-ui/react-label": "^2.1.8",
|
|
19
|
+
"@radix-ui/react-separator": "^1.1.8",
|
|
20
|
+
"class-variance-authority": "^0.7.1",
|
|
21
|
+
"clsx": "^2.1.0",
|
|
22
|
+
"tailwind-merge": "^2.2.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/react": "^18.2.48",
|
|
26
|
+
"@types/react-dom": "^18.2.18",
|
|
27
|
+
"@typescript-eslint/eslint-plugin": "^8.51.0",
|
|
28
|
+
"@typescript-eslint/parser": "^8.51.0",
|
|
29
|
+
"autoprefixer": "^10.4.17",
|
|
30
|
+
"eslint": "^8.57.1",
|
|
31
|
+
"postcss": "^8.4.33",
|
|
32
|
+
"tailwindcss": "^3.4.1",
|
|
33
|
+
"tailwindcss-rtl": "^0.9.0",
|
|
34
|
+
"tsup": "^8.3.6",
|
|
35
|
+
"typescript": "^5.3.3"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"react": "18.2.0",
|
|
39
|
+
"react-dom": "18.2.0"
|
|
40
|
+
}
|
|
41
|
+
}
|