foundation.d.ts 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /**
  2. * @license
  3. * Copyright 2016 Google Inc.
  4. *
  5. * Permission is hereby granted, free of charge, to any person obtaining a copy
  6. * of this software and associated documentation files (the "Software"), to deal
  7. * in the Software without restriction, including without limitation the rights
  8. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. * copies of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be included in
  13. * all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  18. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  19. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  20. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  21. * THE SOFTWARE.
  22. */
  23. import { MDCFoundation } from '@material/base/foundation';
  24. import { MDCCheckboxAdapter } from './adapter';
  25. export declare class MDCCheckboxFoundation extends MDCFoundation<MDCCheckboxAdapter> {
  26. static readonly cssClasses: {
  27. ANIM_CHECKED_INDETERMINATE: string;
  28. ANIM_CHECKED_UNCHECKED: string;
  29. ANIM_INDETERMINATE_CHECKED: string;
  30. ANIM_INDETERMINATE_UNCHECKED: string;
  31. ANIM_UNCHECKED_CHECKED: string;
  32. ANIM_UNCHECKED_INDETERMINATE: string;
  33. BACKGROUND: string;
  34. CHECKED: string;
  35. CHECKMARK: string;
  36. CHECKMARK_PATH: string;
  37. DISABLED: string;
  38. INDETERMINATE: string;
  39. MIXEDMARK: string;
  40. NATIVE_CONTROL: string;
  41. ROOT: string;
  42. SELECTED: string;
  43. UPGRADED: string;
  44. };
  45. static readonly strings: {
  46. ARIA_CHECKED_ATTR: string;
  47. ARIA_CHECKED_INDETERMINATE_VALUE: string;
  48. NATIVE_CONTROL_SELECTOR: string;
  49. TRANSITION_STATE_CHECKED: string;
  50. TRANSITION_STATE_INDETERMINATE: string;
  51. TRANSITION_STATE_INIT: string;
  52. TRANSITION_STATE_UNCHECKED: string;
  53. };
  54. static readonly numbers: {
  55. ANIM_END_LATCH_MS: number;
  56. };
  57. static readonly defaultAdapter: MDCCheckboxAdapter;
  58. private currentCheckState_;
  59. private currentAnimationClass_;
  60. private animEndLatchTimer_;
  61. private enableAnimationEndHandler_;
  62. constructor(adapter?: Partial<MDCCheckboxAdapter>);
  63. init(): void;
  64. destroy(): void;
  65. setDisabled(disabled: boolean): void;
  66. /**
  67. * Handles the animationend event for the checkbox
  68. */
  69. handleAnimationEnd(): void;
  70. /**
  71. * Handles the change event for the checkbox
  72. */
  73. handleChange(): void;
  74. private transitionCheckState_;
  75. private determineCheckState_;
  76. private getTransitionAnimationClass_;
  77. private updateAriaChecked_;
  78. }
  79. export default MDCCheckboxFoundation;