{"version":3,"file":"Input.js","names":["UiInput","UiTextArea"],"sources":["esm/components/Input.js"],"sourcesContent":["import {\n  createStyledHOC,\n  isWeb,\n  styled,\n  Theme\n} from \"@tamagui/core\";\nimport { Input as UiInput, TextArea as UiTextArea } from \"@tamagui/input\";\nimport { jsx } from \"react/jsx-runtime\";\nconst inputSize = {\n  xs: { paddingInline: \"2\", paddingBlock: \"1\", borderRadius: \"sm\", fontSize: \"xs\" },\n  sm: { paddingInline: \"3\", paddingBlock: \"1.5\", borderRadius: \"md\", fontSize: \"sm\" },\n  md: { paddingInline: \"4\", paddingBlock: \"2\", borderRadius: \"md\", fontSize: \"sm\" },\n  lg: { paddingInline: \"6\", paddingBlock: \"2\", borderRadius: \"md\", fontSize: \"base\" },\n  xl: { paddingInline: \"8\", paddingBlock: \"2.5\", borderRadius: \"lg\", fontSize: \"lg\" }\n};\nconst inputLineHeight = {\n  xs: \"xs\",\n  sm: \"sm\",\n  md: \"sm\",\n  lg: \"base\",\n  xl: \"lg\"\n};\nconst resolveInputSize = (size) => typeof size === \"string\" && size in inputSize ? size : \"md\";\nconst resolveInputLineHeight = (props) => {\n  if (!isWeb || props.lineHeight != null) return;\n  const lineHeight = inputLineHeight[resolveInputSize(props.size)];\n  if (lineHeight) return { lineHeight };\n};\nconst inputSkin = {\n  fontFamily: \"body\",\n  color: \"color\",\n  backgroundColor: \"background\",\n  borderColor: \"border-color hover:border-color-hover focus:border-color-focus\",\n  borderWidth: 1,\n  outlineColor: \"focus-visible:outline-color\",\n  outlineWidth: \"focus-visible:2px\",\n  outlineStyle: \"focus-visible:solid\"\n};\nconst InputFrame = styled(UiInput, {\n  displayName: \"Input\",\n  className: \"is_Input\",\n  ...inputSkin,\n  variants: {\n    size: {\n      ...inputSize,\n      true: inputSize.md\n    }\n  },\n  defaultVariants: {\n    size: \"md\"\n  }\n}).resolve((props) => resolveInputLineHeight(props));\nconst TextAreaFrame = styled(UiTextArea, {\n  displayName: \"TextArea\",\n  className: \"is_TextArea\",\n  ...inputSkin,\n  variants: {\n    size: {\n      ...inputSize,\n      true: inputSize.md\n    }\n  },\n  defaultVariants: {\n    size: \"md\"\n  }\n}).resolve((props) => resolveInputLineHeight(props));\nconst Input = createStyledHOC(\n  InputFrame,\n  function Input2({ theme, ...props }, ref) {\n    const input = /* @__PURE__ */ jsx(Theme, { name: \"Input\", children: /* @__PURE__ */ jsx(InputFrame, { ref, ...props }) });\n    return theme ? /* @__PURE__ */ jsx(Theme, { name: theme, children: input }) : input;\n  },\n  { disableTheme: true }\n);\nconst TextArea = createStyledHOC(\n  TextAreaFrame,\n  function TextArea2({ theme, ...props }, ref) {\n    const textArea = /* @__PURE__ */ jsx(Theme, { name: \"TextArea\", children: /* @__PURE__ */ jsx(TextAreaFrame, { ref, ...props }) });\n    return theme ? /* @__PURE__ */ jsx(Theme, { name: theme, children: textArea }) : textArea;\n  },\n  { disableTheme: true }\n);\nexport {\n  Input,\n  TextArea\n};\n//# sourceMappingURL=Input.js.map\n"],"mappings":";;;;;AAQA,MAAM,YAAY;CAChB,IAAI;EAAE,eAAe;EAAK,cAAc;EAAK,cAAc;EAAM,UAAU;CAAK;CAChF,IAAI;EAAE,eAAe;EAAK,cAAc;EAAO,cAAc;EAAM,UAAU;CAAK;CAClF,IAAI;EAAE,eAAe;EAAK,cAAc;EAAK,cAAc;EAAM,UAAU;CAAK;CAChF,IAAI;EAAE,eAAe;EAAK,cAAc;EAAK,cAAc;EAAM,UAAU;CAAO;CAClF,IAAI;EAAE,eAAe;EAAK,cAAc;EAAO,cAAc;EAAM,UAAU;CAAK;AACpF;AACA,MAAM,kBAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;AACN;AACA,MAAM,oBAAoB,SAAS,OAAO,SAAS,YAAY,QAAQ,YAAY,OAAO;AAC1F,MAAM,0BAA0B,UAAU;CACxC,IAAI,CAAC,SAAS,MAAM,cAAc,MAAM;CACxC,MAAM,aAAa,gBAAgB,iBAAiB,MA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