{
  "version": 3,
  "sources": ["ssg:https://framer.com/m/framer/useIsomorphicLayoutEffect.js@0.2.0", "ssg:https://framerusercontent.com/modules/BVVLjh0PhSjLVcBD0yh9/xu02K2WaJOKjHBqk80qJ/Input.js"],
  "sourcesContent": ["import{useLayoutEffect,useEffect}from\"react\";/**\n * Swaps `useLayoutEffect` for `useEffect` on the server to avoid React warnings.\n * NOTE! The effect won't run on the server.\n */ export const useIsomorphicLayoutEffect=typeof document!==\"undefined\"?useLayoutEffect:useEffect;\nexport const __FramerMetadata__ = {\"exports\":{\"useIsomorphicLayoutEffect\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}}}}\n//# sourceMappingURL=./useIsomorphicLayoutEffect.map", "import { jsx as _jsx } from \"react/jsx-runtime\"; // @ts-ignore\nimport { ControlType, addPropertyControls, withCSS } from \"framer\";\nimport { useCallback, useEffect, useRef, useMemo } from \"react\";\nimport { fontStack, fontControls, fontSizeOptions, useOnEnter, useFontControls, useIsInPreview, usePadding, useRadius, paddingControl, borderRadiusControl, useControlledState } from \"https://framer.com/m/framer/default-utils.js@^0.45.0\";\nimport { useIsomorphicLayoutEffect } from \"https://framer.com/m/framer/useIsomorphicLayoutEffect.js@0.2.0\"; /**\n                                                                                                            * INPUT\n                                                                                                            *\n                                                                                                            * @framerIntrinsicWidth 260\n                                                                                                            * @framerIntrinsicHeight 50\n                                                                                                            *\n                                                                                                            * @framerSupportedLayoutWidth fixed\n                                                                                                            * @framerSupportedLayoutHeight any\n                                                                                                            */\nexport const Input = withCSS(function Input(props) {\n  const {\n    placeholder,\n    backgroundColor,\n    textColor,\n    border,\n    borderWidth,\n    password,\n    onSubmit,\n    onFocus,\n    onBlur,\n    value,\n    textAlign,\n    multiLine,\n    placeholderColor,\n    focused,\n    inputStyle,\n    caretColor,\n    fontFamily,\n    blurOnSubmit,\n    disabled,\n    keyboard,\n    replaceRegex,\n    truncate,\n    onChange,\n    onValueChange,\n    maxLength,\n    lineHeight,\n    enableLimit,\n    isRTL,\n    style\n  } = props;\n  const [inputValue, setValue] = useControlledState(value ? value : \"\");\n  const inputEle = useRef();\n  const Tag = useMemo(() => multiLine ? \"textarea\" : \"input\", [multiLine]);\n  const inPreview = useIsInPreview();\n  const fontStyles = useFontControls(props);\n  const paddingValue = usePadding(props);\n  const borderRadius = useRadius(props);\n  const handleChange = useCallback(event => {\n    const element = multiLine ? event.nativeEvent.target : event.nativeEvent.target;\n    const value = element.value.replace(new RegExp(replaceRegex, \"gi\"), \"\");\n    setValue(value);\n    if (onChange) onChange(value);\n    if (onValueChange) onValueChange(value);\n  }, [onChange, multiLine]);\n  useOnEnter(() => {\n    if (inPreview && focused) inputEle.current.focus();\n  });\n  useEffect(() => {\n    if (inPreview && focused) inputEle.current.focus();\n  }, [focused]);\n  useIsomorphicLayoutEffect(() => {\n    // I only want to control my own height is auto-sizing is enabled\n    if (multiLine && props.style.height !== \"100%\") {\n      // Autosizing hack for multi-line textareas, may have perf impact\n      inputEle.current.style.height = \"auto\";\n      inputEle.current.style.height = inputEle.current.scrollHeight + \"px\";\n    }\n  }, [inputValue, multiLine, style === null || style === void 0 ? void 0 : style.height, placeholder]); // const reg = /[^a-z0-9-]/gi\n  return /*#__PURE__*/_jsx(Tag, {\n    onChange: handleChange,\n    ref: inputEle,\n    value: inputValue instanceof String ? inputValue.replace(new RegExp(replaceRegex, \"gi\"), \"\") : inputValue,\n    placeholder: placeholder,\n    onKeyDown: e => {\n      if (e.keyCode === 13) {\n        if (blurOnSubmit && inputEle.current) inputEle.current.blur();\n        if (onSubmit) onSubmit();\n      }\n      if (e.keyCode === 49) {}\n    },\n    disabled: disabled,\n    onFocus: () => {\n      if (onFocus) onFocus();\n    },\n    onBlur: () => {\n      if (onBlur) onBlur();\n    },\n    maxLength: enableLimit ? maxLength : 524288,\n    autoFocus: inPreview && focused,\n    className: \"framer-default-input\",\n    rows: 1,\n    style: {\n      \"--framer-default-input-border-width\": `${props.hasError ? props.borderWidthError : props.borderWidth}px`,\n      \"--framer-default-input-border-color\": props.hasError ? props.focusColorError : props.focusColor,\n      \"--framer-default-input-placeholder-color\": props.placeholderColor,\n      ...baseInputStyles,\n      color: textColor,\n      backgroundColor,\n      borderRadius,\n      textAlign,\n      lineHeight,\n      caretColor,\n      margin: 0,\n      display: \"flex\",\n      height: \"auto\",\n      padding: paddingValue,\n      direction: isRTL ? \"rtl\" : \"ltr\",\n      overflow: \"show\",\n      textOverflow: truncate ? \"ellipsis\" : \"unset\",\n      boxShadow: !inPreview && focused ? `inset 0 0 0 ${props.hasError ? props.borderWidthError : props.borderWidth}px ${props.hasError ? props.focusColorError : props.focusColor}` : `inset 0 0 0 ${props.hasError ? props.borderWidthError : props.borderWidth}px ${props.hasError ? props.borderError : props.border}`,\n      ...inputStyle,\n      ...style,\n      ...fontStyles\n    },\n    type: password ? \"password\" : \"text\",\n    inputMode: keyboard\n  });\n}, [\".framer-default-input { --framer-default-input-border-width: 1px; --framer-default-input-border-color: #09f; --framer-default-input-placeholder-color: #aaa; }\", \".framer-default-input:focus { box-shadow: inset 0 0 0 var(--framer-default-input-border-width) var(--framer-default-input-border-color) !important; }\", \".framer-default-input::placeholder { color: var(--framer-default-input-placeholder-color) !important; }\"]);\nInput.defaultProps = {\n  value: \"\",\n  placeholder: \"Type something\u2026\",\n  width: 260,\n  height: 50,\n  backgroundColor: \"#EBEBEB\",\n  textColor: \"#333\",\n  focusColor: \"#09F\",\n  fontSize: 16,\n  fontWeight: 400,\n  borderRadius: 8,\n  lineHeight: 1.4,\n  padding: 15,\n  border: \"rgba(0,0,0,0)\",\n  placeholderColor: \"#aaa\",\n  borderWidth: 1,\n  truncate: false,\n  alignment: \"left\",\n  caretColor: \"#333\",\n  multiLine: false,\n  maxLength: 10,\n  password: false,\n  keyboard: \"\"\n};\naddPropertyControls(Input, {\n  placeholder: {\n    type: ControlType.String,\n    title: \"Placeholder\"\n  },\n  value: {\n    type: ControlType.String,\n    title: \"Value\"\n  },\n  textColor: {\n    type: ControlType.Color,\n    title: \"Text\"\n  },\n  caretColor: {\n    type: ControlType.Color,\n    title: \"Caret\"\n  },\n  placeholderColor: {\n    type: ControlType.Color,\n    title: \"Placeholder\"\n  },\n  backgroundColor: {\n    type: ControlType.Color,\n    title: \"Background\"\n  },\n  border: {\n    type: ControlType.Color,\n    title: \"Border\"\n  },\n  borderError: {\n    type: ControlType.Color,\n    title: \"Border\"\n  },\n  hasError: {\n    type: ControlType.Boolean,\n    title: \"Has Error\",\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  borderWidth: {\n    type: ControlType.Number,\n    title: \" \",\n    min: 1,\n    max: 5,\n    displayStepper: true\n  },\n  borderWidthError: {\n    type: ControlType.Number,\n    title: \" \",\n    min: 1,\n    max: 5,\n    displayStepper: true\n  },\n  focusColor: {\n    type: ControlType.Color,\n    title: \"Focus\"\n  },\n  focusColorError: {\n    type: ControlType.Color,\n    title: \"Focus Error\"\n  },\n  focused: {\n    type: ControlType.Boolean,\n    title: \"Focused\",\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  ...fontControls,\n  fontSize: {\n    ...fontSizeOptions\n  },\n  lineHeight: {\n    type: ControlType.Number,\n    min: 0,\n    step: .1,\n    max: 2,\n    displayStepper: true\n  },\n  ...paddingControl,\n  ...borderRadiusControl,\n  textAlign: {\n    title: \"Text Align\",\n    type: ControlType.Enum,\n    displaySegmentedControl: true,\n    optionTitles: [\"Left\", \"Center\", \"Right\"],\n    options: [\"left\", \"center\", \"right\"]\n  },\n  isRTL: {\n    type: ControlType.Boolean,\n    title: \"Direction\",\n    enabledTitle: \"RTL\",\n    disabledTitle: \"LTR\",\n    defaultValue: false\n  },\n  disabled: {\n    type: ControlType.Boolean,\n    title: \"Disabled\",\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  multiLine: {\n    type: ControlType.Boolean,\n    title: \"Text Area\",\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  truncate: {\n    type: ControlType.Boolean,\n    title: \"Truncate\",\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\",\n    hidden: ({\n      multiLine\n    }) => multiLine\n  },\n  password: {\n    type: ControlType.Boolean,\n    title: \"Password\",\n    hidden: ({\n      multiLine\n    }) => multiLine,\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  enableLimit: {\n    title: \"Limit\",\n    type: ControlType.Boolean,\n    displayStepper: true,\n    defaultValue: false,\n    disabledTitle: \"No\",\n    enabledTitle: \"Yes\"\n  },\n  maxLength: {\n    title: \" \",\n    type: ControlType.Number,\n    // @ts-ignore\n    defaultValue: Input.defaultProps.maxLength,\n    displayStepper: true,\n    min: 1,\n    hidden: ({\n      enableLimit\n    }) => !enableLimit\n  },\n  keyboard: {\n    type: ControlType.Enum,\n    title: \"Keyboard\",\n    defaultValue: \"\",\n    options: [\"\", \"numeric\", \"tel\", \"decimal\", \"email\", \"url\", \"search\"],\n    optionTitles: [\"Default\", \"Numeric\", \"Phone\", \"Decimal\", \"Email\", \"URL\", \"Search\"]\n  },\n  replaceRegex: {\n    type: ControlType.String,\n    title: \"Replace Regex\",\n    defaultValue: \"\"\n  },\n  metaType: {\n    type: ControlType.String,\n    title: \"MetaType\",\n    defaultValue: \"\"\n  },\n  onChange: {\n    type: ControlType.EventHandler\n  },\n  onSubmit: {\n    type: ControlType.EventHandler\n  },\n  onFocus: {\n    type: ControlType.EventHandler\n  },\n  onBlur: {\n    type: ControlType.EventHandler\n  }\n});\nconst baseInputStyles = {\n  pointerEvents: \"auto\",\n  border: \"none\",\n  width: \"100%\",\n  boxSizing: \"border-box\",\n  outline: \"none\",\n  resize: \"none\",\n  margin: 0,\n  fontFamily: fontStack,\n  WebkitTapHighlightColor: \"rgba(0, 0, 0, 0)\",\n  WebkitAppearance: \"none\"\n};\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"Input\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"Input\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\",\n        \"framerSupportedLayoutWidth\": \"fixed\",\n        \"framerIntrinsicWidth\": \"260\",\n        \"framerIntrinsicHeight\": \"50\",\n        \"framerSupportedLayoutHeight\": \"any\"\n      }\n    },\n    \"Props\": {\n      \"type\": \"tsType\",\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Input.map"],
  "mappings": "kPAGW,IAAMA,EAA0B,OAAO,SAAW,IAAYC,EAAgBC,ECUlF,IAAMC,EAAQC,EAAQ,SAAeC,EAAO,CACjD,GAAM,CACJ,YAAAC,EACA,gBAAAC,EACA,UAAAC,EACA,OAAAC,GACA,YAAAC,GACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,OAAAC,EACA,MAAAC,EACA,UAAAC,EACA,UAAAC,EACA,iBAAAC,GACA,QAAAC,EACA,WAAAC,EACA,WAAAC,EACA,WAAAC,GACA,aAAAC,EACA,SAAAC,EACA,SAAAC,EACA,aAAAC,EACA,SAAAC,EACA,SAAAC,EACA,cAAAC,EACA,UAAAC,EACA,WAAAC,EACA,YAAAC,EACA,MAAAC,EACA,MAAAC,CACF,EAAI7B,EACE,CAAC8B,EAAYC,EAAQ,EAAIC,EAAmBtB,GAAgB,EAAE,EAC9DuB,EAAWC,EAAO,EAClBC,GAAMC,EAAQ,IAAMxB,EAAY,WAAa,QAAS,CAACA,CAAS,CAAC,EACjEyB,EAAYC,EAAe,EAC3BC,GAAaC,EAAgBxC,CAAK,EAClCyC,GAAeC,EAAW1C,CAAK,EAC/B2C,GAAeC,EAAU5C,CAAK,EAC9B6C,GAAeC,EAAYC,GAAS,CAExC,IAAMrC,EADsBqC,EAAM,YAAY,OACxB,MAAM,QAAQ,IAAI,OAAO1B,EAAc,IAAI,EAAG,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,CACP,YAAA6B,CACF,IAAM,CAACA,CACT,EACA,SAAU,CACR,KAAM4B,EAAY,KAClB,MAAO,WACP,aAAc,GACd,QAAS,CAAC,GAAI,UAAW,MAAO,UAAW,QAAS,MAAO,QAAQ,EACnE,aAAc,CAAC,UAAW,UAAW,QAAS,UAAW,QAAS,MAAO,QAAQ,CACnF,EACA,aAAc,CACZ,KAAMA,EAAY,OAClB,MAAO,gBACP,aAAc,EAChB,EACA,SAAU,CACR,KAAMA,EAAY,OAClB,MAAO,WACP,aAAc,EAChB,EACA,SAAU,CACR,KAAMA,EAAY,YACpB,EACA,SAAU,CACR,KAAMA,EAAY,YACpB,EACA,QAAS,CACP,KAAMA,EAAY,YACpB,EACA,OAAQ,CACN,KAAMA,EAAY,YACpB,CACF,CAAC,EACD,IAAMF,GAAkB,CACtB,cAAe,OACf,OAAQ,OACR,MAAO,OACP,UAAW,aACX,QAAS,OACT,OAAQ,OACR,OAAQ,EACR,WAAYO,EACZ,wBAAyB,mBACzB,iBAAkB,MACpB",
  "names": ["useIsomorphicLayoutEffect", "fe", "ue", "Input", "withCSS", "props", "placeholder", "backgroundColor", "textColor", "border", "borderWidth", "password", "onSubmit", "onFocus", "onBlur", "value", "textAlign", "multiLine", "placeholderColor", "focused", "inputStyle", "caretColor", "fontFamily", "blurOnSubmit", "disabled", "keyboard", "replaceRegex", "truncate", "onChange", "onValueChange", "maxLength", "lineHeight", "enableLimit", "isRTL", "style", "inputValue", "setValue", "useControlledState", "inputEle", "pe", "Tag", "se", "inPreview", "useIsInPreview", "fontStyles", "useFontControls", "paddingValue", "usePadding", "borderRadius", "useRadius", "handleChange", "te", "event", "useOnEnter", "ue", "useIsomorphicLayoutEffect", "p", "e", "baseInputStyles", "addPropertyControls", "ControlType", "fontControls", "fontSizeOptions", "paddingControl", "borderRadiusControl", "fontStack"]
}
