ion-card-subtitle.js 2.4 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 cardSubtitleIosCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));margin-left:0;margin-right:0;margin-top:0;margin-bottom:4px;padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;font-size:0.75rem;font-weight:700;letter-spacing:0.4px;text-transform:uppercase}";
  8. const IonCardSubtitleIosStyle0 = cardSubtitleIosCss;
  9. const cardSubtitleMdCss = ":host{display:block;position:relative;color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-550, var(--ion-text-color-step-450, #737373));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:0.875rem;font-weight:500}";
  10. const IonCardSubtitleMdStyle0 = cardSubtitleMdCss;
  11. const CardSubtitle = /*@__PURE__*/ proxyCustomElement(class CardSubtitle 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: '84d820a19d9074f9c8bc61ccba1ca40062a60b73', role: "heading", "aria-level": "3", class: createColorClasses(this.color, {
  21. 'ion-inherit-color': true,
  22. [mode]: true,
  23. }) }, h("slot", { key: 'e4d07d395a1f4469a90847636083101b32b776a1' })));
  24. }
  25. static get style() { return {
  26. ios: IonCardSubtitleIosStyle0,
  27. md: IonCardSubtitleMdStyle0
  28. }; }
  29. }, [33, "ion-card-subtitle", {
  30. "color": [513]
  31. }]);
  32. function defineCustomElement$1() {
  33. if (typeof customElements === "undefined") {
  34. return;
  35. }
  36. const components = ["ion-card-subtitle"];
  37. components.forEach(tagName => { switch (tagName) {
  38. case "ion-card-subtitle":
  39. if (!customElements.get(tagName)) {
  40. customElements.define(tagName, CardSubtitle);
  41. }
  42. break;
  43. } });
  44. }
  45. const IonCardSubtitle = CardSubtitle;
  46. const defineCustomElement = defineCustomElement$1;
  47. export { IonCardSubtitle, defineCustomElement };