@public-ui/components 1.1.13-rc.3 → 1.1.13-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.13-rc.3",
2
+ "version": "1.1.13-rc.5",
3
3
  "tags": [
4
4
  {
5
5
  "name": "kol-abbr",
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - the accessible web component library
3
3
  */
4
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-e6ae017d.js"),buttonLink=require("./button-link-cc75238e.js"),dev_utils=require("./dev.utils-d0a4bbec.js"),prop_validators=require("./prop.validators-ceab7fc7.js");require("./index.m-d4f02c88.js"),require("./a11y.tipps-c34c01ad.js"),require("./index-4daefa9b.js");const defaultStyleCss='kol-badge,.tooltip{font-size:1rem;position:fixed;animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;display:none;z-index:1000;max-width:300px;box-shadow:0 0 0.15rem rgba(255, 255, 255, 0.8)}kol-badge::after,.tooltip::after{content:" ";position:absolute;border-style:solid;border-width:5px}kol-badge.arrow-left::after,.tooltip.arrow-left::after{margin-top:-5px;top:50%;right:100%;border-color:transparent black transparent transparent}kol-badge.arrow-right::after,.tooltip.arrow-right::after{margin-top:-5px;top:50%;left:100%;border-color:transparent transparent transparent black}kol-badge.arrow-top::after,.tooltip.arrow-top::after{margin-left:-5px;left:50%;bottom:100%;border-color:transparent transparent black transparent}kol-badge.arrow-bottom::after,.tooltip.arrow-bottom::after{margin-left:-5px;left:50%;top:100%;border-color:black transparent transparent transparent}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}',KolTooltip=class{constructor(t){index.registerInstance(this,t),this.hydrated=!1,this.hostElement=null,this.childElements=[],this.alignTooltip=()=>{const t=this.childElements[0];{const e=t.getBoundingClientRect();if(this.tooltipElement instanceof HTMLElement){switch(this.state._align){case"top":case"bottom":this.tooltipElement.style.left=e.left+t.offsetWidth/2-this.tooltipElement.offsetWidth/2+"px";break;default:this.tooltipElement.style.top=e.top+e.height/2-this.tooltipElement.offsetHeight/2+"px"}switch(this.state._align){case"left":this.tooltipElement.style.left=`calc(${e.left-this.tooltipElement.offsetWidth}px - 0.5em)`;break;case"right":this.tooltipElement.style.left=`calc(${e.right}px + 0.5em)`;break;case"bottom":this.tooltipElement.style.top=`calc(${e.bottom}px + 0.5em)`;break;default:this.tooltipElement.style.top=`calc(${e.top-this.tooltipElement.offsetHeight}px - 0.5em)`}}}},this.showTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","block"),dev_utils.getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"))},this.hideTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(dev_utils.getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.catchHostElement=t=>{if(this.hostElement=t,this.hostElement instanceof HTMLElement){const t=this.hostElement.previousElementSibling;t instanceof HTMLElement&&(t.removeEventListener("mouseover",this.showTooltip),t.addEventListener("mouseover",this.showTooltip),t.removeEventListener("focus",this.showTooltip),t.addEventListener("focus",this.showTooltip),t.removeEventListener("mouseout",this.hideTooltip),t.addEventListener("mouseout",this.hideTooltip),t.removeEventListener("blur",this.hideTooltip),t.addEventListener("blur",this.hideTooltip),this.childElements.push(t))}},this.catchTooltipElement=t=>{this.tooltipElement=t},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:dev_utils.nonce(),_label:""}}render(){const t=setTimeout((()=>{clearTimeout(t),this.alignTooltip()}),250);return index.h(index.Host,{ref:this.catchHostElement,style:{maxWidth:"300px"}},""!==this.state._label&&index.h("kol-badge",{class:{"arrow-bottom":"top"===this.state._align,"arrow-left":"right"===this.state._align,"arrow-top":"bottom"===this.state._align,"arrow-right":"left"===this.state._align},id:this.state._id,ref:this.catchTooltipElement,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label}))}validateAlign(t){buttonLink.watchTooltipAlignment(this,"_align",t)}validateId(t){prop_validators.watchString(this,"_id",t)}validateLabel(t){prop_validators.watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label),this.hydrated=!0}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};KolTooltip.style={default:defaultStyleCss},exports.kol_tooltip=KolTooltip;
4
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const index=require("./index-e6ae017d.js"),buttonLink=require("./button-link-cc75238e.js"),dev_utils=require("./dev.utils-d0a4bbec.js"),prop_validators=require("./prop.validators-ceab7fc7.js");require("./index.m-d4f02c88.js"),require("./a11y.tipps-c34c01ad.js"),require("./index-4daefa9b.js");const defaultStyleCss='kol-badge,.tooltip{font-size:1rem;position:fixed;animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;display:none;z-index:1000;max-width:300px;box-shadow:0 0 0.15rem rgba(255, 255, 255, 0.8)}kol-badge::after,.tooltip::after{content:" ";position:absolute;border-style:solid;border-width:5px}kol-badge.arrow-left::after,.tooltip.arrow-left::after{margin-top:-5px;top:50%;right:100%;border-color:transparent black transparent transparent}kol-badge.arrow-right::after,.tooltip.arrow-right::after{margin-top:-5px;top:50%;left:100%;border-color:transparent transparent transparent black}kol-badge.arrow-top::after,.tooltip.arrow-top::after{margin-left:-5px;left:50%;bottom:100%;border-color:transparent transparent black transparent}kol-badge.arrow-bottom::after,.tooltip.arrow-bottom::after{margin-left:-5px;left:50%;top:100%;border-color:black transparent transparent transparent}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}',KolTooltip=class{constructor(t){index.registerInstance(this,t),this.hydrated=!1,this.hostElement=null,this.childElements=[],this.alignTooltip=()=>{const t=this.childElements[0];{const e=t.getBoundingClientRect();if(this.tooltipElement instanceof HTMLElement){switch(this.state._align){case"top":case"bottom":this.tooltipElement.style.left=e.left+t.offsetWidth/2-this.tooltipElement.offsetWidth/2+"px";break;default:this.tooltipElement.style.top=e.top+e.height/2-this.tooltipElement.offsetHeight/2+"px"}switch(this.state._align){case"left":this.tooltipElement.style.left=`calc(${e.left-this.tooltipElement.offsetWidth}px - 0.5em)`;break;case"right":this.tooltipElement.style.left=`calc(${e.right}px + 0.5em)`;break;case"bottom":this.tooltipElement.style.top=`calc(${e.bottom}px + 0.5em)`;break;default:this.tooltipElement.style.top=`calc(${e.top-this.tooltipElement.offsetHeight}px - 0.5em)`}}}},this.showTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","block"),dev_utils.getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(dev_utils.getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.catchHostElement=t=>{if(this.hostElement=t,this.hostElement instanceof HTMLElement){const t=this.hostElement.previousElementSibling;t instanceof HTMLElement&&(t.removeEventListener("mouseover",this.showTooltip),t.addEventListener("mouseover",this.showTooltip),t.removeEventListener("focus",this.showTooltip),t.addEventListener("focus",this.showTooltip),t.removeEventListener("mouseout",this.hideTooltip),t.addEventListener("mouseout",this.hideTooltip),t.removeEventListener("blur",this.hideTooltip),t.addEventListener("blur",this.hideTooltip),this.childElements.push(t))}},this.catchTooltipElement=t=>{this.tooltipElement=t},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:dev_utils.nonce(),_label:""}}render(){const t=setTimeout((()=>{clearTimeout(t),this.alignTooltip()}),250);return index.h(index.Host,{ref:this.catchHostElement,style:{maxWidth:"300px"}},""!==this.state._label&&index.h("kol-badge",{class:{"arrow-bottom":"top"===this.state._align,"arrow-left":"right"===this.state._align,"arrow-top":"bottom"===this.state._align,"arrow-right":"left"===this.state._align},id:this.state._id,ref:this.catchTooltipElement,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label}))}validateAlign(t){buttonLink.watchTooltipAlignment(this,"_align",t)}validateId(t){prop_validators.watchString(this,"_id",t)}validateLabel(t){prop_validators.watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label),this.hydrated=!0}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}};KolTooltip.style={default:defaultStyleCss},exports.kol_tooltip=KolTooltip;
@@ -1,4 +1,4 @@
1
1
  /*!
2
2
  * KoliBri - the accessible web component library
3
3
  */
4
- import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{j as watchValidator,B as getDocument,n as nonce,w as watchString}from"./prop.validators.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component6.js";import{d as defineCustomElement$1}from"./component15.js";const watchTooltipAlignment=(t,e,o)=>{watchValidator(t,e,(t=>"top"===t||"right"===t||"bottom"===t||"left"===t),new Set(["TooltipAlignment {top, right, buttom, left}"]),o,{defaultValue:"top"})},defaultStyleCss='kol-badge,.tooltip{font-size:1rem;position:fixed;animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;display:none;z-index:1000;max-width:300px;box-shadow:0 0 0.15rem rgba(255, 255, 255, 0.8)}kol-badge::after,.tooltip::after{content:" ";position:absolute;border-style:solid;border-width:5px}kol-badge.arrow-left::after,.tooltip.arrow-left::after{margin-top:-5px;top:50%;right:100%;border-color:transparent black transparent transparent}kol-badge.arrow-right::after,.tooltip.arrow-right::after{margin-top:-5px;top:50%;left:100%;border-color:transparent transparent transparent black}kol-badge.arrow-top::after,.tooltip.arrow-top::after{margin-left:-5px;left:50%;bottom:100%;border-color:transparent transparent black transparent}kol-badge.arrow-bottom::after,.tooltip.arrow-bottom::after{margin-left:-5px;left:50%;top:100%;border-color:black transparent transparent transparent}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}',KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.hydrated=!1,this.hostElement=null,this.childElements=[],this.alignTooltip=()=>{const t=this.childElements[0];{const e=t.getBoundingClientRect();if(this.tooltipElement instanceof HTMLElement){switch(this.state._align){case"top":case"bottom":this.tooltipElement.style.left=e.left+t.offsetWidth/2-this.tooltipElement.offsetWidth/2+"px";break;default:this.tooltipElement.style.top=e.top+e.height/2-this.tooltipElement.offsetHeight/2+"px"}switch(this.state._align){case"left":this.tooltipElement.style.left=`calc(${e.left-this.tooltipElement.offsetWidth}px - 0.5em)`;break;case"right":this.tooltipElement.style.left=`calc(${e.right}px + 0.5em)`;break;case"bottom":this.tooltipElement.style.top=`calc(${e.bottom}px + 0.5em)`;break;default:this.tooltipElement.style.top=`calc(${e.top-this.tooltipElement.offsetHeight}px - 0.5em)`}}}},this.showTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"))},this.hideTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.catchHostElement=t=>{if(this.hostElement=t,this.hostElement instanceof HTMLElement){const t=this.hostElement.previousElementSibling;t instanceof HTMLElement&&(t.removeEventListener("mouseover",this.showTooltip),t.addEventListener("mouseover",this.showTooltip),t.removeEventListener("focus",this.showTooltip),t.addEventListener("focus",this.showTooltip),t.removeEventListener("mouseout",this.hideTooltip),t.addEventListener("mouseout",this.hideTooltip),t.removeEventListener("blur",this.hideTooltip),t.addEventListener("blur",this.hideTooltip),this.childElements.push(t))}},this.catchTooltipElement=t=>{this.tooltipElement=t},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:""}}render(){const t=setTimeout((()=>{clearTimeout(t),this.alignTooltip()}),250);return h(Host,{ref:this.catchHostElement,style:{maxWidth:"300px"}},""!==this.state._label&&h("kol-badge",{class:{"arrow-bottom":"top"===this.state._align,"arrow-left":"right"===this.state._align,"arrow-top":"bottom"===this.state._align,"arrow-right":"left"===this.state._align},id:this.state._id,ref:this.catchTooltipElement,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label}))}validateAlign(t){watchTooltipAlignment(this,"_align",t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label),this.hydrated=!0}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return{default:defaultStyleCss}}},[32,"kol-tooltip",{_align:[1],_id:[1],_label:[1],state:[32]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip","kol-badge","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-badge":customElements.get(t)||defineCustomElement$3();break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolTooltip as K,defineCustomElement as d,watchTooltipAlignment as w};
4
+ import{proxyCustomElement,HTMLElement,h,Host}from"@stencil/core/internal/client";import{j as watchValidator,B as getDocument,n as nonce,w as watchString}from"./prop.validators.js";import{d as defineCustomElement$3}from"./component2.js";import{d as defineCustomElement$2}from"./component6.js";import{d as defineCustomElement$1}from"./component15.js";const watchTooltipAlignment=(t,e,o)=>{watchValidator(t,e,(t=>"top"===t||"right"===t||"bottom"===t||"left"===t),new Set(["TooltipAlignment {top, right, buttom, left}"]),o,{defaultValue:"top"})},defaultStyleCss='kol-badge,.tooltip{font-size:1rem;position:fixed;animation-name:fadeInOpacity;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.5s;display:none;z-index:1000;max-width:300px;box-shadow:0 0 0.15rem rgba(255, 255, 255, 0.8)}kol-badge::after,.tooltip::after{content:" ";position:absolute;border-style:solid;border-width:5px}kol-badge.arrow-left::after,.tooltip.arrow-left::after{margin-top:-5px;top:50%;right:100%;border-color:transparent black transparent transparent}kol-badge.arrow-right::after,.tooltip.arrow-right::after{margin-top:-5px;top:50%;left:100%;border-color:transparent transparent transparent black}kol-badge.arrow-top::after,.tooltip.arrow-top::after{margin-left:-5px;left:50%;bottom:100%;border-color:transparent transparent black transparent}kol-badge.arrow-bottom::after,.tooltip.arrow-bottom::after{margin-left:-5px;left:50%;top:100%;border-color:black transparent transparent transparent}@keyframes fadeInOpacity{0%{opacity:0}100%{opacity:1}}',KolTooltip=proxyCustomElement(class extends HTMLElement{constructor(){super(),this.__registerHost(),this.hydrated=!1,this.hostElement=null,this.childElements=[],this.alignTooltip=()=>{const t=this.childElements[0];{const e=t.getBoundingClientRect();if(this.tooltipElement instanceof HTMLElement){switch(this.state._align){case"top":case"bottom":this.tooltipElement.style.left=e.left+t.offsetWidth/2-this.tooltipElement.offsetWidth/2+"px";break;default:this.tooltipElement.style.top=e.top+e.height/2-this.tooltipElement.offsetHeight/2+"px"}switch(this.state._align){case"left":this.tooltipElement.style.left=`calc(${e.left-this.tooltipElement.offsetWidth}px - 0.5em)`;break;case"right":this.tooltipElement.style.left=`calc(${e.right}px + 0.5em)`;break;case"bottom":this.tooltipElement.style.top=`calc(${e.bottom}px + 0.5em)`;break;default:this.tooltipElement.style.top=`calc(${e.top-this.tooltipElement.offsetHeight}px - 0.5em)`}}}},this.showTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","block"),getDocument().body.addEventListener("keyup",this.hideTooltipByEscape),this.alignTooltip(),this.tooltipElement.style.setProperty("visibility","visible"),document.addEventListener("scroll",this.alignTooltip))},this.hideTooltip=()=>{this.tooltipElement instanceof HTMLElement&&(this.tooltipElement.style.setProperty("display","none"),this.tooltipElement.style.setProperty("visibility","hidden"),document.removeEventListener("scroll",this.alignTooltip))},this.hideTooltipByEscape=t=>{"Escape"===t.key&&(getDocument().body.removeEventListener("keyup",this.hideTooltipByEscape),this.hideTooltip())},this.catchHostElement=t=>{if(this.hostElement=t,this.hostElement instanceof HTMLElement){const t=this.hostElement.previousElementSibling;t instanceof HTMLElement&&(t.removeEventListener("mouseover",this.showTooltip),t.addEventListener("mouseover",this.showTooltip),t.removeEventListener("focus",this.showTooltip),t.addEventListener("focus",this.showTooltip),t.removeEventListener("mouseout",this.hideTooltip),t.addEventListener("mouseout",this.hideTooltip),t.removeEventListener("blur",this.hideTooltip),t.addEventListener("blur",this.hideTooltip),this.childElements.push(t))}},this.catchTooltipElement=t=>{this.tooltipElement=t},this._align="top",this._id=void 0,this._label=void 0,this.state={_align:"top",_id:nonce(),_label:""}}render(){const t=setTimeout((()=>{clearTimeout(t),this.alignTooltip()}),250);return h(Host,{ref:this.catchHostElement,style:{maxWidth:"300px"}},""!==this.state._label&&h("kol-badge",{class:{"arrow-bottom":"top"===this.state._align,"arrow-left":"right"===this.state._align,"arrow-top":"bottom"===this.state._align,"arrow-right":"left"===this.state._align},id:this.state._id,ref:this.catchTooltipElement,_color:{backgroundColor:"#333",color:"#ddd"},_label:this.state._label}))}validateAlign(t){watchTooltipAlignment(this,"_align",t)}validateId(t){watchString(this,"_id",t)}validateLabel(t){watchString(this,"_label",t)}componentWillLoad(){this.validateAlign(this._align),this.validateId(this._id),this.validateLabel(this._label),this.hydrated=!0}static get watchers(){return{_align:["validateAlign"],_id:["validateId"],_label:["validateLabel"]}}static get style(){return{default:defaultStyleCss}}},[32,"kol-tooltip",{_align:[1],_id:[1],_label:[1],state:[32]}]);function defineCustomElement(){if("undefined"==typeof customElements)return;["kol-tooltip","kol-badge","kol-icon","kol-span-wc"].forEach((t=>{switch(t){case"kol-tooltip":customElements.get(t)||customElements.define(t,KolTooltip);break;case"kol-badge":customElements.get(t)||defineCustomElement$3();break;case"kol-icon":customElements.get(t)||defineCustomElement$2();break;case"kol-span-wc":customElements.get(t)||defineCustomElement$1()}}))}export{KolTooltip as K,defineCustomElement as d,watchTooltipAlignment as w};