kineto 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +279 -0
- package/base.css +46 -0
- package/dist/accordion.d.ts +13 -0
- package/dist/accordion.js +161 -0
- package/dist/accordion.js.map +1 -0
- package/dist/alert.d.ts +20 -0
- package/dist/alert.js +137 -0
- package/dist/alert.js.map +1 -0
- package/dist/animated-number.d.ts +16 -0
- package/dist/animated-number.js +40 -0
- package/dist/animated-number.js.map +1 -0
- package/dist/area-chart.d.ts +16 -0
- package/dist/area-chart.js +138 -0
- package/dist/area-chart.js.map +1 -0
- package/dist/aspect-ratio.d.ts +6 -0
- package/dist/aspect-ratio.js +9 -0
- package/dist/aspect-ratio.js.map +1 -0
- package/dist/avatar.d.ts +18 -0
- package/dist/avatar.js +202 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge.d.ts +14 -0
- package/dist/badge.js +54 -0
- package/dist/badge.js.map +1 -0
- package/dist/bar-chart.d.ts +19 -0
- package/dist/bar-chart.js +139 -0
- package/dist/bar-chart.js.map +1 -0
- package/dist/bento-grid.d.ts +24 -0
- package/dist/bento-grid.js +129 -0
- package/dist/bento-grid.js.map +1 -0
- package/dist/breadcrumbs.d.ts +13 -0
- package/dist/breadcrumbs.js +50 -0
- package/dist/breadcrumbs.js.map +1 -0
- package/dist/button-group.d.ts +9 -0
- package/dist/button-group.js +29 -0
- package/dist/button-group.js.map +1 -0
- package/dist/button.d.ts +16 -0
- package/dist/button.js +131 -0
- package/dist/button.js.map +1 -0
- package/dist/calendar.d.ts +11 -0
- package/dist/calendar.js +185 -0
- package/dist/calendar.js.map +1 -0
- package/dist/card.d.ts +15 -0
- package/dist/card.js +131 -0
- package/dist/card.js.map +1 -0
- package/dist/carousel.d.ts +14 -0
- package/dist/carousel.js +143 -0
- package/dist/carousel.js.map +1 -0
- package/dist/chart-tooltip.d.ts +18 -0
- package/dist/chart-tooltip.js +30 -0
- package/dist/chart-tooltip.js.map +1 -0
- package/dist/checkbox.d.ts +6 -0
- package/dist/checkbox.js +88 -0
- package/dist/checkbox.js.map +1 -0
- package/dist/cn.d.ts +10 -0
- package/dist/cn.js +10 -0
- package/dist/cn.js.map +1 -0
- package/dist/code-block.d.ts +25 -0
- package/dist/code-block.js +155 -0
- package/dist/code-block.js.map +1 -0
- package/dist/collapsible.d.ts +12 -0
- package/dist/collapsible.js +125 -0
- package/dist/collapsible.js.map +1 -0
- package/dist/color-picker.d.ts +12 -0
- package/dist/color-picker.js +180 -0
- package/dist/color-picker.js.map +1 -0
- package/dist/command.d.ts +88 -0
- package/dist/command.js +277 -0
- package/dist/command.js.map +1 -0
- package/dist/confetti.d.ts +25 -0
- package/dist/confetti.js +109 -0
- package/dist/confetti.js.map +1 -0
- package/dist/container.d.ts +19 -0
- package/dist/container.js +41 -0
- package/dist/container.js.map +1 -0
- package/dist/content-divider.d.ts +7 -0
- package/dist/content-divider.js +35 -0
- package/dist/content-divider.js.map +1 -0
- package/dist/context-menu.d.ts +30 -0
- package/dist/context-menu.js +213 -0
- package/dist/context-menu.js.map +1 -0
- package/dist/copy-button.d.ts +17 -0
- package/dist/copy-button.js +107 -0
- package/dist/copy-button.js.map +1 -0
- package/dist/dashboard-showcase.d.ts +7 -0
- package/dist/dashboard-showcase.js +2560 -0
- package/dist/dashboard-showcase.js.map +1 -0
- package/dist/data-table.d.ts +130 -0
- package/dist/data-table.js +1620 -0
- package/dist/data-table.js.map +1 -0
- package/dist/date-picker.d.ts +12 -0
- package/dist/date-picker.js +261 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/dialog.d.ts +23 -0
- package/dist/dialog.js +188 -0
- package/dist/dialog.js.map +1 -0
- package/dist/dock.d.ts +17 -0
- package/dist/dock.js +77 -0
- package/dist/dock.js.map +1 -0
- package/dist/donut-chart.d.ts +18 -0
- package/dist/donut-chart.js +92 -0
- package/dist/donut-chart.js.map +1 -0
- package/dist/drawer.d.ts +26 -0
- package/dist/drawer.js +166 -0
- package/dist/drawer.js.map +1 -0
- package/dist/dropdown-menu.d.ts +22 -0
- package/dist/dropdown-menu.js +163 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/empty-state.d.ts +13 -0
- package/dist/empty-state.js +149 -0
- package/dist/empty-state.js.map +1 -0
- package/dist/featured-icon.d.ts +16 -0
- package/dist/featured-icon.js +56 -0
- package/dist/featured-icon.js.map +1 -0
- package/dist/file-uploader.d.ts +11 -0
- package/dist/file-uploader.js +212 -0
- package/dist/file-uploader.js.map +1 -0
- package/dist/flex.d.ts +30 -0
- package/dist/flex.js +89 -0
- package/dist/flex.js.map +1 -0
- package/dist/form.d.ts +28 -0
- package/dist/form.js +139 -0
- package/dist/form.js.map +1 -0
- package/dist/format-time.d.ts +18 -0
- package/dist/format-time.js +54 -0
- package/dist/format-time.js.map +1 -0
- package/dist/gap.d.ts +9 -0
- package/dist/gap.js +34 -0
- package/dist/gap.js.map +1 -0
- package/dist/gradient-border.d.ts +15 -0
- package/dist/gradient-border.js +79 -0
- package/dist/gradient-border.js.map +1 -0
- package/dist/gradient-text.d.ts +12 -0
- package/dist/gradient-text.js +43 -0
- package/dist/gradient-text.js.map +1 -0
- package/dist/grid.d.ts +25 -0
- package/dist/grid.js +77 -0
- package/dist/grid.js.map +1 -0
- package/dist/hover-card.d.ts +8 -0
- package/dist/hover-card.js +93 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/index.d.ts +93 -0
- package/dist/index.js +93 -0
- package/dist/inline-edit.d.ts +20 -0
- package/dist/inline-edit.js +107 -0
- package/dist/inline-edit.js.map +1 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.js +31 -0
- package/dist/input.js.map +1 -0
- package/dist/kbd.d.ts +16 -0
- package/dist/kbd.js +35 -0
- package/dist/kbd.js.map +1 -0
- package/dist/label.d.ts +6 -0
- package/dist/label.js +31 -0
- package/dist/label.js.map +1 -0
- package/dist/line-chart.d.ts +17 -0
- package/dist/line-chart.js +120 -0
- package/dist/line-chart.js.map +1 -0
- package/dist/logo-cloud.d.ts +14 -0
- package/dist/logo-cloud.js +106 -0
- package/dist/logo-cloud.js.map +1 -0
- package/dist/masonry.d.ts +15 -0
- package/dist/masonry.js +63 -0
- package/dist/masonry.js.map +1 -0
- package/dist/menubar.d.ts +31 -0
- package/dist/menubar.js +250 -0
- package/dist/menubar.js.map +1 -0
- package/dist/motion-presets.d.ts +70 -0
- package/dist/motion-presets.js +71 -0
- package/dist/motion-presets.js.map +1 -0
- package/dist/navigation-menu.d.ts +15 -0
- package/dist/navigation-menu.js +181 -0
- package/dist/navigation-menu.js.map +1 -0
- package/dist/notification-center.d.ts +35 -0
- package/dist/notification-center.js +384 -0
- package/dist/notification-center.js.map +1 -0
- package/dist/page-header.d.ts +13 -0
- package/dist/page-header.js +37 -0
- package/dist/page-header.js.map +1 -0
- package/dist/pagination.d.ts +13 -0
- package/dist/pagination.js +103 -0
- package/dist/pagination.js.map +1 -0
- package/dist/popover.d.ts +9 -0
- package/dist/popover.js +93 -0
- package/dist/popover.js.map +1 -0
- package/dist/progress-steps.d.ts +17 -0
- package/dist/progress-steps.js +158 -0
- package/dist/progress-steps.js.map +1 -0
- package/dist/progress.d.ts +13 -0
- package/dist/progress.js +98 -0
- package/dist/progress.js.map +1 -0
- package/dist/radio-group.d.ts +7 -0
- package/dist/radio-group.js +94 -0
- package/dist/radio-group.js.map +1 -0
- package/dist/rating.d.ts +18 -0
- package/dist/rating.js +122 -0
- package/dist/rating.js.map +1 -0
- package/dist/relative-time.d.ts +19 -0
- package/dist/relative-time.js +187 -0
- package/dist/relative-time.js.map +1 -0
- package/dist/resizable.d.ts +27 -0
- package/dist/resizable.js +50 -0
- package/dist/resizable.js.map +1 -0
- package/dist/scroll-area.d.ts +20 -0
- package/dist/scroll-area.js +94 -0
- package/dist/scroll-area.js.map +1 -0
- package/dist/segmented-control.d.ts +16 -0
- package/dist/segmented-control.js +139 -0
- package/dist/segmented-control.js.map +1 -0
- package/dist/select.d.ts +13 -0
- package/dist/select.js +153 -0
- package/dist/select.js.map +1 -0
- package/dist/separator.d.ts +6 -0
- package/dist/separator.js +36 -0
- package/dist/separator.js.map +1 -0
- package/dist/sidebar.d.ts +24 -0
- package/dist/sidebar.js +150 -0
- package/dist/sidebar.js.map +1 -0
- package/dist/skeleton.d.ts +6 -0
- package/dist/skeleton.js +42 -0
- package/dist/skeleton.js.map +1 -0
- package/dist/slider.d.ts +6 -0
- package/dist/slider.js +44 -0
- package/dist/slider.js.map +1 -0
- package/dist/social-button.d.ts +14 -0
- package/dist/social-button.js +203 -0
- package/dist/social-button.js.map +1 -0
- package/dist/spacer.d.ts +19 -0
- package/dist/spacer.js +52 -0
- package/dist/spacer.js.map +1 -0
- package/dist/spinner.d.ts +15 -0
- package/dist/spinner.js +48 -0
- package/dist/spinner.js.map +1 -0
- package/dist/stack.d.ts +27 -0
- package/dist/stack.js +77 -0
- package/dist/stack.js.map +1 -0
- package/dist/stat-card.d.ts +26 -0
- package/dist/stat-card.js +198 -0
- package/dist/stat-card.js.map +1 -0
- package/dist/status-dot.d.ts +26 -0
- package/dist/status-dot.js +68 -0
- package/dist/status-dot.js.map +1 -0
- package/dist/switch.d.ts +6 -0
- package/dist/switch.js +108 -0
- package/dist/switch.js.map +1 -0
- package/dist/tabs.d.ts +13 -0
- package/dist/tabs.js +167 -0
- package/dist/tabs.js.map +1 -0
- package/dist/tag.d.ts +16 -0
- package/dist/tag.js +53 -0
- package/dist/tag.js.map +1 -0
- package/dist/textarea.d.ts +6 -0
- package/dist/textarea.js +30 -0
- package/dist/textarea.js.map +1 -0
- package/dist/theme-switcher.d.ts +16 -0
- package/dist/theme-switcher.js +170 -0
- package/dist/theme-switcher.js.map +1 -0
- package/dist/toast.d.ts +20 -0
- package/dist/toast.js +162 -0
- package/dist/toast.js.map +1 -0
- package/dist/tooltip.d.ts +14 -0
- package/dist/tooltip.js +98 -0
- package/dist/tooltip.js.map +1 -0
- package/dist/tree-view.d.ts +16 -0
- package/dist/tree-view.js +123 -0
- package/dist/tree-view.js.map +1 -0
- package/dist/truncate.d.ts +16 -0
- package/dist/truncate.js +151 -0
- package/dist/truncate.js.map +1 -0
- package/dist/use-reduced-motion.d.ts +15 -0
- package/dist/use-reduced-motion.js +11 -0
- package/dist/use-reduced-motion.js.map +1 -0
- package/dist/verification-code-input.d.ts +12 -0
- package/dist/verification-code-input.js +90 -0
- package/dist/verification-code-input.js.map +1 -0
- package/package.json +131 -0
- package/theme.css +343 -0
package/dist/drawer.js
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/ui/drawer.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
6
|
+
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
|
|
7
|
+
import { X } from "lucide-react";
|
|
8
|
+
|
|
9
|
+
// src/lib/cn.ts
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { twMerge } from "tailwind-merge";
|
|
12
|
+
function cn(...inputs) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/lib/motion-presets.ts
|
|
17
|
+
var spring = {
|
|
18
|
+
/** Quick, decisive — buttons, indicators, dropdowns. */
|
|
19
|
+
snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
|
|
20
|
+
/** Calm and weighty — dialogs, cards, larger surfaces. */
|
|
21
|
+
soft: { type: "spring", stiffness: 180, damping: 26 },
|
|
22
|
+
/** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
|
|
23
|
+
bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
|
|
24
|
+
};
|
|
25
|
+
var tween = {
|
|
26
|
+
/** The signature easing — an expressive ease-out for orchestrated reveals. */
|
|
27
|
+
smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
|
|
28
|
+
/** Faster variant for small elements. */
|
|
29
|
+
quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
|
|
30
|
+
/** Longer, settled curve for drawing charts, count-ups, and progress fills. */
|
|
31
|
+
draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
|
|
32
|
+
};
|
|
33
|
+
var fadeUp = {
|
|
34
|
+
hidden: { opacity: 0, y: 18 },
|
|
35
|
+
visible: { opacity: 1, y: 0, transition: tween.smooth }
|
|
36
|
+
};
|
|
37
|
+
var fadeIn = {
|
|
38
|
+
hidden: { opacity: 0 },
|
|
39
|
+
visible: { opacity: 1, transition: tween.smooth }
|
|
40
|
+
};
|
|
41
|
+
var scaleIn = {
|
|
42
|
+
hidden: { opacity: 0, scale: 0.96 },
|
|
43
|
+
visible: { opacity: 1, scale: 1, transition: spring.soft }
|
|
44
|
+
};
|
|
45
|
+
var slideInLeft = {
|
|
46
|
+
hidden: { opacity: 0, x: -28 },
|
|
47
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
48
|
+
};
|
|
49
|
+
var slideInRight = {
|
|
50
|
+
hidden: { opacity: 0, x: 28 },
|
|
51
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
52
|
+
};
|
|
53
|
+
var blurIn = {
|
|
54
|
+
hidden: { opacity: 0, filter: "blur(12px)" },
|
|
55
|
+
visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/components/ui/drawer.tsx
|
|
59
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
60
|
+
function useControllableState({
|
|
61
|
+
prop,
|
|
62
|
+
defaultProp,
|
|
63
|
+
onChange
|
|
64
|
+
}) {
|
|
65
|
+
const [uncontrolled, setUncontrolled] = React.useState(defaultProp);
|
|
66
|
+
const isControlled = prop !== void 0;
|
|
67
|
+
const value = isControlled ? prop : uncontrolled;
|
|
68
|
+
const setValue = React.useCallback(
|
|
69
|
+
(next) => {
|
|
70
|
+
if (!isControlled) setUncontrolled(next);
|
|
71
|
+
onChange?.(next);
|
|
72
|
+
},
|
|
73
|
+
[isControlled, onChange]
|
|
74
|
+
);
|
|
75
|
+
return [value, setValue];
|
|
76
|
+
}
|
|
77
|
+
var DrawerOpenContext = React.createContext(false);
|
|
78
|
+
var Drawer = ({
|
|
79
|
+
open,
|
|
80
|
+
defaultOpen = false,
|
|
81
|
+
onOpenChange,
|
|
82
|
+
children,
|
|
83
|
+
...props
|
|
84
|
+
}) => {
|
|
85
|
+
const [isOpen, setIsOpen] = useControllableState({
|
|
86
|
+
prop: open,
|
|
87
|
+
defaultProp: defaultOpen,
|
|
88
|
+
onChange: onOpenChange
|
|
89
|
+
});
|
|
90
|
+
return /* @__PURE__ */ jsx(DialogPrimitive.Root, { open: isOpen, onOpenChange: setIsOpen, ...props, children: /* @__PURE__ */ jsx(DrawerOpenContext.Provider, { value: isOpen, children }) });
|
|
91
|
+
};
|
|
92
|
+
Drawer.displayName = "Drawer";
|
|
93
|
+
var DrawerTrigger = DialogPrimitive.Trigger;
|
|
94
|
+
var DrawerClose = DialogPrimitive.Close;
|
|
95
|
+
var DrawerContent = React.forwardRef(({ className, children, side = "right", ...props }, ref) => {
|
|
96
|
+
const open = React.useContext(DrawerOpenContext);
|
|
97
|
+
const reduced = useReducedMotion();
|
|
98
|
+
const offscreen = side === "right" ? "100%" : "-100%";
|
|
99
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: open ? /* @__PURE__ */ jsxs(DialogPrimitive.Portal, { forceMount: true, children: [
|
|
100
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx(
|
|
101
|
+
motion.div,
|
|
102
|
+
{
|
|
103
|
+
className: "fixed inset-0 z-50 bg-foreground/40 backdrop-blur-sm",
|
|
104
|
+
initial: { opacity: 0 },
|
|
105
|
+
animate: { opacity: 1 },
|
|
106
|
+
exit: { opacity: 0 },
|
|
107
|
+
transition: reduced ? { duration: 0 } : tween.quick
|
|
108
|
+
}
|
|
109
|
+
) }),
|
|
110
|
+
/* @__PURE__ */ jsx(DialogPrimitive.Content, { asChild: true, forceMount: true, ref, ...props, children: /* @__PURE__ */ jsxs(
|
|
111
|
+
motion.div,
|
|
112
|
+
{
|
|
113
|
+
className: cn(
|
|
114
|
+
"fixed inset-y-0 z-50 flex w-full max-w-md flex-col gap-4 border-border bg-popover p-6 text-popover-foreground shadow-lift",
|
|
115
|
+
side === "right" ? "right-0 border-l" : "left-0 border-r",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
initial: { x: offscreen },
|
|
119
|
+
animate: { x: 0 },
|
|
120
|
+
exit: { x: offscreen },
|
|
121
|
+
transition: reduced ? { duration: 0 } : spring.soft,
|
|
122
|
+
children: [
|
|
123
|
+
children,
|
|
124
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
|
|
125
|
+
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
126
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
127
|
+
] })
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
) })
|
|
131
|
+
] }) : null });
|
|
132
|
+
});
|
|
133
|
+
DrawerContent.displayName = "DrawerContent";
|
|
134
|
+
var DrawerHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col gap-1.5 pr-8", className), ...props });
|
|
135
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
136
|
+
var DrawerFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end", className), ...props });
|
|
137
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
138
|
+
var DrawerTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
139
|
+
DialogPrimitive.Title,
|
|
140
|
+
{
|
|
141
|
+
ref,
|
|
142
|
+
className: cn("font-display text-lg font-semibold tracking-tight", className),
|
|
143
|
+
...props
|
|
144
|
+
}
|
|
145
|
+
));
|
|
146
|
+
DrawerTitle.displayName = "DrawerTitle";
|
|
147
|
+
var DrawerDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
148
|
+
DialogPrimitive.Description,
|
|
149
|
+
{
|
|
150
|
+
ref,
|
|
151
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
));
|
|
155
|
+
DrawerDescription.displayName = "DrawerDescription";
|
|
156
|
+
export {
|
|
157
|
+
Drawer,
|
|
158
|
+
DrawerClose,
|
|
159
|
+
DrawerContent,
|
|
160
|
+
DrawerDescription,
|
|
161
|
+
DrawerFooter,
|
|
162
|
+
DrawerHeader,
|
|
163
|
+
DrawerTitle,
|
|
164
|
+
DrawerTrigger
|
|
165
|
+
};
|
|
166
|
+
//# sourceMappingURL=drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/drawer.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { X } from \"lucide-react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { spring, tween } from \"@/lib/motion-presets\";\n\nfunction useControllableState<T>({\n prop,\n defaultProp,\n onChange,\n}: {\n prop: T | undefined;\n defaultProp: T;\n onChange?: (value: T) => void;\n}): [T, (next: T) => void] {\n const [uncontrolled, setUncontrolled] = React.useState(defaultProp);\n const isControlled = prop !== undefined;\n const value = isControlled ? (prop as T) : uncontrolled;\n const setValue = React.useCallback(\n (next: T) => {\n if (!isControlled) setUncontrolled(next);\n onChange?.(next);\n },\n [isControlled, onChange]\n );\n return [value, setValue];\n}\n\nconst DrawerOpenContext = React.createContext(false);\n\nconst Drawer = ({\n open,\n defaultOpen = false,\n onOpenChange,\n children,\n ...props\n}: DialogPrimitive.DialogProps) => {\n const [isOpen, setIsOpen] = useControllableState({\n prop: open,\n defaultProp: defaultOpen,\n onChange: onOpenChange,\n });\n return (\n <DialogPrimitive.Root open={isOpen} onOpenChange={setIsOpen} {...props}>\n <DrawerOpenContext.Provider value={isOpen}>\n {children}\n </DrawerOpenContext.Provider>\n </DialogPrimitive.Root>\n );\n};\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DialogPrimitive.Trigger;\nconst DrawerClose = DialogPrimitive.Close;\n\nexport interface DrawerContentProps\n extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {\n side?: \"right\" | \"left\";\n}\n\nconst DrawerContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n DrawerContentProps\n>(({ className, children, side = \"right\", ...props }, ref) => {\n const open = React.useContext(DrawerOpenContext);\n const reduced = useReducedMotion();\n const offscreen = side === \"right\" ? \"100%\" : \"-100%\";\n\n return (\n <AnimatePresence>\n {open ? (\n <DialogPrimitive.Portal forceMount>\n <DialogPrimitive.Overlay asChild forceMount>\n <motion.div\n className=\"fixed inset-0 z-50 bg-foreground/40 backdrop-blur-sm\"\n initial={{ opacity: 0 }}\n animate={{ opacity: 1 }}\n exit={{ opacity: 0 }}\n transition={reduced ? { duration: 0 } : tween.quick}\n />\n </DialogPrimitive.Overlay>\n <DialogPrimitive.Content asChild forceMount ref={ref} {...props}>\n <motion.div\n className={cn(\n \"fixed inset-y-0 z-50 flex w-full max-w-md flex-col gap-4 border-border bg-popover p-6 text-popover-foreground shadow-lift\",\n side === \"right\" ? \"right-0 border-l\" : \"left-0 border-r\",\n className\n )}\n initial={{ x: offscreen }}\n animate={{ x: 0 }}\n exit={{ x: offscreen }}\n transition={reduced ? { duration: 0 } : spring.soft}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\">\n <X className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </motion.div>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n ) : null}\n </AnimatePresence>\n );\n});\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col gap-1.5 pr-8\", className)} {...props} />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"font-display text-lg font-semibold tracking-tight\", className)}\n {...props}\n />\n));\nDrawerTitle.displayName = \"DrawerTitle\";\n\nconst DrawerDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = \"DrawerDescription\";\n\nexport {\n Drawer,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"m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E1E,aAAa,cAAc;AAE3B,IAAM,eAAe,CAAC,EAAE,WAAW,GAAG,MAAM,MAC1C,oBAAC,SAAI,WAAW,GAAG,0DAA0D,SAAS,GAAI,GAAG,OAAO;AAEtG,aAAa,cAAc;AAE3B,IAAM,cAAoB,iBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,qDAAqD,SAAS;AAAA,IAC3E,GAAG;AAAA;AACN,CACD;AACD,YAAY,cAAc;AAE1B,IAAM,oBAA0B,iBAG9B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW,GAAG,iCAAiC,SAAS;AAAA,IACvD,GAAG;AAAA;AACN,CACD;AACD,kBAAkB,cAAc;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
4
|
+
|
|
5
|
+
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
6
|
+
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
+
inset?: boolean;
|
|
11
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
14
|
+
inset?: boolean;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const DropdownMenuShortcut: {
|
|
18
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): react_jsx_runtime.JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuTrigger };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/ui/dropdown-menu.tsx
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
6
|
+
import { Check } from "lucide-react";
|
|
7
|
+
import { motion } from "motion/react";
|
|
8
|
+
|
|
9
|
+
// src/lib/cn.ts
|
|
10
|
+
import { clsx } from "clsx";
|
|
11
|
+
import { twMerge } from "tailwind-merge";
|
|
12
|
+
function cn(...inputs) {
|
|
13
|
+
return twMerge(clsx(inputs));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// src/lib/motion-presets.ts
|
|
17
|
+
var spring = {
|
|
18
|
+
/** Quick, decisive — buttons, indicators, dropdowns. */
|
|
19
|
+
snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
|
|
20
|
+
/** Calm and weighty — dialogs, cards, larger surfaces. */
|
|
21
|
+
soft: { type: "spring", stiffness: 180, damping: 26 },
|
|
22
|
+
/** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
|
|
23
|
+
bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
|
|
24
|
+
};
|
|
25
|
+
var tween = {
|
|
26
|
+
/** The signature easing — an expressive ease-out for orchestrated reveals. */
|
|
27
|
+
smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
|
|
28
|
+
/** Faster variant for small elements. */
|
|
29
|
+
quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
|
|
30
|
+
/** Longer, settled curve for drawing charts, count-ups, and progress fills. */
|
|
31
|
+
draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
|
|
32
|
+
};
|
|
33
|
+
var fadeUp = {
|
|
34
|
+
hidden: { opacity: 0, y: 18 },
|
|
35
|
+
visible: { opacity: 1, y: 0, transition: tween.smooth }
|
|
36
|
+
};
|
|
37
|
+
var fadeIn = {
|
|
38
|
+
hidden: { opacity: 0 },
|
|
39
|
+
visible: { opacity: 1, transition: tween.smooth }
|
|
40
|
+
};
|
|
41
|
+
var scaleIn = {
|
|
42
|
+
hidden: { opacity: 0, scale: 0.96 },
|
|
43
|
+
visible: { opacity: 1, scale: 1, transition: spring.soft }
|
|
44
|
+
};
|
|
45
|
+
var slideInLeft = {
|
|
46
|
+
hidden: { opacity: 0, x: -28 },
|
|
47
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
48
|
+
};
|
|
49
|
+
var slideInRight = {
|
|
50
|
+
hidden: { opacity: 0, x: 28 },
|
|
51
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
52
|
+
};
|
|
53
|
+
var blurIn = {
|
|
54
|
+
hidden: { opacity: 0, filter: "blur(12px)" },
|
|
55
|
+
visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// src/components/ui/dropdown-menu.tsx
|
|
59
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
60
|
+
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
61
|
+
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
62
|
+
var DropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
63
|
+
var DropdownMenuContent = React.forwardRef(({ className, sideOffset = 6, children, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
64
|
+
DropdownMenuPrimitive.Content,
|
|
65
|
+
{
|
|
66
|
+
ref,
|
|
67
|
+
sideOffset,
|
|
68
|
+
className: "z-50",
|
|
69
|
+
...props,
|
|
70
|
+
children: /* @__PURE__ */ jsx(
|
|
71
|
+
motion.div,
|
|
72
|
+
{
|
|
73
|
+
initial: { opacity: 0, scale: 0.97 },
|
|
74
|
+
animate: { opacity: 1, scale: 1 },
|
|
75
|
+
transition: tween.quick,
|
|
76
|
+
style: {
|
|
77
|
+
transformOrigin: "var(--radix-dropdown-menu-content-transform-origin)"
|
|
78
|
+
},
|
|
79
|
+
className: cn(
|
|
80
|
+
"min-w-[10rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lift",
|
|
81
|
+
className
|
|
82
|
+
),
|
|
83
|
+
children
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
) }));
|
|
88
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
89
|
+
var DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
90
|
+
DropdownMenuPrimitive.Item,
|
|
91
|
+
{
|
|
92
|
+
ref,
|
|
93
|
+
className: cn(
|
|
94
|
+
"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-70",
|
|
95
|
+
inset && "pl-8",
|
|
96
|
+
className
|
|
97
|
+
),
|
|
98
|
+
...props
|
|
99
|
+
}
|
|
100
|
+
));
|
|
101
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
102
|
+
var DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
103
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
104
|
+
{
|
|
105
|
+
ref,
|
|
106
|
+
checked,
|
|
107
|
+
className: cn(
|
|
108
|
+
"relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
109
|
+
className
|
|
110
|
+
),
|
|
111
|
+
...props,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "size-4 text-primary" }) }) }),
|
|
114
|
+
children
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
));
|
|
118
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
119
|
+
var DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
120
|
+
DropdownMenuPrimitive.Label,
|
|
121
|
+
{
|
|
122
|
+
ref,
|
|
123
|
+
className: cn(
|
|
124
|
+
"px-2 py-1.5 text-xs font-medium text-muted-foreground",
|
|
125
|
+
inset && "pl-8",
|
|
126
|
+
className
|
|
127
|
+
),
|
|
128
|
+
...props
|
|
129
|
+
}
|
|
130
|
+
));
|
|
131
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
132
|
+
var DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
133
|
+
DropdownMenuPrimitive.Separator,
|
|
134
|
+
{
|
|
135
|
+
ref,
|
|
136
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
137
|
+
...props
|
|
138
|
+
}
|
|
139
|
+
));
|
|
140
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
141
|
+
var DropdownMenuShortcut = ({
|
|
142
|
+
className,
|
|
143
|
+
...props
|
|
144
|
+
}) => /* @__PURE__ */ jsx(
|
|
145
|
+
"span",
|
|
146
|
+
{
|
|
147
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className),
|
|
148
|
+
...props
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
152
|
+
export {
|
|
153
|
+
DropdownMenu,
|
|
154
|
+
DropdownMenuCheckboxItem,
|
|
155
|
+
DropdownMenuContent,
|
|
156
|
+
DropdownMenuGroup,
|
|
157
|
+
DropdownMenuItem,
|
|
158
|
+
DropdownMenuLabel,
|
|
159
|
+
DropdownMenuSeparator,
|
|
160
|
+
DropdownMenuShortcut,
|
|
161
|
+
DropdownMenuTrigger
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/dropdown-menu.tsx","../src/lib/cn.ts","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport { Check } from \"lucide-react\";\nimport { motion } from \"motion/react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { tween } from \"@/lib/motion-presets\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 6, children, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className=\"z-50\"\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.97 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={tween.quick}\n style={{\n transformOrigin: \"var(--radix-dropdown-menu-content-transform-origin)\",\n }}\n className={cn(\n \"min-w-[10rem] overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lift\",\n className\n )}\n >\n {children}\n </motion.div>\n </DropdownMenuPrimitive.Content>\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:opacity-70\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n checked={checked}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-md py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex size-4 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"size-4 text-primary\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-xs font-medium text-muted-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nconst DropdownMenuShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n);\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuGroup,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n};\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAY,WAAW;AACvB,YAAY,2BAA2B;AACvC,SAAS,aAAa;AACtB,SAAS,cAAc;;;ACLvB,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACDO,IAAM,SAAS;AAAA;AAAA,EAEpB,QAAQ,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,IAAI,MAAM,IAAI;AAAA;AAAA,EAEjE,MAAM,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,GAAG;AAAA;AAAA,EAEpD,QAAQ,EAAE,MAAM,UAAU,WAAW,KAAK,SAAS,IAAI,MAAM,IAAI;AACnE;AAEO,IAAM,QAAQ;AAAA;AAAA,EAEnB,QAAQ,EAAE,MAAM,SAAS,UAAU,MAAM,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;AAAA;AAAA,EAElE,OAAO,EAAE,MAAM,SAAS,UAAU,MAAM,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE;AAAA;AAAA,EAEjE,MAAM,EAAE,MAAM,SAAS,UAAU,KAAK,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE;AAChE;AAQO,IAAM,SAAmB;AAAA,EAC9B,QAAQ,EAAE,SAAS,GAAG,GAAG,GAAG;AAAA,EAC5B,SAAS,EAAE,SAAS,GAAG,GAAG,GAAG,YAAY,MAAM,OAAO;AACxD;AAEO,IAAM,SAAmB;AAAA,EAC9B,QAAQ,EAAE,SAAS,EAAE;AAAA,EACrB,SAAS,EAAE,SAAS,GAAG,YAAY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|
+
import { HTMLMotionProps } from 'motion/react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
interface EmptyStateProps extends Omit<HTMLMotionProps<"div">, "title"> {
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
action?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
declare const EmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { EmptyState, type EmptyStateProps };
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/ui/empty-state.tsx
|
|
4
|
+
import * as React2 from "react";
|
|
5
|
+
import { motion } from "motion/react";
|
|
6
|
+
|
|
7
|
+
// src/lib/cn.ts
|
|
8
|
+
import { clsx } from "clsx";
|
|
9
|
+
import { twMerge } from "tailwind-merge";
|
|
10
|
+
function cn(...inputs) {
|
|
11
|
+
return twMerge(clsx(inputs));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// src/components/ui/featured-icon.tsx
|
|
15
|
+
import * as React from "react";
|
|
16
|
+
import { cva } from "class-variance-authority";
|
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
var featuredIconVariants = cva(
|
|
19
|
+
"inline-flex shrink-0 items-center justify-center [&_svg]:shrink-0",
|
|
20
|
+
{
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: "size-9 [&_svg]:size-4",
|
|
24
|
+
md: "size-11 [&_svg]:size-5",
|
|
25
|
+
lg: "size-14 [&_svg]:size-6"
|
|
26
|
+
},
|
|
27
|
+
shape: {
|
|
28
|
+
square: "rounded-xl",
|
|
29
|
+
circle: "rounded-full"
|
|
30
|
+
},
|
|
31
|
+
variant: {
|
|
32
|
+
brand: "bg-brand/10 text-brand",
|
|
33
|
+
gradient: "bg-gradient-brand text-brand-foreground shadow-soft",
|
|
34
|
+
gray: "bg-muted text-muted-foreground",
|
|
35
|
+
success: "bg-success/12 text-success",
|
|
36
|
+
warning: "bg-warning/15 text-warning",
|
|
37
|
+
destructive: "bg-destructive/10 text-destructive",
|
|
38
|
+
outline: "border border-border bg-card text-foreground shadow-xs"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: { size: "md", shape: "square", variant: "brand" }
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
var FeaturedIcon = React.forwardRef(
|
|
45
|
+
({ className, icon: Icon, size, shape, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
className: cn(featuredIconVariants({ size, shape, variant }), className),
|
|
50
|
+
...props,
|
|
51
|
+
children: /* @__PURE__ */ jsx(Icon, {})
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
);
|
|
55
|
+
FeaturedIcon.displayName = "FeaturedIcon";
|
|
56
|
+
|
|
57
|
+
// src/lib/motion-presets.ts
|
|
58
|
+
var spring = {
|
|
59
|
+
/** Quick, decisive — buttons, indicators, dropdowns. */
|
|
60
|
+
snappy: { type: "spring", stiffness: 420, damping: 32, mass: 0.8 },
|
|
61
|
+
/** Calm and weighty — dialogs, cards, larger surfaces. */
|
|
62
|
+
soft: { type: "spring", stiffness: 180, damping: 26 },
|
|
63
|
+
/** Playful overshoot — badges, toggles, delight moments. Use sparingly. */
|
|
64
|
+
bouncy: { type: "spring", stiffness: 480, damping: 18, mass: 0.9 }
|
|
65
|
+
};
|
|
66
|
+
var tween = {
|
|
67
|
+
/** The signature easing — an expressive ease-out for orchestrated reveals. */
|
|
68
|
+
smooth: { type: "tween", duration: 0.45, ease: [0.22, 1, 0.36, 1] },
|
|
69
|
+
/** Faster variant for small elements. */
|
|
70
|
+
quick: { type: "tween", duration: 0.28, ease: [0.22, 1, 0.36, 1] },
|
|
71
|
+
/** Longer, settled curve for drawing charts, count-ups, and progress fills. */
|
|
72
|
+
draw: { type: "tween", duration: 1.1, ease: [0.16, 1, 0.3, 1] }
|
|
73
|
+
};
|
|
74
|
+
var fadeUp = {
|
|
75
|
+
hidden: { opacity: 0, y: 18 },
|
|
76
|
+
visible: { opacity: 1, y: 0, transition: tween.smooth }
|
|
77
|
+
};
|
|
78
|
+
var fadeIn = {
|
|
79
|
+
hidden: { opacity: 0 },
|
|
80
|
+
visible: { opacity: 1, transition: tween.smooth }
|
|
81
|
+
};
|
|
82
|
+
var scaleIn = {
|
|
83
|
+
hidden: { opacity: 0, scale: 0.96 },
|
|
84
|
+
visible: { opacity: 1, scale: 1, transition: spring.soft }
|
|
85
|
+
};
|
|
86
|
+
var slideInLeft = {
|
|
87
|
+
hidden: { opacity: 0, x: -28 },
|
|
88
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
89
|
+
};
|
|
90
|
+
var slideInRight = {
|
|
91
|
+
hidden: { opacity: 0, x: 28 },
|
|
92
|
+
visible: { opacity: 1, x: 0, transition: tween.smooth }
|
|
93
|
+
};
|
|
94
|
+
var blurIn = {
|
|
95
|
+
hidden: { opacity: 0, filter: "blur(12px)" },
|
|
96
|
+
visible: { opacity: 1, filter: "blur(0px)", transition: tween.smooth }
|
|
97
|
+
};
|
|
98
|
+
var staggerContainer = (stagger = 0.08, delay = 0) => ({
|
|
99
|
+
hidden: {},
|
|
100
|
+
visible: {
|
|
101
|
+
transition: { staggerChildren: stagger, delayChildren: delay }
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var viewportOnce = { once: true, margin: "-15%" };
|
|
105
|
+
|
|
106
|
+
// src/components/ui/empty-state.tsx
|
|
107
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
108
|
+
var EmptyState = React2.forwardRef(
|
|
109
|
+
({ className, icon: Icon, title, description, action, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
110
|
+
motion.div,
|
|
111
|
+
{
|
|
112
|
+
ref,
|
|
113
|
+
variants: staggerContainer(0.07),
|
|
114
|
+
initial: "hidden",
|
|
115
|
+
whileInView: "visible",
|
|
116
|
+
viewport: viewportOnce,
|
|
117
|
+
className: cn(
|
|
118
|
+
"flex flex-col items-center justify-center rounded-xl border border-dashed border-border bg-card/40 px-6 py-14 text-center",
|
|
119
|
+
className
|
|
120
|
+
),
|
|
121
|
+
...props,
|
|
122
|
+
children: [
|
|
123
|
+
Icon ? /* @__PURE__ */ jsx2(motion.div, { variants: fadeUp, className: "mb-4", children: /* @__PURE__ */ jsx2(FeaturedIcon, { icon: Icon, variant: "gray", size: "lg", shape: "circle" }) }) : null,
|
|
124
|
+
/* @__PURE__ */ jsx2(
|
|
125
|
+
motion.h3,
|
|
126
|
+
{
|
|
127
|
+
variants: fadeUp,
|
|
128
|
+
className: "font-display text-lg font-semibold tracking-tight",
|
|
129
|
+
children: title
|
|
130
|
+
}
|
|
131
|
+
),
|
|
132
|
+
description ? /* @__PURE__ */ jsx2(
|
|
133
|
+
motion.p,
|
|
134
|
+
{
|
|
135
|
+
variants: fadeUp,
|
|
136
|
+
className: "mt-1.5 max-w-sm text-sm text-muted-foreground",
|
|
137
|
+
children: description
|
|
138
|
+
}
|
|
139
|
+
) : null,
|
|
140
|
+
action ? /* @__PURE__ */ jsx2(motion.div, { variants: fadeUp, className: "mt-5", children: action }) : null
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
)
|
|
144
|
+
);
|
|
145
|
+
EmptyState.displayName = "EmptyState";
|
|
146
|
+
export {
|
|
147
|
+
EmptyState
|
|
148
|
+
};
|
|
149
|
+
//# sourceMappingURL=empty-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ui/empty-state.tsx","../src/lib/cn.ts","../src/components/ui/featured-icon.tsx","../src/lib/motion-presets.ts"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { motion, type HTMLMotionProps } from \"motion/react\";\nimport { type LucideIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/cn\";\nimport { FeaturedIcon } from \"@/components/ui/featured-icon\";\nimport { fadeUp, staggerContainer, viewportOnce } from \"@/lib/motion-presets\";\n\nexport interface EmptyStateProps extends Omit<HTMLMotionProps<\"div\">, \"title\"> {\n icon?: LucideIcon;\n title: React.ReactNode;\n description?: React.ReactNode;\n action?: React.ReactNode;\n}\n\nconst EmptyState = React.forwardRef<HTMLDivElement, EmptyStateProps>(\n ({ className, icon: Icon, title, description, action, ...props }, ref) => (\n <motion.div\n ref={ref}\n variants={staggerContainer(0.07)}\n initial=\"hidden\"\n whileInView=\"visible\"\n viewport={viewportOnce}\n className={cn(\n \"flex flex-col items-center justify-center rounded-xl border border-dashed border-border bg-card/40 px-6 py-14 text-center\",\n className\n )}\n {...props}\n >\n {Icon ? (\n <motion.div variants={fadeUp} className=\"mb-4\">\n <FeaturedIcon icon={Icon} variant=\"gray\" size=\"lg\" shape=\"circle\" />\n </motion.div>\n ) : null}\n <motion.h3\n variants={fadeUp}\n className=\"font-display text-lg font-semibold tracking-tight\"\n >\n {title}\n </motion.h3>\n {description ? (\n <motion.p\n variants={fadeUp}\n className=\"mt-1.5 max-w-sm text-sm text-muted-foreground\"\n >\n {description}\n </motion.p>\n ) : null}\n {action ? (\n <motion.div variants={fadeUp} className=\"mt-5\">\n {action}\n </motion.div>\n ) : null}\n </motion.div>\n )\n);\nEmptyState.displayName = \"EmptyState\";\n\nexport { EmptyState };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Merge class names with Tailwind-aware conflict resolution.\n * Every Kineto component accepts `className` and merges it through `cn()`,\n * so consumer overrides always win over the component's defaults.\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import * as React from \"react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type LucideIcon } from \"lucide-react\";\n\nimport { cn } from \"@/lib/cn\";\n\nconst featuredIconVariants = cva(\n \"inline-flex shrink-0 items-center justify-center [&_svg]:shrink-0\",\n {\n variants: {\n size: {\n sm: \"size-9 [&_svg]:size-4\",\n md: \"size-11 [&_svg]:size-5\",\n lg: \"size-14 [&_svg]:size-6\",\n },\n shape: {\n square: \"rounded-xl\",\n circle: \"rounded-full\",\n },\n variant: {\n brand: \"bg-brand/10 text-brand\",\n gradient: \"bg-gradient-brand text-brand-foreground shadow-soft\",\n gray: \"bg-muted text-muted-foreground\",\n success: \"bg-success/12 text-success\",\n warning: \"bg-warning/15 text-warning\",\n destructive: \"bg-destructive/10 text-destructive\",\n outline: \"border border-border bg-card text-foreground shadow-xs\",\n },\n },\n defaultVariants: { size: \"md\", shape: \"square\", variant: \"brand\" },\n }\n);\n\nexport interface FeaturedIconProps\n extends React.HTMLAttributes<HTMLSpanElement>,\n VariantProps<typeof featuredIconVariants> {\n icon: LucideIcon;\n}\n\nconst FeaturedIcon = React.forwardRef<HTMLSpanElement, FeaturedIconProps>(\n ({ className, icon: Icon, size, shape, variant, ...props }, ref) => (\n <span\n ref={ref}\n className={cn(featuredIconVariants({ size, shape, variant }), className)}\n {...props}\n >\n <Icon />\n </span>\n )\n);\nFeaturedIcon.displayName = \"FeaturedIcon\";\n\nexport { FeaturedIcon, featuredIconVariants };\n","import type { Transition, Variants, Target } from \"motion/react\";\n\n/* -------------------------------------------------------------------------------------------------\n * Transition tokens\n * The named physics every component references. Tune these in one place and the whole\n * library re-tunes. Prefer springs for anything interactive; reserve tweens for orchestrated\n * entrances where you want a precise, repeatable curve.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const spring = {\n /** Quick, decisive — buttons, indicators, dropdowns. */\n snappy: { type: \"spring\", stiffness: 420, damping: 32, mass: 0.8 },\n /** Calm and weighty — dialogs, cards, larger surfaces. */\n soft: { type: \"spring\", stiffness: 180, damping: 26 },\n /** Playful overshoot — badges, toggles, delight moments. Use sparingly. */\n bouncy: { type: \"spring\", stiffness: 480, damping: 18, mass: 0.9 },\n} satisfies Record<string, Transition>;\n\nexport const tween = {\n /** The signature easing — an expressive ease-out for orchestrated reveals. */\n smooth: { type: \"tween\", duration: 0.45, ease: [0.22, 1, 0.36, 1] },\n /** Faster variant for small elements. */\n quick: { type: \"tween\", duration: 0.28, ease: [0.22, 1, 0.36, 1] },\n /** Longer, settled curve for drawing charts, count-ups, and progress fills. */\n draw: { type: \"tween\", duration: 1.1, ease: [0.16, 1, 0.3, 1] },\n} satisfies Record<string, Transition>;\n\n/* -------------------------------------------------------------------------------------------------\n * Reveal variants\n * Named hidden→visible pairs. Pair with `initial=\"hidden\"` + `animate=\"visible\"`, or with\n * `whileInView=\"visible\"` for scroll-triggered sections (see `viewportOnce`).\n * ----------------------------------------------------------------------------------------------- */\n\nexport const fadeUp: Variants = {\n hidden: { opacity: 0, y: 18 },\n visible: { opacity: 1, y: 0, transition: tween.smooth },\n};\n\nexport const fadeIn: Variants = {\n hidden: { opacity: 0 },\n visible: { opacity: 1, transition: tween.smooth },\n};\n\nexport const scaleIn: Variants = {\n hidden: { opacity: 0, scale: 0.96 },\n visible: { opacity: 1, scale: 1, transition: spring.soft },\n};\n\nexport const slideInLeft: Variants = {\n hidden: { opacity: 0, x: -28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const slideInRight: Variants = {\n hidden: { opacity: 0, x: 28 },\n visible: { opacity: 1, x: 0, transition: tween.smooth },\n};\n\nexport const blurIn: Variants = {\n hidden: { opacity: 0, filter: \"blur(12px)\" },\n visible: { opacity: 1, filter: \"blur(0px)\", transition: tween.smooth },\n};\n\n/* -------------------------------------------------------------------------------------------------\n * Stagger helpers\n * Wrap a list/grid in a container using `staggerContainer()` and give each child `staggerItem`\n * (or any reveal variant). One wrapper orchestrates the whole sequence.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const staggerContainer = (stagger = 0.08, delay = 0): Variants => ({\n hidden: {},\n visible: {\n transition: { staggerChildren: stagger, delayChildren: delay },\n },\n});\n\n/** The default child for a stagger container. Aliased to `fadeUp` so sequences feel cohesive. */\nexport const staggerItem: Variants = fadeUp;\n\n/* -------------------------------------------------------------------------------------------------\n * Interaction presets\n * Standardized tap/hover targets. Note: controls (buttons, selects, anything that can act as a\n * trigger/anchor) should NOT shift on hover — moving a trigger while its popover/tooltip animates\n * in reads as two competing motions. Use color + press feedback there instead. A very subtle\n * scale-up is reserved for non-anchored content surfaces (cards/tiles) via `cardHover`.\n * Spread into `whileHover` / `whileTap`.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const interaction = {\n /** Press feedback for buttons and clickable chips. */\n tap: { scale: 0.97 } satisfies Target,\n /** Very subtle scale-up for non-anchored content surfaces (cards/tiles) — never for triggers.\n * A gentle swell reads calmer than a positional lift and doesn't nudge neighbouring content. */\n cardHover: { scale: 1.02 } satisfies Target,\n} as const;\n\n/* -------------------------------------------------------------------------------------------------\n * Viewport config\n * The shared `whileInView` viewport so every scroll reveal triggers at the same threshold,\n * exactly once.\n * ----------------------------------------------------------------------------------------------- */\n\nexport const viewportOnce = { once: true, margin: \"-15%\" } as const;\n"],"mappings":";;;AAEA,YAAYA,YAAW;AACvB,SAAS,cAAoC;;;ACH7C,SAAS,YAA6B;AACtC,SAAS,eAAe;AAOjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ACVA,YAAY,WAAW;AACvB,SAAS,WAA8B;AA6CjC;AAxCN,IAAM,uBAAuB;AAAA,EAC3B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,MAAM;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,QAAQ;AAAA,MACV;AAAA,MACA,SAAS;AAAA,QACP,OAAO;AAAA,QACP,UAAU;AAAA,QACV,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,aAAa;AAAA,QACb,SAAS;AAAA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AAO,MAAK,MAAK,OAAM,UAAS,GACpE,IACE;AAAA,QACJ,gBAAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,UAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,QACH;AAAA,QACC,cACC,gBAAAA;AAAA,UAAC,OAAO;AAAA,UAAP;AAAA,YACC,UAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,QACH,IACE;AAAA,QACH,SACC,gBAAAA,KAAC,OAAO,KAAP,EAAW,UAAU,QAAQ,WAAU,QACrC,kBACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;AACA,WAAW,cAAc;","names":["React","jsx"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import { LucideIcon } from 'lucide-react';
|
|
5
|
+
|
|
6
|
+
declare const featuredIconVariants: (props?: ({
|
|
7
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
8
|
+
shape?: "circle" | "square" | null | undefined;
|
|
9
|
+
variant?: "outline" | "gray" | "brand" | "success" | "warning" | "destructive" | "gradient" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
11
|
+
interface FeaturedIconProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof featuredIconVariants> {
|
|
12
|
+
icon: LucideIcon;
|
|
13
|
+
}
|
|
14
|
+
declare const FeaturedIcon: React.ForwardRefExoticComponent<FeaturedIconProps & React.RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
|
|
16
|
+
export { FeaturedIcon, type FeaturedIconProps, featuredIconVariants };
|