ion-note.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 noteIosCss = ":host{color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-350, var(--ion-text-color-step-650, #a6a6a6));font-size:max(14px, 1rem)}";
  8. const IonNoteIosStyle0 = noteIosCss;
  9. const noteMdCss = ":host{color:var(--color);font-family:var(--ion-font-family, inherit);-webkit-box-sizing:border-box;box-sizing:border-box}:host(.ion-color){color:var(--ion-color-base)}:host{--color:var(--ion-color-step-600, var(--ion-text-color-step-400, #666666));font-size:0.875rem}";
  10. const IonNoteMdStyle0 = noteMdCss;
  11. const Note = /*@__PURE__*/ proxyCustomElement(class Note 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: '3c3d9b2aa805c0bc1fdc6270a2bbf4dcc1b96c5b', class: createColorClasses(this.color, {
  21. [mode]: true,
  22. }) }, h("slot", { key: '39e34682009fcb705ecafe51825162734bdf14d3' })));
  23. }
  24. static get style() { return {
  25. ios: IonNoteIosStyle0,
  26. md: IonNoteMdStyle0
  27. }; }
  28. }, [33, "ion-note", {
  29. "color": [513]
  30. }]);
  31. function defineCustomElement$1() {
  32. if (typeof customElements === "undefined") {
  33. return;
  34. }
  35. const components = ["ion-note"];
  36. components.forEach(tagName => { switch (tagName) {
  37. case "ion-note":
  38. if (!customElements.get(tagName)) {
  39. customElements.define(tagName, Note);
  40. }
  41. break;
  42. } });
  43. }
  44. const IonNote = Note;
  45. const defineCustomElement = defineCustomElement$1;
  46. export { IonNote, defineCustomElement };