From 180f93fe017e9928c739935e7596096a499d6de2 Mon Sep 17 00:00:00 2001 From: barbapapazes Date: Mon, 16 Jun 2025 18:41:59 +0200 Subject: [PATCH 1/7] feat(Overlay): support stacking --- playground/app/app.config.ts | 10 +++++++++- playground/app/app.vue | 2 +- playground/app/components/FirstModal.vue | 21 +++++++++++++++++++++ playground/app/components/SecondModal.vue | 11 +++++++++++ playground/app/pages/components/modal.vue | 9 +++++++++ src/runtime/components/App.vue | 4 +++- src/runtime/components/OverlayProvider.vue | 14 +++++++++++++- 7 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 playground/app/components/FirstModal.vue create mode 100644 playground/app/components/SecondModal.vue diff --git a/playground/app/app.config.ts b/playground/app/app.config.ts index 7056ebb4d6..5e000e2a1b 100644 --- a/playground/app/app.config.ts +++ b/playground/app/app.config.ts @@ -1,9 +1,17 @@ export default defineAppConfig({ toaster: { - position: 'bottom-right' as const, + position: 'bottom-right', expand: true, duration: 5000 }, + overlay: { + class: 'origin-top transition-transform duration-100', + style: { + '--overlay-value': 'calc(var(--overlay-count) - var(--overlay-index) - 1)', + 'scale': 'calc(100% - 5% * var(--overlay-value))', + 'translate': 'var(--tw-translate-x) calc(-1.25rem * var(--overlay-value))' + } + }, ui: { colors: { primary: 'green', diff --git a/playground/app/app.vue b/playground/app/app.vue index 7348fbd70f..b8adc7e66f 100644 --- a/playground/app/app.vue +++ b/playground/app/app.vue @@ -91,7 +91,7 @@ useHead({