@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.
Files changed (116) hide show
  1. package/LICENSE +20 -20
  2. package/README.md +75 -78
  3. package/dist/{AlertDialogTitle.vue_vue_type_script_setup_true_lang-CWCr2erD.js → AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js} +8 -8
  4. package/dist/{Busy-B65Nd9ec.js → Busy-DSyPtpVD.js} +1 -1
  5. package/dist/BusyIndicator-D-4YHN2L.js +4 -0
  6. 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
  7. package/dist/{Collection-CmOoLBo7.js → Collection-Coi6nyvb.js} +1 -1
  8. package/dist/ConfirmDialog-Zu4m9TY-.js +4 -0
  9. package/dist/{DialogClose-BNlqG4G2.js → DialogClose-DDtZ0Em0.js} +2 -2
  10. package/dist/{x-2_VzbDS9.js → DialogPortal-BTVR2QvT.js} +12 -12
  11. package/dist/{DialogTitle-DXj0nkXn.js → DialogTitle-CLuntLBB.js} +5 -5
  12. package/dist/{DialogTitle.vue_vue_type_script_setup_true_lang-Bw40D4AK.js → DialogTitle.vue_vue_type_script_setup_true_lang-83YQbiAn.js} +4 -4
  13. package/dist/{DialogTrigger-CpyKnu11.js → DialogTrigger-CjJ8QNL_.js} +3 -3
  14. package/dist/{FocusScope-C3mcVwsf.js → FocusScope-DYbCtSNc.js} +4 -4
  15. package/dist/{Input.vue_vue_type_script_setup_true_lang-U778IWa0.js → Input.vue_vue_type_script_setup_true_lang-6SfPeT8d.js} +1 -1
  16. 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
  17. package/dist/MessageDialog-ChS4d2qN.js +4 -0
  18. package/dist/{NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js → NativeSelectOption.vue_vue_type_script_setup_true_lang-CWhL2Lw8.js} +2 -2
  19. 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
  20. package/dist/{PopperContent-BiM0YLO3.js → PopperContent-h-thLTz8.js} +3 -3
  21. package/dist/{Separator.vue_vue_type_script_setup_true_lang-COrZ60NR.js → Separator.vue_vue_type_script_setup_true_lang-CMRkdntA.js} +1 -1
  22. package/dist/{SheetTitle.vue_vue_type_script_setup_true_lang-DLoXGMbx.js → SheetTitle.vue_vue_type_script_setup_true_lang-fx9jbBwT.js} +4 -4
  23. 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
  24. package/dist/{Switch.vue_vue_type_script_setup_true_lang-BWKCycMm.js → Switch.vue_vue_type_script_setup_true_lang-BG6nkPSO.js} +5 -5
  25. package/dist/{Teleport-CuUn4UkG.js → Teleport-CV0tKbq5.js} +3 -3
  26. package/dist/{TooltipTrigger.vue_vue_type_script_setup_true_lang-BRyHTWgw.js → TooltipTrigger.vue_vue_type_script_setup_true_lang-DEPKysA_.js} +5 -5
  27. package/dist/{VisuallyHiddenInput-DLAsRwUw.js → VisuallyHiddenInput-1G1IEkBL.js} +1 -1
  28. package/dist/alert-dialog.js +161 -9
  29. package/dist/busy-indicator.js +64 -4
  30. package/dist/busy.js +1 -1
  31. package/dist/calendar.js +1 -1
  32. package/dist/card.js +110 -7
  33. package/dist/command.js +20 -20
  34. package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +1 -1
  35. package/dist/components/ui/button/index.d.ts +1 -1
  36. package/dist/components/ui/sidebar/SidebarMenuButton.vue.d.ts +1 -1
  37. package/dist/components/ui/sidebar/SidebarMenuButtonChild.vue.d.ts +1 -1
  38. package/dist/confirm-dialog.js +228 -7
  39. package/dist/dashboard-shell.js +170 -3
  40. package/dist/date-picker.js +91 -3
  41. package/dist/dialog.js +140 -6
  42. package/dist/field.js +2 -2
  43. package/dist/{index-C1_fxYhb.js → index-Cq9Ekgtb.js} +2 -2
  44. package/dist/{index-Dfi5ESP2.js → index-qGMU40e1.js} +1 -1
  45. package/dist/input.js +1 -1
  46. package/dist/label.js +1 -1
  47. package/dist/message-dialog.js +240 -6
  48. package/dist/native-select.js +1 -1
  49. package/dist/popover.js +62 -5
  50. package/dist/select.js +2122 -12
  51. package/dist/separator.js +1 -1
  52. package/dist/sheet.js +61 -5
  53. package/dist/sidebar.js +6 -6
  54. package/dist/slider-form-component.js +58 -3
  55. package/dist/slider.js +1 -1
  56. package/dist/style.css +4 -4016
  57. package/dist/switch-form-component.js +38 -3
  58. package/dist/switch.js +1 -1
  59. package/dist/tooltip.js +27 -3
  60. package/dist/{useFocusGuards-tgErlvMF.js → useFocusGuards-WYWvpJy2.js} +1 -1
  61. package/dist/{useFormControl-7ytzz-r7.js → useFormControl-CyoJwp9r.js} +1 -1
  62. package/dist/{useForwardExpose-CNVHwdF2.js → useForwardExpose-BiRQH8eO.js} +1 -1
  63. package/dist/{usePrimitiveElement-CijaRBgF.js → usePrimitiveElement-Bk3ZOslv.js} +1 -1
  64. package/dist/{useSize-DO9Z3wC4.js → useSize-BLYTFgnQ.js} +1 -1
  65. package/dist/{useTypeahead-Dqe1QXq1.js → useTypeahead-KTl4-oeq.js} +2 -2
  66. package/dist/{utils-RRmyeqLm.js → utils-BXBXPGDA.js} +1 -1
  67. package/package.json +188 -186
  68. package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-vNwxOYhM.js +0 -158
  69. package/dist/BusyIndicator-CnWzSMDb.js +0 -4
  70. package/dist/BusyIndicator.vue_vue_type_script_setup_true_lang-CYeXMI_V.js +0 -66
  71. package/dist/CardTitle.vue_vue_type_script_setup_true_lang-DVAd7AWF.js +0 -112
  72. package/dist/ConfirmDialog-DEsvF0b_.js +0 -4
  73. package/dist/ConfirmDialog.vue_vue_type_script_setup_true_lang-BAd1l1zF.js +0 -230
  74. package/dist/DashboardShell.vue_vue_type_script_setup_true_lang-CT2SQBXv.js +0 -171
  75. package/dist/DatePicker.vue_vue_type_script_setup_true_lang-D8mev2ha.js +0 -92
  76. package/dist/DialogTrigger.vue_vue_type_script_setup_true_lang-DLrFiCsw.js +0 -141
  77. package/dist/MessageDialog-BrowppID.js +0 -4
  78. package/dist/MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js +0 -242
  79. package/dist/PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js +0 -61
  80. package/dist/SelectValue.vue_vue_type_script_setup_true_lang-DGAI4hw5.js +0 -2124
  81. package/dist/SheetTrigger.vue_vue_type_script_setup_true_lang-CE2XJNHy.js +0 -62
  82. package/dist/SliderFormComponent.vue_vue_type_script_setup_true_lang-KPzC_Lmr.js +0 -59
  83. package/dist/SwitchFormComponent.vue_vue_type_script_setup_true_lang-XOBEs3pa.js +0 -39
  84. package/dist/TooltipProvider.vue_vue_type_script_setup_true_lang-DwIfCQjY.js +0 -28
  85. package/dist/alert-dialog.d.ts +0 -2
  86. package/dist/alert.d.ts +0 -2
  87. package/dist/background-grid.d.ts +0 -6
  88. package/dist/busy-indicator.d.ts +0 -2
  89. package/dist/busy.d.ts +0 -2
  90. package/dist/button.d.ts +0 -2
  91. package/dist/calendar.d.ts +0 -2
  92. package/dist/card.d.ts +0 -2
  93. package/dist/command.d.ts +0 -2
  94. package/dist/confirm-dialog.d.ts +0 -2
  95. package/dist/dashboard-shell.d.ts +0 -6
  96. package/dist/date-picker.d.ts +0 -6
  97. package/dist/dialog.d.ts +0 -2
  98. package/dist/field.d.ts +0 -2
  99. package/dist/index.d.ts +0 -28
  100. package/dist/index.js +0 -171
  101. package/dist/input.d.ts +0 -2
  102. package/dist/label.d.ts +0 -2
  103. package/dist/message-dialog.d.ts +0 -2
  104. package/dist/native-select.d.ts +0 -2
  105. package/dist/popover.d.ts +0 -2
  106. package/dist/select.d.ts +0 -2
  107. package/dist/separator.d.ts +0 -2
  108. package/dist/sheet.d.ts +0 -2
  109. package/dist/sidebar.d.ts +0 -2
  110. package/dist/skeleton.d.ts +0 -2
  111. package/dist/slider-form-component.d.ts +0 -6
  112. package/dist/slider.d.ts +0 -2
  113. package/dist/switch-form-component.d.ts +0 -6
  114. package/dist/switch.d.ts +0 -2
  115. package/dist/tooltip.d.ts +0 -2
  116. package/dist/utils.d.ts +0 -2
@@ -1,5 +1,5 @@
1
- import { c as computedWithControl, p as pxValue, t as toArray, w as watchImmediate, i as isClient, m as makeDestructurable, a as injectLocal, b as isDef, d as camelize, e as tryOnScopeDispose, f as isObject } from "./index-Dfi5ESP2.js";
2
- import { getCurrentInstance, onUpdated, onMounted, shallowRef, watchEffect, toValue, computed, ref, watch, nextTick, defineComponent, hasInjectionContext, unref } from "vue";
1
+ import { p as pxValue, t as toArray, w as watchImmediate, i as isClient, m as makeDestructurable, c as computedWithControl, a as injectLocal, b as isDef, d as camelize, e as tryOnScopeDispose, f as isObject } from "./index-qGMU40e1.js";
2
+ import { shallowRef, watchEffect, toValue, computed, getCurrentInstance, ref, watch, nextTick, defineComponent, onUpdated, onMounted, hasInjectionContext, unref } from "vue";
3
3
  // @__NO_SIDE_EFFECTS__
4
4
  function createReusableTemplate(options = {}) {
5
5
  const { inheritAttrs = true } = options;
@@ -1,4 +1,4 @@
1
- import { computed, watch, customRef, toValue, shallowRef, shallowReadonly, isRef, reactive, unref, getCurrentScope, onScopeDispose, getCurrentInstance, hasInjectionContext, inject, onBeforeUnmount, watchEffect, readonly, effectScope, toRefs } from "vue";
1
+ import { computed, watch, shallowRef, shallowReadonly, customRef, toValue, isRef, reactive, unref, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, onScopeDispose, onBeforeUnmount, watchEffect, readonly, effectScope, toRefs } from "vue";
2
2
  function computedEager(fn, options) {
3
3
  var _options$flush;
4
4
  const result = shallowRef();
package/dist/input.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ } from "./Input.vue_vue_type_script_setup_true_lang-U778IWa0.js";
1
+ import { _ } from "./Input.vue_vue_type_script_setup_true_lang-6SfPeT8d.js";
2
2
  export {
3
3
  _ as Input
4
4
  };
package/dist/label.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ } from "./Label.vue_vue_type_script_setup_true_lang-B_fwvfJ-.js";
1
+ import { _ } from "./Label.vue_vue_type_script_setup_true_lang-pMIzCHzV.js";
2
2
  export {
3
3
  _ as Label
4
4
  };
@@ -1,8 +1,242 @@
1
- import { _, c, m, r, s } from "./MessageDialog.vue_vue_type_script_setup_true_lang-Ddih5Isd.js";
1
+ import { reactive, render, h, markRaw, defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, normalizeClass, 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
+ import { c as createLucideIcon } from "./createLucideIcon-CCMB2vDW.js";
6
+ import { C as Check } from "./check-iejznCzf.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 CircleAlert = createLucideIcon("circle-alert", [
14
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
15
+ ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
16
+ ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
17
+ ]);
18
+ const messageDialogQueue = [];
19
+ let nextMessageDialogId = 0;
20
+ const DIALOG_CLOSE_DURATION_MS = 300;
21
+ let closeTimer = null;
22
+ let messageDialogMountPromise = null;
23
+ const MESSAGE_DIALOG_ROOT_ID = "ui-vintage-message-dialog-root";
24
+ const messageDialogState = reactive({
25
+ current: null,
26
+ busy: false,
27
+ isOpen: false
28
+ });
29
+ const markIcon = (icon) => icon ? markRaw(icon) : null;
30
+ const ensureMessageDialogMounted = () => {
31
+ if (typeof document === "undefined") {
32
+ return Promise.resolve();
33
+ }
34
+ const existingRoot = document.getElementById(MESSAGE_DIALOG_ROOT_ID);
35
+ if (existingRoot) {
36
+ return Promise.resolve();
37
+ }
38
+ if (messageDialogMountPromise) {
39
+ return messageDialogMountPromise;
40
+ }
41
+ messageDialogMountPromise = (async () => {
42
+ const { default: MessageDialog } = await import("./MessageDialog-ChS4d2qN.js");
43
+ if (document.getElementById(MESSAGE_DIALOG_ROOT_ID)) {
44
+ return;
45
+ }
46
+ const container = document.createElement("div");
47
+ container.id = MESSAGE_DIALOG_ROOT_ID;
48
+ document.body.appendChild(container);
49
+ render(h(MessageDialog), container);
50
+ })().finally(() => {
51
+ messageDialogMountPromise = null;
52
+ });
53
+ return messageDialogMountPromise;
54
+ };
55
+ const openNextMessageDialog = () => {
56
+ const nextDialog = messageDialogQueue.shift() ?? null;
57
+ messageDialogState.current = nextDialog;
58
+ messageDialogState.isOpen = Boolean(nextDialog);
59
+ };
60
+ const enqueueMessageDialog = (request) => {
61
+ messageDialogQueue.push(request);
62
+ if (!messageDialogState.current) {
63
+ openNextMessageDialog();
64
+ }
65
+ };
66
+ const clearCurrentMessageDialog = () => {
67
+ messageDialogState.busy = false;
68
+ messageDialogState.isOpen = false;
69
+ messageDialogState.current = null;
70
+ openNextMessageDialog();
71
+ };
72
+ const scheduleCloseCurrentMessageDialog = () => {
73
+ if (!messageDialogState.current || !messageDialogState.isOpen) {
74
+ return;
75
+ }
76
+ messageDialogState.isOpen = false;
77
+ if (closeTimer) {
78
+ clearTimeout(closeTimer);
79
+ }
80
+ closeTimer = setTimeout(() => {
81
+ closeTimer = null;
82
+ clearCurrentMessageDialog();
83
+ }, DIALOG_CLOSE_DURATION_MS);
84
+ };
85
+ const closeMessageDialog = () => {
86
+ const current = messageDialogState.current;
87
+ if (!current || !messageDialogState.isOpen) {
88
+ return;
89
+ }
90
+ current.resolve();
91
+ scheduleCloseCurrentMessageDialog();
92
+ };
93
+ const resolveActiveMessageDialog = () => {
94
+ const current = messageDialogState.current;
95
+ if (!current || messageDialogState.busy) {
96
+ return;
97
+ }
98
+ current.resolve();
99
+ scheduleCloseCurrentMessageDialog();
100
+ };
101
+ const showMessageDialog = (options) => {
102
+ void ensureMessageDialogMounted();
103
+ return new Promise((resolve) => {
104
+ enqueueMessageDialog({
105
+ id: nextMessageDialogId += 1,
106
+ options: {
107
+ type: options.type ?? "Info",
108
+ title: options.title ?? "",
109
+ message: options.message,
110
+ closeText: options.closeText ?? "Close",
111
+ icon: markIcon(options.icon),
112
+ closeButtonIcon: markIcon(options.closeButtonIcon)
113
+ },
114
+ resolve
115
+ });
116
+ });
117
+ };
118
+ const _hoisted_1 = { class: "px-5 pb-5 pt-5 sm:px-6 sm:pb-4 sm:pt-6" };
119
+ const _hoisted_2 = { class: "flex flex-col gap-4 sm:flex-row sm:items-start" };
120
+ const _sfc_main = /* @__PURE__ */ defineComponent({
121
+ __name: "MessageDialog",
122
+ setup(__props) {
123
+ const currentDialog = computed(() => messageDialogState.current);
124
+ const messageIcon = computed(() => {
125
+ const current = currentDialog.value;
126
+ if (!current) {
127
+ return Info;
128
+ }
129
+ if (current.options.icon) {
130
+ return current.options.icon;
131
+ }
132
+ if (current.options.type === "Error") {
133
+ return CircleAlert;
134
+ }
135
+ if (current.options.type === "Success") {
136
+ return Check;
137
+ }
138
+ return Info;
139
+ });
140
+ const messageIconClasses = computed(() => {
141
+ const current = currentDialog.value;
142
+ if (!current) {
143
+ return "border-[var(--border)] bg-[var(--bg-surface-light)] dark:bg-[var(--bg-surface-dark)]";
144
+ }
145
+ if (current.options.type === "Error") {
146
+ return "border-red-200 bg-red-50 dark:border-red-900/50 dark:bg-red-950/30";
147
+ }
148
+ if (current.options.type === "Success") {
149
+ return "border-green-200 bg-green-50 dark:border-green-900/50 dark:bg-green-950/30";
150
+ }
151
+ return "border-[var(--border)] bg-[var(--bg-surface-light)] dark:bg-[var(--bg-surface-dark)]";
152
+ });
153
+ const messageGlyphClasses = computed(() => {
154
+ const current = currentDialog.value;
155
+ if (!current) {
156
+ return "text-blue-600";
157
+ }
158
+ if (current.options.type === "Error") {
159
+ return "text-red-600";
160
+ }
161
+ if (current.options.type === "Success") {
162
+ return "text-green-600";
163
+ }
164
+ return "text-blue-600";
165
+ });
166
+ const handleOpenChange = (open) => {
167
+ if (!open) {
168
+ closeMessageDialog();
169
+ }
170
+ };
171
+ return (_ctx, _cache) => {
172
+ return openBlock(), createBlock(unref(_sfc_main$1), {
173
+ open: unref(messageDialogState).isOpen,
174
+ "onUpdate:open": handleOpenChange
175
+ }, {
176
+ default: withCtx(() => [
177
+ currentDialog.value ? (openBlock(), createBlock(unref(_sfc_main$2), { key: 0 }, {
178
+ default: withCtx(() => [
179
+ createElementVNode("div", _hoisted_1, [
180
+ createElementVNode("div", _hoisted_2, [
181
+ createElementVNode("div", {
182
+ class: normalizeClass(["flex size-12 shrink-0 self-center items-center justify-center rounded border sm:size-10 sm:self-start", messageIconClasses.value])
183
+ }, [
184
+ (openBlock(), createBlock(resolveDynamicComponent(messageIcon.value), {
185
+ "stroke-width": 1.8,
186
+ class: normalizeClass(["size-6", messageGlyphClasses.value])
187
+ }, null, 8, ["class"]))
188
+ ], 2),
189
+ createVNode(unref(_sfc_main$3), { class: "sm:pt-0" }, {
190
+ default: withCtx(() => [
191
+ createVNode(unref(_sfc_main$4), null, {
192
+ default: withCtx(() => [
193
+ createTextVNode(toDisplayString(currentDialog.value.options.title), 1)
194
+ ]),
195
+ _: 1
196
+ }),
197
+ createVNode(unref(_sfc_main$5), null, {
198
+ default: withCtx(() => [
199
+ createTextVNode(toDisplayString(currentDialog.value.options.message), 1)
200
+ ]),
201
+ _: 1
202
+ })
203
+ ]),
204
+ _: 1
205
+ })
206
+ ])
207
+ ]),
208
+ createVNode(unref(_sfc_main$6), { class: "items-end" }, {
209
+ default: withCtx(() => [
210
+ createVNode(unref(_sfc_main$7), {
211
+ variant: "outline",
212
+ disabled: unref(messageDialogState).busy,
213
+ onClick: unref(resolveActiveMessageDialog)
214
+ }, {
215
+ default: withCtx(() => [
216
+ currentDialog.value.options.closeButtonIcon ? (openBlock(), createBlock(resolveDynamicComponent(currentDialog.value.options.closeButtonIcon), {
217
+ key: 0,
218
+ class: "size-4"
219
+ })) : createCommentVNode("", true),
220
+ createTextVNode(" " + toDisplayString(currentDialog.value.options.closeText), 1)
221
+ ]),
222
+ _: 1
223
+ }, 8, ["disabled", "onClick"])
224
+ ]),
225
+ _: 1
226
+ })
227
+ ]),
228
+ _: 1
229
+ })) : createCommentVNode("", true)
230
+ ]),
231
+ _: 1
232
+ }, 8, ["open"]);
233
+ };
234
+ }
235
+ });
2
236
  export {
3
- _ as MessageDialog,
4
- c as closeMessageDialog,
5
- m as messageDialogState,
6
- r as resolveActiveMessageDialog,
7
- s as showMessageDialog
237
+ _sfc_main as MessageDialog,
238
+ closeMessageDialog,
239
+ messageDialogState,
240
+ resolveActiveMessageDialog,
241
+ showMessageDialog
8
242
  };
@@ -1,4 +1,4 @@
1
- import { _, a } from "./NativeSelectOption.vue_vue_type_script_setup_true_lang-DS87OTLT.js";
1
+ import { _, a } from "./NativeSelectOption.vue_vue_type_script_setup_true_lang-CWhL2Lw8.js";
2
2
  import { defineComponent, openBlock, createElementBlock, normalizeClass, unref, renderSlot } from "vue";
3
3
  import { c as cn } from "./utils-Bz4m9VPB.js";
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
package/dist/popover.js CHANGED
@@ -1,8 +1,65 @@
1
- import { _, a, b } from "./PopoverTrigger.vue_vue_type_script_setup_true_lang-KTcg6Jnl.js";
2
- import { _ as _2 } from "./PopoverAnchor.vue_vue_type_script_setup_true_lang-CsfybvZp.js";
1
+ import { i as injectPopoverRootContext } from "./PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js";
2
+ import { _, b, a } from "./PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js";
3
+ import { defineComponent, onBeforeMount, onUnmounted, openBlock, createBlock, unref, normalizeProps, guardReactiveProps, withCtx, renderSlot, mergeProps } from "vue";
4
+ import { u as useForwardExpose } from "./useForwardExpose-BiRQH8eO.js";
5
+ import { P as PopperAnchor_default } from "./PopperContent-h-thLTz8.js";
6
+ var PopoverAnchor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
7
+ __name: "PopoverAnchor",
8
+ props: {
9
+ reference: {
10
+ type: null,
11
+ required: false
12
+ },
13
+ asChild: {
14
+ type: Boolean,
15
+ required: false
16
+ },
17
+ as: {
18
+ type: null,
19
+ required: false
20
+ }
21
+ },
22
+ setup(__props) {
23
+ const props = __props;
24
+ useForwardExpose();
25
+ const rootContext = injectPopoverRootContext();
26
+ onBeforeMount(() => {
27
+ rootContext.hasCustomAnchor.value = true;
28
+ });
29
+ onUnmounted(() => {
30
+ rootContext.hasCustomAnchor.value = false;
31
+ });
32
+ return (_ctx, _cache) => {
33
+ return openBlock(), createBlock(unref(PopperAnchor_default), normalizeProps(guardReactiveProps(props)), {
34
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
35
+ _: 3
36
+ }, 16);
37
+ };
38
+ }
39
+ });
40
+ var PopoverAnchor_default = PopoverAnchor_vue_vue_type_script_setup_true_lang_default;
41
+ const _sfc_main = /* @__PURE__ */ defineComponent({
42
+ __name: "PopoverAnchor",
43
+ props: {
44
+ reference: {},
45
+ asChild: { type: Boolean },
46
+ as: {}
47
+ },
48
+ setup(__props) {
49
+ const props = __props;
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createBlock(unref(PopoverAnchor_default), mergeProps({ "data-slot": "popover-anchor" }, props), {
52
+ default: withCtx(() => [
53
+ renderSlot(_ctx.$slots, "default")
54
+ ]),
55
+ _: 3
56
+ }, 16);
57
+ };
58
+ }
59
+ });
3
60
  export {
4
61
  _ as Popover,
5
- _2 as PopoverAnchor,
6
- a as PopoverContent,
7
- b as PopoverTrigger
62
+ _sfc_main as PopoverAnchor,
63
+ b as PopoverContent,
64
+ a as PopoverTrigger
8
65
  };