Tokens for breadcrumb

pull/5756/head
Cagatay Civici 2024-05-10 09:51:21 +03:00
parent 4dec38079a
commit 8ab9fa1154
5 changed files with 36 additions and 22 deletions

View File

@ -3,9 +3,7 @@ import BaseStyle from 'primevue/base/style';
const theme = ({ dt }) => ` const theme = ({ dt }) => `
.p-breadcrumb { .p-breadcrumb {
background: ${dt('breadcrumb.background')}; background: ${dt('breadcrumb.background')};
border: 0 none; padding: ${dt('breadcrumb.padding')};
border-radius: ${dt('border.radius.md')};
padding: 1rem;
overflow-x: auto; overflow-x: auto;
} }
@ -16,12 +14,12 @@ const theme = ({ dt }) => `
display: flex; display: flex;
align-items: center; align-items: center;
flex-wrap: nowrap; flex-wrap: nowrap;
gap: ${dt('breadcrumb.gap')};
} }
.p-breadcrumb-separator { .p-breadcrumb-separator {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0 0.5rem 0 0.5rem;
color: ${dt('breadcrumb.separator.color')}; color: ${dt('breadcrumb.separator.color')};
} }
@ -33,20 +31,16 @@ const theme = ({ dt }) => `
text-decoration: none; text-decoration: none;
display: flex; display: flex;
align-items: center; align-items: center;
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}; transition: background ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')};
border-radius: ${dt('border.radius.md')}; border-radius: ${dt('breadcrumb.item.border.radius')};
outline-color: transparent; outline-color: transparent;
color: ${dt('breadcrumb.item.color')};
} }
.p-breadcrumb-item-link:focus-visible { .p-breadcrumb-item-link:focus-visible {
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')}; box-shadow: ${dt('breadcrumb.item.focus.ring.shadow')};
outline-offset: ${dt('focus.ring.offset')}; outline: ${dt('breadcrumb.item.focus.ring.width')} ${dt('breadcrumb.item.focus.ring.style')} ${dt('breadcrumb.item.focus.ring.color')};
} outline-offset: ${dt('breadcrumb.item.focus.ring.offset')};
.p-breadcrumb-item-link {
color: ${dt('breadcrumb.item.color')};
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
line-height: 1;
} }
.p-breadcrumb-item-label:hover { .p-breadcrumb-item-label:hover {

View File

@ -1,11 +1,21 @@
export default { export default {
root: { root: {
background: '{content.background}' padding: '1rem',
background: '{content.background}',
gap: '0.5rem'
}, },
item: { item: {
color: '{text.muted.color}', color: '{text.muted.color}',
hoverColor: '{text.color}', hoverColor: '{text.color}',
iconColor: '{navigation.item.icon.color}' iconColor: '{navigation.item.icon.color}',
borderRadius: '{content.border.radius}',
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
}
}, },
separator: { separator: {
color: '{navigation.item.icon.color}' color: '{navigation.item.icon.color}'

View File

@ -287,7 +287,7 @@ export default {
item: { item: {
focusBackground: '{surface.100}', focusBackground: '{surface.100}',
color: '{text.color}', color: '{text.color}',
hoverColor: '{text.hover.color}', focusColor: '{text.hover.color}',
icon: { icon: {
color: '{surface.400}', color: '{surface.400}',
focusColor: '{surface.500}' focusColor: '{surface.500}'
@ -397,7 +397,7 @@ export default {
item: { item: {
focusBackground: '{surface.800}', focusBackground: '{surface.800}',
color: '{text.color}', color: '{text.color}',
hoverColor: '{text.hover.color}', focusColor: '{text.hover.color}',
icon: { icon: {
color: '{surface.500}', color: '{surface.500}',
focusColor: '{surface.400}' focusColor: '{surface.400}'

View File

@ -1,11 +1,21 @@
export default { export default {
root: { root: {
background: '{content.background}' padding: '1.25rem',
background: '{content.background}',
gap: '0.5rem'
}, },
item: { item: {
color: '{text.muted.color}', color: '{text.muted.color}',
hoverColor: '{text.color}', hoverColor: '{text.color}',
iconColor: '{navigation.item.icon.color}' iconColor: '{navigation.item.icon.color}',
borderRadius: '{content.border.radius}',
focusRing: {
width: '{focus.ring.width}',
style: '{focus.ring.style}',
color: '{focus.ring.color}',
offset: '{focus.ring.offset}',
shadow: '{focus.ring.shadow}'
}
}, },
separator: { separator: {
color: '{navigation.item.icon.color}' color: '{navigation.item.icon.color}'

View File

@ -289,7 +289,7 @@ export default {
item: { item: {
focusBackground: '{surface.100}', focusBackground: '{surface.100}',
color: '{text.color}', color: '{text.color}',
hoverColor: '{text.hover.color}', focusColor: '{text.hover.color}',
icon: { icon: {
color: '{surface.400}', color: '{surface.400}',
focusColor: '{surface.500}' focusColor: '{surface.500}'
@ -402,7 +402,7 @@ export default {
item: { item: {
focusBackground: '{surface.800}', focusBackground: '{surface.800}',
color: '{text.color}', color: '{text.color}',
hoverColor: '{text.hover.color}', focusColor: '{text.hover.color}',
icon: { icon: {
color: '{surface.500}', color: '{surface.500}',
focusColor: '{surface.400}' focusColor: '{surface.400}'