1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | import { MDCFoundation } from '@material/base/foundation';
|
24 | import { MDCSelectHelperTextAdapter } from './adapter';
|
25 | export declare class MDCSelectHelperTextFoundation extends MDCFoundation<MDCSelectHelperTextAdapter> {
|
26 | static get cssClasses(): {
|
27 | HELPER_TEXT_VALIDATION_MSG: string;
|
28 | HELPER_TEXT_VALIDATION_MSG_PERSISTENT: string;
|
29 | };
|
30 | static get strings(): {
|
31 | ARIA_HIDDEN: string;
|
32 | ROLE: string;
|
33 | };
|
34 | |
35 |
|
36 |
|
37 | static get defaultAdapter(): MDCSelectHelperTextAdapter;
|
38 | constructor(adapter?: Partial<MDCSelectHelperTextAdapter>);
|
39 | /**
|
40 | * @return The ID of the helper text, or null if none is set.
|
41 | */
|
42 | getId(): string | null;
|
43 | /**
|
44 | * @return Whether the helper text is currently visible.
|
45 | */
|
46 | isVisible(): boolean;
|
47 | /**
|
48 | * Sets the content of the helper text field.
|
49 | */
|
50 | setContent(content: string): void;
|
51 | /**
|
52 | * Sets the helper text to act as a validation message.
|
53 | * By default, validation messages are hidden when the select is valid and
|
54 | * visible when the select is invalid.
|
55 | *
|
56 | * @param isValidation True to make the helper text act as an error validation
|
57 | * message.
|
58 | */
|
59 | setValidation(isValidation: boolean): void;
|
60 | /**
|
61 | * Sets the persistency of the validation helper text.
|
62 | * This keeps the validation message visible even if the select is valid,
|
63 | * though it will be displayed in the normal (grey) color.
|
64 | */
|
65 | setValidationMsgPersistent(isPersistent: boolean): void;
|
66 | /**
|
67 | * @return Whether the helper text acts as a validation message.
|
68 | * By default, validation messages are hidden when the select is valid and
|
69 | * visible when the select is invalid.
|
70 | */
|
71 | getIsValidation(): boolean;
|
72 | /**
|
73 | * @return Whether the validation helper text persists even if the input is
|
74 | * valid. If it is, it will be displayed in the normal (grey) color.
|
75 | */
|
76 | getIsValidationMsgPersistent(): boolean;
|
77 | /**
|
78 | * When acting as a validation message, shows/hides the helper text and
|
79 | * triggers alerts as necessary based on the select's validity.
|
80 | */
|
81 | setValidity(selectIsValid: boolean): void;
|
82 | /**
|
83 | * Makes the helper text visible to screen readers.
|
84 | */
|
85 | private showToScreenReader;
|
86 | /**
|
87 | * Hides the help text from screen readers.
|
88 | */
|
89 | private hide;
|
90 | }
|
91 | export default MDCSelectHelperTextFoundation;
|