tokka-ui 0.2.2 → 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/alert-dialog.d.ts +5 -1
- package/dist/alert-dialog.js +13 -1
- package/dist/avatar.d.ts +4 -1
- package/dist/avatar.js +36 -0
- package/dist/breadcrumb.js +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.js +2 -2
- package/dist/card.d.ts +3 -2
- package/dist/card.js +11 -1
- package/dist/carousel.js +1 -1
- package/dist/checkbox.js +2 -2
- package/dist/{chunk-QBAV4RWS.js → chunk-A7UVRY2Z.js} +1 -1
- package/dist/{chunk-HHN2GS4U.js → chunk-CR3N6JKY.js} +1 -1
- package/dist/{chunk-BOKKBA25.js → chunk-ETVGPIML.js} +35 -1
- package/dist/{chunk-63HUTNB3.js → chunk-UFTU4NA7.js} +2 -2
- package/dist/{chunk-DVPPDIDA.js → chunk-XWKD7TFC.js} +13 -9
- package/dist/combobox.d.ts +1 -1
- package/dist/combobox.js +9 -1
- package/dist/data-table.js +1 -1
- package/dist/date-picker.d.ts +1 -1
- package/dist/date-picker.js +11 -3
- package/dist/drawer.js +1 -1
- package/dist/dropdown-menu.d.ts +1 -0
- package/dist/dropdown-menu.js +2 -1
- package/dist/field.d.ts +9 -0
- package/dist/field.js +62 -0
- package/dist/hover-card.js +2 -2
- package/dist/input.js +2 -2
- package/dist/native-select.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/popover.d.ts +9 -1
- package/dist/popover.js +9 -1
- package/dist/progress.js +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/scroll-area.js +1 -1
- package/dist/select.js +1 -1
- package/dist/sidebar.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.js +2 -2
- package/dist/textarea.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/toggle.js +1 -1
- package/dist/tooltip.js +7 -3
- package/package.json +7 -2
- package/src/alert-dialog.tsx +12 -0
- package/src/avatar.tsx +43 -1
- package/src/breadcrumb.tsx +1 -1
- package/src/button.tsx +13 -9
- package/src/card.tsx +16 -4
- package/src/checkbox.tsx +2 -2
- package/src/drawer.tsx +1 -1
- package/src/dropdown-menu.tsx +3 -1
- package/src/field.tsx +67 -0
- package/src/hover-card.tsx +12 -10
- package/src/input.tsx +2 -2
- package/src/native-select.tsx +1 -1
- package/src/popover.tsx +38 -1
- package/src/progress.tsx +1 -1
- package/src/radio-group.tsx +1 -1
- package/src/scroll-area.tsx +1 -1
- package/src/select.tsx +1 -1
- package/src/slider.tsx +1 -1
- package/src/switch.tsx +1 -1
- package/src/table.tsx +2 -2
- package/src/tabs.tsx +2 -2
- package/src/textarea.tsx +1 -1
- package/src/toggle.tsx +1 -1
- package/src/tooltip.tsx +5 -2
package/dist/radio-group.js
CHANGED
|
@@ -24,7 +24,7 @@ var RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
|
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
26
|
className: cn(
|
|
27
|
-
"aspect-square size-4 rounded-full border border-
|
|
27
|
+
"aspect-square size-4 rounded-full border border-input text-primary ring-offset-background focus:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props,
|
package/dist/scroll-area.js
CHANGED
|
@@ -32,7 +32,7 @@ var ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...prop
|
|
|
32
32
|
className
|
|
33
33
|
),
|
|
34
34
|
...props,
|
|
35
|
-
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
35
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border hover:bg-border/80 transition-colors" })
|
|
36
36
|
}
|
|
37
37
|
));
|
|
38
38
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
package/dist/select.js
CHANGED
|
@@ -15,7 +15,7 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
15
15
|
{
|
|
16
16
|
ref,
|
|
17
17
|
className: cn(
|
|
18
|
-
"flex h-
|
|
18
|
+
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
21
|
...props,
|
package/dist/sidebar.js
CHANGED
package/dist/slider.js
CHANGED
|
@@ -17,7 +17,7 @@ var Slider = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
17
17
|
...props,
|
|
18
18
|
children: [
|
|
19
19
|
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
20
|
-
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-
|
|
20
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50" })
|
|
21
21
|
]
|
|
22
22
|
}
|
|
23
23
|
));
|
package/dist/switch.js
CHANGED
|
@@ -10,7 +10,7 @@ var Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
10
10
|
SwitchPrimitives.Root,
|
|
11
11
|
{
|
|
12
12
|
className: cn(
|
|
13
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-
|
|
13
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
14
14
|
className
|
|
15
15
|
),
|
|
16
16
|
...props,
|
package/dist/table.js
CHANGED
package/dist/tabs.js
CHANGED
|
@@ -24,7 +24,7 @@ var TabsTrigger = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
24
24
|
{
|
|
25
25
|
ref,
|
|
26
26
|
className: cn(
|
|
27
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-
|
|
27
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
28
28
|
className
|
|
29
29
|
),
|
|
30
30
|
...props
|
|
@@ -36,7 +36,7 @@ var TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
36
36
|
{
|
|
37
37
|
ref,
|
|
38
38
|
className: cn(
|
|
39
|
-
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-
|
|
39
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
40
40
|
className
|
|
41
41
|
),
|
|
42
42
|
...props
|
package/dist/textarea.js
CHANGED
|
@@ -11,7 +11,7 @@ var Textarea = React.forwardRef(
|
|
|
11
11
|
"textarea",
|
|
12
12
|
{
|
|
13
13
|
className: cn(
|
|
14
|
-
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
14
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
className
|
|
16
16
|
),
|
|
17
17
|
ref,
|
package/dist/toggle-group.js
CHANGED
package/dist/toggle.js
CHANGED
package/dist/tooltip.js
CHANGED
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
// src/tooltip.tsx
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
10
10
|
var Tooltip = TooltipPrimitive.Root;
|
|
11
11
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
12
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset =
|
|
12
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 0, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
13
13
|
TooltipPrimitive.Content,
|
|
14
14
|
{
|
|
15
15
|
ref,
|
|
@@ -18,7 +18,11 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
18
18
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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",
|
|
19
19
|
className
|
|
20
20
|
),
|
|
21
|
-
...props
|
|
21
|
+
...props,
|
|
22
|
+
children: [
|
|
23
|
+
props.children,
|
|
24
|
+
/* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "fill-border" })
|
|
25
|
+
]
|
|
22
26
|
}
|
|
23
27
|
));
|
|
24
28
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tokka-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React UI components for tokka with design token support",
|
|
6
6
|
"keywords": [
|
|
@@ -111,6 +111,10 @@
|
|
|
111
111
|
"types": "./dist/dropdown-menu.d.ts",
|
|
112
112
|
"default": "./dist/dropdown-menu.js"
|
|
113
113
|
},
|
|
114
|
+
"./field": {
|
|
115
|
+
"types": "./dist/field.d.ts",
|
|
116
|
+
"default": "./dist/field.js"
|
|
117
|
+
},
|
|
114
118
|
"./form": {
|
|
115
119
|
"types": "./dist/form.d.ts",
|
|
116
120
|
"default": "./dist/form.js"
|
|
@@ -239,7 +243,8 @@
|
|
|
239
243
|
},
|
|
240
244
|
"peerDependencies": {
|
|
241
245
|
"react": "^18.2.0 || ^19.0.0",
|
|
242
|
-
"react-dom": "^18.2.0 || ^19.0.0"
|
|
246
|
+
"react-dom": "^18.2.0 || ^19.0.0",
|
|
247
|
+
"tailwindcss-animate": "^1.0.0"
|
|
243
248
|
},
|
|
244
249
|
"dependencies": {
|
|
245
250
|
"@hookform/resolvers": "^3.3.0",
|
package/src/alert-dialog.tsx
CHANGED
|
@@ -70,6 +70,17 @@ const AlertDialogFooter = ({
|
|
|
70
70
|
)
|
|
71
71
|
AlertDialogFooter.displayName = "AlertDialogFooter"
|
|
72
72
|
|
|
73
|
+
const AlertDialogMedia = ({
|
|
74
|
+
className,
|
|
75
|
+
...props
|
|
76
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
77
|
+
<div
|
|
78
|
+
className={cn("flex items-center justify-center py-4", className)}
|
|
79
|
+
{...props}
|
|
80
|
+
/>
|
|
81
|
+
)
|
|
82
|
+
AlertDialogMedia.displayName = "AlertDialogMedia"
|
|
83
|
+
|
|
73
84
|
const AlertDialogTitle = React.forwardRef<
|
|
74
85
|
React.ElementRef<typeof AlertDialogPrimitive.Title>,
|
|
75
86
|
React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>
|
|
@@ -131,6 +142,7 @@ export {
|
|
|
131
142
|
AlertDialogContent,
|
|
132
143
|
AlertDialogHeader,
|
|
133
144
|
AlertDialogFooter,
|
|
145
|
+
AlertDialogMedia,
|
|
134
146
|
AlertDialogTitle,
|
|
135
147
|
AlertDialogDescription,
|
|
136
148
|
AlertDialogAction,
|
package/src/avatar.tsx
CHANGED
|
@@ -44,4 +44,46 @@ const AvatarFallback = React.forwardRef<
|
|
|
44
44
|
))
|
|
45
45
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
const AvatarBadge = React.forwardRef<
|
|
48
|
+
HTMLDivElement,
|
|
49
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
50
|
+
>(({ className, ...props }, ref) => (
|
|
51
|
+
<div
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(
|
|
54
|
+
"absolute bottom-0 right-0 flex size-3 items-center justify-center rounded-full border-2 border-background bg-primary",
|
|
55
|
+
className
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
/>
|
|
59
|
+
))
|
|
60
|
+
AvatarBadge.displayName = "AvatarBadge"
|
|
61
|
+
|
|
62
|
+
const AvatarGroup = React.forwardRef<
|
|
63
|
+
HTMLDivElement,
|
|
64
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
65
|
+
>(({ className, ...props }, ref) => (
|
|
66
|
+
<div
|
|
67
|
+
ref={ref}
|
|
68
|
+
className={cn("flex -space-x-4", className)}
|
|
69
|
+
{...props}
|
|
70
|
+
/>
|
|
71
|
+
))
|
|
72
|
+
AvatarGroup.displayName = "AvatarGroup"
|
|
73
|
+
|
|
74
|
+
const AvatarGroupCount = React.forwardRef<
|
|
75
|
+
HTMLDivElement,
|
|
76
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<div
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn(
|
|
81
|
+
"relative flex size-10 shrink-0 items-center justify-center rounded-full border-2 border-background bg-muted text-xs font-medium",
|
|
82
|
+
className
|
|
83
|
+
)}
|
|
84
|
+
{...props}
|
|
85
|
+
/>
|
|
86
|
+
))
|
|
87
|
+
AvatarGroupCount.displayName = "AvatarGroupCount"
|
|
88
|
+
|
|
89
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount }
|
package/src/breadcrumb.tsx
CHANGED
package/src/button.tsx
CHANGED
|
@@ -4,22 +4,26 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|
|
4
4
|
import { cn } from "./lib/utils"
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-
|
|
7
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
11
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
12
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
13
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
14
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
12
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
13
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
14
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
15
15
|
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
16
16
|
link: "text-primary underline-offset-4 hover:underline",
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
|
-
default: "h-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
default: "h-9 px-4 py-2",
|
|
20
|
+
xs: "h-7 rounded px-2 text-xs",
|
|
21
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
22
|
+
lg: "h-10 rounded-md px-8",
|
|
23
|
+
icon: "size-9",
|
|
24
|
+
"icon-xs": "size-7",
|
|
25
|
+
"icon-sm": "size-8",
|
|
26
|
+
"icon-lg": "size-10",
|
|
23
27
|
},
|
|
24
28
|
},
|
|
25
29
|
defaultVariants: {
|
package/src/card.tsx
CHANGED
|
@@ -28,10 +28,10 @@ const CardHeader = React.forwardRef<
|
|
|
28
28
|
CardHeader.displayName = "CardHeader"
|
|
29
29
|
|
|
30
30
|
const CardTitle = React.forwardRef<
|
|
31
|
-
|
|
32
|
-
React.HTMLAttributes<
|
|
31
|
+
HTMLDivElement,
|
|
32
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
33
33
|
>(({ className, ...props }, ref) => (
|
|
34
|
-
<
|
|
34
|
+
<div
|
|
35
35
|
ref={ref}
|
|
36
36
|
className={cn("text-2xl font-semibold leading-none tracking-tight", className)}
|
|
37
37
|
{...props}
|
|
@@ -71,4 +71,16 @@ const CardFooter = React.forwardRef<
|
|
|
71
71
|
))
|
|
72
72
|
CardFooter.displayName = "CardFooter"
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
const CardAction = React.forwardRef<
|
|
75
|
+
HTMLDivElement,
|
|
76
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
77
|
+
>(({ className, ...props }, ref) => (
|
|
78
|
+
<div
|
|
79
|
+
ref={ref}
|
|
80
|
+
className={cn("flex items-center gap-2", className)}
|
|
81
|
+
{...props}
|
|
82
|
+
/>
|
|
83
|
+
))
|
|
84
|
+
CardAction.displayName = "CardAction"
|
|
85
|
+
|
|
86
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, CardAction }
|
package/src/checkbox.tsx
CHANGED
|
@@ -10,7 +10,7 @@ const Checkbox = React.forwardRef<
|
|
|
10
10
|
<CheckboxPrimitive.Root
|
|
11
11
|
ref={ref}
|
|
12
12
|
className={cn(
|
|
13
|
-
"peer size-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-
|
|
13
|
+
"peer size-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:border-primary data-[state=checked]:text-primary-foreground",
|
|
14
14
|
className
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
@@ -18,7 +18,7 @@ const Checkbox = React.forwardRef<
|
|
|
18
18
|
<CheckboxPrimitive.Indicator
|
|
19
19
|
className={cn("flex items-center justify-center text-current")}
|
|
20
20
|
>
|
|
21
|
-
<Check className="size-
|
|
21
|
+
<Check className="size-3.5" />
|
|
22
22
|
</CheckboxPrimitive.Indicator>
|
|
23
23
|
</CheckboxPrimitive.Root>
|
|
24
24
|
))
|
package/src/drawer.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const DrawerOverlay = React.forwardRef<
|
|
|
25
25
|
>(({ className, ...props }, ref) => (
|
|
26
26
|
<DrawerPrimitive.Overlay
|
|
27
27
|
ref={ref}
|
|
28
|
-
className={cn("fixed inset-0 z-50 bg-black/80", className)}
|
|
28
|
+
className={cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className)}
|
|
29
29
|
{...props}
|
|
30
30
|
/>
|
|
31
31
|
))
|
package/src/dropdown-menu.tsx
CHANGED
|
@@ -75,12 +75,14 @@ const DropdownMenuItem = React.forwardRef<
|
|
|
75
75
|
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
|
|
76
76
|
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
|
|
77
77
|
inset?: boolean
|
|
78
|
+
variant?: "default" | "destructive"
|
|
78
79
|
}
|
|
79
|
-
>(({ className, inset, ...props }, ref) => (
|
|
80
|
+
>(({ className, inset, variant = "default", ...props }, ref) => (
|
|
80
81
|
<DropdownMenuPrimitive.Item
|
|
81
82
|
ref={ref}
|
|
82
83
|
className={cn(
|
|
83
84
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
85
|
+
variant === "destructive" && "text-destructive focus:text-destructive",
|
|
84
86
|
inset && "pl-8",
|
|
85
87
|
className
|
|
86
88
|
)}
|
package/src/field.tsx
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { cn } from "./lib/utils"
|
|
3
|
+
|
|
4
|
+
const Field = React.forwardRef<
|
|
5
|
+
HTMLDivElement,
|
|
6
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
7
|
+
>(({ className, ...props }, ref) => (
|
|
8
|
+
<div
|
|
9
|
+
ref={ref}
|
|
10
|
+
className={cn("space-y-2", className)}
|
|
11
|
+
{...props}
|
|
12
|
+
/>
|
|
13
|
+
))
|
|
14
|
+
Field.displayName = "Field"
|
|
15
|
+
|
|
16
|
+
const FieldLabel = React.forwardRef<
|
|
17
|
+
HTMLLabelElement,
|
|
18
|
+
React.LabelHTMLAttributes<HTMLLabelElement>
|
|
19
|
+
>(({ className, ...props }, ref) => (
|
|
20
|
+
<label
|
|
21
|
+
ref={ref}
|
|
22
|
+
className={cn(
|
|
23
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
24
|
+
className
|
|
25
|
+
)}
|
|
26
|
+
{...props}
|
|
27
|
+
/>
|
|
28
|
+
))
|
|
29
|
+
FieldLabel.displayName = "FieldLabel"
|
|
30
|
+
|
|
31
|
+
const FieldDescription = React.forwardRef<
|
|
32
|
+
HTMLParagraphElement,
|
|
33
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
34
|
+
>(({ className, ...props }, ref) => (
|
|
35
|
+
<p
|
|
36
|
+
ref={ref}
|
|
37
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
38
|
+
{...props}
|
|
39
|
+
/>
|
|
40
|
+
))
|
|
41
|
+
FieldDescription.displayName = "FieldDescription"
|
|
42
|
+
|
|
43
|
+
const FieldContent = React.forwardRef<
|
|
44
|
+
HTMLDivElement,
|
|
45
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
46
|
+
>(({ className, ...props }, ref) => (
|
|
47
|
+
<div
|
|
48
|
+
ref={ref}
|
|
49
|
+
className={cn("space-y-1", className)}
|
|
50
|
+
{...props}
|
|
51
|
+
/>
|
|
52
|
+
))
|
|
53
|
+
FieldContent.displayName = "FieldContent"
|
|
54
|
+
|
|
55
|
+
const FieldGroup = React.forwardRef<
|
|
56
|
+
HTMLDivElement,
|
|
57
|
+
React.HTMLAttributes<HTMLDivElement>
|
|
58
|
+
>(({ className, ...props }, ref) => (
|
|
59
|
+
<div
|
|
60
|
+
ref={ref}
|
|
61
|
+
className={cn("space-y-4", className)}
|
|
62
|
+
{...props}
|
|
63
|
+
/>
|
|
64
|
+
))
|
|
65
|
+
FieldGroup.displayName = "FieldGroup"
|
|
66
|
+
|
|
67
|
+
export { Field, FieldLabel, FieldDescription, FieldContent, FieldGroup }
|
package/src/hover-card.tsx
CHANGED
|
@@ -10,16 +10,18 @@ const HoverCardContent = React.forwardRef<
|
|
|
10
10
|
React.ElementRef<typeof HoverCardPrimitive.Content>,
|
|
11
11
|
React.ComponentPropsWithoutRef<typeof HoverCardPrimitive.Content>
|
|
12
12
|
>(({ className, align = "center", sideOffset = 4, ...props }, ref) => (
|
|
13
|
-
<HoverCardPrimitive.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
13
|
+
<HoverCardPrimitive.Portal>
|
|
14
|
+
<HoverCardPrimitive.Content
|
|
15
|
+
ref={ref}
|
|
16
|
+
align={align}
|
|
17
|
+
sideOffset={sideOffset}
|
|
18
|
+
className={cn(
|
|
19
|
+
"z-50 w-64 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none 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",
|
|
20
|
+
className
|
|
21
|
+
)}
|
|
22
|
+
{...props}
|
|
23
|
+
/>
|
|
24
|
+
</HoverCardPrimitive.Portal>
|
|
23
25
|
))
|
|
24
26
|
HoverCardContent.displayName = HoverCardPrimitive.Content.displayName
|
|
25
27
|
|
package/src/input.tsx
CHANGED
|
@@ -15,7 +15,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
15
15
|
<input
|
|
16
16
|
type={type}
|
|
17
17
|
className={cn(
|
|
18
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
18
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
19
19
|
icon && "pl-10",
|
|
20
20
|
trailing && "pr-10",
|
|
21
21
|
className
|
|
@@ -34,7 +34,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
|
34
34
|
<input
|
|
35
35
|
type={type}
|
|
36
36
|
className={cn(
|
|
37
|
-
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-
|
|
37
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
38
38
|
className
|
|
39
39
|
)}
|
|
40
40
|
ref={ref}
|
package/src/native-select.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const NativeSelect = React.forwardRef<HTMLSelectElement, NativeSelectProps>(
|
|
|
11
11
|
<div className="relative">
|
|
12
12
|
<select
|
|
13
13
|
className={cn(
|
|
14
|
-
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-
|
|
14
|
+
"flex h-10 w-full appearance-none items-center justify-between rounded-md border border-input bg-background px-3 py-2 pr-8 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
15
|
className
|
|
16
16
|
)}
|
|
17
17
|
ref={ref}
|
package/src/popover.tsx
CHANGED
|
@@ -6,6 +6,8 @@ const Popover = PopoverPrimitive.Root
|
|
|
6
6
|
|
|
7
7
|
const PopoverTrigger = PopoverPrimitive.Trigger
|
|
8
8
|
|
|
9
|
+
const PopoverAnchor = PopoverPrimitive.Anchor
|
|
10
|
+
|
|
9
11
|
const PopoverContent = React.forwardRef<
|
|
10
12
|
React.ElementRef<typeof PopoverPrimitive.Content>,
|
|
11
13
|
React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>
|
|
@@ -25,4 +27,39 @@ const PopoverContent = React.forwardRef<
|
|
|
25
27
|
))
|
|
26
28
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
const PopoverHeader = ({
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React.HTMLAttributes<HTMLDivElement>) => (
|
|
34
|
+
<div
|
|
35
|
+
className={cn("mb-2 border-b pb-2", className)}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
)
|
|
39
|
+
PopoverHeader.displayName = "PopoverHeader"
|
|
40
|
+
|
|
41
|
+
const PopoverTitle = React.forwardRef<
|
|
42
|
+
HTMLHeadingElement,
|
|
43
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
44
|
+
>(({ className, ...props }, ref) => (
|
|
45
|
+
<h4
|
|
46
|
+
ref={ref}
|
|
47
|
+
className={cn("font-semibold leading-none tracking-tight", className)}
|
|
48
|
+
{...props}
|
|
49
|
+
/>
|
|
50
|
+
))
|
|
51
|
+
PopoverTitle.displayName = "PopoverTitle"
|
|
52
|
+
|
|
53
|
+
const PopoverDescription = React.forwardRef<
|
|
54
|
+
HTMLParagraphElement,
|
|
55
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
56
|
+
>(({ className, ...props }, ref) => (
|
|
57
|
+
<p
|
|
58
|
+
ref={ref}
|
|
59
|
+
className={cn("text-sm text-muted-foreground", className)}
|
|
60
|
+
{...props}
|
|
61
|
+
/>
|
|
62
|
+
))
|
|
63
|
+
PopoverDescription.displayName = "PopoverDescription"
|
|
64
|
+
|
|
65
|
+
export { Popover, PopoverTrigger, PopoverAnchor, PopoverContent, PopoverHeader, PopoverTitle, PopoverDescription }
|
package/src/progress.tsx
CHANGED
package/src/radio-group.tsx
CHANGED
|
@@ -25,7 +25,7 @@ const RadioGroupItem = React.forwardRef<
|
|
|
25
25
|
<RadioGroupPrimitive.Item
|
|
26
26
|
ref={ref}
|
|
27
27
|
className={cn(
|
|
28
|
-
"aspect-square size-4 rounded-full border border-
|
|
28
|
+
"aspect-square size-4 rounded-full border border-input text-primary ring-offset-background focus:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",
|
|
29
29
|
className
|
|
30
30
|
)}
|
|
31
31
|
{...props}
|
package/src/scroll-area.tsx
CHANGED
|
@@ -37,7 +37,7 @@ const ScrollBar = React.forwardRef<
|
|
|
37
37
|
)}
|
|
38
38
|
{...props}
|
|
39
39
|
>
|
|
40
|
-
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border" />
|
|
40
|
+
<ScrollAreaPrimitive.ScrollAreaThumb className="relative flex-1 rounded-full bg-border hover:bg-border/80 transition-colors" />
|
|
41
41
|
</ScrollAreaPrimitive.ScrollAreaScrollbar>
|
|
42
42
|
))
|
|
43
43
|
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName
|
package/src/select.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const SelectTrigger = React.forwardRef<
|
|
|
16
16
|
<SelectPrimitive.Trigger
|
|
17
17
|
ref={ref}
|
|
18
18
|
className={cn(
|
|
19
|
-
"flex h-
|
|
19
|
+
"flex h-9 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-[3px] focus:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
20
20
|
className
|
|
21
21
|
)}
|
|
22
22
|
{...props}
|
package/src/slider.tsx
CHANGED
|
@@ -17,7 +17,7 @@ const Slider = React.forwardRef<
|
|
|
17
17
|
<SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
|
|
18
18
|
<SliderPrimitive.Range className="absolute h-full bg-primary" />
|
|
19
19
|
</SliderPrimitive.Track>
|
|
20
|
-
<SliderPrimitive.Thumb className="block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-
|
|
20
|
+
<SliderPrimitive.Thumb className="block size-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50" />
|
|
21
21
|
</SliderPrimitive.Root>
|
|
22
22
|
))
|
|
23
23
|
Slider.displayName = SliderPrimitive.Root.displayName
|
package/src/switch.tsx
CHANGED
|
@@ -8,7 +8,7 @@ const Switch = React.forwardRef<
|
|
|
8
8
|
>(({ className, ...props }, ref) => (
|
|
9
9
|
<SwitchPrimitives.Root
|
|
10
10
|
className={cn(
|
|
11
|
-
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-
|
|
11
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
12
12
|
className
|
|
13
13
|
)}
|
|
14
14
|
{...props}
|
package/src/table.tsx
CHANGED
|
@@ -72,7 +72,7 @@ const TableHead = React.forwardRef<
|
|
|
72
72
|
<th
|
|
73
73
|
ref={ref}
|
|
74
74
|
className={cn(
|
|
75
|
-
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
75
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&:first-child]:rounded-tl-md [&:last-child]:rounded-tr-md",
|
|
76
76
|
className
|
|
77
77
|
)}
|
|
78
78
|
{...props}
|
|
@@ -86,7 +86,7 @@ const TableCell = React.forwardRef<
|
|
|
86
86
|
>(({ className, ...props }, ref) => (
|
|
87
87
|
<td
|
|
88
88
|
ref={ref}
|
|
89
|
-
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className)}
|
|
89
|
+
className={cn("p-4 align-middle [&:has([role=checkbox])]:pr-0 [&:first-child]:rounded-bl-md [&:last-child]:rounded-br-md", className)}
|
|
90
90
|
{...props}
|
|
91
91
|
/>
|
|
92
92
|
))
|