12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /*!
- * (C) Ionic http://ionicframework.com - MIT License
- */
- 'use strict';
- Object.defineProperty(exports, '__esModule', { value: true });
- const index = require('./index-2e236a04.js');
- const ionicGlobal = require('./ionic-global-6dea5a96.js');
- require('./index-cc858e97.js');
- const backdropIosCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
- const IonBackdropIosStyle0 = backdropIosCss;
- const backdropMdCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
- const IonBackdropMdStyle0 = backdropMdCss;
- const Backdrop = class {
- constructor(hostRef) {
- index.registerInstance(this, hostRef);
- this.ionBackdropTap = index.createEvent(this, "ionBackdropTap", 7);
- this.visible = true;
- this.tappable = true;
- this.stopPropagation = true;
- }
- onMouseDown(ev) {
- this.emitTap(ev);
- }
- emitTap(ev) {
- if (this.stopPropagation) {
- ev.preventDefault();
- ev.stopPropagation();
- }
- if (this.tappable) {
- this.ionBackdropTap.emit();
- }
- }
- render() {
- const mode = ionicGlobal.getIonMode(this);
- return (index.h(index.Host, { key: '7abaf2c310aa399607451b14063265e8a5846938', "aria-hidden": "true", class: {
- [mode]: true,
- 'backdrop-hide': !this.visible,
- 'backdrop-no-tappable': !this.tappable,
- } }));
- }
- };
- Backdrop.style = {
- ios: IonBackdropIosStyle0,
- md: IonBackdropMdStyle0
- };
- exports.ion_backdrop = Backdrop;
|