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KACZ4C,MAAO5C,IAAAA,MAAgB,CAAC,OAAQ,UAChCa,IAAKb,IAAAA,OACLc,IAAKd,IAAAA,OACL0D,KAAM1D,IAAAA,IACN6C,YAAa7C,IAAAA,KACb+D,UAAW/D,IAAAA,KACXkC,IAAKlC,IAAAA,IACLkE,aAAclE,IAAAA,OACd+C,oBAAqB/C,IAAAA,KACrB8C,WAAY9C,IAAAA,KACZyB,QAASzB,IAAAA,OACVP,EAvCGc,EAAK,eAyCa,CACpBS,KAAM,OACNU,aAAc,GACdiC,YAAa,GACbF,SAAU,GACVH,KAAM,GACNV,MAAO,OACPY,UAAU,EACVzC,SAAU,WAAc,EACxBT,QAAS,WAAc,EACvBwD,UAAW,WAAc,EACzBE,OAAQ,WAAQ,EAChBC,QAAS,WAAQ,EACjB9D,UAAU,EACVyD,UAAU,EACVX,QAAQ,EACRC,YAAY,EACZW,UAAU,EACVhB,aAAa,EACbkB,WAAW,EACXhB,qBAAqB,EACrBD,YAAY,EACZrB,QAAS,WAAQ,EACjBM,UAAW,IAuNf,IAAehC,EAAAA,YAAiB,SAACtB,EAAOyD,GAAG,OACzCnC,EAAAA,cAACQ,EAAK4E,EAAA,GAAK1G,EAAK,CAAE0D,aAAcD,IAAO,G","sources":["webpack://Oomple/./app/javascript/components/v4/base/col.jsx","webpack://Oomple/./app/javascript/components/v4/base/row.jsx","webpack://Oomple/./app/javascript/components/v4/form/input.jsx"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport classNames from 'classnames';\r\n\r\nexport default class Col extends React.Component {\r\n static propTypes = {\r\n id: PropTypes.string,\r\n className: PropTypes.string,\r\n noPadding: PropTypes.bool,\r\n offsetSmall: PropTypes.number,\r\n offsetMedium: PropTypes.number,\r\n offsetLarge: PropTypes.number,\r\n pullSmall: PropTypes.number,\r\n pullMedium: PropTypes.number,\r\n pullLarge: PropTypes.number,\r\n pushSmall: PropTypes.number,\r\n pushMedium: PropTypes.number,\r\n pushLarge: PropTypes.number,\r\n s: PropTypes.number,\r\n m: PropTypes.number,\r\n l: PropTypes.number,\r\n };\r\n\r\n static defaultProps = {\r\n id: '',\r\n noPadding: false,\r\n s: 0,\r\n m: 0,\r\n l: 0\r\n };\r\n\r\n get classNames() {\r\n const { className, noPadding, offsetSmall, offsetMedium, offsetLarge,\r\n pullSmall, pullMedium, pullLarge, pushSmall, pushMedium, pushLarge,\r\n s, m, l } = this.props;\r\n\r\n return classNames('col', {\r\n [`s${s}`]: s > 0,\r\n [`m${m}`]: m > 0,\r\n [`l${l}`]: l > 0,\r\n [`offset-s${offsetSmall}`]: offsetSmall > 0,\r\n [`offset-m${offsetMedium}`]: offsetMedium > 0,\r\n [`offset-l${offsetLarge}`]: offsetLarge > 0,\r\n [`pull-s${pullSmall}`]: pullSmall > 0,\r\n [`pull-m${pullMedium}`]: pullMedium > 0,\r\n [`pull-l${pullLarge}`]: pullLarge > 0,\r\n [`push-s${pushSmall}`]: pushSmall > 0,\r\n [`push-m${pushMedium}`]: pushMedium > 0,\r\n [`push-l${pushLarge}`]: pushLarge > 0,\r\n [className]: className,\r\n 'no-pad': noPadding\r\n });\r\n }\r\n\r\n render() {\r\n const { id, children } = this.props;\r\n return(\r\n {children}\r\n );\r\n }\r\n}\r\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\nexport default class Row extends React.Component {\n static propTypes = {\n id: PropTypes.string,\n className: PropTypes.string,\n nested: PropTypes.bool,\n noMargin: PropTypes.bool,\n vCenter: PropTypes.bool,\n hCenter: PropTypes.bool,\n onClick: PropTypes.func,\n };\n\n static defaultProps = {\n id: '',\n nested: false,\n noMargin: false,\n vCenter: false,\n hCenter: false,\n onClick: () => { },\n };\n\n get classNames() {\n const { className, nested, noMargin, vCenter, hCenter } = this.props;\n return classNames('row', {\n [className]: className,\n 'nested': nested,\n 'no-margin': noMargin,\n 'v-center': vCenter,\n 'h-center': hCenter\n });\n }\n\n render() {\n const { id, children, onClick } = this.props;\n return(\n {children}\n );\n }\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { FontAwesomeIcon } from '@fortawesome/react-fontawesome';\nimport { faExclamationCircle, faEye, faEyeSlash, faTimes } from '@fortawesome/pro-solid-svg-icons';\nimport { Asterisk } from 'lucide-react';\n\nclass Input extends React.Component {\n static propTypes = {\n id: PropTypes.string,\n value: PropTypes.any,\n name: PropTypes.string,\n label: PropTypes.string,\n className: PropTypes.string,\n inputClassName: PropTypes.string,\n inputLabelClassName: PropTypes.string,\n defaultValue: PropTypes.any,\n type: PropTypes.string,\n precision: PropTypes.number,\n step: PropTypes.number,\n tabIndex: PropTypes.string,\n errorMessage: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),\n placeholder: PropTypes.string,\n icon: PropTypes.object,\n onChange: PropTypes.func,\n onClick: PropTypes.func,\n onBlur: PropTypes.func,\n onFocus: PropTypes.func,\n onKeyDown: PropTypes.func,\n disabled: PropTypes.bool,\n noMargin: PropTypes.bool,\n required: PropTypes.bool,\n readOnly: PropTypes.bool,\n center: PropTypes.bool,\n rightAlign: PropTypes.bool,\n color: PropTypes.oneOf(['dark', 'light']),\n min: PropTypes.number,\n max: PropTypes.number,\n data: PropTypes.any,\n highlighted: PropTypes.bool,\n autoFocus: PropTypes.bool,\n ref: PropTypes.any,\n autoComplete: PropTypes.string,\n allowPasswordToggle: PropTypes.bool,\n allowClear: PropTypes.bool,\n onClear: PropTypes.func,\n }\n\n static defaultProps = {\n type: 'text',\n defaultValue: '',\n placeholder: '',\n tabIndex: '',\n name: '',\n color: 'dark',\n readOnly: false,\n onChange: function () { },\n onClick: function () { },\n onKeyDown: function () { },\n onBlur: () => { },\n onFocus: () => { },\n noMargin: false,\n disabled: false,\n center: false,\n rightAlign: false,\n required: false,\n highlighted: false,\n autoFocus: false,\n allowPasswordToggle: false,\n allowClear: false,\n onClear: () => { },\n precision: 0,\n }\n\n constructor(props) {\n super(props);\n // All this because Javascript treats 0 and undefined the same way.\n // 0's will now show up if passed into a number input\n let value = props.value || props.defaultValue || '';\n if (props.type === 'number' && !isNaN(parseFloat(value))) {\n // Use the precision property to determine decimal places\n const exponent = Math.pow(10, props.precision);\n value = (parseInt(parseFloat(value) * exponent) / exponent).toString();\n }\n\n // Ensure we always have a ref value, even if not passed in.\n this.ref = props.forwardedRef || React.createRef();\n\n this.state = {\n value,\n hidden: true,\n type: props.type || 'text',\n };\n }\n\n static getDerivedStateFromProps(props, state) {\n if (props.value !== undefined && props.value !== state.value) {\n return {\n value: props.value\n };\n } else if (props.type === 'email' && ( props.value || props.value === '' )) {\n // Prevent using value for email type because it doesn't support setSelectionRange\n throw new Error('Input element’s type (’email’) does not support this props (’value’).');\n }\n return null;\n }\n\n componentDidUpdate() {\n const { type, selectionStart, selectionEnd, value } = this.state;\n const input = this.ref.current;\n // Method setSelectionRange is applied only to the input elements with the types text, search, URL, tel and password.\n if (input && ['text', 'tel', 'url'].includes(type) && value) {\n // Set cursor to tracked state\n input.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n\n get classNames() {\n const { className, icon, noMargin, color, highlighted, allowClear, allowPasswordToggle } = this.props;\n return classNames('relative input-field', {\n [className]: className,\n 'is-light': color === 'light',\n 'input-icon-container': icon || allowClear || allowPasswordToggle,\n 'highlighted': highlighted,\n 'margin-bottom-0': noMargin,\n });\n }\n\n get inputClassNames() {\n const { color, center, rightAlign, inputClassName, icon } = this.props;\n\n return classNames({\n 'is-light': color === 'light',\n 'center-align': center,\n 'right-align': rightAlign,\n 'padding-left-35': icon,\n [inputClassName]: inputClassName,\n });\n }\n\n get showPasswordIcon() {\n const { allowPasswordToggle } = this.props;\n const { type } = this.state;\n return (allowPasswordToggle && ['text', 'password'].includes(type));\n }\n\n handleChange = (e) => {\n e.persist();\n const { min, max, onChange } = this.props;\n const { type } = this.state;\n let { value } = e.target;\n\n if (type === 'number') {\n if (!isNaN(min) && min > value) {\n value = '';\n }\n\n if (!isNaN(max) && max < value) {\n value = max;\n }\n }\n\n // Get current cursor status\n const selectionStart = e.target.selectionStart;\n const selectionEnd = e.target.selectionEnd;\n\n this.setState({\n value,\n selectionStart,\n selectionEnd,\n }, () => onChange(e, value));\n }\n\n handleTogglePassword = (e) => {\n e && e.preventDefault();\n const { hidden } = this.state;\n if (hidden) {\n this.setState({\n hidden: false,\n type: 'text',\n })\n } else {\n this.setState({\n hidden: true,\n type: 'password',\n })\n }\n }\n\n handleClear = (e) => {\n e && e.preventDefault();\n const { onClear } = this.props;\n onClear();\n }\n\n render() {\n const {\n label, id, name, errorMessage, icon, readOnly, tabIndex,\n data, placeholder, onClick, disabled, required, onKeyDown, max, min,\n autoFocus, onBlur, onFocus, autoComplete, step, allowClear,\n inputLabelClassName,\n } = this.props;\n const { value, type, hidden } = this.state;\n\n return (\n
\n {\n label &&\n \n }\n {\n icon &&\n \n }\n {\n this.showPasswordIcon &&\n \n \n \n }\n {\n ( allowClear && value ) &&\n \n \n \n }\n \n {\n errorMessage &&\n
\n \n {errorMessage}\n
\n }\n
\n );\n }\n}\n\nexport default React.forwardRef((props, ref) => (\n \n));"],"names":["Col","_React$Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","key","get","_classNames","_this$props","this","props","className","noPadding","offsetSmall","offsetMedium","offsetLarge","pullSmall","pullMedium","pullLarge","pushSmall","pushMedium","pushLarge","s","m","l","classNames","_defineProperty","concat","value","_this$props2","id","children","React","PropTypes","Row","nested","noMargin","vCenter","hCenter","onClick","Input","_this","_assertThisInitialized","call","e","persist","min","max","onChange","type","state","target","isNaN","selectionStart","selectionEnd","setState","preventDefault","hidden","onClear","defaultValue","parseFloat","exponent","Math","pow","precision","parseInt","toString","ref","forwardedRef","undefined","Error","_this$state","input","current","includes","setSelectionRange","icon","color","highlighted","allowClear","allowPasswordToggle","_this$props3","center","rightAlign","inputClassName","_this$props4","label","name","errorMessage","readOnly","tabIndex","data","placeholder","disabled","required","onKeyDown","autoFocus","onBlur","onFocus","autoComplete","step","inputLabelClassName","_this$state2","htmlFor","Asterisk","size","FontAwesomeIcon","showPasswordIcon","handleTogglePassword","faEyeSlash","faEye","handleClear","faTimes","inputClassNames","handleChange","faExclamationCircle","_extends"],"sourceRoot":""}