UNPKG

@useloops/design-system

Version:

The official React based Loops design system

2 lines (1 loc) 1.17 kB
"use strict";var e=require("@mui/material"),i=require("../../BrandCore/primitiveVariables.js"),r=require("./sliderHandle.js"),l=require("./sliderTrack.js"),a=require("./sliderValue.js");const d=e.styled(e.Slider,{shouldForwardProp:e=>!["inputRef","hideMarks","hideMarkLabels"].includes(e)})(({theme:e,value:d,hideMarkLabels:t,hideMarks:s})=>({"&.MuiSlider-root":{width:`calc(100% - ${i.space[400]}px)`,marginLeft:i.space[400]/2,...{...l.sliderTrack(e,d)},...{...r.sliderHandle(e)},...{...a.sliderValue(e)},"&.Mui-disabled":{"& .MuiSlider-rail, & .MuiSlider-track":{backgroundColor:e.custom.palette.icon.secondary},"& .MuiSlider-rail":{backgroundColor:e.custom.palette.icon.disabled},"& .MuiSlider-thumb":{backgroundColor:e.custom.palette.icon.disabled,"& .MuiSlider-valueLabel":{backgroundColor:e.custom.palette.icon.disabled}}},...t&&{".MuiSlider-markLabel":{visibility:"hidden"},".MuiSlider-markLabel:nth-of-type(4), .MuiSlider-markLabel:nth-last-of-type(2)":{visibility:"visible"}},".MuiSlider-mark":{color:e.custom.palette.text.secondary,...s&&{visibility:"hidden"},"&.MuiSlider-markLabelActive":{color:e.custom.palette.text.secondary}}}}));exports.StyledSlider=d;