@cyberbloxai/ui-kit 0.2.1 → 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.
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +118 -104
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -4
- package/src/cli.js +3 -0
- package/src/components/ui/badge.tsx +13 -5
- package/src/components/ui/button.tsx +10 -9
- package/src/components/ui/card.tsx +8 -1
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/select.tsx +2 -2
- package/src/components/ui/switch.tsx +2 -2
- package/src/components/ui/tabs.tsx +2 -2
- package/src/components/ui/textarea.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyberbloxai/ui-kit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Production-ready UI component library built on Radix UI + Tailwind CSS. Supports shadcn-style component installation.",
|
|
5
|
-
"bin":
|
|
6
|
-
"cyberblox": "./src/cli.js"
|
|
7
|
-
},
|
|
5
|
+
"bin": "./src/cli.js",
|
|
8
6
|
"repository": {
|
|
9
7
|
"type": "git",
|
|
10
8
|
"url": "git+https://github.com/abhishekjohn1507/uni-kit-forge.git"
|
package/src/cli.js
CHANGED
|
@@ -4,14 +4,22 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
6
|
const badgeVariants = cva(
|
|
7
|
-
"inline-flex items-center rounded-full border px-
|
|
7
|
+
"inline-flex items-center rounded-full border px-3 py-0.5 text-xs font-semibold transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
default:
|
|
12
|
+
"border-transparent bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",
|
|
13
|
+
secondary:
|
|
14
|
+
"border-transparent bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
15
|
+
destructive:
|
|
16
|
+
"border-transparent bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/80",
|
|
17
|
+
outline: "text-foreground border-border hover:bg-accent hover:text-accent-foreground",
|
|
18
|
+
success:
|
|
19
|
+
"border-transparent bg-emerald-500 text-white shadow-sm hover:bg-emerald-600",
|
|
20
|
+
warning:
|
|
21
|
+
"border-transparent bg-amber-500 text-white shadow-sm hover:bg-amber-600",
|
|
22
|
+
info: "border-transparent bg-blue-500 text-white shadow-sm hover:bg-blue-600",
|
|
15
23
|
},
|
|
16
24
|
},
|
|
17
25
|
defaultVariants: {
|
|
@@ -5,22 +5,23 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
5
5
|
import { cn } from "@/lib/utils";
|
|
6
6
|
|
|
7
7
|
const buttonVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
8
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-semibold ring-offset-background transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 active:scale-[0.98]",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
14
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
15
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
12
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow-md",
|
|
13
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90 hover:shadow-md",
|
|
14
|
+
outline: "border-2 border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground hover:border-accent",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80 hover:shadow-md",
|
|
16
16
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
17
|
link: "text-primary underline-offset-4 hover:underline",
|
|
18
|
+
shiny: "bg-primary text-primary-foreground shadow-lg hover:shadow-primary/20 hover:-translate-y-0.5 relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-white/20 before:to-transparent before:translate-x-[-100%] hover:before:translate-x-[100%] before:transition-transform before:duration-700",
|
|
18
19
|
},
|
|
19
20
|
size: {
|
|
20
|
-
default: "h-
|
|
21
|
-
sm: "h-9 rounded-md px-
|
|
22
|
-
lg: "h-
|
|
23
|
-
icon: "h-
|
|
21
|
+
default: "h-11 px-6 py-2.5",
|
|
22
|
+
sm: "h-9 rounded-md px-4 text-xs",
|
|
23
|
+
lg: "h-13 rounded-xl px-10 text-base",
|
|
24
|
+
icon: "h-11 w-11",
|
|
24
25
|
},
|
|
25
26
|
},
|
|
26
27
|
defaultVariants: {
|
|
@@ -3,7 +3,14 @@ import * as React from "react";
|
|
|
3
3
|
import { cn } from "@/lib/utils";
|
|
4
4
|
|
|
5
5
|
const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
|
|
6
|
-
<div
|
|
6
|
+
<div
|
|
7
|
+
ref={ref}
|
|
8
|
+
className={cn(
|
|
9
|
+
"rounded-xl border bg-card text-card-foreground shadow-sm transition-all duration-200 hover:shadow-md",
|
|
10
|
+
className,
|
|
11
|
+
)}
|
|
12
|
+
{...props}
|
|
13
|
+
/>
|
|
7
14
|
));
|
|
8
15
|
Card.displayName = "Card";
|
|
9
16
|
|
|
@@ -11,7 +11,7 @@ const Checkbox = React.forwardRef<
|
|
|
11
11
|
<CheckboxPrimitive.Root
|
|
12
12
|
ref={ref}
|
|
13
13
|
className={cn(
|
|
14
|
-
"peer h-4 w-4 shrink-0 rounded
|
|
14
|
+
"peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background transition-all duration-200 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
className,
|
|
16
16
|
)}
|
|
17
17
|
{...props}
|
|
@@ -36,7 +36,7 @@ const DialogContent = React.forwardRef<
|
|
|
36
36
|
<DialogPrimitive.Content
|
|
37
37
|
ref={ref}
|
|
38
38
|
className={cn(
|
|
39
|
-
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-
|
|
39
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-xl duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-xl",
|
|
40
40
|
className,
|
|
41
41
|
)}
|
|
42
42
|
{...props}
|
|
@@ -8,7 +8,7 @@ const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
|
|
|
8
8
|
<input
|
|
9
9
|
type={type}
|
|
10
10
|
className={cn(
|
|
11
|
-
"flex h-
|
|
11
|
+
"flex h-11 w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground hover:border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
12
|
className,
|
|
13
13
|
)}
|
|
14
14
|
ref={ref}
|
|
@@ -17,7 +17,7 @@ const PopoverContent = React.forwardRef<
|
|
|
17
17
|
align={align}
|
|
18
18
|
sideOffset={sideOffset}
|
|
19
19
|
className={cn(
|
|
20
|
-
"z-50 w-72 rounded-
|
|
20
|
+
"z-50 w-72 rounded-xl border bg-popover p-4 text-popover-foreground shadow-xl outline-none duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
21
21
|
className,
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
@@ -17,7 +17,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
17
17
|
<SelectPrimitive.Trigger
|
|
18
18
|
ref={ref}
|
|
19
19
|
className={cn(
|
|
20
|
-
"flex h-
|
|
20
|
+
"flex h-11 w-full items-center justify-between rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 placeholder:text-muted-foreground hover:border-accent focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
21
21
|
className,
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|
|
@@ -66,7 +66,7 @@ const SelectContent = React.forwardRef<
|
|
|
66
66
|
<SelectPrimitive.Content
|
|
67
67
|
ref={ref}
|
|
68
68
|
className={cn(
|
|
69
|
-
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-
|
|
69
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border bg-popover text-popover-foreground shadow-xl data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
70
70
|
position === "popper" &&
|
|
71
71
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
72
72
|
className,
|
|
@@ -9,7 +9,7 @@ const Switch = React.forwardRef<
|
|
|
9
9
|
>(({ className, ...props }, ref) => (
|
|
10
10
|
<SwitchPrimitives.Root
|
|
11
11
|
className={cn(
|
|
12
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-
|
|
12
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-all duration-300 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -17,7 +17,7 @@ const Switch = React.forwardRef<
|
|
|
17
17
|
>
|
|
18
18
|
<SwitchPrimitives.Thumb
|
|
19
19
|
className={cn(
|
|
20
|
-
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
20
|
+
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform duration-300 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
|
21
21
|
)}
|
|
22
22
|
/>
|
|
23
23
|
</SwitchPrimitives.Root>
|
|
@@ -12,7 +12,7 @@ const TabsList = React.forwardRef<
|
|
|
12
12
|
<TabsPrimitive.List
|
|
13
13
|
ref={ref}
|
|
14
14
|
className={cn(
|
|
15
|
-
"inline-flex h-
|
|
15
|
+
"inline-flex h-11 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",
|
|
16
16
|
className,
|
|
17
17
|
)}
|
|
18
18
|
{...props}
|
|
@@ -27,7 +27,7 @@ const TabsTrigger = React.forwardRef<
|
|
|
27
27
|
<TabsPrimitive.Trigger
|
|
28
28
|
ref={ref}
|
|
29
29
|
className={cn(
|
|
30
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-
|
|
30
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1.5 text-sm font-medium ring-offset-background transition-all duration-200 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
|
|
31
31
|
className,
|
|
32
32
|
)}
|
|
33
33
|
{...props}
|
|
@@ -8,7 +8,7 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(({ classNa
|
|
|
8
8
|
return (
|
|
9
9
|
<textarea
|
|
10
10
|
className={cn(
|
|
11
|
-
"flex min-h-[80px] w-full rounded-
|
|
11
|
+
"flex min-h-[80px] w-full rounded-lg border border-input bg-background px-3 py-2 text-sm ring-offset-background transition-all duration-200 placeholder:text-muted-foreground hover:border-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
12
12
|
className,
|
|
13
13
|
)}
|
|
14
14
|
ref={ref}
|