@@ -4,7 +4,8 @@ import React from "react";
44import {
55 Button ,
66 ButtonGroup ,
7- Card , Col ,
7+ Card ,
8+ Col ,
89 Dialog ,
910 DialogClose ,
1011 DialogContent ,
@@ -14,7 +15,8 @@ import {
1415 emailValidation ,
1516 Flex ,
1617 PasswordInput ,
17- passwordValidation , Row ,
18+ passwordValidation ,
19+ Row ,
1820 Spacing ,
1921 SwitchInput ,
2022 Text ,
@@ -28,12 +30,10 @@ import CardSection from "@code0-tech/pictor/dist/components/card/CardSection";
2830import { Tab , TabContent , TabList , TabTrigger } from "@code0-tech/pictor/dist/components/tab/Tab" ;
2931import { User , UsersUpdateInput } from "@code0-tech/sagittarius-graphql-types" ;
3032import { UserService } from "@edition/user/services/User.service" ;
31- import {
32- addIslandErrorNotification ,
33- addIslandSuccessNotification
34- } from "@code0-tech/pictor/dist/components/island/Island.hook" ;
33+ import { addIslandSuccessNotification } from "@code0-tech/pictor/dist/components/island/Island.hook" ;
3534import { IconAt , IconLock , IconMail , IconUser , IconX } from "@tabler/icons-react" ;
3635import { Layout } from "@code0-tech/pictor/dist/components/layout/Layout" ;
36+ import { motion } from "framer-motion" ;
3737
3838export interface UserEditDialogComponentProps {
3939 userId ?: User [ 'id' ]
@@ -141,34 +141,60 @@ export const UserEditDialogComponent: React.FC<UserEditDialogComponentProps> = (
141141 w = { "75%" } h = { "75%" } >
142142 < Tab orientation = { "vertical" } defaultValue = { "general" } w = { "100%" } h = { "100%" } >
143143 < Layout layoutGap = { 0 } showLayoutSplitter = { false }
144- leftContent = { < div style = { { maxWidth : "200px" , padding : "0.7rem" , marginTop : "0.55rem" } } >
145- < Text size = { "lg" } hierarchy = { "primary" } >
146- Settings of @{ user ?. username ?? "" }
147- </ Text >
148- < Spacing spacing = { "xxs" } />
149- < Text size = { "sm" } hierarchy = { "tertiary" } style = { { textWrap : "wrap" } } >
150- Edit the general settings, permissions and security for user
151- @{ user ?. username ?? "" }
152- </ Text >
153- < Spacing spacing = { "md" } />
154- < TabList >
155- < TabTrigger value = { "general" } w = { "100%" } asChild >
156- < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
157- < Text size = { "md" } > General</ Text >
158- </ Button >
159- </ TabTrigger >
160- < TabTrigger value = { "permissions" } w = { "100%" } asChild >
161- < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
162- < Text size = { "md" } > Permissions</ Text >
163- </ Button >
164- </ TabTrigger >
165- < TabTrigger value = { "security" } w = { "100%" } asChild >
166- < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
167- < Text size = { "md" } > Security</ Text >
168- </ Button >
169- </ TabTrigger >
170- </ TabList >
171- </ div > } >
144+ leftContent = {
145+ < motion . div layout
146+ transition = { {
147+ type : "spring" ,
148+ stiffness : 300 ,
149+ damping : 20 ,
150+ mass : 0.8
151+ } }
152+ initial = { {
153+ width : "200px" ,
154+ opacity : 0.25 ,
155+ } }
156+ whileInView = { {
157+ width : "200px" ,
158+ opacity : 0.25 ,
159+ } }
160+ whileHover = { {
161+ width : "250px" ,
162+ opacity : 1 ,
163+ } }
164+ style = { {
165+ padding : "0.7rem" ,
166+ marginTop : "0.55rem" ,
167+ height : "100%"
168+ } }
169+ >
170+ < Text size = { "lg" } hierarchy = { "primary" } >
171+ Settings of @{ user ?. username ?? "" }
172+ </ Text >
173+ < Spacing spacing = { "xxs" } />
174+ < Text size = { "sm" } maw = { "150px" } hierarchy = { "tertiary" } style = { { textWrap : "wrap" } } >
175+ Edit the general settings, permissions and security for user
176+ @{ user ?. username ?? "" }
177+ </ Text >
178+ < Spacing spacing = { "md" } />
179+ < TabList >
180+ < TabTrigger value = { "general" } w = { "100%" } asChild >
181+ < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
182+ < Text size = { "md" } > General</ Text >
183+ </ Button >
184+ </ TabTrigger >
185+ < TabTrigger value = { "permissions" } w = { "100%" } asChild >
186+ < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
187+ < Text size = { "md" } > Permissions</ Text >
188+ </ Button >
189+ </ TabTrigger >
190+ < TabTrigger value = { "security" } w = { "100%" } asChild >
191+ < Button paddingSize = { "xxs" } variant = { "none" } justify = { "start" } >
192+ < Text size = { "md" } > Security</ Text >
193+ </ Button >
194+ </ TabTrigger >
195+ </ TabList >
196+ </ motion . div >
197+ } >
172198 < Card color = { "primary" } paddingSize = { "md" } h = { "100%" } w = { "100%" } >
173199 < TabContent value = { "general" } style = { { overflow : "hidden" } } >
174200 < Flex justify = { "space-between" } align = { "center" } >
0 commit comments