@ulu/frontend-vue 0.6.29 → 0.6.31
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/dist/components/collapsible/UluModal.vue.d.ts.map +1 -1
- package/dist/components/collapsible/UluModal.vue.js +59 -58
- package/dist/mcp-data.json +416 -371
- package/dist/plugins/popovers/UluPopoverBase.vue.d.ts.map +1 -1
- package/dist/plugins/popovers/UluPopoverBase.vue.js +19 -19
- package/dist/plugins/tour/UluTourDisplay.vue.d.ts.map +1 -1
- package/dist/plugins/tour/UluTourDisplay.vue.js +35 -29
- package/dist/plugins/tour/api.d.ts +4 -0
- package/dist/plugins/tour/api.d.ts.map +1 -1
- package/dist/plugins/tour/api.js +23 -12
- package/lib/components/collapsible/UluModal.vue +1 -0
- package/lib/plugins/tour/api.js +25 -3
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UluModal.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UluModal.vue.d.ts","sourceRoot":"","sources":["../../../lib/components/collapsible/UluModal.vue"],"names":[],"mappings":"AAuEA;wBA47BqB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;;6BAEtE,CAAC,EAAE,CAAC;;;AAbjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4OAUG"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { useSlots as
|
|
1
|
+
import { useSlots as G, ref as n, computed as c, watch as M, nextTick as w, onMounted as J, onBeforeUnmount as K, createBlock as F, openBlock as u, Teleport as Q, createElementVNode as d, mergeProps as Z, unref as H, withModifiers as x, createElementBlock as C, createCommentVNode as g, normalizeClass as f, renderSlot as m, toDisplayString as ee, createVNode as L, normalizeStyle as le } from "vue";
|
|
2
2
|
import R from "../elements/UluIcon.vue.js";
|
|
3
|
-
import { useModifiers as
|
|
4
|
-
import { preventScroll as
|
|
5
|
-
import { getSoleIframeLayout as
|
|
6
|
-
import { newId as
|
|
7
|
-
const
|
|
3
|
+
import { useModifiers as oe } from "../../composables/useModifiers.js";
|
|
4
|
+
import { preventScroll as te, wasClickOutside as se } from "@ulu/utils/browser/dom.js";
|
|
5
|
+
import { getSoleIframeLayout as ie, youtubePrepVideos as ae, youtubePauseVideos as ne, Resizer as re, observeDialogToggle as ce } from "@ulu/frontend";
|
|
6
|
+
import { newId as ue } from "../../utils/dom.js";
|
|
7
|
+
const de = ["aria-labelledby", "aria-describedby"], fe = ["id"], me = { class: "modal__title-text" }, he = {
|
|
8
8
|
__name: "UluModal",
|
|
9
9
|
props: {
|
|
10
10
|
/**
|
|
@@ -128,21 +128,21 @@ const ue = ["aria-labelledby", "aria-describedby"], de = ["id"], fe = { class: "
|
|
|
128
128
|
noPauseVideos: Boolean
|
|
129
129
|
},
|
|
130
130
|
emits: ["update:modelValue", "close", "open"],
|
|
131
|
-
setup(t, { emit:
|
|
132
|
-
const
|
|
131
|
+
setup(t, { emit: T }) {
|
|
132
|
+
const r = T, e = t, j = G(), D = n(null), E = ue("ulu-modal-title"), B = n(!1), o = n(null), $ = n(null), k = n(null), i = n({
|
|
133
133
|
isStaticSize: !1,
|
|
134
134
|
isFill: !1,
|
|
135
135
|
bodyStyle: {}
|
|
136
|
-
}),
|
|
136
|
+
}), O = c(() => e.title || j.title), v = c(() => {
|
|
137
137
|
const { allowResize: l, position: s } = e;
|
|
138
138
|
if (!l || !s) return !1;
|
|
139
139
|
const h = ["left", "right", "center"];
|
|
140
140
|
return h.includes(s) ? !0 : (console.warn(`Passed invalid position for resize (${s}), use ${h.join(", ")}`), !1);
|
|
141
|
-
}),
|
|
141
|
+
}), N = c(() => e.position === "center" ? "type:resizeBoth" : "type:resizeHorizontal"), A = c(() => ({
|
|
142
142
|
[e.position]: e.position,
|
|
143
143
|
resize: e.allowResize,
|
|
144
144
|
"no-resize": !e.allowResize,
|
|
145
|
-
"no-header":
|
|
145
|
+
"no-header": !O.value,
|
|
146
146
|
"body-fills": e.bodyFills,
|
|
147
147
|
"no-backdrop": e.noBackdrop,
|
|
148
148
|
"no-min-height": e.noMinHeight,
|
|
@@ -152,33 +152,33 @@ const ue = ["aria-labelledby", "aria-describedby"], de = ["id"], fe = { class: "
|
|
|
152
152
|
"fullscreen-mobile": e.fullscreenMobile,
|
|
153
153
|
"frame-ratio": i.value.isStaticSize,
|
|
154
154
|
"frame-fill": i.value.isFill
|
|
155
|
-
})), { resolvedModifiers: U } =
|
|
155
|
+
})), { resolvedModifiers: U } = oe({
|
|
156
156
|
props: e,
|
|
157
157
|
baseClass: "modal",
|
|
158
158
|
internal: A
|
|
159
|
-
}), X =
|
|
160
|
-
|
|
161
|
-
},
|
|
162
|
-
e.modelValue && (
|
|
163
|
-
},
|
|
159
|
+
}), X = c(() => e.labelledby ? e.labelledby : E), a = () => {
|
|
160
|
+
r("update:modelValue", !1), r("close");
|
|
161
|
+
}, _ = () => {
|
|
162
|
+
e.modelValue && (r("update:modelValue", !1), r("close"));
|
|
163
|
+
}, q = (l) => {
|
|
164
164
|
if (e.clickOutsideCloses && !B.value) {
|
|
165
165
|
const { target: s } = l;
|
|
166
|
-
s === o.value &&
|
|
166
|
+
s === o.value && se(o.value, l) && a();
|
|
167
167
|
}
|
|
168
168
|
};
|
|
169
169
|
let y = null, b = null, S = null, z = null, p = null;
|
|
170
|
-
const
|
|
171
|
-
!e.nonModal && e.preventScroll && (y =
|
|
172
|
-
l ? b =
|
|
170
|
+
const W = () => {
|
|
171
|
+
!e.nonModal && e.preventScroll && (y = ce(o.value, (l) => {
|
|
172
|
+
l ? b = te({ preventShift: e.preventScrollShift }) : P();
|
|
173
173
|
}));
|
|
174
|
-
},
|
|
174
|
+
}, Y = () => {
|
|
175
175
|
y && (y.destroy(), y = null);
|
|
176
176
|
}, P = () => {
|
|
177
177
|
b && (b(), b = null);
|
|
178
178
|
}, I = () => {
|
|
179
179
|
if (v.value) {
|
|
180
180
|
const l = e.position === "center" ? { fromX: "right", fromY: "bottom", multiplier: 2 } : { fromX: e.position === "right" ? "left" : "right" };
|
|
181
|
-
S = new
|
|
181
|
+
S = new re(o.value, $.value, l), z = () => {
|
|
182
182
|
B.value = !0;
|
|
183
183
|
}, p = () => {
|
|
184
184
|
setTimeout(() => {
|
|
@@ -194,12 +194,12 @@ const ue = ["aria-labelledby", "aria-describedby"], de = ["id"], fe = { class: "
|
|
|
194
194
|
if (o.value)
|
|
195
195
|
if (l) {
|
|
196
196
|
if (e.autoIframe && k.value) {
|
|
197
|
-
const s =
|
|
197
|
+
const s = ie(k.value);
|
|
198
198
|
s && (s.iframe.classList.add("modal__frame-content"), s.isStaticSize ? (i.value.isStaticSize = !0, i.value.isFill = !1, i.value.bodyStyle = { aspectRatio: s.aspectRatio }) : (i.value.isFill = !0, i.value.isStaticSize = !1, i.value.bodyStyle = s.fillHeight ? { minHeight: s.fillHeight } : {}));
|
|
199
199
|
}
|
|
200
|
-
e.noPauseVideos ||
|
|
200
|
+
e.noPauseVideos || ae(o.value), o.value[e.nonModal ? "show" : "showModal"](), r("open");
|
|
201
201
|
} else
|
|
202
|
-
e.noPauseVideos || (
|
|
202
|
+
e.noPauseVideos || (ne(o.value), o.value.querySelectorAll("video").forEach((h) => h.pause())), o.value.close(), i.value = { isStaticSize: !1, isFill: !1, bodyStyle: {} };
|
|
203
203
|
});
|
|
204
204
|
}, { immediate: !0 }), M(v, (l) => {
|
|
205
205
|
l ? w(() => {
|
|
@@ -209,88 +209,89 @@ const ue = ["aria-labelledby", "aria-describedby"], de = ["id"], fe = { class: "
|
|
|
209
209
|
l !== s && (V(), w(() => {
|
|
210
210
|
I();
|
|
211
211
|
}));
|
|
212
|
+
}), J(() => {
|
|
213
|
+
W(), I();
|
|
212
214
|
}), K(() => {
|
|
213
|
-
Y(),
|
|
214
|
-
}),
|
|
215
|
-
o.value && o.value.open && o.value.close(), G(), P(), V();
|
|
216
|
-
}), (l, s) => (d(), F(Z, {
|
|
215
|
+
o.value && o.value.open && o.value.close(), Y(), P(), V();
|
|
216
|
+
}), (l, s) => (u(), F(Q, {
|
|
217
217
|
to: t.teleport === !1 ? null : t.teleport,
|
|
218
218
|
disabled: t.teleport === !1
|
|
219
219
|
}, [
|
|
220
|
-
|
|
221
|
-
class:
|
|
220
|
+
d("dialog", Z({
|
|
221
|
+
class: ["modal", [H(U), t.classes.container]],
|
|
222
222
|
"aria-labelledby": X.value,
|
|
223
223
|
"aria-describedby": t.describedby,
|
|
224
224
|
ref_key: "container",
|
|
225
225
|
ref: o,
|
|
226
|
-
style:
|
|
226
|
+
style: { width: D.value }
|
|
227
|
+
}, l.$attrs, {
|
|
227
228
|
onCancel: x(a, ["prevent"]),
|
|
228
|
-
onClose:
|
|
229
|
-
onClick:
|
|
230
|
-
}, [
|
|
231
|
-
|
|
229
|
+
onClose: _,
|
|
230
|
+
onClick: q
|
|
231
|
+
}), [
|
|
232
|
+
O.value ? (u(), C("header", {
|
|
232
233
|
key: 0,
|
|
233
|
-
class:
|
|
234
|
+
class: f(["modal__header", t.classes.header])
|
|
234
235
|
}, [
|
|
235
|
-
|
|
236
|
-
class:
|
|
237
|
-
id:
|
|
236
|
+
d("h2", {
|
|
237
|
+
class: f(["modal__title", t.classes.title]),
|
|
238
|
+
id: H(E)
|
|
238
239
|
}, [
|
|
239
240
|
m(l.$slots, "title", { close: a }, () => [
|
|
240
|
-
t.titleIcon ? (
|
|
241
|
+
t.titleIcon ? (u(), F(R, {
|
|
241
242
|
key: 0,
|
|
242
243
|
class: "modal__title-icon",
|
|
243
244
|
icon: t.titleIcon
|
|
244
245
|
}, null, 8, ["icon"])) : g("", !0),
|
|
245
|
-
|
|
246
|
+
d("span", me, ee(t.title), 1)
|
|
246
247
|
])
|
|
247
|
-
], 10,
|
|
248
|
-
|
|
249
|
-
class:
|
|
248
|
+
], 10, fe),
|
|
249
|
+
d("button", {
|
|
250
|
+
class: f(["modal__close", t.classes.close]),
|
|
250
251
|
"aria-label": "Close modal",
|
|
251
252
|
onClick: a,
|
|
252
253
|
autofocus: ""
|
|
253
254
|
}, [
|
|
254
255
|
m(l.$slots, "closeIcon", {}, () => [
|
|
255
|
-
|
|
256
|
+
L(R, {
|
|
256
257
|
class: "modal__close-icon",
|
|
257
258
|
icon: t.closeIcon || "type:close"
|
|
258
259
|
}, null, 8, ["icon"])
|
|
259
260
|
])
|
|
260
261
|
], 2)
|
|
261
262
|
], 2)) : g("", !0),
|
|
262
|
-
|
|
263
|
-
class:
|
|
264
|
-
style:
|
|
263
|
+
d("div", {
|
|
264
|
+
class: f(["modal__body", t.classes.body]),
|
|
265
|
+
style: le(i.value.bodyStyle),
|
|
265
266
|
ref_key: "body",
|
|
266
267
|
ref: k
|
|
267
268
|
}, [
|
|
268
269
|
m(l.$slots, "default", { close: a })
|
|
269
270
|
], 6),
|
|
270
|
-
l.$slots.footer ? (
|
|
271
|
+
l.$slots.footer ? (u(), C("div", {
|
|
271
272
|
key: 1,
|
|
272
|
-
class:
|
|
273
|
+
class: f(["modal__footer", t.classes.footer])
|
|
273
274
|
}, [
|
|
274
275
|
m(l.$slots, "footer", { close: a })
|
|
275
276
|
], 2)) : g("", !0),
|
|
276
|
-
v.value ? (
|
|
277
|
+
v.value ? (u(), C("button", {
|
|
277
278
|
key: 2,
|
|
278
279
|
class: "modal__resizer",
|
|
279
280
|
ref_key: "resizer",
|
|
280
|
-
ref:
|
|
281
|
+
ref: $,
|
|
281
282
|
type: "button"
|
|
282
283
|
}, [
|
|
283
284
|
m(l.$slots, "resizerIcon", {}, () => [
|
|
284
|
-
|
|
285
|
+
L(R, {
|
|
285
286
|
class: "modal__resizer-icon",
|
|
286
|
-
icon: t.resizerIcon ||
|
|
287
|
+
icon: t.resizerIcon || N.value
|
|
287
288
|
}, null, 8, ["icon"])
|
|
288
289
|
])
|
|
289
290
|
], 512)) : g("", !0)
|
|
290
|
-
],
|
|
291
|
+
], 16, de)
|
|
291
292
|
], 8, ["to", "disabled"]));
|
|
292
293
|
}
|
|
293
294
|
};
|
|
294
295
|
export {
|
|
295
|
-
|
|
296
|
+
he as default
|
|
296
297
|
};
|