@hanzo/ui 5.3.35 → 5.3.36
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/bin/create-registry.js +0 -0
- package/bin/npx-registry-mcp.js +0 -0
- package/bin/registry-mcp-wrapper.sh +0 -0
- package/bin/registry-mcp.js +0 -0
- package/bin/start-mcp-server.sh +0 -0
- package/bin/test-mcp.sh +0 -0
- package/dist/3d/button.js +1 -297
- package/dist/3d/button.mjs +1 -272
- package/dist/3d/card.js +1 -233
- package/dist/3d/card.mjs +1 -206
- package/dist/3d/carousel.js +1 -370
- package/dist/3d/carousel.mjs +1 -343
- package/dist/3d/grid.js +1 -361
- package/dist/3d/grid.mjs +1 -336
- package/dist/3d/index.js +1 -1517
- package/dist/3d/index.mjs +1 -1471
- package/dist/3d/marquee.js +1 -351
- package/dist/3d/marquee.mjs +1 -326
- package/dist/3d/pin.js +1 -45
- package/dist/3d/pin.mjs +1 -23
- package/dist/accordion.js +1 -79
- package/dist/accordion.mjs +1 -54
- package/dist/alert-dialog.js +1 -224
- package/dist/alert-dialog.mjs +1 -191
- package/dist/alert.js +1 -97
- package/dist/alert.mjs +1 -91
- package/dist/animation/animated-background.js +1 -423
- package/dist/animation/animated-background.mjs +1 -417
- package/dist/animation/animated-beam.js +1 -118
- package/dist/animation/animated-beam.mjs +1 -96
- package/dist/animation/animated-cursor.js +1 -274
- package/dist/animation/animated-cursor.mjs +1 -269
- package/dist/animation/animated-icon.js +2 -356
- package/dist/animation/animated-icon.mjs +2 -350
- package/dist/animation/animated-list.js +1 -338
- package/dist/animation/animated-list.mjs +1 -332
- package/dist/animation/animated-number.js +1 -282
- package/dist/animation/animated-number.mjs +1 -276
- package/dist/animation/animated-testimonials.js +1 -96
- package/dist/animation/animated-testimonials.mjs +1 -74
- package/dist/animation/animated-tooltip.js +1 -66
- package/dist/animation/animated-tooltip.mjs +1 -44
- package/dist/animation/apple-cards-carousel.js +1 -307
- package/dist/animation/apple-cards-carousel.mjs +1 -284
- package/dist/animation/apple-hello-effect.js +1 -59
- package/dist/animation/apple-hello-effect.mjs +1 -37
- package/dist/animation/index.js +2 -1951
- package/dist/animation/index.mjs +2 -1920
- package/dist/avatar.js +1 -70
- package/dist/avatar.mjs +1 -46
- package/dist/badge.js +1 -60
- package/dist/badge.mjs +1 -54
- package/dist/blocks/index.js +2 -1684
- package/dist/blocks/index.mjs +2 -1645
- package/dist/breadcrumb.js +1 -106
- package/dist/breadcrumb.mjs +1 -98
- package/dist/calendar-ext/index.js +1 -207
- package/dist/calendar-ext/index.mjs +1 -169
- package/dist/calendar.js +1 -193
- package/dist/calendar.mjs +1 -168
- package/dist/carousel.js +1 -282
- package/dist/carousel.mjs +1 -253
- package/dist/charts/index.js +6 -5840
- package/dist/charts/index.mjs +6 -5749
- package/dist/checkbox.js +1 -59
- package/dist/checkbox.mjs +1 -34
- package/dist/code/block.js +2 -225
- package/dist/code/block.mjs +2 -202
- package/dist/code/compare.js +5 -444
- package/dist/code/compare.mjs +5 -421
- package/dist/code/diff.js +12 -429
- package/dist/code/diff.mjs +11 -405
- package/dist/code/editor.js +1 -242
- package/dist/code/editor.mjs +1 -217
- package/dist/code/explorer.js +1 -290
- package/dist/code/explorer.mjs +1 -267
- package/dist/code/index.js +26 -2514
- package/dist/code/index.mjs +24 -2471
- package/dist/code/preview.js +6 -363
- package/dist/code/preview.mjs +6 -340
- package/dist/code/snippet.js +2 -273
- package/dist/code/snippet.mjs +2 -249
- package/dist/code/tabs.js +1 -74
- package/dist/code/tabs.mjs +1 -52
- package/dist/code/terminal.js +3 -436
- package/dist/code/terminal.mjs +3 -413
- package/dist/collapsible.js +1 -32
- package/dist/collapsible.mjs +1 -8
- package/dist/command.js +1 -282
- package/dist/command.mjs +1 -251
- package/dist/context-menu.js +1 -206
- package/dist/context-menu.mjs +1 -170
- package/dist/desktop/hooks.js +1 -223
- package/dist/desktop/hooks.mjs +1 -198
- package/dist/desktop/index.js +1 -685
- package/dist/desktop/index.mjs +1 -657
- package/dist/desktop/spotlight.js +1 -260
- package/dist/desktop/spotlight.mjs +1 -235
- package/dist/desktop/window.js +1 -273
- package/dist/desktop/window.mjs +1 -247
- package/dist/device/index.js +1 -2
- package/dist/device/index.mjs +0 -1
- package/dist/dialog.js +1 -245
- package/dist/dialog.mjs +1 -213
- package/dist/dock/basic.js +1 -173
- package/dist/dock/basic.mjs +1 -150
- package/dist/dock/index.js +1 -647
- package/dist/dock/index.mjs +1 -620
- package/dist/dock/limelight-nav.js +1 -314
- package/dist/dock/limelight-nav.mjs +1 -293
- package/dist/dock/macos.js +1 -140
- package/dist/dock/macos.mjs +1 -117
- package/dist/dock/menu.js +1 -69
- package/dist/dock/menu.mjs +1 -47
- package/dist/dock/message.js +1 -148
- package/dist/dock/message.mjs +1 -126
- package/dist/drawer.js +1 -114
- package/dist/drawer.mjs +1 -102
- package/dist/dropdown-menu.js +1 -201
- package/dist/dropdown-menu.mjs +1 -165
- package/dist/finance/AdvancedChart.js +2 -47
- package/dist/finance/AdvancedChart.mjs +2 -45
- package/dist/finance/CompanyProfile.js +2 -47
- package/dist/finance/CompanyProfile.mjs +2 -45
- package/dist/finance/CryptoScreener.js +2 -44
- package/dist/finance/CryptoScreener.mjs +2 -42
- package/dist/finance/Financials.js +2 -51
- package/dist/finance/Financials.mjs +2 -49
- package/dist/finance/ForexScreener.js +2 -45
- package/dist/finance/ForexScreener.mjs +2 -43
- package/dist/finance/MarketOverview.js +2 -103
- package/dist/finance/MarketOverview.mjs +2 -101
- package/dist/finance/NewsTimeline.js +2 -43
- package/dist/finance/NewsTimeline.mjs +2 -41
- package/dist/finance/OrderEntry.js +1 -130
- package/dist/finance/OrderEntry.mjs +1 -128
- package/dist/finance/OrdersHistory.js +1 -63
- package/dist/finance/OrdersHistory.mjs +1 -61
- package/dist/finance/PositionsList.js +1 -79
- package/dist/finance/PositionsList.mjs +1 -77
- package/dist/finance/StockScreener.js +2 -45
- package/dist/finance/StockScreener.mjs +2 -43
- package/dist/finance/SymbolInfo.js +2 -45
- package/dist/finance/SymbolInfo.mjs +2 -43
- package/dist/finance/TechnicalAnalysis.js +2 -53
- package/dist/finance/TechnicalAnalysis.mjs +2 -51
- package/dist/finance/TickerTape.js +2 -55
- package/dist/finance/TickerTape.mjs +2 -53
- package/dist/finance/TradingPanel.js +1 -190
- package/dist/finance/TradingPanel.mjs +1 -188
- package/dist/finance/index.js +2 -929
- package/dist/finance/index.mjs +2 -913
- package/dist/form/index.js +1 -153
- package/dist/form/index.mjs +1 -123
- package/dist/form.js +1 -171
- package/dist/form.mjs +1 -141
- package/dist/hover-card.js +1 -57
- package/dist/hover-card.mjs +1 -33
- package/dist/index.js +192 -9618
- package/dist/index.mjs +192 -9202
- package/dist/input-otp.js +1 -78
- package/dist/input-otp.mjs +1 -53
- package/dist/kanban/index.js +1 -593
- package/dist/kanban/index.mjs +1 -571
- package/dist/lib/utils.js +1 -28
- package/dist/lib/utils.mjs +1 -24
- package/dist/mermaid/index.js +1 -280
- package/dist/mermaid/index.mjs +1 -253
- package/dist/navigation/index.js +1 -97
- package/dist/navigation/index.mjs +1 -78
- package/dist/navigation-menu.js +1 -148
- package/dist/navigation-menu.mjs +1 -115
- package/dist/pattern/grid-pattern.js +3 -325
- package/dist/pattern/grid-pattern.mjs +3 -302
- package/dist/pattern/index.js +3 -325
- package/dist/pattern/index.mjs +3 -302
- package/dist/popover.js +1 -62
- package/dist/popover.mjs +1 -36
- package/dist/progress.js +1 -61
- package/dist/progress.mjs +1 -36
- package/dist/project/gantt.js +1 -64
- package/dist/project/gantt.mjs +1 -42
- package/dist/project/index.js +1 -635
- package/dist/project/index.mjs +1 -610
- package/dist/project/kanban.js +1 -596
- package/dist/project/kanban.mjs +1 -571
- package/dist/project/list.js +1 -34
- package/dist/project/list.mjs +1 -11
- package/dist/radio-group.js +1 -67
- package/dist/radio-group.mjs +1 -44
- package/dist/resizable.js +1 -71
- package/dist/resizable.mjs +1 -47
- package/dist/scroll-area.js +1 -88
- package/dist/scroll-area.mjs +1 -65
- package/dist/select.js +1 -139
- package/dist/select.mjs +1 -110
- package/dist/separator.js +1 -58
- package/dist/separator.mjs +1 -33
- package/dist/sheet.js +1 -147
- package/dist/sheet.mjs +1 -116
- package/dist/skeleton.js +1 -31
- package/dist/skeleton.mjs +1 -26
- package/dist/slider.js +1 -98
- package/dist/slider.mjs +1 -72
- package/dist/sonner.js +1 -33
- package/dist/sonner.mjs +1 -28
- package/dist/spline/index.js +1 -210
- package/dist/spline/index.mjs +1 -201
- package/dist/spline/media-stack.js +1 -192
- package/dist/spline/media-stack.mjs +1 -184
- package/dist/spline/player.js +1 -36
- package/dist/spline/player.mjs +1 -30
- package/dist/switch.js +1 -61
- package/dist/switch.mjs +1 -36
- package/dist/table.js +1 -109
- package/dist/table.mjs +1 -100
- package/dist/tabs.js +1 -127
- package/dist/tabs.mjs +1 -101
- package/dist/tailwind/index.mjs +1 -2011
- package/dist/textarea.js +1 -77
- package/dist/textarea.mjs +1 -55
- package/dist/toggle-group.js +1 -117
- package/dist/toggle-group.mjs +1 -92
- package/dist/toggle.js +1 -70
- package/dist/toggle.mjs +1 -47
- package/dist/tooltip.js +1 -66
- package/dist/tooltip.mjs +1 -39
- package/dist/types/index.mjs +1 -51
- package/dist/ui/announcement.js +1 -133
- package/dist/ui/announcement.mjs +1 -111
- package/dist/ui/avatar-group.js +1 -87
- package/dist/ui/avatar-group.mjs +1 -64
- package/dist/ui/banner.js +1 -84
- package/dist/ui/banner.mjs +1 -61
- package/dist/ui/cursor.js +1 -77
- package/dist/ui/cursor.mjs +1 -55
- package/dist/ui/index.js +1 -494
- package/dist/ui/index.mjs +1 -461
- package/dist/ui/marquee.js +1 -73
- package/dist/ui/marquee.mjs +1 -51
- package/dist/ui/pill.js +1 -84
- package/dist/ui/pill.mjs +1 -61
- package/dist/ui/spinner.js +1 -27
- package/dist/ui/spinner.mjs +1 -25
- package/dist/ui/tags.js +1 -116
- package/dist/ui/tags.mjs +1 -94
- package/dist/ui/ticker.js +1 -72
- package/dist/ui/ticker.mjs +1 -50
- package/dist/util/index.mjs +1 -404
- package/package.json +28 -27
- package/dist/primitives/index.js +0 -9619
- package/dist/primitives/index.mjs +0 -9203
- package/dist/primitives-export.js +0 -9619
- package/dist/primitives-export.mjs +0 -9203
package/dist/ui/index.mjs
CHANGED
|
@@ -1,462 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as React5 from 'react';
|
|
3
|
-
import { Loader2, X, Loader2Icon } from 'lucide-react';
|
|
4
|
-
import { clsx } from 'clsx';
|
|
5
|
-
import { twMerge } from 'tailwind-merge';
|
|
6
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
7
|
-
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
-
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
10
|
-
|
|
11
|
-
var __defProp = Object.defineProperty;
|
|
12
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
13
|
-
function cn(...inputs) {
|
|
14
|
-
return twMerge(clsx(inputs));
|
|
15
|
-
}
|
|
16
|
-
__name(cn, "cn");
|
|
17
|
-
var buttonVariants = cva(
|
|
18
|
-
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',
|
|
19
|
-
{
|
|
20
|
-
variants: {
|
|
21
|
-
variant: {
|
|
22
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
23
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
24
|
-
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
|
|
25
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
26
|
-
ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
|
|
27
|
-
link: "text-primary underline-offset-4 hover:underline",
|
|
28
|
-
// Keep the additional Hanzo variants for backward compatibility
|
|
29
|
-
primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
30
|
-
linkFG: "text-primary underline-offset-4 hover:underline",
|
|
31
|
-
linkMuted: "text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
35
|
-
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
36
|
-
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
37
|
-
icon: "size-9",
|
|
38
|
-
"icon-sm": "size-8",
|
|
39
|
-
"icon-lg": "size-10"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
variant: "default",
|
|
44
|
-
size: "default"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
var Button = React5.forwardRef(
|
|
49
|
-
({ className, variant = "default", size = "default", asChild = false, isLoading = false, children, ...props }, ref) => {
|
|
50
|
-
const Comp = asChild ? Slot : "button";
|
|
51
|
-
return /* @__PURE__ */ jsxs(
|
|
52
|
-
Comp,
|
|
53
|
-
{
|
|
54
|
-
"data-slot": "button",
|
|
55
|
-
"data-variant": variant,
|
|
56
|
-
"data-size": size,
|
|
57
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
58
|
-
ref,
|
|
59
|
-
...props,
|
|
60
|
-
children: [
|
|
61
|
-
isLoading ? /* @__PURE__ */ jsx(
|
|
62
|
-
Loader2,
|
|
63
|
-
{
|
|
64
|
-
className: cn("h-4 w-4 animate-spin", size !== "icon" && size !== "icon-sm" && size !== "icon-lg" && "mr-2")
|
|
65
|
-
}
|
|
66
|
-
) : null,
|
|
67
|
-
isLoading && (size === "icon" || size === "icon-sm" || size === "icon-lg") ? null : children
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
Button.displayName = "Button";
|
|
74
|
-
var Announcement = React5.forwardRef(
|
|
75
|
-
({ className, children, dismissible = true, onDismiss, ...props }, ref) => {
|
|
76
|
-
const [isVisible, setIsVisible] = React5.useState(true);
|
|
77
|
-
const handleDismiss = /* @__PURE__ */ __name(() => {
|
|
78
|
-
setIsVisible(false);
|
|
79
|
-
onDismiss?.();
|
|
80
|
-
}, "handleDismiss");
|
|
81
|
-
if (!isVisible) return null;
|
|
82
|
-
return /* @__PURE__ */ jsxs(
|
|
83
|
-
"div",
|
|
84
|
-
{
|
|
85
|
-
ref,
|
|
86
|
-
className: cn(
|
|
87
|
-
"relative flex items-center gap-4 rounded-lg border bg-background px-4 py-3 text-sm",
|
|
88
|
-
className
|
|
89
|
-
),
|
|
90
|
-
...props,
|
|
91
|
-
children: [
|
|
92
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1", children }),
|
|
93
|
-
dismissible && /* @__PURE__ */ jsxs(
|
|
94
|
-
Button,
|
|
95
|
-
{
|
|
96
|
-
variant: "ghost",
|
|
97
|
-
size: "icon",
|
|
98
|
-
className: "h-6 w-6",
|
|
99
|
-
onClick: handleDismiss,
|
|
100
|
-
children: [
|
|
101
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
102
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Dismiss" })
|
|
103
|
-
]
|
|
104
|
-
}
|
|
105
|
-
)
|
|
106
|
-
]
|
|
107
|
-
}
|
|
108
|
-
);
|
|
109
|
-
}
|
|
110
|
-
);
|
|
111
|
-
Announcement.displayName = "Announcement";
|
|
112
|
-
var Avatar = /* @__PURE__ */ __name(({ className, ref, ...props }) => /* @__PURE__ */ jsx(
|
|
113
|
-
AvatarPrimitive.Root,
|
|
114
|
-
{
|
|
115
|
-
className: cn(
|
|
116
|
-
"relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
|
|
117
|
-
className
|
|
118
|
-
),
|
|
119
|
-
ref,
|
|
120
|
-
...props
|
|
121
|
-
}
|
|
122
|
-
), "Avatar");
|
|
123
|
-
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
124
|
-
var AvatarImage = /* @__PURE__ */ __name(({ className, ref, ...props }) => /* @__PURE__ */ jsx(
|
|
125
|
-
AvatarPrimitive.Image,
|
|
126
|
-
{
|
|
127
|
-
className: cn("aspect-square h-full w-full", className),
|
|
128
|
-
ref,
|
|
129
|
-
...props
|
|
130
|
-
}
|
|
131
|
-
), "AvatarImage");
|
|
132
|
-
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
133
|
-
var AvatarFallback = /* @__PURE__ */ __name(({ className, ref, ...props }) => /* @__PURE__ */ jsx(
|
|
134
|
-
AvatarPrimitive.Fallback,
|
|
135
|
-
{
|
|
136
|
-
className: cn(
|
|
137
|
-
"bg-muted flex h-full w-full items-center justify-center rounded-full",
|
|
138
|
-
className
|
|
139
|
-
),
|
|
140
|
-
ref,
|
|
141
|
-
...props
|
|
142
|
-
}
|
|
143
|
-
), "AvatarFallback");
|
|
144
|
-
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
145
|
-
var AvatarGroup = React5.forwardRef(
|
|
146
|
-
({ className, items, max = 5, ...props }, ref) => {
|
|
147
|
-
const displayItems = items.slice(0, max);
|
|
148
|
-
const remaining = items.length - max;
|
|
149
|
-
return /* @__PURE__ */ jsxs("div", { ref, className: cn("flex -space-x-4", className), ...props, children: [
|
|
150
|
-
displayItems.map((item, index) => /* @__PURE__ */ jsxs(Avatar, { className: "border-2 border-background", children: [
|
|
151
|
-
/* @__PURE__ */ jsx(AvatarImage, { src: item.src, alt: item.alt }),
|
|
152
|
-
/* @__PURE__ */ jsx(AvatarFallback, { children: item.fallback })
|
|
153
|
-
] }, index)),
|
|
154
|
-
remaining > 0 && /* @__PURE__ */ jsx(Avatar, { className: "border-2 border-background", children: /* @__PURE__ */ jsxs(AvatarFallback, { children: [
|
|
155
|
-
"+",
|
|
156
|
-
remaining
|
|
157
|
-
] }) })
|
|
158
|
-
] });
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
AvatarGroup.displayName = "AvatarGroup";
|
|
162
|
-
var bannerVariants = cva(
|
|
163
|
-
"relative w-full border-b px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",
|
|
164
|
-
{
|
|
165
|
-
variants: {
|
|
166
|
-
variant: {
|
|
167
|
-
default: "bg-background text-foreground",
|
|
168
|
-
info: "border-blue-500/50 bg-blue-50 text-blue-900 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",
|
|
169
|
-
success: "border-green-500/50 bg-green-50 text-green-900 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",
|
|
170
|
-
warning: "border-yellow-500/50 bg-yellow-50 text-yellow-900 dark:bg-yellow-950 dark:text-yellow-100 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",
|
|
171
|
-
error: "border-red-500/50 bg-red-50 text-red-900 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400"
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
defaultVariants: {
|
|
175
|
-
variant: "default"
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
);
|
|
179
|
-
var Banner = React5.forwardRef(
|
|
180
|
-
({ className, variant, onClose, children, ...props }, ref) => {
|
|
181
|
-
return /* @__PURE__ */ jsxs(
|
|
182
|
-
"div",
|
|
183
|
-
{
|
|
184
|
-
ref,
|
|
185
|
-
role: "alert",
|
|
186
|
-
className: cn(bannerVariants({ variant }), className),
|
|
187
|
-
...props,
|
|
188
|
-
children: [
|
|
189
|
-
children,
|
|
190
|
-
onClose && /* @__PURE__ */ jsxs(
|
|
191
|
-
"button",
|
|
192
|
-
{
|
|
193
|
-
type: "button",
|
|
194
|
-
onClick: onClose,
|
|
195
|
-
className: "absolute right-4 top-3 rounded-md p-1 hover:bg-black/5 dark:hover:bg-white/5",
|
|
196
|
-
children: [
|
|
197
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
198
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
199
|
-
]
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
]
|
|
203
|
-
}
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
Banner.displayName = "Banner";
|
|
208
|
-
var Cursor = React5.forwardRef(
|
|
209
|
-
({ className, children, cursorText, cursorSize = 20, ...props }, ref) => {
|
|
210
|
-
const [position, setPosition] = React5.useState({ x: 0, y: 0 });
|
|
211
|
-
const [isHovered, setIsHovered] = React5.useState(false);
|
|
212
|
-
const handleMouseMove = /* @__PURE__ */ __name((e) => {
|
|
213
|
-
const rect = e.currentTarget.getBoundingClientRect();
|
|
214
|
-
setPosition({
|
|
215
|
-
x: e.clientX - rect.left,
|
|
216
|
-
y: e.clientY - rect.top
|
|
217
|
-
});
|
|
218
|
-
}, "handleMouseMove");
|
|
219
|
-
return /* @__PURE__ */ jsxs(
|
|
220
|
-
"div",
|
|
221
|
-
{
|
|
222
|
-
ref,
|
|
223
|
-
className: cn("relative cursor-none", className),
|
|
224
|
-
onMouseMove: handleMouseMove,
|
|
225
|
-
onMouseEnter: () => setIsHovered(true),
|
|
226
|
-
onMouseLeave: () => setIsHovered(false),
|
|
227
|
-
...props,
|
|
228
|
-
children: [
|
|
229
|
-
children,
|
|
230
|
-
isHovered && /* @__PURE__ */ jsx(
|
|
231
|
-
"div",
|
|
232
|
-
{
|
|
233
|
-
className: "pointer-events-none absolute z-50 flex items-center justify-center rounded-full bg-primary/20 backdrop-blur-sm transition-transform",
|
|
234
|
-
style: {
|
|
235
|
-
left: position.x,
|
|
236
|
-
top: position.y,
|
|
237
|
-
width: cursorSize,
|
|
238
|
-
height: cursorSize,
|
|
239
|
-
transform: "translate(-50%, -50%)"
|
|
240
|
-
},
|
|
241
|
-
children: cursorText && /* @__PURE__ */ jsx("span", { className: "text-xs font-medium text-primary", children: cursorText })
|
|
242
|
-
}
|
|
243
|
-
)
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
Cursor.displayName = "Cursor";
|
|
250
|
-
var Marquee = React5.forwardRef(
|
|
251
|
-
({
|
|
252
|
-
className,
|
|
253
|
-
children,
|
|
254
|
-
repeat = 2,
|
|
255
|
-
reverse = false,
|
|
256
|
-
pauseOnHover = false,
|
|
257
|
-
vertical = false,
|
|
258
|
-
...props
|
|
259
|
-
}, ref) => {
|
|
260
|
-
return /* @__PURE__ */ jsx(
|
|
261
|
-
"div",
|
|
262
|
-
{
|
|
263
|
-
ref,
|
|
264
|
-
className: cn(
|
|
265
|
-
"group flex overflow-hidden",
|
|
266
|
-
vertical ? "flex-col" : "flex-row",
|
|
267
|
-
className
|
|
268
|
-
),
|
|
269
|
-
...props,
|
|
270
|
-
children: Array.from({ length: repeat }).map((_, i) => /* @__PURE__ */ jsx(
|
|
271
|
-
"div",
|
|
272
|
-
{
|
|
273
|
-
className: cn(
|
|
274
|
-
"flex shrink-0",
|
|
275
|
-
vertical ? "animate-marquee-vertical flex-col" : "animate-marquee",
|
|
276
|
-
reverse && (vertical ? "[animation-direction:reverse]" : "[animation-direction:reverse]"),
|
|
277
|
-
pauseOnHover && "group-hover:[animation-play-state:paused]"
|
|
278
|
-
),
|
|
279
|
-
children
|
|
280
|
-
},
|
|
281
|
-
i
|
|
282
|
-
))
|
|
283
|
-
}
|
|
284
|
-
);
|
|
285
|
-
}
|
|
286
|
-
);
|
|
287
|
-
Marquee.displayName = "Marquee";
|
|
288
|
-
var pillVariants = cva(
|
|
289
|
-
"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium transition-colors",
|
|
290
|
-
{
|
|
291
|
-
variants: {
|
|
292
|
-
variant: {
|
|
293
|
-
default: "bg-primary/10 text-primary hover:bg-primary/20",
|
|
294
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
295
|
-
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
296
|
-
success: "bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",
|
|
297
|
-
warning: "bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",
|
|
298
|
-
error: "bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400"
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
defaultVariants: {
|
|
302
|
-
variant: "default"
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
);
|
|
306
|
-
var Pill = React5.forwardRef(
|
|
307
|
-
({ className, variant, onRemove, children, ...props }, ref) => {
|
|
308
|
-
return /* @__PURE__ */ jsxs(
|
|
309
|
-
"span",
|
|
310
|
-
{
|
|
311
|
-
ref,
|
|
312
|
-
className: cn(pillVariants({ variant }), className),
|
|
313
|
-
...props,
|
|
314
|
-
children: [
|
|
315
|
-
children,
|
|
316
|
-
onRemove && /* @__PURE__ */ jsxs(
|
|
317
|
-
"button",
|
|
318
|
-
{
|
|
319
|
-
type: "button",
|
|
320
|
-
onClick: onRemove,
|
|
321
|
-
className: "ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10",
|
|
322
|
-
children: [
|
|
323
|
-
/* @__PURE__ */ jsx(X, { className: "h-3 w-3" }),
|
|
324
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Remove" })
|
|
325
|
-
]
|
|
326
|
-
}
|
|
327
|
-
)
|
|
328
|
-
]
|
|
329
|
-
}
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
);
|
|
333
|
-
Pill.displayName = "Pill";
|
|
334
|
-
function Spinner({ className, ...props }) {
|
|
335
|
-
return /* @__PURE__ */ jsx(
|
|
336
|
-
Loader2Icon,
|
|
337
|
-
{
|
|
338
|
-
role: "status",
|
|
339
|
-
"aria-label": "Loading",
|
|
340
|
-
className: cn("size-4 animate-spin", className),
|
|
341
|
-
...props
|
|
342
|
-
}
|
|
343
|
-
);
|
|
344
|
-
}
|
|
345
|
-
__name(Spinner, "Spinner");
|
|
346
|
-
var badgeVariants = cva(
|
|
347
|
-
"inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [&>svg]:pointer-events-none overflow-hidden",
|
|
348
|
-
{
|
|
349
|
-
variants: {
|
|
350
|
-
variant: {
|
|
351
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/90 border-transparent shadow-sm",
|
|
352
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",
|
|
353
|
-
destructive: "bg-destructive text-white hover:bg-destructive/90 border-transparent shadow-sm focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
|
|
354
|
-
outline: "text-foreground border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
355
|
-
ghost: "hover:bg-accent hover:text-accent-foreground border-transparent",
|
|
356
|
-
link: "text-primary underline-offset-4 hover:underline border-transparent",
|
|
357
|
-
// Hanzo-specific variants for backward compatibility
|
|
358
|
-
inputAdornment: "bg-gray-600 px-2 font-medium text-white border-transparent",
|
|
359
|
-
tags: "text-muted-foreground border-border bg-muted rounded-lg px-2 py-1 font-normal capitalize"
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
defaultVariants: {
|
|
363
|
-
variant: "default"
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
);
|
|
367
|
-
function Badge({
|
|
368
|
-
className,
|
|
369
|
-
variant = "default",
|
|
370
|
-
asChild = false,
|
|
371
|
-
...props
|
|
372
|
-
}) {
|
|
373
|
-
const Comp = asChild ? Slot : "span";
|
|
374
|
-
return /* @__PURE__ */ jsx(
|
|
375
|
-
Comp,
|
|
376
|
-
{
|
|
377
|
-
"data-slot": "badge",
|
|
378
|
-
"data-variant": variant,
|
|
379
|
-
className: cn(badgeVariants({ variant }), className),
|
|
380
|
-
...props
|
|
381
|
-
}
|
|
382
|
-
);
|
|
383
|
-
}
|
|
384
|
-
__name(Badge, "Badge");
|
|
385
|
-
var Tags = React5.forwardRef(
|
|
386
|
-
({ className, tags, onRemove, variant = "default", ...props }, ref) => {
|
|
387
|
-
return /* @__PURE__ */ jsx(
|
|
388
|
-
"div",
|
|
389
|
-
{
|
|
390
|
-
ref,
|
|
391
|
-
className: cn("flex flex-wrap gap-2", className),
|
|
392
|
-
...props,
|
|
393
|
-
children: tags.map((tag) => /* @__PURE__ */ jsxs(
|
|
394
|
-
Badge,
|
|
395
|
-
{
|
|
396
|
-
variant,
|
|
397
|
-
className: cn("gap-1", onRemove && "pr-1"),
|
|
398
|
-
children: [
|
|
399
|
-
tag.label,
|
|
400
|
-
onRemove && /* @__PURE__ */ jsxs(
|
|
401
|
-
"button",
|
|
402
|
-
{
|
|
403
|
-
type: "button",
|
|
404
|
-
onClick: () => onRemove(tag.id),
|
|
405
|
-
className: "ml-1 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10",
|
|
406
|
-
children: [
|
|
407
|
-
/* @__PURE__ */ jsx(X, { className: "h-3 w-3" }),
|
|
408
|
-
/* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
409
|
-
"Remove ",
|
|
410
|
-
tag.label
|
|
411
|
-
] })
|
|
412
|
-
]
|
|
413
|
-
}
|
|
414
|
-
)
|
|
415
|
-
]
|
|
416
|
-
},
|
|
417
|
-
tag.id
|
|
418
|
-
))
|
|
419
|
-
}
|
|
420
|
-
);
|
|
421
|
-
}
|
|
422
|
-
);
|
|
423
|
-
Tags.displayName = "Tags";
|
|
424
|
-
var Ticker = React5.forwardRef(
|
|
425
|
-
({
|
|
426
|
-
className,
|
|
427
|
-
children,
|
|
428
|
-
speed = 50,
|
|
429
|
-
direction = "left",
|
|
430
|
-
pauseOnHover = true,
|
|
431
|
-
...props
|
|
432
|
-
}, ref) => {
|
|
433
|
-
return /* @__PURE__ */ jsx(
|
|
434
|
-
"div",
|
|
435
|
-
{
|
|
436
|
-
ref,
|
|
437
|
-
className: cn("group relative overflow-hidden", className),
|
|
438
|
-
...props,
|
|
439
|
-
children: /* @__PURE__ */ jsxs(
|
|
440
|
-
"div",
|
|
441
|
-
{
|
|
442
|
-
className: cn(
|
|
443
|
-
"flex w-fit animate-scroll",
|
|
444
|
-
pauseOnHover && "group-hover:[animation-play-state:paused]"
|
|
445
|
-
),
|
|
446
|
-
style: {
|
|
447
|
-
animationDuration: `${speed}s`,
|
|
448
|
-
animationDirection: direction === "right" ? "reverse" : "normal"
|
|
449
|
-
},
|
|
450
|
-
children: [
|
|
451
|
-
children,
|
|
452
|
-
children
|
|
453
|
-
]
|
|
454
|
-
}
|
|
455
|
-
)
|
|
456
|
-
}
|
|
457
|
-
);
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
Ticker.displayName = "Ticker";
|
|
461
|
-
|
|
462
|
-
export { Announcement, AvatarGroup, Banner, Cursor, Marquee, Pill, Spinner, Tags, Ticker, bannerVariants, pillVariants };
|
|
2
|
+
import*as m from'react';import {Loader2,X,Loader2Icon}from'lucide-react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import {jsxs,jsx}from'react/jsx-runtime';import*as p from'@radix-ui/react-avatar';var j=Object.defineProperty;var l=(t,r)=>j(t,"name",{value:r,configurable:true});function a(...t){return twMerge(clsx(t))}l(a,"cn");var ne=cva('inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*="size-"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline",primary:"bg-primary text-primary-foreground shadow hover:bg-primary/90",linkFG:"text-primary underline-offset-4 hover:underline",linkMuted:"text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}}),x=m.forwardRef(({className:t,variant:r="default",size:e="default",asChild:o=false,isLoading:n=false,children:i,...s},d)=>jsxs(o?Slot:"button",{"data-slot":"button","data-variant":r,"data-size":e,className:a(ne({variant:r,size:e,className:t})),ref:d,...s,children:[n?jsx(Loader2,{className:a("h-4 w-4 animate-spin",e!=="icon"&&e!=="icon-sm"&&e!=="icon-lg"&&"mr-2")}):null,n&&(e==="icon"||e==="icon-sm"||e==="icon-lg")?null:i]}));x.displayName="Button";var M=m.forwardRef(({className:t,children:r,dismissible:e=true,onDismiss:o,...n},i)=>{let[s,d]=m.useState(true),c=l(()=>{d(false),o?.();},"handleDismiss");return s?jsxs("div",{ref:i,className:a("relative flex items-center gap-4 rounded-lg border bg-background px-4 py-3 text-sm",t),...n,children:[jsx("div",{className:"flex-1",children:r}),e&&jsxs(x,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Dismiss"})]})]}):null});M.displayName="Announcement";var v=l(({className:t,ref:r,...e})=>jsx(p.Root,{className:a("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",t),ref:r,...e}),"Avatar");v.displayName=p.Root.displayName;var h=l(({className:t,ref:r,...e})=>jsx(p.Image,{className:a("aspect-square h-full w-full",t),ref:r,...e}),"AvatarImage");h.displayName=p.Image.displayName;var g=l(({className:t,ref:r,...e})=>jsx(p.Fallback,{className:a("bg-muted flex h-full w-full items-center justify-center rounded-full",t),ref:r,...e}),"AvatarFallback");g.displayName=p.Fallback.displayName;var H=m.forwardRef(({className:t,items:r,max:e=5,...o},n)=>{let i=r.slice(0,e),s=r.length-e;return jsxs("div",{ref:n,className:a("flex -space-x-4",t),...o,children:[i.map((d,c)=>jsxs(v,{className:"border-2 border-background",children:[jsx(h,{src:d.src,alt:d.alt}),jsx(g,{children:d.fallback})]},c)),s>0&&jsx(v,{className:"border-2 border-background",children:jsxs(g,{children:["+",s]})})]})});H.displayName="AvatarGroup";var E=cva("relative w-full border-b px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",info:"border-blue-500/50 bg-blue-50 text-blue-900 dark:bg-blue-950 dark:text-blue-100 [&>svg]:text-blue-600 dark:[&>svg]:text-blue-400",success:"border-green-500/50 bg-green-50 text-green-900 dark:bg-green-950 dark:text-green-100 [&>svg]:text-green-600 dark:[&>svg]:text-green-400",warning:"border-yellow-500/50 bg-yellow-50 text-yellow-900 dark:bg-yellow-950 dark:text-yellow-100 [&>svg]:text-yellow-600 dark:[&>svg]:text-yellow-400",error:"border-red-500/50 bg-red-50 text-red-900 dark:bg-red-950 dark:text-red-100 [&>svg]:text-red-600 dark:[&>svg]:text-red-400"}},defaultVariants:{variant:"default"}}),B=m.forwardRef(({className:t,variant:r,onClose:e,children:o,...n},i)=>jsxs("div",{ref:i,role:"alert",className:a(E({variant:r}),t),...n,children:[o,e&&jsxs("button",{type:"button",onClick:e,className:"absolute right-4 top-3 rounded-md p-1 hover:bg-black/5 dark:hover:bg-white/5",children:[jsx(X,{className:"h-4 w-4"}),jsx("span",{className:"sr-only",children:"Close"})]})]}));B.displayName="Banner";var F=m.forwardRef(({className:t,children:r,cursorText:e,cursorSize:o=20,...n},i)=>{let[s,d]=m.useState({x:0,y:0}),[c,u]=m.useState(false),Z=l(b=>{let A=b.currentTarget.getBoundingClientRect();d({x:b.clientX-A.left,y:b.clientY-A.top});},"handleMouseMove");return jsxs("div",{ref:i,className:a("relative cursor-none",t),onMouseMove:Z,onMouseEnter:()=>u(true),onMouseLeave:()=>u(false),...n,children:[r,c&&jsx("div",{className:"pointer-events-none absolute z-50 flex items-center justify-center rounded-full bg-primary/20 backdrop-blur-sm transition-transform",style:{left:s.x,top:s.y,width:o,height:o,transform:"translate(-50%, -50%)"},children:e&&jsx("span",{className:"text-xs font-medium text-primary",children:e})})]})});F.displayName="Cursor";var G=m.forwardRef(({className:t,children:r,repeat:e=2,reverse:o=false,pauseOnHover:n=false,vertical:i=false,...s},d)=>jsx("div",{ref:d,className:a("group flex overflow-hidden",i?"flex-col":"flex-row",t),...s,children:Array.from({length:e}).map((c,u)=>jsx("div",{className:a("flex shrink-0",i?"animate-marquee-vertical flex-col":"animate-marquee",o&&"[animation-direction:reverse]",n&&"group-hover:[animation-play-state:paused]"),children:r},u))}));G.displayName="Marquee";var O=cva("inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-sm font-medium transition-colors",{variants:{variant:{default:"bg-primary/10 text-primary hover:bg-primary/20",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",success:"bg-green-100 text-green-700 dark:bg-green-900/30 dark:text-green-400",warning:"bg-yellow-100 text-yellow-700 dark:bg-yellow-900/30 dark:text-yellow-400",error:"bg-red-100 text-red-700 dark:bg-red-900/30 dark:text-red-400"}},defaultVariants:{variant:"default"}}),U=m.forwardRef(({className:t,variant:r,onRemove:e,children:o,...n},i)=>jsxs("span",{ref:i,className:a(O({variant:r}),t),...n,children:[o,e&&jsxs("button",{type:"button",onClick:e,className:"ml-0.5 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10",children:[jsx(X,{className:"h-3 w-3"}),jsx("span",{className:"sr-only",children:"Remove"})]})]}));U.displayName="Pill";function ve({className:t,...r}){return jsx(Loader2Icon,{role:"status","aria-label":"Loading",className:a("size-4 animate-spin",t),...r})}l(ve,"Spinner");var ye=cva("inline-flex items-center justify-center w-fit whitespace-nowrap shrink-0 rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:outline-none aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive [&>svg]:pointer-events-none overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90 border-transparent shadow-sm",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 border-transparent",destructive:"bg-destructive text-white hover:bg-destructive/90 border-transparent shadow-sm focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground border-input bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground border-transparent",link:"text-primary underline-offset-4 hover:underline border-transparent",inputAdornment:"bg-gray-600 px-2 font-medium text-white border-transparent",tags:"text-muted-foreground border-border bg-muted rounded-lg px-2 py-1 font-normal capitalize"}},defaultVariants:{variant:"default"}});function W({className:t,variant:r="default",asChild:e=false,...o}){return jsx(e?Slot:"span",{"data-slot":"badge","data-variant":r,className:a(ye({variant:r}),t),...o})}l(W,"Badge");var J=m.forwardRef(({className:t,tags:r,onRemove:e,variant:o="default",...n},i)=>jsx("div",{ref:i,className:a("flex flex-wrap gap-2",t),...n,children:r.map(s=>jsxs(W,{variant:o,className:a("gap-1",e&&"pr-1"),children:[s.label,e&&jsxs("button",{type:"button",onClick:()=>e(s.id),className:"ml-1 rounded-full p-0.5 hover:bg-black/10 dark:hover:bg-white/10",children:[jsx(X,{className:"h-3 w-3"}),jsxs("span",{className:"sr-only",children:["Remove ",s.label]})]})]},s.id))}));J.displayName="Tags";var Q=m.forwardRef(({className:t,children:r,speed:e=50,direction:o="left",pauseOnHover:n=true,...i},s)=>jsx("div",{ref:s,className:a("group relative overflow-hidden",t),...i,children:jsxs("div",{className:a("flex w-fit animate-scroll",n&&"group-hover:[animation-play-state:paused]"),style:{animationDuration:`${e}s`,animationDirection:o==="right"?"reverse":"normal"},children:[r,r]})}));Q.displayName="Ticker";export{M as Announcement,H as AvatarGroup,B as Banner,F as Cursor,G as Marquee,U as Pill,ve as Spinner,J as Tags,Q as Ticker,E as bannerVariants,O as pillVariants};
|
package/dist/ui/marquee.js
CHANGED
|
@@ -1,74 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
var React = require('react');
|
|
5
|
-
var clsx = require('clsx');
|
|
6
|
-
var tailwindMerge = require('tailwind-merge');
|
|
7
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
-
|
|
9
|
-
function _interopNamespace(e) {
|
|
10
|
-
if (e && e.__esModule) return e;
|
|
11
|
-
var n = Object.create(null);
|
|
12
|
-
if (e) {
|
|
13
|
-
Object.keys(e).forEach(function (k) {
|
|
14
|
-
if (k !== 'default') {
|
|
15
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
-
enumerable: true,
|
|
18
|
-
get: function () { return e[k]; }
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n.default = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
28
|
-
|
|
29
|
-
var __defProp = Object.defineProperty;
|
|
30
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
31
|
-
function cn(...inputs) {
|
|
32
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
33
|
-
}
|
|
34
|
-
__name(cn, "cn");
|
|
35
|
-
var Marquee = React__namespace.forwardRef(
|
|
36
|
-
({
|
|
37
|
-
className,
|
|
38
|
-
children,
|
|
39
|
-
repeat = 2,
|
|
40
|
-
reverse = false,
|
|
41
|
-
pauseOnHover = false,
|
|
42
|
-
vertical = false,
|
|
43
|
-
...props
|
|
44
|
-
}, ref) => {
|
|
45
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
ref,
|
|
49
|
-
className: cn(
|
|
50
|
-
"group flex overflow-hidden",
|
|
51
|
-
vertical ? "flex-col" : "flex-row",
|
|
52
|
-
className
|
|
53
|
-
),
|
|
54
|
-
...props,
|
|
55
|
-
children: Array.from({ length: repeat }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
56
|
-
"div",
|
|
57
|
-
{
|
|
58
|
-
className: cn(
|
|
59
|
-
"flex shrink-0",
|
|
60
|
-
vertical ? "animate-marquee-vertical flex-col" : "animate-marquee",
|
|
61
|
-
reverse && (vertical ? "[animation-direction:reverse]" : "[animation-direction:reverse]"),
|
|
62
|
-
pauseOnHover && "group-hover:[animation-play-state:paused]"
|
|
63
|
-
),
|
|
64
|
-
children
|
|
65
|
-
},
|
|
66
|
-
i
|
|
67
|
-
))
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
);
|
|
72
|
-
Marquee.displayName = "Marquee";
|
|
73
|
-
|
|
74
|
-
exports.Marquee = Marquee;
|
|
2
|
+
'use strict';var i=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var i__namespace=/*#__PURE__*/_interopNamespace(i);var p=Object.defineProperty;var o=(e,r)=>p(e,"name",{value:r,configurable:true});function t(...e){return tailwindMerge.twMerge(clsx.clsx(e))}o(t,"cn");var x=i__namespace.forwardRef(({className:e,children:r,repeat:s=2,reverse:l=false,pauseOnHover:m=false,vertical:a=false,...u},c)=>jsxRuntime.jsx("div",{ref:c,className:t("group flex overflow-hidden",a?"flex-col":"flex-row",e),...u,children:Array.from({length:s}).map((g,f)=>jsxRuntime.jsx("div",{className:t("flex shrink-0",a?"animate-marquee-vertical flex-col":"animate-marquee",l&&"[animation-direction:reverse]",m&&"group-hover:[animation-play-state:paused]"),children:r},f))}));x.displayName="Marquee";exports.Marquee=x;
|
package/dist/ui/marquee.mjs
CHANGED
|
@@ -1,52 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { clsx } from 'clsx';
|
|
4
|
-
import { twMerge } from 'tailwind-merge';
|
|
5
|
-
import { jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
|
-
function cn(...inputs) {
|
|
10
|
-
return twMerge(clsx(inputs));
|
|
11
|
-
}
|
|
12
|
-
__name(cn, "cn");
|
|
13
|
-
var Marquee = React.forwardRef(
|
|
14
|
-
({
|
|
15
|
-
className,
|
|
16
|
-
children,
|
|
17
|
-
repeat = 2,
|
|
18
|
-
reverse = false,
|
|
19
|
-
pauseOnHover = false,
|
|
20
|
-
vertical = false,
|
|
21
|
-
...props
|
|
22
|
-
}, ref) => {
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
"div",
|
|
25
|
-
{
|
|
26
|
-
ref,
|
|
27
|
-
className: cn(
|
|
28
|
-
"group flex overflow-hidden",
|
|
29
|
-
vertical ? "flex-col" : "flex-row",
|
|
30
|
-
className
|
|
31
|
-
),
|
|
32
|
-
...props,
|
|
33
|
-
children: Array.from({ length: repeat }).map((_, i) => /* @__PURE__ */ jsx(
|
|
34
|
-
"div",
|
|
35
|
-
{
|
|
36
|
-
className: cn(
|
|
37
|
-
"flex shrink-0",
|
|
38
|
-
vertical ? "animate-marquee-vertical flex-col" : "animate-marquee",
|
|
39
|
-
reverse && (vertical ? "[animation-direction:reverse]" : "[animation-direction:reverse]"),
|
|
40
|
-
pauseOnHover && "group-hover:[animation-play-state:paused]"
|
|
41
|
-
),
|
|
42
|
-
children
|
|
43
|
-
},
|
|
44
|
-
i
|
|
45
|
-
))
|
|
46
|
-
}
|
|
47
|
-
);
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
Marquee.displayName = "Marquee";
|
|
51
|
-
|
|
52
|
-
export { Marquee };
|
|
2
|
+
import*as i from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx}from'react/jsx-runtime';var p=Object.defineProperty;var o=(e,r)=>p(e,"name",{value:r,configurable:true});function t(...e){return twMerge(clsx(e))}o(t,"cn");var x=i.forwardRef(({className:e,children:r,repeat:s=2,reverse:l=false,pauseOnHover:m=false,vertical:a=false,...u},c)=>jsx("div",{ref:c,className:t("group flex overflow-hidden",a?"flex-col":"flex-row",e),...u,children:Array.from({length:s}).map((g,f)=>jsx("div",{className:t("flex shrink-0",a?"animate-marquee-vertical flex-col":"animate-marquee",l&&"[animation-direction:reverse]",m&&"group-hover:[animation-play-state:paused]"),children:r},f))}));x.displayName="Marquee";export{x as Marquee};
|