@bulmil/core
Version:

39 lines (34 loc) • 2.91 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { HTMLElement, h, proxyCustomElement } from '@stencil/core/internal/client';
const cardCss = ".card{background-color:white;border-radius:0.25rem;box-shadow:0 0.5em 1em -0.125em rgba(10, 10, 10, 0.1), 0 0px 0 1px rgba(10, 10, 10, 0.02);color:#4a4a4a;max-width:100%;position:relative}.card-footer:first-child,.card-content:first-child,.card-header:first-child{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.card-footer:last-child,.card-content:last-child,.card-header:last-child{border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem}.card-header{background-color:transparent;-ms-flex-align:stretch;align-items:stretch;box-shadow:0 0.125em 0.25em rgba(10, 10, 10, 0.1);display:-ms-flexbox;display:flex}.card-header-title{-ms-flex-align:center;align-items:center;color:#363636;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;font-weight:700;padding:0.75rem 1rem}.card-header-title.is-centered{-ms-flex-pack:center;justify-content:center}.card-header-icon{-moz-appearance:none;-webkit-appearance:none;appearance:none;background:none;border:none;color:currentColor;font-family:inherit;font-size:1em;margin:0;padding:0;-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:0.75rem 1rem}.card-image{display:block;position:relative}.card-image:first-child img{border-top-left-radius:0.25rem;border-top-right-radius:0.25rem}.card-image:last-child img{border-bottom-left-radius:0.25rem;border-bottom-right-radius:0.25rem}.card-content{background-color:transparent;padding:1.5rem}.card-footer{background-color:transparent;border-top:1px solid #ededed;-ms-flex-align:stretch;align-items:stretch;display:-ms-flexbox;display:flex}.card-footer-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;-ms-flex-negative:0;flex-shrink:0;-ms-flex-pack:center;justify-content:center;padding:0.75rem}.card-footer-item:not(:last-child){border-right:1px solid #ededed}.card .media:not(:last-child){margin-bottom:1.5rem}";
let Card = class extends HTMLElement {
constructor() {
super();
this.__registerHost();
}
render() {
return (h("div", { class: {
card: true,
} }, h("slot", null)));
}
static get style() { return cardCss; }
};
Card = /*@__PURE__*/ proxyCustomElement(Card, [4, "bm-card"]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["bm-card"];
components.forEach(tagName => { switch (tagName) {
case "bm-card":
if (!customElements.get(tagName)) {
customElements.define(tagName, Card);
}
break;
} });
}
const BmCard = Card;
const defineCustomElement = defineCustomElement$1;
export { BmCard, defineCustomElement };