{"version":3,"file":"CountryStateDropdown.BUkstCoC.mjs","names":["useState","startTransition"],"sources":["https:/framerusercontent.com/modules/lzjafSFs9Xw5MttOjaOR/zpRQBHbLN5EEy7N1oQUn/CountryStateDropdown.js"],"sourcesContent":["// US State dropdown component\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,startTransition}from\"react\";import{addPropertyControls,ControlType}from\"framer\";const usStates=[\"Alabama\",\"Alaska\",\"Arizona\",\"Arkansas\",\"California\",\"Colorado\",\"Connecticut\",\"Delaware\",\"Florida\",\"Georgia\",\"Hawaii\",\"Idaho\",\"Illinois\",\"Indiana\",\"Iowa\",\"Kansas\",\"Kentucky\",\"Louisiana\",\"Maine\",\"Maryland\",\"Massachusetts\",\"Michigan\",\"Minnesota\",\"Mississippi\",\"Missouri\",\"Montana\",\"Nebraska\",\"Nevada\",\"New Hampshire\",\"New Jersey\",\"New Mexico\",\"New York\",\"North Carolina\",\"North Dakota\",\"Ohio\",\"Oklahoma\",\"Oregon\",\"Pennsylvania\",\"Rhode Island\",\"South Carolina\",\"South Dakota\",\"Tennessee\",\"Texas\",\"Utah\",\"Vermont\",\"Virginia\",\"Washington\",\"West Virginia\",\"Wisconsin\",\"Wyoming\",\"District of Columbia\"];/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function USStateDropdown(props){const{label=\"State\",placeholder=\"Select a state\",backgroundColor=\"#FFFFFF\",textColor=\"#000000\",borderColor=\"#CCCCCC\",focusBorderColor=\"#000000\",borderRadius=8,font,style}=props;const[selectedState,setSelectedState]=useState(\"\");const[focused,setFocused]=useState(false);const handleStateChange=e=>{startTransition(()=>{setSelectedState(e.target.value);});};const selectStyle={width:\"100%\",height:56,padding:\"12px 16px\",backgroundColor,color:textColor,border:`1px solid ${borderColor}`,borderRadius,outline:\"none\",cursor:\"pointer\",appearance:\"none\",backgroundImage:`url(\"data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='${encodeURIComponent(textColor)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\")`,backgroundRepeat:\"no-repeat\",backgroundPosition:\"right 16px center\",paddingRight:\"40px\",...font};const labelStyle={display:\"block\",marginBottom:8,color:textColor,...font};const containerStyle={display:\"flex\",flexDirection:\"column\",width:\"100%\",...style};return /*#__PURE__*/_jsxs(\"div\",{style:containerStyle,children:[/*#__PURE__*/_jsx(\"label\",{style:labelStyle,children:label}),/*#__PURE__*/_jsx(\"input\",{type:\"text\",name:\"State\",value:selectedState,readOnly:true,style:{position:\"absolute\",opacity:0,pointerEvents:\"none\",height:0,width:0}}),/*#__PURE__*/_jsxs(\"select\",{value:selectedState,onChange:handleStateChange,onFocus:()=>startTransition(()=>setFocused(true)),onBlur:()=>startTransition(()=>setFocused(false)),autoComplete:\"address-level1\",style:{...selectStyle,borderColor:focused?focusBorderColor:borderColor},children:[/*#__PURE__*/_jsx(\"option\",{value:\"\",children:placeholder}),usStates.map(state=>/*#__PURE__*/_jsx(\"option\",{value:state,children:state},state))]})]});}addPropertyControls(USStateDropdown,{label:{type:ControlType.String,title:\"Label\",defaultValue:\"State\"},placeholder:{type:ControlType.String,title:\"Placeholder\",defaultValue:\"Select a state\"},backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},textColor:{type:ControlType.Color,title:\"Text Color\",defaultValue:\"#000000\"},borderColor:{type:ControlType.Color,title:\"Border Color\",defaultValue:\"#CCCCCC\"},focusBorderColor:{type:ControlType.Color,title:\"Focus Border\",defaultValue:\"#000000\"},borderRadius:{type:ControlType.Number,title:\"Border Radius\",defaultValue:8,min:0,max:32,step:1,unit:\"px\"},font:{type:ControlType.Font,title:\"Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"15px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.3em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"USStateDropdown\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"auto\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./CountryStateDropdown.map"],"mappings":"wLAIG,SAAwB,EAAgB,EAAM,CAAC,GAAK,CAAC,QAAM,QAAQ,cAAY,iBAAiB,kBAAgB,UAAU,YAAU,UAAU,cAAY,UAAU,mBAAiB,UAAU,eAAa,EAAE,OAAK,SAAO,EAAW,CAAC,EAAc,GAAkBA,EAAS,EAAE,EAAO,CAAC,EAAQ,GAAYA,EAAS,EAAK,EAAQ,EAAkB,GAAG,CAAC,MAAoB,CAAC,EAAiB,EAAE,OAAO,KAAK,CAAE,CAAC,CAAE,EAAQ,EAAY,CAAC,MAAM,OAAO,OAAO,GAAG,QAAQ,YAAY,kBAAgB,MAAM,EAAU,OAAO,aAAa,IAAc,eAAa,QAAQ,OAAO,OAAO,UAAU,WAAW,OAAO,gBAAgB,8JAA8J,mBAAmB,CAAS,EAAE,mFAAmF,iBAAiB,YAAY,mBAAmB,oBAAoB,aAAa,OAAO,GAAG,CAAI,EAAQ,EAAW,CAAC,QAAQ,QAAQ,aAAa,EAAE,MAAM,EAAU,GAAG,CAAI,EAAqF,OAAoB,EAAM,MAAM,CAAC,MAAM,CAApG,QAAQ,OAAO,cAAc,SAAS,MAAM,OAAO,GAAG,CAA2D,EAAE,SAAS,CAAc,EAAK,QAAQ,CAAC,MAAM,EAAW,SAAS,CAAK,CAAC,EAAe,EAAK,QAAQ,CAAC,KAAK,OAAO,KAAK,QAAQ,MAAM,EAAc,SAAS,GAAK,MAAM,CAAC,SAAS,WAAW,QAAQ,EAAE,cAAc,OAAO,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,EAAe,EAAM,SAAS,CAAC,MAAM,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