{"version":3,"file":"Input.D887wW0D.mjs","names":["useMemo","Input"],"sources":["https:/framerusercontent.com/modules/o3deB5lyrQxUFN5JhZxC/KLzbJbvIazzAVPBrTBI2/Input.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{// Framer & React\nuseMemo,addPropertyControls,ControlType,withCSS,// Typer Component\nInput,// Utils\nexcludeStylizingProps,selectStylizingProps,stringifyTransitionObject}from\"https://framerusercontent.com/modules/7LlaxFH6zgxheHKUdYhS/GWNEua82xQ5PTdYcYXZs/Import.js\";/**\n * TYPER INPUT\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Component(props){// Extract Variables\nconst allprops={...props,...props.params};const style=selectStylizingProps(allprops);const params=excludeStylizingProps(allprops);// Generate the ID\nconst id=useMemo(()=>{const lib=window?.crypto||crypto;const uuid=lib?.randomUUID().slice(0,5);return`typer-${uuid}`;},[]);// Generate the inlineCSS\nconst inlineCSS=useMemo(()=>{const{// Text\nfontFamily,fontSize,fontWeight,textAlign,letterSpacing,color,lineHeight,placeholderColor,// Box\nopacity,backgroundColor,borderColor,borderWidth,borderRadius,borderStyle,padding,border,boxShadow,focus={}}=style;return[`#${id} input::placeholder { \n                color: ${placeholderColor}; \n            }`,`#${id} input:focus { \n                outline: none;\n                background-color:${focus?.backgroundColor};\n                box-shadow:${focus?.boxShadow};\n                transition:${stringifyTransitionObject(focus?.transition)};\n            }`,`#${id} input{ \n                position: relative;\n                padding:${padding};\n                opacity: ${opacity};\n                font-family:${fontFamily};\n                color:${color};\n                font-size:${fontSize};\n                font-weight: ${fontWeight};\n                text-align: ${textAlign};\n                letter-spacing: ${letterSpacing};\n                line-height: ${lineHeight};\n                background-color:${backgroundColor};\n                border: none;\n                border-radius:${borderRadius};\n                box-shadow:${boxShadow};\n            }`,`#${id} input + div { \n                position: absolute;\n                top:0;\n                left:0;\n                right:0;\n                bottom:0;\n                border-color:${borderColor}; \n                border-width:${borderWidth}px; \n                border-style:${borderStyle};\n                border-radius:${borderRadius};\n                content: \" \";\n                pointer-events: none;\n            }`,`#${id} input:focus + div { \n                border-color:${focus?.border?.borderColor}; \n                border-width:${focus?.border?.borderWidth}px; \n                border-style:${focus?.border?.borderStyle};\n                transition:${stringifyTransitionObject(focus?.transition)};\n            }`];},[style]);// Generate the Component\nconst ComponentWithoutCSS=()=>/*#__PURE__*/_jsxs(\"div\",{id:id,children:[/*#__PURE__*/_jsx(Input,{...params}),/*#__PURE__*/_jsx(\"div\",{})]});const ComponentWithCSS=withCSS(ComponentWithoutCSS,inlineCSS,id);return /*#__PURE__*/_jsx(ComponentWithCSS,{});}Component.displayName=\"Typer Input NPM\";addPropertyControls(Component,{//On Change Events\nonEmpty:{type:ControlType.EventHandler},onFull:{type:ControlType.EventHandler},onValid:{type:ControlType.EventHandler},onInvalid:{type:ControlType.EventHandler},onRequired:{type:ControlType.EventHandler},//On Typing Events\nonFocusing:{type:ControlType.EventHandler},onFilling:{type:ControlType.EventHandler},onValidating:{type:ControlType.EventHandler},onInvalidating:{type:ControlType.EventHandler},onRequiring:{type:ControlType.EventHandler},//Input Parameters\nvalidationType:{title:\"Type\",type:ControlType.Enum,options:[\"string\",\"mail\",\"custom\"],optionTitles:[\"Text\",\"E-mail\",\"Custom\"],defaultValue:\"text\"},params:{title:\" \",type:ControlType.Object,controls:{updateOn:{title:\"Update on\",type:ControlType.Enum,defaultValue:\"both\",options:[\"ontyping\",\"onchange\"],optionTitles:[\"Typing\",\"Leaving\"],description:\"Continually update the value or only when the user leaves the field.\"},validOn:{title:\"Valid on\",type:ControlType.String,placeholder:\"^[0-9]{9}$\",description:\"Use [regex](https://en.wikipedia.org/wiki/Regular_expression) to limit value that the field can accept or submit\",displayTextArea:true}},hidden:props=>props.validationType!==\"custom\"},name:{title:\"Name\",type:ControlType.String},placeholder:{type:ControlType.String,defaultValue:\"John Doe\"},populate:{type:ControlType.Boolean,defaultValue:false},remember:{type:ControlType.Boolean,defaultValue:false},required:{type:ControlType.Boolean,description:\" \",defaultValue:false},font:{type:ControlType.Font,controls:\"extended\",defaultFontType:\"sans-serif\",optional:true,defaultValue:{fontSize:14,lineHeight:\"1.2em\"}},color:{type:ControlType.Color,defaultValue:\"#999\"},placeholderColor:{type:ControlType.Color,defaultValue:\"#999\"},opacity:{type:ControlType.Number,min:0,max:1,step:.01,defaultValue:1},backgroundColor:{title:\"Fill\",type:ControlType.Color,defaultValue:\"rgba(187,187,187,0.15)\"},borderRadius:{title:\"Radius\",type:ControlType.BorderRadius,defaultValue:\"10px\"},padding:{type:ControlType.Padding,defaultValue:\"12px\"},border:{type:ControlType.Border,optional:true,defaultValue:{borderColor:\"rgba(136,136,136,0.15)\",borderWidth:1}},boxShadow:{title:\"Shadows\",type:ControlType.BoxShadow},focus:{type:ControlType.Object,optional:true,buttonTitle:\"Effect\",buttonColor:\"#09F\",icon:\"effect\",defaultValue:{border:{borderColor:\"#09F\",borderWidth:1}},controls:{backgroundColor:{title:\"Fill\",optional:true,type:ControlType.Color},border:{type:ControlType.Border,optional:true,defaultValue:{borderColor:\"#09F\",borderWidth:1,borderStyle:\"solid\"}},boxShadow:{title:\"Shadows\",type:ControlType.BoxShadow},transition:{optional:true,type:ControlType.Transition}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Component\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\",\"framerSupportedLayoutHeight\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Input.map"],"mappings":"8ZAOG,SAAwB,EAAU,EAAM,CAC3C,IAAM,EAAS,CAAC,GAAG,EAAM,GAAG,EAAM,OAAO,CAAO,EAAM,EAAqB,EAAS,CAAO,EAAO,EAAsB,EAAS,CAC3H,EAAGA,MAA4F,UAArE,GAAQ,QAAQ,SAAuB,YAAY,CAAC,MAAM,EAAE,EAAE,GAAyB,EAAE,CAAC,CACpH,EA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