@vanelsas/baredom 2.6.0 → 2.8.0
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.
- package/CHANGELOG.md +34 -0
- package/README.md +12 -41
- package/custom-elements.json +344 -5
- package/dist/baredom.d.ts +4 -0
- package/dist/base.js +451 -421
- package/dist/integrity.json +97 -93
- package/dist/x-alert.js +17 -19
- package/dist/x-avatar-group.js +9 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +9 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +13 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +13 -17
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +33 -34
- package/dist/x-chart.d.ts +26 -0
- package/dist/x-chart.js +47 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +1 -9
- package/dist/x-collapse.js +10 -12
- package/dist/x-color-picker.js +44 -45
- package/dist/x-combobox.js +26 -27
- package/dist/x-command-palette.js +26 -27
- package/dist/x-container.js +5 -6
- package/dist/x-context-menu.d.ts +31 -2
- package/dist/x-context-menu.js +20 -18
- package/dist/x-copy.js +20 -23
- package/dist/x-currency-field.js +23 -25
- package/dist/x-date-picker.d.ts +27 -0
- package/dist/x-date-picker.js +42 -42
- package/dist/x-divider.js +9 -10
- package/dist/x-drawer.js +10 -12
- package/dist/x-dropdown.js +11 -11
- package/dist/x-fieldset.js +5 -6
- package/dist/x-file-download.js +7 -8
- package/dist/x-file-upload.js +22 -25
- package/dist/x-form-field.js +15 -17
- package/dist/x-form.js +9 -10
- package/dist/x-gaussian-blur.js +13 -19
- package/dist/x-grid.js +6 -6
- package/dist/x-i18n-provider.d.ts +43 -0
- package/dist/x-i18n-provider.js +8 -0
- package/dist/x-i18n.d.ts +14 -0
- package/dist/x-i18n.js +5 -0
- package/dist/x-icon.js +6 -7
- package/dist/x-image.js +18 -19
- package/dist/x-kinetic-canvas.d.ts +18 -0
- package/dist/x-kinetic-canvas.js +26 -0
- package/dist/x-kinetic-font.js +27 -29
- package/dist/x-kinetic-typography.js +33 -39
- package/dist/x-liquid-dock.js +39 -39
- package/dist/x-liquid-fill.js +45 -45
- package/dist/x-liquid-glass.js +47 -47
- package/dist/x-menu-item.js +8 -10
- package/dist/x-menu.js +10 -11
- package/dist/x-metaball-cursor.js +27 -27
- package/dist/x-modal.js +11 -13
- package/dist/x-morph-stack.js +37 -39
- package/dist/x-multi-combobox.d.ts +50 -0
- package/dist/x-multi-combobox.js +37 -0
- package/dist/x-navbar.js +12 -13
- package/dist/x-neural-glow.js +33 -34
- package/dist/x-notification-center.js +9 -10
- package/dist/x-organic-divider.js +17 -19
- package/dist/x-organic-progress.js +38 -39
- package/dist/x-organic-shape.js +13 -14
- package/dist/x-pagination.js +15 -17
- package/dist/x-particle-button.js +51 -52
- package/dist/x-popover.js +26 -25
- package/dist/x-progress-circle.js +9 -11
- package/dist/x-progress.js +10 -11
- package/dist/x-radio.js +11 -12
- package/dist/x-ripple-effect.js +11 -12
- package/dist/x-scroll-parallax.js +18 -19
- package/dist/x-scroll-stack.js +17 -18
- package/dist/x-scroll-story.js +34 -36
- package/dist/x-scroll-timeline.js +45 -47
- package/dist/x-scroll.js +40 -42
- package/dist/x-search-field.js +15 -17
- package/dist/x-select.js +11 -11
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton-group.js +12 -14
- package/dist/x-skeleton.js +1 -1
- package/dist/x-slider.js +15 -18
- package/dist/x-soft-body.js +22 -22
- package/dist/x-spacer.js +4 -5
- package/dist/x-spinner.js +4 -6
- package/dist/x-splash.js +12 -13
- package/dist/x-stat.js +10 -12
- package/dist/x-stepper.js +14 -15
- package/dist/x-switch.js +10 -11
- package/dist/x-tab.js +7 -8
- package/dist/x-table-cell.js +20 -24
- package/dist/x-table-row.js +8 -10
- package/dist/x-table.js +12 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +19 -21
- package/dist/x-theme.d.ts +1 -1
- package/dist/x-theme.js +25 -25
- package/dist/x-timeline-item.js +21 -23
- package/dist/x-timeline.js +8 -9
- package/dist/x-toast.js +22 -24
- package/dist/x-toaster.js +8 -8
- package/dist/x-tooltip.js +12 -13
- package/dist/x-typography.js +9 -11
- package/dist/x-welcome-tour.js +60 -65
- package/package.json +201 -181
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
"number"&&$APP.
|
|
4
|
-
l=
|
|
5
|
-
c){var d=[],e=[];c=
|
|
6
|
-
|
|
7
|
-
return $APP
|
|
8
|
-
"key")-$APP.k(
|
|
9
|
-
b*d,b]},
|
|
10
|
-
c=
|
|
11
|
-
|
|
12
|
-
"0");h.push(m);l+=1}else break;for(;;)if(b<
|
|
13
|
-
","+$APP.
|
|
14
|
-
""+$APP.
|
|
15
|
-
c=$APP.k(a,"__xOrganicProgressNN");c=$APP.n(c)?c:0;if($APP.n($APP.n(
|
|
16
|
-
[],l=0;;)if(l<c){var m=b[l];if($APP.k(m,"depth")>=2){var
|
|
17
|
-
0},
|
|
18
|
-
|
|
19
|
-
!1;a.__xOrganicProgressBloom=!1;a.__xOrganicProgressPV=-1;$APP.
|
|
20
|
-
return $APP.n(m)?m:0}();if($APP.n($APP.n(c)?
|
|
21
|
-
"
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
requestAnimationFrame(function(){return q5.g?q5.g(a):q5.call(null,a)}))}return null},t5=$APP.Uf(["variant","density","seed"]);$APP.ha("baredom.exports.x_organic_progress.init",B5);export const init=B5;
|
|
2
|
+
var a8=function(a){return typeof a==="string"&&(a=a.trim(),$APP.M(a,""))?(a=parseFloat(a),$APP.n(isNaN(a))?null:Math.min(100,Math.max(0,a))):null},b8=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Zc(aba,a)?a:"vine"},c8=function(a){return a==null?!0:$APP.M((""+$APP.Q.g(a)).trim().toLowerCase(),"false")},d8=function(a){a=typeof a==="string"?a.trim().toLowerCase():null;return $APP.Zc(bba,a)?a:"normal"},e8=function(a){return typeof a==="string"?(a=parseInt(a.trim(),10),typeof a===
|
|
3
|
+
"number"&&$APP.p(isNaN(a))&&a>0?a:42):42},f8=function(a){return typeof a==="string"?(a=a.trim(),$APP.M(a,"")?a:null):null},g8=function(a){return typeof a==="string"?(a=a.trim(),$APP.M(a,"")?a:null):null},h8=function(a){a=(typeof a==="number"&&$APP.p(isNaN(a))&&a>0?Math.floor(a):42)|0;return[a===0?1:a]},i8=function(a){var b=a[0];b^=b<<13;b^=b>>>17;b=b^b<<5|0;a[0]=b;return Math.abs(b)/2147483647},dba=function(a,b){var c=(a+b)*cba,d=Math.floor(a+c);c=Math.floor(b+c);var e=(d+c)*j8,f=a-(d-e),h=b-(c-e),
|
|
4
|
+
l=f>h?1:0,m=f>h?0:1,q=f+-l-j8,r=h+-m-j8,v=f+-1-2*j8,x=h+-1-2*j8,y=d&255,A=c&255,D=.5-f*f-h*h,G=.5-q*q-r*r,I=.5-v*v-x*x;return 70*((D<0?0:function(){var H=D*D,K=k8[l8[y+l8[A&255]&255]&11];return H*H*(K[0]*f+K[1]*h)}())+(G<0?0:function(){var H=G*G,K=k8[l8[y+l+l8[A+m&255]&255]&11];return H*H*(K[0]*q+K[1]*r)}())+(I<0?0:function(){var H=I*I,K=k8[l8[y+1+l8[A+1&255]&255]&11];return H*H*(K[0]*v+K[1]*x)}()))},eba=function(a){var b=a*17.31,c=a*31.17;return function(d,e){return dba(d+b,e+c)}},fba=function(a,
|
|
5
|
+
b,c){var d=[],e=[];c=h8(c);for(var f=[0],h=[20,100,0,0],l=a.length,m=0;;)if(m<l){switch(a.charAt(m)){case "F":var q=h[0],r=h[1],v=h[2],x=h[3],y=f[0],A=38*Math.pow(.7,x)*(.8+.4*i8(c)),D=function(){var I=y*.3;var H=x*.5;I=b.i?b.i(I,H):b.call(null,I,H);return v+.15*I}(),G=q+A*Math.cos(D);A=r+A*Math.sin(D);d.push({x1:q,y1:r,x2:G,y2:A,depth:x,index:y});h[0]=G;h[1]=A;f[0]=y+1;break;case "+":q=function(){var I=f[0]*.2;return b.i?b.i(I,100):b.call(null,I,100)}();h[2]-=.436+.1*q;break;case "-":q=function(){var I=
|
|
6
|
+
f[0]*.2;return b.i?b.i(I,200):b.call(null,I,200)}();h[2]+=.436+.1*q;break;case "[":e.push([h[0],h[1],h[2],h[3]]);h[3]+=1;break;case "]":e.length>0&&(q=e.pop(),h[0]=q[0],h[1]=q[1],h[2]=q[2],h[3]=q[3])}m+=1}else break;d.sort(function(I,H){var K=$APP.k(I,"x2")-20;I=$APP.k(I,"y2")-100;var W=$APP.k(H,"x2")-20;H=$APP.k(H,"y2")-100;return K*K+I*I-(W*W+H*H)});return[d,d.length]},gba=function(a,b,c,d){a=""+$APP.Q.g(a.toFixed(1))+","+$APP.Q.g(b.toFixed(1));c=""+$APP.Q.g(c.toFixed(1))+","+$APP.Q.g(d.toFixed(1));
|
|
7
|
+
return $APP.$c(a,c)<0?""+$APP.Q.g(a)+"-"+$APP.Q.g(c):""+$APP.Q.g(c)+"-"+$APP.Q.g(a)},iba=function(a,b){b=$APP.Ic(hba,b,25);var c=h8(a),d=1.5*b,e=Math.sqrt(3)*b,f=Math.ceil(800/d)+4,h=Math.ceil(200/e)+4;a=[];for(var l=Math.sqrt(17E4),m=-2;;)if(m<f){for(var q=m*d,r=$APP.ce(m)?0:e/2,v=-2;;)if(v<h){var x=v*e+r;if(q>0-b&&q<800+b&&x>0-b&&x<200+b){var y=q-400,A=x-100;y=Math.sqrt(y*y+A*A);A=y*.7+i8(c)*.3*l;a.push({cx:q,cy:x,dist:y,key:A})}v+=1}else break;m+=1}else break;a.sort(function(I,H){return $APP.k(I,
|
|
8
|
+
"key")-$APP.k(H,"key")});c={};d=[];e=[0];f=a.length;for(h=0;;)if(h<f){r=a[h];m=$APP.k(r,"cx");q=$APP.k(r,"cy");r=Math.min(2,Math.floor($APP.k(r,"dist")*3/(l+.001)));for(v=0;;)if(v<6){y=Math.PI/3*v;var D=Math.PI/3*(v+1);x=m+b*Math.cos(y);y=q+b*Math.sin(y);A=m+b*Math.cos(D);D=q+b*Math.sin(D);var G=gba(x,y,A,D);$APP.n($APP.k(c,G))||(c[G]=!0,G=e[0],d.push({x1:x,y1:y,x2:A,y2:D,depth:r,index:G}),e[0]=G+1);v+=1}else break;h+=1}else break;return[d,d.length]},jba=function(a,b,c,d){b=c+(120*(b-a)-12*c)*d;return[a+
|
|
9
|
+
b*d,b]},m8=function(){return $APP.E(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},r8=function(a){a=new $APP.N(null,7,[$APP.ml,a.getAttribute("progress"),$APP.Gm,a.getAttribute("variant"),$APP.to,a.getAttribute("color"),n8,a.getAttribute("bloom"),$APP.Ck,a.getAttribute("density"),o8,a.getAttribute("seed"),$APP.Ch,a.getAttribute("label")],null);var b=$APP.J(a),c=$APP.C(b,$APP.ml);a=$APP.C(b,$APP.Gm);var d=$APP.C(b,$APP.to),e=$APP.C(b,n8),f=$APP.C(b,$APP.Ck),h=$APP.C(b,o8);b=$APP.C(b,
|
|
10
|
+
$APP.Ch);c=a8(c);var l=c==null,m=$APP.n(c)?c:0,q=!l&&m>=100;return $APP.Lf([$APP.sn,$APP.$k,$APP.ii,p8,q8,$APP.lo,$APP.X,$APP.en,$APP.xm,$APP.vn,$APP.Dm],[l,g8(d),b8(a),c8(e),e8(h),l?"Loading...":""+$APP.Q.g(Math.round(m))+"%",f8(b),m,q,c,d8(f)])},kba=function(a,b){a=window.getComputedStyle(a).getPropertyValue("--x-organic-progress-branch-width").trim();return $APP.M(a,"")?(a=parseFloat(a),$APP.n(isNaN(a))?b:a):b},lba=function(a,b,c){var d=$APP.J($APP.k(a,"__xOrganicProgressRefs")),e=$APP.C(d,s8);
|
|
11
|
+
d=function(){var y=$APP.k(a,"__xOrganicProgressLines");return $APP.n(y)?y:[]}();for(var f=d.length,h=[],l=0;;)if(l<b){var m=l<f?d[l]:function(){var y=document.createElementNS("http://www.w3.org/2000/svg","line");y.setAttribute("stroke-linecap","round");e.appendChild(y);return y}(),q=c[l],r=$APP.k(q,"y1"),v=$APP.k(q,"x2"),x=$APP.k(q,"y2");m.setAttribute("x1",""+$APP.Q.g($APP.k(q,"x1")));m.setAttribute("y1",""+$APP.Q.g(r));m.setAttribute("x2",""+$APP.Q.g(v));m.setAttribute("y2",""+$APP.Q.g(x));m.setAttribute("opacity",
|
|
12
|
+
"0");h.push(m);l+=1}else break;for(;;)if(b<f)e.removeChild(d[b]),b+=1;else break;a.__xOrganicProgressLines=h;a.__xOrganicProgressPV=-1},t8=function(a){var b=$APP.k(a,"__xOrganicProgressLines"),c=$APP.k(a,"__xOrganicProgressSegs"),d=$APP.k(a,"__xOrganicProgressSegN"),e=$APP.k(a,"__xOrganicProgressModel"),f=$APP.B.i($APP.ii.g(e),"honeycomb");e=$APP.$k.g(e);var h=$APP.n(e)?e:"var("+$APP.Q.g("--x-organic-progress-color-primary")+","+$APP.Q.g(f?"#818cf8":"#22c55e")+")",l="var("+$APP.Q.g("--x-organic-progress-color-secondary")+
|
|
13
|
+
","+$APP.Q.g(f?"#a5b4fc":"#16a34a")+")";a=kba(a,f?1.5:3);if(f)for(f=0;;)if(f<d){e=b[f];var m=$APP.k(c[f],"depth");e.setAttribute("stroke-width",""+$APP.Q.g(a));e.style.stroke=function(){switch(m){case 0:return h;case 1:return l;default:return l}}();e.setAttribute("stroke-linecap","round");e.setAttribute("stroke-opacity",function(){switch(m){case 0:return"0.9";case 1:return"0.7";default:return"0.5"}}());f+=1}else break;else for(f=0;;)if(f<d){e=b[f];var q=$APP.k(c[f],"depth"),r=q===0?h:l;e.setAttribute("stroke-width",
|
|
14
|
+
""+$APP.Q.g(Math.max(.5,a-q*.6)));e.style.stroke=r;e.setAttribute("stroke-linecap","round");e.setAttribute("stroke-opacity","1");f+=1}else break},mba=function(a){var b=$APP.k(a,"__xOrganicProgressSPos"),c=$APP.k(a,"__xOrganicProgressSegN"),d=Math.floor(b/100*c),e=$APP.k(a,"__xOrganicProgressPV"),f=$APP.k(a,"__xOrganicProgressLines");if($APP.M(d,e)){c=Math.max(d,e<0?c:e);for(e=Math.min(d,e<0?0:e);;)if(e<c){var h=f[e];$APP.n(h)&&h.setAttribute("opacity",e<d?"1":"0");e+=1}else break;f=$APP.k(a,"__xOrganicProgressNodes");
|
|
15
|
+
c=$APP.k(a,"__xOrganicProgressNN");c=$APP.n(c)?c:0;if($APP.n($APP.n(f)?c>0:f))for(b=Math.floor(b/100*c),e=0;;)if(e<c)h=f[e],$APP.n(h)&&h.setAttribute("opacity",e<b?"1":"0"),e+=1;else break;a.__xOrganicProgressPV=d}},nba=function(a){var b=$APP.k(a,"__xOrganicProgressSegs"),c=$APP.k(a,"__xOrganicProgressSegN"),d=$APP.J($APP.k(a,"__xOrganicProgressRefs"));d=$APP.C(d,u8);var e=$APP.k(a,"__xOrganicProgressModel"),f="var("+$APP.Q.g("--x-organic-progress-bloom-color")+",#f472b6)";e=h8(q8.g(e)+7);for(var h=
|
|
16
|
+
[],l=0;;)if(l<c){var m=b[l];if($APP.k(m,"depth")>=2){var q=document.createElementNS("http://www.w3.org/2000/svg","circle"),r=$APP.k(m,"x2");m=$APP.k(m,"y2");var v=2*i8(e)-1,x=2*i8(e)-1;q.setAttribute("cx",""+$APP.Q.g(r));q.setAttribute("cy",""+$APP.Q.g(m));q.setAttribute("r","0");q.style.fill=f;q.setAttribute("opacity","0");q.setAttribute("class","bloom-petal");q.__xOrganicProgressBDx=v;q.__xOrganicProgressBDy=x;d.appendChild(q);h.push(q)}l+=1}else break;a.__xOrganicProgressBEls=h;a.__xOrganicProgressBloom=
|
|
17
|
+
!0;a.__xOrganicProgressBT=0},oba=function(a,b){b=$APP.k(a,"__xOrganicProgressBT")+b;var c=b/1.5;a.__xOrganicProgressBT=b;if(c>1){b=$APP.J($APP.k(a,"__xOrganicProgressRefs"));b=$APP.C(b,u8);c=$APP.k(a,"__xOrganicProgressBEls");if($APP.n(c))for(var d=c.length,e=0;;)if(e<d){var f=c[e];$APP.n(f.parentNode)&&b.removeChild(f);e+=1}else break;a.__xOrganicProgressBEls=null;a.__xOrganicProgressBloom=!1;$APP.P(a,"x-organic-progress-bloom-end",{progress:100})}else for(a=$APP.k(a,"__xOrganicProgressBEls"),b=
|
|
18
|
+
1-Math.min(c,1),b=4*(1-b*b*b),c=Math.max(0,1-c*c),d=a.length,e=0;;)if(e<d){f=a[e];var h=$APP.k(f,"__xOrganicProgressBDx")*b*8,l=$APP.k(f,"__xOrganicProgressBDy")*b*8;f.setAttribute("r",""+$APP.Q.g(b*2.5));f.setAttribute("opacity",""+$APP.Q.g(c));f.setAttribute("transform","translate("+$APP.Q.g(h)+","+$APP.Q.g(l)+")");e+=1}else break},pba=function(a){a.__xOrganicProgressTime=0;a.__xOrganicProgressSPos=0;a.__xOrganicProgressSVel=0;$APP.fa(a,"__xOrganicProgressLF",performance.now());a.__xOrganicProgressDone=
|
|
19
|
+
!1;a.__xOrganicProgressBloom=!1;a.__xOrganicProgressPV=-1;$APP.fa(a,"__xOrganicProgressRaf",requestAnimationFrame(function(){return v8(a)}))},w8=function(a){for(var b=$APP.k(a,"__xOrganicProgressModel"),c=$APP.k(a,"__xOrganicProgressSegN"),d=$APP.n($APP.sn.g(b))?50:$APP.en.g(b),e=Math.floor(d/100*c),f=$APP.k(a,"__xOrganicProgressLines"),h=0;;)if(h<c){var l=f[h];$APP.n(l)&&l.setAttribute("opacity",h<e?"1":"0");h+=1}else break;c=$APP.k(a,"__xOrganicProgressNodes");f=function(){var m=$APP.k(a,"__xOrganicProgressNN");
|
|
20
|
+
return $APP.n(m)?m:0}();if($APP.n($APP.n(c)?f>0:c))for(d=Math.floor(d/100*f),h=0;;)if(h<f)l=c[h],$APP.n(l)&&l.setAttribute("opacity",h<d?"1":"0"),h+=1;else break;a.__xOrganicProgressPV=e;$APP.n(function(){var m=$APP.xm.g(b);return $APP.n(m)?$APP.p($APP.k(a,"__xOrganicProgressDone")):m}())&&(a.__xOrganicProgressDone=!0,$APP.P(a,"x-organic-progress-complete",{progress:100}))},z8=function(a,b){var c=r8(a);a.__xOrganicProgressModel=c;a.setAttribute("role","progressbar");a.setAttribute("aria-valuemin",
|
|
21
|
+
"0");a.setAttribute("aria-valuemax","100");$APP.n($APP.sn.g(c))?(a.removeAttribute("aria-valuenow"),a.setAttribute("aria-busy","true"),a.setAttribute("aria-valuetext","Loading...")):(a.setAttribute("aria-valuenow",""+$APP.Q.g(Math.round($APP.en.g(c)))),a.removeAttribute("aria-busy"),a.setAttribute("aria-valuetext",$APP.lo.g(c)));var d=$APP.X.g(c);$APP.n(d)?a.setAttribute("aria-label",d):a.removeAttribute("aria-label");if(b==null||$APP.Zc(x8,b)){b=$APP.B.i($APP.ii.g(c),"honeycomb");d=$APP.Ic(qba,$APP.Dm.g(c),
|
|
22
|
+
3);if(b)c=iba(q8.g(c),$APP.Dm.g(c));else{a:{for(var e=new $APP.N(null,1,["F","F[+F]F[-F]F"],null),f="F",h=0;;){if(h>=d){d=f;break a}for(var l=[],m=f.length,q=0;;)if(q<m){var r=f.charAt(q),v=$APP.C(e,r);$APP.n(v)?l.push(v):l.push(r);q+=1}else break;h+=1;f=l.join("")}d=void 0}e=eba(q8.g(c));c=fba(d,e,q8.g(c))}d=c;c=d[0];d=d[1];a.__xOrganicProgressSegs=c;a.__xOrganicProgressSegN=d;lba(a,d,c);d=$APP.J($APP.k(a,"__xOrganicProgressRefs"));c=$APP.C(d,s8);d=$APP.C(d,$APP.wk);$APP.n(c)&&($APP.n(b)?c.removeAttribute("filter"):
|
|
23
|
+
c.setAttribute("filter","url(#x-organic-progress-gooey)"));$APP.n($APP.n(d)?$APP.p(b):d)&&d.setAttribute("stdDeviation","2");b=$APP.J($APP.k(a,"__xOrganicProgressRefs"));b=$APP.C(b,y8);c=$APP.k(a,"__xOrganicProgressNodes");if($APP.n($APP.n(b)?c:b))for(d=c.length,e=0;;)if(e<d)f=c[e],$APP.n(f.parentNode)&&b.removeChild(f),e+=1;else break;a.__xOrganicProgressNodes=null;a.__xOrganicProgressND=null;a.__xOrganicProgressNN=0;t8(a);a.__xOrganicProgressPV=-1;m8()&&w8(a)}},rba=function(a){Object.defineProperty(a,
|
|
24
|
+
"progress",{get:function(){return a8(this.getAttribute("progress"))},set:function(b){return b==null?this.removeAttribute("progress"):this.setAttribute("progress",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"variant",{get:function(){return b8(this.getAttribute("variant"))},set:function(b){return b==null?this.removeAttribute("variant"):this.setAttribute("variant",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"color",{get:function(){return g8(this.getAttribute("color"))},
|
|
25
|
+
set:function(b){return b==null?this.removeAttribute("color"):this.setAttribute("color",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"bloom",{get:function(){return c8(this.getAttribute("bloom"))},set:function(b){return $APP.n(b)?this.removeAttribute("bloom"):this.setAttribute("bloom","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"density",{get:function(){return d8(this.getAttribute("density"))},set:function(b){return b==null?this.removeAttribute("density"):
|
|
26
|
+
this.setAttribute("density",""+$APP.Q.g(b))},enumerable:!0,configurable:!0});Object.defineProperty(a,"seed",{get:function(){return e8(this.getAttribute("seed"))},set:function(b){return b==null?this.removeAttribute("seed"):this.setAttribute("seed",""+$APP.Q.g(b|0))},enumerable:!0,configurable:!0});return Object.defineProperty(a,"label",{get:function(){return f8(this.getAttribute("label"))},set:function(b){return b==null?this.removeAttribute("label"):this.setAttribute("label",""+$APP.Q.g(b))},enumerable:!0,
|
|
27
|
+
configurable:!0})},tba=function(a){var b=r8(a);a.__xOrganicProgressModel=b;if(!$APP.n($APP.k(a,"__xOrganicProgressRefs"))){b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","defs"),f=document.createElementNS("http://www.w3.org/2000/svg","g"),h=document.createElementNS("http://www.w3.org/2000/svg","g"),l=document.createElementNS("http://www.w3.org/2000/svg","g");
|
|
28
|
+
c.textContent=sba;d.setAttribute("part","svg");d.setAttribute("viewBox","0 0 800 200");d.setAttribute("preserveAspectRatio","xMidYMid slice");d.setAttribute("aria-hidden","true");f.setAttribute("part","branches");f.setAttribute("filter","url(#"+$APP.Q.g("x-organic-progress-gooey")+")");h.setAttribute("part","nodes");l.setAttribute("part","blooms");var m=document.createElementNS("http://www.w3.org/2000/svg","filter");var q=document.createElementNS("http://www.w3.org/2000/svg","feGaussianBlur"),r=document.createElementNS("http://www.w3.org/2000/svg",
|
|
29
|
+
"feColorMatrix");m.setAttribute("id","x-organic-progress-gooey");m.setAttribute("x","-10%");m.setAttribute("y","-10%");m.setAttribute("width","120%");m.setAttribute("height","120%");q.setAttribute("in","SourceGraphic");q.setAttribute("stdDeviation",""+$APP.Q.g(2));q.setAttribute("result","blur");r.setAttribute("in","blur");r.setAttribute("type","matrix");r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7");m.appendChild(q);m.appendChild(r);e.appendChild(m);m=new $APP.N(null,3,[$APP.wm,
|
|
30
|
+
m,$APP.wk,q,$APP.ho,r],null);d.appendChild(e);d.appendChild(f);d.appendChild(h);d.appendChild(l);b.appendChild(c);b.appendChild(d);b=$APP.cg($APP.Bc([m,new $APP.N(null,5,[$APP.Uh,b,$APP.tl,d,s8,f,y8,h,u8,l],null)]));a.__xOrganicProgressRefs=b}z8(a,null);t8(a);m8()?w8(a):pba(a);return null},uba=function(a){var b=$APP.k(a,"__xOrganicProgressRaf");$APP.n(b)&&(cancelAnimationFrame(b),a.__xOrganicProgressRaf=null);if($APP.n($APP.k(a,"__xOrganicProgressBloom"))){b=$APP.J($APP.k(a,"__xOrganicProgressRefs"));
|
|
31
|
+
b=$APP.C(b,u8);var c=$APP.k(a,"__xOrganicProgressBEls");if($APP.n(c))for(var d=c.length,e=0;;)if(e<d){var f=c[e];$APP.n(f.parentNode)&&b.removeChild(f);e+=1}else break;a.__xOrganicProgressBEls=null;a.__xOrganicProgressBloom=!1}return null},vba=function(a,b,c,d){$APP.M(c,d)&&$APP.n($APP.k(a,"__xOrganicProgressRefs"))&&(z8(a,b),$APP.Zc(x8,b)||t8(a));return null},A8=function(){return $APP.Yg("x-organic-progress",new $APP.N(null,5,[$APP.Pg,wba,$APP.Qg,tba,$APP.Rg,uba,$APP.Sg,vba,$APP.Wg,rba],null))},
|
|
32
|
+
y8=new $APP.F(null,"nodes-g","nodes-g",89420858),s8=new $APP.F(null,"branches-g","branches-g",548989635),p8=new $APP.F(null,"bloom?","bloom?",-326837587),n8=new $APP.F(null,"bloom-attr","bloom-attr",-1778398039),q8=new $APP.F(null,"seed","seed",68613327),o8=new $APP.F(null,"seed-raw","seed-raw",2146438207),u8=new $APP.F(null,"blooms-g","blooms-g",-1476393864);var wba="progress variant color bloom density seed label".split(" ");$APP.Yd(["x-organic-progress-complete",new $APP.N(null,2,[$APP.Z,new $APP.N(null,1,[$APP.vn,$APP.V],null),$APP.Fn,!1],null),"x-organic-progress-bloom-end",new $APP.N(null,2,[$APP.Z,new $APP.N(null,1,[$APP.vn,$APP.V],null),$APP.Fn,!1],null)]);
|
|
33
|
+
var aba=new $APP.O(null,new $APP.N(null,2,["honeycomb",null,"vine",null],null),null),bba=new $APP.O(null,new $APP.N(null,3,["dense",null,"normal",null,"sparse",null],null),null),qba=new $APP.N(null,3,["sparse",2,"normal",3,"dense",4],null),l8=[151,160,137,91,90,15,131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23,190,6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33,88,237,149,56,87,174,20,125,136,171,168,68,175,74,165,71,134,139,48,27,166,77,146,158,
|
|
34
|
+
231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244,102,143,54,65,25,63,161,1,216,80,73,209,76,132,187,208,89,18,169,200,196,135,130,116,188,159,86,164,100,109,198,173,186,3,64,52,217,226,250,124,123,5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42,223,183,170,213,119,248,152,2,44,154,163,70,221,153,101,155,167,43,172,9,129,22,39,253,19,98,108,110,79,113,224,232,178,185,112,104,218,246,97,228,251,34,242,193,238,210,144,12,191,179,162,241,81,51,145,235,249,14,
|
|
35
|
+
239,107,49,192,214,31,181,199,106,157,184,84,204,176,115,121,50,45,127,4,150,254,138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180],k8=[[1,1],[-1,1],[1,-1],[-1,-1],[1,0],[-1,0],[0,1],[0,-1],[1,1],[-1,1],[1,-1],[-1,-1]],cba=(Math.sqrt(3)-1)/2,j8=(3-Math.sqrt(3))/6,hba=new $APP.N(null,3,["sparse",40,"normal",25,"dense",16],null);var sba=":host{display:block;position:relative;min-height:60px;width:100%;overflow:hidden;"+$APP.Q.g("--x-organic-progress-color-primary")+":var(--x-color-success,#22c55e);"+$APP.Q.g("--x-organic-progress-color-secondary")+":var(--x-color-success,#16a34a);"+$APP.Q.g("--x-organic-progress-bloom-color")+":var(--x-color-danger,#f472b6);"+$APP.Q.g("--x-organic-progress-bg")+":transparent;"+$APP.Q.g("--x-organic-progress-branch-width")+":3;"+$APP.Q.g("--x-organic-progress-glow")+":2;"+$APP.Q.g("--x-organic-progress-opacity")+
|
|
36
|
+
":1;background:var("+$APP.Q.g("--x-organic-progress-bg")+",transparent);opacity:var("+$APP.Q.g("--x-organic-progress-opacity")+",1);}[part\x3dsvg]{display:block;width:100%;height:100%;}[part\x3dnodes] circle{fill:var("+$APP.Q.g("--x-organic-progress-color-primary")+",#22c55e);}@media(prefers-color-scheme:dark){:host{--x-organic-progress-color-primary:var(--x-color-success,#4ade80);--x-organic-progress-color-secondary:var(--x-color-success,#22c55e);--x-organic-progress-bloom-color:var(--x-color-danger,#f9a8d4);}}@media(prefers-reduced-motion:reduce){[part\x3dsvg]{transition:none!important;}.bloom-petal{transition:none!important;animation:none!important;}}",
|
|
37
|
+
v8=function v8(a){if($APP.n(a.isConnected)){var c=$APP.k(a,"__xOrganicProgressModel"),d=performance.now(),e=Math.min(d-$APP.k(a,"__xOrganicProgressLF"),100)/1E3;a.__xOrganicProgressLF=d;a.__xOrganicProgressTime=$APP.k(a,"__xOrganicProgressTime")+e;d=$APP.n($APP.sn.g(c))?50+20*Math.sin($APP.k(a,"__xOrganicProgressTime")*1.5):$APP.en.g(c);d=jba($APP.k(a,"__xOrganicProgressSPos"),d,$APP.k(a,"__xOrganicProgressSVel"),e);a.__xOrganicProgressSPos=d[0];a.__xOrganicProgressSVel=d[1];mba(a);$APP.n(function(){var f=
|
|
38
|
+
$APP.xm.g(c);return $APP.n(f)?$APP.p($APP.k(a,"__xOrganicProgressDone")):f}())&&(a.__xOrganicProgressDone=!0,$APP.P(a,"x-organic-progress-complete",{progress:100}),$APP.n(p8.g(c))&&nba(a));$APP.n(function(){var f=$APP.p($APP.xm.g(c));return f?(f=$APP.k(a,"__xOrganicProgressDone"),$APP.n(f)?$APP.p($APP.k(a,"__xOrganicProgressBloom")):f):f}())&&(a.__xOrganicProgressDone=!1);$APP.n($APP.k(a,"__xOrganicProgressBloom"))&&oba(a,e);$APP.fa(a,"__xOrganicProgressRaf",requestAnimationFrame(function(){return v8.g?
|
|
39
|
+
v8.g(a):v8.call(null,a)}))}return null},x8=$APP.fg(["variant","density","seed"]);$APP.ca("baredom.exports.x_organic_progress.init",A8);export const init=A8;
|
package/dist/x-organic-shape.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
d.setAttribute("part","shape");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xOrganicShapeBase=d;a.__xOrganicShapeSlot=e;a.__xOrganicShapeInit=!0},
|
|
4
|
-
$APP.
|
|
5
|
-
"morph")&&m==null?"none":l;h=typeof h==="string"&&$APP.
|
|
6
|
-
m.style.setProperty("clip-path",b);m.style.setProperty("aspect-ratio",e);$APP.n(d)?m.style.setProperty("width",d):m.style.removeProperty("width");$APP.n(
|
|
7
|
-
b);
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
gM,"polygon(0% 30%, 15% 25%, 30% 35%, 50% 20%, 70% 32%, 85% 22%, 100% 35%, 100% 70%, 85% 80%, 70% 68%, 50% 80%, 30% 70%, 15% 78%, 0% 65%)"],null)],null);$APP.ha("baredom.exports.x_organic_shape.init",mM);export const init=mM;
|
|
2
|
+
var DP=function(a){return typeof a==="string"&&$APP.Zc(CP,a)?a:"blob-1"},EP=function(a){return typeof a==="string"&&$APP.M("",a)?a:null},FP=function(a){var b=a.attachShadow({mode:"open"}),c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;box-sizing:border-box;color-scheme:light dark;--x-organic-shape-fill:rgba(99,102,241,0.12);--x-organic-shape-stroke:transparent;--x-organic-shape-stroke-width:0;--x-organic-shape-opacity:1;--x-organic-shape-shadow:none;--x-organic-shape-animate-duration:8s;--x-organic-shape-animate-timing:ease-in-out;--x-organic-shape-animate-direction:normal;--x-organic-shape-animate-delay:0s;}@media (prefers-color-scheme:dark){:host{--x-organic-shape-fill:rgba(129,140,248,0.18);}}[part\x3dshape]{width:100%;height:100%;position:relative;overflow:hidden;background:var(--x-organic-shape-fill);outline:var(--x-organic-shape-stroke-width) solid var(--x-organic-shape-stroke);outline-offset:calc(-1 * var(--x-organic-shape-stroke-width));opacity:var(--x-organic-shape-opacity);filter:var(--x-organic-shape-shadow);display:flex;align-items:center;justify-content:center;transition:clip-path 0.3s ease,opacity 0.3s ease;}@keyframes x-organic-shape-morph{0%,100%{clip-path:var(--x-organic-shape-clip);}50%{clip-path:var(--x-organic-shape-clip-alt);}}@keyframes x-organic-shape-pulse{0%,100%{transform:scale(1);}50%{transform:scale(1.06);}}@keyframes x-organic-shape-float{0%,100%{transform:translateY(0);}50%{transform:translateY(-6%);}}@keyframes x-organic-shape-spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}:host([data-animation\x3dmorph]) [part\x3dshape]{animation:x-organic-shape-morph var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dpulse]) [part\x3dshape]{animation:x-organic-shape-pulse var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dfloat]) [part\x3dshape]{animation:x-organic-shape-float var(--x-organic-shape-animate-duration) var(--x-organic-shape-animate-timing) var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}:host([data-animation\x3dspin]) [part\x3dshape]{animation:x-organic-shape-spin var(--x-organic-shape-animate-duration) linear var(--x-organic-shape-animate-delay) infinite var(--x-organic-shape-animate-direction);}@media (prefers-reduced-motion:reduce){:host([data-animation]) [part\x3dshape]{animation:none;}}";
|
|
3
|
+
d.setAttribute("part","shape");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xOrganicShapeBase=d;a.__xOrganicShapeSlot=e;a.__xOrganicShapeInit=!0},GP=function(a,b){if($APP.n($APP.n(b)?b.assignedNodes().length>0:null))return a.removeAttribute("role"),a.removeAttribute("aria-hidden");a.setAttribute("role","presentation");return a.setAttribute("aria-hidden","true")},LP=function(a){var b=new $APP.N(null,6,[$APP.rl,a.getAttribute("shape"),$APP.hm,a.getAttribute("path"),$APP.ji,a.getAttribute("animation"),
|
|
4
|
+
$APP.Kk,a.getAttribute("ratio"),$APP.ki,a.getAttribute("width"),$APP.li,a.getAttribute("height")],null);var c=$APP.J(b),d=$APP.C(c,$APP.rl),e=$APP.C(c,$APP.hm),f=$APP.C(c,$APP.ji),h=$APP.C(c,$APP.Kk);b=$APP.C(c,$APP.ki);c=$APP.C(c,$APP.li);e=typeof e==="string"&&$APP.M("",e.trim())?e.trim():null;d=DP(d);var l=typeof f==="string"&&$APP.Zc(HP,f)?f:"none";f=e!=null?e:$APP.se(IP,new $APP.De(null,2,5,$APP.Ee,[DP(d),JP],null));var m=e==null?$APP.se(IP,new $APP.De(null,2,5,$APP.Ee,[DP(d),KP],null)):null;
|
|
5
|
+
l=$APP.B.i(l,"morph")&&m==null?"none":l;h=typeof h==="string"&&$APP.M("",h.trim())?h.trim():"1/1";b=new $APP.N(null,8,[$APP.rl,d,$APP.hm,e,JP,f,KP,m,$APP.ji,l,$APP.Kk,h,$APP.ki,EP(b),$APP.li,EP(c)],null);f=$APP.J(b);b=$APP.C(f,JP);h=$APP.C(f,KP);c=$APP.C(f,$APP.ji);e=$APP.C(f,$APP.Kk);d=$APP.C(f,$APP.ki);f=$APP.C(f,$APP.li);m=$APP.k(a,"__xOrganicShapeBase");l=$APP.k(a,"__xOrganicShapeSlot");m.style.setProperty("--x-organic-shape-clip",b);$APP.n(h)?m.style.setProperty("--x-organic-shape-clip-alt",
|
|
6
|
+
h):m.style.removeProperty("--x-organic-shape-clip-alt");m.style.setProperty("clip-path",b);m.style.setProperty("aspect-ratio",e);$APP.n(d)?m.style.setProperty("width",d):m.style.removeProperty("width");$APP.n(f)?m.style.setProperty("height",f):m.style.removeProperty("height");$APP.M(c,"none")?a.setAttribute("data-animation",c):a.removeAttribute("data-animation");GP(a,l)},MP=function(a){function b(){return GP(a,c)}$APP.n($APP.k(a,"__xOrganicShapeInit"))||FP(a);var c=$APP.k(a,"__xOrganicShapeSlot");
|
|
7
|
+
a.__xOrganicShapeSlotHandler=b;c.addEventListener("slotchange",b);LP(a);return null},NP=function(a,b,c,d){$APP.M(c,d)&&$APP.n($APP.k(a,"__xOrganicShapeInit"))&&LP(a);return null},OP=function(a){Object.defineProperty(a,"shape",{get:function(){var b=this.getAttribute("shape");return $APP.n(b)?b:"blob-1"},set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("shape",b):this.removeAttribute("shape")},enumerable:!0,configurable:!0});Object.defineProperty(a,"path",{get:function(){return this.getAttribute("path")},
|
|
8
|
+
set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("path",b):this.removeAttribute("path")},enumerable:!0,configurable:!0});Object.defineProperty(a,"animation",{get:function(){var b=this.getAttribute("animation");return $APP.n(b)?b:"none"},set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("animation",b):this.removeAttribute("animation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"ratio",{get:function(){var b=this.getAttribute("ratio");
|
|
9
|
+
return $APP.n(b)?b:"1/1"},set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("ratio",b):this.removeAttribute("ratio")},enumerable:!0,configurable:!0});Object.defineProperty(a,"width",{get:function(){var b=this.getAttribute("width");return $APP.n(b)?b:""},set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("width",b):this.removeAttribute("width")},enumerable:!0,configurable:!0});return Object.defineProperty(a,"height",{get:function(){var b=this.getAttribute("height");
|
|
10
|
+
return $APP.n(b)?b:""},set:function(b){return typeof b==="string"&&$APP.M("",b)?this.setAttribute("height",b):this.removeAttribute("height")},enumerable:!0,configurable:!0})},QP=function(){return $APP.Yg("x-organic-shape",new $APP.N(null,4,[$APP.Pg,PP,$APP.Qg,MP,$APP.Sg,NP,$APP.Wg,OP],null))},JP=new $APP.F(null,"clip","clip",830998499),KP=new $APP.F(null,"clip-alt","clip-alt",-684562835);var PP="shape path animation ratio width height".split(" "),HP=new $APP.O(null,new $APP.N(null,5,["float",null,"none",null,"pulse",null,"spin",null,"morph",null],null),null),CP=new $APP.O(null,new $APP.N(null,8,["cloud",null,"blob-3",null,"leaf",null,"pebble",null,"blob-1",null,"blob-2",null,"wave",null,"droplet",null],null),null),IP=new $APP.N(null,8,["blob-1",new $APP.N(null,2,[JP,"polygon(30% 0%, 70% 0%, 100% 30%, 95% 70%, 70% 100%, 30% 95%, 0% 70%, 5% 30%)",KP,"polygon(25% 5%, 75% 0%, 95% 25%, 100% 65%, 75% 95%, 25% 100%, 0% 65%, 5% 25%)"],
|
|
11
|
+
null),"blob-2",new $APP.N(null,2,[JP,"polygon(50% 0%, 80% 10%, 100% 40%, 95% 75%, 70% 100%, 30% 100%, 5% 75%, 0% 40%, 20% 10%)",KP,"polygon(50% 5%, 85% 15%, 100% 45%, 90% 80%, 65% 95%, 35% 95%, 10% 80%, 0% 45%, 15% 15%)"],null),"blob-3",new $APP.N(null,2,[JP,"polygon(20% 0%, 80% 0%, 100% 20%, 100% 50%, 90% 80%, 70% 100%, 30% 100%, 10% 80%, 0% 50%, 0% 20%)",KP,"polygon(25% 5%, 75% 5%, 95% 25%, 100% 55%, 85% 85%, 65% 95%, 35% 95%, 15% 85%, 0% 55%, 5% 25%)"],null),"pebble",new $APP.N(null,2,[JP,"polygon(50% 2%, 78% 8%, 96% 30%, 98% 60%, 85% 88%, 55% 98%, 25% 92%, 4% 65%, 2% 35%, 22% 8%)",
|
|
12
|
+
KP,"polygon(50% 5%, 75% 12%, 93% 32%, 96% 58%, 82% 85%, 52% 96%, 28% 90%, 8% 62%, 5% 38%, 25% 12%)"],null),"leaf",new $APP.N(null,2,[JP,"polygon(50% 0%, 80% 15%, 98% 45%, 90% 75%, 65% 98%, 50% 100%, 35% 98%, 10% 75%, 2% 45%, 20% 15%)",KP,"polygon(50% 3%, 78% 18%, 95% 42%, 88% 72%, 62% 95%, 50% 97%, 38% 95%, 12% 72%, 5% 42%, 22% 18%)"],null),"droplet",new $APP.N(null,2,[JP,"polygon(50% 0%, 72% 20%, 90% 50%, 95% 72%, 80% 92%, 50% 100%, 20% 92%, 5% 72%, 10% 50%, 28% 20%)",KP,"polygon(50% 5%, 70% 22%, 88% 48%, 92% 70%, 78% 90%, 50% 97%, 22% 90%, 8% 70%, 12% 48%, 30% 22%)"],
|
|
13
|
+
null),"cloud",new $APP.N(null,2,[JP,"polygon(10% 60%, 0% 45%, 5% 30%, 18% 20%, 32% 15%, 45% 8%, 58% 12%, 72% 8%, 85% 18%, 95% 32%, 100% 50%, 95% 65%, 80% 75%, 55% 80%, 30% 78%, 15% 72%)",KP,"polygon(12% 58%, 2% 43%, 8% 28%, 20% 18%, 35% 12%, 48% 10%, 60% 14%, 75% 10%, 88% 20%, 97% 35%, 98% 52%, 92% 68%, 78% 78%, 52% 82%, 28% 80%, 13% 70%)"],null),"wave",new $APP.N(null,2,[JP,"polygon(0% 35%, 15% 20%, 30% 30%, 50% 15%, 70% 28%, 85% 18%, 100% 30%, 100% 75%, 85% 85%, 70% 72%, 50% 85%, 30% 75%, 15% 82%, 0% 70%)",
|
|
14
|
+
KP,"polygon(0% 30%, 15% 25%, 30% 35%, 50% 20%, 70% 32%, 85% 22%, 100% 35%, 100% 70%, 85% 80%, 70% 68%, 50% 80%, 30% 70%, 15% 78%, 0% 65%)"],null)],null);$APP.ca("baredom.exports.x_organic_shape.init",QP);export const init=QP;
|
package/dist/x-pagination.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
l.setAttribute("part","button button-next");l.setAttribute("aria-label","Next page");m.setAttribute("name","next");m.textContent="Next";l.appendChild(m);h.appendChild(l);h=new $APP.
|
|
5
|
-
d.setAttribute("part","nav");e.setAttribute("part","list");e.appendChild(
|
|
6
|
-
"button button-page");e.setAttribute("aria-label","Page "+$APP.
|
|
7
|
-
"…";a.appendChild(b);return a},
|
|
8
|
-
parseInt(e,10);var l=isFinite(e);e=$APP.n($APP.n(l)?e>=0:l)?e:1}else e=1;typeof
|
|
9
|
-
|
|
10
|
-
[$APP.
|
|
11
|
-
c.appendChild(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"boundary-count-raw","boundary-count-raw",410083250),jP=new $APP.K(null,"total-pages","total-pages",685894112),iP=new $APP.K(null,"page","page",849072397),$O=new $APP.K(null,"next-li","next-li",648524823),YO=new $APP.K(null,"btn","btn",1978294651),ZO=new $APP.K(null,"prev-li","prev-li",940258334),dP=new $APP.K(null,"page-raw","page-raw",-1198808870),XO=new $APP.K(null,"li","li",723558921),nP=new $APP.K(null,"ellipsis","ellipsis",998505738),oP=new $APP.K(null,"n","n",562130025),fP=new $APP.K(null,
|
|
18
|
-
"sibling-count-raw","sibling-count-raw",-620117200),kP=new $APP.K(null,"sibling-count","sibling-count",1756034573);var yP="page total-pages sibling-count boundary-count size disabled label".split(" "),hP=new $APP.S(null,new $APP.Q(null,3,["md",null,"lg",null,"sm",null],null),null);$APP.Pd(["page-change-request",new $APP.Q(null,2,[$APP.lm,!0,$APP.V,new $APP.Q(null,2,[iP,$APP.W,new $APP.K(null,"previousPage","previousPage",1452478108),$APP.W],null)],null),"page-change",new $APP.Q(null,1,[$APP.V,new $APP.Q(null,1,[iP,$APP.W],null)],null)]);$APP.ha("baredom.exports.x_pagination.init",AP);export const init=AP;
|
|
2
|
+
var DS=function(a){for(var b=[],c=arguments.length,d=0;;)if(d<c)b.push(arguments[d]),d+=1;else break;return $APP.wa($APP.Fa,$APP.Wi,0<b.length?new $APP.$b(b.slice(0),0,null):null)},ES=function(a){if(typeof a==="string"){a=parseInt(a,10);var b=isFinite(a);return $APP.n($APP.n(b)?a>0:b)?a:1}return 1},JS=function(a){var b=$APP.k(a,"__xPaginationRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("nav"),e=document.createElement("ol");
|
|
3
|
+
var f=document.createElement("li");var h=document.createElement("button"),l=document.createElement("slot");f.setAttribute("part","item item-prev");h.setAttribute("part","button button-prev");h.setAttribute("aria-label","Previous page");l.setAttribute("name","prev");l.textContent="Prev";h.appendChild(l);f.appendChild(h);f=new $APP.N(null,2,[FS,f,GS,h],null);h=document.createElement("li");l=document.createElement("button");var m=document.createElement("slot");h.setAttribute("part","item item-next");
|
|
4
|
+
l.setAttribute("part","button button-next");l.setAttribute("aria-label","Next page");m.setAttribute("name","next");m.textContent="Next";l.appendChild(m);h.appendChild(l);h=new $APP.N(null,2,[FS,h,GS,l],null);c.textContent=":host{display:block;color-scheme:light dark;--x-pagination-gap:0.25rem;--x-pagination-button-size:2rem;--x-pagination-button-radius:var(--x-radius-sm,0.375rem);--x-pagination-button-bg:transparent;--x-pagination-button-color:rgba(0,0,0,0.75);--x-pagination-button-border:1px solid rgba(0,0,0,0.15);--x-pagination-button-hover-bg:rgba(0,0,0,0.06);--x-pagination-button-hover-color:rgba(0,0,0,0.9);--x-pagination-current-bg:rgba(0,0,0,0.88);--x-pagination-current-color:#fff;--x-pagination-current-border:1px solid transparent;--x-pagination-disabled-opacity:0.4;--x-pagination-font-size:var(--x-font-size-sm,0.875rem);--x-pagination-ellipsis-color:rgba(0,0,0,0.45);}@media (prefers-color-scheme:dark){:host{--x-pagination-button-color:rgba(255,255,255,0.75);--x-pagination-button-border:1px solid rgba(255,255,255,0.15);--x-pagination-button-hover-bg:rgba(255,255,255,0.08);--x-pagination-button-hover-color:rgba(255,255,255,0.95);--x-pagination-current-bg:rgba(255,255,255,0.90);--x-pagination-current-color:#000;--x-pagination-ellipsis-color:rgba(255,255,255,0.40);}}:host([data-size\x3d'sm']){--x-pagination-button-size:1.75rem;--x-pagination-font-size:0.75rem;}:host([data-size\x3d'lg']){--x-pagination-button-size:2.5rem;--x-pagination-font-size:1rem;}[part~\x3d'nav']{display:block;}[part~\x3d'list']{display:flex;flex-wrap:wrap;align-items:center;list-style:none;margin:0;padding:0;gap:var(--x-pagination-gap);}[part~\x3d'button']{display:inline-flex;align-items:center;justify-content:center;min-width:var(--x-pagination-button-size);height:var(--x-pagination-button-size);padding:0 0.5rem;border:var(--x-pagination-button-border);border-radius:var(--x-pagination-button-radius);background:var(--x-pagination-button-bg);color:var(--x-pagination-button-color);font:inherit;font-size:var(--x-pagination-font-size);cursor:pointer;user-select:none;box-sizing:border-box;transition:background 0.15s,color 0.15s;}[part~\x3d'button']:hover:not(:disabled){background:var(--x-pagination-button-hover-bg);color:var(--x-pagination-button-hover-color);}[part~\x3d'button'][data-current]{background:var(--x-pagination-current-bg);color:var(--x-pagination-current-color);border:var(--x-pagination-current-border);font-weight:600;cursor:default;}[part~\x3d'button']:disabled{opacity:var(--x-pagination-disabled-opacity);cursor:not-allowed;}[part~\x3d'ellipsis']{display:inline-flex;align-items:center;justify-content:center;min-width:var(--x-pagination-button-size);height:var(--x-pagination-button-size);color:var(--x-pagination-ellipsis-color);font-size:var(--x-pagination-font-size);user-select:none;}@media (prefers-reduced-motion:reduce){[part~\x3d'button']{transition:none !important;}}@media (pointer:coarse){[part~\x3d'button']{min-width:2.75rem;height:2.75rem;}}";
|
|
5
|
+
d.setAttribute("part","nav");e.setAttribute("part","list");e.appendChild(FS.g(f));e.appendChild(FS.g(h));d.appendChild(e);b.appendChild(c);b.appendChild(d);b=new $APP.N(null,6,[$APP.Kj,d,$APP.lm,e,HS,FS.g(f),$APP.pk,GS.g(f),IS,FS.g(h),$APP.hj,GS.g(h)],null);a.__xPaginationRefs=b;return $APP.k(a,"__xPaginationRefs")},KS=function(a,b,c){var d=document.createElement("li"),e=document.createElement("button");d.setAttribute("part","item item-page");d.setAttribute("data-page",""+$APP.Q.g(a));e.setAttribute("part",
|
|
6
|
+
"button button-page");e.setAttribute("aria-label","Page "+$APP.Q.g(a));e.setAttribute("data-page",""+$APP.Q.g(a));$APP.n(b)&&(e.setAttribute("aria-current","page"),e.setAttribute("data-current",""));$APP.n(c)&&e.setAttribute("disabled","");e.textContent=""+$APP.Q.g(a);d.appendChild(e);return d},LS=function(){var a=document.createElement("li"),b=document.createElement("span");a.setAttribute("part","item item-ellipsis");b.setAttribute("part","ellipsis");b.setAttribute("aria-hidden","true");b.textContent=
|
|
7
|
+
"…";a.appendChild(b);return a},VS=function(a){a=new $APP.N(null,7,[MS,a.getAttribute("page"),NS,a.getAttribute("total-pages"),OS,a.getAttribute("sibling-count"),PS,a.getAttribute("boundary-count"),$APP.on,a.getAttribute("size"),$APP.Fh,a.hasAttribute("disabled"),$APP.Ch,a.getAttribute("label")],null);var b=$APP.J(a),c=$APP.C(b,MS),d=$APP.C(b,NS),e=$APP.C(b,OS),f=$APP.C(b,PS),h=$APP.C(b,$APP.on);a=$APP.C(b,$APP.Fh);b=$APP.C(b,$APP.Ch);d=ES(d);c=$APP.Hi.i(1,$APP.Ii.i(ES(c),d));if(typeof e==="string"){e=
|
|
8
|
+
parseInt(e,10);var l=isFinite(e);e=$APP.n($APP.n(l)?e>=0:l)?e:1}else e=1;typeof f==="string"?(f=parseInt(f,10),l=isFinite(f),l=$APP.n($APP.n(l)?f>=0:l)?f:1):l=1;f=e;e=l;h=typeof h==="string"?h.trim().toLowerCase():null;h=$APP.Zc(QS,h)?h:"md";return new $APP.N(null,7,[RS,c,SS,d,TS,f,US,e,$APP.bj,h,$APP.al,$APP.E(a),$APP.X,$APP.n(b)?b:"Pagination"],null)},YS=function(a){var b=JS(a),c=$APP.lm.g(b),d=$APP.Kj.g(b),e=$APP.pk.g(b),f=$APP.hj.g(b),h=HS.g(b);b=IS.g(b);var l=VS(a),m=$APP.J(l),q=$APP.C(m,RS),
|
|
9
|
+
r=$APP.C(m,SS),v=$APP.C(m,TS),x=$APP.C(m,US),y=$APP.C(m,$APP.bj);m=$APP.C(m,$APP.X);a:if(r<=0)r=$APP.pe;else{var A=$APP.Ii.i(x,r);x=$APP.Hi.i(r-x- -1,1);var D=$APP.Hi.i(1,q-v);v=$APP.Ii.i(r,q+v);r=$APP.hf.i($APP.hf.i($APP.hf.i(DS(),$APP.pg(1,A+1)),$APP.pg(x,r+1)),$APP.pg(D,v+1));r=$APP.Je(r);D=$APP.pe;for(v=0;;){if(v>=$APP.z(r)){r=D;break a}A=$APP.wc(r,v);var G=x=v>0?$APP.wc(r,v-1):null;x=$APP.n($APP.n(G)?A>x+1:G)?$APP.ud.i(D,new $APP.N(null,1,[$APP.R,WS],null)):D;A=$APP.ud.i(x,new $APP.N(null,2,
|
|
10
|
+
[$APP.R,RS,XS,A],null));v+=1;D=A}r=void 0}d.setAttribute("aria-label",m);a.setAttribute("data-size",y);d=$APP.J(l);a=$APP.C(d,RS);d=$APP.C(d,$APP.al);$APP.n($APP.n(d)?d:a<=1)?e.setAttribute("disabled",""):e.removeAttribute("disabled");d=$APP.J(l);e=$APP.C(d,RS);a=$APP.C(d,SS);d=$APP.C(d,$APP.al);$APP.n($APP.n(d)?d:e>=a)?f.setAttribute("disabled",""):f.removeAttribute("disabled");c.innerHTML="";c.appendChild(h);f=$APP.t(r);h=null;for(a=e=0;;)if(a<e)d=h.F(null,a),$APP.B.i(WS,$APP.R.g(d))?c.appendChild(LS()):
|
|
11
|
+
c.appendChild(KS(XS.g(d),$APP.B.i(XS.g(d),q),$APP.al.g(l))),a+=1;else if(f=$APP.t(f))h=f,$APP.Vc(h)?(f=$APP.Db(h),a=$APP.Eb(h),h=f,e=$APP.z(f),f=a):(f=$APP.u(h),$APP.B.i(WS,$APP.R.g(f))?c.appendChild(LS()):c.appendChild(KS(XS.g(f),$APP.B.i(XS.g(f),q),$APP.al.g(l))),f=$APP.w(h),h=null,e=0),a=0;else break;c.appendChild(b)},ZS=function(a,b){var c=VS(a);c=RS.g(c);return $APP.ch(a,"page-change-request",{page:b,previousPage:c})?$APP.P(a,"page-change",{page:b}):null},$S=function(a,b){a:{b=b.composedPath();
|
|
12
|
+
for(var c=b.length,d=0;;)if(d<c){var e=b[d];if($APP.B.i("BUTTON",$APP.n(e)?e.tagName:null)){b=e;break a}d+=1}else{b=null;break a}b=void 0}if($APP.n($APP.n(b)?$APP.p(b.hasAttribute("disabled")):b)){d=$APP.k(a,"__xPaginationRefs");c=$APP.pk.g(d);d=$APP.hj.g(d);e=b.getAttribute("data-page");if(b===c)return c=VS(a),b=RS.g(c),b>1?ZS(a,b-1):null;if(b===d)return c=VS(a),b=RS.g(c),c=SS.g(c),b<c?ZS(a,b+1):null;if(e!=null)return b=parseInt(e,10),$APP.n(isFinite(b))?ZS(a,b):null}return null},aT=function(a){function b(d){return $S(a,
|
|
13
|
+
d)}var c=JS(a);$APP.lm.g(c).addEventListener("click",b);$APP.fa(a,"__xPaginationHandlers",{click:b})},bT=function(a){var b=$APP.k(a,"__xPaginationHandlers");if($APP.n(b)){var c=$APP.k(a,"__xPaginationRefs");$APP.n(c)&&(c=$APP.lm.g(c),b=$APP.k(b,"click"),$APP.n($APP.n(c)?b:c)&&c.removeEventListener("click",b))}a.__xPaginationHandlers=null},cT=function(a,b,c){Object.defineProperty(a,b,{get:function(){return ES(this.getAttribute(c))},set:function(d){return d!=null?this.setAttribute(c,""+$APP.Q.g(d)):
|
|
14
|
+
this.removeAttribute(c)},enumerable:!0,configurable:!0})},dT=function(a){cT(a,"page","page");cT(a,"total-pages","total-pages");cT(a,"sibling-count","sibling-count");cT(a,"boundary-count","boundary-count");$APP.eh(a,"size","size","md");$APP.dh(a,"disabled","disabled");return $APP.eh(a,"label","label","Pagination")},eT=function(a){JS(a);bT(a);aT(a);YS(a);return null},fT=function(a){bT(a);return null},gT=function(a,b,c,d){$APP.M(c,d)&&YS(a);return null},iT=function(){return $APP.Yg("x-pagination",new $APP.N(null,
|
|
15
|
+
5,[$APP.Pg,hT,$APP.Qg,eT,$APP.Rg,fT,$APP.Sg,gT,$APP.Wg,dT],null))},NS=new $APP.F(null,"total-pages-raw","total-pages-raw",430880208),US=new $APP.F(null,"boundary-count","boundary-count",1637925987),PS=new $APP.F(null,"boundary-count-raw","boundary-count-raw",410083250),SS=new $APP.F(null,"total-pages","total-pages",685894112),RS=new $APP.F(null,"page","page",849072397),IS=new $APP.F(null,"next-li","next-li",648524823),GS=new $APP.F(null,"btn","btn",1978294651),HS=new $APP.F(null,"prev-li","prev-li",
|
|
16
|
+
940258334),MS=new $APP.F(null,"page-raw","page-raw",-1198808870),FS=new $APP.F(null,"li","li",723558921),WS=new $APP.F(null,"ellipsis","ellipsis",998505738),XS=new $APP.F(null,"n","n",562130025),OS=new $APP.F(null,"sibling-count-raw","sibling-count-raw",-620117200),TS=new $APP.F(null,"sibling-count","sibling-count",1756034573);var hT="page total-pages sibling-count boundary-count size disabled label".split(" "),QS=new $APP.O(null,new $APP.N(null,3,["md",null,"lg",null,"sm",null],null),null);$APP.Yd(["page-change-request",new $APP.N(null,2,[$APP.Fn,!0,$APP.Z,new $APP.N(null,2,[RS,$APP.V,new $APP.F(null,"previousPage","previousPage",1452478108),$APP.V],null)],null),"page-change",new $APP.N(null,1,[$APP.Z,new $APP.N(null,1,[RS,$APP.V],null)],null)]);$APP.ca("baredom.exports.x_pagination.init",iT);export const init=iT;
|