// Generated by dts-bundle v0.7.3 // Dependencies for this module: // ../../@material/base/types // ../../@material/base/component // ../../@material/floating-label/component // ../../@material/line-ripple/component // ../../@material/notched-outline/component // ../../@material/ripple/component // ../../@material/ripple/types // ../../@material/base/foundation declare module '@material/textfield' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ export * from '@material/textfield/adapter'; export * from '@material/textfield/component'; export * from '@material/textfield/constants'; export * from '@material/textfield/foundation'; export * from '@material/textfield/types'; export * from '@material/textfield/character-counter/index'; export * from '@material/textfield/helper-text/index'; export * from '@material/textfield/icon/index'; } declare module '@material/textfield/adapter' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { EventType, SpecificEventListener } from '@material/base/types'; import { MDCTextFieldNativeInputElement } from '@material/textfield/types'; /** * Defines the shape of the adapter expected by the foundation. * Implement this adapter for your framework of choice to delegate updates to * the component in your framework of choice. See architecture documentation * for more details. * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md */ export interface MDCTextFieldAdapter extends MDCTextFieldRootAdapter, MDCTextFieldInputAdapter, MDCTextFieldLabelAdapter, MDCTextFieldLineRippleAdapter, MDCTextFieldOutlineAdapter { } export interface MDCTextFieldRootAdapter { /** * Adds a class to the root Element. */ addClass(className: string): void; /** * Removes a class from the root Element. */ removeClass(className: string): void; /** * @return true if the root element contains the given class name. */ hasClass(className: string): boolean; /** * Registers an event handler on the root element for a given event. */ registerTextFieldInteractionHandler(evtType: K, handler: SpecificEventListener): void; /** * Deregisters an event handler on the root element for a given event. */ deregisterTextFieldInteractionHandler(evtType: K, handler: SpecificEventListener): void; /** * Registers a validation attribute change listener on the input element. * Handler accepts list of attribute names. */ registerValidationAttributeChangeHandler(handler: (attributeNames: string[]) => void): MutationObserver; /** * Disconnects a validation attribute observer on the input element. */ deregisterValidationAttributeChangeHandler(observer: MutationObserver): void; } export interface MDCTextFieldInputAdapter { /** * @return The native `` element, or an object with the same shape. * Note that this method can return null, which the foundation will handle gracefully. */ getNativeInput(): MDCTextFieldNativeInputElement | null; /** * Sets the specified attribute to the specified value on the input element. */ setInputAttr(attr: string, value: string): void; /** * Removes the specified attribute from the input element. */ removeInputAttr(attr: string): void; /** * @return true if the textfield is focused. We achieve this via `document.activeElement === this.root`. */ isFocused(): boolean; /** * Registers an event listener on the native input element for a given event. */ registerInputInteractionHandler(evtType: K, handler: SpecificEventListener): void; /** * Deregisters an event listener on the native input element for a given event. */ deregisterInputInteractionHandler(evtType: K, handler: SpecificEventListener): void; } export interface MDCTextFieldLabelAdapter { /** * Only implement if label exists. * Shakes label if shouldShake is true. */ shakeLabel(shouldShake: boolean): void; /** * Only implement if label exists. * Floats the label above the input element if shouldFloat is true. */ floatLabel(shouldFloat: boolean): void; /** * @return true if label element exists, false if it doesn't. */ hasLabel(): boolean; /** * Only implement if label exists. * @return width of label in pixels. */ getLabelWidth(): number; /** * Only implement if label exists. * Styles the label as required. */ setLabelRequired(isRequired: boolean): void; } export interface MDCTextFieldLineRippleAdapter { /** * Activates the line ripple. */ activateLineRipple(): void; /** * Deactivates the line ripple. */ deactivateLineRipple(): void; /** * Sets the transform origin of the line ripple. */ setLineRippleTransformOrigin(normalizedX: number): void; } export interface MDCTextFieldOutlineAdapter { /** * @return true if outline element exists, false if it doesn't. */ hasOutline(): boolean; /** * Only implement if outline element exists. */ notchOutline(labelWidth: number): void; /** * Only implement if outline element exists. * Closes notch in outline element. */ closeOutline(): void; } } declare module '@material/textfield/component' { /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCComponent } from '@material/base/component'; import { MDCFloatingLabelFactory } from '@material/floating-label/component'; import { MDCLineRippleFactory } from '@material/line-ripple/component'; import { MDCNotchedOutlineFactory } from '@material/notched-outline/component'; import { MDCRipple, MDCRippleFactory } from '@material/ripple/component'; import { MDCRippleCapableSurface } from '@material/ripple/types'; import { MDCTextFieldCharacterCounterFactory } from '@material/textfield/character-counter/component'; import { MDCTextFieldFoundation } from '@material/textfield/foundation'; import { MDCTextFieldHelperTextFactory } from '@material/textfield/helper-text/component'; import { MDCTextFieldIconFactory } from '@material/textfield/icon/component'; export class MDCTextField extends MDCComponent implements MDCRippleCapableSurface { static attachTo(root: Element): MDCTextField; ripple: MDCRipple | null; initialize(rippleFactory?: MDCRippleFactory, lineRippleFactory?: MDCLineRippleFactory, helperTextFactory?: MDCTextFieldHelperTextFactory, characterCounterFactory?: MDCTextFieldCharacterCounterFactory, iconFactory?: MDCTextFieldIconFactory, labelFactory?: MDCFloatingLabelFactory, outlineFactory?: MDCNotchedOutlineFactory): void; destroy(): void; /** * Initializes the Text Field's internal state based on the environment's * state. */ initialSyncWithDOM(): void; get value(): string; /** * @param value The value to set on the input. */ set value(value: string); get disabled(): boolean; /** * @param disabled Sets the Text Field disabled or enabled. */ set disabled(disabled: boolean); get valid(): boolean; /** * @param valid Sets the Text Field valid or invalid. */ set valid(valid: boolean); get required(): boolean; /** * @param required Sets the Text Field to required. */ set required(required: boolean); get pattern(): string; /** * @param pattern Sets the input element's validation pattern. */ set pattern(pattern: string); get minLength(): number; /** * @param minLength Sets the input element's minLength. */ set minLength(minLength: number); get maxLength(): number; /** * @param maxLength Sets the input element's maxLength. */ set maxLength(maxLength: number); get min(): string; /** * @param min Sets the input element's min. */ set min(min: string); get max(): string; /** * @param max Sets the input element's max. */ set max(max: string); get step(): string; /** * @param step Sets the input element's step. */ set step(step: string); /** * Sets the helper text element content. */ set helperTextContent(content: string); /** * Sets the aria label of the leading icon. */ set leadingIconAriaLabel(label: string); /** * Sets the text content of the leading icon. */ set leadingIconContent(content: string); /** * Sets the aria label of the trailing icon. */ set trailingIconAriaLabel(label: string); /** * Sets the text content of the trailing icon. */ set trailingIconContent(content: string); /** * Enables or disables the use of native validation. Use this for custom validation. * @param useNativeValidation Set this to false to ignore native input validation. */ set useNativeValidation(useNativeValidation: boolean); /** * Gets the text content of the prefix, or null if it does not exist. */ get prefixText(): string | null; /** * Sets the text content of the prefix, if it exists. */ set prefixText(prefixText: string | null); /** * Gets the text content of the suffix, or null if it does not exist. */ get suffixText(): string | null; /** * Sets the text content of the suffix, if it exists. */ set suffixText(suffixText: string | null); /** * Focuses the input element. */ focus(): void; /** * Recomputes the outline SVG path for the outline element. */ layout(): void; getDefaultFoundation(): MDCTextFieldFoundation; } } declare module '@material/textfield/constants' { /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ const strings: { ARIA_CONTROLS: string; ARIA_DESCRIBEDBY: string; INPUT_SELECTOR: string; LABEL_SELECTOR: string; LEADING_ICON_SELECTOR: string; LINE_RIPPLE_SELECTOR: string; OUTLINE_SELECTOR: string; PREFIX_SELECTOR: string; SUFFIX_SELECTOR: string; TRAILING_ICON_SELECTOR: string; }; const cssClasses: { DISABLED: string; FOCUSED: string; HELPER_LINE: string; INVALID: string; LABEL_FLOATING: string; NO_LABEL: string; OUTLINED: string; ROOT: string; TEXTAREA: string; WITH_LEADING_ICON: string; WITH_TRAILING_ICON: string; }; const numbers: { LABEL_SCALE: number; }; /** * Whitelist based off of https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation * under the "Validation-related attributes" section. */ const VALIDATION_ATTR_WHITELIST: string[]; /** * Label should always float for these types as they show some UI even if value is empty. */ const ALWAYS_FLOAT_TYPES: string[]; export { cssClasses, strings, numbers, VALIDATION_ATTR_WHITELIST, ALWAYS_FLOAT_TYPES }; } declare module '@material/textfield/foundation' { /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCFoundation } from '@material/base/foundation'; import { MDCTextFieldAdapter } from '@material/textfield/adapter'; import { MDCTextFieldFoundationMap } from '@material/textfield/types'; export class MDCTextFieldFoundation extends MDCFoundation { static get cssClasses(): { DISABLED: string; FOCUSED: string; HELPER_LINE: string; INVALID: string; LABEL_FLOATING: string; NO_LABEL: string; OUTLINED: string; ROOT: string; TEXTAREA: string; WITH_LEADING_ICON: string; WITH_TRAILING_ICON: string; }; static get strings(): { ARIA_CONTROLS: string; ARIA_DESCRIBEDBY: string; INPUT_SELECTOR: string; LABEL_SELECTOR: string; LEADING_ICON_SELECTOR: string; LINE_RIPPLE_SELECTOR: string; OUTLINE_SELECTOR: string; PREFIX_SELECTOR: string; SUFFIX_SELECTOR: string; TRAILING_ICON_SELECTOR: string; }; static get numbers(): { LABEL_SCALE: number; }; get shouldFloat(): boolean; get shouldShake(): boolean; /** * See {@link MDCTextFieldAdapter} for typing information on parameters and * return types. */ static get defaultAdapter(): MDCTextFieldAdapter; /** * @param adapter * @param foundationMap Map from subcomponent names to their subfoundations. */ constructor(adapter?: Partial, foundationMap?: Partial); init(): void; destroy(): void; /** * Handles user interactions with the Text Field. */ handleTextFieldInteraction(): void; /** * Handles validation attribute changes */ handleValidationAttributeChange(attributesList: string[]): void; /** * Opens/closes the notched outline. */ notchOutline(openNotch: boolean): void; /** * Activates the text field focus state. */ activateFocus(): void; /** * Sets the line ripple's transform origin, so that the line ripple activate * animation will animate out from the user's click location. */ setTransformOrigin(evt: TouchEvent | MouseEvent): void; /** * Handles input change of text input and text area. */ handleInput(): void; /** * Activates the Text Field's focus state in cases when the input value * changes without user input (e.g. programmatically). */ autoCompleteFocus(): void; /** * Deactivates the Text Field's focus state. */ deactivateFocus(): void; getValue(): string; /** * @param value The value to set on the input Element. */ setValue(value: string): void; /** * @return The custom validity state, if set; otherwise, the result of a * native validity check. */ isValid(): boolean; /** * @param isValid Sets the custom validity state of the Text Field. */ setValid(isValid: boolean): void; /** * @param shouldValidate Whether or not validity should be updated on * value change. */ setValidateOnValueChange(shouldValidate: boolean): void; /** * @return Whether or not validity should be updated on value change. `true` * by default. */ getValidateOnValueChange(): boolean; /** * Enables or disables the use of native validation. Use this for custom * validation. * @param useNativeValidation Set this to false to ignore native input * validation. */ setUseNativeValidation(useNativeValidation: boolean): void; isDisabled(): boolean; /** * @param disabled Sets the text-field disabled or enabled. */ setDisabled(disabled: boolean): void; /** * @param content Sets the content of the helper text. */ setHelperTextContent(content: string): void; /** * Sets the aria label of the leading icon. */ setLeadingIconAriaLabel(label: string): void; /** * Sets the text content of the leading icon. */ setLeadingIconContent(content: string): void; /** * Sets the aria label of the trailing icon. */ setTrailingIconAriaLabel(label: string): void; /** * Sets the text content of the trailing icon. */ setTrailingIconContent(content: string): void; } export default MDCTextFieldFoundation; } declare module '@material/textfield/types' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCTextFieldCharacterCounterFoundation } from '@material/textfield/character-counter/foundation'; import { MDCTextFieldHelperTextFoundation } from '@material/textfield/helper-text/foundation'; import { MDCTextFieldIconFoundation } from '@material/textfield/icon/foundation'; export type MDCTextFieldNativeInputElement = Pick & { validity: Pick; }; export interface MDCTextFieldFoundationMap { helperText: MDCTextFieldHelperTextFoundation; characterCounter: MDCTextFieldCharacterCounterFoundation; leadingIcon: MDCTextFieldIconFoundation; trailingIcon: MDCTextFieldIconFoundation; } } declare module '@material/textfield/character-counter/index' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ export * from '@material/textfield/character-counter/adapter'; export * from '@material/textfield/character-counter/component'; export * from '@material/textfield/character-counter/foundation'; export { cssClasses as characterCountCssClasses, strings as characterCountStrings } from '@material/textfield/character-counter/constants'; } declare module '@material/textfield/helper-text/index' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ export * from '@material/textfield/helper-text/adapter'; export * from '@material/textfield/helper-text/component'; export * from '@material/textfield/helper-text/foundation'; export { cssClasses as helperTextCssClasses, strings as helperTextStrings } from '@material/textfield/helper-text/constants'; } declare module '@material/textfield/icon/index' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ export * from '@material/textfield/icon/adapter'; export * from '@material/textfield/icon/component'; export * from '@material/textfield/icon/foundation'; export { cssClasses as iconCssClasses, strings as iconStrings } from '@material/textfield/icon/constants'; } declare module '@material/textfield/character-counter/component' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCComponent } from '@material/base/component'; import { MDCTextFieldCharacterCounterFoundation } from '@material/textfield/character-counter/foundation'; export type MDCTextFieldCharacterCounterFactory = (el: Element, foundation?: MDCTextFieldCharacterCounterFoundation) => MDCTextFieldCharacterCounter; export class MDCTextFieldCharacterCounter extends MDCComponent { static attachTo(root: Element): MDCTextFieldCharacterCounter; get foundationForTextField(): MDCTextFieldCharacterCounterFoundation; getDefaultFoundation(): MDCTextFieldCharacterCounterFoundation; } } declare module '@material/textfield/helper-text/component' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCComponent } from '@material/base/component'; import { MDCTextFieldHelperTextFoundation } from '@material/textfield/helper-text/foundation'; export type MDCTextFieldHelperTextFactory = (el: Element, foundation?: MDCTextFieldHelperTextFoundation) => MDCTextFieldHelperText; export class MDCTextFieldHelperText extends MDCComponent { static attachTo(root: Element): MDCTextFieldHelperText; get foundationForTextField(): MDCTextFieldHelperTextFoundation; getDefaultFoundation(): MDCTextFieldHelperTextFoundation; } } declare module '@material/textfield/icon/component' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCComponent } from '@material/base/component'; import { MDCTextFieldIconFoundation } from '@material/textfield/icon/foundation'; export type MDCTextFieldIconFactory = (el: Element, foundation?: MDCTextFieldIconFoundation) => MDCTextFieldIcon; export class MDCTextFieldIcon extends MDCComponent { static attachTo(root: Element): MDCTextFieldIcon; get foundationForTextField(): MDCTextFieldIconFoundation; getDefaultFoundation(): MDCTextFieldIconFoundation; } } declare module '@material/textfield/character-counter/foundation' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCFoundation } from '@material/base/foundation'; import { MDCTextFieldCharacterCounterAdapter } from '@material/textfield/character-counter/adapter'; export class MDCTextFieldCharacterCounterFoundation extends MDCFoundation { static get cssClasses(): { ROOT: string; }; static get strings(): { ROOT_SELECTOR: string; }; /** * See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types. */ static get defaultAdapter(): MDCTextFieldCharacterCounterAdapter; constructor(adapter?: Partial); setCounterValue(currentLength: number, maxLength: number): void; } export default MDCTextFieldCharacterCounterFoundation; } declare module '@material/textfield/helper-text/foundation' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCFoundation } from '@material/base/foundation'; import { MDCTextFieldHelperTextAdapter } from '@material/textfield/helper-text/adapter'; export class MDCTextFieldHelperTextFoundation extends MDCFoundation { static get cssClasses(): { HELPER_TEXT_PERSISTENT: string; HELPER_TEXT_VALIDATION_MSG: string; ROOT: string; }; static get strings(): { ARIA_HIDDEN: string; ROLE: string; ROOT_SELECTOR: string; }; /** * See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types. */ static get defaultAdapter(): MDCTextFieldHelperTextAdapter; constructor(adapter?: Partial); getId(): string | null; isVisible(): boolean; /** * Sets the content of the helper text field. */ setContent(content: string): void; isPersistent(): boolean; /** * @param isPersistent Sets the persistency of the helper text. */ setPersistent(isPersistent: boolean): void; /** * @return whether the helper text acts as an error validation message. */ isValidation(): boolean; /** * @param isValidation True to make the helper text act as an error validation message. */ setValidation(isValidation: boolean): void; /** * Makes the helper text visible to the screen reader. */ showToScreenReader(): void; /** * Sets the validity of the helper text based on the input validity. */ setValidity(inputIsValid: boolean): void; } export default MDCTextFieldHelperTextFoundation; } declare module '@material/textfield/icon/foundation' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { MDCFoundation } from '@material/base/foundation'; import { MDCTextFieldIconAdapter } from '@material/textfield/icon/adapter'; export class MDCTextFieldIconFoundation extends MDCFoundation { static get strings(): { ICON_EVENT: string; ICON_ROLE: string; }; static get cssClasses(): { ROOT: string; }; /** * See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types. */ static get defaultAdapter(): MDCTextFieldIconAdapter; constructor(adapter?: Partial); init(): void; destroy(): void; setDisabled(disabled: boolean): void; setAriaLabel(label: string): void; setContent(content: string): void; handleInteraction(evt: MouseEvent | KeyboardEvent): void; } export default MDCTextFieldIconFoundation; } declare module '@material/textfield/character-counter/adapter' { /** * Defines the shape of the adapter expected by the foundation. * Implement this adapter for your framework of choice to delegate updates to * the component in your framework of choice. See architecture documentation * for more details. * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md */ export interface MDCTextFieldCharacterCounterAdapter { /** * Sets the text content of character counter element. */ setContent(content: string): void; } } declare module '@material/textfield/character-counter/constants' { /** * @license * Copyright 2019 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ const cssClasses: { ROOT: string; }; const strings: { ROOT_SELECTOR: string; }; export { strings, cssClasses }; } declare module '@material/textfield/helper-text/adapter' { /** * Defines the shape of the adapter expected by the foundation. * Implement this adapter for your framework of choice to delegate updates to * the component in your framework of choice. See architecture documentation * for more details. * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md */ export interface MDCTextFieldHelperTextAdapter { /** * Adds a class to the helper text element. */ addClass(className: string): void; /** * Removes a class from the helper text element. */ removeClass(className: string): void; /** * Returns whether or not the helper text element contains the given class. */ hasClass(className: string): boolean; /** * @return the specified attribute's value on the helper text element. */ getAttr(attr: string): string | null; /** * Sets an attribute with a given value on the helper text element. */ setAttr(attr: string, value: string): void; /** * Removes an attribute from the helper text element. */ removeAttr(attr: string): void; /** * Sets the text content for the helper text element. */ setContent(content: string): void; } } declare module '@material/textfield/helper-text/constants' { /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ const cssClasses: { HELPER_TEXT_PERSISTENT: string; HELPER_TEXT_VALIDATION_MSG: string; ROOT: string; }; const strings: { ARIA_HIDDEN: string; ROLE: string; ROOT_SELECTOR: string; }; export { strings, cssClasses }; } declare module '@material/textfield/icon/adapter' { /** * @license * Copyright 2017 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ import { EventType, SpecificEventListener } from '@material/base/types'; /** * Defines the shape of the adapter expected by the foundation. * Implement this adapter for your framework of choice to delegate updates to * the component in your framework of choice. See architecture documentation * for more details. * https://github.com/material-components/material-components-web/blob/master/docs/code/architecture.md */ export interface MDCTextFieldIconAdapter { /** * Gets the value of an attribute on the icon element. */ getAttr(attr: string): string | null; /** * Sets an attribute on the icon element. */ setAttr(attr: string, value: string): void; /** * Removes an attribute from the icon element. */ removeAttr(attr: string): void; /** * Sets the text content of the icon element. */ setContent(content: string): void; /** * Registers an event listener on the icon element for a given event. */ registerInteractionHandler(evtType: K, handler: SpecificEventListener): void; /** * Deregisters an event listener on the icon element for a given event. */ deregisterInteractionHandler(evtType: K, handler: SpecificEventListener): void; /** * Emits a custom event "MDCTextField:icon" denoting a user has clicked the icon. */ notifyIconAction(): void; } } declare module '@material/textfield/icon/constants' { /** * @license * Copyright 2016 Google Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ const strings: { ICON_EVENT: string; ICON_ROLE: string; }; const cssClasses: { ROOT: string; }; export { strings, cssClasses }; }