{"version":3,"sources":["../../../../src/components/atoms/Switch/Switch.tsx"],"names":["cva","jsx","HSwitch"],"mappings":";;;;;;AAGA,MAAM,cAAA,GAAiBA,0BAAA;AAAA,EACrB,oTAAA;AAAA,EAIA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,WAAA;AAAA,QACJ,EAAA,EAAI,UAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,IAAA,EAAM;AAAA;AACR;AAEJ,CAAA;AAEA,MAAM,cAAA,GAAiBA,0BAAA;AAAA,EACrB,2HAAA;AAAA,EACA;AAAA,IACE,QAAA,EAAU;AAAA,MACR,IAAA,EAAM;AAAA,QACJ,EAAA,EAAI,yCAAA;AAAA,QACJ,EAAA,EAAI,yCAAA;AAAA,QACJ,EAAA,EAAI;AAAA;AACN,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,IAAA,EAAM;AAAA;AACR;AAEJ,CAAA;AAIO,SAAS,MAAA,CAAO,EAAE,IAAA,EAAM,GAAG,OAAM,EAAyB;AAC/D,EAAA,uBACEC,cAAA,CAACC,gBAAQ,SAAA,EAAW,cAAA,CAAe,EAAE,IAAA,EAAM,GAAI,GAAG,KAAA,EAChD,yCAAC,MAAA,EAAA,EAAK,aAAA,EAAY,QAAO,SAAA,EAAW,cAAA,CAAe,EAAE,IAAA,EAAM,GAAG,CAAA,EAChE,CAAA;AAEJ","file":"Switch.cjs","sourcesContent":["import { Switch as HSwitch, type SwitchProps } from \"@headlessui/react\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nconst switchVariants = cva(\n  \"group relative flex cursor-pointer rounded-full bg-primary/50 p-1 ease-in-out \\\n  focus:not-data-focus:outline-none data-checked:bg-primary data-focus:outline \\\n  data-focus:outline-white transition-colors shadow-lg \\\n  disabled:bg-neutral-400/30 disabled:[&>span]:bg-white/70 data-checked:disabled:bg-primary/50\",\n  {\n    variants: {\n      size: {\n        sm: \"h-7 w-14 \",\n        md: \"h-8 w-16\",\n        lg: \"h-9 w-18 \",\n      },\n    },\n    defaultVariants: {\n      size: \"sm\",\n    },\n  }\n);\n\nconst circleVariants = cva(\n  \"pointer-events-none inline-block translate-x-0 rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out\",\n  {\n    variants: {\n      size: {\n        sm: \"size-5 group-data-checked:translate-x-7\",\n        md: \"size-6 group-data-checked:translate-x-8\",\n        lg: \"size-7 group-data-checked:translate-x-9\",\n      },\n    },\n    defaultVariants: {\n      size: \"sm\",\n    },\n  }\n);\n\ntype SwitchComponentProps = SwitchProps & VariantProps<typeof switchVariants>;\n\nexport function Switch({ size, ...props }: SwitchComponentProps) {\n  return (\n    <HSwitch className={switchVariants({ size })} {...props}>\n      <span aria-hidden=\"true\" className={circleVariants({ size })} />\n    </HSwitch>\n  );\n}\n"]}