UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

4 lines 1.27 kB
/*! * KoliBri - The accessible HTML-Standard */ const o=()=>"undefined"==typeof window?null:window,s=()=>void 0===o().document?null:o().document;let t=!1,i=!1,n=!1;const e=()=>!0===t,l=o=>{t=!0===o},r=()=>!0===i,d=o=>{i=!0===o},c=()=>!0===n,u=o=>{n=!0===o},a="color: white; background: #666; font-weight: bold; padding: .25em .5em; border-radius: 3px; border: 1px solid #000",f=o=>Array.isArray(o)?o:[o],h=o=>`%c${o}`,v=(o,e)=>"string"==typeof e&&e.length>0?`${h(o)} | ${e}`:h(o),w=(o,e)=>[v(o,null==e?void 0:e.classifier),`${a};${(null==e?void 0:e.overwriteStyle)||""}`],p=(o,e)=>o()||!0===e;class b{constructor(o,e){this.label=o,this.devMode=e}debug(o,e){p(this.devMode,null==e?void 0:e.forceLog)&&console.debug(...w(this.label,e),...f(o))}info(o,e){p(this.devMode,null==e?void 0:e.forceLog)&&console.info(...w(this.label,e),...f(o))}trace(o,e){p(this.devMode,null==e?void 0:e.forceLog)&&console.trace(...w(this.label,e),...f(o))}warn(o,e){p(this.devMode,null==e?void 0:e.forceLog)&&console.warn(...w(this.label,e),...f(o))}error(o,e){console.error(...w(this.label,e),...f(o))}throw(o,e){if(p(this.devMode,null==e?void 0:e.forceLog))throw new Error(...w(this.label,e),...f(o))}}const g=new b("KoliBri",e);export{g as L,r as a,d as b,u as c,o as d,e,c as f,s as g,l as s};