UNPKG

@cbpds/web-components

Version:
5 lines 1.81 kB
/*! * CPB Design System web components - built with Stencil */ import{p as n,H as c,h as t,c as o}from"./p-9caf8482.js";import{s as r}from"./p-9c1b2f31.js";const e=":root{--cbp-container-color-text:inherit;--cbp-container-color-background:transparent;--cbp-container-color-inner-background:var(--cbp-container-color-background);--cbp-container-content-padding:0;--cbp-container-inner-width:auto}cbp-container{display:block;color:var(--cbp-container-color-text);background:var(--cbp-container-color-background);padding:var(--cbp-container-content-padding);max-width:100%}cbp-container .cbp-container--inner{display:block;background:var(--cbp-container-color-inner-background);margin:auto;width:var(--cbp-container-inner-width)}";const i=e;const a=n(class n extends c{constructor(){super();this.__registerHost();this.background=undefined;this.textColor=undefined;this.width=undefined;this.sx={}}componentWillLoad(){if(typeof this.sx=="string"){this.sx=JSON.parse(this.sx)||{}}r(this.host,Object.assign({"--cbp-container-color-text":this.textColor,"--cbp-container-color-background":this.background,"--cbp-container-inner-width":this.width},this.sx))}render(){return t(o,{key:"d3646c0825f62fbb3196c0b0ac4e1560dd83eeb3"},t("div",{key:"2b43031637f1670ec2186c5184b20af8285235c9",class:"cbp-container--inner"},t("slot",{key:"6ac0219fbca7b5afecd19ba85983a24ac732b85b"})))}get host(){return this}static get style(){return i}},[4,"cbp-container",{background:[1],textColor:[1,"text-color"],width:[1],sx:[8]}]);function s(){if(typeof customElements==="undefined"){return}const n=["cbp-container"];n.forEach((n=>{switch(n){case"cbp-container":if(!customElements.get(n)){customElements.define(n,a)}break}}))}const b=a;const d=s;export{b as CbpContainer,d as defineCustomElement}; //# sourceMappingURL=cbp-container.js.map