UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

4 lines 1.16 kB
/*! * KoliBri - The accessible HTML-Standard */ import{I as InputPasswordController}from"./controller5.js";import{v as validateSpellCheck}from"./spell-check.js";import{w as watchValidator}from"./prop.validators.js";import{v as validateSuggestions}from"./suggestions.js";const inputTextTypeOptions=["text","search","url","tel"];class InputTextEmailController extends InputPasswordController{constructor(t,e,o){super(t,e,o),this.component=t}validateSuggestions(t){validateSuggestions(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class InputTextController extends InputTextEmailController{constructor(t,e,o){super(t,e,o),this.hasError=!1,this.component=t}validateSpellCheck(t){validateSpellCheck(this.component,t)}validateType(t){watchValidator(this.component,"_type",(t=>"string"==typeof t&&inputTextTypeOptions.includes(t)),new Set([`String {${inputTextTypeOptions.join(", ")}`]),t)}componentWillLoad(){super.componentWillLoad(),this.validateSpellCheck(this.component._spellCheck),this.validateType(this.component._type)}}export{InputTextEmailController as I,InputTextController as a};