srcdev-nuxt-components 6.1.40 → 6.1.41
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.
|
@@ -75,7 +75,7 @@ const props = defineProps({
|
|
|
75
75
|
|
|
76
76
|
const slots = useSlots()
|
|
77
77
|
const promptElementRef = useTemplateRef<HTMLElement>("promptElementRef")
|
|
78
|
-
const parentComponentState = defineModel<boolean>(
|
|
78
|
+
const parentComponentState = defineModel<boolean>({ default: false })
|
|
79
79
|
const compopnentOpen = ref(true)
|
|
80
80
|
const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
81
81
|
|
|
@@ -240,9 +240,16 @@ watch(
|
|
|
240
240
|
await useSleep(duration.value)
|
|
241
241
|
setDismissToast()
|
|
242
242
|
}
|
|
243
|
+
} else if (!newValue && previousValue) {
|
|
244
|
+
// If external model is set to false, dismiss the toast
|
|
245
|
+
setDismissToast()
|
|
243
246
|
}
|
|
244
247
|
}
|
|
245
248
|
)
|
|
249
|
+
|
|
250
|
+
onBeforeRouteLeave(() => {
|
|
251
|
+
setDismissToast()
|
|
252
|
+
})
|
|
246
253
|
</script>
|
|
247
254
|
|
|
248
255
|
<style lang="css">
|
|
@@ -253,7 +260,7 @@ watch(
|
|
|
253
260
|
}
|
|
254
261
|
}
|
|
255
262
|
|
|
256
|
-
@keyframes
|
|
263
|
+
@keyframes hideTop {
|
|
257
264
|
0% {
|
|
258
265
|
opacity: 1;
|
|
259
266
|
transform: translateY(0);
|
|
@@ -264,6 +271,17 @@ watch(
|
|
|
264
271
|
}
|
|
265
272
|
}
|
|
266
273
|
|
|
274
|
+
@keyframes hideBottom {
|
|
275
|
+
0% {
|
|
276
|
+
opacity: 1;
|
|
277
|
+
transform: translateY(0);
|
|
278
|
+
}
|
|
279
|
+
100% {
|
|
280
|
+
opacity: 0;
|
|
281
|
+
transform: translateY(30px);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
267
285
|
@keyframes progress {
|
|
268
286
|
to {
|
|
269
287
|
transform: scaleX(1);
|
|
@@ -306,18 +324,27 @@ watch(
|
|
|
306
324
|
|
|
307
325
|
&.hide {
|
|
308
326
|
@supports (animation-timing-function: linear(0, 1)) {
|
|
309
|
-
animation:
|
|
327
|
+
animation: hideTop v-bind(revealDurationMs) var(--spring-easing) forwards;
|
|
310
328
|
}
|
|
311
329
|
|
|
312
330
|
@supports not (animation-timing-function: linear(0, 1)) {
|
|
313
|
-
animation:
|
|
331
|
+
animation: hideTop calc(v-bind(revealDurationMs) / 2) linear forwards;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&.bottom {
|
|
335
|
+
@supports (animation-timing-function: linear(0, 1)) {
|
|
336
|
+
animation: hideBottom v-bind(revealDurationMs) var(--spring-easing) forwards;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
@supports not (animation-timing-function: linear(0, 1)) {
|
|
340
|
+
animation: hideBottom calc(v-bind(revealDurationMs) / 2) linear forwards;
|
|
341
|
+
}
|
|
314
342
|
}
|
|
315
343
|
}
|
|
316
344
|
|
|
317
345
|
/*
|
|
318
346
|
* Default is centre for smaller screens
|
|
319
347
|
*/
|
|
320
|
-
|
|
321
348
|
inset-inline: var(--_toast-gutter);
|
|
322
349
|
margin-inline: auto;
|
|
323
350
|
|
|
@@ -447,9 +474,8 @@ watch(
|
|
|
447
474
|
|
|
448
475
|
.display-toast-progress {
|
|
449
476
|
position: absolute;
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
width: calc(100% - 16px);
|
|
477
|
+
inset-block-end: 4px;
|
|
478
|
+
inset-inline: 15px 8px;
|
|
453
479
|
height: 3px;
|
|
454
480
|
transform: scaleX(0);
|
|
455
481
|
transform-origin: right;
|
package/package.json
CHANGED