ion-card-title.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*!
  2. * (C) Ionic http://ionicframework.com - MIT License
  3. */
  4. import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
  5. import { c as createColorClasses } from './theme.js';
  6. import { b as getIonMode } from './ionic-global.js';
  7. const cardTitleIosCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-text-color, #000);margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:1.75rem;font-weight:700;line-height:1.2}";
  8. const IonCardTitleIosStyle0 = cardTitleIosCss;
  9. const cardTitleMdCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-850, var(--ion-text-color-step-150, #262626));margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:1.25rem;font-weight:500;line-height:1.2}";
  10. const IonCardTitleMdStyle0 = cardTitleMdCss;
  11. const CardTitle = /*@__PURE__*/ proxyCustomElement(class CardTitle extends HTMLElement {
  12. constructor() {
  13. super();
  14. this.__registerHost();
  15. this.__attachShadow();
  16. this.color = undefined;
  17. }
  18. render() {
  19. const mode = getIonMode(this);
  20. return (h(Host, { key: 'fca001a86396e83718d5211cd71912fdf40dea2f', role: "heading", "aria-level": "2", class: createColorClasses(this.color, {
  21. 'ion-inherit-color': true,
  22. [mode]: true,
  23. }) }, h("slot", { key: '2ba416aed488b2ff462fa75fb3b70373a6dd7da6' })));
  24. }
  25. static get style() { return {
  26. ios: IonCardTitleIosStyle0,
  27. md: IonCardTitleMdStyle0
  28. }; }
  29. }, [33, "ion-card-title", {
  30. "color": [513]
  31. }]);
  32. function defineCustomElement$1() {
  33. if (typeof customElements === "undefined") {
  34. return;
  35. }
  36. const components = ["ion-card-title"];
  37. components.forEach(tagName => { switch (tagName) {
  38. case "ion-card-title":
  39. if (!customElements.get(tagName)) {
  40. customElements.define(tagName, CardTitle);
  41. }
  42. break;
  43. } });
  44. }
  45. const IonCardTitle = CardTitle;
  46. const defineCustomElement = defineCustomElement$1;
  47. export { IonCardTitle, defineCustomElement };