@hanzo/ui 5.3.28 → 5.3.29
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/3d/button.js +298 -0
- package/dist/3d/button.mjs +273 -0
- package/dist/3d/card.js +234 -0
- package/dist/3d/card.mjs +207 -0
- package/dist/3d/carousel.js +371 -0
- package/dist/3d/carousel.mjs +344 -0
- package/dist/3d/grid.js +362 -0
- package/dist/3d/grid.mjs +337 -0
- package/dist/3d/index.js +1518 -0
- package/dist/3d/index.mjs +1472 -0
- package/dist/3d/marquee.js +352 -0
- package/dist/3d/marquee.mjs +327 -0
- package/dist/3d/pin.js +46 -0
- package/dist/3d/pin.mjs +24 -0
- package/dist/accordion.js +80 -0
- package/dist/accordion.mjs +55 -0
- package/dist/alert-dialog.js +220 -0
- package/dist/alert-dialog.mjs +187 -0
- package/dist/alert.js +68 -0
- package/dist/alert.mjs +64 -0
- package/dist/animation/animated-background.js +424 -0
- package/dist/animation/animated-background.mjs +418 -0
- package/dist/animation/animated-beam.js +119 -0
- package/dist/animation/animated-beam.mjs +97 -0
- package/dist/animation/animated-cursor.js +275 -0
- package/dist/animation/animated-cursor.mjs +270 -0
- package/dist/animation/animated-icon.js +357 -0
- package/dist/animation/animated-icon.mjs +351 -0
- package/dist/animation/animated-list.js +339 -0
- package/dist/animation/animated-list.mjs +333 -0
- package/dist/animation/animated-number.js +283 -0
- package/dist/animation/animated-number.mjs +277 -0
- package/dist/animation/animated-testimonials.js +97 -0
- package/dist/animation/animated-testimonials.mjs +75 -0
- package/dist/animation/animated-tooltip.js +67 -0
- package/dist/animation/animated-tooltip.mjs +45 -0
- package/dist/animation/apple-cards-carousel.js +308 -0
- package/dist/animation/apple-cards-carousel.mjs +285 -0
- package/dist/animation/apple-hello-effect.js +60 -0
- package/dist/animation/apple-hello-effect.mjs +38 -0
- package/dist/animation/index.js +1952 -0
- package/dist/animation/index.mjs +1921 -0
- package/dist/avatar.js +71 -0
- package/dist/avatar.mjs +47 -0
- package/dist/badge.js +66 -0
- package/dist/badge.mjs +40 -0
- package/dist/blocks/index.js +1665 -0
- package/dist/blocks/index.mjs +1626 -0
- package/dist/breadcrumb.js +107 -0
- package/dist/breadcrumb.mjs +99 -0
- package/dist/calendar.js +189 -0
- package/dist/calendar.mjs +164 -0
- package/dist/carousel.js +278 -0
- package/dist/carousel.mjs +249 -0
- package/dist/checkbox.js +60 -0
- package/dist/checkbox.mjs +35 -0
- package/dist/code/block.js +226 -0
- package/dist/code/block.mjs +203 -0
- package/dist/code/compare.js +446 -0
- package/dist/code/compare.mjs +423 -0
- package/dist/code/diff.js +430 -0
- package/dist/code/diff.mjs +407 -0
- package/dist/code/editor.js +243 -0
- package/dist/code/editor.mjs +218 -0
- package/dist/code/explorer.js +291 -0
- package/dist/code/explorer.mjs +268 -0
- package/dist/code/index.js +2551 -0
- package/dist/code/index.mjs +2510 -0
- package/dist/code/preview.js +400 -0
- package/dist/code/preview.mjs +377 -0
- package/dist/code/snippet.js +274 -0
- package/dist/code/snippet.mjs +250 -0
- package/dist/code/tabs.js +75 -0
- package/dist/code/tabs.mjs +53 -0
- package/dist/code/terminal.js +437 -0
- package/dist/code/terminal.mjs +414 -0
- package/dist/collapsible.js +33 -0
- package/dist/collapsible.mjs +9 -0
- package/dist/command.js +262 -0
- package/dist/command.mjs +232 -0
- package/dist/context-menu.js +207 -0
- package/dist/context-menu.mjs +171 -0
- package/dist/device/index.js +3 -0
- package/dist/device/index.mjs +2 -0
- package/dist/dialog.js +151 -0
- package/dist/dialog.mjs +121 -0
- package/dist/dock/basic.js +174 -0
- package/dist/dock/basic.mjs +151 -0
- package/dist/dock/index.js +628 -0
- package/dist/dock/index.mjs +601 -0
- package/dist/dock/limelight-nav.js +295 -0
- package/dist/dock/limelight-nav.mjs +274 -0
- package/dist/dock/macos.js +141 -0
- package/dist/dock/macos.mjs +118 -0
- package/dist/dock/menu.js +70 -0
- package/dist/dock/menu.mjs +48 -0
- package/dist/dock/message.js +144 -0
- package/dist/dock/message.mjs +122 -0
- package/dist/drawer.js +115 -0
- package/dist/drawer.mjs +103 -0
- package/dist/dropdown-menu.js +202 -0
- package/dist/dropdown-menu.mjs +166 -0
- package/dist/finance/AdvancedChart.js +48 -0
- package/dist/finance/AdvancedChart.mjs +46 -0
- package/dist/finance/CompanyProfile.js +48 -0
- package/dist/finance/CompanyProfile.mjs +46 -0
- package/dist/finance/CryptoScreener.js +45 -0
- package/dist/finance/CryptoScreener.mjs +43 -0
- package/dist/finance/Financials.js +52 -0
- package/dist/finance/Financials.mjs +50 -0
- package/dist/finance/ForexScreener.js +46 -0
- package/dist/finance/ForexScreener.mjs +44 -0
- package/dist/finance/MarketOverview.js +104 -0
- package/dist/finance/MarketOverview.mjs +102 -0
- package/dist/finance/NewsTimeline.js +44 -0
- package/dist/finance/NewsTimeline.mjs +42 -0
- package/dist/finance/OrderEntry.js +131 -0
- package/dist/finance/OrderEntry.mjs +129 -0
- package/dist/finance/OrdersHistory.js +64 -0
- package/dist/finance/OrdersHistory.mjs +62 -0
- package/dist/finance/PositionsList.js +80 -0
- package/dist/finance/PositionsList.mjs +78 -0
- package/dist/finance/StockScreener.js +46 -0
- package/dist/finance/StockScreener.mjs +44 -0
- package/dist/finance/SymbolInfo.js +46 -0
- package/dist/finance/SymbolInfo.mjs +44 -0
- package/dist/finance/TechnicalAnalysis.js +54 -0
- package/dist/finance/TechnicalAnalysis.mjs +52 -0
- package/dist/finance/TickerTape.js +56 -0
- package/dist/finance/TickerTape.mjs +54 -0
- package/dist/finance/TradingPanel.js +191 -0
- package/dist/finance/TradingPanel.mjs +189 -0
- package/dist/finance/index.js +930 -0
- package/dist/finance/index.mjs +914 -0
- package/dist/form/index.js +155 -0
- package/dist/form/index.mjs +125 -0
- package/dist/form.js +172 -0
- package/dist/form.mjs +142 -0
- package/dist/hover-card.js +58 -0
- package/dist/hover-card.mjs +34 -0
- package/dist/index.js +10179 -0
- package/dist/index.mjs +9785 -0
- package/dist/input-otp.js +79 -0
- package/dist/input-otp.mjs +54 -0
- package/dist/lib/utils.js +28 -0
- package/dist/lib/utils.mjs +24 -0
- package/dist/navigation/index.js +98 -0
- package/dist/navigation/index.mjs +79 -0
- package/dist/navigation-menu.js +149 -0
- package/dist/navigation-menu.mjs +116 -0
- package/dist/pattern/grid-pattern.js +333 -0
- package/dist/pattern/grid-pattern.mjs +310 -0
- package/dist/pattern/index.js +333 -0
- package/dist/pattern/index.mjs +310 -0
- package/dist/popover.js +63 -0
- package/dist/popover.mjs +37 -0
- package/dist/primitives/index.js +10179 -0
- package/dist/primitives/index.mjs +9785 -0
- package/dist/primitives-export.js +10179 -0
- package/dist/primitives-export.mjs +9785 -0
- package/dist/progress.js +62 -0
- package/dist/progress.mjs +37 -0
- package/dist/project/gantt.js +65 -0
- package/dist/project/gantt.mjs +43 -0
- package/dist/project/index.js +636 -0
- package/dist/project/index.mjs +611 -0
- package/dist/project/kanban.js +597 -0
- package/dist/project/kanban.mjs +572 -0
- package/dist/project/list.js +35 -0
- package/dist/project/list.mjs +12 -0
- package/dist/radio-group.js +68 -0
- package/dist/radio-group.mjs +45 -0
- package/dist/resizable.js +72 -0
- package/dist/resizable.mjs +48 -0
- package/dist/scroll-area.js +89 -0
- package/dist/scroll-area.mjs +66 -0
- package/dist/select.js +140 -0
- package/dist/select.mjs +111 -0
- package/dist/separator.js +59 -0
- package/dist/separator.mjs +34 -0
- package/dist/sheet.js +148 -0
- package/dist/sheet.mjs +117 -0
- package/dist/skeleton.js +32 -0
- package/dist/skeleton.mjs +27 -0
- package/dist/slider.js +99 -0
- package/dist/slider.mjs +73 -0
- package/dist/sonner.js +34 -0
- package/dist/sonner.mjs +29 -0
- package/dist/switch.js +62 -0
- package/dist/switch.mjs +37 -0
- package/dist/table.js +110 -0
- package/dist/table.mjs +101 -0
- package/dist/tabs.js +82 -0
- package/dist/tabs.mjs +57 -0
- package/dist/tailwind/index.js +2023 -0
- package/dist/tailwind/index.mjs +2011 -0
- package/dist/textarea.js +78 -0
- package/dist/textarea.mjs +56 -0
- package/dist/toggle-group.js +118 -0
- package/dist/toggle-group.mjs +93 -0
- package/dist/toggle.js +71 -0
- package/dist/toggle.mjs +48 -0
- package/dist/tooltip.js +67 -0
- package/dist/tooltip.mjs +40 -0
- package/dist/types/index.js +57 -0
- package/dist/types/index.mjs +51 -0
- package/dist/ui/announcement.js +129 -0
- package/dist/ui/announcement.mjs +107 -0
- package/dist/ui/avatar-group.js +88 -0
- package/dist/ui/avatar-group.mjs +65 -0
- package/dist/ui/banner.js +85 -0
- package/dist/ui/banner.mjs +62 -0
- package/dist/ui/cursor.js +78 -0
- package/dist/ui/cursor.mjs +56 -0
- package/dist/ui/index.js +475 -0
- package/dist/ui/index.mjs +442 -0
- package/dist/ui/marquee.js +74 -0
- package/dist/ui/marquee.mjs +52 -0
- package/dist/ui/pill.js +85 -0
- package/dist/ui/pill.mjs +62 -0
- package/dist/ui/spinner.js +28 -0
- package/dist/ui/spinner.mjs +26 -0
- package/dist/ui/tags.js +101 -0
- package/dist/ui/tags.mjs +79 -0
- package/dist/ui/ticker.js +73 -0
- package/dist/ui/ticker.mjs +51 -0
- package/dist/util/index.js +463 -0
- package/dist/util/index.mjs +404 -0
- package/package.json +1 -1
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var framerMotion = require('framer-motion');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
29
|
+
|
|
30
|
+
var __defProp = Object.defineProperty;
|
|
31
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
32
|
+
function cn(...inputs) {
|
|
33
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
34
|
+
}
|
|
35
|
+
__name(cn, "cn");
|
|
36
|
+
var DockContext = React__namespace.createContext({
|
|
37
|
+
magnification: 60,
|
|
38
|
+
distance: 140,
|
|
39
|
+
mouseX: null
|
|
40
|
+
});
|
|
41
|
+
var Dock = React__namespace.forwardRef(
|
|
42
|
+
({ className, children, magnification = 60, distance = 140 }, ref) => {
|
|
43
|
+
const mouseX = framerMotion.useMotionValue(Infinity);
|
|
44
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DockContext.Provider, { value: { magnification, distance, mouseX }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
framerMotion.motion.div,
|
|
46
|
+
{
|
|
47
|
+
ref,
|
|
48
|
+
onMouseMove: (e) => mouseX.set(e.pageX),
|
|
49
|
+
onMouseLeave: () => mouseX.set(Infinity),
|
|
50
|
+
className: cn(
|
|
51
|
+
"mx-auto flex h-16 items-end gap-2 rounded-2xl border border-white/10 bg-black/10 px-3 pb-2 backdrop-blur-xl",
|
|
52
|
+
"shadow-2xl shadow-black/20",
|
|
53
|
+
"before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
children
|
|
57
|
+
}
|
|
58
|
+
) });
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
Dock.displayName = "Dock";
|
|
62
|
+
var DockItem = React__namespace.forwardRef(
|
|
63
|
+
({ className, children, onClick, tooltip }, ref) => {
|
|
64
|
+
const buttonRef = React__namespace.useRef(null);
|
|
65
|
+
const { magnification, distance, mouseX } = React__namespace.useContext(DockContext);
|
|
66
|
+
const [isHovered, setIsHovered] = React__namespace.useState(false);
|
|
67
|
+
const distanceCalc = framerMotion.useTransform(mouseX, (val) => {
|
|
68
|
+
const bounds = buttonRef.current?.getBoundingClientRect() ?? {
|
|
69
|
+
x: 0,
|
|
70
|
+
width: 0
|
|
71
|
+
};
|
|
72
|
+
return val - bounds.x - bounds.width / 2;
|
|
73
|
+
});
|
|
74
|
+
const widthSync = framerMotion.useTransform(
|
|
75
|
+
distanceCalc,
|
|
76
|
+
[-distance, 0, distance],
|
|
77
|
+
[48, 48 + magnification, 48]
|
|
78
|
+
);
|
|
79
|
+
const width = framerMotion.useSpring(widthSync, {
|
|
80
|
+
mass: 0.1,
|
|
81
|
+
stiffness: 150,
|
|
82
|
+
damping: 12
|
|
83
|
+
});
|
|
84
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
+
framerMotion.motion.div,
|
|
86
|
+
{
|
|
87
|
+
className: "relative",
|
|
88
|
+
onMouseEnter: () => setIsHovered(true),
|
|
89
|
+
onMouseLeave: () => setIsHovered(false),
|
|
90
|
+
children: [
|
|
91
|
+
tooltip && isHovered && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
92
|
+
framerMotion.motion.div,
|
|
93
|
+
{
|
|
94
|
+
initial: { opacity: 0, y: 10, scale: 0.9 },
|
|
95
|
+
animate: { opacity: 1, y: 0, scale: 1 },
|
|
96
|
+
exit: { opacity: 0, y: 5, scale: 0.95 },
|
|
97
|
+
transition: { duration: 0.15 },
|
|
98
|
+
className: "absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",
|
|
99
|
+
children: [
|
|
100
|
+
tooltip,
|
|
101
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80" })
|
|
102
|
+
]
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
106
|
+
framerMotion.motion.button,
|
|
107
|
+
{
|
|
108
|
+
ref: buttonRef,
|
|
109
|
+
style: { width },
|
|
110
|
+
whileTap: { scale: 0.95 },
|
|
111
|
+
onClick,
|
|
112
|
+
className: cn(
|
|
113
|
+
"aspect-square w-12 rounded-xl bg-white/10 backdrop-blur-md transition-colors",
|
|
114
|
+
"hover:bg-white/20",
|
|
115
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",
|
|
116
|
+
"relative overflow-hidden",
|
|
117
|
+
className
|
|
118
|
+
),
|
|
119
|
+
children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full w-full items-center justify-center", children }),
|
|
121
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
className: "pointer-events-none absolute inset-0 rounded-xl",
|
|
125
|
+
style: {
|
|
126
|
+
background: "linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
)
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
);
|
|
138
|
+
DockItem.displayName = "DockItem";
|
|
139
|
+
|
|
140
|
+
exports.Dock = Dock;
|
|
141
|
+
exports.DockItem = DockItem;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useMotionValue, motion, useTransform, useSpring } from 'framer-motion';
|
|
4
|
+
import { clsx } from 'clsx';
|
|
5
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
__name(cn, "cn");
|
|
14
|
+
var DockContext = React.createContext({
|
|
15
|
+
magnification: 60,
|
|
16
|
+
distance: 140,
|
|
17
|
+
mouseX: null
|
|
18
|
+
});
|
|
19
|
+
var Dock = React.forwardRef(
|
|
20
|
+
({ className, children, magnification = 60, distance = 140 }, ref) => {
|
|
21
|
+
const mouseX = useMotionValue(Infinity);
|
|
22
|
+
return /* @__PURE__ */ jsx(DockContext.Provider, { value: { magnification, distance, mouseX }, children: /* @__PURE__ */ jsx(
|
|
23
|
+
motion.div,
|
|
24
|
+
{
|
|
25
|
+
ref,
|
|
26
|
+
onMouseMove: (e) => mouseX.set(e.pageX),
|
|
27
|
+
onMouseLeave: () => mouseX.set(Infinity),
|
|
28
|
+
className: cn(
|
|
29
|
+
"mx-auto flex h-16 items-end gap-2 rounded-2xl border border-white/10 bg-black/10 px-3 pb-2 backdrop-blur-xl",
|
|
30
|
+
"shadow-2xl shadow-black/20",
|
|
31
|
+
"before:absolute before:inset-0 before:rounded-2xl before:bg-gradient-to-b before:from-white/10 before:to-transparent before:opacity-50",
|
|
32
|
+
className
|
|
33
|
+
),
|
|
34
|
+
children
|
|
35
|
+
}
|
|
36
|
+
) });
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
Dock.displayName = "Dock";
|
|
40
|
+
var DockItem = React.forwardRef(
|
|
41
|
+
({ className, children, onClick, tooltip }, ref) => {
|
|
42
|
+
const buttonRef = React.useRef(null);
|
|
43
|
+
const { magnification, distance, mouseX } = React.useContext(DockContext);
|
|
44
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
45
|
+
const distanceCalc = useTransform(mouseX, (val) => {
|
|
46
|
+
const bounds = buttonRef.current?.getBoundingClientRect() ?? {
|
|
47
|
+
x: 0,
|
|
48
|
+
width: 0
|
|
49
|
+
};
|
|
50
|
+
return val - bounds.x - bounds.width / 2;
|
|
51
|
+
});
|
|
52
|
+
const widthSync = useTransform(
|
|
53
|
+
distanceCalc,
|
|
54
|
+
[-distance, 0, distance],
|
|
55
|
+
[48, 48 + magnification, 48]
|
|
56
|
+
);
|
|
57
|
+
const width = useSpring(widthSync, {
|
|
58
|
+
mass: 0.1,
|
|
59
|
+
stiffness: 150,
|
|
60
|
+
damping: 12
|
|
61
|
+
});
|
|
62
|
+
return /* @__PURE__ */ jsxs(
|
|
63
|
+
motion.div,
|
|
64
|
+
{
|
|
65
|
+
className: "relative",
|
|
66
|
+
onMouseEnter: () => setIsHovered(true),
|
|
67
|
+
onMouseLeave: () => setIsHovered(false),
|
|
68
|
+
children: [
|
|
69
|
+
tooltip && isHovered && /* @__PURE__ */ jsxs(
|
|
70
|
+
motion.div,
|
|
71
|
+
{
|
|
72
|
+
initial: { opacity: 0, y: 10, scale: 0.9 },
|
|
73
|
+
animate: { opacity: 1, y: 0, scale: 1 },
|
|
74
|
+
exit: { opacity: 0, y: 5, scale: 0.95 },
|
|
75
|
+
transition: { duration: 0.15 },
|
|
76
|
+
className: "absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded-lg bg-black/80 px-2 py-1 text-xs text-white backdrop-blur-md",
|
|
77
|
+
children: [
|
|
78
|
+
tooltip,
|
|
79
|
+
/* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 left-1/2 h-2 w-2 -translate-x-1/2 rotate-45 bg-black/80" })
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsxs(
|
|
84
|
+
motion.button,
|
|
85
|
+
{
|
|
86
|
+
ref: buttonRef,
|
|
87
|
+
style: { width },
|
|
88
|
+
whileTap: { scale: 0.95 },
|
|
89
|
+
onClick,
|
|
90
|
+
className: cn(
|
|
91
|
+
"aspect-square w-12 rounded-xl bg-white/10 backdrop-blur-md transition-colors",
|
|
92
|
+
"hover:bg-white/20",
|
|
93
|
+
"focus:outline-none focus-visible:ring-2 focus-visible:ring-white/50",
|
|
94
|
+
"relative overflow-hidden",
|
|
95
|
+
className
|
|
96
|
+
),
|
|
97
|
+
children: [
|
|
98
|
+
/* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center", children }),
|
|
99
|
+
/* @__PURE__ */ jsx(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
className: "pointer-events-none absolute inset-0 rounded-xl",
|
|
103
|
+
style: {
|
|
104
|
+
background: "linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%)"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
DockItem.displayName = "DockItem";
|
|
117
|
+
|
|
118
|
+
export { Dock, DockItem };
|
|
@@ -0,0 +1,70 @@
|
|
|
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 MenuDock = React__namespace.forwardRef(
|
|
36
|
+
({ className, items, orientation = "horizontal", ...props }, ref) => {
|
|
37
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
+
"div",
|
|
39
|
+
{
|
|
40
|
+
ref,
|
|
41
|
+
className: cn(
|
|
42
|
+
"flex gap-2 rounded-full border bg-background/95 p-2 shadow-lg backdrop-blur",
|
|
43
|
+
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
...props,
|
|
47
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
48
|
+
"button",
|
|
49
|
+
{
|
|
50
|
+
onClick: item.onClick,
|
|
51
|
+
className: cn(
|
|
52
|
+
"group relative flex items-center justify-center rounded-full p-3 transition-colors hover:bg-accent",
|
|
53
|
+
item.active && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
54
|
+
),
|
|
55
|
+
title: item.label,
|
|
56
|
+
children: [
|
|
57
|
+
item.icon,
|
|
58
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: item.label }),
|
|
59
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap rounded bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 transition-opacity group-hover:opacity-100", children: item.label })
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
index
|
|
63
|
+
))
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
MenuDock.displayName = "MenuDock";
|
|
69
|
+
|
|
70
|
+
exports.MenuDock = MenuDock;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { clsx } from 'clsx';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { jsx, jsxs } 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 MenuDock = React.forwardRef(
|
|
14
|
+
({ className, items, orientation = "horizontal", ...props }, ref) => {
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
"div",
|
|
17
|
+
{
|
|
18
|
+
ref,
|
|
19
|
+
className: cn(
|
|
20
|
+
"flex gap-2 rounded-full border bg-background/95 p-2 shadow-lg backdrop-blur",
|
|
21
|
+
orientation === "vertical" ? "flex-col" : "flex-row",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props,
|
|
25
|
+
children: items.map((item, index) => /* @__PURE__ */ jsxs(
|
|
26
|
+
"button",
|
|
27
|
+
{
|
|
28
|
+
onClick: item.onClick,
|
|
29
|
+
className: cn(
|
|
30
|
+
"group relative flex items-center justify-center rounded-full p-3 transition-colors hover:bg-accent",
|
|
31
|
+
item.active && "bg-primary text-primary-foreground hover:bg-primary/90"
|
|
32
|
+
),
|
|
33
|
+
title: item.label,
|
|
34
|
+
children: [
|
|
35
|
+
item.icon,
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: item.label }),
|
|
37
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -top-8 left-1/2 -translate-x-1/2 whitespace-nowrap rounded bg-popover px-2 py-1 text-xs text-popover-foreground opacity-0 transition-opacity group-hover:opacity-100", children: item.label })
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
index
|
|
41
|
+
))
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
MenuDock.displayName = "MenuDock";
|
|
47
|
+
|
|
48
|
+
export { MenuDock };
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var lucideReact = require('lucide-react');
|
|
6
|
+
var clsx = require('clsx');
|
|
7
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
|
+
var reactSlot = require('@radix-ui/react-slot');
|
|
9
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
11
|
+
|
|
12
|
+
function _interopNamespace(e) {
|
|
13
|
+
if (e && e.__esModule) return e;
|
|
14
|
+
var n = Object.create(null);
|
|
15
|
+
if (e) {
|
|
16
|
+
Object.keys(e).forEach(function (k) {
|
|
17
|
+
if (k !== 'default') {
|
|
18
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
19
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return e[k]; }
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
n.default = e;
|
|
27
|
+
return Object.freeze(n);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
31
|
+
|
|
32
|
+
var __defProp = Object.defineProperty;
|
|
33
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
34
|
+
function cn(...inputs) {
|
|
35
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
36
|
+
}
|
|
37
|
+
__name(cn, "cn");
|
|
38
|
+
var buttonVariants = classVarianceAuthority.cva(
|
|
39
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
variant: {
|
|
43
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
44
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
45
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
46
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
47
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
48
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
49
|
+
// Keep the additional Hanzo variants for backward compatibility
|
|
50
|
+
primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
51
|
+
linkFG: "text-primary underline-offset-4 hover:underline",
|
|
52
|
+
linkMuted: "text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"
|
|
53
|
+
},
|
|
54
|
+
size: {
|
|
55
|
+
default: "h-9 px-4 py-2",
|
|
56
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
57
|
+
lg: "h-10 rounded-md px-8",
|
|
58
|
+
icon: "h-9 w-9"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
variant: "default",
|
|
63
|
+
size: "default"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
var Button = React__namespace.forwardRef(
|
|
68
|
+
({ className, variant, size, asChild = false, isLoading = false, children, ...props }, ref) => {
|
|
69
|
+
const Comp = asChild ? reactSlot.Slot : "button";
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
71
|
+
Comp,
|
|
72
|
+
{
|
|
73
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
74
|
+
ref,
|
|
75
|
+
...props,
|
|
76
|
+
children: [
|
|
77
|
+
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
78
|
+
lucideReact.Loader2,
|
|
79
|
+
{
|
|
80
|
+
className: cn("h-4 w-4 animate-spin", size !== "icon" && "mr-2")
|
|
81
|
+
}
|
|
82
|
+
) : null,
|
|
83
|
+
isLoading && size === "icon" ? null : children
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
Button.displayName = "Button";
|
|
90
|
+
var MessageDock = React__namespace.forwardRef(
|
|
91
|
+
({ className, messages, onClose, position = "bottom-right", ...props }, ref) => {
|
|
92
|
+
const positionClasses = {
|
|
93
|
+
top: "top-4 left-1/2 -translate-x-1/2",
|
|
94
|
+
bottom: "bottom-4 left-1/2 -translate-x-1/2",
|
|
95
|
+
"top-right": "top-4 right-4",
|
|
96
|
+
"bottom-right": "bottom-4 right-4"
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref,
|
|
102
|
+
className: cn(
|
|
103
|
+
"fixed z-50 flex flex-col gap-2",
|
|
104
|
+
positionClasses[position],
|
|
105
|
+
className
|
|
106
|
+
),
|
|
107
|
+
...props,
|
|
108
|
+
children: messages.map((message) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
className: cn(
|
|
112
|
+
"min-w-[300px] rounded-lg border p-4 shadow-lg",
|
|
113
|
+
message.type === "success" && "border-green-500 bg-green-50 dark:bg-green-950",
|
|
114
|
+
message.type === "warning" && "border-yellow-500 bg-yellow-50 dark:bg-yellow-950",
|
|
115
|
+
message.type === "error" && "border-red-500 bg-red-50 dark:bg-red-950",
|
|
116
|
+
message.type === "info" && "border-blue-500 bg-blue-50 dark:bg-blue-950",
|
|
117
|
+
!message.type && "bg-background"
|
|
118
|
+
),
|
|
119
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
120
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
|
|
121
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-medium", children: message.title }),
|
|
122
|
+
message.description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: message.description })
|
|
123
|
+
] }),
|
|
124
|
+
onClose && /* @__PURE__ */ jsxRuntime.jsx(
|
|
125
|
+
Button,
|
|
126
|
+
{
|
|
127
|
+
variant: "ghost",
|
|
128
|
+
size: "icon",
|
|
129
|
+
className: "h-6 w-6",
|
|
130
|
+
onClick: () => onClose(message.id),
|
|
131
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
132
|
+
}
|
|
133
|
+
)
|
|
134
|
+
] })
|
|
135
|
+
},
|
|
136
|
+
message.id
|
|
137
|
+
))
|
|
138
|
+
}
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
MessageDock.displayName = "MessageDock";
|
|
143
|
+
|
|
144
|
+
exports.MessageDock = MessageDock;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { Loader2, X } 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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
12
|
+
function cn(...inputs) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
15
|
+
__name(cn, "cn");
|
|
16
|
+
var buttonVariants = cva(
|
|
17
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
variant: {
|
|
21
|
+
default: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
22
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",
|
|
23
|
+
outline: "border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
24
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",
|
|
25
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
27
|
+
// Keep the additional Hanzo variants for backward compatibility
|
|
28
|
+
primary: "bg-primary text-primary-foreground shadow hover:bg-primary/90",
|
|
29
|
+
linkFG: "text-primary underline-offset-4 hover:underline",
|
|
30
|
+
linkMuted: "text-muted-foreground underline-offset-4 hover:underline hover:text-foreground"
|
|
31
|
+
},
|
|
32
|
+
size: {
|
|
33
|
+
default: "h-9 px-4 py-2",
|
|
34
|
+
sm: "h-8 rounded-md px-3 text-xs",
|
|
35
|
+
lg: "h-10 rounded-md px-8",
|
|
36
|
+
icon: "h-9 w-9"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
variant: "default",
|
|
41
|
+
size: "default"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
var Button = React.forwardRef(
|
|
46
|
+
({ className, variant, size, asChild = false, isLoading = false, children, ...props }, ref) => {
|
|
47
|
+
const Comp = asChild ? Slot : "button";
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
Comp,
|
|
50
|
+
{
|
|
51
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
52
|
+
ref,
|
|
53
|
+
...props,
|
|
54
|
+
children: [
|
|
55
|
+
isLoading ? /* @__PURE__ */ jsx(
|
|
56
|
+
Loader2,
|
|
57
|
+
{
|
|
58
|
+
className: cn("h-4 w-4 animate-spin", size !== "icon" && "mr-2")
|
|
59
|
+
}
|
|
60
|
+
) : null,
|
|
61
|
+
isLoading && size === "icon" ? null : children
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
Button.displayName = "Button";
|
|
68
|
+
var MessageDock = React.forwardRef(
|
|
69
|
+
({ className, messages, onClose, position = "bottom-right", ...props }, ref) => {
|
|
70
|
+
const positionClasses = {
|
|
71
|
+
top: "top-4 left-1/2 -translate-x-1/2",
|
|
72
|
+
bottom: "bottom-4 left-1/2 -translate-x-1/2",
|
|
73
|
+
"top-right": "top-4 right-4",
|
|
74
|
+
"bottom-right": "bottom-4 right-4"
|
|
75
|
+
};
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
ref,
|
|
80
|
+
className: cn(
|
|
81
|
+
"fixed z-50 flex flex-col gap-2",
|
|
82
|
+
positionClasses[position],
|
|
83
|
+
className
|
|
84
|
+
),
|
|
85
|
+
...props,
|
|
86
|
+
children: messages.map((message) => /* @__PURE__ */ jsx(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: cn(
|
|
90
|
+
"min-w-[300px] rounded-lg border p-4 shadow-lg",
|
|
91
|
+
message.type === "success" && "border-green-500 bg-green-50 dark:bg-green-950",
|
|
92
|
+
message.type === "warning" && "border-yellow-500 bg-yellow-50 dark:bg-yellow-950",
|
|
93
|
+
message.type === "error" && "border-red-500 bg-red-50 dark:bg-red-950",
|
|
94
|
+
message.type === "info" && "border-blue-500 bg-blue-50 dark:bg-blue-950",
|
|
95
|
+
!message.type && "bg-background"
|
|
96
|
+
),
|
|
97
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
98
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
|
|
99
|
+
/* @__PURE__ */ jsx("h4", { className: "font-medium", children: message.title }),
|
|
100
|
+
message.description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-muted-foreground", children: message.description })
|
|
101
|
+
] }),
|
|
102
|
+
onClose && /* @__PURE__ */ jsx(
|
|
103
|
+
Button,
|
|
104
|
+
{
|
|
105
|
+
variant: "ghost",
|
|
106
|
+
size: "icon",
|
|
107
|
+
className: "h-6 w-6",
|
|
108
|
+
onClick: () => onClose(message.id),
|
|
109
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] })
|
|
113
|
+
},
|
|
114
|
+
message.id
|
|
115
|
+
))
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
MessageDock.displayName = "MessageDock";
|
|
121
|
+
|
|
122
|
+
export { MessageDock };
|