import{r as t,h as i,e}from"./p-5da71329.js";const n=".sc-stencila-input-default-h,stencila-input.sc-stencila-input-default{display:block;font-size:1rem;line-height:1.5rem;line-height:1;position:relative}.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{color:#6e7591;color:var(--color-neutral-500,#6e7591);left:0;padding-left:.5rem;position:absolute;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{background-color:#fff;background-color:var(--color-stock,#fff);border:1px solid #cfd2e1;border-color:var(--color-neutral-100,#cfd2e1);border-radius:.25rem;font-size:1rem;line-height:1.5rem;line-height:1;padding:.25rem .5rem;width:100%}.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{border-color:#2069f2;border-color:var(--color-primary-500,#2069f2);outline:2px solid transparent;outline-offset:2px}";const a=".sc-stencila-input-material-h,stencila-input.sc-stencila-input-material{display:block;font-size:1rem;line-height:1.5rem;line-height:1;position:relative}.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{color:#6e7591;color:var(--color-neutral-500,#6e7591);left:0;padding-left:.5rem;position:absolute;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{border:1px solid #cfd2e1;border-color:var(--color-neutral-100,#cfd2e1);border-radius:.25rem;font-size:1rem;line-height:1.5rem;line-height:1;padding:.5rem;width:100%}.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{border-color:#2069f2;border-color:var(--color-primary-500,#2069f2);outline:2px solid transparent;outline-offset:2px}.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{-webkit-box-shadow:inset 0 0 0 1px var(--color-primary-500);box-shadow:inset 0 0 0 1px var(--color-primary-500)}";let l=class{constructor(i){t(this,i);this.autoFocus=false;this.type="text";this.hideLabel=false;this.inline=false;this.required=false;this.value=""}render(){var t;const n=this.type==="number"?{type:"text",inputmode:"numeric",pattern:"[0-9]*"}:{type:this.type};const a=this.label===undefined||this.hideLabel?{"aria-label":(t=this.label)!==null&&t!==void 0?t:this.name}:{"aria-labelledby":`${this.name}-label`};return i(e,{class:{inline:this.inline}},this.iconStart!==undefined&&i("stencila-icon",{icon:this.iconStart}),i("input",Object.assign({},n,a,{autoFocus:this.autoFocus,inputmode:this.inputmode,name:this.name,placeholder:this.placeholder,required:this.required,value:this.value})))}};l.style={default:n,material:a};export{l as stencila_input};
//# sourceMappingURL=p-ed0c7e1b.entry.js.map