@moontra/moonui 2.1.9 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1656 -0
- package/dist/index.d.ts +1656 -0
- package/dist/index.js +1847 -469
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1679 -471
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert.tsx +123 -93
- package/src/components/ui/aspect-ratio.tsx +1 -1
- package/src/components/ui/avatar.tsx +8 -6
- package/src/components/ui/badge.tsx +20 -18
- package/src/components/ui/breadcrumb.tsx +12 -10
- package/src/components/ui/button.stories.tsx +4 -2
- package/src/components/ui/button.tsx +71 -68
- package/src/components/ui/calendar.tsx +2 -2
- package/src/components/ui/card-input.tsx +231 -0
- package/src/components/ui/card.stories.tsx +2 -0
- package/src/components/ui/card.tsx +9 -7
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/collapsible.tsx +3 -3
- package/src/components/ui/color-picker.tsx +2 -2
- package/src/components/ui/command.tsx +4 -4
- package/src/components/ui/data-table.stories.tsx +4 -2
- package/src/components/ui/data-table.tsx +8 -8
- package/src/components/ui/date-picker.stories.tsx +2 -0
- package/src/components/ui/date-picker.tsx +25 -15
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/draggable-list.tsx +3 -1
- package/src/components/ui/dropdown-menu.tsx +2 -2
- package/src/components/ui/file-upload.tsx +2 -2
- package/src/components/ui/github-stars.tsx +1 -1
- package/src/components/ui/index.ts +357 -45
- package/src/components/ui/input.stories.tsx +2 -0
- package/src/components/ui/input.tsx +3 -1
- package/src/components/ui/locked-component.tsx +222 -0
- package/src/components/ui/moon-logo.tsx +1 -1
- package/src/components/ui/pagination.tsx +10 -8
- package/src/components/ui/phone-input.tsx +172 -0
- package/src/components/ui/popover-pro.tsx +424 -0
- package/src/components/ui/popover.tsx +3 -3
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/rich-text-editor/index.tsx +2 -1
- package/src/components/ui/scroll-area.tsx +48 -0
- package/src/components/ui/select.tsx +7 -3
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/skeleton.tsx +19 -7
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/swipeable-card.tsx +2 -0
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +7 -5
- package/src/components/ui/tabs.tsx +6 -1
- package/src/components/ui/tags-input.tsx +130 -0
- package/src/components/ui/textarea.tsx +3 -1
- package/src/components/ui/toast.tsx +5 -3
- package/src/components/ui/toggle.tsx +2 -3
- package/src/components/ui/tooltip.tsx +2 -5
- package/src/index.tsx +4 -46
- package/src/lib/micro-interactions.ts +2 -1
- package/src/lib/performance-profiler.ts +79 -0
- package/src/styles/index.css +315 -2
- package/src/use-performance-optimizer.ts +26 -26
- package/src/use-scroll-animation.ts +5 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Premium React component library with modern design and customization",
|
|
5
5
|
"author": "MoonUI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"radix-ui"
|
|
45
45
|
],
|
|
46
46
|
"scripts": {
|
|
47
|
-
"dev": "tsup src/index.tsx --format esm,cjs --dts --watch",
|
|
48
|
-
"build": "npm run build:js",
|
|
47
|
+
"dev": "tsup src/index.tsx --format esm,cjs --dts --watch --sourcemap",
|
|
48
|
+
"build": "npm run build:js && npm run build:dts && node scripts/postbuild.js",
|
|
49
49
|
"build:js": "tsup src/index.tsx --format esm,cjs",
|
|
50
|
-
"build:dts": "tsup src/index.tsx --format esm,cjs --dts",
|
|
50
|
+
"build:dts": "tsup src/index.tsx --format esm,cjs --dts-only",
|
|
51
51
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --fix",
|
|
52
52
|
"clean": "rm -rf dist",
|
|
53
53
|
"prepublishOnly": "npm run clean && npm run build",
|
|
@@ -14,7 +14,7 @@ const AccordionItem = React.forwardRef<
|
|
|
14
14
|
>(({ className, ...props }, ref) => (
|
|
15
15
|
<AccordionPrimitive.Item
|
|
16
16
|
ref={ref}
|
|
17
|
-
className={cn("border-b border-gray-200 dark:border-gray-800", className)}
|
|
17
|
+
className={cn("moonui-theme", "border-b border-gray-200 dark:border-gray-800", className)}
|
|
18
18
|
{...props}
|
|
19
19
|
/>
|
|
20
20
|
))
|
|
@@ -14,116 +14,146 @@ import { cn } from "../../lib/utils";
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
const alertVariants = cva(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
17
|
+
"relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
default: "bg-background text-foreground border-border",
|
|
22
|
+
primary: "bg-primary/10 text-primary border-primary/30",
|
|
23
|
+
success: "bg-success/10 text-success border-success/30",
|
|
24
|
+
warning: "bg-warning/10 text-warning border-warning/30",
|
|
25
|
+
error: "bg-destructive/10 text-destructive border-destructive/30",
|
|
26
|
+
info: "bg-blue-500/10 text-blue-500 border-blue-500/30",
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
sm: "py-2 text-xs",
|
|
30
|
+
default: "py-3 text-sm",
|
|
31
|
+
lg: "py-4 text-base",
|
|
32
|
+
},
|
|
33
|
+
radius: {
|
|
34
|
+
none: "rounded-none",
|
|
35
|
+
sm: "rounded-sm",
|
|
36
|
+
default: "rounded-md",
|
|
37
|
+
lg: "rounded-lg",
|
|
38
|
+
full: "rounded-full",
|
|
39
|
+
},
|
|
40
|
+
withClose: {
|
|
41
|
+
true: "pr-10",
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
variant: "default",
|
|
46
|
+
size: "default",
|
|
47
|
+
radius: "default",
|
|
48
|
+
withClose: false,
|
|
49
|
+
},
|
|
50
|
+
}
|
|
51
51
|
);
|
|
52
52
|
|
|
53
53
|
export interface AlertProps
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
54
|
+
extends React.HTMLAttributes<HTMLDivElement>,
|
|
55
|
+
VariantProps<typeof alertVariants> {
|
|
56
|
+
/** Alert ikonunu gizler */
|
|
57
|
+
hideIcon?: boolean;
|
|
58
|
+
/** Kapatma butonu ekler */
|
|
59
|
+
closable?: boolean;
|
|
60
|
+
/** Kapatma butonu tıklandığında çalışacak fonksiyon */
|
|
61
|
+
onClose?: () => void;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
65
|
+
(
|
|
66
|
+
{
|
|
67
|
+
className,
|
|
68
|
+
variant = "default",
|
|
69
|
+
size,
|
|
70
|
+
radius,
|
|
71
|
+
hideIcon = false,
|
|
72
|
+
closable = false,
|
|
73
|
+
onClose,
|
|
74
|
+
children,
|
|
75
|
+
...props
|
|
76
|
+
},
|
|
77
|
+
ref
|
|
78
|
+
) => {
|
|
79
|
+
// Alert türüne göre ikon belirleme
|
|
80
|
+
const Icon = React.useMemo(() => {
|
|
81
|
+
switch (variant) {
|
|
82
|
+
case "success":
|
|
83
|
+
return Check;
|
|
84
|
+
case "warning":
|
|
85
|
+
return AlertTriangle;
|
|
86
|
+
case "error":
|
|
87
|
+
return AlertCircle;
|
|
88
|
+
case "info":
|
|
89
|
+
return Info;
|
|
90
|
+
default:
|
|
91
|
+
return Info;
|
|
92
|
+
}
|
|
93
|
+
}, [variant]);
|
|
81
94
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
return (
|
|
96
|
+
<div
|
|
97
|
+
ref={ref}
|
|
98
|
+
role="alert"
|
|
99
|
+
className={cn(
|
|
100
|
+
"moonui-theme",
|
|
101
|
+
alertVariants({
|
|
102
|
+
variant,
|
|
103
|
+
size,
|
|
104
|
+
radius,
|
|
105
|
+
withClose: closable,
|
|
106
|
+
}),
|
|
107
|
+
className
|
|
108
|
+
)}
|
|
109
|
+
{...props}
|
|
110
|
+
>
|
|
111
|
+
{!hideIcon && <Icon className="h-5 w-5" />}
|
|
112
|
+
<div className="flex-1">{children}</div>
|
|
113
|
+
{closable && onClose && (
|
|
114
|
+
<button
|
|
115
|
+
onClick={onClose}
|
|
116
|
+
className="absolute right-3 top-3 inline-flex h-6 w-6 items-center justify-center rounded-full opacity-70 transition-opacity hover:opacity-100"
|
|
117
|
+
aria-label="Kapat"
|
|
118
|
+
>
|
|
119
|
+
<X className="h-4 w-4" />
|
|
120
|
+
</button>
|
|
121
|
+
)}
|
|
122
|
+
</div>
|
|
123
|
+
);
|
|
124
|
+
}
|
|
103
125
|
);
|
|
104
126
|
Alert.displayName = "Alert";
|
|
105
127
|
|
|
106
128
|
const AlertTitle = React.forwardRef<
|
|
107
|
-
|
|
108
|
-
|
|
129
|
+
HTMLParagraphElement,
|
|
130
|
+
React.HTMLAttributes<HTMLHeadingElement>
|
|
109
131
|
>(({ className, ...props }, ref) => (
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
132
|
+
<h5
|
|
133
|
+
ref={ref}
|
|
134
|
+
className={cn(
|
|
135
|
+
"moonui-theme",
|
|
136
|
+
"font-semibold leading-tight tracking-tight mb-1",
|
|
137
|
+
className
|
|
138
|
+
)}
|
|
139
|
+
{...props}
|
|
140
|
+
/>
|
|
115
141
|
));
|
|
116
142
|
AlertTitle.displayName = "AlertTitle";
|
|
117
143
|
|
|
118
144
|
const AlertDescription = React.forwardRef<
|
|
119
|
-
|
|
120
|
-
|
|
145
|
+
HTMLParagraphElement,
|
|
146
|
+
React.HTMLAttributes<HTMLParagraphElement>
|
|
121
147
|
>(({ className, ...props }, ref) => (
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
148
|
+
<div
|
|
149
|
+
ref={ref}
|
|
150
|
+
className={cn(
|
|
151
|
+
"moonui-theme",
|
|
152
|
+
"text-sm leading-5 text-muted-foreground",
|
|
153
|
+
className
|
|
154
|
+
)}
|
|
155
|
+
{...props}
|
|
156
|
+
/>
|
|
127
157
|
));
|
|
128
158
|
AlertDescription.displayName = "AlertDescription";
|
|
129
159
|
|
|
@@ -53,7 +53,7 @@ const AspectRatio = React.forwardRef<
|
|
|
53
53
|
>(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => (
|
|
54
54
|
<div
|
|
55
55
|
ref={ref}
|
|
56
|
-
className={cn(aspectRatioVariants({ variant, radius }), className)}
|
|
56
|
+
className={cn("moonui-theme", aspectRatioVariants({ variant, radius }), className)}
|
|
57
57
|
style={{
|
|
58
58
|
position: "relative",
|
|
59
59
|
paddingBottom: `${(1 / ratio) * 100}%`,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
3
5
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
@@ -26,9 +28,9 @@ const avatarVariants = cva(
|
|
|
26
28
|
},
|
|
27
29
|
variant: {
|
|
28
30
|
default: "",
|
|
29
|
-
ring: "ring-2 ring-
|
|
30
|
-
ringOffset: "ring-2 ring-
|
|
31
|
-
border: "border-2 border-
|
|
31
|
+
ring: "ring-2 ring-border",
|
|
32
|
+
ringOffset: "ring-2 ring-border ring-offset-2 ring-offset-background",
|
|
33
|
+
border: "border-2 border-border"
|
|
32
34
|
}
|
|
33
35
|
},
|
|
34
36
|
defaultVariants: {
|
|
@@ -49,7 +51,7 @@ const Avatar = React.forwardRef<
|
|
|
49
51
|
>(({ className, size, radius, variant, ...props }, ref) => (
|
|
50
52
|
<AvatarPrimitive.Root
|
|
51
53
|
ref={ref}
|
|
52
|
-
className={cn(avatarVariants({ size, radius, variant }), className)}
|
|
54
|
+
className={cn("moonui-theme", avatarVariants({ size, radius, variant }), className)}
|
|
53
55
|
{...props}
|
|
54
56
|
/>
|
|
55
57
|
));
|
|
@@ -61,7 +63,7 @@ const AvatarImage = React.forwardRef<
|
|
|
61
63
|
>(({ className, ...props }, ref) => (
|
|
62
64
|
<AvatarPrimitive.Image
|
|
63
65
|
ref={ref}
|
|
64
|
-
className={cn("aspect-square h-full w-full", className)}
|
|
66
|
+
className={cn("moonui-theme", "aspect-square h-full w-full", className)}
|
|
65
67
|
{...props}
|
|
66
68
|
/>
|
|
67
69
|
));
|
|
@@ -97,7 +99,7 @@ const AvatarGroup = React.forwardRef<HTMLDivElement, AvatarGroupProps>(
|
|
|
97
99
|
return (
|
|
98
100
|
<div
|
|
99
101
|
ref={ref}
|
|
100
|
-
className={cn("flex items-center", className)}
|
|
102
|
+
className={cn("moonui-theme", "flex items-center", className)}
|
|
101
103
|
{...props}
|
|
102
104
|
>
|
|
103
105
|
<div className="flex">
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
5
|
import { cn } from "../../lib/utils";
|
|
@@ -10,7 +12,7 @@ import { cn } from "../../lib/utils";
|
|
|
10
12
|
*/
|
|
11
13
|
|
|
12
14
|
const badgeVariants = cva(
|
|
13
|
-
["inline-flex items-center gap-1.5",
|
|
15
|
+
["inline-flex items-center justify-center gap-1.5",
|
|
14
16
|
"font-medium transition-colors duration-200",
|
|
15
17
|
"border focus:outline-none",
|
|
16
18
|
"focus-visible:ring-2 focus-visible:ring-offset-1"],
|
|
@@ -18,23 +20,23 @@ const badgeVariants = cva(
|
|
|
18
20
|
variants: {
|
|
19
21
|
variant: {
|
|
20
22
|
primary: [
|
|
21
|
-
"border-transparent bg-
|
|
22
|
-
"hover:bg-
|
|
23
|
-
"focus-visible:ring-
|
|
24
|
-
"dark:bg-
|
|
23
|
+
"border-transparent bg-gray-900 text-white",
|
|
24
|
+
"hover:bg-gray-800 dark:hover:bg-gray-700",
|
|
25
|
+
"focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40",
|
|
26
|
+
"dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10",
|
|
25
27
|
],
|
|
26
28
|
secondary: [
|
|
27
29
|
"border-transparent bg-secondary text-secondary-foreground",
|
|
28
|
-
"hover:bg-gray-200 dark:hover:bg-gray-
|
|
30
|
+
"hover:bg-gray-200 dark:hover:bg-gray-600",
|
|
29
31
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
30
|
-
"dark:bg-gray-
|
|
32
|
+
"dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10",
|
|
31
33
|
],
|
|
32
34
|
outline: [
|
|
33
|
-
"border-gray-200 dark:border-gray-
|
|
35
|
+
"border-gray-200 dark:border-gray-600",
|
|
34
36
|
"bg-transparent text-foreground",
|
|
35
|
-
"hover:border-gray-300 dark:hover:border-gray-
|
|
37
|
+
"hover:border-gray-300 dark:hover:border-gray-500",
|
|
36
38
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
37
|
-
"dark:text-gray-
|
|
39
|
+
"dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm",
|
|
38
40
|
],
|
|
39
41
|
destructive: [
|
|
40
42
|
"border-transparent bg-error text-white",
|
|
@@ -55,11 +57,11 @@ const badgeVariants = cva(
|
|
|
55
57
|
"dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10",
|
|
56
58
|
],
|
|
57
59
|
ghost: [
|
|
58
|
-
"border-
|
|
59
|
-
"hover:bg-gray-100 dark:hover:bg-gray-800/
|
|
60
|
+
"border border-gray-200 bg-gray-50/50 text-gray-700",
|
|
61
|
+
"hover:bg-gray-100 dark:hover:bg-gray-800/60",
|
|
60
62
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
61
|
-
"dark:
|
|
62
|
-
"transition-
|
|
63
|
+
"dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300",
|
|
64
|
+
"transition-all duration-200",
|
|
63
65
|
],
|
|
64
66
|
pro: [
|
|
65
67
|
"border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
@@ -162,7 +164,7 @@ function Badge({
|
|
|
162
164
|
|
|
163
165
|
return (
|
|
164
166
|
<div
|
|
165
|
-
className={cn(badgeVariants({ variant, size, radius }), className)}
|
|
167
|
+
className={cn("moonui-theme", badgeVariants({ variant, size, radius }), className)}
|
|
166
168
|
data-removable={removable ? "" : undefined}
|
|
167
169
|
{...props}
|
|
168
170
|
>
|
|
@@ -185,13 +187,13 @@ function Badge({
|
|
|
185
187
|
/>
|
|
186
188
|
)}
|
|
187
189
|
{autoLeftIcon && (
|
|
188
|
-
<span className="inline-flex shrink-0">
|
|
190
|
+
<span className="inline-flex shrink-0 items-center">
|
|
189
191
|
{autoLeftIcon}
|
|
190
192
|
</span>
|
|
191
193
|
)}
|
|
192
|
-
<span className="
|
|
194
|
+
<span className="inline-flex items-center">{autoChildren}</span>
|
|
193
195
|
{rightIcon && (
|
|
194
|
-
<span className="inline-flex shrink-0">
|
|
196
|
+
<span className="inline-flex shrink-0 items-center">
|
|
195
197
|
{rightIcon}
|
|
196
198
|
</span>
|
|
197
199
|
)}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import * as React from "react";
|
|
2
4
|
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
3
5
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
@@ -9,9 +11,9 @@ const breadcrumbVariants = cva(
|
|
|
9
11
|
{
|
|
10
12
|
variants: {
|
|
11
13
|
variant: {
|
|
12
|
-
default: "
|
|
13
|
-
muted: "text-muted-foreground
|
|
14
|
-
ghost: "text-foreground/60
|
|
14
|
+
default: "text-foreground transition-colors",
|
|
15
|
+
muted: "text-muted-foreground transition-colors",
|
|
16
|
+
ghost: "text-foreground/60 transition-colors",
|
|
15
17
|
},
|
|
16
18
|
size: {
|
|
17
19
|
default: "text-sm",
|
|
@@ -58,7 +60,7 @@ const Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(
|
|
|
58
60
|
({ className, variant, size, ...props }, ref) => (
|
|
59
61
|
<nav
|
|
60
62
|
ref={ref}
|
|
61
|
-
className={cn(breadcrumbVariants({ variant, size }), className)}
|
|
63
|
+
className={cn("moonui-theme", breadcrumbVariants({ variant, size }), className)}
|
|
62
64
|
aria-label="breadcrumb"
|
|
63
65
|
{...props}
|
|
64
66
|
/>
|
|
@@ -114,7 +116,7 @@ const BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
|
|
|
114
116
|
return (
|
|
115
117
|
<li
|
|
116
118
|
ref={ref}
|
|
117
|
-
className={cn("inline-flex items-center gap-1.5", className)}
|
|
119
|
+
className={cn("moonui-theme", "inline-flex items-center gap-1.5", className)}
|
|
118
120
|
aria-current={isCurrent ? "page" : undefined}
|
|
119
121
|
{...props}
|
|
120
122
|
>
|
|
@@ -122,8 +124,8 @@ const BreadcrumbItem = React.forwardRef<HTMLLIElement, BreadcrumbItemProps>(
|
|
|
122
124
|
className={cn(
|
|
123
125
|
"transition-colors duration-200 hover:text-foreground",
|
|
124
126
|
isCurrent
|
|
125
|
-
? "font-medium text-foreground
|
|
126
|
-
: "text-muted-foreground hover:text-foreground
|
|
127
|
+
? "font-medium text-foreground"
|
|
128
|
+
: "text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"
|
|
127
129
|
)}
|
|
128
130
|
{...itemProps}
|
|
129
131
|
>
|
|
@@ -143,7 +145,7 @@ const BreadcrumbSeparator = ({
|
|
|
143
145
|
<span
|
|
144
146
|
role="presentation"
|
|
145
147
|
aria-hidden="true"
|
|
146
|
-
className={cn("text-muted-foreground
|
|
148
|
+
className={cn("moonui-theme", "text-muted-foreground opacity-70", className)}
|
|
147
149
|
{...props}
|
|
148
150
|
>
|
|
149
151
|
{children || <ChevronRight className="h-3.5 w-3.5" />}
|
|
@@ -158,7 +160,7 @@ const BreadcrumbEllipsis = ({
|
|
|
158
160
|
<span
|
|
159
161
|
role="presentation"
|
|
160
162
|
aria-hidden="true"
|
|
161
|
-
className={cn("flex items-center text-muted-foreground
|
|
163
|
+
className={cn("moonui-theme", "flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200", className)}
|
|
162
164
|
{...props}
|
|
163
165
|
>
|
|
164
166
|
<MoreHorizontal className="h-4 w-4" />
|
|
@@ -173,7 +175,7 @@ const BreadcrumbLink = React.forwardRef<HTMLAnchorElement, React.AnchorHTMLAttri
|
|
|
173
175
|
ref={ref}
|
|
174
176
|
href={href}
|
|
175
177
|
className={cn(
|
|
176
|
-
"transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-
|
|
178
|
+
"transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",
|
|
177
179
|
className
|
|
178
180
|
)}
|
|
179
181
|
{...props}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
1
3
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
4
|
import { Button } from './button';
|
|
3
5
|
import { Mail, Plus, Loader2 } from 'lucide-react';
|
|
@@ -135,7 +137,7 @@ export const AllVariants: Story = {
|
|
|
135
137
|
render: () => (
|
|
136
138
|
<div className="flex flex-col gap-4">
|
|
137
139
|
<div className="flex flex-wrap gap-2">
|
|
138
|
-
<Button variant="
|
|
140
|
+
<Button variant="primary">Default</Button>
|
|
139
141
|
<Button variant="secondary">Secondary</Button>
|
|
140
142
|
<Button variant="destructive">Destructive</Button>
|
|
141
143
|
<Button variant="outline">Outline</Button>
|
|
@@ -144,7 +146,7 @@ export const AllVariants: Story = {
|
|
|
144
146
|
</div>
|
|
145
147
|
<div className="flex flex-wrap gap-2">
|
|
146
148
|
<Button size="sm">Small</Button>
|
|
147
|
-
<Button size="
|
|
149
|
+
<Button size="md">Default</Button>
|
|
148
150
|
<Button size="lg">Large</Button>
|
|
149
151
|
<Button size="icon">
|
|
150
152
|
<Plus className="h-4 w-4" />
|