!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("openstack-uicore-foundation",[],r):"object"==typeof exports?exports["openstack-uicore-foundation"]=r():e["openstack-uicore-foundation"]=r()}(this,(()=>(()=>{"use strict";var e={9314:(e,r,t)=>{t.d(r,{default:()=>b});var o=t(6031),n=t.n(o),a=t(2462),i=t.n(a),l=t(2015),u=t.n(l),p=t(9825),s=t.n(p),d=t(8619),c=t(3294);const m=["name","label","maxLength","required"],f=e=>{var r;let{name:t,label:o,maxLength:a,required:l=!1}=e,p=i()(e,m);const[s,f]=(0,c.useField)(t),b=(null===(r=s.value)||void 0===r?void 0:r.length)||0;let x="";return o&&(x=l?`${o} *`:o),u().createElement(d.Box,null,u().createElement(d.TextField,n()({name:t,label:x},s,{onBlur:s.onBlur,margin:"normal",error:f.touched&&Boolean(f.error),helperText:f.touched&&f.error,slotProps:{htmlInput:{maxLength:a}}},p)),a&&u().createElement(d.Typography,{sx:{fontSize:"1.2rem",color:"#00000099",pl:2}},a-b+" characters left"))};f.propTypes={name:s().string.isRequired,label:s().string,maxLength:s().number,required:s().bool};const b=f},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},8619:e=>{e.exports=require("@mui/material")},3294:e=>{e.exports=require("formik")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")}},r={};function t(o){var n=r[o];if(void 0!==n)return n.exports;var a=r[o]={exports:{}};return e[o](a,a.exports,t),a.exports}(()=>{t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r}})(),(()=>{t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})}})(),(()=>{t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r)})(),(()=>{t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var o={};t.r(o),t.d(o,{default:()=>m});var n=t(6031),a=t.n(n),i=t(2015),l=t.n(i),u=t(9825),p=t.n(u),s=t(9314);const d=["e","E","+","-"],c=e=>{let r=a()({},e);return l().createElement(s.default,a()({type:"number",onKeyDown:e=>{d.includes(e.key)&&(e.nativeEvent.preventDefault(),e.nativeEvent.stopImmediatePropagation())},inputProps:{min:0,inputMode:"numeric"}},r))};c.propTypes={name:p().string.isRequired,label:p().string};const m=c;return o})()));
//# sourceMappingURL=quantity-field.js.map