{"version":3,"file":"Checkbox.mjs","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { forwardRef } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\nimport { mergeDeep } from \"../../helpers/merge-deep\";\nimport { getTheme } from \"../../theme-store\";\nimport type { DeepPartial } from \"../../types\";\nimport type { FlowbiteColors } from \"../Flowbite\";\n\nexport interface FlowbiteCheckboxTheme {\n  root: FlowbiteCheckboxRootTheme;\n}\nexport interface FlowbiteCheckboxRootTheme {\n  base: string;\n  color: FlowbiteColors;\n}\n\nexport interface CheckboxProps extends Omit<ComponentProps<\"input\">, \"type\" | \"ref\" | \"color\"> {\n  theme?: DeepPartial<FlowbiteCheckboxTheme>;\n  color?: keyof FlowbiteColors;\n}\n\nexport const Checkbox = forwardRef<HTMLInputElement, CheckboxProps>(\n  ({ className, color = \"default\", theme: customTheme = {}, ...props }, ref) => {\n    const theme = mergeDeep(getTheme().checkbox, customTheme);\n\n    return (\n      <input\n        ref={ref}\n        type=\"checkbox\"\n        className={twMerge(theme.root.base, theme.root.color[color], className)}\n        {...props}\n      />\n    );\n  },\n);\n\nCheckbox.displayName = \"Checkbox\";\n"],"names":[],"mappings":";;;;;;AAMY,MAAC,QAAQ,GAAG,UAAU;AAClC,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,SAAS,EAAE,KAAK,EAAE,WAAW,GAAG,EAAE,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAK;AAChF,IAAI,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;AAC9D,IAAI,uBAAuB,GAAG;AAC9B,MAAM,OAAO;AACb,MAAM;AACN,QAAQ,GAAG;AACX,QAAQ,IAAI,EAAE,UAAU;AACxB,QAAQ,SAAS,EAAE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;AAC/E,QAAQ,GAAG,KAAK;AAChB,OAAO;AACP,KAAK,CAAC;AACN,GAAG;AACH,EAAE;AACF,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}