"use strict";var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard"),_interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault"),_react=_interopRequireDefault(require("react")),_react2=require("@storybook/react"),_addonInfo=require("@storybook/addon-info"),_index=_interopRequireDefault(require("./index")),_formik=require("formik"),_FormikTextField=_interopRequireDefault(require("./FormikTextField")),Yup=_interopRequireWildcard(require("yup"));(0,_react2.storiesOf)("TextField",module).add("Default",(0,_addonInfo.withInfo)("Default TextField")(function(){return/*#__PURE__*/_react["default"].createElement("div",{style:{padding:10}},/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Default",placeholder:"Enter email"}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"custom placeholder color",placeholder:"Enter email",placeholderColor:"#1d99d1"}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Textarea",multiline:!0,placeholder:"Enter Address"}),/*#__PURE__*/_react["default"].createElement("div",{style:{width:300}},/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Custom Width",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email",value:"storybook@kudoo.com"})),/*#__PURE__*/_react["default"].createElement("div",{style:{width:300}},/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"With Extra Link",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email",value:"storybook@kudoo.com",extraLinkWithLabel:"Change"})),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"with Top Border Radius",placeholder:"Enter email",applyTopBorderRadius:!0}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"No Border Radius",placeholder:"Enter email",noBorderRadius:!0}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"with icon",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email"}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Password field",type:"password",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-password"}),placeholder:"Enter password"}),/*#__PURE__*/_react["default"].createElement("div",{style:{display:"flex",alignItems:"center"}},/*#__PURE__*/_react["default"].createElement("div",{style:{width:110,marginRight:20}},/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Area Code",icon:/*#__PURE__*/_react["default"].createElement("div",null,"+"),placeholder:"",showClearIcon:!1,value:"91"})),/*#__PURE__*/_react["default"].createElement("div",{style:{width:400}},/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Mobile"}))),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"with invalid state",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email",value:"storybook@kudoo.com",error:"Invalid Email"}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"Custom Error Color",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email",value:"storybook@kudoo.com",error:"Invalid Email",errorColor:"red"}),/*#__PURE__*/_react["default"].createElement(_index["default"],{label:"with invalid state but dont show error message",icon:/*#__PURE__*/_react["default"].createElement("i",{className:"icon icon-message"}),placeholder:"Enter email",value:"storybook@kudoo.com",error:"Invalid Email",showErrorMessage:!1}))})).add("Formik",(0,_addonInfo.withInfo)("Formik TextField")(function(){return/*#__PURE__*/_react["default"].createElement("div",{style:{padding:10}},/*#__PURE__*/_react["default"].createElement(_formik.Formik,{initialValues:{email:"",email1:"",nested:{email:""}},validationSchema:Yup.object().shape({email:Yup.string().required("Email is required").email("Email is invalid"),nested:Yup.object().shape({email:Yup.string().required("Email is required").email("Email is invalid")})}),onSubmit:function onSubmit(){}},/*#__PURE__*/_react["default"].createElement(_react["default"].Fragment,null,/*#__PURE__*/_react["default"].createElement(_FormikTextField["default"],{name:"email",label:"Formik Field Email"}),/*#__PURE__*/_react["default"].createElement(_FormikTextField["default"],{name:"nested.email",label:"Formik Field Nested Email"}),/*#__PURE__*/_react["default"].createElement(_FormikTextField["default"],{name:"email1",label:"custom placeholder color",placeholder:"Enter email",placeholderColor:"#1d99d1"}))))}));