Refactored MultiSelect
parent
18283c10fa
commit
feec112a2a
|
@ -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('multiselect.toggle.color')};
|
color: ${dt('multiselect.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')};
|
||||||
|
@ -151,7 +151,7 @@ const theme = ({ dt }) => `
|
||||||
margin: 2px 0;
|
margin: 2px 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
color: ${dt('multiselect.item.color')};
|
color: ${dt('multiselect.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')};
|
||||||
|
@ -166,18 +166,18 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-multiselect-option:not(.p-multiselect-option-selected):not(.p-disabled).p-focus {
|
.p-multiselect-option:not(.p-multiselect-option-selected):not(.p-disabled).p-focus {
|
||||||
background: ${dt('multiselect.item.focus.background')};
|
background: ${dt('multiselect.option.focus.background')};
|
||||||
color: ${dt('multiselect.item.focus.color')};
|
color: ${dt('multiselect.option.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-multiselect-option.p-multiselect-option-selected {
|
.p-multiselect-option.p-multiselect-option-selected {
|
||||||
background: ${dt('multiselect.item.selected.background')};
|
background: ${dt('multiselect.option.selected.background')};
|
||||||
color: ${dt('multiselect.item.selected.color')};
|
color: ${dt('multiselect.option.selected.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-multiselect-option.p-multiselect-option-selected.p-focus {
|
.p-multiselect-option.p-multiselect-option-selected.p-focus {
|
||||||
background: ${dt('multiselect.item.selected.focus.background')};
|
background: ${dt('multiselect.option.selected.focus.background')};
|
||||||
color: ${dt('multiselect.item.selected.focus.color')};
|
color: ${dt('multiselect.option.selected.focus.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-multiselect-option .p-checkbox {
|
.p-multiselect-option .p-checkbox {
|
||||||
|
@ -188,8 +188,8 @@ const theme = ({ dt }) => `
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
color: ${dt('multiselect.item.group.color')};
|
color: ${dt('multiselect.option.group.color')};
|
||||||
background: ${dt('multiselect.item.group.background')};
|
background: ${dt('multiselect.option.group.background')};
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,58 +13,28 @@ 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}'
|
||||||
|
},
|
||||||
|
option: {
|
||||||
|
focusBackground: '{list.option.focus.background}',
|
||||||
|
selectedBackground: '{list.option.selected.background}',
|
||||||
|
selectedFocusBackground: '{list.option.selected.focus.background}',
|
||||||
|
color: '{list.option.color}',
|
||||||
|
focusColor: '{list.option.focus.color}',
|
||||||
|
selectedColor: '{list.option.selected.color}',
|
||||||
|
selectedFocusColor: '{list.option.selected.focus.color}'
|
||||||
|
},
|
||||||
|
optionGroup: {
|
||||||
|
background: '{list.option.group.background}',
|
||||||
|
color: '{list.option.group.color}'
|
||||||
},
|
},
|
||||||
filterIcon: {
|
filterIcon: {
|
||||||
color: '{surface.400}'
|
color: '{form.field.icon.color}'
|
||||||
},
|
|
||||||
itemGroup: {
|
|
||||||
background: '{surface.0}',
|
|
||||||
color: '{surface.500}'
|
|
||||||
},
|
|
||||||
item: {
|
|
||||||
focusBackground: '{surface.100}',
|
|
||||||
selectedBackground: '{highlight.background}',
|
|
||||||
selectedFocusBackground: '{highlight.focus.background}',
|
|
||||||
color: '{surface.700}',
|
|
||||||
focusColor: '{surface.800}',
|
|
||||||
selectedColor: '{highlight.color}',
|
|
||||||
selectedFocusColor: '{highlight.focus.color}'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
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}'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue