From 4d454ecb13bf235ad4ec904617090e33a2f9eeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96zt=C3=BCrk?= Date: Mon, 8 Jun 2026 21:50:44 +0300 Subject: [PATCH] Notification komponentindeki middle-center --- ui/public/version.json | 2 +- ui/src/components/ui/@types/placement.ts | 1 + ui/src/components/ui/toast/transition.ts | 20 ++++++++++++++++++++ ui/src/components/ui/utils/constants.ts | 1 + 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ui/public/version.json b/ui/public/version.json index 155c39a..c8822bd 100644 --- a/ui/public/version.json +++ b/ui/public/version.json @@ -1,5 +1,5 @@ { - "commit": "168768b", + "commit": "b286332", "releases": [ { "version": "1.1.04", diff --git a/ui/src/components/ui/@types/placement.ts b/ui/src/components/ui/@types/placement.ts index 95d4f1c..f55e76a 100644 --- a/ui/src/components/ui/@types/placement.ts +++ b/ui/src/components/ui/@types/placement.ts @@ -2,6 +2,7 @@ export type NotificationPlacement = | 'top-start' | 'top-center' | 'top-end' + | 'middle-center' | 'bottom-start' | 'bottom-center' | 'bottom-end' diff --git a/ui/src/components/ui/toast/transition.ts b/ui/src/components/ui/toast/transition.ts index 99918c4..c677c74 100644 --- a/ui/src/components/ui/toast/transition.ts +++ b/ui/src/components/ui/toast/transition.ts @@ -104,6 +104,16 @@ const scaleTransition = ( ...scaleMotionProps, }, }, + 'middle-center': { + default: { + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + }, + variants: { + ...scaleMotionProps, + }, + }, 'bottom-end': { default: { bottom: offsetY, @@ -168,6 +178,16 @@ const fadeTransition = ( ...fadeMotionProps, }, }, + 'middle-center': { + default: { + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + }, + variants: { + ...fadeMotionProps, + }, + }, 'bottom-end': { default: { bottom: offsetY, diff --git a/ui/src/components/ui/utils/constants.ts b/ui/src/components/ui/utils/constants.ts index 6dfa188..81007b9 100644 --- a/ui/src/components/ui/utils/constants.ts +++ b/ui/src/components/ui/utils/constants.ts @@ -54,6 +54,7 @@ export const PLACEMENT = { TOP_START: 'top-start', TOP_CENTER: 'top-center', TOP_END: 'top-end', + MIDDLE_CENTER: 'middle-center', BOTTOM_START: 'bottom-start', BOTTOM_CENTER: 'bottom-center', BOTTOM_END: 'bottom-end',