UNPKG

@seniorsistemas/tecnologia-webcomponents

Version:

A webcomponents library for Senior Sistemas - Suite BPM products.

92 lines 12 kB
System.register([ "./index-7074ebb2.system.js", "./defaultTheme-1c011d78.system.js" ], (function(e) { "use strict"; var o, t, i, n, s, a; return { setters: [ function(e) { o = e.r, t = e.f, i = e.h, n = e.e, s = e.g; }, function(e) { a = e.d; } ], execute: function() { var r, l; !function(e) { e.left = "left", e.center = "center", e.right = "right"; }(r || (r = {})), function(e) { e.tiny = "tiny", e.small = "small", e.medium = "medium", e.large = "large", e.giant = "giant"; }(l || (l = {})); e("tec_modal", /** @class */ function() { function class_1(e) { var i = this; o(this, e), this.hidden = t(this, "hidden", 7), this.clickWasInside = !1, this.hasFooterContent = !1, this.openedAuxiliary = !1, this.theme = a, this.opened = !1, this.showCloseIcon = !0, this.dismissOnBackdrop = !0, this.size = l.small, this.fullWidth = !1, this.closeOnEscape = !0, this.blockBodyScroll = !0, this.responsive = !0, this.footerAlign = r.right, this.handleClick = function(e) { !i.clickWasInside && i.dismissOnBackdrop && i.closeModal(e), i.clickWasInside = !1; }, this.closeModal = function(e) { i.opened = !1, i.handleParentOverflow(), i.hidden.emit(e); }, this.handleKeyDown = function(e) { i.opened && "Escape" === e.key && i.closeModal(); }; } return class_1.prototype.watchOpened = function(e) { var o = this; e ? (this.handleParentOverflow(), this.openedAuxiliary = !0) : setTimeout((function() { return o.openedAuxiliary = !1; }), 200); }, class_1.prototype.componentWillLoad = function() { this.hasFooterContent = !!this.hostElement.querySelector('[slot="footer"]'), this.opened && this.handleParentOverflow(), this.openedAuxiliary = this.opened, this.closeOnEscape && document.addEventListener("keydown", this.handleKeyDown); }, class_1.prototype.handleParentOverflow = function() { var e = this.opened && this.blockBodyScroll ? "hidden" : "inherit"; this.hostElement.parentElement.style.overflow = e; }, class_1.prototype.setClickWasInside = function(e) { var o = this; return function() { return o.clickWasInside = e; }; }, class_1.prototype.render = function() { return this.openedAuxiliary && i(n, null, i("div", { class: "modal " + (this.opened && "show-background") + " " + (!this.opened && "remove-background"), onClick: this.handleClick }, i("div", { class: "modal-content " + (this.fullWidth && "full-width") + " " + (this.opened && "open-animation") + " " + (!this.opened && "close-animation") + " " + (this.responsive && "responsive"), onClick: this.setClickWasInside(!0) }, i("div", { class: "modal-title text-title" }, i("h1", { class: "text-2x1" }, this.modalTitle), this.showCloseIcon && i("div", { class: "close-container", onClick: this.closeModal }, i("span", { class: "close" }, i("span", null, "×")))), i("div", { class: "content" }, i("slot", { name: "content" })), this.hasFooterContent && i("div", { class: "footer " + this.footerAlign }, i("div", { class: "footer-content" }, i("slot", { name: "footer" })))))); }, Object.defineProperty(class_1.prototype, "hostElement", { get: function() { return s(this); }, enumerable: !1, configurable: !0 }), Object.defineProperty(class_1, "watchers", { get: function() { return { opened: [ "watchOpened" ] }; }, enumerable: !1, configurable: !0 }), class_1; }()).style = '@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{display:block}:host body{overflow:hidden !important}:host([theme=light]) .modal .modal-content{background:#ffffff;color:#434548}:host([theme=dark]) .modal .modal-content{background:#434548;color:#f6f8fa;border:none}:host([theme=dark]) .modal .modal-content .modal-title{border-bottom:1px solid #5a5c60 !important}:host([theme=dark]) .modal .modal-content .modal-title h1{color:#f6f8fa !important}:host([theme=dark]) .modal .modal-content .footer{border-top:1px solid #5a5c60 !important}:host([size=tiny]) .modal-content{width:20%}:host([size=small]) .modal-content{width:30%}:host([size=medium]) .modal-content{width:40%}:host([size=large]) .modal-content{width:50%}:host([size=giant]) .modal-content{width:60%}.modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;align-items:center;position:fixed;z-index:100;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:black;background-color:rgba(0, 0, 0, 0.6)}.modal.remove-background{-webkit-animation:remove-brackground 100ms forwards;animation:remove-brackground 100ms forwards}.modal.show-background{-webkit-animation:show-background 100ms forwards;animation:show-background 100ms forwards}.modal-content{border-radius:5px;background-color:#fefefe;border:1px solid #858585;width:30%}.modal-content.full-width{width:100% !important;border:none !important}.modal-content.open-animation{-webkit-animation:open-fade 100ms forwards;animation:open-fade 100ms forwards}.modal-content.close-animation{-webkit-animation:close-fade 100ms forwards;animation:close-fade 100ms forwards}.modal-content .modal-title{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-bottom:1px solid #d3d3d3;padding:0 1rem}.modal-content .modal-title h1{color:#212121}.modal-content .modal-title .close-container{margin-left:auto;border-radius:100%;min-width:28px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:150ms;transition:150ms;cursor:pointer}.modal-content .modal-title .close-container:hover{background-color:#e4e4e4}.modal-content .modal-title .close-container .close{color:#646464;font-size:22px;font-weight:bold;padding-bottom:0.125rem}.modal-content .modal-title .close-container .close:hover,.modal-content .modal-title .close-container .close:focus{text-decoration:none}.modal-content .content{padding:1rem;overflow:auto;max-height:70vh}.modal-content .footer{padding:0.7rem 1rem;border-top:1px solid #d3d3d3}.modal-content .footer.center,.modal-content .footer.left,.modal-content .footer.right{display:-ms-flexbox;display:flex}.modal-content .footer.center{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal-content .footer.left .footer-content{margin-right:auto}.modal-content .footer.right .footer-content{margin-left:auto}@media (max-width: 1536px){.responsive{width:40%}:host([size=tiny]) .modal-content{width:30%}:host([size=small]) .modal-content{width:40%}:host([size=medium]) .modal-content{width:40%}:host([size=large]) .modal-content{width:50%}:host([size=giant]) .modal-content{width:60%}}@media (max-width: 1280px){.responsive{width:45%}:host([size=tiny]) .responsive{width:30%}:host([size=small]) .responsive{width:45%}:host([size=medium]) .responsive{width:55%}:host([size=large]) .responsive{width:65%}:host([size=giant]) .responsive{width:75%}}@media (max-width: 1024px){.responsive{width:50%}:host([size=tiny]) .responsive{width:40%}:host([size=small]) .responsive{width:50%}:host([size=medium]) .responsive{width:60%}:host([size=large]) .responsive{width:70%}:host([size=giant]) .responsive{width:80%}}@media (max-width: 768px){.responsive{width:60%}:host([size=tiny]) .responsive{width:50%}:host([size=small]) .responsive{width:60%}:host([size=medium]) .responsive{width:70%}:host([size=large]) .responsive{width:80%}:host([size=giant]) .responsive{width:90%}}@media (max-width: 640px){.responsive{width:70%}:host([size=tiny]) .responsive{width:70%}:host([size=small]) .responsive{width:85%}:host([size=medium]) .responsive{width:90%}:host([size=large]) .responsive{width:95%}:host([size=giant]) .responsive{width:98%}}@-webkit-keyframes open-fade{from{top:10rem;-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}to{top:inherit;-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}}@keyframes open-fade{from{top:10rem;-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}to{top:inherit;-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}}@-webkit-keyframes close-fade{from{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}to{-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}}@keyframes close-fade{from{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}to{-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}}@-webkit-keyframes remove-brackground{from{opacity:1}to{display:none;opacity:0}}@keyframes remove-brackground{from{opacity:1}to{display:none;opacity:0}}@-webkit-keyframes show-background{from{display:none;opacity:0}to{display:hidden;opacity:1}}@keyframes show-background{from{display:none;opacity:0}to{display:hidden;opacity:1}}'; } }; }));