rappel-ui 1.0.16 → 1.0.17
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/cjs/components/index.js +1 -1
- package/cjs/components/popconfirm/index.d.ts +60 -0
- package/cjs/components/popconfirm/src/popconfirm.vue.d.ts +40 -16
- package/cjs/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popconfirm/src/types.d.ts +2 -2
- package/cjs/components/popover/index.d.ts +60 -0
- package/cjs/components/popover/src/popover.vue.d.ts +27 -3
- package/cjs/components/popover/src/popover.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/popover/src/types.d.ts +3 -1
- package/cjs/components/tooltip/index.d.ts +11 -0
- package/cjs/components/tooltip/index.js +1 -1
- package/cjs/components/tooltip/src/content.vue.d.ts +6 -2
- package/cjs/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/tooltip.vue.d.ts +6 -2
- package/cjs/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.js +1 -1
- package/cjs/components/tooltip/src/types.d.ts +2 -0
- package/cjs/components/tooltip/src/use-emit.d.ts +4 -2
- package/cjs/components/tooltip/src/use-emit.js +1 -1
- package/cjs/index.d.ts +144 -0
- package/cjs/index.js +1 -1
- package/es/components/index.mjs +11 -9
- package/es/components/popconfirm/index.d.ts +60 -0
- package/es/components/popconfirm/src/popconfirm.vue.d.ts +40 -16
- package/es/components/popconfirm/src/popconfirm.vue_vue_type_script_setup_true_lang.mjs +136 -108
- package/es/components/popconfirm/src/types.d.ts +2 -2
- package/es/components/popover/index.d.ts +60 -0
- package/es/components/popover/src/popover.vue.d.ts +27 -3
- package/es/components/popover/src/popover.vue_vue_type_script_setup_true_lang.mjs +84 -58
- package/es/components/popover/src/types.d.ts +3 -1
- package/es/components/tooltip/index.d.ts +11 -0
- package/es/components/tooltip/index.mjs +4 -3
- package/es/components/tooltip/src/content.vue.d.ts +6 -2
- package/es/components/tooltip/src/content.vue_vue_type_script_setup_true_lang.mjs +35 -27
- package/es/components/tooltip/src/tooltip.vue.d.ts +6 -2
- package/es/components/tooltip/src/tooltip.vue_vue_type_script_setup_true_lang.mjs +105 -101
- package/es/components/tooltip/src/types.d.ts +2 -0
- package/es/components/tooltip/src/use-emit.d.ts +4 -2
- package/es/components/tooltip/src/use-emit.mjs +4 -2
- package/es/index.d.ts +144 -0
- package/es/index.mjs +29 -28
- package/package.json +1 -1
- package/umd/index.js +3 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { getIcon as e } from "../../../svg-icons/dist/es/index.mjs";
|
|
2
2
|
import { useNamespace as t } from "../../../composables/use-namespace/index.mjs";
|
|
3
3
|
import "../../../composables/index.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useEmits as n } from "../../tooltip/src/use-emit.mjs";
|
|
5
|
+
import { filterNodeTypes as r } from "../../tooltip/src/constants.mjs";
|
|
6
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, h as p, mergeModels as m, normalizeClass as h, openBlock as g, renderSlot as _, resolveComponent as v, resolveDynamicComponent as y, toDisplayString as b, unref as x, useModel as S, useSlots as C, useTemplateRef as w, withCtx as T } from "vue";
|
|
6
7
|
//#region packages/components/popconfirm/src/popconfirm.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
8
|
+
var E = ["innerHTML"], D = f({
|
|
8
9
|
name: "RePopconfirm",
|
|
9
10
|
__name: "popconfirm",
|
|
10
|
-
props:
|
|
11
|
+
props: m({
|
|
11
12
|
icon: { default: "help" },
|
|
12
13
|
showIcon: {
|
|
13
14
|
type: Boolean,
|
|
@@ -115,134 +116,161 @@ var T = ["innerHTML"], E = d({
|
|
|
115
116
|
},
|
|
116
117
|
visibleModifiers: {}
|
|
117
118
|
}),
|
|
118
|
-
emits:
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
emits: m([
|
|
120
|
+
"confirm",
|
|
121
|
+
"cancel",
|
|
122
|
+
"beforeShow",
|
|
123
|
+
"show",
|
|
124
|
+
"beforeHide",
|
|
125
|
+
"hide",
|
|
126
|
+
"beforeEnter",
|
|
127
|
+
"enter",
|
|
128
|
+
"enterCancelled",
|
|
129
|
+
"afterEnter",
|
|
130
|
+
"beforeLeave",
|
|
131
|
+
"leave",
|
|
132
|
+
"leaveCancelled",
|
|
133
|
+
"afterLeave"
|
|
134
|
+
], ["update:visible"]),
|
|
135
|
+
setup(f, { expose: m, emit: D }) {
|
|
136
|
+
let { n: O, ns: k } = t("popconfirm"), A = D, { beforeShow: j, beforeHide: M, show: N, hide: P, beforeEnter: F, enter: I, afterEnter: L, beforeLeave: R, leave: z, afterLeave: B, enterCancelled: V, leaveCancelled: H } = n(A), U = S(f, "visible"), W = a(() => [O(), f.floatingClass]), G = C(), K = a(() => {
|
|
121
137
|
var e, t;
|
|
122
|
-
let
|
|
123
|
-
return (
|
|
124
|
-
}),
|
|
138
|
+
let n = G == null || (e = G.default) == null || (e = e.call(G)) == null ? void 0 : e.filter((e) => e && !r.includes(e.type.toString()))[0];
|
|
139
|
+
return (n == null || (t = n.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? p("span", {}, n) : n;
|
|
140
|
+
}), q = a(() => e(f.icon)), J = w("tooltipRef"), Y = (e) => {
|
|
125
141
|
var t;
|
|
126
|
-
A("cancel", e), (t =
|
|
127
|
-
},
|
|
142
|
+
A("cancel", e), (t = J.value) == null || t.delayHide();
|
|
143
|
+
}, X = (e) => {
|
|
128
144
|
var t;
|
|
129
|
-
A("confirm", e), (t =
|
|
145
|
+
A("confirm", e), (t = J.value) == null || t.delayHide();
|
|
130
146
|
};
|
|
131
|
-
return
|
|
132
|
-
tooltipRef:
|
|
133
|
-
cancel:
|
|
134
|
-
confirm:
|
|
147
|
+
return m({
|
|
148
|
+
tooltipRef: J,
|
|
149
|
+
cancel: Y,
|
|
150
|
+
confirm: X
|
|
135
151
|
}), (e, t) => {
|
|
136
|
-
let n =
|
|
137
|
-
return
|
|
152
|
+
let n = v("re-button"), r = v("re-tooltip");
|
|
153
|
+
return g(), o(r, {
|
|
138
154
|
ref_key: "tooltipRef",
|
|
139
|
-
ref:
|
|
140
|
-
visible:
|
|
141
|
-
"onUpdate:visible": t[0] || (t[0] = (e) =>
|
|
142
|
-
width:
|
|
143
|
-
height:
|
|
144
|
-
"max-width":
|
|
145
|
-
"max-height":
|
|
146
|
-
"floating-class":
|
|
147
|
-
"floating-style":
|
|
148
|
-
disabled:
|
|
149
|
-
theme:
|
|
150
|
-
placement:
|
|
151
|
-
trigger:
|
|
152
|
-
"reverse-theme":
|
|
153
|
-
"show-delay":
|
|
154
|
-
"hide-delay":
|
|
155
|
-
transition:
|
|
156
|
-
"css-duration":
|
|
157
|
-
"css-transition":
|
|
158
|
-
"show-arrow":
|
|
159
|
-
offset:
|
|
160
|
-
teleported:
|
|
161
|
-
"append-to":
|
|
162
|
-
persistent:
|
|
163
|
-
boundary:
|
|
164
|
-
"element-context":
|
|
165
|
-
"alt-boundary":
|
|
166
|
-
"root-boundary":
|
|
167
|
-
"arrow-size":
|
|
168
|
-
"arrow-offset":
|
|
169
|
-
"flip-offset":
|
|
170
|
-
"arrow-options":
|
|
171
|
-
"flip-options":
|
|
172
|
-
"inline-options":
|
|
173
|
-
"is-external":
|
|
174
|
-
"external-ref":
|
|
175
|
-
"is-virtual":
|
|
176
|
-
"virtual-ref":
|
|
155
|
+
ref: J,
|
|
156
|
+
visible: U.value,
|
|
157
|
+
"onUpdate:visible": t[0] || (t[0] = (e) => U.value = e),
|
|
158
|
+
width: f.width,
|
|
159
|
+
height: f.height,
|
|
160
|
+
"max-width": f.maxWidth,
|
|
161
|
+
"max-height": f.maxHeight,
|
|
162
|
+
"floating-class": W.value,
|
|
163
|
+
"floating-style": f.floatingStyle,
|
|
164
|
+
disabled: f.disabled,
|
|
165
|
+
theme: f.theme,
|
|
166
|
+
placement: f.placement,
|
|
167
|
+
trigger: f.trigger,
|
|
168
|
+
"reverse-theme": f.reverseTheme,
|
|
169
|
+
"show-delay": f.showDelay,
|
|
170
|
+
"hide-delay": f.hideDelay,
|
|
171
|
+
transition: f.transition,
|
|
172
|
+
"css-duration": f.cssDuration,
|
|
173
|
+
"css-transition": f.cssTransition,
|
|
174
|
+
"show-arrow": f.showArrow,
|
|
175
|
+
offset: f.offset,
|
|
176
|
+
teleported: f.teleported,
|
|
177
|
+
"append-to": f.appendTo,
|
|
178
|
+
persistent: f.persistent,
|
|
179
|
+
boundary: f.boundary,
|
|
180
|
+
"element-context": f.elementContext,
|
|
181
|
+
"alt-boundary": f.altBoundary,
|
|
182
|
+
"root-boundary": f.rootBoundary,
|
|
183
|
+
"arrow-size": f.arrowSize,
|
|
184
|
+
"arrow-offset": f.arrowOffset,
|
|
185
|
+
"flip-offset": f.flipOffset,
|
|
186
|
+
"arrow-options": f.arrowOptions,
|
|
187
|
+
"flip-options": f.flipOptions,
|
|
188
|
+
"inline-options": f.inlineOptions,
|
|
189
|
+
"is-external": f.isExternal,
|
|
190
|
+
"external-ref": f.externalRef,
|
|
191
|
+
"is-virtual": f.isVirtual,
|
|
192
|
+
"virtual-ref": f.virtualRef,
|
|
193
|
+
onBeforeShow: x(j),
|
|
194
|
+
onShow: x(N),
|
|
195
|
+
onBeforeHide: x(M),
|
|
196
|
+
onHide: x(P),
|
|
197
|
+
onBeforeEnter: x(F),
|
|
198
|
+
onEnter: x(I),
|
|
199
|
+
onAfterEnter: x(L),
|
|
200
|
+
onBeforeLeave: x(R),
|
|
201
|
+
onLeave: x(z),
|
|
202
|
+
onAfterLeave: x(B),
|
|
203
|
+
onEnterCancelled: x(V),
|
|
204
|
+
onLeaveCancelled: x(H)
|
|
177
205
|
}, {
|
|
178
|
-
content:
|
|
179
|
-
|
|
180
|
-
icon:
|
|
181
|
-
title:
|
|
182
|
-
}, () => [
|
|
206
|
+
content: T(() => [
|
|
207
|
+
_(e.$slots, "header", {
|
|
208
|
+
icon: q.value,
|
|
209
|
+
title: f.title
|
|
210
|
+
}, () => [l("div", { class: h([x(k)("header")]) }, [_(e.$slots, "icon", { icon: q.value }, () => [f.showIcon ? (g(), c(i, { key: 0 }, [typeof q.value == "string" ? (g(), c("i", {
|
|
183
211
|
key: 0,
|
|
184
|
-
class:
|
|
212
|
+
class: h([x(k)("icon"), q.value]),
|
|
185
213
|
"aria-hidden": "true"
|
|
186
|
-
}, null, 2)) : (
|
|
214
|
+
}, null, 2)) : (g(), o(y(q.value), {
|
|
187
215
|
key: 1,
|
|
188
|
-
class:
|
|
216
|
+
class: h([x(k)("icon")]),
|
|
189
217
|
"aria-hidden": "true"
|
|
190
|
-
}, null, 8, ["class"]))], 64)) :
|
|
191
|
-
|
|
218
|
+
}, null, 8, ["class"]))], 64)) : s("", !0)]), _(e.$slots, "title", { title: f.title }, () => [l("div", { class: h([x(k)("title")]) }, b(f.title), 3)])], 2)]),
|
|
219
|
+
_(e.$slots, "content", { content: f.content }, () => [f.isHtml ? (g(), c("div", {
|
|
192
220
|
key: 0,
|
|
193
|
-
class:
|
|
194
|
-
innerHTML:
|
|
195
|
-
}, null, 10,
|
|
221
|
+
class: h([x(k)("content")]),
|
|
222
|
+
innerHTML: f.content
|
|
223
|
+
}, null, 10, E)) : (g(), c("div", {
|
|
196
224
|
key: 1,
|
|
197
|
-
class:
|
|
198
|
-
},
|
|
199
|
-
|
|
200
|
-
cancel:
|
|
201
|
-
cancelSize:
|
|
202
|
-
cancelType:
|
|
203
|
-
cancelText:
|
|
204
|
-
confirm:
|
|
205
|
-
confirmSize:
|
|
206
|
-
confirmType:
|
|
207
|
-
confirmText:
|
|
208
|
-
}, () => [
|
|
209
|
-
|
|
210
|
-
cancel:
|
|
211
|
-
cancelSize:
|
|
212
|
-
cancelType:
|
|
213
|
-
cancelText:
|
|
214
|
-
}, () => [
|
|
215
|
-
size:
|
|
216
|
-
type:
|
|
217
|
-
onClick:
|
|
225
|
+
class: h([x(k)("content")])
|
|
226
|
+
}, b(f.content), 3))]),
|
|
227
|
+
_(e.$slots, "footer", {
|
|
228
|
+
cancel: Y,
|
|
229
|
+
cancelSize: f.cancelSize,
|
|
230
|
+
cancelType: f.cancelType,
|
|
231
|
+
cancelText: f.cancelText,
|
|
232
|
+
confirm: X,
|
|
233
|
+
confirmSize: f.confirmSize,
|
|
234
|
+
confirmType: f.confirmType,
|
|
235
|
+
confirmText: f.confirmText
|
|
236
|
+
}, () => [l("div", { class: h([x(k)("footer")]) }, [
|
|
237
|
+
_(e.$slots, "cancel", {
|
|
238
|
+
cancel: Y,
|
|
239
|
+
cancelSize: f.cancelSize,
|
|
240
|
+
cancelType: f.cancelType,
|
|
241
|
+
cancelText: f.cancelText
|
|
242
|
+
}, () => [d(n, {
|
|
243
|
+
size: f.cancelSize,
|
|
244
|
+
type: f.cancelType,
|
|
245
|
+
onClick: Y
|
|
218
246
|
}, {
|
|
219
|
-
default:
|
|
247
|
+
default: T(() => [u(b(f.cancelText), 1)]),
|
|
220
248
|
_: 1
|
|
221
249
|
}, 8, ["size", "type"])]),
|
|
222
|
-
|
|
223
|
-
cancel:
|
|
224
|
-
confirm:
|
|
250
|
+
_(e.$slots, "extra", {
|
|
251
|
+
cancel: Y,
|
|
252
|
+
confirm: X
|
|
225
253
|
}),
|
|
226
|
-
|
|
227
|
-
confirm:
|
|
228
|
-
confirmSize:
|
|
229
|
-
confirmType:
|
|
230
|
-
confirmText:
|
|
231
|
-
}, () => [
|
|
232
|
-
size:
|
|
233
|
-
type:
|
|
234
|
-
onClick:
|
|
254
|
+
_(e.$slots, "confirm", {
|
|
255
|
+
confirm: X,
|
|
256
|
+
confirmSize: f.confirmSize,
|
|
257
|
+
confirmType: f.confirmType,
|
|
258
|
+
confirmText: f.confirmText
|
|
259
|
+
}, () => [d(n, {
|
|
260
|
+
size: f.confirmSize,
|
|
261
|
+
type: f.confirmType,
|
|
262
|
+
onClick: X
|
|
235
263
|
}, {
|
|
236
|
-
default:
|
|
264
|
+
default: T(() => [u(b(f.confirmText), 1)]),
|
|
237
265
|
_: 1
|
|
238
266
|
}, 8, ["size", "type"])])
|
|
239
267
|
], 2)])
|
|
240
268
|
]),
|
|
241
|
-
default:
|
|
269
|
+
default: T(() => [(g(), o(y(K.value)))]),
|
|
242
270
|
_: 3
|
|
243
|
-
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref".split("."));
|
|
271
|
+
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
244
272
|
};
|
|
245
273
|
}
|
|
246
274
|
});
|
|
247
275
|
//#endregion
|
|
248
|
-
export {
|
|
276
|
+
export { D as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
-
import { TooltipProps } from '@rappel-ui/components/tooltip';
|
|
2
|
+
import { TooltipProps, FloatingEmits } from '@rappel-ui/components/tooltip';
|
|
3
3
|
import { buttonTypes, buttonSizes } from '@rappel-ui/components/button';
|
|
4
4
|
export interface PopconfirmProps extends TooltipProps {
|
|
5
5
|
icon?: string | Component;
|
|
@@ -12,7 +12,7 @@ export interface PopconfirmProps extends TooltipProps {
|
|
|
12
12
|
confirmType?: (typeof buttonTypes)[number];
|
|
13
13
|
confirmSize?: (typeof buttonSizes)[number];
|
|
14
14
|
}
|
|
15
|
-
export interface PopconfirmEmits {
|
|
15
|
+
export interface PopconfirmEmits extends FloatingEmits {
|
|
16
16
|
confirm: [e: MouseEvent];
|
|
17
17
|
cancel: [e: MouseEvent];
|
|
18
18
|
}
|
|
@@ -3,8 +3,32 @@ export declare const RePopover: {
|
|
|
3
3
|
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('.').PopoverProps & {
|
|
4
4
|
visible?: boolean;
|
|
5
5
|
}> & Readonly<{
|
|
6
|
+
onBeforeShow?: ((el: HTMLElement) => any) | undefined;
|
|
7
|
+
onShow?: ((el: HTMLElement) => any) | undefined;
|
|
8
|
+
onBeforeHide?: ((el: HTMLElement) => any) | undefined;
|
|
9
|
+
onHide?: ((el: HTMLElement) => any) | undefined;
|
|
10
|
+
onBeforeEnter?: ((el: HTMLElement) => any) | undefined;
|
|
11
|
+
onEnter?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
12
|
+
onEnterCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
13
|
+
onAfterEnter?: ((el: HTMLElement) => any) | undefined;
|
|
14
|
+
onBeforeLeave?: ((el: HTMLElement) => any) | undefined;
|
|
15
|
+
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
16
|
+
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
17
|
+
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
6
18
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
7
19
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
beforeShow: (el: HTMLElement) => any;
|
|
21
|
+
show: (el: HTMLElement) => any;
|
|
22
|
+
beforeHide: (el: HTMLElement) => any;
|
|
23
|
+
hide: (el: HTMLElement) => any;
|
|
24
|
+
beforeEnter: (el: HTMLElement) => any;
|
|
25
|
+
enter: (el: HTMLElement, done: () => void) => any;
|
|
26
|
+
enterCancelled: (el: HTMLElement) => any;
|
|
27
|
+
afterEnter: (el: HTMLElement) => any;
|
|
28
|
+
beforeLeave: (el: HTMLElement) => any;
|
|
29
|
+
leave: (el: HTMLElement, done: () => void) => any;
|
|
30
|
+
leaveCancelled: (el: HTMLElement) => any;
|
|
31
|
+
afterLeave: (el: HTMLElement) => any;
|
|
8
32
|
"update:visible": (value: boolean) => any;
|
|
9
33
|
}, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
10
34
|
P: {};
|
|
@@ -16,6 +40,18 @@ export declare const RePopover: {
|
|
|
16
40
|
}, Readonly<import('.').PopoverProps & {
|
|
17
41
|
visible?: boolean;
|
|
18
42
|
}> & Readonly<{
|
|
43
|
+
onBeforeShow?: ((el: HTMLElement) => any) | undefined;
|
|
44
|
+
onShow?: ((el: HTMLElement) => any) | undefined;
|
|
45
|
+
onBeforeHide?: ((el: HTMLElement) => any) | undefined;
|
|
46
|
+
onHide?: ((el: HTMLElement) => any) | undefined;
|
|
47
|
+
onBeforeEnter?: ((el: HTMLElement) => any) | undefined;
|
|
48
|
+
onEnter?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
49
|
+
onEnterCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
50
|
+
onAfterEnter?: ((el: HTMLElement) => any) | undefined;
|
|
51
|
+
onBeforeLeave?: ((el: HTMLElement) => any) | undefined;
|
|
52
|
+
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
53
|
+
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
54
|
+
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
19
55
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
20
56
|
}>, {}, {}, {}, {}, {}>;
|
|
21
57
|
__isFragment?: never;
|
|
@@ -24,8 +60,32 @@ export declare const RePopover: {
|
|
|
24
60
|
} & import('vue').ComponentOptionsBase<Readonly<import('.').PopoverProps & {
|
|
25
61
|
visible?: boolean;
|
|
26
62
|
}> & Readonly<{
|
|
63
|
+
onBeforeShow?: ((el: HTMLElement) => any) | undefined;
|
|
64
|
+
onShow?: ((el: HTMLElement) => any) | undefined;
|
|
65
|
+
onBeforeHide?: ((el: HTMLElement) => any) | undefined;
|
|
66
|
+
onHide?: ((el: HTMLElement) => any) | undefined;
|
|
67
|
+
onBeforeEnter?: ((el: HTMLElement) => any) | undefined;
|
|
68
|
+
onEnter?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
69
|
+
onEnterCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
70
|
+
onAfterEnter?: ((el: HTMLElement) => any) | undefined;
|
|
71
|
+
onBeforeLeave?: ((el: HTMLElement) => any) | undefined;
|
|
72
|
+
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
73
|
+
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
74
|
+
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
27
75
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
28
76
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
77
|
+
beforeShow: (el: HTMLElement) => any;
|
|
78
|
+
show: (el: HTMLElement) => any;
|
|
79
|
+
beforeHide: (el: HTMLElement) => any;
|
|
80
|
+
hide: (el: HTMLElement) => any;
|
|
81
|
+
beforeEnter: (el: HTMLElement) => any;
|
|
82
|
+
enter: (el: HTMLElement, done: () => void) => any;
|
|
83
|
+
enterCancelled: (el: HTMLElement) => any;
|
|
84
|
+
afterEnter: (el: HTMLElement) => any;
|
|
85
|
+
beforeLeave: (el: HTMLElement) => any;
|
|
86
|
+
leave: (el: HTMLElement, done: () => void) => any;
|
|
87
|
+
leaveCancelled: (el: HTMLElement) => any;
|
|
88
|
+
afterLeave: (el: HTMLElement) => any;
|
|
29
89
|
"update:visible": (value: boolean) => any;
|
|
30
90
|
}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
|
31
91
|
$slots: {
|
|
@@ -4,15 +4,39 @@ type __VLS_ModelProps = {
|
|
|
4
4
|
'visible'?: boolean;
|
|
5
5
|
};
|
|
6
6
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
7
|
-
declare var
|
|
7
|
+
declare var __VLS_27: {}, __VLS_29: {};
|
|
8
8
|
type __VLS_Slots = {} & {
|
|
9
|
-
title?: (props: typeof
|
|
9
|
+
title?: (props: typeof __VLS_27) => any;
|
|
10
10
|
} & {
|
|
11
|
-
content?: (props: typeof
|
|
11
|
+
content?: (props: typeof __VLS_29) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
beforeShow: (el: HTMLElement) => any;
|
|
15
|
+
show: (el: HTMLElement) => any;
|
|
16
|
+
beforeHide: (el: HTMLElement) => any;
|
|
17
|
+
hide: (el: HTMLElement) => any;
|
|
18
|
+
beforeEnter: (el: HTMLElement) => any;
|
|
19
|
+
enter: (el: HTMLElement, done: () => void) => any;
|
|
20
|
+
enterCancelled: (el: HTMLElement) => any;
|
|
21
|
+
afterEnter: (el: HTMLElement) => any;
|
|
22
|
+
beforeLeave: (el: HTMLElement) => any;
|
|
23
|
+
leave: (el: HTMLElement, done: () => void) => any;
|
|
24
|
+
leaveCancelled: (el: HTMLElement) => any;
|
|
25
|
+
afterLeave: (el: HTMLElement) => any;
|
|
14
26
|
"update:visible": (value: boolean) => any;
|
|
15
27
|
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
28
|
+
onBeforeShow?: ((el: HTMLElement) => any) | undefined;
|
|
29
|
+
onShow?: ((el: HTMLElement) => any) | undefined;
|
|
30
|
+
onBeforeHide?: ((el: HTMLElement) => any) | undefined;
|
|
31
|
+
onHide?: ((el: HTMLElement) => any) | undefined;
|
|
32
|
+
onBeforeEnter?: ((el: HTMLElement) => any) | undefined;
|
|
33
|
+
onEnter?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
34
|
+
onEnterCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
35
|
+
onAfterEnter?: ((el: HTMLElement) => any) | undefined;
|
|
36
|
+
onBeforeLeave?: ((el: HTMLElement) => any) | undefined;
|
|
37
|
+
onLeave?: ((el: HTMLElement, done: () => void) => any) | undefined;
|
|
38
|
+
onLeaveCancelled?: ((el: HTMLElement) => any) | undefined;
|
|
39
|
+
onAfterLeave?: ((el: HTMLElement) => any) | undefined;
|
|
16
40
|
"onUpdate:visible"?: ((value: boolean) => any) | undefined;
|
|
17
41
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
42
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useNamespace as e } from "../../../composables/use-namespace/index.mjs";
|
|
2
2
|
import "../../../composables/index.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useEmits as t } from "../../tooltip/src/use-emit.mjs";
|
|
4
|
+
import { filterNodeTypes as n } from "../../tooltip/src/constants.mjs";
|
|
5
|
+
import { computed as r, createBlock as i, createElementBlock as a, createElementVNode as o, defineComponent as s, h as c, mergeModels as l, normalizeClass as u, openBlock as d, renderSlot as f, resolveComponent as p, resolveDynamicComponent as m, toDisplayString as h, unref as g, useModel as _, useSlots as v, withCtx as y } from "vue";
|
|
5
6
|
//#region packages/components/popover/src/popover.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
7
|
+
var b = ["innerHTML"], x = s({
|
|
7
8
|
name: "RePopover",
|
|
8
9
|
__name: "popover",
|
|
9
|
-
props:
|
|
10
|
+
props: l({
|
|
10
11
|
title: { default: "" },
|
|
11
12
|
visible: { type: Boolean },
|
|
12
13
|
content: { default: "" },
|
|
@@ -103,67 +104,92 @@ var y = ["innerHTML"], b = o({
|
|
|
103
104
|
},
|
|
104
105
|
visibleModifiers: {}
|
|
105
106
|
}),
|
|
106
|
-
emits: [
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
emits: l([
|
|
108
|
+
"beforeShow",
|
|
109
|
+
"show",
|
|
110
|
+
"beforeHide",
|
|
111
|
+
"hide",
|
|
112
|
+
"beforeEnter",
|
|
113
|
+
"enter",
|
|
114
|
+
"enterCancelled",
|
|
115
|
+
"afterEnter",
|
|
116
|
+
"beforeLeave",
|
|
117
|
+
"leave",
|
|
118
|
+
"leaveCancelled",
|
|
119
|
+
"afterLeave"
|
|
120
|
+
], ["update:visible"]),
|
|
121
|
+
setup(s, { emit: l }) {
|
|
122
|
+
let { n: x, ns: S } = e("popover"), { beforeShow: C, beforeHide: w, show: T, hide: E, beforeEnter: D, enter: O, afterEnter: k, beforeLeave: A, leave: j, afterLeave: M, enterCancelled: N, leaveCancelled: P } = t(l), F = _(s, "visible"), I = r(() => [x(), s.floatingClass]), L = v(), R = r(() => {
|
|
123
|
+
var e, t;
|
|
124
|
+
let r = L == null || (e = L.default) == null || (e = e.call(L)) == null ? void 0 : e.filter((e) => e && !n.includes(e.type.toString()))[0];
|
|
125
|
+
return (r == null || (t = r.type) == null ? void 0 : t.toString()) === "Symbol(v-txt)" ? c("span", {}, r) : r;
|
|
112
126
|
});
|
|
113
127
|
return (e, t) => {
|
|
114
|
-
let n =
|
|
115
|
-
return
|
|
116
|
-
visible:
|
|
117
|
-
"onUpdate:visible": t[0] || (t[0] = (e) =>
|
|
118
|
-
width:
|
|
119
|
-
height:
|
|
120
|
-
"max-width":
|
|
121
|
-
"max-height":
|
|
122
|
-
"floating-class":
|
|
123
|
-
"floating-style":
|
|
124
|
-
disabled:
|
|
125
|
-
theme:
|
|
126
|
-
placement:
|
|
127
|
-
trigger:
|
|
128
|
-
"reverse-theme":
|
|
129
|
-
"show-delay":
|
|
130
|
-
"hide-delay":
|
|
131
|
-
transition:
|
|
132
|
-
"css-duration":
|
|
133
|
-
"css-transition":
|
|
134
|
-
"show-arrow":
|
|
135
|
-
offset:
|
|
136
|
-
teleported:
|
|
137
|
-
"append-to":
|
|
138
|
-
persistent:
|
|
139
|
-
boundary:
|
|
140
|
-
"element-context":
|
|
141
|
-
"alt-boundary":
|
|
142
|
-
"root-boundary":
|
|
143
|
-
"arrow-size":
|
|
144
|
-
"arrow-offset":
|
|
145
|
-
"flip-offset":
|
|
146
|
-
"arrow-options":
|
|
147
|
-
"flip-options":
|
|
148
|
-
"inline-options":
|
|
149
|
-
"is-external":
|
|
150
|
-
"external-ref":
|
|
151
|
-
"is-virtual":
|
|
152
|
-
"virtual-ref":
|
|
128
|
+
let n = p("re-tooltip");
|
|
129
|
+
return d(), i(n, {
|
|
130
|
+
visible: F.value,
|
|
131
|
+
"onUpdate:visible": t[0] || (t[0] = (e) => F.value = e),
|
|
132
|
+
width: s.width,
|
|
133
|
+
height: s.height,
|
|
134
|
+
"max-width": s.maxWidth,
|
|
135
|
+
"max-height": s.maxHeight,
|
|
136
|
+
"floating-class": I.value,
|
|
137
|
+
"floating-style": s.floatingStyle,
|
|
138
|
+
disabled: s.disabled,
|
|
139
|
+
theme: s.theme,
|
|
140
|
+
placement: s.placement,
|
|
141
|
+
trigger: s.trigger,
|
|
142
|
+
"reverse-theme": s.reverseTheme,
|
|
143
|
+
"show-delay": s.showDelay,
|
|
144
|
+
"hide-delay": s.hideDelay,
|
|
145
|
+
transition: s.transition,
|
|
146
|
+
"css-duration": s.cssDuration,
|
|
147
|
+
"css-transition": s.cssTransition,
|
|
148
|
+
"show-arrow": s.showArrow,
|
|
149
|
+
offset: s.offset,
|
|
150
|
+
teleported: s.teleported,
|
|
151
|
+
"append-to": s.appendTo,
|
|
152
|
+
persistent: s.persistent,
|
|
153
|
+
boundary: s.boundary,
|
|
154
|
+
"element-context": s.elementContext,
|
|
155
|
+
"alt-boundary": s.altBoundary,
|
|
156
|
+
"root-boundary": s.rootBoundary,
|
|
157
|
+
"arrow-size": s.arrowSize,
|
|
158
|
+
"arrow-offset": s.arrowOffset,
|
|
159
|
+
"flip-offset": s.flipOffset,
|
|
160
|
+
"arrow-options": s.arrowOptions,
|
|
161
|
+
"flip-options": s.flipOptions,
|
|
162
|
+
"inline-options": s.inlineOptions,
|
|
163
|
+
"is-external": s.isExternal,
|
|
164
|
+
"external-ref": s.externalRef,
|
|
165
|
+
"is-virtual": s.isVirtual,
|
|
166
|
+
"virtual-ref": s.virtualRef,
|
|
167
|
+
onBeforeShow: g(C),
|
|
168
|
+
onShow: g(T),
|
|
169
|
+
onBeforeHide: g(w),
|
|
170
|
+
onHide: g(E),
|
|
171
|
+
onBeforeEnter: g(D),
|
|
172
|
+
onEnter: g(O),
|
|
173
|
+
onAfterEnter: g(k),
|
|
174
|
+
onBeforeLeave: g(A),
|
|
175
|
+
onLeave: g(j),
|
|
176
|
+
onAfterLeave: g(M),
|
|
177
|
+
onEnterCancelled: g(N),
|
|
178
|
+
onLeaveCancelled: g(P)
|
|
153
179
|
}, {
|
|
154
|
-
content:
|
|
180
|
+
content: y(() => [f(e.$slots, "title", {}, () => [o("div", { class: u([g(S)("title")]) }, h(s.title), 3)]), f(e.$slots, "content", {}, () => [s.isHtml ? (d(), a("div", {
|
|
155
181
|
key: 0,
|
|
156
|
-
class:
|
|
157
|
-
innerHTML:
|
|
158
|
-
}, null, 10,
|
|
182
|
+
class: u([g(S)("content")]),
|
|
183
|
+
innerHTML: s.content
|
|
184
|
+
}, null, 10, b)) : (d(), a("div", {
|
|
159
185
|
key: 1,
|
|
160
|
-
class:
|
|
161
|
-
},
|
|
162
|
-
default:
|
|
186
|
+
class: u([g(S)("content")])
|
|
187
|
+
}, h(s.content), 3))])]),
|
|
188
|
+
default: y(() => [(d(), i(m(R.value)))]),
|
|
163
189
|
_: 3
|
|
164
|
-
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref".split("."));
|
|
190
|
+
}, 8, "visible.width.height.max-width.max-height.floating-class.floating-style.disabled.theme.placement.trigger.reverse-theme.show-delay.hide-delay.transition.css-duration.css-transition.show-arrow.offset.teleported.append-to.persistent.boundary.element-context.alt-boundary.root-boundary.arrow-size.arrow-offset.flip-offset.arrow-options.flip-options.inline-options.is-external.external-ref.is-virtual.virtual-ref.onBeforeShow.onShow.onBeforeHide.onHide.onBeforeEnter.onEnter.onAfterEnter.onBeforeLeave.onLeave.onAfterLeave.onEnterCancelled.onLeaveCancelled".split("."));
|
|
165
191
|
};
|
|
166
192
|
}
|
|
167
193
|
});
|
|
168
194
|
//#endregion
|
|
169
|
-
export {
|
|
195
|
+
export { x as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { TooltipProps } from '@rappel-ui/components/tooltip';
|
|
1
|
+
import { TooltipProps, FloatingEmits } from '@rappel-ui/components/tooltip';
|
|
2
2
|
export interface PopoverProps extends TooltipProps {
|
|
3
3
|
title?: string;
|
|
4
4
|
}
|
|
5
|
+
export interface PopoverEmits extends FloatingEmits {
|
|
6
|
+
}
|