foundation.js 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. var MDCFoundation = /** @class */ (function () {
  24. function MDCFoundation(adapter) {
  25. if (adapter === void 0) { adapter = {}; }
  26. this.adapter_ = adapter;
  27. }
  28. Object.defineProperty(MDCFoundation, "cssClasses", {
  29. get: function () {
  30. // Classes extending MDCFoundation should implement this method to return an object which exports every
  31. // CSS class the foundation class needs as a property. e.g. {ACTIVE: 'mdc-component--active'}
  32. return {};
  33. },
  34. enumerable: true,
  35. configurable: true
  36. });
  37. Object.defineProperty(MDCFoundation, "strings", {
  38. get: function () {
  39. // Classes extending MDCFoundation should implement this method to return an object which exports all
  40. // semantic strings as constants. e.g. {ARIA_ROLE: 'tablist'}
  41. return {};
  42. },
  43. enumerable: true,
  44. configurable: true
  45. });
  46. Object.defineProperty(MDCFoundation, "numbers", {
  47. get: function () {
  48. // Classes extending MDCFoundation should implement this method to return an object which exports all
  49. // of its semantic numbers as constants. e.g. {ANIMATION_DELAY_MS: 350}
  50. return {};
  51. },
  52. enumerable: true,
  53. configurable: true
  54. });
  55. Object.defineProperty(MDCFoundation, "defaultAdapter", {
  56. get: function () {
  57. // Classes extending MDCFoundation may choose to implement this getter in order to provide a convenient
  58. // way of viewing the necessary methods of an adapter. In the future, this could also be used for adapter
  59. // validation.
  60. return {};
  61. },
  62. enumerable: true,
  63. configurable: true
  64. });
  65. MDCFoundation.prototype.init = function () {
  66. // Subclasses should override this method to perform initialization routines (registering events, etc.)
  67. };
  68. MDCFoundation.prototype.destroy = function () {
  69. // Subclasses should override this method to perform de-initialization routines (de-registering events, etc.)
  70. };
  71. return MDCFoundation;
  72. }());
  73. export { MDCFoundation };
  74. // tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.
  75. export default MDCFoundation;
  76. //# sourceMappingURL=foundation.js.map