Refactored cascadeselect tokens
parent
21b27cf96b
commit
17d2ecb665
|
@ -46,7 +46,7 @@ const theme = ({ dt }) => `
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: ${dt('cascadeselect.toggle.color')};
|
color: ${dt('cascadeselect.dropdown.color')};
|
||||||
width: 2.5rem;
|
width: 2.5rem;
|
||||||
border-top-right-radius: ${dt('rounded.base')};
|
border-top-right-radius: ${dt('rounded.base')};
|
||||||
border-bottom-right-radius: ${dt('rounded.base')};
|
border-bottom-right-radius: ${dt('rounded.base')};
|
||||||
|
@ -94,10 +94,10 @@ const theme = ({ dt }) => `
|
||||||
|
|
||||||
.p-cascadeselect-overlay {
|
.p-cascadeselect-overlay {
|
||||||
background: ${dt('cascadeselect.overlay.background')};
|
background: ${dt('cascadeselect.overlay.background')};
|
||||||
color: ${dt('cascadeselect.overlay.color')};
|
|
||||||
border: 1px solid ${dt('cascadeselect.overlay.border.color')};
|
border: 1px solid ${dt('cascadeselect.overlay.border.color')};
|
||||||
border-radius: ${dt('rounded.base')};
|
border-radius: ${dt('rounded.base')};
|
||||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
|
||||||
|
color: ${dt('cascadeselect.overlay.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect .p-cascadeselect-overlay {
|
.p-cascadeselect .p-cascadeselect-overlay {
|
||||||
|
@ -105,16 +105,15 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item-list {
|
.p-cascadeselect-item-list {
|
||||||
position: absolute;
|
|
||||||
min-width: 100%;
|
|
||||||
z-index: 1;
|
|
||||||
display: none;
|
display: none;
|
||||||
|
min-width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-list {
|
.p-cascadeselect-list {
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
|
margin: 0;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
padding: 0.25rem 0.25rem;
|
padding: 0.25rem 0.25rem;
|
||||||
}
|
}
|
||||||
|
@ -125,7 +124,7 @@ const theme = ({ dt }) => `
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
color: ${dt('cascadeselect.item.color')};
|
color: ${dt('cascadeselect.option.color')};
|
||||||
background: transparent;
|
background: transparent;
|
||||||
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
transition: background-color ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||||
border-radius: ${dt('rounded.sm')};
|
border-radius: ${dt('rounded.sm')};
|
||||||
|
@ -140,28 +139,28 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus {
|
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus {
|
||||||
background: ${dt('cascadeselect.item.focus.background')};
|
background: ${dt('cascadeselect.option.focus.background')};
|
||||||
color: ${dt('cascadeselect.item.focus.color')};
|
color: ${dt('cascadeselect.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus .p-cascadeselect-group-icon {
|
.p-cascadeselect-item:not(.p-cascadeselect-item-selected):not(.p-disabled).p-focus .p-cascadeselect-group-icon {
|
||||||
color: ${dt('cascadeselect.item.icon.focus.color')};
|
color: ${dt('cascadeselect.option.icon.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item-selected {
|
.p-cascadeselect-item-selected {
|
||||||
background: ${dt('cascadeselect.item.selected.background')};
|
background: ${dt('cascadeselect.option.selected.background')};
|
||||||
color: ${dt('cascadeselect.item.selected.color')};
|
color: ${dt('cascadeselect.option.selected.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item-selected.p-focus {
|
.p-cascadeselect-item-selected.p-focus {
|
||||||
background: ${dt('cascadeselect.item.selected.focus.background')};
|
background: ${dt('cascadeselect.option.selected.focus.background')};
|
||||||
color: ${dt('cascadeselect.item.selected.focus.color')};
|
color: ${dt('cascadeselect.option.selected.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item-active {
|
.p-cascadeselect-item-active {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
background: ${dt('cascadeselect.item.focus.background')};
|
background: ${dt('cascadeselect.option.focus.background')};
|
||||||
color: ${dt('cascadeselect.item.focus.color')};
|
color: ${dt('cascadeselect.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-cascadeselect-item-active > .p-cascadeselect-item-list {
|
.p-cascadeselect-item-active > .p-cascadeselect-item-list {
|
||||||
|
@ -181,7 +180,7 @@ const theme = ({ dt }) => `
|
||||||
.p-cascadeselect-group-icon {
|
.p-cascadeselect-group-icon {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
color: ${dt('cascadeselect.item.icon.color')};
|
color: ${dt('cascadeselect.option.icon.color')};
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -13,52 +13,25 @@ export default {
|
||||||
placeholderColor: '{form.field.placeholder.color}',
|
placeholderColor: '{form.field.placeholder.color}',
|
||||||
boxShadow: '{form.field.box.shadow}'
|
boxShadow: '{form.field.box.shadow}'
|
||||||
},
|
},
|
||||||
colorScheme: {
|
dropdown: {
|
||||||
light: {
|
color: '{form.field.icon.color}'
|
||||||
toggle: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
},
|
},
|
||||||
overlay: {
|
overlay: {
|
||||||
background: '{surface.0}',
|
background: '{overlay.select.background}',
|
||||||
borderColor: '{surface.200}',
|
borderColor: '{overlay.select.border.color}',
|
||||||
color: '{surface.700}'
|
color: '{overlay.select.color}'
|
||||||
},
|
},
|
||||||
item: {
|
option: {
|
||||||
focusBackground: '{surface.100}',
|
focusBackground: '{list.option.focus.background}',
|
||||||
selectedBackground: '{highlight.background}',
|
selectedBackground: '{list.option.selected.background}',
|
||||||
selectedFocusBackground: '{highlight.focus.background}',
|
selectedFocusBackground: '{list.option.selected.focus.background}',
|
||||||
color: '{surface.700}',
|
color: '{list.option.color}',
|
||||||
focusColor: '{surface.800}',
|
focusColor: '{list.option.focus.color}',
|
||||||
selectedColor: '{highlight.color}',
|
selectedColor: '{list.option.selected.color}',
|
||||||
selectedFocusColor: '{highlight.focus.color}',
|
selectedFocusColor: '{list.option.selected.focus.color}',
|
||||||
icon: {
|
icon: {
|
||||||
color: '{surface.400}',
|
color: '{list.option.icon.color}',
|
||||||
focusColor: '{surface.500}'
|
focusColor: '{list.option.icon.focus.color}',
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
toggle: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
},
|
|
||||||
overlay: {
|
|
||||||
background: '{surface.900}',
|
|
||||||
borderColor: '{surface.700}',
|
|
||||||
color: '{surface.0}'
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
focusBackground: '{surface.800}',
|
|
||||||
selectedBackground: '{highlight.background}',
|
|
||||||
selectedFocusBackground: '{highlight.focus.background}',
|
|
||||||
color: '{surface.0}',
|
|
||||||
focusColor: '{surface.0}',
|
|
||||||
selectedColor: '{highlight.color}',
|
|
||||||
selectedFocusColor: '{highlight.focus.color}',
|
|
||||||
icon: {
|
|
||||||
color: '{surface.500}',
|
|
||||||
focusColor: '{surface.400}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -181,6 +181,7 @@ export default {
|
||||||
floatLabelColor: '{surface.500}',
|
floatLabelColor: '{surface.500}',
|
||||||
floatLabelFocusColor: '{surface.500}',
|
floatLabelFocusColor: '{surface.500}',
|
||||||
floatLabelInvalidColor: '{red.400}',
|
floatLabelInvalidColor: '{red.400}',
|
||||||
|
iconColor: '{surface.400}',
|
||||||
boxShadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
boxShadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
|
@ -211,7 +212,11 @@ export default {
|
||||||
color: '{text.color}',
|
color: '{text.color}',
|
||||||
focusColor: '{text.hover.color}',
|
focusColor: '{text.hover.color}',
|
||||||
selectedColor: '{highlight.color}',
|
selectedColor: '{highlight.color}',
|
||||||
selectedFocusColor: '{highlight.focus.color}'
|
selectedFocusColor: '{highlight.focus.color}',
|
||||||
|
icon: {
|
||||||
|
color: '{surface.400}',
|
||||||
|
focusColor: '{surface.500}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{surface.0}',
|
background: '{surface.0}',
|
||||||
|
@ -276,6 +281,7 @@ export default {
|
||||||
floatLabelColor: '{surface.400}',
|
floatLabelColor: '{surface.400}',
|
||||||
floatLabelFocusColor: '{surface.400}',
|
floatLabelFocusColor: '{surface.400}',
|
||||||
floatLabelInvalidColor: '{red.300}',
|
floatLabelInvalidColor: '{red.300}',
|
||||||
|
iconColor: '{surface.400}',
|
||||||
boxShadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
boxShadow: '0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)'
|
||||||
},
|
},
|
||||||
text: {
|
text: {
|
||||||
|
@ -306,7 +312,11 @@ export default {
|
||||||
color: '{text.color}',
|
color: '{text.color}',
|
||||||
focusColor: '{text.hover.color}',
|
focusColor: '{text.hover.color}',
|
||||||
selectedColor: '{highlight.color}',
|
selectedColor: '{highlight.color}',
|
||||||
selectedFocusColor: '{highlight.focus.color}'
|
selectedFocusColor: '{highlight.focus.color}',
|
||||||
|
icon: {
|
||||||
|
color: '{surface.500}',
|
||||||
|
focusColor: '{surface.400}'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{surface.900}',
|
background: '{surface.900}',
|
||||||
|
|
Loading…
Reference in New Issue