import{r as registerInstance,h,H as Host}from"./index-7f9476af.js";var defaultInputCss=".sc-stencila-input-default-h,stencila-input.sc-stencila-input-default{position:relative;display:block;font-size:1rem}.inline.sc-stencila-input-default-h,stencila-input.inline.sc-stencila-input-default{display:inline-block}.sc-stencila-input-default-h stencila-icon.sc-stencila-input-default,stencila-input.sc-stencila-input-default stencila-icon.sc-stencila-input-default{position:absolute;left:0;padding-left:.5rem;color:#a0aec0;color:var(--color-neutral-500,#a0aec0);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.sc-stencila-input-default-h stencila-icon.sc-stencila-input-default+input.sc-stencila-input-default,stencila-input.sc-stencila-input-default stencila-icon.sc-stencila-input-default+input.sc-stencila-input-default{padding-left:2rem}.sc-stencila-input-default-h input.sc-stencila-input-default,stencila-input.sc-stencila-input-default input.sc-stencila-input-default{width:100%;padding:.25rem .5rem;font-size:1rem;border-radius:.25rem;border:1px solid #e2e8f0;border-color:var(--color-neutral-300,#e2e8f0);background-color:#fff;background-color:var(--color-stock,#fff)}.sc-stencila-input-default-h input.sc-stencila-input-default:active,.sc-stencila-input-default-h input.sc-stencila-input-default:focus,stencila-input.sc-stencila-input-default input.sc-stencila-input-default:active,stencila-input.sc-stencila-input-default input.sc-stencila-input-default:focus{outline:2px solid transparent;outline-offset:2px;border-color:#4299e1;border-color:var(--color-primary-500,#4299e1)}";var inputMaterialCss=".sc-stencila-input-material-h,stencila-input.sc-stencila-input-material{position:relative;display:block;font-size:1rem}.inline.sc-stencila-input-material-h,stencila-input.inline.sc-stencila-input-material{display:inline-block}.sc-stencila-input-material-h stencila-icon.sc-stencila-input-material,stencila-input.sc-stencila-input-material stencila-icon.sc-stencila-input-material{position:absolute;left:0;padding-left:.5rem;color:#a0aec0;color:var(--color-neutral-500,#a0aec0);top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.sc-stencila-input-material-h stencila-icon.sc-stencila-input-material+input.sc-stencila-input-material,stencila-input.sc-stencila-input-material stencila-icon.sc-stencila-input-material+input.sc-stencila-input-material{padding-left:2rem}.sc-stencila-input-material-h input.sc-stencila-input-material,stencila-input.sc-stencila-input-material input.sc-stencila-input-material{width:100%;padding:.5rem;font-size:1rem;border-radius:.25rem;border:1px solid #e2e8f0;border-color:var(--color-neutral-300,#e2e8f0)}.sc-stencila-input-material-h input.sc-stencila-input-material:active,.sc-stencila-input-material-h input.sc-stencila-input-material:focus,stencila-input.sc-stencila-input-material input.sc-stencila-input-material:active,stencila-input.sc-stencila-input-material input.sc-stencila-input-material:focus{outline:2px solid transparent;outline-offset:2px;border-color:#4299e1;border-color:var(--color-primary-500,#4299e1);-webkit-box-shadow:inset 0 0 0 1px var(--color-primary-500);box-shadow:inset 0 0 0 1px var(--color-primary-500)}";var Input=function(){function t(t){registerInstance(this,t);this.autoFocus=false;this.type="text";this.hideLabel=false;this.inline=false;this.required=false;this.value=""}t.prototype.render=function(){var t;var i=this.type==="number"?{type:"text",inputmode:"numeric",pattern:"[0-9]*"}:{type:this.type};var e=this.label===undefined||this.hideLabel?{"aria-label":(t=this.label)!==null&&t!==void 0?t:this.name}:{"aria-labelledby":this.name+"-label"};return h(Host,{class:{inline:this.inline}},this.iconStart&&h("stencila-icon",{icon:this.iconStart}),h("input",Object.assign({},i,e,{autoFocus:this.autoFocus,inputmode:this.inputmode,name:this.name,placeholder:this.placeholder,required:this.required,value:this.value})))};return t}();Input.style={default:defaultInputCss,material:inputMaterialCss};export{Input as stencila_input};