UNPKG

@cbpds/web-components

Version:
5 lines 2.56 kB
/*! * CPB Design System web components - built with Stencil */ import{p as c,H as r,h as o,c as a}from"./p-c5a784ab.js";import{s as t}from"./p-9c1b2f31.js";const e=":root{--cbp-tag-color:var(--cbp-color-info-lighter);--cbp-tag-color-dark:var(--cbp-color-info-darker);--cbp-tag-color-background:var(--cbp-color-info-dark);--cbp-tag-color-background-dark:var(--cbp-color-info-light)}[data-cbp-theme=light] cbp-tag[context*=dark]:not([context=light-always]),[data-cbp-theme=dark] cbp-tag:not([context=dark-inverts]):not([context=light-always]){--cbp-tag-color:var(--cbp-tag-color-dark);--cbp-tag-color-background:var(--cbp-tag-color-background-dark)}cbp-tag{display:inline-flex;gap:var(--cbp-space-1x);align-items:center;color:var(--cbp-tag-color);background-color:var(--cbp-tag-color-background);border-radius:var(--cbp-border-radius-pill);cursor:default;padding:0 var(--cbp-space-3x);text-align:center;font-weight:var(--cbp-font-weight-medium);font-size:var(--cbp-font-size-subhead);line-height:var(--cbp-space-7x);max-width:100%;overflow:hidden;white-space:nowrap}cbp-tag[color=warning]{--cbp-tag-color:var(--cbp-color-text-darker);--cbp-tag-color-dark:var(--cbp-color-text-darker);--cbp-tag-color-background:var(--cbp-color-warning-base);--cbp-tag-color-background-dark:var(--cbp-color-warning-light)}cbp-tag[color=success]{--cbp-tag-color:var(--cbp-color-success-lighter);--cbp-tag-color-dark:var(--cbp-color-success-dark);--cbp-tag-color-background:var(--cbp-color-success-dark);--cbp-tag-color-background-dark:var(--cbp-color-success-lighter)}cbp-tag[color=danger]{--cbp-tag-color:var(--cbp-color-text-lightest);--cbp-tag-color-dark:var(--cbp-color-text-darkest);--cbp-tag-color-background:var(--cbp-color-danger-dark);--cbp-tag-color-background-dark:var(--cbp-color-danger-light)}";const b=e;const n=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)||{}}t(this.host,Object.assign({},this.sx))}render(){return o(a,{key:"536dbbe8ddc20183f4971da49c1fd7065973f920"},o("slot",{key:"a744c71b721be056d2630f5f562446e63aa86d05"}))}get host(){return this}static get style(){return b}},[4,"cbp-tag",{color:[513],context:[513],sx:[8]}]);function l(){if(typeof customElements==="undefined"){return}const c=["cbp-tag"];c.forEach((c=>{switch(c){case"cbp-tag":if(!customElements.get(c)){customElements.define(c,n)}break}}))}const p=n;const s=l;export{p as CbpTag,s as defineCustomElement}; //# sourceMappingURL=cbp-tag.js.map