Tokens for Chip
parent
62946a081d
commit
6b84e29b96
|
@ -6,37 +6,38 @@ const theme = ({ dt }) => `
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${dt('chip.background')};
|
background: ${dt('chip.background')};
|
||||||
color: ${dt('chip.color')};
|
color: ${dt('chip.color')};
|
||||||
border-radius: 16px;
|
border-radius: ${dt('chip.border.radius')};
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('chip.padding.y')} ${dt('chip.padding.x')};
|
||||||
}
|
gap: ${dt('chip.gap')};
|
||||||
|
|
||||||
.p-chip-icon {
|
|
||||||
margin-right: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-chip-image {
|
.p-chip-image {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
width: 2rem;
|
width: ${dt('chip.image.width')};
|
||||||
height: 2rem;
|
height: ${dt('chip.image.height')};
|
||||||
margin-left: -0.5rem;
|
margin-left: calc(-1 * ${dt('chip.padding.y')});
|
||||||
margin-right: 0.5rem;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-chip:has(.p-chip-remove-icon) {
|
.p-chip:has(.p-chip-remove-icon) {
|
||||||
padding-right: 0.5rem;
|
padding-right: ${dt('chip.padding.y')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-chip:has(.p-chip-image) {
|
||||||
|
padding-top: calc(${dt('chip.padding.y')} / 2);
|
||||||
|
padding-bottom: calc(${dt('chip.padding.y')} / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-chip-remove-icon {
|
.p-chip-remove-icon {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin-left: 0.375rem;
|
border-radius: ${dt('chip.remove.icon.border.radius')};
|
||||||
border-radius: 6px;
|
transition: outline-color ${dt('transition.duration')}, box-shadow-color ${dt('transition.duration')};
|
||||||
transition: outline-color ${dt('transition.duration')};
|
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-chip-remove-icon:focus-visible {
|
.p-chip-remove-icon:focus-visible {
|
||||||
outline: ${dt('focus.ring.width')} ${dt('focus.ring.style')} ${dt('focus.ring.color')};
|
box-shadow: ${dt('chip.remove.icon.focus.ring.shadow')};
|
||||||
outline-offset: ${dt('focus.ring.offset')};
|
outline: ${dt('chip.remove.icon.focus.ring.width')} ${dt('chip.remove.icon.focus.ring.style')} ${dt('chip.remove.icon.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('chip.remove.icon.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
export default {
|
export default {
|
||||||
|
root: {
|
||||||
|
borderRadius: '16px',
|
||||||
|
paddingX: '0.75rem',
|
||||||
|
paddingY: '0.5rem',
|
||||||
|
gap: '0.5rem'
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
width: '2rem',
|
||||||
|
height: '2rem'
|
||||||
|
},
|
||||||
|
removeIcon: {
|
||||||
|
borderRadius: '{content.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{focus.ring.width}',
|
||||||
|
style: '{focus.ring.style}',
|
||||||
|
color: '{focus.ring.color}',
|
||||||
|
offset: '{focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
|
},
|
||||||
colorScheme: {
|
colorScheme: {
|
||||||
light: {
|
light: {
|
||||||
root: {
|
root: {
|
||||||
|
|
|
@ -1,4 +1,24 @@
|
||||||
export default {
|
export default {
|
||||||
|
root: {
|
||||||
|
borderRadius: '16px',
|
||||||
|
paddingX: '0.875rem',
|
||||||
|
paddingY: '0.625rem',
|
||||||
|
gap: '0.5rem'
|
||||||
|
},
|
||||||
|
image: {
|
||||||
|
width: '2rem',
|
||||||
|
height: '2rem'
|
||||||
|
},
|
||||||
|
removeIcon: {
|
||||||
|
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}'
|
||||||
|
}
|
||||||
|
},
|
||||||
colorScheme: {
|
colorScheme: {
|
||||||
light: {
|
light: {
|
||||||
root: {
|
root: {
|
||||||
|
|
Loading…
Reference in New Issue