Updated listbox tokens
parent
76620c7c07
commit
bbce9d4d8a
|
@ -5,15 +5,17 @@ const theme = ({ dt }) => `
|
||||||
background: ${dt('listbox.background')};
|
background: ${dt('listbox.background')};
|
||||||
color: ${dt('listbox.color')};
|
color: ${dt('listbox.color')};
|
||||||
border: 1px solid ${dt('listbox.border.color')};
|
border: 1px solid ${dt('listbox.border.color')};
|
||||||
border-radius: ${dt('border.radius.md')};
|
border-radius: ${dt('listbox.border.radius')};
|
||||||
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 ${dt('transition.duration')}, color ${dt('transition.duration')}, border-color ${dt('transition.duration')}, box-shadow ${dt('transition.duration')}, outline-color ${dt('transition.duration')};
|
||||||
outline-color: transparent;
|
outline-color: transparent;
|
||||||
box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05);
|
box-shadow: ${dt('listbox.shadow')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox.p-focus {
|
.p-listbox.p-focus {
|
||||||
outline: 0 none;
|
|
||||||
border-color: ${dt('listbox.focus.border.color')};
|
border-color: ${dt('listbox.focus.border.color')};
|
||||||
|
box-shadow: ${dt('listbox.focus.ring.shadow')};
|
||||||
|
outline: ${dt('listbox.focus.ring.width')} ${dt('listbox.focus.ring.style')} ${dt('listbox.focus.ring.color')};
|
||||||
|
outline-offset: ${dt('listbox.focus.ring.offset')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox.p-disabled {
|
.p-listbox.p-disabled {
|
||||||
|
@ -26,10 +28,8 @@ const theme = ({ dt }) => `
|
||||||
border-color: ${dt('listbox.invalid.border.color')};
|
border-color: ${dt('listbox.invalid.border.color')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox .p-listbox-header {
|
.p-listbox-header {
|
||||||
padding: 0.5rem 0.5rem 0 0.5rem;
|
padding: ${dt('listbox.header.padding')};
|
||||||
border-bottom: 0 none;
|
|
||||||
margin: 0 0 0 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-filter-container {
|
.p-listbox-filter-container {
|
||||||
|
@ -56,30 +56,24 @@ const theme = ({ dt }) => `
|
||||||
.p-listbox-list {
|
.p-listbox-list {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.25rem 0.25rem;
|
padding: ${dt('listbox.list.padding')};
|
||||||
outline: 0 none;
|
outline: 0 none;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: ${dt('listbox.list.gap')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-option {
|
.p-listbox-option {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 2px 0;
|
padding: ${dt('listbox.option.padding')};
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
border: 0 none;
|
border: 0 none;
|
||||||
border-radius: ${dt('border.radius.sm')};
|
border-radius: ${dt('listbox.option.border.radius')};
|
||||||
color: ${dt('listbox.option.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')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-option:first-child {
|
|
||||||
margin-top: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.p-listbox-option:last-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.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.option.selected.background')};
|
background: ${dt('listbox.option.selected.background')};
|
||||||
color: ${dt('listbox.option.selected.color')};
|
color: ${dt('listbox.option.selected.color')};
|
||||||
|
@ -101,17 +95,15 @@ const theme = ({ dt }) => `
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-option-group {
|
.p-listbox-option-group {
|
||||||
cursor: auto;
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('listbox.option.group.padding')};
|
||||||
color: ${dt('listbox.option.group.color')};
|
color: ${dt('listbox.option.group.color')};
|
||||||
background: ${dt('listbox.option.group.background')};
|
background: ${dt('listbox.option.group.background')};
|
||||||
font-weight: 600;
|
font-weight: ${dt('listbox.option.group.font.weight')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.p-listbox-empty-message {
|
.p-listbox-empty-message {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: ${dt('listbox.option.padding')};
|
||||||
background: transparent;
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,9 @@ export default {
|
||||||
list: {
|
list: {
|
||||||
padding: '0.25rem 0.25rem',
|
padding: '0.25rem 0.25rem',
|
||||||
gap: '2px',
|
gap: '2px',
|
||||||
|
header: {
|
||||||
|
padding: '0.5rem 0.75rem 0 0.75rem'
|
||||||
|
},
|
||||||
option: {
|
option: {
|
||||||
padding: '0.5rem 0.75rem',
|
padding: '0.5rem 0.75rem',
|
||||||
borderRadius: '4px'
|
borderRadius: '4px'
|
||||||
|
|
|
@ -8,7 +8,22 @@ export default {
|
||||||
invalidBorderColor: '{form.field.invalid.border.color}',
|
invalidBorderColor: '{form.field.invalid.border.color}',
|
||||||
color: '{form.field.color}',
|
color: '{form.field.color}',
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
shadow: '{form.field.shadow}'
|
shadow: '{form.field.shadow}',
|
||||||
|
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}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
padding: '{list.padding}',
|
||||||
|
gap: '{list.gap}'
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
padding: '0.5rem 0.5rem 0 0.5rem'
|
||||||
},
|
},
|
||||||
option: {
|
option: {
|
||||||
focusBackground: '{list.option.focus.background}',
|
focusBackground: '{list.option.focus.background}',
|
||||||
|
@ -17,11 +32,15 @@ export default {
|
||||||
color: '{list.option.color}',
|
color: '{list.option.color}',
|
||||||
focusColor: '{list.option.focus.color}',
|
focusColor: '{list.option.focus.color}',
|
||||||
selectedColor: '{list.option.selected.color}',
|
selectedColor: '{list.option.selected.color}',
|
||||||
selectedFocusColor: '{list.option.selected.focus.color}'
|
selectedFocusColor: '{list.option.selected.focus.color}',
|
||||||
|
padding: '{list.option.padding}',
|
||||||
|
borderRadius: '{list.option.border.radius}'
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{list.option.group.background}',
|
background: '{list.option.group.background}',
|
||||||
color: '{list.option.group.color}'
|
color: '{list.option.group.color}',
|
||||||
|
fontWeight: '{list.option.group.font.weight}',
|
||||||
|
padding: '{list.option.group.padding}'
|
||||||
},
|
},
|
||||||
filterIcon: {
|
filterIcon: {
|
||||||
color: '{form.field.icon.color}'
|
color: '{form.field.icon.color}'
|
||||||
|
|
|
@ -154,12 +154,15 @@ export default {
|
||||||
list: {
|
list: {
|
||||||
padding: '0.5rem 0',
|
padding: '0.5rem 0',
|
||||||
gap: '0',
|
gap: '0',
|
||||||
|
header: {
|
||||||
|
padding: '0.625rem 1rem 0 1rem'
|
||||||
|
},
|
||||||
option: {
|
option: {
|
||||||
padding: '0.625rem 0.75rem',
|
padding: '0.625rem 1rem',
|
||||||
borderRadius: '0'
|
borderRadius: '0'
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
padding: '0.625rem 0.75rem',
|
padding: '0.625rem 1rem',
|
||||||
fontWeight: '600'
|
fontWeight: '600'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,7 +8,22 @@ export default {
|
||||||
invalidBorderColor: '{form.field.invalid.border.color}',
|
invalidBorderColor: '{form.field.invalid.border.color}',
|
||||||
color: '{form.field.color}',
|
color: '{form.field.color}',
|
||||||
disabledColor: '{form.field.disabled.color}',
|
disabledColor: '{form.field.disabled.color}',
|
||||||
shadow: '{form.field.shadow}'
|
shadow: '{form.field.shadow}',
|
||||||
|
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}'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
list: {
|
||||||
|
padding: '{list.padding}',
|
||||||
|
gap: '{list.gap}'
|
||||||
|
},
|
||||||
|
header: {
|
||||||
|
padding: '{list.header.padding}'
|
||||||
},
|
},
|
||||||
option: {
|
option: {
|
||||||
focusBackground: '{list.option.focus.background}',
|
focusBackground: '{list.option.focus.background}',
|
||||||
|
@ -17,11 +32,15 @@ export default {
|
||||||
color: '{list.option.color}',
|
color: '{list.option.color}',
|
||||||
focusColor: '{list.option.focus.color}',
|
focusColor: '{list.option.focus.color}',
|
||||||
selectedColor: '{list.option.selected.color}',
|
selectedColor: '{list.option.selected.color}',
|
||||||
selectedFocusColor: '{list.option.selected.focus.color}'
|
selectedFocusColor: '{list.option.selected.focus.color}',
|
||||||
|
padding: '{list.option.padding}',
|
||||||
|
borderRadius: '{list.option.border.radius}'
|
||||||
},
|
},
|
||||||
optionGroup: {
|
optionGroup: {
|
||||||
background: '{list.option.group.background}',
|
background: '{list.option.group.background}',
|
||||||
color: '{list.option.group.color}'
|
color: '{list.option.group.color}',
|
||||||
|
fontWeight: '{list.option.group.font.weight}',
|
||||||
|
padding: '{list.option.group.padding}'
|
||||||
},
|
},
|
||||||
filterIcon: {
|
filterIcon: {
|
||||||
color: '{form.field.icon.color}'
|
color: '{form.field.icon.color}'
|
||||||
|
|
Loading…
Reference in New Issue