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

ons-action-sheet-button.js 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  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-action-sheet-button
  22. * @category dialog
  23. * @modifier destructive
  24. * [en]Shows a "destructive" button (only for iOS).[/en]
  25. * [ja]"destructive"なボタンを表示します(iOSでのみ有効)。[/ja]
  26. * @description
  27. * [en]Component that represent each button of the action sheet.[/en]
  28. * [ja]アクションシートに表示される各ボタンを表現するコンポーネントです。[/ja]
  29. * @seealso ons-action-sheet
  30. * [en]The `<ons-action-sheet>` component[/en]
  31. * [ja]ons-action-sheetコンポーネント[/ja]
  32. * @seealso ons-list-item
  33. * [en]The `<ons-list-item>` component[/en]
  34. * [ja]ons-list-itemコンポーネント[/ja]
  35. * @seealso ons-icon
  36. * [en]The `<ons-icon>` component[/en]
  37. * [ja]ons-iconコンポーネント[/ja]
  38. * @tutorial vanilla/Reference/action-sheet
  39. * @guide appsize.html#removing-icon-packs [en]Removing icon packs.[/en][ja][/ja]
  40. * @guide faq.html#how-can-i-use-custom-icon-packs [en]Adding custom icon packs.[/en][ja][/ja]
  41. * @modifier material
  42. * [en]Display a Material Design action sheet button.[/en]
  43. * [ja]マテリアルデザインのアクションシート用のボタンを表示します。[/ja]
  44. * @example
  45. * <ons-action-sheet id="sheet">
  46. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  47. * <ons-action-sheet-button>Label</ons-action-sheet-button>
  48. * </ons-action-sheet>
  49. *
  50. * <script>
  51. * document.getElementById('sheet').show();
  52. * </script>
  53. */
  54. var ActionSheetButtonElement = function (_BaseButtonElement) {
  55. _inherits(ActionSheetButtonElement, _BaseButtonElement);
  56. function ActionSheetButtonElement() {
  57. _classCallCheck(this, ActionSheetButtonElement);
  58. return _possibleConstructorReturn(this, (ActionSheetButtonElement.__proto__ || _Object$getPrototypeOf(ActionSheetButtonElement)).apply(this, arguments));
  59. }
  60. _createClass(ActionSheetButtonElement, [{
  61. key: '_scheme',
  62. /**
  63. * @attribute icon
  64. * @type {String}
  65. * @description
  66. * [en]Creates an `ons-icon` component with this string. Only visible on Android. Check [See also](#seealso) section for more information.[/en]
  67. * [ja]`ons-icon`コンポーネントを悪性します。Androidでのみ表示されます。[/ja]
  68. */
  69. /**
  70. * @attribute modifier
  71. * @type {String}
  72. * @description
  73. * [en]The appearance of the action sheet button.[/en]
  74. * [ja]アクションシートボタンの見た目を設定します。[/ja]
  75. */
  76. get: function get() {
  77. return {
  78. '': 'action-sheet-button--*',
  79. '.action-sheet-icon': 'action-sheet-icon--*'
  80. };
  81. }
  82. }, {
  83. key: '_defaultClassName',
  84. get: function get() {
  85. return 'action-sheet-button';
  86. }
  87. }, {
  88. key: '_rippleOpt',
  89. get: function get() {
  90. return undefined;
  91. }
  92. }]);
  93. return ActionSheetButtonElement;
  94. }(BaseButtonElement);
  95. export default ActionSheetButtonElement;
  96. onsElements.ActionSheetButton = ActionSheetButtonElement;
  97. customElements.define('ons-action-sheet-button', ActionSheetButtonElement);