@brumaombra/ui-vintage 0.1.0 → 0.2.1
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 +20 -20
- package/README.md +75 -78
- package/dist/{AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js → AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js} +8 -8
- package/dist/{Busy-B65Nd9ec.js → Busy-DSyPtpVD.js} +1 -1
- package/dist/BusyIndicator-D-4YHN2L.js +4 -0
- package/dist/{CalendarPrevButton.vue_vue_type_script_setup_true_lang-C-WnFnvj.js → CalendarPrevButton.vue_vue_type_script_setup_true_lang-Dqz6DIGp.js} +22 -22
- package/dist/{Collection-CmOoLBo7.js → Collection-Coi6nyvb.js} +1 -1
- package/dist/ConfirmDialog-Zu4m9TY-.js +4 -0
- package/dist/{DialogClose-BNlqG4G2.js → DialogClose-DDtZ0Em0.js} +2 -2
- package/dist/{x-2_VzbDS9.js → DialogPortal-BTVR2QvT.js} +12 -12
- package/dist/{DialogTitle-DXj0nkXn.js → DialogTitle-CLuntLBB.js} +5 -5
- package/dist/{DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js → DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js} +4 -4
- package/dist/{DialogTrigger-CpyKnu11.js → DialogTrigger-CjJ8QNL_.js} +3 -3
- package/dist/{FocusScope-C3mcVwsf.js → FocusScope-DYbCtSNc.js} +4 -4
- package/dist/{Input.vue_vue_type_script_setup_true_lang-U778IWa0.js → Input.vue_vue_type_script_setup_true_lang-6SfPeT8d.js} +1 -1
- package/dist/{Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js → Label.vue_vue_type_script_setup_true_lang-pMIzCHzV.js} +2 -2
- package/dist/MessageDialog-ChS4d2qN.js +4 -0
- package/dist/{NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js → NativeSelectOption.vue_vue_type_script_setup_true_lang-CWhL2Lw8.js} +2 -2
- package/dist/{PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js → PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js} +9 -9
- package/dist/{PopperContent-BiM0YLO3.js → PopperContent-h-thLTz8.js} +3 -3
- package/dist/{Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js → Separator.vue_vue_type_script_setup_true_lang-CMRkdntA.js} +1 -1
- package/dist/{SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js → SheetTitle.vue_vue_type_script_setup_true_lang-fx9jbBwT.js} +4 -4
- package/dist/{Slider.vue_vue_type_script_setup_true_lang-D-cAN-4Q.js → Slider.vue_vue_type_script_setup_true_lang-C_CsSGAt.js} +7 -7
- package/dist/{Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js → Switch.vue_vue_type_script_setup_true_lang-BG6nkPSO.js} +5 -5
- package/dist/{Teleport-CuUn4UkG.js → Teleport-CV0tKbq5.js} +3 -3
- package/dist/{TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js → TooltipTrigger.vue_vue_type_script_setup_true_lang-DEPKysA_.js} +5 -5
- package/dist/{VisuallyHiddenInput-DLAsRwUw.js → VisuallyHiddenInput-1G1IEkBL.js} +1 -1
- package/dist/alert-dialog.js +161 -9
- package/dist/busy-indicator.js +64 -4
- package/dist/busy.js +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card.js +110 -7
- package/dist/command.js +20 -20
- package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +1 -1
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +1 -1
- package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +1 -1
- package/dist/confirm-dialog.js +228 -7
- package/dist/dashboard-shell.js +170 -3
- package/dist/date-picker.js +91 -3
- package/dist/dialog.js +140 -6
- package/dist/field.js +2 -2
- package/dist/{index-C1_fxYhb.js → index-Cq9Ekgtb.js} +2 -2
- package/dist/{index-Dfi5ESP2.js → index-qGMU40e1.js} +1 -1
- package/dist/input.js +1 -1
- package/dist/label.js +1 -1
- package/dist/message-dialog.js +240 -6
- package/dist/native-select.js +1 -1
- package/dist/popover.js +62 -5
- package/dist/select.js +2122 -12
- package/dist/separator.js +1 -1
- package/dist/sheet.js +61 -5
- package/dist/sidebar.js +6 -6
- package/dist/slider-form-component.js +58 -3
- package/dist/slider.js +1 -1
- package/dist/style.css +4 -4016
- package/dist/switch-form-component.js +38 -3
- package/dist/switch.js +1 -1
- package/dist/tooltip.js +27 -3
- package/dist/{useFocusGuards-tgErlvMF.js → useFocusGuards-WYWvpJy2.js} +1 -1
- package/dist/{useFormControl-7ytzz-r7.js → useFormControl-CyoJwp9r.js} +1 -1
- package/dist/{useForwardExpose-CNVHwdF2.js → useForwardExpose-BiRQH8eO.js} +1 -1
- package/dist/{usePrimitiveElement-CijaRBgF.js → usePrimitiveElement-Bk3ZOslv.js} +1 -1
- package/dist/{useSize-DO9Z3wC4.js → useSize-BLYTFgnQ.js} +1 -1
- package/dist/{useTypeahead-Dqe1QXq1.js → useTypeahead-KTl4-oeq.js} +2 -2
- package/dist/{utils-RRmyeqLm.js → utils-BXBXPGDA.js} +1 -1
- package/package.json +188 -186
- package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +0 -158
- package/dist/BusyIndicator-CnWzSMDb.js +0 -4
- package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +0 -66
- package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +0 -112
- package/dist/ConfirmDialog-DEsvF0b_.js +0 -4
- package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +0 -230
- package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +0 -171
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +0 -92
- package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +0 -141
- package/dist/MessageDialog-BrowppID.js +0 -4
- package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +0 -242
- package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +0 -61
- package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +0 -2124
- package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +0 -62
- package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +0 -59
- package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +0 -39
- package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +0 -28
- package/dist/alert-dialog.d.ts +0 -2
- package/dist/alert.d.ts +0 -2
- package/dist/background-grid.d.ts +0 -6
- package/dist/busy-indicator.d.ts +0 -2
- package/dist/busy.d.ts +0 -2
- package/dist/button.d.ts +0 -2
- package/dist/calendar.d.ts +0 -2
- package/dist/card.d.ts +0 -2
- package/dist/command.d.ts +0 -2
- package/dist/confirm-dialog.d.ts +0 -2
- package/dist/dashboard-shell.d.ts +0 -6
- package/dist/date-picker.d.ts +0 -6
- package/dist/dialog.d.ts +0 -2
- package/dist/field.d.ts +0 -2
- package/dist/index.d.ts +0 -28
- package/dist/index.js +0 -171
- package/dist/input.d.ts +0 -2
- package/dist/label.d.ts +0 -2
- package/dist/message-dialog.d.ts +0 -2
- package/dist/native-select.d.ts +0 -2
- package/dist/popover.d.ts +0 -2
- package/dist/select.d.ts +0 -2
- package/dist/separator.d.ts +0 -2
- package/dist/sheet.d.ts +0 -2
- package/dist/sidebar.d.ts +0 -2
- package/dist/skeleton.d.ts +0 -2
- package/dist/slider-form-component.d.ts +0 -6
- package/dist/slider.d.ts +0 -2
- package/dist/switch-form-component.d.ts +0 -6
- package/dist/switch.d.ts +0 -2
- package/dist/tooltip.d.ts +0 -2
- package/dist/utils.d.ts +0 -2
package/dist/confirm-dialog.js
CHANGED
|
@@ -1,9 +1,230 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { reactive, render, h, markRaw, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, resolveDynamicComponent, createVNode, createTextVNode, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$3, c as _sfc_main$4, d as _sfc_main$5, e as _sfc_main$6 } from "./AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js";
|
|
3
|
+
import { Button as _sfc_main$7 } from "./button.js";
|
|
4
|
+
import { I as Info } from "./info-DZrSmi42.js";
|
|
5
|
+
const confirmDialogQueue = [];
|
|
6
|
+
let nextConfirmDialogId = 0;
|
|
7
|
+
const DIALOG_CLOSE_DURATION_MS = 300;
|
|
8
|
+
let closeTimer = null;
|
|
9
|
+
let confirmDialogMountPromise = null;
|
|
10
|
+
const CONFIRM_DIALOG_ROOT_ID = "ui-vintage-confirm-dialog-root";
|
|
11
|
+
const confirmDialogState = reactive({
|
|
12
|
+
current: null,
|
|
13
|
+
busy: false,
|
|
14
|
+
isOpen: false
|
|
15
|
+
});
|
|
16
|
+
const markIcon = (icon) => icon ? markRaw(icon) : null;
|
|
17
|
+
const ensureConfirmDialogMounted = () => {
|
|
18
|
+
if (typeof document === "undefined") {
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
}
|
|
21
|
+
const existingRoot = document.getElementById(CONFIRM_DIALOG_ROOT_ID);
|
|
22
|
+
if (existingRoot) {
|
|
23
|
+
return Promise.resolve();
|
|
24
|
+
}
|
|
25
|
+
if (confirmDialogMountPromise) {
|
|
26
|
+
return confirmDialogMountPromise;
|
|
27
|
+
}
|
|
28
|
+
confirmDialogMountPromise = (async () => {
|
|
29
|
+
const { default: ConfirmDialog } = await import("./ConfirmDialog-Zu4m9TY-.js");
|
|
30
|
+
if (document.getElementById(CONFIRM_DIALOG_ROOT_ID)) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const container = document.createElement("div");
|
|
34
|
+
container.id = CONFIRM_DIALOG_ROOT_ID;
|
|
35
|
+
document.body.appendChild(container);
|
|
36
|
+
render(h(ConfirmDialog), container);
|
|
37
|
+
})().finally(() => {
|
|
38
|
+
confirmDialogMountPromise = null;
|
|
39
|
+
});
|
|
40
|
+
return confirmDialogMountPromise;
|
|
41
|
+
};
|
|
42
|
+
const openNextConfirmDialog = () => {
|
|
43
|
+
const nextDialog = confirmDialogQueue.shift() ?? null;
|
|
44
|
+
confirmDialogState.current = nextDialog;
|
|
45
|
+
confirmDialogState.isOpen = Boolean(nextDialog);
|
|
46
|
+
};
|
|
47
|
+
const enqueueConfirmDialog = (request) => {
|
|
48
|
+
confirmDialogQueue.push(request);
|
|
49
|
+
if (!confirmDialogState.current) {
|
|
50
|
+
openNextConfirmDialog();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const clearCurrentConfirmDialog = () => {
|
|
54
|
+
confirmDialogState.busy = false;
|
|
55
|
+
confirmDialogState.isOpen = false;
|
|
56
|
+
confirmDialogState.current = null;
|
|
57
|
+
openNextConfirmDialog();
|
|
58
|
+
};
|
|
59
|
+
const scheduleCloseCurrentConfirmDialog = () => {
|
|
60
|
+
if (!confirmDialogState.current || !confirmDialogState.isOpen) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
confirmDialogState.isOpen = false;
|
|
64
|
+
if (closeTimer) {
|
|
65
|
+
clearTimeout(closeTimer);
|
|
66
|
+
}
|
|
67
|
+
closeTimer = setTimeout(() => {
|
|
68
|
+
closeTimer = null;
|
|
69
|
+
clearCurrentConfirmDialog();
|
|
70
|
+
}, DIALOG_CLOSE_DURATION_MS);
|
|
71
|
+
};
|
|
72
|
+
const closeConfirmDialog = () => {
|
|
73
|
+
const current = confirmDialogState.current;
|
|
74
|
+
if (!current || !confirmDialogState.isOpen) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
current.resolve(false);
|
|
78
|
+
scheduleCloseCurrentConfirmDialog();
|
|
79
|
+
};
|
|
80
|
+
const cancelActiveConfirmDialog = async () => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
const current = confirmDialogState.current;
|
|
83
|
+
if (!current || confirmDialogState.busy) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
confirmDialogState.busy = true;
|
|
87
|
+
try {
|
|
88
|
+
await ((_b = (_a = current.options).onCancel) == null ? void 0 : _b.call(_a));
|
|
89
|
+
current.resolve(false);
|
|
90
|
+
} finally {
|
|
91
|
+
scheduleCloseCurrentConfirmDialog();
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const confirmActiveDialog = async () => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
const current = confirmDialogState.current;
|
|
97
|
+
if (!current || confirmDialogState.busy) {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
confirmDialogState.busy = true;
|
|
101
|
+
try {
|
|
102
|
+
await ((_b = (_a = current.options).onConfirm) == null ? void 0 : _b.call(_a));
|
|
103
|
+
current.resolve(true);
|
|
104
|
+
} finally {
|
|
105
|
+
scheduleCloseCurrentConfirmDialog();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const showConfirmDialog = (options) => {
|
|
109
|
+
void ensureConfirmDialogMounted();
|
|
110
|
+
return new Promise((resolve) => {
|
|
111
|
+
enqueueConfirmDialog({
|
|
112
|
+
id: nextConfirmDialogId += 1,
|
|
113
|
+
options: {
|
|
114
|
+
title: options.title ?? "Confirm",
|
|
115
|
+
message: options.message,
|
|
116
|
+
confirmText: options.confirmText ?? "Confirm",
|
|
117
|
+
cancelText: options.cancelText ?? "Cancel",
|
|
118
|
+
confirmButtonType: options.confirmButtonType ?? "default",
|
|
119
|
+
cancelButtonType: options.cancelButtonType ?? "outline",
|
|
120
|
+
icon: markIcon(options.icon),
|
|
121
|
+
confirmButtonIcon: markIcon(options.confirmButtonIcon),
|
|
122
|
+
cancelButtonIcon: markIcon(options.cancelButtonIcon),
|
|
123
|
+
onConfirm: options.onConfirm ?? null,
|
|
124
|
+
onCancel: options.onCancel ?? null
|
|
125
|
+
},
|
|
126
|
+
resolve
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
const _hoisted_1 = { class: "px-5 pb-5 pt-5 sm:px-6 sm:pb-4 sm:pt-6" };
|
|
131
|
+
const _hoisted_2 = { class: "flex flex-col gap-4 sm:flex-row sm:items-start" };
|
|
132
|
+
const _hoisted_3 = { class: "flex size-12 shrink-0 self-center items-center justify-center rounded border border-[var(--border-light)] bg-[var(--bg-surface-light)] sm:size-10 sm:self-start dark:border-[var(--border-dark)] dark:bg-[var(--bg-surface-dark)]" };
|
|
133
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
134
|
+
__name: "ConfirmDialog",
|
|
135
|
+
setup(__props) {
|
|
136
|
+
const currentDialog = computed(() => confirmDialogState.current);
|
|
137
|
+
const confirmIcon = computed(() => {
|
|
138
|
+
var _a;
|
|
139
|
+
return ((_a = currentDialog.value) == null ? void 0 : _a.options.icon) ?? Info;
|
|
140
|
+
});
|
|
141
|
+
const handleOpenChange = (open) => {
|
|
142
|
+
if (!open) {
|
|
143
|
+
closeConfirmDialog();
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return openBlock(), createBlock(unref(_sfc_main$1), {
|
|
148
|
+
open: unref(confirmDialogState).isOpen,
|
|
149
|
+
"onUpdate:open": handleOpenChange
|
|
150
|
+
}, {
|
|
151
|
+
default: withCtx(() => [
|
|
152
|
+
currentDialog.value ? (openBlock(), createBlock(unref(_sfc_main$2), { key: 0 }, {
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
createElementVNode("div", _hoisted_1, [
|
|
155
|
+
createElementVNode("div", _hoisted_2, [
|
|
156
|
+
createElementVNode("div", _hoisted_3, [
|
|
157
|
+
(openBlock(), createBlock(resolveDynamicComponent(confirmIcon.value), {
|
|
158
|
+
"stroke-width": 1.8,
|
|
159
|
+
class: "size-6 text-[var(--button-primary-light)] dark:text-[var(--button-primary-dark)]"
|
|
160
|
+
}))
|
|
161
|
+
]),
|
|
162
|
+
createVNode(unref(_sfc_main$3), { class: "sm:pt-0" }, {
|
|
163
|
+
default: withCtx(() => [
|
|
164
|
+
createVNode(unref(_sfc_main$4), null, {
|
|
165
|
+
default: withCtx(() => [
|
|
166
|
+
createTextVNode(toDisplayString(currentDialog.value.options.title), 1)
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}),
|
|
170
|
+
createVNode(unref(_sfc_main$5), null, {
|
|
171
|
+
default: withCtx(() => [
|
|
172
|
+
createTextVNode(toDisplayString(currentDialog.value.options.message), 1)
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
})
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
})
|
|
179
|
+
])
|
|
180
|
+
]),
|
|
181
|
+
createVNode(unref(_sfc_main$6), null, {
|
|
182
|
+
default: withCtx(() => [
|
|
183
|
+
createVNode(unref(_sfc_main$7), {
|
|
184
|
+
variant: currentDialog.value.options.cancelButtonType,
|
|
185
|
+
disabled: unref(confirmDialogState).busy,
|
|
186
|
+
onClick: unref(cancelActiveConfirmDialog)
|
|
187
|
+
}, {
|
|
188
|
+
default: withCtx(() => [
|
|
189
|
+
currentDialog.value.options.cancelButtonIcon ? (openBlock(), createBlock(resolveDynamicComponent(currentDialog.value.options.cancelButtonIcon), {
|
|
190
|
+
key: 0,
|
|
191
|
+
class: "size-4"
|
|
192
|
+
})) : createCommentVNode("", true),
|
|
193
|
+
createTextVNode(" " + toDisplayString(currentDialog.value.options.cancelText), 1)
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["variant", "disabled", "onClick"]),
|
|
197
|
+
createVNode(unref(_sfc_main$7), {
|
|
198
|
+
variant: currentDialog.value.options.confirmButtonType,
|
|
199
|
+
disabled: unref(confirmDialogState).busy,
|
|
200
|
+
onClick: unref(confirmActiveDialog)
|
|
201
|
+
}, {
|
|
202
|
+
default: withCtx(() => [
|
|
203
|
+
currentDialog.value.options.confirmButtonIcon ? (openBlock(), createBlock(resolveDynamicComponent(currentDialog.value.options.confirmButtonIcon), {
|
|
204
|
+
key: 0,
|
|
205
|
+
class: "size-4"
|
|
206
|
+
})) : createCommentVNode("", true),
|
|
207
|
+
createTextVNode(" " + toDisplayString(currentDialog.value.options.confirmText), 1)
|
|
208
|
+
]),
|
|
209
|
+
_: 1
|
|
210
|
+
}, 8, ["variant", "disabled", "onClick"])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
})
|
|
214
|
+
]),
|
|
215
|
+
_: 1
|
|
216
|
+
})) : createCommentVNode("", true)
|
|
217
|
+
]),
|
|
218
|
+
_: 1
|
|
219
|
+
}, 8, ["open"]);
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
2
223
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
224
|
+
_sfc_main as ConfirmDialog,
|
|
225
|
+
cancelActiveConfirmDialog,
|
|
226
|
+
closeConfirmDialog,
|
|
227
|
+
confirmActiveDialog,
|
|
228
|
+
confirmDialogState,
|
|
229
|
+
showConfirmDialog
|
|
9
230
|
};
|
package/dist/dashboard-shell.js
CHANGED
|
@@ -1,5 +1,172 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, createCommentVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, resolveDynamicComponent, mergeProps, createElementVNode, normalizeClass } from "vue";
|
|
2
|
+
import { B as BackgroundGrid } from "./BackgroundGrid-Cxvbtefm.js";
|
|
3
|
+
import { _ as _sfc_main$e } from "./Separator.vue_vue_type_script_setup_true_lang-CMRkdntA.js";
|
|
4
|
+
import { SidebarProvider as _sfc_main$1, Sidebar as _sfc_main$2, SidebarHeader as _sfc_main$3, SidebarContent as _sfc_main$4, SidebarGroup as _sfc_main$5, SidebarGroupLabel as _sfc_main$6, SidebarGroupContent as _sfc_main$7, SidebarMenu as _sfc_main$8, SidebarMenuItem as _sfc_main$9, SidebarMenuButton as _sfc_main$a, SidebarFooter as _sfc_main$b, SidebarInset as _sfc_main$c, SidebarTrigger as _sfc_main$d } from "./sidebar.js";
|
|
5
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
6
|
+
const _hoisted_1 = { class: "grid min-w-0 flex-1 text-left leading-tight" };
|
|
7
|
+
const _hoisted_2 = { class: "truncate font-semibold" };
|
|
8
|
+
const _hoisted_3 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "mt-0.5 text-[11px] leading-4 text-sidebar-foreground/65"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_4 = { class: "min-w-0 flex-1" };
|
|
13
|
+
const _hoisted_5 = { class: "truncate text-sm font-medium" };
|
|
14
|
+
const _hoisted_6 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "truncate text-xs text-muted-foreground"
|
|
17
|
+
};
|
|
18
|
+
const _hoisted_7 = { class: "relative z-10 min-w-0 flex-1" };
|
|
19
|
+
const _hoisted_8 = { class: "pb-4" };
|
|
20
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
|
+
__name: "DashboardShell",
|
|
22
|
+
props: {
|
|
23
|
+
title: { default: "" },
|
|
24
|
+
description: { default: "" },
|
|
25
|
+
collapsible: { default: "offcanvas" },
|
|
26
|
+
sidebarSections: { default: () => [] },
|
|
27
|
+
sidebarLinkComponent: { default: "a" },
|
|
28
|
+
showBackground: { type: Boolean, default: true },
|
|
29
|
+
insetClass: {},
|
|
30
|
+
topbarClass: {},
|
|
31
|
+
contentContainerClass: {}
|
|
32
|
+
},
|
|
33
|
+
setup(__props) {
|
|
34
|
+
const props = __props;
|
|
35
|
+
const getSidebarItemLinkProps = (item) => {
|
|
36
|
+
if (props.sidebarLinkComponent === "a") {
|
|
37
|
+
return { href: item.href ?? "#" };
|
|
38
|
+
}
|
|
39
|
+
return { to: item.to ?? item.href ?? "/" };
|
|
40
|
+
};
|
|
41
|
+
return (_ctx, _cache) => {
|
|
42
|
+
return openBlock(), createBlock(unref(_sfc_main$1), null, {
|
|
43
|
+
default: withCtx(() => [
|
|
44
|
+
createVNode(unref(_sfc_main$2), {
|
|
45
|
+
collapsible: props.collapsible
|
|
46
|
+
}, {
|
|
47
|
+
default: withCtx(() => [
|
|
48
|
+
_ctx.$slots["sidebar-header"] ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: "h-16 justify-center border-b border-sidebar-border"
|
|
51
|
+
}, {
|
|
52
|
+
default: withCtx(() => [
|
|
53
|
+
renderSlot(_ctx.$slots, "sidebar-header")
|
|
54
|
+
]),
|
|
55
|
+
_: 3
|
|
56
|
+
})) : createCommentVNode("", true),
|
|
57
|
+
props.sidebarSections.length ? (openBlock(), createBlock(unref(_sfc_main$4), { key: 1 }, {
|
|
58
|
+
default: withCtx(() => [
|
|
59
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(props.sidebarSections, (section) => {
|
|
60
|
+
return openBlock(), createBlock(unref(_sfc_main$5), {
|
|
61
|
+
key: section.id
|
|
62
|
+
}, {
|
|
63
|
+
default: withCtx(() => [
|
|
64
|
+
section.label ? (openBlock(), createBlock(unref(_sfc_main$6), { key: 0 }, {
|
|
65
|
+
default: withCtx(() => [
|
|
66
|
+
createTextVNode(toDisplayString(section.label), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1024)) : createCommentVNode("", true),
|
|
70
|
+
createVNode(unref(_sfc_main$7), null, {
|
|
71
|
+
default: withCtx(() => [
|
|
72
|
+
createVNode(unref(_sfc_main$8), { class: "gap-3" }, {
|
|
73
|
+
default: withCtx(() => [
|
|
74
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(section.items, (item) => {
|
|
75
|
+
return openBlock(), createBlock(unref(_sfc_main$9), {
|
|
76
|
+
key: item.id
|
|
77
|
+
}, {
|
|
78
|
+
default: withCtx(() => [
|
|
79
|
+
createVNode(unref(_sfc_main$a), {
|
|
80
|
+
"as-child": "",
|
|
81
|
+
"is-active": item.active,
|
|
82
|
+
class: "group h-auto min-h-12 items-start rounded border border-[var(--border-light)] px-3 py-2.5 text-[var(--text-secondary-light)] transition-all duration-200 hover:border-[var(--border-hover-light)] hover:bg-[var(--bg-selected-light)] hover:text-[var(--text-primary-light)] data-[active=true]:border-[var(--border-hover-light)] data-[active=true]:bg-[var(--bg-selected-light)] data-[active=true]:text-[var(--text-primary-light)] dark:border-[var(--border-dark)] dark:text-[var(--text-secondary-dark)] dark:hover:border-[var(--border-hover-dark)] dark:hover:bg-[var(--bg-selected-dark)] dark:hover:text-[var(--text-primary-dark)] dark:data-[active=true]:border-[var(--border-hover-dark)] dark:data-[active=true]:bg-[var(--bg-selected-dark)] dark:data-[active=true]:text-[var(--text-primary-dark)] sm:px-4 sm:py-3"
|
|
83
|
+
}, {
|
|
84
|
+
default: withCtx(() => [
|
|
85
|
+
(openBlock(), createBlock(resolveDynamicComponent(props.sidebarLinkComponent), mergeProps({ ref_for: true }, getSidebarItemLinkProps(item)), {
|
|
86
|
+
default: withCtx(() => [
|
|
87
|
+
item.icon ? (openBlock(), createBlock(resolveDynamicComponent(item.icon), {
|
|
88
|
+
key: 0,
|
|
89
|
+
"stroke-width": 1.8,
|
|
90
|
+
class: "mt-0.5 h-4 w-4 shrink-0 opacity-90 transition-opacity duration-200 group-hover:opacity-100 sm:h-5 sm:w-5"
|
|
91
|
+
})) : createCommentVNode("", true),
|
|
92
|
+
createElementVNode("div", _hoisted_1, [
|
|
93
|
+
createElementVNode("span", _hoisted_2, toDisplayString(item.label), 1),
|
|
94
|
+
item.description ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(item.description), 1)) : createCommentVNode("", true)
|
|
95
|
+
])
|
|
96
|
+
]),
|
|
97
|
+
_: 2
|
|
98
|
+
}, 1040))
|
|
99
|
+
]),
|
|
100
|
+
_: 2
|
|
101
|
+
}, 1032, ["is-active"])
|
|
102
|
+
]),
|
|
103
|
+
_: 2
|
|
104
|
+
}, 1024);
|
|
105
|
+
}), 128))
|
|
106
|
+
]),
|
|
107
|
+
_: 2
|
|
108
|
+
}, 1024)
|
|
109
|
+
]),
|
|
110
|
+
_: 2
|
|
111
|
+
}, 1024)
|
|
112
|
+
]),
|
|
113
|
+
_: 2
|
|
114
|
+
}, 1024);
|
|
115
|
+
}), 128))
|
|
116
|
+
]),
|
|
117
|
+
_: 1
|
|
118
|
+
})) : createCommentVNode("", true),
|
|
119
|
+
_ctx.$slots["sidebar-footer"] ? (openBlock(), createBlock(unref(_sfc_main$b), {
|
|
120
|
+
key: 2,
|
|
121
|
+
class: "border-t border-sidebar-border"
|
|
122
|
+
}, {
|
|
123
|
+
default: withCtx(() => [
|
|
124
|
+
renderSlot(_ctx.$slots, "sidebar-footer")
|
|
125
|
+
]),
|
|
126
|
+
_: 3
|
|
127
|
+
})) : createCommentVNode("", true)
|
|
128
|
+
]),
|
|
129
|
+
_: 3
|
|
130
|
+
}, 8, ["collapsible"]),
|
|
131
|
+
createVNode(unref(_sfc_main$c), {
|
|
132
|
+
class: normalizeClass(unref(cn)("relative min-h-screen min-w-0 bg-background text-foreground", props.insetClass))
|
|
133
|
+
}, {
|
|
134
|
+
default: withCtx(() => [
|
|
135
|
+
props.showBackground ? (openBlock(), createBlock(BackgroundGrid, { key: 0 })) : createCommentVNode("", true),
|
|
136
|
+
createElementVNode("header", {
|
|
137
|
+
class: normalizeClass(unref(cn)("sticky top-0 z-20 flex h-16 shrink-0 items-center gap-2 border-b border-sidebar-border bg-sidebar px-4 backdrop-blur", props.topbarClass))
|
|
138
|
+
}, [
|
|
139
|
+
createVNode(unref(_sfc_main$d), { class: "-ml-1" }),
|
|
140
|
+
createVNode(unref(_sfc_main$e), {
|
|
141
|
+
orientation: "vertical",
|
|
142
|
+
class: "mr-2 data-[orientation=vertical]:h-4"
|
|
143
|
+
}),
|
|
144
|
+
renderSlot(_ctx.$slots, "topbar-leading"),
|
|
145
|
+
createElementVNode("div", _hoisted_4, [
|
|
146
|
+
createElementVNode("div", _hoisted_5, toDisplayString(props.title), 1),
|
|
147
|
+
props.description ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(props.description), 1)) : createCommentVNode("", true)
|
|
148
|
+
]),
|
|
149
|
+
renderSlot(_ctx.$slots, "topbar-trailing")
|
|
150
|
+
], 2),
|
|
151
|
+
createElementVNode("main", _hoisted_7, [
|
|
152
|
+
createElementVNode("div", {
|
|
153
|
+
class: normalizeClass(unref(cn)("mx-auto flex w-full min-w-0 max-w-6xl flex-col gap-6 p-3 sm:p-6 lg:p-8", props.contentContainerClass))
|
|
154
|
+
}, [
|
|
155
|
+
createElementVNode("div", _hoisted_8, [
|
|
156
|
+
renderSlot(_ctx.$slots, "default")
|
|
157
|
+
])
|
|
158
|
+
], 2)
|
|
159
|
+
])
|
|
160
|
+
]),
|
|
161
|
+
_: 3
|
|
162
|
+
}, 8, ["class"])
|
|
163
|
+
]),
|
|
164
|
+
_: 3
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
});
|
|
2
169
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
170
|
+
_sfc_main as DashboardShell,
|
|
171
|
+
_sfc_main as default
|
|
5
172
|
};
|
package/dist/date-picker.js
CHANGED
|
@@ -1,5 +1,93 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent, ref, computed, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createTextVNode, toDisplayString } from "vue";
|
|
2
|
+
import { $ as $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3, l as $14e0f24ef4ac5c92$export$aa8b41735afcabd2, m as $fb18d541ea1ad717$export$ad991b66133851cf, _ as _sfc_main$5 } from "./CalendarPrevButton.vue_vue_type_script_setup_true_lang-Dqz6DIGp.js";
|
|
3
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
4
|
+
import { Button as _sfc_main$3 } from "./button.js";
|
|
5
|
+
import { _ as _sfc_main$1, a as _sfc_main$2, b as _sfc_main$4 } from "./PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js";
|
|
6
|
+
import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
|
|
7
|
+
/**
|
|
8
|
+
* @license lucide-vue-next v1.0.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
const Calendar = createLucideIcon("calendar", [
|
|
14
|
+
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
15
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
16
|
+
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
17
|
+
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
18
|
+
]);
|
|
19
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
|
+
__name: "DatePicker",
|
|
21
|
+
props: {
|
|
22
|
+
defaultValue: {},
|
|
23
|
+
modelValue: {},
|
|
24
|
+
placeholder: { default: "Pick a date" },
|
|
25
|
+
disabled: { type: Boolean, default: false },
|
|
26
|
+
class: {},
|
|
27
|
+
contentClass: {}
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:modelValue"],
|
|
30
|
+
setup(__props, { emit: __emit }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const emits = __emit;
|
|
33
|
+
const internalDate = ref(props.defaultValue);
|
|
34
|
+
const isControlled = computed(() => props.modelValue !== void 0);
|
|
35
|
+
const date = computed({
|
|
36
|
+
get: () => isControlled.value ? props.modelValue : internalDate.value,
|
|
37
|
+
set: (value) => {
|
|
38
|
+
if (!isControlled.value)
|
|
39
|
+
internalDate.value = value;
|
|
40
|
+
emits("update:modelValue", value);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
const defaultPlaceholder = computed(() => date.value ?? $14e0f24ef4ac5c92$export$d0bdf45af03a6ea3($14e0f24ef4ac5c92$export$aa8b41735afcabd2()));
|
|
44
|
+
const formatter = new $fb18d541ea1ad717$export$ad991b66133851cf("en-US", {
|
|
45
|
+
dateStyle: "long"
|
|
46
|
+
});
|
|
47
|
+
return (_ctx, _cache) => {
|
|
48
|
+
return openBlock(), createBlock(unref(_sfc_main$1), null, {
|
|
49
|
+
default: withCtx(({ close }) => [
|
|
50
|
+
createVNode(unref(_sfc_main$2), { "as-child": "" }, {
|
|
51
|
+
default: withCtx(() => [
|
|
52
|
+
createVNode(unref(_sfc_main$3), {
|
|
53
|
+
variant: "outline",
|
|
54
|
+
disabled: _ctx.disabled,
|
|
55
|
+
class: normalizeClass(unref(cn)("w-[240px] justify-start text-left font-normal", !date.value && "text-muted-foreground", props.class))
|
|
56
|
+
}, {
|
|
57
|
+
default: withCtx(() => [
|
|
58
|
+
createVNode(unref(Calendar), { class: "size-4" }),
|
|
59
|
+
createTextVNode(" " + toDisplayString(date.value ? unref(formatter).format(date.value.toDate(unref($14e0f24ef4ac5c92$export$aa8b41735afcabd2)())) : _ctx.placeholder), 1)
|
|
60
|
+
]),
|
|
61
|
+
_: 1
|
|
62
|
+
}, 8, ["disabled", "class"])
|
|
63
|
+
]),
|
|
64
|
+
_: 1
|
|
65
|
+
}),
|
|
66
|
+
createVNode(unref(_sfc_main$4), {
|
|
67
|
+
class: normalizeClass(unref(cn)("w-auto p-0", props.contentClass)),
|
|
68
|
+
align: "start"
|
|
69
|
+
}, {
|
|
70
|
+
default: withCtx(() => [
|
|
71
|
+
createVNode(unref(_sfc_main$5), {
|
|
72
|
+
modelValue: date.value,
|
|
73
|
+
"onUpdate:modelValue": [
|
|
74
|
+
_cache[0] || (_cache[0] = ($event) => date.value = $event),
|
|
75
|
+
close
|
|
76
|
+
],
|
|
77
|
+
"default-placeholder": defaultPlaceholder.value,
|
|
78
|
+
layout: "month-and-year",
|
|
79
|
+
"initial-focus": ""
|
|
80
|
+
}, null, 8, ["modelValue", "default-placeholder", "onUpdate:modelValue"])
|
|
81
|
+
]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1032, ["class"])
|
|
84
|
+
]),
|
|
85
|
+
_: 1
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
2
90
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
91
|
+
_sfc_main as DatePicker,
|
|
92
|
+
_sfc_main as default
|
|
5
93
|
};
|
package/dist/dialog.js
CHANGED
|
@@ -1,14 +1,148 @@
|
|
|
1
|
-
import { _, a, b, c, d, e } from "./DialogTitle.vue_vue_type_script_setup_true_lang-
|
|
2
|
-
import {
|
|
1
|
+
import { _, a, b, c, d, e } from "./DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js";
|
|
2
|
+
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, createElementBlock, normalizeClass, createVNode, createTextVNode, createCommentVNode, createElementVNode } from "vue";
|
|
3
|
+
import { D as DialogClose_default } from "./DialogClose-DDtZ0Em0.js";
|
|
4
|
+
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
5
|
+
import { Button as _sfc_main$4 } from "./button.js";
|
|
6
|
+
import { u as useForwardPropsEmits } from "./useForwardPropsEmits-DmumnZO5.js";
|
|
7
|
+
import { D as DialogOverlay_default, a as DialogContent_default } from "./DialogTitle-CLuntLBB.js";
|
|
8
|
+
import { D as DialogPortal_default, X } from "./DialogPortal-BTVR2QvT.js";
|
|
9
|
+
import { r as reactiveOmit } from "./index-qGMU40e1.js";
|
|
10
|
+
import { D as DialogTrigger_default } from "./DialogTrigger-CjJ8QNL_.js";
|
|
11
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "DialogClose",
|
|
13
|
+
props: {
|
|
14
|
+
asChild: { type: Boolean },
|
|
15
|
+
as: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
return (_ctx, _cache) => {
|
|
20
|
+
return openBlock(), createBlock(unref(DialogClose_default), mergeProps({ "data-slot": "dialog-close" }, props), {
|
|
21
|
+
default: withCtx(() => [
|
|
22
|
+
renderSlot(_ctx.$slots, "default")
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 16);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
30
|
+
__name: "DialogFooter",
|
|
31
|
+
props: {
|
|
32
|
+
class: {},
|
|
33
|
+
showCloseButton: { type: Boolean, default: false }
|
|
34
|
+
},
|
|
35
|
+
setup(__props) {
|
|
36
|
+
const props = __props;
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createElementBlock("div", {
|
|
39
|
+
"data-slot": "dialog-footer",
|
|
40
|
+
class: normalizeClass(unref(cn)("flex flex-col-reverse gap-3 border-t border-border px-5 py-4 sm:flex-row-reverse sm:px-6", props.class))
|
|
41
|
+
}, [
|
|
42
|
+
renderSlot(_ctx.$slots, "default"),
|
|
43
|
+
_ctx.showCloseButton ? (openBlock(), createBlock(unref(DialogClose_default), {
|
|
44
|
+
key: 0,
|
|
45
|
+
"as-child": ""
|
|
46
|
+
}, {
|
|
47
|
+
default: withCtx(() => [
|
|
48
|
+
createVNode(unref(_sfc_main$4), { variant: "outline" }, {
|
|
49
|
+
default: withCtx(() => _cache[0] || (_cache[0] = [
|
|
50
|
+
createTextVNode(" Close ")
|
|
51
|
+
])),
|
|
52
|
+
_: 1
|
|
53
|
+
})
|
|
54
|
+
]),
|
|
55
|
+
_: 1
|
|
56
|
+
})) : createCommentVNode("", true)
|
|
57
|
+
], 2);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
62
|
+
...{
|
|
63
|
+
inheritAttrs: false
|
|
64
|
+
},
|
|
65
|
+
__name: "DialogScrollContent",
|
|
66
|
+
props: {
|
|
67
|
+
forceMount: { type: Boolean },
|
|
68
|
+
disableOutsidePointerEvents: { type: Boolean },
|
|
69
|
+
asChild: { type: Boolean },
|
|
70
|
+
as: {},
|
|
71
|
+
class: {}
|
|
72
|
+
},
|
|
73
|
+
emits: ["escapeKeyDown", "pointerDownOutside", "focusOutside", "interactOutside", "openAutoFocus", "closeAutoFocus"],
|
|
74
|
+
setup(__props, { emit: __emit }) {
|
|
75
|
+
const props = __props;
|
|
76
|
+
const emits = __emit;
|
|
77
|
+
const delegatedProps = reactiveOmit(props, "class");
|
|
78
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
79
|
+
return (_ctx, _cache) => {
|
|
80
|
+
return openBlock(), createBlock(unref(DialogPortal_default), null, {
|
|
81
|
+
default: withCtx(() => [
|
|
82
|
+
createVNode(unref(DialogOverlay_default), { class: "fixed inset-0 z-50 grid place-items-center overflow-y-auto bg-black/45 backdrop-blur-[2px] transition-[opacity,backdrop-filter] ease-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0" }, {
|
|
83
|
+
default: withCtx(() => [
|
|
84
|
+
createVNode(unref(DialogContent_default), mergeProps({
|
|
85
|
+
class: unref(cn)(
|
|
86
|
+
"relative z-50 my-8 grid w-[95%] max-w-lg gap-0 overflow-hidden rounded border border-border bg-card text-card-foreground shadow-2xl duration-200 md:w-full",
|
|
87
|
+
props.class
|
|
88
|
+
)
|
|
89
|
+
}, { ..._ctx.$attrs, ...unref(forwarded) }, {
|
|
90
|
+
onPointerDownOutside: _cache[0] || (_cache[0] = (event) => {
|
|
91
|
+
const originalEvent = event.detail.originalEvent;
|
|
92
|
+
const target = originalEvent.target;
|
|
93
|
+
if (originalEvent.offsetX > target.clientWidth || originalEvent.offsetY > target.clientHeight) {
|
|
94
|
+
event.preventDefault();
|
|
95
|
+
}
|
|
96
|
+
})
|
|
97
|
+
}), {
|
|
98
|
+
default: withCtx(() => [
|
|
99
|
+
renderSlot(_ctx.$slots, "default"),
|
|
100
|
+
createVNode(unref(DialogClose_default), { class: "absolute top-4 right-4 rounded border border-border bg-card p-1 text-muted-foreground transition-all duration-200 hover:bg-accent hover:text-foreground" }, {
|
|
101
|
+
default: withCtx(() => [
|
|
102
|
+
createVNode(unref(X), { class: "w-4 h-4" }),
|
|
103
|
+
_cache[1] || (_cache[1] = createElementVNode("span", { class: "sr-only" }, "Close", -1))
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
]),
|
|
108
|
+
_: 3
|
|
109
|
+
}, 16, ["class"])
|
|
110
|
+
]),
|
|
111
|
+
_: 3
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 3
|
|
115
|
+
});
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
120
|
+
__name: "DialogTrigger",
|
|
121
|
+
props: {
|
|
122
|
+
asChild: { type: Boolean },
|
|
123
|
+
as: {}
|
|
124
|
+
},
|
|
125
|
+
setup(__props) {
|
|
126
|
+
const props = __props;
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
return openBlock(), createBlock(unref(DialogTrigger_default), mergeProps({ "data-slot": "dialog-trigger" }, props), {
|
|
129
|
+
default: withCtx(() => [
|
|
130
|
+
renderSlot(_ctx.$slots, "default")
|
|
131
|
+
]),
|
|
132
|
+
_: 3
|
|
133
|
+
}, 16);
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
});
|
|
3
137
|
export {
|
|
4
138
|
_ as Dialog,
|
|
5
|
-
|
|
139
|
+
_sfc_main$3 as DialogClose,
|
|
6
140
|
a as DialogContent,
|
|
7
141
|
b as DialogDescription,
|
|
8
|
-
|
|
142
|
+
_sfc_main$2 as DialogFooter,
|
|
9
143
|
c as DialogHeader,
|
|
10
144
|
d as DialogOverlay,
|
|
11
|
-
|
|
145
|
+
_sfc_main$1 as DialogScrollContent,
|
|
12
146
|
e as DialogTitle,
|
|
13
|
-
|
|
147
|
+
_sfc_main as DialogTrigger
|
|
14
148
|
};
|
package/dist/field.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as cva } from "./index-FpH8cK6B.js";
|
|
2
2
|
import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot, computed, Fragment, createTextVNode, toDisplayString, renderList, createCommentVNode, createBlock, withCtx, createVNode } from "vue";
|
|
3
3
|
import { c as cn } from "./utils-Bz4m9VPB.js";
|
|
4
|
-
import { _ as _sfc_main$a } from "./Label.vue_vue_type_script_setup_true_lang-
|
|
5
|
-
import { _ as _sfc_main$b } from "./Separator.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as _sfc_main$a } from "./Label.vue_vue_type_script_setup_true_lang-pMIzCHzV.js";
|
|
5
|
+
import { _ as _sfc_main$b } from "./Separator.vue_vue_type_script_setup_true_lang-CMRkdntA.js";
|
|
6
6
|
const _hoisted_1$3 = ["data-orientation"];
|
|
7
7
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "Field",
|