Add material slider
parent
ef33290079
commit
730687c303
|
@ -4,24 +4,25 @@ export default {
|
||||||
},
|
},
|
||||||
track: {
|
track: {
|
||||||
background: '{content.border.color}',
|
background: '{content.border.color}',
|
||||||
borderRadius: '{content.border.radius}',
|
borderRadius: '{border.radius.xs}',
|
||||||
size: '3px'
|
size: '2px'
|
||||||
},
|
},
|
||||||
range: {
|
range: {
|
||||||
background: '{primary.color}'
|
background: '{primary.color}'
|
||||||
},
|
},
|
||||||
handle: {
|
handle: {
|
||||||
width: '20px',
|
width: '18px',
|
||||||
height: '20px',
|
height: '18px',
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
background: '{content.border.color}',
|
background: '{primary.color}',
|
||||||
hoverBackground: '{content.border.color}',
|
hoverBackground: '{primary.color}',
|
||||||
content: {
|
content: {
|
||||||
borderRadius: '50%',
|
borderRadius: '50%',
|
||||||
hoverBackground: '{content.background}',
|
contentBackground: '{primary.color}',
|
||||||
width: '16px',
|
hoverBackground: '{primary.color}',
|
||||||
height: '16px',
|
width: '18px',
|
||||||
shadow: '0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)'
|
height: '18px',
|
||||||
|
shadow: '0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)'
|
||||||
},
|
},
|
||||||
focusRing: {
|
focusRing: {
|
||||||
width: '{focus.ring.width}',
|
width: '{focus.ring.width}',
|
||||||
|
@ -31,16 +32,18 @@ export default {
|
||||||
shadow: '{focus.ring.shadow}'
|
shadow: '{focus.ring.shadow}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
colorScheme: {
|
style: ({ dt }) => `
|
||||||
light: {
|
.p-slider-handle {
|
||||||
handle: {
|
transition: box-shadow ${dt('slider.transition.duration')};
|
||||||
contentBackground: '{surface.0}'
|
}
|
||||||
}
|
|
||||||
},
|
.p-slider:not(.p-disabled) .p-slider-handle:hover {
|
||||||
dark: {
|
box-shadow: 0 0 1px 10px color-mix(in srgb, ${dt('slider.handle.background')}, transparent 92%);
|
||||||
handle: {
|
}
|
||||||
contentBackground: '{surface.950}'
|
|
||||||
}
|
.p-slider-handle:focus-visible,
|
||||||
}
|
.p-slider:not(.p-disabled) .p-slider-handle:focus:hover {
|
||||||
}
|
box-shadow: 0 0 1px 10px color-mix(in srgb, ${dt('slider.handle.background')}, transparent 84%);
|
||||||
|
}
|
||||||
|
`
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue