UNPKG

@public-ui/components

Version:

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

52 lines (48 loc) 1.81 kB
/*! * KoliBri - The accessible HTML-Standard */ import { b as watchValidator } from './common-Cx_AGO_M.js'; import { v as validateSpellCheck } from './spell-check-BtaQyLZc.js'; import { v as validateSuggestions } from './suggestions-DEcHprcz.js'; import { I as InputPasswordController } from './controller-CJmWOqQQ.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=controller-xXHYiOzQ.js.map //# sourceMappingURL=controller-xXHYiOzQ.js.map