@bothub-chat/ui
Version:
Bothub UI Components
12 lines (11 loc) • 2 kB
JavaScript
import{styled as e,css as o}from"styled-components";import t from"rc-slider";const r=e.div.withConfig({displayName:"styled__RangeSettingsRoot",componentId:"sc-y5qt0p-0"})(["display:flex;align-items:center;gap:12px;width:100%;box-sizing:border-box;"]),i=e.div.withConfig({displayName:"styled__RangeSettingsTrack",componentId:"sc-y5qt0p-1"})(["flex:1;min-width:0;box-sizing:border-box;"]),a=e(t).withConfig({displayName:"styled__RangeSettingsSlider",componentId:"sc-y5qt0p-2"})(["position:relative;width:100%;height:16px;padding:8px 0;box-sizing:border-box;touch-action:none;&,& *{box-sizing:border-box;}.rc-slider-rail{position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);width:100%;height:16px;border-radius:8px;background:",";}.rc-slider-track{position:absolute;top:50%;transform:translateY(-50%);height:16px;border-radius:16px 0 0 16px;opacity:0.7;background:",";"," ","}.rc-slider-handle{position:absolute;top:50%;z-index:1;border:none;border-radius:50%;width:32px;height:32px;margin-top:-16px;background:",";outline:none;"," "," "," &::before{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);content:attr(aria-valuetext);font-size:10px;line-height:1;font-weight:600;background-image:",";color:transparent;background-clip:text;-webkit-background-clip:text;pointer-events:none;}}"],({theme:e})=>e.colors.grayScale.gray3,({theme:e,$disabled:o})=>o?e.colors.grayScale.gray1:e.colors.gradient.elite,({$disabled:e})=>e&&o`
cursor: not-allowed;
`,({$disabled:e})=>!e&&o`
cursor: pointer;
`,({theme:e,$disabled:o})=>o?e.colors.grayScale.gray1:e.default.colors.base.white,({$disabled:e})=>e&&o`
cursor: not-allowed;
`,({$disabled:e})=>!e&&o`
cursor: pointer;
`,({theme:e})=>"light"===e.mode&&o`
box-shadow: 0px 0px 0px 1px ${e.default.colors.grayScale.gray6};
`,({theme:e,$disabled:o})=>e.default.colors.gradient.enterprise);export{r as RangeSettingsRoot,a as RangeSettingsSlider,i as RangeSettingsTrack};