@uipath/apollo-wind 0.7.2-pr188.4865fad
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 +188 -0
- package/dist/components/forms/data-fetcher.cjs +250 -0
- package/dist/components/forms/data-fetcher.d.ts +173 -0
- package/dist/components/forms/data-fetcher.js +207 -0
- package/dist/components/forms/demo-mocks.cjs +1031 -0
- package/dist/components/forms/demo-mocks.d.ts +10 -0
- package/dist/components/forms/demo-mocks.js +997 -0
- package/dist/components/forms/field-renderer.cjs +595 -0
- package/dist/components/forms/field-renderer.d.ts +14 -0
- package/dist/components/forms/field-renderer.js +561 -0
- package/dist/components/forms/form-designer.cjs +2314 -0
- package/dist/components/forms/form-designer.d.ts +1 -0
- package/dist/components/forms/form-designer.js +2280 -0
- package/dist/components/forms/form-examples.cjs +962 -0
- package/dist/components/forms/form-examples.d.ts +46 -0
- package/dist/components/forms/form-examples.js +907 -0
- package/dist/components/forms/form-plugins.cjs +225 -0
- package/dist/components/forms/form-plugins.d.ts +11 -0
- package/dist/components/forms/form-plugins.js +176 -0
- package/dist/components/forms/form-schema.cjs +56 -0
- package/dist/components/forms/form-schema.d.ts +324 -0
- package/dist/components/forms/form-schema.js +13 -0
- package/dist/components/forms/form-state-viewer.cjs +498 -0
- package/dist/components/forms/form-state-viewer.d.ts +15 -0
- package/dist/components/forms/form-state-viewer.js +464 -0
- package/dist/components/forms/index.cjs +103 -0
- package/dist/components/forms/index.d.ts +13 -0
- package/dist/components/forms/index.js +9 -0
- package/dist/components/forms/metadata-form.cjs +400 -0
- package/dist/components/forms/metadata-form.d.ts +16 -0
- package/dist/components/forms/metadata-form.js +366 -0
- package/dist/components/forms/rules-engine.cjs +343 -0
- package/dist/components/forms/rules-engine.d.ts +99 -0
- package/dist/components/forms/rules-engine.js +293 -0
- package/dist/components/forms/schema-serializer.cjs +250 -0
- package/dist/components/forms/schema-serializer.d.ts +27 -0
- package/dist/components/forms/schema-serializer.js +213 -0
- package/dist/components/forms/schema-viewer.cjs +157 -0
- package/dist/components/forms/schema-viewer.d.ts +29 -0
- package/dist/components/forms/schema-viewer.js +117 -0
- package/dist/components/forms/validation-converter.cjs +154 -0
- package/dist/components/forms/validation-converter.d.ts +42 -0
- package/dist/components/forms/validation-converter.js +114 -0
- package/dist/components/ui/accordion.cjs +82 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.js +39 -0
- package/dist/components/ui/alert-dialog.cjs +126 -0
- package/dist/components/ui/alert-dialog.d.ts +20 -0
- package/dist/components/ui/alert-dialog.js +62 -0
- package/dist/components/ui/alert.cjs +77 -0
- package/dist/components/ui/alert.d.ts +8 -0
- package/dist/components/ui/alert.js +37 -0
- package/dist/components/ui/aspect-ratio.cjs +38 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -0
- package/dist/components/ui/aspect-ratio.js +4 -0
- package/dist/components/ui/avatar.cjs +63 -0
- package/dist/components/ui/avatar.d.ts +6 -0
- package/dist/components/ui/avatar.js +23 -0
- package/dist/components/ui/badge.cjs +63 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/badge.js +26 -0
- package/dist/components/ui/breadcrumb.cjs +118 -0
- package/dist/components/ui/breadcrumb.d.ts +19 -0
- package/dist/components/ui/breadcrumb.js +66 -0
- package/dist/components/ui/button-group.cjs +68 -0
- package/dist/components/ui/button-group.d.ts +14 -0
- package/dist/components/ui/button-group.js +28 -0
- package/dist/components/ui/button.cjs +78 -0
- package/dist/components/ui/button.d.ts +11 -0
- package/dist/components/ui/button.js +41 -0
- package/dist/components/ui/calendar.cjs +144 -0
- package/dist/components/ui/calendar.d.ts +8 -0
- package/dist/components/ui/calendar.js +107 -0
- package/dist/components/ui/card.cjs +89 -0
- package/dist/components/ui/card.d.ts +8 -0
- package/dist/components/ui/card.js +40 -0
- package/dist/components/ui/checkbox.cjs +52 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.js +18 -0
- package/dist/components/ui/collapsible.cjs +45 -0
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/collapsible.js +5 -0
- package/dist/components/ui/combobox.cjs +102 -0
- package/dist/components/ui/combobox.d.ts +15 -0
- package/dist/components/ui/combobox.js +68 -0
- package/dist/components/ui/command.cjs +131 -0
- package/dist/components/ui/command.d.ts +80 -0
- package/dist/components/ui/command.js +73 -0
- package/dist/components/ui/context-menu.cjs +173 -0
- package/dist/components/ui/context-menu.d.ts +27 -0
- package/dist/components/ui/context-menu.js +97 -0
- package/dist/components/ui/data-table.cjs +292 -0
- package/dist/components/ui/data-table.d.ts +23 -0
- package/dist/components/ui/data-table.js +252 -0
- package/dist/components/ui/date-picker.cjs +118 -0
- package/dist/components/ui/date-picker.d.ts +21 -0
- package/dist/components/ui/date-picker.js +81 -0
- package/dist/components/ui/datetime-picker.cjs +154 -0
- package/dist/components/ui/datetime-picker.d.ts +9 -0
- package/dist/components/ui/datetime-picker.js +120 -0
- package/dist/components/ui/dialog.cjs +159 -0
- package/dist/components/ui/dialog.d.ts +15 -0
- package/dist/components/ui/dialog.js +98 -0
- package/dist/components/ui/drawer.cjs +116 -0
- package/dist/components/ui/drawer.d.ts +18 -0
- package/dist/components/ui/drawer.js +55 -0
- package/dist/components/ui/dropdown-menu.cjs +174 -0
- package/dist/components/ui/dropdown-menu.d.ts +27 -0
- package/dist/components/ui/dropdown-menu.js +98 -0
- package/dist/components/ui/editable-cell.cjs +256 -0
- package/dist/components/ui/editable-cell.d.ts +24 -0
- package/dist/components/ui/editable-cell.js +219 -0
- package/dist/components/ui/empty-state.cjs +73 -0
- package/dist/components/ui/empty-state.d.ts +16 -0
- package/dist/components/ui/empty-state.js +39 -0
- package/dist/components/ui/file-upload.cjs +236 -0
- package/dist/components/ui/file-upload.d.ts +10 -0
- package/dist/components/ui/file-upload.js +202 -0
- package/dist/components/ui/hover-card.cjs +55 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.js +15 -0
- package/dist/components/ui/index.cjs +546 -0
- package/dist/components/ui/index.d.ts +55 -0
- package/dist/components/ui/index.js +55 -0
- package/dist/components/ui/input.cjs +45 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +11 -0
- package/dist/components/ui/label.cjs +47 -0
- package/dist/components/ui/label.d.ts +7 -0
- package/dist/components/ui/label.js +13 -0
- package/dist/components/ui/layout/column.cjs +84 -0
- package/dist/components/ui/layout/column.d.ts +21 -0
- package/dist/components/ui/layout/column.js +50 -0
- package/dist/components/ui/layout/grid.cjs +101 -0
- package/dist/components/ui/layout/grid.d.ts +22 -0
- package/dist/components/ui/layout/grid.js +67 -0
- package/dist/components/ui/layout/index.cjs +44 -0
- package/dist/components/ui/layout/index.d.ts +7 -0
- package/dist/components/ui/layout/index.js +4 -0
- package/dist/components/ui/layout/row.cjs +84 -0
- package/dist/components/ui/layout/row.d.ts +21 -0
- package/dist/components/ui/layout/row.js +50 -0
- package/dist/components/ui/layout/types.cjs +18 -0
- package/dist/components/ui/layout/types.d.ts +149 -0
- package/dist/components/ui/layout/types.js +0 -0
- package/dist/components/ui/layout/utils.cjs +324 -0
- package/dist/components/ui/layout/utils.d.ts +76 -0
- package/dist/components/ui/layout/utils.js +239 -0
- package/dist/components/ui/menubar.cjs +210 -0
- package/dist/components/ui/menubar.d.ts +28 -0
- package/dist/components/ui/menubar.js +131 -0
- package/dist/components/ui/multi-select.cjs +187 -0
- package/dist/components/ui/multi-select.d.ts +18 -0
- package/dist/components/ui/multi-select.js +153 -0
- package/dist/components/ui/navigation-menu.cjs +122 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.js +64 -0
- package/dist/components/ui/pagination.cjs +131 -0
- package/dist/components/ui/pagination.d.ts +28 -0
- package/dist/components/ui/pagination.js +79 -0
- package/dist/components/ui/popover.cjs +61 -0
- package/dist/components/ui/popover.d.ts +7 -0
- package/dist/components/ui/popover.js +18 -0
- package/dist/components/ui/progress.cjs +51 -0
- package/dist/components/ui/progress.d.ts +4 -0
- package/dist/components/ui/progress.js +17 -0
- package/dist/components/ui/radio-group.cjs +61 -0
- package/dist/components/ui/radio-group.d.ts +5 -0
- package/dist/components/ui/radio-group.js +24 -0
- package/dist/components/ui/resizable.cjs +60 -0
- package/dist/components/ui/resizable.d.ts +23 -0
- package/dist/components/ui/resizable.js +20 -0
- package/dist/components/ui/scroll-area.cjs +67 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.js +30 -0
- package/dist/components/ui/search.cjs +153 -0
- package/dist/components/ui/search.d.ts +19 -0
- package/dist/components/ui/search.js +116 -0
- package/dist/components/ui/select.cjs +151 -0
- package/dist/components/ui/select.d.ts +13 -0
- package/dist/components/ui/select.js +90 -0
- package/dist/components/ui/separator.cjs +47 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.js +13 -0
- package/dist/components/ui/sheet.cjs +142 -0
- package/dist/components/ui/sheet.d.ts +25 -0
- package/dist/components/ui/sheet.js +81 -0
- package/dist/components/ui/skeleton.cjs +43 -0
- package/dist/components/ui/skeleton.d.ts +2 -0
- package/dist/components/ui/skeleton.js +9 -0
- package/dist/components/ui/slider.cjs +63 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.js +29 -0
- package/dist/components/ui/sonner.cjs +76 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.js +39 -0
- package/dist/components/ui/spinner.cjs +78 -0
- package/dist/components/ui/spinner.d.ts +11 -0
- package/dist/components/ui/spinner.js +41 -0
- package/dist/components/ui/stats-card.cjs +102 -0
- package/dist/components/ui/stats-card.d.ts +15 -0
- package/dist/components/ui/stats-card.js +68 -0
- package/dist/components/ui/stepper.cjs +99 -0
- package/dist/components/ui/stepper.d.ts +14 -0
- package/dist/components/ui/stepper.js +65 -0
- package/dist/components/ui/switch.cjs +48 -0
- package/dist/components/ui/switch.d.ts +4 -0
- package/dist/components/ui/switch.js +14 -0
- package/dist/components/ui/table.cjs +110 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/table.js +55 -0
- package/dist/components/ui/tabs.cjs +67 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.js +24 -0
- package/dist/components/ui/textarea.cjs +44 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.js +10 -0
- package/dist/components/ui/toggle-group.cjs +73 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.js +36 -0
- package/dist/components/ui/toggle.cjs +71 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +34 -0
- package/dist/components/ui/tooltip.cjs +58 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.js +15 -0
- package/dist/examples/admin-layout-example.d.ts +92 -0
- package/dist/examples/app-shell-example.d.ts +52 -0
- package/dist/examples/dashboard-example.d.ts +11 -0
- package/dist/examples/data-management-example.d.ts +1 -0
- package/dist/examples/flow-editor-layout-example.d.ts +22 -0
- package/dist/examples/flow-start-example.d.ts +30 -0
- package/dist/examples/form-builder-example.d.ts +1 -0
- package/dist/examples/new-project-example.d.ts +30 -0
- package/dist/examples/settings-example.d.ts +1 -0
- package/dist/examples/vscode-example.d.ts +80 -0
- package/dist/index.cjs +830 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +67 -0
- package/dist/lib/index.cjs +42 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +2 -0
- package/dist/lib/utils.cjs +70 -0
- package/dist/lib/utils.d.ts +14 -0
- package/dist/lib/utils.js +30 -0
- package/dist/postcss.config.export.cjs +43 -0
- package/dist/postcss.config.export.js +9 -0
- package/dist/styles.css +6868 -0
- package/dist/tailwind.css +239 -0
- package/dist/tailwind.preset.cjs +77 -0
- package/dist/tailwind.preset.js +43 -0
- package/package.json +157 -0
- package/postcss.config.export.js +9 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { format } from "date-fns";
|
|
4
|
+
import { CalendarIcon, Clock } from "lucide-react";
|
|
5
|
+
import { Button } from "./button.js";
|
|
6
|
+
import { Calendar } from "./calendar.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
|
+
import { Input } from "./input.js";
|
|
9
|
+
import { Label } from "./label.js";
|
|
10
|
+
import { cn } from "../../lib/index.js";
|
|
11
|
+
function DateTimePicker({ value, onValueChange, disabled, placeholder = 'Pick a date and time', className, use12Hour = false }) {
|
|
12
|
+
const [open, setOpen] = useState(false);
|
|
13
|
+
const [selectedDate, setSelectedDate] = useState(value);
|
|
14
|
+
const [timeValue, setTimeValue] = useState(value ? format(value, use12Hour ? 'hh:mm a' : 'HH:mm') : '');
|
|
15
|
+
const handleDateSelect = (date)=>{
|
|
16
|
+
if (!date) return;
|
|
17
|
+
if (selectedDate) {
|
|
18
|
+
date.setHours(selectedDate.getHours());
|
|
19
|
+
date.setMinutes(selectedDate.getMinutes());
|
|
20
|
+
date.setSeconds(selectedDate.getSeconds());
|
|
21
|
+
}
|
|
22
|
+
setSelectedDate(date);
|
|
23
|
+
onValueChange?.(date);
|
|
24
|
+
};
|
|
25
|
+
const handleTimeChange = (e)=>{
|
|
26
|
+
const time = e.target.value;
|
|
27
|
+
setTimeValue(time);
|
|
28
|
+
if (!selectedDate) return;
|
|
29
|
+
const [hours, minutes] = time.split(':').map(Number);
|
|
30
|
+
const newDate = new Date(selectedDate);
|
|
31
|
+
newDate.setHours(hours);
|
|
32
|
+
newDate.setMinutes(minutes);
|
|
33
|
+
setSelectedDate(newDate);
|
|
34
|
+
onValueChange?.(newDate);
|
|
35
|
+
};
|
|
36
|
+
const formatDisplayValue = ()=>{
|
|
37
|
+
if (!selectedDate) return placeholder;
|
|
38
|
+
const datePart = format(selectedDate, 'PPP');
|
|
39
|
+
const timePart = format(selectedDate, use12Hour ? 'hh:mm a' : 'HH:mm');
|
|
40
|
+
return `${datePart} at ${timePart}`;
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/ jsxs(Popover, {
|
|
43
|
+
open: open,
|
|
44
|
+
onOpenChange: setOpen,
|
|
45
|
+
children: [
|
|
46
|
+
/*#__PURE__*/ jsx(PopoverTrigger, {
|
|
47
|
+
asChild: true,
|
|
48
|
+
children: /*#__PURE__*/ jsxs(Button, {
|
|
49
|
+
variant: "outline",
|
|
50
|
+
className: cn('w-full justify-start text-left font-normal', !selectedDate && 'text-muted-foreground', className),
|
|
51
|
+
disabled: disabled,
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ jsx(CalendarIcon, {
|
|
54
|
+
className: "mr-2 h-4 w-4"
|
|
55
|
+
}),
|
|
56
|
+
formatDisplayValue()
|
|
57
|
+
]
|
|
58
|
+
})
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ jsx(PopoverContent, {
|
|
61
|
+
className: "w-auto p-0",
|
|
62
|
+
align: "start",
|
|
63
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
64
|
+
className: "p-3 space-y-3",
|
|
65
|
+
children: [
|
|
66
|
+
/*#__PURE__*/ jsx(Calendar, {
|
|
67
|
+
mode: "single",
|
|
68
|
+
selected: selectedDate,
|
|
69
|
+
onSelect: handleDateSelect,
|
|
70
|
+
initialFocus: true
|
|
71
|
+
}),
|
|
72
|
+
/*#__PURE__*/ jsxs("div", {
|
|
73
|
+
className: "border-t pt-3 space-y-2",
|
|
74
|
+
children: [
|
|
75
|
+
/*#__PURE__*/ jsxs(Label, {
|
|
76
|
+
className: "text-sm font-medium flex items-center gap-2",
|
|
77
|
+
children: [
|
|
78
|
+
/*#__PURE__*/ jsx(Clock, {
|
|
79
|
+
className: "h-4 w-4"
|
|
80
|
+
}),
|
|
81
|
+
"Time"
|
|
82
|
+
]
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ jsx(Input, {
|
|
85
|
+
type: "time",
|
|
86
|
+
value: timeValue,
|
|
87
|
+
onChange: handleTimeChange,
|
|
88
|
+
className: "w-full"
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}),
|
|
92
|
+
/*#__PURE__*/ jsxs("div", {
|
|
93
|
+
className: "flex gap-2",
|
|
94
|
+
children: [
|
|
95
|
+
/*#__PURE__*/ jsx(Button, {
|
|
96
|
+
variant: "outline",
|
|
97
|
+
className: "w-full",
|
|
98
|
+
onClick: ()=>{
|
|
99
|
+
setSelectedDate(void 0);
|
|
100
|
+
setTimeValue('');
|
|
101
|
+
onValueChange?.(void 0);
|
|
102
|
+
setOpen(false);
|
|
103
|
+
},
|
|
104
|
+
children: "Clear"
|
|
105
|
+
}),
|
|
106
|
+
/*#__PURE__*/ jsx(Button, {
|
|
107
|
+
className: "w-full",
|
|
108
|
+
onClick: ()=>setOpen(false),
|
|
109
|
+
disabled: !selectedDate,
|
|
110
|
+
children: "Done"
|
|
111
|
+
})
|
|
112
|
+
]
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
})
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export { DateTimePicker };
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
DialogDescription: ()=>dialog_DialogDescription,
|
|
29
|
+
DialogTitle: ()=>dialog_DialogTitle,
|
|
30
|
+
DialogHeader: ()=>DialogHeader,
|
|
31
|
+
DialogClose: ()=>dialog_DialogClose,
|
|
32
|
+
DialogOverlay: ()=>dialog_DialogOverlay,
|
|
33
|
+
DialogTrigger: ()=>dialog_DialogTrigger,
|
|
34
|
+
Dialog: ()=>Dialog,
|
|
35
|
+
DialogContent: ()=>dialog_DialogContent,
|
|
36
|
+
DialogFooter: ()=>DialogFooter,
|
|
37
|
+
DialogPortal: ()=>DialogPortal
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const react_dialog_namespaceObject = require("@radix-ui/react-dialog");
|
|
41
|
+
const external_lucide_react_namespaceObject = require("lucide-react");
|
|
42
|
+
const external_react_namespaceObject = require("react");
|
|
43
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
44
|
+
function Dialog({ ...props }) {
|
|
45
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Root, {
|
|
46
|
+
"data-slot": "dialog",
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const dialog_DialogTrigger = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function(props, ref) {
|
|
51
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Trigger, {
|
|
52
|
+
"data-slot": "dialog-trigger",
|
|
53
|
+
ref: ref,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
function DialogPortal({ ...props }) {
|
|
58
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Portal, {
|
|
59
|
+
"data-slot": "dialog-portal",
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
const dialog_DialogClose = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function(props, ref) {
|
|
64
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Close, {
|
|
65
|
+
"data-slot": "dialog-close",
|
|
66
|
+
ref: ref,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const dialog_DialogOverlay = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ className, ...props }, ref) {
|
|
71
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Overlay, {
|
|
72
|
+
"data-slot": "dialog-overlay",
|
|
73
|
+
className: (0, index_cjs_namespaceObject.cn)('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed flex items-center justify-center inset-0 z-50 bg-black/50', className),
|
|
74
|
+
ref: ref,
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
const dialog_DialogContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ className, children, showCloseButton = true, ...props }, ref) {
|
|
79
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DialogPortal, {
|
|
80
|
+
"data-slot": "dialog-portal",
|
|
81
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dialog_DialogOverlay, {
|
|
82
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Content, {
|
|
83
|
+
"data-slot": "dialog-content",
|
|
84
|
+
className: (0, index_cjs_namespaceObject.cn)('bg-background 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 z-50 grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', className),
|
|
85
|
+
ref: ref,
|
|
86
|
+
...props,
|
|
87
|
+
children: [
|
|
88
|
+
children,
|
|
89
|
+
showCloseButton && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(react_dialog_namespaceObject.Close, {
|
|
90
|
+
"data-slot": "dialog-close",
|
|
91
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_lucide_react_namespaceObject.XIcon, {}),
|
|
94
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
95
|
+
className: "sr-only",
|
|
96
|
+
children: "Close"
|
|
97
|
+
})
|
|
98
|
+
]
|
|
99
|
+
})
|
|
100
|
+
]
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
function DialogHeader({ className, ...props }) {
|
|
106
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
107
|
+
"data-slot": "dialog-header",
|
|
108
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col gap-2 text-center sm:text-left', className),
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function DialogFooter({ className, ...props }) {
|
|
113
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
114
|
+
"data-slot": "dialog-footer",
|
|
115
|
+
className: (0, index_cjs_namespaceObject.cn)('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className),
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
const dialog_DialogTitle = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ className, ...props }, ref) {
|
|
120
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Title, {
|
|
121
|
+
"data-slot": "dialog-title",
|
|
122
|
+
className: (0, index_cjs_namespaceObject.cn)('text-lg leading-none font-semibold', className),
|
|
123
|
+
ref: ref,
|
|
124
|
+
...props
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
const dialog_DialogDescription = /*#__PURE__*/ external_react_namespaceObject.forwardRef(function({ className, ...props }, ref) {
|
|
128
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(react_dialog_namespaceObject.Description, {
|
|
129
|
+
"data-slot": "dialog-description",
|
|
130
|
+
className: (0, index_cjs_namespaceObject.cn)('text-muted-foreground text-sm', className),
|
|
131
|
+
ref: ref,
|
|
132
|
+
...props
|
|
133
|
+
});
|
|
134
|
+
});
|
|
135
|
+
exports.Dialog = __webpack_exports__.Dialog;
|
|
136
|
+
exports.DialogClose = __webpack_exports__.DialogClose;
|
|
137
|
+
exports.DialogContent = __webpack_exports__.DialogContent;
|
|
138
|
+
exports.DialogDescription = __webpack_exports__.DialogDescription;
|
|
139
|
+
exports.DialogFooter = __webpack_exports__.DialogFooter;
|
|
140
|
+
exports.DialogHeader = __webpack_exports__.DialogHeader;
|
|
141
|
+
exports.DialogOverlay = __webpack_exports__.DialogOverlay;
|
|
142
|
+
exports.DialogPortal = __webpack_exports__.DialogPortal;
|
|
143
|
+
exports.DialogTitle = __webpack_exports__.DialogTitle;
|
|
144
|
+
exports.DialogTrigger = __webpack_exports__.DialogTrigger;
|
|
145
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
146
|
+
"Dialog",
|
|
147
|
+
"DialogClose",
|
|
148
|
+
"DialogContent",
|
|
149
|
+
"DialogDescription",
|
|
150
|
+
"DialogFooter",
|
|
151
|
+
"DialogHeader",
|
|
152
|
+
"DialogOverlay",
|
|
153
|
+
"DialogPortal",
|
|
154
|
+
"DialogTitle",
|
|
155
|
+
"DialogTrigger"
|
|
156
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
157
|
+
Object.defineProperty(exports, '__esModule', {
|
|
158
|
+
value: true
|
|
159
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare const DialogClose: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
14
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
15
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Close, Content, Description, Overlay, Portal, Root, Title, Trigger } from "@radix-ui/react-dialog";
|
|
4
|
+
import { XIcon } from "lucide-react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { cn } from "../../lib/index.js";
|
|
7
|
+
function Dialog({ ...props }) {
|
|
8
|
+
return /*#__PURE__*/ jsx(Root, {
|
|
9
|
+
"data-slot": "dialog",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const dialog_DialogTrigger = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
14
|
+
return /*#__PURE__*/ jsx(Trigger, {
|
|
15
|
+
"data-slot": "dialog-trigger",
|
|
16
|
+
ref: ref,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
function DialogPortal({ ...props }) {
|
|
21
|
+
return /*#__PURE__*/ jsx(Portal, {
|
|
22
|
+
"data-slot": "dialog-portal",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const dialog_DialogClose = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
27
|
+
return /*#__PURE__*/ jsx(Close, {
|
|
28
|
+
"data-slot": "dialog-close",
|
|
29
|
+
ref: ref,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const dialog_DialogOverlay = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
34
|
+
return /*#__PURE__*/ jsx(Overlay, {
|
|
35
|
+
"data-slot": "dialog-overlay",
|
|
36
|
+
className: cn('data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed flex items-center justify-center inset-0 z-50 bg-black/50', className),
|
|
37
|
+
ref: ref,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
const dialog_DialogContent = /*#__PURE__*/ forwardRef(function({ className, children, showCloseButton = true, ...props }, ref) {
|
|
42
|
+
return /*#__PURE__*/ jsx(DialogPortal, {
|
|
43
|
+
"data-slot": "dialog-portal",
|
|
44
|
+
children: /*#__PURE__*/ jsx(dialog_DialogOverlay, {
|
|
45
|
+
children: /*#__PURE__*/ jsxs(Content, {
|
|
46
|
+
"data-slot": "dialog-content",
|
|
47
|
+
className: cn('bg-background 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 z-50 grid w-full max-w-[calc(100%-2rem)] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg', className),
|
|
48
|
+
ref: ref,
|
|
49
|
+
...props,
|
|
50
|
+
children: [
|
|
51
|
+
children,
|
|
52
|
+
showCloseButton && /*#__PURE__*/ jsxs(Close, {
|
|
53
|
+
"data-slot": "dialog-close",
|
|
54
|
+
className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
55
|
+
children: [
|
|
56
|
+
/*#__PURE__*/ jsx(XIcon, {}),
|
|
57
|
+
/*#__PURE__*/ jsx("span", {
|
|
58
|
+
className: "sr-only",
|
|
59
|
+
children: "Close"
|
|
60
|
+
})
|
|
61
|
+
]
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
function DialogHeader({ className, ...props }) {
|
|
69
|
+
return /*#__PURE__*/ jsx("div", {
|
|
70
|
+
"data-slot": "dialog-header",
|
|
71
|
+
className: cn('flex flex-col gap-2 text-center sm:text-left', className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
function DialogFooter({ className, ...props }) {
|
|
76
|
+
return /*#__PURE__*/ jsx("div", {
|
|
77
|
+
"data-slot": "dialog-footer",
|
|
78
|
+
className: cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className),
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const dialog_DialogTitle = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
83
|
+
return /*#__PURE__*/ jsx(Title, {
|
|
84
|
+
"data-slot": "dialog-title",
|
|
85
|
+
className: cn('text-lg leading-none font-semibold', className),
|
|
86
|
+
ref: ref,
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
const dialog_DialogDescription = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
91
|
+
return /*#__PURE__*/ jsx(Description, {
|
|
92
|
+
"data-slot": "dialog-description",
|
|
93
|
+
className: cn('text-muted-foreground text-sm', className),
|
|
94
|
+
ref: ref,
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
export { Dialog, dialog_DialogClose as DialogClose, dialog_DialogContent as DialogContent, dialog_DialogDescription as DialogDescription, DialogFooter, DialogHeader, dialog_DialogOverlay as DialogOverlay, DialogPortal, dialog_DialogTitle as DialogTitle, dialog_DialogTrigger as DialogTrigger };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
"use strict";
|
|
3
|
+
var __webpack_require__ = {};
|
|
4
|
+
(()=>{
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: definition[key]
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
})();
|
|
12
|
+
(()=>{
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
})();
|
|
15
|
+
(()=>{
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
17
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
18
|
+
value: 'Module'
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
21
|
+
value: true
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
})();
|
|
25
|
+
var __webpack_exports__ = {};
|
|
26
|
+
__webpack_require__.r(__webpack_exports__);
|
|
27
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
28
|
+
DrawerClose: ()=>DrawerClose,
|
|
29
|
+
DrawerTrigger: ()=>DrawerTrigger,
|
|
30
|
+
Drawer: ()=>Drawer,
|
|
31
|
+
DrawerPortal: ()=>DrawerPortal,
|
|
32
|
+
DrawerOverlay: ()=>DrawerOverlay,
|
|
33
|
+
DrawerFooter: ()=>DrawerFooter,
|
|
34
|
+
DrawerHeader: ()=>DrawerHeader,
|
|
35
|
+
DrawerContent: ()=>DrawerContent,
|
|
36
|
+
DrawerDescription: ()=>DrawerDescription,
|
|
37
|
+
DrawerTitle: ()=>DrawerTitle
|
|
38
|
+
});
|
|
39
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
|
+
const external_react_namespaceObject = require("react");
|
|
41
|
+
const external_vaul_namespaceObject = require("vaul");
|
|
42
|
+
const index_cjs_namespaceObject = require("../../lib/index.cjs");
|
|
43
|
+
const Drawer = external_vaul_namespaceObject.Drawer.Root;
|
|
44
|
+
const DrawerTrigger = external_vaul_namespaceObject.Drawer.Trigger;
|
|
45
|
+
const DrawerPortal = external_vaul_namespaceObject.Drawer.Portal;
|
|
46
|
+
const DrawerClose = external_vaul_namespaceObject.Drawer.Close;
|
|
47
|
+
const DrawerOverlay = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Overlay, {
|
|
48
|
+
ref: ref,
|
|
49
|
+
className: (0, index_cjs_namespaceObject.cn)('fixed inset-0 z-50 bg-black/80', className),
|
|
50
|
+
...props
|
|
51
|
+
}));
|
|
52
|
+
DrawerOverlay.displayName = external_vaul_namespaceObject.Drawer.Overlay.displayName;
|
|
53
|
+
const DrawerContent = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DrawerPortal, {
|
|
54
|
+
children: [
|
|
55
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(DrawerOverlay, {}),
|
|
56
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_vaul_namespaceObject.Drawer.Content, {
|
|
57
|
+
ref: ref,
|
|
58
|
+
className: (0, index_cjs_namespaceObject.cn)('fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background', className),
|
|
59
|
+
...props,
|
|
60
|
+
children: [
|
|
61
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
62
|
+
className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"
|
|
63
|
+
}),
|
|
64
|
+
children
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
]
|
|
68
|
+
}));
|
|
69
|
+
DrawerContent.displayName = 'DrawerContent';
|
|
70
|
+
const DrawerHeader = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
71
|
+
className: (0, index_cjs_namespaceObject.cn)('grid gap-1.5 p-4 text-center sm:text-left', className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
DrawerHeader.displayName = 'DrawerHeader';
|
|
75
|
+
const DrawerFooter = ({ className, ...props })=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
76
|
+
className: (0, index_cjs_namespaceObject.cn)('mt-auto flex flex-col gap-2 p-4', className),
|
|
77
|
+
...props
|
|
78
|
+
});
|
|
79
|
+
DrawerFooter.displayName = 'DrawerFooter';
|
|
80
|
+
const DrawerTitle = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Title, {
|
|
81
|
+
ref: ref,
|
|
82
|
+
className: (0, index_cjs_namespaceObject.cn)('text-lg font-semibold leading-none tracking-tight', className),
|
|
83
|
+
...props
|
|
84
|
+
}));
|
|
85
|
+
DrawerTitle.displayName = external_vaul_namespaceObject.Drawer.Title.displayName;
|
|
86
|
+
const DrawerDescription = /*#__PURE__*/ external_react_namespaceObject.forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_vaul_namespaceObject.Drawer.Description, {
|
|
87
|
+
ref: ref,
|
|
88
|
+
className: (0, index_cjs_namespaceObject.cn)('text-sm text-muted-foreground', className),
|
|
89
|
+
...props
|
|
90
|
+
}));
|
|
91
|
+
DrawerDescription.displayName = external_vaul_namespaceObject.Drawer.Description.displayName;
|
|
92
|
+
exports.Drawer = __webpack_exports__.Drawer;
|
|
93
|
+
exports.DrawerClose = __webpack_exports__.DrawerClose;
|
|
94
|
+
exports.DrawerContent = __webpack_exports__.DrawerContent;
|
|
95
|
+
exports.DrawerDescription = __webpack_exports__.DrawerDescription;
|
|
96
|
+
exports.DrawerFooter = __webpack_exports__.DrawerFooter;
|
|
97
|
+
exports.DrawerHeader = __webpack_exports__.DrawerHeader;
|
|
98
|
+
exports.DrawerOverlay = __webpack_exports__.DrawerOverlay;
|
|
99
|
+
exports.DrawerPortal = __webpack_exports__.DrawerPortal;
|
|
100
|
+
exports.DrawerTitle = __webpack_exports__.DrawerTitle;
|
|
101
|
+
exports.DrawerTrigger = __webpack_exports__.DrawerTrigger;
|
|
102
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
103
|
+
"Drawer",
|
|
104
|
+
"DrawerClose",
|
|
105
|
+
"DrawerContent",
|
|
106
|
+
"DrawerDescription",
|
|
107
|
+
"DrawerFooter",
|
|
108
|
+
"DrawerHeader",
|
|
109
|
+
"DrawerOverlay",
|
|
110
|
+
"DrawerPortal",
|
|
111
|
+
"DrawerTitle",
|
|
112
|
+
"DrawerTrigger"
|
|
113
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
114
|
+
Object.defineProperty(exports, '__esModule', {
|
|
115
|
+
value: true
|
|
116
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare const Drawer: typeof import("vaul").Root;
|
|
3
|
+
declare const DrawerTrigger: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
declare const DrawerPortal: typeof import("vaul").Portal;
|
|
5
|
+
declare const DrawerClose: React.ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const DrawerHeader: {
|
|
9
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const DrawerFooter: {
|
|
13
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
17
|
+
declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
18
|
+
export { Drawer, DrawerPortal, DrawerOverlay, DrawerTrigger, DrawerClose, DrawerContent, DrawerHeader, DrawerFooter, DrawerTitle, DrawerDescription, };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { Drawer } from "vaul";
|
|
5
|
+
import { cn } from "../../lib/index.js";
|
|
6
|
+
const drawer_Drawer = Drawer.Root;
|
|
7
|
+
const DrawerTrigger = Drawer.Trigger;
|
|
8
|
+
const DrawerPortal = Drawer.Portal;
|
|
9
|
+
const DrawerClose = Drawer.Close;
|
|
10
|
+
const DrawerOverlay = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Drawer.Overlay, {
|
|
11
|
+
ref: ref,
|
|
12
|
+
className: cn('fixed inset-0 z-50 bg-black/80', className),
|
|
13
|
+
...props
|
|
14
|
+
}));
|
|
15
|
+
DrawerOverlay.displayName = Drawer.Overlay.displayName;
|
|
16
|
+
const DrawerContent = /*#__PURE__*/ forwardRef(({ className, children, ...props }, ref)=>/*#__PURE__*/ jsxs(DrawerPortal, {
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ jsx(DrawerOverlay, {}),
|
|
19
|
+
/*#__PURE__*/ jsxs(Drawer.Content, {
|
|
20
|
+
ref: ref,
|
|
21
|
+
className: cn('fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background', className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ jsx("div", {
|
|
25
|
+
className: "mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"
|
|
26
|
+
}),
|
|
27
|
+
children
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
}));
|
|
32
|
+
DrawerContent.displayName = 'DrawerContent';
|
|
33
|
+
const DrawerHeader = ({ className, ...props })=>/*#__PURE__*/ jsx("div", {
|
|
34
|
+
className: cn('grid gap-1.5 p-4 text-center sm:text-left', className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
DrawerHeader.displayName = 'DrawerHeader';
|
|
38
|
+
const DrawerFooter = ({ className, ...props })=>/*#__PURE__*/ jsx("div", {
|
|
39
|
+
className: cn('mt-auto flex flex-col gap-2 p-4', className),
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
DrawerFooter.displayName = 'DrawerFooter';
|
|
43
|
+
const DrawerTitle = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Drawer.Title, {
|
|
44
|
+
ref: ref,
|
|
45
|
+
className: cn('text-lg font-semibold leading-none tracking-tight', className),
|
|
46
|
+
...props
|
|
47
|
+
}));
|
|
48
|
+
DrawerTitle.displayName = Drawer.Title.displayName;
|
|
49
|
+
const DrawerDescription = /*#__PURE__*/ forwardRef(({ className, ...props }, ref)=>/*#__PURE__*/ jsx(Drawer.Description, {
|
|
50
|
+
ref: ref,
|
|
51
|
+
className: cn('text-sm text-muted-foreground', className),
|
|
52
|
+
...props
|
|
53
|
+
}));
|
|
54
|
+
DrawerDescription.displayName = Drawer.Description.displayName;
|
|
55
|
+
export { drawer_Drawer as Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|