vft 0.0.97 → 0.0.99
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/es/components/affix/affix.vue2.js +25 -26
- package/es/components/alert/alert.vue2.js +17 -18
- package/es/components/backtop/backtop.vue2.js +14 -15
- package/es/components/button/button-group.vue2.js +14 -15
- package/es/components/button/button.vue2.js +24 -25
- package/es/components/card/card.vue2.js +10 -11
- package/es/components/check-tag/check-tag.vue2.js +10 -11
- package/es/components/checkbox/checkbox-button.vue2.js +13 -14
- package/es/components/checkbox/checkbox-group.vue2.js +15 -16
- package/es/components/checkbox/checkbox.vue2.js +24 -25
- package/es/components/clamp/clamp.vue2.js +16 -17
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +13 -14
- package/es/components/col/col.vue2.js +20 -21
- package/es/components/collapse-transition/src/collapse-transition.vue2.js +12 -13
- package/es/components/collection/collection-item.vue2.js +6 -7
- package/es/components/collection/collection.vue2.js +5 -7
- package/es/components/color-picker/color-picker.vue2.js +45 -46
- package/es/components/color-picker/components/alpha-slider.vue2.js +20 -21
- package/es/components/config-provider/config-provider.vue2.js +22 -23
- package/es/components/container/aside.vue2.js +12 -13
- package/es/components/container/container.vue2.js +10 -11
- package/es/components/container/footer.vue2.js +11 -12
- package/es/components/container/header.vue2.js +10 -11
- package/es/components/container/main.vue2.js +12 -13
- package/es/components/context-menu/context-menu.vue2.js +18 -19
- package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +87 -87
- package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +1 -1
- package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +1 -1
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +2 -2
- package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +39 -40
- package/es/components/date-time-select/date-time-select.vue2.js +20 -21
- package/es/components/descriptions/description-item.vue2.js +9 -10
- package/es/components/descriptions/description.vue2.js +20 -21
- package/es/components/descriptions/descriptions-row.vue2.js +15 -16
- package/es/components/dialog/dialog-content.vue2.js +12 -13
- package/es/components/dialog/dialog.vue2.js +40 -41
- package/es/components/divider/divider.vue2.js +10 -11
- package/es/components/dropdown/dropdown.vue2.js +38 -39
- package/es/components/empty/empty.vue2.js +11 -12
- package/es/components/footer-layout/footer-layout.vue2.js +7 -8
- package/es/components/form/form-item.vue2.js +43 -44
- package/es/components/form/form.vue2.js +28 -29
- package/es/components/full-screen/full-screen.vue2.js +15 -16
- package/es/components/header-layout/header-layout.vue2.js +21 -22
- package/es/components/horizontal-menu/horizontal-menu.vue2.js +50 -51
- package/es/components/icon/icon.vue2.js +12 -13
- package/es/components/icon-text/icon-text.vue2.js +13 -14
- package/es/components/iframe-layout/iframe-layout.vue2.js +15 -16
- package/es/components/iframe-layout/iframe-page.vue2.js +12 -13
- package/es/components/image/image.vue2.js +25 -26
- package/es/components/image-viewer/image-viewer.vue2.js +54 -55
- package/es/components/link/link.vue2.js +11 -12
- package/es/components/list-cell/list-cell.vue2.js +21 -22
- package/es/components/logo/logo.vue2.js +12 -13
- package/es/components/md-comment/md-comment.vue2.js +12 -13
- package/es/components/md-container/md-container.vue2.js +33 -34
- package/es/components/md-vue-playground/md-vue-playground.vue2.js +18 -19
- package/es/components/menu/menu-item-group.vue2.js +13 -14
- package/es/components/menu/menu-item.vue2.js +12 -13
- package/es/components/menu/menu.vue2.js +44 -45
- package/es/components/menu/sub-menu.vue2.js +30 -31
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -38
- package/es/components/overlay/overlay.vue2.js +23 -24
- package/es/components/page-wrapper/page-wrapper.vue2.js +17 -18
- package/es/components/pagination/pagination.vue2.js +17 -18
- package/es/components/popconfirm/popconfirm.vue2.js +17 -18
- package/es/components/popover/popover.vue2.js +31 -32
- package/es/components/popper/arrow.vue2.js +15 -16
- package/es/components/popper/content.vue2.js +38 -39
- package/es/components/popper/popper.vue2.js +13 -14
- package/es/components/popper/trigger.vue2.js +11 -12
- package/es/components/qrcode/qrcode.vue2.js +21 -22
- package/es/components/radio/radio-button.vue2.js +16 -17
- package/es/components/radio/radio-group.vue2.js +16 -17
- package/es/components/radio/radio.vue2.js +15 -16
- package/es/components/result/result.vue2.js +12 -13
- package/es/components/router-view-content/router-view-content.vue2.js +10 -11
- package/es/components/row/row.vue2.js +17 -18
- package/es/components/scrollbar/scrollbar.vue2.js +30 -31
- package/es/components/search/search.vue2.js +39 -40
- package/es/components/side-menu/side-menu.vue2.js +43 -45
- package/es/components/skeleton/skeleton-item.vue2.js +9 -10
- package/es/components/skeleton/skeleton.vue2.js +11 -12
- package/es/components/switch/switch.vue2.js +27 -28
- package/es/components/table/table.vue2.js +53 -50
- package/es/components/tabs/tab-nav.vue2.js +28 -29
- package/es/components/tabs/tab-pane.vue2.js +23 -24
- package/es/components/tabs/tabs.vue2.js +30 -31
- package/es/components/time-picker/common/picker.vue2.js +48 -49
- package/es/components/time-select/time-select.vue2.js +28 -29
- package/es/components/tooltip/content.vue2.js +36 -37
- package/es/components/tooltip/tooltip.vue2.js +15 -16
- package/es/components/tooltip/trigger.vue2.js +37 -38
- package/es/components/verify-code/verify-code.vue2.js +19 -20
- package/es/constants/date.js +7 -7
- package/es/package.json.js +1 -1
- package/lib/components/affix/affix.vue2.cjs +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/backtop/backtop.vue2.cjs +1 -1
- package/lib/components/button/button-group.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +1 -1
- package/lib/components/collection/collection-item.vue2.cjs +1 -1
- package/lib/components/collection/collection.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
- package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
- package/lib/components/container/aside.vue2.cjs +1 -1
- package/lib/components/container/container.vue2.cjs +1 -1
- package/lib/components/container/footer.vue2.cjs +1 -1
- package/lib/components/container/header.vue2.cjs +1 -1
- package/lib/components/container/main.vue2.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
- package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
- package/lib/components/descriptions/description-item.vue2.cjs +1 -1
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/empty/empty.vue2.cjs +1 -1
- package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/form/form.vue2.cjs +1 -1
- package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
- package/lib/components/md-container/md-container.vue2.cjs +1 -1
- package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/menu.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/overlay/overlay.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/pagination.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/arrow.vue2.cjs +1 -1
- package/lib/components/popper/content.vue2.cjs +1 -1
- package/lib/components/popper/popper.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/radio/radio.vue2.cjs +1 -1
- package/lib/components/result/result.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
- package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
- package/lib/components/tabs/tabs.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
- package/lib/components/time-select/time-select.vue2.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/constants/date.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/package.json +8 -8
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as C, ref as k, computed as a, unref as l, openBlock as p, createBlock as A, mergeProps as S, withCtx as i, createElementBlock as $, normalizeClass as R, toDisplayString as s, createCommentVNode as f, renderSlot as d, createTextVNode as E } from "vue";
|
|
2
2
|
import { addUnit as N } from "@vft/utils";
|
|
3
3
|
import { useNamespace as V } from "../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
@@ -10,10 +10,9 @@ import { VftTooltip as H } from "../tooltip/index.js";
|
|
|
10
10
|
const r = (
|
|
11
11
|
/* hoist-static*/
|
|
12
12
|
V("popover")
|
|
13
|
-
),
|
|
14
|
-
name: r.b()
|
|
15
|
-
|
|
16
|
-
...L,
|
|
13
|
+
), G = /* @__PURE__ */ C({
|
|
14
|
+
name: r.b(),
|
|
15
|
+
__name: "popover",
|
|
17
16
|
props: {
|
|
18
17
|
trigger: { default: "hover" },
|
|
19
18
|
placement: { default: "bottom" },
|
|
@@ -38,35 +37,35 @@ const r = (
|
|
|
38
37
|
persistent: { type: Boolean, default: !0 }
|
|
39
38
|
},
|
|
40
39
|
emits: ["update:visible", "before-enter", "before-leave", "after-enter", "after-leave"],
|
|
41
|
-
setup(t, { expose:
|
|
42
|
-
const
|
|
40
|
+
setup(t, { expose: u, emit: o }) {
|
|
41
|
+
const n = k(), b = a(() => {
|
|
43
42
|
var e;
|
|
44
|
-
return (e = n
|
|
45
|
-
}),
|
|
43
|
+
return (e = l(n)) == null ? void 0 : e.popperRef;
|
|
44
|
+
}), c = a(() => [
|
|
46
45
|
{
|
|
47
46
|
width: N(t.width)
|
|
48
47
|
},
|
|
49
48
|
t.popperStyle
|
|
50
|
-
]),
|
|
49
|
+
]), m = a(() => [r.b(), t.popperClass, { [r.m("plain")]: !!t.content }]), h = a(() => t.transition === `${r.namespace.value}-fade-in-linear`), v = () => {
|
|
51
50
|
var e;
|
|
52
|
-
(e =
|
|
53
|
-
},
|
|
51
|
+
(e = n.value) == null || e.hide();
|
|
52
|
+
}, w = () => {
|
|
54
53
|
o("before-enter");
|
|
55
|
-
},
|
|
54
|
+
}, y = () => {
|
|
56
55
|
o("before-leave");
|
|
57
|
-
},
|
|
56
|
+
}, g = () => {
|
|
58
57
|
o("after-enter");
|
|
59
|
-
},
|
|
58
|
+
}, B = () => {
|
|
60
59
|
o("update:visible", !1), o("after-leave");
|
|
61
60
|
};
|
|
62
|
-
return
|
|
61
|
+
return u({
|
|
63
62
|
/** @description popper ref */
|
|
64
63
|
popperRef: b,
|
|
65
64
|
/** @description hide popover */
|
|
66
|
-
hide:
|
|
67
|
-
}), (e,
|
|
65
|
+
hide: v
|
|
66
|
+
}), (e, L) => (p(), A(l(H), S({
|
|
68
67
|
ref_key: "tooltipRef",
|
|
69
|
-
ref:
|
|
68
|
+
ref: n
|
|
70
69
|
}, e.$attrs, {
|
|
71
70
|
trigger: e.trigger,
|
|
72
71
|
placement: e.placement,
|
|
@@ -84,27 +83,27 @@ const r = (
|
|
|
84
83
|
"aria-label": e.title,
|
|
85
84
|
effect: e.effect,
|
|
86
85
|
enterable: e.enterable,
|
|
87
|
-
"popper-class":
|
|
88
|
-
"popper-style":
|
|
86
|
+
"popper-class": m.value,
|
|
87
|
+
"popper-style": c.value,
|
|
89
88
|
teleported: e.teleported,
|
|
90
89
|
persistent: e.persistent,
|
|
91
|
-
"gpu-acceleration":
|
|
92
|
-
onBeforeShow:
|
|
93
|
-
onBeforeHide:
|
|
94
|
-
onShow:
|
|
95
|
-
onHide:
|
|
90
|
+
"gpu-acceleration": h.value,
|
|
91
|
+
onBeforeShow: w,
|
|
92
|
+
onBeforeHide: y,
|
|
93
|
+
onShow: g,
|
|
94
|
+
onHide: B
|
|
96
95
|
}), {
|
|
97
|
-
content:
|
|
96
|
+
content: i(() => [
|
|
98
97
|
e.title ? (p(), $("div", {
|
|
99
98
|
key: 0,
|
|
100
|
-
class: R(
|
|
99
|
+
class: R(l(r).e("title")),
|
|
101
100
|
role: "title"
|
|
102
|
-
},
|
|
101
|
+
}, s(e.title), 3)) : f("", !0),
|
|
103
102
|
d(e.$slots, "default", {}, () => [
|
|
104
|
-
E(
|
|
103
|
+
E(s(e.content), 1)
|
|
105
104
|
])
|
|
106
105
|
]),
|
|
107
|
-
default:
|
|
106
|
+
default: i(() => [
|
|
108
107
|
e.$slots.reference ? d(e.$slots, "reference", { key: 0 }) : f("", !0)
|
|
109
108
|
]),
|
|
110
109
|
_: 3
|
|
@@ -112,5 +111,5 @@ const r = (
|
|
|
112
111
|
}
|
|
113
112
|
});
|
|
114
113
|
export {
|
|
115
|
-
|
|
114
|
+
G as default
|
|
116
115
|
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useNamespace as
|
|
1
|
+
import { defineComponent as s, inject as m, watch as i, onBeforeUnmount as l, openBlock as c, createElementBlock as w, normalizeClass as u, unref as o, normalizeStyle as _ } from "vue";
|
|
2
|
+
import { useNamespace as O } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
5
5
|
import "../../hooks/use-z-index/index.js";
|
|
6
6
|
import "@vueuse/core";
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
|
-
import { POPPER_CONTENT_INJECTION_KEY as
|
|
10
|
-
const
|
|
9
|
+
import { POPPER_CONTENT_INJECTION_KEY as d } from "./constants.js";
|
|
10
|
+
const R = /* @__PURE__ */ s({
|
|
11
11
|
name: "vft-popper-arrow",
|
|
12
|
-
inheritAttrs: !1
|
|
13
|
-
|
|
14
|
-
...v,
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "arrow",
|
|
15
14
|
props: {
|
|
16
15
|
arrowOffset: { default: 5 }
|
|
17
16
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
|
|
17
|
+
setup(t, { expose: a }) {
|
|
18
|
+
const p = O("popper"), { arrowOffset: n, arrowRef: r, arrowStyle: f } = m(
|
|
19
|
+
d,
|
|
21
20
|
void 0
|
|
22
21
|
);
|
|
23
22
|
return i(
|
|
24
|
-
() =>
|
|
23
|
+
() => t.arrowOffset,
|
|
25
24
|
(e) => {
|
|
26
25
|
n.value = e;
|
|
27
26
|
}
|
|
28
27
|
), l(() => {
|
|
29
28
|
r.value = void 0;
|
|
30
|
-
}),
|
|
29
|
+
}), a({
|
|
31
30
|
/**
|
|
32
31
|
* @description Arrow element
|
|
33
32
|
*/
|
|
34
33
|
arrowRef: r
|
|
35
|
-
}), (e,
|
|
34
|
+
}), (e, v) => (c(), w("span", {
|
|
36
35
|
ref_key: "arrowRef",
|
|
37
36
|
ref: r,
|
|
38
|
-
class: u(o(
|
|
37
|
+
class: u(o(p).e("arrow")),
|
|
39
38
|
"data-popper-arrow": "",
|
|
40
|
-
style:
|
|
39
|
+
style: _(o(f))
|
|
41
40
|
}, null, 6));
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
43
|
export {
|
|
45
|
-
|
|
44
|
+
R as default
|
|
46
45
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as V, getCurrentInstance as z, ref as D, provide as J, onMounted as K, watch as i, unref as e, onBeforeUnmount as U, openBlock as Y, createElementBlock as Z, mergeProps as j, createVNode as G, withCtx as H, renderSlot as Q } from "vue";
|
|
2
2
|
import X from "../focus-trap/focus-trap.vue.js";
|
|
3
3
|
import "../focus-trap/utils.js";
|
|
4
4
|
import { isElement as R } from "@vft/utils";
|
|
@@ -7,10 +7,9 @@ import { usePopperContent as W } from "./composables/use-content.js";
|
|
|
7
7
|
import { usePopperContentDOM as _ } from "./composables/use-content-dom.js";
|
|
8
8
|
import { usePopperContentFocusTrap as ee } from "./composables/use-focus-trap.js";
|
|
9
9
|
import { POPPER_CONTENT_INJECTION_KEY as te } from "./constants.js";
|
|
10
|
-
const
|
|
11
|
-
name: "vft-popper-content"
|
|
12
|
-
|
|
13
|
-
...oe,
|
|
10
|
+
const ie = /* @__PURE__ */ V({
|
|
11
|
+
name: "vft-popper-content",
|
|
12
|
+
__name: "content",
|
|
14
13
|
props: {
|
|
15
14
|
boundariesPadding: { default: 0 },
|
|
16
15
|
fallbackPlacements: {},
|
|
@@ -38,36 +37,36 @@ const oe = y({
|
|
|
38
37
|
zIndex: {}
|
|
39
38
|
},
|
|
40
39
|
emits: ["mouseenter", "mouseleave", "focus", "blur", "close"],
|
|
41
|
-
setup(r, { expose:
|
|
40
|
+
setup(r, { expose: y, emit: P }) {
|
|
42
41
|
const u = z(), {
|
|
43
|
-
focusStartRef:
|
|
42
|
+
focusStartRef: F,
|
|
44
43
|
trapped: p,
|
|
45
|
-
onFocusAfterReleased:
|
|
46
|
-
onFocusAfterTrapped:
|
|
47
|
-
onFocusInTrap:
|
|
48
|
-
onFocusoutPrevented:
|
|
49
|
-
onReleaseRequested:
|
|
50
|
-
} = ee(u.props,
|
|
51
|
-
ariaModal:
|
|
52
|
-
arrowStyle:
|
|
53
|
-
contentAttrs:
|
|
54
|
-
contentClass:
|
|
44
|
+
onFocusAfterReleased: E,
|
|
45
|
+
onFocusAfterTrapped: B,
|
|
46
|
+
onFocusInTrap: C,
|
|
47
|
+
onFocusoutPrevented: A,
|
|
48
|
+
onReleaseRequested: T
|
|
49
|
+
} = ee(u.props, P), { attributes: g, arrowRef: O, contentRef: s, styles: I, instanceRef: N, role: d, update: w } = W(u.props), {
|
|
50
|
+
ariaModal: M,
|
|
51
|
+
arrowStyle: k,
|
|
52
|
+
contentAttrs: S,
|
|
53
|
+
contentClass: q,
|
|
55
54
|
contentStyle: c,
|
|
56
|
-
updateZIndex:
|
|
55
|
+
updateZIndex: x
|
|
57
56
|
} = _(u.props, {
|
|
58
|
-
styles:
|
|
59
|
-
attributes:
|
|
57
|
+
styles: I,
|
|
58
|
+
attributes: g,
|
|
60
59
|
role: d
|
|
61
|
-
}),
|
|
60
|
+
}), $ = D();
|
|
62
61
|
J(te, {
|
|
63
|
-
arrowStyle:
|
|
64
|
-
arrowRef:
|
|
65
|
-
arrowOffset:
|
|
62
|
+
arrowStyle: k,
|
|
63
|
+
arrowRef: O,
|
|
64
|
+
arrowOffset: $
|
|
66
65
|
});
|
|
67
66
|
let t;
|
|
68
67
|
const m = (n = !0) => {
|
|
69
|
-
|
|
70
|
-
},
|
|
68
|
+
w(), n && x();
|
|
69
|
+
}, L = () => {
|
|
71
70
|
m(!1), r.visible && r.focusOnShow ? p.value = !0 : r.visible === !1 && (p.value = !1);
|
|
72
71
|
};
|
|
73
72
|
return K(() => {
|
|
@@ -77,7 +76,7 @@ const oe = y({
|
|
|
77
76
|
t == null || t(), t = void 0;
|
|
78
77
|
const o = e(n || s.value), f = e(a || s.value);
|
|
79
78
|
R(o) && (t = i(
|
|
80
|
-
[d, () => r.ariaLabel,
|
|
79
|
+
[d, () => r.ariaLabel, M, () => r.id],
|
|
81
80
|
(l) => {
|
|
82
81
|
["role", "aria-label", "aria-modal", "id"].forEach((v, b) => {
|
|
83
82
|
h(l[b]) ? o.removeAttribute(v) : o.setAttribute(v, l[b]);
|
|
@@ -89,10 +88,10 @@ const oe = y({
|
|
|
89
88
|
});
|
|
90
89
|
},
|
|
91
90
|
{ immediate: !0 }
|
|
92
|
-
), i(() => r.visible,
|
|
91
|
+
), i(() => r.visible, L, { immediate: !0 });
|
|
93
92
|
}), U(() => {
|
|
94
93
|
t == null || t(), t = void 0;
|
|
95
|
-
}),
|
|
94
|
+
}), y({
|
|
96
95
|
/**
|
|
97
96
|
* @description popper content element
|
|
98
97
|
*/
|
|
@@ -100,7 +99,7 @@ const oe = y({
|
|
|
100
99
|
/**
|
|
101
100
|
* @description popperjs instance
|
|
102
101
|
*/
|
|
103
|
-
popperInstanceRef:
|
|
102
|
+
popperInstanceRef: N,
|
|
104
103
|
/**
|
|
105
104
|
* @description method for updating popper
|
|
106
105
|
*/
|
|
@@ -112,9 +111,9 @@ const oe = y({
|
|
|
112
111
|
}), (n, a) => (Y(), Z("div", j({
|
|
113
112
|
ref_key: "contentRef",
|
|
114
113
|
ref: s
|
|
115
|
-
}, e(
|
|
114
|
+
}, e(S), {
|
|
116
115
|
style: e(c),
|
|
117
|
-
class: e(
|
|
116
|
+
class: e(q),
|
|
118
117
|
tabindex: "-1",
|
|
119
118
|
onMouseenter: a[0] || (a[0] = (o) => n.$emit("mouseenter", o)),
|
|
120
119
|
onMouseleave: a[1] || (a[1] = (o) => n.$emit("mouseleave", o))
|
|
@@ -123,12 +122,12 @@ const oe = y({
|
|
|
123
122
|
trapped: e(p),
|
|
124
123
|
"trap-on-focus-in": !0,
|
|
125
124
|
"focus-trap-el": e(s),
|
|
126
|
-
"focus-start-el": e(
|
|
127
|
-
onFocusAfterTrapped: e(
|
|
128
|
-
onFocusAfterReleased: e(
|
|
129
|
-
onFocusin: e(
|
|
130
|
-
onFocusoutPrevented: e(
|
|
131
|
-
onReleaseRequested: e(
|
|
125
|
+
"focus-start-el": e(F),
|
|
126
|
+
onFocusAfterTrapped: e(B),
|
|
127
|
+
onFocusAfterReleased: e(E),
|
|
128
|
+
onFocusin: e(C),
|
|
129
|
+
onFocusoutPrevented: e(A),
|
|
130
|
+
onReleaseRequested: e(T)
|
|
132
131
|
}, {
|
|
133
132
|
default: H(() => [
|
|
134
133
|
Q(n.$slots, "default")
|
|
@@ -139,5 +138,5 @@ const oe = y({
|
|
|
139
138
|
}
|
|
140
139
|
});
|
|
141
140
|
export {
|
|
142
|
-
|
|
141
|
+
ie as default
|
|
143
142
|
};
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { POPPER_INJECTION_KEY as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as a, ref as e, computed as i, provide as m, renderSlot as d } from "vue";
|
|
2
|
+
import { POPPER_INJECTION_KEY as _ } from "./constants.js";
|
|
3
|
+
const v = /* @__PURE__ */ a({
|
|
4
4
|
name: "vft-popper",
|
|
5
|
-
inheritAttrs: !1
|
|
6
|
-
|
|
7
|
-
...u,
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "popper",
|
|
8
7
|
props: {
|
|
9
8
|
role: { default: "tooltip" }
|
|
10
9
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const p = e(),
|
|
10
|
+
setup(t, { expose: r }) {
|
|
11
|
+
const p = e(), n = e(), s = e(), f = e(), c = i(() => t.role), o = {
|
|
13
12
|
/**
|
|
14
13
|
* @description trigger element
|
|
15
14
|
*/
|
|
@@ -17,23 +16,23 @@ const u = t({
|
|
|
17
16
|
/**
|
|
18
17
|
* @description popperjs instance
|
|
19
18
|
*/
|
|
20
|
-
popperInstanceRef:
|
|
19
|
+
popperInstanceRef: n,
|
|
21
20
|
/**
|
|
22
21
|
* @description popper content element
|
|
23
22
|
*/
|
|
24
|
-
contentRef:
|
|
23
|
+
contentRef: s,
|
|
25
24
|
/**
|
|
26
25
|
* @description popper reference element
|
|
27
26
|
*/
|
|
28
|
-
referenceRef:
|
|
27
|
+
referenceRef: f,
|
|
29
28
|
/**
|
|
30
29
|
* @description role determines how aria attributes are distributed
|
|
31
30
|
*/
|
|
32
|
-
role:
|
|
31
|
+
role: c
|
|
33
32
|
};
|
|
34
|
-
return
|
|
33
|
+
return r(o), m(_, o), (l, u) => d(l.$slots, "default");
|
|
35
34
|
}
|
|
36
35
|
});
|
|
37
36
|
export {
|
|
38
|
-
|
|
37
|
+
v as default
|
|
39
38
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as y, getCurrentInstance as h, inject as g, computed as m, onMounted as x, watch as c, onBeforeUnmount as B, openBlock as w, createBlock as M, unref as P, mergeProps as R, withCtx as k, renderSlot as L, createCommentVNode as F } from "vue";
|
|
2
2
|
import { isNil as I } from "lodash";
|
|
3
3
|
import { unrefElement as K } from "@vueuse/core";
|
|
4
4
|
import { OnlyChild as O } from "../slot/only-child.js";
|
|
@@ -9,11 +9,10 @@ import { useForwardRef as $ } from "../../hooks/use-forward-ref/index.js";
|
|
|
9
9
|
import { isElement as v } from "@vft/utils";
|
|
10
10
|
import "../../utils/ns-cover.js";
|
|
11
11
|
import { POPPER_INJECTION_KEY as N } from "./constants.js";
|
|
12
|
-
const
|
|
12
|
+
const E = /* @__PURE__ */ y({
|
|
13
13
|
name: "VftPopperTrigger",
|
|
14
|
-
inheritAttrs: !1
|
|
15
|
-
|
|
16
|
-
...V,
|
|
14
|
+
inheritAttrs: !1,
|
|
15
|
+
__name: "trigger",
|
|
17
16
|
props: {
|
|
18
17
|
virtualRef: {},
|
|
19
18
|
virtualTriggering: { type: Boolean },
|
|
@@ -27,8 +26,8 @@ const V = b({
|
|
|
27
26
|
id: {},
|
|
28
27
|
open: { type: Boolean }
|
|
29
28
|
},
|
|
30
|
-
setup(n, { expose:
|
|
31
|
-
const
|
|
29
|
+
setup(n, { expose: b }) {
|
|
30
|
+
const C = h(), { role: a, triggerRef: d } = g(N, void 0);
|
|
32
31
|
$(d);
|
|
33
32
|
const f = m(() => s.value ? n.id : void 0), l = m(() => {
|
|
34
33
|
if (a && a.value === "tooltip")
|
|
@@ -38,7 +37,7 @@ const V = b({
|
|
|
38
37
|
return a.value;
|
|
39
38
|
}), p = m(() => s.value ? `${n.open}` : void 0);
|
|
40
39
|
let o;
|
|
41
|
-
return
|
|
40
|
+
return x(() => {
|
|
42
41
|
c(
|
|
43
42
|
() => n.virtualRef,
|
|
44
43
|
(e) => {
|
|
@@ -60,7 +59,7 @@ const V = b({
|
|
|
60
59
|
"onContextmenu"
|
|
61
60
|
].forEach((t) => {
|
|
62
61
|
var u;
|
|
63
|
-
const i =
|
|
62
|
+
const i = C.props[t];
|
|
64
63
|
i && (e.addEventListener(
|
|
65
64
|
t.slice(2).toLowerCase(),
|
|
66
65
|
i
|
|
@@ -93,9 +92,9 @@ const V = b({
|
|
|
93
92
|
immediate: !0
|
|
94
93
|
}
|
|
95
94
|
);
|
|
96
|
-
}),
|
|
95
|
+
}), B(() => {
|
|
97
96
|
o == null || o(), o = void 0;
|
|
98
|
-
}),
|
|
97
|
+
}), b({
|
|
99
98
|
/**
|
|
100
99
|
* @description trigger element
|
|
101
100
|
*/
|
|
@@ -114,5 +113,5 @@ const V = b({
|
|
|
114
113
|
}
|
|
115
114
|
});
|
|
116
115
|
export {
|
|
117
|
-
|
|
116
|
+
E as default
|
|
118
117
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as u, ref as d, onMounted as p, openBlock as l, createElementBlock as w, createBlock as g, resolveDynamicComponent as v, unref as c } from "vue";
|
|
2
2
|
import { toDataURL as h } from "qrcode";
|
|
3
3
|
import { useNamespace as C } from "../../hooks/use-namespace/index.js";
|
|
4
4
|
import "@popperjs/core";
|
|
@@ -11,10 +11,9 @@ import { toCanvas as E } from "./toCanvas.js";
|
|
|
11
11
|
const L = (
|
|
12
12
|
/* hoist-static*/
|
|
13
13
|
C("qrcode")
|
|
14
|
-
),
|
|
15
|
-
name: L.b()
|
|
16
|
-
|
|
17
|
-
...k,
|
|
14
|
+
), T = /* @__PURE__ */ u({
|
|
15
|
+
name: L.b(),
|
|
16
|
+
__name: "qrcode",
|
|
18
17
|
props: {
|
|
19
18
|
value: {},
|
|
20
19
|
options: {},
|
|
@@ -23,41 +22,41 @@ const L = (
|
|
|
23
22
|
tag: { default: "canvas" }
|
|
24
23
|
},
|
|
25
24
|
emits: ["done", "error"],
|
|
26
|
-
setup(o, { expose:
|
|
25
|
+
setup(o, { expose: s, emit: a }) {
|
|
27
26
|
const r = d(null);
|
|
28
27
|
async function i() {
|
|
29
28
|
try {
|
|
30
|
-
const n = String(o.value),
|
|
31
|
-
if (!
|
|
29
|
+
const n = String(o.value), e = c(r);
|
|
30
|
+
if (!e)
|
|
32
31
|
return;
|
|
33
32
|
if (o.tag === "canvas") {
|
|
34
|
-
const
|
|
35
|
-
canvas:
|
|
33
|
+
const t = await E({
|
|
34
|
+
canvas: e,
|
|
36
35
|
width: o.width,
|
|
37
36
|
logo: o.logo,
|
|
38
37
|
content: n,
|
|
39
38
|
options: o.options || {}
|
|
40
39
|
});
|
|
41
|
-
a("done", { url:
|
|
40
|
+
a("done", { url: t, ctx: e.getContext("2d") });
|
|
42
41
|
return;
|
|
43
42
|
}
|
|
44
43
|
if (o.tag === "img") {
|
|
45
|
-
const
|
|
44
|
+
const t = await h(n, {
|
|
46
45
|
errorCorrectionLevel: "H",
|
|
47
46
|
width: o.width,
|
|
48
47
|
...o.options
|
|
49
48
|
});
|
|
50
|
-
c(r).src =
|
|
49
|
+
c(r).src = t, a("done", { url: t });
|
|
51
50
|
}
|
|
52
51
|
} catch (n) {
|
|
53
52
|
a("error", n);
|
|
54
53
|
}
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
let
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
url:
|
|
55
|
+
function f(n) {
|
|
56
|
+
let e = "";
|
|
57
|
+
const t = c(r);
|
|
58
|
+
t instanceof HTMLCanvasElement ? e = t.toDataURL() : t instanceof HTMLImageElement && (e = t.src), e && y({
|
|
59
|
+
url: e,
|
|
61
60
|
fileName: n
|
|
62
61
|
});
|
|
63
62
|
}
|
|
@@ -65,9 +64,9 @@ const L = (
|
|
|
65
64
|
const m = getCurrentInstance();
|
|
66
65
|
return watch(m.props, () => {
|
|
67
66
|
i();
|
|
68
|
-
}, { deep: !0 }),
|
|
69
|
-
download:
|
|
70
|
-
}), (n,
|
|
67
|
+
}, { deep: !0 }), s({
|
|
68
|
+
download: f
|
|
69
|
+
}), (n, e) => (l(), w("div", null, [
|
|
71
70
|
(l(), g(v(n.tag), {
|
|
72
71
|
ref_key: "wrapRef",
|
|
73
72
|
ref: r
|
|
@@ -76,5 +75,5 @@ const L = (
|
|
|
76
75
|
}
|
|
77
76
|
});
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
T as default
|
|
80
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as B, openBlock as R, createElementBlock as S, normalizeClass as r, unref as e, withDirectives as C, createElementVNode as u, isRef as V, vModelRadio as g, normalizeStyle as k, withModifiers as w, renderSlot as z, createTextVNode as N, toDisplayString as $ } from "vue";
|
|
2
2
|
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
3
3
|
import "@popperjs/core";
|
|
4
4
|
import "lodash";
|
|
@@ -7,18 +7,17 @@ import "@vueuse/core";
|
|
|
7
7
|
import "@vft/utils";
|
|
8
8
|
import "../../utils/ns-cover.js";
|
|
9
9
|
import { useRadio as E } from "./use-radio.js";
|
|
10
|
-
const M = ["value", "name", "disabled"],
|
|
11
|
-
name: "VftRadioButton"
|
|
12
|
-
|
|
13
|
-
...F,
|
|
10
|
+
const M = ["value", "name", "disabled"], I = /* @__PURE__ */ c({
|
|
11
|
+
name: "VftRadioButton",
|
|
12
|
+
__name: "radio-button",
|
|
14
13
|
props: {
|
|
15
14
|
size: {},
|
|
16
15
|
disabled: { type: Boolean },
|
|
17
16
|
label: { type: [String, Number, Boolean] },
|
|
18
17
|
name: {}
|
|
19
18
|
},
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
19
|
+
setup(b) {
|
|
20
|
+
const f = b, t = D("radio"), { radioRef: p, focus: s, size: v, disabled: m, modelValue: a, radioGroup: l } = E(f), y = B(() => ({
|
|
22
21
|
backgroundColor: (l == null ? void 0 : l.fill) || "",
|
|
23
22
|
borderColor: (l == null ? void 0 : l.fill) || "",
|
|
24
23
|
boxShadow: l != null && l.fill ? `-1px 0 0 0 ${l.fill}` : "",
|
|
@@ -29,29 +28,29 @@ const M = ["value", "name", "disabled"], F = b({
|
|
|
29
28
|
return R(), S("label", {
|
|
30
29
|
class: r([
|
|
31
30
|
e(t).b("button"),
|
|
32
|
-
e(t).is("active", e(
|
|
31
|
+
e(t).is("active", e(a) === n.label),
|
|
33
32
|
e(t).is("disabled", e(m)),
|
|
34
|
-
e(t).is("focus", e(
|
|
35
|
-
e(t).bm("button", e(
|
|
33
|
+
e(t).is("focus", e(s)),
|
|
34
|
+
e(t).bm("button", e(v))
|
|
36
35
|
])
|
|
37
36
|
}, [
|
|
38
37
|
C(u("input", {
|
|
39
38
|
ref_key: "radioRef",
|
|
40
|
-
ref:
|
|
41
|
-
"onUpdate:modelValue": o[0] || (o[0] = (i) => V(
|
|
39
|
+
ref: p,
|
|
40
|
+
"onUpdate:modelValue": o[0] || (o[0] = (i) => V(a) ? a.value = i : null),
|
|
42
41
|
class: r(e(t).be("button", "original-radio")),
|
|
43
42
|
value: n.label,
|
|
44
43
|
type: "radio",
|
|
45
44
|
name: n.name || ((d = e(l)) == null ? void 0 : d.name),
|
|
46
45
|
disabled: e(m),
|
|
47
|
-
onFocus: o[1] || (o[1] = (i) =>
|
|
48
|
-
onBlur: o[2] || (o[2] = (i) =>
|
|
46
|
+
onFocus: o[1] || (o[1] = (i) => s.value = !0),
|
|
47
|
+
onBlur: o[2] || (o[2] = (i) => s.value = !1)
|
|
49
48
|
}, null, 42, M), [
|
|
50
|
-
[g, e(
|
|
49
|
+
[g, e(a)]
|
|
51
50
|
]),
|
|
52
51
|
u("span", {
|
|
53
52
|
class: r(e(t).be("button", "inner")),
|
|
54
|
-
style: k(e(
|
|
53
|
+
style: k(e(a) === n.label ? y.value : {}),
|
|
55
54
|
onKeydown: o[3] || (o[3] = w(() => {
|
|
56
55
|
}, ["stop"]))
|
|
57
56
|
}, [
|
|
@@ -64,5 +63,5 @@ const M = ["value", "name", "disabled"], F = b({
|
|
|
64
63
|
}
|
|
65
64
|
});
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
I as default
|
|
68
67
|
};
|