@vuecs/overlays 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.md +37 -0
- package/dist/components/context-menu/ContextMenu.vue.d.ts +63 -0
- package/dist/components/context-menu/ContextMenu.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuCheckboxItem.vue.d.ts +98 -0
- package/dist/components/context-menu/ContextMenuCheckboxItem.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuContent.vue.d.ts +111 -0
- package/dist/components/context-menu/ContextMenuContent.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuGroup.vue.d.ts +47 -0
- package/dist/components/context-menu/ContextMenuGroup.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuItem.vue.d.ts +113 -0
- package/dist/components/context-menu/ContextMenuItem.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuItemIndicator.vue.d.ts +63 -0
- package/dist/components/context-menu/ContextMenuItemIndicator.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuLabel.vue.d.ts +79 -0
- package/dist/components/context-menu/ContextMenuLabel.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuRadioGroup.vue.d.ts +65 -0
- package/dist/components/context-menu/ContextMenuRadioGroup.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuRadioItem.vue.d.ts +96 -0
- package/dist/components/context-menu/ContextMenuRadioItem.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuSeparator.vue.d.ts +47 -0
- package/dist/components/context-menu/ContextMenuSeparator.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuSub.vue.d.ts +47 -0
- package/dist/components/context-menu/ContextMenuSub.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuSubContent.vue.d.ts +127 -0
- package/dist/components/context-menu/ContextMenuSubContent.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuSubTrigger.vue.d.ts +111 -0
- package/dist/components/context-menu/ContextMenuSubTrigger.vue.d.ts.map +1 -0
- package/dist/components/context-menu/ContextMenuTrigger.vue.d.ts +95 -0
- package/dist/components/context-menu/ContextMenuTrigger.vue.d.ts.map +1 -0
- package/dist/components/context-menu/index.d.ts +31 -0
- package/dist/components/context-menu/index.d.ts.map +1 -0
- package/dist/components/context-menu/theme.d.ts +4 -0
- package/dist/components/context-menu/theme.d.ts.map +1 -0
- package/dist/components/context-menu/types.d.ts +33 -0
- package/dist/components/context-menu/types.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenu.vue.d.ts +79 -0
- package/dist/components/dropdown-menu/DropdownMenu.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuArrow.vue.d.ts +79 -0
- package/dist/components/dropdown-menu/DropdownMenuArrow.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +98 -0
- package/dist/components/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.vue.d.ts +159 -0
- package/dist/components/dropdown-menu/DropdownMenuContent.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuGroup.vue.d.ts +47 -0
- package/dist/components/dropdown-menu/DropdownMenuGroup.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts +113 -0
- package/dist/components/dropdown-menu/DropdownMenuItem.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuItemIndicator.vue.d.ts +63 -0
- package/dist/components/dropdown-menu/DropdownMenuItemIndicator.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuLabel.vue.d.ts +79 -0
- package/dist/components/dropdown-menu/DropdownMenuLabel.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +65 -0
- package/dist/components/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +96 -0
- package/dist/components/dropdown-menu/DropdownMenuRadioItem.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.vue.d.ts +47 -0
- package/dist/components/dropdown-menu/DropdownMenuSeparator.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuSub.vue.d.ts +47 -0
- package/dist/components/dropdown-menu/DropdownMenuSub.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuSubContent.vue.d.ts +127 -0
- package/dist/components/dropdown-menu/DropdownMenuSubContent.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +111 -0
- package/dist/components/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts +79 -0
- package/dist/components/dropdown-menu/DropdownMenuTrigger.vue.d.ts.map +1 -0
- package/dist/components/dropdown-menu/index.d.ts +33 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/theme.d.ts +4 -0
- package/dist/components/dropdown-menu/theme.d.ts.map +1 -0
- package/dist/components/dropdown-menu/types.d.ts +35 -0
- package/dist/components/dropdown-menu/types.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCard.vue.d.ts +79 -0
- package/dist/components/hover-card/HoverCard.vue.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCardArrow.vue.d.ts +79 -0
- package/dist/components/hover-card/HoverCardArrow.vue.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCardContent.vue.d.ts +143 -0
- package/dist/components/hover-card/HoverCardContent.vue.d.ts.map +1 -0
- package/dist/components/hover-card/HoverCardTrigger.vue.d.ts +79 -0
- package/dist/components/hover-card/HoverCardTrigger.vue.d.ts.map +1 -0
- package/dist/components/hover-card/index.d.ts +11 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/theme.d.ts +4 -0
- package/dist/components/hover-card/theme.d.ts.map +1 -0
- package/dist/components/hover-card/types.d.ts +15 -0
- package/dist/components/hover-card/types.d.ts.map +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/modal/Modal.vue.d.ts +63 -0
- package/dist/components/modal/Modal.vue.d.ts.map +1 -0
- package/dist/components/modal/ModalClose.vue.d.ts +116 -0
- package/dist/components/modal/ModalClose.vue.d.ts.map +1 -0
- package/dist/components/modal/ModalContent.vue.d.ts +81 -0
- package/dist/components/modal/ModalContent.vue.d.ts.map +1 -0
- package/dist/components/modal/ModalDescription.vue.d.ts +47 -0
- package/dist/components/modal/ModalDescription.vue.d.ts.map +1 -0
- package/dist/components/modal/ModalTitle.vue.d.ts +47 -0
- package/dist/components/modal/ModalTitle.vue.d.ts.map +1 -0
- package/dist/components/modal/ModalTrigger.vue.d.ts +79 -0
- package/dist/components/modal/ModalTrigger.vue.d.ts.map +1 -0
- package/dist/components/modal/index.d.ts +16 -0
- package/dist/components/modal/index.d.ts.map +1 -0
- package/dist/components/modal/theme.d.ts +13 -0
- package/dist/components/modal/theme.d.ts.map +1 -0
- package/dist/components/modal/types.d.ts +38 -0
- package/dist/components/modal/types.d.ts.map +1 -0
- package/dist/components/modal/use-modal.d.ts +54 -0
- package/dist/components/modal/use-modal.d.ts.map +1 -0
- package/dist/components/popover/Popover.vue.d.ts +63 -0
- package/dist/components/popover/Popover.vue.d.ts.map +1 -0
- package/dist/components/popover/PopoverArrow.vue.d.ts +79 -0
- package/dist/components/popover/PopoverArrow.vue.d.ts.map +1 -0
- package/dist/components/popover/PopoverClose.vue.d.ts +116 -0
- package/dist/components/popover/PopoverClose.vue.d.ts.map +1 -0
- package/dist/components/popover/PopoverContent.vue.d.ts +143 -0
- package/dist/components/popover/PopoverContent.vue.d.ts.map +1 -0
- package/dist/components/popover/PopoverTrigger.vue.d.ts +79 -0
- package/dist/components/popover/PopoverTrigger.vue.d.ts.map +1 -0
- package/dist/components/popover/index.d.ts +13 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/theme.d.ts +4 -0
- package/dist/components/popover/theme.d.ts.map +1 -0
- package/dist/components/popover/types.d.ts +25 -0
- package/dist/components/popover/types.d.ts.map +1 -0
- package/dist/components/presence/Presence.vue.d.ts +39 -0
- package/dist/components/presence/Presence.vue.d.ts.map +1 -0
- package/dist/components/presence/index.d.ts +3 -0
- package/dist/components/presence/index.d.ts.map +1 -0
- package/dist/components/presence/types.d.ts +20 -0
- package/dist/components/presence/types.d.ts.map +1 -0
- package/dist/components/toast/Toast.vue.d.ts +225 -0
- package/dist/components/toast/Toast.vue.d.ts.map +1 -0
- package/dist/components/toast/ToastAction.vue.d.ts +99 -0
- package/dist/components/toast/ToastAction.vue.d.ts.map +1 -0
- package/dist/components/toast/ToastClose.vue.d.ts +116 -0
- package/dist/components/toast/ToastClose.vue.d.ts.map +1 -0
- package/dist/components/toast/ToastDescription.vue.d.ts +90 -0
- package/dist/components/toast/ToastDescription.vue.d.ts.map +1 -0
- package/dist/components/toast/ToastProvider.vue.d.ts +85 -0
- package/dist/components/toast/ToastProvider.vue.d.ts.map +1 -0
- package/dist/components/toast/ToastTitle.vue.d.ts +90 -0
- package/dist/components/toast/ToastTitle.vue.d.ts.map +1 -0
- package/dist/components/toast/Toaster.vue.d.ts +135 -0
- package/dist/components/toast/Toaster.vue.d.ts.map +1 -0
- package/dist/components/toast/index.d.ts +18 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/theme.d.ts +8 -0
- package/dist/components/toast/theme.d.ts.map +1 -0
- package/dist/components/toast/types.d.ts +148 -0
- package/dist/components/toast/types.d.ts.map +1 -0
- package/dist/components/toast/use-toast.d.ts +41 -0
- package/dist/components/toast/use-toast.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts +95 -0
- package/dist/components/tooltip/Tooltip.vue.d.ts.map +1 -0
- package/dist/components/tooltip/TooltipArrow.vue.d.ts +79 -0
- package/dist/components/tooltip/TooltipArrow.vue.d.ts.map +1 -0
- package/dist/components/tooltip/TooltipContent.vue.d.ts +143 -0
- package/dist/components/tooltip/TooltipContent.vue.d.ts.map +1 -0
- package/dist/components/tooltip/TooltipProvider.vue.d.ts +99 -0
- package/dist/components/tooltip/TooltipProvider.vue.d.ts.map +1 -0
- package/dist/components/tooltip/TooltipTrigger.vue.d.ts +79 -0
- package/dist/components/tooltip/TooltipTrigger.vue.d.ts.map +1 -0
- package/dist/components/tooltip/index.d.ts +13 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/theme.d.ts +4 -0
- package/dist/components/tooltip/theme.d.ts.map +1 -0
- package/dist/components/tooltip/types.d.ts +15 -0
- package/dist/components/tooltip/types.d.ts.map +1 -0
- package/dist/config.d.ts +25 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +2620 -0
- package/dist/index.mjs.map +1 -0
- package/dist/vue.d.ts +119 -0
- package/dist/vue.d.ts.map +1 -0
- package/package.json +65 -0
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,2620 @@
|
|
|
1
|
+
import { installConfigManager, installDefaultsManager, installThemeManager, themableProps, useComponentTheme, useForwardProps, useForwardPropsEmits, useThemeProps } from "@vuecs/core";
|
|
2
|
+
import { Fragment, computed, defineComponent, h, mergeProps, readonly, ref, shallowRef } from "vue";
|
|
3
|
+
import { ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuRoot, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogRoot, DialogTitle, DialogTrigger, DropdownMenuArrow, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, HoverCardArrow, HoverCardContent, HoverCardPortal, HoverCardRoot, HoverCardTrigger, PopoverArrow, PopoverClose, PopoverContent, PopoverPortal, PopoverRoot, PopoverTrigger, Presence, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastRoot, ToastTitle, ToastViewport, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger } from "reka-ui";
|
|
4
|
+
//#region src/config.ts
|
|
5
|
+
/**
|
|
6
|
+
* Register overlay-specific defaults onto a `ConfigManager` instance.
|
|
7
|
+
* Called from `@vuecs/overlays`'s `install(app)` after
|
|
8
|
+
* `installConfigManager`. Consumer-supplied config wins; this only fills
|
|
9
|
+
* in keys the consumer didn't pass.
|
|
10
|
+
*/
|
|
11
|
+
function registerOverlayConfigDefaults(manager) {
|
|
12
|
+
manager.withDefaults({ scrollLockTarget: "body" });
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/context-menu/ContextMenu.vue
|
|
16
|
+
var ContextMenu_default = defineComponent({
|
|
17
|
+
name: "VCContextMenu",
|
|
18
|
+
inheritAttrs: false,
|
|
19
|
+
props: {
|
|
20
|
+
/** Modal mode — locks focus inside the menu and blocks outside interaction. */
|
|
21
|
+
modal: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: true
|
|
24
|
+
},
|
|
25
|
+
/** Delay (ms) from press-down until the menu opens (touch / press-and-hold). */
|
|
26
|
+
pressOpenDelay: {
|
|
27
|
+
type: Number,
|
|
28
|
+
default: 700
|
|
29
|
+
},
|
|
30
|
+
/** Reading direction for the menu content. Falls through to `<VCConfigProvider>` / browser default when undefined. */
|
|
31
|
+
dir: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: void 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:open"],
|
|
37
|
+
setup(props, { slots, emit }) {
|
|
38
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
39
|
+
return () => h(ContextMenuRoot, forwarded.value, { default: () => slots.default?.() });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
//#endregion
|
|
43
|
+
//#region src/components/context-menu/theme.ts
|
|
44
|
+
const contextMenuThemeDefaults = { classes: {
|
|
45
|
+
content: "vc-context-menu-content",
|
|
46
|
+
trigger: "vc-context-menu-trigger",
|
|
47
|
+
item: "vc-context-menu-item",
|
|
48
|
+
checkboxItem: "vc-context-menu-checkbox-item",
|
|
49
|
+
radioItem: "vc-context-menu-radio-item",
|
|
50
|
+
radioGroup: "vc-context-menu-radio-group",
|
|
51
|
+
itemIndicator: "vc-context-menu-item-indicator",
|
|
52
|
+
label: "vc-context-menu-label",
|
|
53
|
+
separator: "vc-context-menu-separator",
|
|
54
|
+
group: "vc-context-menu-group",
|
|
55
|
+
subTrigger: "vc-context-menu-sub-trigger",
|
|
56
|
+
subContent: "vc-context-menu-sub-content"
|
|
57
|
+
} };
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/components/context-menu/ContextMenuTrigger.vue
|
|
60
|
+
var ContextMenuTrigger_default = defineComponent({
|
|
61
|
+
name: "VCContextMenuTrigger",
|
|
62
|
+
props: {
|
|
63
|
+
/** HTML tag (or component) to render as. Reka default: `'span'`. */
|
|
64
|
+
as: {
|
|
65
|
+
type: String,
|
|
66
|
+
default: "span"
|
|
67
|
+
},
|
|
68
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
69
|
+
asChild: {
|
|
70
|
+
type: Boolean,
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
/** When true, the trigger does not open the menu on right-click / press. */
|
|
74
|
+
disabled: {
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
77
|
+
},
|
|
78
|
+
/** Per-instance theme override — flat slot key map. */
|
|
79
|
+
themeClass: {
|
|
80
|
+
type: Object,
|
|
81
|
+
default: void 0
|
|
82
|
+
},
|
|
83
|
+
/** Per-instance variant values. */
|
|
84
|
+
themeVariant: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: void 0
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
setup(props, { slots }) {
|
|
90
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
91
|
+
return () => h(ContextMenuTrigger, {
|
|
92
|
+
as: props.as,
|
|
93
|
+
asChild: props.asChild,
|
|
94
|
+
disabled: props.disabled,
|
|
95
|
+
class: theme.value.trigger || void 0
|
|
96
|
+
}, { default: () => slots.default?.() });
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/components/context-menu/ContextMenuContent.vue
|
|
101
|
+
var ContextMenuContent_default = defineComponent({
|
|
102
|
+
name: "VCContextMenuContent",
|
|
103
|
+
inheritAttrs: false,
|
|
104
|
+
props: {
|
|
105
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
106
|
+
inline: {
|
|
107
|
+
type: Boolean,
|
|
108
|
+
default: false
|
|
109
|
+
},
|
|
110
|
+
/** Loop arrow-key focus from last item back to first. Vuecs convention: `true` (Reka default: `false`). */
|
|
111
|
+
loop: {
|
|
112
|
+
type: Boolean,
|
|
113
|
+
default: true
|
|
114
|
+
},
|
|
115
|
+
/** Offset in pixels along the alignment axis. */
|
|
116
|
+
alignOffset: {
|
|
117
|
+
type: Number,
|
|
118
|
+
default: 0
|
|
119
|
+
},
|
|
120
|
+
/** Flip / shift the menu to stay inside the viewport. */
|
|
121
|
+
avoidCollisions: {
|
|
122
|
+
type: Boolean,
|
|
123
|
+
default: true
|
|
124
|
+
},
|
|
125
|
+
/** Per-instance theme override — flat slot key map. */
|
|
126
|
+
themeClass: {
|
|
127
|
+
type: Object,
|
|
128
|
+
default: void 0
|
|
129
|
+
},
|
|
130
|
+
/** Per-instance variant values. */
|
|
131
|
+
themeVariant: {
|
|
132
|
+
type: Object,
|
|
133
|
+
default: void 0
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
setup(props, { slots, attrs }) {
|
|
137
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
138
|
+
const renderContent = () => h(ContextMenuContent, mergeProps(attrs, {
|
|
139
|
+
loop: props.loop,
|
|
140
|
+
alignOffset: props.alignOffset,
|
|
141
|
+
avoidCollisions: props.avoidCollisions,
|
|
142
|
+
class: theme.value.content || void 0
|
|
143
|
+
}), { default: () => slots.default?.() });
|
|
144
|
+
return () => {
|
|
145
|
+
if (props.inline) return renderContent();
|
|
146
|
+
return h(ContextMenuPortal, null, { default: () => renderContent() });
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
//#endregion
|
|
151
|
+
//#region src/components/context-menu/ContextMenuItem.vue
|
|
152
|
+
var ContextMenuItem_default = defineComponent({
|
|
153
|
+
name: "VCContextMenuItem",
|
|
154
|
+
inheritAttrs: false,
|
|
155
|
+
props: {
|
|
156
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
157
|
+
as: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: "div"
|
|
160
|
+
},
|
|
161
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
162
|
+
asChild: {
|
|
163
|
+
type: Boolean,
|
|
164
|
+
default: false
|
|
165
|
+
},
|
|
166
|
+
/** When true, prevents user interaction with the item. */
|
|
167
|
+
disabled: {
|
|
168
|
+
type: Boolean,
|
|
169
|
+
default: false
|
|
170
|
+
},
|
|
171
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
172
|
+
textValue: {
|
|
173
|
+
type: String,
|
|
174
|
+
default: void 0
|
|
175
|
+
},
|
|
176
|
+
/** Per-instance theme override — flat slot key map. */
|
|
177
|
+
themeClass: {
|
|
178
|
+
type: Object,
|
|
179
|
+
default: void 0
|
|
180
|
+
},
|
|
181
|
+
/** Per-instance variant values. */
|
|
182
|
+
themeVariant: {
|
|
183
|
+
type: Object,
|
|
184
|
+
default: void 0
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
emits: ["select"],
|
|
188
|
+
setup(props, { slots, emit, attrs }) {
|
|
189
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
190
|
+
return () => h(ContextMenuItem, mergeProps(attrs, {
|
|
191
|
+
as: props.as,
|
|
192
|
+
asChild: props.asChild,
|
|
193
|
+
disabled: props.disabled,
|
|
194
|
+
textValue: props.textValue,
|
|
195
|
+
onSelect: (event) => emit("select", event),
|
|
196
|
+
class: theme.value.item || void 0
|
|
197
|
+
}), { default: () => slots.default?.() });
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/components/context-menu/ContextMenuCheckboxItem.vue
|
|
202
|
+
var ContextMenuCheckboxItem_default = defineComponent({
|
|
203
|
+
name: "VCContextMenuCheckboxItem",
|
|
204
|
+
inheritAttrs: false,
|
|
205
|
+
props: {
|
|
206
|
+
/** Checked state. Use `'indeterminate'` for tri-state. */
|
|
207
|
+
modelValue: {
|
|
208
|
+
type: [Boolean, String],
|
|
209
|
+
default: false
|
|
210
|
+
},
|
|
211
|
+
/** When true, prevents user interaction with the item. */
|
|
212
|
+
disabled: {
|
|
213
|
+
type: Boolean,
|
|
214
|
+
default: false
|
|
215
|
+
},
|
|
216
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
217
|
+
textValue: {
|
|
218
|
+
type: String,
|
|
219
|
+
default: void 0
|
|
220
|
+
},
|
|
221
|
+
/** Per-instance theme override — flat slot key map. */
|
|
222
|
+
themeClass: {
|
|
223
|
+
type: Object,
|
|
224
|
+
default: void 0
|
|
225
|
+
},
|
|
226
|
+
/** Per-instance variant values. */
|
|
227
|
+
themeVariant: {
|
|
228
|
+
type: Object,
|
|
229
|
+
default: void 0
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
emits: ["update:modelValue", "select"],
|
|
233
|
+
setup(props, { slots, emit, attrs }) {
|
|
234
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
235
|
+
return () => h(ContextMenuCheckboxItem, mergeProps(attrs, {
|
|
236
|
+
modelValue: props.modelValue,
|
|
237
|
+
disabled: props.disabled,
|
|
238
|
+
textValue: props.textValue,
|
|
239
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
240
|
+
onSelect: (event) => emit("select", event),
|
|
241
|
+
class: theme.value.checkboxItem || void 0
|
|
242
|
+
}), { default: () => slots.default?.() });
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
//#endregion
|
|
246
|
+
//#region src/components/context-menu/ContextMenuRadioGroup.vue
|
|
247
|
+
var ContextMenuRadioGroup_default = defineComponent({
|
|
248
|
+
name: "VCContextMenuRadioGroup",
|
|
249
|
+
inheritAttrs: false,
|
|
250
|
+
props: {
|
|
251
|
+
/** Selected value within the group. Bind via `v-model`. */
|
|
252
|
+
modelValue: {
|
|
253
|
+
type: String,
|
|
254
|
+
default: ""
|
|
255
|
+
},
|
|
256
|
+
/** Per-instance theme override — flat slot key map. */
|
|
257
|
+
themeClass: {
|
|
258
|
+
type: Object,
|
|
259
|
+
default: void 0
|
|
260
|
+
},
|
|
261
|
+
/** Per-instance variant values. */
|
|
262
|
+
themeVariant: {
|
|
263
|
+
type: Object,
|
|
264
|
+
default: void 0
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
emits: ["update:modelValue"],
|
|
268
|
+
setup(props, { slots, emit, attrs }) {
|
|
269
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
270
|
+
return () => h(ContextMenuRadioGroup, mergeProps(attrs, {
|
|
271
|
+
modelValue: props.modelValue,
|
|
272
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
273
|
+
class: theme.value.radioGroup || void 0
|
|
274
|
+
}), { default: () => slots.default?.() });
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
//#endregion
|
|
278
|
+
//#region src/components/context-menu/ContextMenuRadioItem.vue
|
|
279
|
+
var ContextMenuRadioItem_default = defineComponent({
|
|
280
|
+
name: "VCContextMenuRadioItem",
|
|
281
|
+
inheritAttrs: false,
|
|
282
|
+
props: {
|
|
283
|
+
/** Identifier matched against the group's `modelValue`. */
|
|
284
|
+
value: {
|
|
285
|
+
type: String,
|
|
286
|
+
required: true
|
|
287
|
+
},
|
|
288
|
+
/** When true, prevents user interaction with the item. */
|
|
289
|
+
disabled: {
|
|
290
|
+
type: Boolean,
|
|
291
|
+
default: false
|
|
292
|
+
},
|
|
293
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
294
|
+
textValue: {
|
|
295
|
+
type: String,
|
|
296
|
+
default: void 0
|
|
297
|
+
},
|
|
298
|
+
/** Per-instance theme override — flat slot key map. */
|
|
299
|
+
themeClass: {
|
|
300
|
+
type: Object,
|
|
301
|
+
default: void 0
|
|
302
|
+
},
|
|
303
|
+
/** Per-instance variant values. */
|
|
304
|
+
themeVariant: {
|
|
305
|
+
type: Object,
|
|
306
|
+
default: void 0
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
emits: ["select"],
|
|
310
|
+
setup(props, { slots, emit, attrs }) {
|
|
311
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
312
|
+
return () => h(ContextMenuRadioItem, {
|
|
313
|
+
...mergeProps(attrs, {
|
|
314
|
+
disabled: props.disabled,
|
|
315
|
+
textValue: props.textValue,
|
|
316
|
+
onSelect: (event) => emit("select", event),
|
|
317
|
+
class: theme.value.radioItem || void 0
|
|
318
|
+
}),
|
|
319
|
+
value: props.value
|
|
320
|
+
}, { default: () => slots.default?.() });
|
|
321
|
+
}
|
|
322
|
+
});
|
|
323
|
+
//#endregion
|
|
324
|
+
//#region src/components/context-menu/ContextMenuItemIndicator.vue
|
|
325
|
+
var ContextMenuItemIndicator_default = defineComponent({
|
|
326
|
+
name: "VCContextMenuItemIndicator",
|
|
327
|
+
props: {
|
|
328
|
+
/** Force the indicator to mount even when its parent is unchecked (useful for animated transitions). */
|
|
329
|
+
forceMount: {
|
|
330
|
+
type: Boolean,
|
|
331
|
+
default: false
|
|
332
|
+
},
|
|
333
|
+
/** Per-instance theme override — flat slot key map. */
|
|
334
|
+
themeClass: {
|
|
335
|
+
type: Object,
|
|
336
|
+
default: void 0
|
|
337
|
+
},
|
|
338
|
+
/** Per-instance variant values. */
|
|
339
|
+
themeVariant: {
|
|
340
|
+
type: Object,
|
|
341
|
+
default: void 0
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
setup(props, { slots }) {
|
|
345
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
346
|
+
return () => h(ContextMenuItemIndicator, {
|
|
347
|
+
forceMount: props.forceMount,
|
|
348
|
+
class: theme.value.itemIndicator || void 0
|
|
349
|
+
}, { default: () => slots.default?.() ?? "✓" });
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region src/components/context-menu/ContextMenuLabel.vue
|
|
354
|
+
var ContextMenuLabel_default = defineComponent({
|
|
355
|
+
name: "VCContextMenuLabel",
|
|
356
|
+
props: {
|
|
357
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
358
|
+
as: {
|
|
359
|
+
type: String,
|
|
360
|
+
default: "div"
|
|
361
|
+
},
|
|
362
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
363
|
+
asChild: {
|
|
364
|
+
type: Boolean,
|
|
365
|
+
default: false
|
|
366
|
+
},
|
|
367
|
+
/** Per-instance theme override — flat slot key map. */
|
|
368
|
+
themeClass: {
|
|
369
|
+
type: Object,
|
|
370
|
+
default: void 0
|
|
371
|
+
},
|
|
372
|
+
/** Per-instance variant values. */
|
|
373
|
+
themeVariant: {
|
|
374
|
+
type: Object,
|
|
375
|
+
default: void 0
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
setup(props, { slots }) {
|
|
379
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
380
|
+
return () => h(ContextMenuLabel, {
|
|
381
|
+
as: props.as,
|
|
382
|
+
asChild: props.asChild,
|
|
383
|
+
class: theme.value.label || void 0
|
|
384
|
+
}, { default: () => slots.default?.() });
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/components/context-menu/ContextMenuSeparator.vue
|
|
389
|
+
var ContextMenuSeparator_default = defineComponent({
|
|
390
|
+
name: "VCContextMenuSeparator",
|
|
391
|
+
props: {
|
|
392
|
+
/** Per-instance theme override — flat slot key map. */
|
|
393
|
+
themeClass: {
|
|
394
|
+
type: Object,
|
|
395
|
+
default: void 0
|
|
396
|
+
},
|
|
397
|
+
/** Per-instance variant values. */
|
|
398
|
+
themeVariant: {
|
|
399
|
+
type: Object,
|
|
400
|
+
default: void 0
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
setup(props) {
|
|
404
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
405
|
+
return () => h(ContextMenuSeparator, { class: theme.value.separator || void 0 });
|
|
406
|
+
}
|
|
407
|
+
});
|
|
408
|
+
//#endregion
|
|
409
|
+
//#region src/components/context-menu/ContextMenuGroup.vue
|
|
410
|
+
var ContextMenuGroup_default = defineComponent({
|
|
411
|
+
name: "VCContextMenuGroup",
|
|
412
|
+
props: {
|
|
413
|
+
/** Per-instance theme override — flat slot key map. */
|
|
414
|
+
themeClass: {
|
|
415
|
+
type: Object,
|
|
416
|
+
default: void 0
|
|
417
|
+
},
|
|
418
|
+
/** Per-instance variant values. */
|
|
419
|
+
themeVariant: {
|
|
420
|
+
type: Object,
|
|
421
|
+
default: void 0
|
|
422
|
+
}
|
|
423
|
+
},
|
|
424
|
+
setup(props, { slots }) {
|
|
425
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
426
|
+
return () => h(ContextMenuGroup, { class: theme.value.group || void 0 }, { default: () => slots.default?.() });
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
//#endregion
|
|
430
|
+
//#region src/components/context-menu/ContextMenuSub.vue
|
|
431
|
+
var ContextMenuSub_default = defineComponent({
|
|
432
|
+
name: "VCContextMenuSub",
|
|
433
|
+
inheritAttrs: false,
|
|
434
|
+
props: {
|
|
435
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
436
|
+
open: {
|
|
437
|
+
type: Boolean,
|
|
438
|
+
default: void 0
|
|
439
|
+
},
|
|
440
|
+
/** Initial open state for uncontrolled usage. */
|
|
441
|
+
defaultOpen: {
|
|
442
|
+
type: Boolean,
|
|
443
|
+
default: false
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
emits: ["update:open"],
|
|
447
|
+
setup(props, { slots, emit }) {
|
|
448
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
449
|
+
return () => h(ContextMenuSub, forwarded.value, { default: () => slots.default?.() });
|
|
450
|
+
}
|
|
451
|
+
});
|
|
452
|
+
//#endregion
|
|
453
|
+
//#region src/components/context-menu/ContextMenuSubTrigger.vue
|
|
454
|
+
var ContextMenuSubTrigger_default = defineComponent({
|
|
455
|
+
name: "VCContextMenuSubTrigger",
|
|
456
|
+
inheritAttrs: false,
|
|
457
|
+
props: {
|
|
458
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
459
|
+
as: {
|
|
460
|
+
type: String,
|
|
461
|
+
default: "div"
|
|
462
|
+
},
|
|
463
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
464
|
+
asChild: {
|
|
465
|
+
type: Boolean,
|
|
466
|
+
default: false
|
|
467
|
+
},
|
|
468
|
+
/** When true, prevents user interaction with the sub-trigger. */
|
|
469
|
+
disabled: {
|
|
470
|
+
type: Boolean,
|
|
471
|
+
default: false
|
|
472
|
+
},
|
|
473
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
474
|
+
textValue: {
|
|
475
|
+
type: String,
|
|
476
|
+
default: void 0
|
|
477
|
+
},
|
|
478
|
+
/** Per-instance theme override — flat slot key map. */
|
|
479
|
+
themeClass: {
|
|
480
|
+
type: Object,
|
|
481
|
+
default: void 0
|
|
482
|
+
},
|
|
483
|
+
/** Per-instance variant values. */
|
|
484
|
+
themeVariant: {
|
|
485
|
+
type: Object,
|
|
486
|
+
default: void 0
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
setup(props, { slots, attrs }) {
|
|
490
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
491
|
+
return () => h(ContextMenuSubTrigger, mergeProps(attrs, {
|
|
492
|
+
as: props.as,
|
|
493
|
+
asChild: props.asChild,
|
|
494
|
+
disabled: props.disabled,
|
|
495
|
+
textValue: props.textValue,
|
|
496
|
+
class: theme.value.subTrigger || void 0
|
|
497
|
+
}), { default: () => slots.default?.() });
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
//#endregion
|
|
501
|
+
//#region src/components/context-menu/ContextMenuSubContent.vue
|
|
502
|
+
var ContextMenuSubContent_default = defineComponent({
|
|
503
|
+
name: "VCContextMenuSubContent",
|
|
504
|
+
inheritAttrs: false,
|
|
505
|
+
props: {
|
|
506
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
507
|
+
inline: {
|
|
508
|
+
type: Boolean,
|
|
509
|
+
default: false
|
|
510
|
+
},
|
|
511
|
+
/** Distance in pixels between sub-trigger and sub-menu. */
|
|
512
|
+
sideOffset: {
|
|
513
|
+
type: Number,
|
|
514
|
+
default: 0
|
|
515
|
+
},
|
|
516
|
+
/** Offset in pixels along the alignment axis. */
|
|
517
|
+
alignOffset: {
|
|
518
|
+
type: Number,
|
|
519
|
+
default: 0
|
|
520
|
+
},
|
|
521
|
+
/** Flip / shift the sub-menu to stay inside the viewport. */
|
|
522
|
+
avoidCollisions: {
|
|
523
|
+
type: Boolean,
|
|
524
|
+
default: true
|
|
525
|
+
},
|
|
526
|
+
/** Loop arrow-key focus from last item back to first. Vuecs convention: `true` (Reka default: `false`). */
|
|
527
|
+
loop: {
|
|
528
|
+
type: Boolean,
|
|
529
|
+
default: true
|
|
530
|
+
},
|
|
531
|
+
/** Per-instance theme override — flat slot key map. */
|
|
532
|
+
themeClass: {
|
|
533
|
+
type: Object,
|
|
534
|
+
default: void 0
|
|
535
|
+
},
|
|
536
|
+
/** Per-instance variant values. */
|
|
537
|
+
themeVariant: {
|
|
538
|
+
type: Object,
|
|
539
|
+
default: void 0
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
setup(props, { slots, attrs }) {
|
|
543
|
+
const theme = useComponentTheme("contextMenu", props, contextMenuThemeDefaults);
|
|
544
|
+
const renderContent = () => h(ContextMenuSubContent, mergeProps(attrs, {
|
|
545
|
+
sideOffset: props.sideOffset,
|
|
546
|
+
alignOffset: props.alignOffset,
|
|
547
|
+
avoidCollisions: props.avoidCollisions,
|
|
548
|
+
loop: props.loop,
|
|
549
|
+
class: theme.value.subContent || void 0
|
|
550
|
+
}), { default: () => slots.default?.() });
|
|
551
|
+
return () => {
|
|
552
|
+
if (props.inline) return renderContent();
|
|
553
|
+
return h(ContextMenuPortal, null, { default: () => renderContent() });
|
|
554
|
+
};
|
|
555
|
+
}
|
|
556
|
+
});
|
|
557
|
+
//#endregion
|
|
558
|
+
//#region src/components/dropdown-menu/DropdownMenu.vue
|
|
559
|
+
var DropdownMenu_default = defineComponent({
|
|
560
|
+
name: "VCDropdownMenu",
|
|
561
|
+
inheritAttrs: false,
|
|
562
|
+
props: {
|
|
563
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
564
|
+
open: {
|
|
565
|
+
type: Boolean,
|
|
566
|
+
default: void 0
|
|
567
|
+
},
|
|
568
|
+
/** Initial open state for uncontrolled usage. */
|
|
569
|
+
defaultOpen: {
|
|
570
|
+
type: Boolean,
|
|
571
|
+
default: false
|
|
572
|
+
},
|
|
573
|
+
/** Modal mode — locks focus inside the menu and blocks outside interaction. */
|
|
574
|
+
modal: {
|
|
575
|
+
type: Boolean,
|
|
576
|
+
default: true
|
|
577
|
+
},
|
|
578
|
+
/** Reading direction for the menu content. Falls through to `<VCConfigProvider>` / browser default when undefined. */
|
|
579
|
+
dir: {
|
|
580
|
+
type: String,
|
|
581
|
+
default: void 0
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
emits: ["update:open"],
|
|
585
|
+
setup(props, { slots, emit }) {
|
|
586
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
587
|
+
return () => h(DropdownMenuRoot, forwarded.value, { default: () => slots.default?.() });
|
|
588
|
+
}
|
|
589
|
+
});
|
|
590
|
+
//#endregion
|
|
591
|
+
//#region src/components/dropdown-menu/theme.ts
|
|
592
|
+
const dropdownMenuThemeDefaults = { classes: {
|
|
593
|
+
content: "vc-dropdown-content",
|
|
594
|
+
trigger: "vc-dropdown-trigger",
|
|
595
|
+
item: "vc-dropdown-item",
|
|
596
|
+
checkboxItem: "vc-dropdown-checkbox-item",
|
|
597
|
+
radioItem: "vc-dropdown-radio-item",
|
|
598
|
+
radioGroup: "vc-dropdown-radio-group",
|
|
599
|
+
itemIndicator: "vc-dropdown-item-indicator",
|
|
600
|
+
label: "vc-dropdown-label",
|
|
601
|
+
separator: "vc-dropdown-separator",
|
|
602
|
+
group: "vc-dropdown-group",
|
|
603
|
+
subTrigger: "vc-dropdown-sub-trigger",
|
|
604
|
+
subContent: "vc-dropdown-sub-content",
|
|
605
|
+
arrow: "vc-dropdown-arrow"
|
|
606
|
+
} };
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region src/components/dropdown-menu/DropdownMenuTrigger.vue
|
|
609
|
+
var DropdownMenuTrigger_default = defineComponent({
|
|
610
|
+
name: "VCDropdownMenuTrigger",
|
|
611
|
+
props: {
|
|
612
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
613
|
+
as: {
|
|
614
|
+
type: String,
|
|
615
|
+
default: "button"
|
|
616
|
+
},
|
|
617
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
618
|
+
asChild: {
|
|
619
|
+
type: Boolean,
|
|
620
|
+
default: false
|
|
621
|
+
},
|
|
622
|
+
/** Per-instance theme override — flat slot key map. */
|
|
623
|
+
themeClass: {
|
|
624
|
+
type: Object,
|
|
625
|
+
default: void 0
|
|
626
|
+
},
|
|
627
|
+
/** Per-instance variant values. */
|
|
628
|
+
themeVariant: {
|
|
629
|
+
type: Object,
|
|
630
|
+
default: void 0
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
setup(props, { slots }) {
|
|
634
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
635
|
+
return () => h(DropdownMenuTrigger, {
|
|
636
|
+
as: props.as,
|
|
637
|
+
asChild: props.asChild,
|
|
638
|
+
class: theme.value.trigger || void 0
|
|
639
|
+
}, { default: () => slots.default?.() });
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
//#endregion
|
|
643
|
+
//#region src/components/dropdown-menu/DropdownMenuContent.vue
|
|
644
|
+
var DropdownMenuContent_default = defineComponent({
|
|
645
|
+
name: "VCDropdownMenuContent",
|
|
646
|
+
inheritAttrs: false,
|
|
647
|
+
props: {
|
|
648
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
649
|
+
inline: {
|
|
650
|
+
type: Boolean,
|
|
651
|
+
default: false
|
|
652
|
+
},
|
|
653
|
+
/** Preferred side relative to the trigger. */
|
|
654
|
+
side: {
|
|
655
|
+
type: String,
|
|
656
|
+
default: "bottom"
|
|
657
|
+
},
|
|
658
|
+
/** Distance in pixels between trigger and menu. Vuecs convention: 4 (Reka default: 0). */
|
|
659
|
+
sideOffset: {
|
|
660
|
+
type: Number,
|
|
661
|
+
default: 4
|
|
662
|
+
},
|
|
663
|
+
/** Alignment along the chosen side. Vuecs convention: `'start'` (Reka default: `'center'`) so menus left-align under their trigger. */
|
|
664
|
+
align: {
|
|
665
|
+
type: String,
|
|
666
|
+
default: "start"
|
|
667
|
+
},
|
|
668
|
+
/** Offset in pixels along the alignment axis. */
|
|
669
|
+
alignOffset: {
|
|
670
|
+
type: Number,
|
|
671
|
+
default: 0
|
|
672
|
+
},
|
|
673
|
+
/** Flip / shift the menu to stay inside the viewport. */
|
|
674
|
+
avoidCollisions: {
|
|
675
|
+
type: Boolean,
|
|
676
|
+
default: true
|
|
677
|
+
},
|
|
678
|
+
/** Loop arrow-key focus from last item back to first. Vuecs convention: `true` (Reka default: `false`). */
|
|
679
|
+
loop: {
|
|
680
|
+
type: Boolean,
|
|
681
|
+
default: true
|
|
682
|
+
},
|
|
683
|
+
/** Per-instance theme override — flat slot key map. */
|
|
684
|
+
themeClass: {
|
|
685
|
+
type: Object,
|
|
686
|
+
default: void 0
|
|
687
|
+
},
|
|
688
|
+
/** Per-instance variant values. */
|
|
689
|
+
themeVariant: {
|
|
690
|
+
type: Object,
|
|
691
|
+
default: void 0
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
setup(props, { slots, attrs }) {
|
|
695
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
696
|
+
const renderContent = () => h(DropdownMenuContent, mergeProps(attrs, {
|
|
697
|
+
side: props.side,
|
|
698
|
+
sideOffset: props.sideOffset,
|
|
699
|
+
align: props.align,
|
|
700
|
+
alignOffset: props.alignOffset,
|
|
701
|
+
avoidCollisions: props.avoidCollisions,
|
|
702
|
+
loop: props.loop,
|
|
703
|
+
class: theme.value.content || void 0
|
|
704
|
+
}), { default: () => slots.default?.() });
|
|
705
|
+
return () => {
|
|
706
|
+
if (props.inline) return renderContent();
|
|
707
|
+
return h(DropdownMenuPortal, null, { default: () => renderContent() });
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
//#endregion
|
|
712
|
+
//#region src/components/dropdown-menu/DropdownMenuItem.vue
|
|
713
|
+
var DropdownMenuItem_default = defineComponent({
|
|
714
|
+
name: "VCDropdownMenuItem",
|
|
715
|
+
inheritAttrs: false,
|
|
716
|
+
props: {
|
|
717
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
718
|
+
as: {
|
|
719
|
+
type: String,
|
|
720
|
+
default: "div"
|
|
721
|
+
},
|
|
722
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
723
|
+
asChild: {
|
|
724
|
+
type: Boolean,
|
|
725
|
+
default: false
|
|
726
|
+
},
|
|
727
|
+
/** When true, prevents user interaction with the item. */
|
|
728
|
+
disabled: {
|
|
729
|
+
type: Boolean,
|
|
730
|
+
default: false
|
|
731
|
+
},
|
|
732
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
733
|
+
textValue: {
|
|
734
|
+
type: String,
|
|
735
|
+
default: void 0
|
|
736
|
+
},
|
|
737
|
+
/** Per-instance theme override — flat slot key map. */
|
|
738
|
+
themeClass: {
|
|
739
|
+
type: Object,
|
|
740
|
+
default: void 0
|
|
741
|
+
},
|
|
742
|
+
/** Per-instance variant values. */
|
|
743
|
+
themeVariant: {
|
|
744
|
+
type: Object,
|
|
745
|
+
default: void 0
|
|
746
|
+
}
|
|
747
|
+
},
|
|
748
|
+
emits: ["select"],
|
|
749
|
+
setup(props, { slots, emit, attrs }) {
|
|
750
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
751
|
+
return () => h(DropdownMenuItem, mergeProps(attrs, {
|
|
752
|
+
as: props.as,
|
|
753
|
+
asChild: props.asChild,
|
|
754
|
+
disabled: props.disabled,
|
|
755
|
+
textValue: props.textValue,
|
|
756
|
+
onSelect: (event) => emit("select", event),
|
|
757
|
+
class: theme.value.item || void 0
|
|
758
|
+
}), { default: () => slots.default?.() });
|
|
759
|
+
}
|
|
760
|
+
});
|
|
761
|
+
//#endregion
|
|
762
|
+
//#region src/components/dropdown-menu/DropdownMenuCheckboxItem.vue
|
|
763
|
+
var DropdownMenuCheckboxItem_default = defineComponent({
|
|
764
|
+
name: "VCDropdownMenuCheckboxItem",
|
|
765
|
+
inheritAttrs: false,
|
|
766
|
+
props: {
|
|
767
|
+
/** Checked state. Use `'indeterminate'` for tri-state. */
|
|
768
|
+
modelValue: {
|
|
769
|
+
type: [Boolean, String],
|
|
770
|
+
default: false
|
|
771
|
+
},
|
|
772
|
+
/** When true, prevents user interaction with the item. */
|
|
773
|
+
disabled: {
|
|
774
|
+
type: Boolean,
|
|
775
|
+
default: false
|
|
776
|
+
},
|
|
777
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
778
|
+
textValue: {
|
|
779
|
+
type: String,
|
|
780
|
+
default: void 0
|
|
781
|
+
},
|
|
782
|
+
/** Per-instance theme override — flat slot key map. */
|
|
783
|
+
themeClass: {
|
|
784
|
+
type: Object,
|
|
785
|
+
default: void 0
|
|
786
|
+
},
|
|
787
|
+
/** Per-instance variant values. */
|
|
788
|
+
themeVariant: {
|
|
789
|
+
type: Object,
|
|
790
|
+
default: void 0
|
|
791
|
+
}
|
|
792
|
+
},
|
|
793
|
+
emits: ["update:modelValue", "select"],
|
|
794
|
+
setup(props, { slots, emit, attrs }) {
|
|
795
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
796
|
+
return () => h(DropdownMenuCheckboxItem, mergeProps(attrs, {
|
|
797
|
+
modelValue: props.modelValue,
|
|
798
|
+
disabled: props.disabled,
|
|
799
|
+
textValue: props.textValue,
|
|
800
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
801
|
+
onSelect: (event) => emit("select", event),
|
|
802
|
+
class: theme.value.checkboxItem || void 0
|
|
803
|
+
}), { default: () => slots.default?.() });
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
//#endregion
|
|
807
|
+
//#region src/components/dropdown-menu/DropdownMenuRadioGroup.vue
|
|
808
|
+
var DropdownMenuRadioGroup_default = defineComponent({
|
|
809
|
+
name: "VCDropdownMenuRadioGroup",
|
|
810
|
+
inheritAttrs: false,
|
|
811
|
+
props: {
|
|
812
|
+
/** Selected value within the group. Bind via `v-model`. */
|
|
813
|
+
modelValue: {
|
|
814
|
+
type: String,
|
|
815
|
+
default: ""
|
|
816
|
+
},
|
|
817
|
+
/** Per-instance theme override — flat slot key map. */
|
|
818
|
+
themeClass: {
|
|
819
|
+
type: Object,
|
|
820
|
+
default: void 0
|
|
821
|
+
},
|
|
822
|
+
/** Per-instance variant values. */
|
|
823
|
+
themeVariant: {
|
|
824
|
+
type: Object,
|
|
825
|
+
default: void 0
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
emits: ["update:modelValue"],
|
|
829
|
+
setup(props, { slots, emit, attrs }) {
|
|
830
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
831
|
+
return () => h(DropdownMenuRadioGroup, mergeProps(attrs, {
|
|
832
|
+
modelValue: props.modelValue,
|
|
833
|
+
"onUpdate:modelValue": (value) => emit("update:modelValue", value),
|
|
834
|
+
class: theme.value.radioGroup || void 0
|
|
835
|
+
}), { default: () => slots.default?.() });
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
//#endregion
|
|
839
|
+
//#region src/components/dropdown-menu/DropdownMenuRadioItem.vue
|
|
840
|
+
var DropdownMenuRadioItem_default = defineComponent({
|
|
841
|
+
name: "VCDropdownMenuRadioItem",
|
|
842
|
+
inheritAttrs: false,
|
|
843
|
+
props: {
|
|
844
|
+
/** Identifier matched against the group's `modelValue`. */
|
|
845
|
+
value: {
|
|
846
|
+
type: String,
|
|
847
|
+
required: true
|
|
848
|
+
},
|
|
849
|
+
/** When true, prevents user interaction with the item. */
|
|
850
|
+
disabled: {
|
|
851
|
+
type: Boolean,
|
|
852
|
+
default: false
|
|
853
|
+
},
|
|
854
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
855
|
+
textValue: {
|
|
856
|
+
type: String,
|
|
857
|
+
default: void 0
|
|
858
|
+
},
|
|
859
|
+
/** Per-instance theme override — flat slot key map. */
|
|
860
|
+
themeClass: {
|
|
861
|
+
type: Object,
|
|
862
|
+
default: void 0
|
|
863
|
+
},
|
|
864
|
+
/** Per-instance variant values. */
|
|
865
|
+
themeVariant: {
|
|
866
|
+
type: Object,
|
|
867
|
+
default: void 0
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
emits: ["select"],
|
|
871
|
+
setup(props, { slots, emit, attrs }) {
|
|
872
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
873
|
+
return () => h(DropdownMenuRadioItem, {
|
|
874
|
+
...mergeProps(attrs, {
|
|
875
|
+
disabled: props.disabled,
|
|
876
|
+
textValue: props.textValue,
|
|
877
|
+
onSelect: (event) => emit("select", event),
|
|
878
|
+
class: theme.value.radioItem || void 0
|
|
879
|
+
}),
|
|
880
|
+
value: props.value
|
|
881
|
+
}, { default: () => slots.default?.() });
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
//#endregion
|
|
885
|
+
//#region src/components/dropdown-menu/DropdownMenuItemIndicator.vue
|
|
886
|
+
var DropdownMenuItemIndicator_default = defineComponent({
|
|
887
|
+
name: "VCDropdownMenuItemIndicator",
|
|
888
|
+
props: {
|
|
889
|
+
/** Force the indicator to mount even when its parent is unchecked (useful for animated transitions). */
|
|
890
|
+
forceMount: {
|
|
891
|
+
type: Boolean,
|
|
892
|
+
default: false
|
|
893
|
+
},
|
|
894
|
+
/** Per-instance theme override — flat slot key map. */
|
|
895
|
+
themeClass: {
|
|
896
|
+
type: Object,
|
|
897
|
+
default: void 0
|
|
898
|
+
},
|
|
899
|
+
/** Per-instance variant values. */
|
|
900
|
+
themeVariant: {
|
|
901
|
+
type: Object,
|
|
902
|
+
default: void 0
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
setup(props, { slots }) {
|
|
906
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
907
|
+
return () => h(DropdownMenuItemIndicator, {
|
|
908
|
+
forceMount: props.forceMount,
|
|
909
|
+
class: theme.value.itemIndicator || void 0
|
|
910
|
+
}, { default: () => slots.default?.() ?? "✓" });
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region src/components/dropdown-menu/DropdownMenuLabel.vue
|
|
915
|
+
var DropdownMenuLabel_default = defineComponent({
|
|
916
|
+
name: "VCDropdownMenuLabel",
|
|
917
|
+
props: {
|
|
918
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
919
|
+
as: {
|
|
920
|
+
type: String,
|
|
921
|
+
default: "div"
|
|
922
|
+
},
|
|
923
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
924
|
+
asChild: {
|
|
925
|
+
type: Boolean,
|
|
926
|
+
default: false
|
|
927
|
+
},
|
|
928
|
+
/** Per-instance theme override — flat slot key map. */
|
|
929
|
+
themeClass: {
|
|
930
|
+
type: Object,
|
|
931
|
+
default: void 0
|
|
932
|
+
},
|
|
933
|
+
/** Per-instance variant values. */
|
|
934
|
+
themeVariant: {
|
|
935
|
+
type: Object,
|
|
936
|
+
default: void 0
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
setup(props, { slots }) {
|
|
940
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
941
|
+
return () => h(DropdownMenuLabel, {
|
|
942
|
+
as: props.as,
|
|
943
|
+
asChild: props.asChild,
|
|
944
|
+
class: theme.value.label || void 0
|
|
945
|
+
}, { default: () => slots.default?.() });
|
|
946
|
+
}
|
|
947
|
+
});
|
|
948
|
+
//#endregion
|
|
949
|
+
//#region src/components/dropdown-menu/DropdownMenuSeparator.vue
|
|
950
|
+
var DropdownMenuSeparator_default = defineComponent({
|
|
951
|
+
name: "VCDropdownMenuSeparator",
|
|
952
|
+
props: {
|
|
953
|
+
/** Per-instance theme override — flat slot key map. */
|
|
954
|
+
themeClass: {
|
|
955
|
+
type: Object,
|
|
956
|
+
default: void 0
|
|
957
|
+
},
|
|
958
|
+
/** Per-instance variant values. */
|
|
959
|
+
themeVariant: {
|
|
960
|
+
type: Object,
|
|
961
|
+
default: void 0
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
setup(props) {
|
|
965
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
966
|
+
return () => h(DropdownMenuSeparator, { class: theme.value.separator || void 0 });
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
//#endregion
|
|
970
|
+
//#region src/components/dropdown-menu/DropdownMenuGroup.vue
|
|
971
|
+
var DropdownMenuGroup_default = defineComponent({
|
|
972
|
+
name: "VCDropdownMenuGroup",
|
|
973
|
+
props: {
|
|
974
|
+
/** Per-instance theme override — flat slot key map. */
|
|
975
|
+
themeClass: {
|
|
976
|
+
type: Object,
|
|
977
|
+
default: void 0
|
|
978
|
+
},
|
|
979
|
+
/** Per-instance variant values. */
|
|
980
|
+
themeVariant: {
|
|
981
|
+
type: Object,
|
|
982
|
+
default: void 0
|
|
983
|
+
}
|
|
984
|
+
},
|
|
985
|
+
setup(props, { slots }) {
|
|
986
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
987
|
+
return () => h(DropdownMenuGroup, { class: theme.value.group || void 0 }, { default: () => slots.default?.() });
|
|
988
|
+
}
|
|
989
|
+
});
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region src/components/dropdown-menu/DropdownMenuSub.vue
|
|
992
|
+
var DropdownMenuSub_default = defineComponent({
|
|
993
|
+
name: "VCDropdownMenuSub",
|
|
994
|
+
inheritAttrs: false,
|
|
995
|
+
props: {
|
|
996
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
997
|
+
open: {
|
|
998
|
+
type: Boolean,
|
|
999
|
+
default: void 0
|
|
1000
|
+
},
|
|
1001
|
+
/** Initial open state for uncontrolled usage. */
|
|
1002
|
+
defaultOpen: {
|
|
1003
|
+
type: Boolean,
|
|
1004
|
+
default: false
|
|
1005
|
+
}
|
|
1006
|
+
},
|
|
1007
|
+
emits: ["update:open"],
|
|
1008
|
+
setup(props, { slots, emit }) {
|
|
1009
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
1010
|
+
return () => h(DropdownMenuSub, forwarded.value, { default: () => slots.default?.() });
|
|
1011
|
+
}
|
|
1012
|
+
});
|
|
1013
|
+
//#endregion
|
|
1014
|
+
//#region src/components/dropdown-menu/DropdownMenuSubTrigger.vue
|
|
1015
|
+
var DropdownMenuSubTrigger_default = defineComponent({
|
|
1016
|
+
name: "VCDropdownMenuSubTrigger",
|
|
1017
|
+
inheritAttrs: false,
|
|
1018
|
+
props: {
|
|
1019
|
+
/** HTML tag (or component) to render as. Reka default: `'div'`. */
|
|
1020
|
+
as: {
|
|
1021
|
+
type: String,
|
|
1022
|
+
default: "div"
|
|
1023
|
+
},
|
|
1024
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1025
|
+
asChild: {
|
|
1026
|
+
type: Boolean,
|
|
1027
|
+
default: false
|
|
1028
|
+
},
|
|
1029
|
+
/** When true, prevents user interaction with the sub-trigger. */
|
|
1030
|
+
disabled: {
|
|
1031
|
+
type: Boolean,
|
|
1032
|
+
default: false
|
|
1033
|
+
},
|
|
1034
|
+
/** Optional typeahead text override (defaults to the item's `.textContent`). */
|
|
1035
|
+
textValue: {
|
|
1036
|
+
type: String,
|
|
1037
|
+
default: void 0
|
|
1038
|
+
},
|
|
1039
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1040
|
+
themeClass: {
|
|
1041
|
+
type: Object,
|
|
1042
|
+
default: void 0
|
|
1043
|
+
},
|
|
1044
|
+
/** Per-instance variant values. */
|
|
1045
|
+
themeVariant: {
|
|
1046
|
+
type: Object,
|
|
1047
|
+
default: void 0
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
setup(props, { slots, attrs }) {
|
|
1051
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
1052
|
+
return () => h(DropdownMenuSubTrigger, mergeProps(attrs, {
|
|
1053
|
+
as: props.as,
|
|
1054
|
+
asChild: props.asChild,
|
|
1055
|
+
disabled: props.disabled,
|
|
1056
|
+
textValue: props.textValue,
|
|
1057
|
+
class: theme.value.subTrigger || void 0
|
|
1058
|
+
}), { default: () => slots.default?.() });
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
//#endregion
|
|
1062
|
+
//#region src/components/dropdown-menu/DropdownMenuSubContent.vue
|
|
1063
|
+
var DropdownMenuSubContent_default = defineComponent({
|
|
1064
|
+
name: "VCDropdownMenuSubContent",
|
|
1065
|
+
inheritAttrs: false,
|
|
1066
|
+
props: {
|
|
1067
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
1068
|
+
inline: {
|
|
1069
|
+
type: Boolean,
|
|
1070
|
+
default: false
|
|
1071
|
+
},
|
|
1072
|
+
/** Distance in pixels between sub-trigger and sub-menu. */
|
|
1073
|
+
sideOffset: {
|
|
1074
|
+
type: Number,
|
|
1075
|
+
default: 0
|
|
1076
|
+
},
|
|
1077
|
+
/** Offset in pixels along the alignment axis. */
|
|
1078
|
+
alignOffset: {
|
|
1079
|
+
type: Number,
|
|
1080
|
+
default: 0
|
|
1081
|
+
},
|
|
1082
|
+
/** Flip / shift the sub-menu to stay inside the viewport. */
|
|
1083
|
+
avoidCollisions: {
|
|
1084
|
+
type: Boolean,
|
|
1085
|
+
default: true
|
|
1086
|
+
},
|
|
1087
|
+
/** Loop arrow-key focus from last item back to first. Vuecs convention: `true` (Reka default: `false`). */
|
|
1088
|
+
loop: {
|
|
1089
|
+
type: Boolean,
|
|
1090
|
+
default: true
|
|
1091
|
+
},
|
|
1092
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1093
|
+
themeClass: {
|
|
1094
|
+
type: Object,
|
|
1095
|
+
default: void 0
|
|
1096
|
+
},
|
|
1097
|
+
/** Per-instance variant values. */
|
|
1098
|
+
themeVariant: {
|
|
1099
|
+
type: Object,
|
|
1100
|
+
default: void 0
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
setup(props, { slots, attrs }) {
|
|
1104
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
1105
|
+
const renderContent = () => h(DropdownMenuSubContent, mergeProps(attrs, {
|
|
1106
|
+
sideOffset: props.sideOffset,
|
|
1107
|
+
alignOffset: props.alignOffset,
|
|
1108
|
+
avoidCollisions: props.avoidCollisions,
|
|
1109
|
+
loop: props.loop,
|
|
1110
|
+
class: theme.value.subContent || void 0
|
|
1111
|
+
}), { default: () => slots.default?.() });
|
|
1112
|
+
return () => {
|
|
1113
|
+
if (props.inline) return renderContent();
|
|
1114
|
+
return h(DropdownMenuPortal, null, { default: () => renderContent() });
|
|
1115
|
+
};
|
|
1116
|
+
}
|
|
1117
|
+
});
|
|
1118
|
+
//#endregion
|
|
1119
|
+
//#region src/components/dropdown-menu/DropdownMenuArrow.vue
|
|
1120
|
+
var DropdownMenuArrow_default = defineComponent({
|
|
1121
|
+
name: "VCDropdownMenuArrow",
|
|
1122
|
+
props: {
|
|
1123
|
+
/** Arrow width in pixels. */
|
|
1124
|
+
width: {
|
|
1125
|
+
type: Number,
|
|
1126
|
+
default: 10
|
|
1127
|
+
},
|
|
1128
|
+
/** Arrow height in pixels. */
|
|
1129
|
+
height: {
|
|
1130
|
+
type: Number,
|
|
1131
|
+
default: 5
|
|
1132
|
+
},
|
|
1133
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1134
|
+
themeClass: {
|
|
1135
|
+
type: Object,
|
|
1136
|
+
default: void 0
|
|
1137
|
+
},
|
|
1138
|
+
/** Per-instance variant values. */
|
|
1139
|
+
themeVariant: {
|
|
1140
|
+
type: Object,
|
|
1141
|
+
default: void 0
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
setup(props) {
|
|
1145
|
+
const theme = useComponentTheme("dropdownMenu", props, dropdownMenuThemeDefaults);
|
|
1146
|
+
return () => h(DropdownMenuArrow, {
|
|
1147
|
+
width: props.width,
|
|
1148
|
+
height: props.height,
|
|
1149
|
+
class: theme.value.arrow || void 0
|
|
1150
|
+
});
|
|
1151
|
+
}
|
|
1152
|
+
});
|
|
1153
|
+
//#endregion
|
|
1154
|
+
//#region src/components/hover-card/HoverCard.vue
|
|
1155
|
+
var HoverCard_default = defineComponent({
|
|
1156
|
+
name: "VCHoverCard",
|
|
1157
|
+
inheritAttrs: false,
|
|
1158
|
+
props: {
|
|
1159
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
1160
|
+
open: {
|
|
1161
|
+
type: Boolean,
|
|
1162
|
+
default: void 0
|
|
1163
|
+
},
|
|
1164
|
+
/** Initial open state for uncontrolled usage. */
|
|
1165
|
+
defaultOpen: {
|
|
1166
|
+
type: Boolean,
|
|
1167
|
+
default: false
|
|
1168
|
+
},
|
|
1169
|
+
/** Delay (ms) from pointer-enter to opening. */
|
|
1170
|
+
openDelay: {
|
|
1171
|
+
type: Number,
|
|
1172
|
+
default: 700
|
|
1173
|
+
},
|
|
1174
|
+
/** Delay (ms) from pointer-leave to closing — covers grace-area travel. */
|
|
1175
|
+
closeDelay: {
|
|
1176
|
+
type: Number,
|
|
1177
|
+
default: 300
|
|
1178
|
+
}
|
|
1179
|
+
},
|
|
1180
|
+
emits: ["update:open"],
|
|
1181
|
+
setup(props, { slots, emit }) {
|
|
1182
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
1183
|
+
return () => h(HoverCardRoot, forwarded.value, { default: () => slots.default?.() });
|
|
1184
|
+
}
|
|
1185
|
+
});
|
|
1186
|
+
//#endregion
|
|
1187
|
+
//#region src/components/hover-card/theme.ts
|
|
1188
|
+
const hoverCardThemeDefaults = { classes: {
|
|
1189
|
+
trigger: "vc-hover-card-trigger",
|
|
1190
|
+
content: "vc-hover-card-content",
|
|
1191
|
+
arrow: "vc-hover-card-arrow"
|
|
1192
|
+
} };
|
|
1193
|
+
//#endregion
|
|
1194
|
+
//#region src/components/hover-card/HoverCardTrigger.vue
|
|
1195
|
+
var HoverCardTrigger_default = defineComponent({
|
|
1196
|
+
name: "VCHoverCardTrigger",
|
|
1197
|
+
props: {
|
|
1198
|
+
/** HTML tag (or component) to render as. Reka default: `'a'` (hover-card triggers are typically links). */
|
|
1199
|
+
as: {
|
|
1200
|
+
type: String,
|
|
1201
|
+
default: "a"
|
|
1202
|
+
},
|
|
1203
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1204
|
+
asChild: {
|
|
1205
|
+
type: Boolean,
|
|
1206
|
+
default: false
|
|
1207
|
+
},
|
|
1208
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1209
|
+
themeClass: {
|
|
1210
|
+
type: Object,
|
|
1211
|
+
default: void 0
|
|
1212
|
+
},
|
|
1213
|
+
/** Per-instance variant values. */
|
|
1214
|
+
themeVariant: {
|
|
1215
|
+
type: Object,
|
|
1216
|
+
default: void 0
|
|
1217
|
+
}
|
|
1218
|
+
},
|
|
1219
|
+
setup(props, { slots }) {
|
|
1220
|
+
const theme = useComponentTheme("hoverCard", props, hoverCardThemeDefaults);
|
|
1221
|
+
return () => h(HoverCardTrigger, {
|
|
1222
|
+
as: props.as,
|
|
1223
|
+
asChild: props.asChild,
|
|
1224
|
+
class: theme.value.trigger || void 0
|
|
1225
|
+
}, { default: () => slots.default?.() });
|
|
1226
|
+
}
|
|
1227
|
+
});
|
|
1228
|
+
//#endregion
|
|
1229
|
+
//#region src/components/hover-card/HoverCardContent.vue
|
|
1230
|
+
var HoverCardContent_default = defineComponent({
|
|
1231
|
+
name: "VCHoverCardContent",
|
|
1232
|
+
inheritAttrs: false,
|
|
1233
|
+
props: {
|
|
1234
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
1235
|
+
inline: {
|
|
1236
|
+
type: Boolean,
|
|
1237
|
+
default: false
|
|
1238
|
+
},
|
|
1239
|
+
/** Preferred side relative to the trigger. */
|
|
1240
|
+
side: {
|
|
1241
|
+
type: String,
|
|
1242
|
+
default: "bottom"
|
|
1243
|
+
},
|
|
1244
|
+
/** Distance in pixels between trigger and panel. Vuecs convention: 4 (Reka default: 0). */
|
|
1245
|
+
sideOffset: {
|
|
1246
|
+
type: Number,
|
|
1247
|
+
default: 4
|
|
1248
|
+
},
|
|
1249
|
+
/** Alignment along the chosen side. */
|
|
1250
|
+
align: {
|
|
1251
|
+
type: String,
|
|
1252
|
+
default: "center"
|
|
1253
|
+
},
|
|
1254
|
+
/** Offset in pixels along the alignment axis. */
|
|
1255
|
+
alignOffset: {
|
|
1256
|
+
type: Number,
|
|
1257
|
+
default: 0
|
|
1258
|
+
},
|
|
1259
|
+
/** Flip / shift the panel to stay inside the viewport. */
|
|
1260
|
+
avoidCollisions: {
|
|
1261
|
+
type: Boolean,
|
|
1262
|
+
default: true
|
|
1263
|
+
},
|
|
1264
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1265
|
+
themeClass: {
|
|
1266
|
+
type: Object,
|
|
1267
|
+
default: void 0
|
|
1268
|
+
},
|
|
1269
|
+
/** Per-instance variant values. */
|
|
1270
|
+
themeVariant: {
|
|
1271
|
+
type: Object,
|
|
1272
|
+
default: void 0
|
|
1273
|
+
}
|
|
1274
|
+
},
|
|
1275
|
+
setup(props, { slots, attrs }) {
|
|
1276
|
+
const theme = useComponentTheme("hoverCard", props, hoverCardThemeDefaults);
|
|
1277
|
+
const renderContent = () => h(HoverCardContent, mergeProps(attrs, {
|
|
1278
|
+
side: props.side,
|
|
1279
|
+
sideOffset: props.sideOffset,
|
|
1280
|
+
align: props.align,
|
|
1281
|
+
alignOffset: props.alignOffset,
|
|
1282
|
+
avoidCollisions: props.avoidCollisions,
|
|
1283
|
+
class: theme.value.content || void 0
|
|
1284
|
+
}), { default: () => slots.default?.() });
|
|
1285
|
+
return () => {
|
|
1286
|
+
if (props.inline) return renderContent();
|
|
1287
|
+
return h(HoverCardPortal, null, { default: () => renderContent() });
|
|
1288
|
+
};
|
|
1289
|
+
}
|
|
1290
|
+
});
|
|
1291
|
+
//#endregion
|
|
1292
|
+
//#region src/components/hover-card/HoverCardArrow.vue
|
|
1293
|
+
var HoverCardArrow_default = defineComponent({
|
|
1294
|
+
name: "VCHoverCardArrow",
|
|
1295
|
+
props: {
|
|
1296
|
+
/** Arrow width in pixels. */
|
|
1297
|
+
width: {
|
|
1298
|
+
type: Number,
|
|
1299
|
+
default: 10
|
|
1300
|
+
},
|
|
1301
|
+
/** Arrow height in pixels. */
|
|
1302
|
+
height: {
|
|
1303
|
+
type: Number,
|
|
1304
|
+
default: 5
|
|
1305
|
+
},
|
|
1306
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1307
|
+
themeClass: {
|
|
1308
|
+
type: Object,
|
|
1309
|
+
default: void 0
|
|
1310
|
+
},
|
|
1311
|
+
/** Per-instance variant values. */
|
|
1312
|
+
themeVariant: {
|
|
1313
|
+
type: Object,
|
|
1314
|
+
default: void 0
|
|
1315
|
+
}
|
|
1316
|
+
},
|
|
1317
|
+
setup(props) {
|
|
1318
|
+
const theme = useComponentTheme("hoverCard", props, hoverCardThemeDefaults);
|
|
1319
|
+
return () => h(HoverCardArrow, {
|
|
1320
|
+
width: props.width,
|
|
1321
|
+
height: props.height,
|
|
1322
|
+
class: theme.value.arrow || void 0
|
|
1323
|
+
});
|
|
1324
|
+
}
|
|
1325
|
+
});
|
|
1326
|
+
//#endregion
|
|
1327
|
+
//#region src/components/modal/Modal.vue
|
|
1328
|
+
var Modal_default = defineComponent({
|
|
1329
|
+
name: "VCModal",
|
|
1330
|
+
inheritAttrs: false,
|
|
1331
|
+
props: {
|
|
1332
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
1333
|
+
open: {
|
|
1334
|
+
type: Boolean,
|
|
1335
|
+
default: void 0
|
|
1336
|
+
},
|
|
1337
|
+
/** Initial open state for uncontrolled usage. */
|
|
1338
|
+
defaultOpen: {
|
|
1339
|
+
type: Boolean,
|
|
1340
|
+
default: false
|
|
1341
|
+
},
|
|
1342
|
+
/** Modal mode — disables interaction with outside elements when open. */
|
|
1343
|
+
modal: {
|
|
1344
|
+
type: Boolean,
|
|
1345
|
+
default: true
|
|
1346
|
+
}
|
|
1347
|
+
},
|
|
1348
|
+
emits: ["update:open"],
|
|
1349
|
+
setup(props, { slots, emit }) {
|
|
1350
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
1351
|
+
return () => h(DialogRoot, forwarded.value, { default: () => slots.default?.() });
|
|
1352
|
+
}
|
|
1353
|
+
});
|
|
1354
|
+
//#endregion
|
|
1355
|
+
//#region src/components/modal/theme.ts
|
|
1356
|
+
/**
|
|
1357
|
+
* Single theme-defaults source for every `<VCModal*>` part. Each component
|
|
1358
|
+
* reads only the slot it needs from the resolved theme — sharing the source
|
|
1359
|
+
* keeps the augmentation, types, and consumer overrides in one place.
|
|
1360
|
+
*
|
|
1361
|
+
* Slot names map 1:1 onto the Reka Dialog parts they wrap, plus `header` /
|
|
1362
|
+
* `body` / `footer` regions exposed for layout composition and `back` for
|
|
1363
|
+
* the optional view-stack back button.
|
|
1364
|
+
*/
|
|
1365
|
+
const modalThemeDefaults = { classes: {
|
|
1366
|
+
overlay: "vc-modal-overlay",
|
|
1367
|
+
content: "vc-modal-content",
|
|
1368
|
+
header: "vc-modal-header",
|
|
1369
|
+
title: "vc-modal-title",
|
|
1370
|
+
description: "vc-modal-description",
|
|
1371
|
+
body: "vc-modal-body",
|
|
1372
|
+
footer: "vc-modal-footer",
|
|
1373
|
+
trigger: "vc-modal-trigger",
|
|
1374
|
+
close: "vc-modal-close",
|
|
1375
|
+
closeIcon: "vc-modal-close-icon",
|
|
1376
|
+
back: "vc-modal-back"
|
|
1377
|
+
} };
|
|
1378
|
+
//#endregion
|
|
1379
|
+
//#region src/components/modal/ModalTrigger.vue
|
|
1380
|
+
var ModalTrigger_default = defineComponent({
|
|
1381
|
+
name: "VCModalTrigger",
|
|
1382
|
+
props: {
|
|
1383
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
1384
|
+
as: {
|
|
1385
|
+
type: String,
|
|
1386
|
+
default: "button"
|
|
1387
|
+
},
|
|
1388
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1389
|
+
asChild: {
|
|
1390
|
+
type: Boolean,
|
|
1391
|
+
default: false
|
|
1392
|
+
},
|
|
1393
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1394
|
+
themeClass: {
|
|
1395
|
+
type: Object,
|
|
1396
|
+
default: void 0
|
|
1397
|
+
},
|
|
1398
|
+
/** Per-instance variant values. */
|
|
1399
|
+
themeVariant: {
|
|
1400
|
+
type: Object,
|
|
1401
|
+
default: void 0
|
|
1402
|
+
}
|
|
1403
|
+
},
|
|
1404
|
+
setup(props, { slots }) {
|
|
1405
|
+
const theme = useComponentTheme("modal", props, modalThemeDefaults);
|
|
1406
|
+
return () => h(DialogTrigger, {
|
|
1407
|
+
as: props.as,
|
|
1408
|
+
asChild: props.asChild,
|
|
1409
|
+
class: theme.value.trigger || void 0
|
|
1410
|
+
}, { default: () => slots.default?.() });
|
|
1411
|
+
}
|
|
1412
|
+
});
|
|
1413
|
+
//#endregion
|
|
1414
|
+
//#region src/components/modal/ModalContent.vue
|
|
1415
|
+
var ModalContent_default = defineComponent({
|
|
1416
|
+
name: "VCModalContent",
|
|
1417
|
+
props: {
|
|
1418
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
1419
|
+
inline: {
|
|
1420
|
+
type: Boolean,
|
|
1421
|
+
default: false
|
|
1422
|
+
},
|
|
1423
|
+
/** Disable the overlay backdrop. Internal — controls our own render branch. */
|
|
1424
|
+
hideOverlay: {
|
|
1425
|
+
type: Boolean,
|
|
1426
|
+
default: false
|
|
1427
|
+
},
|
|
1428
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1429
|
+
themeClass: {
|
|
1430
|
+
type: Object,
|
|
1431
|
+
default: void 0
|
|
1432
|
+
},
|
|
1433
|
+
/** Per-instance variant values. */
|
|
1434
|
+
themeVariant: {
|
|
1435
|
+
type: Object,
|
|
1436
|
+
default: void 0
|
|
1437
|
+
}
|
|
1438
|
+
},
|
|
1439
|
+
setup(props, { slots, attrs }) {
|
|
1440
|
+
const theme = useComponentTheme("modal", props, modalThemeDefaults);
|
|
1441
|
+
const renderInner = () => [...props.hideOverlay ? [] : [h(DialogOverlay, { class: theme.value.overlay || void 0 })], h(DialogContent, mergeProps(attrs, { class: theme.value.content || void 0 }), { default: () => slots.default?.() })];
|
|
1442
|
+
return () => {
|
|
1443
|
+
if (props.inline) return renderInner();
|
|
1444
|
+
return h(DialogPortal, null, { default: () => renderInner() });
|
|
1445
|
+
};
|
|
1446
|
+
}
|
|
1447
|
+
});
|
|
1448
|
+
//#endregion
|
|
1449
|
+
//#region src/components/modal/ModalTitle.vue
|
|
1450
|
+
var ModalTitle_default = defineComponent({
|
|
1451
|
+
name: "VCModalTitle",
|
|
1452
|
+
props: {
|
|
1453
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1454
|
+
themeClass: {
|
|
1455
|
+
type: Object,
|
|
1456
|
+
default: void 0
|
|
1457
|
+
},
|
|
1458
|
+
/** Per-instance variant values. */
|
|
1459
|
+
themeVariant: {
|
|
1460
|
+
type: Object,
|
|
1461
|
+
default: void 0
|
|
1462
|
+
}
|
|
1463
|
+
},
|
|
1464
|
+
setup(props, { slots }) {
|
|
1465
|
+
const theme = useComponentTheme("modal", props, modalThemeDefaults);
|
|
1466
|
+
return () => h(DialogTitle, { class: theme.value.title || void 0 }, { default: () => slots.default?.() });
|
|
1467
|
+
}
|
|
1468
|
+
});
|
|
1469
|
+
//#endregion
|
|
1470
|
+
//#region src/components/modal/ModalDescription.vue
|
|
1471
|
+
var ModalDescription_default = defineComponent({
|
|
1472
|
+
name: "VCModalDescription",
|
|
1473
|
+
props: {
|
|
1474
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1475
|
+
themeClass: {
|
|
1476
|
+
type: Object,
|
|
1477
|
+
default: void 0
|
|
1478
|
+
},
|
|
1479
|
+
/** Per-instance variant values. */
|
|
1480
|
+
themeVariant: {
|
|
1481
|
+
type: Object,
|
|
1482
|
+
default: void 0
|
|
1483
|
+
}
|
|
1484
|
+
},
|
|
1485
|
+
setup(props, { slots }) {
|
|
1486
|
+
const theme = useComponentTheme("modal", props, modalThemeDefaults);
|
|
1487
|
+
return () => h(DialogDescription, { class: theme.value.description || void 0 }, { default: () => slots.default?.() });
|
|
1488
|
+
}
|
|
1489
|
+
});
|
|
1490
|
+
//#endregion
|
|
1491
|
+
//#region src/components/modal/ModalClose.vue
|
|
1492
|
+
var ModalClose_default = defineComponent({
|
|
1493
|
+
name: "VCModalClose",
|
|
1494
|
+
inheritAttrs: false,
|
|
1495
|
+
props: {
|
|
1496
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
1497
|
+
as: {
|
|
1498
|
+
type: String,
|
|
1499
|
+
default: "button"
|
|
1500
|
+
},
|
|
1501
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1502
|
+
asChild: {
|
|
1503
|
+
type: Boolean,
|
|
1504
|
+
default: false
|
|
1505
|
+
},
|
|
1506
|
+
/**
|
|
1507
|
+
* Force the corner-X presentation (reads the theme's `closeIcon` slot —
|
|
1508
|
+
* absolute positioning + sizing). When false (default), the slot-presence
|
|
1509
|
+
* heuristic decides: slotless renders the corner-X, slotted renders the
|
|
1510
|
+
* neutral `close` styling so consumer classes compose cleanly.
|
|
1511
|
+
*
|
|
1512
|
+
* Internal slot-picker — never forwarded to Reka.
|
|
1513
|
+
*/
|
|
1514
|
+
icon: {
|
|
1515
|
+
type: Boolean,
|
|
1516
|
+
default: false
|
|
1517
|
+
},
|
|
1518
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1519
|
+
themeClass: {
|
|
1520
|
+
type: Object,
|
|
1521
|
+
default: void 0
|
|
1522
|
+
},
|
|
1523
|
+
/** Per-instance variant values. */
|
|
1524
|
+
themeVariant: {
|
|
1525
|
+
type: Object,
|
|
1526
|
+
default: void 0
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
setup(props, { slots, attrs }) {
|
|
1530
|
+
const theme = useComponentTheme("modal", props, modalThemeDefaults);
|
|
1531
|
+
return () => {
|
|
1532
|
+
const hasSlot = !!slots.default;
|
|
1533
|
+
const ariaLabel = attrs["aria-label"] ?? (hasSlot ? void 0 : "Close");
|
|
1534
|
+
const slotKey = props.icon || !hasSlot ? "closeIcon" : "close";
|
|
1535
|
+
return h(DialogClose, mergeProps(attrs, {
|
|
1536
|
+
as: props.as,
|
|
1537
|
+
asChild: props.asChild,
|
|
1538
|
+
class: theme.value[slotKey] || void 0,
|
|
1539
|
+
"aria-label": ariaLabel
|
|
1540
|
+
}), { default: () => slots.default?.() ?? "×" });
|
|
1541
|
+
};
|
|
1542
|
+
}
|
|
1543
|
+
});
|
|
1544
|
+
//#endregion
|
|
1545
|
+
//#region src/components/modal/use-modal.ts
|
|
1546
|
+
/**
|
|
1547
|
+
* View-stack-aware modal state. Used in tandem with `<VCModal>`'s compound
|
|
1548
|
+
* components for flows like "list view → push detail view → pop back" without
|
|
1549
|
+
* stacking modals or fighting z-index.
|
|
1550
|
+
*
|
|
1551
|
+
* Originally proposed in https://github.com/tada5hi/vuecs/issues/1480.
|
|
1552
|
+
*/
|
|
1553
|
+
function useModal(options = {}) {
|
|
1554
|
+
const isOpen = ref(false);
|
|
1555
|
+
const stack = shallowRef([]);
|
|
1556
|
+
const setStack = (next) => {
|
|
1557
|
+
stack.value = next;
|
|
1558
|
+
};
|
|
1559
|
+
const currentView = computed(() => stack.value[stack.value.length - 1]);
|
|
1560
|
+
const depth = computed(() => stack.value.length);
|
|
1561
|
+
const hasHistory = computed(() => stack.value.length > 1);
|
|
1562
|
+
const open = (view) => {
|
|
1563
|
+
if (view) setStack([view]);
|
|
1564
|
+
else if (stack.value.length === 0 && options.initialView) setStack([options.initialView]);
|
|
1565
|
+
isOpen.value = true;
|
|
1566
|
+
};
|
|
1567
|
+
const close = () => {
|
|
1568
|
+
const wasOpen = isOpen.value;
|
|
1569
|
+
isOpen.value = false;
|
|
1570
|
+
setStack([]);
|
|
1571
|
+
if (wasOpen) options.onClose?.();
|
|
1572
|
+
};
|
|
1573
|
+
const pushView = (view) => {
|
|
1574
|
+
setStack([...stack.value, view]);
|
|
1575
|
+
if (!isOpen.value) isOpen.value = true;
|
|
1576
|
+
};
|
|
1577
|
+
const popView = () => {
|
|
1578
|
+
if (stack.value.length <= 1) {
|
|
1579
|
+
close();
|
|
1580
|
+
return;
|
|
1581
|
+
}
|
|
1582
|
+
setStack(stack.value.slice(0, -1));
|
|
1583
|
+
};
|
|
1584
|
+
const replaceView = (view) => {
|
|
1585
|
+
setStack([view]);
|
|
1586
|
+
if (!isOpen.value) isOpen.value = true;
|
|
1587
|
+
};
|
|
1588
|
+
const setOpen = (next) => {
|
|
1589
|
+
if (next) open();
|
|
1590
|
+
else close();
|
|
1591
|
+
};
|
|
1592
|
+
return {
|
|
1593
|
+
isOpen,
|
|
1594
|
+
currentView,
|
|
1595
|
+
hasHistory,
|
|
1596
|
+
depth,
|
|
1597
|
+
open,
|
|
1598
|
+
close,
|
|
1599
|
+
pushView,
|
|
1600
|
+
popView,
|
|
1601
|
+
replaceView,
|
|
1602
|
+
setOpen
|
|
1603
|
+
};
|
|
1604
|
+
}
|
|
1605
|
+
//#endregion
|
|
1606
|
+
//#region src/components/popover/Popover.vue
|
|
1607
|
+
var Popover_default = defineComponent({
|
|
1608
|
+
name: "VCPopover",
|
|
1609
|
+
inheritAttrs: false,
|
|
1610
|
+
props: {
|
|
1611
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
1612
|
+
open: {
|
|
1613
|
+
type: Boolean,
|
|
1614
|
+
default: void 0
|
|
1615
|
+
},
|
|
1616
|
+
/** Initial open state for uncontrolled usage. */
|
|
1617
|
+
defaultOpen: {
|
|
1618
|
+
type: Boolean,
|
|
1619
|
+
default: false
|
|
1620
|
+
},
|
|
1621
|
+
/** Modal mode — locks focus inside the popover and blocks outside interaction. */
|
|
1622
|
+
modal: {
|
|
1623
|
+
type: Boolean,
|
|
1624
|
+
default: false
|
|
1625
|
+
}
|
|
1626
|
+
},
|
|
1627
|
+
emits: ["update:open"],
|
|
1628
|
+
setup(props, { slots, emit }) {
|
|
1629
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
1630
|
+
return () => h(PopoverRoot, forwarded.value, { default: () => slots.default?.() });
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
//#endregion
|
|
1634
|
+
//#region src/components/popover/theme.ts
|
|
1635
|
+
const popoverThemeDefaults = { classes: {
|
|
1636
|
+
content: "vc-popover-content",
|
|
1637
|
+
trigger: "vc-popover-trigger",
|
|
1638
|
+
arrow: "vc-popover-arrow",
|
|
1639
|
+
close: "vc-popover-close",
|
|
1640
|
+
closeIcon: "vc-popover-close-icon"
|
|
1641
|
+
} };
|
|
1642
|
+
//#endregion
|
|
1643
|
+
//#region src/components/popover/PopoverTrigger.vue
|
|
1644
|
+
var PopoverTrigger_default = defineComponent({
|
|
1645
|
+
name: "VCPopoverTrigger",
|
|
1646
|
+
inheritAttrs: false,
|
|
1647
|
+
props: {
|
|
1648
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
1649
|
+
as: {
|
|
1650
|
+
type: String,
|
|
1651
|
+
default: "button"
|
|
1652
|
+
},
|
|
1653
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1654
|
+
asChild: {
|
|
1655
|
+
type: Boolean,
|
|
1656
|
+
default: false
|
|
1657
|
+
},
|
|
1658
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1659
|
+
themeClass: {
|
|
1660
|
+
type: Object,
|
|
1661
|
+
default: void 0
|
|
1662
|
+
},
|
|
1663
|
+
/** Per-instance variant values. */
|
|
1664
|
+
themeVariant: {
|
|
1665
|
+
type: Object,
|
|
1666
|
+
default: void 0
|
|
1667
|
+
}
|
|
1668
|
+
},
|
|
1669
|
+
setup(props, { attrs, slots }) {
|
|
1670
|
+
const theme = useComponentTheme("popover", props, popoverThemeDefaults);
|
|
1671
|
+
return () => h(PopoverTrigger, mergeProps(attrs, {
|
|
1672
|
+
as: props.as,
|
|
1673
|
+
asChild: props.asChild,
|
|
1674
|
+
class: theme.value.trigger || void 0
|
|
1675
|
+
}), { default: () => slots.default?.() });
|
|
1676
|
+
}
|
|
1677
|
+
});
|
|
1678
|
+
//#endregion
|
|
1679
|
+
//#region src/components/popover/PopoverContent.vue
|
|
1680
|
+
var PopoverContent_default = defineComponent({
|
|
1681
|
+
name: "VCPopoverContent",
|
|
1682
|
+
inheritAttrs: false,
|
|
1683
|
+
props: {
|
|
1684
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
1685
|
+
inline: {
|
|
1686
|
+
type: Boolean,
|
|
1687
|
+
default: false
|
|
1688
|
+
},
|
|
1689
|
+
/** Preferred side relative to the trigger. */
|
|
1690
|
+
side: {
|
|
1691
|
+
type: String,
|
|
1692
|
+
default: "bottom"
|
|
1693
|
+
},
|
|
1694
|
+
/** Distance in pixels between trigger and panel. Vuecs convention: 4 (Reka default: 0). */
|
|
1695
|
+
sideOffset: {
|
|
1696
|
+
type: Number,
|
|
1697
|
+
default: 4
|
|
1698
|
+
},
|
|
1699
|
+
/** Alignment along the chosen side. */
|
|
1700
|
+
align: {
|
|
1701
|
+
type: String,
|
|
1702
|
+
default: "center"
|
|
1703
|
+
},
|
|
1704
|
+
/** Offset in pixels along the alignment axis. */
|
|
1705
|
+
alignOffset: {
|
|
1706
|
+
type: Number,
|
|
1707
|
+
default: 0
|
|
1708
|
+
},
|
|
1709
|
+
/** Flip / shift the panel to stay inside the viewport. */
|
|
1710
|
+
avoidCollisions: {
|
|
1711
|
+
type: Boolean,
|
|
1712
|
+
default: true
|
|
1713
|
+
},
|
|
1714
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1715
|
+
themeClass: {
|
|
1716
|
+
type: Object,
|
|
1717
|
+
default: void 0
|
|
1718
|
+
},
|
|
1719
|
+
/** Per-instance variant values. */
|
|
1720
|
+
themeVariant: {
|
|
1721
|
+
type: Object,
|
|
1722
|
+
default: void 0
|
|
1723
|
+
}
|
|
1724
|
+
},
|
|
1725
|
+
setup(props, { slots, attrs }) {
|
|
1726
|
+
const theme = useComponentTheme("popover", props, popoverThemeDefaults);
|
|
1727
|
+
const renderContent = () => h(PopoverContent, mergeProps(attrs, {
|
|
1728
|
+
side: props.side,
|
|
1729
|
+
sideOffset: props.sideOffset,
|
|
1730
|
+
align: props.align,
|
|
1731
|
+
alignOffset: props.alignOffset,
|
|
1732
|
+
avoidCollisions: props.avoidCollisions,
|
|
1733
|
+
class: theme.value.content || void 0
|
|
1734
|
+
}), { default: () => slots.default?.() });
|
|
1735
|
+
return () => {
|
|
1736
|
+
if (props.inline) return renderContent();
|
|
1737
|
+
return h(PopoverPortal, null, { default: () => renderContent() });
|
|
1738
|
+
};
|
|
1739
|
+
}
|
|
1740
|
+
});
|
|
1741
|
+
//#endregion
|
|
1742
|
+
//#region src/components/popover/PopoverArrow.vue
|
|
1743
|
+
var PopoverArrow_default = defineComponent({
|
|
1744
|
+
name: "VCPopoverArrow",
|
|
1745
|
+
props: {
|
|
1746
|
+
/** Arrow width in pixels. */
|
|
1747
|
+
width: {
|
|
1748
|
+
type: Number,
|
|
1749
|
+
default: 10
|
|
1750
|
+
},
|
|
1751
|
+
/** Arrow height in pixels. */
|
|
1752
|
+
height: {
|
|
1753
|
+
type: Number,
|
|
1754
|
+
default: 5
|
|
1755
|
+
},
|
|
1756
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1757
|
+
themeClass: {
|
|
1758
|
+
type: Object,
|
|
1759
|
+
default: void 0
|
|
1760
|
+
},
|
|
1761
|
+
/** Per-instance variant values. */
|
|
1762
|
+
themeVariant: {
|
|
1763
|
+
type: Object,
|
|
1764
|
+
default: void 0
|
|
1765
|
+
}
|
|
1766
|
+
},
|
|
1767
|
+
setup(props) {
|
|
1768
|
+
const theme = useComponentTheme("popover", props, popoverThemeDefaults);
|
|
1769
|
+
return () => h(PopoverArrow, {
|
|
1770
|
+
width: props.width,
|
|
1771
|
+
height: props.height,
|
|
1772
|
+
class: theme.value.arrow || void 0
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
//#endregion
|
|
1777
|
+
//#region src/components/popover/PopoverClose.vue
|
|
1778
|
+
var PopoverClose_default = defineComponent({
|
|
1779
|
+
name: "VCPopoverClose",
|
|
1780
|
+
inheritAttrs: false,
|
|
1781
|
+
props: {
|
|
1782
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
1783
|
+
as: {
|
|
1784
|
+
type: String,
|
|
1785
|
+
default: "button"
|
|
1786
|
+
},
|
|
1787
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
1788
|
+
asChild: {
|
|
1789
|
+
type: Boolean,
|
|
1790
|
+
default: false
|
|
1791
|
+
},
|
|
1792
|
+
/**
|
|
1793
|
+
* Force the corner-X presentation (reads the theme's `closeIcon` slot —
|
|
1794
|
+
* absolute positioning + sizing). When false (default), the slot-presence
|
|
1795
|
+
* heuristic decides: slotless renders the corner-X, slotted renders the
|
|
1796
|
+
* neutral `close` styling so consumer classes compose cleanly.
|
|
1797
|
+
*
|
|
1798
|
+
* Internal slot-picker — never forwarded to Reka.
|
|
1799
|
+
*/
|
|
1800
|
+
icon: {
|
|
1801
|
+
type: Boolean,
|
|
1802
|
+
default: false
|
|
1803
|
+
},
|
|
1804
|
+
/** Per-instance theme override — flat slot key map. */
|
|
1805
|
+
themeClass: {
|
|
1806
|
+
type: Object,
|
|
1807
|
+
default: void 0
|
|
1808
|
+
},
|
|
1809
|
+
/** Per-instance variant values. */
|
|
1810
|
+
themeVariant: {
|
|
1811
|
+
type: Object,
|
|
1812
|
+
default: void 0
|
|
1813
|
+
}
|
|
1814
|
+
},
|
|
1815
|
+
setup(props, { slots, attrs }) {
|
|
1816
|
+
const theme = useComponentTheme("popover", props, popoverThemeDefaults);
|
|
1817
|
+
return () => {
|
|
1818
|
+
const hasSlot = !!slots.default;
|
|
1819
|
+
const ariaLabel = attrs["aria-label"] ?? (hasSlot ? void 0 : "Close");
|
|
1820
|
+
const slotKey = props.icon || !hasSlot ? "closeIcon" : "close";
|
|
1821
|
+
return h(PopoverClose, mergeProps(attrs, {
|
|
1822
|
+
as: props.as,
|
|
1823
|
+
asChild: props.asChild,
|
|
1824
|
+
class: theme.value[slotKey] || void 0,
|
|
1825
|
+
"aria-label": ariaLabel
|
|
1826
|
+
}), { default: () => slots.default?.() ?? "×" });
|
|
1827
|
+
};
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1830
|
+
//#endregion
|
|
1831
|
+
//#region src/components/presence/Presence.vue
|
|
1832
|
+
var Presence_default = defineComponent({
|
|
1833
|
+
name: "VCPresence",
|
|
1834
|
+
inheritAttrs: false,
|
|
1835
|
+
props: {
|
|
1836
|
+
/** Whether the wrapped subtree should be mounted. Toggle to trigger enter/exit animations. */
|
|
1837
|
+
present: {
|
|
1838
|
+
type: Boolean,
|
|
1839
|
+
required: true
|
|
1840
|
+
},
|
|
1841
|
+
/** Force the subtree to stay mounted regardless of `present` (debug / programmatic transition control). */
|
|
1842
|
+
forceMount: {
|
|
1843
|
+
type: Boolean,
|
|
1844
|
+
default: false
|
|
1845
|
+
}
|
|
1846
|
+
},
|
|
1847
|
+
setup(props, { slots }) {
|
|
1848
|
+
return () => h(Presence, {
|
|
1849
|
+
present: props.present,
|
|
1850
|
+
forceMount: props.forceMount
|
|
1851
|
+
}, { default: (scope) => slots.default?.(scope) });
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
//#endregion
|
|
1855
|
+
//#region src/components/toast/theme.ts
|
|
1856
|
+
const toastViewportThemeDefaults = { classes: { root: "vc-toast-viewport" } };
|
|
1857
|
+
const toastThemeDefaults = { classes: {
|
|
1858
|
+
root: "vc-toast",
|
|
1859
|
+
body: "vc-toast-body",
|
|
1860
|
+
close: "vc-toast-close",
|
|
1861
|
+
closeIcon: "vc-toast-close-icon"
|
|
1862
|
+
} };
|
|
1863
|
+
const toastTitleThemeDefaults = { classes: { root: "vc-toast-title" } };
|
|
1864
|
+
const toastDescriptionThemeDefaults = { classes: { root: "vc-toast-description" } };
|
|
1865
|
+
const toastActionThemeDefaults = { classes: { root: "vc-toast-action" } };
|
|
1866
|
+
//#endregion
|
|
1867
|
+
//#region src/components/toast/Toast.vue
|
|
1868
|
+
var Toast_default = defineComponent({
|
|
1869
|
+
name: "VCToast",
|
|
1870
|
+
inheritAttrs: false,
|
|
1871
|
+
props: {
|
|
1872
|
+
/** Semantic color — drives the `color` theme variant. */
|
|
1873
|
+
color: {
|
|
1874
|
+
type: String,
|
|
1875
|
+
default: void 0
|
|
1876
|
+
},
|
|
1877
|
+
/** Visual treatment — `solid` / `soft` / `outline`. */
|
|
1878
|
+
variant: {
|
|
1879
|
+
type: String,
|
|
1880
|
+
default: void 0
|
|
1881
|
+
},
|
|
1882
|
+
/**
|
|
1883
|
+
* Auto-dismiss timeout (ms). Falls back to the `<VCToastProvider>`
|
|
1884
|
+
* default. Use `0` for a persistent toast (no auto-dismiss).
|
|
1885
|
+
*/
|
|
1886
|
+
duration: {
|
|
1887
|
+
type: Number,
|
|
1888
|
+
default: void 0
|
|
1889
|
+
},
|
|
1890
|
+
/**
|
|
1891
|
+
* Reka `type` — `'foreground'` interrupts AT (use for errors / urgent
|
|
1892
|
+
* messages); `'background'` queues politely.
|
|
1893
|
+
*
|
|
1894
|
+
* Vuecs convention: defaults to `'background'` (Reka's default is
|
|
1895
|
+
* `'foreground'`). Most toasts are informational and shouldn't
|
|
1896
|
+
* interrupt screen-reader users; explicit `type="foreground"` opts
|
|
1897
|
+
* into the louder announcement for urgent error toasts.
|
|
1898
|
+
*/
|
|
1899
|
+
type: {
|
|
1900
|
+
type: String,
|
|
1901
|
+
default: "background"
|
|
1902
|
+
},
|
|
1903
|
+
/**
|
|
1904
|
+
* Controlled open state. Leave undefined to let Reka's internal state
|
|
1905
|
+
* machine manage open/close lifecycle from `defaultOpen` + the
|
|
1906
|
+
* auto-dismiss timer. `<VCToaster>` deliberately doesn't bind this —
|
|
1907
|
+
* it dismisses entries via the queue, letting Reka own per-toast state.
|
|
1908
|
+
*/
|
|
1909
|
+
open: {
|
|
1910
|
+
type: Boolean,
|
|
1911
|
+
default: void 0
|
|
1912
|
+
},
|
|
1913
|
+
/** Initial open state when `open` is undefined. */
|
|
1914
|
+
defaultOpen: {
|
|
1915
|
+
type: Boolean,
|
|
1916
|
+
default: true
|
|
1917
|
+
},
|
|
1918
|
+
/** HTML tag to render. */
|
|
1919
|
+
as: {
|
|
1920
|
+
type: String,
|
|
1921
|
+
default: "li"
|
|
1922
|
+
},
|
|
1923
|
+
/** Render the consumer's slot child as the root (Reka `asChild` pattern). */
|
|
1924
|
+
asChild: {
|
|
1925
|
+
type: Boolean,
|
|
1926
|
+
default: false
|
|
1927
|
+
},
|
|
1928
|
+
...themableProps()
|
|
1929
|
+
},
|
|
1930
|
+
emits: [
|
|
1931
|
+
"update:open",
|
|
1932
|
+
"escape-key-down",
|
|
1933
|
+
"pause",
|
|
1934
|
+
"resume",
|
|
1935
|
+
"swipe-start",
|
|
1936
|
+
"swipe-move",
|
|
1937
|
+
"swipe-cancel",
|
|
1938
|
+
"swipe-end"
|
|
1939
|
+
],
|
|
1940
|
+
setup(props, { attrs, slots, emit }) {
|
|
1941
|
+
const theme = useComponentTheme("toast", useThemeProps(props, "color", "variant"), toastThemeDefaults);
|
|
1942
|
+
return () => h(ToastRoot, mergeProps(attrs, {
|
|
1943
|
+
as: props.as,
|
|
1944
|
+
asChild: props.asChild,
|
|
1945
|
+
type: props.type,
|
|
1946
|
+
open: props.open,
|
|
1947
|
+
defaultOpen: props.defaultOpen,
|
|
1948
|
+
duration: props.duration,
|
|
1949
|
+
class: theme.value.root || void 0,
|
|
1950
|
+
"onUpdate:open": (open) => emit("update:open", open),
|
|
1951
|
+
onEscapeKeyDown: (e) => emit("escape-key-down", e),
|
|
1952
|
+
onPause: () => emit("pause"),
|
|
1953
|
+
onResume: () => emit("resume"),
|
|
1954
|
+
onSwipeStart: (e) => emit("swipe-start", e),
|
|
1955
|
+
onSwipeMove: (e) => emit("swipe-move", e),
|
|
1956
|
+
onSwipeCancel: (e) => emit("swipe-cancel", e),
|
|
1957
|
+
onSwipeEnd: (e) => emit("swipe-end", e)
|
|
1958
|
+
}), { default: () => slots.default?.() });
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1961
|
+
//#endregion
|
|
1962
|
+
//#region src/components/toast/ToastProvider.vue
|
|
1963
|
+
var ToastProvider_default = defineComponent({
|
|
1964
|
+
name: "VCToastProvider",
|
|
1965
|
+
inheritAttrs: false,
|
|
1966
|
+
props: {
|
|
1967
|
+
/** Default auto-dismiss timeout (ms). Reka default: `5000`. Per-toast `duration` overrides. */
|
|
1968
|
+
duration: {
|
|
1969
|
+
type: Number,
|
|
1970
|
+
default: 5e3
|
|
1971
|
+
},
|
|
1972
|
+
/** Label announced by screen readers when a toast renders. */
|
|
1973
|
+
label: {
|
|
1974
|
+
type: String,
|
|
1975
|
+
default: "Notification"
|
|
1976
|
+
},
|
|
1977
|
+
/** Swipe direction that dismisses a toast via touch. Reka default: `'right'`. */
|
|
1978
|
+
swipeDirection: {
|
|
1979
|
+
type: String,
|
|
1980
|
+
default: "right"
|
|
1981
|
+
},
|
|
1982
|
+
/** Pixels swiped before a dismissal is registered. Reka default: `50`. */
|
|
1983
|
+
swipeThreshold: {
|
|
1984
|
+
type: Number,
|
|
1985
|
+
default: 50
|
|
1986
|
+
}
|
|
1987
|
+
},
|
|
1988
|
+
setup(props, { slots }) {
|
|
1989
|
+
const forwarded = useForwardProps(props);
|
|
1990
|
+
return () => h(ToastProvider, forwarded.value, { default: () => slots.default?.() });
|
|
1991
|
+
}
|
|
1992
|
+
});
|
|
1993
|
+
//#endregion
|
|
1994
|
+
//#region src/components/toast/ToastTitle.vue
|
|
1995
|
+
var ToastTitle_default = defineComponent({
|
|
1996
|
+
name: "VCToastTitle",
|
|
1997
|
+
inheritAttrs: false,
|
|
1998
|
+
props: {
|
|
1999
|
+
/**
|
|
2000
|
+
* HTML tag to render.
|
|
2001
|
+
*
|
|
2002
|
+
* Vuecs convention: defaults to `'h3'` (Reka's `Primitive` default is
|
|
2003
|
+
* `'div'`). `h3` is the semantically-correct host for an in-context
|
|
2004
|
+
* heading within a toast — overridable via `:as`.
|
|
2005
|
+
*/
|
|
2006
|
+
as: {
|
|
2007
|
+
type: String,
|
|
2008
|
+
default: "h3"
|
|
2009
|
+
},
|
|
2010
|
+
/** Render the consumer's slot child as the root (Reka `asChild` pattern). */
|
|
2011
|
+
asChild: {
|
|
2012
|
+
type: Boolean,
|
|
2013
|
+
default: false
|
|
2014
|
+
},
|
|
2015
|
+
...themableProps()
|
|
2016
|
+
},
|
|
2017
|
+
setup(props, { attrs, slots }) {
|
|
2018
|
+
const theme = useComponentTheme("toastTitle", useThemeProps(props), toastTitleThemeDefaults);
|
|
2019
|
+
return () => h(ToastTitle, mergeProps(attrs, {
|
|
2020
|
+
as: props.as,
|
|
2021
|
+
asChild: props.asChild,
|
|
2022
|
+
class: theme.value.root || void 0
|
|
2023
|
+
}), { default: () => slots.default?.() });
|
|
2024
|
+
}
|
|
2025
|
+
});
|
|
2026
|
+
//#endregion
|
|
2027
|
+
//#region src/components/toast/ToastDescription.vue
|
|
2028
|
+
var ToastDescription_default = defineComponent({
|
|
2029
|
+
name: "VCToastDescription",
|
|
2030
|
+
inheritAttrs: false,
|
|
2031
|
+
props: {
|
|
2032
|
+
/**
|
|
2033
|
+
* HTML tag to render.
|
|
2034
|
+
*
|
|
2035
|
+
* Vuecs convention: defaults to `'p'` (Reka's `Primitive` default is
|
|
2036
|
+
* `'div'`). `p` is the semantically-correct host for the toast body
|
|
2037
|
+
* text — overridable via `:as`.
|
|
2038
|
+
*/
|
|
2039
|
+
as: {
|
|
2040
|
+
type: String,
|
|
2041
|
+
default: "p"
|
|
2042
|
+
},
|
|
2043
|
+
/** Render the consumer's slot child as the root (Reka `asChild` pattern). */
|
|
2044
|
+
asChild: {
|
|
2045
|
+
type: Boolean,
|
|
2046
|
+
default: false
|
|
2047
|
+
},
|
|
2048
|
+
...themableProps()
|
|
2049
|
+
},
|
|
2050
|
+
setup(props, { attrs, slots }) {
|
|
2051
|
+
const theme = useComponentTheme("toastDescription", useThemeProps(props), toastDescriptionThemeDefaults);
|
|
2052
|
+
return () => h(ToastDescription, mergeProps(attrs, {
|
|
2053
|
+
as: props.as,
|
|
2054
|
+
asChild: props.asChild,
|
|
2055
|
+
class: theme.value.root || void 0
|
|
2056
|
+
}), { default: () => slots.default?.() });
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
//#endregion
|
|
2060
|
+
//#region src/components/toast/ToastAction.vue
|
|
2061
|
+
var ToastAction_default = defineComponent({
|
|
2062
|
+
name: "VCToastAction",
|
|
2063
|
+
inheritAttrs: false,
|
|
2064
|
+
props: {
|
|
2065
|
+
/**
|
|
2066
|
+
* Short text describing the action. Required by Reka for AT — when the
|
|
2067
|
+
* toast auto-dismisses, screen readers announce this label so the user
|
|
2068
|
+
* knows what was missed. Mirror your action button's visible label.
|
|
2069
|
+
*/
|
|
2070
|
+
altText: {
|
|
2071
|
+
type: String,
|
|
2072
|
+
required: true
|
|
2073
|
+
},
|
|
2074
|
+
/** HTML tag to render. */
|
|
2075
|
+
as: {
|
|
2076
|
+
type: String,
|
|
2077
|
+
default: "button"
|
|
2078
|
+
},
|
|
2079
|
+
/** Render the consumer's slot child as the root (Reka `asChild` pattern). */
|
|
2080
|
+
asChild: {
|
|
2081
|
+
type: Boolean,
|
|
2082
|
+
default: false
|
|
2083
|
+
},
|
|
2084
|
+
...themableProps()
|
|
2085
|
+
},
|
|
2086
|
+
setup(props, { attrs, slots }) {
|
|
2087
|
+
const theme = useComponentTheme("toastAction", useThemeProps(props), toastActionThemeDefaults);
|
|
2088
|
+
return () => h(ToastAction, mergeProps(attrs, {
|
|
2089
|
+
altText: props.altText,
|
|
2090
|
+
as: props.as,
|
|
2091
|
+
asChild: props.asChild,
|
|
2092
|
+
class: theme.value.root || void 0
|
|
2093
|
+
}), { default: () => slots.default?.() });
|
|
2094
|
+
}
|
|
2095
|
+
});
|
|
2096
|
+
//#endregion
|
|
2097
|
+
//#region src/components/toast/ToastClose.vue
|
|
2098
|
+
var ToastClose_default = defineComponent({
|
|
2099
|
+
name: "VCToastClose",
|
|
2100
|
+
inheritAttrs: false,
|
|
2101
|
+
props: {
|
|
2102
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
2103
|
+
as: {
|
|
2104
|
+
type: String,
|
|
2105
|
+
default: "button"
|
|
2106
|
+
},
|
|
2107
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
2108
|
+
asChild: {
|
|
2109
|
+
type: Boolean,
|
|
2110
|
+
default: false
|
|
2111
|
+
},
|
|
2112
|
+
/**
|
|
2113
|
+
* Force the corner-X presentation (reads the theme's `closeIcon` slot).
|
|
2114
|
+
* When false (default), the slot-presence heuristic decides:
|
|
2115
|
+
* - slotless renders the corner-X (`closeIcon`)
|
|
2116
|
+
* - slotted renders the neutral `close` styling
|
|
2117
|
+
*
|
|
2118
|
+
* Same convention as `<VCModalClose>` / `<VCPopoverClose>`.
|
|
2119
|
+
*/
|
|
2120
|
+
icon: {
|
|
2121
|
+
type: Boolean,
|
|
2122
|
+
default: false
|
|
2123
|
+
},
|
|
2124
|
+
/** Per-instance theme override — flat slot key map. */
|
|
2125
|
+
themeClass: {
|
|
2126
|
+
type: Object,
|
|
2127
|
+
default: void 0
|
|
2128
|
+
},
|
|
2129
|
+
/** Per-instance variant values. */
|
|
2130
|
+
themeVariant: {
|
|
2131
|
+
type: Object,
|
|
2132
|
+
default: void 0
|
|
2133
|
+
}
|
|
2134
|
+
},
|
|
2135
|
+
setup(props, { slots, attrs }) {
|
|
2136
|
+
const theme = useComponentTheme("toast", props, toastThemeDefaults);
|
|
2137
|
+
return () => {
|
|
2138
|
+
const hasSlot = !!slots.default;
|
|
2139
|
+
const ariaLabel = attrs["aria-label"] ?? (hasSlot ? void 0 : "Close");
|
|
2140
|
+
const slotKey = props.icon || !hasSlot ? "closeIcon" : "close";
|
|
2141
|
+
return h(ToastClose, mergeProps(attrs, {
|
|
2142
|
+
as: props.as,
|
|
2143
|
+
asChild: props.asChild,
|
|
2144
|
+
class: theme.value[slotKey] || void 0,
|
|
2145
|
+
"aria-label": ariaLabel
|
|
2146
|
+
}), { default: () => slots.default?.() ?? "×" });
|
|
2147
|
+
};
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
//#endregion
|
|
2151
|
+
//#region src/components/toast/use-toast.ts
|
|
2152
|
+
const entries = ref([]);
|
|
2153
|
+
let nextId = 0;
|
|
2154
|
+
function generateId() {
|
|
2155
|
+
nextId += 1;
|
|
2156
|
+
return `vc-toast-${nextId}`;
|
|
2157
|
+
}
|
|
2158
|
+
/**
|
|
2159
|
+
* Module-level singleton — every `useToast()` call returns the same queue
|
|
2160
|
+
* ref and mutator set. Adding from a fetch handler and rendering inside
|
|
2161
|
+
* `<VCToaster>` reuse one source of truth (singleton queue per plan 029 Q2).
|
|
2162
|
+
*
|
|
2163
|
+
* const toast = useToast();
|
|
2164
|
+
* toast.add({ title: 'Saved', description: 'User updated.', color: 'success' });
|
|
2165
|
+
* const id = toast.add({ title: 'Uploading…', duration: 0 });
|
|
2166
|
+
* toast.update(id, { description: '50% complete…' });
|
|
2167
|
+
* toast.dismiss(id);
|
|
2168
|
+
*
|
|
2169
|
+
* The composable owns NO timer logic — auto-dismiss + pause-on-hover are
|
|
2170
|
+
* driven by Reka's `ToastRoot` `duration` prop, which `<VCToast>` forwards
|
|
2171
|
+
* from `entry.duration ?? <VCToastProvider :duration>`.
|
|
2172
|
+
*
|
|
2173
|
+
* SSR note: The singleton is *process-wide*, not per-request. If a server
|
|
2174
|
+
* worker is reused across requests (Nuxt default), state could in theory
|
|
2175
|
+
* leak between renders — but toasts are user-action notifications fired
|
|
2176
|
+
* from client-side handlers (clicks, fetch callbacks), so the server-side
|
|
2177
|
+
* queue is almost always empty at render time. Don't call `add()` from
|
|
2178
|
+
* SSR setup paths; defer it to `onMounted` or post-hydration handlers.
|
|
2179
|
+
*/
|
|
2180
|
+
function useToast() {
|
|
2181
|
+
function add(entry) {
|
|
2182
|
+
const suggested = entry.id;
|
|
2183
|
+
const id = suggested === void 0 || entries.value.some((e) => e.id === suggested) ? generateId() : suggested;
|
|
2184
|
+
entries.value = [...entries.value, {
|
|
2185
|
+
...entry,
|
|
2186
|
+
id
|
|
2187
|
+
}];
|
|
2188
|
+
return id;
|
|
2189
|
+
}
|
|
2190
|
+
function dismiss(id) {
|
|
2191
|
+
const idx = entries.value.findIndex((e) => e.id === id);
|
|
2192
|
+
if (idx === -1) return;
|
|
2193
|
+
const removed = entries.value[idx];
|
|
2194
|
+
entries.value = entries.value.filter((e) => e.id !== id);
|
|
2195
|
+
removed?.onDismiss?.(id, toastApi);
|
|
2196
|
+
}
|
|
2197
|
+
function update(id, patch) {
|
|
2198
|
+
const idx = entries.value.findIndex((e) => e.id === id);
|
|
2199
|
+
if (idx === -1) return;
|
|
2200
|
+
const next = [...entries.value];
|
|
2201
|
+
next[idx] = {
|
|
2202
|
+
...next[idx],
|
|
2203
|
+
...patch
|
|
2204
|
+
};
|
|
2205
|
+
entries.value = next;
|
|
2206
|
+
}
|
|
2207
|
+
function clear() {
|
|
2208
|
+
const toFire = entries.value;
|
|
2209
|
+
entries.value = [];
|
|
2210
|
+
for (const e of toFire) e.onDismiss?.(e.id, toastApi);
|
|
2211
|
+
}
|
|
2212
|
+
const toastApi = {
|
|
2213
|
+
entries: readonly(entries),
|
|
2214
|
+
add,
|
|
2215
|
+
dismiss,
|
|
2216
|
+
update,
|
|
2217
|
+
clear
|
|
2218
|
+
};
|
|
2219
|
+
return toastApi;
|
|
2220
|
+
}
|
|
2221
|
+
//#endregion
|
|
2222
|
+
//#region src/components/toast/Toaster.vue?vue&type=script&lang.ts
|
|
2223
|
+
const toasterProps = {
|
|
2224
|
+
/**
|
|
2225
|
+
* Viewport position. Drives the `position` theme variant on
|
|
2226
|
+
* `toastViewport`. Defaults to `'top-right'` on desktop with
|
|
2227
|
+
* theme-provided responsive overrides at narrow viewports.
|
|
2228
|
+
*/
|
|
2229
|
+
position: {
|
|
2230
|
+
type: String,
|
|
2231
|
+
default: "top-right"
|
|
2232
|
+
},
|
|
2233
|
+
/**
|
|
2234
|
+
* Keyboard shortcut that focuses the viewport (Reka default: `'F8'`).
|
|
2235
|
+
* Allows screen-reader users to jump back to recent toasts.
|
|
2236
|
+
*/
|
|
2237
|
+
hotkey: {
|
|
2238
|
+
type: Array,
|
|
2239
|
+
default: void 0
|
|
2240
|
+
},
|
|
2241
|
+
/** Aria label for the viewport landmark. */
|
|
2242
|
+
label: {
|
|
2243
|
+
type: String,
|
|
2244
|
+
default: void 0
|
|
2245
|
+
},
|
|
2246
|
+
/** HTML tag to render. */
|
|
2247
|
+
as: {
|
|
2248
|
+
type: String,
|
|
2249
|
+
default: "ol"
|
|
2250
|
+
},
|
|
2251
|
+
...themableProps()
|
|
2252
|
+
};
|
|
2253
|
+
function isActionRenderFn(action) {
|
|
2254
|
+
return typeof action === "function";
|
|
2255
|
+
}
|
|
2256
|
+
function renderTextField(value, wrapper) {
|
|
2257
|
+
return h(wrapper, null, { default: typeof value === "function" ? value : () => value });
|
|
2258
|
+
}
|
|
2259
|
+
//#endregion
|
|
2260
|
+
//#region src/components/toast/Toaster.vue
|
|
2261
|
+
var Toaster_default = defineComponent({
|
|
2262
|
+
name: "VCToaster",
|
|
2263
|
+
inheritAttrs: false,
|
|
2264
|
+
props: toasterProps,
|
|
2265
|
+
slots: Object,
|
|
2266
|
+
setup(props, { attrs, slots }) {
|
|
2267
|
+
const theme = useComponentTheme("toastViewport", useThemeProps(props, "position"), toastViewportThemeDefaults);
|
|
2268
|
+
const toastTheme = useComponentTheme("toast", {}, toastThemeDefaults);
|
|
2269
|
+
const toastApi = useToast();
|
|
2270
|
+
const { entries, dismiss } = toastApi;
|
|
2271
|
+
const rekaProps = computed(() => {
|
|
2272
|
+
const out = {};
|
|
2273
|
+
if (props.hotkey) out.hotkey = props.hotkey;
|
|
2274
|
+
if (props.label) out.label = props.label;
|
|
2275
|
+
return out;
|
|
2276
|
+
});
|
|
2277
|
+
function renderEntry(entry) {
|
|
2278
|
+
const onClose = () => dismiss(entry.id);
|
|
2279
|
+
if (entry.component) return h(Toast_default, {
|
|
2280
|
+
key: entry.id,
|
|
2281
|
+
color: entry.color,
|
|
2282
|
+
variant: entry.variant,
|
|
2283
|
+
duration: entry.duration,
|
|
2284
|
+
"onUpdate:open": (open) => {
|
|
2285
|
+
if (!open) onClose();
|
|
2286
|
+
}
|
|
2287
|
+
}, () => h(entry.component, {
|
|
2288
|
+
...entry.componentProps ?? {},
|
|
2289
|
+
entry,
|
|
2290
|
+
dismiss: onClose
|
|
2291
|
+
}));
|
|
2292
|
+
if (slots.default) {
|
|
2293
|
+
const children = slots.default({
|
|
2294
|
+
entry,
|
|
2295
|
+
dismiss: onClose,
|
|
2296
|
+
classes: toastTheme.value
|
|
2297
|
+
});
|
|
2298
|
+
return h(Fragment, { key: entry.id }, children);
|
|
2299
|
+
}
|
|
2300
|
+
const body = h("div", { class: toastTheme.value.body || void 0 }, [
|
|
2301
|
+
entry.title !== void 0 ? renderTextField(entry.title, ToastTitle_default) : null,
|
|
2302
|
+
entry.description !== void 0 ? renderTextField(entry.description, ToastDescription_default) : null,
|
|
2303
|
+
renderAction(entry, toastApi)
|
|
2304
|
+
]);
|
|
2305
|
+
const closable = entry.closable !== false;
|
|
2306
|
+
return h(Toast_default, {
|
|
2307
|
+
key: entry.id,
|
|
2308
|
+
color: entry.color,
|
|
2309
|
+
variant: entry.variant,
|
|
2310
|
+
duration: entry.duration,
|
|
2311
|
+
"onUpdate:open": (open) => {
|
|
2312
|
+
if (!open) onClose();
|
|
2313
|
+
}
|
|
2314
|
+
}, () => [body, closable ? h(ToastClose_default) : null]);
|
|
2315
|
+
}
|
|
2316
|
+
function renderAction(entry, api) {
|
|
2317
|
+
if (!entry.action) return null;
|
|
2318
|
+
if (isActionRenderFn(entry.action)) return h("div", null, entry.action(entry.id, api));
|
|
2319
|
+
const structured = entry.action;
|
|
2320
|
+
return h(ToastAction_default, {
|
|
2321
|
+
altText: structured.label,
|
|
2322
|
+
onClick: () => structured.onClick(entry.id, api)
|
|
2323
|
+
}, () => structured.label);
|
|
2324
|
+
}
|
|
2325
|
+
return () => h(ToastViewport, mergeProps(attrs, {
|
|
2326
|
+
as: props.as,
|
|
2327
|
+
class: theme.value.root || void 0,
|
|
2328
|
+
...rekaProps.value
|
|
2329
|
+
}), { default: () => entries.value.map(renderEntry) });
|
|
2330
|
+
}
|
|
2331
|
+
});
|
|
2332
|
+
//#endregion
|
|
2333
|
+
//#region src/components/tooltip/TooltipProvider.vue
|
|
2334
|
+
var TooltipProvider_default = defineComponent({
|
|
2335
|
+
name: "VCTooltipProvider",
|
|
2336
|
+
inheritAttrs: false,
|
|
2337
|
+
props: {
|
|
2338
|
+
/** Delay before opening on hover, ms. */
|
|
2339
|
+
delayDuration: {
|
|
2340
|
+
type: Number,
|
|
2341
|
+
default: 700
|
|
2342
|
+
},
|
|
2343
|
+
/** Window after a tooltip closes during which sibling tooltips skip the delay, ms. */
|
|
2344
|
+
skipDelayDuration: {
|
|
2345
|
+
type: Number,
|
|
2346
|
+
default: 300
|
|
2347
|
+
},
|
|
2348
|
+
/** Disable hovering-only opens (focus still works). */
|
|
2349
|
+
disableHoverableContent: {
|
|
2350
|
+
type: Boolean,
|
|
2351
|
+
default: false
|
|
2352
|
+
},
|
|
2353
|
+
/** Disable closing on pointer-down outside content. */
|
|
2354
|
+
disableClosingTrigger: {
|
|
2355
|
+
type: Boolean,
|
|
2356
|
+
default: false
|
|
2357
|
+
},
|
|
2358
|
+
/** Treat non-keyboard focus events as not focusing the trigger. */
|
|
2359
|
+
ignoreNonKeyboardFocus: {
|
|
2360
|
+
type: Boolean,
|
|
2361
|
+
default: false
|
|
2362
|
+
}
|
|
2363
|
+
},
|
|
2364
|
+
setup(props, { slots, emit }) {
|
|
2365
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
2366
|
+
return () => h(TooltipProvider, forwarded.value, { default: () => slots.default?.() });
|
|
2367
|
+
}
|
|
2368
|
+
});
|
|
2369
|
+
//#endregion
|
|
2370
|
+
//#region src/components/tooltip/Tooltip.vue
|
|
2371
|
+
var Tooltip_default = defineComponent({
|
|
2372
|
+
name: "VCTooltip",
|
|
2373
|
+
inheritAttrs: false,
|
|
2374
|
+
props: {
|
|
2375
|
+
/** Controlled open state. Bind via `v-model:open`. */
|
|
2376
|
+
open: {
|
|
2377
|
+
type: Boolean,
|
|
2378
|
+
default: void 0
|
|
2379
|
+
},
|
|
2380
|
+
/** Initial open state for uncontrolled usage. */
|
|
2381
|
+
defaultOpen: {
|
|
2382
|
+
type: Boolean,
|
|
2383
|
+
default: false
|
|
2384
|
+
},
|
|
2385
|
+
/** Per-tooltip override of the provider's hover-open delay (ms). Falls through to provider when undefined. */
|
|
2386
|
+
delayDuration: {
|
|
2387
|
+
type: Number,
|
|
2388
|
+
default: void 0
|
|
2389
|
+
},
|
|
2390
|
+
/** Per-tooltip override — disable hover-only opens (focus still works). Falls through to provider when undefined. */
|
|
2391
|
+
disableHoverableContent: {
|
|
2392
|
+
type: Boolean,
|
|
2393
|
+
default: void 0
|
|
2394
|
+
},
|
|
2395
|
+
/** Per-tooltip override — disable closing on pointer-down outside. Falls through to provider when undefined. */
|
|
2396
|
+
disableClosingTrigger: {
|
|
2397
|
+
type: Boolean,
|
|
2398
|
+
default: void 0
|
|
2399
|
+
}
|
|
2400
|
+
},
|
|
2401
|
+
emits: ["update:open"],
|
|
2402
|
+
setup(props, { slots, emit }) {
|
|
2403
|
+
const forwarded = useForwardPropsEmits(props, emit);
|
|
2404
|
+
return () => h(TooltipRoot, forwarded.value, { default: () => slots.default?.() });
|
|
2405
|
+
}
|
|
2406
|
+
});
|
|
2407
|
+
//#endregion
|
|
2408
|
+
//#region src/components/tooltip/theme.ts
|
|
2409
|
+
const tooltipThemeDefaults = { classes: {
|
|
2410
|
+
content: "vc-tooltip-content",
|
|
2411
|
+
trigger: "vc-tooltip-trigger",
|
|
2412
|
+
arrow: "vc-tooltip-arrow"
|
|
2413
|
+
} };
|
|
2414
|
+
//#endregion
|
|
2415
|
+
//#region src/components/tooltip/TooltipTrigger.vue
|
|
2416
|
+
var TooltipTrigger_default = defineComponent({
|
|
2417
|
+
name: "VCTooltipTrigger",
|
|
2418
|
+
inheritAttrs: false,
|
|
2419
|
+
props: {
|
|
2420
|
+
/** HTML tag (or component) to render as. Reka default: `'button'`. */
|
|
2421
|
+
as: {
|
|
2422
|
+
type: String,
|
|
2423
|
+
default: "button"
|
|
2424
|
+
},
|
|
2425
|
+
/** Render the slot content as the rendered element instead of wrapping it. */
|
|
2426
|
+
asChild: {
|
|
2427
|
+
type: Boolean,
|
|
2428
|
+
default: false
|
|
2429
|
+
},
|
|
2430
|
+
/** Per-instance theme override — flat slot key map. */
|
|
2431
|
+
themeClass: {
|
|
2432
|
+
type: Object,
|
|
2433
|
+
default: void 0
|
|
2434
|
+
},
|
|
2435
|
+
/** Per-instance variant values. */
|
|
2436
|
+
themeVariant: {
|
|
2437
|
+
type: Object,
|
|
2438
|
+
default: void 0
|
|
2439
|
+
}
|
|
2440
|
+
},
|
|
2441
|
+
setup(props, { attrs, slots }) {
|
|
2442
|
+
const theme = useComponentTheme("tooltip", props, tooltipThemeDefaults);
|
|
2443
|
+
return () => h(TooltipTrigger, mergeProps(attrs, {
|
|
2444
|
+
as: props.as,
|
|
2445
|
+
asChild: props.asChild,
|
|
2446
|
+
class: theme.value.trigger || void 0
|
|
2447
|
+
}), { default: () => slots.default?.() });
|
|
2448
|
+
}
|
|
2449
|
+
});
|
|
2450
|
+
//#endregion
|
|
2451
|
+
//#region src/components/tooltip/TooltipContent.vue
|
|
2452
|
+
var TooltipContent_default = defineComponent({
|
|
2453
|
+
name: "VCTooltipContent",
|
|
2454
|
+
inheritAttrs: false,
|
|
2455
|
+
props: {
|
|
2456
|
+
/** Skip the portal and render in-place (testing / custom mounting). Internal — never forwarded to Reka. */
|
|
2457
|
+
inline: {
|
|
2458
|
+
type: Boolean,
|
|
2459
|
+
default: false
|
|
2460
|
+
},
|
|
2461
|
+
/** Preferred side relative to the trigger. Reka default for tooltip: `'top'`. */
|
|
2462
|
+
side: {
|
|
2463
|
+
type: String,
|
|
2464
|
+
default: "top"
|
|
2465
|
+
},
|
|
2466
|
+
/** Distance in pixels between trigger and panel. Vuecs convention: 4 (Reka default: 0). */
|
|
2467
|
+
sideOffset: {
|
|
2468
|
+
type: Number,
|
|
2469
|
+
default: 4
|
|
2470
|
+
},
|
|
2471
|
+
/** Alignment along the chosen side. */
|
|
2472
|
+
align: {
|
|
2473
|
+
type: String,
|
|
2474
|
+
default: "center"
|
|
2475
|
+
},
|
|
2476
|
+
/** Offset in pixels along the alignment axis. */
|
|
2477
|
+
alignOffset: {
|
|
2478
|
+
type: Number,
|
|
2479
|
+
default: 0
|
|
2480
|
+
},
|
|
2481
|
+
/** Flip / shift the panel to stay inside the viewport. */
|
|
2482
|
+
avoidCollisions: {
|
|
2483
|
+
type: Boolean,
|
|
2484
|
+
default: true
|
|
2485
|
+
},
|
|
2486
|
+
/** Per-instance theme override — flat slot key map. */
|
|
2487
|
+
themeClass: {
|
|
2488
|
+
type: Object,
|
|
2489
|
+
default: void 0
|
|
2490
|
+
},
|
|
2491
|
+
/** Per-instance variant values. */
|
|
2492
|
+
themeVariant: {
|
|
2493
|
+
type: Object,
|
|
2494
|
+
default: void 0
|
|
2495
|
+
}
|
|
2496
|
+
},
|
|
2497
|
+
setup(props, { slots, attrs }) {
|
|
2498
|
+
const theme = useComponentTheme("tooltip", props, tooltipThemeDefaults);
|
|
2499
|
+
const renderContent = () => h(TooltipContent, mergeProps(attrs, {
|
|
2500
|
+
side: props.side,
|
|
2501
|
+
sideOffset: props.sideOffset,
|
|
2502
|
+
align: props.align,
|
|
2503
|
+
alignOffset: props.alignOffset,
|
|
2504
|
+
avoidCollisions: props.avoidCollisions,
|
|
2505
|
+
class: theme.value.content || void 0
|
|
2506
|
+
}), { default: () => slots.default?.() });
|
|
2507
|
+
return () => {
|
|
2508
|
+
if (props.inline) return renderContent();
|
|
2509
|
+
return h(TooltipPortal, null, { default: () => renderContent() });
|
|
2510
|
+
};
|
|
2511
|
+
}
|
|
2512
|
+
});
|
|
2513
|
+
//#endregion
|
|
2514
|
+
//#region src/components/tooltip/TooltipArrow.vue
|
|
2515
|
+
var TooltipArrow_default = defineComponent({
|
|
2516
|
+
name: "VCTooltipArrow",
|
|
2517
|
+
props: {
|
|
2518
|
+
/** Arrow width in pixels. */
|
|
2519
|
+
width: {
|
|
2520
|
+
type: Number,
|
|
2521
|
+
default: 10
|
|
2522
|
+
},
|
|
2523
|
+
/** Arrow height in pixels. */
|
|
2524
|
+
height: {
|
|
2525
|
+
type: Number,
|
|
2526
|
+
default: 5
|
|
2527
|
+
},
|
|
2528
|
+
/** Per-instance theme override — flat slot key map. */
|
|
2529
|
+
themeClass: {
|
|
2530
|
+
type: Object,
|
|
2531
|
+
default: void 0
|
|
2532
|
+
},
|
|
2533
|
+
/** Per-instance variant values. */
|
|
2534
|
+
themeVariant: {
|
|
2535
|
+
type: Object,
|
|
2536
|
+
default: void 0
|
|
2537
|
+
}
|
|
2538
|
+
},
|
|
2539
|
+
setup(props) {
|
|
2540
|
+
const theme = useComponentTheme("tooltip", props, tooltipThemeDefaults);
|
|
2541
|
+
return () => h(TooltipArrow, {
|
|
2542
|
+
width: props.width,
|
|
2543
|
+
height: props.height,
|
|
2544
|
+
class: theme.value.arrow || void 0
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
});
|
|
2548
|
+
//#endregion
|
|
2549
|
+
//#region src/index.ts
|
|
2550
|
+
function install(app, options = {}) {
|
|
2551
|
+
installThemeManager(app, options);
|
|
2552
|
+
installDefaultsManager(app, options);
|
|
2553
|
+
registerOverlayConfigDefaults(installConfigManager(app, options));
|
|
2554
|
+
Object.entries({
|
|
2555
|
+
VCPresence: Presence_default,
|
|
2556
|
+
VCModal: Modal_default,
|
|
2557
|
+
VCModalTrigger: ModalTrigger_default,
|
|
2558
|
+
VCModalContent: ModalContent_default,
|
|
2559
|
+
VCModalTitle: ModalTitle_default,
|
|
2560
|
+
VCModalDescription: ModalDescription_default,
|
|
2561
|
+
VCModalClose: ModalClose_default,
|
|
2562
|
+
VCPopover: Popover_default,
|
|
2563
|
+
VCPopoverTrigger: PopoverTrigger_default,
|
|
2564
|
+
VCPopoverContent: PopoverContent_default,
|
|
2565
|
+
VCPopoverArrow: PopoverArrow_default,
|
|
2566
|
+
VCPopoverClose: PopoverClose_default,
|
|
2567
|
+
VCTooltipProvider: TooltipProvider_default,
|
|
2568
|
+
VCTooltip: Tooltip_default,
|
|
2569
|
+
VCTooltipTrigger: TooltipTrigger_default,
|
|
2570
|
+
VCTooltipContent: TooltipContent_default,
|
|
2571
|
+
VCTooltipArrow: TooltipArrow_default,
|
|
2572
|
+
VCDropdownMenu: DropdownMenu_default,
|
|
2573
|
+
VCDropdownMenuTrigger: DropdownMenuTrigger_default,
|
|
2574
|
+
VCDropdownMenuContent: DropdownMenuContent_default,
|
|
2575
|
+
VCDropdownMenuItem: DropdownMenuItem_default,
|
|
2576
|
+
VCDropdownMenuCheckboxItem: DropdownMenuCheckboxItem_default,
|
|
2577
|
+
VCDropdownMenuRadioGroup: DropdownMenuRadioGroup_default,
|
|
2578
|
+
VCDropdownMenuRadioItem: DropdownMenuRadioItem_default,
|
|
2579
|
+
VCDropdownMenuItemIndicator: DropdownMenuItemIndicator_default,
|
|
2580
|
+
VCDropdownMenuLabel: DropdownMenuLabel_default,
|
|
2581
|
+
VCDropdownMenuSeparator: DropdownMenuSeparator_default,
|
|
2582
|
+
VCDropdownMenuGroup: DropdownMenuGroup_default,
|
|
2583
|
+
VCDropdownMenuSub: DropdownMenuSub_default,
|
|
2584
|
+
VCDropdownMenuSubTrigger: DropdownMenuSubTrigger_default,
|
|
2585
|
+
VCDropdownMenuSubContent: DropdownMenuSubContent_default,
|
|
2586
|
+
VCDropdownMenuArrow: DropdownMenuArrow_default,
|
|
2587
|
+
VCHoverCard: HoverCard_default,
|
|
2588
|
+
VCHoverCardTrigger: HoverCardTrigger_default,
|
|
2589
|
+
VCHoverCardContent: HoverCardContent_default,
|
|
2590
|
+
VCHoverCardArrow: HoverCardArrow_default,
|
|
2591
|
+
VCContextMenu: ContextMenu_default,
|
|
2592
|
+
VCContextMenuTrigger: ContextMenuTrigger_default,
|
|
2593
|
+
VCContextMenuContent: ContextMenuContent_default,
|
|
2594
|
+
VCContextMenuItem: ContextMenuItem_default,
|
|
2595
|
+
VCContextMenuCheckboxItem: ContextMenuCheckboxItem_default,
|
|
2596
|
+
VCContextMenuRadioGroup: ContextMenuRadioGroup_default,
|
|
2597
|
+
VCContextMenuRadioItem: ContextMenuRadioItem_default,
|
|
2598
|
+
VCContextMenuItemIndicator: ContextMenuItemIndicator_default,
|
|
2599
|
+
VCContextMenuLabel: ContextMenuLabel_default,
|
|
2600
|
+
VCContextMenuSeparator: ContextMenuSeparator_default,
|
|
2601
|
+
VCContextMenuGroup: ContextMenuGroup_default,
|
|
2602
|
+
VCContextMenuSub: ContextMenuSub_default,
|
|
2603
|
+
VCContextMenuSubTrigger: ContextMenuSubTrigger_default,
|
|
2604
|
+
VCContextMenuSubContent: ContextMenuSubContent_default,
|
|
2605
|
+
VCToastProvider: ToastProvider_default,
|
|
2606
|
+
VCToaster: Toaster_default,
|
|
2607
|
+
VCToast: Toast_default,
|
|
2608
|
+
VCToastTitle: ToastTitle_default,
|
|
2609
|
+
VCToastDescription: ToastDescription_default,
|
|
2610
|
+
VCToastAction: ToastAction_default,
|
|
2611
|
+
VCToastClose: ToastClose_default
|
|
2612
|
+
}).forEach(([name, component]) => {
|
|
2613
|
+
app.component(name, component);
|
|
2614
|
+
});
|
|
2615
|
+
}
|
|
2616
|
+
var src_default = { install };
|
|
2617
|
+
//#endregion
|
|
2618
|
+
export { ContextMenu_default as VCContextMenu, ContextMenuCheckboxItem_default as VCContextMenuCheckboxItem, ContextMenuContent_default as VCContextMenuContent, ContextMenuGroup_default as VCContextMenuGroup, ContextMenuItem_default as VCContextMenuItem, ContextMenuItemIndicator_default as VCContextMenuItemIndicator, ContextMenuLabel_default as VCContextMenuLabel, ContextMenuRadioGroup_default as VCContextMenuRadioGroup, ContextMenuRadioItem_default as VCContextMenuRadioItem, ContextMenuSeparator_default as VCContextMenuSeparator, ContextMenuSub_default as VCContextMenuSub, ContextMenuSubContent_default as VCContextMenuSubContent, ContextMenuSubTrigger_default as VCContextMenuSubTrigger, ContextMenuTrigger_default as VCContextMenuTrigger, DropdownMenu_default as VCDropdownMenu, DropdownMenuArrow_default as VCDropdownMenuArrow, DropdownMenuCheckboxItem_default as VCDropdownMenuCheckboxItem, DropdownMenuContent_default as VCDropdownMenuContent, DropdownMenuGroup_default as VCDropdownMenuGroup, DropdownMenuItem_default as VCDropdownMenuItem, DropdownMenuItemIndicator_default as VCDropdownMenuItemIndicator, DropdownMenuLabel_default as VCDropdownMenuLabel, DropdownMenuRadioGroup_default as VCDropdownMenuRadioGroup, DropdownMenuRadioItem_default as VCDropdownMenuRadioItem, DropdownMenuSeparator_default as VCDropdownMenuSeparator, DropdownMenuSub_default as VCDropdownMenuSub, DropdownMenuSubContent_default as VCDropdownMenuSubContent, DropdownMenuSubTrigger_default as VCDropdownMenuSubTrigger, DropdownMenuTrigger_default as VCDropdownMenuTrigger, HoverCard_default as VCHoverCard, HoverCardArrow_default as VCHoverCardArrow, HoverCardContent_default as VCHoverCardContent, HoverCardTrigger_default as VCHoverCardTrigger, Modal_default as VCModal, ModalClose_default as VCModalClose, ModalContent_default as VCModalContent, ModalDescription_default as VCModalDescription, ModalTitle_default as VCModalTitle, ModalTrigger_default as VCModalTrigger, Popover_default as VCPopover, PopoverArrow_default as VCPopoverArrow, PopoverClose_default as VCPopoverClose, PopoverContent_default as VCPopoverContent, PopoverTrigger_default as VCPopoverTrigger, Presence_default as VCPresence, Toast_default as VCToast, ToastAction_default as VCToastAction, ToastClose_default as VCToastClose, ToastDescription_default as VCToastDescription, ToastProvider_default as VCToastProvider, ToastTitle_default as VCToastTitle, Toaster_default as VCToaster, Tooltip_default as VCTooltip, TooltipArrow_default as VCTooltipArrow, TooltipContent_default as VCTooltipContent, TooltipProvider_default as VCTooltipProvider, TooltipTrigger_default as VCTooltipTrigger, contextMenuThemeDefaults, src_default as default, dropdownMenuThemeDefaults, hoverCardThemeDefaults, install, modalThemeDefaults, popoverThemeDefaults, toastActionThemeDefaults, toastDescriptionThemeDefaults, toastThemeDefaults, toastTitleThemeDefaults, toastViewportThemeDefaults, tooltipThemeDefaults, useModal, useToast };
|
|
2619
|
+
|
|
2620
|
+
//# sourceMappingURL=index.mjs.map
|