Refactored Listbox tokens
parent
ba927cbb8e
commit
0462b8a678
|
@ -68,7 +68,7 @@ const theme = ({ dt }) => `
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
border-radius: ${dt('rounded.sm')};
|
border-radius: ${dt('rounded.sm')};
|
||||||
color: ${dt('listbox.item.color')};
|
color: ${dt('listbox.option.color')};
|
||||||
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')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,31 +81,31 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected {
|
.p-listbox .p-listbox-list .p-listbox-option.p-listbox-option-selected {
|
||||||
background: ${dt('listbox.item.selected.background')};
|
background: ${dt('listbox.option.selected.background')};
|
||||||
color: ${dt('listbox.item.selected.color')};
|
color: ${dt('listbox.option.selected.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus {
|
.p-listbox:not(.p-disabled) .p-listbox-option.p-listbox-option-selected.p-focus {
|
||||||
background: ${dt('listbox.item.selected.focus.background')};
|
background: ${dt('listbox.option.selected.focus.background')};
|
||||||
color: ${dt('listbox.item.selected.focus.color')};
|
color: ${dt('listbox.option.selected.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus {
|
.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled).p-focus {
|
||||||
background: ${dt('listbox.item.focus.background')};
|
background: ${dt('listbox.option.focus.background')};
|
||||||
color: ${dt('listbox.item.focus.color')};
|
color: ${dt('listbox.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover {
|
.p-listbox:not(.p-disabled) .p-listbox-option:not(.p-listbox-option-selected):not(.p-disabled):hover {
|
||||||
background: ${dt('listbox.item.focus.background')};
|
background: ${dt('listbox.option.focus.background')};
|
||||||
color: ${dt('listbox.item.focus.color')};
|
color: ${dt('listbox.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-option-group {
|
.p-listbox-option-group {
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
color: ${dt('listbox.item.group.color')};
|
color: ${dt('listbox.option.group.color')};
|
||||||
background: ${dt('listbox.item.group.background')};
|
background: ${dt('listbox.option.group.background')};
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,42 +10,20 @@ export default {
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
boxShadow: '{form.field.box.shadow}'
|
boxShadow: '{form.field.box.shadow}'
|
||||||
},
|
},
|
||||||
colorScheme: {
|
option: {
|
||||||
light: {
|
focusBackground: '{list.option.focus.background}',
|
||||||
filterIcon: {
|
selectedBackground: '{list.option.selected.background}',
|
||||||
color: '{surface.400}'
|
selectedFocusBackground: '{list.option.selected.focus.background}',
|
||||||
},
|
color: '{list.option.color}',
|
||||||
itemGroup: {
|
focusColor: '{list.option.focus.color}',
|
||||||
background: '{surface.0}',
|
selectedColor: '{list.option.selected.color}',
|
||||||
color: '{surface.500}'
|
selectedFocusColor: '{list.option.selected.focus.color}'
|
||||||
},
|
},
|
||||||
item: {
|
optionGroup: {
|
||||||
focusBackground: '{surface.100}',
|
background: '{list.option.group.background}',
|
||||||
selectedBackground: '{highlight.background}',
|
color: '{list.option.group.color}'
|
||||||
selectedFocusBackground: '{highlight.focus.background}',
|
},
|
||||||
color: '{surface.700}',
|
filterIcon: {
|
||||||
focusColor: '{surface.800}',
|
color: '{form.field.icon.color}'
|
||||||
selectedColor: '{highlight.color}',
|
|
||||||
selectedFocusColor: '{highlight.focus.color}'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
filterIcon: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
},
|
|
||||||
itemGroup: {
|
|
||||||
background: '{surface.900}',
|
|
||||||
color: '{surface.400}'
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
focusBackground: '{surface.800}',
|
|
||||||
selectedBackground: '{highlight.background}',
|
|
||||||
selectedFocusBackground: '{highlight.focus.background}',
|
|
||||||
color: '{surface.0}',
|
|
||||||
focusColor: '{surface.0}',
|
|
||||||
selectedColor: '{highlight.color}',
|
|
||||||
selectedFocusColor: '{highlight.focus.color}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue