UNPKG

@public-ui/components

Version:

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

53 lines (49 loc) 1.79 kB
/*! * KoliBri - The accessible HTML-Standard */ import './common.js'; import { a as watchValidator } from './prop.validators.js'; import { v as validateSpellCheck } from './spell-check.js'; import { v as validateSuggestions } from './suggestions.js'; import { I as InputPasswordController } from './controller7.js'; const inputTextTypeOptions = ['text', 'search', 'url', 'tel']; const isInputTextTypePropType = (value) => { return typeof value === 'string' && inputTextTypeOptions.includes(value); }; const validateTypeInputText = (component, value) => { watchValidator(component, '_type', isInputTextTypePropType, new Set(inputTextTypeOptions), value); }; class InputTextEmailController extends InputPasswordController { constructor(component, name, host) { super(component, name, host); this.component = component; } validateSuggestions(value) { validateSuggestions(this.component, value); } componentWillLoad() { super.componentWillLoad(); this.validateSuggestions(this.component._suggestions); } } class InputTextController extends InputTextEmailController { constructor(component, name, host) { super(component, name, host); this.hasError = false; this.component = component; } validateSpellCheck(value) { validateSpellCheck(this.component, value); } validateType(value) { validateTypeInputText(this.component, value); } componentWillLoad() { super.componentWillLoad(); this.validateSpellCheck(this.component._spellCheck); this.validateType(this.component._type); } } export { InputTextEmailController as I, InputTextController as a }; //# sourceMappingURL=controller6.js.map //# sourceMappingURL=controller6.js.map