ku4web-components 6.5.5 → 6.5.6
Sign up to get free protection for your applications and to get access to all the features.
- package/angular/index.js +1 -1
- package/angular/index.mjs +1 -1
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/css-shim-f1391d35.js +6 -0
- package/dist/cjs/dom-5345ed9a.js +75 -0
- package/dist/cjs/index-065185f8.js +3093 -0
- package/dist/cjs/index-16f16ed9.js +14 -0
- package/dist/cjs/index-1a439af7.js +14 -0
- package/dist/cjs/index-436596bf.js +10 -0
- package/dist/cjs/index-49d3746b.js +10 -0
- package/dist/cjs/ku4-carousel-controls.cjs.entry.js +2 -2
- package/dist/cjs/ku4-carousel-slide.cjs.entry.js +1 -1
- package/dist/cjs/ku4-carousel.cjs.entry.js +3 -3
- package/dist/cjs/ku4-col.cjs.entry.js +1 -1
- package/dist/cjs/ku4-drawer.cjs.entry.js +1 -1
- package/dist/cjs/ku4-feature.cjs.entry.js +2 -2
- package/dist/cjs/ku4-focus-trap.cjs.entry.js +26 -26
- package/dist/cjs/ku4-form.cjs.entry.js +3 -3
- package/dist/cjs/ku4-grid.cjs.entry.js +1 -1
- package/dist/cjs/ku4-label.cjs.entry.js +2 -2
- package/dist/cjs/ku4-mask.cjs.entry.js +3 -3
- package/dist/cjs/ku4-modal.cjs.entry.js +3 -3
- package/dist/cjs/ku4-panel.cjs.entry.js +1 -1
- package/dist/cjs/ku4-preview.cjs.entry.js +43 -14
- package/dist/cjs/ku4-tab-list.cjs.entry.js +4 -4
- package/dist/cjs/ku4-tab-panel.cjs.entry.js +3 -3
- package/dist/cjs/ku4-tab.cjs.entry.js +3 -3
- package/dist/cjs/ku4-table.cjs.entry.js +1 -1
- package/dist/cjs/ku4-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/ku4-validation.cjs.entry.js +2 -2
- package/dist/cjs/ku4web-components.cjs.js +101 -6
- package/dist/cjs/loader.cjs.js +17 -1
- package/dist/cjs/{uid-d533dbb1.js → uid-7f3954c8.js} +1 -1
- package/dist/cjs/uid-a1348ea5.js +11 -0
- package/dist/collection/capabilities/a11y/aria.js +26 -0
- package/dist/collection/capabilities/angular/index.js +24 -0
- package/dist/collection/capabilities/decorators/deprecated.js +20 -0
- package/dist/collection/capabilities/decorators/index.js +3 -0
- package/dist/collection/capabilities/decorators/memoize.js +7 -0
- package/dist/collection/capabilities/dom/isFocusable.js +7 -0
- package/dist/collection/capabilities/dom/queryFocusable.js +2 -0
- package/dist/collection/capabilities/identity/uid.js +6 -0
- package/dist/collection/capabilities/mask/index.js +5 -0
- package/dist/collection/capabilities/mask/patterns/date.js +40 -0
- package/dist/collection/capabilities/mask/patterns/index.js +7 -0
- package/dist/collection/capabilities/react/index.js +25 -0
- package/dist/collection/capabilities/testing/html.js +14 -0
- package/dist/collection/capabilities/testing/styles.js +14 -0
- package/dist/collection/capabilities/vue/index.js +28 -0
- package/dist/collection/capabilities/vue3/index.js +26 -0
- package/dist/collection/collection-manifest.json +31 -0
- package/dist/collection/components/ku4-carousel/ku4-carousel.css +221 -0
- package/dist/collection/components/ku4-carousel/ku4-carousel.js +369 -0
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.css +32 -0
- package/dist/collection/components/ku4-carousel-controls/ku4-carousel-controls.js +112 -0
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.css +3 -0
- package/dist/collection/components/ku4-carousel-slide/ku4-carousel-slide.js +159 -0
- package/dist/collection/components/ku4-col/ku4-col.css +601 -0
- package/dist/collection/components/ku4-col/ku4-col.js +288 -0
- package/dist/collection/components/ku4-drawer/ku4-drawer.css +56 -0
- package/dist/collection/components/ku4-drawer/ku4-drawer.js +163 -0
- package/dist/collection/components/ku4-feature/ku4-feature.js +70 -0
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.css +3 -0
- package/dist/collection/components/ku4-focus-trap/ku4-focus-trap.js +441 -0
- package/dist/collection/components/ku4-form/ku4-form.js +265 -0
- package/dist/collection/components/ku4-grid/ku4-grid.css +751 -0
- package/dist/collection/components/ku4-grid/ku4-grid.js +408 -0
- package/dist/collection/components/ku4-label/ku4-label.css +36 -0
- package/dist/collection/components/ku4-label/ku4-label.js +115 -0
- package/dist/collection/components/ku4-mask/ku4-mask.css +3 -0
- package/dist/collection/components/ku4-mask/ku4-mask.js +459 -0
- package/dist/collection/components/ku4-modal/ku4-modal.css +85 -0
- package/dist/collection/components/ku4-modal/ku4-modal.js +231 -0
- package/dist/collection/components/ku4-panel/ku4-panel.css +14 -0
- package/dist/collection/components/ku4-panel/ku4-panel.js +119 -0
- package/dist/collection/components/ku4-preview/ku4-preview.css +23 -0
- package/dist/collection/components/ku4-preview/ku4-preview.js +266 -0
- package/dist/collection/components/ku4-tab/ku4-tab.css +82 -0
- package/dist/collection/components/ku4-tab/ku4-tab.js +191 -0
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.css +6 -0
- package/dist/collection/components/ku4-tab-list/ku4-tab-list.js +118 -0
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.css +26 -0
- package/dist/collection/components/ku4-tab-panel/ku4-tab-panel.js +166 -0
- package/dist/collection/components/ku4-table/ku4-table.css +116 -0
- package/dist/collection/components/ku4-table/ku4-table.js +120 -0
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.css +56 -0
- package/dist/collection/components/ku4-tooltip/ku4-tooltip.js +274 -0
- package/dist/collection/components/ku4-validation/ku4-validation.css +19 -0
- package/dist/collection/components/ku4-validation/ku4-validation.js +364 -0
- package/dist/collection/components/ku4-validation/validate.js +14 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/security.js +27 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/css-shim-10e6e2ae.js +4 -0
- package/dist/esm/dom-7cd9cf71.js +73 -0
- package/dist/esm/index-5448a818.js +3 -0
- package/dist/esm/index-6cfd87e4.js +3 -0
- package/dist/esm/index-77bdf1f1.js +3 -0
- package/dist/esm/index-a02dcfc8.js +3057 -0
- package/dist/esm/index-aa119486.js +3 -0
- package/dist/esm/ku4-carousel-controls.entry.js +2 -2
- package/dist/esm/ku4-carousel-slide.entry.js +1 -1
- package/dist/esm/ku4-carousel.entry.js +3 -3
- package/dist/esm/ku4-col.entry.js +1 -1
- package/dist/esm/ku4-drawer.entry.js +1 -1
- package/dist/esm/ku4-feature.entry.js +2 -2
- package/dist/esm/ku4-focus-trap.entry.js +3 -3
- package/dist/esm/ku4-form.entry.js +3 -3
- package/dist/esm/ku4-grid.entry.js +1 -1
- package/dist/esm/ku4-label.entry.js +2 -2
- package/dist/esm/ku4-mask.entry.js +3 -3
- package/dist/esm/ku4-modal.entry.js +3 -3
- package/dist/esm/ku4-panel.entry.js +1 -1
- package/dist/esm/ku4-preview.entry.js +34 -5
- package/dist/esm/ku4-tab-list.entry.js +4 -4
- package/dist/esm/ku4-tab-panel.entry.js +3 -3
- package/dist/esm/ku4-tab.entry.js +3 -3
- package/dist/esm/ku4-table.entry.js +1 -1
- package/dist/esm/ku4-tooltip.entry.js +2 -2
- package/dist/esm/ku4-validation.entry.js +2 -2
- package/dist/esm/ku4web-components.js +101 -6
- package/dist/esm/loader.js +17 -1
- package/dist/esm/uid-3716c2c4.js +9 -0
- package/dist/esm/{uid-fbebccfd.js → uid-d593801c.js} +1 -1
- package/dist/esm-es5/index-5448a818.js +1 -0
- package/dist/esm-es5/index-77bdf1f1.js +1 -0
- package/dist/esm-es5/ku4-carousel-controls.entry.js +1 -1
- package/dist/esm-es5/ku4-carousel.entry.js +1 -1
- package/dist/esm-es5/ku4-feature.entry.js +1 -1
- package/dist/esm-es5/ku4-focus-trap.entry.js +1 -1
- package/dist/esm-es5/ku4-form.entry.js +1 -1
- package/dist/esm-es5/ku4-label.entry.js +1 -1
- package/dist/esm-es5/ku4-mask.entry.js +1 -1
- package/dist/esm-es5/ku4-modal.entry.js +1 -1
- package/dist/esm-es5/ku4-preview.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-list.entry.js +1 -1
- package/dist/esm-es5/ku4-tab-panel.entry.js +1 -1
- package/dist/esm-es5/ku4-tab.entry.js +1 -1
- package/dist/esm-es5/ku4-tooltip.entry.js +1 -1
- package/dist/esm-es5/ku4-validation.entry.js +1 -1
- package/dist/esm-es5/uid-d593801c.js +1 -0
- package/dist/index.js +1 -1
- package/dist/ku4web-components/app-globals-0f993ce5.js +3 -0
- package/dist/ku4web-components/app-globals-497eb362.system.js +1 -0
- package/dist/ku4web-components/css-shim-10e6e2ae.js +4 -0
- package/dist/ku4web-components/css-shim-c8dd4551.system.js +1 -0
- package/dist/ku4web-components/dom-67d1e45e.system.js +21 -0
- package/dist/ku4web-components/dom-7cd9cf71.js +73 -0
- package/dist/ku4web-components/index-1c93827a.system.js +1 -0
- package/dist/ku4web-components/index-29f2b09f.system.js +1 -0
- package/dist/ku4web-components/index-5d0cb00d.system.js +1 -0
- package/dist/ku4web-components/index-6cfd87e4.js +3 -0
- package/dist/ku4web-components/index-a02dcfc8.js +3057 -0
- package/dist/ku4web-components/index-aa119486.js +3 -0
- package/dist/ku4web-components/index.esm.js +1 -0
- package/dist/ku4web-components/index.system.js +1 -0
- package/dist/ku4web-components/ku4-carousel-controls.entry.js +89 -0
- package/dist/ku4web-components/ku4-carousel-controls.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-carousel-slide.entry.js +47 -0
- package/dist/ku4web-components/ku4-carousel-slide.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-carousel.entry.js +175 -0
- package/dist/ku4web-components/ku4-carousel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-col.entry.js +75 -0
- package/dist/ku4web-components/ku4-col.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-drawer.entry.js +35 -0
- package/dist/ku4web-components/ku4-drawer.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-feature.entry.js +29 -0
- package/dist/ku4web-components/ku4-feature.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-focus-trap.entry.js +323 -0
- package/dist/ku4web-components/ku4-focus-trap.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-form.entry.js +120 -0
- package/dist/ku4web-components/ku4-form.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-grid.entry.js +108 -0
- package/dist/ku4web-components/ku4-grid.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-label.entry.js +70 -0
- package/dist/ku4web-components/ku4-label.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-mask.entry.js +343 -0
- package/dist/ku4web-components/ku4-mask.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-modal.entry.js +80 -0
- package/dist/ku4web-components/ku4-modal.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-panel.entry.js +49 -0
- package/dist/ku4web-components/ku4-panel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-preview.entry.js +128 -0
- package/dist/ku4web-components/ku4-preview.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab-list.entry.js +76 -0
- package/dist/ku4web-components/ku4-tab-list.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab-panel.entry.js +72 -0
- package/dist/ku4web-components/ku4-tab-panel.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tab.entry.js +63 -0
- package/dist/ku4web-components/ku4-tab.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-table.entry.js +79 -0
- package/dist/ku4web-components/ku4-table.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-tooltip.entry.js +120 -0
- package/dist/ku4web-components/ku4-tooltip.system.entry.js +1 -0
- package/dist/ku4web-components/ku4-validation.entry.js +162 -0
- package/dist/ku4web-components/ku4-validation.system.entry.js +1 -0
- package/dist/ku4web-components/ku4web-components.css +299 -1
- package/dist/ku4web-components/ku4web-components.esm.js +129 -1
- package/dist/ku4web-components/ku4web-components.js +1 -1
- package/dist/ku4web-components/ku4web-components.system.js +1 -0
- package/dist/ku4web-components/{p-c6a2f4ba.entry.js → p-046b3990.entry.js} +1 -1
- package/dist/ku4web-components/{p-018d598f.entry.js → p-0b777b57.entry.js} +1 -1
- package/dist/ku4web-components/p-0de744b1.system.js +1 -0
- package/dist/ku4web-components/{p-c760ec1e.system.entry.js → p-0f1646ca.system.entry.js} +1 -1
- package/dist/ku4web-components/p-14752b72.system.js +1 -0
- package/dist/ku4web-components/{p-5d39e051.system.entry.js → p-17c2a7ac.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-536d6073.entry.js → p-1abe6f26.entry.js} +1 -1
- package/dist/ku4web-components/{p-7bac5d20.system.entry.js → p-1e19bc01.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-dfc33643.system.entry.js → p-27647af0.system.entry.js} +1 -1
- package/dist/ku4web-components/p-2ee63f57.system.js +1 -1
- package/dist/ku4web-components/{p-973be48d.system.entry.js → p-3deab7f6.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-23b35ab3.system.entry.js → p-4ecd9b1d.system.entry.js} +1 -1
- package/dist/ku4web-components/p-563d1517.system.js +1 -0
- package/dist/ku4web-components/p-5a54ccf4.js +1 -0
- package/dist/ku4web-components/{p-2681e152.system.entry.js → p-5e8921ef.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-6459c75c.system.entry.js → p-6509d3e7.system.entry.js} +1 -1
- package/dist/ku4web-components/p-791e2dfc.js +1 -0
- package/dist/ku4web-components/{p-4a012d6d.entry.js → p-7b6ca6a8.entry.js} +1 -1
- package/dist/ku4web-components/{p-ec165afd.system.entry.js → p-7b93a362.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-2faea8a9.system.entry.js → p-8173d389.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-13c90d3d.system.entry.js → p-96033515.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-e7d401cc.system.entry.js → p-9778d082.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-09fb8c34.entry.js → p-9b01a63a.entry.js} +1 -1
- package/dist/ku4web-components/p-a110d244.js +1 -0
- package/dist/ku4web-components/{p-ff9db3e7.entry.js → p-ac7884f3.entry.js} +1 -1
- package/dist/ku4web-components/{p-27d5ad45.system.entry.js → p-ae7ce1fe.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-be0d8b6a.entry.js → p-b1680ef4.entry.js} +1 -1
- package/dist/ku4web-components/{p-2f1425ac.entry.js → p-bb5410b5.entry.js} +1 -1
- package/dist/ku4web-components/{p-cbee5388.system.entry.js → p-bb698020.system.entry.js} +1 -1
- package/dist/ku4web-components/{p-eed33b36.entry.js → p-d42bd64d.entry.js} +1 -1
- package/dist/ku4web-components/{p-7a3871e3.entry.js → p-d4877fdf.entry.js} +1 -1
- package/dist/ku4web-components/{p-1ebea98a.entry.js → p-da8a8b83.entry.js} +1 -1
- package/dist/ku4web-components/{p-507093a6.entry.js → p-de3b2ba1.entry.js} +1 -1
- package/dist/ku4web-components/{p-f791cd06.entry.js → p-e11fbd79.entry.js} +1 -1
- package/dist/ku4web-components/{p-991d53c6.entry.js → p-ea1961f5.entry.js} +1 -1
- package/dist/ku4web-components/shadow-css-38a1326b.js +388 -0
- package/dist/ku4web-components/shadow-css-7fde17ac.system.js +13 -0
- package/dist/ku4web-components/uid-2ed9f227.system.js +1 -0
- package/dist/ku4web-components/uid-3716c2c4.js +9 -0
- package/package.json +5 -5
- package/react/index.js +1 -1
- package/react/index.mjs +1 -1
- package/vue/index.js +1 -1
- package/vue/index.mjs +1 -1
- package/vue3/index.js +1 -1
- package/vue3/index.mjs +1 -1
- package/dist/cjs/index-57e2cfa5.js +0 -10
- package/dist/cjs/index-b46d22c6.js +0 -14
- package/dist/esm/index-919b08e6.js +0 -3
- package/dist/esm/index-f9890388.js +0 -3
- package/dist/esm-es5/index-919b08e6.js +0 -1
- package/dist/esm-es5/index-f9890388.js +0 -1
- package/dist/esm-es5/uid-fbebccfd.js +0 -1
- package/dist/ku4web-components/p-16f6027a.js +0 -1
- package/dist/ku4web-components/p-50ea6684.js +0 -1
- package/dist/ku4web-components/p-c38c9cd1.system.js +0 -1
- package/dist/ku4web-components/p-cbb6fb91.js +0 -1
- package/dist/ku4web-components/p-e9770900.system.js +0 -1
- package/dist/ku4web-components/p-f8a2bf9b.system.js +0 -1
@@ -1 +1 @@
|
|
1
|
-
import{r as o,c as t,h as e,H as r,g as s}from"./p-016a7b4e.js";import{u as i}from"./p-
|
1
|
+
import{r as o,c as t,h as e,H as r,g as s}from"./p-016a7b4e.js";import{u as i}from"./p-a110d244.js";import"./p-5a54ccf4.js";const c=class{constructor(e){o(this,e),this.tabClick=t(this,"ku4TabClick",7),this.tabKeyUp=t(this,"ku4TabKeyup",7),this.selected=!1}handleClick(o){this.tabClick.emit(o)}handleKeyUp(o){this.tabKeyUp.emit(o)}async select(){this.selected=!0,this.panel.select(),this.host.focus()}async deselect(){this.selected=!1,this.panel.deselect()}async connect(o){o.connect(this)}get id(){return this.host.id||i()}$assignPanel(o){this.panel=o}render(){const{selected:o,panel:t}=this;return e(r,{id:this.host.id||i(),role:"tab",type:"button",tabIndex:o?0:-1,"aria-controls":t&&t.id,"aria-selected":o?"true":"false"},e("slot",null))}get host(){return s(this)}};c.style='button{margin:0;padding:0;border:none;background:transparent;-webkit-appearance:none}:host{position:relative;display:block;width:100%;padding:20px 30px;background-color:#eee;text-align:center;color:#aaa;cursor:pointer}:host(:focus){background-color:#eee;color:#666;z-index:2}:host(:hover){background-color:#eee;color:#666}:host(:active){background-color:#fff;color:#333}:host([selected]){border-top:1px solid #ccc;border-bottom:1px solid #ccc;background-color:#fff;color:#444}button{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%}@media only screen and (min-width: 768px){:host{width:auto;border-top:1px solid #ccc;border-right:1px solid #ccc;border-top-left-radius:4px;border-top-right-radius:4px;background-color:#eee}:host(:first-of-type){border-left:1px solid #ccc}:host([selected]){padding-bottom:1px;border-top:1px solid #ccc;border-bottom:none}:host([selected]):after{content:" ";position:absolute;display:block;left:0;bottom:-1px;width:100%;height:1px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:inherit}}';export{c as ku4_tab}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as a,c as t,h as n,H as o,g as i}from"./p-016a7b4e.js";import{t as r}from"./p-
|
1
|
+
import{r as a,c as t,h as n,H as o,g as i}from"./p-016a7b4e.js";import{t as r}from"./p-5a54ccf4.js";import{D as e,K as m}from"./p-791e2dfc.js";const s=class{constructor(n){a(this,n),this.didDisplay=t(this,"display",7),this.didDismiss=t(this,"dismiss",7),this.visible=!1,this.dismissable=!0,this.dismissible=this.dismissable}handleVisibility(a){a?(e.preventScroll(),r.exists(this.trap)&&this.trap.activate()):(e.resumeScroll(),r.exists(this.trap)&&this.trap.deactivate())}handleKeyUp(a){this.visible&&m.esc.didFire(a)&&this.dismiss()}async display(){this.visible=!0,this.didDisplay.emit(this)}async dismiss(){this.visible=!1,this.didDismiss.emit(this)}componentDidLoad(){try{this.trap=this.host.querySelector("ku4-focus-trap")||document.querySelector(this.focusTrap),this.handleVisibility(this.visible)}catch(a){throw new Error(`Cannot connect ku4-focus-trap: ${a.messsage}`)}}render(){return n(o,{role:"dialog","aria-modal":"true"},n("section",{class:"ku4-modal-content"},n("slot",null)),n("section",{class:"ku4-modal-overlay",onClick:()=>this.dismissible&&this.dismiss(),"aria-hidden":"true"}))}get host(){return i(this)}static get watchers(){return{visible:["handleVisibility"]}}};s.style="@-webkit-keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@keyframes ku4-modal-content-enter{0%{-webkit-transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));transform:var(--ku4-modal-content-animation-start-transform, scale(0.5));opacity:var(--ku4-modal-content-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));transform:var(--ku4-modal-content-animation-mid-transform, scale(1.2));opacity:var(--ku4-modal-content-animation-mid-opacity, 0.8)}100%{-webkit-transform:var(--ku4-modal-content-animation-end-transform, scale(1));transform:var(--ku4-modal-content-animation-end-transform, scale(1));opacity:var(--ku4-modal-content-animation-end-opacity, 1)}}@-webkit-keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}@keyframes ku4-modal-overlay-enter{0%{-webkit-transform:var(--ku4-modal-overlay-animation-start-transform, none);transform:var(--ku4-modal-overlay-animation-start-transform, none);opacity:var(--ku4-modal-overlay-animation-start-opacity, 0)}50%{-webkit-transform:var(--ku4-modal-overlay-animation-mid-transform, none);transform:var(--ku4-modal-overlay-animation-mid-transform, none);opacity:var(--ku4-modal-overlay-animation-mid-opacity, 0.35)}100%{-webkit-transform:var(--ku4-modal-overlay-animation-end-transform, none);transform:var(--ku4-modal-overlay-animation-end-transform, none);opacity:var(--ku4-modal-overlay-animation-end-opacity, 0.4)}}:host{position:fixed;display:none;top:0;left:0;width:100vw;height:100vh;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;background:transparent;overflow:auto;-webkit-transform-style:var(--ku4-modal-transform-style, initial);transform-style:var(--ku4-modal-transform-style, initial)}.ku4-modal-content{position:relative;top:0;left:0}.ku4-modal-overlay{position:fixed;display:-ms-flexbox;display:flex;top:0;left:0;width:100%;height:100%;opacity:0;background:var(--ku4-modal-overlay-background, #000)}:host([visible]){display:-ms-flexbox;display:flex;z-index:var(--ku4-modal-z-index, 5)}:host([visible]) .ku4-modal-content{-webkit-animation-name:ku4-modal-content-enter;animation-name:ku4-modal-content-enter;-webkit-animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);animation-duration:var(--ku4-modal-content-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-content-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-content-transform, none);transform:var(--ku4-modal-content-transform, none);opacity:var(--ku4-modal-content-opacity, 1);z-index:calc(var(--ku4-modal-z-index, 5) + 1)}:host([visible]) .ku4-modal-overlay{-webkit-animation-name:ku4-modal-overlay-enter;animation-name:ku4-modal-overlay-enter;-webkit-animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);animation-duration:var(--ku4-modal-overlay-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);animation-timing-function:var(--ku4-modal-overlay-animation-timing-function, ease);-webkit-transform:var(--ku4-modal-overlay-transform, none);transform:var(--ku4-modal-overlay-transform, none);opacity:var(--ku4-modal-overlay-opacity, 0.4);z-index:calc(var(--ku4-modal-z-index, 5))}:host([visible=false]){display:none}";export{s as ku4_modal}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as o,c as t,h as a,H as r,g as e}from"./p-016a7b4e.js";import{L as i,Y as n,c as s}from"./p-cbb6fb91.js";import{S as u}from"./p-16f6027a.js";const c=class{constructor(a){o(this,a),this.didSlide=t(this,"slide",7),this.swipeTolerance=44,this.auto=!1,this.noSwipe=!1,this.delay=8e3,this.interval=new i(this.delay).onInterval((()=>{this.host.isConnected?this.display("next"):this.disconnectedCallback()})),this.handleMouse=this.handleMouse.bind(this)}async next(){return this.hasSlides?(await this.pause(),this.display("next")):this}async previous(){return this.hasSlides?(await this.pause(),this.display("prev")):this}async slideTo(o){await this.pause();const{slides:t}=this,a=isNaN(o)?t.findIndex((t=>t.getAttribute("name")===o))+1:parseInt(o);if(!(a===this.currentSlideNumber||a<1||this.rolodex.length<a)){const o=a-this.currentSlideNumber,t=o<0?"prev":"next";let r=Math.abs(o);for(;0<--r;)await n(10).then((()=>this.rolodex[t]));this.display(t)}}async pause(){this.interval.clear()}async play(){const{auto:o,interval:t}=this;o&&t.start()}get slides(){return[].slice.call(this.host.children)}get hasSlides(){return this.rolodex&&this.rolodex.length>1}get currentSlideNumber(){const{rolodex:o}=this;return o&&(o.isEmpty?0:o.index+1)}display(o){return window.requestAnimationFrame((()=>{const{previous:t,current:a}=this.slideState,r=this.rolodex[o];t&&t.deactivate(),a.slideOut(o),r.slideIn(o),this.slideState={previous:a,current:r},this.didSlide.emit(this.currentSlideNumber)})),this}handleMouse(o){this.host.contains(o.relatedTarget)||this.play()}componentWillLoad(){let o;this.noSwipe||(this.swipe=new u(this.host,this.swipeTolerance).onLeft((()=>this.next())).onRight((()=>this.previous())));try{o=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){o=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce(((o,t)=>(t.parentNode===this.host&&o.push(t),o)),[])}this.rolodex=new s(o),this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate(),this.slideState={current:this.rolodex.current},this.auto&&(this.host.addEventListener("mouseout",this.handleMouse),this.play())}connectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}disconnectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}render(){const{hasSlides:o,currentSlideNumber:t=1}=this;return a(r,{"aria-roledescription":"carousel",current:t},o&&a("section",{class:"controls"},a("button",{type:"button",class:"prev",onClick:()=>this.previous(),"aria-label":"previous slide"}),a("button",{type:"button",class:"next",onClick:()=>this.next(),"aria-label":"next slide"})),a("section",{class:"slide-container","aria-live":"polite"},a("slot",null)),o&&a("section",{class:"pages"},a("span",{class:"pages-text"},`${t} of ${this.rolodex.length}`)))}get host(){return e(this)}};c.style="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%;left:0}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";export{c as ku4_carousel}
|
1
|
+
import{r as o,c as t,h as a,H as r,g as e}from"./p-016a7b4e.js";import{L as i,Y as n,c as s}from"./p-5a54ccf4.js";import{S as u}from"./p-791e2dfc.js";const c=class{constructor(a){o(this,a),this.didSlide=t(this,"slide",7),this.swipeTolerance=44,this.auto=!1,this.noSwipe=!1,this.delay=8e3,this.interval=new i(this.delay).onInterval((()=>{this.host.isConnected?this.display("next"):this.disconnectedCallback()})),this.handleMouse=this.handleMouse.bind(this)}async next(){return this.hasSlides?(await this.pause(),this.display("next")):this}async previous(){return this.hasSlides?(await this.pause(),this.display("prev")):this}async slideTo(o){await this.pause();const{slides:t}=this,a=isNaN(o)?t.findIndex((t=>t.getAttribute("name")===o))+1:parseInt(o);if(!(a===this.currentSlideNumber||a<1||this.rolodex.length<a)){const o=a-this.currentSlideNumber,t=o<0?"prev":"next";let r=Math.abs(o);for(;0<--r;)await n(10).then((()=>this.rolodex[t]));this.display(t)}}async pause(){this.interval.clear()}async play(){const{auto:o,interval:t}=this;o&&t.start()}get slides(){return[].slice.call(this.host.children)}get hasSlides(){return this.rolodex&&this.rolodex.length>1}get currentSlideNumber(){const{rolodex:o}=this;return o&&(o.isEmpty?0:o.index+1)}display(o){return window.requestAnimationFrame((()=>{const{previous:t,current:a}=this.slideState,r=this.rolodex[o];t&&t.deactivate(),a.slideOut(o),r.slideIn(o),this.slideState={previous:a,current:r},this.didSlide.emit(this.currentSlideNumber)})),this}handleMouse(o){this.host.contains(o.relatedTarget)||this.play()}componentWillLoad(){let o;this.noSwipe||(this.swipe=new u(this.host,this.swipeTolerance).onLeft((()=>this.next())).onRight((()=>this.previous())));try{o=this.host.querySelectorAll(":scope > ku4-carousel-slide")}catch(t){o=[].slice.call(this.host.querySelectorAll("ku4-carousel-slide")).reduce(((o,t)=>(t.parentNode===this.host&&o.push(t),o)),[])}this.rolodex=new s(o),this.rolodex.current&&this.rolodex.current.activate&&this.rolodex.current.activate(),this.slideState={current:this.rolodex.current},this.auto&&(this.host.addEventListener("mouseout",this.handleMouse),this.play())}connectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}disconnectedCallback(){this.swipe&&this.swipe.destroy(),this.host.removeEventListener("mouseout",this.handleMouse),this.interval.clear()}render(){const{hasSlides:o,currentSlideNumber:t=1}=this;return a(r,{"aria-roledescription":"carousel",current:t},o&&a("section",{class:"controls"},a("button",{type:"button",class:"prev",onClick:()=>this.previous(),"aria-label":"previous slide"}),a("button",{type:"button",class:"next",onClick:()=>this.next(),"aria-label":"next slide"})),a("section",{class:"slide-container","aria-live":"polite"},a("slot",null)),o&&a("section",{class:"pages"},a("span",{class:"pages-text"},`${t} of ${this.rolodex.length}`)))}get host(){return e(this)}};c.style="@-webkit-keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-left{0%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@keyframes ku4-carousel-enter-right{0%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}100%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}}@-webkit-keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-left{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);opacity:0}}@-webkit-keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}@keyframes ku4-carousel-exit-right{0%{top:0;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);opacity:1}100%{top:0;-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);opacity:0}}:host{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;overflow:hidden;background-color:var(--ku4-carousel-background-color, #fff)}.slide-container{position:relative;width:100%;height:100%;overflow:hidden}.controls .next,.controls .prev{position:absolute;display:var(--ku4-carousel-controls-display, block);top:var(--ku4-carousel-controls-top, 0);border:var(--ku4-carousel-controls-border, none);background-color:var(--ku4-carousel-controls-background-color, #fff);font-family:var(--ku4-carousel-controls-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-controls-font-weight, 400);font-size:var(--ku4-carousel-controls-font-size, 8px);line-height:var(--ku4-carousel-controls-line-height, 12px);opacity:var(--ku4-carousel-controls-opacity, 0.2);z-index:var(--ku4-carousel-controls-z-index, 2)}.controls .next:focus,.controls .prev:focus{background-color:var(--ku4-carousel-controls-focus-background-color, transparent);outline:var(--ku4-carousel-controls-focus-outline, none);opacity:var(--ku4-carousel-controls-focus-opacity, 0.2)}.controls .next:hover,.controls .prev:hover{background-color:var(--ku4-carousel-controls-hover-background-color, transparent);opacity:var(--ku4-carousel-controls-hover-opacity, 1)}.controls .next{right:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-next-background-image);background-repeat:var(--ku4-carousel-controls-next-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-background-size, 100% 100%)}.controls .next:focus{background-image:var(--ku4-carousel-controls-next-focus-background-image);background-repeat:var(--ku4-carousel-controls-next-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-focus-background-size, 100% 100%)}.controls .next:hover{background-image:var(--ku4-carousel-controls-next-hover-background-image);background-repeat:var(--ku4-carousel-controls-next-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-next-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-next-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-next-hover-background-size, 100% 100%)}.controls .prev{left:0;width:var(--ku4-carousel-controls-next-width, 40px);height:var(--ku4-carousel-controls-next-height, 100%);background-image:var(--ku4-carousel-controls-previous-background-image);background-repeat:var(--ku4-carousel-controls-previous-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-background-size, 100% 100%)}.controls .prev:focus{background-image:var(--ku4-carousel-controls-previous-focus-background-image);background-repeat:var(--ku4-carousel-controls-previous-focus-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-focus-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-focus-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-focus-background-size, 100% 100%)}.controls .prev:hover{background-image:var(--ku4-carousel-controls-previous-hover-background-image);background-repeat:var(--ku4-carousel-controls-previous-hover-background-repeat, no-repeat);background-position-x:var(--ku4-carousel-controls-previous-hover-background-position-x, 0);background-position-y:var(--ku4-carousel-controls-previous-hover-background-position-y, 50%);background-size:var(--ku4-carousel-controls-previous-hover-background-size, 100% 100%)}.pages{position:absolute;display:var(--ku4-carousel-pages-display, block);top:var(--ku4-carousel-pages-top, auto);bottom:var(--ku4-carousel-pages-bottom, 4px);width:var(--ku4-carousel-pages-width, auto);height:var(--ku4-carousel-pages-height, 20px);background-color:var(--ku4-carousel-pages-background-color, transparent);opacity:var(--ku4-carousel-pages-opacity, 0.5);text-align:center;z-index:3}.pages-text{display:inline-block;padding:var(--ku4-carousel-pages-text-padding, 4px);font-family:var(--ku4-carousel-pages-text-font-family, Helvetica, Arial, sans-serif);font-weight:var(--ku4-carousel-pages-text-font-weight, 600);font-size:var(--ku4-carousel-pages-text-font-size, 14px);line-height:var(--ku4-carousel-pages-text-line-height, 16px);color:var(--ku4-carousel-pages-text-color, #aaa)}::slotted(*){position:absolute;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;top:0;left:-100%;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}::slotted(.inactive){position:absolute;height:100%;left:0}::slotted(.inactive.prev){-webkit-animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);animation-name:var(--ku4-carousel-animation-inactive-previous-name, ku4-carousel-exit-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.inactive.next){-webkit-animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);animation-name:var(--ku4-carousel-animation-inactive-next-name, ku4-carousel-exit-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function);animation-timing-function:var(--ku4-carousel-animation-timing-function);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active){position:relative;top:0;left:0;width:auto;height:100%;z-index:1}::slotted(.active.prev){-webkit-animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);animation-name:var(--ku4-carousel-animation-active-previous-name, ku4-carousel-enter-left);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}::slotted(.active.next){-webkit-animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);animation-name:var(--ku4-carousel-animation-active-next-name, ku4-carousel-enter-right);-webkit-animation-duration:var(--ku4-carousel-animation-duration, 0.4s);animation-duration:var(--ku4-carousel-animation-duration, 0.4s);-webkit-animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);animation-timing-function:var(--ku4-carousel-animation-timing-function, ease);-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (hover: hover){.controls:hover{background-color:var(--ku4-carousel-controls-focus-background-color, #fff)}}";export{c as ku4_carousel}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as o,H as i,g as s}from"./p-016a7b4e.js";import{C as r,j as e,M as h}from"./p-
|
1
|
+
import{r as t,h as o,H as i,g as s}from"./p-016a7b4e.js";import{C as r,j as e,M as h}from"./p-5a54ccf4.js";const a=class{constructor(o){t(this,o),this.isShowing=!1,this.show=this.show.bind(this),this.hide=this.hide.bind(this),this._show=this._show.bind(this),this._hide=this._hide.bind(this),this._toggle=this._toggle.bind(this),this.hideTimeout=new r(200).onTimeout(this._hide)}async show(t){this.hideTimeout.clear(),this.host.contains(t)||(this.isShowing=!0,this.host.setAttribute("visible","true"),this.calcualatePosition(t),this.scrollListener=e((()=>this.calcualatePosition(t))),window.addEventListener("scroll",this.scrollListener,{passive:!0}))}async hide(){this.hideTimeout.clear().start()}_show(t){this.show(t.target)}_hide(){window.removeEventListener("scroll",this.scrollListener),this.host.removeAttribute("visible"),this.isShowing=!1}_toggle(t){this.isShowing?this._hide():this._show(t)}calcualatePosition(t){const{left:o,top:i,width:s,height:r}=t.getBoundingClientRect(),{left:e,top:a,width:n,height:p}=this.host.getBoundingClientRect(),l=new h(o,i,s,r),c=new h(e,a,n,p);this.top?(this.host.style.left=l.origin.x+l.dimensions.x/2-c.dimensions.x/2+"px",this.host.style.top=l.origin.y-c.dimensions.y-15+"px"):this.left?(this.host.style.left=l.origin.x-c.dimensions.x-15+"px",this.host.style.top=l.origin.y+l.dimensions.y/2-c.dimensions.y/2+"px"):this.bottom?(this.host.style.left=l.origin.x+l.dimensions.x/2-c.dimensions.x/2+"px",this.host.style.top=`${l.origin.y+l.dimensions.y+15}px`):this.right?(this.host.style.left=`${l.origin.x+l.dimensions.x+15}px`,this.host.style.top=l.origin.y+l.dimensions.y/2-c.dimensions.y/2+"px"):(this.host.style.left=l.origin.x+l.dimensions.x/2-c.dimensions.x/2+"px",this.host.style.top=`${l.origin.y+l.dimensions.y+15}px`)}componentWillLoad(){const{debug:t,element:o,host:i,top:s,left:r,bottom:e,right:h}=this;s||r||e||h||this.host.setAttribute("bottom",""),document.querySelectorAll(o).forEach((o=>{i.addEventListener("mouseover",this._show),o.addEventListener("mouseover",this._show),o.addEventListener("touchstart",this._toggle,{passive:!0}),t||(i.addEventListener("mouseout",this.hide),o.addEventListener("mouseout",this.hide))}))}disconnectedCallback(){const{debug:t,element:o,hideTimeout:i,host:s}=this;document.querySelectorAll(o).forEach((o=>{s.removeEventListener("mouseover",this._show),o.removeEventListener("mouseover",this._show),o.removeEventListener("touchstart",this._toggle),t||(s.removeEventListener("mouseout",this.hide),o.removeEventListener("mouseout",this.hide))})),i.clear()}render(){return o(i,{role:"tooltip"},o("div",{class:"arrow"}),o("div",{class:"content"},o("slot",null)))}get host(){return s(this)}};a.style=":host{position:fixed;display:none;opacity:0;z-index:2;background-color:#fff;border:solid 1px #ccc}:host([visible]){display:block;opacity:1;-webkit-transition:opacity 0.4s;transition:opacity 0.4s}:host .arrow{position:absolute;width:var(--ku4-tooltip-arrow-size, 14px);height:var(--ku4-tooltip-arrow-size, 14px);background-color:inherit;-webkit-transform:rotate(45deg);transform:rotate(45deg);border:inherit;-webkit-box-shadow:var(--ku4-tooltip-arrow-box-shadow, none);box-shadow:var(--ku4-tooltip-arrow-box-shadow, none)}:host .content{position:relative}:host([top]) .arrow{top:calc(100% - var(--ku4-tooltip-arrow-offset, 7px));left:calc(50% - var(--ku4-tooltip-arrow-offset, 7px));border-top:none !important;border-left:none !important}:host([left]) .arrow{top:calc(50% - var(--ku4-tooltip-arrow-offset, 7px));left:calc(100% - var(--ku4-tooltip-arrow-offset, 7px));border-left:none !important;border-bottom:none !important}:host([bottom]) .arrow{left:calc(50% - var(--ku4-tooltip-arrow-offset, 7px));bottom:calc(100% - var(--ku4-tooltip-arrow-offset, 7px));border-bottom:none !important;border-right:none !important}:host([right]) .arrow{top:calc(50% - var(--ku4-tooltip-arrow-offset, 7px));right:calc(100% - var(--ku4-tooltip-arrow-offset, 7px));border-top:none !important;border-right:none !important}";export{a as ku4_tooltip}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as s}from"./p-016a7b4e.js";import{a as i,Y as e,t as h}from"./p-
|
1
|
+
import{r as t,h as s}from"./p-016a7b4e.js";import{a as i,Y as e,t as h}from"./p-5a54ccf4.js";const n=class{constructor(s){t(this,s),this.charIndexes=[],this.reverseCharIndexes=[],this.previousValue="",this.currentValue="",this.touchStart=!1,this.template="",this.ban="",this.pattern="",this.char="_",this.hidden=!1,this.handleFocus=this.handleFocus.bind(this),this.handleBlur=this.handleBlur.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleInput=this.handleInput.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.init()}init(){this.chars=this.char&&new RegExp(this.char),this.banned=this.ban&&new RegExp(this.ban);const t=this.pattern.replace(/[\s\n]/gm,"");return this.patterns=t.substr(1).split(t[0]).map((t=>{try{return t&&new RegExp(t)||null}catch(s){}})),this.charIndexes=this.template.split("").reduce(((t,s,i)=>(this.chars.test(s)&&t.push(i),t)),[]),this.reverseCharIndexes=[...this.charIndexes].reverse(),this}templateHandler(t,s){const{input:e,previousCharIndex:h,previousValue:n,currentValue:r,value:a,char:o}=this,c=i.unmask(n,s,o).length<i.unmask(r,s,o).length?h+1:h;this.init().value=i.mask(i.unmask(a,s,o),t,o),e.setSelectionRange(c,c)}charHandler(t,s){const{value:e,template:h}=this;this.init().value=i.mask(i.unmask(e,h,s),h,t)}get previousCharIndex(){return this.reverseCharIndexes.find((t=>this.selectionStart>t))||this.charIndexes[0]}get value(){return this.currentValue}set value(t){const{chars:s,hidden:i,input:e}=this,h=t.search(s);this.currentValue=t,e.value=i&&h>-1?t.substring(0,h):t}handleTouchStart(){this.touchStart=!0}handleFocus(){if(window.document.documentMode)return;const{input:t,template:s,char:h,chars:n,touchStart:r}=this,a=i.unmask(t.value,s,h),o=i.unmask(this.value,s,h);this.value=i.mask(a!==o?a:o,s,h),e(0).then((()=>{const s=t.value.search(n),i=s<0?t.value.length:s;this.input.setSelectionRange(s<0&&!r?0:i,i),this.touchStart=!1}))}handleBlur(){const{template:t,char:s}=this;h.isEmpty(i.unmask(this.value,t,s))&&(this.value="")}handleKeyDown(t){if(window.document.documentMode)return;const{banned:s,hidden:e,template:h,char:n}=this;t.key&&1===t.key.length&&s&&s.test(t.key)&&!(t.altKey||t.ctrlKey||t.metaKey)&&t.preventDefault(),this.previousValue=e?i.mask(i.unmask(t.target.value,h,n),h,n):t.target.value,this.selectionStart=t.target.selectionStart,this.selectionEnd=t.target.selectionEnd}handleInput(t){if(window.document.documentMode)return;const{input:s,template:e,char:n,chars:r,previousValue:a,banned:o,selectionStart:c,selectionEnd:l,previousCharIndex:u,patterns:d,charIndexes:p,reverseCharIndexes:f}=this;if(r.test(this.previousValue)||"input"===t.type&&!t.inputType||"insertFromPaste"===t.inputType||"deleteContentBackward"===t.inputType||"deleteContentForward"===t.inputType||"deleteByCut"===t.inputType||c!==l){if("insertFromPaste"===t.inputType)try{return navigator.clipboard.readText().then((t=>{const u=i.unmask(t,e,n).replace(new RegExp(o,"g"),"");if(h.isNullOrEmpty(u))return this.value=a,void s.setSelectionRange(c,c);if(!o||!o.test(u)){let t=a;if(c<l){const s=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((t=>t===s)),o=p.findIndex((t=>t===h)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);t=i.mask(d,e,n)}const h=p.find((t=>t>=c)),o=p.findIndex((t=>t===h)),d=i.unmask(t,e,n);t=d.substring(0,o)+u+d.substring(o,a.length),this.value=i.mask(t,e,n);const v=p[o+u.length]||this.value.search(r)||this.value.length;s.setSelectionRange(v,v)}})),this.value=a,void s.setSelectionRange(c,c)}catch(t){return this.value=a,void s.setSelectionRange(c,c)}if("deleteContentBackward"!==t.inputType&&"deleteByCut"!==t.inputType){if("deleteContentForward"===t.inputType){const t=p.find((t=>t>=c)),h=p.findIndex((s=>s===t)),r=i.unmask(a,e,n),o=r.substring(0,h)+r.substring(h+1,a.length);return this.value=i.mask(o,e,n),void s.setSelectionRange(c,c)}if(!(t.altKey||t.ctrlKey||t.metaKey))if(t.data)if(r.test(a.charAt(c))||c===e.length){const h=i.unmask(a,e,n);this.value=i.mask(h+t.data,e,n);const o=this.value.search(r),c=o<0?e.length:o;s.setSelectionRange(c,c);const l=p.findIndex((t=>t>=c));this.validate(t.data,d[l<0?p.length-1:l-1])}else{let h=a;if(c<l){const t=f.find((t=>t<=c-1)),s=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===s)),u=i.unmask(a,e,n),d=u.substring(0,r+1)+u.substring(o+1,a.length);h=i.mask(d,e,n)}const r=p.find((t=>t>=c)),o=p.findIndex((t=>t===r)),u=i.unmask(h,e,n);h=u.substring(0,o)+t.data+u.substring(o,a.length);const v=p.find((t=>t>r));this.value=i.mask(h,e,n),s.setSelectionRange(v,v);const m=p.findIndex((t=>t>=v));this.validate(t.data,d[m<0?p.length-1:m-1])}else if("input"!==t.type||t.inputType)this.value=a,s.setSelectionRange(c,c);else{const{value:s}=t.target,h=p.find((t=>t>=c)),r=p.findIndex((t=>t===h)),a=i.unmask(s,e,n),l=s.replace(new RegExp(o,"g"),""),u=a.substring(0,r)+l,f=p.find((t=>t>h)),v=p.findIndex((t=>t>=f)),m=v<0?p.length-1:v-1;this.value=i.mask(u,e,n),this.validate(u,d[m])}}else{const t=f.find((t=>t<=c-1)),h=f.find((t=>t<=l-1)),r=p.findIndex((s=>s===t)),o=p.findIndex((t=>t===h)),d=i.unmask(a,e,n);if(r<o){const t=d.substring(0,r+1)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),t&&r>-1?s.setSelectionRange(u+1,u+1):s.setSelectionRange(u,u)}else{const t=d.substring(0,r)+d.substring(o+1,a.length);this.value=i.mask(t,e,n),s.setSelectionRange(u,u)}}}else this.value=a}validate(t,s){const{previousValue:i,input:e,value:n,selectionStart:r}=this;h.exists(s)&&!(s.test(t)||/\(\?[!<=]/.test(s.toString())&&s.test(n))&&(this.value=i,e.setSelectionRange(r,r))}componentWillLoad(){this.input=document.getElementById(this.for),h.exists(this.input)?(this.input.addEventListener("focus",this.handleFocus),this.input.addEventListener("blur",this.handleBlur),this.input.addEventListener("keydown",this.handleKeyDown),this.input.addEventListener("input",this.handleInput),this.input.addEventListener("ku4-mask-input",this.handleInput),this.input.addEventListener("touchstart",this.handleTouchStart,{passive:!0})):console.error("ku4-mask must have a valid `for` referencing target field `id`.")}disconnectedCallback(){this.input&&this.input.removeEventListener&&(this.input.removeEventListener("focus",this.handleFocus),this.input.removeEventListener("blur",this.handleBlur),this.input.removeEventListener("keydown",this.handleKeyDown),this.input.removeEventListener("input",this.handleInput),this.input.removeEventListener("touchstart",this.handleTouchStart))}render(){return s("slot",null)}static get watchers(){return{template:["templateHandler"],char:["charHandler"]}}};n.style=":host{display:none}";export{n as ku4_mask}
|
@@ -1 +1 @@
|
|
1
|
-
import{r as t,h as i,H as s,g as n}from"./p-016a7b4e.js";import{u as e}from"./p-
|
1
|
+
import{r as t,h as i,H as s,g as n}from"./p-016a7b4e.js";import{u as e}from"./p-a110d244.js";import"./p-5a54ccf4.js";const a=class{constructor(i){t(this,i),this.selected=!1,this.maxHeight=this.selected?"none":"0px"}handleTransitionEnd(){this.maxHeight=this.selected?"none":"0px"}async select(){this.selected||(this.selected=!0,this.hasTransition?this.maxHeight=`${this.host.scrollHeight}px`:this.handleTransitionEnd())}async deselect(){this.selected&&(this.selected=!1,this.host.style.maxHeight=`${this.host.scrollHeight}px`,this.hasTransition?this.maxHeight="0px":this.handleTransitionEnd())}async connect(t){t.$assignPanel(this),this.tab=t}get hasTransition(){const t=window.getComputedStyle(this.host).getPropertyValue("transition");return!/none/.test(t)}render(){const{selected:t,tab:n,maxHeight:a}=this;return i(s,{role:"tabpanel",id:this.host.id||e(),"aria-hidden":t?"false":"true","aria-labelledby":n&&n.id,tabIndex:t?0:-1,style:{maxHeight:a}},i("slot",null))}get host(){return n(this)}};a.style=":host{-webkit-backface-visibility:hidden;display:block;width:100%;height:auto;max-height:0;-webkit-transition:max-height 0.4s, padding 0.6s;transition:max-height 0.4s, padding 0.6s;overflow:auto}@media only screen and (min-width: 768px){:host{display:none;border-top:1px solid #ccc;border-bottom:1px solid #ccc;max-height:initial !important;-webkit-transition:none;transition:none;-ms-flex-order:2;order:2}:host([selected]){display:block;max-height:initial !important;-webkit-transition:none;transition:none}}";export{a as ku4_tab_panel}
|
@@ -0,0 +1,388 @@
|
|
1
|
+
/*
|
2
|
+
Stencil Client Platform v2.15.2 | MIT Licensed | https://stenciljs.com
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* @license
|
6
|
+
* Copyright Google Inc. All Rights Reserved.
|
7
|
+
*
|
8
|
+
* Use of this source code is governed by an MIT-style license that can be
|
9
|
+
* found in the LICENSE file at https://angular.io/license
|
10
|
+
*
|
11
|
+
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
12
|
+
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
13
|
+
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
14
|
+
*/
|
15
|
+
const safeSelector = (selector) => {
|
16
|
+
const placeholders = [];
|
17
|
+
let index = 0;
|
18
|
+
let content;
|
19
|
+
// Replaces attribute selectors with placeholders.
|
20
|
+
// The WS in [attr="va lue"] would otherwise be interpreted as a selector separator.
|
21
|
+
selector = selector.replace(/(\[[^\]]*\])/g, (_, keep) => {
|
22
|
+
const replaceBy = `__ph-${index}__`;
|
23
|
+
placeholders.push(keep);
|
24
|
+
index++;
|
25
|
+
return replaceBy;
|
26
|
+
});
|
27
|
+
// Replaces the expression in `:nth-child(2n + 1)` with a placeholder.
|
28
|
+
// WS and "+" would otherwise be interpreted as selector separators.
|
29
|
+
content = selector.replace(/(:nth-[-\w]+)(\([^)]+\))/g, (_, pseudo, exp) => {
|
30
|
+
const replaceBy = `__ph-${index}__`;
|
31
|
+
placeholders.push(exp);
|
32
|
+
index++;
|
33
|
+
return pseudo + replaceBy;
|
34
|
+
});
|
35
|
+
const ss = {
|
36
|
+
content,
|
37
|
+
placeholders,
|
38
|
+
};
|
39
|
+
return ss;
|
40
|
+
};
|
41
|
+
const restoreSafeSelector = (placeholders, content) => {
|
42
|
+
return content.replace(/__ph-(\d+)__/g, (_, index) => placeholders[+index]);
|
43
|
+
};
|
44
|
+
const _polyfillHost = '-shadowcsshost';
|
45
|
+
const _polyfillSlotted = '-shadowcssslotted';
|
46
|
+
// note: :host-context pre-processed to -shadowcsshostcontext.
|
47
|
+
const _polyfillHostContext = '-shadowcsscontext';
|
48
|
+
const _parenSuffix = ')(?:\\((' + '(?:\\([^)(]*\\)|[^)(]*)+?' + ')\\))?([^,{]*)';
|
49
|
+
const _cssColonHostRe = new RegExp('(' + _polyfillHost + _parenSuffix, 'gim');
|
50
|
+
const _cssColonHostContextRe = new RegExp('(' + _polyfillHostContext + _parenSuffix, 'gim');
|
51
|
+
const _cssColonSlottedRe = new RegExp('(' + _polyfillSlotted + _parenSuffix, 'gim');
|
52
|
+
const _polyfillHostNoCombinator = _polyfillHost + '-no-combinator';
|
53
|
+
const _polyfillHostNoCombinatorRe = /-shadowcsshost-no-combinator([^\s]*)/;
|
54
|
+
const _shadowDOMSelectorsRe = [/::shadow/g, /::content/g];
|
55
|
+
const _selectorReSuffix = '([>\\s~+[.,{:][\\s\\S]*)?$';
|
56
|
+
const _polyfillHostRe = /-shadowcsshost/gim;
|
57
|
+
const _colonHostRe = /:host/gim;
|
58
|
+
const _colonSlottedRe = /::slotted/gim;
|
59
|
+
const _colonHostContextRe = /:host-context/gim;
|
60
|
+
const _commentRe = /\/\*\s*[\s\S]*?\*\//g;
|
61
|
+
const stripComments = (input) => {
|
62
|
+
return input.replace(_commentRe, '');
|
63
|
+
};
|
64
|
+
const _commentWithHashRe = /\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;
|
65
|
+
const extractCommentsWithHash = (input) => {
|
66
|
+
return input.match(_commentWithHashRe) || [];
|
67
|
+
};
|
68
|
+
const _ruleRe = /(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;
|
69
|
+
const _curlyRe = /([{}])/g;
|
70
|
+
const _selectorPartsRe = /(^.*?[^\\])??((:+)(.*)|$)/;
|
71
|
+
const OPEN_CURLY = '{';
|
72
|
+
const CLOSE_CURLY = '}';
|
73
|
+
const BLOCK_PLACEHOLDER = '%BLOCK%';
|
74
|
+
const processRules = (input, ruleCallback) => {
|
75
|
+
const inputWithEscapedBlocks = escapeBlocks(input);
|
76
|
+
let nextBlockIndex = 0;
|
77
|
+
return inputWithEscapedBlocks.escapedString.replace(_ruleRe, (...m) => {
|
78
|
+
const selector = m[2];
|
79
|
+
let content = '';
|
80
|
+
let suffix = m[4];
|
81
|
+
let contentPrefix = '';
|
82
|
+
if (suffix && suffix.startsWith('{' + BLOCK_PLACEHOLDER)) {
|
83
|
+
content = inputWithEscapedBlocks.blocks[nextBlockIndex++];
|
84
|
+
suffix = suffix.substring(BLOCK_PLACEHOLDER.length + 1);
|
85
|
+
contentPrefix = '{';
|
86
|
+
}
|
87
|
+
const cssRule = {
|
88
|
+
selector,
|
89
|
+
content,
|
90
|
+
};
|
91
|
+
const rule = ruleCallback(cssRule);
|
92
|
+
return `${m[1]}${rule.selector}${m[3]}${contentPrefix}${rule.content}${suffix}`;
|
93
|
+
});
|
94
|
+
};
|
95
|
+
const escapeBlocks = (input) => {
|
96
|
+
const inputParts = input.split(_curlyRe);
|
97
|
+
const resultParts = [];
|
98
|
+
const escapedBlocks = [];
|
99
|
+
let bracketCount = 0;
|
100
|
+
let currentBlockParts = [];
|
101
|
+
for (let partIndex = 0; partIndex < inputParts.length; partIndex++) {
|
102
|
+
const part = inputParts[partIndex];
|
103
|
+
if (part === CLOSE_CURLY) {
|
104
|
+
bracketCount--;
|
105
|
+
}
|
106
|
+
if (bracketCount > 0) {
|
107
|
+
currentBlockParts.push(part);
|
108
|
+
}
|
109
|
+
else {
|
110
|
+
if (currentBlockParts.length > 0) {
|
111
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
112
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
113
|
+
currentBlockParts = [];
|
114
|
+
}
|
115
|
+
resultParts.push(part);
|
116
|
+
}
|
117
|
+
if (part === OPEN_CURLY) {
|
118
|
+
bracketCount++;
|
119
|
+
}
|
120
|
+
}
|
121
|
+
if (currentBlockParts.length > 0) {
|
122
|
+
escapedBlocks.push(currentBlockParts.join(''));
|
123
|
+
resultParts.push(BLOCK_PLACEHOLDER);
|
124
|
+
}
|
125
|
+
const strEscapedBlocks = {
|
126
|
+
escapedString: resultParts.join(''),
|
127
|
+
blocks: escapedBlocks,
|
128
|
+
};
|
129
|
+
return strEscapedBlocks;
|
130
|
+
};
|
131
|
+
const insertPolyfillHostInCssText = (selector) => {
|
132
|
+
selector = selector
|
133
|
+
.replace(_colonHostContextRe, _polyfillHostContext)
|
134
|
+
.replace(_colonHostRe, _polyfillHost)
|
135
|
+
.replace(_colonSlottedRe, _polyfillSlotted);
|
136
|
+
return selector;
|
137
|
+
};
|
138
|
+
const convertColonRule = (cssText, regExp, partReplacer) => {
|
139
|
+
// m[1] = :host(-context), m[2] = contents of (), m[3] rest of rule
|
140
|
+
return cssText.replace(regExp, (...m) => {
|
141
|
+
if (m[2]) {
|
142
|
+
const parts = m[2].split(',');
|
143
|
+
const r = [];
|
144
|
+
for (let i = 0; i < parts.length; i++) {
|
145
|
+
const p = parts[i].trim();
|
146
|
+
if (!p)
|
147
|
+
break;
|
148
|
+
r.push(partReplacer(_polyfillHostNoCombinator, p, m[3]));
|
149
|
+
}
|
150
|
+
return r.join(',');
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
return _polyfillHostNoCombinator + m[3];
|
154
|
+
}
|
155
|
+
});
|
156
|
+
};
|
157
|
+
const colonHostPartReplacer = (host, part, suffix) => {
|
158
|
+
return host + part.replace(_polyfillHost, '') + suffix;
|
159
|
+
};
|
160
|
+
const convertColonHost = (cssText) => {
|
161
|
+
return convertColonRule(cssText, _cssColonHostRe, colonHostPartReplacer);
|
162
|
+
};
|
163
|
+
const colonHostContextPartReplacer = (host, part, suffix) => {
|
164
|
+
if (part.indexOf(_polyfillHost) > -1) {
|
165
|
+
return colonHostPartReplacer(host, part, suffix);
|
166
|
+
}
|
167
|
+
else {
|
168
|
+
return host + part + suffix + ', ' + part + ' ' + host + suffix;
|
169
|
+
}
|
170
|
+
};
|
171
|
+
const convertColonSlotted = (cssText, slotScopeId) => {
|
172
|
+
const slotClass = '.' + slotScopeId + ' > ';
|
173
|
+
const selectors = [];
|
174
|
+
cssText = cssText.replace(_cssColonSlottedRe, (...m) => {
|
175
|
+
if (m[2]) {
|
176
|
+
const compound = m[2].trim();
|
177
|
+
const suffix = m[3];
|
178
|
+
const slottedSelector = slotClass + compound + suffix;
|
179
|
+
let prefixSelector = '';
|
180
|
+
for (let i = m[4] - 1; i >= 0; i--) {
|
181
|
+
const char = m[5][i];
|
182
|
+
if (char === '}' || char === ',') {
|
183
|
+
break;
|
184
|
+
}
|
185
|
+
prefixSelector = char + prefixSelector;
|
186
|
+
}
|
187
|
+
const orgSelector = prefixSelector + slottedSelector;
|
188
|
+
const addedSelector = `${prefixSelector.trimRight()}${slottedSelector.trim()}`;
|
189
|
+
if (orgSelector.trim() !== addedSelector.trim()) {
|
190
|
+
const updatedSelector = `${addedSelector}, ${orgSelector}`;
|
191
|
+
selectors.push({
|
192
|
+
orgSelector,
|
193
|
+
updatedSelector,
|
194
|
+
});
|
195
|
+
}
|
196
|
+
return slottedSelector;
|
197
|
+
}
|
198
|
+
else {
|
199
|
+
return _polyfillHostNoCombinator + m[3];
|
200
|
+
}
|
201
|
+
});
|
202
|
+
return {
|
203
|
+
selectors,
|
204
|
+
cssText,
|
205
|
+
};
|
206
|
+
};
|
207
|
+
const convertColonHostContext = (cssText) => {
|
208
|
+
return convertColonRule(cssText, _cssColonHostContextRe, colonHostContextPartReplacer);
|
209
|
+
};
|
210
|
+
const convertShadowDOMSelectors = (cssText) => {
|
211
|
+
return _shadowDOMSelectorsRe.reduce((result, pattern) => result.replace(pattern, ' '), cssText);
|
212
|
+
};
|
213
|
+
const makeScopeMatcher = (scopeSelector) => {
|
214
|
+
const lre = /\[/g;
|
215
|
+
const rre = /\]/g;
|
216
|
+
scopeSelector = scopeSelector.replace(lre, '\\[').replace(rre, '\\]');
|
217
|
+
return new RegExp('^(' + scopeSelector + ')' + _selectorReSuffix, 'm');
|
218
|
+
};
|
219
|
+
const selectorNeedsScoping = (selector, scopeSelector) => {
|
220
|
+
const re = makeScopeMatcher(scopeSelector);
|
221
|
+
return !re.test(selector);
|
222
|
+
};
|
223
|
+
const injectScopingSelector = (selector, scopingSelector) => {
|
224
|
+
return selector.replace(_selectorPartsRe, (_, before = '', _colonGroup, colon = '', after = '') => {
|
225
|
+
return before + scopingSelector + colon + after;
|
226
|
+
});
|
227
|
+
};
|
228
|
+
const applySimpleSelectorScope = (selector, scopeSelector, hostSelector) => {
|
229
|
+
// In Android browser, the lastIndex is not reset when the regex is used in String.replace()
|
230
|
+
_polyfillHostRe.lastIndex = 0;
|
231
|
+
if (_polyfillHostRe.test(selector)) {
|
232
|
+
const replaceBy = `.${hostSelector}`;
|
233
|
+
return selector
|
234
|
+
.replace(_polyfillHostNoCombinatorRe, (_, selector) => injectScopingSelector(selector, replaceBy))
|
235
|
+
.replace(_polyfillHostRe, replaceBy + ' ');
|
236
|
+
}
|
237
|
+
return scopeSelector + ' ' + selector;
|
238
|
+
};
|
239
|
+
const applyStrictSelectorScope = (selector, scopeSelector, hostSelector) => {
|
240
|
+
const isRe = /\[is=([^\]]*)\]/g;
|
241
|
+
scopeSelector = scopeSelector.replace(isRe, (_, ...parts) => parts[0]);
|
242
|
+
const className = '.' + scopeSelector;
|
243
|
+
const _scopeSelectorPart = (p) => {
|
244
|
+
let scopedP = p.trim();
|
245
|
+
if (!scopedP) {
|
246
|
+
return '';
|
247
|
+
}
|
248
|
+
if (p.indexOf(_polyfillHostNoCombinator) > -1) {
|
249
|
+
scopedP = applySimpleSelectorScope(p, scopeSelector, hostSelector);
|
250
|
+
}
|
251
|
+
else {
|
252
|
+
// remove :host since it should be unnecessary
|
253
|
+
const t = p.replace(_polyfillHostRe, '');
|
254
|
+
if (t.length > 0) {
|
255
|
+
scopedP = injectScopingSelector(t, className);
|
256
|
+
}
|
257
|
+
}
|
258
|
+
return scopedP;
|
259
|
+
};
|
260
|
+
const safeContent = safeSelector(selector);
|
261
|
+
selector = safeContent.content;
|
262
|
+
let scopedSelector = '';
|
263
|
+
let startIndex = 0;
|
264
|
+
let res;
|
265
|
+
const sep = /( |>|\+|~(?!=))\s*/g;
|
266
|
+
// If a selector appears before :host it should not be shimmed as it
|
267
|
+
// matches on ancestor elements and not on elements in the host's shadow
|
268
|
+
// `:host-context(div)` is transformed to
|
269
|
+
// `-shadowcsshost-no-combinatordiv, div -shadowcsshost-no-combinator`
|
270
|
+
// the `div` is not part of the component in the 2nd selectors and should not be scoped.
|
271
|
+
// Historically `component-tag:host` was matching the component so we also want to preserve
|
272
|
+
// this behavior to avoid breaking legacy apps (it should not match).
|
273
|
+
// The behavior should be:
|
274
|
+
// - `tag:host` -> `tag[h]` (this is to avoid breaking legacy apps, should not match anything)
|
275
|
+
// - `tag :host` -> `tag [h]` (`tag` is not scoped because it's considered part of a
|
276
|
+
// `:host-context(tag)`)
|
277
|
+
const hasHost = selector.indexOf(_polyfillHostNoCombinator) > -1;
|
278
|
+
// Only scope parts after the first `-shadowcsshost-no-combinator` when it is present
|
279
|
+
let shouldScope = !hasHost;
|
280
|
+
while ((res = sep.exec(selector)) !== null) {
|
281
|
+
const separator = res[1];
|
282
|
+
const part = selector.slice(startIndex, res.index).trim();
|
283
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
284
|
+
const scopedPart = shouldScope ? _scopeSelectorPart(part) : part;
|
285
|
+
scopedSelector += `${scopedPart} ${separator} `;
|
286
|
+
startIndex = sep.lastIndex;
|
287
|
+
}
|
288
|
+
const part = selector.substring(startIndex);
|
289
|
+
shouldScope = shouldScope || part.indexOf(_polyfillHostNoCombinator) > -1;
|
290
|
+
scopedSelector += shouldScope ? _scopeSelectorPart(part) : part;
|
291
|
+
// replace the placeholders with their original values
|
292
|
+
return restoreSafeSelector(safeContent.placeholders, scopedSelector);
|
293
|
+
};
|
294
|
+
const scopeSelector = (selector, scopeSelectorText, hostSelector, slotSelector) => {
|
295
|
+
return selector
|
296
|
+
.split(',')
|
297
|
+
.map((shallowPart) => {
|
298
|
+
if (slotSelector && shallowPart.indexOf('.' + slotSelector) > -1) {
|
299
|
+
return shallowPart.trim();
|
300
|
+
}
|
301
|
+
if (selectorNeedsScoping(shallowPart, scopeSelectorText)) {
|
302
|
+
return applyStrictSelectorScope(shallowPart, scopeSelectorText, hostSelector).trim();
|
303
|
+
}
|
304
|
+
else {
|
305
|
+
return shallowPart.trim();
|
306
|
+
}
|
307
|
+
})
|
308
|
+
.join(', ');
|
309
|
+
};
|
310
|
+
const scopeSelectors = (cssText, scopeSelectorText, hostSelector, slotSelector, commentOriginalSelector) => {
|
311
|
+
return processRules(cssText, (rule) => {
|
312
|
+
let selector = rule.selector;
|
313
|
+
let content = rule.content;
|
314
|
+
if (rule.selector[0] !== '@') {
|
315
|
+
selector = scopeSelector(rule.selector, scopeSelectorText, hostSelector, slotSelector);
|
316
|
+
}
|
317
|
+
else if (rule.selector.startsWith('@media') ||
|
318
|
+
rule.selector.startsWith('@supports') ||
|
319
|
+
rule.selector.startsWith('@page') ||
|
320
|
+
rule.selector.startsWith('@document')) {
|
321
|
+
content = scopeSelectors(rule.content, scopeSelectorText, hostSelector, slotSelector);
|
322
|
+
}
|
323
|
+
const cssRule = {
|
324
|
+
selector: selector.replace(/\s{2,}/g, ' ').trim(),
|
325
|
+
content,
|
326
|
+
};
|
327
|
+
return cssRule;
|
328
|
+
});
|
329
|
+
};
|
330
|
+
const scopeCssText = (cssText, scopeId, hostScopeId, slotScopeId, commentOriginalSelector) => {
|
331
|
+
cssText = insertPolyfillHostInCssText(cssText);
|
332
|
+
cssText = convertColonHost(cssText);
|
333
|
+
cssText = convertColonHostContext(cssText);
|
334
|
+
const slotted = convertColonSlotted(cssText, slotScopeId);
|
335
|
+
cssText = slotted.cssText;
|
336
|
+
cssText = convertShadowDOMSelectors(cssText);
|
337
|
+
if (scopeId) {
|
338
|
+
cssText = scopeSelectors(cssText, scopeId, hostScopeId, slotScopeId);
|
339
|
+
}
|
340
|
+
cssText = cssText.replace(/-shadowcsshost-no-combinator/g, `.${hostScopeId}`);
|
341
|
+
cssText = cssText.replace(/>\s*\*\s+([^{, ]+)/gm, ' $1 ');
|
342
|
+
return {
|
343
|
+
cssText: cssText.trim(),
|
344
|
+
slottedSelectors: slotted.selectors,
|
345
|
+
};
|
346
|
+
};
|
347
|
+
const scopeCss = (cssText, scopeId, commentOriginalSelector) => {
|
348
|
+
const hostScopeId = scopeId + '-h';
|
349
|
+
const slotScopeId = scopeId + '-s';
|
350
|
+
const commentsWithHash = extractCommentsWithHash(cssText);
|
351
|
+
cssText = stripComments(cssText);
|
352
|
+
const orgSelectors = [];
|
353
|
+
if (commentOriginalSelector) {
|
354
|
+
const processCommentedSelector = (rule) => {
|
355
|
+
const placeholder = `/*!@___${orgSelectors.length}___*/`;
|
356
|
+
const comment = `/*!@${rule.selector}*/`;
|
357
|
+
orgSelectors.push({ placeholder, comment });
|
358
|
+
rule.selector = placeholder + rule.selector;
|
359
|
+
return rule;
|
360
|
+
};
|
361
|
+
cssText = processRules(cssText, (rule) => {
|
362
|
+
if (rule.selector[0] !== '@') {
|
363
|
+
return processCommentedSelector(rule);
|
364
|
+
}
|
365
|
+
else if (rule.selector.startsWith('@media') ||
|
366
|
+
rule.selector.startsWith('@supports') ||
|
367
|
+
rule.selector.startsWith('@page') ||
|
368
|
+
rule.selector.startsWith('@document')) {
|
369
|
+
rule.content = processRules(rule.content, processCommentedSelector);
|
370
|
+
return rule;
|
371
|
+
}
|
372
|
+
return rule;
|
373
|
+
});
|
374
|
+
}
|
375
|
+
const scoped = scopeCssText(cssText, scopeId, hostScopeId, slotScopeId);
|
376
|
+
cssText = [scoped.cssText, ...commentsWithHash].join('\n');
|
377
|
+
if (commentOriginalSelector) {
|
378
|
+
orgSelectors.forEach(({ placeholder, comment }) => {
|
379
|
+
cssText = cssText.replace(placeholder, comment);
|
380
|
+
});
|
381
|
+
}
|
382
|
+
scoped.slottedSelectors.forEach((slottedSelector) => {
|
383
|
+
cssText = cssText.replace(slottedSelector.orgSelector, slottedSelector.updatedSelector);
|
384
|
+
});
|
385
|
+
return cssText;
|
386
|
+
};
|
387
|
+
|
388
|
+
export { scopeCss };
|
@@ -0,0 +1,13 @@
|
|
1
|
+
var __spreadArray=this&&this.__spreadArray||function(r,t,e){if(e||arguments.length===2)for(var n=0,a=t.length,c;n<a;n++){if(c||!(n in t)){if(!c)c=Array.prototype.slice.call(t,0,n);c[n]=t[n]}}return r.concat(c||Array.prototype.slice.call(t))};System.register([],(function(r){"use strict";return{execute:function(){
|
2
|
+
/**
|
3
|
+
* @license
|
4
|
+
* Copyright Google Inc. All Rights Reserved.
|
5
|
+
*
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
8
|
+
*
|
9
|
+
* This file is a port of shadowCSS from webcomponents.js to TypeScript.
|
10
|
+
* https://github.com/webcomponents/webcomponentsjs/blob/4efecd7e0e/src/ShadowCSS/ShadowCSS.js
|
11
|
+
* https://github.com/angular/angular/blob/master/packages/compiler/src/shadow_css.ts
|
12
|
+
*/
|
13
|
+
var t=function(r){var t=[];var e=0;var n;r=r.replace(/(\[[^\]]*\])/g,(function(r,n){var a="__ph-".concat(e,"__");t.push(n);e++;return a}));n=r.replace(/(:nth-[-\w]+)(\([^)]+\))/g,(function(r,n,a){var c="__ph-".concat(e,"__");t.push(a);e++;return n+c}));var a={content:n,placeholders:t};return a};var e=function(r,t){return t.replace(/__ph-(\d+)__/g,(function(t,e){return r[+e]}))};var n="-shadowcsshost";var a="-shadowcssslotted";var c="-shadowcsscontext";var o=")(?:\\(("+"(?:\\([^)(]*\\)|[^)(]*)+?"+")\\))?([^,{]*)";var s=new RegExp("("+n+o,"gim");var i=new RegExp("("+c+o,"gim");var v=new RegExp("("+a+o,"gim");var u=n+"-no-combinator";var l=/-shadowcsshost-no-combinator([^\s]*)/;var f=[/::shadow/g,/::content/g];var p="([>\\s~+[.,{:][\\s\\S]*)?$";var h=/-shadowcsshost/gim;var g=/:host/gim;var d=/::slotted/gim;var m=/:host-context/gim;var _=/\/\*\s*[\s\S]*?\*\//g;var x=function(r){return r.replace(_,"")};var w=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g;var S=function(r){return r.match(w)||[]};var b=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g;var W=/([{}])/g;var y=/(^.*?[^\\])??((:+)(.*)|$)/;var O="{";var j="}";var E="%BLOCK%";var R=function(r,t){var e=A(r);var n=0;return e.escapedString.replace(b,(function(){var r=[];for(var a=0;a<arguments.length;a++){r[a]=arguments[a]}var c=r[2];var o="";var s=r[4];var i="";if(s&&s.startsWith("{"+E)){o=e.blocks[n++];s=s.substring(E.length+1);i="{"}var v={selector:c,content:o};var u=t(v);return"".concat(r[1]).concat(u.selector).concat(r[3]).concat(i).concat(u.content).concat(s)}))};var A=function(r){var t=r.split(W);var e=[];var n=[];var a=0;var c=[];for(var o=0;o<t.length;o++){var s=t[o];if(s===j){a--}if(a>0){c.push(s)}else{if(c.length>0){n.push(c.join(""));e.push(E);c=[]}e.push(s)}if(s===O){a++}}if(c.length>0){n.push(c.join(""));e.push(E)}var i={escapedString:e.join(""),blocks:n};return i};var k=function(r){r=r.replace(m,c).replace(g,n).replace(d,a);return r};var T=function(r,t,e){return r.replace(t,(function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}if(r[2]){var n=r[2].split(",");var a=[];for(var c=0;c<n.length;c++){var o=n[c].trim();if(!o)break;a.push(e(u,o,r[3]))}return a.join(",")}else{return u+r[3]}}))};var C=function(r,t,e){return r+t.replace(n,"")+e};var L=function(r){return T(r,s,C)};var $=function(r,t,e){if(t.indexOf(n)>-1){return C(r,t,e)}else{return r+t+e+", "+t+" "+r+e}};var B=function(r,t){var e="."+t+" > ";var n=[];r=r.replace(v,(function(){var r=[];for(var t=0;t<arguments.length;t++){r[t]=arguments[t]}if(r[2]){var a=r[2].trim();var c=r[3];var o=e+a+c;var s="";for(var i=r[4]-1;i>=0;i--){var v=r[5][i];if(v==="}"||v===","){break}s=v+s}var l=s+o;var f="".concat(s.trimRight()).concat(o.trim());if(l.trim()!==f.trim()){var p="".concat(f,", ").concat(l);n.push({orgSelector:l,updatedSelector:p})}return o}else{return u+r[3]}}));return{selectors:n,cssText:r}};var I=function(r){return T(r,i,$)};var K=function(r){return f.reduce((function(r,t){return r.replace(t," ")}),r)};var M=function(r){var t=/\[/g;var e=/\]/g;r=r.replace(t,"\\[").replace(e,"\\]");return new RegExp("^("+r+")"+p,"m")};var U=function(r,t){var e=M(t);return!e.test(r)};var q=function(r,t){return r.replace(y,(function(r,e,n,a,c){if(e===void 0){e=""}if(a===void 0){a=""}if(c===void 0){c=""}return e+t+a+c}))};var z=function(r,t,e){h.lastIndex=0;if(h.test(r)){var n=".".concat(e);return r.replace(l,(function(r,t){return q(t,n)})).replace(h,n+" ")}return t+" "+r};var D=function(r,n,a){var c=/\[is=([^\]]*)\]/g;n=n.replace(c,(function(r){var t=[];for(var e=1;e<arguments.length;e++){t[e-1]=arguments[e]}return t[0]}));var o="."+n;var s=function(r){var t=r.trim();if(!t){return""}if(r.indexOf(u)>-1){t=z(r,n,a)}else{var e=r.replace(h,"");if(e.length>0){t=q(e,o)}}return t};var i=t(r);r=i.content;var v="";var l=0;var f;var p=/( |>|\+|~(?!=))\s*/g;var g=r.indexOf(u)>-1;var d=!g;while((f=p.exec(r))!==null){var m=f[1];var _=r.slice(l,f.index).trim();d=d||_.indexOf(u)>-1;var x=d?s(_):_;v+="".concat(x," ").concat(m," ");l=p.lastIndex}var w=r.substring(l);d=d||w.indexOf(u)>-1;v+=d?s(w):w;return e(i.placeholders,v)};var F=function(r,t,e,n){return r.split(",").map((function(r){if(n&&r.indexOf("."+n)>-1){return r.trim()}if(U(r,t)){return D(r,t,e).trim()}else{return r.trim()}})).join(", ")};var G=function(r,t,e,n,a){return R(r,(function(r){var a=r.selector;var c=r.content;if(r.selector[0]!=="@"){a=F(r.selector,t,e,n)}else if(r.selector.startsWith("@media")||r.selector.startsWith("@supports")||r.selector.startsWith("@page")||r.selector.startsWith("@document")){c=G(r.content,t,e,n)}var o={selector:a.replace(/\s{2,}/g," ").trim(),content:c};return o}))};var H=function(r,t,e,n,a){r=k(r);r=L(r);r=I(r);var c=B(r,n);r=c.cssText;r=K(r);if(t){r=G(r,t,e,n)}r=r.replace(/-shadowcsshost-no-combinator/g,".".concat(e));r=r.replace(/>\s*\*\s+([^{, ]+)/gm," $1 ");return{cssText:r.trim(),slottedSelectors:c.selectors}};var J=r("scopeCss",(function(r,t,e){var n=t+"-h";var a=t+"-s";var c=S(r);r=x(r);var o=[];if(e){var s=function(r){var t="/*!@___".concat(o.length,"___*/");var e="/*!@".concat(r.selector,"*/");o.push({placeholder:t,comment:e});r.selector=t+r.selector;return r};r=R(r,(function(r){if(r.selector[0]!=="@"){return s(r)}else if(r.selector.startsWith("@media")||r.selector.startsWith("@supports")||r.selector.startsWith("@page")||r.selector.startsWith("@document")){r.content=R(r.content,s);return r}return r}))}var i=H(r,t,n,a);r=__spreadArray([i.cssText],c,true).join("\n");if(e){o.forEach((function(t){var e=t.placeholder,n=t.comment;r=r.replace(e,n)}))}i.slottedSelectors.forEach((function(t){r=r.replace(t.orgSelector,t.updatedSelector)}));return r}))}}}));
|
@@ -0,0 +1 @@
|
|
1
|
+
System.register(["./index-5d0cb00d.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.R}],execute:function(){var n=t("u",(function(){var t;return function(){t=e.uid()}()}))}}}));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "ku4web-components",
|
3
|
-
"version": "6.5.
|
3
|
+
"version": "6.5.6",
|
4
4
|
"description": "kodmunki™ Web Components",
|
5
5
|
"main": "./dist/index.cjs.js",
|
6
6
|
"module": "./dist/index.js",
|
@@ -54,7 +54,7 @@
|
|
54
54
|
"stencil:test"
|
55
55
|
],
|
56
56
|
"devDependencies": {
|
57
|
-
"@babel/core": "^7.17.
|
57
|
+
"@babel/core": "^7.17.12",
|
58
58
|
"@jest/core": "^27.5.0",
|
59
59
|
"@rollup/plugin-babel": "^5.3.1",
|
60
60
|
"@rollup/plugin-commonjs": "^21.1.0",
|
@@ -73,7 +73,7 @@
|
|
73
73
|
"@storybook/react": "^6.4.22",
|
74
74
|
"@storybook/theming": "^6.4.22",
|
75
75
|
"@storybook/web-components": "^6.4.22",
|
76
|
-
"@types/node": "^17.0.
|
76
|
+
"@types/node": "^17.0.34",
|
77
77
|
"@types/puppeteer": "^5.4.5",
|
78
78
|
"@typescript-eslint/eslint-plugin": "^5.24.0",
|
79
79
|
"@typescript-eslint/parser": "^5.24.0",
|
@@ -89,9 +89,9 @@
|
|
89
89
|
"html-to-react": "^1.4.8",
|
90
90
|
"jest": "^27.5.0",
|
91
91
|
"jest-cli": "^27.5.0",
|
92
|
-
"ku4es-kernel": "^8.4.
|
92
|
+
"ku4es-kernel": "^8.4.7",
|
93
93
|
"ku4es-ui-data": "^3.1.7",
|
94
|
-
"ku4es-ui-kernel": "^8.1.
|
94
|
+
"ku4es-ui-kernel": "^8.1.3",
|
95
95
|
"lit-html": "^2.2.2",
|
96
96
|
"node-sass": "^5.0.0",
|
97
97
|
"pre-commit": "^1.2.2",
|