UNPKG

@zoff-tech/zt-bottom-drawer

Version:
56 lines (49 loc) 3.86 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-d7fcb92f.js'); const theme = require('@utils/theme'); const ionicGlobal = require('./ionic-global-70a62cb2.js'); const titleIosCss = ":host{--color:initial;display:flex;flex:1;align-items:center;transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{top:0;-webkit-padding-start:90px;padding-inline-start:90px;-webkit-padding-end:90px;padding-inline-end:90px;padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);position:absolute;width:100%;height:100%;transform:translateZ(0);font-size:17px;font-weight:600;text-align:center;box-sizing:border-box;pointer-events:none}@supports (inset-inline-start: 0){:host{inset-inline-start:0}}@supports not (inset-inline-start: 0){:host{left:0}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports selector(:dir(rtl)){:host:dir(rtl){left:unset;right:unset;right:0}}}:host(.title-small){-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px;padding-top:6px;padding-bottom:16px;position:relative;font-size:13px;font-weight:normal}:host(.title-large){-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px;padding-top:0;padding-bottom:0;transform-origin:left center;bottom:0;align-items:flex-end;min-width:100%;padding-bottom:6px;font-size:34px;font-weight:700;text-align:start}:host(.title-large.title-rtl){transform-origin:right center}:host(.title-large.ion-cloned-element){--color:var(--ion-text-color, #000)}:host(.title-large) .toolbar-title{transform-origin:inherit}:host-context([dir=rtl]):host(.title-large) .toolbar-title,:host-context([dir=rtl]).title-large .toolbar-title{transform-origin:calc(100% - inherit)}@supports selector(:dir(rtl)){:host(.title-large) .toolbar-title:dir(rtl){transform-origin:calc(100% - inherit)}}"; const titleMdCss = ":host{--color:initial;display:flex;flex:1;align-items:center;transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px;padding-top:0;padding-bottom:0;font-size:20px;font-weight:500;letter-spacing:0.0125em}:host(.title-small){width:100%;height:100%;font-size:15px;font-weight:normal}"; const ToolbarTitle = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.ionStyle = index.createEvent(this, "ionStyle", 7); this.color = undefined; this.size = undefined; } sizeChanged() { this.emitStyle(); } connectedCallback() { this.emitStyle(); } emitStyle() { const size = this.getSize(); this.ionStyle.emit({ [`title-${size}`]: true, }); } getSize() { return this.size !== undefined ? this.size : 'default'; } render() { const mode = ionicGlobal.getIonMode(this); const size = this.getSize(); return (index.h(index.Host, { class: theme.createColorClasses(this.color, { [mode]: true, [`title-${size}`]: true, 'title-rtl': document.dir === 'rtl', }) }, index.h("div", { class: "toolbar-title" }, index.h("slot", null)))); } get el() { return index.getElement(this); } static get watchers() { return { "size": ["sizeChanged"] }; } }; ToolbarTitle.style = { ios: titleIosCss, md: titleMdCss }; exports.ion_title = ToolbarTitle; //# sourceMappingURL=ion-title.cjs.entry.js.map