vft 0.0.429 → 0.0.431
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/alert/alert.vue2.js +38 -38
- package/es/components/autocomplete/autocomplete.vue2.js +82 -82
- package/es/components/avatar/avatar.vue2.js +23 -23
- package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
- package/es/components/button/button.vue2.js +37 -37
- package/es/components/card/card.vue2.js +19 -19
- package/es/components/carousel/carousel.vue2.js +75 -75
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader-panel/index.vue2.js +2 -2
- package/es/components/cascader-panel/menu.vue2.js +2 -2
- package/es/components/cascader-panel/node.vue2.js +3 -4
- package/es/components/checkbox/checkbox-button.vue2.js +52 -52
- package/es/components/checkbox/checkbox-group.vue2.js +26 -26
- package/es/components/checkbox/checkbox.vue2.js +57 -57
- package/es/components/clamp/clamp.vue2.js +14 -14
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
- package/es/components/col/col.vue2.js +20 -20
- package/es/components/color-picker/color-picker.vue2.js +126 -128
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +18 -18
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/description.vue2.js +44 -44
- package/es/components/descriptions/descriptions-row.vue2.js +12 -12
- package/es/components/dialog/dialog-content.vue2.js +31 -31
- package/es/components/dialog/dialog.vue2.js +46 -46
- package/es/components/divider/divider.vue2.js +19 -19
- package/es/components/drawer/drawer.vue2.js +41 -41
- package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
- package/es/components/dropdown/dropdown-item.vue2.js +28 -28
- package/es/components/dropdown/dropdown.vue2.js +124 -124
- package/es/components/form/form-item.vue2.js +71 -71
- package/es/components/header-layout/header-layout.vue2.js +25 -25
- package/es/components/icon/icon.vue2.js +15 -15
- package/es/components/icon-text/icon-text.vue2.js +28 -28
- package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +63 -63
- package/es/components/image-viewer/image-viewer.vue2.js +88 -88
- package/es/components/infinite-scroll/index.d.ts +1 -1
- package/es/components/input/input.vue2.js +112 -112
- package/es/components/input-number/input-number.vue2.js +100 -100
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +19 -19
- package/es/components/logo/logo.vue2.js +22 -22
- package/es/components/menu/menu-item-group.vue2.js +8 -8
- package/es/components/menu/menu-item.vue2.js +48 -48
- package/es/components/menu/sub-menu.vue2.js +33 -31
- package/es/components/message/message.vue2.js +66 -66
- package/es/components/modal/modal-footer-action.vue2.js +25 -25
- package/es/components/modal/modal.vue2.js +40 -40
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +18 -18
- package/es/components/pagination/components/next.vue2.js +11 -11
- package/es/components/pagination/components/pager.vue2.js +74 -74
- package/es/components/pagination/components/prev.vue2.js +9 -9
- package/es/components/pagination/components/sizes.vue2.js +18 -18
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/popconfirm/popconfirm.vue2.js +47 -47
- package/es/components/popover/popover.vue2.js +28 -28
- package/es/components/popper/trigger.vue2.js +9 -9
- package/es/components/progress/progress.vue2.js +87 -87
- package/es/components/qrcode/qrcode.vue2.js +31 -31
- package/es/components/radio/radio-button.vue2.js +17 -17
- package/es/components/radio/radio-group.vue2.js +35 -35
- package/es/components/router-view-content/router-view-content.vue2.js +25 -25
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
- package/es/components/row/row.vue2.js +5 -5
- package/es/components/scrollbar/bar.vue2.js +16 -16
- package/es/components/scrollbar/scrollbar.vue2.js +48 -48
- package/es/components/scrollbar/thumb.vue2.js +27 -27
- package/es/components/search/search.vue2.js +29 -29
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/select.vue.d.ts +1 -1
- package/es/components/side-menu/index.d.ts +2 -8
- package/es/components/side-menu/side-menu.vue.d.ts +8 -62
- package/es/components/side-menu/side-menu.vue2.js +48 -46
- package/es/components/side-menu/types.d.ts +107 -0
- package/es/components/side-menu/use-drag-line.d.ts +3 -1
- package/es/components/side-menu/use-drag-line.js +39 -28
- package/es/components/skeleton/skeleton-item.vue2.js +9 -9
- package/es/components/skeleton/skeleton.vue2.js +14 -14
- package/es/components/slider/button.vue2.js +54 -54
- package/es/components/slider/slider.vue2.js +106 -106
- package/es/components/steps/item.vue2.js +56 -56
- package/es/components/steps/steps.vue2.js +16 -16
- package/es/components/super-form/super-form-action.vue2.js +28 -28
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +108 -108
- package/es/components/table/field.d.ts +4 -4
- package/es/components/teleport/teleport.vue2.js +6 -6
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +20 -20
- package/es/components/tooltip/content.vue2.js +57 -57
- package/es/components/tooltip/tooltip.vue2.js +66 -66
- package/es/components/tooltip/trigger.vue2.js +42 -42
- package/es/components/tree/tree.vue2.js +72 -72
- package/es/components/upload/upload-content.vue2.js +85 -85
- package/es/components/upload/upload-list.vue2.js +70 -70
- package/es/components/upload/upload.vue2.js +86 -86
- package/es/components/verify-code/verify-code.vue2.js +18 -18
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.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/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader-panel/index.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.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/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.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-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- 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/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.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/infinite-scroll/index.d.ts +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.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/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.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/trigger.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +5 -5
- 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/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/select.vue.d.ts +1 -1
- package/lib/components/side-menu/index.d.ts +2 -8
- package/lib/components/side-menu/side-menu.vue.d.ts +8 -62
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +107 -0
- package/lib/components/side-menu/use-drag-line.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.d.ts +3 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/components/teleport/teleport.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/timeline/timeline-item.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/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/header-layout.scss +1 -1
- package/theme-style/src/menu.scss +7 -2
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/theme-style/src/side-menu.scss +0 -3
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as B, ref as
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as B, ref as c, getCurrentInstance as O, provide as N, computed as q, createBlock as b, openBlock as g, unref as e, withCtx as t, createVNode as m, Transition as j, normalizeProps as x, guardReactiveProps as K, withDirectives as L, createElementVNode as U, normalizeStyle as G, normalizeClass as H, createCommentVNode as J, mergeProps as Q, createSlots as W, renderSlot as d, vShow as X } from "vue";
|
|
2
|
+
import Y from "../focus-trap/focus-trap.vue.js";
|
|
3
3
|
import "../focus-trap/utils.js";
|
|
4
|
-
import { VftOverlay as
|
|
5
|
-
import { VftTeleport as
|
|
4
|
+
import { VftOverlay as Z } from "../overlay/index.js";
|
|
5
|
+
import { VftTeleport as _ } from "../teleport/index.js";
|
|
6
6
|
import { UPDATE_MODEL_EVENT as ee } from "../../constants/event.js";
|
|
7
7
|
import "@vueuse/core";
|
|
8
8
|
import { isBoolean as oe } from "@vft/utils";
|
|
@@ -16,8 +16,8 @@ import { useSameTarget as te } from "../../hooks/use-same-target/index.js";
|
|
|
16
16
|
import "../../hooks/use-z-index/index.js";
|
|
17
17
|
import { dialogInjectionKey as ae } from "./constants.js";
|
|
18
18
|
import se from "./dialog-content.vue2.js";
|
|
19
|
-
import { useDialog as
|
|
20
|
-
const
|
|
19
|
+
import { useDialog as ne } from "./use-dialog.js";
|
|
20
|
+
const re = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
21
21
|
name: "vft-dialog",
|
|
22
22
|
inheritAttrs: !1
|
|
23
23
|
}), $e = /* @__PURE__ */ B({
|
|
@@ -55,7 +55,7 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
55
55
|
footerClass: {}
|
|
56
56
|
},
|
|
57
57
|
emits: {
|
|
58
|
-
[ee]: (
|
|
58
|
+
[ee]: (o) => oe(o),
|
|
59
59
|
open: () => !0,
|
|
60
60
|
opened: () => !0,
|
|
61
61
|
close: () => !0,
|
|
@@ -63,8 +63,8 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
63
63
|
openAutoFocus: () => !0,
|
|
64
64
|
closeAutoFocus: () => !0
|
|
65
65
|
},
|
|
66
|
-
setup(
|
|
67
|
-
const
|
|
66
|
+
setup(o, { expose: k }) {
|
|
67
|
+
const n = le("dialog"), p = c(), w = c(), i = c(), h = O(), {
|
|
68
68
|
visible: u,
|
|
69
69
|
titleId: y,
|
|
70
70
|
bodyId: C,
|
|
@@ -82,16 +82,16 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
82
82
|
onCloseAutoFocus: z,
|
|
83
83
|
onCloseRequested: D,
|
|
84
84
|
onFocusoutPrevented: E
|
|
85
|
-
} =
|
|
85
|
+
} = ne(h.props, p);
|
|
86
86
|
N(ae, {
|
|
87
|
-
dialogRef:
|
|
87
|
+
dialogRef: p,
|
|
88
88
|
headerRef: w,
|
|
89
89
|
bodyId: C,
|
|
90
|
-
ns:
|
|
90
|
+
ns: n,
|
|
91
91
|
rendered: v,
|
|
92
92
|
style: F
|
|
93
93
|
});
|
|
94
|
-
const
|
|
94
|
+
const a = te(M), S = q(() => o.modalPenetrable && !o.modal && !o.fullscreen);
|
|
95
95
|
return k({
|
|
96
96
|
/** @description whether the dialog is visible */
|
|
97
97
|
visible: u,
|
|
@@ -100,40 +100,40 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
100
100
|
i.value?.resetPosition();
|
|
101
101
|
},
|
|
102
102
|
handleClose: f
|
|
103
|
-
}), (
|
|
103
|
+
}), (l, s) => (g(), b(e(_), {
|
|
104
104
|
to: o.appendTo,
|
|
105
105
|
disabled: o.appendTo !== "body" ? !1 : !o.appendToBody
|
|
106
106
|
}, {
|
|
107
|
-
default:
|
|
108
|
-
m(j, K(
|
|
109
|
-
default:
|
|
110
|
-
|
|
107
|
+
default: t(() => [
|
|
108
|
+
m(j, x(K(e(T))), {
|
|
109
|
+
default: t(() => [
|
|
110
|
+
L(m(e(Z), {
|
|
111
111
|
"custom-mask-event": "",
|
|
112
112
|
mask: o.modal,
|
|
113
113
|
"overlay-class": [
|
|
114
114
|
o.modalClass ?? "",
|
|
115
|
-
`${e(
|
|
116
|
-
e(
|
|
115
|
+
`${e(n).namespace.value}-modal-dialog`,
|
|
116
|
+
e(n).is("penetrable", S.value)
|
|
117
117
|
],
|
|
118
118
|
"z-index": e(R)
|
|
119
119
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
120
|
+
default: t(() => [
|
|
121
|
+
U("div", {
|
|
122
122
|
role: "dialog",
|
|
123
123
|
"aria-modal": "true",
|
|
124
124
|
"aria-label": o.title || void 0,
|
|
125
125
|
"aria-labelledby": o.title ? void 0 : e(y),
|
|
126
126
|
"aria-describedby": e(C),
|
|
127
|
-
class:
|
|
128
|
-
style:
|
|
129
|
-
onClick:
|
|
130
|
-
(...
|
|
131
|
-
onMousedown:
|
|
132
|
-
(...
|
|
133
|
-
onMouseup:
|
|
134
|
-
(...
|
|
127
|
+
class: H(`${e(n).namespace.value}-overlay-dialog`),
|
|
128
|
+
style: G(e(P)),
|
|
129
|
+
onClick: s[0] || (s[0] = //@ts-ignore
|
|
130
|
+
(...r) => e(a).onClick && e(a).onClick(...r)),
|
|
131
|
+
onMousedown: s[1] || (s[1] = //@ts-ignore
|
|
132
|
+
(...r) => e(a).onMousedown && e(a).onMousedown(...r)),
|
|
133
|
+
onMouseup: s[2] || (s[2] = //@ts-ignore
|
|
134
|
+
(...r) => e(a).onMouseup && e(a).onMouseup(...r))
|
|
135
135
|
}, [
|
|
136
|
-
m(e(
|
|
136
|
+
m(e(Y), {
|
|
137
137
|
loop: "",
|
|
138
138
|
trapped: e(u),
|
|
139
139
|
"focus-start-el": "container",
|
|
@@ -142,12 +142,12 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
142
142
|
onFocusoutPrevented: e(E),
|
|
143
143
|
onReleaseRequested: e(D)
|
|
144
144
|
}, {
|
|
145
|
-
default:
|
|
146
|
-
e(v) ? (g(), b(se,
|
|
145
|
+
default: t(() => [
|
|
146
|
+
e(v) ? (g(), b(se, Q({
|
|
147
147
|
key: 0,
|
|
148
148
|
ref_key: "dialogContentRef",
|
|
149
149
|
ref: i
|
|
150
|
-
},
|
|
150
|
+
}, l.$attrs, {
|
|
151
151
|
center: o.center,
|
|
152
152
|
"align-center": e($),
|
|
153
153
|
"close-icon": o.closeIcon,
|
|
@@ -160,36 +160,36 @@ const ne = ["aria-label", "aria-labelledby", "aria-describedby"], de = B({
|
|
|
160
160
|
"show-close": o.showClose,
|
|
161
161
|
title: o.title,
|
|
162
162
|
onClose: e(f)
|
|
163
|
-
}),
|
|
164
|
-
header:
|
|
165
|
-
|
|
163
|
+
}), W({
|
|
164
|
+
header: t(() => [
|
|
165
|
+
l.$slots.title ? d(l.$slots, "title", { key: 1 }) : d(l.$slots, "header", {
|
|
166
166
|
key: 0,
|
|
167
167
|
close: e(f),
|
|
168
168
|
titleId: e(y),
|
|
169
|
-
titleClass: e(
|
|
169
|
+
titleClass: e(n).e("title")
|
|
170
170
|
})
|
|
171
171
|
]),
|
|
172
|
-
default:
|
|
173
|
-
d(
|
|
172
|
+
default: t(() => [
|
|
173
|
+
d(l.$slots, "default")
|
|
174
174
|
]),
|
|
175
175
|
_: 2
|
|
176
176
|
}, [
|
|
177
|
-
|
|
177
|
+
l.$slots.footer ? {
|
|
178
178
|
name: "footer",
|
|
179
|
-
fn:
|
|
180
|
-
d(
|
|
179
|
+
fn: t(() => [
|
|
180
|
+
d(l.$slots, "footer")
|
|
181
181
|
]),
|
|
182
182
|
key: "0"
|
|
183
183
|
} : void 0
|
|
184
|
-
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "onClose"])) :
|
|
184
|
+
]), 1040, ["center", "align-center", "close-icon", "draggable", "overflow", "fullscreen", "header-class", "body-class", "footer-class", "show-close", "title", "onClose"])) : J("", !0)
|
|
185
185
|
]),
|
|
186
186
|
_: 3
|
|
187
187
|
}, 8, ["trapped", "onFocusAfterTrapped", "onFocusAfterReleased", "onFocusoutPrevented", "onReleaseRequested"])
|
|
188
|
-
], 46,
|
|
188
|
+
], 46, re)
|
|
189
189
|
]),
|
|
190
190
|
_: 3
|
|
191
191
|
}, 8, ["mask", "overlay-class", "z-index"]), [
|
|
192
|
-
[
|
|
192
|
+
[X, e(u)]
|
|
193
193
|
])
|
|
194
194
|
]),
|
|
195
195
|
_: 3
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, computed as m, createElementBlock as i, openBlock as n, normalizeStyle as
|
|
1
|
+
import { defineComponent as a, computed as m, createElementBlock as i, openBlock as n, normalizeStyle as c, normalizeClass as l, unref as r, createCommentVNode as s, renderSlot as u } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -8,10 +8,10 @@ import { useNamespace as f } from "../../hooks/use-namespace/index.js";
|
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
const
|
|
11
|
+
const v = a({
|
|
12
12
|
name: "vft-divider"
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
13
|
+
}), N = /* @__PURE__ */ a({
|
|
14
|
+
...v,
|
|
15
15
|
props: {
|
|
16
16
|
direction: { default: "horizontal" },
|
|
17
17
|
contentPosition: { default: "center" },
|
|
@@ -20,29 +20,29 @@ const p = a({
|
|
|
20
20
|
marginY: {},
|
|
21
21
|
marginX: {}
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
...
|
|
26
|
-
"border-style":
|
|
27
|
-
"border-color":
|
|
28
|
-
"margin-y":
|
|
29
|
-
"margin-x":
|
|
23
|
+
setup(e) {
|
|
24
|
+
const t = f("divider"), d = m(() => ({
|
|
25
|
+
...t.cssVarBlock({
|
|
26
|
+
"border-style": e.borderStyle,
|
|
27
|
+
"border-color": e.borderColor,
|
|
28
|
+
"margin-y": e.marginY,
|
|
29
|
+
"margin-x": e.marginX
|
|
30
30
|
})
|
|
31
31
|
}));
|
|
32
|
-
return (
|
|
33
|
-
class: l([t
|
|
34
|
-
style:
|
|
32
|
+
return (o, y) => (n(), i("div", {
|
|
33
|
+
class: l([r(t).b(), r(t).m(e.direction)]),
|
|
34
|
+
style: c(d.value),
|
|
35
35
|
role: "separator"
|
|
36
36
|
}, [
|
|
37
|
-
|
|
37
|
+
o.$slots.default && e.direction !== "vertical" ? (n(), i("div", {
|
|
38
38
|
key: 0,
|
|
39
|
-
class: l([t
|
|
39
|
+
class: l([r(t).e("text"), r(t).is(e.contentPosition)])
|
|
40
40
|
}, [
|
|
41
|
-
u(
|
|
42
|
-
], 2)) :
|
|
41
|
+
u(o.$slots, "default")
|
|
42
|
+
], 2)) : s("", !0)
|
|
43
43
|
], 6));
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
export {
|
|
47
|
-
|
|
47
|
+
N as default
|
|
48
48
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as F, getCurrentInstance as q, ref as m, computed as
|
|
1
|
+
import { defineComponent as F, getCurrentInstance as q, ref as m, computed as x, createBlock as A, openBlock as a, unref as e, withCtx as n, createVNode as y, Transition as H, withDirectives as j, createElementVNode as b, mergeProps as R, withModifiers as U, createElementBlock as d, createCommentVNode as r, normalizeClass as s, renderSlot as i, toDisplayString as G, normalizeStyle as J, vShow as K } from "vue";
|
|
2
2
|
import "../dialog/index.js";
|
|
3
3
|
import Q from "../focus-trap/focus-trap.vue.js";
|
|
4
4
|
import "../focus-trap/utils.js";
|
|
@@ -7,7 +7,7 @@ import { VftOverlay as X } from "../overlay/index.js";
|
|
|
7
7
|
import { VftTeleport as Y } from "../teleport/index.js";
|
|
8
8
|
import { UPDATE_MODEL_EVENT as Z } from "../../constants/event.js";
|
|
9
9
|
import "@vueuse/core";
|
|
10
|
-
import { isBoolean as
|
|
10
|
+
import { isBoolean as _, singleAttrToObj as ee } from "@vft/utils";
|
|
11
11
|
import "../config-provider/hooks/use-global-config.js";
|
|
12
12
|
import "lodash-es";
|
|
13
13
|
import "../form/index.js";
|
|
@@ -60,7 +60,7 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = ["id"], r
|
|
|
60
60
|
footerClass: {}
|
|
61
61
|
},
|
|
62
62
|
emits: {
|
|
63
|
-
[Z]: (
|
|
63
|
+
[Z]: (o) => _(o),
|
|
64
64
|
open: () => !0,
|
|
65
65
|
opened: () => !0,
|
|
66
66
|
close: () => !0,
|
|
@@ -68,14 +68,14 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = ["id"], r
|
|
|
68
68
|
openAutoFocus: () => !0,
|
|
69
69
|
closeAutoFocus: () => !0
|
|
70
70
|
},
|
|
71
|
-
setup(
|
|
71
|
+
setup(o, { expose: T }) {
|
|
72
72
|
const C = q(), f = m(), v = m(), B = m(), t = oe("drawer"), {
|
|
73
73
|
afterEnter: k,
|
|
74
74
|
afterLeave: h,
|
|
75
75
|
beforeLeave: I,
|
|
76
76
|
visible: u,
|
|
77
77
|
rendered: E,
|
|
78
|
-
titleId:
|
|
78
|
+
titleId: c,
|
|
79
79
|
bodyId: g,
|
|
80
80
|
zIndex: w,
|
|
81
81
|
onModalClick: V,
|
|
@@ -83,38 +83,38 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = ["id"], r
|
|
|
83
83
|
onCloseAutoFocus: L,
|
|
84
84
|
onFocusoutPrevented: O,
|
|
85
85
|
onCloseRequested: P,
|
|
86
|
-
handleClose:
|
|
86
|
+
handleClose: p
|
|
87
87
|
} = le(C.props, f), {
|
|
88
88
|
isHorizontal: S,
|
|
89
89
|
size: $,
|
|
90
90
|
isResizing: N
|
|
91
|
-
} = te(C.props, B), M =
|
|
91
|
+
} = te(C.props, B), M = x(() => ee(o.closeIcon, "icon", {
|
|
92
92
|
icon: "icon-close",
|
|
93
93
|
pointer: !0
|
|
94
94
|
}));
|
|
95
95
|
return T({
|
|
96
|
-
close:
|
|
96
|
+
close: p,
|
|
97
97
|
afterEnter: k,
|
|
98
98
|
afterLeave: h
|
|
99
|
-
}), (
|
|
99
|
+
}), (l, z) => (a(), A(e(Y), {
|
|
100
100
|
to: o.appendTo,
|
|
101
101
|
disabled: o.appendTo !== "body" ? !1 : !o.appendToBody
|
|
102
102
|
}, {
|
|
103
|
-
default:
|
|
104
|
-
y(
|
|
103
|
+
default: n(() => [
|
|
104
|
+
y(H, {
|
|
105
105
|
name: e(t).b("fade"),
|
|
106
106
|
onAfterEnter: e(k),
|
|
107
107
|
onAfterLeave: e(h),
|
|
108
108
|
onBeforeLeave: e(I)
|
|
109
109
|
}, {
|
|
110
|
-
default:
|
|
111
|
-
|
|
110
|
+
default: n(() => [
|
|
111
|
+
j(y(e(X), {
|
|
112
112
|
mask: o.modal,
|
|
113
113
|
"overlay-class": [e(t).is("drawer"), o.modalClass ?? ""],
|
|
114
114
|
"z-index": e(w),
|
|
115
115
|
onClick: e(V)
|
|
116
116
|
}, {
|
|
117
|
-
default:
|
|
117
|
+
default: n(() => [
|
|
118
118
|
y(e(Q), {
|
|
119
119
|
loop: "",
|
|
120
120
|
trapped: e(u),
|
|
@@ -125,15 +125,15 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = ["id"], r
|
|
|
125
125
|
onFocusoutPrevented: e(O),
|
|
126
126
|
onReleaseRequested: e(P)
|
|
127
127
|
}, {
|
|
128
|
-
default:
|
|
128
|
+
default: n(() => [
|
|
129
129
|
b("div", R({
|
|
130
130
|
ref_key: "drawerRef",
|
|
131
131
|
ref: f,
|
|
132
132
|
"aria-modal": "true",
|
|
133
133
|
"aria-label": o.title || void 0,
|
|
134
|
-
"aria-labelledby": o.title ? void 0 : e(
|
|
134
|
+
"aria-labelledby": o.title ? void 0 : e(c),
|
|
135
135
|
"aria-describedby": e(g)
|
|
136
|
-
},
|
|
136
|
+
}, l.$attrs, {
|
|
137
137
|
class: [
|
|
138
138
|
e(t).b(),
|
|
139
139
|
o.direction,
|
|
@@ -142,58 +142,58 @@ const ae = ["aria-label", "aria-labelledby", "aria-describedby"], se = ["id"], r
|
|
|
142
142
|
],
|
|
143
143
|
style: { [e(S) ? "width" : "height"]: e($) },
|
|
144
144
|
role: "dialog",
|
|
145
|
-
onClick: z[0] || (z[0] =
|
|
145
|
+
onClick: z[0] || (z[0] = U(() => {
|
|
146
146
|
}, ["stop"]))
|
|
147
147
|
}), [
|
|
148
148
|
b("span", {
|
|
149
149
|
ref_key: "focusStartRef",
|
|
150
150
|
ref: v,
|
|
151
|
-
class:
|
|
151
|
+
class: s(e(t).e("sr-focus")),
|
|
152
152
|
tabindex: "-1"
|
|
153
153
|
}, null, 2),
|
|
154
|
-
o.withHeader ? (
|
|
154
|
+
o.withHeader ? (a(), d("header", {
|
|
155
155
|
key: 0,
|
|
156
|
-
class:
|
|
156
|
+
class: s([e(t).e("header"), o.headerClass])
|
|
157
157
|
}, [
|
|
158
|
-
|
|
158
|
+
l.$slots.title ? i(l.$slots, "title", { key: 1 }) : i(l.$slots, "header", {
|
|
159
159
|
key: 0,
|
|
160
|
-
close: e(
|
|
161
|
-
titleId: e(
|
|
160
|
+
close: e(p),
|
|
161
|
+
titleId: e(c),
|
|
162
162
|
titleClass: e(t).e("title")
|
|
163
163
|
}, () => [
|
|
164
164
|
b("span", {
|
|
165
|
-
id: e(
|
|
165
|
+
id: e(c),
|
|
166
166
|
role: "heading",
|
|
167
|
-
class:
|
|
167
|
+
class: s(e(t).e("title"))
|
|
168
168
|
}, G(o.title), 11, se)
|
|
169
169
|
]),
|
|
170
|
-
o.showClose ? (
|
|
170
|
+
o.showClose ? (a(), A(e(W), R({
|
|
171
171
|
key: 2,
|
|
172
|
-
onClick: e(
|
|
172
|
+
onClick: e(p)
|
|
173
173
|
}, M.value, {
|
|
174
174
|
class: e(t).e("close")
|
|
175
|
-
}), null, 16, ["onClick", "class"])) :
|
|
176
|
-
], 2)) :
|
|
177
|
-
e(E) ? (
|
|
175
|
+
}), null, 16, ["onClick", "class"])) : r("", !0)
|
|
176
|
+
], 2)) : r("", !0),
|
|
177
|
+
e(E) ? (a(), d("div", {
|
|
178
178
|
key: 1,
|
|
179
179
|
id: e(g),
|
|
180
|
-
class:
|
|
180
|
+
class: s([e(t).e("body"), o.bodyClass])
|
|
181
181
|
}, [
|
|
182
|
-
|
|
183
|
-
], 10, re)) :
|
|
184
|
-
|
|
182
|
+
i(l.$slots, "default")
|
|
183
|
+
], 10, re)) : r("", !0),
|
|
184
|
+
l.$slots.footer ? (a(), d("div", {
|
|
185
185
|
key: 2,
|
|
186
|
-
class:
|
|
186
|
+
class: s([e(t).e("footer"), o.footerClass])
|
|
187
187
|
}, [
|
|
188
|
-
|
|
189
|
-
], 2)) :
|
|
190
|
-
o.resizable ? (
|
|
188
|
+
i(l.$slots, "footer")
|
|
189
|
+
], 2)) : r("", !0),
|
|
190
|
+
o.resizable ? (a(), d("div", {
|
|
191
191
|
key: 3,
|
|
192
192
|
ref_key: "draggerRef",
|
|
193
193
|
ref: B,
|
|
194
194
|
style: J({ zIndex: e(w) }),
|
|
195
|
-
class:
|
|
196
|
-
}, null, 6)) :
|
|
195
|
+
class: s(e(t).e("dragger"))
|
|
196
|
+
}, null, 6)) : r("", !0)
|
|
197
197
|
], 16, ae)
|
|
198
198
|
]),
|
|
199
199
|
_: 3
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as O, computed as l, inject as r, createElementBlock as I, openBlock as d, Fragment as y, createCommentVNode as c, createElementVNode as P, mergeProps as s, unref as o, withModifiers as g, createBlock as D, renderSlot as F, normalizeProps as V } from "vue";
|
|
2
2
|
import { COLLECTION_ITEM_SIGN as $ } from "../collection/collection.js";
|
|
3
3
|
import { VftIcon as J } from "../icon/index.js";
|
|
4
4
|
import "../roving-focus-group/roving-focus-group.vue2.js";
|
|
@@ -20,9 +20,9 @@ import "@popperjs/core";
|
|
|
20
20
|
import "../../hooks/use-z-index/index.js";
|
|
21
21
|
import { DROPDOWN_INJECTION_KEY as W } from "./tokens.js";
|
|
22
22
|
import { DROPDOWN_COLLECTION_ITEM_INJECTION_KEY as z } from "./types.js";
|
|
23
|
-
const A = ["aria-disabled", "tabindex", "role"], H =
|
|
23
|
+
const A = ["aria-disabled", "tabindex", "role"], H = O({
|
|
24
24
|
name: "DropdownItemImpl"
|
|
25
|
-
}),
|
|
25
|
+
}), Ee = /* @__PURE__ */ O({
|
|
26
26
|
...H,
|
|
27
27
|
props: {
|
|
28
28
|
command: { default: () => ({}) },
|
|
@@ -32,60 +32,60 @@ const A = ["aria-disabled", "tabindex", "role"], H = c({
|
|
|
32
32
|
icon: { default: "" }
|
|
33
33
|
},
|
|
34
34
|
emits: ["pointermove", "pointerleave", "click", "clickimpl"],
|
|
35
|
-
setup(
|
|
36
|
-
const C =
|
|
35
|
+
setup(i, { emit: N }) {
|
|
36
|
+
const C = i, v = N, m = j("dropdown"), T = l(() => G(C.icon, "icon")), { role: a } = r(W, void 0), { collectionItemRef: b } = r(
|
|
37
37
|
z,
|
|
38
38
|
void 0
|
|
39
|
-
), { collectionItemRef:
|
|
39
|
+
), { collectionItemRef: R } = r(
|
|
40
40
|
Y,
|
|
41
41
|
void 0
|
|
42
42
|
), {
|
|
43
|
-
rovingFocusGroupItemRef:
|
|
44
|
-
tabIndex:
|
|
45
|
-
handleFocus:
|
|
46
|
-
handleKeydown:
|
|
47
|
-
handleMousedown:
|
|
48
|
-
} =
|
|
49
|
-
_,
|
|
43
|
+
rovingFocusGroupItemRef: k,
|
|
44
|
+
tabIndex: w,
|
|
45
|
+
handleFocus: p,
|
|
46
|
+
handleKeydown: K,
|
|
47
|
+
handleMousedown: u
|
|
48
|
+
} = r(B, void 0), L = U(
|
|
50
49
|
b,
|
|
51
|
-
R
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
50
|
+
R,
|
|
51
|
+
k
|
|
52
|
+
), _ = l(() => a.value === "menu" ? "menuitem" : a.value === "navigation" ? "link" : "button"), f = S((t) => {
|
|
53
|
+
const { code: e } = t;
|
|
54
|
+
if (e === E.enter || e === E.space)
|
|
55
|
+
return t.preventDefault(), t.stopImmediatePropagation(), v("clickimpl", t), !0;
|
|
56
|
+
}, K), M = l(() => ({
|
|
57
57
|
[$]: ""
|
|
58
58
|
}));
|
|
59
|
-
return (
|
|
60
|
-
|
|
59
|
+
return (t, e) => (d(), I(y, null, [
|
|
60
|
+
i.divided ? (d(), I("li", s({
|
|
61
61
|
key: 0,
|
|
62
62
|
role: "separator",
|
|
63
|
-
class:
|
|
64
|
-
},
|
|
65
|
-
P("li", s({ ref:
|
|
66
|
-
"aria-disabled":
|
|
67
|
-
class: [
|
|
68
|
-
tabindex:
|
|
69
|
-
role:
|
|
70
|
-
onClick:
|
|
71
|
-
onFocus:
|
|
72
|
-
(...n) =>
|
|
73
|
-
onKeydown:
|
|
63
|
+
class: o(m).bem("menu", "item", "divided")
|
|
64
|
+
}, t.$attrs), null, 16)) : c("", !0),
|
|
65
|
+
P("li", s({ ref: o(L) }, { ...M.value, ...t.$attrs }, {
|
|
66
|
+
"aria-disabled": i.disabled,
|
|
67
|
+
class: [o(m).be("menu", "item"), o(m).is("disabled", i.disabled)],
|
|
68
|
+
tabindex: o(w),
|
|
69
|
+
role: _.value,
|
|
70
|
+
onClick: e[0] || (e[0] = (n) => t.$emit("clickimpl", n)),
|
|
71
|
+
onFocus: e[1] || (e[1] = //@ts-ignore
|
|
72
|
+
(...n) => o(p) && o(p)(...n)),
|
|
73
|
+
onKeydown: e[2] || (e[2] = g(
|
|
74
74
|
//@ts-ignore
|
|
75
|
-
(...n) =>
|
|
75
|
+
(...n) => o(f) && o(f)(...n),
|
|
76
76
|
["self"]
|
|
77
77
|
)),
|
|
78
|
-
onMousedown:
|
|
79
|
-
(...n) =>
|
|
80
|
-
onPointermove:
|
|
81
|
-
onPointerleave:
|
|
78
|
+
onMousedown: e[3] || (e[3] = //@ts-ignore
|
|
79
|
+
(...n) => o(u) && o(u)(...n)),
|
|
80
|
+
onPointermove: e[4] || (e[4] = (n) => t.$emit("pointermove", n)),
|
|
81
|
+
onPointerleave: e[5] || (e[5] = (n) => t.$emit("pointerleave", n))
|
|
82
82
|
}), [
|
|
83
|
-
|
|
84
|
-
F(
|
|
83
|
+
i.icon ? (d(), D(o(J), V(s({ key: 0 }, T.value)), null, 16)) : c("", !0),
|
|
84
|
+
F(t.$slots, "default")
|
|
85
85
|
], 16, A)
|
|
86
86
|
], 64));
|
|
87
87
|
}
|
|
88
88
|
});
|
|
89
89
|
export {
|
|
90
|
-
|
|
90
|
+
Ee as default
|
|
91
91
|
};
|