@wirekyt/vue 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.cjs +273 -0
- package/dist/accordion.d.cts +195 -0
- package/dist/accordion.d.ts +195 -0
- package/dist/accordion.js +250 -0
- package/dist/angle-slider.cjs +268 -0
- package/dist/angle-slider.d.cts +228 -0
- package/dist/angle-slider.d.ts +228 -0
- package/dist/angle-slider.js +244 -0
- package/dist/avatar.cjs +145 -0
- package/dist/avatar.d.cts +114 -0
- package/dist/avatar.d.ts +114 -0
- package/dist/avatar.js +126 -0
- package/dist/boolean-BCaEpMxQ.js +6 -0
- package/dist/boolean-Dyu9-5Wp.cjs +11 -0
- package/dist/carousel.cjs +342 -0
- package/dist/carousel.d.cts +303 -0
- package/dist/carousel.d.ts +303 -0
- package/dist/carousel.js +320 -0
- package/dist/checkbox.cjs +345 -0
- package/dist/checkbox.d.cts +272 -0
- package/dist/checkbox.d.ts +272 -0
- package/dist/checkbox.js +324 -0
- package/dist/clean-props--1kqQE0Y.js +8 -0
- package/dist/clean-props-MyKqus13.cjs +13 -0
- package/dist/client-only.cjs +17 -0
- package/dist/client-only.d.cts +18 -0
- package/dist/client-only.d.ts +18 -0
- package/dist/client-only.js +16 -0
- package/dist/clipboard.cjs +229 -0
- package/dist/clipboard.d.cts +203 -0
- package/dist/clipboard.d.ts +203 -0
- package/dist/clipboard.js +206 -0
- package/dist/collapsible-CEjnJlpm.js +179 -0
- package/dist/collapsible-aSz4kYqo.cjs +232 -0
- package/dist/collapsible.cjs +23 -0
- package/dist/collapsible.d.cts +161 -0
- package/dist/collapsible.d.ts +161 -0
- package/dist/collapsible.js +2 -0
- package/dist/collection-1IjtyI-g.cjs +254 -0
- package/dist/collection-Ea6ZCZKK.js +211 -0
- package/dist/collection.cjs +9 -0
- package/dist/collection.d.cts +2 -0
- package/dist/collection.d.ts +2 -0
- package/dist/collection.js +2 -0
- package/dist/color-picker.cjs +804 -0
- package/dist/color-picker.d.cts +605 -0
- package/dist/color-picker.d.ts +605 -0
- package/dist/color-picker.js +759 -0
- package/dist/combobox.cjs +552 -0
- package/dist/combobox.d.cts +442 -0
- package/dist/combobox.d.ts +442 -0
- package/dist/combobox.js +521 -0
- package/dist/create-split-props-BBxrD7TV.js +10 -0
- package/dist/create-split-props-Jx-IEwdk.cjs +15 -0
- package/dist/date-input.cjs +293 -0
- package/dist/date-input.d.cts +212 -0
- package/dist/date-input.d.ts +212 -0
- package/dist/date-input.js +270 -0
- package/dist/date-picker.cjs +821 -0
- package/dist/date-picker.d.cts +637 -0
- package/dist/date-picker.d.ts +637 -0
- package/dist/date-picker.js +776 -0
- package/dist/dialog.cjs +333 -0
- package/dist/dialog.d.cts +272 -0
- package/dist/dialog.d.ts +272 -0
- package/dist/dialog.js +308 -0
- package/dist/download-trigger.cjs +65 -0
- package/dist/download-trigger.d.cts +34 -0
- package/dist/download-trigger.d.ts +34 -0
- package/dist/download-trigger.js +63 -0
- package/dist/drawer.cjs +448 -0
- package/dist/drawer.d.cts +346 -0
- package/dist/drawer.d.ts +346 -0
- package/dist/drawer.js +415 -0
- package/dist/editable.cjs +331 -0
- package/dist/editable.d.cts +285 -0
- package/dist/editable.d.ts +285 -0
- package/dist/editable.js +306 -0
- package/dist/factory-8Ao0DEy3.js +34 -0
- package/dist/factory-BNwuanv4.d.cts +21 -0
- package/dist/factory-BNwuanv4.d.ts +21 -0
- package/dist/factory-JL7MPjkk.cjs +45 -0
- package/dist/field-C3pLqz1S.js +435 -0
- package/dist/field-DRz-v4rB.cjs +524 -0
- package/dist/field.cjs +22 -0
- package/dist/field.d.cts +344 -0
- package/dist/field.d.ts +344 -0
- package/dist/field.js +2 -0
- package/dist/fieldset-ByP_r1Uq.js +216 -0
- package/dist/fieldset-C5aj6Ims.cjs +275 -0
- package/dist/fieldset.cjs +17 -0
- package/dist/fieldset.d.cts +159 -0
- package/dist/fieldset.d.ts +159 -0
- package/dist/fieldset.js +2 -0
- package/dist/file-upload.cjs +421 -0
- package/dist/file-upload.d.cts +327 -0
- package/dist/file-upload.d.ts +327 -0
- package/dist/file-upload.js +392 -0
- package/dist/floating-panel.cjs +412 -0
- package/dist/floating-panel.d.cts +337 -0
- package/dist/floating-panel.d.ts +337 -0
- package/dist/floating-panel.js +383 -0
- package/dist/focus-trap.cjs +79 -0
- package/dist/focus-trap.d.cts +46 -0
- package/dist/focus-trap.d.ts +46 -0
- package/dist/focus-trap.js +78 -0
- package/dist/format.cjs +116 -0
- package/dist/format.d.cts +46 -0
- package/dist/format.d.ts +46 -0
- package/dist/format.js +106 -0
- package/dist/frame.cjs +93 -0
- package/dist/frame.d.cts +37 -0
- package/dist/frame.d.ts +37 -0
- package/dist/frame.js +92 -0
- package/dist/highlight.cjs +44 -0
- package/dist/highlight.d.cts +32 -0
- package/dist/highlight.d.ts +32 -0
- package/dist/highlight.js +42 -0
- package/dist/hover-card.cjs +269 -0
- package/dist/hover-card.d.cts +202 -0
- package/dist/hover-card.d.ts +202 -0
- package/dist/hover-card.js +246 -0
- package/dist/image-cropper.cjs +252 -0
- package/dist/image-cropper.d.cts +207 -0
- package/dist/image-cropper.d.ts +207 -0
- package/dist/image-cropper.js +235 -0
- package/dist/index-B-o8jLyV.d.cts +31 -0
- package/dist/index-BSoF1D-v.d.ts +31 -0
- package/dist/index-BTNfeIXf.d.ts +104 -0
- package/dist/index-C6Q2DqG6.d.ts +37 -0
- package/dist/index-CG9mpPgL.d.cts +444 -0
- package/dist/index-Cc4qS0rQ.d.cts +38 -0
- package/dist/index-Cc4qS0rQ.d.ts +38 -0
- package/dist/index-DB2uALlJ.d.cts +74 -0
- package/dist/index-DXb0W_NP.d.cts +37 -0
- package/dist/index-Zc9P69Ka.d.cts +104 -0
- package/dist/index-aMWdJRGL.d.ts +444 -0
- package/dist/index-uLE-tXSk.d.ts +74 -0
- package/dist/index.cjs +43 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +7 -0
- package/dist/json-tree-view.cjs +346 -0
- package/dist/json-tree-view.d.cts +86 -0
- package/dist/json-tree-view.d.ts +86 -0
- package/dist/json-tree-view.js +336 -0
- package/dist/listbox.cjs +386 -0
- package/dist/listbox.d.cts +323 -0
- package/dist/listbox.d.ts +323 -0
- package/dist/listbox.js +361 -0
- package/dist/marquee.cjs +256 -0
- package/dist/marquee.d.cts +208 -0
- package/dist/marquee.d.ts +208 -0
- package/dist/marquee.js +235 -0
- package/dist/menu.cjs +650 -0
- package/dist/menu.d.cts +501 -0
- package/dist/menu.d.ts +501 -0
- package/dist/menu.js +613 -0
- package/dist/navigation-menu.cjs +408 -0
- package/dist/navigation-menu.d.cts +271 -0
- package/dist/navigation-menu.d.ts +271 -0
- package/dist/navigation-menu.js +380 -0
- package/dist/number-input.cjs +298 -0
- package/dist/number-input.d.cts +253 -0
- package/dist/number-input.d.ts +253 -0
- package/dist/number-input.js +274 -0
- package/dist/pagination.cjs +249 -0
- package/dist/pagination.d.cts +209 -0
- package/dist/pagination.d.ts +209 -0
- package/dist/pagination.js +226 -0
- package/dist/password-input.cjs +232 -0
- package/dist/password-input.d.cts +208 -0
- package/dist/password-input.d.ts +208 -0
- package/dist/password-input.js +210 -0
- package/dist/pin-input.cjs +245 -0
- package/dist/pin-input.d.cts +199 -0
- package/dist/pin-input.d.ts +199 -0
- package/dist/pin-input.js +224 -0
- package/dist/popover.cjs +377 -0
- package/dist/popover.d.cts +324 -0
- package/dist/popover.d.ts +324 -0
- package/dist/popover.js +349 -0
- package/dist/presence-DD3l4Tgb.cjs +60 -0
- package/dist/presence-jaHZaD_O.js +43 -0
- package/dist/presence.cjs +7 -0
- package/dist/presence.d.cts +3 -0
- package/dist/presence.d.ts +3 -0
- package/dist/presence.js +3 -0
- package/dist/progress.cjs +270 -0
- package/dist/progress.d.cts +229 -0
- package/dist/progress.d.ts +229 -0
- package/dist/progress.js +245 -0
- package/dist/providers-5QhcwgSd.cjs +190 -0
- package/dist/providers-C3XQH-uu.js +119 -0
- package/dist/qr-code.cjs +195 -0
- package/dist/qr-code.d.cts +157 -0
- package/dist/qr-code.d.ts +157 -0
- package/dist/qr-code.js +174 -0
- package/dist/radio-group.cjs +274 -0
- package/dist/radio-group.d.cts +230 -0
- package/dist/radio-group.d.ts +230 -0
- package/dist/radio-group.js +249 -0
- package/dist/rating-group.cjs +243 -0
- package/dist/rating-group.d.cts +200 -0
- package/dist/rating-group.d.ts +200 -0
- package/dist/rating-group.js +220 -0
- package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
- package/dist/rolldown-runtime-DakpK96I.cjs +43 -0
- package/dist/scroll-area.cjs +206 -0
- package/dist/scroll-area.d.cts +169 -0
- package/dist/scroll-area.d.ts +169 -0
- package/dist/scroll-area.js +184 -0
- package/dist/segment-group.cjs +318 -0
- package/dist/segment-group.d.cts +229 -0
- package/dist/segment-group.d.ts +229 -0
- package/dist/segment-group.js +298 -0
- package/dist/select.cjs +560 -0
- package/dist/select.d.cts +430 -0
- package/dist/select.d.ts +430 -0
- package/dist/select.js +523 -0
- package/dist/signature-pad.cjs +260 -0
- package/dist/signature-pad.d.cts +200 -0
- package/dist/signature-pad.d.ts +200 -0
- package/dist/signature-pad.js +237 -0
- package/dist/slider.cjs +350 -0
- package/dist/slider.d.cts +299 -0
- package/dist/slider.d.ts +299 -0
- package/dist/slider.js +323 -0
- package/dist/splitter.cjs +225 -0
- package/dist/splitter.d.cts +166 -0
- package/dist/splitter.d.ts +166 -0
- package/dist/splitter.js +198 -0
- package/dist/steps.cjs +348 -0
- package/dist/steps.d.cts +289 -0
- package/dist/steps.d.ts +289 -0
- package/dist/steps.js +319 -0
- package/dist/swap.cjs +154 -0
- package/dist/swap.d.cts +98 -0
- package/dist/swap.d.ts +98 -0
- package/dist/swap.js +141 -0
- package/dist/switch.cjs +213 -0
- package/dist/switch.d.cts +177 -0
- package/dist/switch.d.ts +177 -0
- package/dist/switch.js +192 -0
- package/dist/tabs.cjs +240 -0
- package/dist/tabs.d.cts +179 -0
- package/dist/tabs.d.ts +179 -0
- package/dist/tabs.js +218 -0
- package/dist/tags-input.cjs +405 -0
- package/dist/tags-input.d.cts +340 -0
- package/dist/tags-input.d.ts +340 -0
- package/dist/tags-input.js +376 -0
- package/dist/timer.cjs +221 -0
- package/dist/timer.d.cts +176 -0
- package/dist/timer.d.ts +176 -0
- package/dist/timer.js +199 -0
- package/dist/toast.cjs +211 -0
- package/dist/toast.d.cts +157 -0
- package/dist/toast.d.ts +157 -0
- package/dist/toast.js +189 -0
- package/dist/toggle-group.cjs +150 -0
- package/dist/toggle-group.d.cts +122 -0
- package/dist/toggle-group.d.ts +122 -0
- package/dist/toggle-group.js +132 -0
- package/dist/toggle.cjs +107 -0
- package/dist/toggle.d.cts +98 -0
- package/dist/toggle.d.ts +98 -0
- package/dist/toggle.js +94 -0
- package/dist/tooltip.cjs +265 -0
- package/dist/tooltip.d.cts +204 -0
- package/dist/tooltip.d.ts +204 -0
- package/dist/tooltip.js +242 -0
- package/dist/tour.cjs +418 -0
- package/dist/tour.d.cts +304 -0
- package/dist/tour.d.ts +304 -0
- package/dist/tour.js +374 -0
- package/dist/tree-view-CWH9tv7s.cjs +651 -0
- package/dist/tree-view-CZcXMwi6.js +508 -0
- package/dist/tree-view.cjs +41 -0
- package/dist/tree-view.d.cts +3 -0
- package/dist/tree-view.d.ts +3 -0
- package/dist/tree-view.js +3 -0
- package/dist/types-rSRkzyd6.d.cts +13 -0
- package/dist/types-rSRkzyd6.d.ts +13 -0
- package/dist/use-presence-BSp_dR-C.d.cts +22 -0
- package/dist/use-presence-CtEY6ZT8.cjs +49 -0
- package/dist/use-presence-DkGU_j9h.d.ts +22 -0
- package/dist/use-presence-oNdFU2c2.js +42 -0
- package/dist/utils-D95V66v9.js +548 -0
- package/dist/utils-XrBZd2Yk.cjs +625 -0
- package/package.json +278 -6
package/dist/tooltip.js
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
|
|
2
|
+
import { a as mergeProps$1, c as normalizeProps$1, d as useForwardExpose, m as createContext, n as RenderStrategyPropsProvider, s as useMachine } from "./utils-D95V66v9.js";
|
|
3
|
+
import { a as DEFAULT_LOCALE, d as useEnvironmentContext, o as useLocaleContext, u as DEFAULT_ENVIRONMENT } from "./providers-C3XQH-uu.js";
|
|
4
|
+
import { t as cleanProps } from "./clean-props--1kqQE0Y.js";
|
|
5
|
+
import { n as wire } from "./factory-8Ao0DEy3.js";
|
|
6
|
+
import { n as PresenceProvider, r as usePresenceContext } from "./presence-jaHZaD_O.js";
|
|
7
|
+
import { t as usePresence } from "./use-presence-oNdFU2c2.js";
|
|
8
|
+
import { computed, createBlock, createCommentVNode, defineComponent, guardReactiveProps, mergeDefaults, mergeProps, normalizeProps, openBlock, renderSlot, toValue, unref, useId, withCtx } from "vue";
|
|
9
|
+
import * as tooltip from "@wirekyt/dom/machines/tooltip";
|
|
10
|
+
import { anatomy as tooltipAnatomy } from "@wirekyt/dom/machines/tooltip";
|
|
11
|
+
//#region src/components/tooltip/use-context.ts
|
|
12
|
+
const [TooltipProvider, useTooltipContext] = createContext("TooltipContext");
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/components/tooltip/arrow-tip.vue
|
|
15
|
+
const _sfc_main$1 = /*@__PURE__*/ defineComponent({
|
|
16
|
+
__name: "arrow-tip",
|
|
17
|
+
props: { asChild: { type: Boolean } },
|
|
18
|
+
setup(__props) {
|
|
19
|
+
const tooltip = useTooltipContext();
|
|
20
|
+
useForwardExpose();
|
|
21
|
+
return (_ctx, _cache) => {
|
|
22
|
+
return openBlock(), createBlock(unref(wire).div, mergeProps(unref(tooltip).getArrowTipProps(), { "as-child": __props.asChild }), {
|
|
23
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 16, ["as-child"]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/tooltip/arrow.vue
|
|
31
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
32
|
+
__name: "arrow",
|
|
33
|
+
props: { asChild: { type: Boolean } },
|
|
34
|
+
setup(__props) {
|
|
35
|
+
const tooltip = useTooltipContext();
|
|
36
|
+
useForwardExpose();
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(unref(wire).div, mergeProps(unref(tooltip).getArrowProps(), { "as-child": __props.asChild }), {
|
|
39
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 16, ["as-child"]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/components/tooltip/content.vue
|
|
47
|
+
const _sfc_main$2 = /*@__PURE__*/ defineComponent({
|
|
48
|
+
__name: "content",
|
|
49
|
+
props: { asChild: { type: Boolean } },
|
|
50
|
+
setup(__props) {
|
|
51
|
+
const tooltip = useTooltipContext();
|
|
52
|
+
const presence = usePresenceContext();
|
|
53
|
+
const mergedProps = computed(() => mergeProps$1(tooltip.value.getContentProps(), presence.value.presenceProps));
|
|
54
|
+
useForwardExpose();
|
|
55
|
+
return (_ctx, _cache) => {
|
|
56
|
+
return !unref(presence).unmounted ? (openBlock(), createBlock(unref(wire).div, mergeProps({ key: 0 }, mergedProps.value, { "as-child": __props.asChild }), {
|
|
57
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/tooltip/context.vue
|
|
65
|
+
const _sfc_main$3 = /*@__PURE__*/ defineComponent({
|
|
66
|
+
__name: "context",
|
|
67
|
+
setup(__props) {
|
|
68
|
+
const tooltip = useTooltipContext();
|
|
69
|
+
return (_ctx, _cache) => {
|
|
70
|
+
return renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(unref(tooltip))));
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//#endregion
|
|
75
|
+
//#region src/components/tooltip/positioner.vue
|
|
76
|
+
const _sfc_main$4 = /*@__PURE__*/ defineComponent({
|
|
77
|
+
__name: "positioner",
|
|
78
|
+
props: { asChild: { type: Boolean } },
|
|
79
|
+
setup(__props) {
|
|
80
|
+
const tooltip = useTooltipContext();
|
|
81
|
+
const presence = usePresenceContext();
|
|
82
|
+
useForwardExpose();
|
|
83
|
+
return (_ctx, _cache) => {
|
|
84
|
+
return !unref(presence).unmounted ? (openBlock(), createBlock(unref(wire).div, mergeProps({ key: 0 }, unref(tooltip).getPositionerProps(), { "as-child": __props.asChild }), {
|
|
85
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
86
|
+
_: 3
|
|
87
|
+
}, 16, ["as-child"])) : createCommentVNode("v-if", true);
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
//#endregion
|
|
92
|
+
//#region src/components/tooltip/root-provider.vue
|
|
93
|
+
const _sfc_main$6 = /*@__PURE__*/ defineComponent({
|
|
94
|
+
__name: "root-provider",
|
|
95
|
+
props: {
|
|
96
|
+
value: {},
|
|
97
|
+
lazyMount: { type: Boolean },
|
|
98
|
+
unmountOnExit: { type: Boolean }
|
|
99
|
+
},
|
|
100
|
+
emits: ["exitComplete"],
|
|
101
|
+
setup(__props, { emit: __emit }) {
|
|
102
|
+
const props = __props;
|
|
103
|
+
const emits = __emit;
|
|
104
|
+
const tooltip = computed(() => props.value);
|
|
105
|
+
const presence = usePresence(computed(() => ({
|
|
106
|
+
present: tooltip.value.open,
|
|
107
|
+
lazyMount: props.lazyMount,
|
|
108
|
+
unmountOnExit: props.unmountOnExit
|
|
109
|
+
})), emits);
|
|
110
|
+
TooltipProvider(tooltip);
|
|
111
|
+
PresenceProvider(presence);
|
|
112
|
+
RenderStrategyPropsProvider(computed(() => ({
|
|
113
|
+
lazyMount: props.lazyMount,
|
|
114
|
+
unmountOnExit: props.unmountOnExit
|
|
115
|
+
})));
|
|
116
|
+
useForwardExpose();
|
|
117
|
+
return (_ctx, _cache) => {
|
|
118
|
+
return renderSlot(_ctx.$slots, "default");
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/components/tooltip/use-tooltip.ts
|
|
124
|
+
const useTooltip = (props = {}, emit) => {
|
|
125
|
+
const id = useId();
|
|
126
|
+
const env = useEnvironmentContext(DEFAULT_ENVIRONMENT);
|
|
127
|
+
const locale = useLocaleContext(DEFAULT_LOCALE);
|
|
128
|
+
const context = computed(() => {
|
|
129
|
+
const localProps = toValue(props);
|
|
130
|
+
return {
|
|
131
|
+
id,
|
|
132
|
+
dir: locale.value.dir,
|
|
133
|
+
getRootNode: env?.value.getRootNode,
|
|
134
|
+
...cleanProps(localProps),
|
|
135
|
+
onOpenChange: (details) => {
|
|
136
|
+
emit?.("openChange", details);
|
|
137
|
+
emit?.("update:open", details.open);
|
|
138
|
+
localProps.onOpenChange?.(details);
|
|
139
|
+
},
|
|
140
|
+
onTriggerValueChange: (details) => {
|
|
141
|
+
emit?.("triggerValueChange", details);
|
|
142
|
+
localProps.onTriggerValueChange?.(details);
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
});
|
|
146
|
+
const service = useMachine(tooltip.machine, context);
|
|
147
|
+
return computed(() => tooltip.connect(service, normalizeProps$1));
|
|
148
|
+
};
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/components/tooltip/root.vue
|
|
151
|
+
const _sfc_main$5 = /*@__PURE__*/ defineComponent({
|
|
152
|
+
__name: "root",
|
|
153
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
154
|
+
"aria-label": {},
|
|
155
|
+
closeDelay: {},
|
|
156
|
+
closeOnClick: { type: Boolean },
|
|
157
|
+
closeOnEscape: { type: Boolean },
|
|
158
|
+
closeOnPointerDown: { type: Boolean },
|
|
159
|
+
closeOnScroll: { type: Boolean },
|
|
160
|
+
defaultOpen: { type: Boolean },
|
|
161
|
+
disabled: { type: Boolean },
|
|
162
|
+
id: {},
|
|
163
|
+
ids: {},
|
|
164
|
+
interactive: { type: Boolean },
|
|
165
|
+
open: { type: Boolean },
|
|
166
|
+
openDelay: {},
|
|
167
|
+
positioning: {},
|
|
168
|
+
triggerValue: {},
|
|
169
|
+
defaultTriggerValue: {},
|
|
170
|
+
lazyMount: { type: Boolean },
|
|
171
|
+
unmountOnExit: { type: Boolean }
|
|
172
|
+
}, {
|
|
173
|
+
closeOnClick: void 0,
|
|
174
|
+
closeOnEscape: void 0,
|
|
175
|
+
closeOnPointerDown: void 0,
|
|
176
|
+
closeOnScroll: void 0,
|
|
177
|
+
defaultOpen: void 0,
|
|
178
|
+
disabled: void 0,
|
|
179
|
+
interactive: void 0,
|
|
180
|
+
open: void 0
|
|
181
|
+
}),
|
|
182
|
+
emits: [
|
|
183
|
+
"exitComplete",
|
|
184
|
+
"openChange",
|
|
185
|
+
"triggerValueChange",
|
|
186
|
+
"update:open"
|
|
187
|
+
],
|
|
188
|
+
setup(__props, { emit: __emit }) {
|
|
189
|
+
const props = __props;
|
|
190
|
+
const emits = __emit;
|
|
191
|
+
const tooltip = useTooltip(props, emits);
|
|
192
|
+
const presence = usePresence(computed(() => ({
|
|
193
|
+
present: tooltip.value.open,
|
|
194
|
+
lazyMount: props.lazyMount,
|
|
195
|
+
unmountOnExit: props.unmountOnExit
|
|
196
|
+
})), emits);
|
|
197
|
+
TooltipProvider(tooltip);
|
|
198
|
+
PresenceProvider(presence);
|
|
199
|
+
RenderStrategyPropsProvider(computed(() => ({
|
|
200
|
+
lazyMount: props.lazyMount,
|
|
201
|
+
unmountOnExit: props.unmountOnExit
|
|
202
|
+
})));
|
|
203
|
+
useForwardExpose();
|
|
204
|
+
return (_ctx, _cache) => {
|
|
205
|
+
return renderSlot(_ctx.$slots, "default");
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
//#endregion
|
|
210
|
+
//#region src/components/tooltip/trigger.vue
|
|
211
|
+
const _sfc_main$7 = /*@__PURE__*/ defineComponent({
|
|
212
|
+
__name: "trigger",
|
|
213
|
+
props: {
|
|
214
|
+
value: {},
|
|
215
|
+
asChild: { type: Boolean }
|
|
216
|
+
},
|
|
217
|
+
setup(__props) {
|
|
218
|
+
const props = __props;
|
|
219
|
+
const tooltip = useTooltipContext();
|
|
220
|
+
useForwardExpose();
|
|
221
|
+
return (_ctx, _cache) => {
|
|
222
|
+
return openBlock(), createBlock(unref(wire).button, mergeProps(unref(tooltip).getTriggerProps(props), { "as-child": __props.asChild }), {
|
|
223
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
224
|
+
_: 3
|
|
225
|
+
}, 16, ["as-child"]);
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/components/tooltip/tooltip.ts
|
|
231
|
+
var tooltip_exports = /* @__PURE__ */ __exportAll({
|
|
232
|
+
Arrow: () => _sfc_main,
|
|
233
|
+
ArrowTip: () => _sfc_main$1,
|
|
234
|
+
Content: () => _sfc_main$2,
|
|
235
|
+
Context: () => _sfc_main$3,
|
|
236
|
+
Positioner: () => _sfc_main$4,
|
|
237
|
+
Root: () => _sfc_main$5,
|
|
238
|
+
RootProvider: () => _sfc_main$6,
|
|
239
|
+
Trigger: () => _sfc_main$7
|
|
240
|
+
});
|
|
241
|
+
//#endregion
|
|
242
|
+
export { tooltip_exports as Tooltip, _sfc_main as TooltipArrow, _sfc_main$1 as TooltipArrowTip, _sfc_main$2 as TooltipContent, _sfc_main$3 as TooltipContext, _sfc_main$4 as TooltipPositioner, _sfc_main$5 as TooltipRoot, _sfc_main$6 as TooltipRootProvider, _sfc_main$7 as TooltipTrigger, tooltipAnatomy, useTooltip, useTooltipContext };
|
package/dist/tour.cjs
ADDED
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
|
|
3
|
+
const require_utils = require("./utils-XrBZd2Yk.cjs");
|
|
4
|
+
const require_providers = require("./providers-5QhcwgSd.cjs");
|
|
5
|
+
const require_clean_props = require("./clean-props-MyKqus13.cjs");
|
|
6
|
+
const require_factory = require("./factory-JL7MPjkk.cjs");
|
|
7
|
+
const require_presence = require("./presence-DD3l4Tgb.cjs");
|
|
8
|
+
const require_use_presence = require("./use-presence-CtEY6ZT8.cjs");
|
|
9
|
+
let vue = require("vue");
|
|
10
|
+
let _wirekyt_dom_machines_tour = require("@wirekyt/dom/machines/tour");
|
|
11
|
+
_wirekyt_dom_machines_tour = require_rolldown_runtime.__toESM(_wirekyt_dom_machines_tour, 1);
|
|
12
|
+
let _wirekyt_dom = require("@wirekyt/dom");
|
|
13
|
+
//#region src/components/tour/wait-for-event.ts
|
|
14
|
+
function waitForEvent(target, event, options) {
|
|
15
|
+
let cleanup;
|
|
16
|
+
const { predicate, ...listenerOptions } = options ?? {};
|
|
17
|
+
return [new Promise((resolve) => {
|
|
18
|
+
const element = target?.();
|
|
19
|
+
if (!element) return;
|
|
20
|
+
const handler = (e) => {
|
|
21
|
+
if (!predicate || predicate(element)) {
|
|
22
|
+
resolve(e);
|
|
23
|
+
cleanup?.();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
element.addEventListener(event, handler, listenerOptions);
|
|
27
|
+
cleanup = () => element.removeEventListener(event, handler, listenerOptions);
|
|
28
|
+
}), () => cleanup?.()];
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/tour/use-context.ts
|
|
32
|
+
const [TourProvider, useTourContext] = require_utils.createContext("TourContext");
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region src/components/tour/action-trigger.vue
|
|
35
|
+
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
36
|
+
__name: "action-trigger",
|
|
37
|
+
props: {
|
|
38
|
+
action: {},
|
|
39
|
+
asChild: { type: Boolean }
|
|
40
|
+
},
|
|
41
|
+
setup(__props) {
|
|
42
|
+
const props = __props;
|
|
43
|
+
const tour = useTourContext();
|
|
44
|
+
const slots = (0, vue.useSlots)();
|
|
45
|
+
require_utils.useForwardExpose();
|
|
46
|
+
return (_ctx, _cache) => {
|
|
47
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(tour).getActionTriggerProps(props), { "as-child": __props.asChild }), {
|
|
48
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(slots.default?.() || props.action.label), 1)])]),
|
|
49
|
+
_: 3
|
|
50
|
+
}, 16, ["as-child"]);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/components/tour/actions.vue
|
|
56
|
+
const _sfc_main$1 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
57
|
+
__name: "actions",
|
|
58
|
+
setup(__props) {
|
|
59
|
+
const tour = useTourContext();
|
|
60
|
+
return (_ctx, _cache) => {
|
|
61
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(tour).step?.actions ?? [])));
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/tour/arrow-tip.vue
|
|
67
|
+
const _sfc_main$3 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
68
|
+
__name: "arrow-tip",
|
|
69
|
+
props: { asChild: { type: Boolean } },
|
|
70
|
+
setup(__props) {
|
|
71
|
+
const tour = useTourContext();
|
|
72
|
+
require_utils.useForwardExpose();
|
|
73
|
+
return (_ctx, _cache) => {
|
|
74
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(tour).getArrowTipProps(), { "as-child": __props.asChild }), {
|
|
75
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 16, ["as-child"]);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/components/tour/arrow.vue
|
|
83
|
+
const _sfc_main$2 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
84
|
+
__name: "arrow",
|
|
85
|
+
props: { asChild: { type: Boolean } },
|
|
86
|
+
setup(__props) {
|
|
87
|
+
const tour = useTourContext();
|
|
88
|
+
require_utils.useForwardExpose();
|
|
89
|
+
return (_ctx, _cache) => {
|
|
90
|
+
return (0, vue.unref)(tour).step?.arrow ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(tour).getArrowProps(), { "as-child": __props.asChild }), {
|
|
91
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/components/tour/backdrop.vue
|
|
99
|
+
const _sfc_main$4 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
100
|
+
__name: "backdrop",
|
|
101
|
+
props: { asChild: { type: Boolean } },
|
|
102
|
+
setup(__props) {
|
|
103
|
+
const tour = useTourContext();
|
|
104
|
+
const renderStrategy = require_utils.useRenderStrategyProps();
|
|
105
|
+
const presence = require_use_presence.usePresence((0, vue.computed)(() => ({
|
|
106
|
+
...renderStrategy.value,
|
|
107
|
+
present: tour.value.open
|
|
108
|
+
})));
|
|
109
|
+
const mergedProps = (0, vue.computed)(() => (0, _wirekyt_dom.mergeProps)(tour.value.getBackdropProps(), presence.value.presenceProps));
|
|
110
|
+
require_utils.useForwardExpose();
|
|
111
|
+
return (_ctx, _cache) => {
|
|
112
|
+
return (0, vue.unref)(tour).step?.backdrop && !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, mergedProps.value, { "as-child": __props.asChild }), {
|
|
113
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
114
|
+
_: 3
|
|
115
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
//#region src/components/tour/close-trigger.vue
|
|
121
|
+
const _sfc_main$5 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
122
|
+
__name: "close-trigger",
|
|
123
|
+
props: { asChild: { type: Boolean } },
|
|
124
|
+
setup(__props) {
|
|
125
|
+
const tour = useTourContext();
|
|
126
|
+
require_utils.useForwardExpose();
|
|
127
|
+
return (_ctx, _cache) => {
|
|
128
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).button, (0, vue.mergeProps)((0, vue.unref)(tour).getCloseTriggerProps(), { "as-child": __props.asChild }), {
|
|
129
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
130
|
+
_: 3
|
|
131
|
+
}, 16, ["as-child"]);
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
136
|
+
//#region src/components/tour/content.vue
|
|
137
|
+
const _sfc_main$6 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
138
|
+
__name: "content",
|
|
139
|
+
props: { asChild: { type: Boolean } },
|
|
140
|
+
setup(__props) {
|
|
141
|
+
const tour = useTourContext();
|
|
142
|
+
const presence = require_presence.usePresenceContext();
|
|
143
|
+
const mergedProps = (0, vue.computed)(() => (0, _wirekyt_dom.mergeProps)(tour.value.getContentProps(), presence.value.presenceProps));
|
|
144
|
+
require_utils.useForwardExpose();
|
|
145
|
+
return (_ctx, _cache) => {
|
|
146
|
+
return !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, mergedProps.value, { "as-child": __props.asChild }), {
|
|
147
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
148
|
+
_: 3
|
|
149
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/components/tour/context.vue
|
|
155
|
+
const _sfc_main$7 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
156
|
+
__name: "context",
|
|
157
|
+
setup(__props) {
|
|
158
|
+
const tour = useTourContext();
|
|
159
|
+
return (_ctx, _cache) => {
|
|
160
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default", (0, vue.normalizeProps)((0, vue.guardReactiveProps)((0, vue.unref)(tour))));
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region src/components/tour/anatomy.ts
|
|
166
|
+
const tourAnatomy = _wirekyt_dom_machines_tour.anatomy.extendWith("control");
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region src/components/tour/control.vue
|
|
169
|
+
const _sfc_main$8 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
170
|
+
__name: "control",
|
|
171
|
+
props: { asChild: { type: Boolean } },
|
|
172
|
+
setup(__props) {
|
|
173
|
+
require_utils.useForwardExpose();
|
|
174
|
+
return (_ctx, _cache) => {
|
|
175
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ ...(0, vue.unref)(tourAnatomy).build().control.attrs }, { "as-child": __props.asChild }), {
|
|
176
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
177
|
+
_: 3
|
|
178
|
+
}, 16, ["as-child"]);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
//#endregion
|
|
183
|
+
//#region src/components/tour/description.vue
|
|
184
|
+
const _sfc_main$9 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
185
|
+
__name: "description",
|
|
186
|
+
props: { asChild: { type: Boolean } },
|
|
187
|
+
setup(__props) {
|
|
188
|
+
const tour = useTourContext();
|
|
189
|
+
const slots = (0, vue.useSlots)();
|
|
190
|
+
require_utils.useForwardExpose();
|
|
191
|
+
return (_ctx, _cache) => {
|
|
192
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(tour).getDescriptionProps(), { "as-child": __props.asChild }), {
|
|
193
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(slots.default?.() || (0, vue.unref)(tour).step?.description), 1)])]),
|
|
194
|
+
_: 3
|
|
195
|
+
}, 16, ["as-child"]);
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/components/tour/positioner.vue
|
|
201
|
+
const _sfc_main$10 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
202
|
+
__name: "positioner",
|
|
203
|
+
props: { asChild: { type: Boolean } },
|
|
204
|
+
setup(__props) {
|
|
205
|
+
const tour = useTourContext();
|
|
206
|
+
const presence = require_presence.usePresenceContext();
|
|
207
|
+
require_utils.useForwardExpose();
|
|
208
|
+
return (_ctx, _cache) => {
|
|
209
|
+
return !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(tour).getPositionerProps(), { "as-child": __props.asChild }), {
|
|
210
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
211
|
+
_: 3
|
|
212
|
+
}, 16, ["as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/components/tour/progress-text.vue
|
|
218
|
+
const _sfc_main$11 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
219
|
+
__name: "progress-text",
|
|
220
|
+
props: { asChild: { type: Boolean } },
|
|
221
|
+
setup(__props) {
|
|
222
|
+
const tour = useTourContext();
|
|
223
|
+
const slots = (0, vue.useSlots)();
|
|
224
|
+
require_utils.useForwardExpose();
|
|
225
|
+
return (_ctx, _cache) => {
|
|
226
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)((0, vue.unref)(tour).getProgressTextProps(), { "as-child": __props.asChild }), {
|
|
227
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(slots.default?.() || (0, vue.unref)(tour).getProgressText()), 1)])]),
|
|
228
|
+
_: 3
|
|
229
|
+
}, 16, ["as-child"]);
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/components/tour/root.vue
|
|
235
|
+
const _sfc_main$12 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
236
|
+
__name: "root",
|
|
237
|
+
props: {
|
|
238
|
+
tour: {},
|
|
239
|
+
lazyMount: { type: Boolean },
|
|
240
|
+
unmountOnExit: { type: Boolean }
|
|
241
|
+
},
|
|
242
|
+
emits: [
|
|
243
|
+
"exitComplete",
|
|
244
|
+
"focusOutside",
|
|
245
|
+
"interactOutside",
|
|
246
|
+
"pointerDownOutside",
|
|
247
|
+
"statusChange",
|
|
248
|
+
"stepChange",
|
|
249
|
+
"stepsChange"
|
|
250
|
+
],
|
|
251
|
+
setup(__props, { emit: __emit }) {
|
|
252
|
+
const props = __props;
|
|
253
|
+
const emits = __emit;
|
|
254
|
+
const tour = (0, vue.computed)(() => props.tour);
|
|
255
|
+
const presence = require_use_presence.usePresence((0, vue.computed)(() => ({
|
|
256
|
+
present: tour.value.open,
|
|
257
|
+
lazyMount: props.lazyMount,
|
|
258
|
+
unmountOnExit: props.unmountOnExit
|
|
259
|
+
})), emits);
|
|
260
|
+
TourProvider(tour);
|
|
261
|
+
require_presence.PresenceProvider(presence);
|
|
262
|
+
require_utils.RenderStrategyPropsProvider((0, vue.computed)(() => ({
|
|
263
|
+
lazyMount: props.lazyMount,
|
|
264
|
+
unmountOnExit: props.unmountOnExit
|
|
265
|
+
})));
|
|
266
|
+
require_utils.useForwardExpose();
|
|
267
|
+
return (_ctx, _cache) => {
|
|
268
|
+
return (0, vue.renderSlot)(_ctx.$slots, "default");
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
//#endregion
|
|
273
|
+
//#region src/components/tour/spotlight.vue
|
|
274
|
+
const _sfc_main$13 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
275
|
+
__name: "spotlight",
|
|
276
|
+
props: { asChild: { type: Boolean } },
|
|
277
|
+
setup(__props) {
|
|
278
|
+
const tour = useTourContext();
|
|
279
|
+
const renderStrategy = require_utils.useRenderStrategyProps();
|
|
280
|
+
const presence = require_use_presence.usePresence((0, vue.computed)(() => ({
|
|
281
|
+
...renderStrategy.value,
|
|
282
|
+
present: tour.value.open
|
|
283
|
+
})));
|
|
284
|
+
require_presence.PresenceProvider(presence);
|
|
285
|
+
require_utils.useForwardExpose();
|
|
286
|
+
return (_ctx, _cache) => {
|
|
287
|
+
return !(0, vue.unref)(presence).unmounted ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).div, (0, vue.mergeProps)({ key: 0 }, (0, vue.unref)(tour).getSpotlightProps(), {
|
|
288
|
+
hidden: !(0, vue.unref)(tour).open || !(0, vue.unref)(tour).step?.target?.(),
|
|
289
|
+
"as-child": __props.asChild
|
|
290
|
+
}), {
|
|
291
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default")]),
|
|
292
|
+
_: 3
|
|
293
|
+
}, 16, ["hidden", "as-child"])) : (0, vue.createCommentVNode)("v-if", true);
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region src/components/tour/title.vue
|
|
299
|
+
const _sfc_main$14 = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
300
|
+
__name: "title",
|
|
301
|
+
props: { asChild: { type: Boolean } },
|
|
302
|
+
setup(__props) {
|
|
303
|
+
const tour = useTourContext();
|
|
304
|
+
const slots = (0, vue.useSlots)();
|
|
305
|
+
require_utils.useForwardExpose();
|
|
306
|
+
return (_ctx, _cache) => {
|
|
307
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(require_factory.wire).h2, (0, vue.mergeProps)((0, vue.unref)(tour).getTitleProps(), { "as-child": __props.asChild }), {
|
|
308
|
+
default: (0, vue.withCtx)(() => [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(slots.default?.() || (0, vue.unref)(tour).step?.title), 1)])]),
|
|
309
|
+
_: 3
|
|
310
|
+
}, 16, ["as-child"]);
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
});
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region src/components/tour/use-tour.ts
|
|
316
|
+
const useTour = (props = {}, emit) => {
|
|
317
|
+
const id = (0, vue.useId)();
|
|
318
|
+
const env = require_providers.useEnvironmentContext(require_providers.DEFAULT_ENVIRONMENT);
|
|
319
|
+
const locale = require_providers.useLocaleContext(require_providers.DEFAULT_LOCALE);
|
|
320
|
+
const context = (0, vue.computed)(() => {
|
|
321
|
+
const localProps = (0, vue.toValue)(props);
|
|
322
|
+
return {
|
|
323
|
+
id,
|
|
324
|
+
dir: locale.value.dir,
|
|
325
|
+
getRootNode: env?.value.getRootNode,
|
|
326
|
+
...require_clean_props.cleanProps(localProps),
|
|
327
|
+
onFocusOutside: (details) => {
|
|
328
|
+
emit?.("focusOutside", details);
|
|
329
|
+
localProps.onFocusOutside?.(details);
|
|
330
|
+
},
|
|
331
|
+
onInteractOutside: (details) => {
|
|
332
|
+
emit?.("interactOutside", details);
|
|
333
|
+
localProps.onInteractOutside?.(details);
|
|
334
|
+
},
|
|
335
|
+
onPointerDownOutside: (details) => {
|
|
336
|
+
emit?.("pointerDownOutside", details);
|
|
337
|
+
localProps.onPointerDownOutside?.(details);
|
|
338
|
+
},
|
|
339
|
+
onStatusChange: (details) => {
|
|
340
|
+
emit?.("statusChange", details);
|
|
341
|
+
localProps.onStatusChange?.(details);
|
|
342
|
+
},
|
|
343
|
+
onStepChange: (details) => {
|
|
344
|
+
emit?.("stepChange", details);
|
|
345
|
+
localProps.onStepChange?.(details);
|
|
346
|
+
},
|
|
347
|
+
onStepsChange(details) {
|
|
348
|
+
emit?.("stepsChange", details);
|
|
349
|
+
localProps.onStepsChange?.(details);
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
const service = require_utils.useMachine(_wirekyt_dom_machines_tour.machine, context);
|
|
354
|
+
return (0, vue.computed)(() => _wirekyt_dom_machines_tour.connect(service, require_utils.normalizeProps));
|
|
355
|
+
};
|
|
356
|
+
//#endregion
|
|
357
|
+
//#region src/components/tour/tour.ts
|
|
358
|
+
var tour_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({
|
|
359
|
+
ActionTrigger: () => _sfc_main,
|
|
360
|
+
Actions: () => _sfc_main$1,
|
|
361
|
+
Arrow: () => _sfc_main$2,
|
|
362
|
+
ArrowTip: () => _sfc_main$3,
|
|
363
|
+
Backdrop: () => _sfc_main$4,
|
|
364
|
+
CloseTrigger: () => _sfc_main$5,
|
|
365
|
+
Content: () => _sfc_main$6,
|
|
366
|
+
Context: () => _sfc_main$7,
|
|
367
|
+
Control: () => _sfc_main$8,
|
|
368
|
+
Description: () => _sfc_main$9,
|
|
369
|
+
Positioner: () => _sfc_main$10,
|
|
370
|
+
ProgressText: () => _sfc_main$11,
|
|
371
|
+
Root: () => _sfc_main$12,
|
|
372
|
+
Spotlight: () => _sfc_main$13,
|
|
373
|
+
Title: () => _sfc_main$14
|
|
374
|
+
});
|
|
375
|
+
//#endregion
|
|
376
|
+
Object.defineProperty(exports, "Tour", {
|
|
377
|
+
enumerable: true,
|
|
378
|
+
get: function() {
|
|
379
|
+
return tour_exports;
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
exports.TourActionTrigger = _sfc_main;
|
|
383
|
+
exports.TourActions = _sfc_main$1;
|
|
384
|
+
exports.TourArrow = _sfc_main$2;
|
|
385
|
+
exports.TourArrowTip = _sfc_main$3;
|
|
386
|
+
exports.TourBackdrop = _sfc_main$4;
|
|
387
|
+
exports.TourCloseTrigger = _sfc_main$5;
|
|
388
|
+
exports.TourContent = _sfc_main$6;
|
|
389
|
+
exports.TourContext = _sfc_main$7;
|
|
390
|
+
exports.TourControl = _sfc_main$8;
|
|
391
|
+
exports.TourDescription = _sfc_main$9;
|
|
392
|
+
exports.TourPositioner = _sfc_main$10;
|
|
393
|
+
exports.TourProgressText = _sfc_main$11;
|
|
394
|
+
exports.TourRoot = _sfc_main$12;
|
|
395
|
+
exports.TourSpotlight = _sfc_main$13;
|
|
396
|
+
exports.TourTitle = _sfc_main$14;
|
|
397
|
+
exports.tourAnatomy = tourAnatomy;
|
|
398
|
+
exports.useTour = useTour;
|
|
399
|
+
exports.useTourContext = useTourContext;
|
|
400
|
+
Object.defineProperty(exports, "waitForElement", {
|
|
401
|
+
enumerable: true,
|
|
402
|
+
get: function() {
|
|
403
|
+
return _wirekyt_dom_machines_tour.waitForElement;
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
Object.defineProperty(exports, "waitForElementValue", {
|
|
407
|
+
enumerable: true,
|
|
408
|
+
get: function() {
|
|
409
|
+
return _wirekyt_dom_machines_tour.waitForElementValue;
|
|
410
|
+
}
|
|
411
|
+
});
|
|
412
|
+
exports.waitForEvent = waitForEvent;
|
|
413
|
+
Object.defineProperty(exports, "waitForPromise", {
|
|
414
|
+
enumerable: true,
|
|
415
|
+
get: function() {
|
|
416
|
+
return _wirekyt_dom_machines_tour.waitForPromise;
|
|
417
|
+
}
|
|
418
|
+
});
|