@sesamy/sesamy-components 0.0.1
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,6 @@
|
|
|
1
|
+
var te=Object.defineProperty,ee=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,E=(e,t,n)=>ee(e,typeof t!="symbol"?t+"":t,n);function L(){}function j(e,t){for(const n in t)e[n]=t[n];return e}function kt(e){return e()}function Et(){return Object.create(null)}function T(e){e.forEach(kt)}function Nt(e){return typeof e=="function"}function I(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let X;function Lt(e,t){return e===t?!0:(X||(X=document.createElement("a")),X.href=t,e===X.href)}function ne(e){return Object.keys(e).length===0}function Ct(e,t,n,o){if(e){const s=St(e,t,n,o);return e[0](s)}}function St(e,t,n,o){return e[1]&&o?j(n.ctx.slice(),e[1](o(t))):n.ctx}function jt(e,t,n,o){if(e[2]&&o){const s=e[2](o(n));if(t.dirty===void 0)return s;if(typeof s=="object"){const r=[],i=Math.max(t.dirty.length,s.length);for(let l=0;l<i;l+=1)r[l]=t.dirty[l]|s[l];return r}return t.dirty|s}return t.dirty}function Ot(e,t,n,o,s,r){if(s){const i=St(t,n,o,r);e.p(i,s)}}function At(e){if(e.ctx.length>32){const t=[],n=e.ctx.length/32;for(let o=0;o<n;o++)t[o]=-1;return t}return-1}function Z(e){const t={};for(const n in e)n[0]!=="$"&&(t[n]=e[n]);return t}function Pt(e,t){const n={};t=new Set(t);for(const o in e)!t.has(o)&&o[0]!=="$"&&(n[o]=e[o]);return n}function p(e,t){e.appendChild(t)}function oe(e,t,n){const o=se(e);if(!o.getElementById(t)){const s=m("style");s.id=t,s.textContent=n,re(o,s)}}function se(e){if(!e)return document;const t=e.getRootNode?e.getRootNode():e.ownerDocument;return t&&t.host?t:e.ownerDocument}function re(e,t){return p(e.head||e,t),t.sheet}function N(e,t,n){e.insertBefore(t,n||null)}function k(e){e.parentNode&&e.parentNode.removeChild(e)}function ut(e,t){for(let n=0;n<e.length;n+=1)e[n]&&e[n].d(t)}function m(e){return document.createElement(e)}function Mt(e){return document.createElementNS("http://www.w3.org/2000/svg",e)}function Wt(e){return document.createTextNode(e)}function w(){return Wt(" ")}function at(){return Wt("")}function tt(e,t,n,o){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n,o)}function h(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function et(e,t){for(const n in t)h(e,n,t[n])}function ie(e){let t;return{p(...n){t=n,t.forEach(o=>e.push(o))},r(){t.forEach(n=>e.splice(e.indexOf(n),1))}}}function le(e){return Array.from(e.childNodes)}function Tt(e,t){e.value=t??""}function ce(e){const t={};return e.childNodes.forEach(n=>{t[n.slot||"default"]=!0}),t}let dt;function J(e){dt=e}const z=[],zt=[];let B=[];const Bt=[],ue=Promise.resolve();let ft=!1;function ae(){ft||(ft=!0,ue.then(Dt))}function $t(e){B.push(e)}const ht=new Set;let D=0;function Dt(){if(D!==0)return;const e=dt;do{try{for(;D<z.length;){const t=z[D];D++,J(t),de(t.$$)}}catch(t){throw z.length=0,D=0,t}for(J(null),z.length=0,D=0;zt.length;)zt.pop()();for(let t=0;t<B.length;t+=1){const n=B[t];ht.has(n)||(ht.add(n),n())}B.length=0}while(z.length);for(;Bt.length;)Bt.pop()();ft=!1,ht.clear(),J(e)}function de(e){if(e.fragment!==null){e.update(),T(e.before_update);const t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach($t)}}function fe(e){const t=[],n=[];B.forEach(o=>e.indexOf(o)===-1?t.push(o):n.push(o)),n.forEach(o=>o()),B=t}const nt=new Set;let P;function $e(){P={r:0,c:[],p:P}}function he(){P.r||T(P.c),P=P.p}function O(e,t){e&&e.i&&(nt.delete(e),e.i(t))}function F(e,t,n,o){if(e&&e.o){if(nt.has(e))return;nt.add(e),P.c.push(()=>{nt.delete(e),o&&(n&&e.d(1),o())}),e.o(t)}else o&&o()}function H(e){return e?.length!==void 0?e:Array.from(e)}function pt(e,t){const n={},o={},s={$$scope:1};let r=e.length;for(;r--;){const i=e[r],l=t[r];if(l){for(const a in i)a in l||(o[a]=1);for(const a in l)s[a]||(n[a]=l[a],s[a]=1);e[r]=l}else for(const a in i)s[a]=1}for(const i in o)i in n||(n[i]=void 0);return n}function pe(e){return typeof e=="object"&&e!==null?e:{}}function Ft(e){e&&e.c()}function mt(e,t,n){const{fragment:o,after_update:s}=e.$$;o&&o.m(t,n),$t(()=>{const r=e.$$.on_mount.map(kt).filter(Nt);e.$$.on_destroy?e.$$.on_destroy.push(...r):T(r),e.$$.on_mount=[]}),s.forEach($t)}function gt(e,t){const n=e.$$;n.fragment!==null&&(fe(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function me(e,t){e.$$.dirty[0]===-1&&(z.push(e),ae(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function ot(e,t,n,o,s,r,i=null,l=[-1]){const a=dt;J(e);const f=e.$$={fragment:null,ctx:[],props:r,update:L,not_equal:s,bound:Et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(a?a.$$.context:[])),callbacks:Et(),dirty:l,skip_bound:!1,root:t.target||a.$$.root};i&&i(f.root);let x=!1;if(f.ctx=n?n(e,t.props||{},(g,c,...v)=>{const u=v.length?v[0]:c;return f.ctx&&s(f.ctx[g],f.ctx[g]=u)&&(!f.skip_bound&&f.bound[g]&&f.bound[g](u),x&&me(e,g)),c}):[],f.update(),x=!0,T(f.before_update),f.fragment=o?o(f.ctx):!1,t.target){if(t.hydrate){const g=le(t.target);f.fragment&&f.fragment.l(g),g.forEach(k)}else f.fragment&&f.fragment.c();t.intro&&O(e.$$.fragment),mt(e,t.target,t.anchor),Dt()}J(a)}let Ht;typeof HTMLElement=="function"&&(Ht=class extends HTMLElement{constructor(e,t,n){super(),E(this,"$$ctor"),E(this,"$$s"),E(this,"$$c"),E(this,"$$cn",!1),E(this,"$$d",{}),E(this,"$$r",!1),E(this,"$$p_d",{}),E(this,"$$l",{}),E(this,"$$l_u",new Map),this.$$ctor=e,this.$$s=t,n&&this.attachShadow({mode:"open"})}addEventListener(e,t,n){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const o=this.$$c.$on(e,t);this.$$l_u.set(t,o)}super.addEventListener(e,t,n)}removeEventListener(e,t,n){if(super.removeEventListener(e,t,n),this.$$c){const o=this.$$l_u.get(t);o&&(o(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(s){return()=>{let r;return{c:function(){r=m("slot"),s!=="default"&&h(r,"name",s)},m:function(i,l){N(i,r,l)},d:function(i){i&&k(r)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},n=ce(this);for(const s of this.$$s)s in n&&(t[s]=[e(s)]);for(const s of this.attributes){const r=this.$$g_p(s.name);r in this.$$d||(this.$$d[r]=st(r,s.value,this.$$p_d,"toProp"))}for(const s in this.$$p_d)!(s in this.$$d)&&this[s]!==void 0&&(this.$$d[s]=this[s],delete this[s]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$scope:{ctx:[]}}});const o=()=>{this.$$r=!0;for(const s in this.$$p_d)if(this.$$d[s]=this.$$c.$$.ctx[this.$$c.$$.props[s]],this.$$p_d[s].reflect){const r=st(s,this.$$d[s],this.$$p_d,"toAttribute");r==null?this.removeAttribute(this.$$p_d[s].attribute||s):this.setAttribute(this.$$p_d[s].attribute||s,r)}this.$$r=!1};this.$$c.$$.after_update.push(o),o();for(const s in this.$$l)for(const r of this.$$l[s]){const i=this.$$c.$on(s,r);this.$$l_u.set(r,i)}this.$$l={}}}attributeChangedCallback(e,t,n){var o;this.$$r||(e=this.$$g_p(e),this.$$d[e]=st(e,n,this.$$p_d,"toProp"),(o=this.$$c)==null||o.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function st(e,t,n,o){var s;const r=(s=n[e])==null?void 0:s.type;if(t=r==="Boolean"&&typeof t!="boolean"?t!=null:t,!o||!n[e])return t;if(o==="toAttribute")switch(r){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(r){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function Rt(e,t,n,o,s,r){let i=class extends Ht{constructor(){super(e,n,s),this.$$p_d=t}static get observedAttributes(){return Object.keys(t).map(l=>(t[l].attribute||l).toLowerCase())}};return Object.keys(t).forEach(l=>{Object.defineProperty(i.prototype,l,{get(){return this.$$c&&l in this.$$c?this.$$c[l]:this.$$d[l]},set(a){var f;a=st(l,a,t),this.$$d[l]=a,(f=this.$$c)==null||f.$set({[l]:a})}})}),o.forEach(l=>{Object.defineProperty(i.prototype,l,{get(){var a;return(a=this.$$c)==null?void 0:a[l]}})}),e.element=i,i}class rt{constructor(){E(this,"$$"),E(this,"$$set")}$destroy(){gt(this,1),this.$destroy=L}$on(t,n){if(!Nt(n))return L;const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(n),()=>{const s=o.indexOf(n);s!==-1&&o.splice(s,1)}}$set(t){this.$$set&&!ne(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const ge="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(ge);function be(e){oe(e,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function ve(e){let t,n,o;return{c(){t=m("button"),t.textContent="Login",h(t,"class","login-btn svelte-1nq6lsq"),h(t,"aria-label","Log in")},m(s,r){N(s,t,r),n||(o=tt(t,"click",e[2]),n=!0)},p:L,d(s){s&&k(t),n=!1,o()}}}function xe(e){let t,n,o,s,r;return{c(){t=m("button"),n=m("img"),Lt(n.src,o=qe)||h(n,"src",o),h(n,"alt","User Avatar"),h(n,"class","svelte-1nq6lsq"),h(t,"class","avatar-btn svelte-1nq6lsq"),h(t,"aria-label","Log out")},m(i,l){N(i,t,l),p(t,n),s||(r=tt(t,"click",e[3]),s=!0)},p:L,d(i){i&&k(t),s=!1,r()}}}function ye(e){let t;return{c(){t=m("button"),t.innerHTML="",h(t,"class","loading-btn svelte-1nq6lsq"),h(t,"aria-busy","true"),h(t,"aria-label","Logging in")},m(n,o){N(n,t,o)},p:L,d(n){n&&k(t)}}}function _e(e){let t;function n(r,i){return r[0]?ye:r[1]?xe:ve}let o=n(e),s=o(e);return{c(){s.c(),t=at()},m(r,i){s.m(r,i),N(r,t,i)},p(r,[i]){o===(o=n(r))&&s?s.p(r,i):(s.d(1),s=o(r),s&&(s.c(),s.m(t.parentNode,t)))},i:L,o:L,d(r){r&&k(t),s.d(r)}}}let qe="https://via.placeholder.com/50";function we(e,t,n){let o=!1,s=!1;const r=async()=>{n(0,o=!0),await new Promise(l=>setTimeout(l,2e3)),n(0,o=!1),n(1,s=!0)},i=()=>{n(1,s=!1)};return s=s,[o,s,r,i]}class Kt extends rt{constructor(t){super(),ot(this,t,we,_e,I,{},be)}}customElements.define("sesamy-login",Rt(Kt,{},[],[],!0));/**
|
|
2
|
+
* @license lucide-svelte v0.445.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const It={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function Jt(e,t,n){const o=e.slice();return o[11]=t[n][0],o[12]=t[n][1],o}function bt(e){let t,n=[e[12]],o={};for(let s=0;s<n.length;s+=1)o=j(o,n[s]);return{c(){t=Mt(e[11]),et(t,o)},m(s,r){N(s,t,r)},p(s,r){et(t,o=pt(n,[r&32&&s[12]]))},d(s){s&&k(t)}}}function Ut(e){let t=e[11],n,o=e[11]&&bt(e);return{c(){o&&o.c(),n=at()},m(s,r){o&&o.m(s,r),N(s,n,r)},p(s,r){s[11]?t?I(t,s[11])?(o.d(1),o=bt(s),t=s[11],o.c(),o.m(n.parentNode,n)):o.p(s,r):(o=bt(s),t=s[11],o.c(),o.m(n.parentNode,n)):t&&(o.d(1),o=null,t=s[11])},d(s){s&&k(n),o&&o.d(s)}}}function ke(e){let t,n,o,s,r,i=H(e[5]),l=[];for(let c=0;c<i.length;c+=1)l[c]=Ut(Jt(e,i,c));const a=e[10].default,f=Ct(a,e,e[9],null);let x=[It,e[7],{width:e[2]},{height:e[2]},{stroke:e[1]},{"stroke-width":o=e[4]?Number(e[3])*24/Number(e[2]):e[3]},{class:s=e[6]("lucide-icon","lucide",e[0]?`lucide-${e[0]}`:"",e[8].class)}],g={};for(let c=0;c<x.length;c+=1)g=j(g,x[c]);return{c(){t=Mt("svg");for(let c=0;c<l.length;c+=1)l[c].c();n=at(),f&&f.c(),et(t,g)},m(c,v){N(c,t,v);for(let u=0;u<l.length;u+=1)l[u]&&l[u].m(t,null);p(t,n),f&&f.m(t,null),r=!0},p(c,[v]){if(v&32){i=H(c[5]);let u;for(u=0;u<i.length;u+=1){const C=Jt(c,i,u);l[u]?l[u].p(C,v):(l[u]=Ut(C),l[u].c(),l[u].m(t,n))}for(;u<l.length;u+=1)l[u].d(1);l.length=i.length}f&&f.p&&(!r||v&512)&&Ot(f,a,c,c[9],r?jt(a,c[9],v,null):At(c[9]),null),et(t,g=pt(x,[It,v&128&&c[7],(!r||v&4)&&{width:c[2]},(!r||v&4)&&{height:c[2]},(!r||v&2)&&{stroke:c[1]},(!r||v&28&&o!==(o=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":o},(!r||v&257&&s!==(s=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:s}]))},i(c){r||(O(f,c),r=!0)},o(c){F(f,c),r=!1},d(c){c&&k(t),ut(l,c),f&&f.d(c)}}}function Ee(e,t,n){const o=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let s=Pt(t,o),{$$slots:r={},$$scope:i}=t,{name:l=void 0}=t,{color:a="currentColor"}=t,{size:f=24}=t,{strokeWidth:x=2}=t,{absoluteStrokeWidth:g=!1}=t,{iconNode:c=[]}=t;const v=(...u)=>u.filter((C,M,U)=>!!C&&U.indexOf(C)===M).join(" ");return e.$$set=u=>{n(8,t=j(j({},t),Z(u))),n(7,s=Pt(t,o)),"name"in u&&n(0,l=u.name),"color"in u&&n(1,a=u.color),"size"in u&&n(2,f=u.size),"strokeWidth"in u&&n(3,x=u.strokeWidth),"absoluteStrokeWidth"in u&&n(4,g=u.absoluteStrokeWidth),"iconNode"in u&&n(5,c=u.iconNode),"$$scope"in u&&n(9,i=u.$$scope)},t=Z(t),[l,a,f,x,g,c,v,s,t,i,r]}class Ne extends rt{constructor(t){super(),ot(this,t,Ee,ke,I,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function Le(e){let t;const n=e[2].default,o=Ct(n,e,e[3],null);return{c(){o&&o.c()},m(s,r){o&&o.m(s,r),t=!0},p(s,r){o&&o.p&&(!t||r&8)&&Ot(o,n,s,s[3],t?jt(n,s[3],r,null):At(s[3]),null)},i(s){t||(O(o,s),t=!0)},o(s){F(o,s),t=!1},d(s){o&&o.d(s)}}}function Ce(e){let t,n;const o=[{name:"circle-check"},e[1],{iconNode:e[0]}];let s={$$slots:{default:[Le]},$$scope:{ctx:e}};for(let r=0;r<o.length;r+=1)s=j(s,o[r]);return t=new Ne({props:s}),{c(){Ft(t.$$.fragment)},m(r,i){mt(t,r,i),n=!0},p(r,[i]){const l=i&3?pt(o,[o[0],i&2&&pe(r[1]),i&1&&{iconNode:r[0]}]):{};i&8&&(l.$$scope={dirty:i,ctx:r}),t.$set(l)},i(r){n||(O(t.$$.fragment,r),n=!0)},o(r){F(t.$$.fragment,r),n=!1},d(r){gt(t,r)}}}function Se(e,t,n){let{$$slots:o={},$$scope:s}=t;const r=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return e.$$set=i=>{n(1,t=j(j({},t),Z(i))),"$$scope"in i&&n(3,s=i.$$scope)},t=Z(t),[r,t,o,s]}class je extends rt{constructor(t){super(),ot(this,t,Se,Ce,I,{})}}function Gt(e,t,n){const o=e.slice();return o[6]=t[n],o}function Vt(e,t,n){const o=e.slice();return o[9]=t[n],o}function Yt(e){let t,n,o,s,r,i;return n=new je({props:{class:"text-green-500 mr-2",size:20}}),{c(){t=m("li"),Ft(n.$$.fragment),o=w(),s=m("span"),s.textContent=`${e[9]}`,r=w(),h(t,"class","flex items-center")},m(l,a){N(l,t,a),mt(n,t,null),p(t,o),p(t,s),p(t,r),i=!0},p:L,i(l){i||(O(n.$$.fragment,l),i=!0)},o(l){F(n.$$.fragment,l),i=!1},d(l){l&&k(t),gt(n)}}}function Qt(e){let t,n;return{c(){t=m("img"),Lt(t.src,n="/api/placeholder/40/25")||h(t,"src",n),h(t,"alt",e[6]),h(t,"class","h-6")},m(o,s){N(o,t,s)},p:L,d(o){o&&k(t)}}}function Oe(e){let t,n,o,s,r,i,l,a,f,x,g,c,v,u,C,M,U,S,q,vt,it,xt,G,yt,V,_t,Y,qt,R,Q,lt,ct,wt,A=H(e[1]),b=[];for(let $=0;$<A.length;$+=1)b[$]=Yt(Vt(e,A,$));const Zt=$=>F(b[$],1,1,()=>{b[$]=null});let W=H(e[2]),_=[];for(let $=0;$<W.length;$+=1)_[$]=Qt(Gt(e,W,$));return lt=ie(e[4][0]),{c(){t=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",o=w(),s=m("h1"),s.textContent="FOKUS",r=w(),i=m("h2"),i.textContent="L\xE4s Fokus Digital i 6 m\xE5nader f\xF6r bara 79 kr!",l=w(),a=m("ul");for(let $=0;$<b.length;$+=1)b[$].c();f=w(),x=m("div"),g=m("label"),c=m("input"),v=w(),u=m("div"),u.innerHTML='<div class="font-semibold">Fokus Digital i 6 m\xE5nader f\xF6r 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/m\xE5n. Ingen bindningstid!</div>',C=w(),M=m("div"),M.textContent="79 SEK/6 m\xE5n",U=w(),S=m("label"),q=m("input"),vt=w(),it=m("div"),it.innerHTML='<div class="font-semibold">Fokus Digital i ett \xE5r f\xF6r 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen f\xF6rnyas automatiskt \xE5rsvis.</div>',xt=w(),G=m("div"),G.textContent="995 SEK/\xE5r",yt=w(),V=m("button"),V.textContent="Forts\xE4tt",_t=w(),Y=m("div"),Y.textContent="S\xE4ker SSL-krypterad betalning",qt=w(),R=m("div");for(let $=0;$<_.length;$+=1)_[$].c();h(n,"class","text-right text-sm text-red-500 mb-4"),h(s,"class","text-4xl font-bold text-red-500 mb-4"),h(i,"class","text-xl font-semibold mb-6"),h(a,"class","space-y-2 mb-6"),h(c,"type","radio"),h(c,"name","subscription"),c.__value="sixMonths",Tt(c,c.__value),h(c,"class","mr-3"),h(M,"class","ml-auto font-semibold"),h(g,"class","flex items-center p-4 border rounded-lg"),h(q,"type","radio"),h(q,"name","subscription"),q.__value="oneYear",Tt(q,q.__value),h(q,"class","mr-3"),h(G,"class","ml-auto font-semibold"),h(S,"class","flex items-center p-4 border rounded-lg"),h(x,"class","space-y-4 mb-6"),h(V,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),h(Y,"class","text-center text-sm text-gray-600 mt-4"),h(R,"class","flex justify-center space-x-2 mt-2"),h(t,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),lt.p(c,q)},m($,y){N($,t,y),p(t,n),p(t,o),p(t,s),p(t,r),p(t,i),p(t,l),p(t,a);for(let d=0;d<b.length;d+=1)b[d]&&b[d].m(a,null);p(t,f),p(t,x),p(x,g),p(g,c),c.checked=c.__value===e[0],p(g,v),p(g,u),p(g,C),p(g,M),p(x,U),p(x,S),p(S,q),q.checked=q.__value===e[0],p(S,vt),p(S,it),p(S,xt),p(S,G),p(t,yt),p(t,V),p(t,_t),p(t,Y),p(t,qt),p(t,R);for(let d=0;d<_.length;d+=1)_[d]&&_[d].m(R,null);Q=!0,ct||(wt=[tt(c,"change",e[3]),tt(q,"change",e[5])],ct=!0)},p($,[y]){if(y&2){A=H($[1]);let d;for(d=0;d<A.length;d+=1){const K=Vt($,A,d);b[d]?(b[d].p(K,y),O(b[d],1)):(b[d]=Yt(K),b[d].c(),O(b[d],1),b[d].m(a,null))}for($e(),d=A.length;d<b.length;d+=1)Zt(d);he()}if(y&1&&(c.checked=c.__value===$[0]),y&1&&(q.checked=q.__value===$[0]),y&4){W=H($[2]);let d;for(d=0;d<W.length;d+=1){const K=Gt($,W,d);_[d]?_[d].p(K,y):(_[d]=Qt(K),_[d].c(),_[d].m(R,null))}for(;d<_.length;d+=1)_[d].d(1);_.length=W.length}},i($){if(!Q){for(let y=0;y<A.length;y+=1)O(b[y]);Q=!0}},o($){b=b.filter(Boolean);for(let y=0;y<b.length;y+=1)F(b[y]);Q=!1},d($){$&&k(t),ut(b,$),ut(_,$),lt.r(),ct=!1,T(wt)}}}function Ae(e,t,n){let o="sixMonths";const s=["Allt material p\xE5 Fokus.se","Tillg\xE5ng till e-tidning","Tillg\xE5ng till v\xE5ra podcasts","Nyhetsbrev"],r=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],i=[[]];function l(){o=this.__value,n(0,o)}function a(){o=this.__value,n(0,o)}return[o,s,r,l,i,a]}class Xt extends rt{constructor(t){super(),ot(this,t,Ae,Oe,I,{})}}customElements.define("sesamy-paywall",Rt(Xt,{},[],[],!0));export{Kt as Login,Xt as Paywall};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(x,b){typeof exports=="object"&&typeof module<"u"?b(exports):typeof define=="function"&&define.amd?define(["exports"],b):(x=typeof globalThis<"u"?globalThis:x||self,b(x["@sesamy/sesamyComponents"]={}))})(this,function(x){"use strict";var Ot=Object.defineProperty;var Pt=(x,b,N)=>b in x?Ot(x,b,{enumerable:!0,configurable:!0,writable:!0,value:N}):x[b]=N;var L=(x,b,N)=>Pt(x,typeof b!="symbol"?b+"":b,N);function b(){}function N(t,e){for(const n in e)t[n]=e[n];return t}function ve(t){return t()}function ye(){return Object.create(null)}function T(t){t.forEach(ve)}function ke(t){return typeof t=="function"}function R(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let J;function qe(t,e){return t===e?!0:(J||(J=document.createElement("a")),J.href=e,t===J.href)}function et(t){return Object.keys(t).length===0}function we(t,e,n,s){if(t){const l=Ee(t,e,n,s);return t[0](l)}}function Ee(t,e,n,s){return t[1]&&s?N(n.ctx.slice(),t[1](s(e))):n.ctx}function xe(t,e,n,s){if(t[2]&&s){const l=t[2](s(n));if(e.dirty===void 0)return l;if(typeof l=="object"){const i=[],o=Math.max(e.dirty.length,l.length);for(let r=0;r<o;r+=1)i[r]=e.dirty[r]|l[r];return i}return e.dirty|l}return e.dirty}function Ne(t,e,n,s,l,i){if(l){const o=Ee(e,n,s,i);t.p(o,l)}}function Ce(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let s=0;s<n;s++)e[s]=-1;return e}return-1}function G(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function Le(t,e){const n={};e=new Set(e);for(const s in t)!e.has(s)&&s[0]!=="$"&&(n[s]=t[s]);return n}function g(t,e){t.appendChild(e)}function tt(t,e,n){const s=nt(t);if(!s.getElementById(e)){const l=m("style");l.id=e,l.textContent=n,st(s,l)}}function nt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function st(t,e){return g(t.head||t,e),e.sheet}function S(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function re(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function m(t){return document.createElement(t)}function Se(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function je(t){return document.createTextNode(t)}function w(){return je(" ")}function ce(){return je("")}function Y(t,e,n,s){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}function h(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function Q(t,e){for(const n in e)h(t,n,e[n])}function lt(t){let e;return{p(...n){e=n,e.forEach(s=>t.push(s))},r(){e.forEach(n=>t.splice(t.indexOf(n),1))}}}function it(t){return Array.from(t.childNodes)}function Ae(t,e){t.value=e??""}function ot(t){const e={};return t.childNodes.forEach(n=>{e[n.slot||"default"]=!0}),e}let ue;function K(t){ue=t}const W=[],Oe=[];let B=[];const Pe=[],rt=Promise.resolve();let fe=!1;function ct(){fe||(fe=!0,rt.then(Me))}function ae(t){B.push(t)}const de=new Set;let I=0;function Me(){if(I!==0)return;const t=ue;do{try{for(;I<W.length;){const e=W[I];I++,K(e),ut(e.$$)}}catch(e){throw W.length=0,I=0,e}for(K(null),W.length=0,I=0;Oe.length;)Oe.pop()();for(let e=0;e<B.length;e+=1){const n=B[e];de.has(n)||(de.add(n),n())}B.length=0}while(W.length);for(;Pe.length;)Pe.pop()();fe=!1,de.clear(),K(t)}function ut(t){if(t.fragment!==null){t.update(),T(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(ae)}}function ft(t){const e=[],n=[];B.forEach(s=>t.indexOf(s)===-1?e.push(s):n.push(s)),n.forEach(s=>s()),B=e}const X=new Set;let P;function at(){P={r:0,c:[],p:P}}function dt(){P.r||T(P.c),P=P.p}function j(t,e){t&&t.i&&(X.delete(t),t.i(e))}function z(t,e,n,s){if(t&&t.o){if(X.has(t))return;X.add(t),P.c.push(()=>{X.delete(t),s&&(n&&t.d(1),s())}),t.o(e)}else s&&s()}function D(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function he(t,e){const n={},s={},l={$$scope:1};let i=t.length;for(;i--;){const o=t[i],r=e[i];if(r){for(const u in o)u in r||(s[u]=1);for(const u in r)l[u]||(n[u]=r[u],l[u]=1);t[i]=r}else for(const u in o)l[u]=1}for(const o in s)o in n||(n[o]=void 0);return n}function ht(t){return typeof t=="object"&&t!==null?t:{}}function Te(t){t&&t.c()}function _e(t,e,n){const{fragment:s,after_update:l}=t.$$;s&&s.m(e,n),ae(()=>{const i=t.$$.on_mount.map(ve).filter(ke);t.$$.on_destroy?t.$$.on_destroy.push(...i):T(i),t.$$.on_mount=[]}),l.forEach(ae)}function ge(t,e){const n=t.$$;n.fragment!==null&&(ft(n.after_update),T(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function _t(t,e){t.$$.dirty[0]===-1&&(W.push(t),ct(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function Z(t,e,n,s,l,i,o=null,r=[-1]){const u=ue;K(t);const a=t.$$={fragment:null,ctx:[],props:i,update:b,not_equal:l,bound:ye(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(u?u.$$.context:[])),callbacks:ye(),dirty:r,skip_bound:!1,root:e.target||u.$$.root};o&&o(a.root);let y=!1;if(a.ctx=n?n(t,e.props||{},($,c,...v)=>{const f=v.length?v[0]:c;return a.ctx&&l(a.ctx[$],a.ctx[$]=f)&&(!a.skip_bound&&a.bound[$]&&a.bound[$](f),y&&_t(t,$)),c}):[],a.update(),y=!0,T(a.before_update),a.fragment=s?s(a.ctx):!1,e.target){if(e.hydrate){const $=it(e.target);a.fragment&&a.fragment.l($),$.forEach(C)}else a.fragment&&a.fragment.c();e.intro&&j(t.$$.fragment),_e(t,e.target,e.anchor),Me()}K(u)}let We;typeof HTMLElement=="function"&&(We=class extends HTMLElement{constructor(e,n,s){super();L(this,"$$ctor");L(this,"$$s");L(this,"$$c");L(this,"$$cn",!1);L(this,"$$d",{});L(this,"$$r",!1);L(this,"$$p_d",{});L(this,"$$l",{});L(this,"$$l_u",new Map);this.$$ctor=e,this.$$s=n,s&&this.attachShadow({mode:"open"})}addEventListener(e,n,s){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(n),this.$$c){const l=this.$$c.$on(e,n);this.$$l_u.set(n,l)}super.addEventListener(e,n,s)}removeEventListener(e,n,s){if(super.removeEventListener(e,n,s),this.$$c){const l=this.$$l_u.get(n);l&&(l(),this.$$l_u.delete(n))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(i){return()=>{let o;return{c:function(){o=m("slot"),i!=="default"&&h(o,"name",i)},m:function(a,y){S(a,o,y)},d:function(a){a&&C(o)}}}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const n={},s=ot(this);for(const i of this.$$s)i in s&&(n[i]=[e(i)]);for(const i of this.attributes){const o=this.$$g_p(i.name);o in this.$$d||(this.$$d[o]=ee(o,i.value,this.$$p_d,"toProp"))}for(const i in this.$$p_d)!(i in this.$$d)&&this[i]!==void 0&&(this.$$d[i]=this[i],delete this[i]);this.$$c=new this.$$ctor({target:this.shadowRoot||this,props:{...this.$$d,$$slots:n,$$scope:{ctx:[]}}});const l=()=>{this.$$r=!0;for(const i in this.$$p_d)if(this.$$d[i]=this.$$c.$$.ctx[this.$$c.$$.props[i]],this.$$p_d[i].reflect){const o=ee(i,this.$$d[i],this.$$p_d,"toAttribute");o==null?this.removeAttribute(this.$$p_d[i].attribute||i):this.setAttribute(this.$$p_d[i].attribute||i,o)}this.$$r=!1};this.$$c.$$.after_update.push(l),l();for(const i in this.$$l)for(const o of this.$$l[i]){const r=this.$$c.$on(i,o);this.$$l_u.set(o,r)}this.$$l={}}}attributeChangedCallback(e,n,s){var l;this.$$r||(e=this.$$g_p(e),this.$$d[e]=ee(e,s,this.$$p_d,"toProp"),(l=this.$$c)==null||l.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$c=void 0)})}$$g_p(e){return Object.keys(this.$$p_d).find(n=>this.$$p_d[n].attribute===e||!this.$$p_d[n].attribute&&n.toLowerCase()===e)||e}});function ee(t,e,n,s){var i;const l=(i=n[t])==null?void 0:i.type;if(e=l==="Boolean"&&typeof e!="boolean"?e!=null:e,!s||!n[t])return e;if(s==="toAttribute")switch(l){case"Object":case"Array":return e==null?null:JSON.stringify(e);case"Boolean":return e?"":null;case"Number":return e??null;default:return e}else switch(l){case"Object":case"Array":return e&&JSON.parse(e);case"Boolean":return e;case"Number":return e!=null?+e:e;default:return e}}function Be(t,e,n,s,l,i){let o=class extends We{constructor(){super(t,n,l),this.$$p_d=e}static get observedAttributes(){return Object.keys(e).map(r=>(e[r].attribute||r).toLowerCase())}};return Object.keys(e).forEach(r=>{Object.defineProperty(o.prototype,r,{get(){return this.$$c&&r in this.$$c?this.$$c[r]:this.$$d[r]},set(u){var a;u=ee(r,u,e),this.$$d[r]=u,(a=this.$$c)==null||a.$set({[r]:u})}})}),s.forEach(r=>{Object.defineProperty(o.prototype,r,{get(){var u;return(u=this.$$c)==null?void 0:u[r]}})}),t.element=o,o}class te{constructor(){L(this,"$$");L(this,"$$set")}$destroy(){ge(this,1),this.$destroy=b}$on(e,n){if(!ke(n))return b;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(n),()=>{const l=s.indexOf(n);l!==-1&&s.splice(l,1)}}$set(e){this.$$set&&!et(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const gt="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(gt);function mt(t){tt(t,"svelte-1nq6lsq",".login-btn.svelte-1nq6lsq.svelte-1nq6lsq,.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease;border:none;outline:none}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:120px;height:40px;border-radius:5px;background-color:#007bff;color:white;font-size:16px;font-weight:bold}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:hover{background-color:#0056b3}.login-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq:focus{outline:2px solid #0056b3;outline-offset:4px}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq,.avatar-btn.svelte-1nq6lsq.svelte-1nq6lsq{width:50px;height:50px;border-radius:50%}.loading-btn.svelte-1nq6lsq.svelte-1nq6lsq{background-color:#00bfff;animation:svelte-1nq6lsq-pulse 1s infinite ease-in-out}.avatar-btn.svelte-1nq6lsq img.svelte-1nq6lsq{width:100%;height:100%;object-fit:cover;border-radius:50%}@keyframes svelte-1nq6lsq-pulse{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}")}function $t(t){let e,n,s;return{c(){e=m("button"),e.textContent="Login",h(e,"class","login-btn svelte-1nq6lsq"),h(e,"aria-label","Log in")},m(l,i){S(l,e,i),n||(s=Y(e,"click",t[2]),n=!0)},p:b,d(l){l&&C(e),n=!1,s()}}}function bt(t){let e,n,s,l,i;return{c(){e=m("button"),n=m("img"),qe(n.src,s=yt)||h(n,"src",s),h(n,"alt","User Avatar"),h(n,"class","svelte-1nq6lsq"),h(e,"class","avatar-btn svelte-1nq6lsq"),h(e,"aria-label","Log out")},m(o,r){S(o,e,r),g(e,n),l||(i=Y(e,"click",t[3]),l=!0)},p:b,d(o){o&&C(e),l=!1,i()}}}function pt(t){let e;return{c(){e=m("button"),e.innerHTML="",h(e,"class","loading-btn svelte-1nq6lsq"),h(e,"aria-busy","true"),h(e,"aria-label","Logging in")},m(n,s){S(n,e,s)},p:b,d(n){n&&C(e)}}}function vt(t){let e;function n(i,o){return i[0]?pt:i[1]?bt:$t}let s=n(t),l=s(t);return{c(){l.c(),e=ce()},m(i,o){l.m(i,o),S(i,e,o)},p(i,[o]){s===(s=n(i))&&l?l.p(i,o):(l.d(1),l=s(i),l&&(l.c(),l.m(e.parentNode,e)))},i:b,o:b,d(i){i&&C(e),l.d(i)}}}let yt="https://via.placeholder.com/50";function kt(t,e,n){let s=!1,l=!1;const i=async()=>{n(0,s=!0),await new Promise(u=>setTimeout(u,2e3)),n(0,s=!1),n(1,l=!0)},o=()=>{n(1,l=!1)};return l=l,[s,l,i,o]}class Ie extends te{constructor(e){super(),Z(this,e,kt,vt,R,{},mt)}}customElements.define("sesamy-login",Be(Ie,{},[],[],!0));/**
|
|
2
|
+
* @license lucide-svelte v0.445.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ze={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function De(t,e,n){const s=t.slice();return s[11]=e[n][0],s[12]=e[n][1],s}function me(t){let e,n=[t[12]],s={};for(let l=0;l<n.length;l+=1)s=N(s,n[l]);return{c(){e=Se(t[11]),Q(e,s)},m(l,i){S(l,e,i)},p(l,i){Q(e,s=he(n,[i&32&&l[12]]))},d(l){l&&C(e)}}}function Fe(t){let e=t[11],n,s=t[11]&&me(t);return{c(){s&&s.c(),n=ce()},m(l,i){s&&s.m(l,i),S(l,n,i)},p(l,i){l[11]?e?R(e,l[11])?(s.d(1),s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):s.p(l,i):(s=me(l),e=l[11],s.c(),s.m(n.parentNode,n)):e&&(s.d(1),s=null,e=l[11])},d(l){l&&C(n),s&&s.d(l)}}}function qt(t){let e,n,s,l,i,o=D(t[5]),r=[];for(let c=0;c<o.length;c+=1)r[c]=Fe(De(t,o,c));const u=t[10].default,a=we(u,t,t[9],null);let y=[ze,t[7],{width:t[2]},{height:t[2]},{stroke:t[1]},{"stroke-width":s=t[4]?Number(t[3])*24/Number(t[2]):t[3]},{class:l=t[6]("lucide-icon","lucide",t[0]?`lucide-${t[0]}`:"",t[8].class)}],$={};for(let c=0;c<y.length;c+=1)$=N($,y[c]);return{c(){e=Se("svg");for(let c=0;c<r.length;c+=1)r[c].c();n=ce(),a&&a.c(),Q(e,$)},m(c,v){S(c,e,v);for(let f=0;f<r.length;f+=1)r[f]&&r[f].m(e,null);g(e,n),a&&a.m(e,null),i=!0},p(c,[v]){if(v&32){o=D(c[5]);let f;for(f=0;f<o.length;f+=1){const A=De(c,o,f);r[f]?r[f].p(A,v):(r[f]=Fe(A),r[f].c(),r[f].m(e,n))}for(;f<r.length;f+=1)r[f].d(1);r.length=o.length}a&&a.p&&(!i||v&512)&&Ne(a,u,c,c[9],i?xe(u,c[9],v,null):Ce(c[9]),null),Q(e,$=he(y,[ze,v&128&&c[7],(!i||v&4)&&{width:c[2]},(!i||v&4)&&{height:c[2]},(!i||v&2)&&{stroke:c[1]},(!i||v&28&&s!==(s=c[4]?Number(c[3])*24/Number(c[2]):c[3]))&&{"stroke-width":s},(!i||v&257&&l!==(l=c[6]("lucide-icon","lucide",c[0]?`lucide-${c[0]}`:"",c[8].class)))&&{class:l}]))},i(c){i||(j(a,c),i=!0)},o(c){z(a,c),i=!1},d(c){c&&C(e),re(r,c),a&&a.d(c)}}}function wt(t,e,n){const s=["name","color","size","strokeWidth","absoluteStrokeWidth","iconNode"];let l=Le(e,s),{$$slots:i={},$$scope:o}=e,{name:r=void 0}=e,{color:u="currentColor"}=e,{size:a=24}=e,{strokeWidth:y=2}=e,{absoluteStrokeWidth:$=!1}=e,{iconNode:c=[]}=e;const v=(...f)=>f.filter((A,F,ne)=>!!A&&ne.indexOf(A)===F).join(" ");return t.$$set=f=>{n(8,e=N(N({},e),G(f))),n(7,l=Le(e,s)),"name"in f&&n(0,r=f.name),"color"in f&&n(1,u=f.color),"size"in f&&n(2,a=f.size),"strokeWidth"in f&&n(3,y=f.strokeWidth),"absoluteStrokeWidth"in f&&n(4,$=f.absoluteStrokeWidth),"iconNode"in f&&n(5,c=f.iconNode),"$$scope"in f&&n(9,o=f.$$scope)},e=G(e),[r,u,a,y,$,c,v,l,e,o,i]}class Et extends te{constructor(e){super(),Z(this,e,wt,qt,R,{name:0,color:1,size:2,strokeWidth:3,absoluteStrokeWidth:4,iconNode:5})}}function xt(t){let e;const n=t[2].default,s=we(n,t,t[3],null);return{c(){s&&s.c()},m(l,i){s&&s.m(l,i),e=!0},p(l,i){s&&s.p&&(!e||i&8)&&Ne(s,n,l,l[3],e?xe(n,l[3],i,null):Ce(l[3]),null)},i(l){e||(j(s,l),e=!0)},o(l){z(s,l),e=!1},d(l){s&&s.d(l)}}}function Nt(t){let e,n;const s=[{name:"circle-check"},t[1],{iconNode:t[0]}];let l={$$slots:{default:[xt]},$$scope:{ctx:t}};for(let i=0;i<s.length;i+=1)l=N(l,s[i]);return e=new Et({props:l}),{c(){Te(e.$$.fragment)},m(i,o){_e(e,i,o),n=!0},p(i,[o]){const r=o&3?he(s,[s[0],o&2&&ht(i[1]),o&1&&{iconNode:i[0]}]):{};o&8&&(r.$$scope={dirty:o,ctx:i}),e.$set(r)},i(i){n||(j(e.$$.fragment,i),n=!0)},o(i){z(e.$$.fragment,i),n=!1},d(i){ge(e,i)}}}function Ct(t,e,n){let{$$slots:s={},$$scope:l}=e;const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m9 12 2 2 4-4"}]];return t.$$set=o=>{n(1,e=N(N({},e),G(o))),"$$scope"in o&&n(3,l=o.$$scope)},e=G(e),[i,e,s,l]}class Lt extends te{constructor(e){super(),Z(this,e,Ct,Nt,R,{})}}function He(t,e,n){const s=t.slice();return s[6]=e[n],s}function Re(t,e,n){const s=t.slice();return s[9]=e[n],s}function Ke(t){let e,n,s,l,i,o;return n=new Lt({props:{class:"text-green-500 mr-2",size:20}}),{c(){e=m("li"),Te(n.$$.fragment),s=w(),l=m("span"),l.textContent=`${t[9]}`,i=w(),h(e,"class","flex items-center")},m(r,u){S(r,e,u),_e(n,e,null),g(e,s),g(e,l),g(e,i),o=!0},p:b,i(r){o||(j(n.$$.fragment,r),o=!0)},o(r){z(n.$$.fragment,r),o=!1},d(r){r&&C(e),ge(n)}}}function Ue(t){let e,n;return{c(){e=m("img"),qe(e.src,n="/api/placeholder/40/25")||h(e,"src",n),h(e,"alt",t[6]),h(e,"class","h-6")},m(s,l){S(s,e,l)},p:b,d(s){s&&C(e)}}}function St(t){let e,n,s,l,i,o,r,u,a,y,$,c,v,f,A,F,ne,O,E,Je,$e,Ge,se,Ye,le,Qe,ie,Xe,U,oe,be,pe,Ze,M=D(t[1]),p=[];for(let _=0;_<M.length;_+=1)p[_]=Ke(Re(t,M,_));const At=_=>z(p[_],1,1,()=>{p[_]=null});let H=D(t[2]),q=[];for(let _=0;_<H.length;_+=1)q[_]=Ue(He(t,H,_));return be=lt(t[4][0]),{c(){e=m("div"),n=m("div"),n.textContent="Redan prenumerant? Logga in",s=w(),l=m("h1"),l.textContent="FOKUS",i=w(),o=m("h2"),o.textContent="Läs Fokus Digital i 6 månader för bara 79 kr!",r=w(),u=m("ul");for(let _=0;_<p.length;_+=1)p[_].c();a=w(),y=m("div"),$=m("label"),c=m("input"),v=w(),f=m("div"),f.innerHTML='<div class="font-semibold">Fokus Digital i 6 månader för 79kr!</div> <div class="text-sm text-gray-600">Efter kampanjperioden 149 kr/mån. Ingen bindningstid!</div>',A=w(),F=m("div"),F.textContent="79 SEK/6 mån",ne=w(),O=m("label"),E=m("input"),Je=w(),$e=m("div"),$e.innerHTML='<div class="font-semibold">Fokus Digital i ett år för 995kr</div> <div class="text-sm text-gray-600">Du sparar 793 kr. Prenumerationen förnyas automatiskt årsvis.</div>',Ge=w(),se=m("div"),se.textContent="995 SEK/år",Ye=w(),le=m("button"),le.textContent="Fortsätt",Qe=w(),ie=m("div"),ie.textContent="Säker SSL-krypterad betalning",Xe=w(),U=m("div");for(let _=0;_<q.length;_+=1)q[_].c();h(n,"class","text-right text-sm text-red-500 mb-4"),h(l,"class","text-4xl font-bold text-red-500 mb-4"),h(o,"class","text-xl font-semibold mb-6"),h(u,"class","space-y-2 mb-6"),h(c,"type","radio"),h(c,"name","subscription"),c.__value="sixMonths",Ae(c,c.__value),h(c,"class","mr-3"),h(F,"class","ml-auto font-semibold"),h($,"class","flex items-center p-4 border rounded-lg"),h(E,"type","radio"),h(E,"name","subscription"),E.__value="oneYear",Ae(E,E.__value),h(E,"class","mr-3"),h(se,"class","ml-auto font-semibold"),h(O,"class","flex items-center p-4 border rounded-lg"),h(y,"class","space-y-4 mb-6"),h(le,"class","w-full bg-red-500 text-white py-3 rounded-lg font-semibold"),h(ie,"class","text-center text-sm text-gray-600 mt-4"),h(U,"class","flex justify-center space-x-2 mt-2"),h(e,"class","max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg"),be.p(c,E)},m(_,k){S(_,e,k),g(e,n),g(e,s),g(e,l),g(e,i),g(e,o),g(e,r),g(e,u);for(let d=0;d<p.length;d+=1)p[d]&&p[d].m(u,null);g(e,a),g(e,y),g(y,$),g($,c),c.checked=c.__value===t[0],g($,v),g($,f),g($,A),g($,F),g(y,ne),g(y,O),g(O,E),E.checked=E.__value===t[0],g(O,Je),g(O,$e),g(O,Ge),g(O,se),g(e,Ye),g(e,le),g(e,Qe),g(e,ie),g(e,Xe),g(e,U);for(let d=0;d<q.length;d+=1)q[d]&&q[d].m(U,null);oe=!0,pe||(Ze=[Y(c,"change",t[3]),Y(E,"change",t[5])],pe=!0)},p(_,[k]){if(k&2){M=D(_[1]);let d;for(d=0;d<M.length;d+=1){const V=Re(_,M,d);p[d]?(p[d].p(V,k),j(p[d],1)):(p[d]=Ke(V),p[d].c(),j(p[d],1),p[d].m(u,null))}for(at(),d=M.length;d<p.length;d+=1)At(d);dt()}if(k&1&&(c.checked=c.__value===_[0]),k&1&&(E.checked=E.__value===_[0]),k&4){H=D(_[2]);let d;for(d=0;d<H.length;d+=1){const V=He(_,H,d);q[d]?q[d].p(V,k):(q[d]=Ue(V),q[d].c(),q[d].m(U,null))}for(;d<q.length;d+=1)q[d].d(1);q.length=H.length}},i(_){if(!oe){for(let k=0;k<M.length;k+=1)j(p[k]);oe=!0}},o(_){p=p.filter(Boolean);for(let k=0;k<p.length;k+=1)z(p[k]);oe=!1},d(_){_&&C(e),re(p,_),re(q,_),be.r(),pe=!1,T(Ze)}}}function jt(t,e,n){let s="sixMonths";const l=["Allt material på Fokus.se","Tillgång till e-tidning","Tillgång till våra podcasts","Nyhetsbrev"],i=["Visa","American Express","Mastercard","Klarna","Google Pay","Apple Pay","Swish"],o=[[]];function r(){s=this.__value,n(0,s)}function u(){s=this.__value,n(0,s)}return[s,l,i,r,o,u]}class Ve extends te{constructor(e){super(),Z(this,e,jt,St,R,{})}}customElements.define("sesamy-paywall",Be(Ve,{},[],[],!0)),x.Login=Ie,x.Paywall=Ve,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sesamy/sesamy-components",
|
|
3
|
+
"description": "Ahareable web components library with Vite + Svelte",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "dist/lib/sesamy-components.js",
|
|
7
|
+
"main": "dist/lib/sesamy-components.umd.js",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"start": "npm run dev -s",
|
|
10
|
+
"dev": "vite --config vite.demo.config.ts",
|
|
11
|
+
"build": "vite build",
|
|
12
|
+
"build:demo": "vite build --config vite.demo.config.ts",
|
|
13
|
+
"preview": "vite preview --config vite.demo.config.ts",
|
|
14
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
15
|
+
"prepublishOnly": "npm run build -s"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.2",
|
|
19
|
+
"@tsconfig/svelte": "^5.0.4",
|
|
20
|
+
"svelte": "^4.2.19",
|
|
21
|
+
"svelte-check": "^4.0.2",
|
|
22
|
+
"svelte-preprocess": "^6.0.2",
|
|
23
|
+
"tslib": "^2.7.0",
|
|
24
|
+
"typescript": "^5.6.2",
|
|
25
|
+
"vite": "^5.4.7"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/lib"
|
|
29
|
+
],
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"@sesamy/sesamy-js": "^1.21.6",
|
|
32
|
+
"lucide-svelte": "^0.445.0"
|
|
33
|
+
}
|
|
34
|
+
}
|