Update TreeSelect with new tokens
parent
ab4acd527f
commit
74cad9a4fe
|
@ -11,14 +11,36 @@ 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}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dropdown: {
|
dropdown: {
|
||||||
|
width: '2.5rem',
|
||||||
color: '{form.field.icon.color}'
|
color: '{form.field.icon.color}'
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
background: '{overlay.select.background}',
|
background: '{overlay.select.background}',
|
||||||
borderColor: '{overlay.select.border.color}',
|
borderColor: '{overlay.select.border.color}',
|
||||||
color: '{overlay.select.color}'
|
borderRadius: '{overlay.select.border.radius}',
|
||||||
|
color: '{overlay.select.color}',
|
||||||
|
shadow: '{overlay.select.shadow}'
|
||||||
|
},
|
||||||
|
tree: {
|
||||||
|
padding: '{list.padding}'
|
||||||
|
},
|
||||||
|
emptyMessage: {
|
||||||
|
padding: '{list.option.padding}'
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.sm}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,14 +11,36 @@ 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}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
dropdown: {
|
dropdown: {
|
||||||
|
width: '2.5rem',
|
||||||
color: '{form.field.icon.color}'
|
color: '{form.field.icon.color}'
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
background: '{overlay.select.background}',
|
background: '{overlay.select.background}',
|
||||||
borderColor: '{overlay.select.border.color}',
|
borderColor: '{overlay.select.border.color}',
|
||||||
color: '{overlay.select.color}'
|
borderRadius: '{overlay.select.border.radius}',
|
||||||
|
color: '{overlay.select.color}',
|
||||||
|
shadow: '{overlay.select.shadow}'
|
||||||
|
},
|
||||||
|
tree: {
|
||||||
|
padding: '{list.padding}'
|
||||||
|
},
|
||||||
|
emptyMessage: {
|
||||||
|
padding: '{list.option.padding}'
|
||||||
|
},
|
||||||
|
chip: {
|
||||||
|
borderRadius: '{border.radius.xs}'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,8 +8,8 @@ const theme = ({ dt }) => `
|
||||||
user-select: none;
|
user-select: none;
|
||||||
background: ${dt('treeselect.background')};
|
background: ${dt('treeselect.background')};
|
||||||
border: 1px solid ${dt('treeselect.border.color')};
|
border: 1px solid ${dt('treeselect.border.color')};
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
transition: background ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, outline-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('treeselect.border.radius')};
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
box-shadow: ${dt('treeselect.shadow')};
|
box-shadow: ${dt('treeselect.shadow')};
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,9 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-treeselect:not(.p-disabled).p-focus {
|
.p-treeselect:not(.p-disabled).p-focus {
|
||||||
border-color: ${dt('treeselect.focus.border.color')};
|
border-color: ${dt('treeselect.focus.border.color')};
|
||||||
outline: 0 none;
|
box-shadow: ${dt('treeselect.focus.ring.shadow')};
|
||||||
|
outline: ${dt('treeselect.focus.ring.width')} ${dt('treeselect.focus.ring.style')} ${dt('treeselect.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('treeselect.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-treeselect.p-variant-filled {
|
.p-treeselect.p-variant-filled {
|
||||||
|
@ -47,7 +49,7 @@ const theme = ({ dt }) => `
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: ${dt('treeselect.dropdown.color')};
|
color: ${dt('treeselect.dropdown.color')};
|
||||||
width: 2.5rem;
|
width: ${dt('treeselect.dropdown.width')};
|
||||||
border-top-right-radius: ${dt('border.radius.md')};
|
border-top-right-radius: ${dt('border.radius.md')};
|
||||||
border-bottom-right-radius: ${dt('border.radius.md')};
|
border-bottom-right-radius: ${dt('border.radius.md')};
|
||||||
}
|
}
|
||||||
|
@ -59,12 +61,14 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-treeselect-label {
|
.p-treeselect-label {
|
||||||
display: block;
|
display: flex;
|
||||||
|
align-items-center;
|
||||||
|
gap: calc(${dt('treeselect.padding.y')} / 2);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('treeselect.padding.y')} ${dt('treeselect.padding.x')};
|
||||||
color: ${dt('treeselect.color')};
|
color: ${dt('treeselect.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,10 +80,6 @@ const theme = ({ dt }) => `
|
||||||
color: ${dt('treeselect.disabled.color')};
|
color: ${dt('treeselect.disabled.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-inputwrapper-filled.p-treeselect.p-treeselect-display-chip .p-treeselect-label {
|
|
||||||
padding: 0.25rem 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-treeselect-label-empty {
|
.p-treeselect-label-empty {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@ -96,12 +96,12 @@ const theme = ({ dt }) => `
|
||||||
background: ${dt('treeselect.overlay.background')};
|
background: ${dt('treeselect.overlay.background')};
|
||||||
color: ${dt('treeselect.overlay.color')};
|
color: ${dt('treeselect.overlay.color')};
|
||||||
border: 1px solid ${dt('treeselect.overlay.border.color')};
|
border: 1px solid ${dt('treeselect.overlay.border.color')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('treeselect.overlay.border.radius')};
|
||||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
box-shadow: ${dt('treeselect.overlay.shadow')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-treeselect-empty-message {
|
.p-treeselect-empty-message {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('treeselect.empty.message.padding')};
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,7 +110,17 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-treeselect-overlay .p-tree {
|
.p-treeselect-overlay .p-tree {
|
||||||
padding: 0.25rem 0.25rem;
|
padding: ${dt('treeselect.tree.padding')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-treeselect-label .p-chip {
|
||||||
|
padding-top: calc(${dt('treeselect.padding.y')} / 2);
|
||||||
|
padding-bottom: calc(${dt('treeselect.padding.y')} / 2);
|
||||||
|
border-radius: ${dt('treeselect.chip.border.radius')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.p-treeselect-label:has(.p-chip) {
|
||||||
|
padding: calc(${dt('treeselect.padding.y')} / 2) calc(${dt('treeselect.padding.x')} / 2);
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue