@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,129 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
|
+
import { ChevronDown, ChevronUp, Check } from 'lucide-react';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var Select = SelectPrimitive.Root;
|
|
9
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
10
|
+
var SelectValue = SelectPrimitive.Value;
|
|
11
|
+
var SelectTrigger = React.forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
13
|
+
return /* @__PURE__ */ jsxs(
|
|
14
|
+
SelectPrimitive.Trigger,
|
|
15
|
+
__spreadProps(__spreadValues({
|
|
16
|
+
ref,
|
|
17
|
+
className: cn(
|
|
18
|
+
"flex h-11 w-full items-center justify-between rounded-xl bg-surface border border-border px-4 py-2 text-sm font-medium text-muted-foreground transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 hover:border-foreground/20 hover:text-foreground",
|
|
19
|
+
className
|
|
20
|
+
)
|
|
21
|
+
}, props), {
|
|
22
|
+
children: [
|
|
23
|
+
children,
|
|
24
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" }) })
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
});
|
|
29
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
30
|
+
var SelectScrollUpButton = React.forwardRef((_a, ref) => {
|
|
31
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
SelectPrimitive.ScrollUpButton,
|
|
34
|
+
__spreadProps(__spreadValues({
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("flex cursor-default items-center justify-center py-1", className)
|
|
37
|
+
}, props), {
|
|
38
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
39
|
+
})
|
|
40
|
+
);
|
|
41
|
+
});
|
|
42
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
43
|
+
var SelectScrollDownButton = React.forwardRef((_a, ref) => {
|
|
44
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
SelectPrimitive.ScrollDownButton,
|
|
47
|
+
__spreadProps(__spreadValues({
|
|
48
|
+
ref,
|
|
49
|
+
className: cn("flex cursor-default items-center justify-center py-1", className)
|
|
50
|
+
}, props), {
|
|
51
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
56
|
+
var SelectContent = React.forwardRef((_a, ref) => {
|
|
57
|
+
var _b = _a, { className, children, position = "popper" } = _b, props = __objRest(_b, ["className", "children", "position"]);
|
|
58
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
59
|
+
SelectPrimitive.Content,
|
|
60
|
+
__spreadProps(__spreadValues({
|
|
61
|
+
ref,
|
|
62
|
+
className: cn(
|
|
63
|
+
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-xl border border-border bg-card text-popover-foreground shadow-lg 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",
|
|
64
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
position
|
|
68
|
+
}, props), {
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
SelectPrimitive.Viewport,
|
|
73
|
+
{
|
|
74
|
+
className: cn(
|
|
75
|
+
"p-1 flex flex-col gap-1",
|
|
76
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
77
|
+
),
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
82
|
+
]
|
|
83
|
+
})
|
|
84
|
+
) });
|
|
85
|
+
});
|
|
86
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
87
|
+
var SelectLabel = React.forwardRef((_a, ref) => {
|
|
88
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
89
|
+
return /* @__PURE__ */ jsx(
|
|
90
|
+
SelectPrimitive.Label,
|
|
91
|
+
__spreadValues({
|
|
92
|
+
ref,
|
|
93
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className)
|
|
94
|
+
}, props)
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
98
|
+
var SelectItem = React.forwardRef((_a, ref) => {
|
|
99
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
100
|
+
return /* @__PURE__ */ jsxs(
|
|
101
|
+
SelectPrimitive.Item,
|
|
102
|
+
__spreadProps(__spreadValues({
|
|
103
|
+
ref,
|
|
104
|
+
className: cn(
|
|
105
|
+
"relative flex w-full cursor-default select-none items-center rounded-lg py-2 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 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[state=checked]:bg-primary/10 data-[state=checked]:text-primary data-[state=checked]:font-medium",
|
|
106
|
+
className
|
|
107
|
+
)
|
|
108
|
+
}, props), {
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
111
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
});
|
|
116
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
117
|
+
var SelectSeparator = React.forwardRef((_a, ref) => {
|
|
118
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
119
|
+
return /* @__PURE__ */ jsx(
|
|
120
|
+
SelectPrimitive.Separator,
|
|
121
|
+
__spreadValues({
|
|
122
|
+
ref,
|
|
123
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className)
|
|
124
|
+
}, props)
|
|
125
|
+
);
|
|
126
|
+
});
|
|
127
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
128
|
+
|
|
129
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
|
|
4
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
|
|
6
|
+
export { Separator };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Separator = React.forwardRef((_a, ref) => {
|
|
8
|
+
var _b = _a, { className, orientation = "horizontal", decorative = true } = _b, props = __objRest(_b, ["className", "orientation", "decorative"]);
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
SeparatorPrimitive.Root,
|
|
11
|
+
__spreadValues({
|
|
12
|
+
ref,
|
|
13
|
+
decorative,
|
|
14
|
+
orientation,
|
|
15
|
+
className: cn(
|
|
16
|
+
"shrink-0 bg-gradient-to-r from-transparent via-border to-transparent backdrop-blur-sm",
|
|
17
|
+
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
|
18
|
+
className
|
|
19
|
+
)
|
|
20
|
+
}, props)
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
24
|
+
|
|
25
|
+
export { Separator };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
|
|
7
|
+
declare const Sheet: React.FC<DialogPrimitive.DialogProps>;
|
|
8
|
+
declare const SheetTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const SheetClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
declare const SheetPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
11
|
+
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const sheetVariants: (props?: ({
|
|
13
|
+
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
|
+
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
|
+
}
|
|
17
|
+
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const SheetHeader: {
|
|
19
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
declare const SheetFooter: {
|
|
23
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
declare const SheetTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
27
|
+
declare const SheetDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
|
+
|
|
29
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { X } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Sheet = SheetPrimitive.Root;
|
|
10
|
+
var SheetTrigger = SheetPrimitive.Trigger;
|
|
11
|
+
var SheetClose = SheetPrimitive.Close;
|
|
12
|
+
var SheetPortal = SheetPrimitive.Portal;
|
|
13
|
+
var SheetOverlay = React.forwardRef((_a, ref) => {
|
|
14
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
SheetPrimitive.Overlay,
|
|
17
|
+
__spreadProps(__spreadValues({
|
|
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
|
+
ref
|
|
24
|
+
})
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
28
|
+
var sheetVariants = cva(
|
|
29
|
+
"fixed z-[1000] gap-4 glass bg-background p-6 shadow-2xl transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
side: {
|
|
33
|
+
top: "inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
34
|
+
bottom: "inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom rounded-t-2xl",
|
|
35
|
+
left: "inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm rounded-r-2xl",
|
|
36
|
+
right: "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm rounded-l-2xl"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
side: "right"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
var SheetContent = React.forwardRef((_a, ref) => {
|
|
45
|
+
var _b = _a, { side = "right", className, children } = _b, props = __objRest(_b, ["side", "className", "children"]);
|
|
46
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
47
|
+
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
48
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.Content, __spreadProps(__spreadValues({ ref, className: cn(sheetVariants({ side }), className) }, props), { children: [
|
|
49
|
+
children,
|
|
50
|
+
/* @__PURE__ */ jsxs(SheetPrimitive.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-secondary glass-hover p-2", children: [
|
|
51
|
+
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
53
|
+
] })
|
|
54
|
+
] }))
|
|
55
|
+
] });
|
|
56
|
+
});
|
|
57
|
+
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
58
|
+
var SheetHeader = (_a) => {
|
|
59
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
60
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col space-y-2 text-center sm:text-left", className) }, props));
|
|
61
|
+
};
|
|
62
|
+
SheetHeader.displayName = "SheetHeader";
|
|
63
|
+
var SheetFooter = (_a) => {
|
|
64
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"div",
|
|
67
|
+
__spreadValues({
|
|
68
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
69
|
+
}, props)
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
SheetFooter.displayName = "SheetFooter";
|
|
73
|
+
var SheetTitle = React.forwardRef((_a, ref) => {
|
|
74
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
SheetPrimitive.Title,
|
|
77
|
+
__spreadValues({
|
|
78
|
+
ref,
|
|
79
|
+
className: cn("text-lg font-semibold text-foreground", className)
|
|
80
|
+
}, props)
|
|
81
|
+
);
|
|
82
|
+
});
|
|
83
|
+
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
84
|
+
var SheetDescription = React.forwardRef((_a, ref) => {
|
|
85
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
SheetPrimitive.Description,
|
|
88
|
+
__spreadValues({
|
|
89
|
+
ref,
|
|
90
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
91
|
+
}, props)
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
95
|
+
|
|
96
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface SkeletonCardProps {
|
|
4
|
+
variant?: "experience" | "restaurant" | "generic" | "place" | "dish" | "drink" | "event";
|
|
5
|
+
showImage?: boolean;
|
|
6
|
+
showRating?: boolean;
|
|
7
|
+
showPrice?: boolean;
|
|
8
|
+
lines?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const SkeletonCard: React.ForwardRefExoticComponent<SkeletonCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
|
|
13
|
+
export { SkeletonCard };
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Skeleton } from '../chunk-X6GATUI2.js';
|
|
2
|
+
import { AspectRatio } from '../chunk-3VMDCCCX.js';
|
|
3
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var SkeletonCard = React.forwardRef(
|
|
9
|
+
(_a, ref) => {
|
|
10
|
+
var _b = _a, {
|
|
11
|
+
variant = "experience",
|
|
12
|
+
showImage = true,
|
|
13
|
+
showRating = true,
|
|
14
|
+
showPrice = true,
|
|
15
|
+
lines = 2,
|
|
16
|
+
className
|
|
17
|
+
} = _b, props = __objRest(_b, [
|
|
18
|
+
"variant",
|
|
19
|
+
"showImage",
|
|
20
|
+
"showRating",
|
|
21
|
+
"showPrice",
|
|
22
|
+
"lines",
|
|
23
|
+
"className"
|
|
24
|
+
]);
|
|
25
|
+
const renderPlaceCardSkeleton = () => /* @__PURE__ */ jsx("div", { className: "glass transition-all duration-300 ease-in-out h-full flex flex-col w-full rounded-3xl border border-transparent", children: /* @__PURE__ */ jsxs("div", { className: "p-4 flex-1 flex flex-col", children: [
|
|
26
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-12 h-12 rounded-lg flex-shrink-0" }),
|
|
28
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
29
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4 mb-2" }),
|
|
30
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-16" }),
|
|
32
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-12" })
|
|
34
|
+
] })
|
|
35
|
+
] })
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 text-xs", children: [
|
|
38
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20" }),
|
|
39
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-20" })
|
|
40
|
+
] }) }),
|
|
41
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
42
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-16" }),
|
|
43
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-1" }),
|
|
44
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-20" })
|
|
45
|
+
] }) }),
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
47
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-full mb-1" }),
|
|
48
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-2/3" })
|
|
49
|
+
] })
|
|
50
|
+
] }) });
|
|
51
|
+
const renderDishCardSkeleton = () => /* @__PURE__ */ jsx("div", { className: "glass transition-all duration-300 ease-in-out h-full flex flex-col w-full border rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "p-3 h-full flex flex-col", children: [
|
|
52
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-12 h-12 rounded-lg flex-shrink-0" }),
|
|
54
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
55
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4 mb-1" }),
|
|
56
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 rounded-md flex-shrink-0" })
|
|
59
|
+
] }),
|
|
60
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-2", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-24 rounded-full" }) }),
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }),
|
|
63
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-12 rounded-full" })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-full mb-1" }),
|
|
67
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-2/3" })
|
|
68
|
+
] }),
|
|
69
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-auto", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-16" }),
|
|
71
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-24 rounded-md" })
|
|
72
|
+
] })
|
|
73
|
+
] }) });
|
|
74
|
+
const renderDrinkCardSkeleton = () => /* @__PURE__ */ jsx("div", { className: "glass transition-all duration-300 ease-in-out w-full h-full border rounded-lg", children: /* @__PURE__ */ jsxs("div", { className: "p-3 h-full flex flex-col", children: [
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 mb-3", children: [
|
|
76
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "w-12 h-12 rounded-lg flex-shrink-0" }),
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
78
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-3/4 mb-1" }),
|
|
79
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/2" })
|
|
80
|
+
] }),
|
|
81
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-8 rounded-md flex-shrink-0" })
|
|
82
|
+
] }),
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: "mb-3 flex items-center gap-2", children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-24 rounded-full" }) }),
|
|
84
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
|
|
85
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }),
|
|
86
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-12 rounded-full" })
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
|
|
89
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-full mb-1" }),
|
|
90
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-2/3" })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-auto", children: [
|
|
93
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-16" }),
|
|
94
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-8 w-24 rounded-md" })
|
|
95
|
+
] })
|
|
96
|
+
] }) });
|
|
97
|
+
const renderEventCardSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "glass transition-all duration-300 ease-in-out w-full overflow-hidden rounded-xl", children: [
|
|
98
|
+
/* @__PURE__ */ jsx("div", { className: "relative aspect-[16/10] overflow-hidden bg-white/[0.06]", children: /* @__PURE__ */ jsx(Skeleton, { className: "absolute inset-0 w-full h-full" }) }),
|
|
99
|
+
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 p-3", children: [
|
|
100
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-3/4" }),
|
|
101
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1/2" })
|
|
102
|
+
] })
|
|
103
|
+
] });
|
|
104
|
+
const renderExperienceSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "glass rounded-xl overflow-hidden transition-all duration-300", children: [
|
|
105
|
+
showImage && /* @__PURE__ */ jsx(AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-full" }) }),
|
|
106
|
+
/* @__PURE__ */ jsxs("div", { className: "p-6 space-y-4", children: [
|
|
107
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-3/4" }),
|
|
108
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: cn("h-4", i === lines - 1 ? "w-1/2" : "w-full") }, i)) }),
|
|
109
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
110
|
+
showPrice && /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-20" }),
|
|
111
|
+
showRating && /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-16" })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
|
|
114
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
115
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-16" })
|
|
116
|
+
] })
|
|
117
|
+
] })
|
|
118
|
+
] });
|
|
119
|
+
const renderRestaurantSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "glass rounded-xl overflow-hidden transition-all duration-300", children: [
|
|
120
|
+
showImage && /* @__PURE__ */ jsx(AspectRatio, { ratio: 16 / 9, children: /* @__PURE__ */ jsx(Skeleton, { className: "w-full h-full" }) }),
|
|
121
|
+
/* @__PURE__ */ jsxs("div", { className: "p-6 space-y-4", children: [
|
|
122
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-2/3" }),
|
|
123
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
124
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full" }),
|
|
125
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-3/4" })
|
|
126
|
+
] }),
|
|
127
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
128
|
+
showRating && /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-20" }),
|
|
129
|
+
showPrice && /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16" })
|
|
130
|
+
] })
|
|
131
|
+
] })
|
|
132
|
+
] });
|
|
133
|
+
const renderGenericSkeleton = () => /* @__PURE__ */ jsxs("div", { className: "glass rounded-xl p-6 space-y-4", children: [
|
|
134
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-1/2" }),
|
|
135
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2", children: Array.from({ length: lines }).map((_, i) => /* @__PURE__ */ jsx(Skeleton, { className: cn("h-4", i === lines - 1 ? "w-1/3" : "w-full") }, i)) }),
|
|
136
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
137
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-20" }),
|
|
138
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-16" })
|
|
139
|
+
] })
|
|
140
|
+
] });
|
|
141
|
+
return /* @__PURE__ */ jsxs("div", __spreadProps(__spreadValues({ ref, className: cn("w-full", className) }, props), { children: [
|
|
142
|
+
variant === "place" && renderPlaceCardSkeleton(),
|
|
143
|
+
variant === "dish" && renderDishCardSkeleton(),
|
|
144
|
+
variant === "drink" && renderDrinkCardSkeleton(),
|
|
145
|
+
variant === "event" && renderEventCardSkeleton(),
|
|
146
|
+
variant === "experience" && renderExperienceSkeleton(),
|
|
147
|
+
variant === "restaurant" && renderRestaurantSkeleton(),
|
|
148
|
+
variant === "generic" && renderGenericSkeleton()
|
|
149
|
+
] }));
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
SkeletonCard.displayName = "SkeletonCard";
|
|
153
|
+
|
|
154
|
+
export { SkeletonCard };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
|
|
4
|
+
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
|
|
6
|
+
export { Slider };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Slider = React.forwardRef((_a, ref) => {
|
|
8
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
SliderPrimitive.Root,
|
|
11
|
+
__spreadProps(__spreadValues({
|
|
12
|
+
ref,
|
|
13
|
+
className: cn("relative flex w-full touch-none select-none items-center", className)
|
|
14
|
+
}, props), {
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full glass border border-border/50", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-white shadow-lg" }) }),
|
|
17
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-primary ring-offset-background 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 hover:shadow-lg hover:shadow-primary/20 hover:scale-110" })
|
|
18
|
+
]
|
|
19
|
+
})
|
|
20
|
+
);
|
|
21
|
+
});
|
|
22
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
23
|
+
|
|
24
|
+
export { Slider };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
|
|
4
|
+
interface Panel {
|
|
5
|
+
id: string;
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
showBackButton?: boolean;
|
|
8
|
+
backButtonLabel?: string;
|
|
9
|
+
onBack?: () => void;
|
|
10
|
+
}
|
|
11
|
+
interface SlidingPanelsProps {
|
|
12
|
+
panels: Panel[];
|
|
13
|
+
currentPanel: string;
|
|
14
|
+
onPanelChange: (panelId: string) => void;
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const SlidingPanels: ({ panels, currentPanel, onPanelChange, className, }: SlidingPanelsProps) => react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { type Panel, SlidingPanels, type SlidingPanelsProps };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Button } from '../chunk-2CUFS5LF.js';
|
|
2
|
+
import '../chunk-R47NEOSI.js';
|
|
3
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
|
+
import '../chunk-3GWWZKX7.js';
|
|
5
|
+
import { useRef, useState, useLayoutEffect } from 'react';
|
|
6
|
+
import { ChevronLeft } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var SlidingPanels = ({
|
|
10
|
+
panels,
|
|
11
|
+
currentPanel,
|
|
12
|
+
onPanelChange,
|
|
13
|
+
className
|
|
14
|
+
}) => {
|
|
15
|
+
const currentIndex = panels.findIndex((p) => p.id === currentPanel);
|
|
16
|
+
const currentPanelData = panels[currentIndex];
|
|
17
|
+
const panelRefs = useRef([]);
|
|
18
|
+
const [containerHeight, setContainerHeight] = useState();
|
|
19
|
+
useLayoutEffect(() => {
|
|
20
|
+
const activeEl = panelRefs.current[currentIndex];
|
|
21
|
+
if (!activeEl) return;
|
|
22
|
+
const updateHeight = () => setContainerHeight(activeEl.scrollHeight);
|
|
23
|
+
updateHeight();
|
|
24
|
+
const ro = new ResizeObserver(updateHeight);
|
|
25
|
+
ro.observe(activeEl);
|
|
26
|
+
return () => ro.disconnect();
|
|
27
|
+
}, [currentIndex]);
|
|
28
|
+
const handleBack = () => {
|
|
29
|
+
if (currentIndex > 0) {
|
|
30
|
+
const previousPanel = panels[currentIndex - 1];
|
|
31
|
+
if (currentPanelData == null ? void 0 : currentPanelData.onBack) {
|
|
32
|
+
currentPanelData.onBack();
|
|
33
|
+
} else {
|
|
34
|
+
onPanelChange(previousPanel.id);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
className: cn("relative overflow-hidden transition-[height] duration-300", className),
|
|
42
|
+
style: { height: containerHeight },
|
|
43
|
+
children: panels.map((panel, index) => {
|
|
44
|
+
const isActive = panel.id === currentPanel;
|
|
45
|
+
const isLeft = index < currentIndex;
|
|
46
|
+
const isRight = index > currentIndex;
|
|
47
|
+
return /* @__PURE__ */ jsxs(
|
|
48
|
+
"div",
|
|
49
|
+
{
|
|
50
|
+
ref: (el) => {
|
|
51
|
+
panelRefs.current[index] = el;
|
|
52
|
+
},
|
|
53
|
+
className: cn(
|
|
54
|
+
"absolute top-0 left-0 w-full transition-transform duration-300",
|
|
55
|
+
isActive && "translate-x-0",
|
|
56
|
+
isLeft && "-translate-x-full",
|
|
57
|
+
isRight && "translate-x-full"
|
|
58
|
+
),
|
|
59
|
+
"aria-hidden": !isActive,
|
|
60
|
+
children: [
|
|
61
|
+
panel.showBackButton && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-4", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon", onClick: handleBack, children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" }) }),
|
|
63
|
+
panel.backButtonLabel && /* @__PURE__ */ jsx("h3", { className: "font-semibold", children: panel.backButtonLabel })
|
|
64
|
+
] }),
|
|
65
|
+
panel.content
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
panel.id
|
|
69
|
+
);
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { SlidingPanels };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
2
|
+
import { useTheme } from 'next-themes';
|
|
3
|
+
import { Toaster as Toaster$1 } from 'sonner';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var Toaster = (_a) => {
|
|
7
|
+
var props = __objRest(_a, []);
|
|
8
|
+
const { theme = "system" } = useTheme();
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
Toaster$1,
|
|
11
|
+
__spreadValues({
|
|
12
|
+
theme,
|
|
13
|
+
className: "toaster group",
|
|
14
|
+
style: {
|
|
15
|
+
"--normal-bg": "var(--popover)",
|
|
16
|
+
"--normal-text": "var(--popover-foreground)",
|
|
17
|
+
"--normal-border": "var(--border)"
|
|
18
|
+
}
|
|
19
|
+
}, props)
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { Toaster };
|