@bothub-chat/ui
Version:
Bothub UI Components
24 lines (23 loc) • 2.87 kB
JavaScript
import{styled as e,css as i}from"styled-components";import t from"react-slider";import{Typography as o}from"../typography/index.js";import{Skeleton as a}from"../skeleton/index.js";import{adaptive as d}from"../../adaptive/index.js";const l=e.div.withConfig({displayName:"styled__RangeFieldStyled",componentId:"sc-1bb2wns-0"})(["display:flex;flex-direction:column;align-items:flex-start;width:100%;"," "," ",""],(({$fullWidth:e})=>!e&&i`
max-width: 240px;
`),(({$disabled:e})=>e&&i`
cursor: not-allowed;
`),(({$disabled:e})=>!e&&i`
cursor: default;
`)),n=e(o).attrs({variant:"input-sm"}).withConfig({displayName:"styled__RangeFieldLabel",componentId:"sc-1bb2wns-1"})(["display:flex;align-items:center;gap:8px;margin-bottom:10px;cursor:inherit;width:100%;"]),s=e.div.withConfig({displayName:"styled__RangeFieldFormattedValue",componentId:"sc-1bb2wns-2"})(["display:flex;align-items:center;gap:8px;padding:14px 16px;border-radius:8px;border:1px solid ",";background:",";font-size:14px;line-height:18px;font-weight:400;width:100%;color:",";margin-bottom:4px;"],(({theme:e})=>e.colors.grayScale.gray2),(({theme:e})=>e.colors.grayScale.gray4),(({theme:e})=>e.colors.base.white)),r=e(t).withConfig({displayName:"styled__RangeFieldRange",componentId:"sc-1bb2wns-3"})(["display:flex;align-items:center;width:100%;height:16px;"]),p=e(a).withConfig({displayName:"styled__RangeFieldSkeleton",componentId:"sc-1bb2wns-4"})(["width:100%;height:16px;"]),c=e.div.withConfig({displayName:"styled__RangeFieldRangeTrack",componentId:"sc-1bb2wns-5"})(["display:flex;height:8px;background:",";border-radius:4px;"," ",""],(({theme:e,$index:i,$disabled:t})=>1===i?e.colors.grayScale.gray3:t?e.colors.grayScale.gray1:e.colors.accent.primary),(({$disabled:e})=>e&&i`
cursor: not-allowed;
`),(({$disabled:e})=>!e&&i`
cursor: pointer;
`)),g=e.span.withConfig({displayName:"styled__RangeFieldRangeThumb",componentId:"sc-1bb2wns-6"})(["display:inline-flex;position:relative;flex-shrink:0;border-radius:50%;background:",";outline:none;"," "," "," ",""],(({theme:e})=>e.default.colors.base.white),(({$disabled:e})=>e&&i`
cursor: not-allowed;
`),(({$disabled:e})=>!e&&i`
cursor: pointer;
`),d({merge:!0,desktop:i`
width: 16px;
height: 16px;
`,tablet:i`
width: 20px;
height: 20px;
`}),(({theme:e})=>"light"===e.mode&&i`
box-shadow: 0px 0px 0px 1px ${e.default.colors.grayScale.gray6};
`)),m=e(o).attrs({variant:"input-sm"}).withConfig({displayName:"styled__RangeFieldErrorText",componentId:"sc-1bb2wns-7"})(["display:inline-flex;margin-top:8px;color:",";"],(({theme:e})=>e.colors.critic));export{m as RangeFieldErrorText,s as RangeFieldFormattedValue,n as RangeFieldLabel,r as RangeFieldRange,g as RangeFieldRangeThumb,c as RangeFieldRangeTrack,p as RangeFieldSkeleton,l as RangeFieldStyled};