New tokens for input chips
parent
b8f400ac05
commit
4c0c3b8140
|
@ -180,7 +180,7 @@ const theme = ({ dt }) => `
|
||||||
.p-autocomplete-input-multiple .p-chip {
|
.p-autocomplete-input-multiple .p-chip {
|
||||||
padding-top: calc(${dt('autocomplete.padding.y')} / 2);
|
padding-top: calc(${dt('autocomplete.padding.y')} / 2);
|
||||||
padding-bottom: calc(${dt('autocomplete.padding.y')} / 2);
|
padding-bottom: calc(${dt('autocomplete.padding.y')} / 2);
|
||||||
border-radius: calc(${dt('autocomplete.border.radius')} - calc(${dt('autocomplete.padding.y')} / 2));
|
border-radius: ${dt('autocomplete.chip.border.radius')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-autocomplete-input-multiple:has(.p-chip) {
|
.p-autocomplete-input-multiple:has(.p-chip) {
|
||||||
|
|
|
@ -7,21 +7,20 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-inputchips-input {
|
.p-inputchips-input {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
cursor: text;
|
cursor: text;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: 0.25rem 0.25rem;
|
padding: calc(${dt('inputchips.padding.y')} / 2) ${dt('inputchips.padding.x')};
|
||||||
gap: 0.25rem;
|
gap: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
color: ${dt('inputchips.color')};
|
color: ${dt('inputchips.color')};
|
||||||
background: ${dt('inputchips.background')};
|
background: ${dt('inputchips.background')};
|
||||||
border: 1px solid ${dt('inputchips.border.color')};
|
border: 1px solid ${dt('inputchips.border.color')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('inputchips.border.radius')};
|
||||||
width: 100%;
|
width: 100%;
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')};
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
box-shadow: ${dt('inputchips.shadow')};
|
box-shadow: ${dt('inputchips.shadow')};
|
||||||
}
|
}
|
||||||
|
@ -32,7 +31,9 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-inputchips:not(.p-disabled).p-focus .p-inputchips-input {
|
.p-inputchips:not(.p-disabled).p-focus .p-inputchips-input {
|
||||||
border-color: ${dt('inputchips.focus.border.color')};
|
border-color: ${dt('inputchips.focus.border.color')};
|
||||||
outline: 0 none;
|
box-shadow: ${dt('inputchips.focus.ring.shadow')};
|
||||||
|
outline: ${dt('inputchips.focus.ring.width')} ${dt('inputchips.focus.ring.style')} ${dt('inputchips.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('inputchips.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-inputchips.p-invalid .p-inputchips-input {
|
.p-inputchips.p-invalid .p-inputchips-input {
|
||||||
|
@ -53,11 +54,22 @@ const theme = ({ dt }) => `
|
||||||
color: ${dt('inputchips.disabled.color')};
|
color: ${dt('inputchips.disabled.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-inputchips .p-chip {
|
||||||
|
padding-top: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
|
padding-bottom: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
|
border-radius: ${dt('inputchips.chip.border.radius')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-inputchips-input:has(.p-chip) {
|
||||||
|
padding-left: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
|
padding-right: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
|
}
|
||||||
|
|
||||||
.p-inputchips-input-item {
|
.p-inputchips-input-item {
|
||||||
padding: 0.25rem 0;
|
|
||||||
margin-left: 0.5rem;
|
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
|
padding-top: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
|
padding-bottom: calc(${dt('inputchips.padding.y')} / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-inputchips-input-item input {
|
.p-inputchips-input-item input {
|
||||||
|
|
|
@ -61,5 +61,8 @@ export default {
|
||||||
color: '{button.secondary.color}',
|
color: '{button.secondary.color}',
|
||||||
hoverColor: '{button.secondary.hover.color}',
|
hoverColor: '{button.secondary.hover.color}',
|
||||||
activeColor: '{button.secondary.active.color}'
|
activeColor: '{button.secondary.active.color}'
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.sm}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,6 +88,7 @@ export default {
|
||||||
primitive: {
|
primitive: {
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
none: '0',
|
none: '0',
|
||||||
|
xs: '2px',
|
||||||
sm: '4px',
|
sm: '4px',
|
||||||
md: '6px',
|
md: '6px',
|
||||||
lg: '8px',
|
lg: '8px',
|
||||||
|
|
|
@ -11,6 +11,19 @@ export default {
|
||||||
color: '{form.field.color}',
|
color: '{form.field.color}',
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}'
|
shadow: '{form.field.shadow}',
|
||||||
|
paddingX: '{form.field.padding.x}',
|
||||||
|
paddingY: '{form.field.padding.y}',
|
||||||
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.sm}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default {
|
||||||
selectedColor: '{list.option.selected.color}',
|
selectedColor: '{list.option.selected.color}',
|
||||||
selectedFocusColor: '{list.option.selected.focus.color}',
|
selectedFocusColor: '{list.option.selected.focus.color}',
|
||||||
padding: '{list.option.padding}',
|
padding: '{list.option.padding}',
|
||||||
borderRadius: '{list.option.border.radius}',
|
borderRadius: '{list.option.border.radius}'
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{list.option.group.background}',
|
background: '{list.option.group.background}',
|
||||||
|
@ -61,5 +61,8 @@ export default {
|
||||||
color: '{button.secondary.color}',
|
color: '{button.secondary.color}',
|
||||||
hoverColor: '{button.secondary.hover.color}',
|
hoverColor: '{button.secondary.hover.color}',
|
||||||
activeColor: '{button.secondary.active.color}'
|
activeColor: '{button.secondary.active.color}'
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.xs}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -88,6 +88,7 @@ export default {
|
||||||
primitive: {
|
primitive: {
|
||||||
borderRadius: {
|
borderRadius: {
|
||||||
none: '0',
|
none: '0',
|
||||||
|
xs: '2px',
|
||||||
sm: '4px',
|
sm: '4px',
|
||||||
md: '6px',
|
md: '6px',
|
||||||
lg: '8px',
|
lg: '8px',
|
||||||
|
|
|
@ -11,6 +11,19 @@ export default {
|
||||||
color: '{form.field.color}',
|
color: '{form.field.color}',
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
shadow: '{form.field.shadow}'
|
shadow: '{form.field.shadow}',
|
||||||
|
paddingX: '{form.field.padding.x}',
|
||||||
|
paddingY: '{form.field.padding.y}',
|
||||||
|
borderRadius: '{form.field.border.radius}',
|
||||||
|
focusRing: {
|
||||||
|
width: '{form.field.focus.ring.width}',
|
||||||
|
style: '{form.field.focus.ring.style}',
|
||||||
|
color: '{form.field.focus.ring.color}',
|
||||||
|
offset: '{form.field.focus.ring.offset}',
|
||||||
|
shadow: '{form.field.focus.ring.shadow}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.xs}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue