@bulmil/core
Version:

45 lines (40 loc) • 3.2 kB
JavaScript
/*!
* Bulmil - MIT License
*/
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
const notificationCss = ".notification:not(:last-child){margin-bottom:1.5rem}.notification{background-color:hsl(0, 0%, 96%);border-radius:4px;position:relative;padding:1.25rem 2.5rem 1.25rem 1.5rem}.notification a:not(.button):not(.dropdown-item){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code,.notification pre{background:hsl(0, 0%, 100%)}.notification pre code{background:transparent}.notification>.delete{right:0.5rem;position:absolute;top:0.5rem}.notification .title,.notification .subtitle,.notification .content{color:currentColor}.notification.is-white{background-color:hsl(0, 0%, 100%);color:hsl(0, 0%, 4%)}.notification.is-black{background-color:hsl(0, 0%, 4%);color:hsl(0, 0%, 100%)}.notification.is-light{background-color:hsl(0, 0%, 96%);color:rgba(0, 0, 0, 0.7)}.notification.is-dark{background-color:hsl(0, 0%, 21%);color:#fff}.notification.is-primary{background-color:#5851ff;color:#fff}.notification.is-primary.is-light{background-color:#ebebff;color:#0a00f0}.notification.is-link{background-color:#5851ff;color:#fff}.notification.is-link.is-light{background-color:#ebebff;color:#0a00f0}.notification.is-info{background-color:hsl(207, 61%, 53%);color:#fff}.notification.is-info.is-light{background-color:#eff5fb;color:#296fa8}.notification.is-success{background-color:hsl(153, 53%, 53%);color:#fff}.notification.is-success.is-light{background-color:#effaf5;color:#257953}.notification.is-warning{background-color:hsl(44, 100%, 77%);color:rgba(0, 0, 0, 0.7)}.notification.is-warning.is-light{background-color:#fffaeb;color:#946c00}.notification.is-danger{background-color:hsl(348, 86%, 61%);color:#fff}.notification.is-danger.is-light{background-color:#feecf0;color:#cc0f35}";
const BmNotificationStyle0 = notificationCss;
const Notification = /*@__PURE__*/ proxyCustomElement(class Notification extends HTMLElement {
constructor() {
super();
this.__registerHost();
this.color = undefined;
this.dismissable = true;
}
render() {
return (h("div", { key: '62f6e42a4d991ffec6905a2a7dec44dd781a92de', class: {
notification: true,
[this.color]: Boolean(this.color),
} }, this.dismissable && h("button", { key: '5e0e9a94031952eb79b2e9447290c55ac572b3d7', class: "delete" }), h("slot", { key: '4b864e4f03ac7bfc46de35d5f02932a750c1522c' })));
}
static get style() { return BmNotificationStyle0; }
}, [4, "bm-notification", {
"color": [1],
"dismissable": [4]
}]);
function defineCustomElement$1() {
if (typeof customElements === "undefined") {
return;
}
const components = ["bm-notification"];
components.forEach(tagName => { switch (tagName) {
case "bm-notification":
if (!customElements.get(tagName)) {
customElements.define(tagName, Notification);
}
break;
} });
}
const BmNotification = Notification;
const defineCustomElement = defineCustomElement$1;
export { BmNotification, defineCustomElement };