morya-ui 0.3.0 → 0.3.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 +32 -0
- package/dist/{Button-B5X_R4Md.js → Button-smoDleh0.js} +1 -1
- package/dist/Icon-od9Ob-Ay.js +393 -0
- package/dist/Loading-BSsRs6v9.js +420 -0
- package/dist/{Pagination-CVrH8Ypi.js → Pagination-DrXmzcEy.js} +1 -1
- package/dist/accordion/style.css +4 -0
- package/dist/auto-complete/index.js +1 -1
- package/dist/auto-complete/style.css +18 -6
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/style.css +4 -0
- package/dist/badge/style.css +4 -0
- package/dist/block-ui/style.css +4 -0
- package/dist/breadcrumb/style.css +4 -0
- package/dist/button/index.js +1 -1
- package/dist/button/style.css +4 -0
- package/dist/card/style.css +4 -0
- package/dist/carousel/index.js +72 -64
- package/dist/carousel/style.css +31 -10
- package/dist/cascade-select/index.js +1 -1
- package/dist/cascade-select/style.css +18 -6
- package/dist/checkbox/style.css +4 -0
- package/dist/chip/index.js +1 -1
- package/dist/chip/style.css +4 -0
- package/dist/command-menu/index.js +2 -2
- package/dist/command-menu/style.css +4 -0
- package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
- package/dist/components/Carousel/styles.css +27 -10
- package/dist/components/DataView/DataView.vue.d.ts +7 -7
- package/dist/components/DataView/DataView.vue.d.ts.map +1 -1
- package/dist/components/DataView/styles.css +0 -20
- package/dist/components/Dropdown/Dropdown.vue.d.ts +2 -2
- package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts +8 -9
- package/dist/components/Dropdown/DropdownNodes.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/styles.css +24 -5
- package/dist/components/Icon/Icon.vue.d.ts.map +1 -1
- package/dist/components/Icon/icon-categories.d.ts.map +1 -1
- package/dist/components/Icon/icons-types.d.ts +4 -2
- package/dist/components/Icon/icons-types.d.ts.map +1 -1
- package/dist/components/Icon/icons.d.ts +250 -561
- package/dist/components/Icon/icons.d.ts.map +1 -1
- package/dist/components/Icon/index.d.ts +2 -2
- package/dist/components/Icon/index.d.ts.map +1 -1
- package/dist/components/Layout/styles.css +5 -2
- package/dist/components/Menu/styles.css +6 -0
- package/dist/components/Menubar/Menubar.vue.d.ts.map +1 -1
- package/dist/components/Menubar/styles.css +4 -0
- package/dist/components/Scrollbar/Scrollbar.vue.d.ts +1 -1
- package/dist/components/Select/Select.vue.d.ts +9 -5
- package/dist/components/Select/Select.vue.d.ts.map +1 -1
- package/dist/components/Select/styles.css +30 -1
- package/dist/components/Select/types.d.ts +11 -1
- package/dist/components/Select/types.d.ts.map +1 -1
- package/dist/components/Slider/styles.css +9 -0
- package/dist/components/SplitButton/styles.css +5 -0
- package/dist/components/Table/Table.vue.d.ts +26 -26
- package/dist/components/Table/Table.vue.d.ts.map +1 -1
- package/dist/components/Table/TableLoadingLine.vue.d.ts.map +1 -1
- package/dist/components/Table/styles.css +58 -38
- package/dist/components/TreeSelect/TreeSelect.vue.d.ts.map +1 -1
- package/dist/components/TreeSelect/styles.css +1 -1
- package/dist/config-provider/style.css +4 -0
- package/dist/confirm-dialog/index.js +2 -2
- package/dist/confirm-dialog/style.css +4 -0
- package/dist/confirm-popup/index.js +2 -2
- package/dist/confirm-popup/style.css +4 -0
- package/dist/context-menu/index.js +2 -2
- package/dist/context-menu/style.css +4 -0
- package/dist/data-view/index.js +47 -47
- package/dist/data-view/style.css +399 -106
- package/dist/data-view/style.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/date-picker/style.css +4 -0
- package/dist/dialog/index.js +2 -2
- package/dist/dialog/style.css +4 -0
- package/dist/divider/style.css +4 -0
- package/dist/dock/index.js +2 -2
- package/dist/dock/style.css +4 -0
- package/dist/drawer/index.js +1 -1
- package/dist/drawer/style.css +4 -0
- package/dist/dropdown/index.js +110 -91
- package/dist/dropdown/style.css +28 -5
- package/dist/empty/index.js +1 -1
- package/dist/empty/style.css +4 -0
- package/dist/fieldset/index.js +1 -1
- package/dist/fieldset/style.css +4 -0
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/style.css +4 -0
- package/dist/flex/style.css +4 -0
- package/dist/float-label/style.css +4 -0
- package/dist/fluid/style.css +4 -0
- package/dist/form/style.css +4 -0
- package/dist/gallery/index.js +1 -1
- package/dist/gallery/style.css +4 -0
- package/dist/grid/style.css +4 -0
- package/dist/icon/index.js +93 -39
- package/dist/icon/style.css +4 -0
- package/dist/icon-COrt_N8A.js +18 -0
- package/dist/icon-field/style.css +4 -0
- package/dist/index.js +2733 -2801
- package/dist/inplace/style.css +4 -0
- package/dist/input/index.js +1 -1
- package/dist/input/style.css +4 -0
- package/dist/input-color/style.css +4 -0
- package/dist/input-group/style.css +4 -0
- package/dist/input-number/index.js +1 -1
- package/dist/input-number/style.css +4 -0
- package/dist/input-otp/style.css +4 -0
- package/dist/input-password/index.js +1 -1
- package/dist/input-password/style.css +4 -0
- package/dist/input-tags/index.js +1 -1
- package/dist/input-tags/style.css +4 -0
- package/dist/knob/style.css +4 -0
- package/dist/label/style.css +4 -0
- package/dist/layout/index.js +1 -1
- package/dist/layout/style.css +9 -2
- package/dist/listbox/style.css +4 -0
- package/dist/loading/index.js +32 -446
- package/dist/loading/style.css +4 -0
- package/dist/mega-menu/index.js +2 -2
- package/dist/mega-menu/style.css +4 -0
- package/dist/menu/index.js +2 -2
- package/dist/menu/style.css +10 -0
- package/dist/menubar/index.js +6 -3
- package/dist/menubar/style.css +8 -0
- package/dist/message/index.js +1 -1
- package/dist/message/style.css +4 -0
- package/dist/meter-group/style.css +4 -0
- package/dist/order-list/index.js +1 -1
- package/dist/order-list/style.css +4 -0
- package/dist/page/index.js +1 -1
- package/dist/page/style.css +4 -0
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/style.css +4 -0
- package/dist/panel/index.js +1 -1
- package/dist/panel/style.css +4 -0
- package/dist/pick-list/index.js +1 -1
- package/dist/pick-list/style.css +4 -0
- package/dist/popover/style.css +4 -0
- package/dist/progress-bar/style.css +4 -0
- package/dist/progress-spinner/index.js +105 -2
- package/dist/progress-spinner/style.css +4 -0
- package/dist/radio/style.css +4 -0
- package/dist/rating/index.js +1 -1
- package/dist/rating/style.css +4 -0
- package/dist/result/index.js +1 -1
- package/dist/result/style.css +4 -0
- package/dist/scroll-top/index.js +1 -1
- package/dist/scroll-top/style.css +4 -0
- package/dist/scrollbar/style.css +4 -0
- package/dist/select/index.js +284 -217
- package/dist/select/style.css +48 -7
- package/dist/select-button/style.css +4 -0
- package/dist/shared/menu/icon.d.ts.map +1 -1
- package/dist/shared/styles/select-overlay.css +14 -6
- package/dist/sidebar/index.js +2 -2
- package/dist/sidebar/style.css +4 -0
- package/dist/skeleton/style.css +4 -0
- package/dist/slider/style.css +13 -0
- package/dist/space/style.css +4 -0
- package/dist/speed-dial/index.js +2 -2
- package/dist/speed-dial/style.css +4 -0
- package/dist/split-button/index.js +1 -1
- package/dist/split-button/style.css +9 -0
- package/dist/splitter/style.css +4 -0
- package/dist/status/index.js +1 -1
- package/dist/status/style.css +4 -0
- package/dist/stepper/index.js +1 -1
- package/dist/stepper/style.css +4 -0
- package/dist/styles/base.css +4 -0
- package/dist/styles.css +1 -1
- package/dist/switch/style.css +4 -0
- package/dist/table/index.js +344 -338
- package/dist/table/style.css +457 -124
- package/dist/table/style.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/style.css +4 -0
- package/dist/tag/index.js +1 -1
- package/dist/tag/style.css +4 -0
- package/dist/terminal/style.css +4 -0
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/style.css +4 -0
- package/dist/tiered-menu/index.js +1 -1
- package/dist/tiered-menu/style.css +4 -0
- package/dist/timeline/index.js +1 -1
- package/dist/timeline/style.css +4 -0
- package/dist/toast/index.js +1 -1
- package/dist/toast/style.css +4 -0
- package/dist/toggle-button/index.js +2 -2
- package/dist/toggle-button/style.css +4 -0
- package/dist/toolbar/style.css +4 -0
- package/dist/tooltip/style.css +4 -0
- package/dist/tree/index.js +1 -1
- package/dist/tree/style.css +4 -0
- package/dist/tree-select/index.js +2 -1
- package/dist/tree-select/style.css +19 -7
- package/dist/tree-table/index.js +1 -1
- package/dist/tree-table/style.css +4 -0
- package/dist/virtual-scroller/style.css +4 -0
- package/package.json +1 -1
- package/dist/Icon-lcN1rS87.js +0 -610
- package/dist/ProgressSpinner-BeWVF6Jv.js +0 -105
- package/dist/components/Icon/icons-tabler.d.ts +0 -77
- package/dist/components/Icon/icons-tabler.d.ts.map +0 -1
- package/dist/icon-DWXkh-RM.js +0 -27
package/dist/loading/index.js
CHANGED
|
@@ -1,462 +1,48 @@
|
|
|
1
|
-
import { a as e } from "../
|
|
2
|
-
import { i as t } from "../types-DGuu4Eg4.js";
|
|
3
|
-
import { t as n } from "../usePauseOffscreen-BIikV_gj.js";
|
|
4
|
-
import { n as r, t as i } from "../useMotionTransition-Bxnnb_9u.js";
|
|
5
|
-
import { n as a } from "../overlay-oR-5MDuE.js";
|
|
6
|
-
import { i as o } from "../content-h8POj44-.js";
|
|
7
|
-
import { t as s } from "../overlayHost-78CGtMgR.js";
|
|
8
|
-
import { c, i as l, l as u, t as d } from "../config-CapALqt3.js";
|
|
9
|
-
import { n as f } from "../locale-Bzm2nbEp.js";
|
|
1
|
+
import { a as e, i as t, n, o as r, r as i, t as a } from "../Loading-BSsRs6v9.js";
|
|
10
2
|
import "./style.js";
|
|
11
|
-
import {
|
|
12
|
-
//#region src/components/Loading/
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
"aurora",
|
|
16
|
-
"bounce",
|
|
17
|
-
"wave",
|
|
18
|
-
"pulse",
|
|
19
|
-
"stardust"
|
|
20
|
-
], B = new Set(z);
|
|
21
|
-
function V(e) {
|
|
22
|
-
return typeof e == "string" && B.has(e);
|
|
23
|
-
}
|
|
24
|
-
function H(e) {
|
|
25
|
-
return V(e) ? e : "circular";
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/components/Loading/LoadingIndicator.vue?vue&type=script&setup=true&lang.ts
|
|
29
|
-
var U = ["aria-label"], W = {
|
|
30
|
-
class: "m-loading-indicator__graphic",
|
|
31
|
-
"aria-hidden": "true"
|
|
32
|
-
}, re = {
|
|
33
|
-
key: 0,
|
|
34
|
-
class: "m-loading-aurora"
|
|
35
|
-
}, ie = {
|
|
36
|
-
key: 1,
|
|
37
|
-
class: "m-loading-bounce"
|
|
38
|
-
}, ae = {
|
|
39
|
-
key: 2,
|
|
40
|
-
class: "m-loading-wave"
|
|
41
|
-
}, oe = {
|
|
42
|
-
key: 3,
|
|
43
|
-
class: "m-loading-pulse"
|
|
44
|
-
}, se = {
|
|
45
|
-
key: 4,
|
|
46
|
-
class: "m-loading-stardust"
|
|
47
|
-
}, ce = {
|
|
48
|
-
key: 5,
|
|
49
|
-
class: "m-loading-circular"
|
|
50
|
-
}, le = {
|
|
51
|
-
key: 0,
|
|
52
|
-
class: "m-loading-indicator__tip"
|
|
53
|
-
}, G = /* @__PURE__ */ C({
|
|
54
|
-
name: "MLoadingIndicator",
|
|
55
|
-
__name: "LoadingIndicator",
|
|
56
|
-
props: {
|
|
57
|
-
effect: {},
|
|
58
|
-
text: {},
|
|
59
|
-
ariaLabel: {},
|
|
60
|
-
size: {}
|
|
61
|
-
},
|
|
62
|
-
setup(e) {
|
|
63
|
-
let r = e, i = f(), a = A(null), { pauseAttrs: o } = n(a, !0), s = l("Loading"), c = g(() => H(r.effect ?? s.value.effect)), u = g(() => r.size ?? s.value.size), d = g(() => {
|
|
64
|
-
let e = t(u.value);
|
|
65
|
-
return {
|
|
66
|
-
"m-loading-indicator--small": e === "small",
|
|
67
|
-
"m-loading-indicator--large": e === "large"
|
|
68
|
-
};
|
|
69
|
-
}), m = g(() => r.ariaLabel ?? (r.text ? void 0 : i.value.loading));
|
|
70
|
-
return (t, n) => (O(), y("div", T({
|
|
71
|
-
ref_key: "rootRef",
|
|
72
|
-
ref: a
|
|
73
|
-
}, I(o), {
|
|
74
|
-
class: ["m-loading-indicator", d.value],
|
|
75
|
-
role: "status",
|
|
76
|
-
"aria-live": "polite",
|
|
77
|
-
"aria-label": m.value
|
|
78
|
-
}), [b("div", W, [c.value === "aurora" ? (O(), y("div", re, [...n[0] ||= [b("div", { class: "m-loading-aurora__ring" }, null, -1), b("div", { class: "m-loading-aurora__glow" }, null, -1)]])) : c.value === "bounce" ? (O(), y("div", ie, [...n[1] ||= [
|
|
79
|
-
b("span", { class: "m-loading-bounce__ball" }, null, -1),
|
|
80
|
-
b("span", { class: "m-loading-bounce__ball" }, null, -1),
|
|
81
|
-
b("span", { class: "m-loading-bounce__ball" }, null, -1)
|
|
82
|
-
]])) : c.value === "wave" ? (O(), y("div", ae, [...n[2] ||= [x("<span class=\"m-loading-wave__bar\"></span><span class=\"m-loading-wave__bar\"></span><span class=\"m-loading-wave__bar\"></span><span class=\"m-loading-wave__bar\"></span><span class=\"m-loading-wave__bar\"></span>", 5)]])) : c.value === "pulse" ? (O(), y("div", oe, [...n[3] ||= [
|
|
83
|
-
b("span", { class: "m-loading-pulse__ring" }, null, -1),
|
|
84
|
-
b("span", { class: "m-loading-pulse__ring" }, null, -1),
|
|
85
|
-
b("span", { class: "m-loading-pulse__ring" }, null, -1),
|
|
86
|
-
b("span", { class: "m-loading-pulse__ring" }, null, -1)
|
|
87
|
-
]])) : c.value === "stardust" ? (O(), y("div", se, [(O(), y(p, null, M(8, (e) => b("span", {
|
|
88
|
-
key: e,
|
|
89
|
-
class: "m-loading-stardust__dot",
|
|
90
|
-
style: E({ "--i": String(e - 1) })
|
|
91
|
-
}, null, 4)), 64))])) : (O(), y("div", ce, [...n[4] ||= [b("svg", {
|
|
92
|
-
class: "m-loading-circular__svg",
|
|
93
|
-
viewBox: "0 0 50 50"
|
|
94
|
-
}, [b("circle", {
|
|
95
|
-
class: "m-loading-circular__path",
|
|
96
|
-
cx: "25",
|
|
97
|
-
cy: "25",
|
|
98
|
-
r: "20",
|
|
99
|
-
fill: "none"
|
|
100
|
-
})], -1)]]))]), e.text ? (O(), y("p", le, P(e.text), 1)) : v("", !0)], 16, U));
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region src/components/Loading/loading.ts
|
|
105
|
-
function ue(e) {
|
|
106
|
-
let t = e ?? s();
|
|
107
|
-
if (!t) return;
|
|
108
|
-
let n = t.provides?.[d];
|
|
109
|
-
return n == null ? t.config.globalProperties.$m : F(n);
|
|
110
|
-
}
|
|
111
|
-
function de(e) {
|
|
112
|
-
let t = ue(e);
|
|
113
|
-
return r({
|
|
114
|
-
rolePreset: t?.motion?.transitions?.overlay,
|
|
115
|
-
componentDefault: u(t?.componentDefaults, "Loading", "transition"),
|
|
116
|
-
fallback: "loading"
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
var K = /* @__PURE__ */ new Set(), q = null, J = 0, Y = "";
|
|
120
|
-
function X() {
|
|
121
|
-
typeof document > "u" || (J === 0 && (Y = document.body.style.overflow), J += 1, document.body.style.overflow = "hidden");
|
|
122
|
-
}
|
|
123
|
-
function Z() {
|
|
124
|
-
typeof document > "u" || (J = Math.max(0, J - 1), J === 0 && (document.body.style.overflow = Y));
|
|
125
|
-
}
|
|
126
|
-
function fe(e) {
|
|
127
|
-
if (typeof document > "u") throw Error("[MLoading] service is only available in the browser");
|
|
128
|
-
if (!e || e === document.body) return document.body;
|
|
129
|
-
if (typeof e == "string") {
|
|
130
|
-
let t = document.querySelector(e);
|
|
131
|
-
if (!(t instanceof HTMLElement)) throw TypeError(`[MLoading] target not found: ${e}`);
|
|
132
|
-
return t;
|
|
133
|
-
}
|
|
134
|
-
return e;
|
|
135
|
-
}
|
|
136
|
-
function pe(e) {
|
|
137
|
-
let t = 0;
|
|
138
|
-
return () => {
|
|
139
|
-
t ||= requestAnimationFrame(() => {
|
|
140
|
-
t = 0, e();
|
|
141
|
-
});
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
function me(e) {
|
|
145
|
-
let t = k({
|
|
146
|
-
visible: !e.delay,
|
|
147
|
-
text: e.text ?? "",
|
|
148
|
-
effect: e.effect,
|
|
149
|
-
background: e.background,
|
|
150
|
-
customClass: e.customClass,
|
|
151
|
-
size: e.size,
|
|
152
|
-
fullscreen: !!e.fullscreen,
|
|
153
|
-
body: !!e.body && !e.fullscreen,
|
|
154
|
-
spinner: e.spinner,
|
|
155
|
-
top: 0,
|
|
156
|
-
left: 0,
|
|
157
|
-
width: 0,
|
|
158
|
-
height: 0
|
|
159
|
-
});
|
|
160
|
-
t.fullscreen && q && q.destroy();
|
|
161
|
-
let n = document.createElement("div");
|
|
162
|
-
(t.fullscreen || t.body ? document.body : e.target).appendChild(n);
|
|
163
|
-
let r = !1;
|
|
164
|
-
if (!t.fullscreen && !t.body) {
|
|
165
|
-
let t = getComputedStyle(e.target).position;
|
|
166
|
-
(!t || t === "static") && (e.target.classList.add("m-loading-parent--relative"), r = !0);
|
|
167
|
-
}
|
|
168
|
-
e.target.setAttribute("aria-busy", "true");
|
|
169
|
-
let i = !1;
|
|
170
|
-
function a(e) {
|
|
171
|
-
if (e && !i) {
|
|
172
|
-
X(), i = !0;
|
|
173
|
-
return;
|
|
174
|
-
}
|
|
175
|
-
!e && i && (Z(), i = !1);
|
|
176
|
-
}
|
|
177
|
-
t.visible && a(!!e.lock);
|
|
178
|
-
function c() {
|
|
179
|
-
if (!t.body) return;
|
|
180
|
-
let n = e.target.getBoundingClientRect();
|
|
181
|
-
t.top = n.top, t.left = n.left, t.width = n.width, t.height = n.height;
|
|
182
|
-
}
|
|
183
|
-
let l = pe(c), u = null;
|
|
184
|
-
t.body && (c(), window.addEventListener("scroll", l, !0), window.addEventListener("resize", l), typeof ResizeObserver < "u" && (u = new ResizeObserver(l), u.observe(e.target)));
|
|
185
|
-
let d = null;
|
|
186
|
-
e.delay && e.delay > 0 && (d = setTimeout(() => {
|
|
187
|
-
d = null, t.visible = !0, a(!!e.lock);
|
|
188
|
-
}, e.delay));
|
|
189
|
-
let f = null, p = !1, m = !1, g = null;
|
|
190
|
-
function _() {
|
|
191
|
-
m || (m = !0, p = !0, d !== null && (clearTimeout(d), d = null), f !== null && (clearTimeout(f), f = null), a(!1), t.body && (window.removeEventListener("scroll", l, !0), window.removeEventListener("resize", l), u?.disconnect(), u = null), r && e.target.classList.remove("m-loading-parent--relative"), e.target.getAttribute("aria-busy") === "true" && e.target.removeAttribute("aria-busy"), j(null, n), n.remove(), g && (K.delete(g), q === g && (q = null)));
|
|
192
|
-
}
|
|
193
|
-
let v = C({
|
|
194
|
-
name: "MLoadingMask",
|
|
195
|
-
setup() {
|
|
196
|
-
let n = de(e.appContext);
|
|
197
|
-
return () => w(h, {
|
|
198
|
-
name: n,
|
|
199
|
-
css: n !== void 0,
|
|
200
|
-
appear: !0,
|
|
201
|
-
duration: {
|
|
202
|
-
enter: 180,
|
|
203
|
-
leave: 130
|
|
204
|
-
},
|
|
205
|
-
onAfterLeave: () => _()
|
|
206
|
-
}, { default: () => {
|
|
207
|
-
if (!t.visible) return null;
|
|
208
|
-
let e = [
|
|
209
|
-
"m-loading-mask",
|
|
210
|
-
t.fullscreen ? "m-loading-mask--fullscreen" : void 0,
|
|
211
|
-
t.body ? "m-loading-mask--body" : void 0,
|
|
212
|
-
t.customClass || void 0
|
|
213
|
-
].filter((e) => !!e), n = {};
|
|
214
|
-
t.background && (n.background = t.background), t.body && (n.top = `${t.top}px`, n.left = `${t.left}px`, n.width = `${t.width}px`, n.height = `${t.height}px`);
|
|
215
|
-
let r = t.spinner ? o(t.spinner) : w(G, {
|
|
216
|
-
effect: t.effect,
|
|
217
|
-
size: t.size,
|
|
218
|
-
text: t.text || void 0
|
|
219
|
-
});
|
|
220
|
-
return w("div", {
|
|
221
|
-
class: e,
|
|
222
|
-
style: n
|
|
223
|
-
}, [r]);
|
|
224
|
-
} });
|
|
225
|
-
}
|
|
226
|
-
});
|
|
227
|
-
g = {
|
|
228
|
-
fullscreen: t.fullscreen,
|
|
229
|
-
destroy: _,
|
|
230
|
-
close() {
|
|
231
|
-
if (!p) {
|
|
232
|
-
if (p = !0, d !== null) {
|
|
233
|
-
clearTimeout(d), d = null, _();
|
|
234
|
-
return;
|
|
235
|
-
}
|
|
236
|
-
if (!t.visible) {
|
|
237
|
-
_();
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
240
|
-
t.visible = !1, f = setTimeout(_, 200);
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}, K.add(g), t.fullscreen && (q = g);
|
|
244
|
-
let y = w(v);
|
|
245
|
-
return y.appContext = e.appContext ?? s(), j(y, n), {
|
|
246
|
-
close: () => g.close(),
|
|
247
|
-
destroy: () => _(),
|
|
248
|
-
setText(e) {
|
|
249
|
-
m || (t.text = e);
|
|
250
|
-
},
|
|
251
|
-
update(e) {
|
|
252
|
-
m || (e.text !== void 0 && (t.text = e.text), e.effect !== void 0 && (t.effect = e.effect), e.background !== void 0 && (t.background = e.background), e.customClass !== void 0 && (t.customClass = e.customClass), e.size !== void 0 && (t.size = e.size), e.spinner !== void 0 && (t.spinner = e.spinner), e.lock !== void 0 && t.visible && a(e.lock));
|
|
253
|
-
}
|
|
254
|
-
};
|
|
255
|
-
}
|
|
256
|
-
function he() {
|
|
257
|
-
return {
|
|
258
|
-
close() {},
|
|
259
|
-
setText() {},
|
|
260
|
-
destroy() {}
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
function ge(e = {}) {
|
|
264
|
-
if (typeof document > "u") return he();
|
|
265
|
-
let t = e.fullscreen ?? (e.target == null && !e.body), n = me({
|
|
266
|
-
target: t ? document.body : fe(e.target ?? document.body),
|
|
267
|
-
fullscreen: t,
|
|
268
|
-
body: !!e.body && !t,
|
|
269
|
-
lock: e.lock,
|
|
270
|
-
text: e.text,
|
|
271
|
-
effect: e.effect,
|
|
272
|
-
background: e.background,
|
|
273
|
-
customClass: e.customClass,
|
|
274
|
-
size: e.size,
|
|
275
|
-
delay: e.delay,
|
|
276
|
-
spinner: e.spinner
|
|
277
|
-
});
|
|
278
|
-
return {
|
|
279
|
-
close: () => n.close(),
|
|
280
|
-
setText: (e) => n.setText(e),
|
|
281
|
-
destroy: () => n.destroy()
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
var _e = { service: ge }, ve = ["aria-busy"], ye = ["inert"], be = /* @__PURE__ */ C({
|
|
285
|
-
name: "MLoading",
|
|
286
|
-
inheritAttrs: !1,
|
|
287
|
-
__name: "Loading",
|
|
288
|
-
props: {
|
|
289
|
-
pt: {},
|
|
290
|
-
loading: {
|
|
291
|
-
type: Boolean,
|
|
292
|
-
default: !0
|
|
293
|
-
},
|
|
294
|
-
effect: {},
|
|
295
|
-
text: {},
|
|
296
|
-
ariaLabel: {},
|
|
297
|
-
size: {},
|
|
298
|
-
background: {},
|
|
299
|
-
customClass: {},
|
|
300
|
-
fullscreen: {
|
|
301
|
-
type: Boolean,
|
|
302
|
-
default: !1
|
|
303
|
-
},
|
|
304
|
-
lock: {
|
|
305
|
-
type: Boolean,
|
|
306
|
-
default: !1
|
|
307
|
-
},
|
|
308
|
-
delay: { default: 0 },
|
|
309
|
-
transition: {
|
|
310
|
-
type: [String, Boolean],
|
|
311
|
-
default: void 0
|
|
312
|
-
}
|
|
313
|
-
},
|
|
314
|
-
setup(t) {
|
|
315
|
-
let n = t, r = te(), o = ne(), { rootAttrs: s } = e(r, () => n.pt), u = l("Loading"), d = c(), { transitionName: f, transitionCss: x } = i({
|
|
316
|
-
role: "overlay",
|
|
317
|
-
local: () => n.transition,
|
|
318
|
-
componentName: "Loading",
|
|
319
|
-
fallback: "loading"
|
|
320
|
-
}), C = g(() => !!o.default), w = g(() => C.value || n.fullscreen), k = g(() => H(n.effect ?? u.value.effect)), j = g(() => n.size ?? u.value.size), M = g(() => n.delay ?? u.value.delay ?? 0), P = g(() => n.background ? { background: n.background } : void 0), F = g(() => a(n.fullscreen ? {
|
|
321
|
-
teleport: !0,
|
|
322
|
-
appendTo: "body"
|
|
323
|
-
} : { teleport: !1 }, d.value.appendTo)), z = A(n.loading && M.value <= 0), B = null;
|
|
324
|
-
function V() {
|
|
325
|
-
B !== null && (clearTimeout(B), B = null);
|
|
326
|
-
}
|
|
327
|
-
L(() => [
|
|
328
|
-
n.loading,
|
|
329
|
-
M.value,
|
|
330
|
-
w.value
|
|
331
|
-
], ([e, t]) => {
|
|
332
|
-
if (V(), !e || !w.value) {
|
|
333
|
-
z.value = !1;
|
|
334
|
-
return;
|
|
335
|
-
}
|
|
336
|
-
if (!t) {
|
|
337
|
-
z.value = !0;
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
z.value = !1, B = setTimeout(() => {
|
|
341
|
-
z.value = !0, B = null;
|
|
342
|
-
}, t);
|
|
343
|
-
}, { immediate: !0 });
|
|
344
|
-
let U = g(() => n.lock && z.value && w.value), W = !1;
|
|
345
|
-
return L(U, (e) => {
|
|
346
|
-
if (e && !W) {
|
|
347
|
-
X(), W = !0;
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
!e && W && (Z(), W = !1);
|
|
351
|
-
}, { immediate: !0 }), D(() => {
|
|
352
|
-
V(), W &&= (Z(), !1);
|
|
353
|
-
}), (e, n) => w.value ? (O(), y(p, { key: 0 }, [C.value ? (O(), y("div", T({ key: 0 }, I(s), {
|
|
354
|
-
class: ["m-loading", { "m-loading--active": z.value }],
|
|
355
|
-
"aria-busy": z.value || void 0
|
|
356
|
-
}), [b("div", {
|
|
357
|
-
class: "m-loading__content",
|
|
358
|
-
inert: z.value || void 0
|
|
359
|
-
}, [N(e.$slots, "default")], 8, ye), (O(), _(m, {
|
|
360
|
-
to: F.value.to,
|
|
361
|
-
disabled: F.value.disabled
|
|
362
|
-
}, [S(h, {
|
|
363
|
-
name: I(f),
|
|
364
|
-
css: I(x)
|
|
365
|
-
}, {
|
|
366
|
-
default: R(() => [z.value ? (O(), y("div", {
|
|
367
|
-
key: 0,
|
|
368
|
-
class: ee(["m-loading-mask", [{ "m-loading-mask--fullscreen": t.fullscreen }, t.customClass]]),
|
|
369
|
-
style: E(P.value)
|
|
370
|
-
}, [N(e.$slots, "indicator", {}, () => [S(G, {
|
|
371
|
-
effect: k.value,
|
|
372
|
-
size: j.value,
|
|
373
|
-
text: t.text,
|
|
374
|
-
"aria-label": t.ariaLabel
|
|
375
|
-
}, null, 8, [
|
|
376
|
-
"effect",
|
|
377
|
-
"size",
|
|
378
|
-
"text",
|
|
379
|
-
"aria-label"
|
|
380
|
-
])])], 6)) : v("", !0)]),
|
|
381
|
-
_: 3
|
|
382
|
-
}, 8, ["name", "css"])], 8, ["to", "disabled"]))], 16, ve)) : (O(), _(m, {
|
|
383
|
-
key: 1,
|
|
384
|
-
to: F.value.to,
|
|
385
|
-
disabled: F.value.disabled
|
|
386
|
-
}, [S(h, {
|
|
387
|
-
name: I(f),
|
|
388
|
-
css: I(x)
|
|
389
|
-
}, {
|
|
390
|
-
default: R(() => [z.value ? (O(), y("div", T({ key: 0 }, I(s), {
|
|
391
|
-
class: ["m-loading-mask m-loading-mask--fullscreen", t.customClass],
|
|
392
|
-
style: P.value,
|
|
393
|
-
role: "presentation",
|
|
394
|
-
"aria-busy": "true"
|
|
395
|
-
}), [N(e.$slots, "indicator", {}, () => [S(G, {
|
|
396
|
-
effect: k.value,
|
|
397
|
-
size: j.value,
|
|
398
|
-
text: t.text,
|
|
399
|
-
"aria-label": t.ariaLabel
|
|
400
|
-
}, null, 8, [
|
|
401
|
-
"effect",
|
|
402
|
-
"size",
|
|
403
|
-
"text",
|
|
404
|
-
"aria-label"
|
|
405
|
-
])])], 16)) : v("", !0)]),
|
|
406
|
-
_: 3
|
|
407
|
-
}, 8, ["name", "css"])], 8, ["to", "disabled"]))], 64)) : (O(), _(G, T({ key: 1 }, I(s), {
|
|
408
|
-
effect: k.value,
|
|
409
|
-
size: j.value,
|
|
410
|
-
text: t.text,
|
|
411
|
-
"aria-label": t.ariaLabel
|
|
412
|
-
}), null, 16, [
|
|
413
|
-
"effect",
|
|
414
|
-
"size",
|
|
415
|
-
"text",
|
|
416
|
-
"aria-label"
|
|
417
|
-
]));
|
|
418
|
-
}
|
|
419
|
-
}), Q = /* @__PURE__ */ new WeakMap();
|
|
420
|
-
function $(e, ...t) {
|
|
3
|
+
import { onBeforeUnmount as o } from "vue";
|
|
4
|
+
//#region src/components/Loading/directive.ts
|
|
5
|
+
var s = /* @__PURE__ */ new WeakMap();
|
|
6
|
+
function c(e, ...t) {
|
|
421
7
|
for (let n of t) {
|
|
422
8
|
let t = e.getAttribute(n);
|
|
423
9
|
if (t != null) return t;
|
|
424
10
|
}
|
|
425
11
|
}
|
|
426
|
-
function
|
|
427
|
-
return
|
|
12
|
+
function l(t) {
|
|
13
|
+
return e(t) ? t : void 0;
|
|
428
14
|
}
|
|
429
|
-
function
|
|
430
|
-
let n = t.value, r = n && typeof n == "object" ? n : void 0, i = typeof n == "boolean" ? n : r ? r.loading !== !1 : !!n, a = !!(t.modifiers.fullscreen || r?.fullscreen), o = !!(t.modifiers.body || r?.body) && !a, s =
|
|
15
|
+
function u(e, t) {
|
|
16
|
+
let n = t.value, r = n && typeof n == "object" ? n : void 0, i = typeof n == "boolean" ? n : r ? r.loading !== !1 : !!n, a = !!(t.modifiers.fullscreen || r?.fullscreen), o = !!(t.modifiers.body || r?.body) && !a, s = l(r?.effect ?? c(e, "m-loading-effect")), u = r?.size, d = c(e, "m-loading-delay"), f = r?.delay ?? (d == null ? void 0 : Number(d));
|
|
431
17
|
return {
|
|
432
18
|
visible: i,
|
|
433
|
-
text: r?.text ??
|
|
19
|
+
text: r?.text ?? c(e, "m-loading-text"),
|
|
434
20
|
effect: s,
|
|
435
|
-
background: r?.background ??
|
|
436
|
-
customClass: r?.customClass ??
|
|
437
|
-
size: typeof
|
|
21
|
+
background: r?.background ?? c(e, "m-loading-background"),
|
|
22
|
+
customClass: r?.customClass ?? c(e, "m-loading-custom-class"),
|
|
23
|
+
size: typeof u == "string" ? u : void 0,
|
|
438
24
|
fullscreen: a,
|
|
439
25
|
lock: !!(t.modifiers.lock || r?.lock),
|
|
440
26
|
body: o,
|
|
441
|
-
delay: Number.isFinite(
|
|
27
|
+
delay: Number.isFinite(f) ? f : void 0,
|
|
442
28
|
spinner: r?.spinner,
|
|
443
29
|
mode: `${a}:${o}`
|
|
444
30
|
};
|
|
445
31
|
}
|
|
446
|
-
function
|
|
447
|
-
let n =
|
|
32
|
+
function d(e, t) {
|
|
33
|
+
let n = u(e, t), r = s.get(e);
|
|
448
34
|
if (!n.visible) {
|
|
449
35
|
if (!r) return;
|
|
450
|
-
|
|
36
|
+
s.delete(e), r.instance.close();
|
|
451
37
|
return;
|
|
452
38
|
}
|
|
453
39
|
if (r && r.mode === n.mode) {
|
|
454
40
|
r.instance.update(n);
|
|
455
41
|
return;
|
|
456
42
|
}
|
|
457
|
-
r?.instance.destroy(),
|
|
43
|
+
r?.instance.destroy(), s.set(e, {
|
|
458
44
|
mode: n.mode,
|
|
459
|
-
instance:
|
|
45
|
+
instance: i({
|
|
460
46
|
target: e,
|
|
461
47
|
text: n.text,
|
|
462
48
|
effect: n.effect,
|
|
@@ -472,35 +58,35 @@ function Ce(e, t) {
|
|
|
472
58
|
})
|
|
473
59
|
});
|
|
474
60
|
}
|
|
475
|
-
var
|
|
476
|
-
mounted:
|
|
477
|
-
updated:
|
|
61
|
+
var f = {
|
|
62
|
+
mounted: d,
|
|
63
|
+
updated: d,
|
|
478
64
|
unmounted(e) {
|
|
479
|
-
let t =
|
|
480
|
-
t && (
|
|
65
|
+
let t = s.get(e);
|
|
66
|
+
t && (s.delete(e), t.instance.destroy());
|
|
481
67
|
}
|
|
482
68
|
};
|
|
483
69
|
//#endregion
|
|
484
70
|
//#region src/components/Loading/useLoading.ts
|
|
485
|
-
function
|
|
71
|
+
function p(e = {}) {
|
|
486
72
|
let t = null;
|
|
487
|
-
function
|
|
73
|
+
function r() {
|
|
488
74
|
t?.close(), t = null;
|
|
489
75
|
}
|
|
490
|
-
return
|
|
76
|
+
return o(() => {
|
|
491
77
|
t?.destroy(), t = null;
|
|
492
78
|
}), {
|
|
493
|
-
open(
|
|
494
|
-
return
|
|
79
|
+
open(i = {}) {
|
|
80
|
+
return r(), t = n.service({
|
|
495
81
|
...e,
|
|
496
|
-
...
|
|
82
|
+
...i
|
|
497
83
|
}), t;
|
|
498
84
|
},
|
|
499
|
-
close:
|
|
85
|
+
close: r,
|
|
500
86
|
setText(e) {
|
|
501
87
|
t?.setText(e);
|
|
502
88
|
}
|
|
503
89
|
};
|
|
504
90
|
}
|
|
505
91
|
//#endregion
|
|
506
|
-
export {
|
|
92
|
+
export { t as LOADING_EFFECTS, a as MLoading, e as isLoadingEffect, n as loading, r as normalizeLoadingEffect, p as useLoading, f as vLoading };
|
package/dist/loading/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/mega-menu/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { t as n } from "../useMotionTransition-Bxnnb_9u.js";
|
|
4
4
|
import { n as r, t as ee } from "../overlay-oR-5MDuE.js";
|
|
5
5
|
import { t as te } from "../overlayPlacement-Cd20JTD_.js";
|
|
6
6
|
import { t as i } from "../useFloatingViewportSync-DZdJ7W8n.js";
|
|
7
7
|
import { t as a } from "../useMenuKeyboard-BedmYE4W.js";
|
|
8
|
-
import { t as ne } from "../icon-
|
|
8
|
+
import { t as ne } from "../icon-COrt_N8A.js";
|
|
9
9
|
import { c as re } from "../config-CapALqt3.js";
|
|
10
10
|
import { n as ie } from "../locale-Bzm2nbEp.js";
|
|
11
11
|
import "./style.js";
|
package/dist/mega-menu/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
package/dist/menu/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { t as n } from "../useMotionTransition-Bxnnb_9u.js";
|
|
4
4
|
import { n as r, t as i } from "../overlay-oR-5MDuE.js";
|
|
5
5
|
import { t as a } from "../overlayPlacement-Cd20JTD_.js";
|
|
6
6
|
import { t as o } from "../useFloatingViewportSync-DZdJ7W8n.js";
|
|
7
7
|
import { t as s } from "../useMenuKeyboard-BedmYE4W.js";
|
|
8
8
|
import { t as c } from "../Scrollbar-DTeJ8P5b.js";
|
|
9
|
-
import { t as ee } from "../icon-
|
|
9
|
+
import { t as ee } from "../icon-COrt_N8A.js";
|
|
10
10
|
import { t as l } from "../key-CaQYVkjh.js";
|
|
11
11
|
import { t as u } from "../lastPointer-CRxcUqdd.js";
|
|
12
12
|
import { t as d } from "../Popover-BQ07q4VV.js";
|
package/dist/menu/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
|
@@ -1671,9 +1675,13 @@
|
|
|
1671
1675
|
display: flex;
|
|
1672
1676
|
flex-direction: column;
|
|
1673
1677
|
max-height: var(--m-menu-popup-max-height);
|
|
1678
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
1674
1679
|
overflow: hidden;
|
|
1675
1680
|
padding: var(--m-space-1) 0 var(--m-space-2);
|
|
1676
1681
|
position: absolute;
|
|
1682
|
+
/* Grow with the content: shrink-to-fit would clamp to the anchor width
|
|
1683
|
+
(the containing block) when not teleported. */
|
|
1684
|
+
width: max-content;
|
|
1677
1685
|
z-index: var(--m-z-popper);
|
|
1678
1686
|
}
|
|
1679
1687
|
|
|
@@ -1693,6 +1701,8 @@
|
|
|
1693
1701
|
|
|
1694
1702
|
.m-menu-popup .m-menu--popup:not(.m-menu--teleported) {
|
|
1695
1703
|
left: 0;
|
|
1704
|
+
/* Keep the in-place popup at least as wide as its anchor. */
|
|
1705
|
+
min-width: 100%;
|
|
1696
1706
|
top: calc(100% + var(--m-space-2));
|
|
1697
1707
|
}
|
|
1698
1708
|
|
package/dist/menubar/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
|
|
2
|
-
import { t } from "../Icon-
|
|
2
|
+
import { t } from "../Icon-od9Ob-Ay.js";
|
|
3
3
|
import { t as n } from "../useMotionTransition-Bxnnb_9u.js";
|
|
4
4
|
import { n as ee, t as te } from "../overlay-oR-5MDuE.js";
|
|
5
5
|
import { t as ne } from "../overlayPlacement-Cd20JTD_.js";
|
|
6
6
|
import { t as re } from "../useFloatingViewportSync-DZdJ7W8n.js";
|
|
7
7
|
import { t as r } from "../useMenuKeyboard-BedmYE4W.js";
|
|
8
8
|
import { t as ie } from "../Scrollbar-DTeJ8P5b.js";
|
|
9
|
-
import { t as ae } from "../icon-
|
|
9
|
+
import { t as ae } from "../icon-COrt_N8A.js";
|
|
10
10
|
import { c as oe } from "../config-CapALqt3.js";
|
|
11
11
|
import { n as i } from "../locale-Bzm2nbEp.js";
|
|
12
12
|
import "./style.js";
|
|
@@ -74,7 +74,10 @@ var he = ["aria-label"], ge = {
|
|
|
74
74
|
let e = P.value[M.value];
|
|
75
75
|
if (!e) return;
|
|
76
76
|
let t = e.getBoundingClientRect();
|
|
77
|
-
F.value = ne(t, "bottom-start", {
|
|
77
|
+
F.value = ne(t, "bottom-start", {
|
|
78
|
+
gap: 4,
|
|
79
|
+
minWidth: "var(--m-menu-min-width, 12rem)"
|
|
80
|
+
});
|
|
78
81
|
}
|
|
79
82
|
function z(e) {
|
|
80
83
|
return e.key ?? e.label;
|
package/dist/menubar/style.css
CHANGED
|
@@ -529,9 +529,13 @@
|
|
|
529
529
|
border-radius: var(--m-radius-md);
|
|
530
530
|
box-shadow: var(--m-shadow-md);
|
|
531
531
|
max-height: var(--m-dropdown-submenu-max-height);
|
|
532
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
532
533
|
min-width: 10rem;
|
|
533
534
|
overflow: hidden;
|
|
534
535
|
padding: var(--m-space-1);
|
|
536
|
+
/* Same as .m-dropdown__menu: size to content instead of being clamped
|
|
537
|
+
by the space left of the anchor in the viewport. */
|
|
538
|
+
width: max-content;
|
|
535
539
|
}
|
|
536
540
|
|
|
537
541
|
.m-dropdown__submenu--teleported {
|
|
@@ -1466,11 +1470,15 @@
|
|
|
1466
1470
|
gap: var(--m-menubar-item-gap);
|
|
1467
1471
|
left: 0;
|
|
1468
1472
|
max-height: var(--m-menubar-submenu-max-height);
|
|
1473
|
+
max-width: calc(100vw - 2 * var(--m-space-4));
|
|
1469
1474
|
min-width: var(--m-menubar-menu-min-width);
|
|
1470
1475
|
overflow: hidden;
|
|
1471
1476
|
padding: var(--m-space-1);
|
|
1472
1477
|
position: absolute;
|
|
1473
1478
|
top: calc(100% + var(--m-space-1));
|
|
1479
|
+
/* Grow with the content: shrink-to-fit would clamp to the trigger item
|
|
1480
|
+
width (the containing block) when not teleported. */
|
|
1481
|
+
width: max-content;
|
|
1474
1482
|
z-index: var(--m-z-popper);
|
|
1475
1483
|
}
|
|
1476
1484
|
|