@bearmenu/ui 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/dist/chunk-2CUFS5LF.js +80 -0
- package/dist/chunk-3GWWZKX7.js +33 -0
- package/dist/chunk-3VMDCCCX.js +10 -0
- package/dist/chunk-4AVS6CV4.js +89 -0
- package/dist/chunk-4JOV7FXW.js +17 -0
- package/dist/chunk-4KOMHDZD.js +89 -0
- package/dist/chunk-4UO73SKC.js +26 -0
- package/dist/chunk-7H54PTVH.js +116 -0
- package/dist/chunk-CW24PLDW.js +24 -0
- package/dist/chunk-EBAMCZDW.js +112 -0
- package/dist/chunk-ERMIA7NP.js +106 -0
- package/dist/chunk-ESO2EM3L.js +46 -0
- package/dist/chunk-EUHEIWHZ.js +32 -0
- package/dist/chunk-FEK5XGZW.js +8 -0
- package/dist/chunk-NKHH23YK.js +31 -0
- package/dist/chunk-R47NEOSI.js +78 -0
- package/dist/chunk-UXAYXRFN.js +69 -0
- package/dist/chunk-X6GATUI2.js +19 -0
- package/dist/components/accordion.d.ts +9 -0
- package/dist/components/accordion.js +53 -0
- package/dist/components/alert-dialog.d.ts +23 -0
- package/dist/components/alert-dialog.js +98 -0
- package/dist/components/alert.d.ts +11 -0
- package/dist/components/alert.js +52 -0
- package/dist/components/aspect-ratio.d.ts +6 -0
- package/dist/components/aspect-ratio.js +2 -0
- package/dist/components/avatar.d.ts +8 -0
- package/dist/components/avatar.js +47 -0
- package/dist/components/badge.d.ts +13 -0
- package/dist/components/badge.js +3 -0
- package/dist/components/breadcrumb.d.ts +14 -0
- package/dist/components/breadcrumb.js +96 -0
- package/dist/components/button.d.ts +16 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calendar.d.ts +11 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/card.d.ts +13 -0
- package/dist/components/card.js +4 -0
- package/dist/components/carousel.d.ts +24 -0
- package/dist/components/carousel.js +198 -0
- package/dist/components/checkbox.d.ts +6 -0
- package/dist/components/checkbox.js +25 -0
- package/dist/components/collapsible.d.ts +8 -0
- package/dist/components/collapsible.js +26 -0
- package/dist/components/command.d.ts +84 -0
- package/dist/components/command.js +4 -0
- package/dist/components/currency-input.d.ts +17 -0
- package/dist/components/currency-input.js +121 -0
- package/dist/components/dialog.d.ts +22 -0
- package/dist/components/dialog.js +3 -0
- package/dist/components/drawer.d.ts +27 -0
- package/dist/components/drawer.js +85 -0
- package/dist/components/dropdown-menu.d.ts +28 -0
- package/dist/components/dropdown-menu.js +211 -0
- package/dist/components/empty-state.d.ts +22 -0
- package/dist/components/empty-state.js +81 -0
- package/dist/components/form.d.ts +28 -0
- package/dist/components/form.js +97 -0
- package/dist/components/haptic-button.d.ts +12 -0
- package/dist/components/haptic-button.js +17 -0
- package/dist/components/input-otp.d.ts +14 -0
- package/dist/components/input-otp.js +62 -0
- package/dist/components/input.d.ts +6 -0
- package/dist/components/input.js +3 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.js +3 -0
- package/dist/components/lazy-markdown.d.ts +11 -0
- package/dist/components/lazy-markdown.js +13 -0
- package/dist/components/link-button.d.ts +30 -0
- package/dist/components/link-button.js +17 -0
- package/dist/components/markdown-renderer.d.ts +11 -0
- package/dist/components/markdown-renderer.js +10 -0
- package/dist/components/multi-select-combobox.d.ts +23 -0
- package/dist/components/multi-select-combobox.js +114 -0
- package/dist/components/pagination.d.ts +18 -0
- package/dist/components/pagination.js +101 -0
- package/dist/components/popover.d.ts +8 -0
- package/dist/components/popover.js +3 -0
- package/dist/components/progress.d.ts +6 -0
- package/dist/components/progress.js +30 -0
- package/dist/components/radio-group.d.ts +7 -0
- package/dist/components/radio-group.js +30 -0
- package/dist/components/rating.d.ts +15 -0
- package/dist/components/rating.js +120 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.js +44 -0
- package/dist/components/search-bar.d.ts +17 -0
- package/dist/components/search-bar.js +92 -0
- package/dist/components/searchable-select.d.ts +22 -0
- package/dist/components/searchable-select.js +104 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.js +129 -0
- package/dist/components/separator.d.ts +6 -0
- package/dist/components/separator.js +25 -0
- package/dist/components/sheet.d.ts +29 -0
- package/dist/components/sheet.js +96 -0
- package/dist/components/skeleton-card.d.ts +13 -0
- package/dist/components/skeleton-card.js +154 -0
- package/dist/components/skeleton.d.ts +6 -0
- package/dist/components/skeleton.js +3 -0
- package/dist/components/slider.d.ts +6 -0
- package/dist/components/slider.js +24 -0
- package/dist/components/sliding-panels.d.ts +19 -0
- package/dist/components/sliding-panels.js +75 -0
- package/dist/components/sonner.d.ts +6 -0
- package/dist/components/sonner.js +23 -0
- package/dist/components/sticky-container.d.ts +44 -0
- package/dist/components/sticky-container.js +39 -0
- package/dist/components/switch.d.ts +6 -0
- package/dist/components/switch.js +31 -0
- package/dist/components/table.d.ts +12 -0
- package/dist/components/table.js +81 -0
- package/dist/components/tabs.d.ts +12 -0
- package/dist/components/tabs.js +55 -0
- package/dist/components/text.d.ts +31 -0
- package/dist/components/text.js +3 -0
- package/dist/components/textarea.d.ts +6 -0
- package/dist/components/textarea.js +23 -0
- package/dist/components/toast.d.ts +18 -0
- package/dist/components/toast.js +3 -0
- package/dist/components/toaster.d.ts +5 -0
- package/dist/components/toaster.js +25 -0
- package/dist/components/toggle-group.d.ts +12 -0
- package/dist/components/toggle-group.js +72 -0
- package/dist/components/toggle.d.ts +13 -0
- package/dist/components/toggle.js +3 -0
- package/dist/components/tooltip.d.ts +9 -0
- package/dist/components/tooltip.js +26 -0
- package/dist/components/use-mobile.d.ts +3 -0
- package/dist/components/use-mobile.js +19 -0
- package/dist/components/use-toast.d.ts +42 -0
- package/dist/components/use-toast.js +2 -0
- package/dist/hooks/use-haptic.d.ts +22 -0
- package/dist/hooks/use-haptic.js +2 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +19 -0
- package/dist/hooks/use-mounted-theme.d.ts +6 -0
- package/dist/hooks/use-mounted-theme.js +18 -0
- package/dist/hooks/use-sticky.d.ts +18 -0
- package/dist/hooks/use-sticky.js +2 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +2 -0
- package/package.json +203 -0
- package/src/components/accordion.tsx +57 -0
- package/src/components/alert-dialog.tsx +116 -0
- package/src/components/alert.tsx +57 -0
- package/src/components/aspect-ratio.tsx +9 -0
- package/src/components/avatar.tsx +49 -0
- package/src/components/badge.tsx +38 -0
- package/src/components/breadcrumb.tsx +102 -0
- package/src/components/button.tsx +94 -0
- package/src/components/calendar.tsx +60 -0
- package/src/components/card.tsx +67 -0
- package/src/components/carousel.tsx +230 -0
- package/src/components/checkbox.tsx +27 -0
- package/src/components/collapsible.tsx +28 -0
- package/src/components/command.tsx +148 -0
- package/src/components/currency-input.tsx +158 -0
- package/src/components/dialog.tsx +103 -0
- package/src/components/drawer.tsx +99 -0
- package/src/components/dropdown-menu.tsx +228 -0
- package/src/components/empty-state.tsx +118 -0
- package/src/components/form.tsx +152 -0
- package/src/components/haptic-button.tsx +19 -0
- package/src/components/input-otp.tsx +70 -0
- package/src/components/input.tsx +23 -0
- package/src/components/label.tsx +20 -0
- package/src/components/lazy-markdown.tsx +20 -0
- package/src/components/link-button.tsx +40 -0
- package/src/components/markdown-renderer.tsx +20 -0
- package/src/components/multi-select-combobox.tsx +148 -0
- package/src/components/pagination.tsx +106 -0
- package/src/components/popover.tsx +30 -0
- package/src/components/progress.tsx +27 -0
- package/src/components/radio-group.tsx +37 -0
- package/src/components/rating.tsx +136 -0
- package/src/components/scroll-area.tsx +45 -0
- package/src/components/search-bar.tsx +113 -0
- package/src/components/searchable-select.tsx +134 -0
- package/src/components/select.tsx +152 -0
- package/src/components/separator.tsx +25 -0
- package/src/components/sheet.tsx +121 -0
- package/src/components/skeleton-card.tsx +282 -0
- package/src/components/skeleton.tsx +17 -0
- package/src/components/slider.tsx +24 -0
- package/src/components/sliding-panels.tsx +99 -0
- package/src/components/sonner.tsx +25 -0
- package/src/components/sticky-container.tsx +88 -0
- package/src/components/switch.tsx +28 -0
- package/src/components/table.tsx +90 -0
- package/src/components/tabs.tsx +72 -0
- package/src/components/text.test.tsx +192 -0
- package/src/components/text.tsx +114 -0
- package/src/components/textarea.tsx +22 -0
- package/src/components/toast.tsx +129 -0
- package/src/components/toaster.tsx +31 -0
- package/src/components/toggle-group.tsx +69 -0
- package/src/components/toggle.tsx +46 -0
- package/src/components/tooltip.tsx +29 -0
- package/src/components/use-mobile.tsx +19 -0
- package/src/components/use-toast.ts +180 -0
- package/src/globals.css +409 -0
- package/src/hooks/use-haptic.ts +118 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/hooks/use-mounted-theme.ts +20 -0
- package/src/hooks/use-sticky.ts +47 -0
- package/src/lib/utils.ts +6 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useHaptic } from './chunk-R47NEOSI.js';
|
|
2
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { jsx } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var buttonVariants = cva(
|
|
10
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-3xl text-sm font-medium transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer [@media(pointer:coarse)]:active:scale-95",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-primary backdrop-blur-sm text-primary-foreground shadow-lg hover:bg-primary/85 border border-primary/20 transition-colors duration-200",
|
|
15
|
+
destructive: "bg-destructive text-destructive-foreground shadow-lg hover:bg-destructive/90 hover:shadow-destructive/20 backdrop-blur-sm border border-destructive/20",
|
|
16
|
+
outline: "border border-border bg-card/70 backdrop-blur-md hover:bg-accent hover:text-accent-foreground hover:border-accent-foreground/20 hover:shadow-lg glass-hover",
|
|
17
|
+
secondary: "bg-secondary text-secondary-foreground shadow-lg hover:bg-secondary/90 hover:shadow-secondary/20 backdrop-blur-sm border border-secondary/20",
|
|
18
|
+
ghost: "hover:bg-foreground/10 hover:text-foreground transition-colors duration-200",
|
|
19
|
+
link: "text-primary underline-offset-4 hover:underline hover:text-primary/80",
|
|
20
|
+
glass: "glass glass-hover text-foreground hover:text-accent-foreground",
|
|
21
|
+
brown: "bg-[#482E1F] text-white shadow-lg hover:bg-[#352317] hover:shadow-[#482E1F]/20 backdrop-blur-sm border border-[#482E1F]/30 transition-all duration-300",
|
|
22
|
+
antagonist: "bg-primary-foreground text-primary shadow-lg hover:bg-primary-foreground/90 hover:shadow-primary-foreground/20 backdrop-blur-sm border border-primary-foreground/20 transition-all duration-300"
|
|
23
|
+
},
|
|
24
|
+
size: {
|
|
25
|
+
default: "h-11 px-6 py-2",
|
|
26
|
+
sm: "h-9 rounded-lg px-4",
|
|
27
|
+
lg: "h-12 rounded-xl px-8",
|
|
28
|
+
icon: "h-11 w-11"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default",
|
|
33
|
+
size: "default"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
var Button = React.forwardRef(
|
|
38
|
+
(_a, ref) => {
|
|
39
|
+
var _b = _a, {
|
|
40
|
+
className,
|
|
41
|
+
variant,
|
|
42
|
+
size,
|
|
43
|
+
asChild = false,
|
|
44
|
+
haptic = true,
|
|
45
|
+
hapticStyle = "light",
|
|
46
|
+
onClick
|
|
47
|
+
} = _b, props = __objRest(_b, [
|
|
48
|
+
"className",
|
|
49
|
+
"variant",
|
|
50
|
+
"size",
|
|
51
|
+
"asChild",
|
|
52
|
+
"haptic",
|
|
53
|
+
"hapticStyle",
|
|
54
|
+
"onClick"
|
|
55
|
+
]);
|
|
56
|
+
const Comp = asChild ? Slot : "button";
|
|
57
|
+
const { trigger } = useHaptic();
|
|
58
|
+
const [isMounted, setIsMounted] = React.useState(false);
|
|
59
|
+
React.useEffect(() => {
|
|
60
|
+
setIsMounted(true);
|
|
61
|
+
}, []);
|
|
62
|
+
const handleClick = (event) => {
|
|
63
|
+
if (haptic && isMounted) {
|
|
64
|
+
trigger(hapticStyle);
|
|
65
|
+
}
|
|
66
|
+
onClick == null ? void 0 : onClick(event);
|
|
67
|
+
};
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
Comp,
|
|
70
|
+
__spreadValues({
|
|
71
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
72
|
+
ref,
|
|
73
|
+
onClick: handleClick
|
|
74
|
+
}, props)
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
Button.displayName = "Button";
|
|
79
|
+
|
|
80
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { __objRest, __spreadProps, __spreadValues };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
2
|
+
import * as AspectRatioPrimitive from '@radix-ui/react-aspect-ratio';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function AspectRatio(_a) {
|
|
6
|
+
var props = __objRest(_a, []);
|
|
7
|
+
return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, __spreadValues({ "data-slot": "aspect-ratio" }, props));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { AspectRatio };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { X } from 'lucide-react';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var Dialog = DialogPrimitive.Root;
|
|
9
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
10
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
11
|
+
var DialogClose = DialogPrimitive.Close;
|
|
12
|
+
var DialogOverlay = React.forwardRef((_a, ref) => {
|
|
13
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
DialogPrimitive.Overlay,
|
|
16
|
+
__spreadValues({
|
|
17
|
+
ref,
|
|
18
|
+
className: cn(
|
|
19
|
+
"fixed inset-0 z-[1000] bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
+
className
|
|
21
|
+
)
|
|
22
|
+
}, props)
|
|
23
|
+
);
|
|
24
|
+
});
|
|
25
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
26
|
+
var DialogContent = React.forwardRef((_a, ref) => {
|
|
27
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
28
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
29
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
30
|
+
/* @__PURE__ */ jsxs(
|
|
31
|
+
DialogPrimitive.Content,
|
|
32
|
+
__spreadProps(__spreadValues({
|
|
33
|
+
ref,
|
|
34
|
+
className: cn(
|
|
35
|
+
"fixed left-[50%] top-[50%] z-[1000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 bg-card p-6 shadow-2xl duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 rounded-2xl border border-border",
|
|
36
|
+
className
|
|
37
|
+
)
|
|
38
|
+
}, props), {
|
|
39
|
+
children: [
|
|
40
|
+
children,
|
|
41
|
+
/* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-lg opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground hover:bg-muted p-2", children: [
|
|
42
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
43
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
44
|
+
] })
|
|
45
|
+
]
|
|
46
|
+
})
|
|
47
|
+
)
|
|
48
|
+
] });
|
|
49
|
+
});
|
|
50
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
51
|
+
var DialogHeader = (_a) => {
|
|
52
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
53
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className) }, props));
|
|
54
|
+
};
|
|
55
|
+
DialogHeader.displayName = "DialogHeader";
|
|
56
|
+
var DialogFooter = (_a) => {
|
|
57
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
"div",
|
|
60
|
+
__spreadValues({
|
|
61
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
62
|
+
}, props)
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
DialogFooter.displayName = "DialogFooter";
|
|
66
|
+
var DialogTitle = React.forwardRef((_a, ref) => {
|
|
67
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
DialogPrimitive.Title,
|
|
70
|
+
__spreadValues({
|
|
71
|
+
ref,
|
|
72
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
73
|
+
}, props)
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
77
|
+
var DialogDescription = React.forwardRef((_a, ref) => {
|
|
78
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
DialogPrimitive.Description,
|
|
81
|
+
__spreadValues({
|
|
82
|
+
ref,
|
|
83
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
84
|
+
}, props)
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
88
|
+
|
|
89
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var labelVariants = cva(
|
|
9
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 transition-all duration-200"
|
|
10
|
+
);
|
|
11
|
+
var Label = React.forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
13
|
+
return /* @__PURE__ */ jsx(LabelPrimitive.Root, __spreadValues({ ref, className: cn(labelVariants(), className) }, props));
|
|
14
|
+
});
|
|
15
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
16
|
+
|
|
17
|
+
export { Label };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var textVariants = cva("", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
display: "text-5xl font-bold tracking-tight",
|
|
10
|
+
h1: "text-3xl font-bold tracking-tight",
|
|
11
|
+
h2: "text-2xl font-semibold tracking-tight",
|
|
12
|
+
h3: "text-xl font-semibold",
|
|
13
|
+
h4: "text-lg font-semibold leading-none tracking-tight",
|
|
14
|
+
"body-lg": "text-base leading-relaxed",
|
|
15
|
+
body: "text-sm leading-normal",
|
|
16
|
+
"body-sm": "text-sm leading-relaxed",
|
|
17
|
+
caption: "text-xs leading-normal",
|
|
18
|
+
label: "text-sm font-medium",
|
|
19
|
+
overline: "text-xs font-semibold uppercase tracking-wider"
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
default: "text-foreground",
|
|
23
|
+
muted: "text-muted-foreground",
|
|
24
|
+
primary: "text-primary",
|
|
25
|
+
destructive: "text-destructive",
|
|
26
|
+
"primary-foreground": "text-primary-foreground",
|
|
27
|
+
inherit: ""
|
|
28
|
+
},
|
|
29
|
+
weight: {
|
|
30
|
+
normal: "font-normal",
|
|
31
|
+
medium: "font-medium",
|
|
32
|
+
semibold: "font-semibold",
|
|
33
|
+
bold: "font-bold"
|
|
34
|
+
},
|
|
35
|
+
leading: {
|
|
36
|
+
none: "leading-none",
|
|
37
|
+
tight: "leading-tight",
|
|
38
|
+
snug: "leading-snug",
|
|
39
|
+
normal: "leading-normal",
|
|
40
|
+
relaxed: "leading-relaxed",
|
|
41
|
+
loose: "leading-loose"
|
|
42
|
+
},
|
|
43
|
+
tracking: {
|
|
44
|
+
tight: "tracking-tight",
|
|
45
|
+
normal: "tracking-normal",
|
|
46
|
+
wide: "tracking-wide",
|
|
47
|
+
wider: "tracking-wider"
|
|
48
|
+
},
|
|
49
|
+
wrap: {
|
|
50
|
+
balance: "text-balance",
|
|
51
|
+
pretty: "text-pretty",
|
|
52
|
+
nowrap: "whitespace-nowrap"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
defaultVariants: {
|
|
56
|
+
color: "inherit"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
function Text(_a) {
|
|
60
|
+
var _b = _a, {
|
|
61
|
+
as,
|
|
62
|
+
variant,
|
|
63
|
+
color,
|
|
64
|
+
weight,
|
|
65
|
+
leading,
|
|
66
|
+
tracking,
|
|
67
|
+
wrap,
|
|
68
|
+
className
|
|
69
|
+
} = _b, props = __objRest(_b, [
|
|
70
|
+
"as",
|
|
71
|
+
"variant",
|
|
72
|
+
"color",
|
|
73
|
+
"weight",
|
|
74
|
+
"leading",
|
|
75
|
+
"tracking",
|
|
76
|
+
"wrap",
|
|
77
|
+
"className"
|
|
78
|
+
]);
|
|
79
|
+
const Comp = as != null ? as : "p";
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
Comp,
|
|
82
|
+
__spreadValues({
|
|
83
|
+
className: cn(textVariants({ variant, color, weight, leading, tracking, wrap }), className)
|
|
84
|
+
}, props)
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
Text.displayName = "Text";
|
|
88
|
+
|
|
89
|
+
export { Text, textVariants };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Popover = PopoverPrimitive.Root;
|
|
8
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
9
|
+
var PopoverContent = React.forwardRef((_a, ref) => {
|
|
10
|
+
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
11
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
12
|
+
PopoverPrimitive.Content,
|
|
13
|
+
__spreadValues({
|
|
14
|
+
ref,
|
|
15
|
+
align,
|
|
16
|
+
sideOffset,
|
|
17
|
+
className: cn(
|
|
18
|
+
"z-50 w-72 rounded-xl bg-cave-depth p-4 text-popover-foreground shadow-2xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border border-border/50",
|
|
19
|
+
className
|
|
20
|
+
)
|
|
21
|
+
}, props)
|
|
22
|
+
) });
|
|
23
|
+
});
|
|
24
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
25
|
+
|
|
26
|
+
export { Popover, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Dialog, DialogContent } from './chunk-4AVS6CV4.js';
|
|
2
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Command as Command$1 } from 'cmdk';
|
|
6
|
+
import { Search } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Command = React.forwardRef((_a, ref) => {
|
|
10
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
11
|
+
return /* @__PURE__ */ jsx(
|
|
12
|
+
Command$1,
|
|
13
|
+
__spreadValues({
|
|
14
|
+
ref,
|
|
15
|
+
className: cn(
|
|
16
|
+
"flex h-full w-full flex-col overflow-hidden rounded-xl glass border border-border/50",
|
|
17
|
+
className
|
|
18
|
+
)
|
|
19
|
+
}, props)
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
Command.displayName = Command$1.displayName;
|
|
23
|
+
var CommandDialog = (_a) => {
|
|
24
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
25
|
+
return /* @__PURE__ */ jsx(Dialog, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsx(DialogContent, { className: "overflow-hidden p-0 shadow-2xl", children: /* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children }) }) }));
|
|
26
|
+
};
|
|
27
|
+
var CommandInput = React.forwardRef((_a, ref) => {
|
|
28
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
29
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-border/50 px-3", "cmdk-input-wrapper": "", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
Command$1.Input,
|
|
33
|
+
__spreadValues({
|
|
34
|
+
ref,
|
|
35
|
+
className: cn(
|
|
36
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
37
|
+
className
|
|
38
|
+
)
|
|
39
|
+
}, props)
|
|
40
|
+
)
|
|
41
|
+
] });
|
|
42
|
+
});
|
|
43
|
+
CommandInput.displayName = Command$1.Input.displayName;
|
|
44
|
+
var CommandList = React.forwardRef((_a, ref) => {
|
|
45
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
Command$1.List,
|
|
48
|
+
__spreadValues({
|
|
49
|
+
ref,
|
|
50
|
+
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className)
|
|
51
|
+
}, props)
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
CommandList.displayName = Command$1.List.displayName;
|
|
55
|
+
var CommandEmpty = React.forwardRef((_a, ref) => {
|
|
56
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
Command$1.Empty,
|
|
59
|
+
__spreadValues({
|
|
60
|
+
ref,
|
|
61
|
+
className: cn("py-6 text-center text-sm", className)
|
|
62
|
+
}, props)
|
|
63
|
+
);
|
|
64
|
+
});
|
|
65
|
+
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
66
|
+
var CommandGroup = React.forwardRef((_a, ref) => {
|
|
67
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
68
|
+
return /* @__PURE__ */ jsx(
|
|
69
|
+
Command$1.Group,
|
|
70
|
+
__spreadValues({
|
|
71
|
+
ref,
|
|
72
|
+
className: cn(
|
|
73
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
74
|
+
className
|
|
75
|
+
)
|
|
76
|
+
}, props)
|
|
77
|
+
);
|
|
78
|
+
});
|
|
79
|
+
CommandGroup.displayName = Command$1.Group.displayName;
|
|
80
|
+
var CommandSeparator = React.forwardRef((_a, ref) => {
|
|
81
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
Command$1.Separator,
|
|
84
|
+
__spreadValues({
|
|
85
|
+
ref,
|
|
86
|
+
className: cn("-mx-1 h-px bg-border", className)
|
|
87
|
+
}, props)
|
|
88
|
+
);
|
|
89
|
+
});
|
|
90
|
+
CommandSeparator.displayName = Command$1.Separator.displayName;
|
|
91
|
+
var CommandItem = React.forwardRef((_a, ref) => {
|
|
92
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
93
|
+
return /* @__PURE__ */ jsx(
|
|
94
|
+
Command$1.Item,
|
|
95
|
+
__spreadValues({
|
|
96
|
+
ref,
|
|
97
|
+
className: cn(
|
|
98
|
+
"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 transition-all duration-200 hover:bg-accent/50",
|
|
99
|
+
className
|
|
100
|
+
)
|
|
101
|
+
}, props)
|
|
102
|
+
);
|
|
103
|
+
});
|
|
104
|
+
CommandItem.displayName = Command$1.Item.displayName;
|
|
105
|
+
var CommandShortcut = (_a) => {
|
|
106
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
107
|
+
return /* @__PURE__ */ jsx(
|
|
108
|
+
"span",
|
|
109
|
+
__spreadValues({
|
|
110
|
+
className: cn("ml-auto text-xs tracking-widest text-muted-foreground", className)
|
|
111
|
+
}, props)
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
115
|
+
|
|
116
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Input = React.forwardRef(
|
|
7
|
+
(_a, ref) => {
|
|
8
|
+
var _b = _a, { className, type } = _b, props = __objRest(_b, ["className", "type"]);
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"input",
|
|
11
|
+
__spreadValues({
|
|
12
|
+
type,
|
|
13
|
+
className: cn(
|
|
14
|
+
"flex h-11 w-full rounded-xl border border-border bg-input/50 backdrop-blur-md px-4 py-2 text-base transition-all duration-300 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input focus-visible:border-accent-foreground/30 focus-visible:shadow-lg focus-visible:shadow-accent/10 disabled:cursor-not-allowed disabled:opacity-50",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
ref
|
|
18
|
+
}, props)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
Input.displayName = "Input";
|
|
23
|
+
|
|
24
|
+
export { Input };
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { __spreadProps, __spreadValues, __objRest } from './chunk-3GWWZKX7.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
var TOAST_LIMIT = 1;
|
|
5
|
+
var TOAST_REMOVE_DELAY = 1e6;
|
|
6
|
+
var count = 0;
|
|
7
|
+
function genId() {
|
|
8
|
+
count = (count + 1) % Number.MAX_SAFE_INTEGER;
|
|
9
|
+
return count.toString();
|
|
10
|
+
}
|
|
11
|
+
var toastTimeouts = /* @__PURE__ */ new Map();
|
|
12
|
+
var addToRemoveQueue = (toastId) => {
|
|
13
|
+
if (toastTimeouts.has(toastId)) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const timeout = setTimeout(() => {
|
|
17
|
+
toastTimeouts.delete(toastId);
|
|
18
|
+
dispatch({
|
|
19
|
+
type: "REMOVE_TOAST",
|
|
20
|
+
toastId
|
|
21
|
+
});
|
|
22
|
+
}, TOAST_REMOVE_DELAY);
|
|
23
|
+
toastTimeouts.set(toastId, timeout);
|
|
24
|
+
};
|
|
25
|
+
var reducer = (state, action) => {
|
|
26
|
+
switch (action.type) {
|
|
27
|
+
case "ADD_TOAST":
|
|
28
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
29
|
+
toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)
|
|
30
|
+
});
|
|
31
|
+
case "UPDATE_TOAST":
|
|
32
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
33
|
+
toasts: state.toasts.map((t) => t.id === action.toast.id ? __spreadValues(__spreadValues({}, t), action.toast) : t)
|
|
34
|
+
});
|
|
35
|
+
case "DISMISS_TOAST": {
|
|
36
|
+
const { toastId } = action;
|
|
37
|
+
if (toastId) {
|
|
38
|
+
addToRemoveQueue(toastId);
|
|
39
|
+
} else {
|
|
40
|
+
state.toasts.forEach((toast2) => {
|
|
41
|
+
addToRemoveQueue(toast2.id);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
45
|
+
toasts: state.toasts.map(
|
|
46
|
+
(t) => t.id === toastId || toastId === void 0 ? __spreadProps(__spreadValues({}, t), {
|
|
47
|
+
open: false
|
|
48
|
+
}) : t
|
|
49
|
+
)
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
case "REMOVE_TOAST":
|
|
53
|
+
if (action.toastId === void 0) {
|
|
54
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
55
|
+
toasts: []
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
59
|
+
toasts: state.toasts.filter((t) => t.id !== action.toastId)
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var listeners = [];
|
|
64
|
+
var memoryState = { toasts: [] };
|
|
65
|
+
function dispatch(action) {
|
|
66
|
+
memoryState = reducer(memoryState, action);
|
|
67
|
+
listeners.forEach((listener) => {
|
|
68
|
+
listener(memoryState);
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function toast(_a) {
|
|
72
|
+
var props = __objRest(_a, []);
|
|
73
|
+
const id = genId();
|
|
74
|
+
const update = (props2) => dispatch({
|
|
75
|
+
type: "UPDATE_TOAST",
|
|
76
|
+
toast: __spreadProps(__spreadValues({}, props2), { id })
|
|
77
|
+
});
|
|
78
|
+
const dismiss = () => dispatch({ type: "DISMISS_TOAST", toastId: id });
|
|
79
|
+
dispatch({
|
|
80
|
+
type: "ADD_TOAST",
|
|
81
|
+
toast: __spreadProps(__spreadValues({}, props), {
|
|
82
|
+
id,
|
|
83
|
+
open: true,
|
|
84
|
+
onOpenChange: (open) => {
|
|
85
|
+
if (!open) dismiss();
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
id,
|
|
91
|
+
dismiss,
|
|
92
|
+
update
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
function useToast() {
|
|
96
|
+
const [state, setState] = React.useState(memoryState);
|
|
97
|
+
React.useEffect(() => {
|
|
98
|
+
listeners.push(setState);
|
|
99
|
+
return () => {
|
|
100
|
+
const index = listeners.indexOf(setState);
|
|
101
|
+
if (index > -1) {
|
|
102
|
+
listeners.splice(index, 1);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}, [state]);
|
|
106
|
+
return __spreadProps(__spreadValues({}, state), {
|
|
107
|
+
toast,
|
|
108
|
+
dismiss: (toastId) => dispatch({ type: "DISMISS_TOAST", toastId })
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export { reducer, toast, useToast };
|