Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

ons-alert-dialog-button.js 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. import _Object$getPrototypeOf from 'babel-runtime/core-js/object/get-prototype-of';
  2. import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
  3. import _createClass from 'babel-runtime/helpers/createClass';
  4. import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
  5. import _inherits from 'babel-runtime/helpers/inherits';
  6. /*
  7. Copyright 2013-2015 ASIAL CORPORATION
  8. Licensed under the Apache License, Version 2.0 (the "License");
  9. you may not use this file except in compliance with the License.
  10. You may obtain a copy of the License at
  11. http://www.apache.org/licenses/LICENSE-2.0
  12. Unless required by applicable law or agreed to in writing, software
  13. distributed under the License is distributed on an "AS IS" BASIS,
  14. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. See the License for the specific language governing permissions and
  16. limitations under the License.
  17. */
  18. import onsElements from '../ons/elements';
  19. import BaseButtonElement from './base/base-button';
  20. /**
  21. * @element ons-alert-dialog-button
  22. * @modifier material
  23. * [en]Material Design alert-dialog button.[/en]
  24. * [ja]マテリアルデザインのボタンを表示します。[/ja]
  25. * @description
  26. * [en][/en]
  27. * [ja][/ja]
  28. * @seealso ons-alert-dialog
  29. * [en]The `<ons-alert-dialog>` component displays a alert dialog.[/en]
  30. * [ja]ons-alert-dialogコンポーネント[/ja]
  31. * @example
  32. * <ons-alert-dialog>
  33. * <div class="alert-dialog-title">Warning!</div>
  34. * <div class="alert-dialog-content">
  35. * An error has occurred!
  36. * </div>
  37. * <div class="alert-dialog-footer">
  38. * <alert-dialog-button onclick="app.close()">Cancel</alert-dialog-button>
  39. * <alert-dialog-button class="alert-dialog-button" onclick="app.close()">OK</alert-dialog-button>
  40. * </div>
  41. * </ons-alert-dialog>
  42. */
  43. var AlertDialogButtonElement = function (_BaseButtonElement) {
  44. _inherits(AlertDialogButtonElement, _BaseButtonElement);
  45. function AlertDialogButtonElement() {
  46. _classCallCheck(this, AlertDialogButtonElement);
  47. return _possibleConstructorReturn(this, (AlertDialogButtonElement.__proto__ || _Object$getPrototypeOf(AlertDialogButtonElement)).apply(this, arguments));
  48. }
  49. _createClass(AlertDialogButtonElement, [{
  50. key: '_scheme',
  51. /**
  52. * @attribute modifier
  53. * @type {String}
  54. * @description
  55. * [en]The appearance of the button.[/en]
  56. * [ja]ボタンの表現を指定します。[/ja]
  57. */
  58. /**
  59. * @attribute disabled
  60. * @description
  61. * [en]Specify if button should be disabled.[/en]
  62. * [ja]ボタンを無効化する場合は指定してください。[/ja]
  63. */
  64. /**
  65. * @property disabled
  66. * @type {Boolean}
  67. * @description
  68. * [en]Whether the element is disabled or not.[/en]
  69. * [ja]無効化されている場合に`true`。[/ja]
  70. */
  71. get: function get() {
  72. return { '': 'alert-dialog-button--*' };
  73. }
  74. }, {
  75. key: '_defaultClassName',
  76. get: function get() {
  77. return 'alert-dialog-button';
  78. }
  79. }, {
  80. key: '_rippleOpt',
  81. get: function get() {
  82. return [this, undefined, { 'modifier': 'light-gray' }];
  83. }
  84. }]);
  85. return AlertDialogButtonElement;
  86. }(BaseButtonElement);
  87. export default AlertDialogButtonElement;
  88. onsElements.AlertDialogButton = AlertDialogButtonElement;
  89. customElements.define('ons-alert-dialog-button', AlertDialogButtonElement);