Refactored Select
parent
c24c1d0176
commit
18283c10fa
|
@ -54,7 +54,7 @@ const theme = ({ dt }) => `
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: ${dt('select.toggle.color')};
|
color: ${dt('select.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')};
|
||||||
|
@ -141,8 +141,8 @@ input.p-select-label {
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
background: ${dt('select.item.group.background')};
|
background: ${dt('select.option.group.background')};
|
||||||
color: ${dt('select.item.group.color')};
|
color: ${dt('select.option.group.color')};
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ input.p-select-label {
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
color: ${dt('select.item.color')};
|
color: ${dt('select.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')};
|
||||||
|
@ -179,18 +179,18 @@ input.p-select-label {
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {
|
.p-select-option:not(.p-select-option-selected):not(.p-disabled).p-focus {
|
||||||
background: ${dt('select.item.focus.background')};
|
background: ${dt('select.option.focus.background')};
|
||||||
color: ${dt('select.item.focus.color')};
|
color: ${dt('select.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-select-option.p-select-option-selected {
|
.p-select-option.p-select-option-selected {
|
||||||
background: ${dt('select.item.selected.background')};
|
background: ${dt('select.option.selected.background')};
|
||||||
color: ${dt('select.item.selected.color')};
|
color: ${dt('select.option.selected.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-select-option.p-select-option-selected.p-focus {
|
.p-select-option.p-select-option-selected.p-focus {
|
||||||
background: ${dt('select.item.selected.focus.background')};
|
background: ${dt('select.option.selected.focus.background')};
|
||||||
color: ${dt('select.item.selected.focus.color')};
|
color: ${dt('select.option.selected.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-select-option-check-icon {
|
.p-select-option-check-icon {
|
||||||
|
|
|
@ -220,7 +220,7 @@ export default {
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{surface.0}',
|
background: '{surface.0}',
|
||||||
color: '{surface.500}'
|
color: '{text.muted.color}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
navigation: {
|
navigation: {
|
||||||
|
@ -320,7 +320,7 @@ export default {
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{surface.900}',
|
background: '{surface.900}',
|
||||||
color: '{surface.400}'
|
color: '{text.muted.color}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
navigation: {
|
navigation: {
|
||||||
|
|
|
@ -13,64 +13,31 @@ 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: {
|
||||||
},
|
background: '{overlay.select.background}',
|
||||||
overlay: {
|
borderColor: '{overlay.select.border.color}',
|
||||||
background: '{surface.0}',
|
color: '{overlay.select.color}'
|
||||||
borderColor: '{surface.200}',
|
},
|
||||||
color: '{surface.700}'
|
option: {
|
||||||
},
|
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}'
|
checkmark: {
|
||||||
},
|
color: '{list.option.color}'
|
||||||
checkmark: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dark: {
|
|
||||||
toggle: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
},
|
|
||||||
overlay: {
|
|
||||||
background: '{surface.900}',
|
|
||||||
borderColor: '{surface.700}',
|
|
||||||
color: '{surface.0}'
|
|
||||||
},
|
|
||||||
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}'
|
|
||||||
},
|
|
||||||
checkmark: {
|
|
||||||
color: '{surface.400}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue