Token refactor
parent
09e1273571
commit
d992509165
|
@ -15,7 +15,7 @@ export default {
|
||||||
home: {
|
home: {
|
||||||
icon: 'pi pi-home'
|
icon: 'pi pi-home'
|
||||||
},
|
},
|
||||||
items: [{ label: 'Electronics' }, { label: 'Computer' }, { label: 'Accessories' }, { label: 'Keyboard' }, { label: 'Wireless' }],
|
items: [{ label: 'Electronics' }, { label: 'Computer', icon: 'pi pi-desktop' }, { label: 'Accessories' }, { label: 'Keyboard' }, { label: 'Wireless' }],
|
||||||
code: {
|
code: {
|
||||||
basic: `
|
basic: `
|
||||||
<Breadcrumb :home="home" :model="items" />
|
<Breadcrumb :home="home" :model="items" />
|
||||||
|
|
|
@ -5,6 +5,7 @@ const theme = ({ dt }) => `
|
||||||
.p-badge {
|
.p-badge {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
border-radius: ${dt('badge.border.radius')};
|
border-radius: ${dt('badge.border.radius')};
|
||||||
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: ${dt('badge.padding')};
|
padding: ${dt('badge.padding')};
|
||||||
background: ${dt('badge.primary.background')};
|
background: ${dt('badge.primary.background')};
|
||||||
|
@ -13,7 +14,6 @@ const theme = ({ dt }) => `
|
||||||
font-weight: ${dt('badge.font.weight')};
|
font-weight: ${dt('badge.font.weight')};
|
||||||
min-width: ${dt('badge.min.width')};
|
min-width: ${dt('badge.min.width')};
|
||||||
height: ${dt('badge.height')};
|
height: ${dt('badge.height')};
|
||||||
line-height: ${dt('badge.height')};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-badge-dot {
|
.p-badge-dot {
|
||||||
|
@ -63,21 +63,18 @@ const theme = ({ dt }) => `
|
||||||
font-size: ${dt('badge.sm.font.size')};
|
font-size: ${dt('badge.sm.font.size')};
|
||||||
min-width: ${dt('badge.sm.min.width')};
|
min-width: ${dt('badge.sm.min.width')};
|
||||||
height: ${dt('badge.sm.height')};
|
height: ${dt('badge.sm.height')};
|
||||||
line-height: ${dt('badge.sm.height')};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-badge-lg {
|
.p-badge-lg {
|
||||||
font-size: ${dt('badge.lg.font.size')};
|
font-size: ${dt('badge.lg.font.size')};
|
||||||
min-width: ${dt('badge.lg.min.width')};
|
min-width: ${dt('badge.lg.min.width')};
|
||||||
height: ${dt('badge.lg.height')};
|
height: ${dt('badge.lg.height')};
|
||||||
line-height: ${dt('badge.lg.height')};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-badge-xl {
|
.p-badge-xl {
|
||||||
font-size: ${dt('badge.xl.font.size')};
|
font-size: ${dt('badge.xl.font.size')};
|
||||||
min-width: ${dt('badge.xl.min.width')};
|
min-width: ${dt('badge.xl.min.width')};
|
||||||
height: ${dt('badge.xl.height')};
|
height: ${dt('badge.xl.height')};
|
||||||
line-height: ${dt('badge.xl.height')};
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ const theme = ({ dt }) => `
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
gap: ${dt('breadcrumb.item.gap')};
|
||||||
transition: background ${dt('breadcrumb.transition.duration')}, color ${dt('breadcrumb.transition.duration')}, outline-color ${dt('breadcrumb.transition.duration')}, box-shadow ${dt('breadcrumb.transition.duration')};
|
transition: background ${dt('breadcrumb.transition.duration')}, color ${dt('breadcrumb.transition.duration')}, outline-color ${dt('breadcrumb.transition.duration')}, box-shadow ${dt('breadcrumb.transition.duration')};
|
||||||
border-radius: ${dt('breadcrumb.item.border.radius')};
|
border-radius: ${dt('breadcrumb.item.border.radius')};
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
|
@ -43,13 +44,21 @@ const theme = ({ dt }) => `
|
||||||
outline-offset: ${dt('breadcrumb.item.focus.ring.offset')};
|
outline-offset: ${dt('breadcrumb.item.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb-item-label:hover {
|
.p-breadcrumb-item-link:hover .p-breadcrumb-item-label {
|
||||||
color: ${dt('breadcrumb.item.hover.color')};
|
color: ${dt('breadcrumb.item.hover.color')};
|
||||||
line-height: 1;
|
}
|
||||||
|
|
||||||
|
.p-breadcrumb-item-label {
|
||||||
|
transition: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-breadcrumb-item-icon {
|
.p-breadcrumb-item-icon {
|
||||||
color: ${dt('breadcrumb.item.icon.color')};
|
color: ${dt('breadcrumb.item.icon.color')};
|
||||||
|
transition: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-breadcrumb-item-link:hover .p-breadcrumb-item-icon {
|
||||||
|
color: ${dt('breadcrumb.item.icon.hover.color')};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-chip-remove-icon {
|
.p-chip-remove-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: ${dt('chip.remove.icon.font.size')};
|
font-size: ${dt('chip.remove.icon.size')};
|
||||||
width: ${dt('chip.remove.icon.size')};
|
width: ${dt('chip.remove.icon.size')};
|
||||||
height: ${dt('chip.remove.icon.size')};
|
height: ${dt('chip.remove.icon.size')};
|
||||||
color: ${dt('chip.remove.icon.color')};
|
color: ${dt('chip.remove.icon.color')};
|
||||||
|
|
|
@ -131,25 +131,25 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-datepicker-select-month {
|
.p-datepicker-select-month {
|
||||||
padding: ${dt('datepicker.view.month.padding')};
|
padding: ${dt('datepicker.select.month.padding')};
|
||||||
color: ${dt('datepicker.view.month.color')};
|
color: ${dt('datepicker.select.month.color')};
|
||||||
border-radius: ${dt('datepicker.view.month.border.radius')};
|
border-radius: ${dt('datepicker.select.month.border.radius')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-datepicker-select-year {
|
.p-datepicker-select-year {
|
||||||
padding: ${dt('datepicker.view.year.padding')};
|
padding: ${dt('datepicker.select.year.padding')};
|
||||||
color: ${dt('datepicker.view.year.color')};
|
color: ${dt('datepicker.select.year.color')};
|
||||||
border-radius: ${dt('datepicker.view.year.border.radius')};
|
border-radius: ${dt('datepicker.select.year.border.radius')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-datepicker-select-month:enabled:hover {
|
.p-datepicker-select-month:enabled:hover {
|
||||||
background: ${dt('datepicker.view.month.hover.background')};
|
background: ${dt('datepicker.select.month.hover.background')};
|
||||||
color: ${dt('datepicker.view.month.hover.color')};
|
color: ${dt('datepicker.select.month.hover.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-datepicker-select-year:enabled:hover {
|
.p-datepicker-select-year:enabled:hover {
|
||||||
background: ${dt('datepicker.view.year.hover.background')};
|
background: ${dt('datepicker.select.year.hover.background')};
|
||||||
color: ${dt('datepicker.view.year.hover.color')};
|
color: ${dt('datepicker.select.year.hover.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-datepicker-calendar-container {
|
.p-datepicker-calendar-container {
|
||||||
|
|
|
@ -8,8 +8,12 @@ export default {
|
||||||
item: {
|
item: {
|
||||||
color: '{text.muted.color}',
|
color: '{text.muted.color}',
|
||||||
hoverColor: '{text.color}',
|
hoverColor: '{text.color}',
|
||||||
iconColor: '{navigation.item.icon.color}',
|
|
||||||
borderRadius: '{content.border.radius}',
|
borderRadius: '{content.border.radius}',
|
||||||
|
gap: '{navigation.item.gap}',
|
||||||
|
icon: {
|
||||||
|
color: '{navigation.item.icon.color}',
|
||||||
|
hoverColor: '{navigation.item.icon.focus.color}'
|
||||||
|
},
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default {
|
||||||
size: '1rem'
|
size: '1rem'
|
||||||
},
|
},
|
||||||
removeIcon: {
|
removeIcon: {
|
||||||
|
size: '1rem',
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -8,8 +8,12 @@ export default {
|
||||||
item: {
|
item: {
|
||||||
color: '{text.muted.color}',
|
color: '{text.muted.color}',
|
||||||
hoverColor: '{text.color}',
|
hoverColor: '{text.color}',
|
||||||
iconColor: '{navigation.item.icon.color}',
|
|
||||||
borderRadius: '{content.border.radius}',
|
borderRadius: '{content.border.radius}',
|
||||||
|
gap: '{navigation.item.gap}',
|
||||||
|
icon: {
|
||||||
|
color: '{navigation.item.icon.color}',
|
||||||
|
hoverColor: '{navigation.item.icon.focus.color}'
|
||||||
|
},
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default {
|
||||||
size: '1rem'
|
size: '1rem'
|
||||||
},
|
},
|
||||||
removeIcon: {
|
removeIcon: {
|
||||||
|
size: '1rem',
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -8,8 +8,12 @@ export default {
|
||||||
item: {
|
item: {
|
||||||
color: '{text.muted.color}',
|
color: '{text.muted.color}',
|
||||||
hoverColor: '{text.color}',
|
hoverColor: '{text.color}',
|
||||||
iconColor: '{navigation.item.icon.color}',
|
|
||||||
borderRadius: '{content.border.radius}',
|
borderRadius: '{content.border.radius}',
|
||||||
|
gap: '{navigation.item.gap}',
|
||||||
|
icon: {
|
||||||
|
color: '{text.muted.color}',
|
||||||
|
hoverColor: '{text.color}'
|
||||||
|
},
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -14,6 +14,7 @@ export default {
|
||||||
size: '1rem'
|
size: '1rem'
|
||||||
},
|
},
|
||||||
removeIcon: {
|
removeIcon: {
|
||||||
|
size: '1rem',
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
style: '{focus.ring.style}',
|
style: '{focus.ring.style}',
|
||||||
|
|
|
@ -62,6 +62,18 @@ export interface BreadcrumbDesignTokens extends ColorSchemeDesignToken<Breadcrum
|
||||||
* @designToken breadcrumb.item.icon.color
|
* @designToken breadcrumb.item.icon.color
|
||||||
*/
|
*/
|
||||||
iconColor?: string;
|
iconColor?: string;
|
||||||
|
/**
|
||||||
|
* Hover color of item icon
|
||||||
|
*
|
||||||
|
* @designToken breadcrumb.item.icon.hover.color
|
||||||
|
*/
|
||||||
|
iconHoverColor?: string;
|
||||||
|
/**
|
||||||
|
* Gap of item
|
||||||
|
*
|
||||||
|
* @designToken breadcrumb.item.gap
|
||||||
|
*/
|
||||||
|
gap?: string;
|
||||||
/**
|
/**
|
||||||
* Border radius of item
|
* Border radius of item
|
||||||
*
|
*
|
||||||
|
|
|
@ -96,6 +96,12 @@ export interface ChipDesignTokens extends ColorSchemeDesignToken<ChipDesignToken
|
||||||
* Used to pass tokens of the remove icon section
|
* Used to pass tokens of the remove icon section
|
||||||
*/
|
*/
|
||||||
removeIcon?: {
|
removeIcon?: {
|
||||||
|
/**
|
||||||
|
* Size of remove icon
|
||||||
|
*
|
||||||
|
* @designToken chip.remove.icon.size
|
||||||
|
*/
|
||||||
|
size?: string;
|
||||||
/**
|
/**
|
||||||
* Focus ring of remove icon
|
* Focus ring of remove icon
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue