UNPKG

@cbpds/web-components

Version:
5 lines 2.01 kB
/*! * CPB Design System web components - built with Stencil */ import{p as c,H as r,h as o,c as e}from"./p-9caf8482.js";import{s as a}from"./p-9c1b2f31.js";const t=":root{--cbp-badge-color:var(--cbp-color-text-lightest);--cbp-badge-color-dark:var(--cbp-color-info-darker);--cbp-badge-color-background:var(--cbp-color-info-base);--cbp-badge-color-background-dark:var( --cbp-color-interactive-secondary-lighter)}[data-cbp-theme=light] cbp-badge[context*=dark]:not([context=light-always]),[data-cbp-theme=dark] cbp-badge:not([context=dark-inverts]):not([context=light-always]){--cbp-badge-color:var(--cbp-badge-color-dark);--cbp-badge-color-background:var(--cbp-badge-color-background-dark)}cbp-badge{display:inline-block;width:var(--cbp-space-6x);height:var(--cbp-space-6x);color:var(--cbp-badge-color);background-color:var(--cbp-badge-color-background);border-radius:var(--cbp-border-radius-pill);cursor:default;font-size:0.625rem;font-weight:var(--cbp-font-weight-black);text-align:center;line-height:var(--cbp-space-6x)}cbp-badge[color=danger]{--cbp-badge-color-dark:var(--cbp-color-danger-darker);--cbp-badge-color-background:var(--cbp-color-danger-dark);--cbp-badge-color-background-dark:var(--cbp-color-danger-light)}";const b=t;const d=c(class c extends r{constructor(){super();this.__registerHost();this.color=undefined;this.context=undefined;this.sx={}}componentWillLoad(){if(typeof this.sx=="string"){this.sx=JSON.parse(this.sx)||{}}a(this.host,Object.assign({},this.sx))}render(){return o(e,{key:"82bdb09f322ef6d4fedb7cc1bff6a854ffe7af67"},o("slot",{key:"37de2b5506ac3812a8fe85f908cd67d3b41f5d9f"}))}get host(){return this}static get style(){return b}},[4,"cbp-badge",{color:[513],context:[513],sx:[8]}]);function n(){if(typeof customElements==="undefined"){return}const c=["cbp-badge"];c.forEach((c=>{switch(c){case"cbp-badge":if(!customElements.get(c)){customElements.define(c,d)}break}}))}const s=d;const l=n;export{s as CbpBadge,l as defineCustomElement}; //# sourceMappingURL=cbp-badge.js.map