morya-ui 0.5.0 → 0.5.1
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/CHANGELOG.md +22 -0
- package/dist/{Input-D2bee2LU.js → Input-BErawS7K.js} +1 -5
- package/dist/{Pagination-DpNOb0CS.js → Pagination-B8WYoL2a.js} +1 -1
- package/dist/{Popover-Bnz7KNZq.js → Popover-zQChu00_.js} +6 -1
- package/dist/{Select-q4X2ff_M.js → Select-BaFKBeIh.js} +2 -2
- package/dist/{Textarea-DsFOAtPd.js → Textarea-WCEgpzbq.js} +1 -5
- package/dist/calendar/index.js +1 -1
- package/dist/color-picker/index.js +4 -4
- package/dist/command-menu/index.js +73 -66
- package/dist/components/ColorPicker/ColorPicker.vue.d.ts +1 -1
- package/dist/components/ColorPicker/types.d.ts +1 -1
- package/dist/components/ColorPicker/types.d.ts.map +1 -1
- package/dist/components/CommandMenu/CommandMenu.vue.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuNodes.vue.d.ts.map +1 -1
- package/dist/components/Dock/Dock.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
- package/dist/components/Input/Input.vue.d.ts +0 -1
- package/dist/components/Input/Input.vue.d.ts.map +1 -1
- package/dist/components/Input/types.d.ts +0 -2
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/components/InputPassword/InputPassword.vue.d.ts +0 -1
- package/dist/components/InputPassword/InputPassword.vue.d.ts.map +1 -1
- package/dist/components/InputPassword/types.d.ts +0 -2
- package/dist/components/InputPassword/types.d.ts.map +1 -1
- package/dist/components/MegaMenu/MegaMenu.vue.d.ts.map +1 -1
- package/dist/components/Mentions/Mentions.vue.d.ts +0 -1
- package/dist/components/Mentions/Mentions.vue.d.ts.map +1 -1
- package/dist/components/Mentions/types.d.ts +0 -2
- package/dist/components/Mentions/types.d.ts.map +1 -1
- package/dist/components/Menu/Menu.vue.d.ts.map +1 -1
- package/dist/components/Menu/MenuNodes.vue.d.ts.map +1 -1
- package/dist/components/Menu/styles.css +45 -3
- package/dist/components/Menu/types.d.ts +3 -1
- package/dist/components/Menu/types.d.ts.map +1 -1
- package/dist/components/Menubar/Menubar.vue.d.ts +2 -2
- package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
- package/dist/components/Popover/Popover.vue.d.ts.map +1 -1
- package/dist/components/Rating/Rating.vue.d.ts +1 -1
- package/dist/components/Rating/types.d.ts +2 -2
- package/dist/components/Rating/types.d.ts.map +1 -1
- package/dist/components/Select/Select.vue.d.ts +1 -1
- package/dist/components/Select/types.d.ts +1 -1
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/SpeedDial/SpeedDial.vue.d.ts +3 -3
- package/dist/components/SpeedDial/SpeedDial.vue.d.ts.map +1 -1
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/components/Textarea/Textarea.vue.d.ts +0 -1
- package/dist/components/Textarea/Textarea.vue.d.ts.map +1 -1
- package/dist/components/Textarea/types.d.ts +0 -2
- package/dist/components/Textarea/types.d.ts.map +1 -1
- package/dist/components/Tooltip/styles.css +15 -2
- package/dist/context-menu/index.js +92 -84
- package/dist/data-view/index.js +1 -1
- package/dist/dock/index.js +21 -18
- package/dist/dropdown/index.js +103 -95
- package/dist/{icon-H8prbteT.js → icon-CUrSaD8r.js} +4 -1
- package/dist/index.js +3464 -3391
- package/dist/input/index.js +1 -1
- package/dist/input-password/index.js +1 -5
- package/dist/list/index.js +1 -1
- package/dist/mega-menu/index.js +94 -87
- package/dist/mentions/index.js +35 -39
- package/dist/menu/index.js +235 -213
- package/dist/menu/style.css +60 -5
- package/dist/menubar/index.js +106 -98
- package/dist/pagination/index.js +1 -1
- package/dist/popover/index.js +1 -1
- package/dist/rating/index.js +2 -2
- package/dist/select/index.js +1 -1
- package/dist/shared/menu/icon.d.ts +3 -0
- package/dist/shared/menu/icon.d.ts.map +1 -1
- package/dist/shared/menu/index.d.ts +2 -2
- package/dist/shared/menu/index.d.ts.map +1 -1
- package/dist/shared/menu/types.d.ts +3 -1
- package/dist/shared/menu/types.d.ts.map +1 -1
- package/dist/sidebar/index.js +37 -29
- package/dist/speed-dial/index.js +101 -94
- package/dist/split-button/index.js +3 -3
- package/dist/styles.css +1 -1
- package/dist/table/index.js +3 -3
- package/dist/textarea/index.js +1 -1
- package/dist/toggle-button/index.js +1 -1
- package/dist/tooltip/style.css +15 -2
- package/dist/typography/index.js +1 -1
- package/package.json +1 -1
|
@@ -4,12 +4,12 @@ import { t as r } from "../useFloatingViewportSync-wLLKIGUA.js";
|
|
|
4
4
|
import { t as i } from "../useMotionTransition-DohkfWRB.js";
|
|
5
5
|
import { t as a } from "../Icon-CmHjx7W8.js";
|
|
6
6
|
import { t as o } from "../Scrollbar-DTeJ8P5b.js";
|
|
7
|
-
import { t as s } from "../
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { l as
|
|
7
|
+
import { t as s } from "../key-CaQYVkjh.js";
|
|
8
|
+
import { n as c, t as l } from "../icon-CUrSaD8r.js";
|
|
9
|
+
import { t as u } from "../FlyoutSubmenu-C1n-fr6i.js";
|
|
10
|
+
import { l as d } from "../config-Cd20zAyW.js";
|
|
11
11
|
import "./style.js";
|
|
12
|
-
import { Fragment as
|
|
12
|
+
import { Fragment as f, Teleport as p, Transition as m, computed as h, createBlock as g, createCommentVNode as _, createElementBlock as v, createElementVNode as y, createVNode as b, defineComponent as x, mergeModels as S, mergeProps as C, nextTick as w, normalizeClass as T, normalizeStyle as ee, onBeforeUnmount as E, openBlock as D, ref as O, renderList as k, renderSlot as A, resolveDynamicComponent as j, toDisplayString as M, unref as N, useAttrs as te, useModel as P, watch as F, withCtx as I, withModifiers as L } from "vue";
|
|
13
13
|
//#region src/components/ContextMenu/ContextMenuNodes.vue?vue&type=script&setup=true&lang.ts
|
|
14
14
|
var R = {
|
|
15
15
|
key: 0,
|
|
@@ -32,79 +32,86 @@ var R = {
|
|
|
32
32
|
}, q = { class: "m-contextmenu__label" }, J = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "m-contextmenu__shortcut"
|
|
35
|
-
}, Y = /* @__PURE__ */
|
|
35
|
+
}, Y = /* @__PURE__ */ x({
|
|
36
36
|
__name: "ContextMenuNodes",
|
|
37
37
|
props: { items: {} },
|
|
38
38
|
emits: ["activate"],
|
|
39
39
|
setup(e, { emit: t }) {
|
|
40
40
|
let n = O(null), r = O(null), i;
|
|
41
|
-
function
|
|
41
|
+
function d() {
|
|
42
42
|
i && clearTimeout(i), i = void 0;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
44
|
+
function p() {
|
|
45
|
+
d(), i = setTimeout(() => {
|
|
46
46
|
n.value = null, r.value = null;
|
|
47
47
|
}, 150);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return
|
|
49
|
+
function m(e, t) {
|
|
50
|
+
return s(e, t, "cm");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
52
|
+
function h(e) {
|
|
53
|
+
return typeof e.icon == "string" ? l(e.icon) : void 0;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
|
|
55
|
+
function x(e) {
|
|
56
|
+
return c(e.icon);
|
|
57
|
+
}
|
|
58
|
+
function S(e) {
|
|
59
|
+
return !!(h(e) || x(e));
|
|
60
|
+
}
|
|
61
|
+
function C(e, t) {
|
|
62
|
+
d(), n.value = e;
|
|
57
63
|
let i = t.currentTarget;
|
|
58
64
|
r.value = i?.querySelector(".m-contextmenu__item--parent") ?? i;
|
|
59
65
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
66
|
+
function w() {
|
|
67
|
+
d();
|
|
62
68
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
69
|
+
function T() {
|
|
70
|
+
p();
|
|
65
71
|
}
|
|
66
|
-
return (t, i) => (D(!0),
|
|
72
|
+
return (t, i) => (D(!0), v(f, null, k(e.items, (e, s) => (D(), v(f, { key: m(e, s) }, [e.separator ? (D(), v("div", R)) : e.items?.length ? (D(), v("div", {
|
|
67
73
|
key: 1,
|
|
68
74
|
class: "m-contextmenu__submenu-wrap",
|
|
69
|
-
onMouseenter: (e) =>
|
|
70
|
-
onMouseleave: i[1] ||= (e) =>
|
|
71
|
-
}, [
|
|
75
|
+
onMouseenter: (e) => C(s, e),
|
|
76
|
+
onMouseleave: i[1] ||= (e) => p()
|
|
77
|
+
}, [y("button", {
|
|
72
78
|
type: "button",
|
|
73
79
|
class: "m-contextmenu__item m-contextmenu__item--parent",
|
|
74
80
|
role: "menuitem",
|
|
75
81
|
disabled: e.disabled
|
|
76
82
|
}, [
|
|
77
|
-
|
|
78
|
-
|
|
83
|
+
S(e) ? (D(), v("span", V, [h(e) ? (D(), g(a, {
|
|
84
|
+
key: 0,
|
|
85
|
+
name: h(e),
|
|
79
86
|
size: "sm"
|
|
80
|
-
}, null, 8, ["name"])])) :
|
|
81
|
-
|
|
82
|
-
e.shortcut ? (D(),
|
|
83
|
-
|
|
87
|
+
}, null, 8, ["name"])) : x(e) ? (D(), g(j(x(e)), { key: 1 })) : _("", !0)])) : _("", !0),
|
|
88
|
+
y("span", H, M(e.label), 1),
|
|
89
|
+
e.shortcut ? (D(), v("span", U, M(e.shortcut), 1)) : _("", !0),
|
|
90
|
+
y("span", W, [b(a, {
|
|
84
91
|
name: "chevron-right",
|
|
85
92
|
size: "sm"
|
|
86
93
|
})])
|
|
87
|
-
], 8, B),
|
|
94
|
+
], 8, B), b(u, {
|
|
88
95
|
open: n.value === s,
|
|
89
96
|
anchor: n.value === s ? r.value : null,
|
|
90
97
|
"panel-class": "m-contextmenu__submenu",
|
|
91
|
-
onEnter:
|
|
92
|
-
onLeave:
|
|
98
|
+
onEnter: w,
|
|
99
|
+
onLeave: T
|
|
93
100
|
}, {
|
|
94
|
-
default: I(() => [
|
|
101
|
+
default: I(() => [b(o, {
|
|
95
102
|
class: "m-contextmenu__submenu-scroll",
|
|
96
103
|
"fit-content": "",
|
|
97
104
|
"wrap-class": "m-contextmenu__submenu-wrap-inner",
|
|
98
105
|
"view-class": "m-contextmenu__submenu-view"
|
|
99
106
|
}, {
|
|
100
|
-
default: I(() => [
|
|
107
|
+
default: I(() => [b(Y, {
|
|
101
108
|
items: e.items,
|
|
102
109
|
onActivate: i[0] ||= (e) => t.$emit("activate", e)
|
|
103
110
|
}, null, 8, ["items"])]),
|
|
104
111
|
_: 2
|
|
105
112
|
}, 1024)]),
|
|
106
113
|
_: 2
|
|
107
|
-
}, 1032, ["open", "anchor"])], 40, z)) : (D(),
|
|
114
|
+
}, 1032, ["open", "anchor"])], 40, z)) : (D(), v("button", {
|
|
108
115
|
key: 2,
|
|
109
116
|
type: "button",
|
|
110
117
|
class: "m-contextmenu__item",
|
|
@@ -112,18 +119,19 @@ var R = {
|
|
|
112
119
|
disabled: e.disabled,
|
|
113
120
|
onClick: (n) => t.$emit("activate", e)
|
|
114
121
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
122
|
+
S(e) ? (D(), v("span", K, [h(e) ? (D(), g(a, {
|
|
123
|
+
key: 0,
|
|
124
|
+
name: h(e),
|
|
117
125
|
size: "sm"
|
|
118
|
-
}, null, 8, ["name"])])) :
|
|
119
|
-
|
|
120
|
-
e.shortcut ? (D(),
|
|
126
|
+
}, null, 8, ["name"])) : x(e) ? (D(), g(j(x(e)), { key: 1 })) : _("", !0)])) : _("", !0),
|
|
127
|
+
y("span", q, M(e.label), 1),
|
|
128
|
+
e.shortcut ? (D(), v("span", J, M(e.shortcut), 1)) : _("", !0)
|
|
121
129
|
], 8, G))], 64))), 128));
|
|
122
130
|
}
|
|
123
|
-
}), X = /* @__PURE__ */
|
|
131
|
+
}), X = /* @__PURE__ */ x({
|
|
124
132
|
inheritAttrs: !1,
|
|
125
133
|
__name: "ContextMenu",
|
|
126
|
-
props: /*@__PURE__*/
|
|
134
|
+
props: /*@__PURE__*/ S({
|
|
127
135
|
pt: {},
|
|
128
136
|
model: {},
|
|
129
137
|
teleport: {
|
|
@@ -146,28 +154,28 @@ var R = {
|
|
|
146
154
|
}),
|
|
147
155
|
emits: ["update:modelValue", "update:position"],
|
|
148
156
|
setup(a, { expose: s }) {
|
|
149
|
-
let c = a, l = P(a, "modelValue"),
|
|
157
|
+
let c = a, l = P(a, "modelValue"), u = P(a, "position"), x = te(), { rootAttrs: S } = e(x, () => c.pt), k = d(), { transitionName: j, transitionCss: M } = i({
|
|
150
158
|
role: "popup",
|
|
151
159
|
local: () => c.transition,
|
|
152
160
|
componentName: "ContextMenu",
|
|
153
161
|
fallback: "scale-fade"
|
|
154
|
-
}),
|
|
162
|
+
}), R = O(null), z = O({
|
|
155
163
|
x: 0,
|
|
156
164
|
y: 0
|
|
157
|
-
}),
|
|
158
|
-
let e =
|
|
165
|
+
}), B = h(() => t(c, k.value.appendTo)), V = h(() => n(c, k.value.appendTo)), H = h(() => {
|
|
166
|
+
let e = u.value ?? z.value;
|
|
159
167
|
return {
|
|
160
168
|
left: `${e.x}px`,
|
|
161
169
|
top: `${e.y}px`
|
|
162
170
|
};
|
|
163
171
|
});
|
|
164
|
-
function
|
|
165
|
-
c.model.length &&
|
|
172
|
+
function U(e) {
|
|
173
|
+
c.model.length && G(e);
|
|
166
174
|
}
|
|
167
|
-
function
|
|
175
|
+
function W() {
|
|
168
176
|
l.value = !1;
|
|
169
177
|
}
|
|
170
|
-
function
|
|
178
|
+
function G(e) {
|
|
171
179
|
let t = "clientX" in e ? {
|
|
172
180
|
x: e.clientX,
|
|
173
181
|
y: e.clientY
|
|
@@ -175,71 +183,71 @@ var R = {
|
|
|
175
183
|
x: e.x,
|
|
176
184
|
y: e.y
|
|
177
185
|
};
|
|
178
|
-
"preventDefault" in e && e.preventDefault(), "stopPropagation" in e && e.stopPropagation(),
|
|
186
|
+
"preventDefault" in e && e.preventDefault(), "stopPropagation" in e && e.stopPropagation(), z.value = t, u.value = t, l.value = !0;
|
|
179
187
|
}
|
|
180
|
-
function
|
|
181
|
-
e.disabled || e.separator || (e.command?.(),
|
|
188
|
+
function K(e) {
|
|
189
|
+
e.disabled || e.separator || (e.command?.(), W());
|
|
182
190
|
}
|
|
183
|
-
function
|
|
184
|
-
l.value &&
|
|
191
|
+
function q(e) {
|
|
192
|
+
l.value && R.value && !R.value.contains(e.target) && W();
|
|
185
193
|
}
|
|
186
|
-
function
|
|
187
|
-
e.key === "Escape" &&
|
|
194
|
+
function J(e) {
|
|
195
|
+
e.key === "Escape" && W();
|
|
188
196
|
}
|
|
189
|
-
function
|
|
197
|
+
function X(e) {
|
|
190
198
|
if (!e || e.type !== "scroll") return !1;
|
|
191
199
|
let t = e.target;
|
|
192
|
-
return t instanceof Node ?
|
|
200
|
+
return t instanceof Node ? R.value?.contains(t) ? !0 : t instanceof Element && !!t.closest(".m-contextmenu, .m-contextmenu__submenu") : !1;
|
|
193
201
|
}
|
|
194
|
-
function
|
|
195
|
-
!l.value ||
|
|
202
|
+
function Z(e) {
|
|
203
|
+
!l.value || X(e) || W();
|
|
196
204
|
}
|
|
197
205
|
let Q = 0;
|
|
198
206
|
function $() {
|
|
199
|
-
document.removeEventListener("click",
|
|
207
|
+
document.removeEventListener("click", q), document.removeEventListener("keydown", J), document.removeEventListener("contextmenu", q);
|
|
200
208
|
}
|
|
201
209
|
return F(l, (e) => {
|
|
202
210
|
if ($(), !e) return;
|
|
203
|
-
document.addEventListener("click",
|
|
211
|
+
document.addEventListener("click", q), document.addEventListener("keydown", J);
|
|
204
212
|
let t = ++Q;
|
|
205
|
-
|
|
206
|
-
t === Q && l.value && document.addEventListener("contextmenu",
|
|
213
|
+
w(() => {
|
|
214
|
+
t === Q && l.value && document.addEventListener("contextmenu", q);
|
|
207
215
|
});
|
|
208
|
-
}, { immediate: !0 }), r(l,
|
|
216
|
+
}, { immediate: !0 }), r(l, Z), E(() => {
|
|
209
217
|
$();
|
|
210
218
|
}), s({
|
|
211
|
-
show:
|
|
212
|
-
hide:
|
|
213
|
-
}), (e, t) => (D(),
|
|
219
|
+
show: G,
|
|
220
|
+
hide: W
|
|
221
|
+
}), (e, t) => (D(), v(f, null, [y("div", C(N(S), {
|
|
214
222
|
class: "m-contextmenu-anchor",
|
|
215
|
-
onContextmenu:
|
|
216
|
-
}), [A(e.$slots, "default")], 16), (D(),
|
|
217
|
-
to:
|
|
218
|
-
disabled:
|
|
219
|
-
}, [
|
|
220
|
-
name:
|
|
221
|
-
css: M
|
|
223
|
+
onContextmenu: U
|
|
224
|
+
}), [A(e.$slots, "default")], 16), (D(), g(p, {
|
|
225
|
+
to: B.value.to,
|
|
226
|
+
disabled: B.value.disabled
|
|
227
|
+
}, [b(m, {
|
|
228
|
+
name: N(j),
|
|
229
|
+
css: N(M)
|
|
222
230
|
}, {
|
|
223
|
-
default: I(() => [l.value ? (D(),
|
|
231
|
+
default: I(() => [l.value ? (D(), v("div", {
|
|
224
232
|
key: 0,
|
|
225
233
|
ref_key: "root",
|
|
226
|
-
ref:
|
|
227
|
-
class:
|
|
234
|
+
ref: R,
|
|
235
|
+
class: T(["m-contextmenu", { "m-contextmenu--teleported": V.value }]),
|
|
228
236
|
role: "menu",
|
|
229
|
-
style:
|
|
237
|
+
style: ee(H.value),
|
|
230
238
|
onClick: t[0] ||= L(() => {}, ["stop"])
|
|
231
|
-
}, [
|
|
239
|
+
}, [b(o, {
|
|
232
240
|
class: "m-contextmenu__scroll",
|
|
233
241
|
"fit-content": "",
|
|
234
242
|
"wrap-class": "m-contextmenu__scroll-wrap",
|
|
235
243
|
"view-class": "m-contextmenu__scroll-view"
|
|
236
244
|
}, {
|
|
237
|
-
default: I(() => [
|
|
245
|
+
default: I(() => [b(Y, {
|
|
238
246
|
items: a.model,
|
|
239
|
-
onActivate:
|
|
247
|
+
onActivate: K
|
|
240
248
|
}, null, 8, ["items"])]),
|
|
241
249
|
_: 1
|
|
242
|
-
})], 6)) :
|
|
250
|
+
})], 6)) : _("", !0)]),
|
|
243
251
|
_: 1
|
|
244
252
|
}, 8, ["name", "css"])], 8, ["to", "disabled"]))], 64));
|
|
245
253
|
}
|
package/dist/data-view/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { t } from "../Loading-DE9Iaiao.js";
|
|
3
|
-
import { t as n } from "../Pagination-
|
|
3
|
+
import { t as n } from "../Pagination-B8WYoL2a.js";
|
|
4
4
|
import { n as r } from "../locale-BcxMPufl.js";
|
|
5
5
|
import "./style.js";
|
|
6
6
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as b, useSlots as x, watch as S, withCtx as C } from "vue";
|
package/dist/dock/index.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
2
|
import { t } from "../Icon-CmHjx7W8.js";
|
|
3
|
-
import { t as
|
|
3
|
+
import { n, t as r } from "../icon-CUrSaD8r.js";
|
|
4
4
|
import "./style.js";
|
|
5
|
-
import { Fragment as
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, defineComponent as u, mergeProps as d, openBlock as f, renderList as p, renderSlot as m, resolveDynamicComponent as h, toDisplayString as g, unref as _, useAttrs as v, useSlots as y } from "vue";
|
|
6
6
|
//#region src/components/Dock/Dock.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var b = { class: "m-dock__list" }, x = [
|
|
8
8
|
"title",
|
|
9
9
|
"aria-label",
|
|
10
10
|
"disabled",
|
|
11
11
|
"onClick"
|
|
12
|
-
],
|
|
12
|
+
], S = {
|
|
13
13
|
class: "m-dock__icon",
|
|
14
14
|
"aria-hidden": "true"
|
|
15
|
-
},
|
|
15
|
+
}, C = /* @__PURE__ */ u({
|
|
16
16
|
inheritAttrs: !1,
|
|
17
17
|
__name: "Dock",
|
|
18
18
|
props: {
|
|
@@ -20,33 +20,36 @@ var v = { class: "m-dock__list" }, y = [
|
|
|
20
20
|
model: { default: () => [] },
|
|
21
21
|
position: { default: "bottom" }
|
|
22
22
|
},
|
|
23
|
-
setup(
|
|
24
|
-
let
|
|
25
|
-
function
|
|
23
|
+
setup(u) {
|
|
24
|
+
let C = u, w = v(), { rootAttrs: T } = e(w, () => C.pt), E = y(), D = a(() => ["m-dock", `m-dock--${C.position}`]);
|
|
25
|
+
function O(e) {
|
|
26
26
|
e.disabled || e.command?.();
|
|
27
27
|
}
|
|
28
|
-
function
|
|
28
|
+
function k(e) {
|
|
29
|
+
return typeof e.icon == "string" ? r(e.icon) : void 0;
|
|
30
|
+
}
|
|
31
|
+
function A(e) {
|
|
29
32
|
return n(e.icon);
|
|
30
33
|
}
|
|
31
|
-
return (e, n) => (
|
|
32
|
-
class:
|
|
34
|
+
return (e, n) => (f(), s("nav", d(_(T), {
|
|
35
|
+
class: D.value,
|
|
33
36
|
"aria-label": "Dock"
|
|
34
|
-
}), [
|
|
37
|
+
}), [c("ul", b, [_(E).default ? m(e.$slots, "default", {}, void 0, void 0, 0) : (f(!0), s(i, { key: 1 }, p(u.model, (e, n) => (f(), s("li", {
|
|
35
38
|
key: `${e.label}-${n}`,
|
|
36
39
|
class: "m-dock__item"
|
|
37
|
-
}, [
|
|
40
|
+
}, [c("button", {
|
|
38
41
|
type: "button",
|
|
39
42
|
class: "m-dock__button",
|
|
40
43
|
title: e.label,
|
|
41
44
|
"aria-label": e.label,
|
|
42
45
|
disabled: e.disabled,
|
|
43
|
-
onClick: (t) =>
|
|
44
|
-
}, [
|
|
46
|
+
onClick: (t) => O(e)
|
|
47
|
+
}, [c("span", S, [k(e) ? (f(), o(t, {
|
|
45
48
|
key: 0,
|
|
46
|
-
name:
|
|
49
|
+
name: k(e),
|
|
47
50
|
size: "sm"
|
|
48
|
-
}, null, 8, ["name"])) : (
|
|
51
|
+
}, null, 8, ["name"])) : A(e) ? (f(), o(h(A(e)), { key: 1 })) : (f(), s(i, { key: 2 }, [l(g(e.label.slice(0, 1)), 1)], 64))])], 8, x)]))), 128))])], 16));
|
|
49
52
|
}
|
|
50
53
|
});
|
|
51
54
|
//#endregion
|
|
52
|
-
export {
|
|
55
|
+
export { C as MDock };
|