{"version":3,"file":"Slider.js","names":["UiSlider","Slider"],"sources":["jsx/components/Slider.js"],"sourcesContent":["import {\n  createRefComponent,\n  createStyledContext,\n  styled,\n  withStaticProperties\n} from \"@tamagui/core\";\nimport { Slider as UiSlider } from \"@tamagui/slider\";\nimport { jsx } from \"react/jsx-runtime\";\nconst SliderSizeContext = createStyledContext({ size: \"md\", orientation: \"horizontal\" });\nconst resolveSliderSize = (size) => typeof size === \"string\" && size in sliderThumbSize ? size : \"md\";\nconst sliderThumbSize = {\n  xs: { width: 16, height: 16, minWidth: 16, minHeight: 16 },\n  sm: { width: 20, height: 20, minWidth: 20, minHeight: 20 },\n  md: { width: 20, height: 20, minWidth: 20, minHeight: 20 },\n  lg: { width: 24, height: 24, minWidth: 24, minHeight: 24 },\n  xl: { width: 28, height: 28, minWidth: 28, minHeight: 28 }\n};\nconst sliderTrackSize = {\n  xs: 4,\n  sm: 5,\n  md: 6,\n  lg: 7,\n  xl: 8\n};\nconst SliderTrackFrame = styled(UiSlider.Track, {\n  displayName: \"SliderTrack\",\n  context: SliderSizeContext,\n  backgroundColor: \"background-press\",\n  borderRadius: 1e5\n}).resolve((props) => {\n  const size = props.size;\n  if (size == null || size === false) return;\n  const thickness = sliderTrackSize[resolveSliderSize(size)];\n  if (props.orientation === \"vertical\") {\n    return {\n      width: thickness,\n      borderRadius: thickness\n    };\n  }\n  return {\n    height: thickness,\n    borderRadius: thickness\n  };\n});\nconst SliderTrack = SliderTrackFrame;\nconst SliderActiveFrame = styled(UiSlider.TrackActive, {\n  displayName: \"SliderTrackActive\",\n  backgroundColor: \"color\",\n  borderRadius: 1e5\n});\nconst SliderActive = SliderActiveFrame;\nconst SliderThumbFrame = styled(UiSlider.Thumb, {\n  displayName: \"SliderThumb\",\n  context: SliderSizeContext,\n  borderWidth: 2,\n  borderColor: \"border-color hover:border-color-hover press:border-color-press\",\n  backgroundColor: \"background hover:background-hover press:background-press\",\n  outlineStyle: \"focus-visible:solid\",\n  outlineWidth: \"focus-visible:2px\",\n  outlineColor: \"focus-visible:outline-color\",\n  variants: {\n    size: {\n      ...sliderThumbSize,\n      true: sliderThumbSize.md\n    }\n  },\n  defaultVariants: {\n    size: \"md\"\n  }\n});\nconst SliderThumb = SliderThumbFrame;\nconst SliderRoot = createRefComponent(function Slider(props, ref) {\n  return /* @__PURE__ */ jsx(\n    SliderSizeContext.Provider,\n    {\n      size: resolveSliderSize(props.size),\n      orientation: props.orientation ?? \"horizontal\",\n      children: /* @__PURE__ */ jsx(\n        UiSlider,\n        {\n          ...props,\n          size: sliderThumbSize[resolveSliderSize(props.size)].width,\n          ref\n        }\n      )\n    }\n  );\n});\nconst Slider2 = withStaticProperties(SliderRoot, {\n  Track: SliderTrack,\n  TrackActive: SliderActive,\n  Thumb: SliderThumb\n});\nexport {\n  Slider2 as Slider,\n  SliderActive,\n  SliderActiveFrame,\n  SliderThumb,\n  SliderThumbFrame,\n  SliderTrack,\n  SliderTrackFrame\n};\n//# sourceMappingURL=Slider.js.map\n"],"mappings":";;;;;AAQA,MAAM,oBAAoB,oBAAoB;CAAE,MAAM;CAAM,aAAa;AAAa,CAAC;AACvF,MAAM,qBAAqB,SAAS,OAAO,SAAS,YAAY,QAAQ,kBAAkB,OAAO;AACjG,MAAM,kBAAkB;CACtB,IAAI;EAAE,OAAO;EAAI,QAAQ;EAAI,UAAU;EAAI,WAAW;CAAG;CACzD,IAAI;EAAE,OAAO;EAAI,QAAQ;EAAI,UAAU;EAAI,WAAW;CAAG;CACzD,IAAI;EAAE,OAAO;EAAI,QAAQ;EAAI,UAAU;EAAI,WAAW;CAAG;CACzD,IAAI;EAAE,OAAO;EAAI,QAAQ;EAAI,UAAU;EAAI,WAAW;CAAG;CACzD,IAAI;EAAE,OAAO;EAAI,QAAQ;EAAI,UAAU;EAAI,WAAW;CAAG;AAC3D;AACA,MAAM,kBAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AACA,MAAM,mBAAmB,OA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