@kvass/widgets 1.9.43 → 1.9.44

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.
@@ -0,0 +1 @@
1
+ import{q as u,r as i,E as g,i as v,c as h,o as p,e as b,d as m,a as s,w as _,t as k,y as x,v as w,k as C,_ as S,p as z}from"./_plugin-vue_export-helper.js";import{a as E}from"./index.es2.js";import{u as L}from"./index2.js";const B={class:"kvass-story-fly"},O=u({__name:"StoryFly.ce",props:{url:{type:String},label:{default:"Interaktiv film",type:String},thumbnail:{type:String},openOnLoad:{type:Boolean}},emits:["open","close"],setup(f,{emit:y}){const o=f,n=y,t=i(),r=i(),a=i(!1),d=L();g(()=>a.value,e=>{d.value.dispatchEvent(new CustomEvent("webcomponent:update",{detail:e,bubbles:!0,composed:!0}))},{deep:!0});function l(){t.value.style.display="flex",setTimeout(()=>{t.value.classList.add("kvass-story-fly__lightbox--show")},10),r.value.src=o.url,a.value=!0,n("open")}function c(e){a.value=!1,(!e||e.target.classList.contains("kvass-story-fly__lightbox-close")||e.target===t.value)&&(t.value.classList.remove("kvass-story-fly__lightbox--show"),setTimeout(()=>{t.value.style.display="none",r.value.src=""},500)),n("close")}return v(()=>{o.openOnLoad&&l()}),(e,M)=>(p(),h("div",B,[a.value?m("",!0):(p(),b(w(E),{key:0,class:"kvass-story-fly__trigger-button",style:x(`background-image: url(${o.thumbnail});`),onClick:l,icon:"fa-pro-solid:play"},{default:_(()=>[s("span",null,k(o.label),1)]),_:1},8,["style"])),s("div",{class:"kvass-story-fly__lightbox",ref_key:"lightbox",ref:t,onClick:c},[s("div",{class:"kvass-story-fly__lightbox-content",onClick:C(()=>"",["stop","prevent"])},[s("span",{class:"kvass-story-fly__lightbox-close",onClick:c},"×"),s("iframe",{ref_key:"iframe",ref:r,src:""},null,512)])],512)]))}}),j=".kvass-story-fly{height:100%}.kvass-story-fly__trigger-button{border:none;border-color:transparent;background-position:center;background-repeat:no-repeat;background-size:cover;aspect-ratio:var(--kvass-story-fly-aspect-ratio, var(--aspect-ratio, 16/9));min-height:var(--kvass-story-fly-min-height, none);height:100%;width:100%;border-radius:var(--kvass-story-fly-border-radius, 0);position:relative}@media screen and (max-width: 680px){.kvass-story-fly__trigger-button{aspect-ratio:var(--kvass-story-fly-aspect-ratio-small-device, var(--aspect-ratio, 16/9))}}.kvass-story-fly__trigger-button .k-button__content{position:absolute;bottom:var(--kvass-story-fly-trigger-bottom-offset, 15px);left:var(--kvass-story-fly-trigger-left-offset, 15px);backdrop-filter:blur(8px);background:#0009;color:#fff;font-size:18px;font-weight:700;padding:8px 20px;border-radius:99px;transition:transform .2s ease-in-out;z-index:10;display:inline-flex;gap:.5rem;align-items:center;cursor:pointer}.kvass-story-fly__trigger-button .k-button__content:hover{transform:scale(1.1)}.kvass-story-fly__lightbox{display:none;position:fixed;top:0;left:0;width:100vw;height:100dvh;background:#000c;justify-content:center;align-items:center;z-index:99999;opacity:0;transition:opacity .5s ease-in-out;padding-bottom:env(safe-area-inset-bottom)}.kvass-story-fly__lightbox--show{display:flex;opacity:1}.kvass-story-fly__lightbox-content{position:relative;background:#fff;padding:0;box-shadow:0 0 10px #0000004d;display:flex;justify-content:center;align-items:center;width:100vw;height:100dvh}.kvass-story-fly__lightbox-close{position:absolute;top:10px;right:10px;font-size:23px;cursor:pointer;background:#fff;border-radius:50%;width:30px;height:30px;text-align:center;box-shadow:0 0 5px #00000080;font-weight:700;border:none;z-index:10;display:block;line-height:normal}@media screen and (max-width: 680px){.kvass-story-fly__lightbox-close{top:60px;right:12px}}.kvass-story-fly__lightbox iframe{width:100%;height:100%;border:none}",F=S(O,[["styles",[j]]]);customElements.define("kvass-storyfly",z(F));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kvass/widgets",
3
- "version": "1.9.43",
3
+ "version": "1.9.44",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",