Updated dialog and drawer tokens

This commit is contained in:
Cagatay Civici 2024-05-09 14:41:08 +03:00
parent 5a8ff84a79
commit 46fb23b659
7 changed files with 56 additions and 22 deletions

View file

@ -4,8 +4,8 @@ const theme = ({ dt }) => `
.p-dialog { .p-dialog {
max-height: 90%; max-height: 90%;
transform: scale(1); transform: scale(1);
border-radius: ${dt('border.radius.xl')}; border-radius: ${dt('dialog.border.radius')};
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1); box-shadow: ${dt('dialog.shadow')};
background: ${dt('dialog.background')}; background: ${dt('dialog.background')};
border: 1px solid ${dt('dialog.border.color')}; border: 1px solid ${dt('dialog.border.color')};
color: ${dt('dialog.color')}; color: ${dt('dialog.color')};
@ -13,7 +13,7 @@ const theme = ({ dt }) => `
.p-dialog-content { .p-dialog-content {
overflow-y: auto; overflow-y: auto;
padding: 0 1.5rem 1.5rem 1.5rem; padding: ${dt('dialog.content.padding')};
} }
.p-dialog-header { .p-dialog-header {
@ -21,26 +21,26 @@ const theme = ({ dt }) => `
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
flex-shrink: 0; flex-shrink: 0;
padding: 1.5rem; padding: ${dt('dialog.header.padding')};
} }
.p-dialog-title { .p-dialog-title {
font-weight: 600; font-weight: ${dt('dialog.title.font.weight')};
font-size: 1.25rem; font-size: ${dt('dialog.title.font.size')};
} }
.p-dialog-footer { .p-dialog-footer {
flex-shrink: 0; flex-shrink: 0;
padding: 0 1.5rem 1.5rem 1.5rem; padding: ${dt('dialog.footer.padding')};
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 0.5rem; gap: ${dt('dialog.footer.gap')};
} }
.p-dialog-header-actions { .p-dialog-header-actions {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0.5rem; gap: ${dt('dialog.header.gap')};
} }
.p-dialog-enter-active { .p-dialog-enter-active {
transition: all 150ms cubic-bezier(0, 0, 0.2, 1); transition: all 150ms cubic-bezier(0, 0, 0.2, 1);

View file

@ -1,7 +1,24 @@
export default { export default {
root: { root: {
background: '{content.background}', background: '{overlay.modal.background}',
borderColor: '{content.border.color}', borderColor: '{overlay.modal.border.color}',
color: '{content.color}' color: '{overlay.modal.color}',
borderRadius: '{overlay.modal.border.radius}',
shadow: '{overlay.modal.shadow}'
},
header: {
padding: '{overlay.modal.padding}',
gap: '0.5rem'
},
title: {
fontSize: '1.25rem',
fontWeight: '600'
},
content: {
padding: '0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}'
},
footer: {
padding: '0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}',
gap: '0.5rem'
} }
}; };

View file

@ -10,7 +10,7 @@ export default {
padding: '{overlay.modal.padding}' padding: '{overlay.modal.padding}'
}, },
title: { title: {
fontSize: '1.25rem', fontSize: '1.5rem',
fontWeight: '600' fontWeight: '600'
}, },
content: { content: {

View file

@ -182,8 +182,8 @@ export default {
shadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)' shadow: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)'
}, },
modal: { modal: {
borderRadius: '{border.radius.sm}', borderRadius: '{border.radius.xl}',
padding: '1.125rem', padding: '1.25rem',
shadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)' shadow: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)'
} }
}, },
@ -251,7 +251,7 @@ export default {
select: { select: {
background: '{surface.0}', background: '{surface.0}',
borderColor: '{surface.200}', borderColor: '{surface.200}',
color: '{text.color}', color: '{text.color}'
}, },
popover: { popover: {
background: '{surface.0}', background: '{surface.0}',

View file

@ -1,7 +1,24 @@
export default { export default {
root: { root: {
background: '{content.background}', background: '{overlay.modal.background}',
borderColor: '{content.border.color}', borderColor: '{overlay.modal.border.color}',
color: '{content.color}' color: '{overlay.modal.color}',
borderRadius: '{overlay.modal.border.radius}',
shadow: '{overlay.modal.shadow}'
},
header: {
padding: '{overlay.modal.padding}',
gap: '0.5rem'
},
title: {
fontSize: '1.25rem',
fontWeight: '600'
},
content: {
padding: '0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}'
},
footer: {
padding: '0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}',
gap: '0.5rem'
} }
}; };

View file

@ -10,7 +10,7 @@ export default {
padding: '{overlay.modal.padding}' padding: '{overlay.modal.padding}'
}, },
title: { title: {
fontSize: '1.25rem', fontSize: '1.5rem',
fontWeight: '600' fontWeight: '600'
}, },
content: { content: {

View file

@ -181,8 +181,8 @@ export default {
shadow: '0 1px 3px rgba(0, 0, 0, 0.3)' shadow: '0 1px 3px rgba(0, 0, 0, 0.3)'
}, },
modal: { modal: {
borderRadius: '{border.radius.sm}', borderRadius: '{border.radius.lg}',
padding: '1.25rem', padding: '1.5rem',
shadow: '0 1px 3px rgba(0, 0, 0, 0.3)' shadow: '0 1px 3px rgba(0, 0, 0, 0.3)'
} }
}, },