{"version":3,"file":"CheckboxWithLabel.C7eCV2er.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/tbBkhVnZXxPAH56kp1to/GgV8dix0adCwJi6xcooD/CheckboxWithLabel.js"],"sourcesContent":["// Simple checkbox with text - checkbox on left, text on right\n// Controls for text size, color, padding, font, etc.\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function CheckboxWithLabel(props){const{label,defaultChecked,textColor,checkboxColor,backgroundColor,padding,font,gap,checkboxSize,style}=props;const[checked,setChecked]=useState(defaultChecked);const handleChange=()=>{startTransition(()=>{setChecked(!checked);});};const isFixedWidth=style?.width!==\"100%\";return /*#__PURE__*/_jsxs(\"label\",{style:{display:\"flex\",alignItems:\"center\",gap:`${gap}px`,padding,backgroundColor,cursor:\"pointer\",userSelect:\"none\",...isFixedWidth?{width:\"max-content\"}:{width:\"100%\"},...style},children:[/*#__PURE__*/_jsx(\"input\",{type:\"checkbox\",checked:checked,onChange:handleChange,style:{width:`${checkboxSize}px`,height:`${checkboxSize}px`,accentColor:checkboxColor,cursor:\"pointer\",flexShrink:0}}),/*#__PURE__*/_jsx(\"span\",{style:{color:textColor,...font},children:label})]});}addPropertyControls(CheckboxWithLabel,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"Accept terms and conditions\"},defaultChecked:{type:ControlType.Boolean,title:\"Default Checked\",defaultValue:false,enabledTitle:\"Checked\",disabledTitle:\"Unchecked\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},checkboxColor:{type:ControlType.Color,title:\"Checkbox Color\",defaultValue:\"#000000\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},padding:{type:ControlType.Padding,title:\"Padding\",defaultValue:\"8px\"},font:{type:ControlType.Font,title:\"Font\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"},controls:\"extended\",defaultFontType:\"sans-serif\"},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},checkboxSize:{type:ControlType.Number,title:\"Checkbox Size\",defaultValue:18,min:12,max:32,step:1,unit:\"px\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"CheckboxWithLabel\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CheckboxWithLabel.map"],"mappings":"oLAKG,SAAwB,EAAkB,EAAM,CAAC,GAAK,CAAC,QAAM,iBAAe,YAAU,gBAAc,kBAAgB,UAAQ,OAAK,MAAI,eAAa,SAAO,EAAW,CAAC,EAAQ,GAAYA,EAAS,EAAe,CAAO,MAAiB,CAAC,MAAoB,CAAC,EAAW,CAAC,EAAQ,EAAG,EAAS,EAAa,GAAO,QAAQ,OAAO,OAAoB,EAAM,QAAQ,CAAC,MAAM,CAAC,QAAQ,OAAO,WAAW,SAAS,IAAI,GAAG,EAAI,IAAI,UAAQ,kBAAgB,OAAO,UAAU,WAAW,OAAO,GAAG,EAAa,CAAC,MAAM,cAAc,CAAC,CAAC,MAAM,OAAO,CAAC,GAAG,EAAM,CAAC,SAAS,CAAc,EAAK,QAAQ,CAAC,KAAK,WAAmB,UAAQ,SAAS,EAAa,MAAM,CAAC,MAAM,GAAG,EAAa,IAAI,OAAO,GAAG,EAAa,IAAI,YAAY,EAAc,OAAO,UAAU,WAAW,EAAE,CAAC,CAAC,CAAc,EAAK,OAAO,CAAC,MAAM,CAAC,MAAM,EAAU,GAAG,EAAK,CAAC,SAAS,EAAM,CAAC,CAAC,CAAC,CAAC,kBAHjwB,IAA4C,IAAoD,CAGmqB,EAAoB,EAAkB,C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